@desplega.ai/agent-swarm 1.158.0 → 1.159.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 (272) hide show
  1. package/dist/{acp-adapter-xaq4n6pc.js → acp-adapter-qhch0n2v.js} +1 -1
  2. package/dist/{actions-p9hz5yat.js → actions-dtsh1mfb.js} +33 -29
  3. package/dist/{anthropic-messages-51pz26qe.js → anthropic-messages-f2h06k64.js} +8 -3
  4. package/dist/{app-g26wdcz6.js → app-y1b9srva.js} +10 -9
  5. package/dist/{assistant-wydfqkb3.js → assistant-31hwy5xj.js} +34 -30
  6. package/dist/{azure-openai-responses-8gksqtmz.js → azure-openai-responses-0k1mfax5.js} +12 -13
  7. package/dist/{boot-reembed-se8zmdcp.js → boot-reembed-48d2qpkt.js} +11 -11
  8. package/dist/{boot-reembed-g5ckg9yb.js → boot-reembed-w0bryhkr.js} +12 -12
  9. package/dist/{boot-scrub-logs-wfxqan61.js → boot-scrub-logs-t65wbrn7.js} +9 -8
  10. package/dist/{boot-seeds-s3q01xj3.js → boot-seeds-h7c32hvm.js} +12 -11
  11. package/dist/{claude-adapter-tv2x4f36.js → claude-adapter-1t6611ne.js} +26 -21
  12. package/dist/{claude-managed-adapter-41b2s7fd.js → claude-managed-adapter-werp659j.js} +4 -2
  13. package/dist/{claude-managed-setup-60g8aazx.js → claude-managed-setup-y6rdgbc1.js} +11 -2
  14. package/dist/claude-sdk-session-zhkyk8yw.js +29319 -0
  15. package/dist/{cli-vj6h9kc2.js → cli-0m7wct0d.js} +59 -1
  16. package/dist/{cli-wscdvcqz.js → cli-0n2e4x49.js} +1 -1
  17. package/dist/cli-0xqde53b.js +176 -0
  18. package/dist/{cli-xberxa1r.js → cli-10ym38qc.js} +2 -2
  19. package/dist/{cli-5b6b62tz.js → cli-13hw4z91.js} +1 -1
  20. package/dist/{cli-rqz8qbw7.js → cli-20035trh.js} +50 -18
  21. package/dist/{cli-k0g1sjzm.js → cli-31nkw3g3.js} +3 -3
  22. package/dist/cli-3gvrr8vj.js +1422 -0
  23. package/dist/{cli-c07r9a2m.js → cli-48527fpw.js} +9 -8
  24. package/dist/{cli-24k806sc.js → cli-4aj25szq.js} +2 -2
  25. package/dist/{cli-7gtvvpbh.js → cli-4tvgz99m.js} +7 -7
  26. package/dist/cli-503ya656.js +455 -0
  27. package/dist/{cli-cw9zck8j.js → cli-5f2hq128.js} +8 -4
  28. package/dist/{cli-s8eet254.js → cli-68bmme5p.js} +11078 -27833
  29. package/dist/{cli-ftfvggzx.js → cli-79aq9cgb.js} +794 -563
  30. package/dist/cli-7cxw8b60.js +14910 -0
  31. package/dist/cli-7kyk9jr3.js +22 -0
  32. package/dist/cli-7zttzetj.js +324 -0
  33. package/dist/{cli-y95wp3tg.js → cli-96qd5psa.js} +1 -1
  34. package/dist/{cli-g8djp6qe.js → cli-9yg65c1j.js} +22 -0
  35. package/dist/{cli-3gmcwfyx.js → cli-ardpzhjm.js} +5 -5
  36. package/dist/{cli-7s3syk22.js → cli-b6thtzac.js} +5 -5
  37. package/dist/{cli-00w2c66p.js → cli-bgv70kym.js} +13 -2
  38. package/dist/{cli-j55n64b6.js → cli-bv0a38v9.js} +163 -44
  39. package/dist/cli-ca2w7zv7.js +115 -0
  40. package/dist/cli-cpvsaqsw.js +333 -0
  41. package/dist/cli-cygyqj3b.js +754 -0
  42. package/dist/{cli-x24pshtq.js → cli-dvjpkkjd.js} +6 -6
  43. package/dist/{cli-5d10vd2m.js → cli-e0ndxhtk.js} +4 -4
  44. package/dist/{cli-4198qc9v.js → cli-e4xnc0qp.js} +15 -3
  45. package/dist/{cli-rjehvrts.js → cli-eg7cdg68.js} +8 -8
  46. package/dist/cli-ejpygnqz.js +3815 -0
  47. package/dist/{cli-fgqxwrpv.js → cli-fjtp3463.js} +1631 -127
  48. package/dist/{cli-zt1227k1.js → cli-fkqhbg8g.js} +5 -3
  49. package/dist/{cli-47m6dkd3.js → cli-g9df2m37.js} +409 -168
  50. package/dist/cli-gzyh0j0g.js +8455 -0
  51. package/dist/cli-hgqfttfc.js +183 -0
  52. package/dist/cli-hj65wsts.js +17755 -0
  53. package/dist/cli-j9z8mfx3.js +476 -0
  54. package/dist/{cli-aehm1rbq.js → cli-kc3dp84d.js} +1135 -61
  55. package/dist/{cli-h38x0qhg.js → cli-kdnehe0t.js} +4 -3
  56. package/dist/{cli-20cj37vt.js → cli-m4excttz.js} +136 -2216
  57. package/dist/{cli-8qmme6vd.js → cli-mg24hkt4.js} +2 -2
  58. package/dist/{cli-xhaeg2nc.js → cli-mzkqpxee.js} +1 -1
  59. package/dist/{cli-q67y4wzm.js → cli-phsaj4xq.js} +24 -2
  60. package/dist/{cli-pw9rj5t9.js → cli-pqetb83f.js} +1 -176
  61. package/dist/{cli-rj19hc34.js → cli-qjxy52w7.js} +1 -1
  62. package/dist/{cli-53sz8gkz.js → cli-qv4jv8bx.js} +1 -1
  63. package/dist/cli-qvnnx4ct.js +1051 -0
  64. package/dist/cli-rb9m6rpe.js +4980 -0
  65. package/dist/{cli-tt9k8r35.js → cli-rfezr056.js} +476 -909
  66. package/dist/{cli-ggm92wcn.js → cli-rgjprct3.js} +1 -0
  67. package/dist/{cli-9httdpyq.js → cli-rrqmqr1s.js} +1 -1
  68. package/dist/cli-rykfmgwg.js +102 -0
  69. package/dist/{cli-eetrvv91.js → cli-t3p77qk1.js} +1 -1
  70. package/dist/{cli-68w09sjw.js → cli-vn0qv9cj.js} +25 -88
  71. package/dist/{cli-987hg0aa.js → cli-vwbbaecp.js} +2 -2
  72. package/dist/cli-wd9hz40d.js +69 -0
  73. package/dist/{cli-j57qkrpq.js → cli-wgjx0q33.js} +13 -13
  74. package/dist/cli-xgpf00sk.js +2149 -0
  75. package/dist/{cli-mcnhgnn1.js → cli-ykk5jaax.js} +184 -26
  76. package/dist/{cli-aky8tctm.js → cli-z9x0sh1t.js} +3 -3
  77. package/dist/{cli-1hkrch3k.js → cli-zw65mab6.js} +5 -5
  78. package/dist/cli.js +38 -29
  79. package/dist/cloudflare-workers-ai-system-one-1sg586qv.js +46 -0
  80. package/dist/{codex-adapter-cnm8wk11.js → codex-adapter-jqfqqa21.js} +21 -14
  81. package/dist/{codex-hook-9hptmdhj.js → codex-hook-5eys3dya.js} +2 -2
  82. package/dist/{codex-session-runner-gfg547zj.js → codex-session-runner-zd341dsm.js} +21 -14
  83. package/dist/{commands-e3bn0p75.js → commands-vfsysz4s.js} +9 -8
  84. package/dist/{db-03v9kzr2.js → db-s3znhvbn.js} +15 -10
  85. package/dist/{dispatcher-nrmg8yht.js → dispatcher-5xn0c7rf.js} +32 -28
  86. package/dist/{dsh-adapter-k03nfqa6.js → dsh-adapter-894mgfvs.js} +3 -3
  87. package/dist/{e2b-93x1k0j5.js → e2b-ez07znam.js} +4 -3
  88. package/dist/execute-71ysgv35.js +965 -0
  89. package/dist/{google-generative-ai-bxmv50nc.js → google-generative-ai-1nfcdphp.js} +5 -4
  90. package/dist/{google-vertex-809af514.js → google-vertex-1tqcd7b1.js} +5 -4
  91. package/dist/{handlers-aqcedbyb.js → handlers-5w4jwycr.js} +35 -31
  92. package/dist/{hook-7vkskkre.js → hook-853bxrr6.js} +16 -13
  93. package/dist/{hook-ybvmrmhq.js → hook-z0hbxj85.js} +16 -13
  94. package/dist/{http-2eqa8t24.js → http-akc3wy3m.js} +600 -123
  95. package/dist/{index-f6cryxwe.js → index-4a5njnm1.js} +2 -59
  96. package/dist/{index-a3vn96n8.js → index-5sz16ksh.js} +187 -47
  97. package/dist/{index-c6zsv1bd.js → index-bjmjh9h4.js} +11 -11
  98. package/dist/{index-chgdkq36.js → index-cd151qkq.js} +32 -28
  99. package/dist/{index-x71bvq0p.js → index-k661dzzr.js} +33 -29
  100. package/dist/{index-1yks3qcr.js → index-ttpbhnjg.js} +32 -28
  101. package/dist/{keepalive-vtkf5n99.js → keepalive-8p9rpvz5.js} +11 -10
  102. package/dist/{lead-h3sp357x.js → lead-jp69z5h3.js} +49 -45
  103. package/dist/llama-cpp-classify-t2tccams.js +335 -0
  104. package/dist/{maintenance-jzeqtk3q.js → maintenance-fwx4ev0k.js} +12 -12
  105. package/dist/{mistral-conversations-zx0kn554.js → mistral-conversations-bhvwqcnk.js} +14 -17
  106. package/dist/{oauth-refresh-sweep-qp3dzmdp.js → oauth-refresh-sweep-cwcq1ctx.js} +10 -9
  107. package/dist/{onboard-tmsp0qbz.js → onboard-2b4q0t84.js} +6 -5
  108. package/dist/{openai-codex-responses-4vjqzvjp.js → openai-codex-responses-nekthgks.js} +21 -8
  109. package/dist/{openai-completions-9hjrqbw8.js → openai-completions-hxtzwj0s.js} +8 -11
  110. package/dist/{openai-responses-7b1pn0xt.js → openai-responses-w4r118w7.js} +22 -17
  111. package/dist/{opencode-adapter-x6x2da1z.js → opencode-adapter-zz7xvjj6.js} +6 -4
  112. package/dist/{openrouter-images-9f9ek4rw.js → openrouter-images-b6sqqjgn.js} +4 -6
  113. package/dist/{otel-impl-9mz73q65.js → otel-impl-g8rs4vwr.js} +1 -1
  114. package/dist/{pi-messages-txpjj39q.js → pi-messages-vxdt8v7j.js} +2 -1
  115. package/dist/{pi-mono-adapter-m6dvv0dz.js → pi-mono-adapter-n0me28wt.js} +29 -17
  116. package/dist/pricing-refresh-0v77385v.js +39 -0
  117. package/dist/{rbac-roles-c9wqz83x.js → rbac-roles-krjyazbj.js} +10 -9
  118. package/dist/{render-v2-gryrh9h8.js → render-v2-3wjsp9aw.js} +10 -9
  119. package/dist/runtime-ktjysacx.js +24 -0
  120. package/dist/{setup-q9720bt6.js → setup-yeqryke6.js} +6 -5
  121. package/dist/typesafe-system-one-96960jxp.js +27 -0
  122. package/dist/{virtual-modules-3htpgn8x.js → virtual-modules-dzdeq1sf.js} +21 -13
  123. package/dist/{work-objects-b76x7deb.js → work-objects-3pakpkw0.js} +35 -31
  124. package/dist/{worker-6vrxbv41.js → worker-85testgj.js} +49 -45
  125. package/openapi.json +863 -14
  126. package/package.json +9 -8
  127. package/src/be/db/agents.ts +20 -0
  128. package/src/be/db/tasks/human-free.ts +442 -0
  129. package/src/be/db/tasks/read.ts +56 -1
  130. package/src/be/db/tasks/write.ts +107 -11
  131. package/src/be/db.ts +89 -165
  132. package/src/be/harness-model-support.ts +182 -0
  133. package/src/be/human-free-drain.ts +67 -0
  134. package/src/be/migrations/182_task_human_free_flag.sql +63 -0
  135. package/src/be/migrations/183_human_free_reclassify_queue.sql +25 -0
  136. package/src/be/migrations/184_model_catalog.sql +120 -0
  137. package/src/be/model-catalog-store.ts +644 -0
  138. package/src/be/model-tier-keys.ts +31 -0
  139. package/src/be/model-tier-resolution.ts +489 -0
  140. package/src/be/model-validation.ts +112 -0
  141. package/src/be/models-catalog.ts +61 -7
  142. package/src/be/modelsdev-cache.json +82 -0
  143. package/src/be/modelsdev-cache.ts +2 -0
  144. package/src/be/pricing-refresh.ts +154 -12
  145. package/src/be/scripts/typecheck.ts +15 -0
  146. package/src/be/seed-scripts/catalog/task-failure-audit.ts +61 -9
  147. package/src/be/swarm-config-guard.ts +6 -0
  148. package/src/cli.tsx +10 -0
  149. package/src/commands/claude-managed-setup.ts +3 -1
  150. package/src/commands/runner.ts +76 -2
  151. package/src/extensions/contract-types.generated.ts +1 -1
  152. package/src/heartbeat/heartbeat.ts +64 -15
  153. package/src/heartbeat/templates.ts +2 -2
  154. package/src/http/agents.ts +49 -1
  155. package/src/http/index.ts +8 -0
  156. package/src/http/models-catalog.ts +357 -8
  157. package/src/http/poll.ts +45 -2
  158. package/src/http/schedules.ts +36 -6
  159. package/src/http/session-data.ts +2 -5
  160. package/src/http/stats.ts +6 -8
  161. package/src/http/tasks.ts +26 -1
  162. package/src/http/usage-cache.ts +56 -15
  163. package/src/http/workflows.ts +35 -8
  164. package/src/prompts/session-templates.ts +1 -0
  165. package/src/providers/claude-managed-models.ts +47 -161
  166. package/src/providers/codex-adapter.ts +4 -4
  167. package/src/providers/codex-models.ts +65 -198
  168. package/src/providers/reasoning-effort.ts +44 -140
  169. package/src/rbac/legacy-policy.ts +25 -0
  170. package/src/rbac/permissions.ts +10 -0
  171. package/src/scripts-runtime/sdk-allowlist.ts +4 -0
  172. package/src/scripts-runtime/types/stdlib.d.ts +15 -0
  173. package/src/scripts-runtime/types/swarm-extension.d.ts +3 -0
  174. package/src/scripts-runtime/types/swarm-sdk.d.ts +15 -0
  175. package/src/server.ts +6 -0
  176. package/src/slack/message-text.ts +56 -2
  177. package/src/slack/thread-buffer.ts +10 -2
  178. package/src/tests/agents-list-model-display.test.ts +4 -6
  179. package/src/tests/base-prompt.test.ts +3 -0
  180. package/src/tests/claude-adapter.test.ts +10 -0
  181. package/src/tests/claude-managed-adapter.test.ts +12 -18
  182. package/src/tests/codex-adapter.test.ts +2 -1
  183. package/src/tests/codex-gpt6-release.test.ts +66 -5
  184. package/src/tests/context-window.test.ts +7 -5
  185. package/src/tests/db-extraction-contract.test.ts +1 -0
  186. package/src/tests/db-task-read-contract.test.ts +5 -1
  187. package/src/tests/db-task-write-contract.test.ts +4 -1
  188. package/src/tests/docs-index-footprint.test.js +3 -3
  189. package/src/tests/explicit-model-validation.test.ts +332 -0
  190. package/src/tests/harness-model-support.test.ts +374 -0
  191. package/src/tests/heartbeat-checklist-config.test.ts +71 -0
  192. package/src/tests/heartbeat-checklist.test.ts +4 -2
  193. package/src/tests/heartbeat-orphan-resume.test.ts +48 -0
  194. package/src/tests/human-free-flag.test.ts +279 -0
  195. package/src/tests/human-free-oracle.ts +57 -0
  196. package/src/tests/human-free-reclassify.test.ts +669 -0
  197. package/src/tests/migration-046-budgets.test.ts +3 -3
  198. package/src/tests/model-catalog-migration.test.ts +134 -0
  199. package/src/tests/model-catalog-table.test.ts +249 -0
  200. package/src/tests/model-catalog-write-access.test.ts +387 -0
  201. package/src/tests/model-tier-resolution.test.ts +519 -0
  202. package/src/tests/models-catalog.test.ts +1 -1
  203. package/src/tests/multi-runtime-enabled-stats.test.ts +65 -1
  204. package/src/tests/package-publish.test.ts +137 -36
  205. package/src/tests/pricing-routes.test.ts +2 -2
  206. package/src/tests/rbac-engine.test.ts +42 -2
  207. package/src/tests/reasoning-effort.test.ts +109 -0
  208. package/src/tests/refresh-modelsdev-carryforward.test.ts +5 -5
  209. package/src/tests/runtime-model-catalog.test.ts +86 -0
  210. package/src/tests/script-connections.test.ts +5 -0
  211. package/src/tests/seed-scripts.test.ts +89 -0
  212. package/src/tests/session-costs.test.ts +14 -11
  213. package/src/tests/slack-message-text.test.ts +101 -0
  214. package/src/tests/slack-thread-buffer-context.test.ts +93 -0
  215. package/src/tests/task-cascade-fail.test.ts +148 -2
  216. package/src/tests/tool-annotations.test.ts +1 -1
  217. package/src/tests/usage-cache.test.ts +166 -0
  218. package/src/tests/workflow-executors.test.ts +5 -2
  219. package/src/tests/workflow-system-one-decision-review.test.ts +1021 -0
  220. package/src/tests/workflow-system-one-decision-save-warnings.test.ts +365 -0
  221. package/src/tests/workflow-system-one-decision.test.ts +2063 -0
  222. package/src/tools/model-catalog/index.ts +137 -0
  223. package/src/tools/schedules/create-schedule.ts +16 -1
  224. package/src/tools/schedules/patch-schedule.ts +17 -0
  225. package/src/tools/schedules/update-schedule.ts +17 -0
  226. package/src/tools/send-task.ts +14 -0
  227. package/src/tools/task-action.ts +12 -0
  228. package/src/tools/tool-config.ts +3 -1
  229. package/src/tools/workflows/create-workflow.ts +9 -2
  230. package/src/tools/workflows/patch-workflow-node.ts +17 -7
  231. package/src/tools/workflows/patch-workflow.ts +9 -2
  232. package/src/tools/workflows/update-workflow.ts +9 -2
  233. package/src/types.ts +30 -1
  234. package/src/utils/context-window.ts +47 -53
  235. package/src/utils/harness-cli-version.ts +115 -0
  236. package/src/utils/harness-model-error.ts +33 -0
  237. package/src/utils/runtime-model-catalog.ts +137 -0
  238. package/src/workflows/approval-resolution.ts +39 -0
  239. package/src/workflows/definition.ts +7 -0
  240. package/src/workflows/engine.ts +69 -1
  241. package/src/workflows/executors/agent-task.ts +9 -0
  242. package/src/workflows/executors/base.ts +53 -0
  243. package/src/workflows/executors/human-in-the-loop.ts +8 -8
  244. package/src/workflows/executors/index.ts +1 -0
  245. package/src/workflows/executors/registry.ts +2 -0
  246. package/src/workflows/executors/system-one-decision.ts +1232 -0
  247. package/src/workflows/executors/system-one-providers.ts +301 -0
  248. package/src/workflows/executors/workflow-llm.ts +13 -1
  249. package/src/workflows/readiness.ts +86 -0
  250. package/src/workflows/recovery.ts +12 -12
  251. package/src/workflows/resume.ts +23 -9
  252. package/templates/schedules/daily-blocker-digest/content.md +4 -5
  253. package/templates/skills/agent-browser/SKILL.md +6 -5
  254. package/templates/skills/agent-browser/content.md +6 -5
  255. package/templates/skills/heartbeat-runbook/config.json +1 -1
  256. package/templates/skills/heartbeat-runbook/content.md +2 -2
  257. package/templates/skills/swarm-scripts/SKILL.md +1 -1
  258. package/templates/skills/swarm-scripts/content.md +1 -1
  259. package/templates/skills/workflow-iterate/content.md +81 -1
  260. package/templates/workflows/claude-code-changelog-watch/content.md +2 -0
  261. package/templates/workflows/pr-review-status-sweep/content.md +2 -0
  262. package/dist/claude-sdk-session-t442qz6f.js +0 -39108
  263. package/dist/cli-0xjkj1j7.js +0 -61
  264. package/dist/cli-65hjmev5.js +0 -1141
  265. package/dist/cli-aw1jwp1r.js +0 -14075
  266. package/dist/cli-h967nb6r.js +0 -6603
  267. package/dist/cli-vapyk8sw.js +0 -20
  268. package/dist/cli-ws6rqycm.js +0 -247
  269. package/dist/pricing-refresh-v1cbr9te.js +0 -27
  270. package/src/providers/modelsdev-reasoning.json +0 -6453
  271. package/dist/{codex-login-x3jk4etn.js → codex-login-he9vrn90.js} +3 -3
  272. package/dist/{index-f24115ge.js → index-2wsdsnmm.js} +3 -3
