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/cli.3.txt CHANGED
@@ -24,9 +24,9 @@ SDK nor the `ai` peer.
24
24
  | `defineCliCommand` | function | define one Zod-typed CLI-only executable command with optional validated-result presentation/exit policy |
25
25
  | `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) |
26
26
  | `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) |
27
- | `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) |
27
+ | `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) |
28
28
  | `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) |
29
- | `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`) |
29
+ | `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) |
30
30
  | `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 |
31
31
  | `CliArgumentError` | class | the refusal `parseCliArgs` and the view flags raise; a CLI reports it and exits `2` |
32
32
  | `renderCliView` | function | compute an aggregate over a result (`--count-by`, `--sum`, `--top`, `--table`) — [guide](../guide/cli.md#aggregate-views) |
@@ -54,10 +54,10 @@ SDK nor the `ai` peer.
54
54
  | `CliProfileStore` / `CliProfileStoreConfig` / `ResolvedCliProfile` | _type_ | the profile store, its directory/schema/hint config, and one resolution |
55
55
  | `CliResultView` | _type_ | the requested view — `count`, `sum`, or `records` (ordered and/or table-rendered) |
56
56
  | `CliViewOutput` | _type_ | a JSON value, or the one human-facing text shape |
57
- | `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`) |
57
+ | `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`) |
58
58
  | `CliArgvRoute` | _type_ | `{ command, commandArgv, topLevelHelp, version, error?, separatedBefore? }` returned by `routeCliArgv` (`separatedBefore` indexes `commandArgv`, for `parseCliArgs`) |
59
59
  | `CliRouteOptions` | _type_ | `{ defaultCommand?, separatedBefore? }` accepted by `routeCliArgv`; `separatedBefore` is the set `extractCliGlobalOptions` returned |
60
- | `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` |
60
+ | `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` |
61
61
  | `pollUntilDone` | function | the generic `--wait` poller (advanced) |
62
62
  | `emitResult` | function | write a pretty or compact `ToolResult` record to stdout/stderr + exit code (advanced) |
63
63
  | `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 |
package/llms/cli.txt CHANGED
@@ -623,6 +623,7 @@ import { CliArgumentError, extractCliGlobalOptions, parseCliArgs, routeCliArgv }
623
623
 
