qualiow-exploratory-testing 1.3.0 → 2.2.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.
- package/.claude-plugin/marketplace.json +26 -0
- package/.claude-plugin/plugin.json +22 -0
- package/.env.example +27 -0
- package/CHANGELOG.md +259 -0
- package/README.md +472 -204
- package/agents/qa-diff-indexer-agent.md +81 -0
- package/agents/qa-gather-agent.md +41 -0
- package/agents/qa-page-mapper-agent.md +74 -0
- package/agents/qa-reporting-agent.md +103 -0
- package/{scripts → bin}/doctor-mobile.sh +57 -18
- package/bin/mcli +15 -9
- package/bin/mobile-cli.mjs +574 -286
- package/bin/qualiow +30 -0
- package/{scripts → bin}/setup-mobile.sh +56 -19
- package/bin/wadb +10 -4
- package/bin/wk-ios +29 -17
- package/bin/wkeval.mjs +7 -1
- package/data/domains/_default.yml +1 -1
- package/data/knowledge/changelog.yml +30 -12
- package/data/knowledge/manifest.yml +355 -127
- package/data/knowledge/releases/v0.1.0/entries/technique-business-logic-race-conditions.yml +1 -1
- package/data/knowledge/releases/v0.1.0/release.yml +8 -1
- package/data/knowledge/releases/v0.6.0/entries/technique-async-callback-contracts.yml +98 -0
- package/data/knowledge/releases/v0.6.0/entries/technique-exactly-once-verification.yml +116 -0
- package/data/knowledge/releases/v0.6.0/release.yml +30 -0
- package/data/security/SECURITY-POLICY.md +273 -0
- package/data/targets/_default.yml +1 -1
- package/data/targets/_example-api-only.yml +80 -0
- package/data/targets/_example-mobile-emulation.yml +2 -2
- package/data/targets/_example-native-mobile.yml +2 -2
- package/data/targets/_example-sim-android-chrome.yml +1 -1
- package/data/targets/_example-sim-ios-safari.yml +1 -1
- package/data/templates/api-probe-matrix.md +3 -3
- package/data/templates/bug-report.md +29 -151
- package/data/templates/coverage-map.md +9 -6
- package/data/templates/expected-behaviour.md +3 -2
- package/data/templates/session-charter.md +3 -0
- package/data/templates/session-report.md +57 -80
- package/dist/cli/index.js +2286 -701
- package/dist/index.d.ts +637 -81
- package/dist/index.js +2058 -228
- package/docs/BACKEND-VERIFICATION.md +39 -9
- package/docs/GETTING-STARTED.md +300 -121
- package/docs/MOBILE-SETUP.md +149 -18
- package/hooks/hooks.json +27 -0
- package/hooks/scripts/read-guard.mjs +95 -0
- package/hooks/scripts/secret-patterns.d.mts +8 -0
- package/hooks/scripts/secret-patterns.mjs +136 -0
- package/hooks/scripts/write-guard.mjs +87 -0
- package/package.json +33 -18
- package/skills/qa-explore/SKILL.md +32 -25
- package/skills/qa-explore/phases/00-setup.md +76 -42
- package/skills/qa-explore/phases/01-auth.md +32 -15
- package/skills/qa-explore/phases/02-charter.md +16 -5
- package/skills/qa-explore/phases/03-discovery.md +93 -27
- package/skills/qa-explore/phases/04-journeys.md +2 -2
- package/skills/qa-explore/phases/05-features.md +39 -24
- package/skills/qa-explore/phases/06-edge-cases.md +24 -13
- package/skills/qa-explore/phases/07-reporting.md +102 -142
- package/skills/qa-explore/references/context-integration.md +1 -1
- package/skills/qa-explore/references/delegation-rules.md +82 -0
- package/skills/qa-explore/references/output-contract.md +192 -0
- package/skills/qa-explore/references/paths.md +108 -0
- package/skills/qa-explore/references/playwright-agents-integration.md +61 -84
- package/skills/qa-explore/references/security-rules.md +70 -25
- package/skills/qa-explore/references/session-rules.md +2 -1
- package/skills/qa-explore/references/severity-guide.md +31 -4
- package/skills/qa-explore-cleanup/SKILL.md +51 -15
- package/skills/qa-explore-feedback/SKILL.md +23 -5
- package/skills/qa-explore-mobile/SKILL.md +86 -64
- package/skills/qa-explore-mobile/phases/00-setup.md +71 -62
- package/skills/qa-explore-mobile/phases/01-auth.md +28 -31
- package/skills/qa-explore-mobile/phases/02-charter.md +8 -4
- package/skills/qa-explore-mobile/phases/03-discovery.md +17 -11
- package/skills/qa-explore-mobile/phases/04-journeys.md +6 -6
- package/skills/qa-explore-mobile/phases/05-features.md +9 -9
- package/skills/qa-explore-mobile/phases/06-edge-cases.md +35 -40
- package/skills/qa-explore-mobile/phases/07-reporting.md +108 -60
- package/skills/qa-explore-mobile/references/mobile-edges.md +26 -26
- package/skills/qa-explore-quick/SKILL.md +71 -26
- package/skills/qa-explore-report/SKILL.md +65 -35
- package/skills/qa-gather/SKILL.md +44 -8
- package/skills/qa-knowledge-add/SKILL.md +25 -9
- package/skills/qa-knowledge-list/SKILL.md +37 -40
- package/skills/qa-target-setup/SKILL.md +63 -41
- package/skills/qa-verify-backend/SKILL.md +31 -19
- package/skills/qa-verify-backend/phases/00-setup.md +57 -12
- package/skills/qa-verify-backend/phases/01-ac-decomposition.md +2 -2
- package/skills/qa-verify-backend/phases/02-static-review.md +11 -0
- package/skills/qa-verify-backend/phases/03-live-verification.md +5 -3
- package/skills/qa-verify-backend/phases/03b-api-verification.md +24 -9
- package/skills/qa-verify-backend/phases/04-e2e-trigger.md +18 -2
- package/skills/qa-verify-backend/phases/05-reporting.md +72 -12
- package/skills/qa-verify-backend/references/api-probes.md +28 -1
- package/skills/qa-verify-backend/references/payload-verification.md +1 -1
- package/skills/qa-verify-backend/references/release-readiness.md +1 -1
- package/skills/qa-verify-backend/references/safety-rules.md +13 -8
- package/data/domains/_default.md +0 -181
- package/data/domains/ecommerce.md +0 -192
- package/data/domains/fintech.md +0 -200
- package/data/domains/identity.md +0 -88
- package/data/domains/marketing.md +0 -194
- package/data/domains/saas.md +0 -197
- package/dist/cli/index.d.ts +0 -1
- package/dist/cli/index.js.map +0 -1
- package/dist/index.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -59,9 +59,11 @@ interface BackendConfig {
|
|
|
59
59
|
interface ApiSurfaceConfig {
|
|
60
60
|
/** Defaults to the target's base_url when omitted. */
|
|
61
61
|
base_url?: string;
|
|
62
|
-
auth?: 'session-cookie' | 'bearer-env' | 'none';
|
|
63
|
-
/** Env var NAME holding
|
|
62
|
+
auth?: 'session-cookie' | 'bearer-env' | 'api-key-env' | 'none';
|
|
63
|
+
/** Env var NAME holding the credential — never the credential itself. */
|
|
64
64
|
token_env?: string;
|
|
65
|
+
/** Header carrying the credential for `api-key-env`. Defaults to `X-Api-Key`. */
|
|
66
|
+
header_name?: string;
|
|
65
67
|
/** Persistent browser profile directory holding the authenticated session. */
|
|
66
68
|
browser_profile?: string;
|
|
67
69
|
/** Endpoint returning the deployed build, used to fingerprint the environment. */
|
|
@@ -70,6 +72,9 @@ interface ApiSurfaceConfig {
|
|
|
70
72
|
endpoints?: Record<string, string>;
|
|
71
73
|
/** The only endpoints the read-only API lane may call without asking. */
|
|
72
74
|
probe_allowlist?: string[];
|
|
75
|
+
/** The only endpoints phase 4 may call through the real write path, in a dev
|
|
76
|
+
* or ephemeral environment. Absent means the API lane is read-only here. */
|
|
77
|
+
write_allowlist?: string[];
|
|
73
78
|
/** Other target ids to run the same matrix against, for parity comparison. */
|
|
74
79
|
parity_targets?: string[];
|
|
75
80
|
/** Flag name -> where its deployed value is declared for this environment. */
|
|
@@ -187,20 +192,26 @@ interface KnowledgeEntry {
|
|
|
187
192
|
content: KnowledgeEntryContent;
|
|
188
193
|
}
|
|
189
194
|
interface Journey {
|
|
190
|
-
id: string;
|
|
191
195
|
name: string;
|
|
192
|
-
description: string;
|
|
193
196
|
steps: string[];
|
|
194
|
-
|
|
197
|
+
}
|
|
198
|
+
interface RiskRanking {
|
|
199
|
+
p0: string[];
|
|
200
|
+
p1: string[];
|
|
201
|
+
p2: string[];
|
|
202
|
+
p3: string[];
|
|
195
203
|
}
|
|
196
204
|
interface DomainConfig {
|
|
197
205
|
id: string;
|
|
198
206
|
name: string;
|
|
199
|
-
risk_ranking:
|
|
207
|
+
risk_ranking: RiskRanking;
|
|
200
208
|
completeness_checklist: string[];
|
|
201
209
|
data_integrity_checks: string[];
|
|
202
210
|
journeys: Journey[];
|
|
203
|
-
|
|
211
|
+
must_test_patterns: Record<string, string[]>;
|
|
212
|
+
common_bugs: string[];
|
|
213
|
+
compliance: string[];
|
|
214
|
+
guidance: string;
|
|
204
215
|
}
|
|
205
216
|
interface SeverityCounts {
|
|
206
217
|
critical: number;
|
|
@@ -216,6 +227,16 @@ interface SessionMetrics {
|
|
|
216
227
|
bugs_found: number;
|
|
217
228
|
severity_counts: SeverityCounts;
|
|
218
229
|
pages_explored: number;
|
|
230
|
+
kind?: 'explore' | 'quick' | 'mobile' | 'backend';
|
|
231
|
+
domain?: string;
|
|
232
|
+
started_at?: string;
|
|
233
|
+
completed_at?: string;
|
|
234
|
+
phases_completed?: number;
|
|
235
|
+
total_phases?: number;
|
|
236
|
+
coverage?: Record<string, unknown>;
|
|
237
|
+
evidence?: Record<string, unknown>;
|
|
238
|
+
areas_not_tested?: string[];
|
|
239
|
+
blocked_by?: string | null;
|
|
219
240
|
}
|
|
220
241
|
type BugSeverity = 'critical' | 'high' | 'medium' | 'low';
|
|
221
242
|
interface BugReport {
|
|
@@ -254,18 +275,19 @@ declare const AuthConfigSchema: z.ZodObject<{
|
|
|
254
275
|
credentials: z.ZodOptional<z.ZodObject<{
|
|
255
276
|
username: z.ZodString;
|
|
256
277
|
password: z.ZodString;
|
|
257
|
-
}, z.core.$
|
|
278
|
+
}, z.core.$strict>>;
|
|
258
279
|
token: z.ZodOptional<z.ZodString>;
|
|
259
280
|
identity_provider: z.ZodOptional<z.ZodString>;
|
|
260
281
|
static_otp: z.ZodOptional<z.ZodString>;
|
|
261
282
|
test_email_pattern: z.ZodOptional<z.ZodString>;
|
|
262
|
-
|
|
283
|
+
notes: z.ZodOptional<z.ZodString>;
|
|
284
|
+
}, z.core.$strict>;
|
|
263
285
|
declare const BrowserConfigSchema: z.ZodObject<{
|
|
264
286
|
headless: z.ZodBoolean;
|
|
265
287
|
viewport: z.ZodObject<{
|
|
266
288
|
width: z.ZodNumber;
|
|
267
289
|
height: z.ZodNumber;
|
|
268
|
-
}, z.core.$
|
|
290
|
+
}, z.core.$strict>;
|
|
269
291
|
engine: z.ZodOptional<z.ZodEnum<{
|
|
270
292
|
chromium: "chromium";
|
|
271
293
|
webkit: "webkit";
|
|
@@ -273,19 +295,19 @@ declare const BrowserConfigSchema: z.ZodObject<{
|
|
|
273
295
|
}>>;
|
|
274
296
|
channel: z.ZodOptional<z.ZodString>;
|
|
275
297
|
device: z.ZodOptional<z.ZodString>;
|
|
276
|
-
}, z.core.$
|
|
298
|
+
}, z.core.$strict>;
|
|
277
299
|
declare const ScopeConfigSchema: z.ZodObject<{
|
|
278
300
|
start_pages: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
279
301
|
max_depth: z.ZodNumber;
|
|
280
302
|
include_patterns: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
281
303
|
exclude_patterns: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
282
|
-
}, z.core.$
|
|
304
|
+
}, z.core.$strict>;
|
|
283
305
|
declare const SafetyConfigSchema: z.ZodObject<{
|
|
284
306
|
read_only: z.ZodBoolean;
|
|
285
307
|
no_form_submit: z.ZodBoolean;
|
|
286
308
|
no_file_upload: z.ZodOptional<z.ZodBoolean>;
|
|
287
309
|
no_delete_actions: z.ZodOptional<z.ZodBoolean>;
|
|
288
|
-
}, z.core.$
|
|
310
|
+
}, z.core.$strict>;
|
|
289
311
|
declare const WebTargetConfigSchema: z.ZodObject<{
|
|
290
312
|
id: z.ZodString;
|
|
291
313
|
name: z.ZodString;
|
|
@@ -305,18 +327,19 @@ declare const WebTargetConfigSchema: z.ZodObject<{
|
|
|
305
327
|
credentials: z.ZodOptional<z.ZodObject<{
|
|
306
328
|
username: z.ZodString;
|
|
307
329
|
password: z.ZodString;
|
|
308
|
-
}, z.core.$
|
|
330
|
+
}, z.core.$strict>>;
|
|
309
331
|
token: z.ZodOptional<z.ZodString>;
|
|
310
332
|
identity_provider: z.ZodOptional<z.ZodString>;
|
|
311
333
|
static_otp: z.ZodOptional<z.ZodString>;
|
|
312
334
|
test_email_pattern: z.ZodOptional<z.ZodString>;
|
|
313
|
-
|
|
335
|
+
notes: z.ZodOptional<z.ZodString>;
|
|
336
|
+
}, z.core.$strict>;
|
|
314
337
|
browser: z.ZodObject<{
|
|
315
338
|
headless: z.ZodBoolean;
|
|
316
339
|
viewport: z.ZodObject<{
|
|
317
340
|
width: z.ZodNumber;
|
|
318
341
|
height: z.ZodNumber;
|
|
319
|
-
}, z.core.$
|
|
342
|
+
}, z.core.$strict>;
|
|
320
343
|
engine: z.ZodOptional<z.ZodEnum<{
|
|
321
344
|
chromium: "chromium";
|
|
322
345
|
webkit: "webkit";
|
|
@@ -324,19 +347,19 @@ declare const WebTargetConfigSchema: z.ZodObject<{
|
|
|
324
347
|
}>>;
|
|
325
348
|
channel: z.ZodOptional<z.ZodString>;
|
|
326
349
|
device: z.ZodOptional<z.ZodString>;
|
|
327
|
-
}, z.core.$
|
|
350
|
+
}, z.core.$strict>;
|
|
328
351
|
scope: z.ZodObject<{
|
|
329
352
|
start_pages: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
330
353
|
max_depth: z.ZodNumber;
|
|
331
354
|
include_patterns: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
332
355
|
exclude_patterns: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
333
|
-
}, z.core.$
|
|
356
|
+
}, z.core.$strict>;
|
|
334
357
|
safety: z.ZodOptional<z.ZodObject<{
|
|
335
358
|
read_only: z.ZodBoolean;
|
|
336
359
|
no_form_submit: z.ZodBoolean;
|
|
337
360
|
no_file_upload: z.ZodOptional<z.ZodBoolean>;
|
|
338
361
|
no_delete_actions: z.ZodOptional<z.ZodBoolean>;
|
|
339
|
-
}, z.core.$
|
|
362
|
+
}, z.core.$strict>>;
|
|
340
363
|
environment: z.ZodOptional<z.ZodObject<{
|
|
341
364
|
kind: z.ZodEnum<{
|
|
342
365
|
dev: "dev";
|
|
@@ -345,7 +368,7 @@ declare const WebTargetConfigSchema: z.ZodObject<{
|
|
|
345
368
|
production: "production";
|
|
346
369
|
}>;
|
|
347
370
|
destroyed_automatically: z.ZodOptional<z.ZodBoolean>;
|
|
348
|
-
}, z.core.$
|
|
371
|
+
}, z.core.$strict>>;
|
|
349
372
|
backend: z.ZodOptional<z.ZodObject<{
|
|
350
373
|
provider: z.ZodOptional<z.ZodEnum<{
|
|
351
374
|
aws: "aws";
|
|
@@ -357,57 +380,60 @@ declare const WebTargetConfigSchema: z.ZodObject<{
|
|
|
357
380
|
env_suffix: z.ZodOptional<z.ZodString>;
|
|
358
381
|
resources: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
359
382
|
notes: z.ZodOptional<z.ZodString>;
|
|
360
|
-
}, z.core.$
|
|
383
|
+
}, z.core.$strict>>;
|
|
361
384
|
api: z.ZodOptional<z.ZodObject<{
|
|
362
385
|
base_url: z.ZodOptional<z.ZodString>;
|
|
363
386
|
auth: z.ZodOptional<z.ZodEnum<{
|
|
364
387
|
none: "none";
|
|
365
388
|
"session-cookie": "session-cookie";
|
|
366
389
|
"bearer-env": "bearer-env";
|
|
390
|
+
"api-key-env": "api-key-env";
|
|
367
391
|
}>>;
|
|
368
392
|
token_env: z.ZodOptional<z.ZodString>;
|
|
393
|
+
header_name: z.ZodOptional<z.ZodString>;
|
|
369
394
|
browser_profile: z.ZodOptional<z.ZodString>;
|
|
370
395
|
version_endpoint: z.ZodOptional<z.ZodString>;
|
|
371
396
|
endpoints: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
372
397
|
probe_allowlist: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
398
|
+
write_allowlist: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
373
399
|
parity_targets: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
374
400
|
feature_flags: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
375
401
|
notes: z.ZodOptional<z.ZodString>;
|
|
376
|
-
}, z.core.$
|
|
402
|
+
}, z.core.$strict>>;
|
|
377
403
|
source: z.ZodOptional<z.ZodObject<{
|
|
378
404
|
repo_path: z.ZodString;
|
|
379
405
|
branch: z.ZodString;
|
|
380
406
|
base_branch: z.ZodOptional<z.ZodString>;
|
|
381
407
|
components: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
382
|
-
}, z.core.$
|
|
408
|
+
}, z.core.$strict>>;
|
|
383
409
|
notes: z.ZodOptional<z.ZodString>;
|
|
384
|
-
}, z.core.$
|
|
410
|
+
}, z.core.$strict>;
|
|
385
411
|
declare const MobileDeviceConfigSchema: z.ZodObject<{
|
|
386
412
|
name: z.ZodOptional<z.ZodString>;
|
|
387
413
|
udid: z.ZodOptional<z.ZodString>;
|
|
388
414
|
avd: z.ZodOptional<z.ZodString>;
|
|
389
415
|
serial: z.ZodOptional<z.ZodString>;
|
|
390
|
-
}, z.core.$
|
|
416
|
+
}, z.core.$strict>;
|
|
391
417
|
declare const MobileAppConfigSchema: z.ZodObject<{
|
|
392
418
|
bundle_id: z.ZodOptional<z.ZodString>;
|
|
393
419
|
package: z.ZodOptional<z.ZodString>;
|
|
394
420
|
app_paths: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
395
421
|
apk_paths: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
396
|
-
}, z.core.$
|
|
422
|
+
}, z.core.$strict>;
|
|
397
423
|
declare const MobileWebConfigSchema: z.ZodObject<{
|
|
398
424
|
base_url: z.ZodString;
|
|
399
425
|
start_url: z.ZodOptional<z.ZodString>;
|
|
400
|
-
}, z.core.$
|
|
426
|
+
}, z.core.$strict>;
|
|
401
427
|
declare const SourceRepoConfigSchema: z.ZodObject<{
|
|
402
428
|
path: z.ZodString;
|
|
403
429
|
build_commands: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
404
|
-
}, z.core.$
|
|
430
|
+
}, z.core.$strict>;
|
|
405
431
|
declare const MobileScopeConfigSchema: z.ZodObject<{
|
|
406
432
|
start_screen: z.ZodOptional<z.ZodString>;
|
|
407
433
|
start_url: z.ZodOptional<z.ZodString>;
|
|
408
434
|
include_patterns: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
409
435
|
exclude_patterns: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
410
|
-
}, z.core.$
|
|
436
|
+
}, z.core.$strict>;
|
|
411
437
|
declare const MobileTargetConfigSchema: z.ZodObject<{
|
|
412
438
|
id: z.ZodString;
|
|
413
439
|
name: z.ZodString;
|
|
@@ -421,17 +447,17 @@ declare const MobileTargetConfigSchema: z.ZodObject<{
|
|
|
421
447
|
udid: z.ZodOptional<z.ZodString>;
|
|
422
448
|
avd: z.ZodOptional<z.ZodString>;
|
|
423
449
|
serial: z.ZodOptional<z.ZodString>;
|
|
424
|
-
}, z.core.$
|
|
450
|
+
}, z.core.$strict>;
|
|
425
451
|
app: z.ZodObject<{
|
|
426
452
|
bundle_id: z.ZodOptional<z.ZodString>;
|
|
427
453
|
package: z.ZodOptional<z.ZodString>;
|
|
428
454
|
app_paths: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
429
455
|
apk_paths: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
430
|
-
}, z.core.$
|
|
456
|
+
}, z.core.$strict>;
|
|
431
457
|
web: z.ZodOptional<z.ZodObject<{
|
|
432
458
|
base_url: z.ZodString;
|
|
433
459
|
start_url: z.ZodOptional<z.ZodString>;
|
|
434
|
-
}, z.core.$
|
|
460
|
+
}, z.core.$strict>>;
|
|
435
461
|
auth: z.ZodObject<{
|
|
436
462
|
strategy: z.ZodEnum<{
|
|
437
463
|
none: "none";
|
|
@@ -446,31 +472,160 @@ declare const MobileTargetConfigSchema: z.ZodObject<{
|
|
|
446
472
|
credentials: z.ZodOptional<z.ZodObject<{
|
|
447
473
|
username: z.ZodString;
|
|
448
474
|
password: z.ZodString;
|
|
449
|
-
}, z.core.$
|
|
475
|
+
}, z.core.$strict>>;
|
|
450
476
|
token: z.ZodOptional<z.ZodString>;
|
|
451
477
|
identity_provider: z.ZodOptional<z.ZodString>;
|
|
452
478
|
static_otp: z.ZodOptional<z.ZodString>;
|
|
453
479
|
test_email_pattern: z.ZodOptional<z.ZodString>;
|
|
454
|
-
|
|
480
|
+
notes: z.ZodOptional<z.ZodString>;
|
|
481
|
+
}, z.core.$strict>;
|
|
455
482
|
scope: z.ZodOptional<z.ZodObject<{
|
|
456
483
|
start_screen: z.ZodOptional<z.ZodString>;
|
|
457
484
|
start_url: z.ZodOptional<z.ZodString>;
|
|
458
485
|
include_patterns: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
459
486
|
exclude_patterns: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
460
|
-
}, z.core.$
|
|
487
|
+
}, z.core.$strict>>;
|
|
461
488
|
safety: z.ZodOptional<z.ZodObject<{
|
|
462
489
|
read_only: z.ZodBoolean;
|
|
463
490
|
no_form_submit: z.ZodBoolean;
|
|
464
491
|
no_file_upload: z.ZodOptional<z.ZodBoolean>;
|
|
465
492
|
no_delete_actions: z.ZodOptional<z.ZodBoolean>;
|
|
466
|
-
}, z.core.$
|
|
493
|
+
}, z.core.$strict>>;
|
|
467
494
|
source_repo: z.ZodOptional<z.ZodObject<{
|
|
468
495
|
path: z.ZodString;
|
|
469
496
|
build_commands: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
470
|
-
}, z.core.$
|
|
497
|
+
}, z.core.$strict>>;
|
|
471
498
|
notes: z.ZodOptional<z.ZodString>;
|
|
472
|
-
}, z.core.$
|
|
473
|
-
declare const TargetConfigSchema: z.
|
|
499
|
+
}, z.core.$strict>;
|
|
500
|
+
declare const TargetConfigSchema: z.ZodPipe<z.ZodUnknown, z.ZodTransform<{
|
|
501
|
+
id: string;
|
|
502
|
+
name: string;
|
|
503
|
+
base_url: string;
|
|
504
|
+
domain: string;
|
|
505
|
+
auth: {
|
|
506
|
+
strategy: "none" | "storage_state" | "credentials" | "token" | "in-app" | "interactive-sso";
|
|
507
|
+
state_file?: string | undefined;
|
|
508
|
+
login_url?: string | undefined;
|
|
509
|
+
credentials?: {
|
|
510
|
+
username: string;
|
|
511
|
+
password: string;
|
|
512
|
+
} | undefined;
|
|
513
|
+
token?: string | undefined;
|
|
514
|
+
identity_provider?: string | undefined;
|
|
515
|
+
static_otp?: string | undefined;
|
|
516
|
+
test_email_pattern?: string | undefined;
|
|
517
|
+
notes?: string | undefined;
|
|
518
|
+
};
|
|
519
|
+
browser: {
|
|
520
|
+
headless: boolean;
|
|
521
|
+
viewport: {
|
|
522
|
+
width: number;
|
|
523
|
+
height: number;
|
|
524
|
+
};
|
|
525
|
+
engine?: "chromium" | "webkit" | "firefox" | undefined;
|
|
526
|
+
channel?: string | undefined;
|
|
527
|
+
device?: string | undefined;
|
|
528
|
+
};
|
|
529
|
+
scope: {
|
|
530
|
+
max_depth: number;
|
|
531
|
+
start_pages?: string[] | undefined;
|
|
532
|
+
include_patterns?: string[] | undefined;
|
|
533
|
+
exclude_patterns?: string[] | undefined;
|
|
534
|
+
};
|
|
535
|
+
safety?: {
|
|
536
|
+
read_only: boolean;
|
|
537
|
+
no_form_submit: boolean;
|
|
538
|
+
no_file_upload?: boolean | undefined;
|
|
539
|
+
no_delete_actions?: boolean | undefined;
|
|
540
|
+
} | undefined;
|
|
541
|
+
environment?: {
|
|
542
|
+
kind: "dev" | "ephemeral" | "staging" | "production";
|
|
543
|
+
destroyed_automatically?: boolean | undefined;
|
|
544
|
+
} | undefined;
|
|
545
|
+
backend?: {
|
|
546
|
+
provider?: "aws" | undefined;
|
|
547
|
+
aws_profile_env?: string | undefined;
|
|
548
|
+
region_env?: string | undefined;
|
|
549
|
+
region?: string | undefined;
|
|
550
|
+
account_id?: string | undefined;
|
|
551
|
+
env_suffix?: string | undefined;
|
|
552
|
+
resources?: Record<string, string> | undefined;
|
|
553
|
+
notes?: string | undefined;
|
|
554
|
+
} | undefined;
|
|
555
|
+
api?: {
|
|
556
|
+
base_url?: string | undefined;
|
|
557
|
+
auth?: "none" | "session-cookie" | "bearer-env" | "api-key-env" | undefined;
|
|
558
|
+
token_env?: string | undefined;
|
|
559
|
+
header_name?: string | undefined;
|
|
560
|
+
browser_profile?: string | undefined;
|
|
561
|
+
version_endpoint?: string | undefined;
|
|
562
|
+
endpoints?: Record<string, string> | undefined;
|
|
563
|
+
probe_allowlist?: string[] | undefined;
|
|
564
|
+
write_allowlist?: string[] | undefined;
|
|
565
|
+
parity_targets?: string[] | undefined;
|
|
566
|
+
feature_flags?: Record<string, string> | undefined;
|
|
567
|
+
notes?: string | undefined;
|
|
568
|
+
} | undefined;
|
|
569
|
+
source?: {
|
|
570
|
+
repo_path: string;
|
|
571
|
+
branch: string;
|
|
572
|
+
base_branch?: string | undefined;
|
|
573
|
+
components?: Record<string, string> | undefined;
|
|
574
|
+
} | undefined;
|
|
575
|
+
notes?: string | undefined;
|
|
576
|
+
} | {
|
|
577
|
+
id: string;
|
|
578
|
+
name: string;
|
|
579
|
+
platform: "ios" | "android";
|
|
580
|
+
domain: string;
|
|
581
|
+
device: {
|
|
582
|
+
name?: string | undefined;
|
|
583
|
+
udid?: string | undefined;
|
|
584
|
+
avd?: string | undefined;
|
|
585
|
+
serial?: string | undefined;
|
|
586
|
+
};
|
|
587
|
+
app: {
|
|
588
|
+
bundle_id?: string | undefined;
|
|
589
|
+
package?: string | undefined;
|
|
590
|
+
app_paths?: string[] | undefined;
|
|
591
|
+
apk_paths?: string[] | undefined;
|
|
592
|
+
};
|
|
593
|
+
auth: {
|
|
594
|
+
strategy: "none" | "storage_state" | "credentials" | "token" | "in-app" | "interactive-sso";
|
|
595
|
+
state_file?: string | undefined;
|
|
596
|
+
login_url?: string | undefined;
|
|
597
|
+
credentials?: {
|
|
598
|
+
username: string;
|
|
599
|
+
password: string;
|
|
600
|
+
} | undefined;
|
|
601
|
+
token?: string | undefined;
|
|
602
|
+
identity_provider?: string | undefined;
|
|
603
|
+
static_otp?: string | undefined;
|
|
604
|
+
test_email_pattern?: string | undefined;
|
|
605
|
+
notes?: string | undefined;
|
|
606
|
+
};
|
|
607
|
+
web?: {
|
|
608
|
+
base_url: string;
|
|
609
|
+
start_url?: string | undefined;
|
|
610
|
+
} | undefined;
|
|
611
|
+
scope?: {
|
|
612
|
+
start_screen?: string | undefined;
|
|
613
|
+
start_url?: string | undefined;
|
|
614
|
+
include_patterns?: string[] | undefined;
|
|
615
|
+
exclude_patterns?: string[] | undefined;
|
|
616
|
+
} | undefined;
|
|
617
|
+
safety?: {
|
|
618
|
+
read_only: boolean;
|
|
619
|
+
no_form_submit: boolean;
|
|
620
|
+
no_file_upload?: boolean | undefined;
|
|
621
|
+
no_delete_actions?: boolean | undefined;
|
|
622
|
+
} | undefined;
|
|
623
|
+
source_repo?: {
|
|
624
|
+
path: string;
|
|
625
|
+
build_commands?: Record<string, string> | undefined;
|
|
626
|
+
} | undefined;
|
|
627
|
+
notes?: string | undefined;
|
|
628
|
+
}, unknown>>;
|
|
474
629
|
|
|
475
630
|
declare const KnowledgeEntryContentSchema: z.ZodObject<{
|
|
476
631
|
summary: z.ZodString;
|
|
@@ -526,6 +681,7 @@ declare const LoadingStrategySchema: z.ZodObject<{
|
|
|
526
681
|
always: z.ZodArray<z.ZodString>;
|
|
527
682
|
by_domain: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString>>;
|
|
528
683
|
by_tag: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString>>;
|
|
684
|
+
by_skill: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString>>>;
|
|
529
685
|
}, z.core.$strip>;
|
|
530
686
|
declare const KnowledgeManifestSchema: z.ZodObject<{
|
|
531
687
|
version: z.ZodString;
|
|
@@ -544,6 +700,7 @@ declare const KnowledgeManifestSchema: z.ZodObject<{
|
|
|
544
700
|
always: z.ZodArray<z.ZodString>;
|
|
545
701
|
by_domain: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString>>;
|
|
546
702
|
by_tag: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString>>;
|
|
703
|
+
by_skill: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString>>>;
|
|
547
704
|
}, z.core.$strip>;
|
|
548
705
|
entries: z.ZodArray<z.ZodObject<{
|
|
549
706
|
id: z.ZodString;
|
|
@@ -560,35 +717,29 @@ declare const KnowledgeManifestSchema: z.ZodObject<{
|
|
|
560
717
|
}, z.core.$strip>;
|
|
561
718
|
|
|
562
719
|
declare const JourneySchema: z.ZodObject<{
|
|
563
|
-
id: z.ZodString;
|
|
564
720
|
name: z.ZodString;
|
|
565
|
-
description: z.ZodString;
|
|
566
721
|
steps: z.ZodArray<z.ZodString>;
|
|
567
|
-
|
|
568
|
-
high: "high";
|
|
569
|
-
medium: "medium";
|
|
570
|
-
low: "low";
|
|
571
|
-
}>;
|
|
572
|
-
}, z.core.$strip>;
|
|
722
|
+
}, z.core.$strict>;
|
|
573
723
|
declare const DomainConfigSchema: z.ZodObject<{
|
|
574
724
|
id: z.ZodString;
|
|
575
725
|
name: z.ZodString;
|
|
576
|
-
risk_ranking: z.
|
|
726
|
+
risk_ranking: z.ZodObject<{
|
|
727
|
+
p0: z.ZodArray<z.ZodString>;
|
|
728
|
+
p1: z.ZodArray<z.ZodString>;
|
|
729
|
+
p2: z.ZodArray<z.ZodString>;
|
|
730
|
+
p3: z.ZodArray<z.ZodString>;
|
|
731
|
+
}, z.core.$strict>;
|
|
577
732
|
completeness_checklist: z.ZodArray<z.ZodString>;
|
|
578
733
|
data_integrity_checks: z.ZodArray<z.ZodString>;
|
|
579
734
|
journeys: z.ZodArray<z.ZodObject<{
|
|
580
|
-
id: z.ZodString;
|
|
581
735
|
name: z.ZodString;
|
|
582
|
-
description: z.ZodString;
|
|
583
736
|
steps: z.ZodArray<z.ZodString>;
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
guidance: z.ZodArray<z.ZodString>;
|
|
591
|
-
}, z.core.$strip>;
|
|
737
|
+
}, z.core.$strict>>;
|
|
738
|
+
must_test_patterns: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString>>;
|
|
739
|
+
common_bugs: z.ZodArray<z.ZodString>;
|
|
740
|
+
compliance: z.ZodArray<z.ZodString>;
|
|
741
|
+
guidance: z.ZodString;
|
|
742
|
+
}, z.core.$strict>;
|
|
592
743
|
|
|
593
744
|
declare const SeverityCountsSchema: z.ZodObject<{
|
|
594
745
|
critical: z.ZodNumber;
|
|
@@ -596,6 +747,11 @@ declare const SeverityCountsSchema: z.ZodObject<{
|
|
|
596
747
|
medium: z.ZodNumber;
|
|
597
748
|
low: z.ZodNumber;
|
|
598
749
|
}, z.core.$strip>;
|
|
750
|
+
/**
|
|
751
|
+
* Canonical shape of a session's `stats.json`. The first block is required
|
|
752
|
+
* (and is what `metrics.jsonl` records); the rest is optional context a
|
|
753
|
+
* session skill may add.
|
|
754
|
+
*/
|
|
599
755
|
declare const SessionMetricsSchema: z.ZodObject<{
|
|
600
756
|
session_id: z.ZodString;
|
|
601
757
|
target: z.ZodString;
|
|
@@ -609,29 +765,96 @@ declare const SessionMetricsSchema: z.ZodObject<{
|
|
|
609
765
|
low: z.ZodNumber;
|
|
610
766
|
}, z.core.$strip>;
|
|
611
767
|
pages_explored: z.ZodNumber;
|
|
768
|
+
kind: z.ZodOptional<z.ZodEnum<{
|
|
769
|
+
explore: "explore";
|
|
770
|
+
quick: "quick";
|
|
771
|
+
mobile: "mobile";
|
|
772
|
+
backend: "backend";
|
|
773
|
+
}>>;
|
|
774
|
+
domain: z.ZodOptional<z.ZodString>;
|
|
775
|
+
started_at: z.ZodOptional<z.ZodString>;
|
|
776
|
+
completed_at: z.ZodOptional<z.ZodString>;
|
|
777
|
+
phases_completed: z.ZodOptional<z.ZodNumber>;
|
|
778
|
+
total_phases: z.ZodOptional<z.ZodNumber>;
|
|
779
|
+
coverage: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
780
|
+
evidence: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
781
|
+
areas_not_tested: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
782
|
+
blocked_by: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
612
783
|
}, z.core.$strip>;
|
|
613
784
|
|
|
785
|
+
declare const KnowledgeReleaseSchema: z.ZodObject<{
|
|
786
|
+
version: z.ZodString;
|
|
787
|
+
date: z.ZodString;
|
|
788
|
+
author: z.ZodString;
|
|
789
|
+
status: z.ZodEnum<{
|
|
790
|
+
active: "active";
|
|
791
|
+
deprecated: "deprecated";
|
|
792
|
+
}>;
|
|
793
|
+
notes: z.ZodString;
|
|
794
|
+
entry_count: z.ZodNumber;
|
|
795
|
+
entries: z.ZodArray<z.ZodString>;
|
|
796
|
+
}, z.core.$strict>;
|
|
797
|
+
|
|
798
|
+
/** Schema for `data/knowledge/changelog.yml`. */
|
|
799
|
+
declare const KnowledgeChangelogSchema: z.ZodObject<{
|
|
800
|
+
releases: z.ZodArray<z.ZodObject<{
|
|
801
|
+
version: z.ZodString;
|
|
802
|
+
date: z.ZodString;
|
|
803
|
+
summary: z.ZodString;
|
|
804
|
+
entries_added: z.ZodArray<z.ZodObject<{
|
|
805
|
+
id: z.ZodString;
|
|
806
|
+
type: z.ZodEnum<{
|
|
807
|
+
heuristic: "heuristic";
|
|
808
|
+
technique: "technique";
|
|
809
|
+
checklist: "checklist";
|
|
810
|
+
reference: "reference";
|
|
811
|
+
}>;
|
|
812
|
+
name: z.ZodString;
|
|
813
|
+
description: z.ZodString;
|
|
814
|
+
}, z.core.$strict>>;
|
|
815
|
+
entries_modified: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
816
|
+
entries_removed: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
817
|
+
origin: z.ZodOptional<z.ZodString>;
|
|
818
|
+
}, z.core.$strict>>;
|
|
819
|
+
}, z.core.$strict>;
|
|
820
|
+
|
|
614
821
|
/**
|
|
615
|
-
* Credential and secret redaction
|
|
616
|
-
*
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
*
|
|
620
|
-
*
|
|
822
|
+
* Credential and secret redaction.
|
|
823
|
+
*
|
|
824
|
+
* Applied to every report and bug field before it is written to disk or handed
|
|
825
|
+
* to a formatter. Patterns are ordered specific-first. Key/value patterns
|
|
826
|
+
* require an actual `=` or `:` operator so ordinary prose ("Password field
|
|
827
|
+
* accepts…", "the secret sauce") is left intact; card numbers are only redacted
|
|
828
|
+
* when they pass a Luhn check, so millisecond timestamps and order ids survive.
|
|
621
829
|
*/
|
|
622
|
-
|
|
830
|
+
interface RedactOptions {
|
|
831
|
+
emails?: boolean;
|
|
832
|
+
}
|
|
833
|
+
/** Redacts secrets, returning the cleaned text and which categories fired. */
|
|
834
|
+
declare function redact(text: string, opts?: RedactOptions): {
|
|
623
835
|
text: string;
|
|
624
836
|
redactions: string[];
|
|
625
837
|
};
|
|
626
|
-
/**
|
|
627
|
-
* Checks whether the text contains any detectable secrets.
|
|
628
|
-
*/
|
|
838
|
+
/** True when the text contains any detectable secret. */
|
|
629
839
|
declare function containsSecrets(text: string): boolean;
|
|
840
|
+
declare const REDACTION_CATEGORIES: string[];
|
|
630
841
|
|
|
631
842
|
declare function validateTargetConfig(filePath: string): ValidationResult;
|
|
632
843
|
declare function validateKnowledgeEntry(filePath: string): ValidationResult;
|
|
633
844
|
declare function validateDomainConfig(filePath: string): ValidationResult;
|
|
634
|
-
|
|
845
|
+
/**
|
|
846
|
+
* Cross-checks the whole knowledge base: manifest, releases, changelog, and the
|
|
847
|
+
* consistency between the registry, the entry files and the computed stats.
|
|
848
|
+
*/
|
|
849
|
+
declare function validateKnowledgeBase(dataDir: string): ValidationResult[];
|
|
850
|
+
/**
|
|
851
|
+
* Validates every config file under `dataDir` (targets, domains, knowledge
|
|
852
|
+
* entries and the knowledge-base cross-check). Also validates a project-local
|
|
853
|
+
* `qa/target.yml` when `cwd` is given and the file exists.
|
|
854
|
+
*/
|
|
855
|
+
declare function validateAllConfigs(dataDir: string, opts?: {
|
|
856
|
+
cwd?: string;
|
|
857
|
+
}): ValidationResult[];
|
|
635
858
|
|
|
636
859
|
/**
|
|
637
860
|
* Appends a single session metrics record to the JSONL file.
|
|
@@ -643,6 +866,178 @@ declare function appendSessionMetrics(outputDir: string, metrics: SessionMetrics
|
|
|
643
866
|
* Returns an empty array if the file does not exist or is empty.
|
|
644
867
|
*/
|
|
645
868
|
declare function readAllMetrics(outputDir: string): SessionMetrics[];
|
|
869
|
+
/** Appends metrics only when the session_id has not been recorded yet. */
|
|
870
|
+
declare function appendSessionMetricsDeduped(outputDir: string, metrics: SessionMetrics): boolean;
|
|
871
|
+
|
|
872
|
+
/**
|
|
873
|
+
* Session directory naming — the single scheme used by every session skill,
|
|
874
|
+
* the `explore` CLI command, the report resolver and the list command.
|
|
875
|
+
*
|
|
876
|
+
* Scheme: output/sessions/<YYYY-MM-DD-HHmm>-<kind>-<slug>/
|
|
877
|
+
* Date-first so a lexicographic sort is chronological.
|
|
878
|
+
*/
|
|
879
|
+
declare const SESSION_KINDS: readonly ["explore", "quick", "mobile", "backend"];
|
|
880
|
+
type SessionKind = (typeof SESSION_KINDS)[number];
|
|
881
|
+
declare const SESSION_DIR_RE: RegExp;
|
|
882
|
+
/**
|
|
883
|
+
* Turns an arbitrary target id, ticket or URL into a filesystem-safe slug:
|
|
884
|
+
* lowercase, alphanumerics and single dashes, no leading/trailing dash,
|
|
885
|
+
* capped at 40 chars. A full URL is reduced to its hostname first.
|
|
886
|
+
*/
|
|
887
|
+
declare function slugify(input: string): string;
|
|
888
|
+
/** `2026-09-08-1813` for the given date (local time). */
|
|
889
|
+
declare function sessionTimestamp(date?: Date): string;
|
|
890
|
+
/** Full session directory name, e.g. `2026-09-08-1813-explore-parabank`. */
|
|
891
|
+
declare function sessionDirName(kind: SessionKind, target: string, date?: Date): string;
|
|
892
|
+
interface ParsedSessionDir {
|
|
893
|
+
timestamp: string;
|
|
894
|
+
kind: SessionKind;
|
|
895
|
+
slug: string;
|
|
896
|
+
}
|
|
897
|
+
/** Parses a directory name back into its parts, or null if it does not match. */
|
|
898
|
+
declare function parseSessionDirName(name: string): ParsedSessionDir | null;
|
|
899
|
+
|
|
900
|
+
/**
|
|
901
|
+
* Minimal GitHub-flavoured-markdown table parser.
|
|
902
|
+
*
|
|
903
|
+
* Splits pipe-delimited rows and drops only the leading/trailing empty cells
|
|
904
|
+
* produced by the outer pipes — internal empty cells are preserved, so column
|
|
905
|
+
* indices stay aligned even when a cell is blank.
|
|
906
|
+
*/
|
|
907
|
+
interface ParsedTable {
|
|
908
|
+
headers: string[];
|
|
909
|
+
rows: Record<string, string>[];
|
|
910
|
+
}
|
|
911
|
+
/**
|
|
912
|
+
* Finds the first markdown table under a heading matching `headingPrefix`
|
|
913
|
+
* (case-insensitive, matched at the start of the heading text), or the first
|
|
914
|
+
* table in the document when no prefix is given. Returns null if none.
|
|
915
|
+
*
|
|
916
|
+
* Header cells are matched case-insensitively; the returned row objects are
|
|
917
|
+
* keyed by the lower-cased header name.
|
|
918
|
+
*/
|
|
919
|
+
declare function parseMarkdownTable(md: string, opts?: {
|
|
920
|
+
headingPrefix?: string;
|
|
921
|
+
}): ParsedTable | null;
|
|
922
|
+
|
|
923
|
+
/**
|
|
924
|
+
* The single confidentiality header used on every generated artefact
|
|
925
|
+
* (templates, session reports, formatter output).
|
|
926
|
+
*/
|
|
927
|
+
declare const CONFIDENTIALITY_LINES: readonly ["CONFIDENTIAL: This report may contain internal URLs, security vulnerabilities,", "and application details. Do not share outside your organization without review."];
|
|
928
|
+
/** Markdown blockquote form, e.g. for the top of a `.md` artefact. */
|
|
929
|
+
declare const CONFIDENTIALITY_HEADER_MD: string;
|
|
930
|
+
/** Plain one-line form, e.g. for an HTML banner or a CSV/JSON note. */
|
|
931
|
+
declare const CONFIDENTIALITY_NOTICE: string;
|
|
932
|
+
/** True when `text` already begins (ignoring blank lines) with the header. */
|
|
933
|
+
declare function hasConfidentialityHeader(text: string): boolean;
|
|
934
|
+
|
|
935
|
+
/**
|
|
936
|
+
* Canonical headers for the session index and consolidated bug list, shared by
|
|
937
|
+
* `qualiow init` (which writes them) and `qualiow list` (which reads them).
|
|
938
|
+
*/
|
|
939
|
+
declare const INDEX_COLUMNS: readonly ["Date", "Kind", "Target", "Bugs", "Duration", "Status", "Report"];
|
|
940
|
+
declare const ALL_BUGS_COLUMNS: readonly ["ID", "Session", "Title", "Severity", "Status", "Report"];
|
|
941
|
+
declare const INDEX_MD_HEADER: string;
|
|
942
|
+
declare const ALL_BUGS_MD_HEADER: string;
|
|
943
|
+
|
|
944
|
+
/**
|
|
945
|
+
* .gitignore merge for `qualiow init`.
|
|
946
|
+
*
|
|
947
|
+
* Adds the Qualiow ignore block by exact-line comparison (so an unrelated
|
|
948
|
+
* substring like `.env.example` never suppresses `.env`), writes the section
|
|
949
|
+
* header at most once, and is idempotent: a second run adds nothing.
|
|
950
|
+
*/
|
|
951
|
+
declare const QUALIOW_GITIGNORE_HEADER = "# Qualiow";
|
|
952
|
+
declare const QUALIOW_GITIGNORE_ENTRIES: readonly [".auth/", ".env", "qa/.env", "output/sessions/*/", "!output/sessions/INDEX.md", "output/context/*.md", "data/targets/local-*.yml", ".playwright-cli/", "*.trace.zip", "*.webm"];
|
|
953
|
+
/**
|
|
954
|
+
* Returns the new .gitignore content, or null when nothing needs adding.
|
|
955
|
+
* Compares against existing lines exactly (trimmed of trailing whitespace).
|
|
956
|
+
*/
|
|
957
|
+
declare function mergeGitignore(existing: string): string | null;
|
|
958
|
+
|
|
959
|
+
/**
|
|
960
|
+
* Path resolution shared by the CLI commands.
|
|
961
|
+
*
|
|
962
|
+
* The package root is where `data/` and `package.json` live — the git checkout
|
|
963
|
+
* in development, or `node_modules/qualiow-exploratory-testing/` when installed.
|
|
964
|
+
*/
|
|
965
|
+
/** Walk up from the built file looking for a dir with data/ and package.json. */
|
|
966
|
+
declare function getPackageRoot(): string;
|
|
967
|
+
/** The `version` field of the package's own package.json (or "0.0.0"). */
|
|
968
|
+
declare function getPackageVersion(pkgRoot?: string): string;
|
|
969
|
+
/** Where `init` copies skills from: the published `skills/` tree, or the
|
|
970
|
+
* canonical `.claude/skills/` in a git checkout. */
|
|
971
|
+
declare function resolveSkillsSource(pkgRoot: string): string | null;
|
|
972
|
+
/**
|
|
973
|
+
* Resolve a target config path. With a name: `data/targets/<name>.yml` under
|
|
974
|
+
* cwd, else under the package root. Without a name: a project-local
|
|
975
|
+
* `qa/target.yml`, else `data/targets/_default.yml`. Returns the first path
|
|
976
|
+
* that exists, or the most-specific candidate when none exist (so callers can
|
|
977
|
+
* report a useful "not found").
|
|
978
|
+
*/
|
|
979
|
+
declare function resolveTargetPath(cwd: string, name: string | undefined, pkgRoot?: string): string;
|
|
980
|
+
/**
|
|
981
|
+
* Resolve the `data/` directory the read-only commands read from.
|
|
982
|
+
*
|
|
983
|
+
* Order, first existing wins:
|
|
984
|
+
* 1. an explicit directory (`--data`), resolved against `cwd`
|
|
985
|
+
* 2. `<cwd>/data`, but only when it carries `knowledge/manifest.yml` — the
|
|
986
|
+
* marker that this is a qualiow project rather than any `data/` folder
|
|
987
|
+
* 3. `$CLAUDE_PLUGIN_ROOT/data`, set by Claude Code under a plugin install
|
|
988
|
+
* 4. `<pkgRoot>/data`, the package's own shipped data
|
|
989
|
+
*
|
|
990
|
+
* An explicit directory is returned as given even when it does not exist, so a
|
|
991
|
+
* typo surfaces as a "not found" naming the path the caller asked for instead
|
|
992
|
+
* of silently falling back to the package data.
|
|
993
|
+
*/
|
|
994
|
+
declare function resolveDataDir(cwd: string, explicit?: string, pkgRoot?: string): string;
|
|
995
|
+
/** Resolve a domain config, trying `<id>.yml` then `_<id>.yml`. */
|
|
996
|
+
declare function resolveDomainPath(dataDir: string, id: string): string;
|
|
997
|
+
|
|
998
|
+
/**
|
|
999
|
+
* Knowledge-base manifest synchronisation.
|
|
1000
|
+
*
|
|
1001
|
+
* Rebuilds the manifest `entries:` registry and `stats:` from the release
|
|
1002
|
+
* directories on disk, so the manifest can never drift from the files. Other
|
|
1003
|
+
* manifest nodes (version, active_releases, loading_strategy) and the file's
|
|
1004
|
+
* comments are preserved.
|
|
1005
|
+
*/
|
|
1006
|
+
interface RegistryEntry {
|
|
1007
|
+
id: string;
|
|
1008
|
+
file: string;
|
|
1009
|
+
type: string;
|
|
1010
|
+
priority: string;
|
|
1011
|
+
tags: string[];
|
|
1012
|
+
domains: string[];
|
|
1013
|
+
}
|
|
1014
|
+
interface ManifestStats {
|
|
1015
|
+
total_entries: number;
|
|
1016
|
+
heuristics: number;
|
|
1017
|
+
techniques: number;
|
|
1018
|
+
checklists: number;
|
|
1019
|
+
references: number;
|
|
1020
|
+
domain_profiles: number;
|
|
1021
|
+
custom_entries: number;
|
|
1022
|
+
}
|
|
1023
|
+
/** Sorted list of release dir names (v0.1.0 < v0.2.0 …). */
|
|
1024
|
+
declare function listReleaseDirs(knowledgeDir: string): string[];
|
|
1025
|
+
/** Builds the registry array from the entry files, release order then id. */
|
|
1026
|
+
declare function buildManifestRegistry(dataDir: string): RegistryEntry[];
|
|
1027
|
+
/** Computes stats from the registry, the domain files and the custom dir. */
|
|
1028
|
+
declare function computeStats(dataDir: string, registry: RegistryEntry[]): ManifestStats;
|
|
1029
|
+
interface SyncResult {
|
|
1030
|
+
changed: boolean;
|
|
1031
|
+
stats: ManifestStats;
|
|
1032
|
+
entryCount: number;
|
|
1033
|
+
}
|
|
1034
|
+
/**
|
|
1035
|
+
* Rewrites (or, with `check`, only compares) the manifest's `entries` and
|
|
1036
|
+
* `stats` from disk. Returns whether the on-disk manifest was already in sync.
|
|
1037
|
+
*/
|
|
1038
|
+
declare function syncKnowledgeManifest(dataDir: string, opts?: {
|
|
1039
|
+
check?: boolean;
|
|
1040
|
+
}): SyncResult;
|
|
646
1041
|
|
|
647
1042
|
/**
|
|
648
1043
|
* Session and bug report parser.
|
|
@@ -653,15 +1048,22 @@ interface ParsedBug {
|
|
|
653
1048
|
id: string;
|
|
654
1049
|
title: string;
|
|
655
1050
|
severity: 'critical' | 'high' | 'medium' | 'low';
|
|
1051
|
+
priority: string;
|
|
656
1052
|
component: string;
|
|
657
1053
|
url: string;
|
|
1054
|
+
environment: string;
|
|
1055
|
+
reproduction_rate: string;
|
|
1056
|
+
summary: string;
|
|
658
1057
|
expected: string;
|
|
659
1058
|
actual: string;
|
|
660
1059
|
steps: string[];
|
|
661
1060
|
business_impact: string;
|
|
662
1061
|
evidence: {
|
|
663
1062
|
screenshots: string[];
|
|
1063
|
+
videos: string[];
|
|
1064
|
+
logs: string[];
|
|
664
1065
|
console_errors: string[];
|
|
1066
|
+
network_failures: string[];
|
|
665
1067
|
};
|
|
666
1068
|
}
|
|
667
1069
|
interface ParsedSession {
|
|
@@ -696,27 +1098,181 @@ declare function generateHtmlReport(sessionDir: string): Promise<string>;
|
|
|
696
1098
|
|
|
697
1099
|
/**
|
|
698
1100
|
* JSON report generator.
|
|
699
|
-
* Produces structured JSON from session data for programmatic
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
* Generates a structured JSON report from a session directory.
|
|
1101
|
+
* Produces structured, redacted JSON from session data for programmatic
|
|
1102
|
+
* consumption. Carries a classification block so downstream tooling can
|
|
1103
|
+
* honour the confidentiality of the content.
|
|
703
1104
|
*/
|
|
1105
|
+
/** Generates a structured, redacted JSON report from a session directory. */
|
|
704
1106
|
declare function generateJsonReport(sessionDir: string): Promise<object>;
|
|
705
1107
|
|
|
706
1108
|
/**
|
|
707
1109
|
* Jira CSV export generator.
|
|
708
|
-
* Produces a CSV file importable via Jira bulk import.
|
|
1110
|
+
* Produces a CSV file importable via Jira bulk import. Every field is redacted
|
|
1111
|
+
* and formula-neutralised before it is written.
|
|
1112
|
+
*/
|
|
1113
|
+
/**
|
|
1114
|
+
* Escapes a value for a CSV field: always quoted, internal quotes doubled,
|
|
1115
|
+
* and a leading `= + - @ \t \r` neutralised with an apostrophe so the cell
|
|
1116
|
+
* is never evaluated as a formula when the file is opened in a spreadsheet.
|
|
709
1117
|
*/
|
|
1118
|
+
declare function csvEscape(value: string): string;
|
|
710
1119
|
/**
|
|
711
1120
|
* Generates a CSV string importable by Jira bulk import from a session directory.
|
|
712
1121
|
*
|
|
713
|
-
*
|
|
714
|
-
* - Summary: bug title
|
|
715
|
-
* - Priority: mapped from severity
|
|
716
|
-
* - Description: steps + business impact formatted in Jira wiki markup
|
|
717
|
-
* - Component: from bug component field
|
|
718
|
-
* - Labels: qualiow, exploratory-testing, domain
|
|
1122
|
+
* Columns: Summary, Priority, Description, Component, Labels.
|
|
719
1123
|
*/
|
|
720
1124
|
declare function generateJiraExport(sessionDir: string): Promise<string>;
|
|
721
1125
|
|
|
722
|
-
|
|
1126
|
+
/**
|
|
1127
|
+
* Markdown summary generator for `qualiow report -f md`.
|
|
1128
|
+
* Produces a short, redacted `session-summary.md` next to the session report
|
|
1129
|
+
* (never overwriting `session-report.md`).
|
|
1130
|
+
*/
|
|
1131
|
+
declare function generateMarkdownSummary(sessionDir: string): Promise<string>;
|
|
1132
|
+
|
|
1133
|
+
/**
|
|
1134
|
+
* Shared report-extraction helpers used by the HTML and JSON formatters.
|
|
1135
|
+
* Everything user-authored (the report body and every bug field) is redacted
|
|
1136
|
+
* on the way out.
|
|
1137
|
+
*/
|
|
1138
|
+
|
|
1139
|
+
interface ReportMeta {
|
|
1140
|
+
target: string;
|
|
1141
|
+
date: string;
|
|
1142
|
+
duration: string;
|
|
1143
|
+
sessionId: string;
|
|
1144
|
+
summary: string;
|
|
1145
|
+
}
|
|
1146
|
+
interface CoverageEntry {
|
|
1147
|
+
area: string;
|
|
1148
|
+
risk: string;
|
|
1149
|
+
status: string;
|
|
1150
|
+
bugsFound: string;
|
|
1151
|
+
notes: string;
|
|
1152
|
+
}
|
|
1153
|
+
/** Loads a session and redacts its report body and every bug. */
|
|
1154
|
+
declare function loadSessionForOutput(sessionDir: string): Promise<{
|
|
1155
|
+
session: ParsedSession;
|
|
1156
|
+
report: string;
|
|
1157
|
+
}>;
|
|
1158
|
+
declare function extractReportMeta(report: string, sessionId: string): ReportMeta;
|
|
1159
|
+
/**
|
|
1160
|
+
* Extracts the coverage-map table. Accepts the canonical header
|
|
1161
|
+
* `| Area | Risk | Status | Bugs | Notes |` and the legacy `| Area | Status |`.
|
|
1162
|
+
*/
|
|
1163
|
+
declare function extractCoverage(report: string): CoverageEntry[];
|
|
1164
|
+
declare function extractListSection(report: string, heading: string): string[];
|
|
1165
|
+
|
|
1166
|
+
interface InitOptions {
|
|
1167
|
+
includeExamples: boolean;
|
|
1168
|
+
force: boolean;
|
|
1169
|
+
dryRun: boolean;
|
|
1170
|
+
hooks?: boolean;
|
|
1171
|
+
}
|
|
1172
|
+
type CopyStatus = 'installed' | 'unchanged' | 'overwritten' | 'skipped';
|
|
1173
|
+
interface CopyRecord {
|
|
1174
|
+
dest: string;
|
|
1175
|
+
status: CopyStatus;
|
|
1176
|
+
}
|
|
1177
|
+
interface InitResult {
|
|
1178
|
+
copies: CopyRecord[];
|
|
1179
|
+
createdDirs: string[];
|
|
1180
|
+
createdFiles: string[];
|
|
1181
|
+
gitignoreUpdated: boolean;
|
|
1182
|
+
}
|
|
1183
|
+
declare function runInit(options: InitOptions, ctx: {
|
|
1184
|
+
cwd: string;
|
|
1185
|
+
pkgRoot?: string;
|
|
1186
|
+
log?: (line: string) => void;
|
|
1187
|
+
}): Promise<InitResult>;
|
|
1188
|
+
|
|
1189
|
+
interface ExploreOptions {
|
|
1190
|
+
target?: string;
|
|
1191
|
+
context?: string;
|
|
1192
|
+
timeBox: string;
|
|
1193
|
+
dryRun: boolean;
|
|
1194
|
+
}
|
|
1195
|
+
declare function parseTimeBox(value: string): number;
|
|
1196
|
+
declare function runExplore(url: string | undefined, options: ExploreOptions, ctx: {
|
|
1197
|
+
cwd: string;
|
|
1198
|
+
now?: Date;
|
|
1199
|
+
log?: (line: string) => void;
|
|
1200
|
+
}): Promise<{
|
|
1201
|
+
sessionDir: string;
|
|
1202
|
+
}>;
|
|
1203
|
+
|
|
1204
|
+
interface ReportOptions {
|
|
1205
|
+
session: string;
|
|
1206
|
+
format: string;
|
|
1207
|
+
output?: string;
|
|
1208
|
+
stdout: boolean;
|
|
1209
|
+
}
|
|
1210
|
+
declare function runReport(options: ReportOptions, ctx: {
|
|
1211
|
+
cwd: string;
|
|
1212
|
+
log?: (line: string) => void;
|
|
1213
|
+
}): Promise<{
|
|
1214
|
+
outputPath?: string;
|
|
1215
|
+
content: string;
|
|
1216
|
+
}>;
|
|
1217
|
+
/**
|
|
1218
|
+
* Resolves `latest`, an exact directory name, or a unique substring match.
|
|
1219
|
+
* Throws when nothing matches or when a substring matches more than one session.
|
|
1220
|
+
*/
|
|
1221
|
+
declare function resolveSessionDir(sessionsDir: string, sessionId: string): string;
|
|
1222
|
+
|
|
1223
|
+
interface ListOptions {
|
|
1224
|
+
/** Knowledge only: keep entries carrying this domain (or `all`). */
|
|
1225
|
+
domain?: string;
|
|
1226
|
+
/** Knowledge only: keep entries carrying this tag. */
|
|
1227
|
+
tag?: string;
|
|
1228
|
+
/** Knowledge only: keep entries of this type. */
|
|
1229
|
+
type?: string;
|
|
1230
|
+
/** Knowledge only: print one entry's YAML file instead of the listing. */
|
|
1231
|
+
entry?: string;
|
|
1232
|
+
/** Knowledge only: print the release changelog instead of the listing. */
|
|
1233
|
+
changelog?: boolean;
|
|
1234
|
+
/** Knowledge only: print stats, releases and loading-strategy counts. */
|
|
1235
|
+
stats?: boolean;
|
|
1236
|
+
/** Knowledge only: read the knowledge base from this data directory. */
|
|
1237
|
+
data?: string;
|
|
1238
|
+
}
|
|
1239
|
+
declare function runList(type: string, cwd: string, options?: ListOptions, log?: (line: string) => void): Promise<void>;
|
|
1240
|
+
interface SessionRow {
|
|
1241
|
+
date: string;
|
|
1242
|
+
kind: string;
|
|
1243
|
+
target: string;
|
|
1244
|
+
bugs: string;
|
|
1245
|
+
duration: string;
|
|
1246
|
+
status: string;
|
|
1247
|
+
report: string;
|
|
1248
|
+
}
|
|
1249
|
+
/** Parses INDEX.md rows, ignoring placeholder rows whose first cell starts with `_`. */
|
|
1250
|
+
declare function readSessionIndex(indexPath: string): SessionRow[];
|
|
1251
|
+
|
|
1252
|
+
interface ValidateOptions {
|
|
1253
|
+
targets?: boolean;
|
|
1254
|
+
knowledge?: boolean;
|
|
1255
|
+
domains?: boolean;
|
|
1256
|
+
kb?: boolean;
|
|
1257
|
+
all?: boolean;
|
|
1258
|
+
}
|
|
1259
|
+
/** Runs the selected validations, prints results, returns the failure count. */
|
|
1260
|
+
declare function runValidate(options: ValidateOptions, cwd: string): number;
|
|
1261
|
+
|
|
1262
|
+
declare function runKb(mode: 'sync' | 'check', cwd: string): SyncResult;
|
|
1263
|
+
interface KbDigestOptions {
|
|
1264
|
+
domain?: string;
|
|
1265
|
+
tag?: string[];
|
|
1266
|
+
/** `--for <skill>`; commander stores it under the flag's own name. */
|
|
1267
|
+
for?: string;
|
|
1268
|
+
entry?: string;
|
|
1269
|
+
data?: string;
|
|
1270
|
+
maxLines?: number;
|
|
1271
|
+
}
|
|
1272
|
+
/**
|
|
1273
|
+
* Builds the digest a session loads instead of reading the manifest and the
|
|
1274
|
+
* release files whole. Returns the text; the action prints it.
|
|
1275
|
+
*/
|
|
1276
|
+
declare function runKbDigest(options: KbDigestOptions, cwd: string): string;
|
|
1277
|
+
|
|
1278
|
+
export { ALL_BUGS_COLUMNS, ALL_BUGS_MD_HEADER, type AnyTargetConfig, type AuthConfig, AuthConfigSchema, type BrowserConfig, BrowserConfigSchema, type BugReport, type BugSeverity, CONFIDENTIALITY_HEADER_MD, CONFIDENTIALITY_LINES, CONFIDENTIALITY_NOTICE, type CopyRecord, type CopyStatus, type CoverageEntry, type DomainConfig, DomainConfigSchema, INDEX_COLUMNS, INDEX_MD_HEADER, type InitOptions, type InitResult, type Journey, JourneySchema, type KbDigestOptions, KnowledgeChangelogSchema, type KnowledgeEntry, type KnowledgeEntryContent, KnowledgeEntryContentSchema, KnowledgeEntrySchema, type KnowledgeManifest, type KnowledgeManifestEntry, KnowledgeManifestEntrySchema, KnowledgeManifestSchema, type KnowledgeManifestStats, KnowledgeManifestStatsSchema, KnowledgeReleaseSchema, type ListOptions, type LoadingStrategy, LoadingStrategySchema, type ManifestStats, type MobileAppConfig, MobileAppConfigSchema, type MobileDeviceConfig, MobileDeviceConfigSchema, type MobileScopeConfig, MobileScopeConfigSchema, type MobileTargetConfig, MobileTargetConfigSchema, type MobileWebConfig, MobileWebConfigSchema, type ParsedBug, type ParsedSession, type ParsedSessionDir, type ParsedTable, QUALIOW_GITIGNORE_ENTRIES, QUALIOW_GITIGNORE_HEADER, REDACTION_CATEGORIES, type RedactOptions, type RegistryEntry, type ReportMeta, type RiskRanking, SESSION_DIR_RE, SESSION_KINDS, type SafetyConfig, SafetyConfigSchema, type ScopeConfig, ScopeConfigSchema, type SessionKind, type SessionMetrics, SessionMetricsSchema, type SessionRow, type SeverityCounts, SeverityCountsSchema, type SourceRepoConfig, SourceRepoConfigSchema, type SyncResult, type TargetConfig, TargetConfigSchema, type ValidationError, type ValidationResult, WebTargetConfigSchema, appendSessionMetrics, appendSessionMetricsDeduped, buildManifestRegistry, computeStats, containsSecrets, csvEscape, extractCoverage, extractListSection, extractReportMeta, generateHtmlReport, generateJiraExport, generateJsonReport, generateMarkdownSummary, getPackageRoot, getPackageVersion, hasConfidentialityHeader, listReleaseDirs, loadSessionForOutput, mergeGitignore, parseBugReport, parseMarkdownTable, parseSession, parseSessionDirName, parseTimeBox, readAllMetrics, readSessionIndex, redact, resolveDataDir, resolveDomainPath, resolveSessionDir, resolveSkillsSource, resolveTargetPath, runExplore, runInit, runKb, runKbDigest, runList, runReport, runValidate, sessionDirName, sessionTimestamp, slugify, syncKnowledgeManifest, validateAllConfigs, validateDomainConfig, validateKnowledgeBase, validateKnowledgeEntry, validateTargetConfig };
|