AuthMethod is a union
As of 0.80.0, AuthMethod is an interface, not a concrete record, with two implementations:
AuthMethodAgent: the default; notypeon the wire. This is also what an unknown method type reads as, for forward compatibility.AuthMethodTerminal(id, name, args, env): an interactive login the client runs in a terminal on the agent’s behalf.
ClientCapabilities.auth = new AuthCapabilities(true); agents check NegotiatedCapabilities.supportsTerminalAuth() before offering
an AuthMethodTerminal.
The @Authenticate handler
An annotated agent can now serve authenticate, which previously answered -32601 (method not
found) unconditionally:
AuthenticateRequest parameter and returns an AuthenticateResponse
(or a Mono of one, for an async agent). Throw AcpProtocolException with
AcpErrorCodes.AUTHENTICATION_REQUIRED to reject the attempt.
Logout
The agent advertises logout support withAgentCapabilities.auth = AgentAuthCapabilities.withLogout().
Clients check supportsLogout() (or requireLogout(), which throws if the agent didn’t advertise it)
before calling logout(...):
Related
Concepts
Capabilities and NegotiatedCapabilities, which this page assumes
Config Options
Another capability-gated feature, with the same advertise-then-check pattern