@inerrata-corporation/errata 2.0.21-dev.3930 → 2.0.21-dev.3931
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
|
@@ -77882,26 +77882,11 @@ var CONFIRM_PREFIX = /^\s*confirm:\s*/i;
|
|
|
77882
77882
|
var REFUTE_PREFIX = /^\s*refute:\s*/i;
|
|
77883
77883
|
var REFUTE_REASON_MIN = 4;
|
|
77884
77884
|
var PATTERN_RE = /\(\s*pattern:\s*([^()\n]{3,}?)\s*\)/gi;
|
|
77885
|
-
var DOMAIN_RE = /\(\s*domain:\s*([^()\n]{
|
|
77885
|
+
var DOMAIN_RE = /\(\s*domain:\s*([^()\n]{3,}?)\s*\)/gi;
|
|
77886
77886
|
var PACKAGE_RE = /\(\s*package:\s*([^()\n]{2,}?)\s*\)/gi;
|
|
77887
77887
|
var COMPONENT_RE = /\(\s*component:\s*([^()\n]{2,}?)\s*\)/gi;
|
|
77888
77888
|
var CAUSE_TEXT_MIN = 8;
|
|
77889
|
-
var FLAG_RE = /\[([!?])(?:#([a-z][\w-]{0,63})\s+)?\s*((?:\[[
|
|
77890
|
-
function flagScanView(text) {
|
|
77891
|
-
let out2 = "";
|
|
77892
|
-
let from = 0;
|
|
77893
|
-
for (; ; ) {
|
|
77894
|
-
const nl = text.indexOf("\n", from);
|
|
77895
|
-
const end = nl < 0 ? text.length : nl;
|
|
77896
|
-
const close = text.lastIndexOf("]", end - 1);
|
|
77897
|
-
const keep = close >= from ? close + 1 : from;
|
|
77898
|
-
out2 += text.slice(from, keep) + " ".repeat(end - keep);
|
|
77899
|
-
if (nl < 0) return out2;
|
|
77900
|
-
out2 += "\n";
|
|
77901
|
-
from = nl + 1;
|
|
77902
|
-
}
|
|
77903
|
-
}
|
|
77904
|
-
var MARKDOWN_LINK_RE = /\[([^[\]\n]+)\]\(([^()\s[\]]*[./][^()\s[\]]*)\)/g;
|
|
77889
|
+
var FLAG_RE = /\[([!?])(?:#([a-z][\w-]{0,63})\s+)?\s*((?:\[[^\]\n]*\]|[^\]\n])*?)\s*(?:@\s*([^\s\]]+?)(?::(\d+))?\s*)?\]/g;
|
|
77905
77890
|
var CONSTRAINT_MIN = 8;
|
|
77906
77891
|
function clauseBefore(sentence, idx) {
|
|
77907
77892
|
const win = sentence.slice(Math.max(0, idx - 80), idx);
|
|
@@ -77921,15 +77906,13 @@ var SIBLING_MARKUP_SOURCES = [
|
|
|
77921
77906
|
CONSTRAINT_RE
|
|
77922
77907
|
].map((re) => ({ source: re.source, flags: re.flags.includes("g") ? re.flags : `${re.flags}g` }));
|
|
77923
77908
|
function maskSiblingMarkup(sentence, tagStart, tagEnd) {
|
|
77924
|
-
let masked = sentence
|
|
77909
|
+
let masked = sentence;
|
|
77925
77910
|
for (const { source, flags: flags2 } of SIBLING_MARKUP_SOURCES) {
|
|
77926
|
-
|
|
77927
|
-
|
|
77928
|
-
|
|
77929
|
-
|
|
77930
|
-
|
|
77931
|
-
}
|
|
77932
|
-
for (const [from, to] of spans) masked = masked.slice(0, from) + " ".repeat(to - from) + masked.slice(to);
|
|
77911
|
+
masked = masked.replace(new RegExp(source, flags2), (m, ...rest2) => {
|
|
77912
|
+
const at = rest2.find((v) => typeof v === "number");
|
|
77913
|
+
if (at <= tagStart && at + m.length >= tagEnd) return m;
|
|
77914
|
+
return " ".repeat(m.length);
|
|
77915
|
+
});
|
|
77933
77916
|
}
|
|
77934
77917
|
return masked;
|
|
77935
77918
|
}
|
|
@@ -77945,7 +77928,7 @@ function fixRationaleBefore(sentence, idx) {
|
|
|
77945
77928
|
start2 = ws < 0 ? idx : start2 + ws;
|
|
77946
77929
|
}
|
|
77947
77930
|
const win = masked.slice(start2, idx).replace(/\s+$/, "").replace(/[.!?]$/, "");
|
|
77948
|
-
const scan2 = win.replace(/`[^`]*`/g, (s) => s.replace(/[.;!?—]/g, "_"))
|
|
77931
|
+
const scan2 = win.replace(/`[^`]*`/g, (s) => s.replace(/[.;!?—]/g, "_"));
|
|
77949
77932
|
const m = /[.;!?—][^.;!?—]*$/.exec(scan2);
|
|
77950
77933
|
const clause = (m ? win.slice(m.index + 1) : win).replace(/\*\*|__/g, "").replace(/^\s*(?:[-*+]|\d+[.)])\s+/, "").replace(/\s+([:;,])/g, "$1").replace(/\s+/g, " ").trim();
|
|
77951
77934
|
if (clause.endsWith(":")) return "";
|
|
@@ -77963,7 +77946,7 @@ function fixRationaleAfter(sentence, endIdx) {
|
|
|
77963
77946
|
const residual = RESIDUAL_OPENER_RE.exec(win);
|
|
77964
77947
|
if (residual) win = win.slice(0, residual.index);
|
|
77965
77948
|
const stripped = win.replace(/^[\s—:–,-]+/, "");
|
|
77966
|
-
const m = /^
|
|
77949
|
+
const m = /^[^.;!?—]*/.exec(stripped);
|
|
77967
77950
|
const clause = (m ? m[0] : stripped).replace(/\s+/g, " ").trim();
|
|
77968
77951
|
if (/^(and|but|or|nor|so|yet|also|plus)\b/i.test(clause)) return "";
|
|
77969
77952
|
return clause;
|
|
@@ -78106,7 +78089,7 @@ function* captureSentences(text) {
|
|
|
78106
78089
|
yield line;
|
|
78107
78090
|
continue;
|
|
78108
78091
|
}
|
|
78109
|
-
const flags2 = [...
|
|
78092
|
+
const flags2 = [...line.matchAll(new RegExp(FLAG_RE.source, FLAG_RE.flags))].map((m) => ({ start: m.index, end: m.index + m[0].length }));
|
|
78110
78093
|
let flag = 0;
|
|
78111
78094
|
let start2 = 0;
|
|
78112
78095
|
for (const boundary of line.matchAll(/(?<=[.!?])\s+(?!\(fix:)/g)) {
|
|
@@ -78138,14 +78121,12 @@ function parseInlineTagsWithDispositions(text) {
|
|
|
78138
78121
|
});
|
|
78139
78122
|
const sfield = sentence.replace(/\s+/g, " ").trim().slice(0, 160);
|
|
78140
78123
|
const citeMatched = /* @__PURE__ */ new Set();
|
|
78141
|
-
const flagSpans = [...flagScanView(sentence).matchAll(new RegExp(FLAG_RE.source, FLAG_RE.flags))].map((m) => [m.index, m.index + m[0].length]);
|
|
78142
78124
|
CITE_GROUP_RE.lastIndex = 0;
|
|
78143
78125
|
let g;
|
|
78144
78126
|
while ((g = CITE_GROUP_RE.exec(sentence)) !== null) {
|
|
78145
78127
|
citeMatched.add(g.index);
|
|
78146
78128
|
let content = g[1];
|
|
78147
78129
|
if (/^\s*pattern:/i.test(content)) continue;
|
|
78148
|
-
if (/^\s*failed:/i.test(content)) continue;
|
|
78149
78130
|
const fixM = FIX_PREFIX.exec(content);
|
|
78150
78131
|
const causeM = fixM ? null : CAUSE_PREFIX.exec(content);
|
|
78151
78132
|
const aidsM = fixM || causeM ? null : AIDS_PREFIX.exec(content);
|
|
@@ -78208,17 +78189,6 @@ function parseInlineTagsWithDispositions(text) {
|
|
|
78208
78189
|
const verbThread = fixM?.[1] ?? causeM?.[1] ?? void 0;
|
|
78209
78190
|
if (isFix) content = content.replace(FIX_PREFIX, "");
|
|
78210
78191
|
else if (isCause) content = content.replace(CAUSE_PREFIX, "");
|
|
78211
|
-
if (isFix) {
|
|
78212
|
-
const joined = /[,;]\s*cause:\s*/i.exec(content);
|
|
78213
|
-
if (joined) {
|
|
78214
|
-
const causeBody = content.slice(joined.index + joined[0].length);
|
|
78215
|
-
content = content.slice(0, joined.index);
|
|
78216
|
-
const fixed = new RegExp(HANDLE_RE.source, "i").exec(content);
|
|
78217
|
-
const symptom = fixed && !/^\s*\[/.test(causeBody) ? `${fixed[0]} ` : "";
|
|
78218
|
-
const cause = parseCauseTag(`${symptom}${causeBody}`, sfield, verbThread, dispositions);
|
|
78219
|
-
if (cause) out2.push(cause);
|
|
78220
|
-
}
|
|
78221
|
-
}
|
|
78222
78192
|
if (isCause) {
|
|
78223
78193
|
const cause = parseCauseTag(content, sfield, verbThread, dispositions);
|
|
78224
78194
|
if (cause) out2.push(cause);
|
|
@@ -78257,8 +78227,6 @@ function parseInlineTagsWithDispositions(text) {
|
|
|
78257
78227
|
const note = content.replace(/\s+/g, " ").trim();
|
|
78258
78228
|
if (note.length >= FIX_RATIONALE_MIN)
|
|
78259
78229
|
out2.push({ kind: "fix", fixRationale: note, sentence: sfield, ...verbThread ? { threadId: verbThread } : {} });
|
|
78260
|
-
else if (verbThread && fixRationale && !flagSpans.some(([a2, b]) => a2 < g.index && g.index < b))
|
|
78261
|
-
out2.push({ kind: "fix", fixRationale, sentence: sfield, threadId: verbThread });
|
|
78262
78230
|
else dispositions.unparseable++;
|
|
78263
78231
|
} else if (!isFix && !emittedHandle && BRACKETED_TOKEN_RE.test(content)) {
|
|
78264
78232
|
dispositions.unparseable++;
|
|
@@ -78342,9 +78310,8 @@ function parseInlineTagsWithDispositions(text) {
|
|
|
78342
78310
|
}
|
|
78343
78311
|
}
|
|
78344
78312
|
FLAG_RE.lastIndex = 0;
|
|
78345
|
-
const flagView = flagScanView(sentence);
|
|
78346
78313
|
let f;
|
|
78347
|
-
while ((f = FLAG_RE.exec(
|
|
78314
|
+
while ((f = FLAG_RE.exec(sentence)) !== null) {
|
|
78348
78315
|
const flagThread = f[2];
|
|
78349
78316
|
const raw3 = f[3].trim();
|
|
78350
78317
|
if (/^vuln\b/i.test(raw3)) {
|
|
@@ -78461,7 +78428,7 @@ function parseInlineTagsWithDispositions(text) {
|
|
|
78461
78428
|
let dm;
|
|
78462
78429
|
while ((dm = DOMAIN_RE.exec(sentence)) !== null) {
|
|
78463
78430
|
const raw3 = dm[1].replace(/\s+/g, " ").trim();
|
|
78464
|
-
if (raw3.length >=
|
|
78431
|
+
if (raw3.length >= 3) out2.push({ kind: "domain", domainText: raw3, sentence: sfield });
|
|
78465
78432
|
}
|
|
78466
78433
|
PACKAGE_RE.lastIndex = 0;
|
|
78467
78434
|
let pk;
|
|
@@ -83449,7 +83416,7 @@ function createWatchBreaker(deps) {
|
|
|
83449
83416
|
}
|
|
83450
83417
|
|
|
83451
83418
|
// src/engine.ts
|
|
83452
|
-
var DAEMON_VERSION = true ? "2.0.21-dev.
|
|
83419
|
+
var DAEMON_VERSION = true ? "2.0.21-dev.3931" : "2.0.0-alpha.0";
|
|
83453
83420
|
var IGNORED_PATH = /[\\/](?:\.git|node_modules|\.errata|\.claude|\.codex|\.cursor|\.turbo|\.next|dist|coverage|test-results|playwright-report|__pycache__)(?:[\\/]|$)/;
|
|
83454
83421
|
var IGNORED_NOISE = /castalia\.db|eventlog\.sqlite|turn-cursors/;
|
|
83455
83422
|
var GIT_OP_MUTE_MS = 4e3;
|
package/package.json
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
1880a992e2654df1357cca75d255d6fc5019614e0ae2531a822e3c03c7191d6f .codex-plugin/plugin.json
|
|
2
2
|
a7bebae9fb01c838d6c75fc784129e28be571233fa66ff5ee8039b574f35ccf7 assets/icon.png
|
|
3
3
|
fc38b64e4df1e0b72c35764bef6c4c05430d97c9009ad0ecc8a9e75b4deab232 configure-local.mjs
|
|
4
4
|
73dc6028b3b070257c7c31f252d11e55a9e096f4aed0f187f10cb21716e1e6d7 dist/client.js
|