@sixb/core 0.1.5 → 0.1.7

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 (564) hide show
  1. package/dist/actions/index.js +37 -33
  2. package/dist/actions/index.js.map +1 -1
  3. package/dist/actions/types/definitions.d.ts +8 -2
  4. package/dist/actions/types/definitions.d.ts.map +1 -1
  5. package/dist/actions/worker.js +3 -3
  6. package/dist/agents/adapters.d.ts +33 -76
  7. package/dist/agents/adapters.d.ts.map +1 -1
  8. package/dist/agents/authority.d.ts +22 -6
  9. package/dist/agents/authority.d.ts.map +1 -1
  10. package/dist/agents/builders.d.ts +3 -11
  11. package/dist/agents/builders.d.ts.map +1 -1
  12. package/dist/agents/context.js +2 -2
  13. package/dist/agents/dispatch.d.ts +9 -1
  14. package/dist/agents/dispatch.d.ts.map +1 -1
  15. package/dist/agents/errors.d.ts +2 -2
  16. package/dist/agents/errors.d.ts.map +1 -1
  17. package/dist/agents/execution.d.ts +9 -10
  18. package/dist/agents/execution.d.ts.map +1 -1
  19. package/dist/agents/ids.d.ts +4 -0
  20. package/dist/agents/ids.d.ts.map +1 -1
  21. package/dist/agents/index.d.ts +13 -9
  22. package/dist/agents/index.d.ts.map +1 -1
  23. package/dist/agents/index.js +80 -68
  24. package/dist/agents/index.js.map +1 -1
  25. package/dist/agents/message.d.ts +17 -10
  26. package/dist/agents/message.d.ts.map +1 -1
  27. package/dist/agents/model-loop.d.ts +56 -0
  28. package/dist/agents/model-loop.d.ts.map +1 -0
  29. package/dist/agents/reference.d.ts +4 -0
  30. package/dist/agents/reference.d.ts.map +1 -0
  31. package/dist/agents/request.d.ts +10 -8
  32. package/dist/agents/request.d.ts.map +1 -1
  33. package/dist/agents/retired-config.d.ts +4 -0
  34. package/dist/agents/retired-config.d.ts.map +1 -0
  35. package/dist/agents/streams.d.ts +13 -8
  36. package/dist/agents/streams.d.ts.map +1 -1
  37. package/dist/agents/streams.js +7 -5
  38. package/dist/agents/streams.js.map +1 -1
  39. package/dist/agents/tool-catalog.d.ts +9 -0
  40. package/dist/agents/tool-catalog.d.ts.map +1 -0
  41. package/dist/agents/tool-definition.d.ts +1 -0
  42. package/dist/agents/tool-definition.d.ts.map +1 -1
  43. package/dist/agents/types.d.ts +31 -68
  44. package/dist/agents/types.d.ts.map +1 -1
  45. package/dist/agents/validation.d.ts +4 -10
  46. package/dist/agents/validation.d.ts.map +1 -1
  47. package/dist/ai-usage/execution.d.ts +53 -0
  48. package/dist/ai-usage/execution.d.ts.map +1 -0
  49. package/dist/ai-usage/index.d.ts +3 -0
  50. package/dist/ai-usage/index.d.ts.map +1 -0
  51. package/dist/auth/index.d.ts +1 -1
  52. package/dist/auth/index.d.ts.map +1 -1
  53. package/dist/auth/index.js +7 -7
  54. package/dist/auth/runtime.d.ts.map +1 -1
  55. package/dist/auth/strategy.d.ts +1 -1
  56. package/dist/auth/strategy.d.ts.map +1 -1
  57. package/dist/auth/types.d.ts +13 -0
  58. package/dist/auth/types.d.ts.map +1 -1
  59. package/dist/authorization/decision.d.ts +5 -2
  60. package/dist/authorization/decision.d.ts.map +1 -1
  61. package/dist/authorization/grant-kinds.d.ts +24 -8
  62. package/dist/authorization/grant-kinds.d.ts.map +1 -1
  63. package/dist/authorization/index.d.ts +1 -1
  64. package/dist/authorization/index.d.ts.map +1 -1
  65. package/dist/authorization/index.js +8 -6
  66. package/dist/authorization/index.js.map +1 -1
  67. package/dist/authorization/resolve.d.ts +3 -3
  68. package/dist/authorization/resolve.d.ts.map +1 -1
  69. package/dist/authorization/types.d.ts +7 -5
  70. package/dist/authorization/types.d.ts.map +1 -1
  71. package/dist/blob-storage/browser.js +2 -2
  72. package/dist/blob-storage/index.js +3 -3
  73. package/dist/bootstrap/discovery.d.ts +1 -7
  74. package/dist/bootstrap/discovery.d.ts.map +1 -1
  75. package/dist/bootstrap/index.js +52 -48
  76. package/dist/bootstrap/index.js.map +1 -1
  77. package/dist/broker/index.js +2 -2
  78. package/dist/{chunk-zqysyfjt.js → chunk-08m3b6w8.js} +1 -1
  79. package/dist/{chunk-xdf9yswn.js → chunk-08twe8m6.js} +93 -8
  80. package/dist/chunk-08twe8m6.js.map +12 -0
  81. package/dist/{chunk-xkthy56g.js → chunk-1kamz6j0.js} +1 -1
  82. package/dist/{chunk-h6h91mfy.js → chunk-2b5qtban.js} +12 -12
  83. package/dist/{chunk-h6h91mfy.js.map → chunk-2b5qtban.js.map} +3 -3
  84. package/dist/{chunk-0172wgm9.js → chunk-2xns679x.js} +10 -2
  85. package/dist/{chunk-0172wgm9.js.map → chunk-2xns679x.js.map} +3 -3
  86. package/dist/{chunk-f83ka50g.js → chunk-37wk412q.js} +86 -28
  87. package/dist/{chunk-f83ka50g.js.map → chunk-37wk412q.js.map} +8 -8
  88. package/dist/{chunk-6d5xdj1q.js → chunk-3fqt22c4.js} +4 -4
  89. package/dist/{chunk-t9xghkva.js → chunk-3kv70xwp.js} +3 -2
  90. package/dist/{chunk-t9xghkva.js.map → chunk-3kv70xwp.js.map} +3 -3
  91. package/dist/{chunk-z3zp0bj1.js → chunk-407j3msh.js} +1 -1
  92. package/dist/{chunk-rhrbz7d4.js → chunk-4a849fr1.js} +1 -1
  93. package/dist/{chunk-62c7t4jc.js → chunk-4nxeacx7.js} +1 -1
  94. package/dist/{chunk-cy0n5dms.js → chunk-5jcdmjam.js} +1 -1
  95. package/dist/{chunk-819wnjz8.js → chunk-64sr682n.js} +7 -7
  96. package/dist/{chunk-v0egge8b.js → chunk-6ed5bwnd.js} +666 -81
  97. package/dist/chunk-6ed5bwnd.js.map +57 -0
  98. package/dist/{chunk-x2yw73hy.js → chunk-7ds9620f.js} +1 -1
  99. package/dist/{chunk-dm72y8wt.js → chunk-7y0f6rf1.js} +29 -16
  100. package/dist/chunk-7y0f6rf1.js.map +10 -0
  101. package/dist/{chunk-72q2y8hn.js → chunk-8tsf6dmc.js} +2 -2
  102. package/dist/{chunk-72q2y8hn.js.map → chunk-8tsf6dmc.js.map} +3 -3
  103. package/dist/{chunk-tbv03sx2.js → chunk-9aehf39w.js} +7 -7
  104. package/dist/{chunk-ezake7g1.js → chunk-agsvg9ar.js} +1 -1
  105. package/dist/{chunk-rdeagz6b.js → chunk-atmkaf60.js} +1 -1
  106. package/dist/{chunk-rdeagz6b.js.map → chunk-atmkaf60.js.map} +2 -2
  107. package/dist/chunk-c15dr03f.js +43 -0
  108. package/dist/chunk-c15dr03f.js.map +10 -0
  109. package/dist/{chunk-78c6xvyr.js → chunk-d2ndstdf.js} +8 -6
  110. package/dist/{chunk-78c6xvyr.js.map → chunk-d2ndstdf.js.map} +2 -2
  111. package/dist/{chunk-rnshztfq.js → chunk-d63tybny.js} +2 -2
  112. package/dist/{chunk-t0jjkep3.js → chunk-d8qkxt2v.js} +4 -2
  113. package/dist/chunk-d8qkxt2v.js.map +10 -0
  114. package/dist/{chunk-vybf6pkp.js → chunk-dbc80ad7.js} +1 -1
  115. package/dist/{chunk-4gz41why.js → chunk-dqn23610.js} +1 -1
  116. package/dist/{chunk-z3ga9q5m.js → chunk-e4rvtvpw.js} +13 -11
  117. package/dist/{chunk-z3ga9q5m.js.map → chunk-e4rvtvpw.js.map} +2 -2
  118. package/dist/{chunk-h9kxd41f.js → chunk-gbrpsx4m.js} +19 -6
  119. package/dist/chunk-gbrpsx4m.js.map +11 -0
  120. package/dist/{chunk-84h6qhmp.js → chunk-h0knpbz5.js} +468 -1236
  121. package/dist/chunk-h0knpbz5.js.map +38 -0
  122. package/dist/{chunk-zp2v2rv6.js → chunk-ha58tjtt.js} +6 -6
  123. package/dist/{chunk-f6erf2vv.js → chunk-hdz94br2.js} +2 -2
  124. package/dist/chunk-jecn6t54.js +307 -0
  125. package/dist/chunk-jecn6t54.js.map +12 -0
  126. package/dist/{chunk-dsrkgtnh.js → chunk-jq43kdvk.js} +1 -1
  127. package/dist/{chunk-wtmzkcht.js → chunk-k34z5rvh.js} +1 -1
  128. package/dist/{chunk-htq0qh7z.js → chunk-ka3a2ft3.js} +2 -2
  129. package/dist/{chunk-4h947jd8.js → chunk-kt81c11h.js} +2 -2
  130. package/dist/chunk-n2arzn6e.js +1745 -0
  131. package/dist/chunk-n2arzn6e.js.map +20 -0
  132. package/dist/{chunk-f2rt4vkh.js → chunk-n2w475r0.js} +3 -3
  133. package/dist/{chunk-t8t39h7v.js → chunk-n6jxh8sw.js} +10 -2
  134. package/dist/chunk-n6jxh8sw.js.map +10 -0
  135. package/dist/{chunk-drjqm1aa.js → chunk-p03r0h5s.js} +310 -28
  136. package/dist/chunk-p03r0h5s.js.map +16 -0
  137. package/dist/chunk-p2vqaxkc.js +528 -0
  138. package/dist/chunk-p2vqaxkc.js.map +15 -0
  139. package/dist/{chunk-gadsm794.js → chunk-qjycjdj6.js} +84 -11
  140. package/dist/chunk-qjycjdj6.js.map +12 -0
  141. package/dist/chunk-qjzp9xyb.js +286 -0
  142. package/dist/chunk-qjzp9xyb.js.map +12 -0
  143. package/dist/{chunk-am6eczah.js → chunk-qv38twt8.js} +50 -69
  144. package/dist/{chunk-am6eczah.js.map → chunk-qv38twt8.js.map} +8 -8
  145. package/dist/{chunk-bhxaq2nn.js → chunk-qw9gvjv5.js} +1 -1
  146. package/dist/{chunk-r0rry8dn.js → chunk-rp1mvzb4.js} +6 -6
  147. package/dist/{chunk-tkdscva6.js → chunk-rre42skh.js} +187 -18
  148. package/dist/chunk-rre42skh.js.map +39 -0
  149. package/dist/{chunk-ghteq96b.js → chunk-s5y30bc9.js} +2 -2
  150. package/dist/{chunk-a31h57d5.js → chunk-tn7xcs2n.js} +2 -2
  151. package/dist/{chunk-6gjqgd3d.js → chunk-tpnd31c1.js} +2 -1
  152. package/dist/chunk-tpnd31c1.js.map +11 -0
  153. package/dist/chunk-trxxmgnf.js +68 -0
  154. package/dist/chunk-trxxmgnf.js.map +11 -0
  155. package/dist/{chunk-ea73pzk7.js → chunk-vjjv9mrb.js} +2 -2
  156. package/dist/{chunk-8b55ygje.js → chunk-w3e09qqk.js} +1 -1
  157. package/dist/{chunk-ckxfnx7f.js → chunk-wjgm6jjt.js} +2 -2
  158. package/dist/{chunk-3j7573mj.js → chunk-x0qhkqje.js} +2 -2
  159. package/dist/{chunk-dysw7nsm.js → chunk-xdpwpkha.js} +2 -2
  160. package/dist/{chunk-1q02e95s.js → chunk-y35ma3mj.js} +11 -16
  161. package/dist/{chunk-1q02e95s.js.map → chunk-y35ma3mj.js.map} +3 -4
  162. package/dist/{chunk-qewtks41.js → chunk-z2sery1b.js} +64 -1
  163. package/dist/{chunk-qewtks41.js.map → chunk-z2sery1b.js.map} +3 -3
  164. package/dist/error-reporting/internal.js +4 -4
  165. package/dist/error-reporting/types.d.ts +7 -2
  166. package/dist/error-reporting/types.d.ts.map +1 -1
  167. package/dist/errors/catalog.d.ts +8 -0
  168. package/dist/errors/catalog.d.ts.map +1 -1
  169. package/dist/errors/internal.js +2 -2
  170. package/dist/events/index.js +4 -4
  171. package/dist/execution/agent.d.ts +18 -9
  172. package/dist/execution/agent.d.ts.map +1 -1
  173. package/dist/execution/agent.js +52 -43
  174. package/dist/execution/agent.js.map +1 -1
  175. package/dist/execution/authorization.d.ts +14 -4
  176. package/dist/execution/authorization.d.ts.map +1 -1
  177. package/dist/execution/primitive.js +45 -43
  178. package/dist/execution/primitive.js.map +2 -2
  179. package/dist/execution/request.d.ts +3 -1
  180. package/dist/execution/request.d.ts.map +1 -1
  181. package/dist/execution/request.js +46 -44
  182. package/dist/execution/request.js.map +3 -3
  183. package/dist/execution/types.d.ts +1 -1
  184. package/dist/execution/types.d.ts.map +1 -1
  185. package/dist/http/api-routes.d.ts.map +1 -1
  186. package/dist/http/index.js +1 -1
  187. package/dist/index.d.ts +9 -6
  188. package/dist/index.d.ts.map +1 -1
  189. package/dist/index.js +82 -77
  190. package/dist/index.js.map +1 -1
  191. package/dist/json.d.ts +2 -0
  192. package/dist/json.d.ts.map +1 -1
  193. package/dist/lake-storage/index.js +5 -5
  194. package/dist/logging/index.js +3 -3
  195. package/dist/logging/types.js +2 -2
  196. package/dist/materialization/index.js +2 -2
  197. package/dist/materializer/index.js +33 -29
  198. package/dist/materializer/index.js.map +1 -1
  199. package/dist/models/catalog.d.ts +40 -0
  200. package/dist/models/catalog.d.ts.map +1 -0
  201. package/dist/models/definitions.d.ts +25 -0
  202. package/dist/models/definitions.d.ts.map +1 -0
  203. package/dist/models/errors.d.ts +52 -0
  204. package/dist/models/errors.d.ts.map +1 -0
  205. package/dist/models/events.d.ts +192 -0
  206. package/dist/models/events.d.ts.map +1 -0
  207. package/dist/models/index.d.ts +17 -39
  208. package/dist/models/index.d.ts.map +1 -1
  209. package/dist/models/index.js +50 -0
  210. package/dist/models/index.js.map +9 -0
  211. package/dist/models/language-model.d.ts +90 -0
  212. package/dist/models/language-model.d.ts.map +1 -0
  213. package/dist/models/messages.d.ts +74 -0
  214. package/dist/models/messages.d.ts.map +1 -0
  215. package/dist/models/pricing.d.ts +69 -0
  216. package/dist/models/pricing.d.ts.map +1 -0
  217. package/dist/models/rate-card.d.ts +24 -0
  218. package/dist/models/rate-card.d.ts.map +1 -0
  219. package/dist/models/tools.d.ts +24 -0
  220. package/dist/models/tools.d.ts.map +1 -0
  221. package/dist/objects/index.js +38 -34
  222. package/dist/objects/index.js.map +1 -1
  223. package/dist/objects/query/index.js +32 -28
  224. package/dist/objects/query/index.js.map +1 -1
  225. package/dist/ontology/index.js +5 -5
  226. package/dist/ontology/internal.js +4 -4
  227. package/dist/pipelines/index.js +37 -35
  228. package/dist/pipelines/index.js.map +1 -1
  229. package/dist/projections/internal.js +35 -31
  230. package/dist/projections/internal.js.map +1 -1
  231. package/dist/queues/in-memory.d.ts +3 -2
  232. package/dist/queues/in-memory.d.ts.map +1 -1
  233. package/dist/queues/index.d.ts +3 -1
  234. package/dist/queues/index.d.ts.map +1 -1
  235. package/dist/queues/index.js +1 -1
  236. package/dist/queues/types.d.ts +15 -3
  237. package/dist/queues/types.d.ts.map +1 -1
  238. package/dist/runtime/create.d.ts +4 -4
  239. package/dist/runtime/create.d.ts.map +1 -1
  240. package/dist/runtime/definitions.d.ts +2 -2
  241. package/dist/runtime/definitions.d.ts.map +1 -1
  242. package/dist/runtime/host.d.ts +3 -2
  243. package/dist/runtime/host.d.ts.map +1 -1
  244. package/dist/runtime/resolve-definitions.d.ts +2 -2
  245. package/dist/runtime/resolve-definitions.d.ts.map +1 -1
  246. package/dist/runtime/sixb.d.ts +4 -2
  247. package/dist/runtime/sixb.d.ts.map +1 -1
  248. package/dist/security/every.d.ts +1 -4
  249. package/dist/security/every.d.ts.map +1 -1
  250. package/dist/security/grants.d.ts +6 -5
  251. package/dist/security/grants.d.ts.map +1 -1
  252. package/dist/security/index.d.ts +1 -1
  253. package/dist/security/index.d.ts.map +1 -1
  254. package/dist/security/registry.d.ts +1 -1
  255. package/dist/security/registry.d.ts.map +1 -1
  256. package/dist/security/types.d.ts +13 -5
  257. package/dist/security/types.d.ts.map +1 -1
  258. package/dist/security/validation.d.ts +4 -2
  259. package/dist/security/validation.d.ts.map +1 -1
  260. package/dist/storage/action-runs/failure.js +3 -3
  261. package/dist/storage/action-runs/provider.js +2 -2
  262. package/dist/storage/agents/errors.d.ts +1 -1
  263. package/dist/storage/agents/errors.d.ts.map +1 -1
  264. package/dist/storage/agents/in-memory.d.ts +3 -2
  265. package/dist/storage/agents/in-memory.d.ts.map +1 -1
  266. package/dist/storage/agents/index.d.ts +1 -1
  267. package/dist/storage/agents/index.d.ts.map +1 -1
  268. package/dist/storage/agents/provider.d.ts +11 -4
  269. package/dist/storage/agents/provider.d.ts.map +1 -1
  270. package/dist/storage/agents/provider.js +18 -15
  271. package/dist/storage/agents/provider.js.map +1 -1
  272. package/dist/storage/agents/types.d.ts +65 -17
  273. package/dist/storage/agents/types.d.ts.map +1 -1
  274. package/dist/storage/ai-cost/analytics.d.ts +2 -1
  275. package/dist/storage/ai-cost/analytics.d.ts.map +1 -1
  276. package/dist/storage/ai-cost/codec.d.ts +3 -2
  277. package/dist/storage/ai-cost/codec.d.ts.map +1 -1
  278. package/dist/storage/ai-cost/groups.d.ts +51 -0
  279. package/dist/storage/ai-cost/groups.d.ts.map +1 -0
  280. package/dist/storage/ai-cost/in-memory.d.ts +11 -1
  281. package/dist/storage/ai-cost/in-memory.d.ts.map +1 -1
  282. package/dist/storage/ai-cost/index.d.ts +1 -1
  283. package/dist/storage/ai-cost/index.d.ts.map +1 -1
  284. package/dist/storage/ai-cost/provider.d.ts +2 -0
  285. package/dist/storage/ai-cost/provider.d.ts.map +1 -1
  286. package/dist/storage/ai-cost/provider.js +29 -13
  287. package/dist/storage/ai-cost/provider.js.map +3 -3
  288. package/dist/storage/ai-cost/types.d.ts +64 -15
  289. package/dist/storage/ai-cost/types.d.ts.map +1 -1
  290. package/dist/storage/ai-cost/validation.d.ts +2 -1
  291. package/dist/storage/ai-cost/validation.d.ts.map +1 -1
  292. package/dist/storage/ai-limits/enforcement.d.ts +14 -0
  293. package/dist/storage/ai-limits/enforcement.d.ts.map +1 -0
  294. package/dist/storage/ai-limits/enforcement.js +21 -0
  295. package/dist/storage/ai-limits/enforcement.js.map +9 -0
  296. package/dist/storage/ai-limits/errors.d.ts +8 -0
  297. package/dist/storage/ai-limits/errors.d.ts.map +1 -0
  298. package/dist/storage/ai-limits/in-memory.d.ts +78 -0
  299. package/dist/storage/ai-limits/in-memory.d.ts.map +1 -0
  300. package/dist/storage/ai-limits/index.d.ts +7 -0
  301. package/dist/storage/ai-limits/index.d.ts.map +1 -0
  302. package/dist/storage/ai-limits/period.d.ts +4 -0
  303. package/dist/storage/ai-limits/period.d.ts.map +1 -0
  304. package/dist/storage/ai-limits/provider.d.ts +85 -0
  305. package/dist/storage/ai-limits/provider.d.ts.map +1 -0
  306. package/dist/storage/ai-limits/provider.js +62 -0
  307. package/dist/storage/ai-limits/provider.js.map +9 -0
  308. package/dist/storage/ai-limits/types.d.ts +175 -0
  309. package/dist/storage/ai-limits/types.d.ts.map +1 -0
  310. package/dist/storage/ai-usage/in-memory.d.ts +4 -0
  311. package/dist/storage/ai-usage/in-memory.d.ts.map +1 -1
  312. package/dist/storage/ai-usage/record.d.ts.map +1 -1
  313. package/dist/storage/ai-usage/types.d.ts +6 -2
  314. package/dist/storage/ai-usage/types.d.ts.map +1 -1
  315. package/dist/storage/auth/errors.d.ts +1 -1
  316. package/dist/storage/auth/errors.d.ts.map +1 -1
  317. package/dist/storage/auth/in-memory/auth-storage.d.ts +4 -1
  318. package/dist/storage/auth/in-memory/auth-storage.d.ts.map +1 -1
  319. package/dist/storage/auth/in-memory/device-authorizations.d.ts +29 -0
  320. package/dist/storage/auth/in-memory/device-authorizations.d.ts.map +1 -0
  321. package/dist/storage/auth/in-memory/shared.d.ts +3 -1
  322. package/dist/storage/auth/in-memory/shared.d.ts.map +1 -1
  323. package/dist/storage/auth/index.d.ts +2 -1
  324. package/dist/storage/auth/index.d.ts.map +1 -1
  325. package/dist/storage/auth/types.d.ts +66 -0
  326. package/dist/storage/auth/types.d.ts.map +1 -1
  327. package/dist/storage/connector-connections/provider.js +2 -2
  328. package/dist/storage/executions/provider.js +1 -1
  329. package/dist/storage/executions/run-link.d.ts +7 -2
  330. package/dist/storage/executions/run-link.d.ts.map +1 -1
  331. package/dist/storage/executions/validation.d.ts.map +1 -1
  332. package/dist/storage/in-memory/index.d.ts +4 -0
  333. package/dist/storage/in-memory/index.d.ts.map +1 -1
  334. package/dist/storage/index.d.ts +8 -5
  335. package/dist/storage/index.d.ts.map +1 -1
  336. package/dist/storage/index.js +51 -38
  337. package/dist/storage/index.js.map +1 -1
  338. package/dist/storage/ontology/in-memory/materializations.d.ts +4 -3
  339. package/dist/storage/ontology/in-memory/materializations.d.ts.map +1 -1
  340. package/dist/storage/ontology/index.d.ts +1 -1
  341. package/dist/storage/ontology/index.d.ts.map +1 -1
  342. package/dist/storage/ontology/materializations.d.ts +7 -3
  343. package/dist/storage/ontology/materializations.d.ts.map +1 -1
  344. package/dist/storage/ontology/provider.d.ts +2 -2
  345. package/dist/storage/ontology/provider.d.ts.map +1 -1
  346. package/dist/storage/ontology/provider.js +3 -3
  347. package/dist/storage/pipeline-runs/provider.js +2 -2
  348. package/dist/storage/projection-runs/provider.js +4 -4
  349. package/dist/storage/sync-runs/provider.js +2 -2
  350. package/dist/storage/types.d.ts +5 -1
  351. package/dist/storage/types.d.ts.map +1 -1
  352. package/dist/storage/webhook-runs/provider.js +2 -2
  353. package/dist/storage/workflow-runs/provider.d.ts +1 -1
  354. package/dist/storage/workflow-runs/provider.js +10 -11
  355. package/dist/storage/workflow-runs/provider.js.map +1 -1
  356. package/dist/storage/workflow-runs/types.d.ts +5 -4
  357. package/dist/storage/workflow-runs/types.d.ts.map +1 -1
  358. package/dist/syncs/index.js +37 -35
  359. package/dist/syncs/index.js.map +1 -1
  360. package/dist/testing/agent-execution.d.ts +3 -1
  361. package/dist/testing/agent-execution.d.ts.map +1 -1
  362. package/dist/testing/agent-storage-contract.d.ts.map +1 -1
  363. package/dist/testing/ai-cost-storage-contract.d.ts.map +1 -1
  364. package/dist/testing/ai-limit-storage-contract.d.ts +18 -0
  365. package/dist/testing/ai-limit-storage-contract.d.ts.map +1 -0
  366. package/dist/testing/ai-model-call-groups-contract.d.ts +6 -0
  367. package/dist/testing/ai-model-call-groups-contract.d.ts.map +1 -0
  368. package/dist/testing/ai-usage-storage-contract.d.ts.map +1 -1
  369. package/dist/testing/auth-storage-contract.d.ts.map +1 -1
  370. package/dist/testing/index.d.ts +2 -0
  371. package/dist/testing/index.d.ts.map +1 -1
  372. package/dist/testing/index.js +3758 -1945
  373. package/dist/testing/index.js.map +15 -13
  374. package/dist/testing/materializer-storage-contract.d.ts.map +1 -1
  375. package/dist/testing/queues-contract.d.ts.map +1 -1
  376. package/dist/webhooks/internal.js +32 -28
  377. package/dist/webhooks/internal.js.map +2 -2
  378. package/dist/workers/index.js +2 -2
  379. package/dist/workflows/agent-step-identity.d.ts +3 -0
  380. package/dist/workflows/agent-step-identity.d.ts.map +1 -0
  381. package/dist/workflows/builders.d.ts +2 -3
  382. package/dist/workflows/builders.d.ts.map +1 -1
  383. package/dist/workflows/execution.d.ts +1 -1
  384. package/dist/workflows/execution.d.ts.map +1 -1
  385. package/dist/workflows/failure.d.ts +1 -1
  386. package/dist/workflows/failure.d.ts.map +1 -1
  387. package/dist/workflows/index.d.ts +3 -2
  388. package/dist/workflows/index.d.ts.map +1 -1
  389. package/dist/workflows/index.js +53 -45
  390. package/dist/workflows/index.js.map +1 -1
  391. package/dist/workflows/types.d.ts +26 -11
  392. package/dist/workflows/types.d.ts.map +1 -1
  393. package/dist/workflows/validation.d.ts +7 -1
  394. package/dist/workflows/validation.d.ts.map +1 -1
  395. package/package.json +19 -4
  396. package/src/actions/types/definitions.ts +24 -2
  397. package/src/agents/adapters.ts +109 -115
  398. package/src/agents/authority.ts +214 -32
  399. package/src/agents/builders.ts +3 -50
  400. package/src/agents/context-compaction.ts +4 -0
  401. package/src/agents/dispatch.ts +59 -2
  402. package/src/agents/errors.ts +5 -2
  403. package/src/agents/execution.ts +53 -52
  404. package/src/agents/ids.ts +16 -1
  405. package/src/agents/index.ts +23 -11
  406. package/src/agents/message.ts +18 -9
  407. package/src/agents/model-loop.ts +1023 -0
  408. package/src/agents/reference.ts +7 -0
  409. package/src/agents/request.ts +141 -74
  410. package/src/agents/retired-config.ts +20 -0
  411. package/src/agents/streams.ts +45 -19
  412. package/src/agents/tool-catalog.ts +21 -0
  413. package/src/agents/tool-definition.ts +23 -0
  414. package/src/agents/types.ts +39 -81
  415. package/src/agents/validation.ts +34 -180
  416. package/src/ai-usage/execution.ts +196 -0
  417. package/src/ai-usage/index.ts +15 -0
  418. package/src/auth/index.ts +1 -0
  419. package/src/auth/runtime.ts +8 -0
  420. package/src/auth/strategy.ts +1 -0
  421. package/src/auth/types.ts +14 -0
  422. package/src/authorization/decision.ts +27 -10
  423. package/src/authorization/grant-kinds.ts +62 -15
  424. package/src/authorization/index.ts +1 -0
  425. package/src/authorization/resolve.ts +12 -5
  426. package/src/authorization/types.ts +7 -5
  427. package/src/bootstrap/discovery.ts +0 -3
  428. package/src/error-reporting/types.ts +4 -2
  429. package/src/errors/catalog.ts +8 -0
  430. package/src/execution/agent.ts +129 -22
  431. package/src/execution/authorization.ts +48 -18
  432. package/src/execution/request.ts +4 -1
  433. package/src/execution/types.ts +1 -1
  434. package/src/http/api-routes.ts +63 -0
  435. package/src/index.ts +36 -7
  436. package/src/json.ts +9 -0
  437. package/src/models/catalog.ts +137 -0
  438. package/src/models/definitions.ts +202 -0
  439. package/src/models/errors.ts +83 -0
  440. package/src/models/events.ts +198 -0
  441. package/src/models/index.ts +89 -71
  442. package/src/models/language-model.ts +143 -0
  443. package/src/models/messages.ts +78 -0
  444. package/src/models/pricing.ts +390 -0
  445. package/src/models/rate-card.ts +101 -0
  446. package/src/models/tools.ts +29 -0
  447. package/src/queues/in-memory.ts +5 -0
  448. package/src/queues/index.ts +11 -0
  449. package/src/queues/types.ts +20 -3
  450. package/src/runtime/create.ts +7 -5
  451. package/src/runtime/definitions.ts +2 -2
  452. package/src/runtime/host.ts +3 -2
  453. package/src/runtime/resolve-definitions.ts +13 -36
  454. package/src/runtime/sixb.ts +6 -8
  455. package/src/security/every.ts +0 -4
  456. package/src/security/grants.ts +55 -11
  457. package/src/security/index.ts +2 -0
  458. package/src/security/registry.ts +6 -5
  459. package/src/security/types.ts +15 -4
  460. package/src/security/validation.ts +30 -9
  461. package/src/storage/agents/errors.ts +1 -0
  462. package/src/storage/agents/in-memory.ts +121 -11
  463. package/src/storage/agents/index.ts +7 -0
  464. package/src/storage/agents/provider.ts +150 -6
  465. package/src/storage/agents/types.ts +73 -16
  466. package/src/storage/ai-cost/analytics.ts +63 -6
  467. package/src/storage/ai-cost/codec.ts +37 -12
  468. package/src/storage/ai-cost/groups.ts +248 -0
  469. package/src/storage/ai-cost/in-memory.ts +42 -0
  470. package/src/storage/ai-cost/index.ts +6 -0
  471. package/src/storage/ai-cost/provider.ts +7 -0
  472. package/src/storage/ai-cost/types.ts +76 -14
  473. package/src/storage/ai-cost/validation.ts +147 -17
  474. package/src/storage/ai-limits/enforcement.ts +68 -0
  475. package/src/storage/ai-limits/errors.ts +23 -0
  476. package/src/storage/ai-limits/in-memory.ts +671 -0
  477. package/src/storage/ai-limits/index.ts +31 -0
  478. package/src/storage/ai-limits/period.ts +11 -0
  479. package/src/storage/ai-limits/provider.ts +430 -0
  480. package/src/storage/ai-limits/types.ts +195 -0
  481. package/src/storage/ai-usage/in-memory.ts +13 -0
  482. package/src/storage/ai-usage/record.ts +17 -0
  483. package/src/storage/ai-usage/types.ts +6 -2
  484. package/src/storage/auth/errors.ts +6 -0
  485. package/src/storage/auth/in-memory/auth-storage.ts +69 -0
  486. package/src/storage/auth/in-memory/device-authorizations.ts +145 -0
  487. package/src/storage/auth/in-memory/shared.ts +7 -0
  488. package/src/storage/auth/index.ts +7 -0
  489. package/src/storage/auth/types.ts +73 -0
  490. package/src/storage/executions/run-link.ts +16 -6
  491. package/src/storage/executions/validation.ts +36 -6
  492. package/src/storage/in-memory/index.ts +48 -4
  493. package/src/storage/index.ts +52 -1
  494. package/src/storage/ontology/in-memory/materializations.ts +34 -22
  495. package/src/storage/ontology/index.ts +1 -0
  496. package/src/storage/ontology/materializations.ts +8 -3
  497. package/src/storage/ontology/provider.ts +2 -2
  498. package/src/storage/types.ts +37 -0
  499. package/src/storage/workflow-runs/in-memory.ts +3 -3
  500. package/src/storage/workflow-runs/provider.ts +2 -2
  501. package/src/storage/workflow-runs/types.ts +6 -3
  502. package/src/testing/agent-execution.ts +40 -28
  503. package/src/testing/agent-storage-contract.ts +249 -28
  504. package/src/testing/ai-cost-storage-contract.ts +96 -8
  505. package/src/testing/ai-limit-storage-contract.ts +1134 -0
  506. package/src/testing/ai-model-call-groups-contract.ts +353 -0
  507. package/src/testing/ai-usage-storage-contract.ts +31 -0
  508. package/src/testing/auth-storage-contract.ts +85 -0
  509. package/src/testing/execution-storage-contract.ts +2 -2
  510. package/src/testing/index.ts +10 -0
  511. package/src/testing/materializer-storage-contract.ts +170 -2
  512. package/src/testing/queues-contract.ts +36 -1
  513. package/src/workflows/agent-step-identity.ts +4 -0
  514. package/src/workflows/builders.ts +95 -9
  515. package/src/workflows/execution.ts +2 -2
  516. package/src/workflows/failure.ts +2 -2
  517. package/src/workflows/index.ts +3 -0
  518. package/src/workflows/types.ts +23 -11
  519. package/src/workflows/validation.ts +100 -7
  520. package/dist/chunk-6gjqgd3d.js.map +0 -11
  521. package/dist/chunk-84h6qhmp.js.map +0 -46
  522. package/dist/chunk-a09jx26t.js +0 -55
  523. package/dist/chunk-a09jx26t.js.map +0 -11
  524. package/dist/chunk-dm72y8wt.js.map +0 -10
  525. package/dist/chunk-drjqm1aa.js.map +0 -15
  526. package/dist/chunk-gadsm794.js.map +0 -11
  527. package/dist/chunk-h9kxd41f.js.map +0 -11
  528. package/dist/chunk-nzw7sm3b.js +0 -137
  529. package/dist/chunk-nzw7sm3b.js.map +0 -10
  530. package/dist/chunk-t0jjkep3.js.map +0 -10
  531. package/dist/chunk-t8t39h7v.js.map +0 -10
  532. package/dist/chunk-tkdscva6.js.map +0 -37
  533. package/dist/chunk-v0egge8b.js.map +0 -56
  534. package/dist/chunk-xdf9yswn.js.map +0 -11
  535. /package/dist/{chunk-zqysyfjt.js.map → chunk-08m3b6w8.js.map} +0 -0
  536. /package/dist/{chunk-xkthy56g.js.map → chunk-1kamz6j0.js.map} +0 -0
  537. /package/dist/{chunk-6d5xdj1q.js.map → chunk-3fqt22c4.js.map} +0 -0
  538. /package/dist/{chunk-z3zp0bj1.js.map → chunk-407j3msh.js.map} +0 -0
  539. /package/dist/{chunk-rhrbz7d4.js.map → chunk-4a849fr1.js.map} +0 -0
  540. /package/dist/{chunk-62c7t4jc.js.map → chunk-4nxeacx7.js.map} +0 -0
  541. /package/dist/{chunk-cy0n5dms.js.map → chunk-5jcdmjam.js.map} +0 -0
  542. /package/dist/{chunk-819wnjz8.js.map → chunk-64sr682n.js.map} +0 -0
  543. /package/dist/{chunk-x2yw73hy.js.map → chunk-7ds9620f.js.map} +0 -0
  544. /package/dist/{chunk-tbv03sx2.js.map → chunk-9aehf39w.js.map} +0 -0
  545. /package/dist/{chunk-ezake7g1.js.map → chunk-agsvg9ar.js.map} +0 -0
  546. /package/dist/{chunk-rnshztfq.js.map → chunk-d63tybny.js.map} +0 -0
  547. /package/dist/{chunk-vybf6pkp.js.map → chunk-dbc80ad7.js.map} +0 -0
  548. /package/dist/{chunk-4gz41why.js.map → chunk-dqn23610.js.map} +0 -0
  549. /package/dist/{chunk-zp2v2rv6.js.map → chunk-ha58tjtt.js.map} +0 -0
  550. /package/dist/{chunk-f6erf2vv.js.map → chunk-hdz94br2.js.map} +0 -0
  551. /package/dist/{chunk-dsrkgtnh.js.map → chunk-jq43kdvk.js.map} +0 -0
  552. /package/dist/{chunk-wtmzkcht.js.map → chunk-k34z5rvh.js.map} +0 -0
  553. /package/dist/{chunk-htq0qh7z.js.map → chunk-ka3a2ft3.js.map} +0 -0
  554. /package/dist/{chunk-4h947jd8.js.map → chunk-kt81c11h.js.map} +0 -0
  555. /package/dist/{chunk-f2rt4vkh.js.map → chunk-n2w475r0.js.map} +0 -0
  556. /package/dist/{chunk-bhxaq2nn.js.map → chunk-qw9gvjv5.js.map} +0 -0
  557. /package/dist/{chunk-r0rry8dn.js.map → chunk-rp1mvzb4.js.map} +0 -0
  558. /package/dist/{chunk-ghteq96b.js.map → chunk-s5y30bc9.js.map} +0 -0
  559. /package/dist/{chunk-a31h57d5.js.map → chunk-tn7xcs2n.js.map} +0 -0
  560. /package/dist/{chunk-ea73pzk7.js.map → chunk-vjjv9mrb.js.map} +0 -0
  561. /package/dist/{chunk-8b55ygje.js.map → chunk-w3e09qqk.js.map} +0 -0
  562. /package/dist/{chunk-ckxfnx7f.js.map → chunk-wjgm6jjt.js.map} +0 -0
  563. /package/dist/{chunk-3j7573mj.js.map → chunk-x0qhkqje.js.map} +0 -0
  564. /package/dist/{chunk-dysw7nsm.js.map → chunk-xdpwpkha.js.map} +0 -0
