@cydm/pie 4.12.1 → 4.13.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 (27) hide show
  1. package/dist/builtin/extensions/ask-user/index.js +1 -1
  2. package/dist/builtin/extensions/cron/index.js +177 -28
  3. package/dist/builtin/extensions/im-forward/index.js +472 -53
  4. package/dist/builtin/extensions/memory/index.js +8 -8
  5. package/dist/builtin/extensions/pie-proc/index.js +7 -7
  6. package/dist/builtin/extensions/plan-mode/index.js +1 -1
  7. package/dist/builtin/extensions/subagent/index.js +5 -5
  8. package/dist/builtin/extensions/todo/index.js +1 -1
  9. package/dist/builtin/skills/chrome-devtools-axi/SKILL.md +15 -6
  10. package/dist/builtin/skills/chrome-devtools-axi/chrome-devtools-axi-bridge.js +163 -14
  11. package/dist/builtin/skills/chrome-devtools-axi/chrome-devtools-axi-runtime.js +1 -1
  12. package/dist/builtin/skills/chrome-devtools-axi/chunk-D2OVVTF6.js +1603 -0
  13. package/dist/builtin/skills/chrome-devtools-axi/{cli-K7ESY3XD.js → cli-DJ36OIQ4.js} +98 -109
  14. package/dist/builtin/skills/computer-use-axi/SKILL.md +11 -7
  15. package/dist/builtin/skills/computer-use-axi/computer-use-axi-broker.js +43 -17
  16. package/dist/chunks/{chunk-QSXBPTOA.js → chunk-3CJLYX5J.js} +4 -4
  17. package/dist/chunks/{chunk-W37NAT3N.js → chunk-5MCIBDAM.js} +5 -5
  18. package/dist/chunks/{chunk-WTBLV6F5.js → chunk-5PCLBIOO.js} +23 -9
  19. package/dist/chunks/{chunk-KW46ND3S.js → chunk-AKC7NMP4.js} +126 -15
  20. package/dist/chunks/{chunk-26ILLZKQ.js → chunk-NOSNHMA2.js} +1 -1
  21. package/dist/chunks/{host-image-fallback-NXY36VO2.js → host-image-fallback-MZK633DK.js} +1 -1
  22. package/dist/chunks/{memory-git-C3S276QJ.js → memory-git-Q3UBYOJ4.js} +2 -2
  23. package/dist/chunks/{read-file-understanding-ZCBNCQHG.js → read-file-understanding-KCJMSOS7.js} +3 -3
  24. package/dist/chunks/{src-7CU7OTQS.js → src-QI47K3W3.js} +1 -1
  25. package/dist/cli.js +48 -48
  26. package/package.json +2 -2
  27. package/dist/builtin/skills/chrome-devtools-axi/chunk-HAUDUMDO.js +0 -795
