@desplega.ai/agent-swarm 2.7.10 → 2.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (296) hide show
  1. package/dist/acp-adapter-pdy3qsvg.js +15 -0
  2. package/dist/{actions-b8aqhrsg.js → actions-pwjpn0j6.js} +19 -20
  3. package/dist/{amp-adapter-4c165vgn.js → amp-adapter-cq9jgj6x.js} +2 -3
  4. package/dist/{app-m9khefrh.js → app-cnfffgwg.js} +3 -3
  5. package/dist/{assistant-rh4v3ntz.js → assistant-kpn317y1.js} +21 -22
  6. package/dist/{boot-args-schema-hwkc8bzv.js → boot-args-schema-pbbnhmc3.js} +1 -1
  7. package/dist/{boot-reembed-fdyk55h4.js → boot-reembed-9m0ysxma.js} +1 -1
  8. package/dist/{boot-reembed-5y6yw9sj.js → boot-reembed-majbn53m.js} +1 -1
  9. package/dist/{boot-scrub-sweep-r5r8kqsn.js → boot-scrub-sweep-app8g8ym.js} +3 -3
  10. package/dist/{boot-seeds-8f9zt5cm.js → boot-seeds-pbtmvcjm.js} +4 -5
  11. package/dist/{claude-adapter-s5df247c.js → claude-adapter-wn1g3qp5.js} +7 -8
  12. package/dist/{claude-managed-adapter-h74d06yz.js → claude-managed-adapter-jh6c523j.js} +3 -3
  13. package/dist/{claude-managed-setup-9gsmwzyx.js → claude-managed-setup-pd47nzch.js} +6 -6
  14. package/dist/{claude-sdk-session-dq1j4nz9.js → claude-sdk-session-3a2a6589.js} +9066 -8818
  15. package/dist/{cli-n5yexkdg.js → cli-0b4zam62.js} +1 -0
  16. package/dist/{cli-5wfz00be.js → cli-0jzra9ad.js} +2 -2
  17. package/dist/{cli-zjphdj1a.js → cli-0ntbxyaa.js} +40 -18
  18. package/dist/{cli-yz7v0sh4.js → cli-1xh9a7hn.js} +4 -6
  19. package/dist/{cli-eqtfgfr6.js → cli-2gxeg5gr.js} +1 -1
  20. package/dist/{cli-hfkwwy1h.js → cli-2zp0et3v.js} +21 -2
  21. package/dist/{cli-6m6b4bep.js → cli-3rkdne1h.js} +2 -2
  22. package/dist/{cli-mr97t7cc.js → cli-4r05hnqa.js} +263 -14
  23. package/dist/{cli-jc1g9ndz.js → cli-5j88qqa8.js} +10 -5
  24. package/dist/{cli-xfjrc279.js → cli-5mrq3ake.js} +48 -14
  25. package/dist/{cli-an1knn2k.js → cli-6mma83xa.js} +5 -5
  26. package/dist/{cli-tph5wt3y.js → cli-6wj7p986.js} +1 -1
  27. package/dist/{cli-t73cas91.js → cli-7349va39.js} +8100 -7620
  28. package/dist/{cli-5xcb8gxq.js → cli-7b8sbmag.js} +8 -8
  29. package/dist/{cli-3xj33nrx.js → cli-7cp6aa1q.js} +10 -3
  30. package/dist/{cli-mp9aa8g5.js → cli-7p1kvkck.js} +6 -6
  31. package/dist/{cli-j7d73g1y.js → cli-7w69ne2f.js} +3035 -354
  32. package/dist/{cli-cr14kftt.js → cli-89cqnasv.js} +3 -3
  33. package/dist/{cli-w3bk0dgv.js → cli-8aes17e4.js} +2 -2
  34. package/dist/{cli-7wz05bx3.js → cli-93k32c37.js} +468 -745
  35. package/dist/{cli-eqk5p56g.js → cli-9vhebtjz.js} +9 -9
  36. package/dist/{cli-td33w98c.js → cli-9wngrawf.js} +10 -10
  37. package/dist/cli-a3b239vq.js +242 -0
  38. package/dist/{cli-kx4c8j05.js → cli-b085njxz.js} +63 -19
  39. package/dist/{cli-8ewkreqd.js → cli-b5rs97a6.js} +7 -9
  40. package/dist/{cli-bxz823sz.js → cli-b8e9nb04.js} +1 -1
  41. package/dist/{cli-nj3x45rw.js → cli-bb431xey.js} +52 -43
  42. package/dist/{cli-36wdfzgn.js → cli-bsywb58a.js} +8 -8
  43. package/dist/{cli-18qt3few.js → cli-cyhbbd1z.js} +1 -1
  44. package/dist/{cli-eb2azq8n.js → cli-d3p5vwbk.js} +9 -9
  45. package/dist/{cli-2tsfpc70.js → cli-dy32zecz.js} +1 -1
  46. package/dist/{cli-rjyghzg4.js → cli-g70vxtjh.js} +2 -2
  47. package/dist/{cli-55bkx8hh.js → cli-gax7fk3t.js} +1 -1
  48. package/dist/{cli-jg24scat.js → cli-jcpr5smb.js} +3 -3
  49. package/dist/{cli-n07eecjs.js → cli-jywyhqws.js} +3 -3
  50. package/dist/{cli-38yww4e9.js → cli-k0615eh8.js} +8 -8
  51. package/dist/{cli-3xddv0rk.js → cli-k26bkr9t.js} +5 -7
  52. package/dist/{cli-xd5ebp64.js → cli-k93bq1wq.js} +3 -3
  53. package/dist/{cli-f2zenhja.js → cli-kc7v1nfv.js} +1 -1
  54. package/dist/{cli-x9exydey.js → cli-m4dqmnbp.js} +1 -1
  55. package/dist/{cli-gpwhbgx0.js → cli-m9s2qff2.js} +57 -25
  56. package/dist/{cli-ybjdc978.js → cli-mrt48bx7.js} +7 -4
  57. package/dist/{cli-ttbqe3q4.js → cli-p1w18yhx.js} +1 -1
  58. package/dist/{cli-h49ejvmc.js → cli-pcad4cb1.js} +1 -1
  59. package/dist/{cli-tmft5dz2.js → cli-qmqk2yc2.js} +1 -1
  60. package/dist/{cli-g1px1g2e.js → cli-re4raaj0.js} +1 -1
  61. package/dist/{cli-xbtq4d6s.js → cli-sn7rtnj4.js} +12 -8
  62. package/dist/{cli-n9abj89w.js → cli-syybb0p1.js} +8 -8
  63. package/dist/{cli-v2fwbnsk.js → cli-tacge1w0.js} +6 -6
  64. package/dist/{cli-pyrxt9gw.js → cli-tk7cjj8h.js} +1 -1
  65. package/dist/{cli-xvymtmv4.js → cli-tqegb8eq.js} +3 -3
  66. package/dist/{cli-kf3pxxdg.js → cli-v1dv1r37.js} +1 -1
  67. package/dist/{cli-z9cs5m0w.js → cli-vbh10fqa.js} +12 -12
  68. package/dist/{cli-3xcwp3z8.js → cli-vj75tyaw.js} +3 -3
  69. package/dist/{cli-xncjscpm.js → cli-vqptjbr7.js} +50 -24
  70. package/dist/{cli-q581b386.js → cli-wk18cm92.js} +5 -5
  71. package/dist/{cli-4vwxp550.js → cli-x1wa213s.js} +1 -1
  72. package/dist/{cli-n9ftpys4.js → cli-x6t50dmw.js} +7 -7
  73. package/dist/{cli-jrp1dt73.js → cli-xzm9vcfg.js} +1 -1
  74. package/dist/{cli-16phend6.js → cli-yn2bbre9.js} +1 -1
  75. package/dist/{cli-rt0ag4x1.js → cli-yncmerje.js} +5 -5
  76. package/dist/{cli-0m7rtm11.js → cli-zcsw143p.js} +1 -1
  77. package/dist/cli.js +18 -18
  78. package/dist/{codex-adapter-yr60sme6.js → codex-adapter-nha71q3n.js} +5 -6
  79. package/dist/{codex-hook-fac6175r.js → codex-hook-h3vk6xzr.js} +1 -1
  80. package/dist/{codex-session-runner-pch8x584.js → codex-session-runner-ak9x1k1h.js} +5 -6
  81. package/dist/{commands-phjfbkv0.js → commands-f587qpq8.js} +3 -3
  82. package/dist/{controller-jkx994pz.js → controller-hxx8wwy1.js} +2 -2
  83. package/dist/{controllers-connect-c4448kwa.js → controllers-connect-k5sg9m9h.js} +20 -21
  84. package/dist/{cursor-adapter-ndebqnm8.js → cursor-adapter-n5nc3mfe.js} +1 -2
  85. package/dist/{db-ef32tbfc.js → db-amm8w15a.js} +10 -2
  86. package/dist/{db-ez6egt6v.js → db-nzf8zb5z.js} +3 -3
  87. package/dist/{devin-adapter-z46ep5ph.js → devin-adapter-xedz98zv.js} +1 -1
  88. package/dist/{dispatcher-g3tt9hs9.js → dispatcher-89zrts8f.js} +18 -19
  89. package/dist/{dsh-adapter-tcyn3099.js → dsh-adapter-nrhbrjz8.js} +1 -2
  90. package/dist/{easter-egg-3d-e36hk5td.js → easter-egg-3d-533knw22.js} +1 -1
  91. package/dist/{embedding-space-4kyh5qqj.js → embedding-space-ezwenjmj.js} +6 -6
  92. package/dist/{embeddings-6a8v4a6t.js → embeddings-np74ht6g.js} +1 -1
  93. package/dist/{execute-3cbg0twf.js → execute-b3mrb1mv.js} +1 -1
  94. package/dist/{external-channel-se646snz.js → external-channel-z46yx9d7.js} +2 -2
  95. package/dist/{fx-adapter-yw795hqq.js → fx-adapter-3q12snn6.js} +7 -8
  96. package/dist/{grok-adapter-ttmcss2j.js → grok-adapter-ahb1w033.js} +7 -8
  97. package/dist/handlers-vbww69re.js +32 -0
  98. package/dist/heartbeat-dt9qw9c8.js +43 -0
  99. package/dist/{hook-hq93y5ej.js → hook-8k6fbz9b.js} +5 -5
  100. package/dist/{hook-g3nhexsy.js → hook-jgcgygex.js} +6 -6
  101. package/dist/{http-5a9p4h6y.js → http-haw4r8ne.js} +284 -142
  102. package/dist/{index-0eny15vj.js → index-2skqtd76.js} +2 -2
  103. package/dist/{index-6haqt3v5.js → index-4a0670yh.js} +8917 -8476
  104. package/dist/index-4xwaf5th.js +32 -0
  105. package/dist/{index-3c5pxbge.js → index-5gk12my8.js} +1 -1
  106. package/dist/{index-w7em4ktq.js → index-d6wkh8ar.js} +2 -2
  107. package/dist/index-f0hcrs8e.js +33 -0
  108. package/dist/{index-rvccek1w.js → index-gjwaqaq8.js} +5 -5
  109. package/dist/{index-e5pfbsys.js → index-hjhfk3ra.js} +3 -3
  110. package/dist/{index-1qw6f2dc.js → index-khe3gp0k.js} +4 -4
  111. package/dist/index-s4ewdma4.js +37 -0
  112. package/dist/{index-hgn3c961.js → index-tez78qj3.js} +979 -36
  113. package/dist/{index-s72rqgsx.js → index-tvfafeyy.js} +1 -1
  114. package/dist/{keepalive-1j4n4dmk.js → keepalive-xn6s7rmg.js} +3 -3
  115. package/dist/lead-6ygbfhbh.js +70 -0
  116. package/dist/{maintenance-dmghacy5.js → maintenance-vdts800b.js} +1 -1
  117. package/dist/{node-je82wjet.js → node-4c5jqxr3.js} +1 -1
  118. package/dist/{oauth-refresh-sweep-yy06c03c.js → oauth-refresh-sweep-094c8wfk.js} +2 -2
  119. package/dist/{onboard-52f9t5dm.js → onboard-v99eh56m.js} +3 -3
  120. package/dist/{opencode-adapter-krnh9jkn.js → opencode-adapter-dsagkhtw.js} +5 -6
  121. package/dist/{otel-impl-xjqz6wjj.js → otel-impl-q7yr9yp0.js} +1 -1
  122. package/dist/{pi-mono-adapter-dbxyp0qv.js → pi-mono-adapter-546cd1cc.js} +9 -9
  123. package/dist/{pricing-refresh-ctdr74pd.js → pricing-refresh-7dh2yase.js} +2 -3
  124. package/dist/{rbac-roles-ehv8s10n.js → rbac-roles-mdmc96p4.js} +3 -3
  125. package/dist/{rbac-roles-q0gr8eyj.js → rbac-roles-npbmdh77.js} +4 -6
  126. package/dist/{registry-hpjfmcfz.js → registry-32b1mft6.js} +1 -1
  127. package/dist/{render-v2-5b6chvcq.js → render-v2-twhhwmms.js} +3 -3
  128. package/dist/{resume-5a5d2845.js → resume-5gsrjd5e.js} +6 -6
  129. package/dist/{runtime-khxszyfp.js → runtime-1hv06jsn.js} +1 -1
  130. package/dist/{session-access-gj0bjhqg.js → session-access-m191x30x.js} +4 -4
  131. package/dist/{session-source-backfill-2sy0krfk.js → session-source-backfill-nt923ask.js} +2 -2
  132. package/dist/{setup-7ssfakk1.js → setup-wv467afy.js} +1 -1
  133. package/dist/{virtual-modules-pjj0knwf.js → virtual-modules-gazyapte.js} +3 -3
  134. package/dist/{work-objects-bf3syvhq.js → work-objects-8zkrpy13.js} +21 -22
  135. package/dist/{worker-follow-up-38xevga6.js → worker-follow-up-cecqszem.js} +18 -19
  136. package/dist/worker-mz5z7kj0.js +70 -0
  137. package/openapi.json +334 -7
  138. package/package.json +5 -5
  139. package/src/apps/definition.ts +11 -0
  140. package/src/apps/store.ts +28 -8
  141. package/src/be/db/model-profiles.ts +147 -38
  142. package/src/be/db/tasks/read.ts +5 -1
  143. package/src/be/db/workflow-run-definitions.ts +117 -0
  144. package/src/be/db.ts +24 -3
  145. package/src/be/memory/constants.ts +14 -1
  146. package/src/be/memory/key-paths.ts +8 -0
  147. package/src/be/memory/providers/sqlite-store.ts +160 -10
  148. package/src/be/memory/task-learning.ts +79 -14
  149. package/src/be/memory/types.ts +24 -1
  150. package/src/be/migrations/279_backfill_learning_expiry.sql +15 -0
  151. package/src/be/migrations/281_model_profiles_pr2.sql +28 -0
  152. package/src/be/migrations/283_workflow_run_definitions.sql +14 -0
  153. package/src/be/model-profile-check.ts +284 -0
  154. package/src/be/model-tier-resolution.ts +112 -12
  155. package/src/be/multi-runtime.ts +27 -0
  156. package/src/be/runtime-pools/routing.ts +52 -4
  157. package/src/be/scripts/typecheck.ts +1 -0
  158. package/src/be/seed-scripts/catalog/dreaming-learnings.ts +552 -0
  159. package/src/be/seed-scripts/catalog/dreaming-memtax-create.ts +389 -14
  160. package/src/be/seed-scripts/catalog/dreaming-memtax.ts +6 -3
  161. package/src/be/seed-scripts/index.ts +9 -0
  162. package/src/be/steering.ts +8 -2
  163. package/src/commands/onboard/agent-fs-version.ts +1 -1
  164. package/src/commands/runner.ts +32 -1
  165. package/src/fs/provider.ts +17 -3
  166. package/src/heartbeat/heartbeat.ts +12 -1
  167. package/src/heartbeat/index.ts +1 -0
  168. package/src/http/agents.ts +56 -4
  169. package/src/http/apps.ts +3 -1
  170. package/src/http/config.ts +2 -6
  171. package/src/http/index.ts +2 -3
  172. package/src/http/model-profiles.ts +58 -10
  173. package/src/http/poll.ts +36 -3
  174. package/src/http/schedules.ts +42 -3
  175. package/src/http/tasks.ts +37 -12
  176. package/src/http/workflows.ts +15 -2
  177. package/src/prompts/session-templates.ts +1 -1
  178. package/src/providers/acp-targets.ts +11 -6
  179. package/src/providers/amp-adapter.ts +1 -1
  180. package/src/providers/claude-sdk-session.ts +132 -23
  181. package/src/providers/codex-skill-resolver.ts +10 -4
  182. package/src/providers/cursor-adapter.ts +1 -1
  183. package/src/providers/devin-skill-resolver.ts +5 -5
  184. package/src/providers/dsh-adapter.ts +1 -1
  185. package/src/scheduler/schedule-task.ts +1 -0
  186. package/src/scripts-runtime/eval-harness.ts +14 -1
  187. package/src/scripts-runtime/executors/types.ts +3 -0
  188. package/src/scripts-runtime/sdk-allowlist.ts +1 -0
  189. package/src/scripts-runtime/swarm-sdk.ts +18 -1
  190. package/src/scripts-runtime/types/stdlib.d.ts +1 -0
  191. package/src/scripts-runtime/types/swarm-sdk.d.ts +1 -0
  192. package/src/server.ts +2 -0
  193. package/src/slack/app.ts +93 -0
  194. package/src/slack/inbound-dispatch.ts +18 -1
  195. package/src/slack/workspace-guard.ts +345 -0
  196. package/src/tasks/task-terminal-effects.ts +4 -0
  197. package/src/tasks/worker-follow-up.ts +102 -2
  198. package/src/tests/acp-adapter.test.ts +82 -0
  199. package/src/tests/apps-icon.test.ts +120 -0
  200. package/src/tests/chained-task-follow-up.test.ts +248 -0
  201. package/src/tests/check-pr-body.test.ts +40 -0
  202. package/src/tests/claude-sdk-lifecycle.test.ts +216 -1
  203. package/src/tests/claude-sdk-process.fixture.ts +57 -0
  204. package/src/tests/codex-skill-resolver.test.ts +31 -0
  205. package/src/tests/credentials-allowlist.test.ts +470 -0
  206. package/src/tests/db-task-read-contract.test.ts +5 -0
  207. package/src/tests/db-task-write-contract.test.ts +5 -0
  208. package/src/tests/deferred-wake-follow-up.test.ts +47 -0
  209. package/src/tests/docs-index-footprint.test.js +3 -3
  210. package/src/tests/dreaming-learnings.test.ts +1395 -0
  211. package/src/tests/dsh-adapter.test.ts +1 -1
  212. package/src/tests/explicit-model-validation.test.ts +2 -0
  213. package/src/tests/fs-provider.test.ts +42 -0
  214. package/src/tests/heartbeat.test.ts +28 -1
  215. package/src/tests/human-free-reclassify.test.ts +5 -1
  216. package/src/tests/list-endpoint-slimming.test.ts +17 -0
  217. package/src/tests/mcp-tools.test.ts +1 -1
  218. package/src/tests/migration-283-workflow-run-definitions.test.ts +69 -0
  219. package/src/tests/model-profile-check.test.ts +387 -0
  220. package/src/tests/model-profiles-api.test.ts +528 -1
  221. package/src/tests/profile-claim.test.ts +415 -3
  222. package/src/tests/profile-tier-alias.test.ts +382 -0
  223. package/src/tests/schedule-profile.test.ts +359 -0
  224. package/src/tests/script-connections.test.ts +6 -0
  225. package/src/tests/script-native-unawaited-drain.test.ts +167 -0
  226. package/src/tests/script-per-script-executor.test.ts +1 -0
  227. package/src/tests/scripts-sdk-bridge-tool-failure.test.ts +141 -0
  228. package/src/tests/seed-scripts.test.ts +2 -2
  229. package/src/tests/slack-inbound-receipts.test.ts +22 -2
  230. package/src/tests/slack-socket-ack.test.ts +16 -1
  231. package/src/tests/slack-workspace-guard.test.ts +905 -0
  232. package/src/tests/steering-core.test.ts +40 -0
  233. package/src/tests/store-progress-learning.test.ts +605 -20
  234. package/src/tests/tool-annotations.test.ts +1 -1
  235. package/src/tests/workflow-convergence.test.ts +46 -40
  236. package/src/tests/workflow-definition-pinning-recovery.test.ts +552 -0
  237. package/src/tests/workflow-definition-pinning.test.ts +645 -0
  238. package/src/tests/workflow-executors.test.ts +16 -7
  239. package/src/tests/workflow-foreach.test.ts +43 -20
  240. package/src/tests/workflow-notify-slack-ready.test.ts +161 -0
  241. package/src/tests/workflow-profile.test.ts +328 -0
  242. package/src/tools/app-upsert.ts +1 -1
  243. package/src/tools/memory-edit.ts +2 -1
  244. package/src/tools/model-profiles/check-model-profile.ts +63 -0
  245. package/src/tools/schedules/create-schedule.ts +45 -4
  246. package/src/tools/schedules/patch-schedule.ts +50 -4
  247. package/src/tools/schedules/update-schedule.ts +50 -4
  248. package/src/tools/script-run.ts +1 -1
  249. package/src/tools/send-task.ts +17 -2
  250. package/src/tools/store-progress.ts +15 -3
  251. package/src/tools/task-action.ts +9 -1
  252. package/src/tools/templates.ts +13 -0
  253. package/src/tools/tool-config.ts +2 -1
  254. package/src/tools/utils.ts +61 -4
  255. package/src/tools/workflows/create-workflow.ts +1 -1
  256. package/src/tools/workflows/retry-workflow-run.ts +1 -1
  257. package/src/tools/workflows/update-workflow.ts +10 -1
  258. package/src/types.ts +56 -1
  259. package/src/utils/credentials.ts +89 -12
  260. package/src/workflows/engine.ts +10 -1
  261. package/src/workflows/executors/agent-task.ts +21 -2
  262. package/src/workflows/executors/foreach.ts +4 -1
  263. package/src/workflows/executors/notify.ts +62 -6
  264. package/src/workflows/executors/sub-workflow.ts +1 -1
  265. package/src/workflows/executors/swarm-script.ts +4 -1
  266. package/src/workflows/foreach-driver.ts +8 -5
  267. package/src/workflows/limits.ts +2 -1
  268. package/src/workflows/model-validation.ts +27 -2
  269. package/src/workflows/patch-definition.ts +3 -1
  270. package/src/workflows/recovery.ts +6 -6
  271. package/src/workflows/resume.ts +9 -9
  272. package/src/workflows/retry-poller.ts +2 -2
  273. package/templates/skills/apps/SKILL.md +2 -0
  274. package/templates/skills/apps/content.md +2 -0
  275. package/templates/skills/code-quality/content.md +12 -0
  276. package/templates/skills/memory/content.md +8 -0
  277. package/templates/skills/scheduling/config.json +1 -1
  278. package/templates/skills/scheduling/content.md +2 -2
  279. package/templates/skills/swarm-docs/content.md +4 -0
  280. package/templates/skills/swarm-extensions/content.md +1 -1
  281. package/templates/skills/swarm-scripts/SKILL.md +2 -2
  282. package/templates/skills/swarm-scripts/content.md +2 -2
  283. package/templates/skills/work-on-task/SKILL.md +2 -0
  284. package/templates/skills/work-on-task/content.md +2 -0
  285. package/templates/workflows/dreaming/content.md +174 -7
  286. package/dist/acp-adapter-srfhs1s9.js +0 -16
  287. package/dist/cli-bzvs88tv.js +0 -339
  288. package/dist/cli-cyn9v8zr.js +0 -748
  289. package/dist/cli-ed6yqpf1.js +0 -779
  290. package/dist/handlers-17wha3ze.js +0 -33
  291. package/dist/heartbeat-gwewgdms.js +0 -42
  292. package/dist/index-8arwq8mw.js +0 -34
  293. package/dist/index-tpw054az.js +0 -38
  294. package/dist/index-waq75j2j.js +0 -31
  295. package/dist/lead-re73kdgc.js +0 -72
  296. package/dist/worker-r8mz7a65.js +0 -72
