stitchkit 0.129.0 → 0.130.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (156) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/dist/agent-executor/acp/v1-connect.d.ts +87 -19
  3. package/dist/agent-executor/acp/v1-connect.d.ts.map +1 -1
  4. package/dist/agent-executor/acp/v1-driver.d.ts +4 -2
  5. package/dist/agent-executor/acp/v1-driver.d.ts.map +1 -1
  6. package/dist/agent-executor/acp/v1-handlers.d.ts +56 -0
  7. package/dist/agent-executor/acp/v1-handlers.d.ts.map +1 -0
  8. package/dist/agent-executor/acp/v1-map.d.ts +13 -2
  9. package/dist/agent-executor/acp/v1-map.d.ts.map +1 -1
  10. package/dist/agent-executor/acp/v1-permission.d.ts +44 -0
  11. package/dist/agent-executor/acp/v1-permission.d.ts.map +1 -0
  12. package/dist/agent-executor/acp/v1-protocol.d.ts +63 -10
  13. package/dist/agent-executor/acp/v1-protocol.d.ts.map +1 -1
  14. package/dist/agent-executor/acp/v1-session.d.ts +34 -7
  15. package/dist/agent-executor/acp/v1-session.d.ts.map +1 -1
  16. package/dist/agent-executor/acp/v1-turn.d.ts +51 -13
  17. package/dist/agent-executor/acp/v1-turn.d.ts.map +1 -1
  18. package/dist/agent-executor/claude/classify.d.ts +10 -0
  19. package/dist/agent-executor/claude/classify.d.ts.map +1 -1
  20. package/dist/agent-executor/claude/cli-driver.d.ts +4 -1
  21. package/dist/agent-executor/claude/cli-driver.d.ts.map +1 -1
  22. package/dist/agent-executor/claude/events.d.ts +146 -0
  23. package/dist/agent-executor/claude/events.d.ts.map +1 -0
  24. package/dist/agent-executor/claude/limits.d.ts +7 -1
  25. package/dist/agent-executor/claude/limits.d.ts.map +1 -1
  26. package/dist/agent-executor/claude/protocol.d.ts +49 -9
  27. package/dist/agent-executor/claude/protocol.d.ts.map +1 -1
  28. package/dist/agent-executor/claude/session.d.ts +2 -0
  29. package/dist/agent-executor/claude/session.d.ts.map +1 -1
  30. package/dist/agent-executor/claude-sdk/controls.d.ts +10 -1
  31. package/dist/agent-executor/claude-sdk/controls.d.ts.map +1 -1
  32. package/dist/agent-executor/claude-sdk/driver.d.ts +97 -3
  33. package/dist/agent-executor/claude-sdk/driver.d.ts.map +1 -1
  34. package/dist/agent-executor/claude-sdk/probe.d.ts +29 -0
  35. package/dist/agent-executor/claude-sdk/probe.d.ts.map +1 -0
  36. package/dist/agent-executor/claude-sdk/query-loop.d.ts +53 -5
  37. package/dist/agent-executor/claude-sdk/query-loop.d.ts.map +1 -1
  38. package/dist/agent-executor/claude-sdk/query-options.d.ts +2 -0
  39. package/dist/agent-executor/claude-sdk/query-options.d.ts.map +1 -1
  40. package/dist/agent-executor/claude-sdk/session.d.ts +2 -3
  41. package/dist/agent-executor/claude-sdk/session.d.ts.map +1 -1
  42. package/dist/agent-executor/claude-sdk/turn-usage.d.ts +81 -0
  43. package/dist/agent-executor/claude-sdk/turn-usage.d.ts.map +1 -0
  44. package/dist/agent-executor/codex/classify.d.ts +4 -0
  45. package/dist/agent-executor/codex/classify.d.ts.map +1 -1
  46. package/dist/agent-executor/codex/connect.d.ts +2 -1
  47. package/dist/agent-executor/codex/connect.d.ts.map +1 -1
  48. package/dist/agent-executor/codex/control-client.d.ts +168 -0
  49. package/dist/agent-executor/codex/control-client.d.ts.map +1 -0
  50. package/dist/agent-executor/codex/driver.d.ts +22 -2
  51. package/dist/agent-executor/codex/driver.d.ts.map +1 -1
  52. package/dist/agent-executor/codex/handlers.d.ts +47 -0
  53. package/dist/agent-executor/codex/handlers.d.ts.map +1 -0
  54. package/dist/agent-executor/codex/limits.d.ts.map +1 -1
  55. package/dist/agent-executor/codex/protocol.d.ts +124 -0
  56. package/dist/agent-executor/codex/protocol.d.ts.map +1 -1
  57. package/dist/agent-executor/codex/request-answers.d.ts +101 -0
  58. package/dist/agent-executor/codex/request-answers.d.ts.map +1 -0
  59. package/dist/agent-executor/codex/session-controls.d.ts +91 -51
  60. package/dist/agent-executor/codex/session-controls.d.ts.map +1 -1
  61. package/dist/agent-executor/codex/session.d.ts +34 -12
  62. package/dist/agent-executor/codex/session.d.ts.map +1 -1
  63. package/dist/agent-executor/codex/shared-server.d.ts +29 -0
  64. package/dist/agent-executor/codex/shared-server.d.ts.map +1 -0
  65. package/dist/agent-executor/codex/shared-thread.d.ts +46 -0
  66. package/dist/agent-executor/codex/shared-thread.d.ts.map +1 -0
  67. package/dist/agent-executor/codex/thread-controls.d.ts +128 -0
  68. package/dist/agent-executor/codex/thread-controls.d.ts.map +1 -0
  69. package/dist/agent-executor/codex/turn-input.d.ts +30 -0
  70. package/dist/agent-executor/codex/turn-input.d.ts.map +1 -0
  71. package/dist/agent-executor/contract.d.ts +77 -0
  72. package/dist/agent-executor/contract.d.ts.map +1 -1
  73. package/dist/agent-executor/engine.d.ts +6 -2
  74. package/dist/agent-executor/engine.d.ts.map +1 -1
  75. package/dist/agent-executor/executor-contract.d.ts +54 -0
  76. package/dist/agent-executor/executor-contract.d.ts.map +1 -1
  77. package/dist/agent-executor/handoff-schemas.d.ts +407 -0
  78. package/dist/agent-executor/handoff-schemas.d.ts.map +1 -0
  79. package/dist/agent-executor/handoff.d.ts +12 -0
  80. package/dist/agent-executor/handoff.d.ts.map +1 -0
  81. package/dist/agent-executor/hello.d.ts +72 -0
  82. package/dist/agent-executor/hello.d.ts.map +1 -1
  83. package/dist/agent-executor/image-input.d.ts +22 -0
  84. package/dist/agent-executor/image-input.d.ts.map +1 -1
  85. package/dist/agent-executor/projection.d.ts +2 -2
  86. package/dist/agent-executor/projection.d.ts.map +1 -1
  87. package/dist/agent-executor/session-primitives.d.ts +10 -1
  88. package/dist/agent-executor/session-primitives.d.ts.map +1 -1
  89. package/dist/agent-executor/testing/conformance.d.ts.map +1 -1
  90. package/dist/agent-executor/testing/replay-driver.d.ts +41 -0
  91. package/dist/agent-executor/testing/replay-driver.d.ts.map +1 -0
  92. package/dist/agent-executor/testing/replay-gate.d.ts +11 -0
  93. package/dist/agent-executor/testing/replay-gate.d.ts.map +1 -0
  94. package/dist/agent-executor/testing/replay-runner.d.ts +27 -0
  95. package/dist/agent-executor/testing/replay-runner.d.ts.map +1 -0
  96. package/dist/agent-executor/testing/replay-scenarios.d.ts +21 -0
  97. package/dist/agent-executor/testing/replay-scenarios.d.ts.map +1 -0
  98. package/dist/agent-executor/testing/replay-transcript.d.ts +296 -0
  99. package/dist/agent-executor/testing/replay-transcript.d.ts.map +1 -0
  100. package/dist/agent-executor/vocabulary.d.ts +135 -0
  101. package/dist/agent-executor/vocabulary.d.ts.map +1 -1
  102. package/dist/agent-runtime/branch-provider.d.ts +2 -2
  103. package/dist/agent-runtime/deferred-tool-selection.d.ts.map +1 -1
  104. package/dist/entrypoints/agent-executor/acp.d.ts +4 -1
  105. package/dist/entrypoints/agent-executor/acp.d.ts.map +1 -1
  106. package/dist/entrypoints/agent-executor/acp.js +847 -214
  107. package/dist/entrypoints/agent-executor/claude-sdk.d.ts +5 -1
  108. package/dist/entrypoints/agent-executor/claude-sdk.d.ts.map +1 -1
  109. package/dist/entrypoints/agent-executor/claude-sdk.js +713 -205
  110. package/dist/entrypoints/agent-executor/claude.js +44 -19
  111. package/dist/entrypoints/agent-executor/codex.d.ts +9 -2
  112. package/dist/entrypoints/agent-executor/codex.d.ts.map +1 -1
  113. package/dist/entrypoints/agent-executor/codex.js +1775 -359
  114. package/dist/entrypoints/agent-executor/testing.d.ts +4 -0
  115. package/dist/entrypoints/agent-executor/testing.d.ts.map +1 -1
  116. package/dist/entrypoints/agent-executor/testing.js +1002 -2
  117. package/dist/entrypoints/agent-executor.d.ts +4 -2
  118. package/dist/entrypoints/agent-executor.d.ts.map +1 -1
  119. package/dist/entrypoints/agent-executor.js +411 -23
  120. package/dist/entrypoints/agent-runtime.js +4 -23
  121. package/dist/entrypoints/tools/mcp.d.ts +1 -0
  122. package/dist/entrypoints/tools/mcp.d.ts.map +1 -1
  123. package/dist/entrypoints/tools/mcp.js +1 -1
  124. package/dist/entrypoints/tools/toolkit.js +1 -1
  125. package/dist/{index-wv2amqm4.js → index-2s8sy57y.js} +36 -103
  126. package/dist/{index-afb6z77w.js → index-dbp6xemn.js} +75 -7
  127. package/dist/{index-bjmj2q1z.js → index-jrn3prgm.js} +1 -1
  128. package/dist/index-kne9g2c5.js +30 -0
  129. package/dist/index-p1qmpq0p.js +1300 -0
  130. package/dist/{index-7jqn3b3g.js → index-v759mzed.js} +152 -2
  131. package/dist/{index-cbhxhma2.js → index-x5ayy5bn.js} +1 -0
  132. package/dist/index-y0a4gt1s.js +142 -0
  133. package/dist/tools/internal/rank-tools.d.ts +10 -0
  134. package/dist/tools/internal/rank-tools.d.ts.map +1 -0
  135. package/dist/tools/mcp/handler.d.ts +7 -3
  136. package/dist/tools/mcp/handler.d.ts.map +1 -1
  137. package/dist/tools/mcp/lazy-discovery.d.ts +47 -0
  138. package/dist/tools/mcp/lazy-discovery.d.ts.map +1 -0
  139. package/dist/tools/mcp/mount.d.ts +7 -0
  140. package/dist/tools/mcp/mount.d.ts.map +1 -1
  141. package/dist/tools/mcp/register.d.ts +2 -2
  142. package/dist/tools/mcp/register.d.ts.map +1 -1
  143. package/llms/agent-executor-acp.txt +7 -8
  144. package/llms/agent-executor-claude-sdk.txt +4 -2
  145. package/llms/agent-executor-codex.txt +8 -4
  146. package/llms/agent-executor-testing.txt +5 -1
  147. package/llms/agent-executor.txt +7 -6
  148. package/llms/stitchkit.txt +74 -74
  149. package/llms/tools-mcp.txt +3 -2
  150. package/llms/tools.txt +24 -0
  151. package/llms/{upgrading-0.128.0-0.129.0.txt → upgrading-0.128.0-0.130.0.txt} +30 -3
  152. package/llms/upgrading.txt +1 -1
  153. package/llms-full.txt +159 -97
  154. package/llms.txt +8 -8
  155. package/package.json +1 -1
  156. package/dist/index-y71zn1gw.js +0 -586
