stitchkit 0.127.0 → 0.128.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 (233) hide show
  1. package/CHANGELOG.md +137 -6
  2. package/dist/agent-executor/acp/v1-connect.d.ts +9 -1
  3. package/dist/agent-executor/acp/v1-connect.d.ts.map +1 -1
  4. package/dist/agent-executor/acp/v1-driver.d.ts +8 -2
  5. package/dist/agent-executor/acp/v1-driver.d.ts.map +1 -1
  6. package/dist/agent-executor/acp/v1-map.d.ts.map +1 -1
  7. package/dist/agent-executor/acp/v1-session.d.ts +8 -0
  8. package/dist/agent-executor/acp/v1-session.d.ts.map +1 -1
  9. package/dist/agent-executor/claude/cli-driver.d.ts +4 -0
  10. package/dist/agent-executor/claude/cli-driver.d.ts.map +1 -1
  11. package/dist/agent-executor/claude/protocol.d.ts +20 -2
  12. package/dist/agent-executor/claude/protocol.d.ts.map +1 -1
  13. package/dist/agent-executor/claude/session.d.ts +2 -1
  14. package/dist/agent-executor/claude/session.d.ts.map +1 -1
  15. package/dist/agent-executor/claude/transcript.d.ts +7 -4
  16. package/dist/agent-executor/claude/transcript.d.ts.map +1 -1
  17. package/dist/agent-executor/claude-sdk/driver.d.ts +4 -0
  18. package/dist/agent-executor/claude-sdk/driver.d.ts.map +1 -1
  19. package/dist/agent-executor/claude-sdk/session.d.ts.map +1 -1
  20. package/dist/agent-executor/codex/driver.d.ts +4 -0
  21. package/dist/agent-executor/codex/driver.d.ts.map +1 -1
  22. package/dist/agent-executor/codex/protocol.d.ts +26 -2
  23. package/dist/agent-executor/codex/protocol.d.ts.map +1 -1
  24. package/dist/agent-executor/codex/session.d.ts +3 -1
  25. package/dist/agent-executor/codex/session.d.ts.map +1 -1
  26. package/dist/agent-executor/image-input.d.ts +71 -0
  27. package/dist/agent-executor/image-input.d.ts.map +1 -0
  28. package/dist/agent-executor/session-primitives.d.ts +0 -3
  29. package/dist/agent-executor/session-primitives.d.ts.map +1 -1
  30. package/dist/agent-runtime/agent-tool.d.ts +21 -7
  31. package/dist/agent-runtime/agent-tool.d.ts.map +1 -1
  32. package/dist/agent-runtime/branch-contract.d.ts +1 -0
  33. package/dist/agent-runtime/branch-contract.d.ts.map +1 -1
  34. package/dist/agent-runtime/branch-identities.d.ts +5 -2
  35. package/dist/agent-runtime/branch-identities.d.ts.map +1 -1
  36. package/dist/agent-runtime/branch-messages.d.ts +9 -9
  37. package/dist/agent-runtime/branch-messages.d.ts.map +1 -1
  38. package/dist/agent-runtime/branch-observations.d.ts +45 -32
  39. package/dist/agent-runtime/branch-observations.d.ts.map +1 -1
  40. package/dist/agent-runtime/branch-provider.d.ts +12 -6
  41. package/dist/agent-runtime/branch-provider.d.ts.map +1 -1
  42. package/dist/agent-runtime/branch-source.d.ts +13 -1
  43. package/dist/agent-runtime/branch-source.d.ts.map +1 -1
  44. package/dist/agent-runtime/child-tools.d.ts +64 -0
  45. package/dist/agent-runtime/child-tools.d.ts.map +1 -1
  46. package/dist/agent-runtime/event-search-tools.d.ts +82 -5
  47. package/dist/agent-runtime/event-search-tools.d.ts.map +1 -1
  48. package/dist/agent-runtime/invocation-attempt.d.ts +1 -1
  49. package/dist/agent-runtime/invocation-attempt.d.ts.map +1 -1
  50. package/dist/agent-runtime/invocation-payload.d.ts +12 -0
  51. package/dist/agent-runtime/invocation-payload.d.ts.map +1 -1
  52. package/dist/agent-runtime/invocation-read.d.ts +6 -3
  53. package/dist/agent-runtime/invocation-read.d.ts.map +1 -1
  54. package/dist/agent-runtime/invocation-schema.d.ts +50 -8
  55. package/dist/agent-runtime/invocation-schema.d.ts.map +1 -1
  56. package/dist/agent-runtime/invocations.d.ts +20 -9
  57. package/dist/agent-runtime/invocations.d.ts.map +1 -1
  58. package/dist/agent-runtime/postgres.d.ts.map +1 -1
  59. package/dist/agent-runtime/schedule-tools.d.ts +30 -0
  60. package/dist/agent-runtime/schedule-tools.d.ts.map +1 -1
  61. package/dist/agent-runtime/schemas-invocation-payload.d.ts +48 -0
  62. package/dist/agent-runtime/schemas-invocation-payload.d.ts.map +1 -0
  63. package/dist/agent-runtime/sql-events.d.ts.map +1 -1
  64. package/dist/agent-runtime/sql-session.d.ts +11 -0
  65. package/dist/agent-runtime/sql-session.d.ts.map +1 -1
  66. package/dist/agent-runtime/sqlite-transactions.d.ts.map +1 -1
  67. package/dist/agent-runtime/state-tools.d.ts +55 -0
  68. package/dist/agent-runtime/state-tools.d.ts.map +1 -1
  69. package/dist/agent-runtime/store-branch.d.ts.map +1 -1
  70. package/dist/agent-runtime/store-conformance-lifecycle.d.ts +20 -20
  71. package/dist/agent-runtime/store-conformance-support.d.ts +10 -10
  72. package/dist/agent-runtime/store-create.d.ts.map +1 -1
  73. package/dist/agent-runtime/store-driver-contract.d.ts +12 -0
  74. package/dist/agent-runtime/store-driver-contract.d.ts.map +1 -1
  75. package/dist/agent-runtime/store-memory-events.d.ts.map +1 -1
  76. package/dist/agent-runtime/store.d.ts +7 -0
  77. package/dist/agent-runtime/store.d.ts.map +1 -1
  78. package/dist/declaration/declaration.d.ts +6 -3
  79. package/dist/declaration/declaration.d.ts.map +1 -1
  80. package/dist/entrypoints/agent-executor/acp.d.ts +1 -1
  81. package/dist/entrypoints/agent-executor/acp.d.ts.map +1 -1
  82. package/dist/entrypoints/agent-executor/acp.js +23 -12
  83. package/dist/entrypoints/agent-executor/claude-sdk.js +26 -10
  84. package/dist/entrypoints/agent-executor/claude.js +35 -16
  85. package/dist/entrypoints/agent-executor/codex.js +81 -21
  86. package/dist/entrypoints/agent-executor.js +1 -1
  87. package/dist/entrypoints/agent-runtime/harness.js +5 -6
  88. package/dist/entrypoints/agent-runtime/openrouter.js +2 -2
  89. package/dist/entrypoints/agent-runtime/postgres.js +8 -3
  90. package/dist/entrypoints/agent-runtime/sandbox.js +3 -3
  91. package/dist/entrypoints/agent-runtime/sqlite/bun.js +4 -4
  92. package/dist/entrypoints/agent-runtime/sqlite/node.js +4 -4
  93. package/dist/entrypoints/agent-runtime/testing.js +6 -6
  94. package/dist/entrypoints/agent-runtime.d.ts +9 -7
  95. package/dist/entrypoints/agent-runtime.d.ts.map +1 -1
  96. package/dist/entrypoints/agent-runtime.js +246 -199
  97. package/dist/entrypoints/application/diagnostic-journal.js +4 -4
  98. package/dist/entrypoints/application/directory-inbox.js +8 -8
  99. package/dist/entrypoints/cli/publish.js +8 -8
  100. package/dist/entrypoints/cli.js +10 -9
  101. package/dist/entrypoints/declaration.js +0 -1
  102. package/dist/entrypoints/files.js +40 -17
  103. package/dist/entrypoints/node.js +4 -4
  104. package/dist/entrypoints/observability.js +1 -1
  105. package/dist/entrypoints/process.js +1 -1
  106. package/dist/entrypoints/server.js +7 -7
  107. package/dist/entrypoints/service-host/macos.js +4 -4
  108. package/dist/entrypoints/service-host.d.ts +4 -1
  109. package/dist/entrypoints/service-host.d.ts.map +1 -1
  110. package/dist/entrypoints/service-host.js +831 -220
  111. package/dist/entrypoints/spend.js +1 -1
  112. package/dist/entrypoints/telegram.js +4 -4
  113. package/dist/entrypoints/tools/agent.js +4 -3
  114. package/dist/entrypoints/tools/invoker.js +3 -2
  115. package/dist/entrypoints/tools/mcp.js +4 -3
  116. package/dist/entrypoints/tools/toolkit.js +6 -5
  117. package/dist/entrypoints/tools.d.ts +1 -1
  118. package/dist/entrypoints/tools.d.ts.map +1 -1
  119. package/dist/entrypoints/tools.js +10 -8
  120. package/dist/files/directory-appearance.d.ts +20 -9
  121. package/dist/files/directory-appearance.d.ts.map +1 -1
  122. package/dist/files/polled-json.d.ts.map +1 -1
  123. package/dist/files/regular-file.d.ts +15 -5
  124. package/dist/files/regular-file.d.ts.map +1 -1
  125. package/dist/{index-z4k0hqp9.js → index-0gqs8ght.js} +106 -24
  126. package/dist/{index-caywx1c0.js → index-13dnv6d0.js} +107 -10
  127. package/dist/{index-a725ayvz.js → index-1qwrczr1.js} +1 -1
  128. package/dist/{index-xtkw9866.js → index-2c5w2d1d.js} +1 -1
  129. package/dist/{index-g1q7fwn9.js → index-2nwvn7m2.js} +1 -1
  130. package/dist/{index-4s2w4g37.js → index-3tnwtz38.js} +80 -2
  131. package/dist/{index-5e0zsbf7.js → index-4j8efqr3.js} +1 -1
  132. package/dist/{index-p1m9djt6.js → index-5v5vg85s.js} +1 -1
  133. package/dist/{index-x90w78yz.js → index-673drwkn.js} +23 -8
  134. package/dist/{index-7xp05h20.js → index-6wp4dn9d.js} +6 -6
  135. package/dist/{index-0hdm5sx6.js → index-8x22nprv.js} +6 -2
  136. package/dist/{index-j13gzgdv.js → index-bz3gn6cs.js} +8 -4
  137. package/dist/{index-d96c1n1q.js → index-c5gp2gh6.js} +20 -19
  138. package/dist/{index-wbnpa8z6.js → index-d54npte7.js} +4 -4
  139. package/dist/{index-kmbpej2y.js → index-emgrmavr.js} +102 -61
  140. package/dist/{index-bbzvrq66.js → index-g3e57qj6.js} +455 -202
  141. package/dist/index-gf92hc87.js +100 -0
  142. package/dist/{index-3djgv3ch.js → index-gzny6zsw.js} +25 -10
  143. package/dist/{index-3b31z0pc.js → index-hj1zq7mh.js} +12 -6
  144. package/dist/{index-8xr2eq99.js → index-jfecdk1e.js} +3 -3
  145. package/dist/{index-dvd1qdwa.js → index-ke02kxsr.js} +3 -3
  146. package/dist/{index-83n766x4.js → index-m18xm96h.js} +15 -9
  147. package/dist/{index-qnzhmk2s.js → index-n7f89hjw.js} +90 -47
  148. package/dist/{index-3agqmmrg.js → index-pn5b11ce.js} +7 -9
  149. package/dist/{index-3gwp8ez6.js → index-pwskmywy.js} +12 -17
  150. package/dist/{index-9wh98cpa.js → index-rxnyygke.js} +130 -90
  151. package/dist/{index-0djnptn8.js → index-rzeezh79.js} +10 -3
  152. package/dist/{index-nbv44x0x.js → index-s2e3h616.js} +137 -36
  153. package/dist/{index-5zwac8ft.js → index-t7wa7k12.js} +2 -2
  154. package/dist/{index-xypxnzhp.js → index-v1mxss62.js} +2 -2
  155. package/dist/index-vgzhw2zk.js +304 -0
  156. package/dist/{index-jrka9029.js → index-vmbxj75t.js} +2 -2
  157. package/dist/{index-j516jaaz.js → index-waa6t4zx.js} +49 -2
  158. package/dist/{index-fcw255hd.js → index-xv9jb84s.js} +2 -2
  159. package/dist/{index-dwa6pskj.js → index-y065r8g5.js} +82 -43
  160. package/dist/internal/bounded-file-confirm.d.ts +32 -0
  161. package/dist/internal/bounded-file-confirm.d.ts.map +1 -0
  162. package/dist/internal/bounded-file-read.d.ts +10 -7
  163. package/dist/internal/bounded-file-read.d.ts.map +1 -1
  164. package/dist/internal/file-observation.d.ts +5 -1
  165. package/dist/internal/file-observation.d.ts.map +1 -1
  166. package/dist/internal/process-instance.d.ts +8 -0
  167. package/dist/internal/process-instance.d.ts.map +1 -1
  168. package/dist/internal/unix-socket.d.ts +3 -1
  169. package/dist/internal/unix-socket.d.ts.map +1 -1
  170. package/dist/server/unix-client.d.ts +7 -0
  171. package/dist/server/unix-client.d.ts.map +1 -1
  172. package/dist/service-host/systemd-inspect.d.ts +3 -1
  173. package/dist/service-host/systemd-inspect.d.ts.map +1 -1
  174. package/dist/service-host/systemd-render-shared.d.ts +64 -0
  175. package/dist/service-host/systemd-render-shared.d.ts.map +1 -0
  176. package/dist/service-host/systemd-render.d.ts +31 -26
  177. package/dist/service-host/systemd-render.d.ts.map +1 -1
  178. package/dist/service-host/systemd-timer-render.d.ts +31 -0
  179. package/dist/service-host/systemd-timer-render.d.ts.map +1 -0
  180. package/dist/service-host/systemd-timer-rollback.d.ts +26 -0
  181. package/dist/service-host/systemd-timer-rollback.d.ts.map +1 -0
  182. package/dist/service-host/systemd-timer.d.ts +82 -0
  183. package/dist/service-host/systemd-timer.d.ts.map +1 -0
  184. package/dist/service-host/systemd-unit-ops.d.ts +26 -0
  185. package/dist/service-host/systemd-unit-ops.d.ts.map +1 -0
  186. package/dist/service-host/systemd.d.ts +1 -1
  187. package/dist/service-host/systemd.d.ts.map +1 -1
  188. package/dist/tools/access.d.ts +30 -1
  189. package/dist/tools/access.d.ts.map +1 -1
  190. package/dist/tools/agent.d.ts +2 -2
  191. package/dist/tools/agent.d.ts.map +1 -1
  192. package/dist/tools/cli/args-scan.d.ts +5 -0
  193. package/dist/tools/cli/args-scan.d.ts.map +1 -1
  194. package/dist/tools/cli/args.d.ts +11 -5
  195. package/dist/tools/cli/args.d.ts.map +1 -1
  196. package/dist/tools/cli/invoke.d.ts +2 -1
  197. package/dist/tools/cli/invoke.d.ts.map +1 -1
  198. package/dist/tools/cli/notices.d.ts.map +1 -1
  199. package/dist/tools/cli/run-managed.d.ts.map +1 -1
  200. package/dist/tools/cli/session.d.ts.map +1 -1
  201. package/dist/tools/execute.d.ts.map +1 -1
  202. package/dist/tools/invoker.d.ts +2 -1
  203. package/dist/tools/invoker.d.ts.map +1 -1
  204. package/dist/tools/list-names.d.ts +2 -3
  205. package/dist/tools/list-names.d.ts.map +1 -1
  206. package/dist/tools/manifest.d.ts +2 -3
  207. package/dist/tools/manifest.d.ts.map +1 -1
  208. package/dist/tools/mcp/mount.d.ts +5 -5
  209. package/dist/tools/mcp/mount.d.ts.map +1 -1
  210. package/dist/tools/mcp/register.d.ts +2 -1
  211. package/dist/tools/mcp/register.d.ts.map +1 -1
  212. package/dist/tools/mcp/runtime-tools.d.ts.map +1 -1
  213. package/llms/agent-executor-acp.txt +10 -6
  214. package/llms/agent-executor-claude-sdk.txt +1 -1
  215. package/llms/agent-executor-claude.txt +1 -1
  216. package/llms/agent-executor-codex.txt +1 -1
  217. package/llms/agent-runtime.4.txt +21 -9
  218. package/llms/cli.3.txt +4 -4
  219. package/llms/cli.txt +1 -0
  220. package/llms/declaration.txt +2 -2
  221. package/llms/files.txt +1 -1
  222. package/llms/node.txt +2 -2
  223. package/llms/server.5.txt +2 -2
  224. package/llms/service-host.txt +5 -5
  225. package/llms/stitchkit.txt +81 -77
  226. package/llms/tools.3.txt +3 -2
  227. package/llms/upgrading-0.128.0.txt +147 -0
  228. package/llms/upgrading.txt +1 -0
  229. package/llms-full.txt +272 -113
  230. package/llms.txt +14 -13
  231. package/package.json +1 -1
  232. package/dist/index-ajmtxsky.js +0 -193
  233. package/dist/index-ax3wns1a.js +0 -93
