@desplega.ai/agent-swarm 1.161.0 → 1.162.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -2
- package/dist/{acp-adapter-xx489vvb.js → acp-adapter-74m73ae9.js} +1 -1
- package/dist/{actions-ykjkn0m9.js → actions-4sr14gnt.js} +34 -31
- package/dist/{anthropic-messages-5qx80j9k.js → anthropic-messages-8xxrzky9.js} +22 -26
- package/dist/{app-0hdqa4k1.js → app-pt68fbwp.js} +13 -11
- package/dist/{artifact-3v5t9jtg.js → artifact-fey7dvj9.js} +3 -2
- package/dist/{assistant-am2g5g8a.js → assistant-cv3jytks.js} +37 -34
- package/dist/{azure-openai-responses-fszbkp0e.js → azure-openai-responses-f5cqsyj8.js} +15 -10
- package/dist/{boot-reembed-xy9t7avg.js → boot-reembed-4ht4gqth.js} +13 -11
- package/dist/{boot-reembed-gt5gjkt4.js → boot-reembed-nxpcvpj9.js} +12 -10
- package/dist/{boot-scrub-logs-9x0985y5.js → boot-scrub-logs-k93kyw8k.js} +9 -7
- package/dist/{boot-seeds-trv0d4vg.js → boot-seeds-1skcrs0e.js} +13 -10
- package/dist/{claude-adapter-jb6e1e54.js → claude-adapter-r5g0tzge.js} +23 -20
- package/dist/{claude-managed-setup-d1q9hv2b.js → claude-managed-setup-pkyrgshb.js} +3 -2
- package/dist/{claude-sdk-session-zga700s2.js → claude-sdk-session-jxyxnrwd.js} +5565 -5512
- package/dist/{cli-we0q7t0e.js → cli-2zy95vhm.js} +137 -64
- package/dist/{cli-35pj2yva.js → cli-4cwxn7gp.js} +38 -11
- package/dist/{cli-ad4qxm6j.js → cli-4dcpaefp.js} +2 -2
- package/dist/{cli-82c1pacn.js → cli-4x0csdjq.js} +71 -37
- package/dist/{cli-sqm3r5ps.js → cli-5bcd7sfy.js} +14 -18
- package/dist/{cli-d56tgd45.js → cli-5k6k8ta3.js} +2 -2
- package/dist/{cli-1er0rhz8.js → cli-5xhpb3kv.js} +15 -15
- package/dist/{cli-yrg7c73k.js → cli-7af8yhav.js} +10 -183
- package/dist/{cli-r6fsxc76.js → cli-7tre70zp.js} +513 -961
- package/dist/{cli-bh7jed3k.js → cli-8ev9xqnx.js} +34 -18
- package/dist/cli-bsky8g7w.js +449 -0
- package/dist/{cli-hn04t9db.js → cli-cebmgwsc.js} +14 -10
- package/dist/{cli-cfkrztza.js → cli-cvatsam7.js} +2 -2
- package/dist/{cli-2658f6at.js → cli-cvk6yzw5.js} +6 -8
- package/dist/{cli-ptr8h7kp.js → cli-eg0b3p0k.js} +5 -218
- package/dist/{cli-zb6xbk61.js → cli-g739zqzt.js} +4 -4
- package/dist/{cli-dv6cdjs2.js → cli-gd4favx9.js} +28 -7
- package/dist/{cli-5p3x4zna.js → cli-gpqpmns7.js} +2 -2
- package/dist/{cli-5nbmpy8w.js → cli-hb5c2x5y.js} +1 -1
- package/dist/{cli-jpf7e1zq.js → cli-hmsw1gpy.js} +3 -3
- package/dist/{cli-1cz0c18q.js → cli-jf7wmv1r.js} +2521 -733
- package/dist/{cli-qwsnmjdd.js → cli-jxs2ygaw.js} +168 -61
- package/dist/cli-kdkwd3yr.js +615 -0
- package/dist/{cli-hgmnf38m.js → cli-kh04eqwe.js} +1 -1
- package/dist/{cli-0383bp7f.js → cli-kp42yek0.js} +425 -90
- package/dist/{cli-ybgv4kw2.js → cli-mbssg1xv.js} +9 -2
- package/dist/{cli-jsp14b6c.js → cli-mzfth0bp.js} +38 -1
- package/dist/{cli-8g6mc14k.js → cli-nq7yqw7b.js} +16 -5
- package/dist/{cli-ee8bc46j.js → cli-nt8hecg9.js} +33 -32
- package/dist/{cli-9s68w752.js → cli-p0r8sxj5.js} +1 -1
- package/dist/{cli-58e8yr0d.js → cli-pkd6s2wy.js} +4 -2
- package/dist/{cli-17xpf7cm.js → cli-q24re23n.js} +6 -4
- package/dist/cli-qjjvzwzd.js +222 -0
- package/dist/cli-qrgt5bqf.js +189 -0
- package/dist/{cli-et8m9xsv.js → cli-rfjw9jw2.js} +22 -10
- package/dist/{cli-798vkbks.js → cli-rj0gqwwp.js} +2 -2
- package/dist/{cli-121ph74b.js → cli-rnyzn44p.js} +1 -1
- package/dist/{cli-vnnz5ncg.js → cli-s3hwpt9v.js} +95 -16
- package/dist/{cli-7119ja3w.js → cli-sptrj5f5.js} +2 -2
- package/dist/{cli-a8c82p2t.js → cli-sqvfa090.js} +13 -6
- package/dist/{cli-phfg8vy8.js → cli-swfmp1fx.js} +26 -26
- package/dist/{cli-nsdxtcbg.js → cli-tcen9p5w.js} +8 -5
- package/dist/{cli-9m03pzga.js → cli-vc9bp061.js} +5 -5
- package/dist/{cli-rtx9dygp.js → cli-vxe6qa4h.js} +1 -1
- package/dist/{cli-ecfxwnyb.js → cli-vy3ed88x.js} +1 -1
- package/dist/{cli-0c7ata9h.js → cli-vyqs9ya8.js} +6 -6
- package/dist/cli-wbvnn6tk.js +861 -0
- package/dist/{cli-kgd3p0bm.js → cli-wjgs5wxe.js} +6 -6
- package/dist/cli-wxkkd0e0.js +33 -0
- package/dist/{cli-akfj32vj.js → cli-xqpk3rp7.js} +5 -4
- package/dist/cli-zp38xvtm.js +9487 -0
- package/dist/{cli-3zc55ctx.js → cli-zvhd3f64.js} +2 -2
- package/dist/{cli-ze1d3wzv.js → cli-zxqx25nz.js} +5 -5
- package/dist/cli.js +32 -25
- package/dist/{cloudflare-workers-ai-system-one-k6fbxw9d.js → cloudflare-workers-ai-system-one-k8ddqjkq.js} +8 -6
- package/dist/{codex-adapter-04v97vep.js → codex-adapter-esvmnhn7.js} +13 -13
- package/dist/{codex-hook-20me6byw.js → codex-hook-m73jmqgx.js} +19 -3
- package/dist/{codex-session-runner-ax69mqq3.js → codex-session-runner-ban9excr.js} +13 -13
- package/dist/{commands-18gy08n1.js → commands-75413p2n.js} +9 -7
- package/dist/{db-d2pvjpyt.js → db-7f5pecwg.js} +11 -7
- package/dist/{dispatcher-8wbwyzjg.js → dispatcher-fh9at8nz.js} +33 -30
- package/dist/{dsh-adapter-ysqk9snv.js → dsh-adapter-wpze65d4.js} +3 -3
- package/dist/{e2b-esmt1r16.js → e2b-gjgdjp91.js} +10 -9
- package/dist/{pi-logo-animation-e9a0t68z.js → easter-egg-3d-3w5c2n4c.js} +122 -68
- package/dist/{execute-cmagrbrz.js → execute-f50wg9nh.js} +29 -6
- package/dist/{google-generative-ai-k6n5nbpp.js → google-generative-ai-jxxpnegy.js} +2 -2
- package/dist/{google-vertex-44xxtcvp.js → google-vertex-x7q1angm.js} +5 -5
- package/dist/{handlers-6b69m5kp.js → handlers-w13787bb.js} +36 -33
- package/dist/{hook-srnkt0hb.js → hook-46g1jrvx.js} +28 -15
- package/dist/{hook-k3mydf2n.js → hook-4tpts2ry.js} +20 -17
- package/dist/{http-hrf80ca1.js → http-19pzbfrt.js} +964 -176
- package/dist/{index-9rxdvj6w.js → index-8fd4dm4h.js} +34 -31
- package/dist/{index-1asbaj62.js → index-dqmp15bq.js} +35 -32
- package/dist/{index-45evq4ee.js → index-qb4q1y3e.js} +33 -30
- package/dist/{index-k4nj18qs.js → index-s75wc4wd.js} +12 -10
- package/dist/{index-xmevk2b9.js → index-scptvdxg.js} +27 -25
- package/dist/{keepalive-sfdz6ksp.js → keepalive-xa5ts9cd.js} +11 -9
- package/dist/{lead-ej91e9hw.js → lead-qp4xkvjq.js} +45 -41
- package/dist/{maintenance-80dnd7ke.js → maintenance-rm5885hm.js} +13 -11
- package/dist/{mistral-conversations-pc3ntnxt.js → mistral-conversations-rw7fbt22.js} +4 -4
- package/dist/{node-a5e00qhp.js → node-8zkdq42h.js} +834 -833
- package/dist/{oauth-refresh-sweep-m1etk2mx.js → oauth-refresh-sweep-1csdfebf.js} +10 -8
- package/dist/{onboard-0q8sdfqc.js → onboard-r6b78cs4.js} +10 -10
- package/dist/{openai-codex-responses-n7n683p2.js → openai-codex-responses-efvrgrq3.js} +4 -4
- package/dist/{openai-completions-jpaj5g2b.js → openai-completions-bbbrrz4z.js} +12 -8
- package/dist/{openai-responses-9a3nme9j.js → openai-responses-9jjyrcm1.js} +15 -10
- package/dist/{opencode-adapter-4wcgmvgf.js → opencode-adapter-kb3g6pkf.js} +2 -2
- package/dist/{otel-impl-hnqm9mxq.js → otel-impl-0y9knpky.js} +5 -5
- package/dist/{pi-mono-adapter-d6sqm9wr.js → pi-mono-adapter-z6s1bme2.js} +100 -19
- package/dist/{pricing-refresh-y60z64pm.js → pricing-refresh-mth26tgp.js} +11 -9
- package/dist/{rbac-roles-8pa0754b.js → rbac-roles-kwntb23q.js} +13 -9
- package/dist/rbac-roles-vpk4ebm8.js +45 -0
- package/dist/{registry-v5wytg0s.js → registry-km6t1jd2.js} +1 -1
- package/dist/{render-v2-418s1vj7.js → render-v2-hcm7h00y.js} +13 -11
- package/dist/{runtime-3pknc168.js → runtime-vfjsfsc5.js} +4 -4
- package/dist/{setup-yghdkj4x.js → setup-hbyzd65h.js} +2 -2
- package/dist/{virtual-modules-jcceevt5.js → virtual-modules-9bv7ry91.js} +9 -8
- package/dist/{work-objects-j1sz20v9.js → work-objects-m09sxnhe.js} +36 -33
- package/dist/{worker-d4gcvkjt.js → worker-0h35rvk4.js} +45 -41
- package/openapi.json +491 -12
- package/package.json +13 -6
- package/src/be/api-drain.ts +184 -0
- package/src/be/db/tasks/read.ts +31 -6
- package/src/be/db/tasks/write.ts +5 -4
- package/src/be/db.ts +42 -18
- package/src/be/memory/link-resolver.ts +29 -3
- package/src/be/migrations/192_favorites_agent_fs_path.sql +36 -0
- package/src/be/onboarding.ts +7 -1
- package/src/be/seed-prompt-templates.ts +1 -0
- package/src/be/swarm-config-guard.ts +35 -16
- package/src/be/task-citations.ts +11 -5
- package/src/be/users.ts +3 -0
- package/src/cli.tsx +3 -2
- package/src/comb/agent-fs.ts +39 -0
- package/src/comb/config.ts +37 -0
- package/src/comb/markers.ts +37 -0
- package/src/comb/review-batch.ts +486 -0
- package/src/comb/templates.ts +88 -0
- package/src/commands/context-preamble.ts +4 -1
- package/src/commands/hook.ts +2 -1
- package/src/commands/runner.ts +262 -68
- package/src/commands/templates.ts +10 -0
- package/src/extensions/contract-types.generated.ts +1 -1
- package/src/fs/agent-fs-provider.ts +106 -2
- package/src/heartbeat/heartbeat.ts +4 -0
- package/src/hooks/codex-hook.ts +25 -1
- package/src/hooks/hook.ts +13 -0
- package/src/hooks/pr-body-guard.ts +983 -0
- package/src/http/all-routes.ts +1 -0
- package/src/http/assets.ts +5 -17
- package/src/http/comb.ts +131 -0
- package/src/http/core.ts +2 -1
- package/src/http/fs.ts +9 -17
- package/src/http/index.ts +23 -9
- package/src/http/onboarding.ts +21 -2
- package/src/http/poll.ts +30 -3
- package/src/http/realtime.ts +62 -0
- package/src/http/request-principal.ts +22 -0
- package/src/http/status.ts +34 -2
- package/src/kv-reserved-namespaces.ts +10 -5
- package/src/providers/dsh-adapter.ts +1 -1
- package/src/providers/pi-mono-adapter.ts +123 -0
- package/src/rbac/legacy-policy.ts +1 -0
- package/src/rbac/permissions.ts +4 -0
- package/src/realtime/auth.ts +63 -1
- package/src/realtime/tickets.ts +52 -0
- package/src/realtime/transport.ts +51 -22
- package/src/scripts-runtime/types/swarm-extension.d.ts +3 -1
- package/src/telemetry-context.ts +175 -0
- package/src/telemetry-contract/EVENTS.md +81 -0
- package/src/telemetry-contract/SOURCE.json +9 -0
- package/src/telemetry-contract/catalog.json +1335 -0
- package/src/telemetry-contract/index.ts +60 -0
- package/src/telemetry-contract/types.gen.ts +1971 -0
- package/src/telemetry-identity.ts +129 -0
- package/src/telemetry-snapshot.ts +211 -0
- package/src/telemetry-trigger.ts +125 -0
- package/src/telemetry-types.typetest.ts +40 -0
- package/src/telemetry.ts +271 -67
- package/src/tests/api-drain-e2e.test.ts +249 -0
- package/src/tests/api-drain-worker-e2e.test.ts +216 -0
- package/src/tests/api-drain.test.ts +351 -0
- package/src/tests/comb-config-guard.test.ts +38 -0
- package/src/tests/comb-links.test.ts +162 -0
- package/src/tests/comb-markers.test.ts +68 -0
- package/src/tests/comb-review-batch.test.ts +770 -0
- package/src/tests/comb-status.test.ts +152 -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/docs-index-footprint.test.js +3 -3
- package/src/tests/dsh-adapter.test.ts +1 -1
- package/src/tests/favorites-agent-fs-path.test.ts +226 -0
- package/src/tests/memory-link-resolver.test.ts +34 -0
- package/src/tests/onboarding.test.ts +108 -0
- package/src/tests/pi-mono-adapter.test.ts +265 -2
- package/src/tests/pr-body-leaks.test.ts +789 -0
- package/src/tests/preload.ts +8 -0
- package/src/tests/rbac-engine.test.ts +19 -0
- package/src/tests/realtime-room-auth.test.ts +104 -1
- package/src/tests/realtime-tickets.test.ts +74 -0
- package/src/tests/realtime-transport.test.ts +131 -4
- package/src/tests/runner-api-drain.test.ts +301 -0
- package/src/tests/runner-fallback-output.test.ts +61 -0
- package/src/tests/runner-fenced-json-output.test.ts +178 -0
- package/src/tests/script-connections.test.ts +2 -0
- package/src/tests/send-task-requested-by.test.ts +133 -15
- package/src/tests/task-lifecycle-telemetry.test.ts +8 -3
- package/src/tests/telemetry-context.test.ts +314 -0
- package/src/tests/telemetry-init.test.ts +51 -19
- package/src/tests/telemetry-snapshot.test.ts +229 -0
- package/src/tests/telemetry-trigger.test.ts +200 -0
- package/src/tests/template-registry-helpers.ts +1 -0
- package/src/tests/workflow-agent-task-retry.test.ts +363 -0
- package/src/tests/workflow-definition-telemetry.test.ts +4 -4
- package/src/tools/poll-task.ts +20 -1
- package/src/tools/send-task.ts +9 -1
- package/src/tools/task-action.ts +11 -0
- package/src/types.ts +2 -1
- package/src/utils/api-drain.ts +24 -0
- package/src/utils/constants.ts +57 -16
- package/src/utils/pr-body-leaks.ts +172 -0
- package/src/utils/task-attachment-links.ts +14 -8
- package/src/workflows/recovery.ts +26 -1
- package/src/workflows/resume.ts +31 -4
- package/src/workflows/task-step-routing.ts +75 -2
- package/tsconfig.json +3 -0
- package/dist/cli-tjf4cn8z.js +0 -9119
- package/dist/cli-tsk3nz8a.js +0 -582
- package/dist/{cli-t6v2ah3r.js → cli-twrh04ap.js} +3 -3
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
getShellConfig,
|
|
5
5
|
getTextOutput,
|
|
6
6
|
replaceTabs
|
|
7
|
-
} from "./cli-
|
|
7
|
+
} from "./cli-p0r8sxj5.js";
|
|
8
8
|
import {
|
|
9
9
|
Container,
|
|
10
10
|
Spacer,
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
keyHint,
|
|
15
15
|
normalizePath,
|
|
16
16
|
stripBom
|
|
17
|
-
} from "./cli-
|
|
17
|
+
} from "./cli-s3hwpt9v.js";
|
|
18
18
|
import {
|
|
19
19
|
require_cross_spawn
|
|
20
20
|
} from "./cli-5bfdm1ah.js";
|
|
@@ -1425,6 +1425,17 @@ function validateOAuth(value) {
|
|
|
1425
1425
|
if (value.clientName !== undefined && (typeof value.clientName !== "string" || !value.clientName.trim())) {
|
|
1426
1426
|
return "oauth.clientName must be a non-empty string";
|
|
1427
1427
|
}
|
|
1428
|
+
if (value.clientRegistration !== undefined && value.clientRegistration !== "dcr") {
|
|
1429
|
+
if (value.clientRegistration !== "cimd")
|
|
1430
|
+
return 'oauth.clientRegistration must be "dcr" or "cimd"';
|
|
1431
|
+
if (value.clientId !== undefined || value.clientName !== undefined) {
|
|
1432
|
+
return 'oauth.clientRegistration "cimd" cannot be combined with oauth.clientId or oauth.clientName';
|
|
1433
|
+
}
|
|
1434
|
+
const callback = typeof value.callbackUrl === "string" ? new URL(value.callbackUrl) : undefined;
|
|
1435
|
+
if (callback && (callback.hostname === "[::1]" || callback.pathname !== "/callback")) {
|
|
1436
|
+
return 'oauth.clientRegistration "cimd" requires oauth.callbackUrl on localhost or 127.0.0.1 with path /callback';
|
|
1437
|
+
}
|
|
1438
|
+
}
|
|
1428
1439
|
const metadataUrl = value.authServerMetadataUrl;
|
|
1429
1440
|
if (metadataUrl !== undefined) {
|
|
1430
1441
|
const url = typeof metadataUrl === "string" && URL.canParse(metadataUrl) ? new URL(metadataUrl) : undefined;
|
|
@@ -3284,12 +3295,30 @@ function createMcpToolDefinition(options) {
|
|
|
3284
3295
|
exposure: toToolExposure(options.exposure),
|
|
3285
3296
|
namespace: options.namespace,
|
|
3286
3297
|
...annotations ? { annotations } : {},
|
|
3298
|
+
...createMcpToolRenderers(label),
|
|
3299
|
+
async execute(_toolCallId, params, signal, onUpdate) {
|
|
3300
|
+
const client = await options.getClient();
|
|
3301
|
+
const result = await client.callTool(tool.name, params ?? {}, {
|
|
3302
|
+
signal,
|
|
3303
|
+
timeoutMs: options.timeoutMs,
|
|
3304
|
+
onProgress: (progress) => {
|
|
3305
|
+
const total = progress.total === undefined ? "" : `/${progress.total}`;
|
|
3306
|
+
const text = progress.message ?? `Progress ${progress.progress}${total}`;
|
|
3307
|
+
onUpdate?.({ content: [{ type: "text", text }], details: { server, tool: tool.name } });
|
|
3308
|
+
}
|
|
3309
|
+
});
|
|
3310
|
+
return convertMcpResult(server, tool.name, result, { readableResources: options.readableResources?.() });
|
|
3311
|
+
}
|
|
3312
|
+
};
|
|
3313
|
+
}
|
|
3314
|
+
function createMcpToolRenderers(label) {
|
|
3315
|
+
return {
|
|
3287
3316
|
renderCall(args, theme, context) {
|
|
3288
3317
|
const component = context.lastComponent ?? new Text("", 0, 0);
|
|
3289
3318
|
component.setText(formatToolCallWithArgs(label, args, theme, context.expanded));
|
|
3290
3319
|
return component;
|
|
3291
3320
|
},
|
|
3292
|
-
renderResult(result,
|
|
3321
|
+
renderResult(result, options, theme, context) {
|
|
3293
3322
|
const component = context.lastComponent ?? new Container;
|
|
3294
3323
|
component.clear();
|
|
3295
3324
|
const output = getTextOutput(result, context.showImages).trim();
|
|
@@ -3300,7 +3329,7 @@ function createMcpToolDefinition(options) {
|
|
|
3300
3329
|
`).map((line) => theme.fg(color, line)).join(`
|
|
3301
3330
|
`);
|
|
3302
3331
|
component.addChild(new Spacer(1));
|
|
3303
|
-
if (
|
|
3332
|
+
if (options.expanded) {
|
|
3304
3333
|
component.addChild(new Text(styled, 0, 0));
|
|
3305
3334
|
} else {
|
|
3306
3335
|
component.addChild(new VisualLinePreview({
|
|
@@ -3314,19 +3343,6 @@ function createMcpToolDefinition(options) {
|
|
|
3314
3343
|
component.addChild(new Text(theme.fg("muted", `Full output: ${fullOutputPath}`), 0, 0));
|
|
3315
3344
|
}
|
|
3316
3345
|
return component;
|
|
3317
|
-
},
|
|
3318
|
-
async execute(_toolCallId, params, signal, onUpdate) {
|
|
3319
|
-
const client = await options.getClient();
|
|
3320
|
-
const result = await client.callTool(tool.name, params ?? {}, {
|
|
3321
|
-
signal,
|
|
3322
|
-
timeoutMs: options.timeoutMs,
|
|
3323
|
-
onProgress: (progress) => {
|
|
3324
|
-
const total = progress.total === undefined ? "" : `/${progress.total}`;
|
|
3325
|
-
const text = progress.message ?? `Progress ${progress.progress}${total}`;
|
|
3326
|
-
onUpdate?.({ content: [{ type: "text", text }], details: { server, tool: tool.name } });
|
|
3327
|
-
}
|
|
3328
|
-
});
|
|
3329
|
-
return convertMcpResult(server, tool.name, result, { readableResources: options.readableResources?.() });
|
|
3330
3346
|
}
|
|
3331
3347
|
};
|
|
3332
3348
|
}
|
|
@@ -4002,4 +4018,4 @@ function readStoredCredential(providerId, authPath = join2(getAgentDir(), "auth.
|
|
|
4002
4018
|
}
|
|
4003
4019
|
}
|
|
4004
4020
|
|
|
4005
|
-
export { DEFAULT_MAX_LINES, DEFAULT_MAX_BYTES, GREP_MAX_LINE_LENGTH, formatSize, truncateHead, truncateTail, truncateLine, mcpNamespace, getMcpToolExposure, validateMcpServerConfig, McpServerRegistry, getConfigValueEnvVarNames, isCommandConfigValue, isConfigValueConfigured, resolveConfigValueOrThrow, resolveHeadersOrThrow, require_proper_lockfile, operationSignal, raceWithAbortSignal, FileAuthStorageBackend, ReadOnlyAuthStorage, AuthStorage, readStoredCredential, JSON_RPC_ERROR_CODES, McpError, isObject, LATEST_PROTOCOL_VERSION, McpClient, StdioTransport, McpHttpError, McpAuthRequiredError, McpSessionExpiredError, StreamableHttpTransport, READ_MCP_RESOURCE_TOOL, createMcpToolName, createMcpToolDefinition, LIST_MCP_RESOURCES_TOOL, LIST_MCP_RESOURCE_TEMPLATES_TOOL, isMcpAppResource, createMcpResourceToolDefinitions };
|
|
4021
|
+
export { DEFAULT_MAX_LINES, DEFAULT_MAX_BYTES, GREP_MAX_LINE_LENGTH, formatSize, truncateHead, truncateTail, truncateLine, mcpNamespace, getMcpToolExposure, validateMcpServerConfig, McpServerRegistry, getConfigValueEnvVarNames, isCommandConfigValue, isConfigValueConfigured, resolveConfigValueOrThrow, resolveHeadersOrThrow, require_proper_lockfile, operationSignal, raceWithAbortSignal, FileAuthStorageBackend, ReadOnlyAuthStorage, AuthStorage, readStoredCredential, JSON_RPC_ERROR_CODES, McpError, isObject, LATEST_PROTOCOL_VERSION, McpClient, StdioTransport, McpHttpError, McpAuthRequiredError, McpSessionExpiredError, StreamableHttpTransport, READ_MCP_RESOURCE_TOOL, createMcpToolName, createMcpToolDefinition, createMcpToolRenderers, LIST_MCP_RESOURCES_TOOL, LIST_MCP_RESOURCE_TEMPLATES_TOOL, isMcpAppResource, createMcpResourceToolDefinitions };
|
|
@@ -0,0 +1,449 @@
|
|
|
1
|
+
import {
|
|
2
|
+
theme
|
|
3
|
+
} from "./cli-s3hwpt9v.js";
|
|
4
|
+
|
|
5
|
+
// node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/armin.js
|
|
6
|
+
var ARMIN_WIDTH = 31;
|
|
7
|
+
var ARMIN_HEIGHT = 36;
|
|
8
|
+
var WIDTH = ARMIN_WIDTH;
|
|
9
|
+
var HEIGHT = ARMIN_HEIGHT;
|
|
10
|
+
var BITS = [
|
|
11
|
+
255,
|
|
12
|
+
255,
|
|
13
|
+
255,
|
|
14
|
+
127,
|
|
15
|
+
255,
|
|
16
|
+
240,
|
|
17
|
+
255,
|
|
18
|
+
127,
|
|
19
|
+
255,
|
|
20
|
+
237,
|
|
21
|
+
255,
|
|
22
|
+
127,
|
|
23
|
+
255,
|
|
24
|
+
219,
|
|
25
|
+
255,
|
|
26
|
+
127,
|
|
27
|
+
255,
|
|
28
|
+
183,
|
|
29
|
+
255,
|
|
30
|
+
127,
|
|
31
|
+
255,
|
|
32
|
+
119,
|
|
33
|
+
254,
|
|
34
|
+
127,
|
|
35
|
+
63,
|
|
36
|
+
248,
|
|
37
|
+
254,
|
|
38
|
+
127,
|
|
39
|
+
223,
|
|
40
|
+
255,
|
|
41
|
+
254,
|
|
42
|
+
127,
|
|
43
|
+
223,
|
|
44
|
+
63,
|
|
45
|
+
252,
|
|
46
|
+
127,
|
|
47
|
+
159,
|
|
48
|
+
195,
|
|
49
|
+
251,
|
|
50
|
+
127,
|
|
51
|
+
111,
|
|
52
|
+
252,
|
|
53
|
+
244,
|
|
54
|
+
127,
|
|
55
|
+
247,
|
|
56
|
+
15,
|
|
57
|
+
247,
|
|
58
|
+
127,
|
|
59
|
+
247,
|
|
60
|
+
255,
|
|
61
|
+
247,
|
|
62
|
+
127,
|
|
63
|
+
247,
|
|
64
|
+
255,
|
|
65
|
+
227,
|
|
66
|
+
127,
|
|
67
|
+
247,
|
|
68
|
+
7,
|
|
69
|
+
232,
|
|
70
|
+
127,
|
|
71
|
+
239,
|
|
72
|
+
248,
|
|
73
|
+
103,
|
|
74
|
+
112,
|
|
75
|
+
15,
|
|
76
|
+
255,
|
|
77
|
+
187,
|
|
78
|
+
111,
|
|
79
|
+
241,
|
|
80
|
+
0,
|
|
81
|
+
208,
|
|
82
|
+
91,
|
|
83
|
+
253,
|
|
84
|
+
63,
|
|
85
|
+
236,
|
|
86
|
+
83,
|
|
87
|
+
193,
|
|
88
|
+
255,
|
|
89
|
+
239,
|
|
90
|
+
87,
|
|
91
|
+
159,
|
|
92
|
+
253,
|
|
93
|
+
238,
|
|
94
|
+
95,
|
|
95
|
+
159,
|
|
96
|
+
252,
|
|
97
|
+
174,
|
|
98
|
+
95,
|
|
99
|
+
31,
|
|
100
|
+
120,
|
|
101
|
+
172,
|
|
102
|
+
95,
|
|
103
|
+
63,
|
|
104
|
+
0,
|
|
105
|
+
80,
|
|
106
|
+
108,
|
|
107
|
+
127,
|
|
108
|
+
0,
|
|
109
|
+
220,
|
|
110
|
+
119,
|
|
111
|
+
255,
|
|
112
|
+
192,
|
|
113
|
+
63,
|
|
114
|
+
120,
|
|
115
|
+
255,
|
|
116
|
+
1,
|
|
117
|
+
248,
|
|
118
|
+
127,
|
|
119
|
+
255,
|
|
120
|
+
3,
|
|
121
|
+
156,
|
|
122
|
+
120,
|
|
123
|
+
255,
|
|
124
|
+
7,
|
|
125
|
+
140,
|
|
126
|
+
124,
|
|
127
|
+
255,
|
|
128
|
+
15,
|
|
129
|
+
206,
|
|
130
|
+
120,
|
|
131
|
+
255,
|
|
132
|
+
255,
|
|
133
|
+
207,
|
|
134
|
+
127,
|
|
135
|
+
255,
|
|
136
|
+
255,
|
|
137
|
+
207,
|
|
138
|
+
120,
|
|
139
|
+
255,
|
|
140
|
+
255,
|
|
141
|
+
223,
|
|
142
|
+
120,
|
|
143
|
+
255,
|
|
144
|
+
255,
|
|
145
|
+
223,
|
|
146
|
+
125,
|
|
147
|
+
255,
|
|
148
|
+
255,
|
|
149
|
+
63,
|
|
150
|
+
126,
|
|
151
|
+
255,
|
|
152
|
+
255,
|
|
153
|
+
255,
|
|
154
|
+
127
|
|
155
|
+
];
|
|
156
|
+
var BYTES_PER_ROW = Math.ceil(WIDTH / 8);
|
|
157
|
+
var DISPLAY_HEIGHT = Math.ceil(HEIGHT / 2);
|
|
158
|
+
var EFFECTS = ["typewriter", "scanline", "rain", "fade", "crt", "glitch", "dissolve"];
|
|
159
|
+
function isArminPixel(x, y) {
|
|
160
|
+
if (y >= HEIGHT)
|
|
161
|
+
return false;
|
|
162
|
+
const byteIndex = y * BYTES_PER_ROW + Math.floor(x / 8);
|
|
163
|
+
const bitIndex = x % 8;
|
|
164
|
+
return (BITS[byteIndex] >> bitIndex & 1) === 0;
|
|
165
|
+
}
|
|
166
|
+
function getChar(x, row) {
|
|
167
|
+
const upper = isArminPixel(x, row * 2);
|
|
168
|
+
const lower = isArminPixel(x, row * 2 + 1);
|
|
169
|
+
if (upper && lower)
|
|
170
|
+
return "█";
|
|
171
|
+
if (upper)
|
|
172
|
+
return "▀";
|
|
173
|
+
if (lower)
|
|
174
|
+
return "▄";
|
|
175
|
+
return " ";
|
|
176
|
+
}
|
|
177
|
+
function buildFinalGrid() {
|
|
178
|
+
const grid = [];
|
|
179
|
+
for (let row = 0;row < DISPLAY_HEIGHT; row++) {
|
|
180
|
+
const line = [];
|
|
181
|
+
for (let x = 0;x < WIDTH; x++) {
|
|
182
|
+
line.push(getChar(x, row));
|
|
183
|
+
}
|
|
184
|
+
grid.push(line);
|
|
185
|
+
}
|
|
186
|
+
return grid;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
class ArminComponent {
|
|
190
|
+
ui;
|
|
191
|
+
interval = null;
|
|
192
|
+
effect;
|
|
193
|
+
finalGrid;
|
|
194
|
+
currentGrid;
|
|
195
|
+
effectState = {};
|
|
196
|
+
cachedLines = [];
|
|
197
|
+
cachedWidth = 0;
|
|
198
|
+
gridVersion = 0;
|
|
199
|
+
cachedVersion = -1;
|
|
200
|
+
constructor(ui) {
|
|
201
|
+
this.ui = ui;
|
|
202
|
+
this.effect = EFFECTS[Math.floor(Math.random() * EFFECTS.length)];
|
|
203
|
+
this.finalGrid = buildFinalGrid();
|
|
204
|
+
this.currentGrid = this.createEmptyGrid();
|
|
205
|
+
this.initEffect();
|
|
206
|
+
this.startAnimation();
|
|
207
|
+
}
|
|
208
|
+
invalidate() {
|
|
209
|
+
this.cachedWidth = 0;
|
|
210
|
+
}
|
|
211
|
+
render(width) {
|
|
212
|
+
if (width === this.cachedWidth && this.cachedVersion === this.gridVersion) {
|
|
213
|
+
return this.cachedLines;
|
|
214
|
+
}
|
|
215
|
+
const padding = 1;
|
|
216
|
+
const availableWidth = width - padding;
|
|
217
|
+
this.cachedLines = this.currentGrid.map((row) => {
|
|
218
|
+
const clipped = row.slice(0, availableWidth).join("");
|
|
219
|
+
const padRight = Math.max(0, width - padding - clipped.length);
|
|
220
|
+
return ` ${theme.fg("accent", clipped)}${" ".repeat(padRight)}`;
|
|
221
|
+
});
|
|
222
|
+
const message = "ARMIN SAYS HI";
|
|
223
|
+
const msgPadRight = Math.max(0, width - padding - message.length);
|
|
224
|
+
this.cachedLines.push(` ${theme.fg("accent", message)}${" ".repeat(msgPadRight)}`);
|
|
225
|
+
this.cachedWidth = width;
|
|
226
|
+
this.cachedVersion = this.gridVersion;
|
|
227
|
+
return this.cachedLines;
|
|
228
|
+
}
|
|
229
|
+
createEmptyGrid() {
|
|
230
|
+
return Array.from({ length: DISPLAY_HEIGHT }, () => Array(WIDTH).fill(" "));
|
|
231
|
+
}
|
|
232
|
+
initEffect() {
|
|
233
|
+
switch (this.effect) {
|
|
234
|
+
case "typewriter":
|
|
235
|
+
this.effectState = { pos: 0 };
|
|
236
|
+
break;
|
|
237
|
+
case "scanline":
|
|
238
|
+
this.effectState = { row: 0 };
|
|
239
|
+
break;
|
|
240
|
+
case "rain":
|
|
241
|
+
this.effectState = {
|
|
242
|
+
drops: Array.from({ length: WIDTH }, () => ({
|
|
243
|
+
y: -Math.floor(Math.random() * DISPLAY_HEIGHT * 2),
|
|
244
|
+
settled: 0
|
|
245
|
+
}))
|
|
246
|
+
};
|
|
247
|
+
break;
|
|
248
|
+
case "fade": {
|
|
249
|
+
const positions = [];
|
|
250
|
+
for (let row = 0;row < DISPLAY_HEIGHT; row++) {
|
|
251
|
+
for (let x = 0;x < WIDTH; x++) {
|
|
252
|
+
positions.push([row, x]);
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
for (let i = positions.length - 1;i > 0; i--) {
|
|
256
|
+
const j = Math.floor(Math.random() * (i + 1));
|
|
257
|
+
[positions[i], positions[j]] = [positions[j], positions[i]];
|
|
258
|
+
}
|
|
259
|
+
this.effectState = { positions, idx: 0 };
|
|
260
|
+
break;
|
|
261
|
+
}
|
|
262
|
+
case "crt":
|
|
263
|
+
this.effectState = { expansion: 0 };
|
|
264
|
+
break;
|
|
265
|
+
case "glitch":
|
|
266
|
+
this.effectState = { phase: 0, glitchFrames: 8 };
|
|
267
|
+
break;
|
|
268
|
+
case "dissolve": {
|
|
269
|
+
this.currentGrid = Array.from({ length: DISPLAY_HEIGHT }, () => Array.from({ length: WIDTH }, () => {
|
|
270
|
+
const chars = [" ", "░", "▒", "▓", "█", "▀", "▄"];
|
|
271
|
+
return chars[Math.floor(Math.random() * chars.length)];
|
|
272
|
+
}));
|
|
273
|
+
const dissolvePositions = [];
|
|
274
|
+
for (let row = 0;row < DISPLAY_HEIGHT; row++) {
|
|
275
|
+
for (let x = 0;x < WIDTH; x++) {
|
|
276
|
+
dissolvePositions.push([row, x]);
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
for (let i = dissolvePositions.length - 1;i > 0; i--) {
|
|
280
|
+
const j = Math.floor(Math.random() * (i + 1));
|
|
281
|
+
[dissolvePositions[i], dissolvePositions[j]] = [dissolvePositions[j], dissolvePositions[i]];
|
|
282
|
+
}
|
|
283
|
+
this.effectState = { positions: dissolvePositions, idx: 0 };
|
|
284
|
+
break;
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
startAnimation() {
|
|
289
|
+
const fps = this.effect === "glitch" ? 60 : 30;
|
|
290
|
+
this.interval = setInterval(() => {
|
|
291
|
+
const done = this.tickEffect();
|
|
292
|
+
this.updateDisplay();
|
|
293
|
+
this.ui.requestRender();
|
|
294
|
+
if (done) {
|
|
295
|
+
this.stopAnimation();
|
|
296
|
+
}
|
|
297
|
+
}, 1000 / fps);
|
|
298
|
+
}
|
|
299
|
+
stopAnimation() {
|
|
300
|
+
if (this.interval) {
|
|
301
|
+
clearInterval(this.interval);
|
|
302
|
+
this.interval = null;
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
tickEffect() {
|
|
306
|
+
switch (this.effect) {
|
|
307
|
+
case "typewriter":
|
|
308
|
+
return this.tickTypewriter();
|
|
309
|
+
case "scanline":
|
|
310
|
+
return this.tickScanline();
|
|
311
|
+
case "rain":
|
|
312
|
+
return this.tickRain();
|
|
313
|
+
case "fade":
|
|
314
|
+
return this.tickFade();
|
|
315
|
+
case "crt":
|
|
316
|
+
return this.tickCrt();
|
|
317
|
+
case "glitch":
|
|
318
|
+
return this.tickGlitch();
|
|
319
|
+
case "dissolve":
|
|
320
|
+
return this.tickDissolve();
|
|
321
|
+
default:
|
|
322
|
+
return true;
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
tickTypewriter() {
|
|
326
|
+
const state = this.effectState;
|
|
327
|
+
const pixelsPerFrame = 3;
|
|
328
|
+
for (let i = 0;i < pixelsPerFrame; i++) {
|
|
329
|
+
const row = Math.floor(state.pos / WIDTH);
|
|
330
|
+
const x = state.pos % WIDTH;
|
|
331
|
+
if (row >= DISPLAY_HEIGHT)
|
|
332
|
+
return true;
|
|
333
|
+
this.currentGrid[row][x] = this.finalGrid[row][x];
|
|
334
|
+
state.pos++;
|
|
335
|
+
}
|
|
336
|
+
return false;
|
|
337
|
+
}
|
|
338
|
+
tickScanline() {
|
|
339
|
+
const state = this.effectState;
|
|
340
|
+
if (state.row >= DISPLAY_HEIGHT)
|
|
341
|
+
return true;
|
|
342
|
+
for (let x = 0;x < WIDTH; x++) {
|
|
343
|
+
this.currentGrid[state.row][x] = this.finalGrid[state.row][x];
|
|
344
|
+
}
|
|
345
|
+
state.row++;
|
|
346
|
+
return false;
|
|
347
|
+
}
|
|
348
|
+
tickRain() {
|
|
349
|
+
const state = this.effectState;
|
|
350
|
+
let allSettled = true;
|
|
351
|
+
this.currentGrid = this.createEmptyGrid();
|
|
352
|
+
for (let x = 0;x < WIDTH; x++) {
|
|
353
|
+
const drop = state.drops[x];
|
|
354
|
+
for (let row = DISPLAY_HEIGHT - 1;row >= DISPLAY_HEIGHT - drop.settled; row--) {
|
|
355
|
+
if (row >= 0) {
|
|
356
|
+
this.currentGrid[row][x] = this.finalGrid[row][x];
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
if (drop.settled >= DISPLAY_HEIGHT)
|
|
360
|
+
continue;
|
|
361
|
+
allSettled = false;
|
|
362
|
+
let targetRow = -1;
|
|
363
|
+
for (let row = DISPLAY_HEIGHT - 1 - drop.settled;row >= 0; row--) {
|
|
364
|
+
if (this.finalGrid[row][x] !== " ") {
|
|
365
|
+
targetRow = row;
|
|
366
|
+
break;
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
drop.y++;
|
|
370
|
+
if (drop.y >= 0 && drop.y < DISPLAY_HEIGHT) {
|
|
371
|
+
if (targetRow >= 0 && drop.y >= targetRow) {
|
|
372
|
+
drop.settled = DISPLAY_HEIGHT - targetRow;
|
|
373
|
+
drop.y = -Math.floor(Math.random() * 5) - 1;
|
|
374
|
+
} else {
|
|
375
|
+
this.currentGrid[drop.y][x] = "▓";
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
return allSettled;
|
|
380
|
+
}
|
|
381
|
+
tickFade() {
|
|
382
|
+
const state = this.effectState;
|
|
383
|
+
const pixelsPerFrame = 15;
|
|
384
|
+
for (let i = 0;i < pixelsPerFrame; i++) {
|
|
385
|
+
if (state.idx >= state.positions.length)
|
|
386
|
+
return true;
|
|
387
|
+
const [row, x] = state.positions[state.idx];
|
|
388
|
+
this.currentGrid[row][x] = this.finalGrid[row][x];
|
|
389
|
+
state.idx++;
|
|
390
|
+
}
|
|
391
|
+
return false;
|
|
392
|
+
}
|
|
393
|
+
tickCrt() {
|
|
394
|
+
const state = this.effectState;
|
|
395
|
+
const midRow = Math.floor(DISPLAY_HEIGHT / 2);
|
|
396
|
+
this.currentGrid = this.createEmptyGrid();
|
|
397
|
+
const top = midRow - state.expansion;
|
|
398
|
+
const bottom = midRow + state.expansion;
|
|
399
|
+
for (let row = Math.max(0, top);row <= Math.min(DISPLAY_HEIGHT - 1, bottom); row++) {
|
|
400
|
+
for (let x = 0;x < WIDTH; x++) {
|
|
401
|
+
this.currentGrid[row][x] = this.finalGrid[row][x];
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
|
+
state.expansion++;
|
|
405
|
+
return state.expansion > DISPLAY_HEIGHT;
|
|
406
|
+
}
|
|
407
|
+
tickGlitch() {
|
|
408
|
+
const state = this.effectState;
|
|
409
|
+
if (state.phase < state.glitchFrames) {
|
|
410
|
+
this.currentGrid = this.finalGrid.map((row) => {
|
|
411
|
+
const offset = Math.floor(Math.random() * 7) - 3;
|
|
412
|
+
const glitchRow = [...row];
|
|
413
|
+
if (Math.random() < 0.3) {
|
|
414
|
+
const shifted = glitchRow.slice(offset).concat(glitchRow.slice(0, offset));
|
|
415
|
+
return shifted.slice(0, WIDTH);
|
|
416
|
+
}
|
|
417
|
+
if (Math.random() < 0.2) {
|
|
418
|
+
const swapRow = Math.floor(Math.random() * DISPLAY_HEIGHT);
|
|
419
|
+
return [...this.finalGrid[swapRow]];
|
|
420
|
+
}
|
|
421
|
+
return glitchRow;
|
|
422
|
+
});
|
|
423
|
+
state.phase++;
|
|
424
|
+
return false;
|
|
425
|
+
}
|
|
426
|
+
this.currentGrid = this.finalGrid.map((row) => [...row]);
|
|
427
|
+
return true;
|
|
428
|
+
}
|
|
429
|
+
tickDissolve() {
|
|
430
|
+
const state = this.effectState;
|
|
431
|
+
const pixelsPerFrame = 20;
|
|
432
|
+
for (let i = 0;i < pixelsPerFrame; i++) {
|
|
433
|
+
if (state.idx >= state.positions.length)
|
|
434
|
+
return true;
|
|
435
|
+
const [row, x] = state.positions[state.idx];
|
|
436
|
+
this.currentGrid[row][x] = this.finalGrid[row][x];
|
|
437
|
+
state.idx++;
|
|
438
|
+
}
|
|
439
|
+
return false;
|
|
440
|
+
}
|
|
441
|
+
updateDisplay() {
|
|
442
|
+
this.gridVersion++;
|
|
443
|
+
}
|
|
444
|
+
dispose() {
|
|
445
|
+
this.stopAnimation();
|
|
446
|
+
}
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
export { ARMIN_WIDTH, ARMIN_HEIGHT, isArminPixel, ArminComponent };
|
|
@@ -1,22 +1,26 @@
|
|
|
1
1
|
import {
|
|
2
2
|
init_task_attachment_links,
|
|
3
3
|
taskAttachmentDisplayUrl
|
|
4
|
-
} from "./cli-
|
|
4
|
+
} from "./cli-cvk6yzw5.js";
|
|
5
5
|
import {
|
|
6
6
|
IDENTITY_FIELD_BUDGETS,
|
|
7
|
-
init_identity_field_budget
|
|
8
|
-
|
|
9
|
-
} from "./cli-yrg7c73k.js";
|
|
7
|
+
init_identity_field_budget
|
|
8
|
+
} from "./cli-7af8yhav.js";
|
|
10
9
|
import {
|
|
11
|
-
init_resolver,
|
|
12
10
|
init_steering_enabled,
|
|
13
|
-
isSteeringEnabled
|
|
14
|
-
|
|
15
|
-
} from "./cli-ptr8h7kp.js";
|
|
11
|
+
isSteeringEnabled
|
|
12
|
+
} from "./cli-eg0b3p0k.js";
|
|
16
13
|
import {
|
|
17
14
|
MAX_PROFILE_FILE_LENGTH,
|
|
18
15
|
init_constants
|
|
19
|
-
} from "./cli-
|
|
16
|
+
} from "./cli-gd4favx9.js";
|
|
17
|
+
import {
|
|
18
|
+
init_templates
|
|
19
|
+
} from "./cli-qrgt5bqf.js";
|
|
20
|
+
import {
|
|
21
|
+
init_resolver,
|
|
22
|
+
resolveTemplateAsync
|
|
23
|
+
} from "./cli-qjjvzwzd.js";
|
|
20
24
|
import {
|
|
21
25
|
init_secret_scrubber,
|
|
22
26
|
scrubSecrets
|
|
@@ -113,7 +117,7 @@ async function fetchTaskContextForPreamble(apiUrl, apiKey, taskId) {
|
|
|
113
117
|
}
|
|
114
118
|
}
|
|
115
119
|
function formatAttachmentPointer(att) {
|
|
116
|
-
const pointer = taskAttachmentDisplayUrl(att);
|
|
120
|
+
const pointer = taskAttachmentDisplayUrl(att, { comb: false });
|
|
117
121
|
return pointer || "(no pointer)";
|
|
118
122
|
}
|
|
119
123
|
async function buildContextPreamble(apiUrl, apiKey, parentTaskId) {
|
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
import {
|
|
25
25
|
DEFAULT_MODEL_TIER_MAP,
|
|
26
26
|
init_types
|
|
27
|
-
} from "./cli-
|
|
27
|
+
} from "./cli-xqpk3rp7.js";
|
|
28
28
|
import {
|
|
29
29
|
init_secret_scrubber,
|
|
30
30
|
registerVolatileSecret,
|
|
@@ -63,7 +63,7 @@ function addDshStepUsage(acc, step) {
|
|
|
63
63
|
|
|
64
64
|
// src/providers/dsh-adapter.ts
|
|
65
65
|
init_secret_scrubber();
|
|
66
|
-
var DSH_PACKAGE = "@deepseek-ai/dsh@0.2.
|
|
66
|
+
var DSH_PACKAGE = "@deepseek-ai/dsh@0.2.1-alpha.1";
|
|
67
67
|
function checkDshCredentials(env) {
|
|
68
68
|
return env.DEEPSEEK_API_KEY?.trim() || env.OPENROUTER_API_KEY?.trim() ? { ready: true, missing: [], satisfiedBy: "env" } : {
|
|
69
69
|
ready: false,
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
buildAgentFsLiveUrl,
|
|
3
|
+
buildCombFileUrl,
|
|
3
4
|
getAppUrl,
|
|
4
5
|
init_constants
|
|
5
|
-
} from "./cli-
|
|
6
|
+
} from "./cli-gd4favx9.js";
|
|
6
7
|
import {
|
|
7
8
|
__esm
|
|
8
9
|
} from "./cli-bc05qbss.js";
|
|
@@ -16,19 +17,16 @@ function taskAttachmentFetchCommand(taskId, attachmentId, name) {
|
|
|
16
17
|
const outPath = shellQuote(`/tmp/attachments/${attachmentId}/${name.replace(/\//g, "_")}`);
|
|
17
18
|
return `curl -s -H "Authorization: Bearer \${AGENT_SWARM_API_KEY:-$API_KEY}" -H "X-Agent-ID: $AGENT_ID" "${url}" --create-dirs -o ${outPath}`;
|
|
18
19
|
}
|
|
19
|
-
function taskAttachmentDisplayUrl(attachment) {
|
|
20
|
+
function taskAttachmentDisplayUrl(attachment, opts = {}) {
|
|
20
21
|
if (attachment.kind === "url")
|
|
21
22
|
return attachment.url ?? "";
|
|
22
23
|
if (attachment.kind === "page") {
|
|
23
24
|
return attachment.pageId ? `${getAppUrl()}/pages/${attachment.pageId}` : "page:";
|
|
24
25
|
}
|
|
25
26
|
if (attachment.providerId === "agent-fs" || attachment.kind === "agent-fs") {
|
|
26
|
-
const
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
driveId: attachment.driveId
|
|
30
|
-
});
|
|
31
|
-
return liveUrl ?? `agent-fs:${attachment.path ?? ""}`;
|
|
27
|
+
const file = { path: attachment.path, orgId: attachment.orgId, driveId: attachment.driveId };
|
|
28
|
+
const combUrl = opts.comb === false ? null : buildCombFileUrl(file);
|
|
29
|
+
return combUrl ?? buildAgentFsLiveUrl(file) ?? `agent-fs:${attachment.path ?? ""}`;
|
|
32
30
|
}
|
|
33
31
|
if (attachment.providerId === "local-fs" || attachment.kind === "shared-fs") {
|
|
34
32
|
return `${getAppUrl()}/api/fs/tasks/${attachment.taskId}/files/${attachment.id}/raw`;
|