@inerrata-corporation/errata 2.0.0-dev.27 → 2.0.0-dev.28

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 +40 -6
  2. package/package.json +1 -1
package/errata.mjs CHANGED
@@ -19760,6 +19760,9 @@ function renderSnapshot(s) {
19760
19760
  lines.push("- `(fix:[id])` \u2014 your edit fixed a problem errata showed you (ids appear in the priors below / in file priors)");
19761
19761
  lines.push("Tag every one you state \u2014 we filter downstream, so don't self-censor or batch. This is the witness only you can give; untagged, it's lost.");
19762
19762
  lines.push("");
19763
+ lines.push(SEARCH_IMPERATIVE_HEADER);
19764
+ lines.push(SEARCH_IMPERATIVE_BODY);
19765
+ lines.push("");
19763
19766
  lines.push(`### Active workspace profile`);
19764
19767
  lines.push(`- **Name:** ${s.profile.name}`);
19765
19768
  const ctxTag = (e) => e.node && s.edgeElicitation ? `${e.name} \`[${priorHandle(e.node)}]\`` : e.name;
@@ -19809,7 +19812,7 @@ function renderSnapshot(s) {
19809
19812
  lines.push("- _none yet \u2014 errata is still building its model_");
19810
19813
  } else {
19811
19814
  if (s.recentProblems.length > 0) {
19812
- lines.push("_Open \u2014 what errata knows is currently broken here, derived from your work:_");
19815
+ lines.push("_Open \u2014 recently observed here, derived from your work (a recency slice, not an inventory \u2014 burst an id for its full neighborhood):_");
19813
19816
  for (const r of s.recentProblems) {
19814
19817
  lines.push(`- **${r.node.description}** \u2014 \`${r.node.id}\`${tagOf(r.node)}`);
19815
19818
  const hits = r.node.cumulativeHits ?? 0;
@@ -19840,7 +19843,7 @@ function renderSnapshot(s) {
19840
19843
  }
19841
19844
  lines.push("");
19842
19845
  }
19843
- lines.push("### Relevant prior knowledge from the shared graph");
19846
+ lines.push("### Prior knowledge sampled from the shared graph");
19844
19847
  if (s.motifs.length === 0) {
19845
19848
  lines.push("- _no motif matches yet \u2014 cold-start ingest pending_");
19846
19849
  } else {
@@ -19852,7 +19855,7 @@ function renderSnapshot(s) {
19852
19855
  if (s.remote && s.remote.length > 0) {
19853
19856
  lines.push("### From the Errata Network \u2014 collective priors");
19854
19857
  lines.push(
19855
- "_Knowledge from OTHER codebases facing your stack/domain, pulled live from the shared Network (not yet local). Weigh accordingly \u2014 it's corroborated across teams, but not from this repo._"
19858
+ "_A small sample of knowledge from OTHER codebases facing your stack/domain (not yet local \u2014 the Network holds far more; these ids seed deeper bursts). Weigh accordingly \u2014 it's corroborated across teams, but not from this repo._"
19856
19859
  );
19857
19860
  for (const m of s.remote) {
19858
19861
  lines.push(`- **${m.label}:** ${m.description}${tagOf(m)}`);
@@ -19968,12 +19971,14 @@ _${dropped} lower-priority item${dropped === 1 ? "" : "s"} omitted to fit the pa
19968
19971
  }
19969
19972
  return { body: body2, snapshot, dropped };
19970
19973
  }
19971
- var EVICTION_ORDER, DEFAULT_AGENT_CONTEXT_BUDGET;
19974
+ var SEARCH_IMPERATIVE_HEADER, SEARCH_IMPERATIVE_BODY, EVICTION_ORDER, DEFAULT_AGENT_CONTEXT_BUDGET;
19972
19975
  var init_render = __esm({
19973
19976
  "../../packages/context-writer/src/render.ts"() {
19974
19977
  "use strict";
19975
19978
  init_src4();
19976
19979
  init_src2();
19980
+ SEARCH_IMPERATIVE_HEADER = "### \u{1F50E} PRIORS ARE SEEDS \u2014 a sample, not the whole graph";
19981
+ SEARCH_IMPERATIVE_BODY = "Everything below is a budgeted, top-of-head slice of a much larger graph. Any prior id below is a live burst seed: `errata.burst` it (or read `.errata/g/burst/<id>`) to pull its wider neighborhood \u2014 causes, fixes, siblings. When a prior is adjacent-but-not-quite, or none fit, that gap is exactly when to search deeper before solving cold: a stuck search is itself a signal that routes help to you.";
19977
19982
  EVICTION_ORDER = [
19978
19983
  "skills",
19979
19984
  "motifs",
@@ -34726,7 +34731,36 @@ var init_mcp = __esm({
34726
34731
  },
34727
34732
  handler: async (args2, store, ctx) => {
34728
34733
  const id = resolveSymbol2(store, args2);
34729
- if (!id) return unresolved(args2);
34734
+ if (!id) {
34735
+ const seedId = typeof args2["nodeId"] === "string" ? args2["nodeId"] : null;
34736
+ if (seedId && ctx.cloud) {
34737
+ const res = await ctx.cloud.search({
34738
+ stack: [],
34739
+ domains: [],
34740
+ kinds: [],
34741
+ seed: [seedId],
34742
+ limit: args2["limit"] != null ? Number(args2["limit"]) : 20
34743
+ }).catch(() => null);
34744
+ if (res && res.nodes.length > 0) {
34745
+ return {
34746
+ seed: seedId,
34747
+ seedProvenance: "collective",
34748
+ collectiveReachable: true,
34749
+ collectiveStatus: "cloud-seed",
34750
+ count: res.nodes.length,
34751
+ results: res.nodes.map((n) => ({
34752
+ id: n.id,
34753
+ label: n.label,
34754
+ name: n.description,
34755
+ score: Number((n.extractionConfidence ?? 0.5).toFixed(4)),
34756
+ hops: 1,
34757
+ provenance: "collective"
34758
+ }))
34759
+ };
34760
+ }
34761
+ }
34762
+ return unresolved(args2);
34763
+ }
34730
34764
  const ranked = localBurst(store, id, {
34731
34765
  ...args2["maxHops"] != null ? { maxHops: Number(args2["maxHops"]) } : {},
34732
34766
  ...args2["limit"] != null ? { limit: Number(args2["limit"]) } : {}
@@ -41282,7 +41316,7 @@ function maybeFlushDigests() {
41282
41316
  }
41283
41317
 
41284
41318
  // src/engine.ts
41285
- var DAEMON_VERSION = true ? "2.0.0-dev.27" : "2.0.0-alpha.0";
41319
+ var DAEMON_VERSION = true ? "2.0.0-dev.28" : "2.0.0-alpha.0";
41286
41320
  var IGNORED_PATH = /[\\/](?:\.git|node_modules|\.errata|\.claude|\.codex|\.cursor|\.turbo|\.next|dist|coverage|test-results|playwright-report|__pycache__)(?:[\\/]|$)/;
41287
41321
  var IGNORED_NOISE = /castalia\.db|eventlog\.sqlite|turn-cursors/;
41288
41322
  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.0-dev.27",
3
+ "version": "2.0.0-dev.28",
4
4
  "description": "errata - local-first observation engine for AI coding agents",
5
5
  "type": "module",
6
6
  "bin": {