@vertaaux/cli 0.5.0 → 0.5.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.
Files changed (84) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/README.md +28 -1
  3. package/dist/app/interactive-app.d.ts +2 -0
  4. package/dist/app/interactive-app.d.ts.map +1 -1
  5. package/dist/app/interactive-app.js +26 -7
  6. package/dist/app/menu/categories.d.ts +2 -2
  7. package/dist/app/menu/categories.d.ts.map +1 -1
  8. package/dist/app/menu/categories.js +3 -18
  9. package/dist/app/views/command-runner.d.ts.map +1 -1
  10. package/dist/app/views/command-runner.js +52 -9
  11. package/dist/app/views/help-overlay.d.ts +1 -1
  12. package/dist/app/views/help-overlay.d.ts.map +1 -1
  13. package/dist/app/views/help-overlay.js +5 -4
  14. package/dist/commands/a11y.d.ts +4 -2
  15. package/dist/commands/a11y.d.ts.map +1 -1
  16. package/dist/commands/a11y.js +82 -9
  17. package/dist/commands/audit/index.d.ts.map +1 -1
  18. package/dist/commands/audit/index.js +33 -8
  19. package/dist/commands/audit/output.d.ts.map +1 -1
  20. package/dist/commands/audit/output.js +3 -4
  21. package/dist/commands/audit/policy.d.ts +10 -2
  22. package/dist/commands/audit/policy.d.ts.map +1 -1
  23. package/dist/commands/audit/policy.js +47 -2
  24. package/dist/commands/audit/types.d.ts +1 -0
  25. package/dist/commands/audit/types.d.ts.map +1 -1
  26. package/dist/commands/baseline.d.ts +1 -0
  27. package/dist/commands/baseline.d.ts.map +1 -1
  28. package/dist/commands/baseline.js +26 -12
  29. package/dist/commands/comment.d.ts.map +1 -1
  30. package/dist/commands/comment.js +8 -7
  31. package/dist/commands/compare.js +3 -3
  32. package/dist/commands/diff.d.ts +2 -0
  33. package/dist/commands/diff.d.ts.map +1 -1
  34. package/dist/commands/diff.js +23 -12
  35. package/dist/commands/doc.js +2 -2
  36. package/dist/commands/doctor.js +2 -2
  37. package/dist/commands/explain.js +3 -3
  38. package/dist/commands/fix-all.js +2 -2
  39. package/dist/commands/fix-plan.d.ts.map +1 -1
  40. package/dist/commands/fix-plan.js +4 -3
  41. package/dist/commands/fix.js +5 -5
  42. package/dist/commands/patch-review.js +2 -2
  43. package/dist/commands/policy.js +2 -2
  44. package/dist/commands/release-notes.js +3 -3
  45. package/dist/commands/suggest.d.ts.map +1 -1
  46. package/dist/commands/suggest.js +28 -2
  47. package/dist/commands/triage.js +3 -3
  48. package/dist/commands/verify.js +3 -3
  49. package/dist/config/schema.d.ts +4 -0
  50. package/dist/config/schema.d.ts.map +1 -1
  51. package/dist/index.js +3 -2
  52. package/dist/output/envelope.d.ts +8 -1
  53. package/dist/output/envelope.d.ts.map +1 -1
  54. package/dist/output/envelope.js +24 -6
  55. package/dist/policy/schema.d.ts +137 -0
  56. package/dist/policy/schema.d.ts.map +1 -1
  57. package/dist/policy/schema.js +107 -0
  58. package/dist/prompts/command-catalog.js +9 -9
  59. package/dist/utils/client.d.ts.map +1 -1
  60. package/dist/utils/client.js +30 -28
  61. package/dist/utils/root-args.d.ts +12 -0
  62. package/dist/utils/root-args.d.ts.map +1 -0
  63. package/dist/utils/root-args.js +44 -0
  64. package/dist/utils/stdin.d.ts +7 -0
  65. package/dist/utils/stdin.d.ts.map +1 -1
  66. package/dist/utils/stdin.js +32 -2
  67. package/node_modules/@vertaaux/tui/dist/index.cjs +505 -9
  68. package/node_modules/@vertaaux/tui/dist/index.cjs.map +1 -1
  69. package/node_modules/@vertaaux/tui/dist/index.js +502 -8
  70. package/node_modules/@vertaaux/tui/dist/index.js.map +1 -1
  71. package/node_modules/@vertaaux/tui/package.json +2 -3
  72. package/node_modules/chalk/license +9 -0
  73. package/node_modules/chalk/package.json +83 -0
  74. package/node_modules/chalk/readme.md +297 -0
  75. package/node_modules/chalk/source/index.d.ts +325 -0
  76. package/node_modules/chalk/source/index.js +225 -0
  77. package/node_modules/chalk/source/utilities.js +33 -0
  78. package/node_modules/chalk/source/vendor/ansi-styles/index.d.ts +236 -0
  79. package/node_modules/chalk/source/vendor/ansi-styles/index.js +223 -0
  80. package/node_modules/chalk/source/vendor/supports-color/browser.d.ts +1 -0
  81. package/node_modules/chalk/source/vendor/supports-color/browser.js +34 -0
  82. package/node_modules/chalk/source/vendor/supports-color/index.d.ts +55 -0
  83. package/node_modules/chalk/source/vendor/supports-color/index.js +190 -0
  84. package/package.json +9 -2
