Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .agents/skills/custom-commands/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,13 +89,13 @@ with the following sub-clients:
| `client.accounts` | `agentmail_sdk::api::AccountsClient` | accounts operations |
| `client.agent` | `agentmail_sdk::api::AgentClient` | agent operations |
| `client.api_keys` | `agentmail_sdk::api::ApiKeysClient` | api_keys operations |
| `client.apps` | `agentmail_sdk::api::AppsClient` | apps operations |
| `client.auth` | `agentmail_sdk::api::AuthClient` | auth operations |
| `client.domains` | `agentmail_sdk::api::DomainsClient` | domains operations |
| `client.drafts` | `agentmail_sdk::api::DraftsClient` | drafts operations |
| `client.lists` | `agentmail_sdk::api::ListsClient` | lists operations |
| `client.metrics` | `agentmail_sdk::api::MetricsClient` | metrics operations |
| `client.organizations` | `agentmail_sdk::api::OrganizationsClient` | organizations operations |
| `client.providers` | `agentmail_sdk::api::ProvidersClient` | providers operations |
| `client.threads` | `agentmail_sdk::api::ThreadsClient` | threads operations |

### 3. Key Patterns
Expand Down
8 changes: 7 additions & 1 deletion .fern/replay.lock
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,13 @@ generations:
cli_version: unknown
generator_versions:
fernapi/fern-cli-generator: 0.38.10
current_generation: 4c9aefd77ae432325a08ca82fed607ef8ae8ca50
- commit_sha: c2dac7d33a1b45c1144403af99c98aedb4d428f6
tree_hash: 8d5c75076f174baa1ad10a085f8c4e32178567d7
timestamp: 2026-10-01T22:57:45.679Z
cli_version: unknown
generator_versions:
fernapi/fern-cli-generator: 0.38.10
current_generation: c2dac7d33a1b45c1144403af99c98aedb4d428f6
patches:
- id: patch-bf63549e
content_hash: sha256:a660ef1be2e6211b2d9aee152022a339ffd879d56f0e8b0b557ce0fb5e4d9b5c
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "agentmail-cli"
version = "1.7.0"
version = "1.8.0"
edition = "2021"
description = "Command-line interface for the AgentMail API. Send, receive, reply, and manage threaded email conversations from your terminal."
license = "MIT"
Expand Down
4 changes: 2 additions & 2 deletions agentmail-sdk/src/api/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
pub mod resources;

pub use resources::{
AccountsClient, AgentClient, ApiClient, ApiKeysClient, AuthClient, DomainsClient, DraftsClient,
InboxesClient, ListsClient, MetricsClient, OrganizationsClient, PodsClient, ProvidersClient,
AccountsClient, AgentClient, ApiClient, ApiKeysClient, AppsClient, AuthClient, DomainsClient,
DraftsClient, InboxesClient, ListsClient, MetricsClient, OrganizationsClient, PodsClient,
ThreadsClient, WebhooksClient,
};

Expand Down
12 changes: 6 additions & 6 deletions agentmail-sdk/src/api/resources/accounts/accounts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ impl AccountsClient {
})
}

/// Lists accounts across all providers, scoped to the API key: an
/// Lists accounts across all apps, scoped to the API key: an
/// organization key sees every account, a pod key its pod's, an inbox key
/// its inbox's. Requires `inbox_read`.
///
Expand Down Expand Up @@ -114,16 +114,16 @@ impl AccountsClient {
}

/// Updates one account. Set `status` to `disabled` to stop the inbox from
/// signing in at the provider again, or to `enabled` to re-enable it.
/// signing in at the app again, or to `enabled` to re-enable it.
/// Idempotent: disabling an already disabled account keeps its original
/// `disabled_at`, and enabling an enabled account is a no-op.
///
/// Find the `account_id` with List Accounts. An account exists only after an
/// inbox's first sign-in at a provider, so it cannot be disabled in advance.
/// A disable applies to that inbox at that provider whichever sign-in key is
/// used: the provider's next authorization ends in `access_denied`, and a code
/// inbox's first sign-in at an app, so it cannot be disabled in advance.
/// A disable applies to that inbox at that app whichever sign-in key is
/// used: the app's next authorization ends in `access_denied`, and a code
/// issued earlier is refused with `invalid_grant`. Access tokens already
/// issued stay valid until they expire, and the provider's own session is
/// issued stay valid until they expire, and the app's own session is
/// unaffected.
///
/// Requires `account_update`, which sign-in keys (`type: public_key`) cannot
Expand Down
4 changes: 2 additions & 2 deletions agentmail-sdk/src/api/resources/api_keys/api_keys.rs
Original file line number Diff line number Diff line change
Expand Up @@ -226,8 +226,8 @@ impl ApiKeysClient {
}

