@cydm/pie 4.13.0 → 4.14.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.
Files changed (33) hide show
  1. package/dist/builtin/extensions/ask-user/index.js +4 -4
  2. package/dist/builtin/extensions/im-forward/index.js +8099 -8101
  3. package/dist/builtin/extensions/mcp-adapter/index.js +86 -81
  4. package/dist/builtin/extensions/memory/index.js +30 -7
  5. package/dist/builtin/extensions/pie-ipc/index.js +13 -18
  6. package/dist/builtin/extensions/pie-proc/index.js +69 -60
  7. package/dist/builtin/extensions/plan-mode/index.js +4 -4
  8. package/dist/builtin/extensions/subagent/index.js +6 -5
  9. package/dist/builtin/extensions/todo/index.js +4 -4
  10. package/dist/chunks/{chunk-BQWHLYYZ.js → chunk-26KRUYZH.js} +1 -1
  11. package/dist/chunks/{chunk-5MCIBDAM.js → chunk-BOQIGMGQ.js} +38 -93
  12. package/dist/chunks/{chunk-AKC7NMP4.js → chunk-EZZTMDWZ.js} +887 -391
  13. package/dist/chunks/{chunk-5PCLBIOO.js → chunk-FD3KBPDR.js} +110 -75
  14. package/dist/chunks/{chunk-NOSNHMA2.js → chunk-IK2FR2YF.js} +2 -1
  15. package/dist/chunks/{chunk-SXBX2P5R.js → chunk-JJH77AUU.js} +1709 -1577
  16. package/dist/chunks/{chunk-OGGL6LUN.js → chunk-JKO42HZW.js} +1 -1
  17. package/dist/chunks/{chunk-3CJLYX5J.js → chunk-KGWKRO7Z.js} +2 -2
  18. package/dist/chunks/{chunk-G2K4GY6N.js → chunk-MCR4JYI6.js} +103 -12
  19. package/dist/chunks/{chunk-IZ4DYCJ7.js → chunk-UYDS75SI.js} +810 -726
  20. package/dist/chunks/{host-image-fallback-MZK633DK.js → host-image-fallback-LPHB5CTL.js} +1 -1
  21. package/dist/chunks/{manager-cli-OTIMAWO6.js → manager-cli-ZV36YNPJ.js} +187 -173
  22. package/dist/chunks/{memory-git-Q3UBYOJ4.js → memory-git-ZJN6SPIU.js} +5 -5
  23. package/dist/chunks/{model-registry-QNEPISBJ.js → model-registry-GLBIUOJR.js} +2 -2
  24. package/dist/chunks/{read-file-understanding-KCJMSOS7.js → read-file-understanding-DFJPTTSB.js} +5 -5
  25. package/dist/chunks/{src-TIDKYA5F.js → src-76Q33OY5.js} +1 -1
  26. package/dist/chunks/{src-D5GN4Q5O.js → src-ALHMJZ5R.js} +2 -2
  27. package/dist/chunks/{src-7MZZJVOG.js → src-KZ7YID3I.js} +11 -3
  28. package/dist/chunks/{src-QI47K3W3.js → src-LEXKDSFV.js} +24 -6
  29. package/dist/chunks/{test-stream-JAJHK44G.js → test-stream-OVGDTXOY.js} +1 -1
  30. package/dist/cli.js +12910 -12631
  31. package/models.schema.json +12 -3
  32. package/package.json +1 -1
  33. package/dist/chunks/{chunk-3GG342QY.js → chunk-TYCKSYUF.js} +19 -19
@@ -25,7 +25,7 @@ import {
25
25
  takeDispatchFrame,
26
26
  wrapInboundText,
27
27
  wrappedMessageMarker
28
- } from "../../../chunks/chunk-3GG342QY.js";
28
+ } from "../../../chunks/chunk-TYCKSYUF.js";
29
29
  import {
30
30
  Type
31
31
  } from "../../../chunks/chunk-XXGYUYXI.js";
@@ -35,7 +35,6 @@ import "../../../chunks/chunk-LZQXQOPJ.js";
35
35
  import * as fs3 from "node:fs";
