@desplega.ai/agent-swarm 1.136.0 → 1.137.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (117) hide show
  1. package/README.md +1 -1
  2. package/dist/{actions-agcbc8nd.js → actions-km7fjk3b.js} +6 -7
  3. package/dist/{app-g2s78xya.js → app-rxv5h5sq.js} +3 -4
  4. package/dist/{assistant-yd3jkb9d.js → assistant-sj4qjjxc.js} +8 -9
  5. package/dist/{boot-reembed-b22s9w5x.js → boot-reembed-3sb9z9h5.js} +4 -4
  6. package/dist/{boot-reembed-6spqw4q0.js → boot-reembed-y522wye4.js} +3 -3
  7. package/dist/{boot-scrub-logs-6h3cqkc0.js → boot-scrub-logs-4pv64js9.js} +2 -2
  8. package/dist/{claude-adapter-ng5y8zd7.js → claude-adapter-7yvsz0v9.js} +4 -4
  9. package/dist/{claude-managed-adapter-5zr3n86v.js → claude-managed-adapter-2c16sq4z.js} +2 -2
  10. package/dist/{cli-gpdtxzar.js → cli-0rqqrdq1.js} +1 -1
  11. package/dist/{cli-tee8w7tq.js → cli-1g5d1yy0.js} +13 -9
  12. package/dist/{cli-d5ygfv18.js → cli-1q0gs34j.js} +30 -10
  13. package/dist/{cli-5bnz1t86.js → cli-26vczhje.js} +51 -7
  14. package/dist/{cli-35jknh9e.js → cli-2twz8nkg.js} +5 -5
  15. package/dist/{cli-06ghj6pe.js → cli-47ze4kxj.js} +1 -1
  16. package/dist/{cli-4r4jkqep.js → cli-4rpfrgvp.js} +4 -3
  17. package/dist/{cli-mgef08pc.js → cli-4z1bkqkq.js} +1 -1
  18. package/dist/{cli-spf767vc.js → cli-51jykxr5.js} +1 -1
  19. package/dist/{cli-hz5hp6wn.js → cli-70fp7kxv.js} +1 -1
  20. package/dist/{cli-z6e8eqrm.js → cli-725jvc84.js} +2 -2
  21. package/dist/{cli-84vrhesc.js → cli-8rk51bx5.js} +1 -1
  22. package/dist/{cli-tmn19cdz.js → cli-9ss6ddaz.js} +279 -50
  23. package/dist/{cli-edwrx42s.js → cli-kgbqd43h.js} +2 -2
  24. package/dist/{cli-qckgdqmr.js → cli-kjxt8kst.js} +2 -2
  25. package/dist/{cli-6gwgzdgw.js → cli-kx0gdyhx.js} +1 -1
  26. package/dist/{cli-m3z53bed.js → cli-n386h9a9.js} +1 -1
  27. package/dist/{cli-j7qp8gtf.js → cli-nkzfccbh.js} +1 -1
  28. package/dist/{cli-ads0hfw2.js → cli-nyzzsatp.js} +58 -31
  29. package/dist/{cli-3y553gws.js → cli-pxs8vc04.js} +1 -1
  30. package/dist/{cli-bnq8h7ea.js → cli-q1wdpbqp.js} +3 -3
  31. package/dist/{cli-jjhnma34.js → cli-q60nfav2.js} +204 -84
  32. package/dist/{cli-4gzv54ss.js → cli-qrj6sbft.js} +43 -11
  33. package/dist/{cli-54ht104h.js → cli-r236sc7d.js} +3 -3
  34. package/dist/{cli-fpjmcbhz.js → cli-r3gd4jw4.js} +4 -4
  35. package/dist/{cli-0crn5kaz.js → cli-rwv20439.js} +13 -1
  36. package/dist/{cli-cw70hymf.js → cli-s25avqg9.js} +2 -0
  37. package/dist/{cli-y16cesaq.js → cli-wbz1r82c.js} +2 -2
  38. package/dist/{cli-8v57p983.js → cli-yt3cy5b6.js} +14 -14
  39. package/dist/{cli-68vayryq.js → cli-ze44gzwa.js} +2 -2
  40. package/dist/cli.js +32 -15
  41. package/dist/{codex-adapter-kw11ps3j.js → codex-adapter-xs96bk7q.js} +2 -2
  42. package/dist/{codex-session-runner-sffb69v7.js → codex-session-runner-6pmpps53.js} +2 -2
  43. package/dist/{commands-0xxp4tz8.js → commands-w9aew5wy.js} +2 -2
  44. package/dist/{db-0npp39zd.js → db-n9mkqra1.js} +14 -2
  45. package/dist/{handlers-5p7a1jx6.js → handlers-d85dad77.js} +8 -9
  46. package/dist/{hook-hpefr0a8.js → hook-b0esk5x0.js} +1 -1
  47. package/dist/{hook-jjpxn4se.js → hook-xvgmr8fy.js} +2 -2
  48. package/dist/{http-wfp33653.js → http-z6xvenyn.js} +449 -142
  49. package/dist/{index-racb4wfq.js → index-0jarmr18.js} +14 -9
  50. package/dist/{index-zh66wm65.js → index-jk6yh0ae.js} +13 -8
  51. package/dist/{index-17h657rg.js → index-kpbwz25b.js} +8 -8
  52. package/dist/{index-m2p7ctyh.js → index-pfz6zv23.js} +15 -11
  53. package/dist/{keepalive-wxjd633a.js → keepalive-xa02fswe.js} +4 -4
  54. package/dist/{lead-359ec2z0.js → lead-a7jwwagk.js} +25 -26
  55. package/dist/{maintenance-rr03qjtb.js → maintenance-6tnqj4j4.js} +4 -4
  56. package/dist/{oauth-refresh-sweep-jwj22yb8.js → oauth-refresh-sweep-vknm6ccm.js} +3 -3
  57. package/dist/{onboard-asnhchcv.js → onboard-86kbbtdg.js} +17 -5
  58. package/dist/{opencode-adapter-sx38y7f7.js → opencode-adapter-kmekccyw.js} +2 -2
  59. package/dist/{otel-impl-54cra6mw.js → otel-impl-znnembe2.js} +70 -1
  60. package/dist/{pricing-refresh-mkyy7c2y.js → pricing-refresh-rqqx9472.js} +4 -4
  61. package/dist/{rbac-roles-kb3afm95.js → rbac-roles-1hw4qx7y.js} +3 -3
  62. package/dist/{rbac-roles-ak56tr75.js → rbac-roles-bj64wrty.js} +2 -2
  63. package/dist/{render-v2-434asg49.js → render-v2-9jbqnd84.js} +3 -4
  64. package/dist/{seed-pricing-nbmd7ah8.js → seed-pricing-qr2a5cx5.js} +3 -3
  65. package/dist/{setup-wh4qmjs4.js → setup-3mknfyyh.js} +2 -2
  66. package/dist/{worker-j1d27tjv.js → worker-4smjj0mx.js} +25 -26
  67. package/openapi.json +150 -8
  68. package/package.json +4 -3
  69. package/src/be/db-client.ts +58 -5
  70. package/src/be/db-retention.ts +550 -121
  71. package/src/be/db.ts +339 -54
  72. package/src/be/migrations/140_approval_request_cancelled_status.sql +64 -0
  73. package/src/be/seed-pricing.ts +18 -8
  74. package/src/be/swarm-config-guard.ts +33 -0
  75. package/src/cli.tsx +20 -1
  76. package/src/commands/onboard/compose-generator.ts +2 -2
  77. package/src/commands/onboard/types.ts +9 -0
  78. package/src/commands/onboard.tsx +10 -1
  79. package/src/heartbeat/heartbeat.ts +47 -7
  80. package/src/http/approval-requests.ts +53 -8
  81. package/src/http/stats.ts +21 -30
  82. package/src/otel-impl.ts +96 -1
  83. package/src/otel.ts +34 -0
  84. package/src/providers/claude-managed-models.ts +17 -1
  85. package/src/server-user.ts +1 -0
  86. package/src/tasks/worker-follow-up.ts +78 -7
  87. package/src/tests/agents-list-model-display.test.ts +20 -0
  88. package/src/tests/approval-cancellation-migration.test.ts +134 -0
  89. package/src/tests/approval-requests.test.ts +456 -2
  90. package/src/tests/claude-managed-adapter.test.ts +12 -0
  91. package/src/tests/context-window.test.ts +2 -0
  92. package/src/tests/db-client-busy-retry.test.ts +18 -0
  93. package/src/tests/db-client.test.ts +23 -0
  94. package/src/tests/db-retention-telemetry.test.ts +569 -0
  95. package/src/tests/db-retention.test.ts +456 -117
  96. package/src/tests/heartbeat.test.ts +140 -0
  97. package/src/tests/migration-046-budgets.test.ts +27 -5
  98. package/src/tests/onboard-compose.test.ts +16 -0
  99. package/src/tests/pool-affinity.test.ts +100 -0
  100. package/src/tests/script-connections.test.ts +2 -0
  101. package/src/tests/session-costs-model-key-normalize.test.ts +2 -0
  102. package/src/tests/task-tools-ctx.test.ts +88 -1
  103. package/src/tests/workflow-http-v2.test.ts +17 -2
  104. package/src/tests/workflow-retry-v2.test.ts +142 -1
  105. package/src/tools/get-task-details.ts +1 -0
  106. package/src/tools/send-task.ts +28 -10
  107. package/src/tools/task-action.ts +13 -5
  108. package/src/types.ts +11 -2
  109. package/src/utils/context-window.ts +2 -0
  110. package/src/workflows/approval-notifications.ts +72 -0
  111. package/src/workflows/checkpoint.ts +16 -9
  112. package/src/workflows/completed-step-routing.ts +31 -0
  113. package/src/workflows/engine.ts +59 -43
  114. package/src/workflows/executors/human-in-the-loop.ts +38 -4
  115. package/src/workflows/resume.ts +90 -13
  116. package/src/workflows/retry-poller.ts +8 -1
  117. package/dist/cli-5tnr64pm.js +0 -29
