@desplega.ai/agent-swarm 1.123.0 → 1.123.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (225) hide show
  1. package/dist/{actions-e4c9f0xy.js → actions-3ntn8s3f.js} +6 -6
  2. package/dist/{app-vmvmj2v3.js → app-pej7g57x.js} +4 -4
  3. package/dist/{assistant-yn7a792a.js → assistant-pxa36zjn.js} +9 -9
  4. package/dist/{boot-reembed-xg1r86h2.js → boot-reembed-wdwde4vr.js} +3 -3
  5. package/dist/{boot-reembed-chxty50a.js → boot-reembed-ybq960bh.js} +4 -4
  6. package/dist/{boot-scrub-logs-exwddvp5.js → boot-scrub-logs-ndqxg6e3.js} +2 -2
  7. package/dist/{cli-ngbsk4yx.js → cli-0pmkqg1d.js} +1 -1
  8. package/dist/{cli-kmm1rwmp.js → cli-1cah98w1.js} +1 -1
  9. package/dist/{cli-zdp11t8m.js → cli-1kv5sydm.js} +1 -1
  10. package/dist/{cli-hbbxmhec.js → cli-256kb8p5.js} +4 -4
  11. package/dist/{cli-822d4bjk.js → cli-2e5t0yjj.js} +7 -7
  12. package/dist/{cli-c9m59f83.js → cli-333x50bh.js} +1 -1
  13. package/dist/{cli-5arfywtm.js → cli-5ncdb7ff.js} +19 -9
  14. package/dist/{cli-mepk1j0t.js → cli-7qvpf14x.js} +2 -2
  15. package/dist/{cli-zkj6f2sk.js → cli-7rk0bbfr.js} +90 -4
  16. package/dist/{cli-vz9drmce.js → cli-7yn0n4fp.js} +11 -2
  17. package/dist/{cli-3tv9z4wx.js → cli-82eq5zf5.js} +1 -1
  18. package/dist/{cli-byv3720g.js → cli-ca32n52j.js} +2 -2
  19. package/dist/{cli-n8mf7x4b.js → cli-g4bfr1e7.js} +2 -2
  20. package/dist/{cli-mkpf4ndf.js → cli-hgkf9zmd.js} +2833 -5545
  21. package/dist/{cli-9eka6jwv.js → cli-k3yfwe8g.js} +2 -2
  22. package/dist/{cli-mngsj9fx.js → cli-kqgkfpz7.js} +1 -1
  23. package/dist/{cli-9hj1adgp.js → cli-mb3gz7qr.js} +1 -1
  24. package/dist/{cli-8ef5ky75.js → cli-mntyk3cr.js} +1 -1
  25. package/dist/{cli-we91ywvy.js → cli-pjvdm39a.js} +6 -6
  26. package/dist/{cli-4509mwm5.js → cli-qrnhnhma.js} +8 -8
  27. package/dist/{cli-fjf04hpa.js → cli-r07fhvsk.js} +48 -56
  28. package/dist/{cli-p11rf59d.js → cli-sj43m5z0.js} +3 -3
  29. package/dist/{cli-np0yhmmk.js → cli-vw0acwe7.js} +3 -3
  30. package/dist/{cli-8cq4z4x7.js → cli-x2hk4m81.js} +135 -17
  31. package/dist/{cli-1592nfd6.js → cli-xv09zc8e.js} +1 -1
  32. package/dist/{cli-h2say6xk.js → cli-zvbxe7pf.js} +3 -1
  33. package/dist/cli.js +12 -10
  34. package/dist/{commands-sjk3zfyr.js → commands-5p0erxye.js} +2 -2
  35. package/dist/{db-2je5agjb.js → db-yp9e9nvs.js} +2 -2
  36. package/dist/{e2b-2s4psnbf.js → e2b-q345y8s4.js} +0 -4
  37. package/dist/{handlers-yzv369hf.js → handlers-3hqw1dsr.js} +9 -9
  38. package/dist/{hook-rfsj2r8x.js → hook-5981d59r.js} +1 -40
  39. package/dist/{http-v9rr144m.js → http-ek9ctgth.js} +85 -40
  40. package/dist/{index-smjdc3h9.js → index-1cnvzmh4.js} +7 -7
  41. package/dist/{index-nr2199m6.js → index-33eb3q08.js} +11 -11
  42. package/dist/{index-3xtk777g.js → index-8j9b86c9.js} +9 -9
  43. package/dist/{index-c3tan44f.js → index-chcty242.js} +10 -10
  44. package/dist/{keepalive-5ds53bjd.js → keepalive-rrvxy1fy.js} +5 -5
  45. package/dist/{lead-5xhez25b.js → lead-jvw8b413.js} +21 -21
  46. package/dist/{maintenance-b43d24q6.js → maintenance-3zjnr2wa.js} +4 -4
  47. package/dist/{oauth-refresh-sweep-qe286vn2.js → oauth-refresh-sweep-vfhvqmby.js} +4 -4
  48. package/dist/{onboard-c4r3ds3z.js → onboard-kvntqz8h.js} +6 -2
  49. package/dist/{otel-impl-nv3rjw61.js → otel-impl-61tsn4bx.js} +1 -1
  50. package/dist/{pi-mono-adapter-2syx1x4d.js → pi-mono-adapter-z6h98fva.js} +4 -38
  51. package/dist/{pricing-refresh-5ct2wp4k.js → pricing-refresh-jcp6ntbk.js} +4 -4
  52. package/dist/{rbac-roles-b82cxpxn.js → rbac-roles-r3j4z9vs.js} +4 -4
  53. package/dist/{rbac-roles-m502w0qv.js → rbac-roles-xcbab18x.js} +3 -3
  54. package/dist/{seed-pricing-jhjphbf0.js → seed-pricing-bd669a7j.js} +3 -3
  55. package/dist/{setup-zbaspydq.js → setup-pg03xran.js} +2 -2
  56. package/dist/{worker-snvhpax5.js → worker-q5n4qwvq.js} +21 -21
  57. package/openapi.json +124 -1
  58. package/package.json +3 -1
  59. package/src/be/models-catalog.ts +156 -0
  60. package/src/be/modelsdev-cache.ts +14 -1
  61. package/src/be/pricing-refresh.ts +2 -0
  62. package/src/be/scripts/typecheck.ts +9 -0
  63. package/src/commands/onboard/env-generator.ts +12 -0
  64. package/src/e2b/env.ts +0 -4
  65. package/src/hooks/hook.ts +0 -67
  66. package/src/http/all-routes.ts +1 -0
  67. package/src/http/index.ts +2 -0
  68. package/src/http/models-catalog.ts +65 -0
  69. package/src/prompts/base-prompt.ts +8 -7
  70. package/src/prompts/session-templates.ts +103 -12
  71. package/src/providers/pi-mono-adapter.ts +12 -2
  72. package/src/providers/pi-mono-extension.ts +0 -64
  73. package/src/providers/pricing-sources.md +16 -1
  74. package/src/scripts-runtime/eval-harness.ts +18 -1
  75. package/src/scripts-runtime/types/stdlib.d.ts +9 -0
  76. package/src/scripts-runtime/types/swarm-sdk.d.ts +9 -0
  77. package/src/server-user.ts +4 -7
  78. package/src/slack/blocks.ts +21 -8
  79. package/src/slack/responses.ts +27 -51
  80. package/src/slack/watcher.ts +22 -5
  81. package/src/telemetry.ts +166 -3
  82. package/src/tests/base-prompt.test.ts +79 -0
  83. package/src/tests/mcp-tools-user.test.ts +62 -16
  84. package/src/tests/mcp-tools.test.ts +4 -1
  85. package/src/tests/memory-edit.test.ts +21 -4
  86. package/src/tests/model-groups-live-catalog.test.ts +65 -0
  87. package/src/tests/models-catalog.test.ts +119 -0
  88. package/src/tests/oauth-access-token-tool.test.ts +71 -1
  89. package/src/tests/pricing-refresh.test.ts +25 -0
  90. package/src/tests/prompt-template-session.test.ts +135 -5
  91. package/src/tests/rbac-charact-skills.test.ts +81 -14
  92. package/src/tests/script-apis-mcp.test.ts +56 -8
  93. package/src/tests/scripts-mcp-e2e.test.ts +108 -8
  94. package/src/tests/slack-blocks.test.ts +2 -1
  95. package/src/tests/slack-inline-output.test.ts +24 -30
  96. package/src/tests/slack-watcher.test.ts +42 -0
  97. package/src/tests/steer-task-tool.test.ts +37 -8
  98. package/src/tests/steering-transport.test.ts +18 -3
  99. package/src/tests/swarm-tool-result-gate.test.ts +364 -0
  100. package/src/tests/task-tools-ctx.test.ts +19 -16
  101. package/src/tests/task-tools-ownership.test.ts +41 -13
  102. package/src/tests/telemetry-init.test.ts +379 -2
  103. package/src/tests/tool-output-agent-id.test.ts +14 -2
  104. package/src/tools/accept-steer.ts +45 -53
  105. package/src/tools/cancel-task.ts +31 -41
  106. package/src/tools/context-diff.ts +19 -63
  107. package/src/tools/context-history.ts +22 -51
  108. package/src/tools/create-channel.ts +24 -39
  109. package/src/tools/create-metric.ts +19 -82
  110. package/src/tools/create-page.ts +20 -81
  111. package/src/tools/credential-bindings/tool.ts +125 -246
  112. package/src/tools/db-query.ts +13 -24
  113. package/src/tools/delete-channel.ts +25 -71
  114. package/src/tools/delete-page.ts +27 -75
  115. package/src/tools/get-metrics.ts +29 -22
  116. package/src/tools/get-swarm.ts +44 -15
  117. package/src/tools/get-task-details.ts +150 -32
  118. package/src/tools/get-tasks.ts +24 -29
  119. package/src/tools/inject-learning.ts +8 -38
  120. package/src/tools/join-swarm.ts +45 -47
  121. package/src/tools/kv/kv-delete.ts +13 -37
  122. package/src/tools/kv/kv-get.ts +38 -29
  123. package/src/tools/kv/kv-incr.ts +28 -56
  124. package/src/tools/kv/kv-list.ts +40 -31
  125. package/src/tools/kv/kv-set.ts +34 -76
  126. package/src/tools/list-channels.ts +24 -17
  127. package/src/tools/list-services.ts +37 -45
  128. package/src/tools/manage-user.ts +53 -66
  129. package/src/tools/mcp-servers/mcp-server-create.ts +19 -55
  130. package/src/tools/mcp-servers/mcp-server-delete.ts +9 -39
  131. package/src/tools/mcp-servers/mcp-server-get.ts +9 -35
  132. package/src/tools/mcp-servers/mcp-server-install.ts +13 -60
  133. package/src/tools/mcp-servers/mcp-server-list.ts +28 -26
  134. package/src/tools/mcp-servers/mcp-server-uninstall.ts +10 -36
  135. package/src/tools/mcp-servers/mcp-server-update.ts +13 -57
  136. package/src/tools/memory-delete.ts +16 -46
  137. package/src/tools/memory-edit.ts +48 -49
  138. package/src/tools/memory-get.ts +40 -36
  139. package/src/tools/memory-rate.ts +14 -44
  140. package/src/tools/memory-search.ts +46 -52
  141. package/src/tools/my-agent-info.ts +39 -33
  142. package/src/tools/oauth-access-token.ts +9 -24
  143. package/src/tools/poll-task.ts +50 -77
  144. package/src/tools/post-message.ts +24 -38
  145. package/src/tools/prompt-templates/delete.ts +16 -48
  146. package/src/tools/prompt-templates/get.ts +45 -42
  147. package/src/tools/prompt-templates/list.ts +29 -44
  148. package/src/tools/prompt-templates/preview.ts +14 -40
  149. package/src/tools/prompt-templates/set.ts +30 -52
  150. package/src/tools/read-messages.ts +45 -54
  151. package/src/tools/register-agentmail-inbox.ts +28 -84
  152. package/src/tools/register-kapso-number.ts +20 -50
  153. package/src/tools/register-service.ts +36 -44
  154. package/src/tools/repos/get-repos.ts +29 -21
  155. package/src/tools/repos/update-repo.ts +30 -27
  156. package/src/tools/request-human-input.ts +10 -33
  157. package/src/tools/resolve-user.ts +59 -16
  158. package/src/tools/schedules/create-schedule.ts +58 -173
  159. package/src/tools/schedules/delete-schedule.ts +16 -56
  160. package/src/tools/schedules/list-schedules.ts +41 -67
  161. package/src/tools/schedules/patch-schedule.ts +57 -153
  162. package/src/tools/schedules/run-schedule-now.ts +18 -59
  163. package/src/tools/schedules/update-schedule.ts +57 -153
  164. package/src/tools/script-apis.ts +46 -28
  165. package/src/tools/script-common.ts +129 -34
  166. package/src/tools/script-connections/tool.ts +59 -154
  167. package/src/tools/script-query-types.ts +43 -3
  168. package/src/tools/script-run.ts +40 -1
  169. package/src/tools/script-runs.ts +69 -1
  170. package/src/tools/script-search.ts +24 -1
  171. package/src/tools/script-upsert.ts +17 -2
  172. package/src/tools/send-task.ts +32 -81
  173. package/src/tools/skills/skill-create.ts +14 -39
  174. package/src/tools/skills/skill-delete.ts +14 -42
  175. package/src/tools/skills/skill-get-file.ts +10 -43
  176. package/src/tools/skills/skill-get.ts +9 -32
  177. package/src/tools/skills/skill-install-remote.ts +16 -52
  178. package/src/tools/skills/skill-install.ts +14 -52
  179. package/src/tools/skills/skill-list.ts +24 -26
  180. package/src/tools/skills/skill-publish.ts +18 -54
  181. package/src/tools/skills/skill-search.ts +21 -18
  182. package/src/tools/skills/skill-sync-remote.ts +12 -24
  183. package/src/tools/skills/skill-uninstall.ts +10 -26
  184. package/src/tools/skills/skill-update.ts +24 -81
  185. package/src/tools/slack-delete.ts +8 -32
  186. package/src/tools/slack-download-file.ts +17 -57
  187. package/src/tools/slack-list-channels.ts +16 -43
  188. package/src/tools/slack-post.ts +11 -40
  189. package/src/tools/slack-read.ts +33 -103
  190. package/src/tools/slack-reply.ts +16 -53
  191. package/src/tools/slack-start-thread.ts +14 -55
  192. package/src/tools/slack-update.ts +8 -35
  193. package/src/tools/slack-upload-file.ts +22 -122
  194. package/src/tools/steer-task.ts +22 -35
  195. package/src/tools/store-progress.ts +11 -26
  196. package/src/tools/swarm-config/delete-config.ts +19 -57
  197. package/src/tools/swarm-config/get-config.ts +36 -44
  198. package/src/tools/swarm-config/list-config.ts +36 -44
  199. package/src/tools/swarm-config/set-config.ts +35 -73
  200. package/src/tools/swarm-x.ts +20 -26
  201. package/src/tools/task-action.ts +26 -46
  202. package/src/tools/task-tool-ctx.ts +5 -13
  203. package/src/tools/tracker/tracker-link-task.ts +8 -22
  204. package/src/tools/tracker/tracker-map-agent.ts +8 -22
  205. package/src/tools/tracker/tracker-status.ts +27 -19
  206. package/src/tools/tracker/tracker-sync-status.ts +8 -18
  207. package/src/tools/tracker/tracker-unlink.ts +4 -16
  208. package/src/tools/unregister-service.ts +19 -59
  209. package/src/tools/update-profile.ts +60 -100
  210. package/src/tools/update-service-status.ts +42 -67
  211. package/src/tools/utils.ts +183 -8
  212. package/src/tools/whatsapp-message.ts +19 -32
  213. package/src/tools/workflows/cancel-workflow-run.ts +4 -16
  214. package/src/tools/workflows/create-workflow.ts +9 -38
  215. package/src/tools/workflows/delete-workflow.ts +5 -17
  216. package/src/tools/workflows/get-workflow-run.ts +41 -31
  217. package/src/tools/workflows/get-workflow.ts +10 -21
  218. package/src/tools/workflows/list-workflow-runs.ts +19 -17
  219. package/src/tools/workflows/list-workflows.ts +5 -17
  220. package/src/tools/workflows/patch-workflow-node.ts +11 -39
  221. package/src/tools/workflows/patch-workflow.ts +11 -36
  222. package/src/tools/workflows/retry-workflow-run.ts +4 -16
  223. package/src/tools/workflows/trigger-workflow.ts +22 -58
  224. package/src/tools/workflows/update-workflow.ts +10 -42
  225. package/templates/skills/swarm-scripts/SKILL.md +1 -1
