@desplega.ai/agent-swarm 1.92.2 → 1.94.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 (122) hide show
  1. package/README.md +2 -2
  2. package/openapi.json +242 -3
  3. package/package.json +5 -5
  4. package/src/be/db.ts +152 -11
  5. package/src/be/memory/boot-reembed.ts +0 -1
  6. package/src/be/memory/providers/sqlite-store.ts +42 -25
  7. package/src/be/memory/raters/llm-client.ts +12 -5
  8. package/src/be/memory/types.ts +3 -0
  9. package/src/be/migrations/088_script_runs_list_indexes.sql +10 -0
  10. package/src/be/migrations/089_harness_variant.sql +2 -0
  11. package/src/be/migrations/090_model_tiers.sql +2 -0
  12. package/src/be/migrations/091_seed_swarm_operations_metrics.sql +12 -0
  13. package/src/be/migrations/092_metrics_dashboard_combobox_filters.sql +68 -0
  14. package/src/be/migrations/093_slack_message_tracking.sql +6 -0
  15. package/src/be/migrations/runner.ts +52 -0
  16. package/src/be/modelsdev-cache.json +3264 -1166
  17. package/src/be/scripts/boot-reembed.ts +74 -0
  18. package/src/be/scripts/db.ts +19 -3
  19. package/src/be/seed/index.ts +1 -1
  20. package/src/be/seed/registry.ts +2 -2
  21. package/src/be/seed/runner.ts +5 -5
  22. package/src/be/seed/types.ts +6 -1
  23. package/src/be/seed-pricing.ts +2 -0
  24. package/src/be/seed-scripts/catalog/boot-triage.inline.ts +221 -0
  25. package/src/be/seed-scripts/catalog/catalog-report.inline.ts +457 -0
  26. package/src/be/seed-scripts/catalog/compound-insights.inline.ts +863 -0
  27. package/src/be/seed-scripts/catalog/ops-catalog-audit.inline.ts +506 -0
  28. package/src/be/seed-scripts/index.ts +8 -7
  29. package/src/be/skill-sync.ts +28 -179
  30. package/src/commands/runner.ts +197 -10
  31. package/src/http/api-keys.ts +42 -0
  32. package/src/http/index.ts +13 -2
  33. package/src/http/mcp-bridge.ts +1 -1
  34. package/src/http/memory.ts +23 -24
  35. package/src/http/metrics.ts +55 -6
  36. package/src/http/schedules.ts +16 -15
  37. package/src/http/script-runs.ts +7 -1
  38. package/src/http/scripts.ts +147 -1
  39. package/src/http/tasks.ts +17 -6
  40. package/src/model-tiers.ts +140 -0
  41. package/src/providers/claude-adapter.ts +33 -1
  42. package/src/providers/claude-managed-adapter.ts +3 -0
  43. package/src/providers/claude-managed-models.ts +16 -0
  44. package/src/providers/codex-adapter.ts +8 -1
  45. package/src/providers/codex-models.ts +1 -0
  46. package/src/providers/codex-oauth/auth-json.ts +1 -0
  47. package/src/providers/harness-version.ts +7 -0
  48. package/src/providers/opencode-adapter.ts +12 -4
  49. package/src/providers/pi-mono-adapter.ts +90 -8
  50. package/src/providers/types.ts +2 -0
  51. package/src/scheduler/scheduler.ts +22 -34
  52. package/src/scripts-runtime/egress-secrets.ts +83 -0
  53. package/src/scripts-runtime/eval-harness.ts +4 -0
  54. package/src/scripts-runtime/executors/types.ts +7 -0
  55. package/src/scripts-runtime/loader.ts +2 -0
  56. package/src/server-user.ts +8 -2
  57. package/src/slack/channel-join.ts +41 -0
  58. package/src/slack/responses.ts +39 -11
  59. package/src/slack/watcher.ts +121 -8
  60. package/src/tests/additive-buffer.test.ts +0 -1
  61. package/src/tests/agents-list-model-display.test.ts +13 -0
  62. package/src/tests/api-key-tracking.test.ts +113 -0
  63. package/src/tests/approval-requests.test.ts +0 -6
  64. package/src/tests/aws-error-classifier.test.ts +148 -0
  65. package/src/tests/claude-managed-adapter.test.ts +12 -0
  66. package/src/tests/claude-managed-setup.test.ts +0 -4
  67. package/src/tests/codex-pool.test.ts +2 -6
  68. package/src/tests/context-window.test.ts +7 -0
  69. package/src/tests/http-api-integration.test.ts +23 -6
  70. package/src/tests/memory-edges.test.ts +0 -2
  71. package/src/tests/memory-rate-endpoint.test.ts +0 -2
  72. package/src/tests/memory-rater-e2e.test.ts +0 -2
  73. package/src/tests/memory-store.test.ts +19 -1
  74. package/src/tests/memory.test.ts +51 -0
  75. package/src/tests/metrics-http.test.ts +137 -3
  76. package/src/tests/migration-046-budgets.test.ts +33 -0
  77. package/src/tests/migration-runner-regressions.test.ts +69 -0
  78. package/src/tests/model-control.test.ts +162 -46
  79. package/src/tests/opencode-adapter.test.ts +9 -0
  80. package/src/tests/pi-mono-adapter.test.ts +319 -0
  81. package/src/tests/providers/pi-cost.test.ts +9 -0
  82. package/src/tests/reload-config.test.ts +33 -17
  83. package/src/tests/runner-fallback-output.test.ts +50 -0
  84. package/src/tests/runner-skills-refresh.test.ts +216 -46
  85. package/src/tests/script-runs-http.test.ts +7 -1
  86. package/src/tests/scripts-boot-reembed.test.ts +163 -0
  87. package/src/tests/scripts-embeddings.test.ts +90 -0
  88. package/src/tests/scripts-runtime-secret-egress.test.ts +129 -0
  89. package/src/tests/seed-scripts.test.ts +13 -1
  90. package/src/tests/seed.test.ts +26 -1
  91. package/src/tests/session-attach.test.ts +6 -6
  92. package/src/tests/session-costs-model-key-normalize.test.ts +2 -0
  93. package/src/tests/skill-fs-writer.test.ts +250 -0
  94. package/src/tests/slack-attachments-block.test.ts +0 -1
  95. package/src/tests/slack-blocks.test.ts +0 -1
  96. package/src/tests/slack-channel-join.test.ts +80 -0
  97. package/src/tests/slack-identity-resolution.test.ts +0 -1
  98. package/src/tests/slack-watcher.test.ts +66 -0
  99. package/src/tests/structured-output.test.ts +0 -2
  100. package/src/tests/use-dismissible-card.test.ts +0 -4
  101. package/src/tests/workflow-agent-task.test.ts +5 -2
  102. package/src/tests/workflow-validation-port-routing.test.ts +181 -0
  103. package/src/tools/memory-get.ts +11 -0
  104. package/src/tools/memory-search.ts +18 -0
  105. package/src/tools/schedules/create-schedule.ts +71 -70
  106. package/src/tools/schedules/update-schedule.ts +43 -31
  107. package/src/tools/send-task.ts +16 -5
  108. package/src/tools/slack-post.ts +18 -15
  109. package/src/tools/slack-read.ts +9 -11
  110. package/src/tools/slack-reply.ts +18 -15
  111. package/src/tools/slack-start-thread.ts +17 -14
  112. package/src/tools/task-action.ts +11 -3
  113. package/src/types.ts +40 -0
  114. package/src/utils/aws-error-classifier.ts +97 -0
  115. package/src/utils/context-window.ts +5 -0
  116. package/src/utils/credentials.test.ts +68 -0
  117. package/src/utils/credentials.ts +66 -5
  118. package/src/utils/pretty-print.ts +25 -10
  119. package/src/utils/skill-fs-writer.ts +220 -0
  120. package/src/utils/skills-refresh.ts +123 -40
  121. package/src/workflows/engine.ts +3 -2
  122. package/src/workflows/executors/agent-task.ts +3 -1
