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

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 +21 -5
  2. package/package.json +1 -1
package/errata.mjs CHANGED
@@ -50740,7 +50740,9 @@ function generalizeRouteForSync(edge2, level) {
50740
50740
  navFailures: 0
50741
50741
  };
50742
50742
  }
50743
- function buildTriageIngest(shared, daemonVersion, ignorePatterns = [], level = 2) {
50743
+ function buildTriageIngest(shared, daemonVersion, ignorePatterns = [], level = 2, opts = {}) {
50744
+ const lang = opts.primaryLanguage?.trim().toLowerCase();
50745
+ const claim = lang ? { anchorVisibility: "public", anchor: `lang:${lang}` } : {};
50744
50746
  const nodes = [];
50745
50747
  const edges = [];
50746
50748
  const seenIds = /* @__PURE__ */ new Set();
@@ -50753,7 +50755,8 @@ function buildTriageIngest(shared, daemonVersion, ignorePatterns = [], level = 2
50753
50755
  ...n,
50754
50756
  description: generalize(n.description, { level }).text,
50755
50757
  embedding: [],
50756
- attrs: { scope: {} }
50758
+ attrs: { scope: {} },
50759
+ ...claim
50757
50760
  });
50758
50761
  };
50759
50762
  for (const tri of shared.findNodesByLabel("Triage")) {
@@ -50769,7 +50772,8 @@ function buildTriageIngest(shared, daemonVersion, ignorePatterns = [], level = 2
50769
50772
  attrs: {
50770
50773
  ...statement ? { statement: generalize(statement, { level }).text } : {},
50771
50774
  ...tri.attrs["perContextSeen"] ? { perContextSeen: tri.attrs["perContextSeen"] } : {}
50772
- }
50775
+ },
50776
+ ...claim
50773
50777
  });
50774
50778
  }
50775
50779
  for (const tb of shared.inEdges(tri.id, ["TRIAGED_BY"])) {
@@ -51808,7 +51812,7 @@ function startLoopLagMonitor(thresholdMs = 1e3) {
51808
51812
  }
51809
51813
 
51810
51814
  // src/engine.ts
51811
- var DAEMON_VERSION = true ? "2.0.2-dev.95" : "2.0.0-alpha.0";
51815
+ var DAEMON_VERSION = true ? "2.0.2-dev.99" : "2.0.0-alpha.0";
51812
51816
  var IGNORED_PATH = /[\\/](?:\.git|node_modules|\.errata|\.claude|\.codex|\.cursor|\.turbo|\.next|dist|coverage|test-results|playwright-report|__pycache__)(?:[\\/]|$)/;
51813
51817
  var IGNORED_NOISE = /castalia\.db|eventlog\.sqlite|turn-cursors/;
51814
51818
  var GIT_OP_MUTE_MS = 4e3;
@@ -54791,7 +54795,19 @@ async function startMultiDaemon(opts = {}) {
54791
54795
  async syncTriagePublic() {
54792
54796
  if (!loadConfig().consent.sync) return { uploaded: 0, skipped: "consent-off" };
54793
54797
  const ignore = loadClaimIgnorePatterns(globalDir());
54794
- const payload = buildTriageIngest(sharedStore, DAEMON_VERSION, ignore);
54798
+ const langCounts = /* @__PURE__ */ new Map();
54799
+ for (const r of records) {
54800
+ for (const l of r.engine.profile.languages ?? []) {
54801
+ const k = String(l).trim().toLowerCase();
54802
+ if (k) langCounts.set(k, (langCounts.get(k) ?? 0) + 1);
54803
+ }
54804
+ }
54805
+ const primaryLanguage = [...langCounts.entries()].sort(
54806
+ (a, b) => b[1] - a[1] || (a[0] < b[0] ? -1 : 1)
54807
+ )[0]?.[0];
54808
+ const payload = buildTriageIngest(sharedStore, DAEMON_VERSION, ignore, 2, {
54809
+ ...primaryLanguage ? { primaryLanguage } : {}
54810
+ });
54795
54811
  if (!payload) return { uploaded: 0 };
54796
54812
  const res = await cloudNow().ingest(payload);
54797
54813
  return { uploaded: res.accepted };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inerrata-corporation/errata",
3
- "version": "2.0.2-dev.95",
3
+ "version": "2.0.2-dev.99",
4
4
  "description": "errata - local-first observation engine for AI coding agents",
5
5
  "type": "module",
6
6
  "bin": {