Skip to content

CreateTerminalRequest

Base classes

Name Children Inherits
BaseAgentRequest
aclientp.schema.agent_requests
Base class for all agent requests.

⋔ Inheritance diagram

graph TD
  95970862217664["agent_requests.CreateTerminalRequest"]
  95970861850336["agent_requests.BaseAgentRequest"]
  95970858197488["base.Request"]
  95970862258240["base.AnnotatedObject"]
  95970862254416["base.Schema"]
  95970851503232["main.BaseModel"]
  125067848591872["builtins.object"]
  95970861850336 --> 95970862217664
  95970858197488 --> 95970861850336
  95970862258240 --> 95970858197488
  95970862254416 --> 95970862258240
  95970851503232 --> 95970862254416
  125067848591872 --> 95970851503232

🛈 DocStrings

Bases: BaseAgentRequest

Request to create a new terminal and execute a command.

Source code in src/aclientp/schema/agent_requests.py
class CreateTerminalRequest(BaseAgentRequest):
    """Request to create a new terminal and execute a command."""

    args: Sequence[str] | None = None
    """Array of command arguments."""

    command: str
    """The command to execute."""

    cwd: str | None = None
    """Working directory for the command (absolute path)."""

    env: Sequence[EnvVariable] | None = None
    """Environment variables for the command."""

    output_byte_limit: int | None = Field(default=None, ge=0)
    """Maximum number of output bytes to retain.

    When the limit is exceeded, the Client truncates from the beginning of the output
    to stay within the limit.

    The Client MUST ensure truncation happens at a character boundary to maintain valid
    string output, even if this means the retained output is slightly less than the
    specified limit."""

args class-attribute instance-attribute

args: Sequence[str] | None = None

Array of command arguments.

command instance-attribute

command: str

The command to execute.

cwd class-attribute instance-attribute

cwd: str | None = None

Working directory for the command (absolute path).

env class-attribute instance-attribute

env: Sequence[EnvVariable] | None = None

Environment variables for the command.

output_byte_limit class-attribute instance-attribute

output_byte_limit: int | None = Field(default=None, ge=0)

Maximum number of output bytes to retain.

When the limit is exceeded, the Client truncates from the beginning of the output to stay within the limit.

The Client MUST ensure truncation happens at a character boundary to maintain valid string output, even if this means the retained output is slightly less than the specified limit.

:fa-brands-github: Show source on GitHub