package/README.md CHANGED
@@ -46,7 +46,7 @@
46
46
 
47
47
  ## What it does
48
48
 
49
- Agent Swarm 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.
49
+ Agent Swarm 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.
50
50
 
51
51
  You can run agents for Marketing, Product, UX, Engineering, Support, Operations, HR, Finance, or any role you can think of. A centralized Lead coordinates them, and they share the learnings horizontally. That's the true difference between [*AI First*](https://www.pleasedontdeploy.com/i/197193364/ai-first) and [*AI Native*](https://www.pleasedontdeploy.com/i/197193364/third-the-ai-native-metamorphosis).
52
52
 
@@ -127,7 +127,7 @@ Check [our templates](https://templates.agent-swarm.dev) for a quick start.
127
127
  - **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)
128
128
  - **Scheduled & recurring tasks** — cron-based automation for standing work. [Scheduling →](https://docs.agent-swarm.dev/docs/concepts/scheduling)
129
129
  - **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. [Guide →](https://docs.agent-swarm.dev/docs/guides/script-workflow-runs)
130
- - **Harness & LLM agnostic** — run with Claude Code, Claude Bridge, 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)
130
+ - **Harness & LLM agnostic** — run with Claude Code, Claude Bridge, OpenAI Codex, pi-mono, Devin, Claude Managed Agents, raw LLMs, or opencode. Tasks, schedules, and workflow agent-task nodes can use portable `modelTier` intent (`smol`, `regular`, `smart`, `ultra`) and resolve it per worker/provider at run time. [Harness config →](https://docs.agent-swarm.dev/docs/guides/harness-configuration) · [Add a new provider →](https://docs.agent-swarm.dev/docs/guides/harness-providers)
131
131
  - **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)
132
132
  - **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)