package/README.md CHANGED
@@ -138,7 +138,7 @@ Check [our templates](https://templates.agent-swarm.dev) for a quick start.
138
138
  - **Typed script API connections** — lead-managed OpenAPI, GraphQL, and MCP connections generate `ctx.api.*` / `ctx.mcp.*` clients for scripts, with credential bindings and OAuth-backed auth kept server-side. [Guide →](https://docs.agent-swarm.dev/docs/guides/script-connections)
139
139
  - **Swarm Apps** — agents build versioned, schema-backed dashboard apps with reusable UI elements, named queries and actions, per-user settings, RBAC, history, and safe rollback. Models can also sync source-backed rows through owner-scoped script connections. [Apps API →](https://docs.agent-swarm.dev/docs/api-reference/apps)
140
140
  - **E2B-backed eval harness** — run a scenario × harness-config matrix against real swarm stacks, capture transcripts/artifacts, and grade outcomes with deterministic checks plus LLM or agentic judges. [Guide →](https://docs.agent-swarm.dev/docs/guides/evals-harness)
141
- - **Harness & LLM agnostic** — run with Claude Code, Claude Bridge, OpenAI Codex, pi-mono (Anthropic, OpenRouter, or Amazon Bedrock), Devin, Claude Managed Agents, raw LLMs, or opencode. The dashboard model picker follows a live models.dev catalog (with a bundled snapshot fallback), so newly released provider models appear without a redeploy. Route every OpenRouter-backed harness, workflow, and summarizer through an OpenAI-compatible gateway with `OPENROUTER_BASE_URL`. Tasks, schedules, and workflow agent-task nodes can use portable `modelTier` intent (`smol`, `regular`, `smart`, `ultra`), and operators can set per-agent reasoning effort (`off` → `max`, where supported) without changing task payloads. [Harness config →](https://docs.agent-swarm.dev/docs/guides/harness-configuration) · [Add a new provider →](https://docs.agent-swarm.dev/docs/guides/harness-providers)
141
+ - **Harness & LLM agnostic** — run with Claude Code, Claude Bridge, OpenAI Codex, pi-mono (Anthropic, OpenRouter, or Amazon Bedrock), Devin, Claude Managed Agents, raw LLMs, or opencode. The dashboard model picker follows a live models.dev catalog (with a bundled snapshot fallback), and the direct Claude catalog includes Fable 5.1 and Mythos 5.1. Route every OpenRouter-backed harness, workflow, and summarizer through an OpenAI-compatible gateway with `OPENROUTER_BASE_URL`. Tasks, schedules, and workflow agent-task nodes can use portable `modelTier` intent (`smol`, `regular`, `smart`, `ultra`), and operators can set per-agent reasoning effort (`off` → `max`, where supported) without changing task payloads. [Harness config →](https://docs.agent-swarm.dev/docs/guides/harness-configuration) · [Add a new provider →](https://docs.agent-swarm.dev/docs/guides/harness-providers)
142
142
  - **Published release artifacts** — every release publishes multi-architecture API, full-worker, and slim-worker images alongside versioned E2B templates, the npm CLI package, and the Helm chart. [Artifact inventory →](https://docs.agent-swarm.dev/docs/guides/published-artifacts)
143
143
  - **OpenTelemetry traces plus OTLP cost/token metrics** — export API + worker traces and finalized session cost/token counters through the same OTLP pipeline for dashboarding in SigNoz, Datadog, Tempo, or another compatible backend. [Observability →](https://docs.agent-swarm.dev/docs/guides/observability-opentelemetry)
144
144
  - **Follow-up continuity across all harnesses** — child tasks inherit a bounded prior-task context preamble built from the task chain, so continuity survives restarts and works the same across every provider. [Task lifecycle →](https://docs.agent-swarm.dev/docs/concepts/task-lifecycle)
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  resolveSlackUserId
3
- } from "./cli-y16cesaq.js";
4
- import"./cli-spf767vc.js";
3
+ } from "./cli-wbz1r82c.js";
4
+ import"./cli-51jykxr5.js";
5
5
  import {
6
6
  createTaskWithSiblingAwareness
7
- } from "./cli-gpdtxzar.js";
7
+ } from "./cli-0rqqrdq1.js";
8
8
  import {
9
9
  buildCancelledBlocks,
10
10
  ensureSlackThreadTree,
@@ -12,10 +12,9 @@ import {
12
12
  getAgentEmoji,
13
13
  getTaskLink,
14
14
  isSlackRenderV2Enabled
15
- } from "./cli-d5ygfv18.js";
15
+ } from "./cli-1q0gs34j.js";
16
16
  import"./cli-qf9kpsve.js";
17
17
  import"./cli-g2p9bd1z.js";
18
- import"./cli-5tnr64pm.js";
19
18
  import {
20
19
  cancelTask,
21
20
  getAgentById,
@@ -24,7 +23,7 @@ import {
24
23
  init_context_key,
25
24
  init_db,
26
25
  slackContextKey
27
- } from "./cli-tmn19cdz.js";
26
+ } from "./cli-9ss6ddaz.js";
28
27
  import"./cli-d2epf5ae.js";
29
28
  import"./cli-87zrjxdb.js";
30
29
  import"./cli-a1rrkrb4.js";
@@ -32,7 +31,7 @@ import"./cli-qt5bt3vk.js";
32
31
  import"./cli-nanaxrz6.js";
33
32
  import"./cli-s35981d0.js";
34
33
  import"./cli-mkq1rk7b.js";
35
- import"./cli-4r4jkqep.js";
34
+ import"./cli-4rpfrgvp.js";
36
35
  import"./cli-pqv5gvyf.js";
37
36
  import"./cli-qntkxysp.js";
38
37
  import"./cli-497b685t.js";
@@ -3,11 +3,10 @@ import {
3
3
  initSlackApp,
4
4
  startSlackApp,
5
5
  stopSlackApp
6
- } from "./cli-d5ygfv18.js";
6
+ } from "./cli-1q0gs34j.js";
7
7
  import"./cli-qf9kpsve.js";
8
8
  import"./cli-g2p9bd1z.js";
9
- import"./cli-5tnr64pm.js";
10
- import"./cli-tmn19cdz.js";
9
+ import"./cli-9ss6ddaz.js";
11
10
  import"./cli-d2epf5ae.js";
12
11
  import"./cli-87zrjxdb.js";
13
12
  import"./cli-a1rrkrb4.js";
@@ -15,7 +14,7 @@ import"./cli-qt5bt3vk.js";
15
14
  import"./cli-nanaxrz6.js";
16
15
  import"./cli-s35981d0.js";
17
16
  import"./cli-mkq1rk7b.js";
18
- import"./cli-4r4jkqep.js";
17
+ import"./cli-4rpfrgvp.js";
19
18
  import"./cli-pqv5gvyf.js";
20
19
  import"./cli-qntkxysp.js";
21
20
  import"./cli-497b685t.js";
@@ -2,27 +2,26 @@ import {
2
2
  bufferThreadMessage,
3
3
  getBufferMessageCount,
4
4
  wasEventSeen
5
- } from "./cli-35jknh9e.js";
5
+ } from "./cli-2twz8nkg.js";
6
6
  import {
7
7
  hasOtherUserMention
8
- } from "./cli-84vrhesc.js";
8
+ } from "./cli-8rk51bx5.js";
9
9
  import {
10
10
  resolveSlackUserId,
11
11
  rewriteSlackMentions
12
- } from "./cli-y16cesaq.js";
13
- import"./cli-spf767vc.js";
12
+ } from "./cli-wbz1r82c.js";
13
+ import"./cli-51jykxr5.js";
14
14
  import {
15
15
  createTaskWithSiblingAwareness
16
- } from "./cli-gpdtxzar.js";
16
+ } from "./cli-0rqqrdq1.js";
17
17
  import {
18
18
  ackSlackMessage,
19
19
  ensureSlackThreadTree,
20
20
  isSlackRenderV2Enabled,
21
21
  require_dist
22
- } from "./cli-d5ygfv18.js";
22
+ } from "./cli-1q0gs34j.js";
23
23
  import"./cli-qf9kpsve.js";
