# `MingaClaudeBridge.Wire.SystemInit`
[🔗](https://github.com/jsmestad/minga-claude-bridge/blob/main/lib/minga_claude_bridge/wire/system_init.ex#L1)

The `system` frame with subtype `init`, which Claude Code emits when a session starts.

The bridge reads `tools` and `mcp_servers` for its startup check, so both are required for the frame to decode. The other fields are optional because the bridge does not depend on them; a CLI that omits one still decodes.

`permission_mode` decodes the SDK's `PermissionMode` values to atoms (`acceptEdits` becomes `:accept_edits`, and so on). An unknown mode decodes to `{:other, string}`.

# `mcp_server`

```elixir
@type mcp_server() :: %{name: String.t(), status: String.t() | nil}
```

# `permission_mode`

```elixir
@type permission_mode() ::
  :default
  | :accept_edits
  | :bypass_permissions
  | :plan
  | :dont_ask
  | :auto
  | {:other, String.t()}
```

# `t`

```elixir
@type t() :: %MingaClaudeBridge.Wire.SystemInit{
  claude_code_version: String.t() | nil,
  cwd: String.t() | nil,
  mcp_servers: [mcp_server()],
  model: String.t() | nil,
  permission_mode: permission_mode() | nil,
  session_id: String.t(),
  tools: [String.t()]
}
```

# `from_wire`

```elixir
@spec from_wire(MingaClaudeBridge.Wire.Field.json_map()) :: {:ok, t()} | :error
```

Decodes a `system`/`init` frame.

---

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