# `GeminiCliSdk.Runtime.CLI`
[🔗](https://github.com/nshkrdotcom/gemini_cli_sdk/blob/v0.2.0/lib/gemini_cli_sdk/runtime/cli.ex#L1)

Session-oriented runtime kit for the shared Gemini CLI lane.

The tagged mailbox event atom is adapter detail. Higher-level callers should
consume `GeminiCliSdk.Stream` or projected `GeminiCliSdk.Types.*` events
instead of treating the underlying session tag as core identity.

# `start_option`

```elixir
@type start_option() ::
  {:prompt, String.t()}
  | {:options, GeminiCliSdk.Options.t()}
  | {:execution_surface,
     CliSubprocessCore.ExecutionSurface.t() | map() | keyword()}
  | {:subscriber, pid() | {pid(), reference() | :legacy}}
  | {:metadata, map()}
  | {:session_event_tag, atom()}
```

# `build_invocation`

```elixir
@spec build_invocation(keyword()) ::
  {:ok, CliSubprocessCore.Command.t()} | {:error, term()}
```

# `capabilities`

```elixir
@spec capabilities() :: [atom()]
```

# `close`

```elixir
@spec close(pid()) :: :ok
```

# `end_input`

```elixir
@spec end_input(pid()) :: :ok | {:error, term()}
```

# `info`

```elixir
@spec info(pid()) :: map()
```

# `interrupt`

```elixir
@spec interrupt(pid()) :: :ok | {:error, term()}
```

# `list_provider_sessions`

```elixir
@spec list_provider_sessions(keyword()) :: {:ok, [map()]} | {:error, term()}
```

# `new_projection_state`

```elixir
@spec new_projection_state() :: map()
```

# `project_event`

```elixir
@spec project_event(CliSubprocessCore.Event.t(), map()) ::
  {[GeminiCliSdk.Types.stream_event()], map()}
```

# `send_input`

```elixir
@spec send_input(pid(), iodata(), keyword()) :: :ok | {:error, term()}
```

# `start_session`

```elixir
@spec start_session([start_option()]) ::
  {:ok, pid(),
   %{info: map(), projection_state: map(), temp_dir: String.t() | nil}}
  | {:error, term()}
```

# `stderr_chunk`

```elixir
@spec stderr_chunk(CliSubprocessCore.Event.t()) :: String.t() | nil
```

# `subscribe`

```elixir
@spec subscribe(pid(), pid(), reference()) :: :ok | {:error, term()}
```

---

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