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}.
Summary
Functions
Decodes a system/init frame.
Types
@type permission_mode() :: :default | :accept_edits | :bypass_permissions | :plan | :dont_ask | :auto | {:other, String.t()}
@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()] }
Functions
@spec from_wire(MingaClaudeBridge.Wire.Field.json_map()) :: {:ok, t()} | :error
Decodes a system/init frame.