36
36
  import * as os from "node:os";
37
37
  import * as path4 from "node:path";
38
- import { randomUUID } from "node:crypto";
39
38
 
40
39
  // builtin/extensions/pie-ipc/discovery.ts
41
40
  import * as fs2 from "node:fs";
@@ -1081,11 +1080,11 @@ function fitPeekSnapshotToFrame(snapshot, frameBytes, maxBytes = 8e3) {
1081
1080
  return text;
1082
1081
  }
1083
1082
 
1084
- // builtin/extensions/pie-ipc/index.ts
1083
+ // builtin/extensions/pie-ipc/runtime-base.ts
1085
1084
  var DEFAULT_NOTIFY_FALLBACK_MS = 6e5;
1086
1085
  var FALLBACK_RENEWAL_CAP = 4;
1087
1086
  var PROBE_CACHE_MS = 2e3;
1088
- var Runtime = class {
1087
+ var RuntimeBase = class {
1089
1088
  constructor(ctx, config, discoveryDir) {
1090
1089
  this.ctx = ctx;
1091
1090
  this.config = config;
@@ -1289,7 +1288,8 @@ var Runtime = class {
1289
1288
  const status = this.currentStatus();
1290
1289
  let queueGate;
1291
1290
  try {
1292
- queueGate = this.ctx.getQueueGateDiagnostics?.();
1291
+ const diagnosticContext = this.ctx;
1292
+ queueGate = diagnosticContext.getQueueGateDiagnostics?.();
1293
1293
  } catch {
1294
1294
  }
1295
1295
  reply("state", JSON.stringify({
@@ -1772,13 +1772,12 @@ ${outcome.text}`
1772
1772
  } catch {
1773
1773
  }
1774
1774
  }
1775
- /** A completion notification (or its inbox delivery) landed for our send.
1776
- * Observability-aware (final audit): an INJECTING host shows the message
1777
- * to the model the moment it lands — the fallback timer dies (single
1778
- * wake). An INBOX-ONLY host (embedded) has no scheduler: inbox landing is
1779
- * not observation, so instead of silently cancelling the only wake, the
1780
- * fallback fires IMMEDIATELY as a [ipc-done-check] hint carrying the
1781
- * outcome — every host kind surfaces the completion exactly once. */
1775
+ };
1776
+
1777
+ // builtin/extensions/pie-ipc/runtime.ts
1778
+ import { randomUUID } from "node:crypto";
1779
+ var Runtime = class extends RuntimeBase {
1780
+ /** Surface an inbox-only completion exactly once instead of silently cancelling its fallback. */
1782
1781
  completeNotify(requestId, userAssigned = false) {
1783
1782
  const willInject = this.delivery?.willInjectNow() ?? this.ctx.capabilities.editorInjection;
1784
1783
  if (willInject) {
@@ -1796,12 +1795,6 @@ ${outcome.text}`
1796
1795
  } catch {
1797
1796
  }
1798
1797
  }
1799
- /** A completion notification (or its inbox delivery) landed for our send:
1800
- * destroy the fallback OPERATION so the model is woken exactly once —
1801
- * including a query-in-flight fallback (review r4-P1): finishOp cancels
1802
- * the in-flight continuation, which then exits without renewing or
1803
- * waking. Also records completion for sends whose push arrived BEFORE
1804
- * the ack did — armNotifyFallback then arms nothing. */
1805
1798
  clearNotifyFallback(requestId) {
1806
1799
  if (this.completedNotifies.size > 200) this.completedNotifies.clear();
1807
1800
  this.completedNotifies.add(requestId);
@@ -2154,6 +2147,8 @@ ${message.text}`).join("\n---\n");
2154
2147
  await this.transport?.closeAndFlush();
2155
2148
  }
2156
2149
  };
2150
+
2151
+ // builtin/extensions/pie-ipc/index.ts
2157
2152
  function loadConfig(ctx, configDir) {
2158
2153
  try {
2159
2154
  const layers = [
@@ -2,7 +2,7 @@ import { createRequire as __createRequire } from "node:module"; const require =
2
2
  import {
3
3
  registerWorkerLifecycleBridge,
4
4
  syncInheritedWorkerModels
5
- } from "../../../chunks/chunk-OGGL6LUN.js";
5
+ } from "../../../chunks/chunk-JKO42HZW.js";
6
6
  import {
7
7
  readProcessCommandLine
8
8
  } from "../../../chunks/chunk-7RJXKN7N.js";
@@ -12,28 +12,28 @@ import {
12
12
  import "../../../chunks/chunk-Q4NJEPIZ.js";
13
13
  import {
14
14
  loadResolvedModelsConfig
15
- } from "../../../chunks/chunk-IZ4DYCJ7.js";
15
+ } from "../../../chunks/chunk-UYDS75SI.js";
16
16
  import "../../../chunks/chunk-CBDQJMUI.js";
17
17
  import {
18
18
  redactText
19
- } from "../../../chunks/chunk-AKC7NMP4.js";
19
+ } from "../../../chunks/chunk-EZZTMDWZ.js";
20
20
  import {
21
21
  isCompactSummaryMessage
22
- } from "../../../chunks/chunk-SXBX2P5R.js";
23
- import "../../../chunks/chunk-BQWHLYYZ.js";
24
- import "../../../chunks/chunk-G2K4GY6N.js";
22
+ } from "../../../chunks/chunk-JJH77AUU.js";
23
+ import "../../../chunks/chunk-26KRUYZH.js";
24
+ import "../../../chunks/chunk-MCR4JYI6.js";
25
25
  import {
26
26
  Type
27
27
  } from "../../../chunks/chunk-XXGYUYXI.js";
28
28
  import "../../../chunks/chunk-LZQXQOPJ.js";
29
29
 
30
30
  // builtin/extensions/pie-proc/index.ts
31
- import { execFileSync, spawn } from "node:child_process";
31
+ import { execFileSync as execFileSync2, spawn } from "node:child_process";
32
32
  import { createRequire } from "node:module";
33
33
  import { fileURLToPath } from "node:url";
34
- import * as fs4 from "node:fs";
35
- import * as os3 from "node:os";
36
- import * as path4 from "node:path";
34
+ import * as fs5 from "node:fs";
35
+ import * as os4 from "node:os";
36
+ import * as path5 from "node:path";
37
37
 
38
38
  // builtin/extensions/pie-proc/panel-bridge.ts
39
39
  import * as fs from "node:fs";
@@ -693,9 +693,12 @@ function collectModelRefsFromRaw(raw) {
693
693
  refs.add(`${doc.defaults.provider.trim()}/${doc.defaults.modelId.trim()}`);
694
694
  }
695
695
  if (doc.defaults.modelClasses && typeof doc.defaults.modelClasses === "object") {
696
- for (const cls of Object.values(doc.defaults.modelClasses)) {
697
- if (typeof cls?.provider === "string" && typeof cls?.modelId === "string") {
698
- refs.add(`${cls.provider.trim()}/${cls.modelId.trim()}`);
696
+ for (const entry of Object.values(doc.defaults.modelClasses)) {
697
+ const list = Array.isArray(entry) ? entry : [entry];
698
+ for (const cls of list) {
699
+ if (typeof cls?.provider === "string" && typeof cls?.modelId === "string") {
700
+ refs.add(`${cls.provider.trim()}/${cls.modelId.trim()}`);
701
+ }
699
702
  }
700
703
  }
701
704
  }
@@ -857,7 +860,7 @@ async function waitForWorkerIpcReady(opts) {
857
860
  if (!isPidAlive(opts.pid)) return { exitedEarly: true };
858
861
  const remaining = deadline - Date.now();
859
862
  if (remaining <= 0) break;
860
- await new Promise((resolve5) => setTimeout(resolve5, Math.min(pollMs, remaining)));
863
+ await new Promise((resolve6) => setTimeout(resolve6, Math.min(pollMs, remaining)));
861
864
  }
862
865
  return { peer: readLiveWorkerPeer(opts.ipcRoot, opts.sessionId, opts.pid), exitedEarly: !isPidAlive(opts.pid) };
863
866
  }
@@ -910,22 +913,11 @@ function liveWorkerModelLabel(ipcRoot, sessionId, pid) {
910
913
  return lvl ? `${peer.model} (${lvl})` : peer.model;
911
914
  }
912
915
 
913
- // builtin/extensions/pie-proc/index.ts
914
- var require_ = createRequire(import.meta.url);
915
- function resolveOperatorSessionsDir() {
916
- try {
917
- const { getSessionsDir } = require_("../../../src/config.js");
918
- return getSessionsDir();
919
- } catch {
920
- const override = process.env.PIE_SESSIONS_DIR;
921
- if (override !== void 0 && override !== "") {
922
- if (override === "~") return path4.join(os3.homedir(), ".pie", "sessions");
923
- if (override.startsWith("~/")) return path4.join(os3.homedir(), override.slice(2));
924
- if (path4.isAbsolute(override)) return override;
925
- }
926
- return path4.join(os3.homedir(), ".pie", "sessions");
927
- }
928
- }
916
+ // builtin/extensions/pie-proc/proc-runtime.ts
917
+ import { execFileSync } from "node:child_process";
918
+ import * as fs4 from "node:fs";
919
+ import * as os3 from "node:os";
920
+ import * as path4 from "node:path";
929
921
  var IM_FORWARD_CONTROL_KEYS = /* @__PURE__ */ new Set(["enabled", "provider", "retryBackoffMs"]);
930
922
  var IM_FORWARD_FORBIDDEN_KEYS = /* @__PURE__ */ new Set(["providers", "__proto__", "constructor", "prototype", "toString", "valueOf"]);
931
923
  var SAFE_PROVIDER_ID = /^[a-z][a-z0-9_-]{0,31}$/i;
@@ -1294,13 +1286,30 @@ function readUserImForwardIdentity() {
1294
1286
  }
1295
1287
  return void 0;
1296
1288
  }
1289
+
1290
+ // builtin/extensions/pie-proc/index.ts
1291
+ var require_ = createRequire(import.meta.url);
1292
+ function resolveOperatorSessionsDir() {
1293
+ try {
1294
+ const { getSessionsDir } = require_("../../../src/config.js");
1295
+ return getSessionsDir();
1296
+ } catch {
1297
+ const override = process.env.PIE_SESSIONS_DIR;
1298
+ if (override !== void 0 && override !== "") {
1299
+ if (override === "~") return path5.join(os4.homedir(), ".pie", "sessions");
1300
+ if (override.startsWith("~/")) return path5.join(os4.homedir(), override.slice(2));
1301
+ if (path5.isAbsolute(override)) return override;
1302
+ }
1303
+ return path5.join(os4.homedir(), ".pie", "sessions");
1304
+ }
1305
+ }
1297
1306
  function cliEntry() {
1298
- const moduleDir = path4.dirname(fileURLToPath(import.meta.url));
1307
+ const moduleDir = path5.dirname(fileURLToPath(import.meta.url));
1299
1308
  for (const rel of ["../../../src/cli.ts", "../../../cli.js"]) {
1300
- const candidate = path4.resolve(moduleDir, rel);
1309
+ const candidate = path5.resolve(moduleDir, rel);
1301
1310
  try {
1302
- const real = fs4.realpathSync(candidate);
1303
- if (fs4.statSync(real).isFile()) return real;
1311
+ const real = fs5.realpathSync(candidate);
1312
+ if (fs5.statSync(real).isFile()) return real;
1304
1313
  } catch {
1305
1314
  }
1306
1315
  }
@@ -1310,10 +1319,10 @@ function loaderArgs() {
1310
1319
  for (let i = 0; i < process.execArgv.length - 1; i += 1) {
1311
1320
  if (process.execArgv[i] === "--import") {
1312
1321
  const target = process.execArgv[i + 1];
1313
- if (target && !path4.isAbsolute(target) && !target.startsWith("file:")) {
1322
+ if (target && !path5.isAbsolute(target) && !target.startsWith("file:")) {
1314
1323
  try {
1315
- const pkgRoot = path4.dirname(require_.resolve(`${target}/package.json`, { paths: [path4.dirname(cliEntry())] }));
1316
- return ["--import", path4.join(pkgRoot, "dist", "loader.mjs")];
1324
+ const pkgRoot = path5.dirname(require_.resolve(`${target}/package.json`, { paths: [path5.dirname(cliEntry())] }));
1325
+ return ["--import", path5.join(pkgRoot, "dist", "loader.mjs")];
1317
1326
  } catch {
1318
1327
  return [];
1319
1328
  }
@@ -1324,7 +1333,7 @@ function loaderArgs() {
1324
1333
  return [];
1325
1334
  }
1326
1335
  function logDir() {
1327
- return path4.join(pieProcDir(), "logs");
1336
+ return path5.join(pieProcDir(), "logs");
1328
1337
  }
1329
1338
  var toolText = (text, isError = false) => ({ content: [{ type: "text", text }], details: {}, ...isError ? { isError: true } : {} });
1330
1339
  function pieProc(ctx) {
@@ -1336,18 +1345,18 @@ function pieProc(ctx) {
1336
1345
  const observeActivity = (record) => {
1337
1346
  const logTime = (() => {
1338
1347
  try {
1339
- return fs4.statSync(path4.join(logDir(), `${record.name}.jsonl`)).mtimeMs;
1348
+ return fs5.statSync(path5.join(logDir(), `${record.name}.jsonl`)).mtimeMs;
1340
1349
  } catch {
1341
1350
  return record.lastActiveAt;
1342
1351
  }
1343
1352
  })();
1344
1353
  if (record.pid === 0) return logTime;
1345
- const statusRoot = path4.join(path4.resolve(expandTilde(process.env.PIE_IPC_CONFIG_DIR ?? configDirRoot())), "run", "ipc");
1354
+ const statusRoot = path5.join(path5.resolve(expandTilde(process.env.PIE_IPC_CONFIG_DIR ?? configDirRoot())), "run", "ipc");
1346
1355
  try {
1347
- for (const file of fs4.readdirSync(statusRoot)) {
1356
+ for (const file of fs5.readdirSync(statusRoot)) {
1348
1357
  if (!file.endsWith(".json")) continue;
1349
1358
  try {
1350
- const status = JSON.parse(fs4.readFileSync(path4.join(statusRoot, file), "utf8"));
1359
+ const status = JSON.parse(fs5.readFileSync(path5.join(statusRoot, file), "utf8"));
1351
1360
  if (status.sessionId === record.sessionId && status.state === "working") return Date.now();
1352
1361
  } catch {
1353
1362
  }
@@ -1380,7 +1389,7 @@ function pieProc(ctx) {
1380
1389
  if (!Number.isSafeInteger(pid) || pid <= 1) return;
1381
1390
  if (process.platform === "win32") {
1382
1391
  try {
1383
- execFileSync("taskkill.exe", ["/F", "/T", "/PID", String(pid)], {
1392
+ execFileSync2("taskkill.exe", ["/F", "/T", "/PID", String(pid)], {
1384
1393
  windowsHide: true,
1385
1394
  stdio: "ignore",
1386
1395
  timeout: 5e3
@@ -1513,17 +1522,17 @@ function pieProc(ctx) {
1513
1522
  const canonicalCwd = cwdAllowedOrThrow(params.cwd, readConfigDetailed());
1514
1523
  const entry = cliEntry();
1515
1524
  if (!entry) throw new Error("cannot resolve a trusted pie entry point (refusing to spawn)");
1516
- const validatedModel = validateSpawnModelParams({ model: params.model, thinkingLevel: params.thinkingLevel, pieDir: path4.join(pieProcDir(), "agents", params.name), parentConfigDir: configDirRoot() });
1525
+ const validatedModel = validateSpawnModelParams({ model: params.model, thinkingLevel: params.thinkingLevel, pieDir: path5.join(pieProcDir(), "agents", params.name), parentConfigDir: configDirRoot() });
1517
1526
  let resumeSessionId;
1518
1527
  let resumeSessionsDir;
1519
1528
  if (params.resumeSessionId) {
1520
1529
  if (!/^[A-Za-z0-9][A-Za-z0-9-_]{5,63}$/.test(params.resumeSessionId)) throw new Error(`invalid resumeSessionId "${params.resumeSessionId}"`);
1521
1530
  const operatorSessionsDir = resolveOperatorSessionsDir();
1522
- const workerSessionsDir = path4.join(pieProcDir(), "agents", params.name, "sessions");
1531
+ const workerSessionsDir = path5.join(pieProcDir(), "agents", params.name, "sessions");
1523
1532
  let recordedCwd;
1524
1533
  for (const dir of [workerSessionsDir, operatorSessionsDir]) {
1525
1534
  try {
1526
- const head = JSON.parse(fs4.readFileSync(path4.join(dir, params.resumeSessionId, "head.json"), "utf8"));
1535
+ const head = JSON.parse(fs5.readFileSync(path5.join(dir, params.resumeSessionId, "head.json"), "utf8"));
1527
1536
  recordedCwd = head.metadata?.cwd;
1528
1537
  resumeSessionsDir = dir;
1529
1538
  break;
@@ -1534,7 +1543,7 @@ function pieProc(ctx) {
1534
1543
  if (typeof recordedCwd !== "string" || !recordedCwd) throw new Error(`session "${params.resumeSessionId}" has no recorded cwd; resume requires one`);
1535
1544
  let canonicalRecorded = recordedCwd;
1536
1545
  try {
1537
- canonicalRecorded = fs4.realpathSync(recordedCwd);
1546
+ canonicalRecorded = fs5.realpathSync(recordedCwd);
1538
1547
  } catch {
1539
1548
  }
1540
1549
  if (canonicalRecorded !== canonicalCwd) throw new Error(`resume cwd mismatch: session recorded "${recordedCwd}" but spawn cwd is "${params.cwd}" \u2014 resume in the session's own directory`);
@@ -1611,12 +1620,12 @@ function pieProc(ctx) {
1611
1620
  });
1612
1621
  let child;
1613
1622
  try {
1614
- const pieDir = path4.join(pieProcDir(), "agents", params.name);
1615
- fs4.mkdirSync(pieDir, { recursive: true });
1623
+ const pieDir = path5.join(pieProcDir(), "agents", params.name);
1624
+ fs5.mkdirSync(pieDir, { recursive: true });
1616
1625
  inheritWorkerConfigFiles(pieDir, configDirRoot());
1617
1626
  if (imForward) {
1618
- const imFile = path4.join(pieDir, "im-forward.json");
1619
- if (!fs4.existsSync(imFile)) {
1627
+ const imFile = path5.join(pieDir, "im-forward.json");
1628
+ if (!fs5.existsSync(imFile)) {
1620
1629
  const provider = typeof imForward.provider === "string" ? imForward.provider.trim() : "";
1621
1630
  if (provider && SAFE_PROVIDER_ID.test(provider)) {
1622
1631
  const providerSettings = {};
@@ -1634,16 +1643,16 @@ function pieProc(ctx) {
1634
1643
  if (typeof imForward.retryBackoffMs === "number" && Number.isFinite(imForward.retryBackoffMs)) {
1635
1644
  doc.retryBackoffMs = imForward.retryBackoffMs;
1636
1645
  }
1637
- fs4.writeFileSync(imFile, JSON.stringify(doc, null, " "));
1646
+ fs5.writeFileSync(imFile, JSON.stringify(doc, null, " "));
1638
1647
  }
1639
1648
  }
1640
1649
  }
1641
- fs4.mkdirSync(logDir(), { recursive: true });
1642
- const logFile = fs4.openSync(path4.join(logDir(), `${params.name}.jsonl`), "a");
1650
+ fs5.mkdirSync(logDir(), { recursive: true });
1651
+ const logFile = fs5.openSync(path5.join(logDir(), `${params.name}.jsonl`), "a");
1643
1652
  const modelArgs = [...validatedModel.model ? ["--model", validatedModel.model] : [], ...validatedModel.thinkingLevel ? ["--thinking", validatedModel.thinkingLevel] : []];
1644
1653
  const args = params.kind === "resident" ? [...loaderArgs(), entry, "--json-events", "--idle", "--session-id", sessionId, ...resumeSessionId ? ["--resume-required", "--worker-token", launchToken] : [], ...modelArgs] : [...loaderArgs(), entry, "--session-id", sessionId, ...modelArgs];
1645
- const inheritedIpcRoot = path4.resolve(expandTilde(process.env.PIE_IPC_CONFIG_DIR ?? configDirRoot()));
1646
- const inheritedRegistryRoot = path4.resolve(expandTilde(process.env.PIE_PROC_REGISTRY_ROOT ?? pieProcDir()));
1654
+ const inheritedIpcRoot = path5.resolve(expandTilde(process.env.PIE_IPC_CONFIG_DIR ?? configDirRoot()));
1655
+ const inheritedRegistryRoot = path5.resolve(expandTilde(process.env.PIE_PROC_REGISTRY_ROOT ?? pieProcDir()));
1647
1656
  const { PIE_DEFAULT_PROVIDER: _p, PIE_DEFAULT_MODEL: _m, PIE_MANAGER_BOOTSTRAP: _b, PIE_PROC_CURATED_NAME: _c, ...inheritedEnv } = process.env;
1648
1657
  const childEnv = {
1649
1658
  ...inheritedEnv,
@@ -1677,12 +1686,12 @@ function pieProc(ctx) {
1677
1686
  });
1678
1687
  } finally {
1679
1688
  try {
1680
- fs4.closeSync(logFile);
1689
+ fs5.closeSync(logFile);
1681
1690
  } catch {
1682
1691
  }
1683
1692
  }
1684
1693
  if (typeof child.pid !== "number") {
1685
- throw new Error(`worker spawn failed (no pid) \u2014 see ${path4.join(logDir(), `${params.name}.jsonl`)}`);
1694
+ throw new Error(`worker spawn failed (no pid) \u2014 see ${path5.join(logDir(), `${params.name}.jsonl`)}`);
1686
1695
  }
1687
1696
  child.unref();
1688
1697
  const record = {
@@ -1730,7 +1739,7 @@ function pieProc(ctx) {
1730
1739
  cwd: record.cwd,
1731
1740
  pieDir,
1732
1741
  ipcRoot: inheritedIpcRoot,
1733
- logPath: path4.join(logDir(), `${params.name}.jsonl`),
1742
+ logPath: path5.join(logDir(), `${params.name}.jsonl`),
1734
1743
  ttlMs: params.ttlMs,
1735
1744
  explicitModel: validatedModel.model,
1736
1745
  explicitThinking: validatedModel.thinkingLevel,
@@ -1858,7 +1867,7 @@ function pieProc(ctx) {
1858
1867
  const action = args.action;
1859
1868
  if (action === "list") {
1860
1869
  const snap = readRegistryUncached();
1861
- const ipcRoot = path4.resolve(expandTilde(process.env.PIE_IPC_CONFIG_DIR ?? configDirRoot()));
1870
+ const ipcRoot = path5.resolve(expandTilde(process.env.PIE_IPC_CONFIG_DIR ?? configDirRoot()));
1862
1871
  const rows = snap.workers.map((w) => {
1863
1872
  const model = liveWorkerModelLabel(ipcRoot, w.sessionId, w.pid);
1864
1873
  return { name: w.name, pid: w.pid, session: w.sessionId, cwd: w.cwd, kind: w.kind, ...model ? { model } : {}, status: w.pid === 0 ? `pending (reserver ${w.reserverPid ?? "?"})` : workerLiveness(w), idleSeconds: Math.round((Date.now() - Math.max(w.lastActiveAt, observeActivity(w))) / 1e3), ttlMs: w.kind === "resident" ? w.ttlMs ?? currentConfig().defaultTtlMs : 0, im: Boolean(w.imForward) };
@@ -6,10 +6,10 @@ import {
6
6
  createPlanCapability,
7
7
  markCompletedPlanSteps,
8
8
  restoreExecutionState
9
- } from "../../../chunks/chunk-AKC7NMP4.js";
10
- import "../../../chunks/chunk-SXBX2P5R.js";
11
- import "../../../chunks/chunk-BQWHLYYZ.js";
12
- import "../../../chunks/chunk-G2K4GY6N.js";
9
+ } from "../../../chunks/chunk-EZZTMDWZ.js";
10
+ import "../../../chunks/chunk-JJH77AUU.js";
11
+ import "../../../chunks/chunk-26KRUYZH.js";
12
+ import "../../../chunks/chunk-MCR4JYI6.js";
13
13
  import {
14
14
  Type
15
15
  } from "../../../chunks/chunk-XXGYUYXI.js";
@@ -5,7 +5,7 @@ import {
5
5
  createCliRetryPolicy,
6
6
  formatTransportLifecycle,
7
7
  logTransportLifecycle
8
- } from "../../../chunks/chunk-5MCIBDAM.js";
8
+ } from "../../../chunks/chunk-BOQIGMGQ.js";
9
9
  import {
10
10
  getConfigDir
11
11
  } from "../../../chunks/chunk-CBDQJMUI.js";
@@ -14,10 +14,10 @@ import {
14
14
  createPolicyEnforcedTools,
15
15
  createSharedFileSystemTools,
16
16
  createSubagentCapability
17
- } from "../../../chunks/chunk-AKC7NMP4.js";
18
- import "../../../chunks/chunk-SXBX2P5R.js";
19
- import "../../../chunks/chunk-BQWHLYYZ.js";
20
- import "../../../chunks/chunk-G2K4GY6N.js";
17
+ } from "../../../chunks/chunk-EZZTMDWZ.js";
18
+ import "../../../chunks/chunk-JJH77AUU.js";
19
+ import "../../../chunks/chunk-26KRUYZH.js";
20
+ import "../../../chunks/chunk-MCR4JYI6.js";
21
21
  import "../../../chunks/chunk-XXGYUYXI.js";
22
22
  import "../../../chunks/chunk-LZQXQOPJ.js";
23
23
 
@@ -426,6 +426,7 @@ function subagentExtension(ctx) {
426
426
  const r = ctx.resolveModelClass?.(modelClass);
427
427
  return preserveModelResolution(r);
428
428
  },
429
+ resolveModelClassCandidates: (modelClass) => ctx.resolveModelClassCandidates?.(modelClass) ?? [],
429
430
  resolveModelRef: (modelRef) => {
430
431
  const r = ctx.resolveModelRef?.(modelRef);
431
432
  return preserveModelResolution(r);
@@ -8,10 +8,10 @@ import {
8
8
  executeManageTodoList,
9
9
  executionStateToTodos,
10
10
  restoreExecutionState
11
- } from "../../../chunks/chunk-AKC7NMP4.js";
12
- import "../../../chunks/chunk-SXBX2P5R.js";
13
- import "../../../chunks/chunk-BQWHLYYZ.js";
14
- import "../../../chunks/chunk-G2K4GY6N.js";
11
+ } from "../../../chunks/chunk-EZZTMDWZ.js";
12
+ import "../../../chunks/chunk-JJH77AUU.js";
13
+ import "../../../chunks/chunk-26KRUYZH.js";
14
+ import "../../../chunks/chunk-MCR4JYI6.js";
15
15
  import "../../../chunks/chunk-XXGYUYXI.js";
16
16
  import "../../../chunks/chunk-LZQXQOPJ.js";
17
17
 
@@ -4,7 +4,7 @@ import {
4
4
  disposeModelTransports,
5
5
  streamSimple,
6
6
  validateToolArguments
7
- } from "./chunk-G2K4GY6N.js";
7
+ } from "./chunk-MCR4JYI6.js";
8
8
 
9
9
  // ../../packages/agent-core/src/failure.ts
10
10
  function getAgentFailureMetadata(error) {