stitchkit 0.130.1 → 0.131.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 (152) hide show
  1. package/CHANGELOG.md +42 -0
  2. package/dist/agent-executor/acp/v1-connect.d.ts +40 -26
  3. package/dist/agent-executor/acp/v1-connect.d.ts.map +1 -1
  4. package/dist/agent-executor/acp/v1-driver.d.ts +10 -4
  5. package/dist/agent-executor/acp/v1-driver.d.ts.map +1 -1
  6. package/dist/agent-executor/acp/v1-handlers.d.ts +6 -2
  7. package/dist/agent-executor/acp/v1-handlers.d.ts.map +1 -1
  8. package/dist/agent-executor/acp/v1-probe.d.ts +38 -0
  9. package/dist/agent-executor/acp/v1-probe.d.ts.map +1 -0
  10. package/dist/agent-executor/acp/v1-protocol.d.ts +15 -0
  11. package/dist/agent-executor/acp/v1-protocol.d.ts.map +1 -1
  12. package/dist/agent-executor/acp/v1-session.d.ts +9 -7
  13. package/dist/agent-executor/acp/v1-session.d.ts.map +1 -1
  14. package/dist/agent-executor/claude/cli-driver.d.ts +7 -7
  15. package/dist/agent-executor/claude/cli-driver.d.ts.map +1 -1
  16. package/dist/agent-executor/claude/limits.d.ts +6 -4
  17. package/dist/agent-executor/claude/limits.d.ts.map +1 -1
  18. package/dist/agent-executor/claude/session.d.ts +3 -3
  19. package/dist/agent-executor/claude/session.d.ts.map +1 -1
  20. package/dist/agent-executor/claude-sdk/controls.d.ts +1 -0
  21. package/dist/agent-executor/claude-sdk/controls.d.ts.map +1 -1
  22. package/dist/agent-executor/claude-sdk/driver.d.ts +51 -50
  23. package/dist/agent-executor/claude-sdk/driver.d.ts.map +1 -1
  24. package/dist/agent-executor/claude-sdk/probe.d.ts +3 -3
  25. package/dist/agent-executor/claude-sdk/probe.d.ts.map +1 -1
  26. package/dist/agent-executor/claude-sdk/query-loop.d.ts +2 -1
  27. package/dist/agent-executor/claude-sdk/query-loop.d.ts.map +1 -1
  28. package/dist/agent-executor/codex/classify.d.ts.map +1 -1
  29. package/dist/agent-executor/codex/connect.d.ts +7 -7
  30. package/dist/agent-executor/codex/connect.d.ts.map +1 -1
  31. package/dist/agent-executor/codex/control-client.d.ts +86 -99
  32. package/dist/agent-executor/codex/control-client.d.ts.map +1 -1
  33. package/dist/agent-executor/codex/control-read-methods.d.ts +7 -0
  34. package/dist/agent-executor/codex/control-read-methods.d.ts.map +1 -0
  35. package/dist/agent-executor/codex/driver.d.ts +29 -28
  36. package/dist/agent-executor/codex/driver.d.ts.map +1 -1
  37. package/dist/agent-executor/codex/event-routing.d.ts +14 -0
  38. package/dist/agent-executor/codex/event-routing.d.ts.map +1 -0
  39. package/dist/agent-executor/codex/handlers.d.ts +2 -2
  40. package/dist/agent-executor/codex/handlers.d.ts.map +1 -1
  41. package/dist/agent-executor/codex/limits.d.ts +9 -3
  42. package/dist/agent-executor/codex/limits.d.ts.map +1 -1
  43. package/dist/agent-executor/codex/notifications.d.ts +183 -0
  44. package/dist/agent-executor/codex/notifications.d.ts.map +1 -0
  45. package/dist/agent-executor/codex/pagination.d.ts +54 -0
  46. package/dist/agent-executor/codex/pagination.d.ts.map +1 -0
  47. package/dist/agent-executor/codex/protocol.d.ts +586 -148
  48. package/dist/agent-executor/codex/protocol.d.ts.map +1 -1
  49. package/dist/agent-executor/codex/request-answers.d.ts +4 -2
  50. package/dist/agent-executor/codex/request-answers.d.ts.map +1 -1
  51. package/dist/agent-executor/codex/responses.d.ts +855 -0
  52. package/dist/agent-executor/codex/responses.d.ts.map +1 -0
  53. package/dist/agent-executor/codex/session-bind.d.ts +410 -0
  54. package/dist/agent-executor/codex/session-bind.d.ts.map +1 -0
  55. package/dist/agent-executor/codex/session-controls.d.ts +19 -190
  56. package/dist/agent-executor/codex/session-controls.d.ts.map +1 -1
  57. package/dist/agent-executor/codex/session-types.d.ts +190 -0
  58. package/dist/agent-executor/codex/session-types.d.ts.map +1 -0
  59. package/dist/agent-executor/codex/session.d.ts +1 -1
  60. package/dist/agent-executor/codex/session.d.ts.map +1 -1
  61. package/dist/agent-executor/codex/shared-server.d.ts +4 -4
  62. package/dist/agent-executor/codex/shared-server.d.ts.map +1 -1
  63. package/dist/agent-executor/codex/shared-thread.d.ts +5 -5
  64. package/dist/agent-executor/codex/shared-thread.d.ts.map +1 -1
  65. package/dist/agent-executor/codex/thread-controls.d.ts +45 -36
  66. package/dist/agent-executor/codex/thread-controls.d.ts.map +1 -1
  67. package/dist/agent-executor/codex/thread-list-query.d.ts +5 -0
  68. package/dist/agent-executor/codex/thread-list-query.d.ts.map +1 -0
  69. package/dist/agent-executor/codex/thread-open.d.ts +20 -20
  70. package/dist/agent-executor/codex/thread-open.d.ts.map +1 -1
  71. package/dist/agent-executor/codex/turn-input.d.ts +4 -3
  72. package/dist/agent-executor/codex/turn-input.d.ts.map +1 -1
  73. package/dist/agent-executor/codex/unix-socket-target.d.ts +12 -3
  74. package/dist/agent-executor/codex/unix-socket-target.d.ts.map +1 -1
  75. package/dist/agent-executor/codex/ws-frame.d.ts +4 -1
  76. package/dist/agent-executor/codex/ws-frame.d.ts.map +1 -1
  77. package/dist/agent-executor/contract.d.ts +3 -1
  78. package/dist/agent-executor/contract.d.ts.map +1 -1
  79. package/dist/agent-executor/engine-process.d.ts +4 -4
  80. package/dist/agent-executor/engine-process.d.ts.map +1 -1
  81. package/dist/agent-executor/engine.d.ts +3 -3
  82. package/dist/agent-executor/engine.d.ts.map +1 -1
  83. package/dist/agent-executor/handoff.d.ts.map +1 -1
  84. package/dist/agent-executor/hello.d.ts +7 -0
  85. package/dist/agent-executor/hello.d.ts.map +1 -1
  86. package/dist/agent-executor/json-rpc-peer.d.ts +9 -4
  87. package/dist/agent-executor/json-rpc-peer.d.ts.map +1 -1
  88. package/dist/agent-executor/leases.d.ts +1 -1
  89. package/dist/agent-executor/leases.d.ts.map +1 -1
  90. package/dist/agent-executor/plan-limits.d.ts +12 -1
  91. package/dist/agent-executor/plan-limits.d.ts.map +1 -1
  92. package/dist/agent-executor/profile.d.ts +7 -0
  93. package/dist/agent-executor/profile.d.ts.map +1 -1
  94. package/dist/agent-executor/session-primitives.d.ts +8 -0
  95. package/dist/agent-executor/session-primitives.d.ts.map +1 -1
  96. package/dist/agent-executor/testing/consumer-stubs.d.ts +45 -0
  97. package/dist/agent-executor/testing/consumer-stubs.d.ts.map +1 -0
  98. package/dist/agent-executor/testing/fake-claude-sdk-query.d.ts +88 -0
  99. package/dist/agent-executor/testing/fake-claude-sdk-query.d.ts.map +1 -0
  100. package/dist/agent-executor/testing/fake-codex-app-server.d.ts +56 -0
  101. package/dist/agent-executor/testing/fake-codex-app-server.d.ts.map +1 -0
  102. package/dist/agent-executor/testing/fixtures.d.ts +26 -0
  103. package/dist/agent-executor/testing/fixtures.d.ts.map +1 -0
  104. package/dist/agent-executor/testing/replay-driver.d.ts +8 -8
  105. package/dist/agent-executor/testing/replay-driver.d.ts.map +1 -1
  106. package/dist/agent-executor/testing/replay-runner.d.ts +3 -2
  107. package/dist/agent-executor/testing/replay-runner.d.ts.map +1 -1
  108. package/dist/agent-executor/testing/replay-transcript.d.ts +5 -3
  109. package/dist/agent-executor/testing/replay-transcript.d.ts.map +1 -1
  110. package/dist/agent-runtime/branch-observations.d.ts +19 -19
  111. package/dist/agent-runtime/sql-rows.d.ts +10 -10
  112. package/dist/agent-runtime/store-conformance-lifecycle.d.ts +20 -20
  113. package/dist/agent-runtime/store-conformance-support.d.ts +10 -10
  114. package/dist/agent-runtime/terminal-commit.d.ts +10 -10
  115. package/dist/entrypoints/agent-executor/acp.d.ts +2 -1
  116. package/dist/entrypoints/agent-executor/acp.d.ts.map +1 -1
  117. package/dist/entrypoints/agent-executor/acp.js +284 -82
  118. package/dist/entrypoints/agent-executor/claude-sdk.d.ts +4 -0
  119. package/dist/entrypoints/agent-executor/claude-sdk.d.ts.map +1 -1
  120. package/dist/entrypoints/agent-executor/claude-sdk.js +58 -32
  121. package/dist/entrypoints/agent-executor/claude.d.ts +2 -2
  122. package/dist/entrypoints/agent-executor/claude.d.ts.map +1 -1
  123. package/dist/entrypoints/agent-executor/claude.js +25 -20
  124. package/dist/entrypoints/agent-executor/codex.d.ts +9 -5
  125. package/dist/entrypoints/agent-executor/codex.d.ts.map +1 -1
  126. package/dist/entrypoints/agent-executor/codex.js +1724 -1557
  127. package/dist/entrypoints/agent-executor/testing.d.ts +4 -0
  128. package/dist/entrypoints/agent-executor/testing.d.ts.map +1 -1
  129. package/dist/entrypoints/agent-executor/testing.js +880 -18
  130. package/dist/entrypoints/agent-executor.d.ts +3 -3
  131. package/dist/entrypoints/agent-executor.d.ts.map +1 -1
  132. package/dist/entrypoints/agent-executor.js +42 -8
  133. package/dist/entrypoints/process.js +3 -3
  134. package/dist/{index-jrn3prgm.js → index-32vaajec.js} +29 -4
  135. package/dist/{index-p1qmpq0p.js → index-64e9p079.js} +92 -56
  136. package/dist/{index-dbp6xemn.js → index-g2d9kws8.js} +199 -3
  137. package/dist/index-gm9yz82v.js +56 -0
  138. package/dist/index-j15dhkda.js +749 -0
  139. package/dist/{index-1q0n6zek.js → index-kwsr7j5k.js} +84 -44
  140. package/llms/agent-executor-acp.txt +5 -5
  141. package/llms/agent-executor-claude-sdk.txt +3 -1
  142. package/llms/agent-executor-claude.txt +2 -2
  143. package/llms/agent-executor-codex.txt +11 -8
  144. package/llms/agent-executor-testing.txt +5 -1
  145. package/llms/agent-executor.txt +4 -4
  146. package/llms/stitchkit.txt +75 -74
  147. package/llms/{upgrading-0.128.0-0.130.0.txt → upgrading-0.128.0-0.131.0.txt} +56 -3
  148. package/llms/upgrading.txt +1 -1
  149. package/llms-full.txt +158 -95
  150. package/llms.txt +8 -8
  151. package/package.json +3 -3
  152. package/dist/index-2s8sy57y.js +0 -229
