@desplega.ai/agent-swarm 2.7.7 → 2.7.9

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 (401) hide show
  1. package/dist/acp-adapter-dn4gdsgr.js +16 -0
  2. package/dist/{actions-3tt153af.js → actions-g563mbn2.js} +19 -19
  3. package/dist/{amp-adapter-njpts0yr.js → amp-adapter-q61w05eb.js} +3 -3
  4. package/dist/{anthropic-messages-xey2skwx.js → anthropic-messages-jkva0zps.js} +68 -78
  5. package/dist/{app-nky4378f.js → app-a66ssc4k.js} +3 -3
  6. package/dist/{assistant-jnb669pa.js → assistant-p477rjwj.js} +22 -22
  7. package/dist/{azure-openai-responses-26t7j9ra.js → azure-openai-responses-wgtqkbr3.js} +5 -10
  8. package/dist/boot-args-schema-h4qj462e.js +89 -0
  9. package/dist/{boot-reembed-9mgvaztt.js → boot-reembed-n1ehfbsw.js} +1 -1
  10. package/dist/{boot-reembed-qs2djdej.js → boot-reembed-qw4mc0pt.js} +1 -1
  11. package/dist/{boot-scrub-sweep-yjpdj7s1.js → boot-scrub-sweep-9w9jp4sm.js} +4 -4
  12. package/dist/{boot-seeds-5cm6ambd.js → boot-seeds-qdaf3sdy.js} +5 -4
  13. package/dist/{boxd-nv507va8.js → boxd-qbkxy6ap.js} +1 -1
  14. package/dist/{claude-adapter-fn287zmm.js → claude-adapter-348p5hx9.js} +8 -8
  15. package/dist/{claude-managed-adapter-dvs2xw5n.js → claude-managed-adapter-h74d06yz.js} +4 -4
  16. package/dist/{claude-managed-setup-wtdz2mj2.js → claude-managed-setup-7787fxtp.js} +5 -5
  17. package/dist/{claude-sdk-session-x91kqyhm.js → claude-sdk-session-hbszbt8a.js} +7901 -7718
  18. package/dist/{cli-cb2a8pna.js → cli-09kmfkmq.js} +4 -6
  19. package/dist/{cli-m0da8j35.js → cli-0whpms1z.js} +15 -10
  20. package/dist/{cli-5zx699j9.js → cli-12xyjhws.js} +29 -12
  21. package/dist/{cli-snpj5zbj.js → cli-1z4qggfe.js} +9 -36
  22. package/dist/{cli-e0kmphd6.js → cli-21159vea.js} +35 -12
  23. package/dist/{cli-s0qnd4wv.js → cli-28fq781p.js} +1 -1
  24. package/dist/{cli-qh4d4tvk.js → cli-2a8py3sx.js} +6 -6
  25. package/dist/{cli-adeegh7d.js → cli-2ccpqyyf.js} +412 -116
  26. package/dist/{cli-1p89xny0.js → cli-2r0jcc3k.js} +1 -1
  27. package/dist/{cli-rvtm68yy.js → cli-2xv18ywz.js} +2 -2
  28. package/dist/{cli-5xaqj21p.js → cli-3kd08rej.js} +1 -1
  29. package/dist/{cli-1c6tzt8g.js → cli-3tqcamp6.js} +13 -13
  30. package/dist/{cli-ae7mrdf9.js → cli-3vjhs18n.js} +4 -6
  31. package/dist/{cli-vfym7wmz.js → cli-3xcwp3z8.js} +10 -12
  32. package/dist/{cli-az48n0nr.js → cli-4caa1x7d.js} +67 -64
  33. package/dist/{cli-5jnhv72d.js → cli-4t0fmf3z.js} +30 -7
  34. package/dist/{cli-5b456bpf.js → cli-530hkwdy.js} +7 -9
  35. package/dist/{cli-pz4rk021.js → cli-54vrpgm0.js} +1 -1
  36. package/dist/{cli-ddaanqkd.js → cli-587857ys.js} +7 -7
  37. package/dist/{cli-r9jqcehk.js → cli-5mpy301f.js} +38 -2
  38. package/dist/{cli-cppkf404.js → cli-605nn699.js} +80 -43
  39. package/dist/{cli-6pfd54vx.js → cli-650zv9q9.js} +10 -10
  40. package/dist/cli-6pzk82fd.js +778 -0
  41. package/dist/{cli-gz6q4eve.js → cli-715t1gx6.js} +9 -9
  42. package/dist/{cli-08bmz9z9.js → cli-9aezs55w.js} +10 -12
  43. package/dist/{cli-tgrv9cjx.js → cli-9r5gtwjr.js} +3 -3
  44. package/dist/{cli-pc6n7fre.js → cli-a0657jmf.js} +2 -2
  45. package/dist/{cli-pjctyea3.js → cli-agyaeef4.js} +3 -3
  46. package/dist/cli-b932gexn.js +5266 -0
  47. package/dist/{cli-e46hg0xw.js → cli-bc779n4v.js} +3 -3
  48. package/dist/{cli-jtjtabxe.js → cli-btc9cb4c.js} +78 -5
  49. package/dist/{cli-caj33vcq.js → cli-btf6fw39.js} +5 -5
  50. package/dist/{cli-q3tkegby.js → cli-cseh6f8w.js} +5 -5
  51. package/dist/{cli-n6bv12jn.js → cli-cvs2r2vq.js} +23 -14
  52. package/dist/{cli-tfyyvzx6.js → cli-cyn9v8zr.js} +17 -2
  53. package/dist/{cli-a22h291q.js → cli-d6521kb5.js} +1 -1
  54. package/dist/{cli-1b7btd38.js → cli-d84byzn8.js} +869 -5
  55. package/dist/{cli-wx3rhnm0.js → cli-eddnyg3t.js} +1 -1
  56. package/dist/{cli-nmzhp1b5.js → cli-ejkvvqbe.js} +55 -46
  57. package/dist/{cli-ftyxyspd.js → cli-eqtfgfr6.js} +1 -1
  58. package/dist/{cli-mthwvjre.js → cli-f2zenhja.js} +1 -1
  59. package/dist/{cli-ws19768n.js → cli-fayav105.js} +624 -227
  60. package/dist/{cli-ferkkrg9.js → cli-fjggej24.js} +2 -2
  61. package/dist/{cli-g7s47cc5.js → cli-fsgttth8.js} +123 -102
  62. package/dist/{cli-8305gbq0.js → cli-gce09r66.js} +5 -5
  63. package/dist/{cli-mkk9rnzz.js → cli-gxy8y1dt.js} +51 -4
  64. package/dist/{cli-fyt2g4wd.js → cli-hae9j8sv.js} +288 -76
  65. package/dist/{cli-agfm16v9.js → cli-hg42n3hx.js} +12 -12
  66. package/dist/{cli-qghe0h66.js → cli-hwprv9e4.js} +8 -10
  67. package/dist/{cli-yndmfxb3.js → cli-hxpyc9sn.js} +3 -3
  68. package/dist/{cli-72v799xn.js → cli-jfx48xrj.js} +10 -12
  69. package/dist/{cli-dhar9qay.js → cli-jrp1dt73.js} +2 -2
  70. package/dist/{cli-98rw5dt5.js → cli-jrzkw01m.js} +2 -2
  71. package/dist/{cli-ayayvfg4.js → cli-k70e3x9e.js} +24 -20
  72. package/dist/{cli-583frbyr.js → cli-kchjb7qy.js} +1 -1
  73. package/dist/{cli-cm5yqn35.js → cli-kf3pxxdg.js} +1 -0
  74. package/dist/{cli-fmjd0t1y.js → cli-m0cy2vyf.js} +2 -2
  75. package/dist/{cli-4zsenjhy.js → cli-m5akxq8q.js} +16 -3
  76. package/dist/{cli-73jzwksr.js → cli-m88rpzkh.js} +6 -3
  77. package/dist/{cli-95jzxcp3.js → cli-mnrkgg60.js} +4 -4
  78. package/dist/{cli-p82cnnjq.js → cli-ms5m5r1y.js} +1 -1
  79. package/dist/{cli-fy6x31ps.js → cli-n5yexkdg.js} +1 -0
  80. package/dist/{cli-wk5yrfwd.js → cli-neyag5p6.js} +191 -85
  81. package/dist/cli-p0m0p34z.js +9321 -0
  82. package/dist/{cli-yyj3j5m4.js → cli-p17970qv.js} +8 -10
  83. package/dist/{cli-6vcp76qk.js → cli-p74md7t8.js} +42 -23
  84. package/dist/{cli-rjcbm574.js → cli-pr0eze3x.js} +2 -2
  85. package/dist/{cli-35rsp8ye.js → cli-qkdmz8c8.js} +1 -1
  86. package/dist/{cli-rtt8g4v9.js → cli-qmd3mse0.js} +2 -2
  87. package/dist/{cli-je518txm.js → cli-qzt90yze.js} +20 -20
  88. package/dist/cli-rkc97c6a.js +39 -0
  89. package/dist/{cli-75gkpjvw.js → cli-rvhdmjvt.js} +8 -12
  90. package/dist/{cli-6g0hb4cp.js → cli-rwymrnaz.js} +18608 -9089
  91. package/dist/{cli-3fg0bdcv.js → cli-serm8zrx.js} +6 -6
  92. package/dist/{cli-g08zdaec.js → cli-sgs5k6yd.js} +1 -1
  93. package/dist/{cli-afkqkrtw.js → cli-sya22y84.js} +21 -9
  94. package/dist/{cli-318r69gq.js → cli-t73cas91.js} +440 -9
  95. package/dist/{cli-e5bzrn01.js → cli-tqq0hspb.js} +2 -2
  96. package/dist/{cli-pq73h5mz.js → cli-v3cf1ts9.js} +3 -3
  97. package/dist/{cli-bfv7vdg6.js → cli-varqt4d1.js} +28 -16
  98. package/dist/{cli-k899ehvh.js → cli-vxh6acp7.js} +6 -6
  99. package/dist/{cli-g83s9ewh.js → cli-xfjrc279.js} +1 -1
  100. package/dist/{cli-k1nje3v3.js → cli-xk879m3k.js} +129 -115
  101. package/dist/{cli-7cx2m6t2.js → cli-y5rbvxhc.js} +2 -2
  102. package/dist/{cli-8sckt74b.js → cli-y8nbefpb.js} +41 -19
  103. package/dist/{cli-81p9jd57.js → cli-yab6sh8p.js} +9 -3
  104. package/dist/{cli-srye3vdt.js → cli-ybjdc978.js} +1 -1
  105. package/dist/{cli-k5671be5.js → cli-zcfpsfzf.js} +5 -5
  106. package/dist/{cli-vf078p3e.js → cli-zfqg6fzn.js} +1 -1
  107. package/dist/{cli-k8196sh2.js → cli-zgv8gxgs.js} +9 -8
  108. package/dist/cli.js +34 -52
  109. package/dist/{cloudflare-workers-ai-system-one-ef2a980q.js → cloudflare-workers-ai-system-one-9y1zx3pt.js} +2 -2
  110. package/dist/{codex-adapter-cf2yxe9m.js → codex-adapter-ysq6bzha.js} +7 -7
  111. package/dist/{codex-hook-a0c6g6t6.js → codex-hook-fac6175r.js} +1 -1
  112. package/dist/{codex-login-y0pmff1c.js → codex-login-bcda78ge.js} +2 -2
  113. package/dist/{codex-session-runner-6vfzdgbd.js → codex-session-runner-qakzfx93.js} +8 -8
  114. package/dist/{commands-t3mfy7vn.js → commands-rs7hkv9r.js} +3 -3
  115. package/dist/{controller-q7xrbaz0.js → controller-r5x9bg6e.js} +4 -4
  116. package/dist/{controllers-connect-c6nm70kg.js → controllers-connect-498hrxvk.js} +24 -24
  117. package/dist/{cursor-adapter-ftd81ga8.js → cursor-adapter-d46qszer.js} +2 -2
  118. package/dist/{db-vemtpmcc.js → db-pm96nhdb.js} +6 -2
  119. package/dist/{db-dk572x25.js → db-s13dqhr6.js} +3 -3
  120. package/dist/{devin-adapter-r9phbnc9.js → devin-adapter-z46ep5ph.js} +1 -1
  121. package/dist/{dispatcher-kh7ecxh9.js → dispatcher-j3h81t7m.js} +18 -18
  122. package/dist/{docker-c1a3gqmf.js → docker-866qpzt9.js} +2 -2
  123. package/dist/{dsh-adapter-v8628r89.js → dsh-adapter-rw0d5rc4.js} +2 -2
  124. package/dist/{e2b-fr12yccx.js → e2b-jkwfhbcv.js} +2 -2
  125. package/dist/{e2b-x6ywzak3.js → e2b-s16txnpx.js} +2 -3
  126. package/dist/{easter-egg-3d-nenw4x63.js → easter-egg-3d-qtgfxgze.js} +1 -1
  127. package/dist/{embedding-space-0jepb239.js → embedding-space-xh8p4q4x.js} +6 -6
  128. package/dist/{embeddings-xxt49yxg.js → embeddings-wp745m91.js} +1 -1
  129. package/dist/{event-bus-g0ka3pbw.js → event-bus-e66gh7cc.js} +1 -1
  130. package/dist/{execute-1mhw6e4x.js → execute-2fzb9z74.js} +1 -1
  131. package/dist/{external-channel-55v12e60.js → external-channel-ys21h3sy.js} +2 -2
  132. package/dist/fx-adapter-vz0b9z3g.js +19 -0
  133. package/dist/{google-generative-ai-v94hr7h0.js → google-generative-ai-ytpgncx9.js} +7 -12
  134. package/dist/{google-vertex-g7vr6cf8.js → google-vertex-tqhze5j7.js} +7 -12
  135. package/dist/grok-adapter-spea7zkj.js +19 -0
  136. package/dist/handlers-crckt5dq.js +32 -0
  137. package/dist/{heartbeat-k42svnr0.js → heartbeat-8phn1kdq.js} +21 -21
  138. package/dist/{hook-6nphweh0.js → hook-amcj4s10.js} +16 -11
  139. package/dist/{hook-114m7hap.js → hook-bc6n49qn.js} +5 -5
  140. package/dist/{http-r8cc4wz7.js → http-7374brv5.js} +854 -332
  141. package/dist/index-4x08sjtk.js +30 -0
  142. package/dist/{index-6cxzwfen.js → index-5a9jtqde.js} +26 -26
  143. package/dist/index-8ybffts4.js +37 -0
  144. package/dist/{index-nh3wyqdt.js → index-c9y31ytf.js} +16 -16
  145. package/dist/{index-h39zbx67.js → index-hsad2t3r.js} +31 -31
  146. package/dist/index-nfy4kkg5.js +33 -0
  147. package/dist/{index-e3s8wmxy.js → index-p4hjwbvw.js} +1 -1
  148. package/dist/{index-k7fj52d3.js → index-q5cmtbz5.js} +6 -6
  149. package/dist/{index-fpk4bcd9.js → index-w4m9z29z.js} +1 -1
  150. package/dist/{keepalive-x060nt9p.js → keepalive-wy29kbrg.js} +4 -4
  151. package/dist/lead-zdqxsvjn.js +71 -0
  152. package/dist/{llama-cpp-classify-s5c47rwh.js → llama-cpp-classify-nfgswa1m.js} +2 -2
  153. package/dist/{maintenance-2xxfexhf.js → maintenance-h2ds9w6c.js} +1 -1
  154. package/dist/{mistral-conversations-3gjpdb4b.js → mistral-conversations-a45tx39a.js} +29 -51
  155. package/dist/{oauth-refresh-sweep-fckc4ar5.js → oauth-refresh-sweep-q7mtbyp3.js} +3 -3
  156. package/dist/{onboard-zc48j237.js → onboard-vw8r2fdw.js} +68 -16
  157. package/dist/{openai-codex-responses-8pbxq9h5.js → openai-codex-responses-k9gapdze.js} +7 -11
  158. package/dist/{openai-completions-rm00s912.js → openai-completions-xd579js7.js} +50 -58
  159. package/dist/{openai-decisions-8v957r2r.js → openai-decisions-q3hh60wr.js} +2 -2
  160. package/dist/{openai-responses-agxpf96k.js → openai-responses-4d5dx3c7.js} +5 -10
  161. package/dist/{opencode-adapter-r690h1cr.js → opencode-adapter-mtb0953j.js} +6 -6
  162. package/dist/{openrouter-images-3ecegv0d.js → openrouter-images-xr9gme9x.js} +4 -3
  163. package/dist/{otel-impl-r5xbh81q.js → otel-impl-j42czw3r.js} +2 -2
  164. package/dist/{pi-messages-pchtw4he.js → pi-messages-hjbv8v10.js} +28 -12
  165. package/dist/{pi-mono-adapter-c7v8sdec.js → pi-mono-adapter-zk8pg9jr.js} +30 -27
  166. package/dist/{pricing-refresh-3pmre11v.js → pricing-refresh-x7nhv23d.js} +3 -3
  167. package/dist/{rbac-roles-3vbshwsb.js → rbac-roles-9044425x.js} +16 -2
  168. package/dist/rbac-roles-bzvee6cf.js +37 -0
  169. package/dist/{render-v2-pxykkbab.js → render-v2-t7bn4skz.js} +3 -3
  170. package/dist/{resume-adda0bwy.js → resume-x94gemep.js} +7 -7
  171. package/dist/{runtime-fnbm7stk.js → runtime-breq6fmv.js} +1 -1
  172. package/dist/{session-access-2fvamrdc.js → session-access-q7dmqjvt.js} +7 -5
  173. package/dist/{session-source-backfill-08xvv0sm.js → session-source-backfill-440ysamr.js} +3 -3
  174. package/dist/{setup-1aqmvmh1.js → setup-07n4727s.js} +1 -1
  175. package/dist/{typesafe-system-one-0bmqcxfg.js → typesafe-system-one-f2en2knd.js} +2 -2
  176. package/dist/virtual-modules-z5h6mcyf.js +362 -0
  177. package/dist/{work-objects-9s0yrm5j.js → work-objects-pnq5y534.js} +21 -21
  178. package/dist/{worker-follow-up-3q78fqmr.js → worker-follow-up-7z1gfkr8.js} +18 -18
  179. package/dist/worker-y62rvvq3.js +71 -0
  180. package/dist/{x-vmmye1kb.js → x-2fyrt5pp.js} +2 -2
  181. package/openapi.json +1268 -276
  182. package/package.json +10 -10
  183. package/src/apps/catalog.generated.json +299 -82
  184. package/src/apps/page-validator.ts +115 -2
  185. package/src/be/connector-codes.ts +21 -6
  186. package/src/be/db/model-profiles.ts +1 -1
  187. package/src/be/db/session-tree.ts +9 -5
  188. package/src/be/db/session-visibility.ts +25 -9
  189. package/src/be/db/tasks/read.ts +33 -6
  190. package/src/be/db/tasks/write.ts +77 -7
  191. package/src/be/db-queries/tracker.ts +4 -2
  192. package/src/be/db.ts +53 -19
  193. package/src/be/improvements.ts +416 -0
  194. package/src/be/migrations/271_subscription_usage_model.sql +30 -0
  195. package/src/be/migrations/274_improvements.sql +27 -0
  196. package/src/be/migrations/275_task_dispatched_by.sql +8 -0
  197. package/src/be/model-validation.ts +19 -1
  198. package/src/be/rbac-roles.ts +144 -1
  199. package/src/be/runtime-pools/routing.ts +1 -1
  200. package/src/be/scripts/boot-args-schema.ts +95 -0
  201. package/src/be/scripts/extract-schema.ts +15 -10
  202. package/src/be/seed-scripts/catalog/boot-triage.inline.ts +1 -1
  203. package/src/be/seed-scripts/catalog/boot-triage.ts +1 -1
  204. package/src/be/seed-scripts/catalog/get-child-outputs.ts +1 -1
  205. package/src/be/seed-scripts/catalog/wait-for-task.ts +1 -1
  206. package/src/be/swarm-config-guard.ts +8 -0
  207. package/src/be/users.ts +64 -5
  208. package/src/cli.tsx +5 -25
  209. package/src/commands/claude-managed-setup.ts +1 -1
  210. package/src/commands/codex-login.ts +1 -1
  211. package/src/commands/e2b.ts +0 -1
  212. package/src/commands/onboard/agent-fs-version.ts +1 -1
  213. package/src/commands/onboard/compose-generator.ts +0 -1
  214. package/src/commands/onboard/dashboard-url.ts +31 -0
  215. package/src/commands/onboard/steps/generate.tsx +17 -1
  216. package/src/commands/onboard/steps/post-dashboard.tsx +9 -3
  217. package/src/commands/onboard.tsx +19 -6
  218. package/src/commands/runner.ts +143 -105
  219. package/src/extensions/contract-types.generated.ts +1 -1
  220. package/src/hooks/hook.ts +13 -5
  221. package/src/http/agents.ts +7 -1
  222. package/src/http/all-routes.ts +1 -0
  223. package/src/http/approval-requests.ts +32 -50
  224. package/src/http/auth.ts +5 -4
  225. package/src/http/codex-oauth-accounts.ts +31 -23
  226. package/src/http/codex-oauth-device.ts +3 -3
  227. package/src/http/codex-oauth-keep-warm.ts +1 -1
  228. package/src/http/improvements.ts +317 -0
  229. package/src/http/index.ts +10 -0
  230. package/src/http/mcp-oauth.ts +6 -0
  231. package/src/http/mcp-servers.ts +8 -0
  232. package/src/http/models-catalog.ts +1 -1
  233. package/src/http/operator-actor.ts +2 -1
  234. package/src/http/pages-public.ts +38 -1
  235. package/src/http/person-responder.ts +66 -0
  236. package/src/http/poll.ts +3 -4
  237. package/src/http/prompt-templates.ts +1 -1
  238. package/src/http/schedules.ts +4 -0
  239. package/src/http/script-runs.ts +6 -1
  240. package/src/http/session-access.ts +61 -6
  241. package/src/http/sessions.ts +67 -9
  242. package/src/http/tasks.ts +53 -9
  243. package/src/http/user-roles.ts +11 -2
  244. package/src/http/users.ts +224 -105
  245. package/src/http/utils.ts +2 -1
  246. package/src/http/workflows.ts +11 -7
  247. package/src/prompts/session-templates.ts +1 -0
  248. package/src/providers/acp-targets.ts +1 -1
  249. package/src/providers/amp-adapter.ts +1 -1
  250. package/src/providers/codex-adapter.ts +17 -3
  251. package/src/providers/codex-models.ts +4 -3
  252. package/src/providers/codex-oauth/auth-json.ts +14 -18
  253. package/src/providers/codex-oauth/device.ts +49 -15
  254. package/src/providers/codex-oauth/flow.ts +2 -1
  255. package/src/providers/codex-oauth/storage.ts +2 -2
  256. package/src/providers/pi-mono-adapter.ts +8 -0
  257. package/src/providers/pricing-sources.md +16 -1
  258. package/src/providers/swarm-events-shared.ts +15 -2
  259. package/src/rbac/legacy-policy.ts +3 -0
  260. package/src/rbac/permissions.ts +15 -0
  261. package/src/scheduler/deferred-task-waits.ts +9 -4
  262. package/src/scripts-runtime/extract-args-schema.ts +3 -1
  263. package/src/scripts-runtime/swarm-sdk.ts +1 -1
  264. package/src/scripts-runtime/types/swarm-extension.d.ts +31 -28
  265. package/src/server-user.ts +1 -1
  266. package/src/server.ts +2 -0
  267. package/src/slack/ack.ts +68 -26
  268. package/src/slack/blocks.ts +1 -0
  269. package/src/slack/reaction-shortcode.ts +8 -2
  270. package/src/slack/render-v2.ts +72 -20
  271. package/src/slack/task-output.ts +4 -1
  272. package/src/slack/thread-buffer.ts +2 -2
  273. package/src/tasks/task-skip.ts +28 -0
  274. package/src/tasks/terminal-result-guard.ts +3 -2
  275. package/src/telemetry.ts +28 -1
  276. package/src/tests/agentmail-inbox-mapping.test.ts +73 -0
  277. package/src/tests/api-drain-worker-e2e.test.ts +69 -2
  278. package/src/tests/approval-requests.test.ts +58 -0
  279. package/src/tests/apps-catalog-drift.test.ts +35 -0
  280. package/src/tests/apps-catalog-table.test.ts +203 -0
  281. package/src/tests/apps-element-assembly.test.ts +28 -0
  282. package/src/tests/apps-smart-links.test.ts +151 -0
  283. package/src/tests/apps-table-filters-migration.test.ts +96 -0
  284. package/src/tests/apps-table-selection-migration.test.ts +95 -0
  285. package/src/tests/chatgpt-subscription-session-bench.test.ts +2 -2
  286. package/src/tests/claude-managed-setup.test.ts +36 -0
  287. package/src/tests/claude-worker-parity.test.ts +2 -2
  288. package/src/tests/codex-adapter.test.ts +32 -2
  289. package/src/tests/codex-login.test.ts +2 -2
  290. package/src/tests/codex-oauth-accounts.test.ts +48 -12
  291. package/src/tests/codex-oauth-credential-info.test.ts +77 -1
  292. package/src/tests/codex-oauth-device.test.ts +61 -1
  293. package/src/tests/codex-oauth-keep-warm.test.ts +2 -2
  294. package/src/tests/codex-oauth.test.ts +25 -4
  295. package/src/tests/codex-pool.test.ts +2 -2
  296. package/src/tests/codex-swarm-events.test.ts +43 -1
  297. package/src/tests/context-window.test.ts +14 -0
  298. package/src/tests/db-queries-tracker.test.ts +2 -1
  299. package/src/tests/db-task-read-contract.test.ts +3 -0
  300. package/src/tests/db-task-write-contract.test.ts +3 -0
  301. package/src/tests/deferred-task-wake.test.ts +7 -2
  302. package/src/tests/deploy-one-box.test.ts +39 -1
  303. package/src/tests/docs-index-footprint.test.js +3 -3
  304. package/src/tests/e2e-coverage-contract.test.ts +235 -0
  305. package/src/tests/empty-output-schema.test.ts +160 -0
  306. package/src/tests/env-flag.test.ts +1 -0
  307. package/src/tests/explicit-model-validation.test.ts +14 -0
  308. package/src/tests/fixtures/onboard/content.compose.yml.txt +0 -4
  309. package/src/tests/fixtures/onboard/dev.compose.yml.txt +0 -3
  310. package/src/tests/fixtures/onboard/full-all.compose.yml.txt +0 -11
  311. package/src/tests/fixtures/onboard/full.compose.yml.txt +0 -11
  312. package/src/tests/fixtures/onboard/research.compose.yml.txt +0 -3
  313. package/src/tests/fixtures/onboard/solo.compose.yml.txt +0 -1
  314. package/src/tests/fixtures/prs-app-definition.json.txt +784 -0
  315. package/src/tests/fixtures/prs-filters-migration.patch.json.txt +318 -0
  316. package/src/tests/fixtures/prs-selection-migration.patch.json.txt +373 -0
  317. package/src/tests/fixtures/runner-identity-refresh.ts +3 -0
  318. package/src/tests/fixtures/runner-legacy-resume-prompt.ts +3 -0
  319. package/src/tests/fixtures/runner-task-start-reads.ts +140 -0
  320. package/src/tests/hook-ping-me-order.test.ts +85 -0
  321. package/src/tests/http-api-integration.test.ts +2 -2
  322. package/src/tests/http-users.test.ts +63 -0
  323. package/src/tests/improvements-payload.test.ts +200 -0
  324. package/src/tests/improvements-route.test.ts +419 -0
  325. package/src/tests/install-sh-setup-url.test.ts +190 -0
  326. package/src/tests/mcp-input-caps.test.ts +4 -3
  327. package/src/tests/merge-gate-detect-changes.test.ts +22 -0
  328. package/src/tests/onboard-dashboard-output.test.ts +109 -0
  329. package/src/tests/onboard-dashboard-url.test.ts +83 -0
  330. package/src/tests/operator-granted-credentials.test.ts +561 -0
  331. package/src/tests/operator-granted-role-wire.test.ts +222 -0
  332. package/src/tests/pages-authed-mode.test.ts +13 -2
  333. package/src/tests/pi-mono-adapter.test.ts +39 -4
  334. package/src/tests/rbac-engine.test.ts +3 -0
  335. package/src/tests/runner-context-usage.test.ts +118 -0
  336. package/src/tests/runner-legacy-options.test.ts +55 -0
  337. package/src/tests/runner-slot-reconcile.test.ts +38 -0
  338. package/src/tests/runner-task-start-reads.test.ts +58 -0
  339. package/src/tests/script-connections.test.ts +2 -0
  340. package/src/tests/script-executor-quickjs.test.ts +2 -0
  341. package/src/tests/script-runs-http.test.ts +57 -0
  342. package/src/tests/scripts-boot-args-schema.test.ts +181 -0
  343. package/src/tests/scripts-runtime.test.ts +24 -0
  344. package/src/tests/sdk-store-progress-skipped.test.ts +155 -0
  345. package/src/tests/send-task-dispatched-by.test.ts +129 -0
  346. package/src/tests/session-costs-model-key-normalize.test.ts +59 -0
  347. package/src/tests/session-dispatched-tasks.test.ts +115 -0
  348. package/src/tests/session-sharing.test.ts +402 -3
  349. package/src/tests/slack-file-tools-attachments.test.ts +95 -3
  350. package/src/tests/slack-reaction-config.test.ts +40 -0
  351. package/src/tests/slack-render-v2.test.ts +120 -0
  352. package/src/tests/slack-skip-reaction.test.ts +203 -0
  353. package/src/tests/store-progress-skipped.test.ts +159 -0
  354. package/src/tests/submit-improvement-tool.test.ts +82 -0
  355. package/src/tests/subscription-usage-migration.test.ts +57 -0
  356. package/src/tests/swarm-config-reserved-keys.test.ts +3 -0
  357. package/src/tests/telemetry-endpoint-override.test.ts +27 -0
  358. package/src/tests/tool-annotations.test.ts +1 -1
  359. package/src/tests/trigger-claiming.test.ts +2 -0
  360. package/src/tests/workflow-system-one-extraction.test.ts +29 -0
  361. package/src/tools/create-channel.ts +1 -1
  362. package/src/tools/defer-task.ts +1 -1
  363. package/src/tools/manage-user.ts +88 -58
  364. package/src/tools/register-agentmail-inbox.ts +5 -0
  365. package/src/tools/repos/update-repo.ts +1 -1
  366. package/src/tools/request-human-input.ts +1 -1
  367. package/src/tools/send-task.ts +4 -1
  368. package/src/tools/slack-read.ts +61 -33
  369. package/src/tools/store-progress.ts +39 -8
  370. package/src/tools/submit-improvement.ts +68 -0
  371. package/src/tools/tool-config.ts +3 -0
  372. package/src/tools/tracker/tracker-unlink.ts +2 -1
  373. package/src/tools/workflows/retry-workflow-run.ts +3 -0
  374. package/src/types.ts +16 -2
  375. package/src/utils/context-window.ts +6 -1
  376. package/src/utils/output-schema.ts +23 -0
  377. package/src/utils/request-auth-context.ts +6 -1
  378. package/src/workflows/executors/system-one-providers.ts +25 -6
  379. package/src/workflows/recovery.ts +8 -4
  380. package/src/workflows/resume.ts +19 -0
  381. package/templates/skills/apps/SKILL.md +22 -11
  382. package/templates/skills/apps/content.md +22 -11
  383. package/templates/skills/swarm-scripts/SKILL.md +1 -1
  384. package/templates/skills/swarm-scripts/content.md +1 -1
  385. package/templates/skills/work-on-task/SKILL.md +1 -1
  386. package/templates/skills/work-on-task/content.md +1 -1
  387. package/dist/acp-adapter-7b4vk3h5.js +0 -16
  388. package/dist/cli-5c4hjzne.js +0 -873
  389. package/dist/cli-excnnjg2.js +0 -20222
  390. package/dist/cli-pc5znp64.js +0 -364
  391. package/dist/cli-vz22fyqv.js +0 -428
  392. package/dist/fx-adapter-bs8wqrk5.js +0 -19
  393. package/dist/grok-adapter-gpjqmkcq.js +0 -19
  394. package/dist/handlers-zxmp1ta4.js +0 -32
  395. package/dist/index-a8phxqnk.js +0 -37
  396. package/dist/index-k6h00t4c.js +0 -30
  397. package/dist/index-xrz7te8h.js +0 -33
  398. package/dist/lead-956sd2yc.js +0 -71
  399. package/dist/rbac-roles-910mmkgz.js +0 -26
  400. package/dist/virtual-modules-d2pjk9j1.js +0 -59
  401. package/dist/worker-y15hy08h.js +0 -71
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  ALL_TOOLS,
3
3
  init_tool_config