@@ -6,7 +6,7 @@ import { renderError, runSteps, createRenderer } from "@vertaaux/tui";
6
6
  import { ExitCode } from "../utils/exit-codes.js";
7
7
  import { resolveApiBase, resolveFormat, getString, createClient, } from "../utils/api-client.js";
8
8
  import { formatPatchMarkdown, } from "../utils/formatters.js";
9
- import { writeOutput } from "../output/envelope.js";
9
+ import { writeDataOutput, writeJsonOutput } from "../output/envelope.js";
10
10
  import { strings } from "../ui/strings.js";
11
11
  /**
12
12
  * Shared fix runner used by the fix command.
@@ -28,17 +28,17 @@ export async function runFixCommand(base, jobId, issueId, flags, globalFlags = {
28
28
  }
29
29
  if (format === "json") {
30
30
  const output = globalFlags.dryRun ? { ...result, dry_run: true } : result;
31
- process.stdout.write(JSON.stringify(output, null, 2) + "\n");
31
+ writeJsonOutput(output, "fix");
32
32
  }
33
33
  else {
34
34
  if (globalFlags.dryRun) {
35
- writeOutput(strings.fix.dryRun);
35
+ writeDataOutput(strings.fix.dryRun);
36
36
  }
37
37
  if (result.success && result.patch) {
38
- writeOutput(formatPatchMarkdown(result.patch));
38
+ writeDataOutput(formatPatchMarkdown(result.patch));
39
39
  }
40
40
  else {
41
- writeOutput(`## Patch Generation Failed\n\n${result.error?.message || "Unknown error"}`);
41
+ writeDataOutput(`## Patch Generation Failed\n\n${result.error?.message || "Unknown error"}`);
42
42
  }
43
43
  }
44
44
  }
@@ -13,7 +13,7 @@ import { bold, dim, colorize, boldColor, brand, severity as severityPalette, ren
13
13
  import { ExitCode } from "../utils/exit-codes.js";
14
14
  import { resolveApiBase, getApiKey, apiRequest, createClient } from "../utils/client.js";
15
15
  import { resolveConfig } from "../config/loader.js";
16
- import { writeJsonOutput, writeOutput } from "../output/envelope.js";
16
+ import { writeDataOutput, writeJsonOutput, writeOutput } from "../output/envelope.js";
17
17
  import { resolveCommandFormat } from "../output/formats.js";
18
18
  import { readTextInput, readJsonInput } from "../utils/stdin.js";
19
19
  import { AI_TIMEOUT_MS } from "../utils/ai-error.js";
@@ -212,7 +212,7 @@ export async function handlePatchReview(opts) {
212
212
  writeJsonOutput(responseData, "patch-review");
213
213
  }
214
214
  else {
215
- writeOutput(formatPatchReviewHuman(responseData));
215
+ writeDataOutput(formatPatchReviewHuman(responseData));
216
216
  }
217
217
  }
218
218
  }
@@ -11,7 +11,7 @@ import yaml from "yaml";
11
11
  import { colorize, dim, brand, renderError, renderWarning, runSteps, createRenderer } from "@vertaaux/tui";
12
12
  import { loadPolicy, loadPolicyFile, resolveBranchPolicy, POLICY_TEMPLATES, policyJsonSchema, PolicyValidationError, PolicyLoadError, } from "../policy/index.js";
13
13
  import { ExitCode } from "../utils/exit-codes.js";
14
- import { writeJsonOutput, writeOutput } from "../output/envelope.js";
14
+ import { writeDataOutput, writeJsonOutput, writeOutput } from "../output/envelope.js";
15
15
  import { resolveCommandFormat } from "../output/formats.js";
16
16
  import { strings } from "../ui/strings.js";
17
17
  /**
@@ -351,7 +351,7 @@ async function showPolicy(options) {
351
351
  indent: 2,
352
352
  lineWidth: 100,
353
353
  });
354
- writeOutput(yamlOutput);
354
+ writeDataOutput(yamlOutput);
355
355
  }
356
356
  }
357
357
  /**
@@ -16,7 +16,7 @@ import { bold, dim, boldColor, brand, renderError, createRenderer, runSteps } fr
16
16
  import { ExitCode } from "../utils/exit-codes.js";
17
17
  import { resolveApiBase, getApiKey, apiRequest } from "../utils/client.js";
18
18
  import { resolveConfig } from "../config/loader.js";
19
- import { writeJsonOutput, writeOutput } from "../output/envelope.js";
19
+ import { writeDataOutput, writeJsonOutput } from "../output/envelope.js";
20
20
  import { resolveCommandFormat } from "../output/formats.js";
21
21
  import { readJsonInput } from "../utils/stdin.js";
22
22
  import { AI_TIMEOUT_MS } from "../utils/ai-error.js";
@@ -148,10 +148,10 @@ export async function handleReleaseNotes(opts) {
148
148
  writeJsonOutput(responseData, "release-notes");
149
149
  }
150
150
  else if (format === "markdown") {
151
- writeOutput(formatReleaseNotesMarkdown(responseData));
151
+ writeDataOutput(formatReleaseNotesMarkdown(responseData));
152
152
  }
153
153
  else {
154
- writeOutput(formatReleaseNotesHuman(responseData));
154
+ writeDataOutput(formatReleaseNotesHuman(responseData));
155
155
  }
156
156
  }
157
157
  }
@@ -1 +1 @@
1
- {"version":3,"file":"suggest.d.ts","sourceRoot":"","sources":["../../src/commands/suggest.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAwDpC,MAAM,WAAW,qBAAqB;IACpC,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,wBAAsB,aAAa,CAAC,IAAI,EAAE,qBAAqB,GAAG,OAAO,CAAC,IAAI,CAAC,CAiJ9E;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CA2C7D"}
1
+ {"version":3,"file":"suggest.d.ts","sourceRoot":"","sources":["../../src/commands/suggest.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AA6FpC,MAAM,WAAW,qBAAqB;IACpC,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,wBAAsB,aAAa,CAAC,IAAI,EAAE,qBAAqB,GAAG,OAAO,CAAC,IAAI,CAAC,CAiJ9E;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CA2C7D"}
@@ -14,11 +14,36 @@ import { bold, dim, colorize, boldColor, brand, severity as severityPalette, run
14
14
  import { ExitCode } from "../utils/exit-codes.js";
15
15
  import { resolveApiBase, getApiKey, hasApiKey, apiRequest } from "../utils/client.js";
16
16
  import { resolveConfig } from "../config/loader.js";
17
- import { writeJsonOutput, writeOutput } from "../output/envelope.js";
17
+ import { writeDataOutput, writeJsonOutput, writeOutput } from "../output/envelope.js";
18
18
  import { resolveCommandFormat } from "../output/formats.js";
19
19
  import { findMatches } from "../prompts/command-catalog.js";
20
20
  import { AI_TIMEOUT_MS } from "../utils/ai-error.js";
21
21
  import { strings } from "../ui/strings.js";
22
+ function tokenizeCommand(command) {
23
+ return command.match(/"[^"]*"|'[^']*'|\S+/g) ?? [];
24
+ }
25
+ function stripQuotes(token) {
26
+ if ((token.startsWith("\"") && token.endsWith("\"")) ||
27
+ (token.startsWith("'") && token.endsWith("'"))) {
28
+ return token.slice(1, -1);
29
+ }
30
+ return token;
31
+ }
32
+ function toSuggestionStages(command) {
33
+ return command
34
+ .split("|")
35
+ .map((segment) => segment.trim())
36
+ .filter(Boolean)
37
+ .map((segment) => {
38
+ const tokens = tokenizeCommand(segment).map(stripQuotes);
39
+ const [executable = "vertaa", ...argv] = tokens;
40
+ return {
41
+ executable,
42
+ argv,
43
+ placeholders: argv.filter((token) => /^<.+>$/.test(token)),
44
+ };
45
+ });
46
+ }
22
47
  /**
23
48
  * Format suggestion for human-readable output.
24
49
  */
