@inerrata-corporation/errata 2.0.2-dev.568 → 2.0.2-dev.588

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 +22 -3
  2. package/package.json +1 -1
package/errata.mjs CHANGED
@@ -54420,7 +54420,7 @@ function startLoopLagMonitor(thresholdMs = 1e3) {
54420
54420
  }
54421
54421
 
54422
54422
  // src/engine.ts
54423
- var DAEMON_VERSION = true ? "2.0.2-dev.568" : "2.0.0-alpha.0";
54423
+ var DAEMON_VERSION = true ? "2.0.2-dev.588" : "2.0.0-alpha.0";
54424
54424
  var IGNORED_PATH = /[\\/](?:\.git|node_modules|\.errata|\.claude|\.codex|\.cursor|\.turbo|\.next|dist|coverage|test-results|playwright-report|__pycache__)(?:[\\/]|$)/;
54425
54425
  var IGNORED_NOISE = /castalia\.db|eventlog\.sqlite|turn-cursors/;
54426
54426
  var GIT_OP_MUTE_MS = 4e3;
@@ -56595,8 +56595,23 @@ function preservedSymbolsFor(description, index) {
56595
56595
  }
56596
56596
  return out2;
56597
56597
  }
56598
+ function internalSymbolsFor(description, lexiconHas, publicIndex) {
56599
+ const out2 = [];
56600
+ const seen = /* @__PURE__ */ new Set();
56601
+ for (const m of description.matchAll(/[A-Za-z_$][\w$]{2,}(?:\.[A-Za-z_$][\w$]+)*/g)) {
56602
+ const tok = m[0];
56603
+ if (seen.has(tok)) continue;
56604
+ seen.add(tok);
56605
+ if (!lexiconHas(tok)) continue;
56606
+ if (publicIndex?.symbols.has(tok)) continue;
56607
+ out2.push(tok);
56608
+ if (out2.length >= PRESERVED_SYMBOLS_CAP) break;
56609
+ }
56610
+ return out2;
56611
+ }
56598
56612
 
56599
56613
  // src/instance-ingest.ts
56614
+ init_generalize_graph();
56600
56615
  var INSTANCE_LABELS = ["Problem", "Solution", "RootCause"];
56601
56616
  var INSTANCE_EDGES = ["CAUSED_BY", "SOLVED_BY"];
56602
56617
  var ANCHOR_EDGES = ["OCCURS_IN", "DEPENDS_ON", "PERTAIN_TO", "CONCERNS"];
@@ -56666,18 +56681,22 @@ function buildInstanceIngest(store, profile, daemonVersion, ignorePatterns = [],
56666
56681
  return key ? { originSession: key } : {};
56667
56682
  };
56668
56683
  const symbolIndex = opts.workspaceRoot ? publicSymbolIndex(store, opts.workspaceRoot) : null;
56684
+ const ownLexicon = buildSymbolLexicon(store);
56669
56685
  const shareable = (n) => {
56670
56686
  const preserved = symbolIndex ? preservedSymbolsFor(n.description, symbolIndex) : [];
56687
+ const shippedText = generalize(n.description, { level }).text;
56688
+ const internal = internalSymbolsFor(shippedText, (t) => ownLexicon.has(t), symbolIndex);
56671
56689
  return {
56672
56690
  ...n,
56673
- description: generalize(n.description, { level }).text,
56691
+ description: shippedText,
56674
56692
  embedding: [],
56675
56693
  ...originSessionOf(n),
56676
56694
  attrs: {
56677
56695
  scope: stripCodebaseScope(n.attrs["scope"]),
56678
56696
  ...n.attrs["kind"] ? { kind: n.attrs["kind"] } : {},
56679
56697
  ...n.attrs["resolvedAs"] ? { resolvedAs: n.attrs["resolvedAs"] } : {},
56680
- ...preserved.length > 0 ? { preservedSymbols: preserved } : {}
56698
+ ...preserved.length > 0 ? { preservedSymbols: preserved } : {},
56699
+ ...internal.length > 0 ? { internalSymbols: internal } : {}
56681
56700
  }
56682
56701
  };
56683
56702
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inerrata-corporation/errata",
3
- "version": "2.0.2-dev.568",
3
+ "version": "2.0.2-dev.588",
4
4
  "description": "errata - local-first observation engine for AI coding agents",
5
5
  "type": "module",
6
6
  "bin": {