@@ -19,11 +19,15 @@ WebSocket-over-Unix-socket (`unix-listen` / `unix-connect`). Evolving.
19
19
 
20
20
  | Export | Kind | Purpose |
21
21
  |--------|------|---------|
22
- | `createCodexDriver` / `CodexDriver` / `CodexDriverConfig` | function / _types_ | the driver: `transport` (`stdio`, `unix-listen`, `unix-connect`), `serverArgs`, thread policy (`model`, `modelProvider`, `approvalPolicy`, `sandbox`, `developerInstructions`, `runtimeWorkspaceRoots`, `config`), `prepareThread` / `verifyThread` lifecycle hooks, optional `resolveFile` and `maxImageBytes` (default 5 MiB) for turn-input images, approvals and input asked of the host, multi-bucket limits from `account/rateLimits/read` |
22
+ | `createCodexDriver` / `CodexDriver` / `CodexDriverConfig` | function / _types_ | the driver: `transport` (`stdio`, `unix-listen`, `unix-connect`), `serverArgs`, thread policy (`model`, `modelProvider`, `approvalPolicy`, `sandbox`, `developerInstructions`, `runtimeWorkspaceRoots`, `config`), `prepareThread` / `verifyThread` lifecycle hooks, observers (`onNotification`, `onServerRequest`, `onDisconnect`), optional `resolveFile` and `maxImageBytes` (default 5 MiB) for turn-input images, `connectControl(input)` for threadless connections, opt-in `openSharedServer(input)` for headless `stdio` multi-thread multiplexing (ADR 0329), approvals and input asked of the host, and multi-bucket limits from `account/rateLimits/read` |
23
23
  | `CodexTransportConfig` | _type_ | transport selector: `{ kind: 'stdio' }`, `{ kind: 'unix-listen', socketPath, listenTimeoutMs? }`, or `{ kind: 'unix-connect', socketPath, expectedOwnerUid? }` |
24
- | `CodexSession` / `CodexControlClient` | _types_ | extended session returned by `open()`: exposes `providerPid`, applied `threadContext`, per-turn overrides on `startTurn`, `steerTurn`, non-mutating `forkThread`, `compactThread`, `readConfig`, `listMcpServerStatus`, `listSkills`, `listModels`, `readAccount`, and `readRateLimits` |
25
- | `CodexThreadContext` / `CodexThreadPolicyOverrides` / `CodexApprovalPolicy` / `CodexSandboxMode` | _types_ | applied policy/model context reported by `thread/start`, `thread/resume`, or `thread/fork`, and overridable thread policy fields |
26
- | `CodexTurnInput` / `CodexCollaborationMode` / `CodexSteerTurnInput` / `CodexForkThreadOptions` / `CodexForkedThread` | _types_ | per-turn `startTurn` overrides (`model`, fail-closed `modelProvider`, `reasoningEffort`, `collaborationMode`, `approvalPolicy`, `sandboxPolicy`, `runtimeWorkspaceRoots`), `steerTurn` input, and `forkThread` options/result |
24
+ | `CodexSession` / `CodexControlClient` / `CodexControlConnection` / `CodexControlConnectInput` | _types_ | extended session returned by `open()` and threadless connection returned by `connectControl()`: expose `providerPid`, `respond`, `readConfig`, `readThread`, `listThreads`, `listLoadedThreads`, `listCollaborationModes`, `listTurns`, `listItems`, `archiveThread`, `unarchiveThread`, `unsubscribeThread`, `setThreadName`, `updateThreadMetadata`, `revertThread`, `injectItems`, `listMcpServerStatus`, `listSkills`, `listModels`, `readAccount`, and `readRateLimits`; `CodexSession` also exposes `threadContext`, `startTurn`, `steerTurn`, non-mutating `forkThread`, and `compactThread` |
25
+ | `CodexSharedServer` / `CodexSharedServerOpenInput` / `CodexSharedServerThreadInput` | _types_ | opt-in headless `stdio` multi-thread server returned by `driver.openSharedServer()` multiplexing up to `maxThreads` (default `32`, hard cap `256`) independent `CodexSession` instances with per-thread routing and `thread/unsubscribe` cleanup on thread close (refuses `unix-listen` / `unix-connect` fail-closed) |
26
+ | `CodexReadThreadParams` / `CodexListThreadsParams` / `CodexListLoadedThreadsParams` / `CodexListTurnsParams` / `CodexListItemsParams` / `CodexThreadItemsCursor` / `CodexThreadItemsDeferOutput` / `CodexThreadSortKey` / `CodexThreadSourceKind` | _types_ | typed parameters for `thread/read`, `thread/list`, `thread/loaded/list`, `thread/turns/list`, and `thread/items/list` |
27
+ | `CodexThreadIdParams` / `CodexSetThreadNameParams` / `CodexUpdateThreadMetadataParams` / `CodexThreadGitInfoUpdate` / `CodexRevertThreadParams` / `CodexRevertThreadResult` / `CodexInjectItemsParams` | _types_ | typed parameters and results for thread lifecycle (`archive`, `unarchive`, `unsubscribe`, `name/set`, `metadata/update`), history rollback (`thread/revert` via `revertThread`), and item injection (`thread/inject_items` via `injectItems`) |
28
+ | `CodexNotificationEvent` / `CodexServerRequestEvent` / `CodexServerRequestMethod` / `CodexMcpElicitationMode` | _types_ | observer event payloads for server notifications and the 5 handled v2 server requests (`item/commandExecution/requestApproval`, `item/fileChange/requestApproval`, `item/permissions/requestApproval`, `item/tool/requestUserInput`, `mcpServer/elicitation/request`) answered via `respond` without `-32601` (rejecting `approve.updatedInput` and `deny.interrupt: true` on `item/permissions/requestApproval` fail-closed with `TypeError`; excluded legacy/dynamic requests return `-32601`) |
29
+ | `CodexOpenInput` / `CodexOpenForkOptions` / `CodexThreadContext` / `CodexThreadPolicyOverrides` / `CodexApprovalPolicy` / `CodexSandboxMode` | _types_ | `open()` input (including opening directly through `thread/fork` via `forkFrom` with `deferGoalContinuation`), applied policy/model context reported by `thread/start`, `thread/resume`, or `thread/fork`, and overridable thread policy fields |
30
+ | `CodexTurnInput` / `CodexTurnInputPart` / `CodexSkillInputSchema` / `CodexSkillInput` / `CodexCollaborationMode` / `CodexSteerTurnInput` / `CodexForkThreadOptions` / `CodexForkedThread` | schema / _types_ | per-turn `startTurn` overrides (`model`, fail-closed `modelProvider`, `reasoningEffort`, `collaborationMode`, `approvalPolicy`, `sandboxPolicy`, `runtimeWorkspaceRoots`), ordered text / image / `skill` (`{ type: 'skill', name, path }`) turn and steer inputs, and `forkThread` options/result (including `deferGoalContinuation`) |
27
31
  | `CodexUnixSocketError` / `CodexUnixSocketErrorKind` | class / _type_ | typed Unix-socket refusal/transport error distinguishing `endpoint-absent`, `endpoint-not-listening`, `target-refused`, `upgrade-refused`, and `connection-lost` |
28
32
  | `codexFakeScenarios` | constant | the conformance scenarios in this dialect, for a scripted app-server |
29
33
  | `codexPlanWindows` | function | unfolds Codex's `account/rateLimits/read` envelope (including `rateLimitsByLimitId`) or a single snapshot into `<limitId\|limit>:<minutes>m\|<slot>` plan windows carrying optional `windowDurationMins` and `label` |
@@ -16,7 +16,11 @@ Also read:
16
16
 
17
17
  | Export | Kind | Purpose |
18
18
  |--------|------|---------|