package/llms-full.txt CHANGED
@@ -47,81 +47,81 @@ own, recorded as an ADR.
47
47
 
48
48
  | Import | Use in | Maturity | Holds |
49
49
  |--------|--------|----------|-------|
50
- | `stitchkit` | browser **and** server | stable<br>_redefined in 5 of the 34 minors since 0.94.0, most recently 0.127.0_ | `defineContract`, `createClient`, `createHttpClient`, `createSocketIOClient`, `parseSSE`, the error model |
51
- | `stitchkit/http` | browser, React Native/Hermes **and** server | evolving<br>_redefined in 2 of the 34 minors since 0.94.0, most recently 0.127.0_ | typed HTTP client factories and `ApiError`, without optional realtime peers |
52
- | `stitchkit/realtime` | browser, React Native/Hermes **and** server | evolving<br>_redefined in 1 of the 34 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 |
53
- | `stitchkit/contract` | browser **and** server | stable<br>_redefined in 5 of the 34 minors since 0.94.0, most recently 0.127.0_ | the contract layer alone — `defineContract`, errors, pagination |
54
- | `stitchkit/live` | browser **and** server | evolving<br>_redefined in 2 of the 34 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 |
55
- | `stitchkit/primitives` | browser **and** server | evolving<br>_redefined in 0 of the 34 minors since 0.94.0_ | generic values and declarations for lifecycle, access, audit, delivery and exports, exact money and rounding tables |
56
- | `stitchkit/handler` | browser, React Native/Hermes **and** server | evolving<br>_redefined in 0 of the 1 minor since 0.127.0_ | portable `createHandler`, `implement`, errors and `serveBridge` over a string `postMessage` port, with no Node built-ins |
57
- | `stitchkit/server` | server (Bun) | stable<br>_redefined in 5 of the 34 minors since 0.94.0, most recently 0.127.0_ | `createServer`, `implement`, hooks, auth, Socket.IO server, server primitives |
58
- | `stitchkit/node` | server (Node ≥ 22.3) | stable<br>_redefined in 2 of the 34 minors since 0.94.0, most recently 0.127.0_ | `serveNode` + the runtime-agnostic core — the Node mirror of `/server` |
59
- | `stitchkit/tools` | server | stable<br>_redefined in 10 of the 34 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 |
60
- | `stitchkit/tools/mcp` | server (Bun or Node) | evolving<br>_redefined in 3 of the 34 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 |
61
- | `stitchkit/tools/agent` | server (Bun or Node) | evolving<br>_redefined in 1 of the 34 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 |
62
- | `stitchkit/tools/toolkit` | server (Bun or Node) | evolving<br>_redefined in 1 of the 34 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 |
63
- | `stitchkit/tools/contract` | browser + server | evolving<br>_redefined in 2 of the 34 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 |
64
- | `stitchkit/tools/invoker` | server | stable<br>_redefined in 3 of the 34 minors since 0.94.0, most recently 0.127.0_ | peer-free `createToolInvoker` over the canonical contract tool runner |
65
- | `stitchkit/tools/connections` | server (Bun or Node) | evolving<br>_redefined in 3 of the 34 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 |
66
- | `stitchkit/cli` | server | stable<br>_redefined in 11 of the 34 minors since 0.94.0, most recently 0.127.0_ | `createCli` / `createCliInvoker` — runtime and strict NodeNext declarations without MCP SDK / `ai` |
67
- | `stitchkit/cli/publish` | build and release tooling (Bun or Node, POSIX) | evolving<br>_redefined in 0 of the 34 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) |
68
- | `stitchkit/remote` | browser **and** server | stable<br>_redefined in 1 of the 34 minors since 0.94.0, most recently 0.104.0_ | peer-free `implementRemote` for thin HTTP proxy processes |
69
- | `stitchkit/process` | server (Bun or Node, POSIX) | evolving<br>_redefined in 3 of the 34 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 |
70
- | `stitchkit/process/owner-loss` | bundled server entry (Bun, POSIX) | evolving<br>_redefined in 0 of the 34 minors since 0.94.0_ | narrow bootstrap that keeps the process runner lazy while carrying its owner-loss guard in a single-file bundle |
71
- | `stitchkit/files/packaging` | build time (Bun or Node) | evolving<br>_redefined in 3 of the 34 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 |
72
- | `stitchkit/files` | server (Bun or Node) | stable<br>_redefined in 4 of the 34 minors since 0.94.0, most recently 0.127.0_ | peer-free managed local-file boundary |
73
- | `stitchkit/spend` | server (Bun or Node) | evolving<br>_redefined in 0 of the 1 minor 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 |
74
- | `stitchkit/spend/testing` | tests on Bun or Node | evolving<br>_redefined in 0 of the 1 minor since 0.127.0_ | the coverage guard: red on a model SDK import, a provider key or a provider host outside the gateway files |
75
- | `stitchkit/service-host` | server (Bun or Node) | evolving<br>_redefined in 0 of the 1 minor 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 |
76
- | `stitchkit/service-host/macos` | server (Bun or Node, macOS) | evolving<br>_redefined in 0 of the 1 minor 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 |
77
- | `stitchkit/telegram` | server (Bun or Node) | evolving<br>_redefined in 8 of the 34 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 |
78
- | `stitchkit/telegram/grammy` | server (Bun or Node) | evolving<br>_redefined in 0 of the 34 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 |
79
- | `stitchkit/telegram/html` | browser and server | evolving<br>_redefined in 1 of the 34 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 |
80
- | `stitchkit/telegram/voice` | browser and server | evolving<br>_redefined in 0 of the 34 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 |
81
- | `stitchkit/telegram/screens` | server (Bun or Node) | evolving<br>_redefined in 1 of the 34 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 |
82
- | `stitchkit/tracking` | browser **and** server | evolving<br>_redefined in 3 of the 34 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 |
83
- | `stitchkit/tracking/contract` | browser **and** server | evolving<br>_redefined in 0 of the 34 minors since 0.94.0_ | the wire shapes — the contract factory, event and visit schemas, the performance sample and its trust threshold; brings `zod` |
84
- | `stitchkit/tracking/performance` | browser **and** server | evolving<br>_redefined in 1 of the 34 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` |
85
- | `stitchkit/tracking/server` | server (Bun or Node) | evolving<br>_redefined in 0 of the 34 minors since 0.94.0_ | the decisions a tracking backend makes — dispositions, visit lease over an application-owned store, active intervals, presence; no database |
86
- | `stitchkit/release` | browser **and** server | evolving<br>_redefined in 1 of the 34 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 |
87
- | `stitchkit/voice` | browser **and** server | evolving<br>_redefined in 0 of the 34 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 |
88
- | `stitchkit/sync` | browser **and** server | evolving<br>_redefined in 0 of the 1 minor 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 |
89
- | `stitchkit/sync/postgres` | server (Bun or Node) | evolving<br>_redefined in 0 of the 1 minor 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` |
90
- | `stitchkit/geo` | server (Bun or Node) | evolving<br>_redefined in 2 of the 34 minors since 0.94.0, most recently 0.127.0_ | managed GeoIP reader generations, last-known-good reload and the optional MaxMind adapter |
91
- | `stitchkit/geo/contract` | browser **and** server | evolving<br>_redefined in 0 of the 34 minors since 0.94.0_ | the place snapshot schema, for a shared contract that stores or sends `GeoAttribution`; brings `zod` |
92
- | `stitchkit/xlsx` | browser **and** server | evolving<br>_redefined in 0 of the 34 minors since 0.94.0_ | a workbook from rows and typed columns, with no dependency; text never runs as a formula |
93
- | `stitchkit/oauth` | browser **and** server | evolving<br>_redefined in 0 of the 34 minors since 0.94.0_ | provider-neutral Authorization Code + PKCE request and one-shot callback transaction mechanics |
94
- | `stitchkit/google` | server (Bun or Node) | evolving<br>_redefined in 1 of the 34 minors since 0.94.0, most recently 0.127.0_ | optional Google code exchange and verified OIDC identity adapter |
95
- | `stitchkit/observability` | server | stable<br>_redefined in 1 of the 34 minors since 0.94.0, most recently 0.127.0_ | request/tool event projections — `createObservability`, trace context, sanitisation |
96
- | `stitchkit/testing` | tests on Bun or Node | stable<br>_redefined in 3 of the 34 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 |
97
- | `stitchkit/declaration` | browser + build and deployment tooling (Bun or Node) | evolving<br>_redefined in 0 of the 34 minors since 0.94.0_ | `ProjectDeclarationSchema` — the one machine-readable statement a repository makes about itself |
98
- | `stitchkit/react` | browser + server rendering | stable<br>_redefined in 2 of the 34 minors since 0.94.0, most recently 0.127.0_ | `createCursorQuery`, `createCacheBridge`, QueryClient and `ApiError` retry policy |
99
- | `stitchkit/react/keyboard` | browser | evolving<br>_redefined in 1 of the 34 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) |
100
- | `stitchkit/react/keyboard/testing` | server (Bun or Node) | evolving<br>_redefined in 0 of the 34 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 |
101
- | `stitchkit/agent-runtime` | server | evolving<br>_redefined in 8 of the 34 minors since 0.94.0, most recently 0.127.0_ | optional durable conversation/run loop, history, models, prompts, fencing and events |
102
- | `stitchkit/agent-runtime/sandbox` | server | evolving<br>_redefined in 0 of the 34 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) |
103
- | `stitchkit/agent-runtime/testing` | tests on Bun or Node | evolving<br>_redefined in 2 of the 34 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 |
104
- | `stitchkit/agent-runtime/harness` | server | evolving<br>_redefined in 0 of the 34 minors since 0.94.0_ | resource-aware process-local facade over the canonical Agent runtime; supervision stays outside |
105
- | `stitchkit/agent-runtime/coding-tools` | server (Bun or Node) | evolving<br>_redefined in 3 of the 34 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 |
106
- | `stitchkit/agent-runtime/openrouter` | server | evolving<br>_redefined in 1 of the 34 minors since 0.94.0, most recently 0.127.0_ | isolated OpenRouter language-model adapter |
107
- | `stitchkit/agent-runtime/browser` | browser + server | evolving<br>_redefined in 2 of the 34 minors since 0.94.0, most recently 0.127.0_ | canonical agent records, events, reconnect cursor and optional conversation controller |
108
- | `stitchkit/agent-runtime/react` | browser + server | evolving<br>_redefined in 0 of the 34 minors since 0.94.0_ | React subscription to an application-owned agent controller |
109
- | `stitchkit/agent-runtime/realtime` | server (Bun or Node) | evolving<br>_redefined in 2 of the 34 minors since 0.94.0, most recently 0.127.0_ | authorized agent control over the existing Socket.IO server |
110
- | `stitchkit/agent-executor` | server (Bun or Node) | evolving<br>_redefined in 0 of the 1 minor since 0.127.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 |
111
- | `stitchkit/agent-executor/claude` | server (Bun or Node) | evolving<br>_redefined in 0 of the 1 minor 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 |
112
- | `stitchkit/agent-executor/claude-sdk` | server (Bun or Node) | evolving<br>_redefined in 0 of the 1 minor 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 |
113
- | `stitchkit/agent-executor/acp` | server (Bun or Node) | evolving<br>_redefined in 0 of the 1 minor 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 |
114
- | `stitchkit/agent-executor/codex` | server (Bun or Node) | evolving<br>_redefined in 0 of the 1 minor since 0.127.0_ | the Codex driver: `codex app-server` over stdio, approval and input requests answered by the host, unknown server requests refused, reconcile by the client id in `thread/turns/list` |
115
- | `stitchkit/agent-executor/testing` | server (Bun or Node) | evolving<br>_redefined in 0 of the 1 minor since 0.127.0_ | the engine conformance kit and the scripted fake engine a driver is proven against |
116
- | `stitchkit/agent-runtime/postgres` | server (Bun or Node) | evolving<br>_redefined in 0 of the 1 minor since 0.127.0_ | the agent store, conversation reader and companion host on Postgres, over the application's own client (Bun SQL, Prisma, `pg`) |
117
- | `stitchkit/agent-runtime/sqlite/bun` | server (Bun) | evolving<br>_redefined in 1 of the 34 minors since 0.94.0, most recently 0.127.0_ | durable built-in SQLite store for the agent runtime |
118
- | `stitchkit/agent-runtime/sqlite/node` | server (Node ≥ 22.5) | evolving<br>_redefined in 1 of the 34 minors since 0.94.0, most recently 0.127.0_ | durable built-in SQLite store for the agent runtime |
50
+ | `stitchkit` | browser **and** server | stable<br>_redefined in 5 of the 35 minors since 0.94.0, most recently 0.127.0_ | `defineContract`, `createClient`, `createHttpClient`, `createSocketIOClient`, `parseSSE`, the error model |
51
+ | `stitchkit/http` | browser, React Native/Hermes **and** server | evolving<br>_redefined in 2 of the 35 minors since 0.94.0, most recently 0.127.0_ | typed HTTP client factories and `ApiError`, without optional realtime peers |
52
+ | `stitchkit/realtime` | browser, React Native/Hermes **and** server | evolving<br>_redefined in 1 of the 35 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 |
53
+ | `stitchkit/contract` | browser **and** server | stable<br>_redefined in 5 of the 35 minors since 0.94.0, most recently 0.127.0_ | the contract layer alone — `defineContract`, errors, pagination |
54
+ | `stitchkit/live` | browser **and** server | evolving<br>_redefined in 2 of the 35 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 |
55
+ | `stitchkit/primitives` | browser **and** server | evolving<br>_redefined in 0 of the 35 minors since 0.94.0_ | generic values and declarations for lifecycle, access, audit, delivery and exports, exact money and rounding tables |
56
+ | `stitchkit/handler` | browser, React Native/Hermes **and** server | evolving<br>_redefined in 0 of the 2 minors since 0.127.0_ | portable `createHandler`, `implement`, errors and `serveBridge` over a string `postMessage` port, with no Node built-ins |
57
+ | `stitchkit/server` | server (Bun) | stable<br>_redefined in 5 of the 35 minors since 0.94.0, most recently 0.127.0_ | `createServer`, `implement`, hooks, auth, Socket.IO server, server primitives |
58
+ | `stitchkit/node` | server (Node ≥ 22.3) | stable<br>_redefined in 2 of the 35 minors since 0.94.0, most recently 0.127.0_ | `serveNode` + the runtime-agnostic core — the Node mirror of `/server` |
59
+ | `stitchkit/tools` | server | stable<br>_redefined in 10 of the 35 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 |
60
+ | `stitchkit/tools/mcp` | server (Bun or Node) | evolving<br>_redefined in 3 of the 35 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 |
61
+ | `stitchkit/tools/agent` | server (Bun or Node) | evolving<br>_redefined in 1 of the 35 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 |
62
+ | `stitchkit/tools/toolkit` | server (Bun or Node) | evolving<br>_redefined in 1 of the 35 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 |
63
+ | `stitchkit/tools/contract` | browser + server | evolving<br>_redefined in 2 of the 35 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 |
64
+ | `stitchkit/tools/invoker` | server | stable<br>_redefined in 3 of the 35 minors since 0.94.0, most recently 0.127.0_ | peer-free `createToolInvoker` over the canonical contract tool runner |
65
+ | `stitchkit/tools/connections` | server (Bun or Node) | evolving<br>_redefined in 3 of the 35 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 |
66
+ | `stitchkit/cli` | server | stable<br>_redefined in 12 of the 35 minors since 0.94.0, most recently 0.128.0_ | `createCli` / `createCliInvoker` — runtime and strict NodeNext declarations without MCP SDK / `ai` |
67
+ | `stitchkit/cli/publish` | build and release tooling (Bun or Node, POSIX) | evolving<br>_redefined in 0 of the 35 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) |
68
+ | `stitchkit/remote` | browser **and** server | stable<br>_redefined in 1 of the 35 minors since 0.94.0, most recently 0.104.0_ | peer-free `implementRemote` for thin HTTP proxy processes |
69
+ | `stitchkit/process` | server (Bun or Node, POSIX) | evolving<br>_redefined in 3 of the 35 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 |
70
+ | `stitchkit/process/owner-loss` | bundled server entry (Bun, POSIX) | evolving<br>_redefined in 0 of the 35 minors since 0.94.0_ | narrow bootstrap that keeps the process runner lazy while carrying its owner-loss guard in a single-file bundle |
71
+ | `stitchkit/files/packaging` | build time (Bun or Node) | evolving<br>_redefined in 3 of the 35 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 |
72
+ | `stitchkit/files` | server (Bun or Node) | stable<br>_redefined in 4 of the 35 minors since 0.94.0, most recently 0.127.0_ | peer-free managed local-file boundary |
73
+ | `stitchkit/spend` | server (Bun or Node) | evolving<br>_redefined in 0 of the 2 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 |
74
+ | `stitchkit/spend/testing` | tests on Bun or Node | evolving<br>_redefined in 0 of the 2 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 |
75
+ | `stitchkit/service-host` | server (Bun or Node) | evolving<br>_redefined in 0 of the 2 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 |
76
+ | `stitchkit/service-host/macos` | server (Bun or Node, macOS) | evolving<br>_redefined in 0 of the 2 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 |
77
+ | `stitchkit/telegram` | server (Bun or Node) | evolving<br>_redefined in 8 of the 35 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 |
78
+ | `stitchkit/telegram/grammy` | server (Bun or Node) | evolving<br>_redefined in 0 of the 35 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 |
79
+ | `stitchkit/telegram/html` | browser and server | evolving<br>_redefined in 1 of the 35 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 |
80
+ | `stitchkit/telegram/voice` | browser and server | evolving<br>_redefined in 0 of the 35 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 |
81
+ | `stitchkit/telegram/screens` | server (Bun or Node) | evolving<br>_redefined in 1 of the 35 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 |
82
+ | `stitchkit/tracking` | browser **and** server | evolving<br>_redefined in 3 of the 35 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 |
83
+ | `stitchkit/tracking/contract` | browser **and** server | evolving<br>_redefined in 0 of the 35 minors since 0.94.0_ | the wire shapes — the contract factory, event and visit schemas, the performance sample and its trust threshold; brings `zod` |
84
+ | `stitchkit/tracking/performance` | browser **and** server | evolving<br>_redefined in 1 of the 35 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` |
85
+ | `stitchkit/tracking/server` | server (Bun or Node) | evolving<br>_redefined in 0 of the 35 minors since 0.94.0_ | the decisions a tracking backend makes — dispositions, visit lease over an application-owned store, active intervals, presence; no database |
86
+ | `stitchkit/release` | browser **and** server | evolving<br>_redefined in 1 of the 35 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 |
87
+ | `stitchkit/voice` | browser **and** server | evolving<br>_redefined in 0 of the 35 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 |
88
+ | `stitchkit/sync` | browser **and** server | evolving<br>_redefined in 0 of the 2 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 |
89
+ | `stitchkit/sync/postgres` | server (Bun or Node) | evolving<br>_redefined in 0 of the 2 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` |
90
+ | `stitchkit/geo` | server (Bun or Node) | evolving<br>_redefined in 2 of the 35 minors since 0.94.0, most recently 0.127.0_ | managed GeoIP reader generations, last-known-good reload and the optional MaxMind adapter |
91
+ | `stitchkit/geo/contract` | browser **and** server | evolving<br>_redefined in 0 of the 35 minors since 0.94.0_ | the place snapshot schema, for a shared contract that stores or sends `GeoAttribution`; brings `zod` |
92
+ | `stitchkit/xlsx` | browser **and** server | evolving<br>_redefined in 0 of the 35 minors since 0.94.0_ | a workbook from rows and typed columns, with no dependency; text never runs as a formula |
93
+ | `stitchkit/oauth` | browser **and** server | evolving<br>_redefined in 0 of the 35 minors since 0.94.0_ | provider-neutral Authorization Code + PKCE request and one-shot callback transaction mechanics |
94
+ | `stitchkit/google` | server (Bun or Node) | evolving<br>_redefined in 1 of the 35 minors since 0.94.0, most recently 0.127.0_ | optional Google code exchange and verified OIDC identity adapter |
95
+ | `stitchkit/observability` | server | stable<br>_redefined in 1 of the 35 minors since 0.94.0, most recently 0.127.0_ | request/tool event projections — `createObservability`, trace context, sanitisation |
96
+ | `stitchkit/testing` | tests on Bun or Node | stable<br>_redefined in 3 of the 35 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 |
97
+ | `stitchkit/declaration` | browser + build and deployment tooling (Bun or Node) | evolving<br>_redefined in 1 of the 35 minors since 0.94.0, most recently 0.128.0_ | `ProjectDeclarationSchema` — the one machine-readable statement a repository makes about itself |
98
+ | `stitchkit/react` | browser + server rendering | stable<br>_redefined in 2 of the 35 minors since 0.94.0, most recently 0.127.0_ | `createCursorQuery`, `createCacheBridge`, QueryClient and `ApiError` retry policy |
99
+ | `stitchkit/react/keyboard` | browser | evolving<br>_redefined in 1 of the 35 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) |
100
+ | `stitchkit/react/keyboard/testing` | server (Bun or Node) | evolving<br>_redefined in 0 of the 35 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 |
101
+ | `stitchkit/agent-runtime` | server | evolving<br>_redefined in 9 of the 35 minors since 0.94.0, most recently 0.128.0_ | optional durable conversation/run loop, history, models, prompts, fencing and events |
102
+ | `stitchkit/agent-runtime/sandbox` | server | evolving<br>_redefined in 0 of the 35 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) |
103
+ | `stitchkit/agent-runtime/testing` | tests on Bun or Node | evolving<br>_redefined in 2 of the 35 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 |
104
+ | `stitchkit/agent-runtime/harness` | server | evolving<br>_redefined in 0 of the 35 minors since 0.94.0_ | resource-aware process-local facade over the canonical Agent runtime; supervision stays outside |
105
+ | `stitchkit/agent-runtime/coding-tools` | server (Bun or Node) | evolving<br>_redefined in 3 of the 35 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 |
106
+ | `stitchkit/agent-runtime/openrouter` | server | evolving<br>_redefined in 1 of the 35 minors since 0.94.0, most recently 0.127.0_ | isolated OpenRouter language-model adapter |
107
+ | `stitchkit/agent-runtime/browser` | browser + server | evolving<br>_redefined in 2 of the 35 minors since 0.94.0, most recently 0.127.0_ | canonical agent records, events, reconnect cursor and optional conversation controller |
108
+ | `stitchkit/agent-runtime/react` | browser + server | evolving<br>_redefined in 0 of the 35 minors since 0.94.0_ | React subscription to an application-owned agent controller |
109
+ | `stitchkit/agent-runtime/realtime` | server (Bun or Node) | evolving<br>_redefined in 2 of the 35 minors since 0.94.0, most recently 0.127.0_ | authorized agent control over the existing Socket.IO server |
110
+ | `stitchkit/agent-executor` | server (Bun or Node) | evolving<br>_redefined in 0 of the 2 minors since 0.127.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 |
111
+ | `stitchkit/agent-executor/claude` | server (Bun or Node) | evolving<br>_redefined in 0 of the 2 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 |
112
+ | `stitchkit/agent-executor/claude-sdk` | server (Bun or Node) | evolving<br>_redefined in 0 of the 2 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 |
113
+ | `stitchkit/agent-executor/acp` | server (Bun or Node) | evolving<br>_redefined in 0 of the 2 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 |
114
+ | `stitchkit/agent-executor/codex` | server (Bun or Node) | evolving<br>_redefined in 0 of the 2 minors since 0.127.0_ | the Codex driver: `codex app-server` over stdio, approval and input requests answered by the host, unknown server requests refused, reconcile by the client id in `thread/turns/list` |
115
+ | `stitchkit/agent-executor/testing` | server (Bun or Node) | evolving<br>_redefined in 0 of the 2 minors since 0.127.0_ | the engine conformance kit and the scripted fake engine a driver is proven against |
116
+ | `stitchkit/agent-runtime/postgres` | server (Bun or Node) | evolving<br>_redefined in 0 of the 2 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`) |
117
+ | `stitchkit/agent-runtime/sqlite/bun` | server (Bun) | evolving<br>_redefined in 1 of the 35 minors since 0.94.0, most recently 0.127.0_ | durable built-in SQLite store for the agent runtime |
118
+ | `stitchkit/agent-runtime/sqlite/node` | server (Node ≥ 22.5) | evolving<br>_redefined in 1 of the 35 minors since 0.94.0, most recently 0.127.0_ | durable built-in SQLite store for the agent runtime |
119
119
  | `stitchkit-tui` | terminal (Bun) | evolving | optional official OpenTUI host over a caller-composed headless runtime |
120
- | `stitchkit/application` | browser + server | evolving<br>_redefined in 9 of the 34 minors since 0.94.0, most recently 0.127.0_ | managed resource graph, readiness, admission, schedules, subtree restart and bounded shutdown |
121
- | `stitchkit/application/grammy` | server | evolving<br>_redefined in 0 of the 34 minors since 0.94.0_ | a grammY bot as application resources — configuration, then polling with updates admitted by batch — and the webhook adapter |
122
- | `stitchkit/application/opentelemetry` | server | evolving<br>_redefined in 0 of the 34 minors since 0.94.0_ | maps application snapshots onto an injected OpenTelemetry `Meter` |
123
- | `stitchkit/application/diagnostic-journal` | server | evolving<br>_redefined in 3 of the 34 minors since 0.94.0, most recently 0.127.0_ | the local diagnostic journal — an exclusive bounded writer and snapshot reader with explicit anomalies |
124
- | `stitchkit/application/directory-inbox` | server | evolving<br>_redefined in 0 of the 34 minors since 0.94.0_ | the directory inbox — entries another program drops into a directory, delivered to the application at least once |
120
+ | `stitchkit/application` | browser + server | evolving<br>_redefined in 9 of the 35 minors since 0.94.0, most recently 0.127.0_ | managed resource graph, readiness, admission, schedules, subtree restart and bounded shutdown |
121
+ | `stitchkit/application/grammy` | server | evolving<br>_redefined in 0 of the 35 minors since 0.94.0_ | a grammY bot as application resources — configuration, then polling with updates admitted by batch — and the webhook adapter |
122
+ | `stitchkit/application/opentelemetry` | server | evolving<br>_redefined in 0 of the 35 minors since 0.94.0_ | maps application snapshots onto an injected OpenTelemetry `Meter` |
123
+ | `stitchkit/application/diagnostic-journal` | server | evolving<br>_redefined in 3 of the 35 minors since 0.94.0, most recently 0.127.0_ | the local diagnostic journal — an exclusive bounded writer and snapshot reader with explicit anomalies |
124
+ | `stitchkit/application/directory-inbox` | server | evolving<br>_redefined in 0 of the 35 minors since 0.94.0_ | the directory inbox — entries another program drops into a directory, delivered to the application at least once |
125
125
 
126
126
  Rule of thumb: browser code imports `stitchkit` and `stitchkit/react`; server
127
127
  code adds `stitchkit/server` (or `stitchkit/node` on Node) and opts into
@@ -3148,10 +3148,14 @@ adapter structurally owns dispatch: relative and absolute redirects use the same
3148
3148
  socket, and a missing socket cannot fall through to that host over TCP. Before
3149
3149
  connecting, `createUnixClientTransport` checks that `socketPath` is at most
3150
3150
  **103 UTF-8 bytes**, that its parent directory is a real directory (not a
3151
- symlink) owned by the current OS user with `(mode & 0o022) === 0`, and that the
3152
- target is a non-symlink socket owned by the current user — refusing violations
3151
+ symlink) owned by the expected OS user with `(mode & 0o022) === 0`, and that the
3152
+ target is a non-symlink socket owned by that same user — refusing violations
3153
3153
  with a non-retryable `UnixClientTransportError` (`code: 'UNIX_TARGET_REFUSED'`,
3154
- `delivery: 'not-dispatched'`). Defaults are 16 MiB request/response bodies,
3154
+ `delivery: 'not-dispatched'`). By default the expected owner is the current
3155
+ process UID (`process.getuid()`); pass `expectedOwnerUid` (for example `0` for a
3156
+ root-owned system daemon socket accessed via group permissions) to pin a
3157
+ different POSIX owner UID explicitly while keeping every symlink, socket-type
3158
+ and directory-write check intact. Defaults are 16 MiB request/response bodies,
3155
3159
  64 KiB headers, 30 s to response headers, eight connections and five redirects.
3156
3160
 
3157
3161
  `maxHeaderBytes` is enforced before exposing a response. Bun's owned parser
@@ -11889,6 +11893,7 @@ import { CliArgumentError, extractCliGlobalOptions, parseCliArgs, routeCliArgv }
11889
11893
 
11890
11894
  try {
11891
11895
  const lifted = extractCliGlobalOptions(argv, GlobalsSchema)
11896
+ if (lifted.error !== undefined) return refuse(lifted.error.message) // exit 2, nothing ran
11892
11897
  const route = routeCliArgv(lifted.argv, { separatedBefore: lifted.separatedBefore })
11893
11898
  if (route.error !== undefined) return refuse(route.error) // exit 2, nothing ran
11894
11899
  if (route.command === undefined || route.topLevelHelp) return showHelp()
@@ -19697,6 +19702,143 @@ charts, no merged cells and no streaming: an application that needs them takes a
19697
19702
 
19698
19703
  # Upgrading stitchkit
19699
19704
 
19705
+ ## Released migration: 0.128.0
19706
+
19707
+ ### invocation-payload-lifecycle
19708
+
19709
+ **Who must act:** every caller of `createModelInvocationLedger` from `stitchkit/agent-runtime`
19710
+ that reads `readPayload`, reads `sent.artifactId` on `provider/request` or top-level `artifactId`
19711
+ on `provider/response` (`ModelInvocationRecord`), passes `authorize` to `ModelInvocationConfig`,
19712
+ or relies on `maxPayloadBytes` aborting the provider call.
19713
+
19714
+ 1. **`readPayload` returns a discriminated status:** encrypted payloads redacted by
19715
+ `purgePayloads` / `store.purgeExpiredPayloads` stay readable as `{ status: 'expired', expiredAt }`
19716
+ while live payloads return `{ status: 'available', payload }`:
19717
+
19718
+ ```ts
19719
+ // before
19720
+ const payload = await ledger.readPayload({ conversationId, artifactId }, ctx)
19721
+ console.log(payload.payload)
19722
+
19723
+ // after
19724
+ const result = await ledger.readPayload({ conversationId, artifactId }, ctx)
19725
+ if (result.status === 'available') {
19726
+ console.log(result.payload)
19727
+ } else {
19728
+ console.log('expired at', result.expiredAt)
19729
+ }
19730
+ ```
19731
+
19732
+ 2. **`sent.artifactId` (`provider/request`) and top-level `artifactId` (`provider/response`) are optional when oversized:** exceeding
19733
+ `maxPayloadBytes` no longer aborts or prevents the provider call. Instead, the ledger omits the
19734
+ encrypted body, records `payloadOmitted: 'max-payload-bytes'` (with `artifactId` absent and
19735
+ `payloadSha256` preserved), and reports `InvocationPayloadTooLargeError` via `complete().receiptError`:
19736
+
19737
+ ```ts
19738
+ // before
19739
+ const id: string = record.sent.artifactId
19740
+
19741
+ // after
19742
+ if (record.sent.artifactId !== undefined) {
19743
+ await ledger.readPayload({ conversationId, artifactId: record.sent.artifactId }, ctx)
19744
+ } else if (record.sent.payloadOmitted === 'max-payload-bytes') {
19745
+ // body was intentionally omitted past maxPayloadBytes
19746
+ }
19747
+ ```
19748
+
19749
+ 3. **`ModelInvocationConfig.authorize` handles `'purge-payloads'`:** if your `authorize` callback
19750
+ switches exhaustively on `input.action`, handle the new `'purge-payloads'` variant alongside
19751
+ `'complete'`, `'agent'`, `'read'`, and `'read-payload'` (single-argument `input: ModelInvocationAuthorizationInput` carrying `input.context`):
19752
+
19753
+ ```ts
19754
+ authorize: (input) => {
19755
+ switch (input.action) {
19756
+ case 'complete':
19757
+ case 'agent':
19758
+ case 'read':
19759
+ case 'read-payload':
19760
+ case 'purge-payloads':
19761
+ return allow(input.context, input)
19762
+ }
19763
+ }
19764
+ ```
19765
+
19766
+ ### cli-option-projections-error-field
19767
+
19768
+ **Who must act:** every caller of `extractCliGlobalOptions` or `scanCliInvocation` from
19769
+ `stitchkit/cli` that caught a thrown `CliArgumentError` on call or on `.argv` access (→ ADR 0327).
19770
+
19771
+ Both projections now return malformed CLI syntax on an explicit `error?: CliArgumentError` field
19772
+ with fail-closed empty routing fields (`argv: []` on `extractCliGlobalOptions`; `command: undefined`
19773
+ and `commandTokens: []` on `scanCliInvocation`) instead of throwing on call or via a getter on `.argv`:
19774
+
19775
+ ```ts
19776
+ // before
19777
+ let parsed
19778
+ try {
19779
+ parsed = extractCliGlobalOptions(argv, globals)
19780
+ void parsed.argv
19781
+ } catch (err) {
19782
+ if (err instanceof CliArgumentError) {
19783
+ parsed = { globals: {}, argv: [] }
19784
+ } else {
19785
+ throw err
19786
+ }
19787
+ }
19788
+
19789
+ // after
19790
+ const parsed = extractCliGlobalOptions(argv, globals)
19791
+ if (parsed.error) {
19792
+ // handle parsed.error, or pass raw argv to createCli(...) for exit-code-2 reporting
19793
+ }
19794
+ ```
19795
+
19796
+ ### declaration-single-version
19797
+
19798
+ **Who must act:** every repository whose `project.json` is validated by `stitchkit/declaration`
19799
+ and still carries `identity.version`, or whose server/CLI code reads `declaration.identity.version`.
19800
+
19801
+ The root `package.json` is the single source of truth for the repository version (whether SemVer or
19802
+ CalVer). `ProjectIdentitySchema` no longer accepts `identity.version`:
19803
+
19804
+ ```jsonc
19805
+ // before (project.json)
19806
+ {
19807
+ "identity": {
19808
+ "slug": "my-app",
19809
+ "name": "My App",
19810
+ "version": "0.1.0",
19811
+ "description": { "en": "My App." }
19812
+ }
19813
+ }
19814
+
19815
+ // after (project.json)
19816
+ {
19817
+ "identity": {
19818
+ "slug": "my-app",
19819
+ "name": "My App",
19820
+ "description": { "en": "My App." }
19821
+ }
19822
+ }
19823
+ ```
19824
+
19825
+ Read your application version from the root `package.json` for a single-version application — or
19826
+ from the package's own `package.json` if that package is released independently — instead of
19827
+ `identity.version` (for example, in OpenAPI `info.version`, MCP `serverInfo.version`, and
19828
+ `createCli({ version })`).
19829
+
19830
+ ### read-only-surface-inspection
19831
+
19832
+ **Who must act:** optional — hosts and test suites that currently mount a tool surface with
19833
+ `access: { open: 'local-operator' }` solely for read-only surface inspection.
19834
+
19835
+ Pass `access: { inspect: true }` to `mountAgent`, `mountMcp`, `buildMcpServer`, `createToolInvoker`,
19836
+ `createCli`, `createCliInvoker`, or `createDeferredAgentToolSurface().mount` whenever a caller only
19837
+ needs catalogs, schemas, `--help`, `--schema`, or `commands`. Every tool execution fails closed with
19838
+ `FORBIDDEN` before extensions, hooks, durability, multi-round resolvers, or auth run. Keep
19839
+ `access: { gate }` for authenticated execution surfaces and `access: { open: 'local-operator' }` for
19840
+ tests or local tools that genuinely execute handlers.
19841
+
19700
19842
  ## Released migration: 0.127.0
19701
19843
 
19702
19844
  ### branch-application-key-modes
@@ -26173,7 +26315,7 @@ invisible: it succeeds on the machine that happens to have the database.
26173
26315
  | --- | --- |
26174
26316
  | `schemaVersion` | which format this is; checked before anything else |
26175
26317
  | `kind` | `application` or `library` |
26176
- | `identity` | `slug`, `name`, `version`, `description` per locale |
26318
+ | `identity` | `slug`, `name`, `description` per locale (the project's own version lives solely in the root `package.json`) |
26177
26319
  | `roles` | each with its own working directory, per-mode argv commands, optional listener and `drainFloorMs` |
26178
26320
  | `build` | the build command and the artifact paths it produces |
26179
26321
  | `requires` | what the code needs and does not provide, per phase (`release`, `start`) |
@@ -26838,8 +26980,8 @@ Also re-exports the error helpers from `stitchkit/contract`.
26838
26980
  | `StreamingRouteOptions` | _type_ | options for `streamingRoute` / `ndjsonRoute` / `sseRoute` |
26839
26981
  | `StreamingSourceContext` | _type_ | what a streaming source is given, including the cancellation `signal` |
26840
26982
  | `StreamingFormat` | _type_ | `'ndjson' \| 'sse'` |
26841
- | `createUnixClientTransport` | function | owned Fetch-compatible Unix-socket transport on Bun and Node; every redirect stays on the socket — [guide](../guide/client.md#unix-domain-sockets) |
26842
- | `UnixClientTransportConfig` | _type_ | absolute socket path plus request/header/connection/redirect bounds and an explicit bounded-or-streaming response policy |
26983
+ | `createUnixClientTransport` | function | owned Fetch-compatible Unix-socket transport on Bun and Node; enforces parent-directory, symlink, non-group/world-writable, and owner-UID (`expectedOwnerUid`, defaulting to current EUID) checks on every dispatch and redirect — [guide](../guide/client.md#unix-domain-sockets) |
26984
+ | `UnixClientTransportConfig` | _type_ | absolute socket path, optional `expectedOwnerUid` for cross-UID group-accessible local daemons, request/header/connection/redirect bounds, and an explicit bounded-or-streaming response policy |
26843
26985
  | `UnixClientTransport` | _type_ | `{ fetch, closed, close() }`; `close()` settles owned active work |
26844
26986
  | `UnixResponseBodyMode` | _type_ | `bounded \| streaming`; bounded is the 16 MiB cumulative default, streaming keeps pull-driven buffering without a lifetime total |
26845
26987
  | `UnixClientTransportError` | class | stable transport failure with `code` and dispatch certainty in `delivery` |
@@ -27247,7 +27389,7 @@ Server-only optional application runtime. See the
27247
27389
  | `AgentMessageSchema` / `AgentRunSchema` / `AgentSnapshotSchema` | schema | versioned canonical engine records |
27248
27390
  | `AgentRunQueuePrioritySchema` | schema | durable opt-in priority for queued `interrupt-next` runs |
27249
27391
  | `AgentRuntimeStore` | _type_ | aggregate CAS transaction boundary for message, run and compaction mutations |
27250
- | `BranchAgentConversationInputSchema` / `BranchAgentConversationInput` | schema / _type_ | strict branch request: stable request key, empty destination, settled conversation boundary or archive bytes, fresh artifact authorization, and `applicationFiles` — `{ reference, destinationReference }` pairs for file parts the application stores; an undeclared non-spill file reference refuses the branch. `applicationKeys` declares, once each, runtime reference names such as `messageId` or `runId` that are the application's own data inside its JSON — `sourceIdentity: 'refuse'` (default) refuses a value naming the source, `'retain'` carries a value naming the source conversation, a run or a message byte for byte as a record of the past |
27392
+ | `BranchAgentConversationInputSchema` / `BranchAgentConversationInput` | schema / _type_ | strict branch request: stable request key, empty destination, settled conversation boundary or archive bytes, fresh artifact authorization, and `applicationFiles` — `{ reference, destinationReference }` pairs for file parts the application stores; an undeclared non-spill file reference refuses the branch. Spills validly retired by `spill/deleted` cross as deterministic rekeyed history (emitting an inert `runtime/branch-observation` across `throughRunId` cutoffs) while missing or inconsistent spills refuse with `integrity`. `applicationKeys` declares, once each, runtime reference names such as `messageId` or `runId` that are the application's own data inside its JSON — `sourceIdentity: 'refuse'` (default) refuses a value naming the source, `'retain'` carries a value naming the source conversation, a run or a message byte for byte as a record of the past, and `'rekey-spill'` rekeys source spill references (live or legitimately expired) while still refusing foreign spills and all other source identities (→ ADR 0300, ADR 0328) |
27251
27393
  | `AgentConversationBranchRefusedError` / `AgentBranchRefusalSchema` / `AgentBranchRefusal` / `AgentBranchRefusalCodeSchema` / `AgentBranchRefusalCode` | class / schemas / _types_ | a branch refusal: a `TypeError` whose `refusals` lists every refusal a declaration or authorization lifts (up to 100, `omittedRefusals` counts the rest), each with `code` and its address — event `seq`, `eventKind`, `messageId`, `toolName`, key `path`, attachment `reference` — never a value; `integrity` stops at once |
27252
27394
  | `AgentConversationBranchPlanSchema` / `AgentConversationBranchPlan` / `AgentRuntimeStore.planConversationBranch` | schema / _type_ / method | what `branchConversation` would refuse for the same input, without writing: `ready`, `refusals`, `omittedRefusals`, `applicationFiles` (every non-spill attachment reference to grant and declare), `undeclaredKeys`, `fingerprint`, `sourceArchiveDigest` |
27253
27395
  | `AgentConversationBranchReceiptSchema` / `AgentConversationBranchReceipt` | schema / _type_ | durable lineage: request fingerprint, source/destination identities, source sequence/version/digest and creation time |
@@ -27332,18 +27474,18 @@ Server-only optional application runtime. See the
27332
27474
  | `agentSummaryProjection` / `agentUsageProjection` / `agentOutlineProjection` | constants | built-in list summary, provenance-carrying usage and request outline projections |
27333
27475
  | `agentConversationCardProjection` / `agentStateSlotsProjection` / `agentScheduleSummaryProjection` | constants | focused card, durable-state and schedule lifecycle projections |
27334
27476
  | `defineStateSlot` / `AgentStateSlotDefinition` / `AgentStateSlotStore` / `AgentStateSlotValue` / `AnyAgentStateSlot` / `createAgentStateSlotStore` / `renderAgentStateSlots` | functions / _types_ | typed durable state written as ledger events and injected on every provider request |
27335
- | `agentGoalStateSlot` / `agentTodoStateSlot` / `createAgentStateTools` / `AgentStateToolsConfig` | constants / function / _type_ | built-in goal/todo state and `goal_*` / `todo_write` Agent tools bound to the conversation of the run context `tools()` receives |
27477
+ | `agentGoalStateSlot` / `agentTodoStateSlot` / `createAgentStateTools` / `AgentStateToolsConfig` / `AGENT_STATE_TOOL_DESCRIPTORS` | constants / function / _type_ | built-in goal/todo state, `goal_*` / `todo_write` Agent tools bound to the conversation of the run context `tools()` receives, and their deeply frozen non-executable static catalog descriptors |
27336
27478
  | `AgentProcessSandbox` | _type_ | host-provided process sandbox handle accepted by agent coding tools (probe helpers and grade/restriction schemas live in `stitchkit/agent-runtime/sandbox`) |
27337
27479
  | `AgentSandboxProcess` / `AgentSandboxOutputStream` | _types_ | structural child/output interface for optional lifecycle-owned `AgentProcessSandbox.spawn`, without Node ambient type dependencies |
27338
- | `AgentEventSearchResultSchema` / `AgentEventSearchResult` / `createAgentEventSearch` / `createAgentEventSearchTools` / `AgentEventSearchToolsConfig` | schema / _types_ / functions | authorized event search (SQLite FTS5 or Postgres `tsvector`, ADR 0315) with exact event addresses and `session_*` tools for the conversation of the run context `tools()` receives |
27480
+ | `AgentEventSearchResultSchema` / `AgentEventSearchResult` / `createAgentEventSearch` / `createAgentEventSearchTools` / `AgentEventSearchToolsConfig` / `AGENT_EVENT_SEARCH_TOOL_DESCRIPTORS` | schema / _types_ / functions / constant | authorized event search (SQLite FTS5 or Postgres `tsvector`, ADR 0315) with exact event addresses, `session_*` tools for the conversation of the run context `tools()` receives, and their deeply frozen non-executable static catalog descriptors |
27339
27481
  | `PostgresAgentEventSearchConfig` | _type_ | the Postgres index's options for `createAgentEventSearch({ postgres })` — `diacritics` (`preserve` / `unaccent`), `maxIndexedChars`, `maxSyncEvents` |
27340
27482
  | `createAgentSpillStore` | function | durable content-address-checked artifact storage, bounded read/search, retention facts and archive participation |
27341
- | `AgentScheduleSchema` / `AgentSchedule` / `AgentScheduleService` / `AgentScheduleDeliveryOutcomeSchema` / `AgentScheduleDeliveryOutcome` / `createAgentScheduleService` / `AgentScheduleServiceConfig` / `createAgentScheduleTools` / `AgentScheduleToolsConfig` | schemas / _types_ / functions | durable `at`/`after`/timezone-explicit `every` schedules over the store's `AgentCompanionHost`, required `maxActivePerConversation` and `minIntervalMs`, indexed retry eligibility, typed retry/terminal failure (any other returned value delivers), `maxAttempts` (default 1000) per occurrence — a one-off ends `failed`, a recurring schedule skips to its next slot — bounded dispatch and fenced stable occurrence identity (ADR 0202); the tools are bound to the conversation of the run context `tools()` receives |
27483
+ | `AgentScheduleSchema` / `AgentSchedule` / `AgentScheduleService` / `AgentScheduleDeliveryOutcomeSchema` / `AgentScheduleDeliveryOutcome` / `createAgentScheduleService` / `AgentScheduleServiceConfig` / `createAgentScheduleTools` / `AgentScheduleToolsConfig` / `AGENT_SCHEDULE_TOOL_DESCRIPTORS` | schemas / _types_ / functions / constant | durable `at`/`after`/timezone-explicit `every` schedules over the store's `AgentCompanionHost`, required `maxActivePerConversation` and `minIntervalMs`, indexed retry eligibility, typed retry/terminal failure (any other returned value delivers), `maxAttempts` (default 1000) per occurrence — a one-off ends `failed`, a recurring schedule skips to its next slot — bounded dispatch and fenced stable occurrence identity (ADR 0202); the tools are bound to the conversation of the run context `tools()` receives, with deeply frozen non-executable static catalog descriptors |
27342
27484
  | `AgentChildBudgetSchema` / `AgentChildBudget` / `AgentChildStateSchema` / `AgentChildState` / `AgentChildRecordSchema` / `AgentChildRecord` | schema / _type_ | durable child graph, bounded seed and measured budget state |
27343
27485
  | `AgentChildBlockingKindSchema` / `AgentChildBlockingKind` / `AgentChildBlockingSourceSchema` / `AgentChildBlockingSource` / `AgentChildBlockingEventSchema` / `AgentChildBlockingEvent` / `AgentChildBlockingDecision` | schemas / _types_ | parent-owned request identities; responses discriminate approval decisions from JSON input values |
27344
- | `AgentChildHandle` / `AgentChildManager` / `AgentChildManagerConfig` / `AgentChildRemainingBudget` / `createAgentChildManager` / `createAgentChildTools` / `AgentChildToolsConfig` / `agentChildBudgetStopPolicy` | _types_ / functions | host execution port, child lifecycle with required `remainingBudget` and `maxActiveChildren`, cascade (given to `createAgentRuntime` as `children`), messaging, Agent tools bound to the parent conversation of the run context `tools()` receives, and the child runtime's own budget stop policy — `recordStepUsage` at every step boundary, `policy_stop` as `child-budget` when spent |
27486
+ | `AgentChildHandle` / `AgentChildManager` / `AgentChildManagerConfig` / `AgentChildRemainingBudget` / `createAgentChildManager` / `createAgentChildTools` / `AgentChildToolsConfig` / `AGENT_CHILD_TOOL_DESCRIPTORS` / `agentChildBudgetStopPolicy` | _types_ / functions / constant | host execution port, child lifecycle with required `remainingBudget` and `maxActiveChildren`, cascade (given to `createAgentRuntime` as `children`), messaging, Agent tools bound to the parent conversation of the run context `tools()` receives (plus their deeply frozen static catalog descriptors), and the child runtime's own budget stop policy — `recordStepUsage` at every step boundary, `policy_stop` as `child-budget` when spent |
27345
27487
  | `AgentCompanionHost` / `AgentCompanionScope` / `AgentSqlSession` / `AgentSqlTables` / `AgentSqlValue` | _types_ | the store's companion host — one store transaction with the purge check and the event append (`transaction(conversationId, work)`), a read transaction (`read(work)`), the companion tables — given by the SQLite and Postgres stores and taken by every companion |
27346
- | `AgentToolDefinition` | _type_ | peer-neutral shape returned by the bound agent-only state, search, schedule and child tool factories |
27488
+ | `AgentToolDefinition` / `AgentToolDescriptor` | _types_ | peer-neutral executable shape returned by the bound agent-only tool factories and its non-executable static catalog descriptor shape (assignable to `SurfaceRuntimeToolDefinition` without an active run) |
27347
27489
  | `AgentProviderStreamCutError` | class | explicit retryable provider stream truncation evidence |
27348
27490
 
27349
27491
  ### Complete runtime inventory
@@ -27516,14 +27658,26 @@ or framework instructions; repeated keys return the existing invocation ID. It
27516
27658
  resolves `{ invocationId, outcome, text?, receiptError? }`: `receiptError` says a
27517
27659
  receipt could not be written and never changes `outcome` or drops `text`.
27518
27660
  `read(input, context)` returns a bounded event page shared by agent and completion;
27519
- `readPayload(input, context)` requires a separate authorization action to decrypt
27520
- one protected artifact. See the [guide and migration example](../guide/agent-runtime.md#plain-completions-and-shared-invocation-receipts).
27661
+ `readPayload(input, context)` requires a separate authorization action and returns a
27662
+ discriminated `ModelInvocationPayloadRead` (`available` with decrypted payload or `expired`
27663
+ with `expiredAt` once redacted); `purgePayloads(input, context)` redacts expired ciphertext
27664
+ in-place across the store and search indexes while retaining receipt metadata and digests.
27665
+ When a request or response payload exceeds `maxPayloadBytes`, the provider call still succeeds
27666
+ while recording `payloadOmitted: 'max-payload-bytes'` (with `artifactId` omitted and `payloadSha256`
27667
+ preserved) and reporting `InvocationPayloadTooLargeError` through `complete().receiptError`. See the
27668
+ [guide and migration example](../guide/agent-runtime.md#plain-completions-and-shared-invocation-receipts).
27521
27669
 
27522
27670
  | Export | Kind | Purpose |
27523
27671
  | --- | --- | --- |
27524
27672
  | `CompletionInvocationInputSchema` / `CompletionInvocationInput` | schema/type | strict prompt, model-attempt list, deadline, idempotency key and trace input |
27525
27673
  | `ModelInvocationTraceSchema` / `ModelInvocationTrace` | schema/type | operation, purpose, project, parent trace and optional experiment/case/profile |
27526
- | `ModelInvocationRecordSchema` / `ModelInvocationRecord` | schema/type | discriminated invocation start/finish and per-attempt requested/sent/effective evidence |
27674
+ | `ModelInvocationRecordSchema` / `ModelInvocationRecord` | schema/type | discriminated invocation start/finish and per-attempt requested/sent/effective evidence (with optional `artifactId` and `payloadOmitted` when oversized, keeping `payloadSha256`) |
27675
+ | `InvocationPayloadTooLargeError` | class | `RangeError` carrying `{ bytes, maxBytes, sha256 }` when a recorded invocation payload exceeds `maxPayloadBytes` without aborting the provider call |
27676
+ | `InvocationPayloadOmissionReasonSchema` / `InvocationPayloadOmissionReason` | schema/type | reason a payload body was not stored (`'max-payload-bytes'`) |
27677
+ | `ModelInvocationPayloadReadSchema` / `ModelInvocationPayloadRead` | schema/type | discriminated result of `readPayload`: `{ status: 'available', payload, ... }` or `{ status: 'expired', expiredAt, ... }` |
27678
+ | `PurgeInvocationPayloadsInputSchema` / `PurgeInvocationPayloadsInput` | schema/type | input for `purgePayloads` / `store.purgeExpiredPayloads`: `before`, optional `conversationId` and `limit` |
27679
+ | `PurgeInvocationPayloadsResultSchema` / `PurgeInvocationPayloadsResult` | schema/type | result of `purgePayloads`: `purged`, `freedBytes`, and `hasMore` |
27680
+ | `ModelInvocationAuthorizationInput` | type | discriminated authorization payload passed to `ModelInvocationConfig.authorize` (`'complete'`, `'agent'`, `'read'`, `'read-payload'`, or `'purge-payloads'`) |
27527
27681
  | `ModelInvocationAttemptContext` | type | conversation, operation, invocation, attempt, step and optional agent run identity |
27528
27682
  | `currentModelInvocationAttempt` | function | returns causal IDs inside the provider transport; undefined outside an invocation |
27529
27683
  | `modelInvocationSpendAttribution` | function | the current attempt as `stitchkit/spend` attribution fields (conversation, run, invocation, attempt, step) — a spend gateway's `context` |
@@ -27744,7 +27898,7 @@ Evolving.
27744
27898
 
27745
27899
  | Export | Kind | Purpose |
27746
27900
  |--------|------|---------|
27747
- | `createClaudeCliDriver` / `ClaudeCliDriverConfig` | function / _type_ | the driver; `permissionMode` defaults to `default`, so the server decides every tool the profile does not already allow |
27901
+ | `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 |
27748
27902
  | `claudeFakeScenarios` | constant | the conformance scenarios in this dialect, for a scripted engine |