@@ -3594,6 +3594,64 @@ var require_javascript = __commonJS(function(exports, module) {
3594
3594
  module.exports = javascript;
3595
3595
  });
3596
3596
 
3597
+ // node_modules/highlight.js/lib/languages/json.js
3598
+ var require_json = __commonJS(function(exports, module) {
3599
+ function json(hljs) {
3600
+ const LITERALS = {
3601
+ literal: "true false null"
3602
+ };
3603
+ const ALLOWED_COMMENTS = [
3604
+ hljs.C_LINE_COMMENT_MODE,
3605
+ hljs.C_BLOCK_COMMENT_MODE
3606
+ ];
3607
+ const TYPES = [
3608
+ hljs.QUOTE_STRING_MODE,
3609
+ hljs.C_NUMBER_MODE
3610
+ ];
3611
+ const VALUE_CONTAINER = {
3612
+ end: ",",
3613
+ endsWithParent: true,
3614
+ excludeEnd: true,
3615
+ contains: TYPES,
3616
+ keywords: LITERALS
3617
+ };
3618
+ const OBJECT = {
3619
+ begin: /\{/,
3620
+ end: /\}/,
3621
+ contains: [
3622
+ {
3623
+ className: "attr",
3624
+ begin: /"/,
3625
+ end: /"/,
3626
+ contains: [hljs.BACKSLASH_ESCAPE],
3627
+ illegal: "\\n"
3628
+ },
3629
+ hljs.inherit(VALUE_CONTAINER, {
3630
+ begin: /:/
3631
+ })
3632
+ ].concat(ALLOWED_COMMENTS),
3633
+ illegal: "\\S"
3634
+ };
3635
+ const ARRAY = {
3636
+ begin: "\\[",
3637
+ end: "\\]",
3638
+ contains: [hljs.inherit(VALUE_CONTAINER)],
3639
+ illegal: "\\S"
3640
+ };
3641
+ TYPES.push(OBJECT, ARRAY);
3642
+ ALLOWED_COMMENTS.forEach(function(rule) {
3643
+ TYPES.push(rule);
3644
+ });
3645
+ return {
3646
+ name: "JSON",
3647
+ contains: TYPES,
3648
+ keywords: LITERALS,
3649
+ illegal: "\\S"
3650
+ };
3651
+ }
3652
+ module.exports = json;
3653
+ });
3654
+
3597
3655
  // node_modules/highlight.js/lib/languages/kotlin.js
