@desplega.ai/agent-swarm 2.7.4 → 2.7.5

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 (253) hide show
  1. package/README.md +1 -1
  2. package/dist/acp-adapter-g3ads55s.js +15 -0
  3. package/dist/{actions-gfrr9vb7.js → actions-zwfykqqk.js} +18 -18
  4. package/dist/{amp-adapter-0s58gm46.js → amp-adapter-z3s0ssdt.js} +3 -3
  5. package/dist/{app-stvq692g.js → app-vmp4fgep.js} +3 -3
  6. package/dist/{assistant-5s37fr9n.js → assistant-vwde653f.js} +28 -21
  7. package/dist/{boot-reembed-yzy1841n.js → boot-reembed-375t7tbk.js} +1 -1
  8. package/dist/{boot-reembed-cv82gz7y.js → boot-reembed-gq9rcpnj.js} +1 -1
  9. package/dist/{boot-scrub-sweep-8k4q95ap.js → boot-scrub-sweep-nd938kyf.js} +4 -4
  10. package/dist/{boot-seeds-ftt9htah.js → boot-seeds-aykx51v3.js} +4 -4
  11. package/dist/{boxd-515v1t8z.js → boxd-k1j26g3h.js} +1 -1
  12. package/dist/{claude-adapter-t00wrzeh.js → claude-adapter-8j4hm099.js} +7 -7
  13. package/dist/{claude-managed-adapter-g6vmjccb.js → claude-managed-adapter-dvs2xw5n.js} +2 -2
  14. package/dist/{claude-managed-setup-afpa82f7.js → claude-managed-setup-0wyynpn1.js} +3 -3
  15. package/dist/{claude-sdk-session-vj0c2azx.js → claude-sdk-session-q6wj5hmy.js} +9 -9
  16. package/dist/{cli-wndv9p7g.js → cli-0731hvbw.js} +6 -6
  17. package/dist/{cli-d2pzqej1.js → cli-0bxqnvq9.js} +719 -7
  18. package/dist/{cli-jkt52mgt.js → cli-0gey5fzy.js} +2 -2
  19. package/dist/{cli-1yekbyqm.js → cli-1338796d.js} +205 -48
  20. package/dist/{cli-1s1dqn1j.js → cli-1ayk1eas.js} +171 -123
  21. package/dist/{cli-a4btqqft.js → cli-1b7btd38.js} +1 -1
  22. package/dist/{cli-a2jw6ee5.js → cli-1p89xny0.js} +1 -1
  23. package/dist/{cli-v726afdm.js → cli-2pnswgh8.js} +1 -1
  24. package/dist/{cli-kvtc7aez.js → cli-3h4nhjn8.js} +42 -14
  25. package/dist/{cli-655xm9ms.js → cli-583frbyr.js} +1 -1
  26. package/dist/{cli-4r12t6w6.js → cli-5c4hjzne.js} +101 -4
  27. package/dist/{cli-az0bpf8p.js → cli-5pag6rmn.js} +3 -3
  28. package/dist/{cli-36g23z21.js → cli-6s7vdcta.js} +4 -4
  29. package/dist/{cli-rtk9g7av.js → cli-73jzwksr.js} +6 -2
  30. package/dist/{cli-jg0nfda6.js → cli-75gkpjvw.js} +52 -21
  31. package/dist/{cli-a81qevyg.js → cli-7a42nfy0.js} +20 -36
  32. package/dist/{cli-0sbkss7h.js → cli-7wcyk2s5.js} +2 -2
  33. package/dist/{cli-41z8xwj0.js → cli-7wspm5gm.js} +14 -4
  34. package/dist/{cli-byqfbnjw.js → cli-82ae98pz.js} +9 -9
  35. package/dist/{cli-bq2pcphn.js → cli-8hs41zy2.js} +1 -1
  36. package/dist/{cli-vqgnyh76.js → cli-98rw5dt5.js} +15 -3
  37. package/dist/{cli-9cctx1tn.js → cli-a22h291q.js} +1 -1
  38. package/dist/{cli-j4kt1mpb.js → cli-a47xy8eq.js} +3 -3
  39. package/dist/{cli-ycm6180s.js → cli-a7v854rf.js} +5 -3
  40. package/dist/{cli-98pke4vk.js → cli-ae7mrdf9.js} +2 -2
  41. package/dist/{cli-ahd90bwt.js → cli-afrrppsw.js} +6 -6
  42. package/dist/{cli-8yy525ad.js → cli-bhjt02p8.js} +2 -2
  43. package/dist/{cli-v1yw3wha.js → cli-bnz7a7qf.js} +4 -4
  44. package/dist/{cli-j4kw3rsx.js → cli-cm5yqn35.js} +18 -0
  45. package/dist/{cli-h55y2bjc.js → cli-dhar9qay.js} +2 -2
  46. package/dist/{cli-5gr1g711.js → cli-fqzx7gwa.js} +2 -2
  47. package/dist/{cli-tzrpv5sc.js → cli-ftyxyspd.js} +1 -1
  48. package/dist/cli-fw2w0kva.js +47 -0
  49. package/dist/{cli-2dfbv8qr.js → cli-fy6x31ps.js} +1 -0
  50. package/dist/{cli-mvckssyq.js → cli-g61qxmge.js} +5 -5
  51. package/dist/{cli-aq58fk5m.js → cli-g83s9ewh.js} +7 -1
  52. package/dist/{cli-224epwwf.js → cli-hn9hxmz9.js} +3 -3
  53. package/dist/{cli-5hjced2v.js → cli-j3jvnpe8.js} +6 -6
  54. package/dist/{cli-dae4sbgy.js → cli-jm2vfpfd.js} +2 -2
  55. package/dist/{cli-zn15c46z.js → cli-mjzynrse.js} +1 -1
  56. package/dist/{cli-a1fhj4n9.js → cli-mmwm7zbf.js} +2 -2
  57. package/dist/{cli-cq1pf336.js → cli-mry0qzym.js} +5 -5
  58. package/dist/{cli-bwty35gx.js → cli-mthwvjre.js} +1 -1
  59. package/dist/{cli-s0exq74r.js → cli-nmbmy64z.js} +3 -3
  60. package/dist/{cli-wcmnan2g.js → cli-nn4d8dne.js} +5 -5
  61. package/dist/{cli-jg4p5t36.js → cli-nzxr556s.js} +121 -51
  62. package/dist/{cli-bcz074zx.js → cli-p599f1qm.js} +1 -1
  63. package/dist/{cli-k76tgq03.js → cli-pywf3eh5.js} +2 -2
  64. package/dist/{cli-wk9md5px.js → cli-qxnf8z2z.js} +2 -2
  65. package/dist/{cli-je8yeyc5.js → cli-rhw40jgb.js} +5 -5
  66. package/dist/{cli-avgcz4ra.js → cli-rm6hqj3z.js} +406 -35
  67. package/dist/{cli-0fgr1w9b.js → cli-rpm2sgv0.js} +2 -2
  68. package/dist/{cli-t282jgab.js → cli-rqkxrmgw.js} +12 -12
  69. package/dist/{cli-2qpvmmkw.js → cli-s0qnd4wv.js} +1 -1
  70. package/dist/{cli-pwyevs29.js → cli-spknvxbq.js} +22 -21
  71. package/dist/{cli-9y354g3j.js → cli-srye3vdt.js} +1 -1
  72. package/dist/{cli-pe09p6dv.js → cli-tqgg40ek.js} +1 -1
  73. package/dist/{cli-f255yaqn.js → cli-vbyfwh92.js} +3 -3
  74. package/dist/{cli-gcbdjt47.js → cli-vfym7wmz.js} +6 -6
  75. package/dist/{cli-edmm9d9y.js → cli-vqypxzh4.js} +7 -7
  76. package/dist/{cli-1gm8jcyr.js → cli-wvaawacd.js} +13 -13
  77. package/dist/{cli-eny54typ.js → cli-wx3rhnm0.js} +1 -1
  78. package/dist/{cli-b1afgtj3.js → cli-xbkdm710.js} +3 -3
  79. package/dist/{cli-mc97xy2s.js → cli-xtjhfmpc.js} +16 -4
  80. package/dist/{cli-eqx6k993.js → cli-y24sc29k.js} +25 -13
  81. package/dist/{cli-ktmvb20s.js → cli-z6jkx23q.js} +12 -12
  82. package/dist/{cli-7n5sbw0z.js → cli-z8eh3ex8.js} +5 -5
  83. package/dist/cli-zh3fp8v2.js +151 -0
  84. package/dist/{cli-13jvmew3.js → cli-zppwg9p9.js} +7 -7
  85. package/dist/cli.js +18 -18
  86. package/dist/{codex-adapter-g0gctw29.js → codex-adapter-q6k3gnyg.js} +5 -5
  87. package/dist/{codex-hook-vrzz2xhr.js → codex-hook-9efm2x1m.js} +1 -1
  88. package/dist/{codex-login-0gg46ygn.js → codex-login-y0pmff1c.js} +1 -1
  89. package/dist/{codex-session-runner-dr2cxe1c.js → codex-session-runner-3mwmk3d9.js} +6 -6
  90. package/dist/{commands-1p07cvff.js → commands-evrenjn9.js} +2 -2
  91. package/dist/{controller-z0s7sv6r.js → controller-xjp8vswh.js} +4 -4
  92. package/dist/{controllers-connect-x9kvvhyk.js → controllers-connect-pp5jnxvc.js} +20 -20
  93. package/dist/{cursor-adapter-m5b98pvk.js → cursor-adapter-yf47w4t0.js} +2 -2
  94. package/dist/{db-rsh04kh3.js → db-rgfsh91f.js} +2 -2
  95. package/dist/{db-capk2raj.js → db-zxpw6aht.js} +3 -3
  96. package/dist/{devin-adapter-yxm87fe9.js → devin-adapter-r9phbnc9.js} +1 -1
  97. package/dist/{dispatcher-304q6fwa.js → dispatcher-smasgws7.js} +17 -17
  98. package/dist/{docker-7rxt0rry.js → docker-rrjhaqt9.js} +2 -2
  99. package/dist/{dsh-adapter-btewem0y.js → dsh-adapter-ftyy8dnp.js} +2 -2
  100. package/dist/{e2b-renc0k8q.js → e2b-qcaj675y.js} +2 -2
  101. package/dist/{e2b-7fc9b9bd.js → e2b-w1p0bnpm.js} +2 -2
  102. package/dist/{easter-egg-3d-fm1p3n4d.js → easter-egg-3d-yyts7p16.js} +1 -1
  103. package/dist/{embedding-space-s68v49ct.js → embedding-space-1z0mbg95.js} +6 -6
  104. package/dist/{embeddings-4ms3604w.js → embeddings-ygeg7tm7.js} +1 -1
  105. package/dist/{event-bus-dfjx2qdh.js → event-bus-g0ka3pbw.js} +1 -1
  106. package/dist/{execute-mcdgccjs.js → execute-14qhqp4d.js} +1 -1
  107. package/dist/{external-channel-9dxwfztn.js → external-channel-ttgrs3sx.js} +2 -2
  108. package/dist/fx-adapter-gt6pncj2.js +18 -0
  109. package/dist/{grok-adapter-05ecv4h0.js → grok-adapter-sm4m5k4g.js} +8 -8
  110. package/dist/handlers-vwmba1m2.js +31 -0
  111. package/dist/{heartbeat-3n94heh3.js → heartbeat-qahz4p62.js} +20 -20
  112. package/dist/{hook-zxwje86c.js → hook-4fd5wq5w.js} +4 -4
  113. package/dist/{hook-aadrn69x.js → hook-kj3d398m.js} +6 -6
  114. package/dist/{http-xzxk9mst.js → http-1ted0j1k.js} +100 -64
  115. package/dist/index-5r71rf98.js +32 -0
  116. package/dist/{index-d34f6r87.js → index-6rq3r5zb.js} +1 -1
  117. package/dist/{index-9j4zwcht.js → index-7v51awbn.js} +158 -672
  118. package/dist/index-anmwxs87.js +29 -0
  119. package/dist/{index-qeb82z37.js → index-q4b917zs.js} +1 -1
  120. package/dist/index-spp0ra5c.js +36 -0
  121. package/dist/{keepalive-w4aakbyk.js → keepalive-6cf311t5.js} +4 -4
  122. package/dist/lead-fjy418cw.js +69 -0
  123. package/dist/{maintenance-hbptpk6p.js → maintenance-a4bm1bmt.js} +1 -1
  124. package/dist/{oauth-refresh-sweep-217semrv.js → oauth-refresh-sweep-3h0dfw1k.js} +3 -3
  125. package/dist/{onboard-vz2s5df3.js → onboard-myn5hraa.js} +3 -3
  126. package/dist/{opencode-adapter-gtfd7d7v.js → opencode-adapter-p2nkb5am.js} +5 -5
  127. package/dist/{otel-impl-aefave37.js → otel-impl-a1a0ef6b.js} +2 -2
  128. package/dist/{pi-mono-adapter-f8h5yseh.js → pi-mono-adapter-rzmpb72a.js} +117 -23
  129. package/dist/{pricing-refresh-m1yhh9ya.js → pricing-refresh-83drrnxj.js} +3 -3
  130. package/dist/{rbac-roles-svj72cdf.js → rbac-roles-0fb6e7pj.js} +2 -2
  131. package/dist/{rbac-roles-rrw8twdz.js → rbac-roles-s8y6ecb5.js} +1 -1
  132. package/dist/{render-v2-amwbnfxh.js → render-v2-twmbgrz4.js} +3 -3
  133. package/dist/{resume-9cd6wf6z.js → resume-zfqc36xj.js} +7 -7
  134. package/dist/{runtime-fp4vrx7m.js → runtime-qwggdpqr.js} +1 -1
  135. package/dist/{session-access-21t6yjyg.js → session-access-sc9pn9da.js} +4 -4
  136. package/dist/{session-source-backfill-pxbzcsc6.js → session-source-backfill-qh07xr8g.js} +3 -3
  137. package/dist/{setup-4592tqz4.js → setup-4fr0m7a1.js} +1 -1
  138. package/dist/{virtual-modules-gzfnpmnz.js → virtual-modules-fh4ha15b.js} +2 -2
  139. package/dist/{work-objects-t9tcf174.js → work-objects-0wr8zxct.js} +20 -20
  140. package/dist/worker-0c5tyzqe.js +69 -0
  141. package/dist/{worker-follow-up-q32jh4yk.js → worker-follow-up-ktyyazyp.js} +17 -17
  142. package/dist/{x-b6wxntdt.js → x-vmmye1kb.js} +2 -2
  143. package/openapi.json +97 -32
  144. package/package.json +1 -1
  145. package/src/be/db/session-summaries.ts +8 -2
  146. package/src/be/db/session-tree.ts +174 -61
  147. package/src/be/db/session-visibility.ts +5 -4
  148. package/src/be/db.ts +8 -4
  149. package/src/be/migrations/259_session_summaries_open_tasks.sql +111 -0
  150. package/src/be/model-validation.ts +5 -1
  151. package/src/be/pricing-normalize.ts +7 -2
  152. package/src/be/scripts/typecheck.ts +1 -0
  153. package/src/be/seed/schedules-seeder.ts +135 -9
  154. package/src/be/seed/workflows-seeder.ts +65 -1
  155. package/src/be/seed-pricing.ts +23 -0
  156. package/src/be/steering.ts +50 -3
  157. package/src/be/swarm-config-guard.ts +1 -0
  158. package/src/commands/provider-credentials.ts +29 -2
  159. package/src/commands/runner.ts +86 -5
  160. package/src/extensions/contract-types.generated.ts +1 -1
  161. package/src/extensions/contract.ts +27 -1
  162. package/src/extensions/dispatcher.ts +4 -0
  163. package/src/http/agents.ts +1 -0
  164. package/src/http/mcp-bridge.ts +4 -0
  165. package/src/integrations/chat-sdk/inbound.ts +15 -5
  166. package/src/integrations/chat-sdk/steering.ts +3 -1
  167. package/src/kv-reserved-namespaces.ts +2 -0
  168. package/src/prompts/base-prompt.ts +4 -1
  169. package/src/prompts/session-templates.ts +26 -0
  170. package/src/providers/acp-adapter.ts +190 -26
  171. package/src/providers/acp-targets.ts +306 -6
  172. package/src/providers/amp-adapter.ts +1 -1
  173. package/src/providers/codex-adapter.ts +9 -44
  174. package/src/providers/codex-oauth/flow.ts +24 -3
  175. package/src/providers/codex-oauth/storage.ts +56 -17
  176. package/src/providers/codex-oauth/subscription.ts +67 -0
  177. package/src/providers/fx-adapter.ts +211 -0
  178. package/src/providers/index.ts +5 -1
  179. package/src/providers/mcp-loopback-proxy.ts +94 -0
  180. package/src/providers/pi-mono-adapter.ts +98 -13
  181. package/src/providers/pricing-sources.md +8 -0
  182. package/src/providers/reasoning-effort.ts +17 -1
  183. package/src/providers/types.ts +2 -1
  184. package/src/scheduler/scheduler.ts +36 -3
  185. package/src/scripts-runtime/sdk-allowlist.ts +1 -0
  186. package/src/scripts-runtime/types/stdlib.d.ts +5 -0
  187. package/src/scripts-runtime/types/swarm-extension.d.ts +33 -0
  188. package/src/scripts-runtime/types/swarm-sdk.d.ts +5 -0
  189. package/src/server.ts +7 -0
  190. package/src/slack/assistant.ts +17 -1
  191. package/src/slack/handlers.ts +18 -5
  192. package/src/slack/left-threads.ts +65 -0
  193. package/src/slack/steering.ts +3 -0
  194. package/src/slack/thread-buffer.ts +40 -16
  195. package/src/tests/acp-adapter.test.ts +79 -0
  196. package/src/tests/base-prompt.test.ts +12 -0
  197. package/src/tests/chat-sdk-inbound.test.ts +30 -0
  198. package/src/tests/chatgpt-subscription-model-groups.test.ts +62 -0
  199. package/src/tests/chatgpt-subscription-pi.test.ts +170 -0
  200. package/src/tests/chatgpt-subscription-session-bench.test.ts +198 -0
  201. package/src/tests/codex-oauth-credential-info.test.ts +40 -0
  202. package/src/tests/codex-oauth-refresh-egress.test.ts +194 -0
  203. package/src/tests/context-window.test.ts +7 -0
  204. package/src/tests/explicit-model-validation.test.ts +99 -0
  205. package/src/tests/extensions-run-context.test.ts +11 -0
  206. package/src/tests/extensions-steering.test.ts +353 -0
  207. package/src/tests/extensions-validate.test.ts +5 -0
  208. package/src/tests/fixtures/extensions/steering-policy/hooks.ts +39 -0
  209. package/src/tests/fixtures/extensions/steering-policy/manifest.json +7 -0
  210. package/src/tests/fixtures/fake-fx.ts +167 -0
  211. package/src/tests/fixtures/fx/acp-responses-recorded.json +157 -0
  212. package/src/tests/fixtures/fx/acp-updates-recorded.jsonl +15 -0
  213. package/src/tests/fx-adapter.test.ts +771 -0
  214. package/src/tests/grok-adapter.test.ts +36 -0
  215. package/src/tests/mcp-loopback-proxy.test.ts +193 -0
  216. package/src/tests/model-tier-resolution.test.ts +3 -3
  217. package/src/tests/pricing-refresh.test.ts +5 -5
  218. package/src/tests/prompt-template-session.test.ts +5 -3
  219. package/src/tests/provider-registration.test.ts +2 -1
  220. package/src/tests/query-audit-plans.test.ts +3 -2
  221. package/src/tests/script-connections.test.ts +2 -0
  222. package/src/tests/seed-model-profiles.test.ts +2 -2
  223. package/src/tests/seed-schedules.test.ts +138 -0
  224. package/src/tests/session-cost-recompute-unit.test.ts +39 -0
  225. package/src/tests/session-costs-golden.test.ts +26 -0
  226. package/src/tests/session-summaries-plans.test.ts +120 -0
  227. package/src/tests/session-summaries.test.ts +72 -12
  228. package/src/tests/sessions-tree.test.ts +11 -3
  229. package/src/tests/slack-leave-thread.test.ts +431 -0
  230. package/src/tests/tool-annotations.test.ts +2 -1
  231. package/src/tests/workflow-engine-v2.test.ts +42 -0
  232. package/src/tests/workflow-script-principal.test.ts +207 -7
  233. package/src/tools/slack-leave-thread.ts +104 -0
  234. package/src/tools/steer-task.ts +3 -2
  235. package/src/tools/tool-config.ts +2 -1
  236. package/src/types.ts +19 -0
  237. package/src/utils/codex-auth-failure.ts +30 -0
  238. package/src/utils/context-window.ts +4 -1
  239. package/src/utils/credentials.ts +7 -0
  240. package/src/utils/fx-models.ts +43 -0
  241. package/src/workflows/cooldown.ts +3 -2
  242. package/src/workflows/engine.ts +24 -9
  243. package/templates/schedules/dreaming-daily/config.json +1 -1
  244. package/templates/schedules/dreaming-daily/content.md +6 -14
  245. package/templates/skills/swarm-docs/content.md +1 -0
  246. package/templates/workflows/dreaming/content.md +5 -1
  247. package/dist/acp-adapter-96dc64m2.js +0 -15
  248. package/dist/handlers-jg7v74ty.js +0 -31
  249. package/dist/index-8c1zbz59.js +0 -29
  250. package/dist/index-8k8tmfxd.js +0 -32
  251. package/dist/index-hq617xdj.js +0 -36
  252. package/dist/lead-567kw7x3.js +0 -68
  253. package/dist/worker-fjdqra6q.js +0 -68