@@ -1,17 +1,22 @@
1
1
  import {
2
2
  assertTimerMs
3
3
  } from "./index-agy5fqgf.js";
4
+ import {
5
+ abortReason
6
+ } from "./index-rptj3qnc.js";
4
7
 
5
8
  // src/agent-executor/json-rpc-peer.ts
6
9
  import { z } from "zod";
10
+ var JsonRpcValueSchema2 = z.json();
11
+ var JsonRpcRecordSchema2 = z.record(z.string(), JsonRpcValueSchema2);
7
12
  var IdSchema = z.union([z.string(), z.int()]);
8
13
  var MessageSchema = z.looseObject({
9
14
  jsonrpc: z.literal("2.0").optional(),
10
15
  id: IdSchema.optional(),
11
16
  method: z.string().optional(),
12
- params: z.json().optional(),
13
- result: z.json().optional(),
14
- error: z.looseObject({ code: z.int(), message: z.string(), data: z.json().optional() }).optional()
17
+ params: JsonRpcValueSchema2.optional(),
18
+ result: JsonRpcValueSchema2.optional(),
19
+ error: z.looseObject({ code: z.int(), message: z.string(), data: JsonRpcValueSchema2.optional() }).optional()
15
20
  });
16
21
 
17
22
  class JsonRpcError2 extends Error {
@@ -48,6 +53,25 @@ function parseJsonValue(value) {
48
53
  return { ok: false, message: errorMessage(error) };
49
54
  }
50
55
  }
