@inerrata-corporation/errata 2.0.6-dev.2725 → 2.0.6-dev.2752

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 +10 -14
  2. package/package.json +1 -1
package/errata.mjs CHANGED
@@ -74469,10 +74469,12 @@ function fixRationaleBefore(sentence, idx) {
74469
74469
  const ws = masked.slice(start2, idx).search(/\s/);
74470
74470
  start2 = ws < 0 ? idx : start2 + ws;
74471
74471
  }
74472
- const win = masked.slice(start2, idx);
74473
- const m = /[.;!?—][^.;!?—]*$/.exec(win);
74474
- const clause = m ? win.slice(m.index + 1) : win;
74475
- return clause.replace(/\s+/g, " ").trim();
74472
+ const win = masked.slice(start2, idx).replace(/\s+$/, "").replace(/[.!?]$/, "");
74473
+ const scan2 = win.replace(/`[^`]*`/g, (s) => s.replace(/[.;!?—]/g, "_"));
74474
+ const m = /[.;!?—][^.;!?—]*$/.exec(scan2);
74475
+ const clause = (m ? win.slice(m.index + 1) : win).replace(/\*\*|__/g, "").replace(/^\s*(?:[-*+]|\d+[.)])\s+/, "").replace(/\s+([:;,])/g, "$1").replace(/\s+/g, " ").trim();
74476
+ if (clause.endsWith(":")) return "";
74477
+ return clause;
74476
74478
  }
74477
74479
  function fixRationaleAfter(sentence, endIdx) {
74478
74480
  if (/^\s*[)\]}]/.test(sentence.slice(endIdx))) return "";
@@ -74598,7 +74600,7 @@ function parseInlineTagsWithDispositions(text) {
74598
74600
  const dispositions = emptyTagDispositions();
74599
74601
  const deFenced = text.replace(/```[\s\S]*?```/g, " ");
74600
74602
  let seqNo = -1;
74601
- for (const raw2 of deFenced.split(/(?<=[.!?])\s+|\n+/)) {
74603
+ for (const raw2 of deFenced.split(/(?<=[.!?])\s+(?!\(fix:)|\n+/)) {
74602
74604
  seqNo++;
74603
74605
  if (raw2.length > 2e4) {
74604
74606
  dispositions.oversizeSegments++;
@@ -79905,7 +79907,7 @@ function createWatchBreaker(deps) {
79905
79907
  }
79906
79908
 
79907
79909
  // src/engine.ts
79908
- var DAEMON_VERSION = true ? "2.0.6-dev.2725" : "2.0.0-alpha.0";
79910
+ var DAEMON_VERSION = true ? "2.0.6-dev.2752" : "2.0.0-alpha.0";
79909
79911
  var IGNORED_PATH = /[\\/](?:\.git|node_modules|\.errata|\.claude|\.codex|\.cursor|\.turbo|\.next|dist|coverage|test-results|playwright-report|__pycache__)(?:[\\/]|$)/;
79910
79912
  var IGNORED_NOISE = /castalia\.db|eventlog\.sqlite|turn-cursors/;
79911
79913
  var GIT_OP_MUTE_MS = 4e3;
@@ -84480,7 +84482,6 @@ async function spineForUnit(git3, root, unit, readBlob) {
84480
84482
  const wire = (d) => ({ ecosystem: d.ecosystem, name: d.name, version: d.version, kind: d.kind, manifest: d.manifest });
84481
84483
  return { declared: rings.declared.map(wire), context: rings.context.map(wire) };
84482
84484
  }
84483
- var HEX_BODY_HASH = /^[0-9a-f]{8,64}$/;
84484
84485
  function anchorsFor(pathTokens, ignoreLines, projectId, anchors) {
84485
84486
  if (!anchors) return void 0;
84486
84487
  const out2 = {};
@@ -84492,11 +84493,9 @@ function anchorsFor(pathTokens, ignoreLines, projectId, anchors) {
84492
84493
  for (const n of nodes) {
84493
84494
  const qname = n.attrs["qname"];
84494
84495
  if (typeof qname !== "string") continue;
84495
- const bodyHash = n.attrs["bodyHash"];
84496
84496
  list.push({
84497
84497
  symbolId: projectSymbolId(anchors.salt, projectId, relPath, qname, n.label),
84498
- kind: n.label,
84499
- ...typeof bodyHash === "string" && HEX_BODY_HASH.test(bodyHash) ? { contentHash: bodyHash } : {}
84498
+ kind: n.label
84500
84499
  });
84501
84500
  if (list.length >= MAX_ANCHORS_PER_TOKEN) break;
84502
84501
  }
@@ -84636,10 +84635,7 @@ async function walk10(root, input, client, opts, readBlob) {
84636
84635
  const spine = await spineForUnit(git3, root, u, readBlob);
84637
84636
  if (spine) body2.spine = spine;
84638
84637
  const anchors = anchorsFor(bundle.pathTokens, ignoreLines, projectId, opts.anchors);
84639
- if (anchors) {
84640
- body2.anchors = anchors;
84641
- body2.observedAtCommit = headSha;
84642
- }
84638
+ if (anchors) body2.anchors = anchors;
84643
84639
  return { body: body2, prepMs: Date.now() - prepStarted };
84644
84640
  })();
84645
84641
  prepared.set(k, p);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inerrata-corporation/errata",
3
- "version": "2.0.6-dev.2725",
3
+ "version": "2.0.6-dev.2752",
4
4
  "description": "errata - local-first observation engine for AI coding agents",
5
5
  "type": "module",
6
6
  "bin": {