@desplega.ai/agent-swarm 1.81.0 → 1.82.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/openapi.json +132 -1
- package/package.json +3 -2
- package/src/be/db.ts +610 -96
- package/src/be/migrations/069_agent_tasks_perf_indexes.sql +17 -0
- package/src/be/migrations/070_seed_state.sql +22 -0
- package/src/be/migrations/071_codex_oauth_pool.sql +8 -0
- package/src/be/migrations/072_task_attachments.sql +38 -0
- package/src/be/scripts/typecheck.ts +450 -7
- package/src/be/seed/index.ts +9 -0
- package/src/be/seed/registry.ts +18 -0
- package/src/be/seed/runner.ts +98 -0
- package/src/be/seed/state-db.ts +36 -0
- package/src/be/seed/types.ts +59 -0
- package/src/be/seed-scripts/catalog/date-resolve.ts +104 -0
- package/src/be/seed-scripts/catalog/fetch-readable.ts +77 -0
- package/src/be/seed-scripts/catalog/gh-pr-snapshot.ts +104 -0
- package/src/be/seed-scripts/catalog/group-count.ts +70 -0
- package/src/be/seed-scripts/catalog/json-query.ts +124 -0
- package/src/be/seed-scripts/catalog/linear-issue.ts +103 -0
- package/src/be/seed-scripts/catalog/memory-dedup-check.ts +61 -0
- package/src/be/seed-scripts/catalog/slack-thread-flatten.ts +86 -0
- package/src/be/seed-scripts/catalog/task-failure-audit.ts +87 -0
- package/src/be/seed-scripts/catalog/text-diff.ts +103 -0
- package/src/be/seed-scripts/index.ts +183 -0
- package/src/cli.tsx +2 -0
- package/src/commands/codex-login.ts +36 -6
- package/src/commands/runner.ts +133 -44
- package/src/github/handlers.ts +7 -7
- package/src/http/agents.ts +7 -1
- package/src/http/index.ts +123 -74
- package/src/http/pages.ts +25 -5
- package/src/http/route-def.ts +63 -0
- package/src/http/schedules.ts +11 -2
- package/src/http/scripts.ts +10 -1
- package/src/http/sessions.ts +31 -3
- package/src/http/skills.ts +8 -1
- package/src/http/stats.ts +19 -0
- package/src/http/tasks.ts +13 -2
- package/src/http/utils.ts +44 -0
- package/src/http/workflows.ts +11 -1
- package/src/http.ts +2 -0
- package/src/otel-impl.ts +34 -4
- package/src/otel.ts +1 -3
- package/src/providers/claude-adapter.ts +61 -0
- package/src/providers/codex-adapter.ts +22 -1
- package/src/providers/codex-oauth/auth-json-fs.ts +52 -0
- package/src/providers/codex-oauth/auth-json.ts +3 -3
- package/src/providers/codex-oauth/storage.ts +81 -21
- package/src/providers/otel-env.ts +63 -0
- package/src/providers/types.ts +5 -0
- package/src/scripts-runtime/eval-harness.ts +70 -3
- package/src/scripts-runtime/executors/native.ts +19 -1
- package/src/scripts-runtime/executors/types.ts +17 -0
- package/src/scripts-runtime/loader.ts +2 -0
- package/src/server.ts +2 -0
- package/src/tests/claude-adapter-otel.test.ts +225 -0
- package/src/tests/codex-adapter-otel.test.ts +120 -0
- package/src/tests/codex-login.test.ts +142 -0
- package/src/tests/codex-oauth-adapter.test.ts +108 -0
- package/src/tests/codex-oauth-auth-json-fs.test.ts +112 -0
- package/src/tests/codex-oauth-storage.test.ts +262 -86
- package/src/tests/codex-pool.test.ts +284 -0
- package/src/tests/github-handlers.test.ts +29 -0
- package/src/tests/http-semconv-attributes.test.ts +92 -0
- package/src/tests/list-endpoint-slimming.test.ts +179 -0
- package/src/tests/mcp-tools-user.test.ts +48 -1
- package/src/tests/otel-env.test.ts +103 -0
- package/src/tests/otel-service-name.test.ts +55 -0
- package/src/tests/pagination-metrics.test.ts +165 -0
- package/src/tests/prompt-template-resolver.test.ts +1 -1
- package/src/tests/route-def-find-route.test.ts +106 -0
- package/src/tests/scripts-http.test.ts +110 -0
- package/src/tests/scripts-runtime.test.ts +1 -0
- package/src/tests/scripts-typecheck.test.ts +175 -0
- package/src/tests/seed-scripts.test.ts +220 -0
- package/src/tests/seed.test.ts +163 -0
- package/src/tests/send-task-requested-by.test.ts +154 -0
- package/src/tests/sessions.test.ts +53 -0
- package/src/tests/store-progress-attachments.test.ts +312 -0
- package/src/tests/workflow-http-v2.test.ts +16 -2
- package/src/tools/get-metrics.ts +46 -0
- package/src/tools/get-swarm.ts +10 -3
- package/src/tools/get-task-details.ts +15 -2
- package/src/tools/get-tasks.ts +22 -5
- package/src/tools/resolve-user.ts +25 -10
- package/src/tools/schedules/list-schedules.ts +15 -4
- package/src/tools/send-task.ts +16 -0
- package/src/tools/store-progress.ts +66 -4
- package/src/tools/tool-config.ts +2 -1
- package/src/tools/utils.ts +3 -1
- package/src/tools/workflows/list-workflows.ts +12 -3
- package/src/types.ts +128 -0
- package/src/utils/internal-ai/register-bedrock.ts +34 -0
- package/src/utils/secret-scrubber.ts +3 -0
- /package/src/be/{seed.ts → seed-prompt-templates.ts} +0 -0
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.82.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": [
|
|
@@ -360,6 +360,7 @@
|
|
|
360
360
|
},
|
|
361
361
|
"get": {
|
|
362
362
|
"summary": "List all agents",
|
|
363
|
+
"description": "Returns agents WITHOUT the six identity-markdown blobs (`claudeMd`/`soulMd`/`identityMd`/`toolsMd`/`heartbeatMd`/`setupScript`) by default — they bloat the list by ~16 KB/agent and the overview never renders them. Pass `fields=full` to restore them, or fetch a single agent via `GET /api/agents/{id}`.",
|
|
363
364
|
"tags": [
|
|
364
365
|
"Agents"
|
|
365
366
|
],
|
|
@@ -379,6 +380,18 @@
|
|
|
379
380
|
"required": false,
|
|
380
381
|
"name": "include",
|
|
381
382
|
"in": "query"
|
|
383
|
+
},
|
|
384
|
+
{
|
|
385
|
+
"schema": {
|
|
386
|
+
"type": "string",
|
|
387
|
+
"enum": [
|
|
388
|
+
"full",
|
|
389
|
+
"slim"
|
|
390
|
+
]
|
|
391
|
+
},
|
|
392
|
+
"required": false,
|
|
393
|
+
"name": "fields",
|
|
394
|
+
"in": "query"
|
|
382
395
|
}
|
|
383
396
|
],
|
|
384
397
|
"responses": {
|
|
@@ -4524,6 +4537,7 @@
|
|
|
4524
4537
|
},
|
|
4525
4538
|
"get": {
|
|
4526
4539
|
"summary": "List pages",
|
|
4540
|
+
"description": "Returns pages WITHOUT the heavy `body` (the full HTML/JSON document) and `passwordHash` by default — list views never render the body. Pass `fields=full` to restore `body`. Fetch a full page via `GET /api/pages/{id}`.",
|
|
4527
4541
|
"tags": [
|
|
4528
4542
|
"Pages"
|
|
4529
4543
|
],
|
|
@@ -4563,6 +4577,18 @@
|
|
|
4563
4577
|
"required": false,
|
|
4564
4578
|
"name": "offset",
|
|
4565
4579
|
"in": "query"
|
|
4580
|
+
},
|
|
4581
|
+
{
|
|
4582
|
+
"schema": {
|
|
4583
|
+
"type": "string",
|
|
4584
|
+
"enum": [
|
|
4585
|
+
"full",
|
|
4586
|
+
"slim"
|
|
4587
|
+
]
|
|
4588
|
+
},
|
|
4589
|
+
"required": false,
|
|
4590
|
+
"name": "fields",
|
|
4591
|
+
"in": "query"
|
|
4566
4592
|
}
|
|
4567
4593
|
],
|
|
4568
4594
|
"responses": {
|
|
@@ -6731,6 +6757,7 @@
|
|
|
6731
6757
|
},
|
|
6732
6758
|
"get": {
|
|
6733
6759
|
"summary": "List schedules",
|
|
6760
|
+
"description": "Returns schedules with the full `taskTemplate` replaced by a short `taskTemplatePreview` by default — list views never render the full template. Pass `fields=full` to restore `taskTemplate`. Fetch the full template via `GET /api/schedules/{id}`.",
|
|
6734
6761
|
"tags": [
|
|
6735
6762
|
"Schedules"
|
|
6736
6763
|
],
|
|
@@ -6783,6 +6810,18 @@
|
|
|
6783
6810
|
"required": false,
|
|
6784
6811
|
"name": "hideCompleted",
|
|
6785
6812
|
"in": "query"
|
|
6813
|
+
},
|
|
6814
|
+
{
|
|
6815
|
+
"schema": {
|
|
6816
|
+
"type": "string",
|
|
6817
|
+
"enum": [
|
|
6818
|
+
"full",
|
|
6819
|
+
"slim"
|
|
6820
|
+
]
|
|
6821
|
+
},
|
|
6822
|
+
"required": false,
|
|
6823
|
+
"name": "fields",
|
|
6824
|
+
"in": "query"
|
|
6786
6825
|
}
|
|
6787
6826
|
],
|
|
6788
6827
|
"responses": {
|
|
@@ -7312,6 +7351,7 @@
|
|
|
7312
7351
|
"/api/sessions": {
|
|
7313
7352
|
"get": {
|
|
7314
7353
|
"summary": "List recent task sessions (root tasks + chain summary)",
|
|
7354
|
+
"description": "Each item's `root` is a slim task summary by default — the full `task` text is replaced with a bounded `taskPreview` and completion/integration blobs are dropped. Pass `fields=full` to restore the full root `AgentTask`. The full root + descendant chain are on `GET /api/sessions/{rootTaskId}`.",
|
|
7315
7355
|
"tags": [
|
|
7316
7356
|
"Sessions"
|
|
7317
7357
|
],
|
|
@@ -7358,6 +7398,27 @@
|
|
|
7358
7398
|
"required": false,
|
|
7359
7399
|
"name": "q",
|
|
7360
7400
|
"in": "query"
|
|
7401
|
+
},
|
|
7402
|
+
{
|
|
7403
|
+
"schema": {
|
|
7404
|
+
"type": "string",
|
|
7405
|
+
"minLength": 1
|
|
7406
|
+
},
|
|
7407
|
+
"required": false,
|
|
7408
|
+
"name": "requestedByUserId",
|
|
7409
|
+
"in": "query"
|
|
7410
|
+
},
|
|
7411
|
+
{
|
|
7412
|
+
"schema": {
|
|
7413
|
+
"type": "string",
|
|
7414
|
+
"enum": [
|
|
7415
|
+
"full",
|
|
7416
|
+
"slim"
|
|
7417
|
+
]
|
|
7418
|
+
},
|
|
7419
|
+
"required": false,
|
|
7420
|
+
"name": "fields",
|
|
7421
|
+
"in": "query"
|
|
7361
7422
|
}
|
|
7362
7423
|
],
|
|
7363
7424
|
"responses": {
|
|
@@ -7407,6 +7468,7 @@
|
|
|
7407
7468
|
"/api/skills": {
|
|
7408
7469
|
"get": {
|
|
7409
7470
|
"summary": "List skills with optional filters",
|
|
7471
|
+
"description": "Returns skills WITHOUT the heavy `content` (full SKILL.md) by default — list views never render it. Pass `fields=full` to include `content` (e.g. for SDK consumers that read it from the list).",
|
|
7410
7472
|
"tags": [
|
|
7411
7473
|
"Skills"
|
|
7412
7474
|
],
|
|
@@ -7455,6 +7517,18 @@
|
|
|
7455
7517
|
"required": false,
|
|
7456
7518
|
"name": "search",
|
|
7457
7519
|
"in": "query"
|
|
7520
|
+
},
|
|
7521
|
+
{
|
|
7522
|
+
"schema": {
|
|
7523
|
+
"type": "string",
|
|
7524
|
+
"enum": [
|
|
7525
|
+
"full",
|
|
7526
|
+
"slim"
|
|
7527
|
+
]
|
|
7528
|
+
},
|
|
7529
|
+
"required": false,
|
|
7530
|
+
"name": "fields",
|
|
7531
|
+
"in": "query"
|
|
7458
7532
|
}
|
|
7459
7533
|
],
|
|
7460
7534
|
"responses": {
|
|
@@ -8922,6 +8996,25 @@
|
|
|
8922
8996
|
}
|
|
8923
8997
|
}
|
|
8924
8998
|
},
|
|
8999
|
+
"/api/metrics": {
|
|
9000
|
+
"get": {
|
|
9001
|
+
"summary": "Lightweight swarm-wide counts",
|
|
9002
|
+
"description": "Single JSON object of cheap `COUNT(*)` metrics — tasks (by status), agents (by status), workflows (total + enabled), pages, active sessions, skills. Use this instead of fetching full list payloads just to count. Powers UI footers/sidebars and MCP context.",
|
|
9003
|
+
"tags": [
|
|
9004
|
+
"Stats"
|
|
9005
|
+
],
|
|
9006
|
+
"security": [
|
|
9007
|
+
{
|
|
9008
|
+
"bearerAuth": []
|
|
9009
|
+
}
|
|
9010
|
+
],
|
|
9011
|
+
"responses": {
|
|
9012
|
+
"200": {
|
|
9013
|
+
"description": "Swarm metrics counts"
|
|
9014
|
+
}
|
|
9015
|
+
}
|
|
9016
|
+
}
|
|
9017
|
+
},
|
|
8925
9018
|
"/api/services": {
|
|
8926
9019
|
"get": {
|
|
8927
9020
|
"summary": "List all registered services",
|
|
@@ -9346,6 +9439,7 @@
|
|
|
9346
9439
|
"/api/tasks": {
|
|
9347
9440
|
"get": {
|
|
9348
9441
|
"summary": "List tasks with filters",
|
|
9442
|
+
"description": "Returns tasks with the full `task` text replaced by a bounded `taskPreview` and completion/integration blobs dropped by default — list views only need the preview. Pass `fields=full` to restore the full `AgentTask`. Fetch a single task in full via `GET /api/tasks/{id}`.",
|
|
9349
9443
|
"tags": [
|
|
9350
9444
|
"Tasks"
|
|
9351
9445
|
],
|
|
@@ -9437,6 +9531,18 @@
|
|
|
9437
9531
|
"required": false,
|
|
9438
9532
|
"name": "offset",
|
|
9439
9533
|
"in": "query"
|
|
9534
|
+
},
|
|
9535
|
+
{
|
|
9536
|
+
"schema": {
|
|
9537
|
+
"type": "string",
|
|
9538
|
+
"enum": [
|
|
9539
|
+
"full",
|
|
9540
|
+
"slim"
|
|
9541
|
+
]
|
|
9542
|
+
},
|
|
9543
|
+
"required": false,
|
|
9544
|
+
"name": "fields",
|
|
9545
|
+
"in": "query"
|
|
9440
9546
|
}
|
|
9441
9547
|
],
|
|
9442
9548
|
"responses": {
|
|
@@ -9706,6 +9812,16 @@
|
|
|
9706
9812
|
"required": true,
|
|
9707
9813
|
"name": "id",
|
|
9708
9814
|
"in": "path"
|
|
9815
|
+
},
|
|
9816
|
+
{
|
|
9817
|
+
"schema": {
|
|
9818
|
+
"type": "integer",
|
|
9819
|
+
"minimum": 1,
|
|
9820
|
+
"maximum": 1000
|
|
9821
|
+
},
|
|
9822
|
+
"required": false,
|
|
9823
|
+
"name": "logsLimit",
|
|
9824
|
+
"in": "query"
|
|
9709
9825
|
}
|
|
9710
9826
|
],
|
|
9711
9827
|
"responses": {
|
|
@@ -11214,6 +11330,7 @@
|
|
|
11214
11330
|
"/api/workflows": {
|
|
11215
11331
|
"get": {
|
|
11216
11332
|
"summary": "List all workflows",
|
|
11333
|
+
"description": "Returns workflows WITHOUT the heavy `definition` (the full DAG) by default — the list view only needs a `nodeCount`, which is included. Pass `fields=full` to restore `definition` + trigger config. Fetch the full workflow via `GET /api/workflows/{id}`.",
|
|
11217
11334
|
"tags": [
|
|
11218
11335
|
"Workflows"
|
|
11219
11336
|
],
|
|
@@ -11222,6 +11339,20 @@
|
|
|
11222
11339
|
"bearerAuth": []
|
|
11223
11340
|
}
|
|
11224
11341
|
],
|
|
11342
|
+
"parameters": [
|
|
11343
|
+
{
|
|
11344
|
+
"schema": {
|
|
11345
|
+
"type": "string",
|
|
11346
|
+
"enum": [
|
|
11347
|
+
"full",
|
|
11348
|
+
"slim"
|
|
11349
|
+
]
|
|
11350
|
+
},
|
|
11351
|
+
"required": false,
|
|
11352
|
+
"name": "fields",
|
|
11353
|
+
"in": "query"
|
|
11354
|
+
}
|
|
11355
|
+
],
|
|
11225
11356
|
"responses": {
|
|
11226
11357
|
"200": {
|
|
11227
11358
|
"description": "Workflow list"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@desplega.ai/agent-swarm",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.82.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>",
|
|
@@ -85,7 +85,8 @@
|
|
|
85
85
|
"pm2-status": "pm2 status swarm-api swarm-ui swarm-lead swarm-worker",
|
|
86
86
|
"seed": "bun scripts/seed.ts",
|
|
87
87
|
"seed:clean": "bun scripts/seed.ts --clean",
|
|
88
|
-
"seed:people": "bun scripts/seed-people.ts"
|
|
88
|
+
"seed:people": "bun scripts/seed-people.ts",
|
|
89
|
+
"seed:scripts": "bun scripts/seed-scripts.ts"
|
|
89
90
|
},
|
|
90
91
|
"devDependencies": {
|
|
91
92
|
"@biomejs/biome": "^2.3.10",
|