@@ -5,10 +5,10 @@ import {
5
5
  isLevelEnabled,
6
6
  isLogRecord,
7
7
  normalizeLogError
8
- } from "./chunk-z3zp0bj1.js";
8
+ } from "./chunk-407j3msh.js";
9
9
  import {
10
10
  getInvalidJsonValueReason
11
- } from "./chunk-t8t39h7v.js";
11
+ } from "./chunk-n6jxh8sw.js";
12
12
 
13
13
  // src/logging/console-logger.ts
14
14
  var CONSOLE_METHOD = {
@@ -4,11 +4,11 @@ import {
4
4
  } from "./chunk-04b07a9q.js";
5
5
  import {
6
6
  isFileRef
7
- } from "./chunk-zqysyfjt.js";
7
+ } from "./chunk-08m3b6w8.js";
8
8
  import {
9
9
  isJsonValue,
10
10
  isPlainRecord
11
- } from "./chunk-t8t39h7v.js";
11
+ } from "./chunk-n6jxh8sw.js";
12
12
 
13
13
  // src/datasets/errors.ts
14
14
  class DatasetValidationError extends Error {
@@ -232,10 +232,11 @@ class InMemoryQueues {
232
232
  workflows = new InMemoryQueue(this.store, "workflow.runs");
233
233
  actions = new InMemoryQueue(this.store, "action.runs");
234
234
  agents = new InMemoryQueue(this.store, "agent.runs");
235
+ agentChildren = new InMemoryQueue(this.store, "agent.children");
235
236
  health() {
236
237
  return Promise.resolve();
237
238
  }
238
239
  }
239
240
  export { QueueError, InMemoryQueues };
240
241
 
241
- //# debugId=CCF3BA9256C63ED464756E2164756E21
242
+ //# debugId=93D03D966B1D22E264756E2164756E21
@@ -0,0 +1,11 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../src/queues/errors.ts", "../src/queues/in-memory.ts"],
4
+ "sourcesContent": [
5
+ "/**\n * Error for queue invariants and invalid queue operations.\n */\nexport class QueueError extends Error {\n readonly name = \"QueueError\"\n}\n",
6
+ "import { randomUUID } from \"node:crypto\"\nimport type { SixbErrorCode } from \"../errors/types\"\nimport { QueueError } from \"./errors\"\nimport type {\n ActionQueueJobFailureCode,\n ActionRunRequestedQueueJob,\n AgentQueueJob,\n AgentQueueJobFailureCode,\n ClaimedQueueJob,\n NewQueueJob,\n PipelineQueueJobFailureCode,\n PipelineRunRequestedQueueJob,\n ProjectionQueueJobFailureCode,\n ProjectionRunRequestedQueueJob,\n Queue,\n QueueJob,\n QueueJobFailure,\n Queues,\n SubagentQueueJob,\n SyncQueueJobFailureCode,\n SyncRunRequestedQueueJob,\n WorkflowQueueJob,\n WorkflowQueueJobFailureCode,\n} from \"./types\"\n\ntype QueueRecordState = \"queued\" | \"completed\" | \"failed\"\n\ninterface QueueRecord<TQueueJob extends QueueJob = QueueJob> {\n readonly sequence: number\n readonly queueId: string\n job: TQueueJob\n // A leased job stays \"queued\" until a worker completes or fails it.\n state: QueueRecordState\n failure: QueueJobFailure | null\n leaseId: string | null\n claimedAt: string | null\n leaseExpiresAt: string | null\n}\n\nfunction assertNonEmpty(value: string, fieldName: string): void {\n if (value.trim().length === 0) {\n throw new QueueError(`[Sixb] Queue ${fieldName} must not be empty`)\n }\n}\n\nfunction parseTimestamp(value: string, fieldName: string): number {\n const timestamp = Date.parse(value)\n\n if (Number.isNaN(timestamp)) {\n throw new QueueError(`[Sixb] Queue ${fieldName} must be a valid timestamp`)\n }\n\n return timestamp\n}\n\nfunction assertPositiveNumber(value: number, fieldName: string): void {\n if (!Number.isFinite(value) || value <= 0) {\n throw new QueueError(`[Sixb] Queue ${fieldName} must be greater than 0`)\n }\n}\n\nfunction clearLease(record: QueueRecord): void {\n record.leaseId = null\n record.claimedAt = null\n record.leaseExpiresAt = null\n}\n\n// Best-effort ordering is part of the contract; this keeps the in-memory provider deterministic.\nfunction compareQueueRecords(left: QueueRecord, right: QueueRecord): number {\n const availableDifference =\n parseTimestamp(left.job.availableAt, \"job.availableAt\") -\n parseTimestamp(right.job.availableAt, \"job.availableAt\")\n\n if (availableDifference !== 0) {\n return availableDifference\n }\n\n const createdDifference =\n parseTimestamp(left.job.createdAt, \"job.createdAt\") -\n parseTimestamp(right.job.createdAt, \"job.createdAt\")\n\n if (createdDifference !== 0) {\n return createdDifference\n }\n\n return left.sequence - right.sequence\n}\n\nfunction createQueueJob<TQueueJob extends QueueJob>(\n projectId: string,\n newJob: NewQueueJob<TQueueJob>\n): TQueueJob {\n const createdAt = new Date().toISOString()\n const availableAt = newJob.availableAt ?? createdAt\n parseTimestamp(availableAt, \"availableAt\")\n\n return {\n id: newJob.id ?? randomUUID(),\n projectId,\n createdAt,\n availableAt,\n attempt: 0,\n metadata: newJob.metadata ? structuredClone(newJob.metadata) : undefined,\n type: newJob.type,\n payload: structuredClone(newJob.payload),\n } as TQueueJob\n}\n\nfunction leaseExpiresAtMs(record: QueueRecord): number | null {\n if (!record.leaseId || !record.leaseExpiresAt) {\n return null\n }\n\n return parseTimestamp(record.leaseExpiresAt, \"leaseExpiresAt\")\n}\n\nfunction toClaimedQueueJob<TQueueJob extends QueueJob>(\n record: QueueRecord<TQueueJob>\n): ClaimedQueueJob<TQueueJob> {\n if (!record.leaseId || !record.claimedAt || !record.leaseExpiresAt) {\n throw new QueueError(`[Sixb] Queue job '${record.job.id}' is not currently leased`)\n }\n\n return {\n leaseId: record.leaseId,\n claimedAt: record.claimedAt,\n leaseExpiresAt: record.leaseExpiresAt,\n job: structuredClone(record.job),\n }\n}\n\nclass InMemoryQueueStore {\n private readonly recordsByProject = new Map<string, QueueRecord[]>()\n private nextSequence = 1\n\n add<TQueueJob extends QueueJob>(projectId: string, queueId: string, job: TQueueJob): void {\n const records = this.getOrCreateRecords(projectId)\n records.push({\n sequence: this.nextSequence,\n queueId,\n job,\n state: \"queued\",\n failure: null,\n leaseId: null,\n claimedAt: null,\n leaseExpiresAt: null,\n })\n this.nextSequence += 1\n }\n\n list<TQueueJob extends QueueJob>(projectId: string, queueId: string): QueueRecord<TQueueJob>[] {\n const records = this.recordsByProject.get(projectId) ?? []\n return records.filter((record) => record.queueId === queueId) as QueueRecord<TQueueJob>[]\n }\n\n find<TQueueJob extends QueueJob>(\n projectId: string,\n queueId: string,\n jobId: string\n ): QueueRecord<TQueueJob> | null {\n return (\n this.list<TQueueJob>(projectId, queueId).find((record) => record.job.id === jobId) ?? null\n )\n }\n\n private getOrCreateRecords(projectId: string): QueueRecord[] {\n const existing = this.recordsByProject.get(projectId)\n if (existing) {\n return existing\n }\n\n const records: QueueRecord[] = []\n this.recordsByProject.set(projectId, records)\n return records\n }\n}\n\nclass InMemoryQueue<TQueueJob extends QueueJob, TFailureCode extends SixbErrorCode>\n implements Queue<TQueueJob, TFailureCode>\n{\n constructor(\n private readonly store: InMemoryQueueStore,\n private readonly queueId: string\n ) {\n assertNonEmpty(queueId, \"queueId\")\n }\n\n async enqueue(params: {\n projectId: string\n jobs: readonly NewQueueJob<TQueueJob>[]\n }): Promise<readonly TQueueJob[]> {\n assertNonEmpty(params.projectId, \"projectId\")\n\n if (params.jobs.length === 0) {\n return []\n }\n\n const createdJobs = params.jobs.map((job) => {\n if (job.id !== undefined) assertNonEmpty(job.id, \"job.id\")\n const existing = job.id\n ? this.store.find<TQueueJob>(params.projectId, this.queueId, job.id)\n : null\n if (existing) return existing.job\n\n const created = createQueueJob(params.projectId, job)\n this.store.add(params.projectId, this.queueId, created)\n return created\n })\n\n return createdJobs.map((job) => structuredClone(job))\n }\n\n async claim(params: {\n projectId: string\n workerId: string\n limit?: number\n leaseMs?: number\n }): Promise<readonly ClaimedQueueJob<TQueueJob>[]> {\n assertNonEmpty(params.projectId, \"projectId\")\n assertNonEmpty(params.workerId, \"workerId\")\n\n const limit = params.limit ?? 1\n if (limit <= 0) {\n return []\n }\n\n const leaseMs = params.leaseMs ?? 30_000\n assertPositiveNumber(leaseMs, \"leaseMs\")\n\n const now = Date.now()\n const claimable = this.store\n .list<TQueueJob>(params.projectId, this.queueId)\n .filter((record) => {\n if (record.state !== \"queued\") {\n return false\n }\n\n if (parseTimestamp(record.job.availableAt, \"job.availableAt\") > now) {\n return false\n }\n\n const expiresAt = leaseExpiresAtMs(record)\n return expiresAt === null || expiresAt <= now\n })\n .sort(compareQueueRecords)\n .slice(0, limit)\n\n const claimedAt = new Date(now).toISOString()\n\n return claimable.map((record) => {\n // Attempts count claims so redelivery after lease expiry or retry is visible to workers.\n record.job = {\n ...record.job,\n attempt: record.job.attempt + 1,\n }\n record.leaseId = randomUUID()\n record.claimedAt = claimedAt\n record.leaseExpiresAt = new Date(now + leaseMs).toISOString()\n\n return toClaimedQueueJob(record)\n })\n }\n\n async complete(params: { projectId: string; jobId: string; leaseId: string }): Promise<void> {\n const record = this.requireActiveLease(params)\n record.state = \"completed\"\n clearLease(record)\n }\n\n async retry(params: {\n projectId: string\n jobId: string\n leaseId: string\n availableAt?: string\n }): Promise<void> {\n const record = this.requireActiveLease(params)\n const availableAt = params.availableAt ?? new Date().toISOString()\n parseTimestamp(availableAt, \"availableAt\")\n\n record.job = {\n ...record.job,\n availableAt,\n }\n clearLease(record)\n }\n\n async fail(params: {\n projectId: string\n jobId: string\n leaseId: string\n failure: QueueJobFailure<TFailureCode>\n }): Promise<void> {\n const record = this.requireActiveLease(params)\n record.state = \"failed\"\n record.failure = structuredClone(params.failure)\n clearLease(record)\n }\n\n async renewLease(params: {\n projectId: string\n jobId: string\n leaseId: string\n leaseMs: number\n }): Promise<ClaimedQueueJob<TQueueJob> | null> {\n assertPositiveNumber(params.leaseMs, \"leaseMs\")\n\n const record = this.store.find<TQueueJob>(params.projectId, this.queueId, params.jobId)\n if (!record || record.state !== \"queued\") {\n return null\n }\n\n const now = Date.now()\n const expiresAt = leaseExpiresAtMs(record)\n if (record.leaseId !== params.leaseId || expiresAt === null) {\n return null\n }\n\n if (expiresAt <= now) {\n return null\n }\n\n record.leaseExpiresAt = new Date(now + params.leaseMs).toISOString()\n return toClaimedQueueJob(record)\n }\n\n private requireActiveLease(params: {\n projectId: string\n jobId: string\n leaseId: string\n }): QueueRecord<TQueueJob> {\n assertNonEmpty(params.projectId, \"projectId\")\n assertNonEmpty(params.jobId, \"jobId\")\n assertNonEmpty(params.leaseId, \"leaseId\")\n\n const record = this.store.find<TQueueJob>(params.projectId, this.queueId, params.jobId)\n\n if (!record) {\n throw new QueueError(`[Sixb] Unknown queue job '${params.jobId}'`)\n }\n\n if (record.state !== \"queued\") {\n throw new QueueError(`[Sixb] Queue job '${params.jobId}' is no longer active`)\n }\n\n if (record.leaseId !== params.leaseId || !record.leaseExpiresAt) {\n throw new QueueError(`[Sixb] Lease mismatch for queue job '${params.jobId}'`)\n }\n\n const expiresAt = leaseExpiresAtMs(record)\n if (expiresAt === null || expiresAt <= Date.now()) {\n throw new QueueError(`[Sixb] Lease for queue job '${params.jobId}' has expired`)\n }\n\n return record\n }\n}\n\nexport class InMemoryQueues implements Queues {\n readonly scope = \"process\" as const\n private readonly store = new InMemoryQueueStore()\n\n readonly syncRuns = new InMemoryQueue<SyncRunRequestedQueueJob, SyncQueueJobFailureCode>(\n this.store,\n \"sync.runs\"\n )\n readonly pipelines = new InMemoryQueue<PipelineRunRequestedQueueJob, PipelineQueueJobFailureCode>(\n this.store,\n \"pipeline.runs\"\n )\n readonly projections = new InMemoryQueue<\n ProjectionRunRequestedQueueJob,\n ProjectionQueueJobFailureCode\n >(this.store, \"projection.runs\")\n readonly workflows = new InMemoryQueue<WorkflowQueueJob, WorkflowQueueJobFailureCode>(\n this.store,\n \"workflow.runs\"\n )\n readonly actions = new InMemoryQueue<ActionRunRequestedQueueJob, ActionQueueJobFailureCode>(\n this.store,\n \"action.runs\"\n )\n readonly agents = new InMemoryQueue<AgentQueueJob, AgentQueueJobFailureCode>(\n this.store,\n \"agent.runs\"\n )\n readonly agentChildren = new InMemoryQueue<SubagentQueueJob, AgentQueueJobFailureCode>(\n this.store,\n \"agent.children\"\n )\n\n /** Nothing to reach: the store is a field of this object. */\n health(): Promise<void> {\n return Promise.resolve()\n }\n}\n"
7
+ ],
8
+ "mappings": ";;AAGO,MAAM,mBAAmB,MAAM;AAAA,EAC3B,OAAO;AAClB;;ACLA;AAuCA,SAAS,cAAc,CAAC,OAAe,WAAyB;AAAA,EAC9D,IAAI,MAAM,KAAK,EAAE,WAAW,GAAG;AAAA,IAC7B,MAAM,IAAI,WAAW,gBAAgB,6BAA6B;AAAA,EAC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D,MAAM,IAAI,WAAW,wCAAwC,OAAO,QAAQ;AAAA,IAC9E;AAAA,IAEA,MAAM,YAAY,iBAAiB,MAAM;AAAA,IACzC,IAAI,cAAc,QAAQ,aAAa,KAAK,IAAI,GAAG;AAAA,MACjD,MAAM,IAAI,WAAW,+BAA+B,OAAO,oBAAoB;AAAA,IACjF;AAAA,IAEA,OAAO;AAAA;AAEX;AAAA;AAEO,MAAM,eAAiC;AAAA,EACnC,QAAQ;AAAA,EACA,QAAQ,IAAI;AAAA,EAEpB,WAAW,IAAI,cACtB,KAAK,OACL,WACF;AAAA,EACS,YAAY,IAAI,cACvB,KAAK,OACL,eACF;AAAA,EACS,cAAc,IAAI,cAGzB,KAAK,OAAO,iBAAiB;AAAA,EACtB,YAAY,IAAI,cACvB,KAAK,OACL,eACF;AAAA,EACS,UAAU,IAAI,cACrB,KAAK,OACL,aACF;AAAA,EACS,SAAS,IAAI,cACpB,KAAK,OACL,YACF;AAAA,EACS,gBAAgB,IAAI,cAC3B,KAAK,OACL,gBACF;AAAA,EAGA,MAAM,GAAkB;AAAA,IACtB,OAAO,QAAQ,QAAQ;AAAA;AAE3B;",
9
+ "debugId": "93D03D966B1D22E264756E2164756E21",
10
+ "names": []
11
+ }
@@ -0,0 +1,68 @@
1
+ // @bun
2
+ // src/models/language-model.ts
3
+ var MODEL_REASONING_EFFORTS = ["minimal", "low", "medium", "high", "xhigh", "max"];
4
+ var MODEL_REASONING_LEVELS = [
5
+ "provider-default",
6
+ "none",
7
+ ...MODEL_REASONING_EFFORTS
8
+ ];
9
+ function isModelReasoning(value) {
10
+ if (typeof value === "string") {
11
+ return MODEL_REASONING_LEVELS.includes(value);
12
+ }
13
+ if (typeof value !== "object" || value === null || Array.isArray(value))
14
+ return false;
15
+ if (Object.keys(value).length !== 1)
16
+ return false;
17
+ const budgetTokens = value.budgetTokens;
18
+ return typeof budgetTokens === "number" && Number.isSafeInteger(budgetTokens) && budgetTokens >= 0;
19
+ }
20
+ function modelReasoningSupportIssue(capabilities, reasoning) {
21
+ if (reasoning === undefined)
22
+ return;
23
+ if (!isModelReasoning(reasoning))
24
+ return "the reasoning preference is invalid";
25
+ if (reasoning === "provider-default")
26
+ return;
27
+ if (capabilities === undefined)
28
+ return;
29
+ if (capabilities === false)
30
+ return "reasoning is not supported";
31
+ if (reasoning === "none") {
32
+ return capabilities.canDisable === true ? undefined : "reasoning cannot be disabled";
33
+ }
34
+ if (typeof reasoning === "string") {
35
+ return capabilities.efforts?.includes(reasoning) === true ? undefined : `reasoning effort '${reasoning}' is not supported`;
36
+ }
37
+ const budget = capabilities.budgetTokens;
38
+ if (budget === undefined)
39
+ return "reasoning token budgets are not supported";
40
+ if (budget.min !== undefined && reasoning.budgetTokens < budget.min) {
41
+ return `reasoning token budget must be at least ${budget.min}`;
42
+ }
43
+ if (budget.max !== undefined && reasoning.budgetTokens > budget.max) {
44
+ return `reasoning token budget must not exceed ${budget.max}`;
45
+ }
46
+ return;
47
+ }
48
+
49
+ // src/models/events.ts
50
+ function normalizeModelProviderIds(value) {
51
+ if (typeof value !== "object" || value === null || Array.isArray(value))
52
+ throw new TypeError("[Sixb] Provider identifiers must be an object.");
53
+ const result = {};
54
+ for (const [key, id] of Object.entries(value)) {
55
+ if (key !== "requestId" && key !== "responseId" && key !== "generationId")
56
+ continue;
57
+ if (id === undefined)
58
+ continue;
59
+ if (typeof id !== "string" || !id.trim())
60
+ throw new TypeError(`[Sixb] Provider ${key} must be nonblank.`);
61
+ result[key] = id;
62
+ }
63
+ return Object.freeze(result);
64
+ }
65
+
66
+ export { MODEL_REASONING_EFFORTS, MODEL_REASONING_LEVELS, isModelReasoning, modelReasoningSupportIssue, normalizeModelProviderIds };
67
+
68
+ //# debugId=9264A40AF02EFA2764756E2164756E21
@@ -0,0 +1,11 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../src/models/language-model.ts", "../src/models/events.ts"],
4
+ "sourcesContent": [
5
+ "import type { JsonObject, ReadonlyJsonObject } from \"../json\"\nimport type { LanguageModelDefinitionCatalog, ModelDefinitionCatalog } from \"./catalog\"\nimport type { LanguageModelDefinition } from \"./definitions\"\nimport type { LanguageModelStreamEvent } from \"./events\"\nimport type { ModelMessage } from \"./messages\"\nimport type { ModelCostEstimator } from \"./pricing\"\n\nexport const MODEL_REASONING_EFFORTS = [\"minimal\", \"low\", \"medium\", \"high\", \"xhigh\", \"max\"] as const\n\nexport type ModelReasoningEffort = (typeof MODEL_REASONING_EFFORTS)[number]\n\nexport const MODEL_REASONING_LEVELS = [\n \"provider-default\",\n \"none\",\n ...MODEL_REASONING_EFFORTS,\n] as const\n\nexport type ModelReasoningLevel = (typeof MODEL_REASONING_LEVELS)[number]\n\n/** Exact provider-native reasoning budget, expressed in tokens. */\nexport interface ModelReasoningBudget extends ReadonlyJsonObject {\n readonly budgetTokens: number\n}\n\n/** Provider-neutral reasoning preference accepted by every language-model runtime. */\nexport type ModelReasoning = ModelReasoningLevel | ModelReasoningBudget\n\nexport interface ModelReasoningBudgetCapabilities {\n readonly min?: number\n readonly max?: number\n}\n\n/** Controls exposed by one concrete model offering through one provider. */\nexport interface ModelReasoningCapabilities {\n readonly canDisable?: boolean\n readonly efforts?: readonly ModelReasoningEffort[]\n readonly budgetTokens?: ModelReasoningBudgetCapabilities\n}\n\nexport interface ModelCapabilities {\n readonly inputMediaTypes?: readonly string[] | \"any\"\n /** `undefined` is unknown, `false` is unsupported, and an object describes supported controls. */\n readonly reasoning?: false | ModelReasoningCapabilities\n readonly localTools?: boolean\n readonly parallelToolCalls?: boolean\n readonly nativeStructuredOutput?: boolean\n readonly providerExecutedTools?: boolean\n}\n\nexport interface ModelToolSpecification {\n readonly name: string\n readonly description: string\n readonly inputSchema: JsonObject\n}\n\nexport interface ModelResponseFormat {\n readonly type: \"json\"\n readonly name: string\n readonly description?: string\n readonly schema: JsonObject\n}\n\nexport interface LanguageModelRequest {\n readonly callId: string\n readonly messages: readonly ModelMessage[]\n readonly tools: readonly ModelToolSpecification[]\n readonly reasoning?: ModelReasoning\n /** Per-call output ceiling; providers must not exceed a stricter configured model limit. */\n readonly maxOutputTokens?: number\n /** Disable automatic prompt caching without overriding explicit provider configuration. */\n readonly caching?: \"auto\" | \"off\"\n readonly responseFormat?: ModelResponseFormat\n readonly signal: AbortSignal\n}\n\nexport interface LanguageModelStream {\n readonly events: AsyncIterable<LanguageModelStreamEvent>\n}\n\nexport interface LanguageModel {\n readonly providerId: string\n readonly modelId: string\n readonly definition: LanguageModelDefinition\n readonly costEstimator?: ModelCostEstimator\n /**\n * Return an executable model pinned to operational metadata, preserving model identity.\n * `offline` requires a local snapshot without catalog I/O. Workers retain this model\n * for generation and compaction; later catalog refreshes must not change its capabilities/limits.\n * Throw ModelCatalogUnavailableError for catalog transport/access failures to allow workers to\n * retry with an offline snapshot. Invalid definitions and other resolver errors remain fatal.\n */\n resolve?(options?: { readonly offline?: boolean }): Promise<LanguageModel>\n stream(request: LanguageModelRequest): Promise<LanguageModelStream>\n}\n\n/** The common callable provider shape. Provider packages may accept additional model options. */\nexport interface ModelProvider<TCatalog extends ModelDefinitionCatalog = ModelDefinitionCatalog> {\n readonly providerId: string\n readonly catalog: TCatalog\n}\n\nexport interface LanguageModelProvider extends ModelProvider<LanguageModelDefinitionCatalog> {\n (modelId: string): LanguageModel\n}\n\nexport function isModelReasoning(value: unknown): value is ModelReasoning {\n if (typeof value === \"string\") {\n return (MODEL_REASONING_LEVELS as readonly string[]).includes(value)\n }\n if (typeof value !== \"object\" || value === null || Array.isArray(value)) return false\n if (Object.keys(value).length !== 1) return false\n const budgetTokens = (value as { readonly budgetTokens?: unknown }).budgetTokens\n return typeof budgetTokens === \"number\" && Number.isSafeInteger(budgetTokens) && budgetTokens >= 0\n}\n\n/** Explain why a request cannot be represented by known model capabilities. Unknown is allowed. */\nexport function modelReasoningSupportIssue(\n capabilities: ModelCapabilities[\"reasoning\"],\n reasoning: unknown\n): string | undefined {\n if (reasoning === undefined) return undefined\n if (!isModelReasoning(reasoning)) return \"the reasoning preference is invalid\"\n if (reasoning === \"provider-default\") return undefined\n if (capabilities === undefined) return undefined\n if (capabilities === false) return \"reasoning is not supported\"\n if (reasoning === \"none\") {\n return capabilities.canDisable === true ? undefined : \"reasoning cannot be disabled\"\n }\n if (typeof reasoning === \"string\") {\n return capabilities.efforts?.includes(reasoning) === true\n ? undefined\n : `reasoning effort '${reasoning}' is not supported`\n }\n const budget = capabilities.budgetTokens\n if (budget === undefined) return \"reasoning token budgets are not supported\"\n if (budget.min !== undefined && reasoning.budgetTokens < budget.min) {\n return `reasoning token budget must be at least ${budget.min}`\n }\n if (budget.max !== undefined && reasoning.budgetTokens > budget.max) {\n return `reasoning token budget must not exceed ${budget.max}`\n }\n return undefined\n}\n",
6
+ "import type { JsonObject, JsonValue } from \"../json\"\nimport type { ModelReasoning } from \"./language-model\"\nimport type {\n ModelAssistantPart,\n ModelToolCallPart,\n ModelToolResultPart,\n ProviderData,\n} from \"./messages\"\nimport type { ModelCallCost, ModelCostEstimate, ModelReportedCost } from \"./pricing\"\n\nexport interface ModelRoute {\n /** Provider selected by a routing gateway, when it differs from the provider being called. */\n readonly providerId?: string\n readonly modelId?: string\n}\n\n/** Only identifiers supplied by the provider. Internal call/response fallback IDs never belong here. */\nexport type ModelProviderIds = {\n readonly requestId?: string\n readonly responseId?: string\n readonly generationId?: string\n}\n\nexport function normalizeModelProviderIds(value: unknown): ModelProviderIds {\n if (typeof value !== \"object\" || value === null || Array.isArray(value))\n throw new TypeError(\"[Sixb] Provider identifiers must be an object.\")\n const result: { requestId?: string; responseId?: string; generationId?: string } = {}\n for (const [key, id] of Object.entries(value)) {\n if (key !== \"requestId\" && key !== \"responseId\" && key !== \"generationId\") continue\n if (id === undefined) continue\n if (typeof id !== \"string\" || !id.trim())\n throw new TypeError(`[Sixb] Provider ${key} must be nonblank.`)\n result[key] = id\n }\n return Object.freeze(result)\n}\n\nexport type ModelFinishReason =\n | \"stop\"\n | \"length\"\n | \"content-filter\"\n | \"tool-calls\"\n | \"pause\"\n | \"error\"\n | \"other\"\n | \"unknown\"\n\nexport interface ModelUsage {\n readonly inputTokens?: number\n readonly outputTokens?: number\n readonly uncachedInputTokens?: number\n readonly cacheReadInputTokens?: number\n readonly cacheWriteInputTokens?: number\n readonly cacheWrite5mInputTokens?: number\n readonly cacheWrite1hInputTokens?: number\n readonly textOutputTokens?: number\n readonly reasoningOutputTokens?: number\n readonly raw?: JsonObject\n}\n\nexport type LanguageModelStreamEvent =\n | { readonly type: \"stream-start\" }\n | {\n readonly type: \"response-metadata\"\n readonly providerIds?: ModelProviderIds\n readonly id?: string\n readonly modelId?: string\n }\n | { readonly type: \"text-start\"; readonly id: string; readonly providerData?: ProviderData }\n | { readonly type: \"text-delta\"; readonly id: string; readonly delta: string }\n | { readonly type: \"text-end\"; readonly id: string; readonly providerData?: ProviderData }\n | {\n readonly type: \"reasoning-start\"\n readonly id: string\n readonly providerData?: ProviderData\n }\n | { readonly type: \"reasoning-delta\"; readonly id: string; readonly delta: string }\n | { readonly type: \"reasoning-end\"; readonly id: string; readonly providerData?: ProviderData }\n | {\n readonly type: \"tool-input-start\"\n readonly id: string\n readonly toolName: string\n readonly providerData?: ProviderData\n readonly providerExecuted?: boolean\n readonly dynamic?: boolean\n }\n | { readonly type: \"tool-input-delta\"; readonly id: string; readonly delta: string }\n | { readonly type: \"tool-input-end\"; readonly id: string; readonly providerData?: ProviderData }\n | {\n readonly type: \"tool-call\"\n readonly toolCallId: string\n readonly toolName: string\n readonly input: string\n readonly providerData?: ProviderData\n readonly providerExecuted?: boolean\n readonly dynamic?: boolean\n }\n | {\n readonly type: \"tool-result\"\n readonly toolCallId: string\n readonly toolName: string\n readonly output: JsonValue\n readonly isError?: boolean\n readonly providerData?: ProviderData\n readonly providerExecuted?: boolean\n readonly dynamic?: boolean\n }\n | {\n readonly type: \"provider-state\"\n readonly providerId: string\n readonly data: JsonValue\n }\n | {\n readonly type: \"finish\"\n readonly finishReason: ModelFinishReason\n readonly rawFinishReason?: string\n readonly usage: ModelUsage\n readonly providerData?: ProviderData\n readonly reportedCost?: ModelReportedCost\n readonly route?: ModelRoute\n }\n | { readonly type: \"error\"; readonly error: unknown }\n\nexport type ModelUiChunk =\n | { readonly type: \"start-step\" }\n | { readonly type: \"text-start\"; readonly id: string }\n | { readonly type: \"text-delta\"; readonly id: string; readonly delta: string }\n | { readonly type: \"text-end\"; readonly id: string }\n | { readonly type: \"reasoning-start\"; readonly id: string }\n | { readonly type: \"reasoning-delta\"; readonly id: string; readonly delta: string }\n | { readonly type: \"reasoning-end\"; readonly id: string }\n | {\n readonly type: \"tool-input-start\"\n readonly toolCallId: string\n readonly toolName: string\n }\n | {\n readonly type: \"tool-input-delta\"\n readonly toolCallId: string\n readonly toolName: string\n readonly inputTextDelta: string\n }\n | {\n readonly type: \"tool-input-available\"\n readonly toolCallId: string\n readonly toolName: string\n readonly input: JsonValue\n }\n | {\n readonly type: \"tool-input-error\"\n readonly toolCallId: string\n readonly toolName: string\n readonly input: JsonValue\n readonly errorText: string\n }\n | {\n readonly type: \"tool-output-available\"\n readonly toolCallId: string\n readonly toolName: string\n readonly output: JsonValue\n }\n | {\n readonly type: \"tool-output-error\"\n readonly toolCallId: string\n readonly toolName: string\n readonly errorText: string\n }\n | { readonly type: \"error\"; readonly errorText: string }\n\nexport interface ModelCallEndEvent {\n readonly providerIds?: ModelProviderIds\n /** Retained independently when the selected display cost is provider-reported. */\n readonly estimate?: ModelCostEstimate\n readonly callId: string\n readonly providerId: string\n readonly modelId: string\n readonly responseId: string\n readonly responseModelId?: string\n readonly usage: ModelUsage\n readonly cost: ModelCallCost\n readonly requestedReasoning?: ModelReasoning\n readonly route?: ModelRoute\n}\n\nexport interface ModelStep {\n readonly content: readonly (ModelAssistantPart | ModelToolResultPart)[]\n readonly finishReason: ModelFinishReason\n readonly rawFinishReason?: string\n readonly usage: ModelUsage\n readonly responseId: string\n readonly responseModelId?: string\n readonly cost: ModelCallCost\n readonly route?: ModelRoute\n}\n\nexport interface ModelLoopPartial {\n readon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EACA,IAAI,OAAO,QAAQ,aAAa,UAAU,eAAe,OAAO,KAAK;AAAA,IACnE,OAAO,0CAA0C,OAAO;AAAA,EAC1D;AAAA,EACA;AAAA;;;ACtHK,SAAS,yBAAyB,CAAC,OAAkC;AAAA,EAC1E,IAAI,OAAO,UAAU,YAAY,UAAU,QAAQ,MAAM,QAAQ,KAAK;AAAA,IACpE,MAAM,IAAI,UAAU,gDAAgD;AAAA,EACtE,MAAM,SAA6E,CAAC;AAAA,EACpF,YAAY,KAAK,OAAO,OAAO,QAAQ,KAAK,GAAG;AAAA,IAC7C,IAAI,QAAQ,eAAe,QAAQ,gBAAgB,QAAQ;AAAA,MAAgB;AAAA,IAC3E,IAAI,OAAO;AAAA,MAAW;AAAA,IACtB,IAAI,OAAO,OAAO,YAAY,CAAC,GAAG,KAAK;AAAA,MACrC,MAAM,IAAI,UAAU,mBAAmB,uBAAuB;AAAA,IAChE,OAAO,OAAO;AAAA,EAChB;AAAA,EACA,OAAO,OAAO,OAAO,MAAM;AAAA;",
9
+ "debugId": "9264A40AF02EFA2764756E2164756E21",
10
+ "names": []
11
+ }
@@ -5,10 +5,10 @@ import {
5
5
  } from "./chunk-5sz8ta9r.js";
