@inerrata-corporation/errata 2.0.2-dev.165 → 2.0.2-dev.169
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 +22 -6
- package/package.json +1 -1
package/errata.mjs
CHANGED
|
@@ -22203,10 +22203,13 @@ var init_client = __esm({
|
|
|
22203
22203
|
}
|
|
22204
22204
|
/** Pull cloud-induced skills + the session-bootstrap prime payload. `seed` is the
|
|
22205
22205
|
* canonical ids of the agent's recent problems — the cloud ranks the skills whose
|
|
22206
|
-
* motifs those problems match first (the rest are baseline).
|
|
22207
|
-
|
|
22206
|
+
* motifs those problems match first (the rest are baseline). `techSeed`
|
|
22207
|
+
* (CL-tech-bridge) is the workspace's spine tech ids (`lang:<slug>`, purls) —
|
|
22208
|
+
* a secondary relevance signal that also covers the zero-problem cold start. */
|
|
22209
|
+
async getSkills(context = "daemon skill sync", seed, techSeed) {
|
|
22208
22210
|
const qs = new URLSearchParams({ context });
|
|
22209
22211
|
if (seed && seed.length > 0) qs.set("seed", seed.join(","));
|
|
22212
|
+
if (techSeed && techSeed.length > 0) qs.set("techSeed", techSeed.join(","));
|
|
22210
22213
|
if (this.daemonVersion) qs.set("daemonVersion", this.daemonVersion);
|
|
22211
22214
|
if (this.daemonChannel) qs.set("daemonChannel", this.daemonChannel);
|
|
22212
22215
|
return this.json("GET", `/v2/skills?${qs.toString()}`);
|
|
@@ -51358,8 +51361,8 @@ function readSkillManifest(manifestPath) {
|
|
|
51358
51361
|
return [];
|
|
51359
51362
|
}
|
|
51360
51363
|
}
|
|
51361
|
-
async function syncSkills(paths, client, seed, pins = []) {
|
|
51362
|
-
const res = await client.getSkills(void 0, seed);
|
|
51364
|
+
async function syncSkills(paths, client, seed, pins = [], techSeed) {
|
|
51365
|
+
const res = await client.getSkills(void 0, seed, techSeed);
|
|
51363
51366
|
const staleDaemon = res.staleDaemon && res.latestDaemonVersion ? { latest: res.latestDaemonVersion } : void 0;
|
|
51364
51367
|
mkdirSync6(paths.skillsDir, { recursive: true });
|
|
51365
51368
|
if (res.skills.length === 0 && pins.length === 0) {
|
|
@@ -52036,7 +52039,7 @@ function startLoopLagMonitor(thresholdMs = 1e3) {
|
|
|
52036
52039
|
}
|
|
52037
52040
|
|
|
52038
52041
|
// src/engine.ts
|
|
52039
|
-
var DAEMON_VERSION = true ? "2.0.2-dev.
|
|
52042
|
+
var DAEMON_VERSION = true ? "2.0.2-dev.169" : "2.0.0-alpha.0";
|
|
52040
52043
|
var IGNORED_PATH = /[\\/](?:\.git|node_modules|\.errata|\.claude|\.codex|\.cursor|\.turbo|\.next|dist|coverage|test-results|playwright-report|__pycache__)(?:[\\/]|$)/;
|
|
52041
52044
|
var IGNORED_NOISE = /castalia\.db|eventlog\.sqlite|turn-cursors/;
|
|
52042
52045
|
var GIT_OP_MUTE_MS = 4e3;
|
|
@@ -53100,7 +53103,20 @@ function createWorkspaceEngine(opts) {
|
|
|
53100
53103
|
return typeof cloudId === "string" && cloudId !== p.id ? [p.id, cloudId] : [p.id];
|
|
53101
53104
|
});
|
|
53102
53105
|
const pins = profile?.projectId ? await cloud.getSkillPins(profile.projectId).then((r) => r.pins).catch(() => []) : [];
|
|
53103
|
-
const
|
|
53106
|
+
const anchorMap = buildBucketTokenAnchors(
|
|
53107
|
+
profile.languages ?? [],
|
|
53108
|
+
loadConfig().consent.contributePackages ? store.findNodesByLabel("Package").map((p) => ({
|
|
53109
|
+
name: String(p.attrs["name"] ?? ""),
|
|
53110
|
+
purl: String(p.attrs["purl"] ?? p.id)
|
|
53111
|
+
})) : []
|
|
53112
|
+
);
|
|
53113
|
+
const stackTokens = new Set((profile.stack ?? []).map((t) => canonicalizeToken(String(t))).filter(Boolean));
|
|
53114
|
+
const techSeed = [
|
|
53115
|
+
...new Set(
|
|
53116
|
+
Object.entries(anchorMap).filter(([tok, a]) => a.startsWith("lang:") || stackTokens.has(tok)).map(([, a]) => a)
|
|
53117
|
+
)
|
|
53118
|
+
].slice(0, 24);
|
|
53119
|
+
const result = await syncSkills(paths, cloud, skillSeed, pins, techSeed);
|
|
53104
53120
|
try {
|
|
53105
53121
|
const inputs = emitInputsFromManifest(paths.configDir, paths.skillsManifest);
|
|
53106
53122
|
emitAndProjectSkills(opts.workspaceRoot, inputs);
|