@cydm/pie 2.7.20 → 2.8.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/README.md +117 -0
- package/dist/builtin/extensions/ask-user/index.js +3 -3
- package/dist/builtin/extensions/cron/index.js +35 -9
- package/dist/builtin/extensions/im-forward/README.md +297 -0
- package/dist/builtin/extensions/im-forward/index.js +302 -25
- package/dist/builtin/extensions/mcp-adapter/README.md +27 -0
- package/dist/builtin/extensions/memory/index.js +323 -0
- package/dist/builtin/extensions/memory/package.json +18 -0
- package/dist/builtin/extensions/pie-ipc/README.md +21 -0
- package/dist/builtin/extensions/plan-mode/METHOD.md +70 -0
- package/dist/builtin/extensions/plan-mode/index.js +149 -82
- package/dist/builtin/extensions/subagent/README.md +315 -0
- package/dist/builtin/extensions/subagent/index.js +7 -5
- package/dist/builtin/extensions/todo/index.js +3 -3
- package/dist/builtin/skills/chrome-devtools-axi/chrome-devtools-axi-bridge.js +1 -1
- package/dist/builtin/skills/chrome-devtools-axi/chrome-devtools-axi-runtime.js +1 -1
- package/dist/builtin/skills/chrome-devtools-axi/{chunk-U75F4DPF.js → chunk-BNSAEVRT.js} +201 -77
- package/dist/builtin/skills/chrome-devtools-axi/{cli-4ITIR57L.js → cli-AO2ZTPRM.js} +57 -202
- package/dist/chunks/chunk-5353DEEC.js +130 -0
- package/dist/chunks/{chunk-2H2DD22Z.js → chunk-HGC25NYB.js} +1 -1
- package/dist/chunks/{chunk-X7UO6BA6.js → chunk-JNOFHHLZ.js} +156 -65
- package/dist/chunks/{chunk-UDCGB3LZ.js → chunk-LJXHECZ7.js} +12183 -10951
- package/dist/chunks/{chunk-TGCI5M6R.js → chunk-NEES4EBX.js} +19 -141
- package/dist/chunks/{src-GX4UBAYF.js → src-5XOKRS6F.js} +2 -2
- package/dist/chunks/{test-stream-AKIZNFCM.js → test-stream-5SDHKKDB.js} +1 -1
- package/dist/cli.js +26 -19
- package/package.json +2 -2
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import { createRequire as __createRequire } from "node:module"; const require = __createRequire(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
getBuiltinDir,
|
|
4
|
+
getConfigDir
|
|
5
|
+
} from "./chunk-5353DEEC.js";
|
|
2
6
|
import {
|
|
3
7
|
classifyShellCommand,
|
|
4
8
|
createSharedWebFetchTool,
|
|
@@ -7,129 +11,16 @@ import {
|
|
|
7
11
|
defaultShellKindForPlatform,
|
|
8
12
|
interpretShellExit,
|
|
9
13
|
requestInteraction
|
|
10
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-LJXHECZ7.js";
|
|
11
15
|
import {
|
|
12
16
|
EMPTY_ASSISTANT_CONTENT_ERROR,
|
|
13
17
|
OPENAI_COMPAT_PROTOCOL_ERROR_CODE,
|
|
14
18
|
getLogger
|
|
15
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-JNOFHHLZ.js";
|
|
16
20
|
import {
|
|
17
21
|
Type
|
|
18
22
|
} from "./chunk-XXGYUYXI.js";
|
|
19
23
|
|
|
20
|
-
// src/config.ts
|
|
21
|
-
import { existsSync, mkdirSync, readFileSync, renameSync } from "fs";
|
|
22
|
-
import { homedir } from "os";
|
|
23
|
-
import { dirname, join } from "path";
|
|
24
|
-
import { fileURLToPath } from "url";
|
|
25
|
-
var __filename = fileURLToPath(import.meta.url);
|
|
26
|
-
var __dirname = dirname(__filename);
|
|
27
|
-
var isBunRuntime = !!process.versions.bun;
|
|
28
|
-
function getPackageDir() {
|
|
29
|
-
const envDir = process.env.PIE_PACKAGE_DIR;
|
|
30
|
-
if (envDir) {
|
|
31
|
-
if (envDir === "~") return homedir();
|
|
32
|
-
if (envDir.startsWith("~/")) return homedir() + envDir.slice(1);
|
|
33
|
-
return envDir;
|
|
34
|
-
}
|
|
35
|
-
let dir = __dirname;
|
|
36
|
-
while (dir !== dirname(dir)) {
|
|
37
|
-
if (existsSync(join(dir, "package.json"))) {
|
|
38
|
-
return dir;
|
|
39
|
-
}
|
|
40
|
-
dir = dirname(dir);
|
|
41
|
-
}
|
|
42
|
-
return __dirname;
|
|
43
|
-
}
|
|
44
|
-
function getThemesDir() {
|
|
45
|
-
const packageDir = getPackageDir();
|
|
46
|
-
const srcOrDist = existsSync(join(packageDir, "src")) ? "src" : "dist";
|
|
47
|
-
return join(packageDir, srcOrDist, "theme");
|
|
48
|
-
}
|
|
49
|
-
function getBuiltinDir() {
|
|
50
|
-
const packageDir = getPackageDir();
|
|
51
|
-
const distBuiltinDir = join(packageDir, "dist", "builtin");
|
|
52
|
-
if (existsSync(distBuiltinDir)) {
|
|
53
|
-
return distBuiltinDir;
|
|
54
|
-
}
|
|
55
|
-
return join(packageDir, "builtin");
|
|
56
|
-
}
|
|
57
|
-
function getPackageJsonPath() {
|
|
58
|
-
return join(getPackageDir(), "package.json");
|
|
59
|
-
}
|
|
60
|
-
var pkg = JSON.parse(readFileSync(getPackageJsonPath(), "utf-8"));
|
|
61
|
-
var CONFIG_DIR_NAME = ".pie";
|
|
62
|
-
var VERSION = pkg.version;
|
|
63
|
-
var ENV_AGENT_DIR = "PIE_CODING_AGENT_DIR";
|
|
64
|
-
function getConfigDir() {
|
|
65
|
-
const envDir = process.env[ENV_AGENT_DIR];
|
|
66
|
-
if (envDir) {
|
|
67
|
-
if (envDir === "~") return homedir();
|
|
68
|
-
if (envDir.startsWith("~/")) return homedir() + envDir.slice(1);
|
|
69
|
-
return envDir;
|
|
70
|
-
}
|
|
71
|
-
return join(homedir(), CONFIG_DIR_NAME);
|
|
72
|
-
}
|
|
73
|
-
function getAgentDir() {
|
|
74
|
-
return getConfigDir();
|
|
75
|
-
}
|
|
76
|
-
function getCustomThemesDir() {
|
|
77
|
-
return join(getConfigDir(), "themes");
|
|
78
|
-
}
|
|
79
|
-
function getSettingsPath() {
|
|
80
|
-
return join(getConfigDir(), "settings.json");
|
|
81
|
-
}
|
|
82
|
-
function getProjectSettingsPath(cwd) {
|
|
83
|
-
return join(cwd, CONFIG_DIR_NAME, "settings.json");
|
|
84
|
-
}
|
|
85
|
-
function getSessionsDir() {
|
|
86
|
-
return join(getConfigDir(), "sessions");
|
|
87
|
-
}
|
|
88
|
-
function getLogsDir() {
|
|
89
|
-
return join(getConfigDir(), "logs");
|
|
90
|
-
}
|
|
91
|
-
function getRuntimeLogPath() {
|
|
92
|
-
return join(getLogsDir(), "pie-cli.log");
|
|
93
|
-
}
|
|
94
|
-
function migrateConfigFromAgentDir() {
|
|
95
|
-
const oldAgentDir = join(homedir(), CONFIG_DIR_NAME, "agent");
|
|
96
|
-
const newConfigDir = getConfigDir();
|
|
97
|
-
if (!existsSync(oldAgentDir)) {
|
|
98
|
-
return;
|
|
99
|
-
}
|
|
100
|
-
if (!existsSync(newConfigDir)) {
|
|
101
|
-
mkdirSync(newConfigDir, { recursive: true });
|
|
102
|
-
}
|
|
103
|
-
const filesToMigrate = [
|
|
104
|
-
"keybindings.json",
|
|
105
|
-
"settings.json",
|
|
106
|
-
"pie-debug.log"
|
|
107
|
-
];
|
|
108
|
-
for (const file of filesToMigrate) {
|
|
109
|
-
const oldPath = join(oldAgentDir, file);
|
|
110
|
-
const newPath = file === "pie-debug.log" ? getRuntimeLogPath() : join(newConfigDir, file);
|
|
111
|
-
if (existsSync(oldPath) && !existsSync(newPath)) {
|
|
112
|
-
try {
|
|
113
|
-
if (file === "pie-debug.log") {
|
|
114
|
-
mkdirSync(getLogsDir(), { recursive: true });
|
|
115
|
-
}
|
|
116
|
-
renameSync(oldPath, newPath);
|
|
117
|
-
console.log(`[Config] Migrated ${file} to ${newPath}`);
|
|
118
|
-
} catch (e) {
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
const oldThemesDir = join(oldAgentDir, "themes");
|
|
123
|
-
const newThemesDir = getCustomThemesDir();
|
|
124
|
-
if (existsSync(oldThemesDir) && !existsSync(newThemesDir)) {
|
|
125
|
-
try {
|
|
126
|
-
renameSync(oldThemesDir, newThemesDir);
|
|
127
|
-
console.log(`[Config] Migrated themes to ${newThemesDir}`);
|
|
128
|
-
} catch (e) {
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
|
|
133
24
|
// src/runtime/retry-policy.ts
|
|
134
25
|
var TRANSIENT_NETWORK_ERROR_PATTERN = /sse stream aborted|sse stream closed before end|sse stream ended before response completed|responses stream ended without a terminal event|(?:read\s+)?ECONNRESET|ETIMEDOUT|EAI_AGAIN|ENOTFOUND|ECONNREFUSED|(?:read\s+|write\s+)?EPIPE|socket hang up|request timeout|websocket upgrade refused|websocket handshake|websocket connection failed|websocket transport failed|connection closed before opening|client network socket disconnected before secure TLS connection was established|connection.?error|connection.?refused|other side closed|fetch failed|upstream.?connect|reset before headers|terminated/i;
|
|
135
26
|
var TLS_VALIDATION_ERROR_PATTERN = /certificate (?:has )?expired|certificate is not yet valid|unable to verify (?:the first certificate|certificate)|unable to get (?:local )?issuer certificate|self[-_ ]signed cert(?:ificate)?|CERT_HAS_EXPIRED|SELF_SIGNED_CERT|does not match certificate's altnames|ERR_TLS_CERT_ALTNAME_INVALID/i;
|
|
@@ -339,9 +230,9 @@ function createTraceTransportSink(noteRuntimeEvent) {
|
|
|
339
230
|
|
|
340
231
|
// src/capabilities/bash/index.ts
|
|
341
232
|
import { spawn, spawnSync } from "child_process";
|
|
342
|
-
import { closeSync, createWriteStream, existsSync
|
|
233
|
+
import { closeSync, createWriteStream, existsSync, openSync, statSync, unlinkSync, writeFileSync } from "fs";
|
|
343
234
|
import { tmpdir } from "os";
|
|
344
|
-
import { join
|
|
235
|
+
import { join, resolve } from "path";
|
|
345
236
|
import { createHash, randomBytes } from "crypto";
|
|
346
237
|
|
|
347
238
|
// src/capabilities/bash/truncate.ts
|
|
@@ -811,8 +702,8 @@ function resolveWindowsBashPath() {
|
|
|
811
702
|
if (!resolved) {
|
|
812
703
|
const programFiles = [process.env.PROGRAMFILES, process.env["PROGRAMFILES(X86)"]].filter((value) => Boolean(value));
|
|
813
704
|
for (const root of programFiles) {
|
|
814
|
-
const candidate =
|
|
815
|
-
if (
|
|
705
|
+
const candidate = join(root, "Git", "bin", "bash.exe");
|
|
706
|
+
if (existsSync(candidate)) {
|
|
816
707
|
resolved = candidate;
|
|
817
708
|
break;
|
|
818
709
|
}
|
|
@@ -859,7 +750,7 @@ function notifyYoloGrantAwarded(grantMs) {
|
|
|
859
750
|
}
|
|
860
751
|
}
|
|
861
752
|
function validateWorkingDirectory(cwd) {
|
|
862
|
-
if (!
|
|
753
|
+
if (!existsSync(cwd)) {
|
|
863
754
|
throw new Error(`Invalid bash cwd: ${cwd} does not exist. Use the current workspace path or pass an existing directory in cwd.`);
|
|
864
755
|
}
|
|
865
756
|
let stat;
|
|
@@ -874,11 +765,11 @@ function validateWorkingDirectory(cwd) {
|
|
|
874
765
|
}
|
|
875
766
|
function normalizeWorkingDirectory(cwd, defaultCwd) {
|
|
876
767
|
const requestedCwd = typeof cwd === "string" && cwd.trim().length > 0 ? cwd.trim() : void 0;
|
|
877
|
-
return
|
|
768
|
+
return resolve(requestedCwd ?? defaultCwd ?? process.cwd());
|
|
878
769
|
}
|
|
879
770
|
function getTempFilePath() {
|
|
880
771
|
const id = randomBytes(8).toString("hex");
|
|
881
|
-
return
|
|
772
|
+
return join(tmpdir(), `pie-bash-${id}.log`);
|
|
882
773
|
}
|
|
883
774
|
var retainedOutputArtifacts = /* @__PURE__ */ new Set();
|
|
884
775
|
function getErrorCode(error) {
|
|
@@ -940,7 +831,7 @@ function cleanupBashOutputArtifacts() {
|
|
|
940
831
|
process.once("exit", cleanupBashOutputArtifacts);
|
|
941
832
|
function finishTempFileStream(stream) {
|
|
942
833
|
if (!stream || stream.closed) return Promise.resolve();
|
|
943
|
-
return new Promise((
|
|
834
|
+
return new Promise((resolve2, reject) => {
|
|
944
835
|
let done = false;
|
|
945
836
|
const timer = setTimeout(() => {
|
|
946
837
|
stream.destroy(new Error("Timed out flushing shell output."));
|
|
@@ -954,7 +845,7 @@ function finishTempFileStream(stream) {
|
|
|
954
845
|
if (done) return;
|
|
955
846
|
done = true;
|
|
956
847
|
cleanup();
|
|
957
|
-
|
|
848
|
+
resolve2();
|
|
958
849
|
};
|
|
959
850
|
const onError = (error) => {
|
|
960
851
|
if (done) return;
|
|
@@ -1149,7 +1040,7 @@ function createBashTool(defaultCwd, options) {
|
|
|
1149
1040
|
}
|
|
1150
1041
|
const timeoutPolicy = resolveTimeoutPolicy(timeout);
|
|
1151
1042
|
const timeoutMs = timeoutPolicy.effectiveSeconds * 1e3;
|
|
1152
|
-
return new Promise((
|
|
1043
|
+
return new Promise((resolve2, reject) => {
|
|
1153
1044
|
if (signal?.aborted) {
|
|
1154
1045
|
reject(new Error("Operation aborted"));
|
|
1155
1046
|
return;
|
|
@@ -1469,7 +1360,7 @@ ${commandNonzeroHint}`;
|
|
|
1469
1360
|
outputText += "\n\n[Repeat hint: this exact command already returned the same result in this session. If it proves the task, stop; otherwise change the command or inspect a different file/range.]";
|
|
1470
1361
|
}
|
|
1471
1362
|
const content = [{ type: "text", text: outputText }];
|
|
1472
|
-
|
|
1363
|
+
resolve2({ content, details, isError: outcome.toolFailure });
|
|
1473
1364
|
} catch (error) {
|
|
1474
1365
|
discardOutputArtifact(tempFilePath, tempFileStream);
|
|
1475
1366
|
reject(error);
|
|
@@ -1513,7 +1404,7 @@ function resolveMcpScript() {
|
|
|
1513
1404
|
}
|
|
1514
1405
|
function runAxi(args, options = {}) {
|
|
1515
1406
|
const timeoutMs = options.timeoutMs ?? 6e4;
|
|
1516
|
-
return new Promise((
|
|
1407
|
+
return new Promise((resolve2, reject) => {
|
|
1517
1408
|
const child = spawn2(process.execPath, [resolveAxiCli(), ...args], {
|
|
1518
1409
|
stdio: ["ignore", "pipe", "pipe"],
|
|
1519
1410
|
shell: false,
|
|
@@ -1540,7 +1431,7 @@ function runAxi(args, options = {}) {
|
|
|
1540
1431
|
});
|
|
1541
1432
|
child.on("close", (code) => {
|
|
1542
1433
|
clearTimeout(timer);
|
|
1543
|
-
if (code === 0)
|
|
1434
|
+
if (code === 0) resolve2(stdout.trim());
|
|
1544
1435
|
else reject(new Error((stderr || stdout || `chrome-devtools-axi exited with ${code}`).trim()));
|
|
1545
1436
|
});
|
|
1546
1437
|
});
|
|
@@ -1751,19 +1642,6 @@ function createCliHostCapabilities(cwd, options = {}) {
|
|
|
1751
1642
|
}
|
|
1752
1643
|
|
|
1753
1644
|
export {
|
|
1754
|
-
getPackageDir,
|
|
1755
|
-
getThemesDir,
|
|
1756
|
-
getBuiltinDir,
|
|
1757
|
-
VERSION,
|
|
1758
|
-
getConfigDir,
|
|
1759
|
-
getAgentDir,
|
|
1760
|
-
getCustomThemesDir,
|
|
1761
|
-
getSettingsPath,
|
|
1762
|
-
getProjectSettingsPath,
|
|
1763
|
-
getSessionsDir,
|
|
1764
|
-
getLogsDir,
|
|
1765
|
-
getRuntimeLogPath,
|
|
1766
|
-
migrateConfigFromAgentDir,
|
|
1767
1645
|
createCliWebResearchHealthStore,
|
|
1768
1646
|
truncateHeadTail,
|
|
1769
1647
|
formatSize,
|
|
@@ -8,8 +8,8 @@ import {
|
|
|
8
8
|
createToolCallerIdentity,
|
|
9
9
|
getAgentFailureMetadata,
|
|
10
10
|
getToolCallerIdentity
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import "./chunk-
|
|
11
|
+
} from "./chunk-HGC25NYB.js";
|
|
12
|
+
import "./chunk-JNOFHHLZ.js";
|
|
13
13
|
import "./chunk-XXGYUYXI.js";
|
|
14
14
|
import "./chunk-LZQXQOPJ.js";
|
|
15
15
|
export {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createRequire as __createRequire } from "node:module"; const require = __createRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
EventStream
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-JNOFHHLZ.js";
|
|
5
5
|
import "./chunk-XXGYUYXI.js";
|
|
6
6
|
import "./chunk-LZQXQOPJ.js";
|
|
7
7
|
|
package/dist/cli.js
CHANGED
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
import { createRequire as __createRequire } from "node:module"; const require = __createRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
CLI_RETRY_MAX_RETRIES,
|
|
5
|
-
VERSION,
|
|
6
5
|
classifyCliFailure,
|
|
7
6
|
cleanupBashOutputArtifacts,
|
|
8
7
|
createBashTool,
|
|
@@ -12,6 +11,14 @@ import {
|
|
|
12
11
|
createTraceTransportSink,
|
|
13
12
|
createTransportDiagnosticsStreamFn,
|
|
14
13
|
formatSize,
|
|
14
|
+
isCliContextOverflowError,
|
|
15
|
+
isCliRetryableError,
|
|
16
|
+
logTransportLifecycle,
|
|
17
|
+
setYoloGrantListener,
|
|
18
|
+
truncateHeadTail
|
|
19
|
+
} from "./chunks/chunk-NEES4EBX.js";
|
|
20
|
+
import {
|
|
21
|
+
VERSION,
|
|
15
22
|
getAgentDir,
|
|
16
23
|
getBuiltinDir,
|
|
17
24
|
getConfigDir,
|
|
@@ -23,13 +30,8 @@ import {
|
|
|
23
30
|
getSessionsDir,
|
|
24
31
|
getSettingsPath,
|
|
25
32
|
getThemesDir,
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
logTransportLifecycle,
|
|
29
|
-
migrateConfigFromAgentDir,
|
|
30
|
-
setYoloGrantListener,
|
|
31
|
-
truncateHeadTail
|
|
32
|
-
} from "./chunks/chunk-TGCI5M6R.js";
|
|
33
|
+
migrateConfigFromAgentDir
|
|
34
|
+
} from "./chunks/chunk-5353DEEC.js";
|
|
33
35
|
import {
|
|
34
36
|
AGENTS_CONTEXT_FILE_NAME,
|
|
35
37
|
AgentSessionController,
|
|
@@ -91,8 +93,8 @@ import {
|
|
|
91
93
|
shouldPreserveExecutionStateForUserText,
|
|
92
94
|
supersedeExecutionState,
|
|
93
95
|
verifyPreparedCompactionCommit
|
|
94
|
-
} from "./chunks/chunk-
|
|
95
|
-
import "./chunks/chunk-
|
|
96
|
+
} from "./chunks/chunk-LJXHECZ7.js";
|
|
97
|
+
import "./chunks/chunk-HGC25NYB.js";
|
|
96
98
|
import {
|
|
97
99
|
Deref,
|
|
98
100
|
Errors,
|
|
@@ -115,7 +117,7 @@ import {
|
|
|
115
117
|
sortToolModelCandidatesByCapability,
|
|
116
118
|
streamSimple,
|
|
117
119
|
type_exports
|
|
118
|
-
} from "./chunks/chunk-
|
|
120
|
+
} from "./chunks/chunk-JNOFHHLZ.js";
|
|
119
121
|
import {
|
|
120
122
|
IsArray,
|
|
121
123
|
IsBigInt,
|
|
@@ -77584,7 +77586,7 @@ function buildRuntimeModeContext(state) {
|
|
|
77584
77586
|
];
|
|
77585
77587
|
if (state.planMode === "planning") {
|
|
77586
77588
|
lines.push(
|
|
77587
|
-
"- Plan mode: active (workspace read-only; plan_scratch permits session-local temporary drafts;
|
|
77589
|
+
"- Plan mode: active \u2014 DISCUSSION FIRST (workspace read-only; plan_scratch permits session-local temporary drafts). Grilling: interview the user in ROUNDS; each round asks every frontier question (whose prerequisites are settled), numbered (\u2753 Qn / \u27A1\uFE0F recommended answer); wait for answers before the next round; find facts yourself with read-only tools, never ask the user what you could look up; challenge wording that conflicts with settled terms. Do NOT output a plan or call plan_submit until the user explicitly asks for the plan (e.g. \u201C\u8F93\u51FA\u8BA1\u5212\u201D / \u201Cgive me the plan\u201D / /tools/plan/submit); when unsure whether they asked, ask back. When asked: decompose into MVP steps \u2014 each independently verifiable (verify criterion, ideally one command), scoped (files it touches, \u201C(new)\u201D for to-be-created), and stable (later steps build on earlier ones, no rework); one step at a time with [DONE:n]+[VERIFIED:n], failed verify stops the ladder (Retry/Revise/Abort, never Skip)."
|
|
77588
77590
|
);
|
|
77589
77591
|
if (state.planDisabledToolNames.length > 0) {
|
|
77590
77592
|
lines.push(
|
|
@@ -77602,7 +77604,7 @@ function buildRuntimeModeContext(state) {
|
|
|
77602
77604
|
const transitionText = {
|
|
77603
77605
|
entered_yolo: "YOLO mode was just enabled for this turn.",
|
|
77604
77606
|
exited_yolo: "YOLO mode was just disabled; do not assume previous absolute-path access still applies.",
|
|
77605
|
-
entered_plan: "Plan mode was just enabled
|
|
77607
|
+
entered_plan: "Plan mode was just enabled \u2014 discussion-first: grill the user in rounds (numbered frontier questions + recommended answers); do not output a plan until explicitly asked. Use plan_scratch for drafts.",
|
|
77606
77608
|
exited_plan: "Plan mode was just disabled; execution tools may be used when the task requires them."
|
|
77607
77609
|
};
|
|
77608
77610
|
lines.push(`- Transition: ${transitionText[state.pendingTransition]}`);
|
|
@@ -83796,7 +83798,7 @@ var InteractiveMode = class {
|
|
|
83796
83798
|
async init() {
|
|
83797
83799
|
const activeSession = this.sessionManager.getActiveSession();
|
|
83798
83800
|
this.thinkingLevel = resolveInitialThinkingLevel({ session: activeSession, settingsManager: this.options.settingsManager });
|
|
83799
|
-
const { Agent } = await import("./chunks/src-
|
|
83801
|
+
const { Agent } = await import("./chunks/src-5XOKRS6F.js");
|
|
83800
83802
|
this.agent = new Agent({
|
|
83801
83803
|
initialState: {
|
|
83802
83804
|
systemPrompt: this.buildSystemPrompt(),
|
|
@@ -84119,7 +84121,12 @@ var InteractiveMode = class {
|
|
|
84119
84121
|
"/skills/create",
|
|
84120
84122
|
"/skills/use",
|
|
84121
84123
|
"/tools/subagent",
|
|
84122
|
-
"/sessions/fork"
|
|
84124
|
+
"/sessions/fork",
|
|
84125
|
+
// Plan submit/revise return agent-turn instructions the hierarchical
|
|
84126
|
+
// menu would otherwise discard: route them into the editor so the
|
|
84127
|
+
// input pipeline's result-processing handles them like typed commands.
|
|
84128
|
+
"/tools/plan/submit",
|
|
84129
|
+
"/tools/plan/revise"
|
|
84123
84130
|
];
|
|
84124
84131
|
return interactiveCommands.some((cmd) => commandPath.startsWith(cmd));
|
|
84125
84132
|
}
|
|
@@ -84689,7 +84696,7 @@ async function runPrintMode(params) {
|
|
|
84689
84696
|
`);
|
|
84690
84697
|
console.log("Assistant: ");
|
|
84691
84698
|
}
|
|
84692
|
-
const { Agent: AgentClass } = await import("./chunks/src-
|
|
84699
|
+
const { Agent: AgentClass } = await import("./chunks/src-5XOKRS6F.js");
|
|
84693
84700
|
let agent;
|
|
84694
84701
|
const printModeExtensions = await loadPrintModeExtensions({
|
|
84695
84702
|
cwd: runtime.cwd,
|
|
@@ -85584,7 +85591,7 @@ async function runJsonEventsMode(params) {
|
|
|
85584
85591
|
const sideTrace = trace;
|
|
85585
85592
|
const sideApiKey = runtime.apiKey;
|
|
85586
85593
|
const snapshot = structuredClone(parent.state.messages);
|
|
85587
|
-
const { Agent: AgentClass } = await import("./chunks/src-
|
|
85594
|
+
const { Agent: AgentClass } = await import("./chunks/src-5XOKRS6F.js");
|
|
85588
85595
|
const sideAgent = new AgentClass({
|
|
85589
85596
|
initialState: {
|
|
85590
85597
|
systemPrompt: parent.state.systemPrompt,
|
|
@@ -85948,7 +85955,7 @@ async function runJsonEventsMode(params) {
|
|
|
85948
85955
|
if (runtime.initialModel.unconfigured || controller) {
|
|
85949
85956
|
return;
|
|
85950
85957
|
}
|
|
85951
|
-
const { Agent: AgentClass } = await import("./chunks/src-
|
|
85958
|
+
const { Agent: AgentClass } = await import("./chunks/src-5XOKRS6F.js");
|
|
85952
85959
|
if (runtimeClosing) return;
|
|
85953
85960
|
const compositionRegistry = createCliHostEnvelopeRegistry();
|
|
85954
85961
|
const jsonModeExtensions = await loadJsonModeExtensions({ runtime, envelopeRegistry: compositionRegistry, getAgent: () => agent });
|
|
@@ -86636,7 +86643,7 @@ async function runWithJsonEventsConsoleIsolation(fn) {
|
|
|
86636
86643
|
}
|
|
86637
86644
|
async function createCliTestStreamFnFromEnv() {
|
|
86638
86645
|
if (!process.env.PIE_TEST_MOCK_STREAM_SEQUENCE) return void 0;
|
|
86639
|
-
return (await import("./chunks/test-stream-
|
|
86646
|
+
return (await import("./chunks/test-stream-5SDHKKDB.js")).createTestStreamFnFromSequenceEnv();
|
|
86640
86647
|
}
|
|
86641
86648
|
function resolveJsonEventsDetailFlag() {
|
|
86642
86649
|
for (let index = 0; index < process.argv.length; index += 1) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cydm/pie",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.8.0",
|
|
4
4
|
"description": "Pie AI Agent CLI",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"validate:models": "tsx scripts/validate-models-config.ts",
|
|
18
18
|
"test": "npm run test:offline",
|
|
19
19
|
"test:offline:build": "node ../../scripts/build-unity-test-deps.mjs && npm run build",
|
|
20
|
-
"test:skill-regressions": "node --test --import tsx test/bash-lifecycle.test.ts test/bash-powershell-display.test.ts test/skill-creator-runner.test.ts test/tui-use-contract.test.ts test/tui-use-runtime.test.ts test/browser-runtime.test.ts test/axi-stop-semantics.test.ts test/computer-use-axi.test.ts test/computer-evidence.test.ts test/interactive-lifecycle.test.ts",
|
|
20
|
+
"test:skill-regressions": "node --test --import tsx test/bash-lifecycle.test.ts test/bash-powershell-display.test.ts test/skill-creator-runner.test.ts test/tui-use-contract.test.ts test/tui-use-runtime.test.ts test/browser-runtime.test.ts test/axi-stop-semantics.test.ts test/axi-page-routing.test.ts test/computer-use-axi.test.ts test/computer-evidence.test.ts test/interactive-lifecycle.test.ts",
|
|
21
21
|
"test:offline:post": "node --test --import tsx test/remote-model-catalog.test.ts",
|
|
22
22
|
"test:offline": "node ../../scripts/run-cli-offline.mjs",
|
|
23
23
|
"test:offline:main": "node --test --test-concurrency=2 --import tsx test/cli-attention.test.ts test/cron.test.ts test/cron-concurrency.test.ts test/cron-dogfood.test.ts test/cron.terminal.test.ts test/cron-journey.terminal.test.ts test/builtin-extensions.test.ts test/im-forward.test.ts test/im-forward-cli.test.ts test/im-forward-integration.test.ts test/im-forward-dogfood.terminal.test.ts test/extension-user-input.test.ts test/pie-ipc-pure.test.ts test/pie-ipc-discovery.test.ts test/pie-ipc-transport.test.ts test/pie-ipc-delivery.test.ts test/pie-ipc-extension.test.ts test/pie-ipc-e2e.test.ts test/pie-ipc-security.test.ts test/pie-ipc-dogfood.test.ts test/pie-ipc-host.terminal.test.ts test/core-services.test.ts test/cli.test.ts test/cli-auto-compaction.test.ts test/execution-state-manager.test.ts test/queued-steer-execution-state.test.ts test/todo-steering-ownership.test.ts test/architecture-boundaries.test.ts test/attachment-resolver.test.ts test/kimi-attachment-provider.test.ts test/document-attachment-extension.test.ts test/auto-compact-overflow.test.ts test/auto-compaction-ui.test.ts test/tool-compaction-dogfood.terminal.test.ts test/hierarchical-command-system.test.ts test/mcp-adapter.test.ts test/herdr-agent-state.test.ts test/extensions-enablement.test.ts test/extension-selector-shortcuts.test.ts test/skill-tool-enablement.test.ts test/message-queue-unit.test.ts test/evals-harness.test.ts test/session-trace.test.ts test/json-events-sidechat-diagnostics.test.ts test/json-events-prewarm-shutdown.test.ts test/json-envelope-composition.test.ts test/subagent-session-store.test.ts test/runtime-mode-context.test.ts test/tool-policy.test.ts test/retry-policy.test.ts test/yolo-command.test.ts test/footer-lifecycle.test.ts test/footer-waiting-for-user.test.ts test/files-utils.test.ts test/source-size-guard.test.ts test/runtime-logger.test.ts test/release-readiness.test.ts test/package-artifacts.test.ts test/init-extension-contract.test.ts test/skills-runtime.test.ts test/skills-agents-discovery.test.ts test/skills-symlink.test.ts test/model-overrides.test.ts test/auth-storage.test.ts test/extension-register-provider.test.ts test/extension-reload.test.ts test/extension-terminal-input.test.ts test/extension-session-before-events.test.ts test/extension-widgets.test.ts test/extension-render-hint.test.ts test/extension-oauth-restore.test.ts test/cross-host-parity.test.ts test/tool-name-rendering.test.ts test/session-selector.test.ts test/tree-selector-pagination.test.ts test/context-report.test.ts test/context-signals.test.ts test/plan-cache-stability.test.ts test/cache-invalidation-trace.test.ts test/cache-retention.test.ts test/trace-report.test.ts test/boot-report.test.ts test/compaction-diff.test.ts test/entry-body-and-usage.test.ts test/session-control.test.ts test/terminal-title.test.ts test/interactive-controller-title.test.ts test/todo-title.terminal.test.ts test/host-envelope-dogfood.terminal.test.ts test/host-envelope-cross-mode.test.ts test/host-envelope-registry-lifecycle.test.ts test/host-envelope-migration-roundtrip.test.ts test/host-envelope-intake-order.test.ts test/plan-mode-extension.test.ts test/extension-interaction-signals.test.ts test/rendered-page-reader.test.ts test/tools-registry.test.ts test/system-prompt-contract.test.ts test/bash-yolo.test.ts test/bash-contract.test.ts test/bash-confirm-pending.test.ts test/interaction-status-lifecycle.test.ts test/bash-process-group.test.ts test/bash-artifact-sink.test.ts test/direct-bash.test.ts test/terminal-bell.test.ts test/ctrl-d-exit.test.ts test/session-display-title.test.ts test/calm-mode.test.ts test/stream-render-throttle.test.ts test/assistant-message-performance.test.ts test/message-display-resync.test.ts test/project-root.test.ts test/guard-advisory-context.test.ts test/clear-command-usage.test.ts test/daily-agent-smoke.terminal.test.ts test/slash-menu-toggles.terminal.test.ts test/cli-args.test.ts test/extensions-configured-paths.test.ts test/extensions-loader-path.test.ts test/file-picker.test.ts test/interrupt-recovery.test.ts test/mention-insert-regression.test.ts test/image-paste.test.ts test/clipboard-read-image.test.ts test/clipboard-races.test.ts test/clipboard-dogfood.terminal.test.ts test/mention-picker-navigation.test.ts test/pie-unity-rpc-skill.test.ts test/skill-creator-scripts.test.ts test/interactive-compact-command.test.ts test/computer-use-broker.test.ts test/computer-use-review-regressions.test.ts test/computer-use-safety.test.ts ../../scripts/node-test-diagnostics.test.js ../../scripts/offline-test-runner.test.js ../../scripts/unity-consumer.test.mjs ../../scripts/owned-process-cleanup.test.mjs",
|