Skip to content

client_responses

Class info

Classes

Name Children Inherits
CreateTerminalResponse
aclientp.schema.client_responses
Response containing the ID of the created terminal.
    KillTerminalResponse
    aclientp.schema.client_responses
    Response to the ``terminal/kill`` method.
      ReadTextFileResponse
      aclientp.schema.client_responses
      Response containing the contents of a text file.
        ReleaseTerminalResponse
        aclientp.schema.client_responses
        Response to terminal/release method.
          RequestPermissionResponse
          aclientp.schema.client_responses
          Response to a permission request.
            TerminalOutputResponse
            aclientp.schema.client_responses
            Response containing the terminal output and exit status.
              WaitForTerminalExitResponse
              aclientp.schema.client_responses
              Response containing the exit status of a terminal command.
                WriteTextFileResponse
                aclientp.schema.client_responses
                Response to `fs/write_text_file`.

                  🛈 DocStrings

                  Client response schema definitions.

                  CreateTerminalResponse

                  Bases: Response

                  Response containing the ID of the created terminal.

                  Source code in src/aclientp/schema/client_responses.py
                  class CreateTerminalResponse(Response):
                      """Response containing the ID of the created terminal."""
                  
                      terminal_id: str
                      """The unique identifier for the created terminal."""
                  

                  terminal_id instance-attribute

                  terminal_id: str
                  

                  The unique identifier for the created terminal.

                  KillTerminalResponse

                  Bases: Response

                  Response to the terminal/kill method.

                  Source code in src/aclientp/schema/client_responses.py
                  class KillTerminalResponse(Response):
                      """Response to the ``terminal/kill`` method."""
                  

                  ReadTextFileResponse

                  Bases: Response

                  Response containing the contents of a text file.

                  Source code in src/aclientp/schema/client_responses.py
                  class ReadTextFileResponse(Response):
                      """Response containing the contents of a text file."""
                  
                      content: str
                      """The contents of the text file."""
                  

                  content instance-attribute

                  content: str
                  

                  The contents of the text file.

                  ReleaseTerminalResponse

                  Bases: Response

                  Response to terminal/release method.

                  Source code in src/aclientp/schema/client_responses.py
                  class ReleaseTerminalResponse(Response):
                      """Response to terminal/release method."""
                  

                  RequestPermissionResponse

                  Bases: Response

                  Response to a permission request.

                  Source code in src/aclientp/schema/client_responses.py
                  class RequestPermissionResponse(Response):
                      """Response to a permission request."""
                  
                      outcome: RequestPermissionOutcome
                      """The user's decision on the permission request."""
                  
                      @classmethod
                      def denied(cls, metadata: dict[str, Any] | None = None) -> Self:
                          """Create a response indicating that the permission request was denied."""
                          return cls(outcome=DeniedOutcome(), field_meta=metadata)
                  
                      @classmethod
                      def allowed(cls, option_id: str, metadata: dict[str, Any] | None = None) -> Self:
                          """Create a response indicating that the permission request was allowed."""
                          return cls(outcome=AllowedOutcome(option_id=option_id), field_meta=metadata)
                  

                  outcome instance-attribute

                  The user's decision on the permission request.

                  allowed classmethod

                  allowed(option_id: str, metadata: dict[str, Any] | None = None) -> Self
                  

                  Create a response indicating that the permission request was allowed.

                  Source code in src/aclientp/schema/client_responses.py
                  @classmethod
                  def allowed(cls, option_id: str, metadata: dict[str, Any] | None = None) -> Self:
                      """Create a response indicating that the permission request was allowed."""
                      return cls(outcome=AllowedOutcome(option_id=option_id), field_meta=metadata)
                  

                  denied classmethod

                  denied(metadata: dict[str, Any] | None = None) -> Self
                  

                  Create a response indicating that the permission request was denied.

                  Source code in src/aclientp/schema/client_responses.py
                  @classmethod
                  def denied(cls, metadata: dict[str, Any] | None = None) -> Self:
                      """Create a response indicating that the permission request was denied."""
                      return cls(outcome=DeniedOutcome(), field_meta=metadata)
                  

                  TerminalOutputResponse

                  Bases: Response

                  Response containing the terminal output and exit status.

                  Source code in src/aclientp/schema/client_responses.py
                  class TerminalOutputResponse(Response):
                      """Response containing the terminal output and exit status."""
                  
                      exit_status: TerminalExitStatus | None = None
                      """Exit status if the command has completed."""
                  
                      output: str
                      """The terminal output captured so far."""
                  
                      truncated: bool
                      """Whether the output was truncated due to byte limits."""
                  

                  exit_status class-attribute instance-attribute

                  exit_status: TerminalExitStatus | None = None
                  

                  Exit status if the command has completed.

                  output instance-attribute

                  output: str
                  

                  The terminal output captured so far.

                  truncated instance-attribute

                  truncated: bool
                  

                  Whether the output was truncated due to byte limits.

                  WaitForTerminalExitResponse

                  Bases: Response

                  Response containing the exit status of a terminal command.

                  Source code in src/aclientp/schema/client_responses.py
                  class WaitForTerminalExitResponse(Response):
                      """Response containing the exit status of a terminal command."""
                  
                      exit_code: int | None = None
                      """The process exit code (may be null if terminated by signal)."""
                  
                      signal: str | None = None
                      """The signal that terminated the process (may be null if exited normally)."""
                  

                  exit_code class-attribute instance-attribute

                  exit_code: int | None = None
                  

                  The process exit code (may be null if terminated by signal).

                  signal class-attribute instance-attribute

                  signal: str | None = None
                  

                  The signal that terminated the process (may be null if exited normally).

                  WriteTextFileResponse

                  Bases: Response

                  Response to fs/write_text_file.

                  Source code in src/aclientp/schema/client_responses.py
                  class WriteTextFileResponse(Response):
                      """Response to `fs/write_text_file`."""