stitchkit 0.127.0 → 0.129.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 (313) hide show
  1. package/CHANGELOG.md +194 -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 +9 -6
  16. package/dist/agent-executor/claude/transcript.d.ts.map +1 -1
  17. package/dist/agent-executor/claude-sdk/controls.d.ts +19 -0
  18. package/dist/agent-executor/claude-sdk/controls.d.ts.map +1 -0
  19. package/dist/agent-executor/claude-sdk/driver.d.ts +118 -4
  20. package/dist/agent-executor/claude-sdk/driver.d.ts.map +1 -1
  21. package/dist/agent-executor/claude-sdk/query-loop.d.ts +46 -0
  22. package/dist/agent-executor/claude-sdk/query-loop.d.ts.map +1 -0
  23. package/dist/agent-executor/claude-sdk/query-options.d.ts +27 -0
  24. package/dist/agent-executor/claude-sdk/query-options.d.ts.map +1 -0
  25. package/dist/agent-executor/claude-sdk/session.d.ts +6 -5
  26. package/dist/agent-executor/claude-sdk/session.d.ts.map +1 -1
  27. package/dist/agent-executor/codex/classify.d.ts.map +1 -1
  28. package/dist/agent-executor/codex/connect.d.ts +45 -0
  29. package/dist/agent-executor/codex/connect.d.ts.map +1 -0
  30. package/dist/agent-executor/codex/driver.d.ts +55 -10
  31. package/dist/agent-executor/codex/driver.d.ts.map +1 -1
  32. package/dist/agent-executor/codex/limits.d.ts +11 -2
  33. package/dist/agent-executor/codex/limits.d.ts.map +1 -1
  34. package/dist/agent-executor/codex/protocol.d.ts +75 -6
  35. package/dist/agent-executor/codex/protocol.d.ts.map +1 -1
  36. package/dist/agent-executor/codex/session-controls.d.ts +155 -0
  37. package/dist/agent-executor/codex/session-controls.d.ts.map +1 -0
  38. package/dist/agent-executor/codex/session.d.ts +28 -30
  39. package/dist/agent-executor/codex/session.d.ts.map +1 -1
  40. package/dist/agent-executor/codex/unix-socket-target.d.ts +26 -0
  41. package/dist/agent-executor/codex/unix-socket-target.d.ts.map +1 -0
  42. package/dist/agent-executor/codex/unix-socket.d.ts +26 -0
  43. package/dist/agent-executor/codex/unix-socket.d.ts.map +1 -0
  44. package/dist/agent-executor/codex/ws-frame.d.ts +15 -0
  45. package/dist/agent-executor/codex/ws-frame.d.ts.map +1 -0
  46. package/dist/agent-executor/contract.d.ts +2 -0
  47. package/dist/agent-executor/contract.d.ts.map +1 -1
  48. package/dist/agent-executor/engine-process.d.ts +9 -0
  49. package/dist/agent-executor/engine-process.d.ts.map +1 -1
  50. package/dist/agent-executor/hello.d.ts +8 -0
  51. package/dist/agent-executor/hello.d.ts.map +1 -1
  52. package/dist/agent-executor/image-input.d.ts +71 -0
  53. package/dist/agent-executor/image-input.d.ts.map +1 -0
  54. package/dist/agent-executor/session-primitives.d.ts +0 -3
  55. package/dist/agent-executor/session-primitives.d.ts.map +1 -1
  56. package/dist/agent-runtime/agent-tool.d.ts +21 -7
  57. package/dist/agent-runtime/agent-tool.d.ts.map +1 -1
  58. package/dist/agent-runtime/branch-contract.d.ts +1 -0
  59. package/dist/agent-runtime/branch-contract.d.ts.map +1 -1
  60. package/dist/agent-runtime/branch-identities.d.ts +5 -2
  61. package/dist/agent-runtime/branch-identities.d.ts.map +1 -1
  62. package/dist/agent-runtime/branch-messages.d.ts +9 -9
  63. package/dist/agent-runtime/branch-messages.d.ts.map +1 -1
  64. package/dist/agent-runtime/branch-observations.d.ts +49 -36
  65. package/dist/agent-runtime/branch-observations.d.ts.map +1 -1
  66. package/dist/agent-runtime/branch-provider.d.ts +14 -8
  67. package/dist/agent-runtime/branch-provider.d.ts.map +1 -1
  68. package/dist/agent-runtime/branch-source.d.ts +13 -1
  69. package/dist/agent-runtime/branch-source.d.ts.map +1 -1
  70. package/dist/agent-runtime/child-tools.d.ts +64 -0
  71. package/dist/agent-runtime/child-tools.d.ts.map +1 -1
  72. package/dist/agent-runtime/event-search-tools.d.ts +82 -5
  73. package/dist/agent-runtime/event-search-tools.d.ts.map +1 -1
  74. package/dist/agent-runtime/invocation-attempt.d.ts +1 -1
  75. package/dist/agent-runtime/invocation-attempt.d.ts.map +1 -1
  76. package/dist/agent-runtime/invocation-payload.d.ts +12 -0
  77. package/dist/agent-runtime/invocation-payload.d.ts.map +1 -1
  78. package/dist/agent-runtime/invocation-read.d.ts +6 -3
  79. package/dist/agent-runtime/invocation-read.d.ts.map +1 -1
  80. package/dist/agent-runtime/invocation-schema.d.ts +50 -8
  81. package/dist/agent-runtime/invocation-schema.d.ts.map +1 -1
  82. package/dist/agent-runtime/invocations.d.ts +20 -9
  83. package/dist/agent-runtime/invocations.d.ts.map +1 -1
  84. package/dist/agent-runtime/postgres.d.ts.map +1 -1
  85. package/dist/agent-runtime/schedule-tools.d.ts +30 -0
  86. package/dist/agent-runtime/schedule-tools.d.ts.map +1 -1
  87. package/dist/agent-runtime/schemas-invocation-payload.d.ts +48 -0
  88. package/dist/agent-runtime/schemas-invocation-payload.d.ts.map +1 -0
  89. package/dist/agent-runtime/sql-events.d.ts.map +1 -1
  90. package/dist/agent-runtime/sql-rows.d.ts +10 -10
  91. package/dist/agent-runtime/sql-session.d.ts +11 -0
  92. package/dist/agent-runtime/sql-session.d.ts.map +1 -1
  93. package/dist/agent-runtime/sqlite-transactions.d.ts.map +1 -1
  94. package/dist/agent-runtime/state-tools.d.ts +55 -0
  95. package/dist/agent-runtime/state-tools.d.ts.map +1 -1
  96. package/dist/agent-runtime/store-branch.d.ts.map +1 -1
  97. package/dist/agent-runtime/store-conformance-lifecycle.d.ts +20 -20
  98. package/dist/agent-runtime/store-conformance-support.d.ts +10 -10
  99. package/dist/agent-runtime/store-create.d.ts.map +1 -1
  100. package/dist/agent-runtime/store-driver-contract.d.ts +12 -0
  101. package/dist/agent-runtime/store-driver-contract.d.ts.map +1 -1
  102. package/dist/agent-runtime/store-memory-events.d.ts.map +1 -1
  103. package/dist/agent-runtime/store.d.ts +7 -0
  104. package/dist/agent-runtime/store.d.ts.map +1 -1
  105. package/dist/agent-runtime/terminal-commit.d.ts +10 -10
  106. package/dist/declaration/declaration.d.ts +6 -3
  107. package/dist/declaration/declaration.d.ts.map +1 -1
  108. package/dist/entrypoints/agent-executor/acp.d.ts +1 -1
  109. package/dist/entrypoints/agent-executor/acp.d.ts.map +1 -1
  110. package/dist/entrypoints/agent-executor/acp.js +28 -17
  111. package/dist/entrypoints/agent-executor/claude-sdk.d.ts +1 -1
  112. package/dist/entrypoints/agent-executor/claude-sdk.d.ts.map +1 -1
  113. package/dist/entrypoints/agent-executor/claude-sdk.js +543 -96
  114. package/dist/entrypoints/agent-executor/claude.js +40 -21
  115. package/dist/entrypoints/agent-executor/codex.d.ts +4 -0
  116. package/dist/entrypoints/agent-executor/codex.d.ts.map +1 -1
  117. package/dist/entrypoints/agent-executor/codex.js +1530 -207
  118. package/dist/entrypoints/agent-executor.js +7 -7
  119. package/dist/entrypoints/agent-runtime/browser.js +1 -1
  120. package/dist/entrypoints/agent-runtime/coding-tools.js +3 -3
  121. package/dist/entrypoints/agent-runtime/harness.js +10 -11
  122. package/dist/entrypoints/agent-runtime/openrouter.js +4 -4
  123. package/dist/entrypoints/agent-runtime/postgres.js +12 -7
  124. package/dist/entrypoints/agent-runtime/realtime.js +4 -4
  125. package/dist/entrypoints/agent-runtime/sandbox.js +7 -7
  126. package/dist/entrypoints/agent-runtime/sqlite/bun.js +7 -7
  127. package/dist/entrypoints/agent-runtime/sqlite/node.js +7 -7
  128. package/dist/entrypoints/agent-runtime/testing.js +9 -9
  129. package/dist/entrypoints/agent-runtime.d.ts +9 -7
  130. package/dist/entrypoints/agent-runtime.d.ts.map +1 -1
  131. package/dist/entrypoints/agent-runtime.js +254 -207
  132. package/dist/entrypoints/application/diagnostic-journal.js +4 -4
  133. package/dist/entrypoints/application/directory-inbox.js +8 -8
  134. package/dist/entrypoints/application/opentelemetry.js +2 -2
  135. package/dist/entrypoints/application.js +2 -2
  136. package/dist/entrypoints/cli/publish.js +8 -8
  137. package/dist/entrypoints/cli.js +12 -11
  138. package/dist/entrypoints/contract.js +2 -2
  139. package/dist/entrypoints/declaration.js +0 -1
  140. package/dist/entrypoints/files/packaging.js +2 -2
  141. package/dist/entrypoints/files.js +42 -19
  142. package/dist/entrypoints/handler.js +4 -4
  143. package/dist/entrypoints/http.js +5 -5
  144. package/dist/entrypoints/index.js +7 -7
  145. package/dist/entrypoints/node.js +7 -7
  146. package/dist/entrypoints/observability.js +4 -4
  147. package/dist/entrypoints/primitives.js +2 -2
  148. package/dist/entrypoints/process.js +6 -6
  149. package/dist/entrypoints/react.js +1 -1
  150. package/dist/entrypoints/remote.js +2 -2
  151. package/dist/entrypoints/server.js +10 -10
  152. package/dist/entrypoints/service-host/macos.js +6 -6
  153. package/dist/entrypoints/service-host.d.ts +4 -1
  154. package/dist/entrypoints/service-host.d.ts.map +1 -1
  155. package/dist/entrypoints/service-host.js +835 -224
  156. package/dist/entrypoints/spend.js +1 -1
  157. package/dist/entrypoints/sync/postgres.js +1 -1
  158. package/dist/entrypoints/sync.js +2 -2
  159. package/dist/entrypoints/telegram.js +5 -5
  160. package/dist/entrypoints/testing.js +5 -5
  161. package/dist/entrypoints/tools/agent.js +5 -4
  162. package/dist/entrypoints/tools/connections.js +2 -2
  163. package/dist/entrypoints/tools/invoker.js +4 -3
  164. package/dist/entrypoints/tools/mcp.js +5 -4
  165. package/dist/entrypoints/tools/toolkit.js +8 -7
  166. package/dist/entrypoints/tools.d.ts +1 -1
  167. package/dist/entrypoints/tools.d.ts.map +1 -1
  168. package/dist/entrypoints/tools.js +15 -13
  169. package/dist/entrypoints/tracking/contract.js +1 -1
  170. package/dist/entrypoints/xlsx.js +1 -1
  171. package/dist/files/directory-appearance.d.ts +20 -9
  172. package/dist/files/directory-appearance.d.ts.map +1 -1
  173. package/dist/files/polled-json.d.ts.map +1 -1
  174. package/dist/files/regular-file.d.ts +15 -5
  175. package/dist/files/regular-file.d.ts.map +1 -1
  176. package/dist/{index-prf6ayhf.js → index-13wmzpa6.js} +1 -1
  177. package/dist/{index-qnzhmk2s.js → index-17qgm6xe.js} +91 -48
  178. package/dist/{index-wv8dqy7q.js → index-205456mf.js} +1 -1
  179. package/dist/{index-3gwp8ez6.js → index-21cfxc4z.js} +13 -18
  180. package/dist/{index-xtkw9866.js → index-2c5w2d1d.js} +1 -1
  181. package/dist/{index-g1q7fwn9.js → index-2nwvn7m2.js} +1 -1
  182. package/dist/{index-d4svrknj.js → index-39c2hj6h.js} +2 -2
  183. package/dist/{index-sfzfd2m2.js → index-39rmc00v.js} +1 -1
  184. package/dist/{index-ky3ardqn.js → index-3fym4j8n.js} +1 -1
  185. package/dist/{index-d96c1n1q.js → index-5tdc0q43.js} +20 -19
  186. package/dist/{index-3ypvpkwr.js → index-669374qc.js} +1 -1
  187. package/dist/{index-x90w78yz.js → index-673drwkn.js} +23 -8
  188. package/dist/{index-83n766x4.js → index-7jqn3b3g.js} +16 -10
  189. package/dist/{index-5jyjb4s0.js → index-80acsm27.js} +1 -1
  190. package/dist/{index-xmr47znh.js → index-827bgv33.js} +1 -1
  191. package/dist/{index-xypxnzhp.js → index-93n6jwy0.js} +4 -4
  192. package/dist/{index-wbnpa8z6.js → index-9kpxz49v.js} +5 -5
  193. package/dist/{index-fcw255hd.js → index-9sfhje6y.js} +3 -3
  194. package/dist/{index-bh4pmtr9.js → index-afb6z77w.js} +3 -1
  195. package/dist/{index-9y0afd5f.js → index-apf5g7y9.js} +1 -1
  196. package/dist/{index-4qvyhn23.js → index-bjmj2q1z.js} +1 -1
  197. package/dist/{index-bbzvrq66.js → index-dcsxj68j.js} +457 -204
  198. package/dist/{index-j516jaaz.js → index-dnzxxf8a.js} +49 -2
  199. package/dist/{index-kmbpej2y.js → index-emgrmavr.js} +102 -61
  200. package/dist/index-fgahdc7s.js +100 -0
  201. package/dist/{index-kzavdze2.js → index-gr0kxymw.js} +5 -1
  202. package/dist/{index-e06z0tkb.js → index-gya4hwh3.js} +2 -2
  203. package/dist/{index-3djgv3ch.js → index-hab790s6.js} +26 -11
  204. package/dist/{index-j13gzgdv.js → index-j0ef04jw.js} +9 -5
  205. package/dist/{index-rhb33thr.js → index-jcge9tx3.js} +1 -1
  206. package/dist/{index-dvd1qdwa.js → index-ke02kxsr.js} +3 -3
  207. package/dist/{index-3agqmmrg.js → index-mkfhpk11.js} +7 -9
  208. package/dist/{index-a725ayvz.js → index-mttkdm5a.js} +1 -1
  209. package/dist/{index-9wh98cpa.js → index-n3bm7zqq.js} +131 -91
  210. package/dist/{index-7xp05h20.js → index-p06z7g7w.js} +7 -7
  211. package/dist/{index-kt6dh1n6.js → index-p16q492v.js} +1 -1
  212. package/dist/{index-5zwac8ft.js → index-pp97q86a.js} +3 -3
  213. package/dist/{index-39n02e0q.js → index-psye60qn.js} +1 -1
  214. package/dist/{index-5ptwb6ka.js → index-pzhqydxb.js} +1 -1
  215. package/dist/{index-7kfcb576.js → index-qa2jjb65.js} +1 -1
  216. package/dist/{index-0djnptn8.js → index-qhjmmsm2.js} +10 -3
  217. package/dist/{index-7grgs8cx.js → index-qpzyahe3.js} +2 -2
  218. package/dist/{index-8xr2eq99.js → index-r97ppg0g.js} +4 -4
  219. package/dist/{index-bmaz3jzy.js → index-rjs94dny.js} +1 -1
  220. package/dist/{index-p1m9djt6.js → index-rxh3qy4x.js} +33 -6
  221. package/dist/{index-en8e5zsj.js → index-ryxb427v.js} +1 -1
  222. package/dist/{index-nbv44x0x.js → index-s2e3h616.js} +137 -36
  223. package/dist/{index-dwa6pskj.js → index-sd4e5x5j.js} +86 -47
  224. package/dist/{index-g56ht6qf.js → index-t3qcac2a.js} +1 -1
  225. package/dist/index-vgzhw2zk.js +304 -0
  226. package/dist/{index-jrka9029.js → index-vmbxj75t.js} +2 -2
  227. package/dist/{index-caywx1c0.js → index-wv2amqm4.js} +109 -12
  228. package/dist/{index-5e0zsbf7.js → index-x2fb37t0.js} +2 -2
  229. package/dist/{index-z4k0hqp9.js → index-y71zn1gw.js} +137 -27
  230. package/dist/{index-wavv538x.js → index-ybdq8kk2.js} +3 -3
  231. package/dist/{index-4gk6k3zc.js → index-ycr4pk0z.js} +1 -1
  232. package/dist/{index-0tyt97nk.js → index-yrr3n391.js} +1 -1
  233. package/dist/{index-v37b2cd6.js → index-z20pdxeb.js} +2 -2
  234. package/dist/{index-0hdm5sx6.js → index-z9d74jmb.js} +8 -4
  235. package/dist/{index-4s2w4g37.js → index-zhshhxew.js} +80 -2
  236. package/dist/{index-3b31z0pc.js → index-znd1b57f.js} +12 -6
  237. package/dist/internal/bounded-file-confirm.d.ts +32 -0
  238. package/dist/internal/bounded-file-confirm.d.ts.map +1 -0
  239. package/dist/internal/bounded-file-read.d.ts +10 -7
  240. package/dist/internal/bounded-file-read.d.ts.map +1 -1
  241. package/dist/internal/file-observation.d.ts +5 -1
  242. package/dist/internal/file-observation.d.ts.map +1 -1
  243. package/dist/internal/positive-integer.d.ts +2 -0
  244. package/dist/internal/positive-integer.d.ts.map +1 -1
  245. package/dist/internal/process-instance.d.ts +8 -0
  246. package/dist/internal/process-instance.d.ts.map +1 -1
  247. package/dist/internal/unix-socket.d.ts +10 -1
  248. package/dist/internal/unix-socket.d.ts.map +1 -1
  249. package/dist/server/unix-client.d.ts +7 -0
  250. package/dist/server/unix-client.d.ts.map +1 -1
  251. package/dist/service-host/systemd-inspect.d.ts +3 -1
  252. package/dist/service-host/systemd-inspect.d.ts.map +1 -1
  253. package/dist/service-host/systemd-render-shared.d.ts +64 -0
  254. package/dist/service-host/systemd-render-shared.d.ts.map +1 -0
  255. package/dist/service-host/systemd-render.d.ts +31 -26
  256. package/dist/service-host/systemd-render.d.ts.map +1 -1
  257. package/dist/service-host/systemd-timer-render.d.ts +31 -0
  258. package/dist/service-host/systemd-timer-render.d.ts.map +1 -0
  259. package/dist/service-host/systemd-timer-rollback.d.ts +26 -0
  260. package/dist/service-host/systemd-timer-rollback.d.ts.map +1 -0
  261. package/dist/service-host/systemd-timer.d.ts +82 -0
  262. package/dist/service-host/systemd-timer.d.ts.map +1 -0
  263. package/dist/service-host/systemd-unit-ops.d.ts +26 -0
  264. package/dist/service-host/systemd-unit-ops.d.ts.map +1 -0
  265. package/dist/service-host/systemd.d.ts +1 -1
  266. package/dist/service-host/systemd.d.ts.map +1 -1
  267. package/dist/tools/access.d.ts +30 -1
  268. package/dist/tools/access.d.ts.map +1 -1
  269. package/dist/tools/agent.d.ts +2 -2
  270. package/dist/tools/agent.d.ts.map +1 -1
  271. package/dist/tools/cli/args-scan.d.ts +5 -0
  272. package/dist/tools/cli/args-scan.d.ts.map +1 -1
  273. package/dist/tools/cli/args.d.ts +11 -5
  274. package/dist/tools/cli/args.d.ts.map +1 -1
  275. package/dist/tools/cli/invoke.d.ts +2 -1
  276. package/dist/tools/cli/invoke.d.ts.map +1 -1
  277. package/dist/tools/cli/notices.d.ts.map +1 -1
  278. package/dist/tools/cli/run-managed.d.ts.map +1 -1
  279. package/dist/tools/cli/session.d.ts.map +1 -1
  280. package/dist/tools/execute.d.ts.map +1 -1
  281. package/dist/tools/invoker.d.ts +2 -1
  282. package/dist/tools/invoker.d.ts.map +1 -1
  283. package/dist/tools/list-names.d.ts +2 -3
  284. package/dist/tools/list-names.d.ts.map +1 -1
  285. package/dist/tools/manifest.d.ts +2 -3
  286. package/dist/tools/manifest.d.ts.map +1 -1
  287. package/dist/tools/mcp/mount.d.ts +5 -5
  288. package/dist/tools/mcp/mount.d.ts.map +1 -1
  289. package/dist/tools/mcp/register.d.ts +2 -1
  290. package/dist/tools/mcp/register.d.ts.map +1 -1
  291. package/dist/tools/mcp/runtime-tools.d.ts.map +1 -1
  292. package/llms/agent-executor-acp.txt +10 -6
  293. package/llms/agent-executor-claude-sdk.txt +13 -10
  294. package/llms/agent-executor-claude.txt +2 -2
  295. package/llms/agent-executor-codex.txt +9 -3
  296. package/llms/agent-executor.txt +2 -2
  297. package/llms/agent-runtime.4.txt +21 -9
  298. package/llms/cli.3.txt +4 -4
  299. package/llms/cli.txt +1 -0
  300. package/llms/declaration.txt +2 -2
  301. package/llms/files.txt +1 -1
  302. package/llms/node.txt +2 -2
  303. package/llms/server.5.txt +2 -2
  304. package/llms/service-host.txt +5 -5
  305. package/llms/stitchkit.txt +81 -77
  306. package/llms/tools.3.txt +3 -2
  307. package/llms/upgrading-0.128.0-0.129.0.txt +175 -0
  308. package/llms/upgrading.txt +1 -0
  309. package/llms-full.txt +323 -127
  310. package/llms.txt +15 -14
  311. package/package.json +1 -1
  312. package/dist/index-ajmtxsky.js +0 -193
  313. 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 36 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 36 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 36 minors since 0.94.0, most recently 0.127.0_ | typed realtime clients, binding to an existing socket and retained topics with a required explicit Socket.IO peer loader |
