@desplega.ai/agent-swarm 2.7.10 → 2.8.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 (281) hide show
  1. package/dist/acp-adapter-t949vbbp.js +15 -0
  2. package/dist/{actions-b8aqhrsg.js → actions-7e9czc7s.js} +18 -19
  3. package/dist/{amp-adapter-4c165vgn.js → amp-adapter-gv6cbb7d.js} +2 -3
  4. package/dist/{app-m9khefrh.js → app-b9fbkp9v.js} +3 -3
  5. package/dist/{assistant-rh4v3ntz.js → assistant-wjb7v4c7.js} +20 -21
  6. package/dist/{boot-args-schema-hwkc8bzv.js → boot-args-schema-2t37e0fe.js} +1 -1
  7. package/dist/{boot-reembed-5y6yw9sj.js → boot-reembed-a35nkyr1.js} +1 -1
  8. package/dist/{boot-reembed-fdyk55h4.js → boot-reembed-gka3zas7.js} +1 -1
  9. package/dist/{boot-scrub-sweep-r5r8kqsn.js → boot-scrub-sweep-65sdnp6c.js} +3 -3
  10. package/dist/{boot-seeds-8f9zt5cm.js → boot-seeds-x42tzytw.js} +4 -5
  11. package/dist/{claude-adapter-s5df247c.js → claude-adapter-v221b2fd.js} +7 -8
  12. package/dist/{claude-managed-adapter-h74d06yz.js → claude-managed-adapter-29eq09wd.js} +2 -2
  13. package/dist/{claude-managed-setup-9gsmwzyx.js → claude-managed-setup-9m6450zk.js} +2 -2
  14. package/dist/{claude-sdk-session-dq1j4nz9.js → claude-sdk-session-0q0ptaba.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-eqtfgfr6.js → cli-2gxeg5gr.js} +1 -1
  18. package/dist/{cli-eqk5p56g.js → cli-2wnq8jkz.js} +9 -9
  19. package/dist/{cli-hfkwwy1h.js → cli-2zp0et3v.js} +21 -2
  20. package/dist/{cli-rt0ag4x1.js → cli-334z18y3.js} +4 -4
  21. package/dist/{cli-6m6b4bep.js → cli-3rkdne1h.js} +2 -2
  22. package/dist/{cli-3xddv0rk.js → cli-4txa0ter.js} +5 -7
  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-n07eecjs.js → cli-6t09sdhy.js} +3 -3
  26. package/dist/{cli-38yww4e9.js → cli-6wxjceza.js} +8 -8
  27. package/dist/{cli-5xcb8gxq.js → cli-7b8sbmag.js} +8 -8
  28. package/dist/{cli-3xj33nrx.js → cli-7cp6aa1q.js} +10 -3
  29. package/dist/{cli-mp9aa8g5.js → cli-7p1kvkck.js} +6 -6
  30. package/dist/{cli-w3bk0dgv.js → cli-8aes17e4.js} +2 -2
  31. package/dist/{cli-n9abj89w.js → cli-8fknbnhw.js} +8 -8
  32. package/dist/{cli-xd5ebp64.js → cli-8kzasymh.js} +3 -3
  33. package/dist/{cli-2tsfpc70.js → cli-a7wvp2km.js} +1 -1
  34. package/dist/{cli-kx4c8j05.js → cli-abejgen1.js} +63 -19
  35. package/dist/{cli-36wdfzgn.js → cli-bsywb58a.js} +8 -8
  36. package/dist/{cli-yz7v0sh4.js → cli-c55z5chy.js} +4 -6
  37. package/dist/{cli-18qt3few.js → cli-deefvewm.js} +1 -1
  38. package/dist/{cli-jg24scat.js → cli-ee0b971j.js} +3 -3
  39. package/dist/cli-f3vq58d2.js +242 -0
  40. package/dist/{cli-3xcwp3z8.js → cli-ffhtssbp.js} +2 -2
  41. package/dist/{cli-rjyghzg4.js → cli-g70vxtjh.js} +2 -2
  42. package/dist/{cli-g1px1g2e.js → cli-gxkx0zzp.js} +1 -1
  43. package/dist/{cli-j7d73g1y.js → cli-h38x262p.js} +3035 -354
  44. package/dist/{cli-zjphdj1a.js → cli-j790gp2w.js} +40 -18
  45. package/dist/{cli-f2zenhja.js → cli-kc7v1nfv.js} +1 -1
  46. package/dist/{cli-td33w98c.js → cli-m23zjcy2.js} +10 -10
  47. package/dist/{cli-8ewkreqd.js → cli-m28atx8q.js} +7 -9
  48. package/dist/{cli-x9exydey.js → cli-m4dqmnbp.js} +1 -1
  49. package/dist/{cli-ybjdc978.js → cli-mrt48bx7.js} +7 -4
  50. package/dist/{cli-mr97t7cc.js → cli-p1bq50aa.js} +263 -14
  51. package/dist/{cli-ttbqe3q4.js → cli-p1w18yhx.js} +1 -1
  52. package/dist/{cli-nj3x45rw.js → cli-p2gfst4m.js} +52 -43
  53. package/dist/{cli-z9cs5m0w.js → cli-pasjcnmj.js} +12 -12
  54. package/dist/{cli-an1knn2k.js → cli-qa4wdgsy.js} +5 -5
  55. package/dist/{cli-xncjscpm.js → cli-qfedvmcr.js} +50 -24
  56. package/dist/{cli-tmft5dz2.js → cli-qmqk2yc2.js} +1 -1
  57. package/dist/{cli-bxz823sz.js → cli-qsnnd04k.js} +1 -1
  58. package/dist/{cli-cr14kftt.js → cli-qwca7s44.js} +3 -3
  59. package/dist/{cli-7wz05bx3.js → cli-rfywm85n.js} +460 -737
  60. package/dist/{cli-v2fwbnsk.js → cli-rmmpt0wm.js} +6 -6
  61. package/dist/{cli-xbtq4d6s.js → cli-rzsy6nc6.js} +12 -8
  62. package/dist/{cli-0m7rtm11.js → cli-s7t6p9my.js} +1 -1
  63. package/dist/{cli-16phend6.js → cli-sdtt3men.js} +1 -1
  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-h49ejvmc.js → cli-wcg8x116.js} +1 -1
  68. package/dist/{cli-q581b386.js → cli-wk18cm92.js} +5 -5
  69. package/dist/{cli-4vwxp550.js → cli-x1wa213s.js} +1 -1
  70. package/dist/{cli-jrp1dt73.js → cli-xzm9vcfg.js} +1 -1
  71. package/dist/{cli-eb2azq8n.js → cli-y97qxcfx.js} +9 -9
  72. package/dist/{cli-55bkx8hh.js → cli-yq3zak69.js} +1 -1
  73. package/dist/cli.js +17 -17
  74. package/dist/{codex-adapter-yr60sme6.js → codex-adapter-30j9bpzd.js} +5 -6
  75. package/dist/{codex-hook-fac6175r.js → codex-hook-h3vk6xzr.js} +1 -1
  76. package/dist/{codex-session-runner-pch8x584.js → codex-session-runner-8vp57v8w.js} +5 -6
  77. package/dist/{commands-phjfbkv0.js → commands-bngnz9g7.js} +3 -3
  78. package/dist/{controller-jkx994pz.js → controller-hxx8wwy1.js} +2 -2
  79. package/dist/{controllers-connect-c4448kwa.js → controllers-connect-e2b4gyxc.js} +19 -20
  80. package/dist/{cursor-adapter-ndebqnm8.js → cursor-adapter-n5nc3mfe.js} +1 -2
  81. package/dist/{db-ez6egt6v.js → db-bgm7vkc0.js} +3 -3
  82. package/dist/{db-ef32tbfc.js → db-c6np41ca.js} +10 -2
  83. package/dist/{devin-adapter-z46ep5ph.js → devin-adapter-xedz98zv.js} +1 -1
  84. package/dist/{dispatcher-g3tt9hs9.js → dispatcher-jnybck15.js} +17 -18
  85. package/dist/{dsh-adapter-tcyn3099.js → dsh-adapter-nrhbrjz8.js} +1 -2
  86. package/dist/{easter-egg-3d-e36hk5td.js → easter-egg-3d-533knw22.js} +1 -1
  87. package/dist/{embedding-space-4kyh5qqj.js → embedding-space-crsm2zp0.js} +6 -6
  88. package/dist/{embeddings-6a8v4a6t.js → embeddings-e7z3f27f.js} +1 -1
  89. package/dist/{execute-3cbg0twf.js → execute-b3mrb1mv.js} +1 -1
  90. package/dist/{external-channel-se646snz.js → external-channel-m77wf5z3.js} +2 -2
  91. package/dist/{fx-adapter-yw795hqq.js → fx-adapter-b6w0kf56.js} +7 -8
  92. package/dist/{grok-adapter-ttmcss2j.js → grok-adapter-4sqtebdk.js} +7 -8
  93. package/dist/handlers-kdjcyzdj.js +32 -0
  94. package/dist/heartbeat-xgb036sx.js +43 -0
  95. package/dist/{hook-g3nhexsy.js → hook-5h02c9ga.js} +6 -6
  96. package/dist/{hook-hq93y5ej.js → hook-xsk1jbha.js} +5 -5
  97. package/dist/{http-5a9p4h6y.js → http-txe7qhvn.js} +282 -140
  98. package/dist/{index-6haqt3v5.js → index-4a0670yh.js} +8917 -8476
  99. package/dist/index-835xdgnm.js +33 -0
  100. package/dist/index-d469300x.js +37 -0
  101. package/dist/index-rzqwp11g.js +32 -0
  102. package/dist/{index-s72rqgsx.js → index-tvfafeyy.js} +1 -1
  103. package/dist/{index-hgn3c961.js → index-vk63emp7.js} +978 -35
  104. package/dist/{index-3c5pxbge.js → index-ysvbhg5m.js} +1 -1
  105. package/dist/{keepalive-1j4n4dmk.js → keepalive-4zsrce78.js} +3 -3
  106. package/dist/lead-yqt47dkr.js +70 -0
  107. package/dist/{maintenance-dmghacy5.js → maintenance-86jvartk.js} +1 -1
  108. package/dist/{oauth-refresh-sweep-yy06c03c.js → oauth-refresh-sweep-j52kg9pr.js} +2 -2
  109. package/dist/{onboard-52f9t5dm.js → onboard-c2aj5p8q.js} +3 -3
  110. package/dist/{opencode-adapter-krnh9jkn.js → opencode-adapter-dsagkhtw.js} +5 -6
  111. package/dist/{otel-impl-xjqz6wjj.js → otel-impl-yyy203z8.js} +1 -1
  112. package/dist/{pi-mono-adapter-dbxyp0qv.js → pi-mono-adapter-546cd1cc.js} +9 -9
  113. package/dist/{pricing-refresh-ctdr74pd.js → pricing-refresh-1rgzqyzz.js} +2 -3
  114. package/dist/{rbac-roles-q0gr8eyj.js → rbac-roles-e70xfeyj.js} +4 -6
  115. package/dist/{rbac-roles-ehv8s10n.js → rbac-roles-q89qe8er.js} +3 -3
  116. package/dist/{registry-hpjfmcfz.js → registry-32b1mft6.js} +1 -1
  117. package/dist/{render-v2-5b6chvcq.js → render-v2-k6tt107q.js} +3 -3
  118. package/dist/{resume-5a5d2845.js → resume-cnnrjfxa.js} +6 -6
  119. package/dist/{runtime-khxszyfp.js → runtime-1hv06jsn.js} +1 -1
  120. package/dist/{session-access-gj0bjhqg.js → session-access-xkxkjw3n.js} +4 -4
  121. package/dist/{session-source-backfill-2sy0krfk.js → session-source-backfill-1d5pdwww.js} +2 -2
  122. package/dist/{setup-7ssfakk1.js → setup-se8q7gkc.js} +1 -1
  123. package/dist/{virtual-modules-pjj0knwf.js → virtual-modules-gazyapte.js} +3 -3
  124. package/dist/{work-objects-bf3syvhq.js → work-objects-1kxnbzy5.js} +20 -21
  125. package/dist/{worker-follow-up-38xevga6.js → worker-follow-up-zqm8apt4.js} +17 -18
  126. package/dist/worker-j6xxtq7p.js +70 -0
  127. package/openapi.json +334 -7
  128. package/package.json +4 -4
  129. package/src/apps/definition.ts +11 -0
  130. package/src/apps/store.ts +28 -8
  131. package/src/be/db/model-profiles.ts +147 -38
  132. package/src/be/db/tasks/read.ts +5 -1
  133. package/src/be/db/workflow-run-definitions.ts +117 -0
  134. package/src/be/db.ts +24 -3
  135. package/src/be/memory/constants.ts +14 -1
  136. package/src/be/memory/key-paths.ts +8 -0
  137. package/src/be/memory/providers/sqlite-store.ts +160 -10
  138. package/src/be/memory/task-learning.ts +79 -14
  139. package/src/be/memory/types.ts +24 -1
  140. package/src/be/migrations/279_backfill_learning_expiry.sql +15 -0
  141. package/src/be/migrations/281_model_profiles_pr2.sql +28 -0
  142. package/src/be/migrations/283_workflow_run_definitions.sql +14 -0
  143. package/src/be/model-profile-check.ts +284 -0
  144. package/src/be/model-tier-resolution.ts +112 -12
  145. package/src/be/multi-runtime.ts +27 -0
  146. package/src/be/runtime-pools/routing.ts +52 -4
  147. package/src/be/scripts/typecheck.ts +1 -0
  148. package/src/be/seed-scripts/catalog/dreaming-learnings.ts +552 -0
  149. package/src/be/seed-scripts/catalog/dreaming-memtax-create.ts +389 -14
  150. package/src/be/seed-scripts/catalog/dreaming-memtax.ts +6 -3
  151. package/src/be/seed-scripts/index.ts +9 -0
  152. package/src/be/steering.ts +8 -2
  153. package/src/commands/onboard/agent-fs-version.ts +1 -1
  154. package/src/commands/runner.ts +32 -1
  155. package/src/fs/provider.ts +17 -3
  156. package/src/heartbeat/heartbeat.ts +12 -1
  157. package/src/heartbeat/index.ts +1 -0
  158. package/src/http/agents.ts +56 -4
  159. package/src/http/apps.ts +3 -1
  160. package/src/http/config.ts +2 -6
  161. package/src/http/index.ts +2 -3
  162. package/src/http/model-profiles.ts +58 -10
  163. package/src/http/poll.ts +36 -3
  164. package/src/http/schedules.ts +42 -3
  165. package/src/http/tasks.ts +37 -12
  166. package/src/http/workflows.ts +15 -2
  167. package/src/prompts/session-templates.ts +1 -1
  168. package/src/providers/acp-targets.ts +11 -6
  169. package/src/providers/amp-adapter.ts +1 -1
  170. package/src/providers/claude-sdk-session.ts +132 -23
  171. package/src/providers/codex-skill-resolver.ts +10 -4
  172. package/src/providers/cursor-adapter.ts +1 -1
  173. package/src/providers/devin-skill-resolver.ts +5 -5
  174. package/src/providers/dsh-adapter.ts +1 -1
  175. package/src/scheduler/schedule-task.ts +1 -0
  176. package/src/scripts-runtime/sdk-allowlist.ts +1 -0
  177. package/src/scripts-runtime/swarm-sdk.ts +18 -1
  178. package/src/scripts-runtime/types/stdlib.d.ts +1 -0
  179. package/src/scripts-runtime/types/swarm-sdk.d.ts +1 -0
  180. package/src/server.ts +2 -0
  181. package/src/slack/app.ts +93 -0
  182. package/src/slack/inbound-dispatch.ts +18 -1
  183. package/src/slack/workspace-guard.ts +345 -0
  184. package/src/tasks/task-terminal-effects.ts +4 -0
  185. package/src/tasks/worker-follow-up.ts +102 -2
  186. package/src/tests/acp-adapter.test.ts +82 -0
  187. package/src/tests/apps-icon.test.ts +120 -0
  188. package/src/tests/chained-task-follow-up.test.ts +248 -0
  189. package/src/tests/check-pr-body.test.ts +40 -0
  190. package/src/tests/claude-sdk-lifecycle.test.ts +216 -1
  191. package/src/tests/claude-sdk-process.fixture.ts +57 -0
  192. package/src/tests/codex-skill-resolver.test.ts +31 -0
  193. package/src/tests/credentials-allowlist.test.ts +470 -0
  194. package/src/tests/db-task-read-contract.test.ts +5 -0
  195. package/src/tests/db-task-write-contract.test.ts +5 -0
  196. package/src/tests/deferred-wake-follow-up.test.ts +47 -0
  197. package/src/tests/docs-index-footprint.test.js +3 -3
  198. package/src/tests/dreaming-learnings.test.ts +1395 -0
  199. package/src/tests/dsh-adapter.test.ts +1 -1
  200. package/src/tests/explicit-model-validation.test.ts +2 -0
  201. package/src/tests/fs-provider.test.ts +42 -0
  202. package/src/tests/heartbeat.test.ts +28 -1
  203. package/src/tests/human-free-reclassify.test.ts +5 -1
  204. package/src/tests/list-endpoint-slimming.test.ts +17 -0
  205. package/src/tests/migration-283-workflow-run-definitions.test.ts +69 -0
  206. package/src/tests/model-profile-check.test.ts +387 -0
  207. package/src/tests/model-profiles-api.test.ts +528 -1
  208. package/src/tests/profile-claim.test.ts +415 -3
  209. package/src/tests/profile-tier-alias.test.ts +382 -0
  210. package/src/tests/schedule-profile.test.ts +359 -0
  211. package/src/tests/script-connections.test.ts +6 -0
  212. package/src/tests/script-per-script-executor.test.ts +1 -0
  213. package/src/tests/scripts-sdk-bridge-tool-failure.test.ts +141 -0
  214. package/src/tests/seed-scripts.test.ts +2 -2
  215. package/src/tests/slack-inbound-receipts.test.ts +22 -2
  216. package/src/tests/slack-socket-ack.test.ts +16 -1
  217. package/src/tests/slack-workspace-guard.test.ts +905 -0
  218. package/src/tests/steering-core.test.ts +40 -0
  219. package/src/tests/store-progress-learning.test.ts +605 -20
  220. package/src/tests/tool-annotations.test.ts +1 -1
  221. package/src/tests/workflow-convergence.test.ts +46 -40
  222. package/src/tests/workflow-definition-pinning-recovery.test.ts +552 -0
  223. package/src/tests/workflow-definition-pinning.test.ts +645 -0
  224. package/src/tests/workflow-executors.test.ts +16 -7
  225. package/src/tests/workflow-foreach.test.ts +43 -20
  226. package/src/tests/workflow-notify-slack-ready.test.ts +161 -0
  227. package/src/tests/workflow-profile.test.ts +328 -0
  228. package/src/tools/app-upsert.ts +1 -1
  229. package/src/tools/memory-edit.ts +2 -1
  230. package/src/tools/model-profiles/check-model-profile.ts +63 -0
  231. package/src/tools/schedules/create-schedule.ts +45 -4
  232. package/src/tools/schedules/patch-schedule.ts +50 -4
  233. package/src/tools/schedules/update-schedule.ts +50 -4
  234. package/src/tools/send-task.ts +17 -2
  235. package/src/tools/store-progress.ts +15 -3
  236. package/src/tools/task-action.ts +9 -1
  237. package/src/tools/templates.ts +13 -0
  238. package/src/tools/tool-config.ts +2 -1
  239. package/src/tools/utils.ts +61 -4
  240. package/src/tools/workflows/create-workflow.ts +1 -1
  241. package/src/tools/workflows/retry-workflow-run.ts +1 -1
  242. package/src/tools/workflows/update-workflow.ts +10 -1
  243. package/src/types.ts +56 -1
  244. package/src/utils/credentials.ts +89 -12
  245. package/src/workflows/engine.ts +10 -1
  246. package/src/workflows/executors/agent-task.ts +21 -2
  247. package/src/workflows/executors/foreach.ts +4 -1
  248. package/src/workflows/executors/notify.ts +62 -6
  249. package/src/workflows/executors/sub-workflow.ts +1 -1
  250. package/src/workflows/executors/swarm-script.ts +4 -1
  251. package/src/workflows/foreach-driver.ts +8 -5
  252. package/src/workflows/limits.ts +2 -1
  253. package/src/workflows/model-validation.ts +27 -2
  254. package/src/workflows/patch-definition.ts +3 -1
  255. package/src/workflows/recovery.ts +6 -6
  256. package/src/workflows/resume.ts +9 -9
  257. package/src/workflows/retry-poller.ts +2 -2
  258. package/templates/skills/apps/SKILL.md +2 -0
  259. package/templates/skills/apps/content.md +2 -0
  260. package/templates/skills/code-quality/content.md +12 -0
  261. package/templates/skills/memory/content.md +8 -0
  262. package/templates/skills/scheduling/config.json +1 -1
  263. package/templates/skills/scheduling/content.md +2 -2
  264. package/templates/skills/swarm-docs/content.md +4 -0
  265. package/templates/skills/swarm-extensions/content.md +1 -1
  266. package/templates/skills/swarm-scripts/SKILL.md +1 -1
  267. package/templates/skills/swarm-scripts/content.md +1 -1
  268. package/templates/skills/work-on-task/SKILL.md +2 -0
  269. package/templates/skills/work-on-task/content.md +2 -0
  270. package/templates/workflows/dreaming/content.md +174 -7
  271. package/dist/acp-adapter-srfhs1s9.js +0 -16
  272. package/dist/cli-bzvs88tv.js +0 -339
  273. package/dist/cli-cyn9v8zr.js +0 -748
  274. package/dist/cli-ed6yqpf1.js +0 -779
  275. package/dist/handlers-17wha3ze.js +0 -33
  276. package/dist/heartbeat-gwewgdms.js +0 -42
  277. package/dist/index-8arwq8mw.js +0 -34
  278. package/dist/index-tpw054az.js +0 -38
  279. package/dist/index-waq75j2j.js +0 -31
  280. package/dist/lead-re73kdgc.js +0 -72
  281. package/dist/worker-r8mz7a65.js +0 -72
