@desplega.ai/agent-swarm 2.7.5 → 2.7.6

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 (206) hide show
  1. package/dist/{acp-adapter-g3ads55s.js → acp-adapter-bp91d37f.js} +4 -4
  2. package/dist/{actions-zwfykqqk.js → actions-yj0eeaqh.js} +18 -17
  3. package/dist/{amp-adapter-z3s0ssdt.js → amp-adapter-4pg9h34q.js} +1 -1
  4. package/dist/{app-vmp4fgep.js → app-909e97cr.js} +3 -3
  5. package/dist/{assistant-vwde653f.js → assistant-qdyb5fyy.js} +24 -22
  6. package/dist/{boot-reembed-375t7tbk.js → boot-reembed-fk0s9z18.js} +1 -1
  7. package/dist/{boot-reembed-gq9rcpnj.js → boot-reembed-gs1rzrnh.js} +1 -1
  8. package/dist/{boot-scrub-sweep-nd938kyf.js → boot-scrub-sweep-4qfd4kfx.js} +2 -2
  9. package/dist/{boot-seeds-aykx51v3.js → boot-seeds-yr00k13d.js} +4 -4
  10. package/dist/{boxd-k1j26g3h.js → boxd-vdmfssd9.js} +4 -4
  11. package/dist/{claude-adapter-8j4hm099.js → claude-adapter-qta1f1xn.js} +3 -3
  12. package/dist/{claude-managed-setup-0wyynpn1.js → claude-managed-setup-sc6j4dm0.js} +1 -1
  13. package/dist/{claude-sdk-session-q6wj5hmy.js → claude-sdk-session-zgrz6yvc.js} +9169 -9070
  14. package/dist/{cli-gjr2y2xk.js → cli-0agcv1v5.js} +4 -1
  15. package/dist/{cli-vqypxzh4.js → cli-0at8w34w.js} +7 -7
  16. package/dist/{cli-7a42nfy0.js → cli-0qatpy8q.js} +3 -3
  17. package/dist/{cli-p599f1qm.js → cli-0yv5z2pg.js} +1 -1
  18. package/dist/{cli-0gey5fzy.js → cli-386tyxxg.js} +2 -2
  19. package/dist/{cli-5pag6rmn.js → cli-3ypk9vk1.js} +1 -1
  20. package/dist/{cli-qxnf8z2z.js → cli-436532ck.js} +2 -2
  21. package/dist/{cli-z8eh3ex8.js → cli-4necwtsv.js} +4 -4
  22. package/dist/{cli-zh3fp8v2.js → cli-54t00gt8.js} +1 -1
  23. package/dist/{cli-hf6zt5m6.js → cli-69szn7w7.js} +17 -1
  24. package/dist/{cli-nn4d8dne.js → cli-89knwags.js} +2 -2
  25. package/dist/{cli-spknvxbq.js → cli-8bc1w0tw.js} +10 -10
  26. package/dist/{cli-rqkxrmgw.js → cli-8snvgs5r.js} +38 -13
  27. package/dist/{cli-rhw40jgb.js → cli-bjb3z51z.js} +2 -2
  28. package/dist/{cli-xtjhfmpc.js → cli-c60vetmm.js} +1 -1
  29. package/dist/{cli-0731hvbw.js → cli-decfb6v8.js} +2 -2
  30. package/dist/{cli-bhjt02p8.js → cli-drr5v6av.js} +1 -1
  31. package/dist/{cli-fqzx7gwa.js → cli-dxae2yg7.js} +2 -2
  32. package/dist/{cli-tqgg40ek.js → cli-e3r2neck.js} +8 -7
  33. package/dist/{cli-zppwg9p9.js → cli-ekwks2vs.js} +1 -1
  34. package/dist/{cli-nzxr556s.js → cli-es6va8jk.js} +26 -26
  35. package/dist/{cli-a47xy8eq.js → cli-faxe6thg.js} +1 -1
  36. package/dist/cli-gdhpcbhf.js +55 -0
  37. package/dist/{cli-82jg7fp9.js → cli-he5nxaa8.js} +1 -1
  38. package/dist/{cli-8veytvbh.js → cli-he9wchme.js} +1 -1
  39. package/dist/{cli-pywf3eh5.js → cli-hgaazk69.js} +1 -1
  40. package/dist/{cli-0bxqnvq9.js → cli-hr2e2fft.js} +28 -6
  41. package/dist/{cli-1ayk1eas.js → cli-k2gzwsj2.js} +135 -26
  42. package/dist/{cli-xbkdm710.js → cli-kqdg1bsb.js} +3 -3
  43. package/dist/cli-m2z8jagn.js +12078 -0
  44. package/dist/{cli-g61qxmge.js → cli-m48g6p95.js} +3 -3
  45. package/dist/{cli-7wspm5gm.js → cli-nhrvpaj7.js} +20 -4
  46. package/dist/{cli-afrrppsw.js → cli-nwj0ee2w.js} +2 -2
  47. package/dist/{cli-3h4nhjn8.js → cli-p5gp8pcx.js} +9 -7
  48. package/dist/{cli-rm6hqj3z.js → cli-pd7vagab.js} +33 -139
  49. package/dist/{cli-mjzynrse.js → cli-q0k1w5zd.js} +1 -1
  50. package/dist/{cli-8hs41zy2.js → cli-rmmmrjkd.js} +1 -1
  51. package/dist/{cli-kg8hchyg.js → cli-sa02jsqt.js} +1 -1
  52. package/dist/{cli-1338796d.js → cli-shpbx5ee.js} +142 -98
  53. package/dist/{cli-82ae98pz.js → cli-svj5090z.js} +2 -2
  54. package/dist/{cli-bnz7a7qf.js → cli-vvpx3gsx.js} +1 -1
  55. package/dist/{cli-mmwm7zbf.js → cli-w6dt9ged.js} +1 -1
  56. package/dist/{cli-wvaawacd.js → cli-waqbxg08.js} +5230 -66
  57. package/dist/{cli-j3jvnpe8.js → cli-wp9sp1qb.js} +1 -1
  58. package/dist/{cli-nmbmy64z.js → cli-xbbndvjy.js} +3 -3
  59. package/dist/{cli-vbyfwh92.js → cli-xds5f77d.js} +2 -2
  60. package/dist/{cli-7wcyk2s5.js → cli-xnqgpshy.js} +1 -1
  61. package/dist/{cli-rpm2sgv0.js → cli-xnrwazav.js} +19 -2
  62. package/dist/{cli-gf5hbmdr.js → cli-yjdgea32.js} +3 -3
  63. package/dist/{cli-mry0qzym.js → cli-yn4kxs06.js} +123 -10
  64. package/dist/{cli-hn9hxmz9.js → cli-yx4kfngt.js} +1 -1
  65. package/dist/{cli-y24sc29k.js → cli-yy3rhsdw.js} +30 -8
  66. package/dist/{cli-6s7vdcta.js → cli-zbbwez0r.js} +4 -4
  67. package/dist/{cli-z6jkx23q.js → cli-zm72anhg.js} +9 -9
  68. package/dist/cli.js +22 -21
  69. package/dist/{codex-adapter-q6k3gnyg.js → codex-adapter-ayd1fb6h.js} +2 -2
  70. package/dist/{codex-session-runner-3mwmk3d9.js → codex-session-runner-jesa32xc.js} +2 -2
  71. package/dist/{commands-evrenjn9.js → commands-hanewgf2.js} +9 -3
  72. package/dist/{controller-xjp8vswh.js → controller-dt1n3c1q.js} +8 -3
  73. package/dist/{controllers-connect-pp5jnxvc.js → controllers-connect-xx8x64n5.js} +20 -19
  74. package/dist/{cursor-adapter-yf47w4t0.js → cursor-adapter-9s4dwwdw.js} +1 -1
  75. package/dist/{db-zxpw6aht.js → db-3vttcbv4.js} +3 -3
  76. package/dist/{db-rgfsh91f.js → db-9dv0g1ab.js} +11 -3
  77. package/dist/{devtools-82fzqra8.js → devtools-qxfgbsqz.js} +1 -1
  78. package/dist/{dispatcher-smasgws7.js → dispatcher-tx9hd1sv.js} +17 -16
  79. package/dist/{docker-rrjhaqt9.js → docker-c1a3gqmf.js} +89 -22
  80. package/dist/{dsh-adapter-ftyy8dnp.js → dsh-adapter-007y4ejs.js} +1 -1
  81. package/dist/{e2b-qcaj675y.js → e2b-a19d28rz.js} +2 -2
  82. package/dist/{e2b-w1p0bnpm.js → e2b-we6hs6q5.js} +4 -4
  83. package/dist/{easter-egg-3d-yyts7p16.js → easter-egg-3d-rgbrqb8s.js} +1 -1
  84. package/dist/{embedding-space-1z0mbg95.js → embedding-space-ny1e2940.js} +6 -6
  85. package/dist/{embeddings-ygeg7tm7.js → embeddings-2t386t13.js} +1 -1
  86. package/dist/{execute-14qhqp4d.js → execute-pksh0ceh.js} +1 -1
  87. package/dist/{external-channel-ttgrs3sx.js → external-channel-phgmhmd7.js} +2 -2
  88. package/dist/{fx-adapter-gt6pncj2.js → fx-adapter-fy8rr921.js} +5 -5
  89. package/dist/{google-generative-ai-yvmdxyxa.js → google-generative-ai-8y3m3k4b.js} +1 -1
  90. package/dist/{google-vertex-jrtdh9gs.js → google-vertex-w3v98n7b.js} +1 -1
  91. package/dist/{grok-adapter-sm4m5k4g.js → grok-adapter-q0abvpaj.js} +5 -5
  92. package/dist/handlers-by3sfxyx.js +32 -0
  93. package/dist/{heartbeat-qahz4p62.js → heartbeat-kadyek8p.js} +20 -19
  94. package/dist/{hook-kj3d398m.js → hook-5zs3msf6.js} +2 -2
  95. package/dist/{hook-4fd5wq5w.js → hook-9k551xnj.js} +2 -2
  96. package/dist/{http-1ted0j1k.js → http-mhz9vw1f.js} +213 -80
  97. package/dist/index-4f2pvxae.js +37 -0
  98. package/dist/index-98gz7tmp.js +30 -0
  99. package/dist/{index-5rk6rfzr.js → index-fvzke5kx.js} +1 -1
  100. package/dist/index-k08z2cak.js +33 -0
  101. package/dist/{index-yqhz88yy.js → index-pxn30mse.js} +8 -8
  102. package/dist/{index-6rq3r5zb.js → index-q361cg2f.js} +1 -1
  103. package/dist/{index-7v51awbn.js → index-rvr00sg7.js} +20 -13
  104. package/dist/{index-q4b917zs.js → index-vdygbq10.js} +1 -1
  105. package/dist/{keepalive-6cf311t5.js → keepalive-w56f32cg.js} +3 -3
  106. package/dist/{lead-fjy418cw.js → lead-enq35nqp.js} +31 -30
  107. package/dist/{maintenance-a4bm1bmt.js → maintenance-7mdgxcea.js} +1 -1
  108. package/dist/{oauth-refresh-sweep-3h0dfw1k.js → oauth-refresh-sweep-29txy9vk.js} +2 -2
  109. package/dist/{onboard-myn5hraa.js → onboard-kpsrkarj.js} +4 -4
  110. package/dist/{opencode-adapter-p2nkb5am.js → opencode-adapter-j25vm3rr.js} +3 -3
  111. package/dist/{otel-impl-a1a0ef6b.js → otel-impl-6kkct7a8.js} +1 -1
  112. package/dist/{pi-mono-adapter-rzmpb72a.js → pi-mono-adapter-exhkzhn2.js} +4 -4
  113. package/dist/{pricing-refresh-83drrnxj.js → pricing-refresh-n2x7jh6k.js} +3 -3
  114. package/dist/{rbac-roles-s8y6ecb5.js → rbac-roles-81ypx6es.js} +1 -1
  115. package/dist/{rbac-roles-0fb6e7pj.js → rbac-roles-b5htkjby.js} +2 -2
  116. package/dist/{render-v2-twmbgrz4.js → render-v2-qn6jmpk4.js} +3 -3
  117. package/dist/{resume-zfqc36xj.js → resume-wd30wx23.js} +6 -6
  118. package/dist/{runtime-qwggdpqr.js → runtime-4hsg7h60.js} +1 -1
  119. package/dist/{session-access-sc9pn9da.js → session-access-5qvfevhk.js} +4 -4
  120. package/dist/{session-source-backfill-qh07xr8g.js → session-source-backfill-n1czavbr.js} +2 -2
  121. package/dist/{setup-4fr0m7a1.js → setup-dnb56qy5.js} +3 -3
  122. package/dist/{virtual-modules-fh4ha15b.js → virtual-modules-76xxv9fs.js} +2 -2
  123. package/dist/{work-objects-0wr8zxct.js → work-objects-4n21tfkm.js} +20 -19
  124. package/dist/{worker-follow-up-ktyyazyp.js → worker-follow-up-77hvzxww.js} +17 -16
  125. package/dist/{worker-0c5tyzqe.js → worker-gg1576j3.js} +31 -30
  126. package/openapi.json +93 -1
  127. package/package.json +8 -7
  128. package/src/be/db/script-runs.ts +23 -0
  129. package/src/be/db/tasks/read.ts +122 -3
  130. package/src/be/db-client.ts +8 -5
  131. package/src/be/db.ts +15 -4
  132. package/src/be/memory/providers/sqlite-store.ts +49 -12
  133. package/src/be/migrations/260_runtime_pool_cache.sql +20 -0
  134. package/src/be/migrations/262_session_visibility_indexes.sql +18 -0
  135. package/src/be/migrations/263_task_list_filter_index.sql +11 -0
  136. package/src/be/migrations/264_slack_thread_cover_index.sql +9 -0
  137. package/src/be/migrations/266_script_runs_source_task.sql +11 -0
  138. package/src/be/runtime-pools/cache-cleanup.ts +109 -0
  139. package/src/be/runtime-pools/db.ts +65 -6
  140. package/src/be/runtime-pools/remote-controller.ts +5 -0
  141. package/src/be/runtime-pools/supervisor.ts +33 -2
  142. package/src/be/scripts/typecheck.ts +22 -0
  143. package/src/be/seed-scripts/catalog/task-failure-audit.ts +5 -1
  144. package/src/commands/controller.ts +4 -0
  145. package/src/commands/entrypoint-api-readiness.ts +74 -0
  146. package/src/http/index.ts +1 -1
  147. package/src/http/list-total-cache.ts +14 -7
  148. package/src/http/memory.ts +38 -9
  149. package/src/http/script-runs.ts +174 -5
  150. package/src/http/status.ts +10 -2
  151. package/src/http/tasks.ts +4 -2
  152. package/src/providers/amp-adapter.ts +1 -1
  153. package/src/providers/fx-adapter.ts +1 -1
  154. package/src/runtime-providers/controller-protocol.ts +14 -1
  155. package/src/runtime-providers/controller.ts +5 -0
  156. package/src/runtime-providers/docker.ts +108 -23
  157. package/src/runtime-providers/types.ts +16 -0
  158. package/src/script-workflows/workflow-ctx.ts +8 -0
  159. package/src/scripts-runtime/types/stdlib.d.ts +22 -0
  160. package/src/scripts-runtime/types/swarm-sdk.d.ts +22 -0
  161. package/src/server-user.ts +1 -0
  162. package/src/slack/commands.ts +5 -1
  163. package/src/slack/handlers.ts +37 -2
  164. package/src/slack/left-threads.ts +27 -4
  165. package/src/tasks/follow-up-redelegation-guard.ts +155 -0
  166. package/src/tests/claude-artifacts-read-script.test.ts +209 -0
  167. package/src/tests/db-client.test.ts +21 -0
  168. package/src/tests/db-task-read-contract.test.ts +8 -2
  169. package/src/tests/db-task-write-contract.test.ts +5 -1
  170. package/src/tests/entrypoint-api-readiness.test.ts +416 -210
  171. package/src/tests/explicit-model-validation.test.ts +14 -8
  172. package/src/tests/follow-up-redelivery-guard.test.ts +432 -202
  173. package/src/tests/list-total-cache.test.ts +27 -2
  174. package/src/tests/memory-fts-populate.test.ts +11 -9
  175. package/src/tests/memory-retrieval-purge.test.ts +80 -0
  176. package/src/tests/migration-260-runtime-pool-cache.test.ts +118 -0
  177. package/src/tests/query-audit-plans.test.ts +27 -0
  178. package/src/tests/runtime-cache-cleanup.test.ts +367 -0
  179. package/src/tests/runtime-e2b-pools.test.ts +41 -0
  180. package/src/tests/runtime-pools-db.test.ts +98 -0
  181. package/src/tests/runtime-pools-http.test.ts +29 -0
  182. package/src/tests/runtime-providers-docker.test.ts +253 -0
  183. package/src/tests/runtime-remote-controller.test.ts +66 -2
  184. package/src/tests/runtime-supervisor.test.ts +66 -2
  185. package/src/tests/script-connections.test.ts +11 -0
  186. package/src/tests/script-runs-http.test.ts +684 -2
  187. package/src/tests/seed-scripts.test.ts +26 -0
  188. package/src/tests/slack-leave-thread.test.ts +145 -5
  189. package/src/tests/slack-render-v2-query-plans.test.ts +24 -2
  190. package/src/tests/status.test.ts +11 -0
  191. package/src/tests/tasks-readable-row.test.ts +155 -0
  192. package/src/tools/send-task.ts +35 -47
  193. package/src/tools/slack-leave-thread.ts +1 -1
  194. package/src/tools/task-dedup.ts +45 -21
  195. package/src/types.ts +38 -0
  196. package/templates/skills/composio-google-docs/content.md +10 -0
  197. package/templates/skills/script-workflows/content.md +19 -1
  198. package/templates/skills/swarm-docs/content.md +1 -0
  199. package/templates/skills/swarm-scripts/SKILL.md +2 -0
  200. package/templates/skills/swarm-scripts/content.md +2 -0
  201. package/dist/cli-dznrgaep.js +0 -30
  202. package/dist/cli-w3hcrxht.js +0 -6985
  203. package/dist/handlers-vwmba1m2.js +0 -31
  204. package/dist/index-5r71rf98.js +0 -32
  205. package/dist/index-anmwxs87.js +0 -29
  206. package/dist/index-spp0ra5c.js +0 -36