6
6
  import {
7
7
  isDatasetDefinition
8
- } from "./chunk-a31h57d5.js";
8
+ } from "./chunk-tn7xcs2n.js";
9
9
  import {
10
10
  PipelineError
11
- } from "./chunk-r0rry8dn.js";
11
+ } from "./chunk-rp1mvzb4.js";
12
12
 
13
13
  // src/lake-storage/sql-transforms.ts
14
14
  var SQL_DIALECT = {
@@ -1,7 +1,7 @@
1
1
  // @bun
2
2
  import {
3
3
  blobIdFromDigest
4
- } from "./chunk-zqysyfjt.js";
4
+ } from "./chunk-08m3b6w8.js";
5
5
  // src/blob-storage/errors.ts
6
6
  class BlobStorageError extends Error {
7
7
  name = "BlobStorageError";
@@ -1,10 +1,10 @@
1
1
  // @bun
2
2
  import {
3
3
  getDatasetRowValidationError
4
- } from "./chunk-a31h57d5.js";
4
+ } from "./chunk-tn7xcs2n.js";
5
5
  import {
6
6
  isPlainRecord
7
- } from "./chunk-t8t39h7v.js";
7
+ } from "./chunk-n6jxh8sw.js";
8
8
 
9
9
  // src/lake-storage/errors.ts
