@desplega.ai/agent-swarm 2.0.0 → 2.1.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-sj2g0m84.js → acp-adapter-kr4abrsk.js} +10 -10
- package/dist/{actions-fegk44gr.js → actions-eh4g6w2r.js} +27 -27
- package/dist/{amp-adapter-ad8ft89x.js → amp-adapter-7h7wdt8q.js} +5 -5
- package/dist/{app-kfvgbvzy.js → app-7k8s9w5p.js} +9 -9
- package/dist/{assistant-z7zdy9ja.js → assistant-wswt2y7p.js} +28 -28
- package/dist/{boot-reembed-j8xa181e.js → boot-reembed-9apm9qw6.js} +7 -7
- package/dist/{boot-reembed-5c2z0mbe.js → boot-reembed-whzbdthj.js} +7 -7
- package/dist/{boot-scrub-sweep-hnkn3rgt.js → boot-scrub-sweep-ndzmvmgt.js} +8 -8
- package/dist/{boot-seeds-kwjq4d2z.js → boot-seeds-e9sta0yt.js} +13 -11
- package/dist/{claude-adapter-9vmvpvgd.js → claude-adapter-4mqd3r6r.js} +11 -11
- package/dist/{claude-managed-adapter-k9qae05j.js → claude-managed-adapter-9wswb52m.js} +3 -3
- package/dist/{claude-managed-setup-q54zx5q2.js → claude-managed-setup-tpe1effx.js} +4 -4
- package/dist/{claude-sdk-session-9jye6cxr.js → claude-sdk-session-q49ghmh9.js} +10340 -10197
- package/dist/{cli-ke896fcf.js → cli-01xvj1rq.js} +10 -10
- package/dist/{cli-tr4sxp68.js → cli-035vekcw.js} +2 -2
- package/dist/{cli-z5jjpaxw.js → cli-0pd8hzhc.js} +3 -3
- package/dist/{cli-n5vwg842.js → cli-0veb92a3.js} +6 -1
- package/dist/{cli-wayw93nt.js → cli-10jesr25.js} +3 -3
- package/dist/{cli-se8w6wny.js → cli-1y7yywmj.js} +1 -1
- package/dist/{cli-v1yb0rqb.js → cli-20krdhz5.js} +47 -19
- package/dist/{cli-d5f9ed5c.js → cli-29rja109.js} +39 -20
- package/dist/{cli-apx87jne.js → cli-2pwa0q4d.js} +15 -4
- package/dist/{cli-ee9gtz70.js → cli-4mengw46.js} +348 -25
- package/dist/{cli-03gedhng.js → cli-5twdke5x.js} +6 -6
- package/dist/{cli-6razj6t4.js → cli-711vwbxn.js} +2 -2
- package/dist/{cli-s2sp957d.js → cli-78vv7446.js} +1 -1
- package/dist/{cli-3fbmmawm.js → cli-7n6s5man.js} +4 -4
- package/dist/{cli-hnhtk6cj.js → cli-8wwxw8a3.js} +1 -1
- package/dist/{cli-hnmhtzvh.js → cli-9jzdj90z.js} +2 -0
- package/dist/{cli-skxvvpap.js → cli-cvv9k0hh.js} +28 -25
- package/dist/{cli-74ahz61x.js → cli-d9286m9h.js} +2 -2
- package/dist/{cli-4jxm2qtz.js → cli-gxzkg1de.js} +28 -16
- package/dist/{cli-zkpks3r3.js → cli-h1arqn31.js} +1 -1
- package/dist/{cli-r62a35ea.js → cli-hqr88ew6.js} +1 -1
- package/dist/{cli-ra0xzggj.js → cli-j67mh2vg.js} +2 -2
- package/dist/{cli-29jc5q7w.js → cli-ksphgh48.js} +2 -2
- package/dist/{cli-eejsgvm4.js → cli-mgz4nbgg.js} +4 -4
- package/dist/{cli-vatyhshy.js → cli-mz5as5ha.js} +4 -4
- package/dist/{cli-f7kr7svz.js → cli-n8ndw8j7.js} +2 -2
- package/dist/{cli-1e4b6bzh.js → cli-naqzr17j.js} +7 -7
- package/dist/{cli-q0ke1yww.js → cli-nm1p8jfr.js} +6 -6
- package/dist/{cli-m50t4309.js → cli-p3zbc1rw.js} +5 -5
- package/dist/{cli-cgtksawx.js → cli-pe05f8yk.js} +23 -3
- package/dist/{cli-vdach5a9.js → cli-qmzsbkvy.js} +4 -4
- package/dist/{cli-n3hzg89b.js → cli-qnm4e9e4.js} +57 -579
- package/dist/{cli-s4setq91.js → cli-qqy4q48b.js} +3 -3
- package/dist/{cli-k382tshb.js → cli-r35rw5de.js} +8 -7
- package/dist/{cli-k3dp5tpf.js → cli-r610p9bs.js} +2 -2
- package/dist/{cli-e6mpjhed.js → cli-rc6pf5kv.js} +1 -1
- package/dist/{cli-3dj8k4vy.js → cli-rdxm77k3.js} +1 -1
- package/dist/{cli-tqaazemc.js → cli-s69nfyeh.js} +1 -1
- package/dist/{cli-6jyj59nb.js → cli-sawv63e8.js} +2 -2
- package/dist/{cli-q50942rs.js → cli-sg19gbf0.js} +1 -1
- package/dist/{cli-p1x85d2t.js → cli-shk7r5cs.js} +12 -9
- package/dist/{cli-przpmdgr.js → cli-sksetb2q.js} +11 -1
- package/dist/{cli-d2qr7aj4.js → cli-t02z59f2.js} +1 -1
- package/dist/{cli-j0pfptdp.js → cli-v7g551te.js} +39 -43
- package/dist/{cli-bzszjf2p.js → cli-vgqzp4em.js} +519 -126
- package/dist/cli-wfnemr1t.js +86 -0
- package/dist/{cli-ne236afy.js → cli-wms6x9db.js} +8 -8
- package/dist/{cli-5hkm7whv.js → cli-x1r545x8.js} +1 -1
- package/dist/{cli-kt6zqg0e.js → cli-xczsgshn.js} +2 -2
- package/dist/{cli-ef1hg1wv.js → cli-y3167wt1.js} +430 -238
- package/dist/{cli-tsde1hdr.js → cli-yjmqpxt3.js} +12 -11
- package/dist/{cli-9nfx44eh.js → cli-z780ec7c.js} +1 -1
- package/dist/{cli-r2pnvj8g.js → cli-zm9t2vde.js} +2 -2
- package/dist/cli.js +24 -23
- package/dist/{codex-adapter-y81sssk0.js → codex-adapter-4z16v9n0.js} +8 -8
- package/dist/{codex-login-f2rcfpp9.js → codex-login-pkepy2j1.js} +2 -2
- package/dist/{codex-session-runner-8vx4j6a9.js → codex-session-runner-rvms9y2x.js} +8 -8
- package/dist/{commands-kcpvpcrr.js → commands-2a9rtyat.js} +8 -8
- package/dist/{controller-ywrmt6yd.js → controller-3k3madbn.js} +4 -4
- package/dist/{controllers-connect-kwpvj3rf.js → controllers-connect-v9yn8zb9.js} +30 -30
- package/dist/{cursor-adapter-cehv1qns.js → cursor-adapter-98gbhyzn.js} +4 -4
- package/dist/{db-ww5d7jq3.js → db-eywwsnjw.js} +9 -7
- package/dist/{db-k8ankj20.js → db-ncypk9np.js} +9 -9
- package/dist/{devin-adapter-x1022qb1.js → devin-adapter-zeq8b9gz.js} +2 -2
- package/dist/{dispatcher-e8gq5m68.js → dispatcher-w94kc575.js} +26 -26
- package/dist/{docker-ff6y1190.js → docker-b1e4cqab.js} +2 -2
- package/dist/{dsh-adapter-3epjm3af.js → dsh-adapter-47ztej36.js} +4 -4
- package/dist/{e2b-8ygwhg0f.js → e2b-bbt8ey45.js} +3 -3
- package/dist/{e2b-swhnpw3n.js → e2b-dp804sen.js} +3 -3
- package/dist/{event-bus-6axnngdj.js → event-bus-j2jdg3qb.js} +2 -2
- package/dist/{external-channel-h3359cwn.js → external-channel-zrkg8ar9.js} +8 -8
- package/dist/{grok-adapter-0d4x7gkx.js → grok-adapter-s9ncp9vy.js} +11 -11
- package/dist/{handlers-an1gzv21.js → handlers-kqftvjgw.js} +29 -29
- package/dist/{heartbeat-6dakeb61.js → heartbeat-9q96p8v9.js} +31 -31
- package/dist/{hook-6v6cv6d5.js → hook-56qe10dp.js} +7 -7
- package/dist/{hook-sa5xye4y.js → hook-yy6rw42k.js} +8 -8
- package/dist/{http-r7f3eky0.js → http-r2dnb8f8.js} +963 -75
- package/dist/{index-7ep4gzdk.js → index-3gtmkhc6.js} +26 -26
- package/dist/{index-v1v6n7hg.js → index-3k5hkz7r.js} +31 -31
- package/dist/{index-rmpw9a8q.js → index-5e101240.js} +26 -26
- package/dist/{index-s2wxgzr0.js → index-5wyfjc2c.js} +392 -15
- package/dist/{index-zk96aq1k.js → index-vxvhxxbn.js} +7 -7
- package/dist/{keepalive-be9vwy5h.js → keepalive-psj6j54c.js} +9 -9
- package/dist/{lead-0861cwrf.js → lead-hajz4688.js} +43 -43
- package/dist/{maintenance-mzzgc8bn.js → maintenance-ps02sb5m.js} +7 -7
- package/dist/{node-mn1zs7an.js → node-mwb5r697.js} +1 -1
- package/dist/{oauth-refresh-sweep-cpdnfwdj.js → oauth-refresh-sweep-0284h93b.js} +8 -8
- package/dist/{onboard-fh8qs4r3.js → onboard-rbf6bg01.js} +2 -2
- package/dist/{opencode-adapter-nm42wwj8.js → opencode-adapter-13dcatgq.js} +8 -8
- package/dist/{otel-impl-x6c1c9g4.js → otel-impl-zvqcbhp7.js} +2 -2
- package/dist/{pi-mono-adapter-9n2ya240.js → pi-mono-adapter-xxy47q4v.js} +7 -7
- package/dist/{pricing-refresh-qb0rv0ap.js → pricing-refresh-kefx9v3t.js} +9 -9
- package/dist/{rbac-roles-1gzdwbh1.js → rbac-roles-3m36rxm2.js} +8 -8
- package/dist/{rbac-roles-3mraey52.js → rbac-roles-z76xv0hq.js} +9 -9
- package/dist/{render-v2-agpa45zz.js → render-v2-wz73bs25.js} +9 -9
- package/dist/{resume-x0ydy9s9.js → resume-k4wzge8w.js} +14 -14
- package/dist/{setup-as9ga0d6.js → setup-2fp2pypp.js} +2 -2
- package/dist/{work-objects-y5g1y7ev.js → work-objects-6k0ywz3m.js} +29 -29
- package/dist/{worker-860c3e38.js → worker-5v3rxsdh.js} +43 -43
- package/dist/{x-m477fr0h.js → x-4mtdeym1.js} +2 -2
- package/openapi.json +777 -6
- package/package.json +8 -7
- package/src/agentmail/handlers.ts +21 -11
- package/src/apps/definition.ts +16 -0
- package/src/azure-devops/api.ts +52 -2
- package/src/azure-devops/boards-sync.ts +50 -20
- package/src/azure-devops/index.ts +1 -0
- package/src/azure-devops/outbound.ts +95 -0
- package/src/be/boot-seeds.ts +11 -0
- package/src/be/db/model-profiles.ts +315 -0
- package/src/be/db/tasks/read.ts +7 -0
- package/src/be/db.ts +53 -47
- package/src/be/migrations/219_relabel_pi_context_compactions.sql +22 -0
- package/src/be/migrations/220_model_profiles.sql +137 -0
- package/src/be/model-tier-resolution.ts +145 -11
- package/src/be/model-validation.ts +8 -1
- package/src/be/scripts/typecheck.ts +12 -0
- package/src/be/secret-registry.ts +6 -2
- package/src/be/seed-model-profiles.ts +41 -0
- package/src/be/seed-scripts/catalog/heartbeat-jev-gate.ts +368 -0
- package/src/be/seed-scripts/index.ts +9 -0
- package/src/be/swarm-config-guard.ts +1 -0
- package/src/commands/runner.ts +3 -17
- package/src/extensions/catalog.generated.json +17 -0
- package/src/extensions/contract-types.generated.ts +1 -1
- package/src/extensions/loader.ts +10 -5
- package/src/heartbeat/heartbeat.ts +2 -1
- package/src/http/agents.ts +49 -2
- package/src/http/all-routes.ts +1 -0
- package/src/http/apps.ts +30 -3
- package/src/http/config.ts +26 -2
- package/src/http/core.ts +4 -0
- package/src/http/index.ts +11 -1
- package/src/http/model-profiles.ts +303 -0
- package/src/http/pages-public.ts +11 -5
- package/src/http/poll.ts +16 -5
- package/src/http/script-runs.ts +1 -1
- package/src/http/scripts.ts +25 -2
- package/src/http/tasks.ts +18 -0
- package/src/http/webhooks.ts +1 -2
- package/src/pages/feedback-overlay.ts +65 -6
- package/src/providers/acp-targets.ts +1 -1
- package/src/providers/amp-adapter.ts +1 -1
- package/src/providers/dsh-adapter.ts +1 -1
- package/src/providers/pi-mono-extension.ts +17 -3
- package/src/providers/reasoning-effort.ts +10 -0
- package/src/rbac/legacy-policy.ts +8 -0
- package/src/rbac/permissions.ts +5 -0
- package/src/scheduler/deferred-task-waits.ts +18 -5
- package/src/scheduler/scheduler.ts +7 -1
- package/src/scripts-runtime/executors/quickjs-prelude.ts +75 -6
- package/src/scripts-runtime/executors/quickjs-runner.ts +85 -8
- package/src/scripts-runtime/executors/quickjs-web-shims.ts +1041 -0
- package/src/scripts-runtime/extract-args-schema.ts +9 -8
- package/src/scripts-runtime/quickjs-compat.ts +464 -0
- package/src/scripts-runtime/sdk-allowlist.ts +4 -0
- package/src/scripts-runtime/types/stdlib.d.ts +12 -0
- package/src/scripts-runtime/types/swarm-extension.d.ts +3 -0
- package/src/scripts-runtime/types/swarm-sdk.d.ts +12 -0
- package/src/server.ts +10 -1
- package/src/slack/blocks.ts +4 -2
- package/src/slack/reaction-shortcode.ts +14 -0
- package/src/slack/render-v2.ts +12 -7
- package/src/slack/responses.ts +5 -4
- package/src/slack/thread-buffer.ts +41 -22
- package/src/tasks/worker-follow-up.ts +11 -2
- package/src/tests/agentmail-filters.test.ts +47 -0
- package/src/tests/apps-spike2.test.ts +35 -0
- package/src/tests/azure-devops-outbound.test.ts +420 -0
- package/src/tests/db-task-read-contract.test.ts +2 -0
- package/src/tests/db-task-write-contract.test.ts +1 -0
- package/src/tests/deferred-task-wake.test.ts +78 -1
- package/src/tests/docs-index-footprint.test.js +2 -2
- package/src/tests/dsh-adapter.test.ts +1 -1
- package/src/tests/env-flag.test.ts +1 -0
- package/src/tests/extensions-catalog.test.ts +1 -0
- package/src/tests/extensions-example-comms-adherence-gate.test.ts +413 -0
- package/src/tests/extensions-loader.test.ts +15 -0
- package/src/tests/heartbeat-jev-gate-credentials.test.ts +168 -0
- package/src/tests/heartbeat-jev-gate.test.ts +385 -0
- package/src/tests/model-profile-backcompat.test.ts +327 -0
- package/src/tests/model-profile-providers.test.ts +302 -0
- package/src/tests/model-profile-runtime-secrets.test.ts +223 -0
- package/src/tests/model-profiles-api.test.ts +614 -0
- package/src/tests/pages-feedback-keys.test.ts +121 -0
- package/src/tests/pages-feedback.test.ts +3 -0
- package/src/tests/pi-context-compaction.test.ts +193 -0
- package/src/tests/profile-claim.test.ts +269 -0
- package/src/tests/quickjs-compat.test.ts +213 -0
- package/src/tests/rbac-engine.test.ts +21 -0
- package/src/tests/script-connections.test.ts +4 -0
- package/src/tests/script-executor-conformance.test.ts +252 -1
- package/src/tests/script-executor-quickjs.test.ts +96 -0
- package/src/tests/script-runs-http.test.ts +89 -0
- package/src/tests/scripts-http.test.ts +16 -0
- package/src/tests/secret-scrubber.test.ts +10 -0
- package/src/tests/seed-model-profiles.test.ts +174 -0
- package/src/tests/seed-scripts.test.ts +2 -2
- package/src/tests/skill-invocations.test.ts +4 -2
- package/src/tests/slack-blocks.test.ts +36 -0
- package/src/tests/slack-inline-output.test.ts +14 -0
- package/src/tests/slack-reaction-config.test.ts +20 -0
- package/src/tests/slack-render-v2.test.ts +37 -0
- package/src/tests/slack-thread-buffer.test.ts +98 -1
- package/src/tests/workflow-llm.test.ts +61 -0
- package/src/tools/model-profiles/list-model-profiles.ts +54 -0
- package/src/tools/request-human-input.ts +11 -3
- package/src/tools/script-apis.ts +5 -1
- package/src/tools/script-upsert.ts +4 -1
- package/src/tools/send-task.ts +24 -1
- package/src/tools/system-one-decide.ts +104 -0
- package/src/tools/task-action.ts +22 -1
- package/src/tools/tool-config.ts +6 -0
- package/src/types.ts +36 -1
- package/src/utils/secret-scrubber.ts +19 -12
- package/src/utils/vcs-repo-match.ts +29 -0
- package/src/workflows/executors/raw-llm.ts +8 -3
- package/src/workflows/executors/system-one-decision.ts +21 -11
- package/src/workflows/executors/workflow-llm.ts +22 -0
- package/src/workflows/index.ts +21 -12
- package/templates/extensions/README.md +1 -0
- package/templates/extensions/comms-adherence-gate/README.md +88 -0
- package/templates/extensions/comms-adherence-gate/hooks.ts +489 -0
- package/templates/extensions/comms-adherence-gate/manifest.json +8 -0
- package/dist/cli-5t4f29ez.js +0 -33
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
generateRandomCodeVerifier,
|
|
13
13
|
generateRandomState,
|
|
14
14
|
oauthAppRowToProviderConfig
|
|
15
|
-
} from "./cli-
|
|
15
|
+
} from "./cli-711vwbxn.js";
|
|
16
16
|
import {
|
|
17
17
|
CredentialBroker,
|
|
18
18
|
DEFAULT_CREDENTIAL_BINDINGS,
|
|
@@ -49,11 +49,11 @@ import {
|
|
|
49
49
|
updateAuthorizationTokens,
|
|
50
50
|
upsertAuthorization,
|
|
51
51
|
upsertSwarmConfig
|
|
52
|
-
} from "./cli-
|
|
52
|
+
} from "./cli-y3167wt1.js";
|
|
53
53
|
import {
|
|
54
54
|
defaultAssetKey,
|
|
55
55
|
init_key
|
|
56
|
-
} from "./cli-
|
|
56
|
+
} from "./cli-pe05f8yk.js";
|
|
57
57
|
import {
|
|
58
58
|
init_zod
|
|
59
59
|
} from "./cli-sd0mxa3c.js";
|
|
@@ -95,7 +95,7 @@ import {
|
|
|
95
95
|
registerVolatileSecret,
|
|
96
96
|
scrubObject,
|
|
97
97
|
scrubSecrets
|
|
98
|
-
} from "./cli-
|
|
98
|
+
} from "./cli-shk7r5cs.js";
|
|
99
99
|
import {
|
|
100
100
|
__commonJS,
|
|
101
101
|
__require,
|
|
@@ -178549,12 +178549,312 @@ async function extractArgsJsonSchema(source) {
|
|
|
178549
178549
|
}
|
|
178550
178550
|
|
|
178551
178551
|
// src/be/scripts/typecheck.ts
|
|
178552
|
-
var
|
|
178552
|
+
var import_typescript4 = __toESM(require_typescript(), 1);
|
|
178553
178553
|
import { fileURLToPath as fileURLToPath3 } from "node:url";
|
|
178554
178554
|
|
|
178555
178555
|
// src/apps/definition.ts
|
|
178556
178556
|
init_zod();
|
|
178557
178557
|
init_db();
|
|
178558
|
+
|
|
178559
|
+
// src/scripts-runtime/quickjs-compat.ts
|
|
178560
|
+
var import_typescript3 = __toESM(require_typescript(), 1);
|
|
178561
|
+
var UNSUPPORTED_GLOBALS = new Set([
|
|
178562
|
+
"AbortController",
|
|
178563
|
+
"AbortSignal",
|
|
178564
|
+
"Blob",
|
|
178565
|
+
"Buffer",
|
|
178566
|
+
"Event",
|
|
178567
|
+
"EventTarget",
|
|
178568
|
+
"File",
|
|
178569
|
+
"FormData",
|
|
178570
|
+
"Intl",
|
|
178571
|
+
"ReadableStream",
|
|
178572
|
+
"Request",
|
|
178573
|
+
"TransformStream",
|
|
178574
|
+
"WebSocket",
|
|
178575
|
+
"WritableStream",
|
|
178576
|
+
"clearImmediate",
|
|
178577
|
+
"navigator",
|
|
178578
|
+
"performance",
|
|
178579
|
+
"queueMicrotask",
|
|
178580
|
+
"setImmediate",
|
|
178581
|
+
"structuredClone"
|
|
178582
|
+
]);
|
|
178583
|
+
var RESPONSE_BODY_METHODS = new Set(["arrayBuffer", "blob", "formData", "bytes"]);
|
|
178584
|
+
var LOCALE_METHODS = new Set(["toLocaleString", "toLocaleDateString", "toLocaleTimeString"]);
|
|
178585
|
+
var FS_STDLIB = new Set(["glob", "grep"]);
|
|
178586
|
+
var HOST_ONLY_CONFIG = new Set(["apiKey", "runtimeInstanceId"]);
|
|
178587
|
+
var MAX_FINDINGS = 20;
|
|
178588
|
+
var SCRIPT_FILE = "user-script.ts";
|
|
178589
|
+
var MAX_CONST_DEPTH = 4;
|
|
178590
|
+
function isAmbient(node) {
|
|
178591
|
+
for (let current = node;current; current = current.parent) {
|
|
178592
|
+
if (import_typescript3.default.canHaveModifiers(current) && import_typescript3.default.getModifiers(current)?.some((modifier) => modifier.kind === import_typescript3.default.SyntaxKind.DeclareKeyword)) {
|
|
178593
|
+
return true;
|
|
178594
|
+
}
|
|
178595
|
+
}
|
|
178596
|
+
return false;
|
|
178597
|
+
}
|
|
178598
|
+
function createScope(source) {
|
|
178599
|
+
const sourceFile = import_typescript3.default.createSourceFile(SCRIPT_FILE, source, import_typescript3.default.ScriptTarget.Latest, true);
|
|
178600
|
+
const host = {
|
|
178601
|
+
getSourceFile: (name) => name === SCRIPT_FILE ? sourceFile : undefined,
|
|
178602
|
+
getDefaultLibFileName: () => "lib.d.ts",
|
|
178603
|
+
writeFile: () => {},
|
|
178604
|
+
getCurrentDirectory: () => "/",
|
|
178605
|
+
getCanonicalFileName: (name) => name,
|
|
178606
|
+
useCaseSensitiveFileNames: () => true,
|
|
178607
|
+
getNewLine: () => `
|
|
178608
|
+
`,
|
|
178609
|
+
fileExists: (name) => name === SCRIPT_FILE,
|
|
178610
|
+
readFile: () => {
|
|
178611
|
+
return;
|
|
178612
|
+
}
|
|
178613
|
+
};
|
|
178614
|
+
const program = import_typescript3.default.createProgram({
|
|
178615
|
+
rootNames: [SCRIPT_FILE],
|
|
178616
|
+
options: { noLib: true, noResolve: true, types: [], target: import_typescript3.default.ScriptTarget.Latest },
|
|
178617
|
+
host
|
|
178618
|
+
});
|
|
178619
|
+
const checker = program.getTypeChecker();
|
|
178620
|
+
const isLocal = (node) => {
|
|
178621
|
+
const symbol = import_typescript3.default.isShorthandPropertyAssignment(node.parent) && node.parent.name === node ? checker.getShorthandAssignmentValueSymbol(node.parent) : checker.getSymbolAtLocation(node);
|
|
178622
|
+
return Boolean(symbol?.declarations?.some((declaration) => declaration.getSourceFile() === sourceFile && !isAmbient(declaration)));
|
|
178623
|
+
};
|
|
178624
|
+
const constInitializer = (node) => {
|
|
178625
|
+
const declaration = checker.getSymbolAtLocation(node)?.valueDeclaration;
|
|
178626
|
+
if (!declaration || !import_typescript3.default.isVariableDeclaration(declaration) || !declaration.initializer) {
|
|
178627
|
+
return null;
|
|
178628
|
+
}
|
|
178629
|
+
return import_typescript3.default.getCombinedNodeFlags(declaration) & import_typescript3.default.NodeFlags.Const ? declaration.initializer : null;
|
|
178630
|
+
};
|
|
178631
|
+
return { sourceFile, isLocal, constInitializer };
|
|
178632
|
+
}
|
|
178633
|
+
function isValueReference(node) {
|
|
178634
|
+
const parent = node.parent;
|
|
178635
|
+
if (import_typescript3.default.isPropertyAccessExpression(parent) && parent.name === node)
|
|
178636
|
+
return false;
|
|
178637
|
+
if (import_typescript3.default.isShorthandPropertyAssignment(parent))
|
|
178638
|
+
return true;
|
|
178639
|
+
if ("name" in parent && parent.name === node)
|
|
178640
|
+
return false;
|
|
178641
|
+
if (import_typescript3.default.isTypeOfExpression(parent))
|
|
178642
|
+
return false;
|
|
178643
|
+
return true;
|
|
178644
|
+
}
|
|
178645
|
+
function isTypeOnly(node) {
|
|
178646
|
+
return import_typescript3.default.isTypeNode(node) || import_typescript3.default.isInterfaceDeclaration(node) || import_typescript3.default.isTypeAliasDeclaration(node) || import_typescript3.default.isImportDeclaration(node) && Boolean(node.importClause?.isTypeOnly);
|
|
178647
|
+
}
|
|
178648
|
+
function stdlibImportNames(node) {
|
|
178649
|
+
if (!import_typescript3.default.isStringLiteral(node.moduleSpecifier) || node.moduleSpecifier.text !== "stdlib")
|
|
178650
|
+
return [];
|
|
178651
|
+
const bindings = node.importClause?.namedBindings;
|
|
178652
|
+
if (!bindings || !import_typescript3.default.isNamedImports(bindings))
|
|
178653
|
+
return [];
|
|
178654
|
+
return bindings.elements.map((element) => (element.propertyName ?? element.name).text).filter((name) => FS_STDLIB.has(name));
|
|
178655
|
+
}
|
|
178656
|
+
function unwrap(node) {
|
|
178657
|
+
let current = node;
|
|
178658
|
+
while (import_typescript3.default.isParenthesizedExpression(current) || import_typescript3.default.isAsExpression(current) || import_typescript3.default.isNonNullExpression(current) || import_typescript3.default.isTypeAssertionExpression(current) || import_typescript3.default.isSatisfiesExpression(current)) {
|
|
178659
|
+
current = current.expression;
|
|
178660
|
+
}
|
|
178661
|
+
return current;
|
|
178662
|
+
}
|
|
178663
|
+
function isGlobalThis(node) {
|
|
178664
|
+
const inner = unwrap(node);
|
|
178665
|
+
return import_typescript3.default.isIdentifier(inner) && inner.text === "globalThis";
|
|
178666
|
+
}
|
|
178667
|
+
function globalName(node, isLocal) {
|
|
178668
|
+
const inner = unwrap(node);
|
|
178669
|
+
if (import_typescript3.default.isIdentifier(inner))
|
|
178670
|
+
return isLocal(inner) ? null : inner.text;
|
|
178671
|
+
if (import_typescript3.default.isPropertyAccessExpression(inner) && isGlobalThis(inner.expression)) {
|
|
178672
|
+
return inner.name.text;
|
|
178673
|
+
}
|
|
178674
|
+
return null;
|
|
178675
|
+
}
|
|
178676
|
+
function isPrivateIPv42([a = 0, b = 0, c = 0]) {
|
|
178677
|
+
return a === 0 || a === 10 || a === 127 || a === 100 && b >= 64 && b <= 127 || a === 169 && b === 254 || a === 172 && b >= 16 && b <= 31 || a === 192 && b === 168 || a === 192 && b === 0 && c === 0 || a === 198 && (b === 18 || b === 19) || a >= 224;
|
|
178678
|
+
}
|
|
178679
|
+
function isPrivateIPv62(text) {
|
|
178680
|
+
const [head = "", tail = ""] = text.split("::");
|
|
178681
|
+
const left = head ? head.split(":") : [];
|
|
178682
|
+
const right = text.includes("::") && tail ? tail.split(":") : [];
|
|
178683
|
+
const fill = text.includes("::") ? 8 - left.length - right.length : 0;
|
|
178684
|
+
const g = [...left, ...Array(fill).fill("0"), ...right].map((part) => parseInt(part, 16));
|
|
178685
|
+
const g0 = g[0] ?? 0;
|
|
178686
|
+
if (g.slice(0, 6).every((part) => part === 0))
|
|
178687
|
+
return true;
|
|
178688
|
+
if (g.slice(0, 5).every((part) => part === 0) && g[5] === 65535) {
|
|
178689
|
+
const [g6 = 0, g7 = 0] = g.slice(6);
|
|
178690
|
+
return isPrivateIPv42([g6 >> 8, g6 & 255, g7 >> 8]);
|
|
178691
|
+
}
|
|
178692
|
+
return (g0 & 65024) === 64512 || (g0 & 65472) === 65152 || (g0 & 65472) === 65216 || (g0 & 65280) === 65280;
|
|
178693
|
+
}
|
|
178694
|
+
function staticHostClass(hostname) {
|
|
178695
|
+
const host = hostname.toLowerCase().replace(/\.$/, "");
|
|
178696
|
+
if (host === "localhost" || host.endsWith(".localhost"))
|
|
178697
|
+
return "private";
|
|
178698
|
+
if (host.startsWith("["))
|
|
178699
|
+
return isPrivateIPv62(host.slice(1, -1)) ? "private" : null;
|
|
178700
|
+
const v4 = /^(\d+)\.(\d+)\.(\d+)\.(\d+)$/.exec(host);
|
|
178701
|
+
if (v4)
|
|
178702
|
+
return isPrivateIPv42(v4.slice(1).map(Number)) ? "private" : null;
|
|
178703
|
+
return host !== "" && !host.includes(".") ? "single-label" : null;
|
|
178704
|
+
}
|
|
178705
|
+
function fetchCallName(callee) {
|
|
178706
|
+
const inner = unwrap(callee);
|
|
178707
|
+
if (import_typescript3.default.isIdentifier(inner)) {
|
|
178708
|
+
return inner.text === "fetch" || inner.text === "fetchJson" ? inner.text : null;
|
|
178709
|
+
}
|
|
178710
|
+
if (!import_typescript3.default.isPropertyAccessExpression(inner))
|
|
178711
|
+
return null;
|
|
178712
|
+
const method = inner.name.text;
|
|
178713
|
+
if (method !== "fetch" && method !== "fetchJson")
|
|
178714
|
+
return null;
|
|
178715
|
+
const owner = unwrap(inner.expression);
|
|
178716
|
+
if (method === "fetch" && isGlobalThis(owner))
|
|
178717
|
+
return "fetch";
|
|
178718
|
+
const ownerName = import_typescript3.default.isIdentifier(owner) ? owner.text : import_typescript3.default.isPropertyAccessExpression(owner) ? owner.name.text : null;
|
|
178719
|
+
return ownerName === "stdlib" ? `ctx.stdlib.${method}` : null;
|
|
178720
|
+
}
|
|
178721
|
+
function staticPrefix(node, resolve, depth = 0) {
|
|
178722
|
+
const inner = unwrap(node);
|
|
178723
|
+
if (import_typescript3.default.isStringLiteral(inner) || import_typescript3.default.isNoSubstitutionTemplateLiteral(inner)) {
|
|
178724
|
+
return { text: inner.text, cut: false };
|
|
178725
|
+
}
|
|
178726
|
+
if (import_typescript3.default.isIdentifier(inner)) {
|
|
178727
|
+
const initializer = depth < MAX_CONST_DEPTH ? resolve(inner) : null;
|
|
178728
|
+
return initializer ? staticPrefix(initializer, resolve, depth + 1) : null;
|
|
178729
|
+
}
|
|
178730
|
+
if (import_typescript3.default.isTemplateExpression(inner)) {
|
|
178731
|
+
let text = inner.head.text;
|
|
178732
|
+
let boundary = false;
|
|
178733
|
+
for (const span of inner.templateSpans) {
|
|
178734
|
+
const part = staticPrefix(span.expression, resolve, depth);
|
|
178735
|
+
if (part === null)
|
|
178736
|
+
return { text, cut: !boundary || text === "" };
|
|
178737
|
+
if (part.cut)
|
|
178738
|
+
return { text: text + part.text, cut: true };
|
|
178739
|
+
text += part.text + span.literal.text;
|
|
178740
|
+
boundary = span.literal.text === "";
|
|
178741
|
+
}
|
|
178742
|
+
return { text, cut: false };
|
|
178743
|
+
}
|
|
178744
|
+
if (import_typescript3.default.isBinaryExpression(inner) && inner.operatorToken.kind === import_typescript3.default.SyntaxKind.PlusToken) {
|
|
178745
|
+
const left = staticPrefix(inner.left, resolve, depth);
|
|
178746
|
+
if (left === null || left.cut)
|
|
178747
|
+
return left;
|
|
178748
|
+
const right = staticPrefix(inner.right, resolve, depth);
|
|
178749
|
+
if (right === null)
|
|
178750
|
+
return { text: left.text, cut: !import_typescript3.default.isIdentifier(unwrap(inner.left)) };
|
|
178751
|
+
return { text: left.text + right.text, cut: right.cut };
|
|
178752
|
+
}
|
|
178753
|
+
return null;
|
|
178754
|
+
}
|
|
178755
|
+
function literalUrl(arg, resolve) {
|
|
178756
|
+
if (!arg)
|
|
178757
|
+
return null;
|
|
178758
|
+
const prefix = staticPrefix(arg, resolve);
|
|
178759
|
+
if (!prefix)
|
|
178760
|
+
return null;
|
|
178761
|
+
if (prefix.cut && !/^[a-z][a-z0-9+.-]*:\/\/[^/?#]*[/?#]/i.test(prefix.text))
|
|
178762
|
+
return null;
|
|
178763
|
+
try {
|
|
178764
|
+
return new URL(prefix.text);
|
|
178765
|
+
} catch {
|
|
178766
|
+
return null;
|
|
178767
|
+
}
|
|
178768
|
+
}
|
|
178769
|
+
function checkQuickJSCompat(source, options = {}) {
|
|
178770
|
+
const findings = [];
|
|
178771
|
+
const seen = new Set;
|
|
178772
|
+
const { sourceFile, isLocal, constInitializer } = createScope(source);
|
|
178773
|
+
const add = (rule, message, node) => {
|
|
178774
|
+
if (seen.has(`${rule}:${message}`))
|
|
178775
|
+
return;
|
|
178776
|
+
seen.add(`${rule}:${message}`);
|
|
178777
|
+
const line = node ? sourceFile.getLineAndCharacterOfPosition(node.getStart(sourceFile)).line + 1 : undefined;
|
|
178778
|
+
findings.push(line === undefined ? { rule, message } : { rule, message, line });
|
|
178779
|
+
};
|
|
178780
|
+
if (options.fsMode === "workspace-rw") {
|
|
178781
|
+
add("workspaceRw", "fsMode workspace-rw is not available under quickjs");
|
|
178782
|
+
}
|
|
178783
|
+
const reportGlobal = (name, node) => {
|
|
178784
|
+
if (name === "Bun")
|
|
178785
|
+
add("bunGlobal", "Bun.* is not available under quickjs", node);
|
|
178786
|
+
else if (name === "process")
|
|
178787
|
+
add("process", "process is not available under quickjs", node);
|
|
178788
|
+
else if (UNSUPPORTED_GLOBALS.has(name)) {
|
|
178789
|
+
add("unsupportedGlobal", `${name} is not available under quickjs`, node);
|
|
178790
|
+
}
|
|
178791
|
+
};
|
|
178792
|
+
const visit = (node) => {
|
|
178793
|
+
if (isTypeOnly(node))
|
|
178794
|
+
return;
|
|
178795
|
+
if (import_typescript3.default.isIdentifier(node) && (node.text === "Bun" || node.text === "process" || UNSUPPORTED_GLOBALS.has(node.text)) && isValueReference(node) && !isLocal(node)) {
|
|
178796
|
+
reportGlobal(node.text, node);
|
|
178797
|
+
}
|
|
178798
|
+
if (import_typescript3.default.isPropertyAccessExpression(node)) {
|
|
178799
|
+
const member = node.name.text;
|
|
178800
|
+
const owner = globalName(node.expression, isLocal);
|
|
178801
|
+
if (isGlobalThis(node.expression) && !import_typescript3.default.isTypeOfExpression(node.parent)) {
|
|
178802
|
+
reportGlobal(member, node);
|
|
178803
|
+
}
|
|
178804
|
+
const parent = unwrap(node.expression);
|
|
178805
|
+
if (HOST_ONLY_CONFIG.has(member) && import_typescript3.default.isPropertyAccessExpression(parent) && parent.name.text === "config") {
|
|
178806
|
+
add("hostCredential", `ctx.swarm.config.${member} is host-only under quickjs; ctx.swarm calls use it for you`, node);
|
|
178807
|
+
}
|
|
178808
|
+
if (member === "subtle" && owner === "crypto") {
|
|
178809
|
+
add("cryptoSubtle", "crypto.subtle is not available under quickjs", node);
|
|
178810
|
+
}
|
|
178811
|
+
if (FS_STDLIB.has(member) && import_typescript3.default.isPropertyAccessExpression(unwrap(node.expression)) && unwrap(node.expression).name.text === "stdlib") {
|
|
178812
|
+
add("fsStdlib", `ctx.stdlib.${member} needs filesystem access, which quickjs lacks`, node);
|
|
178813
|
+
}
|
|
178814
|
+
}
|
|
178815
|
+
if (import_typescript3.default.isImportDeclaration(node)) {
|
|
178816
|
+
for (const name of stdlibImportNames(node)) {
|
|
178817
|
+
add("fsStdlib", `stdlib ${name} needs filesystem access, which quickjs lacks`, node);
|
|
178818
|
+
}
|
|
178819
|
+
}
|
|
178820
|
+
if (import_typescript3.default.isVariableDeclaration(node) && import_typescript3.default.isObjectBindingPattern(node.name) && node.initializer && import_typescript3.default.isPropertyAccessExpression(node.initializer) && node.initializer.name.text === "stdlib") {
|
|
178821
|
+
for (const element of node.name.elements) {
|
|
178822
|
+
const name = (element.propertyName ?? element.name).getText(sourceFile);
|
|
178823
|
+
if (FS_STDLIB.has(name)) {
|
|
178824
|
+
add("fsStdlib", `ctx.stdlib.${name} needs filesystem access, which quickjs lacks`, node);
|
|
178825
|
+
}
|
|
178826
|
+
}
|
|
178827
|
+
}
|
|
178828
|
+
if (import_typescript3.default.isCallExpression(node)) {
|
|
178829
|
+
const callee = node.expression;
|
|
178830
|
+
const fetchName = fetchCallName(callee);
|
|
178831
|
+
const url = fetchName ? literalUrl(node.arguments[0], constInitializer) : null;
|
|
178832
|
+
const hostClass = url && (url.protocol === "http:" || url.protocol === "https:") ? staticHostClass(url.hostname) : null;
|
|
178833
|
+
if (url && hostClass) {
|
|
178834
|
+
add("privateHost", `${fetchName} to ${url.host} (${hostClass} host) depends on the egress policy: quickjs refuses private hosts unless the operator allows them`, node);
|
|
178835
|
+
}
|
|
178836
|
+
if (import_typescript3.default.isIdentifier(callee) && callee.text === "require" && !isLocal(callee)) {
|
|
178837
|
+
add("require", "require() is not supported; use an import", node);
|
|
178838
|
+
}
|
|
178839
|
+
if (import_typescript3.default.isPropertyAccessExpression(callee)) {
|
|
178840
|
+
const method = callee.name.text;
|
|
178841
|
+
if (RESPONSE_BODY_METHODS.has(method) && node.arguments.length === 0) {
|
|
178842
|
+
add("responseBody", `.${method}() on a fetch Response is not available under quickjs (text() and json() are)`, node);
|
|
178843
|
+
}
|
|
178844
|
+
if (LOCALE_METHODS.has(method) && node.arguments.length > 0) {
|
|
178845
|
+
add("localeFormat", `${method}(locale, options) ignores its arguments under quickjs (no Intl)`, node);
|
|
178846
|
+
}
|
|
178847
|
+
}
|
|
178848
|
+
}
|
|
178849
|
+
import_typescript3.default.forEachChild(node, visit);
|
|
178850
|
+
};
|
|
178851
|
+
visit(sourceFile);
|
|
178852
|
+
return { compatible: findings.length === 0, findings: findings.slice(0, MAX_FINDINGS) };
|
|
178853
|
+
}
|
|
178854
|
+
function quickJSCompatWarnings(report, label) {
|
|
178855
|
+
const prefix = label ? `${label}: ` : "";
|
|
178856
|
+
return report.findings.map((finding) => `${prefix}quickjs compat (${finding.rule}${finding.line ? `, line ${finding.line}` : ""}): ${finding.message}`);
|
|
178857
|
+
}
|
|
178558
178858
|
// src/apps/catalog.generated.json
|
|
178559
178859
|
var catalog_generated_default = {
|
|
178560
178860
|
$comment: "GENERATED by apps/ui/scripts/generate-catalog-schema.ts — do not hand-edit. Regenerate with `cd apps/ui && bun run generate:catalog-schema`.",
|
|
@@ -182607,6 +182907,17 @@ function collectScriptReferences(definition) {
|
|
|
182607
182907
|
}
|
|
182608
182908
|
return references;
|
|
182609
182909
|
}
|
|
182910
|
+
async function scriptCompatWarnings(definition) {
|
|
182911
|
+
const warnings = [];
|
|
182912
|
+
for (const [scriptId, paths] of collectScriptReferences(definition)) {
|
|
182913
|
+
const script = await getScriptById(scriptId);
|
|
182914
|
+
if (!script)
|
|
182915
|
+
continue;
|
|
182916
|
+
const report = checkQuickJSCompat(script.source, { fsMode: script.fsMode });
|
|
182917
|
+
warnings.push(...quickJSCompatWarnings(report, paths.join(", ")));
|
|
182918
|
+
}
|
|
182919
|
+
return warnings;
|
|
182920
|
+
}
|
|
182610
182921
|
function foreignScriptForWriter(context, script) {
|
|
182611
182922
|
if (script.scope !== "agent")
|
|
182612
182923
|
return false;
|
|
@@ -183538,6 +183849,8 @@ export interface SwarmSdk {
|
|
|
183538
183849
|
// --- config ---
|
|
183539
183850
|
config_get(args?: { agentId?: string; repoId?: string; key?: string; includeSecrets?: boolean }): Promise<unknown>;
|
|
183540
183851
|
config_list(args?: { scope?: "global" | "agent" | "repo"; scopeId?: string; key?: string; includeSecrets?: boolean }): Promise<unknown>;
|
|
183852
|
+
// --- model profiles ---
|
|
183853
|
+
modelProfile_list(args?: { harness?: string }): Promise<unknown>;
|
|
183541
183854
|
// --- slack ---
|
|
183542
183855
|
slack_read(args?: { inboxMessageId?: string; taskId?: string; channelId?: string; threadTs?: string; limit?: number; includeFiles?: boolean }): Promise<unknown>;
|
|
183543
183856
|
slack_listChannels(args?: { types?: Array<"public" | "private" | "dm" | "mpim">; limit?: number }): Promise<unknown>;
|
|
@@ -183745,6 +184058,16 @@ export interface SwarmSdk {
|
|
|
183745
184058
|
// --- human input ---
|
|
183746
184059
|
request_humanInput(args: Record<string, unknown>): Promise<unknown>;
|
|
183747
184060
|
approval_cancel(args: { requestId: string; reason?: string }): Promise<unknown>;
|
|
184061
|
+
|
|
184062
|
+
// --- decisions ---
|
|
184063
|
+
systemOne_decide(args: {
|
|
184064
|
+
provider?: "typesafe" | "openrouter" | "laya" | "openai" | "cloudflare";
|
|
184065
|
+
model?: string;
|
|
184066
|
+
state: string | string[] | Record<string, unknown>;
|
|
184067
|
+
questions: Record<string, Record<string, unknown>>;
|
|
184068
|
+
timeoutMs?: number;
|
|
184069
|
+
maxRetries?: number;
|
|
184070
|
+
}): Promise<unknown>;
|
|
183748
184071
|
}
|
|
183749
184072
|
|
|
183750
184073
|
export interface ScriptStdlib {
|
|
@@ -184194,20 +184517,20 @@ function sourceFileCacheKey(fileName, languageVersion) {
|
|
|
184194
184517
|
return `${fileName}\x00${languageVersion.languageVersion}\x00${languageVersion.impliedNodeFormat}\x00${languageVersion.jsDocParsingMode}`;
|
|
184195
184518
|
}
|
|
184196
184519
|
function createCompilerHost(files, options, virtualModules = new Map) {
|
|
184197
|
-
const host =
|
|
184520
|
+
const host = import_typescript4.default.createCompilerHost(options, true);
|
|
184198
184521
|
const originalGetSourceFile = host.getSourceFile.bind(host);
|
|
184199
184522
|
host.getSourceFile = (fileName, languageVersion, onError, shouldCreateNewSourceFile) => {
|
|
184200
184523
|
const normalized = fileName.replace(/\\/g, "/");
|
|
184201
184524
|
const source = files.get(normalized);
|
|
184202
184525
|
if (normalized === USER_FILE || normalized === CHECK_FILE) {
|
|
184203
184526
|
if (source !== undefined) {
|
|
184204
|
-
return
|
|
184527
|
+
return import_typescript4.default.createSourceFile(normalized, source, languageVersion, true, import_typescript4.default.ScriptKind.TS);
|
|
184205
184528
|
}
|
|
184206
184529
|
}
|
|
184207
|
-
const text = source ??
|
|
184530
|
+
const text = source ?? import_typescript4.default.sys.readFile(fileName);
|
|
184208
184531
|
if (text === undefined || shouldCreateNewSourceFile) {
|
|
184209
184532
|
if (source !== undefined) {
|
|
184210
|
-
return
|
|
184533
|
+
return import_typescript4.default.createSourceFile(normalized, source, languageVersion, true, import_typescript4.default.ScriptKind.TS);
|
|
184211
184534
|
}
|
|
184212
184535
|
return originalGetSourceFile(fileName, languageVersion, onError, shouldCreateNewSourceFile);
|
|
184213
184536
|
}
|
|
@@ -184215,30 +184538,30 @@ function createCompilerHost(files, options, virtualModules = new Map) {
|
|
|
184215
184538
|
const cached = sharedSourceFiles.get(key);
|
|
184216
184539
|
if (cached && cached.text === text)
|
|
184217
184540
|
return cached.sourceFile;
|
|
184218
|
-
const sourceFile = source !== undefined ?
|
|
184541
|
+
const sourceFile = source !== undefined ? import_typescript4.default.createSourceFile(normalized, source, languageVersion, true, import_typescript4.default.ScriptKind.TS) : originalGetSourceFile(fileName, languageVersion, onError, shouldCreateNewSourceFile);
|
|
184219
184542
|
if (sourceFile)
|
|
184220
184543
|
sharedSourceFiles.set(key, { text, sourceFile });
|
|
184221
184544
|
return sourceFile;
|
|
184222
184545
|
};
|
|
184223
184546
|
host.fileExists = (fileName) => {
|
|
184224
184547
|
const normalized = fileName.replace(/\\/g, "/");
|
|
184225
|
-
return files.has(normalized) ||
|
|
184548
|
+
return files.has(normalized) || import_typescript4.default.sys.fileExists(fileName);
|
|
184226
184549
|
};
|
|
184227
184550
|
host.readFile = (fileName) => {
|
|
184228
184551
|
const normalized = fileName.replace(/\\/g, "/");
|
|
184229
|
-
return files.get(normalized) ??
|
|
184552
|
+
return files.get(normalized) ?? import_typescript4.default.sys.readFile(fileName);
|
|
184230
184553
|
};
|
|
184231
184554
|
const projectBase = scriptTypesBase();
|
|
184232
184555
|
host.resolveModuleNames = (moduleNames, containingFile) => moduleNames.map((moduleName) => {
|
|
184233
184556
|
if (moduleName === "./user-script") {
|
|
184234
|
-
return { resolvedFileName: USER_FILE, extension:
|
|
184557
|
+
return { resolvedFileName: USER_FILE, extension: import_typescript4.default.Extension.Ts };
|
|
184235
184558
|
}
|
|
184236
184559
|
const virtualModule = virtualModules.get(moduleName);
|
|
184237
184560
|
if (virtualModule) {
|
|
184238
|
-
return { resolvedFileName: virtualModule, extension:
|
|
184561
|
+
return { resolvedFileName: virtualModule, extension: import_typescript4.default.Extension.Dts };
|
|
184239
184562
|
}
|
|
184240
184563
|
const base = containingFile.startsWith("/virtual/") ? projectBase : containingFile;
|
|
184241
|
-
return
|
|
184564
|
+
return import_typescript4.default.resolveModuleName(moduleName, base, options, host).resolvedModule;
|
|
184242
184565
|
});
|
|
184243
184566
|
const tsLibDir = process.env.TS_LIB_DIR;
|
|
184244
184567
|
if (tsLibDir) {
|
|
@@ -184247,16 +184570,16 @@ function createCompilerHost(files, options, virtualModules = new Map) {
|
|
|
184247
184570
|
return host;
|
|
184248
184571
|
}
|
|
184249
184572
|
function flattenMessage(messageText) {
|
|
184250
|
-
return
|
|
184573
|
+
return import_typescript4.default.flattenDiagnosticMessageText(messageText, `
|
|
184251
184574
|
`);
|
|
184252
184575
|
}
|
|
184253
184576
|
function diagnosticSeverity(diag) {
|
|
184254
184577
|
switch (diag.category) {
|
|
184255
|
-
case
|
|
184578
|
+
case import_typescript4.default.DiagnosticCategory.Error:
|
|
184256
184579
|
return "error";
|
|
184257
|
-
case
|
|
184580
|
+
case import_typescript4.default.DiagnosticCategory.Warning:
|
|
184258
184581
|
return "warning";
|
|
184259
|
-
case
|
|
184582
|
+
case import_typescript4.default.DiagnosticCategory.Suggestion:
|
|
184260
184583
|
return "suggestion";
|
|
184261
184584
|
default:
|
|
184262
184585
|
return "message";
|
|
@@ -184312,12 +184635,12 @@ async function typecheckWithAmbient(args) {
|
|
|
184312
184635
|
const options = {
|
|
184313
184636
|
allowImportingTsExtensions: true,
|
|
184314
184637
|
lib: ["lib.es2022.d.ts"],
|
|
184315
|
-
module:
|
|
184316
|
-
moduleResolution:
|
|
184638
|
+
module: import_typescript4.default.ModuleKind.ESNext,
|
|
184639
|
+
moduleResolution: import_typescript4.default.ModuleResolutionKind.Bundler,
|
|
184317
184640
|
noEmit: true,
|
|
184318
184641
|
skipLibCheck: true,
|
|
184319
184642
|
strict: true,
|
|
184320
|
-
target:
|
|
184643
|
+
target: import_typescript4.default.ScriptTarget.ES2022,
|
|
184321
184644
|
types: []
|
|
184322
184645
|
};
|
|
184323
184646
|
const files = new Map([
|
|
@@ -184335,7 +184658,7 @@ async function typecheckWithAmbient(args) {
|
|
|
184335
184658
|
files.set(`/virtual/ambient-${name.replace(/[^A-Za-z0-9_.-]/g, "_")}.d.ts`, source);
|
|
184336
184659
|
}
|
|
184337
184660
|
const host = createCompilerHost(files, options, virtualModules);
|
|
184338
|
-
const program =
|
|
184661
|
+
const program = import_typescript4.default.createProgram([...files.keys()], options, host);
|
|
184339
184662
|
const diagnostics = [
|
|
184340
184663
|
...program.getSyntacticDiagnostics(),
|
|
184341
184664
|
...program.getSemanticDiagnostics()
|
|
@@ -184353,7 +184676,7 @@ async function typecheckWithAmbient(args) {
|
|
|
184353
184676
|
};
|
|
184354
184677
|
return {
|
|
184355
184678
|
ok: false,
|
|
184356
|
-
diagnostics: diagnostics.map((diagnostic) =>
|
|
184679
|
+
diagnostics: diagnostics.map((diagnostic) => import_typescript4.default.formatDiagnosticsWithColorAndContext([diagnostic], formatHost).trimEnd()),
|
|
184357
184680
|
structured: diagnostics.map(toStructured)
|
|
184358
184681
|
};
|
|
184359
184682
|
}
|
|
@@ -184424,4 +184747,4 @@ function parseSkillContent(content) {
|
|
|
184424
184747
|
};
|
|
184425
184748
|
}
|
|
184426
184749
|
|
|
184427
|
-
export { require_dist, isInvalidClientError, assertUrlSafe, publicEndpointSsrfOptions, mcpOAuthSsrfOptions, discoverProtectedResourceMetadata, discoverAuthorizationServerMetadata, normalizeTokenEndpointAuthMethod, resolveAdvertisedTokenEndpointAuthMethod, authMethodForStoredClient, selectDcrTokenEndpointAuthMethod, registerClient, buildAuthorizeUrl, exchangeCodeForTokens, refreshMcpToken, revokeMcpToken, computeExpiresAt, getMcpOAuthToken, findReusableMcpOAuthClient, invalidateMcpOAuthClient, upsertMcpOAuthToken, applyMcpOAuthRefresh, markMcpOAuthTokenStatus, deleteMcpOAuthToken, insertMcpOAuthPending, consumeMcpOAuthPending, gcMcpOAuthPending, setMcpServerAuthMethod, ensureMcpToken, callMcpServerTool, resolveSqlDsn, runReadOnlyQuery, listVendoredOpenapiEntries, ConnectionAuthInputSchema, SqlDsnInputSchema, connectionAuthSummary, listRelationalCredentialBindings, getCredentialBindingById, findCredentialBindingByIdentity, upsertCredentialBinding, disableCredentialBinding, listScriptConnections, listScriptConnectionsAsync, getScriptConnectionById, ScriptConnectionConflictError, connectionAuthInputFromFlat, upsertScriptConnection, refreshScriptConnection, setScriptConnectionEnabled, deleteScriptConnection, getScriptApiConnectionDescriptors, getScriptMcpConnectionDescriptors, getScriptApiTypes, getScriptMcpTypes, oauthAppToProviderConfig, getOAuthProviderConfig, getOAuthBindingTokenStatus, buildScriptCredentialBindingsWithFailures, buildSandboxedCommand, sandboxSpawnEnv, createCappedStreamState, snapshotCapped, readStreamCapped, writeBareImportShim, MIN_SCRIPT_WALL_CLOCK_MS, SCRIPT_LONG_TIMEOUT_HINT_MS, MAX_SCRIPT_WALL_CLOCK_MS, DEFAULT_SCRIPT_RESOURCES, require_typescript, checkImportAllowlist, validateScriptImports, runScript, extractScriptSignature, extractArgsJsonSchema, getSavedScriptOwnerAgentId, runSavedScriptAsAgent, resolveSyncRunAs, AppNameSchema, ColumnKindSchema, isIso8601Date, SYSTEM_COLUMN_KINDS, SORTABLE_SYSTEM_DATE_COLUMNS, AppElementsSchema, AppDefinitionSchema, collectScriptReferences, parseAppDefinition, applyAppDefinitionPatch, upgradeAppDefinition, decodeAppDefinition, appDefinitionNeedsRepair, createApp, getApp, listApps, listAppRecords, updateApp, deleteApp, getScriptAppTypes, SCRIPT_SDK_TYPES, scriptSdkTypesWithGeneratedApis, SCRIPT_STDLIB_MODULE_TYPES, scriptStdlibTypesWithGeneratedApis, typecheckWithAmbient, typecheckScript, parseSkillContent };
|
|
184750
|
+
export { require_dist, isInvalidClientError, assertUrlSafe, publicEndpointSsrfOptions, mcpOAuthSsrfOptions, discoverProtectedResourceMetadata, discoverAuthorizationServerMetadata, normalizeTokenEndpointAuthMethod, resolveAdvertisedTokenEndpointAuthMethod, authMethodForStoredClient, selectDcrTokenEndpointAuthMethod, registerClient, buildAuthorizeUrl, exchangeCodeForTokens, refreshMcpToken, revokeMcpToken, computeExpiresAt, getMcpOAuthToken, findReusableMcpOAuthClient, invalidateMcpOAuthClient, upsertMcpOAuthToken, applyMcpOAuthRefresh, markMcpOAuthTokenStatus, deleteMcpOAuthToken, insertMcpOAuthPending, consumeMcpOAuthPending, gcMcpOAuthPending, setMcpServerAuthMethod, ensureMcpToken, callMcpServerTool, resolveSqlDsn, runReadOnlyQuery, listVendoredOpenapiEntries, ConnectionAuthInputSchema, SqlDsnInputSchema, connectionAuthSummary, listRelationalCredentialBindings, getCredentialBindingById, findCredentialBindingByIdentity, upsertCredentialBinding, disableCredentialBinding, listScriptConnections, listScriptConnectionsAsync, getScriptConnectionById, ScriptConnectionConflictError, connectionAuthInputFromFlat, upsertScriptConnection, refreshScriptConnection, setScriptConnectionEnabled, deleteScriptConnection, getScriptApiConnectionDescriptors, getScriptMcpConnectionDescriptors, getScriptApiTypes, getScriptMcpTypes, oauthAppToProviderConfig, getOAuthProviderConfig, getOAuthBindingTokenStatus, buildScriptCredentialBindingsWithFailures, buildSandboxedCommand, sandboxSpawnEnv, createCappedStreamState, snapshotCapped, readStreamCapped, writeBareImportShim, MIN_SCRIPT_WALL_CLOCK_MS, SCRIPT_LONG_TIMEOUT_HINT_MS, MAX_SCRIPT_WALL_CLOCK_MS, DEFAULT_SCRIPT_RESOURCES, require_typescript, checkImportAllowlist, validateScriptImports, runScript, extractScriptSignature, extractArgsJsonSchema, getSavedScriptOwnerAgentId, runSavedScriptAsAgent, checkQuickJSCompat, quickJSCompatWarnings, resolveSyncRunAs, AppNameSchema, ColumnKindSchema, isIso8601Date, SYSTEM_COLUMN_KINDS, SORTABLE_SYSTEM_DATE_COLUMNS, AppElementsSchema, AppDefinitionSchema, collectScriptReferences, scriptCompatWarnings, parseAppDefinition, applyAppDefinitionPatch, upgradeAppDefinition, decodeAppDefinition, appDefinitionNeedsRepair, createApp, getApp, listApps, listAppRecords, updateApp, deleteApp, getScriptAppTypes, SCRIPT_SDK_TYPES, scriptSdkTypesWithGeneratedApis, SCRIPT_STDLIB_MODULE_TYPES, scriptStdlibTypesWithGeneratedApis, typecheckWithAmbient, typecheckScript, parseSkillContent };
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
} from "./cli-w1q7h2r2.js";
|
|
21
21
|
import {
|
|
22
22
|
summarizeSession
|
|
23
|
-
} from "./cli-
|
|
23
|
+
} from "./cli-035vekcw.js";
|
|
24
24
|
import {
|
|
25
25
|
hasCodexOAuthPoolSlots
|
|
26
26
|
} from "./cli-bqjfjex4.js";
|
|
@@ -29,7 +29,7 @@ import {
|
|
|
29
29
|
} from "./cli-2pdaysab.js";
|
|
30
30
|
import {
|
|
31
31
|
applyReasoningEffort
|
|
32
|
-
} from "./cli-
|
|
32
|
+
} from "./cli-0veb92a3.js";
|
|
33
33
|
import {
|
|
34
34
|
buildRatingsFromLlm,
|
|
35
35
|
fetchRetrievalsForTask,
|
|
@@ -48,11 +48,11 @@ import {
|
|
|
48
48
|
CodexOAuthRefreshError,
|
|
49
49
|
credentialsToAuthJson,
|
|
50
50
|
getValidCodexOAuth
|
|
51
|
-
} from "./cli-
|
|
51
|
+
} from "./cli-rc6pf5kv.js";
|
|
52
52
|
import {
|
|
53
53
|
DEFAULT_MODEL_TIER_MAP,
|
|
54
54
|
init_types
|
|
55
|
-
} from "./cli-
|
|
55
|
+
} from "./cli-pe05f8yk.js";
|
|
56
56
|
import {
|
|
57
57
|
init_runtime_model_catalog,
|
|
58
58
|
runtimeCatalogModel
|
|
@@ -60,7 +60,7 @@ import {
|
|
|
60
60
|
import {
|
|
61
61
|
init_package,
|
|
62
62
|
package_default
|
|
63
|
-
} from "./cli-
|
|
63
|
+
} from "./cli-r35rw5de.js";
|
|
64
64
|
import {
|
|
65
65
|
init_env_flag,
|
|
66
66
|
isEnvFlagEnabled
|
|
@@ -72,7 +72,7 @@ import {
|
|
|
72
72
|
import {
|
|
73
73
|
init_secret_scrubber,
|
|
74
74
|
scrubSecrets
|
|
75
|
-
} from "./cli-
|
|
75
|
+
} from "./cli-shk7r5cs.js";
|
|
76
76
|
import {
|
|
77
77
|
init_src
|
|
78
78
|
} from "./cli-e3g5mbkz.js";
|
|
@@ -9,12 +9,12 @@ import {
|
|
|
9
9
|
markAuthorizationRefreshFailed,
|
|
10
10
|
releaseOAuthRefreshLock,
|
|
11
11
|
updateAuthorizationTokens
|
|
12
|
-
} from "./cli-
|
|
12
|
+
} from "./cli-y3167wt1.js";
|
|
13
13
|
import {
|
|
14
14
|
init_secret_scrubber,
|
|
15
15
|
registerVolatileSecret,
|
|
16
16
|
scrubSecrets
|
|
17
|
-
} from "./cli-
|
|
17
|
+
} from "./cli-shk7r5cs.js";
|
|
18
18
|
|
|
19
19
|
// src/oauth/ensure-token.ts
|
|
20
20
|
init_oauth();
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
import {
|
|
10
10
|
applyReasoningEffort,
|
|
11
11
|
reasoningCapability
|
|
12
|
-
} from "./cli-
|
|
12
|
+
} from "./cli-0veb92a3.js";
|
|
13
13
|
import {
|
|
14
14
|
swarmRuntimeInstanceId
|
|
15
15
|
} from "./cli-re8z5p8p.js";
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
import {
|
|
22
22
|
DEFAULT_MODEL_TIER_MAP,
|
|
23
23
|
init_types
|
|
24
|
-
} from "./cli-
|
|
24
|
+
} from "./cli-pe05f8yk.js";
|
|
25
25
|
import {
|
|
26
26
|
getOpenRouterAttributionHeaders,
|
|
27
27
|
getOpenRouterBaseUrl,
|
|
@@ -31,7 +31,7 @@ import {
|
|
|
31
31
|
init_secret_scrubber,
|
|
32
32
|
registerVolatileSecret,
|
|
33
33
|
scrubSecrets
|
|
34
|
-
} from "./cli-
|
|
34
|
+
} from "./cli-shk7r5cs.js";
|
|
35
35
|
|
|
36
36
|
// src/providers/dsh-adapter.ts
|
|
37
37
|
init_types();
|
|
@@ -66,7 +66,7 @@ function addDshStepUsage(acc, step) {
|
|
|
66
66
|
// src/providers/dsh-adapter.ts
|
|
67
67
|
init_openrouter_base_url();
|
|
68
68
|
init_secret_scrubber();
|
|
69
|
-
var DSH_PACKAGE = "@deepseek-ai/dsh@0.2.1-alpha.
|
|
69
|
+
var DSH_PACKAGE = "@deepseek-ai/dsh@0.2.1-alpha.5";
|
|
70
70
|
function checkDshCredentials(env) {
|
|
71
71
|
return env.DEEPSEEK_API_KEY?.trim() || env.OPENROUTER_API_KEY?.trim() ? { ready: true, missing: [], satisfiedBy: "env" } : {
|
|
72
72
|
ready: false,
|
|
@@ -59,6 +59,7 @@ var init_tool_config = __esm(() => {
|
|
|
59
59
|
"script-connections",
|
|
60
60
|
"model-catalog-refresh",
|
|
61
61
|
"model-catalog-overlay-upsert",
|
|
62
|
+
"list-model-profiles",
|
|
62
63
|
"update-repo",
|
|
63
64
|
"update-profile",
|
|
64
65
|
"context-history",
|
|
@@ -105,6 +106,7 @@ var init_tool_config = __esm(() => {
|
|
|
105
106
|
"create_metric",
|
|
106
107
|
"request-human-input",
|
|
107
108
|
"cancel-approval-request",
|
|
109
|
+
"system-one-decide",
|
|
108
110
|
"skill-create",
|
|
109
111
|
"skill-update",
|
|
110
112
|
"skill-delete",
|