@inerrata-corporation/errata 2.0.21-dev.4014 → 2.0.21-dev.4019
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
CHANGED
|
@@ -23325,6 +23325,9 @@ function recordRenderLedger(store, ledger, seq, ts) {
|
|
|
23325
23325
|
if (field === "shownCount") {
|
|
23326
23326
|
attrs["lastShownAtSeq"] = seq;
|
|
23327
23327
|
if (attrs["firstShownAtSeq"] === void 0) attrs["firstShownAtSeq"] = seq;
|
|
23328
|
+
const counted = attrs["shownSinceTouchAt"] === node2.lastUpdatedAt ? Number(attrs["shownSinceTouch"] ?? 0) : 0;
|
|
23329
|
+
attrs["shownSinceTouch"] = counted + 1;
|
|
23330
|
+
attrs["shownSinceTouchAt"] = node2.lastUpdatedAt;
|
|
23328
23331
|
} else {
|
|
23329
23332
|
attrs["lastEvictedAtSeq"] = seq;
|
|
23330
23333
|
}
|
|
@@ -25926,14 +25929,13 @@ function rankMotifs(pool, signal, k = MOTIF_BAND) {
|
|
|
25926
25929
|
function buildSnapshot(opts) {
|
|
25927
25930
|
const problems = [...opts.store.findNodesByLabel("Problem"), ...opts.store.findNodesByLabel("Vulnerability")].filter((p) => p.attrs["mergedInto"] === void 0 && historyReadPolicy(p, { mode: "passive", atCommit: opts.atCommit }).allow);
|
|
25928
25931
|
const stillOpen = problems.filter((p) => p.attrs["resolvedAt"] == null);
|
|
25929
|
-
const allProblems = stillOpen.filter((p) => !isConstraintProblem(p));
|
|
25930
|
-
allProblems.sort((a, b) => b.lastUpdatedAt - a.lastUpdatedAt);
|
|
25932
|
+
const allProblems = rankRecentBand(stillOpen.filter((p) => !isConstraintProblem(p)));
|
|
25931
25933
|
const openPool = allProblems.slice(0, RECENT_OPEN * SCOPE_POOL_FACTOR).map((p) => ({
|
|
25932
25934
|
node: p,
|
|
25933
25935
|
anchors: opts.store.outEdges(p.id, ["MANIFESTED_IN", "EVIDENCED_BY"])
|
|
25934
25936
|
}));
|
|
25935
25937
|
const recent4 = openPool.slice(0, RECENT_OPEN);
|
|
25936
|
-
const constraintPool = stillOpen.filter((p) => isConstraintProblem(p))
|
|
25938
|
+
const constraintPool = rankRecentBand(stillOpen.filter((p) => isConstraintProblem(p)), { window: RECENT_WINDOW_BANDS * RECENT_CONSTRAINTS }).slice(0, RECENT_CONSTRAINTS * SCOPE_POOL_FACTOR);
|
|
25937
25939
|
const recentConstraints = constraintPool.slice(0, RECENT_CONSTRAINTS);
|
|
25938
25940
|
const regressions = problems.filter((p) => p.attrs["resolvedAt"] == null && p.attrs["mergedInto"] === void 0).flatMap(
|
|
25939
25941
|
(open2) => opts.store.outEdges(open2.id, ["REGRESSION_OF"]).flatMap((e) => {
|
|
@@ -26036,6 +26038,12 @@ function buildSnapshot(opts) {
|
|
|
26036
26038
|
generatedAt: (opts.now ?? /* @__PURE__ */ new Date()).toISOString()
|
|
26037
26039
|
};
|
|
26038
26040
|
}
|
|
26041
|
+
function rankRecentBand(problems, { quota = RECENT_SHOW_QUOTA, window: window2 = RECENT_WINDOW_BANDS * RECENT_OPEN } = {}) {
|
|
26042
|
+
const spent = (p) => p.attrs["shownSinceTouchAt"] === p.lastUpdatedAt && Number(p.attrs["shownSinceTouch"] ?? 0) >= quota;
|
|
26043
|
+
const byRecency = [...problems].sort((a, b) => b.lastUpdatedAt - a.lastUpdatedAt);
|
|
26044
|
+
const head2 = byRecency.slice(0, window2);
|
|
26045
|
+
return [...head2.filter((p) => !spent(p)), ...head2.filter(spent), ...byRecency.slice(window2)];
|
|
26046
|
+
}
|
|
26039
26047
|
function scopeSnapshot(s, keep) {
|
|
26040
26048
|
const pool = s.scopePool;
|
|
26041
26049
|
if (!pool) return s;
|
|
@@ -26610,7 +26618,7 @@ function diffRenderLedger(before, after) {
|
|
|
26610
26618
|
for (const i2 of before) (survived.has(key(i2)) ? shown : evicted).push(i2);
|
|
26611
26619
|
return { shown, evicted };
|
|
26612
26620
|
}
|
|
26613
|
-
var MOTIF_BAND, MOTIF_POOL, MOTIF_SEEDS, RECENT_OPEN, RECENT_RESOLVED, RECENT_CONSTRAINTS, SCOPE_POOL_FACTOR, RECALL_FIRST_HEADER, RECALL_FIRST_BODY, RECALL_FIRST_BLOCK, SEARCH_IMPERATIVE_HEADER, SEARCH_IMPERATIVE_BODY, PROMPT_INTENT_CUE, PROMPT_RECUE, SPAWN_SHARE_HINT, SUBAGENT_OWN_BLOCK_NOTE, EVICTION_ORDER, MOTIF_FLOOR, REMOTE_FLOOR, PROBLEM_FLOOR, REVIEW_ITEM_FLOOR, DEFAULT_AGENT_CONTEXT_BUDGET;
|
|
26621
|
+
var MOTIF_BAND, MOTIF_POOL, MOTIF_SEEDS, RECENT_SHOW_QUOTA, RECENT_WINDOW_BANDS, RECENT_OPEN, RECENT_RESOLVED, RECENT_CONSTRAINTS, SCOPE_POOL_FACTOR, RECALL_FIRST_HEADER, RECALL_FIRST_BODY, RECALL_FIRST_BLOCK, SEARCH_IMPERATIVE_HEADER, SEARCH_IMPERATIVE_BODY, PROMPT_INTENT_CUE, PROMPT_RECUE, SPAWN_SHARE_HINT, SUBAGENT_OWN_BLOCK_NOTE, EVICTION_ORDER, MOTIF_FLOOR, REMOTE_FLOOR, PROBLEM_FLOOR, REVIEW_ITEM_FLOOR, DEFAULT_AGENT_CONTEXT_BUDGET;
|
|
26614
26622
|
var init_render = __esm({
|
|
26615
26623
|
"../../packages/context-writer/src/render.ts"() {
|
|
26616
26624
|
"use strict";
|
|
@@ -26620,6 +26628,8 @@ var init_render = __esm({
|
|
|
26620
26628
|
MOTIF_BAND = 10;
|
|
26621
26629
|
MOTIF_POOL = 1e3;
|
|
26622
26630
|
MOTIF_SEEDS = 8;
|
|
26631
|
+
RECENT_SHOW_QUOTA = 32;
|
|
26632
|
+
RECENT_WINDOW_BANDS = 4;
|
|
26623
26633
|
RECENT_OPEN = 8;
|
|
26624
26634
|
RECENT_RESOLVED = 4;
|
|
26625
26635
|
RECENT_CONSTRAINTS = 3;
|
|
@@ -84066,7 +84076,7 @@ function createWatchBreaker(deps) {
|
|
|
84066
84076
|
}
|
|
84067
84077
|
|
|
84068
84078
|
// src/engine.ts
|
|
84069
|
-
var DAEMON_VERSION = true ? "2.0.21-dev.
|
|
84079
|
+
var DAEMON_VERSION = true ? "2.0.21-dev.4019" : "2.0.0-alpha.0";
|
|
84070
84080
|
var IGNORED_PATH = /[\\/](?:\.git|node_modules|\.errata|\.claude|\.codex|\.cursor|\.turbo|\.next|dist|coverage|test-results|playwright-report|__pycache__)(?:[\\/]|$)/;
|
|
84071
84081
|
var IGNORED_NOISE = /castalia\.db|eventlog\.sqlite|turn-cursors/;
|
|
84072
84082
|
var GIT_OP_MUTE_MS = 4e3;
|
package/package.json
CHANGED
package/pass-worker.mjs
CHANGED
|
@@ -29493,14 +29493,13 @@ function rankMotifs(pool, signal, k = MOTIF_BAND) {
|
|
|
29493
29493
|
function buildSnapshot(opts) {
|
|
29494
29494
|
const problems = [...opts.store.findNodesByLabel("Problem"), ...opts.store.findNodesByLabel("Vulnerability")].filter((p) => p.attrs["mergedInto"] === void 0 && historyReadPolicy(p, { mode: "passive", atCommit: opts.atCommit }).allow);
|
|
29495
29495
|
const stillOpen = problems.filter((p) => p.attrs["resolvedAt"] == null);
|
|
29496
|
-
const allProblems = stillOpen.filter((p) => !isConstraintProblem(p));
|
|
29497
|
-
allProblems.sort((a, b) => b.lastUpdatedAt - a.lastUpdatedAt);
|
|
29496
|
+
const allProblems = rankRecentBand(stillOpen.filter((p) => !isConstraintProblem(p)));
|
|
29498
29497
|
const openPool = allProblems.slice(0, RECENT_OPEN * SCOPE_POOL_FACTOR).map((p) => ({
|
|
29499
29498
|
node: p,
|
|
29500
29499
|
anchors: opts.store.outEdges(p.id, ["MANIFESTED_IN", "EVIDENCED_BY"])
|
|
29501
29500
|
}));
|
|
29502
29501
|
const recent = openPool.slice(0, RECENT_OPEN);
|
|
29503
|
-
const constraintPool = stillOpen.filter((p) => isConstraintProblem(p))
|
|
29502
|
+
const constraintPool = rankRecentBand(stillOpen.filter((p) => isConstraintProblem(p)), { window: RECENT_WINDOW_BANDS * RECENT_CONSTRAINTS }).slice(0, RECENT_CONSTRAINTS * SCOPE_POOL_FACTOR);
|
|
29504
29503
|
const recentConstraints = constraintPool.slice(0, RECENT_CONSTRAINTS);
|
|
29505
29504
|
const regressions = problems.filter((p) => p.attrs["resolvedAt"] == null && p.attrs["mergedInto"] === void 0).flatMap(
|
|
29506
29505
|
(open) => opts.store.outEdges(open.id, ["REGRESSION_OF"]).flatMap((e) => {
|
|
@@ -29603,6 +29602,14 @@ function buildSnapshot(opts) {
|
|
|
29603
29602
|
generatedAt: (opts.now ?? /* @__PURE__ */ new Date()).toISOString()
|
|
29604
29603
|
};
|
|
29605
29604
|
}
|
|
29605
|
+
var RECENT_SHOW_QUOTA = 32;
|
|
29606
|
+
function rankRecentBand(problems, { quota = RECENT_SHOW_QUOTA, window: window2 = RECENT_WINDOW_BANDS * RECENT_OPEN } = {}) {
|
|
29607
|
+
const spent = (p) => p.attrs["shownSinceTouchAt"] === p.lastUpdatedAt && Number(p.attrs["shownSinceTouch"] ?? 0) >= quota;
|
|
29608
|
+
const byRecency = [...problems].sort((a, b) => b.lastUpdatedAt - a.lastUpdatedAt);
|
|
29609
|
+
const head = byRecency.slice(0, window2);
|
|
29610
|
+
return [...head.filter((p) => !spent(p)), ...head.filter(spent), ...byRecency.slice(window2)];
|
|
29611
|
+
}
|
|
29612
|
+
var RECENT_WINDOW_BANDS = 4;
|
|
29606
29613
|
var RECENT_OPEN = 8;
|
|
29607
29614
|
var RECENT_RESOLVED = 4;
|
|
29608
29615
|
var RECENT_CONSTRAINTS = 3;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
a2d0654c540f7dea800a27ef58e8a03db6b46ae11da73d3653c2a1a507cb48c9 .codex-plugin/plugin.json
|
|
2
2
|
a7bebae9fb01c838d6c75fc784129e28be571233fa66ff5ee8039b574f35ccf7 assets/icon.png
|
|
3
3
|
fc38b64e4df1e0b72c35764bef6c4c05430d97c9009ad0ecc8a9e75b4deab232 configure-local.mjs
|
|
4
4
|
73dc6028b3b070257c7c31f252d11e55a9e096f4aed0f187f10cb21716e1e6d7 dist/client.js
|