@@ -42,6 +67,7 @@ function formatSuggestJson(results) {
42
67
  return {
43
68
  suggestions: results.map((r) => ({
44
69
  command: r.command,
70
+ stages: toSuggestionStages(r.command),
45
71
  explanation: r.explanation,
46
72
  source: r.source,
47
73
  confidence: r.confidence,
@@ -176,7 +202,7 @@ export async function handleSuggest(opts) {
176
202
  writeJsonOutput(formatSuggestJson(results), "suggest");
177
203
  }
178
204
  else {
179
- writeOutput(formatSuggestHuman(results));
205
+ writeDataOutput(formatSuggestHuman(results));
180
206
  }
181
207
  }
182
208
  /**
@@ -16,7 +16,7 @@ import { bold, dim, colorize, boldColor, brand, severity as severityPalette, run
16
16
  import { ExitCode } from "../utils/exit-codes.js";
17
17
  import { resolveApiBase, getApiKey, apiRequest, createClient } from "../utils/client.js";
18
18
  import { resolveConfig } from "../config/loader.js";
19
- import { writeJsonOutput, writeOutput } from "../output/envelope.js";
19
+ import { writeDataOutput, writeJsonOutput, writeOutput } from "../output/envelope.js";
20
20
  import { resolveCommandFormat } from "../output/formats.js";
21
21
  import { readJsonInput } from "../utils/stdin.js";
22
22
  import { AI_TIMEOUT_MS } from "../utils/ai-error.js";
@@ -274,12 +274,12 @@ export async function handleTriage(opts) {
274
274
  await viewport.run();
275
275
  }
276
276
  else {
277
- writeOutput(formatTriageHuman(triageData, verbose));
277
+ writeDataOutput(formatTriageHuman(triageData, verbose));
278
278
  }
279
279
  }
280
280
  else {
281
281
  // Non-TTY / CI / piped-stdin fallback: current text output
282
- writeOutput(formatTriageHuman(triageData, verbose));
282
+ writeDataOutput(formatTriageHuman(triageData, verbose));
283
283
  }
284
284
  }
285
285
  // ---------------------------------------------------------------------------
@@ -7,7 +7,7 @@ import { ExitCode } from "../utils/exit-codes.js";
7
7
  import { parseTimeout } from "../utils/validators.js";
8
8
  import { resolveApiBase, resolveFormat, getString, getNumber, createClient, } from "../utils/api-client.js";
9
9
  import { formatVerifyMarkdown, } from "../utils/formatters.js";
10
- import { writeOutput } from "../output/envelope.js";
10
+ import { writeDataOutput, writeJsonOutput } from "../output/envelope.js";
11
11
  import { strings } from "../ui/strings.js";
12
12
  /**
13
13
  * Shared verify runner used by the verify command.
@@ -43,10 +43,10 @@ export async function runVerifyCommand(base, flags) {
43
43
  process.exitCode = 1;
44
44
  }
45
45
  if (format === "json") {
46
- process.stdout.write(JSON.stringify(result, null, 2) + "\n");
46
+ writeJsonOutput(result, "verify");
47
47
  }
48
48
  else {
49
- writeOutput(formatVerifyMarkdown(result));
49
+ writeDataOutput(formatVerifyMarkdown(result));
50
50
  }
51
51
  }
52
52
  export async function handleVerify(cmdOptions) {
@@ -37,6 +37,10 @@ export interface VertaauxConfig {
37
37
  defaultUrl?: string;
38
38
  /** Audit depth: basic, standard, or deep */
39
39
  mode?: AuditMode;
40
+ /** Default audit profile name (built-in or custom) */
41
+ profile?: string;
42
+ /** Custom audit profile definitions */
43
+ profiles?: Record<string, import("../policy/schema.js").AuditProfile>;
40
44
  /** Output configuration */
41
45
  output?: OutputConfig;
42
46
  /** Minimum passing score (0-100) */
@@ -1 +1 @@
1
- {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../src/config/schema.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,MAAM,MAAM,SAAS,GAAG,OAAO,GAAG,UAAU,GAAG,MAAM,CAAC;AACtD,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC;AAClF,MAAM,MAAM,OAAO,GAAG,UAAU,GAAG,UAAU,GAAG,OAAO,CAAC;AACxD,MAAM,MAAM,cAAc,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,CAAC;AAC1D,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,QAAQ,GAAG,UAAU,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,CAAC;AAEzF,MAAM,WAAW,YAAY;IAC3B,0DAA0D;IAC1D,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,oCAAoC;IACpC,OAAO,CAAC,EAAE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
@@ -48,6 +48,7 @@ import { MenuView } from "./app/menu/menu-view.js";
48
48
  // import { HelpOverlayView } from "./app/views/help-overlay.js";
49
49
  import { CommandRunnerView } from "./app/views/command-runner.js";
50
50
  import { recordRecent } from "./app/menu/recent.js";
51
+ import { getRootCommandToken, hasHelpOrVersionFlag } from "./utils/root-args.js";
51
52
  // Detect best symbol tier for this terminal (nerd > unicode > ascii)
52
53
  setSymbolTier(detectSymbolTier());
53
54
  // ============================================================================
@@ -244,8 +245,8 @@ async function launchInteractiveApp() {
244
245
  // Parse and execute
245
246
  // ============================================================================
246
247
  const args = process.argv.slice(2);
247
- const hasCommand = args.length > 0 && !args[0].startsWith("-");
248
- const hasGlobalFlag = args.some((a) => ["-h", "--help", "-v", "--version"].includes(a));
248
+ const hasCommand = Boolean(getRootCommandToken(args));
249
+ const hasGlobalFlag = hasHelpOrVersionFlag(args);
249
250
  if (!hasCommand && !hasGlobalFlag && isInteractive()) {
250
251
  // InteractiveApp renders its own banner in the header section — no pre-banner needed
251
252
  launchInteractiveApp().catch((error) => {
@@ -17,7 +17,14 @@ export interface OutputEnvelope<T = unknown> {
17
17
  }
18
18
  export declare function createEnvelope<T>(data: T, command: string): OutputEnvelope<T>;
19
19
  export declare function writeJsonOutput<T>(data: T, command: string): void;
20
- /** Redirect writeOutput to a buffer. Pass null to restore direct stderr writes. */
20
+ /** Redirect output helpers to a buffer. Pass null to restore direct terminal writes. */
21
21
  export declare function setOutputBuffer(buffer: string[] | null): void;
22
+ /**
23
+ * Write command payloads to stdout so they remain pipeable.
24
+ */
25
+ export declare function writeDataOutput(content: string): void;
26
+ /**
27
+ * Write diagnostics and notices to stderr.
28
+ */
22
29
  export declare function writeOutput(content: string): void;
23
30
  //# sourceMappingURL=envelope.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"envelope.d.ts","sourceRoot":"","sources":["../../src/output/envelope.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,MAAM,WAAW,UAAU;IACzB,OAAO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M,EAAE,MAAM,EAAE,GAAG,IAAI,GAAG,IAAI,CAE7D;AAUD;;GAEG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAErD;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAEjD"}
@@ -65,23 +65,41 @@ export function createEnvelope(data, command) {
65
65
  }
66
66
  export function writeJsonOutput(data, command) {
67
67
  const envelope = createEnvelope(data, command);
68
- process.stdout.write(JSON.stringify(envelope, null, 2) + "\n");
68
+ const content = JSON.stringify(envelope, null, 2);
69
+ if (_outputBuffer) {
70
+ _outputBuffer.push(...content.split("\n"));
71
+ }
72
+ else {
73
+ process.stdout.write(content + "\n");
74
+ }
69
75
  }
70
76
  /**
71
- * Output buffer for interactive mode. When set, writeOutput appends
72
- * to this buffer instead of writing to stderr (to avoid garbling
77
+ * Output buffer for interactive mode. When set, output helpers append
78
+ * to this buffer instead of writing to the terminal (to avoid garbling
73
79
  * the InteractiveApp's alt screen).
74
80
  */
75
81
  let _outputBuffer = null;
76
- /** Redirect writeOutput to a buffer. Pass null to restore direct stderr writes. */
82
+ /** Redirect output helpers to a buffer. Pass null to restore direct terminal writes. */
77
83
  export function setOutputBuffer(buffer) {
78
84
  _outputBuffer = buffer;
79
85
  }
80
- export function writeOutput(content) {
86
+ function writeBuffered(content, writer) {
81
87
  if (_outputBuffer) {
82
88
  _outputBuffer.push(...content.split("\n"));
83
89
  }
84
90
  else {
85
- process.stderr.write(content + "\n");
91
+ writer(content + "\n");
86
92
  }
87
93
  }
94
+ /**
95
+ * Write command payloads to stdout so they remain pipeable.
96
+ */
97
+ export function writeDataOutput(content) {
98
+ writeBuffered(content, (payload) => process.stdout.write(payload));
99
+ }
100
+ /**
101
+ * Write diagnostics and notices to stderr.
102
+ */
103
+ export function writeOutput(content) {
104
+ writeBuffered(content, (payload) => process.stderr.write(payload));
105
+ }
@@ -294,4 +294,141 @@ export declare const POLICY_TEMPLATES: {
294
294
  };
295
295
  };
296
296
  export type PolicyTemplate = keyof typeof POLICY_TEMPLATES;
297
+ /** Valid audit category names. */
298
+ export type AuditCategory = "accessibility" | "usability" | "clarity" | "conversion" | "ia" | "semantic" | "keyboard";
299
+ /**
300
+ * Named audit profile that bundles category selection, weight overrides,
301
+ * score thresholds, mode, and assertion defaults into a single preset.
302
+ *
303
+ * Profiles sit between policy files and CLI flags in the precedence chain:
304
+ * CLI flag > config file > profile > default
305
+ */
306
+ export interface AuditProfile {
307
+ /** Profile identifier (matches the key in AUDIT_PROFILES). */
308
+ name: string;
309
+ /** Human-readable description. */
310
+ description?: string;
311
+ /** Which categories to run. Omit to run all. */
312
+ categories?: AuditCategory[];
313
+ /** Category weight overrides (merged with default CATEGORY_WEIGHTS). */
314
+ weights?: Partial<Record<AuditCategory, number>>;
315
+ /** Per-category and overall score thresholds. */
316
+ thresholds?: {
317
+ overall?: number;
318
+ } & Partial<Record<AuditCategory, number>>;
319
+ /** Rule severity overrides (same shape as PolicyFile.rules). */
320
+ rules?: Record<string, RuleOverride>;
321
+ /** Default audit depth for this profile. */
322
+ mode?: "basic" | "standard" | "deep";
323
+ /** Quality gate assertion overrides. */
324
+ assertions?: Partial<PolicyAssertions>;
325
+ }
326
+ /**
327
+ * Built-in audit profiles.
328
+ *
329
+ * Each profile is a curated combination of category selection, weights,
330
+ * thresholds, and mode optimized for a specific use case.
331
+ */
332
+ export declare const AUDIT_PROFILES: {
333
+ /**
334
+ * WCAG AA compliance — focuses on accessibility, keyboard, and semantic
335
+ * categories with strict thresholds and deep analysis.
336
+ */
337
+ "wcag-aa": {
338
+ name: string;
339
+ description: string;
340
+ categories: AuditCategory[];
341
+ weights: {
342
+ accessibility: number;
343
+ keyboard: number;
344
+ semantic: number;
345
+ };
346
+ thresholds: {
347
+ accessibility: number;
348
+ };
349
+ mode: "deep";
350
+ assertions: {
351
+ fail_on: "warning";
352
+ max_new_errors: number;
353
+ };
354
+ };
355
+ /**
356
+ * Conversion-focused — emphasizes conversion, usability, and clarity
357
+ * to optimize for business outcomes.
358
+ */
359
+ "conversion-focus": {
360
+ name: string;
361
+ description: string;
362
+ categories: AuditCategory[];
363
+ weights: {
364
+ conversion: number;
365
+ usability: number;
366
+ clarity: number;
367
+ };
368
+ thresholds: {
369
+ conversion: number;
370
+ };
371
+ mode: "standard";
372
+ assertions: {
373
+ fail_on: "error";
374
+ };
375
+ };
376
+ /**
377
+ * Quick UX scan — all categories, basic mode, no thresholds.
378
+ * Optimized for speed in development workflows.
379
+ */
380
+ "quick-ux": {
381
+ name: string;
382
+ description: string;
383
+ mode: "basic";
384
+ assertions: {
385
+ fail_on: "error";
386
+ };
387
+ };
388
+ /**
389
+ * CI quality gate — all categories with strict thresholds.
390
+ * Designed for PR gating in CI/CD pipelines.
391
+ */
392
+ "ci-gate": {
393
+ name: string;
394
+ description: string;
395
+ thresholds: {
396
+ overall: number;
397
+ };
398
+ mode: "standard";
399
+ assertions: {
400
+ fail_on: "warning";
401
+ overall_score: number;
402
+ max_new_errors: number;
403
+ max_new_warnings: number;
404
+ };
405
+ };
406
+ /**
407
+ * Full compliance — accessibility + semantic + keyboard with very strict
408
+ * thresholds. For regulated industries or accessibility-first orgs.
409
+ */
410
+ compliance: {
411
+ name: string;
412
+ description: string;
413
+ categories: AuditCategory[];
414
+ weights: {
415
+ accessibility: number;
416
+ semantic: number;
417
+ keyboard: number;
418
+ };
419
+ thresholds: {
420
+ overall: number;
421
+ accessibility: number;
422
+ };
423
+ mode: "deep";
424
+ assertions: {
425
+ fail_on: "warning";
426
+ overall_score: number;
427
+ accessibility_score: number;
428
+ max_new_errors: number;
429
+ max_new_warnings: number;
430
+ };
431
+ };
432
+ };
433
+ export type AuditProfileName = keyof typeof AUDIT_PROFILES;
297
434
  //# sourceMappingURL=schema.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../src/policy/schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;A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H,eAAO,MAAM,cAAc;IACzB;;;OAGG;;;;oBAIwD,aAAa,EAAE;;;;;;;;;;;;;;;IAgB1E;;;OAGG;;;;oBAIqD,aAAa,EAAE;;;;;;;;;;;;;;IAevE;;;OAGG;;;;;;;;;IAUH;;;OAGG;;;;;;;;;;;;;;;IAgBH;;;OAGG;;;;oBAIwD,aAAa,EAAE;;;;;;;;;;;;;;;;;;;CAmBpC,CAAC;AAEzC,MAAM,MAAM,gBAAgB,GAAG,MAAM,OAAO,cAAc,CAAC"}
@@ -228,3 +228,110 @@ export const POLICY_TEMPLATES = {
228
228
  bypass_labels: ["skip-vertaa", "emergency-fix", "wip"],
229
229
  },
230
230
  };
231
+ /**
232
+ * Built-in audit profiles.
233
+ *
234
+ * Each profile is a curated combination of category selection, weights,
235
+ * thresholds, and mode optimized for a specific use case.
236
+ */
237
+ export const AUDIT_PROFILES = {
238
+ /**
239
+ * WCAG AA compliance — focuses on accessibility, keyboard, and semantic
240
+ * categories with strict thresholds and deep analysis.
241
+ */
242
+ "wcag-aa": {
243
+ name: "wcag-aa",
244
+ description: "WCAG 2.2 AA compliance audit — accessibility-focused deep scan",
245
+ categories: ["accessibility", "keyboard", "semantic"],
246
+ weights: {
247
+ accessibility: 0.55,
248
+ keyboard: 0.25,
249
+ semantic: 0.20,
250
+ },
251
+ thresholds: {
252
+ accessibility: 85,
253
+ },
254
+ mode: "deep",
255
+ assertions: {
256
+ fail_on: "warning",
257
+ max_new_errors: 0,
258
+ },
259
+ },
260
+ /**
261
+ * Conversion-focused — emphasizes conversion, usability, and clarity
262
+ * to optimize for business outcomes.
263
+ */
264
+ "conversion-focus": {
265
+ name: "conversion-focus",
266
+ description: "Conversion optimization audit — CTA, funnel, and UX friction analysis",
267
+ categories: ["conversion", "usability", "clarity"],
268
+ weights: {
269
+ conversion: 0.45,
270
+ usability: 0.30,
271
+ clarity: 0.25,
272
+ },
273
+ thresholds: {
274
+ conversion: 75,
275
+ },
276
+ mode: "standard",
277
+ assertions: {
278
+ fail_on: "error",
279
+ },
280
+ },
281
+ /**
282
+ * Quick UX scan — all categories, basic mode, no thresholds.
283
+ * Optimized for speed in development workflows.
284
+ */
285
+ "quick-ux": {
286
+ name: "quick-ux",
287
+ description: "Fast UX scan across all categories — speed over depth",
288
+ mode: "basic",
289
+ assertions: {
290
+ fail_on: "error",
291
+ },
292
+ },
293
+ /**
294
+ * CI quality gate — all categories with strict thresholds.
295
+ * Designed for PR gating in CI/CD pipelines.
296
+ */
297
+ "ci-gate": {
298
+ name: "ci-gate",
299
+ description: "CI/CD quality gate — strict thresholds for PR blocking",
300
+ thresholds: {
301
+ overall: 80,
302
+ },
303
+ mode: "standard",
304
+ assertions: {
305
+ fail_on: "warning",
306
+ overall_score: 80,
307
+ max_new_errors: 0,
308
+ max_new_warnings: 0,
309
+ },
310
+ },
311
+ /**
312
+ * Full compliance — accessibility + semantic + keyboard with very strict
313
+ * thresholds. For regulated industries or accessibility-first orgs.
314
+ */
315
+ compliance: {
316
+ name: "compliance",
317
+ description: "Full compliance audit — strict a11y for regulated industries",
318
+ categories: ["accessibility", "semantic", "keyboard"],
319
+ weights: {
320
+ accessibility: 0.55,
321
+ semantic: 0.25,
322
+ keyboard: 0.20,
323
+ },
324
+ thresholds: {
325
+ overall: 85,
326
+ accessibility: 90,
327
+ },
328
+ mode: "deep",
329
+ assertions: {
330
+ fail_on: "warning",
331
+ overall_score: 85,
332
+ accessibility_score: 90,
333
+ max_new_errors: 0,
334
+ max_new_warnings: 0,
335
+ },
336
+ },
337
+ };
@@ -85,13 +85,13 @@ export const COMMAND_CATALOG = [
85
85
  },
86
86
  // --- Diff ---
87
87
  {
88
- command: "vertaa diff --job-a <id> --job-b <id>",
88
+ command: "vertaa diff <job-id> --compare <job-id>",
89
89
  description: "Compare two audit jobs to see what changed",
90
- keywords: ["diff", "delta", "change", "compare jobs", "what changed"],
90
+ keywords: ["diff", "delta", "change", "compare jobs", "what changed", "regression"],
91
91
  },
92
92
  // --- Baseline ---
93
93
  {
94
- command: "vertaa baseline save",
94
+ command: "vertaa baseline <job-id>",
95
95
  description: "Save current audit results as a baseline for future comparison",
96
96
  keywords: ["baseline", "save", "snapshot", "reference", "lock"],
97
97
  },
@@ -119,15 +119,15 @@ export const COMMAND_CATALOG = [
119
119
  },
120
120
  // --- Comment ---
121
121
  {
122
- command: "vertaa comment --job <id> --github-pr <number>",
123
- description: "Post audit results as a GitHub PR comment",
124
- keywords: ["comment", "pr", "pull request", "github", "gitlab", "post"],
122
+ command: "vertaa comment --input audit.json",
123
+ description: "Generate PR comment markdown from audit results JSON",
124
+ keywords: ["comment", "pr", "pull request", "github", "gitlab", "post", "markdown"],
125
125
  },
126
126
  // --- Upload/Download ---
127
127
  {
128
- command: "vertaa upload --file baseline.json",
129
- description: "Upload a baseline file to the VertaaUX API",
130
- keywords: ["upload", "push", "send"],
128
+ command: "vertaa upload <job-id>",
129
+ description: "Upload local audit artifacts to the VertaaUX API",
130
+ keywords: ["upload", "push", "send", "sync"],
131
131
  },
132
132
  {
133
133
  command: "vertaa download --job <id> --output results.json",
@@ -1 +1 @@
1
- {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/utils/client.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAI3C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAG1D,YAAY,EAAE,KAAK,IAAI,aAAa,EAAE,CAAC;AAoCvC;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAC5B,QAAQ,CAAC,EAAE,MAAM,EACjB,UAAU,CAAC,EAAE,MAAM,GAClB,MAAM,CAOR;AAED;;;;;;GAMG;AACH,wBAAgB,SAAS,CAAC,YAAY,CAAC,EAAE,MAAM,GAAG,MAAM,CAQvD;AAED;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,MAAM,CAAC,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