@@ -1,14 +1,14 @@
1
1
  import {
2
2
  resolveSlackUserId
3
- } from "./cli-n8mf7x4b.js";
4
- import"./cli-1592nfd6.js";
3
+ } from "./cli-g4bfr1e7.js";
4
+ import"./cli-xv09zc8e.js";
5
5
  import {
6
6
  createTaskWithSiblingAwareness
7
- } from "./cli-kmm1rwmp.js";
7
+ } from "./cli-1cah98w1.js";
8
8
  import {
9
9
  buildCancelledBlocks,
10
10
  getTaskLink
11
- } from "./cli-5arfywtm.js";
11
+ } from "./cli-5ncdb7ff.js";
12
12
  import"./cli-wspgs9bt.js";
13
13
  import"./cli-dh55d5fg.js";
14
14
  import {
@@ -19,9 +19,9 @@ import {
19
19
  init_context_key,
20
20
  init_db,
21
21
  slackContextKey
22
- } from "./cli-8cq4z4x7.js";
22
+ } from "./cli-x2hk4m81.js";
23
23
  import"./cli-z2zcxes1.js";
24
- import"./cli-h2say6xk.js";
24
+ import"./cli-zvbxe7pf.js";
25
25
  import"./cli-4j2mrzag.js";
26
26
  import"./cli-bw80ck94.js";