@@ -1,10 +1,7 @@
1
1
  import {
2
2
  contextBoundNoteThreshold,
3
3
  createContextBoundNote
4
- } from "./cli-jrp1dt73.js";
5
- import {
6
- resolveSlashSkillPrompt
7
- } from "./cli-jc1g9ndz.js";
4
+ } from "./cli-xzm9vcfg.js";
8
5
  import {
9
6
  CTX_MODE_NUDGE_EVERY
10
7
  } from "./cli-4bd1rck6.js";
@@ -19,13 +16,16 @@ import {
19
16
  autoIndexMemoryFile,
20
17
  fetchConcurrentContext,
21
18
  summarizeTranscript
22
- } from "./cli-xvymtmv4.js";
19
+ } from "./cli-tqegb8eq.js";
23
20
  import {
24
21
  applyReasoningEffort
25
22
  } from "./cli-jrzkw01m.js";
26
23
  import {
27
24
  fetchInstalledMcpServers
28
25
  } from "./cli-bst1vp7e.js";
26
+ import {
27
+ resolveSlashSkillPrompt
28
+ } from "./cli-5j88qqa8.js";
29
29
  import {
30
30
  CONTEXT_FORMULA,
31
31
  getContextWindowSize,
@@ -47,7 +47,7 @@ import {
47
47
  openAICompatibleKeyLabels,
48
48
  validateOpencodeCredentials,
49
49
  init_credentials2
50
- } from "./cli-xfjrc279.js";
50
+ } from "./cli-5mrq3ake.js";
51
51
  import {
52
52
  isEnvFlagEnabled,
53
53
  isSessionSummarySkipped,
@@ -6,7 +6,7 @@ import {
6
6
  resolveCredential,
7
7
  resolveCredentials,
8
8
  init_credentials
9
- } from "./cli-4vwxp550.js";
9
+ } from "./cli-x1wa213s.js";
10
10
  import {
11
11
  kindForModelString,
12
12
  parseModelStr,
@@ -21,7 +21,7 @@ import {
21
21
  import {
22
22
  selectCredential,
23
23
  init_credentials2
24
- } from "./cli-xfjrc279.js";
24
+ } from "./cli-5mrq3ake.js";
25
25
  import {
26
26
  init_zod
27
27
  } from "./cli-zcfpsfzf.js";
@@ -12,7 +12,7 @@ import {
12
12
  SteeringBlockedError,
13
13
  init_steering2,
14
14
  init_db4
15
- } from "./cli-j7d73g1y.js";
15
+ } from "./cli-h38x262p.js";
16
16
  import {
17
17
  isBlockExternalEnabled2,
18
18
  invalidateChannelExternality2,
@@ -20,7 +20,7 @@ import {
20
20
  shouldBlockChannel2,
21
21
  leaveExternalChannel2,
22
22
  init_external_channel
23
- } from "./cli-bxz823sz.js";
23
+ } from "./cli-qsnnd04k.js";
24
24
  import {
25
25
  workflowEventBus2,
26
26
  init_event_bus
@@ -40,7 +40,7 @@ import {
40
40
  init_render_v2,
41
41
  registerTreeMessage,
42
42
  init_watcher
43
- } from "./cli-mr97t7cc.js";
43
+ } from "./cli-p1bq50aa.js";
44
44
  import {
45
45
  TaskCreationBlockedError,
46
46
  init_errors2,
@@ -61,7 +61,7 @@ import {
61
61
  init_message_text,
62
62
  dispatchPre2,
63
63
  init_dispatcher
64
- } from "./cli-7wz05bx3.js";
64
+ } from "./cli-rfywm85n.js";
65
65
  import {
66
66
  wasEventSeen,
67
67
  init_event_dedup,
@@ -72,13 +72,13 @@ import {
72
72
  getBufferMessageCount,
73
73
  instantFlush,
74
74
  init_thread_buffer
75
- } from "./cli-v2fwbnsk.js";
75
+ } from "./cli-rmmpt0wm.js";
76
76
  import {
77
77
  enrichSlackUserEmail,
78
78
  resolveSlackUserId,
79
79
  rewriteSlackMentions,
80
80
  init_enrich
81
- } from "./cli-n07eecjs.js";
81
+ } from "./cli-6t09sdhy.js";
82
82
  import {
83
83
  isSlackLeaveThreadDisabled,
84
84
  SLACK_LEFT_THREAD_CONFIRMATION,
@@ -86,11 +86,11 @@ import {
86
86
  leaveSlackThread,
87
87
  shouldSkipLeftSlackThread,
88
88
  init_left_threads
89
- } from "./cli-2tsfpc70.js";
89
+ } from "./cli-a7wvp2km.js";
90
90
  import {
91
91
  resolveTemplate,
92
92
  init_resolver
93
- } from "./cli-kf3pxxdg.js";
93
+ } from "./cli-v1dv1r37.js";
94
94
  import {
95
95
  init_zod
96
96
  } from "./cli-zcfpsfzf.js";