624
624
  try {
625
625
  const lifted = extractCliGlobalOptions(argv, GlobalsSchema)
626
+ if (lifted.error !== undefined) return refuse(lifted.error.message) // exit 2, nothing ran
626
627
  const route = routeCliArgv(lifted.argv, { separatedBefore: lifted.separatedBefore })
627
628
  if (route.error !== undefined) return refuse(route.error) // exit 2, nothing ran
628
629
  if (route.command === undefined || route.topLevelHelp) return showHelp()
@@ -157,7 +157,7 @@ invisible: it succeeds on the machine that happens to have the database.
157
157
  | --- | --- |
158
158
  | `schemaVersion` | which format this is; checked before anything else |
159
159
  | `kind` | `application` or `library` |
160
- | `identity` | `slug`, `name`, `version`, `description` per locale |
160
+ | `identity` | `slug`, `name`, `description` per locale (the project's own version lives solely in the root `package.json`) |
161
161
  | `roles` | each with its own working directory, per-mode argv commands, optional listener and `drainFloorMs` |
162
162
  | `build` | the build command and the artifact paths it produces |
163
163
  | `requires` | what the code needs and does not provide, per phase (`release`, `start`) |
@@ -248,7 +248,7 @@ is how a partially understood declaration becomes a running, wrong deployment.
248
248
  | `PROJECT_DECLARATION_SCHEMA_VERSION` | constant | the declaration format this build understands — the number a reader refuses on |
249
249
  | `namesAMachine` | function | why a string names a particular machine, or `undefined` — the one predicate every free string is checked against |
250
250
  | `findProjectRole` | function | the role with a given name, or `undefined` |
251
- | `ProjectIdentitySchema` / `ProjectIdentity` | schema / _type_ | `slug`, `name`, `version` and a per-locale `description` |
251
+ | `ProjectIdentitySchema` / `ProjectIdentity` | schema / _type_ | `slug`, `name` and a per-locale `description` (version lives solely in the root `package.json`) |
252
252
  | `ProjectRoleSchema` / `ProjectRole` | schema / _type_ | one runnable role: a `workingDirectory` inside the source, per-mode `commands`, an optional `listener`, and `drainFloorMs` |
253
253
  | `ProjectCommandSchema` / `ProjectCommand` | schema / _type_ | `executable` plus `args` — argv, never a shell string |
254
254
  | `ProjectRoleCommandSchema` / `ProjectRoleCommand` | schema / _type_ | a command run under a supervisor: additionally never a script runner, because a launcher duplicates the shutdown signal |
package/llms/files.txt CHANGED
@@ -56,4 +56,4 @@ available from `stitchkit/contract`.
56
56
  | `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` |
57
57
  | `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 |
58
58
  | `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 |
59
- | `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 |
59
+ | `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 |
package/llms/node.txt CHANGED
@@ -28,7 +28,7 @@ runtime-agnostic pieces of `stitchkit/server` and the error helpers.
28
28
  | `createHandler` | function | the router as a bare `(req) => Response` (same as `/server`) |
29
29
  | `createLocalHostGuard` / `LocalHostGuard` / `LocalHostGuardConfig` / `LocalHostRefusal` | function / _types_ | the local-host guard for `serveNode` (same as `/server`) |
30
30
  | `createSocketIOServer` | function | the typed Node Socket.IO server (`io` + `attach`; no Bun engine declarations) |
31
- | `createUnixClientTransport` | function | the same fail-closed Bun/Node Unix client adapter exported by `stitchkit/server` |
31
+ | `createUnixClientTransport` | function | the same fail-closed Bun/Node Unix client adapter exported by `stitchkit/server` (including optional `expectedOwnerUid`) |
32
32
  | `implement` / `createImplement` / `createScopedImplement` / `createScopedImplementRegistry` / `createMultipartStream` | function | bind a contract to typed handlers, optionally typed per endpoint scope (same as `/server`) |
33
33
  | `NodeServerConfig` | _type_ | config for `serveNode` |
34
34
  | `NodeServerHandle` | _type_ | managed Node handle (`url`, `port`, `runtime`, `status`, `shutdown`) |
@@ -36,7 +36,7 @@ runtime-agnostic pieces of `stitchkit/server` and the error helpers.
36
36
  | `NodeSocketLifecycle` | _type_ | Bun-free Socket.IO lifecycle accepted by `serveNode` |
37
37
  | `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 |
38
38
  | `SocketIORequestPolicy` / `SocketIOServerConfig` / `SocketIOPeerLoaders` / `SocketIOServerHandle` | _type_ | runtime-neutral handshake policy, config, optional-peer loaders and the Bun-free Node handle with `io`, `attach` and lifecycle |
39
- | `UnixClientTransportConfig` / `UnixClientTransport` | _type_ | Unix socket bounds, explicit response-body mode and owned Fetch-compatible handle |
39
+ | `UnixClientTransportConfig` / `UnixClientTransport` | _type_ | Unix socket bounds, optional `expectedOwnerUid`, explicit response-body mode and owned Fetch-compatible handle |
40
40
  | `UnixResponseBodyMode` | _type_ | finite cumulative `bounded` mode or explicit pull-driven `streaming` mode |
41
41
  | `UnixClientTransportError` / `UnixClientTransportErrorCode` / `UnixClientDeliveryState` | class / _type_ | stable failure plus dispatch certainty; no cross-transport fallback |
42
42
  | `AppError` + `badRequest` / `unauthorized` / `forbidden` / `notFound` / `conflict` / `rateLimited` | — | error helpers (same as `/contract`) |
package/llms/server.5.txt CHANGED
@@ -227,8 +227,8 @@ Also re-exports the error helpers from `stitchkit/contract`.
227
227
  | `StreamingRouteOptions` | _type_ | options for `streamingRoute` / `ndjsonRoute` / `sseRoute` |
228
228
  | `StreamingSourceContext` | _type_ | what a streaming source is given, including the cancellation `signal` |
229
229
  | `StreamingFormat` | _type_ | `'ndjson' \| 'sse'` |
230
- | `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) |
231
- | `UnixClientTransportConfig` | _type_ | absolute socket path plus request/header/connection/redirect bounds and an explicit bounded-or-streaming response policy |
230
+ | `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) |
231
+ | `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 |
232
232
  | `UnixClientTransport` | _type_ | `{ fetch, closed, close() }`; `close()` settles owned active work |
233
233
  | `UnixResponseBodyMode` | _type_ | `bounded \| streaming`; bounded is the 16 MiB cumulative default, streaming keeps pull-driven buffering without a lifetime total |
234
234
  | `UnixClientTransportError` | class | stable transport failure with `code` and dispatch certainty in `delivery` |
@@ -29,13 +29,13 @@ Peer-free server-only host supervision primitives built on `stitchkit/files` and
29
29
 
30
30
  | Export | Kind | Summary |
31
31
  |--------|------|---------|
32
- | `renderSystemdServiceUnit` | function | render strictly escaped `.service` unit (`%`, `$`, `\`, `"`, injection rejection, explicit `allowHomeSpecifier`) |
33
- | `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 |
34
- | `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`) |
32
+ | `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`) |
33
+ | `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 |
34
+ | `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`) |
35
35
  | `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`) |
