ultra11y 5.49.0 → 5.49.1

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.
@@ -10,7 +10,7 @@
10
10
  "name": "ultra11y",
11
11
  "source": "./",
12
12
  "description": "RGAA 4.1.2 accessibility audits on a WCAG 2.2 AA core: automatic review before commit, push and pull request, plus dated, evidenced Markdown, HTML and per-page conformance reports in Claude Code.",
13
- "version": "5.49.0",
13
+ "version": "5.49.1",
14
14
  "author": { "name": "maxgfr" },
15
15
  "homepage": "https://github.com/SocialGouv/ultra11y",
16
16
  "repository": "https://github.com/SocialGouv/ultra11y",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ultra11y",
3
3
  "description": "RGAA 4.1.2 accessibility audits, the French State's standard, on a WCAG 2.2 AA core: automatic review before commit, push and pull request, plus dated, evidenced Markdown, HTML and per-page conformance reports. Never declares conforming what it has not verified.",
4
- "version": "5.49.0",
4
+ "version": "5.49.1",
5
5
  "author": { "name": "maxgfr" },
6
6
  "homepage": "https://github.com/SocialGouv/ultra11y",
7
7
  "repository": "https://github.com/SocialGouv/ultra11y",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ultra11y",
3
3
  "description": "RGAA 4.1.2 accessibility audits, the French State's standard, on a WCAG 2.2 AA core: automatic review before commit, push and pull request, plus dated, evidenced Markdown, HTML and per-page conformance reports. Never declares conforming what it has not verified.",
4
- "version": "5.49.0",
4
+ "version": "5.49.1",
5
5
  "author": { "name": "maxgfr", "url": "https://github.com/maxgfr" },
6
6
  "homepage": "https://github.com/SocialGouv/ultra11y",
7
7
  "repository": "https://github.com/SocialGouv/ultra11y",
@@ -27,7 +27,7 @@ import { fileURLToPath } from "node:url";
27
27
  // Ownership marker: `ultra11y install --opencode` refuses to overwrite a plugin file that
28
28
  // does not carry it, so a user's own ultra11y.js is never clobbered.
29
29
  const ULTRA11Y_OPENCODE_PLUGIN = "ULTRA11Y_OPENCODE_PLUGIN";
30
- const ULTRA11Y_PLUGIN_VERSION = "5.49.0";
30
+ const ULTRA11Y_PLUGIN_VERSION = "5.49.1";
31
31
 
32
32
  const here = dirname(fileURLToPath(import.meta.url));
33
33
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ultra11y",
3
- "version": "5.49.0",
3
+ "version": "5.49.1",
4
4
  "description": "Audit d'accessibilité RGAA 4.1.2, le référentiel de l'État : rapport daté, grille des 106 critères, backlog et tickets. Moteur statique, navigateur et jugement IA contre-vérifié. Il ne déclare jamais conforme ce qu'il n'a pas vérifié. Socle WCAG 2.2 AA.",
5
5
  "homepage": "https://socialgouv.github.io/ultra11y/",
6
6
  "type": "module",