27749
27903
  | `claudeTranscriptPath` | function | where a profile keeps a session's transcript (`{ home, cwd, sessionId }`) |
27750
27904
  | `claudePlanWindows` | function | Claude's `rate_limit_event` as plan windows (`five_hour`, `seven_day`) |
@@ -27764,7 +27918,7 @@ Evolving.
27764
27918
 
27765
27919
  | Export | Kind | Purpose |
27766
27920
  |--------|------|---------|
27767
- | `createClaudeSdkDriver` / `ClaudeSdkDriverConfig` | function / _type_ | the driver: `query` and `sdkVersion` required; `model`, `permissionMode` (default `default`) and the `ambient` environment the profile's allowlist reads. `status` reports the plan windows the session's `rate_limit_event` carried and the login as `unknown`: the SDK has no status call of its own |
27921
+ | `createClaudeSdkDriver` / `ClaudeSdkDriverConfig` | function / _type_ | the driver: `query` and `sdkVersion` required; `model`, `permissionMode` (default `default`), optional `resolveFile` and `maxImageBytes` (default 5 MiB) for turn-input images, and the `ambient` environment the profile's allowlist reads. `status` reports the plan windows the session's `rate_limit_event` carried and the login as `unknown`: the SDK has no status call of its own |
27768
27922
  | `ClaudeSdkQuery` / `ClaudeSdkRun` | _types_ | the `query` the leaf takes and the part of a running query it uses; the SDK's own `query` fits as it is |