24
24
  import"./cli-g2p9bd1z.js";
25
- import"./cli-5tnr64pm.js";
26
25
  import {
27
26
  getAgentWorkingOnThread,
28
27
  getLeadAgent,
@@ -30,7 +29,7 @@ import {
30
29
  init_context_key,
31
30
  init_db,
32
31
  slackContextKey
33
- } from "./cli-tmn19cdz.js";
32
+ } from "./cli-9ss6ddaz.js";
34
33
  import"./cli-d2epf5ae.js";
35
34
  import {
36
35
  init_resolver,
@@ -44,7 +43,7 @@ import {
44
43
  } from "./cli-nanaxrz6.js";
45
44
  import"./cli-s35981d0.js";
46
45
  import"./cli-mkq1rk7b.js";
47
- import"./cli-4r4jkqep.js";
46
+ import"./cli-4rpfrgvp.js";
48
47
  import"./cli-pqv5gvyf.js";
49
48
  import"./cli-qntkxysp.js";
50
49
  import"./cli-497b685t.js";
@@ -1,14 +1,14 @@
1
1
  import {
2
2
  embedScript,
3
3
  embeddingProvider
4
- } from "./cli-qckgdqmr.js";
5
- import"./cli-hz5hp6wn.js";
4
+ } from "./cli-kjxt8kst.js";
5
+ import"./cli-70fp7kxv.js";
6
6
  import"./cli-dr5tcz68.js";
