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