27769
27923
 
27770
27924
  ---
@@ -27781,15 +27935,19 @@ ACP keeps no client id, so reconcile is `none`: a send whose outcome is
27781
27935
  unknown stays unknown. Unknown keys an agent adds — `_meta`, a vendor's own
27782
27936
  fields — are let through; the keys the driver reads are typed. Evolving.
27783
27937
 
27784
- Whether an agent asks before a tool is its own setting, not the protocol's:
27785
- `agy` 1.5.14 in its default mode wrote a file without
27786
- `session/request_permission`, so a server that must decide every tool opens
27787
- the agent in a mode that asks (`mode`).
27938
+ Whether an agent pauses for host approval before running a tool is controlled by the agent
27939
+ itself, not by ACP: the driver's `approvalEnforcement` is `'agent-initiated'`, meaning it
27940
+ answers `session/request_permission` requests when the agent sends them and never synthesizes
27941
+ approvals for unprompted tool calls. Some ACP agents execute tools without sending
27942
+ `session/request_permission` in their default configuration; a host that requires interactive
27943
+ tool approval must configure the agent's own approval policy (for example `toolPermission: "strict"`
27944
+ in the agent's settings under `profile.home`, bearing in mind whether the agent's OAuth session
27945
+ is bound to that profile directory).
27788
27946
 