19
- | `runAgentEngineConformance` / `AgentEngineConformanceConfig` / `AgentEngineDialectScenarios` | function / _types_ | prove a driver against its dialect's scripted engine: text and reconcile, approvals, failures by kind, interrupts (including `interruptDuringApproval`, whose request must close with `request-resolved`, and `requestAfterInterrupt`, which the driver must refuse rather than offer), a request still held when the turn ends (`requestAtTurnEnd`, closed with `request-resolved` before the end) or when the engine dies (`requestThenCrash`), neither left open to the consumer's answer, a dead or garbled engine, unknown records, and a dispatch never sent twice |
19
+ | `runAgentEngineConformance` / `AgentEngineConformanceConfig` / `AgentEngineDialectScenarios` | function / _types_ | prove a driver against its dialect's scripted engine: capabilities shape, text and reconcile, approvals, failures by kind, interrupts (including `interruptDuringApproval`, whose request must close with `request-resolved`, and `requestAfterInterrupt`, which the driver must refuse rather than offer), a request still held when the turn ends (`requestAtTurnEnd`, closed with `request-resolved` before the end) or when the engine dies (`requestThenCrash`), neither left open to the consumer's answer, a dead or garbled engine, unknown records, and a dispatch never sent twice |
20
+ | `createReplayExecutorDriver` / `ReplayExecutorDriver` / `ReplayExecutorDriverConfig` | function / _types_ | in-process, zero-subprocess, deterministic replay `AgentEngineDriver` over validated NDJSON transcripts for local dev and e2e tests; emulates any existing `ExecutorEngine` without widening `ExecutorEngineSchema` and provides `inputsFor`, `wasAnswered`, and `assertComplete` |
21
+ | `createReplayGate` / `ReplayGate` | function / _type_ | deterministic label-based synchronization gate pausing `{ kind: 'gate', label }` steps until `waitForReached` / `release` without timers |
22
+ | `ExecutorReplayTranscriptSchema` / `ExecutorReplayTranscript` / `ExecutorReplayStepSchema` / `ExecutorReplayStep` / `parseReplayTranscript` / `ParseReplayTranscriptOptions` / `formatReplayTranscript` | schemas / functions / _types_ | strict Zod-validated NDJSON transcript format (bounded by `maxBytes` and `maxSteps`, substituting `<workspace>` placeholders) and round-trip parser/formatter |
23
+ | `REPLAY_SCENARIOS` / `unpackReplayScenario` / `replayDialectScenarios` | constant / functions | built-in deterministic scenario presets (`'text-stream'`, `'approval'`, `'user-input'`, `'tool-calls'`, `'rate-limit'`, `'multi-turn'`, `'crash-mid-turn'`) and conformance dialect adapter |
20
24
  | `FakeEngineScenarioSchema` / `FakeEngineScenario` / `FakeEngineStepSchema` / `FakeEngineStep` | schemas / _types_ | a scripted engine turn in any dialect: expect, emit, delay, crash, exit |
21
25
  | `runFakeClaudeEngine` | function | play a scenario as Claude Code does on `stream-json` — the engine side of a Claude-dialect conformance test; Codex and ACP fakes speak JSON-RPC and are not exported |
22
26
 
@@ -21,17 +21,18 @@ leaves of their own; this entrypoint knows no vendor. Evolving.
21
21
  | Export | Kind | Purpose |
22
22
  |--------|------|---------|
23
23
  | `defineAgentExecutorContract` / `agentExecutorRealtimeContract` | functions / contract | the operations (`hello`, `claim`, `renew`, `release`, `report`) and the events the server pushes (`turn:offer`, `turn:interrupt`, `turn:reply`) |
24
- | `ExecutorHelloSchema` / `ExecutorHello` / `ExecutorHelloAckSchema` / `ExecutorHelloAck` / `ExecutorEngineSchema` / `ExecutorEngine` / `ExecutorEngineInfoSchema` / `ExecutorReconcileSchema` / `ExecutorProfileSchema` / `ExecutorProfile` / `ExecutorResumableTurnSchema` | schemas / _types_ | what an executor announces — engines (their `models`: `listed` with ids, `not-asked` or `failed` with why), private profiles, resumable turns with their `turnOrdinal` — and what the server holds of each: `acked` up to `ackedSeq`, or `not-retained` |
24
+ | `ExecutorHelloSchema` / `ExecutorHello` / `ExecutorHelloAckSchema` / `ExecutorHelloAck` / `ExecutorEngineSchema` / `ExecutorEngine` / `ExecutorEngineInfoSchema` / `ExecutorDriverCapabilitiesSchema` / `ExecutorDriverCapabilities` / `ExecutorReconcileSchema` / `ExecutorProfileSchema` / `ExecutorProfile` / `ExecutorResumableTurnSchema` | schemas / _types_ | what an executor announces — engines (their `models`: `listed` with ids, `not-asked` or `failed` with why, plus optional declarative `capabilities` describing runtime policy enforcement, session approval, `updatedToolInput`, structured input, steer/fork/revert/compact/injectItems, background work, `multiThreadPerProcess`, images, and `planLimits`), private profiles, resumable turns with their `turnOrdinal` — and what the server holds of each: `acked` up to `ackedSeq`, or `not-retained` |
25
25
  | `PlanLimitsSchema` / `PlanLimits` / `PlanWindowSchema` / `PlanWindow` | schemas / _types_ | a subscription's limits: `known`, `no-plan-limit` or `unpublished`, with the last read's error beside the last answer; each window carries `name`, `usedPercent`, and optional `resetsAt`, `windowDurationMins` and `label` |
26
26
  | `ThreadClaimSchema` / `ThreadClaim` / `ThreadLeaseSchema` / `ThreadLease` / `ThreadRenewSchema` / `ThreadReleaseSchema` | schemas / _types_ | thread leases pinned to an executor and profile, under a fence |
27
- | `TurnOfferSchema` / `TurnOffer` / `TurnPhaseSchema` / `TurnPhase` / `TurnReportSchema` / `TurnReport` / `TurnReportAckSchema` / `TurnFailureKindSchema` / `TurnInterruptSchema` / `InteractionReplySchema` / `InteractionReply` / `EXECUTOR_ERRORS` | schemas / _types_ / constant | a turn offered under its thread's `turnOrdinal`, its phases and reports applied once by `executorSeq` (acknowledged `applied`, `duplicate` or `not-retained`), interrupts, answers to an engine's requests, and the refusal codes |
28
- | `ExecutorDeltaSchema` / `ExecutorDelta` / `ExecutorErrorKindSchema` / `ExecutorErrorKind` / `ExecutorRawSchema` | schemas / _types_ | what an engine said: `agent-parts` blocks with `turnId`, `itemId` and `raw`, plus requests, usage, the context gauge (`context-usage`), the end of the turn, errors by kind and window resets |
29
- | `projectExecutorDeltas` | function | fold a turn's deltas into the message parts the agent runtime stores |
30
- | `AgentEngineDriver` / `AgentEngineSession` / `AgentEngineTurn` / `ExecutorEngineInfo` | _types_ | one vendor's engine behind one interface: info, login status, a session per connection, turns with `interrupt` and `respond`, `findInput` for a `client-id` engine |
27
+ | `TurnOfferSchema` / `TurnOffer` / `TurnPhaseSchema` / `TurnPhase` / `TurnReportSchema` / `TurnReport` / `TurnReportAckSchema` / `TurnFailureKindSchema` / `TurnInterruptSchema` / `InteractionReplySchema` / `InteractionReply` / `EXECUTOR_ERRORS` | schemas / _types_ / constant | a turn offered under its thread's `turnOrdinal`, its phases and reports applied once by `executorSeq` (acknowledged `applied`, `duplicate` or `not-retained`), interrupts, answers to an engine's requests (`approve` with optional `scope: 'once' \| 'session'` and `updatedInput`, `deny` with optional `interrupt: boolean`), and the refusal codes |
28
+ | `ExecutorDeltaSchema` / `ExecutorDelta` / `ExecutorStatusDeltaSchema` / `ExecutorStartupPhaseSchema` / `ExecutorStartupPhase` / `ExecutorThreadDispositionSchema` / `ExecutorThreadDisposition` / `ExecutorErrorKindSchema` / `ExecutorErrorKind` / `ExecutorRawSchema` / `ExecutorTokenUsageSchema` / `ExecutorTokenUsage` / `ExecutorModelUsageSchema` / `ExecutorModelUsage` | schemas / _types_ | what an engine said: `agent-parts` blocks with `turnId`, `itemId` and `raw`, plus requests, usage (including optional `cacheCreationInputTokens`, `thinkingTokens`, `totalTokens`, cumulative `total`, and per-model `modelUsage`), the context gauge (`context-usage`), lifecycle `status` deltas (`ExecutorStartupPhase`: `spawning`, `initializing`, `verifying`), the end of the turn (with optional `threadDisposition`: `'reusable' \| 'broken'`, also carried on `TurnReportSchema.failure`), errors by kind and window resets |
29
+ | `projectExecutorDeltas` | function | fold a turn's deltas into the message parts the agent runtime stores (ignoring lifecycle `status` deltas) |
30
+ | `buildContextHandoff` / `withInlineHandoffContext` / `InlineHandoffComposition` / `ContextHandoffInputSchema` / `ContextHandoffInput` / `ContextHandoffEntrySchema` / `ContextHandoffEntry` / `ContextHandoffMessageEntrySchema` / `ContextHandoffClearEntrySchema` / `ContextHandoffBudgetSchema` / `ContextHandoffStrategySchema` / `ContextHandoffResultSchema` / `ContextHandoffResult` / `ContextHandoffSelectedItemSchema` / `ContextHandoffSelectedItem` / `ContextHandoffStructuredItemSchema` / `ContextHandoffStructuredItem` | functions / schemas / _types_ | pure portable context-handoff builder for cross-engine or cross-session transitions: supports `full` and `delta` (`afterItemId` or `afterTurnId`, fail-closed `missingAnchor: 'error'` or `'full'`) strategies respecting the latest `clear` barrier, keeps intact items by fixed priority (`last user → last assistant → first user → newest..oldest`) under strict `maxTokens` / `maxBytes` / `maxOmittedIds` (and optional `contextWindowTokens` / `usedTokens` / `workReserveTokens`) ceilings while dropping non-text/binary/reasoning/provider parts, emits deterministic `inlineText` and Responses API `structuredItems`, and composes inline context ahead of a user prompt via `withInlineHandoffContext` (deferring on leading `/slash` commands) |
31
+ | `AgentEngineDriver` / `AgentEngineSession` / `AgentEngineTurn` / `ExecutorEngineInfo` | _types_ | one vendor's engine behind one interface: info, declarative `capabilities`, login status, a session per connection (accepting `onStartupPhase` on `open`), turns with `interrupt` and `respond`, `findInput` for a `client-id` engine |
31
32
  | `dispatchTurn` / `DispatchOutcome` | function / _type_ | send a turn's input at most once through `LocalStepDurability.effect`: `sent`, `delivered` after a reconcile, or `unknown_after_restart` — never resent |
32
33
  | `spawnEngineProcess` / `EngineProcess` | function / _type_ | an engine process talked to by lines over `stitchkit/process`: declared environment, owner-loss termination, optional leader `pid` / `pidReady`, `stdoutMode` (`'lines'` default or `'drain'` for socket-serving engines), bounded lines (`maxLineBytes`), stderr, queued stdin (`maxPendingStdinBytes`) and stdin written over the connection's life (`maxStdinBytes`, a refused `send()` that leaves the engine running); every option checked before the spawn |