@@ -30,10 +30,11 @@ import {
30
30
  emitRunFinished,
31
31
  createForeachChildSteps,
32
32
  init_workflow_runs,
33
+ pinWorkflowDefinition2,
34
+ getRunWorkflow2,
33
35
  createTaskExtended2,
34
36
  getSwarmConfigs2,
35
37
  upsertSwarmConfig2,
36
- getWorkflow2,
37
38
  createWorkflowRun2,
38
39
  getWorkflowRun2,
39
40
  updateWorkflowRun2,
@@ -56,21 +57,21 @@ import {
56
57
  releaseApprovalCancellationNotificationClaim2,
57
58
  updateApprovalRequestNotifications2,
58
59
  init_db4
59
- } from "./cli-j7d73g1y.js";
60
+ } from "./cli-7w69ne2f.js";
60
61
  import {
61
62
  externalChannelToolError2,
62
63
  isBlockExternalEnabled2,
63
64
  getChannelBlockReason2,
64
65
  init_external_channel
65
- } from "./cli-bxz823sz.js";
66
+ } from "./cli-b8e9nb04.js";
66
67
  import {
67
68
  getSlackApp2,
68
69
  init_app3
69
- } from "./cli-mr97t7cc.js";
70
+ } from "./cli-4r05hnqa.js";
70
71
  import {
71
72
  resolveCredential,
72
73
  init_credentials
73
- } from "./cli-4vwxp550.js";
74
+ } from "./cli-x1wa213s.js";
74
75
  import {
75
76
  isMultiRuntimeEnabled,
76
77
  init_multi_runtime2
@@ -78,11 +79,11 @@ import {
78
79
  import {
79
80
  revokeRuntimeTokensForRuntime,
80
81
  init_users
81
- } from "./cli-g1px1g2e.js";
82
+ } from "./cli-re4raaj0.js";
82
83
  import {
83
84
  TERMINAL_TASK_STATUSES,
84
85
  init_types4
85
- } from "./cli-hfkwwy1h.js";
86
+ } from "./cli-2zp0et3v.js";
86
87
  import {
87
88
  getSlackConfiguration,
88
89
  isSlackConfigured,
@@ -100,13 +101,13 @@ import {
100
101
  import {
101
102
  selectCredential,
102
103
  init_credentials2
103
- } from "./cli-xfjrc279.js";
104
+ } from "./cli-5mrq3ake.js";
104
105
  import {
105
106
  deepInterpolate,
106
107
  init_template2,
107
108
  resolveTemplate,
108
109
  init_resolver
109
- } from "./cli-kf3pxxdg.js";
110
+ } from "./cli-v1dv1r37.js";
110
111
  import {
111
112
  init_zod
112
113
  } from "./cli-zcfpsfzf.js";