10
10
  class LakeStorageError extends Error {
@@ -2,12 +2,12 @@
2
2
  import {
3
3
  createLinkTokenMap,
4
4
  createPropertyTokenMap
5
- } from "./chunk-4gz41why.js";
5
+ } from "./chunk-dqn23610.js";
6
6
  import {
7
7
  validatePrimaryProperties,
8
8
  validatePropertyDefinitions,
9
9
  validateQueryMetadata
10
- } from "./chunk-rnshztfq.js";
10
+ } from "./chunk-d63tybny.js";
11
11
  import {
12
12
  OntologyNotFoundError,
13
13
  OntologyValidationError,
@@ -1,13 +1,13 @@
1
1
  // @bun
2
2
  import {
3
3
  findPrimitiveRunExecution
4
- } from "./chunk-t9xghkva.js";
4
+ } from "./chunk-3kv70xwp.js";
5
5
  import {
6
6
  MaterializationConflictError
7
7
  } from "./chunk-ry24jbr1.js";
8
8
  import {
9
9
  parseSixbFailure
10
- } from "./chunk-0172wgm9.js";
10
+ } from "./chunk-2xns679x.js";
11
11
 
12
12
  // src/storage/projection-runs/errors.ts
13
13
  class ProjectionRunError extends MaterializationConflictError {
@@ -3,39 +3,39 @@ import {
3
3
  createPrimitiveExecutionRecord,
4
4
  ensureExecutionRecord,
5
5
  executionRecordInputFromRuntime
6
- } from "./chunk-f6erf2vv.js";
6
+ } from "./chunk-hdz94br2.js";
7
7
  import {
8
8
  actionRunParamsEqual,
9
9
  actionSubjectsEqual,
10
10
  isTerminalActionRun
11
- } from "./chunk-v0egge8b.js";
11
+ } from "./chunk-6ed5bwnd.js";
12
12
  import {
13
13
  ACTION_RUN_FAILURE_CODES,
14
14
  parseActionRunFailure
15
- } from "./chunk-htq0qh7z.js";
15
+ } from "./chunk-ka3a2ft3.js";
16
16
  import {
17
17
  ActionRunError
18
- } from "./chunk-xkthy56g.js";
18
+ } from "./chunk-1kamz6j0.js";
19
19
  import {
20
20
  validateSchemaOrRefValue
21
- } from "./chunk-4gz41why.js";
21
+ } from "./chunk-dqn23610.js";
22
22
  import {
23
23
  reportRunFailure
24
- } from "./chunk-dsrkgtnh.js";
24
+ } from "./chunk-jq43kdvk.js";
25
25
  import {
26
26
  assertAuthorized
27
- } from "./chunk-f83ka50g.js";
27
+ } from "./chunk-37wk412q.js";
28
28
  import {
29
29
  coerceSchemaValueToTyped,
30
30
  normalizeSchemaValue
31
- } from "./chunk-rnshztfq.js";
31
+ } from "./chunk-d63tybny.js";
32
32
  import {
33
33
  OntologyValidationError
34
34
  } from "./chunk-dktq02ne.js";