@@ -11,13 +11,13 @@ import {
11
11
  checkDeepSeekApiKey,
12
12
  checkOpenAICompatibleProvider,
13
13
  writeSkillsToFilesystem
14
- } from "./cli-je8yeyc5.js";
14
+ } from "./cli-rhw40jgb.js";
15
15
  import {
16
16
  renderSteeringDelivery
17
- } from "./cli-tzrpv5sc.js";
17
+ } from "./cli-ftyxyspd.js";
18
18
  import {
19
19
  effectiveReasoningEffort
20
- } from "./cli-vqgnyh76.js";
20
+ } from "./cli-98rw5dt5.js";
21
21
  import {
22
22
  isSkillLoaderCall,
23
23
  skillFromToolArgs,
@@ -30,40 +30,43 @@ import {
30
30
  CODEX_CREDITS_EXHAUSTED_COOLDOWN_MS,
31
31
  resolveCodexCreditsExhaustedCooldownMs,
32
32
  parseRateLimitResetTime
33
- } from "./cli-bwty35gx.js";
33
+ } from "./cli-mthwvjre.js";
34
34
  import {
35
35
  ACP_TARGET_IDS,
36
36
  isAcpTarget
37
- } from "./cli-9cctx1tn.js";
37
+ } from "./cli-a22h291q.js";
38
38
  import {
39
39
  checkAmpCredentials2,
40
40
  liveTestAmpCredentials2
41
- } from "./cli-ahd90bwt.js";
41
+ } from "./cli-afrrppsw.js";
42
42
  import {
43
43
  checkClaudeCredentials2
44
- } from "./cli-byqfbnjw.js";
44
+ } from "./cli-82ae98pz.js";
45
45
  import {
46
46
  checkClaudeManagedCredentials2
47
- } from "./cli-gcbdjt47.js";
47
+ } from "./cli-vfym7wmz.js";
48
48
  import {
49
49
  codexUserHome,
50
50
  checkCodexCredentials2
51
- } from "./cli-a81qevyg.js";
51
+ } from "./cli-7a42nfy0.js";
52
52
  import {
53
53
  checkCursorCredentials2
54
- } from "./cli-5hjced2v.js";
54
+ } from "./cli-j3jvnpe8.js";
55
55
  import {
56
56
  checkDevinCredentials2
57
- } from "./cli-9y354g3j.js";
57
+ } from "./cli-srye3vdt.js";
58
58
  import {
59
59
  checkDshCredentials2
60
- } from "./cli-v1yw3wha.js";
60
+ } from "./cli-bnz7a7qf.js";
61
61
  import {
62
62
  checkOpencodeCredentials2
63
- } from "./cli-13jvmew3.js";
63
+ } from "./cli-zppwg9p9.js";
64
+ import {
65
+ checkFxCredentials2
66
+ } from "./cli-zh3fp8v2.js";
64
67
  import {
65
68
  checkGrokCredentials2
66
- } from "./cli-az0bpf8p.js";
69
+ } from "./cli-5pag6rmn.js";
67
70
  import {
68
71
  CODEX_OAUTH_POOL_SLOTS_ENV,
69
72
  isCodexOAuthConfigKey,
@@ -73,7 +76,7 @@ import {
73
76
  import {
74
77
  getContextWindowSize,
75
78
  init_context_window
76
- } from "./cli-rtk9g7av.js";
79
+ } from "./cli-73jzwksr.js";
77
80
  import {
78
81
  resumedTaskModelSelection,
79
82
  init_model_pin,
@@ -83,7 +86,7 @@ import {
83
86
  init_azure_devops,
84
87
  resolveScriptsOnlyMode,
85
88
  init_scripts_only_mode
86
- } from "./cli-1yekbyqm.js";
89
+ } from "./cli-1338796d.js";
87
90
  import {
88
91
  terminateRegisteredProcessGroups,
89
92
  init_process_group
@@ -91,14 +94,14 @@ import {
91
94
  import {
92
95
  validateJsonSchema,
93
96
  init_json_schema_validator
94
- } from "./cli-pwyevs29.js";
97
+ } from "./cli-spknvxbq.js";
95
98
  import {
96
99
  authJsonToCredentialSelection,
97
100
  credentialsToAuthJson,
98
101
  init_auth_json,
99
102
  loadAllCodexOAuthSlots,
100
103
  init_storage
101
- } from "./cli-jg0nfda6.js";
104
+ } from "./cli-75gkpjvw.js";
102
105
  import {
103
106
  isPollTracingEnabled,
104
107
  initOtel,
@@ -110,15 +113,13 @@ import {
110
113
  initialize,
111
114
  ensure,
112
115
  init_business_use
113
- } from "./cli-1gm8jcyr.js";
116
+ } from "./cli-wvaawacd.js";
114
117
  import {
115
118
  mapTriggerSurface,
116
119
  init_telemetry_context,
117
120
  initTelemetry,
118
121
  telemetry,
119
122
  init_telemetry,
120
- isCodexAuthFailureReason,
121
- init_codex_auth_failure,
122
123
  isEnvExportRestrictedKey,
123
124
  init_config_env_export,
124
125
  MASKED_SECRET_VALUE,
@@ -128,7 +129,7 @@ import {
128
129
  init_vcs_repo_match,
129
130
  isApiDrainingResponse,
130
131
  init_api_drain2
131
- } from "./cli-1s1dqn1j.js";
132
+ } from "./cli-1ayk1eas.js";
132
133
  import {
133
134
  parseWorkerModelTierOverrides,
134
135
  resolveTaskModelSelection,
@@ -136,7 +137,11 @@ import {
136
137
  ProviderNameSchema,
137
138
  WorkerNudgeSchema,
138
139
  init_types4
139
- } from "./cli-41z8xwj0.js";
140
+ } from "./cli-7wspm5gm.js";
141
+ import {
142
+ isCodexAuthFailureReason,
143
+ init_codex_auth_failure
144
+ } from "./cli-fw2w0kva.js";
140
145
  import {
141
146
  generateDefaultClaudeMd2,
142
147
  generateDefaultSoulMd2,
@@ -160,14 +165,14 @@ import {
160
165
  resolveClaudeMdPath,
161
166
  syncProfileFilesToServer,
162
167
  init_profile_sync
163
- } from "./cli-ycm6180s.js";
168
+ } from "./cli-a7v854rf.js";
164
169
  import {
165
170
  isSteeringEnabled2,
166
171
  init_steering_enabled
167
172
  } from "./cli-4sydckyj.js";
168
173
  import {
169
174
  init_templates4
170
- } from "./cli-v726afdm.js";
175
+ } from "./cli-2pnswgh8.js";
171
176
  import {
172
177
  validateRoute,
173
178
  deriveDefaultRoute,
@@ -184,19 +189,19 @@ import {
184
189
  CLAUDE_CREDENTIALS_HINT,
185
190
  resolveCredentialPools,
186
191
  init_credentials2
187
- } from "./cli-aq58fk5m.js";
192
+ } from "./cli-g83s9ewh.js";
188
193
  import {
189
194
  interpolate,
190
195
  init_template2,
191
196
  configureHttpResolver,
192
197
  resolveTemplateAsync,
193
198
  init_resolver
194
- } from "./cli-j4kw3rsx.js";
199
+ } from "./cli-cm5yqn35.js";
195
200
  import {
196
201
  runtimeHarnessSections,
197
202
  refreshRuntimeModelCatalog,
198
203
  init_runtime_model_catalog
199
- } from "./cli-a2jw6ee5.js";
204
+ } from "./cli-1p89xny0.js";
200
205
  import {
201
206
  getMcpBaseUrl,
202
207
  init_constants3
@@ -214,17 +219,20 @@ import {
214
219
  registerEnvSecrets,
215
220
  registerSensitiveKeyName,
216
221
  init_secret_scrubber
217
- } from "./cli-a4btqqft.js";
222
+ } from "./cli-1b7btd38.js";
218
223
  import {
224
+ isChatgptSubscriptionModel,
219
225
  harnessModelMismatch,
220
226
  openAICompatibleProviders,
221
227
  openAICompatibleKeyVars,
222
228
  providerBaseUrl,
229
+ openAICompatibleProvider,
223
230
  providerKeyFromEnv,
224
231
  init_src2
225
- } from "./cli-4r12t6w6.js";
232
+ } from "./cli-5c4hjzne.js";
226
233
 