@@ -155,7 +156,7 @@ async function notifyAutomationPreflightFailure(preflight) {
155
156
  return;
156
157
  }
157
158
  try {
158
- const { getSlackApp } = await import("./app-m9khefrh.js");
159
+ const { getSlackApp } = await import("./app-cnfffgwg.js");
159
160
  const app = getSlackApp();
160
161
  if (!app) {
161
162
  console.warn("[Automation Preflight] Slack not available, cannot send notification");
@@ -711,6 +712,23 @@ async function agentsWithLiveRuntime() {
711
712
  WHERE status = 'active' AND last_seen_at >= ?`, [runtimeLivenessCutoff()]);
712
713
  return new Set(rows.map((r) => r.agent_id));
713
714
  }
715
+ async function liveRuntimeAuthModes() {
716
+ const now = new Date().toISOString();
717
+ const rows = await getDbClient2().query(`SELECT r.agent_id, EXISTS(
718
+ SELECT 1 FROM session_tokens s
719
+ WHERE s.runtimeId = r.id AND s.agentId = r.agent_id
720
+ AND s.revokedAt IS NULL AND s.expiresAt > ?
721
+ ) AS runtime_token
722
+ FROM runtime_instances r
723
+ WHERE r.status = 'active' AND r.last_seen_at >= ?`, [now, runtimeLivenessCutoff()]);
724
+ const modes = new Map;
725
+ for (const row of rows) {
726
+ const list = modes.get(row.agent_id) ?? [];
727
+ list.push(row.runtime_token === 1);
728
+ modes.set(row.agent_id, list);
729
+ }
730
+ return modes;
731
+ }
714
732
  async function expireStaleRuntimeInstances() {
715
733
  if (!isMultiRuntimeEnabled()) {
716
734
  return { expired: 0, agentsOffline: 0, pruned: 0 };
@@ -3821,7 +3839,8 @@ var init_json_schema_validator = () => {};
3821
3839
 
3822
3840
  // src/workflows/limits.ts
3823
3841
  function getMaxWorkflowStepsPerRun() {
3824
- return Number(process.env.WORKFLOW_MAX_STEPS_PER_RUN) || DEFAULT_MAX_STEPS_PER_RUN;
3842
+ const value = Number(process.env.WORKFLOW_MAX_STEPS_PER_RUN);
3843
+ return Number.isInteger(value) && value > 0 ? value : DEFAULT_MAX_STEPS_PER_RUN;
3825
3844
  }
3826
3845
  var DEFAULT_MAX_STEPS_PER_RUN = 500;
3827
3846
  var init_limits = () => {};
@@ -3969,7 +3988,8 @@ var init_validation = () => {};
3969
3988
 
3970
3989
  // src/workflows/engine.ts
3971
3990
  function maxIterations() {
3972
- return Number(process.env.WORKFLOW_MAX_ITERATIONS) || 100;
3991
+ const value = Number(process.env.WORKFLOW_MAX_ITERATIONS);
3992
+ return Number.isInteger(value) && value > 0 ? value : 100;
3973
3993
  }
3974
3994
  async function resolveRenderedWorkflowInputs(input) {
3975
3995
  const stringInputs = {};
@@ -3983,6 +4003,7 @@ async function resolveRenderedWorkflowInputs(input) {
3983
4003
  return { ...resolved, ...await resolveInputs(stringInputs) };
3984
4004
  }
3985
4005
  async function startWorkflowExecution2(workflow, triggerData, registry, options = {}) {
4006
+ const pinSource = workflow;
3986
4007
  const preflight = preflightAutomation(workflowPreflightInput(workflow), await getAutomationSetupStates());
3987
4008
  if (preflight.state === "needs_setup" && !options.parentStepId) {
3988
4009
  const { runId, recorded } = await getDbClient2().transaction(async () => {
@@ -4025,7 +4046,7 @@ async function startWorkflowExecution2(workflow, triggerData, registry, options
4025
4046
  const newRunId = crypto.randomUUID();
4026
4047
  const release = holdWorkflowRun(newRunId);
4027
4048
  try {
4028
- const { runId, created, preflightAlert, status } = await createRunWithInitialState(workflow, triggerData, options, initial, newRunId);
4049
+ const { runId, created, preflightAlert, status } = await createRunWithInitialState(workflow, triggerData, options, initial, newRunId, pinSource);
4029
4050
  if (!created)
4030
4051
  return runId;
4031
4052
  if (initial.status === "failed" && initial.preflight) {
@@ -4084,7 +4105,7 @@ async function buildInitialRunState(workflow, triggerData, registry, options) {
4084
4105
  }
4085
4106
  return { context: ctx };
4086
4107
  }
4087
- async function createRunWithInitialState(workflow, triggerData, options, initial, runId) {
4108
+ async function createRunWithInitialState(workflow, triggerData, options, initial, runId, pinSource) {
4088
4109
  return getDbClient2().transaction(async () => {
4089
4110
  const { parentStepId } = options;
4090
4111
  const attempt = options.parentStepAttempt ?? 0;
@@ -4097,6 +4118,7 @@ async function createRunWithInitialState(workflow, triggerData, options, initial
4097
4118
  return { runId: existingId, created: false };
4098
4119
  }
4099
4120
  const state = !initial.status && workflow.cooldown && await shouldSkipCooldown(workflow.id, workflow.cooldown) ? { status: "skipped", error: "cooldown", finishedAt: new Date().toISOString() } : initial;
4121
+ const definitionHash = await pinWorkflowDefinition2(pinSource);
4100
4122
  await createWorkflowRun2({
4101
4123
  id: runId,
4102
4124
  workflowId: workflow.id,
@@ -4105,7 +4127,8 @@ async function createRunWithInitialState(workflow, triggerData, options, initial
4105
4127
  createdBy: options.requestedByUserId,
4106
4128
  parentStepId,
4107
4129
  parentStepAttempt: parentStepId ? attempt : undefined,
4108
- triggeredByAgentId: options.triggeredByAgentId
4130
+ triggeredByAgentId: options.triggeredByAgentId,
4131
+ definitionHash
4109
4132
  });
4110
4133
  await updateWorkflowRun2(runId, state.status ? { status: state.status, error: state.error, finishedAt: state.finishedAt } : { context: state.context });
4111
4134
  const preflightAlert = state.status === "failed" && state.preflight ? await isFirstWorkflowPreflightFailureToday(workflow.id, runId) : undefined;
@@ -4562,7 +4585,7 @@ async function runClaimedStep(def, runId, ctx, node, registry, existingStep, ste
4562
4585
  }
4563
4586
  const waiting = await checkpointStepWaiting(runId, stepId, ctx);
4564
4587
  if (waiting && result.waitFor === "workflow.child.finished") {
4565
- const { resumeFromChildRun } = await import("./resume-5a5d2845.js");
4588
+ const { resumeFromChildRun } = await import("./resume-5gsrjd5e.js");
4566
4589
  await resumeFromChildRun(stepId, registry);
4567
4590
  }
4568
4591
  return { outcome: waiting ? "waiting" : "completed", successors: [] };
@@ -4875,7 +4898,10 @@ var init_foreach = __esm(() => {
4875
4898
  const missingItems = items.filter(({ itemKey }) => !existingChildNodeIds.has(`${meta.nodeId}#${itemKey}`));
4876
4899
  const childCountToCreate = missingItems.length;
4877
4900
  const maxSteps = getMaxWorkflowStepsPerRun();
4878
- const workflow = await this.deps.db.getWorkflow(meta.workflowId);
4901
+ const workflow = await this.deps.db.getRunWorkflow({
4902
+ id: meta.runId,
4903
+ workflowId: meta.workflowId
4904
+ });
4879
4905
  const hasSuccessors = workflow ? getSuccessors(workflow.definition, meta.nodeId).length > 0 : true;
4880
4906
  const totalSteps = runSteps.length + childCountToCreate;
4881
4907
  const capBreached = hasSuccessors ? totalSteps >= maxSteps : totalSteps > maxSteps;
@@ -4952,7 +4978,7 @@ async function driveForeach(runId, parentNodeId, registry, options = {}) {
4952
4978
  const run = await getWorkflowRun2(runId);
4953
4979
  if (!run || run.status !== "running" && run.status !== "waiting")
4954
4980
  return NOT_JOINED;
4955
- const workflow = await getRenderedWorkflow(run.workflowId);
4981
+ const workflow = await getRenderedWorkflow(run);
4956
4982
  if (!workflow)
4957
4983
  return NOT_JOINED;
4958
4984
  const def = workflow.definition;
@@ -5060,14 +5086,14 @@ async function runForeachDrive(runId, parentNodeId, registry) {
5060
5086
  return drive;
5061
5087
  }
5062
5088
  const run = await getWorkflowRun2(runId);
5063
- const workflow = run ? await getRenderedWorkflow(run.workflowId) : null;
5089
+ const workflow = run ? await getRenderedWorkflow(run) : null;
5064
5090
  if (!run || !workflow)
5065
5091
  return drive;
5066
5092
  const ctx = run.context ?? {};
5067
5093
  if (drive.successors.length > 0) {
5068
5094
  await walkGraph(workflow.definition, runId, ctx, drive.successors, registry, workflow.id, getSecretInputKeys(workflow.input));
5069
5095
  } else {
5070
- const { finalizeOrWait } = await import("./resume-5a5d2845.js");
5096
+ const { finalizeOrWait } = await import("./resume-5gsrjd5e.js");
5071
5097
  await finalizeOrWait(runId);
5072
5098
  }
5073
5099
  return drive;
@@ -5075,8 +5101,8 @@ async function runForeachDrive(runId, parentNodeId, registry) {
5075
5101
  release();
5076
5102
  }
5077
5103
  }
5078
- async function getRenderedWorkflow(workflowId) {
5079
- const workflow = await getWorkflow2(workflowId);
5104
+ async function getRenderedWorkflow(run) {
5105
+ const workflow = await getRunWorkflow2(run);
5080
5106
  return workflow ? renderAutomationTokens(workflow, workflow.params ?? {}) : null;
5081
5107
  }
5082
5108
  async function childLiveness(runId, stepId) {
@@ -5210,7 +5236,7 @@ async function startChild(input) {
5210
5236
  const parked = await getDbClient2().get("UPDATE workflow_run_steps SET status = 'waiting' WHERE id = ? AND status = 'running' RETURNING id", [child.id]);
5211
5237
  if (parked && result.waitFor === "workflow.child.finished") {
5212
5238
  ownedChildren.delete(child.id);
5213
- const { resumeFromChildRun } = await import("./resume-5a5d2845.js");
5239
+ const { resumeFromChildRun } = await import("./resume-5gsrjd5e.js");
5214
5240
  await resumeFromChildRun(child.id, registry);
5215
5241
  }
5216
5242
  return null;
@@ -5868,4 +5894,4 @@ var init_definition2 = __esm(() => {
5868
5894
  init_foreach_body();
5869
5895
  });
5870
5896
 
5871
- export { notifyAutomationPreflightFailure, init_automation_preflight_alert, automationIntegrationFixUrl, isNeedsSetupFailure, preflightAutomation, renderAutomationTokens, getAutomationSetupStates, schedulePreflightInput, listEnabledAutomationPreflightInputs, recordSchedulePreflightFailure, init_automation_preflight, BaseExecutor, init_base, AGENT_MAX_TASKS_CONFIG_KEY, reconcileAgentMaxTasksPolicy, resetAgentMaxTasksMirror, upsertSwarmConfigWithPolicyMirror, runtimeStaleThresholdMinutes, upsertRuntimeInstance, getRuntimeInstanceById, insertProvisioningRuntime, markRuntimeTerminated, touchRuntimeInstance, markRuntimeInstanceOffline, countActiveRuntimeInstancesForAgent, listRuntimeInstancesForAgent, setRuntimeCredentialReady, reconcileAgentStatusFromRuntimes, agentsWithLiveRuntime, expireStaleRuntimeInstances, listRuntimeInstancesForPool, init_multi_runtime, ConfigQuestionSettingsSchema, ConfigStateSchema, readConfigState, normalizeApprovalQuestions, isConfigQuestion, parseConfigAnswer, skippedConfigResult, keptConfigResult, applyConfigAnswer, init_approval_config_question, resolveSlackConversationId, init_dm, dispatchApprovalNotifications, postApprovalCancellationUpdates, createApprovalFollowUpTask, init_approval_notifications, HumanInTheLoopExecutor, init_human_in_the_loop, resolveWorkflowLlmConfig, init_workflow_llm, SYSTEM_ONE_PROVIDER_IDS, init_system_one_providers, SystemOneExtractionExecutor, init_system_one_extraction, SYSTEM_ONE_DECISION_NODE_TYPE, SystemOneDecisionConfigSchema, SystemOneDecisionExecutor, init_system_one_decision, checkpointStep, checkpointStepFailure, checkpointStepWaiting, init_checkpoint, FAILED_TASK_OUTPUT_PREFIX, FOREACH_ITEMS_WAIT_FOR, init_constants, loadCompletedStepRouting, init_completed_step_routing, resolveInputValue, getSecretInputKeys, init_input, validateJsonSchema, findJsonSchemaShapeErrors, init_json_schema_validator, getMaxWorkflowStepsPerRun, init_limits, findWorkflowReadinessProblems, formatReadinessProblems, workflowSaveWarnings, withSaveWarnings, init_readiness, init_template, runStepValidation, init_validation, TriggerSchemaError, startWorkflowExecution2, ParentStepNotCurrentError, failRunOnUnreadableReplay, isWorkflowRunActive, isStepExecuting, holdWorkflowRun, walkGraph, hasRunningStep, findReadyNodes, scriptBodyInterpolationError, init_engine, ForeachExecutor, init_foreach, rebuildNodeExecutionInput, init_step_input, isForeachChildOwned, parkAndDriveForeach, startForeachDrive, runForeachDrive, init_foreach_driver, FOREACH_TERMINAL_STEP_STATUSES, isRetryPending, parseSyntheticNodeId, resolveForeachParent, settleForeachChild, init_foreach_join, resolveStepNode, stepFailureMode, init_foreach_body, getNextTargets, generateEdges, resolveValidationPort, getSuccessors, definitionNodeIds, validateDefinition, applyDefinitionPatch, init_definition2 };
5897
+ export { notifyAutomationPreflightFailure, init_automation_preflight_alert, automationIntegrationFixUrl, isNeedsSetupFailure, preflightAutomation, renderAutomationTokens, getAutomationSetupStates, schedulePreflightInput, listEnabledAutomationPreflightInputs, recordSchedulePreflightFailure, init_automation_preflight, BaseExecutor, init_base, AGENT_MAX_TASKS_CONFIG_KEY, reconcileAgentMaxTasksPolicy, resetAgentMaxTasksMirror, upsertSwarmConfigWithPolicyMirror, runtimeStaleThresholdMinutes, upsertRuntimeInstance, getRuntimeInstanceById, insertProvisioningRuntime, markRuntimeTerminated, touchRuntimeInstance, markRuntimeInstanceOffline, countActiveRuntimeInstancesForAgent, listRuntimeInstancesForAgent, setRuntimeCredentialReady, reconcileAgentStatusFromRuntimes, agentsWithLiveRuntime, liveRuntimeAuthModes, expireStaleRuntimeInstances, listRuntimeInstancesForPool, init_multi_runtime, ConfigQuestionSettingsSchema, ConfigStateSchema, readConfigState, normalizeApprovalQuestions, isConfigQuestion, parseConfigAnswer, skippedConfigResult, keptConfigResult, applyConfigAnswer, init_approval_config_question, resolveSlackConversationId, init_dm, dispatchApprovalNotifications, postApprovalCancellationUpdates, createApprovalFollowUpTask, init_approval_notifications, HumanInTheLoopExecutor, init_human_in_the_loop, resolveWorkflowLlmConfig, init_workflow_llm, SYSTEM_ONE_PROVIDER_IDS, init_system_one_providers, SystemOneExtractionExecutor, init_system_one_extraction, SYSTEM_ONE_DECISION_NODE_TYPE, SystemOneDecisionConfigSchema, SystemOneDecisionExecutor, init_system_one_decision, checkpointStep, checkpointStepFailure, checkpointStepWaiting, init_checkpoint, FAILED_TASK_OUTPUT_PREFIX, FOREACH_ITEMS_WAIT_FOR, init_constants, loadCompletedStepRouting, init_completed_step_routing, resolveInputValue, getSecretInputKeys, init_input, validateJsonSchema, findJsonSchemaShapeErrors, init_json_schema_validator, getMaxWorkflowStepsPerRun, init_limits, findWorkflowReadinessProblems, formatReadinessProblems, workflowSaveWarnings, withSaveWarnings, init_readiness, init_template, runStepValidation, init_validation, TriggerSchemaError, startWorkflowExecution2, ParentStepNotCurrentError, failRunOnUnreadableReplay, isWorkflowRunActive, isStepExecuting, holdWorkflowRun, walkGraph, hasRunningStep, findReadyNodes, scriptBodyInterpolationError, init_engine, ForeachExecutor, init_foreach, rebuildNodeExecutionInput, init_step_input, isForeachChildOwned, parkAndDriveForeach, startForeachDrive, runForeachDrive, init_foreach_driver, FOREACH_TERMINAL_STEP_STATUSES, isRetryPending, parseSyntheticNodeId, resolveForeachParent, settleForeachChild, init_foreach_join, resolveStepNode, stepFailureMode, init_foreach_body, getNextTargets, generateEdges, resolveValidationPort, getSuccessors, definitionNodeIds, validateDefinition, applyDefinitionPatch, init_definition2 };
@@ -1,10 +1,10 @@
1
- import {
2
- resolveSlashSkillPrompt
3
- } from "./cli-jc1g9ndz.js";
4
1
  import {
5
2
  reasoningCapability,
6
3
  applyReasoningEffort
7
4
  } from "./cli-jrzkw01m.js";
5
+ import {
6
+ resolveSlashSkillPrompt
7
+ } from "./cli-5j88qqa8.js";
8
8
  import {
9
9
  CONTEXT_FORMULA,
10
10
  getContextWindowSize,
@@ -24,7 +24,7 @@ import {
24
24
  import {
25
25
  DEFAULT_MODEL_TIER_MAP,
26
26
  init_types4
27
- } from "./cli-hfkwwy1h.js";
27
+ } from "./cli-2zp0et3v.js";
28
28
  import {
29
29
  getOpenRouterBaseUrl,
30
30
  getOpenRouterAttributionHeaders,
@@ -72,7 +72,7 @@ init_multi_runtime2();
72
72
  init_openrouter_base_url();
73
73
  init_process_group();
74
74
  init_secret_scrubber();
75
- var DSH_PACKAGE = "@deepseek-ai/dsh@0.2.2-alpha.3";
75
+ var DSH_PACKAGE = "@deepseek-ai/dsh@0.2.2-rc.1";
76
76
  function checkDshCredentials2(env) {
77
77
  return env.DEEPSEEK_API_KEY?.trim() || env.OPENROUTER_API_KEY?.trim() ? { ready: true, missing: [], satisfiedBy: "env" } : {
78
78
  ready: false,
@@ -74,7 +74,7 @@ import {
74
74
  init_src,
75
75
  selectCredential,
76
76
  init_credentials2
77
- } from "./cli-xfjrc279.js";
77
+ } from "./cli-5mrq3ake.js";
78
78
  import {
79
79
  __export,
80
80
  __esm
@@ -13960,7 +13960,7 @@ function revive(value, chat) {
13960
13960
  }
13961
13961
  return value;
13962
13962
  }
13963
- var STREAM_CHUNK_TYPES, adapterMap, Message3, POSTABLE_OBJECT, ChatError, LockError, NotImplementedError2, ConsoleLogger2 = class _ConsoleLogger {
13963
+ var STREAM_CHUNK_TYPES, adapterMap, Message3, POSTABLE_OBJECT, ChatError, LockError, NotImplementedError3, ConsoleLogger2 = class _ConsoleLogger {
13964
13964
  prefix;
13965
13965
  level;
13966
13966
  constructor(level = "info", prefix = "chat-sdk") {
@@ -14263,7 +14263,7 @@ var init_chunk_ZGXC7ZLP = __esm(() => {
14263
14263
  this.name = "LockError";
14264
14264
  }
14265
14265
  };
14266
- NotImplementedError2 = class extends ChatError {
14266
+ NotImplementedError3 = class extends ChatError {
14267
14267
  feature;
14268
14268
  constructor(message, feature, cause) {
14269
14269
  super(message, "NOT_IMPLEMENTED", cause);
@@ -14489,7 +14489,7 @@ var init_chunk_ZGXC7ZLP = __esm(() => {
14489
14489
  }
14490
14490
  postable = await this.processCallbackUrls(postable);
14491
14491
  if (!this.adapter.scheduleMessage) {
14492
- throw new NotImplementedError2("Scheduled messages are not supported by this adapter", "scheduling");
14492
+ throw new NotImplementedError3("Scheduled messages are not supported by this adapter", "scheduling");
14493
14493
  }
14494
14494
  return this.adapter.scheduleMessage(this.id, postable, options);
14495
14495
  }
@@ -14881,7 +14881,7 @@ var init_chunk_ZGXC7ZLP = __esm(() => {
14881
14881
  }
14882
14882
  async reply(target, message) {
14883
14883
  if (!this.adapter.reply) {
14884
- throw new NotImplementedError2("Message replies are not supported by this adapter", "replies");
14884
+ throw new NotImplementedError3("Message replies are not supported by this adapter", "replies");
14885
14885
  }
14886
14886
  const targetMessage = target instanceof Message3 ? target : this.findKnownMessage(target);
14887
14887
  if (targetMessage && targetMessage.threadId !== this.id) {
@@ -14953,7 +14953,7 @@ var init_chunk_ZGXC7ZLP = __esm(() => {
14953
14953
  }
14954
14954
  postable = await this.processCallbackUrls(postable);
14955
14955
  if (!this.adapter.scheduleMessage) {
14956
- throw new NotImplementedError2("Scheduled messages are not supported by this adapter", "scheduling");
14956
+ throw new NotImplementedError3("Scheduled messages are not supported by this adapter", "scheduling");
14957
14957
  }
14958
14958
  return this.adapter.scheduleMessage(this.id, postable, options);
14959
14959
  }
@@ -15071,7 +15071,7 @@ var init_chunk_ZGXC7ZLP = __esm(() => {
15071
15071
  }
15072
15072
  async markAsRead(message) {
15073
15073
  if (!this.adapter.markAsRead) {
15074
- throw new NotImplementedError2("Read receipts are not supported by this adapter", "read-receipts");
15074
+ throw new NotImplementedError3("Read receipts are not supported by this adapter", "read-receipts");
15075
15075
  }
15076
15076
  const target = message ?? this._currentMessage;
15077
15077
  if (!target) {
@@ -17836,4 +17836,4 @@ var init_dist4 = __esm(() => {
17836
17836
  toModalElement2 = toModalElement;
17837
17837
  });
17838
17838
 
17839
- export { isTextNode2, isParagraphNode2, isStrongNode2, isEmphasisNode2, isDeleteNode2, isInlineCodeNode2, isCodeNode2, isLinkNode2, isBlockquoteNode2, isListNode2, isTableNode2, tableToAscii2, tableElementToAscii2, chartElementToFallbackText2, getNodeChildren2, parseMarkdown2, stringifyMarkdown2, toPlainText2, markdownToPlainText2, walkAst2, BaseFormatConverter2, Message3, NotImplementedError2, ConsoleLogger2, StreamingMarkdownRenderer2, Chat2, getEmoji2, defaultEmojiResolver2, convertEmojiPlaceholders2, cardChildToFallbackText2, isCardElement2, isJSX2, toModalElement2, init_dist4 };
17839
+ export { isTextNode2, isParagraphNode2, isStrongNode2, isEmphasisNode2, isDeleteNode2, isInlineCodeNode2, isCodeNode2, isLinkNode2, isBlockquoteNode2, isListNode2, isTableNode2, tableToAscii2, tableElementToAscii2, chartElementToFallbackText2, getNodeChildren2, parseMarkdown2, stringifyMarkdown2, toPlainText2, markdownToPlainText2, walkAst2, BaseFormatConverter2, Message3, NotImplementedError3, ConsoleLogger2, StreamingMarkdownRenderer2, Chat2, getEmoji2, defaultEmojiResolver2, convertEmojiPlaceholders2, cardChildToFallbackText2, isCardElement2, isJSX2, toModalElement2, init_dist4 };
@@ -8,7 +8,7 @@ import {
8
8
  resolveTemplateAsync,
9
9
  init_resolver,
10
10
  init_session_templates
11
- } from "./cli-kf3pxxdg.js";
11
+ } from "./cli-v1dv1r37.js";
12
12
 
13
13
  // src/hooks/context-bound-note.ts
14
14
  import { renameSync, writeFileSync } from "node:fs";
@@ -9,7 +9,7 @@ import {
9
9
  acquireOAuthRefreshLock,
10
10
  releaseOAuthRefreshLock,
11
11
  init_oauth
12
- } from "./cli-j7d73g1y.js";
12
+ } from "./cli-7w69ne2f.js";
13
13
  import {
14
14
  generateRandomCodeVerifier,
15
15
  generateRandomState,
@@ -7,7 +7,7 @@ var package_default;
7
7
  var init_package = __esm(() => {
8
8
  package_default = {
9
9
  name: "@desplega.ai/agent-swarm",
10
- version: "2.7.10",
10
+ version: "2.8.1",
11
11
  description: "agent-swarm.dev — an open-source operating system for AI work: a lead agent breaks goals into tasks, routes them to specialized workers such as Claude Code or Codex, runs each worker in an isolated container, and preserves shared memory, tools, schedules, and review gates so delegated work compounds across sessions.",
12
12
  keywords: [
13
13
  "agent-swarm.dev",
@@ -211,8 +211,8 @@ var init_package = __esm(() => {
211
211
  dependencies: {
212
212
  "@agentclientprotocol/sdk": "2.4.0",
213
213
  "@ai-sdk/openai": "^3.0.41",
214
- "@anthropic-ai/claude-agent-sdk": "0.3.317",
215
- "@anthropic-ai/sdk": "^1.4.0",
214
+ "@anthropic-ai/claude-agent-sdk": "0.3.318",
215
+ "@anthropic-ai/sdk": "^1.5.0",
216
216
  "@asteasolutions/zod-to-openapi": "^8.0.0",
217
217
  "@aws-sdk/client-bedrock": "3.1048.0",
218
218
  "@boxd-sh/sdk": "0.2.20",
@@ -220,8 +220,8 @@ var init_package = __esm(() => {
220
220
  "@chat-adapter/slack": "4.41.1",
221
221
  "@chat-adapter/teams": "4.41.1",
222
222
  "@chat-adapter/telegram": "4.41.1",
223
- "@cursor/sdk": "1.3.0",
224
- "@desplega.ai/agent-fs-just-bash": "0.18.16",
223
+ "@cursor/sdk": "1.3.1",
224
+ "@desplega.ai/agent-fs-just-bash": "0.18.18",
225
225
  "@desplega.ai/business-use": "^0.4.2",
226
226
  "@earendil-works/pi-agent-core": "^1.5.0",
227
227
  "@earendil-works/pi-ai": "^1.5.0",
@@ -7,7 +7,7 @@ import {
7
7
  import {
8
8
  assertUrlSafe,
9
9
  init_egress_guard
10
- } from "./cli-j7d73g1y.js";
10
+ } from "./cli-7w69ne2f.js";
11
11
  import {
12
12
  isEnvFlagEnabled,
13
13
  init_env_flag
package/dist/cli.js CHANGED
@@ -50,7 +50,7 @@ var import_react = __toESM(require_react(), 1);
50
50
  // package.json
51
51
  var package_default = {
52
52
  name: "@desplega.ai/agent-swarm",
53
- version: "2.7.10",
53
+ version: "2.8.1",
54
54
  description: "agent-swarm.dev — an open-source operating system for AI work: a lead agent breaks goals into tasks, routes them to specialized workers such as Claude Code or Codex, runs each worker in an isolated container, and preserves shared memory, tools, schedules, and review gates so delegated work compounds across sessions.",
55
55
  keywords: [
56
56
  "agent-swarm.dev",
@@ -254,8 +254,8 @@ var package_default = {
254
254
  dependencies: {
255
255
  "@agentclientprotocol/sdk": "2.4.0",
256
256
  "@ai-sdk/openai": "^3.0.41",
257
- "@anthropic-ai/claude-agent-sdk": "0.3.317",
258
- "@anthropic-ai/sdk": "^1.4.0",
257
+ "@anthropic-ai/claude-agent-sdk": "0.3.318",
258
+ "@anthropic-ai/sdk": "^1.5.0",
259
259
  "@asteasolutions/zod-to-openapi": "^8.0.0",
260
260
  "@aws-sdk/client-bedrock": "3.1048.0",
261
261
  "@boxd-sh/sdk": "0.2.20",
@@ -263,8 +263,8 @@ var package_default = {
263
263
  "@chat-adapter/slack": "4.41.1",
264
264
  "@chat-adapter/teams": "4.41.1",
265
265
  "@chat-adapter/telegram": "4.41.1",
266
- "@cursor/sdk": "1.3.0",
267
- "@desplega.ai/agent-fs-just-bash": "0.18.16",
266
+ "@cursor/sdk": "1.3.1",
267
+ "@desplega.ai/agent-fs-just-bash": "0.18.18",
268
268
  "@desplega.ai/business-use": "^0.4.2",
269
269
  "@earendil-works/pi-agent-core": "^1.5.0",
270
270
  "@earendil-works/pi-ai": "^1.5.0",
@@ -837,7 +837,7 @@ function McpServer({ port, apiKey, dbPath }) {
837
837
  if (dbPath) {
838
838
  process.env.DATABASE_PATH = dbPath;
839
839
  }
840
- import("./http-5a9p4h6y.js").then(() => {
840
+ import("./http-haw4r8ne.js").then(() => {
841
841
  setStatus("running");
842
842
  }).catch((err) => {
843
843
  setStatus("error");
@@ -918,7 +918,7 @@ function WorkerRunner({ prompt, systemPrompt, systemPromptFile, additionalArgs }
918
918
  const { exit } = use_app_default();
919
919
  import_react.useEffect(() => {
920
920
  installConsoleScrub();
921
- import("./worker-r8mz7a65.js").then(({ runWorker }) => runWorker({
921
+ import("./worker-mz5z7kj0.js").then(({ runWorker }) => runWorker({
922
922
  prompt: prompt || undefined,
923
923
  systemPrompt: systemPrompt || undefined,
924
924
  systemPromptFile: systemPromptFile || undefined,
@@ -935,7 +935,7 @@ function LeadRunner({ prompt, systemPrompt, systemPromptFile, additionalArgs })
935
935
  const { exit } = use_app_default();
936
936
  import_react.useEffect(() => {
937
937
  installConsoleScrub();
938
- import("./lead-re73kdgc.js").then(({ runLead }) => runLead({
938
+ import("./lead-6ygbfhbh.js").then(({ runLead }) => runLead({
939
939
  prompt: prompt || undefined,
940
940
  systemPrompt: systemPrompt || undefined,
941
941
  systemPromptFile: systemPromptFile || undefined,
@@ -974,8 +974,8 @@ function LazyComponent({
974
974
  }
975
975
  return import_react.createElement(Component, props);
976
976
  }
977
- var loadOnboard = () => import("./onboard-52f9t5dm.js").then(({ Onboard }) => Onboard);
978
- var loadConnect = () => import("./setup-7ssfakk1.js").then(({ Setup }) => Setup);
977
+ var loadOnboard = () => import("./onboard-v99eh56m.js").then(({ Onboard }) => Onboard);
978
+ var loadConnect = () => import("./setup-wv467afy.js").then(({ Setup }) => Setup);
979
979
  function UnknownCommand({ command }) {
980
980
  const { exit } = use_app_default();
981
981
  import_react.useEffect(() => {
@@ -1104,14 +1104,14 @@ ${binName} docs \u2014 v${package_default.version}
1104
1104
  }
1105
1105
  process.exit(0);
1106
1106
  } else if (args.command === "hook") {
1107
- const { runHook } = await import("./hook-hq93y5ej.js");
1107
+ const { runHook } = await import("./hook-8k6fbz9b.js");
1108
1108
  await runHook();
1109
1109
  } else if (args.command === "codex-hook") {
1110
- const { handleCodexHook } = await import("./codex-hook-fac6175r.js");
1110
+ const { handleCodexHook } = await import("./codex-hook-h3vk6xzr.js");
1111
1111
  await handleCodexHook();
1112
1112
  process.exit(process.exitCode ?? 0);
1113
1113
  } else if (args.command === "session-summary-stdin") {
1114
- const { runSessionSummaryFromStdin } = await import("./hook-g3nhexsy.js");
1114
+ const { runSessionSummaryFromStdin } = await import("./hook-jgcgygex.js");
1115
1115
  await runSessionSummaryFromStdin();
1116
1116
  process.exit(process.exitCode ?? 0);
1117
1117
  } else if (args.command === "x") {
@@ -1124,7 +1124,7 @@ ${binName} docs \u2014 v${package_default.version}
1124
1124
  printHelp("scripts");
1125
1125
  process.exit(scriptsArgs[0] === "reembed" || args.showHelp ? 0 : 1);
1126
1126
  }
1127
- const { runScriptsMaintenanceCommand } = await import("./maintenance-dmghacy5.js");
1127
+ const { runScriptsMaintenanceCommand } = await import("./maintenance-vdts800b.js");
1128
1128
  await runScriptsMaintenanceCommand(scriptsArgs);
1129
1129
  console.log("Scripts re-embedded.");
1130
1130
  } else if (args.command === "rbac") {
@@ -1134,17 +1134,17 @@ ${binName} docs \u2014 v${package_default.version}
1134
1134
  printHelp("rbac");
1135
1135
  process.exit(args.showHelp ? 0 : 1);
1136
1136
  }
1137
- const { runRbacCliCommand } = await import("./rbac-roles-q0gr8eyj.js");
1137
+ const { runRbacCliCommand } = await import("./rbac-roles-npbmdh77.js");
1138
1138
  await runRbacCliCommand(rbacArgs);
1139
1139
  } else if (args.command === "codex-login") {
1140
1140
  const { runCodexLogin } = await import("./codex-login-bcda78ge.js");
1141
1141
  const codexLoginArgs = process.argv.slice(process.argv.indexOf("codex-login") + 1);
1142
1142
  await runCodexLogin(codexLoginArgs);
1143
1143
  } else if (args.command === "codex-session-runner") {
1144
- const { runCodexSessionRunner } = await import("./codex-session-runner-pch8x584.js");
1144
+ const { runCodexSessionRunner } = await import("./codex-session-runner-ak9x1k1h.js");
1145
1145
  await runCodexSessionRunner();
1146
1146
  } else if (args.command === "claude-managed-setup") {
1147
- const { runClaudeManagedSetup } = await import("./claude-managed-setup-9gsmwzyx.js");
1147
+ const { runClaudeManagedSetup } = await import("./claude-managed-setup-pd47nzch.js");
1148
1148
  const setupArgs = process.argv.slice(process.argv.indexOf("claude-managed-setup") + 1);
1149
1149
  await runClaudeManagedSetup(setupArgs);
1150
1150
  } else if (args.command === "worker-token") {
@@ -1156,7 +1156,7 @@ ${binName} docs \u2014 v${package_default.version}
1156
1156
  const e2bArgs = process.argv.slice(process.argv.indexOf("e2b") + 1);
1157
1157
  await runE2BCommand(e2bArgs);
1158
1158
  } else if (args.command === "controller") {
1159
- const { runController } = await import("./controller-jkx994pz.js");
1159
+ const { runController } = await import("./controller-hxx8wwy1.js");
1160
1160
  await runController(process.argv.slice(process.argv.indexOf("controller") + 1));
1161
1161
  } else {
1162
1162
  render_default(/* @__PURE__ */ jsx_dev_runtime.jsxDEV(App, {
@@ -2,17 +2,16 @@ import {
2
2
  checkCodexCredentials2,
3
3
  createInProcessCodexSession2,
4
4
  CodexAdapter2
5
- } from "./cli-eqk5p56g.js";
5
+ } from "./cli-9vhebtjz.js";
6
6
  import"./cli-m5akxq8q.js";
7
7
  import"./cli-kr5tjjtz.js";
8
8
  import"./cli-98rwmcyc.js";
9
9
  import"./cli-4bd1rck6.js";
10
- import"./cli-jc1g9ndz.js";
11
- import"./cli-rjyghzg4.js";
10
+ import"./cli-g70vxtjh.js";
12
11
  import"./cli-0726awxw.js";
13
- import"./cli-jrp1dt73.js";
14
- import"./cli-f2zenhja.js";
15
- import"./cli-w3bk0dgv.js";
12
+ import"./cli-xzm9vcfg.js";
13
+ import"./cli-kc7v1nfv.js";
14
+ import"./cli-8aes17e4.js";
16
15
  import"./cli-jrzkw01m.js";
17
16
  export {
18
17
  CodexAdapter2 as CodexAdapter,
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env bun
2
2
  import {
3
3
  renderSteeringDelivery
4
- } from "./cli-eqtfgfr6.js";
4
+ } from "./cli-2gxeg5gr.js";
5
5
  import {
6
6
  guardGhPrBody,
7
7
  guardGhPrRoom
@@ -1,11 +1,10 @@
1
- import"./cli-jrp1dt73.js";
2
- import"./cli-f2zenhja.js";
3
- import"./cli-w3bk0dgv.js";
4
- import"./cli-rjyghzg4.js";
1
+ import"./cli-xzm9vcfg.js";
2
+ import"./cli-kc7v1nfv.js";
3
+ import"./cli-8aes17e4.js";
4
+ import"./cli-g70vxtjh.js";
5
5
  import {
6
6
  createInProcessCodexSession2
7
- } from "./cli-eqk5p56g.js";
8
- import"./cli-jc1g9ndz.js";
7
+ } from "./cli-9vhebtjz.js";
9
8
  import"./cli-0726awxw.js";
10
9
  import"./cli-m5akxq8q.js";
11
10
  import"./cli-4bd1rck6.js";
@@ -2,16 +2,16 @@ import {
2
2
  getAllAgents2,
3
3
  getAllTasks2,
4
4
  init_db4
5
- } from "./cli-j7d73g1y.js";
5
+ } from "./cli-7w69ne2f.js";
6
6
  import {
7
7
  EXTERNAL_CHANNEL_BLOCKED_REPLY2,
8
8
  shouldBlockChannel2,
9
9
  init_external_channel
10
- } from "./cli-bxz823sz.js";
10
+ } from "./cli-b8e9nb04.js";
11
11
  import {
12
12
  isSlackLeaveThreadDisabled,
13
13
  init_left_threads
14
- } from "./cli-2tsfpc70.js";
14
+ } from "./cli-dy32zecz.js";
15
15
  import {
16
16
  isEnvFlagEnabled,
17
17
  init_env_flag
@@ -3,7 +3,7 @@ import {
3
3
  CONTROLLER_PROTOCOL_VERSION,
4
4
  CONTROLLER_PING_INTERVAL_MS,
5
5
  ControllerServerMessageSchema
6
- } from "./cli-x9exydey.js";
6
+ } from "./cli-m4dqmnbp.js";
7
7
  import {
8
8
  createRuntimeProvider,
9
9
  init_runtime_providers
@@ -11,7 +11,7 @@ import {
11
11
  import {
12
12
  RuntimeProviderKindSchema,
13
13
  init_types4
14
- } from "./cli-hfkwwy1h.js";
14
+ } from "./cli-2zp0et3v.js";
15
15
  import {
16
16
  scrubSecrets,
17
17
  registerVolatileSecret,