36
- | `SystemdScopeSchema` / `SystemdScope` / `SystemdServiceUnitConfigSchema` / `SystemdServiceUnitConfig` | schema / _type_ | strict Zod v4 schemas and types for `system`/`user` `.service` configuration |
36
+ | `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 |
37
37
  | `SystemdUnitError` / `SystemdUnitErrorCode` | class / _type_ | typed systemd inspection/apply/rollback error |
38
- | `SystemdCommandResult` / `SystemdHostAdapter` / `CheckSystemdUnitOptions` / `SystemdUnitCheckStatus` / `SystemdUnitCheckResult` / `SystemdUnitQueryOptions` / `ApplySystemdUnitOptions` / `SystemdApplyResult` | _types_ | adapter, inspection, query and apply contracts |
38
+ | `SystemdCommandResult` / `SystemdHostAdapter` / `CheckSystemdUnitOptions` / `SystemdUnitCheckStatus` / `SystemdUnitCheckResult` / `SystemdUnitQueryOptions` / `ApplySystemdUnitOptions` / `SystemdApplyResult` / `CheckSystemdTimerPairOptions` / `SystemdTimerPairCheckResult` / `InstallSystemdTimerPairOptions` / `SystemdTimerPairInstallResult` | _types_ | adapter, inspection, query, apply and timer-pair contracts |
39
39
  | `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 |
40
40
 
41
41
  ### macOS `launchd` supervision
@@ -56,81 +56,81 @@ own, recorded as an ADR.
56
56
 
57
57
  | Import | Use in | Maturity | Holds |
58
58
  |--------|--------|----------|-------|