27789
27947
  | Export | Kind | Purpose |
27790
27948
  |--------|------|---------|
27791
- | `createAcpDriver` / `AcpDriver` / `AcpDriverConfig` | function / _types_ | the driver: `executable` and `args`; `model`, `thoughtLevel` and `mode` set at open through the option of that category, in that order, a value the agent does not offer refused; `mcpServers` on every new, loaded or resumed session; `resolveFile` and `maxImageBytes` (5 MiB, eagerly validated as a positive safe integer) for images; `maxFrameBytes` (8 MiB) for one line from the agent; `requestTimeoutMs` (60 s) for each request, also capping `session/close` to at most `min(requestTimeoutMs, 5 s)`; each numeric option is refused when the driver is created, before any agent is spawned. The agent runs with `HOME` set to the profile's `home`. `info` answers the model option's values as `models: { answer: 'listed', ids }` (empty when the agent offers none) or `{ answer: 'failed', error }`, `status` opens and closes a session without a prompt — a session refused for auth is `signed-out`; `sessions` asks `session/list` |
27792
- | `AcpSession` / `AcpConfigOption` | _types_ | a session's settings, title and commands as the agent last reported them, and `setConfigOption(category or id, value)`, answered with every option, which may have narrowed |
27949
+ | `createAcpDriver` / `AcpDriver` / `AcpDriverConfig` | function / _types_ | the driver (`approvalEnforcement: 'agent-initiated'`): `executable` and `args`; `model`, `thoughtLevel` and `mode` set at open through the option of that category, in that order, a value the agent does not offer refused; `mcpServers` on every new, loaded or resumed session; `resolveFile` and `maxImageBytes` (5 MiB, eagerly validated as a positive safe integer) for images; `maxFrameBytes` (8 MiB) for one line from the agent; `requestTimeoutMs` (60 s) for each request, also capping `session/close` to at most `min(requestTimeoutMs, 5 s)`; each numeric option is refused when the driver is created, before any agent is spawned. The agent runs with `HOME` set to the profile's `home`. `info` answers the model option's values as `models: { answer: 'listed', ids }` (empty when the agent offers none) or `{ answer: 'failed', error }`, `status` opens and closes a session without a prompt — a session refused for auth is `signed-out`; `sessions` asks `session/list` |
27950
+ | `AcpSession` / `AcpConfigOption` / `AcpApprovalEnforcement` | _types_ | a session's settings, title and commands as the agent last reported them, its constant `approvalEnforcement` (`'agent-initiated'`: the host answers `session/request_permission` requests when the agent sends them and never synthesizes approvals for unprompted tool calls), and `setConfigOption(category or id, value)`, answered with every option, which may have narrowed |
27793
27951
  | `AcpSessionSummary` | _type_ | a session the agent keeps: id, working directory, title, last update |
