@cydm/pie 4.15.3 → 4.16.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.
@@ -190,19 +190,22 @@ function runManagerAllowCommand(args) {
190
190
  if (list) {
191
191
  const { file, exists } = resolveEffectiveProcConfigFile();
192
192
  if (!exists) {
193
- if (json) console.log(JSON.stringify({ ok: true, file, exists: false, allowCwd: [] }));
194
- else console.log(`No pie-proc.json found yet (next write target: ${file}).`);
193
+ if (json) console.log(JSON.stringify({ ok: true, file, exists: false, restricted: false, allowCwd: null }));
194
+ else console.log(`No pie-proc.json configured \u2014 standard working directories are allowed by default (OS/filesystem roots blocked). Run \`pie manager allow <dir>\` to enable explicit allowCwd narrowing at ${file}.`);
195
195
  return;
196
196
  }
197
197
  try {
198
198
  const parsed = JSON.parse(fs.readFileSync(file, "utf8"));
199
- const allowCwd = Array.isArray(parsed.allowCwd) ? parsed.allowCwd.filter((v) => typeof v === "string") : [];
200
- if (json) console.log(JSON.stringify({ ok: true, file, exists: true, allowCwd, maxWorkers: parsed.maxWorkers ?? 50 }));
199
+ const hasExplicitAllowCwd = Array.isArray(parsed.allowCwd);
200
+ const allowCwd = hasExplicitAllowCwd ? parsed.allowCwd.filter((v) => typeof v === "string") : null;
201
+ if (json) console.log(JSON.stringify({ ok: true, file, exists: true, restricted: hasExplicitAllowCwd, allowCwd, maxWorkers: parsed.maxWorkers ?? 50 }));
201
202
  else {
202
203
  console.log(`Policy file: ${file}`);
203
204
  console.log(`maxWorkers: ${typeof parsed.maxWorkers === "number" ? parsed.maxWorkers : "50 (default)"}`);
204
- console.log(allowCwd.length ? `allowCwd:
205
- ${allowCwd.map((d) => ` - ${d}`).join("\n")}` : "allowCwd: (empty)");
205
+ console.log(
206
+ allowCwd === null ? "allowCwd: (not set \u2014 open by default for standard directories)" : allowCwd.length ? `allowCwd:
207
+ ${allowCwd.map((d) => ` - ${d}`).join("\n")}` : "allowCwd: (empty \u2014 fail-closed deny all)"
208
+ );
206
209
  }
207
210
  } catch (error) {
208
211
  const detail = error instanceof Error ? error.message : String(error);
@@ -362,7 +362,7 @@ async function runDistillWorkerMain(memoryRoot, date, noExit = false, sessionsDi
362
362
  const { getSessionsDir } = await import("./config-4EOI5NOU.js");
363
363
  const { FileSessionStore } = await import("./src-DLAIQCKP.js");
364
364
  const { WikiStore, runWikiBootstrap, runWikiDreamBatches, runWikiGc } = await import("./src-OP6LFLR6.js");
365
- const { commitCuratedMemoryBestEffort } = await import("./memory-git-BJMYZHIE.js");
365
+ const { commitCuratedMemoryBestEffort } = await import("./memory-git-LV7RTOMN.js");
366
366
  const wiki = new WikiStore(memoryRoot);
367
367
  wikiForError = wiki;
368
368
  const inboxOnly = date === "__inbox__";
@@ -1,9 +1,10 @@
1
1
  import { createRequire as __createRequire } from "node:module"; const require = __createRequire(import.meta.url);
2
2
  import {
3
+ ensureWindowsUpgradeLauncher,
3
4
  isWindowsTaskAlreadyStoppedDetail,
4
5
  isWindowsTaskNotFoundDetail,
5
6
  queryWindowsServiceTaskState
6
- } from "./chunk-Y6AVNVOD.js";
7
+ } from "./chunk-7UFRZTQI.js";
7
8
  import {
8
9
  isPositivelyDeadHolder,
9
10
  withOwnershipMutex
@@ -226,6 +227,7 @@ function refreshWindowsManagerServiceOnUpgrade(params) {
226
227
  serviceEnv,
227
228
  { keepAlive: true }
228
229
  );
230
+ ensureWindowsUpgradeLauncher(params.workingDir);
229
231
  installWindowsManagerScheduledTask({
230
232
  taskName: params.taskName,
231
233
  launcherPath,
@@ -1571,7 +1571,11 @@ function createCliWebResearchHealthStore(configDir) {
1571
1571
 
1572
1572
  // src/capabilities/index.ts
1573
1573
  function createCliHostCapabilities(cwd, options = {}) {
1574
- const bashTool = createBashTool(cwd, options.getBashEnv ? { getEnv: options.getBashEnv } : void 0);
1574
+ const bashOptions = options.getBashEnv || options.isYoloMode ? {
1575
+ ...options.getBashEnv ? { getEnv: options.getBashEnv } : {},
1576
+ ...options.isYoloMode ? { isYoloMode: options.isYoloMode } : {}
1577
+ } : void 0;
1578
+ const bashTool = createBashTool(cwd, bashOptions);
1575
1579
  const healthStore = createCliWebResearchHealthStore(options.configDir ?? getConfigDir());
1576
1580
  const webSearchTool = createSharedWebSearchTool({
1577
1581
  getModel: options.getModel ?? (() => void 0),
@@ -301,6 +301,7 @@ function parseStatusFile(raw) {
301
301
  if (Array.isArray(record.supportedThinkingLevels) && record.supportedThinkingLevels.length <= 8 && record.supportedThinkingLevels.every((l) => typeof l === "string" && thinkingRe.test(l))) {
302
302
  file.supportedThinkingLevels = record.supportedThinkingLevels;
303
303
  }
304
+ if (typeof record.yoloMode === "boolean") file.yoloMode = record.yoloMode;
304
305
  if (typeof record.imBinding === "string" && record.imBinding.length <= 512 && !hasControlChars(record.imBinding)) file.imBinding = record.imBinding;
305
306
  if (Array.isArray(record.allowPeers) && record.allowPeers.length <= 1e3 && record.allowPeers.every((id) => typeof id === "string" && (id === "*" || isValidInstanceId(id)))) file.allowPeers = record.allowPeers;
306
307
  if (typeof record.secret === "string" && /^[a-f0-9]{64}$/.test(record.secret)) file.secret = record.secret;
@@ -58,7 +58,8 @@ function runGit(cwd, args) {
58
58
  env: isolatedGitEnv(),
59
59
  encoding: "utf8",
60
60
  timeout: GIT_TIMEOUT_MS,
61
- stdio: ["ignore", "pipe", "pipe"]
61
+ stdio: ["ignore", "pipe", "pipe"],
62
+ windowsHide: true
62
63
  }).trim();
63
64
  }
64
65
  var SymlinkContainmentError = class extends Error {
@@ -204,7 +205,8 @@ function assertSafeStandaloneGitDir(realRoot) {
204
205
  env: isolatedGitEnv(),
205
206
  encoding: "utf8",
206
207
  timeout: GIT_TIMEOUT_MS,
207
- stdio: ["ignore", "pipe", "pipe"]
208
+ stdio: ["ignore", "pipe", "pipe"],
209
+ windowsHide: true
208
210
  });
209
211
  } catch (error) {
210
212
  throw new SymlinkContainmentError(
@@ -7,7 +7,7 @@ import {
7
7
  resolveWritableProcConfigFile,
8
8
  runManagerAllowCommand,
9
9
  seedProcConfig
10
- } from "./chunk-Z2RT3P4F.js";
10
+ } from "./chunk-JBBKYDYC.js";
11
11
  import "./chunk-CBDQJMUI.js";
12
12
  import "./chunk-LZQXQOPJ.js";
13
13
  export {
@@ -1,21 +1,22 @@
1
1
  import { createRequire as __createRequire } from "node:module"; const require = __createRequire(import.meta.url);
2
2
  import {
3
3
  isTooBroadForWorkerSandbox,
4
- seedProcConfig
5
- } from "./chunk-Z2RT3P4F.js";
4
+ resolveEffectiveProcConfigFile
5
+ } from "./chunk-JBBKYDYC.js";
6
6
  import {
7
7
  installWindowsManagerLauncher,
8
8
  installWindowsManagerScheduledTask,
9
9
  queryLaunchdServicePresence,
10
10
  queryPlatformServiceState,
11
11
  uninstallMacosLaunchdService
12
- } from "./chunk-ZB5FVHI7.js";
12
+ } from "./chunk-PGNZMD2E.js";
13
13
  import {
14
+ ensureWindowsUpgradeLauncher,
14
15
  isWindowsTaskAlreadyStoppedDetail,
15
16
  isWindowsTaskNotFoundDetail,
16
17
  queryWindowsServiceTaskPresence,
17
18
  queryWindowsServiceTaskState
18
- } from "./chunk-Y6AVNVOD.js";
19
+ } from "./chunk-7UFRZTQI.js";
19
20
  import {
20
21
  readProcessCommandLine
21
22
  } from "./chunk-7RJXKN7N.js";
@@ -701,6 +702,7 @@ WantedBy=default.target`;
701
702
  ...serviceEnv,
702
703
  ["PATH", servicePath]
703
704
  ], { keepAlive: true });
705
+ ensureWindowsUpgradeLauncher(dir);
704
706
  const startResult = installWindowsManagerScheduledTask({
705
707
  taskName: platformServiceName(),
706
708
  launcherPath: silentLauncher,
@@ -836,7 +838,7 @@ async function runUpgradeCommand(args) {
836
838
  console.log("Usage: pie manager upgrade [--target <latest|x.y.z>] [--force]");
837
839
  return;
838
840
  }
839
- const { upgradePaths, performUpgrade, cliEffects, parseTarget } = await import("./manager-upgrade-DYRQ7YZ5.js");
841
+ const { upgradePaths, performUpgrade, cliEffects, parseTarget } = await import("./manager-upgrade-DGMMUQYY.js");
840
842
  let targetRaw;
841
843
  let force = false;
842
844
  for (let i = 0; i < args.length; i++) {
@@ -1091,7 +1093,7 @@ async function runManagerCommand(args) {
1091
1093
  return;
1092
1094
  }
1093
1095
  if (sub === "allow") {
1094
- const { runManagerAllowCommand } = await import("./manager-allow-SF5ROGDM.js");
1096
+ const { runManagerAllowCommand } = await import("./manager-allow-5HYRKCCH.js");
1095
1097
  runManagerAllowCommand(args.slice(1));
1096
1098
  return;
1097
1099
  }
@@ -1323,18 +1325,10 @@ async function runManagerCommand(args) {
1323
1325
  return;
1324
1326
  }
1325
1327
  seedWorkspace(dir);
1326
- const procSeed = seedProcConfig(process.cwd());
1327
- if (procSeed.state === "seeded") {
1328
+ const effectiveProc = resolveEffectiveProcConfigFile();
1329
+ if (effectiveProc.exists && path3.dirname(effectiveProc.file) !== path3.resolve(dir)) {
1328
1330
  console.log(
1329
- `Seeded pie-proc config: allowCwd = ${path3.resolve(process.cwd())} (dispatching works now; edit ${procSeed.file} to add roots \u2014 it applies on the next spawn)`
1330
- );
1331
- } else if (procSeed.state === "user-layer") {
1332
- console.log(
1333
- `pie-proc config: using the user layer (${procSeed.file}) \u2014 worker roots and caps come from there; edit it to change what the manager may dispatch.`
1334
- );
1335
- } else if (procSeed.state === "too-broad") {
1336
- console.log(
1337
- `Did not seed pie-proc config (the current directory ${path3.resolve(process.cwd())} is too broad). To dispatch work, run: pie manager allow /your/project (writes ${procSeed.file})`
1331
+ `pie-proc config: using ${effectiveProc.file} \u2014 worker caps and optional allowCwd come from there.`
1338
1332
  );
1339
1333
  }
1340
1334
  let readinessReport;
@@ -6,7 +6,7 @@ import {
6
6
  queryPlatformServiceState,
7
7
  scanLinuxServiceBlockingWorkers,
8
8
  stopAndRefreshWindowsServiceForUpgrade
9
- } from "./chunk-ZB5FVHI7.js";
9
+ } from "./chunk-PGNZMD2E.js";
10
10
  import {
11
11
  normalizePreInstallStopOutcome,
12
12
  parseWindowsTaskNumericState,
@@ -14,7 +14,7 @@ import {
14
14
  resolveDefaultTuiUsePidFile,
15
15
  runWindowsPreInstallStop,
16
16
  scanBlockingWindowsPeers
17
- } from "./chunk-Y6AVNVOD.js";
17
+ } from "./chunk-7UFRZTQI.js";
18
18
  import {
19
19
  readProcessCommandLine
20
20
  } from "./chunk-7RJXKN7N.js";
@@ -4,7 +4,7 @@ import {
4
4
  ensureMemoryGitIgnore,
5
5
  isMemoryGitInitialized,
6
6
  readCuratedMemoryGitLog
7
- } from "./chunk-VWDCKHCC.js";
7
+ } from "./chunk-ZSFE6N5J.js";
8
8
  import "./chunk-JE53PC46.js";
9
9
  import "./chunk-J6EZ335F.js";
10
10
  import "./chunk-MTH6QSYD.js";
package/dist/cli.js CHANGED
@@ -36,7 +36,7 @@ import {
36
36
  logTransportLifecycle,
37
37
  setYoloGrantListener,
38
38
  truncateHeadTail
39
- } from "./chunks/chunk-LIA52LJU.js";
39
+ } from "./chunks/chunk-TFBXCEMG.js";
40
40
  import "./chunks/chunk-F7EBZTZO.js";
41
41
  import {
42
42
  MEMORY_DISTILL_RETRYABLE_EXIT_CODE,
@@ -52,12 +52,12 @@ import {
52
52
  runDistillWorkerMain,
53
53
  spawnDistillAutoWorker,
54
54
  spawnDistillWorker
55
- } from "./chunks/chunk-NCO26FXT.js";
55
+ } from "./chunks/chunk-MC5ZYWSP.js";
56
56
  import {
57
57
  commitCuratedMemoryBestEffort,
58
58
  isMemoryGitInitialized,
59
59
  readCuratedMemoryGitLog
60
- } from "./chunks/chunk-VWDCKHCC.js";
60
+ } from "./chunks/chunk-ZSFE6N5J.js";
61
61
  import {
62
62
  SessionOwnershipLifecycle,
63
63
  claimSessionOwnership,
@@ -75040,7 +75040,7 @@ var BUILTIN_COMMAND_CATALOG = [
75040
75040
  { path: ["settings", "hotkeys"], description: "Show keyboard shortcuts", headless: "requires-ui" },
75041
75041
  { path: ["settings", "theme"], description: "Change theme", headless: "requires-ui" },
75042
75042
  { path: ["settings", "thinking"], description: "Set thinking level (off/minimal/low/medium/high/xhigh)", headless: "requires-ui" },
75043
- { path: ["settings", "yolo"], description: "Toggle or set YOLO mode (on/off/status)", headless: "requires-ui" },
75043
+ { path: ["settings", "yolo"], description: "Toggle or set YOLO mode (on/off/status)", headless: "supported" },
75044
75044
  { path: ["settings", "calm"], description: "Toggle calm mode: show only questions and answers (on/off/status)", headless: "requires-ui" },
75045
75045
  { path: ["extensions"], description: "List extensions and manage enable/disable toggles", headless: "requires-ui" },
75046
75046
  { path: ["extensions", "list"], description: "List discovered extensions (including disabled)", headless: "requires-ui" },
@@ -81886,6 +81886,17 @@ async function loadInteractiveExtensions(host) {
81886
81886
  // the file surgery is no longer needed. Structured refusals mirror
81887
81887
  // the json-events implementation.
81888
81888
  applyIpcControl: async (control, payload) => {
81889
+ if (control === "yolo.set") {
81890
+ const enabled = payload && typeof payload === "object" && "enabled" in payload ? payload.enabled : void 0;
81891
+ if (typeof enabled !== "boolean") return { ok: false, message: "yolo.set requires payload.enabled as boolean" };
81892
+ if (!host.setYoloMode) return { ok: false, message: "host does not expose a YOLO toggle" };
81893
+ try {
81894
+ host.setYoloMode(enabled);
81895
+ return { ok: true, message: JSON.stringify({ yoloMode: host.yoloMode }) };
81896
+ } catch (error) {
81897
+ return { ok: false, message: error instanceof Error ? error.message : String(error) };
81898
+ }
81899
+ }
81889
81900
  if (control === "thinking.set") {
81890
81901
  const level = payload && typeof payload === "object" && "level" in payload ? String(payload.level) : void 0;
81891
81902
  if (!level) return { ok: false, message: "thinking.set requires payload.level" };
@@ -83156,6 +83167,30 @@ async function loadInitialExplicitSession(sessionManager, sessionId, options) {
83156
83167
  }
83157
83168
  }
83158
83169
 
83170
+ // src/core/yolo-state.ts
83171
+ function createLiveYoloController(configDir, initial = DEFAULT_YOLO_MODE) {
83172
+ let yoloMode = initial;
83173
+ const allowlistedDirs = initial ? ["/"] : [configDir];
83174
+ return {
83175
+ get: () => yoloMode,
83176
+ set: (next) => {
83177
+ yoloMode = next;
83178
+ allowlistedDirs.splice(0, allowlistedDirs.length, ...next ? ["/"] : [configDir]);
83179
+ },
83180
+ allowlistedDirs
83181
+ };
83182
+ }
83183
+ var YOLO_ON_VALUES = /* @__PURE__ */ new Set(["on", "enable", "enabled", "true", "1"]);
83184
+ var YOLO_OFF_VALUES = /* @__PURE__ */ new Set(["off", "disable", "disabled", "false", "0"]);
83185
+ function parseYoloCommandArgs(rawArgs, current) {
83186
+ const mode = (rawArgs ?? "").trim().toLowerCase();
83187
+ if (mode === "status") return { ok: true, action: "status", next: current };
83188
+ if (!mode) return { ok: true, action: "set", next: !current };
83189
+ if (YOLO_ON_VALUES.has(mode)) return { ok: true, action: "set", next: true };
83190
+ if (YOLO_OFF_VALUES.has(mode)) return { ok: true, action: "set", next: false };
83191
+ return { ok: false, usage: "Usage: /settings/yolo [on|off|status]" };
83192
+ }
83193
+
83159
83194
  // src/app/runtime-composition.ts
83160
83195
  var CliMissingApiKeyError = class extends Error {
83161
83196
  constructor(message) {
@@ -83301,6 +83336,7 @@ async function composeCliRuntime(params) {
83301
83336
  const skills = discoveredSkills.filter((skill) => settingsManager.isSkillEnabled(skill.name));
83302
83337
  let interactiveOptions;
83303
83338
  const getCurrentModel = () => interactiveOptions?.model ?? model;
83339
+ const yolo = createLiveYoloController(paths.configDir);
83304
83340
  const cliHostCapabilities = createCliHostCapabilities(cwd, {
83305
83341
  getModel: getCurrentModel,
83306
83342
  getApiKey: () => interactiveOptions?.apiKey ?? apiKey,
@@ -83308,10 +83344,11 @@ async function composeCliRuntime(params) {
83308
83344
  resolveToolModel: (purpose) => modelRegistry.resolveToolModel(purpose, getCurrentModel()),
83309
83345
  resolveToolModelCandidates: (purpose) => modelRegistry.resolveToolModelCandidates(purpose, getCurrentModel()),
83310
83346
  configDir: paths.configDir,
83311
- getBashEnv: () => computerUseOwnerEnv(sessionManager.getActiveSessionId() || COMPUTER_USE_STANDALONE_OWNER, computerUseExecutionId)
83347
+ getBashEnv: () => computerUseOwnerEnv(sessionManager.getActiveSessionId() || COMPUTER_USE_STANDALONE_OWNER, computerUseExecutionId),
83348
+ isYoloMode: yolo.get
83312
83349
  });
83313
83350
  const fileSystemToolOptions = {
83314
- ...buildCliFileAccessOptions({ cwd, configDir: paths.configDir, skills, allowlistedDirs: [paths.configDir] }),
83351
+ ...buildCliFileAccessOptions({ cwd, configDir: paths.configDir, skills, allowlistedDirs: yolo.allowlistedDirs }),
83315
83352
  // Must match interactive-mode's rebuild view byte-for-byte: the rebuilt
83316
83353
  // tool surface replaces this composition-time set on the first mode
83317
83354
  // toggle/skill reload, and any description drift there would invalidate
@@ -83323,7 +83360,7 @@ async function composeCliRuntime(params) {
83323
83360
  getSessionId: () => sessionManager.getActiveSessionId() || void 0,
83324
83361
  resolveToolModel: (purpose) => modelRegistry.resolveToolModel(purpose, getCurrentModel()),
83325
83362
  resolveToolModelCandidates: (purpose) => modelRegistry.resolveToolModelCandidates(purpose, getCurrentModel()),
83326
- getPolicyContext: () => ({ mode: "normal", confirmationPolicy: "allow" })
83363
+ getPolicyContext: () => ({ mode: "normal", yoloMode: yolo.get(), confirmationPolicy: "allow" })
83327
83364
  };
83328
83365
  const rawTools = [
83329
83366
  createSearchContextTool(() => sessionManager),
@@ -83338,7 +83375,7 @@ async function composeCliRuntime(params) {
83338
83375
  toolCount: enabledRawTools.length
83339
83376
  });
83340
83377
  const allTools = createPolicyEnforcedTools(enabledRawTools, {
83341
- getContext: () => ({ mode: "normal", confirmationPolicy: "allow" })
83378
+ getContext: () => ({ mode: "normal", yoloMode: yolo.get(), confirmationPolicy: "allow" })
83342
83379
  });
83343
83380
  const tools = [...allTools];
83344
83381
  recordCliCompositionStep(compositionTrace, {
@@ -83397,6 +83434,7 @@ async function composeCliRuntime(params) {
83397
83434
  knowledgeSection,
83398
83435
  tools,
83399
83436
  allTools,
83437
+ yolo,
83400
83438
  fileObservationState,
83401
83439
  extensionPaths: params.extensionPaths,
83402
83440
  extensionFlags: params.extensionFlags ?? {},
@@ -83565,7 +83603,7 @@ async function loadPrintModeExtensions(params) {
83565
83603
  authStorage: params.modelRegistry.getAuthStorage(),
83566
83604
  requestInteraction
83567
83605
  }),
83568
- yoloMode: false
83606
+ yoloMode: params.yoloMode ?? DEFAULT_YOLO_MODE
83569
83607
  };
83570
83608
  const { extensions } = await loadExtensions(
83571
83609
  params.extensionPaths,
@@ -83666,7 +83704,8 @@ async function runPrintMode(params) {
83666
83704
  getAgent: () => agent,
83667
83705
  sessionManager: runtime.sessionManager,
83668
83706
  settingsManager: runtime.settingsManager,
83669
- allTools: runtime.allTools
83707
+ allTools: runtime.allTools,
83708
+ yoloMode: runtime.yolo.get()
83670
83709
  });
83671
83710
  const printModeTools = [...runtime.tools, ...printModeExtensions.extensionTools];
83672
83711
  const restoredApiKey = runtime.modelRegistry.getApiKey(runtime.model);
@@ -85068,9 +85107,26 @@ async function loadJsonModeExtensions(params) {
85068
85107
  if (scheduled) shutdownReserved = true;
85069
85108
  return scheduled ? { ok: true, message: "graceful shutdown scheduled" } : { ok: false, message: "shutdown unavailable or already in progress" };
85070
85109
  }
85110
+ if (control === "yolo.set") {
85111
+ const enabled = payload && typeof payload === "object" && "enabled" in payload ? payload.enabled : void 0;
85112
+ if (typeof enabled !== "boolean") {
85113
+ return { ok: false, message: "yolo.set requires payload.enabled as boolean" };
85114
+ }
85115
+ params.runtime.yolo.set(enabled);
85116
+ writeEvent({
85117
+ type: "extension.log",
85118
+ message: `im/yolo.set: YOLO mode ${enabled ? "on" : "off"}`
85119
+ });
85120
+ return { ok: true, message: JSON.stringify({ yoloMode: params.runtime.yolo.get() }) };
85121
+ }
85071
85122
  return { ok: false, message: `unknown control: ${control}` };
85072
85123
  },
85073
- yoloMode: false
85124
+ get yoloMode() {
85125
+ return params.runtime.yolo?.get() ?? DEFAULT_YOLO_MODE;
85126
+ },
85127
+ setYoloMode: (enabled) => {
85128
+ params.runtime.yolo?.set(enabled);
85129
+ }
85074
85130
  };
85075
85131
  const isIdleNow = () => hostIsIdle(params.getController());
85076
85132
  const extensionLogSink = (message) => {
@@ -85150,6 +85206,23 @@ async function loadJsonModeExtensions(params) {
85150
85206
  autoCompactEnabled: params.runtime.settingsManager.getAutoCompactEnabled()
85151
85207
  });
85152
85208
  return `context estimate: ${report.estimatedTokens ?? "?"} tokens \xB7 window ${report.contextWindow || "unknown"}${report.percent !== null ? ` (${report.percent}%)` : ""} \xB7 auto-compact ${report.autoCompactEnabled ? `at ${report.autoCompactLimitTokens ?? "?"}` : "off"} \xB7 queued ${report.pendingQueuedInputs}`;
85209
+ },
85210
+ "settings/yolo": async (args) => {
85211
+ const current = params.runtime.yolo?.get() ?? DEFAULT_YOLO_MODE;
85212
+ const parsed = parseYoloCommandArgs(typeof args === "string" ? args : void 0, current);
85213
+ if (!parsed.ok) return parsed.usage;
85214
+ if (parsed.action === "status") {
85215
+ return `YOLO mode is ${current ? "on" : "off"}`;
85216
+ }
85217
+ if (parsed.next === current) {
85218
+ return `YOLO mode already ${current ? "on" : "off"}`;
85219
+ }
85220
+ params.runtime.yolo?.set(parsed.next);
85221
+ writeEvent({
85222
+ type: "extension.log",
85223
+ message: `settings/yolo: YOLO mode ${parsed.next ? "on" : "off"}`
85224
+ });
85225
+ return `YOLO mode ${parsed.next ? "enabled (sandbox restrictions disabled)" : "disabled (sandbox restrictions restored)"}`;
85153
85226
  }
85154
85227
  });
85155
85228
  try {
@@ -87294,7 +87367,7 @@ async function main() {
87294
87367
  if (sub === STABLE_CLI_COMMANDS.models || sub === STABLE_CLI_COMMANDS.manager) {
87295
87368
  try {
87296
87369
  if (sub === STABLE_CLI_COMMANDS.models) await runModelsCommand(subArgs);
87297
- else await (await import("./chunks/manager-cli-ZV36YNPJ.js")).runManagerCommand(subArgs);
87370
+ else await (await import("./chunks/manager-cli-KK3XG3DX.js")).runManagerCommand(subArgs);
87298
87371
  } catch (error) {
87299
87372
  console.error(error instanceof Error ? error.message : String(error));
87300
87373
  process.exitCode = 1;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cydm/pie",
3
- "version": "4.15.3",
3
+ "version": "4.16.0",
4
4
  "description": "Pie AI Agent CLI",
5
5
  "type": "module",
6
6
  "bin": {
@@ -20,8 +20,8 @@
20
20
  "test:skill-regressions": "node --test --test-force-exit --import tsx test/axi-bridge-lifecycle.test.ts 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/tui-use-reap.test.ts test/tui-use-kill-escalation.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 --test-force-exit --import tsx test/remote-model-catalog.test.ts",
22
22
  "test:offline": "node ../../scripts/run-cli-offline.mjs",
23
- "test:fast:guards": "node --test --import tsx test/source-size-guard.test.ts test/architecture-boundaries.test.ts test/builtin-extensions.test.ts test/builtin-command-catalog.test.ts test/extensions-enablement.test.ts test/tools-registry.test.ts test/im-forward-card-compiler.test.ts test/system-prompt-contract.test.ts",
24
- "test:offline:main": "node --test --test-concurrency=2 --test-force-exit --import tsx test/cli-attention.test.ts test/cron.test.ts test/cron-process.test.ts test/cron-poll-gate.test.ts test/memory-distill.test.ts test/memory-wiki-cli.test.ts test/memory-injection-budget.test.ts test/memory-injection-freeze.test.ts test/memory-consumption-e2e.test.ts test/memory-frozen-matching.test.ts test/memory-soul-injection.test.ts test/config-dir-fail-closed.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-userassigned.test.ts test/im-forward-bus-health.test.ts test/im-forward-panel-fastpath.test.ts test/im-forward-worker-panel.test.ts test/im-forward-cron-panel.test.ts test/im-forward-tree-panel.test.ts test/im-forward-memory-panel.test.ts test/im-forward-archive-panel.test.ts test/im-forward-auto-wake.test.ts test/im-forward-provider-boundary.test.ts test/im-forward-self-heal.test.ts test/im-forward-thread-steal.test.ts test/im-forward-panel-v3.test.ts test/headless-session-commands.test.ts test/headless-compact-audit.test.ts test/builtin-command-catalog.test.ts test/im-forward-consumer.test.ts test/im-forward-settled-reaction.test.ts test/im-forward-card-compiler.test.ts test/im-forward-integration.test.ts test/user-input-scope-vision-fallback.test.ts test/im-forward-anchor-ttl.test.ts test/im-forward-anchor-ttl.dogfood.test.ts test/im-forward-group-mention.test.ts test/im-forward-onboarding.test.ts test/ownership-concurrency.test.ts test/pie-ipc-windows-security.test.ts test/im-forward-dogfood.terminal.test.ts test/thread-registry.test.ts test/im-forward-event-hub.test.ts test/im-forward-hub-routing.test.ts test/im-forward-session-anchors.test.ts test/im-forward-session-roots-ads.test.ts test/extension-user-input.test.ts test/pie-ipc-pure.test.ts test/pie-ipc-resolve.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-resident-dispatch.test.ts test/pie-proc.test.ts test/pie-proc-resume.test.ts test/session-ownership.test.ts test/initial-session.test.ts test/pie-ipc-host.terminal.test.ts test/core-services.test.ts test/cli.test.ts test/cli-json-events.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-event-sink.test.ts test/json-events-lifecycle-bridge.test.ts test/json-events-self-input.test.ts test/json-events-idle-mode.test.ts test/manager-cli.test.ts test/manager-upgrade.test.ts test/json-events-sidechat-diagnostics.test.ts test/json-events-sidechat-service.test.ts test/json-events-prewarm-shutdown.test.ts test/json-envelope-composition.test.ts test/subagent-session-store.test.ts test/subagent-resolution.test.ts test/supervisor-anchor-inject.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/terminal-state-hygiene.test.ts test/terminal-mode-filter-families.test.ts test/manager-model-env.test.ts test/bash-mode-sequence-boundary.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/streaming-split-parity.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/session-resume-cwd.test.ts test/session-resume-restart.test.ts test/session-resume-picker.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 test/axi-connection-order.test.ts test/confirm-yolo-grant.test.ts test/yolo-grant.test.ts test/yolo-shortcut.test.ts test/host-idle.test.ts test/im-forward-anchor-reclaim.test.ts test/im-forward-browser.test.ts test/im-forward-dispatch-claim.test.ts test/im-forward-dispatch-verify.test.ts test/im-forward-existing-app-terminal.test.ts test/im-forward-panel-actions.test.ts test/manager-seed.test.ts test/pending-tools-turn-boundary.test.ts test/pie-ipc-results.test.ts test/session-display-name.test.ts test/session-model-metadata.test.ts test/thinking-capabilities.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",
23
+ "test:fast:guards": "node --test --import tsx test/source-size-guard.test.ts test/architecture-boundaries.test.ts test/builtin-extensions.test.ts test/builtin-command-catalog.test.ts test/extensions-enablement.test.ts test/tools-registry.test.ts test/im-forward-card-compiler.test.ts test/system-prompt-contract.test.ts test/windows-silent-spawn-guard.test.ts test/worker-yolo-and-proc-defaults-guard.test.ts",
24
+ "test:offline:main": "node --test --test-concurrency=2 --test-force-exit --import tsx test/cli-attention.test.ts test/cron.test.ts test/cron-process.test.ts test/cron-poll-gate.test.ts test/memory-distill.test.ts test/memory-wiki-cli.test.ts test/memory-injection-budget.test.ts test/memory-injection-freeze.test.ts test/memory-consumption-e2e.test.ts test/memory-frozen-matching.test.ts test/memory-soul-injection.test.ts test/config-dir-fail-closed.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-userassigned.test.ts test/im-forward-bus-health.test.ts test/im-forward-panel-fastpath.test.ts test/im-forward-worker-panel.test.ts test/im-forward-cron-panel.test.ts test/im-forward-tree-panel.test.ts test/im-forward-memory-panel.test.ts test/im-forward-archive-panel.test.ts test/im-forward-auto-wake.test.ts test/im-forward-provider-boundary.test.ts test/im-forward-self-heal.test.ts test/im-forward-thread-steal.test.ts test/im-forward-panel-v3.test.ts test/headless-session-commands.test.ts test/headless-compact-audit.test.ts test/builtin-command-catalog.test.ts test/im-forward-consumer.test.ts test/im-forward-settled-reaction.test.ts test/im-forward-card-compiler.test.ts test/im-forward-integration.test.ts test/user-input-scope-vision-fallback.test.ts test/im-forward-anchor-ttl.test.ts test/im-forward-anchor-ttl.dogfood.test.ts test/im-forward-group-mention.test.ts test/im-forward-onboarding.test.ts test/ownership-concurrency.test.ts test/pie-ipc-windows-security.test.ts test/im-forward-dogfood.terminal.test.ts test/thread-registry.test.ts test/im-forward-event-hub.test.ts test/im-forward-hub-routing.test.ts test/im-forward-session-anchors.test.ts test/im-forward-session-roots-ads.test.ts test/extension-user-input.test.ts test/pie-ipc-pure.test.ts test/pie-ipc-resolve.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-resident-dispatch.test.ts test/pie-proc.test.ts test/pie-proc-resume.test.ts test/session-ownership.test.ts test/initial-session.test.ts test/pie-ipc-host.terminal.test.ts test/core-services.test.ts test/cli.test.ts test/cli-json-events.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-event-sink.test.ts test/json-events-lifecycle-bridge.test.ts test/json-events-self-input.test.ts test/json-events-idle-mode.test.ts test/manager-cli.test.ts test/manager-upgrade.test.ts test/json-events-sidechat-diagnostics.test.ts test/json-events-sidechat-service.test.ts test/json-events-prewarm-shutdown.test.ts test/json-envelope-composition.test.ts test/subagent-session-store.test.ts test/subagent-resolution.test.ts test/supervisor-anchor-inject.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/terminal-state-hygiene.test.ts test/terminal-mode-filter-families.test.ts test/manager-model-env.test.ts test/bash-mode-sequence-boundary.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/streaming-split-parity.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/session-resume-cwd.test.ts test/session-resume-restart.test.ts test/session-resume-picker.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 test/axi-connection-order.test.ts test/confirm-yolo-grant.test.ts test/yolo-grant.test.ts test/yolo-shortcut.test.ts test/host-idle.test.ts test/im-forward-anchor-reclaim.test.ts test/im-forward-browser.test.ts test/im-forward-dispatch-claim.test.ts test/im-forward-dispatch-verify.test.ts test/im-forward-existing-app-terminal.test.ts test/im-forward-panel-actions.test.ts test/manager-seed.test.ts test/pending-tools-turn-boundary.test.ts test/pie-ipc-results.test.ts test/session-display-name.test.ts test/session-model-metadata.test.ts test/thinking-capabilities.test.ts test/windows-silent-spawn-guard.test.ts test/worker-yolo-and-proc-defaults-guard.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",
25
25
  "test:all": "npm run test:offline && npm run test:terminal:vitest",
26
26
  "test:cron:tui": "node ../../scripts/run-with-env.mjs PIE_REAL_CRON_TUI=1 -- --test --import tsx test/cron.terminal.test.ts test/cron-journey.terminal.test.ts",
27
27
  "test:ipc:tui": "node ../../scripts/run-with-env.mjs PIE_REAL_IPC_TUI=1 -- --test --import tsx test/pie-ipc-host.terminal.test.ts",