@desplega.ai/agent-swarm 1.123.1 → 1.125.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/dist/{actions-3ntn8s3f.js → actions-3aky6er5.js} +6 -5
- package/dist/{app-pej7g57x.js → app-xbt4n4mt.js} +4 -3
- package/dist/{assistant-pxa36zjn.js → assistant-ncftbs9t.js} +12 -10
- package/dist/{boot-reembed-ybq960bh.js → boot-reembed-00cxm1mj.js} +5 -4
- package/dist/{boot-reembed-wdwde4vr.js → boot-reembed-5xxzva12.js} +4 -3
- package/dist/{boot-scrub-logs-ndqxg6e3.js → boot-scrub-logs-9cmcq6ez.js} +3 -2
- package/dist/{cli-xv09zc8e.js → cli-0w3mk6r2.js} +1 -1
- package/dist/{cli-k3yfwe8g.js → cli-3x5aphbt.js} +2 -2
- package/dist/{cli-exfs8aym.js → cli-3y8xyp0b.js} +7 -1
- package/dist/{cli-256kb8p5.js → cli-4xft7caa.js} +4 -4
- package/dist/{cli-2e5t0yjj.js → cli-5a4nmfrn.js} +12 -10
- package/dist/{cli-7yn0n4fp.js → cli-88r31vx9.js} +8 -8
- package/dist/{cli-pjvdm39a.js → cli-8bkwn1wv.js} +11 -9
- package/dist/{cli-zvbxe7pf.js → cli-8vzddbs7.js} +2 -1
- package/dist/{cli-7rk0bbfr.js → cli-94796kxr.js} +2 -2
- package/dist/{cli-sj43m5z0.js → cli-dbmh9yqn.js} +7 -5
- package/dist/{cli-1kv5sydm.js → cli-ff8b5cbe.js} +1 -1
- package/dist/{cli-0pmkqg1d.js → cli-gbx122ge.js} +1 -1
- package/dist/{cli-qrnhnhma.js → cli-jcavqvh7.js} +20 -24
- package/dist/cli-k1py8264.js +1129 -0
- package/dist/{cli-1cah98w1.js → cli-k5c6jfzn.js} +1 -1
- package/dist/{cli-kqgkfpz7.js → cli-n02497b2.js} +5 -3
- package/dist/{cli-vw0acwe7.js → cli-nqq9tthd.js} +9 -7
- package/dist/{cli-g4bfr1e7.js → cli-pqtrhrss.js} +2 -2
- package/dist/{cli-7qvpf14x.js → cli-q92pr3rt.js} +1 -1
- package/dist/{cli-ca32n52j.js → cli-qzy21svh.js} +2 -2
- package/dist/{cli-r07fhvsk.js → cli-refygp3c.js} +5 -5
- package/dist/{cli-mntyk3cr.js → cli-tar44ekp.js} +1 -1
- package/dist/{cli-333x50bh.js → cli-v292k2fv.js} +1 -1
- package/dist/{cli-mb3gz7qr.js → cli-vvbwy286.js} +1 -1
- package/dist/{cli-hgkf9zmd.js → cli-wbcsjpyv.js} +454 -89
- package/dist/cli-wdrrgv4m.js +22 -0
- package/dist/{cli-x2hk4m81.js → cli-yr11vvst.js} +78 -1128
- package/dist/{cli-82eq5zf5.js → cli-zhp3t49e.js} +4 -2
- package/dist/cli.js +23 -10
- package/dist/{codex-adapter-vcseqpwf.js → codex-adapter-mqczt8xv.js} +1 -1
- package/dist/codex-hook-emq42pfq.js +106 -0
- package/dist/{codex-session-runner-jec9e9t1.js → codex-session-runner-mrwz1h50.js} +1 -1
- package/dist/{commands-5p0erxye.js → commands-7dbx98fp.js} +5 -3
- package/dist/{db-yp9e9nvs.js → db-r5705rk8.js} +11 -2
- package/dist/{handlers-3hqw1dsr.js → handlers-8kj038es.js} +12 -10
- package/dist/{hook-5981d59r.js → hook-2590fnyk.js} +1 -1
- package/dist/{http-ek9ctgth.js → http-8yej35d0.js} +91 -59
- package/dist/{index-1cnvzmh4.js → index-hy73j39b.js} +9 -8
- package/dist/{index-chcty242.js → index-kgay2v5w.js} +11 -10
- package/dist/{index-8j9b86c9.js → index-v3n4hb3w.js} +10 -9
- package/dist/{index-33eb3q08.js → index-x1n3tybc.js} +12 -11
- package/dist/{keepalive-rrvxy1fy.js → keepalive-q8yg6d6r.js} +6 -5
- package/dist/{lead-jvw8b413.js → lead-yxtt169p.js} +23 -21
- package/dist/{maintenance-3zjnr2wa.js → maintenance-70cskw5t.js} +5 -4
- package/dist/{oauth-refresh-sweep-vfhvqmby.js → oauth-refresh-sweep-90h9rzx8.js} +5 -4
- package/dist/{onboard-kvntqz8h.js → onboard-20reqz6j.js} +2 -2
- package/dist/{otel-impl-61tsn4bx.js → otel-impl-vja8f9mm.js} +1 -1
- package/dist/{pricing-refresh-jcp6ntbk.js → pricing-refresh-34mbexgm.js} +5 -4
- package/dist/{rbac-roles-r3j4z9vs.js → rbac-roles-s1qnewkt.js} +5 -4
- package/dist/{rbac-roles-xcbab18x.js → rbac-roles-sa59eyp4.js} +4 -3
- package/dist/{seed-pricing-bd669a7j.js → seed-pricing-p5fnj0qd.js} +4 -3
- package/dist/{setup-pg03xran.js → setup-p9yq3mb2.js} +2 -2
- package/dist/{worker-q5n4qwvq.js → worker-21zrq8cd.js} +23 -21
- package/openapi.json +23 -1
- package/package.json +2 -1
- package/src/be/db.ts +111 -4
- package/src/be/scripts/typecheck.ts +8 -4
- package/src/be/seed-scripts/catalog/task-context-gathering.ts +1 -1
- package/src/cli.tsx +12 -0
- package/src/commands/runner.ts +11 -23
- package/src/hooks/codex-hook.ts +157 -0
- package/src/http/kv.ts +37 -8
- package/src/http/mcp-bridge.ts +3 -2
- package/src/http/workflows.ts +16 -4
- package/src/kv-overflow.ts +20 -0
- package/src/prompts/session-templates.ts +6 -3
- package/src/prompts/steering-delivery.ts +32 -0
- package/src/providers/codex-adapter.ts +20 -4
- package/src/providers/types.ts +8 -0
- package/src/script-workflows/harness.ts +5 -1
- package/src/script-workflows/workflow-ctx.ts +6 -7
- package/src/scripts-runtime/eval-harness.ts +11 -2
- package/src/scripts-runtime/extract-args-schema.ts +5 -1
- package/src/scripts-runtime/response-limit.ts +50 -0
- package/src/scripts-runtime/swarm-sdk.ts +13 -4
- package/src/scripts-runtime/types/stdlib.d.ts +4 -0
- package/src/scripts-runtime/types/swarm-sdk.d.ts +4 -0
- package/src/telemetry.ts +10 -7
- package/src/tests/claude-adapter-binary.test.ts +64 -32
- package/src/tests/codex-steering-hook.test.ts +224 -0
- package/src/tests/kv-http.test.ts +35 -1
- package/src/tests/kv-storage.test.ts +45 -0
- package/src/tests/kv-tool.test.ts +51 -0
- package/src/tests/mcp-tools.test.ts +2 -2
- package/src/tests/prompt-template-session.test.ts +7 -0
- package/src/tests/run-bun-tests.test.ts +171 -0
- package/src/tests/scripts-mcp-e2e.test.ts +156 -3
- package/src/tests/scripts-runtime.test.ts +33 -0
- package/src/tests/scripts-typecheck.test.ts +17 -0
- package/src/tests/sdk-allowlist.test.ts +61 -2
- package/src/tests/seed-scripts.test.ts +43 -0
- package/src/tests/slack-read-boundaries.test.ts +229 -0
- package/src/tests/steering-core.test.ts +19 -19
- package/src/tests/steering-transport.test.ts +21 -3
- package/src/tests/store-progress-attachments-handler.test.ts +45 -10
- package/src/tests/swarm-tool-result-gate.test.ts +321 -7
- package/src/tests/task-tools-ctx.test.ts +29 -0
- package/src/tests/telemetry-init.test.ts +21 -24
- package/src/tests/tool-output-agent-id.test.ts +9 -3
- package/src/tests/tool-registrar-no-input.test.ts +6 -0
- package/src/tests/workflow-http-v2.test.ts +116 -0
- package/src/tools/get-tasks.ts +40 -1
- package/src/tools/kv/kv-get.ts +10 -0
- package/src/tools/kv/kv-list.ts +7 -0
- package/src/tools/kv/kv-read-auth.ts +13 -0
- package/src/tools/kv/kv-write-auth.ts +4 -0
- package/src/tools/script-run.ts +2 -2
- package/src/tools/script-upsert.ts +2 -2
- package/src/tools/steer-task.ts +1 -1
- package/src/tools/store-progress.ts +24 -7
- package/src/tools/utils.ts +403 -37
- package/src/tools/workflows/list-workflow-runs.ts +95 -24
- package/src/types.ts +7 -1
package/README.md
CHANGED
|
@@ -136,7 +136,8 @@ Check [our templates](https://templates.agent-swarm.dev) for a quick start.
|
|
|
136
136
|
- **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)
|
|
137
137
|
- **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)
|
|
138
138
|
- **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)
|
|
139
|
-
- **Harness & LLM agnostic** — run with Claude Code, Claude Bridge, OpenAI Codex, pi-mono (Anthropic, OpenRouter, or Amazon Bedrock), Devin, Claude Managed Agents, raw LLMs, or opencode. Route every OpenRouter-backed harness, workflow, and summarizer through an OpenAI-compatible gateway with `OPENROUTER_BASE_URL`. Tasks, schedules, and workflow agent-task nodes can use portable `modelTier` intent (`smol`, `regular`, `smart`, `ultra`), and operators can set per-agent reasoning effort (`off` → `max`, where supported) without changing task payloads. [Harness config →](https://docs.agent-swarm.dev/docs/guides/harness-configuration) · [Add a new provider →](https://docs.agent-swarm.dev/docs/guides/harness-providers)
|
|
139
|
+
- **Harness & LLM agnostic** — run with Claude Code, Claude Bridge, OpenAI Codex, pi-mono (Anthropic, OpenRouter, or Amazon Bedrock), Devin, Claude Managed Agents, raw LLMs, or opencode. The dashboard model picker follows a live models.dev catalog (with a bundled snapshot fallback), so newly released provider models appear without a redeploy. Route every OpenRouter-backed harness, workflow, and summarizer through an OpenAI-compatible gateway with `OPENROUTER_BASE_URL`. Tasks, schedules, and workflow agent-task nodes can use portable `modelTier` intent (`smol`, `regular`, `smart`, `ultra`), and operators can set per-agent reasoning effort (`off` → `max`, where supported) without changing task payloads. [Harness config →](https://docs.agent-swarm.dev/docs/guides/harness-configuration) · [Add a new provider →](https://docs.agent-swarm.dev/docs/guides/harness-providers)
|
|
140
|
+
- **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)
|
|
140
141
|
- **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)
|
|
141
142
|
- **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)
|
|
142
143
|
- **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)
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
resolveSlackUserId
|
|
3
|
-
} from "./cli-
|
|
4
|
-
import"./cli-
|
|
3
|
+
} from "./cli-pqtrhrss.js";
|
|
4
|
+
import"./cli-0w3mk6r2.js";
|
|
5
5
|
import {
|
|
6
6
|
createTaskWithSiblingAwareness
|
|
7
|
-
} from "./cli-
|
|
7
|
+
} from "./cli-k5c6jfzn.js";
|
|
8
8
|
import {
|
|
9
9
|
buildCancelledBlocks,
|
|
10
10
|
getTaskLink
|
|
@@ -19,9 +19,10 @@ import {
|
|
|
19
19
|
init_context_key,
|
|
20
20
|
init_db,
|
|
21
21
|
slackContextKey
|
|
22
|
-
} from "./cli-
|
|
22
|
+
} from "./cli-yr11vvst.js";
|
|
23
|
+
import"./cli-k1py8264.js";
|
|
23
24
|
import"./cli-z2zcxes1.js";
|
|
24
|
-
import"./cli-
|
|
25
|
+
import"./cli-8vzddbs7.js";
|
|
25
26
|
import"./cli-4j2mrzag.js";
|
|
26
27
|
import"./cli-bw80ck94.js";
|
|
27
28
|
import"./cli-xz9aq0rf.js";
|
|
@@ -3,15 +3,16 @@ import {
|
|
|
3
3
|
initSlackApp,
|
|
4
4
|
startSlackApp,
|
|
5
5
|
stopSlackApp
|
|
6
|
-
} from "./cli-
|
|
6
|
+
} from "./cli-refygp3c.js";
|
|
7
7
|
import"./cli-rkndnn90.js";
|
|
8
8
|
import"./cli-b0p7rfnd.js";
|
|
9
9
|
import"./cli-5ncdb7ff.js";
|
|
10
10
|
import"./cli-wspgs9bt.js";
|
|
11
11
|
import"./cli-dh55d5fg.js";
|
|
12
|
-
import"./cli-
|
|
12
|
+
import"./cli-yr11vvst.js";
|
|
13
|
+
import"./cli-k1py8264.js";
|
|
13
14
|
import"./cli-z2zcxes1.js";
|
|
14
|
-
import"./cli-
|
|
15
|
+
import"./cli-8vzddbs7.js";
|
|
15
16
|
import"./cli-4j2mrzag.js";
|
|
16
17
|
import"./cli-bw80ck94.js";
|
|
17
18
|
import"./cli-xz9aq0rf.js";
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import {
|
|
2
2
|
bufferThreadMessage,
|
|
3
3
|
wasEventSeen
|
|
4
|
-
} from "./cli-
|
|
4
|
+
} from "./cli-8bkwn1wv.js";
|
|
5
5
|
import {
|
|
6
6
|
hasOtherUserMention
|
|
7
|
-
} from "./cli-
|
|
7
|
+
} from "./cli-zhp3t49e.js";
|
|
8
8
|
import {
|
|
9
9
|
resolveSlackUserId,
|
|
10
10
|
rewriteSlackMentions
|
|
11
|
-
} from "./cli-
|
|
12
|
-
import"./cli-
|
|
11
|
+
} from "./cli-pqtrhrss.js";
|
|
12
|
+
import"./cli-0w3mk6r2.js";
|
|
13
13
|
import {
|
|
14
14
|
createTaskWithSiblingAwareness
|
|
15
|
-
} from "./cli-
|
|
15
|
+
} from "./cli-k5c6jfzn.js";
|
|
16
16
|
import {
|
|
17
17
|
require_dist
|
|
18
|
-
} from "./cli-
|
|
18
|
+
} from "./cli-refygp3c.js";
|
|
19
19
|
import"./cli-rkndnn90.js";
|
|
20
20
|
import"./cli-b0p7rfnd.js";
|
|
21
21
|
import"./cli-5ncdb7ff.js";
|
|
@@ -27,14 +27,16 @@ import {
|
|
|
27
27
|
getMostRecentTaskInThread,
|
|
28
28
|
init_context_key,
|
|
29
29
|
init_db,
|
|
30
|
+
slackContextKey
|
|
31
|
+
} from "./cli-yr11vvst.js";
|
|
32
|
+
import {
|
|
30
33
|
init_env_flag,
|
|
31
34
|
init_resolver,
|
|
32
35
|
isEnvFlagEnabled,
|
|
33
|
-
resolveTemplate
|
|
34
|
-
|
|
35
|
-
} from "./cli-x2hk4m81.js";
|
|
36
|
+
resolveTemplate
|
|
37
|
+
} from "./cli-k1py8264.js";
|
|
36
38
|
import"./cli-z2zcxes1.js";
|
|
37
|
-
import"./cli-
|
|
39
|
+
import"./cli-8vzddbs7.js";
|
|
38
40
|
import"./cli-4j2mrzag.js";
|
|
39
41
|
import"./cli-bw80ck94.js";
|
|
40
42
|
import"./cli-xz9aq0rf.js";
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
embedScript,
|
|
3
3
|
embeddingProvider
|
|
4
|
-
} from "./cli-
|
|
5
|
-
import"./cli-
|
|
4
|
+
} from "./cli-qzy21svh.js";
|
|
5
|
+
import"./cli-ff8b5cbe.js";
|
|
6
6
|
import"./cli-q25ejbyn.js";
|
|
7
7
|
import {
|
|
8
8
|
getDb,
|
|
9
9
|
init_db
|
|
10
|
-
} from "./cli-
|
|
10
|
+
} from "./cli-yr11vvst.js";
|
|
11
|
+
import"./cli-k1py8264.js";
|
|
11
12
|
import"./cli-z2zcxes1.js";
|
|
12
|
-
import"./cli-
|
|
13
|
+
import"./cli-8vzddbs7.js";
|
|
13
14
|
import"./cli-4j2mrzag.js";
|
|
14
15
|
import"./cli-bw80ck94.js";
|
|
15
16
|
import"./cli-xz9aq0rf.js";
|
|
@@ -3,14 +3,15 @@ import {
|
|
|
3
3
|
getEmbeddingProvider,
|
|
4
4
|
getMemoryStore,
|
|
5
5
|
init_constants
|
|
6
|
-
} from "./cli-
|
|
6
|
+
} from "./cli-ff8b5cbe.js";
|
|
7
7
|
import"./cli-q25ejbyn.js";
|
|
8
8
|
import {
|
|
9
9
|
getDb,
|
|
10
10
|
init_db
|
|
11
|
-
} from "./cli-
|
|
11
|
+
} from "./cli-yr11vvst.js";
|
|
12
|
+
import"./cli-k1py8264.js";
|
|
12
13
|
import"./cli-z2zcxes1.js";
|
|
13
|
-
import"./cli-
|
|
14
|
+
import"./cli-8vzddbs7.js";
|
|
14
15
|
import"./cli-4j2mrzag.js";
|
|
15
16
|
import"./cli-bw80ck94.js";
|
|
16
17
|
import"./cli-xz9aq0rf.js";
|
|
@@ -186433,6 +186433,7 @@ async function buildCodexConfig(config, model, emit) {
|
|
|
186433
186433
|
}
|
|
186434
186434
|
|
|
186435
186435
|
class CodexSession {
|
|
186436
|
+
steeringDeliveredExternally = true;
|
|
186436
186437
|
thread;
|
|
186437
186438
|
config;
|
|
186438
186439
|
agentsMdHandle;
|
|
@@ -187044,6 +187045,7 @@ function resolveCodexRunnerArgv() {
|
|
|
187044
187045
|
}
|
|
187045
187046
|
|
|
187046
187047
|
class CodexSubprocessSession {
|
|
187048
|
+
steeringDeliveredExternally = true;
|
|
187047
187049
|
proc;
|
|
187048
187050
|
listeners = [];
|
|
187049
187051
|
eventQueue = [];
|
|
@@ -187196,7 +187198,11 @@ class CodexSubprocessSession {
|
|
|
187196
187198
|
|
|
187197
187199
|
class CodexAdapter {
|
|
187198
187200
|
name = "codex";
|
|
187199
|
-
traits = {
|
|
187201
|
+
traits = {
|
|
187202
|
+
hasMcp: true,
|
|
187203
|
+
hasLocalEnvironment: true,
|
|
187204
|
+
steerModes: ["queue"]
|
|
187205
|
+
};
|
|
187200
187206
|
skillsDir;
|
|
187201
187207
|
summarizeDeps;
|
|
187202
187208
|
bypassSubprocess;
|
|
@@ -4,15 +4,15 @@ import {
|
|
|
4
4
|
handleScheduleTrigger,
|
|
5
5
|
runScript,
|
|
6
6
|
startWorkflowExecution
|
|
7
|
-
} from "./cli-
|
|
7
|
+
} from "./cli-5a4nmfrn.js";
|
|
8
8
|
import {
|
|
9
9
|
getScript,
|
|
10
10
|
getScriptApiConnectionDescriptors,
|
|
11
11
|
getScriptMcpConnectionDescriptors
|
|
12
|
-
} from "./cli-
|
|
12
|
+
} from "./cli-dbmh9yqn.js";
|
|
13
13
|
import {
|
|
14
14
|
createTaskWithSiblingAwareness
|
|
15
|
-
} from "./cli-
|
|
15
|
+
} from "./cli-k5c6jfzn.js";
|
|
16
16
|
import {
|
|
17
17
|
getDb,
|
|
18
18
|
getDueScheduledTasks,
|
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
scheduleContextKey,
|
|
25
25
|
telemetry,
|
|
26
26
|
updateScheduledTask
|
|
27
|
-
} from "./cli-
|
|
27
|
+
} from "./cli-yr11vvst.js";
|
|
28
28
|
import {
|
|
29
29
|
__commonJS,
|
|
30
30
|
__require,
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
import {
|
|
8
8
|
ensureAuthorizationTokenOrThrow,
|
|
9
9
|
oauthAppRowToProviderConfig
|
|
10
|
-
} from "./cli-
|
|
10
|
+
} from "./cli-v292k2fv.js";
|
|
11
11
|
import {
|
|
12
12
|
getScript,
|
|
13
13
|
getScriptApiConnectionDescriptors,
|
|
@@ -15,15 +15,15 @@ import {
|
|
|
15
15
|
getScriptVersion,
|
|
16
16
|
listRelationalCredentialBindings,
|
|
17
17
|
validateScriptImports
|
|
18
|
-
} from "./cli-
|
|
18
|
+
} from "./cli-dbmh9yqn.js";
|
|
19
19
|
import {
|
|
20
20
|
getAuthorizationById,
|
|
21
21
|
getOAuthApp,
|
|
22
22
|
getOAuthAppById
|
|
23
|
-
} from "./cli-
|
|
23
|
+
} from "./cli-vvbwy286.js";
|
|
24
24
|
import {
|
|
25
25
|
withSiblingAwareness
|
|
26
|
-
} from "./cli-
|
|
26
|
+
} from "./cli-k5c6jfzn.js";
|
|
27
27
|
import {
|
|
28
28
|
getAppUrl
|
|
29
29
|
} from "./cli-dh55d5fg.js";
|
|
@@ -37,7 +37,6 @@ import {
|
|
|
37
37
|
createWorkflowRun,
|
|
38
38
|
createWorkflowRunStep,
|
|
39
39
|
createWorkflowVersion,
|
|
40
|
-
deepInterpolate,
|
|
41
40
|
exports_db,
|
|
42
41
|
getCompletedStepNodeIds,
|
|
43
42
|
getDb,
|
|
@@ -67,9 +66,7 @@ import {
|
|
|
67
66
|
init_credential_broker,
|
|
68
67
|
init_db,
|
|
69
68
|
init_telemetry,
|
|
70
|
-
init_template,
|
|
71
69
|
init_types,
|
|
72
|
-
interpolate,
|
|
73
70
|
resolveApprovalRequest,
|
|
74
71
|
resolveWaitState,
|
|
75
72
|
splitLegacyModelAlias,
|
|
@@ -77,7 +74,12 @@ import {
|
|
|
77
74
|
updateWorkflowRun,
|
|
78
75
|
updateWorkflowRunStep,
|
|
79
76
|
workflowContextKey
|
|
80
|
-
} from "./cli-
|
|
77
|
+
} from "./cli-yr11vvst.js";
|
|
78
|
+
import {
|
|
79
|
+
deepInterpolate,
|
|
80
|
+
init_template,
|
|
81
|
+
interpolate
|
|
82
|
+
} from "./cli-k1py8264.js";
|
|
81
83
|
import {
|
|
82
84
|
init_secret_scrubber,
|
|
83
85
|
isSensitiveKey,
|
|
@@ -2627,7 +2629,7 @@ class HumanInTheLoopExecutor extends BaseExecutor {
|
|
|
2627
2629
|
}
|
|
2628
2630
|
if (notification.channel === "slack") {
|
|
2629
2631
|
try {
|
|
2630
|
-
const { getSlackApp } = await import("./app-
|
|
2632
|
+
const { getSlackApp } = await import("./app-xbt4n4mt.js");
|
|
2631
2633
|
const slackApp = getSlackApp();
|
|
2632
2634
|
if (!slackApp) {
|
|
2633
2635
|
console.warn("[HITL] Slack not initialized — cannot send notification");
|
|
@@ -2741,7 +2743,7 @@ class NotifyExecutor extends BaseExecutor {
|
|
|
2741
2743
|
}
|
|
2742
2744
|
}
|
|
2743
2745
|
case "slack": {
|
|
2744
|
-
const { getSlackApp } = await import("./app-
|
|
2746
|
+
const { getSlackApp } = await import("./app-xbt4n4mt.js");
|
|
2745
2747
|
const app = getSlackApp();
|
|
2746
2748
|
if (!app) {
|
|
2747
2749
|
return {
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
getScriptApiTypes,
|
|
3
3
|
getScriptMcpTypes,
|
|
4
4
|
require_typescript
|
|
5
|
-
} from "./cli-
|
|
5
|
+
} from "./cli-dbmh9yqn.js";
|
|
6
6
|
import {
|
|
7
7
|
deleteSwarmConfigByKey,
|
|
8
8
|
getAgentById,
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
getSwarmConfigs,
|
|
12
12
|
init_db,
|
|
13
13
|
upsertSwarmConfig
|
|
14
|
-
} from "./cli-
|
|
14
|
+
} from "./cli-yr11vvst.js";
|
|
15
15
|
import {
|
|
16
16
|
init_secret_scrubber,
|
|
17
17
|
scrubSecrets
|
|
@@ -457,7 +457,7 @@ export interface SwarmSdk {
|
|
|
457
457
|
// --- workflows ---
|
|
458
458
|
workflow_list(args?: { enabled?: boolean; includeFull?: boolean; consecutiveErrorsMin?: number; lastRunStatus?: "running" | "waiting" | "completed" | "failed" | "skipped" | "cancelled" }): Promise<unknown>;
|
|
459
459
|
workflow_get(args: { id: string }): Promise<unknown>;
|
|
460
|
-
workflow_listRuns(args: { workflowId: string; status?: "running" | "waiting" | "completed" | "failed" | "skipped" | "cancelled" }): Promise<unknown>;
|
|
460
|
+
workflow_listRuns(args: { workflowId: string; status?: "running" | "waiting" | "completed" | "failed" | "skipped" | "cancelled"; limit?: number; offset?: number }): Promise<unknown>;
|
|
461
461
|
workflow_getRun(args: { id: string }): Promise<unknown>;
|
|
462
462
|
// --- prompt templates ---
|
|
463
463
|
prompt_list(args?: { eventType?: string; scope?: "global" | "agent" | "repo"; scopeId?: string; isDefault?: boolean }): Promise<unknown>;
|
|
@@ -650,6 +650,8 @@ export interface ScriptContext {
|
|
|
650
650
|
* A swarm script's default export. \`args\` comes FIRST, \`ctx\` second — never swap them.
|
|
651
651
|
*
|
|
652
652
|
* @example
|
|
653
|
+
* import type { ScriptContext } from "swarm-sdk";
|
|
654
|
+
*
|
|
653
655
|
* export default async function (args: { name: string }, ctx: ScriptContext) {
|
|
654
656
|
* await ctx.logger.log(\`hello \${args.name}\`);
|
|
655
657
|
* return { ok: true };
|
|
@@ -1161,17 +1163,15 @@ void _scriptMain;
|
|
|
1161
1163
|
});
|
|
1162
1164
|
if (diagnostics.length === 0)
|
|
1163
1165
|
return { ok: true };
|
|
1164
|
-
const
|
|
1166
|
+
const formatHost = {
|
|
1165
1167
|
getCanonicalFileName: (fileName) => fileName,
|
|
1166
1168
|
getCurrentDirectory: () => "/virtual",
|
|
1167
1169
|
getNewLine: () => `
|
|
1168
1170
|
`
|
|
1169
|
-
}
|
|
1171
|
+
};
|
|
1170
1172
|
return {
|
|
1171
1173
|
ok: false,
|
|
1172
|
-
diagnostics:
|
|
1173
|
-
|
|
1174
|
-
`).filter(Boolean),
|
|
1174
|
+
diagnostics: diagnostics.map((diagnostic) => import_typescript.default.formatDiagnosticsWithColorAndContext([diagnostic], formatHost).trimEnd()),
|
|
1175
1175
|
structured: diagnostics.map(toStructured)
|
|
1176
1176
|
};
|
|
1177
1177
|
}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createAdditiveBuffer,
|
|
3
3
|
extractSlackMessageText
|
|
4
|
-
} from "./cli-
|
|
4
|
+
} from "./cli-zhp3t49e.js";
|
|
5
5
|
import {
|
|
6
6
|
rewriteSlackMentions
|
|
7
|
-
} from "./cli-
|
|
7
|
+
} from "./cli-pqtrhrss.js";
|
|
8
8
|
import {
|
|
9
9
|
createTaskWithSiblingAwareness
|
|
10
|
-
} from "./cli-
|
|
10
|
+
} from "./cli-k5c6jfzn.js";
|
|
11
11
|
import {
|
|
12
12
|
getSlackApp,
|
|
13
13
|
registerTreeMessage
|
|
14
|
-
} from "./cli-
|
|
14
|
+
} from "./cli-refygp3c.js";
|
|
15
15
|
import {
|
|
16
16
|
buildBufferFlushBlocks
|
|
17
17
|
} from "./cli-5ncdb7ff.js";
|
|
@@ -22,14 +22,16 @@ import {
|
|
|
22
22
|
getMostRecentTaskInThread,
|
|
23
23
|
init_context_key,
|
|
24
24
|
init_db,
|
|
25
|
-
init_registry,
|
|
26
25
|
init_steering,
|
|
27
|
-
init_steering_enabled,
|
|
28
|
-
isSteeringEnabled,
|
|
29
|
-
registerTemplate,
|
|
30
26
|
requestSteering,
|
|
31
27
|
slackContextKey
|
|
32
|
-
} from "./cli-
|
|
28
|
+
} from "./cli-yr11vvst.js";
|
|
29
|
+
import {
|
|
30
|
+
init_registry,
|
|
31
|
+
init_steering_enabled,
|
|
32
|
+
isSteeringEnabled,
|
|
33
|
+
registerTemplate
|
|
34
|
+
} from "./cli-k1py8264.js";
|
|
33
35
|
|
|
34
36
|
// src/slack/event-dedup.ts
|
|
35
37
|
var DEFAULT_TTL_MS = 300000;
|
|
@@ -7,7 +7,7 @@ var package_default;
|
|
|
7
7
|
var init_package = __esm(() => {
|
|
8
8
|
package_default = {
|
|
9
9
|
name: "@desplega.ai/agent-swarm",
|
|
10
|
-
version: "1.
|
|
10
|
+
version: "1.125.0",
|
|
11
11
|
description: "Multi-agent orchestration for Claude Code, Codex, Gemini CLI, and other AI coding assistants",
|
|
12
12
|
license: "MIT",
|
|
13
13
|
author: "desplega.sh <contact@desplega.sh>",
|
|
@@ -72,6 +72,7 @@ var init_package = __esm(() => {
|
|
|
72
72
|
"mono:test": "turbo run test",
|
|
73
73
|
"mono:lint": "turbo run lint",
|
|
74
74
|
"mono:dev": "turbo run dev",
|
|
75
|
+
"test:root": "bash scripts/run-bun-tests.sh",
|
|
75
76
|
prepack: "bun run build:cli",
|
|
76
77
|
"tsc:check": "bun tsc --noEmit",
|
|
77
78
|
"check:db-boundary": "bash scripts/check-db-boundary.sh",
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
buildModelsDevSeedRows,
|
|
3
3
|
loadModelsDevCache
|
|
4
|
-
} from "./cli-
|
|
4
|
+
} from "./cli-q92pr3rt.js";
|
|
5
5
|
import {
|
|
6
6
|
createLogEntry,
|
|
7
7
|
getActivePricingRow,
|
|
8
8
|
getDb,
|
|
9
9
|
init_db,
|
|
10
10
|
insertPricingRow
|
|
11
|
-
} from "./cli-
|
|
11
|
+
} from "./cli-yr11vvst.js";
|
|
12
12
|
import {
|
|
13
13
|
init_secret_scrubber,
|
|
14
14
|
scrubSecrets
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./cli-jkhwmmgg.js";
|
|
4
4
|
import {
|
|
5
5
|
embedScript
|
|
6
|
-
} from "./cli-
|
|
6
|
+
} from "./cli-qzy21svh.js";
|
|
7
7
|
import {
|
|
8
8
|
calculatePKCECodeChallenge,
|
|
9
9
|
generateRandomCodeVerifier,
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
getOAuthAppById,
|
|
13
13
|
updateAuthorizationTokens,
|
|
14
14
|
upsertAuthorization
|
|
15
|
-
} from "./cli-
|
|
15
|
+
} from "./cli-vvbwy286.js";
|
|
16
16
|
import {
|
|
17
17
|
computeContentHash,
|
|
18
18
|
decryptSecret,
|
|
@@ -25,12 +25,14 @@ import {
|
|
|
25
25
|
init_crypto,
|
|
26
26
|
init_date_utils,
|
|
27
27
|
init_db,
|
|
28
|
-
init_env_flag,
|
|
29
|
-
isEnvFlagEnabled,
|
|
30
28
|
normalizeDateRequired,
|
|
31
29
|
placeholderForConfigKey,
|
|
32
30
|
upsertSwarmConfig
|
|
33
|
-
} from "./cli-
|
|
31
|
+
} from "./cli-yr11vvst.js";
|
|
32
|
+
import {
|
|
33
|
+
init_env_flag,
|
|
34
|
+
isEnvFlagEnabled
|
|
35
|
+
} from "./cli-k1py8264.js";
|
|
34
36
|
import {
|
|
35
37
|
init_secret_scrubber,
|
|
36
38
|
refreshSecretScrubberCache,
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
import {
|
|
2
|
+
renderSteeringDelivery
|
|
3
|
+
} from "./cli-wdrrgv4m.js";
|
|
1
4
|
import {
|
|
2
5
|
checkCodexCredentials
|
|
3
|
-
} from "./cli-
|
|
6
|
+
} from "./cli-3y8xyp0b.js";
|
|
4
7
|
import {
|
|
5
8
|
checkClaudeManagedCredentials
|
|
6
9
|
} from "./cli-jj1arm18.js";
|
|
@@ -19,7 +22,7 @@ import {
|
|
|
19
22
|
withSpan,
|
|
20
23
|
withSpanContext,
|
|
21
24
|
writeSkillsToFilesystem
|
|
22
|
-
} from "./cli-
|
|
25
|
+
} from "./cli-wbcsjpyv.js";
|
|
23
26
|
import {
|
|
24
27
|
authJsonToCredentialSelection,
|
|
25
28
|
credentialsToAuthJson,
|
|
@@ -41,10 +44,10 @@ import {
|
|
|
41
44
|
import {
|
|
42
45
|
ensure,
|
|
43
46
|
initialize
|
|
44
|
-
} from "./cli-
|
|
47
|
+
} from "./cli-4xft7caa.js";
|
|
45
48
|
import {
|
|
46
49
|
validateJsonSchema
|
|
47
|
-
} from "./cli-
|
|
50
|
+
} from "./cli-5a4nmfrn.js";
|
|
48
51
|
import {
|
|
49
52
|
getApiKey
|
|
50
53
|
} from "./cli-f14fvzag.js";
|
|
@@ -66,26 +69,28 @@ import {
|
|
|
66
69
|
} from "./cli-dh55d5fg.js";
|
|
67
70
|
import {
|
|
68
71
|
ProviderNameSchema,
|
|
69
|
-
configureHttpResolver,
|
|
70
72
|
generateDefaultClaudeMd,
|
|
71
73
|
generateDefaultIdentityMd,
|
|
72
74
|
generateDefaultSoulMd,
|
|
73
75
|
generateDefaultToolsMd,
|
|
74
76
|
initTelemetry,
|
|
75
77
|
init_defaults,
|
|
78
|
+
init_telemetry,
|
|
79
|
+
init_templates,
|
|
80
|
+
init_types,
|
|
81
|
+
resolveTaskModelSelection,
|
|
82
|
+
telemetry
|
|
83
|
+
} from "./cli-yr11vvst.js";
|
|
84
|
+
import {
|
|
85
|
+
configureHttpResolver,
|
|
76
86
|
init_resolver,
|
|
77
87
|
init_session_templates,
|
|
78
88
|
init_steering_enabled,
|
|
79
|
-
init_telemetry,
|
|
80
89
|
init_template,
|
|
81
|
-
init_templates,
|
|
82
|
-
init_types,
|
|
83
90
|
interpolate,
|
|
84
91
|
isSteeringEnabled,
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
telemetry
|
|
88
|
-
} from "./cli-x2hk4m81.js";
|
|
92
|
+
resolveTemplateAsync
|
|
93
|
+
} from "./cli-k1py8264.js";
|
|
89
94
|
import {
|
|
90
95
|
init_credentials,
|
|
91
96
|
resolveCredentialPools
|
|
@@ -473,7 +478,7 @@ async function createProviderAdapter(provider) {
|
|
|
473
478
|
return new PiMonoAdapter;
|
|
474
479
|
}
|
|
475
480
|
case "codex": {
|
|
476
|
-
const { CodexAdapter } = await import("./codex-adapter-
|
|
481
|
+
const { CodexAdapter } = await import("./codex-adapter-mqczt8xv.js");
|
|
477
482
|
return new CodexAdapter;
|
|
478
483
|
}
|
|
479
484
|
case "claude-managed": {
|
|
@@ -1760,20 +1765,11 @@ function createSteeringDispatchState() {
|
|
|
1760
1765
|
outcomes: new Map
|
|
1761
1766
|
};
|
|
1762
1767
|
}
|
|
1763
|
-
async function renderSteeringDelivery(steeringMessageId, body) {
|
|
1764
|
-
try {
|
|
1765
|
-
const result = await resolveTemplateAsync("system.agent.steering.delivery", {
|
|
1766
|
-
steeringMessageId,
|
|
1767
|
-
body
|
|
1768
|
-
});
|
|
1769
|
-
return result.skipped || !result.text.trim() ? body : result.text;
|
|
1770
|
-
} catch {
|
|
1771
|
-
return body;
|
|
1772
|
-
}
|
|
1773
|
-
}
|
|
1774
1768
|
async function pollAndDispatchSteering(config, taskId, session, state, fetchImpl = fetch) {
|
|
1775
1769
|
if (!isSteeringEnabled())
|
|
1776
1770
|
return;
|
|
1771
|
+
if (session.steeringDeliveredExternally)
|
|
1772
|
+
return;
|
|
1777
1773
|
const headers = {
|
|
1778
1774
|
Authorization: `Bearer ${config.apiKey}`,
|
|
1779
1775
|
"X-Agent-ID": config.agentId
|