227
234
  // src/commands/runner.ts
235
+ init_src2();
228
236
  init_src();
229
237
  init_otel();
230
238
  init_base_prompt();
@@ -263,51 +271,55 @@ init_storage();
263
271
  async function createProviderAdapter(provider) {
264
272
  switch (provider) {
265
273
  case "claude": {
266
- const { ClaudeAdapter } = await import("./claude-adapter-t00wrzeh.js");
274
+ const { ClaudeAdapter } = await import("./claude-adapter-8j4hm099.js");
267
275
  return new ClaudeAdapter;
268
276
  }
269
277
  case "pi": {
270
- const { PiMonoAdapter } = await import("./pi-mono-adapter-f8h5yseh.js");
278
+ const { PiMonoAdapter } = await import("./pi-mono-adapter-rzmpb72a.js");
271
279
  return new PiMonoAdapter;
272
280
  }
273
281
  case "codex": {
274
- const { CodexAdapter } = await import("./codex-adapter-g0gctw29.js");
282
+ const { CodexAdapter } = await import("./codex-adapter-q6k3gnyg.js");
275
283
  return new CodexAdapter;
276
284
  }
277
285
  case "claude-managed": {
278
- const { ClaudeManagedAdapter } = await import("./claude-managed-adapter-g6vmjccb.js");
286
+ const { ClaudeManagedAdapter } = await import("./claude-managed-adapter-dvs2xw5n.js");
279
287
  return new ClaudeManagedAdapter;
280
288
  }
281
289
  case "devin": {
282
- const { DevinAdapter } = await import("./devin-adapter-yxm87fe9.js");
290
+ const { DevinAdapter } = await import("./devin-adapter-r9phbnc9.js");
283
291
  return new DevinAdapter;
284
292
  }
285
293
  case "opencode": {
286
- const { OpencodeAdapter } = await import("./opencode-adapter-gtfd7d7v.js");
294
+ const { OpencodeAdapter } = await import("./opencode-adapter-p2nkb5am.js");
287
295
  return new OpencodeAdapter;
288
296
  }
289
297
  case "dsh": {
290
- const { DshAdapter } = await import("./dsh-adapter-btewem0y.js");
298
+ const { DshAdapter } = await import("./dsh-adapter-ftyy8dnp.js");
291
299
  return new DshAdapter;
292
300
  }
293
301
  case "amp": {
294
- const { AmpAdapter } = await import("./amp-adapter-0s58gm46.js");
302
+ const { AmpAdapter } = await import("./amp-adapter-z3s0ssdt.js");
295
303
  return new AmpAdapter;
296
304
  }
297
305
  case "cursor": {
298
- const { CursorAdapter } = await import("./cursor-adapter-m5b98pvk.js");
306
+ const { CursorAdapter } = await import("./cursor-adapter-yf47w4t0.js");
299
307
  return new CursorAdapter;
300
308
  }
301
309
  case "grok": {
302
- const { GrokAdapter } = await import("./grok-adapter-05ecv4h0.js");
310
+ const { GrokAdapter } = await import("./grok-adapter-sm4m5k4g.js");
303
311
  return new GrokAdapter;
304
312
  }
313
+ case "fx": {
314
+ const { FxAdapter } = await import("./fx-adapter-gt6pncj2.js");
315
+ return new FxAdapter;
316
+ }
305
317
  case "acp": {
306
- const { ACPAdapter } = await import("./acp-adapter-96dc64m2.js");
318
+ const { ACPAdapter } = await import("./acp-adapter-g3ads55s.js");
307
319
  return new ACPAdapter;
308
320
  }
309
321
  default:
310
- throw new Error(`Unknown HARNESS_PROVIDER: "${provider}". Supported: claude, pi, codex, devin, claude-managed, opencode, acp, dsh, cursor, amp, grok`);
322
+ throw new Error(`Unknown HARNESS_PROVIDER: "${provider}". Supported: claude, pi, codex, devin, claude-managed, opencode, acp, dsh, cursor, amp, grok, fx`);
311
323
  }
312
324
  }
