# `Raxol.AgentClientProtocol.Schema.ClientTypes.CreateTerminalRequest`
[🔗](https://github.com/DROOdotFOO/raxol-agent/blob/raxol_agent_client_protocol-v0.1.0/packages/raxol_agent_client_protocol/lib/raxol/agent_client_protocol/schema/client_types.ex#L557)

Request to create a new terminal and execute a command (`terminal/create`).

`env` is a list of `Raxol.AgentClientProtocol.Schema.AgentTypes.EnvVariable`
(nested under `AgentTypes` in `agent_types.ex`; see this file's header
comment for the cross-module naming note).

## Fixed defect (wire-shape, vs. schema-oracle)

Upstream modeled a `timeoutMs` field that does not exist in the pinned
`schema-v1.19.0` schema, and omitted the oracle's `outputByteLimit`
(nullable `uint64`) field entirely. `timeout_ms` was dropped;
`output_byte_limit` was added.

Ported from the MIT `f1729/agent_client_protocol` (c) 2025 f1729; see NOTICE.md.

# `t`

```elixir
@type t() :: %Raxol.AgentClientProtocol.Schema.ClientTypes.CreateTerminalRequest{
  _meta: map(),
  args: [String.t()],
  command: String.t(),
  cwd: String.t() | nil,
  env: [Raxol.AgentClientProtocol.Schema.AgentTypes.EnvVariable.t()],
  output_byte_limit: non_neg_integer() | nil,
  session_id: String.t()
}
```

# `from_json`

```elixir
@spec from_json(term()) :: {:ok, t()} | {:error, term()}
```

Total: never raises. Missing/non-string `sessionId`/`command` is the only failure mode.

# `new`

```elixir
@spec new(String.t(), String.t()) :: t()
```

# `to_json`

```elixir
@spec to_json(t()) :: map()
```

---

*Consult [api-reference.md](api-reference.md) for complete listing*
