@desplega.ai/agent-swarm 2.13.3 → 2.13.4

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 (289) hide show
  1. package/dist/acp-adapter-mr4temec.js +17 -0
  2. package/dist/{acp-targets-k8xs4tj8.js → acp-targets-zrk9k0n7.js} +10 -10
  3. package/dist/{actions-pg5fxjer.js → actions-acqqj9jn.js} +236 -26
  4. package/dist/{agent-fs-provision-vbk3fppw.js → agent-fs-provision-zmaykqnd.js} +4 -4
  5. package/dist/{amp-adapter-adbhxsz9.js → amp-adapter-a7ts8tmw.js} +3 -3
  6. package/dist/{app-b267ggx1.js → app-tmwa442h.js} +7 -7
  7. package/dist/{approval-notifications-evc1a9z5.js → approval-notifications-6psaaaye.js} +8 -8
  8. package/dist/{assistant-wgz2ab84.js → assistant-564v6emv.js} +24 -24
  9. package/dist/{boot-args-schema-6tpk28j4.js → boot-args-schema-n099e0f2.js} +1 -1
  10. package/dist/{boot-reembed-ankp369c.js → boot-reembed-chx66qfk.js} +1 -1
  11. package/dist/{boot-reembed-r1zyvefv.js → boot-reembed-epvg4fp9.js} +1 -1
  12. package/dist/{boot-scrub-sweep-cgb6r5bd.js → boot-scrub-sweep-dhkfp0a7.js} +2 -2
  13. package/dist/{boot-seeds-bjceqg7b.js → boot-seeds-m74fc07r.js} +4 -4
  14. package/dist/{boxd-hr8rsxzq.js → boxd-451q55ys.js} +1 -1
  15. package/dist/{claude-adapter-knztdnff.js → claude-adapter-hw63yj3j.js} +9 -9
  16. package/dist/{claude-managed-adapter-qwejzqkk.js → claude-managed-adapter-z5s7fx6p.js} +3 -3
  17. package/dist/{claude-managed-setup-0vgz4d1j.js → claude-managed-setup-wee1762m.js} +3 -3
  18. package/dist/{claude-sdk-session-c3g6dv0g.js → claude-sdk-session-cktyqkpk.js} +11 -11
  19. package/dist/{cli-7fa6yv98.js → cli-0fgvnb0x.js} +6 -6
  20. package/dist/{cli-2v4xxnx2.js → cli-0h8skzss.js} +1 -1
  21. package/dist/{cli-hhb8kbwd.js → cli-0p76my9q.js} +29 -14
  22. package/dist/{cli-fp65jdp2.js → cli-1kvcsd2f.js} +219 -155
  23. package/dist/{cli-wtffytm8.js → cli-1vmhnncj.js} +3 -3
  24. package/dist/{cli-268b3dgn.js → cli-29h5239w.js} +5 -5
  25. package/dist/{cli-8fj8yfmk.js → cli-2vp0z049.js} +1 -1
  26. package/dist/{cli-bh53ppqm.js → cli-3bxrrh53.js} +4 -4
  27. package/dist/{cli-61fzwtjk.js → cli-3tzmh38q.js} +9 -9
  28. package/dist/{cli-88np9va3.js → cli-3xqad83h.js} +1 -1
  29. package/dist/{cli-gc715jrc.js → cli-3zrwrnz7.js} +1 -1
  30. package/dist/{cli-dw43pnzp.js → cli-404am6f3.js} +7 -7
  31. package/dist/{cli-8pnawt98.js → cli-49aq3cyn.js} +4 -4
  32. package/dist/{cli-fbmgpt72.js → cli-4fpa0zns.js} +3 -3
  33. package/dist/{cli-kwm1bek7.js → cli-4pbwg7sn.js} +2 -2
  34. package/dist/{cli-djwt4mtn.js → cli-4q2c8rxw.js} +9 -9
  35. package/dist/{cli-3mf04tkh.js → cli-4vynxtrb.js} +1 -1
  36. package/dist/{cli-80d5g0fa.js → cli-5ashycw3.js} +3 -3
  37. package/dist/{cli-61p7ty8d.js → cli-5rgm8p39.js} +3 -3
  38. package/dist/{cli-r6xnchva.js → cli-5rxsb3wq.js} +6 -6
  39. package/dist/{cli-a21cwm89.js → cli-60dwk8tx.js} +3 -3
  40. package/dist/{cli-v1v49t36.js → cli-7by7vp6m.js} +2 -2
  41. package/dist/{cli-vgh5adn9.js → cli-7g3fg4gf.js} +7 -7
  42. package/dist/{cli-hxj888w3.js → cli-7gbff32z.js} +2 -2
  43. package/dist/{cli-q8aq48v1.js → cli-8b4rpnwj.js} +1 -1
  44. package/dist/{cli-xc8m5cjn.js → cli-8cas2xvp.js} +3 -3
  45. package/dist/{cli-1606qw3n.js → cli-904wk98s.js} +797 -369
  46. package/dist/{cli-h3drhntp.js → cli-93n305hm.js} +2 -2
  47. package/dist/{cli-1wew39p0.js → cli-944w9wb4.js} +20 -16
  48. package/dist/{cli-je587f74.js → cli-94gx6ze9.js} +1 -1
  49. package/dist/{cli-hpxcfvdm.js → cli-9ah37a8a.js} +6 -6
  50. package/dist/{cli-rfejbpe1.js → cli-akm6y2a8.js} +1 -1
  51. package/dist/{cli-f8rcvf2x.js → cli-azj9t1f9.js} +37 -2
  52. package/dist/{cli-ef590376.js → cli-bv4vvnmg.js} +3 -3
  53. package/dist/{cli-ppf9ap9n.js → cli-bzcwwebm.js} +1 -1
  54. package/dist/{cli-sy2ge2ye.js → cli-cq4am6vg.js} +2 -2
  55. package/dist/{cli-gxqwm3k3.js → cli-d5pc8ep0.js} +102 -8
  56. package/dist/{cli-hd2a204w.js → cli-ea7nz50q.js} +12 -12
  57. package/dist/{cli-zkbz8m2q.js → cli-fkpnx3vf.js} +1 -1
  58. package/dist/{cli-ya1cj689.js → cli-fw67mnyc.js} +1 -1
  59. package/dist/{cli-5basv0e7.js → cli-gkv0r2hq.js} +1 -1
  60. package/dist/{cli-ka4tqjzd.js → cli-gse7bp3z.js} +12 -10
  61. package/dist/{cli-v8rpjrnx.js → cli-gtj12v95.js} +1 -1
  62. package/dist/{cli-g4dhd3pr.js → cli-hdhpdrka.js} +6 -23
  63. package/dist/{cli-dq30fq3q.js → cli-hhtbandk.js} +2 -2
  64. package/dist/cli-hyqksecw.js +1907 -0
  65. package/dist/{cli-t25rq8mg.js → cli-ja450998.js} +40 -11
  66. package/dist/{cli-43dsqhcp.js → cli-jbrc98qb.js} +4 -4
  67. package/dist/{cli-8sayvj48.js → cli-jyhbvdga.js} +3 -3
  68. package/dist/{cli-55fqpd9q.js → cli-jzerrzgc.js} +8 -8
  69. package/dist/{cli-hv3820ez.js → cli-k0nebh10.js} +1 -1
  70. package/dist/{cli-aytna2fm.js → cli-ka48vpev.js} +5 -5
  71. package/dist/{cli-d2epqm0y.js → cli-kezzteka.js} +1 -1
  72. package/dist/{cli-grk77aen.js → cli-kj84fqxz.js} +2 -2
  73. package/dist/{cli-h0ewec3d.js → cli-kr0jpw9c.js} +1 -1
  74. package/dist/{cli-wsnradtk.js → cli-m1sns1da.js} +2 -2
  75. package/dist/{cli-7kv5d674.js → cli-n1kjs58m.js} +4 -4
  76. package/dist/{cli-syqcny89.js → cli-nc4pbwmp.js} +9 -9
  77. package/dist/{cli-9gmkw6xn.js → cli-p3knvk62.js} +48 -42
  78. package/dist/{cli-50whymxq.js → cli-p436yrzp.js} +2 -2
  79. package/dist/{cli-0j4qmc80.js → cli-phdzn699.js} +7 -7
  80. package/dist/{cli-1gnf5c7x.js → cli-pz1dp12c.js} +1 -1
  81. package/dist/{cli-nbawx3s0.js → cli-pz1nq5xm.js} +6 -6
  82. package/dist/{cli-4dyhzhpx.js → cli-qzz6tz8s.js} +1 -1
  83. package/dist/{cli-ea367bdn.js → cli-rmgvwcmy.js} +22 -22
  84. package/dist/{cli-mgr3gatr.js → cli-rv3y60bt.js} +4 -4
  85. package/dist/cli-s33bzmk0.js +27 -0
  86. package/dist/{cli-at67kvnp.js → cli-srktrbby.js} +1 -1
  87. package/dist/{cli-pzsedyb0.js → cli-t0jmkcah.js} +14 -14
  88. package/dist/{cli-eetzmsy5.js → cli-t9pzz2eq.js} +2 -2
  89. package/dist/{cli-w24741sm.js → cli-tr19nyn9.js} +4 -4
  90. package/dist/{cli-e4gx499y.js → cli-ts5yv7dn.js} +163 -86
  91. package/dist/{cli-czeh7x13.js → cli-tsc3pdfd.js} +4 -4
  92. package/dist/{cli-y0q92v4r.js → cli-tzw1jr2t.js} +2 -2
  93. package/dist/{cli-tjf1bh1v.js → cli-x2cem5vy.js} +6 -4
  94. package/dist/{cli-vx9acp12.js → cli-ybte1fqc.js} +1 -1
  95. package/dist/{cli-gkjw33x5.js → cli-ysv0k1we.js} +2 -2
  96. package/dist/{cli-vdfngx2g.js → cli-ywy8yz6t.js} +2 -2
  97. package/dist/{cli-cpkxh68d.js → cli-z1vam71h.js} +2 -2
  98. package/dist/{cli-8m6gqnf1.js → cli-zexwhj3f.js} +3 -3
  99. package/dist/{cli-snwz16eg.js → cli-zhwjdhjr.js} +2 -2
  100. package/dist/{cli-y754psdt.js → cli-zjdhrzm0.js} +4 -4
  101. package/dist/cli.js +19 -19
  102. package/dist/{codex-adapter-493vb8cv.js → codex-adapter-2fs2c0n6.js} +8 -8
  103. package/dist/{codex-hook-ej8hn6z5.js → codex-hook-jxjv6dy5.js} +1 -1
  104. package/dist/{codex-login-ven5cz5j.js → codex-login-ktfg1cxk.js} +1 -1
  105. package/dist/{codex-session-runner-ps5m4z1g.js → codex-session-runner-r55tmx4c.js} +9 -9
  106. package/dist/{commands-shktk0b8.js → commands-0mxdy9x8.js} +3 -3
  107. package/dist/{controller-wn3vd217.js → controller-g3vkfhr4.js} +4 -4
  108. package/dist/{controllers-connect-yft057ws.js → controllers-connect-4wdmncqt.js} +25 -25
  109. package/dist/core-gsvj5f3z.js +42 -0
  110. package/dist/{cursor-adapter-8fpm4dng.js → cursor-adapter-t9qb96q2.js} +2 -2
  111. package/dist/{db-0ezhdhz5.js → db-487vvyv9.js} +3 -3
  112. package/dist/{db-84pz2w5c.js → db-76p7w3gr.js} +2 -2
  113. package/dist/{devin-adapter-fs90ab4v.js → devin-adapter-3bp6rape.js} +1 -1
  114. package/dist/{dispatcher-h2rz69f6.js → dispatcher-64rp6w67.js} +22 -22
  115. package/dist/{docker-1h33jvh9.js → docker-a59g3ebm.js} +2 -2
  116. package/dist/{dsh-adapter-g9yqv09y.js → dsh-adapter-8abzqk5c.js} +2 -2
  117. package/dist/{e2b-y7e5kmzf.js → e2b-3ykbe805.js} +2 -2
  118. package/dist/{e2b-jnk0yeva.js → e2b-dc8f6ctq.js} +2 -2
  119. package/dist/{easter-egg-3d-m41ad78v.js → easter-egg-3d-jrrwyf55.js} +1 -1
  120. package/dist/{embedding-space-yam9zwzj.js → embedding-space-001hhhpk.js} +6 -6
  121. package/dist/{embeddings-g2be0y8q.js → embeddings-esj19cnw.js} +1 -1
  122. package/dist/{event-bus-08t2b4y2.js → event-bus-7gbsr0g4.js} +1 -1
  123. package/dist/{execute-hhdejgzf.js → execute-301hkxqg.js} +1 -1
  124. package/dist/{external-channel-kjt2yzfj.js → external-channel-w10e2j05.js} +2 -2
  125. package/dist/fx-adapter-4sjrbdne.js +20 -0
  126. package/dist/grok-adapter-3a0ezfee.js +20 -0
  127. package/dist/handlers-ef3k11hb.js +41 -0
  128. package/dist/{heartbeat-2e5jdexj.js → heartbeat-tbrj7vhq.js} +25 -25
  129. package/dist/{hook-acg9saz7.js → hook-3am1sq68.js} +6 -6
  130. package/dist/{hook-34s8cmgn.js → hook-tx917rqw.js} +8 -8
  131. package/dist/{http-ra2zr2f8.js → http-3rmemtqy.js} +335 -1829
  132. package/dist/{index-mbpxhc4w.js → index-126v2d0t.js} +1 -4
  133. package/dist/{index-2z1z7qx6.js → index-2jw11t8s.js} +26 -26
  134. package/dist/{index-9q42cr54.js → index-aetfyx6p.js} +1 -1
  135. package/dist/index-e6bq0exk.js +42 -0
  136. package/dist/{index-9r4j0a60.js → index-gfnq66t1.js} +223 -25
  137. package/dist/index-hf2k1vge.js +39 -0
  138. package/dist/{index-93bw5wds.js → index-s7xtvc0f.js} +1 -1
  139. package/dist/index-taxmejj3.js +44 -0
  140. package/dist/{k8s-8326q0rq.js → k8s-36gfn847.js} +2 -2
  141. package/dist/{keepalive-vjnnqbkm.js → keepalive-9px3t7qj.js} +5 -5
  142. package/dist/lead-5vt6f174.js +83 -0
  143. package/dist/{maintenance-px2g599e.js → maintenance-vwqjwst6.js} +1 -1
  144. package/dist/{oauth-refresh-sweep-nkykf09m.js → oauth-refresh-sweep-yqry3wn4.js} +4 -4
  145. package/dist/{object-webhooks-gt9xnq21.js → object-webhooks-8s1wtths.js} +7 -7
  146. package/dist/{onboard-1f134p65.js → onboard-hb8czx0p.js} +7 -7
  147. package/dist/{opencode-adapter-94976yab.js → opencode-adapter-djd6m6dk.js} +8 -8
  148. package/dist/{otel-impl-5d4p2fqs.js → otel-impl-2ymwyczz.js} +2 -2
  149. package/dist/{pending-vkk0vx6n.js → pending-nxavtvx7.js} +23 -23
  150. package/dist/{pi-mono-adapter-cyzdv5er.js → pi-mono-adapter-d2cpmcy4.js} +12 -12
  151. package/dist/{pricing-refresh-jtmjwss9.js → pricing-refresh-1yz8jkqv.js} +2 -2
  152. package/dist/{rbac-roles-1fvmdyeb.js → rbac-roles-7s6m31xw.js} +6 -4
  153. package/dist/{rbac-roles-yd1fgpsn.js → rbac-roles-dbpx0x9v.js} +3 -3
  154. package/dist/{render-v2-kb5s3vx4.js → render-v2-7y20rjrn.js} +7 -7
  155. package/dist/{resume-z1vs44n5.js → resume-wz546x47.js} +10 -10
  156. package/dist/{runtime-gk6ct7r7.js → runtime-cb5bd9tz.js} +1 -1
  157. package/dist/{session-access-nz6nre4d.js → session-access-4vcft8kq.js} +5 -5
  158. package/dist/{session-source-backfill-wb60zjkd.js → session-source-backfill-57b50tpw.js} +3 -3
  159. package/dist/{setup-2x8g8j4s.js → setup-e1tevjyj.js} +1 -1
  160. package/dist/thread-buffer-686pa1p1.js +42 -0
  161. package/dist/{tree-visibility-ts3z30kw.js → tree-visibility-07wf1nct.js} +2 -2
  162. package/dist/{user-merge-jobs-zetg26e0.js → user-merge-jobs-n20qpv6s.js} +3 -3
  163. package/dist/{virtual-modules-674fka8x.js → virtual-modules-6fxmn1yv.js} +3 -3
  164. package/dist/{work-objects-w52yyjxm.js → work-objects-eg7y48pe.js} +25 -25
  165. package/dist/worker-4vp616ms.js +83 -0
  166. package/dist/{worker-follow-up-dyfxyjbj.js → worker-follow-up-jnvnnf2b.js} +22 -22
  167. package/dist/{x-asbrnafg.js → x-d27jj7z7.js} +2 -2
  168. package/openapi.json +475 -28
  169. package/package.json +2 -2
  170. package/src/be/db/approvals.ts +2 -0
  171. package/src/be/db/runtime.ts +5 -0
  172. package/src/be/db/script-run-sources.ts +17 -0
  173. package/src/be/db-retention.ts +1 -1
  174. package/src/be/db.ts +71 -62
  175. package/src/be/design-system.ts +63 -0
  176. package/src/be/migrations/342_script_run_sources.sql +20 -0
  177. package/src/be/migrations/runner.ts +8 -0
  178. package/src/be/migrations/script-run-sources.ts +51 -0
  179. package/src/be/rbac-roles.ts +2 -0
  180. package/src/be/scripts/typecheck.ts +4 -2
  181. package/src/be/seed-scripts/catalog/design-system-seed.ts +158 -0
  182. package/src/be/seed-scripts/index.ts +9 -0
  183. package/src/be/swarm-config-guard.ts +21 -1
  184. package/src/commands/onboard/agent-fs-version.ts +1 -1
  185. package/src/heartbeat/heartbeat.ts +18 -4
  186. package/src/http/all-routes.ts +1 -0
  187. package/src/http/approval-chat-answer.ts +99 -0
  188. package/src/http/approval-requests.ts +280 -225
  189. package/src/http/design-system.ts +103 -0
  190. package/src/http/index.ts +10 -6
  191. package/src/http/pages-public.ts +25 -10
  192. package/src/http/pages.ts +17 -0
  193. package/src/http/person-responder.ts +28 -0
  194. package/src/integrations/chat-sdk/adapters.ts +33 -3
  195. package/src/integrations/chat-sdk/inbound.ts +6 -18
  196. package/src/integrations/chat-sdk/mentions.ts +188 -0
  197. package/src/integrations/chat-sdk/outbound.ts +20 -3
  198. package/src/integrations/chat-sdk/router.ts +8 -0
  199. package/src/integrations/chat-sdk/telegram-thread.ts +12 -0
  200. package/src/jira/adf.ts +35 -9
  201. package/src/kv-reserved-namespaces.ts +5 -0
  202. package/src/pages/page-head.ts +11 -1
  203. package/src/providers/amp-adapter.ts +1 -1
  204. package/src/providers/dsh-adapter.ts +48 -13
  205. package/src/rbac/legacy-policy.ts +4 -0
  206. package/src/rbac/permissions.ts +8 -0
  207. package/src/scheduler/index.ts +1 -0
  208. package/src/scheduler/scheduler.test.ts +32 -1
  209. package/src/scheduler/scheduler.ts +24 -1
  210. package/src/script-workflows/executor.ts +6 -0
  211. package/src/script-workflows/supervisor.ts +2 -1
  212. package/src/scripts-runtime/sdk-allowlist.ts +2 -0
  213. package/src/scripts-runtime/swarm-sdk.ts +12 -23
  214. package/src/scripts-runtime/types/stdlib.d.ts +4 -1
  215. package/src/scripts-runtime/types/swarm-sdk.d.ts +4 -1
  216. package/src/server.ts +2 -0
  217. package/src/slack/actions.ts +3 -0
  218. package/src/slack/approval-actions.ts +148 -0
  219. package/src/slack/approval-buttons.ts +28 -0
  220. package/src/tests/chat-sdk-mentions.test.ts +183 -0
  221. package/src/tests/create-page-tool.test.ts +5 -0
  222. package/src/tests/dsh-adapter.test.ts +53 -1
  223. package/src/tests/fixtures/compiled-source-schema-boot.ts +24 -0
  224. package/src/tests/fixtures/secret-corpus.ts +43 -1
  225. package/src/tests/heartbeat-stall-thresholds.test.ts +174 -0
  226. package/src/tests/jira-adf.test.ts +42 -2
  227. package/src/tests/merge-gate-detect-changes.test.ts +208 -16
  228. package/src/tests/migration-342-script-run-sources.test.ts +196 -0
  229. package/src/tests/migration-bunfs-compat.test.ts +129 -9
  230. package/src/tests/rbac-e2e-helpers.test.ts +10 -4
  231. package/src/tests/rbac-e2e-helpers.ts +13 -4
  232. package/src/tests/rbac-roles.test.ts +2 -0
  233. package/src/tests/runtime-e2b-pools.test.ts +7 -1
  234. package/src/tests/schedule-target-type.test.ts +4 -1
  235. package/src/tests/script-connections.test.ts +2 -0
  236. package/src/tests/script-runs-retention.test.ts +43 -16
  237. package/src/tests/script-workflows-runtime-e2e.test.ts +56 -22
  238. package/src/tests/scripts-http.test.ts +9 -3
  239. package/src/tests/sdk-allowlist.test.ts +26 -13
  240. package/src/tests/sdk-store-progress-skipped.test.ts +12 -5
  241. package/src/tests/secret-rules.test.ts +34 -0
  242. package/src/tests/secret-scrub-gate.test.ts +7 -0
  243. package/src/tests/secret-scrubber.test.ts +62 -2
  244. package/src/tests/seed-scripts.test.ts +2 -2
  245. package/src/tests/system-one-hosts-ui-mirror.test.ts +1 -0
  246. package/src/tests/vcs-azure-devops.test.ts +10 -0
  247. package/src/tests/vcs-provider.test.ts +8 -0
  248. package/src/themes/design-system.ts +163 -0
  249. package/src/themes/page-theme.ts +28 -19
  250. package/src/tools/chat-post.ts +7 -3
  251. package/src/tools/create-page.ts +3 -0
  252. package/src/tools/design-system.ts +102 -0
  253. package/src/tools/mcp-servers/mcp-server-get.ts +1 -1
  254. package/src/tools/mcp-servers/mcp-server-list.ts +1 -1
  255. package/src/tools/register-chat-channel.ts +11 -2
  256. package/src/tools/skills/skill-get-file.ts +1 -1
  257. package/src/tools/skills/skill-get.ts +1 -1
  258. package/src/tools/skills/skill-list.ts +1 -1
  259. package/src/tools/skills/skill-search.ts +1 -1
  260. package/src/tools/utils.ts +49 -4
  261. package/src/tools/workflows/get-workflow-run.ts +1 -1
  262. package/src/tools/workflows/get-workflow.ts +1 -1
  263. package/src/tools/workflows/list-workflow-runs.ts +1 -1
  264. package/src/tools/workflows/list-workflows.ts +1 -1
  265. package/src/types.ts +65 -0
  266. package/src/utils/secret-rules.generated.ts +149 -149
  267. package/src/utils/secret-scrubber.ts +111 -5
  268. package/src/vcs/azure-devops.ts +22 -1
  269. package/src/vcs/index.ts +3 -1
  270. package/src/workflows/approval-inline.ts +122 -0
  271. package/src/workflows/approval-notifications.ts +7 -2
  272. package/src/workflows/engine.ts +6 -5
  273. package/src/workflows/executors/agent-task.ts +14 -0
  274. package/src/workflows/executors/system-one-providers.ts +23 -0
  275. package/templates/skills/pages/content.md +34 -8
  276. package/templates/skills/swarm-docs/content.md +5 -0
  277. package/templates/skills/workflow-iterate/content.md +1 -1
  278. package/dist/acp-adapter-t2q6nsqv.js +0 -17
  279. package/dist/cli-kh973792.js +0 -98
  280. package/dist/core-nheayfgm.js +0 -42
  281. package/dist/fx-adapter-8g7xsp8q.js +0 -20
  282. package/dist/grok-adapter-ztk2zkz1.js +0 -20
  283. package/dist/handlers-9ywssz71.js +0 -41
  284. package/dist/index-6mgbdtv1.js +0 -44
  285. package/dist/index-hqdsn2t2.js +0 -39
  286. package/dist/index-st231bqv.js +0 -40
  287. package/dist/lead-mk0xkth2.js +0 -82
  288. package/dist/thread-buffer-d50rqpev.js +0 -42
  289. package/dist/worker-662x1vse.js +0 -82
