@inerrata-corporation/errata 2.0.21-dev.3941 → 2.0.21-dev.3946

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
@@ -77886,8 +77886,9 @@ 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*((?:\[[^[\]\n]*\]|[^\]\n])*?)\s*(?:@\s*([^\s\]]+?)(?::(\d+))?\s*)?\]/g;
77890
- function flagScanView(text) {
77889
+ var FLAG_RE = /\[([!?])(?:#([a-z][\w-]{0,63})\s+)?\s*((?:\[[^[\]\n]*\]|[^\]\n])*?)\s*(?:@\s*([^\s\]]+?)(?::(\d+))?\s*)?\]/dg;
77890
+ function flagScanView(source) {
77891
+ const text = source.replace(/`[^`\n]*`/g, (m) => m.replace(/[[\]]/g, " "));
77891
77892
  let out2 = "";
77892
77893
  let from = 0;
77893
77894
  for (; ; ) {
@@ -78059,6 +78060,17 @@ function emptyTagDispositions() {
78059
78060
  flagAsHandle: 0
78060
78061
  };
78061
78062
  }
78063
+ function splitJoinedCause(content, sentence, threadId, dispositions, out2) {
78064
+ const joined = /[,;]\s*cause:\s*/i.exec(content);
78065
+ if (!joined) return content;
78066
+ const causeBody = content.slice(joined.index + joined[0].length);
78067
+ const fix = content.slice(0, joined.index);
78068
+ const fixed = new RegExp(HANDLE_RE.source, "i").exec(fix);
78069
+ const symptom = fixed && !/^\s*\[/.test(causeBody) ? `${fixed[0]} ` : "";
78070
+ const cause = parseCauseTag(`${symptom}${causeBody}`, sentence, threadId, dispositions);
78071
+ if (cause) out2.push(cause);
78072
+ return fix;
78073
+ }
78062
78074
  function parseCauseTag(content, sentence, threadId, dispositions) {
78063
78075
  const body2 = content.replace(/\s+/g, " ").trim();
78064
78076
  const cited = new RegExp(HANDLE_RE.source, "i").exec(body2);
@@ -78133,6 +78145,10 @@ function parseInlineTagsWithDispositions(text) {
78133
78145
  const seqStart = out2.length;
78134
78146
  const sentence = raw2.replace(/`[^`]*`/g, (m) => {
78135
78147
  if (!/\[[!?]|\((?:fix|cause|constraint|tried|failed|confirm|refute):|\(\[/.test(m)) return m;
78148
+ if (!/\((?:fix|cause|constraint|tried|failed|confirm|refute):|\(\[/.test(m)) {
78149
+ dispositions.codeSpanNeutralized++;
78150
+ return m;
78151
+ }
78136
78152
  dispositions.codeSpanNeutralized++;
78137
78153
  return " ";
78138
78154
  });
@@ -78208,17 +78224,7 @@ function parseInlineTagsWithDispositions(text) {
78208
78224
  const verbThread = fixM?.[1] ?? causeM?.[1] ?? void 0;
78209
78225
  if (isFix) content = content.replace(FIX_PREFIX, "");
78210
78226
  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
- }
78227
+ if (isFix) content = splitJoinedCause(content, sfield, verbThread, dispositions, out2);
78222
78228
  if (isCause) {
78223
78229
  const cause = parseCauseTag(content, sfield, verbThread, dispositions);
78224
78230
  if (cause) out2.push(cause);
@@ -78273,12 +78279,12 @@ function parseInlineTagsWithDispositions(text) {
78273
78279
  while ((lm = pass.re.exec(sentence)) !== null) {
78274
78280
  if (citeMatched.has(lm.index)) continue;
78275
78281
  const verbThread = lm[1] ?? void 0;
78276
- const content = lm[2];
78277
78282
  if (!pass.isFix) {
78278
- const cause = parseCauseTag(content, sfield, verbThread, dispositions);
78283
+ const cause = parseCauseTag(lm[2], sfield, verbThread, dispositions);
78279
78284
  if (cause) out2.push(cause);
78280
78285
  continue;
78281
78286
  }
78287
+ const content = splitJoinedCause(lm[2], sfield, verbThread, dispositions, out2);
78282
78288
  HANDLE_RE.lastIndex = 0;
78283
78289
  const h = HANDLE_RE.exec(content);
78284
78290
  let handle2 = h ? h[1] ?? h[2] : void 0;
@@ -78345,6 +78351,7 @@ function parseInlineTagsWithDispositions(text) {
78345
78351
  const flagView = flagScanView(sentence);
78346
78352
  let f;
78347
78353
  while ((f = FLAG_RE.exec(flagView)) !== null) {
78354
+ f[3] = sentence.slice(...f.indices[3]);
78348
78355
  const flagThread = f[2];
78349
78356
  const raw3 = f[3].trim();
78350
78357
  if (/^vuln\b/i.test(raw3)) {
@@ -83449,7 +83456,7 @@ function createWatchBreaker(deps) {
83449
83456
  }
83450
83457
 
83451
83458
  // src/engine.ts
83452
- var DAEMON_VERSION = true ? "2.0.21-dev.3941" : "2.0.0-alpha.0";
83459
+ var DAEMON_VERSION = true ? "2.0.21-dev.3946" : "2.0.0-alpha.0";
83453
83460
  var IGNORED_PATH = /[\\/](?:\.git|node_modules|\.errata|\.claude|\.codex|\.cursor|\.turbo|\.next|dist|coverage|test-results|playwright-report|__pycache__)(?:[\\/]|$)/;
83454
83461
  var IGNORED_NOISE = /castalia\.db|eventlog\.sqlite|turn-cursors/;
83455
83462
  var GIT_OP_MUTE_MS = 4e3;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inerrata-corporation/errata",
3
- "version": "2.0.21-dev.3941",
3
+ "version": "2.0.21-dev.3946",
4
4
  "description": "errata - local-first observation engine for AI coding agents",
5
5
  "type": "module",
6
6
  "bin": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "errata-context",
3
- "version": "2.0.21-dev.3941",
3
+ "version": "2.0.21-dev.3946",
4
4
  "description": "A minimal 3D view of loaded Errata priors and recent graph bursts.",
5
5
  "author": {
6
6
  "name": "inErrata"
@@ -1,4 +1,4 @@
1
- 82945fff7307ec7c8674ce80c043b7deac1aface6d206e569a43092a7f830ea7 .codex-plugin/plugin.json
1
+ dab821a49e5e3741ffc487cf84bd1fa41c5ca0979222059482979299ea69fd7f .codex-plugin/plugin.json
2
2
  a7bebae9fb01c838d6c75fc784129e28be571233fa66ff5ee8039b574f35ccf7 assets/icon.png
3
3
  fc38b64e4df1e0b72c35764bef6c4c05430d97c9009ad0ecc8a9e75b4deab232 configure-local.mjs
4
4
  73dc6028b3b070257c7c31f252d11e55a9e096f4aed0f187f10cb21716e1e6d7 dist/client.js