27
27
  import"./cli-xz9aq0rf.js";
@@ -3,15 +3,15 @@ import {
3
3
  initSlackApp,
4
4
  startSlackApp,
5
5
  stopSlackApp
6
- } from "./cli-fjf04hpa.js";
6
+ } from "./cli-r07fhvsk.js";
7
7
  import"./cli-rkndnn90.js";
8
8
  import"./cli-b0p7rfnd.js";
9
- import"./cli-5arfywtm.js";
9
+ import"./cli-5ncdb7ff.js";
10
10
  import"./cli-wspgs9bt.js";
11
11
  import"./cli-dh55d5fg.js";
12
- import"./cli-8cq4z4x7.js";
12
+ import"./cli-x2hk4m81.js";
13
13
  import"./cli-z2zcxes1.js";
14
- import"./cli-h2say6xk.js";
14
+ import"./cli-zvbxe7pf.js";
15
15
  import"./cli-4j2mrzag.js";
16
16
  import"./cli-bw80ck94.js";
17
17
  import"./cli-xz9aq0rf.js";
@@ -1,24 +1,24 @@
1
1
  import {
2
2
  bufferThreadMessage,
3
3
  wasEventSeen
4
- } from "./cli-we91ywvy.js";
4
+ } from "./cli-pjvdm39a.js";
5
5
  import {
6
6
  hasOtherUserMention
7
- } from "./cli-3tv9z4wx.js";
7
+ } from "./cli-82eq5zf5.js";
8
8
  import {
9
9
  resolveSlackUserId,
10
10
  rewriteSlackMentions
11
- } from "./cli-n8mf7x4b.js";
12
- import"./cli-1592nfd6.js";
11
+ } from "./cli-g4bfr1e7.js";
12
+ import"./cli-xv09zc8e.js";
13
13
  import {
14
14
  createTaskWithSiblingAwareness
15
- } from "./cli-kmm1rwmp.js";
15
+ } from "./cli-1cah98w1.js";
16
16
  import {
17
17
  require_dist
18
- } from "./cli-fjf04hpa.js";
18
+ } from "./cli-r07fhvsk.js";
19
19
  import"./cli-rkndnn90.js";