7
7
  import"./cli-vsap7a8d.js";
8
8
  import {
9
9
  getDbClient,
10
10
  init_db
11
- } from "./cli-tmn19cdz.js";
11
+ } from "./cli-9ss6ddaz.js";
12
12
  import"./cli-d2epf5ae.js";
13
13
  import"./cli-87zrjxdb.js";
14
14
  import"./cli-a1rrkrb4.js";
@@ -16,7 +16,7 @@ import"./cli-qt5bt3vk.js";
16
16
  import"./cli-nanaxrz6.js";
17
17
  import"./cli-s35981d0.js";
18
18
  import"./cli-mkq1rk7b.js";
19
- import"./cli-4r4jkqep.js";
19
+ import"./cli-4rpfrgvp.js";
20
20
  import"./cli-pqv5gvyf.js";
21
21
  import"./cli-pq2ee5ja.js";
22
22
 
@@ -3,13 +3,13 @@ import {
3
3
  getEmbeddingProvider,
4
4
  getMemoryStore,
5
5
  init_constants
6
- } from "./cli-hz5hp6wn.js";
6
+ } from "./cli-70fp7kxv.js";
7
7
  import"./cli-dr5tcz68.js";
8
8
  import"./cli-vsap7a8d.js";
9
9
  import {
10
10
  getDbClient,
11
11
  init_db
12
- } from "./cli-tmn19cdz.js";
12
+ } from "./cli-9ss6ddaz.js";
13
13
  import"./cli-d2epf5ae.js";
14
14
  import"./cli-87zrjxdb.js";
15
15
  import"./cli-a1rrkrb4.js";
@@ -17,7 +17,7 @@ import"./cli-qt5bt3vk.js";
17
17
  import"./cli-nanaxrz6.js";
18
18
  import"./cli-s35981d0.js";
19
19
  import"./cli-mkq1rk7b.js";
20
- import"./cli-4r4jkqep.js";
20
+ import"./cli-4rpfrgvp.js";
21
21
  import"./cli-pqv5gvyf.js";
22
22
  import"./cli-pq2ee5ja.js";
23
23
 
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  getDbClient,
3
3
  init_db
4
- } from "./cli-tmn19cdz.js";
4
+ } from "./cli-9ss6ddaz.js";
5
5
  import"./cli-d2epf5ae.js";
6
6
  import"./cli-87zrjxdb.js";
7
7
  import"./cli-a1rrkrb4.js";
@@ -12,7 +12,7 @@ import {
12
12
  init_secret_scrubber,
13
13
  scrubSecrets
14
14
  } from "./cli-mkq1rk7b.js";
15
- import"./cli-4r4jkqep.js";
15
+ import"./cli-4rpfrgvp.js";
16
16
  import"./cli-pqv5gvyf.js";
17
17
  import"./cli-pq2ee5ja.js";
18
18
 
@@ -12,14 +12,14 @@ import {
12
12
  resolveClaudeBinary,
13
13
  resolveClaudeBinaryArgv,
14
14
  resolveClaudeBridgeEnabled
15
- } from "./cli-edwrx42s.js";
16
- import"./cli-6gwgzdgw.js";
15
+ } from "./cli-kgbqd43h.js";
16
+ import"./cli-kx0gdyhx.js";
17
17
  import"./cli-a3pkfpqs.js";
18
18
  import"./cli-qhfkxrpg.js";
19
19
  import"./cli-hp1n6zq3.js";
20
20
  import"./cli-tng3131n.js";
21
21
  import"./cli-zm7njwzd.js";
22
- import"./cli-cw70hymf.js";
22
+ import"./cli-s25avqg9.js";
23
23
  import"./cli-v1mwc5v2.js";
24
24
  import"./cli-8p37s71j.js";
25
25
  import"./cli-e7d20cty.js";
@@ -36,7 +36,7 @@ import"./cli-qt5bt3vk.js";
36
36
  import"./cli-nanaxrz6.js";
37
37
  import"./cli-s35981d0.js";
38
38
  import"./cli-mkq1rk7b.js";
39
- import"./cli-4r4jkqep.js";
39
+ import"./cli-4rpfrgvp.js";
40
40
  import"./cli-pqv5gvyf.js";
41
41
  import"./cli-darcwax3.js";
42
42
  import"./cli-00w4hbam.js";