53
+ | `stitchkit/contract` | browser **and** server | stable<br>_redefined in 5 of the 36 minors since 0.94.0, most recently 0.127.0_ | the contract layer alone — `defineContract`, errors, pagination |
54
+ | `stitchkit/live` | browser **and** server | evolving<br>_redefined in 2 of the 36 minors since 0.94.0, most recently 0.127.0_ | `defineEvents` — topic declarations beside the operation contract — and watched reads: `createWatchClient`, the value/difference frame and its reassembly |
55
+ | `stitchkit/primitives` | browser **and** server | evolving<br>_redefined in 0 of the 36 minors since 0.94.0_ | generic values and declarations for lifecycle, access, audit, delivery and exports, exact money and rounding tables |
56
+ | `stitchkit/handler` | browser, React Native/Hermes **and** server | evolving<br>_redefined in 0 of the 3 minors since 0.127.0_ | portable `createHandler`, `implement`, errors and `serveBridge` over a string `postMessage` port, with no Node built-ins |
57
+ | `stitchkit/server` | server (Bun) | stable<br>_redefined in 5 of the 36 minors since 0.94.0, most recently 0.127.0_ | `createServer`, `implement`, hooks, auth, Socket.IO server, server primitives |
58
+ | `stitchkit/node` | server (Node ≥ 22.3) | stable<br>_redefined in 2 of the 36 minors since 0.94.0, most recently 0.127.0_ | `serveNode` + the runtime-agnostic core — the Node mirror of `/server` |
59
+ | `stitchkit/tools` | server | stable<br>_redefined in 10 of the 36 minors since 0.94.0, most recently 0.127.0_ | the transport-neutral tool layer — registry, tool names and manifest, runtime tools, native tools, the OAuth provider, the durability engine; loads no optional peer at runtime |
60
+ | `stitchkit/tools/mcp` | server (Bun or Node) | evolving<br>_redefined in 3 of the 36 minors since 0.94.0, most recently 0.127.0_ | the canonical MCP HTTP/stdio server, schemas and typed MCP presenters; only Zod and the MCP server SDK peers |
61
+ | `stitchkit/tools/agent` | server (Bun or Node) | evolving<br>_redefined in 1 of the 36 minors since 0.94.0, most recently 0.127.0_ | `mountAgent` — a contract's operations as AI SDK tools; only Zod and the `ai` peer |
62
+ | `stitchkit/tools/toolkit` | server (Bun or Node) | evolving<br>_redefined in 1 of the 36 minors since 0.94.0, most recently 0.127.0_ | `createToolkit` — one tool set served over MCP and to an AI SDK agent; the MCP server SDK and `ai` peers |
63
+ | `stitchkit/tools/contract` | browser + server | evolving<br>_redefined in 2 of the 36 minors since 0.94.0, most recently 0.124.0_ | the shapes a tool surface speaks — async-operation contract, snapshot and cancel schemas, view-file input/output — without the runtime that serves them |
64
+ | `stitchkit/tools/invoker` | server | stable<br>_redefined in 3 of the 36 minors since 0.94.0, most recently 0.127.0_ | peer-free `createToolInvoker` over the canonical contract tool runner |
65
+ | `stitchkit/tools/connections` | server (Bun or Node) | evolving<br>_redefined in 3 of the 36 minors since 0.94.0, most recently 0.127.0_ | consume external MCP servers and a bounded OpenAPI subset — typed reauthorization, a per-request host fence and per-call credentials |
66
+ | `stitchkit/cli` | server | stable<br>_redefined in 12 of the 36 minors since 0.94.0, most recently 0.128.0_ | `createCli` / `createCliInvoker` — runtime and strict NodeNext declarations without MCP SDK / `ai` |
67
+ | `stitchkit/cli/publish` | build and release tooling (Bun or Node, POSIX) | evolving<br>_redefined in 0 of the 36 minors since 0.94.0_ | `publishCli` — commit a verified CLI distribution and move its public manifest last; see [CLI guide](cli.md#publishing-a-complete-version) |
68
+ | `stitchkit/remote` | browser **and** server | stable<br>_redefined in 1 of the 36 minors since 0.94.0, most recently 0.104.0_ | peer-free `implementRemote` for thin HTTP proxy processes |
69
+ | `stitchkit/process` | server (Bun or Node, POSIX) | evolving<br>_redefined in 3 of the 36 minors since 0.94.0, most recently 0.127.0_ | finite native commands, byte sinks, bounded capture, process-group cancellation and opt-in Linux/Darwin owner-loss cleanup; contract operations executed in one-call child processes |
70
+ | `stitchkit/process/owner-loss` | bundled server entry (Bun, POSIX) | evolving<br>_redefined in 0 of the 36 minors since 0.94.0_ | narrow bootstrap that keeps the process runner lazy while carrying its owner-loss guard in a single-file bundle |
71
+ | `stitchkit/files/packaging` | build time (Bun or Node) | evolving<br>_redefined in 3 of the 36 minors since 0.94.0, most recently 0.108.0_ | installed native asset graph, integrity, Bun packaging plugin and the artifact loader check; a client bundled into one self-contained, hashed and verified file; no runtime install policy |
72
+ | `stitchkit/files` | server (Bun or Node) | stable<br>_redefined in 4 of the 36 minors since 0.94.0, most recently 0.127.0_ | peer-free managed local-file boundary |
73
+ | `stitchkit/spend` | server (Bun or Node) | evolving<br>_redefined in 0 of the 3 minors since 0.127.0_ | peer-free spend gateway for paid model APIs: the attempt recorded before the call and closed on every outcome, credentials only for the provider's origin, a spooled ledger, rank-merged receipts and a reconciler |
74
+ | `stitchkit/spend/testing` | tests on Bun or Node | evolving<br>_redefined in 0 of the 3 minors since 0.127.0_ | the coverage guard: red on a model SDK import, a provider key or a provider host outside the gateway files |
75
+ | `stitchkit/service-host` | server (Bun or Node) | evolving<br>_redefined in 0 of the 3 minors since 0.127.0_ | peer-free host service supervision — verified versioned artifact activation, Linux `systemd` and macOS `launchd` units (`plutil`, `bootout`/`bootstrap`, rollback), live process/Unix-socket identity verification, and an in-process config-watched reloader |
76
+ | `stitchkit/service-host/macos` | server (Bun or Node, macOS) | evolving<br>_redefined in 0 of the 3 minors since 0.127.0_ | peer-free macOS daemon bundle toolkit — fail-closed Developer ID `codesign`, strict C11 launcher `.app` bundles with atomic `RENAME_SWAP` install/rollback, Apple 824×824 squircle `AppIcon.icns`, streaming `lsregister` maintenance, and TCC responsibility inspection |
77
+ | `stitchkit/telegram` | server (Bun or Node) | evolving<br>_redefined in 8 of the 36 minors since 0.94.0, most recently 0.127.0_ | peer-free Telegram platform primitives — Mini App `initData` verification, widget limits and the `widget_query` and widget message schemas, send-failure classification, one outbound budget per bot token with weighted albums and per-chat 429 pauses, resumable broadcasts, the operator channel with dedupe, a Bot API transport that separates a request that never left from an unknown outcome, local Bot API files, the waveform of a voice message read from its PCM, webhook ownership and durable webhook update intake |
78
+ | `stitchkit/telegram/grammy` | server (Bun or Node) | evolving<br>_redefined in 0 of the 36 minors since 0.94.0_ | the token's outbound budget as one grammY client transformer — a 429 that comes back as a response pauses its chat, and a cancelled wait is a request that never left; the widget methods over the same client |
79
+ | `stitchkit/telegram/html` | browser and server | evolving<br>_redefined in 1 of the 36 minors since 0.94.0, most recently 0.127.0_ | Telegram's HTML as a tree — compile GFM Markdown to Telegram HTML with fence-aware splitting, clean any markup to what Telegram accepts, cut long text into valid parts by what the reader sees, check markup before it is sent |
80
+ | `stitchkit/telegram/voice` | browser and server | evolving<br>_redefined in 0 of the 36 minors since 0.94.0_ | the waveform of a voice message as one format — packed for `sendVoice` the way Telegram Desktop scales it, unpacked to draw it, a `getMe` read of whether the server takes it |
81
+ | `stitchkit/telegram/screens` | server (Bun or Node) | evolving<br>_redefined in 1 of the 36 minors since 0.94.0, most recently 0.127.0_ | a bot's menus as declared screens over grammY — typed paths, actions and input, message reconciliation, state in any `StorageAdapter`, a test chat |
82
+ | `stitchkit/tracking` | browser **and** server | evolving<br>_redefined in 3 of the 36 minors since 0.94.0, most recently 0.127.0_ | visitor-tracking mechanics — `createTrackingClient`, the tab-shared outbox, the page-leave beacon, attribution, the contract factory; no event vocabulary, no React |
83
+ | `stitchkit/tracking/contract` | browser **and** server | evolving<br>_redefined in 0 of the 36 minors since 0.94.0_ | the wire shapes — the contract factory, event and visit schemas, the performance sample and its trust threshold; brings `zod` |
84
+ | `stitchkit/tracking/performance` | browser **and** server | evolving<br>_redefined in 1 of the 36 minors since 0.94.0, most recently 0.127.0_ | Web Vitals from real visitors, collected after load through the optional peer `web-vitals`; no `zod` |
85
+ | `stitchkit/tracking/server` | server (Bun or Node) | evolving<br>_redefined in 0 of the 36 minors since 0.94.0_ | the decisions a tracking backend makes — dispositions, visit lease over an application-owned store, active intervals, presence; no database |
86
+ | `stitchkit/release` | browser **and** server | evolving<br>_redefined in 1 of the 36 minors since 0.94.0, most recently 0.127.0_ | a page follows the release it was built for — `createReleaseMarker` on the server, `createReleaseWatcher` in the browser, the `X-Build-Id` header and a socket event between them |
87
+ | `stitchkit/voice` | browser **and** server | evolving<br>_redefined in 0 of the 36 minors since 0.94.0_ | the mechanics of a live voice reply — `SentenceCutter`, `speakableText`, a `SpeechQueue` that synthesises ahead and stops on interruption, the conversation phases |
88
+ | `stitchkit/sync` | browser **and** server | evolving<br>_redefined in 0 of the 3 minors since 0.127.0_ | the client half of an offline-first sync — which outbox rows leave next, pending edits on top of remote rows, deletes that win until acknowledged, the cursor session, the push and page wire with an open outcome vocabulary; no driver, runs in Hermes |
89
+ | `stitchkit/sync/postgres` | server (Bun or Node) | evolving<br>_redefined in 0 of the 3 minors since 0.127.0_ | the server half — versions that commit in order, a ledger that runs each change once, a feed of what changed, inside the app's own transaction; a memory store and `checkSyncStore` |
90
+ | `stitchkit/geo` | server (Bun or Node) | evolving<br>_redefined in 2 of the 36 minors since 0.94.0, most recently 0.127.0_ | managed GeoIP reader generations, last-known-good reload and the optional MaxMind adapter |
91
+ | `stitchkit/geo/contract` | browser **and** server | evolving<br>_redefined in 0 of the 36 minors since 0.94.0_ | the place snapshot schema, for a shared contract that stores or sends `GeoAttribution`; brings `zod` |
92
+ | `stitchkit/xlsx` | browser **and** server | evolving<br>_redefined in 0 of the 36 minors since 0.94.0_ | a workbook from rows and typed columns, with no dependency; text never runs as a formula |
93
+ | `stitchkit/oauth` | browser **and** server | evolving<br>_redefined in 0 of the 36 minors since 0.94.0_ | provider-neutral Authorization Code + PKCE request and one-shot callback transaction mechanics |
94
+ | `stitchkit/google` | server (Bun or Node) | evolving<br>_redefined in 1 of the 36 minors since 0.94.0, most recently 0.127.0_ | optional Google code exchange and verified OIDC identity adapter |
95
+ | `stitchkit/observability` | server | stable<br>_redefined in 1 of the 36 minors since 0.94.0, most recently 0.127.0_ | request/tool event projections — `createObservability`, trace context, sanitisation |
96
+ | `stitchkit/testing` | tests on Bun or Node | stable<br>_redefined in 3 of the 36 minors since 0.94.0, most recently 0.127.0_ | in-process generated clients over a real Fetch handler, the managed-resource conformance kit and manual time for schedules and retries |
97
+ | `stitchkit/declaration` | browser + build and deployment tooling (Bun or Node) | evolving<br>_redefined in 1 of the 36 minors since 0.94.0, most recently 0.128.0_ | `ProjectDeclarationSchema` — the one machine-readable statement a repository makes about itself |
98
+ | `stitchkit/react` | browser + server rendering | stable<br>_redefined in 2 of the 36 minors since 0.94.0, most recently 0.127.0_ | `createCursorQuery`, `createCacheBridge`, QueryClient and `ApiError` retry policy |
99
+ | `stitchkit/react/keyboard` | browser | evolving<br>_redefined in 1 of the 36 minors since 0.94.0, most recently 0.115.0_ | which part of a screen gets a key — ordered layers, one Escape per level, list zones with real focus; see [keyboard guide](keyboard.md) |
100
+ | `stitchkit/react/keyboard/testing` | server (Bun or Node) | evolving<br>_redefined in 0 of the 36 minors since 0.94.0_ | the keyboard layers and zones without a DOM — fakes for the window, elements and key events beside the two engines, to test the order of layers, `scope`/`inert` and the edges of a zone in milliseconds |
101
+ | `stitchkit/agent-runtime` | server | evolving<br>_redefined in 9 of the 36 minors since 0.94.0, most recently 0.128.0_ | optional durable conversation/run loop, history, models, prompts, fencing and events |
102
+ | `stitchkit/agent-runtime/sandbox` | server | evolving<br>_redefined in 0 of the 36 minors since 0.94.0_ | optional Linux Bubblewrap sessions, host sandbox capability probes, durable workspaces and a host HTTP credential gateway; see [sandbox guide](sandbox.md) |
103
+ | `stitchkit/agent-runtime/testing` | tests on Bun or Node | evolving<br>_redefined in 2 of the 36 minors since 0.94.0, most recently 0.127.0_ | credential-free replay, scripted provider faults, deterministic race controls and the agent-store conformance kit |
104
+ | `stitchkit/agent-runtime/harness` | server | evolving<br>_redefined in 0 of the 36 minors since 0.94.0_ | resource-aware process-local facade over the canonical Agent runtime; supervision stays outside |
105
+ | `stitchkit/agent-runtime/coding-tools` | server (Bun or Node) | evolving<br>_redefined in 3 of the 36 minors since 0.94.0, most recently 0.127.0_ | bounded host-authorized direct file and shell tools; a root boundary, not an OS sandbox |
106
+ | `stitchkit/agent-runtime/openrouter` | server | evolving<br>_redefined in 1 of the 36 minors since 0.94.0, most recently 0.127.0_ | isolated OpenRouter language-model adapter |
107
+ | `stitchkit/agent-runtime/browser` | browser + server | evolving<br>_redefined in 2 of the 36 minors since 0.94.0, most recently 0.127.0_ | canonical agent records, events, reconnect cursor and optional conversation controller |
108
+ | `stitchkit/agent-runtime/react` | browser + server | evolving<br>_redefined in 0 of the 36 minors since 0.94.0_ | React subscription to an application-owned agent controller |
109
+ | `stitchkit/agent-runtime/realtime` | server (Bun or Node) | evolving<br>_redefined in 2 of the 36 minors since 0.94.0, most recently 0.127.0_ | authorized agent control over the existing Socket.IO server |
110
+ | `stitchkit/agent-executor` | server (Bun or Node) | evolving<br>_redefined in 1 of the 3 minors since 0.127.0, most recently 0.129.0_ | the executor ↔ server contract for external coding agents (Claude Code, Codex, ACP): delta vocabulary over the shared message parts, thread leases with a fence, turn phases and their reports |
111
+ | `stitchkit/agent-executor/claude` | server (Bun or Node) | evolving<br>_redefined in 0 of the 3 minors since 0.127.0_ | the Claude Code driver: the unmodified CLI over `stream-json`, permission requests answered by the host, reconcile by the input's id in the profile's transcript |
112
+ | `stitchkit/agent-executor/claude-sdk` | server (Bun or Node) | evolving<br>_redefined in 0 of the 3 minors since 0.127.0_ | Claude through the Agent SDK: the application's `query` (optional peer `@anthropic-ai/claude-agent-sdk`), the CLI's classifier, `canUseTool` asked of the host |
113
+ | `stitchkit/agent-executor/acp` | server (Bun or Node) | evolving<br>_redefined in 0 of the 3 minors since 0.127.0_ | an Agent Client Protocol v1 agent over stdio: settings by category, images, MCP servers, `session/resume`/`load`/`list`, `session/cancel`; no reconcile |
114
+ | `stitchkit/agent-executor/codex` | server (Bun or Node) | evolving<br>_redefined in 1 of the 3 minors since 0.127.0, most recently 0.129.0_ | the Codex driver: `codex app-server` over stdio or Unix-socket WebSocket (`unix-listen` / `unix-connect`), thread policy and live controls, approval and input requests answered by the host, unknown server requests refused, reconcile by the client id in `thread/turns/list` |
115
+ | `stitchkit/agent-executor/testing` | server (Bun or Node) | evolving<br>_redefined in 0 of the 3 minors since 0.127.0_ | the engine conformance kit and the scripted fake engine a driver is proven against |
116
+ | `stitchkit/agent-runtime/postgres` | server (Bun or Node) | evolving<br>_redefined in 0 of the 3 minors since 0.127.0_ | the agent store, conversation reader and companion host on Postgres, over the application's own client (Bun SQL, Prisma, `pg`) |
117
+ | `stitchkit/agent-runtime/sqlite/bun` | server (Bun) | evolving<br>_redefined in 1 of the 36 minors since 0.94.0, most recently 0.127.0_ | durable built-in SQLite store for the agent runtime |
118
+ | `stitchkit/agent-runtime/sqlite/node` | server (Node ≥ 22.5) | evolving<br>_redefined in 1 of the 36 minors since 0.94.0, most recently 0.127.0_ | durable built-in SQLite store for the agent runtime |
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 36 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 36 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 36 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 36 minors since 0.94.0, most recently 0.127.0_ | the local diagnostic journal — an exclusive bounded writer and snapshot reader with explicit anomalies |
124
+ | `stitchkit/application/directory-inbox` | server | evolving<br>_redefined in 0 of the 36 minors since 0.94.0_ | the directory inbox — entries another program drops into a directory, delivered to the application at least once |
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,171 @@ 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.129.0
19706
+
19707
+ ### codex-plan-window-keys
19708
+
19709
+ **Who must act:** every caller of `codexPlanWindows` or `createCodexDriver` (`status()`) from
19710
+ `stitchkit/agent-executor/codex` that matches plan window names against `'primary'` or
19711
+ `'secondary'`.
19712
+
19713
+ `codexPlanWindows` now unfolds the full `account/rateLimits/read` response envelope (including
19714
+ per-model `rateLimitsByLimitId` buckets) as well as bare `RateLimitSnapshot` objects, keying each
19715
+ window as `<limitId|limit>:<windowDurationMins>m` (falling back to `<limitId|limit>:<slot>` when
19716
+ duration is absent, or `<limitId|limit>:<windowDurationMins>m:<slot>` when both slots share a
19717
+ duration) and populating optional `windowDurationMins` and `label` on `PlanWindow`:
19718
+
19719
+ ```ts
19720
+ // before
19721
+ const fiveHour = status.planLimits?.windows.find((w) => w.name === 'primary')
19722
+ const weekly = status.planLimits?.windows.find((w) => w.name === 'secondary')
19723
+
19724
+ // after
19725
+ const fiveHour = status.planLimits?.windows.find(
19726
+ (w) => w.windowDurationMins === 300 || w.name === 'limit:primary',
19727
+ )
19728
+ const weekly = status.planLimits?.windows.find(
19729
+ (w) => w.windowDurationMins === 10080 || w.name === 'limit:secondary',
19730
+ )
19731
+ ```
19732
+
19733
+ ## Released migration: 0.128.0
19734
+
19735
+ ### invocation-payload-lifecycle
19736
+
19737
+ **Who must act:** every caller of `createModelInvocationLedger` from `stitchkit/agent-runtime`
19738
+ that reads `readPayload`, reads `sent.artifactId` on `provider/request` or top-level `artifactId`
19739
+ on `provider/response` (`ModelInvocationRecord`), passes `authorize` to `ModelInvocationConfig`,
19740
+ or relies on `maxPayloadBytes` aborting the provider call.
19741
+
19742
+ 1. **`readPayload` returns a discriminated status:** encrypted payloads redacted by
19743
+ `purgePayloads` / `store.purgeExpiredPayloads` stay readable as `{ status: 'expired', expiredAt }`
19744
+ while live payloads return `{ status: 'available', payload }`:
19745
+
19746
+ ```ts
19747
+ // before
19748
+ const payload = await ledger.readPayload({ conversationId, artifactId }, ctx)
19749
+ console.log(payload.payload)
19750
+
19751
+ // after
19752
+ const result = await ledger.readPayload({ conversationId, artifactId }, ctx)
19753
+ if (result.status === 'available') {
19754
+ console.log(result.payload)
19755
+ } else {
19756
+ console.log('expired at', result.expiredAt)
19757
+ }
19758
+ ```
19759
+
19760
+ 2. **`sent.artifactId` (`provider/request`) and top-level `artifactId` (`provider/response`) are optional when oversized:** exceeding
19761
+ `maxPayloadBytes` no longer aborts or prevents the provider call. Instead, the ledger omits the
19762
+ encrypted body, records `payloadOmitted: 'max-payload-bytes'` (with `artifactId` absent and
19763
+ `payloadSha256` preserved), and reports `InvocationPayloadTooLargeError` via `complete().receiptError`:
19764
+
19765
+ ```ts
19766
+ // before
19767
+ const id: string = record.sent.artifactId
19768
+
19769
+ // after
19770
+ if (record.sent.artifactId !== undefined) {
19771
+ await ledger.readPayload({ conversationId, artifactId: record.sent.artifactId }, ctx)
19772
+ } else if (record.sent.payloadOmitted === 'max-payload-bytes') {
19773
+ // body was intentionally omitted past maxPayloadBytes
19774
+ }
19775
+ ```
19776
+
19777
+ 3. **`ModelInvocationConfig.authorize` handles `'purge-payloads'`:** if your `authorize` callback
19778
+ switches exhaustively on `input.action`, handle the new `'purge-payloads'` variant alongside
19779
+ `'complete'`, `'agent'`, `'read'`, and `'read-payload'` (single-argument `input: ModelInvocationAuthorizationInput` carrying `input.context`):
19780
+
19781
+ ```ts
19782
+ authorize: (input) => {
19783
+ switch (input.action) {
19784
+ case 'complete':
19785
+ case 'agent':
19786
+ case 'read':
19787
+ case 'read-payload':
19788
+ case 'purge-payloads':
19789
+ return allow(input.context, input)
19790
+ }
19791
+ }
19792
+ ```
19793
+
19794
+ ### cli-option-projections-error-field
19795
+
19796
+ **Who must act:** every caller of `extractCliGlobalOptions` or `scanCliInvocation` from
19797
+ `stitchkit/cli` that caught a thrown `CliArgumentError` on call or on `.argv` access (→ ADR 0327).
19798
+
19799
+ Both projections now return malformed CLI syntax on an explicit `error?: CliArgumentError` field
19800
+ with fail-closed empty routing fields (`argv: []` on `extractCliGlobalOptions`; `command: undefined`
19801
+ and `commandTokens: []` on `scanCliInvocation`) instead of throwing on call or via a getter on `.argv`:
19802
+
19803
+ ```ts
19804
+ // before
19805
+ let parsed
19806
+ try {
19807
+ parsed = extractCliGlobalOptions(argv, globals)
19808
+ void parsed.argv
19809
+ } catch (err) {
19810
+ if (err instanceof CliArgumentError) {
19811
+ parsed = { globals: {}, argv: [] }
19812
+ } else {
19813
+ throw err
19814
+ }
19815
+ }
19816
+
19817
+ // after
19818
+ const parsed = extractCliGlobalOptions(argv, globals)
19819
+ if (parsed.error) {
19820
+ // handle parsed.error, or pass raw argv to createCli(...) for exit-code-2 reporting
19821
+ }
19822
+ ```
19823
+
19824
+ ### declaration-single-version
19825
+
19826
+ **Who must act:** every repository whose `project.json` is validated by `stitchkit/declaration`
19827
+ and still carries `identity.version`, or whose server/CLI code reads `declaration.identity.version`.
19828
+
19829
+ The root `package.json` is the single source of truth for the repository version (whether SemVer or
19830
+ CalVer). `ProjectIdentitySchema` no longer accepts `identity.version`:
19831
+
19832
+ ```jsonc
19833
+ // before (project.json)
19834
+ {
19835
+ "identity": {
19836
+ "slug": "my-app",
19837
+ "name": "My App",
19838
+ "version": "0.1.0",
19839
+ "description": { "en": "My App." }
19840
+ }
19841
+ }
19842
+
19843
+ // after (project.json)
19844
+ {
19845
+ "identity": {
19846
+ "slug": "my-app",
19847
+ "name": "My App",
19848
+ "description": { "en": "My App." }
19849
+ }
19850
+ }
19851
+ ```
19852
+
19853
+ Read your application version from the root `package.json` for a single-version application — or
19854
+ from the package's own `package.json` if that package is released independently — instead of
19855
+ `identity.version` (for example, in OpenAPI `info.version`, MCP `serverInfo.version`, and
19856
+ `createCli({ version })`).
19857
+
19858
+ ### read-only-surface-inspection
19859
+
19860
+ **Who must act:** optional — hosts and test suites that currently mount a tool surface with
19861
+ `access: { open: 'local-operator' }` solely for read-only surface inspection.
19862
+
19863
+ Pass `access: { inspect: true }` to `mountAgent`, `mountMcp`, `buildMcpServer`, `createToolInvoker`,
19864
+ `createCli`, `createCliInvoker`, or `createDeferredAgentToolSurface().mount` whenever a caller only
19865
+ needs catalogs, schemas, `--help`, `--schema`, or `commands`. Every tool execution fails closed with
19866
+ `FORBIDDEN` before extensions, hooks, durability, multi-round resolvers, or auth run. Keep
19867
+ `access: { gate }` for authenticated execution surfaces and `access: { open: 'local-operator' }` for
19868
+ tests or local tools that genuinely execute handlers.
19869
+
19700
19870
  ## Released migration: 0.127.0
19701
19871
 
19702
19872
  ### branch-application-key-modes
@@ -26173,7 +26343,7 @@ invisible: it succeeds on the machine that happens to have the database.
26173
26343
  | --- | --- |
26174
26344
  | `schemaVersion` | which format this is; checked before anything else |
26175
26345
  | `kind` | `application` or `library` |
26176
- | `identity` | `slug`, `name`, `version`, `description` per locale |
26346
+ | `identity` | `slug`, `name`, `description` per locale (the project's own version lives solely in the root `package.json`) |
26177
26347
  | `roles` | each with its own working directory, per-mode argv commands, optional listener and `drainFloorMs` |
26178
26348
  | `build` | the build command and the artifact paths it produces |
26179
26349
  | `requires` | what the code needs and does not provide, per phase (`release`, `start`) |
@@ -26838,8 +27008,8 @@ Also re-exports the error helpers from `stitchkit/contract`.
26838
27008
  | `StreamingRouteOptions` | _type_ | options for `streamingRoute` / `ndjsonRoute` / `sseRoute` |
26839
27009
  | `StreamingSourceContext` | _type_ | what a streaming source is given, including the cancellation `signal` |
26840
27010
  | `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 |
27011
+ | `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) |
27012
+ | `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
27013
  | `UnixClientTransport` | _type_ | `{ fetch, closed, close() }`; `close()` settles owned active work |
26844
27014
  | `UnixResponseBodyMode` | _type_ | `bounded \| streaming`; bounded is the 16 MiB cumulative default, streaming keeps pull-driven buffering without a lifetime total |
26845
27015
  | `UnixClientTransportError` | class | stable transport failure with `code` and dispatch certainty in `delivery` |
@@ -27247,7 +27417,7 @@ Server-only optional application runtime. See the
27247
27417
  | `AgentMessageSchema` / `AgentRunSchema` / `AgentSnapshotSchema` | schema | versioned canonical engine records |
27248
27418
  | `AgentRunQueuePrioritySchema` | schema | durable opt-in priority for queued `interrupt-next` runs |
27249
27419
  | `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 |
27420
+ | `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
27421
  | `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
27422
  | `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
27423
  | `AgentConversationBranchReceiptSchema` / `AgentConversationBranchReceipt` | schema / _type_ | durable lineage: request fingerprint, source/destination identities, source sequence/version/digest and creation time |
@@ -27332,18 +27502,18 @@ Server-only optional application runtime. See the
27332
27502
  | `agentSummaryProjection` / `agentUsageProjection` / `agentOutlineProjection` | constants | built-in list summary, provenance-carrying usage and request outline projections |
27333
27503
  | `agentConversationCardProjection` / `agentStateSlotsProjection` / `agentScheduleSummaryProjection` | constants | focused card, durable-state and schedule lifecycle projections |
27334
27504
  | `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 |
27505
+ | `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
27506
  | `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
27507
  | `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 |
27508
+ | `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
27509
  | `PostgresAgentEventSearchConfig` | _type_ | the Postgres index's options for `createAgentEventSearch({ postgres })` — `diacritics` (`preserve` / `unaccent`), `maxIndexedChars`, `maxSyncEvents` |
27340
27510
  | `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 |
27511
+ | `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
27512
  | `AgentChildBudgetSchema` / `AgentChildBudget` / `AgentChildStateSchema` / `AgentChildState` / `AgentChildRecordSchema` / `AgentChildRecord` | schema / _type_ | durable child graph, bounded seed and measured budget state |
27343
27513
  | `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 |
27514
+ | `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
27515
  | `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 |
27516
+ | `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
27517
  | `AgentProviderStreamCutError` | class | explicit retryable provider stream truncation evidence |
27348
27518
 
27349
27519
  ### Complete runtime inventory
@@ -27516,14 +27686,26 @@ or framework instructions; repeated keys return the existing invocation ID. It
27516
27686
  resolves `{ invocationId, outcome, text?, receiptError? }`: `receiptError` says a
27517
27687
  receipt could not be written and never changes `outcome` or drops `text`.
27518
27688
  `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).
27689
+ `readPayload(input, context)` requires a separate authorization action and returns a
27690
+ discriminated `ModelInvocationPayloadRead` (`available` with decrypted payload or `expired`
27691
+ with `expiredAt` once redacted); `purgePayloads(input, context)` redacts expired ciphertext
27692
+ in-place across the store and search indexes while retaining receipt metadata and digests.
27693
+ When a request or response payload exceeds `maxPayloadBytes`, the provider call still succeeds
27694
+ while recording `payloadOmitted: 'max-payload-bytes'` (with `artifactId` omitted and `payloadSha256`
27695
+ preserved) and reporting `InvocationPayloadTooLargeError` through `complete().receiptError`. See the
27696
+ [guide and migration example](../guide/agent-runtime.md#plain-completions-and-shared-invocation-receipts).
27521
27697
 
27522
27698
  | Export | Kind | Purpose |
27523
27699
  | --- | --- | --- |
27524
27700
  | `CompletionInvocationInputSchema` / `CompletionInvocationInput` | schema/type | strict prompt, model-attempt list, deadline, idempotency key and trace input |
27525
27701
  | `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 |
27702
+ | `ModelInvocationRecordSchema` / `ModelInvocationRecord` | schema/type | discriminated invocation start/finish and per-attempt requested/sent/effective evidence (with optional `artifactId` and `payloadOmitted` when oversized, keeping `payloadSha256`) |
27703
+ | `InvocationPayloadTooLargeError` | class | `RangeError` carrying `{ bytes, maxBytes, sha256 }` when a recorded invocation payload exceeds `maxPayloadBytes` without aborting the provider call |
27704
+ | `InvocationPayloadOmissionReasonSchema` / `InvocationPayloadOmissionReason` | schema/type | reason a payload body was not stored (`'max-payload-bytes'`) |
27705
+ | `ModelInvocationPayloadReadSchema` / `ModelInvocationPayloadRead` | schema/type | discriminated result of `readPayload`: `{ status: 'available', payload, ... }` or `{ status: 'expired', expiredAt, ... }` |
27706
+ | `PurgeInvocationPayloadsInputSchema` / `PurgeInvocationPayloadsInput` | schema/type | input for `purgePayloads` / `store.purgeExpiredPayloads`: `before`, optional `conversationId` and `limit` |
27707
+ | `PurgeInvocationPayloadsResultSchema` / `PurgeInvocationPayloadsResult` | schema/type | result of `purgePayloads`: `purged`, `freedBytes`, and `hasMore` |
27708
+ | `ModelInvocationAuthorizationInput` | type | discriminated authorization payload passed to `ModelInvocationConfig.authorize` (`'complete'`, `'agent'`, `'read'`, `'read-payload'`, or `'purge-payloads'`) |
27527
27709
  | `ModelInvocationAttemptContext` | type | conversation, operation, invocation, attempt, step and optional agent run identity |
27528
27710
  | `currentModelInvocationAttempt` | function | returns causal IDs inside the provider transport; undefined outside an invocation |
27529
27711
  | `modelInvocationSpendAttribution` | function | the current attempt as `stitchkit/spend` attribution fields (conversation, run, invocation, attempt, step) — a spend gateway's `context` |
@@ -27718,14 +27900,14 @@ leaves of their own; this entrypoint knows no vendor. Evolving.
27718
27900
  |--------|------|---------|
27719
27901
  | `defineAgentExecutorContract` / `agentExecutorRealtimeContract` | functions / contract | the operations (`hello`, `claim`, `renew`, `release`, `report`) and the events the server pushes (`turn:offer`, `turn:interrupt`, `turn:reply`) |
27720
27902
  | `ExecutorHelloSchema` / `ExecutorHello` / `ExecutorHelloAckSchema` / `ExecutorHelloAck` / `ExecutorEngineSchema` / `ExecutorEngine` / `ExecutorEngineInfoSchema` / `ExecutorReconcileSchema` / `ExecutorProfileSchema` / `ExecutorProfile` / `ExecutorResumableTurnSchema` | schemas / _types_ | what an executor announces — engines (their `models`: `listed` with ids, `not-asked` or `failed` with why), private profiles, resumable turns with their `turnOrdinal` — and what the server holds of each: `acked` up to `ackedSeq`, or `not-retained` |
27721
- | `PlanLimitsSchema` / `PlanLimits` / `PlanWindowSchema` / `PlanWindow` | schemas / _types_ | a subscription's limits: `known`, `no-plan-limit` or `unpublished`, with the last read's error beside the last answer |
27903
+ | `PlanLimitsSchema` / `PlanLimits` / `PlanWindowSchema` / `PlanWindow` | schemas / _types_ | a subscription's limits: `known`, `no-plan-limit` or `unpublished`, with the last read's error beside the last answer; each window carries `name`, `usedPercent`, and optional `resetsAt`, `windowDurationMins` and `label` |
27722
27904
  | `ThreadClaimSchema` / `ThreadClaim` / `ThreadLeaseSchema` / `ThreadLease` / `ThreadRenewSchema` / `ThreadReleaseSchema` | schemas / _types_ | thread leases pinned to an executor and profile, under a fence |
27723
27905
  | `TurnOfferSchema` / `TurnOffer` / `TurnPhaseSchema` / `TurnPhase` / `TurnReportSchema` / `TurnReport` / `TurnReportAckSchema` / `TurnFailureKindSchema` / `TurnInterruptSchema` / `InteractionReplySchema` / `InteractionReply` / `EXECUTOR_ERRORS` | schemas / _types_ / constant | a turn offered under its thread's `turnOrdinal`, its phases and reports applied once by `executorSeq` (acknowledged `applied`, `duplicate` or `not-retained`), interrupts, answers to an engine's requests, and the refusal codes |
27724
27906
  | `ExecutorDeltaSchema` / `ExecutorDelta` / `ExecutorErrorKindSchema` / `ExecutorErrorKind` / `ExecutorRawSchema` | schemas / _types_ | what an engine said: `agent-parts` blocks with `turnId`, `itemId` and `raw`, plus requests, usage, the context gauge (`context-usage`), the end of the turn, errors by kind and window resets |
27725
27907
  | `projectExecutorDeltas` | function | fold a turn's deltas into the message parts the agent runtime stores |
27726
27908
  | `AgentEngineDriver` / `AgentEngineSession` / `AgentEngineTurn` / `ExecutorEngineInfo` | _types_ | one vendor's engine behind one interface: info, login status, a session per connection, turns with `interrupt` and `respond`, `findInput` for a `client-id` engine |
27727
27909
  | `dispatchTurn` / `DispatchOutcome` | function / _type_ | send a turn's input at most once through `LocalStepDurability.effect`: `sent`, `delivered` after a reconcile, or `unknown_after_restart` — never resent |
27728
- | `spawnEngineProcess` / `EngineProcess` | function / _type_ | an engine process talked to by lines over `stitchkit/process`: declared environment, owner-loss termination, bounded lines (`maxLineBytes`), stderr, queued stdin (`maxPendingStdinBytes`) and stdin written over the connection's life (`maxStdinBytes`, a refused `send()` that leaves the engine running); every option checked before the spawn |
27910
+ | `spawnEngineProcess` / `EngineProcess` | function / _type_ | an engine process talked to by lines over `stitchkit/process`: declared environment, owner-loss termination, optional leader `pid` / `pidReady`, `stdoutMode` (`'lines'` default or `'drain'` for socket-serving engines), bounded lines (`maxLineBytes`), stderr, queued stdin (`maxPendingStdinBytes`) and stdin written over the connection's life (`maxStdinBytes`, a refused `send()` that leaves the engine running); every option checked before the spawn |
27729
27911
  | `createExecutorLeases` / `memoryExecutorLeaseStore` / `ExecutorLeaseStateStore` / `ExecutorLeaseState` / `ExecutorLeaseStateSchema` / `ExecutorLeaseRefusal` | functions / _types_ / class | the server's thread leases and turn receipts over one atomically updated value, bounded by threads: each thread keeps the receipts of its last `retainedTurns` turns (default 64, at most 1024) and the highest `turnOrdinal` it let go, a report of a turn at or below it is `not-retained`, and `resume(resumable)` answers a hello the same way; a `StateStore` of `stitchkit/application` fits; a refusal is an `ExecutorLeaseRefusal` — an `AppError` with status 409 and a code of `EXECUTOR_ERRORS` — so an operation returning the service's promise answers `409 { error: { code } }` |
27730
27912
  | `ExecutorProfileConfigSchema` / `ExecutorProfileConfig` / `engineEnvironment` / `ownCredentials` / `helloProfile` / `CREDENTIAL_VARIABLES` | schema / _type_ / functions / constant | a profile on the executor's machine, the engine's allowlisted environment with the profile's `home` as `CLAUDE_CONFIG_DIR`, `CODEX_HOME` or (ACP) `HOME`, and `helloProfile({ profile, status, ambient })` carrying no path and no value; a driver refuses a profile whose `engine` is not its own with a `TypeError`, before it reads a file or starts the engine |
27731
27913
  | `mergeRateLimitEvent` / `planLimitsReadFailed` / `planLimitsDue` / `planWindowExpired` | functions | plan limits kept as three answers (`mergeRateLimitEvent`, `planLimitsReadFailed`, `planLimitsDue` take an options object), with a failed read beside the last answer |
@@ -27744,28 +27926,31 @@ Evolving.
27744
27926
 
27745
27927
  | Export | Kind | Purpose |
27746
27928
  |--------|------|---------|
27747
- | `createClaudeCliDriver` / `ClaudeCliDriverConfig` | function / _type_ | the driver; `permissionMode` defaults to `default`, so the server decides every tool the profile does not already allow |
27929
+ | `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
27930
  | `claudeFakeScenarios` | constant | the conformance scenarios in this dialect, for a scripted engine |
27749
- | `claudeTranscriptPath` | function | where a profile keeps a session's transcript (`{ home, cwd, sessionId }`) |
27931
+ | `claudeTranscriptPath` | function | where a profile keeps a session's transcript (`{ home, cwd, sessionId }`), resolving `realpath` of `cwd` (or its nearest existing ancestor) so symlinked workspaces match the canonical transcript location |
27750
27932
  | `claudePlanWindows` | function | Claude's `rate_limit_event` as plan windows (`five_hour`, `seven_day`) |
27751
27933
 
27752
27934
  ---
27753
27935
 
27754
27936
  ## `stitchkit/agent-executor/claude-sdk`
27755
27937
 
27756
- Claude through the Agent SDK. The application imports `query` from
27757
- `@anthropic-ai/claude-agent-sdk` (an optional peer) and passes it in; the leaf
27758
- imports only the SDK's types, so it loads without the SDK. Records are read by
27759
- the same classifier as the CLI's, permissions arrive through `canUseTool`, an
27760
- interrupt is `Query.interrupt()` and denies a permission still pending, and a
27761
- query that breaks fails its turn — the next turn opens a new one that resumes
27762
- the session. Reconcile is by the input's `uuid` in the profile's transcript.
27763
- Evolving.
27938
+ Claude through the Agent SDK. The application imports `query` (and optionally
27939
+ `forkSession`) from `@anthropic-ai/claude-agent-sdk` (an optional peer) and
27940
+ passes them in; the leaf imports only the SDK's types, so it loads without the
27941
+ SDK. Records are read by the same classifier as the CLI's, permissions arrive
27942
+ through `canUseTool`, an interrupt is `Query.interrupt()` and denies a
27943
+ permission still pending, and a query that breaks fails its turn — the next
27944
+ turn opens a new one that resumes the session with live model, permission mode
27945
+ and flag settings re-applied. Reconcile is by the input's `uuid` in the
27946
+ profile's transcript. Evolving.
27764
27947
 
27765
27948
  | Export | Kind | Purpose |
27766
27949
  |--------|------|---------|
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 |
27768
- | `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 |
27950
+ | `createClaudeSdkDriver` / `ClaudeSdkDriver` / `ClaudeSdkDriverConfig` | function / _types_ | the driver: `query` and `sdkVersion` required; optional `forkSession`, `model`, `permissionMode` (default `default`), `allowDangerouslySkipPermissions`, `pathToClaudeCodeExecutable`, `systemPrompt`, `settingSources`, `enableFileCheckpointing`, `supportedDialogKinds` / `onUserDialog`, `hooks`, `tools`, `allowedTools`, `disallowedTools`, `mcpServers`, `mcpServersDelivery`, `strictMcpConfig`, `plugins`, `agents`, `extraArgs`, `stderr`, `spawnClaudeCodeProcess`, `onProviderPid`, `verifyDelegation`, `resolveFile`, `maxImageBytes` (default 5 MiB), and `ambient`. `status` reports the plan windows the session's `rate_limit_event` carried and the login as `unknown`; `forkSession(sessionId, options?)` delegates to the injected SDK function |
27951
+ | `ClaudeSdkSession` | _type_ | extended session returned by `open()`: exposes `providerPid`, `setModel`, `setPermissionMode`, `applyFlagSettings`, `initializationResult`, `supportedModels`, `supportedCommands`, `accountInfo`, `getContextUsage`, `mcpServerStatus`, `toggleMcpServer`, `reconnectMcpServer`, and `rewindFiles` |
27952
+ | `ClaudeSdkDelegationCheck` | _type_ | fail-closed startup verification options (`requireHooksApplied`, `requireNoMcpServers`, `timeoutMs`) enforced at `open()` and on every query restart |
27953
+ | `ClaudeSdkQuery` / `ClaudeSdkRun` / `ClaudeSdkForkSession` | _types_ | the SDK `query` / `forkSession` signatures the leaf takes and the subset of a running `Query` it uses; the SDK's own functions fit as they are |
27769
27954
 
27770
27955
  ---
27771
27956
 
@@ -27781,15 +27966,19 @@ ACP keeps no client id, so reconcile is `none`: a send whose outcome is
27781
27966
  unknown stays unknown. Unknown keys an agent adds — `_meta`, a vendor's own
27782
27967
  fields — are let through; the keys the driver reads are typed. Evolving.
27783
27968
 
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`).
27969
+ Whether an agent pauses for host approval before running a tool is controlled by the agent
27970
+ itself, not by ACP: the driver's `approvalEnforcement` is `'agent-initiated'`, meaning it
27971
+ answers `session/request_permission` requests when the agent sends them and never synthesizes
27972
+ approvals for unprompted tool calls. Some ACP agents execute tools without sending
27973
+ `session/request_permission` in their default configuration; a host that requires interactive
27974
+ tool approval must configure the agent's own approval policy (for example `toolPermission: "strict"`
27975
+ in the agent's settings under `profile.home`, bearing in mind whether the agent's OAuth session
27976
+ is bound to that profile directory).
27788
27977
 
27789
27978
  | Export | Kind | Purpose |
27790
27979
  |--------|------|---------|
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 |
27980
+ | `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` |
27981
+ | `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
27982
  | `AcpSessionSummary` | _type_ | a session the agent keeps: id, working directory, title, last update |
27794
27983
  | `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
27984
  | `ACP_PROTOCOL_VERSION` | constant | `1`; an agent answering another version is refused at hello |
@@ -27809,13 +27998,19 @@ them itself, or through this leaf when they speak ACP.
27809
27998
 
27810
27999
  ## `stitchkit/agent-executor/codex`
27811
28000
 
27812
- Codex through `codex app-server` over stdio. Evolving.
28001
+ Codex through `codex app-server` over stdio (default) or RFC 6455
28002
+ WebSocket-over-Unix-socket (`unix-listen` / `unix-connect`). Evolving.
27813
28003
 
27814
28004
  | Export | Kind | Purpose |
27815
28005
  |--------|------|---------|
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` |
28006
+ | `createCodexDriver` / `CodexDriver` / `CodexDriverConfig` | function / _types_ | the driver: `transport` (`stdio`, `unix-listen`, `unix-connect`), `serverArgs`, thread policy (`model`, `modelProvider`, `approvalPolicy`, `sandbox`, `developerInstructions`, `runtimeWorkspaceRoots`, `config`), `prepareThread` / `verifyThread` lifecycle hooks, optional `resolveFile` and `maxImageBytes` (default 5 MiB) for turn-input images, approvals and input asked of the host, multi-bucket limits from `account/rateLimits/read` |
28007
+ | `CodexTransportConfig` | _type_ | transport selector: `{ kind: 'stdio' }`, `{ kind: 'unix-listen', socketPath, listenTimeoutMs? }`, or `{ kind: 'unix-connect', socketPath, expectedOwnerUid? }` |
28008
+ | `CodexSession` / `CodexControlClient` | _types_ | extended session returned by `open()`: exposes `providerPid`, applied `threadContext`, per-turn overrides on `startTurn`, `steerTurn`, non-mutating `forkThread`, `compactThread`, `readConfig`, `listMcpServerStatus`, `listSkills`, `listModels`, `readAccount`, and `readRateLimits` |
28009
+ | `CodexThreadContext` / `CodexThreadPolicyOverrides` / `CodexApprovalPolicy` / `CodexSandboxMode` | _types_ | applied policy/model context reported by `thread/start`, `thread/resume`, or `thread/fork`, and overridable thread policy fields |
28010
+ | `CodexTurnInput` / `CodexCollaborationMode` / `CodexSteerTurnInput` / `CodexForkThreadOptions` / `CodexForkedThread` | _types_ | per-turn `startTurn` overrides (`model`, fail-closed `modelProvider`, `reasoningEffort`, `collaborationMode`, `approvalPolicy`, `sandboxPolicy`, `runtimeWorkspaceRoots`), `steerTurn` input, and `forkThread` options/result |
28011
+ | `CodexUnixSocketError` / `CodexUnixSocketErrorKind` | class / _type_ | typed Unix-socket refusal/transport error distinguishing `endpoint-absent`, `endpoint-not-listening`, `target-refused`, `upgrade-refused`, and `connection-lost` |
27817
28012
  | `codexFakeScenarios` | constant | the conformance scenarios in this dialect, for a scripted app-server |
27818
- | `codexPlanWindows` | function | Codex's `rateLimits` as plan windows (`primary`, `secondary`) |
28013
+ | `codexPlanWindows` | function | unfolds Codex's `account/rateLimits/read` envelope (including `rateLimitsByLimitId`) or a single snapshot into `<limitId\|limit>:<minutes>m\|<slot>` plan windows carrying optional `windowDurationMins` and `label` |
27819
28014
 
27820
28015
  ---
27821
28016
 
@@ -28128,7 +28323,7 @@ server SDK), [`stitchkit/tools/agent`](#stitchkittoolsagent) (the `ai` peer) and
28128
28323
  | `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
28324
  | `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
28325
  | `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? }` |
28326
+ | `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
28327
  | `ToolLifecycle` | _type_ | `beforeHandle` / `afterHandle` hooks composed into a `ToolGate` via `composeToolLifecycle` |
28133
28328
  | `ToolExecutionControlReason` | _type_ | internal managed-execution stop reason: stale run or requested interruption |
28134
28329
  | `ToolExecutionControlError` | class | control-flow error used to unwind a superseded managed tool call without presenting it as a model-facing tool failure |
@@ -28280,7 +28475,8 @@ Advanced building blocks — the shared machinery the mounts are built on.
28280
28475
  | `ToolCallRecord` | _type_ | the structured record `createToolLogger` passes to `onRecord` |
28281
28476
  | `TransportSummary` | _type_ | `{ contractServices, runtimeTools, totals, sources }` from `summarizeTransports` |
28282
28477
  | `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>`) |
28478
+ | `ToolSurfaceProjection` | _type_ | the one readonly `{ services?, runtimeTools? }` container shared by full, MCP-only and introspection surfaces (`buildToolManifest`, `listToolNames` and `describeToolCatalog` accept `ToolSurfaceProjection<SurfaceRuntimeToolDefinition>`) |
28479
+ | `SurfaceRuntimeToolDefinition` | _type_ | peer-free non-executable runtime-tool descriptor accepted by `listToolNames`, `buildToolManifest` and `describeToolCatalog` (including static `AGENT_*_TOOL_DESCRIPTORS`) |
28284
28480
  | `ToolManifestConfig` | _type_ | mixed surface plus required model-facing `transport` and presentation options (`flattenUnionInput`, `inputRecursionDepth`) |
28285
28481
  | `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
28482
  | `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 +28740,7 @@ available from `stitchkit/contract`.
28544
28740
  | `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
28741
  | `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
28742
  | `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 |
28743
+ | `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
28744
 
28549
28745
  ## `stitchkit/spend`
28550
28746
 
@@ -28590,13 +28786,13 @@ Peer-free server-only host supervision primitives built on `stitchkit/files` and
28590
28786
 
28591
28787
  | Export | Kind | Summary |
28592
28788
  |--------|------|---------|
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`) |
28789
+ | `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`) |
28790
+ | `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 |
28791
+ | `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
28792
  | `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 |
28793
+ | `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
28794
  | `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 |
28795
+ | `SystemdCommandResult` / `SystemdHostAdapter` / `CheckSystemdUnitOptions` / `SystemdUnitCheckStatus` / `SystemdUnitCheckResult` / `SystemdUnitQueryOptions` / `ApplySystemdUnitOptions` / `SystemdApplyResult` / `CheckSystemdTimerPairOptions` / `SystemdTimerPairCheckResult` / `InstallSystemdTimerPairOptions` / `SystemdTimerPairInstallResult` | _types_ | adapter, inspection, query, apply and timer-pair contracts |
28600
28796
  | `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
