@cydm/pie 1.0.37 → 1.0.38
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 +2 -0
- package/dist/builtin/extensions/ask-user/index.js +3 -3
- package/dist/builtin/extensions/plan-mode/index.js +71 -6
- package/dist/builtin/extensions/subagent/index.js +4 -4
- package/dist/builtin/extensions/todo/index.js +3 -3
- package/dist/chunks/{chunk-MGZHZSHB.js → chunk-2PLCSYFF.js} +272 -46
- package/dist/chunks/{chunk-64XJIKVK.js → chunk-2WHIT2UB.js} +1708 -1694
- package/dist/chunks/{chunk-QXTAEPLR.js → chunk-IKIEQTVJ.js} +2 -2
- package/dist/chunks/{chunk-4B42ZU4B.js → chunk-NTFKTUOW.js} +1 -1
- package/dist/chunks/{src-27UD2ZBZ.js → src-PBRYPFUI.js} +2 -2
- package/dist/chunks/{test-stream-L4PUYWQQ.js → test-stream-EO6L26M5.js} +1 -1
- package/dist/cli.js +34 -26
- package/models.schema.json +1 -0
- package/package.json +2 -2
|
@@ -8,10 +8,10 @@ import {
|
|
|
8
8
|
createSharedWebSearchTool,
|
|
9
9
|
interpretShellExit,
|
|
10
10
|
requestInteraction
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-2PLCSYFF.js";
|
|
12
12
|
import {
|
|
13
13
|
Type
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-2WHIT2UB.js";
|
|
15
15
|
|
|
16
16
|
// src/config.ts
|
|
17
17
|
import { existsSync, mkdirSync, readFileSync, renameSync } from "fs";
|
package/dist/cli.js
CHANGED
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
getThemesDir,
|
|
20
20
|
migrateConfigFromAgentDir,
|
|
21
21
|
truncateHeadTail
|
|
22
|
-
} from "./chunks/chunk-
|
|
22
|
+
} from "./chunks/chunk-IKIEQTVJ.js";
|
|
23
23
|
import {
|
|
24
24
|
AGENTS_CONTEXT_FILE_NAME,
|
|
25
25
|
AgentSessionController,
|
|
@@ -69,8 +69,8 @@ import {
|
|
|
69
69
|
setExtensionEnabledInSettings,
|
|
70
70
|
shouldPreserveExecutionStateForUserText,
|
|
71
71
|
supersedeExecutionState
|
|
72
|
-
} from "./chunks/chunk-
|
|
73
|
-
import "./chunks/chunk-
|
|
72
|
+
} from "./chunks/chunk-2PLCSYFF.js";
|
|
73
|
+
import "./chunks/chunk-NTFKTUOW.js";
|
|
74
74
|
import {
|
|
75
75
|
Deref,
|
|
76
76
|
EMPTY_ASSISTANT_CONTENT_ERROR,
|
|
@@ -105,7 +105,7 @@ import {
|
|
|
105
105
|
setLogger,
|
|
106
106
|
sortToolModelCandidatesByCapability,
|
|
107
107
|
type_exports
|
|
108
|
-
} from "./chunks/chunk-
|
|
108
|
+
} from "./chunks/chunk-2WHIT2UB.js";
|
|
109
109
|
import {
|
|
110
110
|
resolveCliProjectRoot
|
|
111
111
|
} from "./chunks/chunk-NTYHFBUA.js";
|
|
@@ -44905,6 +44905,7 @@ function validateCompat(value, label) {
|
|
|
44905
44905
|
if (value === void 0) return;
|
|
44906
44906
|
if (!isPlainRecord(value)) throw new Error(`${label} is invalid`);
|
|
44907
44907
|
assertOnlyKeys(value, [
|
|
44908
|
+
"forcedReasoningEffort",
|
|
44908
44909
|
"supportsStore",
|
|
44909
44910
|
"supportsDeveloperRole",
|
|
44910
44911
|
"supportsReasoningEffort",
|
|
@@ -44916,6 +44917,9 @@ function validateCompat(value, label) {
|
|
|
44916
44917
|
"supportsStrictMode",
|
|
44917
44918
|
"cacheCapability"
|
|
44918
44919
|
], label);
|
|
44920
|
+
if (value.forcedReasoningEffort !== void 0 && value.forcedReasoningEffort !== "none") {
|
|
44921
|
+
throw new Error(`${label}.forcedReasoningEffort must be "none"`);
|
|
44922
|
+
}
|
|
44919
44923
|
for (const field of [
|
|
44920
44924
|
"supportsStore",
|
|
44921
44925
|
"supportsDeveloperRole",
|
|
@@ -60054,7 +60058,14 @@ var ExecutionStateManager = class {
|
|
|
60054
60058
|
return this.store.clear();
|
|
60055
60059
|
}
|
|
60056
60060
|
restoreFromMetadata(raw) {
|
|
60057
|
-
|
|
60061
|
+
const restored = restoreExecutionState(raw);
|
|
60062
|
+
if (restored.mode === "todo" && restored.lifecycle === "active" && restored.awaitingContinuation) {
|
|
60063
|
+
return this.store.replace(pauseExecutionState({
|
|
60064
|
+
...restored,
|
|
60065
|
+
awaitingContinuation: false
|
|
60066
|
+
}, "Previous todo turn was interrupted while a tool was running. Send 'continue' to resume the remaining items."));
|
|
60067
|
+
}
|
|
60068
|
+
return this.store.replace(restored);
|
|
60058
60069
|
}
|
|
60059
60070
|
getReminder() {
|
|
60060
60071
|
return buildExecutionReminder(this.store.read());
|
|
@@ -67987,6 +67998,14 @@ function scheduleContinuationTimeout(host) {
|
|
|
67987
67998
|
});
|
|
67988
67999
|
return;
|
|
67989
68000
|
}
|
|
68001
|
+
if (host.agent.state.isStreaming || host.isProcessing || host.submitLock || host.pendingTools.size > 0) {
|
|
68002
|
+
host.logDebug("continuation_timeout:active_work", {
|
|
68003
|
+
isStreaming: host.agent.state.isStreaming,
|
|
68004
|
+
isProcessing: host.isProcessing,
|
|
68005
|
+
pendingTools: host.pendingTools.size
|
|
68006
|
+
});
|
|
68007
|
+
return;
|
|
68008
|
+
}
|
|
67990
68009
|
const outcome = host.executionState.markAwaitingContinuationStalled();
|
|
67991
68010
|
host.logDebug("continuation_timeout:expired", {
|
|
67992
68011
|
currentStepId: state.currentStepId,
|
|
@@ -68001,20 +68020,6 @@ function scheduleContinuationTimeout(host) {
|
|
|
68001
68020
|
appendWarningSummary(host, outcome.terminalSummary);
|
|
68002
68021
|
}
|
|
68003
68022
|
}
|
|
68004
|
-
if (host.agent.state.isStreaming || host.submitLock || host.isProcessing) {
|
|
68005
|
-
host.logDebug("continuation_timeout:force_reset", {
|
|
68006
|
-
isStreaming: host.agent.state.isStreaming,
|
|
68007
|
-
submitLock: host.submitLock,
|
|
68008
|
-
isProcessing: host.isProcessing
|
|
68009
|
-
});
|
|
68010
|
-
host.agent.resetProcessingState();
|
|
68011
|
-
host.isProcessing = false;
|
|
68012
|
-
host.setSubmitLock(false);
|
|
68013
|
-
host.streamingComponent = void 0;
|
|
68014
|
-
host.pendingTools.clear();
|
|
68015
|
-
host.footer.setState({ status: "ready" });
|
|
68016
|
-
host.safeRequestRender();
|
|
68017
|
-
}
|
|
68018
68023
|
host.agentSessionController?.requestQueueDispatch();
|
|
68019
68024
|
}, timeoutMs);
|
|
68020
68025
|
}
|
|
@@ -68345,7 +68350,7 @@ function buildRuntimeModeContext(state) {
|
|
|
68345
68350
|
const lines = [
|
|
68346
68351
|
RUNTIME_MODE_CONTEXT_MARKER,
|
|
68347
68352
|
"Current runtime mode:",
|
|
68348
|
-
`- Plan mode: ${state.planMode === "planning" ? "active (
|
|
68353
|
+
`- Plan mode: ${state.planMode === "planning" ? "active (workspace read-only; plan_scratch permits session-local temporary drafts)" : "off"}.`,
|
|
68349
68354
|
`- YOLO mode: ${state.yoloMode ? "on (filesystem sandbox directory restrictions are disabled)" : "off (workspace/protected-path restrictions apply)"}.`,
|
|
68350
68355
|
`- Filesystem scope: ${state.filesystemScope === "all" ? "all local paths may be passed directly to file tools when permitted" : "workspace paths and configured safe roots only"}.`
|
|
68351
68356
|
];
|
|
@@ -68353,7 +68358,7 @@ function buildRuntimeModeContext(state) {
|
|
|
68353
68358
|
const transitionText = {
|
|
68354
68359
|
entered_yolo: "YOLO mode was just enabled for this turn.",
|
|
68355
68360
|
exited_yolo: "YOLO mode was just disabled; do not assume previous absolute-path access still applies.",
|
|
68356
|
-
entered_plan: "Plan mode was just enabled; analyze and plan without
|
|
68361
|
+
entered_plan: "Plan mode was just enabled; analyze and plan without changing the workspace. Use plan_scratch for temporary drafts.",
|
|
68357
68362
|
exited_plan: "Plan mode was just disabled; execution tools may be used when the task requires them."
|
|
68358
68363
|
};
|
|
68359
68364
|
lines.push(`- Transition: ${transitionText[state.pendingTransition]}`);
|
|
@@ -69355,7 +69360,10 @@ var InteractiveMode = class {
|
|
|
69355
69360
|
async syncSessionScopedState(messages) {
|
|
69356
69361
|
const activeSession = this.sessionManager.getActiveSession();
|
|
69357
69362
|
const sessionMessages = messages ?? this.sessionManager.getMessages();
|
|
69358
|
-
this.executionState.restoreFromMetadata(activeSession?.metadata?.executionState);
|
|
69363
|
+
const restoredExecutionState = this.executionState.restoreFromMetadata(activeSession?.metadata?.executionState);
|
|
69364
|
+
if (restoredExecutionState.lifecycle === "paused" && activeSession?.metadata?.executionState?.awaitingContinuation) {
|
|
69365
|
+
this.persistExecutionState();
|
|
69366
|
+
}
|
|
69359
69367
|
if (this.executionState.clearIfSupersededByUserMessage(sessionMessages)) {
|
|
69360
69368
|
this.persistExecutionState();
|
|
69361
69369
|
}
|
|
@@ -69372,7 +69380,7 @@ var InteractiveMode = class {
|
|
|
69372
69380
|
if (savedLevel) {
|
|
69373
69381
|
this.thinkingLevel = savedLevel;
|
|
69374
69382
|
}
|
|
69375
|
-
const { Agent } = await import("./chunks/src-
|
|
69383
|
+
const { Agent } = await import("./chunks/src-PBRYPFUI.js");
|
|
69376
69384
|
const activeSession = this.sessionManager.getActiveSession();
|
|
69377
69385
|
this.agent = new Agent({
|
|
69378
69386
|
initialState: {
|
|
@@ -70093,7 +70101,7 @@ async function runPrintMode(params) {
|
|
|
70093
70101
|
`);
|
|
70094
70102
|
console.log("Assistant: ");
|
|
70095
70103
|
}
|
|
70096
|
-
const { Agent: AgentClass } = await import("./chunks/src-
|
|
70104
|
+
const { Agent: AgentClass } = await import("./chunks/src-PBRYPFUI.js");
|
|
70097
70105
|
let agent;
|
|
70098
70106
|
const printModeExtensions = await loadPrintModeExtensions({
|
|
70099
70107
|
cwd: runtime.cwd,
|
|
@@ -71043,7 +71051,7 @@ async function runJsonEventsMode(params) {
|
|
|
71043
71051
|
if (runtime.initialModel.unconfigured || controller) {
|
|
71044
71052
|
return;
|
|
71045
71053
|
}
|
|
71046
|
-
const { Agent: AgentClass } = await import("./chunks/src-
|
|
71054
|
+
const { Agent: AgentClass } = await import("./chunks/src-PBRYPFUI.js");
|
|
71047
71055
|
const jsonModeExtensions = await loadJsonModeExtensions({ runtime, getAgent: () => agent });
|
|
71048
71056
|
const tools = [...runtime.tools, ...jsonModeExtensions.extensionTools];
|
|
71049
71057
|
recordCliCompositionStep(runtime.compositionTrace, {
|
|
@@ -71675,7 +71683,7 @@ async function runWithJsonEventsConsoleIsolation(fn) {
|
|
|
71675
71683
|
}
|
|
71676
71684
|
async function createCliTestStreamFnFromEnv() {
|
|
71677
71685
|
if (!process.env.PIE_TEST_MOCK_STREAM_SEQUENCE) return void 0;
|
|
71678
|
-
return (await import("./chunks/test-stream-
|
|
71686
|
+
return (await import("./chunks/test-stream-EO6L26M5.js")).createTestStreamFnFromSequenceEnv();
|
|
71679
71687
|
}
|
|
71680
71688
|
async function startChat(initialPrompt, testCommand) {
|
|
71681
71689
|
const rawOutput = process.argv.includes("--raw-output");
|
package/models.schema.json
CHANGED
|
@@ -163,6 +163,7 @@
|
|
|
163
163
|
"supportsStore": { "type": "boolean" },
|
|
164
164
|
"supportsDeveloperRole": { "type": "boolean" },
|
|
165
165
|
"supportsReasoningEffort": { "type": "boolean" },
|
|
166
|
+
"forcedReasoningEffort": { "type": "string", "enum": ["none"] },
|
|
166
167
|
"supportsUsageInStreaming": { "type": "boolean" },
|
|
167
168
|
"maxTokensField": {
|
|
168
169
|
"type": "string",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cydm/pie",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.38",
|
|
4
4
|
"description": "Pie AI Agent CLI",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"test": "npm run test:offline",
|
|
19
19
|
"pretest:offline": "npm run build --workspace @pie/agent-framework && npm run build --workspace @pie/shared-headless-capabilities && npm run build",
|
|
20
20
|
"posttest:offline": "node --test --import tsx test/remote-model-catalog.test.ts",
|
|
21
|
-
"test:offline": "node --test --import tsx 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/architecture-boundaries.test.ts test/attachment-resolver.test.ts test/kimi-attachment-extension.test.ts test/document-attachment-extension.test.ts test/auto-compact-overflow.test.ts test/hierarchical-command-system.test.ts test/extensions-enablement.test.ts test/message-queue-unit.test.ts test/evals-harness.test.ts test/session-trace.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/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/code-intel-typescript-provider.test.ts test/init-extension-contract.test.ts test/skills-runtime.test.ts test/cross-host-parity.test.ts test/tool-name-rendering.test.ts test/session-selector.test.ts test/terminal-title.test.ts test/tools-registry.test.ts test/system-prompt-contract.test.ts test/direct-bash.test.ts test/daily-agent-smoke.terminal.test.ts",
|
|
21
|
+
"test:offline": "node --test --import tsx 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/architecture-boundaries.test.ts test/attachment-resolver.test.ts test/kimi-attachment-extension.test.ts test/document-attachment-extension.test.ts test/auto-compact-overflow.test.ts test/hierarchical-command-system.test.ts test/extensions-enablement.test.ts test/message-queue-unit.test.ts test/evals-harness.test.ts test/session-trace.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/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/code-intel-typescript-provider.test.ts test/init-extension-contract.test.ts test/skills-runtime.test.ts test/cross-host-parity.test.ts test/tool-name-rendering.test.ts test/session-selector.test.ts test/terminal-title.test.ts test/todo-title.terminal.test.ts test/plan-mode-extension.test.ts test/tools-registry.test.ts test/system-prompt-contract.test.ts test/direct-bash.test.ts test/daily-agent-smoke.terminal.test.ts",
|
|
22
22
|
"test:all": "npm run test:offline && npm run test:terminal:vitest",
|
|
23
23
|
"test:terminal:vitest": "vitest run test/mention-file-select.terminal.test.ts test/tool-partial-display.terminal.test.ts test/viewport-position-final.test.ts --no-file-parallelism",
|
|
24
24
|
"test:todo-tui": "PIE_REAL_TODO_TUI=1 node --test --import tsx test/todo-closure.terminal.test.ts",
|