@@ -3,11 +3,11 @@ import {
3
3
  checkClaudeManagedCredentials,
4
4
  composeManagedUserMessage,
5
5
  normalizeRepoUrl
6
- } from "./cli-0crn5kaz.js";
6
+ } from "./cli-rwv20439.js";
7
7
  import"./cli-hsxj0yar.js";
8
8
  import"./cli-f64gdfxc.js";
9
9
  import"./cli-hp1n6zq3.js";
10
- import"./cli-cw70hymf.js";
10
+ import"./cli-s25avqg9.js";
11
11
  import"./cli-jepmgn7r.js";
12
12
  import"./cli-mkq1rk7b.js";
13
13
  import"./cli-pq2ee5ja.js";
@@ -3,7 +3,7 @@ import {
3
3
  getAgentById,
4
4
  getInProgressTasksByContextKey,
5
5
  init_db
6
- } from "./cli-tmn19cdz.js";
6
+ } from "./cli-9ss6ddaz.js";
7
7
 
8
8
  // src/tasks/sibling-awareness.ts
9
9
  init_db();
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  getDb,
3
3
  init_db
4
- } from "./cli-tmn19cdz.js";
4
+ } from "./cli-9ss6ddaz.js";
5
5
 
6
6
  // src/be/seed-pricing.ts
7
7
  init_db();
@@ -86,12 +86,16 @@ var MANUAL_PRICING_OVERRIDES = [
86
86
  }
87
87
  ];
88
88
  var ANTHROPIC_SHORTNAME_TO_MODELSDEV = {
89
- fable: "claude-fable-5",
90
- mythos: "claude-mythos-5",
89
+ fable: "claude-fable-5-1",
90
+ mythos: "claude-mythos-5-1",
91
91
  opus: "claude-opus-5",
92
92
  sonnet: "claude-sonnet-5",
93
93
  haiku: "claude-haiku-4-5"
94
94
  };
95
+ var ANTHROPIC_SHORTNAME_PRICING_FALLBACKS = {
96
+ "claude-fable-5-1": { input: 10, output: 50, cache_read: 0.25, cache_write: 12.5 },
97
+ "claude-mythos-5-1": { input: 10, output: 50, cache_read: 0.25, cache_write: 12.5 }
98
+ };
95
99
  function projectCostBlock(provider, model, cost, opts = {}) {
96
100
  const key = normalizeModelKey(provider, model);
97
101
  const rows = [];
@@ -141,20 +145,20 @@ function buildModelsDevSeedRows(cache) {
141
145
  }
142
146
  }
143
147
  for (const [shortname, fullId] of Object.entries(ANTHROPIC_SHORTNAME_TO_MODELSDEV)) {
144
- const target = anthropic[fullId];
145
- if (!target?.cost)
148
+ const cost = anthropic[fullId]?.cost ?? (cache.anthropic ? ANTHROPIC_SHORTNAME_PRICING_FALLBACKS[fullId] : undefined);
149
+ if (!cost)
146
150
  continue;
147
151
  for (const provider of ["claude", "claude-managed"]) {
148
- for (const row of projectCostBlock(provider, shortname, target.cost)) {
152
+ for (const row of projectCostBlock(provider, shortname, cost)) {
149
153
  rows.push(row);
150
154
  }
151
155
  }
152
156
  }
153
157
  for (const [shortname, fullId] of Object.entries(ANTHROPIC_SHORTNAME_TO_MODELSDEV)) {
154
- const target = anthropic[fullId];
155
- if (!target?.cost)
158
+ const cost = anthropic[fullId]?.cost ?? (cache.anthropic ? ANTHROPIC_SHORTNAME_PRICING_FALLBACKS[fullId] : undefined);
159
+ if (!cost)
156
160
  continue;
157
- for (const row of projectCostBlock("pi", shortname, target.cost, { anthropicBilled: true })) {
161
+ for (const row of projectCostBlock("pi", shortname, cost, { anthropicBilled: true })) {
158
162
  rows.push(row);
159
163
  }
160
164
  }
@@ -5,9 +5,6 @@ import {
5
5
  require_jws,
6
6
  require_p_retry
7
7
  } from "./cli-g2p9bd1z.js";
8
- import {
9
- taskAttachmentDisplayUrl
10
- } from "./cli-5tnr64pm.js";
11
8
  import {
12
9
  bindSlackMessageTimestamp,
13
10
  deleteSlackMessageRecord,
@@ -37,8 +34,9 @@ import {
37
34
  setSlackMessageTracking,
38
35
  slackContextKey,
39
36
  updateSlackMessageRecord
40
- } from "./cli-tmn19cdz.js";
37
+ } from "./cli-9ss6ddaz.js";
41
38
  import {
39
+ buildAgentFsLiveUrl,
42
40
  getAppUrl,
43
41
  init_constants
44
42
  } from "./cli-a1rrkrb4.js";
@@ -53969,6 +53967,28 @@ init_db();
53969
53967
  init_context_key();
53970
53968
  init_env_flag();
53971
53969
 
53970
+ // src/utils/task-attachment-links.ts
53971
+ init_constants();
53972
+ function taskAttachmentDisplayUrl(attachment) {
53973
+ if (attachment.kind === "url")
53974
+ return attachment.url ?? "";
53975
+ if (attachment.kind === "page") {
53976
+ return attachment.pageId ? `${getAppUrl()}/pages/${attachment.pageId}` : "page:";
53977
+ }
53978
+ if (attachment.providerId === "agent-fs" || attachment.kind === "agent-fs") {
53979
+ const liveUrl = buildAgentFsLiveUrl({
53980
+ path: attachment.path,
53981
+ orgId: attachment.orgId,
53982
+ driveId: attachment.driveId
53983
+ });
53984
+ return liveUrl ?? `agent-fs:${attachment.path ?? ""}`;
53985
+ }
53986
+ if (attachment.providerId === "local-fs" || attachment.kind === "shared-fs") {
53987
+ return `${getAppUrl()}/api/fs/tasks/${attachment.taskId}/files/${attachment.id}/raw`;
53988
+ }
53989
+ return attachment.path ?? attachment.providerKey ?? "";
53990
+ }
53991
+
53972
53992
  // src/slack/ack.ts
53973
53993
  init_db();
53974
53994
  init_types();
@@ -55183,13 +55203,13 @@ async function initSlackApp() {
55183
55203
  socketMode: true,
55184
55204
  logLevel: import_bolt.LogLevel.DEBUG
55185
55205
  });
55186
- const { registerMessageHandler } = await import("./handlers-5p7a1jx6.js");
55187
- const { registerCommandHandler } = await import("./commands-0xxp4tz8.js");
55188
- const { registerActionHandlers } = await import("./actions-agcbc8nd.js");
55206
+ const { registerMessageHandler } = await import("./handlers-d85dad77.js");
55207
+ const { registerCommandHandler } = await import("./commands-w9aew5wy.js");
55208
+ const { registerActionHandlers } = await import("./actions-km7fjk3b.js");
55189
55209
  registerMessageHandler(app);
55190
55210
  registerCommandHandler(app);
55191
55211
  registerActionHandlers(app);
55192
- const { createAssistant } = await import("./assistant-yd3jkb9d.js");
55212
+ const { createAssistant } = await import("./assistant-sj4qjjxc.js");
55193
55213
  app.assistant(createAssistant());
55194
55214
  return app;
55195
55215
  }
