Introducing a new way to review your PRs.

Read the announcement

thedotmack / claude-mem

Persistent Context Across Sessions for Every Agent – Captures everything your agent does during sessions, compresses it with AI, and injects relevant context back into future sessions. Works with Claude Code, OpenClaw, Codex, Gemini, Hermes, Copilot, OpenCode + More

View on GitHub

47 documents · Updated Nov 20, 2026

docs / hook-event-ingestion

CLI hook event ingestion

CLI hook event ingestion connects agent lifecycle events to the capture and memory system. It accepts provider-specific input, turns it into one shared event shape, and sends the event to capture, context, memory lookup, or session tracking. See capture and memory, transcript observation processing, memory ingest and reinforcement, native memory bridge, remote worker capture, history and prompt import, media artifact lifecycle, and automatic context clearing for related flows.

Hook command boundary

The hook command is the single entry point for provider events. A short-lived process reads one JSON value, selects a provider adapter and event handler, then emits one provider-valid result before it exits. This keeps capture work outside the agent process while allowing useful context to return to the model.

Invocation flow

The following flow shows how an agent event moves from provider input to capture or context output.

flowchart LR
    A[Agent lifecycle event] --> B[CLI hook command]
    B --> C[Read JSON input]
    C --> D[Provider adapter]
    D --> E[Shared hook input]
    E --> F[Event handler]
    F --> G{Result}
    G -->|Capture| H[Worker or server path]
    G -->|Context| I[Model context]
    G -->|Telemetry| J[Durable hand-off]
    H --> K[Agent continues]
    I --> K
    J --> K

The handler returns a shared HookResult. The command removes internal work-state data before the adapter formats the result for the host. It waits for model output and pending hand-offs before graceful exit.

References: src/…/hook-command.ts• L73-95

Input and output channels

Standard input carries the provider event. Standard output carries only the provider result that the agent can consume. Diagnostics use a separate buffered error path so logs cannot corrupt model context.

Rejected input, missing transcripts, unavailable workers, and unexpected memory errors produce a valid no-op result. The hook normally exits successfully so a capture failure does not block a user prompt or tool call. A disabled high-frequency hook still emits the no-op envelope required by the host. Codex observation hooks continue through the pipeline when capture is disabled because they can still restore context after compaction; other disabled observation hooks return their no-op result before reading standard input.

The command also treats malformed or incomplete input as a non-blocking condition. An adapter can reject an unsafe or incomplete event, and the command then returns the same safe envelope instead of stopping the agent.

References: src/…/hook-command.ts• L44-71 src/…/hook-command.ts• L97-134 src/…/hook-command.ts• L136-202

Provider adapters

Provider adapters translate each agent's event fields and output rules into the shared hook contract. They preserve session, prompt, tool, transcript, and agent identity data while hiding differences in field names, transcript locations, tool names, and output formats.

Normalized event model

The shared event model gives handlers the session identity and working directory first. Optional values describe the prompt, tool action, file edit, transcript, assistant text, provider source, and subagent identity.

Normalized valueRole in the capture workflow
sessionId and cwdLink the event to one conversation and project.
platform and sessionSourcePreserve the provider and lifecycle source.
prompt and submittedPromptDistinguish a user turn from a continuation or tool-result send.
toolName, toolInput, toolResponse, and toolUseIdDescribe an action and preserve its provider identity.
filePath and editsDescribe a direct file change.
transcriptPath and lastAssistantMessageSupply text for summary or transcript fallback.
agentId and agentTypeAttribute subagent work without making it a new main session.
hookEventName and turnIdPreserve provider events that share one internal handler or need turn identity.

The adapter contract is small: normalization creates the shared input and formatting converts a handler result back to provider output. This lets one capture rule serve several agents.

References: src/…/types.ts• L1-73 src/…/claude-code.ts• L65-108 src/…/devin.ts• L31-73

Claude-compatible mappings

The Claude-compatible adapter accepts hosts that use snake-case or camel-case fields. It validates and resolves the working directory, preserves bounded agent identity values, and maps session, tool, transcript, assistant, and source fields into the shared input. It also recovers the tail of a cut Claude Code tool result when the host provides a safe persisted-output file, so the capture path can retain the final test result or error.