20
20
  import"./cli-b0p7rfnd.js";
21
- import"./cli-5arfywtm.js";
21
+ import"./cli-5ncdb7ff.js";
22
22
  import"./cli-wspgs9bt.js";
23
23
  import"./cli-dh55d5fg.js";
24
24
  import {
@@ -32,9 +32,9 @@ import {
32
32
  isEnvFlagEnabled,
33
33
  resolveTemplate,
34
34
  slackContextKey
35
- } from "./cli-8cq4z4x7.js";
35
+ } from "./cli-x2hk4m81.js";
36
36
  import"./cli-z2zcxes1.js";
37
- import"./cli-h2say6xk.js";
37
+ import"./cli-zvbxe7pf.js";
38
38
  import"./cli-4j2mrzag.js";
39
39
  import"./cli-bw80ck94.js";
40
40
  import"./cli-xz9aq0rf.js";
@@ -3,14 +3,14 @@ import {
3
3
  getEmbeddingProvider,
4
4
  getMemoryStore,
5
5
  init_constants
6
- } from "./cli-zdp11t8m.js";
6
+ } from "./cli-1kv5sydm.js";
7
7
  import"./cli-q25ejbyn.js";
8
8
  import {
9
9
  getDb,
10
10
  init_db
11
- } from "./cli-8cq4z4x7.js";
11
+ } from "./cli-x2hk4m81.js";
12
12
  import"./cli-z2zcxes1.js";
