@inerrata-corporation/errata 2.0.2-dev.249 → 2.0.2-dev.261
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 +29 -27
- package/package.json +1 -1
package/errata.mjs
CHANGED
|
@@ -18509,14 +18509,19 @@ function mintCitedPackageNode(store, ref, ts) {
|
|
|
18509
18509
|
function mintComponentNode(store, name2, ts) {
|
|
18510
18510
|
const display = name2.replace(/\s+/g, " ").trim();
|
|
18511
18511
|
const slug2 = display.toLowerCase();
|
|
18512
|
-
|
|
18512
|
+
const canonicalId = genericCanonicalId("comp", { type: "Component", description: display });
|
|
18513
|
+
const existing = store.getNode(slug2);
|
|
18514
|
+
if (!existing) {
|
|
18513
18515
|
store.mergeNode(
|
|
18514
18516
|
buildNode(slug2, "Component", display, ts, {
|
|
18515
18517
|
name: display,
|
|
18516
18518
|
source: "convo",
|
|
18517
|
-
provisional: true
|
|
18519
|
+
provisional: true,
|
|
18520
|
+
canonicalId
|
|
18518
18521
|
})
|
|
18519
18522
|
);
|
|
18523
|
+
} else if (typeof existing.attrs["canonicalId"] !== "string") {
|
|
18524
|
+
store.updateNode(slug2, { attrs: { ...existing.attrs, canonicalId }, lastUpdatedAt: ts });
|
|
18520
18525
|
}
|
|
18521
18526
|
return slug2;
|
|
18522
18527
|
}
|
|
@@ -26754,7 +26759,7 @@ function bindCanonicalNeighbors(store, opts) {
|
|
|
26754
26759
|
picked.push(cand);
|
|
26755
26760
|
}
|
|
26756
26761
|
for (const { c, s } of picked) {
|
|
26757
|
-
const type = c.label === "Pattern" ? "INSTANCE_OF" : "
|
|
26762
|
+
const type = c.label === "Pattern" ? "INSTANCE_OF" : "RELATES_TO";
|
|
26758
26763
|
store.mergeEdge({
|
|
26759
26764
|
id: `edge_${digest({ from: p.id, type, to: c.id, k: "canonBind" })}`.slice(0, 24),
|
|
26760
26765
|
from: p.id,
|
|
@@ -52659,7 +52664,7 @@ function startLoopLagMonitor(thresholdMs = 1e3) {
|
|
|
52659
52664
|
}
|
|
52660
52665
|
|
|
52661
52666
|
// src/engine.ts
|
|
52662
|
-
var DAEMON_VERSION = true ? "2.0.2-dev.
|
|
52667
|
+
var DAEMON_VERSION = true ? "2.0.2-dev.261" : "2.0.0-alpha.0";
|
|
52663
52668
|
var IGNORED_PATH = /[\\/](?:\.git|node_modules|\.errata|\.claude|\.codex|\.cursor|\.turbo|\.next|dist|coverage|test-results|playwright-report|__pycache__)(?:[\\/]|$)/;
|
|
52664
52669
|
var IGNORED_NOISE = /castalia\.db|eventlog\.sqlite|turn-cursors/;
|
|
52665
52670
|
var GIT_OP_MUTE_MS = 4e3;
|
|
@@ -54531,6 +54536,14 @@ function contributedWireId(n) {
|
|
|
54531
54536
|
const cloudId = n.attrs["cloudNodeId"];
|
|
54532
54537
|
return isMembraneSaltedId(cloudId) ? cloudId : n.id;
|
|
54533
54538
|
}
|
|
54539
|
+
var WIRE_CANONICAL_ID_MIN = 6;
|
|
54540
|
+
function unshippableReason(n) {
|
|
54541
|
+
const canonical = typeof n.attrs?.["canonicalId"] === "string" ? n.attrs["canonicalId"] : n.id;
|
|
54542
|
+
if (canonical.length < WIRE_CANONICAL_ID_MIN) {
|
|
54543
|
+
return `canonicalId "${canonical}" is ${canonical.length} chars; the door requires >= ${WIRE_CANONICAL_ID_MIN}`;
|
|
54544
|
+
}
|
|
54545
|
+
return null;
|
|
54546
|
+
}
|
|
54534
54547
|
function wireContextId(n) {
|
|
54535
54548
|
if (n.label === "Language" && n.attrs["source"] !== "cloud") {
|
|
54536
54549
|
const name2 = String(n.attrs["name"] ?? "").trim() || n.description.trim() || n.id.replace(/^lang:/, "");
|
|
@@ -54553,7 +54566,7 @@ function shareableContext(n, wireId) {
|
|
|
54553
54566
|
name: n.attrs["name"],
|
|
54554
54567
|
ecosystem: n.attrs["ecosystem"],
|
|
54555
54568
|
resolved: n.attrs["resolved"]
|
|
54556
|
-
} : n.label === "Domain" ? { name: n.description, canonicalId: n.attrs["canonicalId"] } : { name: n.attrs["name"] };
|
|
54569
|
+
} : n.label === "Domain" ? { name: n.description, canonicalId: n.attrs["canonicalId"] } : n.label === "Component" ? { name: n.attrs["name"], canonicalId: n.attrs["canonicalId"] } : { name: n.attrs["name"] };
|
|
54557
54570
|
return {
|
|
54558
54571
|
...n,
|
|
54559
54572
|
id: wireId,
|
|
@@ -54606,14 +54619,13 @@ function buildInstanceIngest(store, profile, daemonVersion, ignorePatterns = [],
|
|
|
54606
54619
|
semanticEndpoints.set(n.id, contributedWireId(n));
|
|
54607
54620
|
continue;
|
|
54608
54621
|
}
|
|
54609
|
-
if (label === "Solution" && n.description.startsWith(AUTO_MINT_PREFIX))
|
|
54610
|
-
const problemShippable = store.inEdges(n.id, ["SOLVED_BY"]).some((e) => {
|
|
54611
|
-
const p = store.getNode(e.from);
|
|
54612
|
-
return p?.label === "Problem" && (seen.has(p.id) || typeof p.attrs["contributedAtSeq"] === "number");
|
|
54613
|
-
});
|
|
54614
|
-
if (!problemShippable) continue;
|
|
54615
|
-
}
|
|
54622
|
+
if (label === "Solution" && n.description.startsWith(AUTO_MINT_PREFIX)) continue;
|
|
54616
54623
|
if (!noveltyAgainst(n, ref, noveltyOpts).ready) continue;
|
|
54624
|
+
const reject = unshippableReason(n);
|
|
54625
|
+
if (reject) {
|
|
54626
|
+
console.warn(`[errata] skipping unshippable node ${n.id} (${n.label}): ${reject}`);
|
|
54627
|
+
continue;
|
|
54628
|
+
}
|
|
54617
54629
|
ref.push(n);
|
|
54618
54630
|
const wireNode = shareable(n);
|
|
54619
54631
|
nodes.push(wireNode);
|
|
@@ -54663,6 +54675,11 @@ function buildInstanceIngest(store, profile, daemonVersion, ignorePatterns = [],
|
|
|
54663
54675
|
anchorDigests[sourceId] = dg;
|
|
54664
54676
|
const wireFrom = seen.has(sourceId) || !sourceNode ? sourceId : contributedWireId(sourceNode);
|
|
54665
54677
|
for (const { e, t, wireId } of targets) {
|
|
54678
|
+
const reject = unshippableReason({ id: wireId, label: t.label, attrs: t.attrs });
|
|
54679
|
+
if (reject) {
|
|
54680
|
+
console.warn(`[errata] skipping unshippable anchor ${wireId} (${t.label}): ${reject}`);
|
|
54681
|
+
continue;
|
|
54682
|
+
}
|
|
54666
54683
|
anchorEdges.push({ ...e, from: wireFrom, to: wireId, attrs: {} });
|
|
54667
54684
|
if (t.attrs["source"] === "cloud" || contextSeen.has(wireId)) continue;
|
|
54668
54685
|
contextSeen.add(wireId);
|
|
@@ -54678,21 +54695,6 @@ function buildInstanceIngest(store, profile, daemonVersion, ignorePatterns = [],
|
|
|
54678
54695
|
}
|
|
54679
54696
|
}
|
|
54680
54697
|
}
|
|
54681
|
-
for (const [localId, shipped] of shippedById) {
|
|
54682
|
-
const local = store.getNode(localId);
|
|
54683
|
-
if (!local || local.label !== "Solution" || !local.description.startsWith(AUTO_MINT_PREFIX)) continue;
|
|
54684
|
-
const problem = store.inEdges(localId, ["SOLVED_BY"]).map((e) => store.getNode(e.from)).find((p) => p?.label === "Problem");
|
|
54685
|
-
if (!problem) continue;
|
|
54686
|
-
const inBatch = shippedById.get(problem.id);
|
|
54687
|
-
if (inBatch) {
|
|
54688
|
-
if (inBatch.anchorVisibility) shipped.anchorVisibility = inBatch.anchorVisibility;
|
|
54689
|
-
if (inBatch.anchor != null) shipped.anchor = inBatch.anchor;
|
|
54690
|
-
else delete shipped.anchor;
|
|
54691
|
-
} else if (isMembraneSaltedId(problem.attrs["cloudNodeId"])) {
|
|
54692
|
-
shipped.anchorVisibility = "private";
|
|
54693
|
-
delete shipped.anchor;
|
|
54694
|
-
}
|
|
54695
|
-
}
|
|
54696
54698
|
const project = opts.project;
|
|
54697
54699
|
if (project) {
|
|
54698
54700
|
const now = Date.now();
|