@inerrata-corporation/errata 2.0.23-dev.4826 → 2.0.23-dev.4829

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
@@ -48289,6 +48289,7 @@ __export(mcp_exports, {
48289
48289
  SEARCH_CODE_SEEDS: () => SEARCH_CODE_SEEDS,
48290
48290
  SEARCH_KNOWLEDGE_SEEDS: () => SEARCH_KNOWLEDGE_SEEDS,
48291
48291
  createMcpHandler: () => createMcpHandler,
48292
+ lifecycleFields: () => lifecycleFields,
48292
48293
  runMcpServer: () => runMcpServer,
48293
48294
  runTool: () => runTool,
48294
48295
  searchEntries: () => searchEntries,
@@ -48373,6 +48374,27 @@ function takeDiscriminatorNudge(path3) {
48373
48374
  shared.close();
48374
48375
  }
48375
48376
  }
48377
+ function lifecycleFields(store, id, cloud) {
48378
+ const node2 = store.getNode(id);
48379
+ if (node2) {
48380
+ const l = lifecycleOf(store, node2);
48381
+ const rg = hitState(store, node2);
48382
+ const note = lifecycleNote(l);
48383
+ return {
48384
+ ...rg.state ? { state: rg.state } : {},
48385
+ ...rg.refutedWhy ? { refutedWhy: rg.refutedWhy } : {},
48386
+ ...rg.supersededBy?.length ? { supersededBy: rg.supersededBy } : {},
48387
+ ...note ? { lifecycle: note } : {}
48388
+ };
48389
+ }
48390
+ if (!cloud) return {};
48391
+ const held = (cloud.corroborationCount ?? 0) + (cloud.acceptedCount ?? 0);
48392
+ const refuted = cloud.failureReportCount ?? 0;
48393
+ if ((cloud.supersededBy ?? 0) > 0) return { state: "superseded", lifecycle: "superseded by a newer fix on the Network \u2014 prefer that fix" };
48394
+ if (refuted > held) return { state: "refuted", lifecycle: `refuted on the Network (${Math.round(refuted)}\xD7)` };
48395
+ if (held > 0) return { state: "held", lifecycle: "held \u2014 confirmed on the Network" };
48396
+ return {};
48397
+ }
48376
48398
  function hitState(store, n) {
48377
48399
  const l = lifecycleOf(store, n);
48378
48400
  if (l.state === "superseded") return { state: "superseded", supersededBy: l.supersededBy, factor: supersessionFactor(l.supersededBy.length) };
@@ -49020,7 +49042,12 @@ var init_mcp = __esm({
49020
49042
  await rankHits(store, query, pool.map((h) => ({ ...h, name: h.description, ...h.via?.text ? { viaText: h.via.text } : {}, ...parentOf.has(h.id) ? { parentId: parentOf.get(h.id) } : {}, hops: h.matched ? 0 : 1 }))),
49021
49043
  isKnowledge,
49022
49044
  limit
49023
- ).map(({ rank, ...h }) => ({ ...h, why: rankWhy(rank), ...isKnowledge(h.label) ? { cite: h.id } : {} }));
49045
+ ).map(({ rank, ...h }) => ({
49046
+ ...h,
49047
+ why: rankWhy(rank),
49048
+ ...lifecycleFields(store, h.id),
49049
+ ...isKnowledge(h.label) ? { cite: h.id } : {}
49050
+ }));
49024
49051
  if (ctx.cloud && query.trim()) {
49025
49052
  const localHits = pool.map((h) => ({
49026
49053
  id: h.id,
@@ -49059,7 +49086,17 @@ var init_mcp = __esm({
49059
49086
  count: formatted.length,
49060
49087
  corroborated: dual.merged.corroboratedCount,
49061
49088
  collective: dual.merged.collectiveCount,
49062
- results: withLinks(store, withCite(formatted.map((r) => ({ ...r, why: why.get(String(r["id"])) })), isKnowledge))
49089
+ results: withLinks(
49090
+ store,
49091
+ withCite(
49092
+ formatted.map((r) => ({
49093
+ ...r,
49094
+ why: why.get(String(r["id"])),
49095
+ ...lifecycleFields(store, String(r["id"]), dual.cloudEvidence.get(String(r["id"])))
49096
+ })),
49097
+ isKnowledge
49098
+ )
49099
+ )
49063
49100
  };
49064
49101
  }
49065
49102
  const local = withLinks(store, await rankLocal());
@@ -88150,7 +88187,7 @@ function createWatchBreaker(deps) {
88150
88187
  }
88151
88188
 
88152
88189
  // src/engine.ts
88153
- var DAEMON_VERSION = true ? "2.0.23-dev.4826" : "2.0.0-alpha.0";
88190
+ var DAEMON_VERSION = true ? "2.0.23-dev.4829" : "2.0.0-alpha.0";
88154
88191
  var IGNORED_PATH = /[\\/](?:\.git|node_modules|\.errata|\.claude|\.codex|\.cursor|\.turbo|\.next|dist|coverage|test-results|playwright-report|__pycache__)(?:[\\/]|$)/;
88155
88192
  var IGNORED_NOISE = /castalia\.db|eventlog\.sqlite|turn-cursors/;
88156
88193
  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.23-dev.4826",
3
+ "version": "2.0.23-dev.4829",
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.23-dev.4826",
3
+ "version": "2.0.23-dev.4829",
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
- 560fd81882423ce60885095034e173ba7b0fb9b4b194f213f296f6c6e46c3105 .codex-plugin/plugin.json
1
+ 631199aea4bbc922dda655b9513a7e061a1eb201470661d521e6a8ebd297ca3c .codex-plugin/plugin.json
2
2
  a7bebae9fb01c838d6c75fc784129e28be571233fa66ff5ee8039b574f35ccf7 assets/icon.png
3
3
  fc38b64e4df1e0b72c35764bef6c4c05430d97c9009ad0ecc8a9e75b4deab232 configure-local.mjs
4
4
  73dc6028b3b070257c7c31f252d11e55a9e096f4aed0f187f10cb21716e1e6d7 dist/client.js