4
- } from "./cli-fy6x31ps.js";
4
+ } from "./cli-n5yexkdg.js";
5
5
  import {
6
6
  normalizeAssetKey,
7
7
  defaultAssetKey,
@@ -29,7 +29,7 @@ import {
29
29
  SessionCostModelBreakdownSchema,
30
30
  PageThemeTokensSchema,
31
31
  init_types4
32
- } from "./cli-n6bv12jn.js";
32
+ } from "./cli-cvs2r2vq.js";
33
33
  import {
34
34
  CODEX_AUTH_FAILURE_BENCH_THRESHOLD,
35
35
  CODEX_AUTH_FAILURE_BENCH_MS,
@@ -51,7 +51,7 @@ import {
51
51
  init_identity_field_budget,
52
52
  contentSha256,
53
53
  init_profile_sync
54
- } from "./cli-tgrv9cjx.js";
54
+ } from "./cli-9r5gtwjr.js";
55
55
  import {
56
56
  isSlackConfigured,
57
57
  init_config4
@@ -80,7 +80,7 @@ import {
80
80
  deriveProviderFromKeyType,
81
81
  selectCredential,
82
82
  init_credentials2
83
- } from "./cli-g83s9ewh.js";
83
+ } from "./cli-xfjrc279.js";
84
84
  import {
85
85
  registerTemplate,
86
86
  getAllTemplateDefinitions,
@@ -88,14 +88,14 @@ import {
88
88
  configureDbResolver,
89
89
  init_resolver,
90
90
  init_session_templates
91
- } from "./cli-cm5yqn35.js";
91
+ } from "./cli-kf3pxxdg.js";
92
92
  import {
93
93
  runtimeHarnessSections,
94
94
  init_runtime_model_catalog
95
- } from "./cli-1p89xny0.js";
95
+ } from "./cli-2r0jcc3k.js";
96
96
  import {
97
97
  init_zod
98
- } from "./cli-k5671be5.js";
98
+ } from "./cli-zcfpsfzf.js";
99
99
  import {
100
100
  string2,
101
101
  uuid,
@@ -106,17 +106,17 @@ import {
106
106
  object2,
107
107
  strictObject2,
108
108
  looseObject,
109
- union2,
109
+ union3,
110
110
  discriminatedUnion,
111
111
  record2,
112
112
  _enum2,
113
113
  literal2,
114
114
  exports_iso
115
- } from "./cli-agfm16v9.js";
115
+ } from "./cli-hg42n3hx.js";
116
116
  import {
117
117
  init_package,
118
118
  package_default
119
- } from "./cli-6pfd54vx.js";
119
+ } from "./cli-650zv9q9.js";
120
120
  import {
121
121
  realtimeBus,
122
122
  init_bus
@@ -130,18 +130,17 @@ import {
130
130
  init_node_env
131
131
  } from "./cli-rgeadyvq.js";
132
132
  import {
133
+ chatgptSubscriptionModelId,
134
+ isAlias,
135
+ parseAlias,
136
+ harnessModelMismatch,
137
+ init_src2,
133
138
  scrubSecrets,
134
139
  scrubObject,
135
140
  registerVolatileSecret,
136
141
  registerSensitiveKeyName,
137
142
  init_secret_scrubber
138
- } from "./cli-1b7btd38.js";
139
- import {
140
- isAlias,
141
- parseAlias,
142
- harnessModelMismatch,
143
- init_src2
144
- } from "./cli-5c4hjzne.js";
143
+ } from "./cli-d84byzn8.js";
145
144
  import {
146
145
  __toCommonJS,
147
146
  __commonJS,
@@ -2684,6 +2683,23 @@ var init_request_auth_context = __esm(() => {
2684
2683
  // src/telemetry.ts
2685
2684
  import { randomUUID } from "node:crypto";
2686
2685
  import { existsSync } from "node:fs";
2686
+ function resolveTelemetryEndpoint(raw) {
2687
+ const value = raw?.trim();
2688
+ if (!value)
2689
+ return DEFAULT_TELEMETRY_ENDPOINT;
2690
+ let url;
2691
+ try {
2692
+ url = new URL(value);
2693
+ } catch {
2694
+ console.warn("[telemetry] DESPLEGA_TELEMETRY_ENDPOINT is not a URL; using the default sink");
2695
+ return DEFAULT_TELEMETRY_ENDPOINT;
2696
+ }
2697
+ const loopback = url.hostname === "127.0.0.1" || url.hostname === "localhost" || url.hostname === "[::1]";
2698
+ if (url.protocol === "https:" || url.protocol === "http:" && loopback)
2699
+ return url.toString();
2700
+ console.warn("[telemetry] DESPLEGA_TELEMETRY_ENDPOINT must be https, or http on loopback; using the default sink");
2701
+ return DEFAULT_TELEMETRY_ENDPOINT;
2702
+ }
2687
2703
  function setTelemetryIngestObserver(observer) {
2688
2704
  ingestObserver = observer;
2689
2705
  }
@@ -2971,7 +2987,7 @@ function emitIntegrationConnected(type, providerSlug, firstOfType) {
2971
2987
  }, { userId: getCurrentRequestUserId() ?? null });
2972
2988
  return true;
2973
2989
  }
2974
- var TELEMETRY_ENDPOINT = "https://proxy.desplega.sh/v1/events", 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;
2990
+ 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;
2975
2991
  var init_telemetry = __esm(() => {
2976
2992
  init_package();
2977
2993
  init_config4();
@@ -2980,6 +2996,7 @@ var init_telemetry = __esm(() => {
2980
2996
  init_node_env();
2981
2997
  init_org_website();
2982
2998
  init_request_auth_context();
2999
+ TELEMETRY_ENDPOINT = resolveTelemetryEndpoint(process.env.DESPLEGA_TELEMETRY_ENDPOINT);
2983
3000
  CLOUD_HOST_EXACT = new Set([
2984
3001
  "agent-swarm-mcp.desplega.sh",
2985
3002
  "agent-swarm.dev",
@@ -3267,7 +3284,7 @@ var init_types = __esm(() => {
3267
3284
  message: "oauthAuthorizationId is required when authKind is oauth.",
3268
3285
  path: ["oauthAuthorizationId"]
3269
3286
  });
3270
- CredentialBindingsDocumentSchema = union2([
3287
+ CredentialBindingsDocumentSchema = union3([
3271
3288
  array2(CredentialBindingSchema),
3272
3289
  object2({ bindings: array2(CredentialBindingSchema) })
3273
3290
  ]);
@@ -5085,7 +5102,7 @@ var init_runtime2 = __esm(() => {
5085
5102
  // src/telemetry-identity.ts
5086
5103
  async function loadUserRole(userId) {
5087
5104
  try {
5088
- const { getUserGrant } = await import("./rbac-roles-910mmkgz.js");
5105
+ const { getUserGrant } = await import("./rbac-roles-bzvee6cf.js");
5089
5106
  const grant = await getUserGrant(userId);
5090
5107
  const role = grant.grantsAll ? "admin" : "member";
5091
5108
  const user = await getDbClient2().get("SELECT json_extract(metadata, '$.jobFunction') AS jobFunction FROM users WHERE id = ? AND json_valid(metadata)", [userId]);
@@ -5412,6 +5429,15 @@ var init_heartbeat_expiry = __esm(() => {
5412
5429
  };
5413
5430
  });
5414
5431
 
5432
+ // src/utils/output-schema.ts
5433
+ function isEffectiveOutputSchema(schema) {
5434
+ return !!schema && typeof schema === "object" && !Array.isArray(schema) && Object.keys(schema).length > 0;
5435
+ }
5436
+ function normalizeOutputSchema(schema) {
5437
+ return isEffectiveOutputSchema(schema) ? schema : undefined;
5438
+ }
5439
+ var init_output_schema = () => {};
5440
+
5415
5441
  // src/utils/runtime-pools-flag.ts
5416
5442
  function isRuntimePoolsEnabled(env = process.env) {
5417
5443
  return isEnvFlagEnabled("RUNTIME_POOLS_ENABLED", false, env);
@@ -6214,6 +6240,7 @@ function rowToAgentTask(row) {
6214
6240
  mentionChannelId: row.mentionChannelId ?? undefined,
6215
6241
  dir: row.dir ?? undefined,
6216
6242
  parentTaskId: row.parentTaskId ?? undefined,
6243
+ dispatchedByTaskId: row.dispatchedByTaskId ?? undefined,
6217
6244
  claudeSessionId: row.claudeSessionId ?? undefined,
6218
6245
  model: row.model ?? undefined,
6219
6246
  modelTier: parseModelTier(row.modelTier) ?? undefined,
@@ -6227,7 +6254,7 @@ function rowToAgentTask(row) {
6227
6254
  scheduleId: row.scheduleId ?? undefined,
6228
6255
  workflowRunId: row.workflowRunId ?? undefined,
6229
6256
  workflowRunStepId: row.workflowRunStepId ?? undefined,
6230
- outputSchema: row.outputSchema ? JSON.parse(row.outputSchema) : undefined,
6257
+ outputSchema: row.outputSchema ? normalizeOutputSchema(JSON.parse(row.outputSchema)) : undefined,
6231
6258
  followUpConfig,
6232
6259
  contextKey: row.contextKey ?? undefined,
6233
6260
  compactionCount: row.compactionCount ?? undefined,
@@ -6373,7 +6400,7 @@ async function hasNonTerminalResumeChild2(parentId) {
6373
6400
  const row = await getDbClient2().get(`SELECT 1 FROM agent_tasks
6374
6401
  WHERE parentTaskId = ?
6375
6402
  AND taskType = 'resume'
6376
- AND status NOT IN ('completed', 'failed', 'cancelled', 'superseded')
6403
+ AND status NOT IN ('completed', 'failed', 'cancelled', 'superseded', 'skipped')
6377
6404
  LIMIT 1`, [parentId]);
6378
6405
  return row !== undefined && row !== null;
6379
6406
  }
@@ -6411,7 +6438,7 @@ async function hasNonTerminalRerouteDecisionChild2(parentId) {
6411
6438
  const row = await getDbClient2().get(`SELECT 1 FROM agent_tasks
6412
6439
  WHERE parentTaskId = ?
6413
6440
  AND taskType = 'reroute-decision'
6414
- AND status NOT IN ('completed', 'failed', 'cancelled', 'superseded')
6441
+ AND status NOT IN ('completed', 'failed', 'cancelled', 'superseded', 'skipped')
6415
6442
  LIMIT 1`, [parentId]);
6416
6443
  return row !== undefined && row !== null;
6417
6444
  }
@@ -6420,6 +6447,18 @@ async function getTasksByAgentId2(agentId, readableBy) {
6420
6447
  const rows = await getDbClient2().query(`SELECT * FROM agent_tasks WHERE agentId = ?${readable ? ` AND ${readable.sql}` : ""} ORDER BY createdAt DESC`, [agentId, ...readable?.params ?? []]);
6421
6448
  return rows.map(rowToAgentTask);
6422
6449
  }
6450
+ async function getTasksDispatchedFrom2(taskIds) {
6451
+ if (taskIds.length === 0)
6452
+ return [];
6453
+ const ids = JSON.stringify(taskIds);
6454
+ const rows = await getDbClient2().query(`SELECT t.*,
6455
+ (SELECT SUM(totalCostUsd) FROM session_costs WHERE session_costs.taskId = t.id) AS totalCostUsd
6456
+ FROM agent_tasks t
6457
+ WHERE t.dispatchedByTaskId IN (SELECT value FROM json_each(?))
6458
+ AND t.id NOT IN (SELECT value FROM json_each(?))
6459
+ ORDER BY t.createdAt, t.rowid`, [ids, ids]);
6460
+ return rows.map(rowToAgentTask);
6461
+ }
6423
6462
  async function getAgentCurrentTask2(agentId) {
6424
6463
  const row = await getDbClient2().get("SELECT * FROM agent_tasks WHERE agentId = ? AND status = 'in_progress' ORDER BY lastUpdatedAt DESC LIMIT 1", [agentId]);
6425
6464
  return row ? rowToAgentTask(row) : null;
@@ -6432,7 +6471,7 @@ async function findTaskByVcs2(vcsRepo, vcsNumber, vcsProvider) {
6432
6471
  const providerClause = vcsProvider === "github" ? "(vcsProvider = ? OR vcsProvider IS NULL)" : "vcsProvider = ?";
6433
6472
  const row = await getDbClient2().get(`SELECT * FROM agent_tasks
6434
6473
  WHERE vcsRepo = ? AND vcsNumber = ? AND ${providerClause}
6435
- AND status NOT IN ('completed', 'failed', 'cancelled', 'superseded')
6474
+ AND status NOT IN ('completed', 'failed', 'cancelled', 'superseded', 'skipped')
6436
6475
  ORDER BY createdAt DESC
6437
6476
  LIMIT 1`, [vcsRepo, vcsNumber, vcsProvider]);
6438
6477
  return row ? rowToAgentTask(row) : null;
@@ -6441,7 +6480,7 @@ async function findActiveTasksByVcs2(vcsRepo, vcsNumber, vcsProvider) {
6441
6480
  const providerClause = vcsProvider === "github" ? "(vcsProvider = ? OR vcsProvider IS NULL)" : "vcsProvider = ?";
6442
6481
  const rows = await getDbClient2().query(`SELECT * FROM agent_tasks
6443
6482
  WHERE vcsRepo = ? AND vcsNumber = ? AND ${providerClause}
6444
- AND status NOT IN ('completed', 'failed', 'cancelled', 'superseded')
6483
+ AND status NOT IN ('completed', 'failed', 'cancelled', 'superseded', 'skipped')
6445
6484
  ORDER BY createdAt DESC`, [vcsRepo, vcsNumber, vcsProvider]);
6446
6485
  return rows.map(rowToAgentTask);
6447
6486
  }
@@ -6956,7 +6995,7 @@ async function findExistingLinearTrackerContextWork2(contextKey, delegatingParen
6956
6995
  SELECT * FROM agent_tasks
6957
6996
  WHERE contextKey = ?
6958
6997
  AND id NOT IN (SELECT id FROM lineage)
6959
- AND status NOT IN ('completed', 'failed', 'cancelled', 'superseded')
6998
+ AND status NOT IN ('completed', 'failed', 'cancelled', 'superseded', 'skipped')
6960
6999
  ORDER BY lastUpdatedAt DESC
6961
7000
  LIMIT 1`, [...lineageParams, contextKey]);
6962
7001
  if (activeRow) {
@@ -7155,6 +7194,7 @@ var dependencies2, TASK_PREVIEW_LENGTH = 300, TASK_PREVIEW_BYTES, SIBLING_OPEN =
7155
7194
  var init_read = __esm(() => {
7156
7195
  init_key();
7157
7196
  init_types4();
7197
+ init_output_schema();
7158
7198
  init_provider_metadata();
7159
7199
  init_secret_scrubber();
7160
7200
  init_agents();
@@ -7344,7 +7384,7 @@ async function clearAgentModelProfileOnOverrideChange(agentId, key, before, afte
7344
7384
  await getDbClient2().run("DELETE FROM swarm_config WHERE scope = 'agent' AND scopeId = ? AND key = ?", [agentId, MODEL_PROFILE_CONFIG_KEY]);
7345
7385
  }
7346
7386
  var MODEL_PROFILE_CONFIG_KEY = "MODEL_PROFILE", TASK_HOLDS_PROFILE_SQL = `(
7347
- t.status NOT IN ('completed', 'failed', 'cancelled', 'superseded')
7387
+ t.status NOT IN ('completed', 'failed', 'cancelled', 'superseded', 'skipped')
7348
7388
  OR (t.status = 'superseded'
7349
7389
  AND t.workflowRunStepId IS NULL
7350
7390
  AND (t.finishedAt IS NULL OR t.finishedAt > ?)
@@ -7388,6 +7428,8 @@ var init_page_theme_tokens = __esm(() => {
7388
7428
  function sessionViewerCondition(viewer) {
7389
7429
  const shared = `r.id IN (SELECT s.rootTaskId FROM session_shares s
7390
7430
  WHERE s.revokedAt IS NULL AND (s.userId IS NULL OR s.userId = ?))`;
7431
+ if (viewer.scope === "all" && viewer.readAll)
7432
+ return { sql: "1", params: [] };
7391
7433
  if (viewer.scope === "mine") {
7392
7434
  return { sql: "r.requestedByUserId = ?", params: [viewer.userId] };
7393
7435
  }
@@ -7402,15 +7444,17 @@ function sessionViewerCondition(viewer) {
7402
7444
  params: [viewer.userId, viewer.userId]
7403
7445
  };
7404
7446
  }
7405
- function sessionMineCondition(userId) {
7447
+ function sessionMineCondition(userId, readAll) {
7406
7448
  const machine = MACHINE_SESSION_SOURCES.map(() => "?").join(",");
7407
7449
  const humanSystem = HUMAN_SYSTEM_TASK_TYPES.map(() => "?").join(",");
7408
- return {
7409
- sql: `((r.requestedByUserId = ? AND (r.source NOT IN (${machine})
7410
- OR (r.source = 'system' AND r.taskType IN (${humanSystem}))))
7411
- OR r.id IN (SELECT s.rootTaskId FROM session_shares s
7412
- WHERE s.revokedAt IS NULL AND (s.userId IS NULL OR s.userId = ?)))`,
7413
- params: [userId, ...MACHINE_SESSION_SOURCES, ...HUMAN_SYSTEM_TASK_TYPES, userId]
7450
+ const humanStarted = `(r.source NOT IN (${machine})
7451
+ OR (r.source = 'system' AND r.taskType IN (${humanSystem})))`;
7452
+ const humanParams = [...MACHINE_SESSION_SOURCES, ...HUMAN_SYSTEM_TASK_TYPES];
7453
+ const shared = `r.id IN (SELECT s.rootTaskId FROM session_shares s
7454
+ WHERE s.revokedAt IS NULL AND (s.userId IS NULL OR s.userId = ?))`;
7455
+ return readAll ? { sql: `(${humanStarted} OR ${shared})`, params: [...humanParams, userId] } : {
7456
+ sql: `((r.requestedByUserId = ? AND ${humanStarted}) OR ${shared})`,
7457
+ params: [userId, ...humanParams, userId]
7414
7458
  };
7415
7459
  }
7416
7460
  var MACHINE_SESSION_SOURCES, HUMAN_SYSTEM_TASK_TYPES;
@@ -7678,7 +7722,7 @@ function sessionRootFilter(opts = {}) {
7678
7722
  if (opts.tree)
7679
7723
  conditions.push("+r.requestedByUserId IS NOT NULL");
7680
7724
  if (opts.mine)
7681
- add(sessionMineCondition(opts.viewer.userId));
7725
+ add(sessionMineCondition(opts.viewer.userId, opts.viewer.readAll));
7682
7726
  }
7683
7727
  if (opts.keyPrefix) {
7684
7728
  const { lo, hi } = keyPrefixRange(opts.keyPrefix);
@@ -7765,8 +7809,8 @@ function sessionSummaryQuery(opts = {}) {
7765
7809
  ]
7766
7810
  };
7767
7811
  }
7768
- async function getSessionReadState(rootId, userId, now) {
7769
- const query = sessionSummaryQuery({ rootId, viewer: { userId, scope: "all" }, now });
7812
+ async function getSessionReadState(rootId, userId, now, readAll) {
7813
+ const query = sessionSummaryQuery({ rootId, viewer: { userId, scope: "all", readAll }, now });
7770
7814
  const row = await getDbClient2().get(`SELECT readState, lastActivityAt FROM (${query.sql})`, query.params);
7771
7815
  return row?.readState ? { readState: row.readState, lastActivityAt: row.lastActivityAt } : null;
7772
7816
  }
@@ -7833,7 +7877,7 @@ function threadPromptPreview(prompt) {
7833
7877
  }
7834
7878
  async function getSessionTree(actor, now, opts = {}) {
7835
7879
  const query = sessionSummaryQuery({
7836
- ...actor.kind === "user" ? { viewer: { userId: actor.userId, scope: "all" } } : {},
7880
+ ...actor.kind === "user" ? { viewer: { userId: actor.userId, scope: "all", readAll: actor.readAll } } : {},
7837
7881
  now,
7838
7882
  tree: true,
7839
7883
  mine: opts.mine
@@ -7926,12 +7970,12 @@ async function getSessionTree(actor, now, opts = {}) {
7926
7970
  }
7927
7971
  return result;
7928
7972
  }
7929
- async function triageSessionList(userId, filters, action) {
7973
+ async function triageSessionList(userId, filters, action, readAll) {
7930
7974
  const now = filters.now ?? new Date().toISOString();
7931
7975
  const query = sessionSummaryQuery({
7932
7976
  ...filters,
7933
7977
  now,
7934
- viewer: { userId, scope: "all" },
7978
+ viewer: { userId, scope: "all", readAll },
7935
7979
  tree: true
7936
7980
  });
7937
7981
  const status = action === "done" ? "done" : "open";
@@ -8451,7 +8495,7 @@ async function startTask2(taskId) {
8451
8495
  return null;
8452
8496
  }
8453
8497
  const row = await getDbClient2().get(`UPDATE agent_tasks SET status = 'in_progress', lastUpdatedAt = strftime('%Y-%m-%dT%H:%M:%fZ', 'now')
8454
- WHERE id = ? AND status NOT IN ('completed', 'failed', 'cancelled', 'superseded') RETURNING *`, [taskId]);
8498
+ WHERE id = ? AND status NOT IN ('completed', 'failed', 'cancelled', 'superseded', 'skipped') RETURNING *`, [taskId]);
8455
8499
  if (row && oldTask) {
8456
8500
  try {
8457
8501
  await dependencies3.createLogEntry({
@@ -8529,7 +8573,7 @@ async function completeTask2(id, output, options) {
8529
8573
  const row = await getDbClient2().transaction(async () => {
8530
8574
  const finishedAt = new Date().toISOString();
8531
8575
  let completed = await getDbClient2().get(`UPDATE agent_tasks SET status = ?, finishedAt = ?, lastUpdatedAt = strftime('%Y-%m-%dT%H:%M:%fZ', 'now')
8532
- WHERE id = ? AND status NOT IN ('completed', 'failed', 'cancelled', 'superseded') RETURNING *`, ["completed", finishedAt, id]);
8576
+ WHERE id = ? AND status NOT IN ('completed', 'failed', 'cancelled', 'superseded', 'skipped') RETURNING *`, ["completed", finishedAt, id]);
8533
8577
  if (!completed)
8534
8578
  return null;
8535
8579
  if (scrubbedOutput) {
@@ -8576,7 +8620,7 @@ async function completeTask2(id, output, options) {
8576
8620
  });
8577
8621
  } catch {}
8578
8622
  getDbClient2().afterCommit(() => {
8579
- import("./event-bus-g0ka3pbw.js").then(({ workflowEventBus }) => {
8623
+ import("./event-bus-e66gh7cc.js").then(({ workflowEventBus }) => {
8580
8624
  workflowEventBus.emit("task.completed", {
8581
8625
  taskId: id,
8582
8626
  output: scrubbedOutput,
@@ -8604,7 +8648,7 @@ async function failTask2(id, reason, opts = {}) {
8604
8648
  const finishedAt = new Date().toISOString();
8605
8649
  const scrubbedReason = scrubSecrets(reason);
8606
8650
  const row = await getDbClient2().get(`UPDATE agent_tasks SET status = 'failed', failureReason = ?, finishedAt = ?, lastUpdatedAt = strftime('%Y-%m-%dT%H:%M:%fZ', 'now')
8607
- WHERE id = ? AND status NOT IN ('completed', 'failed', 'cancelled', 'superseded')
8651
+ WHERE id = ? AND status NOT IN ('completed', 'failed', 'cancelled', 'superseded', 'skipped')
8608
8652
  AND (? IS NULL OR lastUpdatedAt = ?) RETURNING *`, [
8609
8653
  scrubbedReason,
8610
8654
  finishedAt,
@@ -8631,7 +8675,7 @@ async function failTask2(id, reason, opts = {}) {
8631
8675
  });
8632
8676
  } catch {}
8633
8677
  getDbClient2().afterCommit(() => {
8634
- import("./event-bus-g0ka3pbw.js").then(({ workflowEventBus }) => {
8678
+ import("./event-bus-e66gh7cc.js").then(({ workflowEventBus }) => {
8635
8679
  workflowEventBus.emit("task.failed", {
8636
8680
  taskId: id,
8637
8681
  failureReason: scrubbedReason,
@@ -8664,7 +8708,7 @@ async function overwriteTerminalTaskResultText2(id, patch) {
8664
8708
  const failureReason = patch.failureReason !== undefined ? scrubSecrets(patch.failureReason) : task.failureReason ?? null;
8665
8709
  const row = await getDbClient2().transaction(async () => {
8666
8710
  const updated = await getDbClient2().get(`UPDATE agent_tasks SET output = ?, failureReason = ?
8667
- WHERE id = ? AND status IN ('completed', 'failed', 'cancelled', 'superseded')
8711
+ WHERE id = ? AND status IN ('completed', 'failed', 'cancelled', 'superseded', 'skipped')
8668
8712
  RETURNING *`, [output, failureReason, id]) ?? null;
8669
8713
  if (updated && patch.output !== undefined) {
8670
8714
  await dependencies3.reconcileTaskPullRequestAttachments(id, updated.agentId, [
@@ -8686,7 +8730,7 @@ async function cancelTask2(id, reason, options = {}) {
8686
8730
  const finishedAt = new Date().toISOString();
8687
8731
  const cancelReason = scrubSecrets(reason ?? "Cancelled by user");
8688
8732
  const row = await getDbClient2().get(`UPDATE agent_tasks SET status = 'cancelled', failureReason = ?, finishedAt = ?, lastUpdatedAt = strftime('%Y-%m-%dT%H:%M:%fZ', 'now')
8689
- WHERE id = ? AND status NOT IN ('completed', 'failed', 'cancelled', 'superseded') RETURNING *`, [cancelReason, finishedAt, id]);
8733
+ WHERE id = ? AND status NOT IN ('completed', 'failed', 'cancelled', 'superseded', 'skipped') RETURNING *`, [cancelReason, finishedAt, id]);
8690
8734
  if (row && oldTask) {
8691
8735
  const recipients = new Set([row.agentId, row.offeredTo]);
8692
8736
  getDbClient2().afterCommit(() => {
@@ -8713,7 +8757,7 @@ async function cancelTask2(id, reason, options = {}) {
8713
8757
  });
8714
8758
  } catch {}
8715
8759
  getDbClient2().afterCommit(() => {
8716
- import("./event-bus-g0ka3pbw.js").then(({ workflowEventBus }) => {
8760
+ import("./event-bus-e66gh7cc.js").then(({ workflowEventBus }) => {
8717
8761
  workflowEventBus.emit("task.cancelled", {
8718
8762
  taskId: id,
8719
8763
  agentId: row.agentId,
@@ -8725,7 +8769,7 @@ async function cancelTask2(id, reason, options = {}) {
8725
8769
  if (row.source === "schedule" && row.taskType === "deferred" && row.parentTaskId) {
8726
8770
  getDbClient2().afterCommit(async () => {
8727
8771
  try {
8728
- const { createWorkerTaskFollowUp } = await import("./worker-follow-up-3q78fqmr.js");
8772
+ const { createWorkerTaskFollowUp } = await import("./worker-follow-up-7z1gfkr8.js");
8729
8773
  await createWorkerTaskFollowUp({
8730
8774
  task: rowToAgentTask(row),
8731
8775
  status: "failed",
@@ -8751,6 +8795,46 @@ async function cancelTask2(id, reason, options = {}) {
8751
8795
  }
8752
8796
  return row ? rowToAgentTask(row) : null;
8753
8797
  }
8798
+ async function skipTask2(id, reason) {
8799
+ const oldTask = await getTaskById2(id);
8800
+ if (!oldTask)
8801
+ return null;
8802
+ if (isTerminalTaskStatus(oldTask.status))
8803
+ return null;
8804
+ const finishedAt = new Date().toISOString();
8805
+ const skipReason = scrubSecrets(reason);
8806
+ const row = await getDbClient2().get(`UPDATE agent_tasks SET status = 'skipped', failureReason = ?, finishedAt = ?, lastUpdatedAt = strftime('%Y-%m-%dT%H:%M:%fZ', 'now')
8807
+ WHERE id = ? AND status NOT IN ('completed', 'failed', 'cancelled', 'superseded', 'skipped') RETURNING *`, [skipReason, finishedAt, id]);
8808
+ if (!row)
8809
+ return null;
8810
+ try {
8811
+ await dependencies3.createLogEntry({
8812
+ eventType: "task_status_change",
8813
+ taskId: id,
8814
+ agentId: row.agentId ?? undefined,
8815
+ oldValue: oldTask.status,
8816
+ newValue: "skipped",
8817
+ metadata: { reason: skipReason }
8818
+ });
8819
+ } catch {}
8820
+ getDbClient2().afterCommit(() => {
8821
+ import("./event-bus-e66gh7cc.js").then(({ workflowEventBus }) => {
8822
+ workflowEventBus.emit("task.skipped", {
8823
+ taskId: id,
8824
+ failureReason: skipReason,
8825
+ agentId: row.agentId,
8826
+ workflowRunId: row.workflowRunId,
8827
+ workflowRunStepId: row.workflowRunStepId
8828
+ });
8829
+ }).catch((err) => console.error("[db] task.skipped event not emitted:", scrubSecrets(err instanceof Error ? err.message : String(err))));
8830
+ });
8831
+ try {
8832
+ await dependencies3.promotePendingSteeringForTask(id, "Task was skipped before steering was delivered");
8833
+ } catch (error) {
8834
+ console.error("[skipTask] pending steering promotion error:", scrubSecrets(error instanceof Error ? error.message : String(error)));
8835
+ }
8836
+ return rowToAgentTask(row);
8837
+ }
8754
8838
  async function supersedeTask2(id, args) {
8755
8839
  const oldTask = await getTaskById2(id);
8756
8840
  if (!oldTask)
@@ -8763,7 +8847,7 @@ async function supersedeTask2(id, args) {
8763
8847
  SET status = 'superseded',
8764
8848
  finishedAt = ?,
8765
8849
  lastUpdatedAt = strftime('%Y-%m-%dT%H:%M:%fZ', 'now')
8766
- WHERE id = ? AND status NOT IN ('completed', 'failed', 'cancelled', 'superseded')
8850
+ WHERE id = ? AND status NOT IN ('completed', 'failed', 'cancelled', 'superseded', 'skipped')
8767
8851
  AND (? IS NULL OR lastUpdatedAt = ?)
8768
8852
  RETURNING *`, [finishedAt, id, args.expectedLastUpdatedAt ?? null, args.expectedLastUpdatedAt ?? null]);
8769
8853
  if (row && oldTask) {
@@ -8786,7 +8870,7 @@ async function supersedeTask2(id, args) {
8786
8870
  });
8787
8871
  } catch {}
8788
8872
  getDbClient2().afterCommit(() => {
8789
- import("./event-bus-g0ka3pbw.js").then(({ workflowEventBus }) => {
8873
+ import("./event-bus-e66gh7cc.js").then(({ workflowEventBus }) => {
8790
8874
  workflowEventBus.emit("task.superseded", {
8791
8875
  taskId: id,
8792
8876
  reason: args.reason,
@@ -8988,7 +9072,7 @@ async function deleteTask2(id) {
8988
9072
  async function updateTaskProgress2(id, progress) {
8989
9073
  const scrubbedProgress = scrubSecrets(progress);
8990
9074
  const row = await getDbClient2().get(`UPDATE agent_tasks SET progress = ?,
8991
- status = CASE WHEN status IN ('completed', 'failed', 'cancelled', 'superseded') THEN status ELSE 'in_progress' END,
9075
+ status = CASE WHEN status IN ('completed', 'failed', 'cancelled', 'superseded', 'skipped') THEN status ELSE 'in_progress' END,
8992
9076
  lastUpdatedAt = strftime('%Y-%m-%dT%H:%M:%fZ', 'now')
8993
9077
  WHERE id = ? RETURNING *`, [scrubbedProgress, id]);
8994
9078
  if (row) {
@@ -9001,7 +9085,7 @@ async function updateTaskProgress2(id, progress) {
9001
9085
  });
9002
9086
  } catch {}
9003
9087
  getDbClient2().afterCommit(() => {
9004
- import("./event-bus-g0ka3pbw.js").then(({ workflowEventBus }) => {
9088
+ import("./event-bus-e66gh7cc.js").then(({ workflowEventBus }) => {
9005
9089
  workflowEventBus.emit("task.progress", {
9006
9090
  taskId: id,
9007
9091
  progress: scrubbedProgress,
@@ -9462,7 +9546,7 @@ function emitRunFinished(runId, workflowId, status) {
9462
9546
  }
9463
9547
  function emitBusEventAfterCommit(event, payload) {
9464
9548
  getDbClient2().afterCommit(() => {
9465
- import("./event-bus-g0ka3pbw.js").then(({ workflowEventBus }) => {
9549
+ import("./event-bus-e66gh7cc.js").then(({ workflowEventBus }) => {
9466
9550
  workflowEventBus.emit(event, payload);
9467
9551
  }).catch((err) => console.error(`[db] ${event} event not emitted:`, scrubSecrets(err instanceof Error ? err.message : String(err))));
9468
9552
  });
@@ -9617,7 +9701,7 @@ var init_schema = __esm(() => {
9617
9701
  init_zod();
9618
9702
  CHAT_SDK_ADAPTER_NAMES = ["telegram", "slack", "discord", "teams"];
9619
9703
  ConfigRefSchema = strictObject2({ $config: string2().min(1) });
9620
- Str = union2([string2().trim().min(1), ConfigRefSchema]);
9704
+ Str = union3([string2().trim().min(1), ConfigRefSchema]);
9621
9705
  FORBIDDEN_ADAPTER_KEYS = [
9622
9706
  "apiUrl",
9623
9707
  "apiBaseUrl",
@@ -9632,7 +9716,7 @@ var init_schema = __esm(() => {
9632
9716
  botToken: Str,
9633
9717
  secretToken: Str.optional(),
9634
9718
  mode: _enum2(["webhook", "polling"]).default("webhook"),
9635
- allowedUserIds: array2(union2([string2(), number2()])).optional()
9719
+ allowedUserIds: array2(union3([string2(), number2()])).optional()
9636
9720
  };
9637
9721
  SLACK_SHAPE = {
9638
9722
  botToken: Str,
@@ -9838,7 +9922,8 @@ var init_reaction_shortcode = __esm(() => {
9838
9922
  now: "zap",
9839
9923
  steered: "speech_balloon",
9840
9924
  completed: "white_check_mark",
9841
- failed: "x"
9925
+ failed: "x",
9926
+ skipped: "mute"
9842
9927
  };
9843
9928
  SLACK_REACTION_CONFIG_KEYS = {
9844
9929
  accepted: "SLACK_REACTION_ACCEPTED",
@@ -9846,7 +9931,8 @@ var init_reaction_shortcode = __esm(() => {
9846
9931
  now: "SLACK_REACTION_NOW",
9847
9932
  steered: "SLACK_REACTION_STEERED",
9848
9933
  completed: "SLACK_REACTION_COMPLETED",
9849
- failed: "SLACK_REACTION_FAILED"
9934
+ failed: "SLACK_REACTION_FAILED",
9935
+ skipped: "SLACK_REACTION_SKIPPED"
9850
9936
  };
9851
9937
  SLACK_REACTION_SHORTCODE_PATTERN = /^[a-z0-9_+'-]+(::skin-tone-[2-6])?$/;
9852
9938
  });
@@ -10126,7 +10212,10 @@ var init_swarm_config_guard = __esm(() => {
10126
10212
  "SECRETS_ENCRYPTION_KEY",
10127
10213
  "CORS_ALLOW_ANY_ORIGIN",
10128
10214
  "EXTENSION_ALLOW_LEAD_ACTIVATION",
10129
- "CHAT_SDK_API_URL_OVERRIDES"
10215
+ "CHAT_SDK_API_URL_OVERRIDES",
10216
+ "CODEX_OAUTH_DEVICE_BASE_URL",
10217
+ "DESPLEGA_TELEMETRY_ENDPOINT",
10218
+ "CLOUDFLARE_API_BASE_URL"
10130
10219
  ]);
10131
10220
  API_ONLY_CONFIG_KEYS = new Set([
10132
10221
  "API_AGENT_FS_API_KEY",
@@ -10325,6 +10414,7 @@ var init_swarm_config_guard = __esm(() => {
10325
10414
  "OTEL_TRACE_POLL",
10326
10415
  "OTEL_EXPORT_API_LOGS",
10327
10416
  "ANONYMIZED_TELEMETRY",
10417
+ "IMPROVEMENTS_ENABLED",
10328
10418
  "SWARM_HIDE_CLOUD_PROMO",
10329
10419
  "DB_QUERY_BOUNDED_ENABLED",
10330
10420
  "CLAUDE_TRUST_PRESEED",
@@ -10345,6 +10435,7 @@ var init_swarm_config_guard = __esm(() => {
10345
10435
  "SLACK_REACTION_STEERED",
10346
10436
  "SLACK_REACTION_COMPLETED",
10347
10437
  "SLACK_REACTION_FAILED",
10438
+ "SLACK_REACTION_SKIPPED",
10348
10439
  "SLACK_STATUS_ICON_COMPLETED"
10349
10440
  ]),
10350
10441
  ...integerValidators([
@@ -19024,7 +19115,7 @@ function noteEmbeddingSuccess() {
19024
19115
  const report = (what) => (err) => {
19025
19116
  console.error(`[memory] ${what} backfill after embeddings recovered failed:`, err.message);
19026
19117
  };
19027
- backfill2 = import("./embedding-space-0jepb239.js").then(({ runEmbeddingMaintenance }) => runEmbeddingMaintenance({ backfill: true })).catch(report("Embedding")).finally(() => {
19118
+ backfill2 = import("./embedding-space-xh8p4q4x.js").then(({ runEmbeddingMaintenance }) => runEmbeddingMaintenance({ backfill: true })).catch(report("Embedding")).finally(() => {
19028
19119
  backfill2 = null;
19029
19120
  });
19030
19121
  }
@@ -21118,7 +21209,7 @@ async function loadSecretRegistry() {
21118
21209
  result.failed += 1;
21119
21210
  }
21120
21211
  try {
21121
- const { loadRuntimeControllerSecrets } = await import("./db-dk572x25.js");
21212
+ const { loadRuntimeControllerSecrets } = await import("./db-s13dqhr6.js");
21122
21213
  const loaded = await loadRuntimeControllerSecrets();
21123
21214
  result.runtimeController = loaded.count;
21124
21215
  result.failed += loaded.failed;
@@ -21267,7 +21358,7 @@ async function requestSteering(args) {
21267
21358
  }
21268
21359
  const requestedMode = args.mode ?? "queue";
21269
21360
  const onUnsupported = args.onUnsupported ?? "degrade";
21270
- const { dispatchPre, extensionIdForAgent } = await import("./dispatcher-kh7ecxh9.js");
21361
+ const { dispatchPre, extensionIdForAgent } = await import("./dispatcher-j3h81t7m.js");
21271
21362
  const preSteer = await dispatchPre("pre.task.steer", {
21272
21363
  task,
21273
21364
  message: args.message,
@@ -21807,6 +21898,7 @@ __export(exports_db, {
21807
21898
  getTasksByAgentId: () => getTasksByAgentId2,
21808
21899
  getTasksByStatus: () => getTasksByStatus2,
21809
21900
  getTasksCount: () => getTasksCount2,
21901
+ getTasksDispatchedFrom: () => getTasksDispatchedFrom2,
21810
21902
  getUnassignedPoolTasks: () => getUnassignedPoolTasks2,
21811
21903
  getUnassignedTaskIds: () => getUnassignedTaskIds2,
21812
21904
  getUnassignedTaskIdsForAgent: () => getUnassignedTaskIdsForAgent2,
@@ -21952,6 +22044,7 @@ __export(exports_db, {
21952
22044
  setUserFavorite: () => setUserFavorite2,
21953
22045
  settleSupersededTaskDependents: () => settleSupersededTaskDependents2,
21954
22046
  shouldBlockPolling: () => shouldBlockPolling2,
22047
+ skipTask: () => skipTask2,
21955
22048
  startTask: () => startTask2,
21956
22049
  supersedeTask: () => supersedeTask2,
21957
22050
  sweepExpiredKv: () => sweepExpiredKv2,
@@ -22247,7 +22340,7 @@ async function getResolvableDeferralOutcomes2(limit = 50) {
22247
22340
  WHERE child.parentTaskId = wake.id AND child.taskType = 'deferred'
22248
22341
  )
22249
22342
  AND (wake.deferredAt IS NULL OR wake.finishedAt > card.updated_at)
22250
- AND wake.status IN ('completed', 'failed', 'cancelled')
22343
+ AND wake.status IN ('completed', 'failed', 'cancelled', 'skipped')
22251
22344
  ORDER BY wake.finishedAt ASC
22252
22345
  LIMIT ?`, [limit]);
22253
22346
  return rows.map((row) => ({
@@ -22307,7 +22400,7 @@ async function getSlackTreeMessages2() {
22307
22400
  WHERE task.slackChannelId = tree.channel_id
22308
22401
  AND task.slackThreadTs = tree.thread_ts
22309
22402
  AND task.createdAt >= state.activated_at
22310
- AND task.status NOT IN ('completed', 'failed', 'cancelled', 'superseded')
22403
+ AND task.status NOT IN ('completed', 'failed', 'cancelled', 'superseded', 'skipped')
22311
22404
  )
22312
22405
  OR EXISTS (
22313
22406
  SELECT 1 FROM agent_tasks task
@@ -23123,7 +23216,7 @@ async function findRecentSimilarTasks2(opts) {
23123
23216
  const since = new Date(Date.now() - (opts.windowMinutes ?? 10) * 60 * 1000).toISOString();
23124
23217
  const conditions = ["createdAt > ?"];
23125
23218
  const params = [since];
23126
- conditions.push("status NOT IN ('completed', 'failed', 'cancelled', 'superseded')");
23219
+ conditions.push("status NOT IN ('completed', 'failed', 'cancelled', 'superseded', 'skipped')");
23127
23220
  if (opts.creatorAgentId) {
23128
23221
  conditions.push("creatorAgentId = ?");
23129
23222
  params.push(opts.creatorAgentId);
@@ -23192,6 +23285,9 @@ async function createTaskExtended2(task, options) {
23192
23285
  if (options.inheritParentRoutingAffinity === false && options.routingAffinity?.leadOnly !== true) {
23193
23286
  throw new Error("Disabling parent routing-affinity inheritance requires an explicit Lead-only control-plane affinity.");
23194
23287
  }
23288
+ if (options.outputSchema !== undefined && !isEffectiveOutputSchema(options.outputSchema)) {
23289
+ options = { ...options, outputSchema: undefined, inheritParentOutputSchema: false };
23290
+ }
23195
23291
  let requestedByUserIdInherited = false;
23196
23292
  let keyInherited = false;
23197
23293
  let routingAffinityIsInheritedProvenance = false;
@@ -23256,7 +23352,7 @@ async function createTaskExtended2(task, options) {
23256
23352
  if (parent.dir && !options.dir) {
23257
23353
  options.dir = parent.dir;
23258
23354
  }
23259
- if (parent.outputSchema && !options.outputSchema && options.inheritParentOutputSchema !== false) {
23355
+ if (isEffectiveOutputSchema(parent.outputSchema) && !options.outputSchema && options.inheritParentOutputSchema !== false) {
23260
23356
  options.outputSchema = parent.outputSchema;
23261
23357
  }
23262
23358
  if (parent.requestedByUserId && !options.requestedByUserId && options.inheritParentRequester !== false) {
@@ -23402,9 +23498,9 @@ async function createTaskExtended2(task, options) {
23402
23498
  vcsProvider, vcsRepo, vcsEventType, vcsNumber, vcsCommentId, vcsAuthor, vcsUrl,
23403
23499
  vcsInstallationId, vcsNodeId,
23404
23500
  agentmailInboxId, agentmailMessageId, agentmailThreadId,
23405
- mentionMessageId, mentionChannelId, dir, parentTaskId, model, modelTier, effort, profile, scheduleId,
23501
+ mentionMessageId, mentionChannelId, dir, parentTaskId, dispatchedByTaskId, model, modelTier, effort, profile, scheduleId,
23406
23502
  workflowRunId, workflowRunStepId, outputSchema, followUpConfig, requestedByUserId, requestedByUserIdInherited, contextKey, routingAffinity, swarmVersion, createdAt, lastUpdatedAt, created_by, updated_by, isHumanFree
23407
- ) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) RETURNING *`, [
23503
+ ) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) RETURNING *`, [
23408
23504
  id,
23409
23505
  insertKey,
23410
23506
  options?.agentId ?? null,
@@ -23441,6 +23537,7 @@ async function createTaskExtended2(task, options) {
23441
23537
  options?.mentionChannelId ?? null,
23442
23538
  options?.dir ?? null,
23443
23539
  options?.parentTaskId ?? null,
23540
+ options?.dispatchedByTaskId ?? null,
23444
23541
  options?.model ?? null,
23445
23542
  options?.modelTier ?? null,
23446
23543
  options?.effort ?? null,
@@ -23510,7 +23607,7 @@ async function createTaskExtended2(task, options) {
23510
23607
  priority: row.priority
23511
23608
  }, (task) => task !== null, row.requestedByUserId);
23512
23609
  getDbClient2().afterCommit(() => {
23513
- import("./event-bus-g0ka3pbw.js").then(({ workflowEventBus }) => {
23610
+ import("./event-bus-e66gh7cc.js").then(({ workflowEventBus }) => {
23514
23611
  workflowEventBus.emit("task.created", {
23515
23612
  taskId: row.id,
23516
23613
  task: row.task,
@@ -23592,7 +23689,7 @@ async function releaseTask2(taskId, wakeSnapshot) {
23592
23689
  } catch {}
23593
23690
  if (isRuntimePoolsEnabled() && !wakeSnapshot)
23594
23691
  getDbClient2().afterCommit(() => {
23595
- import("./event-bus-g0ka3pbw.js").then(({ workflowEventBus }) => workflowEventBus.emit("task.unassigned", { taskId })).catch((error) => console.error("[db] Routing event failed:", scrubSecrets(String(error))));
23692
+ import("./event-bus-e66gh7cc.js").then(({ workflowEventBus }) => workflowEventBus.emit("task.unassigned", { taskId })).catch((error) => console.error("[db] Routing event failed:", scrubSecrets(String(error))));
23596
23693
  });
23597
23694
  }
23598
23695
  return row ? rowToAgentTask(row) : null;
@@ -23662,7 +23759,7 @@ async function rejectTask2(taskId, agentId, reason) {
23662
23759
  } catch {}
23663
23760
  if (isRuntimePoolsEnabled())
23664
23761
  getDbClient2().afterCommit(() => {
23665
- import("./event-bus-g0ka3pbw.js").then(({ workflowEventBus }) => workflowEventBus.emit("task.unassigned", { taskId })).catch((error) => console.error("[db] Routing event failed:", scrubSecrets(String(error))));
23762
+ import("./event-bus-e66gh7cc.js").then(({ workflowEventBus }) => workflowEventBus.emit("task.unassigned", { taskId })).catch((error) => console.error("[db] Routing event failed:", scrubSecrets(String(error))));
23666
23763
  });
23667
23764
  }
23668
23765
  return row ? rowToAgentTask(row) : null;
@@ -23860,7 +23957,7 @@ async function checkDependencies2(taskId) {
23860
23957
  const blockedBy = [];
23861
23958
  for (const depId of task.dependsOn) {
23862
23959
  const depTask = await getTaskById2(depId);
23863
- if (!depTask || depTask.status !== "completed") {
23960
+ if (!depTask || depTask.status !== "completed" && depTask.status !== "skipped") {
23864
23961
  blockedBy.push(depId);
23865
23962
  }
23866
23963
  }
@@ -24302,7 +24399,11 @@ async function claimMentions2(agentId) {
24302
24399
  END
24303
24400
  WHERE processing_since IS NULL`, [agentId, channel.id, lastReadAt || new Date(0).toISOString(), now, now]);
24304
24401
  if (result.changes > 0) {
24305
- claimedChannels.push({ channelId: channel.id, lastReadAt });
24402
+ claimedChannels.push({
24403
+ channelId: channel.id,
24404
+ lastReadAt,
24405
+ mentionsCount: mentionCountRow.count
24406
+ });
24306
24407
  }
24307
24408
  }
24308
24409
  }
@@ -24611,13 +24712,16 @@ async function createSessionCost2(input) {
24611
24712
  thinkingTokens,
24612
24713
  input.durationMs,
24613
24714
  input.numTurns,
24614
- input.model,
24715
+ chatgptSubscriptionModelId(input.model)?.toLowerCase() ?? input.model,
24615
24716
  input.isError ? 1 : 0,
24616
24717
  costSource,
24617
24718
  input.harnessCostUsd ?? null,
24618
24719
  input.cacheWrite5mTokens ?? null,
24619
24720
  input.cacheWrite1hTokens ?? null,
24620
- input.modelBreakdown ? JSON.stringify(input.modelBreakdown) : null
24721
+ input.modelBreakdown ? JSON.stringify(input.modelBreakdown.map((entry) => ({
24722
+ ...entry,
24723
+ model: chatgptSubscriptionModelId(entry.model)?.toLowerCase() ?? entry.model
24724
+ }))) : null
24621
24725
  ]);
24622
24726
  const row = await getDbClient2().get("SELECT * FROM session_costs WHERE id = ?", [
24623
24727
  id
@@ -25340,7 +25444,7 @@ async function deleteScheduledTask2(id) {
25340
25444
  const parent = await getTaskById2(deferred.parentTaskId);
25341
25445
  if (!parent?.deferredAt)
25342
25446
  return;
25343
- const { createWorkerTaskFollowUp } = await import("./worker-follow-up-3q78fqmr.js");
25447
+ const { createWorkerTaskFollowUp } = await import("./worker-follow-up-7z1gfkr8.js");
25344
25448
  await createWorkerTaskFollowUp({
25345
25449
  task: parent,
25346
25450
  status: "failed",
@@ -25754,11 +25858,10 @@ async function createAgentMailInboxMapping2(inboxId, agentId, inboxEmail) {
25754
25858
  const now = new Date().toISOString();
25755
25859
  const row = await getDbClient2().get(`INSERT INTO agentmail_inbox_mappings (id, inboxId, agentId, inboxEmail, createdAt)
25756
25860
  VALUES (?, ?, ?, ?, ?)
25757
- ON CONFLICT(inboxId) DO UPDATE SET agentId = excluded.agentId, inboxEmail = excluded.inboxEmail
25861
+ ON CONFLICT(inboxId) DO UPDATE SET inboxEmail = excluded.inboxEmail
25862
+ WHERE agentmail_inbox_mappings.agentId = excluded.agentId
25758
25863
  RETURNING *`, [id, inboxId, agentId, inboxEmail ?? null, now]);
25759
- if (!row)
25760
- throw new Error("Failed to create AgentMail inbox mapping");
25761
- return row;
25864
+ return row ?? null;
25762
25865
  }
25763
25866
  async function deleteAgentMailInboxMapping2(inboxId) {
25764
25867
  const result = await getDbClient2().run("DELETE FROM agentmail_inbox_mappings WHERE inboxId = ?", [
@@ -26381,7 +26484,7 @@ async function getStuckWorkflowRuns2() {
26381
26484
  CROSS JOIN agent_tasks at ON at.workflowRunStepId = wrs.id
26382
26485
  WHERE wrs.status = 'waiting'
26383
26486
  AND wr.status = 'waiting'
26384
- AND at.status IN ('completed', 'failed', 'cancelled')
26487
+ AND at.status IN ('completed', 'failed', 'cancelled', 'skipped')
26385
26488
  ORDER BY at.createdAt ASC, at.rowid ASC`);
26386
26489
  }
26387
26490
  async function getLastSuccessfulRun2(workflowId) {
@@ -29403,8 +29506,8 @@ async function createScriptRun2(data) {
29403
29506
  }
29404
29507
  const row = await client.get(`INSERT INTO script_runs
29405
29508
  (id, agentId, scriptName, source, args, idempotencyKey, requestedByUserId, sourceTaskId,
29406
- created_by, updated_by)
29407
- VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
29509
+ created_by, updated_by, startedAt)
29510
+ VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
29408
29511
  RETURNING *`, [
29409
29512
  data.id,
29410
29513
  data.agentId,
@@ -29415,7 +29518,8 @@ async function createScriptRun2(data) {
29415
29518
  data.requestedByUserId ?? null,
29416
29519
  data.sourceTaskId ?? null,
29417
29520
  data.createdBy ?? null,
29418
- data.updatedBy ?? data.createdBy ?? null
29521
+ data.updatedBy ?? data.createdBy ?? null,
29522
+ new Date().toISOString()
29419
29523
  ]);
29420
29524
  if (!row)
29421
29525
  throw new Error("Failed to create script run");
@@ -29630,6 +29734,7 @@ var VERSIONABLE_FIELDS2, BUDGETED_IDENTITY_FIELDS, PENDING_SLACK_MESSAGE_TS_PREF
29630
29734
  ELSE COALESCE(agentId, offeredTo)
29631
29735
  END`, ELIGIBILITY_SCAN_BATCH_SIZE, ELIGIBILITY_SCAN_CAP, UNATTRIBUTED_USER_ID2 = "unattributed", HUMAN_FREE_SQL = "(COALESCE(t.isHumanFree, 0) = 1)", SCHEDULE_TEMPLATE_PREVIEW_LENGTH = 280, RESERVED_CONFIG_PLACEHOLDER = "[reserved key stored in swarm_config; delete this row]", SKILL_FILE_LIMITS2, BINARY_SKILL_FILE_PLACEHOLDER = "[binary file - not synced]", SKILL_SLIM_COLUMNS = "id, name, description, type, scope, ownerAgentId, sourceUrl, sourceRepo, sourcePath, sourceBranch, sourceHash, isComplex, allowedTools, model, effort, context, agent, disableModelInvocation, userInvocable, version, isEnabled, systemDefault, invocationCount, lastInvokedAt, createdAt, lastUpdatedAt, lastFetchedAt, '' as content", WEEK_SECONDS, KvTypeCollisionError2;
29632
29736
  var init_db4 = __esm(() => {
29737
+ init_src2();
29633
29738
  init_package();
29634
29739
  init_key();
29635
29740
  init_source_key();
@@ -29648,6 +29753,7 @@ var init_db4 = __esm(() => {
29648
29753
  init_heartbeat_expiry();
29649
29754
  init_identity_field_budget();
29650
29755
  init_model_rate_limit_windows();
29756
+ init_output_schema();
29651
29757
  init_request_auth_context();
29652
29758
  init_runtime_pools_flag();
29653
29759
  init_secret_scrubber();
@@ -29742,4 +29848,4 @@ var init_db4 = __esm(() => {
29742
29848
  };
29743
29849
  });
29744
29850
 
29745
- export { slackContextKey, chatSdkContextKey, chatThreadOfContextKey, agentmailContextKey, githubContextKey, gitlabContextKey, azureDevOpsContextKey, azureDevOpsWorkItemContextKey, bitbucketContextKey, linearContextKey, buildJiraContextKey, scheduleContextKey, workflowContextKey, agentContextKey, pageContextKey, init_context_key, sessionSourceKey, sourceOfKey, SOURCE_GROUPS_READ_ONLY, sourceMoveError, init_source_key, 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, runWithoutRequestAuth, authUserId, authUser, isOperatorAuth, getCurrentRequestUserId, init_request_auth_context, setTelemetryIngestObserver, isTelemetryEnabled, _resolveIntegrationType, _resolveIntegrationProvider, initTelemetry, setTelemetryRoleResolver, setTelemetryFunctionResolver, isTelemetryReady, track, trackRelayed, telemetry, emitIntegrationConnected, init_telemetry, auditAssetKeys, init_asset_key_audit, CredentialBindingSchema, placeholderForConfigKey, CredentialBroker, DEFAULT_CREDENTIAL_BINDINGS, isPrivateAddress, assertUrlSafe, parseEgressAllowlist, init_egress_guard, init_credential_broker, encryptSecret, decryptSecret, getEncryptionKey, init_crypto, isInTransaction, init_db_client, breaksJsonValidity, scrubJsonValue, foldHexCopies, init_scrub_json, sealJson, init_sealed_json, getPromptTemplateDefaultDrift, init_default_drift, init_templates2, init_templates3, isSqliteVecAvailable2, resolveSqliteVecExtensionPath2, __resetSqliteVecExtensionPathCacheForTests2, initDb2, getDb2, closeDb2, getDbClient2, init_runtime2, cachedUserRole, cachedUserFunction, invalidateTelemetryUserRole, configureOrgDomainPersistence, recomputeOrgDomain, scheduleOrgDomainRecompute, init_telemetry_identity, resolveTriggerSurface, emitTaskTelemetry, init_telemetry_trigger, isEnvExportRestrictedKey, init_config_env_export, MASKED_SECRET_VALUE, init_config_secrets, HeartbeatExpiryError, init_heartbeat_expiry, isRuntimePoolsEnabled, init_runtime_pools_flag, normalizeDate, normalizeDateRequired, init_date_utils, rowToAgent, updateAgentCredentialState2, updateAgentCredentialMissing2, 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, listApprovalRequestSummaries2, getPendingApprovalVoteState2, recordApprovalVotes2, getPendingApprovalsForTasks2, approvalCancellationNotificationKey, listUndeliveredCancelledApprovalRequestIds, init_approvals, computeContentHash2, createContextVersion2, getLatestContextVersion2, getContextVersion2, getContextVersionHistory2, vcsRepoName, vcsRepoUrlMatches, init_vcs_repo_match, startTaskSearchBackfill, stopTaskSearchBackfill, init_search_index, rowToAgentTask, getTaskById2, getChildTasks2, TASK_LINEAGE_LIMITS2, getTaskLineage2, hasNonTerminalResumeChild2, SUPERSEDED_RESUME_REPAIR_WINDOW_MS2, getSupersededTasksWithoutResume2, getSupersededTasksWithUnsettledDependents2, hasNonTerminalRerouteDecisionChild2, getTasksByAgentId2, 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, getLatestActiveTaskByContextKey2, getLatestLeadTaskByContextKey2, getMostRecentTaskInThread2, findCompletedTasksInThread2, findRecentFailedTaskInThread2, countAgentDispatchesInThread2, findRecentCancelledTaskInThread2, init_read, MODEL_PROFILE_CONFIG_KEY, listModelProfiles, getModelProfileByName, createModelProfile, updateModelProfile, modelProfileReferences, modelProfileRefError, deleteModelProfile, getAgentDefaultProfileName, repoModelOverrideKeys, taskProfileError, init_model_profiles, AssetKeyMovesBlockedError2, assertAssetKeyMovesAllowed2, moveTaskChainKeyInTx2, moveSessionChains, listPrefixRoots, listSharedPrefixRoots, init_session_moves, getSessionGroupKey, getSessionReadState, getSessionTree, triageSessionList, init_session_tree, setHumanFreeQueueListener, drainHumanFreeReclassifyQueue, init_human_free, onTaskStarted, init_task_lifecycle_events, channelTopic, addWorkerSubscription, removeWorkerSubscription, listSubscribedWorkerAgents, init_channels, publishWorkerNudge, init_worker_nudges, 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, completedStatusIcon, init_reaction_shortcode, API_DRAINING_HEADER, API_DRAIN_MAX_MS_LIMIT, isApiDrainingResponse, init_api_drain2, 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, 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, getDefaultAuthorizationIdForProvider, getOAuthApp, getOAuthAppById, getOAuthAppIdByProvider, createOAuthApp, updateOAuthAppById, upsertOAuthApp, listAuthorizationsForApp, getAuthorizationById, upsertAuthorization, updateAuthorizationTokens, updateAuthorizationIdentity, deleteAuthorizationById, deleteAuthorizationsForApp, createOAuthPending, consumeOAuthPending, gcOAuthPending, markAuthorizationRefreshFailed, getOAuthTokens, listAuthorizationSweepRows, listKeepAliveAuthorizations, deleteOAuthTokens, acquireOAuthRefreshLock, releaseOAuthRefreshLock, init_oauth, OpenAI2, init_openai2, LEARNING_DUPLICATE_MIN_SIMILARITY, CANDIDATE_SET_MULTIPLIER, isGraphExpansionEnabled, EMBEDDING_DIMENSIONS, init_constants2, LONGTERM_ROOT, MEMORY_KEY_PATTERN, MEMORY_KEY_PATTERN_MESSAGE, MEMORY_KEY_MAX_LENGTH, isLongtermKey, longtermKeyError, isConsolidatedKey, consolidatedKeyMessage, resolveStoreKey, init_key_paths, computeScore, rerank, init_reranker, searchMemoryCandidates, init_search_candidates, rowToCandidate, init_sqlite_store, getEmbeddingProvider2, resetEmbeddingProvider2, getMemoryStore2, init_memory, embeddingProvider2, computeScriptEmbedding2, writeScriptEmbedding2, embedScript2, searchScripts2, reembedAllScripts2, init_embeddings, upsertScriptByName, getScript, getScriptById, getScriptVersion, listScripts, listScriptVersions, deleteScript, touchScratchScriptLastUsed, restoreScratchScriptLastUsedIfUnchanged, createScriptApi, listScriptApisForScript, getScriptApiById, getScriptApiSecret, updateScriptApi, rotateScriptApiSecret, deleteScriptApi, recordScriptApiUsage, init_db3, oauthSecretName, registerStoredSecret, loadSecretRegistry, init_secret_registry, 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, 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, createTask2, getPendingTaskForAgent2, assignUnassignedTaskPending2, startTask2, updateTaskClaudeSessionId2, recordTaskProviderIfUnset2, updateTaskTitle2, setTaskTitleIfUnset2, completeTask2, failTask2, overwriteTerminalTaskResultText2, cancelTask2, supersedeTask2, settleSupersededTaskDependents2, backfillSupersedeTaskResumeTaskId2, pauseTask2, resumeTask2, getPausedTasksForAgent2, getOrphanedInProgressTasksForAgent2, resetOrphanedInProgressTasksForAgent2, getRecentlyCancelledTasksForAgent2, deleteTask2, updateTaskProgress2, init_write, IdempotencyKeyTakenError, workflowRequestFingerprint, findAcceptedWorkflowOperation, assertWorkflowIdempotencyKeyUnused, recordAcceptedWorkflowOperation, init_workflow_idempotency, recordKeySeatMismatch2, recordKeyValidation2, retirePoolKeyStatus, init_api_keys, getScriptRunExecutionArgs2, getScriptRunFollowUpGuard2, setScriptRunFollowUpGuard2, 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 };
29851
+ export { slackContextKey, chatSdkContextKey, chatThreadOfContextKey, agentmailContextKey, githubContextKey, gitlabContextKey, azureDevOpsContextKey, azureDevOpsWorkItemContextKey, bitbucketContextKey, linearContextKey, buildJiraContextKey, scheduleContextKey, workflowContextKey, agentContextKey, pageContextKey, init_context_key, sessionSourceKey, sourceOfKey, SOURCE_GROUPS_READ_ONLY, sourceMoveError, init_source_key, 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, runWithoutRequestAuth, authUserId, authUser, isOperatorAuth, getCurrentRequestUserId, init_request_auth_context, setTelemetryIngestObserver, isTelemetryEnabled, _resolveIntegrationType, _resolveIntegrationProvider, initTelemetry, setTelemetryRoleResolver, setTelemetryFunctionResolver, isTelemetryReady, track, trackRelayed, telemetry, emitIntegrationConnected, init_telemetry, auditAssetKeys, init_asset_key_audit, CredentialBindingSchema, placeholderForConfigKey, CredentialBroker, DEFAULT_CREDENTIAL_BINDINGS, isPrivateAddress, assertUrlSafe, parseEgressAllowlist, init_egress_guard, init_credential_broker, encryptSecret, decryptSecret, getEncryptionKey, init_crypto, isInTransaction, init_db_client, breaksJsonValidity, scrubJsonValue, foldHexCopies, init_scrub_json, sealJson, init_sealed_json, getPromptTemplateDefaultDrift, init_default_drift, init_templates2, init_templates3, isSqliteVecAvailable2, resolveSqliteVecExtensionPath2, __resetSqliteVecExtensionPathCacheForTests2, initDb2, getDb2, closeDb2, getDbClient2, init_runtime2, 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, completedStatusIcon, init_reaction_shortcode, 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, 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, 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, listApprovalRequestSummaries2, getPendingApprovalVoteState2, recordApprovalVotes2, getPendingApprovalsForTasks2, approvalCancellationNotificationKey, listUndeliveredCancelledApprovalRequestIds, init_approvals, computeContentHash2, createContextVersion2, getLatestContextVersion2, getContextVersion2, getContextVersionHistory2, vcsRepoName, vcsRepoUrlMatches, init_vcs_repo_match, 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, getLatestActiveTaskByContextKey2, getLatestLeadTaskByContextKey2, getMostRecentTaskInThread2, findCompletedTasksInThread2, findRecentFailedTaskInThread2, countAgentDispatchesInThread2, findRecentCancelledTaskInThread2, init_read, MODEL_PROFILE_CONFIG_KEY, listModelProfiles, getModelProfileByName, createModelProfile, updateModelProfile, modelProfileReferences, modelProfileRefError, deleteModelProfile, getAgentDefaultProfileName, repoModelOverrideKeys, taskProfileError, init_model_profiles, AssetKeyMovesBlockedError2, assertAssetKeyMovesAllowed2, moveTaskChainKeyInTx2, moveSessionChains, listPrefixRoots, listSharedPrefixRoots, init_session_moves, getSessionGroupKey, getSessionReadState, getSessionTree, triageSessionList, init_session_tree, setHumanFreeQueueListener, drainHumanFreeReclassifyQueue, init_human_free, onTaskStarted, init_task_lifecycle_events, channelTopic, addWorkerSubscription, removeWorkerSubscription, listSubscribedWorkerAgents, init_channels, publishWorkerNudge, init_worker_nudges, getDefaultAuthorizationIdForProvider, getOAuthApp, getOAuthAppById, getOAuthAppIdByProvider, createOAuthApp, updateOAuthAppById, upsertOAuthApp, listAuthorizationsForApp, getAuthorizationById, upsertAuthorization, updateAuthorizationTokens, updateAuthorizationIdentity, deleteAuthorizationById, deleteAuthorizationsForApp, createOAuthPending, consumeOAuthPending, gcOAuthPending, markAuthorizationRefreshFailed, getOAuthTokens, listAuthorizationSweepRows, listKeepAliveAuthorizations, deleteOAuthTokens, acquireOAuthRefreshLock, releaseOAuthRefreshLock, init_oauth, OpenAI2, init_openai2, LEARNING_DUPLICATE_MIN_SIMILARITY, CANDIDATE_SET_MULTIPLIER, isGraphExpansionEnabled, EMBEDDING_DIMENSIONS, init_constants2, LONGTERM_ROOT, MEMORY_KEY_PATTERN, MEMORY_KEY_PATTERN_MESSAGE, MEMORY_KEY_MAX_LENGTH, isLongtermKey, longtermKeyError, isConsolidatedKey, consolidatedKeyMessage, resolveStoreKey, init_key_paths, computeScore, rerank, init_reranker, searchMemoryCandidates, init_search_candidates, rowToCandidate, init_sqlite_store, getEmbeddingProvider2, resetEmbeddingProvider2, getMemoryStore2, init_memory, embeddingProvider2, computeScriptEmbedding2, writeScriptEmbedding2, embedScript2, searchScripts2, reembedAllScripts2, init_embeddings, upsertScriptByName, getScript, getScriptById, getScriptVersion, listScripts, listScriptVersions, deleteScript, touchScratchScriptLastUsed, restoreScratchScriptLastUsedIfUnchanged, createScriptApi, listScriptApisForScript, getScriptApiById, getScriptApiSecret, updateScriptApi, rotateScriptApiSecret, deleteScriptApi, recordScriptApiUsage, init_db3, oauthSecretName, registerStoredSecret, loadSecretRegistry, init_secret_registry, 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, 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, createTask2, getPendingTaskForAgent2, assignUnassignedTaskPending2, startTask2, updateTaskClaudeSessionId2, recordTaskProviderIfUnset2, updateTaskTitle2, setTaskTitleIfUnset2, completeTask2, failTask2, overwriteTerminalTaskResultText2, cancelTask2, skipTask2, supersedeTask2, settleSupersededTaskDependents2, backfillSupersedeTaskResumeTaskId2, pauseTask2, resumeTask2, getPausedTasksForAgent2, getOrphanedInProgressTasksForAgent2, resetOrphanedInProgressTasksForAgent2, getRecentlyCancelledTasksForAgent2, deleteTask2, updateTaskProgress2, init_write, IdempotencyKeyTakenError, workflowRequestFingerprint, findAcceptedWorkflowOperation, assertWorkflowIdempotencyKeyUnused, recordAcceptedWorkflowOperation, init_workflow_idempotency, recordKeySeatMismatch2, recordKeyValidation2, retirePoolKeyStatus, init_api_keys, getScriptRunExecutionArgs2, getScriptRunFollowUpGuard2, setScriptRunFollowUpGuard2, 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 };