Failed tool events retain their error and interruption state as the tool response. A compatible read tool can map its target into the shared file field. The persisted-output recovery keeps the original cut response when the path is outside Claude Code's tool-result area or cannot be read. The adapter distinguishes an absent submitted-prompt field from an explicit empty value, which prevents continuation sends from becoming false media prompts. Stop-loop flags from other plugins are not treated as a reason to suppress summary capture.

References: src/…/claude-code-persisted-output.ts• L8-19 src/…/claude-code-persisted-output.ts• L22-67 src/…/claude-code.ts• L24-47 src/…/claude-code.ts• L49-65 src/…/claude-code.ts• L67-111

Codex mappings

The Codex adapter maps Codex lifecycle events into the shared session, prompt, tool, transcript, assistant, and subagent model. It accepts the Codex event set used for tool permissions, tool completion, session start, user prompts, subagent start, and session stop. A missing session identity or invalid working directory rejects the event before it reaches a handler.

Codex pre-tool events can enrich tool input with safe file paths found in read commands. This lets file history use a command-only event without changing the original action. The adapter keeps provider-specific output rules separate: it returns shared continuation and message fields, adds context for supported hook events, and carries permission denial or updated tool input only for pre-tool events.

References: src/…/codex.ts• L5-22 src/…/codex.ts• L68-115 src/…/codex.ts• L117-149

Antigravity adapter

The Antigravity adapter turns its camel-case hook payloads into the shared session, tool, and prompt events. It reads the transcript when the host does not provide a clean prompt or response, removes host metadata from user text, and gives repeated model calls stable tool identity.

Antigravity uses the same payload shape for invocation boundaries. The latest transcript node distinguishes a new user turn from a follow-up model call. Tool calls are normalized for file reads, shell reads, MCP names, and encoded argument strings so file history and memory rules see the action that really ran. Its output is deliberately limited to the fields that Antigravity accepts, including injectSteps for context.

References: src/…/antigravity-cli.ts• L8-18 src/…/antigravity-cli.ts• L117-181 src/…/antigravity-cli.ts• L184-297

Cursor adapter

The Cursor adapter maps shell commands, MCP calls, and other tool events into the common tool model. It derives a transcript path from the workspace and conversation when Cursor omits one, then uses that transcript for later turn capture.

The derived path accepts only safe session identifiers and only an existing transcript. MCP envelopes are decoded once so the shared workflow sees their structured input and result. Failed tool events become error responses rather than completed results. Direct file edits remain available to the observation workflow. Cursor receives a simple continuation result, so context and capture stay inside the shared handler contract while the adapter keeps Cursor's output rules separate.

References: src/…/cursor.ts• L7-30 src/…/cursor.ts• L33-79

Devin adapter

The Devin adapter maps Devin's tool names to the shared names used by capture and memory rules. It validates the project and session identity, retains turn and source data, and marks unsuccessful tool results as errors.

Devin has no transcript path in its stop event, so the adapter passes the last assistant message directly to summary handling. Its context output uses the Claude-compatible envelope.

References: src/…/devin.ts• L9-29 src/…/devin.ts• L31-80

Gemini adapter

The Gemini adapter maps Gemini CLI lifecycle data into the shared prompt, tool, transcript, and session model. It requires a valid working directory and session identifier so the event can be linked to a project and conversation.

Gemini's built-in tool names become shared names such as Read, Write, Edit, and Bash. Its memory MCP names also become the common MCP form, which lets the observation handler recognize and skip the system's own recall tools. Gemini does not provide a tool-call identifier in its tool event, so the adapter leaves that value absent instead of creating an identity that could merge separate calls.

Gemini output can add model context or a user-facing message. It never denies a tool or rewrites a turn. Terminal messages have host-safe text without ANSI styling.

References: src/…/gemini.ts• L5-30 src/…/gemini.ts• L32-63

Kimi adapter

The Kimi adapter converts structured prompt parts into prompt text and maps Kimi tool output and failure fields into the common response shape. It finds the session transcript from Kimi's session store when the hook does not provide a path.

Kimi uses one internal summary event for both stop and compaction. The adapter keeps the raw event name so the summary handler can clear context only for compaction. Kimi receives plain text context rather than a Claude-style JSON envelope.

References: src/…/kimi.ts• L11-24 src/…/kimi.ts• L34-89 src/…/kimi.ts• L92-134

Windsurf adapter

The Windsurf adapter converts named agent actions into the shared prompt, edit, shell, MCP, and cascade-response events. The action name selects the event meaning, while the shared session and working directory keep all actions in the same capture scope.