@@ -3,7 +3,7 @@ import {
3
3
  ampPinCatalogError,
4
4
  ampModelError,
5
5
  init_amp_models
6
- } from "./cli-rfejbpe1.js";
6
+ } from "./cli-akm6y2a8.js";
7
7
  import {
8
8
  ALL_TOOLS,
9
9
  init_tool_config
@@ -14,7 +14,7 @@ import {
14
14
  applyProviderQuotaReport,
15
15
  scrubProviderQuotaReport,
16
16
  init_provider_account_telemetry
17
- } from "./cli-ya1cj689.js";
17
+ } from "./cli-fw67mnyc.js";
18
18
  import {
19
19
  CODEX_AUTH_FAILURE_BENCH_THRESHOLD,
20
20
  CODEX_AUTH_FAILURE_BENCH_MS,
@@ -42,11 +42,11 @@ import {
42
42
  init_identity_field_budget,
43
43
  contentSha256,
44
44
  init_profile_sync
45
- } from "./cli-aytna2fm.js";
45
+ } from "./cli-ka48vpev.js";
46
46
  import {
47
47
  isSlackConfigured,
48
- init_config4
49
- } from "./cli-eetzmsy5.js";
48
+ init_config5
49
+ } from "./cli-t9pzz2eq.js";
50
50
  import {
51
51
  isSteeringEnabled2,
52
52
  init_steering_enabled
@@ -70,7 +70,7 @@ import {
70
70
  splitCredentialPool,
71
71
  selectCredential,
72
72
  init_credentials2
73
- } from "./cli-5basv0e7.js";
73
+ } from "./cli-gkv0r2hq.js";
74
74
  import {
75
75
  registerTemplate,
76
76
  getAllTemplateDefinitions,
@@ -120,12 +120,12 @@ import {
120
120
  SUPERSEDED_WORKFLOW_TASK_REASON,
121
121
  PageThemeTokensSchema,
122
122
  init_types5
123
- } from "./cli-f8rcvf2x.js";
123
+ } from "./cli-azj9t1f9.js";
124
124
  import {
125
125
  setRuntimeModelCatalog,
126
126
  runtimeHarnessSections,
127
127
  init_runtime_model_catalog
128
- } from "./cli-q8aq48v1.js";
128
+ } from "./cli-8b4rpnwj.js";
129
129
  import {
130
130
  init_zod
131
131
  } from "./cli-96234j5w.js";
@@ -153,7 +153,7 @@ import {
153
153
  import {
154
154
  init_package,
155
155
  package_default
156
- } from "./cli-sy2ge2ye.js";
156
+ } from "./cli-cq4am6vg.js";
157
157
  import {
158
158
  getNodeEnv,
159
159
  init_node_env
@@ -184,7 +184,7 @@ import {
184
184
  registerVolatileSecret,
185
185
  registerSensitiveKeyName,
186
186
  init_secret_scrubber
187
- } from "./cli-fp65jdp2.js";
187
+ } from "./cli-1kvcsd2f.js";
188
188
  import {
189
189
  __toCommonJS,
190
190
  __commonJS,
@@ -1623,8 +1623,42 @@ var init_db_client = __esm(() => {
1623
1623
  };
1624
1624
  });
1625
1625
 
1626
- // src/be/migrations/runner.ts
1626
+ // src/be/migrations/script-run-sources.ts
1627
1627
  import { createHash } from "node:crypto";
1628
+ function hasScriptRunSourceSchema(db) {
1629
+ const schema = db.prepare(`SELECT
1630
+ EXISTS (SELECT 1 FROM pragma_table_info('script_runs') WHERE name = 'sourceHash')
1631
+ AND (SELECT count(*) FROM pragma_table_info('script_run_sources')
1632
+ WHERE name IN ('hash', 'source')) = 2 AS ready`).get();
1633
+ return Boolean(schema?.ready);
1634
+ }
1635
+ function assertScriptRunSourceSchema(db) {
1636
+ if (!hasScriptRunSourceSchema(db)) {
1637
+ throw new Error("[migrations] Required script-run source schema is missing. " + "Ensure MIGRATIONS_DIR includes 342_script_run_sources.sql and run migrations before starting the API.");
1638
+ }
1639
+ }
1640
+ function backfillScriptRunSources(db) {
1641
+ if (!hasScriptRunSourceSchema(db))
1642
+ return;
1643
+ const pending = db.prepare(`SELECT id, source FROM script_runs WHERE sourceHash IS NULL LIMIT ${BATCH_SIZE}`);
1644
+ const insert = db.prepare("INSERT OR IGNORE INTO script_run_sources (hash, source) VALUES (?, ?)");
1645
+ const update = db.prepare("UPDATE script_runs SET sourceHash = ?, source = '' WHERE id = ?");
1646
+ const batch = db.transaction(() => {
1647
+ const rows = pending.all();
1648
+ for (const row of rows) {
1649
+ const hash = createHash("sha256").update(row.source, "utf8").digest("hex");
1650
+ insert.run(hash, row.source);
1651
+ update.run(hash, row.id);
1652
+ }
1653
+ return rows.length;
1654
+ });
1655
+ while (batch.immediate() === BATCH_SIZE) {}
1656
+ }
1657
+ var BATCH_SIZE = 25;
1658
+ var init_script_run_sources = () => {};
1659
+
1660
+ // src/be/migrations/runner.ts
1661
+ import { createHash as createHash2 } from "node:crypto";
1628
1662
  import { readdirSync, readFileSync as readFileSync2 } from "node:fs";
