@desplega.ai/agent-swarm 1.142.0 → 1.143.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.
- package/README.md +30 -231
- package/dist/{acp-adapter-6jn4n9bf.js → acp-adapter-qhzzpz4b.js} +146 -15
- package/dist/{actions-1x7qhjcp.js → actions-6s03jvk8.js} +7 -7
- package/dist/{app-1gqhr0zw.js → app-zej2afh5.js} +4 -4
- package/dist/{assistant-ywk5t26k.js → assistant-42xa0m4e.js} +15 -13
- package/dist/{boot-reembed-vvgj1fgk.js → boot-reembed-vx4fkhgd.js} +5 -5
- package/dist/{boot-reembed-45rvpb3m.js → boot-reembed-we49a2kr.js} +6 -6
- package/dist/{boot-scrub-logs-k83hm16a.js → boot-scrub-logs-zefgmq2b.js} +3 -3
- package/dist/{claude-adapter-gcxv09ga.js → claude-adapter-nm0essg1.js} +8 -8
- package/dist/{cli-6spqz3tg.js → cli-2z3qhdg0.js} +1 -1
- package/dist/{cli-myfb8t15.js → cli-4kj5adw0.js} +2 -2
- package/dist/{cli-15atwe0d.js → cli-63erbyda.js} +2 -2
- package/dist/{cli-s84fa8td.js → cli-6garengg.js} +5 -5
- package/dist/{cli-s0w91tq3.js → cli-7pnwg2vx.js} +271 -105
- package/dist/{cli-bc101wmn.js → cli-8e1r79yq.js} +3 -3
- package/dist/{cli-vp3sksy6.js → cli-9bnajfes.js} +1 -1
- package/dist/{cli-thdvmrm6.js → cli-9zjf3ahs.js} +8 -8
- package/dist/{cli-dr5tcz68.js → cli-b4g3p5y2.js} +1 -1
- package/dist/{cli-tbtxpj2k.js → cli-bdyxycq6.js} +25 -117
- package/dist/{cli-jt7k9yw5.js → cli-cppy3dz4.js} +3 -3
- package/dist/{cli-spx3gtdd.js → cli-dcn5dc6j.js} +2 -2
- package/dist/{cli-vf5b436q.js → cli-ewvk4ceg.js} +3 -2
- package/dist/{cli-z0f80e8e.js → cli-hgkw1x1k.js} +1 -1
- package/dist/{cli-pw4gxcx1.js → cli-jdtvfcyw.js} +2 -2
- package/dist/{cli-kfrk073c.js → cli-jmkqrhpm.js} +1 -1
- package/dist/{cli-vqk6rxns.js → cli-m4dadbv4.js} +1 -1
- package/dist/{cli-8bg3den1.js → cli-mjf432kq.js} +2 -2
- package/dist/{cli-0afy4jqg.js → cli-mvsztzgn.js} +15 -8
- package/dist/{cli-z6wjvew7.js → cli-qe636hdh.js} +2 -2
- package/dist/{cli-er2z53kh.js → cli-qjwdtyxn.js} +4 -4
- package/dist/{cli-d2epf5ae.js → cli-r3bxcgrj.js} +1 -1
- package/dist/{cli-dxt17ymm.js → cli-s9y6zv37.js} +2 -2
- package/dist/{cli-6kgqmh9y.js → cli-sshnjch3.js} +4 -4
- package/dist/{cli-2ed3wv25.js → cli-tpa83vxb.js} +1 -1
- package/dist/{cli-48akq54x.js → cli-vn8s7wtf.js} +1 -1
- package/dist/{cli-qmsts4ef.js → cli-vr2nfxtt.js} +937 -607
- package/dist/{cli-rsa49w51.js → cli-wrfhh2qz.js} +1 -1
- package/dist/{cli-a6297e83.js → cli-wtyyc7ev.js} +138 -5
- package/dist/{cli-vqxttjd7.js → cli-z6nsjrh1.js} +3 -3
- package/dist/{cli-pt7gxw9n.js → cli-zxrec1gh.js} +174 -68
- package/dist/cli.js +15 -14
- package/dist/{codex-adapter-xvgkg755.js → codex-adapter-zvh2pgah.js} +5 -4
- package/dist/{codex-hook-7eb9d1d5.js → codex-hook-79p3xs7j.js} +2 -0
- package/dist/{codex-session-runner-1d1ercsj.js → codex-session-runner-bs8tsjx5.js} +53 -26
- package/dist/{commands-k6hhe7ne.js → commands-c73m6m2j.js} +3 -3
- package/dist/{db-w2qb9rss.js → db-n2bgwkr3.js} +11 -3
- package/dist/{google-generative-ai-gzb1jgd4.js → google-generative-ai-nnw57f3t.js} +2 -2
- package/dist/{google-vertex-k21hxh4n.js → google-vertex-rxwnws1y.js} +2 -2
- package/dist/{handlers-v52he40q.js → handlers-s768yzzt.js} +19 -20
- package/dist/{hook-dq02k126.js → hook-m950r3r8.js} +5 -5
- package/dist/{hook-tyqkv069.js → hook-xn3pevet.js} +6 -6
- package/dist/{http-x6fy2qbf.js → http-5rqpbf9g.js} +70 -55
- package/dist/{index-1b2phtyf.js → index-ag4bxqkp.js} +14 -14
- package/dist/{index-wdmwar6v.js → index-d9f3yqc5.js} +12 -12
- package/dist/{index-jmrvpb83.js → index-qgvkk4mz.js} +10 -10
- package/dist/{index-82913rbj.js → index-vb4b1nts.js} +13 -13
- package/dist/{keepalive-5axh79td.js → keepalive-sc7pvszh.js} +5 -5
- package/dist/{lead-7p1rnqt5.js → lead-5zcqts8e.js} +28 -28
- package/dist/{maintenance-mkkk6xtc.js → maintenance-45j327y6.js} +6 -6
- package/dist/{oauth-refresh-sweep-924sa8gn.js → oauth-refresh-sweep-xrydav2q.js} +4 -4
- package/dist/{onboard-7220gcnm.js → onboard-972xcrsh.js} +2 -2
- package/dist/{otel-impl-h4zhfrtn.js → otel-impl-q0mt4sy8.js} +14 -4
- package/dist/{pi-mono-adapter-ncpmv3qw.js → pi-mono-adapter-9tb0c3jh.js} +2 -2
- package/dist/{pricing-refresh-wekg4ay3.js → pricing-refresh-s7n1nec8.js} +5 -5
- package/dist/{rbac-roles-19qa0m3a.js → rbac-roles-hpph0s5w.js} +4 -4
- package/dist/{rbac-roles-tx0er4z4.js → rbac-roles-vxy05wcn.js} +3 -3
- package/dist/{render-v2-hh0d7dyx.js → render-v2-8vk0y1js.js} +4 -4
- package/dist/{seed-pricing-z2snez0a.js → seed-pricing-an8qdaxz.js} +4 -4
- package/dist/{setup-zrp530my.js → setup-frgenxn8.js} +2 -2
- package/dist/{worker-2va0xbjz.js → worker-0w9fdwds.js} +28 -28
- package/openapi.json +1 -1
- package/package.json +3 -2
- package/src/be/db.ts +101 -0
- package/src/be/migrations/144_slack_relay_obligations.sql +44 -0
- package/src/be/swarm-config-guard.ts +43 -0
- package/src/commands/codex-session-runner.ts +65 -45
- package/src/commands/identity-refresh.ts +101 -0
- package/src/commands/runner.ts +145 -52
- package/src/hooks/codex-hook.ts +4 -6
- package/src/http/pages-public.ts +12 -3
- package/src/otel-impl.ts +14 -0
- package/src/otel.ts +8 -0
- package/src/providers/acp-adapter.ts +146 -12
- package/src/providers/acp-swarm-events.ts +16 -2
- package/src/providers/codex-adapter.ts +813 -242
- package/src/providers/codex-app-server.ts +419 -0
- package/src/providers/pricing-sources.md +3 -0
- package/src/providers/types.ts +6 -1
- package/src/script-workflows/executor.ts +13 -8
- package/src/slack/ack.ts +106 -19
- package/src/slack/assistant.ts +18 -10
- package/src/slack/handlers.test.ts +172 -5
- package/src/slack/handlers.ts +11 -20
- package/src/slack/reaction-shortcode.ts +45 -0
- package/src/slack/responses.ts +26 -6
- package/src/slack/watcher.ts +125 -92
- package/src/tests/acp-adapter.test.ts +211 -4
- package/src/tests/acp-swarm-events.test.ts +4 -1
- package/src/tests/agents-list-model-display.test.ts +14 -0
- package/src/tests/codex-adapter-otel.test.ts +31 -36
- package/src/tests/codex-adapter.test.ts +624 -197
- package/src/tests/codex-app-server.test.ts +208 -0
- package/src/tests/codex-steering-hook.test.ts +16 -0
- package/src/tests/codex-subprocess-steering.test.ts +109 -0
- package/src/tests/db-query.test.ts +39 -23
- package/src/tests/env-flag.test.ts +75 -0
- package/src/tests/fixtures/codex-deferred-queue-runner.ts +37 -0
- package/src/tests/fixtures/codex-session-runner.ts +40 -0
- package/src/tests/fixtures/fake-codex-app-server.ts +100 -0
- package/src/tests/fixtures/runner-identity-refresh.ts +178 -0
- package/src/tests/identity-refresh.test.ts +145 -0
- package/src/tests/profile-default-refresh.test.ts +125 -0
- package/src/tests/runner-identity-refresh.test.ts +105 -0
- package/src/tests/sandboxed-process.test.ts +73 -0
- package/src/tests/script-workflows-runtime-e2e.test.ts +71 -1
- package/src/tests/slack-reaction-config.test.ts +399 -0
- package/src/tests/slack-relay-obligations.test.ts +175 -0
- package/src/tests/slack-thread-buffer.test.ts +7 -3
- package/src/tests/slack-watcher.test.ts +172 -2
- package/src/tests/steering-core.test.ts +5 -8
- package/src/tests/steering-transport.test.ts +98 -7
- package/src/tests/ui-logs-parser.test.ts +402 -0
- package/src/tests/vendored-openapi.test.ts +3 -4
- package/src/types.ts +2 -7
- package/src/utils/sandboxed-process.ts +51 -6
- package/templates/schedules/weekly-harness-upgrade-check/content.md +3 -4
- package/dist/{cli-s9gpxh9q.js → cli-w2jy8x2r.js} +3 -3
package/README.md
CHANGED
|
@@ -1,60 +1,21 @@
|
|
|
1
|
-
<p align="center">
|
|
2
|
-
|
|
3
|
-
<a href="https://github.com/desplega-ai/agent-swarm/blob/main/LICENSE"><img src="https://img.shields.io/github/license/desplega-ai/agent-swarm?style=flat-square" alt="MIT License"></a>
|
|
4
|
-
<a href="https://github.com/desplega-ai/agent-swarm/pulls"><img src="https://img.shields.io/badge/PRs-welcome-brightgreen?style=flat-square" alt="PRs Welcome"></a>
|
|
5
|
-
</p>
|
|
6
|
-
|
|
7
|
-
<p align="center">
|
|
8
|
-
<b>An engine to make your company AI Native</b><br/>
|
|
9
|
-
<sub>Built by <a href="https://desplega.sh">desplega.sh</a> — by builders, for builders.</sub>
|
|
10
|
-
</p>
|
|
1
|
+
<p align="center"><a href="https://github.com/desplega-ai/agent-swarm/stargazers"><img src="https://img.shields.io/github/stars/desplega-ai/agent-swarm?style=flat-square&color=yellow" alt="GitHub Stars"></a> <a href="https://github.com/desplega-ai/agent-swarm/blob/main/LICENSE"><img src="https://img.shields.io/github/license/desplega-ai/agent-swarm?style=flat-square" alt="MIT License"></a> <a href="https://github.com/desplega-ai/agent-swarm/pulls"><img src="https://img.shields.io/badge/PRs-welcome-brightgreen?style=flat-square" alt="PRs Welcome"></a></p>
|
|
2
|
+
<p align="center"><b>An engine to make your company AI Native</b><br/><sub>Built by <a href="https://desplega.sh">desplega.sh</a>.</sub></p>
|
|
11
3
|
|
|
12
4
|
> [!TIP]
|
|
13
5
|
> **This repo evolves every single day.** [Watch now →](https://github.com/desplega-ai/agent-swarm/subscription)
|
|
6
|
+
<p align="center"><video src="https://github.com/user-attachments/assets/e220712e-c54d-4f46-b059-bac04639d229" controls muted playsinline width="720"></video></p>
|
|
7
|
+
<p align="center"><sub>▸ <a href="./assets/agent-swarm.mp4">daily evolution</a> · <a href="./assets/agent-swarm-slack-to-pr.mp4">slack → pr</a> · <a href="./assets/video-source">Making of</a></sub></p>
|
|
8
|
+
<p align="center"><a href="https://agent-swarm.dev"><img src="https://img.shields.io/badge/Website-agent--swarm.dev-000?style=for-the-badge" alt="Website"></a> <a href="https://docs.agent-swarm.dev"><img src="https://img.shields.io/badge/Docs-docs.agent--swarm.dev-amber?style=for-the-badge" alt="Docs"></a> <a href="https://app.agent-swarm.dev"><img src="https://img.shields.io/badge/Dashboard-app.agent--swarm.dev-blue?style=for-the-badge" alt="Dashboard"></a> <a href="https://discord.gg/KZgfyyDVZa"><img src="https://img.shields.io/badge/Discord-Join%20Community-5865F2?style=for-the-badge&logo=discord&logoColor=white" alt="Join Discord"></a> <a href="https://x.com/desplegalabs"><img src="https://img.shields.io/badge/𝕏-@desplegalabs-000?style=for-the-badge&logo=x&logoColor=white" alt="Follow on X"></a> <a href="https://www.linkedin.com/company/desplega-labs/"><img src="https://img.shields.io/badge/LinkedIn-Desplega%20Labs-0A66C2?style=for-the-badge&logo=linkedin&logoColor=white" alt="Desplega Labs on LinkedIn"></a></p>
|
|
14
9
|
|
|
15
|
-
|
|
16
|
-
<video src="https://github.com/user-attachments/assets/e220712e-c54d-4f46-b059-bac04639d229" controls muted playsinline width="720"></video>
|
|
17
|
-
</p>
|
|
18
|
-
<p align="center">
|
|
19
|
-
<sub>▸ <a href="./assets/agent-swarm.mp4">daily evolution</a> · <a href="./assets/agent-swarm-slack-to-pr.mp4">slack → pr</a> · <a href="./assets/video-source">Making of</a></sub>
|
|
20
|
-
</p>
|
|
21
|
-
|
|
22
|
-
<p align="center">
|
|
23
|
-
<a href="https://agent-swarm.dev">
|
|
24
|
-
<img src="https://img.shields.io/badge/Website-agent--swarm.dev-000?style=for-the-badge" alt="Website">
|
|
25
|
-
</a>
|
|
26
|
-
<a href="https://docs.agent-swarm.dev">
|
|
27
|
-
<img src="https://img.shields.io/badge/Docs-docs.agent--swarm.dev-amber?style=for-the-badge" alt="Docs">
|
|
28
|
-
</a>
|
|
29
|
-
<a href="https://app.agent-swarm.dev">
|
|
30
|
-
<img src="https://img.shields.io/badge/Dashboard-app.agent--swarm.dev-blue?style=for-the-badge" alt="Dashboard">
|
|
31
|
-
</a>
|
|
32
|
-
<a href="https://discord.gg/KZgfyyDVZa">
|
|
33
|
-
<img src="https://img.shields.io/badge/Discord-Join%20Community-5865F2?style=for-the-badge&logo=discord&logoColor=white" alt="Join Discord">
|
|
34
|
-
</a>
|
|
35
|
-
<a href="https://x.com/desplegalabs">
|
|
36
|
-
<img src="https://img.shields.io/badge/𝕏-@desplegalabs-000?style=for-the-badge&logo=x&logoColor=white" alt="Follow on X">
|
|
37
|
-
</a>
|
|
38
|
-
<a href="https://www.linkedin.com/company/desplega-labs/">
|
|
39
|
-
<img src="https://img.shields.io/badge/LinkedIn-Desplega%20Labs-0A66C2?style=for-the-badge&logo=linkedin&logoColor=white" alt="Desplega Labs on LinkedIn">
|
|
40
|
-
</a>
|
|
41
|
-
</p>
|
|
42
|
-
|
|
43
|
-
> **agent-swarm.dev is 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.**
|
|
44
|
-
|
|
45
|
-
> AI-Native · Compounds · Presence · Harness & LLM-Agnostic · Your Infra · Your Memory ·
|
|
46
|
-
|
|
47
|
-
## What it does
|
|
48
|
-
|
|
49
|
-
agent-swarm.dev runs a team of AI agents that coordinate autonomously. A **lead agent** receives tasks (from Slack, GitHub, GitLab, Linear, Jira, email, or the API), breaks them down, and delegates to **worker agents** running in isolated environments (Docker). Workers execute tasks, ship solutions, and write their learnings back to a shared memory so the whole swarm gets smarter every session.
|
|
10
|
+
agent-swarm.dev is an open-source operating system for AI work. A lead agent delegates goals to workers such as Claude Code or Codex. Isolated containers, shared memory, tools, schedules, and review gates preserve work across sessions.
|
|
50
11
|
|
|
51
|
-
|
|
12
|
+
## What you get
|
|
52
13
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
14
|
+
- A lead agent that receives work from Slack, repositories, issue trackers, email, or the API
|
|
15
|
+
- Workers in isolated Docker containers with development environments
|
|
16
|
+
- Memory and identity that persist across sessions
|
|
17
|
+
- Workflows, schedules, scripts, and apps for recurring work
|
|
18
|
+
- Your choice of harness and models: Claude Code, Codex, pi, opencode, Devin, or ACP agents
|
|
58
19
|
|
|
59
20
|
```mermaid
|
|
60
21
|
flowchart LR
|
|
@@ -94,208 +55,46 @@ flowchart LR
|
|
|
94
55
|
WORKERS --> OUT
|
|
95
56
|
```
|
|
96
57
|
|
|
97
|
-
## Known Use Cases
|
|
98
|
-
|
|
99
|
-
Use cases that are used daily by ourselves and others.
|
|
100
|
-
Each playbook contains: the agents, the tools & skills, and workflows & schedules behind it. **[Browse all playbooks →](https://docs.agent-swarm.dev/docs/playbooks)**
|
|
101
|
-
|
|
102
|
-
- **[Feature Development](https://docs.agent-swarm.dev/docs/playbooks/feature-development)** — Integrated with Linear and GitHub to take feature requests from Slack and turn them into pull requests.
|
|
103
|
-
- **[Lead Prospecting](https://docs.agent-swarm.dev/docs/playbooks/lead-prospecting)** — Integrate your prospecting tools with the swarm and let agents handle outreach, scheduling, and follow-up.
|
|
104
|
-
- **[Content Generation](https://docs.agent-swarm.dev/docs/playbooks/content-generation)** — Generate engagement tools, blog posts, manage social media presence, update your website, and more.
|
|
105
|
-
- **[UX Command Center](https://docs.agent-swarm.dev/docs/playbooks/ux-command-center)** — Agents that keep your product usable: record agentic sessions, enforce your design system, and mine user logs to detect and propose UX improvements.
|
|
106
|
-
- **[Proactive Customer Support](https://docs.agent-swarm.dev/docs/playbooks/proactive-customer-support)** — Agents that oversee your top accounts, prepare scheduled reports, and leverage everything they know about your platform to keep those accounts up to date.
|
|
107
|
-
- **[Code Health & Alert Management](https://docs.agent-swarm.dev/docs/playbooks/code-health-alert-management)** — Datadog, New Relic, Sentry, or any alerting tool can kick off fixes or new proposals. Monitor code health and propose improvements weekly, daily, or hourly.
|
|
108
|
-
- **[Reports from Multiple Sources](https://docs.agent-swarm.dev/docs/playbooks/reports-multiple-sources)** — Integrate your data warehouse to generate tailored reports and answer the key questions your team has, with fresh data. Your BI tool may be a thing of the past.
|
|
109
|
-
- **[Self-Documenting & Release Reports](https://docs.agent-swarm.dev/docs/playbooks/self-documenting-release-reports)** — Update your docs and use frameworks like [Remotion](https://www.remotion.dev/), [qa-use](https://github.com/qa-use/qa-use), and [browser-use](https://github.com/browser-use/browser-use) to generate release videos and rich documentation in seconds, at the cadence you need.
|
|
110
|
-
- Do you have a cool playbook to share? Send us a PR!
|
|
111
|
-
|
|
112
|
-
> **The patterns that compound.** Five recipes show up in nearly every playbook — they're how the swarm stays reliable as it scales:
|
|
113
|
-
> **[Litmus Tests](https://docs.agent-swarm.dev/docs/playbooks/patterns/litmus-tests)** (LLM-as-judge quality gates) ·
|
|
114
|
-
> **[Drain Loops](https://docs.agent-swarm.dev/docs/playbooks/patterns/drain-loops)** (one ticket → a chain of reviewable PRs) ·
|
|
115
|
-
> **[HITL Gates](https://docs.agent-swarm.dev/docs/playbooks/patterns/hitl-gates)** (pause for human approval on irreversible steps) ·
|
|
116
|
-
> **[Per-Customer Working Directories](https://docs.agent-swarm.dev/docs/playbooks/patterns/per-customer-working-directories)** (context that compounds per account) ·
|
|
117
|
-
> **[No-op Workflows](https://docs.agent-swarm.dev/docs/playbooks/patterns/no-op-workflows)** (skip silently when nothing changed).
|
|
118
|
-
> **[See all patterns →](https://docs.agent-swarm.dev/docs/playbooks/patterns)**
|
|
119
|
-
|
|
120
|
-
Check [our templates](https://templates.agent-swarm.dev) for a quick start.
|
|
121
|
-
|
|
122
|
-
## Highlights
|
|
123
|
-
|
|
124
|
-
- **Lead/worker orchestration in Docker** — isolated dev environments, priority queues, pause/resume across deploys, and API-side alerts when claimable work stops being picked up. [Architecture →](https://docs.agent-swarm.dev/docs/architecture/overview)
|
|
125
|
-
- **Compounding memory & persistent identity** — agents explicitly capture reusable learnings with `memory-store`, remember past sessions, and evolve their own persona, expertise, and notes, with ratcheting file budgets and visible recovery when local edits exceed prompt limits. [Memory →](https://docs.agent-swarm.dev/docs/architecture/memory) · [Agents →](https://docs.agent-swarm.dev/docs/architecture/agents)
|
|
126
|
-
- **Hybrid + graph-linked memory recall** — memory retrieval can blend vector and full-text ranking, expand through linked memories, surface usefulness readouts, and let agents correct an existing memory without losing its ID or history. [Memory →](https://docs.agent-swarm.dev/docs/architecture/memory) · [MCP tools →](https://docs.agent-swarm.dev/docs/reference/mcp-tools#memory-tools)
|
|
127
|
-
- **Multi-channel inputs** — Slack, GitHub, GitLab, email, WhatsApp, Linear, Jira, and the HTTP API all create tasks. [Integrations](#integrations)
|
|
128
|
-
- **Slack operations and persistent thread trees** — lead agents can create, populate, and archive channels, while conversations can opt in to one editable task tree with streamed outcome cards and explicit Block Kit messages. [Slack guide →](https://docs.agent-swarm.dev/docs/integrations/slack)
|
|
129
|
-
- **Workflow engine with Human-in-the-Loop** — DAG-based automation with approval gates, retries, structured I/O, and `foreach` fan-out that rejoins child agent tasks deterministically. [Workflows →](https://docs.agent-swarm.dev/docs/concepts/workflows)
|
|
130
|
-
- **Scheduled & recurring tasks** — cron-based automation for standing work, with schedules that can target agent tasks, workflows, or catalog scripts. Bundled automations declare their required parameters and integrations; if enabled before setup is complete, they remain in `needs_setup` instead of dispatching. [Scheduling →](https://docs.agent-swarm.dev/docs/concepts/scheduling)
|
|
131
|
-
- **Mid-run task steering** — add context at the next turn boundary, request an immediate interrupt where the harness supports it, or degrade safely to a follow-up task. [Task steering →](https://docs.agent-swarm.dev/docs/guides/task-steering)
|
|
132
|
-
- **Operator configuration UI** — tune non-secret feature flags, limits, integration toggles, and runtime defaults from Settings → Configuration, with source and restart-required indicators. [Configuration →](https://docs.agent-swarm.dev/docs/ui/configuration)
|
|
133
|
-
- **Asset namespaces** — group tasks, workflows, schedules, pages, apps, scripts, and mapped files under canonical shared or personal keys, with inheritance, subtree filtering, audited moves, and cross-entity discovery. [Asset namespaces →](https://docs.agent-swarm.dev/docs/guides/asset-namespaces)
|
|
134
|
-
- **Persistent shared files via agent-fs** — co-deploy agent-fs for shared task attachments, previews, and search; `store-progress` verifies attachment pointers before changing task state, late provisioning or config reloads activate the provider without an API restart, and tenant-authenticated control planes can invite shared-org members without receiving the bootstrap key. [Co-deployment guide →](https://docs.agent-swarm.dev/docs/guides/agent-fs-co-deployment)
|
|
135
|
-
- **Durable script workflows** — launch background script runs, inspect their journals, and track them from the dashboard when a one-shot `script-run` is too small. User code runs in a credential-free guest while authenticated swarm operations stay behind a capability broker. [Guide →](https://docs.agent-swarm.dev/docs/guides/script-workflow-runs)
|
|
136
|
-
- **Scripts-only MCP mode (code-mode)** — reduce the external MCP surface to eight script tools while retaining the full swarm SDK through `script-run`, cutting tool-schema context for capable coordinator models. [Guide →](https://docs.agent-swarm.dev/docs/guides/scripts-only-mode)
|
|
137
|
-
- **Scripts as external APIs** — expose a saved script as a public `POST /api/x/script/<id>` endpoint with optional bearer auth, typed input validation, and per-endpoint usage tracking. [Guide →](https://docs.agent-swarm.dev/docs/guides/scripts-external-apis)
|
|
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
|
-
- **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
|
-
- **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, opencode, or any [Agent Client Protocol](https://agentclientprotocol.com) agent via the generic `acp` provider. 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. [Compare providers →](https://docs.agent-swarm.dev/docs/guides/provider-capability-matrix) · [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
|
-
- **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
|
-
- **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
|
-
- **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)
|
|
145
|
-
- **Skills & MCP servers** — reusable procedural knowledge, bundled skill reference files, and per-agent MCP servers with scope cascade. [MCP tools →](https://docs.agent-swarm.dev/docs/reference/mcp-tools)
|
|
146
|
-
- **External tool-router access** — the `x` command and `swarm_x` MCP tool let humans and agents execute approved third-party routes such as Composio without baking bespoke MCP servers first. [CLI →](https://docs.agent-swarm.dev/docs/reference/cli) · [Composio →](https://docs.agent-swarm.dev/docs/integrations/composio)
|
|
147
|
-
- **Config-driven metrics dashboards** — define read-only SQL widgets, version them, and render them in the dashboard without shipping custom frontend code. [Metrics API →](https://docs.agent-swarm.dev/docs/api-reference/stats)
|
|
148
|
-
- **DB-backed pages** — agents publish HTML or JSON pages (reports, dashboards, action specs) via `create_page`, remove stale pages with `delete-page`, and share them with public / authed / password modes, version history, view counters, diff helpers, and PDF export. [MCP tools → Pages](https://docs.agent-swarm.dev/docs/reference/mcp-tools#pages-tools)
|
|
149
|
-
- **KV store** — Redis-like namespaced key/value store with auto-scoped context (Slack thread / PR / Linear issue / page). [MCP tools → KV](https://docs.agent-swarm.dev/docs/reference/mcp-tools#kv-tools)
|
|
150
|
-
- **Real-time, themeable dashboard + task attachments** — monitor agents, tasks, per-user usage costs, and inter-agent chat; choose from built-in light/dark themes; filter tasks by requester; create tasks with uploaded files; and preview attachments inline above session prompts. [app.agent-swarm.dev →](https://app.agent-swarm.dev)
|
|
151
|
-
|
|
152
58
|
## Quick Start
|
|
153
59
|
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
**Prerequisites:** [Docker](https://docker.com) and one supported harness credential. Claude remains the default, or choose one of these install-time mappings:
|
|
157
|
-
|
|
158
|
-
| Provider | `HARNESS_PROVIDER` | Credential/configuration |
|
|
159
|
-
| --- | --- | --- |
|
|
160
|
-
| Claude Code | `claude` | `CLAUDE_CODE_OAUTH_TOKEN` or `ANTHROPIC_API_KEY` |
|
|
161
|
-
| OpenAI | `codex` | `OPENAI_API_KEY` |
|
|
162
|
-
| OpenRouter | `pi` | `OPENROUTER_API_KEY` and a `MODEL_OVERRIDE` |
|
|
163
|
-
| AWS Bedrock (alpha) | `pi` | `AWS_REGION`, a Bedrock `MODEL_OVERRIDE`, and AWS credentials or profile |
|
|
164
|
-
|
|
165
|
-
Alpha: session summaries, memory rating, spend tracking and model tiers may be missing on Bedrock. See [model providers and gateways](https://docs.agent-swarm.dev/docs/guides/provider-auth/model-gateways) and [what each provider supports](https://docs.agent-swarm.dev/docs/guides/harness-configuration#supported-providers).
|
|
166
|
-
|
|
167
|
-
The fastest way is the onboarding wizard — it collects credentials, picks presets, and generates a working `docker-compose.yml`:
|
|
60
|
+
Give your coding agent the operator skill for Docker Compose or Kubernetes:
|
|
168
61
|
|
|
169
62
|
```bash
|
|
170
|
-
|
|
171
|
-
npx @desplega.ai/agent-swarm onboard
|
|
63
|
+
npx skills add desplega-ai/agent-swarm
|
|
172
64
|
```
|
|
173
65
|
|
|
174
|
-
|
|
66
|
+
Or use the examples directly:
|
|
175
67
|
|
|
176
68
|
```bash
|
|
177
|
-
git clone https://github.com/desplega-ai/agent-swarm.git
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
69
|
+
git clone https://github.com/desplega-ai/agent-swarm.git && cd agent-swarm
|
|
70
|
+
cp .env.docker.example .env # Set API_KEY, a harness credential, and all eight agent UUIDs.
|
|
71
|
+
openssl rand -base64 32 > encryption_key
|
|
72
|
+
chmod 600 .env encryption_key
|
|
181
73
|
docker compose -f docker-compose.example.yml --env-file .env up -d
|
|
182
74
|
```
|
|
183
75
|
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
<details>
|
|
187
|
-
<summary><strong>Other setups</strong></summary>
|
|
188
|
-
|
|
189
|
-
- **Local API + Docker workers** — run the API on your host, workers in Docker. See [Getting Started](https://docs.agent-swarm.dev/docs/getting-started).
|
|
190
|
-
- **Claude Code as the lead agent** — `bunx @desplega.ai/agent-swarm connect` (or `npx @desplega.ai/agent-swarm connect`), then tell Claude Code to register as the lead.
|
|
191
|
-
|
|
192
|
-
</details>
|
|
193
|
-
|
|
194
|
-
## How It Works
|
|
195
|
-
|
|
196
|
-
```
|
|
197
|
-
You (Slack / GitHub / Email / CLI)
|
|
198
|
-
|
|
|
199
|
-
Lead Agent ←→ MCP API Server ←→ SQLite DB
|
|
200
|
-
|
|
|
201
|
-
┌────┼────┐
|
|
202
|
-
Worker Worker Worker
|
|
203
|
-
(Docker containers with full dev environments)
|
|
204
|
-
```
|
|
205
|
-
|
|
206
|
-
1. A task arrives via Slack DM, GitHub @mention, email, or the API.
|
|
207
|
-
2. The lead plans and delegates subtasks to workers.
|
|
208
|
-
3. Workers execute in isolated Docker containers (git, Node.js, Python, etc.).
|
|
209
|
-
4. Progress streams to the dashboard, Slack threads, or the API.
|
|
210
|
-
5. Results ship back out as PRs, custom pages, issue replies, or Slack messages.
|
|
211
|
-
6. Session learnings are extracted and become memory for future tasks.
|
|
212
|
-
|
|
213
|
-
More detail in the [task lifecycle docs](https://docs.agent-swarm.dev/docs/concepts/task-lifecycle).
|
|
76
|
+
Read the [Compose checklist](./skills/agent-swarm/references/compose.md) before starting. API: http://localhost:3013, with `/docs` and `/openapi.json`. [Dashboard](https://app.agent-swarm.dev): connect it to your API.
|
|
77
|
+
Kubernetes: [install the OCI Helm chart](./charts/agent-swarm/README.md).
|
|
214
78
|
|
|
215
79
|
## Integrations
|
|
216
80
|
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
| Integration | What it does | Setup |
|
|
220
|
-
|---|---|---|
|
|
221
|
-
| **Slack** | DM or @mention the bot to create tasks; workers reply in threads | [Guide](https://docs.agent-swarm.dev/docs/integrations/slack) |
|
|
222
|
-
| **GitHub App** | @mention or assign the bot on issues/PRs; CI failures create follow-up tasks | [Guide](https://docs.agent-swarm.dev/docs/integrations/github) |
|
|
223
|
-
| **GitLab** | Same model as GitHub — webhooks on issues/MRs, `glab` preinstalled in workers | [Guide](https://docs.agent-swarm.dev/docs/integrations/gitlab) |
|
|
224
|
-
| **AgentMail** | Give each agent an inbox; emails become tasks or lead messages | [Guide](https://docs.agent-swarm.dev/docs/integrations/agentmail) |
|
|
225
|
-
| **Kapso (WhatsApp)** | Native inbound WhatsApp webhook routing; agents reply over WhatsApp with MCP tools or the `kapso-whatsapp` skill | [Guide](https://docs.agent-swarm.dev/docs/integrations/kapso) |
|
|
226
|
-
| **Composio** | Route approved third-party app operations through `agent-swarm x composio ...` or the `swarm_x` MCP tool | [Guide](https://docs.agent-swarm.dev/docs/integrations/composio) |
|
|
227
|
-
| **Linear** | Bidirectional ticket sync via OAuth + webhooks | [Guide](https://docs.agent-swarm.dev/docs/integrations/linear) |
|
|
228
|
-
| **Jira Cloud** | OAuth 3LO ticket sync — assignee/comment events create tasks; lifecycle posts comments back | [Guide](https://docs.agent-swarm.dev/docs/integrations/jira) |
|
|
229
|
-
| **Sentry** | Workers can triage Sentry issues with the `/investigate-sentry-issue` command | [Guide](https://docs.agent-swarm.dev/docs/integrations/sentry) |
|
|
230
|
-
| **Devin** | Devin can be a node in your swarm — keep your existing configuration | [Guide](https://docs.agent-swarm.dev/docs/guides/harness-configuration#supported-providers) |
|
|
231
|
-
|
|
232
|
-
## Dashboard
|
|
233
|
-
|
|
234
|
-
Real-time monitoring of agents, tasks, and inter-agent chat. The task list can be filtered by requester, including **Me** and **Unattributed**, while keeping the selection in the page URL. Session titles can be renamed inline, and agent profiles can search hundreds of Lucide icons, pick a color, and retain deterministic defaults when no customization is set. Use the hosted version at [app.agent-swarm.dev](https://app.agent-swarm.dev), or run locally:
|
|
235
|
-
|
|
236
|
-
```bash
|
|
237
|
-
cd apps/ui && bun install && bun run dev
|
|
238
|
-
```
|
|
239
|
-
|
|
240
|
-
Opens at `http://localhost:5274`.
|
|
241
|
-
|
|
242
|
-
## [CLI](https://docs.agent-swarm.dev/docs/reference/cli)
|
|
81
|
+
Slack · GitHub · GitLab · Linear · Jira · AgentMail · WhatsApp (Kapso) · Composio · Sentry · Devin. [Integration guides](https://docs.agent-swarm.dev/docs/integrations).
|
|
243
82
|
|
|
244
|
-
|
|
245
|
-
bunx @desplega.ai/agent-swarm <command>
|
|
246
|
-
npx @desplega.ai/agent-swarm <command>
|
|
247
|
-
```
|
|
248
|
-
|
|
249
|
-
| Command | Description |
|
|
250
|
-
|---------|-------------|
|
|
251
|
-
| `onboard` | Set up a new swarm from scratch (Docker Compose wizard) |
|
|
252
|
-
| `connect` | Connect this project to an existing swarm |
|
|
253
|
-
| `api` | Start the API + MCP HTTP server |
|
|
254
|
-
| `worker` | Run a worker agent |
|
|
255
|
-
| `lead` | Run a lead agent |
|
|
256
|
-
| `e2b` | Build E2B templates and launch/manage grouped API + lead + worker swarms |
|
|
257
|
-
| `x` | Execute approved external routes such as Composio |
|
|
258
|
-
| `docs` | Open documentation (`--open` to launch in browser) |
|
|
259
|
-
|
|
260
|
-
## Deployment
|
|
261
|
-
|
|
262
|
-
For production deployments (Docker Compose with multiple workers, systemd for the API, graceful shutdown, integration config), see [DEPLOYMENT.md](./DEPLOYMENT.md) and the [deployment guide](https://docs.agent-swarm.dev/docs/guides/deployment).
|
|
263
|
-
|
|
264
|
-
## Documentation
|
|
83
|
+
## Learn more
|
|
265
84
|
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
- [
|
|
269
|
-
- [Architecture overview](https://docs.agent-swarm.dev/docs/architecture/overview) — how the swarm is wired together
|
|
270
|
-
- [Playbooks](https://docs.agent-swarm.dev/docs/playbooks) — eight production flows we use to run Desplega, plus the patterns behind them
|
|
271
|
-
- [CLI reference](https://docs.agent-swarm.dev/docs/reference/cli) and [Environment variables](https://docs.agent-swarm.dev/docs/reference/environment-variables)
|
|
272
|
-
- [API reference](https://docs.agent-swarm.dev/docs/api-reference) — every HTTP endpoint
|
|
85
|
+
- [Getting started](https://docs.agent-swarm.dev/docs/getting-started) · [Architecture](https://docs.agent-swarm.dev/docs/architecture/overview) · [Playbooks](https://docs.agent-swarm.dev/docs/playbooks) · [CLI](https://docs.agent-swarm.dev/docs/reference/cli) · [API reference](https://docs.agent-swarm.dev/docs/api-reference)
|
|
86
|
+
- [Agent templates](https://templates.agent-swarm.dev)
|
|
87
|
+
- Help: [contact@desplega.sh](mailto:contact@desplega.sh) · [Discord](https://discord.gg/KZgfyyDVZa)
|
|
273
88
|
|
|
274
89
|
## Contributing
|
|
275
90
|
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
See [CONTRIBUTING.md](./CONTRIBUTING.md) to get started. The quickest way to contribute:
|
|
279
|
-
|
|
280
|
-
1. Fork the repo
|
|
281
|
-
2. Create a branch (`git checkout -b my-feature`)
|
|
282
|
-
3. Make your changes
|
|
283
|
-
4. Open a PR
|
|
284
|
-
|
|
285
|
-
Join our [Discord](https://discord.gg/KZgfyyDVZa) if you have questions or want to discuss ideas.
|
|
286
|
-
|
|
287
|
-
> Are you an agent? Go to [agent-swarm.dev/skill.md](https://www.agent-swarm.dev/skill.md).
|
|
91
|
+
Read [CONTRIBUTING.md](./CONTRIBUTING.md), fork the repository, create a branch, and open a PR. Discuss ideas on [Discord](https://discord.gg/KZgfyyDVZa).
|
|
92
|
+
> Are you an agent? Run `npx skills add desplega-ai/agent-swarm` or read the [operator skill](./skills/agent-swarm/SKILL.md).
|
|
288
93
|
|
|
289
94
|
## Star History
|
|
290
95
|
|
|
291
|
-
<picture>
|
|
292
|
-
<source media="(prefers-color-scheme: dark)" srcset="./assets/star-history-dark.svg" />
|
|
293
|
-
<source media="(prefers-color-scheme: light)" srcset="./assets/star-history-light.svg" />
|
|
294
|
-
<img alt="Star History Chart" src="./assets/star-history-light.svg" />
|
|
295
|
-
</picture>
|
|
296
|
-
|
|
297
|
-
The charts are generated from timestamped GitHub stargazer data and refreshed weekly through a reviewable pull request.
|
|
96
|
+
<picture><source media="(prefers-color-scheme: dark)" srcset="./assets/star-history-dark.svg" /> <source media="(prefers-color-scheme: light)" srcset="./assets/star-history-light.svg" /> <img alt="Star History Chart" src="./assets/star-history-light.svg" /></picture>
|
|
298
97
|
|
|
299
98
|
## License
|
|
300
99
|
|
|
301
|
-
[MIT](./LICENSE)
|
|
100
|
+
[MIT](./LICENSE) · 2025-2026 [desplega.sh](https://desplega.sh)
|
|
@@ -29,7 +29,7 @@ import {
|
|
|
29
29
|
import {
|
|
30
30
|
init_package,
|
|
31
31
|
package_default
|
|
32
|
-
} from "./cli-
|
|
32
|
+
} from "./cli-ewvk4ceg.js";
|
|
33
33
|
import {
|
|
34
34
|
init_secret_scrubber,
|
|
35
35
|
scrubSecrets
|
|
@@ -4369,9 +4369,23 @@ function toolResult(update) {
|
|
|
4369
4369
|
function translateAcpSessionUpdate(update) {
|
|
4370
4370
|
switch (update.sessionUpdate) {
|
|
4371
4371
|
case "agent_message_chunk":
|
|
4372
|
-
return [
|
|
4372
|
+
return [
|
|
4373
|
+
{
|
|
4374
|
+
type: "message",
|
|
4375
|
+
role: "assistant",
|
|
4376
|
+
content: contentToText(update.content),
|
|
4377
|
+
messageId: update.messageId ?? undefined
|
|
4378
|
+
}
|
|
4379
|
+
];
|
|
4373
4380
|
case "user_message_chunk":
|
|
4374
|
-
return [
|
|
4381
|
+
return [
|
|
4382
|
+
{
|
|
4383
|
+
type: "message",
|
|
4384
|
+
role: "user",
|
|
4385
|
+
content: contentToText(update.content),
|
|
4386
|
+
messageId: update.messageId ?? undefined
|
|
4387
|
+
}
|
|
4388
|
+
];
|
|
4375
4389
|
case "agent_thought_chunk":
|
|
4376
4390
|
return [
|
|
4377
4391
|
{
|
|
@@ -4607,6 +4621,101 @@ function resolveAcpTarget(config) {
|
|
|
4607
4621
|
}
|
|
4608
4622
|
|
|
4609
4623
|
// src/providers/acp-adapter.ts
|
|
4624
|
+
var ACP_LOG_MAX_CHARS = 30000;
|
|
4625
|
+
var ACP_LOG_FIELD_MAX_CHARS = 12000;
|
|
4626
|
+
var ACP_LOG_PREVIEW_MAX_CHARS = 1e4;
|
|
4627
|
+
var CREDENTIAL_HEADER_NAMES = new Set([
|
|
4628
|
+
"authorization",
|
|
4629
|
+
"proxy-authorization",
|
|
4630
|
+
"cookie",
|
|
4631
|
+
"set-cookie",
|
|
4632
|
+
"www-authenticate",
|
|
4633
|
+
"proxy-authenticate",
|
|
4634
|
+
"x-api-key",
|
|
4635
|
+
"api-key",
|
|
4636
|
+
"x-auth-token",
|
|
4637
|
+
"x-access-token",
|
|
4638
|
+
"x-session-token"
|
|
4639
|
+
]);
|
|
4640
|
+
function isCredentialHeaderName(value) {
|
|
4641
|
+
return CREDENTIAL_HEADER_NAMES.has(value.trim().toLowerCase());
|
|
4642
|
+
}
|
|
4643
|
+
function isCredentialHeader(value) {
|
|
4644
|
+
if (!value || typeof value !== "object" || Array.isArray(value))
|
|
4645
|
+
return false;
|
|
4646
|
+
const name = value.name;
|
|
4647
|
+
return typeof name === "string" && isCredentialHeaderName(name);
|
|
4648
|
+
}
|
|
4649
|
+
function serializeAcpLog(value) {
|
|
4650
|
+
const serialized = JSON.stringify(value, (key, child) => {
|
|
4651
|
+
if (isCredentialHeaderName(key))
|
|
4652
|
+
return;
|
|
4653
|
+
if (key.toLowerCase() === "headers" && Array.isArray(child)) {
|
|
4654
|
+
return child.filter((header) => !isCredentialHeader(header));
|
|
4655
|
+
}
|
|
4656
|
+
if (typeof child !== "string")
|
|
4657
|
+
return child;
|
|
4658
|
+
const scrubbed = scrubSecrets(child);
|
|
4659
|
+
return scrubbed.length > ACP_LOG_FIELD_MAX_CHARS ? `${scrubbed.slice(0, ACP_LOG_FIELD_MAX_CHARS)}… [truncated]` : scrubbed;
|
|
4660
|
+
});
|
|
4661
|
+
if (serialized.length <= ACP_LOG_MAX_CHARS)
|
|
4662
|
+
return serialized;
|
|
4663
|
+
const sanitizedValue = JSON.parse(serialized);
|
|
4664
|
+
const record2 = sanitizedValue && typeof sanitizedValue === "object" && !Array.isArray(sanitizedValue) ? sanitizedValue : undefined;
|
|
4665
|
+
const update = record2 && "update" in record2 && record2.update && typeof record2.update === "object" ? record2.update : undefined;
|
|
4666
|
+
const preview = `${serialized.slice(0, ACP_LOG_PREVIEW_MAX_CHARS)}… [truncated]`;
|
|
4667
|
+
if (record2 && "type" in record2) {
|
|
4668
|
+
const type = record2.type;
|
|
4669
|
+
if (type === "tool_start") {
|
|
4670
|
+
return JSON.stringify({
|
|
4671
|
+
type,
|
|
4672
|
+
toolCallId: boundedAcpLogScalar(record2.toolCallId),
|
|
4673
|
+
toolName: boundedAcpLogScalar(record2.toolName),
|
|
4674
|
+
args: { truncated: true, preview }
|
|
4675
|
+
});
|
|
4676
|
+
}
|
|
4677
|
+
if (type === "tool_end") {
|
|
4678
|
+
const result = record2.result && typeof record2.result === "object" && !Array.isArray(record2.result) ? record2.result : undefined;
|
|
4679
|
+
return JSON.stringify({
|
|
4680
|
+
type,
|
|
4681
|
+
toolCallId: boundedAcpLogScalar(record2.toolCallId),
|
|
4682
|
+
toolName: boundedAcpLogScalar(record2.toolName),
|
|
4683
|
+
result: {
|
|
4684
|
+
status: boundedAcpLogScalar(result?.status),
|
|
4685
|
+
truncated: true,
|
|
4686
|
+
preview
|
|
4687
|
+
}
|
|
4688
|
+
});
|
|
4689
|
+
}
|
|
4690
|
+
if (type === "custom") {
|
|
4691
|
+
return JSON.stringify({
|
|
4692
|
+
type,
|
|
4693
|
+
name: boundedAcpLogScalar(record2.name),
|
|
4694
|
+
data: { truncated: true, preview }
|
|
4695
|
+
});
|
|
4696
|
+
}
|
|
4697
|
+
}
|
|
4698
|
+
const summary = {
|
|
4699
|
+
type: "acp_log_truncated",
|
|
4700
|
+
originalType: record2 && "type" in record2 && typeof record2.type === "string" ? record2.type : undefined,
|
|
4701
|
+
sessionId: record2 && "sessionId" in record2 && typeof record2.sessionId === "string" ? record2.sessionId.slice(0, 500) : undefined,
|
|
4702
|
+
sessionUpdate: update && "sessionUpdate" in update && typeof update.sessionUpdate === "string" ? update.sessionUpdate : undefined,
|
|
4703
|
+
preview
|
|
4704
|
+
};
|
|
4705
|
+
const bounded = JSON.stringify(summary);
|
|
4706
|
+
if (bounded.length <= ACP_LOG_MAX_CHARS)
|
|
4707
|
+
return bounded;
|
|
4708
|
+
return JSON.stringify({
|
|
4709
|
+
type: "acp_log_truncated",
|
|
4710
|
+
originalType: summary.originalType?.slice(0, 500),
|
|
4711
|
+
sessionId: summary.sessionId,
|
|
4712
|
+
sessionUpdate: summary.sessionUpdate?.slice(0, 500)
|
|
4713
|
+
});
|
|
4714
|
+
}
|
|
4715
|
+
function boundedAcpLogScalar(value) {
|
|
4716
|
+
return typeof value === "string" ? value.slice(0, 500) : value;
|
|
4717
|
+
}
|
|
4718
|
+
|
|
4610
4719
|
class SwarmAcpClient {
|
|
4611
4720
|
emit;
|
|
4612
4721
|
constructor(emit) {
|
|
@@ -4619,6 +4728,7 @@ class SwarmAcpClient {
|
|
|
4619
4728
|
return { outcome: { outcome: "selected", optionId: selected.optionId } };
|
|
4620
4729
|
}
|
|
4621
4730
|
async sessionUpdate(params) {
|
|
4731
|
+
this.emit({ type: "raw_log", content: serializeAcpLog(params) });
|
|
4622
4732
|
for (const event of translateAcpSessionNotification(params)) {
|
|
4623
4733
|
this.emit(event);
|
|
4624
4734
|
}
|
|
@@ -4687,6 +4797,15 @@ class ACPSession {
|
|
|
4687
4797
|
if (event.type === "message" && event.role === "assistant") {
|
|
4688
4798
|
this.output += event.content;
|
|
4689
4799
|
}
|
|
4800
|
+
this.emitDirect(event);
|
|
4801
|
+
if (event.type !== "raw_log" && event.type !== "raw_stderr") {
|
|
4802
|
+
this.emitDirect({
|
|
4803
|
+
type: "raw_log",
|
|
4804
|
+
content: serializeAcpLog(event)
|
|
4805
|
+
});
|
|
4806
|
+
}
|
|
4807
|
+
}
|
|
4808
|
+
emitDirect(event) {
|
|
4690
4809
|
if (this.listeners.size === 0) {
|
|
4691
4810
|
this.pendingEvents.push(event);
|
|
4692
4811
|
return;
|
|
@@ -4784,7 +4903,13 @@ class ACPAdapter {
|
|
|
4784
4903
|
stderr: "pipe"
|
|
4785
4904
|
}));
|
|
4786
4905
|
let session = null;
|
|
4787
|
-
const
|
|
4906
|
+
const preSessionEvents = [];
|
|
4907
|
+
const client2 = new SwarmAcpClient((event) => {
|
|
4908
|
+
if (session)
|
|
4909
|
+
session.emitFromAcp(event);
|
|
4910
|
+
else
|
|
4911
|
+
preSessionEvents.push(event);
|
|
4912
|
+
});
|
|
4788
4913
|
const stream = ndJsonStream2(fileSinkWritableStream(proc.stdin), proc.stdout);
|
|
4789
4914
|
const connection = new ClientSideConnection(() => client2, stream);
|
|
4790
4915
|
try {
|
|
@@ -4815,6 +4940,8 @@ class ACPAdapter {
|
|
|
4815
4940
|
target: target.target,
|
|
4816
4941
|
configOptions: sanitizeAcpConfigOptions(configOptions)
|
|
4817
4942
|
});
|
|
4943
|
+
for (const event of preSessionEvents)
|
|
4944
|
+
session.emitFromAcp(event);
|
|
4818
4945
|
return session;
|
|
4819
4946
|
} catch (err) {
|
|
4820
4947
|
await terminateProcessGroup(proc.pid);
|
|
@@ -4861,10 +4988,10 @@ async function applyConfiguredOptions(connection, sessionId, advertised, configu
|
|
|
4861
4988
|
function sanitizeAcpConfigOptions(options) {
|
|
4862
4989
|
return options.map((option) => {
|
|
4863
4990
|
const common = {
|
|
4864
|
-
id: option.id,
|
|
4865
|
-
name: option.name,
|
|
4866
|
-
description: option.description,
|
|
4867
|
-
category: option.category
|
|
4991
|
+
id: scrubSecrets(option.id),
|
|
4992
|
+
name: scrubSecrets(option.name),
|
|
4993
|
+
description: option.description == null ? option.description : scrubSecrets(option.description),
|
|
4994
|
+
category: option.category == null ? option.category : scrubSecrets(option.category)
|
|
4868
4995
|
};
|
|
4869
4996
|
if (option.type === "boolean") {
|
|
4870
4997
|
return { ...common, type: "boolean", currentValue: option.currentValue };
|
|
@@ -4872,16 +4999,20 @@ function sanitizeAcpConfigOptions(options) {
|
|
|
4872
4999
|
return {
|
|
4873
5000
|
...common,
|
|
4874
5001
|
type: "select",
|
|
4875
|
-
currentValue: option.currentValue,
|
|
5002
|
+
currentValue: scrubSecrets(option.currentValue),
|
|
4876
5003
|
options: option.options.map((entry) => ("group" in entry) ? {
|
|
4877
|
-
group: entry.group,
|
|
4878
|
-
name: entry.name,
|
|
5004
|
+
group: scrubSecrets(entry.group),
|
|
5005
|
+
name: entry.name == null ? entry.name : scrubSecrets(entry.name),
|
|
4879
5006
|
options: entry.options.map(({ value, name, description }) => ({
|
|
4880
|
-
value,
|
|
4881
|
-
name,
|
|
4882
|
-
description
|
|
5007
|
+
value: scrubSecrets(value),
|
|
5008
|
+
name: scrubSecrets(name),
|
|
5009
|
+
description: description == null ? description : scrubSecrets(description)
|
|
4883
5010
|
}))
|
|
4884
|
-
} : {
|
|
5011
|
+
} : {
|
|
5012
|
+
value: scrubSecrets(entry.value),
|
|
5013
|
+
name: scrubSecrets(entry.name),
|
|
5014
|
+
description: entry.description == null ? entry.description : scrubSecrets(entry.description)
|
|
5015
|
+
})
|
|
4885
5016
|
};
|
|
4886
5017
|
});
|
|
4887
5018
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
resolveSlackUserId
|
|
3
|
-
} from "./cli-
|
|
4
|
-
import"./cli-
|
|
3
|
+
} from "./cli-jdtvfcyw.js";
|
|
4
|
+
import"./cli-9bnajfes.js";
|
|
5
5
|
import {
|
|
6
6
|
createTaskWithSiblingAwareness
|
|
7
|
-
} from "./cli-
|
|
7
|
+
} from "./cli-jmkqrhpm.js";
|
|
8
8
|
import {
|
|
9
9
|
buildCancelledBlocks,
|
|
10
10
|
ensureSlackThreadTree,
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
getAgentEmoji,
|
|
13
13
|
getTaskLink,
|
|
14
14
|
isSlackRenderV2Enabled
|
|
15
|
-
} from "./cli-
|
|
15
|
+
} from "./cli-7pnwg2vx.js";
|
|
16
16
|
import"./cli-qf9kpsve.js";
|
|
17
17
|
import"./cli-g2p9bd1z.js";
|
|
18
18
|
import {
|
|
@@ -23,15 +23,15 @@ import {
|
|
|
23
23
|
init_context_key,
|
|
24
24
|
init_db,
|
|
25
25
|
slackContextKey
|
|
26
|
-
} from "./cli-
|
|
27
|
-
import"./cli-
|
|
26
|
+
} from "./cli-wtyyc7ev.js";
|
|
27
|
+
import"./cli-r3bxcgrj.js";
|
|
28
28
|
import"./cli-87zrjxdb.js";
|
|
29
29
|
import"./cli-a1rrkrb4.js";
|
|
30
30
|
import"./cli-xbyjkasx.js";
|
|
31
31
|
import"./cli-nanaxrz6.js";
|
|
32
32
|
import"./cli-s35981d0.js";
|
|
33
33
|
import"./cli-pqv5gvyf.js";
|
|
34
|
-
import"./cli-
|
|
34
|
+
import"./cli-ewvk4ceg.js";
|
|
35
35
|
import"./cli-mkq1rk7b.js";
|
|
36
36
|
import"./cli-qntkxysp.js";
|
|
37
37
|
import"./cli-497b685t.js";
|
|
@@ -3,18 +3,18 @@ import {
|
|
|
3
3
|
initSlackApp,
|
|
4
4
|
startSlackApp,
|
|
5
5
|
stopSlackApp
|
|
6
|
-
} from "./cli-
|
|
6
|
+
} from "./cli-7pnwg2vx.js";
|
|
7
7
|
import"./cli-qf9kpsve.js";
|
|
8
8
|
import"./cli-g2p9bd1z.js";
|
|
9
|
-
import"./cli-
|
|
10
|
-
import"./cli-
|
|
9
|
+
import"./cli-wtyyc7ev.js";
|
|
10
|
+
import"./cli-r3bxcgrj.js";
|
|
11
11
|
import"./cli-87zrjxdb.js";
|
|
12
12
|
import"./cli-a1rrkrb4.js";
|
|
13
13
|
import"./cli-xbyjkasx.js";
|
|
14
14
|
import"./cli-nanaxrz6.js";
|
|
15
15
|
import"./cli-s35981d0.js";
|
|
16
16
|
import"./cli-pqv5gvyf.js";
|
|
17
|
-
import"./cli-
|
|
17
|
+
import"./cli-ewvk4ceg.js";
|
|
18
18
|
import"./cli-mkq1rk7b.js";
|
|
19
19
|
import"./cli-qntkxysp.js";
|
|
20
20
|
import"./cli-497b685t.js";
|