56
+ function buildAnswerPayload(id, outcome) {
57
+ if ("result" in outcome) {
58
+ const checked = parseJsonValue(outcome.result);
59
+ if (!checked.ok) {
60
+ return { id, error: { code: JSON_RPC_INTERNAL_ERROR, message: checked.message } };
61
+ }
62
+ return { id, result: checked.value };
63
+ }
64
+ const code = Number.isSafeInteger(outcome.error.code) ? outcome.error.code : JSON_RPC_INTERNAL_ERROR;
65
+ const message = typeof outcome.error.message === "string" ? outcome.error.message : "Internal error";
66
+ if (outcome.error.data === undefined) {
67
+ return { id, error: { code, message } };
68
+ }
69
+ const checked = parseJsonValue(outcome.error.data);
70
+ if (!checked.ok) {
71
+ return { id, error: { code: JSON_RPC_INTERNAL_ERROR, message: checked.message } };
72
+ }
73
+ return { id, error: { code, message, data: checked.value } };
74
+ }
51
75
  function createJsonRpcPeer2(config) {
52
76
  assertTimerMs("requestTimeoutMs", config.requestTimeoutMs, { absent: "refused" });
53
77
  let nextId = 1;
@@ -67,33 +91,7 @@ function createJsonRpcPeer2(config) {
67
91
  const answer = (id, outcome) => {
68
92
  if (closed)
69
93
  return;
70
- if ("result" in outcome) {
71
- const checked = parseJsonValue(outcome.result);
72
- if (!checked.ok) {
73
- sendResponse({
74
- id,
75
- error: { code: JSON_RPC_INTERNAL_ERROR, message: checked.message }
76
- });
77
- return;
78
- }
79
- sendResponse({ id, result: checked.value });
80
- return;
81
- }
82
- const code = Number.isSafeInteger(outcome.error.code) ? outcome.error.code : JSON_RPC_INTERNAL_ERROR;
83
- const message = typeof outcome.error.message === "string" ? outcome.error.message : "Internal error";
84
- if (outcome.error.data === undefined) {
85
- sendResponse({ id, error: { code, message } });
86
- return;
87
- }
88
- const checked = parseJsonValue(outcome.error.data);
89
- if (!checked.ok) {
90
- sendResponse({
91
- id,
92
- error: { code: JSON_RPC_INTERNAL_ERROR, message: checked.message }
93
- });
94
- return;
95
- }
96
- sendResponse({ id, error: { code, message, data: checked.value } });
94
+ sendResponse(buildAnswerPayload(id, outcome));
97
95
  };
98
96
  return {
99
97
  request(method, params, options) {
@@ -105,22 +103,68 @@ function createJsonRpcPeer2(config) {
105
103
  return Promise.reject(error);
106
104
  }
107
105
  }
106
+ const signal = options?.signal;
107
+ if (signal?.aborted)
108
+ return Promise.reject(abortReason(signal));
108
109
  if (closed)
109
110
  return Promise.reject(closedBy);
110
111
  const id = nextId++;
111
112
  return new Promise((resolve, reject) => {
112
- const timer = timeoutMs === null ? undefined : setTimeout(() => {
113
+ let settled = false;
114
+ let timer;
115
+ const onAbort = () => {
116
+ if (settled)
117
+ return;
118
+ settled = true;
119
+ cleanup();
113
120
  pending.delete(id);
114
- reject(new JsonRpcError2(JSON_RPC_LOCAL_TIMEOUT2, `${method} had no answer within ${timeoutMs} ms`));
115
- }, timeoutMs);
116
- pending.set(id, { resolve, reject, timer });
121
+ if (signal !== undefined)
122
+ reject(abortReason(signal));
123
+ };
124
+ const cleanup = () => {
125
+ if (timer !== undefined) {
126
+ clearTimeout(timer);
127
+ timer = undefined;
128
+ }
129
+ signal?.removeEventListener("abort", onAbort);
130
+ };
131
+ if (timeoutMs !== null) {
132
+ timer = setTimeout(() => {
133
+ if (settled)
134
+ return;
135
+ settled = true;
136
+ cleanup();
137
+ pending.delete(id);
138
+ reject(new JsonRpcError2(JSON_RPC_LOCAL_TIMEOUT2, `${method} had no answer within ${timeoutMs} ms`));
139
+ }, timeoutMs);
140
+ }
141
+ signal?.addEventListener("abort", onAbort, { once: true });
142
+ pending.set(id, {
143
+ resolve: (value) => {
144
+ if (settled)
145
+ return;
146
+ settled = true;
147
+ cleanup();
148
+ resolve(value);
149
+ },
150
+ reject: (error) => {
151
+ if (settled)
152
+ return;
153
+ settled = true;
154
+ cleanup();
155
+ reject(error);
156
+ },
157
+ cleanup
158
+ });
117
159
  try {
118
160
  write({ id, method, ...params !== undefined && { params } });
119
161
  } catch (error) {
120
- if (timer !== undefined)
121
- clearTimeout(timer);
122
- pending.delete(id);
123
- reject(error);
162
+ if (!settled) {
163
+ settled = true;
164
+ cleanup();
165
+ pending.delete(id);
166
+ reject(error);
167
+ }
124
168
  }
125
169
  });
126
170
  },
@@ -143,7 +187,7 @@ function createJsonRpcPeer2(config) {
143
187
  });
144
188
  return;
145
189
  }
