stitchkit 0.94.0 → 0.94.1

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 (346) hide show
  1. package/CHANGELOG.md +64 -0
  2. package/dist/agent-runtime/coding-shell-process.d.ts.map +1 -1
  3. package/dist/agent-runtime/coding-tool-listing.d.ts.map +1 -1
  4. package/dist/agent-runtime/coding-tool-search-patch.d.ts.map +1 -1
  5. package/dist/agent-runtime/contained-darwin.d.ts +38 -0
  6. package/dist/agent-runtime/contained-darwin.d.ts.map +1 -0
  7. package/dist/agent-runtime/contained-files.d.ts +11 -26
  8. package/dist/agent-runtime/contained-files.d.ts.map +1 -1
  9. package/dist/agent-runtime/contained-scan.d.ts +21 -0
  10. package/dist/agent-runtime/contained-scan.d.ts.map +1 -0
  11. package/dist/agent-runtime/contained-write.d.ts +9 -0
  12. package/dist/agent-runtime/contained-write.d.ts.map +1 -0
  13. package/dist/agent-runtime/deferred-tool-types.d.ts +3 -2
  14. package/dist/agent-runtime/deferred-tool-types.d.ts.map +1 -1
  15. package/dist/agent-runtime/harness-control.d.ts +0 -1
  16. package/dist/agent-runtime/harness-control.d.ts.map +1 -1
  17. package/dist/agent-runtime/harness.d.ts +0 -5
  18. package/dist/agent-runtime/harness.d.ts.map +1 -1
  19. package/dist/agent-runtime/managed-tools.d.ts +3 -2
  20. package/dist/agent-runtime/managed-tools.d.ts.map +1 -1
  21. package/dist/agent-runtime/runtime.d.ts +1 -1
  22. package/dist/agent-runtime/runtime.d.ts.map +1 -1
  23. package/dist/agent-runtime/schedule-records.d.ts +34 -0
  24. package/dist/agent-runtime/schedule-records.d.ts.map +1 -0
  25. package/dist/agent-runtime/schedules.d.ts +34 -0
  26. package/dist/agent-runtime/schedules.d.ts.map +1 -1
  27. package/dist/agent-runtime/store-conformance-lifecycle.d.ts +434 -0
  28. package/dist/agent-runtime/store-conformance-lifecycle.d.ts.map +1 -0
  29. package/dist/agent-runtime/store-conformance-ordering.d.ts +18 -0
  30. package/dist/agent-runtime/store-conformance-ordering.d.ts.map +1 -0
  31. package/dist/agent-runtime/store-conformance-support.d.ts +130 -0
  32. package/dist/agent-runtime/store-conformance-support.d.ts.map +1 -0
  33. package/dist/agent-runtime/store-conformance-terminal.d.ts +12 -0
  34. package/dist/agent-runtime/store-conformance-terminal.d.ts.map +1 -0
  35. package/dist/agent-runtime/store-conformance.d.ts.map +1 -1
  36. package/dist/application/admission-rate.d.ts +21 -0
  37. package/dist/application/admission-rate.d.ts.map +1 -0
  38. package/dist/application/admission-run.d.ts +8 -0
  39. package/dist/application/admission-run.d.ts.map +1 -0
  40. package/dist/application/admission.d.ts.map +1 -1
  41. package/dist/application/diagnostic-journal-lock.d.ts +9 -34
  42. package/dist/application/diagnostic-journal-lock.d.ts.map +1 -1
  43. package/dist/application/diagnostic-journal-manager.d.ts.map +1 -1
  44. package/dist/application/diagnostic-journal-storage.d.ts.map +1 -1
  45. package/dist/application/kernel-resource-context.d.ts.map +1 -1
  46. package/dist/application/notification-outbox.d.ts.map +1 -1
  47. package/dist/application/schedule.d.ts +0 -1
  48. package/dist/application/schedule.d.ts.map +1 -1
  49. package/dist/application/watch-hub-core.d.ts +122 -0
  50. package/dist/application/watch-hub-core.d.ts.map +1 -0
  51. package/dist/application/watch-hub.d.ts +2 -2
  52. package/dist/application/watch-hub.d.ts.map +1 -1
  53. package/dist/browser/client-executors.d.ts +14 -0
  54. package/dist/browser/client-executors.d.ts.map +1 -0
  55. package/dist/browser/client-multipart.d.ts +1 -1
  56. package/dist/browser/client-multipart.d.ts.map +1 -1
  57. package/dist/browser/client.d.ts +3 -2
  58. package/dist/browser/client.d.ts.map +1 -1
  59. package/dist/browser/http-fetch.d.ts +22 -0
  60. package/dist/browser/http-fetch.d.ts.map +1 -0
  61. package/dist/browser/http.d.ts +1 -3
  62. package/dist/browser/http.d.ts.map +1 -1
  63. package/dist/browser/live-state-core.d.ts +63 -0
  64. package/dist/browser/live-state-core.d.ts.map +1 -0
  65. package/dist/browser/live-state.d.ts.map +1 -1
  66. package/dist/browser/realtime-client.d.ts +26 -0
  67. package/dist/browser/realtime-client.d.ts.map +1 -0
  68. package/dist/browser/socket-io-connection.d.ts +82 -0
  69. package/dist/browser/socket-io-connection.d.ts.map +1 -0
  70. package/dist/browser/socket-io-peer.d.ts +20 -0
  71. package/dist/browser/socket-io-peer.d.ts.map +1 -0
  72. package/dist/browser/socket-io-trace.d.ts +31 -0
  73. package/dist/browser/socket-io-trace.d.ts.map +1 -0
  74. package/dist/browser/socket-io.d.ts +2 -18
  75. package/dist/browser/socket-io.d.ts.map +1 -1
  76. package/dist/contract/client-types.d.ts +134 -0
  77. package/dist/contract/client-types.d.ts.map +1 -0
  78. package/dist/contract/define-validation.d.ts +30 -0
  79. package/dist/contract/define-validation.d.ts.map +1 -0
  80. package/dist/contract/define.d.ts +3 -357
  81. package/dist/contract/define.d.ts.map +1 -1
  82. package/dist/contract/runtime-context.d.ts +131 -0
  83. package/dist/contract/runtime-context.d.ts.map +1 -0
  84. package/dist/contract/tool-options.d.ts +105 -0
  85. package/dist/contract/tool-options.d.ts.map +1 -0
  86. package/dist/contract/tool-view.d.ts +15 -2
  87. package/dist/contract/tool-view.d.ts.map +1 -1
  88. package/dist/durability/contract.d.ts +83 -0
  89. package/dist/durability/contract.d.ts.map +1 -1
  90. package/dist/durability/effect.d.ts +24 -0
  91. package/dist/durability/effect.d.ts.map +1 -0
  92. package/dist/durability/engine.d.ts +2 -2
  93. package/dist/durability/engine.d.ts.map +1 -1
  94. package/dist/durability/events.d.ts +2 -0
  95. package/dist/durability/events.d.ts.map +1 -1
  96. package/dist/durability/ledger.d.ts +11 -0
  97. package/dist/durability/ledger.d.ts.map +1 -1
  98. package/dist/durability/parks.d.ts +22 -0
  99. package/dist/durability/parks.d.ts.map +1 -0
  100. package/dist/durability/scheduler.d.ts +1 -0
  101. package/dist/durability/scheduler.d.ts.map +1 -1
  102. package/dist/entrypoints/agent-runtime/coding-tools.js +4 -4
  103. package/dist/entrypoints/agent-runtime/harness.js +127 -116
  104. package/dist/entrypoints/agent-runtime/sandbox.js +4 -4
  105. package/dist/entrypoints/agent-runtime/sqlite/bun.js +3 -3
  106. package/dist/entrypoints/agent-runtime/sqlite/node.js +3 -3
  107. package/dist/entrypoints/agent-runtime/testing.js +246 -214
  108. package/dist/entrypoints/agent-runtime.js +224 -203
  109. package/dist/entrypoints/application/diagnostic-journal.js +63 -203
  110. package/dist/entrypoints/application/opentelemetry.js +1 -1
  111. package/dist/entrypoints/application.js +361 -324
  112. package/dist/entrypoints/cli.d.ts +4 -1
  113. package/dist/entrypoints/cli.d.ts.map +1 -1
  114. package/dist/entrypoints/cli.js +57 -35
  115. package/dist/entrypoints/contract.d.ts +5 -2
  116. package/dist/entrypoints/contract.d.ts.map +1 -1
  117. package/dist/entrypoints/contract.js +3 -2
  118. package/dist/entrypoints/files.d.ts +2 -0
  119. package/dist/entrypoints/files.d.ts.map +1 -1
  120. package/dist/entrypoints/files.js +98 -2
  121. package/dist/entrypoints/index.d.ts +4 -2
  122. package/dist/entrypoints/index.d.ts.map +1 -1
  123. package/dist/entrypoints/index.js +348 -282
  124. package/dist/entrypoints/live.js +89 -71
  125. package/dist/entrypoints/node.d.ts +2 -1
  126. package/dist/entrypoints/node.d.ts.map +1 -1
  127. package/dist/entrypoints/node.js +13 -12
  128. package/dist/entrypoints/react.js +1 -1
  129. package/dist/entrypoints/remote.js +4 -4
  130. package/dist/entrypoints/server.d.ts +4 -2
  131. package/dist/entrypoints/server.d.ts.map +1 -1
  132. package/dist/entrypoints/server.js +293 -79
  133. package/dist/entrypoints/testing.d.ts +2 -1
  134. package/dist/entrypoints/testing.d.ts.map +1 -1
  135. package/dist/entrypoints/testing.js +288 -281
  136. package/dist/entrypoints/tools/connections.js +2 -2
  137. package/dist/entrypoints/tools/invoker.js +4 -4
  138. package/dist/entrypoints/tools.d.ts +6 -3
  139. package/dist/entrypoints/tools.d.ts.map +1 -1
  140. package/dist/entrypoints/tools.js +245 -202
  141. package/dist/entrypoints/tracking.js +325 -274
  142. package/dist/files/boundary.d.ts.map +1 -1
  143. package/dist/files/file-io.d.ts +14 -0
  144. package/dist/files/file-io.d.ts.map +1 -0
  145. package/dist/index-1j8pm5t0.js +412 -0
  146. package/dist/{index-kvj7f4hq.js → index-2bxbyab0.js} +10 -2
  147. package/dist/{index-xnj9bgxe.js → index-2gxzjvyr.js} +2 -162
  148. package/dist/index-4gcnakhx.js +82 -0
  149. package/dist/{index-j05z5gn4.js → index-55hkhm67.js} +136 -119
  150. package/dist/{index-cq4qfycf.js → index-79z7m7dt.js} +227 -59
  151. package/dist/{index-97ac4gph.js → index-7f68ghdn.js} +3 -3
  152. package/dist/{index-r7nmqpsg.js → index-7p1f0vp2.js} +1 -1
  153. package/dist/{index-dcpdvjsc.js → index-863ea9jb.js} +4 -4
  154. package/dist/index-8p52kd5p.js +242 -0
  155. package/dist/{index-2qzskm8h.js → index-dce5wxcq.js} +1 -1
  156. package/dist/index-e01r054k.js +105 -0
  157. package/dist/{index-sees8yf8.js → index-ensd0r74.js} +118 -111
  158. package/dist/{index-1nd48tm9.js → index-gxrt5h6v.js} +2 -1
  159. package/dist/{index-e87kakm4.js → index-ham5sz8m.js} +112 -110
  160. package/dist/{index-kj2wbeta.js → index-het2he5g.js} +280 -196
  161. package/dist/{index-vcvkq30w.js → index-hmp4800j.js} +3 -3
  162. package/dist/{index-gyr48nzg.js → index-k30h66yd.js} +71 -151
  163. package/dist/{index-2cr1cqhn.js → index-khtgb21r.js} +2 -2
  164. package/dist/{index-x4799c19.js → index-ndddxtyx.js} +11 -11
  165. package/dist/{index-dydjcp8z.js → index-np4m8hd3.js} +38 -36
  166. package/dist/{index-p81267c2.js → index-p3vsv1fb.js} +621 -357
  167. package/dist/{index-mp5sn43f.js → index-p9e0w8hs.js} +2 -2
  168. package/dist/{index-rewkc2hj.js → index-p9sh0xx4.js} +3 -3
  169. package/dist/{index-70yj2ebz.js → index-paz6sgdp.js} +107 -103
  170. package/dist/{index-bn2cjajt.js → index-px2gm2jp.js} +26 -102
  171. package/dist/index-s812ycat.js +65 -0
  172. package/dist/{index-xsqjkha9.js → index-sp1tzwnb.js} +2 -2
  173. package/dist/{index-n6hxg8as.js → index-t9rhjr9f.js} +615 -566
  174. package/dist/{index-zeemqhqx.js → index-v260df89.js} +88 -80
  175. package/dist/{index-fdp6hdxn.js → index-w906953s.js} +5 -1
  176. package/dist/{index-mdzh02yc.js → index-wdkt63w3.js} +1 -1
  177. package/dist/{index-58k4fp34.js → index-wsm5w4ee.js} +1 -1
  178. package/dist/{index-v38qyerb.js → index-xw3s75nj.js} +1 -1
  179. package/dist/internal/atomic-file.d.ts +23 -2
  180. package/dist/internal/atomic-file.d.ts.map +1 -1
  181. package/dist/internal/exclusive-lock.d.ts +51 -0
  182. package/dist/internal/exclusive-lock.d.ts.map +1 -0
  183. package/dist/internal/process-identity.d.ts +47 -0
  184. package/dist/internal/process-identity.d.ts.map +1 -0
  185. package/dist/internal/with-exclusive-lock.d.ts +67 -0
  186. package/dist/internal/with-exclusive-lock.d.ts.map +1 -0
  187. package/dist/live/watch-client.d.ts.map +1 -1
  188. package/dist/observability/audit.d.ts +2 -2
  189. package/dist/observability/audit.d.ts.map +1 -1
  190. package/dist/observability/event.d.ts +2 -1
  191. package/dist/observability/event.d.ts.map +1 -1
  192. package/dist/primitives/export-operation.d.ts +1 -1
  193. package/dist/primitives/export-operation.d.ts.map +1 -1
  194. package/dist/realtime/registry.d.ts +0 -5
  195. package/dist/realtime/registry.d.ts.map +1 -1
  196. package/dist/server/bun.d.ts +0 -1
  197. package/dist/server/bun.d.ts.map +1 -1
  198. package/dist/server/context-contribution.d.ts +1 -1
  199. package/dist/server/context-contribution.d.ts.map +1 -1
  200. package/dist/server/context.d.ts +1 -1
  201. package/dist/server/context.d.ts.map +1 -1
  202. package/dist/server/endpoint-response.d.ts +2 -1
  203. package/dist/server/endpoint-response.d.ts.map +1 -1
  204. package/dist/server/error-dispatch.d.ts +1 -1
  205. package/dist/server/error-dispatch.d.ts.map +1 -1
  206. package/dist/server/error-hook.d.ts +1 -1
  207. package/dist/server/error-hook.d.ts.map +1 -1
  208. package/dist/server/handler-state.d.ts +1 -1
  209. package/dist/server/handler-state.d.ts.map +1 -1
  210. package/dist/server/implement-registry.d.ts +54 -0
  211. package/dist/server/implement-registry.d.ts.map +1 -0
  212. package/dist/server/implement.d.ts +9 -55
  213. package/dist/server/implement.d.ts.map +1 -1
  214. package/dist/server/middleware/auth.d.ts +1 -31
  215. package/dist/server/middleware/auth.d.ts.map +1 -1
  216. package/dist/server/middleware/jwt.d.ts +31 -0
  217. package/dist/server/middleware/jwt.d.ts.map +1 -0
  218. package/dist/server/multipart-reader.d.ts +22 -0
  219. package/dist/server/multipart-reader.d.ts.map +1 -0
  220. package/dist/server/multipart.d.ts +1 -1
  221. package/dist/server/multipart.d.ts.map +1 -1
  222. package/dist/server/oauth/cimd.d.ts +88 -0
  223. package/dist/server/oauth/cimd.d.ts.map +1 -0
  224. package/dist/server/oauth/endpoints.d.ts +39 -0
  225. package/dist/server/oauth/endpoints.d.ts.map +1 -0
  226. package/dist/server/oauth/provider.d.ts +1 -68
  227. package/dist/server/oauth/provider.d.ts.map +1 -1
  228. package/dist/server/streaming-pump.d.ts +66 -0
  229. package/dist/server/streaming-pump.d.ts.map +1 -0
  230. package/dist/server/streaming-route.d.ts +12 -5
  231. package/dist/server/streaming-route.d.ts.map +1 -1
  232. package/dist/server/types.d.ts +4 -1
  233. package/dist/server/types.d.ts.map +1 -1
  234. package/dist/server/unix-client-bun.d.ts.map +1 -1
  235. package/dist/server/unix-client-http1.d.ts +76 -0
  236. package/dist/server/unix-client-http1.d.ts.map +1 -0
  237. package/dist/server/unix-client.d.ts.map +1 -1
  238. package/dist/testing/handler-clients.d.ts +2 -1
  239. package/dist/testing/handler-clients.d.ts.map +1 -1
  240. package/dist/testing/realtime-probe.d.ts +33 -0
  241. package/dist/testing/realtime-probe.d.ts.map +1 -0
  242. package/dist/testing/surface-conformance.d.ts +0 -31
  243. package/dist/testing/surface-conformance.d.ts.map +1 -1
  244. package/dist/testing/surface-manifest-digest.d.ts +44 -0
  245. package/dist/testing/surface-manifest-digest.d.ts.map +1 -0
  246. package/dist/testing/surface-manifest.d.ts.map +1 -1
  247. package/dist/tools/agent.d.ts +1 -1
  248. package/dist/tools/agent.d.ts.map +1 -1
  249. package/dist/tools/cli/args-fields.d.ts +31 -0
  250. package/dist/tools/cli/args-fields.d.ts.map +1 -0
  251. package/dist/tools/cli/args-route.d.ts +42 -0
  252. package/dist/tools/cli/args-route.d.ts.map +1 -0
  253. package/dist/tools/cli/args-view.d.ts +32 -0
  254. package/dist/tools/cli/args-view.d.ts.map +1 -0
  255. package/dist/tools/cli/args.d.ts +2 -65
  256. package/dist/tools/cli/args.d.ts.map +1 -1
  257. package/dist/tools/cli/argument-error.d.ts +5 -0
  258. package/dist/tools/cli/argument-error.d.ts.map +1 -0
  259. package/dist/tools/cli/checkpoint.d.ts.map +1 -1
  260. package/dist/tools/cli/command.d.ts +1 -1
  261. package/dist/tools/cli/command.d.ts.map +1 -1
  262. package/dist/tools/cli/config.d.ts +1 -1
  263. package/dist/tools/cli/config.d.ts.map +1 -1
  264. package/dist/tools/cli/format.d.ts +2 -1
  265. package/dist/tools/cli/format.d.ts.map +1 -1
  266. package/dist/tools/cli/invoke.d.ts +2 -1
  267. package/dist/tools/cli/invoke.d.ts.map +1 -1
  268. package/dist/tools/cli/managed-surface.d.ts +1 -1
  269. package/dist/tools/cli/managed-surface.d.ts.map +1 -1
  270. package/dist/tools/cli/policy.d.ts +1 -1
  271. package/dist/tools/cli/policy.d.ts.map +1 -1
  272. package/dist/tools/cli/prepare.d.ts.map +1 -1
  273. package/dist/tools/cli/run-managed.d.ts.map +1 -1
  274. package/dist/tools/cli/session.d.ts +1 -1
  275. package/dist/tools/cli/session.d.ts.map +1 -1
  276. package/dist/tools/cli/update.d.ts +19 -0
  277. package/dist/tools/cli/update.d.ts.map +1 -1
  278. package/dist/tools/cli/view.d.ts +1 -1
  279. package/dist/tools/cli/view.d.ts.map +1 -1
  280. package/dist/tools/cli/wait.d.ts +1 -1
  281. package/dist/tools/cli/wait.d.ts.map +1 -1
  282. package/dist/tools/connections/runtime.d.ts +1 -1
  283. package/dist/tools/connections/runtime.d.ts.map +1 -1
  284. package/dist/tools/execute-args.d.ts +23 -0
  285. package/dist/tools/execute-args.d.ts.map +1 -0
  286. package/dist/tools/execute-hooks.d.ts +146 -0
  287. package/dist/tools/execute-hooks.d.ts.map +1 -0
  288. package/dist/tools/execute-result.d.ts +40 -0
  289. package/dist/tools/execute-result.d.ts.map +1 -0
  290. package/dist/tools/execute.d.ts +4 -193
  291. package/dist/tools/execute.d.ts.map +1 -1
  292. package/dist/tools/internal/surface-projector.d.ts +2 -1
  293. package/dist/tools/internal/surface-projector.d.ts.map +1 -1
  294. package/dist/tools/invoker.d.ts +2 -1
  295. package/dist/tools/invoker.d.ts.map +1 -1
  296. package/dist/tools/lifecycle.d.ts +1 -1
  297. package/dist/tools/lifecycle.d.ts.map +1 -1
  298. package/dist/tools/mcp/mount.d.ts +1 -1
  299. package/dist/tools/mcp/mount.d.ts.map +1 -1
  300. package/dist/tools/mcp/prepare.d.ts +2 -1
  301. package/dist/tools/mcp/prepare.d.ts.map +1 -1
  302. package/dist/tools/mcp/progress.d.ts +1 -1
  303. package/dist/tools/mcp/progress.d.ts.map +1 -1
  304. package/dist/tools/mcp/register.d.ts +3 -2
  305. package/dist/tools/mcp/register.d.ts.map +1 -1
  306. package/dist/tools/mcp/round-context.d.ts +38 -0
  307. package/dist/tools/mcp/round-context.d.ts.map +1 -0
  308. package/dist/tools/mcp/round-policy.d.ts +1 -1
  309. package/dist/tools/mcp/round-policy.d.ts.map +1 -1
  310. package/dist/tools/mcp/round.d.ts +3 -11
  311. package/dist/tools/mcp/round.d.ts.map +1 -1
  312. package/dist/tools/mcp/runtime-tools.d.ts +2 -1
  313. package/dist/tools/mcp/runtime-tools.d.ts.map +1 -1
  314. package/dist/tools/mount.d.ts +3 -1
  315. package/dist/tools/mount.d.ts.map +1 -1
  316. package/dist/tools/native-definition.d.ts +2 -1
  317. package/dist/tools/native-definition.d.ts.map +1 -1
  318. package/dist/tools/operations/async-operation-runtime-tools.d.ts +2 -1
  319. package/dist/tools/operations/async-operation-runtime-tools.d.ts.map +1 -1
  320. package/dist/tools/operations/async-operation-runtime-types.d.ts +2 -1
  321. package/dist/tools/operations/async-operation-runtime-types.d.ts.map +1 -1
  322. package/dist/tools/remote.d.ts.map +1 -1
  323. package/dist/tools/runtime-tool.d.ts +3 -1
  324. package/dist/tools/runtime-tool.d.ts.map +1 -1
  325. package/dist/tools/tool-logger.d.ts +1 -1
  326. package/dist/tools/tool-logger.d.ts.map +1 -1
  327. package/dist/tracking/client-listeners.d.ts +30 -0
  328. package/dist/tracking/client-listeners.d.ts.map +1 -0
  329. package/dist/tracking/client-visit.d.ts +61 -0
  330. package/dist/tracking/client-visit.d.ts.map +1 -0
  331. package/dist/tracking/client.d.ts +3 -2
  332. package/dist/tracking/client.d.ts.map +1 -1
  333. package/llms/application.2.txt +266 -2
  334. package/llms/application.txt +8 -266
  335. package/llms/cli.2.txt +80 -0
  336. package/llms/cli.txt +45 -74
  337. package/llms/contract.txt +3 -3
  338. package/llms/files.txt +3 -0
  339. package/llms/tools.2.txt +88 -279
  340. package/llms/tools.3.txt +288 -0
  341. package/llms/tools.txt +27 -65
  342. package/llms-full.txt +108 -12
  343. package/llms.txt +5 -5
  344. package/package.json +1 -1
  345. package/dist/index-e2z3ahw9.js +0 -325
  346. package/dist/index-mkm15s49.js +0 -394
