@ia-qa/self-healing 1.6.15 → 1.6.17
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/README.md +2 -2
- package/dist/cli/args.js +1 -1
- package/dist/cli/args.js.map +1 -1
- package/dist/cli/audit.d.ts +59 -1
- package/dist/cli/audit.js +88 -34
- package/dist/cli/audit.js.map +1 -1
- package/dist/cli/check.d.ts +50 -1
- package/dist/cli/check.js +63 -25
- package/dist/cli/check.js.map +1 -1
- package/dist/cli/index.js +3 -1
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/ingest.d.ts +7 -1
- package/dist/cli/ingest.js +17 -8
- package/dist/cli/ingest.js.map +1 -1
- package/dist/ingest.d.ts +35 -0
- package/dist/ingest.js +32 -0
- package/dist/ingest.js.map +1 -1
- package/dist/mcp/server.d.ts +370 -1
- package/dist/mcp/server.js +196 -1
- package/dist/mcp/server.js.map +1 -1
- package/dist/ui/page.js +43 -4
- package/dist/ui/page.js.map +1 -1
- package/dist/ui/server.d.ts +12 -0
- package/dist/ui/server.js +64 -6
- package/dist/ui/server.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -279,9 +279,9 @@ It opens a local page with three things the terminal cannot give you:
|
|
|
279
279
|
| **Host pinning** | requests whose `Host` is not loopback are refused, which is the DNS-rebinding case a token alone does not cover |
|
|
280
280
|
| **No new authority** | buttons spawn this package's own CLI with a fixed argv from an allowlist — never a string from the request. The console can do **nothing the CLI would refuse**: an `ambiguous` locator is never rewritten from here either |
|
|
281
281
|
|
|
282
|
-
**It draws the findings; it does not quote them.** The console runs `check --json` and renders the report — broken links with the pages that link to them, name collisions with their role and count, unnamed elements with their selector, each card carrying the sentence that says why it matters, in a full-width panel. It used to paste the verb's terminal output into a black `<pre>`: aligned monospace, folded behind "Technical detail", in the one surface whose premise is that its reader does not want a terminal. The raw output is still there, one click away, for whoever wants it. The network announcement survives the change — the panel states the host and the number of links requested, because a flow that leaves the machine says so whatever renders it.
|
|
282
|
+
**It draws the findings; it does not quote them.** The console runs `check --json` and `audit --json` and renders the report — broken links with the pages that link to them, name collisions with their role and count, unnamed elements with their selector, each card carrying the sentence that says why it matters, in a full-width panel. It used to paste the verb's terminal output into a black `<pre>`: aligned monospace, folded behind "Technical detail", in the one surface whose premise is that its reader does not want a terminal. The raw output is still there, one click away, for whoever wants it. The network announcement survives the change — the panel states the host and the number of links requested, because a flow that leaves the machine says so whatever renders it.
|
|
283
283
|
|
|
284
|
-
**A decision it states, it offers.** A result that ends *"re-run with a lower `--concurrency`"* or *"use Repair when the plan looks right"* is a terminal instruction printed to the one person who is not in a terminal. Those sentences are buttons now, inside the result card you are already reading: a check that could not verify some links offers **Verify those links again, slowly** and **Check the app without requesting links**; a diff with repairs offers the preview, and the preview offers the repair. The slower rate is a *frozen argv in the allowlist*, not a number field the page posts — a discrete choice keeps "no new authority" literally true, where a settings field would have traded the invariant for one option.
|
|
284
|
+
**A decision it states, it offers.** A result that ends *"re-run with a lower `--concurrency`"* or *"use Repair when the plan looks right"* is a terminal instruction printed to the one person who is not in a terminal. Those sentences are buttons now, inside the result card you are already reading: a check that could not verify some links offers **Verify those links again, slowly** and **Check the app without requesting links**; a diff with repairs offers the preview, and the preview offers the repair; an audit finding offers **Check for changes** and **Look at the app again** — and never a repair, because `audit` has no baseline to rewrite from and is advisory by design. Each verb also names its own verdict: `audit` never says "Repairs are ready", because it does not repair. The slower rate is a *frozen argv in the allowlist*, not a number field the page posts — a discrete choice keeps "no new authority" literally true, where a settings field would have traded the invariant for one option.
|
|
285
285
|
|
|
286
286
|
Nothing is uploaded, there is no telemetry and no external asset — the page is inline HTML/CSS/JS and every byte it shows came off your disk. It refuses to start under CI, where an interactive surface would just hang; use `--json`, `--junit` or the exit code there.
|
|
287
287
|
|
package/dist/cli/args.js
CHANGED
|
@@ -21,7 +21,7 @@ exports.KNOWN_FLAGS = {
|
|
|
21
21
|
baseline: [],
|
|
22
22
|
diff: ['--strict', '--json', '--junit', '--dir', '--report', '--open'],
|
|
23
23
|
fix: ['--dry-run', '--locators', '--dir'],
|
|
24
|
-
ingest: [],
|
|
24
|
+
ingest: ['--json'],
|
|
25
25
|
audit: ['--strict', '--json'],
|
|
26
26
|
check: ['--strict', '--json', '--offline', '--concurrency'],
|
|
27
27
|
graph: ['--format', '--kind', '--out', '--open'],
|
package/dist/cli/args.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"args.js","sourceRoot":"","sources":["../../src/cli/args.ts"],"names":[],"mappings":";;;AA6BA,gDAeC;AA5CD;;;;;;;;;;;GAWG;AACU,QAAA,WAAW,GAAsC;IAC5D,IAAI,EAAE,EAAE;IACR,QAAQ,EAAE,CAAC,WAAW,EAAE,SAAS,EAAE,aAAa,EAAE,eAAe,EAAE,SAAS,EAAE,OAAO,EAAE,SAAS,CAAC;IACjG,GAAG,EAAE,CAAC,eAAe,CAAC;IACtB,QAAQ,EAAE,EAAE;IACZ,IAAI,EAAE,CAAC,UAAU,EAAE,QAAQ,EAAE,SAAS,EAAE,OAAO,EAAE,UAAU,EAAE,QAAQ,CAAC;IACtE,GAAG,EAAE,CAAC,WAAW,EAAE,YAAY,EAAE,OAAO,CAAC;IACzC,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"args.js","sourceRoot":"","sources":["../../src/cli/args.ts"],"names":[],"mappings":";;;AA6BA,gDAeC;AA5CD;;;;;;;;;;;GAWG;AACU,QAAA,WAAW,GAAsC;IAC5D,IAAI,EAAE,EAAE;IACR,QAAQ,EAAE,CAAC,WAAW,EAAE,SAAS,EAAE,aAAa,EAAE,eAAe,EAAE,SAAS,EAAE,OAAO,EAAE,SAAS,CAAC;IACjG,GAAG,EAAE,CAAC,eAAe,CAAC;IACtB,QAAQ,EAAE,EAAE;IACZ,IAAI,EAAE,CAAC,UAAU,EAAE,QAAQ,EAAE,SAAS,EAAE,OAAO,EAAE,UAAU,EAAE,QAAQ,CAAC;IACtE,GAAG,EAAE,C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AAC;AACH,CAAC"}
|
package/dist/cli/audit.d.ts
CHANGED
|
@@ -27,7 +27,25 @@ import { NameSite } from '../nameLocators';
|
|
|
27
27
|
*
|
|
28
28
|
* Local end to end: reads `.ia-qa/`, reads your test files, calls nothing.
|
|
29
29
|
*/
|
|
30
|
-
|
|
30
|
+
/**
|
|
31
|
+
* What `audit --json` emits, and what the console renders.
|
|
32
|
+
*
|
|
33
|
+
* Exported because two surfaces state this verdict: the terminal's summary line
|
|
34
|
+
* and the console, which runs `--json` so it can *draw* the findings rather than
|
|
35
|
+
* paste the log. One composer, so the two cannot word it differently.
|
|
36
|
+
*/
|
|
37
|
+
export interface AuditReport {
|
|
38
|
+
verdict: 'PASS' | 'FIX' | 'BLOCK' | null;
|
|
39
|
+
pagesMapped: number;
|
|
40
|
+
locatorsJudged: number;
|
|
41
|
+
locatorsNotJudged: number;
|
|
42
|
+
deadLocators: DeadLocator[];
|
|
43
|
+
unresolvedSelectors: string[];
|
|
44
|
+
advisory: boolean;
|
|
45
|
+
}
|
|
46
|
+
export declare function auditHeadline(r: Pick<AuditReport, 'verdict' | 'deadLocators' | 'locatorsJudged'>): string;
|
|
47
|
+
export declare function auditCounts(r: Pick<AuditReport, 'pagesMapped' | 'locatorsNotJudged'>): string[];
|
|
48
|
+
export interface DeadLocator {
|
|
31
49
|
/** As written in the test file, not as normalized for lookup. */
|
|
32
50
|
name: string;
|
|
33
51
|
roles: string[] | null;
|
|
@@ -59,5 +77,45 @@ export declare function containsAsWords(haystack: string, needle: string): boole
|
|
|
59
77
|
* reading that cannot manufacture a false positive.
|
|
60
78
|
*/
|
|
61
79
|
export declare function findDeadLocators(usage: Usage, elements: MappedElement[]): DeadLocator[];
|
|
80
|
+
/**
|
|
81
|
+
* Why an audit produced no verdict. Never a PASS — see `auditProject`.
|
|
82
|
+
*/
|
|
83
|
+
export type AuditRefusalReason = 'no-mapping' | 'no-inventory' | 'no-files' | 'no-locators' | 'nothing-judgeable';
|
|
84
|
+
export interface AuditRefusal {
|
|
85
|
+
ok: false;
|
|
86
|
+
reason: AuditRefusalReason;
|
|
87
|
+
/** The composed explanation, identical on every surface that states it. */
|
|
88
|
+
message: string;
|
|
89
|
+
pagesMapped: number;
|
|
90
|
+
scanned: number;
|
|
91
|
+
}
|
|
92
|
+
export interface AuditSuccess {
|
|
93
|
+
ok: true;
|
|
94
|
+
report: AuditReport;
|
|
95
|
+
/** Contract size behind the verdict — how much the audit had to look at. */
|
|
96
|
+
elements: number;
|
|
97
|
+
/** Call sites carrying a dead name, not distinct names. */
|
|
98
|
+
deadSites: number;
|
|
99
|
+
selectorCount: number;
|
|
100
|
+
/** Every name-anchored site found, judged or not — the renderer splits them. */
|
|
101
|
+
allSites: NameSite[];
|
|
102
|
+
}
|
|
103
|
+
export type AuditOutcome = AuditSuccess | AuditRefusal;
|
|
104
|
+
/**
|
|
105
|
+
* The audit itself: read the contract, read the inventory, decide.
|
|
106
|
+
*
|
|
107
|
+
* Extracted from `runAudit` so the terminal and the MCP tool `audit_suite` share
|
|
108
|
+
* one computation *and* one wording. Two surfaces re-deriving the same verdict is
|
|
109
|
+
* the CLI/MCP dispatch split this project treats as a defect — and the refusals
|
|
110
|
+
* are the half most worth sharing, because they are the ones a second
|
|
111
|
+
* implementation would quietly turn into a pass.
|
|
112
|
+
*
|
|
113
|
+
* No console, no `process.exitCode`: the caller renders and decides what a
|
|
114
|
+
* refusal costs it.
|
|
115
|
+
*/
|
|
116
|
+
export declare function auditProject(opts?: {
|
|
117
|
+
testPaths?: string[];
|
|
118
|
+
strict?: boolean;
|
|
119
|
+
}): AuditOutcome;
|
|
62
120
|
export declare function runAudit(args: string[]): Promise<void>;
|
|
63
121
|
export {};
|
package/dist/cli/audit.js
CHANGED
|
@@ -33,8 +33,11 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
33
33
|
};
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.auditHeadline = auditHeadline;
|
|
37
|
+
exports.auditCounts = auditCounts;
|
|
36
38
|
exports.containsAsWords = containsAsWords;
|
|
37
39
|
exports.findDeadLocators = findDeadLocators;
|
|
40
|
+
exports.auditProject = auditProject;
|
|
38
41
|
exports.runAudit = runAudit;
|
|
39
42
|
const fs = __importStar(require("fs"));
|
|
40
43
|
const path = __importStar(require("path"));
|
|
@@ -43,6 +46,15 @@ const config_1 = require("../config");
|
|
|
43
46
|
const ingest_1 = require("../ingest");
|
|
44
47
|
const nameLocators_1 = require("../nameLocators");
|
|
45
48
|
const summary_1 = require("./summary");
|
|
49
|
+
function auditHeadline(r) {
|
|
50
|
+
const n = r.deadLocators.length;
|
|
51
|
+
if (r.verdict === 'PASS')
|
|
52
|
+
return `PASS · ${r.locatorsJudged} locators all resolve`;
|
|
53
|
+
return `${r.verdict} · ${n} locator name${n === 1 ? '' : 's'} match nothing`;
|
|
54
|
+
}
|
|
55
|
+
function auditCounts(r) {
|
|
56
|
+
return [`${r.pagesMapped} pages`, r.locatorsNotJudged > 0 ? `${r.locatorsNotJudged} not judged` : ''].filter(Boolean);
|
|
57
|
+
}
|
|
46
58
|
const FUZZY_SUGGEST = 0.6;
|
|
47
59
|
/**
|
|
48
60
|
* Does `haystack` contain `needle` on word boundaries? "save" is inside "save
|
|
@@ -161,19 +173,34 @@ function findDeadLocators(usage, elements) {
|
|
|
161
173
|
}
|
|
162
174
|
return dead.sort((a, b) => b.sites.length - a.sites.length);
|
|
163
175
|
}
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
176
|
+
/**
|
|
177
|
+
* The audit itself: read the contract, read the inventory, decide.
|
|
178
|
+
*
|
|
179
|
+
* Extracted from `runAudit` so the terminal and the MCP tool `audit_suite` share
|
|
180
|
+
* one computation *and* one wording. Two surfaces re-deriving the same verdict is
|
|
181
|
+
* the CLI/MCP dispatch split this project treats as a defect — and the refusals
|
|
182
|
+
* are the half most worth sharing, because they are the ones a second
|
|
183
|
+
* implementation would quietly turn into a pass.
|
|
184
|
+
*
|
|
185
|
+
* No console, no `process.exitCode`: the caller renders and decides what a
|
|
186
|
+
* refusal costs it.
|
|
187
|
+
*/
|
|
188
|
+
function auditProject(opts = {}) {
|
|
189
|
+
const paths = opts.testPaths ?? [];
|
|
190
|
+
const strict = !!opts.strict;
|
|
168
191
|
const dir = (0, config_1.mappingDir)();
|
|
169
192
|
if (!fs.existsSync(dir) || !fs.statSync(dir).isDirectory()) {
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
193
|
+
return {
|
|
194
|
+
ok: false,
|
|
195
|
+
reason: 'no-mapping',
|
|
196
|
+
pagesMapped: 0,
|
|
197
|
+
scanned: 0,
|
|
198
|
+
message: `❌ No mapping to audit against — ${path.resolve(dir)} does not exist.\n\n` +
|
|
199
|
+
` \`audit\` reads one capture of the app and asks whether your suite still names\n` +
|
|
200
|
+
` things that exist in it. Capture it first:\n` +
|
|
201
|
+
` ia-qa-heal map\n\n` +
|
|
202
|
+
` No baseline needed — unlike \`diff\`, this works on the very first run.`,
|
|
203
|
+
};
|
|
177
204
|
}
|
|
178
205
|
// Test paths on the command line re-scan in memory; otherwise the inventory on
|
|
179
206
|
// disk is used, and only if it exists — auditing against a stale file the user
|
|
@@ -191,11 +218,15 @@ async function runAudit(args) {
|
|
|
191
218
|
}
|
|
192
219
|
}
|
|
193
220
|
if (!usage) {
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
221
|
+
return {
|
|
222
|
+
ok: false,
|
|
223
|
+
reason: 'no-inventory',
|
|
224
|
+
pagesMapped: 0,
|
|
225
|
+
scanned: 0,
|
|
226
|
+
message: `❌ No locator inventory to audit.\n\n` +
|
|
227
|
+
` Run \`ia-qa-heal ingest <test-dir>\` first, add "testPaths" to .ia-qa/config.json,\n` +
|
|
228
|
+
` or pass the test paths directly: \`ia-qa-heal audit tests/\`.`,
|
|
229
|
+
};
|
|
199
230
|
}
|
|
200
231
|
const { pages, elements } = readMappings(dir);
|
|
201
232
|
const dead = findDeadLocators(usage, elements);
|
|
@@ -213,7 +244,7 @@ async function runAudit(args) {
|
|
|
213
244
|
: allSites.length === 0 && selectorCount === 0
|
|
214
245
|
? 'no-locators'
|
|
215
246
|
: 'nothing-judgeable';
|
|
216
|
-
const
|
|
247
|
+
const message = reason === 'no-files'
|
|
217
248
|
? `❌ Nothing to audit: no test files found${paths.length > 0 ? ` under ${paths.join(', ')}` : ''}.\n\n` +
|
|
218
249
|
` A brand-new project has nothing to check yet — that is not a pass, it is an\n` +
|
|
219
250
|
` empty question. The ${pages.length} mapped page${pages.length === 1 ? '' : 's'} in .ia-qa/mapping/*.md already list every\n` +
|
|
@@ -228,19 +259,15 @@ async function runAudit(args) {
|
|
|
228
259
|
` \`audit\` answers one question — does a locator still NAME something that exists? —\n` +
|
|
229
260
|
` and only role-anchored calls (getByRole, getByLabel, By.linkText) can be held to it.\n` +
|
|
230
261
|
` A CSS selector says where, not what: use \`map\` + \`baseline\` + \`diff\` to gate those.`;
|
|
231
|
-
|
|
232
|
-
if (json) {
|
|
233
|
-
console.log(JSON.stringify({ verdict: null, reason, pagesMapped: pages.length, scanned: usage.scanned }, null, 2));
|
|
234
|
-
}
|
|
235
|
-
process.exitCode = 2;
|
|
236
|
-
return;
|
|
262
|
+
return { ok: false, reason, message, pagesMapped: pages.length, scanned: usage.scanned };
|
|
237
263
|
}
|
|
238
264
|
const selectorNames = Object.keys(usage.selectors);
|
|
239
265
|
const mappedSelectors = new Set(elements.map((e) => e.selector));
|
|
240
266
|
const unresolvedSelectors = selectorNames.filter((s) => !mappedSelectors.has(s));
|
|
241
267
|
const verdict = dead.length === 0 ? 'PASS' : dead.every((d) => d.suggestion) ? 'FIX' : 'BLOCK';
|
|
242
|
-
|
|
243
|
-
|
|
268
|
+
return {
|
|
269
|
+
ok: true,
|
|
270
|
+
report: {
|
|
244
271
|
verdict,
|
|
245
272
|
pagesMapped: pages.length,
|
|
246
273
|
locatorsJudged: judgedSites.length,
|
|
@@ -248,7 +275,36 @@ async function runAudit(args) {
|
|
|
248
275
|
deadLocators: dead,
|
|
249
276
|
unresolvedSelectors,
|
|
250
277
|
advisory: !strict,
|
|
251
|
-
},
|
|
278
|
+
},
|
|
279
|
+
elements: elements.length,
|
|
280
|
+
deadSites,
|
|
281
|
+
selectorCount,
|
|
282
|
+
allSites,
|
|
283
|
+
};
|
|
284
|
+
}
|
|
285
|
+
async function runAudit(args) {
|
|
286
|
+
const strict = args.includes('--strict');
|
|
287
|
+
const json = args.includes('--json');
|
|
288
|
+
const paths = args.filter((a) => !a.startsWith('--'));
|
|
289
|
+
const outcome = auditProject({ testPaths: paths, strict });
|
|
290
|
+
if (!outcome.ok) {
|
|
291
|
+
console.error(outcome.message);
|
|
292
|
+
// The two preconditions have nothing to report; the three "ran but cannot
|
|
293
|
+
// speak" reasons do, and `--json` states them so a caller is not left
|
|
294
|
+
// parsing prose for the difference.
|
|
295
|
+
if (json && outcome.reason !== 'no-mapping' && outcome.reason !== 'no-inventory') {
|
|
296
|
+
console.log(JSON.stringify({ verdict: null, reason: outcome.reason, pagesMapped: outcome.pagesMapped, scanned: outcome.scanned }, null, 2));
|
|
297
|
+
}
|
|
298
|
+
process.exitCode = 2;
|
|
299
|
+
return;
|
|
300
|
+
}
|
|
301
|
+
const { report, elements: elementCount, deadSites, selectorCount, allSites } = outcome;
|
|
302
|
+
const { verdict, deadLocators: dead, unresolvedSelectors } = report;
|
|
303
|
+
const pageCount = report.pagesMapped;
|
|
304
|
+
const judged = report.locatorsJudged;
|
|
305
|
+
const unjudgedSites = report.locatorsNotJudged;
|
|
306
|
+
if (json) {
|
|
307
|
+
console.log(JSON.stringify(report, null, 2));
|
|
252
308
|
process.exitCode = strict && verdict !== 'PASS' ? 1 : 0;
|
|
253
309
|
return;
|
|
254
310
|
}
|
|
@@ -259,8 +315,8 @@ async function runAudit(args) {
|
|
|
259
315
|
const against = (0, summary_1.againstLine)((0, config_1.configuredBaseUrl)());
|
|
260
316
|
if (against)
|
|
261
317
|
console.log(against);
|
|
262
|
-
console.log(` ${
|
|
263
|
-
console.log(` ${
|
|
318
|
+
console.log(` ${pageCount} mapped page${pageCount === 1 ? '' : 's'} · ${elementCount} elements · no baseline needed`);
|
|
319
|
+
console.log(` ${judged} role-anchored locator${judged === 1 ? '' : 's'} checked` +
|
|
264
320
|
(deadSites > 0 ? ` · ${deadSites} name nothing` : ' · all resolve'));
|
|
265
321
|
if (dead.length > 0) {
|
|
266
322
|
console.log(`\n ⛔ ${dead.length} locator name${dead.length === 1 ? '' : 's'} match no mapped element:`);
|
|
@@ -295,7 +351,7 @@ async function runAudit(args) {
|
|
|
295
351
|
}
|
|
296
352
|
}
|
|
297
353
|
if (unresolvedSelectors.length > 0) {
|
|
298
|
-
console.log(` ℹ️ ${unresolvedSelectors.length} of ${
|
|
354
|
+
console.log(` ℹ️ ${unresolvedSelectors.length} of ${selectorCount} CSS selectors appear in no contract —` +
|
|
299
355
|
` expected for containers and text nodes, worth a look for the rest.`);
|
|
300
356
|
}
|
|
301
357
|
// The two ways a finding can be wrong, named up front. Both are about what the
|
|
@@ -304,13 +360,13 @@ async function runAudit(args) {
|
|
|
304
360
|
if (dead.length > 0) {
|
|
305
361
|
console.log(`\n Before believing a finding, check the capture behind it:` +
|
|
306
362
|
`\n · unmapped page — the locator may live on a page not in config.pages` +
|
|
307
|
-
`\n (\`ia-qa-heal discover\` lists them; ${
|
|
363
|
+
`\n (\`ia-qa-heal discover\` lists them; ${pageCount} page${pageCount === 1 ? ' is' : 's are'} mapped today)` +
|
|
308
364
|
`\n · unmapped state — \`map\` captures a page in ONE state. A label that only` +
|
|
309
365
|
`\n appears after a click (a tab, a mode toggle, an open dialog) is not in the` +
|
|
310
366
|
`\n contract, and a test that clicks first is right while this says otherwise.`);
|
|
311
367
|
}
|
|
312
368
|
else {
|
|
313
|
-
console.log(`\n Coverage decides what this verdict is worth: ${
|
|
369
|
+
console.log(`\n Coverage decides what this verdict is worth: ${pageCount} page${pageCount === 1 ? '' : 's'} mapped.` +
|
|
314
370
|
`\n \`ia-qa-heal discover\` lists what you are not mapping yet.`);
|
|
315
371
|
}
|
|
316
372
|
if (!strict && verdict !== 'PASS') {
|
|
@@ -319,9 +375,7 @@ async function runAudit(args) {
|
|
|
319
375
|
else {
|
|
320
376
|
console.log('');
|
|
321
377
|
}
|
|
322
|
-
(0, summary_1.summaryLine)('audit', verdict === 'PASS' ? 'ok' : verdict === 'FIX' ? 'fix' : 'block', verdict
|
|
323
|
-
? `PASS · ${judgedSites.length} locators all resolve`
|
|
324
|
-
: `${verdict} · ${dead.length} locator name${dead.length === 1 ? '' : 's'} match nothing`, [`${pages.length} pages`, unjudgedSites > 0 ? `${unjudgedSites} not judged` : undefined]);
|
|
378
|
+
(0, summary_1.summaryLine)('audit', verdict === 'PASS' ? 'ok' : verdict === 'FIX' ? 'fix' : 'block', auditHeadline({ verdict, deadLocators: dead, locatorsJudged: judged }), auditCounts({ pagesMapped: pageCount, locatorsNotJudged: unjudgedSites }));
|
|
325
379
|
process.exitCode = strict && verdict !== 'PASS' ? 1 : 0;
|
|
326
380
|
}
|
|
327
381
|
//# sourceMappingURL=audit.js.map
|
package/dist/cli/audit.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"audit.js","sourceRoot":"","sources":["../../src/cli/audit.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0DA,0CAQC;AAqED,4CA0CC;AAED,4BA+MC;AAlYD,uCAAyB;AACzB,2CAA6B;AAE7B,4CAAkD;AAClD,sCAA+E;AAC/E,sCAA0D;AAC1D,kDAAqG;AACrG,uCAAqD;AA6CrD,MAAM,aAAa,GAAG,GAAG,CAAC;AAE1B;;;GAGG;AACH,SAAgB,eAAe,CAAC,QAAgB,EAAE,MAAc;IAC9D,IAAI,MAAM,KAAK,EAAE,IAAI,QAAQ,KAAK,MAA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,KAAK,MAAM,EAAE,CAAC;QAClC,OAAO,CAAC,GAAG,CAAC,iGAAiG,CAAC,CAAC;IACjH,CAAC;SAAM,CAAC;QACN,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IAClB,CAAC;IAED,IAAA,qBAAW,EACT,OAAO,EACP,OAAO,KAAK,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,KAAK,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,EAC/D,aAAa,CAAC,EAAE,OAAO,EAAE,YAAY,EAAE,IAAI,EAAE,cAAc,EAAE,MAAM,EAAE,CAAC,EACtE,WAAW,CAAC,EAAE,WAAW,EAAE,SAAS,EAAE,iBAAiB,EAAE,aAAa,EAAE,CAAC,CAC1E,CAAC;IACF,OAAO,CAAC,QAAQ,GAAG,MAAM,IAAI,OAAO,KAAK,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAC1D,CAAC"}
|
package/dist/cli/check.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DeadLink, UnverifiedLink } from '../checks';
|
|
1
|
+
import { CheckReport, CheckVerdict, DeadLink, UnverifiedLink } from '../checks';
|
|
2
2
|
/**
|
|
3
3
|
* `Retry-After` in either legal form: delta-seconds, or an HTTP date.
|
|
4
4
|
*
|
|
@@ -33,9 +33,58 @@ export declare function probeAll(targets: Array<{
|
|
|
33
33
|
name: string;
|
|
34
34
|
}>;
|
|
35
35
|
}>, concurrency: number, onTick: (done: number) => void): Promise<ProbeOutcome>;
|
|
36
|
+
/** The one place the bound lives, so a flag and a tool argument cannot disagree. */
|
|
37
|
+
export declare const CONCURRENCY_BOUNDS: {
|
|
38
|
+
readonly min: 1;
|
|
39
|
+
readonly max: 32;
|
|
40
|
+
readonly default: 6;
|
|
41
|
+
};
|
|
36
42
|
/** `--concurrency <n>` — how many links at once. Bounded; a bad value is said, not guessed. */
|
|
37
43
|
export declare function parseConcurrency(args: string[]): {
|
|
38
44
|
value: number;
|
|
39
45
|
warning?: string;
|
|
40
46
|
};
|
|
47
|
+
/**
|
|
48
|
+
* Where the network half went, stated whether or not anyone asked.
|
|
49
|
+
*
|
|
50
|
+
* Rule 1 of this project is that a flow leaving the machine announces itself. At a
|
|
51
|
+
* terminal that is a line printed before the first request; over MCP there is no
|
|
52
|
+
* "before", only the response — so the announcement has to be a field, and the
|
|
53
|
+
* tool description carries the up-front half.
|
|
54
|
+
*/
|
|
55
|
+
export interface CheckNetwork {
|
|
56
|
+
host: string;
|
|
57
|
+
linksRequested: number;
|
|
58
|
+
hrefsLeftAlone: number;
|
|
59
|
+
throttled: boolean;
|
|
60
|
+
}
|
|
61
|
+
export interface CheckSuccess {
|
|
62
|
+
ok: true;
|
|
63
|
+
report: CheckReport;
|
|
64
|
+
verdict: CheckVerdict;
|
|
65
|
+
/** Null when nothing was requested — `--offline`, no baseUrl, or no links at all. */
|
|
66
|
+
network: CheckNetwork | null;
|
|
67
|
+
}
|
|
68
|
+
export interface CheckRefusal {
|
|
69
|
+
ok: false;
|
|
70
|
+
reason: 'no-mapping' | 'no-pages';
|
|
71
|
+
message: string;
|
|
72
|
+
}
|
|
73
|
+
export type CheckOutcome = CheckSuccess | CheckRefusal;
|
|
74
|
+
/**
|
|
75
|
+
* The four checks, run once, for whichever surface asked.
|
|
76
|
+
*
|
|
77
|
+
* Extracted from `runCheck` so the terminal and the MCP tool `check_app` share one
|
|
78
|
+
* computation and one wording — `checkVerdict`/`checkHeadline` already guaranteed
|
|
79
|
+
* the sentence, this guarantees the report it describes.
|
|
80
|
+
*
|
|
81
|
+
* `onNotice` is how the caller gets the network announcement *before* the requests
|
|
82
|
+
* happen; a caller that cannot use it (one response, no stream) reads the same
|
|
83
|
+
* facts back from `network`.
|
|
84
|
+
*/
|
|
85
|
+
export declare function checkProject(opts?: {
|
|
86
|
+
offline?: boolean;
|
|
87
|
+
concurrency?: number;
|
|
88
|
+
onNotice?: (line: string) => void;
|
|
89
|
+
}): Promise<CheckOutcome>;
|
|
41
90
|
export declare function runCheck(args: string[]): Promise<void>;
|
package/dist/cli/check.js
CHANGED
|
@@ -33,9 +33,11 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
33
33
|
};
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.CONCURRENCY_BOUNDS = void 0;
|
|
36
37
|
exports.parseRetryAfter = parseRetryAfter;
|
|
37
38
|
exports.probeAll = probeAll;
|
|
38
39
|
exports.parseConcurrency = parseConcurrency;
|
|
40
|
+
exports.checkProject = checkProject;
|
|
39
41
|
exports.runCheck = runCheck;
|
|
40
42
|
const fs = __importStar(require("fs"));
|
|
41
43
|
const path = __importStar(require("path"));
|
|
@@ -214,6 +216,8 @@ async function probeAll(targets, concurrency, onTick) {
|
|
|
214
216
|
const rank = (a, b) => b.from.length - a.from.length || a.url.localeCompare(b.url);
|
|
215
217
|
return { dead: dead.sort(rank), unverified: unverified.sort(rank), throttled };
|
|
216
218
|
}
|
|
219
|
+
/** The one place the bound lives, so a flag and a tool argument cannot disagree. */
|
|
220
|
+
exports.CONCURRENCY_BOUNDS = { min: 1, max: 32, default: DEFAULT_CONCURRENCY };
|
|
217
221
|
/** `--concurrency <n>` — how many links at once. Bounded; a bad value is said, not guessed. */
|
|
218
222
|
function parseConcurrency(args) {
|
|
219
223
|
const i = args.indexOf('--concurrency');
|
|
@@ -221,35 +225,47 @@ function parseConcurrency(args) {
|
|
|
221
225
|
return { value: DEFAULT_CONCURRENCY };
|
|
222
226
|
const raw = args[i + 1];
|
|
223
227
|
const n = Number(raw);
|
|
224
|
-
if (!raw || !Number.isInteger(n) || n <
|
|
228
|
+
if (!raw || !Number.isInteger(n) || n < exports.CONCURRENCY_BOUNDS.min || n > exports.CONCURRENCY_BOUNDS.max) {
|
|
225
229
|
return {
|
|
226
230
|
value: DEFAULT_CONCURRENCY,
|
|
227
|
-
warning: `--concurrency expects an integer
|
|
231
|
+
warning: `--concurrency expects an integer ${exports.CONCURRENCY_BOUNDS.min}-${exports.CONCURRENCY_BOUNDS.max} (got ${raw ?? 'nothing'}) — using ${DEFAULT_CONCURRENCY}.`,
|
|
228
232
|
};
|
|
229
233
|
}
|
|
230
234
|
return { value: n };
|
|
231
235
|
}
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
236
|
+
/**
|
|
237
|
+
* The four checks, run once, for whichever surface asked.
|
|
238
|
+
*
|
|
239
|
+
* Extracted from `runCheck` so the terminal and the MCP tool `check_app` share one
|
|
240
|
+
* computation and one wording — `checkVerdict`/`checkHeadline` already guaranteed
|
|
241
|
+
* the sentence, this guarantees the report it describes.
|
|
242
|
+
*
|
|
243
|
+
* `onNotice` is how the caller gets the network announcement *before* the requests
|
|
244
|
+
* happen; a caller that cannot use it (one response, no stream) reads the same
|
|
245
|
+
* facts back from `network`.
|
|
246
|
+
*/
|
|
247
|
+
async function checkProject(opts = {}) {
|
|
248
|
+
const offline = !!opts.offline;
|
|
249
|
+
const concurrency = opts.concurrency ?? DEFAULT_CONCURRENCY;
|
|
250
|
+
const notice = opts.onNotice ?? (() => undefined);
|
|
239
251
|
const dir = (0, config_1.mappingDir)();
|
|
240
252
|
if (!fs.existsSync(dir) || !fs.statSync(dir).isDirectory()) {
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
253
|
+
return {
|
|
254
|
+
ok: false,
|
|
255
|
+
reason: 'no-mapping',
|
|
256
|
+
message: `❌ Nothing to check — ${path.resolve(dir)} does not exist.\n\n` +
|
|
257
|
+
` \`check\` reads one capture of the app and asks whether it is sound.\n` +
|
|
258
|
+
` Capture it first: ia-qa-heal map`,
|
|
259
|
+
};
|
|
246
260
|
}
|
|
247
261
|
const pages = readMappings(dir);
|
|
248
262
|
const realPages = pages.filter((p) => !p.isLayout);
|
|
249
263
|
if (realPages.length === 0) {
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
264
|
+
return {
|
|
265
|
+
ok: false,
|
|
266
|
+
reason: 'no-pages',
|
|
267
|
+
message: `❌ No page contracts in ${path.resolve(dir)} — run \`ia-qa-heal map\` first.`,
|
|
268
|
+
};
|
|
253
269
|
}
|
|
254
270
|
let baseUrl = '';
|
|
255
271
|
try {
|
|
@@ -280,6 +296,7 @@ async function runCheck(args) {
|
|
|
280
296
|
let throttled = false;
|
|
281
297
|
let linksChecked = 0;
|
|
282
298
|
let linksSkipped = 0;
|
|
299
|
+
let network = null;
|
|
283
300
|
if (offline) {
|
|
284
301
|
skipped.push({ check: 'dead links', why: '--offline' });
|
|
285
302
|
}
|
|
@@ -311,18 +328,17 @@ async function runCheck(args) {
|
|
|
311
328
|
return baseUrl;
|
|
312
329
|
}
|
|
313
330
|
})();
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
(skipped > 0 ? ` ${skipped} href${skipped === 1 ? '' : 's'} left alone.` : ''));
|
|
318
|
-
}
|
|
331
|
+
notice(`\n🔗 Requesting ${targets.length} distinct link${targets.length === 1 ? '' : 's'} on ${host} —` +
|
|
332
|
+
` GET only, same site only, action URLs skipped.` +
|
|
333
|
+
(skipped > 0 ? ` ${skipped} href${skipped === 1 ? '' : 's'} left alone.` : ''));
|
|
319
334
|
const outcome = await probeAll(targets, concurrency, () => undefined);
|
|
320
335
|
deadLinks = outcome.dead;
|
|
321
336
|
unverifiedLinks = outcome.unverified;
|
|
322
337
|
throttled = outcome.throttled;
|
|
323
|
-
if (throttled
|
|
324
|
-
|
|
338
|
+
if (throttled) {
|
|
339
|
+
notice(` ⏳ ${host} rate-limited this run — slowed to 1 request at a time and honoured Retry-After.`);
|
|
325
340
|
}
|
|
341
|
+
network = { host, linksRequested: targets.length, hrefsLeftAlone: skipped, throttled };
|
|
326
342
|
}
|
|
327
343
|
}
|
|
328
344
|
const report = {
|
|
@@ -339,7 +355,29 @@ async function runCheck(args) {
|
|
|
339
355
|
skipped,
|
|
340
356
|
throttled,
|
|
341
357
|
};
|
|
342
|
-
|
|
358
|
+
return { ok: true, report, verdict: (0, checks_1.checkVerdict)(report), network };
|
|
359
|
+
}
|
|
360
|
+
async function runCheck(args) {
|
|
361
|
+
const strict = args.includes('--strict');
|
|
362
|
+
const json = args.includes('--json');
|
|
363
|
+
const offline = args.includes('--offline');
|
|
364
|
+
const { value: concurrency, warning: concurrencyWarning } = parseConcurrency(args);
|
|
365
|
+
if (concurrencyWarning)
|
|
366
|
+
console.error(`⚠️ ${concurrencyWarning}`);
|
|
367
|
+
const outcome = await checkProject({
|
|
368
|
+
offline,
|
|
369
|
+
concurrency,
|
|
370
|
+
// Under `--json` stdout must stay one parseable document, so the
|
|
371
|
+
// announcement is dropped rather than interleaved — the payload's own
|
|
372
|
+
// `linksChecked` says the same thing to whoever is parsing.
|
|
373
|
+
onNotice: json ? undefined : (line) => console.log(line),
|
|
374
|
+
});
|
|
375
|
+
if (!outcome.ok) {
|
|
376
|
+
console.error(outcome.message);
|
|
377
|
+
process.exitCode = 2;
|
|
378
|
+
return;
|
|
379
|
+
}
|
|
380
|
+
const { report, verdict } = outcome;
|
|
343
381
|
if (json) {
|
|
344
382
|
console.log(JSON.stringify({ verdict, ...report }, null, 2));
|
|
345
383
|
process.exitCode = verdict === 'FAIL' || (strict && verdict === 'WARN') ? 1 : 0;
|