13
- import"./cli-h2say6xk.js";
13
+ import"./cli-zvbxe7pf.js";
14
14
  import"./cli-4j2mrzag.js";
15
15
  import"./cli-bw80ck94.js";
16
16
  import"./cli-xz9aq0rf.js";
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  embedScript,
3
3
  embeddingProvider
4
- } from "./cli-byv3720g.js";
5
- import"./cli-zdp11t8m.js";
4
+ } from "./cli-ca32n52j.js";
5
+ import"./cli-1kv5sydm.js";
6
6
  import"./cli-q25ejbyn.js";
7
7
  import {
8
8
  getDb,
9
9
  init_db
10
- } from "./cli-8cq4z4x7.js";
10
+ } from "./cli-x2hk4m81.js";
11
11
  import"./cli-z2zcxes1.js";
12
- import"./cli-h2say6xk.js";
12
+ import"./cli-zvbxe7pf.js";
13
13
  import"./cli-4j2mrzag.js";
14
14
  import"./cli-bw80ck94.js";
15
15
  import"./cli-xz9aq0rf.js";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  getDb,
3
3
  init_db
4
- } from "./cli-8cq4z4x7.js";
4
+ } from "./cli-x2hk4m81.js";
5
5
  import"./cli-z2zcxes1.js";
6
- import"./cli-h2say6xk.js";
6
+ import"./cli-zvbxe7pf.js";
7
7
  import {
8
8
  init_secret_scrubber,
9
9
  scrubSecrets
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  init_env_flag,
3
3
  isEnvFlagEnabled
4
- } from "./cli-8cq4z4x7.js";
4
+ } from "./cli-x2hk4m81.js";
5
5
  import {
6
6
  init_zod
7
7
  } from "./cli-bw80ck94.js";
@@ -3,7 +3,7 @@ import {
3
3
  getAgentById,
4
4
  getInProgressTasksByContextKey,
5
5
  init_db
6
- } from "./cli-8cq4z4x7.js";
6
+ } from "./cli-x2hk4m81.js";
7
7
 
8
8
  // src/tasks/sibling-awareness.ts
9
9
  init_db();
@@ -6,7 +6,7 @@ import {
6
6
  getDb,
7
7
  init_db,
8
8
  isSqliteVecAvailable
9
- } from "./cli-8cq4z4x7.js";
9
+ } from "./cli-x2hk4m81.js";
10
10
  import {
11
11
  __esm,
12
12
  __export,
@@ -4,15 +4,15 @@ import {
4
4
  handleScheduleTrigger,
5
5
  runScript,
6
6
  startWorkflowExecution
7
- } from "./cli-822d4bjk.js";
7
+ } from "./cli-2e5t0yjj.js";
8
8
  import {
9
9
  getScript,
10
10
  getScriptApiConnectionDescriptors,
11
11
  getScriptMcpConnectionDescriptors
12
- } from "./cli-p11rf59d.js";
12
+ } from "./cli-sj43m5z0.js";
13
13
  import {
14
14
  createTaskWithSiblingAwareness
15
- } from "./cli-kmm1rwmp.js";
15
+ } from "./cli-1cah98w1.js";
16
16
  import {
17
17
  getDb,
18
18
  getDueScheduledTasks,
@@ -24,7 +24,7 @@ import {
24
24
  scheduleContextKey,
25
25
  telemetry,
26
26
  updateScheduledTask
27
- } from "./cli-8cq4z4x7.js";
27
+ } from "./cli-x2hk4m81.js";
28
28
  import {
29
29
  __commonJS,
30
30
  __require,
@@ -7,7 +7,7 @@ import {
7
7
  import {
8
8
  ensureAuthorizationTokenOrThrow,
9
9
  oauthAppRowToProviderConfig
10
- } from "./cli-c9m59f83.js";
10
+ } from "./cli-333x50bh.js";
11
11
  import {
12
12
  getScript,
13
13
  getScriptApiConnectionDescriptors,
@@ -15,15 +15,15 @@ import {
15
15
  getScriptVersion,
16
16
  listRelationalCredentialBindings,
17
17
  validateScriptImports
18
- } from "./cli-p11rf59d.js";
18
+ } from "./cli-sj43m5z0.js";
19
19
  import {
20
20
  getAuthorizationById,
21
21
  getOAuthApp,
22
22
  getOAuthAppById
23
- } from "./cli-9hj1adgp.js";
23
+ } from "./cli-mb3gz7qr.js";
24
24
  import {
25
25
  withSiblingAwareness
26
- } from "./cli-kmm1rwmp.js";
26
+ } from "./cli-1cah98w1.js";
27
27
  import {
28
28
  getAppUrl
29
29
  } from "./cli-dh55d5fg.js";