@@ -24,7 +24,7 @@ import {
24
24
  renderAgentStateSlots,
25
25
  repairedSearchCall,
26
26
  selectAgentHistory
27
- } from "../index-97ac4gph.js";
27
+ } from "../index-7f68ghdn.js";
28
28
  import"../index-83bdg97s.js";
29
29
  import {
30
30
  AgentAdmissionEventSchema,
@@ -78,7 +78,7 @@ import {
78
78
  } from "../index-qmy6zq75.js";
79
79
  import {
80
80
  createMemoryAgentRuntimeStore
81
- } from "../index-xsqjkha9.js";
81
+ } from "../index-sp1tzwnb.js";
82
82
  import {
83
83
  ACTIVE_AGENT_RUN_STATES,
84
84
  AgentAdmissionReceiptSchema,
@@ -91,7 +91,7 @@ import {
91
91
  AgentStoredRunSchema,
92
92
  createAgentRuntimeStore,
93
93
  purgeAgentConversation
94
- } from "../index-58k4fp34.js";
94
+ } from "../index-wsm5w4ee.js";
95
95
  import {
96
96
  AcceptInputAndAssignRunSchema,
97
97
  AcquireAgentRunSchema,
@@ -123,7 +123,7 @@ import {
123
123
  encodeAgentConversationArchive,
124
124
  isAssistantHistoryEvidence,
125
125
  isCompleteAgentHistoryTurn
126
- } from "../index-1nd48tm9.js";
126
+ } from "../index-gxrt5h6v.js";
127
127
  import {
128
128
  AgentAssistantPlaceholderSchema,
129
129
  AgentControlPartSchema,
@@ -164,7 +164,7 @@ import {
164
164
  import {
165
165
  buildToolManifest,
166
166
  mountAgent
167
- } from "../index-dcpdvjsc.js";
167
+ } from "../index-863ea9jb.js";
168
168
  import {
169
169
  DURABILITY_STEP_EVENT_KIND,
170
170
  ParkAbortedError,
@@ -172,10 +172,10 @@ import {
172
172
  StepAbortedError,
173
173
  StepResultDecodeError,
174
174
  StepResultNotSerializableError
175
- } from "../index-cq4qfycf.js";
176
- import"../index-vcvkq30w.js";
177
- import"../index-2cr1cqhn.js";
178
- import"../index-j05z5gn4.js";
175
+ } from "../index-79z7m7dt.js";
176
+ import"../index-hmp4800j.js";
177
+ import"../index-khtgb21r.js";
178
+ import"../index-55hkhm67.js";
179
179
  import"../index-zfrhfn82.js";
180
180
  import"../index-35mh5bhj.js";
181
181
  import {
@@ -186,8 +186,8 @@ import"../index-1zbbzgfh.js";
186
186
  import {
187
187
  defineRuntimeTool,
188
188
  executableAgentRuntimeTools
189
- } from "../index-v38qyerb.js";
190
- import"../index-dydjcp8z.js";
189
+ } from "../index-xw3s75nj.js";
190
+ import"../index-np4m8hd3.js";
191
191
  import"../index-eqqvgdb3.js";
192
192
  import"../index-znfs20ss.js";
193
193
  import"../index-p5r7qpdd.js";
@@ -1973,44 +1973,192 @@ function createAgentScheduleTools(service) {
1973
1973
  ];
1974
1974
  }