28797
 
28602
28798
  ### macOS `launchd` supervision
@@ -29093,7 +29289,7 @@ is how a partially understood declaration becomes a running, wrong deployment.
29093
29289
  | `PROJECT_DECLARATION_SCHEMA_VERSION` | constant | the declaration format this build understands — the number a reader refuses on |
29094
29290
  | `namesAMachine` | function | why a string names a particular machine, or `undefined` — the one predicate every free string is checked against |
29095
29291
  | `findProjectRole` | function | the role with a given name, or `undefined` |
29096
- | `ProjectIdentitySchema` / `ProjectIdentity` | schema / _type_ | `slug`, `name`, `version` and a per-locale `description` |
29292
+ | `ProjectIdentitySchema` / `ProjectIdentity` | schema / _type_ | `slug`, `name` and a per-locale `description` (version lives solely in the root `package.json`) |
29097
29293
  | `ProjectRoleSchema` / `ProjectRole` | schema / _type_ | one runnable role: a `workingDirectory` inside the source, per-mode `commands`, an optional `listener`, and `drainFloorMs` |
29098
29294
  | `ProjectCommandSchema` / `ProjectCommand` | schema / _type_ | `executable` plus `args` — argv, never a shell string |
29099
29295
  | `ProjectRoleCommandSchema` / `ProjectRoleCommand` | schema / _type_ | a command run under a supervisor: additionally never a script runner, because a launcher duplicates the shutdown signal |
