dsh-desktop-kit 2.24.1 → 2.30.0

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 (71) hide show
  1. package/CHANGELOG.md +71 -10
  2. package/README.md +193 -262
  3. package/client.js +1 -1
  4. package/docs/ARCHITECTURE.md +9 -6
  5. package/docs/PROPOSAL-2.25-quality-pipeline.md +435 -0
  6. package/docs/PROPOSAL-NEXUM-FINDINGS.md +259 -0
  7. package/docs/TEST-2.30.0.md +83 -0
  8. package/docs/images/capability-map-2.30.png +0 -0
  9. package/docs/images/hero-2.30.png +0 -0
  10. package/docs/images/quality-pipeline-2.30.png +0 -0
  11. package/docs/preview/capability-map-2.30.html +106 -0
  12. package/docs/preview/hero-2.30.html +133 -0
  13. package/docs/preview/quality-pipeline-2.30.html +142 -0
  14. package/docs/preview/readme-visuals.css +111 -0
  15. package/index.js +6 -0
  16. package/package.json +11 -4
  17. package/plugins/dsh-agent-extensions/lib/routing.js +4 -0
  18. package/plugins/dsh-agent-extensions/lib/scaffold.js +152 -27
  19. package/plugins/dsh-agent-extensions/lib/settings.js +19 -0
  20. package/plugins/dsh-agent-extensions/lib/swarm.js +6 -2
  21. package/plugins/dsh-browser-qa/index.js +202 -9
  22. package/plugins/dsh-browser-qa/lib/design-more.js +688 -0
  23. package/plugins/dsh-browser-qa/lib/extras.js +1313 -0
  24. package/plugins/dsh-browser-qa/lib/pages.js +4 -3
  25. package/plugins/dsh-browser-qa/lib/png.js +190 -0
  26. package/plugins/dsh-browser-qa/lib/ui-gate.js +171 -31
  27. package/plugins/dsh-i18n/README.md +36 -0
  28. package/plugins/dsh-i18n/cordis.patch.yml +3 -0
  29. package/plugins/dsh-i18n/index.js +294 -0
  30. package/plugins/dsh-i18n/lib/lang.js +179 -0
  31. package/plugins/dsh-i18n/package.json +29 -0
  32. package/plugins/dsh-quality-pipeline/README.md +53 -0
  33. package/plugins/dsh-quality-pipeline/cordis.patch.yml +3 -0
  34. package/plugins/dsh-quality-pipeline/index.js +647 -0
  35. package/plugins/dsh-quality-pipeline/lib/acceptance.js +132 -0
  36. package/plugins/dsh-quality-pipeline/lib/autostart.js +159 -0
  37. package/plugins/dsh-quality-pipeline/lib/design.js +123 -0
  38. package/plugins/dsh-quality-pipeline/lib/machine.js +312 -0
  39. package/plugins/dsh-quality-pipeline/lib/prework.js +215 -0
  40. package/plugins/dsh-quality-pipeline/lib/release.js +53 -0
  41. package/plugins/dsh-quality-pipeline/lib/schema.js +256 -0
  42. package/plugins/dsh-quality-pipeline/lib/store.js +114 -0
  43. package/plugins/dsh-quality-pipeline/lib/text.js +109 -0
  44. package/plugins/dsh-quality-pipeline/package.json +33 -0
  45. package/plugins/dsh-remote-ops/README.md +38 -0
  46. package/plugins/dsh-remote-ops/cordis.patch.yml +3 -0
  47. package/plugins/dsh-remote-ops/index.js +268 -0
  48. package/plugins/dsh-remote-ops/lib/hosts.js +118 -0
  49. package/plugins/dsh-remote-ops/lib/ssh.js +96 -0
  50. package/plugins/dsh-remote-ops/lib/state.js +66 -0
  51. package/plugins/dsh-remote-ops/package.json +31 -0
  52. package/plugins/dsh-skill-autopilot/index.js +204 -15
  53. package/skills/a11y-audit/SKILL.md +67 -0
  54. package/skills/cms-ops/SKILL.md +74 -0
  55. package/skills/design-system/SKILL.md +100 -0
  56. package/skills/legal-ru-web/SKILL.md +68 -0
  57. package/skills/manifest.json +38 -18
  58. package/skills/release-pipeline/SKILL.md +67 -0
  59. package/skills/ui-batch/SKILL.md +60 -0
  60. package/skills/web-build/SKILL.md +106 -0
  61. package/skills/web-build/recipes/form.md +16 -0
  62. package/skills/web-build/recipes/payment.md +16 -0
  63. package/skills/web-build/recipes/review.md +16 -0
  64. package/skills-baseline.json +192 -0
  65. package/skills/ui-design-system/references/accessibility-and-responsive.md +0 -50
  66. package/skills/ui-design-system/references/tokens-and-components.md +0 -67
  67. package/skills/ui-design-system/references/visual-qa.md +0 -44
  68. package/skills/visual-qa/references/commands.md +0 -32
  69. /package/skills/{ui-craft/SKILL.md → design-system/references/ui-craft.md} +0 -0
  70. /package/skills/{ui-design-system/SKILL.md → design-system/references/ui-design-system.md} +0 -0
  71. /package/skills/{visual-qa/SKILL.md → ui-batch/references/visual-qa.md} +0 -0