33
34
  | `createExecutorLeases` / `memoryExecutorLeaseStore` / `ExecutorLeaseStateStore` / `ExecutorLeaseState` / `ExecutorLeaseStateSchema` / `ExecutorLeaseRefusal` | functions / _types_ / class | the server's thread leases and turn receipts over one atomically updated value, bounded by threads: each thread keeps the receipts of its last `retainedTurns` turns (default 64, at most 1024) and the highest `turnOrdinal` it let go, a report of a turn at or below it is `not-retained`, and `resume(resumable)` answers a hello the same way; a `StateStore` of `stitchkit/application` fits; a refusal is an `ExecutorLeaseRefusal` — an `AppError` with status 409 and a code of `EXECUTOR_ERRORS` — so an operation returning the service's promise answers `409 { error: { code } }` |
34
- | `ExecutorProfileConfigSchema` / `ExecutorProfileConfig` / `engineEnvironment` / `ownCredentials` / `helloProfile` / `CREDENTIAL_VARIABLES` | schema / _type_ / functions / constant | a profile on the executor's machine, the engine's allowlisted environment with the profile's `home` as `CLAUDE_CONFIG_DIR`, `CODEX_HOME` or (ACP) `HOME`, and `helloProfile({ profile, status, ambient })` carrying no path and no value; a driver refuses a profile whose `engine` is not its own with a `TypeError`, before it reads a file or starts the engine |
35
+ | `ExecutorProfileConfigSchema` / `ExecutorProfileConfig` / `engineEnvironment` / `ownCredentials` / `helloProfile` / `CREDENTIAL_VARIABLES` | schema / _type_ / functions / constant | a profile on the executor's machine, the engine's allowlisted environment with the profile's `home` as `CLAUDE_CONFIG_DIR`, `CODEX_HOME` or (ACP) `HOME` plus explicit `profile.env` pass-through for host-specific overrides (such as `TMPDIR`, `SSH_CONNECTION`, or agent-specific `AGY_*` variables), and `helloProfile({ profile, status, ambient })` carrying no path and no value; a driver refuses a profile whose `engine` is not its own with a `TypeError`, before it reads a file or starts the engine |
35
36
  | `mergeRateLimitEvent` / `planLimitsReadFailed` / `planLimitsDue` / `planWindowExpired` | functions | plan limits kept as three answers (`mergeRateLimitEvent`, `planLimitsReadFailed`, `planLimitsDue` take an options object), with a failed read beside the last answer |
36
37
  | `canAdvanceTurnPhase` / `isTerminalTurnPhase` | functions | the turn phase machine: a terminal phase is never left |
37
38
  | `advanceExecutorConnection` / `canAcceptTurn` / `INITIAL_EXECUTOR_CONNECTION` / `ExecutorConnectionState` / `ExecutorConnectionEvent` | functions / constant / _types_ | the executor's connection as a pure machine with generations: an answer of an earlier connection never acts on a later one |
@@ -56,81 +56,81 @@ own, recorded as an ADR.
56
56
 
57
57
  | Import | Use in | Maturity | Holds |
58
58
  |--------|--------|----------|-------|