1975
1975
  // src/agent-runtime/schedules.ts
1976
+ import { randomUUID as randomUUID3 } from "node:crypto";
1977
+ import { z as z10 } from "zod";
1978
+
1979
+ // src/agent-runtime/schedule-records.ts
1976
1980
  import { randomUUID as randomUUID2 } from "node:crypto";
1977
1981
  import { z as z9 } from "zod";
1978
- var AgentScheduleSchema = z9.object({
1979
- id: z9.string().min(1),
1980
- conversationId: z9.string().min(1),
1981
- kind: z9.enum(["at", "after", "every"]),
1982
- nextAt: z9.iso.datetime({ offset: true }),
1983
- intervalMs: z9.int().positive().optional(),
1984
- timeZone: z9.string().min(1).optional(),
1985
- input: z9.json(),
1986
- state: z9.enum(["scheduled", "cancelled", "completed"]),
1987
- occurrence: z9.int().nonnegative(),
1988
- createdAt: z9.iso.datetime({ offset: true }),
1989
- updatedAt: z9.iso.datetime({ offset: true })
1982
+ function newSchedule(request, observedAt) {
1983
+ const modes = [
1984
+ request.at !== undefined,
1985
+ request.afterMs !== undefined,
1986
+ request.everyMs !== undefined
1987
+ ];
1988
+ if (modes.filter(Boolean).length !== 1)
1989
+ throw new TypeError("Declare exactly one schedule mode");
1990
+ if (request.everyMs !== undefined && !request.timeZone) {
1991
+ throw new TypeError("Repeating schedules require an explicit timeZone");
1992
+ }
1993
+ if (request.timeZone) {
1994
+ try {
1995
+ new Intl.DateTimeFormat("en", { timeZone: request.timeZone }).format(new Date(0));
1996
+ } catch {
1997
+ throw new TypeError(`Unknown schedule timeZone: ${request.timeZone}`);
1998
+ }
1999
+ }
2000
+ const kind = request.at !== undefined ? "at" : request.afterMs !== undefined ? "after" : "every";
2001
+ const intervalMs = request.everyMs;
2002
+ const delay = request.afterMs ?? request.everyMs;
2003
+ if (delay !== undefined && (!Number.isSafeInteger(delay) || delay < 1)) {
2004
+ throw new TypeError("Schedule delay must be a positive safe integer");
2005
+ }
2006
+ const nextAt = request.at ? new Date(z9.iso.datetime({ offset: true }).parse(request.at)).toISOString() : new Date(observedAt.getTime() + (delay ?? 0)).toISOString();
2007
+ const schedule = AgentScheduleSchema.parse({
2008
+ id: randomUUID2(),
2009
+ conversationId: request.conversationId,
2010
+ kind,
2011
+ nextAt,
2012
+ ...intervalMs !== undefined && { intervalMs },
2013
+ ...request.timeZone && { timeZone: request.timeZone },
2014
+ input: z9.json().parse(request.input),
2015
+ state: "scheduled",
2016
+ occurrence: 0,
2017
+ createdAt: observedAt.toISOString(),
2018
+ updatedAt: observedAt.toISOString()
2019
+ });
2020
+ return schedule;
2021
+ }
2022
+ async function insertSchedule(sqlite, schedule) {
2023
+ await sqlite.transaction(async (scope) => {
2024
+ scope.database.prepare(`
2025
+ INSERT INTO stitchkit_agent_runtime_schedules (
2026
+ id, conversation_id, kind, next_at, interval_ms, time_zone,
2027
+ input_payload, state, occurrence, created_at, updated_at
2028
+ ) VALUES (?, ?, ?, ?, ?, ?, ?, 'scheduled', 0, ?, ?)
2029
+ `).run(schedule.id, schedule.conversationId, schedule.kind, schedule.nextAt, schedule.intervalMs ?? null, schedule.timeZone ?? null, JSON.stringify(schedule.input), schedule.createdAt, schedule.updatedAt);
2030
+ await scope.appendEvent({
2031
+ conversationId: schedule.conversationId,
2032
+ kind: "schedule/set",
2033
+ occurredAt: schedule.createdAt,
2034
+ payload: { id: schedule.id, kind: schedule.kind, nextAt: schedule.nextAt }
2035
+ });
2036
+ });
2037
+ }
2038
+ async function recordDispatchFailure(sqlite, { schedule, occurrence, at, owner }, error) {
2039
+ await sqlite.transaction(async (scope) => {
2040
+ scope.database.prepare(`
2041
+ UPDATE stitchkit_agent_runtime_schedules
2042
+ SET claim_owner = NULL, claim_until = NULL, updated_at = ?
2043
+ WHERE id = ? AND claim_owner = ?
2044
+ `).run(at, schedule.id, owner);
2045
+ await scope.appendEvent({
2046
+ conversationId: schedule.conversationId,
2047
+ kind: "schedule/failed",
2048
+ occurredAt: at,
2049
+ payload: {
2050
+ id: schedule.id,
2051
+ occurrence,
2052
+ message: error instanceof Error ? error.message : String(error)
2053
+ }
2054
+ });
2055
+ });
2056
+ }
2057
+ async function settleFiring(sqlite, { schedule, occurrence, at, owner }, observedAt, lateByMs) {
2058
+ let nextAt = schedule.nextAt;
2059
+ if (schedule.kind === "every" && schedule.intervalMs) {
2060
+ let next = new Date(schedule.nextAt).getTime() + schedule.intervalMs;
2061
+ while (next <= observedAt.getTime())
2062
+ next += schedule.intervalMs;
2063
+ nextAt = new Date(next).toISOString();
2064
+ }
2065
+ const state = schedule.kind === "every" ? "scheduled" : "completed";
2066
+ await sqlite.transaction(async (scope) => {
2067
+ const held = scope.database.prepare(`
2068
+ SELECT state, claim_owner FROM stitchkit_agent_runtime_schedules WHERE id = ?
2069
+ `).get(schedule.id);
2070
+ const settled = held !== null && held !== undefined && (() => {
2071
+ const row = FinalizeRowSchema.parse(held);
2072
+ return row.state === "scheduled" && row.claim_owner === owner;
2073
+ })();
2074
+ if (settled) {
2075
+ scope.database.prepare(`
2076
+ UPDATE stitchkit_agent_runtime_schedules
2077
+ SET state = ?, occurrence = ?, next_at = ?, updated_at = ?,
2078
+ claim_owner = NULL, claim_until = NULL
2079
+ WHERE id = ?
2080
+ `).run(state, occurrence, nextAt, at, schedule.id);
2081
+ }
2082
+ if (lateByMs > 0) {
2083
+ await scope.appendEvent({
2084
+ conversationId: schedule.conversationId,
2085
+ kind: "schedule/late",
2086
+ occurredAt: at,
2087
+ payload: { id: schedule.id, occurrence, lateByMs }
2088
+ });
2089
+ }
2090
+ await scope.appendEvent({
2091
+ conversationId: schedule.conversationId,
2092
+ kind: "schedule/fired",
2093
+ occurredAt: at,
2094
+ payload: {
2095
+ id: schedule.id,
2096
+ occurrence,
2097
+ lateByMs,
2098
+ nextAt,
2099
+ state: settled ? state : "cancelled"
2100
+ }
2101
+ });
2102
+ });
2103
+ }
2104
+ function claimSchedule(sqlite, owner, id, until, at) {
2105
+ return sqlite.transaction(async (scope) => {
2106
+ const raw = scope.database.prepare(`
2107
+ SELECT state, claim_until FROM stitchkit_agent_runtime_schedules WHERE id = ?
2108
+ `).get(id);
2109
+ if (raw === null || raw === undefined)
2110
+ return false;
2111
+ const row = ClaimRowSchema.parse(raw);
2112
+ if (row.state !== "scheduled")
2113
+ return false;
2114
+ if (row.claim_until !== null && row.claim_until >= at)
2115
+ return false;
2116
+ scope.database.prepare(`
2117
+ UPDATE stitchkit_agent_runtime_schedules
2118
+ SET claim_owner = ?, claim_until = ?, updated_at = ?
2119
+ WHERE id = ?
2120
+ `).run(owner, until, at, id);
2121
+ return true;
2122
+ });
2123
+ }
2124
+
2125
+ // src/agent-runtime/schedules.ts
2126
+ var AgentScheduleSchema = z10.object({
2127
+ id: z10.string().min(1),
2128
+ conversationId: z10.string().min(1),
2129
+ kind: z10.enum(["at", "after", "every"]),
2130
+ nextAt: z10.iso.datetime({ offset: true }),
2131
+ intervalMs: z10.int().positive().optional(),
2132
+ timeZone: z10.string().min(1).optional(),
2133
+ input: z10.json(),
2134
+ state: z10.enum(["scheduled", "cancelled", "completed"]),
2135
+ occurrence: z10.int().nonnegative(),
2136
+ createdAt: z10.iso.datetime({ offset: true }),
2137
+ updatedAt: z10.iso.datetime({ offset: true })
1990
2138
  }).strict();
1991
- var ScheduleRowSchema = z9.object({
1992
- id: z9.string(),
1993
- conversation_id: z9.string(),
1994
- kind: z9.enum(["at", "after", "every"]),
1995
- next_at: z9.string(),
1996
- interval_ms: z9.number().int().positive().nullable(),
1997
- time_zone: z9.string().nullable(),
1998
- input_payload: z9.string(),
1999
- state: z9.enum(["scheduled", "cancelled", "completed"]),
2000
- occurrence: z9.int().nonnegative(),
2001
- created_at: z9.string(),
2002
- updated_at: z9.string()
2139
+ var ScheduleRowSchema = z10.object({
2140
+ id: z10.string(),
2141
+ conversation_id: z10.string(),
2142
+ kind: z10.enum(["at", "after", "every"]),
2143
+ next_at: z10.string(),
2144
+ interval_ms: z10.number().int().positive().nullable(),
2145
+ time_zone: z10.string().nullable(),
2146
+ input_payload: z10.string(),
2147
+ state: z10.enum(["scheduled", "cancelled", "completed"]),
2148
+ occurrence: z10.int().nonnegative(),
2149
+ created_at: z10.string(),
2150
+ updated_at: z10.string()
2003
2151
  });
2004
- var ClaimRowSchema = z9.object({
2005
- state: z9.enum(["scheduled", "cancelled", "completed"]),
2006
- claim_until: z9.string().nullable()
2152
+ var ClaimRowSchema = z10.object({
2153
+ state: z10.enum(["scheduled", "cancelled", "completed"]),
2154
+ claim_until: z10.string().nullable()
2007
2155
  });
2008
- var FinalizeRowSchema = z9.object({
2009
- state: z9.enum(["scheduled", "cancelled", "completed"]),
2010
- claim_owner: z9.string().nullable()
2156
+ var FinalizeRowSchema = z10.object({
2157
+ state: z10.enum(["scheduled", "cancelled", "completed"]),
2158
+ claim_owner: z10.string().nullable()
2011
2159
  });
2012
- var StateRowSchema = z9.object({
2013
- state: z9.enum(["scheduled", "cancelled", "completed"])
2160
+ var StateRowSchema = z10.object({
2161
+ state: z10.enum(["scheduled", "cancelled", "completed"])
2014
2162
  });
2015
2163
  function parseSchedule(raw) {
2016
2164
  const row = ScheduleRowSchema.parse(raw);
@@ -2066,27 +2214,10 @@ function createAgentScheduleService(input) {
2066
2214
  const delay = Math.max(0, new Date(raw.due_at).getTime() - now().getTime());
2067
2215
  timer = setTimer(() => void tick(), Math.min(delay, 2147483647));
2068
2216
  };
2069
- const owner = randomUUID2();
2217
+ const owner = randomUUID3();
2070
2218
  const CLAIM_MS = 60000;
2071
2219
  let ticking;
2072
- const claim = (id, until, at) => input.sqlite.transaction(async (scope) => {
2073
- const raw = scope.database.prepare(`
2074
- SELECT state, claim_until FROM stitchkit_agent_runtime_schedules WHERE id = ?
2075
- `).get(id);
2076
- if (raw === null || raw === undefined)
2077
- return false;
2078
- const row = ClaimRowSchema.parse(raw);
2079
- if (row.state !== "scheduled")
2080
- return false;
2081
- if (row.claim_until !== null && row.claim_until >= at)
2082
- return false;
2083
- scope.database.prepare(`
2084
- UPDATE stitchkit_agent_runtime_schedules
2085
- SET claim_owner = ?, claim_until = ?, updated_at = ?
2086
- WHERE id = ?
2087
- `).run(owner, until, at, id);
2088
- return true;
2089
- });
2220
+ const claim = (id, until, at) => claimSchedule(input.sqlite, owner, id, until, at);
2090
2221
  const runTick = async () => {
2091
2222
  if (closed)
2092
2223
  return;
@@ -2112,70 +2243,10 @@ function createAgentScheduleService(input) {
2112
2243
  schedule: { id: schedule.id, occurrence, lateByMs }
2113
2244
  });
2114
2245
  } catch (error) {
2115
- await input.sqlite.transaction(async (scope) => {
2116
- scope.database.prepare(`
2117
- UPDATE stitchkit_agent_runtime_schedules
2118
- SET claim_owner = NULL, claim_until = NULL, updated_at = ?
2119
- WHERE id = ? AND claim_owner = ?
2120
- `).run(at, schedule.id, owner);
2121
- await scope.appendEvent({
2122
- conversationId: schedule.conversationId,
2123
- kind: "schedule/failed",
2124
- occurredAt: at,
2125
- payload: {
2126
- id: schedule.id,
2127
- occurrence,
2128
- message: error instanceof Error ? error.message : String(error)
2129
- }
2130
- });
2131
- });
2246
+ await recordDispatchFailure(input.sqlite, { schedule, occurrence, at, owner }, error);
2132
2247
  continue;
2133
2248
  }
2134
- let nextAt = schedule.nextAt;
2135
- if (schedule.kind === "every" && schedule.intervalMs) {
2136
- let next = new Date(schedule.nextAt).getTime() + schedule.intervalMs;
2137
- while (next <= observedAt.getTime())
2138
- next += schedule.intervalMs;
2139
- nextAt = new Date(next).toISOString();
2140
- }
2141
- const state = schedule.kind === "every" ? "scheduled" : "completed";
2142
- await input.sqlite.transaction(async (scope) => {
2143
- const held = scope.database.prepare(`
2144
- SELECT state, claim_owner FROM stitchkit_agent_runtime_schedules WHERE id = ?
2145
- `).get(schedule.id);
2146
- const settled = held !== null && held !== undefined && (() => {
2147
- const row = FinalizeRowSchema.parse(held);
2148
- return row.state === "scheduled" && row.claim_owner === owner;
2149
- })();
2150
- if (settled) {
2151
- scope.database.prepare(`
2152
- UPDATE stitchkit_agent_runtime_schedules
2153
- SET state = ?, occurrence = ?, next_at = ?, updated_at = ?,
2154
- claim_owner = NULL, claim_until = NULL
2155
- WHERE id = ?
2156
- `).run(state, occurrence, nextAt, at, schedule.id);
2157
- }
2158
- if (lateByMs > 0) {
2159
- await scope.appendEvent({
2160
- conversationId: schedule.conversationId,
2161
- kind: "schedule/late",
2162
- occurredAt: at,
2163
- payload: { id: schedule.id, occurrence, lateByMs }
2164
- });
2165
- }
2166
- await scope.appendEvent({
2167
- conversationId: schedule.conversationId,
2168
- kind: "schedule/fired",
2169
- occurredAt: at,
2170
- payload: {
2171
- id: schedule.id,
2172
- occurrence,
2173
- lateByMs,
2174
- nextAt,
2175
- state: settled ? state : "cancelled"
2176
- }
2177
- });
2178
- });
2249
+ await settleFiring(input.sqlite, { schedule, occurrence, at, owner }, observedAt, lateByMs);
2179
2250
  }
2180
2251
  };
2181
2252
  const tick = () => {
@@ -2188,58 +2259,8 @@ function createAgentScheduleService(input) {
2188
2259
  return ticking;
2189
2260
  };
2190
2261
  const scheduleInput = async (request) => {
2191
- const modes = [
2192
- request.at !== undefined,
2193
- request.afterMs !== undefined,
2194
- request.everyMs !== undefined
2195
- ];
2196
- if (modes.filter(Boolean).length !== 1)
2197
- throw new TypeError("Declare exactly one schedule mode");
2198
- if (request.everyMs !== undefined && !request.timeZone) {
2199
- throw new TypeError("Repeating schedules require an explicit timeZone");
2200
- }
2201
- if (request.timeZone) {
2202
- try {
2203
- new Intl.DateTimeFormat("en", { timeZone: request.timeZone }).format(new Date(0));
2204
- } catch {
2205
- throw new TypeError(`Unknown schedule timeZone: ${request.timeZone}`);
2206
- }
2207
- }
2208
- const observedAt = now();
2209
- const kind = request.at !== undefined ? "at" : request.afterMs !== undefined ? "after" : "every";
2210
- const intervalMs = request.everyMs;
2211
- const delay = request.afterMs ?? request.everyMs;
2212
- if (delay !== undefined && (!Number.isSafeInteger(delay) || delay < 1)) {
2213
- throw new TypeError("Schedule delay must be a positive safe integer");
2214
- }
2215
- const nextAt = request.at ? new Date(z9.iso.datetime({ offset: true }).parse(request.at)).toISOString() : new Date(observedAt.getTime() + (delay ?? 0)).toISOString();
2216
- const schedule = AgentScheduleSchema.parse({
2217
- id: randomUUID2(),
2218
- conversationId: request.conversationId,
2219
- kind,
2220
- nextAt,
2221
- ...intervalMs !== undefined && { intervalMs },
2222
- ...request.timeZone && { timeZone: request.timeZone },
2223
- input: z9.json().parse(request.input),
2224
- state: "scheduled",
2225
- occurrence: 0,
2226
- createdAt: observedAt.toISOString(),
2227
- updatedAt: observedAt.toISOString()
2228
- });
2229
- await input.sqlite.transaction(async (scope) => {
2230
- scope.database.prepare(`
2231
- INSERT INTO stitchkit_agent_runtime_schedules (
2232
- id, conversation_id, kind, next_at, interval_ms, time_zone,
2233
- input_payload, state, occurrence, created_at, updated_at
2234
- ) VALUES (?, ?, ?, ?, ?, ?, ?, 'scheduled', 0, ?, ?)
2235
- `).run(schedule.id, schedule.conversationId, schedule.kind, schedule.nextAt, schedule.intervalMs ?? null, schedule.timeZone ?? null, JSON.stringify(schedule.input), schedule.createdAt, schedule.updatedAt);
2236
- await scope.appendEvent({
2237
- conversationId: schedule.conversationId,
2238
- kind: "schedule/set",
2239
- occurredAt: schedule.createdAt,
2240
- payload: { id: schedule.id, kind: schedule.kind, nextAt: schedule.nextAt }
2241
- });
2242
- });
2262
+ const schedule = newSchedule(request, now());
2263
+ await insertSchedule(input.sqlite, schedule);
2243
2264
  arm();
2244
2265
  return schedule;
2245
2266
  };
@@ -2284,17 +2305,17 @@ function createAgentScheduleService(input) {
2284
2305
  };
2285
2306
  }
2286
2307
  // src/agent-runtime/spill.ts
2287
- import { createHash, randomUUID as randomUUID3 } from "node:crypto";
2288
- import { z as z10 } from "zod";
2289
- var SpillRowSchema = z10.object({
2290
- payload: z10.instanceof(Uint8Array),
2291
- bytes: z10.int().nonnegative(),
2292
- authorization_payload: z10.string().nullable()
2308
+ import { createHash, randomUUID as randomUUID4 } from "node:crypto";
2309
+ import { z as z11 } from "zod";
2310
+ var SpillRowSchema = z11.object({
2311
+ payload: z11.instanceof(Uint8Array),
2312
+ bytes: z11.int().nonnegative(),
2313
+ authorization_payload: z11.string().nullable()
2293
2314
  });
2294
- var SpillMetadataRowSchema = z10.object({
2295
- reference_id: z10.string(),
2296
- bytes: z10.int().nonnegative(),
2297
- created_at: z10.string()
2315
+ var SpillMetadataRowSchema = z11.object({
2316
+ reference_id: z11.string(),
2317
+ bytes: z11.int().nonnegative(),
2318
+ created_at: z11.string()
2298
2319
  });
2299
2320
  function decodeAuthorization(value) {
2300
2321
  if (value === null)
@@ -2316,7 +2337,7 @@ function createSqliteAgentSpillStore(input) {
2316
2337
  };
2317
2338
  const authorization = (reference) => decodeAuthorization(rowFor(reference).authorization_payload);
2318
2339
  const write = async (request) => {
2319
- const reference = randomUUID3();
2340
+ const reference = randomUUID4();
2320
2341
  const createdAt = now();
2321
2342
  const expiresAt = input.retentionMs ? new Date(createdAt.getTime() + input.retentionMs).toISOString() : null;
2322
2343
  const sha256 = createHash("sha256").update(request.data).digest("hex");
@@ -2381,14 +2402,14 @@ function createSqliteAgentSpillStore(input) {
2381
2402
  return { authorization, write, read, search, cleanup };
2382
2403
  }
2383
2404
  // src/agent-runtime/state-tools.ts
2384
- import { z as z11 } from "zod";
2385
- var GoalSchema = z11.object({
2386
- objective: z11.string().min(1),
2387
- status: z11.enum(["active", "complete", "blocked"])
2405
+ import { z as z12 } from "zod";
2406
+ var GoalSchema = z12.object({
2407
+ objective: z12.string().min(1),
2408
+ status: z12.enum(["active", "complete", "blocked"])
2388
2409
  }).strict();
2389
- var TodoItemSchema = z11.object({
2390
- step: z11.string().min(1),
2391
- status: z11.enum(["pending", "in_progress", "completed"])
2410
+ var TodoItemSchema = z12.object({
2411
+ step: z12.string().min(1),
2412
+ status: z12.enum(["pending", "in_progress", "completed"])
2392
2413
  }).strict();
2393
2414
  function createAgentStateTools(input) {
2394
2415
  const writeGoal = async (value) => {
@@ -2405,7 +2426,7 @@ function createAgentStateTools(input) {
2405
2426
  name: "create_goal",
2406
2427
  description: "Create the durable objective for this conversation.",
2407
2428
  identity: { serviceName: "agent-state", action: "create-goal", method: "POST" },
2408
- input: z11.object({ objective: z11.string().min(1) }).strict(),
2429
+ input: z12.object({ objective: z12.string().min(1) }).strict(),
2409
2430
  output: GoalSchema,
2410
2431
  transports: ["AGENT"],
2411
2432
  handler: async ({ input: request }) => {
@@ -2419,9 +2440,9 @@ function createAgentStateTools(input) {
2419
2440
  name: "update_goal",
2420
2441
  description: "Update the durable objective or lifecycle status.",
2421
2442
  identity: { serviceName: "agent-state", action: "update-goal", method: "POST" },
2422
- input: z11.object({
2423
- objective: z11.string().min(1).optional(),
2424
- status: z11.enum(["active", "complete", "blocked"]).optional()
2443
+ input: z12.object({
2444
+ objective: z12.string().min(1).optional(),
2445
+ status: z12.enum(["active", "complete", "blocked"]).optional()
2425
2446
  }).strict().refine((request) => request.objective !== undefined || request.status !== undefined, {
2426
2447
  message: "At least one goal field must be supplied"
2427
2448
  }),
@@ -2439,8 +2460,8 @@ function createAgentStateTools(input) {
2439
2460
  name: "get_goal",
2440
2461
  description: "Read the durable objective for this conversation.",
2441
2462
  identity: { serviceName: "agent-state", action: "get-goal", method: "GET" },
2442
- input: z11.object({}).strict(),
2443
- output: z11.object({ goal: GoalSchema.optional() }).strict(),
2463
+ input: z12.object({}).strict(),
2464
+ output: z12.object({ goal: GoalSchema.optional() }).strict(),
2444
2465
  transports: ["AGENT"],
2445
2466
  handler: async () => {
2446
2467
  const current = await input.state.get(input.conversationId, "goal");
@@ -2451,8 +2472,8 @@ function createAgentStateTools(input) {
2451
2472
  name: "todo_write",
2452
2473
  description: "Replace the durable ordered work plan for this conversation.",
2453
2474
  identity: { serviceName: "agent-state", action: "write-todo", method: "POST" },
2454
- input: z11.object({ items: z11.array(TodoItemSchema) }).strict(),
2455
- output: z11.object({ items: z11.array(TodoItemSchema) }).strict(),
2475
+ input: z12.object({ items: z12.array(TodoItemSchema) }).strict(),
2476
+ output: z12.object({ items: z12.array(TodoItemSchema) }).strict(),
2456
2477
  transports: ["AGENT"],
2457
2478
  handler: async ({ input: request }) => {
2458
2479
  const stored = await input.state.set({
@@ -2461,7 +2482,7 @@ function createAgentStateTools(input) {
2461
2482
  value: request,
2462
2483
  actor: "agent"
2463
2484
  });
2464
- return z11.object({ items: z11.array(TodoItemSchema) }).strict().parse(stored.value);
2485
+ return z12.object({ items: z12.array(TodoItemSchema) }).strict().parse(stored.value);
2465
2486
  }
2466
2487
  })
2467
2488
  ];