@inerrata-corporation/errata 2.0.2-dev.1024 → 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 +17 -5
  2. package/package.json +1 -1
package/errata.mjs CHANGED
@@ -56442,7 +56442,7 @@ function createLivenessWatch(deps) {
56442
56442
  }
56443
56443
 
56444
56444
  // src/engine.ts
56445
- var DAEMON_VERSION = true ? "2.0.2-dev.1024" : "2.0.0-alpha.0";
56445
+ var DAEMON_VERSION = true ? "2.0.2-dev.1066" : "2.0.0-alpha.0";
56446
56446
  var IGNORED_PATH = /[\\/](?:\.git|node_modules|\.errata|\.claude|\.codex|\.cursor|\.turbo|\.next|dist|coverage|test-results|playwright-report|__pycache__)(?:[\\/]|$)/;
56447
56447
  var IGNORED_NOISE = /castalia\.db|eventlog\.sqlite|turn-cursors/;
56448
56448
  var GIT_OP_MUTE_MS = 4e3;
@@ -56948,6 +56948,7 @@ function createWorkspaceEngine(opts) {
56948
56948
  contextDirty = false;
56949
56949
  notifyDigest("recall");
56950
56950
  };
56951
+ const normStackTokens = (xs) => (xs ?? []).map((t) => t.trim().toLowerCase().replace(/(?!^)[@\s].*$/, "")).filter(Boolean);
56951
56952
  const maybeRefreshRemotePriors = () => {
56952
56953
  if (opts.skipContextWriter || remoteInFlight) return;
56953
56954
  const now = Date.now();
@@ -56958,10 +56959,13 @@ function createWorkspaceEngine(opts) {
56958
56959
  remoteInFlight = true;
56959
56960
  lastRemoteAt = now;
56960
56961
  try {
56961
- const norm = (xs) => (xs ?? []).map((t) => t.trim().toLowerCase().replace(/(?!^)[@\s].*$/, "")).filter(Boolean);
56962
+ const norm = normStackTokens;
56962
56963
  const seed = store.findNodesByLabel("Problem").sort((a, b) => b.lastUpdatedAt - a.lastUpdatedAt).slice(0, 6).map((p) => p.id);
56963
56964
  const q = {
56964
- 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 ?? []]),
56965
56969
  domains: norm(profile.domains),
56966
56970
  kinds: ["Pattern", "Technique", "AntiPattern"],
56967
56971
  ...seed.length ? { seed } : {},
@@ -56990,8 +56994,16 @@ function createWorkspaceEngine(opts) {
56990
56994
  if (typeof cloud.search !== "function") return;
56991
56995
  intentRemoteInFlight = true;
56992
56996
  cloud.search({
56993
- stack: [],
56994
- 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 ?? []),
56995
57007
  kinds: ["Pattern", "Technique", "AntiPattern", "Problem", "Solution"],
56996
57008
  q: liveIntent,
56997
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.1024",
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": {