59
- | `stitchkit` | browser **and** server | stable<br>_redefined in 5 of the 36 minors since 0.94.0, most recently 0.127.0_ | `defineContract`, `createClient`, `createHttpClient`, `createSocketIOClient`, `parseSSE`, the error model |
60
- | `stitchkit/http` | browser, React Native/Hermes **and** server | evolving<br>_redefined in 2 of the 36 minors since 0.94.0, most recently 0.127.0_ | typed HTTP client factories and `ApiError`, without optional realtime peers |
61
- | `stitchkit/realtime` | browser, React Native/Hermes **and** server | evolving<br>_redefined in 1 of the 36 minors since 0.94.0, most recently 0.127.0_ | typed realtime clients, binding to an existing socket and retained topics with a required explicit Socket.IO peer loader |
62
- | `stitchkit/contract` | browser **and** server | stable<br>_redefined in 5 of the 36 minors since 0.94.0, most recently 0.127.0_ | the contract layer alone — `defineContract`, errors, pagination |
63
- | `stitchkit/live` | browser **and** server | evolving<br>_redefined in 2 of the 36 minors since 0.94.0, most recently 0.127.0_ | `defineEvents` — topic declarations beside the operation contract — and watched reads: `createWatchClient`, the value/difference frame and its reassembly |
64
- | `stitchkit/primitives` | browser **and** server | evolving<br>_redefined in 0 of the 36 minors since 0.94.0_ | generic values and declarations for lifecycle, access, audit, delivery and exports, exact money and rounding tables |
65
- | `stitchkit/handler` | browser, React Native/Hermes **and** server | evolving<br>_redefined in 0 of the 3 minors since 0.127.0_ | portable `createHandler`, `implement`, errors and `serveBridge` over a string `postMessage` port, with no Node built-ins |
66
- | `stitchkit/server` | server (Bun) | stable<br>_redefined in 5 of the 36 minors since 0.94.0, most recently 0.127.0_ | `createServer`, `implement`, hooks, auth, Socket.IO server, server primitives |
67
- | `stitchkit/node` | server (Node ≥ 22.3) | stable<br>_redefined in 2 of the 36 minors since 0.94.0, most recently 0.127.0_ | `serveNode` + the runtime-agnostic core — the Node mirror of `/server` |
68
- | `stitchkit/tools` | server | stable<br>_redefined in 10 of the 36 minors since 0.94.0, most recently 0.127.0_ | the transport-neutral tool layer — registry, tool names and manifest, runtime tools, native tools, the OAuth provider, the durability engine; loads no optional peer at runtime |
69
- | `stitchkit/tools/mcp` | server (Bun or Node) | evolving<br>_redefined in 3 of the 36 minors since 0.94.0, most recently 0.127.0_ | the canonical MCP HTTP/stdio server, schemas and typed MCP presenters; only Zod and the MCP server SDK peers |
70
- | `stitchkit/tools/agent` | server (Bun or Node) | evolving<br>_redefined in 1 of the 36 minors since 0.94.0, most recently 0.127.0_ | `mountAgent` — a contract's operations as AI SDK tools; only Zod and the `ai` peer |
71
- | `stitchkit/tools/toolkit` | server (Bun or Node) | evolving<br>_redefined in 1 of the 36 minors since 0.94.0, most recently 0.127.0_ | `createToolkit` — one tool set served over MCP and to an AI SDK agent; the MCP server SDK and `ai` peers |
72
- | `stitchkit/tools/contract` | browser + server | evolving<br>_redefined in 2 of the 36 minors since 0.94.0, most recently 0.124.0_ | the shapes a tool surface speaks — async-operation contract, snapshot and cancel schemas, view-file input/output — without the runtime that serves them |
73
- | `stitchkit/tools/invoker` | server | stable<br>_redefined in 3 of the 36 minors since 0.94.0, most recently 0.127.0_ | peer-free `createToolInvoker` over the canonical contract tool runner |
74
- | `stitchkit/tools/connections` | server (Bun or Node) | evolving<br>_redefined in 3 of the 36 minors since 0.94.0, most recently 0.127.0_ | consume external MCP servers and a bounded OpenAPI subset — typed reauthorization, a per-request host fence and per-call credentials |
75
- | `stitchkit/cli` | server | stable<br>_redefined in 12 of the 36 minors since 0.94.0, most recently 0.128.0_ | `createCli` / `createCliInvoker` — runtime and strict NodeNext declarations without MCP SDK / `ai` |
76
- | `stitchkit/cli/publish` | build and release tooling (Bun or Node, POSIX) | evolving<br>_redefined in 0 of the 36 minors since 0.94.0_ | `publishCli` — commit a verified CLI distribution and move its public manifest last; see [CLI guide](cli.md#publishing-a-complete-version) |
77
- | `stitchkit/remote` | browser **and** server | stable<br>_redefined in 1 of the 36 minors since 0.94.0, most recently 0.104.0_ | peer-free `implementRemote` for thin HTTP proxy processes |
78
- | `stitchkit/process` | server (Bun or Node, POSIX) | evolving<br>_redefined in 3 of the 36 minors since 0.94.0, most recently 0.127.0_ | finite native commands, byte sinks, bounded capture, process-group cancellation and opt-in Linux/Darwin owner-loss cleanup; contract operations executed in one-call child processes |
79
- | `stitchkit/process/owner-loss` | bundled server entry (Bun, POSIX) | evolving<br>_redefined in 0 of the 36 minors since 0.94.0_ | narrow bootstrap that keeps the process runner lazy while carrying its owner-loss guard in a single-file bundle |
80
- | `stitchkit/files/packaging` | build time (Bun or Node) | evolving<br>_redefined in 3 of the 36 minors since 0.94.0, most recently 0.108.0_ | installed native asset graph, integrity, Bun packaging plugin and the artifact loader check; a client bundled into one self-contained, hashed and verified file; no runtime install policy |
81
- | `stitchkit/files` | server (Bun or Node) | stable<br>_redefined in 4 of the 36 minors since 0.94.0, most recently 0.127.0_ | peer-free managed local-file boundary |
82
- | `stitchkit/spend` | server (Bun or Node) | evolving<br>_redefined in 0 of the 3 minors since 0.127.0_ | peer-free spend gateway for paid model APIs: the attempt recorded before the call and closed on every outcome, credentials only for the provider's origin, a spooled ledger, rank-merged receipts and a reconciler |
83
- | `stitchkit/spend/testing` | tests on Bun or Node | evolving<br>_redefined in 0 of the 3 minors since 0.127.0_ | the coverage guard: red on a model SDK import, a provider key or a provider host outside the gateway files |
84
- | `stitchkit/service-host` | server (Bun or Node) | evolving<br>_redefined in 0 of the 3 minors since 0.127.0_ | peer-free host service supervision — verified versioned artifact activation, Linux `systemd` and macOS `launchd` units (`plutil`, `bootout`/`bootstrap`, rollback), live process/Unix-socket identity verification, and an in-process config-watched reloader |
85
- | `stitchkit/service-host/macos` | server (Bun or Node, macOS) | evolving<br>_redefined in 0 of the 3 minors since 0.127.0_ | peer-free macOS daemon bundle toolkit — fail-closed Developer ID `codesign`, strict C11 launcher `.app` bundles with atomic `RENAME_SWAP` install/rollback, Apple 824×824 squircle `AppIcon.icns`, streaming `lsregister` maintenance, and TCC responsibility inspection |
86
- | `stitchkit/telegram` | server (Bun or Node) | evolving<br>_redefined in 8 of the 36 minors since 0.94.0, most recently 0.127.0_ | peer-free Telegram platform primitives — Mini App `initData` verification, widget limits and the `widget_query` and widget message schemas, send-failure classification, one outbound budget per bot token with weighted albums and per-chat 429 pauses, resumable broadcasts, the operator channel with dedupe, a Bot API transport that separates a request that never left from an unknown outcome, local Bot API files, the waveform of a voice message read from its PCM, webhook ownership and durable webhook update intake |
87
- | `stitchkit/telegram/grammy` | server (Bun or Node) | evolving<br>_redefined in 0 of the 36 minors since 0.94.0_ | the token's outbound budget as one grammY client transformer — a 429 that comes back as a response pauses its chat, and a cancelled wait is a request that never left; the widget methods over the same client |
88
- | `stitchkit/telegram/html` | browser and server | evolving<br>_redefined in 1 of the 36 minors since 0.94.0, most recently 0.127.0_ | Telegram's HTML as a tree — compile GFM Markdown to Telegram HTML with fence-aware splitting, clean any markup to what Telegram accepts, cut long text into valid parts by what the reader sees, check markup before it is sent |
89
- | `stitchkit/telegram/voice` | browser and server | evolving<br>_redefined in 0 of the 36 minors since 0.94.0_ | the waveform of a voice message as one format — packed for `sendVoice` the way Telegram Desktop scales it, unpacked to draw it, a `getMe` read of whether the server takes it |
90
- | `stitchkit/telegram/screens` | server (Bun or Node) | evolving<br>_redefined in 1 of the 36 minors since 0.94.0, most recently 0.127.0_ | a bot's menus as declared screens over grammY — typed paths, actions and input, message reconciliation, state in any `StorageAdapter`, a test chat |
91
- | `stitchkit/tracking` | browser **and** server | evolving<br>_redefined in 3 of the 36 minors since 0.94.0, most recently 0.127.0_ | visitor-tracking mechanics — `createTrackingClient`, the tab-shared outbox, the page-leave beacon, attribution, the contract factory; no event vocabulary, no React |
92
- | `stitchkit/tracking/contract` | browser **and** server | evolving<br>_redefined in 0 of the 36 minors since 0.94.0_ | the wire shapes — the contract factory, event and visit schemas, the performance sample and its trust threshold; brings `zod` |
93
- | `stitchkit/tracking/performance` | browser **and** server | evolving<br>_redefined in 1 of the 36 minors since 0.94.0, most recently 0.127.0_ | Web Vitals from real visitors, collected after load through the optional peer `web-vitals`; no `zod` |
94
- | `stitchkit/tracking/server` | server (Bun or Node) | evolving<br>_redefined in 0 of the 36 minors since 0.94.0_ | the decisions a tracking backend makes — dispositions, visit lease over an application-owned store, active intervals, presence; no database |
95
- | `stitchkit/release` | browser **and** server | evolving<br>_redefined in 1 of the 36 minors since 0.94.0, most recently 0.127.0_ | a page follows the release it was built for — `createReleaseMarker` on the server, `createReleaseWatcher` in the browser, the `X-Build-Id` header and a socket event between them |
96
- | `stitchkit/voice` | browser **and** server | evolving<br>_redefined in 0 of the 36 minors since 0.94.0_ | the mechanics of a live voice reply — `SentenceCutter`, `speakableText`, a `SpeechQueue` that synthesises ahead and stops on interruption, the conversation phases |
97
- | `stitchkit/sync` | browser **and** server | evolving<br>_redefined in 0 of the 3 minors since 0.127.0_ | the client half of an offline-first sync — which outbox rows leave next, pending edits on top of remote rows, deletes that win until acknowledged, the cursor session, the push and page wire with an open outcome vocabulary; no driver, runs in Hermes |
98
- | `stitchkit/sync/postgres` | server (Bun or Node) | evolving<br>_redefined in 0 of the 3 minors since 0.127.0_ | the server half — versions that commit in order, a ledger that runs each change once, a feed of what changed, inside the app's own transaction; a memory store and `checkSyncStore` |
99
- | `stitchkit/geo` | server (Bun or Node) | evolving<br>_redefined in 2 of the 36 minors since 0.94.0, most recently 0.127.0_ | managed GeoIP reader generations, last-known-good reload and the optional MaxMind adapter |
100
- | `stitchkit/geo/contract` | browser **and** server | evolving<br>_redefined in 0 of the 36 minors since 0.94.0_ | the place snapshot schema, for a shared contract that stores or sends `GeoAttribution`; brings `zod` |
101
- | `stitchkit/xlsx` | browser **and** server | evolving<br>_redefined in 0 of the 36 minors since 0.94.0_ | a workbook from rows and typed columns, with no dependency; text never runs as a formula |
102
- | `stitchkit/oauth` | browser **and** server | evolving<br>_redefined in 0 of the 36 minors since 0.94.0_ | provider-neutral Authorization Code + PKCE request and one-shot callback transaction mechanics |
103
- | `stitchkit/google` | server (Bun or Node) | evolving<br>_redefined in 1 of the 36 minors since 0.94.0, most recently 0.127.0_ | optional Google code exchange and verified OIDC identity adapter |
104
- | `stitchkit/observability` | server | stable<br>_redefined in 1 of the 36 minors since 0.94.0, most recently 0.127.0_ | request/tool event projections — `createObservability`, trace context, sanitisation |
105
- | `stitchkit/testing` | tests on Bun or Node | stable<br>_redefined in 3 of the 36 minors since 0.94.0, most recently 0.127.0_ | in-process generated clients over a real Fetch handler, the managed-resource conformance kit and manual time for schedules and retries |
106
- | `stitchkit/declaration` | browser + build and deployment tooling (Bun or Node) | evolving<br>_redefined in 1 of the 36 minors since 0.94.0, most recently 0.128.0_ | `ProjectDeclarationSchema` — the one machine-readable statement a repository makes about itself |
107
- | `stitchkit/react` | browser + server rendering | stable<br>_redefined in 2 of the 36 minors since 0.94.0, most recently 0.127.0_ | `createCursorQuery`, `createCacheBridge`, QueryClient and `ApiError` retry policy |
108
- | `stitchkit/react/keyboard` | browser | evolving<br>_redefined in 1 of the 36 minors since 0.94.0, most recently 0.115.0_ | which part of a screen gets a key — ordered layers, one Escape per level, list zones with real focus; see [keyboard guide](keyboard.md) |
109
- | `stitchkit/react/keyboard/testing` | server (Bun or Node) | evolving<br>_redefined in 0 of the 36 minors since 0.94.0_ | the keyboard layers and zones without a DOM — fakes for the window, elements and key events beside the two engines, to test the order of layers, `scope`/`inert` and the edges of a zone in milliseconds |
110
- | `stitchkit/agent-runtime` | server | evolving<br>_redefined in 9 of the 36 minors since 0.94.0, most recently 0.128.0_ | optional durable conversation/run loop, history, models, prompts, fencing and events |
111
- | `stitchkit/agent-runtime/sandbox` | server | evolving<br>_redefined in 0 of the 36 minors since 0.94.0_ | optional Linux Bubblewrap sessions, host sandbox capability probes, durable workspaces and a host HTTP credential gateway; see [sandbox guide](sandbox.md) |
112
- | `stitchkit/agent-runtime/testing` | tests on Bun or Node | evolving<br>_redefined in 2 of the 36 minors since 0.94.0, most recently 0.127.0_ | credential-free replay, scripted provider faults, deterministic race controls and the agent-store conformance kit |
113
- | `stitchkit/agent-runtime/harness` | server | evolving<br>_redefined in 0 of the 36 minors since 0.94.0_ | resource-aware process-local facade over the canonical Agent runtime; supervision stays outside |
114
- | `stitchkit/agent-runtime/coding-tools` | server (Bun or Node) | evolving<br>_redefined in 3 of the 36 minors since 0.94.0, most recently 0.127.0_ | bounded host-authorized direct file and shell tools; a root boundary, not an OS sandbox |
115
- | `stitchkit/agent-runtime/openrouter` | server | evolving<br>_redefined in 1 of the 36 minors since 0.94.0, most recently 0.127.0_ | isolated OpenRouter language-model adapter |
116
- | `stitchkit/agent-runtime/browser` | browser + server | evolving<br>_redefined in 2 of the 36 minors since 0.94.0, most recently 0.127.0_ | canonical agent records, events, reconnect cursor and optional conversation controller |
117
- | `stitchkit/agent-runtime/react` | browser + server | evolving<br>_redefined in 0 of the 36 minors since 0.94.0_ | React subscription to an application-owned agent controller |
118
- | `stitchkit/agent-runtime/realtime` | server (Bun or Node) | evolving<br>_redefined in 2 of the 36 minors since 0.94.0, most recently 0.127.0_ | authorized agent control over the existing Socket.IO server |
119
- | `stitchkit/agent-executor` | server (Bun or Node) | evolving<br>_redefined in 1 of the 3 minors since 0.127.0, most recently 0.129.0_ | the executor ↔ server contract for external coding agents (Claude Code, Codex, ACP): delta vocabulary over the shared message parts, thread leases with a fence, turn phases and their reports |
120
- | `stitchkit/agent-executor/claude` | server (Bun or Node) | evolving<br>_redefined in 0 of the 3 minors since 0.127.0_ | the Claude Code driver: the unmodified CLI over `stream-json`, permission requests answered by the host, reconcile by the input's id in the profile's transcript |
121
- | `stitchkit/agent-executor/claude-sdk` | server (Bun or Node) | evolving<br>_redefined in 0 of the 3 minors since 0.127.0_ | Claude through the Agent SDK: the application's `query` (optional peer `@anthropic-ai/claude-agent-sdk`), the CLI's classifier, `canUseTool` asked of the host |
122
- | `stitchkit/agent-executor/acp` | server (Bun or Node) | evolving<br>_redefined in 0 of the 3 minors since 0.127.0_ | an Agent Client Protocol v1 agent over stdio: settings by category, images, MCP servers, `session/resume`/`load`/`list`, `session/cancel`; no reconcile |
123
- | `stitchkit/agent-executor/codex` | server (Bun or Node) | evolving<br>_redefined in 1 of the 3 minors since 0.127.0, most recently 0.129.0_ | the Codex driver: `codex app-server` over stdio or Unix-socket WebSocket (`unix-listen` / `unix-connect`), thread policy and live controls, approval and input requests answered by the host, unknown server requests refused, reconcile by the client id in `thread/turns/list` |
124
- | `stitchkit/agent-executor/testing` | server (Bun or Node) | evolving<br>_redefined in 0 of the 3 minors since 0.127.0_ | the engine conformance kit and the scripted fake engine a driver is proven against |
125
- | `stitchkit/agent-runtime/postgres` | server (Bun or Node) | evolving<br>_redefined in 0 of the 3 minors since 0.127.0_ | the agent store, conversation reader and companion host on Postgres, over the application's own client (Bun SQL, Prisma, `pg`) |
126
- | `stitchkit/agent-runtime/sqlite/bun` | server (Bun) | evolving<br>_redefined in 1 of the 36 minors since 0.94.0, most recently 0.127.0_ | durable built-in SQLite store for the agent runtime |
127
- | `stitchkit/agent-runtime/sqlite/node` | server (Node ≥ 22.5) | evolving<br>_redefined in 1 of the 36 minors since 0.94.0, most recently 0.127.0_ | durable built-in SQLite store for the agent runtime |
59
+ | `stitchkit` | browser **and** server | stable<br>_redefined in 5 of the 37 minors since 0.94.0, most recently 0.127.0_ | `defineContract`, `createClient`, `createHttpClient`, `createSocketIOClient`, `parseSSE`, the error model |
60
+ | `stitchkit/http` | browser, React Native/Hermes **and** server | evolving<br>_redefined in 2 of the 37 minors since 0.94.0, most recently 0.127.0_ | typed HTTP client factories and `ApiError`, without optional realtime peers |
61
+ | `stitchkit/realtime` | browser, React Native/Hermes **and** server | evolving<br>_redefined in 1 of the 37 minors since 0.94.0, most recently 0.127.0_ | typed realtime clients, binding to an existing socket and retained topics with a required explicit Socket.IO peer loader |
62
+ | `stitchkit/contract` | browser **and** server | stable<br>_redefined in 5 of the 37 minors since 0.94.0, most recently 0.127.0_ | the contract layer alone — `defineContract`, errors, pagination |
63
+ | `stitchkit/live` | browser **and** server | evolving<br>_redefined in 2 of the 37 minors since 0.94.0, most recently 0.127.0_ | `defineEvents` — topic declarations beside the operation contract — and watched reads: `createWatchClient`, the value/difference frame and its reassembly |
64
+ | `stitchkit/primitives` | browser **and** server | evolving<br>_redefined in 0 of the 37 minors since 0.94.0_ | generic values and declarations for lifecycle, access, audit, delivery and exports, exact money and rounding tables |
65
+ | `stitchkit/handler` | browser, React Native/Hermes **and** server | evolving<br>_redefined in 0 of the 4 minors since 0.127.0_ | portable `createHandler`, `implement`, errors and `serveBridge` over a string `postMessage` port, with no Node built-ins |
66
+ | `stitchkit/server` | server (Bun) | stable<br>_redefined in 5 of the 37 minors since 0.94.0, most recently 0.127.0_ | `createServer`, `implement`, hooks, auth, Socket.IO server, server primitives |
67
+ | `stitchkit/node` | server (Node ≥ 22.3) | stable<br>_redefined in 2 of the 37 minors since 0.94.0, most recently 0.127.0_ | `serveNode` + the runtime-agnostic core — the Node mirror of `/server` |
68
+ | `stitchkit/tools` | server | stable<br>_redefined in 10 of the 37 minors since 0.94.0, most recently 0.127.0_ | the transport-neutral tool layer — registry, tool names and manifest, runtime tools, native tools, the OAuth provider, the durability engine; loads no optional peer at runtime |
69
+ | `stitchkit/tools/mcp` | server (Bun or Node) | evolving<br>_redefined in 3 of the 37 minors since 0.94.0, most recently 0.127.0_ | the canonical MCP HTTP/stdio server, schemas and typed MCP presenters; only Zod and the MCP server SDK peers |
70
+ | `stitchkit/tools/agent` | server (Bun or Node) | evolving<br>_redefined in 1 of the 37 minors since 0.94.0, most recently 0.127.0_ | `mountAgent` — a contract's operations as AI SDK tools; only Zod and the `ai` peer |
71
+ | `stitchkit/tools/toolkit` | server (Bun or Node) | evolving<br>_redefined in 1 of the 37 minors since 0.94.0, most recently 0.127.0_ | `createToolkit` — one tool set served over MCP and to an AI SDK agent; the MCP server SDK and `ai` peers |
72
+ | `stitchkit/tools/contract` | browser + server | evolving<br>_redefined in 2 of the 37 minors since 0.94.0, most recently 0.124.0_ | the shapes a tool surface speaks — async-operation contract, snapshot and cancel schemas, view-file input/output — without the runtime that serves them |
73
+ | `stitchkit/tools/invoker` | server | stable<br>_redefined in 3 of the 37 minors since 0.94.0, most recently 0.127.0_ | peer-free `createToolInvoker` over the canonical contract tool runner |
74
+ | `stitchkit/tools/connections` | server (Bun or Node) | evolving<br>_redefined in 3 of the 37 minors since 0.94.0, most recently 0.127.0_ | consume external MCP servers and a bounded OpenAPI subset — typed reauthorization, a per-request host fence and per-call credentials |
75
+ | `stitchkit/cli` | server | stable<br>_redefined in 12 of the 37 minors since 0.94.0, most recently 0.128.0_ | `createCli` / `createCliInvoker` — runtime and strict NodeNext declarations without MCP SDK / `ai` |
76
+ | `stitchkit/cli/publish` | build and release tooling (Bun or Node, POSIX) | evolving<br>_redefined in 0 of the 37 minors since 0.94.0_ | `publishCli` — commit a verified CLI distribution and move its public manifest last; see [CLI guide](cli.md#publishing-a-complete-version) |
77
+ | `stitchkit/remote` | browser **and** server | stable<br>_redefined in 1 of the 37 minors since 0.94.0, most recently 0.104.0_ | peer-free `implementRemote` for thin HTTP proxy processes |
78
+ | `stitchkit/process` | server (Bun or Node, POSIX) | evolving<br>_redefined in 3 of the 37 minors since 0.94.0, most recently 0.127.0_ | finite native commands, byte sinks, bounded capture, process-group cancellation and opt-in Linux/Darwin owner-loss cleanup; contract operations executed in one-call child processes |
79
+ | `stitchkit/process/owner-loss` | bundled server entry (Bun, POSIX) | evolving<br>_redefined in 0 of the 37 minors since 0.94.0_ | narrow bootstrap that keeps the process runner lazy while carrying its owner-loss guard in a single-file bundle |
80
+ | `stitchkit/files/packaging` | build time (Bun or Node) | evolving<br>_redefined in 3 of the 37 minors since 0.94.0, most recently 0.108.0_ | installed native asset graph, integrity, Bun packaging plugin and the artifact loader check; a client bundled into one self-contained, hashed and verified file; no runtime install policy |
81
+ | `stitchkit/files` | server (Bun or Node) | stable<br>_redefined in 4 of the 37 minors since 0.94.0, most recently 0.127.0_ | peer-free managed local-file boundary |
82
+ | `stitchkit/spend` | server (Bun or Node) | evolving<br>_redefined in 0 of the 4 minors since 0.127.0_ | peer-free spend gateway for paid model APIs: the attempt recorded before the call and closed on every outcome, credentials only for the provider's origin, a spooled ledger, rank-merged receipts and a reconciler |
83
+ | `stitchkit/spend/testing` | tests on Bun or Node | evolving<br>_redefined in 0 of the 4 minors since 0.127.0_ | the coverage guard: red on a model SDK import, a provider key or a provider host outside the gateway files |
84
+ | `stitchkit/service-host` | server (Bun or Node) | evolving<br>_redefined in 0 of the 4 minors since 0.127.0_ | peer-free host service supervision — verified versioned artifact activation, Linux `systemd` and macOS `launchd` units (`plutil`, `bootout`/`bootstrap`, rollback), live process/Unix-socket identity verification, and an in-process config-watched reloader |
85
+ | `stitchkit/service-host/macos` | server (Bun or Node, macOS) | evolving<br>_redefined in 0 of the 4 minors since 0.127.0_ | peer-free macOS daemon bundle toolkit — fail-closed Developer ID `codesign`, strict C11 launcher `.app` bundles with atomic `RENAME_SWAP` install/rollback, Apple 824×824 squircle `AppIcon.icns`, streaming `lsregister` maintenance, and TCC responsibility inspection |
86
+ | `stitchkit/telegram` | server (Bun or Node) | evolving<br>_redefined in 8 of the 37 minors since 0.94.0, most recently 0.127.0_ | peer-free Telegram platform primitives — Mini App `initData` verification, widget limits and the `widget_query` and widget message schemas, send-failure classification, one outbound budget per bot token with weighted albums and per-chat 429 pauses, resumable broadcasts, the operator channel with dedupe, a Bot API transport that separates a request that never left from an unknown outcome, local Bot API files, the waveform of a voice message read from its PCM, webhook ownership and durable webhook update intake |
87
+ | `stitchkit/telegram/grammy` | server (Bun or Node) | evolving<br>_redefined in 0 of the 37 minors since 0.94.0_ | the token's outbound budget as one grammY client transformer — a 429 that comes back as a response pauses its chat, and a cancelled wait is a request that never left; the widget methods over the same client |
88
+ | `stitchkit/telegram/html` | browser and server | evolving<br>_redefined in 1 of the 37 minors since 0.94.0, most recently 0.127.0_ | Telegram's HTML as a tree — compile GFM Markdown to Telegram HTML with fence-aware splitting, clean any markup to what Telegram accepts, cut long text into valid parts by what the reader sees, check markup before it is sent |
89
+ | `stitchkit/telegram/voice` | browser and server | evolving<br>_redefined in 0 of the 37 minors since 0.94.0_ | the waveform of a voice message as one format — packed for `sendVoice` the way Telegram Desktop scales it, unpacked to draw it, a `getMe` read of whether the server takes it |
90
+ | `stitchkit/telegram/screens` | server (Bun or Node) | evolving<br>_redefined in 1 of the 37 minors since 0.94.0, most recently 0.127.0_ | a bot's menus as declared screens over grammY — typed paths, actions and input, message reconciliation, state in any `StorageAdapter`, a test chat |
91
+ | `stitchkit/tracking` | browser **and** server | evolving<br>_redefined in 3 of the 37 minors since 0.94.0, most recently 0.127.0_ | visitor-tracking mechanics — `createTrackingClient`, the tab-shared outbox, the page-leave beacon, attribution, the contract factory; no event vocabulary, no React |
92
+ | `stitchkit/tracking/contract` | browser **and** server | evolving<br>_redefined in 0 of the 37 minors since 0.94.0_ | the wire shapes — the contract factory, event and visit schemas, the performance sample and its trust threshold; brings `zod` |
93
+ | `stitchkit/tracking/performance` | browser **and** server | evolving<br>_redefined in 1 of the 37 minors since 0.94.0, most recently 0.127.0_ | Web Vitals from real visitors, collected after load through the optional peer `web-vitals`; no `zod` |
94
+ | `stitchkit/tracking/server` | server (Bun or Node) | evolving<br>_redefined in 0 of the 37 minors since 0.94.0_ | the decisions a tracking backend makes — dispositions, visit lease over an application-owned store, active intervals, presence; no database |
95
+ | `stitchkit/release` | browser **and** server | evolving<br>_redefined in 1 of the 37 minors since 0.94.0, most recently 0.127.0_ | a page follows the release it was built for — `createReleaseMarker` on the server, `createReleaseWatcher` in the browser, the `X-Build-Id` header and a socket event between them |
96
+ | `stitchkit/voice` | browser **and** server | evolving<br>_redefined in 0 of the 37 minors since 0.94.0_ | the mechanics of a live voice reply — `SentenceCutter`, `speakableText`, a `SpeechQueue` that synthesises ahead and stops on interruption, the conversation phases |
97
+ | `stitchkit/sync` | browser **and** server | evolving<br>_redefined in 0 of the 4 minors since 0.127.0_ | the client half of an offline-first sync — which outbox rows leave next, pending edits on top of remote rows, deletes that win until acknowledged, the cursor session, the push and page wire with an open outcome vocabulary; no driver, runs in Hermes |
98
+ | `stitchkit/sync/postgres` | server (Bun or Node) | evolving<br>_redefined in 0 of the 4 minors since 0.127.0_ | the server half — versions that commit in order, a ledger that runs each change once, a feed of what changed, inside the app's own transaction; a memory store and `checkSyncStore` |
99
+ | `stitchkit/geo` | server (Bun or Node) | evolving<br>_redefined in 2 of the 37 minors since 0.94.0, most recently 0.127.0_ | managed GeoIP reader generations, last-known-good reload and the optional MaxMind adapter |
100
+ | `stitchkit/geo/contract` | browser **and** server | evolving<br>_redefined in 0 of the 37 minors since 0.94.0_ | the place snapshot schema, for a shared contract that stores or sends `GeoAttribution`; brings `zod` |
101
+ | `stitchkit/xlsx` | browser **and** server | evolving<br>_redefined in 0 of the 37 minors since 0.94.0_ | a workbook from rows and typed columns, with no dependency; text never runs as a formula |
102
+ | `stitchkit/oauth` | browser **and** server | evolving<br>_redefined in 0 of the 37 minors since 0.94.0_ | provider-neutral Authorization Code + PKCE request and one-shot callback transaction mechanics |
103
+ | `stitchkit/google` | server (Bun or Node) | evolving<br>_redefined in 1 of the 37 minors since 0.94.0, most recently 0.127.0_ | optional Google code exchange and verified OIDC identity adapter |
104
+ | `stitchkit/observability` | server | stable<br>_redefined in 1 of the 37 minors since 0.94.0, most recently 0.127.0_ | request/tool event projections — `createObservability`, trace context, sanitisation |
105
+ | `stitchkit/testing` | tests on Bun or Node | stable<br>_redefined in 3 of the 37 minors since 0.94.0, most recently 0.127.0_ | in-process generated clients over a real Fetch handler, the managed-resource conformance kit and manual time for schedules and retries |
106
+ | `stitchkit/declaration` | browser + build and deployment tooling (Bun or Node) | evolving<br>_redefined in 1 of the 37 minors since 0.94.0, most recently 0.128.0_ | `ProjectDeclarationSchema` — the one machine-readable statement a repository makes about itself |
107
+ | `stitchkit/react` | browser + server rendering | stable<br>_redefined in 2 of the 37 minors since 0.94.0, most recently 0.127.0_ | `createCursorQuery`, `createCacheBridge`, QueryClient and `ApiError` retry policy |
108
+ | `stitchkit/react/keyboard` | browser | evolving<br>_redefined in 1 of the 37 minors since 0.94.0, most recently 0.115.0_ | which part of a screen gets a key — ordered layers, one Escape per level, list zones with real focus; see [keyboard guide](keyboard.md) |
109
+ | `stitchkit/react/keyboard/testing` | server (Bun or Node) | evolving<br>_redefined in 0 of the 37 minors since 0.94.0_ | the keyboard layers and zones without a DOM — fakes for the window, elements and key events beside the two engines, to test the order of layers, `scope`/`inert` and the edges of a zone in milliseconds |
110
+ | `stitchkit/agent-runtime` | server | evolving<br>_redefined in 9 of the 37 minors since 0.94.0, most recently 0.128.0_ | optional durable conversation/run loop, history, models, prompts, fencing and events |
111
+ | `stitchkit/agent-runtime/sandbox` | server | evolving<br>_redefined in 0 of the 37 minors since 0.94.0_ | optional Linux Bubblewrap sessions, host sandbox capability probes, durable workspaces and a host HTTP credential gateway; see [sandbox guide](sandbox.md) |
112
+ | `stitchkit/agent-runtime/testing` | tests on Bun or Node | evolving<br>_redefined in 2 of the 37 minors since 0.94.0, most recently 0.127.0_ | credential-free replay, scripted provider faults, deterministic race controls and the agent-store conformance kit |
113
+ | `stitchkit/agent-runtime/harness` | server | evolving<br>_redefined in 0 of the 37 minors since 0.94.0_ | resource-aware process-local facade over the canonical Agent runtime; supervision stays outside |
114
+ | `stitchkit/agent-runtime/coding-tools` | server (Bun or Node) | evolving<br>_redefined in 3 of the 37 minors since 0.94.0, most recently 0.127.0_ | bounded host-authorized direct file and shell tools; a root boundary, not an OS sandbox |
115
+ | `stitchkit/agent-runtime/openrouter` | server | evolving<br>_redefined in 1 of the 37 minors since 0.94.0, most recently 0.127.0_ | isolated OpenRouter language-model adapter |
116
+ | `stitchkit/agent-runtime/browser` | browser + server | evolving<br>_redefined in 2 of the 37 minors since 0.94.0, most recently 0.127.0_ | canonical agent records, events, reconnect cursor and optional conversation controller |
117
+ | `stitchkit/agent-runtime/react` | browser + server | evolving<br>_redefined in 0 of the 37 minors since 0.94.0_ | React subscription to an application-owned agent controller |
118
+ | `stitchkit/agent-runtime/realtime` | server (Bun or Node) | evolving<br>_redefined in 2 of the 37 minors since 0.94.0, most recently 0.127.0_ | authorized agent control over the existing Socket.IO server |
119
+ | `stitchkit/agent-executor` | server (Bun or Node) | evolving<br>_redefined in 2 of the 4 minors since 0.127.0, most recently 0.130.0_ | the executor ↔ server contract for external coding agents (Claude Code, Codex, ACP): delta vocabulary over the shared message parts, thread leases with a fence, turn phases and their reports |
120
+ | `stitchkit/agent-executor/claude` | server (Bun or Node) | evolving<br>_redefined in 0 of the 4 minors since 0.127.0_ | the Claude Code driver: the unmodified CLI over `stream-json`, permission requests answered by the host, reconcile by the input's id in the profile's transcript |
121
+ | `stitchkit/agent-executor/claude-sdk` | server (Bun or Node) | evolving<br>_redefined in 0 of the 4 minors since 0.127.0_ | Claude through the Agent SDK: the application's `query` (optional peer `@anthropic-ai/claude-agent-sdk`), the CLI's classifier, `canUseTool` asked of the host |
122
+ | `stitchkit/agent-executor/acp` | server (Bun or Node) | evolving<br>_redefined in 0 of the 4 minors since 0.127.0_ | an Agent Client Protocol v1 agent over stdio: settings by category, images, MCP servers, `session/resume`/`load`/`list`, `session/cancel`; no reconcile |
123
+ | `stitchkit/agent-executor/codex` | server (Bun or Node) | evolving<br>_redefined in 1 of the 4 minors since 0.127.0, most recently 0.129.0_ | the Codex driver: `codex app-server` over stdio or Unix-socket WebSocket (`unix-listen` / `unix-connect`), thread policy and live controls, approval and input requests answered by the host, unknown server requests refused, reconcile by the client id in `thread/turns/list` |
124
+ | `stitchkit/agent-executor/testing` | server (Bun or Node) | evolving<br>_redefined in 0 of the 4 minors since 0.127.0_ | the engine conformance kit and the scripted fake engine a driver is proven against |
125
+ | `stitchkit/agent-runtime/postgres` | server (Bun or Node) | evolving<br>_redefined in 0 of the 4 minors since 0.127.0_ | the agent store, conversation reader and companion host on Postgres, over the application's own client (Bun SQL, Prisma, `pg`) |
126
+ | `stitchkit/agent-runtime/sqlite/bun` | server (Bun) | evolving<br>_redefined in 1 of the 37 minors since 0.94.0, most recently 0.127.0_ | durable built-in SQLite store for the agent runtime |
127
+ | `stitchkit/agent-runtime/sqlite/node` | server (Node ≥ 22.5) | evolving<br>_redefined in 1 of the 37 minors since 0.94.0, most recently 0.127.0_ | durable built-in SQLite store for the agent runtime |
128
128
  | `stitchkit-tui` | terminal (Bun) | evolving | optional official OpenTUI host over a caller-composed headless runtime |
129
- | `stitchkit/application` | browser + server | evolving<br>_redefined in 9 of the 36 minors since 0.94.0, most recently 0.127.0_ | managed resource graph, readiness, admission, schedules, subtree restart and bounded shutdown |
130
- | `stitchkit/application/grammy` | server | evolving<br>_redefined in 0 of the 36 minors since 0.94.0_ | a grammY bot as application resources — configuration, then polling with updates admitted by batch — and the webhook adapter |
131
- | `stitchkit/application/opentelemetry` | server | evolving<br>_redefined in 0 of the 36 minors since 0.94.0_ | maps application snapshots onto an injected OpenTelemetry `Meter` |
132
- | `stitchkit/application/diagnostic-journal` | server | evolving<br>_redefined in 3 of the 36 minors since 0.94.0, most recently 0.127.0_ | the local diagnostic journal — an exclusive bounded writer and snapshot reader with explicit anomalies |
133
- | `stitchkit/application/directory-inbox` | server | evolving<br>_redefined in 0 of the 36 minors since 0.94.0_ | the directory inbox — entries another program drops into a directory, delivered to the application at least once |
129
+ | `stitchkit/application` | browser + server | evolving<br>_redefined in 9 of the 37 minors since 0.94.0, most recently 0.127.0_ | managed resource graph, readiness, admission, schedules, subtree restart and bounded shutdown |
130
+ | `stitchkit/application/grammy` | server | evolving<br>_redefined in 0 of the 37 minors since 0.94.0_ | a grammY bot as application resources — configuration, then polling with updates admitted by batch — and the webhook adapter |
131
+ | `stitchkit/application/opentelemetry` | server | evolving<br>_redefined in 0 of the 37 minors since 0.94.0_ | maps application snapshots onto an injected OpenTelemetry `Meter` |
132
+ | `stitchkit/application/diagnostic-journal` | server | evolving<br>_redefined in 3 of the 37 minors since 0.94.0, most recently 0.127.0_ | the local diagnostic journal — an exclusive bounded writer and snapshot reader with explicit anomalies |
133
+ | `stitchkit/application/directory-inbox` | server | evolving<br>_redefined in 0 of the 37 minors since 0.94.0_ | the directory inbox — entries another program drops into a directory, delivered to the application at least once |
134
134
 
135
135
  Rule of thumb: browser code imports `stitchkit` and `stitchkit/react`; server
136
136
  code adds `stitchkit/server` (or `stitchkit/node` on Node) and opts into
@@ -44,14 +44,15 @@ payload. See [MCP guide](../guide/mcp-and-agents.md#mcp--createmcphandler).
44
44
  | `StdioProcessSignalsBinding` | _type_ | close-only signal binding with observed `promise` and listener `close()` |
45
45
  | `StdioProcessSignalsErrorPhase` | _type_ | `'prepare' \| 'close' \| 'complete'` reporting phase |
46
46
  | `McpServerBuildConfig` | _type_ | shared config for `buildMcpServer` |
47
- | `McpServerSharedConfig` | _type_ | transport-neutral options shared by direct and finite surface configs |
47
+ | `McpServerSharedConfig` | _type_ | transport-neutral options shared by direct and finite stateful surface configs (including optional `discovery: McpLazyDiscoveryConfig`, excluded from stateless `McpHandlerConfig`) |
48
+ | `McpLazyDiscoveryConfig` | _type_ | opt-in lazy tool discovery config (`{ mode: 'lazy', initialTools, searchToolName?, maxResults? }`): starts non-initial contract tools disabled, exposes `tool_search`, and reveals matches per session with one `notifications/tools/list_changed` (supported on stateful `mountMcp`, `buildMcpServer`, `createStdioMcpServer`; refused on stateless `createMcpHandler`). The `stitchkit/catalog` stamp fingerprints the full underlying contract/runtime catalog excluding synthetic `tool_search` |
48
49
  | `McpServer` | _type_ | official split-SDK server instance accepted by raw extension points |
49
50
  | `DirectMcpSurfaceConfig` | _type_ | static or identity-dynamic `services` / `runtimeTools` source |
50
51
  | `FiniteMcpSurfaceConfig` | _type_ | bounded `surfaces` registry plus typed selector |
51
52
  | `McpSurfaceDefinition` | _type_ | one immutable `{ services, runtimeTools }` MCP surface |
52
53
  | `McpSurfaceRegistry` | _type_ | finite keyed surface registry for eager preparation |
53
54
  | `StdioAuthConfig` | _type_ | startup identity composed into `StdioMcpServerConfig` |
54
- | `McpMountConfig` | _type_ | config for `mountMcp` |
55
+ | `McpMountConfig` | _type_ | config for `mountMcp` (including optional `discovery: McpLazyDiscoveryConfig`) |
55
56
  | `McpSchemaValidationConfig` | _type_ | shared `{ policy, requireTypedProperties, allowUntyped, requirePortableFormats, allowFormats }` profile |
56
57
  | `ValidateMcpSchemasConfig` | _type_ | standalone validation profile plus `services`, `extend`, flattening and logger |
57
58
  | `IncompatibleSchemaPolicy` | _type_ | `'throw' \| 'skip' \| 'warn'` |
package/llms/tools.txt CHANGED
@@ -723,6 +723,30 @@ hooks: {
723
723
  > has no identity and **fails closed**. See
724
724
  > [Auth on the tool surface](./auth-and-errors.md#auth-on-the-tool-surface--resolvefromcontext).
725
725
 
726
+ ### Lazy tool discovery — `discovery`
727
+
728
+ Large stateful MCP surfaces (for example stdio servers or stateful `McpServer` mounts with dozens of tools) can opt into lazy discovery so clients start with a compact initial tool list and reveal additional tools on demand:
729
+
730
+ ```ts
731
+ createStdioMcpServer({
732
+ serverInfo: { name: 'my-mcp', version: '1.0.0' },
733
+ auth: { userId: 'local-operator' },
734
+ services,
735
+ access: { gate: { beforeHandle: authHook } },
736
+ discovery: {
737
+ mode: 'lazy',
738
+ initialTools: ['get_status'],
739
+ searchToolName: 'tool_search', // default
740
+ maxResults: 10, // default 10, range 1..50
741
+ },
742
+ })
743
+ ```
744
+
745
+ - **Opt-in only.** Omitting `discovery` keeps the default full `tools/list` surface untouched. In `'lazy'` mode `initialTools` is required (pass `[]` to hide every contract tool initially).
746
+ - **Session-isolated reveal.** Every contract tool outside `initialTools` starts disabled on that `McpServer` instance. Calling `tool_search` ranks hidden tools by name and description (exact/phrase matches first, then deduplicated word matches), enables up to `maxResults` matches on that session's `McpServer`, and emits a single `notifications/tools/list_changed` when at least one new tool is revealed. Enabling tools in one session never mutates another session or the shared prepared surface.
747
+ - **Identical access & catalog stamp.** `tool_search` and every revealed tool enforce the exact same `access` policy (`gate` / `inspect` / `open`), hooks, and `stitchkit/catalog` `_meta` stamp (which fingerprints the full underlying contract and runtime tool catalog, excluding synthetic `tool_search`). Unknown names in `initialTools`, `searchToolName` collisions with real tools, and out-of-range `maxResults` throw synchronously at mount time.
748
+ - **Stateful mounts only.** `createMcpHandler` creates a fresh stateless `McpServer` per HTTP request and therefore refuses `discovery` synchronously with `TypeError`; use `discovery` on stateful mounts (`createStdioMcpServer`, `buildMcpServer`, `mountMcp`).
749
+
726
750
  ### MCP schema validation profile
727
751
 
728
752
  A contract schema that JSON Schema cannot represent (a `z.date()`, a `z.map()`)
@@ -1,14 +1,41 @@
1
- # Upgrading 0.128.0 → 0.129.0 — stitchkit docs slice
1
+ # Upgrading 0.128.0 → 0.130.0 — stitchkit docs slice
2
2
 
3
3
  > Generated from the `docs/` tree by `bun run gen:llms`. The index of all slices is
4
4
  > `llms.txt` in this package.
5
5
 
6
- Contains: Guide: Upgrading, 0.128.0 → 0.129.0 (docs/guide/upgrading.md)
6
+ Contains: Guide: Upgrading, 0.128.0 → 0.130.0 (docs/guide/upgrading.md)
7
7
 
8
8
  ==============================================================================
9
- # Guide: Upgrading, 0.128.0 → 0.129.0 (docs/guide/upgrading.md)
9
+ # Guide: Upgrading, 0.128.0 → 0.130.0 (docs/guide/upgrading.md)
10
10
  ==============================================================================
11
11
 
12
+ ## Released migration: 0.130.0
13
+
14
+ ### executor-status-delta
15
+
16
+ **Who must act:** every caller of `stitchkit/agent-executor` that switches exhaustively on `ExecutorDelta['type']` or validates wire `TurnReport.deltas` against a `0.129.0` server schema.
17
+
18
+ `ExecutorDeltaSchema` / `ExecutorDelta` now includes `ExecutorStatusDeltaSchema` (`{ type: 'status', phase: 'spawning' | 'initializing' | 'verifying', ... }`) for structured startup lifecycle deltas. `projectExecutorDeltas` ignores `status` deltas automatically; add a `case 'status':` branch to any custom exhaustive `switch (delta.type)`:
19
+
20
+ ```ts
21
+ // before
22
+ switch (delta.type) {
23
+ case 'text':
24
+ // ...
25
+ case 'window':
26
+ break;
27
+ }
28
+
29
+ // after
30
+ switch (delta.type) {
31
+ case 'text':
32
+ // ...
33
+ case 'status':
34
+ case 'window':
35
+ break;
36
+ }
37
+ ```
38
+
12
39
  ## Released migration: 0.129.0
13
40
 
14
41
  ### codex-plan-window-keys
@@ -11,7 +11,7 @@ Contains: Guide: Upgrading, general (docs/guide/upgrading.md)
11
11
 
12
12
  Load this slice, then every range slice between your installed version and the target:
13
13
 
14
- - 0.128.0 → 0.129.0: `llms/upgrading-0.128.0-0.129.0.txt`
14
+ - 0.128.0 → 0.130.0: `llms/upgrading-0.128.0-0.130.0.txt`
15
15
  - 0.127.0 → 0.127.0: `llms/upgrading-0.127.0.txt`
16
16
  - 0.106.0 → 0.126.0: `llms/upgrading-0.106.0-0.126.0.txt`
17
17
  - 0.96.0 → 0.105.0: `llms/upgrading-0.96.0-0.105.0.txt`