@@ -29134,7 +29330,7 @@ runtime-agnostic pieces of `stitchkit/server` and the error helpers.
29134
29330
  | `createHandler` | function | the router as a bare `(req) => Response` (same as `/server`) |
29135
29331
  | `createLocalHostGuard` / `LocalHostGuard` / `LocalHostGuardConfig` / `LocalHostRefusal` | function / _types_ | the local-host guard for `serveNode` (same as `/server`) |
29136
29332
  | `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` |
29333
+ | `createUnixClientTransport` | function | the same fail-closed Bun/Node Unix client adapter exported by `stitchkit/server` (including optional `expectedOwnerUid`) |
29138
29334
  | `implement` / `createImplement` / `createScopedImplement` / `createScopedImplementRegistry` / `createMultipartStream` | function | bind a contract to typed handlers, optionally typed per endpoint scope (same as `/server`) |
29139
29335
  | `NodeServerConfig` | _type_ | config for `serveNode` |
29140
29336
  | `NodeServerHandle` | _type_ | managed Node handle (`url`, `port`, `runtime`, `status`, `shutdown`) |
@@ -29142,7 +29338,7 @@ runtime-agnostic pieces of `stitchkit/server` and the error helpers.
29142
29338
  | `NodeSocketLifecycle` | _type_ | Bun-free Socket.IO lifecycle accepted by `serveNode` |