1629
1663
  import { join } from "node:path";
1630
1664
  function repairRenumberedModelTiers(db, migrations) {
@@ -1692,6 +1726,7 @@ function runMigrations(db) {
1692
1726
  const migrationsDir = resolveMigrationsDir(import.meta.dir);
1693
1727
  if (!migrationsDir) {
1694
1728
  assertNotEmptyDatabase(db, "no migrations directory could be located (see the preceding [migrations] warning)");
1729
+ backfillScriptRunSources(db);
1695
1730
  return;
1696
1731
  }
1697
1732
  const files = readdirSync(migrationsDir).filter((f) => f.endsWith(".sql")).sort();
@@ -1699,11 +1734,12 @@ function runMigrations(db) {
1699
1734
  const version = parseInt(file.split("_")[0] ?? "0", 10);
1700
1735
  const name = file.replace(".sql", "");
1701
1736
  const sql = readFileSync2(join(migrationsDir, file), "utf-8");
1702
- const checksum = createHash("sha256").update(sql).digest("hex");
1737
+ const checksum = createHash2("sha256").update(sql).digest("hex");
1703
1738
  return { version, name, sql, checksum };
1704
1739
  });
1705
1740
  if (migrations.length === 0) {
1706
1741
  assertNotEmptyDatabase(db, `no .sql migration files found in ${migrationsDir}`);
1742
+ backfillScriptRunSources(db);
1707
1743
  return;
1708
1744
  }
1709
1745
  repairRenumberedModelTiers(db, migrations);
@@ -1761,9 +1797,11 @@ function runMigrations(db) {
1761
1797
  console.log(`[migrations] Applied: ${migration.name} (${elapsed}ms)`);
1762
1798
  }
1763
1799
  db.run("PRAGMA foreign_keys = ON");
1800
+ backfillScriptRunSources(db);
1764
1801
  }
1765
1802
  var BASELINE_TABLES, SEED_APPLIED_AS_090_CHECKSUM = "8ca4a05263b42d115b419f468bf5113caa5b7ee4363177568897513549224b01", BUNFS_PREFIX = "/$bunfs/";
