@desplega.ai/agent-swarm 1.86.0 → 1.88.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 +2 -1
- package/openapi.json +84 -1
- package/package.json +7 -5
- package/src/be/db-queries/tracker.ts +21 -0
- package/src/be/db.ts +284 -21
- package/src/be/migrations/079_task_followup_config.sql +1 -0
- package/src/be/migrations/080_skill_system_defaults.sql +8 -0
- package/src/be/modelsdev-cache.json +77652 -73973
- package/src/be/seed/registry.ts +3 -2
- package/src/be/seed-skills/index.ts +172 -0
- package/src/cli.tsx +55 -0
- package/src/commands/context-preamble.ts +272 -0
- package/src/commands/e2b-stack-wizard.tsx +394 -0
- package/src/commands/e2b.ts +2027 -0
- package/src/commands/onboard/dashboard-url.ts +29 -0
- package/src/commands/onboard/steps/post-dashboard.tsx +3 -1
- package/src/commands/onboard.tsx +3 -1
- package/src/commands/resume-session.ts +35 -78
- package/src/commands/runner.ts +126 -13
- package/src/e2b/dispatch.ts +645 -0
- package/src/e2b/env.ts +206 -0
- package/src/heartbeat/heartbeat.ts +145 -30
- package/src/heartbeat/templates.ts +11 -7
- package/src/http/memory.ts +13 -1
- package/src/http/session-data.ts +8 -1
- package/src/http/skills.ts +53 -0
- package/src/http/tasks.ts +152 -3
- package/src/http/webhooks.ts +75 -0
- package/src/integrations/kapso/client.ts +82 -0
- package/src/jira/sync.ts +4 -4
- package/src/linear/sync.ts +6 -5
- package/src/memory/automatic-task-gate.ts +47 -0
- package/src/prompts/base-prompt.ts +16 -1
- package/src/prompts/session-templates.ts +51 -0
- package/src/providers/claude-adapter.ts +29 -76
- package/src/providers/claude-managed-adapter.ts +61 -75
- package/src/providers/codex-adapter.ts +37 -18
- package/src/providers/codex-oauth/auth-json.ts +18 -1
- package/src/providers/codex-oauth/flow.ts +24 -1
- package/src/providers/ctx-mode-env.ts +10 -0
- package/src/providers/opencode-adapter.ts +50 -1
- package/src/providers/types.ts +6 -0
- package/src/slack/blocks.ts +12 -4
- package/src/slack/watcher.ts +3 -3
- package/src/tasks/worker-follow-up.ts +162 -2
- package/src/telemetry.ts +25 -2
- package/src/templates.d.ts +4 -0
- package/src/tests/base-prompt.test.ts +41 -0
- package/src/tests/claude-adapter.test.ts +87 -24
- package/src/tests/claude-managed-adapter.test.ts +38 -52
- package/src/tests/codex-adapter.test.ts +95 -31
- package/src/tests/codex-oauth.test.ts +149 -3
- package/src/tests/codex-pool.test.ts +14 -3
- package/src/tests/e2b-dispatch.test.ts +922 -0
- package/src/tests/heartbeat-supersede-resume.test.ts +285 -0
- package/src/tests/heartbeat.test.ts +26 -16
- package/src/tests/http-api-integration.test.ts +113 -0
- package/src/tests/kapso-client.test.ts +74 -1
- package/src/tests/kapso-inbound.test.ts +60 -2
- package/src/tests/opencode-adapter.test.ts +95 -0
- package/src/tests/prompt-template-remaining.test.ts +4 -0
- package/src/tests/prompt-template-session.test.ts +4 -2
- package/src/tests/resume-session.test.ts +42 -50
- package/src/tests/self-improvement.test.ts +89 -0
- package/src/tests/skill-update-scope.test.ts +88 -1
- package/src/tests/slack-blocks.test.ts +15 -0
- package/src/tests/structured-output.test.ts +69 -0
- package/src/tests/system-default-skills.test.ts +119 -0
- package/src/tests/task-completion-idempotency.test.ts +185 -2
- package/src/tests/task-supersede-resume.test.ts +722 -0
- package/src/tests/telemetry-init.test.ts +155 -0
- package/src/tests/vcs-tracking.test.ts +39 -0
- package/src/tools/send-task.ts +12 -1
- package/src/tools/skills/skill-delete.ts +14 -0
- package/src/tools/skills/skill-update.ts +14 -0
- package/src/tools/store-progress.ts +21 -7
- package/src/tools/templates.ts +14 -2
- package/src/types.ts +47 -1
- package/src/workflows/executors/agent-task.ts +3 -0
- package/templates/skills/artifacts/config.json +1 -0
- package/templates/skills/kv-storage/config.json +1 -0
- package/templates/skills/pages/config.json +1 -0
- package/templates/skills/scheduled-task-resilience/config.json +1 -0
- package/templates/skills/swarm-scripts/SKILL.md +91 -0
- package/templates/skills/swarm-scripts/config.json +14 -0
- package/templates/skills/swarm-scripts/content.md +86 -0
- package/templates/skills/workflow-iterate/config.json +1 -0
- package/templates/skills/workflow-structured-output/config.json +1 -0
- package/tsconfig.json +2 -1
package/README.md
CHANGED
|
@@ -124,7 +124,7 @@ Check [our templates](https://templates.agent-swarm.dev) for a quick start.
|
|
|
124
124
|
- **Workflow engine with Human-in-the-Loop** — DAG-based automation with approval gates, retries, and structured I/O. [Workflows →](https://docs.agent-swarm.dev/docs/concepts/workflows)
|
|
125
125
|
- **Scheduled & recurring tasks** — cron-based automation for standing work. [Scheduling →](https://docs.agent-swarm.dev/docs/concepts/scheduling)
|
|
126
126
|
- **Harness & LLM agnostic** — run with Claude Code, OpenAI Codex, pi-mono, Devin, Claude Managed Agents, raw LLMs, or opencode. [Harness config →](https://docs.agent-swarm.dev/docs/guides/harness-configuration) · [Add a new provider →](https://docs.agent-swarm.dev/docs/guides/harness-providers)
|
|
127
|
-
- **Follow-up continuity across all harnesses** — child tasks inherit bounded prior-task context
|
|
127
|
+
- **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)
|
|
128
128
|
- **Skills & MCP servers** — reusable procedural knowledge and per-agent MCP servers with scope cascade. [MCP tools →](https://docs.agent-swarm.dev/docs/reference/mcp-tools)
|
|
129
129
|
- **DB-backed pages** — agents publish HTML or JSON pages (reports, dashboards, action specs) via the `create_page` MCP tool 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)
|
|
130
130
|
- **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)
|
|
@@ -222,6 +222,7 @@ bunx @desplega.ai/agent-swarm <command>
|
|
|
222
222
|
| `api` | Start the API + MCP HTTP server |
|
|
223
223
|
| `worker` | Run a worker agent |
|
|
224
224
|
| `lead` | Run a lead agent |
|
|
225
|
+
| `e2b` | Build E2B templates and launch/manage grouped API + lead + worker swarms |
|
|
225
226
|
| `docs` | Open documentation (`--open` to launch in browser) |
|
|
226
227
|
|
|
227
228
|
## Deployment
|
package/openapi.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"openapi": "3.1.0",
|
|
3
3
|
"info": {
|
|
4
4
|
"title": "Agent Swarm API",
|
|
5
|
-
"version": "1.
|
|
5
|
+
"version": "1.88.0",
|
|
6
6
|
"description": "Multi-agent orchestration API for Claude Code, Codex, and Gemini CLI. Enables task distribution, agent communication, and service discovery.\n\nMCP tools are documented separately in [MCP.md](./MCP.md)."
|
|
7
7
|
},
|
|
8
8
|
"servers": [
|
|
@@ -4014,6 +4014,9 @@
|
|
|
4014
4014
|
"items": {
|
|
4015
4015
|
"type": "string"
|
|
4016
4016
|
}
|
|
4017
|
+
},
|
|
4018
|
+
"persistMemory": {
|
|
4019
|
+
"type": "boolean"
|
|
4017
4020
|
}
|
|
4018
4021
|
},
|
|
4019
4022
|
"required": [
|
|
@@ -7139,6 +7142,16 @@
|
|
|
7139
7142
|
"required": true,
|
|
7140
7143
|
"name": "taskId",
|
|
7141
7144
|
"in": "path"
|
|
7145
|
+
},
|
|
7146
|
+
{
|
|
7147
|
+
"schema": {
|
|
7148
|
+
"type": "integer",
|
|
7149
|
+
"minimum": 1,
|
|
7150
|
+
"maximum": 1000
|
|
7151
|
+
},
|
|
7152
|
+
"required": false,
|
|
7153
|
+
"name": "limit",
|
|
7154
|
+
"in": "query"
|
|
7142
7155
|
}
|
|
7143
7156
|
],
|
|
7144
7157
|
"responses": {
|
|
@@ -7610,6 +7623,9 @@
|
|
|
7610
7623
|
},
|
|
7611
7624
|
"ownerAgentId": {
|
|
7612
7625
|
"type": "string"
|
|
7626
|
+
},
|
|
7627
|
+
"systemDefault": {
|
|
7628
|
+
"type": "boolean"
|
|
7613
7629
|
}
|
|
7614
7630
|
},
|
|
7615
7631
|
"required": [
|
|
@@ -7693,6 +7709,9 @@
|
|
|
7693
7709
|
"200": {
|
|
7694
7710
|
"description": "Skill updated"
|
|
7695
7711
|
},
|
|
7712
|
+
"403": {
|
|
7713
|
+
"description": "System-managed skills cannot be edited"
|
|
7714
|
+
},
|
|
7696
7715
|
"404": {
|
|
7697
7716
|
"description": "Skill not found"
|
|
7698
7717
|
}
|
|
@@ -7722,6 +7741,9 @@
|
|
|
7722
7741
|
"200": {
|
|
7723
7742
|
"description": "Skill deleted"
|
|
7724
7743
|
},
|
|
7744
|
+
"403": {
|
|
7745
|
+
"description": "System-managed skills cannot be deleted"
|
|
7746
|
+
},
|
|
7725
7747
|
"404": {
|
|
7726
7748
|
"description": "Skill not found"
|
|
7727
7749
|
}
|
|
@@ -10114,6 +10136,67 @@
|
|
|
10114
10136
|
}
|
|
10115
10137
|
}
|
|
10116
10138
|
},
|
|
10139
|
+
"/api/tasks/{id}/supersede": {
|
|
10140
|
+
"post": {
|
|
10141
|
+
"summary": "Supersede an in-progress task (terminate + spawn resume follow-up)",
|
|
10142
|
+
"description": "Marks the original task `superseded` (terminal) and creates a fresh `taskType=\"resume\"` follow-up so a worker can pick up the work in a new provider session. Workflow-step tasks (those with `workflowRunStepId`) are carved out: the original is marked `failed` with reason `superseded_workflow_task` and no follow-up is created — the workflow engine's retry/failure policy applies.",
|
|
10143
|
+
"tags": [
|
|
10144
|
+
"Tasks"
|
|
10145
|
+
],
|
|
10146
|
+
"security": [
|
|
10147
|
+
{
|
|
10148
|
+
"bearerAuth": []
|
|
10149
|
+
}
|
|
10150
|
+
],
|
|
10151
|
+
"parameters": [
|
|
10152
|
+
{
|
|
10153
|
+
"schema": {
|
|
10154
|
+
"type": "string"
|
|
10155
|
+
},
|
|
10156
|
+
"required": true,
|
|
10157
|
+
"name": "id",
|
|
10158
|
+
"in": "path"
|
|
10159
|
+
}
|
|
10160
|
+
],
|
|
10161
|
+
"requestBody": {
|
|
10162
|
+
"content": {
|
|
10163
|
+
"application/json": {
|
|
10164
|
+
"schema": {
|
|
10165
|
+
"type": "object",
|
|
10166
|
+
"properties": {
|
|
10167
|
+
"reason": {
|
|
10168
|
+
"type": "string",
|
|
10169
|
+
"enum": [
|
|
10170
|
+
"graceful_shutdown",
|
|
10171
|
+
"context_limits",
|
|
10172
|
+
"manual_supersede",
|
|
10173
|
+
"crash_recovery"
|
|
10174
|
+
]
|
|
10175
|
+
}
|
|
10176
|
+
},
|
|
10177
|
+
"required": [
|
|
10178
|
+
"reason"
|
|
10179
|
+
]
|
|
10180
|
+
}
|
|
10181
|
+
}
|
|
10182
|
+
}
|
|
10183
|
+
},
|
|
10184
|
+
"responses": {
|
|
10185
|
+
"200": {
|
|
10186
|
+
"description": "Task superseded (or workflow-failed)"
|
|
10187
|
+
},
|
|
10188
|
+
"400": {
|
|
10189
|
+
"description": "Task not in_progress"
|
|
10190
|
+
},
|
|
10191
|
+
"403": {
|
|
10192
|
+
"description": "Task belongs to another agent"
|
|
10193
|
+
},
|
|
10194
|
+
"404": {
|
|
10195
|
+
"description": "Task not found"
|
|
10196
|
+
}
|
|
10197
|
+
}
|
|
10198
|
+
}
|
|
10199
|
+
},
|
|
10117
10200
|
"/api/tasks/{id}/vcs": {
|
|
10118
10201
|
"patch": {
|
|
10119
10202
|
"summary": "Update VCS (PR/MR) info for a task",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@desplega.ai/agent-swarm",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.88.0",
|
|
4
4
|
"description": "Multi-agent orchestration for Claude Code, Codex, Gemini CLI, and other AI coding assistants",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "desplega.sh <contact@desplega.sh>",
|
|
@@ -45,6 +45,7 @@
|
|
|
45
45
|
"tsc:check": "bun tsc --noEmit",
|
|
46
46
|
"check:db-boundary": "bash scripts/check-db-boundary.sh",
|
|
47
47
|
"check:api-key-boundary": "bash scripts/check-api-key-boundary.sh",
|
|
48
|
+
"prepare-release": "bun scripts/prepare-release.ts",
|
|
48
49
|
"sync-chart-version": "bun scripts/sync-chart-version.ts",
|
|
49
50
|
"check-chart-version": "bun scripts/sync-chart-version.ts --check-if-package-version-changed",
|
|
50
51
|
"cli": "bun src/cli.tsx",
|
|
@@ -110,12 +111,12 @@
|
|
|
110
111
|
"@desplega.ai/localtunnel": "^2.2.0",
|
|
111
112
|
"@inkjs/ui": "^2.0.0",
|
|
112
113
|
"@linear/sdk": "^77.0.0",
|
|
113
|
-
"@earendil-works/pi-agent-core": "^0.
|
|
114
|
-
"@earendil-works/pi-ai": "^0.
|
|
115
|
-
"@earendil-works/pi-coding-agent": "^0.
|
|
114
|
+
"@earendil-works/pi-agent-core": "^0.78.0",
|
|
115
|
+
"@earendil-works/pi-ai": "^0.78.0",
|
|
116
|
+
"@earendil-works/pi-coding-agent": "^0.78.0",
|
|
116
117
|
"@modelcontextprotocol/sdk": "^1.25.1",
|
|
117
118
|
"@openai/codex-sdk": "^0.135.0",
|
|
118
|
-
"@opencode-ai/sdk": "^1.15.
|
|
119
|
+
"@opencode-ai/sdk": "^1.15.13",
|
|
119
120
|
"@openfort/openfort-node": "^0.9.1",
|
|
120
121
|
"@opentelemetry/api": "^1.9.1",
|
|
121
122
|
"@opentelemetry/exporter-trace-otlp-http": "^0.218.0",
|
|
@@ -130,6 +131,7 @@
|
|
|
130
131
|
"ai": "^6.0.116",
|
|
131
132
|
"cron-parser": "^5.4.0",
|
|
132
133
|
"date-fns": "^4.1.0",
|
|
134
|
+
"e2b": "2.26.0",
|
|
133
135
|
"hono": "^4.12.3",
|
|
134
136
|
"ink": "^6.5.1",
|
|
135
137
|
"oauth4webapi": "^3.8.5",
|
|
@@ -110,6 +110,27 @@ export function updateTrackerSyncSwarmId(id: string, swarmId: string): void {
|
|
|
110
110
|
getDb().query("UPDATE tracker_sync SET swarmId = ? WHERE id = ?").run(swarmId, id);
|
|
111
111
|
}
|
|
112
112
|
|
|
113
|
+
/**
|
|
114
|
+
* Repoint ALL `tracker_sync` rows currently keyed to `oldSwarmId` to
|
|
115
|
+
* `newSwarmId`. Returns the number of rows updated.
|
|
116
|
+
*
|
|
117
|
+
* Used when a task is superseded (PR #594): the supersede parent becomes
|
|
118
|
+
* terminal but the Linear/Jira issue is still active, and outbound
|
|
119
|
+
* completion posts + inbound webhooks lookup by swarmId. Without
|
|
120
|
+
* repointing, the resume child's completion never makes it back to the
|
|
121
|
+
* tracker and subsequent inbound events load the terminal parent and
|
|
122
|
+
* create duplicates.
|
|
123
|
+
*
|
|
124
|
+
* Safe to call when no rows match (no-op, returns 0). Repoints across
|
|
125
|
+
* all providers (Linear AND Jira) and all entity types in one call.
|
|
126
|
+
*/
|
|
127
|
+
export function repointTrackerSyncBySwarmId(oldSwarmId: string, newSwarmId: string): number {
|
|
128
|
+
const result = getDb()
|
|
129
|
+
.query("UPDATE tracker_sync SET swarmId = ? WHERE swarmId = ?")
|
|
130
|
+
.run(newSwarmId, oldSwarmId);
|
|
131
|
+
return Number(result.changes ?? 0);
|
|
132
|
+
}
|
|
133
|
+
|
|
113
134
|
export function createTrackerSync(data: {
|
|
114
135
|
provider: string;
|
|
115
136
|
entityType: "task";
|