Windsurf preserves both the MCP server and tool name in the common identity. This allows the observation rules to suppress the system's own search and timeline calls without suppressing unrelated tools with similar names. Its output is a continuation decision only, so capture and context behavior remain owned by the shared handlers.

References: src/…/windsurf.ts• L4-19 src/…/windsurf.ts• L21-79

File path enrichment

File path enrichment lets shell and MCP reads participate in file history context even when the provider sends only a command. It identifies existing files from supported read commands, expands home paths, ignores output targets, and caps the result before it reaches the hook handlers.

Codex applies this enrichment to pre-tool input before the shared observation path sees the event. Unparseable shell input produces no enrichment instead of failing the hook. This makes file history an optional aid and keeps a user's command independent from the enrichment step.

References: src/…/codex.ts• L76-85 src/…/codex-file-context.ts• L116-149 src/…/codex-file-context.ts• L152-227

Provider output

The adapter converts shared context and user hints into the host's accepted output shape. Structured providers receive their required hook envelope. Providers with plain-text context receive text in the form they support. Gemini receives only context and a clean user message; internal telemetry never appears in provider output.

Codex emits only the base continuation, message, and decision fields that are present. It adds a hook-specific block only when the result names a supported non-stop event. Pre-tool results may carry a permission denial or revised input, while stop results do not expose internal hook-specific data.

Provider registration maps canonical integration names to adapters. An unknown name uses the raw adapter, which preserves a safe common path instead of failing before the handler boundary.

References: src/…/codex.ts• L55-66 src/…/codex.ts• L117-149 src/…/gemini.ts• L53-61 src/…/claude-code.ts• L110-124 src/…/antigravity-cli.ts• L272-297 src/…/kimi.ts• L127-133 src/…/index.ts• L12-26

Event handlers

Event handlers turn normalized provider input into one application action. They do not need to know the provider's original JSON format. This separation keeps session capture, observation capture, context injection, and memory lookup consistent across agents.

Session and prompt capture

Session initialization links a user turn to a project and conversation. It records only a real submitted turn, then may return semantic context for the prompt. A continuation, tool-result send, internal protocol message, or excluded project is not recorded as a new prompt.

The handler uses the submitted prompt when the host supplies it. An explicit empty value means that the host reported no user text. Qwen needs an extra host check because its continuation events can omit that field. Genuine empty submissions use the shared media-prompt marker.

The handler can start the session through the server or local worker. A recoverable server failure falls back to the worker path. A prompt-recording failure stays non-blocking for the live hook, while the transcript watcher can request a retry when it needs a prompt anchor.

References: src/…/session-init.ts• L70-103 src/…/session-init.ts• L139-225 src/…/session-init.ts• L234-345

Prompt context banner

The user-message handler supplies a short user-visible notice after prompt context loads. It uses the same project scope and provider source as the rest of the capture path, then returns the banner through the result contract rather than writing directly to the process output.

Excluded projects and worker failures produce no banner. The banner can point the user to the live viewer and explain the private-message marker without changing the model's context payload.

References: src/…/user-message.ts• L16-39 src/…/user-message.ts• L41-60

Session-start context

Session-start context gives the agent a compact view of relevant prior work. The handler selects project scope and provider source, reads from the configured worker or server runtime, and returns context within the host's output budget.

The local path can use a precomputed cache or a live worker read. The server path reads the shared service so reads and writes use one corpus. The result can include the timeline, notices, a team brief, or a terminal preview, but model context and user-visible display remain separate. For Claude Code, a named session-start card can hold the banner while the hook result carries the closing status line; if the card is unavailable, the result carries the full bounded banner. A resume event does not replace the existing conversation context, and Codex clears its pending compaction marker when context is re-injected.

The handler treats context as fail-open. A worker outage can use a cached block or return an empty block. Excluded projects receive no context. The handler reserves room for notices and fits the final model field to the host limit. It does not cut a rendered entry without warning. Codex keeps the timeline in model context rather than repeating it in the user-facing message because the host may discard an oversized result.

Session-start context can also include setup, account, trial, or team notices. These notices share the same output budget as the context body, so the handler omits or shortens optional content when the field has little room. This keeps the useful context and the user-facing status separate without blocking the agent.