/// Renames a credential or changes its permissions. Public keys also resolve
/// by `client_id`; a sign-in key accepts only `provider_connect` and
/// `provider_share_owner`.
/// by `client_id`; a sign-in key accepts only `app_connect` and
/// `app_share_owner`.
///
/// # Arguments
///
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@ use crate::api::*;
use crate::{ApiError, ClientConfig, HttpClient, QueryBuilder, RequestOptions};
use reqwest::Method;

pub struct ProvidersClient {
pub struct AppsClient {
pub http_client: HttpClient,
}

impl ProvidersClient {
impl AppsClient {
pub fn new(config: ClientConfig) -> Result<Self, ApiError> {
Ok(Self {
http_client: HttpClient::new(config.clone())?,
})
}

/// Lists providers, most popular first.
/// Lists apps, most popular first.
///
/// # Arguments
///
Expand All @@ -36,9 +36,9 @@ impl ProvidersClient {
/// };
/// let client = AgentmailClient::new(config).expect("Failed to build client");
/// client
/// .providers
/// .apps
/// .list(
/// &ProvidersListQueryRequest {
/// &AppsListQueryRequest {
/// ..Default::default()
/// },
/// None,
Expand All @@ -48,13 +48,13 @@ impl ProvidersClient {
/// ```
pub async fn list(
&self,
request: &ProvidersListQueryRequest,
request: &AppsListQueryRequest,
options: Option<RequestOptions>,
) -> Result<ListProvidersResponse, ApiError> {
) -> Result<ListAppsResponse, ApiError> {
self.http_client
.execute_request(
Method::GET,
"v0/providers",
"v0/apps",
None,
QueryBuilder::new()
.serialize("limit", request.limit.clone())
Expand All @@ -65,7 +65,7 @@ impl ProvidersClient {
.await
}

/// Searches providers by name prefix.
/// Searches apps by name prefix.
///
/// # Arguments
///
Expand All @@ -89,9 +89,9 @@ impl ProvidersClient {
/// };
/// let client = AgentmailClient::new(config).expect("Failed to build client");
/// client
/// .providers
/// .apps
/// .search(
/// &ProvidersSearchQueryRequest {
/// &AppsSearchQueryRequest {
/// q: "q".to_string(),
/// limit: None,
/// },
Expand All @@ -102,13 +102,13 @@ impl ProvidersClient {
/// ```
pub async fn search(
&self,
request: &ProvidersSearchQueryRequest,
request: &AppsSearchQueryRequest,
options: Option<RequestOptions>,
) -> Result<SearchProvidersResponse, ApiError> {
) -> Result<SearchAppsResponse, ApiError> {
self.http_client
.execute_request(
Method::GET,
"v0/providers/search",
"v0/apps/search",
None,
QueryBuilder::new()
.string("q", request.q.clone())
Expand All @@ -119,6 +119,19 @@ impl ProvidersClient {
.await
}

/// Gets one app by ID. An app in the catalog returns its full entry.
/// A registered app that the catalog does not list returns its ID and
/// name only, without `updated_at`, so anyone holding its ID can still look
/// it up. List Apps and Search Apps show catalog entries only.
///
/// # Arguments
///
/// * `options` - Additional request options such as headers, timeout, etc.
///
/// # Returns
///
/// JSON response from the API
///
/// # Examples
///
/// ```no_run
Expand All @@ -131,29 +144,26 @@ impl ProvidersClient {
/// ..Default::default()
/// };
/// let client = AgentmailClient::new(config).expect("Failed to build client");
/// client
/// .providers
/// .get(&ProviderID("provider_id".to_string()), None)
/// .await;
/// client.apps.get(&AppID("app_id".to_string()), None).await;
/// }
/// ```
pub async fn get(
&self,
provider_id: &ProviderId,
app_id: &AppId,
options: Option<RequestOptions>,
) -> Result<Provider, ApiError> {
) -> Result<App, ApiError> {
self.http_client
.execute_request(
Method::GET,
&format!("v0/providers/{}", provider_id.0),
&format!("v0/apps/{}", app_id.0),
None,
None,
options,
)
.await
}

/// Lists accounts at one provider, most recent sign-in first.
/// Lists accounts at one app, most recent sign-in first.
///
/// # Arguments
///
Expand All @@ -176,9 +186,9 @@ impl ProvidersClient {
/// };
/// let client = AgentmailClient::new(config).expect("Failed to build client");
/// client
/// .providers
/// .apps
/// .list_accounts(
/// &ProviderID("provider_id".to_string()),
/// &AppID("app_id".to_string()),
/// &ListAccountsQueryRequest {
/// ..Default::default()
/// },
Expand All @@ -189,14 +199,14 @@ impl ProvidersClient {
/// ```
pub async fn list_accounts(
&self,
provider_id: &ProviderId,
app_id: &AppId,
request: &ListAccountsQueryRequest,
options: Option<RequestOptions>,
) -> Result<ListProviderAccountsResponse, ApiError> {
) -> Result<ListAppAccountsResponse, ApiError> {
self.http_client
.execute_request(
Method::GET,
&format!("v0/providers/{}/accounts", provider_id.0),
&format!("v0/apps/{}/accounts", app_id.0),
None,
QueryBuilder::new()
.serialize("limit", request.limit.clone())
Expand All @@ -207,10 +217,12 @@ impl ProvidersClient {
.await
}

/// Starts signing an inbox in to a provider. Returns a single-use `magic_url`,
/// Starts signing an inbox in to an app. Returns a single-use `magic_url`,
/// valid for five minutes, to open in the client that will hold the sign-in;
/// the client enrolls as the inbox and continues to the provider. Poll
/// [Get API Key](/api-reference/api-keys/get) with `api_key_id` for `status`.
/// the client enrolls as the inbox and continues to the app.
/// A `404` names the missing resource: `App` or `Inbox`.
/// A `403` `AppSignupLimitError` means the app accepts no more sign-ups from
/// your organization; sign in with an inbox that already has an account there.
///
/// # Arguments
///
Expand All @@ -233,10 +245,10 @@ impl ProvidersClient {
/// };
/// let client = AgentmailClient::new(config).expect("Failed to build client");
/// client
/// .providers
/// .apps
/// .connect(
/// &ProviderID("provider_id".to_string()),
/// &ConnectProviderBody {
/// &AppID("app_id".to_string()),
/// &ConnectAppBody {
/// ..Default::default()
/// },
/// None,
Expand All @@ -246,14 +258,14 @@ impl ProvidersClient {
/// ```
pub async fn connect(
&self,
provider_id: &ProviderId,
request: &ConnectProviderBody,
app_id: &AppId,
request: &ConnectAppBody,
options: Option<RequestOptions>,
) -> Result<ConnectAccepted, ApiError> {
self.http_client
.execute_request(
Method::POST,
&format!("v0/providers/{}/connect", provider_id.0),
&format!("v0/apps/{}/connect", app_id.0),
Some(serde_json::to_value(request).map_err(ApiError::Serialization)?),
None,
options,
Expand Down
2 changes: 2 additions & 0 deletions agentmail-sdk/src/api/resources/apps/mod.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
pub mod apps;
pub use apps::AppsClient;
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ impl AccountsClient2 {
})
}

/// Lists accounts held by the inbox, across all providers. Requires `inbox_read`.
/// Lists accounts held by the inbox, across all apps. Requires `inbox_read`.
///
/// # Arguments
///
Expand Down
3 changes: 2 additions & 1 deletion agentmail-sdk/src/api/resources/inboxes/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,8 @@ impl InboxesClient {
/// Authorizes the AgentID sign-in a client is already waiting in, for the
/// inbox in the path, and returns the ID of the pending public key it will
/// activate. Read the key with Get API Key. A repeat for the same token,
/// inbox, and bearer returns the same key ID.
/// inbox, and bearer returns the same key ID. A `403` `AppSignupLimitError`
/// means the app accepts no more sign-ups from your organization.
///
/// # Arguments
///
Expand Down
Loading
Loading