27794
27952
  | `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 |
27795
27953
  | `ACP_PROTOCOL_VERSION` | constant | `1`; an agent answering another version is refused at hello |
@@ -27813,7 +27971,7 @@ Codex through `codex app-server` over stdio. Evolving.
27813
27971
 
27814
27972
  | Export | Kind | Purpose |
27815
27973
  |--------|------|---------|
27816
- | `createCodexDriver` / `CodexDriverConfig` | function / _type_ | the driver: a thread per session, `turn/start` under the executor's client id, approvals and input asked of the host, limits from `account/rateLimits/read` |
27974
+ | `createCodexDriver` / `CodexDriverConfig` | function / _type_ | the driver: a thread per session, `turn/start` under the executor's client id, optional `resolveFile` and `maxImageBytes` (default 5 MiB) for turn-input images, approvals and input asked of the host, limits from `account/rateLimits/read` |
27817
27975
  | `codexFakeScenarios` | constant | the conformance scenarios in this dialect, for a scripted app-server |
27818
27976
  | `codexPlanWindows` | function | Codex's `rateLimits` as plan windows (`primary`, `secondary`) |
27819
27977
 
@@ -28128,7 +28286,7 @@ server SDK), [`stitchkit/tools/agent`](#stitchkittoolsagent) (the `ai` peer) and
28128
28286
  | `AgentToolRegistry` / `AgentToolRegistryBuilder` / `AgentToolRegistryInput` | _type_ | the composed runtime surface and its builder: declared defaults, `replace`/`disable` by name, and the exact `{ tools, names }` a mount receives |
28129
28287
  | `defineToolRegistry` | function | compose runtime tools over one declared default set; an unknown `replace`/`disable` name is refused instead of silently leaving the default in place |
28130
28288
  | `ToolExtend` | _type_ | extra-args extension for `mountMcp` / `mountAgent` |
28131
- | `ToolAccess` / `ToolGate` / `ToolOpenReason` | _types_ | mandatory mount-time access policy: `{ gate: ToolGate }` (with required `beforeHandle`) or explicit `{ open: 'public' \| 'local-operator' \| 'remote', afterHandle? }` |
28289
+ | `ToolAccess` / `ToolGate` / `ToolOpenReason` | _types_ | mandatory mount-time access policy: `{ gate: ToolGate }` (with required `beforeHandle`), explicit `{ open: 'public' \| 'local-operator' \| 'remote', afterHandle? }`, or `{ inspect: true }` (read-only surface inspection: mounts schemas/catalog/help while refusing every tool invocation fail-closed with `FORBIDDEN` before extensions, hooks, durability, auth or multi-round handlers) |
28132
28290
  | `ToolLifecycle` | _type_ | `beforeHandle` / `afterHandle` hooks composed into a `ToolGate` via `composeToolLifecycle` |
28133
28291
  | `ToolExecutionControlReason` | _type_ | internal managed-execution stop reason: stale run or requested interruption |
28134
28292
  | `ToolExecutionControlError` | class | control-flow error used to unwind a superseded managed tool call without presenting it as a model-facing tool failure |
@@ -28280,7 +28438,8 @@ Advanced building blocks — the shared machinery the mounts are built on.
28280
28438
  | `ToolCallRecord` | _type_ | the structured record `createToolLogger` passes to `onRecord` |
28281
28439
  | `TransportSummary` | _type_ | `{ contractServices, runtimeTools, totals, sources }` from `summarizeTransports` |
28282
28440
  | `TransportCounts` | _type_ | per-transport counts (`{ HTTP, MCP, AGENT, CLI }`) |
28283
- | `ToolSurfaceProjection` | _type_ | the one readonly `{ services?, runtimeTools? }` container shared by full, MCP-only and introspection surfaces (`buildToolManifest`, `listToolNames`, `summarizeTransports` take `ToolSurfaceProjection<RuntimeToolDefinition>`) |
28441
+ | `ToolSurfaceProjection` | _type_ | the one readonly `{ services?, runtimeTools? }` container shared by full, MCP-only and introspection surfaces (`buildToolManifest`, `listToolNames` and `describeToolCatalog` accept `ToolSurfaceProjection<SurfaceRuntimeToolDefinition>`) |
28442
+ | `SurfaceRuntimeToolDefinition` | _type_ | peer-free non-executable runtime-tool descriptor accepted by `listToolNames`, `buildToolManifest` and `describeToolCatalog` (including static `AGENT_*_TOOL_DESCRIPTORS`) |
28284
28443
  | `ToolManifestConfig` | _type_ | mixed surface plus required model-facing `transport` and presentation options (`flattenUnionInput`, `inputRecursionDepth`) |
28285
28444
  | `coerceJsonArgs` | function | coerce JSON-stringified array/object tool arguments, including object guards restored from JSON Schema; arbitrary transform pipes stay untouched; throws a `ZodError` naming the field when a union that keeps a string member receives a string that parses to an array its array member accepts |
28286
28445
  | `flattenToolJsonSchema` | function | project structurally identifiable discriminated unions into conservative object joins; scalar collisions retain provable types, object/array collisions retain structural alternatives, and field descriptions retain discriminator labels plus availability/requiredness hints; the projection never executes validation |
@@ -28544,7 +28703,7 @@ available from `stitchkit/contract`.
28544
28703
  | `parseJsonBytes` / `readJsonFileSync` / `JsonValueSchema` | function / _type_ | strict fatal UTF-8 JSON parsing that refuses a `__proto__` key rather than dropping it, and schema validation (Zod and `{ safeParse }` compatible); every failure is a `RegularFileError` with reason `encoding`, `syntax` or `schema` |
28545
28704
  | `readJsonOnce` / `JsonFileReading` / `PolledJsonFile` / `PolledJsonFiles` / `PolledJsonOptions` | function / _type_ / class / _type_ | classified JSON polling (`missing` / `unreadable` — the operating system or a file rule refused it, with the rule's `reason` / `invalid` — the bytes are not the value, with `reason` `encoding`, `syntax` or `schema` / `read`) with bounded LRU cache and `readChanged()` returning `null` when unchanged; `noFollow` and `accept` apply to every read from disk — a file whose identity is unchanged is answered from the cache, once a read found its last change at least 3 s old (a younger file is read and compared again, since a same-length rewrite in one tick of a coarse filesystem clock keeps size, mtime and ctime) — and with `noFollow` that shortcut uses `lstat`, so a symbolic link to the cached inode is refused too; a schema that throws is an `invalid` file |
28546
28705
  | `PolledJsonFiles.refresh(entries)` / `PolledJsonFiles.refreshAsync(entries, { signal })` / `PolledJsonEntry` / `PolledJsonChange` / `MAX_POLLED_JSON_PATHS` | method / method / _type_ / _type_ / const | make the `{ path, options }` entries the tracked set and get its changes in their order: `changed` with the new reading for a new path or a new state, `removed` for a path that left the set. A path's own `options` replace the set's field by field (a set of explicit files that follow links and drop-ins read with `noFollow` and `accept`), and new options read the file again; a path listed twice is a `TypeError`. `refreshAsync` stats and reads asynchronously, commits nothing when aborted, and refuses every other call on the set while it runs. A declaration goes away either way: its path left the set (`removed`), or its file did (`changed` to `missing`). Tracking more than `MAX_POLLED_JSON_PATHS` (1024) throws `RangeError` — from `refresh`, `read` and `readChanged` alike — instead of evicting, since an evicted path would come back as a false change |
28547
- | `waitForDirectory` / `WaitForDirectoryOptions` | function / _type_ | resolves once a path exists as a directory, without a polling timer: `fs.watch` on the nearest existing ancestor, moving down as components appear and back up if the watched directory is removed; each watch start is followed by one immediate and one deferred rescan (`settleMs`, default 250) for a directory created before the watch saw it, and each event re-arms the watch, so a directory removed and made again at once is followed; a symbolic link at the path counts once it resolves to a directory; `signal` rejects with its reason and closes every watcher; `keepAlive: false` unreferences the watcher and the deferred rescan, so the wait does not hold the process |
28706
+ | `waitForDirectory` / `WaitForDirectoryOptions` | function / _type_ | resolves once a path satisfies `match` (`'directory'`, the default, waits for a directory; `'entry'` resolves as soon as any entry — regular file, broken or cyclic symlink, FIFO, or directory — exists at the target path while still refusing intermediate non-directory components), without a polling timer: `fs.watch` on the nearest existing ancestor, moving down as components appear and back up if the watched directory is removed; each watch start is followed by one immediate and one deferred rescan (`settleMs`, default 250) for an entry created before the watch saw it, and each event re-arms the watch, so a path removed and made again at once is followed; under `match: 'directory'`, a symbolic link at the path counts once it resolves to a directory; `signal` rejects with its reason and closes every watcher; `keepAlive: false` unreferences the watcher and the deferred rescan, so the wait does not hold the process |
28548
28707
 
28549
28708
  ## `stitchkit/spend`
28550
28709
 
@@ -28590,13 +28749,13 @@ Peer-free server-only host supervision primitives built on `stitchkit/files` and
28590
28749
 
28591
28750
  | Export | Kind | Summary |
28592
28751
  |--------|------|---------|
28593
- | `renderSystemdServiceUnit` | function | render strictly escaped `.service` unit (`%`, `$`, `\`, `"`, injection rejection, explicit `allowHomeSpecifier`) |
28594
- | `checkSystemdUnit` / `systemdUnitActive` / `systemdMainPid` | function | inspect unit digest, `systemctl show` state, active status, MainPID and foreign `<unit>.d/*.conf` drop-ins across `UnitPath` even when `LoadState=not-found`; `missing` only when nothing else answers for the name — a vendor, transient or generated unit loaded with no file at `unitPath` is `fragment-mismatch`; `FragmentPath` is compared with `unitPath` after resolving links in their directories (`fragmentIsUnitPath`), so a unit under a linked directory is ours |
28595
- | `installAndStartSystemdUnit` / `reloadSystemdUnit` | function | apply, enable and reload units with stability-window MainPID monitoring and automatic rollback (refused with `FOREIGN_FRAGMENT` before any write when systemd loads the name from elsewhere; `rolledBack: true` only when every rollback step succeeded, enablement included: `disable` or, for a unit `enabled` under another `[Install]`, `reenable`, then `is-enabled` must read the state found before; a relative or unnormalised `unitPath` is `INVALID_CONFIG`) |
28752
+ | `renderSystemdServiceUnit` / `renderSystemdTimerUnit` | function | render strictly escaped `.service` (including `StartLimitIntervalSec`, `SuccessExitStatus`, `TimeoutStartSec`, `DynamicUser`, `Nice`, `IOSchedulingClass`, sandboxing directives and `BindReadOnlyPaths`) and `.timer` units (`%`, `$`, `\`, `"`, injection rejection, explicit `allowHomeSpecifier`) |
28753
+ | `checkSystemdUnit` / `checkSystemdTimerPair` / `systemdUnitActive` / `systemdMainPid` | function | inspect unit or `.service` + `.timer` pair digests, `systemctl show` state, active/enabled status, MainPID and foreign `<unit>.d/*.conf` drop-ins across `UnitPath` even when `LoadState=not-found`; `missing` only when nothing else answers for the name — a vendor, transient or generated unit loaded with no file at `unitPath` is `fragment-mismatch`; `FragmentPath` is compared with `unitPath` after resolving links in their directories (`fragmentIsUnitPath`), so a unit under a linked directory is ours |
28754
+ | `installAndStartSystemdUnit` / `reloadSystemdUnit` / `installSystemdTimerPair` | function | apply, enable and reload `.service` units (with stability-window MainPID monitoring) or `.service` + `.timer` pairs (enabling/starting only the `.timer`, never starting the companion `.service`) with automatic rollback (refused with `FOREIGN_FRAGMENT` before any write when systemd loads a unit from elsewhere; `rolledBack: true` only when every rollback step succeeded, enablement included; a relative or unnormalised unit path is `INVALID_CONFIG`) |
28596
28755
  | `createDefaultSystemdHostAdapter` | function | default Linux adapter backed by `runNativeCommand`, `readRegularFile` and `writeFileAtomic`; runs `/usr/bin/systemctl` with a declared environment (`PATH=/usr/sbin:/usr/bin:/sbin:/bin`, `HOME`, `XDG_RUNTIME_DIR`, `DBUS_SESSION_BUS_ADDRESS`) |
28597
- | `SystemdScopeSchema` / `SystemdScope` / `SystemdServiceUnitConfigSchema` / `SystemdServiceUnitConfig` | schema / _type_ | strict Zod v4 schemas and types for `system`/`user` `.service` configuration |
28756
+ | `SystemdScopeSchema` / `SystemdScope` / `SystemdServiceUnitConfigSchema` / `SystemdServiceUnitConfig` / `SystemdBindReadOnlyPath` / `SystemdTimerUnitConfigSchema` / `SystemdTimerUnitConfig` | schema / _type_ | strict Zod v4 schemas and types for `system`/`user` `.service` and `.timer` configuration and `BindReadOnlyPaths=` entries |
28598
28757
  | `SystemdUnitError` / `SystemdUnitErrorCode` | class / _type_ | typed systemd inspection/apply/rollback error |
28599
- | `SystemdCommandResult` / `SystemdHostAdapter` / `CheckSystemdUnitOptions` / `SystemdUnitCheckStatus` / `SystemdUnitCheckResult` / `SystemdUnitQueryOptions` / `ApplySystemdUnitOptions` / `SystemdApplyResult` | _types_ | adapter, inspection, query and apply contracts |
28758
+ | `SystemdCommandResult` / `SystemdHostAdapter` / `CheckSystemdUnitOptions` / `SystemdUnitCheckStatus` / `SystemdUnitCheckResult` / `SystemdUnitQueryOptions` / `ApplySystemdUnitOptions` / `SystemdApplyResult` / `CheckSystemdTimerPairOptions` / `SystemdTimerPairCheckResult` / `InstallSystemdTimerPairOptions` / `SystemdTimerPairInstallResult` | _types_ | adapter, inspection, query, apply and timer-pair contracts |
28600
28759
  | `ServiceHostPathState` | _type_ | what `inspectPath` of a `SystemdHostAdapter` or `LaunchdHostAdapter` finds at a path by `lstat`: `missing`, `file` with its `mode`, `symlink` with its `target`, or `other`. An apply or reload refuses a link or a non-regular node at `unitPath`/`plistPath` with `FOREIGN_FRAGMENT` before any write, and a rollback restores the file's previous mode; `canonicalPath(path)` resolves the links in a path's directories (last component as given) for the comparison with the path a manager reports |
28601
28760
 
28602
28761
  ### macOS `launchd` supervision
@@ -29093,7 +29252,7 @@ is how a partially understood declaration becomes a running, wrong deployment.
29093
29252
  | `PROJECT_DECLARATION_SCHEMA_VERSION` | constant | the declaration format this build understands — the number a reader refuses on |
29094
29253
  | `namesAMachine` | function | why a string names a particular machine, or `undefined` — the one predicate every free string is checked against |
29095
29254
  | `findProjectRole` | function | the role with a given name, or `undefined` |
29096
- | `ProjectIdentitySchema` / `ProjectIdentity` | schema / _type_ | `slug`, `name`, `version` and a per-locale `description` |
29255
+ | `ProjectIdentitySchema` / `ProjectIdentity` | schema / _type_ | `slug`, `name` and a per-locale `description` (version lives solely in the root `package.json`) |
29097
29256
  | `ProjectRoleSchema` / `ProjectRole` | schema / _type_ | one runnable role: a `workingDirectory` inside the source, per-mode `commands`, an optional `listener`, and `drainFloorMs` |
29098
29257
  | `ProjectCommandSchema` / `ProjectCommand` | schema / _type_ | `executable` plus `args` — argv, never a shell string |
29099
29258
  | `ProjectRoleCommandSchema` / `ProjectRoleCommand` | schema / _type_ | a command run under a supervisor: additionally never a script runner, because a launcher duplicates the shutdown signal |
@@ -29134,7 +29293,7 @@ runtime-agnostic pieces of `stitchkit/server` and the error helpers.
29134
29293
  | `createHandler` | function | the router as a bare `(req) => Response` (same as `/server`) |
29135
29294
  | `createLocalHostGuard` / `LocalHostGuard` / `LocalHostGuardConfig` / `LocalHostRefusal` | function / _types_ | the local-host guard for `serveNode` (same as `/server`) |
29136
29295
  | `createSocketIOServer` | function | the typed Node Socket.IO server (`io` + `attach`; no Bun engine declarations) |
29137
- | `createUnixClientTransport` | function | the same fail-closed Bun/Node Unix client adapter exported by `stitchkit/server` |
29296
+ | `createUnixClientTransport` | function | the same fail-closed Bun/Node Unix client adapter exported by `stitchkit/server` (including optional `expectedOwnerUid`) |
29138
29297
  | `implement` / `createImplement` / `createScopedImplement` / `createScopedImplementRegistry` / `createMultipartStream` | function | bind a contract to typed handlers, optionally typed per endpoint scope (same as `/server`) |
29139
29298
  | `NodeServerConfig` | _type_ | config for `serveNode` |
29140
29299
  | `NodeServerHandle` | _type_ | managed Node handle (`url`, `port`, `runtime`, `status`, `shutdown`) |
@@ -29142,7 +29301,7 @@ runtime-agnostic pieces of `stitchkit/server` and the error helpers.
29142
29301
  | `NodeSocketLifecycle` | _type_ | Bun-free Socket.IO lifecycle accepted by `serveNode` |
29143
29302
  | `HandlerConfig` / `ServiceDef` / `RawRoute` / `RawRouteContext` | _type_ | runtime-neutral handler types; raw routes default their host server to `unknown` and may declare stable `serviceName` / `action` observability identity |
29144
29303
  | `SocketIORequestPolicy` / `SocketIOServerConfig` / `SocketIOPeerLoaders` / `SocketIOServerHandle` | _type_ | runtime-neutral handshake policy, config, optional-peer loaders and the Bun-free Node handle with `io`, `attach` and lifecycle |
29145
- | `UnixClientTransportConfig` / `UnixClientTransport` | _type_ | Unix socket bounds, explicit response-body mode and owned Fetch-compatible handle |
29304
+ | `UnixClientTransportConfig` / `UnixClientTransport` | _type_ | Unix socket bounds, optional `expectedOwnerUid`, explicit response-body mode and owned Fetch-compatible handle |
29146
29305
  | `UnixResponseBodyMode` | _type_ | finite cumulative `bounded` mode or explicit pull-driven `streaming` mode |
29147
29306
  | `UnixClientTransportError` / `UnixClientTransportErrorCode` / `UnixClientDeliveryState` | class / _type_ | stable failure plus dispatch certainty; no cross-transport fallback |
29148
29307
  | `AppError` + `badRequest` / `unauthorized` / `forbidden` / `notFound` / `conflict` / `rateLimited` | — | error helpers (same as `/contract`) |
@@ -29161,9 +29320,9 @@ SDK nor the `ai` peer.
29161
29320
  | `defineCliCommand` | function | define one Zod-typed CLI-only executable command with optional validated-result presentation/exit policy |
29162
29321
  | `defineCliResult` | function | type a managed command's `present` / `exitCode` policy against its output schema, for `CliConfig.results` — [guide](../guide/cli.md#the-same-policy-for-a-managed-command) |
29163
29322
  | `parseCliArgs` | function | argv → typed tool args against a schema, in the grammar `createCli` reads a command with (`--bool=maybe` on a pure boolean is a `CliArgumentError`; a line asking for help or `--schema` is answered before arguments it cannot read, with empty `toolArgs`); inline `--field:=JSON` assigns a whole JSON value, including null, while ordinary string flags remain lexical; optional `separatedBefore` marks token boundaries left by stripped options so surrounding tokens are never glued; named array options together with bare positionals require an explicit `positionals` policy (advanced) |
29164
- | `scanCliInvocation` | function | single-pass CLI invocation scanner returning framework flags, application globals, selected command, command tokens and top-level help/version state — [guide](../guide/cli.md#global-flags) |
29323
+ | `scanCliInvocation` | function | single-pass CLI invocation scanner returning framework flags, application globals, selected command, command tokens, top-level help/version state, and an optional `error?: CliArgumentError` field on malformed flag syntax (returning `command: undefined` and `commandTokens: []` instead of throwing) — [guide](../guide/cli.md#global-flags), [ADR 0327](../decisions/0327-cli-option-projections-return-errors-as-fields.md) |
29165
29324
  | `routeCliArgv` | function | select the command using the framework's option grammar before catalogue discovery (thin projection over `scanCliInvocation`); takes `{ defaultCommand?, separatedBefore? }` and carries `separatedBefore` onto `commandArgv`; a line `createCli` refuses before a command runs (`--` before the command, `--json=maybe`, a repeated framework option) comes back with `error` and an empty `commandArgv`, unless help, `--version` or `--schema` answers it — [guide](../guide/cli.md#global-flags) |
29166
- | `extractCliGlobalOptions` | function | lift the application's own global options out of argv before routing (thin projection over `scanCliInvocation`); `globals` is always readable, and reading `argv` throws `CliArgumentError` when a lifted global separated a bare framework boolean from `true` or `false` (non-framework option boundaries return in `separatedBefore`) |
29325
+ | `extractCliGlobalOptions` | function | lift the application's own global options out of argv before routing (thin projection over `scanCliInvocation`); never throws on malformed flag syntax — returns `{ argv: [], globals, error }` when a global or framework flag is malformed or breaks a boolean boundary (non-framework option boundaries return in `separatedBefore`) — [ADR 0327](../decisions/0327-cli-option-projections-return-errors-as-fields.md) |
29167
29326
  | `coerceJsonArgs` | function | the second half of `parseCliArgs` — parse array/object values a consumer sends itself, including discovered MCP object guards restored from JSON Schema, without the `stitchkit/tools` barrel |
29168
29327
  | `CliArgumentError` | class | the refusal `parseCliArgs` and the view flags raise; a CLI reports it and exits `2` |
29169
29328
  | `renderCliView` | function | compute an aggregate over a result (`--count-by`, `--sum`, `--top`, `--table`) — [guide](../guide/cli.md#aggregate-views) |
@@ -29191,10 +29350,10 @@ SDK nor the `ai` peer.
29191
29350
  | `CliProfileStore` / `CliProfileStoreConfig` / `ResolvedCliProfile` | _type_ | the profile store, its directory/schema/hint config, and one resolution |
29192
29351
  | `CliResultView` | _type_ | the requested view — `count`, `sum`, or `records` (ordered and/or table-rendered) |
29193
29352
  | `CliViewOutput` | _type_ | a JSON value, or the one human-facing text shape |
29194
- | `CliGlobalOptionsParse` | _type_ | `{ argv, globals, separatedBefore? }` returned by `extractCliGlobalOptions` (`separatedBefore` present when a lifted global separated an option from a value-shaped token; a `--` before the command stays in `argv`) |
29353
+ | `CliGlobalOptionsParse` | _type_ | `{ argv, globals, separatedBefore?, error? }` returned by `extractCliGlobalOptions` (`error` holds any `CliArgumentError` with `argv: []`; `separatedBefore` is present when a lifted global separated an option from a value-shaped token; a `--` before the command stays in `argv`) |
29195
29354
  | `CliArgvRoute` | _type_ | `{ command, commandArgv, topLevelHelp, version, error?, separatedBefore? }` returned by `routeCliArgv` (`separatedBefore` indexes `commandArgv`, for `parseCliArgs`) |
29196
29355
  | `CliRouteOptions` | _type_ | `{ defaultCommand?, separatedBefore? }` accepted by `routeCliArgv`; `separatedBefore` is the set `extractCliGlobalOptions` returned |
29197
- | `CliInvocationScanOptions` / `CliInvocationScan` / `CliFrameworkOptions` | _types_ | options (`appGlobals`, `defaultCommand`), full scan output (`framework`, `globals`, `command`, `commandTokens`, `separatedBefore`, `topLevelHelp`, `helpFilter`, `version`), and parsed framework flags returned by `scanCliInvocation` |
29356
+ | `CliInvocationScanOptions` / `CliInvocationScan` / `CliFrameworkOptions` | _types_ | options (`appGlobals`, `defaultCommand`), full scan output (`framework`, `globals`, `command`, `commandTokens`, `separatedBefore`, `topLevelHelp`, `helpFilter`, `version`, `error?`), and parsed framework flags returned by `scanCliInvocation` |
29198
29357
  | `pollUntilDone` | function | the generic `--wait` poller (advanced) |
29199
29358
  | `emitResult` | function | write a pretty or compact `ToolResult` record to stdout/stderr + exit code (advanced) |
29200
29359
  | `cliExitCode` | function | the exit code a result earns, from the same table, without writing anything — so an in-process run and the printed path cannot disagree |