@@ -77,7 +77,7 @@ import {
77
77
  updateWorkflowRun,
78
78
  updateWorkflowRunStep,
79
79
  workflowContextKey
80
- } from "./cli-8cq4z4x7.js";
80
+ } from "./cli-x2hk4m81.js";
81
81
  import {
82
82
  init_secret_scrubber,
83
83
  isSensitiveKey,
@@ -2627,7 +2627,7 @@ class HumanInTheLoopExecutor extends BaseExecutor {
2627
2627
  }
2628
2628
  if (notification.channel === "slack") {
2629
2629
  try {
2630
- const { getSlackApp } = await import("./app-vmvmj2v3.js");
2630
+ const { getSlackApp } = await import("./app-pej7g57x.js");
2631
2631
  const slackApp = getSlackApp();
2632
2632
  if (!slackApp) {
2633
2633
  console.warn("[HITL] Slack not initialized — cannot send notification");
@@ -2741,7 +2741,7 @@ class NotifyExecutor extends BaseExecutor {
2741
2741
  }
2742
2742
  }
2743
2743
  case "slack": {
2744
- const { getSlackApp } = await import("./app-vmvmj2v3.js");
2744
+ const { getSlackApp } = await import("./app-pej7g57x.js");
2745
2745
  const app = getSlackApp();
2746
2746
  if (!app) {
2747
2747
  return {
@@ -11,7 +11,7 @@ import {
11
11
  markAuthorizationRefreshFailed,
12
12
  releaseOAuthRefreshLock,
13
13
  updateAuthorizationTokens
14
- } from "./cli-9hj1adgp.js";
14
+ } from "./cli-mb3gz7qr.js";
15
15
  import {
16
16
  init_secret_scrubber,
17
17
  registerVolatileSecret,
@@ -185,13 +185,23 @@ var MAX_VISIBLE_CHILDREN = 8;
185
185
  var MAX_OUTPUT_LENGTH = 120;
186
186
  function truncateOutput(text) {
187
187
  const sentenceEnd = text.search(/\.\s/);
188
- const firstSentence = sentenceEnd !== -1 ? text.slice(0, sentenceEnd + 1) : text;
189
- if (firstSentence.length <= MAX_OUTPUT_LENGTH)
190
- return firstSentence;
191
- const boundary = text.lastIndexOf(" ", MAX_OUTPUT_LENGTH);
192
- const cut = boundary >= MAX_OUTPUT_LENGTH / 2 ? boundary : MAX_OUTPUT_LENGTH;
188
+ const sentenceCut = sentenceEnd !== -1 ? sentenceEnd + 1 : text.length;
189
+ if (sentenceCut === text.length && text.length <= MAX_OUTPUT_LENGTH) {
190
+ return { text, truncated: false };
191
+ }
192
+ let cut = Math.min(sentenceCut, MAX_OUTPUT_LENGTH);
193
+ if (cut === MAX_OUTPUT_LENGTH) {
194
+ const boundary = text.lastIndexOf(" ", MAX_OUTPUT_LENGTH);
195
+ cut = boundary >= MAX_OUTPUT_LENGTH / 2 ? boundary : MAX_OUTPUT_LENGTH;
196
+ }
193
197
  const omitted = text.length - cut;
194
- return `${text.slice(0, cut).trimEnd()}… (${omitted} more chars; full output in thread)`;
198
+ return {
199
+ text: `${text.slice(0, cut).trimEnd()}… (${omitted} more chars; open task for full output)`,
200
+ truncated: true
201
+ };
202
+ }
203
+ function isTreeOutputTruncated(text) {
204
+ return truncateOutput(text).truncated;
195
205
  }
196
206
  function renderNodeLine(node) {
197
207
  const icon = STATUS_ICON[node.status] ?? "•";
@@ -212,7 +222,7 @@ function renderChildDetail(node, indent) {
212
222
  lines.push(`${indent}${node.progress}`);
213
223
  }
214
224
  if (node.status === "completed" && !node.slackReplySent && node.output) {
215
- lines.push(`${indent}${truncateOutput(markdownToSlack(node.output))}`);
225
+ lines.push(`${indent}${truncateOutput(markdownToSlack(node.output)).text}`);
216
226
  }
217
227
  return lines;
218
228
  }
@@ -227,7 +237,7 @@ function renderTree(root) {
227
237
  lines.push(` Error: ${root.failureReason}`);
228
238
  }
229
239
  if (root.status === "completed" && !root.slackReplySent && root.output) {
230
- lines.push(` ${truncateOutput(markdownToSlack(root.output))}`);
240
+ lines.push(` ${truncateOutput(markdownToSlack(root.output)).text}`);
231
241
  }
232
242
  return lines.join(`
233
243
  `);
@@ -296,4 +306,4 @@ function buildTreeBlocks(roots) {
296
306
  return blocks;
297
307
  }
298
308
 
299
- export { getTaskLink, markdownToSlack, splitSlackSectionText, formatAttachmentsBlockForSlack, formatDuration, buildCompletedBlocks, buildCompletedBlockBatches, buildFailedBlocks, buildProgressBlocks, buildCancelledBlocks, buildBufferFlushBlocks, buildTreeBlocks };
309
+ export { getTaskLink, markdownToSlack, splitSlackSectionText, formatAttachmentsBlockForSlack, formatDuration, buildCompletedBlocks, buildCompletedBlockBatches, buildFailedBlocks, buildProgressBlocks, buildCancelledBlocks, buildBufferFlushBlocks, isTreeOutputTruncated, buildTreeBlocks };
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  getDb,
3
3
  init_db
4
- } from "./cli-8cq4z4x7.js";
4
+ } from "./cli-x2hk4m81.js";
5
5
 
6
6
  // src/be/seed-pricing.ts
7
7
  init_db();
@@ -195,4 +195,4 @@ function seedPricingFromModelsDev(opts) {
195
195
  return { inserted, modelsdevFound: !!cache };
196
196
  }
197
197
 
198
- export { normalizeModelKey, buildModelsDevSeedRows, seedPricingFromModelsDev };
198
+ export { loadModelsDevCache, normalizeModelKey, buildModelsDevSeedRows, seedPricingFromModelsDev };
@@ -1,13 +1,14 @@
1
1
  import {
2
- buildModelsDevSeedRows
3
- } from "./cli-mepk1j0t.js";
2
+ buildModelsDevSeedRows,
3
+ loadModelsDevCache
4
+ } from "./cli-7qvpf14x.js";
4
5
  import {
5
6
  createLogEntry,
6
7
  getActivePricingRow,
7
8
  getDb,
8
9
  init_db,
9
10
  insertPricingRow
10
- } from "./cli-8cq4z4x7.js";
11
+ } from "./cli-x2hk4m81.js";
11
12
  import {
12
13
  init_secret_scrubber,
13
14
  scrubSecrets
@@ -16,6 +17,90 @@ import {
16
17
  // src/be/pricing-refresh.ts
17
18
  init_secret_scrubber();
18
19
  init_db();
20
+
21
+ // src/be/models-catalog.ts
22
+ var CATALOG_PROVIDER_IDS = [
23
+ "openrouter",
24
+ "anthropic",
25
+ "openai",
26
+ "amazon-bedrock"
27
+ ];
28
+ var PINNED_MODELSDEV_ENTRIES = [
29
+ "anthropic/claude-mythos-5",
30
+ "anthropic/claude-sonnet-5",
31
+ "amazon-bedrock/anthropic.claude-sonnet-5"
32
+ ];
33
+ function slimModel(modelKey, model) {
34
+ const reasoningOptions = Array.isArray(model.reasoning_options) ? model.reasoning_options.filter((o) => typeof o.type === "string").map((o) => ({
35
+ type: o.type,
36
+ ...Array.isArray(o.values) ? { values: o.values } : {}
37
+ })) : [];
38
+ return {
39
+ id: model.id ?? modelKey,
40
+ ...model.name !== undefined ? { name: model.name } : {},
41
+ ...model.cost !== undefined ? { cost: { input: model.cost.input, output: model.cost.output } } : {},
42
+ ...model.limit?.context !== undefined ? { limit: { context: model.limit.context } } : {},
43
+ ...model.reasoning !== undefined ? { reasoning: model.reasoning } : {},
44
+ ...reasoningOptions.length > 0 ? { reasoning_options: reasoningOptions } : {}
45
+ };
46
+ }
47
+ function buildModelsCatalog(cache) {
48
+ const catalog = {};
49
+ for (const providerId of CATALOG_PROVIDER_IDS) {
50
+ const provider = cache[providerId];
51
+ if (!provider?.models)
52
+ continue;
53
+ const models = {};
54
+ for (const [modelKey, model] of Object.entries(provider.models)) {
55
+ models[modelKey] = slimModel(modelKey, model);
56
+ }
57
+ catalog[providerId] = {
58
+ id: provider.id ?? providerId,
59
+ ...provider.name !== undefined ? { name: provider.name } : {},
60
+ models
61
+ };
62
+ }
63
+ return catalog;
64
+ }
65
+ var liveCatalog = null;
66
+ var liveUpdatedAt = null;
67
+ var snapshotCatalog;
68
+ function bundledSnapshotCatalog() {
69
+ if (snapshotCatalog === undefined) {
70
+ const raw = loadModelsDevCache();
71
+ snapshotCatalog = raw ? buildModelsCatalog(raw) : null;
72
+ }
73
+ return snapshotCatalog ?? {};
74
+ }
75
+ function mergePinnedEntries(catalog) {
76
+ const snapshot = bundledSnapshotCatalog();
77
+ for (const entryPath of PINNED_MODELSDEV_ENTRIES) {
78
+ const slashIndex = entryPath.indexOf("/");
79
+ const providerId = entryPath.slice(0, slashIndex);
80
+ const modelId = entryPath.slice(slashIndex + 1);
81
+ if (catalog[providerId]?.models[modelId])
82
+ continue;
83
+ const pinned = snapshot[providerId]?.models[modelId];
84
+ if (!pinned)
85
+ continue;
86
+ catalog[providerId] ??= { id: providerId, models: {} };
87
+ catalog[providerId].models[modelId] = pinned;
88
+ }
89
+ }
90
+ function updateLiveModelsCatalog(cache, now = Date.now()) {
91
+ const catalog = buildModelsCatalog(cache);
92
+ mergePinnedEntries(catalog);
93
+ liveCatalog = catalog;
94
+ liveUpdatedAt = now;
95
+ }
96
+ function getModelsCatalog() {
97
+ if (liveCatalog) {
98
+ return { source: "live", updatedAt: liveUpdatedAt, providers: liveCatalog };
99
+ }
100
+ return { source: "snapshot", updatedAt: null, providers: bundledSnapshotCatalog() };
101
+ }
102
+
103
+ // src/be/pricing-refresh.ts
19
104
  var MODELSDEV_API_URL = "https://models.dev/api.json";
20
105
  var PRICING_REFRESH_INTERVAL_MS = 12 * 60 * 60 * 1000;
21
106
  var lastETag = null;
@@ -116,6 +201,7 @@ async function refreshPricingFromModelsDev(opts = {}) {
116
201
  }
117
202
  const cache = await response.json();
118
203
  const etag = response.headers.get("etag");
204
+ updateLiveModelsCatalog(cache, now);
119
205
  const rows = buildModelsDevSeedRows(cache);
120
206
  const { inserted, unchanged } = insertChangedPricingRows(rows, now);
121
207
  const pruned = prunePricingHistory(2);
@@ -151,4 +237,4 @@ function startPricingRefreshLoop() {
151
237
  interval.unref?.();
152
238
  }
153
239
 
154
- export { PRICING_REFRESH_INTERVAL_MS, refreshPricingFromModelsDev, startPricingRefreshLoop };
240
+ export { getModelsCatalog, PRICING_REFRESH_INTERVAL_MS, refreshPricingFromModelsDev, startPricingRefreshLoop };
@@ -2,7 +2,7 @@ import {
2
2
  getScriptApiTypes,
3
3
  getScriptMcpTypes,
4
4
  require_typescript
5
- } from "./cli-p11rf59d.js";
5
+ } from "./cli-sj43m5z0.js";
6
6
  import {
7
7
  deleteSwarmConfigByKey,
8
8
  getAgentById,
@@ -11,7 +11,7 @@ import {
11
11
  getSwarmConfigs,
12
12
  init_db,
13
13
  upsertSwarmConfig
14
- } from "./cli-8cq4z4x7.js";
14
+ } from "./cli-x2hk4m81.js";
15
15
  import {
16
16
  init_secret_scrubber,
17
17
  scrubSecrets
@@ -646,6 +646,15 @@ export interface ScriptContext {
646
646
  logger: ScriptLogger;
647
647
  }
648
648
 
649
+ /**
650
+ * A swarm script's default export. \`args\` comes FIRST, \`ctx\` second — never swap them.
651
+ *
652
+ * @example
653
+ * export default async function (args: { name: string }, ctx: ScriptContext) {
654
+ * await ctx.logger.log(\`hello \${args.name}\`);
655
+ * return { ok: true };
656
+ * }
657
+ */
649
658
  // biome-ignore lint/suspicious/noExplicitAny: scripts may narrow their args type at the entrypoint.
650
659
  export type ScriptMain = (args: any, ctx: ScriptContext) => unknown | Promise<unknown>;
651
660
  `;
@@ -5,7 +5,7 @@ import {
5
5
  init_db,
6
6
  init_env_flag,
7
7
  isEnvFlagEnabled
8
- } from "./cli-8cq4z4x7.js";
8
+ } from "./cli-x2hk4m81.js";
9
9
 
10
10
  // src/slack/router.ts
11
11
  init_db();
@@ -4,11 +4,11 @@ import {
4
4
  getEmbeddingProvider,
5
5
  init_embedding,
6
6
  serializeEmbedding
7
- } from "./cli-zdp11t8m.js";
7
+ } from "./cli-1kv5sydm.js";
8
8
  import {
9
9
  getDb,
10
10
  init_db
11
- } from "./cli-8cq4z4x7.js";
11
+ } from "./cli-x2hk4m81.js";
12
12
  import {
13
13
  init_secret_scrubber,
14
14
  scrubSecrets
@@ -4,12 +4,12 @@ import {
4
4
  linkIdentity,
5
5
  recordUnmappedIdentity,
6
6
  resolveIdentity
7
- } from "./cli-1592nfd6.js";
7
+ } from "./cli-xv09zc8e.js";
8
8
  import {
9
9
  getKv,
10
10
  init_db,
11
11
  upsertKv
12
- } from "./cli-8cq4z4x7.js";
12
+ } from "./cli-x2hk4m81.js";
13
13
 
14
14
  // src/slack/enrich.ts
15
15
  init_db();