Skip to content

claudeCodeAdapter

const claudeCodeAdapter: object

Defined in: host-claude-code/src/index.ts:24

The Claude Code host adapter — the reference implementation of the HostAdapter contract. Assembled from the existing translation, capability, and install pieces; the satisfies check is the compile-time conformance proof (AC-4).

capabilities: object = claudeCodeCapabilities

optional agentIdentification?: boolean

blockingHooks: ("session-start" | "user-prompt" | "pre-tool-edit" | "post-tool-edit" | "session-stop" | "subagent-result" | "subagent-start" | "skill-invoke")[]

hooks: ("session-start" | "user-prompt" | "pre-tool-edit" | "post-tool-edit" | "session-stop" | "subagent-result" | "subagent-start" | "skill-invoke")[]

skillSystem: "none" | "native" | "prompted"

slashCommands: boolean

streamingOutput: boolean

subagentSpawn: "none" | "native" | "shell-out"

contractVersion: number = ADAPTER_CONTRACT_VERSION

extractPayload: (raw) => ExtractedPayload | undefined

unknown

ExtractedPayload | undefined

installCommands: (root, opts) => Promise<void>

string

InstallCommandsOptions = {}

Promise<void>

installHooks: (root, opts) => Promise<void>

string

InstallOptions = {}

Promise<void>

mapEvent: (hostEvent, toolName?) => "session-start" | "user-prompt" | "pre-tool-edit" | "post-tool-edit" | "session-stop" | "subagent-result" | "subagent-start" | "skill-invoke" | null

Map a host hook event name to its cadence abstract event. toolName disambiguates PostToolUse between the edit-tool flow (post-tool-edit) and the Skill-tool flow (skill-invoke, Phase 23.4).

string

string

"session-start" | "user-prompt" | "pre-tool-edit" | "post-tool-edit" | "session-stop" | "subagent-result" | "subagent-start" | "skill-invoke" | null