@inerrata-corporation/errata 2.0.6-dev.1877 → 2.0.6-dev.1983

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 (2) hide show
  1. package/errata.mjs +5 -6
  2. package/package.json +1 -1
package/errata.mjs CHANGED
@@ -19726,15 +19726,14 @@ function anchorProblemToWorkingFile(store, problemId, relPath, workspaceId2, ts,
19726
19726
  function resolveEnclosingSymbol(store, fileId, line, fileText) {
19727
19727
  if (!Number.isFinite(line) || line < 1) return null;
19728
19728
  const row = Math.floor(line) - 1;
19729
- const bytes = Buffer.from(fileText, "utf8");
19730
19729
  const lineStarts = [0];
19731
- for (let i2 = 0; i2 < bytes.length; i2++) if (bytes[i2] === 10) lineStarts.push(i2 + 1);
19732
- const rowOf = (byte) => {
19730
+ for (let i2 = 0; i2 < fileText.length; i2++) if (fileText.charCodeAt(i2) === 10) lineStarts.push(i2 + 1);
19731
+ const rowOf = (index) => {
19733
19732
  let lo = 0;
19734
19733
  let hi = lineStarts.length - 1;
19735
19734
  while (lo < hi) {
19736
19735
  const mid = lo + hi + 1 >> 1;
19737
- if (lineStarts[mid] <= byte) lo = mid;
19736
+ if (lineStarts[mid] <= index) lo = mid;
19738
19737
  else hi = mid - 1;
19739
19738
  }
19740
19739
  return lo;
@@ -19759,7 +19758,7 @@ function resolveEnclosingSymbol(store, fileId, line, fileText) {
19759
19758
  const endByte = n.attrs["endByte"];
19760
19759
  if (typeof startRow !== "number" || typeof startByte !== "number" || typeof endByte !== "number") continue;
19761
19760
  if (startRow < 0 || endByte < startByte) continue;
19762
- const endRow = rowOf(Math.max(startByte, Math.min(endByte, bytes.length) - 1));
19761
+ const endRow = rowOf(Math.max(startByte, Math.min(endByte, fileText.length) - 1));
19763
19762
  if (row < startRow || row > endRow) continue;
19764
19763
  const span = endByte - startByte;
19765
19764
  if (startRow > bestStart || startRow === bestStart && span < bestSpan) {
@@ -57935,7 +57934,7 @@ function createWatchBreaker(deps) {
57935
57934
  }
57936
57935
 
57937
57936
  // src/engine.ts
57938
- var DAEMON_VERSION = true ? "2.0.6-dev.1877" : "2.0.0-alpha.0";
57937
+ var DAEMON_VERSION = true ? "2.0.6-dev.1983" : "2.0.0-alpha.0";
57939
57938
  var IGNORED_PATH = /[\\/](?:\.git|node_modules|\.errata|\.claude|\.codex|\.cursor|\.turbo|\.next|dist|coverage|test-results|playwright-report|__pycache__)(?:[\\/]|$)/;
57940
57939
  var IGNORED_NOISE = /castalia\.db|eventlog\.sqlite|turn-cursors/;
57941
57940
  var GIT_OP_MUTE_MS = 4e3;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inerrata-corporation/errata",
3
- "version": "2.0.6-dev.1877",
3
+ "version": "2.0.6-dev.1983",
4
4
  "description": "errata - local-first observation engine for AI coding agents",
5
5
  "type": "module",
6
6
  "bin": {