@desplega.ai/agent-swarm 2.9.1 → 2.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (315) hide show
  1. package/dist/acp-adapter-bht22g3k.js +16 -0
  2. package/dist/{acp-targets-ny75x1qy.js → acp-targets-arrwv4f0.js} +6 -6
  3. package/dist/{actions-b9qgrmeq.js → actions-y0d2n1c2.js} +49 -28
  4. package/dist/{agent-fs-provision-b5dhdsbd.js → agent-fs-provision-tpj7sktd.js} +4 -4
  5. package/dist/{amp-adapter-vtax2c9s.js → amp-adapter-vmmnmw8d.js} +1 -1
  6. package/dist/{anthropic-messages-r5xf5hqw.js → anthropic-messages-zdca3gv1.js} +13 -13
  7. package/dist/{app-g2z15hax.js → app-wb7w45dq.js} +3 -3
  8. package/dist/{approval-notifications-yt13wp8r.js → approval-notifications-7mqr6vbd.js} +5 -5
  9. package/dist/{assistant-2cgfxsgk.js → assistant-gf60454p.js} +19 -19
  10. package/dist/{boot-args-schema-3gwy0f60.js → boot-args-schema-qxmd59sr.js} +1 -1
  11. package/dist/{boot-reembed-mywmyp4s.js → boot-reembed-5tmeskj2.js} +1 -1
  12. package/dist/{boot-reembed-92g7s5zp.js → boot-reembed-wb44vc3s.js} +1 -1
  13. package/dist/boot-scrub-sweep-25bxhnw4.js +9 -0
  14. package/dist/{boot-seeds-ce7rvgq1.js → boot-seeds-nj9za0vk.js} +4 -4
  15. package/dist/{claude-adapter-3m4q7735.js → claude-adapter-d3krpdyb.js} +5 -5
  16. package/dist/{claude-managed-setup-c217draw.js → claude-managed-setup-7y4pwd81.js} +1 -1
  17. package/dist/{claude-sdk-session-7fbqm51z.js → claude-sdk-session-d138zy0e.js} +5 -5
  18. package/dist/{cli-tvc4jag9.js → cli-01k6wpr9.js} +3 -3
  19. package/dist/{cli-2xs8tsf7.js → cli-124ntmf0.js} +42 -36
  20. package/dist/{cli-jm0hvmz2.js → cli-2rnd5j3t.js} +1 -1
  21. package/dist/{cli-32djehja.js → cli-2spnz7ye.js} +8 -8
  22. package/dist/{cli-2dq9yv8p.js → cli-2v2zdm0a.js} +1 -1
  23. package/dist/{cli-fkef327x.js → cli-3caf7pmg.js} +2 -2
  24. package/dist/{cli-mw620q3n.js → cli-3et6fmfe.js} +1 -1
  25. package/dist/{cli-h9yqfzx9.js → cli-3f8zbtqa.js} +3 -3
  26. package/dist/{cli-mhapr559.js → cli-43evxwj4.js} +1 -1
  27. package/dist/{cli-pyjn0qhk.js → cli-539h29es.js} +138 -21
  28. package/dist/{cli-bnqncekd.js → cli-5qhfv9rw.js} +2 -2
  29. package/dist/{cli-p4kckx1z.js → cli-6037prsx.js} +6 -6
  30. package/dist/{cli-zr6qy15y.js → cli-6cwr32fe.js} +17 -17
  31. package/dist/{cli-1jykg0py.js → cli-7r162fxe.js} +22 -15
  32. package/dist/{cli-sn650d7x.js → cli-8st34zhr.js} +20 -10
  33. package/dist/{cli-rq5rpv6k.js → cli-91pkxres.js} +1 -1
  34. package/dist/{cli-m7zvgt57.js → cli-9fjr27ez.js} +10 -10
  35. package/dist/{cli-f8x9drqr.js → cli-aw83sr40.js} +19 -5
  36. package/dist/{cli-jkw6ptfw.js → cli-cc93xzes.js} +5 -5
  37. package/dist/{cli-gfy38pvt.js → cli-fcfbct2j.js} +5 -5
  38. package/dist/{cli-nafvvsp8.js → cli-fq2rr3jb.js} +5 -5
  39. package/dist/{boot-scrub-sweep-7dkdzqxx.js → cli-had1p04a.js} +8 -9
  40. package/dist/{cli-bg63qmsx.js → cli-j6te8keb.js} +4 -4
  41. package/dist/{cli-br0924pw.js → cli-jrbq4djp.js} +1 -1
  42. package/dist/{cli-kxx4k2jw.js → cli-k3q2va86.js} +2 -2
  43. package/dist/{cli-jaw5v1sy.js → cli-k5yewqgd.js} +3 -3
  44. package/dist/cli-kbtzfrxj.js +404 -0
  45. package/dist/{cli-td9tb872.js → cli-m9cvf7vs.js} +7 -7
  46. package/dist/{cli-f3jyzq4g.js → cli-md50mj0r.js} +2 -2
  47. package/dist/{cli-xag7btpe.js → cli-mk7c5ac4.js} +1 -1
  48. package/dist/cli-mys27d03.js +321 -0
  49. package/dist/{cli-nbt14he0.js → cli-nstkanmx.js} +5 -5
  50. package/dist/{cli-wn13hhdt.js → cli-nv4xsvmk.js} +4 -4
  51. package/dist/{cli-vyff45ve.js → cli-p0c3vtch.js} +2 -2
  52. package/dist/{cli-2czxfnvj.js → cli-p0n7b5rz.js} +662 -93
  53. package/dist/{cli-j7svy295.js → cli-q5srsxq2.js} +12 -12
  54. package/dist/{cli-vt89089n.js → cli-qrta34nb.js} +4 -4
  55. package/dist/{cli-ysvspf5e.js → cli-qx4f057j.js} +2 -2
  56. package/dist/{cli-zh0e5x7p.js → cli-s1khw52h.js} +11 -11
  57. package/dist/{cli-mkwkwq81.js → cli-s1zqk1aj.js} +18 -11
  58. package/dist/{cli-f9gz2vyj.js → cli-sb4426be.js} +7 -7
  59. package/dist/{cli-dgs10ttj.js → cli-th1dkc2v.js} +1 -1
  60. package/dist/{cli-3j873zxq.js → cli-tr27kwyg.js} +2 -2
  61. package/dist/{cli-6945ywhr.js → cli-tvgqesec.js} +6 -4
  62. package/dist/{cli-fjggej24.js → cli-v46zsvqk.js} +1 -1
  63. package/dist/{cli-67mwzr35.js → cli-v8z0yga9.js} +4 -4
  64. package/dist/{cli-pb2ay3sh.js → cli-vfqvrd82.js} +5 -5
  65. package/dist/{cli-fh97xn30.js → cli-vq2eg24x.js} +2 -2
  66. package/dist/{cli-v57d7fmm.js → cli-vsw91x06.js} +23 -22
  67. package/dist/{cli-2yjj3e31.js → cli-w1q68d8x.js} +9 -7
  68. package/dist/{cli-y2ewxhth.js → cli-wafmk3fn.js} +10 -10
  69. package/dist/{cli-ctx0b85j.js → cli-wwp1bd3n.js} +257 -101
  70. package/dist/{cli-bkjdknnp.js → cli-y4ccxtz5.js} +37 -5
  71. package/dist/{cli-w4n323t3.js → cli-y8p78ekx.js} +7 -7
  72. package/dist/{cli-8zh9nrew.js → cli-z0m452jr.js} +1 -1
  73. package/dist/{cli-mjw0yf82.js → cli-zeh2mhkg.js} +1 -1
  74. package/dist/{cli-jwampxxq.js → cli-zk7v5s89.js} +2 -2
  75. package/dist/cli.js +16 -16
  76. package/dist/{cloudflare-workers-ai-system-one-9y1zx3pt.js → cloudflare-workers-ai-system-one-4aysy6rh.js} +2 -2
  77. package/dist/{codex-adapter-n656pvb8.js → codex-adapter-exfdbj73.js} +4 -4
  78. package/dist/{codex-session-runner-p0fbv5y9.js → codex-session-runner-xhznc4g3.js} +4 -4
  79. package/dist/{commands-gwea8z5p.js → commands-d8g349v4.js} +3 -3
  80. package/dist/{controller-t67c3grh.js → controller-mwgdmb8y.js} +3 -3
  81. package/dist/{controllers-connect-ks155r0h.js → controllers-connect-5v7qx04j.js} +19 -19
  82. package/dist/core-sxy4epp2.js +38 -0
  83. package/dist/{cursor-adapter-ygwrtmkv.js → cursor-adapter-p2q5h35d.js} +1 -1
  84. package/dist/{db-rb2xqdb1.js → db-qpganbeb.js} +3 -3
  85. package/dist/{db-kpmx06s9.js → db-wcw0b2j8.js} +2 -2
  86. package/dist/{dispatcher-31sm0ej2.js → dispatcher-8d8s49yz.js} +17 -17
  87. package/dist/{dsh-adapter-qyxh0w31.js → dsh-adapter-me0twn13.js} +1 -1
  88. package/dist/{easter-egg-3d-00wjscn6.js → easter-egg-3d-wv7w5ty6.js} +1 -1
  89. package/dist/{embedding-space-qhw4g68n.js → embedding-space-e48xchqa.js} +6 -6
  90. package/dist/{embeddings-zdv9ke6x.js → embeddings-tgq2afbq.js} +1 -1
  91. package/dist/{execute-zna8wwr7.js → execute-8rhwrk7f.js} +1 -1
  92. package/dist/{external-channel-1ac6t56s.js → external-channel-8bt3j2pm.js} +2 -2
  93. package/dist/{fx-adapter-sk7n0fzc.js → fx-adapter-adtdb3jb.js} +8 -8
  94. package/dist/{grok-adapter-sjbcm5ew.js → grok-adapter-accnn9km.js} +8 -8
  95. package/dist/handlers-1x77561e.js +35 -0
  96. package/dist/{heartbeat-2f6z4kdx.js → heartbeat-x0056ra5.js} +20 -20
  97. package/dist/{hook-w1skzaqc.js → hook-a7vmn2st.js} +4 -4
  98. package/dist/{hook-8y0gvtp1.js → hook-mrd2ayxv.js} +5 -5
  99. package/dist/{http-wghxvpef.js → http-ym9c5svp.js} +676 -273
  100. package/dist/{index-s71ez27v.js → index-01ns1pkw.js} +1 -1
  101. package/dist/index-48qzcqzj.js +35 -0
  102. package/dist/{index-9zkchs9t.js → index-ny60jcat.js} +186 -14
  103. package/dist/{index-rv89fvzf.js → index-p46tvwtx.js} +21 -21
  104. package/dist/index-rkvaambe.js +36 -0
  105. package/dist/{index-8zn8nxn5.js → index-x6azjwm8.js} +1 -1
  106. package/dist/{index-25pvya7q.js → index-xj1mq27m.js} +17 -17
  107. package/dist/k8s-m56sw868.js +217 -0
  108. package/dist/{keepalive-sh02349h.js → keepalive-7yxg8z4c.js} +3 -3
  109. package/dist/lead-enzn86bz.js +74 -0
  110. package/dist/{maintenance-yj0dcjja.js → maintenance-6tefxmk1.js} +1 -1
  111. package/dist/{oauth-refresh-sweep-d9xedk66.js → oauth-refresh-sweep-70cavc3a.js} +2 -2
  112. package/dist/{onboard-dpgjn03r.js → onboard-fja65z08.js} +5 -5
  113. package/dist/{openai-decisions-q3hh60wr.js → openai-decisions-ytp6w6xh.js} +1 -1
  114. package/dist/{opencode-adapter-2d31cpjc.js → opencode-adapter-hakkm7yh.js} +5 -5
  115. package/dist/{otel-impl-1skarpfq.js → otel-impl-7zhnt6gj.js} +1 -1
  116. package/dist/{pending-bfmxtx0g.js → pending-h01yzpx4.js} +18 -18
  117. package/dist/{pi-mono-adapter-gvppnasy.js → pi-mono-adapter-f52hz743.js} +6 -6
  118. package/dist/{pricing-refresh-c6b325mk.js → pricing-refresh-fzxvk2zf.js} +2 -2
  119. package/dist/{rbac-roles-h80qbdbs.js → rbac-roles-9v6vhgbs.js} +3 -3
  120. package/dist/{rbac-roles-zfcx68tx.js → rbac-roles-hfgh8sba.js} +2 -2
  121. package/dist/{render-v2-nx20t3rb.js → render-v2-1rgspxzf.js} +3 -3
  122. package/dist/{resume-5ep8agan.js → resume-tqy61x24.js} +7 -7
  123. package/dist/{runtime-r3pj4mce.js → runtime-exkxyx5f.js} +1 -1
  124. package/dist/{session-access-n7p3m15b.js → session-access-3act7vt4.js} +4 -4
  125. package/dist/{session-source-backfill-v8mt0zwn.js → session-source-backfill-82qe7fqq.js} +2 -2
  126. package/dist/{setup-z1psaqhe.js → setup-ry1vfdef.js} +1 -1
  127. package/dist/thread-buffer-3x93yexa.js +38 -0
  128. package/dist/{typesafe-system-one-f2en2knd.js → typesafe-system-one-vcfj2ak8.js} +2 -2
  129. package/dist/user-merge-jobs-bx6bf7db.js +22 -0
  130. package/dist/{virtual-modules-rrbjdpxn.js → virtual-modules-s0rjzcqq.js} +3 -3
  131. package/dist/{work-objects-4aghh73z.js → work-objects-z2e5tv03.js} +20 -20
  132. package/dist/{worker-follow-up-166zmex1.js → worker-follow-up-y3xeg89w.js} +17 -17
  133. package/dist/worker-zfcv2wbf.js +74 -0
  134. package/openapi.json +1630 -388
  135. package/package.json +3 -3
  136. package/src/be/boot-seeds.ts +7 -1
  137. package/src/be/db/model-groups.ts +238 -0
  138. package/src/be/db/model-profiles.ts +26 -8
  139. package/src/be/db/session-costs.ts +8 -2
  140. package/src/be/db/tasks/read.ts +3 -2
  141. package/src/be/db/tasks/write.ts +2 -1
  142. package/src/be/db/user-references.ts +75 -0
  143. package/src/be/db/users/references.ts +185 -0
  144. package/src/be/db-client.ts +70 -19
  145. package/src/be/db.ts +32 -57
  146. package/src/be/key-window-usage.ts +1 -0
  147. package/src/be/memory/demotion-evidence.ts +34 -0
  148. package/src/be/memory/reranker.ts +34 -12
  149. package/src/be/memory/review-recall-filter.ts +83 -0
  150. package/src/be/memory/search-candidates.ts +19 -6
  151. package/src/be/memory/types.ts +11 -0
  152. package/src/be/migrations/312_task_ui_action_runs_repeatable.sql +6 -0
  153. package/src/be/migrations/314_model_groups.sql +85 -0
  154. package/src/be/migrations/318_superseded_workflow_cut_backfill.sql +22 -0
  155. package/src/be/migrations/319_user_fk_indexes.sql +153 -0
  156. package/src/be/migrations/320_session_costs_kind.sql +4 -0
  157. package/src/be/migrations/321_user_merge_jobs.sql +52 -0
  158. package/src/be/pricing-normalize.ts +2 -0
  159. package/src/be/rbac-roles.ts +6 -4
  160. package/src/be/runtime-pools/db.ts +20 -5
  161. package/src/be/runtime-pools/supervisor.ts +15 -1
  162. package/src/be/scripts/db.ts +11 -0
  163. package/src/be/scripts/typecheck.ts +2 -0
  164. package/src/be/seed-model-groups.ts +86 -0
  165. package/src/be/seed-model-profiles.ts +20 -13
  166. package/src/be/seed-scripts/catalog/dreaming-gather.ts +165 -1
  167. package/src/be/swarm-config-guard.ts +34 -0
  168. package/src/be/task-ui-spec.ts +102 -1
  169. package/src/be/user-merge-jobs.ts +564 -0
  170. package/src/be/users.ts +41 -23
  171. package/src/commands/onboard/agent-fs-version.ts +1 -1
  172. package/src/commands/onboard/compose-generator.ts +1 -1
  173. package/src/commands/onboard/env-generator.ts +1 -1
  174. package/src/commands/provider-credentials.ts +1 -1
  175. package/src/extensions/contract-types.generated.ts +1 -1
  176. package/src/extensions/contract.ts +15 -0
  177. package/src/extensions/dispatcher.ts +14 -4
  178. package/src/github/handlers.ts +57 -0
  179. package/src/github/types.ts +4 -0
  180. package/src/http/all-routes.ts +2 -0
  181. package/src/http/approval-requests.ts +5 -1
  182. package/src/http/auth.ts +3 -1
  183. package/src/http/config.ts +34 -1
  184. package/src/http/index.ts +13 -0
  185. package/src/http/memory.ts +19 -6
  186. package/src/http/model-groups.ts +277 -0
  187. package/src/http/model-profiles.ts +30 -13
  188. package/src/http/tasks.ts +41 -6
  189. package/src/http/tool-hooks.ts +140 -0
  190. package/src/http/users.ts +142 -19
  191. package/src/http/workflows.ts +19 -1
  192. package/src/integrations/chat-sdk/inbound.ts +8 -2
  193. package/src/integrations/chat-sdk/limits.ts +8 -3
  194. package/src/providers/acp-targets.ts +2 -2
  195. package/src/providers/amp-adapter.ts +1 -1
  196. package/src/providers/pricing-sources.md +9 -0
  197. package/src/rbac/legacy-policy.ts +1 -0
  198. package/src/rbac/permissions.ts +5 -0
  199. package/src/runtime-providers/index.ts +7 -5
  200. package/src/runtime-providers/k8s.ts +250 -0
  201. package/src/scripts-runtime/types/stdlib.d.ts +2 -0
  202. package/src/scripts-runtime/types/swarm-extension.d.ts +16 -1
  203. package/src/scripts-runtime/types/swarm-sdk.d.ts +2 -0
  204. package/src/slack/actions.ts +33 -10
  205. package/src/slack/blocks.ts +23 -2
  206. package/src/slack/render-v2.ts +47 -0
  207. package/src/tests/acp-adapter.test.ts +26 -0
  208. package/src/tests/chat-sdk-relay.test.ts +21 -1
  209. package/src/tests/check-pr-body.test.ts +43 -0
  210. package/src/tests/credential-check.test.ts +14 -6
  211. package/src/tests/db-client.test.ts +146 -0
  212. package/src/tests/deploy-guard.test.ts +7 -7
  213. package/src/tests/deploy-select.test.ts +83 -0
  214. package/src/tests/dreaming-gather-corrections.test.ts +467 -0
  215. package/src/tests/event-loop-lag.test.ts +9 -7
  216. package/src/tests/fixtures/extensions/native-tool-recorder/hooks.ts +26 -0
  217. package/src/tests/fixtures/extensions/native-tool-recorder/manifest.json +10 -0
  218. package/src/tests/fixtures/onboard/content.compose.yml.txt +1 -1
  219. package/src/tests/fixtures/onboard/content.env.txt +1 -1
  220. package/src/tests/fixtures/onboard/dev.compose.yml.txt +1 -1
  221. package/src/tests/fixtures/onboard/dev.env.txt +1 -1
  222. package/src/tests/fixtures/onboard/full-all.compose.yml.txt +1 -1
  223. package/src/tests/fixtures/onboard/full-all.env.txt +1 -1
  224. package/src/tests/fixtures/onboard/full.compose.yml.txt +1 -1
  225. package/src/tests/fixtures/onboard/full.env.txt +1 -1
  226. package/src/tests/fixtures/onboard/research.compose.yml.txt +1 -1
  227. package/src/tests/fixtures/onboard/research.env.txt +1 -1
  228. package/src/tests/fixtures/onboard/solo.compose.yml.txt +1 -1
  229. package/src/tests/fixtures/onboard/solo.env.txt +1 -1
  230. package/src/tests/github-event-filter.test.ts +8 -0
  231. package/src/tests/github-handlers-inline-comments.test.ts +2 -0
  232. package/src/tests/github-handlers-reactions.test.ts +4 -0
  233. package/src/tests/github-handlers.test.ts +3 -0
  234. package/src/tests/github-sender-trust.test.ts +223 -0
  235. package/src/tests/http-users.test.ts +142 -41
  236. package/src/tests/k8s-pool-smoke.test.ts +190 -0
  237. package/src/tests/key-window-usage.test.ts +15 -0
  238. package/src/tests/memory-rater-store.test.ts +35 -1
  239. package/src/tests/memory-reranker.test.ts +39 -4
  240. package/src/tests/memory-review-recall-filter.test.ts +205 -0
  241. package/src/tests/migration-318-superseded-workflow-cut-backfill.test.ts +74 -0
  242. package/src/tests/model-groups-api.test.ts +415 -0
  243. package/src/tests/model-profiles-api.test.ts +1 -0
  244. package/src/tests/operator-granted-credentials.test.ts +7 -2
  245. package/src/tests/operator-granted-role-wire.test.ts +2 -1
  246. package/src/tests/rbac-engine.test.ts +1 -0
  247. package/src/tests/runtime-k8s-pools.test.ts +142 -0
  248. package/src/tests/runtime-pools-db.test.ts +42 -2
  249. package/src/tests/runtime-pools-http.test.ts +47 -2
  250. package/src/tests/runtime-provider-registration.test.ts +5 -14
  251. package/src/tests/runtime-providers-k8s.test.ts +303 -0
  252. package/src/tests/script-connections.test.ts +13 -1
  253. package/src/tests/short-id.test.ts +23 -0
  254. package/src/tests/slack-blocks.test.ts +69 -0
  255. package/src/tests/slack-render-v2.test.ts +54 -0
  256. package/src/tests/spec-base-url.test.ts +13 -1
  257. package/src/tests/system-one-decide-session-cost.test.ts +196 -0
  258. package/src/tests/task-ui-action-route.test.ts +59 -1
  259. package/src/tests/task-ui-script-actions.test.ts +517 -0
  260. package/src/tests/tool-hooks-http.test.ts +187 -0
  261. package/src/tests/ui-spec-script-actions-config.test.ts +196 -0
  262. package/src/tests/user-delete-perf.test.ts +321 -0
  263. package/src/tests/user-merge-jobs.test.ts +680 -0
  264. package/src/tests/vcs-provider.test.ts +25 -5
  265. package/src/tests/vendored-openapi.test.ts +13 -1
  266. package/src/tests/workflow-agent-task-retry.test.ts +62 -0
  267. package/src/tests/workflow-foreach-supersede-retry.test.ts +10 -0
  268. package/src/tests/workflow-http-v2.test.ts +27 -0
  269. package/src/tests/workflow-replay.test.ts +10 -1
  270. package/src/tests/workflow-triggers-v2.test.ts +128 -0
  271. package/src/tests/workflow-wait-event.test.ts +109 -1
  272. package/src/tools/memory-search.ts +14 -3
  273. package/src/tools/store-progress.ts +26 -26
  274. package/src/tools/swarm-config/delete-config.ts +12 -1
  275. package/src/tools/swarm-config/set-config.ts +8 -0
  276. package/src/tools/system-one-decide.ts +113 -3
  277. package/src/tools/utils.ts +4 -1
  278. package/src/tools/workflows/create-workflow.ts +2 -0
  279. package/src/tools/workflows/update-workflow.ts +3 -1
  280. package/src/types.ts +86 -2
  281. package/src/ui-spec/actions.ts +30 -4
  282. package/src/ui-spec/schema.ts +38 -0
  283. package/src/ui-spec/script-actions.ts +340 -0
  284. package/src/ui-spec/script-allowlist.ts +48 -0
  285. package/src/utils/short-id.ts +20 -14
  286. package/src/utils/task-ui-spec.ts +16 -4
  287. package/src/vcs/index.ts +12 -2
  288. package/src/workflows/executors/system-one-decision.ts +2 -2
  289. package/src/workflows/resume.ts +3 -2
  290. package/src/workflows/task-step-routing.ts +30 -10
  291. package/src/workflows/triggers.ts +35 -3
  292. package/templates/extensions/manifest.schema.json +13 -0
  293. package/templates/skills/swarm-docs/content.md +2 -0
  294. package/templates/skills/ui-spec/content.md +7 -1
  295. package/templates/workflows/dreaming/content.md +1 -1
  296. package/dist/acp-adapter-g909b5hw.js +0 -16
  297. package/dist/cli-b91nz213.js +0 -93
  298. package/dist/handlers-yzy0c87x.js +0 -35
  299. package/dist/index-2t4859r5.js +0 -35
  300. package/dist/index-cxca2t8y.js +0 -36
  301. package/dist/lead-gk4h5eg7.js +0 -74
  302. package/dist/thread-buffer-a1re2r9r.js +0 -38
  303. package/dist/worker-3dyyb8ev.js +0 -74
  304. package/dist/{azure-openai-responses-590s1eea.js → azure-openai-responses-b3y7fz36.js} +8 -8
  305. package/dist/{cli-m7c2380k.js → cli-3aaeb78m.js} +4 -4
  306. package/dist/{cli-g0vv9dg4.js → cli-8y43jx2r.js} +8 -8
  307. package/dist/{cli-m0cy2vyf.js → cli-k6nejceb.js} +4 -4
  308. package/dist/{google-generative-ai-maq6c9bf.js → google-generative-ai-bh0djqjp.js} +4 -4
  309. package/dist/{google-vertex-2jgsw2nb.js → google-vertex-prjbw8dj.js} +8 -8
  310. package/dist/{mistral-conversations-0c30em7t.js → mistral-conversations-tm2vd4gc.js} +8 -8
  311. package/dist/{node-dqm4xgxw.js → node-2wfcey7d.js} +0 -0
  312. package/dist/{openai-codex-responses-bkcd8pjj.js → openai-codex-responses-sxjv60xx.js} +4 -4
  313. package/dist/{openai-completions-f3n69rep.js → openai-completions-0c7qnhsx.js} +20 -20
  314. package/dist/{openai-responses-gbh0wfqe.js → openai-responses-a7h29chp.js} +15 -15
  315. package/dist/{pi-messages-zebyt7gb.js → pi-messages-2j0fpqwq.js} +5 -5
