@inerrata-corporation/errata 2.0.22-dev.4054 → 2.0.22-dev.4068

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/errata.mjs CHANGED
@@ -34182,18 +34182,26 @@ var init_recall_signal = __esm({
34182
34182
  // src/session-registry.ts
34183
34183
  import { existsSync as existsSync8, readFileSync as readFileSync6, realpathSync, writeFileSync as writeFileSync7 } from "node:fs";
34184
34184
  import { tmpdir as tmpdir2 } from "node:os";
34185
- import { resolve } from "node:path";
34185
+ import { basename as basename2, dirname as dirname6, resolve } from "node:path";
34186
34186
  function shipsFromWorkspace(root, env2 = process.env) {
34187
34187
  return Boolean(env2["VITEST"]) || !isScratchWorkspace(root);
34188
34188
  }
34189
34189
  function isScratchWorkspace(root, tmp = tmpdir2()) {
34190
34190
  const norm = (p) => {
34191
- let real = p;
34191
+ let cursor = resolve(p);
34192
+ const suffix = [];
34193
+ while (!existsSync8(cursor)) {
34194
+ const parent = dirname6(cursor);
34195
+ if (parent === cursor) break;
34196
+ suffix.unshift(basename2(cursor));
34197
+ cursor = parent;
34198
+ }
34192
34199
  try {
34193
- real = realpathSync.native(p);
34200
+ cursor = resolve(realpathSync.native(cursor), ...suffix);
34194
34201
  } catch {
34202
+ cursor = resolve(p);
34195
34203
  }
34196
- return resolve(real).replace(/\\/g, "/").replace(/\/+$/, "").toLowerCase();
34204
+ return cursor.replace(/\\/g, "/").replace(/\/+$/, "").toLowerCase();
34197
34205
  };
34198
34206
  const r = norm(root);
34199
34207
  const t = norm(tmp);
@@ -34665,12 +34673,12 @@ var init_identity2 = __esm({
34665
34673
 
34666
34674
  // src/checkout-root.ts
34667
34675
  import { existsSync as existsSync12, readFileSync as readFileSync10 } from "node:fs";
34668
- import { basename as basename2, dirname as dirname6, isAbsolute as isAbsolute3, join as join10, resolve as resolve3 } from "node:path";
34676
+ import { basename as basename3, dirname as dirname7, isAbsolute as isAbsolute3, join as join10, resolve as resolve3 } from "node:path";
34669
34677
  function nearestGitRoot(dir) {
34670
34678
  let cur = resolve3(dir);
34671
34679
  for (; ; ) {
34672
34680
  if (existsSync12(join10(cur, ".git"))) return cur;
34673
- const parent = dirname6(cur);
34681
+ const parent = dirname7(cur);
34674
34682
  if (parent === cur) return null;
34675
34683
  cur = parent;
34676
34684
  }
@@ -34687,8 +34695,8 @@ function mainCheckoutOfWorktree(root) {
34687
34695
  return null;
34688
34696
  }
34689
34697
  const commonDir = resolve3(isAbsolute3(common) ? common : resolve3(gitDir, common));
34690
- if (basename2(commonDir) !== ".git") return null;
34691
- const main2 = dirname6(commonDir);
34698
+ if (basename3(commonDir) !== ".git") return null;
34699
+ const main2 = dirname7(commonDir);
34692
34700
  return existsSync12(join10(main2, ".git")) ? main2 : null;
34693
34701
  }
34694
34702
  function checkoutRootOf(cwd) {
@@ -35776,26 +35784,26 @@ function buildFileLexicon(store) {
35776
35784
  for (const n of store.findNodeFieldsByLabel("File", ["relPath"])) {
35777
35785
  const relPath = typeof n.attrs["relPath"] === "string" && n.attrs["relPath"].length > 0 ? n.attrs["relPath"] : n.description;
35778
35786
  if (!relPath) continue;
35779
- const basename9 = relPath.split("/").pop();
35780
- if (!basename9.includes(".")) continue;
35781
- entries.push({ relPath, basename: basename9 });
35782
- basenameCount.set(basename9, (basenameCount.get(basename9) ?? 0) + 1);
35783
- const stem = basename9.slice(0, basename9.indexOf("."));
35787
+ const basename10 = relPath.split("/").pop();
35788
+ if (!basename10.includes(".")) continue;
35789
+ entries.push({ relPath, basename: basename10 });
35790
+ basenameCount.set(basename10, (basenameCount.get(basename10) ?? 0) + 1);
35791
+ const stem = basename10.slice(0, basename10.indexOf("."));
35784
35792
  if (isBareMatchableStem(stem)) {
35785
35793
  let s = stemRelPaths.get(stem);
35786
35794
  if (!s) stemRelPaths.set(stem, s = /* @__PURE__ */ new Set());
35787
35795
  s.add(relPath);
35788
35796
  }
35789
35797
  }
35790
- for (const { relPath, basename: basename9 } of entries) {
35798
+ for (const { relPath, basename: basename10 } of entries) {
35791
35799
  const entry = { relPath };
35792
- if (relPath !== basename9) byKey.set(relPath, entry);
35793
- const conventional = CONVENTION_FILENAMES.has(basename9) || (basenameCount.get(basename9) ?? 0) >= CONVENTION_BASENAME_MIN_FILES;
35794
- if (!conventional && !byKey.has(basename9)) byKey.set(basename9, entry);
35795
- const list = byBasename.get(basename9);
35800
+ if (relPath !== basename10) byKey.set(relPath, entry);
35801
+ const conventional = CONVENTION_FILENAMES.has(basename10) || (basenameCount.get(basename10) ?? 0) >= CONVENTION_BASENAME_MIN_FILES;
35802
+ if (!conventional && !byKey.has(basename10)) byKey.set(basename10, entry);
35803
+ const list = byBasename.get(basename10);
35796
35804
  if (list) list.push(entry);
35797
- else byBasename.set(basename9, [entry]);
35798
- const stem = basename9.slice(0, basename9.indexOf("."));
35805
+ else byBasename.set(basename10, [entry]);
35806
+ const stem = basename10.slice(0, basename10.indexOf("."));
35799
35807
  if (isBareMatchableStem(stem) && !CONVENTION_STEMS.has(stem) && !byStem.has(stem)) {
35800
35808
  const dirStems = new Set(
35801
35809
  [...stemRelPaths.get(stem) ?? []].map((p) => {
@@ -35812,8 +35820,8 @@ function resolveFileToken(token, lexicon) {
35812
35820
  const exact = lexicon.byKey.get(token);
35813
35821
  if (exact) return exact;
35814
35822
  if (!token.includes("/")) return null;
35815
- const basename9 = token.split("/").pop();
35816
- for (const entry of lexicon.byBasename.get(basename9) ?? []) {
35823
+ const basename10 = token.split("/").pop();
35824
+ for (const entry of lexicon.byBasename.get(basename10) ?? []) {
35817
35825
  if (entry.relPath === token || entry.relPath.endsWith(`/${token}`)) return entry;
35818
35826
  }
35819
35827
  return null;
@@ -35838,9 +35846,9 @@ function fileRolePhrase(relPath, level = 1) {
35838
35846
  return "a source file";
35839
35847
  }
35840
35848
  function isSourceFileToken(token) {
35841
- const basename9 = token.split(/[/\\]/).pop() ?? token;
35842
- if (CONVENTION_FILENAMES.has(basename9)) return false;
35843
- const ext = basename9.split(".").pop();
35849
+ const basename10 = token.split(/[/\\]/).pop() ?? token;
35850
+ if (CONVENTION_FILENAMES.has(basename10)) return false;
35851
+ const ext = basename10.split(".").pop();
35844
35852
  return ext !== void 0 && SOURCE_EXTENSIONS.has(ext.toLowerCase());
35845
35853
  }
35846
35854
  function generalizeFileRefs(text, fileLexicon, level = 1) {
@@ -42394,18 +42402,18 @@ ${JSON.stringify(symbolNames, null, 2)}`);
42394
42402
 
42395
42403
  // ../../packages/indexer/src/languages/tree-sitter-loader.ts
42396
42404
  import { fileURLToPath } from "node:url";
42397
- import { dirname as dirname7, join as join14 } from "node:path";
42405
+ import { dirname as dirname8, join as join14 } from "node:path";
42398
42406
  import { existsSync as existsSync16, readdirSync as readdirSync3 } from "node:fs";
42399
42407
  import { createRequire as createRequire2 } from "node:module";
42400
42408
  function entryDir() {
42401
42409
  try {
42402
42410
  const url2 = import.meta?.url;
42403
42411
  if (typeof url2 === "string" && url2.length > 0) {
42404
- return dirname7(fileURLToPath(url2));
42412
+ return dirname8(fileURLToPath(url2));
42405
42413
  }
42406
42414
  } catch {
42407
42415
  }
42408
- return dirname7(process.execPath);
42416
+ return dirname8(process.execPath);
42409
42417
  }
42410
42418
  function findWasmDir() {
42411
42419
  const here = entryDir();
@@ -42421,7 +42429,7 @@ function findWasmDir() {
42421
42429
  "wasm"
42422
42430
  );
42423
42431
  if (existsSync16(join14(flat, "tree-sitter-typescript.wasm"))) return flat;
42424
- dir = dirname7(dir);
42432
+ dir = dirname8(dir);
42425
42433
  }
42426
42434
  let root = here;
42427
42435
  for (let i2 = 0; i2 < 6; i2++) {
@@ -42443,7 +42451,7 @@ function findWasmDir() {
42443
42451
  }
42444
42452
  }
42445
42453
  }
42446
- root = dirname7(root);
42454
+ root = dirname8(root);
42447
42455
  }
42448
42456
  throw new Error(
42449
42457
  "@vscode/tree-sitter-wasm grammar files not found \u2014 is the package installed?"
@@ -42457,7 +42465,7 @@ function findRuntimeDir() {
42457
42465
  for (let i2 = 0; i2 < 6; i2++) {
42458
42466
  const flat = join14(dir, "node_modules", "web-tree-sitter");
42459
42467
  if (existsSync16(join14(flat, "web-tree-sitter.wasm"))) return flat;
42460
- dir = dirname7(dir);
42468
+ dir = dirname8(dir);
42461
42469
  }
42462
42470
  let root = here;
42463
42471
  for (let i2 = 0; i2 < 6; i2++) {
@@ -42477,7 +42485,7 @@ function findRuntimeDir() {
42477
42485
  }
42478
42486
  }
42479
42487
  }
42480
- root = dirname7(root);
42488
+ root = dirname8(root);
42481
42489
  }
42482
42490
  throw new Error("web-tree-sitter runtime WASM not found");
42483
42491
  }
@@ -76242,8 +76250,8 @@ init_lock();
76242
76250
 
76243
76251
  // src/engine.ts
76244
76252
  import { execFileSync as execFileSync5 } from "node:child_process";
76245
- import { existsSync as existsSync28, statSync as statSync9, appendFileSync as appendFileSync4, readdirSync as readdirSync10, renameSync as renameSync4, readFileSync as readFileSync32, writeFileSync as writeFileSync23 } from "node:fs";
76246
- import { basename as basename7, join as join35, relative as relative6, sep as sep4 } from "node:path";
76253
+ import { existsSync as existsSync28, statSync as statSync9, appendFileSync as appendFileSync4, readdirSync as readdirSync11, renameSync as renameSync4, readFileSync as readFileSync32, writeFileSync as writeFileSync23 } from "node:fs";
76254
+ import { basename as basename8, join as join35, relative as relative7, sep as sep4 } from "node:path";
76247
76255
 
76248
76256
  // src/coalesced-file-pass.ts
76249
76257
  function createCoalescedFilePass(delayMs, run3, onError) {
@@ -76287,8 +76295,8 @@ function createCoalescedFilePass(delayMs, run3, onError) {
76287
76295
 
76288
76296
  // src/source-watcher.ts
76289
76297
  import { EventEmitter as EventEmitter2 } from "node:events";
76290
- import { statSync as statSync6, watch as watch2 } from "node:fs";
76291
- import { join as join20 } from "node:path";
76298
+ import { readdirSync as readdirSync6, statSync as statSync6, watch as watch2 } from "node:fs";
76299
+ import { isAbsolute as isAbsolute5, join as join20, relative as relative6 } from "node:path";
76292
76300
 
76293
76301
  // ../../node_modules/.pnpm/chokidar@4.0.3/node_modules/chokidar/esm/index.js
76294
76302
  import { stat as statcb } from "fs";
@@ -76443,10 +76451,10 @@ var ReaddirpStream = class extends Readable2 {
76443
76451
  }
76444
76452
  async _formatEntry(dirent, path3) {
76445
76453
  let entry;
76446
- const basename9 = this._isDirent ? dirent.name : dirent;
76454
+ const basename10 = this._isDirent ? dirent.name : dirent;
76447
76455
  try {
76448
- const fullPath = presolve(pjoin(path3, basename9));
76449
- entry = { path: prelative(this._root, fullPath), fullPath, basename: basename9 };
76456
+ const fullPath = presolve(pjoin(path3, basename10));
76457
+ entry = { path: prelative(this._root, fullPath), fullPath, basename: basename10 };
76450
76458
  entry[this._statsProp] = this._isDirent ? dirent : await this._stat(fullPath);
76451
76459
  } catch (err2) {
76452
76460
  this._onError(err2);
@@ -76985,9 +76993,9 @@ var NodeFsHandler = class {
76985
76993
  _watchWithNodeFs(path3, listener) {
76986
76994
  const opts = this.fsw.options;
76987
76995
  const directory = sysPath.dirname(path3);
76988
- const basename9 = sysPath.basename(path3);
76996
+ const basename10 = sysPath.basename(path3);
76989
76997
  const parent = this.fsw._getWatchedDir(directory);
76990
- parent.add(basename9);
76998
+ parent.add(basename10);
76991
76999
  const absolutePath = sysPath.resolve(path3);
76992
77000
  const options = {
76993
77001
  persistent: opts.persistent
@@ -76997,7 +77005,7 @@ var NodeFsHandler = class {
76997
77005
  let closer;
76998
77006
  if (opts.usePolling) {
76999
77007
  const enableBin = opts.interval !== opts.binaryInterval;
77000
- options.interval = enableBin && isBinaryPath(basename9) ? opts.binaryInterval : opts.interval;
77008
+ options.interval = enableBin && isBinaryPath(basename10) ? opts.binaryInterval : opts.interval;
77001
77009
  closer = setFsWatchFileListener(path3, absolutePath, options, {
77002
77010
  listener,
77003
77011
  rawEmitter: this.fsw._emitRaw
@@ -77019,11 +77027,11 @@ var NodeFsHandler = class {
77019
77027
  if (this.fsw.closed) {
77020
77028
  return;
77021
77029
  }
77022
- const dirname16 = sysPath.dirname(file2);
77023
- const basename9 = sysPath.basename(file2);
77024
- const parent = this.fsw._getWatchedDir(dirname16);
77030
+ const dirname17 = sysPath.dirname(file2);
77031
+ const basename10 = sysPath.basename(file2);
77032
+ const parent = this.fsw._getWatchedDir(dirname17);
77025
77033
  let prevStats = stats;
77026
- if (parent.has(basename9))
77034
+ if (parent.has(basename10))
77027
77035
  return;
77028
77036
  const listener = async (path3, newStats) => {
77029
77037
  if (!this.fsw._throttle(THROTTLE_MODE_WATCH, file2, 5))
@@ -77048,9 +77056,9 @@ var NodeFsHandler = class {
77048
77056
  prevStats = newStats2;
77049
77057
  }
77050
77058
  } catch (error48) {
77051
- this.fsw._remove(dirname16, basename9);
77059
+ this.fsw._remove(dirname17, basename10);
77052
77060
  }
77053
- } else if (parent.has(basename9)) {
77061
+ } else if (parent.has(basename10)) {
77054
77062
  const at = newStats.atimeMs;
77055
77063
  const mt = newStats.mtimeMs;
77056
77064
  if (!at || at <= mt || mt !== prevStats.mtimeMs) {
@@ -77297,11 +77305,11 @@ function createPattern(matcher) {
77297
77305
  if (matcher.path === string4)
77298
77306
  return true;
77299
77307
  if (matcher.recursive) {
77300
- const relative8 = sysPath2.relative(matcher.path, string4);
77301
- if (!relative8) {
77308
+ const relative9 = sysPath2.relative(matcher.path, string4);
77309
+ if (!relative9) {
77302
77310
  return false;
77303
77311
  }
77304
- return !relative8.startsWith("..") && !sysPath2.isAbsolute(relative8);
77312
+ return !relative9.startsWith("..") && !sysPath2.isAbsolute(relative9);
77305
77313
  }
77306
77314
  return false;
77307
77315
  };
@@ -78009,6 +78017,7 @@ var NativeSourceWatcher = class extends EventEmitter2 {
78009
78017
  }
78010
78018
  handles = /* @__PURE__ */ new Map();
78011
78019
  pending = /* @__PURE__ */ new Map();
78020
+ rescans = /* @__PURE__ */ new Map();
78012
78021
  known = /* @__PURE__ */ new Set();
78013
78022
  closed = false;
78014
78023
  add(target) {
@@ -78022,18 +78031,27 @@ var NativeSourceWatcher = class extends EventEmitter2 {
78022
78031
  try {
78023
78032
  const h = watch2(target, { recursive: isDir, persistent: true }, (event, name2) => {
78024
78033
  const path3 = isDir ? name2 ? join20(target, name2.toString()) : null : target;
78025
- if (!path3) return;
78034
+ if (!path3) {
78035
+ this.emit("raw", event, target, { watchedPath: target, filenameMissing: true });
78036
+ this.scheduleReconcile(target, isDir);
78037
+ return;
78038
+ }
78026
78039
  this.emit("raw", event, path3, { watchedPath: target });
78027
78040
  if (!this.ignored(path3)) this.schedule(path3, event === "rename");
78028
78041
  });
78029
78042
  h.on("error", () => this.unwatch(target));
78030
78043
  this.handles.set(target, h);
78044
+ this.seedKnown(target, isDir);
78045
+ this.scheduleReconcile(target, isDir);
78031
78046
  } catch {
78032
78047
  }
78033
78048
  }
78034
78049
  unwatch(target) {
78035
78050
  this.handles.get(target)?.close();
78036
78051
  this.handles.delete(target);
78052
+ const rescan = this.rescans.get(target);
78053
+ if (rescan) clearTimeout(rescan);
78054
+ this.rescans.delete(target);
78037
78055
  }
78038
78056
  async close() {
78039
78057
  this.closed = true;
@@ -78041,6 +78059,8 @@ var NativeSourceWatcher = class extends EventEmitter2 {
78041
78059
  this.handles.clear();
78042
78060
  for (const p of this.pending.values()) clearTimeout(p.timer);
78043
78061
  this.pending.clear();
78062
+ for (const timer of this.rescans.values()) clearTimeout(timer);
78063
+ this.rescans.clear();
78044
78064
  }
78045
78065
  schedule(path3, renamed) {
78046
78066
  const prev = this.pending.get(path3);
@@ -78051,6 +78071,51 @@ var NativeSourceWatcher = class extends EventEmitter2 {
78051
78071
  }, SETTLE_MS);
78052
78072
  this.pending.set(path3, { timer, renamed: renamed || (prev?.renamed ?? false) });
78053
78073
  }
78074
+ seedKnown(target, isDir) {
78075
+ for (const path3 of this.filesUnder(target, isDir)) this.known.add(path3);
78076
+ }
78077
+ filesUnder(target, isDir) {
78078
+ const files = /* @__PURE__ */ new Set();
78079
+ if (!isDir) {
78080
+ if (!this.ignored(target)) files.add(target);
78081
+ return files;
78082
+ }
78083
+ try {
78084
+ for (const entry of readdirSync6(target, { recursive: true, withFileTypes: true })) {
78085
+ if (!entry.isFile()) continue;
78086
+ const path3 = join20(entry.parentPath, entry.name);
78087
+ if (!this.ignored(path3)) files.add(path3);
78088
+ }
78089
+ } catch {
78090
+ }
78091
+ return files;
78092
+ }
78093
+ scheduleReconcile(target, isDir) {
78094
+ const previous = this.rescans.get(target);
78095
+ if (previous) clearTimeout(previous);
78096
+ const timer = setTimeout(() => {
78097
+ this.rescans.delete(target);
78098
+ if (this.closed || !this.handles.has(target)) return;
78099
+ const current = this.filesUnder(target, isDir);
78100
+ const belongsToTarget = (path3) => {
78101
+ const rel = relative6(target, path3);
78102
+ return rel === "" || !rel.startsWith("..") && !isAbsolute5(rel);
78103
+ };
78104
+ for (const path3 of [...this.known]) {
78105
+ if (belongsToTarget(path3) && !current.has(path3)) {
78106
+ this.known.delete(path3);
78107
+ this.emit("unlink", path3);
78108
+ }
78109
+ }
78110
+ for (const path3 of current) {
78111
+ if (!this.known.has(path3)) {
78112
+ this.known.add(path3);
78113
+ this.emit("add", path3);
78114
+ }
78115
+ }
78116
+ }, SETTLE_MS);
78117
+ this.rescans.set(target, timer);
78118
+ }
78054
78119
  classify(path3, renamed) {
78055
78120
  if (this.closed) return;
78056
78121
  let isFile;
@@ -78510,8 +78575,8 @@ init_review2();
78510
78575
 
78511
78576
  // src/turn.ts
78512
78577
  init_checkout_root();
78513
- import { closeSync as closeSync2, existsSync as existsSync19, fstatSync, openSync as openSync2, readdirSync as readdirSync6, readSync as readSync2, realpathSync as realpathSync2, statSync as statSync7 } from "node:fs";
78514
- import { basename as basename5, delimiter, dirname as dirname10, join as join21, normalize as normalize3 } from "node:path";
78578
+ import { closeSync as closeSync2, existsSync as existsSync19, fstatSync, openSync as openSync2, readdirSync as readdirSync7, readSync as readSync2, realpathSync as realpathSync2, statSync as statSync7 } from "node:fs";
78579
+ import { basename as basename6, delimiter, dirname as dirname11, join as join21, normalize as normalize3 } from "node:path";
78515
78580
  import { homedir as homedir4 } from "node:os";
78516
78581
  import { createHash as createHash16 } from "node:crypto";
78517
78582
  function completeJsonlPrefix(buf) {
@@ -78906,7 +78971,7 @@ function recentTranscripts(cwd, opts = {}) {
78906
78971
  if (!existsSync19(dir)) return [];
78907
78972
  let names;
78908
78973
  try {
78909
- names = readdirSync6(dir);
78974
+ names = readdirSync7(dir);
78910
78975
  } catch {
78911
78976
  return [];
78912
78977
  }
@@ -78922,18 +78987,18 @@ function recentTranscripts(cwd, opts = {}) {
78922
78987
  continue;
78923
78988
  }
78924
78989
  if (mtimeMs < since) continue;
78925
- refs.push({ path: path3, sessionId: basename5(name2, ".jsonl"), mtimeMs });
78990
+ refs.push({ path: path3, sessionId: basename6(name2, ".jsonl"), mtimeMs });
78926
78991
  }
78927
78992
  refs.sort((a, b) => b.mtimeMs - a.mtimeMs);
78928
78993
  return opts.limit ? refs.slice(0, opts.limit) : refs;
78929
78994
  }
78930
78995
  function subagentTranscripts(mainTranscriptPath, sessionId) {
78931
78996
  if (!mainTranscriptPath || !sessionId) return [];
78932
- const dir = join21(dirname10(mainTranscriptPath), sessionId, "subagents");
78997
+ const dir = join21(dirname11(mainTranscriptPath), sessionId, "subagents");
78933
78998
  if (!existsSync19(dir)) return [];
78934
78999
  let names;
78935
79000
  try {
78936
- names = readdirSync6(dir);
79001
+ names = readdirSync7(dir);
78937
79002
  } catch {
78938
79003
  return [];
78939
79004
  }
@@ -78947,7 +79012,7 @@ function subagentTranscripts(mainTranscriptPath, sessionId) {
78947
79012
  } catch {
78948
79013
  continue;
78949
79014
  }
78950
- refs.push({ path: path3, sessionId: basename5(name2, ".jsonl"), mtimeMs });
79015
+ refs.push({ path: path3, sessionId: basename6(name2, ".jsonl"), mtimeMs });
78951
79016
  }
78952
79017
  refs.sort((a, b) => b.mtimeMs - a.mtimeMs);
78953
79018
  return refs;
@@ -78964,9 +79029,9 @@ function codexSessionRoots(env2 = process.env, home = homedir4()) {
78964
79029
  return [...roots];
78965
79030
  }
78966
79031
  function readCodexRolloutIdentity(path3) {
78967
- const legacy = `codex:${basename5(path3, ".jsonl")}`;
79032
+ const legacy = `codex:${basename6(path3, ".jsonl")}`;
78968
79033
  const identity = (cwd, id) => {
78969
- const uuid3 = typeof id === "string" && /^[a-f0-9]{8}(?:-[a-f0-9]{4}){3}-[a-f0-9]{12}$/i.test(id) ? id.toLowerCase() : basename5(path3, ".jsonl").match(/([a-f0-9]{8}(?:-[a-f0-9]{4}){3}-[a-f0-9]{12})$/i)?.[1]?.toLowerCase();
79034
+ const uuid3 = typeof id === "string" && /^[a-f0-9]{8}(?:-[a-f0-9]{4}){3}-[a-f0-9]{12}$/i.test(id) ? id.toLowerCase() : basename6(path3, ".jsonl").match(/([a-f0-9]{8}(?:-[a-f0-9]{4}){3}-[a-f0-9]{12})$/i)?.[1]?.toLowerCase();
78970
79035
  const sessionId = uuid3 ? `codex:${uuid3}` : legacy;
78971
79036
  return { cwd, sessionId, aliases: [legacy, ...uuid3 ? [uuid3] : []].filter((s) => s !== sessionId) };
78972
79037
  };
@@ -79027,7 +79092,7 @@ function codexRolloutsForCwd(cwd, opts = {}) {
79027
79092
  const { dir, depth } = stack.pop();
79028
79093
  let names;
79029
79094
  try {
79030
- names = readdirSync6(dir);
79095
+ names = readdirSync7(dir);
79031
79096
  } catch {
79032
79097
  continue;
79033
79098
  }
@@ -79118,7 +79183,7 @@ function geminiTranscriptsForCwd(cwd, opts = {}) {
79118
79183
  if (!existsSync19(root)) continue;
79119
79184
  let slugs;
79120
79185
  try {
79121
- slugs = readdirSync6(root);
79186
+ slugs = readdirSync7(root);
79122
79187
  } catch {
79123
79188
  continue;
79124
79189
  }
@@ -79126,7 +79191,7 @@ function geminiTranscriptsForCwd(cwd, opts = {}) {
79126
79191
  const chats = join21(root, slug2, "chats");
79127
79192
  let names;
79128
79193
  try {
79129
- names = readdirSync6(chats);
79194
+ names = readdirSync7(chats);
79130
79195
  } catch {
79131
79196
  continue;
79132
79197
  }
@@ -79142,7 +79207,7 @@ function geminiTranscriptsForCwd(cwd, opts = {}) {
79142
79207
  if (!st.isFile() || st.mtimeMs < sinceMs) continue;
79143
79208
  const h = readGeminiTranscriptProjectHash(full);
79144
79209
  if (!h || !hashes.has(h)) continue;
79145
- out2.push({ path: full, sessionId: `gemini:${basename5(name2, ".jsonl")}`, mtimeMs: st.mtimeMs });
79210
+ out2.push({ path: full, sessionId: `gemini:${basename6(name2, ".jsonl")}`, mtimeMs: st.mtimeMs });
79146
79211
  }
79147
79212
  }
79148
79213
  }
@@ -79189,7 +79254,7 @@ function opencodeTranscriptsForCwd(cwd, opts = {}) {
79189
79254
  if (!existsSync19(root)) continue;
79190
79255
  let names;
79191
79256
  try {
79192
- names = readdirSync6(root);
79257
+ names = readdirSync7(root);
79193
79258
  } catch {
79194
79259
  continue;
79195
79260
  }
@@ -79205,7 +79270,7 @@ function opencodeTranscriptsForCwd(cwd, opts = {}) {
79205
79270
  if (!st.isFile() || st.mtimeMs < sinceMs) continue;
79206
79271
  const dir = readOpencodeTranscriptDirectory(full);
79207
79272
  if (!dir || !(want.has(dir) || want.has(dir.replace(/\/+$/, "")))) continue;
79208
- out2.push({ path: full, sessionId: `opencode:${basename5(name2, ".jsonl")}`, mtimeMs: st.mtimeMs });
79273
+ out2.push({ path: full, sessionId: `opencode:${basename6(name2, ".jsonl")}`, mtimeMs: st.mtimeMs });
79209
79274
  }
79210
79275
  }
79211
79276
  out2.sort((a, b) => b.mtimeMs - a.mtimeMs);
@@ -80491,7 +80556,7 @@ ${conversation}` }]
80491
80556
  // src/constraint-backfill.ts
80492
80557
  init_src5();
80493
80558
  init_src2();
80494
- import { existsSync as existsSync20, readFileSync as readFileSync19, readdirSync as readdirSync7, writeFileSync as writeFileSync15 } from "node:fs";
80559
+ import { existsSync as existsSync20, readFileSync as readFileSync19, readdirSync as readdirSync8, writeFileSync as writeFileSync15 } from "node:fs";
80495
80560
  import { join as join22 } from "node:path";
80496
80561
  import { homedir as homedir5 } from "node:os";
80497
80562
  var BACKFILL_VERSION = 1;
@@ -80525,7 +80590,7 @@ function replay(root) {
80525
80590
  if (!existsSync20(dir)) return { statements, citedByFix };
80526
80591
  let names;
80527
80592
  try {
80528
- names = readdirSync7(dir).filter((n) => n.endsWith(".jsonl"));
80593
+ names = readdirSync8(dir).filter((n) => n.endsWith(".jsonl"));
80529
80594
  } catch {
80530
80595
  return { statements, citedByFix };
80531
80596
  }
@@ -83818,11 +83883,11 @@ import {
83818
83883
  existsSync as existsSync25,
83819
83884
  mkdirSync as mkdirSync7,
83820
83885
  readFileSync as readFileSync27,
83821
- readdirSync as readdirSync8,
83886
+ readdirSync as readdirSync9,
83822
83887
  unlinkSync as unlinkSync4,
83823
83888
  writeFileSync as writeFileSync18
83824
83889
  } from "node:fs";
83825
- import { basename as basename6, join as join30 } from "node:path";
83890
+ import { basename as basename7, join as join30 } from "node:path";
83826
83891
  function skillFileName(id) {
83827
83892
  return `${id.replace(/[^A-Za-z0-9_.-]/g, "_")}.md`;
83828
83893
  }
@@ -83845,7 +83910,7 @@ async function syncSkills(paths, client, seed, pins = [], techSeed) {
83845
83910
  const staleDaemon = res.staleDaemon && res.latestDaemonVersion ? { latest: res.latestDaemonVersion } : void 0;
83846
83911
  mkdirSync7(paths.skillsDir, { recursive: true });
83847
83912
  if (res.skills.length === 0 && pins.length === 0 && !res.skillsGated) {
83848
- const existing = readdirSync8(paths.skillsDir).filter((f) => f.endsWith(".md"));
83913
+ const existing = readdirSync9(paths.skillsDir).filter((f) => f.endsWith(".md"));
83849
83914
  if (existing.length > 0) return { written: 0, pruned: 0, ...staleDaemon ? { staleDaemon } : {} };
83850
83915
  }
83851
83916
  const rows = [];
@@ -83876,9 +83941,9 @@ async function syncSkills(paths, client, seed, pins = [], techSeed) {
83876
83941
  });
83877
83942
  }
83878
83943
  let pruned = 0;
83879
- for (const f of readdirSync8(paths.skillsDir)) {
83944
+ for (const f of readdirSync9(paths.skillsDir)) {
83880
83945
  if (!f.endsWith(".md")) continue;
83881
- if (keep.has(basename6(f))) continue;
83946
+ if (keep.has(basename7(f))) continue;
83882
83947
  try {
83883
83948
  unlinkSync4(join30(paths.skillsDir, f));
83884
83949
  pruned++;
@@ -83902,7 +83967,7 @@ import {
83902
83967
  lstatSync,
83903
83968
  mkdirSync as mkdirSync8,
83904
83969
  readFileSync as readFileSync28,
83905
- readdirSync as readdirSync9,
83970
+ readdirSync as readdirSync10,
83906
83971
  rmSync as rmSync3,
83907
83972
  symlinkSync,
83908
83973
  writeFileSync as writeFileSync19
@@ -83960,7 +84025,7 @@ function skillCiteHandle(s) {
83960
84025
  function reconcileNamespaced(dir, keep) {
83961
84026
  if (!existsSync26(dir)) return 0;
83962
84027
  let pruned = 0;
83963
- for (const name2 of readdirSync9(dir)) {
84028
+ for (const name2 of readdirSync10(dir)) {
83964
84029
  if (!name2.startsWith(SKILL_NS) || keep.has(name2)) continue;
83965
84030
  try {
83966
84031
  rmSync3(join31(dir, name2), { recursive: true, force: true });
@@ -84163,7 +84228,7 @@ init_profile2();
84163
84228
 
84164
84229
  // src/witness-queue.ts
84165
84230
  import { readFileSync as readFileSync29, renameSync as renameSync3, writeFileSync as writeFileSync20 } from "node:fs";
84166
- import { dirname as dirname11, join as join32 } from "node:path";
84231
+ import { dirname as dirname12, join as join32 } from "node:path";
84167
84232
  var WITNESS_QUEUE_CAP = 500;
84168
84233
  var WITNESS_TTL_MS = 14 * 24 * 60 * 60 * 1e3;
84169
84234
  var WITNESS_MAX_ATTEMPTS = 5;
@@ -84186,7 +84251,7 @@ function loadWitnessQueueWithLosses(path3) {
84186
84251
  }
84187
84252
  function saveWitnessQueue(path3, queue) {
84188
84253
  try {
84189
- const tmp = join32(dirname11(path3), `.${Date.now()}.witness-queue.tmp`);
84254
+ const tmp = join32(dirname12(path3), `.${Date.now()}.witness-queue.tmp`);
84190
84255
  writeFileSync20(tmp, JSON.stringify(queue), "utf8");
84191
84256
  renameSync3(tmp, path3);
84192
84257
  } catch {
@@ -84838,7 +84903,7 @@ function createWatchBreaker(deps) {
84838
84903
  }
84839
84904
 
84840
84905
  // src/engine.ts
84841
- var DAEMON_VERSION = true ? "2.0.22-dev.4054" : "2.0.0-alpha.0";
84906
+ var DAEMON_VERSION = true ? "2.0.22-dev.4068" : "2.0.0-alpha.0";
84842
84907
  var IGNORED_PATH = /[\\/](?:\.git|node_modules|\.errata|\.claude|\.codex|\.cursor|\.turbo|\.next|dist|coverage|test-results|playwright-report|__pycache__)(?:[\\/]|$)/;
84843
84908
  var IGNORED_NOISE = /castalia\.db|eventlog\.sqlite|turn-cursors/;
84844
84909
  var GIT_OP_MUTE_MS = 4e3;
@@ -84932,7 +84997,7 @@ function gitSourceWatchTargets(root) {
84932
84997
  if (targets.size > 0) return [...targets];
84933
84998
  } catch {
84934
84999
  }
84935
- return readdirSync10(root, { withFileTypes: true }).filter((e) => e.isDirectory() && !IGNORED_PATH.test(join35(root, String(e.name)) + sep4)).map((e) => join35(root, String(e.name)));
85000
+ return readdirSync11(root, { withFileTypes: true }).filter((e) => e.isDirectory() && !IGNORED_PATH.test(join35(root, String(e.name)) + sep4)).map((e) => join35(root, String(e.name)));
84936
85001
  }
84937
85002
  function createWorkspaceEngine(opts) {
84938
85003
  const paths = workspacePaths(opts.workspaceRoot);
@@ -85071,7 +85136,7 @@ function createWorkspaceEngine(opts) {
85071
85136
  fsReindex = createCoalescedFilePass(REINDEX_DEBOUNCE_MS, async (changed) => {
85072
85137
  if (stopping) return;
85073
85138
  const t = Date.now();
85074
- const relChanged = changed.map((p) => relative6(opts.workspaceRoot, p).split(sep4).join("/"));
85139
+ const relChanged = changed.map((p) => relative7(opts.workspaceRoot, p).split(sep4).join("/"));
85075
85140
  const causal = causalBuffer.correlate(relChanged, t) ?? void 0;
85076
85141
  await runReindexPass(
85077
85142
  `fs-reindex:${profile.name} (${changed.length} files)`,
@@ -86896,7 +86961,7 @@ function createWorkspaceEngine(opts) {
86896
86961
  const harvestInFlight = /* @__PURE__ */ new Map();
86897
86962
  const repairedSessions = /* @__PURE__ */ new Set();
86898
86963
  const harvestTurns = async (inputSessionId, transcriptPath) => {
86899
- const identity = basename7(transcriptPath).startsWith("rollout-") ? readCodexRolloutIdentity(transcriptPath) : null;
86964
+ const identity = basename8(transcriptPath).startsWith("rollout-") ? readCodexRolloutIdentity(transcriptPath) : null;
86900
86965
  const sessionId = identity?.sessionId ?? inputSessionId;
86901
86966
  const work = (harvestInFlight.get(sessionId) ?? Promise.resolve()).catch(() => {
86902
86967
  }).then(async () => {
@@ -87422,7 +87487,7 @@ B: ${b}`,
87422
87487
  console.log(
87423
87488
  "[errata] sync skipped \u2014 cloud sync consent is off (enable with `errata consent sync on`)"
87424
87489
  );
87425
- const pending = existsSync28(paths.outbox) ? readdirSync10(paths.outbox).filter((f) => f.endsWith(".json")).length : 0;
87490
+ const pending = existsSync28(paths.outbox) ? readdirSync11(paths.outbox).filter((f) => f.endsWith(".json")).length : 0;
87426
87491
  return { uploaded: 0, failed: 0, remaining: pending };
87427
87492
  }
87428
87493
  if (!shipsFromWorkspace(opts.workspaceRoot)) {
@@ -87434,7 +87499,7 @@ B: ${b}`,
87434
87499
  console.log(
87435
87500
  "[errata] sync held \u2014 this repo is already on errata in another workspace; run `errata link` to join it or create your own project"
87436
87501
  );
87437
- const pending = existsSync28(paths.outbox) ? readdirSync10(paths.outbox).filter((f) => f.endsWith(".json")).length : 0;
87502
+ const pending = existsSync28(paths.outbox) ? readdirSync11(paths.outbox).filter((f) => f.endsWith(".json")).length : 0;
87438
87503
  return { uploaded: 0, failed: 0, remaining: pending };
87439
87504
  }
87440
87505
  try {
@@ -88150,7 +88215,7 @@ init_profile2();
88150
88215
  init_session_registry();
88151
88216
 
88152
88217
  // src/public-symbols.ts
88153
- import { readFileSync as readFileSync34, readdirSync as readdirSync11, existsSync as existsSync31 } from "node:fs";
88218
+ import { readFileSync as readFileSync34, readdirSync as readdirSync12, existsSync as existsSync31 } from "node:fs";
88154
88219
  import { join as join37 } from "node:path";
88155
88220
  var HEAD_BYTES = 8 * 1024;
88156
88221
  var INDEX_TTL_MS = 10 * 60 * 1e3;
@@ -88197,7 +88262,7 @@ function internalPackageNames(workspaceRoot) {
88197
88262
  const groupDir = join37(workspaceRoot, group);
88198
88263
  if (!existsSync31(groupDir)) continue;
88199
88264
  try {
88200
- for (const entry of readdirSync11(groupDir)) tryRead(join37(groupDir, entry));
88265
+ for (const entry of readdirSync12(groupDir)) tryRead(join37(groupDir, entry));
88201
88266
  } catch {
88202
88267
  }
88203
88268
  }
@@ -89194,7 +89259,7 @@ init_config();
89194
89259
 
89195
89260
  // src/update.ts
89196
89261
  import { spawn as spawn2 } from "node:child_process";
89197
- import { isAbsolute as isAbsolute5, join as join38 } from "node:path";
89262
+ import { isAbsolute as isAbsolute6, join as join38 } from "node:path";
89198
89263
  var PACKAGE_NAME = "@inerrata-corporation/errata";
89199
89264
  function parse3(v) {
89200
89265
  const m = /^(\d+)\.(\d+)\.(\d+)(?:-([0-9A-Za-z][0-9A-Za-z.-]*))?/.exec(v.trim());
@@ -89339,7 +89404,7 @@ async function runInstalledHookRefresh() {
89339
89404
  child.on("error", () => resolve10(""));
89340
89405
  child.on("close", (code) => resolve10(code === 0 ? output.trim() : ""));
89341
89406
  });
89342
- if (!isAbsolute5(root)) return 1;
89407
+ if (!isAbsolute6(root)) return 1;
89343
89408
  return new Promise((resolve10) => {
89344
89409
  const child = spawn2(process.execPath, [join38(root, PACKAGE_NAME, "errata.mjs"), "install-hooks", "codex", "--refresh-existing"], {
89345
89410
  windowsHide: true,
@@ -90087,12 +90152,12 @@ var GENERATED_PATH_RES = [
90087
90152
  ];
90088
90153
  var RELEASE_SUBJECT_RE = /^(release|bump|chore\(release\)|v?\d+\.\d+\.\d+)/i;
90089
90154
  var RELEASE_TAG_RE = /^v?\d+\.\d+/;
90090
- function basename8(path3) {
90155
+ function basename9(path3) {
90091
90156
  const i2 = path3.lastIndexOf("/");
90092
90157
  return i2 < 0 ? path3 : path3.slice(i2 + 1);
90093
90158
  }
90094
90159
  function isLockfilePath(path3) {
90095
- const name2 = basename8(path3);
90160
+ const name2 = basename9(path3);
90096
90161
  return LOCKFILE_NAMES.has(name2) || LOCKFILE_SUFFIX_RE.test(name2);
90097
90162
  }
90098
90163
  function isGeneratedPath(path3) {
@@ -91657,12 +91722,12 @@ init_registry();
91657
91722
  // src/adopt.ts
91658
91723
  init_git_remote();
91659
91724
  import { existsSync as existsSync33 } from "node:fs";
91660
- import { dirname as dirname12, join as join41 } from "node:path";
91725
+ import { dirname as dirname13, join as join41 } from "node:path";
91661
91726
  function findGitRoot(absPath) {
91662
91727
  let dir = absPath;
91663
91728
  for (let depth = 0; depth < 64; depth++) {
91664
91729
  if (existsSync33(join41(dir, ".git"))) return dir;
91665
- const parent = dirname12(dir);
91730
+ const parent = dirname13(dir);
91666
91731
  if (parent === dir) return null;
91667
91732
  dir = parent;
91668
91733
  }
@@ -94223,7 +94288,7 @@ function shouldUseOAuthLogin(flags2, env2 = process.env) {
94223
94288
  import { spawnSync as spawnSync2 } from "node:child_process";
94224
94289
 
94225
94290
  // src/codex-runtime.ts
94226
- import { readdirSync as readdirSync12, statSync as statSync10 } from "node:fs";
94291
+ import { readdirSync as readdirSync13, statSync as statSync10 } from "node:fs";
94227
94292
  import { join as join42 } from "node:path";
94228
94293
  function resolveCodexExecutable(options = {}) {
94229
94294
  const platform = options.platform ?? process.platform;
@@ -94245,7 +94310,7 @@ function resolveCodexExecutable(options = {}) {
94245
94310
  if (!env2["LOCALAPPDATA"]) return "codex";
94246
94311
  const root = join42(env2["LOCALAPPDATA"], "OpenAI", "Codex", "bin");
94247
94312
  try {
94248
- const candidates = readdirSync12(root, { withFileTypes: true }).filter((entry) => entry.isDirectory()).map((entry) => join42(root, entry.name, "codex.exe")).map((path3) => ({ path: path3, mtime: fileTime(path3) })).filter((candidate) => candidate.mtime !== null).sort((a, b) => b.mtime - a.mtime || a.path.localeCompare(b.path));
94313
+ const candidates = readdirSync13(root, { withFileTypes: true }).filter((entry) => entry.isDirectory()).map((entry) => join42(root, entry.name, "codex.exe")).map((path3) => ({ path: path3, mtime: fileTime(path3) })).filter((candidate) => candidate.mtime !== null).sort((a, b) => b.mtime - a.mtime || a.path.localeCompare(b.path));
94249
94314
  return candidates[0]?.path ?? "codex";
94250
94315
  } catch {
94251
94316
  return "codex";
@@ -95660,8 +95725,8 @@ enabled = ${enabled}
95660
95725
 
95661
95726
  // src/codex-hook-refresh.ts
95662
95727
  init_checkout_root();
95663
- import { existsSync as existsSync37, readdirSync as readdirSync13, readFileSync as readFileSync39 } from "node:fs";
95664
- import { dirname as dirname13, join as join46, resolve as resolve8 } from "node:path";
95728
+ import { existsSync as existsSync37, readdirSync as readdirSync14, readFileSync as readFileSync39 } from "node:fs";
95729
+ import { dirname as dirname14, join as join46, resolve as resolve8 } from "node:path";
95665
95730
  init_registry();
95666
95731
  function codexHookRoots(roots) {
95667
95732
  const found = new Set(roots.map((root) => resolve8(root)));
@@ -95672,13 +95737,13 @@ function codexHookRoots(roots) {
95672
95737
  if (!existsSync37(dir)) continue;
95673
95738
  let names;
95674
95739
  try {
95675
- names = readdirSync13(dir);
95740
+ names = readdirSync14(dir);
95676
95741
  } catch {
95677
95742
  continue;
95678
95743
  }
95679
95744
  for (const name2 of names) {
95680
95745
  try {
95681
- const checkout = dirname13(readFileSync39(join46(dir, name2, "gitdir"), "utf8").trim());
95746
+ const checkout = dirname14(readFileSync39(join46(dir, name2, "gitdir"), "utf8").trim());
95682
95747
  if (mainCheckoutOfWorktree(checkout) === main2) found.add(checkout);
95683
95748
  } catch {
95684
95749
  }
@@ -95702,7 +95767,7 @@ function refreshInstalledCodexRelays(roots = listWorkspaceEntries().map((entry)
95702
95767
  // src/claude-statusline.ts
95703
95768
  import { existsSync as existsSync38, mkdirSync as mkdirSync11, readFileSync as readFileSync40, writeFileSync as writeFileSync29 } from "node:fs";
95704
95769
  import { homedir as homedir9 } from "node:os";
95705
- import { dirname as dirname14, join as join47 } from "node:path";
95770
+ import { dirname as dirname15, join as join47 } from "node:path";
95706
95771
  var STATUSLINE_RELAY_SOURCE = String.raw`// errata-managed: regenerated by errata init / install-hooks claude
95707
95772
  import { readFileSync } from 'node:fs';
95708
95773
 
@@ -95786,7 +95851,7 @@ function ensureUserStatusLine(opts) {
95786
95851
  return ownMain ? "kept-own" : "unchanged";
95787
95852
  }
95788
95853
  Object.assign(settings, next);
95789
- mkdirSync11(dirname14(settingsPath), { recursive: true });
95854
+ mkdirSync11(dirname15(settingsPath), { recursive: true });
95790
95855
  writeFileSync29(settingsPath, JSON.stringify(settings, null, 2) + "\n", "utf8");
95791
95856
  return "installed";
95792
95857
  }
@@ -95807,8 +95872,8 @@ function describeStatusLineOutcome(outcome) {
95807
95872
 
95808
95873
  // src/claude-mods.ts
95809
95874
  import { createHash as createHash21 } from "node:crypto";
95810
- import { cpSync as cpSync3, existsSync as existsSync39, mkdirSync as mkdirSync12, readFileSync as readFileSync41, readdirSync as readdirSync14, rmSync as rmSync4, statSync as statSync12, writeFileSync as writeFileSync30 } from "node:fs";
95811
- import { delimiter as delimiter2, dirname as dirname15, join as join48, relative as relative7, resolve as resolve9, sep as sep5 } from "node:path";
95875
+ import { cpSync as cpSync3, existsSync as existsSync39, mkdirSync as mkdirSync12, readFileSync as readFileSync41, readdirSync as readdirSync15, rmSync as rmSync4, statSync as statSync12, writeFileSync as writeFileSync30 } from "node:fs";
95876
+ import { delimiter as delimiter2, dirname as dirname16, join as join48, relative as relative8, resolve as resolve9, sep as sep5 } from "node:path";
95812
95877
  import { fileURLToPath as fileURLToPath3 } from "node:url";
95813
95878
  var CLAUDE_PLUGIN_DIRS_ENV = "CLAUDE_CODE_PLUGIN_DIRS";
95814
95879
  var HASH_FILE = ".errata-mod-hash";
@@ -95822,9 +95887,9 @@ function isEngineOwned(relPath) {
95822
95887
  }
95823
95888
  function listFiles(root, dir = root) {
95824
95889
  const out2 = [];
95825
- for (const name2 of readdirSync14(dir)) {
95890
+ for (const name2 of readdirSync15(dir)) {
95826
95891
  const abs = join48(dir, name2);
95827
- if (isEngineOwned(relative7(root, abs))) continue;
95892
+ if (isEngineOwned(relative8(root, abs))) continue;
95828
95893
  if (statSync12(abs).isDirectory()) out2.push(...listFiles(root, abs));
95829
95894
  else out2.push(abs);
95830
95895
  }
@@ -95833,7 +95898,7 @@ function listFiles(root, dir = root) {
95833
95898
  function modHash(dir) {
95834
95899
  const h = createHash21("sha256");
95835
95900
  for (const abs of listFiles(dir).sort()) {
95836
- h.update(relative7(dir, abs).split(sep5).join("/"));
95901
+ h.update(relative8(dir, abs).split(sep5).join("/"));
95837
95902
  h.update("\0");
95838
95903
  h.update(readFileSync41(abs));
95839
95904
  h.update("\0");
@@ -95842,14 +95907,14 @@ function modHash(dir) {
95842
95907
  }
95843
95908
  function bundledMods(bundleDir) {
95844
95909
  if (!existsSync39(bundleDir)) return [];
95845
- return readdirSync14(bundleDir).filter((name2) => existsSync39(join48(bundleDir, name2, ".claude-plugin", "plugin.json")));
95910
+ return readdirSync15(bundleDir).filter((name2) => existsSync39(join48(bundleDir, name2, ".claude-plugin", "plugin.json")));
95846
95911
  }
95847
95912
  function sameDir(a, b) {
95848
95913
  const norm = (p) => resolve9(p).replace(/[\\/]+$/, "").toLowerCase();
95849
95914
  return norm(a) === norm(b);
95850
95915
  }
95851
95916
  function isUnder(path3, root) {
95852
- const rel = relative7(resolve9(root), resolve9(path3));
95917
+ const rel = relative8(resolve9(root), resolve9(path3));
95853
95918
  return rel !== "" && !rel.startsWith("..") && !rel.includes(":");
95854
95919
  }
95855
95920
  function off(env2) {
@@ -95883,7 +95948,7 @@ function currentDirs(settings) {
95883
95948
  return raw2.split(delimiter2).map((s) => s.trim()).filter(Boolean);
95884
95949
  }
95885
95950
  function writeSettings(path3, settings) {
95886
- mkdirSync12(dirname15(path3), { recursive: true });
95951
+ mkdirSync12(dirname16(path3), { recursive: true });
95887
95952
  writeFileSync30(path3, JSON.stringify(settings, null, 2) + "\n", "utf8");
95888
95953
  }
95889
95954
  function ensureClaudeMods(opts) {
@@ -95912,7 +95977,7 @@ function ensureClaudeMods(opts) {
95912
95977
  const hashFile = join48(dest, HASH_FILE);
95913
95978
  if (!existsSync39(hashFile) || readFileSync41(hashFile, "utf8") !== hash2) {
95914
95979
  rmSync4(dest, { recursive: true, force: true });
95915
- cpSync3(src, dest, { recursive: true, filter: (p) => !isEngineOwned(relative7(src, p)) });
95980
+ cpSync3(src, dest, { recursive: true, filter: (p) => !isEngineOwned(relative8(src, p)) });
95916
95981
  writeFileSync30(hashFile, hash2, "utf8");
95917
95982
  changed = true;
95918
95983
  }
@@ -98602,9 +98667,9 @@ async function installClaudeHooks(port) {
98602
98667
  }
98603
98668
  async function installClaudeMcpConfig() {
98604
98669
  const { mkdirSync: mkdirSync13, existsSync: existsSync41, readFileSync: readFileSync43, writeFileSync: writeFileSync31 } = await import("node:fs");
98605
- const { join: join50, dirname: dirname16 } = await import("node:path");
98670
+ const { join: join50, dirname: dirname17 } = await import("node:path");
98606
98671
  const file2 = join50(ROOT, ".mcp.json");
98607
- const dir = dirname16(file2);
98672
+ const dir = dirname17(file2);
98608
98673
  if (!existsSync41(dir)) mkdirSync13(dir, { recursive: true });
98609
98674
  let cfg = {};
98610
98675
  if (existsSync41(file2)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inerrata-corporation/errata",
3
- "version": "2.0.22-dev.4054",
3
+ "version": "2.0.22-dev.4068",
4
4
  "description": "errata - local-first observation engine for AI coding agents",
5
5
  "type": "module",
6
6
  "bin": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "errata-context",
3
- "version": "2.0.22-dev.4054",
3
+ "version": "2.0.22-dev.4068",
4
4
  "description": "A minimal 3D view of loaded Errata priors and recent graph bursts.",
5
5
  "author": {
6
6
  "name": "inErrata"
@@ -1,4 +1,4 @@
1
- a2cfe71e3f16c077959a201ff6ffb9d28203e992b5e6ea58bcfce9c8684b93e6 .codex-plugin/plugin.json
1
+ 00bc0177aae01a85f631ed85982396738452569cd34399c0615c877dda7dce2d .codex-plugin/plugin.json
2
2
  a7bebae9fb01c838d6c75fc784129e28be571233fa66ff5ee8039b574f35ccf7 assets/icon.png
3
3
  fc38b64e4df1e0b72c35764bef6c4c05430d97c9009ad0ecc8a9e75b4deab232 configure-local.mjs
4
4
  73dc6028b3b070257c7c31f252d11e55a9e096f4aed0f187f10cb21716e1e6d7 dist/client.js