@@ -11,8 +11,16 @@ export const DEFAULTS = {
11
11
  autoScaffold: true,
12
12
  swarm: { enabled: true, threshold: 3, maxAgents: 4 },
13
13
  mcpBootstrap: { enabled: true, trusted: false },
14
+ quality: { enabled: true, profile: "standard", autoStart: true },
14
15
  };
15
16
 
17
+ const QUALITY_PROFILES = new Set(["fast", "standard", "turnkey"]);
18
+
19
+ function qualityProfileOf(value) {
20
+ const profile = String(value ?? "");
21
+ return QUALITY_PROFILES.has(profile) ? profile : DEFAULTS.quality.profile;
22
+ }
23
+
16
24
  function home() {
17
25
  return process.env.DSH_HOME || path.join(os.homedir(), ".dsh");
18
26
  }
@@ -38,6 +46,11 @@ export function readSettings() {
38
46
  enabled: current.mcpBootstrap?.enabled !== false,
39
47
  trusted: current.mcpBootstrap?.trusted === true,
40
48
  },
49
+ quality: {
50
+ enabled: current.quality?.enabled !== false,
51
+ profile: qualityProfileOf(current.quality?.profile),
52
+ autoStart: current.quality?.autoStart !== false,
53
+ },
41
54
  };
42
55
  }
43
56
 
@@ -58,6 +71,12 @@ export function updateSettings(patch = {}) {
58
71
  ...(typeof patch.mcpBootstrap?.enabled === "boolean" ? { enabled: patch.mcpBootstrap.enabled } : {}),
59
72
  ...(typeof patch.mcpBootstrap?.trusted === "boolean" ? { trusted: patch.mcpBootstrap.trusted } : {}),
60
73
  },
74
+ quality: {
75
+ ...current.quality,
76
+ ...(typeof patch.quality?.enabled === "boolean" ? { enabled: patch.quality.enabled } : {}),
77
+ ...(typeof patch.quality?.autoStart === "boolean" ? { autoStart: patch.quality.autoStart } : {}),
78
+ ...(typeof patch.quality?.profile === "string" ? { profile: qualityProfileOf(patch.quality.profile) } : {}),
79
+ },
61
80
  };
62
81
  const file = settingsPath();
63
82
  fs.mkdirSync(path.dirname(file), { recursive: true, mode: 0o700 });