29143
29339
  | `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
29340
  | `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 |
29341
+ | `UnixClientTransportConfig` / `UnixClientTransport` | _type_ | Unix socket bounds, optional `expectedOwnerUid`, explicit response-body mode and owned Fetch-compatible handle |
29146
29342
  | `UnixResponseBodyMode` | _type_ | finite cumulative `bounded` mode or explicit pull-driven `streaming` mode |
29147
29343
  | `UnixClientTransportError` / `UnixClientTransportErrorCode` / `UnixClientDeliveryState` | class / _type_ | stable failure plus dispatch certainty; no cross-transport fallback |
29148
29344
  | `AppError` + `badRequest` / `unauthorized` / `forbidden` / `notFound` / `conflict` / `rateLimited` | — | error helpers (same as `/contract`) |
@@ -29161,9 +29357,9 @@ SDK nor the `ai` peer.
29161
29357
  | `defineCliCommand` | function | define one Zod-typed CLI-only executable command with optional validated-result presentation/exit policy |
29162
29358
  | `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
29359
  | `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) |
29360
+ | `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
29361
  | `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`) |
29362
+ | `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
29363
  | `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
29364
  | `CliArgumentError` | class | the refusal `parseCliArgs` and the view flags raise; a CLI reports it and exits `2` |
29169
29365
  | `renderCliView` | function | compute an aggregate over a result (`--count-by`, `--sum`, `--top`, `--table`) — [guide](../guide/cli.md#aggregate-views) |
@@ -29191,10 +29387,10 @@ SDK nor the `ai` peer.
29191
29387
  | `CliProfileStore` / `CliProfileStoreConfig` / `ResolvedCliProfile` | _type_ | the profile store, its directory/schema/hint config, and one resolution |
29192
29388
  | `CliResultView` | _type_ | the requested view — `count`, `sum`, or `records` (ordered and/or table-rendered) |
29193
29389
  | `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`) |
29390
+ | `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
29391
  | `CliArgvRoute` | _type_ | `{ command, commandArgv, topLevelHelp, version, error?, separatedBefore? }` returned by `routeCliArgv` (`separatedBefore` indexes `commandArgv`, for `parseCliArgs`) |
29196
29392
  | `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` |
29393
+ | `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
29394
  | `pollUntilDone` | function | the generic `--wait` poller (advanced) |
29199
29395
  | `emitResult` | function | write a pretty or compact `ToolResult` record to stdout/stderr + exit code (advanced) |
29200
29396
  | `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 |