common
Class info¶
Classes¶
| Name | Children | Inherits |
|---|---|---|
| AuthAccount aclientp.schema.common **UNSTABLE**: An account the agent has configured, for display. |
||
| AuthMethodAgent aclientp.schema.common Agent handles authentication itself. |
||
| AuthMethodTerminal aclientp.schema.common Terminal authentication method. |
||
| EnvVariable aclientp.schema.common An environment variable to set when launching an MCP server. |
||
| Error aclientp.schema.common JSON-RPC error object. |
||
| Implementation aclientp.schema.common Describes the name and version of an ACP implementation. |
🛈 DocStrings¶
Common schema definitions.
AuthMethod
module-attribute
¶
AuthMethod = Annotated[
Annotated[AuthMethodAgent, Tag("agent")] | Annotated[AuthMethodTerminal, Tag("terminal")],
Discriminator(_auth_method_discriminator),
]
Describes an available authentication method.
The type field acts as the discriminator. When no type is present,
the method is treated as agent.
AuthState
module-attribute
¶
UNSTABLE: Whether the agent can start sessions without the user signing in first.
ErrorCode
module-attribute
¶
JSON-RPC error code. See the *_ERROR / *_REQUIRED constants for predefined codes.
AuthAccount
¶
Bases: AnnotatedObject
UNSTABLE: An account the agent has configured, for display.
Source code in src/aclientp/schema/common.py
active
class-attribute
instance-attribute
¶
Whether the agent currently uses this account by default.
description
class-attribute
instance-attribute
¶
Short text shown with the label, e.g. the credential source. MUST NOT contain secrets.
label
instance-attribute
¶
Human-readable name for the account, e.g. Claude Max or OpenAI API key.
organization
class-attribute
instance-attribute
¶
Display name of the organization, team, or workspace the account is using.
AuthMethodAgent
¶
Bases: AnnotatedObject
Agent handles authentication itself.
This is the default authentication method type.
When no type field is present, the method is treated as agent.
Source code in src/aclientp/schema/common.py
AuthMethodTerminal
¶
Bases: AnnotatedObject
Terminal authentication method.
Client runs the configured agent program as a separate interactive process for the user to authenticate.
Source code in src/aclientp/schema/common.py
args
class-attribute
instance-attribute
¶
Additional arguments to pass when running the agent binary for terminal auth.
description
class-attribute
instance-attribute
¶
Optional description providing more details about this authentication method.
env
class-attribute
instance-attribute
¶
Additional environment variables to set when running the agent binary for terminal auth.
type
class-attribute
instance-attribute
¶
Discriminator field.
EnvVariable
¶
Bases: AnnotatedObject
An environment variable to set when launching an MCP server.
Source code in src/aclientp/schema/common.py
Error
¶
Bases: Schema
JSON-RPC error object.
Represents an error that occurred during method execution, following the JSON-RPC 2.0 error object specification with optional additional data.
See protocol docs: JSON-RPC Error Object
Source code in src/aclientp/schema/common.py
code
instance-attribute
¶
code: ErrorCode
A number indicating the error type that occurred.
This must be an integer as defined in the JSON-RPC specification.
data
class-attribute
instance-attribute
¶
Optional primitive or structured value that contains additional errorinformation.
This may include debugging information or context-specific details.
message
instance-attribute
¶
A string providing a short description of the error.
The message should be limited to a concise single sentence.
Implementation
¶
Bases: AnnotatedObject
Describes the name and version of an ACP implementation.
Includes an optional title for UI representation.
Source code in src/aclientp/schema/common.py
name
instance-attribute
¶
Intended for programmatic or logical use.
Can be used as a display name fallback if title isn't present.
title
class-attribute
instance-attribute
¶
Intended for UI and end-user contexts.
Optimized to be human-readable and easily understood. If not provided, the name should be used for display.
version
instance-attribute
¶
Version of the implementation.
Can be displayed to the user or used for debugging or metrics purposes.