@@ -21,6 +21,9 @@ const EXTERNAL = [
21
21
  /* A bare Russian "и" is far too common to signal several areas: "проверь X и Y"
22
22
  * is one question. Only explicit "plus/also" (or the English equivalents) count. */
23
23
  const MULTI = [/\b(?:and|plus|also)\b/iu, /(?:^|\s)(?:плюс|также)(?:\s|$)/iu];
24
+ /* UI work is where a read-only swarm pays for itself: screenshots, contrast,
25
+ * admin edits and metrics are independent checks of the same page. */
26
+ const UI = [/\b(?:ui|ux|layout|css|page|site|design|responsive|mobile|tablet)\b/iu, /(?:вёрстк|верстк|дизайн|страниц|сайт|адаптив|мобил|планшет|интерфейс|лендинг)/iu];
24
27
 
25
28
  export function loadSwarmOptions(projectRoot) {
26
29
  try {
@@ -50,11 +53,12 @@ export function chooseSwarm(task, teams = [], agents = [], options = {}) {
50
53
 
51
54
  const maxAgents = Math.max(2, Math.min(6, Number(options.maxAgents) || 4));
52
55
  const research = EXTERNAL.some((pattern) => pattern.test(text));
56
+ const ui = UI.some((pattern) => pattern.test(text));
53
57
  const readOnlyNames = new Set(readOnly.map((agent) => agent.name));
54
58
  const lead = readOnly.find((agent) => /^(?:lead|coordinator|orchestrator)$/iu.test(agent.name))?.name ?? "";
55
59
  const candidates = readOnly.filter((agent) => agent.name !== lead);
56
60
 
57
- const preferredPresets = research ? ["research", "audit"] : ["review", "security", "audit"];
61
+ const preferredPresets = research ? ["research", "audit"] : ui ? ["web-accept", "review", "security", "audit"] : ["review", "security", "audit"];
58
62
  const presets = teams
59
63
  .filter((team) => Array.isArray(team.members) && team.members.length >= 2)
60
64
  .map((team) => ({ team, score: preferredPresets.indexOf(team.id) }))
@@ -68,7 +72,7 @@ export function chooseSwarm(task, teams = [], agents = [], options = {}) {
68
72
  }
69
73
  }
70
74
 
71
- const preferred = ["reviewer", "researcher", "verifier", "security", "performance"];
75
+ const preferred = ["ui-critic", "a11y", "reviewer", "cms-ops", "researcher", "verifier", "security", "performance"];
72
76
  const members = candidates
73
77
  .slice()
74
78
  .sort((a, b) => (preferred.indexOf(a.name) + 1 || 99) - (preferred.indexOf(b.name) + 1 || 99))
@@ -1,15 +1,22 @@
1
1
  /**
2
2
  * dsh-browser-qa — headless-Chrome quality checks for DSH agents.
3
3
  *
4
- * One tool, three actions:
5
- * status — detect Chrome/Edge and report its path/version;
6
- * shot — open a URL or local HTML file, set a viewport, save a PNG;
7
- * audit — at responsive widths measure horizontal overflow, list the
8
- * overflowing elements and console errors, optionally save PNGs.
4
+ * One tool, seven actions:
5
+ * status — detect Chrome/Edge and report its path/version;
6
+ * shot — open a URL or local HTML file, set a viewport, save a PNG;
7
+ * audit — at responsive widths measure horizontal overflow, list the
8
+ * overflowing elements and console errors, optionally save PNGs;
9
+ * interact — run a click/fill/expect scenario and catch covered controls;
10
+ * a11y — accessibility checks (names, labels, contrast, tap targets,
11
+ * focus visibility) without axe-core;
12
+ * perf — LCP/INP/CLS/FCP/TTFB against the web.dev budget;
13
+ * probe — crawl internal links and empty sections for 404 and dead hrefs.
9
14
  *
10
15
  * Everything is Node-built-ins only: the DevTools protocol is spoken over the
11
16
  * WebSocket client built into Node 22+/24, so there is no Playwright dependency.
12
17
  */
18
+ import { runA11y, runCompare, runDesign, runFlow, runLocate, runPerf, runProbe } from "./lib/extras.js";
19
+ import { annotateReference, appendRule, runBenchmark, runConsistency, runContent, runReport, runStates, runTokens } from "./lib/design-more.js";
13
20
  import { auditPages, captureShot, statusReport } from "./lib/pages.js";
14
21
  import { createUiGate } from "./lib/ui-gate.js";
15
22
  import { errorMessage, normalizeViewport, parseTimeout, parseWidths } from "./lib/qa.js";
@@ -50,15 +57,15 @@ function makeToolDefinition() {
50
57
  return {
51
58
  name: TOOL_NAME,
52
59
  description:
53
- "Headless-Chrome quality checks without Playwright. status: detect Chrome and its version. shot: open an http(s) URL or local HTML file, set the viewport, save a PNG and return its path/size. audit: load the page at responsive viewports (matrix 'full' = phone 390x844 and 844x390, tablet 768x1024 and 1024x768, desktop 1440x900; default 390/768/1440) and report horizontal overflow (documentElement.scrollWidth vs clientWidth), the overflowing elements, per-viewport device labels, console errors, markup/accessibility issues (missing alt, unlabeled fields, nameless links/buttons, duplicate ids, heading order, lang/title/viewport, positive tabindex), and optionally one PNG per viewport (pass outDir). Uses the Chrome DevTools protocol over a temporary profile; no external network calls beyond the page itself.",
60
+ "Headless-Chrome quality checks without Playwright. status: detect Chrome and its version. shot: open an http(s) URL or local HTML file, set the viewport, save a PNG and return its path/size. audit: load the page at responsive viewports (matrix 'full' = phone 390x844 and 844x390, tablet 768x1024 and 1024x768, desktop 1440x900; default 390/768/1440) and report horizontal overflow (documentElement.scrollWidth vs clientWidth), the overflowing elements, per-viewport device labels, console errors, markup/accessibility issues (missing alt, unlabeled fields, nameless links/buttons, duplicate ids, heading order, lang/title/viewport, positive tabindex), and optionally one PNG per viewport (pass outDir). interact: run a scenario of click/fill/press/wait/expect/eval/shot/reload steps at one viewport — a click fails when the element is missing, invisible, disabled or covered by another element (the classic dead zone), so a green audit plus a broken menu can no longer happen. a11y: check accessible names, form labels, heading order, duplicate ids, contrast, tap targets (WCAG 2.2 AA 2.5.8 = 24px, 44px reported as advisory), zoom locks, aria-hidden focusables and focus visibility/obscuring for up to focusLimit elements. perf: LCP/INP/CLS/FCP/TTFB plus requests and bytes against the web.dev budget (LCP 2500 ms, INP 200 ms, CLS 0.1). probe: crawl same-origin links and sections, report 404/410, empty hrefs and sections without links. Uses the Chrome DevTools protocol over a temporary profile; no external network calls beyond the page itself.",
54
61
  parameters: {
55
62
  type: "object",
56
63
  additionalProperties: false,
57
64
  properties: {
58
65
  action: {
59
66
  type: "string",
60
- enum: ["shot", "audit", "status"],
61
- description: "shot: one viewport PNG | audit: overflow/console report at responsive widths | status: Chrome path/version",
67
+ enum: ["shot", "audit", "status", "interact", "a11y", "perf", "probe", "design", "locate", "compare", "tokens", "consistency", "content", "states", "rule", "report", "benchmark", "reference"],
68
+ description: "shot: one viewport PNG | audit: overflow/console report at responsive widths | interact: scenario steps | a11y: accessibility report | perf: LCP/INP/CLS | probe: link crawl | design: rhythm, duplicate selectors, layers, type scale | status: Chrome path/version",
62
69
  },
63
70
  url: {
64
71
  type: "string",
@@ -99,6 +106,43 @@ function makeToolDefinition() {
99
106
  },
100
107
  fullPage: { type: "boolean", description: "Capture the full page instead of the viewport (height capped at 16384 px)." },
101
108
  timeoutMs: { type: "integer", description: "Page load timeout per width in ms (default 30000, range 3000..120000)." },
109
+ steps: {
110
+ type: "array",
111
+ maxItems: 40,
112
+ description:
113
+ "interact: scenario steps. {type:'click', selector}, {type:'fill', selector, value}, {type:'press', key}, {type:'wait', ms}, {type:'expect', selector, visible?, text?, count?, enabled?}, {type:'eval', code}, {type:'shot', name?, fullPage?}, {type:'reload'}.",
114
+ items: {
115
+ type: "object",
116
+ additionalProperties: true,
117
+ required: ["type"],
118
+ properties: {
119
+ type: { type: "string", enum: ["click", "fill", "press", "wait", "expect", "eval", "shot", "reload"] },
120
+ selector: { type: "string" },
121
+ value: { type: "string" },
122
+ key: { type: "string" },
123
+ ms: { type: "integer" },
124
+ text: { type: "string" },
125
+ count: { type: "integer" },
126
+ visible: { type: "boolean" },
127
+ enabled: { type: "boolean" },
128
+ code: { type: "string" },
129
+ name: { type: "string" },
130
+ fullPage: { type: "boolean" },
131
+ },
132
+ },
133
+ },
134
+ focusLimit: { type: "integer", description: "a11y: how many focusable elements to walk for focus visibility (default 12, 0 disables)." },
135
+ maxLinks: { type: "integer", description: "probe: how many links to check (default 40, max 80)." },
136
+ internalOnly: { type: "boolean", description: "probe: check only same-origin links (default true)." },
137
+ text: { type: "string", description: "locate: visible text of the element to find (e.g. «Записаться на приём»)." },
138
+ index: { type: "integer", description: "locate: which match to take when the text repeats (default 0)." },
139
+ scope: { type: "string", description: "locate: CSS selector to limit the search (default body)." },
140
+ baselineDir: { type: "string", description: "compare: folder for baselines (default .dsh/browser-qa/baseline)." },
141
+ threshold: { type: "number", description: "compare: allowed share of changed pixels (default 0.002 = 0.2 %)." },
142
+ update: { type: "boolean", description: "compare: write the current screenshot as the new baseline." },
143
+ urls: { type: "array", items: { type: "string" }, maxItems: 8, description: "consistency: 2+ page URLs to compare (container width, headings, paddings)." },
144
+ rule: { type: "string", description: "rule: owner design rule text to append to .dsh/rules/design.md." },
145
+ take: { type: "string", description: "reference: what exactly we take from this reference (grid, type, states)." },
102
146
  },
103
147
  required: ["action"],
104
148
  },
@@ -158,10 +202,159 @@ function makeToolDefinition() {
158
202
  signal,
159
203
  });
160
204
  }
205
+ if (action === "interact") {
206
+ if (typeof args?.url !== "string" || args.url.trim().length === 0) return missingUrl("interact");
207
+ if (!Array.isArray(args?.steps) || args.steps.length === 0) {
208
+ return { ok: false, error: "steps are required", text: "browser_qa interact: нужен массив steps (click/fill/press/wait/expect/eval/shot/reload)" };
209
+ }
210
+ const viewport = normalizeViewport(args);
211
+ return await runFlow({
212
+ target: args.url,
213
+ width: viewport.width,
214
+ height: viewport.height,
215
+ steps: args.steps,
216
+ outDir: args?.outDir,
217
+ timeoutMs: parseTimeout(args?.timeoutMs),
218
+ cwd,
219
+ signal,
220
+ });
221
+ }
222
+ if (action === "a11y") {
223
+ if (typeof args?.url !== "string" || args.url.trim().length === 0) return missingUrl("a11y");
224
+ const viewport = normalizeViewport(args);
225
+ return await runA11y({
226
+ target: args.url,
227
+ width: viewport.width,
228
+ height: viewport.height,
229
+ focusLimit: args?.focusLimit,
230
+ timeoutMs: parseTimeout(args?.timeoutMs),
231
+ cwd,
232
+ signal,
233
+ });
234
+ }
235
+ if (action === "perf") {
236
+ if (typeof args?.url !== "string" || args.url.trim().length === 0) return missingUrl("perf");
237
+ const viewport = normalizeViewport(args);
238
+ return await runPerf({
239
+ target: args.url,
240
+ width: viewport.width,
241
+ height: viewport.height,
242
+ timeoutMs: parseTimeout(args?.timeoutMs),
243
+ cwd,
244
+ signal,
245
+ });
246
+ }
247
+ if (action === "probe") {
248
+ if (typeof args?.url !== "string" || args.url.trim().length === 0) return missingUrl("probe");
249
+ return await runProbe({
250
+ target: args.url,
251
+ maxLinks: args?.maxLinks,
252
+ internalOnly: args?.internalOnly !== false,
253
+ timeoutMs: parseTimeout(args?.timeoutMs),
254
+ cwd,
255
+ signal,
256
+ });
257
+ }
258
+ if (action === "design") {
259
+ if (typeof args?.url !== "string" || args.url.trim().length === 0) return missingUrl("design");
260
+ const viewport = normalizeViewport(args);
261
+ return await runDesign({
262
+ target: args.url,
263
+ width: viewport.width,
264
+ height: viewport.height,
265
+ timeoutMs: parseTimeout(args?.timeoutMs),
266
+ cwd,
267
+ signal,
268
+ });
269
+ }
270
+ if (action === "locate") {
271
+ if (typeof args?.url !== "string" || args.url.trim().length === 0) return missingUrl("locate");
272
+ if (typeof args?.text !== "string" || args.text.trim().length === 0) {
273
+ return { ok: false, error: "text is required", text: "browser_qa locate: нужен text — видимый текст элемента («Записаться на приём»)" };
274
+ }
275
+ const viewport = normalizeViewport(args);
276
+ return await runLocate({
277
+ target: args.url,
278
+ width: viewport.width,
279
+ height: viewport.height,
280
+ text: args.text,
281
+ index: args?.index,
282
+ scope: args?.scope,
283
+ outDir: args?.outDir,
284
+ timeoutMs: parseTimeout(args?.timeoutMs),
285
+ cwd,
286
+ signal,
287
+ });
288
+ }
289
+ if (action === "compare") {
290
+ if (typeof args?.url !== "string" || args.url.trim().length === 0) return missingUrl("compare");
291
+ const viewport = normalizeViewport(args);
292
+ return await runCompare({
293
+ target: args.url,
294
+ width: viewport.width,
295
+ height: viewport.height,
296
+ fullPage: args?.fullPage === true,
297
+ baselineDir: args?.baselineDir,
298
+ outDir: args?.outDir,
299
+ threshold: args?.threshold,
300
+ update: args?.update === true,
301
+ timeoutMs: parseTimeout(args?.timeoutMs),
302
+ cwd,
303
+ signal,
304
+ });
305
+ }
306
+ if (action === "reference") {
307
+ if (typeof args?.url !== "string" || typeof args?.take !== "string") {
308
+ return { ok: false, error: "url and take are required", text: 'browser_qa reference: нужен url и take="что берём из референса"' };
309
+ }
310
+ return annotateReference(cwd, args.url, args.take);
311
+ }
312
+ if (action === "benchmark") {
313
+ const urls = Array.isArray(args?.urls) ? args.urls : [];
314
+ if (urls.length === 0) return { ok: false, error: "urls are required", text: "browser_qa benchmark: нужен urls=[…] с 2–6 референсами" };
315
+ const viewport = normalizeViewport(args);
316
+ return await runBenchmark({ urls, width: viewport.width, height: viewport.height, outDir: args?.outDir, timeoutMs: parseTimeout(args?.timeoutMs), cwd, signal });
317
+ }
318
+ if (action === "tokens") {
319
+ if (typeof args?.url !== "string" || args.url.trim().length === 0) return missingUrl("tokens");
320
+ const viewport = normalizeViewport(args);
321
+ return await runTokens({ target: args.url, width: viewport.width, height: viewport.height, timeoutMs: parseTimeout(args?.timeoutMs), cwd, signal });
322
+ }
323
+ if (action === "consistency") {
324
+ const urls = Array.isArray(args?.urls) ? args.urls : [];
325
+ if (urls.length < 2) {
326
+ return { ok: false, error: "urls are required", text: "browser_qa consistency: нужен массив urls (2+ страницы одного типа)" };
327
+ }
328
+ const viewport = normalizeViewport(args);
329
+ return await runConsistency({ urls, width: viewport.width, height: viewport.height, timeoutMs: parseTimeout(args?.timeoutMs), cwd, signal });
330
+ }
331
+ if (action === "content") {
332
+ if (typeof args?.url !== "string" || args.url.trim().length === 0) return missingUrl("content");
333
+ const viewport = normalizeViewport(args);
334
+ return await runContent({ target: args.url, width: viewport.width, height: viewport.height, timeoutMs: parseTimeout(args?.timeoutMs), cwd, signal });
335
+ }
336
+ if (action === "states") {
337
+ if (typeof args?.url !== "string" || args.url.trim().length === 0) return missingUrl("states");
338
+ const viewport = normalizeViewport(args);
339
+ return await runStates({ target: args.url, width: viewport.width, height: viewport.height, timeoutMs: parseTimeout(args?.timeoutMs), cwd, signal });
340
+ }
341
+ if (action === "rule") {
342
+ if (typeof args?.rule !== "string" || args.rule.trim().length === 0) {
343
+ return { ok: false, error: "rule is required", text: "browser_qa rule: нужен текст правила, например rule=\"плитки в ряду одного цвета\"" };
344
+ }
345
+ return appendRule(cwd, args.rule);
346
+ }
347
+ if (action === "report") {
348
+ if (typeof args?.url !== "string" || args.url.trim().length === 0) return missingUrl("report");
349
+ return await runReport(
350
+ { target: args.url, outDir: args?.outDir, timeoutMs: parseTimeout(args?.timeoutMs), cwd },
351
+ { auditPages, runA11y, runDesign, runContent, runTokens },
352
+ );
353
+ }
161
354
  return {
162
355
  ok: false,
163
356
  error: `unknown action: ${action || "(empty)"}`,
164
- text: `browser_qa: неизвестное действие «${action || "(пусто)"}». Доступно: shot, audit, status.`,
357
+ text: `browser_qa: неизвестное действие «${action || "(пусто)"}». Доступно: shot, audit, interact, a11y, perf, probe, design, locate, compare, tokens, consistency, content, states, rule, report, status.`,
165
358
  };
166
359
  } catch (error) {
167
360
  return failure("browser_qa", error);