@@ -9,7 +9,7 @@ import {
9
9
  loadMcpConfig,
10
10
  addMcpServerConfig,
11
11
  removeMcpServerConfig
12
- } from "./cli-32djehja.js";
12
+ } from "./cli-2spnz7ye.js";
13
13
  import {
14
14
  McpOAuthCredentialStore2,
15
15
  McpSignInCancelledError2,
@@ -17,7 +17,7 @@ import {
17
17
  McpServerLog2,
18
18
  createDefaultTransport2,
19
19
  McpServerConnection2
20
- } from "./cli-vyff45ve.js";
20
+ } from "./cli-p0c3vtch.js";
21
21
 
22
22
  // node_modules/@earendil-works/pi-coding-agent/dist/extensions/mcp/cli.js
23
23
  import { existsSync } from "node:fs";
@@ -19,7 +19,7 @@ import {
19
19
  deleteKv2,
20
20
  listKv2,
21
21
  init_db4
22
- } from "./cli-ctx0b85j.js";
22
+ } from "./cli-wwp1bd3n.js";
23
23
  import {
24
24
  ackSlackMessage,
25
25
  skipSlackMessageReaction,
@@ -36,7 +36,7 @@ import {
36
36
  init_watcher,
37
37
  getSlackApp2,
38
38
  init_app3
39
- } from "./cli-pyjn0qhk.js";
39
+ } from "./cli-539h29es.js";
40
40
  import {
41
41
  applyPreTaskCreate,
42
42
  init_apply_task_create,
@@ -55,22 +55,22 @@ import {
55
55
  init_message_text,
56
56
  createAdditiveBuffer,
57
57
  init_additive_buffer
58
- } from "./cli-2czxfnvj.js";
58
+ } from "./cli-p0n7b5rz.js";
59
59
  import {
60
60
  resolveSlackParticipant,
61
61
  resolveSlackUserId,
62
62
  getOurSlackTeamId,
63
63
  rewriteSlackMentions,
64
64
  init_enrich
65
- } from "./cli-jaw5v1sy.js";
65
+ } from "./cli-k5yewqgd.js";
66
66
  import {
67
67
  isSlackThreadLeft,
68
68
  init_left_threads
69
- } from "./cli-br0924pw.js";
69
+ } from "./cli-jrbq4djp.js";
70
70
  import {
71
71
  findUserByExternalId,
72
72
  init_users
73
- } from "./cli-v57d7fmm.js";
73
+ } from "./cli-vsw91x06.js";
74
74
  import {
75
75
  isSteeringEnabled2,
76
76
  init_steering_enabled
@@ -3,11 +3,6 @@ import {
3
3
  getValidCodexOAuth,
4
4
  init_storage
5
5
  } from "./cli-7sf9sb0w.js";
6
- import {
7
- resolveDeploymentName,
8
- resolveAzureBaseUrl,
9
- init_azure_openai_config
10
- } from "./cli-herdfhme.js";
11
6
  import {
12
7
  init_session_resources,
13
8
  init_uuid
@@ -24,6 +19,11 @@ import {
24
19
  getEnvApiKey,
25
20
  init_env_api_keys
26
21
  } from "./cli-xqdz5cqm.js";
22
+ import {
23
+ resolveDeploymentName,
24
+ resolveAzureBaseUrl,
25
+ init_azure_openai_config
26
+ } from "./cli-herdfhme.js";
27
27
  import {
28
28
  bedrockConverseStreamApi,
29
29
  init_bedrock_converse_stream_lazy
@@ -6318,55 +6318,55 @@ var init_bun_oauth = __esm(() => {
6318
6318
  });
6319
6319
 
6320
6320
  // node_modules/@earendil-works/pi-ai/dist/api/anthropic-messages.lazy.js
6321
- var anthropicMessagesApi = () => lazyApi(() => import("./anthropic-messages-r5xf5hqw.js"));
6321
+ var anthropicMessagesApi = () => lazyApi(() => import("./anthropic-messages-zdca3gv1.js"));
6322
6322
  var init_anthropic_messages_lazy = __esm(() => {
6323
6323
  init_lazy();
6324
6324
  });
6325
6325
 
6326
6326
  // node_modules/@earendil-works/pi-ai/dist/api/azure-openai-responses.lazy.js
6327
- var azureOpenAIResponsesApi = () => lazyApi(() => import("./azure-openai-responses-590s1eea.js"));
6327
+ var azureOpenAIResponsesApi = () => lazyApi(() => import("./azure-openai-responses-b3y7fz36.js"));
6328
6328
  var init_azure_openai_responses_lazy = __esm(() => {
6329
6329
  init_lazy();
6330
6330
  });
6331
6331
 
6332
6332
  // node_modules/@earendil-works/pi-ai/dist/api/google-generative-ai.lazy.js
6333
- var googleGenerativeAIApi = () => lazyApi(() => import("./google-generative-ai-maq6c9bf.js"));
6333
+ var googleGenerativeAIApi = () => lazyApi(() => import("./google-generative-ai-bh0djqjp.js"));
6334
6334
  var init_google_generative_ai_lazy = __esm(() => {
6335
6335
  init_lazy();
6336
6336
  });
6337
6337
 
6338
6338
  // node_modules/@earendil-works/pi-ai/dist/api/google-vertex.lazy.js
6339
- var googleVertexApi = () => lazyApi(() => import("./google-vertex-2jgsw2nb.js"));
6339
+ var googleVertexApi = () => lazyApi(() => import("./google-vertex-prjbw8dj.js"));
6340
6340
  var init_google_vertex_lazy = __esm(() => {
6341
6341
  init_lazy();
6342
6342
  });
6343
6343
 
6344
6344
  // node_modules/@earendil-works/pi-ai/dist/api/mistral-conversations.lazy.js
6345
- var mistralConversationsApi = () => lazyApi(() => import("./mistral-conversations-0c30em7t.js"));
6345
+ var mistralConversationsApi = () => lazyApi(() => import("./mistral-conversations-tm2vd4gc.js"));
6346
6346
  var init_mistral_conversations_lazy = __esm(() => {
6347
6347
  init_lazy();
6348
6348
  });
6349
6349
 
6350
6350
  // node_modules/@earendil-works/pi-ai/dist/api/openai-codex-responses.lazy.js
6351
- var openAICodexResponsesApi = () => lazyApi(() => import("./openai-codex-responses-bkcd8pjj.js"));
6351
+ var openAICodexResponsesApi = () => lazyApi(() => import("./openai-codex-responses-sxjv60xx.js"));
6352
6352
  var init_openai_codex_responses_lazy = __esm(() => {
6353
6353
  init_lazy();
6354
6354
  });
6355
6355
 
6356
6356
  // node_modules/@earendil-works/pi-ai/dist/api/openai-completions.lazy.js
6357
- var openAICompletionsApi = () => lazyApi(() => import("./openai-completions-f3n69rep.js"));
6357
+ var openAICompletionsApi = () => lazyApi(() => import("./openai-completions-0c7qnhsx.js"));
6358
6358
  var init_openai_completions_lazy = __esm(() => {
6359
6359
  init_lazy();
6360
6360
  });
6361
6361
 
6362
6362
  // node_modules/@earendil-works/pi-ai/dist/api/openai-responses.lazy.js
6363
- var openAIResponsesApi = () => lazyApi(() => import("./openai-responses-gbh0wfqe.js"));
6363
+ var openAIResponsesApi = () => lazyApi(() => import("./openai-responses-a7h29chp.js"));
6364
6364
  var init_openai_responses_lazy = __esm(() => {
6365
6365
  init_lazy();
6366
6366
  });
6367
6367
 
6368
6368
  // node_modules/@earendil-works/pi-ai/dist/api/pi-messages.lazy.js
6369
- var piMessagesApi = () => lazyApi(() => import("./pi-messages-zebyt7gb.js"));
6369
+ var piMessagesApi = () => lazyApi(() => import("./pi-messages-2j0fpqwq.js"));
6370
6370
  var init_pi_messages_lazy = __esm(() => {
6371
6371
  init_lazy();
6372
6372
  });
@@ -7838,7 +7838,7 @@ var init_cloudflare_ai_gateway2 = __esm(() => {
7838
7838
 
7839
7839
  // node_modules/@earendil-works/pi-ai/dist/api/cloudflare-workers-ai-system-one.lazy.js
7840
7840
  var cloudflareWorkersAISystemOneApi = () => ({
7841
- classify: async (model, context, options) => (await import("./cloudflare-workers-ai-system-one-9y1zx3pt.js")).classify(model, context, options)
7841
+ classify: async (model, context, options) => (await import("./cloudflare-workers-ai-system-one-4aysy6rh.js")).classify(model, context, options)
7842
7842
  });
7843
7843
  var init_cloudflare_workers_ai_system_one_lazy = () => {};
7844
7844
 
@@ -8262,7 +8262,7 @@ var init_nvidia2 = __esm(() => {
8262
8262
 
8263
8263
  // node_modules/@earendil-works/pi-ai/dist/api/openai-decisions.lazy.js
8264
8264
  var openAIDecisionsApi = () => ({
8265
- classify: async (model, context, options) => (await import("./openai-decisions-q3hh60wr.js")).classify(model, context, options)
8265
+ classify: async (model, context, options) => (await import("./openai-decisions-ytp6w6xh.js")).classify(model, context, options)
8266
8266
  });
8267
8267
  var init_openai_decisions_lazy = () => {};
8268
8268
 
@@ -8328,7 +8328,7 @@ var init_openai_codex3 = __esm(() => {
8328
8328
 
8329
8329
  // node_modules/@earendil-works/pi-ai/dist/api/typesafe-system-one.lazy.js
8330
8330
  var typesafeSystemOneApi = () => ({
8331
- classify: async (model, context, options) => (await import("./typesafe-system-one-f2en2knd.js")).classify(model, context, options)
8331
+ classify: async (model, context, options) => (await import("./typesafe-system-one-vcfj2ak8.js")).classify(model, context, options)
8332
8332
  });
8333
8333
  var init_typesafe_system_one_lazy = () => {};
8334
8334
 
@@ -35,7 +35,7 @@ import {
35
35
  getPendingWaitsByEvent2,
36
36
  resolveWaitState2,
37
37
  init_db4
38
- } from "./cli-ctx0b85j.js";
38
+ } from "./cli-wwp1bd3n.js";
39
39
  import {
40
40
  workflowEventBus2,
41
41
  init_event_bus
@@ -43,7 +43,7 @@ import {
43
43
  import {
44
44
  postApprovalCancellationUpdates2,
45
45
  init_approval_notifications
46
- } from "./cli-jkw6ptfw.js";
46
+ } from "./cli-cc93xzes.js";
47
47
  import {
48
48
  BaseExecutor,
49
49
  init_base,
@@ -82,12 +82,12 @@ import {
82
82
  getNextTargets,
83
83
  getSuccessors,
84
84
  init_definition2
85
- } from "./cli-j7svy295.js";
85
+ } from "./cli-q5srsxq2.js";
86
86
  import {
87
87
  RetryPolicySchema,
88
88
  SUPERSEDED_WORKFLOW_TASK_REASON,
89
89
  init_types5
90
- } from "./cli-bkjdknnp.js";
90
+ } from "./cli-y4ccxtz5.js";
91
91
  import {
92
92
  init_zod
93
93
  } from "./cli-zcfpsfzf.js";
@@ -652,22 +652,29 @@ async function completeTaskStepAndResolveSuccessors(def, runId, step, output, ct
652
652
  return UNCLAIMED;
653
653
  if (await getRunLineageBlock(runId))
654
654
  return UNCLAIMED;
655
+ const failedTaskId = failureReason !== undefined ? ownerTaskId ?? (await getTaskByWorkflowRunStepId2(step.id))?.id : undefined;
656
+ let result;
655
657
  if (resolveForeachParent(def, step.nodeId)) {
656
- return toRoutingResult(await settleForeachChild(def, runId, step.id, {
658
+ result = toRoutingResult(await settleForeachChild(def, runId, step.id, {
657
659
  status: "completed",
658
660
  output,
659
661
  ...failureReason !== undefined ? { error: failureReason } : {}
660
662
  }, ctx, { registry }));
663
+ } else {
664
+ await checkpointStep(runId, step.id, step.nodeId, { output }, ctx);
665
+ await updateWorkflowRun2(runId, { status: "running" });
666
+ result = {
667
+ claimed: true,
668
+ foreachChild: false,
669
+ joined: true,
670
+ successors: getSuccessors(def, step.nodeId),
671
+ runFailed: false
672
+ };
661
673
  }
662
- await checkpointStep(runId, step.id, step.nodeId, { output }, ctx);
663
- await updateWorkflowRun2(runId, { status: "running" });
664
- return {
665
- claimed: true,
666
- foreachChild: false,
667
- joined: true,
668
- successors: getSuccessors(def, step.nodeId),
669
- runFailed: false
670
- };
674
+ if (failedTaskId && result.claimed && !result.runFailed) {
675
+ await markWorkflowStepTaskSuperseded2(failedTaskId);
676
+ }
677
+ return result;
671
678
  });
672
679
  }
673
680
  var UNCLAIMED, SUPERSEDE_RETRY_POLICY;
@@ -1334,7 +1341,7 @@ async function processBusEvent(eventName, payload) {
1334
1341
  console.error(`[workflows] Wait bus listener failed for wait=${waitId} event=${eventName}:`, err);
1335
1342
  }
1336
1343
  }
1337
- if (set.size === 0) {
1344
+ if (set.size === 0 && waitsByEvent.get(eventName) === set) {
1338
1345
  waitsByEvent.delete(eventName);
1339
1346
  const listener = listenersByEvent.get(eventName);
1340
1347
  if (listener) {
@@ -4,7 +4,7 @@ import {
4
4
  CONTROLLER_COMMAND_TIMEOUT_MS,
5
5
  RuntimeHandleSchema,
6
6
  ControllerStatusResultSchema
7
- } from "./cli-mhapr559.js";
7
+ } from "./cli-43evxwj4.js";
8
8
  import {
9
9
  getDbClient2,
10
10
  validateControllerGraceSec,
@@ -19,7 +19,7 @@ import {
19
19
  upsertSwarmConfig2,
20
20
  getResolvedConfig2,
21
21
  init_db4
22
- } from "./cli-ctx0b85j.js";
22
+ } from "./cli-wwp1bd3n.js";
23
23
  import {
24
24
  getPoolCache,
25
25
  reconcileCacheReleases,
@@ -33,7 +33,7 @@ import {
33
33
  getPoolForAgent2,
34
34
  resolvePoolDelivery2,
35
35
  init_db2
36
- } from "./cli-mkwkwq81.js";
36
+ } from "./cli-s1zqk1aj.js";
37
37
  import {
38
38
  workflowEventBus2,
39
39
  init_event_bus
@@ -46,7 +46,7 @@ import {
46
46
  listRuntimeInstancesForAgent,
47
47
  listRuntimeInstancesForPool,
48
48
  init_multi_runtime
49
- } from "./cli-jkw6ptfw.js";
49
+ } from "./cli-cc93xzes.js";
50
50
  import {
51
51
  pendingWorkForAgent,
52
52
  countPoolRuntimes,
@@ -56,7 +56,7 @@ import {
56
56
  init_worker_follow_up,
57
57
  canClaim,
58
58
  init_budget_admission
59
- } from "./cli-2czxfnvj.js";
59
+ } from "./cli-p0n7b5rz.js";
60
60
  import {
61
61
  isMultiRuntimeEnabled,
62
62
  init_multi_runtime2
@@ -73,7 +73,7 @@ import {
73
73
  canProvisionKind,
74
74
  createRuntimeProvider,
75
75
  init_runtime_providers
76
- } from "./cli-6945ywhr.js";
76
+ } from "./cli-tvgqesec.js";
77
77
  import {
78
78
  RUNTIME_LABELS,
79
79
  init_types4
@@ -85,12 +85,12 @@ import {
85
85
  import {
86
86
  mintRuntimeToken,
87
87
  init_users
88
- } from "./cli-v57d7fmm.js";
88
+ } from "./cli-vsw91x06.js";
89
89
  import {
90
90
  TERMINAL_TASK_STATUSES,
91
91
  isTerminalTaskStatus,
92
92
  init_types5
93
- } from "./cli-bkjdknnp.js";
93
+ } from "./cli-y4ccxtz5.js";
94
94
  import {
95
95
  init_zod
96
96
  } from "./cli-zcfpsfzf.js";
@@ -516,7 +516,7 @@ async function recoverSessions(runtimeId, reason) {
516
516
  }
517
517
  if (!sessions.length)
518
518
  return;
519
- const { remediateTaskForDeadRuntime } = await import("./heartbeat-2f6z4kdx.js");
519
+ const { remediateTaskForDeadRuntime } = await import("./heartbeat-x0056ra5.js");
520
520
  for (const session of sessions) {
521
521
  try {
522
522
  const task = await getTaskById2(session.taskId);
@@ -689,6 +689,16 @@ function runtimeNumber(key, fallback) {
689
689
  function poolLeaseTtl(pool, controller) {
690
690
  return Math.min(Math.max(pool.ttlSec ?? 900, runtimeNumber("RUNTIME_LEASE_RENEW_BEFORE_SEC", 300) + 60), controller.traits.maxTtlSec ?? Infinity, controller.traits.maxContinuousSec ?? Infinity);
691
691
  }
692
+ function poolProvisionTtl(pool, controller) {
693
+ switch (pool.kind) {
694
+ case "e2b":
695
+ return poolLeaseTtl(pool, controller);
696
+ case "k8s":
697
+ return pool.ttlSec ?? undefined;
698
+ default:
699
+ return;
700
+ }
701
+ }
692
702
  async function recordProvisionFailure(runtime, reason, now, countedFailures) {
693
703
  const error = scrubSecrets(reason);
694
704
  const failedTask = await getDbClient2().transaction(async (tx) => {
@@ -796,7 +806,7 @@ async function provisionRuntime(pool, agent, controller, ownerId, now = new Date
796
806
  env.SWARM_EXIT_AFTER_TASKS = "1";
797
807
  if (templateId)
798
808
  env.TEMPLATE_ID = templateId;
799
- const ttlSec = pool.kind === "e2b" ? poolLeaseTtl(pool, controller) : undefined;
809
+ const ttlSec = poolProvisionTtl(pool, controller);
800
810
  const currentPoolCache = await getPoolCache(pool.id);
801
811
  const currentCache = currentPoolCache?.controllerId === pool.placements[0] ? currentPoolCache : null;
802
812
  const cache = currentCache && controller.traits.persistentCache ? { key: currentCache.key, mountPath: currentCache.mountPath } : undefined;
@@ -13,7 +13,7 @@ import {
13
13
  claudeMdLineageOf,
14
14
  planClaudeMdSync,
15
15
  init_profile_sync
16
- } from "./cli-m7c2380k.js";
16
+ } from "./cli-3aaeb78m.js";
17
17
  import {
18
18
  scrubSecrets,
19
19
  init_secret_scrubber
@@ -70,11 +70,11 @@ import {
70
70
  getStaleApprovalRequests2,
71
71
  upsertKv2,
72
72
  init_db4
73
- } from "./cli-ctx0b85j.js";
73
+ } from "./cli-wwp1bd3n.js";
74
74
  import {
75
75
  listRuntimePools2,
76
76
  init_db2
77
- } from "./cli-mkwkwq81.js";
77
+ } from "./cli-s1zqk1aj.js";
78
78
  import {
79
79
  runtimeStaleThresholdMinutes,
80
80
  countActiveRuntimeInstancesForAgent,
@@ -84,15 +84,15 @@ import {
84
84
  init_multi_runtime,
85
85
  createApprovalFollowUpTask2,
86
86
  init_approval_notifications
87
- } from "./cli-jkw6ptfw.js";
87
+ } from "./cli-cc93xzes.js";
88
88
  import {
89
89
  userHoldsOperatorGrantedRole2,
90
90
  assertMayActOnOperatorGrantedTarget2,
91
91
  init_rbac_roles
92
- } from "./cli-pb2ay3sh.js";
92
+ } from "./cli-vfqvrd82.js";
93
93
  import {
94
94
  remediateStalledRuntime
95
- } from "./cli-sn650d7x.js";
95
+ } from "./cli-8st34zhr.js";
96
96
  import {
97
97
  recoverIncompleteRuns,
98
98
  init_recovery,
@@ -120,13 +120,13 @@ import {
120
120
  init_approval_cancel,
121
121
  canClaim,
122
122
  init_budget_admission
123
- } from "./cli-2czxfnvj.js";
123
+ } from "./cli-p0n7b5rz.js";
124
124
  import {
125
125
  runScriptWithRunCredential,
126
126
  init_run_credential,
127
127
  runSavedScriptAsAgent,
128
128
  init_run_saved
129
- } from "./cli-2yjj3e31.js";
129
+ } from "./cli-w1q68d8x.js";
130
130
  import {
131
131
  isMultiRuntimeEnabled,
132
132
  init_multi_runtime2
@@ -135,13 +135,13 @@ import {
135
135
  recordIdentityEvent,
136
136
  mintToken,
137
137
  init_users
138
- } from "./cli-v57d7fmm.js";
138
+ } from "./cli-vsw91x06.js";
139
139
  import {
140
140
  TERMINAL_TASK_STATUSES,
141
141
  OPEN_TASK_STATUSES,
142
142
  SUPERSEDED_WORKFLOW_TASK_REASON,
143
143
  init_types5
144
- } from "./cli-bkjdknnp.js";
144
+ } from "./cli-y4ccxtz5.js";
145
145
  import {
146
146
  DEFAULT_OPENROUTER_BASE_URL,
147
147
  getOpenRouterBaseUrl,
@@ -160,7 +160,7 @@ import {
160
160
  import {
161
161
  init_package,
162
162
  package_default
163
- } from "./cli-h9yqfzx9.js";
163
+ } from "./cli-3f8zbtqa.js";
164
164
  import {
165
165
  scrubSecrets,
166
166
  init_secret_scrubber
@@ -4,18 +4,20 @@ import {
4
4
  getLeadAgent2,
5
5
  getTaskById2,
6
6
  init_db4
7
- } from "./cli-ctx0b85j.js";
7
+ } from "./cli-wwp1bd3n.js";
8
8
  import {
9
9
  getTaskUiSpec,
10
10
  reserveTaskUiActionRun,
11
11
  releaseTaskUiActionRun,
12
12
  setTaskUiActionResult,
13
13
  init_task_ui_spec
14
- } from "./cli-pyjn0qhk.js";
14
+ } from "./cli-539h29es.js";
15
15
  import {
16
16
  createTaskWithSiblingAwareness,
17
- init_sibling_awareness
18
- } from "./cli-2czxfnvj.js";
17
+ init_sibling_awareness,
18
+ runTaskUiScriptAction,
19
+ init_script_actions
20
+ } from "./cli-p0n7b5rz.js";
19
21
  import {
20
22
  isEnvFlagEnabled,
21
23
  init_env_flag
@@ -37,10 +39,21 @@ async function runTaskUiAction({
37
39
  const task = await getTaskById2(taskId);
38
40
  const stored = task ? await getTaskUiSpec(taskId) : null;
39
41
  const action = stored?.actions && Object.hasOwn(stored.actions, actionId) ? stored.actions[actionId] : undefined;
40
- if (!task || !action)
42
+ if (!task || !stored || !action)
41
43
  return { status: "unknown_action" };
42
44
  if (!actorUserId || actorUserId !== task.requestedByUserId)
43
45
  return { status: "forbidden" };
46
+ if (action.kind === "script") {
47
+ return await runTaskUiScriptAction({
48
+ task,
49
+ actionId,
50
+ action,
51
+ stored,
52
+ surface,
53
+ actorUserId,
54
+ slackUserId
55
+ });
56
+ }
44
57
  const reserved = await reserveTaskUiActionRun({
45
58
  taskId,
46
59
  actionId,
@@ -79,6 +92,7 @@ var init_actions = __esm(() => {
79
92
  init_context_key();
80
93
  init_sibling_awareness();
81
94
  init_env_flag();
95
+ init_script_actions();
82
96
  });
83
97
 
84
98
  export { runTaskUiAction, init_actions };
@@ -25,17 +25,17 @@ import {
25
25
  getUserById2,
26
26
  getAllUsers2,
27
27
  init_db4
28
- } from "./cli-ctx0b85j.js";
28
+ } from "./cli-wwp1bd3n.js";
29
29
  import {
30
30
  externalChannelToolError2,
31
31
  isBlockExternalEnabled2,
32
32
  getChannelBlockReason2,
33
33
  init_external_channel
34
- } from "./cli-xag7btpe.js";
34
+ } from "./cli-mk7c5ac4.js";
35
35
  import {
36
36
  getSlackApp2,
37
37
  init_app3
38
- } from "./cli-pyjn0qhk.js";
38
+ } from "./cli-539h29es.js";
39
39
  import {
40
40
  isMultiRuntimeEnabled,
41
41
  init_multi_runtime2
@@ -43,11 +43,11 @@ import {
43
43
  import {
44
44
  revokeRuntimeTokensForRuntime,
45
45
  init_users
46
- } from "./cli-v57d7fmm.js";
46
+ } from "./cli-vsw91x06.js";
47
47
  import {
48
48
  TERMINAL_TASK_STATUSES,
49
49
  init_types5
50
- } from "./cli-bkjdknnp.js";
50
+ } from "./cli-y4ccxtz5.js";
51
51
  import {
52
52
  resolveTemplate,
53
53
  init_resolver
@@ -6,22 +6,22 @@ import {
6
6
  resolveCredential,
7
7
  resolveCredentials,
8
8
  init_credentials
9
- } from "./cli-zr6qy15y.js";
9
+ } from "./cli-6cwr32fe.js";
10
10
  import {
11
11
  kindForModelString,
12
12
  parseModelStr,
13
13
  init_models2
14
14
  } from "./cli-82j36f2m.js";
15
+ import {
16
+ selectCredential,
17
+ init_credentials2
18
+ } from "./cli-psffsanb.js";
15
19
  import {
16
20
  DEFAULT_OPENROUTER_BASE_URL,
17
21
  getOpenRouterBaseUrl,
18
22
  getOpenRouterAttributionHeaders,
19
23
  init_openrouter_base_url
20
24
  } from "./cli-dfyv0jdy.js";
21
- import {
22
- selectCredential,
23
- init_credentials2
24
- } from "./cli-psffsanb.js";
25
25
  import {
26
26
  init_zod
27
27
  } from "./cli-zcfpsfzf.js";
@@ -5,15 +5,15 @@ import {
5
5
  import {
6
6
  applyReasoningEffort
7
7
  } from "./cli-5gpqgs8b.js";
8
+ import {
9
+ resolveSlashSkillPrompt
10
+ } from "./cli-5j88qqa8.js";
8
11
  import {
9
12
  CONTEXT_FORMULA,
10
13
  computeContextUsedUnified,
11
14
  clampContextPercent,
12
15
  init_context_window
13
16
  } from "./cli-hnamkvnc.js";
14
- import {
15
- resolveSlashSkillPrompt
16
- } from "./cli-5j88qqa8.js";
17
17
  import {
18
18
  detachedProcessGroup,
19
19
  registerProcessGroup,
@@ -31,7 +31,7 @@ import {
31
31
  ampBillsCacheWrites,
32
32
  resolveAmpModel,
33
33
  init_amp_models
34
- } from "./cli-mjw0yf82.js";
34
+ } from "./cli-zeh2mhkg.js";
35
35
  import {
36
36
  scrubSecrets,
37
37
  registerVolatileSecret,
@@ -48,7 +48,7 @@ init_context_window();
48
48
  init_multi_runtime2();
49
49
  init_process_group();
50
50
  init_secret_scrubber();
51
- var AMP_PACKAGE = "@ampcode/cli@0.0.1794139239-ga22467";
51
+ var AMP_PACKAGE = "@ampcode/cli@0.0.1794225648-g45053b";
52
52
  var AMP_MCP_SERVER_NAME = "agent-swarm";
53
53
  var AMP_PLUGIN_MODE_KEY = "agent-swarm";
54
54
  var AMP_LIVE_TEST_TIMEOUT_MS = 5000;
@@ -8,11 +8,11 @@ import {
8
8
  getMemoryStore2,
9
9
  init_memory,
10
10
  init_db4
11
- } from "./cli-ctx0b85j.js";
11
+ } from "./cli-wwp1bd3n.js";
12
12
  import {
13
13
  contentSha256,
14
14
  init_profile_sync
15
- } from "./cli-m7c2380k.js";
15
+ } from "./cli-3aaeb78m.js";
16
16
  import {
17
17
  SCRUBBER_RULES_VERSION,
18
18
  createSweepScrubber,
@@ -34,7 +34,7 @@ var MAX_REST_RATIO = 16;
34
34
  var BUSY_LAG_MS = 8;
35
35
  var IDLE_LAG_MS = 3;
36
36
  var LAG_SMOOTHING = 0.3;
37
- function nextRestRatio(ratio, smoothedLagMs) {
37
+ function nextRestRatio2(ratio, smoothedLagMs) {
38
38
  if (smoothedLagMs > BUSY_LAG_MS)
39
39
  return Math.min(MAX_REST_RATIO, ratio * 2);
40
40
  if (smoothedLagMs < IDLE_LAG_MS)
@@ -55,7 +55,7 @@ function createPacer() {
55
55
  await new Promise((r) => setTimeout(r, rest));
56
56
  const late = Math.max(0, performance.now() - restStart - rest);
57
57
  lag = lag * (1 - LAG_SMOOTHING) + late * LAG_SMOOTHING;
58
- ratio = nextRestRatio(ratio, lag);
58
+ ratio = nextRestRatio2(ratio, lag);
59
59
  sliceStart = performance.now();
60
60
  return true;
61
61
  }
@@ -101,7 +101,7 @@ function bootScrubMode() {
101
101
  function bootScrubCursorKey(version, table) {
102
102
  return `boot-scrub-v${version}:${table}:cursor`;
103
103
  }
104
- async function runBootScrubSweep(opts = {}) {
104
+ async function runBootScrubSweep2(opts = {}) {
105
105
  const version = opts.version ?? SCRUBBER_RULES_VERSION;
106
106
  const doneKey = bootScrubDoneKey(version);
107
107
  const done = await getDbClient2().get("SELECT key FROM seed_state WHERE kind = 'maintenance' AND key = ?", [doneKey]);
@@ -142,7 +142,7 @@ async function runBootScrubSweep(opts = {}) {
142
142
  console.log(`[${tag}] complete`);
143
143
  const memoryChanged = stats.find((s) => s.table === "agent_memory")?.changed ?? 0;
144
144
  if (memoryChanged > 0 && opts.reembed !== false) {
145
- const { runBootReembed } = await import("./boot-reembed-92g7s5zp.js");
145
+ const { runBootReembed } = await import("./boot-reembed-wb44vc3s.js");
146
146
  await runBootReembed();
147
147
  }
148
148
  return stats;
@@ -265,6 +265,5 @@ async function rewriteMemoryRow(id, before, after) {
265
265
  });
266
266
  return getMemoryStore2().rewriteForScrub(id, pick(before), pick(after));
267
267
  }
268
- export {
269
- runBootScrubSweep
270
- };
268
+
269
+ export { nextRestRatio2, runBootScrubSweep2 };
@@ -1,14 +1,14 @@
1
1
  import {
2
2
  applyReasoningEffort
3
3
  } from "./cli-5gpqgs8b.js";
4
+ import {
5
+ resolveSlashSkillPrompt
6
+ } from "./cli-5j88qqa8.js";
4
7
  import {
5
8
  getContextWindowSize,
6
9
  clampContextPercent,
7
10
  init_context_window
8
11
  } from "./cli-hnamkvnc.js";
9
- import {
10
- resolveSlashSkillPrompt
11
- } from "./cli-5j88qqa8.js";
12
12
  import {
13
13
  swarmRuntimeInstanceId,
14
14
  init_multi_runtime2
@@ -16,7 +16,7 @@ import {
16
16
  import {
17
17
  DEFAULT_MODEL_TIER_MAP,
18
18
  init_types5
19
- } from "./cli-bkjdknnp.js";
19
+ } from "./cli-y4ccxtz5.js";
20
20
  import {
21
21
  resolveTemplateFromCode,
22
22
  resolveTemplateAsync,