@inerrata-corporation/errata 2.0.2-dev.85 → 2.0.2-dev.95

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
@@ -37435,7 +37435,7 @@ var init_mcp = __esm({
37435
37435
  },
37436
37436
  {
37437
37437
  name: "errata.why",
37438
- description: "Causal/resolution neighborhood along the causal edge families (CAUSED_BY, MANIFESTS_AS, FIXED_BY, SOLVED_BY, \u2026), walked in both directions. For a Problem this surfaces its root causes AND solutions; for a Solution, the problems it resolves. Ranked by accumulated conductance. Pass nodeId or qname. Returns {seedId, nodes:[{id,label,description,hops,edgeType,relevance}]}.",
37438
+ description: "Causal/resolution neighborhood along the causal edge families (CAUSED_BY, MANIFESTS_AS, FIXED_BY, SOLVED_BY, \u2026), walked in both directions. For a Problem this surfaces its root causes AND solutions; for a Solution, the problems it resolves. Merges the machine-wide shared store's triage layer (cause chains from inline `<-` diagnoses land there, keyed by the same content-derived problem id). Ranked by accumulated conductance. Pass nodeId or qname. Returns {seedId, nodes:[{id,label,description,hops,edgeType,relevance}]}.",
37439
37439
  inputSchema: {
37440
37440
  type: "object",
37441
37441
  properties: {
@@ -37450,7 +37450,26 @@ var init_mcp = __esm({
37450
37450
  if (!id) return unresolved(args2);
37451
37451
  const maxHops = Math.max(1, Math.min(8, Number(args2["maxHops"] ?? 4)));
37452
37452
  const limit = Math.max(1, Math.min(100, Number(args2["limit"] ?? 30)));
37453
- return { found: true, ...causalChain(store, { seedId: id, direction: "both", maxHops, limit }) };
37453
+ const local = causalChain(store, { seedId: id, direction: "both", maxHops, limit });
37454
+ try {
37455
+ const path2 = sharedStorePath();
37456
+ if (!existsSync10(path2)) return { found: true, ...local };
37457
+ const shared = openGraphStore({ path: path2 });
37458
+ try {
37459
+ if (!shared.getNode(id)) return { found: true, ...local };
37460
+ const l2 = causalChain(shared, { seedId: id, direction: "both", maxHops, limit });
37461
+ const seen = new Set(local.nodes.map((n) => n.id));
37462
+ const merged = [
37463
+ ...local.nodes,
37464
+ ...l2.nodes.filter((n) => !seen.has(n.id)).map((n) => ({ ...n, store: "shared" }))
37465
+ ].sort((a, b) => (b.relevance ?? 0) - (a.relevance ?? 0)).slice(0, limit);
37466
+ return { found: true, seedId: local.seedId, nodes: merged };
37467
+ } finally {
37468
+ shared.close();
37469
+ }
37470
+ } catch {
37471
+ return { found: true, ...local };
37472
+ }
37454
37473
  }
37455
37474
  },
37456
37475
  {
@@ -51789,7 +51808,7 @@ function startLoopLagMonitor(thresholdMs = 1e3) {
51789
51808
  }
51790
51809
 
51791
51810
  // src/engine.ts
51792
- var DAEMON_VERSION = true ? "2.0.2-dev.85" : "2.0.0-alpha.0";
51811
+ var DAEMON_VERSION = true ? "2.0.2-dev.95" : "2.0.0-alpha.0";
51793
51812
  var IGNORED_PATH = /[\\/](?:\.git|node_modules|\.errata|\.claude|\.codex|\.cursor|\.turbo|\.next|dist|coverage|test-results|playwright-report|__pycache__)(?:[\\/]|$)/;
51794
51813
  var IGNORED_NOISE = /castalia\.db|eventlog\.sqlite|turn-cursors/;
51795
51814
  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.2-dev.85",
3
+ "version": "2.0.2-dev.95",
4
4
  "description": "errata - local-first observation engine for AI coding agents",
5
5
  "type": "module",
6
6
  "bin": {