3598
3656
  var require_kotlin = __commonJS(function(exports, module) {
3599
3657
  var decimalDigits = "[0-9](_*[0-9])*";
@@ -6721,4 +6779,4 @@ var require_typescript = __commonJS(function(exports, module) {
6721
6779
  module.exports = typescript;
6722
6780
  });
6723
6781
 
6724
- export { require_core, require_bash, require_c, require_cpp, require_csharp, require_dart, require_go, require_groovy, require_java, require_javascript, require_kotlin, require_lua, require_nix, require_perl, require_php, require_python, require_ruby, require_rust, require_scala, require_swift, require_typescript };
6782
+ export { require_core, require_bash, require_c, require_cpp, require_csharp, require_dart, require_go, require_groovy, require_java, require_javascript, require_json, require_kotlin, require_lua, require_nix, require_perl, require_php, require_python, require_ruby, require_rust, require_scala, require_swift, require_typescript };
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  getDb,
3
3
  init_db
4
- } from "./cli-47m6dkd3.js";
4
+ } from "./cli-g9df2m37.js";
5
5
 
6
6
  // src/be/seed-pricing.ts
7
7
  init_db();
@@ -0,0 +1,176 @@
1
+ import {
2
+ __commonJS,
3
+ __require
4
+ } from "./cli-bc05qbss.js";
5
+
6
+ // node_modules/signal-exit/signals.js
7
+ var require_signals = __commonJS(function(exports, module) {
8
+ module.exports = [
9
+ "SIGABRT",
10
+ "SIGALRM",
11
+ "SIGHUP",
12
+ "SIGINT",
13
+ "SIGTERM"
14
+ ];
15
+ if (process.platform !== "win32") {
16
+ module.exports.push("SIGVTALRM", "SIGXCPU", "SIGXFSZ", "SIGUSR2", "SIGTRAP", "SIGSYS", "SIGQUIT", "SIGIOT");
17
+ }
18
+ if (process.platform === "linux") {
19
+ module.exports.push("SIGIO", "SIGPOLL", "SIGPWR", "SIGSTKFLT", "SIGUNUSED");
20
+ }
21
+ });
22
+
23
+ // node_modules/signal-exit/index.js
24
+ var require_signal_exit = __commonJS(function(exports, module) {
25
+ var process2 = global.process;
26
+ var processOk = function(process3) {
27
+ return process3 && typeof process3 === "object" && typeof process3.removeListener === "function" && typeof process3.emit === "function" && typeof process3.reallyExit === "function" && typeof process3.listeners === "function" && typeof process3.kill === "function" && typeof process3.pid === "number" && typeof process3.on === "function";
28
+ };
29
+ if (!processOk(process2)) {
30
+ module.exports = function() {
31
+ return function() {};
32
+ };
33
+ } else {
34
+ assert = __require("assert");
35
+ signals = require_signals();
36
+ isWin = /^win/i.test(process2.platform);
37
+ EE = __require("events");
38
+ if (typeof EE !== "function") {
39
+ EE = EE.EventEmitter;
40
+ }
41
+ if (process2.__signal_exit_emitter__) {
42
+ emitter = process2.__signal_exit_emitter__;
43
+ } else {
44
+ emitter = process2.__signal_exit_emitter__ = new EE;
45
+ emitter.count = 0;
46
+ emitter.emitted = {};
47
+ }
48
+ if (!emitter.infinite) {
49
+ emitter.setMaxListeners(Infinity);
50
+ emitter.infinite = true;
51
+ }
52
+ module.exports = function(cb, opts) {
53
+ if (!processOk(global.process)) {
54
+ return function() {};
55
+ }
56
+ assert.equal(typeof cb, "function", "a callback must be provided for exit handler");
57
+ if (loaded === false) {
58
+ load();
59
+ }
60
+ var ev = "exit";
61
+ if (opts && opts.alwaysLast) {
62
+ ev = "afterexit";
63
+ }
64
+ var remove = function() {
65
+ emitter.removeListener(ev, cb);
66
+ if (emitter.listeners("exit").length === 0 && emitter.listeners("afterexit").length === 0) {
67
+ unload();
68
+ }
69
+ };
70
+ emitter.on(ev, cb);
71
+ return remove;
72
+ };
73
+ unload = function unload2() {
74
+ if (!loaded || !processOk(global.process)) {
75
+ return;
76
+ }
77
+ loaded = false;
78
+ signals.forEach(function(sig) {
79
+ try {
80
+ process2.removeListener(sig, sigListeners[sig]);
81
+ } catch (er) {}
82
+ });
83
+ process2.emit = originalProcessEmit;
84
+ process2.reallyExit = originalProcessReallyExit;
85
+ emitter.count -= 1;
86
+ };
87
+ module.exports.unload = unload;
88
+ emit = function emit2(event, code, signal) {
89
+ if (emitter.emitted[event]) {
90
+ return;
91
+ }
92
+ emitter.emitted[event] = true;
93
+ emitter.emit(event, code, signal);
94
+ };
95
+ sigListeners = {};
96
+ signals.forEach(function(sig) {
97
+ sigListeners[sig] = function listener() {
98
+ if (!processOk(global.process)) {
99
+ return;
100
+ }
101
+ var listeners = process2.listeners(sig);
102
+ if (listeners.length === emitter.count) {
103
+ unload();
104
+ emit("exit", null, sig);
105
+ emit("afterexit", null, sig);
106
+ if (isWin && sig === "SIGHUP") {
107
+ sig = "SIGINT";
108
+ }
109
+ process2.kill(process2.pid, sig);
110
+ }
111
+ };
112
+ });
113
+ module.exports.signals = function() {
114
+ return signals;
115
+ };
116
+ loaded = false;
117
+ load = function load2() {
118
+ if (loaded || !processOk(global.process)) {
119
+ return;
120
+ }
121
+ loaded = true;
122
+ emitter.count += 1;
123
+ signals = signals.filter(function(sig) {
124
+ try {
125
+ process2.on(sig, sigListeners[sig]);
126
+ return true;
127
+ } catch (er) {
128
+ return false;
129
+ }
130
+ });
131
+ process2.emit = processEmit;
132
+ process2.reallyExit = processReallyExit;
133
+ };
134
+ module.exports.load = load;
135
+ originalProcessReallyExit = process2.reallyExit;
136
+ processReallyExit = function processReallyExit2(code) {
137
+ if (!processOk(global.process)) {
138
+ return;
139
+ }
140
+ process2.exitCode = code || 0;
141
+ emit("exit", process2.exitCode, null);
142
+ emit("afterexit", process2.exitCode, null);
143
+ originalProcessReallyExit.call(process2, process2.exitCode);
144
+ };
145
+ originalProcessEmit = process2.emit;
146
+ processEmit = function processEmit2(ev, arg) {
147
+ if (ev === "exit" && processOk(global.process)) {
148
+ if (arg !== undefined) {
149
+ process2.exitCode = arg;
150
+ }
151
+ var ret = originalProcessEmit.apply(this, arguments);
152
+ emit("exit", process2.exitCode, null);
153
+ emit("afterexit", process2.exitCode, null);
154
+ return ret;
155
+ } else {
156
+ return originalProcessEmit.apply(this, arguments);
157
+ }
158
+ };
159
+ }
160
+ var assert;
161
+ var signals;
162
+ var isWin;
163
+ var EE;
164
+ var emitter;
165
+ var unload;
166
+ var emit;
167
+ var sigListeners;
168
+ var loaded;
169
+ var load;
170
+ var originalProcessReallyExit;
171
+ var processReallyExit;
172
+ var originalProcessEmit;
173
+ var processEmit;
174
+ });
175
+
176
+ export { require_signal_exit };
@@ -6,13 +6,13 @@ import {
6
6
  IDENTITY_FIELD_BUDGETS,
7
7
  init_identity_field_budget,
8
8
  init_templates
9
- } from "./cli-3gmcwfyx.js";
9
+ } from "./cli-ardpzhjm.js";
10
10
  import {
11
11
  init_resolver,
12
12
  init_steering_enabled,
13
13
  isSteeringEnabled,
14
14
  resolveTemplateAsync
15
- } from "./cli-ggm92wcn.js";
15
+ } from "./cli-rgjprct3.js";
16
16
  import {
17
17
  MAX_PROFILE_FILE_LENGTH,
18
18
  init_constants
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  lazyApi
3
- } from "./cli-mcnhgnn1.js";
3
+ } from "./cli-ykk5jaax.js";
4
4
 