59
- | `stitchkit` | browser **and** server | stable<br>_redefined in 5 of the 34 minors since 0.94.0, most recently 0.127.0_ | `defineContract`, `createClient`, `createHttpClient`, `createSocketIOClient`, `parseSSE`, the error model |
60
- | `stitchkit/http` | browser, React Native/Hermes **and** server | evolving<br>_redefined in 2 of the 34 minors since 0.94.0, most recently 0.127.0_ | typed HTTP client factories and `ApiError`, without optional realtime peers |
61
- | `stitchkit/realtime` | browser, React Native/Hermes **and** server | evolving<br>_redefined in 1 of the 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 |
62
- | `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 |
63
- | `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 |
64
- | `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 |
65
- | `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 |
66
- | `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 |
67
- | `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` |
68
- | `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 |
69
- | `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 |
70
- | `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 |
71
- | `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 |
72
- | `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 |
73
- | `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 |
74
- | `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 |
75
- | `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` |
76
- | `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) |
77
- | `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 |
78
- | `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 |
79
- | `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 |
80
- | `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 |
81
- | `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 |
82
- | `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 |
83
- | `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 |
84
- | `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 |
85
- | `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 |
86
- | `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 |
87
- | `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 |
88
- | `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 |
89
- | `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 |
90
- | `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 |
91
- | `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 |
92
- | `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` |
93
- | `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` |
94
- | `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 |
95
- | `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 |
96
- | `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 |
97
- | `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 |
98
- | `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` |
99
- | `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 |
100
- | `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` |
101
- | `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 |
102
- | `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 |
103
- | `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 |
104
- | `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 |
105
- | `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 |
106
- | `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 |
107
- | `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 |
108
- | `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) |
109
- | `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 |
110
- | `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 |
111
- | `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) |
112
- | `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 |
113
- | `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 |
114
- | `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 |
115
- | `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 |
116
- | `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 |
117
- | `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 |
118
- | `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 |
119
- | `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 |
120
- | `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 |
121
- | `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 |
122
- | `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 |
123
- | `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` |
124
- | `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 |
125
- | `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`) |
126
- | `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 |
127
- | `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 |
59
+ | `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 |
60
+ | `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 |
61
+ | `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 |
62
+ | `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 |
63
+ | `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 |
64
+ | `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 |
65
+ | `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 |
66
+ | `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 |
67
+ | `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` |
68
+ | `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 |
69
+ | `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 |
70
+ | `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 |
71
+ | `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 |
72
+ | `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 |
73
+ | `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 |
74
+ | `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 |
75
+ | `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` |
76
+ | `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) |
77
+ | `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 |
78
+ | `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 |
79
+ | `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 |
80
+ | `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 |
81
+ | `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 |
82
+ | `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 |
83
+ | `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 |
84
+ | `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 |
85
+ | `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 |
86
+ | `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 |
87
+ | `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 |
88
+ | `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 |
89
+ | `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 |
90
+ | `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 |
91
+ | `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 |
92
+ | `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` |
93
+ | `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` |
94
+ | `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 |
95
+ | `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 |
96
+ | `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 |
97
+ | `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 |
98
+ | `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` |
99
+ | `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 |
100
+ | `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` |
101
+ | `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 |
102
+ | `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 |
103
+ | `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 |
104
+ | `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 |
105
+ | `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 |
106
+ | `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 |
107
+ | `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 |
108
+ | `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) |
109
+ | `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 |
110
+ | `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 |
111
+ | `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) |
112
+ | `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 |
113
+ | `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 |
114
+ | `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 |
115
+ | `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 |
116
+ | `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 |
117
+ | `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 |
118
+ | `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 |
119
+ | `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 |
120
+ | `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 |
121
+ | `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 |
122
+ | `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 |
123
+ | `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` |
124
+ | `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 |
125
+ | `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`) |
126
+ | `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 |
127
+ | `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 |
128
128
  | `stitchkit-tui` | terminal (Bun) | evolving | optional official OpenTUI host over a caller-composed headless runtime |
129
- | `stitchkit/application` | browser + server | evolving<br>_redefined in 9 of the 34 minors since 0.94.0, most recently 0.127.0_ | managed resource graph, readiness, admission, schedules, subtree restart and bounded shutdown |
130
- | `stitchkit/application/grammy` | server | evolving<br>_redefined in 0 of the 34 minors since 0.94.0_ | a grammY bot as application resources — configuration, then polling with updates admitted by batch — and the webhook adapter |
131
- | `stitchkit/application/opentelemetry` | server | evolving<br>_redefined in 0 of the 34 minors since 0.94.0_ | maps application snapshots onto an injected OpenTelemetry `Meter` |
132
- | `stitchkit/application/diagnostic-journal` | server | evolving<br>_redefined in 3 of the 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 |
133
- | `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 |
129
+ | `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 |
130
+ | `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 |
131
+ | `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` |
132
+ | `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 |
133
+ | `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 |
134
134
 