References: src/…/context.ts• L311-345 src/…/context.ts• L439-489 src/…/context.ts• L491-557 src/…/context.ts• L579-627 src/…/context.ts• L632-672

Observation capture

Observation events record completed agent actions for later memory processing. The handler keeps the session, provider source, tool details, tool-call identity, project, and optional agent identity together so later memory work can explain what happened.

Missing tool names, recursive memory tools, excluded projects, skipped subagents, and configured skipped tools do not create observations. Tool input and output are bounded before server or worker dispatch so large media data does not exceed the event boundary. Explicit memory writes use the capture hand-off without creating a duplicate observation.

The server path records the event directly and falls back to the worker spool for recoverable transport failures. The worker path writes the same bounded event to the durable hand-off. This keeps the capture contract stable when runtime selection changes.

References: src/…/observation.ts• L30-49 src/…/observation.ts• L52-96 src/…/observation.ts• L99-149

File edit capture

Direct file edits use the same observation workflow as tool actions. The handler records a stable write-tool event with the file path and edit data, while preserving the event time supplied by a live hook or transcript watcher.

File edits respect the live capture setting and tracked-project filter. In server runtime they go to the server first. A transient server failure falls back to the worker spool, while a permanent failure remains non-blocking.

References: src/…/file-edit.ts• L16-49 src/…/file-edit.ts• L51-106

Native memory lookup

The native memory bridge supplements an agent's own memory search or file read. It recognizes approved native memory locations and search actions, derives a bounded query, and adds an index view as pre-tool context without replacing the native result.

The bridge runs only with the local worker and only for tracked projects. It maps configured memory roots to their project when needed and returns observation index fields rather than full record bodies. Invalid paths, disabled settings, unavailable workers, malformed results, and search errors produce no extra context. Retrieved text is marked as data and bounded before it reaches the model.

References: src/…/memory-search.ts• L102-136 src/…/memory-search.ts• L138-183

File history context

The file-context event gives an agent prior work on a file before a read. It first checks for native memory lookup, then finds matching observations, removes duplicate sessions, ranks useful history, and returns a compact timeline. It does not create a new observation.

The lookup is best effort. It checks several path forms so stored absolute, relative, project-relative, and home-relative paths can match. It skips history when the file is too small, newer than the stored observations, outside a tracked project, or unavailable through the local worker. Server runtime skips this worker-only lookup.

For an eligible large whole-file read, the handler can deny the read and direct the agent to targeted smart tools and selected observations. Targeted reads, unsupported file types, files outside the workspace, unavailable smart tools, and failed checks pass through. A persistent per-session file gate prevents the same unchanged timeline from being injected again until a newer observation exists.

References: src/…/file-context.ts• L372-487 src/…/file-context.ts• L511-638 src/…/file-context.ts• L641-681

Summary and session-end events

Summary events close a completed main session and hand its final assistant turn to the memory pipeline. The handler can use text supplied by the provider or read the last turn from a transcript. It skips subagents, excluded projects, empty turns, and disabled summary capture without blocking the agent.

The stop path can also capture advisor calls and deliverables as separate turn outputs. In server runtime it records the final assistant message and ends the server session. In worker runtime it places the summary in the durable hand-off. Kimi clears its context marker only for compaction, not for every stop event.

References: src/…/summarize.ts• L28-69 src/…/summarize.ts• L107-183 src/…/summarize.ts• L185-271

Subagent events

Subagent events connect spawned work to the parent session. A fresh subagent can receive context, while copied parent history does not receive a duplicate timeline. A tracked local subagent can hand its deliverables back when it stops.

Session-end events are small completion signals. Local runtime places them in the durable hand-off without waiting for final processing. Untracked projects, missing session IDs, and server-only paths complete as harmless no-ops.

References: src/…/subagent-context.ts• L5-63 src/…/subagent-stop.ts• L14-50 src/…/session-end.ts• L16-47

Capture destinations

The same normalized event can use a local worker or the configured server runtime. Runtime selection is a deployment choice, not a provider choice. Short-lived hooks hand off slow work instead of waiting for memory generation to finish.

Worker and server paths

The worker path supports local session initialization, observations, summaries, file history, and subagent completion. Write events use the durable hand-off and nudge the worker. Synchronous reads check worker readiness and use cache or empty results when the worker cannot answer.

The server path sends session and event data to the shared service. It can also read session-start context and semantic context from that same service. Recoverable transport failures use the worker-compatible fallback. Non-recoverable failures are logged but do not block the agent.