133
133
  - **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)
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.92.2",
5
+ "version": "1.94.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": [
@@ -2740,6 +2740,59 @@
2740
2740
  }
2741
2741
  }
2742
2742
  },
2743
+ "/api/keys/clear-rate-limit": {
2744
+ "post": {
2745
+ "summary": "Clear rate-limited status for a key after a successful use proves it is healthy",
2746
+ "tags": [
2747
+ "API Keys"
2748
+ ],
2749
+ "security": [
2750
+ {
2751
+ "bearerAuth": []
2752
+ }
2753
+ ],
2754
+ "requestBody": {
2755
+ "content": {
2756
+ "application/json": {
2757
+ "schema": {
2758
+ "type": "object",
2759
+ "properties": {
2760
+ "keyType": {
2761
+ "type": "string"
2762
+ },
2763
+ "keySuffix": {
2764
+ "type": "string",
2765
+ "minLength": 1,
2766
+ "maxLength": 10
2767
+ },
2768
+ "scope": {
2769
+ "type": "string"
2770
+ },
2771
+ "scopeId": {
2772
+ "type": "string"
2773
+ }
2774
+ },
2775
+ "required": [
2776
+ "keyType",
2777
+ "keySuffix"
2778
+ ]
2779
+ }
2780
+ }
2781
+ }
2782
+ },
2783
+ "responses": {
2784
+ "200": {
2785
+ "description": "Rate limit cleared (or key was not rate-limited)"
2786
+ },
2787
+ "400": {
2788
+ "description": "Validation error"
2789
+ },
2790
+ "401": {
2791
+ "description": "Unauthorized"
2792
+ }
2793
+ }
2794
+ }
2795
+ },
2743
2796
  "/api/events": {
2744
2797
  "post": {
2745
2798
  "summary": "Store a single event",
@@ -6841,6 +6894,15 @@
6841
6894
  "model": {
6842
6895
  "type": "string"
6843
6896
  },
6897
+ "modelTier": {
6898
+ "type": "string",
6899
+ "enum": [
6900
+ "smol",
6901
+ "regular",
6902
+ "smart",
6903
+ "ultra"
6904
+ ]
6905
+ },
6844
6906
  "scheduleType": {
6845
6907
  "type": "string",
6846
6908
  "enum": [
@@ -7088,6 +7150,19 @@
7088
7150
  "model": {
7089
7151
  "type": "string"
7090
7152
  },
7153
+ "modelTier": {
7154
+ "type": [
7155
+ "string",
7156
+ "null"
7157
+ ],
7158
+ "enum": [
7159
+ "smol",
7160
+ "regular",
7161
+ "smart",
7162
+ "ultra",
7163
+ null
7164
+ ]
7165
+ },
7091
7166
  "nextRunAt": {
7092
7167
  "type": [
7093
7168
  "string",
@@ -7244,6 +7319,14 @@
7244
7319
  "name": "agentId",
7245
7320
  "in": "query"
7246
7321
  },
7322
+ {
7323
+ "schema": {
7324
+ "type": "string"
7325
+ },
7326
+ "required": false,
7327
+ "name": "scriptName",
7328
+ "in": "query"
7329
+ },
7247
7330
  {
7248
7331
  "schema": {
7249
7332
  "type": "integer",
@@ -9196,6 +9279,143 @@
9196
9279
  }
9197
9280
  }
9198
9281
  },
9282
+ "/api/scripts": {
9283
+ "get": {
9284
+ "operationId": "scripts_list",
9285
+ "summary": "List saved scripts",
9286
+ "description": "Dashboard read: lean projection without source. Scratch scripts are excluded unless includeScratch=true.",
9287
+ "tags": [
9288
+ "Scripts"
9289
+ ],
9290
+ "security": [
9291
+ {
9292
+ "bearerAuth": []
9293
+ }
9294
+ ],
9295
+ "parameters": [
9296
+ {
9297
+ "schema": {
9298
+ "type": "string",
9299
+ "enum": [
9300
+ "global",
9301
+ "agent"
9302
+ ]
9303
+ },
9304
+ "required": false,
9305
+ "name": "scope",
9306
+ "in": "query"
9307
+ },
9308
+ {
9309
+ "schema": {
9310
+ "type": "string",
9311
+ "enum": [
9312
+ "true",
9313
+ "false"
9314
+ ]
9315
+ },
9316
+ "required": false,
9317
+ "name": "includeScratch",
9318
+ "in": "query"
9319
+ }
9320
+ ],
9321
+ "responses": {
9322
+ "200": {
9323
+ "description": "Saved scripts"
9324
+ },
9325
+ "400": {
9326
+ "description": "Validation error"
9327
+ }
9328
+ }
9329
+ }
9330
+ },
9331
+ "/api/scripts/type-defs": {
9332
+ "get": {
9333
+ "operationId": "scripts_type_defs",
9334
+ "summary": "Get script SDK and stdlib type definitions",
9335
+ "description": "Static .d.ts blobs for editor integration (e.g. Monaco extraLibs). Cacheable.",
9336
+ "tags": [
9337
+ "Scripts"
9338
+ ],
9339
+ "security": [
9340
+ {
9341
+ "bearerAuth": []
9342
+ }
9343
+ ],
9344
+ "responses": {
9345
+ "200": {
9346
+ "description": "SDK and stdlib type definition blobs"
9347
+ }
9348
+ }
9349
+ }
9350
+ },
9351
+ "/api/scripts/{id}": {
9352
+ "get": {
9353
+ "operationId": "scripts_get",
9354
+ "summary": "Get a saved script by id",
9355
+ "description": "Dashboard read: full record including source and parsed signature.",
9356
+ "tags": [
9357
+ "Scripts"
9358
+ ],
9359
+ "security": [
9360
+ {
9361
+ "bearerAuth": []
9362
+ }
9363
+ ],
9364
+ "parameters": [
9365
+ {
9366
+ "schema": {
9367
+ "type": "string",
9368
+ "format": "uuid"
9369
+ },
9370
+ "required": true,
9371
+ "name": "id",
9372
+ "in": "path"
9373
+ }
9374
+ ],
9375
+ "responses": {
9376
+ "200": {
9377
+ "description": "Script detail"
9378
+ },
9379
+ "404": {
9380
+ "description": "Script not found"
9381
+ }
9382
+ }
9383
+ }
9384
+ },
9385
+ "/api/scripts/{id}/versions": {
9386
+ "get": {
9387
+ "operationId": "scripts_versions",
9388
+ "summary": "List versions of a saved script",
9389
+ "description": "Dashboard read: version history, newest first.",
9390
+ "tags": [
9391
+ "Scripts"
9392
+ ],
9393
+ "security": [
9394
+ {
9395
+ "bearerAuth": []
9396
+ }
9397
+ ],
9398
+ "parameters": [
9399
+ {
9400
+ "schema": {
9401
+ "type": "string",
9402
+ "format": "uuid"
9403
+ },
9404
+ "required": true,
9405
+ "name": "id",
9406
+ "in": "path"
9407
+ }
9408
+ ],
9409
+ "responses": {
9410
+ "200": {
9411
+ "description": "Script versions"
9412
+ },
9413
+ "404": {
9414
+ "description": "Script not found"
9415
+ }
9416
+ }
9417
+ }
9418
+ },
9199
9419
  "/api/mcp-bridge": {
9200
9420
  "post": {
9201
9421
  "summary": "Generic MCP tool proxy for the scripts SDK bridge",
@@ -10692,6 +10912,18 @@
10692
10912
  },
10693
10913
  "requestedByUserId": {
10694
10914
  "type": "string"
10915
+ },
10916
+ "model": {
10917
+ "type": "string"
10918
+ },
10919
+ "modelTier": {
10920
+ "type": "string",
10921
+ "enum": [
10922
+ "smol",
10923
+ "regular",
10924
+ "smart",
10925
+ "ultra"
10926
+ ]
10695
10927
  }
10696
10928
  },
10697
10929
  "required": [
@@ -10711,9 +10943,9 @@
10711
10943
  }
10712
10944
  }
10713
10945
  },
10714
- "/api/tasks/{id}/claude-session": {
10946
+ "/api/tasks/{id}/session": {
10715
10947
  "put": {
10716
- "summary": "Update Claude session ID for a task",
10948
+ "summary": "Update provider session ID and harness metadata for a task",
10717
10949
  "tags": [
10718
10950
  "Tasks"
10719
10951
  ],
@@ -10800,6 +11032,13 @@
10800
11032
  "providerMeta": {
10801
11033
  "type": "object",
10802
11034
  "properties": {}
11035
+ },
11036
+ "harnessVariant": {
11037
+ "type": "string"
11038
+ },
11039
+ "harnessVariantMeta": {
11040
+ "type": "object",
11041
+ "additionalProperties": {}
10803
11042
  }
10804
11043
  },
10805
11044
  "required": [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@desplega.ai/agent-swarm",
3
- "version": "1.92.2",
3
+ "version": "1.94.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>",
@@ -112,11 +112,11 @@
112
112
  "@desplega.ai/localtunnel": "^2.2.0",
113
113
  "@inkjs/ui": "^2.0.0",
114
114
  "@linear/sdk": "^77.0.0",
115
- "@earendil-works/pi-agent-core": "^0.78.1",
116
- "@earendil-works/pi-ai": "^0.78.1",
117
- "@earendil-works/pi-coding-agent": "^0.78.1",
115
+ "@earendil-works/pi-agent-core": "^0.79.1",
116
+ "@earendil-works/pi-ai": "^0.79.1",
117
+ "@earendil-works/pi-coding-agent": "^0.79.1",
118
118
  "@modelcontextprotocol/sdk": "^1.25.1",
119
- "@openai/codex-sdk": "^0.137.0",
119
+ "@openai/codex-sdk": "^0.139.0",
120
120
  "@opencode-ai/sdk": "^1.16.2",
121
121
  "@openfort/openfort-node": "^0.9.1",
122
122
  "@opentelemetry/api": "^1.9.1",