135
135
  Rule of thumb: browser code imports `stitchkit` and `stitchkit/react`; server
136
136
  code adds `stitchkit/server` (or `stitchkit/node` on Node) and opts into
@@ -400,10 +400,14 @@ adapter structurally owns dispatch: relative and absolute redirects use the same
400
400
  socket, and a missing socket cannot fall through to that host over TCP. Before
401
401
  connecting, `createUnixClientTransport` checks that `socketPath` is at most
402
402
  **103 UTF-8 bytes**, that its parent directory is a real directory (not a
403
- symlink) owned by the current OS user with `(mode & 0o022) === 0`, and that the
404
- target is a non-symlink socket owned by the current user — refusing violations
403
+ symlink) owned by the expected OS user with `(mode & 0o022) === 0`, and that the
404
+ target is a non-symlink socket owned by that same user — refusing violations
405
405
  with a non-retryable `UnixClientTransportError` (`code: 'UNIX_TARGET_REFUSED'`,
406
- `delivery: 'not-dispatched'`). Defaults are 16 MiB request/response bodies,
406
+ `delivery: 'not-dispatched'`). By default the expected owner is the current
407
+ process UID (`process.getuid()`); pass `expectedOwnerUid` (for example `0` for a
408
+ root-owned system daemon socket accessed via group permissions) to pin a
409
+ different POSIX owner UID explicitly while keeping every symlink, socket-type
410
+ and directory-write check intact. Defaults are 16 MiB request/response bodies,
407
411
  64 KiB headers, 30 s to response headers, eight connections and five redirects.
408
412
 
409
413
  `maxHeaderBytes` is enforced before exposing a response. Bun's owned parser
