qualiow-exploratory-testing 1.2.0 → 2.0.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/plugin.json +22 -0
- package/.env.example +27 -0
- package/CHANGELOG.md +194 -0
- package/README.md +428 -179
- package/agents/qa-gather-agent.md +24 -0
- package/{scripts → bin}/doctor-mobile.sh +57 -18
- package/bin/mcli +15 -9
- package/bin/mobile-cli.mjs +574 -286
- 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/domains/identity.yml +138 -0
- package/data/knowledge/changelog.yml +104 -0
- package/data/knowledge/learned-patterns.md +172 -86
- package/data/knowledge/manifest.yml +481 -70
- 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.2.0/entries/technique-contract-narrowing.yml +150 -0
- package/data/knowledge/releases/v0.2.0/entries/technique-test-suite-audit.yml +116 -0
- package/data/knowledge/releases/v0.2.0/release.yml +20 -0
- package/data/knowledge/releases/v0.3.0/entries/technique-functional-diff-analysis.yml +119 -0
- package/data/knowledge/releases/v0.3.0/entries/technique-llm-output-verification.yml +102 -0
- package/data/knowledge/releases/v0.3.0/entries/technique-verification-mode-selection.yml +153 -0
- package/data/knowledge/releases/v0.3.0/release.yml +25 -0
- package/data/knowledge/releases/v0.4.0/entries/technique-authenticated-api-probing.yml +137 -0
- package/data/knowledge/releases/v0.4.0/entries/technique-environment-fingerprinting.yml +113 -0
- package/data/knowledge/releases/v0.4.0/entries/technique-silent-failure-audit.yml +86 -0
- package/data/knowledge/releases/v0.4.0/entries/technique-ui-api-differential.yml +97 -0
- package/data/knowledge/releases/v0.4.0/release.yml +28 -0
- package/data/knowledge/releases/v0.5.0/entries/technique-config-surface-verification.yml +77 -0
- package/data/knowledge/releases/v0.5.0/entries/technique-derived-value-verification.yml +81 -0
- package/data/knowledge/releases/v0.5.0/entries/technique-expected-behaviour-specification.yml +97 -0
- package/data/knowledge/releases/v0.5.0/entries/technique-presentation-integrity.yml +78 -0
- package/data/knowledge/releases/v0.5.0/entries/technique-release-readiness-verification.yml +110 -0
- package/data/knowledge/releases/v0.5.0/release.yml +33 -0
- 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-backend.yml +123 -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 +99 -0
- package/data/templates/bug-report.md +29 -151
- package/data/templates/coverage-map.md +23 -6
- package/data/templates/expected-behaviour.md +94 -0
- package/data/templates/session-charter.md +3 -0
- package/data/templates/session-report.md +57 -80
- package/dist/cli/index.js +1500 -739
- package/dist/index.d.ts +673 -75
- package/dist/index.js +1664 -270
- package/docs/BACKEND-VERIFICATION.md +307 -0
- package/docs/GETTING-STARTED.md +188 -128
- package/docs/MOBILE-SETUP.md +149 -18
- package/package.json +32 -16
- package/skills/qa-explore/SKILL.md +31 -25
- package/skills/qa-explore/phases/00-setup.md +67 -41
- 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 +50 -26
- 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 +79 -140
- package/skills/qa-explore/references/context-integration.md +1 -1
- package/skills/qa-explore/references/output-contract.md +187 -0
- package/skills/qa-explore/references/paths.md +84 -0
- package/skills/qa-explore/references/playwright-agents-integration.md +61 -84
- package/skills/qa-explore/references/security-rules.md +66 -25
- package/skills/qa-explore/references/severity-guide.md +31 -4
- package/skills/qa-explore-cleanup/SKILL.md +17 -6
- package/skills/qa-explore-feedback/SKILL.md +18 -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 +82 -56
- package/skills/qa-explore-mobile/references/mobile-edges.md +26 -26
- package/skills/qa-explore-quick/SKILL.md +60 -25
- package/skills/qa-explore-report/SKILL.md +40 -34
- package/skills/qa-gather/SKILL.md +17 -2
- package/skills/qa-knowledge-add/SKILL.md +20 -9
- package/skills/qa-knowledge-list/SKILL.md +12 -3
- package/skills/qa-target-setup/SKILL.md +63 -41
- package/skills/qa-verify-backend/SKILL.md +172 -0
- package/skills/qa-verify-backend/phases/00-setup.md +142 -0
- package/skills/qa-verify-backend/phases/01-ac-decomposition.md +58 -0
- package/skills/qa-verify-backend/phases/02-static-review.md +71 -0
- package/skills/qa-verify-backend/phases/03-live-verification.md +62 -0
- package/skills/qa-verify-backend/phases/03b-api-verification.md +170 -0
- package/skills/qa-verify-backend/phases/04-e2e-trigger.md +82 -0
- package/skills/qa-verify-backend/phases/05-reporting.md +163 -0
- package/skills/qa-verify-backend/references/api-probes.md +168 -0
- package/skills/qa-verify-backend/references/aws-readonly-probes.md +156 -0
- package/skills/qa-verify-backend/references/environment-fingerprinting.md +104 -0
- package/skills/qa-verify-backend/references/payload-verification.md +112 -0
- package/skills/qa-verify-backend/references/release-readiness.md +97 -0
- package/skills/qa-verify-backend/references/safety-rules.md +95 -0
- 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
|
@@ -39,6 +39,54 @@ interface SafetyConfig {
|
|
|
39
39
|
no_file_upload?: boolean;
|
|
40
40
|
no_delete_actions?: boolean;
|
|
41
41
|
}
|
|
42
|
+
interface EnvironmentConfig {
|
|
43
|
+
kind: 'dev' | 'ephemeral' | 'staging' | 'production';
|
|
44
|
+
destroyed_automatically?: boolean;
|
|
45
|
+
}
|
|
46
|
+
interface BackendConfig {
|
|
47
|
+
provider?: 'aws';
|
|
48
|
+
/** Env var NAME holding the AWS profile — never the credential itself. */
|
|
49
|
+
aws_profile_env?: string;
|
|
50
|
+
region_env?: string;
|
|
51
|
+
region?: string;
|
|
52
|
+
/** Expected account id; the live lane stops if the caller identity differs. */
|
|
53
|
+
account_id?: string;
|
|
54
|
+
env_suffix?: string;
|
|
55
|
+
/** Logical name -> deployed resource name. Asserted, confirmed before use. */
|
|
56
|
+
resources?: Record<string, string>;
|
|
57
|
+
notes?: string;
|
|
58
|
+
}
|
|
59
|
+
interface ApiSurfaceConfig {
|
|
60
|
+
/** Defaults to the target's base_url when omitted. */
|
|
61
|
+
base_url?: string;
|
|
62
|
+
auth?: 'session-cookie' | 'bearer-env' | 'api-key-env' | 'none';
|
|
63
|
+
/** Env var NAME holding the credential — never the credential itself. */
|
|
64
|
+
token_env?: string;
|
|
65
|
+
/** Header carrying the credential for `api-key-env`. Defaults to `X-Api-Key`. */
|
|
66
|
+
header_name?: string;
|
|
67
|
+
/** Persistent browser profile directory holding the authenticated session. */
|
|
68
|
+
browser_profile?: string;
|
|
69
|
+
/** Endpoint returning the deployed build, used to fingerprint the environment. */
|
|
70
|
+
version_endpoint?: string;
|
|
71
|
+
/** Logical name -> "VERB /path". */
|
|
72
|
+
endpoints?: Record<string, string>;
|
|
73
|
+
/** The only endpoints the read-only API lane may call without asking. */
|
|
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[];
|
|
78
|
+
/** Other target ids to run the same matrix against, for parity comparison. */
|
|
79
|
+
parity_targets?: string[];
|
|
80
|
+
/** Flag name -> where its deployed value is declared for this environment. */
|
|
81
|
+
feature_flags?: Record<string, string>;
|
|
82
|
+
notes?: string;
|
|
83
|
+
}
|
|
84
|
+
interface SourceBranchConfig {
|
|
85
|
+
repo_path: string;
|
|
86
|
+
branch: string;
|
|
87
|
+
base_branch?: string;
|
|
88
|
+
components?: Record<string, string>;
|
|
89
|
+
}
|
|
42
90
|
interface TargetConfig {
|
|
43
91
|
id: string;
|
|
44
92
|
name: string;
|
|
@@ -48,6 +96,10 @@ interface TargetConfig {
|
|
|
48
96
|
browser: BrowserConfig;
|
|
49
97
|
scope: ScopeConfig;
|
|
50
98
|
safety?: SafetyConfig;
|
|
99
|
+
environment?: EnvironmentConfig;
|
|
100
|
+
backend?: BackendConfig;
|
|
101
|
+
api?: ApiSurfaceConfig;
|
|
102
|
+
source?: SourceBranchConfig;
|
|
51
103
|
notes?: string;
|
|
52
104
|
}
|
|
53
105
|
interface MobileDeviceConfig {
|
|
@@ -140,20 +192,26 @@ interface KnowledgeEntry {
|
|
|
140
192
|
content: KnowledgeEntryContent;
|
|
141
193
|
}
|
|
142
194
|
interface Journey {
|
|
143
|
-
id: string;
|
|
144
195
|
name: string;
|
|
145
|
-
description: string;
|
|
146
196
|
steps: string[];
|
|
147
|
-
|
|
197
|
+
}
|
|
198
|
+
interface RiskRanking {
|
|
199
|
+
p0: string[];
|
|
200
|
+
p1: string[];
|
|
201
|
+
p2: string[];
|
|
202
|
+
p3: string[];
|
|
148
203
|
}
|
|
149
204
|
interface DomainConfig {
|
|
150
205
|
id: string;
|
|
151
206
|
name: string;
|
|
152
|
-
risk_ranking:
|
|
207
|
+
risk_ranking: RiskRanking;
|
|
153
208
|
completeness_checklist: string[];
|
|
154
209
|
data_integrity_checks: string[];
|
|
155
210
|
journeys: Journey[];
|
|
156
|
-
|
|
211
|
+
must_test_patterns: Record<string, string[]>;
|
|
212
|
+
common_bugs: string[];
|
|
213
|
+
compliance: string[];
|
|
214
|
+
guidance: string;
|
|
157
215
|
}
|
|
158
216
|
interface SeverityCounts {
|
|
159
217
|
critical: number;
|
|
@@ -169,6 +227,16 @@ interface SessionMetrics {
|
|
|
169
227
|
bugs_found: number;
|
|
170
228
|
severity_counts: SeverityCounts;
|
|
171
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;
|
|
172
240
|
}
|
|
173
241
|
type BugSeverity = 'critical' | 'high' | 'medium' | 'low';
|
|
174
242
|
interface BugReport {
|
|
@@ -207,18 +275,19 @@ declare const AuthConfigSchema: z.ZodObject<{
|
|
|
207
275
|
credentials: z.ZodOptional<z.ZodObject<{
|
|
208
276
|
username: z.ZodString;
|
|
209
277
|
password: z.ZodString;
|
|
210
|
-
}, z.core.$
|
|
278
|
+
}, z.core.$strict>>;
|
|
211
279
|
token: z.ZodOptional<z.ZodString>;
|
|
212
280
|
identity_provider: z.ZodOptional<z.ZodString>;
|
|
213
281
|
static_otp: z.ZodOptional<z.ZodString>;
|
|
214
282
|
test_email_pattern: z.ZodOptional<z.ZodString>;
|
|
215
|
-
|
|
283
|
+
notes: z.ZodOptional<z.ZodString>;
|
|
284
|
+
}, z.core.$strict>;
|
|
216
285
|
declare const BrowserConfigSchema: z.ZodObject<{
|
|
217
286
|
headless: z.ZodBoolean;
|
|
218
287
|
viewport: z.ZodObject<{
|
|
219
288
|
width: z.ZodNumber;
|
|
220
289
|
height: z.ZodNumber;
|
|
221
|
-
}, z.core.$
|
|
290
|
+
}, z.core.$strict>;
|
|
222
291
|
engine: z.ZodOptional<z.ZodEnum<{
|
|
223
292
|
chromium: "chromium";
|
|
224
293
|
webkit: "webkit";
|
|
@@ -226,19 +295,19 @@ declare const BrowserConfigSchema: z.ZodObject<{
|
|
|
226
295
|
}>>;
|
|
227
296
|
channel: z.ZodOptional<z.ZodString>;
|
|
228
297
|
device: z.ZodOptional<z.ZodString>;
|
|
229
|
-
}, z.core.$
|
|
298
|
+
}, z.core.$strict>;
|
|
230
299
|
declare const ScopeConfigSchema: z.ZodObject<{
|
|
231
300
|
start_pages: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
232
301
|
max_depth: z.ZodNumber;
|
|
233
302
|
include_patterns: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
234
303
|
exclude_patterns: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
235
|
-
}, z.core.$
|
|
304
|
+
}, z.core.$strict>;
|
|
236
305
|
declare const SafetyConfigSchema: z.ZodObject<{
|
|
237
306
|
read_only: z.ZodBoolean;
|
|
238
307
|
no_form_submit: z.ZodBoolean;
|
|
239
308
|
no_file_upload: z.ZodOptional<z.ZodBoolean>;
|
|
240
309
|
no_delete_actions: z.ZodOptional<z.ZodBoolean>;
|
|
241
|
-
}, z.core.$
|
|
310
|
+
}, z.core.$strict>;
|
|
242
311
|
declare const WebTargetConfigSchema: z.ZodObject<{
|
|
243
312
|
id: z.ZodString;
|
|
244
313
|
name: z.ZodString;
|
|
@@ -258,18 +327,19 @@ declare const WebTargetConfigSchema: z.ZodObject<{
|
|
|
258
327
|
credentials: z.ZodOptional<z.ZodObject<{
|
|
259
328
|
username: z.ZodString;
|
|
260
329
|
password: z.ZodString;
|
|
261
|
-
}, z.core.$
|
|
330
|
+
}, z.core.$strict>>;
|
|
262
331
|
token: z.ZodOptional<z.ZodString>;
|
|
263
332
|
identity_provider: z.ZodOptional<z.ZodString>;
|
|
264
333
|
static_otp: z.ZodOptional<z.ZodString>;
|
|
265
334
|
test_email_pattern: z.ZodOptional<z.ZodString>;
|
|
266
|
-
|
|
335
|
+
notes: z.ZodOptional<z.ZodString>;
|
|
336
|
+
}, z.core.$strict>;
|
|
267
337
|
browser: z.ZodObject<{
|
|
268
338
|
headless: z.ZodBoolean;
|
|
269
339
|
viewport: z.ZodObject<{
|
|
270
340
|
width: z.ZodNumber;
|
|
271
341
|
height: z.ZodNumber;
|
|
272
|
-
}, z.core.$
|
|
342
|
+
}, z.core.$strict>;
|
|
273
343
|
engine: z.ZodOptional<z.ZodEnum<{
|
|
274
344
|
chromium: "chromium";
|
|
275
345
|
webkit: "webkit";
|
|
@@ -277,47 +347,93 @@ declare const WebTargetConfigSchema: z.ZodObject<{
|
|
|
277
347
|
}>>;
|
|
278
348
|
channel: z.ZodOptional<z.ZodString>;
|
|
279
349
|
device: z.ZodOptional<z.ZodString>;
|
|
280
|
-
}, z.core.$
|
|
350
|
+
}, z.core.$strict>;
|
|
281
351
|
scope: z.ZodObject<{
|
|
282
352
|
start_pages: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
283
353
|
max_depth: z.ZodNumber;
|
|
284
354
|
include_patterns: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
285
355
|
exclude_patterns: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
286
|
-
}, z.core.$
|
|
356
|
+
}, z.core.$strict>;
|
|
287
357
|
safety: z.ZodOptional<z.ZodObject<{
|
|
288
358
|
read_only: z.ZodBoolean;
|
|
289
359
|
no_form_submit: z.ZodBoolean;
|
|
290
360
|
no_file_upload: z.ZodOptional<z.ZodBoolean>;
|
|
291
361
|
no_delete_actions: z.ZodOptional<z.ZodBoolean>;
|
|
292
|
-
}, z.core.$
|
|
362
|
+
}, z.core.$strict>>;
|
|
363
|
+
environment: z.ZodOptional<z.ZodObject<{
|
|
364
|
+
kind: z.ZodEnum<{
|
|
365
|
+
dev: "dev";
|
|
366
|
+
ephemeral: "ephemeral";
|
|
367
|
+
staging: "staging";
|
|
368
|
+
production: "production";
|
|
369
|
+
}>;
|
|
370
|
+
destroyed_automatically: z.ZodOptional<z.ZodBoolean>;
|
|
371
|
+
}, z.core.$strict>>;
|
|
372
|
+
backend: z.ZodOptional<z.ZodObject<{
|
|
373
|
+
provider: z.ZodOptional<z.ZodEnum<{
|
|
374
|
+
aws: "aws";
|
|
375
|
+
}>>;
|
|
376
|
+
aws_profile_env: z.ZodOptional<z.ZodString>;
|
|
377
|
+
region_env: z.ZodOptional<z.ZodString>;
|
|
378
|
+
region: z.ZodOptional<z.ZodString>;
|
|
379
|
+
account_id: z.ZodOptional<z.ZodString>;
|
|
380
|
+
env_suffix: z.ZodOptional<z.ZodString>;
|
|
381
|
+
resources: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
382
|
+
notes: z.ZodOptional<z.ZodString>;
|
|
383
|
+
}, z.core.$strict>>;
|
|
384
|
+
api: z.ZodOptional<z.ZodObject<{
|
|
385
|
+
base_url: z.ZodOptional<z.ZodString>;
|
|
386
|
+
auth: z.ZodOptional<z.ZodEnum<{
|
|
387
|
+
none: "none";
|
|
388
|
+
"session-cookie": "session-cookie";
|
|
389
|
+
"bearer-env": "bearer-env";
|
|
390
|
+
"api-key-env": "api-key-env";
|
|
391
|
+
}>>;
|
|
392
|
+
token_env: z.ZodOptional<z.ZodString>;
|
|
393
|
+
header_name: z.ZodOptional<z.ZodString>;
|
|
394
|
+
browser_profile: z.ZodOptional<z.ZodString>;
|
|
395
|
+
version_endpoint: z.ZodOptional<z.ZodString>;
|
|
396
|
+
endpoints: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
397
|
+
probe_allowlist: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
398
|
+
write_allowlist: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
399
|
+
parity_targets: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
400
|
+
feature_flags: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
401
|
+
notes: z.ZodOptional<z.ZodString>;
|
|
402
|
+
}, z.core.$strict>>;
|
|
403
|
+
source: z.ZodOptional<z.ZodObject<{
|
|
404
|
+
repo_path: z.ZodString;
|
|
405
|
+
branch: z.ZodString;
|
|
406
|
+
base_branch: z.ZodOptional<z.ZodString>;
|
|
407
|
+
components: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
408
|
+
}, z.core.$strict>>;
|
|
293
409
|
notes: z.ZodOptional<z.ZodString>;
|
|
294
|
-
}, z.core.$
|
|
410
|
+
}, z.core.$strict>;
|
|
295
411
|
declare const MobileDeviceConfigSchema: z.ZodObject<{
|
|
296
412
|
name: z.ZodOptional<z.ZodString>;
|
|
297
413
|
udid: z.ZodOptional<z.ZodString>;
|
|
298
414
|
avd: z.ZodOptional<z.ZodString>;
|
|
299
415
|
serial: z.ZodOptional<z.ZodString>;
|
|
300
|
-
}, z.core.$
|
|
416
|
+
}, z.core.$strict>;
|
|
301
417
|
declare const MobileAppConfigSchema: z.ZodObject<{
|
|
302
418
|
bundle_id: z.ZodOptional<z.ZodString>;
|
|
303
419
|
package: z.ZodOptional<z.ZodString>;
|
|
304
420
|
app_paths: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
305
421
|
apk_paths: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
306
|
-
}, z.core.$
|
|
422
|
+
}, z.core.$strict>;
|
|
307
423
|
declare const MobileWebConfigSchema: z.ZodObject<{
|
|
308
424
|
base_url: z.ZodString;
|
|
309
425
|
start_url: z.ZodOptional<z.ZodString>;
|
|
310
|
-
}, z.core.$
|
|
426
|
+
}, z.core.$strict>;
|
|
311
427
|
declare const SourceRepoConfigSchema: z.ZodObject<{
|
|
312
428
|
path: z.ZodString;
|
|
313
429
|
build_commands: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
314
|
-
}, z.core.$
|
|
430
|
+
}, z.core.$strict>;
|
|
315
431
|
declare const MobileScopeConfigSchema: z.ZodObject<{
|
|
316
432
|
start_screen: z.ZodOptional<z.ZodString>;
|
|
317
433
|
start_url: z.ZodOptional<z.ZodString>;
|
|
318
434
|
include_patterns: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
319
435
|
exclude_patterns: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
320
|
-
}, z.core.$
|
|
436
|
+
}, z.core.$strict>;
|
|
321
437
|
declare const MobileTargetConfigSchema: z.ZodObject<{
|
|
322
438
|
id: z.ZodString;
|
|
323
439
|
name: z.ZodString;
|
|
@@ -331,17 +447,17 @@ declare const MobileTargetConfigSchema: z.ZodObject<{
|
|
|
331
447
|
udid: z.ZodOptional<z.ZodString>;
|
|
332
448
|
avd: z.ZodOptional<z.ZodString>;
|
|
333
449
|
serial: z.ZodOptional<z.ZodString>;
|
|
334
|
-
}, z.core.$
|
|
450
|
+
}, z.core.$strict>;
|
|
335
451
|
app: z.ZodObject<{
|
|
336
452
|
bundle_id: z.ZodOptional<z.ZodString>;
|
|
337
453
|
package: z.ZodOptional<z.ZodString>;
|
|
338
454
|
app_paths: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
339
455
|
apk_paths: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
340
|
-
}, z.core.$
|
|
456
|
+
}, z.core.$strict>;
|
|
341
457
|
web: z.ZodOptional<z.ZodObject<{
|
|
342
458
|
base_url: z.ZodString;
|
|
343
459
|
start_url: z.ZodOptional<z.ZodString>;
|
|
344
|
-
}, z.core.$
|
|
460
|
+
}, z.core.$strict>>;
|
|
345
461
|
auth: z.ZodObject<{
|
|
346
462
|
strategy: z.ZodEnum<{
|
|
347
463
|
none: "none";
|
|
@@ -356,31 +472,160 @@ declare const MobileTargetConfigSchema: z.ZodObject<{
|
|
|
356
472
|
credentials: z.ZodOptional<z.ZodObject<{
|
|
357
473
|
username: z.ZodString;
|
|
358
474
|
password: z.ZodString;
|
|
359
|
-
}, z.core.$
|
|
475
|
+
}, z.core.$strict>>;
|
|
360
476
|
token: z.ZodOptional<z.ZodString>;
|
|
361
477
|
identity_provider: z.ZodOptional<z.ZodString>;
|
|
362
478
|
static_otp: z.ZodOptional<z.ZodString>;
|
|
363
479
|
test_email_pattern: z.ZodOptional<z.ZodString>;
|
|
364
|
-
|
|
480
|
+
notes: z.ZodOptional<z.ZodString>;
|
|
481
|
+
}, z.core.$strict>;
|
|
365
482
|
scope: z.ZodOptional<z.ZodObject<{
|
|
366
483
|
start_screen: z.ZodOptional<z.ZodString>;
|
|
367
484
|
start_url: z.ZodOptional<z.ZodString>;
|
|
368
485
|
include_patterns: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
369
486
|
exclude_patterns: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
370
|
-
}, z.core.$
|
|
487
|
+
}, z.core.$strict>>;
|
|
371
488
|
safety: z.ZodOptional<z.ZodObject<{
|
|
372
489
|
read_only: z.ZodBoolean;
|
|
373
490
|
no_form_submit: z.ZodBoolean;
|
|
374
491
|
no_file_upload: z.ZodOptional<z.ZodBoolean>;
|
|
375
492
|
no_delete_actions: z.ZodOptional<z.ZodBoolean>;
|
|
376
|
-
}, z.core.$
|
|
493
|
+
}, z.core.$strict>>;
|
|
377
494
|
source_repo: z.ZodOptional<z.ZodObject<{
|
|
378
495
|
path: z.ZodString;
|
|
379
496
|
build_commands: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
380
|
-
}, z.core.$
|
|
497
|
+
}, z.core.$strict>>;
|
|
381
498
|
notes: z.ZodOptional<z.ZodString>;
|
|
382
|
-
}, z.core.$
|
|
383
|
-
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>>;
|
|
384
629
|
|
|
385
630
|
declare const KnowledgeEntryContentSchema: z.ZodObject<{
|
|
386
631
|
summary: z.ZodString;
|
|
@@ -470,35 +715,29 @@ declare const KnowledgeManifestSchema: z.ZodObject<{
|
|
|
470
715
|
}, z.core.$strip>;
|
|
471
716
|
|
|
472
717
|
declare const JourneySchema: z.ZodObject<{
|
|
473
|
-
id: z.ZodString;
|
|
474
718
|
name: z.ZodString;
|
|
475
|
-
description: z.ZodString;
|
|
476
719
|
steps: z.ZodArray<z.ZodString>;
|
|
477
|
-
|
|
478
|
-
high: "high";
|
|
479
|
-
medium: "medium";
|
|
480
|
-
low: "low";
|
|
481
|
-
}>;
|
|
482
|
-
}, z.core.$strip>;
|
|
720
|
+
}, z.core.$strict>;
|
|
483
721
|
declare const DomainConfigSchema: z.ZodObject<{
|
|
484
722
|
id: z.ZodString;
|
|
485
723
|
name: z.ZodString;
|
|
486
|
-
risk_ranking: z.
|
|
724
|
+
risk_ranking: z.ZodObject<{
|
|
725
|
+
p0: z.ZodArray<z.ZodString>;
|
|
726
|
+
p1: z.ZodArray<z.ZodString>;
|
|
727
|
+
p2: z.ZodArray<z.ZodString>;
|
|
728
|
+
p3: z.ZodArray<z.ZodString>;
|
|
729
|
+
}, z.core.$strict>;
|
|
487
730
|
completeness_checklist: z.ZodArray<z.ZodString>;
|
|
488
731
|
data_integrity_checks: z.ZodArray<z.ZodString>;
|
|
489
732
|
journeys: z.ZodArray<z.ZodObject<{
|
|
490
|
-
id: z.ZodString;
|
|
491
733
|
name: z.ZodString;
|
|
492
|
-
description: z.ZodString;
|
|
493
734
|
steps: z.ZodArray<z.ZodString>;
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
guidance: z.ZodArray<z.ZodString>;
|
|
501
|
-
}, z.core.$strip>;
|
|
735
|
+
}, z.core.$strict>>;
|
|
736
|
+
must_test_patterns: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString>>;
|
|
737
|
+
common_bugs: z.ZodArray<z.ZodString>;
|
|
738
|
+
compliance: z.ZodArray<z.ZodString>;
|
|
739
|
+
guidance: z.ZodString;
|
|
740
|
+
}, z.core.$strict>;
|
|
502
741
|
|
|
503
742
|
declare const SeverityCountsSchema: z.ZodObject<{
|
|
504
743
|
critical: z.ZodNumber;
|
|
@@ -506,6 +745,11 @@ declare const SeverityCountsSchema: z.ZodObject<{
|
|
|
506
745
|
medium: z.ZodNumber;
|
|
507
746
|
low: z.ZodNumber;
|
|
508
747
|
}, z.core.$strip>;
|
|
748
|
+
/**
|
|
749
|
+
* Canonical shape of a session's `stats.json`. The first block is required
|
|
750
|
+
* (and is what `metrics.jsonl` records); the rest is optional context a
|
|
751
|
+
* session skill may add.
|
|
752
|
+
*/
|
|
509
753
|
declare const SessionMetricsSchema: z.ZodObject<{
|
|
510
754
|
session_id: z.ZodString;
|
|
511
755
|
target: z.ZodString;
|
|
@@ -519,29 +763,96 @@ declare const SessionMetricsSchema: z.ZodObject<{
|
|
|
519
763
|
low: z.ZodNumber;
|
|
520
764
|
}, z.core.$strip>;
|
|
521
765
|
pages_explored: z.ZodNumber;
|
|
766
|
+
kind: z.ZodOptional<z.ZodEnum<{
|
|
767
|
+
explore: "explore";
|
|
768
|
+
quick: "quick";
|
|
769
|
+
mobile: "mobile";
|
|
770
|
+
backend: "backend";
|
|
771
|
+
}>>;
|
|
772
|
+
domain: z.ZodOptional<z.ZodString>;
|
|
773
|
+
started_at: z.ZodOptional<z.ZodString>;
|
|
774
|
+
completed_at: z.ZodOptional<z.ZodString>;
|
|
775
|
+
phases_completed: z.ZodOptional<z.ZodNumber>;
|
|
776
|
+
total_phases: z.ZodOptional<z.ZodNumber>;
|
|
777
|
+
coverage: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
778
|
+
evidence: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
779
|
+
areas_not_tested: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
780
|
+
blocked_by: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
522
781
|
}, z.core.$strip>;
|
|
523
782
|
|
|
783
|
+
declare const KnowledgeReleaseSchema: z.ZodObject<{
|
|
784
|
+
version: z.ZodString;
|
|
785
|
+
date: z.ZodString;
|
|
786
|
+
author: z.ZodString;
|
|
787
|
+
status: z.ZodEnum<{
|
|
788
|
+
active: "active";
|
|
789
|
+
deprecated: "deprecated";
|
|
790
|
+
}>;
|
|
791
|
+
notes: z.ZodString;
|
|
792
|
+
entry_count: z.ZodNumber;
|
|
793
|
+
entries: z.ZodArray<z.ZodString>;
|
|
794
|
+
}, z.core.$strict>;
|
|
795
|
+
|
|
796
|
+
/** Schema for `data/knowledge/changelog.yml`. */
|
|
797
|
+
declare const KnowledgeChangelogSchema: z.ZodObject<{
|
|
798
|
+
releases: z.ZodArray<z.ZodObject<{
|
|
799
|
+
version: z.ZodString;
|
|
800
|
+
date: z.ZodString;
|
|
801
|
+
summary: z.ZodString;
|
|
802
|
+
entries_added: z.ZodArray<z.ZodObject<{
|
|
803
|
+
id: z.ZodString;
|
|
804
|
+
type: z.ZodEnum<{
|
|
805
|
+
heuristic: "heuristic";
|
|
806
|
+
technique: "technique";
|
|
807
|
+
checklist: "checklist";
|
|
808
|
+
reference: "reference";
|
|
809
|
+
}>;
|
|
810
|
+
name: z.ZodString;
|
|
811
|
+
description: z.ZodString;
|
|
812
|
+
}, z.core.$strict>>;
|
|
813
|
+
entries_modified: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
814
|
+
entries_removed: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
815
|
+
origin: z.ZodOptional<z.ZodString>;
|
|
816
|
+
}, z.core.$strict>>;
|
|
817
|
+
}, z.core.$strict>;
|
|
818
|
+
|
|
524
819
|
/**
|
|
525
|
-
* Credential and secret redaction
|
|
526
|
-
*
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
*
|
|
530
|
-
*
|
|
820
|
+
* Credential and secret redaction.
|
|
821
|
+
*
|
|
822
|
+
* Applied to every report and bug field before it is written to disk or handed
|
|
823
|
+
* to a formatter. Patterns are ordered specific-first. Key/value patterns
|
|
824
|
+
* require an actual `=` or `:` operator so ordinary prose ("Password field
|
|
825
|
+
* accepts…", "the secret sauce") is left intact; card numbers are only redacted
|
|
826
|
+
* when they pass a Luhn check, so millisecond timestamps and order ids survive.
|
|
531
827
|
*/
|
|
532
|
-
|
|
828
|
+
interface RedactOptions {
|
|
829
|
+
emails?: boolean;
|
|
830
|
+
}
|
|
831
|
+
/** Redacts secrets, returning the cleaned text and which categories fired. */
|
|
832
|
+
declare function redact(text: string, opts?: RedactOptions): {
|
|
533
833
|
text: string;
|
|
534
834
|
redactions: string[];
|
|
535
835
|
};
|
|
536
|
-
/**
|
|
537
|
-
* Checks whether the text contains any detectable secrets.
|
|
538
|
-
*/
|
|
836
|
+
/** True when the text contains any detectable secret. */
|
|
539
837
|
declare function containsSecrets(text: string): boolean;
|
|
838
|
+
declare const REDACTION_CATEGORIES: string[];
|
|
540
839
|
|
|
541
840
|
declare function validateTargetConfig(filePath: string): ValidationResult;
|
|
542
841
|
declare function validateKnowledgeEntry(filePath: string): ValidationResult;
|
|
543
842
|
declare function validateDomainConfig(filePath: string): ValidationResult;
|
|
544
|
-
|
|
843
|
+
/**
|
|
844
|
+
* Cross-checks the whole knowledge base: manifest, releases, changelog, and the
|
|
845
|
+
* consistency between the registry, the entry files and the computed stats.
|
|
846
|
+
*/
|
|
847
|
+
declare function validateKnowledgeBase(dataDir: string): ValidationResult[];
|
|
848
|
+
/**
|
|
849
|
+
* Validates every config file under `dataDir` (targets, domains, knowledge
|
|
850
|
+
* entries and the knowledge-base cross-check). Also validates a project-local
|
|
851
|
+
* `qa/target.yml` when `cwd` is given and the file exists.
|
|
852
|
+
*/
|
|
853
|
+
declare function validateAllConfigs(dataDir: string, opts?: {
|
|
854
|
+
cwd?: string;
|
|
855
|
+
}): ValidationResult[];
|
|
545
856
|
|
|
546
857
|
/**
|
|
547
858
|
* Appends a single session metrics record to the JSONL file.
|
|
@@ -553,6 +864,163 @@ declare function appendSessionMetrics(outputDir: string, metrics: SessionMetrics
|
|
|
553
864
|
* Returns an empty array if the file does not exist or is empty.
|
|
554
865
|
*/
|
|
555
866
|
declare function readAllMetrics(outputDir: string): SessionMetrics[];
|
|
867
|
+
/** Appends metrics only when the session_id has not been recorded yet. */
|
|
868
|
+
declare function appendSessionMetricsDeduped(outputDir: string, metrics: SessionMetrics): boolean;
|
|
869
|
+
|
|
870
|
+
/**
|
|
871
|
+
* Session directory naming — the single scheme used by every session skill,
|
|
872
|
+
* the `explore` CLI command, the report resolver and the list command.
|
|
873
|
+
*
|
|
874
|
+
* Scheme: output/sessions/<YYYY-MM-DD-HHmm>-<kind>-<slug>/
|
|
875
|
+
* Date-first so a lexicographic sort is chronological.
|
|
876
|
+
*/
|
|
877
|
+
declare const SESSION_KINDS: readonly ["explore", "quick", "mobile", "backend"];
|
|
878
|
+
type SessionKind = (typeof SESSION_KINDS)[number];
|
|
879
|
+
declare const SESSION_DIR_RE: RegExp;
|
|
880
|
+
/**
|
|
881
|
+
* Turns an arbitrary target id, ticket or URL into a filesystem-safe slug:
|
|
882
|
+
* lowercase, alphanumerics and single dashes, no leading/trailing dash,
|
|
883
|
+
* capped at 40 chars. A full URL is reduced to its hostname first.
|
|
884
|
+
*/
|
|
885
|
+
declare function slugify(input: string): string;
|
|
886
|
+
/** `2026-09-08-1813` for the given date (local time). */
|
|
887
|
+
declare function sessionTimestamp(date?: Date): string;
|
|
888
|
+
/** Full session directory name, e.g. `2026-09-08-1813-explore-parabank`. */
|
|
889
|
+
declare function sessionDirName(kind: SessionKind, target: string, date?: Date): string;
|
|
890
|
+
interface ParsedSessionDir {
|
|
891
|
+
timestamp: string;
|
|
892
|
+
kind: SessionKind;
|
|
893
|
+
slug: string;
|
|
894
|
+
}
|
|
895
|
+
/** Parses a directory name back into its parts, or null if it does not match. */
|
|
896
|
+
declare function parseSessionDirName(name: string): ParsedSessionDir | null;
|
|
897
|
+
|
|
898
|
+
/**
|
|
899
|
+
* Minimal GitHub-flavoured-markdown table parser.
|
|
900
|
+
*
|
|
901
|
+
* Splits pipe-delimited rows and drops only the leading/trailing empty cells
|
|
902
|
+
* produced by the outer pipes — internal empty cells are preserved, so column
|
|
903
|
+
* indices stay aligned even when a cell is blank.
|
|
904
|
+
*/
|
|
905
|
+
interface ParsedTable {
|
|
906
|
+
headers: string[];
|
|
907
|
+
rows: Record<string, string>[];
|
|
908
|
+
}
|
|
909
|
+
/**
|
|
910
|
+
* Finds the first markdown table under a heading matching `headingPrefix`
|
|
911
|
+
* (case-insensitive, matched at the start of the heading text), or the first
|
|
912
|
+
* table in the document when no prefix is given. Returns null if none.
|
|
913
|
+
*
|
|
914
|
+
* Header cells are matched case-insensitively; the returned row objects are
|
|
915
|
+
* keyed by the lower-cased header name.
|
|
916
|
+
*/
|
|
917
|
+
declare function parseMarkdownTable(md: string, opts?: {
|
|
918
|
+
headingPrefix?: string;
|
|
919
|
+
}): ParsedTable | null;
|
|
920
|
+
|
|
921
|
+
/**
|
|
922
|
+
* The single confidentiality header used on every generated artefact
|
|
923
|
+
* (templates, session reports, formatter output).
|
|
924
|
+
*/
|
|
925
|
+
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."];
|
|
926
|
+
/** Markdown blockquote form, e.g. for the top of a `.md` artefact. */
|
|
927
|
+
declare const CONFIDENTIALITY_HEADER_MD: string;
|
|
928
|
+
/** Plain one-line form, e.g. for an HTML banner or a CSV/JSON note. */
|
|
929
|
+
declare const CONFIDENTIALITY_NOTICE: string;
|
|
930
|
+
/** True when `text` already begins (ignoring blank lines) with the header. */
|
|
931
|
+
declare function hasConfidentialityHeader(text: string): boolean;
|
|
932
|
+
|
|
933
|
+
/**
|
|
934
|
+
* Canonical headers for the session index and consolidated bug list, shared by
|
|
935
|
+
* `qualiow init` (which writes them) and `qualiow list` (which reads them).
|
|
936
|
+
*/
|
|
937
|
+
declare const INDEX_COLUMNS: readonly ["Date", "Kind", "Target", "Bugs", "Duration", "Status", "Report"];
|
|
938
|
+
declare const ALL_BUGS_COLUMNS: readonly ["ID", "Session", "Title", "Severity", "Status", "Report"];
|
|
939
|
+
declare const INDEX_MD_HEADER: string;
|
|
940
|
+
declare const ALL_BUGS_MD_HEADER: string;
|
|
941
|
+
|
|
942
|
+
/**
|
|
943
|
+
* .gitignore merge for `qualiow init`.
|
|
944
|
+
*
|
|
945
|
+
* Adds the Qualiow ignore block by exact-line comparison (so an unrelated
|
|
946
|
+
* substring like `.env.example` never suppresses `.env`), writes the section
|
|
947
|
+
* header at most once, and is idempotent: a second run adds nothing.
|
|
948
|
+
*/
|
|
949
|
+
declare const QUALIOW_GITIGNORE_HEADER = "# Qualiow";
|
|
950
|
+
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"];
|
|
951
|
+
/**
|
|
952
|
+
* Returns the new .gitignore content, or null when nothing needs adding.
|
|
953
|
+
* Compares against existing lines exactly (trimmed of trailing whitespace).
|
|
954
|
+
*/
|
|
955
|
+
declare function mergeGitignore(existing: string): string | null;
|
|
956
|
+
|
|
957
|
+
/**
|
|
958
|
+
* Path resolution shared by the CLI commands.
|
|
959
|
+
*
|
|
960
|
+
* The package root is where `data/` and `package.json` live — the git checkout
|
|
961
|
+
* in development, or `node_modules/qualiow-exploratory-testing/` when installed.
|
|
962
|
+
*/
|
|
963
|
+
/** Walk up from the built file looking for a dir with data/ and package.json. */
|
|
964
|
+
declare function getPackageRoot(): string;
|
|
965
|
+
/** The `version` field of the package's own package.json (or "0.0.0"). */
|
|
966
|
+
declare function getPackageVersion(pkgRoot?: string): string;
|
|
967
|
+
/** Where `init` copies skills from: the published `skills/` tree, or the
|
|
968
|
+
* canonical `.claude/skills/` in a git checkout. */
|
|
969
|
+
declare function resolveSkillsSource(pkgRoot: string): string | null;
|
|
970
|
+
/**
|
|
971
|
+
* Resolve a target config path. With a name: `data/targets/<name>.yml` under
|
|
972
|
+
* cwd, else under the package root. Without a name: a project-local
|
|
973
|
+
* `qa/target.yml`, else `data/targets/_default.yml`. Returns the first path
|
|
974
|
+
* that exists, or the most-specific candidate when none exist (so callers can
|
|
975
|
+
* report a useful "not found").
|
|
976
|
+
*/
|
|
977
|
+
declare function resolveTargetPath(cwd: string, name: string | undefined, pkgRoot?: string): string;
|
|
978
|
+
/** Resolve a domain config, trying `<id>.yml` then `_<id>.yml`. */
|
|
979
|
+
declare function resolveDomainPath(dataDir: string, id: string): string;
|
|
980
|
+
|
|
981
|
+
/**
|
|
982
|
+
* Knowledge-base manifest synchronisation.
|
|
983
|
+
*
|
|
984
|
+
* Rebuilds the manifest `entries:` registry and `stats:` from the release
|
|
985
|
+
* directories on disk, so the manifest can never drift from the files. Other
|
|
986
|
+
* manifest nodes (version, active_releases, loading_strategy) and the file's
|
|
987
|
+
* comments are preserved.
|
|
988
|
+
*/
|
|
989
|
+
interface RegistryEntry {
|
|
990
|
+
id: string;
|
|
991
|
+
file: string;
|
|
992
|
+
type: string;
|
|
993
|
+
priority: string;
|
|
994
|
+
tags: string[];
|
|
995
|
+
domains: string[];
|
|
996
|
+
}
|
|
997
|
+
interface ManifestStats {
|
|
998
|
+
total_entries: number;
|
|
999
|
+
heuristics: number;
|
|
1000
|
+
techniques: number;
|
|
1001
|
+
checklists: number;
|
|
1002
|
+
references: number;
|
|
1003
|
+
domain_profiles: number;
|
|
1004
|
+
custom_entries: number;
|
|
1005
|
+
}
|
|
1006
|
+
/** Sorted list of release dir names (v0.1.0 < v0.2.0 …). */
|
|
1007
|
+
declare function listReleaseDirs(knowledgeDir: string): string[];
|
|
1008
|
+
/** Builds the registry array from the entry files, release order then id. */
|
|
1009
|
+
declare function buildManifestRegistry(dataDir: string): RegistryEntry[];
|
|
1010
|
+
/** Computes stats from the registry, the domain files and the custom dir. */
|
|
1011
|
+
declare function computeStats(dataDir: string, registry: RegistryEntry[]): ManifestStats;
|
|
1012
|
+
interface SyncResult {
|
|
1013
|
+
changed: boolean;
|
|
1014
|
+
stats: ManifestStats;
|
|
1015
|
+
entryCount: number;
|
|
1016
|
+
}
|
|
1017
|
+
/**
|
|
1018
|
+
* Rewrites (or, with `check`, only compares) the manifest's `entries` and
|
|
1019
|
+
* `stats` from disk. Returns whether the on-disk manifest was already in sync.
|
|
1020
|
+
*/
|
|
1021
|
+
declare function syncKnowledgeManifest(dataDir: string, opts?: {
|
|
1022
|
+
check?: boolean;
|
|
1023
|
+
}): SyncResult;
|
|
556
1024
|
|
|
557
1025
|
/**
|
|
558
1026
|
* Session and bug report parser.
|
|
@@ -563,15 +1031,22 @@ interface ParsedBug {
|
|
|
563
1031
|
id: string;
|
|
564
1032
|
title: string;
|
|
565
1033
|
severity: 'critical' | 'high' | 'medium' | 'low';
|
|
1034
|
+
priority: string;
|
|
566
1035
|
component: string;
|
|
567
1036
|
url: string;
|
|
1037
|
+
environment: string;
|
|
1038
|
+
reproduction_rate: string;
|
|
1039
|
+
summary: string;
|
|
568
1040
|
expected: string;
|
|
569
1041
|
actual: string;
|
|
570
1042
|
steps: string[];
|
|
571
1043
|
business_impact: string;
|
|
572
1044
|
evidence: {
|
|
573
1045
|
screenshots: string[];
|
|
1046
|
+
videos: string[];
|
|
1047
|
+
logs: string[];
|
|
574
1048
|
console_errors: string[];
|
|
1049
|
+
network_failures: string[];
|
|
575
1050
|
};
|
|
576
1051
|
}
|
|
577
1052
|
interface ParsedSession {
|
|
@@ -606,27 +1081,150 @@ declare function generateHtmlReport(sessionDir: string): Promise<string>;
|
|
|
606
1081
|
|
|
607
1082
|
/**
|
|
608
1083
|
* JSON report generator.
|
|
609
|
-
* Produces structured JSON from session data for programmatic
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
* Generates a structured JSON report from a session directory.
|
|
1084
|
+
* Produces structured, redacted JSON from session data for programmatic
|
|
1085
|
+
* consumption. Carries a classification block so downstream tooling can
|
|
1086
|
+
* honour the confidentiality of the content.
|
|
613
1087
|
*/
|
|
1088
|
+
/** Generates a structured, redacted JSON report from a session directory. */
|
|
614
1089
|
declare function generateJsonReport(sessionDir: string): Promise<object>;
|
|
615
1090
|
|
|
616
1091
|
/**
|
|
617
1092
|
* Jira CSV export generator.
|
|
618
|
-
* Produces a CSV file importable via Jira bulk import.
|
|
1093
|
+
* Produces a CSV file importable via Jira bulk import. Every field is redacted
|
|
1094
|
+
* and formula-neutralised before it is written.
|
|
1095
|
+
*/
|
|
1096
|
+
/**
|
|
1097
|
+
* Escapes a value for a CSV field: always quoted, internal quotes doubled,
|
|
1098
|
+
* and a leading `= + - @ \t \r` neutralised with an apostrophe so the cell
|
|
1099
|
+
* is never evaluated as a formula when the file is opened in a spreadsheet.
|
|
619
1100
|
*/
|
|
1101
|
+
declare function csvEscape(value: string): string;
|
|
620
1102
|
/**
|
|
621
1103
|
* Generates a CSV string importable by Jira bulk import from a session directory.
|
|
622
1104
|
*
|
|
623
|
-
*
|
|
624
|
-
* - Summary: bug title
|
|
625
|
-
* - Priority: mapped from severity
|
|
626
|
-
* - Description: steps + business impact formatted in Jira wiki markup
|
|
627
|
-
* - Component: from bug component field
|
|
628
|
-
* - Labels: qualiow, exploratory-testing, domain
|
|
1105
|
+
* Columns: Summary, Priority, Description, Component, Labels.
|
|
629
1106
|
*/
|
|
630
1107
|
declare function generateJiraExport(sessionDir: string): Promise<string>;
|
|
631
1108
|
|
|
632
|
-
|
|
1109
|
+
/**
|
|
1110
|
+
* Markdown summary generator for `qualiow report -f md`.
|
|
1111
|
+
* Produces a short, redacted `session-summary.md` next to the session report
|
|
1112
|
+
* (never overwriting `session-report.md`).
|
|
1113
|
+
*/
|
|
1114
|
+
declare function generateMarkdownSummary(sessionDir: string): Promise<string>;
|
|
1115
|
+
|
|
1116
|
+
/**
|
|
1117
|
+
* Shared report-extraction helpers used by the HTML and JSON formatters.
|
|
1118
|
+
* Everything user-authored (the report body and every bug field) is redacted
|
|
1119
|
+
* on the way out.
|
|
1120
|
+
*/
|
|
1121
|
+
|
|
1122
|
+
interface ReportMeta {
|
|
1123
|
+
target: string;
|
|
1124
|
+
date: string;
|
|
1125
|
+
duration: string;
|
|
1126
|
+
sessionId: string;
|
|
1127
|
+
summary: string;
|
|
1128
|
+
}
|
|
1129
|
+
interface CoverageEntry {
|
|
1130
|
+
area: string;
|
|
1131
|
+
risk: string;
|
|
1132
|
+
status: string;
|
|
1133
|
+
bugsFound: string;
|
|
1134
|
+
notes: string;
|
|
1135
|
+
}
|
|
1136
|
+
/** Loads a session and redacts its report body and every bug. */
|
|
1137
|
+
declare function loadSessionForOutput(sessionDir: string): Promise<{
|
|
1138
|
+
session: ParsedSession;
|
|
1139
|
+
report: string;
|
|
1140
|
+
}>;
|
|
1141
|
+
declare function extractReportMeta(report: string, sessionId: string): ReportMeta;
|
|
1142
|
+
/**
|
|
1143
|
+
* Extracts the coverage-map table. Accepts the canonical header
|
|
1144
|
+
* `| Area | Risk | Status | Bugs | Notes |` and the legacy `| Area | Status |`.
|
|
1145
|
+
*/
|
|
1146
|
+
declare function extractCoverage(report: string): CoverageEntry[];
|
|
1147
|
+
declare function extractListSection(report: string, heading: string): string[];
|
|
1148
|
+
|
|
1149
|
+
interface InitOptions {
|
|
1150
|
+
includeExamples: boolean;
|
|
1151
|
+
force: boolean;
|
|
1152
|
+
dryRun: boolean;
|
|
1153
|
+
}
|
|
1154
|
+
type CopyStatus = 'installed' | 'unchanged' | 'overwritten' | 'skipped';
|
|
1155
|
+
interface CopyRecord {
|
|
1156
|
+
dest: string;
|
|
1157
|
+
status: CopyStatus;
|
|
1158
|
+
}
|
|
1159
|
+
interface InitResult {
|
|
1160
|
+
copies: CopyRecord[];
|
|
1161
|
+
createdDirs: string[];
|
|
1162
|
+
createdFiles: string[];
|
|
1163
|
+
gitignoreUpdated: boolean;
|
|
1164
|
+
}
|
|
1165
|
+
declare function runInit(options: InitOptions, ctx: {
|
|
1166
|
+
cwd: string;
|
|
1167
|
+
pkgRoot?: string;
|
|
1168
|
+
log?: (line: string) => void;
|
|
1169
|
+
}): Promise<InitResult>;
|
|
1170
|
+
|
|
1171
|
+
interface ExploreOptions {
|
|
1172
|
+
target?: string;
|
|
1173
|
+
context?: string;
|
|
1174
|
+
timeBox: string;
|
|
1175
|
+
dryRun: boolean;
|
|
1176
|
+
}
|
|
1177
|
+
declare function parseTimeBox(value: string): number;
|
|
1178
|
+
declare function runExplore(url: string | undefined, options: ExploreOptions, ctx: {
|
|
1179
|
+
cwd: string;
|
|
1180
|
+
now?: Date;
|
|
1181
|
+
log?: (line: string) => void;
|
|
1182
|
+
}): Promise<{
|
|
1183
|
+
sessionDir: string;
|
|
1184
|
+
}>;
|
|
1185
|
+
|
|
1186
|
+
interface ReportOptions {
|
|
1187
|
+
session: string;
|
|
1188
|
+
format: string;
|
|
1189
|
+
output?: string;
|
|
1190
|
+
stdout: boolean;
|
|
1191
|
+
}
|
|
1192
|
+
declare function runReport(options: ReportOptions, ctx: {
|
|
1193
|
+
cwd: string;
|
|
1194
|
+
log?: (line: string) => void;
|
|
1195
|
+
}): Promise<{
|
|
1196
|
+
outputPath?: string;
|
|
1197
|
+
content: string;
|
|
1198
|
+
}>;
|
|
1199
|
+
/**
|
|
1200
|
+
* Resolves `latest`, an exact directory name, or a unique substring match.
|
|
1201
|
+
* Throws when nothing matches or when a substring matches more than one session.
|
|
1202
|
+
*/
|
|
1203
|
+
declare function resolveSessionDir(sessionsDir: string, sessionId: string): string;
|
|
1204
|
+
|
|
1205
|
+
declare function runList(type: string, cwd: string): Promise<void>;
|
|
1206
|
+
interface SessionRow {
|
|
1207
|
+
date: string;
|
|
1208
|
+
kind: string;
|
|
1209
|
+
target: string;
|
|
1210
|
+
bugs: string;
|
|
1211
|
+
duration: string;
|
|
1212
|
+
status: string;
|
|
1213
|
+
report: string;
|
|
1214
|
+
}
|
|
1215
|
+
/** Parses INDEX.md rows, ignoring placeholder rows whose first cell starts with `_`. */
|
|
1216
|
+
declare function readSessionIndex(indexPath: string): SessionRow[];
|
|
1217
|
+
|
|
1218
|
+
interface ValidateOptions {
|
|
1219
|
+
targets?: boolean;
|
|
1220
|
+
knowledge?: boolean;
|
|
1221
|
+
domains?: boolean;
|
|
1222
|
+
kb?: boolean;
|
|
1223
|
+
all?: boolean;
|
|
1224
|
+
}
|
|
1225
|
+
/** Runs the selected validations, prints results, returns the failure count. */
|
|
1226
|
+
declare function runValidate(options: ValidateOptions, cwd: string): number;
|
|
1227
|
+
|
|
1228
|
+
declare function runKb(mode: 'sync' | 'check', cwd: string): SyncResult;
|
|
1229
|
+
|
|
1230
|
+
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, KnowledgeChangelogSchema, type KnowledgeEntry, type KnowledgeEntryContent, KnowledgeEntryContentSchema, KnowledgeEntrySchema, type KnowledgeManifest, type KnowledgeManifestEntry, KnowledgeManifestEntrySchema, KnowledgeManifestSchema, type KnowledgeManifestStats, KnowledgeManifestStatsSchema, KnowledgeReleaseSchema, 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 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, resolveDomainPath, resolveSessionDir, resolveSkillsSource, resolveTargetPath, runExplore, runInit, runKb, runList, runReport, runValidate, sessionDirName, sessionTimestamp, slugify, syncKnowledgeManifest, validateAllConfigs, validateDomainConfig, validateKnowledgeBase, validateKnowledgeEntry, validateTargetConfig };
|