References: src/…/session-init.ts• L234-304 src/…/context.ts• L474-527 src/…/observation.ts• L99-149 src/…/summarize.ts• L238-270

Durable hook hand-off

The durable hook hand-off stores accepted work so the short-lived command does not need to complete capture. It preserves ordering and deduplication rules needed by observations, summaries, and session-end work. A remote worker receives a versioned authenticated event and confirms the exact item before local removal; rejected or unavailable work remains available for retry.

References: src/…/hook-command.ts• L83-94 src/…/observation.ts• L30-49 src/…/file-edit.ts• L94-106 src/…/context.ts• L429-451

Hook contracts

The hook contract protects two systems at once: the agent must receive valid output and the memory system must not block the agent's work. Result fields therefore keep model context, user hints, provider decisions, and internal telemetry separate.

Result intents

Result fieldConsumerMeaning
hookSpecificOutput.additionalContextAgent modelContext for the next model action.
systemMessageHuman userA short message outside model context.
continueProvider runnerThe agent may continue its lifecycle.
decision and reasonBlocking-capable providersA provider-specific allow or deny result.
Internal telemetry hintDurable hand-offA measurement removed before provider formatting.
Exit statusProvider runnerNormal and memory-failure paths remain non-blocking.

References: src/…/hook-command.ts• L83-94 src/…/types.ts• L48-64

Provider registration

Provider configuration connects an agent lifecycle event to a CLI event name. The provider registry and handler registry must agree with that configuration. A valid provider event with no matching registration can pass through without capture. The registry includes the Gemini and Windsurf adapters alongside the existing provider mappings.

References: src/…/hook-command.ts• L97-103 src/…/index.ts• L13-43 src/…/index.ts• L1-26

Change checklist

When these files or sections are changed, remember to consider these:

  • Keep provider field mappings aligned with normalized handler inputs. Distinguish absent, empty, and null prompt values.
  • Keep Claude Code persisted-output recovery limited to its own tool-result files. An unreadable or unsafe path must leave the host's original tool response usable.
  • Keep provider output formatting aligned with each host's required envelope. A no-op SessionStart result must remain valid.
  • Keep failed tool events mapped to error responses so failed work is not stored as completed work.
  • Keep transcript-derived turn detection aligned with each provider's event timing. A repeated model-call hook must not create repeated prompt rows.
  • Keep provider event names, hook configuration, adapter registration, and handler registration in sync.
  • Keep Codex event validation and output-event selection aligned with the host's supported hook events. Stop results must not expose unsupported hook-specific data.
  • Keep Codex file-path enrichment optional. A read command that cannot be parsed must still reach the normal tool path.
  • Keep Gemini and Windsurf tool identities aligned with recursive-memory detection. Preserve the MCP server name where the host sends it separately.
  • Keep Cursor transcript derivation restricted to safe session identifiers and existing files.
  • Keep project filters and platform-source scope aligned across prompt capture, context injection, memory lookup, file history, and session end.
  • Keep server and worker event payloads equivalent. Apply tool-skip and private-data rules in both runtime paths.
  • Keep observation bounds applied before both server record calls and worker spooling.
  • Keep file history path matching, mtime checks, read-gate rules, line-anchor status, and persistent injection claims aligned.
  • Keep native memory lookup worker-only and limited to approved roots. Its context must supplement the native result.
  • Keep session-start context and provider-specific output within each host's output budget. Codex must not receive the timeline twice.
  • Keep summary side captures failure-isolated from the main summary path. Advisor and deliverable events must not be lost when the final assistant text is empty.
  • Keep telemetry attribution separate from capture attribution. Missing provider data must remain unknown.

Important failure modes