@@ -16,7 +16,7 @@ import {
16
16
  getSwarmConfigs2,
17
17
  upsertSwarmConfig2,
18
18
  init_db4
19
- } from "./cli-j7d73g1y.js";
19
+ } from "./cli-h38x262p.js";
20
20
  import {
21
21
  createRuntimeProvider,
22
22
  init_runtime_providers
@@ -26,7 +26,7 @@ import {
26
26
  init_session_token_connections,
27
27
  insertSessionToken,
28
28
  init_users
29
- } from "./cli-g1px1g2e.js";
29
+ } from "./cli-gxkx0zzp.js";
30
30
  import {
31
31
  RuntimeControllerCreateSchema,
32
32
  RuntimeControllerUpdateSchema,
@@ -34,7 +34,7 @@ import {
34
34
  RuntimePoolUpdateSchema,
35
35
  RuntimePoolCreateAgentSchema,
36
36
  init_types4
37
- } from "./cli-hfkwwy1h.js";
37
+ } from "./cli-2zp0et3v.js";
38
38
  import {
39
39
  poolCacheKey,
40
40
  init_types5
@@ -3,7 +3,7 @@ import {
3
3
  upsertKv2,
4
4
  deleteKv2,
5
5
  init_db4
6
- } from "./cli-j7d73g1y.js";
6
+ } from "./cli-h38x262p.js";
7
7
  import {
8
8
  isEnvFlagEnabled,
9
9
  init_env_flag
@@ -16,6 +16,11 @@ import {
16
16
  isPoolAffinityEnforcementEnabled2,
17
17
  buildRoutingAffinityFromAgent2,
18
18
  isAgentEligibleForTask2,
19
+ poolTaskRunsOnHarness,
20
+ init_model_validation2,
21
+ runtimeReadsRepoSecrets,
22
+ checkProfileForAgent,
23
+ init_model_profile_check,
19
24
  rowToAgentTask,
20
25
  getTaskById2,
21
26
  hasNonTerminalResumeChild2,
@@ -65,27 +70,25 @@ import {
65
70
  getStaleApprovalRequests2,
66
71
  upsertKv2,
67
72
  init_db4
68
- } from "./cli-j7d73g1y.js";
73
+ } from "./cli-h38x262p.js";
69
74
  import {
70
75
  listRuntimePools2,
71
76
  init_db2
72
- } from "./cli-xd5ebp64.js";
77
+ } from "./cli-8kzasymh.js";
73
78
  import {
74
79
  userHoldsOperatorGrantedRole2,
75
80
  assertMayActOnOperatorGrantedTarget2,
76
81
  init_rbac_roles
77
- } from "./cli-yz7v0sh4.js";
82
+ } from "./cli-c55z5chy.js";
78
83
  import {
79
84
  remediateStalledRuntime
80
- } from "./cli-38yww4e9.js";
85
+ } from "./cli-6wxjceza.js";
81
86
  import {
82
87
  repointTrackerSyncBySwarmId,
83
88
  init_tracker,
84
89
  isRuntimePoolWakeable,
85
90
  isAgentReachable,
86
91
  init_reachability,
87
- poolTaskRunsOnHarness,
88
- init_model_validation,
89
92
  recoverIncompleteRuns,
90
93
  init_recovery,
91
94
  getExecutorRegistry2,
@@ -107,22 +110,23 @@ import {
107
110
  init_approval_cancel,
108
111
  canClaim,
109
112
  init_budget_admission
110
- } from "./cli-7wz05bx3.js";
113
+ } from "./cli-rfywm85n.js";
111
114
  import {
112
115
  runScriptWithRunCredential,
113
116
  init_run_credential,
114
117
  runSavedScriptAsAgent,
115
118
  init_run_saved
116
- } from "./cli-zjphdj1a.js";
119
+ } from "./cli-j790gp2w.js";
117
120
  import {
118
121
  runtimeStaleThresholdMinutes,
119
122
  countActiveRuntimeInstancesForAgent,
120
123
  agentsWithLiveRuntime,
124
+ liveRuntimeAuthModes,
121
125
  expireStaleRuntimeInstances,
122
126
  init_multi_runtime,
123
127
  createApprovalFollowUpTask,
124
128
  init_approval_notifications
125
- } from "./cli-xncjscpm.js";
129
+ } from "./cli-qfedvmcr.js";
126
130
  import {
127
131
  isMultiRuntimeEnabled,
128
132
  init_multi_runtime2
@@ -131,13 +135,13 @@ import {
131
135
  recordIdentityEvent,
132
136
  mintToken,
133
137
  init_users
134
- } from "./cli-g1px1g2e.js";
138
+ } from "./cli-gxkx0zzp.js";
135
139
  import {
136
140
  TERMINAL_TASK_STATUSES,
137
141
  OPEN_TASK_STATUSES,
138
142
  SUPERSEDED_WORKFLOW_TASK_REASON,
139
143
  init_types4
140
- } from "./cli-hfkwwy1h.js";
144
+ } from "./cli-2zp0et3v.js";
141
145
  import {
142
146
  DEFAULT_OPENROUTER_BASE_URL,
143
147
  getOpenRouterBaseUrl,
@@ -148,11 +152,11 @@ import {
148
152
  init_registry3,
149
153
  resolveTemplate,
150
154
  init_resolver
151
- } from "./cli-kf3pxxdg.js";
155
+ } from "./cli-v1dv1r37.js";
152
156
  import {
153
157
  init_package,
154
158
  package_default
155
- } from "./cli-rt0ag4x1.js";
159
+ } from "./cli-334z18y3.js";
156
160
  import {
157
161
  isEnvFlagEnabled,
158
162
  init_env_flag
@@ -170,7 +174,8 @@ init_event_bus();
170
174
  init_budget_admission();
171
175
  init_db4();
172
176
  init_read();
173
- init_model_validation();
177
+ init_model_profile_check();
178
+ init_model_validation2();
174
179
  init_multi_runtime();
175
180
  init_db2();
176
181
  init_reachability();
@@ -276,7 +281,42 @@ async function routePoolTasks(opts = {}) {
276
281
  }
277
282
  return (agent.maxTasks ?? 1) - count;
278
283
  };
