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.txt CHANGED
@@ -9,37 +9,37 @@ Build with stitchkit: define a contract once, then `implement` it and serve it (
9
9
  Load the slice for each entrypoint your code imports — `import … from 'stitchkit/server'` → `llms/server.txt`; the root `stitchkit` import → `llms/stitchkit.txt`. A slice holds that entrypoint's API reference section and the guide pages whose home it is; every guide lives in exactly one slice, and a slice that needs another's guide names it under "Also read". Each file is at most 50.0 KB; a longer one continues in numbered parts, each naming the next at its top. Moving across versions: load `llms/upgrading.txt` and the range slices it lists between your version and the target. `llms-full.txt` inlines everything; it is far larger than a context window, so do not read it whole.
10
10
 
11
11
  ## Entrypoint slices
12
- - **stitchkit**: [llms/stitchkit.txt](llms/stitchkit.txt) 38.0 KB → [llms/stitchkit.2.txt](llms/stitchkit.2.txt) 46.0 KB → [llms/stitchkit.3.txt](llms/stitchkit.3.txt) 27.5 KB
12
+ - **stitchkit**: [llms/stitchkit.txt](llms/stitchkit.txt) 38.5 KB → [llms/stitchkit.2.txt](llms/stitchkit.2.txt) 46.0 KB → [llms/stitchkit.3.txt](llms/stitchkit.3.txt) 27.5 KB
13
13
  - **stitchkit/live**: [llms/live.txt](llms/live.txt) 22.7 KB
14
14
  - **stitchkit/react**: [llms/react.txt](llms/react.txt) 8.7 KB
15
15
  - **stitchkit/react/keyboard**: [llms/react-keyboard.txt](llms/react-keyboard.txt) 22.7 KB
16
16
  - **stitchkit/react/keyboard/testing**: [llms/react-keyboard-testing.txt](llms/react-keyboard-testing.txt) 1.9 KB
17
- - **stitchkit/tools**: [llms/tools.txt](llms/tools.txt) 45.4 KB → [llms/tools.2.txt](llms/tools.2.txt) 38.9 KB → [llms/tools.3.txt](llms/tools.3.txt) 21.6 KB
17
+ - **stitchkit/tools**: [llms/tools.txt](llms/tools.txt) 45.4 KB → [llms/tools.2.txt](llms/tools.2.txt) 38.9 KB → [llms/tools.3.txt](llms/tools.3.txt) 22.1 KB
18
18
  - **stitchkit/tools/mcp**: [llms/tools-mcp.txt](llms/tools-mcp.txt) 7.0 KB
19
19
  - **stitchkit/tools/agent**: [llms/tools-agent.txt](llms/tools-agent.txt) 1.1 KB
20
20
  - **stitchkit/tools/toolkit**: [llms/tools-toolkit.txt](llms/tools-toolkit.txt) 0.9 KB
21
21
  - **stitchkit/tools/contract**: [llms/tools-contract.txt](llms/tools-contract.txt) 0.2 KB
22
22
  - **stitchkit/tools/invoker**: [llms/tools-invoker.txt](llms/tools-invoker.txt) 0.2 KB
23
23
  - **stitchkit/tools/connections**: [llms/tools-connections.txt](llms/tools-connections.txt) 4.9 KB
24
- - **stitchkit/cli**: [llms/cli.txt](llms/cli.txt) 41.9 KB → [llms/cli.2.txt](llms/cli.2.txt) 46.0 KB → [llms/cli.3.txt](llms/cli.3.txt) 12.0 KB
24
+ - **stitchkit/cli**: [llms/cli.txt](llms/cli.txt) 42.0 KB → [llms/cli.2.txt](llms/cli.2.txt) 46.0 KB → [llms/cli.3.txt](llms/cli.3.txt) 12.4 KB
25
25
  - **stitchkit/cli/publish**: [llms/cli-publish.txt](llms/cli-publish.txt) 1.5 KB
26
26
  - **stitchkit/remote**: [llms/remote.txt](llms/remote.txt) 1.0 KB
27
27
  - **stitchkit/contract**: [llms/contract.txt](llms/contract.txt) 34.8 KB
28
28
  - **stitchkit/primitives**: [llms/primitives.txt](llms/primitives.txt) 15.2 KB
29
29
  - **stitchkit/handler**: [llms/handler.txt](llms/handler.txt) 2.3 KB
30
- - **stitchkit/server**: [llms/server.txt](llms/server.txt) 42.3 KB → [llms/server.2.txt](llms/server.2.txt) 41.3 KB → [llms/server.3.txt](llms/server.3.txt) 47.1 KB → [llms/server.4.txt](llms/server.4.txt) 40.7 KB → [llms/server.5.txt](llms/server.5.txt) 25.7 KB
30
+ - **stitchkit/server**: [llms/server.txt](llms/server.txt) 42.3 KB → [llms/server.2.txt](llms/server.2.txt) 41.3 KB → [llms/server.3.txt](llms/server.3.txt) 47.1 KB → [llms/server.4.txt](llms/server.4.txt) 40.7 KB → [llms/server.5.txt](llms/server.5.txt) 25.9 KB
31
31
  - **stitchkit/observability**: [llms/observability.txt](llms/observability.txt) 39.7 KB → [llms/observability.2.txt](llms/observability.2.txt) 10.1 KB
32
- - **stitchkit/agent-runtime**: [llms/agent-runtime.txt](llms/agent-runtime.txt) 40.0 KB → [llms/agent-runtime.2.txt](llms/agent-runtime.2.txt) 40.7 KB → [llms/agent-runtime.3.txt](llms/agent-runtime.3.txt) 40.7 KB → [llms/agent-runtime.4.txt](llms/agent-runtime.4.txt) 37.9 KB → [llms/agent-runtime.5.txt](llms/agent-runtime.5.txt) 11.8 KB
32
+ - **stitchkit/agent-runtime**: [llms/agent-runtime.txt](llms/agent-runtime.txt) 40.0 KB → [llms/agent-runtime.2.txt](llms/agent-runtime.2.txt) 40.7 KB → [llms/agent-runtime.3.txt](llms/agent-runtime.3.txt) 40.7 KB → [llms/agent-runtime.4.txt](llms/agent-runtime.4.txt) 40.6 KB → [llms/agent-runtime.5.txt](llms/agent-runtime.5.txt) 11.8 KB
33
33
  - **stitchkit/agent-runtime/testing**: [llms/agent-runtime-testing.txt](llms/agent-runtime-testing.txt) 3.2 KB
34
34
  - **stitchkit/agent-runtime/harness**: [llms/agent-runtime-harness.txt](llms/agent-runtime-harness.txt) 13.7 KB
35
35
  - **stitchkit/agent-runtime/coding-tools**: [llms/agent-runtime-coding-tools.txt](llms/agent-runtime-coding-tools.txt) 5.0 KB
36
36
  - **stitchkit/agent-runtime/browser**: [llms/agent-runtime-browser.txt](llms/agent-runtime-browser.txt) 4.0 KB
37
37
  - **stitchkit/agent-runtime/openrouter**: [llms/agent-runtime-openrouter.txt](llms/agent-runtime-openrouter.txt) 5.0 KB
38
- - **stitchkit/agent-executor**: [llms/agent-executor.txt](llms/agent-executor.txt) 6.2 KB
39
- - **stitchkit/agent-executor/acp**: [llms/agent-executor-acp.txt](llms/agent-executor-acp.txt) 3.7 KB
40
- - **stitchkit/agent-executor/claude**: [llms/agent-executor-claude.txt](llms/agent-executor-claude.txt) 1.4 KB
41
- - **stitchkit/agent-executor/claude-sdk**: [llms/agent-executor-claude-sdk.txt](llms/agent-executor-claude-sdk.txt) 1.7 KB
42
- - **stitchkit/agent-executor/codex**: [llms/agent-executor-codex.txt](llms/agent-executor-codex.txt) 1.1 KB
38
+ - **stitchkit/agent-executor**: [llms/agent-executor.txt](llms/agent-executor.txt) 6.4 KB
39
+ - **stitchkit/agent-executor/acp**: [llms/agent-executor-acp.txt](llms/agent-executor-acp.txt) 4.4 KB
40
+ - **stitchkit/agent-executor/claude**: [llms/agent-executor-claude.txt](llms/agent-executor-claude.txt) 1.6 KB
41
+ - **stitchkit/agent-executor/claude-sdk**: [llms/agent-executor-claude-sdk.txt](llms/agent-executor-claude-sdk.txt) 2.8 KB
42
+ - **stitchkit/agent-executor/codex**: [llms/agent-executor-codex.txt](llms/agent-executor-codex.txt) 3.0 KB
43
43
  - **stitchkit/agent-executor/testing**: [llms/agent-executor-testing.txt](llms/agent-executor-testing.txt) 1.7 KB
44
44
  - **stitchkit/agent-runtime/postgres**: [llms/agent-runtime-postgres.txt](llms/agent-runtime-postgres.txt) 1.7 KB
45
45
  - **stitchkit/agent-runtime/sqlite/bun**: [llms/agent-runtime-sqlite-bun.txt](llms/agent-runtime-sqlite-bun.txt) 1.7 KB
@@ -53,8 +53,8 @@ Load the slice for each entrypoint your code imports — `import … from 'stitc
53
53
  - **stitchkit/agent-runtime/sandbox**: [llms/agent-runtime-sandbox.txt](llms/agent-runtime-sandbox.txt) 8.6 KB
54
54
  - **stitchkit/spend**: [llms/spend.txt](llms/spend.txt) 10.3 KB
55
55
  - **stitchkit/spend/testing**: [llms/spend-testing.txt](llms/spend-testing.txt) 1.2 KB
56
- - **stitchkit/files**: [llms/files.txt](llms/files.txt) 11.1 KB
57
- - **stitchkit/service-host**: [llms/service-host.txt](llms/service-host.txt) 9.8 KB
56
+ - **stitchkit/files**: [llms/files.txt](llms/files.txt) 11.4 KB
57
+ - **stitchkit/service-host**: [llms/service-host.txt](llms/service-host.txt) 10.3 KB
58
58
  - **stitchkit/service-host/macos**: [llms/service-host-macos.txt](llms/service-host-macos.txt) 6.2 KB
59
59
  - **stitchkit/telegram**: [llms/telegram.txt](llms/telegram.txt) 44.3 KB → [llms/telegram.2.txt](llms/telegram.2.txt) 15.6 KB
60
60
  - **stitchkit/telegram/grammy**: [llms/telegram-grammy.txt](llms/telegram-grammy.txt) 2.3 KB
@@ -74,8 +74,8 @@ Load the slice for each entrypoint your code imports — `import … from 'stitc
74
74
  - **stitchkit/sync/postgres**: [llms/sync-postgres.txt](llms/sync-postgres.txt) 2.3 KB
75
75
  - **stitchkit/oauth**: [llms/oauth.txt](llms/oauth.txt) 6.7 KB
76
76
  - **stitchkit/google**: [llms/google.txt](llms/google.txt) 1.4 KB
77
- - **stitchkit/declaration**: [llms/declaration.txt](llms/declaration.txt) 15.8 KB
78
- - **stitchkit/node**: [llms/node.txt](llms/node.txt) 3.2 KB
77
+ - **stitchkit/declaration**: [llms/declaration.txt](llms/declaration.txt) 15.9 KB
78
+ - **stitchkit/node**: [llms/node.txt](llms/node.txt) 3.3 KB
79
79
  - **stitchkit/agent-runtime/react**: [llms/agent-runtime-react.txt](llms/agent-runtime-react.txt) 1.0 KB
80
80
  - **stitchkit/agent-runtime/realtime**: [llms/agent-runtime-realtime.txt](llms/agent-runtime-realtime.txt) 2.6 KB
81
81
  - **stitchkit/process**: [llms/process.txt](llms/process.txt) 41.0 KB → [llms/process.2.txt](llms/process.2.txt) 17.3 KB
@@ -86,6 +86,7 @@ Load the slice for each entrypoint your code imports — `import … from 'stitc
86
86
 
87
87
  ## Upgrading slices
88
88
  - **Upgrading — how to move across versions**: [llms/upgrading.txt](llms/upgrading.txt) 12.8 KB
89
+ - **Upgrading 0.128.0 → 0.129.0**: [llms/upgrading-0.128.0-0.129.0.txt](llms/upgrading-0.128.0-0.129.0.txt) 6.5 KB
89
90
  - **Upgrading 0.127.0 → 0.127.0**: [llms/upgrading-0.127.0.txt](llms/upgrading-0.127.0.txt) 46.3 KB
90
91
  - **Upgrading 0.106.0 → 0.126.0**: [llms/upgrading-0.106.0-0.126.0.txt](llms/upgrading-0.106.0-0.126.0.txt) 40.4 KB
91
92
  - **Upgrading 0.96.0 → 0.105.0**: [llms/upgrading-0.96.0-0.105.0.txt](llms/upgrading-0.96.0-0.105.0.txt) 45.8 KB
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "stitchkit",
3
- "version": "0.127.0",
3
+ "version": "0.129.0",
4
4
  "description": "Contract-first backend framework — one defineContract() into an HTTP API, MCP tools, AI-agent tools and a typed client. Bun and Node.",
5
5
  "keywords": [
6
6
  "bun",
@@ -1,193 +0,0 @@
1
- import {
2
- AgentUsageSchema2
3
- } from "./index-bn2baakz.js";
4
-
5
- // src/agent-runtime/invocation-schema.ts
6
- import { z } from "zod";
7
- var Id = z.string().min(1).max(512);
8
- var Hash = z.string().regex(/^[a-f0-9]{64}$/);
9
- var ModelInvocationTraceSchema2 = z.object({
10
- operationId: Id,
11
- purpose: Id,
12
- project: Id,
13
- parent: z.object({ traceId: Id, invocationId: Id.optional() }).strict().optional(),
14
- experiment: Id.optional(),
15
- case: Id.optional(),
16
- profile: Id.optional()
17
- }).strict();
18
- var CompletionInvocationInputSchema2 = z.object({
19
- conversationId: Id,
20
- idempotencyKey: Id,
21
- trace: ModelInvocationTraceSchema2,
22
- prompt: z.string().min(1),
23
- models: z.array(Id).min(1).max(8),
24
- settings: z.object({
25
- maxOutputTokens: z.int().positive().optional(),
26
- temperature: z.number().finite().optional(),
27
- topP: z.number().min(0).max(1).optional(),
28
- seed: z.int().optional()
29
- }).strict().optional(),
30
- timeoutMs: z.int().positive().max(3600000)
31
- }).strict();
32
- var Identity = z.object({
33
- provider: Id.nullable(),
34
- modelId: Id.nullable(),
35
- responseId: Id.nullable()
36
- }).strict();
37
- var InvocationCallerSchema = z.object({ subject: Id }).strict();
38
- var InvocationProcessSchema = z.object({
39
- instanceId: Id,
40
- pid: z.int().positive(),
41
- hostname: Id
42
- }).strict();
43
- var Base = z.object({
44
- conversationId: Id,
45
- invocationId: Id,
46
- operationId: Id,
47
- runId: Id.optional()
48
- });
49
- var InvocationStartedSchema = Base.extend({
50
- type: z.literal("invocation/started"),
51
- mode: z.enum(["completion", "agent"]),
52
- trace: ModelInvocationTraceSchema2,
53
- caller: InvocationCallerSchema,
54
- executingProcess: InvocationProcessSchema,
55
- fingerprint: Hash,
56
- requested: z.object({ models: z.array(Id), payloadSha256: Hash }).strict()
57
- }).strict();
58
- var InvocationAttemptContextSchema = Base.extend({
59
- attemptId: Id,
60
- step: z.int().nonnegative()
61
- }).strict();
62
- var Attempt = Base.extend({ attemptId: Id, step: z.int().nonnegative() });
63
- var InvocationRequestSchema = Attempt.extend({
64
- type: z.literal("provider/request"),
65
- requested: z.object({ modelId: Id, provider: Id }).strict(),
66
- executingProcess: InvocationProcessSchema,
67
- sent: z.object({
68
- modelId: Id,
69
- provider: Id,
70
- payloadSha256: Hash,
71
- artifactId: Id,
72
- tools: z.int().nonnegative()
73
- }).strict()
74
- }).strict();
75
- var InvocationResponseSchema = Attempt.extend({
76
- type: z.literal("provider/response"),
77
- status: z.enum(["succeeded", "failed", "cancelled"]),
78
- effective: Identity,
79
- usage: AgentUsageSchema2,
80
- artifactId: Id,
81
- payloadSha256: Hash
82
- }).strict();
83
- var InvocationFinishedSchema = Base.extend({
84
- type: z.literal("invocation/finished"),
85
- failure: z.object({ artifactId: Id, payloadSha256: Hash }).strict().optional(),
86
- status: z.enum(["succeeded", "failed", "cancelled"])
87
- }).strict();
88
- var ModelInvocationRecordSchema2 = z.discriminatedUnion("type", [
89
- InvocationStartedSchema,
90
- InvocationRequestSchema,
91
- InvocationResponseSchema,
92
- InvocationFinishedSchema
93
- ]);
94
- var InvocationPayloadSchema = Base.extend({
95
- artifactId: Id,
96
- sha256: Hash,
97
- bytes: z.int().nonnegative(),
98
- iv: z.string(),
99
- tag: z.string(),
100
- ciphertext: z.string()
101
- }).strict();
102
- var InvocationPayloadReceiptSchema = InvocationPayloadSchema.partial({
103
- iv: true,
104
- tag: true,
105
- ciphertext: true
106
- });
107
- function isModelInvocationRecord(payload) {
108
- return payload !== null && typeof payload === "object" && "invocationId" in payload;
109
- }
110
-
111
- // src/agent-runtime/history-chronology.ts
112
- function createToolChronology() {
113
- return { calls: new Map, approvals: new Map, pending: 0, resultsStarted: false };
114
- }
115
- function advanceToolChronology(previous, parts) {
116
- const calls = new Map(previous.calls);
117
- const approvals = new Map(previous.approvals);
118
- let { pending, resultsStarted } = previous;
119
- for (const part of parts) {
120
- if (part.type === "tool-call") {
121
- if (calls.has(part.callId) || resultsStarted && pending > 0)
122
- return;
123
- if (pending === 0)
124
- resultsStarted = false;
125
- calls.set(part.callId, { toolName: part.toolName, phase: "called" });
126
- pending += 1;
127
- } else if (part.type === "tool-approval-request") {
128
- const call = calls.get(part.callId);
129
- if (call?.phase !== "called" || approvals.has(part.approvalId))
130
- return;
131
- approvals.set(part.approvalId, part.callId);
132
- calls.set(part.callId, { ...call, phase: "requested" });
133
- } else if (part.type === "tool-approval-response") {
134
- const callId = approvals.get(part.approvalId);
135
- const call = callId === undefined ? undefined : calls.get(callId);
136
- if (callId === undefined || !call || call.phase !== "requested")
137
- return;
138
- calls.set(callId, { ...call, phase: part.approved ? "approved" : "denied" });
139
- } else if (part.type === "tool-result") {
140
- const call = calls.get(part.callId);
141
- if (!call || call.toolName !== part.toolName || call.phase === "result" || call.phase === "requested" || call.phase === "denied" && part.outcome === "success")
142
- return;
143
- calls.set(part.callId, { ...call, phase: "result" });
144
- pending -= 1;
145
- resultsStarted = true;
146
- }
147
- }
148
- return { calls, approvals, pending, resultsStarted };
149
- }
150
- function canProjectToolChronology(state) {
151
- return [...state.calls.values()].every(({ phase }) => phase !== "called");
152
- }
153
-
154
- // src/agent-runtime/terminal-status.ts
155
- function isSpeakableAssistantStatus(status) {
156
- return status === "completed" || status === "interrupted" || status === "committed";
157
- }
158
- function isAssistantHistoryEvidence2(status, policy) {
159
- return isSpeakableAssistantStatus(status) || status === "failed" && policy?.failedAssistant === "assistant-marked";
160
- }
161
- function isCompleteAgentHistoryTurn(messages, policy) {
162
- if (messages[0]?.role !== "user")
163
- return false;
164
- let chronology = createToolChronology();
165
- let assistantCount = 0;
166
- for (const message of messages) {
167
- if (message.role === "assistant") {
168
- if (!isAssistantHistoryEvidence2(message.status, policy))
169
- return false;
170
- assistantCount += 1;
171
- }
172
- const next = advanceToolChronology(chronology, message.parts);
173
- if (!next)
174
- return false;
175
- chronology = next;
176
- }
177
- return assistantCount > 0 && chronology.pending === 0;
178
- }
179
- function assistantStatus(reason) {
180
- if (reason === "success" || reason === "policy_stop" || reason === "provider_stop") {
181
- return "completed";
182
- }
183
- if (reason === "superseded")
184
- return "superseded";
185
- if (reason === "absorbed")
186
- return "superseded";
187
- if (reason === "interrupted" || reason === "cancelled" || reason === "shutdown") {
188
- return "interrupted";
189
- }
190
- return "failed";
191
- }
192
-
193
- export { ModelInvocationTraceSchema2, CompletionInvocationInputSchema2, InvocationCallerSchema, InvocationStartedSchema, InvocationRequestSchema, InvocationResponseSchema, InvocationFinishedSchema, ModelInvocationRecordSchema2, InvocationPayloadSchema, InvocationPayloadReceiptSchema, isModelInvocationRecord, createToolChronology, advanceToolChronology, canProjectToolChronology, isAssistantHistoryEvidence2, isCompleteAgentHistoryTurn, assistantStatus };
@@ -1,93 +0,0 @@
1
- import {
2
- isRecord
3
- } from "./index-ps3djm8d.js";
4
-
5
- // src/tools/access.ts
6
- var TOOL_OPEN_REASONS = ["public", "local-operator", "remote"];
7
- var TOOL_OPEN_REASON_SET = new Set(TOOL_OPEN_REASONS);
8
- function accessRequiredMessage(entryName) {
9
- return `${entryName}: access is required — pass { gate } with the auth hook or { open }`;
10
- }
11
- function legacyLifecycleMessage(entryName) {
12
- return `${entryName}: access is required — pass { gate } with the auth hook or { open } ("lifecycle" was replaced by "access")`;
13
- }
14
- function isBeforeHandleHook(value) {
15
- return typeof value === "function";
16
- }
17
- function isAfterHandleHook(value) {
18
- return typeof value === "function";
19
- }
20
- function isToolOpenReason(value) {
21
- return typeof value === "string" && TOOL_OPEN_REASON_SET.has(value);
22
- }
23
- function resolveToolAccess(entryName, config) {
24
- if (!isRecord(config)) {
25
- throw new TypeError(accessRequiredMessage(entryName));
26
- }
27
- if (Object.hasOwn(config, "lifecycle")) {
28
- throw new TypeError(legacyLifecycleMessage(entryName));
29
- }
30
- if (!Object.hasOwn(config, "access")) {
31
- throw new TypeError(accessRequiredMessage(entryName));
32
- }
33
- const { access } = config;
34
- if (!isRecord(access)) {
35
- throw new TypeError(accessRequiredMessage(entryName));
36
- }
37
- const hasGate = Object.hasOwn(access, "gate") && access.gate !== undefined;
38
- const hasOpen = Object.hasOwn(access, "open") && access.open !== undefined;
39
- if (hasGate === hasOpen) {
40
- throw new TypeError(accessRequiredMessage(entryName));
41
- }
42
- if (hasGate) {
43
- for (const key of Object.keys(access)) {
44
- if (key === "gate")
45
- continue;
46
- if ((key === "open" || key === "afterHandle") && access[key] === undefined)
47
- continue;
48
- throw new TypeError(accessRequiredMessage(entryName));
49
- }
50
- const { gate } = access;
51
- if (!isRecord(gate)) {
52
- throw new TypeError(accessRequiredMessage(entryName));
53
- }
54
- const { beforeHandle, afterHandle } = gate;
55
- if (!isBeforeHandleHook(beforeHandle)) {
56
- throw new TypeError(accessRequiredMessage(entryName));
57
- }
58
- if (afterHandle !== undefined && !isAfterHandleHook(afterHandle)) {
59
- throw new TypeError(accessRequiredMessage(entryName));
60
- }
61
- return afterHandle !== undefined ? { beforeHandle, afterHandle } : { beforeHandle };
62
- }
63
- for (const key of Object.keys(access)) {
64
- if (key === "open" || key === "afterHandle")
65
- continue;
66
- if (key === "gate" && access[key] === undefined)
67
- continue;
68
- throw new TypeError(accessRequiredMessage(entryName));
69
- }
70
- const { open, afterHandle } = access;
71
- if (!isToolOpenReason(open)) {
72
- throw new TypeError(accessRequiredMessage(entryName));
73
- }
74
- if (afterHandle !== undefined && !isAfterHandleHook(afterHandle)) {
75
- throw new TypeError(accessRequiredMessage(entryName));
76
- }
77
- return afterHandle !== undefined ? { afterHandle } : {};
78
- }
79
- function resolveOptionalCliToolAccess(entryName, config) {
80
- if (!isRecord(config)) {
81
- throw new TypeError(accessRequiredMessage(entryName));
82
- }
83
- if (Object.hasOwn(config, "lifecycle")) {
84
- throw new TypeError(legacyLifecycleMessage(entryName));
85
- }
86
- const hasManagedSurface = config.services !== undefined || config.runtimeTools !== undefined;
87
- if (hasManagedSurface || Object.hasOwn(config, "access") && config.access !== undefined) {
88
- return resolveToolAccess(entryName, config);
89
- }
90
- return {};
91
- }
92
-
93
- export { resolveToolAccess, resolveOptionalCliToolAccess };