@@ -11,7 +11,7 @@ import {
11
11
  checkDeepSeekApiKey,
12
12
  checkOpenAICompatibleProvider,
13
13
  writeSkillsToFilesystem
14
- } from "./cli-rhw40jgb.js";
14
+ } from "./cli-bjb3z51z.js";
15
15
  import {
16
16
  renderSteeringDelivery
17
17
  } from "./cli-ftyxyspd.js";
@@ -38,35 +38,35 @@ import {
38
38
  import {
39
39
  checkAmpCredentials2,
40
40
  liveTestAmpCredentials2
41
- } from "./cli-afrrppsw.js";
41
+ } from "./cli-nwj0ee2w.js";
42
42
  import {
43
43
  checkClaudeCredentials2
44
- } from "./cli-82ae98pz.js";
44
+ } from "./cli-svj5090z.js";
45
45
  import {
46
46
  checkClaudeManagedCredentials2
47
47
  } from "./cli-vfym7wmz.js";
48
48
  import {
49
49
  codexUserHome,
50
50
  checkCodexCredentials2
51
- } from "./cli-7a42nfy0.js";
51
+ } from "./cli-0qatpy8q.js";
52
52
  import {
53
53
  checkCursorCredentials2
54
- } from "./cli-j3jvnpe8.js";
54
+ } from "./cli-wp9sp1qb.js";
55
55
  import {
56
56
  checkDevinCredentials2
57
57
  } from "./cli-srye3vdt.js";