@@ -16627,7 +16627,30 @@ var WikiStore = class {
16627
16627
  if (!options.isBootstrap && nonIndexCount > limits.maxPagesPerDream) {
16628
16628
  violations.push(`dream update touches ${nonIndexCount} pages (max ${limits.maxPagesPerDream} per run)`);
16629
16629
  }
16630
+ const writtenRelPaths = new Set(normalized.map((u) => u.relPath));
16631
+ const plannedArchives = [];
16632
+ const seenArchive = /* @__PURE__ */ new Set();
16633
+ for (const rawSlug of options.archiveSlugs ?? []) {
16634
+ const cleaned = rawSlug.replace(/^wiki\//, "").replace(/^projects\//, "").replace(/\.md$/, "");
16635
+ if (!SLUG_RE.test(cleaned) || seenArchive.has(cleaned)) continue;
16636
+ const relPath = `projects/${cleaned}.md`;
16637
+ if (writtenRelPaths.has(relPath)) continue;
16638
+ const src = path7.join(this.wikiDir, "projects", `${cleaned}.md`);
16639
+ try {
16640
+ assertNoSymlinkUnderRoot(this.memoryRoot, src);
16641
+ if (!fs5.lstatSync(src).isFile()) continue;
16642
+ } catch {
16643
+ continue;
16644
+ }
16645
+ const content = this.readPage(relPath);
16646
+ if (content && parseWikiFrontmatter(content).pinned) continue;
16647
+ seenArchive.add(cleaned);
16648
+ plannedArchives.push({ slug: cleaned, relPath, src });
16649
+ }
16630
16650
  const activeSet = new Set(this.listActivePages());
16651
+ for (const arch of plannedArchives) {
16652
+ activeSet.delete(arch.relPath);
16653
+ }
16631
16654
  for (const u of normalized) {
16632
16655
  if (!u.relPath.startsWith("archive/")) activeSet.add(u.relPath);
16633
16656
  }
@@ -16657,7 +16680,24 @@ var WikiStore = class {
16657
16680
  return { ok: false, violations: [`staging failed: ${error instanceof Error ? error.message : String(error)}`] };
16658
16681
  }
16659
16682
  const committed = [];
16683
+ const committedArchives = [];
16660
16684
  try {
16685
+ if (plannedArchives.length > 0) {
16686
+ const archiveDir = path7.join(this.wikiDir, "archive");
16687
+ ensureSafeDir(this.memoryRoot, archiveDir);
16688
+ for (const arch of plannedArchives) {
16689
+ let dst = path7.join(archiveDir, `${arch.slug}.md`);
16690
+ for (let n = 2; fs5.existsSync(dst) && n < 100; n += 1) {
16691
+ const candidateSlug = `${arch.slug.slice(0, 44)}-${n}`;
16692
+ dst = path7.join(archiveDir, `${candidateSlug}.md`);
16693
+ }
16694
+ if (fs5.existsSync(dst)) continue;
16695
+ assertNoSymlinkUnderRoot(this.memoryRoot, arch.src);
16696
+ assertNoSymlinkUnderRoot(this.memoryRoot, dst);
16697
+ fs5.renameSync(arch.src, dst);
16698
+ committedArchives.push({ slug: arch.slug, src: arch.src, dst });
16699
+ }
16700
+ }
16661
16701
  for (const s of staged) {
16662
16702
  assertNoSymlinkUnderRoot(this.memoryRoot, s.target);
16663
16703
  fs5.renameSync(s.tmp, s.target);
@@ -16679,11 +16719,23 @@ var WikiStore = class {
16679
16719
  } catch {
16680
16720
  }
16681
16721
  }
16722
+ for (const a of committedArchives.reverse()) {
16723
+ try {
16724
+ assertNoSymlinkUnderRoot(this.memoryRoot, a.dst);
16725
+ assertNoSymlinkUnderRoot(this.memoryRoot, a.src);
16726
+ fs5.renameSync(a.dst, a.src);
16727
+ } catch {
16728
+ }
16729
+ }
16682
16730
  return { ok: false, violations: [`atomic commit failed (rolled back): ${error instanceof Error ? error.message : String(error)}`] };
16683
16731
  }
16684
16732
  const now = options.now ?? Date.now();
16685
16733
  this.writeMeta(options.isBootstrap ? { lastBootstrapAt: now } : { lastDreamAt: now });
16686
- return { ok: true, written: normalized.map((u) => u.relPath) };
16734
+ return {
16735
+ ok: true,
16736
+ written: normalized.map((u) => u.relPath),
16737
+ archived: committedArchives.map((a) => a.slug)
16738
+ };
16687
16739
  }
16688
16740
  /** Move an active project page `projects/<slug>.md` into `archive/<slug>.md`
16689
16741
  * (collision-safe: appends `-2`, `-3`, ... if archive slot already exists;
@@ -17200,7 +17252,7 @@ async function extractDreamSignalsForSession(session, call, projectHint) {
17200
17252
  }
17201
17253
  return authenticateDreamSignals(session, candidates, projectHint?.projectKey);
17202
17254
  }
17203
- async function validateOrRepairUpdates(updates, call, limits) {
17255
+ async function validateOrRepairUpdates(updates, call, limits, options = {}) {
17204
17256
  const checkAll = (batch) => {
17205
17257
  const violations = [];
17206
17258
  for (const u of batch) {
@@ -17226,10 +17278,40 @@ async function validateOrRepairUpdates(updates, call, limits) {
17226
17278
  "Pages to fix:",
17227
17279
  JSON.stringify({ updates }, null, 2)
17228
17280
  ].join("\n");
17281
+ const expectedPaths = /* @__PURE__ */ new Set();
17282
+ for (const u of updates) {
17283
+ const norm = normalizeWikiRelPath(u.path);
17284
+ if (norm) expectedPaths.add(norm);
17285
+ }
17229
17286
  try {
17230
17287
  const repairedRaw = await call(redactText(repairPrompt).text, { system: "You compress wiki markdown strictly under hard line/char budgets. Output JSON only." });
17231
17288
  const repaired = parseWikiDreamOutput(repairedRaw).updates;
17232
- const secondViolations = checkAll(repaired);
17289
+ const repairedPaths = /* @__PURE__ */ new Set();
17290
+ const pathViolations = [];
17291
+ for (const u of repaired) {
17292
+ const norm = normalizeWikiRelPath(u.path);
17293
+ if (!norm) {
17294
+ pathViolations.push(`repair returned invalid wiki path "${u.path}"`);
17295
+ continue;
17296
+ }
17297
+ if (repairedPaths.has(norm)) {
17298
+ pathViolations.push(`repair returned duplicate wiki path "${norm}"`);
17299
+ continue;
17300
+ }
17301
+ repairedPaths.add(norm);
17302
+ if (!options.allowExtraPaths && !expectedPaths.has(norm)) {
17303
+ pathViolations.push(`repair introduced unexpected wiki path "${norm}"`);
17304
+ }
17305
+ }
17306
+ for (const expected of expectedPaths) {
17307
+ if (!repairedPaths.has(expected)) {
17308
+ pathViolations.push(`repair dropped required wiki path "${expected}"`);
17309
+ }
17310
+ }
17311
+ if (updates.length > 0 && repaired.length === 0) {
17312
+ pathViolations.push("repair returned empty updates for nonempty input");
17313
+ }
17314
+ const secondViolations = [...pathViolations, ...checkAll(repaired)];
17233
17315
  if (secondViolations.length === 0) return { ok: true, updates: repaired };
17234
17316
  return { ok: false, violations: secondViolations };
17235
17317
  } catch (error) {
@@ -17363,7 +17445,7 @@ ${j.content}`).join("\n\n") || "(none)"
17363
17445
  if (filtered.length === 0) {
17364
17446
  return { ok: false, written: [], indexTokens: 0, summaries: [], error: "bootstrap returned no wiki pages" };
17365
17447
  }
17366
- const checked = await validateOrRepairUpdates(filtered, deps.balancedCall, limits);
17448
+ const checked = await validateOrRepairUpdates(filtered, deps.balancedCall, limits, { allowExtraPaths: true });
17367
17449
  if (!checked.ok) {
17368
17450
  return { ok: false, written: [], indexTokens: 0, summaries: [], violations: checked.violations, error: "bootstrap updates exceeded anti-bloat limits" };
17369
17451
  }
@@ -17667,6 +17749,7 @@ ${p.content}`).join("\n\n") || "(none yet)"
17667
17749
  }