@@ -6,7 +6,7 @@ import { join as join53, relative as relative6, resolve as resolve17, sep as sep
6
6
  import { fileURLToPath as fileURLToPath5, pathToFileURL as pathToFileURL3 } from "url";
7
7
 
8
8
  // src/types.ts
9
- var VERSION = "5.49.0";
9
+ var VERSION = "5.49.1";
10
10
  var SCHEMA_VERSION = 2;
11
11
  var INAPPLICABLE_STATUS = "C";
12
12
 
@@ -66581,6 +66581,9 @@ var canonicalFile2 = (file) => {
66581
66581
  const at = posix3.lastIndexOf(marker);
66582
66582
  return at >= 0 ? posix3.slice(at) : posix3;
66583
66583
  };
66584
+ function portableFile(file) {
66585
+ return canonicalFile2(file.replace(/\\/g, "/"));
66586
+ }
66584
66587
  var anchorKey2 = (e) => {
66585
66588
  const file = canonicalFile2(e.file);
66586
66589
  let snippet2 = norm3(e.snippet ?? "");
@@ -66685,8 +66688,10 @@ function writeLedger(path, ledger) {
66685
66688
  }
66686
66689
  function entriesFrom(adj, accepted, date) {
66687
66690
  const out2 = [];
66691
+ const portable = (xs) => xs.map((x) => typeof x.file === "string" ? { ...x, file: portableFile(x.file) } : x);
66688
66692
  for (const it of adj.items) {
66689
66693
  if (!accepted.has(it.criteriaId) || it.verdict === null) continue;
66694
+ const citations = (it.citations ?? []).map(readCitation).filter((c2) => c2 !== null);
66690
66695
  out2.push({
66691
66696
  criteriaId: it.criteriaId,
66692
66697
  verdict: it.verdict,
@@ -66694,9 +66699,9 @@ function entriesFrom(adj, accepted, date) {
66694
66699
  ...it.reason ? { reason: it.reason } : {},
66695
66700
  // Normalised here too: a citation may have arrived as a bare "file:line" string, and a
66696
66701
  // ledger entry has to hold the object form so a replay can re-anchor and re-ground it.
66697
- ...it.citations?.length ? { citations: it.citations.map(readCitation).filter((c2) => c2 !== null) } : {},
66698
- ...it.findings?.length ? { findings: it.findings } : {},
66699
- ...it.recommendations?.length ? { recommendations: it.recommendations } : {},
66702
+ ...citations.length ? { citations: portable(citations) } : {},
66703
+ ...it.findings?.length ? { findings: portable(it.findings) } : {},
66704
+ ...it.recommendations?.length ? { recommendations: portable(it.recommendations) } : {},
66700
66705
  evidenceFingerprint: evidenceFingerprint(it.evidence),
66701
66706
  evidenceAnchors: evidenceAnchorsOf(it.evidence),
66702
66707
  evidenceFiles: evidenceFilesOf(it.evidence),
@@ -74187,12 +74192,14 @@ function handleFix(args2, cwd) {
74187
74192
  process.chdir(prev);
74188
74193
  }
74189
74194
  }
74195
+ var FAIL_ON_ALIASES = { error: "blocking", warning: "major", notice: "minor" };
74196
+ var FAIL_ON_TOKENS = "blocking, major, minor (or bloquant, majeur, mineur; error/warning/notice as aliases)";
74190
74197
  function handleInit(args2, cwd) {
74191
- const failOnRaw = str2(args2.fail_on) ?? "error";
74192
- if (!["error", "warning", "notice"].includes(failOnRaw)) {
74193
- throw new ToolError(`\`fail_on\` must be one of: error, warning, notice (got "${failOnRaw}")`);
74198
+ const failOnRaw = str2(args2.fail_on) ?? "blocking";
74199
+ const failOn = parseFailOn(FAIL_ON_ALIASES[failOnRaw] ?? failOnRaw);
74200
+ if (failOn === null) {
74201
+ throw new ToolError(`\`fail_on\` must be one of: ${FAIL_ON_TOKENS} (got "${failOnRaw}")`);
74194
74202
  }
74195
- const failOn = failOnRaw;
74196
74203
  const enginePath = resolve15("scripts/ultra11y.mjs");
74197
74204
  const written = [];
74198
74205
  if (bool(args2.hook)) written.push(writeHook(cwd, enginePath, failOn));
@@ -74679,7 +74686,14 @@ var WRITE_TOOLS = [
74679
74686
  hook: { type: "boolean", description: "Install the git pre-commit hook." },
74680
74687
  ci: { type: "boolean", description: "Install the CI workflow." },
74681
74688
  baseline: { type: "boolean", description: "Record the current findings as the accepted baseline." },
74682
- fail_on: { type: "string", enum: ["error", "warning", "notice"], description: "Severity that fails the gate." }
74689
+ fail_on: {
74690
+ type: "string",
74691
+ // The CLI's own `--fail-on` vocabulary (English or French), which is what the
74692
+ // generated hook and workflow carry. The axe-style trio is kept as aliases:
74693
+ // error ⇒ blocking, warning ⇒ major, notice ⇒ minor.
74694
+ enum: ["blocking", "major", "minor", "bloquant", "majeur", "mineur", "error", "warning", "notice"],
74695
+ description: "Severity that fails the gate: blocking | major | minor (default blocking). error/warning/notice are accepted as aliases of the three."
74696
+ }
74683
74697
  },
74684
74698
  required: ["cwd"]
74685
74699
  }
@@ -3,7 +3,7 @@ name: review-a11y
3
3
  description: "Use to REVIEW changed frontend code for accessibility: staged files, a working diff, branch, or PR; prompts such as 'review a11y', 'is this accessible?', or 'anything to fix before merge?'; and hook or CI findings on a change. Run the bundled install-free engine with cross-file JSX/TSX analysis, then adjudicate candidates and return a severity-ranked WCAG 2.2 AA review with file:line fixes, residual rendering risks, and a verdict. Use `ultra11y` instead for whole-repo audits, dated conformance reports, country standards, PRD backlogs, or authoring accessible markup."
4
4
  license: MIT
5
5
  metadata:
6
- version: 5.49.0
6
+ version: 5.49.1
7
7
  ---
8
8
 
9
9
  # review-a11y — accessibility review of changed code
@@ -6,7 +6,7 @@ import { join as join53, relative as relative6, resolve as resolve17, sep as sep
6
6
  import { fileURLToPath as fileURLToPath5, pathToFileURL as pathToFileURL3 } from "url";
7
7
 
8
8
  // src/types.ts
9
- var VERSION = "5.49.0";
9
+ var VERSION = "5.49.1";
10
10
  var SCHEMA_VERSION = 2;
11
11
  var INAPPLICABLE_STATUS = "C";
12
12
 
@@ -66581,6 +66581,9 @@ var canonicalFile2 = (file) => {
66581
66581
  const at = posix3.lastIndexOf(marker);
66582
66582
  return at >= 0 ? posix3.slice(at) : posix3;
66583
66583
  };
66584
+ function portableFile(file) {
66585
+ return canonicalFile2(file.replace(/\\/g, "/"));
66586
+ }
66584
66587
  var anchorKey2 = (e) => {
66585
66588
  const file = canonicalFile2(e.file);
66586
66589
  let snippet2 = norm3(e.snippet ?? "");
@@ -66685,8 +66688,10 @@ function writeLedger(path, ledger) {
66685
66688
  }
66686
66689
  function entriesFrom(adj, accepted, date) {
66687
66690
  const out2 = [];
66691
+ const portable = (xs) => xs.map((x) => typeof x.file === "string" ? { ...x, file: portableFile(x.file) } : x);
66688
66692
  for (const it of adj.items) {
66689
66693
  if (!accepted.has(it.criteriaId) || it.verdict === null) continue;
66694
+ const citations = (it.citations ?? []).map(readCitation).filter((c2) => c2 !== null);
66690
66695
  out2.push({
66691
66696
  criteriaId: it.criteriaId,
66692
66697
  verdict: it.verdict,
@@ -66694,9 +66699,9 @@ function entriesFrom(adj, accepted, date) {
66694
66699
  ...it.reason ? { reason: it.reason } : {},
66695
66700
  // Normalised here too: a citation may have arrived as a bare "file:line" string, and a
66696
66701
  // ledger entry has to hold the object form so a replay can re-anchor and re-ground it.
66697
- ...it.citations?.length ? { citations: it.citations.map(readCitation).filter((c2) => c2 !== null) } : {},
66698
- ...it.findings?.length ? { findings: it.findings } : {},
66699
- ...it.recommendations?.length ? { recommendations: it.recommendations } : {},
66702
+ ...citations.length ? { citations: portable(citations) } : {},
66703
+ ...it.findings?.length ? { findings: portable(it.findings) } : {},
66704
+ ...it.recommendations?.length ? { recommendations: portable(it.recommendations) } : {},
66700
66705
  evidenceFingerprint: evidenceFingerprint(it.evidence),
66701
66706
  evidenceAnchors: evidenceAnchorsOf(it.evidence),
66702
66707
  evidenceFiles: evidenceFilesOf(it.evidence),
@@ -74187,12 +74192,14 @@ function handleFix(args2, cwd) {
74187
74192
  process.chdir(prev);
74188
74193
  }
74189
74194
  }
74195
+ var FAIL_ON_ALIASES = { error: "blocking", warning: "major", notice: "minor" };
74196
+ var FAIL_ON_TOKENS = "blocking, major, minor (or bloquant, majeur, mineur; error/warning/notice as aliases)";
74190
74197
  function handleInit(args2, cwd) {
74191
- const failOnRaw = str2(args2.fail_on) ?? "error";
74192
- if (!["error", "warning", "notice"].includes(failOnRaw)) {
74193
- throw new ToolError(`\`fail_on\` must be one of: error, warning, notice (got "${failOnRaw}")`);
74198
+ const failOnRaw = str2(args2.fail_on) ?? "blocking";
74199
+ const failOn = parseFailOn(FAIL_ON_ALIASES[failOnRaw] ?? failOnRaw);
74200
+ if (failOn === null) {
74201
+ throw new ToolError(`\`fail_on\` must be one of: ${FAIL_ON_TOKENS} (got "${failOnRaw}")`);
74194
74202
  }
74195
- const failOn = failOnRaw;
74196
74203
  const enginePath = resolve15("scripts/ultra11y.mjs");
74197
74204
  const written = [];
74198
74205
  if (bool(args2.hook)) written.push(writeHook(cwd, enginePath, failOn));
@@ -74679,7 +74686,14 @@ var WRITE_TOOLS = [
74679
74686
  hook: { type: "boolean", description: "Install the git pre-commit hook." },
74680
74687
  ci: { type: "boolean", description: "Install the CI workflow." },
74681
74688
  baseline: { type: "boolean", description: "Record the current findings as the accepted baseline." },
74682
- fail_on: { type: "string", enum: ["error", "warning", "notice"], description: "Severity that fails the gate." }
74689
+ fail_on: {
74690
+ type: "string",
74691
+ // The CLI's own `--fail-on` vocabulary (English or French), which is what the
74692
+ // generated hook and workflow carry. The axe-style trio is kept as aliases:
74693
+ // error ⇒ blocking, warning ⇒ major, notice ⇒ minor.
74694
+ enum: ["blocking", "major", "minor", "bloquant", "majeur", "mineur", "error", "warning", "notice"],
74695
+ description: "Severity that fails the gate: blocking | major | minor (default blocking). error/warning/notice are accepted as aliases of the three."
74696
+ }
74683
74697
  },
74684
74698
  required: ["cwd"]
74685
74699
  }
@@ -3,7 +3,7 @@ name: ultra11y
3
3
  description: "Use to AUDIT a site, repository, or page against RGAA 4.1.2, the French State's accessibility standard (référentiel de l'État), on a WCAG 2.2 AA core (other country standards as packs); produce a dated conformance report, criterion grid, PRD backlog, or tickets; AUTHOR accessible markup; fix accessibility; or wire a repo gate and rendered-DOM capture pipeline. The bundled install-free engine runs 95 static checks tied to success criteria, while the agent adjudicates judgment criteria and routes rendering criteria to browser scans; check/verify reject invented non-conformities and never declare conforming what was not verified. Use `review-a11y` instead for a review scoped only to a diff, branch, or PR."
4
4
  license: MIT
5
5
  metadata:
6
- version: 5.49.0
6
+ version: 5.49.1
7
7
  ---
8
8
 
9
9
  # ultra11y — audit WCAG 2.2 AA and write accessible markup
@@ -6,7 +6,7 @@ import { join as join53, relative as relative6, resolve as resolve17, sep as sep
6
6
  import { fileURLToPath as fileURLToPath5, pathToFileURL as pathToFileURL3 } from "url";
7
7
 
8
8
  // src/types.ts
9
- var VERSION = "5.49.0";
9
+ var VERSION = "5.49.1";
10
10
  var SCHEMA_VERSION = 2;
11
11
  var INAPPLICABLE_STATUS = "C";
12
12
 
@@ -66581,6 +66581,9 @@ var canonicalFile2 = (file) => {
66581
66581
  const at = posix3.lastIndexOf(marker);
66582
66582
  return at >= 0 ? posix3.slice(at) : posix3;
66583
66583
  };
66584
+ function portableFile(file) {
66585
+ return canonicalFile2(file.replace(/\\/g, "/"));
66586
+ }
66584
66587
  var anchorKey2 = (e) => {
66585
66588
  const file = canonicalFile2(e.file);
66586
66589
  let snippet2 = norm3(e.snippet ?? "");
@@ -66685,8 +66688,10 @@ function writeLedger(path, ledger) {
66685
66688
  }
66686
66689
  function entriesFrom(adj, accepted, date) {
66687
66690
  const out2 = [];
66691
+ const portable = (xs) => xs.map((x) => typeof x.file === "string" ? { ...x, file: portableFile(x.file) } : x);
66688
66692
  for (const it of adj.items) {
66689
66693
  if (!accepted.has(it.criteriaId) || it.verdict === null) continue;
66694
+ const citations = (it.citations ?? []).map(readCitation).filter((c2) => c2 !== null);
66690
66695
  out2.push({
66691
66696
  criteriaId: it.criteriaId,
66692
66697
  verdict: it.verdict,
@@ -66694,9 +66699,9 @@ function entriesFrom(adj, accepted, date) {
66694
66699
  ...it.reason ? { reason: it.reason } : {},
66695
66700
  // Normalised here too: a citation may have arrived as a bare "file:line" string, and a
66696
66701
  // ledger entry has to hold the object form so a replay can re-anchor and re-ground it.
66697
- ...it.citations?.length ? { citations: it.citations.map(readCitation).filter((c2) => c2 !== null) } : {},
66698
- ...it.findings?.length ? { findings: it.findings } : {},
66699
- ...it.recommendations?.length ? { recommendations: it.recommendations } : {},
66702
+ ...citations.length ? { citations: portable(citations) } : {},
66703
+ ...it.findings?.length ? { findings: portable(it.findings) } : {},
66704
+ ...it.recommendations?.length ? { recommendations: portable(it.recommendations) } : {},
66700
66705
  evidenceFingerprint: evidenceFingerprint(it.evidence),
66701
66706
  evidenceAnchors: evidenceAnchorsOf(it.evidence),
66702
66707
  evidenceFiles: evidenceFilesOf(it.evidence),
@@ -74187,12 +74192,14 @@ function handleFix(args2, cwd) {
74187
74192
  process.chdir(prev);
74188
74193
  }
74189
74194
  }
74195
+ var FAIL_ON_ALIASES = { error: "blocking", warning: "major", notice: "minor" };
74196
+ var FAIL_ON_TOKENS = "blocking, major, minor (or bloquant, majeur, mineur; error/warning/notice as aliases)";
74190
74197
  function handleInit(args2, cwd) {
74191
- const failOnRaw = str2(args2.fail_on) ?? "error";
74192
- if (!["error", "warning", "notice"].includes(failOnRaw)) {
74193
- throw new ToolError(`\`fail_on\` must be one of: error, warning, notice (got "${failOnRaw}")`);
74198
+ const failOnRaw = str2(args2.fail_on) ?? "blocking";
74199
+ const failOn = parseFailOn(FAIL_ON_ALIASES[failOnRaw] ?? failOnRaw);
74200
+ if (failOn === null) {
74201
+ throw new ToolError(`\`fail_on\` must be one of: ${FAIL_ON_TOKENS} (got "${failOnRaw}")`);
74194
74202
  }
74195
- const failOn = failOnRaw;
74196
74203
  const enginePath = resolve15("scripts/ultra11y.mjs");
74197
74204
  const written = [];
74198
74205
  if (bool(args2.hook)) written.push(writeHook(cwd, enginePath, failOn));
@@ -74679,7 +74686,14 @@ var WRITE_TOOLS = [
74679
74686
  hook: { type: "boolean", description: "Install the git pre-commit hook." },
74680
74687
  ci: { type: "boolean", description: "Install the CI workflow." },
74681
74688
  baseline: { type: "boolean", description: "Record the current findings as the accepted baseline." },
74682
- fail_on: { type: "string", enum: ["error", "warning", "notice"], description: "Severity that fails the gate." }
74689
+ fail_on: {
74690
+ type: "string",
74691
+ // The CLI's own `--fail-on` vocabulary (English or French), which is what the
74692
+ // generated hook and workflow carry. The axe-style trio is kept as aliases:
74693
+ // error ⇒ blocking, warning ⇒ major, notice ⇒ minor.
74694
+ enum: ["blocking", "major", "minor", "bloquant", "majeur", "mineur", "error", "warning", "notice"],
74695
+ description: "Severity that fails the gate: blocking | major | minor (default blocking). error/warning/notice are accepted as aliases of the three."
74696
+ }
74683
74697
  },
74684
74698
  required: ["cwd"]
74685
74699
  }
@@ -27,7 +27,7 @@ variables:
27
27
  ULTRA11Y_LANG: en
28
28
  # Exact by default: a CI report must say which engine produced it. The release script keeps
29
29
  # this pin aligned with the package version; override only for a deliberate upgrade test.
30
- ULTRA11Y_VERSION: '5.49.0'
30
+ ULTRA11Y_VERSION: '5.49.1'
31
31
  # Batches of 8 amortise the prompt; each accepted verdict is checkpointed before the next
32
32
  # batch, and later passes receive only the residue.
33
33
  ULTRA11Y_GRAIN: batch
package/src/ledger.ts CHANGED
@@ -119,6 +119,22 @@ const canonicalFile = (file: string): string => {
119
119
  return at >= 0 ? posix.slice(at) : posix;
120
120
  };
121
121
 
122
+ /** The path a COMMITTED ledger carries for a page capture: its published
123
+ * `.ultra11y/pages/<id>/…` identity, whatever absolute `--cwd` the browser wrote it through.
124
+ *
125
+ * A ledger travels — reviewed in a pull request, replayed on another machine — and the
126
+ * harvester hands out the paths it was given. Recorded as such, one ledger carried 196
127
+ * `/home/runner/work/<repo>/<repo>/.ultra11y/pages/…/dom.html` citations: readable by
128
+ * nobody, and all of them captures. `canonicalFile` is already the identity every reader
129
+ * keys on (`anchorKey`, `evidenceFilesOf`, `reanchor`, `pruneLedger`), so writing it is a
130
+ * change of spelling, not of identity. Ordinary source files are left exactly as harvested:
131
+ * the readers compare them lexically, and a spelling that differs from the harvest's (a
132
+ * root-relative store against an absolute harvest) would stale, un-anchor and un-prune
133
+ * valid verdicts — a root-aware identity on both sides is its own change. */
134
+ export function portableFile(file: string): string {
135
+ return canonicalFile(file.replace(/\\/g, "/"));
136
+ }
137
+
122
138
  /** The line-independent identity of one piece of evidence: what the agent actually read. */
123
139
  const anchorKey = (e: { file: string; selector?: string; snippet?: string }) => {
124
140
  const file = canonicalFile(e.file);
@@ -350,8 +366,15 @@ export function writeLedger(path: string, ledger: VerdictLedger): void {
350
366
  * reach the ledger, or the next replay would launder it back in. */
351
367
  export function entriesFrom(adj: AdjudicationFile, accepted: ReadonlySet<string>, date: string): LedgerEntry[] {
352
368
  const out: LedgerEntry[] = [];
369
+ // Every path the entry persists goes through `portableFile`: the ledger is a committed,
370
+ // reviewed artefact, and the machine that recorded it is not the one that replays it.
371
+ // Only a string file is respelled. The fold validates a finding's `file` for an NC alone;
372
+ // findings an LLM attached to a C/NA/manual item reach here unvalidated, and the ledger
373
+ // recorded them as they came — a write must not crash on what it never checked.
374
+ const portable = <T extends { file?: unknown }>(xs: T[]): T[] => xs.map((x) => (typeof x.file === "string" ? { ...x, file: portableFile(x.file) } : x));
353
375
  for (const it of adj.items) {
354
376
  if (!accepted.has(it.criteriaId) || it.verdict === null) continue;
377
+ const citations = (it.citations ?? []).map(readCitation).filter((c): c is Evidence => c !== null);
355
378
  out.push({
356
379
  criteriaId: it.criteriaId,
357
380
  verdict: it.verdict,
@@ -359,9 +382,9 @@ export function entriesFrom(adj: AdjudicationFile, accepted: ReadonlySet<string>
359
382
  ...(it.reason ? { reason: it.reason } : {}),
360
383
  // Normalised here too: a citation may have arrived as a bare "file:line" string, and a
361
384
  // ledger entry has to hold the object form so a replay can re-anchor and re-ground it.
362
- ...(it.citations?.length ? { citations: it.citations.map(readCitation).filter((c): c is Evidence => c !== null) } : {}),
363
- ...(it.findings?.length ? { findings: it.findings } : {}),
364
- ...(it.recommendations?.length ? { recommendations: it.recommendations } : {}),
385
+ ...(citations.length ? { citations: portable(citations) } : {}),
386
+ ...(it.findings?.length ? { findings: portable(it.findings) } : {}),
387
+ ...(it.recommendations?.length ? { recommendations: portable(it.recommendations) } : {}),
365
388
  evidenceFingerprint: evidenceFingerprint(it.evidence),
366
389
  evidenceAnchors: evidenceAnchorsOf(it.evidence),
367
390
  evidenceFiles: evidenceFilesOf(it.evidence),
@@ -5,6 +5,7 @@ import { buildAdjudicationWorklist, formatAdjudication } from "../adjudicate.js"
5
5
  import { checkReport } from "../check.js";
6
6
  import { runFix, fixSummary } from "../fix.js";
7
7
  import { writeHook, ciWorkflow } from "../init.js";
8
+ import { parseFailOn } from "../baseline.js";
8
9
  import { runPackCheck } from "../pack.js";
9
10
  import { prdUnits, partitionUnits } from "../prd.js";
10
11
  import { renderReport, renderPackReport, withReportAnnexes } from "../report.js";
@@ -504,12 +505,18 @@ function handleFix(args: Record<string, unknown>, cwd: string): unknown {
504
505
  }
505
506
  }
506
507
 
508
+ /** The axe-style severities this tool once advertised, as aliases of the engine's own. They
509
+ * used to be cast straight into the `bloquant | majeur | mineur` table the hook and workflow
510
+ * writers read, so every generated gate said `--fail-on undefined` and refused to run. */
511
+ const FAIL_ON_ALIASES: Record<string, string> = { error: "blocking", warning: "major", notice: "minor" };
512
+ const FAIL_ON_TOKENS = "blocking, major, minor (or bloquant, majeur, mineur; error/warning/notice as aliases)";
513
+
507
514
  function handleInit(args: Record<string, unknown>, cwd: string): unknown {
508
- const failOnRaw = str(args.fail_on) ?? "error";
509
- if (!["error", "warning", "notice"].includes(failOnRaw)) {
510
- throw new ToolError(`\`fail_on\` must be one of: error, warning, notice (got "${failOnRaw}")`);
515
+ const failOnRaw = str(args.fail_on) ?? "blocking";
516
+ const failOn = parseFailOn(FAIL_ON_ALIASES[failOnRaw] ?? failOnRaw);
517
+ if (failOn === null) {
518
+ throw new ToolError(`\`fail_on\` must be one of: ${FAIL_ON_TOKENS} (got "${failOnRaw}")`);
511
519
  }
512
- const failOn = failOnRaw as Parameters<typeof writeHook>[2];
513
520
  const enginePath = resolve("scripts/ultra11y.mjs");
514
521
  const written: string[] = [];
515
522
  if (bool(args.hook)) written.push(writeHook(cwd, enginePath, failOn));
package/src/mcp/tools.ts CHANGED
@@ -336,7 +336,14 @@ export const WRITE_TOOLS: ToolDecl[] = [
336
336
  hook: { type: "boolean", description: "Install the git pre-commit hook." },
337
337
  ci: { type: "boolean", description: "Install the CI workflow." },
338
338
  baseline: { type: "boolean", description: "Record the current findings as the accepted baseline." },
339
- fail_on: { type: "string", enum: ["error", "warning", "notice"], description: "Severity that fails the gate." },
339
+ fail_on: {
340
+ type: "string",
341
+ // The CLI's own `--fail-on` vocabulary (English or French), which is what the
342
+ // generated hook and workflow carry. The axe-style trio is kept as aliases:
343
+ // error ⇒ blocking, warning ⇒ major, notice ⇒ minor.
344
+ enum: ["blocking", "major", "minor", "bloquant", "majeur", "mineur", "error", "warning", "notice"],
345
+ description: "Severity that fails the gate: blocking | major | minor (default blocking). error/warning/notice are accepted as aliases of the three.",
346
+ },
340
347
  },
341
348
  required: ["cwd"],
342
349
  },
package/src/types.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  // Single source of truth for shared types + the embedded version. sync-version.mjs
2
2
  // rewrites VERSION at release time (kept in lockstep with package.json + SKILL.md).
3
- export const VERSION = "5.49.0";
3
+ export const VERSION = "5.49.1";
4
4
  export const SCHEMA_VERSION = 2;
5
5
 
6
6
  // Lang = the UI FRAME's language — the `L` localization tables each module (report,