@@ -55198,7 +55218,7 @@ async function startSlackApp() {
55198
55218
  await initSlackApp();
55199
55219
  }
55200
55220
  if (app) {
55201
- const { isSlackRenderV2Enabled: isSlackRenderV2Enabled2 } = await import("./render-v2-434asg49.js");
55221
+ const { isSlackRenderV2Enabled: isSlackRenderV2Enabled2 } = await import("./render-v2-9jbqnd84.js");
55202
55222
  if (isSlackRenderV2Enabled2())
55203
55223
  await ensureSlackRenderV2Activation();
55204
55224
  await app.start();
@@ -56041,4 +56061,4 @@ function _resetSlackRenderV2ForTests() {
56041
56061
  cachedTeamId = undefined;
56042
56062
  }
56043
56063
 
56044
- export { require_dist7 as require_dist, ackSlackMessage, getTaskLink, markdownToSlack, buildCancelledBlocks, buildBufferFlushBlocks, buildTreeBlocks, getAgentDisplayName, getAgentEmoji, isSlackRenderV2Enabled, callSlackWithRetry, formatV2Duration, renderThreadTree, ensureSlackThreadTree, streamOutcomeCard, processSlackRenderV2, _resetSlackRenderV2ForTests, registerTreeMessage, getSlackApp, initSlackApp, startSlackApp, stopSlackApp };
56064
+ export { require_dist7 as require_dist, ackSlackMessage, taskAttachmentDisplayUrl, getTaskLink, markdownToSlack, buildCancelledBlocks, buildBufferFlushBlocks, buildTreeBlocks, getAgentDisplayName, getAgentEmoji, isSlackRenderV2Enabled, callSlackWithRetry, formatV2Duration, renderThreadTree, ensureSlackThreadTree, streamOutcomeCard, processSlackRenderV2, _resetSlackRenderV2ForTests, registerTreeMessage, getSlackApp, initSlackApp, startSlackApp, stopSlackApp };
@@ -3,9 +3,10 @@ import {
3
3
  } from "./cli-qh4sqfws.js";
4
4
  import {
5
5
  taskAttachmentDisplayUrl
6
- } from "./cli-5tnr64pm.js";
6
+ } from "./cli-1q0gs34j.js";
7
7
  import {
8
8
  buildRoutingAffinityFromAgent,
9
+ createLogEntry,
9
10
  createTaskExtended,
10
11
  getActiveTaskCount,
11
12
  getAgentById,
@@ -19,11 +20,12 @@ import {
19
20
  init_date_utils,
20
21
  init_db,
21
22
  init_templates,
23
+ isAgentEligibleForTask,
22
24
  normalizeDateRequired,
23
25
  updateAgentMaxTasks,
24
26
  updateAgentStatus,
25
27
  upsertSwarmConfig
26
- } from "./cli-tmn19cdz.js";
28
+ } from "./cli-9ss6ddaz.js";
27
29
  import {
28
30
  init_resolver,
29
31
  resolveTemplate
@@ -379,6 +381,18 @@ async function getPinCandidateAgent(agentId) {
379
381
  return null;
380
382
  return candidate;
381
383
  }
384
+ async function resolveLeadOnlyRecoveryAssignment(task, sourceCandidate) {
385
+ if (!task.routingAffinity?.leadOnly)
386
+ return {};
387
+ if (sourceCandidate?.isLead && isAgentEligibleForTask(sourceCandidate, task)) {
388
+ return { agentId: sourceCandidate.id, decision: "source_lead_pin" };
389
+ }
390
+ const lead = await getLeadAgent();
391
+ if (lead && lead.status !== "offline" && isAgentEligibleForTask(lead, task)) {
392
+ return { agentId: lead.id, decision: "rerouted_to_lead" };
393
+ }
394
+ return { decision: "escalated_unassigned" };
395
+ }
382
396
  function getResumeGeneration(task) {
383
397
  const tag = task.tags.find((value) => value.startsWith(RESUME_GENERATION_TAG_PREFIX));
384
398
  if (!tag)
@@ -478,6 +492,8 @@ async function createResumeFollowUp(args) {
478
492
  return { kind: "workflow-skip", stepId: parent.workflowRunStepId };
479
493
  }
480
494
  let preferredAgentId;
495
+ let authorizationDecision;
496
+ const leadOnly = parent.routingAffinity?.leadOnly === true;
481
497
  if (parent.agentId) {
482
498
  const candidate = await getPinCandidateAgent(parent.agentId);
483
499
  if (candidate) {
@@ -489,13 +505,21 @@ async function createResumeFollowUp(args) {
489
505
  const isGracefulShutdown = args.reason === "graceful_shutdown";
490
506
  const isGracefulPin = isGracefulShutdown && isGracefulResumePinEnabled();
491
507
  const isFreshPinnedReason = !isGracefulShutdown && fresh;
492
- if (hasCap && (isCrashRecovery || isGracefulPin || isFreshPinnedReason)) {
508
+ if (hasCap && (isCrashRecovery || isGracefulPin || isFreshPinnedReason) && (!leadOnly || candidate.isLead)) {
493
509
  preferredAgentId = candidate.id;
510
+ if (leadOnly)
511
+ authorizationDecision = "source_lead_pin";
494
512
  } else if ((isCrashRecovery || isGracefulPin) && !hasCap) {
495
513
  console.warn(`[Heartbeat] ${args.reason} resume for task ${parent.id.slice(0, 8)} NOT pinned: agent ${candidate.id.slice(0, 8)} at capacity (${activeCount}/${candidate.maxTasks ?? 1}); falling back to unassigned pool`);
496
514
  }
497
515
  }
498
516
  }
517
+ if (leadOnly) {
518
+ const source = preferredAgentId ? await getAgentById(preferredAgentId) : null;
519
+ const resolution = await resolveLeadOnlyRecoveryAssignment(parent, source);
520
+ preferredAgentId = resolution.agentId;
521
+ authorizationDecision = resolution.decision;
522
+ }
499
523
  const parentDesc = parent.task.slice(0, 200);
500
524
  const followUpDescription = [
501
525
  "Resume interrupted task.",
@@ -515,13 +539,18 @@ async function createResumeFollowUp(args) {
515
539
  `reason:${args.reason}`,
516
540
  `${RESUME_GENERATION_TAG_PREFIX}${getNextResumeGeneration(parent)}`
517
541
  ];
518
- if (args.reason === "crash_recovery" && preferredAgentId !== undefined) {
542
+ if (args.reason === "crash_recovery" && preferredAgentId === parent.agentId) {
519
543
  tags.push(CRASH_RECOVERY_PIN_TAG);
520
544
  }
521
- if (args.reason === "graceful_shutdown" && preferredAgentId !== undefined) {
545
+ if (args.reason === "graceful_shutdown" && preferredAgentId === parent.agentId) {
522
546
  tags.push(GRACEFUL_SHUTDOWN_PIN_TAG);
523
547
  }
524
- const routingAffinity = parent.agentId ? await buildRoutingAffinityFromAgent(parent.agentId) ?? undefined : undefined;
548
+ const sourceAffinity = parent.agentId ? await buildRoutingAffinityFromAgent(parent.agentId) ?? undefined : undefined;
549
+ const routingAffinity = leadOnly ? {
550
+ ...sourceAffinity ?? parent.routingAffinity,
551
+ capabilities: parent.routingAffinity?.capabilities ?? [],
552
+ leadOnly: true
553
+ } : sourceAffinity;
525
554
  const created = await createTaskExtended(followUpDescription, {
526
555
  agentId: preferredAgentId,
527
556
  creatorAgentId: parent.creatorAgentId,
@@ -532,6 +561,21 @@ async function createResumeFollowUp(args) {
532
561
  parentTaskId: parent.id,
533
562
  routingAffinity
534
563
  });
564
+ if (authorizationDecision) {
565
+ try {
566
+ await createLogEntry({
567
+ eventType: "task_recovery_authorization",
568
+ taskId: created.id,
569
+ agentId: preferredAgentId,
570
+ metadata: {
571
+ leadOnly: true,
572
+ parentTaskId: parent.id,
573
+ sourceAgentId: parent.agentId,
574
+ decision: authorizationDecision
575
+ }
576
+ });
577
+ } catch {}
578
+ }
535
579
  const repointed = await repointTrackerSyncBySwarmId(parent.id, created.id);
536
580
  if (repointed > 0) {
537
581
  console.log(`[ResumeFollowUp] Repointed ${repointed} tracker_sync row(s) from ${parent.id.slice(0, 8)} → ${created.id.slice(0, 8)}`);
@@ -604,4 +648,4 @@ async function createPoolStarvationDecisionTask(args) {
604
648
  return { kind: "created", task: created };
605
649
  }
606
650
 
607
- export { AGENT_MAX_TASKS_CONFIG_KEY, reconcileAgentMaxTasksPolicy, resetAgentMaxTasksMirror, upsertSwarmConfigWithPolicyMirror, runtimeStaleThresholdMinutes, upsertRuntimeInstance, getRuntimeInstanceById, touchRuntimeInstance, markRuntimeInstanceOffline, countActiveRuntimeInstancesForAgent, listRuntimeInstancesForAgent, setRuntimeCredentialReady, reconcileAgentStatusFromRuntimes, agentsWithLiveRuntime, expireStaleRuntimeInstances, getTrackerSync, getTrackerSyncByExternalId, createTrackerSyncIfAbsent, updateTrackerSyncSwarmId, repointTrackerSyncBySwarmId, createTrackerSync, updateTrackerSync, deleteTrackerSync, hasTrackerDelivery, markTrackerDelivery, getAllTrackerSyncs, createTrackerAgentMapping, REBOOT_RETRY_PIN_TAG, getPinCandidateAgent, getResumeGeneration, getNextResumeGeneration, createWorkerTaskFollowUp, createResumeFollowUp, createRerouteDecisionTask, createPoolStarvationDecisionTask };
651
+ export { AGENT_MAX_TASKS_CONFIG_KEY, reconcileAgentMaxTasksPolicy, resetAgentMaxTasksMirror, upsertSwarmConfigWithPolicyMirror, runtimeStaleThresholdMinutes, upsertRuntimeInstance, getRuntimeInstanceById, touchRuntimeInstance, markRuntimeInstanceOffline, countActiveRuntimeInstancesForAgent, listRuntimeInstancesForAgent, setRuntimeCredentialReady, reconcileAgentStatusFromRuntimes, agentsWithLiveRuntime, expireStaleRuntimeInstances, getTrackerSync, getTrackerSyncByExternalId, createTrackerSyncIfAbsent, updateTrackerSyncSwarmId, repointTrackerSyncBySwarmId, createTrackerSync, updateTrackerSync, deleteTrackerSync, hasTrackerDelivery, markTrackerDelivery, getAllTrackerSyncs, createTrackerAgentMapping, REBOOT_RETRY_PIN_TAG, getPinCandidateAgent, resolveLeadOnlyRecoveryAssignment, getResumeGeneration, getNextResumeGeneration, createWorkerTaskFollowUp, createResumeFollowUp, createRerouteDecisionTask, createPoolStarvationDecisionTask };
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  createAdditiveBuffer,
3
3
  extractSlackMessageText
4
- } from "./cli-84vrhesc.js";
4
+ } from "./cli-8rk51bx5.js";
5
5
  import {
6
6
  rewriteSlackMentions
7
- } from "./cli-y16cesaq.js";
7
+ } from "./cli-wbz1r82c.js";
8
8
  import {
9
9
  createTaskWithSiblingAwareness
10
- } from "./cli-gpdtxzar.js";
10
+ } from "./cli-0rqqrdq1.js";
11
11
  import {
12
12
  buildBufferFlushBlocks,
13
13
  ensureSlackThreadTree,
@@ -16,7 +16,7 @@ import {
16
16
  getSlackApp,
17
17
  isSlackRenderV2Enabled,
18
18
  registerTreeMessage
19
- } from "./cli-d5ygfv18.js";
19
+ } from "./cli-1q0gs34j.js";
20
20
  import {
21
21
  createLogEntry,
22
22
  getAgentById,
@@ -29,7 +29,7 @@ import {
29
29
  init_steering,
30
30
  requestSteering,
31
31
  slackContextKey
32
- } from "./cli-tmn19cdz.js";
32
+ } from "./cli-9ss6ddaz.js";
33
33
  import {
34
34
  init_registry,
35
35
  init_steering_enabled,
@@ -17,7 +17,7 @@ import {
17
17
  CONTEXT_FORMULA,
18
18
  clampContextPercent,
19
19
  getContextWindowSize
20
- } from "./cli-cw70hymf.js";
20
+ } from "./cli-s25avqg9.js";
21
21
  import {
22
22
  applyReasoningEffort
23
23
  } from "./cli-8whqavk2.js";
@@ -7,7 +7,7 @@ var package_default;
7
7
  var init_package = __esm(() => {
8
8
  package_default = {
9
9
  name: "@desplega.ai/agent-swarm",
10
- version: "1.136.0",
10
+ version: "1.137.0",
11
11
  description: "agent-swarm.dev — an open-source operating system for AI work: a lead agent breaks goals into tasks, routes them to specialized workers such as Claude Code or Codex, runs each worker in an isolated container, and preserves shared memory, tools, schedules, and review gates so delegated work compounds across sessions.",
12
12
  keywords: [
13
13
  "agent-swarm.dev",
@@ -108,6 +108,7 @@ var init_package = __esm(() => {
108
108
  "prepare-release": "bun scripts/prepare-release.ts",
109
109
  "refresh:vendored-openapi": "bun scripts/refresh-vendored-openapi.ts",
110
110
  "sync-chart-version": "bun scripts/sync-chart-version.ts",
111
+ "bump:agent-fs": "bun scripts/bump-agent-fs.ts",
111
112
  "check-chart-version": "bun scripts/sync-chart-version.ts --check-if-package-version-changed",
112
113
  cli: "bun src/cli.tsx",
113
114
  hook: "bun src/hooks/hook.ts",
@@ -184,8 +185,8 @@ var init_package = __esm(() => {
184
185
  "@inkjs/ui": "^2.0.0",
185
186
  "@linear/sdk": "^77.0.0",
186
187
  "@modelcontextprotocol/sdk": "^1.25.1",
187
- "@openai/codex-sdk": "^0.151.0",
188
- "@opencode-ai/sdk": "^1.18.25",
188
+ "@openai/codex-sdk": "^0.152.1",
189
+ "@opencode-ai/sdk": "^1.18.26",
189
190
  "@openfort/openfort-node": "^0.9.1",
190
191
  "@opentelemetry/api": "^1.9.1",
191
192
  "@opentelemetry/exporter-metrics-otlp-http": "^0.218.0",
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  init_package,
3
3
  package_default
4
- } from "./cli-4r4jkqep.js";
4
+ } from "./cli-4rpfrgvp.js";
5
5
 
6
6
  // src/commands/shared/client-config.ts
7
7
  init_package();
@@ -4,7 +4,7 @@ import {
4
4
  incrKv,
5
5
  init_db,
6
6
  upsertKv
7
- } from "./cli-tmn19cdz.js";
7
+ } from "./cli-9ss6ddaz.js";
8
8
 
9
9
  // src/be/users.ts
10
10
  init_db();
@@ -11,7 +11,7 @@ import {
11
11
  getDbClient,
12
12
  init_db,
13
13
  isSqliteVecAvailable
14
- } from "./cli-tmn19cdz.js";
14
+ } from "./cli-9ss6ddaz.js";
15
15
  import {
16
16
  __esm,
17
17
  __export,
@@ -1,14 +1,14 @@
1
1
  import {
2
2
  buildModelsDevSeedRows,
3
3
  loadModelsDevCache
4
- } from "./cli-tee8w7tq.js";
4
+ } from "./cli-1g5d1yy0.js";
5
5
  import {
6
6
  createLogEntry,
7
7
  getActivePricingRow,
8
8
  getDbClient,
9
9
  init_db,
10
10
  insertPricingRow
11
- } from "./cli-tmn19cdz.js";
11
+ } from "./cli-9ss6ddaz.js";
12
12
  import {
13
13
  init_secret_scrubber,
14
14
  scrubSecrets
@@ -3,7 +3,7 @@ import {
3
3
  getAgentWorkingOnThread,
4
4
  getAllAgents,
5
5
  init_db
6
- } from "./cli-tmn19cdz.js";
6
+ } from "./cli-9ss6ddaz.js";
7
7
  import {
8
8
  init_env_flag,
9
9
  isEnvFlagEnabled