313
325
 
@@ -1285,20 +1297,22 @@ var REQUIRED_CRED_VARS_BY_PROVIDER = {
1285
1297
  dsh: ["DEEPSEEK_API_KEY", "OPENROUTER_API_KEY"],
1286
1298
  amp: ["AMP_API_KEY"],
1287
1299
  cursor: ["CURSOR_API_KEY"],
1288
- grok: ["XAI_API_KEY", "OPENROUTER_API_KEY"]
1300
+ grok: ["XAI_API_KEY", "OPENROUTER_API_KEY"],
1301
+ fx: ["OPENROUTER_API_KEY", "OPENAI_API_KEY", "AI_GATEWAY_API_KEY"]
1289
1302
  };
1290
1303
  var CREDENTIAL_PROVIDER_CHECKERS = {
1291
1304
  dsh: (env) => checkDshCredentials2(env),
1292
1305
  amp: (env) => checkAmpCredentials2(env),
1293
1306
  cursor: (env) => checkCursorCredentials2(env),
1294
1307
  grok: (env) => checkGrokCredentials2(env),
1308
+ fx: (env) => checkFxCredentials2(env),
1295
1309
  claude: (env) => checkClaudeCredentials2(env),
1296
1310
  "claude-managed": (env) => checkClaudeManagedCredentials2(env),
1297
1311
  codex: (env, opts) => checkCodexCredentials2(env, opts),
1298
1312
  devin: (env) => checkDevinCredentials2(env),
1299
1313
  opencode: (env, opts) => checkOpencodeCredentials2(env, opts),
1300
1314
  pi: async (env, opts) => {
1301
- const { checkPiMonoCredentials, listPiOpencodeGoModelIds } = await import("./pi-mono-adapter-f8h5yseh.js");
1315
+ const { checkPiMonoCredentials, listPiOpencodeGoModelIds } = await import("./pi-mono-adapter-rzmpb72a.js");
1302
1316
  return {
1303
1317
  ...await checkPiMonoCredentials(env, opts),
1304
1318
  opencodeGoModels: listPiOpencodeGoModelIds()
@@ -1577,7 +1591,7 @@ async function validateProviderCredentials(provider, env = process.env, presence
1577
1591
  latency_ms: Date.now() - startedAt
1578
1592
  };
1579
1593
  }
1580
- const { liveTestCursorKey } = await import("./cursor-adapter-m5b98pvk.js");
1594
+ const { liveTestCursorKey } = await import("./cursor-adapter-yf47w4t0.js");
1581
1595
  return checkEachKey("CURSOR_API_KEY", apiKey, async (member) => {
1582
1596
  const start = Date.now();
1583
1597
  const result = await liveTestCursorKey(member);
@@ -1598,12 +1612,31 @@ async function validateProviderCredentials(provider, env = process.env, presence
1598
1612
  latency_ms: Date.now() - startedAt
1599
1613
  };
1600
1614
  }
1615
+ case "fx": {
1616
+ const openRouterKey = env.OPENROUTER_API_KEY?.trim();
1617
+ if (openRouterKey) {
1618
+ return checkEachKey("OPENROUTER_API_KEY", openRouterKey, checkOpenRouter);
1619
+ }
1620
+ const openAiKey = env.OPENAI_API_KEY?.trim();
1621
+ if (openAiKey)
1622
+ return checkEachKey("OPENAI_API_KEY", openAiKey, checkOpenAiApiKey);
1623
+ const gatewayKey = env.AI_GATEWAY_API_KEY?.trim();
1624
+ const gateway = openAICompatibleProvider("vercel");
1625
+ if (gatewayKey && gateway) {
1626
+ return checkEachKey("AI_GATEWAY_API_KEY", gatewayKey, (member) => checkOpenAICompatibleProvider(gateway, member));
1627
+ }
1628
+ return {
1629
+ ok: false,
1630
+ error: "Set OPENROUTER_API_KEY, OPENAI_API_KEY or AI_GATEWAY_API_KEY for fx.",
1631
+ latency_ms: Date.now() - startedAt
1632
+ };
1633
+ }
1601
1634
  case "acp":
1602
1635
  return presenceCheckOk();
1603
1636
  default:
1604
1637
  return {
1605
1638
  ok: false,
1606
- error: `Unknown provider "${provider}". Supported: claude, claude-managed, codex, devin, opencode, pi, acp, dsh, cursor, amp, grok.`,
1639
+ error: `Unknown provider "${provider}". Supported: claude, claude-managed, codex, devin, opencode, pi, acp, dsh, cursor, amp, grok, fx.`,
1607
1640
  latency_ms: Date.now() - startedAt
1608
1641
  };
1609
1642
  }
@@ -2743,6 +2776,7 @@ var SWARM_TOOL_LABELS = {
2743
2776
  "slack-list-channels": "\uD83D\uDCAC Listing Slack channels",
2744
2777
  "slack-download-file": "\uD83D\uDCE5 Downloading from Slack",
2745
2778
  "slack-upload-file": "\uD83D\uDCE4 Uploading to Slack",
2779
+ "slack-leave-thread": "\uD83D\uDCAC Leaving Slack thread",
2746
2780
  "tracker-status": "\uD83D\uDCCA Checking tracker status",
2747
2781
  "tracker-sync-status": "\uD83D\uDCCA Syncing tracker status",
2748
2782
  "tracker-link-task": "\uD83D\uDD17 Linking task to tracker",
@@ -3150,7 +3184,7 @@ async function reportKeyUsage(apiUrl, apiKey, keyType, selection, taskId) {
3150
3184
  });
3151
3185
  } catch {}
3152
3186
  }
