@desplega.ai/agent-swarm 2.13.1 → 2.13.2
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 +1 -1
- package/dist/{acp-adapter-xtj40wd8.js → acp-adapter-x1qqgzwx.js} +5 -5
- package/dist/{acp-targets-n7vm5atw.js → acp-targets-mz8c5dnt.js} +4 -4
- package/dist/{actions-hq6wp9xv.js → actions-5ft3qp5a.js} +25 -25
- package/dist/{agent-fs-provision-y0qc1rdd.js → agent-fs-provision-6fgz7wvz.js} +4 -4
- package/dist/{amp-adapter-1qqs6h91.js → amp-adapter-nthn8ezm.js} +1 -1
- package/dist/{app-7m4z44rv.js → app-535m78qw.js} +8 -8
- package/dist/{approval-notifications-8sr41gjx.js → approval-notifications-dewbk403.js} +9 -9
- package/dist/{assistant-hkczwfv6.js → assistant-39zyabv2.js} +25 -25
- package/dist/{boot-args-schema-8025snev.js → boot-args-schema-bqv5bf77.js} +1 -1
- package/dist/{boot-reembed-4bbpxjh1.js → boot-reembed-157c0gcz.js} +1 -1
- package/dist/{boot-reembed-15m87nr1.js → boot-reembed-fas7z3zn.js} +1 -1
- package/dist/{boot-scrub-sweep-eajr97e9.js → boot-scrub-sweep-tmec0be2.js} +2 -2
- package/dist/{boot-seeds-9cwy39jx.js → boot-seeds-32zm50x2.js} +4 -4
- package/dist/{claude-adapter-g61wa4rt.js → claude-adapter-gwq7x2nj.js} +2 -2
- package/dist/{claude-managed-adapter-znkk0prm.js → claude-managed-adapter-rkvw6fvq.js} +2 -2
- package/dist/{claude-managed-setup-f1wndkr2.js → claude-managed-setup-0vgz4d1j.js} +4 -4
- package/dist/{claude-sdk-session-687xzf21.js → claude-sdk-session-5wbwxy8c.js} +11964 -11769
- package/dist/{cli-snypfjgj.js → cli-0f7n3td3.js} +1 -1
- package/dist/{cli-0m77n7ej.js → cli-1f48qdnb.js} +54 -12
- package/dist/{cli-04103ryh.js → cli-1gevjrc1.js} +1 -1
- package/dist/{cli-a8ts6x1n.js → cli-2wde56gv.js} +5 -5
- package/dist/{cli-aebswqmz.js → cli-31vt7baf.js} +14 -14
- package/dist/{cli-cn6fpa1p.js → cli-4djg31jh.js} +1 -1
- package/dist/{cli-bjmq14k9.js → cli-5k1hvycs.js} +3 -3
- package/dist/{cli-mmw2sjaf.js → cli-62fjschk.js} +1 -1
- package/dist/{cli-t90k0phh.js → cli-69eq6gdk.js} +15 -15
- package/dist/{cli-dd57p1gd.js → cli-6rmryz03.js} +2 -2
- package/dist/{cli-byxsctca.js → cli-7m6bbtab.js} +6 -6
- package/dist/{cli-c8kqmzzf.js → cli-8a4qg44m.js} +1 -1
- package/dist/{cli-8rbkw18r.js → cli-8qvte9hn.js} +2 -2
- package/dist/{cli-h03j6je3.js → cli-a6rzw649.js} +2 -2
- package/dist/{cli-w41bvvms.js → cli-b0kqw55g.js} +1 -1
- package/dist/{cli-84xtgbn6.js → cli-b0m3bg0f.js} +100 -2
- package/dist/{cli-zaate0rd.js → cli-c9bwawf9.js} +2 -2
- package/dist/{cli-4mj5g29m.js → cli-cs26ed89.js} +6 -6
- package/dist/{cli-yeh3g1q6.js → cli-d0jb2qnt.js} +23 -23
- package/dist/{cli-cp0m07wb.js → cli-d528acsw.js} +1 -1
- package/dist/{cli-fn8aj7gb.js → cli-dnvmwsvc.js} +95 -68
- package/dist/{cli-w6c6dj91.js → cli-e87fg3en.js} +1 -1
- package/dist/{cli-h9bejmkf.js → cli-erh1rgh4.js} +49 -26
- package/dist/{cli-9xx36trj.js → cli-ewb028rs.js} +2 -2
- package/dist/{cli-hs3mqswp.js → cli-f1sdh8ca.js} +4 -4
- package/dist/{cli-zvpkrgsc.js → cli-fcwrd7bh.js} +3 -3
- package/dist/{cli-sfajkbd7.js → cli-fgm2mad9.js} +2 -2
- package/dist/{cli-32xndx6b.js → cli-g0b3ma7r.js} +1 -1
- package/dist/{cli-nk8swfpx.js → cli-gc7jkf4a.js} +3 -3
- package/dist/{cli-z6m6xzxt.js → cli-getrvmtx.js} +26 -5
- package/dist/{cli-y6qqbpwc.js → cli-j2ybkdk2.js} +1 -1
- package/dist/{cli-1dr5at77.js → cli-jkkcm72j.js} +10 -10
- package/dist/{cli-cqxwjb93.js → cli-ka13xx6b.js} +1 -1
- package/dist/{cli-4h90xaet.js → cli-m1wddksc.js} +1 -1
- package/dist/{cli-qx1dwrr5.js → cli-n14r8h4n.js} +2 -2
- package/dist/{cli-jhtvt7gn.js → cli-n46d87mj.js} +3 -3
- package/dist/{cli-13t0smbk.js → cli-nkfv398a.js} +185 -58
- package/dist/{cli-p7g7wd9n.js → cli-nvqq3232.js} +7 -7
- package/dist/{cli-0a336ze7.js → cli-r4fphq38.js} +3 -3
- package/dist/{cli-4tbvndmm.js → cli-r8ddn0hf.js} +1 -1
- package/dist/{cli-3m8vqehw.js → cli-rvhaahfv.js} +2 -2
- package/dist/{cli-cd9acnvd.js → cli-s08zsqva.js} +2 -2
- package/dist/{cli-w24f3j49.js → cli-sjk85d7v.js} +6 -5
- package/dist/{cli-grcc2h2g.js → cli-t9nxq30h.js} +6 -6
- package/dist/{cli-6r1dwegd.js → cli-tbdw3f92.js} +2 -2
- package/dist/{cli-0fx95c06.js → cli-tceqvv6h.js} +2 -2
- package/dist/{cli-tzzas8rb.js → cli-tgmate57.js} +2 -2
- package/dist/{cli-3zyme1wt.js → cli-wdtqkqnq.js} +3 -3
- package/dist/{cli-8cmjkbvj.js → cli-x7aqhxj5.js} +1 -1
- package/dist/{cli-7ewre3dm.js → cli-xerdrnqs.js} +2 -2
- package/dist/{cli-c0tyzt73.js → cli-xysy1g8x.js} +1 -1
- package/dist/{cli-1b5axkt1.js → cli-zm6bkx3e.js} +2 -2
- package/dist/{cli-1carhg8g.js → cli-zqy28rwx.js} +2 -2
- package/dist/cli.js +17 -16
- package/dist/{codex-adapter-ysfg6ty3.js → codex-adapter-x25xfbnh.js} +2 -2
- package/dist/{codex-session-runner-823scr6g.js → codex-session-runner-kn5xnrvp.js} +2 -2
- package/dist/{commands-5rbm07fz.js → commands-8n59gxmy.js} +3 -3
- package/dist/{controllers-connect-34jzhfft.js → controllers-connect-09gvkrhc.js} +24 -24
- package/dist/core-2b8bv6ny.js +42 -0
- package/dist/{db-6bkgbfwk.js → db-e71keqxk.js} +3 -3
- package/dist/{db-hcj16x7z.js → db-spg81qtr.js} +1 -1
- package/dist/{dispatcher-jgjqrfzv.js → dispatcher-fr4vawwb.js} +23 -23
- package/dist/{easter-egg-3d-w17nsny6.js → easter-egg-3d-ac9tv9a6.js} +1 -1
- package/dist/{embedding-space-v06fwy7b.js → embedding-space-an77f45k.js} +6 -6
- package/dist/{embeddings-g50dxea4.js → embeddings-jkrehejr.js} +1 -1
- package/dist/{execute-1n36haw1.js → execute-3mys4nta.js} +1 -1
- package/dist/{external-channel-43tv8pg6.js → external-channel-s6zxpts9.js} +2 -2
- package/dist/{fx-adapter-bvh05t4a.js → fx-adapter-4yet1c4f.js} +6 -6
- package/dist/{grok-adapter-my5j8mdf.js → grok-adapter-8ge6tw7m.js} +6 -6
- package/dist/handlers-0r9evrdj.js +41 -0
- package/dist/{heartbeat-sf3nk937.js → heartbeat-jjpb44e5.js} +25 -25
- package/dist/{hook-m1m9dm6w.js → hook-68gbs87k.js} +1 -1
- package/dist/{hook-dqph1e05.js → hook-y6n23zzj.js} +1 -1
- package/dist/{http-w0th1cz9.js → http-8c6y008s.js} +297 -97
- package/dist/{index-ffba0z8q.js → index-0vthtbc2.js} +20 -18
- package/dist/index-1v23363p.js +39 -0
- package/dist/index-30qw6vyw.js +44 -0
- package/dist/index-6bm3w6cn.js +40 -0
- package/dist/{index-gkpfgpg7.js → index-6h3r0vpe.js} +1 -1
- package/dist/{index-e8pz8qdg.js → index-7dgxveck.js} +2 -2
- package/dist/{index-k8ajc0g0.js → index-maddg9ys.js} +1 -1
- package/dist/{index-y4vd4mhn.js → index-mbpxhc4w.js} +1 -1
- package/dist/index-rz8ve510.js +569 -0
- package/dist/{index-c0e8en64.js → index-we3nd2t0.js} +1 -1
- package/dist/{index-pb03vans.js → index-xcw7hjt5.js} +25 -25
- package/dist/{index-ez823q84.js → index-ym9fgxad.js} +1 -1
- package/dist/{keepalive-2v06q2e8.js → keepalive-7e9r5dvp.js} +4 -4
- package/dist/lead-3jpc7kcr.js +79 -0
- package/dist/{maintenance-vx7vjhhy.js → maintenance-d3erjvcg.js} +1 -1
- package/dist/{oauth-refresh-sweep-g06k4bza.js → oauth-refresh-sweep-0qh70988.js} +3 -3
- package/dist/{object-webhooks-3dzdq4fm.js → object-webhooks-ac7v2q5p.js} +7 -7
- package/dist/{onboard-232pazny.js → onboard-5yphtken.js} +3 -3
- package/dist/{opencode-adapter-t0paqbh8.js → opencode-adapter-0xvyba4m.js} +3 -3
- package/dist/{otel-impl-kmpkyp4y.js → otel-impl-svqp691q.js} +1 -1
- package/dist/{pending-x0z3vx1x.js → pending-bn4xe5br.js} +24 -24
- package/dist/{pi-mono-adapter-7pmypn6d.js → pi-mono-adapter-763s8a3w.js} +6 -6
- package/dist/{pricing-refresh-ytjmtyd7.js → pricing-refresh-kfc215mf.js} +2 -2
- package/dist/{rbac-roles-fgm5mxr2.js → rbac-roles-3bznvkpt.js} +3 -3
- package/dist/{rbac-roles-xyaxekh3.js → rbac-roles-6r4h2ghj.js} +2 -2
- package/dist/{render-v2-ws972g4r.js → render-v2-f3qedbpy.js} +8 -8
- package/dist/{resume-m6mjzhkp.js → resume-vcag4ann.js} +11 -11
- package/dist/{runtime-zzpc0c8a.js → runtime-x0s55z2t.js} +1 -1
- package/dist/{session-access-vp35xs91.js → session-access-nwzve8q2.js} +5 -5
- package/dist/{session-source-backfill-p73e8zbe.js → session-source-backfill-jpqfzmgz.js} +1 -1
- package/dist/{setup-r4kd7rxg.js → setup-d2smwaem.js} +1 -1
- package/dist/thread-buffer-8fc703jc.js +42 -0
- package/dist/{tree-visibility-07h2tbs2.js → tree-visibility-dwzc8en0.js} +2 -2
- package/dist/{user-merge-jobs-96vg9rpe.js → user-merge-jobs-4ce7kma2.js} +3 -3
- package/dist/{virtual-modules-vgn3f2x4.js → virtual-modules-78a6yw71.js} +1 -1
- package/dist/{work-objects-74hbcx3e.js → work-objects-m0w1e7q8.js} +26 -26
- package/dist/worker-3p2vq107.js +79 -0
- package/dist/{worker-follow-up-ezavwn5d.js → worker-follow-up-e3t6f895.js} +23 -23
- package/openapi.json +3 -2
- package/package.json +6 -5
- package/src/be/migrations/341_user_token_expiry.sql +4 -0
- package/src/be/scripts/run-credential.ts +55 -1
- package/src/be/scripts/typecheck.ts +4 -4
- package/src/be/scripts/user-code-mode.ts +160 -0
- package/src/be/users.ts +48 -7
- package/src/commands/onboard/agent-fs-version.ts +1 -1
- package/src/http/script-connection-proxy.ts +18 -6
- package/src/http/scripts.ts +2 -11
- package/src/http/users.ts +1 -0
- package/src/integrations/chat-sdk/adapters.ts +29 -0
- package/src/integrations/chat-sdk/limits.ts +3 -0
- package/src/integrations/chat-sdk/rocketchat/README.md +8 -0
- package/src/integrations/chat-sdk/rocketchat/index.ts +790 -0
- package/src/integrations/chat-sdk/rocketchat/markdown.ts +210 -0
- package/src/integrations/chat-sdk/rocketchat/types.ts +249 -0
- package/src/integrations/chat-sdk/runtime.ts +11 -5
- package/src/integrations/chat-sdk/schema.ts +37 -3
- package/src/integrations/chat-sdk/status.ts +9 -0
- package/src/providers/amp-adapter.ts +1 -1
- package/src/rbac/legacy-policy.ts +1 -0
- package/src/rbac/permissions.ts +4 -0
- package/src/scripts-runtime/executors/native.ts +225 -67
- package/src/scripts-runtime/mcp-client.ts +2 -1
- package/src/scripts-runtime/swarm-sdk.ts +2 -1
- package/src/scripts-runtime/types/stdlib.d.ts +4 -4
- package/src/scripts-runtime/types/swarm-sdk.d.ts +4 -4
- package/src/server-user.ts +98 -0
- package/src/tests/chat-sdk-rocketchat-vendored.test.ts +67 -0
- package/src/tests/chat-sdk-status-route.test.ts +13 -1
- package/src/tests/codex-app-server.test.ts +4 -6
- package/src/tests/mcp-user-route.test.ts +10 -1
- package/src/tests/script-connections-mcp.test.ts +14 -10
- package/src/tests/script-connections-sql.test.ts +6 -2
- package/src/tests/script-connections.test.ts +2 -0
- package/src/tools/script-common.ts +37 -22
- package/src/tools/script-query-types.ts +1 -1
- package/src/tools/script-run.ts +1 -1
- package/src/tools/script-search.ts +12 -10
- package/src/tools/utils.ts +7 -1
- package/templates/skills/chat-sdk/content.md +2 -2
- package/templates/skills/swarm-docs/content.md +2 -0
- package/dist/core-kdehq26g.js +0 -42
- package/dist/handlers-wyymeeqh.js +0 -41
- package/dist/index-22khdtby.js +0 -44
- package/dist/index-np0582ac.js +0 -40
- package/dist/index-vgkrj1jt.js +0 -39
- package/dist/lead-55z813ng.js +0 -79
- package/dist/thread-buffer-cm2nzq6t.js +0 -42
- package/dist/worker-5pn2vzx6.js +0 -79
- package/dist/{cli-5v6b2am8.js → cli-bp2rt28p.js} +4 -4
- /package/dist/{cli-m4ejz4nj.js → cli-cah298e5.js} +0 -0
|
@@ -46,7 +46,7 @@ import {
|
|
|
46
46
|
getWorkflowVersions2,
|
|
47
47
|
getMcpServerById2,
|
|
48
48
|
init_db4
|
|
49
|
-
} from "./cli-
|
|
49
|
+
} from "./cli-erh1rgh4.js";
|
|
50
50
|
import {
|
|
51
51
|
McpHttpClient,
|
|
52
52
|
init_http_client
|
|
@@ -61,17 +61,17 @@ import {
|
|
|
61
61
|
oauthAppRowToProviderConfig,
|
|
62
62
|
ensureAuthorizationTokenOrThrow,
|
|
63
63
|
init_ensure_token
|
|
64
|
-
} from "./cli-
|
|
64
|
+
} from "./cli-xerdrnqs.js";
|
|
65
65
|
import {
|
|
66
66
|
AGENT_FS_API_KEY_CONFIG,
|
|
67
67
|
init_script_fs,
|
|
68
68
|
resolveAgentFsIdentity,
|
|
69
69
|
init_agent_fs_identity
|
|
70
|
-
} from "./cli-
|
|
70
|
+
} from "./cli-j2ybkdk2.js";
|
|
71
71
|
import {
|
|
72
72
|
validateDefinition,
|
|
73
73
|
init_definition2
|
|
74
|
-
} from "./cli-
|
|
74
|
+
} from "./cli-jkkcm72j.js";
|
|
75
75
|
import {
|
|
76
76
|
getApiKey,
|
|
77
77
|
init_api_key
|
|
@@ -83,12 +83,14 @@ import {
|
|
|
83
83
|
refreshMcpToken,
|
|
84
84
|
computeExpiresAt,
|
|
85
85
|
init_mcp_wrapper
|
|
86
|
-
} from "./cli-
|
|
86
|
+
} from "./cli-xysy1g8x.js";
|
|
87
87
|
import {
|
|
88
|
+
mintUserScriptRunToken,
|
|
89
|
+
revokeUserScriptRunToken,
|
|
88
90
|
mintScriptRunToken,
|
|
89
91
|
revokeSessionToken,
|
|
90
92
|
init_users
|
|
91
|
-
} from "./cli-
|
|
93
|
+
} from "./cli-getrvmtx.js";
|
|
92
94
|
import {
|
|
93
95
|
defaultAssetKey,
|
|
94
96
|
init_key,
|
|
@@ -9019,14 +9021,127 @@ async function linkOrWriteBareImportShims(baseTmpDir, tmpdir) {
|
|
|
9019
9021
|
await writeBareImportShims(tmpdir);
|
|
9020
9022
|
}
|
|
9021
9023
|
}
|
|
9022
|
-
function
|
|
9023
|
-
return
|
|
9024
|
-
|
|
9025
|
-
|
|
9026
|
-
|
|
9027
|
-
|
|
9028
|
-
|
|
9029
|
-
}
|
|
9024
|
+
function harnessRunPaths(tmpdir) {
|
|
9025
|
+
return {
|
|
9026
|
+
argsFile: `${tmpdir}/args.json`,
|
|
9027
|
+
sourceFile: `${tmpdir}/user-module/user-script.ts`,
|
|
9028
|
+
resultFile: `${tmpdir}/result.json`,
|
|
9029
|
+
errorFile: `${tmpdir}/error.json`,
|
|
9030
|
+
startedFile: `${tmpdir}/started.marker`
|
|
9031
|
+
};
|
|
9032
|
+
}
|
|
9033
|
+
function harnessEnvFor(spec, tmpdir) {
|
|
9034
|
+
const paths = harnessRunPaths(tmpdir);
|
|
9035
|
+
return {
|
|
9036
|
+
PATH: process.env.PATH ?? "/usr/bin:/bin",
|
|
9037
|
+
HOME: spec.runAs ? tmpdir : process.env.HOME ?? "/tmp",
|
|
9038
|
+
LANG: process.env.LANG ?? "C.UTF-8",
|
|
9039
|
+
LC_ALL: process.env.LC_ALL ?? "C.UTF-8",
|
|
9040
|
+
TMPDIR: tmpdir,
|
|
9041
|
+
SWARM_SCRIPT_TMPDIR: tmpdir,
|
|
9042
|
+
SWARM_SCRIPT_ARGS_FILE: paths.argsFile,
|
|
9043
|
+
SWARM_SCRIPT_SOURCE_FILE: paths.sourceFile,
|
|
9044
|
+
SWARM_SCRIPT_RESULT_FILE: paths.resultFile,
|
|
9045
|
+
SWARM_SCRIPT_ERROR_FILE: paths.errorFile,
|
|
9046
|
+
SWARM_SCRIPT_STARTED_FILE: paths.startedFile,
|
|
9047
|
+
...spec.hostValidatedArgs ? { SWARM_SCRIPT_HOST_VALIDATED_ARGS: "1" } : {}
|
|
9048
|
+
};
|
|
9049
|
+
}
|
|
9050
|
+
function spawnHarness(spec, tmpdir) {
|
|
9051
|
+
const harnessEnv = harnessEnvFor(spec, tmpdir);
|
|
9052
|
+
const limits = {
|
|
9053
|
+
virtualMemoryMb: spec.resources.memoryMb,
|
|
9054
|
+
cpuTimeSec: spec.resources.cpuTimeSec,
|
|
9055
|
+
maxProcs: spec.resources.maxProcs,
|
|
9056
|
+
maxFileKb: Math.floor(spec.resources.maxFileBytes / 1024),
|
|
9057
|
+
maxFdCount: spec.resources.maxFdCount
|
|
9058
|
+
};
|
|
9059
|
+
return registerProcessGroup(Bun.spawn(buildSandboxedCommand(["bun", "run", spec.harnessPath], harnessEnv, limits, "inline", spec.runAs), {
|
|
9060
|
+
env: sandboxSpawnEnv(harnessEnv),
|
|
9061
|
+
cwd: tmpdir,
|
|
9062
|
+
detached: detachedProcessGroup,
|
|
9063
|
+
stdin: "pipe",
|
|
9064
|
+
stdout: "pipe",
|
|
9065
|
+
stderr: "pipe"
|
|
9066
|
+
}));
|
|
9067
|
+
}
|
|
9068
|
+
function harnessSpecKey(spec) {
|
|
9069
|
+
return JSON.stringify([
|
|
9070
|
+
spec.harnessPath,
|
|
9071
|
+
spec.baseTmpDir,
|
|
9072
|
+
spec.runAs ?? null,
|
|
9073
|
+
spec.hostValidatedArgs,
|
|
9074
|
+
spec.resources.memoryMb,
|
|
9075
|
+
spec.resources.cpuTimeSec,
|
|
9076
|
+
spec.resources.maxProcs,
|
|
9077
|
+
spec.resources.maxFileBytes,
|
|
9078
|
+
spec.resources.maxFdCount,
|
|
9079
|
+
process.env.PATH ?? null,
|
|
9080
|
+
process.env.HOME ?? null,
|
|
9081
|
+
process.env.LANG ?? null,
|
|
9082
|
+
process.env.LC_ALL ?? null
|
|
9083
|
+
]);
|
|
9084
|
+
}
|
|
9085
|
+
function harnessAlive(proc) {
|
|
9086
|
+
return proc.exitCode === null && proc.signalCode === null && !proc.killed;
|
|
9087
|
+
}
|
|
9088
|
+
function discardWarmHarness(entry) {
|
|
9089
|
+
clearTimeout(entry.idleTimer);
|
|
9090
|
+
if (warmHarnesses.get(entry.key) === entry)
|
|
9091
|
+
warmHarnesses.delete(entry.key);
|
|
9092
|
+
terminateProcessGroup(entry.proc.pid).catch(() => {}).finally(() => rm(entry.tmpdir, { recursive: true, force: true }).catch(() => {}));
|
|
9093
|
+
}
|
|
9094
|
+
function takeWarmHarness(key) {
|
|
9095
|
+
const entry = warmHarnesses.get(key);
|
|
9096
|
+
if (!entry)
|
|
9097
|
+
return;
|
|
9098
|
+
warmHarnesses.delete(key);
|
|
9099
|
+
clearTimeout(entry.idleTimer);
|
|
9100
|
+
if (!harnessAlive(entry.proc)) {
|
|
9101
|
+
discardWarmHarness(entry);
|
|
9102
|
+
return;
|
|
9103
|
+
}
|
|
9104
|
+
entry.proc.ref();
|
|
9105
|
+
return entry;
|
|
9106
|
+
}
|
|
9107
|
+
async function startWarmHarness(key, spec) {
|
|
9108
|
+
if (process.platform === "win32")
|
|
9109
|
+
return;
|
|
9110
|
+
if (warmHarnesses.has(key) || warmingSpecs.has(key))
|
|
9111
|
+
return;
|
|
9112
|
+
warmingSpecs.add(key);
|
|
9113
|
+
const tmpdir = `${spec.baseTmpDir}/swarm-script-${crypto.randomUUID()}`;
|
|
9114
|
+
let started = false;
|
|
9115
|
+
try {
|
|
9116
|
+
await mkdir(tmpdir, { recursive: true, mode: 493 });
|
|
9117
|
+
await linkOrWriteBareImportShims(spec.baseTmpDir, tmpdir);
|
|
9118
|
+
if (warmHarnesses.has(key))
|
|
9119
|
+
return;
|
|
9120
|
+
const proc = spawnHarness(spec, tmpdir);
|
|
9121
|
+
proc.unref();
|
|
9122
|
+
started = true;
|
|
9123
|
+
const entry = {
|
|
9124
|
+
key,
|
|
9125
|
+
tmpdir,
|
|
9126
|
+
proc,
|
|
9127
|
+
idleTimer: setTimeout(() => discardWarmHarness(entry), WARM_IDLE_MS)
|
|
9128
|
+
};
|
|
9129
|
+
entry.idleTimer.unref?.();
|
|
9130
|
+
if (warmHarnesses.size >= MAX_WARM_SPECS) {
|
|
9131
|
+
const oldest = warmHarnesses.values().next().value;
|
|
9132
|
+
if (oldest)
|
|
9133
|
+
discardWarmHarness(oldest);
|
|
9134
|
+
}
|
|
9135
|
+
warmHarnesses.set(key, entry);
|
|
9136
|
+
proc.exited.then(() => {
|
|
9137
|
+
if (warmHarnesses.get(key) === entry)
|
|
9138
|
+
discardWarmHarness(entry);
|
|
9139
|
+
}, () => {});
|
|
9140
|
+
} catch {} finally {
|
|
9141
|
+
warmingSpecs.delete(key);
|
|
9142
|
+
if (!started)
|
|
9143
|
+
await rm(tmpdir, { recursive: true, force: true }).catch(() => {});
|
|
9144
|
+
}
|
|
9030
9145
|
}
|
|
9031
9146
|
|
|
9032
9147
|
class NativeScriptExecutor {
|
|
@@ -9037,15 +9152,16 @@ class NativeScriptExecutor {
|
|
|
9037
9152
|
}
|
|
9038
9153
|
const start = Date.now();
|
|
9039
9154
|
const baseTmpDir = process.env.TMPDIR ?? (process.platform === "win32" ? osTmpdir() : "/tmp");
|
|
9040
|
-
const tmpdir = `${baseTmpDir}/swarm-script-${crypto.randomUUID()}`;
|
|
9041
|
-
await mkdir(`${tmpdir}/user-module`, { recursive: true });
|
|
9042
|
-
const argsFile = `${tmpdir}/args.json`;
|
|
9043
|
-
const sourceFile = `${tmpdir}/user-module/user-script.ts`;
|
|
9044
|
-
const resultFile = `${tmpdir}/result.json`;
|
|
9045
|
-
const errorFile = `${tmpdir}/error.json`;
|
|
9046
|
-
const startedFile = `${tmpdir}/started.marker`;
|
|
9047
9155
|
const runAs = resolveSandboxIdentity();
|
|
9048
9156
|
const harnessPath = process.env.SCRIPT_RUNTIME_DIR ? `${process.env.SCRIPT_RUNTIME_DIR}/eval-harness.bundle.js` : fileURLToPath(new URL("../eval-harness.ts", import.meta.url));
|
|
9157
|
+
const spec = {
|
|
9158
|
+
harnessPath,
|
|
9159
|
+
baseTmpDir,
|
|
9160
|
+
runAs,
|
|
9161
|
+
hostValidatedArgs: Boolean(input.hostValidatedArgs),
|
|
9162
|
+
resources: input.resources
|
|
9163
|
+
};
|
|
9164
|
+
const specKey = harnessSpecKey(spec);
|
|
9049
9165
|
let timedOut = false;
|
|
9050
9166
|
let killed = input.signal?.aborted ?? false;
|
|
9051
9167
|
let removeAbortListener;
|
|
@@ -9059,9 +9175,14 @@ class NativeScriptExecutor {
|
|
|
9059
9175
|
exitCode: 1,
|
|
9060
9176
|
error: "killed"
|
|
9061
9177
|
});
|
|
9178
|
+
if (killed)
|
|
9179
|
+
return killedOutput();
|
|
9180
|
+
const warm = takeWarmHarness(specKey);
|
|
9181
|
+
const tmpdir = warm?.tmpdir ?? `${baseTmpDir}/swarm-script-${crypto.randomUUID()}`;
|
|
9182
|
+
const { argsFile, sourceFile, resultFile, errorFile, startedFile } = harnessRunPaths(tmpdir);
|
|
9183
|
+
if (warm)
|
|
9184
|
+
proc = warm.proc;
|
|
9062
9185
|
try {
|
|
9063
|
-
if (killed)
|
|
9064
|
-
return killedOutput();
|
|
9065
9186
|
const onExternalAbort = () => {
|
|
9066
9187
|
killed = true;
|
|
9067
9188
|
if (proc)
|
|
@@ -9069,11 +9190,13 @@ class NativeScriptExecutor {
|
|
|
9069
9190
|
};
|
|
9070
9191
|
input.signal?.addEventListener("abort", onExternalAbort, { once: true });
|
|
9071
9192
|
removeAbortListener = () => input.signal?.removeEventListener("abort", onExternalAbort);
|
|
9193
|
+
await mkdir(`${tmpdir}/user-module`, { recursive: true });
|
|
9072
9194
|
await Promise.all([
|
|
9073
9195
|
Bun.write(argsFile, JSON.stringify(input.args ?? null)),
|
|
9074
|
-
Bun.write(sourceFile, input.source)
|
|
9075
|
-
linkOrWriteBareImportShims(baseTmpDir, tmpdir)
|
|
9196
|
+
Bun.write(sourceFile, input.source)
|
|
9076
9197
|
]);
|
|
9198
|
+
if (!warm)
|
|
9199
|
+
await linkOrWriteBareImportShims(baseTmpDir, tmpdir);
|
|
9077
9200
|
if (runAs) {
|
|
9078
9201
|
await Promise.all([tmpdir, `${tmpdir}/user-module`, argsFile, sourceFile].map((path) => chown(path, runAs.uid, runAs.gid)));
|
|
9079
9202
|
}
|
|
@@ -9084,34 +9207,15 @@ class NativeScriptExecutor {
|
|
|
9084
9207
|
if (proc)
|
|
9085
9208
|
terminateProcessGroup(proc.pid);
|
|
9086
9209
|
}, input.resources.wallClockMs);
|
|
9087
|
-
const
|
|
9088
|
-
|
|
9089
|
-
|
|
9090
|
-
|
|
9091
|
-
|
|
9092
|
-
TMPDIR: tmpdir,
|
|
9093
|
-
SWARM_SCRIPT_TMPDIR: tmpdir,
|
|
9094
|
-
SWARM_SCRIPT_ARGS_FILE: argsFile,
|
|
9095
|
-
SWARM_SCRIPT_SOURCE_FILE: sourceFile,
|
|
9096
|
-
SWARM_SCRIPT_RESULT_FILE: resultFile,
|
|
9097
|
-
SWARM_SCRIPT_ERROR_FILE: errorFile,
|
|
9098
|
-
SWARM_SCRIPT_STARTED_FILE: startedFile,
|
|
9099
|
-
...input.hostValidatedArgs ? { SWARM_SCRIPT_HOST_VALIDATED_ARGS: "1" } : {}
|
|
9100
|
-
};
|
|
9101
|
-
proc = registerProcessGroup(Bun.spawn(harnessCommand(harnessPath, input, harnessEnv, runAs), {
|
|
9102
|
-
env: sandboxSpawnEnv(harnessEnv),
|
|
9103
|
-
cwd: tmpdir,
|
|
9104
|
-
detached: detachedProcessGroup,
|
|
9105
|
-
stdin: "pipe",
|
|
9106
|
-
stdout: "pipe",
|
|
9107
|
-
stderr: "pipe"
|
|
9108
|
-
}));
|
|
9109
|
-
proc.stdin.write(JSON.stringify(input.configPayload));
|
|
9110
|
-
proc.stdin.end();
|
|
9210
|
+
const child = proc ?? spawnHarness(spec, tmpdir);
|
|
9211
|
+
proc = child;
|
|
9212
|
+
startWarmHarness(specKey, spec);
|
|
9213
|
+
child.stdin.write(JSON.stringify(input.configPayload));
|
|
9214
|
+
child.stdin.end();
|
|
9111
9215
|
const [stdout, stderr, exitCode] = await Promise.all([
|
|
9112
|
-
readStreamCapped(
|
|
9113
|
-
readStreamCapped(
|
|
9114
|
-
|
|
9216
|
+
readStreamCapped(child.stdout, input.resources.maxStdoutBytes),
|
|
9217
|
+
readStreamCapped(child.stderr, input.resources.maxStdoutBytes),
|
|
9218
|
+
child.exited.catch(() => timedOut ? 124 : 1)
|
|
9115
9219
|
]).finally(() => clearTimeout(timeout));
|
|
9116
9220
|
const runDirCheck = {
|
|
9117
9221
|
maxBytes: input.resources.maxFileBytes,
|
|
@@ -9149,12 +9253,14 @@ class NativeScriptExecutor {
|
|
|
9149
9253
|
}
|
|
9150
9254
|
}
|
|
9151
9255
|
}
|
|
9152
|
-
var SANDBOX_CAPACITY_EXIT_CODE = 134, RUN_DIR_OPEN_FLAGS, cachedDevTargets, sharedShimDirPromises;
|
|
9256
|
+
var SANDBOX_CAPACITY_EXIT_CODE = 134, RUN_DIR_OPEN_FLAGS, cachedDevTargets, sharedShimDirPromises, WARM_IDLE_MS = 30000, MAX_WARM_SPECS = 4, warmHarnesses, warmingSpecs;
|
|
9153
9257
|
var init_native = __esm(() => {
|
|
9154
9258
|
init_process_group();
|
|
9155
9259
|
init_sandboxed_process();
|
|
9156
9260
|
RUN_DIR_OPEN_FLAGS = fsConstants.O_RDONLY | (fsConstants.O_NOFOLLOW ?? 0) | (fsConstants.O_NONBLOCK ?? 0);
|
|
9157
9261
|
sharedShimDirPromises = new Map;
|
|
9262
|
+
warmHarnesses = new Map;
|
|
9263
|
+
warmingSpecs = new Set;
|
|
9158
9264
|
});
|
|
9159
9265
|
|
|
9160
9266
|
// src/scripts-runtime/executors/quickjs.ts
|
|
@@ -178313,6 +178419,10 @@ var init_loader = __esm(() => {
|
|
|
178313
178419
|
});
|
|
178314
178420
|
|
|
178315
178421
|
// src/be/scripts/run-credential.ts
|
|
178422
|
+
function userScriptRunTokenTtlMs() {
|
|
178423
|
+
const override = Number(process.env.SCRIPT_RUN_USER_TOKEN_TTL_MS);
|
|
178424
|
+
return override > 0 && override < SCRIPT_RUN_TOKEN_TTL_MS ? override : SCRIPT_RUN_TOKEN_TTL_MS;
|
|
178425
|
+
}
|
|
178316
178426
|
async function acquireScriptApiCredential(agentId, provenance = {}) {
|
|
178317
178427
|
if (!await getAgentById2(agentId)) {
|
|
178318
178428
|
return { apiKey: undefined, release: async () => {} };
|
|
@@ -178337,6 +178447,23 @@ async function runScriptWithRunCredential(input, provenance = {}) {
|
|
|
178337
178447
|
await credential.release();
|
|
178338
178448
|
}
|
|
178339
178449
|
}
|
|
178450
|
+
async function runScriptAsUserWithRunCredential(input, userId) {
|
|
178451
|
+
const token = await mintUserScriptRunToken(userId, userScriptRunTokenTtlMs());
|
|
178452
|
+
try {
|
|
178453
|
+
return await runScript({
|
|
178454
|
+
...input,
|
|
178455
|
+
apiKey: token.plaintext,
|
|
178456
|
+
agentId: "",
|
|
178457
|
+
egressSecrets: [],
|
|
178458
|
+
failedBindings: [],
|
|
178459
|
+
userConfig: {},
|
|
178460
|
+
apiConnections: [],
|
|
178461
|
+
mcpConnections: []
|
|
178462
|
+
});
|
|
178463
|
+
} finally {
|
|
178464
|
+
await revokeUserScriptRunToken(token.tokenId);
|
|
178465
|
+
}
|
|
178466
|
+
}
|
|
178340
178467
|
var SCRIPT_RUN_TOKEN_TTL_MS;
|
|
178341
178468
|
var init_run_credential = __esm(() => {
|
|
178342
178469
|
init_loader();
|
|
@@ -187802,10 +187929,10 @@ export interface SwarmSdk {
|
|
|
187802
187929
|
|
|
187803
187930
|
// --- write: chat sdk ---
|
|
187804
187931
|
chat_reply(args: { text?: string; card?: unknown }): Promise<unknown>;
|
|
187805
|
-
chat_post(args: { adapter: "telegram" | "slack" | "discord" | "teams"; threadId?: string; channelId?: string; text?: string; card?: unknown }): Promise<unknown>;
|
|
187806
|
-
chat_openDm(args: { adapter: "telegram" | "slack" | "discord" | "teams"; userId: string }): Promise<unknown>;
|
|
187807
|
-
chat_registerChannel(args: { adapter: "telegram" | "slack" | "discord" | "teams"; channelId: string; agentId?: string; workflowId?: string; name?: string }): Promise<unknown>;
|
|
187808
|
-
chat_unregisterChannel(args: { adapter: "telegram" | "slack" | "discord" | "teams"; channelId: string }): Promise<unknown>;
|
|
187932
|
+
chat_post(args: { adapter: "telegram" | "slack" | "discord" | "teams" | "rocketchat"; threadId?: string; channelId?: string; text?: string; card?: unknown }): Promise<unknown>;
|
|
187933
|
+
chat_openDm(args: { adapter: "telegram" | "slack" | "discord" | "teams" | "rocketchat"; userId: string }): Promise<unknown>;
|
|
187934
|
+
chat_registerChannel(args: { adapter: "telegram" | "slack" | "discord" | "teams" | "rocketchat"; channelId: string; agentId?: string; workflowId?: string; name?: string }): Promise<unknown>;
|
|
187935
|
+
chat_unregisterChannel(args: { adapter: "telegram" | "slack" | "discord" | "teams" | "rocketchat"; channelId: string }): Promise<unknown>;
|
|
187809
187936
|
|
|
187810
187937
|
// --- write: messaging (internal) ---
|
|
187811
187938
|
message_post(args: { channel?: string; content: string; to?: string }): Promise<unknown>;
|
|
@@ -188587,4 +188714,4 @@ function parseSkillContent(content) {
|
|
|
188587
188714
|
}
|
|
188588
188715
|
var init_skill_parser = () => {};
|
|
188589
188716
|
|
|
188590
|
-
export { require_dist, getMcpOAuthToken, findReusableMcpOAuthClient, invalidateMcpOAuthClient, upsertMcpOAuthToken, applyMcpOAuthRefresh, markMcpOAuthTokenStatus, deleteMcpOAuthToken, insertMcpOAuthPending, consumeMcpOAuthPending, gcMcpOAuthPending, setMcpServerAuthMethod, init_mcp_oauth, ensureMcpToken, init_ensure_mcp_token, callMcpServerTool, init_mcp_proxy, resolveSqlDsn, runReadOnlyQuery, init_sql_connections, listVendoredOpenapiEntries, init_vendored_openapi, ConnectionAuthInputSchema, SqlDsnInputSchema, connectionAuthSummary, listRelationalCredentialBindings, getCredentialBindingById, findCredentialBindingByIdentity, upsertCredentialBinding, disableCredentialBinding, listScriptConnections, listScriptConnectionsAsync, getScriptConnectionById, ScriptConnectionConflictError, connectionAuthInputFromFlat, upsertScriptConnection, refreshScriptConnection, setScriptConnectionEnabled, deleteScriptConnection, getScriptApiConnectionDescriptors, getScriptMcpConnectionDescriptors, getScriptApiTypes, getScriptMcpTypes, init_script_connections, oauthAppToProviderConfig, getOAuthProviderConfig, getOAuthBindingTokenStatus, init_oauth_credential_bindings, buildScriptCredentialBindingsWithFailures, init_script_credential_broker, DEFAULT_SANDBOX_LIMITS, buildSandboxedCommand, sandboxSpawnEnv, createCappedStreamState, snapshotCapped, readStreamCapped, init_sandboxed_process, writeBareImportShim, init_native, isExecutorAllowedByDeployment, init_registry, MIN_SCRIPT_WALL_CLOCK_MS, SCRIPT_LONG_TIMEOUT_HINT_MS, MAX_SCRIPT_WALL_CLOCK_MS, DEFAULT_SCRIPT_RESOURCES, init_types3, HOST_VALIDATED_ARGS, init_host_validated_args, require_typescript2, checkImportAllowlist, validateScriptImports, init_import_allowlist, runScriptWithRunCredential, init_run_credential, resolveSeededEnabled, init_automation_toggle, getSeedState, recordSeedState, deleteSeedState, init_state_db, canonicalJson, seededWorkflowState, workflowsSeeder, init_workflows_seeder, extractScriptSignature, init_extract_signature, extractArgsJsonSchema, init_extract_schema, getSavedScriptOwnerAgentId, runSavedScriptAsAgent, init_run_saved, checkQuickJSCompat, quickJSCompatWarnings, init_quickjs_compat, resolveSyncRunAs, init_sync_run_as, AppNameSchema, ScalarColumnKindSchema, isIso8601Date, jsonColumnSizeLabel, jsonColumnValueIssue, isValidColumnValue, SYSTEM_COLUMN_KINDS, SORTABLE_SYSTEM_DATE_COLUMNS, AppElementsSchema, AppDefinitionSchema, collectScriptReferences, scriptCompatWarnings, parseAppDefinition, applyAppDefinitionPatch, init_definition, upgradeAppDefinition, init_format_upgrades, decodeAppDefinition, appDefinitionNeedsRepair, createApp, getApp, listApps, listAppRecords, updateApp, deleteApp, init_store2, getScriptAppTypes, init_script_types, SCRIPT_SDK_TYPES, scriptSdkTypesWithGeneratedApis, SCRIPT_STDLIB_MODULE_TYPES, scriptStdlibTypesWithGeneratedApis, typecheckWithAmbient, typecheckScript, init_typecheck, parseSkillContent, init_skill_parser };
|
|
188717
|
+
export { require_dist, getMcpOAuthToken, findReusableMcpOAuthClient, invalidateMcpOAuthClient, upsertMcpOAuthToken, applyMcpOAuthRefresh, markMcpOAuthTokenStatus, deleteMcpOAuthToken, insertMcpOAuthPending, consumeMcpOAuthPending, gcMcpOAuthPending, setMcpServerAuthMethod, init_mcp_oauth, ensureMcpToken, init_ensure_mcp_token, callMcpServerTool, init_mcp_proxy, resolveSqlDsn, runReadOnlyQuery, init_sql_connections, listVendoredOpenapiEntries, init_vendored_openapi, ConnectionAuthInputSchema, SqlDsnInputSchema, connectionAuthSummary, listRelationalCredentialBindings, getCredentialBindingById, findCredentialBindingByIdentity, upsertCredentialBinding, disableCredentialBinding, listScriptConnections, listScriptConnectionsAsync, getScriptConnectionById, ScriptConnectionConflictError, connectionAuthInputFromFlat, upsertScriptConnection, refreshScriptConnection, setScriptConnectionEnabled, deleteScriptConnection, getScriptApiConnectionDescriptors, getScriptMcpConnectionDescriptors, getScriptApiTypes, getScriptMcpTypes, init_script_connections, oauthAppToProviderConfig, getOAuthProviderConfig, getOAuthBindingTokenStatus, init_oauth_credential_bindings, buildScriptCredentialBindingsWithFailures, init_script_credential_broker, DEFAULT_SANDBOX_LIMITS, buildSandboxedCommand, sandboxSpawnEnv, createCappedStreamState, snapshotCapped, readStreamCapped, init_sandboxed_process, writeBareImportShim, init_native, isExecutorAllowedByDeployment, init_registry, MIN_SCRIPT_WALL_CLOCK_MS, SCRIPT_LONG_TIMEOUT_HINT_MS, MAX_SCRIPT_WALL_CLOCK_MS, DEFAULT_SCRIPT_RESOURCES, init_types3, HOST_VALIDATED_ARGS, init_host_validated_args, require_typescript2, checkImportAllowlist, validateScriptImports, init_import_allowlist, runScriptWithRunCredential, runScriptAsUserWithRunCredential, init_run_credential, resolveSeededEnabled, init_automation_toggle, getSeedState, recordSeedState, deleteSeedState, init_state_db, canonicalJson, seededWorkflowState, workflowsSeeder, init_workflows_seeder, extractScriptSignature, init_extract_signature, extractArgsJsonSchema, init_extract_schema, getSavedScriptOwnerAgentId, runSavedScriptAsAgent, init_run_saved, checkQuickJSCompat, quickJSCompatWarnings, init_quickjs_compat, resolveSyncRunAs, init_sync_run_as, AppNameSchema, ScalarColumnKindSchema, isIso8601Date, jsonColumnSizeLabel, jsonColumnValueIssue, isValidColumnValue, SYSTEM_COLUMN_KINDS, SORTABLE_SYSTEM_DATE_COLUMNS, AppElementsSchema, AppDefinitionSchema, collectScriptReferences, scriptCompatWarnings, parseAppDefinition, applyAppDefinitionPatch, init_definition, upgradeAppDefinition, init_format_upgrades, decodeAppDefinition, appDefinitionNeedsRepair, createApp, getApp, listApps, listAppRecords, updateApp, deleteApp, init_store2, getScriptAppTypes, init_script_types, SCRIPT_SDK_TYPES, scriptSdkTypesWithGeneratedApis, SCRIPT_STDLIB_MODULE_TYPES, scriptStdlibTypesWithGeneratedApis, typecheckWithAmbient, typecheckScript, init_typecheck, parseSkillContent, init_skill_parser };
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
SteeringBlockedError,
|
|
15
15
|
init_steering2,
|
|
16
16
|
init_db4
|
|
17
|
-
} from "./cli-
|
|
17
|
+
} from "./cli-erh1rgh4.js";
|
|
18
18
|
import {
|
|
19
19
|
isBlockExternalEnabled2,
|
|
20
20
|
invalidateChannelExternality2,
|
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
shouldBlockChannel2,
|
|
23
23
|
leaveExternalChannel2,
|
|
24
24
|
init_external_channel
|
|
25
|
-
} from "./cli-
|
|
25
|
+
} from "./cli-ka13xx6b.js";
|
|
26
26
|
import {
|
|
27
27
|
workflowEventBus2,
|
|
28
28
|
init_event_bus
|
|
@@ -42,7 +42,7 @@ import {
|
|
|
42
42
|
init_render_v2,
|
|
43
43
|
registerTreeMessage,
|
|
44
44
|
init_watcher
|
|
45
|
-
} from "./cli-
|
|
45
|
+
} from "./cli-69eq6gdk.js";
|
|
46
46
|
import {
|
|
47
47
|
dispatchPre2,
|
|
48
48
|
init_dispatcher,
|
|
@@ -60,7 +60,7 @@ import {
|
|
|
60
60
|
slackInboundMessageText,
|
|
61
61
|
collectSlackMessageFiles,
|
|
62
62
|
init_message_text
|
|
63
|
-
} from "./cli-
|
|
63
|
+
} from "./cli-dnvmwsvc.js";
|
|
64
64
|
import {
|
|
65
65
|
requestSlackThreadSteering,
|
|
66
66
|
formatSlackSteeringAck,
|
|
@@ -71,7 +71,7 @@ import {
|
|
|
71
71
|
getBufferMessageCount2,
|
|
72
72
|
instantFlush2,
|
|
73
73
|
init_thread_buffer
|
|
74
|
-
} from "./cli-
|
|
74
|
+
} from "./cli-cs26ed89.js";
|
|
75
75
|
import {
|
|
76
76
|
wasEventSeen,
|
|
77
77
|
init_event_dedup
|
|
@@ -82,7 +82,7 @@ import {
|
|
|
82
82
|
getSlackUserTeam,
|
|
83
83
|
isOurSlackTeam,
|
|
84
84
|
init_enrich
|
|
85
|
-
} from "./cli-
|
|
85
|
+
} from "./cli-gc7jkf4a.js";
|
|
86
86
|
import {
|
|
87
87
|
isSlackLeaveThreadDisabled,
|
|
88
88
|
SLACK_LEFT_THREAD_CONFIRMATION,
|
|
@@ -90,7 +90,7 @@ import {
|
|
|
90
90
|
leaveSlackThread,
|
|
91
91
|
shouldSkipLeftSlackThread,
|
|
92
92
|
init_left_threads
|
|
93
|
-
} from "./cli-
|
|
93
|
+
} from "./cli-4djg31jh.js";
|
|
94
94
|
import {
|
|
95
95
|
init_zod
|
|
96
96
|
} from "./cli-96234j5w.js";
|
|
@@ -6,17 +6,17 @@ import {
|
|
|
6
6
|
init_key_bootstrap,
|
|
7
7
|
getDbClient2,
|
|
8
8
|
init_db4
|
|
9
|
-
} from "./cli-
|
|
9
|
+
} from "./cli-erh1rgh4.js";
|
|
10
10
|
import {
|
|
11
11
|
AgentFsRequestError2,
|
|
12
12
|
agentFsRequest2,
|
|
13
13
|
resolveAgentFsServiceCredentials2,
|
|
14
14
|
init_agent_fs_provision
|
|
15
|
-
} from "./cli-
|
|
15
|
+
} from "./cli-a6rzw649.js";
|
|
16
16
|
import {
|
|
17
17
|
applyFileChange,
|
|
18
18
|
init_objects
|
|
19
|
-
} from "./cli-
|
|
19
|
+
} from "./cli-wdtqkqnq.js";
|
|
20
20
|
import {
|
|
21
21
|
FilesError,
|
|
22
22
|
init_provider,
|
|
@@ -27,13 +27,13 @@ import {
|
|
|
27
27
|
autoIndexMemoryFile,
|
|
28
28
|
fetchConcurrentContext,
|
|
29
29
|
summarizeTranscript
|
|
30
|
-
} from "./cli-
|
|
30
|
+
} from "./cli-bp2rt28p.js";
|
|
31
31
|
import {
|
|
32
32
|
applyReasoningEffort
|
|
33
33
|
} from "./cli-vdfngx2g.js";
|
|
34
34
|
import {
|
|
35
35
|
resolveOpencodeSdkSpecifier
|
|
36
|
-
} from "./cli-
|
|
36
|
+
} from "./cli-zm6bkx3e.js";
|
|
37
37
|
import {
|
|
38
38
|
fetchInstalledMcpServers
|
|
39
39
|
} from "./cli-5y2fvw4z.js";
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
} from "./cli-0xwb7zpt.js";
|
|
6
6
|
import {
|
|
7
7
|
runStopHookSessionSummarySubprocess
|
|
8
|
-
} from "./cli-
|
|
8
|
+
} from "./cli-62fjschk.js";
|
|
9
9
|
import {
|
|
10
10
|
redactRateLimitEventLine,
|
|
11
11
|
SessionErrorTracker,
|
|
@@ -1274,7 +1274,7 @@ class ClaudeAdapter2 {
|
|
|
1274
1274
|
if (transport === "sdk" && isClaudeBridgeEffective(sourceEnv)) {
|
|
1275
1275
|
throw new Error("CLAUDE_TRANSPORT=sdk cannot run with an effective Claude Bridge configuration. Select CLI transport or disable the bridge.");
|
|
1276
1276
|
}
|
|
1277
|
-
const claudeSdk = transport === "sdk" ? await import("./claude-sdk-session-
|
|
1277
|
+
const claudeSdk = transport === "sdk" ? await import("./claude-sdk-session-5wbwxy8c.js") : undefined;
|
|
1278
1278
|
claudeSdk?.validateClaudeSdkAdditionalArgs([
|
|
1279
1279
|
...claudeBinaryArgv.slice(1),
|
|
1280
1280
|
...config.additionalArgs ?? []
|
|
@@ -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: "2.13.
|
|
10
|
+
version: "2.13.2",
|
|
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",
|
|
@@ -214,19 +214,20 @@ var init_package = __esm(() => {
|
|
|
214
214
|
bun: ">=1.3.12"
|
|
215
215
|
},
|
|
216
216
|
dependencies: {
|
|
217
|
-
"@agentclientprotocol/sdk": "2.
|
|
217
|
+
"@agentclientprotocol/sdk": "2.7.0",
|
|
218
218
|
"@ai-sdk/openai": "^3.0.41",
|
|
219
|
-
"@anthropic-ai/claude-agent-sdk": "0.3.
|
|
219
|
+
"@anthropic-ai/claude-agent-sdk": "0.3.325",
|
|
220
220
|
"@anthropic-ai/sdk": "^1.8.0",
|
|
221
221
|
"@asteasolutions/zod-to-openapi": "^8.0.0",
|
|
222
222
|
"@aws-sdk/client-bedrock": "3.1048.0",
|
|
223
223
|
"@boxd-sh/sdk": "0.2.20",
|
|
224
224
|
"@chat-adapter/discord": "4.45.0",
|
|
225
|
+
"@chat-adapter/shared": "4.45.0",
|
|
225
226
|
"@chat-adapter/slack": "4.45.0",
|
|
226
227
|
"@chat-adapter/teams": "4.45.0",
|
|
227
228
|
"@chat-adapter/telegram": "4.45.0",
|
|
228
229
|
"@cursor/sdk": "1.3.1",
|
|
229
|
-
"@desplega.ai/agent-fs-just-bash": "0.18.
|
|
230
|
+
"@desplega.ai/agent-fs-just-bash": "0.18.28",
|
|
230
231
|
"@desplega.ai/business-use": "^0.4.2",
|
|
231
232
|
"@earendil-works/pi-agent-core": "^1.5.2",
|
|
232
233
|
"@earendil-works/pi-ai": "^1.5.2",
|
|
@@ -238,7 +239,7 @@ var init_package = __esm(() => {
|
|
|
238
239
|
"@json-render/core": "0.22.0",
|
|
239
240
|
"@linear/sdk": "^77.0.0",
|
|
240
241
|
"@modelcontextprotocol/sdk": "1.32.1",
|
|
241
|
-
"@openai/codex": "0.
|
|
242
|
+
"@openai/codex": "0.169.0",
|
|
242
243
|
"@openfort/openfort-node": "^0.9.1",
|
|
243
244
|
"@opentelemetry/api": "^1.9.1",
|
|
244
245
|
"@opentelemetry/api-logs": "^0.218.0",
|
|
@@ -59482,7 +59482,7 @@ function loadAllHighlightLanguages() {
|
|
|
59482
59482
|
if (!allLanguagesPromise) {
|
|
59483
59483
|
allLanguagesPromise = new Promise((resolve) => {
|
|
59484
59484
|
setImmediate(() => {
|
|
59485
|
-
import("./index-
|
|
59485
|
+
import("./index-6h3r0vpe.js").then((m)=>__toESM(m.default,1)).then(() => resolve(), () => {
|
|
59486
59486
|
resolve();
|
|
59487
59487
|
});
|
|
59488
59488
|
});
|
|
@@ -65897,7 +65897,7 @@ function getCreateJiti() {
|
|
|
65897
65897
|
}
|
|
65898
65898
|
var virtualModulesPromise;
|
|
65899
65899
|
function getVirtualModules() {
|
|
65900
|
-
virtualModulesPromise ??= import("./virtual-modules-
|
|
65900
|
+
virtualModulesPromise ??= import("./virtual-modules-78a6yw71.js").then((module) => module.VIRTUAL_MODULES);
|
|
65901
65901
|
return virtualModulesPromise;
|
|
65902
65902
|
}
|
|
65903
65903
|
var _aliases = null;
|
|
@@ -90060,7 +90060,7 @@ function parseCodemodeSource(input) {
|
|
|
90060
90060
|
}
|
|
90061
90061
|
|
|
90062
90062
|
// node_modules/@earendil-works/pi-coding-agent/dist/extensions/codemode/execute.lazy.js
|
|
90063
|
-
var loadCodemodeExecutor = () => import("./execute-
|
|
90063
|
+
var loadCodemodeExecutor = () => import("./execute-3mys4nta.js");
|
|
90064
90064
|
|
|
90065
90065
|
// node_modules/@earendil-works/pi-coding-agent/dist/extensions/codemode/renderer.js
|
|
90066
90066
|
var CODE_PREVIEW_LINES = 10;
|
|
@@ -91205,7 +91205,7 @@ function createMcpResourceToolDefinitions(options) {
|
|
|
91205
91205
|
}
|
|
91206
91206
|
|
|
91207
91207
|
// node_modules/@earendil-works/pi-coding-agent/dist/extensions/mcp/runtime.lazy.js
|
|
91208
|
-
var loadMcpRuntime = () => import("./runtime-
|
|
91208
|
+
var loadMcpRuntime = () => import("./runtime-x0s55z2t.js");
|
|
91209
91209
|
|
|
91210
91210
|
// node_modules/@earendil-works/pi-coding-agent/dist/utils/clipboard.js
|
|
91211
91211
|
import { randomUUID as randomUUID3 } from "node:crypto";
|
|
@@ -96824,7 +96824,7 @@ var builtInExtensions = [
|
|
|
96824
96824
|
];
|
|
96825
96825
|
|
|
96826
96826
|
// node_modules/@earendil-works/pi-coding-agent/dist/extensions/mcp/cli.lazy.js
|
|
96827
|
-
var loadMcpCommand = () => import("./cli-
|
|
96827
|
+
var loadMcpCommand = () => import("./cli-fgm2mad9.js");
|
|
96828
96828
|
|
|
96829
96829
|
// node_modules/@earendil-works/pi-coding-agent/dist/migrations.js
|
|
96830
96830
|
import { existsSync as existsSync22, mkdirSync as mkdirSync11, readdirSync as readdirSync10, readFileSync as readFileSync17, renameSync as renameSync2, rmSync as rmSync4, writeFileSync as writeFileSync11 } from "fs";
|
|
@@ -99414,7 +99414,7 @@ function playEasterEgg3d(tui, egg) {
|
|
|
99414
99414
|
if (tui.hasOverlay())
|
|
99415
99415
|
return true;
|
|
99416
99416
|
const screen = tui.getScreenLines();
|
|
99417
|
-
import("./easter-egg-3d-
|
|
99417
|
+
import("./easter-egg-3d-ac9tv9a6.js").then((module) => module.playEasterEgg3d(tui, screen, egg), () => {});
|
|
99418
99418
|
return true;
|
|
99419
99419
|
}
|
|
99420
99420
|
function playPiLogo3d(tui, column, row) {
|
|
@@ -13,10 +13,10 @@ import {
|
|
|
13
13
|
WORKFLOW_CONTEXT_REQUESTER_SQL,
|
|
14
14
|
init_user_references,
|
|
15
15
|
init_db4
|
|
16
|
-
} from "./cli-
|
|
16
|
+
} from "./cli-erh1rgh4.js";
|
|
17
17
|
import {
|
|
18
18
|
nextRestRatio2
|
|
19
|
-
} from "./cli-
|
|
19
|
+
} from "./cli-zqy28rwx.js";
|
|
20
20
|
import {
|
|
21
21
|
scrubSecrets,
|
|
22
22
|
init_secret_scrubber
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
getSwarmConfigs2,
|
|
17
17
|
upsertSwarmConfig2,
|
|
18
18
|
init_db4
|
|
19
|
-
} from "./cli-
|
|
19
|
+
} from "./cli-erh1rgh4.js";
|
|
20
20
|
import {
|
|
21
21
|
createRuntimeProvider,
|
|
22
22
|
init_runtime_providers
|
|
@@ -30,7 +30,7 @@ import {
|
|
|
30
30
|
init_session_token_connections,
|
|
31
31
|
insertSessionToken,
|
|
32
32
|
init_users
|
|
33
|
-
} from "./cli-
|
|
33
|
+
} from "./cli-getrvmtx.js";
|
|
34
34
|
import {
|
|
35
35
|
RuntimeControllerCreateSchema,
|
|
36
36
|
RuntimeControllerUpdateSchema,
|
|
@@ -5,12 +5,12 @@ import {
|
|
|
5
5
|
import {
|
|
6
6
|
publicEndpointSsrfOptions,
|
|
7
7
|
init_mcp_wrapper
|
|
8
|
-
} from "./cli-
|
|
8
|
+
} from "./cli-xysy1g8x.js";
|
|
9
9
|
import {
|
|
10
10
|
assertUrlSafe,
|
|
11
11
|
normalizeOrgWebsite,
|
|
12
12
|
init_org_website
|
|
13
|
-
} from "./cli-
|
|
13
|
+
} from "./cli-erh1rgh4.js";
|
|
14
14
|
import {
|
|
15
15
|
getRouteProvider,
|
|
16
16
|
createScopedFetch,
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getDbClient2,
|
|
3
3
|
init_db4
|
|
4
|
-
} from "./cli-
|
|
4
|
+
} from "./cli-erh1rgh4.js";
|
|
5
5
|
import {
|
|
6
6
|
agentFsClientFor,
|
|
7
7
|
init_agent_fs_identity
|
|
8
|
-
} from "./cli-
|
|
8
|
+
} from "./cli-j2ybkdk2.js";
|
|
9
9
|
import {
|
|
10
10
|
FilesError,
|
|
11
11
|
normalizeStoredKey,
|
|
@@ -307,7 +307,7 @@ async function createObject(input) {
|
|
|
307
307
|
return withLink(row);
|
|
308
308
|
}
|
|
309
309
|
function watchDrive(orgId, driveId) {
|
|
310
|
-
import("./object-webhooks-
|
|
310
|
+
import("./object-webhooks-ac7v2q5p.js").then(({ ensureObjectWebhook }) => ensureObjectWebhook(orgId, driveId)).catch(() => {
|
|
311
311
|
return;
|
|
312
312
|
});
|
|
313
313
|
}
|