diff --git a/Cargo.toml b/Cargo.toml index 9098f027..a3adf0a3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -20,7 +20,6 @@ unstable = [ "unstable_cancel_request", "unstable_elicitation", "unstable_llm_providers", - "unstable_logout", "unstable_mcp_over_acp", "unstable_nes", "unstable_session_additional_directories", @@ -40,7 +39,6 @@ unstable_auth_methods = [] unstable_cancel_request = [] unstable_elicitation = [] unstable_llm_providers = [] -unstable_logout = [] unstable_mcp_over_acp = [] unstable_nes = [] unstable_session_additional_directories = [] diff --git a/docs/announcements/logout-method-stabilized.mdx b/docs/announcements/logout-method-stabilized.mdx new file mode 100644 index 00000000..9ba6361d --- /dev/null +++ b/docs/announcements/logout-method-stabilized.mdx @@ -0,0 +1,13 @@ +--- +title: Logout Method is stabilized +sidebarTitle: Logout Method stabilized +description: Announcement that the logout method is now part of the stable ACP protocol. +--- + +**Published:** May 21, 2026 + +The [Logout Method RFD](/rfds/logout-method) has moved to Completed and the `logout` method is stabilized. + +When advertised via `agentCapabilities.auth.logout`, Clients can now ask Agents to end the current authenticated state and return the connection to a state where future authentication-gated requests require `authenticate` again. + +For the protocol documentation, see [Logging Out](/protocol/authentication#logging-out). diff --git a/docs/docs.json b/docs/docs.json index c95f7cfc..988e1843 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -64,6 +64,7 @@ "pages": [ "protocol/overview", "protocol/initialization", + "protocol/authentication", "protocol/session-setup", "protocol/session-list", "protocol/prompt-turn", @@ -155,11 +156,7 @@ }, { "group": "Preview", - "pages": [ - "rfds/rust-sdk-v1", - "rfds/logout-method", - "rfds/additional-directories" - ] + "pages": ["rfds/rust-sdk-v1", "rfds/additional-directories"] }, { "group": "Completed", @@ -170,7 +167,8 @@ "rfds/session-info-update", "rfds/acp-agent-registry", "rfds/session-resume", - "rfds/session-close" + "rfds/session-close", + "rfds/logout-method" ] } ] @@ -196,6 +194,7 @@ { "group": "Announcements", "pages": [ + "announcements/logout-method-stabilized", "announcements/session-close-stabilized", "announcements/session-resume-stabilized", "announcements/transports-working-group", diff --git a/docs/protocol/authentication.mdx b/docs/protocol/authentication.mdx new file mode 100644 index 00000000..fc790bf4 --- /dev/null +++ b/docs/protocol/authentication.mdx @@ -0,0 +1,142 @@ +--- +title: "Authentication" +description: "Authenticating with agents and logging out" +--- + +ACP authentication is negotiated during [initialization](/protocol/initialization). Agents advertise available authentication methods in `authMethods`, Clients choose one by calling `authenticate`, and Agents that support ending an authenticated state advertise the `logout` capability. + +
+ +```mermaid +sequenceDiagram + participant Client + participant Agent + + Client->>Agent: initialize + Agent-->>Client: initialize response (authMethods, auth.logout) + + alt Agent requires authentication + Client->>Agent: authenticate (methodId) + Agent-->>Client: authenticate response + end + + Note over Client,Agent: Authenticated requests may proceed + + alt User logs out + Client->>Agent: logout + Agent-->>Client: logout response + end + + Note over Client,Agent: New sessions require authentication again +``` + +
+ +## Advertising Authentication + +Agents advertise authentication options in the `authMethods` field of the `initialize` response. Each method has an `id` that the Client passes back to the Agent in a later `authenticate` request. + +Agents that support `logout` also advertise `agentCapabilities.auth.logout`: + +```json highlight={7-11,12-18} +{ + "jsonrpc": "2.0", + "id": 0, + "result": { + "protocolVersion": 1, + "agentCapabilities": { + "auth": { + "logout": {} + } + }, + "authMethods": [ + { + "id": "agent-login", + "name": "Agent login", + "description": "Sign in using the agent's login flow" + } + ] + } +} +``` + +If `agentCapabilities.auth.logout` is omitted or `null`, the Agent does not support `logout` and Clients **MUST NOT** call it. Supplying `{}` means the Agent supports the method. + +### Authentication Method Types + +The default authentication method type is `agent`, where the Agent handles authentication itself. When no `type` is present, the method is treated as `agent`: + +```json +{ + "id": "agent-login", + "name": "Agent login", + "description": "Sign in using the agent's login flow" +} +``` + +An explicit `"type": "agent"` is also accepted but not required. + +See the [schema](/protocol/schema#authmethod) for the full stable `AuthMethod` definition. + +## Authenticating + +When an Agent requires authentication before allowing session creation, the Client calls `authenticate` with one of the advertised authentication method IDs: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "authenticate", + "params": { + "methodId": "agent-login" + } +} +``` + + + The ID of the authentication method to use. This value must match one of the + methods advertised in the `initialize` response. + + +On success, the Agent returns an empty result: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": {} +} +``` + +After successful authentication, the Client can create new sessions without receiving an `auth_required` error for authentication-gated requests. + +## Logging Out + +The `logout` method allows Clients to end the current authenticated state. Clients should only call it after verifying the Agent advertised `agentCapabilities.auth.logout` during initialization. + +```json +{ + "jsonrpc": "2.0", + "id": 2, + "method": "logout", + "params": {} +} +``` + +On success, the Agent returns an empty result: + +```json +{ + "jsonrpc": "2.0", + "id": 2, + "result": {} +} +``` + +After a successful `logout`, new sessions that require authentication will require the Client to call `authenticate` again. + +## Active Sessions + +The protocol does not guarantee what happens to already-running sessions after `logout`. Agents may terminate them, keep them running, or return `auth_required` errors for future session activity. + +Clients **SHOULD** be prepared for active session operations to fail with authentication-related errors after logout and should prompt the user to authenticate again when appropriate. diff --git a/docs/protocol/draft/authentication.mdx b/docs/protocol/draft/authentication.mdx index c8600d94..7f7fe8a1 100644 --- a/docs/protocol/draft/authentication.mdx +++ b/docs/protocol/draft/authentication.mdx @@ -3,12 +3,7 @@ title: "Authentication" description: "Authenticating with agents and logging out" --- -ACP authentication is negotiated during [initialization](/protocol/initialization). Agents advertise available authentication methods in `authMethods`, Clients choose one by calling `authenticate`, and Agents that support ending an authenticated state advertise the draft `logout` capability. - - - The `logout` method and `agentCapabilities.auth.logout` capability are still - unstable and may change before they are stabilized. - +ACP authentication is negotiated during [initialization](/protocol/initialization). Agents advertise available authentication methods in `authMethods`, Clients choose one by calling `authenticate`, and Agents that support ending an authenticated state advertise the `logout` capability.
@@ -138,7 +133,7 @@ After successful authentication, the Client can create new sessions without rece ## Logging Out -The draft `logout` method allows Clients to end the current authenticated state. Clients should only call it after verifying the Agent advertised `agentCapabilities.auth.logout` during initialization. +The `logout` method allows Clients to end the current authenticated state. Clients should only call it after verifying the Agent advertised `agentCapabilities.auth.logout` during initialization. ```json { diff --git a/docs/protocol/draft/initialization.mdx b/docs/protocol/draft/initialization.mdx index 50307e71..6a8a3232 100644 --- a/docs/protocol/draft/initialization.mdx +++ b/docs/protocol/draft/initialization.mdx @@ -155,6 +155,10 @@ The Agent **SHOULD** specify whether it supports the following capabilities: included in `session/prompt` requests. + + Authentication-related capabilities supported by the Agent. + + #### Prompt capabilities As a baseline, all Agents **MUST** support `ContentBlock::Text` and `ContentBlock::ResourceLink` in `session/prompt` requests. @@ -186,6 +190,16 @@ Note: This transport has been deprecated by the MCP spec. +#### Authentication Capabilities + + + The [`logout`](./authentication#logging-out) method is available. + + + + Learn more about Authentication + + #### Session Capabilities As a baseline, all Agents **MUST** support `session/new`, `session/prompt`, `session/cancel`, and `session/update`. diff --git a/docs/protocol/draft/overview.mdx b/docs/protocol/draft/overview.mdx index a8dbf1dd..5bfdbb0a 100644 --- a/docs/protocol/draft/overview.mdx +++ b/docs/protocol/draft/overview.mdx @@ -84,6 +84,11 @@ Agents are programs that use generative AI to autonomously modify code. They typ `loadSession` capability). +Schema]}> + [End the current authenticated state](./authentication#logging-out) (requires + `agentCapabilities.auth.logout` capability). + + Schema]} diff --git a/docs/protocol/draft/schema-v2.mdx b/docs/protocol/draft/schema-v2.mdx index 155d074f..31a88570 100644 --- a/docs/protocol/draft/schema-v2.mdx +++ b/docs/protocol/draft/schema-v2.mdx @@ -339,10 +339,6 @@ The client should disconnect, if it doesn't support this version. ### logout -**UNSTABLE** - -This capability is not part of the spec yet, and may be removed or changed at any point. - Logs out of the current authenticated state. After a successful logout, all new sessions will require authentication. @@ -350,10 +346,6 @@ There is no guarantee about the behavior of already running sessions. #### LogoutRequest -**UNSTABLE** - -This capability is not part of the spec yet, and may be removed or changed at any point. - Request parameters for the logout method. Terminates the current authenticated session. @@ -373,10 +365,6 @@ See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/exte #### LogoutResponse -**UNSTABLE** - -This capability is not part of the spec yet, and may be removed or changed at any point. - Response to the `logout` method. **Type:** Object @@ -2767,10 +2755,6 @@ See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/exte ## AgentAuthCapabilities -**UNSTABLE** - -This capability is not part of the spec yet, and may be removed or changed at any point. - Authentication-related capabilities supported by the agent. **Type:** Object @@ -2814,11 +2798,7 @@ See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/exte AgentAuthCapabilities} > - **UNSTABLE** - -This capability is not part of the spec yet, and may be removed or changed at any point. - -Authentication-related capabilities supported by the agent. + Authentication-related capabilities supported by the agent. - Default: `{}` @@ -4672,10 +4652,6 @@ Protocol names that do not begin with `_` are reserved for the ACP spec. ## LogoutCapabilities -**UNSTABLE** - -This capability is not part of the spec yet, and may be removed or changed at any point. - Logout capabilities supported by the agent. By supplying `\{\}` it means that the agent supports the logout method. diff --git a/docs/protocol/draft/schema.mdx b/docs/protocol/draft/schema.mdx index 155d074f..31a88570 100644 --- a/docs/protocol/draft/schema.mdx +++ b/docs/protocol/draft/schema.mdx @@ -339,10 +339,6 @@ The client should disconnect, if it doesn't support this version. ### logout -**UNSTABLE** - -This capability is not part of the spec yet, and may be removed or changed at any point. - Logs out of the current authenticated state. After a successful logout, all new sessions will require authentication. @@ -350,10 +346,6 @@ There is no guarantee about the behavior of already running sessions. #### LogoutRequest -**UNSTABLE** - -This capability is not part of the spec yet, and may be removed or changed at any point. - Request parameters for the logout method. Terminates the current authenticated session. @@ -373,10 +365,6 @@ See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/exte #### LogoutResponse -**UNSTABLE** - -This capability is not part of the spec yet, and may be removed or changed at any point. - Response to the `logout` method. **Type:** Object @@ -2767,10 +2755,6 @@ See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/exte ## AgentAuthCapabilities -**UNSTABLE** - -This capability is not part of the spec yet, and may be removed or changed at any point. - Authentication-related capabilities supported by the agent. **Type:** Object @@ -2814,11 +2798,7 @@ See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/exte AgentAuthCapabilities} > - **UNSTABLE** - -This capability is not part of the spec yet, and may be removed or changed at any point. - -Authentication-related capabilities supported by the agent. + Authentication-related capabilities supported by the agent. - Default: `{}` @@ -4672,10 +4652,6 @@ Protocol names that do not begin with `_` are reserved for the ACP spec. ## LogoutCapabilities -**UNSTABLE** - -This capability is not part of the spec yet, and may be removed or changed at any point. - Logout capabilities supported by the agent. By supplying `\{\}` it means that the agent supports the logout method. diff --git a/docs/protocol/initialization.mdx b/docs/protocol/initialization.mdx index 50307e71..6a8a3232 100644 --- a/docs/protocol/initialization.mdx +++ b/docs/protocol/initialization.mdx @@ -155,6 +155,10 @@ The Agent **SHOULD** specify whether it supports the following capabilities: included in `session/prompt` requests. + + Authentication-related capabilities supported by the Agent. + + #### Prompt capabilities As a baseline, all Agents **MUST** support `ContentBlock::Text` and `ContentBlock::ResourceLink` in `session/prompt` requests. @@ -186,6 +190,16 @@ Note: This transport has been deprecated by the MCP spec. +#### Authentication Capabilities + + + The [`logout`](./authentication#logging-out) method is available. + + + + Learn more about Authentication + + #### Session Capabilities As a baseline, all Agents **MUST** support `session/new`, `session/prompt`, `session/cancel`, and `session/update`. diff --git a/docs/protocol/overview.mdx b/docs/protocol/overview.mdx index 1f2b2fdb..71b4bc01 100644 --- a/docs/protocol/overview.mdx +++ b/docs/protocol/overview.mdx @@ -84,6 +84,11 @@ Agents are programs that use generative AI to autonomously modify code. They typ `loadSession` capability). +Schema]}> + [End the current authenticated state](./authentication#logging-out) (requires + `agentCapabilities.auth.logout` capability). + + Schema]} diff --git a/docs/protocol/schema.mdx b/docs/protocol/schema.mdx index 4584fd47..41aa4c6b 100644 --- a/docs/protocol/schema.mdx +++ b/docs/protocol/schema.mdx @@ -140,7 +140,7 @@ See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/exte AgentCapabilities} > Capabilities supported by the agent. - - Default: `{"loadSession":false,"mcpCapabilities":{"http":false,"sse":false},"promptCapabilities":{"audio":false,"embeddedContext":false,"image":false},"sessionCapabilities":{}}` + - Default: `{"auth":{},"loadSession":false,"mcpCapabilities":{"http":false,"sse":false},"promptCapabilities":{"audio":false,"embeddedContext":false,"image":false},"sessionCapabilities":{}}` Implementation | null} > @@ -163,6 +163,49 @@ The client should disconnect, if it doesn't support this version. +### logout + +Logs out of the current authenticated state. + +After a successful logout, all new sessions will require authentication. +There is no guarantee about the behavior of already running sessions. + +#### LogoutRequest + +Request parameters for the logout method. + +Terminates the current authenticated session. + +**Type:** Object + +**Properties:** + + + The _meta property is reserved by ACP to allow clients and agents to attach additional +metadata to their interactions. Implementations MUST NOT make assumptions about values at +these keys. + +See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility) + + + +#### LogoutResponse + +Response to the `logout` method. + +**Type:** Object + +**Properties:** + + + The _meta property is reserved by ACP to allow clients and agents to attach additional +metadata to their interactions. Implementations MUST NOT make assumptions about values at +these keys. + +See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility) + + + ### session/cancel @@ -1257,6 +1300,29 @@ See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/exte The signal that terminated the process (may be null if exited normally). +## AgentAuthCapabilities + +Authentication-related capabilities supported by the agent. + +**Type:** Object + +**Properties:** + + + The _meta property is reserved by ACP to allow clients and agents to attach additional +metadata to their interactions. Implementations MUST NOT make assumptions about values at +these keys. + +See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility) + + +LogoutCapabilities | null} > + Whether the agent supports the logout method. + +By supplying `\{\}` it means that the agent supports the logout method. + + + ## AgentCapabilities Capabilities supported by the agent. @@ -1277,6 +1343,12 @@ these keys. See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility) + +AgentAuthCapabilities} > + Authentication-related capabilities supported by the agent. + + - Default: `{}` + Whether the agent supports `session/load`. @@ -2120,6 +2192,25 @@ If not provided, the name should be used for display. for debugging or metrics purposes. (e.g. "1.0.0"). +## LogoutCapabilities + +Logout capabilities supported by the agent. + +By supplying `\{\}` it means that the agent supports the logout method. + +**Type:** Object + +**Properties:** + + + The _meta property is reserved by ACP to allow clients and agents to attach additional +metadata to their interactions. Implementations MUST NOT make assumptions about values at +these keys. + +See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility) + + + ## McpCapabilities MCP capabilities supported by the agent diff --git a/docs/rfds/logout-method.mdx b/docs/rfds/logout-method.mdx index 0635768c..bb62738f 100644 --- a/docs/rfds/logout-method.mdx +++ b/docs/rfds/logout-method.mdx @@ -66,7 +66,7 @@ interface LogoutResponse { ### Capability Advertisement -The `logout` capability should be advertised within a new `auth` object in `AgentCapabilities`: +The `logout` capability is advertised within the `auth` object in `AgentCapabilities`: ```typescript interface AgentCapabilities { @@ -177,7 +177,7 @@ interface LogoutCapabilities { ### Behavior 1. **Pre-condition**: The client should only call `logout` if: - - The agent advertises `auth.logout: {}` + - The agent advertises `agentCapabilities.auth.logout: {}` 2. **Agent responsibilities**: - Invalidate any stored tokens or credentials as appropriate @@ -207,5 +207,6 @@ The RFD intentionally does not mandate a specific behavior to allow flexibility. ## Revision history +- 2026-05-21: RFD marked as Completed; `logout` is stabilized - 2026-05-17: Moved to Preview. - 2026-02-02: Initial draft diff --git a/docs/rfds/updates.mdx b/docs/rfds/updates.mdx index 73f1b6c9..f0f7d8e6 100644 --- a/docs/rfds/updates.mdx +++ b/docs/rfds/updates.mdx @@ -6,6 +6,13 @@ rss: true This page tracks lifecycle changes for ACP Requests for Dialog. For broader ACP announcements, see [Updates](/updates). + +## Logout Method RFD moves to Completed + +The RFD for the `logout` method has been stabilized and is now a part of the protocol. Please review the [documentation](/protocol/authentication#logging-out) for more information. + + + ## Additional Directories RFD moves to Preview stage diff --git a/docs/updates.mdx b/docs/updates.mdx index 9063b1c3..b4d7f147 100644 --- a/docs/updates.mdx +++ b/docs/updates.mdx @@ -6,6 +6,17 @@ rss: true This page is for larger ACP announcements and project updates. For lifecycle changes to Requests for Dialog, see [RFD Updates](/rfds/updates). + +## Logout Method is Stabilized + +The Logout Method RFD has moved to Completed and the `logout` method is stabilized. + +This gives clients a standard way to end an authenticated state and let users authenticate again without restarting the ACP connection. + +[Read the full announcement](/announcements/logout-method-stabilized). + + + ## Session Close is Stabilized diff --git a/schema/meta.json b/schema/meta.json index 8dc36e94..bc5135b2 100644 --- a/schema/meta.json +++ b/schema/meta.json @@ -2,6 +2,7 @@ "agentMethods": { "authenticate": "authenticate", "initialize": "initialize", + "logout": "logout", "session_cancel": "session/cancel", "session_close": "session/close", "session_list": "session/list", diff --git a/schema/schema.json b/schema/schema.json index d6c327e8..559f3f45 100644 --- a/schema/schema.json +++ b/schema/schema.json @@ -1,5 +1,27 @@ { "$defs": { + "AgentAuthCapabilities": { + "description": "Authentication-related capabilities supported by the agent.", + "properties": { + "_meta": { + "additionalProperties": true, + "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", + "type": ["object", "null"] + }, + "logout": { + "anyOf": [ + { + "$ref": "#/$defs/LogoutCapabilities" + }, + { + "type": "null" + } + ], + "description": "Whether the agent supports the logout method.\n\nBy supplying `{}` it means that the agent supports the logout method." + } + }, + "type": "object" + }, "AgentCapabilities": { "description": "Capabilities supported by the agent.\n\nAdvertised during initialization to inform the client about\navailable features and content types.\n\nSee protocol docs: [Agent Capabilities](https://agentclientprotocol.com/protocol/initialization#agent-capabilities)", "properties": { @@ -8,6 +30,15 @@ "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", "type": ["object", "null"] }, + "auth": { + "allOf": [ + { + "$ref": "#/$defs/AgentAuthCapabilities" + } + ], + "default": {}, + "description": "Authentication-related capabilities supported by the agent." + }, "loadSession": { "default": false, "description": "Whether the agent supports `session/load`.", @@ -220,6 +251,14 @@ ], "title": "AuthenticateResponse" }, + { + "allOf": [ + { + "$ref": "#/$defs/LogoutResponse" + } + ], + "title": "LogoutResponse" + }, { "allOf": [ { @@ -642,6 +681,15 @@ "description": "Authenticates the client using the specified authentication method.\n\nCalled when the agent requires authentication before allowing session creation.\nThe client provides the authentication method ID that was advertised during initialization.\n\nAfter successful authentication, the client can proceed to create sessions with\n`new_session` without receiving an `auth_required` error.\n\nSee protocol docs: [Initialization](https://agentclientprotocol.com/protocol/initialization)", "title": "AuthenticateRequest" }, + { + "allOf": [ + { + "$ref": "#/$defs/LogoutRequest" + } + ], + "description": "Logs out of the current authenticated state.\n\nAfter a successful logout, all new sessions will require authentication.\nThere is no guarantee about the behavior of already running sessions.", + "title": "LogoutRequest" + }, { "allOf": [ { @@ -1451,6 +1499,7 @@ } ], "default": { + "auth": {}, "loadSession": false, "mcpCapabilities": { "http": false, @@ -1647,6 +1696,43 @@ "x-method": "session/load", "x-side": "agent" }, + "LogoutCapabilities": { + "description": "Logout capabilities supported by the agent.\n\nBy supplying `{}` it means that the agent supports the logout method.", + "properties": { + "_meta": { + "additionalProperties": true, + "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", + "type": ["object", "null"] + } + }, + "type": "object" + }, + "LogoutRequest": { + "description": "Request parameters for the logout method.\n\nTerminates the current authenticated session.", + "properties": { + "_meta": { + "additionalProperties": true, + "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", + "type": ["object", "null"] + } + }, + "type": "object", + "x-method": "logout", + "x-side": "agent" + }, + "LogoutResponse": { + "description": "Response to the `logout` method.", + "properties": { + "_meta": { + "additionalProperties": true, + "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", + "type": ["object", "null"] + } + }, + "type": "object", + "x-method": "logout", + "x-side": "agent" + }, "McpCapabilities": { "description": "MCP capabilities supported by the agent", "properties": { diff --git a/schema/schema.unstable.json b/schema/schema.unstable.json index a76dac3b..383a1b2b 100644 --- a/schema/schema.unstable.json +++ b/schema/schema.unstable.json @@ -27,7 +27,7 @@ "x-side": "agent" }, "AgentAuthCapabilities": { - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nAuthentication-related capabilities supported by the agent.", + "description": "Authentication-related capabilities supported by the agent.", "properties": { "_meta": { "additionalProperties": true, @@ -63,7 +63,7 @@ } ], "default": {}, - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nAuthentication-related capabilities supported by the agent." + "description": "Authentication-related capabilities supported by the agent." }, "loadSession": { "default": false, @@ -1255,7 +1255,7 @@ "$ref": "#/$defs/LogoutRequest" } ], - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nLogs out of the current authenticated state.\n\nAfter a successful logout, all new sessions will require authentication.\nThere is no guarantee about the behavior of already running sessions.", + "description": "Logs out of the current authenticated state.\n\nAfter a successful logout, all new sessions will require authentication.\nThere is no guarantee about the behavior of already running sessions.", "title": "LogoutRequest" }, { @@ -3472,7 +3472,7 @@ "x-side": "agent" }, "LogoutCapabilities": { - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nLogout capabilities supported by the agent.\n\nBy supplying `{}` it means that the agent supports the logout method.", + "description": "Logout capabilities supported by the agent.\n\nBy supplying `{}` it means that the agent supports the logout method.", "properties": { "_meta": { "additionalProperties": true, @@ -3483,7 +3483,7 @@ "type": "object" }, "LogoutRequest": { - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nRequest parameters for the logout method.\n\nTerminates the current authenticated session.", + "description": "Request parameters for the logout method.\n\nTerminates the current authenticated session.", "properties": { "_meta": { "additionalProperties": true, @@ -3496,7 +3496,7 @@ "x-side": "agent" }, "LogoutResponse": { - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nResponse to the `logout` method.", + "description": "Response to the `logout` method.", "properties": { "_meta": { "additionalProperties": true, diff --git a/schema/schema.v2.unstable.json b/schema/schema.v2.unstable.json index a76dac3b..383a1b2b 100644 --- a/schema/schema.v2.unstable.json +++ b/schema/schema.v2.unstable.json @@ -27,7 +27,7 @@ "x-side": "agent" }, "AgentAuthCapabilities": { - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nAuthentication-related capabilities supported by the agent.", + "description": "Authentication-related capabilities supported by the agent.", "properties": { "_meta": { "additionalProperties": true, @@ -63,7 +63,7 @@ } ], "default": {}, - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nAuthentication-related capabilities supported by the agent." + "description": "Authentication-related capabilities supported by the agent." }, "loadSession": { "default": false, @@ -1255,7 +1255,7 @@ "$ref": "#/$defs/LogoutRequest" } ], - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nLogs out of the current authenticated state.\n\nAfter a successful logout, all new sessions will require authentication.\nThere is no guarantee about the behavior of already running sessions.", + "description": "Logs out of the current authenticated state.\n\nAfter a successful logout, all new sessions will require authentication.\nThere is no guarantee about the behavior of already running sessions.", "title": "LogoutRequest" }, { @@ -3472,7 +3472,7 @@ "x-side": "agent" }, "LogoutCapabilities": { - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nLogout capabilities supported by the agent.\n\nBy supplying `{}` it means that the agent supports the logout method.", + "description": "Logout capabilities supported by the agent.\n\nBy supplying `{}` it means that the agent supports the logout method.", "properties": { "_meta": { "additionalProperties": true, @@ -3483,7 +3483,7 @@ "type": "object" }, "LogoutRequest": { - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nRequest parameters for the logout method.\n\nTerminates the current authenticated session.", + "description": "Request parameters for the logout method.\n\nTerminates the current authenticated session.", "properties": { "_meta": { "additionalProperties": true, @@ -3496,7 +3496,7 @@ "x-side": "agent" }, "LogoutResponse": { - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nResponse to the `logout` method.", + "description": "Response to the `logout` method.", "properties": { "_meta": { "additionalProperties": true, diff --git a/src/v1/agent.rs b/src/v1/agent.rs index 86428b80..bd081d1c 100644 --- a/src/v1/agent.rs +++ b/src/v1/agent.rs @@ -335,14 +335,9 @@ impl AuthenticateResponse { // Logout -/// **UNSTABLE** -/// -/// This capability is not part of the spec yet, and may be removed or changed at any point. -/// /// Request parameters for the logout method. /// /// Terminates the current authenticated session. -#[cfg(feature = "unstable_logout")] #[skip_serializing_none] #[derive(Default, Debug, Clone, Serialize, Deserialize, JsonSchema, PartialEq, Eq)] #[schemars(extend("x-side" = "agent", "x-method" = LOGOUT_METHOD_NAME))] @@ -358,7 +353,6 @@ pub struct LogoutRequest { pub meta: Option, } -#[cfg(feature = "unstable_logout")] impl LogoutRequest { #[must_use] pub fn new() -> Self { @@ -377,12 +371,7 @@ impl LogoutRequest { } } -/// **UNSTABLE** -/// -/// This capability is not part of the spec yet, and may be removed or changed at any point. -/// /// Response to the `logout` method. -#[cfg(feature = "unstable_logout")] #[skip_serializing_none] #[derive(Default, Debug, Clone, Serialize, Deserialize, JsonSchema, PartialEq, Eq)] #[schemars(extend("x-side" = "agent", "x-method" = LOGOUT_METHOD_NAME))] @@ -398,7 +387,6 @@ pub struct LogoutResponse { pub meta: Option, } -#[cfg(feature = "unstable_logout")] impl LogoutResponse { #[must_use] pub fn new() -> Self { @@ -417,12 +405,7 @@ impl LogoutResponse { } } -/// **UNSTABLE** -/// -/// This capability is not part of the spec yet, and may be removed or changed at any point. -/// /// Authentication-related capabilities supported by the agent. -#[cfg(feature = "unstable_logout")] #[serde_as] #[skip_serializing_none] #[derive(Default, Debug, Clone, Serialize, Deserialize, JsonSchema, PartialEq, Eq)] @@ -444,7 +427,6 @@ pub struct AgentAuthCapabilities { pub meta: Option, } -#[cfg(feature = "unstable_logout")] impl AgentAuthCapabilities { #[must_use] pub fn new() -> Self { @@ -470,14 +452,9 @@ impl AgentAuthCapabilities { } } -/// **UNSTABLE** -/// -/// This capability is not part of the spec yet, and may be removed or changed at any point. -/// /// Logout capabilities supported by the agent. /// /// By supplying `{}` it means that the agent supports the logout method. -#[cfg(feature = "unstable_logout")] #[skip_serializing_none] #[derive(Default, Debug, Clone, Serialize, Deserialize, JsonSchema, PartialEq, Eq)] #[non_exhaustive] @@ -491,7 +468,6 @@ pub struct LogoutCapabilities { pub meta: Option, } -#[cfg(feature = "unstable_logout")] impl LogoutCapabilities { #[must_use] pub fn new() -> Self { @@ -4017,12 +3993,7 @@ pub struct AgentCapabilities { pub mcp_capabilities: McpCapabilities, #[serde(default)] pub session_capabilities: SessionCapabilities, - /// **UNSTABLE** - /// - /// This capability is not part of the spec yet, and may be removed or changed at any point. - /// /// Authentication-related capabilities supported by the agent. - #[cfg(feature = "unstable_logout")] #[serde(default)] pub auth: AgentAuthCapabilities, /// **UNSTABLE** @@ -4097,12 +4068,7 @@ impl AgentCapabilities { self } - /// **UNSTABLE** - /// - /// This capability is not part of the spec yet, and may be removed or changed at any point. - /// /// Authentication-related capabilities supported by the agent. - #[cfg(feature = "unstable_logout")] #[must_use] pub fn auth(mut self, auth: AgentAuthCapabilities) -> Self { self.auth = auth; @@ -4779,7 +4745,6 @@ pub struct AgentMethodNames { /// Method for closing an active session. pub session_close: &'static str, /// Method for logging out of an authenticated session. - #[cfg(feature = "unstable_logout")] pub logout: &'static str, /// Method for starting an NES session. #[cfg(feature = "unstable_nes")] @@ -4840,7 +4805,6 @@ pub const AGENT_METHOD_NAMES: AgentMethodNames = AgentMethodNames { session_fork: SESSION_FORK_METHOD_NAME, session_resume: SESSION_RESUME_METHOD_NAME, session_close: SESSION_CLOSE_METHOD_NAME, - #[cfg(feature = "unstable_logout")] logout: LOGOUT_METHOD_NAME, #[cfg(feature = "unstable_nes")] nes_start: NES_START_METHOD_NAME, @@ -4905,7 +4869,6 @@ pub(crate) const SESSION_RESUME_METHOD_NAME: &str = "session/resume"; /// Method name for closing an active session. pub(crate) const SESSION_CLOSE_METHOD_NAME: &str = "session/close"; /// Method name for logging out of an authenticated session. -#[cfg(feature = "unstable_logout")] pub(crate) const LOGOUT_METHOD_NAME: &str = "logout"; /// All possible requests that a client can send to an agent. @@ -4962,15 +4925,10 @@ pub enum ClientRequest { /// Disables a provider. #[cfg(feature = "unstable_llm_providers")] DisableProviderRequest(DisableProviderRequest), - /// **UNSTABLE** - /// - /// This capability is not part of the spec yet, and may be removed or changed at any point. - /// /// Logs out of the current authenticated state. /// /// After a successful logout, all new sessions will require authentication. /// There is no guarantee about the behavior of already running sessions. - #[cfg(feature = "unstable_logout")] LogoutRequest(LogoutRequest), /// Creates a new conversation session with the agent. /// @@ -5126,7 +5084,6 @@ impl ClientRequest { Self::SetProviderRequest(_) => AGENT_METHOD_NAMES.providers_set, #[cfg(feature = "unstable_llm_providers")] Self::DisableProviderRequest(_) => AGENT_METHOD_NAMES.providers_disable, - #[cfg(feature = "unstable_logout")] Self::LogoutRequest(_) => AGENT_METHOD_NAMES.logout, Self::NewSessionRequest(_) => AGENT_METHOD_NAMES.session_new, Self::LoadSessionRequest(_) => AGENT_METHOD_NAMES.session_load, @@ -5175,7 +5132,6 @@ pub enum AgentResponse { SetProviderResponse(#[serde(default)] SetProviderResponse), #[cfg(feature = "unstable_llm_providers")] DisableProviderResponse(#[serde(default)] DisableProviderResponse), - #[cfg(feature = "unstable_logout")] LogoutResponse(#[serde(default)] LogoutResponse), NewSessionResponse(NewSessionResponse), LoadSessionResponse(#[serde(default)] LoadSessionResponse), diff --git a/src/v2/agent.rs b/src/v2/agent.rs index 03f92a67..993ffc2d 100644 --- a/src/v2/agent.rs +++ b/src/v2/agent.rs @@ -335,14 +335,9 @@ impl AuthenticateResponse { // Logout -/// **UNSTABLE** -/// -/// This capability is not part of the spec yet, and may be removed or changed at any point. -/// /// Request parameters for the logout method. /// /// Terminates the current authenticated session. -#[cfg(feature = "unstable_logout")] #[skip_serializing_none] #[derive(Default, Debug, Clone, Serialize, Deserialize, JsonSchema, PartialEq, Eq)] #[schemars(extend("x-side" = "agent", "x-method" = LOGOUT_METHOD_NAME))] @@ -358,7 +353,6 @@ pub struct LogoutRequest { pub meta: Option, } -#[cfg(feature = "unstable_logout")] impl LogoutRequest { #[must_use] pub fn new() -> Self { @@ -377,12 +371,7 @@ impl LogoutRequest { } } -/// **UNSTABLE** -/// -/// This capability is not part of the spec yet, and may be removed or changed at any point. -/// /// Response to the `logout` method. -#[cfg(feature = "unstable_logout")] #[skip_serializing_none] #[derive(Default, Debug, Clone, Serialize, Deserialize, JsonSchema, PartialEq, Eq)] #[schemars(extend("x-side" = "agent", "x-method" = LOGOUT_METHOD_NAME))] @@ -398,7 +387,6 @@ pub struct LogoutResponse { pub meta: Option, } -#[cfg(feature = "unstable_logout")] impl LogoutResponse { #[must_use] pub fn new() -> Self { @@ -417,12 +405,7 @@ impl LogoutResponse { } } -/// **UNSTABLE** -/// -/// This capability is not part of the spec yet, and may be removed or changed at any point. -/// /// Authentication-related capabilities supported by the agent. -#[cfg(feature = "unstable_logout")] #[serde_as] #[skip_serializing_none] #[derive(Default, Debug, Clone, Serialize, Deserialize, JsonSchema, PartialEq, Eq)] @@ -444,7 +427,6 @@ pub struct AgentAuthCapabilities { pub meta: Option, } -#[cfg(feature = "unstable_logout")] impl AgentAuthCapabilities { #[must_use] pub fn new() -> Self { @@ -470,14 +452,9 @@ impl AgentAuthCapabilities { } } -/// **UNSTABLE** -/// -/// This capability is not part of the spec yet, and may be removed or changed at any point. -/// /// Logout capabilities supported by the agent. /// /// By supplying `{}` it means that the agent supports the logout method. -#[cfg(feature = "unstable_logout")] #[skip_serializing_none] #[derive(Default, Debug, Clone, Serialize, Deserialize, JsonSchema, PartialEq, Eq)] #[non_exhaustive] @@ -491,7 +468,6 @@ pub struct LogoutCapabilities { pub meta: Option, } -#[cfg(feature = "unstable_logout")] impl LogoutCapabilities { #[must_use] pub fn new() -> Self { @@ -4017,12 +3993,7 @@ pub struct AgentCapabilities { pub mcp_capabilities: McpCapabilities, #[serde(default)] pub session_capabilities: SessionCapabilities, - /// **UNSTABLE** - /// - /// This capability is not part of the spec yet, and may be removed or changed at any point. - /// /// Authentication-related capabilities supported by the agent. - #[cfg(feature = "unstable_logout")] #[serde(default)] pub auth: AgentAuthCapabilities, /// **UNSTABLE** @@ -4097,12 +4068,7 @@ impl AgentCapabilities { self } - /// **UNSTABLE** - /// - /// This capability is not part of the spec yet, and may be removed or changed at any point. - /// /// Authentication-related capabilities supported by the agent. - #[cfg(feature = "unstable_logout")] #[must_use] pub fn auth(mut self, auth: AgentAuthCapabilities) -> Self { self.auth = auth; @@ -4779,7 +4745,6 @@ pub struct AgentMethodNames { /// Method for closing an active session. pub session_close: &'static str, /// Method for logging out of an authenticated session. - #[cfg(feature = "unstable_logout")] pub logout: &'static str, /// Method for starting an NES session. #[cfg(feature = "unstable_nes")] @@ -4840,7 +4805,6 @@ pub const AGENT_METHOD_NAMES: AgentMethodNames = AgentMethodNames { session_fork: SESSION_FORK_METHOD_NAME, session_resume: SESSION_RESUME_METHOD_NAME, session_close: SESSION_CLOSE_METHOD_NAME, - #[cfg(feature = "unstable_logout")] logout: LOGOUT_METHOD_NAME, #[cfg(feature = "unstable_nes")] nes_start: NES_START_METHOD_NAME, @@ -4905,7 +4869,6 @@ pub(crate) const SESSION_RESUME_METHOD_NAME: &str = "session/resume"; /// Method name for closing an active session. pub(crate) const SESSION_CLOSE_METHOD_NAME: &str = "session/close"; /// Method name for logging out of an authenticated session. -#[cfg(feature = "unstable_logout")] pub(crate) const LOGOUT_METHOD_NAME: &str = "logout"; /// All possible requests that a client can send to an agent. @@ -4962,15 +4925,10 @@ pub enum ClientRequest { /// Disables a provider. #[cfg(feature = "unstable_llm_providers")] DisableProviderRequest(DisableProviderRequest), - /// **UNSTABLE** - /// - /// This capability is not part of the spec yet, and may be removed or changed at any point. - /// /// Logs out of the current authenticated state. /// /// After a successful logout, all new sessions will require authentication. /// There is no guarantee about the behavior of already running sessions. - #[cfg(feature = "unstable_logout")] LogoutRequest(LogoutRequest), /// Creates a new conversation session with the agent. /// @@ -5126,7 +5084,6 @@ impl ClientRequest { Self::SetProviderRequest(_) => AGENT_METHOD_NAMES.providers_set, #[cfg(feature = "unstable_llm_providers")] Self::DisableProviderRequest(_) => AGENT_METHOD_NAMES.providers_disable, - #[cfg(feature = "unstable_logout")] Self::LogoutRequest(_) => AGENT_METHOD_NAMES.logout, Self::NewSessionRequest(_) => AGENT_METHOD_NAMES.session_new, Self::LoadSessionRequest(_) => AGENT_METHOD_NAMES.session_load, @@ -5175,7 +5132,6 @@ pub enum AgentResponse { SetProviderResponse(#[serde(default)] SetProviderResponse), #[cfg(feature = "unstable_llm_providers")] DisableProviderResponse(#[serde(default)] DisableProviderResponse), - #[cfg(feature = "unstable_logout")] LogoutResponse(#[serde(default)] LogoutResponse), NewSessionResponse(NewSessionResponse), LoadSessionResponse(#[serde(default)] LoadSessionResponse), diff --git a/src/v2/conversion.rs b/src/v2/conversion.rs index f1c31102..e3838199 100644 --- a/src/v2/conversion.rs +++ b/src/v2/conversion.rs @@ -2918,7 +2918,6 @@ impl IntoV2 for crate::v1::AuthenticateResponse { } } -#[cfg(feature = "unstable_logout")] impl IntoV1 for super::LogoutRequest { type Output = crate::v1::LogoutRequest; @@ -2930,7 +2929,6 @@ impl IntoV1 for super::LogoutRequest { } } -#[cfg(feature = "unstable_logout")] impl IntoV2 for crate::v1::LogoutRequest { type Output = super::LogoutRequest; @@ -2942,7 +2940,6 @@ impl IntoV2 for crate::v1::LogoutRequest { } } -#[cfg(feature = "unstable_logout")] impl IntoV1 for super::LogoutResponse { type Output = crate::v1::LogoutResponse; @@ -2954,7 +2951,6 @@ impl IntoV1 for super::LogoutResponse { } } -#[cfg(feature = "unstable_logout")] impl IntoV2 for crate::v1::LogoutResponse { type Output = super::LogoutResponse; @@ -2966,7 +2962,6 @@ impl IntoV2 for crate::v1::LogoutResponse { } } -#[cfg(feature = "unstable_logout")] impl IntoV1 for super::AgentAuthCapabilities { type Output = crate::v1::AgentAuthCapabilities; @@ -2979,7 +2974,6 @@ impl IntoV1 for super::AgentAuthCapabilities { } } -#[cfg(feature = "unstable_logout")] impl IntoV2 for crate::v1::AgentAuthCapabilities { type Output = super::AgentAuthCapabilities; @@ -2992,7 +2986,6 @@ impl IntoV2 for crate::v1::AgentAuthCapabilities { } } -#[cfg(feature = "unstable_logout")] impl IntoV1 for super::LogoutCapabilities { type Output = crate::v1::LogoutCapabilities; @@ -3004,7 +2997,6 @@ impl IntoV1 for super::LogoutCapabilities { } } -#[cfg(feature = "unstable_logout")] impl IntoV2 for crate::v1::LogoutCapabilities { type Output = super::LogoutCapabilities; @@ -5209,7 +5201,6 @@ impl IntoV1 for super::AgentCapabilities { prompt_capabilities, mcp_capabilities, session_capabilities, - #[cfg(feature = "unstable_logout")] auth, #[cfg(feature = "unstable_llm_providers")] providers, @@ -5224,7 +5215,6 @@ impl IntoV1 for super::AgentCapabilities { prompt_capabilities: prompt_capabilities.into_v1()?, mcp_capabilities: mcp_capabilities.into_v1()?, session_capabilities: session_capabilities.into_v1()?, - #[cfg(feature = "unstable_logout")] auth: auth.into_v1()?, #[cfg(feature = "unstable_llm_providers")] providers: providers.into_v1()?, @@ -5246,7 +5236,6 @@ impl IntoV2 for crate::v1::AgentCapabilities { prompt_capabilities, mcp_capabilities, session_capabilities, - #[cfg(feature = "unstable_logout")] auth, #[cfg(feature = "unstable_llm_providers")] providers, @@ -5261,7 +5250,6 @@ impl IntoV2 for crate::v1::AgentCapabilities { prompt_capabilities: prompt_capabilities.into_v2()?, mcp_capabilities: mcp_capabilities.into_v2()?, session_capabilities: session_capabilities.into_v2()?, - #[cfg(feature = "unstable_logout")] auth: auth.into_v2()?, #[cfg(feature = "unstable_llm_providers")] providers: providers.into_v2()?, @@ -5601,7 +5589,6 @@ impl IntoV1 for super::ClientRequest { Self::DisableProviderRequest(value) => { crate::v1::ClientRequest::DisableProviderRequest(value.into_v1()?) } - #[cfg(feature = "unstable_logout")] Self::LogoutRequest(value) => crate::v1::ClientRequest::LogoutRequest(value.into_v1()?), Self::NewSessionRequest(value) => { crate::v1::ClientRequest::NewSessionRequest(value.into_v1()?) @@ -5683,7 +5670,6 @@ impl IntoV2 for crate::v1::ClientRequest { Self::DisableProviderRequest(value) => { super::ClientRequest::DisableProviderRequest(value.into_v2()?) } - #[cfg(feature = "unstable_logout")] Self::LogoutRequest(value) => super::ClientRequest::LogoutRequest(value.into_v2()?), Self::NewSessionRequest(value) => { super::ClientRequest::NewSessionRequest(value.into_v2()?) @@ -5761,7 +5747,6 @@ impl IntoV1 for super::AgentResponse { Self::DisableProviderResponse(value) => { crate::v1::AgentResponse::DisableProviderResponse(value.into_v1()?) } - #[cfg(feature = "unstable_logout")] Self::LogoutResponse(value) => { crate::v1::AgentResponse::LogoutResponse(value.into_v1()?) } @@ -5847,7 +5832,6 @@ impl IntoV2 for crate::v1::AgentResponse { Self::DisableProviderResponse(value) => { super::AgentResponse::DisableProviderResponse(value.into_v2()?) } - #[cfg(feature = "unstable_logout")] Self::LogoutResponse(value) => super::AgentResponse::LogoutResponse(value.into_v2()?), Self::NewSessionResponse(value) => { super::AgentResponse::NewSessionResponse(value.into_v2()?)