ACPex.Schema.Client.Terminal.CreateRequest (ACPex v0.1.0)

View Source

Request from agent to create a terminal.

Sent by the agent to request the client to create a new terminal process for executing commands. This is a bidirectional request (agent → client).

Required Fields

  • session_id - The session identifier (string)
  • command - The command to execute (string)

Optional Fields

  • args - Command-line arguments (list of strings)
  • cwd - Working directory (string)
  • env - Environment variables (list of maps)
  • output_byte_limit - Maximum output bytes (integer)
  • meta - Additional metadata (map)

Example

%ACPex.Schema.Client.Terminal.CreateRequest{
  session_id: "session-123",
  command: "/bin/bash",
  args: ["-c", "echo hello"],
  cwd: "/project",
  env: [%{"name" => "PATH", "value" => "/usr/bin"}]
}

JSON Representation

{
  "sessionId": "session-123",
  "command": "/bin/bash",
  "args": ["-c", "echo hello"],
  "cwd": "/project",
  "env": [{"name": "PATH", "value": "/usr/bin"}]
}

Summary

Functions

Creates a changeset for validation.

Types

t()

@type t() :: %ACPex.Schema.Client.Terminal.CreateRequest{
  args: [String.t()] | nil,
  command: String.t(),
  cwd: String.t() | nil,
  env: [map()] | nil,
  meta: map() | nil,
  output_byte_limit: integer() | nil,
  session_id: String.t()
}

Functions

changeset(struct \\ %__MODULE__{}, params)

@spec changeset(t(), map()) :: Ecto.Changeset.t()

Creates a changeset for validation.

Required Fields

  • session_id - Must be present
  • command - Must be present