@inerrata-corporation/errata 2.0.2-dev.1020 → 2.0.2-dev.1066

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 +24 -11
  2. package/package.json +1 -1
package/errata.mjs CHANGED
@@ -115,12 +115,13 @@ var init_castalia = __esm({
115
115
  "promotion-gate-denied",
116
116
  /** The spine did not confirm a public anchor. `routingProbeFailed` says
117
117
  * whether that was a verdict or a blind spot. */
118
- "spine-private",
119
- /** D2 a node derived from a knowledge_reports row inherited that row's
120
- * stored scope (report extraction routed through the membrane instead of
121
- * hardcoding public). No spine probe runs on this path yet, so the anchor
122
- * verdict stays null and heal-on-touch supplies it later. */
123
- "report-scope-inherited"
118
+ "spine-private"
119
+ // NOTE: no `report-*` reason. Report-extracted nodes (D2) go through the same
120
+ // `routeOrgVisibility` decision as every other write, with the row's stored
121
+ // scope as the enforced target, so they carry `signed-target-*` /
122
+ // `harness-clamp` like anything else. The first D2 router (!1526) minted a
123
+ // `report-scope-inherited` reason from a scope field-copy; it was retired
124
+ // 2026-08-15 with zero nodes carrying it (dev count 0; prod extraction off).
124
125
  ];
125
126
  CONTEXT_NODE_LABELS = [
126
127
  "Language",
@@ -56441,7 +56442,7 @@ function createLivenessWatch(deps) {
56441
56442
  }
56442
56443
 
56443
56444
  // src/engine.ts
56444
- var DAEMON_VERSION = true ? "2.0.2-dev.1020" : "2.0.0-alpha.0";
56445
+ var DAEMON_VERSION = true ? "2.0.2-dev.1066" : "2.0.0-alpha.0";
56445
56446
  var IGNORED_PATH = /[\\/](?:\.git|node_modules|\.errata|\.claude|\.codex|\.cursor|\.turbo|\.next|dist|coverage|test-results|playwright-report|__pycache__)(?:[\\/]|$)/;
56446
56447
  var IGNORED_NOISE = /castalia\.db|eventlog\.sqlite|turn-cursors/;
56447
56448
  var GIT_OP_MUTE_MS = 4e3;
@@ -56947,6 +56948,7 @@ function createWorkspaceEngine(opts) {
56947
56948
  contextDirty = false;
56948
56949
  notifyDigest("recall");
56949
56950
  };
56951
+ const normStackTokens = (xs) => (xs ?? []).map((t) => t.trim().toLowerCase().replace(/(?!^)[@\s].*$/, "")).filter(Boolean);
56950
56952
  const maybeRefreshRemotePriors = () => {
56951
56953
  if (opts.skipContextWriter || remoteInFlight) return;
56952
56954
  const now = Date.now();
@@ -56957,10 +56959,13 @@ function createWorkspaceEngine(opts) {
56957
56959
  remoteInFlight = true;
56958
56960
  lastRemoteAt = now;
56959
56961
  try {
56960
- const norm = (xs) => (xs ?? []).map((t) => t.trim().toLowerCase().replace(/(?!^)[@\s].*$/, "")).filter(Boolean);
56962
+ const norm = normStackTokens;
56961
56963
  const seed = store.findNodesByLabel("Problem").sort((a, b) => b.lastUpdatedAt - a.lastUpdatedAt).slice(0, 6).map((p) => p.id);
56962
56964
  const q = {
56963
- stack: norm(profile.stack),
56965
+ // Languages ride the stack list: the cloud's context-affinity matcher
56966
+ // resolves each token against both the Package and Language
56967
+ // namespaces, and the profile keeps them in separate fields.
56968
+ stack: norm([...profile.stack ?? [], ...profile.languages ?? []]),
56964
56969
  domains: norm(profile.domains),
56965
56970
  kinds: ["Pattern", "Technique", "AntiPattern"],
56966
56971
  ...seed.length ? { seed } : {},
@@ -56989,8 +56994,16 @@ function createWorkspaceEngine(opts) {
56989
56994
  if (typeof cloud.search !== "function") return;
56990
56995
  intentRemoteInFlight = true;
56991
56996
  cloud.search({
56992
- stack: [],
56993
- domains: [],
56997
+ // VS-context-affinity: the intent lane used to send an empty context
56998
+ // while the priming lane sent the profile — opposite postures on the
56999
+ // same method. Under "union derived + stated, canonicalize once"
57000
+ // (VS-intent-fence) the stated intent IS the query and the derived
57001
+ // stack rides along as structured relevanceContext: the cloud no
57002
+ // longer concatenates these tokens into the embedding string, it
57003
+ // re-weights anchored hits with them (stated beats derived — the
57004
+ // intent text drives entry search, the stack only re-ranks).
57005
+ stack: normStackTokens([...profile?.stack ?? [], ...profile?.languages ?? []]),
57006
+ domains: normStackTokens(profile?.domains ?? []),
56994
57007
  kinds: ["Pattern", "Technique", "AntiPattern", "Problem", "Solution"],
56995
57008
  q: liveIntent,
56996
57009
  channel: "intent",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inerrata-corporation/errata",
3
- "version": "2.0.2-dev.1020",
3
+ "version": "2.0.2-dev.1066",
4
4
  "description": "errata - local-first observation engine for AI coding agents",
5
5
  "type": "module",
6
6
  "bin": {