@desplega.ai/agent-swarm 1.165.0 → 1.166.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/dist/{acp-adapter-w6zws6me.js → acp-adapter-yzfxn8vj.js} +4 -4
- package/dist/{actions-jna0b3wm.js → actions-qz3m692w.js} +20 -24
- package/dist/{amp-adapter-0eve81pz.js → amp-adapter-j1xbmsqz.js} +4 -4
- package/dist/{app-75hm5cfa.js → app-43vrdmv8.js} +6 -7
- package/dist/{assistant-yzd51j33.js → assistant-ertffmka.js} +21 -25
- package/dist/{boot-reembed-z158xq32.js → boot-reembed-998jtpdg.js} +9 -12
- package/dist/{boot-reembed-2ex2mcsh.js → boot-reembed-s7k7c6v2.js} +10 -12
- package/dist/boot-scrub-sweep-nepsk4t1.js +211 -0
- package/dist/{boot-seeds-2bmnh18p.js → boot-seeds-vvzs1zhk.js} +8 -8
- package/dist/{claude-adapter-jbj1mycz.js → claude-adapter-2zvmekrp.js} +9 -11
- package/dist/{claude-managed-adapter-17ggz09t.js → claude-managed-adapter-s49wbk8t.js} +3 -3
- package/dist/{claude-managed-setup-ptm1nzm2.js → claude-managed-setup-cvhqq8qn.js} +4 -4
- package/dist/{claude-sdk-session-9re1g7r2.js → claude-sdk-session-kkbxtw5q.js} +2618 -2600
- package/dist/{cli-k6xx3pve.js → cli-0nhdwxd5.js} +4 -4
- package/dist/{cli-n9ehc28t.js → cli-0qjcsxgz.js} +4 -4
- package/dist/{cli-zn2v3t8v.js → cli-3ddybbbx.js} +1 -1
- package/dist/{cli-5anb0ev3.js → cli-3qn4r334.js} +71 -14
- package/dist/{cli-1kzfvd1z.js → cli-4r1sjfc4.js} +9 -5
- package/dist/{cli-ba66wyhy.js → cli-66zh26sp.js} +6 -6
- package/dist/{cli-9xb89xca.js → cli-68r1j4sg.js} +6 -6
- package/dist/{cli-xnzrzets.js → cli-8kgvmkak.js} +2 -2
- package/dist/{cli-28smfvbn.js → cli-8t229cmr.js} +5 -5
- package/dist/{cli-9866bd07.js → cli-aqcey741.js} +1 -1
- package/dist/{cli-90v942q1.js → cli-cpfmqz3n.js} +8 -8
- package/dist/{cli-50eg13rj.js → cli-df56tqdw.js} +459 -282
- package/dist/{cli-8gpbwy09.js → cli-dw2q9f7g.js} +5 -5
- package/dist/{cli-0n4fasz0.js → cli-ecknp7p1.js} +15 -15
- package/dist/{cli-xb3c6aat.js → cli-f2n17zhp.js} +1 -1
- package/dist/{cli-ftry7975.js → cli-feh3dkah.js} +1 -1
- package/dist/{cli-amwhs8h2.js → cli-fn697bnt.js} +2 -2
- package/dist/{cli-prt9emct.js → cli-gt8azyet.js} +3 -3
- package/dist/{cli-59jn5twa.js → cli-h3x613ze.js} +2 -2
- package/dist/{cli-mmzwwptd.js → cli-hf5s9pgf.js} +1 -1
- package/dist/cli-j2jbr8af.js +516 -0
- package/dist/{cli-wfajtmf7.js → cli-jhm6hzjn.js} +593 -10
- package/dist/{cli-xtgtyafv.js → cli-jvj6a0cv.js} +190 -439
- package/dist/{cli-hpryr6em.js → cli-mb75wpxf.js} +1 -1
- package/dist/{cli-420bdgw0.js → cli-mv2520nm.js} +1 -1
- package/dist/{cli-pjxnr1jn.js → cli-mwegs4af.js} +3 -3
- package/dist/{cli-5b2fjjzh.js → cli-p4ztb80h.js} +2 -2
- package/dist/{cli-e7t4snpa.js → cli-rggdq8wq.js} +4 -4
- package/dist/{cli-bdv39kgj.js → cli-rsy933yz.js} +5 -5
- package/dist/{cli-gh5yqzpe.js → cli-v2a8x45d.js} +2 -2
- package/dist/{cli-bns5c8k9.js → cli-vzc73wet.js} +43 -47
- package/dist/cli-wt7ccy4r.js +2654 -0
- package/dist/{cli-j0pdrmwg.js → cli-x7kpr72a.js} +3 -3
- package/dist/{cli-x7afk5wm.js → cli-xvc3q9br.js} +1 -1
- package/dist/{cli-9s3h836g.js → cli-xvdgasgy.js} +1 -1
- package/dist/{cli-zvckv750.js → cli-y59h2pk9.js} +2 -2
- package/dist/{cli-qdv8kgz7.js → cli-yshaazs1.js} +13884 -3241
- package/dist/{cli-nfygw434.js → cli-ysnyhws9.js} +2 -2
- package/dist/{cli-fw6vdcq5.js → cli-zp67qg5x.js} +34 -1
- package/dist/{cli-ma3zvh39.js → cli-zy7vwsne.js} +6066 -5829
- package/dist/cli.js +24 -20
- package/dist/{codex-adapter-3qnxshje.js → codex-adapter-dw1wxqt8.js} +7 -7
- package/dist/{codex-login-brkxhhdg.js → codex-login-terbdsqq.js} +2 -2
- package/dist/{codex-session-runner-612wnapp.js → codex-session-runner-3cgb8y1g.js} +7 -7
- package/dist/{commands-2ybfcxkj.js → commands-mhxam6z2.js} +6 -6
- package/dist/{cursor-adapter-p3jgdehv.js → cursor-adapter-2qda3st7.js} +3 -3
- package/dist/{db-f4ans0jj.js → db-sjks418k.js} +8 -6
- package/dist/{devin-adapter-dhzt01ff.js → devin-adapter-bffjj5n4.js} +2 -2
- package/dist/{dispatcher-pk182apd.js → dispatcher-1es759rn.js} +18 -22
- package/dist/{dsh-adapter-7twaeps1.js → dsh-adapter-bek4cyw9.js} +3 -3
- package/dist/{e2b-y8t3jzyz.js → e2b-nd50eccg.js} +1 -1
- package/dist/{event-bus-w7ac4n3c.js → event-bus-vnfthafg.js} +2 -2
- package/dist/{grok-adapter-yt9pab3k.js → grok-adapter-ar9cw9jg.js} +5 -5
- package/dist/{handlers-g2wnr4t9.js → handlers-1gkbhktr.js} +21 -25
- package/dist/{hook-f7jt9vnm.js → hook-ds2zxq9v.js} +14 -16
- package/dist/{hook-bbdpnkb4.js → hook-vxa3tcsy.js} +8 -10
- package/dist/{http-w40q4w94.js → http-3h21z9md.js} +247 -164
- package/dist/{index-056j5kzn.js → index-9b65j1m5.js} +8 -8
- package/dist/{index-9bfssf54.js → index-bn6cy8ps.js} +18 -22
- package/dist/{index-cj1r9q83.js → index-dkfxpkmm.js} +19 -23
- package/dist/{index-7n70jwbb.js → index-f8xnqrye.js} +19 -21
- package/dist/{index-fdk1t4d6.js → index-n0rxa4ca.js} +11962 -9900
- package/dist/{index-k8xc083e.js → index-n99fycq7.js} +18 -22
- package/dist/{keepalive-1tj10tf4.js → keepalive-3xspa9jw.js} +11 -8
- package/dist/{lead-st0bg7v4.js → lead-6qphc124.js} +34 -38
- package/dist/{maintenance-nz71zats.js → maintenance-0teem1bb.js} +7 -9
- package/dist/{node-f0ykebbv.js → node-9sg7ajby.js} +25 -7
- package/dist/{oauth-refresh-sweep-aefzwvvq.js → oauth-refresh-sweep-sh9q25xp.js} +10 -7
- package/dist/{onboard-kgpr9mbn.js → onboard-54qmnqxe.js} +2 -2
- package/dist/{opencode-adapter-0c8e70dk.js → opencode-adapter-wjfa2wvd.js} +2 -2
- package/dist/{otel-impl-x8zp4y5a.js → otel-impl-ycqzp2a1.js} +2 -2
- package/dist/{pi-mono-adapter-t280ah5c.js → pi-mono-adapter-e77e9zst.js} +4 -4
- package/dist/{pricing-refresh-9e0q7cwk.js → pricing-refresh-atnkngqs.js} +7 -7
- package/dist/{rbac-roles-kcp6zge2.js → rbac-roles-9pjphh9q.js} +6 -6
- package/dist/{rbac-roles-790j3ga8.js → rbac-roles-j78wdksm.js} +6 -6
- package/dist/{render-v2-tch4nefj.js → render-v2-pxjs49fx.js} +6 -7
- package/dist/{setup-rcm303ns.js → setup-ymej0xtx.js} +2 -2
- package/dist/{work-objects-ctg7t70w.js → work-objects-3nh4ymzb.js} +22 -26
- package/dist/{worker-5dp0xm55.js → worker-qa9fkz5s.js} +34 -38
- package/dist/{x-v3yw66zs.js → x-ma4gnfgy.js} +2 -2
- package/openapi.json +5 -2
- package/package.json +9 -5
- package/src/be/automation-preflight.ts +9 -4
- package/src/be/boot-scrub-sweep.ts +302 -0
- package/src/be/crypto/key-bootstrap.ts +1 -1
- package/src/be/db/approvals.ts +15 -1
- package/src/be/db/codex-oauth-device-flows.ts +40 -0
- package/src/be/db/config-secrets.ts +31 -0
- package/src/be/db/runtime.ts +4 -0
- package/src/be/db/script-runs.ts +15 -0
- package/src/be/db/tasks/write.ts +1 -1
- package/src/be/db-queries/mcp-oauth.ts +5 -0
- package/src/be/db-queries/oauth.ts +77 -0
- package/src/be/db.ts +162 -59
- package/src/be/events.ts +17 -1
- package/src/be/memory/index-content.ts +2 -2
- package/src/be/memory/providers/sqlite-store.ts +63 -11
- package/src/be/memory/types.ts +14 -0
- package/src/be/migrations/201_workflow_replay_columns.sql +10 -0
- package/src/be/migrations/202_codex_oauth_device_flows.sql +24 -0
- package/src/be/scripts/db.ts +28 -4
- package/src/be/scripts/source-secrets.ts +37 -0
- package/src/be/scrub-json.ts +32 -0
- package/src/be/sealed-json.ts +59 -0
- package/src/be/secret-registry.ts +131 -0
- package/src/be/workflow-replay.ts +77 -0
- package/src/http/codex-oauth-device.ts +8 -10
- package/src/http/db-query-bounded.ts +3 -0
- package/src/http/db-query-shared.ts +107 -15
- package/src/http/db-query.ts +10 -2
- package/src/http/index.ts +23 -6
- package/src/http/script-runs.ts +9 -1
- package/src/http/scripts.ts +15 -0
- package/src/http/workflows.ts +3 -2
- package/src/oauth/mcp-wrapper.ts +1 -1
- package/src/providers/acp-adapter.ts +25 -11
- package/src/providers/acp-target-catalog.ts +35 -1
- package/src/providers/acp-targets.ts +69 -3
- package/src/providers/amp-adapter.ts +1 -1
- package/src/providers/cursor-adapter.ts +1 -1
- package/src/script-workflows/supervisor.ts +11 -2
- package/src/scripts-runtime/eval-harness.ts +2 -12
- package/src/scripts-runtime/executors/quickjs-bundle.ts +152 -0
- package/src/scripts-runtime/executors/quickjs-prelude.ts +285 -0
- package/src/scripts-runtime/executors/quickjs-runner.ts +580 -0
- package/src/scripts-runtime/executors/quickjs-worker.ts +81 -0
- package/src/scripts-runtime/executors/quickjs.ts +196 -0
- package/src/scripts-runtime/executors/registry.ts +2 -0
- package/src/scripts-runtime/executors/sourcemap.ts +79 -0
- package/src/scripts-runtime/script-error-hints.ts +14 -0
- package/src/server.ts +3 -1
- package/src/tests/acp-adapter.test.ts +127 -2
- package/src/tests/boot-scrub-sweep.test.ts +390 -0
- package/src/tests/check-text-columns.test.ts +145 -0
- package/src/tests/claude-sdk-process.fixture.ts +13 -2
- package/src/tests/codex-oauth-device.test.ts +23 -37
- package/src/tests/db-query-denylist.test.ts +202 -0
- package/src/tests/db-task-read-contract.test.ts +1 -0
- package/src/tests/db-task-write-contract.test.ts +1 -0
- package/src/tests/entrypoint-acp-target-binary.test.ts +31 -1
- package/src/tests/events-scrub.test.ts +88 -0
- package/src/tests/fixtures/secret-corpus.ts +320 -0
- package/src/tests/script-connections.test.ts +5 -0
- package/src/tests/script-executor-conformance.test.ts +3 -0
- package/src/tests/script-executor-quickjs.test.ts +442 -0
- package/src/tests/script-executor-registry.test.ts +6 -1
- package/src/tests/script-runs-http.test.ts +88 -1
- package/src/tests/script-runs-scrub.test.ts +275 -0
- package/src/tests/scripts-http.test.ts +82 -1
- package/src/tests/scrubbed-text-12e.test.ts +289 -0
- package/src/tests/sealed-key-guard.test.ts +166 -0
- package/src/tests/secret-canary-sweep.test.ts +958 -0
- package/src/tests/secret-registry.test.ts +355 -0
- package/src/tests/secret-rules.test.ts +230 -0
- package/src/tests/secret-scrubber.test.ts +3 -2
- package/src/tests/workflow-replay.test.ts +518 -0
- package/src/tests/workflow-scrub.test.ts +242 -0
- package/src/tools/db-query.ts +1 -1
- package/src/tools/inject-learning.ts +1 -1
- package/src/tools/workflows/get-workflow-run.ts +3 -2
- package/src/types.ts +1 -1
- package/src/utils/secret-rules.generated.ts +2055 -0
- package/src/utils/secret-scrubber.ts +363 -29
- package/src/workflows/engine.ts +39 -4
- package/src/workflows/recovery.ts +10 -1
- package/src/workflows/resume.ts +62 -3
- package/src/workflows/retry-poller.ts +3 -0
- package/dist/boot-scrub-logs-246yn076.js +0 -99
- package/dist/cli-3a4m1aws.js +0 -572
- package/dist/cli-a87b04k8.js +0 -951
- package/dist/cli-cvk6yzw5.js +0 -40
- package/dist/cli-h1spv8v4.js +0 -427
- package/dist/cli-jqt9hrnz.js +0 -168
- package/dist/cli-yhmwmv0g.js +0 -9281
- package/src/be/boot-scrub-logs.ts +0 -132
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
seedPricingFromModelsDev
|
|
3
|
-
} from "./cli-
|
|
3
|
+
} from "./cli-ysnyhws9.js";
|
|
4
4
|
import {
|
|
5
5
|
ensureRbacSeedsSynced,
|
|
6
6
|
init_rbac_roles
|
|
7
|
-
} from "./cli-
|
|
7
|
+
} from "./cli-8kgvmkak.js";
|
|
8
8
|
import {
|
|
9
9
|
getDb,
|
|
10
|
-
init_db
|
|
11
|
-
} from "./cli-
|
|
10
|
+
init_db1 as init_db
|
|
11
|
+
} from "./cli-yshaazs1.js";
|
|
12
12
|
|
|
13
13
|
// src/be/boot-seeds.ts
|
|
14
14
|
init_db();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
runStopHookSessionSummarySubprocess
|
|
3
|
-
} from "./cli-
|
|
3
|
+
} from "./cli-rsy933yz.js";
|
|
4
4
|
import {
|
|
5
5
|
buildOtelTraceparentEnv,
|
|
6
6
|
isHarnessOtelEnabled
|
|
@@ -44,7 +44,7 @@ import {
|
|
|
44
44
|
import {
|
|
45
45
|
init_file_lock,
|
|
46
46
|
withFileLock
|
|
47
|
-
} from "./cli-
|
|
47
|
+
} from "./cli-jhm6hzjn.js";
|
|
48
48
|
import {
|
|
49
49
|
CLAUDE_CREDENTIALS_HINT,
|
|
50
50
|
init_credentials,
|
|
@@ -63,7 +63,7 @@ import {
|
|
|
63
63
|
import {
|
|
64
64
|
init_secret_scrubber,
|
|
65
65
|
scrubSecrets
|
|
66
|
-
} from "./cli-
|
|
66
|
+
} from "./cli-wt7ccy4r.js";
|
|
67
67
|
import {
|
|
68
68
|
require_src
|
|
69
69
|
} from "./cli-knd276ed.js";
|
|
@@ -1026,7 +1026,7 @@ class ClaudeAdapter {
|
|
|
1026
1026
|
if (transport === "sdk" && isClaudeBridgeEffective(sourceEnv)) {
|
|
1027
1027
|
throw new Error("CLAUDE_TRANSPORT=sdk cannot run with an effective Claude Bridge configuration. Select CLI transport or disable the bridge.");
|
|
1028
1028
|
}
|
|
1029
|
-
const claudeSdk = transport === "sdk" ? await import("./claude-sdk-session-
|
|
1029
|
+
const claudeSdk = transport === "sdk" ? await import("./claude-sdk-session-kkbxtw5q.js") : undefined;
|
|
1030
1030
|
claudeSdk?.validateClaudeSdkAdditionalArgs([
|
|
1031
1031
|
...claudeBinaryArgv.slice(1),
|
|
1032
1032
|
...config.additionalArgs ?? []
|
|
@@ -6,9 +6,10 @@ import {
|
|
|
6
6
|
fetchInstalledMcpServers
|
|
7
7
|
} from "./cli-tng3131n.js";
|
|
8
8
|
import {
|
|
9
|
+
ACP_TARGET_IDS,
|
|
9
10
|
getAcpTargetCatalogEntry,
|
|
10
11
|
isAcpTarget
|
|
11
|
-
} from "./cli-
|
|
12
|
+
} from "./cli-zp67qg5x.js";
|
|
12
13
|
import {
|
|
13
14
|
applyReasoningEffort
|
|
14
15
|
} from "./cli-ttbsse3f.js";
|
|
@@ -40,11 +41,11 @@ import {
|
|
|
40
41
|
import {
|
|
41
42
|
init_package,
|
|
42
43
|
package_default
|
|
43
|
-
} from "./cli-
|
|
44
|
+
} from "./cli-4r1sjfc4.js";
|
|
44
45
|
import {
|
|
45
46
|
init_secret_scrubber,
|
|
46
47
|
scrubSecrets
|
|
47
|
-
} from "./cli-
|
|
48
|
+
} from "./cli-wt7ccy4r.js";
|
|
48
49
|
|
|
49
50
|
// node_modules/@agentclientprotocol/sdk/dist/schema/index.js
|
|
50
51
|
var AGENT_METHODS = {
|
|
@@ -4728,7 +4729,7 @@ function translateAcpSessionNotification(notification) {
|
|
|
4728
4729
|
|
|
4729
4730
|
// src/providers/acp-targets.ts
|
|
4730
4731
|
init_src();
|
|
4731
|
-
import { mkdtemp } from "node:fs/promises";
|
|
4732
|
+
import { mkdir, mkdtemp, rm } from "node:fs/promises";
|
|
4732
4733
|
import { tmpdir } from "node:os";
|
|
4733
4734
|
import { join } from "node:path";
|
|
4734
4735
|
class AcpTargetResolutionError extends Error {
|
|
@@ -4904,6 +4905,46 @@ var geminiTargetProfile = {
|
|
|
4904
4905
|
geminiSystemPromptPaths.set(config, path);
|
|
4905
4906
|
}
|
|
4906
4907
|
};
|
|
4908
|
+
function copilotInstructionsDir(config) {
|
|
4909
|
+
const key = new Bun.CryptoHasher("sha256").update(`${config.agentId}:${config.taskId}:${config.cwd}`).digest("hex").slice(0, 16);
|
|
4910
|
+
return join(tmpdir(), "agent-swarm-copilot-instructions", key);
|
|
4911
|
+
}
|
|
4912
|
+
var COPILOT_INSTRUCTIONS_FILE = join(".github", "instructions", "agent-swarm.instructions.md");
|
|
4913
|
+
var copilotTargetProfile = {
|
|
4914
|
+
target: "copilot",
|
|
4915
|
+
command() {
|
|
4916
|
+
const entry = getAcpTargetCatalogEntry("copilot");
|
|
4917
|
+
return [entry.command, ...entry.args ?? []];
|
|
4918
|
+
},
|
|
4919
|
+
env(config) {
|
|
4920
|
+
const env = baseTargetEnv(config);
|
|
4921
|
+
const entry = getAcpTargetCatalogEntry("copilot");
|
|
4922
|
+
copyEnvKeys(config, env, entry.envKeys);
|
|
4923
|
+
if (config.model.trim())
|
|
4924
|
+
env.COPILOT_MODEL = config.model.trim();
|
|
4925
|
+
env.COPILOT_AUTO_UPDATE = "false";
|
|
4926
|
+
const operatorDirs = readEnv(config, "COPILOT_CUSTOM_INSTRUCTIONS_DIRS")?.trim();
|
|
4927
|
+
env.COPILOT_CUSTOM_INSTRUCTIONS_DIRS = [copilotInstructionsDir(config), operatorDirs].filter(Boolean).join(",");
|
|
4928
|
+
return env;
|
|
4929
|
+
},
|
|
4930
|
+
configuredOptions,
|
|
4931
|
+
async writeSystemPromptArtifact(config) {
|
|
4932
|
+
const dir = copilotInstructionsDir(config);
|
|
4933
|
+
await rm(dir, { recursive: true, force: true });
|
|
4934
|
+
if (!config.systemPrompt)
|
|
4935
|
+
return;
|
|
4936
|
+
await mkdir(join(dir, ".github", "instructions"), { recursive: true });
|
|
4937
|
+
await Bun.write(join(dir, COPILOT_INSTRUCTIONS_FILE), `---
|
|
4938
|
+
applyTo: "**"
|
|
4939
|
+
---
|
|
4940
|
+
|
|
4941
|
+
${config.systemPrompt}
|
|
4942
|
+
`);
|
|
4943
|
+
},
|
|
4944
|
+
async cleanupSystemPromptArtifact(config) {
|
|
4945
|
+
await rm(copilotInstructionsDir(config), { recursive: true, force: true });
|
|
4946
|
+
}
|
|
4947
|
+
};
|
|
4907
4948
|
var GROK_ISOLATION_ENV = {
|
|
4908
4949
|
GROK_DISABLE_AUTOUPDATER: "1",
|
|
4909
4950
|
GROK_TELEMETRY_ENABLED: "0",
|
|
@@ -5067,13 +5108,15 @@ var grokTargetProfile = {
|
|
|
5067
5108
|
function resolveAcpTarget(config) {
|
|
5068
5109
|
const target = readEnv(config, "ACP_TARGET") ?? "custom";
|
|
5069
5110
|
if (!isAcpTarget(target)) {
|
|
5070
|
-
throw new AcpTargetResolutionError(`Unsupported ACP target "${target}". Supported targets:
|
|
5111
|
+
throw new AcpTargetResolutionError(`Unsupported ACP target "${target}". Supported targets: ${ACP_TARGET_IDS.join(", ")}.`);
|
|
5071
5112
|
}
|
|
5072
5113
|
switch (target) {
|
|
5073
5114
|
case "opencode":
|
|
5074
5115
|
return opencodeTargetProfile;
|
|
5075
5116
|
case "gemini":
|
|
5076
5117
|
return geminiTargetProfile;
|
|
5118
|
+
case "copilot":
|
|
5119
|
+
return copilotTargetProfile;
|
|
5077
5120
|
case "custom":
|
|
5078
5121
|
return customTargetProfile;
|
|
5079
5122
|
}
|
|
@@ -5402,15 +5445,27 @@ class ACPAdapter {
|
|
|
5402
5445
|
async createSession(config) {
|
|
5403
5446
|
const target = this.options.target ?? resolveAcpTarget(config);
|
|
5404
5447
|
await target.writeSystemPromptArtifact(config);
|
|
5405
|
-
const
|
|
5406
|
-
|
|
5407
|
-
|
|
5408
|
-
|
|
5409
|
-
|
|
5410
|
-
|
|
5411
|
-
|
|
5412
|
-
|
|
5413
|
-
|
|
5448
|
+
const cleanupArtifact = async () => {
|
|
5449
|
+
try {
|
|
5450
|
+
await target.cleanupSystemPromptArtifact?.(config);
|
|
5451
|
+
} catch (err) {
|
|
5452
|
+
console.warn(`\x1B[33m[acp]\x1B[0m System prompt cleanup failed: ${formatError(err)}`);
|
|
5453
|
+
}
|
|
5454
|
+
};
|
|
5455
|
+
let proc;
|
|
5456
|
+
try {
|
|
5457
|
+
proc = registerProcessGroup(Bun.spawn(target.command(config), {
|
|
5458
|
+
cwd: config.cwd,
|
|
5459
|
+
detached: detachedProcessGroup,
|
|
5460
|
+
env: target.env(config),
|
|
5461
|
+
stdin: "pipe",
|
|
5462
|
+
stdout: "pipe",
|
|
5463
|
+
stderr: "pipe"
|
|
5464
|
+
}));
|
|
5465
|
+
} catch (err) {
|
|
5466
|
+
await cleanupArtifact();
|
|
5467
|
+
throw err;
|
|
5468
|
+
}
|
|
5414
5469
|
let session = null;
|
|
5415
5470
|
const preSessionEvents = [];
|
|
5416
5471
|
const client2 = new SwarmAcpClient((event) => {
|
|
@@ -5455,12 +5510,14 @@ class ACPAdapter {
|
|
|
5455
5510
|
}, ephemeralToken.tokenId);
|
|
5456
5511
|
for (const event of preSessionEvents)
|
|
5457
5512
|
session.emitFromAcp(event);
|
|
5513
|
+
session.waitForCompletion().finally(cleanupArtifact);
|
|
5458
5514
|
return session;
|
|
5459
5515
|
} catch (err) {
|
|
5460
5516
|
if (ephemeralToken && !session) {
|
|
5461
5517
|
revokeAcpSessionToken(config.apiUrl, config.apiKey, ephemeralToken.tokenId);
|
|
5462
5518
|
}
|
|
5463
5519
|
await terminateProcessGroup(proc.pid);
|
|
5520
|
+
await cleanupArtifact();
|
|
5464
5521
|
throw new Error(`ACP target failed during startup: ${describeTargetError(target, scrubSecrets(formatError(err)))}`);
|
|
5465
5522
|
}
|
|
5466
5523
|
}
|
|
@@ -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.166.0",
|
|
11
11
|
description: "agent-swarm.dev — 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.",
|
|
12
12
|
keywords: [
|
|
13
13
|
"agent-swarm.dev",
|
|
@@ -102,6 +102,8 @@ var init_package = __esm(() => {
|
|
|
102
102
|
"check:extension-schema": "bun scripts/build-extension-manifest-schema.ts --check",
|
|
103
103
|
"build:extension-catalog": "bun scripts/build-extension-catalog.ts",
|
|
104
104
|
"check:extension-catalog": "bun scripts/build-extension-catalog.ts --check",
|
|
105
|
+
"build:secret-rules": "bun scripts/gen-secret-rules.ts",
|
|
106
|
+
"check:secret-rules": "bun scripts/gen-secret-rules.ts --check",
|
|
105
107
|
"build:cli": "bun run scripts/build-cli.ts",
|
|
106
108
|
"mono:build": "turbo run build",
|
|
107
109
|
"mono:test": "turbo run test",
|
|
@@ -207,20 +209,21 @@ var init_package = __esm(() => {
|
|
|
207
209
|
dependencies: {
|
|
208
210
|
"@agentclientprotocol/sdk": "1.7.0",
|
|
209
211
|
"@ai-sdk/openai": "^3.0.41",
|
|
210
|
-
"@anthropic-ai/claude-agent-sdk": "0.3.
|
|
211
|
-
"@anthropic-ai/sdk": "^0.
|
|
212
|
+
"@anthropic-ai/claude-agent-sdk": "0.3.293",
|
|
213
|
+
"@anthropic-ai/sdk": "^0.132.0",
|
|
212
214
|
"@asteasolutions/zod-to-openapi": "^8.0.0",
|
|
213
215
|
"@aws-sdk/client-bedrock": "3.1048.0",
|
|
214
|
-
"@cursor/sdk": "1.0.
|
|
216
|
+
"@cursor/sdk": "1.0.37",
|
|
215
217
|
"@desplega.ai/business-use": "^0.4.2",
|
|
216
218
|
"@desplega.ai/localtunnel": "^2.2.0",
|
|
217
219
|
"@earendil-works/pi-agent-core": "^1.0.4",
|
|
218
220
|
"@earendil-works/pi-ai": "^1.0.4",
|
|
219
221
|
"@earendil-works/pi-coding-agent": "^1.0.4",
|
|
220
222
|
"@inkjs/ui": "^2.0.0",
|
|
223
|
+
"@jitl/quickjs-singlefile-mjs-release-sync": "0.32.0",
|
|
221
224
|
"@linear/sdk": "^77.0.0",
|
|
222
225
|
"@modelcontextprotocol/sdk": "1.29.0",
|
|
223
|
-
"@openai/codex": "0.
|
|
226
|
+
"@openai/codex": "0.161.0",
|
|
224
227
|
"@opencode-ai/sdk": "^1.18.35",
|
|
225
228
|
"@openfort/openfort-node": "^0.9.1",
|
|
226
229
|
"@opentelemetry/api": "^1.9.1",
|
|
@@ -244,6 +247,7 @@ var init_package = __esm(() => {
|
|
|
244
247
|
ink: "^6.5.1",
|
|
245
248
|
oauth4webapi: "^3.8.5",
|
|
246
249
|
openai: "^6.22.0",
|
|
250
|
+
"quickjs-emscripten-core": "0.32.0",
|
|
247
251
|
react: "19.2.3",
|
|
248
252
|
"react-devtools-core": "^7.0.1",
|
|
249
253
|
"sqlite-vec": "^0.1.9",
|
|
@@ -18,13 +18,13 @@ import {
|
|
|
18
18
|
recoverIncompleteRuns,
|
|
19
19
|
repointTrackerSyncBySwarmId,
|
|
20
20
|
resolveLeadOnlyRecoveryAssignment
|
|
21
|
-
} from "./cli-
|
|
21
|
+
} from "./cli-df56tqdw.js";
|
|
22
22
|
import {
|
|
23
23
|
isMultiRuntimeEnabled
|
|
24
24
|
} from "./cli-re8z5p8p.js";
|
|
25
25
|
import {
|
|
26
26
|
createApprovalFollowUpTask
|
|
27
|
-
} from "./cli-
|
|
27
|
+
} from "./cli-jvj6a0cv.js";
|
|
28
28
|
import {
|
|
29
29
|
MAX_EMPTY_POLLS,
|
|
30
30
|
assignUnassignedTaskPending,
|
|
@@ -61,7 +61,7 @@ import {
|
|
|
61
61
|
getUnassignedPoolTasks,
|
|
62
62
|
hasNonTerminalResumeChild,
|
|
63
63
|
hasPendingSteering,
|
|
64
|
-
init_db,
|
|
64
|
+
init_db1 as init_db,
|
|
65
65
|
init_steering,
|
|
66
66
|
isAgentEligibleForTask,
|
|
67
67
|
isPoolAffinityEnforcementEnabled,
|
|
@@ -75,11 +75,11 @@ import {
|
|
|
75
75
|
settleSupersededTaskDependents,
|
|
76
76
|
supersedeTask,
|
|
77
77
|
updateAgentStatus
|
|
78
|
-
} from "./cli-
|
|
78
|
+
} from "./cli-yshaazs1.js";
|
|
79
79
|
import {
|
|
80
80
|
TERMINAL_TASK_STATUSES,
|
|
81
81
|
init_types
|
|
82
|
-
} from "./cli-
|
|
82
|
+
} from "./cli-xvdgasgy.js";
|
|
83
83
|
import {
|
|
84
84
|
init_registry,
|
|
85
85
|
init_resolver,
|
|
@@ -93,7 +93,7 @@ import {
|
|
|
93
93
|
import {
|
|
94
94
|
init_secret_scrubber,
|
|
95
95
|
scrubSecrets
|
|
96
|
-
} from "./cli-
|
|
96
|
+
} from "./cli-wt7ccy4r.js";
|
|
97
97
|
|
|
98
98
|
// src/be/approval-sweeps.ts
|
|
99
99
|
init_db();
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
import {
|
|
15
15
|
DEFAULT_MODEL_TIER_MAP,
|
|
16
16
|
init_types
|
|
17
|
-
} from "./cli-
|
|
17
|
+
} from "./cli-xvdgasgy.js";
|
|
18
18
|
import {
|
|
19
19
|
init_session_templates
|
|
20
20
|
} from "./cli-g5erf0zt.js";
|
|
@@ -35,7 +35,7 @@ import {
|
|
|
35
35
|
init_secret_scrubber,
|
|
36
36
|
registerVolatileSecret,
|
|
37
37
|
scrubSecrets
|
|
38
|
-
} from "./cli-
|
|
38
|
+
} from "./cli-wt7ccy4r.js";
|
|
39
39
|
import {
|
|
40
40
|
__require
|
|
41
41
|
} from "./cli-bc05qbss.js";
|
|
@@ -50,7 +50,7 @@ import { tmpdir } from "node:os";
|
|
|
50
50
|
import { join } from "node:path";
|
|
51
51
|
init_env_flag();
|
|
52
52
|
init_secret_scrubber();
|
|
53
|
-
var CURSOR_SDK_VERSION = "1.0.
|
|
53
|
+
var CURSOR_SDK_VERSION = "1.0.37";
|
|
54
54
|
var CURSOR_MCP_SERVER_NAME = "agent-swarm";
|
|
55
55
|
var NATIVE_SYSTEM_PROMPT_ENV = "CURSOR_NATIVE_SYSTEM_PROMPT";
|
|
56
56
|
var FIRST_MESSAGE_TEMPLATE = "system.agent.cursor.first_message";
|
|
@@ -58,7 +58,7 @@ function checkCursorCredentials(env) {
|
|
|
58
58
|
return env.CURSOR_API_KEY?.trim() ? { ready: true, missing: [], satisfiedBy: "env" } : { ready: false, missing: ["CURSOR_API_KEY"], hint: "Set CURSOR_API_KEY for cursor." };
|
|
59
59
|
}
|
|
60
60
|
async function liveTestCursorKey(apiKey) {
|
|
61
|
-
const { Cursor } = await import("./index-
|
|
61
|
+
const { Cursor } = await import("./index-n0rxa4ca.js");
|
|
62
62
|
try {
|
|
63
63
|
await Cursor.me({ apiKey });
|
|
64
64
|
return { ok: true };
|
|
@@ -78,7 +78,7 @@ async function listCursorModels(apiKey) {
|
|
|
78
78
|
if (modelListCache?.key === apiKey && Date.now() - modelListCache.at < MODEL_LIST_TTL_MS) {
|
|
79
79
|
return modelListCache.models;
|
|
80
80
|
}
|
|
81
|
-
const { Cursor } = await import("./index-
|
|
81
|
+
const { Cursor } = await import("./index-n0rxa4ca.js");
|
|
82
82
|
const models = await Cursor.models.list({ apiKey });
|
|
83
83
|
modelListCache = { key: apiKey, at: Date.now(), models };
|
|
84
84
|
return models;
|
|
@@ -452,7 +452,7 @@ class CursorAdapter {
|
|
|
452
452
|
if (!apiKey)
|
|
453
453
|
throw new Error("cursor requires CURSOR_API_KEY");
|
|
454
454
|
registerVolatileSecret(apiKey, "CURSOR_API_KEY");
|
|
455
|
-
const { Agent, JsonlLocalAgentStore } = await import("./index-
|
|
455
|
+
const { Agent, JsonlLocalAgentStore } = await import("./index-n0rxa4ca.js");
|
|
456
456
|
const modelId = config.model || DEFAULT_MODEL_TIER_MAP.cursor.regular;
|
|
457
457
|
const effort = applyReasoningEffort("cursor", modelId, config.reasoningEffort);
|
|
458
458
|
const requested = effort.kind === "cursor-effort" ? effort.reasoningEffort : undefined;
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
} from "./cli-32bca7nr.js";
|
|
21
21
|
import {
|
|
22
22
|
summarizeSession
|
|
23
|
-
} from "./cli-
|
|
23
|
+
} from "./cli-p4ztb80h.js";
|
|
24
24
|
import {
|
|
25
25
|
hasCodexOAuthPoolSlots
|
|
26
26
|
} from "./cli-bqjfjex4.js";
|
|
@@ -51,11 +51,11 @@ import {
|
|
|
51
51
|
CodexOAuthRefreshError,
|
|
52
52
|
credentialsToAuthJson,
|
|
53
53
|
getValidCodexOAuth
|
|
54
|
-
} from "./cli-
|
|
54
|
+
} from "./cli-feh3dkah.js";
|
|
55
55
|
import {
|
|
56
56
|
DEFAULT_MODEL_TIER_MAP,
|
|
57
57
|
init_types
|
|
58
|
-
} from "./cli-
|
|
58
|
+
} from "./cli-xvdgasgy.js";
|
|
59
59
|
import {
|
|
60
60
|
init_runtime_model_catalog,
|
|
61
61
|
init_src,
|
|
@@ -64,11 +64,11 @@ import {
|
|
|
64
64
|
import {
|
|
65
65
|
init_package,
|
|
66
66
|
package_default
|
|
67
|
-
} from "./cli-
|
|
67
|
+
} from "./cli-4r1sjfc4.js";
|
|
68
68
|
import {
|
|
69
69
|
init_secret_scrubber,
|
|
70
70
|
scrubSecrets
|
|
71
|
-
} from "./cli-
|
|
71
|
+
} from "./cli-wt7ccy4r.js";
|
|
72
72
|
import {
|
|
73
73
|
__require
|
|
74
74
|
} from "./cli-bc05qbss.js";
|
|
@@ -5,12 +5,12 @@ import {
|
|
|
5
5
|
instantFlush,
|
|
6
6
|
requestSlackThreadSteering,
|
|
7
7
|
wasEventSeen
|
|
8
|
-
} from "./cli-
|
|
8
|
+
} from "./cli-dw2q9f7g.js";
|
|
9
9
|
import {
|
|
10
10
|
enrichSlackUserEmail,
|
|
11
11
|
resolveSlackUserId,
|
|
12
12
|
rewriteSlackMentions
|
|
13
|
-
} from "./cli-
|
|
13
|
+
} from "./cli-x7kpr72a.js";
|
|
14
14
|
import {
|
|
15
15
|
TaskCreationBlockedError,
|
|
16
16
|
broadcastMatches,
|
|
@@ -23,14 +23,14 @@ import {
|
|
|
23
23
|
hasOtherUserMention,
|
|
24
24
|
notifySlackFileFailures,
|
|
25
25
|
routeMessage
|
|
26
|
-
} from "./cli-
|
|
26
|
+
} from "./cli-df56tqdw.js";
|
|
27
27
|
import {
|
|
28
28
|
ackSlackMessage,
|
|
29
29
|
buildTreeBlocks,
|
|
30
30
|
ensureSlackThreadTree,
|
|
31
31
|
isSlackRenderV2Enabled,
|
|
32
32
|
registerTreeMessage
|
|
33
|
-
} from "./cli-
|
|
33
|
+
} from "./cli-ecknp7p1.js";
|
|
34
34
|
import {
|
|
35
35
|
getAgentById,
|
|
36
36
|
getAgentWorkingOnThread,
|
|
@@ -39,11 +39,11 @@ import {
|
|
|
39
39
|
getMostRecentTaskInThread,
|
|
40
40
|
getTasksByAgentId,
|
|
41
41
|
init_context_key,
|
|
42
|
-
init_db,
|
|
42
|
+
init_db1 as init_db,
|
|
43
43
|
isExtensionAgent,
|
|
44
44
|
reactionName,
|
|
45
45
|
slackContextKey
|
|
46
|
-
} from "./cli-
|
|
46
|
+
} from "./cli-yshaazs1.js";
|
|
47
47
|
import {
|
|
48
48
|
init_resolver,
|
|
49
49
|
resolveTemplate
|
|
@@ -61,11 +61,11 @@ import {
|
|
|
61
61
|
import {
|
|
62
62
|
init_event_bus,
|
|
63
63
|
workflowEventBus
|
|
64
|
-
} from "./cli-
|
|
64
|
+
} from "./cli-mb75wpxf.js";
|
|
65
65
|
import {
|
|
66
66
|
init_secret_scrubber,
|
|
67
67
|
scrubSecrets
|
|
68
|
-
} from "./cli-
|
|
68
|
+
} from "./cli-wt7ccy4r.js";
|
|
69
69
|
import {
|
|
70
70
|
__callDispose,
|
|
71
71
|
__using
|