58
58
  import {
59
59
  checkDshCredentials2
60
- } from "./cli-bnz7a7qf.js";
60
+ } from "./cli-vvpx3gsx.js";
61
61
  import {
62
62
  checkOpencodeCredentials2
63
- } from "./cli-zppwg9p9.js";
63
+ } from "./cli-ekwks2vs.js";
64
64
  import {
65
65
  checkFxCredentials2
66
- } from "./cli-zh3fp8v2.js";
66
+ } from "./cli-54t00gt8.js";
67
67
  import {
68
68
  checkGrokCredentials2
69
- } from "./cli-5pag6rmn.js";
69
+ } from "./cli-3ypk9vk1.js";
70
70
  import {
71
71
  CODEX_OAUTH_POOL_SLOTS_ENV,
72
72
  isCodexOAuthConfigKey,
@@ -86,7 +86,7 @@ import {
86
86
  init_azure_devops,
87
87
  resolveScriptsOnlyMode,
88
88
  init_scripts_only_mode
89
- } from "./cli-1338796d.js";
89
+ } from "./cli-shpbx5ee.js";
90
90
  import {
91
91
  terminateRegisteredProcessGroups,
92
92
  init_process_group
@@ -94,7 +94,7 @@ import {
94
94
  import {
95
95
  validateJsonSchema,
96
96
  init_json_schema_validator
97
- } from "./cli-spknvxbq.js";
97
+ } from "./cli-8bc1w0tw.js";
98
98
  import {
99
99
  authJsonToCredentialSelection,
100
100
  credentialsToAuthJson,
@@ -113,7 +113,7 @@ import {
113
113
  initialize,
114
114
  ensure,
115
115
  init_business_use
116
- } from "./cli-wvaawacd.js";
116
+ } from "./cli-waqbxg08.js";
117
117
  import {
118
118
  mapTriggerSurface,
119
119
  init_telemetry_context,
@@ -129,7 +129,7 @@ import {
129
129
  init_vcs_repo_match,
130
130
  isApiDrainingResponse,
131
131
  init_api_drain2
132
- } from "./cli-1ayk1eas.js";
132
+ } from "./cli-k2gzwsj2.js";
133
133
  import {
134
134
  parseWorkerModelTierOverrides,
135
135
  resolveTaskModelSelection,
@@ -137,7 +137,7 @@ import {
137
137
  ProviderNameSchema,
138
138
  WorkerNudgeSchema,
139
139
  init_types4
140
- } from "./cli-7wspm5gm.js";
140
+ } from "./cli-nhrvpaj7.js";
141
141
  import {
142
142
  isCodexAuthFailureReason,
143
143
  init_codex_auth_failure
@@ -271,15 +271,15 @@ init_storage();
271
271
  async function createProviderAdapter(provider) {
272
272
  switch (provider) {
273
273
  case "claude": {
274
- const { ClaudeAdapter } = await import("./claude-adapter-8j4hm099.js");
274
+ const { ClaudeAdapter } = await import("./claude-adapter-qta1f1xn.js");
275
275
  return new ClaudeAdapter;
276
276
  }
277
277
  case "pi": {
278
- const { PiMonoAdapter } = await import("./pi-mono-adapter-rzmpb72a.js");
278
+ const { PiMonoAdapter } = await import("./pi-mono-adapter-exhkzhn2.js");
279
279
  return new PiMonoAdapter;
280
280
  }
281
281
  case "codex": {
282
- const { CodexAdapter } = await import("./codex-adapter-q6k3gnyg.js");
282
+ const { CodexAdapter } = await import("./codex-adapter-ayd1fb6h.js");
283
283
  return new CodexAdapter;
284
284
  }
285
285
  case "claude-managed": {
@@ -291,31 +291,31 @@ async function createProviderAdapter(provider) {
291
291
  return new DevinAdapter;
292
292
  }
293
293
  case "opencode": {
294
- const { OpencodeAdapter } = await import("./opencode-adapter-p2nkb5am.js");
294
+ const { OpencodeAdapter } = await import("./opencode-adapter-j25vm3rr.js");
295
295
  return new OpencodeAdapter;
296
296
  }
297
297
  case "dsh": {
298
- const { DshAdapter } = await import("./dsh-adapter-ftyy8dnp.js");
298
+ const { DshAdapter } = await import("./dsh-adapter-007y4ejs.js");
299
299
  return new DshAdapter;
300
300
  }
301
301
  case "amp": {
302
- const { AmpAdapter } = await import("./amp-adapter-z3s0ssdt.js");
302
+ const { AmpAdapter } = await import("./amp-adapter-4pg9h34q.js");
303
303
  return new AmpAdapter;
304
304
  }
305
305
  case "cursor": {
306
- const { CursorAdapter } = await import("./cursor-adapter-yf47w4t0.js");
306
+ const { CursorAdapter } = await import("./cursor-adapter-9s4dwwdw.js");
307
307
  return new CursorAdapter;
308
308
  }
309
309
  case "grok": {
310
- const { GrokAdapter } = await import("./grok-adapter-sm4m5k4g.js");
310
+ const { GrokAdapter } = await import("./grok-adapter-q0abvpaj.js");
311
311
  return new GrokAdapter;
312
312
  }
313
313
  case "fx": {
314
- const { FxAdapter } = await import("./fx-adapter-gt6pncj2.js");
314
+ const { FxAdapter } = await import("./fx-adapter-fy8rr921.js");
315
315
  return new FxAdapter;
316
316
  }
317
317
  case "acp": {
318
- const { ACPAdapter } = await import("./acp-adapter-g3ads55s.js");
318
+ const { ACPAdapter } = await import("./acp-adapter-bp91d37f.js");
319
319
  return new ACPAdapter;
320
320
  }
321
321
  default:
@@ -1312,7 +1312,7 @@ var CREDENTIAL_PROVIDER_CHECKERS = {
1312
1312
  devin: (env) => checkDevinCredentials2(env),
1313
1313
  opencode: (env, opts) => checkOpencodeCredentials2(env, opts),
1314
1314
  pi: async (env, opts) => {
1315
- const { checkPiMonoCredentials, listPiOpencodeGoModelIds } = await import("./pi-mono-adapter-rzmpb72a.js");
1315
+ const { checkPiMonoCredentials, listPiOpencodeGoModelIds } = await import("./pi-mono-adapter-exhkzhn2.js");
1316
1316
  return {
1317
1317
  ...await checkPiMonoCredentials(env, opts),
1318
1318
  opencodeGoModels: listPiOpencodeGoModelIds()
@@ -1591,7 +1591,7 @@ async function validateProviderCredentials(provider, env = process.env, presence
1591
1591
  latency_ms: Date.now() - startedAt
1592
1592
  };
1593
1593
  }
1594
- const { liveTestCursorKey } = await import("./cursor-adapter-yf47w4t0.js");
1594
+ const { liveTestCursorKey } = await import("./cursor-adapter-9s4dwwdw.js");
1595
1595
  return checkEachKey("CURSOR_API_KEY", apiKey, async (member) => {
1596
1596
  const start = Date.now();
1597
1597
  const result = await liveTestCursorKey(member);
@@ -19,7 +19,7 @@ import {
19
19
  init_models,
20
20
  resolveCredential,
21
21
  init_credentials
22
- } from "./cli-qxnf8z2z.js";
22
+ } from "./cli-436532ck.js";
23
23
  import {
24
24
  DEFAULT_OPENROUTER_BASE_URL,
25
25
  getOpenRouterBaseUrl,
@@ -0,0 +1,55 @@
1
+ import {
2
+ getKv2,
3
+ upsertKv2,
4
+ deleteKv2,
5
+ init_db4
6
+ } from "./cli-k2gzwsj2.js";
7
+ import {
8
+ isEnvFlagEnabled,
9
+ init_env_flag
10
+ } from "./cli-cebvbc9t.js";
11
+ import {
12
+ __esm
13
+ } from "./cli-242037k3.js";
14
+
15
+ // src/slack/left-threads.ts
16
+ function isSlackLeaveThreadDisabled() {
17
+ return isEnvFlagEnabled(SLACK_LEAVE_THREAD_DISABLE, false);
18
+ }
19
+ function isSlackLeaveThreadCommand(text, botUserId) {
20
+ const withoutBotMentions = botUserId ? (text ?? "").replaceAll(`<@${botUserId}>`, "") : text ?? "";
21
+ return withoutBotMentions.trim() === "!leave";
22
+ }
23
+ function threadKey(channelId, threadTs) {
24
+ return `${channelId}:${threadTs}`;
25
+ }
26
+ async function leaveSlackThread(channelId, threadTs, leftBy) {
27
+ await upsertKv2({
28
+ namespace: SLACK_LEFT_THREAD_KV_NAMESPACE,
29
+ key: threadKey(channelId, threadTs),
30
+ value: { ...leftBy, leftAt: new Date().toISOString() },
31
+ valueType: "json"
32
+ });
33
+ }
34
+ async function isSlackThreadLeft(channelId, threadTs) {
35
+ return await getKv2(SLACK_LEFT_THREAD_KV_NAMESPACE, threadKey(channelId, threadTs)) !== null;
36
+ }
37
+ async function shouldSkipLeftSlackThread(channelId, threadTs, botMentioned) {
38
+ if (!threadTs)
39
+ return false;
40
+ const key = threadKey(channelId, threadTs);
41
+ if (botMentioned) {
42
+ if (await deleteKv2(SLACK_LEFT_THREAD_KV_NAMESPACE, key)) {
43
+ console.log(`[Slack] Rejoined left thread ${key}: bot mentioned`);
44
+ }
45
+ return false;
46
+ }
47
+ return isSlackThreadLeft(channelId, threadTs);
48
+ }
49
+ var SLACK_LEFT_THREAD_KV_NAMESPACE = "slack-left-thread", SLACK_LEAVE_THREAD_DISABLE = "SLACK_LEAVE_THREAD_DISABLE", SLACK_LEFT_THREAD_CONFIRMATION = "Left this thread. @mention the swarm to bring it back.";
50
+ var init_left_threads = __esm(() => {
51
+ init_db4();
52
+ init_env_flag();
53
+ });
54
+
55
+ export { SLACK_LEAVE_THREAD_DISABLE, isSlackLeaveThreadDisabled, SLACK_LEFT_THREAD_CONFIRMATION, isSlackLeaveThreadCommand, leaveSlackThread, isSlackThreadLeft, shouldSkipLeftSlackThread, init_left_threads };
@@ -15393,7 +15393,7 @@ var styles_default = styles2;
15393
15393
  // node_modules/ink/build/reconciler.js
15394
15394
  if (process3.env["DEV"] === "true") {
15395
15395
  try {
15396
- await import("./devtools-82fzqra8.js");
15396
+ await import("./devtools-qxfgbsqz.js");
15397
15397
  } catch (error) {
15398
15398
  if (error.code === "ERR_MODULE_NOT_FOUND") {
15399
15399
  console.warn(`
@@ -33,7 +33,7 @@ import {
33
33
  import {
34
34
  import_websocket,
35
35
  init_wrapper2
36
- } from "./cli-dznrgaep.js";
36
+ } from "./cli-69szn7w7.js";
37
37
  import {
38
38
  __toESM,
39
39
  __commonJS,
@@ -7,7 +7,7 @@ import {
7
7
  import {
8
8
  assertUrlSafe,
9
9
  init_egress_guard
10
- } from "./cli-1ayk1eas.js";
10
+ } from "./cli-k2gzwsj2.js";
11
11
  import {
12
12
  isDevOrTestNodeEnv,
13
13
  init_node_env
@@ -46,7 +46,7 @@ import {
46
46
  getWorkflowVersions2,
47
47
  getMcpServerById2,
48
48
  init_db4
49
- } from "./cli-1ayk1eas.js";
49
+ } from "./cli-k2gzwsj2.js";
50
50
  import {
51
51
  McpHttpClient,
52
52
  init_http_client
@@ -61,11 +61,11 @@ import {
61
61
  oauthAppRowToProviderConfig,
62
62
  ensureAuthorizationTokenOrThrow,
63
63
  init_ensure_token
64
- } from "./cli-7wcyk2s5.js";
64
+ } from "./cli-xnqgpshy.js";
65
65
  import {
66
66
  validateDefinition,
67
67
  init_definition2
68
- } from "./cli-spknvxbq.js";
68
+ } from "./cli-8bc1w0tw.js";
69
69
  import {
70
70
  isInvalidClientError,
71
71
  publicEndpointSsrfOptions,
@@ -73,16 +73,16 @@ import {
73
73
  refreshMcpToken,
74
74
  computeExpiresAt,
75
75
  init_mcp_wrapper
76
- } from "./cli-pywf3eh5.js";
76
+ } from "./cli-hgaazk69.js";
77
77
  import {
78
78
  mintScriptRunToken,
79
79
  revokeSessionToken,
80
80
  init_users
81
- } from "./cli-bhjt02p8.js";
81
+ } from "./cli-drr5v6av.js";
82
82
  import {
83
83
  defaultAssetKey,
84
84
  init_key
85
- } from "./cli-7wspm5gm.js";
85
+ } from "./cli-nhrvpaj7.js";
86
86
  import {
87
87
  init_zod
88
88
  } from "./cli-k5671be5.js";
@@ -184883,6 +184883,8 @@ export type AgentTaskStepConfig = {
184883
184883
  parentTaskId?: string;
184884
184884
  requestedByUserId?: string;
184885
184885
  outputSchema?: Record<string, unknown>;
184886
+ /** Dispatch even when the follow-up re-delegation guard blocks this step (a run launched from a follow-up task in a Slack thread, checked at its first new step). */
184887
+ allowRedelegation?: boolean;
184886
184888
  /** Wait for the dispatched task to reach a terminal status before resolving. Default: true. */
184887
184889
  waitForCompletion?: boolean;
184888
184890
  /** Max ms to wait for a terminal status before throwing. Default: 2h. Only used when waitForCompletion is true. */
@@ -185315,6 +185317,26 @@ export interface ScriptWorkflowSteps {
185315
185317
  label: string,
185316
185318
  config: { prompt: string; model?: string; schema?: Record<string, unknown> },
185317
185319
  ): Promise<unknown>;
185320
+ /**
185321
+ * Dispatch a task and journal its result under \`label\`.
185322
+ *
185323
+ * Resolves to the task's OUTPUT on success: the stored output string (JSON
185324
+ * text under \`outputSchema\`, so parse it yourself), or \`null\` when the task
185325
+ * stored none. It is never a task record: on a string, \`result.taskId\` and
185326
+ * \`result.status\` are undefined; on \`null\`, reading them throws a TypeError.
185327
+ * Other shapes:
185328
+ * - \`failOnTaskFailure: false\` and the task ends failed/cancelled/superseded:
185329
+ * \`{ taskId, status: "failed", error }\`.
185330
+ * - \`waitForCompletion: false\`: the first call still waits up to ~30s while
185331
+ * the server polls the task. Done in that window: the output, as on
185332
+ * success. Failed or cancelled in that window: throws, or
185333
+ * \`{ taskId, status: "failed", error }\` with \`failOnTaskFailure: false\`.
185334
+ * Still running: \`{ taskId, status }\`.
185335
+ *
185336
+ * To get a step's task id, query by its context key:
185337
+ * \`SELECT id, status, output FROM agent_tasks WHERE contextKey = 'script-run:<runId>:<label>'
185338
+ * AND taskType = 'script-run-step' ORDER BY createdAt DESC, rowid DESC LIMIT 1\`.
185339
+ */
185318
185340
  agentTask(
185319
185341
  label: string,
185320
185342
  config: AgentTaskStepConfig,