TriggerConsequenceGuard
Provider sends an invalid working directory or required session IDThe event cannot be linked to a project or sessionThe adapter rejects it and emits a valid no-op.
Claude Code sends a persisted output path outside its tool-result area or the file cannot be readThe hook keeps the host's cut output and may miss the final linesThe adapter accepts only a real Claude Code tool-result file and fails open when recovery is not safe.
Submitted-prompt presence is collapsed into truthinessContinuation sends become false prompt or media rowsThe adapter and session handler preserve absent, empty, and non-empty states.
A repeated Antigravity invocation is treated as a new turnOne user request creates many prompt rowsTranscript nodes distinguish a new user input from a follow-up model call.
A failed tool event lacks a mapped error responseFailed work can look successful in memoryEach adapter carries the provider failure as the tool response.
Codex receives an unsupported or missing event nameThe handler may not know which host contract to returnCodex accepts a fixed event set and formats hook-specific output only for a supported non-stop event.
Codex file-path enrichment becomes mandatoryA shell or MCP event can be lost when its command is not parseableEnrichment returns no paths and leaves the original command usable.
Cursor accepts an unsafe session identifier for transcript lookupA hook could read outside the Cursor transcript areaCursor limits the identifier to safe characters and requires the derived file to exist.
Gemini invents a tool-call ID from tool argumentsDistinct identical calls can be mergedThe Gemini adapter leaves the missing provider ID absent.
Gemini or Windsurf loses the MCP server identitySystem memory tools can be observed or external same-named tools can be skippedAdapters normalize the full memory-server and tool identity.
Shell parsing fails during file-path enrichmentA tool event can be discarded if enrichment is requiredEnrichment returns no paths and leaves the original command usable.
Session-start context exceeds the host field limitThe host can discard the full context blockThe handler reserves space and omits or cuts optional content.
Server capture fails transientlyThe event is not recorded by the first pathThe handler falls back to the worker-compatible hand-off.
Worker or server capture fails permanentlyThe current event is not capturedThe hook logs the failure and lets the agent continue.
Native memory path is outside an approved rootUnrelated memory could enter the promptThe bridge validates roots and returns no context on failure.
File history is injected repeatedlyThe model receives redundant contextA durable session/file gate allows only new observation epochs.
File read gating cannot verify the file or smart toolsA needed read could be blockedThe gate fails open and allows the read.
Kimi Stop clears the compaction markerThe full timeline is injected on every turnOnly Kimi PreCompact clears the marker.
Unexpected hook output reaches standard outputThe provider may reject or misread the resultThe common IO layer owns model output and buffers diagnostics.

Key files

FileWhy to read it
src/…/hook-command.tsShows the command boundary, output discipline, no-op results, disabled hooks, and non-blocking failure behavior.
src/…/index.tsShows how provider names reach the shared adapter contract.
src/…/claude-code.tsShows compatible provider input normalization and failure mapping.
src/…/claude-code-persisted-output.tsShows safe recovery of the tail of a cut Claude Code tool result.
src/…/codex.tsShows Codex event validation, file-path enrichment, and host output rules.
src/…/antigravity-cli.tsShows transcript-based turn detection and provider-specific context output.
src/…/cursor.tsShows safe transcript derivation, MCP decoding, and shell-event normalization.
src/…/devin.tsShows tool-name mapping and stop-message handling without a transcript.
src/…/gemini.tsShows Gemini tool mapping, memory MCP identity, and output limits.
src/…/kimi.tsShows structured prompts, derived transcripts, and compaction-aware event identity.
src/…/windsurf.tsShows action-based mapping for prompts, edits, commands, MCP calls, and cascade responses.
src/…/codex-file-context.tsShows safe file-path enrichment for shell and MCP reads.
src/…/types.tsDefines the shared input, result, adapter, and handler contracts.
src/…/index.tsShows event dispatch and the supported handler set.
src/…/session-init.tsShows prompt filtering, session creation, and runtime fallback.
src/…/context.tsShows session-start context scope, cache and server reads, notices, compaction handling, output limits, and the Claude Code session-start card hand-off.
src/…/user-message.tsShows the prompt-time user banner and context hand-off.
src/…/observation.tsShows bounded tool-event capture and server-to-worker fallback.
src/…/file-edit.tsShows direct edit capture in both runtimes.
src/…/memory-search.tsShows the native memory lookup bridge and its safety limits.
src/…/file-context.tsShows file history context, line anchors, and the full-file read gate.
src/…/summarize.tsShows final-turn capture, side captures, and server or worker summary paths.
src/…/file-context-dedupe.tsShows durable per-session file-context injection control.
src/…/hook-spool.tsShows durable ordering, retry, and hand-off guarantees.
src/…/hook-io.tsShows the boundary between model output and diagnostics.
src/…/runtime-selector.tsShows the worker-versus-server runtime choice.
src/…/server-client.tsShows the server event and context boundary.
plugin/…/hooks.jsonShows provider lifecycle events connected to CLI events.