279
- const eligible = async (agent, task) => await headroom(agent) > 0 && isAgentEligibleForTask2(agent, task) && await poolTaskRunsOnHarness(task, agent.harnessProvider ?? agent.provider ?? null);
284
+ const runtimeAuthModes = withLiveRuntime === null ? null : await liveRuntimeAuthModes();
285
+ const secretViews = (agent, viaWake) => {
286
+ if (runtimeAuthModes === null)
287
+ return [true];
288
+ const tokenView = runtimeReadsRepoSecrets(agent);
289
+ const views = (runtimeAuthModes.get(agent.id) ?? []).map((runtimeToken) => runtimeToken ? tokenView : true);
290
+ if (viaWake || !views.length)
291
+ views.push(tokenView);
292
+ return [...new Set(views)];
293
+ };
294
+ const profileOk = new Map;
295
+ const passesProfileCheck = async (agent, task, viaWake) => {
296
+ if (!task.profile)
297
+ return true;
298
+ for (const includeRepoSecrets of secretViews(agent, viaWake)) {
299
+ const memoKey = JSON.stringify([
300
+ agent.id,
301
+ task.profile,
302
+ task.vcsRepo ?? null,
303
+ includeRepoSecrets
304
+ ]);
305
+ let ok = profileOk.get(memoKey);
306
+ if (ok === undefined) {
307
+ const result = await checkProfileForAgent(agent.id, task.profile, {
308
+ vcsRepo: task.vcsRepo,
309
+ includeRepoSecrets
310
+ });
311
+ ok = result?.ok !== false;
312
+ profileOk.set(memoKey, ok);
313
+ }
314
+ if (!ok)
315
+ return false;
316
+ }
317
+ return true;
318
+ };
319
+ const eligible = async (agent, task, viaWake = false) => await headroom(agent) > 0 && isAgentEligibleForTask2(agent, task) && await poolTaskRunsOnHarness(task, agent.harnessProvider ?? agent.provider ?? null) && await passesProfileCheck(agent, task, viaWake);
280
320
  const assigned = [];