3153
- async function resolveCodexOAuthCredentialInfo(apiUrl, apiKey) {
3187
+ async function resolveCodexOAuthCredentialInfo(apiUrl, apiKey, opts = {}) {
3154
3188
  if (apiUrl && apiKey) {
3155
3189
  try {
3156
3190
  const slots = await loadAllCodexOAuthSlots(apiUrl, apiKey);
@@ -3179,9 +3213,11 @@ async function resolveCodexOAuthCredentialInfo(apiUrl, apiKey) {
3179
3213
  }
3180
3214
  const slotEntry = slots.find((s) => s.slot === selectedSlot);
3181
3215
  if (slotEntry) {
3182
- await materializeCodexAuthJson(selectedSlot, slotEntry.creds, {
3183
- includeRefreshToken: false
3184
- });
3216
+ if (!opts.poolOnly) {
3217
+ await materializeCodexAuthJson(selectedSlot, slotEntry.creds, {
3218
+ includeRefreshToken: false
3219
+ });
3220
+ }
3185
3221
  const authJson = credentialsToAuthJson(slotEntry.creds, {
3186
3222
  includeRefreshToken: false
3187
3223
  });
@@ -3197,6 +3233,8 @@ async function resolveCodexOAuthCredentialInfo(apiUrl, apiKey) {
3197
3233
  console.warn(`[credentials] Codex OAuth pool selection failed (non-fatal): ${err}`);
3198
3234
  }
3199
3235
  }
3236
+ if (opts.poolOnly)
3237
+ return null;
3200
3238
  try {
3201
3239
  const home = process.env.HOME;
3202
3240
  if (!home)
@@ -3265,6 +3303,20 @@ async function reportKeyCompletionOutcome(opts) {
3265
3303
  await reportKeyAuthFailure(apiUrl, apiKey, credential.keyType, credential.keySuffix, credential.keyIndex, taskId, timeoutMs);
3266
3304
  }
3267
3305
  }
3306
+ async function createSessionReportingAuthFailure(adapter, config, report) {
3307
+ try {
3308
+ return await adapter.createSession(config);
3309
+ } catch (err) {
3310
+ if (report) {
3311
+ await reportKeyCompletionOutcome({
3312
+ ...report,
3313
+ exitCode: 1,
3314
+ failureReason: err instanceof Error ? err.message : String(err)
3315
+ });
3316
+ }
3317
+ throw err;
3318
+ }
3319
+ }
3268
3320
  async function supersedeTaskViaAPI(config, role, taskId, reason) {
3269
3321
  const headers = {
3270
3322
  "X-Agent-ID": config.agentId,
@@ -4425,6 +4477,15 @@ async function spawnProviderProcess(adapter, opts, logDir, isYolo) {
4425
4477
  if (oauthSelection && realTaskId && oauthIsPrimary) {
4426
4478
  reportKeyUsage(opts.apiUrl, opts.apiKey, oauthSelection.keyType, oauthSelection, realTaskId).catch(() => {});
4427
4479
  }
4480
+ } else if (adapter.name === "pi" && isChatgptSubscriptionModel(model)) {
4481
+ const oauthInfo = await resolveCodexOAuthCredentialInfo(opts.apiUrl, opts.apiKey, {
4482
+ poolOnly: true
4483
+ });
4484
+ oauthSelection = oauthInfo?.selection;
4485
+ oauthIsPoolBacked = oauthInfo?.isPoolBacked ?? false;
4486
+ if (oauthSelection && realTaskId) {
4487
+ reportKeyUsage(opts.apiUrl, opts.apiKey, oauthSelection.keyType, oauthSelection, realTaskId).catch(() => {});
4488
+ }
4428
4489
  }
4429
4490
  const skillInvokes = createSkillInvokeTracker();
4430
4491
  const config = {
@@ -4459,7 +4520,16 @@ async function spawnProviderProcess(adapter, opts, logDir, isYolo) {
4459
4520
  "gen_ai.request.model": model || undefined
4460
4521
  });
4461
4522
  const session = await withSpanContext2(sessionSpan, () => withSpan2("worker.session.create", async (span) => {
4462
- const createdSession = await adapter.createSession(config);
4523
+ const createdSession = await createSessionReportingAuthFailure(adapter, config, oauthSelection && oauthIsPoolBacked && realTaskId ? {
4524
+ apiUrl: opts.apiUrl,
4525
+ apiKey: opts.apiKey,
4526
+ credential: {
4527
+ keyType: oauthSelection.keyType,
4528
+ keySuffix: oauthSelection.keySuffix,
4529
+ keyIndex: oauthSelection.index
4530
+ },
4531
+ taskId: realTaskId
4532
+ } : undefined);
4463
4533
  span.setAttribute("agentswarm.provider.session_id", createdSession.sessionId || "pending");
4464
4534
  return createdSession;
4465
4535
  }, {
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  init_package,
3
3
  package_default
4
- } from "./cli-pe09p6dv.js";
4
+ } from "./cli-tqgg40ek.js";
5
5
 
6
6
  // src/commands/shared/client-config.ts
7
7
  init_package();
@@ -7,7 +7,7 @@ import {
7
7
  import {
8
8
  assertUrlSafe,
9
9
  init_egress_guard
10
- } from "./cli-1s1dqn1j.js";
10
+ } from "./cli-1ayk1eas.js";
11
11
  import {
12
12
  isDevOrTestNodeEnv,
13
13
  init_node_env
@@ -20,7 +20,7 @@ import {
20
20
  scrubSecrets,
21
21
  registerVolatileSecret,
22
22
  init_secret_scrubber
23
- } from "./cli-a4btqqft.js";
23
+ } from "./cli-1b7btd38.js";
24
24
  import {
25
25
  __esm
26
26
  } from "./cli-242037k3.js";
@@ -2,7 +2,7 @@ import {
2
2
  persistCodexOAuth,
3
3
  getValidCodexOAuth,
4
4
  init_storage
5
- } from "./cli-jg0nfda6.js";
5
+ } from "./cli-75gkpjvw.js";
6
6
  import {
7
7
  registerSessionResourceCleanup,
8
8
  cleanupSessionResources,
@@ -118,7 +118,7 @@ import {
118
118
  init_src,
119
119
  selectCredential,
120
120
  init_credentials2
121
- } from "./cli-aq58fk5m.js";
121
+ } from "./cli-g83s9ewh.js";
122
122
  import {
123
123
  __export,
124
124
  __esm
@@ -5,12 +5,12 @@ import {
5
5
  import {
6
6
  publicEndpointSsrfOptions,
7
7
  init_mcp_wrapper
8
- } from "./cli-k76tgq03.js";
8
+ } from "./cli-pywf3eh5.js";
9
9
  import {
10
10
  normalizeOrgWebsite,
11
11
  init_org_website,
12
12
  assertUrlSafe
13
- } from "./cli-1s1dqn1j.js";
13
+ } from "./cli-1ayk1eas.js";
14
14
  import {
15
15
  getOpenRouterBaseUrl,
16
16
  getOpenRouterAttributionHeaders,
@@ -21,16 +21,16 @@ import {
21
21
  createScopedFetch,
22
22
  deriveDefaultRoute,
23
23
  init_src
24
- } from "./cli-aq58fk5m.js";
24
+ } from "./cli-g83s9ewh.js";
25
25
  import {
26
26
  scrubSecrets,
27
27
  init_secret_scrubber
28
- } from "./cli-a4btqqft.js";
28
+ } from "./cli-1b7btd38.js";
29
29
  import {
30
30
  providerBaseUrl,
31
31
  providerForKeyVar,
32
32
  init_src2
33
- } from "./cli-4r12t6w6.js";
33
+ } from "./cli-5c4hjzne.js";
34
34
 
35
35
  // src/utils/lead-monitor-channels.ts
36
36
  function isLeadChannelMonitoringEnabled(env = process.env) {