Skip to content

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.

              AuthMethodId module-attribute

              AuthMethodId = str
              

              Unique identifier for an authentication method.

              AuthState module-attribute

              AuthState = Literal['authenticated', 'unauthenticated', 'not_required', 'unknown'] | str
              

              UNSTABLE: Whether the agent can start sessions without the user signing in first.

              ErrorCode module-attribute

              ErrorCode = int
              

              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
              class AuthAccount(AnnotatedObject):
                  """**UNSTABLE**: An account the agent has configured, for display."""
              
                  label: str
                  """Human-readable name for the account, e.g. ``Claude Max`` or ``OpenAI API key``."""
              
                  description: str | None = None
                  """Short text shown with the label, e.g. the credential source. MUST NOT contain secrets."""
              
                  active: bool | None = None
                  """Whether the agent currently uses this account by default."""
              
                  name: str | None = None
                  """Display name of the user."""
              
                  email: str | None = None
                  """Email address of the user."""
              
                  organization: str | None = None
                  """Display name of the organization, team, or workspace the account is using."""
              

              active class-attribute instance-attribute

              active: bool | None = None
              

              Whether the agent currently uses this account by default.

              description class-attribute instance-attribute

              description: str | None = None
              

              Short text shown with the label, e.g. the credential source. MUST NOT contain secrets.

              email class-attribute instance-attribute

              email: str | None = None
              

              Email address of the user.

              label instance-attribute

              label: str
              

              Human-readable name for the account, e.g. Claude Max or OpenAI API key.

              name class-attribute instance-attribute

              name: str | None = None
              

              Display name of the user.

              organization class-attribute instance-attribute

              organization: str | None = None
              

              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
              class AuthMethodAgent(AnnotatedObject):
                  """Agent handles authentication itself.
              
                  This is the default authentication method type.
                  When no ``type`` field is present, the method is treated as ``agent``.
                  """
              
                  type: Literal["agent"] = Field(default="agent", exclude=True)
                  """Discriminator field.  Defaults to ``"agent"`` and is excluded from serialization
                  for backward compatibility."""
              
                  id: str
                  """Unique identifier for this authentication method."""
              
                  name: str
                  """Human-readable name of the authentication method."""
              
                  description: str | None = None
                  """Optional description providing more details about this authentication method."""
              

              description class-attribute instance-attribute

              description: str | None = None
              

              Optional description providing more details about this authentication method.

              id instance-attribute

              id: str
              

              Unique identifier for this authentication method.

              name instance-attribute

              name: str
              

              Human-readable name of the authentication method.

              type class-attribute instance-attribute

              type: Literal['agent'] = Field(default='agent', exclude=True)
              

              Discriminator field. Defaults to "agent" and is excluded from serialization for backward compatibility.

              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
              class AuthMethodTerminal(AnnotatedObject):
                  """Terminal authentication method.
              
                  Client runs the configured agent program as a separate interactive process
                  for the user to authenticate.
                  """
              
                  type: Literal["terminal"] = "terminal"
                  """Discriminator field."""
              
                  id: str
                  """Unique identifier for this authentication method."""
              
                  name: str
                  """Human-readable name of the authentication method."""
              
                  description: str | None = None
                  """Optional description providing more details about this authentication method."""
              
                  args: Sequence[str] = ()
                  """Additional arguments to pass when running the agent binary for terminal auth."""
              
                  env: dict[str, str] = Field(default_factory=dict)
                  """Additional environment variables to set when running the agent binary for terminal auth."""
              

              args class-attribute instance-attribute

              args: Sequence[str] = ()
              

              Additional arguments to pass when running the agent binary for terminal auth.

              description class-attribute instance-attribute

              description: str | None = None
              

              Optional description providing more details about this authentication method.

              env class-attribute instance-attribute

              env: dict[str, str] = Field(default_factory=dict)
              

              Additional environment variables to set when running the agent binary for terminal auth.

              id instance-attribute

              id: str
              

              Unique identifier for this authentication method.

              name instance-attribute

              name: str
              

              Human-readable name of the authentication method.

              type class-attribute instance-attribute

              type: Literal['terminal'] = 'terminal'
              

              Discriminator field.

              EnvVariable

              Bases: AnnotatedObject

              An environment variable to set when launching an MCP server.

              Source code in src/aclientp/schema/common.py
              class EnvVariable(AnnotatedObject):
                  """An environment variable to set when launching an MCP server."""
              
                  name: str
                  """The name of the environment variable."""
              
                  value: str
                  """The value to set for the environment variable."""
              

              name instance-attribute

              name: str
              

              The name of the environment variable.

              value instance-attribute

              value: str
              

              The value to set for the environment variable.

              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
              class Error(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](https://www.jsonrpc.org/specification#error_object)
                  """
              
                  code: ErrorCode
                  """A number indicating the error type that occurred.
              
                  This must be an integer as defined in the JSON-RPC specification.
                  """
              
                  data: Any | None = None
                  """Optional primitive or structured value that contains additional errorinformation.
              
                  This may include debugging information or context-specific details.
                  """
              
                  message: str
                  """A string providing a short description of the error.
              
                  The message should be limited to a concise single sentence.
                  """
              

              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

              data: Any | None = None
              

              Optional primitive or structured value that contains additional errorinformation.

              This may include debugging information or context-specific details.

              message instance-attribute

              message: str
              

              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
              class Implementation(AnnotatedObject):
                  """Describes the name and version of an ACP implementation.
              
                  Includes an optional title for UI representation.
                  """
              
                  name: str
                  """Intended for programmatic or logical use.
              
                  Can be used as a display name fallback if title isn't present."""
              
                  title: str | None = None
                  """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: str
                  """Version of the implementation.
              
                  Can be displayed to the user or used for debugging or metrics purposes."""
              

              name instance-attribute

              name: str
              

              Intended for programmatic or logical use.

              Can be used as a display name fallback if title isn't present.

              title class-attribute instance-attribute

              title: str | None = None
              

              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: str
              

              Version of the implementation.

              Can be displayed to the user or used for debugging or metrics purposes.