17668
17750
  let appliedWritten = [];
17669
17751
  let summaries = [];
17752
+ const archived = [];
17670
17753
  if (filtered.length > 0) {
17671
17754
  const checked = await validateOrRepairUpdates(filtered, deps.balancedCall, limits);
17672
17755
  if (!checked.ok) {
@@ -17683,7 +17766,12 @@ ${p.content}`).join("\n\n") || "(none yet)"
17683
17766
  error: "dream updates violated anti-bloat limits"
17684
17767
  };
17685
17768
  }
17686
- const applied = wikiStore.applyWikiUpdates(checked.updates, { isBootstrap: false, limits, now });
17769
+ const applied = wikiStore.applyWikiUpdates(checked.updates, {
17770
+ isBootstrap: false,
17771
+ limits,
17772
+ now,
17773
+ archiveSlugs: archiveCandidates
17774
+ });
17687
17775
  if (!applied.ok) {
17688
17776
  return {
17689
17777
  ok: false,
@@ -17700,13 +17788,17 @@ ${p.content}`).join("\n\n") || "(none yet)"
17700
17788
  }
17701
17789
  appliedWritten = applied.written;
17702
17790
  summaries = checked.updates.map((u) => `${u.path}: ${u.summary ?? "updated"}`);
17703
- }
17704
- const archived = [];
17705
- for (const slug of archiveCandidates) {
17706
- if (wikiStore.archiveProjectPage(slug, { forcePinned: false })) {
17791
+ for (const slug of applied.archived ?? []) {
17707
17792
  archived.push(slug);
17708
17793
  summaries.push(`archived: ${slug}`);
17709
17794
  }
17795
+ } else {
17796
+ for (const slug of archiveCandidates) {
17797
+ if (wikiStore.archiveProjectPage(slug, { forcePinned: false })) {
17798
+ archived.push(slug);
17799
+ summaries.push(`archived: ${slug}`);
17800
+ }
17801
+ }
17710
17802
  }
17711
17803
  wikiStore.rebuildIndex(today, limits);
17712
17804
  persistPartialAndCompleteDates(updatesOverflowed);
@@ -17839,12 +17931,19 @@ function lookupSessionEvidence(store, input) {
17839
17931
  ...hasMore ? { nextOffset } : {}
17840
17932
  };
17841
17933
  }