146
- Promise.resolve().then(() => onRequest(method, message.params, id)).then((result) => answer(id, { result }), (error) => answer(id, {
190
+ new Promise((resolve) => resolve(onRequest(method, message.params, id))).then((result) => answer(id, { result }), (error) => answer(id, {
147
191
  error: error instanceof JsonRpcError2 ? error : new JsonRpcError2(JSON_RPC_INTERNAL_ERROR, errorMessage(error))
148
192
  }));
149
193
  return;
@@ -158,8 +202,6 @@ function createJsonRpcPeer2(config) {
158
202
  if (waiter === undefined)
159
203
  return;
160
204
  pending.delete(message.id);
161
- if (waiter.timer !== undefined)
162
- clearTimeout(waiter.timer);
163
205
  if (message.error !== undefined) {
164
206
  waiter.reject(new JsonRpcError2(message.error.code, message.error.message, message.error.data));
165
207
  } else {
@@ -172,8 +214,6 @@ function createJsonRpcPeer2(config) {
172
214
  closed = true;
173
215
  closedBy = reason;
174
216
  for (const [id, waiter] of pending) {
175
- if (waiter.timer !== undefined)
176
- clearTimeout(waiter.timer);
177
217
  pending.delete(id);
178
218
  waiter.reject(reason);
179
219
  }
@@ -181,4 +221,4 @@ function createJsonRpcPeer2(config) {
181
221
  };
182
222
  }
183
223
 
184
- export { JsonRpcError2, JSON_RPC_METHOD_NOT_FOUND2, JSON_RPC_LOCAL_TIMEOUT2, createJsonRpcPeer2 };
224
+ export { JsonRpcValueSchema2, JsonRpcRecordSchema2, JsonRpcError2, JSON_RPC_METHOD_NOT_FOUND2, JSON_RPC_LOCAL_TIMEOUT2, createJsonRpcPeer2 };
@@ -31,11 +31,11 @@ approvals for unprompted tool calls. Explicit `approve` supports `scope: 'once'`
31
31
 
32
32
  | Export | Kind | Purpose |
33
33
  |--------|------|---------|
34
- | `createAcpDriver` / `AcpDriver` / `AcpDriverConfig` | function / _types_ | the driver (`approvalEnforcement: 'agent-initiated'`): `executable` and `args`; optional `clientInfo`, `sessionMeta`, `stdoutLineFilter`, `probeMode` (`'ephemeral-session' \| 'initialize-only' \| 'passive'`) / `passiveVersion`, `model` / `thoughtLevel` / `mode` (also overridable per open via `AcpOpenInput`, falling back to `session/set_model`), `mcpServers`, `transformUpdate`, post-settle `onUpdate` / `onPermissionRequest`, `onDisconnect`, `watchPromptOutcome`, `usageInputIncludesCachedRead`, `steerMode` (`'none' \| 'prompt'`), `resolveFile`, `maxImageBytes` (5 MiB), `maxFrameBytes` (8 MiB), `ambient`, and `requestTimeoutMs` (60 s, capping `session/close` / `session/delete` to at most 5 s) |
35
- | `AcpSession` / `AcpOpenInput` / `AcpSteerTurnInput` / `AcpConfigOption` / `AcpApprovalEnforcement` | _types_ | a session's settings, title and commands, `approvalEnforcement` (`'agent-initiated'`), `setConfigOption(category or id, value)`, `respond(interactionId, reply)` for post-settle permissions, `steerTurn(input)` when `steerMode: 'prompt'`, and per-open overrides on `AcpOpenInput` |
36
- | `AcpProbeMode` / `AcpSteerMode` / `AcpSessionMetaInput` / `AcpWatchPromptOutcome` / `AcpPromptOutcomeOverride` | _types_ | probe strategy, steer mode, static or `initialize`-derived `_meta` attachment on session open, and prompt-outcome verification hook reclassifying masked `end_turn` failures with `errorKind` and `threadDisposition` |
37
- | `AcpTransformUpdate` / `AcpUpdateEvent` / `AcpPermissionRequestEvent` | _types_ | update normalizer (`transformUpdate`), live/post-settle `session/update` observer payload (`onUpdate`), and out-of-turn permission request payload with `respond()` (`onPermissionRequest`) |
38
- | `AcpClientInfoSchema` / `AcpClientInfo` / `AcpInitializeResult` / `AcpSessionUpdate` / `AcpPromptResult` / `AcpPromptUsage` / `AcpPermissionRequest` / `AcpPermissionOption` | schema / _types_ | typed ACP v1 wire payloads exposed to `sessionMeta`, `transformUpdate`, `onUpdate`, `onPermissionRequest`, and `watchPromptOutcome` |
34
+ | `createAcpDriver` / `AcpDriver` / `AcpDriverConfig` | function / _types_ | the driver (`approvalEnforcement: 'agent-initiated'`): `executable` and `args`; optional `clientInfo`, `sessionMeta`, `stdoutLineFilter`, `probeMode` (`'ephemeral-session' \| 'initialize-only' \| 'passive'`) / `passiveVersion`, `model` / `thoughtLevel` / `mode` (also overridable per open via `AcpOpenInput`, falling back to `session/set_model`), `mcpServers`, `transformUpdate`, post-settle `onUpdate` / `onPermissionRequest`, `permissionRequestDelivery` (`'external-only' \| 'all'`), `onProviderPid` (fired during `open()`), `onDisconnect`, `watchPromptOutcome`, `usageInputIncludesCachedRead`, `steerMode` (`'none' \| 'prompt'`), `resolveFile`, `maxImageBytes` (5 MiB), `maxFrameBytes` (8 MiB), `ambient`, and `requestTimeoutMs` (60 s, capping `session/close` / `session/delete` to at most 5 s); exposes `probeCapabilities(AcpProbeCapabilitiesInput)` for non-inference capability probing |
35
+ | `AcpSession` / `AcpOpenInput` / `AcpSteerTurnInput` / `AcpConfigOption` / `AcpConfigOptionChoice` / `acpOptionChoices` / `acpOptionValues` / `AcpApprovalEnforcement` | _types_ / functions | a session's `providerPid`, settings, title and commands, `approvalEnforcement` (`'agent-initiated'`), `setConfigOption(category or id, value)`, `respond(interactionId, reply)` for pending permissions, `steerTurn(input)` when `steerMode: 'prompt'`, per-open overrides on `AcpOpenInput`, and flat/grouped config-option flattening helpers (`acpOptionChoices`, `acpOptionValues`) |
36
+ | `AcpProbeCapabilitiesInput` / `AcpCapabilitiesProbe` / `AcpProbeMode` / `AcpSteerMode` / `AcpSessionMetaInput` / `AcpWatchPromptOutcome` / `AcpPromptOutcomeOverride` | _types_ | non-inference capability probe input/result (running regardless of `probeMode` and calling both `session/close` and `session/delete` in `finally`), probe strategy, steer mode, static or `initialize`-derived `_meta` attachment on session open, and prompt-outcome verification hook reclassifying masked `end_turn` failures with `errorKind` and `threadDisposition` |
37
+ | `AcpTransformUpdate` / `AcpUpdateEvent` / `AcpPermissionRequestEvent` | _types_ | update normalizer (`transformUpdate`), live/post-settle `session/update` observer payload (`onUpdate`), and permission request payload with `duringActiveTurn`, full typed `request.options`, and shared single-shot `respond()` (`onPermissionRequest`) |
38
+ | `AcpClientInfoSchema` / `AcpClientInfo` / `AcpInitializeResultSchema` / `AcpInitializeResult` / `AcpConfigOptionSchema` / `AcpSessionUpdateSchema` / `AcpSessionUpdate` / `AcpPromptResult` / `AcpPromptUsage` / `AcpPermissionRequestSchema` / `AcpPermissionRequest` / `AcpPermissionOptionSchema` / `AcpPermissionOption` | schemas / _types_ | loose Zod schemas and typed ACP v1 wire payloads exposed to `sessionMeta`, `transformUpdate`, `onUpdate`, `onPermissionRequest`, and `watchPromptOutcome` |
39
39
  | `AcpSessionSummary` | _type_ | a session the agent keeps: id, working directory, title, last update |
40
40
  | `AcpMcpServerSchema` / `AcpMcpServer` | schema / _type_ | an MCP server as ACP v1 names it: a command with arguments and environment, or an `http`/`sse` URL with headers |
41
41
  | `ACP_PROTOCOL_VERSION` | constant | `1`; ACP v1 agents answering `protocolVersion >= 1` are accepted while protocol `< 1` and ACP v2 responses carrying `"info"` are refused at hello |
@@ -27,10 +27,12 @@ profile's transcript. Evolving.
27
27
  | Export | Kind | Purpose |
28
28
  |--------|------|---------|
29
29
  | `createClaudeSdkDriver` / `ClaudeSdkDriver` / `ClaudeSdkDriverConfig` | function / _types_ | the driver: `query` and `sdkVersion` required; optional `forkSession`, `model`, `permissionMode` (default `default`), `allowDangerouslySkipPermissions`, `pathToClaudeCodeExecutable`, `systemPrompt`, `settingSources`, `enableFileCheckpointing`, `supportedDialogKinds` / `onUserDialog`, `hooks`, `tools`, `allowedTools`, `disallowedTools`, `mcpServers`, `mcpServersDelivery`, `strictMcpConfig`, `plugins`, `agents`, `extraArgs`, `stderr`, `spawnClaudeCodeProcess`, `onProviderPid`, `onQueryExit`, `onElicitation`, `onPermissionRequest`, `onEvent`, `onTurnUsage`, `verifyDelegation`, `resolveFile`, `maxImageBytes` (default 5 MiB), and `ambient`. Exposes `probeCapabilities(input)` for isolated never-yielding capability probes, `status` over passive `rate_limit_event` or active `readUsage()`, and `forkSession(sessionId, options?)` |
30
- | `ClaudeSdkSession` / `ClaudeSdkOpenInput` / `ClaudeSdkUsageRead` / `ClaudeSdkQueryExitContext` / `ClaudeSdkPermissionRequestMeta` | _types_ | extended session returned by `open(ClaudeSdkOpenInput)` (supporting `resumeSessionAt`, `resumeDropsTurn`, and `onStartupPhase`): exposes `providerPid`, `readUsage(opts?)`, `setModel`, `setPermissionMode`, `applyFlagSettings`, `initializationResult`, `supportedModels`, `supportedCommands`, `accountInfo`, `getContextUsage`, `mcpServerStatus`, `toggleMcpServer`, `reconnectMcpServer`, `setMcpServers`, `stopTask`, `backgroundTasks`, and `rewindFiles`; supports `approve` with `updatedInput` for `AskUserQuestion` and emits `ClaudeSdkPermissionRequestMeta` (`toolName`, `toolUseID`, `turnId`, `interactionId`, `input`, `decisionReason`, `blockedPath`, `suggestions`, `requestId`, `title`, `displayName`, `description`, `agentID`, `mcpServer`, `defaultToNo`, `suppressAlwaysAllowRule`, `matchedAskRule`) to `onPermissionRequest` |
30
+ | `ClaudeSdkSession` / `ClaudeSdkOpenInput` / `ClaudeSdkUsageRead` / `ClaudeSdkQueryExitContext` / `ClaudeSdkPermissionRequestMeta` / `ClaudeSdkFlagSettings` | _types_ | extended session returned by `open(ClaudeSdkOpenInput)` (supporting `resumeSessionAt`, `resumeDropsTurn`, and `onStartupPhase`): exposes `providerPid`, `readUsage(opts?)`, `setModel`, `setPermissionMode` (returning `SDKControlSetPermissionModeResponse \| undefined`), `applyFlagSettings(ClaudeSdkFlagSettings)`, `initializationResult`, `supportedModels`, `supportedCommands`, `accountInfo`, `getContextUsage`, `mcpServerStatus`, `toggleMcpServer`, `reconnectMcpServer`, `setMcpServers`, `stopTask`, `backgroundTasks`, and `rewindFiles`; supports `approve` with `updatedInput` for `AskUserQuestion` and emits `ClaudeSdkPermissionRequestMeta` (`input: Readonly<Record<string, JsonRpcValue>>`) to `onPermissionRequest` |
31
31
  | `ClaudeRuntimeEventSchema` / `ClaudeRuntimeEvent` / `ClaudeTaskUsageSchema` / `ClaudeTaskUsage` / `ClaudeSdkTurnUsageSchema` / `ClaudeSdkTurnUsage` / `ClaudeSdkTokenPairSchema` / `ClaudeSdkTokenPair` | schemas / _types_ | structured runtime events delivered to `onEvent` during and after turns (`task_started`, `task_updated`, `task_progress`, `task_notification`, `background_tasks_changed`, `tool_progress`, `api_retry`, `elicitation_complete`) alongside `compact_boundary` → `window { reset: 'context' }`, plus per-turn additive `modelUsage` deltas and `otherUsage` delivered to `onTurnUsage` |
32
32
  | `ClaudeSdkProbeCapabilitiesInput` / `ClaudeSdkCapabilitiesProbe` | _types_ | input and result shapes for `driver.probeCapabilities(input)`: runs an isolated never-yielding SDK query to inspect models, commands, account info, and optional usage, always closing the query in `finally` |
33
33
  | `ClaudeSdkDelegationCheck` | _type_ | fail-closed startup verification options (`requireHooksApplied`, `requireNoMcpServers`, `timeoutMs`) enforced at `open()` and on every query restart |
34
34
  | `ClaudeSdkQuery` / `ClaudeSdkRun` / `ClaudeSdkForkSession` | _types_ | the SDK `query` / `forkSession` signatures the leaf takes and the subset of a running `Query` it uses; the SDK's own functions fit as they are |
35
+ | `AccountInfo` / `EffortLevel` / `ForkSessionOptions` / `ForkSessionResult` / `McpServerStatus` / `McpSetServersResult` / `ModelInfo` / `PermissionMode` / `RewindFilesResult` / `SDKControlGetContextUsageResponse` / `SDKControlGetUsageResponse` / `SDKControlInitializeResponse` / `SDKControlSetPermissionModeResponse` / `SlashCommand` | _types_ | type-only re-exports of the `@anthropic-ai/claude-agent-sdk` types referenced in `ClaudeSdkSession` and `ClaudeSdkDriver` signatures |
36
+ | `claudeUsagePlanLimits` / `claudeTranscriptHasUuid` / `findTranscriptInput` | functions | direct offline transcript reconciliation and open-bucket Claude usage plan-limit helpers shared with `stitchkit/agent-executor/claude` |
35
37
 
36
38
  ---
@@ -23,7 +23,7 @@ Evolving.
23
23
  |--------|------|---------|
24
24
  | `createClaudeCliDriver` / `ClaudeCliDriverConfig` | function / _type_ | the driver; `permissionMode` defaults to `default`, so the server decides every tool the profile does not already allow; optional `resolveFile` and `maxImageBytes` (default 5 MiB) enable ordered turn-input image attachments |
25
25
  | `claudeFakeScenarios` | constant | the conformance scenarios in this dialect, for a scripted engine |
26
- | `claudeTranscriptPath` | function | where a profile keeps a session's transcript (`{ home, cwd, sessionId }`), resolving `realpath` of `cwd` (or its nearest existing ancestor) so symlinked workspaces match the canonical transcript location |
27
- | `claudePlanWindows` | function | Claude's `rate_limit_event` as plan windows (`five_hour`, `seven_day`) |
26
+ | `claudeTranscriptPath` / `claudeTranscriptHasUuid` / `findTranscriptInput` | functions | offline Claude transcript path resolution (resolving `realpath` of `cwd` or its nearest existing ancestor) and bounded streaming UUID lookup / reconciliation without instantiating a driver |
27
+ | `claudePlanWindows` / `claudeUsagePlanLimits` | functions | Claude's `rate_limit_event` windows and open-bucket usage / `/api/oauth/usage` `PlanLimits` mapping (preserving `plan`) |
28
28
 
29
29
  ---
@@ -20,16 +20,19 @@ WebSocket-over-Unix-socket (`unix-listen` / `unix-connect`). Evolving.
20
20
  | Export | Kind | Purpose |
21
21
  |--------|------|---------|
22
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`, `serverRequestDelivery` `'external-only' \| 'all'`, `onDisconnect`), `maxFrameBytes` (WebSocket/stdio frame ceiling), 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
- | `CodexTransportConfig` | _type_ | transport selector: `{ kind: 'stdio' }`, `{ kind: 'unix-listen', socketPath, listenTimeoutMs? }`, or `{ kind: 'unix-connect', socketPath, expectedOwnerUid? }` |
24
- | `CodexSession` / `CodexControlClient` / `CodexControlConnection` / `CodexControlConnectInput` | _types_ | extended session returned by `open()` and threadless connection returned by `connectControl()`: expose `providerPid`, `userAgent` (from `initialize`), `respond`, `readConfig`, `readThread`, `resumeThread`, `interruptTurn`, `steerTurn`, `compactThread`, `listThreads`, `listLoadedThreads`, `listCollaborationModes`, `listTurns`, `listItems`, `archiveThread`, `unarchiveThread`, `unsubscribeThread`, `setThreadName`, `updateThreadMetadata`, `revertThread`, `injectItems`, `listMcpServerStatus`, `listSkills`, `listModels`, `readAccount`, and `readRateLimits`; `CodexSession` also exposes `threadContext`, `startTurn` (returning `CodexTurn`), and non-mutating `forkThread` |
23
+ | `CodexTransportConfig` | _type_ | transport selector: `{ kind: 'stdio' }`, `{ kind: 'unix-listen', socketPath, listenTimeoutMs? }`, or `{ kind: 'unix-connect', socketPath, expectedOwnerUid? }` (resolving symlink chains on parent directories safely across Linux and Darwin) |
24
+ | `CodexSession` / `CodexControlClient` / `CodexControlConnection` / `CodexControlConnectInput` / `CodexRpcCallOptions` | _types_ | extended session returned by `open()` and threadless connection returned by `connectControl()`: expose `providerPid`, `userAgent` (from `initialize`), `respond`, `readConfig`, `readThread`, `resumeThread`, `startThreadTurn` (threadless `turn/start` without occupying a local session turn slot), `interruptTurn`, `steerTurn`, `compactThread`, `listThreads`, `listLoadedThreads`, `listCollaborationModes`, `listTurns`, `listItems`, `archiveThread`, `unarchiveThread`, `unsubscribeThread`, `setThreadName`, `updateThreadMetadata`, `revertThread`, `injectItems`, `listMcpServerStatus`, `listSkills`, `listModels`, `readAccount`, and `readRateLimits`, each accepting optional per-call `CodexRpcCallOptions` (`{ timeoutMs?, signal? }`); `CodexSession` also exposes `threadContext`, `startTurn` (returning `CodexTurn`), and non-mutating `forkThread` |
25
25
  | `CodexSharedServer` / `CodexSharedServerOpenInput` / `CodexSharedServerThreadInput` | _types_ | opt-in headless `stdio` multi-thread server returned by `driver.openSharedServer()` exposing `userAgent` and 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` / `CodexResumeThreadParams` / `CodexListThreadsParams` / `CodexListLoadedThreadsParams` / `CodexListTurnsParams` / `CodexListItemsParams` / `CodexThreadItemsCursor` / `CodexThreadItemsDeferOutput` / `CodexThreadSortKey` / `CodexThreadSourceKind` | _types_ | typed parameters for `thread/read`, `thread/resume` (`excludeTurns` defaulting to `true` plus policy overrides), `thread/list`, `thread/loaded/list`, `thread/turns/list` (nullable `cursor`), and `thread/items/list` (nullable `cursor`) |
27
- | `CodexThreadIdParams` / `CodexInterruptTurnParams` / `CodexControlSteerTurnParams` / `CodexSetThreadNameParams` / `CodexUpdateThreadMetadataParams` / `CodexThreadGitInfoUpdate` / `CodexRevertThreadParams` / `CodexRevertThreadResult` / `CodexInjectItemsParams` | _types_ | typed parameters and results for thread lifecycle (`archive`, `unarchive`, `unsubscribe`, `compact/start`, `name/set`, `metadata/update`), arbitrary-turn `turn/interrupt` (`interruptTurn`), cross-connection `turn/steer` (`steerTurn`), 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`, carrying `requestId` and `duringActiveTurn`) 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 (including raw `thread`) reported by `thread/start`, `thread/resume`, or `thread/fork`, and overridable thread policy fields |
30
- | `CodexTurn` / `CodexTurnInput` / `CodexTurnInputPart` / `CodexLocalImageInputSchema` / `CodexLocalImageInput` / `CodexSkillInputSchema` / `CodexSkillInput` / `CodexCollaborationMode` / `CodexSteerTurnInput` / `CodexForkThreadOptions` / `CodexForkedThread` | schemas / _types_ | `CodexTurn` (`nativeTurnId` from `turn/start`), per-turn `startTurn` overrides (`cwd`, `model`, fail-closed `modelProvider`, `reasoningEffort`, `collaborationMode`, `approvalPolicy`, `sandboxPolicy`, `runtimeWorkspaceRoots`), ordered text / image / `localImage` (`{ type: 'localImage', path }`) / `skill` (`{ type: 'skill', name, path }`) turn and steer inputs, and `forkThread` options/result (including `deferGoalContinuation`) |
26
+ | `CodexReadThreadParams` / `CodexResumeThreadParams` / `CodexListThreadsParams` / `CodexListLoadedThreadsParams` / `CodexListTurnsParams` / `CodexListItemsParams` / `CodexThreadItemsCursor` / `CodexThreadItemsDeferOutput` / `CodexThreadSortKey` / `CodexThreadSourceKind` / `CodexThreadSourceKindSchema` / `CODEX_THREAD_SOURCE_KINDS` | schemas / constant / _types_ | typed parameters and source-kind vocabulary for `thread/read`, `thread/resume` (`excludeTurns` defaulting to `true` plus policy overrides), `thread/list`, `thread/loaded/list`, `thread/turns/list` (nullable `cursor`), and `thread/items/list` (nullable `cursor`) |
27
+ | `CodexThreadIdParams` / `CodexControlStartTurnParams` / `CodexInterruptTurnParams` / `CodexControlSteerTurnParams` / `CodexSetThreadNameParams` / `CodexUpdateThreadMetadataParams` / `CodexThreadGitInfoUpdate` / `CodexRevertThreadParams` / `CodexRevertThreadResult` / `CodexInjectItemsParams` | _types_ | typed parameters and results for thread lifecycle (`archive`, `unarchive`, `unsubscribe`, `compact/start`, `name/set`, `metadata/update`), threadless `turn/start` (`startThreadTurn`), arbitrary-turn `turn/interrupt` (`interruptTurn`), cross-connection `turn/steer` (`steerTurn`), history rollback (`thread/revert` via `revertThread`), and item injection (`thread/inject_items` via `injectItems`) |
28
+ | `CodexProtocolError` / `CodexConfigReadResponseSchema` / `CodexConfigReadResponse` / `CodexConfigSchema` / `CodexReadThreadResponseSchema` / `CodexReadThreadResponse` / `CodexResumeThreadResponseSchema` / `CodexResumeThreadResponse` / `CodexCollaborationModesResponseSchema` / `CodexCollaborationModesResponse` / `CodexCollaborationModePresetSchema` / `CodexItemsPageSchema` / `CodexItemsPage` / `CodexThreadItemEntrySchema` / `CodexThreadItemEntry` / `CodexMcpServerStatusPageSchema` / `CodexMcpServerStatusPage` / `CodexMcpServerStatusSchema` / `CodexSkillsListResponseSchema` / `CodexSkillsListResponse` / `CodexModelsPageSchema` / `CodexModelsPage` / `CodexModelSchema` / `CodexModel` / `CodexAccountReadResponseSchema` / `CodexAccountReadResponse` / `CodexAccountSchema` / `CodexAccount` / `CodexRateLimitsResponseSchema` / `CodexRateLimitsResponse` / `CodexRateLimitSnapshotSchema` / `CodexRateLimitWindowSchema` / `CodexThreadsPageSchema` / `CodexThreadsPage` / `CodexLoadedThreadsPageSchema` / `CodexLoadedThreadsPage` / `CodexThreadUnsubscribeResponseSchema` / `CodexThreadUnsubscribeResponse` / `CodexThreadUnsubscribeStatusSchema` / `CodexThreadUnarchiveResponseSchema` / `CodexThreadUnarchiveResponse` / `CodexThreadMetadataUpdateResponseSchema` / `CodexThreadMetadataUpdateResponse` | class / schemas / _types_ | Zod-first loose response DTOs validated at every `CodexControlClient` boundary (preserving unknown extra fields and open future variants while throwing `CodexProtocolError` on malformed payloads) |
29
+ | `CodexThreadSchema` / `CodexThread` / `CodexThreadStatusSchema` / `CodexThreadStatus` / `CodexThreadContextSchema` / `CodexThreadContext` / `CodexThreadItemSchema` / `CodexThreadItem` / `CodexTurnsPageSchema` / `CodexTurnsPage` / `CodexListedTurnSchema` / `CodexListedTurn` / `CodexTurnStatusSchema` / `CodexTurnStatus` / `CodexTurnItemsViewSchema` / `CodexTurnItemsView` / `CodexApprovalPolicySchema` / `CodexApprovalPolicy` / `CodexSandboxModeSchema` / `CodexSandboxMode` / `CodexSandboxPolicySchema` / `CodexSandboxPolicy` / `CodexCollaborationModeSchema` / `CodexCollaborationMode` / `CODEX_TOOL_ITEMS` | schemas / constant / _types_ | core Codex protocol schemas and open-variant types (`CodexThreadStatus`, `CodexSandboxPolicy`, `CodexTurnItemsView`, `CodexListedTurn` carrying `itemsView` and `startedAt`/`completedAt`/`durationMs`/`rootTurnId`, plus `CODEX_TOOL_ITEMS`) |
30
+ | `parseCodexNotification` / `CodexNotificationParams` / `CodexNotificationMethod` / `CodexParsedNotification` / `CodexNotificationEvent` / `CodexServerRequestEvent` / `CodexServerRequestMethod` / `CodexMcpElicitationMode` | function / constant / _types_ | discriminated parser for all 14 documented Codex server notifications (including quiet lifecycle notifications; returns `null` for unknown methods and throws `CodexProtocolError` on malformed known payloads) plus observer event payloads for notifications and the 5 handled v2 server requests (`item/commandExecution/requestApproval`, `item/fileChange/requestApproval`, `item/permissions/requestApproval`, `item/tool/requestUserInput`, `mcpServer/elicitation/request`, carrying `requestId` and `duringActiveTurn`) |
31
+ | `iterateCodexPages` / `IterateCodexPagesOptions` / `IterateCodexPagesResult` / `CodexPageCursorResult` / `findCodexTurnByClientId` / `FindCodexTurnByClientIdParams` | functions / _types_ | bounded cursor pagination helper (empty-string cursor support, repeated-cursor loop protection, `AbortSignal`) and streaming live-connection turn lookup by `clientId` (failing closed on incomplete `itemsView` or page-ceiling exhaustion) |
32
+ | `CodexOpenInput` / `CodexOpenForkOptions` / `CodexThreadPolicyOverrides` | _types_ | `open()` input (including opening directly through `thread/fork` via `forkFrom` with `deferGoalContinuation`) and overridable thread policy fields |
33
+ | `CodexTurn` / `CodexTurnInput` / `CodexTurnInputPart` / `CodexLocalImageInputSchema` / `CodexLocalImageInput` / `CodexSkillInputSchema` / `CodexSkillInput` / `CodexSteerTurnInput` / `CodexForkThreadOptions` / `CodexForkedThread` | schemas / _types_ | `CodexTurn` (`nativeTurnId` from `turn/start`), per-turn `startTurn` overrides (`cwd`, `model`, fail-closed `modelProvider`, `reasoningEffort`, `collaborationMode`, `approvalPolicy`, `sandboxPolicy`, `runtimeWorkspaceRoots`), ordered text / image / `localImage` (`{ type: 'localImage', path }`) / `skill` (`{ type: 'skill', name, path }`) turn and steer inputs, and `forkThread` options/result (including `deferGoalContinuation`) |
31
34
  | `CodexUnixSocketError` / `CodexUnixSocketErrorKind` | class / _type_ | typed Unix-socket refusal/transport error distinguishing `endpoint-absent`, `endpoint-not-listening`, `target-refused`, `upgrade-refused`, and `connection-lost` |
32
35
  | `codexFakeScenarios` | constant | the conformance scenarios in this dialect, for a scripted app-server |
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` |
36
+ | `codexPlanWindows` / `codexPlanLimits` | functions | unfolds Codex's `account/rateLimits/read` envelope (camelCase or snake_case rollout `token_count`, seconds/ms/ISO `resetsAt`, `plan_type`) into `PlanWindow[]` or full `PlanLimits` |
34
37
 
35
38
  ---
@@ -21,8 +21,12 @@ Also read:
21
21
  | `createReplayGate` / `ReplayGate` | function / _type_ | deterministic label-based synchronization gate pausing `{ kind: 'gate', label }` steps until `waitForReached` / `release` without timers |
22
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
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 |
24
+ | `createFakeCodexAppServer` / `FakeCodexAppServer` / `FakeCodexAppServerConfig` / `FakeCodexRpcHandler` / `FakeCodexRpcHandlerOutcome` / `FakeCodexRpcErrorOutcome` / `RecordedJsonRpcRequest` | function / _types_ | portable (Bun and Node.js) real Unix-socket WebSocket JSON-RPC fake Codex app-server for integration tests with `createCodexDriver({ transport: { kind: 'unix-connect' } })`: automatic `initialize` handshake, `'hang'` / DTO / RPC error handlers, `requests` recording, `sendNotification`, `sendRequest`, `sendRaw`, `disconnect()`, and idempotent `close()` |
25
+ | `createFakeClaudeSdkQuery` / `FakeClaudeSdkQueryConfig` / `FakeClaudeSdkQueryHarness` / `FakeClaudeSdkRunController` / `FakeClaudeSdkScriptedTurn` / `FakeClaudeSdkRecordedCall` | function / _types_ | scripted multi-turn in-process `ClaudeSdkQuery` harness over real `createClaudeSdkDriver` supporting `canUseTool` via `askPermission`, live control call recording, optional experimental usage attachment, and non-inference `probeCapabilities` |
26
+ | `createStubCodexControlClient` / `createStubCodexControlConnection` / `createStubCodexSession` / `createStubCodexSharedServer` / `createStubCodexTurn` / `createStubAgentEngineTurn` / `createStubClaudeSdkSession` / `createStubAcpSession` / `StubOverrides` / `StubAgentEngineTurnOverrides` / `StubCodexTurnOverrides` | functions / _types_ | fail-loud typed consumer stub factories (`exactOptionalPropertyTypes: true`-safe `StubOverrides<T>`, no-op `close()`, unexpected-call throws on unset methods) |
27
+ | `makeExecutorDelta` / `ExecutorDeltaInput` / `makeCodexNotificationEvent` / `CodexNotificationEventOverrides` / `makeCodexThreadFixture` | functions / _types_ | schema-validated fixture factories for `ExecutorDelta`, `CodexNotificationEvent`, and `CodexThread` |
24
28
  | `FakeEngineScenarioSchema` / `FakeEngineScenario` / `FakeEngineStepSchema` / `FakeEngineStep` | schemas / _types_ | a scripted engine turn in any dialect: expect, emit, delay, crash, exit |
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 |
29
+ | `runFakeClaudeEngine` | function | play a scenario as Claude Code does on `stream-json` — the engine side of a Claude-dialect conformance test |
26
30
 
27
31
  ---
28
32
 
@@ -22,7 +22,7 @@ leaves of their own; this entrypoint knows no vendor. Evolving.
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
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
- | `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` |
25
+ | `PlanLimitsSchema` / `PlanLimits` / `PlanWindowSchema` / `PlanWindow` | schemas / _types_ | a subscription's limits: `known`, `no-plan-limit` or `unpublished`, with optional `plan` and the last read's error beside the last answer; each window carries `name`, `usedPercent`, and optional `resetsAt`, `windowDurationMins`, `label`, and `scope` |
26
26
  | `ThreadClaimSchema` / `ThreadClaim` / `ThreadLeaseSchema` / `ThreadLease` / `ThreadRenewSchema` / `ThreadReleaseSchema` | schemas / _types_ | thread leases pinned to an executor and profile, under a fence |
27
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
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 |
@@ -32,10 +32,10 @@ leaves of their own; this entrypoint knows no vendor. Evolving.
32
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 |
33
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 |
34
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 } }` |
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 |
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 |
35
+ | `ExecutorProfileConfigSchema` / `ExecutorProfileConfig` / `EXECUTOR_ENV_KEY_PATTERN` / `sanitizeProfileEnv` / `engineEnvironment` / `ownCredentials` / `helloProfile` / `CREDENTIAL_VARIABLES` | schema / _type_ / constants / functions | a profile on the executor's machine, profile env-key filtering (`EXECUTOR_ENV_KEY_PATTERN`, `sanitizeProfileEnv`), 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 |
36
+ | `mergeRateLimitEvent` / `planLimitsReadFailed` / `planLimitsDue` / `planWindowExpired` / `planWindowDurationMins` | functions | plan limits kept as three answers (`mergeRateLimitEvent` preserving `plan`, `planLimitsReadFailed`, `planLimitsDue` treating clean `no-plan-limit`/`unpublished` as not due, `planWindowExpired`, and `planWindowDurationMins` deriving durations in minutes) |
37
37
  | `canAdvanceTurnPhase` / `isTerminalTurnPhase` | functions | the turn phase machine: a terminal phase is never left |
38
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 |
39
- | `createJsonRpcPeer` / `JsonRpcPeer` / `JsonRpcPeerConfig` / `JsonRpcHeader` / `JsonRpcValue` / `JsonRpcError` / `JSON_RPC_METHOD_NOT_FOUND` / `JSON_RPC_LOCAL_TIMEOUT` | function / _types_ / class / constants | a bidirectional JSON-RPC peer over lines, with the dialect's header or without it; an unhandled request is answered `-32601` at once and local request timeouts fail with `-32099` (`JSON_RPC_LOCAL_TIMEOUT`) |
39
+ | `createJsonRpcPeer` / `JsonRpcPeer` / `JsonRpcPeerConfig` / `JsonRpcHeader` / `JsonRpcValue` / `JsonRpcValueSchema` / `JsonRpcRecordSchema` / `JsonRpcError` / `JSON_RPC_METHOD_NOT_FOUND` / `JSON_RPC_LOCAL_TIMEOUT` | function / _types_ / schemas / class / constants | a bidirectional JSON-RPC peer over lines supporting per-call `timeoutMs` and `signal` (`AbortSignal`), Zod schemas `JsonRpcValueSchema` / `JsonRpcRecordSchema`, with the dialect's header or without it; an unhandled request is answered `-32601` at once and local request timeouts fail with `-32099` (`JSON_RPC_LOCAL_TIMEOUT`) |
40
40
 
41
41
  ---
@@ -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 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 |
59
+ | `stitchkit` | browser **and** server | stable<br>_redefined in 5 of the 38 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 38 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 38 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 38 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 38 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 38 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 5 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 38 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 38 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 38 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 38 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 38 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 38 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 38 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 38 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 38 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 38 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 38 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 38 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 38 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 38 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 38 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 38 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 5 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 5 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 5 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 5 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 38 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 38 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 38 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 38 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 38 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 38 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 38 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 38 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 38 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 38 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 38 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 5 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 5 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 38 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 38 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 38 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 38 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 38 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 38 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 38 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 38 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 38 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 38 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 38 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 38 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 38 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 38 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 38 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 38 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 38 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 38 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 38 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 38 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 3 of the 5 minors since 0.127.0, most recently 0.131.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 5 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 1 of the 5 minors since 0.127.0, most recently 0.131.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 5 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 2 of the 5 minors since 0.127.0, most recently 0.131.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 5 minors since 0.127.0_ | the engine conformance kit, deterministic replay driver, portable fake Codex app-server, multi-turn fake Claude SDK query harness, fail-loud consumer stub factories, and schema-validated test fixtures |
125
+ | `stitchkit/agent-runtime/postgres` | server (Bun or Node) | evolving<br>_redefined in 0 of the 5 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 38 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 38 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 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 |
129
+ | `stitchkit/application` | browser + server | evolving<br>_redefined in 9 of the 38 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 38 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 38 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 38 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 38 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
@@ -239,6 +239,7 @@ map — feature → packages:
239
239
  | Postgres agent store (`stitchkit/agent-runtime/postgres`) | — (the application's own Postgres client) |
240
240
  | SQLite agent store (`stitchkit/agent-runtime/sqlite/bun` or `/node`) | — (runtime built-in) |
241
241
  | Agent executor — Claude Agent SDK leaf (`stitchkit/agent-executor/claude-sdk`) | `@anthropic-ai/claude-agent-sdk` |
242
+ | Agent executor — consumer testing kit (`stitchkit/agent-executor/testing`) | `@anthropic-ai/claude-agent-sdk` (types only; runtime peer-free) |
242
243
  | MCP host/client tests | `@modelcontextprotocol/client` |
243
244
  | MCP Apps UI widgets | `@modelcontextprotocol/ext-apps` |
244
245
  | React data layer (`stitchkit/react`) | `@tanstack/react-query` `react-query-kit` |