package/llms/tools.3.txt CHANGED
@@ -61,7 +61,7 @@ server SDK), [`stitchkit/tools/agent`](#stitchkittoolsagent) (the `ai` peer) and
61
61
  | `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 |
62
62
  | `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 |
63
63
  | `ToolExtend` | _type_ | extra-args extension for `mountMcp` / `mountAgent` |
64
- | `ToolAccess` / `ToolGate` / `ToolOpenReason` | _types_ | mandatory mount-time access policy: `{ gate: ToolGate }` (with required `beforeHandle`) or explicit `{ open: 'public' \| 'local-operator' \| 'remote', afterHandle? }` |
64
+ | `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) |
65
65
  | `ToolLifecycle` | _type_ | `beforeHandle` / `afterHandle` hooks composed into a `ToolGate` via `composeToolLifecycle` |
66
66
  | `ToolExecutionControlReason` | _type_ | internal managed-execution stop reason: stale run or requested interruption |
67
67
  | `ToolExecutionControlError` | class | control-flow error used to unwind a superseded managed tool call without presenting it as a model-facing tool failure |
@@ -213,7 +213,8 @@ Advanced building blocks — the shared machinery the mounts are built on.
213
213
  | `ToolCallRecord` | _type_ | the structured record `createToolLogger` passes to `onRecord` |
214
214
  | `TransportSummary` | _type_ | `{ contractServices, runtimeTools, totals, sources }` from `summarizeTransports` |
215
215
  | `TransportCounts` | _type_ | per-transport counts (`{ HTTP, MCP, AGENT, CLI }`) |
216
- | `ToolSurfaceProjection` | _type_ | the one readonly `{ services?, runtimeTools? }` container shared by full, MCP-only and introspection surfaces (`buildToolManifest`, `listToolNames`, `summarizeTransports` take `ToolSurfaceProjection<RuntimeToolDefinition>`) |
216
+ | `ToolSurfaceProjection` | _type_ | the one readonly `{ services?, runtimeTools? }` container shared by full, MCP-only and introspection surfaces (`buildToolManifest`, `listToolNames` and `describeToolCatalog` accept `ToolSurfaceProjection<SurfaceRuntimeToolDefinition>`) |
217
+ | `SurfaceRuntimeToolDefinition` | _type_ | peer-free non-executable runtime-tool descriptor accepted by `listToolNames`, `buildToolManifest` and `describeToolCatalog` (including static `AGENT_*_TOOL_DESCRIPTORS`) |
217
218
  | `ToolManifestConfig` | _type_ | mixed surface plus required model-facing `transport` and presentation options (`flattenUnionInput`, `inputRecursionDepth`) |
218
219
  | `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 |
219
220
  | `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 |
@@ -0,0 +1,147 @@
1
+ # Upgrading 0.128.0 → 0.128.0 — stitchkit docs slice
2
+
3
+ > Generated from the `docs/` tree by `bun run gen:llms`. The index of all slices is
4
+ > `llms.txt` in this package.
5
+
6
+ Contains: Guide: Upgrading, 0.128.0 → 0.128.0 (docs/guide/upgrading.md)
7
+
8
+ ==============================================================================
9
+ # Guide: Upgrading, 0.128.0 → 0.128.0 (docs/guide/upgrading.md)
10
+ ==============================================================================
11
+
12
+ ## Released migration: 0.128.0
13
+
14
+ ### invocation-payload-lifecycle
15
+
16
+ **Who must act:** every caller of `createModelInvocationLedger` from `stitchkit/agent-runtime`
17
+ that reads `readPayload`, reads `sent.artifactId` on `provider/request` or top-level `artifactId`
18
+ on `provider/response` (`ModelInvocationRecord`), passes `authorize` to `ModelInvocationConfig`,
19
+ or relies on `maxPayloadBytes` aborting the provider call.
20
+
21
+ 1. **`readPayload` returns a discriminated status:** encrypted payloads redacted by
22
+ `purgePayloads` / `store.purgeExpiredPayloads` stay readable as `{ status: 'expired', expiredAt }`
23
+ while live payloads return `{ status: 'available', payload }`:
24
+
25
+ ```ts
26
+ // before
27
+ const payload = await ledger.readPayload({ conversationId, artifactId }, ctx)
28
+ console.log(payload.payload)
29
+
30
+ // after
31
+ const result = await ledger.readPayload({ conversationId, artifactId }, ctx)
32
+ if (result.status === 'available') {
33
+ console.log(result.payload)
34
+ } else {
35
+ console.log('expired at', result.expiredAt)
36
+ }
37
+ ```
38
+
39
+ 2. **`sent.artifactId` (`provider/request`) and top-level `artifactId` (`provider/response`) are optional when oversized:** exceeding
40
+ `maxPayloadBytes` no longer aborts or prevents the provider call. Instead, the ledger omits the
41
+ encrypted body, records `payloadOmitted: 'max-payload-bytes'` (with `artifactId` absent and
42
+ `payloadSha256` preserved), and reports `InvocationPayloadTooLargeError` via `complete().receiptError`:
43
+
44
+ ```ts
45
+ // before
46
+ const id: string = record.sent.artifactId
47
+
48
+ // after
49
+ if (record.sent.artifactId !== undefined) {
50
+ await ledger.readPayload({ conversationId, artifactId: record.sent.artifactId }, ctx)
51
+ } else if (record.sent.payloadOmitted === 'max-payload-bytes') {
52
+ // body was intentionally omitted past maxPayloadBytes
53
+ }
54
+ ```
55
+
56
+ 3. **`ModelInvocationConfig.authorize` handles `'purge-payloads'`:** if your `authorize` callback
57
+ switches exhaustively on `input.action`, handle the new `'purge-payloads'` variant alongside
58
+ `'complete'`, `'agent'`, `'read'`, and `'read-payload'` (single-argument `input: ModelInvocationAuthorizationInput` carrying `input.context`):
59
+
60
+ ```ts
61
+ authorize: (input) => {
62
+ switch (input.action) {
63
+ case 'complete':
64
+ case 'agent':
65
+ case 'read':
66
+ case 'read-payload':
67
+ case 'purge-payloads':
68
+ return allow(input.context, input)
69
+ }
70
+ }
71
+ ```
72
+
73
+ ### cli-option-projections-error-field
74
+
75
+ **Who must act:** every caller of `extractCliGlobalOptions` or `scanCliInvocation` from
76
+ `stitchkit/cli` that caught a thrown `CliArgumentError` on call or on `.argv` access (→ ADR 0327).
77
+
78
+ Both projections now return malformed CLI syntax on an explicit `error?: CliArgumentError` field
79
+ with fail-closed empty routing fields (`argv: []` on `extractCliGlobalOptions`; `command: undefined`
80
+ and `commandTokens: []` on `scanCliInvocation`) instead of throwing on call or via a getter on `.argv`:
81
+
82
+ ```ts
83
+ // before
84
+ let parsed
85
+ try {
86
+ parsed = extractCliGlobalOptions(argv, globals)
87
+ void parsed.argv
88
+ } catch (err) {
89
+ if (err instanceof CliArgumentError) {
90
+ parsed = { globals: {}, argv: [] }
91
+ } else {
92
+ throw err
93
+ }
94
+ }
95
+
96
+ // after
97
+ const parsed = extractCliGlobalOptions(argv, globals)
98
+ if (parsed.error) {
99
+ // handle parsed.error, or pass raw argv to createCli(...) for exit-code-2 reporting
100
+ }
101
+ ```
102
+
103
+ ### declaration-single-version
104
+
105
+ **Who must act:** every repository whose `project.json` is validated by `stitchkit/declaration`
106
+ and still carries `identity.version`, or whose server/CLI code reads `declaration.identity.version`.
107
+
108
+ The root `package.json` is the single source of truth for the repository version (whether SemVer or
109
+ CalVer). `ProjectIdentitySchema` no longer accepts `identity.version`:
110
+
111
+ ```jsonc
112
+ // before (project.json)
113
+ {
114
+ "identity": {
115
+ "slug": "my-app",
116
+ "name": "My App",
117
+ "version": "0.1.0",
118
+ "description": { "en": "My App." }
119
+ }
120
+ }
121
+
122
+ // after (project.json)
123
+ {
124
+ "identity": {
125
+ "slug": "my-app",
126
+ "name": "My App",
127
+ "description": { "en": "My App." }
128
+ }
129
+ }
130
+ ```
131
+
132
+ Read your application version from the root `package.json` for a single-version application — or
133
+ from the package's own `package.json` if that package is released independently — instead of
134
+ `identity.version` (for example, in OpenAPI `info.version`, MCP `serverInfo.version`, and
135
+ `createCli({ version })`).
136
+
137
+ ### read-only-surface-inspection
138
+
139
+ **Who must act:** optional — hosts and test suites that currently mount a tool surface with
140
+ `access: { open: 'local-operator' }` solely for read-only surface inspection.
141
+
142
+ Pass `access: { inspect: true }` to `mountAgent`, `mountMcp`, `buildMcpServer`, `createToolInvoker`,
143
+ `createCli`, `createCliInvoker`, or `createDeferredAgentToolSurface().mount` whenever a caller only
144
+ needs catalogs, schemas, `--help`, `--schema`, or `commands`. Every tool execution fails closed with
145
+ `FORBIDDEN` before extensions, hooks, durability, multi-round resolvers, or auth run. Keep
146
+ `access: { gate }` for authenticated execution surfaces and `access: { open: 'local-operator' }` for
147
+ tests or local tools that genuinely execute handlers.
@@ -11,6 +11,7 @@ Contains: Guide: Upgrading, general (docs/guide/upgrading.md)
11
11
 
12
12
  Load this slice, then every range slice between your installed version and the target:
13
13
 
14
+ - 0.128.0 → 0.128.0: `llms/upgrading-0.128.0.txt`
14
15
  - 0.127.0 → 0.127.0: `llms/upgrading-0.127.0.txt`
15
16
  - 0.106.0 → 0.126.0: `llms/upgrading-0.106.0-0.126.0.txt`
16
17
  - 0.96.0 → 0.105.0: `llms/upgrading-0.96.0-0.105.0.txt`