281
321
  const limit = nonnegativeEnv("HEARTBEAT_MAX_AUTO_ASSIGN", 5);
282
322
  const batchSize = Number(process.env.HEARTBEAT_POOL_SCAN_BATCH_SIZE) || 50;
@@ -302,7 +342,7 @@ async function routePoolTasks(opts = {}) {
302
342
  if (!worker && enabled && now.getTime() - Date.parse(task.createdAt) >= nonnegativeEnv("RUNTIME_WAKE_GRACE_SEC", 15) * 1000) {
303
343
  const candidates = [];
304
344
  for (const agent of wake) {
305
- if (await eligible(agent, task))
345
+ if (await eligible(agent, task, true))
306
346
  candidates.push({ agent, headroom: await headroom(agent) });
307
347
  }
308
348
  candidates.sort((a, b) => b.headroom - a.headroom || a.agent.name.localeCompare(b.agent.name));
@@ -530,7 +570,7 @@ async function deleteExpiredConnectorCodes(now = new Date) {
530
570
  init_db4();
531
571
  init_tracker();
532
572
  init_event_loop_lag();
533
- init_model_validation();
573
+ init_model_validation2();
534
574
  init_multi_runtime();
535
575
  init_reachability();
536
576
  init_db3();
@@ -698,8 +738,12 @@ var SKIP_AUTO_RESUME_TYPES = new Set([
698
738
  "heartbeat",
699
739
  "reroute-decision"
700
740
  ]);
741
+ function parseHeartbeatIntervalMs2(raw) {
742
+ const value = Number(raw);
743
+ return Number.isInteger(value) && value > 0 ? value : 90000;
744
+ }
701
745
  function defaultIntervalMs() {
702
- return Number(process.env.HEARTBEAT_INTERVAL_MS) || 90000;
746
+ return parseHeartbeatIntervalMs2(process.env.HEARTBEAT_INTERVAL_MS);
703
747
  }
704
748
  function stallThresholdMinutes() {
705
749
  return Number(process.env.HEARTBEAT_STALL_THRESHOLD_MIN) || 30;
@@ -1901,4 +1945,4 @@ function stopHeartbeatChecklist() {
1901
1945
  }
1902
1946
  }
1903
1947
 
1904
- export { startPoolRouting, stopPoolRouting, INVITE_CODE_TTL_MS, DEFAULT_CONNECTOR_CODE_LABEL, DEFAULT_INVITE_CODE_LABEL, createConnectorCode, exchangeConnectorCode, deleteUnusedInviteCodes, remediateTaskForDeadRuntime2, getBootEpochMs2, runRebootSweep2, getRebootAffectedTasks2, checkHeartbeatChecklist2, runHeartbeatSweep2, startHeartbeat2, stopHeartbeat2 };
1948
+ export { startPoolRouting, stopPoolRouting, INVITE_CODE_TTL_MS, DEFAULT_CONNECTOR_CODE_LABEL, DEFAULT_INVITE_CODE_LABEL, createConnectorCode, exchangeConnectorCode, deleteUnusedInviteCodes, parseHeartbeatIntervalMs2, remediateTaskForDeadRuntime2, getBootEpochMs2, runRebootSweep2, getRebootAffectedTasks2, checkHeartbeatChecklist2, runHeartbeatSweep2, startHeartbeat2, stopHeartbeat2 };
@@ -148,7 +148,7 @@ import {
148
148
  Instantiate,
149
149
  Evaluate2,
150
150
  Priority
151
- } from "./cli-w3bk0dgv.js";
151
+ } from "./cli-8aes17e4.js";
152
152
  import {
153
153
  require_index_min
154
154
  } from "./cli-t9wbrgm4.js";
@@ -193,7 +193,7 @@ import {
193
193
  streamSimple2,
194
194
  completeSimple,
195
195
  init_compat
196
- } from "./cli-4vwxp550.js";
196
+ } from "./cli-x1wa213s.js";
197
197
  import {
198
198
  cleanupSessionResources,
199
199
  uuidv7
@@ -59445,7 +59445,7 @@ function loadAllHighlightLanguages() {
59445
59445
  if (!allLanguagesPromise) {
59446
59446
  allLanguagesPromise = new Promise((resolve) => {
59447
59447
  setImmediate(() => {
59448
- import("./index-s72rqgsx.js").then((m)=>__toESM(m.default,1)).then(() => resolve(), () => {
59448
+ import("./index-tvfafeyy.js").then((m)=>__toESM(m.default,1)).then(() => resolve(), () => {
59449
59449
  resolve();
59450
59450
  });
59451
59451
  });
@@ -65717,7 +65717,7 @@ function getCreateJiti() {
65717
65717
  }
65718
65718
  var virtualModulesPromise;
65719
65719
  function getVirtualModules() {
65720
- virtualModulesPromise ??= import("./virtual-modules-pjj0knwf.js").then((module) => module.VIRTUAL_MODULES);
65720
+ virtualModulesPromise ??= import("./virtual-modules-gazyapte.js").then((module) => module.VIRTUAL_MODULES);
65721
65721
  return virtualModulesPromise;
65722
65722
  }
65723
65723
  var _aliases = null;
@@ -89500,7 +89500,7 @@ function parseCodemodeSource(input) {
89500
89500
  }
89501
89501
 
89502
89502
  // node_modules/@earendil-works/pi-coding-agent/dist/extensions/codemode/execute.lazy.js
89503
- var loadCodemodeExecutor = () => import("./execute-3cbg0twf.js");
89503
+ var loadCodemodeExecutor = () => import("./execute-b3mrb1mv.js");
89504
89504
 
89505
89505
  // node_modules/@earendil-works/pi-coding-agent/dist/extensions/codemode/renderer.js
89506
89506
  var CODE_PREVIEW_LINES = 10;
@@ -90701,7 +90701,7 @@ function createMcpResourceToolDefinitions(options) {
90701
90701
  }
90702
90702
 
90703
90703
  // node_modules/@earendil-works/pi-coding-agent/dist/extensions/mcp/runtime.lazy.js
90704
- var loadMcpRuntime = () => import("./runtime-khxszyfp.js");
90704
+ var loadMcpRuntime = () => import("./runtime-1hv06jsn.js");
90705
90705
 
90706
90706
  // node_modules/@earendil-works/pi-coding-agent/dist/utils/clipboard.js
90707
90707
  import { randomUUID as randomUUID3 } from "node:crypto";
@@ -95891,7 +95891,7 @@ var builtInExtensions = [
95891
95891
  ];
95892
95892
 
95893
95893
  // node_modules/@earendil-works/pi-coding-agent/dist/extensions/mcp/cli.lazy.js
95894
- var loadMcpCommand = () => import("./cli-5wfz00be.js");
95894
+ var loadMcpCommand = () => import("./cli-0jzra9ad.js");
95895
95895
 
95896
95896
  // node_modules/@earendil-works/pi-coding-agent/dist/migrations.js
95897
95897
  import { existsSync as existsSync22, mkdirSync as mkdirSync11, readdirSync as readdirSync10, readFileSync as readFileSync17, renameSync as renameSync2, rmSync as rmSync3, writeFileSync as writeFileSync11 } from "fs";
@@ -98455,7 +98455,7 @@ function playEasterEgg3d(tui, egg) {
98455
98455
  if (tui.hasOverlay())
98456
98456
  return true;
98457
98457
  const screen = tui.getScreenLines();
98458
- import("./easter-egg-3d-e36hk5td.js").then((module) => module.playEasterEgg3d(tui, screen, egg), () => {});
98458
+ import("./easter-egg-3d-533knw22.js").then((module) => module.playEasterEgg3d(tui, screen, egg), () => {});
98459
98459
  return true;
98460
98460
  }
98461
98461
  function playPiLogo3d(tui, column, row) {
@@ -3,19 +3,17 @@ import {
3
3
  init_db_client,
4
4
  getDb2,
5
5
  getDbClient2,
6
+ PermissionVerbSchema,
7
+ init_rbac,
6
8
  invalidateTelemetryUserRole,
7
9
  init_telemetry_identity,
8
10
  init_db4
9
- } from "./cli-j7d73g1y.js";
10
- import {
11
- PermissionVerbSchema,
12
- init_rbac
13
- } from "./cli-cyn9v8zr.js";
11
+ } from "./cli-h38x262p.js";
14
12
  import {
15
13
  revokeAllUserCredentials,
16
14
  isLiveUserToken,
17
15
  init_users
18
- } from "./cli-g1px1g2e.js";
16
+ } from "./cli-gxkx0zzp.js";
19
17
  import {
20
18
  init_env_flag
21
19
  } from "./cli-cebvbc9t.js";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  init_package,
3
3
  package_default
4
- } from "./cli-rt0ag4x1.js";
4
+ } from "./cli-334z18y3.js";
5
5
 
6
6
  // src/commands/shared/client-config.ts
7
7
  init_package();
@@ -5,12 +5,12 @@ import {
5
5
  import {
6
6
  publicEndpointSsrfOptions,
7
7
  init_mcp_wrapper
8
- } from "./cli-0m7rtm11.js";
8
+ } from "./cli-s7t6p9my.js";
9
9
  import {
10
10
  normalizeOrgWebsite,
11
11
  init_org_website,
12
12
  assertUrlSafe
13
- } from "./cli-j7d73g1y.js";
13
+ } from "./cli-h38x262p.js";
14
14
  import {
15
15
  getOpenRouterBaseUrl,
16
16
  getOpenRouterAttributionHeaders,
@@ -21,7 +21,7 @@ import {
21
21
  createScopedFetch,
22
22
  deriveDefaultRoute,
23
23
  init_src
24
- } from "./cli-xfjrc279.js";
24
+ } from "./cli-5mrq3ake.js";
25
25
  import {
26
26
  providerBaseUrl,
27
27
  providerForKeyVar,