@cydm/pie 2.5.2 → 2.6.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/builtin/extensions/ask-user/index.js +3 -3
- package/dist/builtin/extensions/mcp-adapter/index.js +38 -16
- package/dist/builtin/extensions/plan-mode/index.js +3 -3
- package/dist/builtin/extensions/subagent/index.js +8 -5
- package/dist/builtin/extensions/todo/index.js +3 -3
- package/dist/builtin/skills/chrome-devtools-axi/chrome-devtools-axi-bridge.js +194 -40
- package/dist/builtin/skills/chrome-devtools-axi/chrome-devtools-axi-runtime.js +1 -1
- package/dist/builtin/skills/chrome-devtools-axi/{cli-EJ5MQZNA.js → cli-GB37NZHQ.js} +2 -2
- package/dist/builtin/skills/tui-use/SKILL.md +44 -0
- package/dist/builtin/skills/tui-use/tui-use-cli.cjs +15 -7
- package/dist/chunks/{chunk-LO2V5DZZ.js → chunk-AZ336HKF.js} +369 -66
- package/dist/chunks/{chunk-M4OJARWJ.js → chunk-G6KCJA6B.js} +1 -1
- package/dist/chunks/{chunk-UD7KYQ6J.js → chunk-O2DKMLNX.js} +146 -11
- package/dist/chunks/{chunk-RTTGO2A6.js → chunk-Y4CYXJR7.js} +27 -2
- package/dist/chunks/src-VCWCE7YV.js +20 -0
- package/dist/chunks/{test-stream-LFR6GSKQ.js → test-stream-GOSEWMJ3.js} +1 -1
- package/dist/cli.js +15 -13
- package/package.json +2 -2
- package/dist/chunks/src-33WRCQWX.js +0 -14
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { createRequire as __createRequire } from "node:module"; const require = __createRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
createAskUserCapability
|
|
4
|
-
} from "../../../chunks/chunk-
|
|
5
|
-
import "../../../chunks/chunk-
|
|
6
|
-
import "../../../chunks/chunk-
|
|
4
|
+
} from "../../../chunks/chunk-AZ336HKF.js";
|
|
5
|
+
import "../../../chunks/chunk-Y4CYXJR7.js";
|
|
6
|
+
import "../../../chunks/chunk-O2DKMLNX.js";
|
|
7
7
|
import "../../../chunks/chunk-XXGYUYXI.js";
|
|
8
8
|
import "../../../chunks/chunk-LZQXQOPJ.js";
|
|
9
9
|
|
|
@@ -24461,20 +24461,35 @@ function redactSecrets(text, secrets) {
|
|
|
24461
24461
|
}
|
|
24462
24462
|
return sanitized;
|
|
24463
24463
|
}
|
|
24464
|
-
function
|
|
24465
|
-
|
|
24466
|
-
|
|
24467
|
-
for (
|
|
24468
|
-
|
|
24469
|
-
|
|
24470
|
-
|
|
24471
|
-
|
|
24472
|
-
|
|
24464
|
+
function redactLeadingSecretSuffix(text, secrets) {
|
|
24465
|
+
if (secrets.length === 0 || text.length === 0) return text;
|
|
24466
|
+
for (const secret of secrets) {
|
|
24467
|
+
for (let keep = Math.min(secret.length - 1, text.length); keep >= 4; keep--) {
|
|
24468
|
+
if (text.startsWith(secret.slice(secret.length - keep))) {
|
|
24469
|
+
return `[redacted]${text.slice(keep)}`;
|
|
24470
|
+
}
|
|
24471
|
+
}
|
|
24472
|
+
}
|
|
24473
|
+
return text;
|
|
24474
|
+
}
|
|
24475
|
+
function redactTrailingSecretPrefix(text, secrets) {
|
|
24476
|
+
if (secrets.length === 0 || text.length === 0) return text;
|
|
24477
|
+
for (const secret of secrets) {
|
|
24478
|
+
for (let keep = Math.min(secret.length - 1, text.length); keep >= 4; keep--) {
|
|
24479
|
+
if (text.endsWith(secret.slice(0, keep))) {
|
|
24480
|
+
return `${text.slice(0, text.length - keep)}[redacted]`;
|
|
24473
24481
|
}
|
|
24474
24482
|
}
|
|
24475
24483
|
}
|
|
24484
|
+
return text;
|
|
24485
|
+
}
|
|
24486
|
+
function redactStderrTail(tail, secrets) {
|
|
24487
|
+
return redactTrailingSecretPrefix(redactLeadingSecretSuffix(redactSecrets(tail, secrets), secrets), secrets);
|
|
24488
|
+
}
|
|
24489
|
+
function sanitizeDiagnostic(text, secrets) {
|
|
24490
|
+
const sanitized = redactLeadingSecretSuffix(redactSecrets(text, secrets), secrets);
|
|
24476
24491
|
if (sanitized.length > DIAGNOSTIC_TEXT_LIMIT) {
|
|
24477
|
-
|
|
24492
|
+
return `${sanitized.slice(0, DIAGNOSTIC_TEXT_LIMIT)}\u2026[truncated ${sanitized.length - DIAGNOSTIC_TEXT_LIMIT} chars]`;
|
|
24478
24493
|
}
|
|
24479
24494
|
return sanitized;
|
|
24480
24495
|
}
|
|
@@ -24543,14 +24558,20 @@ function cacheFingerprint(definition) {
|
|
|
24543
24558
|
command: definition.command,
|
|
24544
24559
|
args: definition.args,
|
|
24545
24560
|
// Canonicalized (key-sorted) so reordering equivalent env/header keys
|
|
24546
|
-
// does not invalidate cached metadata.
|
|
24547
|
-
|
|
24561
|
+
// does not invalidate cached metadata. Sorting must be locale-stable
|
|
24562
|
+
// (code-unit order, not localeCompare) so the same definition
|
|
24563
|
+
// fingerprints identically on every machine.
|
|
24564
|
+
env: canonicalizeKeys(definition.env),
|
|
24548
24565
|
serverCwd: definition.cwd,
|
|
24549
24566
|
url: definition.url,
|
|
24550
|
-
headers:
|
|
24567
|
+
headers: canonicalizeKeys(definition.headers),
|
|
24551
24568
|
inheritEnv: definition.inheritEnv
|
|
24552
24569
|
})).digest("hex").slice(0, 24);
|
|
24553
24570
|
}
|
|
24571
|
+
function canonicalizeKeys(record2) {
|
|
24572
|
+
if (!record2) return {};
|
|
24573
|
+
return Object.fromEntries(Object.entries(record2).sort(([a], [b]) => a < b ? -1 : a > b ? 1 : 0));
|
|
24574
|
+
}
|
|
24554
24575
|
var McpServerManager = class {
|
|
24555
24576
|
constructor(definitions, cacheDir, log, now = Date.now) {
|
|
24556
24577
|
this.now = now;
|
|
@@ -24757,7 +24778,6 @@ var McpServerManager = class {
|
|
|
24757
24778
|
}
|
|
24758
24779
|
}
|
|
24759
24780
|
/** Cached descriptors for one server (from the metadata cache file). */
|
|
24760
|
-
/** Cached descriptors for one server (from the metadata cache file). */
|
|
24761
24781
|
cachedToolsFor(server) {
|
|
24762
24782
|
return this.loadCatalog().filter((tool) => tool.server === sanitizeName(server));
|
|
24763
24783
|
}
|
|
@@ -24887,8 +24907,8 @@ var McpServerManager = class {
|
|
|
24887
24907
|
runtime = await this.connect(server, signal);
|
|
24888
24908
|
} catch (error2) {
|
|
24889
24909
|
const runtimeState = this.runtimes.get(server);
|
|
24890
|
-
const tail = runtimeState?.stderrTail.trim();
|
|
24891
24910
|
const secrets = definitionSecrets(definition);
|
|
24911
|
+
const tail = redactStderrTail(runtimeState?.stderrTail ?? "", secrets).trim();
|
|
24892
24912
|
return {
|
|
24893
24913
|
delivery: "not_sent",
|
|
24894
24914
|
error: sanitizeDiagnostic(
|
|
@@ -25186,6 +25206,7 @@ ${truncate(JSON.stringify(schema ?? {}, null, 2), maxBytes)}` : `unknown MCP too
|
|
|
25186
25206
|
}
|
|
25187
25207
|
const resolved = getManager().resolvePrefixedName(params.tool);
|
|
25188
25208
|
const server = descriptor?.server ?? resolved?.server ?? "";
|
|
25209
|
+
let dispatchManager;
|
|
25189
25210
|
if (server) {
|
|
25190
25211
|
const managerAtGate = getManager();
|
|
25191
25212
|
const trust = await ensureTrusted(server, managerAtGate);
|
|
@@ -25204,6 +25225,7 @@ ${truncate(JSON.stringify(schema ?? {}, null, 2), maxBytes)}` : `unknown MCP too
|
|
|
25204
25225
|
isError: true
|
|
25205
25226
|
};
|
|
25206
25227
|
}
|
|
25228
|
+
dispatchManager = managerNow;
|
|
25207
25229
|
}
|
|
25208
25230
|
let args = {};
|
|
25209
25231
|
if (typeof params.args === "string") {
|
|
@@ -25219,7 +25241,7 @@ ${truncate(JSON.stringify(schema ?? {}, null, 2), maxBytes)}` : `unknown MCP too
|
|
|
25219
25241
|
} else if (params.args && typeof params.args === "object" && !Array.isArray(params.args)) {
|
|
25220
25242
|
args = params.args;
|
|
25221
25243
|
}
|
|
25222
|
-
const outcome = await getManager().callTool(params.tool, args, toolContext.signal);
|
|
25244
|
+
const outcome = await (dispatchManager ?? getManager()).callTool(params.tool, args, toolContext.signal);
|
|
25223
25245
|
return mapMcpOutcome(outcome, maxBytes);
|
|
25224
25246
|
}
|
|
25225
25247
|
};
|
|
@@ -7,9 +7,9 @@ import {
|
|
|
7
7
|
isPlanModeSafeCommand,
|
|
8
8
|
markCompletedPlanSteps,
|
|
9
9
|
restoreExecutionState
|
|
10
|
-
} from "../../../chunks/chunk-
|
|
11
|
-
import "../../../chunks/chunk-
|
|
12
|
-
import "../../../chunks/chunk-
|
|
10
|
+
} from "../../../chunks/chunk-AZ336HKF.js";
|
|
11
|
+
import "../../../chunks/chunk-Y4CYXJR7.js";
|
|
12
|
+
import "../../../chunks/chunk-O2DKMLNX.js";
|
|
13
13
|
import {
|
|
14
14
|
Type
|
|
15
15
|
} from "../../../chunks/chunk-XXGYUYXI.js";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { createRequire as __createRequire } from "node:module"; const require = __createRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
createCliHostCapabilities
|
|
4
|
-
} from "../../../chunks/chunk-
|
|
4
|
+
} from "../../../chunks/chunk-G6KCJA6B.js";
|
|
5
5
|
import {
|
|
6
6
|
createSharedFileSystemTools,
|
|
7
7
|
createSubagentCapability
|
|
8
|
-
} from "../../../chunks/chunk-
|
|
9
|
-
import "../../../chunks/chunk-
|
|
10
|
-
import "../../../chunks/chunk-
|
|
8
|
+
} from "../../../chunks/chunk-AZ336HKF.js";
|
|
9
|
+
import "../../../chunks/chunk-Y4CYXJR7.js";
|
|
10
|
+
import "../../../chunks/chunk-O2DKMLNX.js";
|
|
11
11
|
import "../../../chunks/chunk-5353DEEC.js";
|
|
12
12
|
import "../../../chunks/chunk-XXGYUYXI.js";
|
|
13
13
|
import "../../../chunks/chunk-LZQXQOPJ.js";
|
|
@@ -39,11 +39,14 @@ function subagentExtension(ctx) {
|
|
|
39
39
|
debugLog: (module, message, data) => ctx.log(`[subagent:${module}] ${message}${data !== void 0 ? ` ${JSON.stringify(data)}` : ""}`),
|
|
40
40
|
resolveModelClass: (modelClass) => ctx.resolveModelClass?.(modelClass),
|
|
41
41
|
resolveModelRef: (modelRef) => ctx.resolveModelRef?.(modelRef),
|
|
42
|
-
createRuntimeTools: () => {
|
|
42
|
+
createRuntimeTools: (mode) => {
|
|
43
43
|
const parentRuntimeTools = ctx.getRuntimeTools();
|
|
44
44
|
if (Array.isArray(parentRuntimeTools) && parentRuntimeTools.length > 0) {
|
|
45
45
|
return parentRuntimeTools.filter((tool) => tool?.name !== "spawn_subagents_parallel");
|
|
46
46
|
}
|
|
47
|
+
if (mode === "edit") {
|
|
48
|
+
throw new Error("Edit delegation requires the parent's executable runtime tools; fallback tools are read-mode only.");
|
|
49
|
+
}
|
|
47
50
|
const configDir = path.join(os.homedir(), ".pie");
|
|
48
51
|
const fsOptions = ctx.yoloMode ? { allowlistedDirs: ["/"] } : {
|
|
49
52
|
accessRoots: [
|
|
@@ -8,9 +8,9 @@ import {
|
|
|
8
8
|
executeManageTodoList,
|
|
9
9
|
executionStateToTodos,
|
|
10
10
|
restoreExecutionState
|
|
11
|
-
} from "../../../chunks/chunk-
|
|
12
|
-
import "../../../chunks/chunk-
|
|
13
|
-
import "../../../chunks/chunk-
|
|
11
|
+
} from "../../../chunks/chunk-AZ336HKF.js";
|
|
12
|
+
import "../../../chunks/chunk-Y4CYXJR7.js";
|
|
13
|
+
import "../../../chunks/chunk-O2DKMLNX.js";
|
|
14
14
|
import "../../../chunks/chunk-XXGYUYXI.js";
|
|
15
15
|
import "../../../chunks/chunk-LZQXQOPJ.js";
|
|
16
16
|
|