5
5
  // node_modules/@earendil-works/pi-ai/dist/api/bedrock-converse-stream.lazy.js
6
6
  var __rewriteRelativeImportExtension = function(path, preserveJsx) {
@@ -3,7 +3,6 @@ import {
3
3
  agentsWithLiveRuntime,
4
4
  cancelApprovalRequestAndRun,
5
5
  countActiveRuntimeInstancesForAgent,
6
- createApprovalFollowUpTask,
7
6
  createPoolStarvationDecisionTask,
8
7
  createRerouteDecisionTask,
9
8
  createResumeFollowUp,
@@ -17,10 +16,13 @@ import {
17
16
  recoverIncompleteRuns,
18
17
  repointTrackerSyncBySwarmId,
19
18
  resolveLeadOnlyRecoveryAssignment
20
- } from "./cli-ftfvggzx.js";
19
+ } from "./cli-79aq9cgb.js";
21
20
  import {
22
21
  isMultiRuntimeEnabled
23
22
  } from "./cli-re8z5p8p.js";
23
+ import {
24
+ createApprovalFollowUpTask
25
+ } from "./cli-fjtp3463.js";
24
26
  import {
25
27
  MAX_EMPTY_POLLS,
26
28
  assignUnassignedTaskPending,
@@ -49,6 +51,7 @@ import {
49
51
  getStalePinnedResumes,
50
52
  getStaleUnassignedAffinityTasks,
51
53
  getStalledInProgressTasks,
54
+ getSupersededTasksWithUnsettledDependents,
52
55
  getSupersededTasksWithoutResume,
53
56
  getTaskById,
54
57
  getTaskStats,
@@ -67,15 +70,20 @@ import {
67
70
  releaseStaleProcessingInbox,
68
71
  releaseStaleReviewingTasks,
69
72
  resolveApprovalRequest,
73
+ settleSupersededTaskDependents,
70
74
  supersedeTask,
71
75
  updateAgentStatus
72
- } from "./cli-47m6dkd3.js";
76
+ } from "./cli-g9df2m37.js";
73
77
  import {
74
78
  init_registry,
75
79
  init_resolver,
76
80
  registerTemplate,
77
81
  resolveTemplate
78
- } from "./cli-ggm92wcn.js";
82
+ } from "./cli-rgjprct3.js";
83
+ import {
84
+ init_env_flag,
85
+ isEnvFlagEnabled
86
+ } from "./cli-ej6gbxfb.js";
79
87
  import {
80
88
  init_secret_scrubber,
81
89
  scrubSecrets
@@ -152,6 +160,7 @@ async function timeoutExpiredApprovalRequests(now = new Date) {
152
160
  init_db();
153
161
  init_steering();
154
162
  init_resolver();
163
+ init_env_flag();
155
164
  init_secret_scrubber();
156
165
 
157
166
  // src/heartbeat/templates.ts
@@ -173,8 +182,8 @@ Goal: Review system status and your standing orders, take action if needed.
173
182
  ## Instructions
174
183
  1. **Read your HEARTBEAT.md** — run \`read /workspace/HEARTBEAT.md\` to get the latest standing orders (the snapshot above may be slightly stale).
175
184
  2. **Prune tracked HEARTBEAT items FIRST.** Active Blockers + Watch Items + Open Discussion combined must stay at ≤10 items; 20 is the absolute max only when genuinely super busy. This cap does not apply to evergreen Standing Orders / Governance / Playbook-index reference sections. Before adding anything, re-check every tracked item against its lift trigger and remove anything resolved, stale, or past its trigger date. Lift incident detail to memory; never keep it inline in HEARTBEAT.md. Every new tracked item must include an explicit lift trigger + date; if it has no removal condition, do not add it. If the tracked list is already at/over cap, prune before (or instead of) adding — the cap is binding.
176
- 3. **Run seeded heartbeat data-gathering.** Use \`script-run\` with global script \`Heartbeat Audit\` and pass the current HEARTBEAT.md text as \`heartbeatMarkdown\`. It covers Rules #10/#13/#15/#16/#17: resolved stale PRs, pool-target risk schedules, schedule/provider failure clusters, and whether daily-blocker-digest ran today. The Slack thread-reply check (Rule #11) stays Lead-side; the script runtime has no Slack token.
177
- 4. Review the system status above plus the \`Heartbeat Audit\` result for anything that needs attention (stalled tasks, idle workers with available work, anomalies).
185
+ 3. **Run seeded heartbeat data-gathering.** Use \`script-run\` with the global scripts \`schedule-health\` and \`task-failure-audit\`, both with args \`{ "days": 1, "publishPage": false }\`. They report failing schedules and failure clusters. Check any other standing order in HEARTBEAT.md yourself. Scripts can read Slack too (\`ctx.swarm.slack_read\` or the seeded \`slack-thread-flatten\` script), so a recurring Slack check can be scripted.
186
+ 4. Review the system status above plus the script results for anything that needs attention (stalled tasks, idle workers with available work, anomalies).
178
187
  5. **CRITICAL — Reboot failure triage:** Failures with reason "worker session not found" or "worker session heartbeat is stale" indicate tasks that were INTERRUPTED by a server restart. These are NOT "expected auto-cleanup" — they represent work that was lost mid-execution. For each such failure:
179
188
  - Check what the task was (via \`get-task-details\` with the task ID from the failure)
180
189
  - If a retry task was auto-created (tagged \`reboot-retry\`), verify it is progressing
@@ -290,10 +299,22 @@ var HEARTBEAT_RESUME_PIN_GRACE_MIN = (() => {
290
299
  return Number.isFinite(parsed) ? parsed : 10;
291
300
  })();
292
301
  var POOL_AFFINITY_ESCALATION_MIN = Number(process.env.POOL_AFFINITY_ESCALATION_MIN) || 15;
293
- var HEARTBEAT_CHECKLIST_INTERVAL_MS = Number(process.env.HEARTBEAT_CHECKLIST_INTERVAL_MS) || 30 * 60 * 1000;
294
- var HEARTBEAT_CHECKLIST_DISABLE = Boolean(process.env.HEARTBEAT_CHECKLIST_DISABLE);
302
+ var DEFAULT_HEARTBEAT_CHECKLIST_INTERVAL_MS = 30 * 60 * 1000;
303
+ function heartbeatChecklistIntervalMs() {
304
+ const raw = process.env.HEARTBEAT_CHECKLIST_INTERVAL_MS?.trim();
305
+ if (!raw)
306
+ return DEFAULT_HEARTBEAT_CHECKLIST_INTERVAL_MS;
307
+ const parsed = Number(raw);
308
+ if (!Number.isFinite(parsed))
309
+ return DEFAULT_HEARTBEAT_CHECKLIST_INTERVAL_MS;
310
+ return Math.max(0, parsed);
311
+ }
312
+ function isHeartbeatChecklistDisabled() {
313
+ return isEnvFlagEnabled("HEARTBEAT_CHECKLIST_DISABLE", false);
314
+ }
295
315
  var heartbeatInterval = null;
296
316
  var checklistInterval = null;
317
+ var bootTriageTimeout = null;
297
318
  var isSweeping = false;
298
319
  var beforeHeartbeatSupersedeForTests = null;
299
320
  var rebootAffectedTasks = [];
@@ -445,13 +466,11 @@ async function repairSupersededWithoutResume(findings) {
445
466
  const now = Date.now();
446
467
  const orphans = await getSupersededTasksWithoutResume(new Date(now - ORPHAN_SUPERSEDE_MIN_AGE_MS).toISOString(), new Date(now - ORPHAN_SUPERSEDE_MAX_AGE_MS).toISOString());
447
468
  for (const task of orphans) {
448
- if (!task.agentId)
449
- continue;
450
- if (getNextResumeGeneration(task) > maxResumeGenerations())
451
- continue;
452
- const resume = await createResumeFollowUp({ parentId: task.id, reason: "crash_recovery" });
453
- if (resume.kind !== "created")
469
+ const resume = task.agentId && getNextResumeGeneration(task) <= maxResumeGenerations() ? await createResumeFollowUp({ parentId: task.id, reason: "crash_recovery" }) : null;
470
+ if (resume?.kind !== "created" || !task.agentId) {
471
+ await settleSupersededTaskDependents(task.id, null);
454
472
  continue;
473
+ }
455
474
  await backfillSupersedeTaskResumeTaskId(task.id, resume.task.id);
456
475
  findings.autoResumedTasks.push({
457
476
  taskId: task.id,
@@ -461,6 +480,10 @@ async function repairSupersededWithoutResume(findings) {
461
480
  });
462
481
  console.log(`[Heartbeat] Created missing resume ${resume.task.id.slice(0, 8)} for superseded task ${task.id.slice(0, 8)}`);
463
482
  }
483
+ const unsettled = await getSupersededTasksWithUnsettledDependents(new Date(now - ORPHAN_SUPERSEDE_MIN_AGE_MS).toISOString(), new Date(now - ORPHAN_SUPERSEDE_MAX_AGE_MS).toISOString());
484
+ for (const { taskId, resumeTaskId } of unsettled) {
485
+ await settleSupersededTaskDependents(taskId, resumeTaskId);
486
+ }
464
487
  }
465
488
  function isRemediationAction(value) {
466
489
  return typeof value === "string" && REMEDIATION_ACTIONS.has(value);
@@ -547,6 +570,7 @@ async function remediateCrashedWorkerTask(findings, task, opts, decision) {
547
570
  }
548
571
  } else {
549
572
  const reason = resume.kind === "skipped" ? `resume_creation_skipped_${resume.reason}` : "resume_creation_skipped_workflow";
573
+ await settleSupersededTaskDependents(task.id, null);
550
574
  const failed = await failTask(task.id, reason);
551
575
  if (failed) {
552
576
  findings.autoFailedTasks.push({
@@ -1256,21 +1280,29 @@ async function createBootTriageTask() {
1256
1280
  });
1257
1281
  console.log(`[Heartbeat] Boot triage task created for lead ${lead.name}`);
1258
1282
  }
1259
- function startHeartbeatChecklist(intervalMs = HEARTBEAT_CHECKLIST_INTERVAL_MS) {
1260
- if (HEARTBEAT_CHECKLIST_DISABLE) {
1283
+ function startHeartbeatChecklist(intervalMs = heartbeatChecklistIntervalMs()) {
1284
+ if (isHeartbeatChecklistDisabled()) {
1261
1285
  console.log("[Heartbeat] Checklist disabled via HEARTBEAT_CHECKLIST_DISABLE");
1262
1286
  return;
1263
1287
  }
1264
- if (checklistInterval) {
1288
+ if (checklistInterval || bootTriageTimeout) {
1289
+ return;
1290
+ }
1291
+ bootTriageTimeout = setTimeout(() => createBootTriageTask(), 90000);
1292
+ if (intervalMs <= 0) {
1293
+ console.log("[Heartbeat] Recurring checklist off (HEARTBEAT_CHECKLIST_INTERVAL_MS=0); boot triage still scheduled");
1265
1294
  return;
1266
1295
  }
1267
1296
  console.log(`[Heartbeat] Checklist starting with ${intervalMs}ms interval`);
1268
- setTimeout(() => createBootTriageTask(), 90000);
1269
1297
  checklistInterval = setInterval(() => {
1270
1298
  checkHeartbeatChecklist().catch((err) => console.error("[Heartbeat] checklist check failed:", scrubSecrets(err instanceof Error ? err.message : String(err))));
1271
1299
  }, intervalMs);
1272
1300
  }
1273
1301
  function stopHeartbeatChecklist() {
1302
+ if (bootTriageTimeout) {
1303
+ clearTimeout(bootTriageTimeout);
1304
+ bootTriageTimeout = null;
1305
+ }
1274
1306
  if (checklistInterval) {
1275
1307
  clearInterval(checklistInterval);
1276
1308
  checklistInterval = null;
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getSystemMessageText
3
- } from "./cli-mcnhgnn1.js";
3
+ } from "./cli-ykk5jaax.js";
4
4
 
5
5
  // node_modules/@earendil-works/pi-ai/dist/api/constrained-sampling.js
6
6
  class UnsupportedStrictJsonSchemaError extends Error {
@@ -313,10 +313,9 @@ function clampMaxTokensToContext(model, context, maxTokens) {
313
313
  return Math.min(maxTokens, Math.max(MIN_MAX_TOKENS, available));
314
314
  }
315
315
  function buildBaseOptions(model, context, options, apiKey) {
316
- const samplingParams = model.samplingParams || options?.samplingParams ? { ...model.samplingParams, ...options?.samplingParams } : undefined;
317
316
  return {
318
317
  temperature: options?.temperature,
319
- samplingParams,
318
+ samplingParams: options?.samplingParams,
320
319
  maxTokens: clampMaxTokensToContext(model, context, options?.maxTokens ?? model.maxTokens),
321
320
  signal: options?.signal,
322
321
  telemetryContext: options?.telemetryContext,
@@ -328,6 +327,7 @@ function buildBaseOptions(model, context, options, apiKey) {
328
327
  headers: options?.headers,
329
328
  onPayload: options?.onPayload,
330
329
  onResponse: options?.onResponse,
330
+ onProviderStreamEvent: options?.onProviderStreamEvent,
331
331
  timeoutMs: options?.timeoutMs,
332
332
  websocketConnectTimeoutMs: options?.websocketConnectTimeoutMs,
333
333
  maxRetries: options?.maxRetries,