17934
+ const MAX_SUMMARY_PAGES = 40;
17935
+ const SUMMARY_PAGE_SIZE = 256;
17936
+ const MAX_SUMMARY_WINDOW = MAX_SUMMARY_PAGES * SUMMARY_PAGE_SIZE;
17842
17937
  const headers = [];
17938
+ let truncatedOlder = false;
17843
17939
  const hasSummaries = typeof store.getEntrySummaries === "function";
17844
17940
  if (hasSummaries) {
17845
- let afterSeq;
17846
- for (let pages = 0; pages < 40; pages += 1) {
17847
- const page = store.getEntrySummaries(sessionId, { limit: 256, afterSeq });
17941
+ const probe = store.getEntrySummaries(sessionId, { limit: 1 });
17942
+ const total = typeof probe.total === "number" && Number.isFinite(probe.total) ? probe.total : 0;
17943
+ let afterSeq = total > MAX_SUMMARY_WINDOW ? total - MAX_SUMMARY_WINDOW : void 0;
17944
+ if (afterSeq && afterSeq > 0) truncatedOlder = true;
17945
+ for (let pages = 0; pages < MAX_SUMMARY_PAGES; pages += 1) {
17946
+ const page = store.getEntrySummaries(sessionId, { limit: SUMMARY_PAGE_SIZE, afterSeq });
17848
17947
  for (const s of page.summaries) {
17849
17948
  headers.push({ id: s.id, seq: s.seq, type: s.type, role: s.role, timestamp: s.timestamp });
17850
17949
  }
@@ -17852,8 +17951,11 @@ function lookupSessionEvidence(store, input) {
17852
17951
  afterSeq = page.summaries[page.summaries.length - 1].seq;
17853
17952
  }
17854
17953
  } else {
17954
+ const MAX_ITER_WINDOW = 4e3;
17855
17955
  let afterSeq;
17856
- for (let pages = 0; pages < 40; pages += 1) {
17956
+ let pageCount = 0;
17957
+ while (pageCount < 200) {
17958
+ pageCount += 1;
17857
17959
  const page = store.iterateEntries(sessionId, { limit: 100, afterSeq });
17858
17960
  for (let i = 0; i < page.entries.length; i += 1) {
17859
17961
  const e = page.entries[i];
@@ -17865,6 +17967,10 @@ function lookupSessionEvidence(store, input) {
17865
17967
  timestamp: e.timestamp
17866
17968
  });
17867
17969
  }
17970
+ if (headers.length > MAX_ITER_WINDOW) {
17971
+ headers.splice(0, headers.length - MAX_ITER_WINDOW);
17972
+ truncatedOlder = true;
17973
+ }
17868
17974
  if (!page.hasMore) break;
17869
17975
  afterSeq = page.lastSeq;
17870
17976
  }
@@ -17918,10 +18024,15 @@ function lookupSessionEvidence(store, input) {
17918
18024
  const limit = Math.min(Math.max(1, input.limit ?? 10), 20);
17919
18025
  const items = [];
17920
18026
  let scanned = 0;
17921
- for (let i = headers.length - 1; i >= 0 && scanned < MAX_SEARCH_SCAN && items.length < limit; i -= 1) {
18027
+ let stoppedBeforeOldest = false;
18028
+ for (let i = headers.length - 1; i >= 0; i -= 1) {
17922
18029
  const h = headers[i];
17923
18030
  if (h.type !== "message" && h.type !== "compaction") continue;
17924
18031
  if (h.type === "message" && h.role === "toolResult") continue;
18032
+ if (scanned >= MAX_SEARCH_SCAN || items.length >= limit) {
18033
+ stoppedBeforeOldest = true;
18034
+ break;
18035
+ }
17925
18036
  scanned += 1;
17926
18037
  const entry = store.readEntry(sessionId, h.id);
17927
18038
  if (!entry) continue;
@@ -17938,7 +18049,7 @@ function lookupSessionEvidence(store, input) {
17938
18049
  ...base,
17939
18050
  ok: true,
17940
18051
  items,
17941
- hasMore: headers.length > scanned && items.length === 0,
18052
+ hasMore: stoppedBeforeOldest || truncatedOlder,
17942
18053
  scanned
17943
18054
  };
17944
18055
  }
@@ -1,7 +1,7 @@
1
1
  import { createRequire as __createRequire } from "node:module"; const require = __createRequire(import.meta.url);
2
2
  import {
3
3
  redactText
4
- } from "./chunk-KW46ND3S.js";
4
+ } from "./chunk-AKC7NMP4.js";
5
5
 
6
6
  // src/commands/memory-git.ts
7
7
  import { execFileSync } from "node:child_process";
@@ -5,7 +5,7 @@ import "./chunk-LZQXQOPJ.js";
5
5
  import * as os from "node:os";
6
6
  async function describeImageViaUnderstandingChain(options) {
7
7
  try {
8
- const { understandReadFile } = await import("./read-file-understanding-ZCBNCQHG.js");
8
+ const { understandReadFile } = await import("./read-file-understanding-KCJMSOS7.js");
9
9
  const ext = options.filePath.toLowerCase().split(".").pop() ?? "";
10
10
  const mimeType = ext === "png" ? "image/png" : ext === "gif" ? "image/gif" : ext === "webp" ? "image/webp" : "image/jpeg";
11
11
  const result = await understandReadFile(
@@ -4,8 +4,8 @@ import {
4
4
  ensureMemoryGitIgnore,
5
5
  isMemoryGitInitialized,
6
6
  readCuratedMemoryGitLog
7
- } from "./chunk-26ILLZKQ.js";
8
- import "./chunk-KW46ND3S.js";
7
+ } from "./chunk-NOSNHMA2.js";
8
+ import "./chunk-AKC7NMP4.js";
9
9
  import "./chunk-SXBX2P5R.js";
10
10
  import "./chunk-BQWHLYYZ.js";
11
11
  import "./chunk-G2K4GY6N.js";
@@ -1,11 +1,11 @@
1
1
  import { createRequire as __createRequire } from "node:module"; const require = __createRequire(import.meta.url);
2
2
  import {
3
3
  understandReadFile
4
- } from "./chunk-QSXBPTOA.js";
5
- import "./chunk-KW46ND3S.js";
4
+ } from "./chunk-3CJLYX5J.js";
5
+ import "./chunk-F7EBZTZO.js";
6
+ import "./chunk-AKC7NMP4.js";
6
7
  import "./chunk-SXBX2P5R.js";
7
8
  import "./chunk-BQWHLYYZ.js";
8
- import "./chunk-F7EBZTZO.js";
9
9
  import "./chunk-G2K4GY6N.js";
10
10
  import "./chunk-XXGYUYXI.js";
11
11
  import "./chunk-LZQXQOPJ.js";
@@ -221,7 +221,7 @@ import {
221
221
  understandFileWithModel,
222
222
  validateTodos,
223
223
  validateWikiPageContent
224
- } from "./chunk-KW46ND3S.js";
224
+ } from "./chunk-AKC7NMP4.js";
225
225
  import "./chunk-SXBX2P5R.js";
226
226
  import "./chunk-BQWHLYYZ.js";
227
227
  import {
package/dist/cli.js CHANGED
@@ -19,7 +19,25 @@ import {
19
19
  normalizeFileManagerPlatform,
20
20
  resolvePath,
21
21
  understandReadFile
22
- } from "./chunks/chunk-QSXBPTOA.js";
22
+ } from "./chunks/chunk-3CJLYX5J.js";
23
+ import {
24
+ CLI_RETRY_MAX_RETRIES,
25
+ classifyCliFailure,
26
+ cleanupBashOutputArtifacts,
27
+ createBashTool,
28
+ createCliHostCapabilities,
29
+ createCliRetryPolicy,
30
+ createCliWebResearchHealthStore,
31
+ createTraceTransportSink,
32
+ createTransportDiagnosticsStreamFn,
33
+ formatSize,
34
+ isCliContextOverflowError,
35
+ isCliRetryableError,
36
+ logTransportLifecycle,
37
+ setYoloGrantListener,
38
+ truncateHeadTail
39
+ } from "./chunks/chunk-5MCIBDAM.js";
40
+ import "./chunks/chunk-F7EBZTZO.js";
23
41
  import {
24
42
  MEMORY_DISTILL_RETRYABLE_EXIT_CODE,
25
43
  acquireDistillLock,
@@ -34,29 +52,37 @@ import {
34
52
  runDistillWorkerMain,
35
53
  spawnDistillAutoWorker,
36
54
  spawnDistillWorker
37
- } from "./chunks/chunk-WTBLV6F5.js";
55
+ } from "./chunks/chunk-5PCLBIOO.js";
38
56
  import {
39
57
  commitCuratedMemoryBestEffort,
40
58
  isMemoryGitInitialized,
41
59
  readCuratedMemoryGitLog
42
- } from "./chunks/chunk-26ILLZKQ.js";
60
+ } from "./chunks/chunk-NOSNHMA2.js";
43
61
  import {
44
- CLI_RETRY_MAX_RETRIES,
45
- classifyCliFailure,
46
- cleanupBashOutputArtifacts,
47
- createBashTool,
48
- createCliHostCapabilities,
49
- createCliRetryPolicy,
50
- createCliWebResearchHealthStore,
51
- createTraceTransportSink,
52
- createTransportDiagnosticsStreamFn,
53
- formatSize,
54
- isCliContextOverflowError,
55
- isCliRetryableError,
56
- logTransportLifecycle,
57
- setYoloGrantListener,
58
- truncateHeadTail
59
- } from "./chunks/chunk-W37NAT3N.js";
62
+ SessionOwnershipLifecycle,
63
+ claimSessionOwnership,
64
+ liveSessionHolder,
65
+ sessionOwnerAlive
66
+ } from "./chunks/chunk-Q5PSWX3B.js";
67
+ import "./chunks/chunk-Q4NJEPIZ.js";
68
+ import {
69
+ ModelRegistry
70
+ } from "./chunks/chunk-IZ4DYCJ7.js";
71
+ import {
72
+ VERSION,
73
+ getAgentDir,
74
+ getBuiltinDir,
75
+ getConfigDir,
76
+ getCustomThemesDir,
77
+ getLogsDir,
78
+ getPackageDir,
79
+ getProjectSettingsPath,
80
+ getRuntimeLogPath,
81
+ getSessionsDir,
82
+ getSettingsPath,
83
+ getThemesDir,
84
+ migrateConfigFromAgentDir
85
+ } from "./chunks/chunk-CBDQJMUI.js";
60
86
  import {
61
87
  BUILTIN_TOOL_CAPABILITY_METADATA,
62
88
  DEFAULT_WIKI_LIMITS,
@@ -90,7 +116,7 @@ import {
90
116
  shouldPreserveExecutionStateForUserText,
91
117
  supersedeExecutionState,
92
118
  todayKey
93
- } from "./chunks/chunk-KW46ND3S.js";
119
+ } from "./chunks/chunk-AKC7NMP4.js";
94
120
  import {
95
121
  AGENTS_CONTEXT_FILE_NAME,
96
122
  AgentSessionController,
@@ -132,32 +158,6 @@ import {
132
158
  verifyPreparedCompactionCommit
133
159
  } from "./chunks/chunk-SXBX2P5R.js";
134
160
  import "./chunks/chunk-BQWHLYYZ.js";
135
- import "./chunks/chunk-F7EBZTZO.js";
136
- import {
137
- SessionOwnershipLifecycle,
138
- claimSessionOwnership,
139
- liveSessionHolder,
140
- sessionOwnerAlive
141
- } from "./chunks/chunk-Q5PSWX3B.js";
142
- import "./chunks/chunk-Q4NJEPIZ.js";
143
- import {
144
- ModelRegistry
145
- } from "./chunks/chunk-IZ4DYCJ7.js";
146
- import {
147
- VERSION,
148
- getAgentDir,
149
- getBuiltinDir,
150
- getConfigDir,
151
- getCustomThemesDir,
152
- getLogsDir,
153
- getPackageDir,
154
- getProjectSettingsPath,
155
- getRuntimeLogPath,
156
- getSessionsDir,
157
- getSettingsPath,
158
- getThemesDir,
159
- migrateConfigFromAgentDir
160
- } from "./chunks/chunk-CBDQJMUI.js";
161
161
  import {
162
162
  ALL_THINKING_LEVELS,
163
163
  Deref,
@@ -82624,7 +82624,7 @@ var InteractiveMode = class {
82624
82624
  /** Live mention handler for extension-driven attachments (duck-typed onto
82625
82625
  * InteractiveExtensionLoaderHost); undefined while attachments init. */
82626
82626
  async describeImageFile(filePath, displayName) {
82627
- const { describeImageViaUnderstandingChain } = await import("./chunks/host-image-fallback-NXY36VO2.js");
82627
+ const { describeImageViaUnderstandingChain } = await import("./chunks/host-image-fallback-MZK633DK.js");
82628
82628
  return describeImageViaUnderstandingChain({ modelRegistry: this.options.modelRegistry, getAgentModel: () => this.agent?.state.model, filePath, displayName });
82629
82629
  }
82630
82630
  activeModelInputs() {
@@ -84609,7 +84609,7 @@ async function loadJsonModeExtensions(params) {
84609
84609
  }
84610
84610
  async function describeImageViaUnderstanding(params, filePath, displayName) {
84611
84611
  try {
84612
- const { understandReadFile: understandReadFile2 } = await import("./chunks/read-file-understanding-ZCBNCQHG.js");
84612
+ const { understandReadFile: understandReadFile2 } = await import("./chunks/read-file-understanding-KCJMSOS7.js");
84613
84613
  const ext = filePath.toLowerCase().split(".").pop() ?? "";
84614
84614
  const mime = ext === "png" ? "image/png" : ext === "gif" ? "image/gif" : ext === "webp" ? "image/webp" : "image/jpeg";
84615
84615
  const agentModel = params.getAgent?.()?.state?.model;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cydm/pie",
3
- "version": "4.12.1",
3
+ "version": "4.13.0",
4
4
  "description": "Pie AI Agent CLI",
5
5
  "type": "module",
6
6
  "bin": {
@@ -20,7 +20,7 @@
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: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-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: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-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",
24
24
  "test:all": "npm run test:offline && npm run test:terminal:vitest",
25
25
  "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",
26
26
  "test:ipc:tui": "node ../../scripts/run-with-env.mjs PIE_REAL_IPC_TUI=1 -- --test --import tsx test/pie-ipc-host.terminal.test.ts",