@inerrata-corporation/errata 2.0.2-dev.73 → 2.0.2-dev.77
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 +18 -4
- package/package.json +1 -1
package/errata.mjs
CHANGED
|
@@ -51681,7 +51681,7 @@ function startLoopLagMonitor(thresholdMs = 1e3) {
|
|
|
51681
51681
|
}
|
|
51682
51682
|
|
|
51683
51683
|
// src/engine.ts
|
|
51684
|
-
var DAEMON_VERSION = true ? "2.0.2-dev.
|
|
51684
|
+
var DAEMON_VERSION = true ? "2.0.2-dev.77" : "2.0.0-alpha.0";
|
|
51685
51685
|
var IGNORED_PATH = /[\\/](?:\.git|node_modules|\.errata|\.claude|\.codex|\.cursor|\.turbo|\.next|dist|coverage|test-results|playwright-report|__pycache__)(?:[\\/]|$)/;
|
|
51686
51686
|
var IGNORED_NOISE = /castalia\.db|eventlog\.sqlite|turn-cursors/;
|
|
51687
51687
|
var GIT_OP_MUTE_MS = 4e3;
|
|
@@ -53394,6 +53394,10 @@ function wireContextId(n) {
|
|
|
53394
53394
|
}
|
|
53395
53395
|
return n.id;
|
|
53396
53396
|
}
|
|
53397
|
+
function langAnchor(t) {
|
|
53398
|
+
const name2 = String(t.attrs["name"] ?? "").trim() || t.description.trim() || t.id.replace(/^lang:/, "").trim();
|
|
53399
|
+
return name2 ? `lang:${name2.toLowerCase()}` : void 0;
|
|
53400
|
+
}
|
|
53397
53401
|
function shareableContext(n, wireId) {
|
|
53398
53402
|
const attrs = n.label === "Package" ? {
|
|
53399
53403
|
// No `version` attr: the purl encodes it, and the door's temporal
|
|
@@ -53408,7 +53412,8 @@ function shareableContext(n, wireId) {
|
|
|
53408
53412
|
id: wireId,
|
|
53409
53413
|
embedding: [],
|
|
53410
53414
|
attrs,
|
|
53411
|
-
...n.label === "Package"
|
|
53415
|
+
...n.label === "Package" ? { anchorVisibility: "public" } : {},
|
|
53416
|
+
...n.label === "Language" && langAnchor(n) ? { anchorVisibility: "public", anchor: langAnchor(n) } : {}
|
|
53412
53417
|
};
|
|
53413
53418
|
}
|
|
53414
53419
|
function buildInstanceIngest(store, profile, daemonVersion, ignorePatterns = [], opts = {}) {
|
|
@@ -53476,8 +53481,8 @@ function buildInstanceIngest(store, profile, daemonVersion, ignorePatterns = [],
|
|
|
53476
53481
|
if (targets.length === 0) continue;
|
|
53477
53482
|
const shipped = shippedById.get(sourceId);
|
|
53478
53483
|
if (shipped) {
|
|
53479
|
-
const
|
|
53480
|
-
const anchor =
|
|
53484
|
+
const anchors = (label) => targets.filter((x) => x.t.label === label).map((x) => label === "Language" ? langAnchor(x.t) : x.wireId).filter((a) => a != null).sort();
|
|
53485
|
+
const anchor = anchors("Package")[0] ?? anchors("Language")[0];
|
|
53481
53486
|
if (anchor) {
|
|
53482
53487
|
shipped.anchorVisibility = "public";
|
|
53483
53488
|
shipped.anchor = anchor;
|
|
@@ -53496,6 +53501,15 @@ function buildInstanceIngest(store, profile, daemonVersion, ignorePatterns = [],
|
|
|
53496
53501
|
contextNodes.push(shareableContext(t, wireId));
|
|
53497
53502
|
}
|
|
53498
53503
|
}
|
|
53504
|
+
const primaryLang = (profile.languages ?? []).map((l) => String(l).trim().toLowerCase()).filter(Boolean)[0];
|
|
53505
|
+
if (primaryLang) {
|
|
53506
|
+
for (const shipped of shippedById.values()) {
|
|
53507
|
+
if (!shipped.anchorVisibility) {
|
|
53508
|
+
shipped.anchorVisibility = "public";
|
|
53509
|
+
shipped.anchor = `lang:${primaryLang}`;
|
|
53510
|
+
}
|
|
53511
|
+
}
|
|
53512
|
+
}
|
|
53499
53513
|
const project = opts.project;
|
|
53500
53514
|
if (project) {
|
|
53501
53515
|
const now = Date.now();
|