1766
1803
  var init_runner = __esm(() => {
1804
+ init_script_run_sources();
1767
1805
  BASELINE_TABLES = [
1768
1806
  "agents",
1769
1807
  "channels",
@@ -2425,6 +2463,8 @@ function initDb2(dbPath = "./agent-swarm-db.sqlite") {
2425
2463
  }
2426
2464
  function bootOpenedDb(database, dbPath, resolvePromptTemplate, autoEncryptLegacyPlaintextSecrets) {
2427
2465
  dbCreatedThisBoot = database.prepare("SELECT 1 FROM sqlite_master LIMIT 1").get() === null;
2466
+ if (dbCreatedThisBoot)
2467
+ database.run("PRAGMA auto_vacuum = INCREMENTAL;");
2428
2468
  database.run("PRAGMA journal_mode = WAL;");
2429
2469
  database.run("PRAGMA busy_timeout = 5000;");
2430
2470
  database.run("PRAGMA foreign_keys = ON;");
@@ -2435,6 +2475,7 @@ function bootOpenedDb(database, dbPath, resolvePromptTemplate, autoEncryptLegacy
2435
2475
  loadSqliteVec(database);
2436
2476
  try {
2437
2477
  runMigrations(database);
2478
+ assertScriptRunSourceSchema(database);
2438
2479
  } catch (error) {
2439
2480
  db = null;
2440
2481
  try {
@@ -2593,6 +2634,7 @@ var init_runtime2 = __esm(() => {
2593
2634
  init_crypto();
2594
2635
  init_db_client();
2595
2636
  init_runner();
2637
+ init_script_run_sources();
2596
2638
  init_oauth_encryption_backfill();
2597
2639
  init_sealed_json();
2598
2640
  VERSIONABLE_FIELDS = VersionableFieldSchema.options;
@@ -5030,7 +5072,7 @@ var init_company_profile = __esm(() => {
5030
5072
  });
5031
5073
 
5032
5074
  // src/telemetry-context.ts
5033
- import { createHash as createHash2, randomBytes as randomBytes3 } from "node:crypto";
5075
+ import { createHash as createHash3, randomBytes as randomBytes3 } from "node:crypto";
5034
5076
  function mapTriggerSurface(source) {
5035
5077
  return TRIGGER_SURFACES.includes(source ?? "") ? source : "other";
5036
5078
  }
@@ -5055,7 +5097,7 @@ function emailDomain(email) {
5055
5097
  return validOrgDomain(value.slice(at + 1));
5056
5098
  }
5057
5099
  function userRef(installationId, userId) {
5058
- const digest = createHash2("sha256").update(`${installationId}:${userId}`).digest("hex");
5100
+ const digest = createHash3("sha256").update(`${installationId}:${userId}`).digest("hex");
5059
5101
  return `u_${digest.slice(0, 32)}`;
5060
5102
  }
5061
5103
  function resolveDeployment(flags) {
@@ -5588,7 +5630,7 @@ function emitIntegrationConnected(type, providerSlug, firstOfType) {
5588
5630
  var DEFAULT_TELEMETRY_ENDPOINT = "https://proxy.desplega.sh/v1/events", TELEMETRY_ENDPOINT, PRODUCT = "agent-swarm", TIMEOUT_MS = 5000, installationId = null, installedAt = null, ingestObserver = null, cachedOrgId, cachedOrgDomain, roleResolver = null, functionResolver = null, identityReloader = null, lastIdentityLoadAt = 0, source = "unknown", cachedIsCloud = false, cachedIsE2b = false, cachedHasEmbedding = false, cachedHasSlackChannel = false, cachedHasEmailChannel = false, cachedInstallMethod = "manual", cachedInstallPreset, CLOUD_HOST_EXACT, CLOUD_HOST_SUFFIXES, KNOWN_INSTALL_METHODS, KNOWN_INSTALL_PRESETS, KNOWN_INTEGRATION_TYPES, INTEGRATION_PROVIDERS, ORG_IDENTITY_RETRY_MS = 60000, ORG_IDENTITY_REFRESH_MS, cachedIsGitCheckout, telemetry;
5589
5631
  var init_telemetry = __esm(() => {
5590
5632
  init_package();
5591
- init_config4();
5633
+ init_config5();
5592
5634
  init_telemetry_context();
5593
5635
  init_env_flag();
5594
5636
  init_node_env();
@@ -5702,7 +5744,7 @@ var init_telemetry = __esm(() => {
5702
5744
  // src/telemetry-identity.ts
5703
5745
  async function loadUserRole(userId) {
5704
5746
  try {
5705
- const { getUserGrant } = await import("./rbac-roles-yd1fgpsn.js");
5747
+ const { getUserGrant } = await import("./rbac-roles-dbpx0x9v.js");
5706
5748
  const grant = await getUserGrant(userId);
5707
5749
  const role = grant.grantsAll ? "admin" : "member";
5708
5750
  const user = await getDbClient2().get("SELECT json_extract(metadata, '$.jobFunction') AS jobFunction FROM users WHERE id = ? AND json_valid(metadata)", [userId]);
@@ -6590,7 +6632,7 @@ function scheduleApprovalCardUpdates(approvals) {
6590
6632
  const posted = approvals.filter((approval) => approval.notificationChannels?.some((n) => n.channel === "slack" && n.messageTs));
6591
6633
  if (posted.length === 0)
6592
6634
  return;
6593
- getDbClient2().afterCommit(() => import("./approval-notifications-evc1a9z5.js").then(({ updateResolvedApprovalCards }) => updateResolvedApprovalCards(posted)).catch((err) => console.error("[HITL] Slack card update not run:", scrubSecrets(err instanceof Error ? err.message : String(err)))));
6635
+ getDbClient2().afterCommit(() => import("./approval-notifications-6psaaaye.js").then(({ updateResolvedApprovalCards }) => updateResolvedApprovalCards(posted)).catch((err) => console.error("[HITL] Slack card update not run:", scrubSecrets(err instanceof Error ? err.message : String(err)))));
6594
6636
  }
6595
6637
  var init_approvals = __esm(() => {
6596
6638
  init_secret_scrubber();
@@ -6964,6 +7006,8 @@ var init_legacy_policy = __esm(() => {
6964
7006
  "comb.presence": operatorOrUser,
6965
7007
  "fs.join.own": anyAuthenticated,
6966
7008
  "page.delete.any": leadOrResourceOwner,
7009
+ "design-system.write": anyAuthenticated,
7010
+ "page.launch": anyAuthenticated,
6967
7011
  "objects.read": operatorOrUser,
6968
7012
  "objects.write": operatorOrUser,
6969
7013
  "app.manage": anyAuthenticated,
@@ -7338,6 +7382,14 @@ var init_permissions = __esm(() => {
7338
7382
  description: "Delete a page the caller does not own.",
7339
7383
  namespace: "page"
7340
7384
  },
7385
+ "design-system.write": {
7386
+ description: "Set or decline the org design system that restyles every page.",
7387
+ namespace: "page"
7388
+ },
7389
+ "page.launch": {
7390
+ description: "Open a public or authed page: mint its page-session cookie.",
7391
+ namespace: "page"
7392
+ },
7341
7393
  "objects.read": {
7342
7394
  description: "Read a board or sheet on the swarm's shared agent-fs drive through the object routes.",
7343
7395
  namespace: "objects"
@@ -10891,6 +10943,22 @@ var init_page_theme_tokens = __esm(() => {
10891
10943
  init_types5();
10892
10944
  });
10893
10945
 
10946
+ // src/be/db/script-run-sources.ts
10947
+ async function storeScriptRunSource(source) {
10948
+ const hash = computeContentHash2(source);
10949
+ await getDbClient2().run("INSERT OR IGNORE INTO script_run_sources (hash, source) VALUES (?, ?)", [
10950
+ hash,
10951
+ source
10952
+ ]);
10953
+ return hash;
10954
+ }
10955
+ var SCRIPT_RUN_SELECT = `SELECT r.*, s.source AS storedSource FROM script_runs r
10956
+ LEFT JOIN script_run_sources s ON s.hash = r.sourceHash`;
10957
+ var init_script_run_sources2 = __esm(() => {
10958
+ init_context_versions();
10959
+ init_runtime2();
10960
+ });
10961
+
10894
10962
  // src/be/db/session-log-reasoning.ts
10895
10963
  async function classifyClaudeUpdate(tx, sessionId, messageId, toolLineNumber) {
10896
10964
  const since = new Date(Date.now() - 10 * 60000).toISOString();
@@ -12446,7 +12514,7 @@ async function completeTask2(id, output, options) {
12446
12514
  });
12447
12515
  } catch {}
12448
12516
  getDbClient2().afterCommit(() => {
12449
- import("./event-bus-08t2b4y2.js").then(({ workflowEventBus }) => {
12517
+ import("./event-bus-7gbsr0g4.js").then(({ workflowEventBus }) => {
12450
12518
  workflowEventBus.emit("task.completed", {
12451
12519
  taskId: id,
12452
12520
  previousStatus: oldTask.status,
@@ -12502,7 +12570,7 @@ async function failTask2(id, reason, opts = {}) {
12502
12570
  });
12503
12571
  } catch {}
12504
12572
  getDbClient2().afterCommit(() => {
12505
- import("./event-bus-08t2b4y2.js").then(({ workflowEventBus }) => {
12573
+ import("./event-bus-7gbsr0g4.js").then(({ workflowEventBus }) => {
12506
12574
  workflowEventBus.emit("task.failed", {
12507
12575
  taskId: id,
12508
12576
  previousStatus: oldTask.status,
@@ -12585,7 +12653,7 @@ async function cancelTask2(id, reason, options = {}) {
12585
12653
  });
12586
12654
  } catch {}
12587
12655
  getDbClient2().afterCommit(() => {
12588
- import("./event-bus-08t2b4y2.js").then(({ workflowEventBus }) => {
12656
+ import("./event-bus-7gbsr0g4.js").then(({ workflowEventBus }) => {
12589
12657
  workflowEventBus.emit("task.cancelled", {
12590
12658
  taskId: id,
12591
12659
  previousStatus: oldTask.status,
@@ -12598,7 +12666,7 @@ async function cancelTask2(id, reason, options = {}) {
12598
12666
  if (row.source === "schedule" && row.taskType === "deferred" && row.parentTaskId) {
12599
12667
  getDbClient2().afterCommit(async () => {
12600
12668
  try {
12601
- const { createWorkerTaskFollowUp } = await import("./worker-follow-up-dyfxyjbj.js");
12669
+ const { createWorkerTaskFollowUp } = await import("./worker-follow-up-jnvnnf2b.js");
12602
12670
  await createWorkerTaskFollowUp({
12603
12671
  task: rowToAgentTask(row),
12604
12672
  status: "failed",
@@ -12647,7 +12715,7 @@ async function skipTask2(id, reason) {
12647
12715
  });
12648
12716
  } catch {}
12649
12717
  getDbClient2().afterCommit(() => {
12650
- import("./event-bus-08t2b4y2.js").then(({ workflowEventBus }) => {
12718
+ import("./event-bus-7gbsr0g4.js").then(({ workflowEventBus }) => {
12651
12719
  workflowEventBus.emit("task.skipped", {
12652
12720
  taskId: id,
12653
12721
  failureReason: skipReason,
@@ -12699,7 +12767,7 @@ async function supersedeTask2(id, args) {
12699
12767
  });
12700
12768
  } catch {}
12701
12769
  getDbClient2().afterCommit(() => {
12702
- import("./event-bus-08t2b4y2.js").then(({ workflowEventBus }) => {
12770
+ import("./event-bus-7gbsr0g4.js").then(({ workflowEventBus }) => {
12703
12771
  workflowEventBus.emit("task.superseded", {
12704
12772
  taskId: id,
12705
12773
  reason: args.reason,
@@ -12934,7 +13002,7 @@ async function updateTaskProgress2(id, progress) {
12934
13002
  });
12935
13003
  } catch {}
12936
13004
  getDbClient2().afterCommit(() => {
12937
- import("./event-bus-08t2b4y2.js").then(({ workflowEventBus }) => {
13005
+ import("./event-bus-7gbsr0g4.js").then(({ workflowEventBus }) => {
12938
13006
  workflowEventBus.emit("task.progress", {
12939
13007
  taskId: id,
12940
13008
  progress: scrubbedProgress,
@@ -13503,7 +13571,7 @@ function emitRunFinished(runId, workflowId, status) {
13503
13571
  }
13504
13572
  function emitBusEventAfterCommit(event, payload) {
13505
13573
  getDbClient2().afterCommit(() => {
13506
- import("./event-bus-08t2b4y2.js").then(({ workflowEventBus }) => {
13574
+ import("./event-bus-7gbsr0g4.js").then(({ workflowEventBus }) => {
13507
13575
  workflowEventBus.emit(event, payload);
13508
13576
  }).catch((err) => console.error(`[db] ${event} event not emitted:`, scrubSecrets(err instanceof Error ? err.message : String(err))));
13509
13577
  });
@@ -14187,7 +14255,7 @@ function validateConfigEntry(entry) {
14187
14255
  function validateExportToEnv(key, exportToEnv) {
14188
14256
  return exportToEnv === true && isEnvExportRestrictedKey(key) ? envExportRestrictedError(key) : null;
14189
14257
  }
14190
- var TEAMS_SDK_ENV_KEYS, RESERVED_KEYS, API_ONLY_CONFIG_KEYS, INTERNAL_CONFIG_KEYS, HUMAN_ONLY_CONFIG_KEYS, BOOLEAN_LITERALS, MAX_DB_RETENTION_DAYS = 1e6, DB_RETENTION_TUNING_BOUNDS, APPS_JSON_COLUMN_MAX_BYTES_BOUNDS, CODEX_OAUTH_KEEP_WARM_MAX_AGE_HOURS_BOUNDS, SYSTEM_ONE_DEFAULT_PROVIDER_OPTIONS, SYSTEM_ONE_EXTRACT_DEFAULT_PROVIDER_OPTIONS, validateControllerTokenTtlDays, validateControllerGraceSec, VALIDATED_KEYS;
14258
+ var TEAMS_SDK_ENV_KEYS, RESERVED_KEYS, API_ONLY_CONFIG_KEYS, INTERNAL_CONFIG_KEYS, HUMAN_ONLY_CONFIG_KEYS, BOOLEAN_LITERALS, MAX_DB_RETENTION_DAYS = 1e6, DB_RETENTION_TUNING_BOUNDS, APPS_JSON_COLUMN_MAX_BYTES_BOUNDS, CODEX_OAUTH_KEEP_WARM_MAX_AGE_HOURS_BOUNDS, SCHEDULER_INTERVAL_MS_BOUNDS, SYSTEM_ONE_DEFAULT_PROVIDER_OPTIONS, SYSTEM_ONE_EXTRACT_DEFAULT_PROVIDER_OPTIONS, validateControllerTokenTtlDays, validateControllerGraceSec, VALIDATED_KEYS;
14191
14259
  var init_swarm_config_guard = __esm(() => {
14192
14260
  init_schema();
14193
14261
  init_telemetry_ranking();
@@ -14245,6 +14313,7 @@ var init_swarm_config_guard = __esm(() => {
14245
14313
  };
14246
14314
  APPS_JSON_COLUMN_MAX_BYTES_BOUNDS = { min: 1024, max: 16777216 };
14247
14315
  CODEX_OAUTH_KEEP_WARM_MAX_AGE_HOURS_BOUNDS = { min: 1, max: 216 };
14316
+ SCHEDULER_INTERVAL_MS_BOUNDS = { min: 1, max: 2147483647 };
14248
14317
  SYSTEM_ONE_DEFAULT_PROVIDER_OPTIONS = [
14249
14318
  "typesafe",
14250
14319
  "openrouter",
@@ -14483,7 +14552,6 @@ var init_swarm_config_guard = __esm(() => {
14483
14552
  "RBAC_AUDIT_RETENTION_DAYS",
14484
14553
  "WORKFLOW_MAX_ITERATIONS",
14485
14554
  "WORKFLOW_MAX_STEPS_PER_RUN",
14486
- "SCHEDULER_INTERVAL_MS",
14487
14555
  "EXTENSION_HANDLER_TIMEOUT_MS",
14488
14556
  "EXTENSION_MAX_CONSECUTIVE_FAILURES",
14489
14557
  "RUNTIME_STALE_THRESHOLD_MIN",
@@ -14502,6 +14570,7 @@ var init_swarm_config_guard = __esm(() => {
14502
14570
  ], 1),
14503
14571
  ...boundedIntegerValidatorsFor(DB_RETENTION_TUNING_BOUNDS),
14504
14572
  ...boundedIntegerValidators(["APPS_JSON_COLUMN_MAX_BYTES"], APPS_JSON_COLUMN_MAX_BYTES_BOUNDS.min, APPS_JSON_COLUMN_MAX_BYTES_BOUNDS.max),
14573
+ ...boundedIntegerValidators(["SCHEDULER_INTERVAL_MS"], SCHEDULER_INTERVAL_MS_BOUNDS.min, SCHEDULER_INTERVAL_MS_BOUNDS.max),
14505
14574
  ...enumValidator("WORKTREE_REAPER_MODE", ["off", "dry-run", "on"]),
14506
14575
  ...boundedIntegerValidators(["WORKTREE_TTL_HOURS"], 1, 2160),
14507
14576
  ...boundedIntegerValidators(["WORKTREE_SWEEP_INTERVAL_MINUTES"], 5, 1440),
@@ -23158,7 +23227,7 @@ function noteEmbeddingSuccess() {
23158
23227
  const report = (what) => (err) => {
23159
23228
  console.error(`[memory] ${what} backfill after embeddings recovered failed:`, err.message);
23160
23229
  };
23161
- backfill2 = import("./embedding-space-yam9zwzj.js").then(({ runEmbeddingMaintenance }) => runEmbeddingMaintenance({ backfill: true })).catch(report("Embedding")).finally(() => {
23230
+ backfill2 = import("./embedding-space-001hhhpk.js").then(({ runEmbeddingMaintenance }) => runEmbeddingMaintenance({ backfill: true })).catch(report("Embedding")).finally(() => {
23162
23231
  backfill2 = null;
23163
23232
  });
23164
23233
  }
@@ -25727,7 +25796,7 @@ async function loadSecretRegistry() {
25727
25796
  result.failed += 1;
25728
25797
  }
25729
25798
  try {
25730
- const { loadRuntimeControllerSecrets } = await import("./db-0ezhdhz5.js");
25799
+ const { loadRuntimeControllerSecrets } = await import("./db-487vvyv9.js");
25731
25800
  const loaded = await loadRuntimeControllerSecrets();
25732
25801
  result.runtimeController = loaded.count;
25733
25802
  result.failed += loaded.failed;
@@ -25888,7 +25957,7 @@ async function requestSteering(args) {
25888
25957
  }
25889
25958
  const requestedMode = args.mode ?? "queue";
25890
25959
  const onUnsupported = args.onUnsupported ?? "degrade";
25891
- const { dispatchPre, extensionIdForAgent } = await import("./dispatcher-h2rz69f6.js");
25960
+ const { dispatchPre, extensionIdForAgent } = await import("./dispatcher-64rp6w67.js");
25892
25961
  const preSteer = await dispatchPre("pre.task.steer", {
25893
25962
  task,
25894
25963
  message: args.message,
@@ -28133,7 +28202,7 @@ async function createTaskExtended2(task, options) {
28133
28202
  priority: row.priority
28134
28203
  }, (task) => task !== null, row.requestedByUserId);
28135
28204
  getDbClient2().afterCommit(() => {
28136
- import("./event-bus-08t2b4y2.js").then(({ workflowEventBus }) => {
28205
+ import("./event-bus-7gbsr0g4.js").then(({ workflowEventBus }) => {
28137
28206
  workflowEventBus.emit("task.created", {
28138
28207
  taskId: row.id,
28139
28208
  task: row.task,
@@ -28215,7 +28284,7 @@ async function releaseTask2(taskId, wakeSnapshot) {
28215
28284
  } catch {}
28216
28285
  if (isRuntimePoolsEnabled() && !wakeSnapshot)
28217
28286
  getDbClient2().afterCommit(() => {
28218
- import("./event-bus-08t2b4y2.js").then(({ workflowEventBus }) => workflowEventBus.emit("task.unassigned", { taskId })).catch((error) => console.error("[db] Routing event failed:", scrubSecrets(String(error))));
28287
+ import("./event-bus-7gbsr0g4.js").then(({ workflowEventBus }) => workflowEventBus.emit("task.unassigned", { taskId })).catch((error) => console.error("[db] Routing event failed:", scrubSecrets(String(error))));
28219
28288
  });
28220
28289
  }
28221
28290
  return row ? rowToAgentTask(row) : null;
@@ -28285,7 +28354,7 @@ async function rejectTask2(taskId, agentId, reason) {
28285
28354
  } catch {}
28286
28355
  if (isRuntimePoolsEnabled())
28287
28356
  getDbClient2().afterCommit(() => {
28288
- import("./event-bus-08t2b4y2.js").then(({ workflowEventBus }) => workflowEventBus.emit("task.unassigned", { taskId })).catch((error) => console.error("[db] Routing event failed:", scrubSecrets(String(error))));
28357
+ import("./event-bus-7gbsr0g4.js").then(({ workflowEventBus }) => workflowEventBus.emit("task.unassigned", { taskId })).catch((error) => console.error("[db] Routing event failed:", scrubSecrets(String(error))));
28289
28358
  });
28290
28359
  }
28291
28360
  return row ? rowToAgentTask(row) : null;
@@ -29948,7 +30017,7 @@ async function deleteScheduledTask2(id) {
29948
30017
  const parent = await getTaskById2(deferred.parentTaskId);
29949
30018
  if (!parent?.deferredAt)
29950
30019
  return;
29951
- const { createWorkerTaskFollowUp } = await import("./worker-follow-up-dyfxyjbj.js");
30020
+ const { createWorkerTaskFollowUp } = await import("./worker-follow-up-jnvnnf2b.js");
29952
30021
  await createWorkerTaskFollowUp({
29953
30022
  task: parent,
29954
30023
  status: "failed",
@@ -34000,7 +34069,7 @@ function rowToScriptRun(row) {
34000
34069
  id: row.id,
34001
34070
  agentId: row.agentId,
34002
34071
  scriptName: row.scriptName ?? undefined,
34003
- source: row.source,
34072
+ source: row.storedSource ?? row.source,
34004
34073
  args: sealedJsonForDisplay(row.args),
34005
34074
  kind: row.kind,
34006
34075
  status: row.status,
@@ -34033,69 +34102,76 @@ function rowToScriptRunListItem(row) {
34033
34102
  }
34034
34103
  async function createScriptRun2(data) {
34035
34104
  const client = getDbClient2();
34036
- if (data.idempotencyKey) {
34037
- const existing = await client.get("SELECT * FROM script_runs WHERE idempotencyKey = ?", [data.idempotencyKey]);
34038
- if (existing)
34039
- return { run: rowToScriptRun(existing), existing: true };
34040
- }
34041
- const row = await client.get(`INSERT INTO script_runs
34042
- (id, agentId, scriptName, source, args, idempotencyKey, requestedByUserId, sourceTaskId,
34105
+ return client.transaction(async () => {
34106
+ if (data.idempotencyKey) {
34107
+ const existing = await client.get(`${SCRIPT_RUN_SELECT} WHERE r.idempotencyKey = ?`, [data.idempotencyKey]);
34108
+ if (existing)
34109
+ return { run: rowToScriptRun(existing), existing: true };
34110
+ }
34111
+ const sourceHash = await storeScriptRunSource(data.source);
34112
+ const row = await client.get(`INSERT INTO script_runs
34113
+ (id, agentId, scriptName, source, sourceHash, args, idempotencyKey, requestedByUserId, sourceTaskId,
34043
34114
  created_by, updated_by, startedAt)
34044
- VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
34115
+ VALUES (?, ?, ?, '', ?, ?, ?, ?, ?, ?, ?, ?)
34045
34116
  RETURNING *`, [
34046
- data.id,
34047
- data.agentId,
34048
- data.scriptName ?? null,
34049
- data.source,
34050
- sealJson(data.args ?? null),
34051
- data.idempotencyKey ?? null,
34052
- data.requestedByUserId ?? null,
34053
- data.sourceTaskId ?? null,
34054
- data.createdBy ?? null,
34055
- data.updatedBy ?? data.createdBy ?? null,
34056
- new Date().toISOString()
34057
- ]);
34058
- if (!row)
34059
- throw new Error("Failed to create script run");
34060
- return { run: rowToScriptRun(row), existing: false };
34117
+ data.id,
34118
+ data.agentId,
34119
+ data.scriptName ?? null,
34120
+ sourceHash,
34121
+ sealJson(data.args ?? null),
34122
+ data.idempotencyKey ?? null,
34123
+ data.requestedByUserId ?? null,
34124
+ data.sourceTaskId ?? null,
34125
+ data.createdBy ?? null,
34126
+ data.updatedBy ?? data.createdBy ?? null,
34127
+ new Date().toISOString()
34128
+ ]);
34129
+ if (!row)
34130
+ throw new Error("Failed to create script run");
34131
+ return { run: rowToScriptRun({ ...row, storedSource: data.source }), existing: false };
34132
+ });
34061
34133
  }
34062
34134
  async function recordInlineScriptRun2(data) {
34063
34135
  const args = scrubJsonValue(data.args ?? null);
34064
34136
  const output = data.output === undefined ? null : scrubJsonValue(data.output);
34065
34137
  const provenance = getCurrentRunProvenance();
34066
- const row = await getDbClient2().get(`INSERT INTO script_runs
34067
- (id, agentId, scriptName, source, args, kind, status, output, error,
34138
+ const client = getDbClient2();
34139
+ return client.transaction(async () => {
34140
+ const sourceHash = await storeScriptRunSource(data.source);
34141
+ const row = await client.get(`INSERT INTO script_runs
34142
+ (id, agentId, scriptName, source, sourceHash, args, kind, status, output, error,
34068
34143
  startedAt, finishedAt, requestedByUserId, created_by, updated_by, apiEndpointId,
34069
34144
  sourceStepId, parentScriptRunId)
34070
- VALUES (?, ?, ?, ?, ?, 'inline', ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
34145
+ VALUES (?, ?, ?, '', ?, ?, 'inline', ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
34071
34146
  RETURNING *`, [
34072
- data.id,
34073
- data.agentId,
34074
- data.scriptName ?? null,
34075
- data.source,
34076
- args,
34077
- data.status,
34078
- output,
34079
- data.error ?? null,
34080
- data.startedAt,
34081
- data.finishedAt,
34082
- data.requestedByUserId ?? null,
34083
- data.createdBy ?? null,
34084
- data.createdBy ?? null,
34085
- data.apiEndpointId ?? null,
34086
- provenance?.sourceStepId ?? null,
34087
- provenance?.sourceScriptRunId ?? null
34088
- ]);
34089
- if (!row)
34090
- throw new Error("Failed to record inline script run");
34091
- return rowToScriptRun(row);
34147
+ data.id,
34148
+ data.agentId,
34149
+ data.scriptName ?? null,
34150
+ sourceHash,
34151
+ args,
34152
+ data.status,
34153
+ output,
34154
+ data.error ?? null,
34155
+ data.startedAt,
34156
+ data.finishedAt,
34157
+ data.requestedByUserId ?? null,
34158
+ data.createdBy ?? null,
34159
+ data.createdBy ?? null,
34160
+ data.apiEndpointId ?? null,
34161
+ provenance?.sourceStepId ?? null,
34162
+ provenance?.sourceScriptRunId ?? null
34163
+ ]);
34164
+ if (!row)
34165
+ throw new Error("Failed to record inline script run");
34166
+ return rowToScriptRun({ ...row, storedSource: data.source });
34167
+ });
34092
34168
  }
34093
34169
  async function getScriptRun2(id) {
34094
- const row = await getDbClient2().get("SELECT * FROM script_runs WHERE id = ?", [id]);
34170
+ const row = await getDbClient2().get(`${SCRIPT_RUN_SELECT} WHERE r.id = ?`, [id]);
34095
34171
  return row ? rowToScriptRun(row) : null;
34096
34172
  }
34097
34173
  async function getScriptRunByIdempotencyKey2(idempotencyKey) {
34098
- const row = await getDbClient2().get("SELECT * FROM script_runs WHERE idempotencyKey = ?", [idempotencyKey]);
34174
+ const row = await getDbClient2().get(`${SCRIPT_RUN_SELECT} WHERE r.idempotencyKey = ?`, [idempotencyKey]);
34099
34175
  return row ? rowToScriptRun(row) : null;
34100
34176
  }
34101
34177
  async function listScriptRuns2(opts) {
@@ -34213,7 +34289,7 @@ async function updateScriptRunGuarded(id, patch, predicate) {
34213
34289
  return result.changes > 0;
34214
34290
  }
34215
34291
  async function getRunningScriptRuns2() {
34216
- const rows = await getDbClient2().query("SELECT * FROM script_runs WHERE status IN ('running', 'paused')");
34292
+ const rows = await getDbClient2().query(`${SCRIPT_RUN_SELECT} WHERE r.status IN ('running', 'paused')`);
34217
34293
  return rows.map(rowToScriptRun);
34218
34294
  }
34219
34295
  function rowToScriptRunJournalEntry(row, view = "display") {
@@ -34311,6 +34387,7 @@ var init_db4 = __esm(() => {
34311
34387
  init_page_search();
34312
34388
  init_page_theme_tokens();
34313
34389
  init_runtime2();
34390
+ init_script_run_sources2();
34314
34391
  init_session_log_reasoning();
34315
34392
  init_session_moves();
34316
34393
  init_session_tree();
@@ -34347,7 +34424,7 @@ var init_db4 = __esm(() => {
34347
34424
  configureAgentDependencies({
34348
34425
  createLogEntry: (entry) => createLogEntry2(entry),
34349
34426
  installSystemDefaultSkillsForAgent: (agentId) => installSystemDefaultSkillsForAgent2(agentId),
34350
- resolvePendingImportAssignments: async (agent) => (await import("./pending-vkk0vx6n.js")).resolvePendingImportAssignments(agent)
34427
+ resolvePendingImportAssignments: async (agent) => (await import("./pending-nxavtvx7.js")).resolvePendingImportAssignments(agent)
34351
34428
  });
34352
34429
  configureTaskWriteDependencies({
34353
34430
  createLogEntry: (...args) => createLogEntry2(...args),
@@ -34397,4 +34474,4 @@ var init_db4 = __esm(() => {
34397
34474
  };
34398
34475
  });
34399
34476
 
34400
- export { auditAssetKeys, init_asset_key_audit, CredentialBindingSchema, placeholderForConfigKey, CredentialBroker, defaultCredentialBindings, isPrivateAddress, assertUrlSafe, EgressDeniedError, createGuardedFetch, createSsrfGuardedFetch, parseEgressAllowlist, init_egress_guard, init_credential_broker, encryptSecret, decryptSecret, init_secrets_cipher, getEncryptionKey, init_key_bootstrap, init_crypto, withLoopPath, bindLoopPath, startEventLoopLagProbe, stopEventLoopLagProbe, init_event_loop_lag, DbTransactionDeadlineError, isInTransaction, init_db_client, breaksJsonValidity, scrubJsonValue, foldHexCopies, init_scrub_json, sealJson, openSealedJson, init_sealed_json, getPromptTemplateDefaultDrift, init_default_drift, init_templates2, init_templates3, wasDbCreatedThisBoot, isSqliteVecAvailable2, resolveSqliteVecExtensionPath2, __resetSqliteVecExtensionPathCacheForTests2, initDb2, getDb2, closeDb2, getDbClient2, init_runtime2, SessionCostConflictError2, insertSessionCost2, slackContextKey, chatSdkContextKey, chatThreadOfContextKey, agentmailContextKey, githubContextKey, gitlabContextKey, azureDevOpsContextKey, azureDevOpsWorkItemContextKey, bitbucketContextKey, linearContextKey, buildJiraContextKey, scheduleContextKey, workflowContextKey, agentContextKey, pageContextKey, APP_SESSION_KEY_PATTERN, appSessionContextKey, init_context_key, sessionSourceKey, sourceOfKey, SOURCE_GROUPS_READ_ONLY, sourceMoveError, init_source_key, TaskCreationBlockedError, TaskRoutingAuthorizationError, init_errors2, checkSlackRoutingCoherence, init_slack_routing, init_catalog, catalog_default, COMPANY_TEAM_SIZES, COMPANY_USE_CASES, USER_FUNCTIONS, reportedUseCase, reportedUserFunction, init_company_profile, mapTriggerSurface, init_telemetry_context, TELEMETRY_PROXY_ORIGIN, normalizeOrgWebsite, orgLogoUrl, isFilledOrgLogoUrl, init_org_website, beginRequestAuthScope, setRequestAuth, getRequestAuth, getCurrentRequestAuth, runWithoutRequestAuth, authUserId, authUser, isOperatorAuth, getCurrentRequestUserId, getCurrentRunProvenance, init_request_auth_context, setTelemetryIngestObserver, isTelemetryEnabled, _resolveIntegrationType, _resolveIntegrationProvider, initTelemetry, setTelemetryRoleResolver, setTelemetryFunctionResolver, isTelemetryReady, track, trackRelayed, telemetry, emitIntegrationConnected, init_telemetry, isRbacEnabled, decideAdmission, decideToolAdmission, grantLeadEquivalence, revokeLeadEquivalence, init_elevated_agents, LEGACY_RULES, setAuditSink, clearAuditSink, can, init_can, PermissionVerbSchema, init_rbac, randomChars, init_short_id, CHAT_SDK_ADAPTER_NAMES, CHAT_SDK_ADAPTER_SCHEMAS, ChatSdkAdaptersDraftSchema, firstIssueText, isAdapterEntryEnabled, init_schema, TELEMETRY_RANKING_KEY, PUBLIC_RANKING_ENABLED_KEY, RANKING_CATEGORIES, readTelemetryRanking, rankingFormSchema, buildListing, init_telemetry_ranking, resolveQuickJSPoolSize, init_quickjs_pool_config, SLACK_REACTION_DEFAULTS, SLACK_REACTION_CONFIG_KEYS, reactionName, isSlackIconConfigKey, reactionStatusIcon, iconPrefix, completedStatusIcon, init_reaction_shortcode, UI_SPEC_SCRIPT_ACTIONS_KEY, parseScriptActionAllowlist, init_script_allowlist, API_DRAINING_HEADER, API_DRAIN_MAX_MS_LIMIT, isApiDrainingResponse, init_api_drain2, isEnvExportRestrictedKey, init_config_env_export, parseEnabledTools, init_enabled_tools, parseFollowUpGateScheduleIds, isFollowUpGateScheduleId, init_follow_up_gate_schedule_ids, parseTaskToolManifest, CHAT_TASK_ONLY_TOOLS, isChatSdkTask, selectTaskTools, init_task_tool_manifest, tierConfigKey, init_model_tier_keys, isApiOnlyConfigKey, isInternalConfigKey, internalConfigKeyError, isHumanOnlyConfigKey, humanOnlyConfigKeyError, humanOnlyConfigKeyPageError, isReservedConfigKey, reservedKeyError, MAX_DB_RETENTION_DAYS, DB_RETENTION_TUNING_BOUNDS, APPS_JSON_COLUMN_MAX_BYTES_BOUNDS, CODEX_OAUTH_KEEP_WARM_MAX_AGE_HOURS_BOUNDS, validateRuntimeTokenTtlHours, validateControllerTokenTtlDays, validateControllerGraceSec, validateConfigValue, validateConfigEntry, validateExportToEnv, init_swarm_config_guard, cachedUserRole, cachedUserFunction, invalidateTelemetryUserRole, configureOrgDomainPersistence, recomputeOrgDomain, scheduleOrgDomainRecompute, init_telemetry_identity, resolveTriggerSurface, emitTaskTelemetry, init_telemetry_trigger, MASKED_SECRET_VALUE, init_config_secrets, HeartbeatExpiryError, init_heartbeat_expiry, isEffectiveOutputSchema, init_output_schema, isRuntimePoolsEnabled, init_runtime_pools_flag, normalizeDate, normalizeDateRequired, init_date_utils, rowToAgent, updateAgentCredentialState2, updateAgentCredentialMissing2, AgentDeletedError2, isAgentDeleted2, createAgent2, getAgentById2, EXTENSION_AGENT_ROLE2, NOT_EXTENSION_AGENT_SQL2, isExtensionAgent2, extensionAgentAssignmentError2, ReservedAgentRoleError2, reservedRoleViolation2, ExtensionAgentAssignmentError2, getAllAgents2, getAgentStatusCounts2, getLeadAgent2, updateAgentStatus2, updateAgentMaxTasks2, updateAgentProvider2, setAgentHarnessProvider2, updateAgentCredStatus2, listAgentsWithCredStatusByProvider2, getAgentHarnessProviders2, updateAgentActivity2, MAX_EMPTY_POLLS2, incrementEmptyPollCount2, resetEmptyPollCount2, shouldBlockPolling2, deleteAgent2, getActiveTaskCount2, hasCapacity2, getRemainingCapacity2, updateAgentStatusFromCapacity2, isPoolAffinityEnforcementEnabled2, buildRoutingAffinityFromAgent2, isAgentEligibleForTask2, getAgentDailyTaskCounts2, init_agents, closeSlackTreeIfSettled, getSlackThreadsOfTasks, slackThreadHasBotReplySince, slackThreadHasOutcomeWork, observeSlackTreeVisibility, getSlackProcessingThreads, init_slack_trees, WorkflowReplayStateError, init_workflow_replay, getWorkflowRunTriggeredByAgentId, getWorkflowRunSummary, getWorkflowRunStepsSlimByRunId, WORKFLOW_RUN_TREE_MAX_DEPTH, WorkflowRunTreeError, getRunLineageBlock, getWorkflowRunTreeIds, getWorkflowRunStatus, getOpenWorkflowTreeTaskIds, getTaskIdsWithDependents, workflowRunTreeHasOpenWork, getWorkflowRunTree, cancelOpenWorkflowTreeSteps, disarmWorkflowTreeRetries, cancelLiveWorkflowTreeRuns, getChildWorkflowRunId, isParentStepAttemptCurrent, getRunningSubWorkflowSteps, getWorkflowRunParent, getWorkflowRunLineage, getSettledChildRunParentSteps, emitRunFinished, createForeachChildSteps, createForeachAttemptSteps, init_workflow_runs, OpenAI2, init_openai2, LEARNING_TTL_DAYS, LEARNING_DUPLICATE_MIN_SIMILARITY, CANDIDATE_SET_MULTIPLIER, isGraphExpansionEnabled, EMBEDDING_DIMENSIONS, init_constants2, LONGTERM_ROOT, LEARNINGS_ROOT, MEMORY_KEY_PATTERN, MEMORY_KEY_PATTERN_MESSAGE, MEMORY_KEY_MAX_LENGTH, isLongtermKey, longtermKeyError, isConsolidatedKey, consolidatedKeyMessage, resolveStoreKey, init_key_paths, computeScore, rerank, init_reranker, isReviewTaskId, dropReviewTaskCompletions, init_review_recall_filter, searchMemoryCandidates, init_search_candidates, memorySearchReader, init_search_reader, rowToCandidate, init_sqlite_store, getEmbeddingProvider2, resetEmbeddingProvider2, getMemoryStore2, init_memory, embeddingProvider2, computeScriptEmbedding2, writeScriptEmbedding2, embedScript2, searchScripts2, reembedAllScripts2, init_embeddings, upsertScriptByName, getScript, getGlobalScriptContentHashes, getScriptById, getScriptVersion, listScripts, listScriptVersions, deleteScript, touchScratchScriptLastUsed, restoreScratchScriptLastUsedIfUnchanged, createScriptApi, listScriptApisForScript, getScriptApiById, getScriptApiSecret, updateScriptApi, rotateScriptApiSecret, deleteScriptApi, recordScriptApiUsage, init_db3, oauthSecretName, registerStoredSecret, loadSecretRegistry, init_secret_registry, getDefaultAuthorizationIdForProvider, getOAuthApp, getOAuthAppById, getOAuthAppIdByProvider, createOAuthApp, updateOAuthAppById, upsertOAuthApp, listAuthorizationsForApp, getAuthorizationById, upsertAuthorization, updateAuthorizationTokens, updateAuthorizationIdentity, deleteAuthorizationById, deleteAuthorizationsForApp, createOAuthPending, consumeOAuthPending, gcOAuthPending, markAuthorizationRefreshFailed, hasOAuthTokens, getOAuthTokens, listAuthorizationSweepRows, listKeepAliveAuthorizations, deleteOAuthTokens, acquireOAuthRefreshLock, releaseOAuthRefreshLock, init_oauth, normalizeVcsRepo, vcsRepoName, vcsRepoUrlMatches, init_vcs_repo_match, taskModelPin, resumedTaskModelSelection, init_model_pin, normalizeModelKey, init_pricing_normalize, buildModelsDevSeedRows, seedPricingFromModelsDev, init_seed_pricing, buildCatalogEntries, replaceModelCatalog, touchModelCatalogCheckedAt, countModelCatalog, getModelCatalogMeta, updateModelCatalogMeta, upsertModelCatalogOverlay, deleteModelCatalogOverlay, expireMatchedOverlays, applyOverlayPricingRows, reloadModelsCatalog, loadModelsCatalog, init_model_catalog_store, listHarnessModelSupport, recordHarnessModelSupport, agentRanModel, getAgentHarnessCliVersion, setAgentHarnessCliVersion, init_harness_model_support, sanitizeModelTierOverrides, parseModelTierOverridesHeader, modelTierOverridesDiffer, setAgentModelTierOverrides, previewModelTiers, recordClaimModelResolution, init_model_tier_resolution, harnessModelErrorFor, poolTaskRunsOnHarness, explicitModelError, explicitModelErrorForAgent, init_model_validation2, runtimeReadsRepoSecrets, configPools, checkProfileForAgent, formatProfileCheckFailures, init_model_profile_check, startTaskSearchBackfill, stopTaskSearchBackfill, init_search_index, rowToAgentTask, getTaskById2, getChildTasks2, TASK_LINEAGE_LIMITS2, getTaskLineage2, hasNonTerminalResumeChild2, SUPERSEDED_RESUME_REPAIR_WINDOW_MS2, getSupersededTasksWithoutResume2, getSupersededTasksWithUnsettledDependents2, hasNonTerminalRerouteDecisionChild2, getTasksByAgentId2, getTasksDispatchedFrom2, getAgentCurrentTask2, getTasksByStatus2, findTaskByVcs2, findActiveTasksByVcs2, findTaskByGitHub2, readableSessionCondition, getAllTasks2, getTasksCount2, getTaskStats2, getCompletedSlackTasks2, getPendingSlackRelayTasks2, markSlackRelayAttempted2, markSlackRelayDelivered2, markFinalizedSlackRelaysDelivered2, getPendingChatRelayTasks2, giveUpStaleChatRelays2, markChatRelayAttempted2, recordChatRelayError2, markChatRelayDelivered2, markChatRelayGivenUp2, getRecentlyFinishedWorkerTasks2, markTasksNotified2, resetTasksNotified2, getInProgressSlackTasks2, getSlackTasksMissingTree2, getInProgressTasksByContextKey2, isLinearTrackerContextKey2, findExistingLinearTrackerContextWork2, getLatestTaskByContextKey2, getLatestScriptRunStepTaskByContextKey2, getAgentWorkingOnThread2, getLatestActiveTaskInThread2, getLatestLeadTaskInThread2, getAgentWorkingOnContextKey2, getLatestTaskByContextKeyPrefix2, getLatestActiveTaskByContextKey2, getLatestLeadTaskByContextKey2, getFirstTaskInThread2, getMostRecentTaskInThread2, findCompletedTasksInThread2, findRecentFailedTaskInThread2, countAgentDispatchesInThread2, findRecentCancelledTaskInThread2, init_read, MODEL_PROFILE_CONFIG_KEY, hasUnreadableCredentialAllowlist, listModelProfiles, getModelProfileByName, createModelProfile, updateModelProfile, TASK_HOLDS_PROFILE_SQL, repairWindowStart, modelProfileReferences, modelProfileRefError, isModelNameTakenError, deleteModelProfile, MAX_MODEL_PROFILE_FALLBACKS, modelProfileFallbacksError, taskProfileError, scheduleProfileUpdate, init_model_profiles, SESSION_ACTIVITY_REFRESH_MIN_INTERVAL_MS2, refreshActiveSessionOnActivity2, getActiveSessionById, init_active_sessions, STEERING_MOVED_ERROR, SteeringRequestError, SteeringBlockedError, isSteeringEnabled, getTaskSteeringFields, getTaskSteeringFieldsForTasks, promotePendingSteeringForTask, markSteeringUndeliverable, carryUnhandledSteering, requestSteering, init_steering2, onTaskStarted, init_task_lifecycle_events, listApprovalRequestSummaries2, getPendingApprovalVoteState2, recordApprovalVotes2, getPendingApprovalsForTasks2, approvalCancellationNotificationKey, listUndeliveredCancelledApprovalRequestIds, init_approvals, computeContentHash2, createContextVersion2, getLatestContextVersion2, getContextVersion2, getContextVersionHistory2, AssetKeyMovesBlockedError2, assertAssetKeyMovesAllowed2, moveTaskChainKeyInTx2, moveSessionChains, moveKeyFavorites, listPrefixRoots, listSharedPrefixRoots, init_session_moves, getSessionGroupKey, sessionSummaryQuery, getSessionReadState, getSessionTree, triageSessionList, init_session_tree, setHumanFreeQueueListener, reclassifyTaskHumanFree, drainHumanFreeReclassifyQueue, init_human_free, channelTopic, addWorkerSubscription, removeWorkerSubscription, listSubscribedWorkerAgents, init_channels, publishWorkerNudge, init_worker_nudges, createTask2, getPendingTaskForAgent2, assignUnassignedTaskPending2, startTask2, updateTaskClaudeSessionId2, recordTaskProviderIfUnset2, updateTaskTitle2, updateTaskTags2, setTaskTitleIfUnset2, completeTask2, failTask2, overwriteTerminalTaskResultText2, cancelTask2, skipTask2, supersedeTask2, markWorkflowStepTaskSuperseded2, settleSupersededTaskDependents2, backfillSupersedeTaskResumeTaskId2, pauseTask2, resumeTask2, getPausedTasksForAgent2, getOrphanedInProgressTasksForAgent2, resetOrphanedInProgressTasksForAgent2, getRecentlyCancelledTasksForAgent2, deleteTask2, updateTaskProgress2, init_write, quoteSqlIdentifier, USER_REFERENCE_COLUMNS_SQL, userReferenceRewriteSql, WORKFLOW_CONTEXT_REQUESTER_SQL, init_user_references, IdempotencyKeyTakenError, workflowRequestFingerprint, findAcceptedWorkflowOperation, assertWorkflowIdempotencyKeyUnused, recordAcceptedWorkflowOperation, init_workflow_idempotency, PINNED_WORKFLOW_KEYS2, toPinnedDefinition2, pinWorkflowDefinition2, getRunWorkflow2, deleteOrphanedRunDefinitions, init_workflow_run_definitions, recordKeySeatMismatch2, recordKeyValidation2, retirePoolKeyStatus, init_api_keys, getScriptRunExecutionArgs2, getScriptRunFollowUpGuard2, setScriptRunFollowUpGuard2, setSkillUpdatedBy2, literalPrefixPattern2, getSlackRenderV2ActivatedAt2, ensureSlackRenderV2Activation2, getSlackDelegationActivatedAt2, ensureSlackDelegationActivation2, isPendingSlackMessage2, isSettledSlackMessage2, recordSlackMessage2, reserveSlackMessage2, bindSlackMessageTimestamp2, updateSlackMessageRecord2, markSlackTreeRendered2, deleteSlackMessageRecord2, getSlackTreeMessage2, getSlackTreeMessageByThread2, getSlackOutcomeMessage2, getResolvableDeferralOutcomes2, markSlackDeferralResolved2, noteSlackOutcomeDeliveryFailure2, abandonSlackOutcomeDelivery2, getSlackTreeMessages2, getSlackMessageByChannelTs2, getSlackTasksInThread2, listSlackThreadsAwaitingHuman2, isSlackThreadAwaitingHuman2, markTaskSlackReplySent2, setSlackMessageTracking2, updateTaskVcs2, insertTaskAttachment2, recordTaskPullRequestAttachments2, getAssetKeyMappingByProvider2, upsertAssetKeyMapping2, getAssetKeyMapping2, listAssetSummaries2, moveAssetKey2, deleteTaskAttachment2, replaceTaskAttachment2, getTaskAttachments2, createSteeringMessage2, getSteeringMessagesForTask2, getSteeringMessageById2, getPendingSteeringForTask2, getPendingSteeringForAgent2, markSteeringDelivered2, markSteeringHandled2, markSteeringPromoted2, cancelPendingSteeringForTask2, hasPendingSteering2, getAgentWithTasks2, getAllAgentsWithTasks2, createLogEntry2, getLogsByAgentId2, getLogsByTaskId2, getLogsByTaskIdAndEventType2, getLogsByTaskIdChronological2, getLogsByEventType2, getAllLogs2, findRecentSimilarTasks2, createTaskExtended2, claimTask2, releaseTask2, acceptTask2, rejectTask2, moveTaskToBacklog2, moveTaskFromBacklog2, promoteDraftTask2, refreshDraftTaskLease2, promoteAbandonedDraftTasks2, releaseStaleReviewingTasks2, releaseStaleOfferedTasksForOfflineAgents2, getOfferedTasksForAgent2, claimOfferedTask2, getUnassignedTasksCount2, getUnassignedTaskIds2, getUnassignedTaskIdsForAgent2, checkDependencies2, getDependentTasks2, cascadeFailDependents2, updateAgentProfile2, updateAgentName2, createChannel2, getMessageById2, getChannelById2, getChannelByName2, getAllChannels2, deleteChannel2, postMessage2, getChannelMessages2, updateReadState2, getLastReadAt2, getUnreadMessages2, getMentionsForAgent2, getInboxSummary2, claimMentions2, releaseMentionProcessing2, releaseStaleMentionProcessing2, createService2, getServiceById2, getServiceByAgentAndName2, getServicesByAgentId2, getAllServices2, updateServiceStatus2, deleteService2, upsertService2, deleteServicesByAgentId2, createSessionLogs2, getSessionLogsByTaskId2, getSessionLogsBySession2, createSessionCost2, getSessionCostsByTaskId2, getSessionCostsByAgentId2, getAllSessionCosts2, getSessionCostsFiltered2, UNATTRIBUTED_USER_ID2, getSessionCostSummary2, getAttributionByPerson2, getDashboardCostSummary2, createInboxMessage2, getInboxMessageById2, getUnreadInboxMessages2, claimInboxMessages2, markInboxMessageRead2, markInboxMessageResponded2, markInboxMessageDelegated2, releaseStaleProcessingInbox2, getConcurrentContext2, getScheduledTasks2, getScheduledTaskById2, getScheduledTaskByName2, createScheduledTask2, updateScheduledTask2, deleteScheduledTask2, getDueScheduledTasks2, autoEncryptLegacyPlaintextSecrets2, maskSecrets2, getSwarmConfigs2, getInjectableGlobalConfigs2, getSwarmConfigById2, getSwarmConfigLookupById2, upsertSwarmConfig2, emitBuiltInIntegrationConnectedOnce2, deleteSwarmConfig2, deleteSwarmConfigByKey2, getResolvedConfig2, getSwarmRepos2, getSwarmRepoById2, getSwarmRepoByName2, getSwarmRepoByUrl2, createSwarmRepo2, updateSwarmRepo2, deleteSwarmRepo2, getAgentMailInboxMapping2, getAgentMailInboxMappingsByAgent2, getAllAgentMailInboxMappings2, createAgentMailInboxMapping2, deleteAgentMailInboxMapping2, findTaskByAgentMailThread2, insertActiveSession2, deleteActiveSession2, deleteActiveSessionById2, getActiveSessions2, heartbeatActiveSession2, cleanupStaleSessions2, cleanupAgentSessions2, updateActiveSessionProviderSessionId2, getActiveSessionForTask2, reassociateSessionLogs2, getStalledInProgressTasks2, getStalePinnedResumes2, failPendingResumeIfUnclaimed2, getIdleWorkersWithCapacity2, getUnassignedPoolTasks2, getStaleUnassignedAffinityTasks2, getRecentFailedTasks2, getRecentCompletedCount2, getRecentFailedCount2, createWorkflow2, getWorkflow2, listWorkflows2, updateWorkflow2, deleteWorkflow2, getWorkflowsByScheduleId2, createWorkflowRun2, getWorkflowRun2, updateWorkflowRun2, listWorkflowRuns2, countWorkflowRuns2, listWorkflowRunsPage2, createWorkflowRunStep2, getWorkflowRunStep2, updateWorkflowRunStep2, getWorkflowRunStepsByRunId2, getStuckWorkflowRuns2, getLastSuccessfulRun2, getLastRunStart2, getRetryableSteps2, getCompletedStepNodeIds2, getTaskByWorkflowRunStepId2, detachTaskFromWorkflowRunStep2, getStepByIdempotencyKey2, getStepCountForNode2, getLatestStepForNode2, getCurrentStepForNode2, createWorkflowVersion2, getWorkflowVersions2, getWorkflowVersion2, createAppVersion2, getAppVersions2, getAppVersion2, createPage2, getPage2, getPageBySlug2, getLatestPageBySlug2, listPagesByAgent2, listAllPages2, countAllPages2, countPagesByAgent2, updatePage2, deletePage2, incrementPageViewCount2, createPageVersion2, getPageVersions2, getPageVersion2, createMetric2, getMetric2, getMetricBySlug2, listMetricsByAgent2, listAllMetrics2, countAllMetrics2, countMetricsByAgent2, updateMetric2, deleteMetric2, createMetricVersion2, getMetricVersions2, getMetricVersion2, getPromptTemplates2, getPromptTemplateById2, upsertPromptTemplate2, deletePromptTemplate2, resetPromptTemplateToDefault2, getPromptTemplateHistory2, resolvePromptTemplate2, checkoutPromptTemplate2, getAllChannelActivityCursors2, getChannelActivityCursor2, upsertChannelActivityCursor2, createApprovalRequest2, getApprovalRequestById2, resolveApprovalRequest2, cancelApprovalRequestById2, cancelPendingApprovalRequestsForRun2, listCancelledApprovalRequestsForRun2, listCancelledApprovalRequestsForStep2, claimApprovalCancellationNotification2, completeApprovalCancellationNotificationClaim2, releaseApprovalCancellationNotificationClaim2, updateApprovalRequestNotifications2, listApprovalRequests2, getStuckApprovalRuns2, getApprovalRequestByStepId2, getExpiredPendingApprovals2, getStaleApprovalRequests2, createWaitState2, getWaitStateById2, getWaitStateByStepId2, getDueWaitStates2, getPendingEventWaitNames2, getPendingWaitsByEvent2, resolveWaitState2, getStuckWaitRuns2, SKILL_FILE_LIMITS2, normalizeSkillFilePath2, createSkill2, updateSkill2, listSkillFileManifest2, getSkillFiles2, getSkillFile2, upsertSkillFile2, upsertSkillFiles2, deleteSkillFile2, deleteSkill2, getSkillById2, getSkillByName2, listSkills2, searchSkills2, installSkill2, getSystemDefaultSkills2, installSystemDefaultSkillsForAgent2, uninstallSkill2, getAgentSkills2, toggleAgentSkill2, createMcpServer2, emitMcpServerConnectedTelemetry2, updateMcpServer2, deleteMcpServer2, getMcpServerById2, getMcpServerByName2, listMcpServers2, installMcpServer2, uninstallMcpServer2, getAgentMcpServers2, createContextSnapshot2, getContextSnapshotsByTaskId2, getContextSnapshotsBySessionId2, getContextSummaryByTaskId2, getAvailableKeyIndices2, recordKeyUsage2, setApiKeyPlan2, markKeyRateLimited2, recordKeyAuthFailure2, recordKeyRateLimitWindows2, setApiKeyName2, clearKeyRateLimit2, getKeyStatuses2, getKeyCostSummary2, getUserById2, getAllUsers2, createUser2, updateUser2, deleteUser2, listInboxState2, upsertInboxState2, listFavorites2, listUserFavorites2, getFavoriteItemIdSet2, setFavorite2, setUserFavorite2, withFavoriteFlags2, listTaskTemplates2, getRootTaskChain2, listRecentSessions2, countSessions2, getBudget2, getBudgets2, upsertBudget2, deleteBudget2, getAllPricingRows2, getPricingRows2, getActivePricingRow2, insertPricingRow2, deletePricingRow2, getDailySpendForAgent2, getDailySpendGlobal2, getDailySpendForUser2, recordBudgetRefusalNotification2, getBudgetRefusalNotification2, getRecentBudgetRefusalNotifications2, hasBudgetRefusalNotificationToday2, setBudgetRefusalFollowUpTaskId2, getLiveAgentCounts2, getReadyAgentCounts2, getInstanceActivity2, getSwarmMetrics2, hasFirstCompletedTask2, getKv2, sweepExpiredKv2, sweepExpiredKvPrefix2, upsertKv2, claimKv2, deleteKv2, KvTypeCollisionError2, incrKv2, kvPrefixUpperBound2, listKv2, countKv2, createScriptRun2, recordInlineScriptRun2, getScriptRun2, getScriptRunByIdempotencyKey2, listScriptRuns2, countScriptRuns2, countActiveScriptRuns2, updateScriptRun2, updateScriptRunIfNotTerminal2, updateScriptRunIfRunning2, getRunningScriptRuns2, getScriptRunJournalStep2, upsertScriptRunJournalStep2, listScriptRunJournalSteps2, countScriptRunJournalSteps2, countScriptRunJournalAgentTaskSteps2, exports_db, init_db4 };
34477
+ export { auditAssetKeys, init_asset_key_audit, CredentialBindingSchema, placeholderForConfigKey, CredentialBroker, defaultCredentialBindings, isPrivateAddress, assertUrlSafe, EgressDeniedError, createGuardedFetch, createSsrfGuardedFetch, parseEgressAllowlist, init_egress_guard, init_credential_broker, encryptSecret, decryptSecret, init_secrets_cipher, getEncryptionKey, init_key_bootstrap, init_crypto, withLoopPath, bindLoopPath, startEventLoopLagProbe, stopEventLoopLagProbe, init_event_loop_lag, DbTransactionDeadlineError, isInTransaction, init_db_client, breaksJsonValidity, scrubJsonValue, foldHexCopies, init_scrub_json, sealJson, openSealedJson, init_sealed_json, getPromptTemplateDefaultDrift, init_default_drift, init_templates2, init_templates3, wasDbCreatedThisBoot, isSqliteVecAvailable2, resolveSqliteVecExtensionPath2, __resetSqliteVecExtensionPathCacheForTests2, initDb2, getDb2, closeDb2, getDbClient2, init_runtime2, SessionCostConflictError2, insertSessionCost2, slackContextKey, chatSdkContextKey, chatThreadOfContextKey, agentmailContextKey, githubContextKey, gitlabContextKey, azureDevOpsContextKey, azureDevOpsWorkItemContextKey, bitbucketContextKey, linearContextKey, buildJiraContextKey, scheduleContextKey, workflowContextKey, agentContextKey, pageContextKey, APP_SESSION_KEY_PATTERN, appSessionContextKey, init_context_key, sessionSourceKey, sourceOfKey, SOURCE_GROUPS_READ_ONLY, sourceMoveError, init_source_key, TaskCreationBlockedError, TaskRoutingAuthorizationError, init_errors2, checkSlackRoutingCoherence, init_slack_routing, init_catalog, catalog_default, COMPANY_TEAM_SIZES, COMPANY_USE_CASES, USER_FUNCTIONS, reportedUseCase, reportedUserFunction, init_company_profile, mapTriggerSurface, init_telemetry_context, TELEMETRY_PROXY_ORIGIN, normalizeOrgWebsite, orgLogoUrl, isFilledOrgLogoUrl, init_org_website, beginRequestAuthScope, setRequestAuth, getRequestAuth, getCurrentRequestAuth, runWithoutRequestAuth, authUserId, authUser, isOperatorAuth, getCurrentRequestUserId, getCurrentRunProvenance, init_request_auth_context, setTelemetryIngestObserver, isTelemetryEnabled, _resolveIntegrationType, _resolveIntegrationProvider, initTelemetry, setTelemetryRoleResolver, setTelemetryFunctionResolver, isTelemetryReady, track, trackRelayed, telemetry, emitIntegrationConnected, init_telemetry, isRbacEnabled, decideAdmission, decideToolAdmission, grantLeadEquivalence, revokeLeadEquivalence, init_elevated_agents, LEGACY_RULES, setAuditSink, clearAuditSink, can, init_can, PermissionVerbSchema, init_rbac, randomChars, init_short_id, CHAT_SDK_ADAPTER_NAMES, CHAT_SDK_ADAPTER_SCHEMAS, ChatSdkAdaptersDraftSchema, firstIssueText, isAdapterEntryEnabled, init_schema, TELEMETRY_RANKING_KEY, PUBLIC_RANKING_ENABLED_KEY, RANKING_CATEGORIES, readTelemetryRanking, rankingFormSchema, buildListing, init_telemetry_ranking, resolveQuickJSPoolSize, init_quickjs_pool_config, SLACK_REACTION_DEFAULTS, SLACK_REACTION_CONFIG_KEYS, reactionName, isSlackIconConfigKey, reactionStatusIcon, iconPrefix, completedStatusIcon, init_reaction_shortcode, UI_SPEC_SCRIPT_ACTIONS_KEY, parseScriptActionAllowlist, init_script_allowlist, API_DRAINING_HEADER, API_DRAIN_MAX_MS_LIMIT, isApiDrainingResponse, init_api_drain2, isEnvExportRestrictedKey, init_config_env_export, parseEnabledTools, init_enabled_tools, parseFollowUpGateScheduleIds, isFollowUpGateScheduleId, init_follow_up_gate_schedule_ids, parseTaskToolManifest, CHAT_TASK_ONLY_TOOLS, isChatSdkTask, selectTaskTools, init_task_tool_manifest, tierConfigKey, init_model_tier_keys, isApiOnlyConfigKey, isInternalConfigKey, internalConfigKeyError, isHumanOnlyConfigKey, humanOnlyConfigKeyError, humanOnlyConfigKeyPageError, isReservedConfigKey, reservedKeyError, MAX_DB_RETENTION_DAYS, DB_RETENTION_TUNING_BOUNDS, APPS_JSON_COLUMN_MAX_BYTES_BOUNDS, CODEX_OAUTH_KEEP_WARM_MAX_AGE_HOURS_BOUNDS, SCHEDULER_INTERVAL_MS_BOUNDS, validateRuntimeTokenTtlHours, validateControllerTokenTtlDays, validateControllerGraceSec, validateConfigValue, validateConfigEntry, validateExportToEnv, init_swarm_config_guard, cachedUserRole, cachedUserFunction, invalidateTelemetryUserRole, configureOrgDomainPersistence, recomputeOrgDomain, scheduleOrgDomainRecompute, init_telemetry_identity, resolveTriggerSurface, emitTaskTelemetry, init_telemetry_trigger, MASKED_SECRET_VALUE, init_config_secrets, HeartbeatExpiryError, init_heartbeat_expiry, isEffectiveOutputSchema, init_output_schema, isRuntimePoolsEnabled, init_runtime_pools_flag, normalizeDate, normalizeDateRequired, init_date_utils, rowToAgent, updateAgentCredentialState2, updateAgentCredentialMissing2, AgentDeletedError2, isAgentDeleted2, createAgent2, getAgentById2, EXTENSION_AGENT_ROLE2, NOT_EXTENSION_AGENT_SQL2, isExtensionAgent2, extensionAgentAssignmentError2, ReservedAgentRoleError2, reservedRoleViolation2, ExtensionAgentAssignmentError2, getAllAgents2, getAgentStatusCounts2, getLeadAgent2, updateAgentStatus2, updateAgentMaxTasks2, updateAgentProvider2, setAgentHarnessProvider2, updateAgentCredStatus2, listAgentsWithCredStatusByProvider2, getAgentHarnessProviders2, updateAgentActivity2, MAX_EMPTY_POLLS2, incrementEmptyPollCount2, resetEmptyPollCount2, shouldBlockPolling2, deleteAgent2, getActiveTaskCount2, hasCapacity2, getRemainingCapacity2, updateAgentStatusFromCapacity2, isPoolAffinityEnforcementEnabled2, buildRoutingAffinityFromAgent2, isAgentEligibleForTask2, getAgentDailyTaskCounts2, init_agents, closeSlackTreeIfSettled, getSlackThreadsOfTasks, slackThreadHasBotReplySince, slackThreadHasOutcomeWork, observeSlackTreeVisibility, getSlackProcessingThreads, init_slack_trees, WorkflowReplayStateError, init_workflow_replay, getWorkflowRunTriggeredByAgentId, getWorkflowRunSummary, getWorkflowRunStepsSlimByRunId, WORKFLOW_RUN_TREE_MAX_DEPTH, WorkflowRunTreeError, getRunLineageBlock, getWorkflowRunTreeIds, getWorkflowRunStatus, getOpenWorkflowTreeTaskIds, getTaskIdsWithDependents, workflowRunTreeHasOpenWork, getWorkflowRunTree, cancelOpenWorkflowTreeSteps, disarmWorkflowTreeRetries, cancelLiveWorkflowTreeRuns, getChildWorkflowRunId, isParentStepAttemptCurrent, getRunningSubWorkflowSteps, getWorkflowRunParent, getWorkflowRunLineage, getSettledChildRunParentSteps, emitRunFinished, createForeachChildSteps, createForeachAttemptSteps, init_workflow_runs, OpenAI2, init_openai2, LEARNING_TTL_DAYS, LEARNING_DUPLICATE_MIN_SIMILARITY, CANDIDATE_SET_MULTIPLIER, isGraphExpansionEnabled, EMBEDDING_DIMENSIONS, init_constants2, LONGTERM_ROOT, LEARNINGS_ROOT, MEMORY_KEY_PATTERN, MEMORY_KEY_PATTERN_MESSAGE, MEMORY_KEY_MAX_LENGTH, isLongtermKey, longtermKeyError, isConsolidatedKey, consolidatedKeyMessage, resolveStoreKey, init_key_paths, computeScore, rerank, init_reranker, isReviewTaskId, dropReviewTaskCompletions, init_review_recall_filter, searchMemoryCandidates, init_search_candidates, memorySearchReader, init_search_reader, rowToCandidate, init_sqlite_store, getEmbeddingProvider2, resetEmbeddingProvider2, getMemoryStore2, init_memory, embeddingProvider2, computeScriptEmbedding2, writeScriptEmbedding2, embedScript2, searchScripts2, reembedAllScripts2, init_embeddings, upsertScriptByName, getScript, getGlobalScriptContentHashes, getScriptById, getScriptVersion, listScripts, listScriptVersions, deleteScript, touchScratchScriptLastUsed, restoreScratchScriptLastUsedIfUnchanged, createScriptApi, listScriptApisForScript, getScriptApiById, getScriptApiSecret, updateScriptApi, rotateScriptApiSecret, deleteScriptApi, recordScriptApiUsage, init_db3, oauthSecretName, registerStoredSecret, loadSecretRegistry, init_secret_registry, getDefaultAuthorizationIdForProvider, getOAuthApp, getOAuthAppById, getOAuthAppIdByProvider, createOAuthApp, updateOAuthAppById, upsertOAuthApp, listAuthorizationsForApp, getAuthorizationById, upsertAuthorization, updateAuthorizationTokens, updateAuthorizationIdentity, deleteAuthorizationById, deleteAuthorizationsForApp, createOAuthPending, consumeOAuthPending, gcOAuthPending, markAuthorizationRefreshFailed, hasOAuthTokens, getOAuthTokens, listAuthorizationSweepRows, listKeepAliveAuthorizations, deleteOAuthTokens, acquireOAuthRefreshLock, releaseOAuthRefreshLock, init_oauth, normalizeVcsRepo, vcsRepoName, vcsRepoUrlMatches, init_vcs_repo_match, taskModelPin, resumedTaskModelSelection, init_model_pin, normalizeModelKey, init_pricing_normalize, buildModelsDevSeedRows, seedPricingFromModelsDev, init_seed_pricing, buildCatalogEntries, replaceModelCatalog, touchModelCatalogCheckedAt, countModelCatalog, getModelCatalogMeta, updateModelCatalogMeta, upsertModelCatalogOverlay, deleteModelCatalogOverlay, expireMatchedOverlays, applyOverlayPricingRows, reloadModelsCatalog, loadModelsCatalog, init_model_catalog_store, listHarnessModelSupport, recordHarnessModelSupport, agentRanModel, getAgentHarnessCliVersion, setAgentHarnessCliVersion, init_harness_model_support, sanitizeModelTierOverrides, parseModelTierOverridesHeader, modelTierOverridesDiffer, setAgentModelTierOverrides, previewModelTiers, recordClaimModelResolution, init_model_tier_resolution, harnessModelErrorFor, poolTaskRunsOnHarness, explicitModelError, explicitModelErrorForAgent, init_model_validation2, runtimeReadsRepoSecrets, configPools, checkProfileForAgent, formatProfileCheckFailures, init_model_profile_check, startTaskSearchBackfill, stopTaskSearchBackfill, init_search_index, rowToAgentTask, getTaskById2, getChildTasks2, TASK_LINEAGE_LIMITS2, getTaskLineage2, hasNonTerminalResumeChild2, SUPERSEDED_RESUME_REPAIR_WINDOW_MS2, getSupersededTasksWithoutResume2, getSupersededTasksWithUnsettledDependents2, hasNonTerminalRerouteDecisionChild2, getTasksByAgentId2, getTasksDispatchedFrom2, getAgentCurrentTask2, getTasksByStatus2, findTaskByVcs2, findActiveTasksByVcs2, findTaskByGitHub2, readableSessionCondition, getAllTasks2, getTasksCount2, getTaskStats2, getCompletedSlackTasks2, getPendingSlackRelayTasks2, markSlackRelayAttempted2, markSlackRelayDelivered2, markFinalizedSlackRelaysDelivered2, getPendingChatRelayTasks2, giveUpStaleChatRelays2, markChatRelayAttempted2, recordChatRelayError2, markChatRelayDelivered2, markChatRelayGivenUp2, getRecentlyFinishedWorkerTasks2, markTasksNotified2, resetTasksNotified2, getInProgressSlackTasks2, getSlackTasksMissingTree2, getInProgressTasksByContextKey2, isLinearTrackerContextKey2, findExistingLinearTrackerContextWork2, getLatestTaskByContextKey2, getLatestScriptRunStepTaskByContextKey2, getAgentWorkingOnThread2, getLatestActiveTaskInThread2, getLatestLeadTaskInThread2, getAgentWorkingOnContextKey2, getLatestTaskByContextKeyPrefix2, getLatestActiveTaskByContextKey2, getLatestLeadTaskByContextKey2, getFirstTaskInThread2, getMostRecentTaskInThread2, findCompletedTasksInThread2, findRecentFailedTaskInThread2, countAgentDispatchesInThread2, findRecentCancelledTaskInThread2, init_read, MODEL_PROFILE_CONFIG_KEY, hasUnreadableCredentialAllowlist, listModelProfiles, getModelProfileByName, createModelProfile, updateModelProfile, TASK_HOLDS_PROFILE_SQL, repairWindowStart, modelProfileReferences, modelProfileRefError, isModelNameTakenError, deleteModelProfile, MAX_MODEL_PROFILE_FALLBACKS, modelProfileFallbacksError, taskProfileError, scheduleProfileUpdate, init_model_profiles, SESSION_ACTIVITY_REFRESH_MIN_INTERVAL_MS2, refreshActiveSessionOnActivity2, getActiveSessionById, init_active_sessions, STEERING_MOVED_ERROR, SteeringRequestError, SteeringBlockedError, isSteeringEnabled, getTaskSteeringFields, getTaskSteeringFieldsForTasks, promotePendingSteeringForTask, markSteeringUndeliverable, carryUnhandledSteering, requestSteering, init_steering2, onTaskStarted, init_task_lifecycle_events, listApprovalRequestSummaries2, getPendingApprovalVoteState2, recordApprovalVotes2, getPendingApprovalsForTasks2, approvalCancellationNotificationKey, listUndeliveredCancelledApprovalRequestIds, init_approvals, computeContentHash2, createContextVersion2, getLatestContextVersion2, getContextVersion2, getContextVersionHistory2, AssetKeyMovesBlockedError2, assertAssetKeyMovesAllowed2, moveTaskChainKeyInTx2, moveSessionChains, moveKeyFavorites, listPrefixRoots, listSharedPrefixRoots, init_session_moves, getSessionGroupKey, sessionSummaryQuery, getSessionReadState, getSessionTree, triageSessionList, init_session_tree, setHumanFreeQueueListener, reclassifyTaskHumanFree, drainHumanFreeReclassifyQueue, init_human_free, channelTopic, addWorkerSubscription, removeWorkerSubscription, listSubscribedWorkerAgents, init_channels, publishWorkerNudge, init_worker_nudges, createTask2, getPendingTaskForAgent2, assignUnassignedTaskPending2, startTask2, updateTaskClaudeSessionId2, recordTaskProviderIfUnset2, updateTaskTitle2, updateTaskTags2, setTaskTitleIfUnset2, completeTask2, failTask2, overwriteTerminalTaskResultText2, cancelTask2, skipTask2, supersedeTask2, markWorkflowStepTaskSuperseded2, settleSupersededTaskDependents2, backfillSupersedeTaskResumeTaskId2, pauseTask2, resumeTask2, getPausedTasksForAgent2, getOrphanedInProgressTasksForAgent2, resetOrphanedInProgressTasksForAgent2, getRecentlyCancelledTasksForAgent2, deleteTask2, updateTaskProgress2, init_write, quoteSqlIdentifier, USER_REFERENCE_COLUMNS_SQL, userReferenceRewriteSql, WORKFLOW_CONTEXT_REQUESTER_SQL, init_user_references, IdempotencyKeyTakenError, workflowRequestFingerprint, findAcceptedWorkflowOperation, assertWorkflowIdempotencyKeyUnused, recordAcceptedWorkflowOperation, init_workflow_idempotency, PINNED_WORKFLOW_KEYS2, toPinnedDefinition2, pinWorkflowDefinition2, getRunWorkflow2, deleteOrphanedRunDefinitions, init_workflow_run_definitions, recordKeySeatMismatch2, recordKeyValidation2, retirePoolKeyStatus, init_api_keys, getScriptRunExecutionArgs2, getScriptRunFollowUpGuard2, setScriptRunFollowUpGuard2, setSkillUpdatedBy2, literalPrefixPattern2, getSlackRenderV2ActivatedAt2, ensureSlackRenderV2Activation2, getSlackDelegationActivatedAt2, ensureSlackDelegationActivation2, isPendingSlackMessage2, isSettledSlackMessage2, recordSlackMessage2, reserveSlackMessage2, bindSlackMessageTimestamp2, updateSlackMessageRecord2, markSlackTreeRendered2, deleteSlackMessageRecord2, getSlackTreeMessage2, getSlackTreeMessageByThread2, getSlackOutcomeMessage2, getResolvableDeferralOutcomes2, markSlackDeferralResolved2, noteSlackOutcomeDeliveryFailure2, abandonSlackOutcomeDelivery2, getSlackTreeMessages2, getSlackMessageByChannelTs2, getSlackTasksInThread2, listSlackThreadsAwaitingHuman2, isSlackThreadAwaitingHuman2, markTaskSlackReplySent2, setSlackMessageTracking2, updateTaskVcs2, insertTaskAttachment2, recordTaskPullRequestAttachments2, getAssetKeyMappingByProvider2, upsertAssetKeyMapping2, getAssetKeyMapping2, listAssetSummaries2, moveAssetKey2, deleteTaskAttachment2, replaceTaskAttachment2, getTaskAttachments2, createSteeringMessage2, getSteeringMessagesForTask2, getSteeringMessageById2, getPendingSteeringForTask2, getPendingSteeringForAgent2, markSteeringDelivered2, markSteeringHandled2, markSteeringPromoted2, cancelPendingSteeringForTask2, hasPendingSteering2, getAgentWithTasks2, getAllAgentsWithTasks2, createLogEntry2, getLogsByAgentId2, getLogsByTaskId2, getLogsByTaskIdAndEventType2, getLogsByTaskIdChronological2, getLogsByEventType2, getAllLogs2, findRecentSimilarTasks2, createTaskExtended2, claimTask2, releaseTask2, acceptTask2, rejectTask2, moveTaskToBacklog2, moveTaskFromBacklog2, promoteDraftTask2, refreshDraftTaskLease2, promoteAbandonedDraftTasks2, releaseStaleReviewingTasks2, releaseStaleOfferedTasksForOfflineAgents2, getOfferedTasksForAgent2, claimOfferedTask2, getUnassignedTasksCount2, getUnassignedTaskIds2, getUnassignedTaskIdsForAgent2, checkDependencies2, getDependentTasks2, cascadeFailDependents2, updateAgentProfile2, updateAgentName2, createChannel2, getMessageById2, getChannelById2, getChannelByName2, getAllChannels2, deleteChannel2, postMessage2, getChannelMessages2, updateReadState2, getLastReadAt2, getUnreadMessages2, getMentionsForAgent2, getInboxSummary2, claimMentions2, releaseMentionProcessing2, releaseStaleMentionProcessing2, createService2, getServiceById2, getServiceByAgentAndName2, getServicesByAgentId2, getAllServices2, updateServiceStatus2, deleteService2, upsertService2, deleteServicesByAgentId2, createSessionLogs2, getSessionLogsByTaskId2, getSessionLogsBySession2, createSessionCost2, getSessionCostsByTaskId2, getSessionCostsByAgentId2, getAllSessionCosts2, getSessionCostsFiltered2, UNATTRIBUTED_USER_ID2, getSessionCostSummary2, getAttributionByPerson2, getDashboardCostSummary2, createInboxMessage2, getInboxMessageById2, getUnreadInboxMessages2, claimInboxMessages2, markInboxMessageRead2, markInboxMessageResponded2, markInboxMessageDelegated2, releaseStaleProcessingInbox2, getConcurrentContext2, getScheduledTasks2, getScheduledTaskById2, getScheduledTaskByName2, createScheduledTask2, updateScheduledTask2, deleteScheduledTask2, getDueScheduledTasks2, autoEncryptLegacyPlaintextSecrets2, maskSecrets2, getSwarmConfigs2, getInjectableGlobalConfigs2, getSwarmConfigById2, getSwarmConfigLookupById2, upsertSwarmConfig2, emitBuiltInIntegrationConnectedOnce2, deleteSwarmConfig2, deleteSwarmConfigByKey2, getResolvedConfig2, getSwarmRepos2, getSwarmRepoById2, getSwarmRepoByName2, getSwarmRepoByUrl2, createSwarmRepo2, updateSwarmRepo2, deleteSwarmRepo2, getAgentMailInboxMapping2, getAgentMailInboxMappingsByAgent2, getAllAgentMailInboxMappings2, createAgentMailInboxMapping2, deleteAgentMailInboxMapping2, findTaskByAgentMailThread2, insertActiveSession2, deleteActiveSession2, deleteActiveSessionById2, getActiveSessions2, heartbeatActiveSession2, cleanupStaleSessions2, cleanupAgentSessions2, updateActiveSessionProviderSessionId2, getActiveSessionForTask2, reassociateSessionLogs2, getStalledInProgressTasks2, getStalePinnedResumes2, failPendingResumeIfUnclaimed2, getIdleWorkersWithCapacity2, getUnassignedPoolTasks2, getStaleUnassignedAffinityTasks2, getRecentFailedTasks2, getRecentCompletedCount2, getRecentFailedCount2, createWorkflow2, getWorkflow2, listWorkflows2, updateWorkflow2, deleteWorkflow2, getWorkflowsByScheduleId2, createWorkflowRun2, getWorkflowRun2, updateWorkflowRun2, listWorkflowRuns2, countWorkflowRuns2, listWorkflowRunsPage2, createWorkflowRunStep2, getWorkflowRunStep2, updateWorkflowRunStep2, getWorkflowRunStepsByRunId2, getStuckWorkflowRuns2, getLastSuccessfulRun2, getLastRunStart2, getRetryableSteps2, getCompletedStepNodeIds2, getTaskByWorkflowRunStepId2, detachTaskFromWorkflowRunStep2, getStepByIdempotencyKey2, getStepCountForNode2, getLatestStepForNode2, getCurrentStepForNode2, createWorkflowVersion2, getWorkflowVersions2, getWorkflowVersion2, createAppVersion2, getAppVersions2, getAppVersion2, createPage2, getPage2, getPageBySlug2, getLatestPageBySlug2, listPagesByAgent2, listAllPages2, countAllPages2, countPagesByAgent2, updatePage2, deletePage2, incrementPageViewCount2, createPageVersion2, getPageVersions2, getPageVersion2, createMetric2, getMetric2, getMetricBySlug2, listMetricsByAgent2, listAllMetrics2, countAllMetrics2, countMetricsByAgent2, updateMetric2, deleteMetric2, createMetricVersion2, getMetricVersions2, getMetricVersion2, getPromptTemplates2, getPromptTemplateById2, upsertPromptTemplate2, deletePromptTemplate2, resetPromptTemplateToDefault2, getPromptTemplateHistory2, resolvePromptTemplate2, checkoutPromptTemplate2, getAllChannelActivityCursors2, getChannelActivityCursor2, upsertChannelActivityCursor2, createApprovalRequest2, getApprovalRequestById2, resolveApprovalRequest2, cancelApprovalRequestById2, cancelPendingApprovalRequestsForRun2, listCancelledApprovalRequestsForRun2, listCancelledApprovalRequestsForStep2, claimApprovalCancellationNotification2, completeApprovalCancellationNotificationClaim2, releaseApprovalCancellationNotificationClaim2, updateApprovalRequestNotifications2, listApprovalRequests2, getStuckApprovalRuns2, getApprovalRequestByStepId2, getExpiredPendingApprovals2, getStaleApprovalRequests2, createWaitState2, getWaitStateById2, getWaitStateByStepId2, getDueWaitStates2, getPendingEventWaitNames2, getPendingWaitsByEvent2, resolveWaitState2, getStuckWaitRuns2, SKILL_FILE_LIMITS2, normalizeSkillFilePath2, createSkill2, updateSkill2, listSkillFileManifest2, getSkillFiles2, getSkillFile2, upsertSkillFile2, upsertSkillFiles2, deleteSkillFile2, deleteSkill2, getSkillById2, getSkillByName2, listSkills2, searchSkills2, installSkill2, getSystemDefaultSkills2, installSystemDefaultSkillsForAgent2, uninstallSkill2, getAgentSkills2, toggleAgentSkill2, createMcpServer2, emitMcpServerConnectedTelemetry2, updateMcpServer2, deleteMcpServer2, getMcpServerById2, getMcpServerByName2, listMcpServers2, installMcpServer2, uninstallMcpServer2, getAgentMcpServers2, createContextSnapshot2, getContextSnapshotsByTaskId2, getContextSnapshotsBySessionId2, getContextSummaryByTaskId2, getAvailableKeyIndices2, recordKeyUsage2, setApiKeyPlan2, markKeyRateLimited2, recordKeyAuthFailure2, recordKeyRateLimitWindows2, setApiKeyName2, clearKeyRateLimit2, getKeyStatuses2, getKeyCostSummary2, getUserById2, getAllUsers2, createUser2, updateUser2, deleteUser2, listInboxState2, upsertInboxState2, listFavorites2, listUserFavorites2, getFavoriteItemIdSet2, setFavorite2, setUserFavorite2, withFavoriteFlags2, listTaskTemplates2, getRootTaskChain2, listRecentSessions2, countSessions2, getBudget2, getBudgets2, upsertBudget2, deleteBudget2, getAllPricingRows2, getPricingRows2, getActivePricingRow2, insertPricingRow2, deletePricingRow2, getDailySpendForAgent2, getDailySpendGlobal2, getDailySpendForUser2, recordBudgetRefusalNotification2, getBudgetRefusalNotification2, getRecentBudgetRefusalNotifications2, hasBudgetRefusalNotificationToday2, setBudgetRefusalFollowUpTaskId2, getLiveAgentCounts2, getReadyAgentCounts2, getInstanceActivity2, getSwarmMetrics2, hasFirstCompletedTask2, getKv2, sweepExpiredKv2, sweepExpiredKvPrefix2, upsertKv2, claimKv2, deleteKv2, KvTypeCollisionError2, incrKv2, kvPrefixUpperBound2, listKv2, countKv2, createScriptRun2, recordInlineScriptRun2, getScriptRun2, getScriptRunByIdempotencyKey2, listScriptRuns2, countScriptRuns2, countActiveScriptRuns2, updateScriptRun2, updateScriptRunIfNotTerminal2, updateScriptRunIfRunning2, getRunningScriptRuns2, getScriptRunJournalStep2, upsertScriptRunJournalStep2, listScriptRunJournalSteps2, countScriptRunJournalSteps2, countScriptRunJournalAgentTaskSteps2, exports_db, init_db4 };