35
35
  import {
36
36
  createSixbError,
37
37
  toSixbFailure
38
- } from "./chunk-0172wgm9.js";
38
+ } from "./chunk-2xns679x.js";
39
39
 
40
40
  // src/actions/errors.ts
41
41
  class ActionDefinitionError extends Error {
@@ -140,11 +140,6 @@ function normalizeSchemaOrRefValue(schema, value, path, valueTypesById) {
140
140
  return normalizeSchemaValue(schema, value, path, valueTypesById);
141
141
  }
142
142
 
143
- // src/runtime/errors.ts
144
- class RuntimeError extends Error {
145
- name = "RuntimeError";
146
- }
147
-
148
143
  // src/objects/action/errors.ts
149
144
  class ActionValidationError extends Error {
150
145
  name = "ActionValidationError";
@@ -551,6 +546,6 @@ function requireActionRunStorage2(runtime) {
551
546
  return actionRuns;
552
547
  }
553
548
 
554
- export { ActionDefinitionError, ActionEditCommitError, missingActionMutationMessage, effectsWithoutEditsMessage, assertNonEmpty, isActionDefinition, isGlobalActionDefinition, isObjectActionDefinition, coerceActionParamsToTyped, RuntimeError, ActionValidationError, ActionRunFailedError, ActionRunTimeoutError, requestAction, requestActionAndWait, waitForActionRun };
549
+ export { ActionDefinitionError, ActionEditCommitError, missingActionMutationMessage, effectsWithoutEditsMessage, assertNonEmpty, isActionDefinition, isGlobalActionDefinition, isObjectActionDefinition, coerceActionParamsToTyped, ActionValidationError, ActionRunFailedError, ActionRunTimeoutError, requestAction, requestActionAndWait, waitForActionRun };
555
550
 
556
- //# debugId=863B332A1451A80064756E2164756E21
551
+ //# debugId=FD3723432306E96364756E2164756E21
@@ -1,16 +1,15 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../src/actions/errors.ts", "../src/actions/validation.ts", "../src/runtime/errors.ts", "../src/objects/action/errors.ts", "../src/actions/run-dispatch.ts", "../src/actions/run-id.ts", "../src/actions/request.ts"],
3
+ "sources": ["../src/actions/errors.ts", "../src/actions/validation.ts", "../src/objects/action/errors.ts", "../src/actions/run-dispatch.ts", "../src/actions/run-id.ts", "../src/actions/request.ts"],
4
4
  "sourcesContent": [
5
5
  "export class ActionDefinitionError extends Error {\n readonly name = \"ActionDefinitionError\"\n}\n\nexport class ActionEditCommitError extends Error {\n readonly name = \"ActionEditCommitError\"\n}\n\nexport function missingActionMutationMessage(actionId: string): string {\n return `Action \"${actionId}\" must declare .writeback(...) or .edits(...).`\n}\n\nexport function effectsWithoutEditsMessage(actionId: string): string {\n return `Action \"${actionId}\" cannot declare .effects(...) without .edits(...).`\n}\n",
6
6
  "import type { JsonValue } from \"../json\"\nimport { type SchemaOrRef, type ValueType, validateSchemaOrRefValue } from \"../ontology\"\nimport { OntologyValidationError } from \"../ontology/errors\"\nimport type { ObjectTypeWithPropertyTokens } from \"../ontology/tokens\"\nimport type { Schema } from \"../ontology/types\"\nimport { coerceSchemaValueToTyped, normalizeSchemaValue } from \"../ontology/validation\"\nimport type { ActionRunParams } from \"../storage/action-runs\"\nimport { ActionDefinitionError } from \"./errors\"\nimport type {\n ActionDefinition,\n ActionParamsConfig,\n ActionSubject,\n GlobalActionDefinition,\n ObjectActionDefinition,\n} from \"./types\"\n\ninterface ActionValidationRuntime {\n readonly ontology: {\n getValueTypesById(): ReadonlyMap<string, ValueType>\n resolveObjectType(objectTypeId: string): ObjectTypeWithPropertyTokens\n }\n readonly actionRegistry: {\n listForType(objectType: ObjectTypeWithPropertyTokens): readonly ObjectActionDefinition[]\n }\n}\n\nexport function assertNonEmpty(value: string, field: string): void {\n if (!value.trim()) {\n throw new ActionDefinitionError(`Action ${field} must not be empty.`)\n }\n}\n\nexport function isActionDefinition(value: unknown): value is ActionDefinition {\n const binding = (value as { binding?: { kind?: unknown } } | null)?.binding\n return (\n typeof value === \"object\" &&\n value !== null &&\n (value as { kind?: unknown }).kind === \"action\" &&\n (binding?.kind === \"global\" || binding?.kind === \"object\")\n )\n}\n\nexport function isGlobalActionDefinition(value: ActionDefinition): value is GlobalActionDefinition {\n return value.binding.kind === \"global\"\n}\n\nexport function isObjectActionDefinition(value: ActionDefinition): value is ObjectActionDefinition {\n return value.binding.kind === \"object\"\n}\n\nexport function normalizeActionParams(\n runtime: Pick<ActionValidationRuntime, \"ontology\">,\n paramsConfig: ActionParamsConfig,\n params: Record<string, unknown>,\n pathPrefix: string\n): ActionRunParams {\n const knownParamIds = new Set(Object.keys(paramsConfig))\n const normalized: Record<string, JsonValue> = {}\n\n for (const paramId of Object.keys(params)) {\n if (!knownParamIds.has(paramId)) {\n throw new OntologyValidationError(`Unknown param '${paramId}' for action '${pathPrefix}'`)\n }\n }\n\n for (const [paramId, paramDef] of Object.entries(paramsConfig)) {\n const value = params[paramId]\n\n if (value === undefined) {\n if (paramDef.required) {\n throw new OntologyValidationError(\n `Missing required param '${paramId}' for action '${pathPrefix}'`\n )\n }\n continue\n }\n\n if (value === null) {\n if (!paramDef.nullable) {\n throw new OntologyValidationError(\n `[Sixb] Action param ${pathPrefix}.${paramId} cannot be null`\n )\n }\n normalized[paramId] = null\n continue\n }\n\n validateSchemaOrRefValue(\n paramDef.schema,\n value,\n `${pathPrefix}.${paramId}`,\n runtime.ontology.getValueTypesById()\n )\n\n normalized[paramId] = normalizeSchemaOrRefValue(\n paramDef.schema,\n value,\n `${pathPrefix}.${paramId}`,\n runtime.ontology.getValueTypesById()\n )\n }\n\n return normalized\n}\n\n/**\n * Re-hydrate stored action params for the handler-facing surface. Params are\n * normalized to JSON (e.g. `date`/`timestamp` -> ISO string) for storage; action\n * handler types promise `Date` for those, so this converts them back before the\n * handler runs. `objectRef` params pass through unchanged.\n */\nexport function coerceActionParamsToTyped(\n paramsConfig: ActionParamsConfig,\n params: Record<string, unknown>,\n valueTypesById: ReadonlyMap<string, ValueType>\n): Record<string, unknown> {\n const coerced: Record<string, unknown> = { ...params }\n\n for (const [paramId, paramDef] of Object.entries(paramsConfig)) {\n const value = params[paramId]\n if (value === undefined) continue\n\n const schema = paramDef.schema\n if (typeof schema === \"object\" && schema !== null && schema.type === \"objectRef\") {\n continue\n }\n\n coerced[paramId] = coerceSchemaValueToTyped(schema as Schema, value, valueTypesById)\n }\n\n return coerced\n}\n\nexport function validateActionSubject(action: ActionDefinition, subject: ActionSubject): void {\n if (isGlobalActionDefinition(action) && subject.kind !== \"none\") {\n throw new OntologyValidationError(`Action '${action.id}' does not accept an object subject.`)\n }\n}\n\nexport function resolveObjectActionSubject(params: {\n readonly runtime: ActionValidationRuntime\n readonly action: ObjectActionDefinition\n readonly subject: ActionSubject\n}): ObjectTypeWithPropertyTokens {\n const { runtime, action, subject } = params\n\n if (subject.kind !== \"object\") {\n throw new OntologyValidationError(`Action '${action.id}' requires an object subject.`)\n }\n\n const objectType = runtime.ontology.resolveObjectType(subject.objectTypeId)\n if (!actionAppliesToObjectType(runtime, action, objectType)) {\n throw new OntologyValidationError(\n `Action '${action.id}' is not valid for object type '${objectType.id}'.`\n )\n }\n\n return objectType\n}\n\nfunction actionAppliesToObjectType(\n runtime: Pick<ActionValidationRuntime, \"actionRegistry\">,\n action: ObjectActionDefinition,\n objectType: ObjectTypeWithPropertyTokens\n): boolean {\n return runtime.actionRegistry\n .listForType(objectType)\n .some((candidate) => candidate.id === action.id)\n}\n\nfunction normalizeSchemaOrRefValue(\n schema: SchemaOrRef,\n value: unknown,\n path: string,\n valueTypesById: ReadonlyMap<string, ValueType>\n): JsonValue {\n if (typeof schema === \"object\" && schema !== null && schema.type === \"objectRef\") {\n const refValue = value as { objectTypeId: string; primaryId: string }\n return {\n objectTypeId: refValue.objectTypeId,\n primaryId: refValue.primaryId,\n }\n }\n\n return normalizeSchemaValue(schema as Schema, value, path, valueTypesById)\n}\n",
7
- "/**\n * Thrown for runtime setup, lifecycle, and internal invariant failures\n * that are not validation errors (e.g., duplicate registrations, missing\n * bootstrap resources, failed event appends, module load failures).\n */\nexport class RuntimeError extends Error {\n readonly name = \"RuntimeError\"\n}\n",
8
7
  "import type { ActionSubject } from \"../../actions\"\nimport type { ActionRunFailure } from \"../../storage\"\n\nexport class ActionValidationError extends Error {\n readonly name = \"ActionValidationError\"\n readonly actionId: string\n readonly subject: ActionSubject\n readonly primaryId?: string\n\n constructor(message: string, params: { actionId: string; subject: ActionSubject }) {\n super(message)\n this.actionId = params.actionId\n this.subject = params.subject\n this.primaryId = params.subject.kind === \"object\" ? params.subject.primaryId : undefined\n }\n}\n\nexport class ActionRunFailedError extends Error {\n readonly name = \"ActionRunFailedError\"\n readonly runId: string\n readonly actionId: string\n readonly subject: ActionSubject\n readonly objectTypeId?: string\n readonly primaryId?: string\n readonly error: ActionRunFailure\n readonly finishedAt: string\n\n constructor(payload: {\n runId: string\n actionId: string\n subject: ActionSubject\n error: ActionRunFailure\n finishedAt: string\n }) {\n super(payload.error.message)\n this.runId = payload.runId\n this.actionId = payload.actionId\n this.subject = payload.subject\n this.objectTypeId = payload.subject.kind === \"object\" ? payload.subject.objectTypeId : undefined\n this.primaryId = payload.subject.kind === \"object\" ? payload.subject.primaryId : undefined\n this.error = payload.error\n this.finishedAt = payload.finishedAt\n }\n}\n\nexport class ActionRunTimeoutError extends Error {\n readonly name = \"ActionRunTimeoutError\"\n readonly runId: string\n readonly timeoutMs: number\n\n constructor(params: { runId: string; timeoutMs: number }) {\n super(`Action run '${params.runId}' did not finish within ${params.timeoutMs}ms.`)\n this.runId = params.runId\n this.timeoutMs = params.timeoutMs\n }\n}\n",
9
8
  "import { randomUUID } from \"node:crypto\"\nimport { reportRunFailure } from \"../error-reporting/capability\"\nimport { createSixbError, toSixbFailure } from \"../errors/internal\"\nimport type { DomainEventLog } from \"../events\"\nimport type { Queues } from \"../queues\"\nimport type {\n ActionRunFailure,\n ActionRunParams,\n ActionRunRecord,\n CreateExecutionInput,\n Storage,\n} from \"../storage\"\nimport {\n ACTION_RUN_FAILURE_CODES,\n ActionRunError,\n actionRunParamsEqual,\n actionSubjectsEqual,\n} from \"../storage\"\nimport { parseActionRunFailure } from \"../storage/action-runs/failure\"\nimport type { RequestActionResult } from \"./request\"\nimport { createActionRunId, createActionRunIdempotencyKey } from \"./run-id\"\nimport type { ActionSubject } from \"./types\"\n\ninterface DispatchActionRunInput {\n readonly errorReporterHost: object\n readonly projectId: string\n readonly storage: Storage\n readonly queue: Queues[\"actions\"]\n readonly events: DomainEventLog\n readonly actionId: string\n readonly subject: ActionSubject\n readonly params: ActionRunParams\n readonly runId?: string\n readonly createExecution: (executionId: string, runId: string) => Promise<CreateExecutionInput>\n}\n\ninterface PreparedActionRun {\n readonly runId: string\n readonly idempotencyKey: string\n}\n\ntype PersistedActionRun =\n | { readonly publish: false; readonly run: ActionRunRecord }\n | {\n readonly publish: true\n readonly run: ActionRunRecord\n readonly execution: CreateExecutionInput\n readonly queuedAt: Date\n readonly created: boolean\n }\n\n/** Persist an Action execution and run before publishing its queue job. */\nexport async function dispatchActionRun(\n input: DispatchActionRunInput\n): Promise<RequestActionResult> {\n const request = prepareActionRun(input)\n const persisted = await persistActionRun(input, request)\n if (!persisted.publish) return existingActionRunResult(persisted.run)\n return publishActionRun(input, persisted)\n}\n\nfunction prepareActionRun(input: DispatchActionRunInput): PreparedActionRun {\n const runId = createActionRunId(input.runId)\n return {\n runId,\n idempotencyKey: createActionRunIdempotencyKey(input.projectId, runId),\n }\n}\n\nasync function persistActionRun(\n input: DispatchActionRunInput,\n request: PreparedActionRun\n): Promise<PersistedActionRun> {\n const actionRuns = requireActionRunStorage(input.storage)\n const existing = await actionRuns.getById({ projectId: input.projectId, id: request.runId })\n if (existing) return reuseActionRun(input, existing)\n\n const execution = await input.createExecution(`exec_${randomUUID()}`, request.runId)\n const queuedAt = new Date()\n try {\n return await input.storage.transaction(\n async (tx): Promise<PersistedActionRun> => {\n const transactionalRuns = requireActionRunStorage(tx)\n const raced = await transactionalRuns.getById({\n projectId: input.projectId,\n id: request.runId,\n })\n if (raced) {\n assertExistingRunMatchesRequest(raced, input)\n return { publish: false, run: raced }\n }\n\n await tx.executions.create(execution)\n const run = await transactionalRuns.queue({\n projectId: input.projectId,\n id: request.runId,\n executionId: execution.id,\n actionId: input.actionId,\n subject: input.subject,\n params: input.params,\n idempotencyKey: request.idempotencyKey,\n queuedAt,\n })\n return { publish: true, run, execution, queuedAt, created: true }\n },\n { isolation: \"serializable\" }\n )\n } catch (error) {\n if (!(error instanceof ActionRunError)) throw error\n const raced = await actionRuns.getById({ projectId: input.projectId, id: request.runId })\n if (!raced) throw error\n assertExistingRunMatchesRequest(raced, input)\n return { publish: false, run: raced }\n }\n}\n\nasync function reuseActionRun(\n input: DispatchActionRunInput,\n existing: ActionRunRecord\n): Promise<PersistedActionRun> {\n assertExistingRunMatchesRequest(existing, input)\n if (!isRetryableEnqueueFailure(existing)) return { publish: false, run: existing }\n\n const execution = await input.storage.executions.getById({\n projectId: input.projectId,\n id: existing.executionId,\n })\n if (!execution) {\n throw new ActionRunError(\n `[Sixb] Execution '${existing.executionId}' for Action run '${existing.id}' was not found.`\n )\n }\n\n const queuedAt = new Date()\n const run = await requireActionRunStorage(input.storage).queue({\n projectId: input.projectId,\n id: existing.id,\n executionId: existing.executionId,\n actionId: existing.actionId,\n subject: existing.subject,\n params: existing.params,\n idempotencyKey: existing.idempotencyKey,\n queuedAt,\n })\n return { publish: true, run, execution, queuedAt, created: false }\n}\n\nasync function publishActionRun(\n input: DispatchActionRunInput,\n persisted: Extract<PersistedActionRun, { readonly publish: true }>\n): Promise<RequestActionResult> {\n let job: Awaited<ReturnType<Queues[\"actions\"][\"enqueue\"]>>[number] | undefined\n try {\n const jobs = await input.queue.enqueue({\n projectId: input.projectId,\n jobs: [\n {\n id: persisted.run.id,\n type: \"action.run.requested\",\n payload: {\n runId: persisted.run.id,\n },\n },\n ],\n })\n job = jobs[0]\n } catch (error) {\n await failActionRunPublication(input, persisted.run, error)\n throw error\n }\n\n await input.events.emit(\n {\n events: [\n {\n type: \"action.requested\",\n payload: {\n actionId: persisted.run.actionId,\n subject: persisted.run.subject,\n params: persisted.run.params,\n runId: persisted.run.id,\n },\n },\n ],\n correlationId: persisted.execution.correlationId,\n },\n { source: \"Sixb\" }\n )\n\n return {\n runId: persisted.run.id,\n queuedAt: persisted.queuedAt.toISOString(),\n ...(job?.id ? { jobId: job.id } : {}),\n created: persisted.created,\n }\n}\n\nasync function failActionRunPublication(\n input: DispatchActionRunInput,\n run: ActionRunRecord,\n error: unknown\n): Promise<void> {\n const failedAt = new Date()\n const failure = toActionRunFailure(error, run, failedAt)\n await requireActionRunStorage(input.storage).finish({\n projectId: input.projectId,\n id: run.id,\n status: \"failed\",\n finishedAt: failedAt,\n error: failure,\n })\n reportRunFailure(input.errorReporterHost, error, {\n projectId: input.projectId,\n runKind: \"action\",\n run: { runId: run.id, actionId: run.actionId },\n failure,\n })\n}\n\nfunction requireActionRunStorage(storage: Storage): NonNullable<Storage[\"actionRuns\"]> {\n if (!storage.actionRuns) {\n throw new ActionRunError(\"[Sixb] Action run storage is not configured.\")\n }\n return storage.actionRuns\n}\n\nfunction assertExistingRunMatchesRequest(\n existing: ActionRunRecord,\n request: Pick<DispatchActionRunInput, \"actionId\" | \"subject\" | \"params\">\n): void {\n if (\n existing.actionId !== request.actionId ||\n !actionSubjectsEqual(existing.subject, request.subject) ||\n !actionRunParamsEqual(existing.params, request.params)\n ) {\n throw new ActionRunError(\n `[Sixb] Action run '${existing.id}' already exists with a different request payload.`\n )\n }\n}\n\nfunction isRetryableEnqueueFailure(record: ActionRunRecord): boolean {\n return (\n record.status === \"failed\" && record.phase === \"enqueue\" && record.error?.retryable === true\n )\n}\n\nfunction existingActionRunResult(existing: ActionRunRecord): RequestActionResult {\n return {\n runId: existing.id,\n queuedAt: existing.queuedAt.toISOString(),\n created: false,\n }\n}\n\nfunction toActionRunFailure(\n error: unknown,\n run: ActionRunRecord,\n at: Date\n): ActionRunFailure<\"enqueue\"> {\n const enqueueError = createSixbError(\n \"queue.enqueue_failed\",\n `[Sixb] Could not enqueue Action run '${run.id}'.`,\n {\n cause: error,\n details: { actionId: run.actionId, runId: run.id, phase: \"enqueue\" },\n }\n )\n return parseActionRunFailure(\n toSixbFailure(enqueueError, {\n allowedCodes: ACTION_RUN_FAILURE_CODES,\n at,\n }),\n \"enqueue\"\n )\n}\n",
10
9
  "import { randomUUID } from \"node:crypto\"\nimport { OntologyValidationError } from \"../ontology/errors\"\n\nexport function createActionRunId(runId: string | undefined): string {\n if (runId !== undefined) {\n if (!runId.trim()) {\n throw new OntologyValidationError(\"[Sixb] Action run id must not be empty\")\n }\n return runId\n }\n\n return `act_${randomUUID()}`\n}\n\nexport function createActionRunIdempotencyKey(projectId: string, runId: string): string {\n return `action:${projectId}:${runId}`\n}\n",
11
10
  "import { assertAuthorized } from \"../authorization\"\nimport {\n createPrimitiveExecutionRecord,\n ensureExecutionRecord,\n executionRecordInputFromRuntime,\n} from \"../execution/durable\"\nimport type { ExecutionContext } from \"../execution/types\"\nimport { ActionRunTimeoutError } from \"../objects/action/errors\"\nimport { OntologyValidationError } from \"../ontology/errors\"\nimport type { ObjectTypeWithPropertyTokens } from \"../ontology/tokens\"\nimport type { SixbRuntimeContext } from \"../runtime/types\"\nimport {\n ActionRunError,\n type ActionRunRecord,\n type ActionRunStorage,\n isTerminalActionRun,\n} from \"../storage\"\nimport { dispatchActionRun } from \"./run-dispatch\"\nimport { createActionRunId } from \"./run-id\"\nimport type { ActionDefinition, ActionSubject } from \"./types\"\nimport {\n isObjectActionDefinition,\n normalizeActionParams,\n resolveObjectActionSubject,\n validateActionSubject,\n} from \"./validation\"\n\nexport interface RequestActionResult {\n readonly runId: string\n readonly queuedAt: string\n readonly jobId?: string\n readonly created: boolean\n}\n\nexport interface RequestActionOptions {\n readonly runId?: string\n readonly signal?: AbortSignal\n}\n\nexport interface RequestActionAndWaitOptions extends RequestActionOptions {\n readonly timeoutMs?: number\n readonly onRequested?: (runId: string) => void | Promise<void>\n}\n\nexport interface RequestActionInput {\n readonly actionId: string\n readonly subject?: ActionSubject\n readonly params?: Record<string, unknown>\n readonly runId?: string\n readonly signal?: AbortSignal\n}\n\nexport interface RequestActionAndWaitInput extends RequestActionInput {\n readonly timeoutMs?: number\n readonly onRequested?: (runId: string) => void | Promise<void>\n}\n\nexport interface WaitForActionRunInput {\n readonly runId: string\n readonly timeoutMs?: number\n readonly signal?: AbortSignal\n}\n\nconst DEFAULT_ACTION_WAIT_TIMEOUT_MS = 60_000\nconst DEFAULT_ACTION_WAIT_POLL_MS = 1_000\n\nfunction clearTimer(timer: ReturnType<typeof setTimeout> | undefined): void {\n if (timer) {\n clearTimeout(timer)\n }\n}\n\nfunction getActionDefinition(runtime: SixbRuntimeContext, actionId: string): ActionDefinition {\n const action = runtime.actionRegistry.getById(actionId)\n if (!action) {\n throw new OntologyValidationError(`Unknown action '${actionId}'`)\n }\n return action\n}\n\nexport async function requestAction(\n runtime: SixbRuntimeContext,\n execution: ExecutionContext,\n input: RequestActionInput\n): Promise<RequestActionResult> {\n requireActionRunStorage(runtime)\n const action = getActionDefinition(runtime, input.actionId)\n const actionId = action.id\n const rawParams: Record<string, unknown> = input.params ?? {}\n const subject: ActionSubject = input.subject ?? { kind: \"none\" }\n\n assertAuthorized(runtime, { kind: \"action.apply\", actionId })\n if (action.binding.kind === \"object\") {\n // Object actions also require visibility of the subject's object type.\n assertAuthorized(runtime, { kind: \"object.view\", objectTypeId: action.binding.objectType.id })\n }\n\n validateActionSubject(action, subject)\n\n let pathPrefix = action.id\n let objectType: ObjectTypeWithPropertyTokens | null = null\n\n if (isObjectActionDefinition(action)) {\n objectType = resolveObjectActionSubject({ runtime, action, subject })\n pathPrefix = `${objectType.id}.${action.id}`\n }\n\n const actionParams = normalizeActionParams(runtime, action.params, rawParams, pathPrefix)\n\n return dispatchActionRun({\n errorReporterHost: runtime,\n projectId: runtime.projectId,\n storage: runtime.storage,\n queue: runtime.queues.actions,\n events: runtime.events,\n actionId,\n subject,\n params: actionParams,\n runId: input.runId,\n createExecution: async (executionId, runId) => {\n const caller = await ensureExecutionRecord(\n runtime.storage.executions,\n executionRecordInputFromRuntime({\n execution,\n runtimeAuthorization: runtime.runtimeAuthorization,\n })\n )\n return createPrimitiveExecutionRecord({\n id: executionId,\n primitive: { kind: \"action\", id: actionId, runId },\n origin: { type: \"execution\", parent: caller },\n })\n },\n })\n}\n\nexport async function requestActionAndWait(\n runtime: SixbRuntimeContext,\n execution: ExecutionContext,\n input: RequestActionAndWaitInput\n): Promise<ActionRunRecord> {\n const runId = createActionRunId(input.runId)\n\n await requestAction(runtime, execution, {\n ...input,\n runId,\n })\n await input.onRequested?.(runId)\n\n return waitForActionRun(runtime, {\n runId,\n timeoutMs: input.timeoutMs,\n signal: input.signal,\n })\n}\n\nexport async function waitForActionRun(\n runtime: SixbRuntimeContext,\n input: WaitForActionRunInput\n): Promise<ActionRunRecord> {\n const actionRuns = requireActionRunStorage(runtime)\n const timeoutMs = input.timeoutMs ?? DEFAULT_ACTION_WAIT_TIMEOUT_MS\n const signal = input.signal\n const startedAt = Date.now()\n\n if (signal?.aborted) {\n throw signal.reason ?? new Error(\"aborted\")\n }\n\n return new Promise<ActionRunRecord>((resolve, reject) => {\n let timer: ReturnType<typeof setTimeout> | undefined\n let pollTimer: ReturnType<typeof setTimeout> | undefined\n let unsubscribe: (() => void) | undefined\n let settled = false\n let checking = false\n\n const releaseSubscription = (release: (() => void) | undefined) => {\n if (!release) return\n try {\n release()\n } catch (error) {\n console.error(\"[Sixb] Failed to release action run wait subscription:\", error)\n }\n }\n\n const cleanup = () => {\n if (settled) return\n settled = true\n clearTimer(timer)\n clearTimer(pollTimer)\n signal?.removeEventListener(\"abort\", onAbort)\n releaseSubscription(unsubscribe)\n }\n\n const rejectWith = (error: unknown) => {\n cleanup()\n reject(error)\n }\n\n const schedulePoll = () => {\n if (!settled && !pollTimer) {\n pollTimer = setTimeout(() => {\n pollTimer = undefined\n void check()\n }, DEFAULT_ACTION_WAIT_POLL_MS)\n }\n }\n\n const check = async () => {\n if (settled || checking) {\n return\n }\n checking = true\n try {\n const record = await actionRuns.getById({\n projectId: runtime.projectId,\n id: input.runId,\n })\n if (record && isTerminalActionRun(record)) {\n cleanup()\n resolve(record)\n return\n }\n schedulePoll()\n } catch (error) {\n rejectWith(error)\n } finally {\n checking = false\n }\n }\n\n const onAbort = () => {\n rejectWith(signal?.reason ?? new Error(\"aborted\"))\n }\n\n timer = setTimeout(\n () => {\n rejectWith(new ActionRunTimeoutError({ runId: input.runId, timeoutMs }))\n },\n Math.max(0, timeoutMs - (Date.now() - startedAt))\n )\n\n if (signal) {\n signal.addEventListener(\"abort\", onAbort, { once: true })\n }\n\n runtime.events\n .subscribe({ types: [\"action.completed\", \"action.failed\"] }, (events) => {\n if (\n events.some(\n (event) =>\n (event.type === \"action.completed\" || event.type === \"action.failed\") &&\n event.payload.runId === input.runId\n )\n ) {\n void check()\n }\n })\n .then((unsubscribeEvents) => {\n // Timeout or abort can settle the wait before the asynchronous subscription resolves.\n // `cleanup()` had no handle to release in that case, so release the late handle here.\n if (settled) {\n releaseSubscription(unsubscribeEvents)\n return\n }\n unsubscribe = unsubscribeEvents\n void check()\n })\n .catch((error: unknown) => {\n if (settled) {\n console.error(\"[Sixb] Action run wait subscription failed after the wait settled:\", error)\n return\n }\n rejectWith(error)\n })\n })\n}\n\nfunction requireActionRunStorage(runtime: SixbRuntimeContext): ActionRunStorage {\n const actionRuns = runtime.storage.actionRuns\n if (!actionRuns) {\n throw new ActionRunError(\"[Sixb] Action run storage is not configured.\")\n }\n return actionRuns\n}\n"
12
11
  ],
13
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAO,MAAM,8BAA8B,MAAM;AAA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IAAI,GAAG,aAAa,KAAK,IAAI,IAAI,UAAU,CAClD;AAAA,IAEA,IAAI,QAAQ;AAAA,MACV,OAAO,iBAAiB,SAAS,SAAS,EAAE,MAAM,KAAK,CAAC;AAAA,IAC1D;AAAA,IAEA,QAAQ,OACL,UAAU,EAAE,OAAO,CAAC,oBAAoB,eAAe,EAAE,GAAG,CAAC,WAAW;AAAA,MACvE,IACE,OAAO,KACL,CAAC,WACE,MAAM,SAAS,sBAAsB,MAAM,SAAS,oBACrD,MAAM,QAAQ,UAAU,MAAM,KAClC,GACA;AAAA,QACK,MAAM;AAAA,MACb;AAAA,KACD,EACA,KAAK,CAAC,sBAAsB;AAAA,MAG3B,IAAI,SAAS;AAAA,QACX,oBAAoB,iBAAiB;AAAA,QACrC;AAAA,MACF;AAAA,MACA,cAAc;AAAA,MACT,MAAM;AAAA,KACZ,EACA,MAAM,CAAC,UAAmB;AAAA,MACzB,IAAI,SAAS;AAAA,QACX,QAAQ,MAAM,sEAAsE,KAAK;AAAA,QACzF;AAAA,MACF;AAAA,MACA,WAAW,KAAK;AAAA,KACjB;AAAA,GACJ;AAAA;AAGH,SAAS,wBAAuB,CAAC,SAA+C;AAAA,EAC9E,MAAM,aAAa,QAAQ,QAAQ;AAAA,EACnC,IAAI,CAAC,YAAY;AAAA,IACf,MAAM,IAAI,eAAe,8CAA8C;AAAA,EACzE;AAAA,EACA,OAAO;AAAA;",
13
+ "debugId": "FD3723432306E96364756E2164756E21",
15
14
  "names": []
16
15
  }
@@ -371,6 +371,69 @@ var SIXB_API_ROUTES = [
371
371
  path: "/api/logs",
372
372
  accessToken: true,
373
373
  agentApi: false
374
+ },
375
+ {
376
+ operationId: "getAiAccountingOverview",
377
+ method: "GET",
378
+ path: "/api/ai/accounting/overview",
379
+ accessToken: true,
380
+ agentApi: false
381
+ },
382
+ {
383
+ operationId: "listAiModelCalls",
384
+ method: "GET",
385
+ path: "/api/ai/model-calls",
386
+ accessToken: true,
387
+ agentApi: false
388
+ },
389
+ {
390
+ operationId: "listAiModelCallGroups",
391
+ method: "GET",
392
+ path: "/api/ai/model-call-groups",
393
+ accessToken: true,
394
+ agentApi: false
395
+ },
396
+ {
397
+ operationId: "listAiLimitPolicies",
398
+ method: "GET",
399
+ path: "/api/ai/limits",
400
+ accessToken: true,
401
+ agentApi: false
402
+ },
403
+ {
404
+ operationId: "getAiLimitStatus",
405
+ method: "GET",
406
+ path: "/api/ai/limits/status",
407
+ accessToken: true,
408
+ agentApi: false
409
+ },
410
+ {
411
+ operationId: "getAiLimitSubjectOptions",
412
+ method: "GET",
413
+ path: "/api/ai/limits/subjects",
414
+ accessToken: true,
415
+ agentApi: false
416
+ },
417
+ {
418
+ operationId: "createAiLimitPolicy",
419
+ method: "POST",
420
+ path: "/api/ai/limits",
421
+ accessToken: true,
422
+ agentApi: false
423
+ },
424
+ {
425
+ operationId: "updateAiLimitPolicy",
426
+ method: "PUT",
427
+ path: "/api/ai/limits/:limitId",
428
+ accessToken: true,
429
+ agentApi: false
430
+ },
431
+ {
432
+ operationId: "deleteAiLimitPolicy",
433
+ method: "DELETE",
434
+ path: "/api/ai/limits/:limitId",
435
+ accessToken: true,
436
+ agentApi: false
374
437
  }
375
438
  ];
376
439
  for (const route of SIXB_API_ROUTES) {
@@ -405,4 +468,4 @@ function normalizeRoutePath(pathname) {
405
468
 
406
469
  export { SIXB_API_ROUTES, pathSegmentsFor, matchesPathPattern, normalizeRoutePath };
407
470
 
408
- //# debugId=F7C55438F878304564756E2164756E21
471
+ //# debugId=41C2B1BD60423DB364756E2164756E21