qualiow-exploratory-testing 2.4.1 → 2.5.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/dist/index.d.ts CHANGED
@@ -1303,6 +1303,13 @@ declare const KnowledgeChangelogSchema: z.ZodObject<{
1303
1303
  }, z.core.$strict>>;
1304
1304
  }, z.core.$strict>;
1305
1305
 
1306
+ interface SecretValue {
1307
+ /** The env var NAME the value came from — safe to print. */
1308
+ name: string;
1309
+ /** The value itself — never print it. */
1310
+ value: string;
1311
+ }
1312
+
1306
1313
  /**
1307
1314
  * Credential and secret redaction.
1308
1315
  *
@@ -1317,8 +1324,10 @@ declare const KnowledgeChangelogSchema: z.ZodObject<{
1317
1324
  * must stay linear on adversarial input: a write-guard hook that times out
1318
1325
  * fails open, so no unbounded quantifier may restart at every offset of a run.
1319
1326
  */
1327
+
1320
1328
  interface RedactOptions {
1321
1329
  emails?: boolean;
1330
+ values?: ReadonlyArray<SecretValue>;
1322
1331
  }
1323
1332
  /** Redacts secrets, returning the cleaned text and which categories fired. */
1324
1333
  declare function redact(text: string, opts?: RedactOptions): {
@@ -1326,7 +1335,7 @@ declare function redact(text: string, opts?: RedactOptions): {
1326
1335
  redactions: string[];
1327
1336
  };
1328
1337
  /** True when the text contains any detectable secret. */
1329
- declare function containsSecrets(text: string): boolean;
1338
+ declare function containsSecrets(text: string, opts?: RedactOptions): boolean;
1330
1339
  declare const REDACTION_CATEGORIES: string[];
1331
1340
 
1332
1341
  declare function validateTargetConfig(filePath: string): ValidationResult;
@@ -2092,6 +2101,10 @@ declare function runKbDigest(options: KbDigestOptions, cwd: string): string;
2092
2101
  * session under contract 2 it also refuses one whose areas, evidence or bug areas fail
2093
2102
  * the contract, or whose coverage level is missing or stale.
2094
2103
  *
2104
+ * A passing finalize also cross-checks every bug's `**Verification:**` line against the
2105
+ * judge's verdict file, scans for the target's own credential values as well as for
2106
+ * secret-shaped text, and writes `evidence-manifest.json`.
2107
+ *
2095
2108
  * `level` computes that coverage level and, with `--write`, writes it — the only writer
2096
2109
  * of `evidence-level.md`, `backlog.md` and `stats.json` `coverage_level`.
2097
2110
  * `continue-check` is the only path by which one session's output reaches another.
@@ -2109,6 +2122,8 @@ interface SessionFinalizeResult {
2109
2122
  redactedFiles?: RedactedFile[];
2110
2123
  indexRowAdded?: boolean;
2111
2124
  bugRowsAdded?: string[];
2125
+ /** True when `evidence-manifest.json` was written (a passing, non-`--check` run). */
2126
+ evidenceManifestWritten?: boolean;
2112
2127
  }
2113
2128
  declare function runSessionFinalize(dir: string, options: {
2114
2129
  check?: boolean;
@@ -2273,6 +2288,11 @@ interface ParsedVerdict {
2273
2288
  reproResult?: string;
2274
2289
  reasoning?: string;
2275
2290
  falsePositivePattern?: string;
2291
+ /**
2292
+ * `REPRO_COMMANDS:` (live-repro only): the commands the judge ran, one per line, in
2293
+ * order — the replay of a confirmed bug. Absent when the block has no such field.
2294
+ */
2295
+ reproCommands?: string[];
2276
2296
  }
2277
2297
  interface EvidenceFile {
2278
2298
  /** Basename only — never a full path. */
@@ -2469,6 +2489,89 @@ declare function runJudgeTriage(claimFileArg: string, options: JudgeTriageOption
2469
2489
  /** The most cautious reading of the providers that answered. */
2470
2490
  declare function combineRoutes(routes: Route[]): Route;
2471
2491
 
2492
+ /**
2493
+ * `qualiow auth fill --session <sid> --ref <ref> --env <NAME>` — type a credential
2494
+ * into the page without the value ever passing through the model.
2495
+ *
2496
+ * The session names the env var (`auth.credentials.password` in the target
2497
+ * config); this command reads its value (the environment, then `qa/.env`, then
2498
+ * `.env`) and runs `playwright-cli -s=<sid> fill <ref> -- <value>` itself, so the
2499
+ * value never appears in a command line the model wrote, in the transcript, or
2500
+ * in a tool result. playwright-cli echoes the code it ran, filled text included,
2501
+ * so the child's stdout and stderr are redacted — the value in every encoding
2502
+ * `secretValueVariants` knows — before anything is printed.
2503
+ *
2504
+ * The child is spawned with an argv array, never through a shell. The binary is
2505
+ * the one the skills' own commands reach: `playwright-cli` on PATH, then the
2506
+ * project's `node_modules/.bin/playwright-cli`, then `npx playwright-cli`.
2507
+ *
2508
+ * Exit codes: the child's own · 1 usage error or playwright-cli not runnable ·
2509
+ * 2 the variable is not set (named, never a value).
2510
+ */
2511
+
2512
+ declare const EXIT_VAR_MISSING = 2;
2513
+ interface AuthFillOptions {
2514
+ session?: string;
2515
+ ref?: string;
2516
+ env?: string;
2517
+ /** Target id; resolved like every other command (data/targets/<id>.yml, qa/target.yml, _default). */
2518
+ target?: string;
2519
+ }
2520
+ interface SpawnResult {
2521
+ /** Exit code, or null when the child was killed by a signal. */
2522
+ code: number | null;
2523
+ stdout: string;
2524
+ stderr: string;
2525
+ /** Set when the binary could not be started at all (ENOENT, EACCES). */
2526
+ error?: NodeJS.ErrnoException;
2527
+ }
2528
+ type Spawner = (command: string, args: string[], opts: {
2529
+ cwd: string;
2530
+ }) => Promise<SpawnResult>;
2531
+ interface AuthFillContext {
2532
+ cwd: string;
2533
+ /** Replaces the real child process in tests. */
2534
+ spawn?: Spawner;
2535
+ /** PATH and platform for the binary lookup (default: the process's own). */
2536
+ pathEnv?: string;
2537
+ platform?: NodeJS.Platform;
2538
+ }
2539
+ interface AuthFillResult {
2540
+ exitCode: number;
2541
+ /** Child stdout, redacted. */
2542
+ stdout: string;
2543
+ /** Child stderr, redacted. */
2544
+ stderr: string;
2545
+ /** The binary that ran, for the error message when it could not. */
2546
+ command: string;
2547
+ }
2548
+ /** Bad flags or an unrunnable binary. Exit 1. */
2549
+ declare class AuthFillUsageError extends Error {
2550
+ constructor(message: string);
2551
+ }
2552
+ /** The variable is not set anywhere. Exit 2. The message names the variable only. */
2553
+ declare class AuthFillMissingVarError extends Error {
2554
+ constructor(name: string);
2555
+ }
2556
+ declare function authCommand(): Command;
2557
+ /**
2558
+ * The playwright-cli the skills' commands reach, as `[command, ...prefixArgs]`:
2559
+ * `playwright-cli` on PATH, the project's `node_modules/.bin/playwright-cli`,
2560
+ * then `npx playwright-cli`.
2561
+ */
2562
+ declare function resolvePlaywrightCli(cwd: string, pathEnv?: string, platform?: NodeJS.Platform): {
2563
+ command: string;
2564
+ args: string[];
2565
+ };
2566
+ /**
2567
+ * Child output with the filled value removed. The value is known to be a secret here, so
2568
+ * it is replaced at any length (the shared scan skips values under six characters), along
2569
+ * with the single-quoted JavaScript form playwright-cli prints in the code it ran; then the
2570
+ * usual value variants and pattern rules apply.
2571
+ */
2572
+ declare function redactFilledValue(text: string, name: string, value: string): string;
2573
+ declare function runAuthFill(options: AuthFillOptions, ctx: AuthFillContext): Promise<AuthFillResult>;
2574
+
2472
2575
  /**
2473
2576
  * One POST to a `/v1/systemone` endpoint: TypeSafe's hosted API or a
2474
2577
  * self-hosted Laya server, which speak the same wire protocol.
@@ -2680,4 +2783,4 @@ interface TriageBlockInput {
2680
2783
  /** The fenced block written to `verification/JEV-NNN.md` / `LAYA-NNN.md` (without the fences). */
2681
2784
  declare function renderTriageBlock(input: TriageBlockInput): string;
2682
2785
 
2683
- export { ALL_BUGS_COLUMNS, ALL_BUGS_MD_HEADER, AREA_EVIDENCE_DIRS, type AnyTargetConfig, type AreaStatus, type AssessContext, type AuthConfig, AuthConfigSchema, type BrowserConfig, BrowserConfigSchema, type BugReport, type BugSeverity, CONFIDENTIALITY_HEADER_MD, CONFIDENTIALITY_LINES, CONFIDENTIALITY_NOTICE, CONTRACT2_KINDS, type CallOptions, type CallResult, type ChoiceAnswer, type ChoiceQuestion, type CollectedEvidence, type Contract2Assessment, type Contract2Evaluation, type Contract2Input, type ContractBug, type CopyRecord, type CopyStatus, type CoverageArea, CoverageAreaSchema, type CoverageEntry, type CoverageFindings, type CoverageGap, CoverageGapSchema, type CoverageLevel, type CoverageLevelName, CoverageLevelSchema, type CoverageLevelSummary, CoverageLevelSummarySchema, DEFAULT_EVIDENCE_MAX_LINES, DEFAULT_THRESHOLDS, type DiscoveredSessionDir, type DomainConfig, DomainConfigSchema, EVIDENCE_DIRS, EVIDENCE_NOTE, EXIT_NOT_ENABLED, EXIT_UNAVAILABLE, type EvidenceFile, type EvidenceResolver, type EvidenceResult, type EvidenceSkipReason, type EvidenceSkipped, type GapCode, INDEX_COLUMNS, INDEX_MD_HEADER, type InitOptions, type InitResult, JEV_ENDPOINT, JEV_MODEL, JEV_USD_PER_INPUT_TOKEN, type Journey, JourneySchema, type JudgeTriageOptions, type JudgeTriageResult, type JudgeVerdict, type KbDigestOptions, KnowledgeChangelogSchema, type KnowledgeEntry, type KnowledgeEntryContent, KnowledgeEntryContentSchema, KnowledgeEntrySchema, type KnowledgeManifest, type KnowledgeManifestEntry, KnowledgeManifestEntrySchema, KnowledgeManifestSchema, type KnowledgeManifestStats, KnowledgeManifestStatsSchema, KnowledgeReleaseSchema, LAYA_DEFAULT_ENDPOINT, LAYA_DEFAULT_MAX_LEN, LAYA_DEFAULT_MODEL, LEGACY_SESSION_DIR_RE, LEVEL_DISCLAIMER, type LayaTriageConfig, LayaTriageConfigSchema, type LevelArea, type LevelBug, type LevelInput, type ListOptions, type LoadingStrategy, LoadingStrategySchema, MAX_AREAS, MAX_EVIDENCE_PER_AREA, MAX_EVIDENCE_TOTAL, MAX_PATTERNS, MAX_STATE_CHARS, type ManifestStats, type MobileAppConfig, MobileAppConfigSchema, type MobileDeviceConfig, MobileDeviceConfigSchema, type MobileScopeConfig, MobileScopeConfigSchema, type MobileTargetConfig, MobileTargetConfigSchema, type MobileWebConfig, MobileWebConfigSchema, type NoulAnswer, type NoulQuestion, type ParsedBug, type ParsedClaim, type ParsedSession, type ParsedSessionDir, type ParsedTable, type ParsedVerdict, type PredictedVerdict, QUALIOW_GITIGNORE_ENTRIES, QUALIOW_GITIGNORE_HEADER, REDACTION_CATEGORIES, RISK_TABLE_HEADING, type RedactOptions, type RegistryEntry, type ReportMeta, type RiskRanking, type RiskRow, type RiskTier, type Route, type RouteDecision, type RoutingThresholds, SESSION_DIR_RE, SESSION_KINDS, SEVERITY_CRITERIA, type SafetyConfig, SafetyConfigSchema, type ScopeConfig, ScopeConfigSchema, type ScoreAnswer, type ScoreQuestion, type ScrubResult, type SessionContinueCheckResult, type SessionFinalizeResult, type SessionKind, type SessionLevelResult, type SessionMetrics, type SessionMetricsRecord, SessionMetricsRecordSchema, SessionMetricsSchema, type SessionRow, type SeverityCounts, SeverityCountsSchema, type SeverityName, type SourceRepoConfig, SourceRepoConfigSchema, type SyncResult, type SystemOneRequest, type SystemOneResponse, type TargetConfig, TargetConfigSchema, type TriageAnswer, type TriageAnswers, TriageApiError, type TriageBlockInput, type TriageMode, TriageNotEnabledError, type TriageProvider, TriageProviderSchema, type TriageQuestion, type TriageResult, type TriageState, type TriageUsage, UNTRUSTED_CLOSE, UNTRUSTED_OPEN, VERDICT_CRITERIA, type ValidationError, type ValidationResult, type VerificationConfig, VerificationConfigSchema, WebTargetConfigSchema, appendSessionMetrics, appendSessionMetricsDeduped, assertResponse, assessContract2, backoffMs, buildManifestRegistry, buildQuestionSet, buildTableRow, buildTriageState, callSystemOne, collectEvidence, combineRoutes, computeLevel, computeStats, containsSecrets, csvEscape, describeSessionDir, estimateCostUsd, evaluateContract2, extractCoverage, extractListSection, extractNumberedList, extractReportMeta, extractSection, fitStateToBudget, generateHtmlReport, generateJiraExport, generateJsonReport, generateMarkdownSummary, getPackageRoot, getPackageVersion, hasConfidentialityHeader, headersMatchColumns, inputsDigest, isAuthPath, isLoopbackEndpoint, isSessionFinalized, judgeCommand, listReleaseDirs, loadFalsePositivePatterns, loadSessionForOutput, mergeGitignore, missingColumns, normaliseJudgeVerdict, normaliseSeverity, parseAreas, parseBugReport, parseClaimCard, parseMarkdownTable, parseRiskTable, parseSession, parseSessionDirName, parseSeverityField, parseTimeBox, parseVerdictBlock, pathOfUrl, readAllMetrics, readContainedText, readEnvVar, readSessionIndex, redact, reduceForMetrics, relInside, renderBacklog, renderLevel, renderTriageBlock, resolveDataDir, resolveDomainPath, resolveEvidence, resolveProviders, resolveSessionDir, resolveSkillsSource, resolveTargetPath, route, runExplore, runInit, runJudgeTriage, runKb, runKbDigest, runList, runReport, runSessionContinueCheck, runSessionFinalize, runSessionLevel, runValidate, scrubForTransmission, sessionDirName, sessionDirOfClaim, sessionTimestamp, slugify, syncKnowledgeManifest, toPredictedVerdict, validateAllConfigs, validateDomainConfig, validateKnowledgeBase, validateKnowledgeEntry, validateTargetConfig };
2786
+ export { ALL_BUGS_COLUMNS, ALL_BUGS_MD_HEADER, AREA_EVIDENCE_DIRS, type AnyTargetConfig, type AreaStatus, type AssessContext, type AuthConfig, AuthConfigSchema, type AuthFillContext, AuthFillMissingVarError, type AuthFillOptions, type AuthFillResult, AuthFillUsageError, type BrowserConfig, BrowserConfigSchema, type BugReport, type BugSeverity, CONFIDENTIALITY_HEADER_MD, CONFIDENTIALITY_LINES, CONFIDENTIALITY_NOTICE, CONTRACT2_KINDS, type CallOptions, type CallResult, type ChoiceAnswer, type ChoiceQuestion, type CollectedEvidence, type Contract2Assessment, type Contract2Evaluation, type Contract2Input, type ContractBug, type CopyRecord, type CopyStatus, type CoverageArea, CoverageAreaSchema, type CoverageEntry, type CoverageFindings, type CoverageGap, CoverageGapSchema, type CoverageLevel, type CoverageLevelName, CoverageLevelSchema, type CoverageLevelSummary, CoverageLevelSummarySchema, DEFAULT_EVIDENCE_MAX_LINES, DEFAULT_THRESHOLDS, type DiscoveredSessionDir, type DomainConfig, DomainConfigSchema, EVIDENCE_DIRS, EVIDENCE_NOTE, EXIT_NOT_ENABLED, EXIT_UNAVAILABLE, EXIT_VAR_MISSING, type EvidenceFile, type EvidenceResolver, type EvidenceResult, type EvidenceSkipReason, type EvidenceSkipped, type GapCode, INDEX_COLUMNS, INDEX_MD_HEADER, type InitOptions, type InitResult, JEV_ENDPOINT, JEV_MODEL, JEV_USD_PER_INPUT_TOKEN, type Journey, JourneySchema, type JudgeTriageOptions, type JudgeTriageResult, type JudgeVerdict, type KbDigestOptions, KnowledgeChangelogSchema, type KnowledgeEntry, type KnowledgeEntryContent, KnowledgeEntryContentSchema, KnowledgeEntrySchema, type KnowledgeManifest, type KnowledgeManifestEntry, KnowledgeManifestEntrySchema, KnowledgeManifestSchema, type KnowledgeManifestStats, KnowledgeManifestStatsSchema, KnowledgeReleaseSchema, LAYA_DEFAULT_ENDPOINT, LAYA_DEFAULT_MAX_LEN, LAYA_DEFAULT_MODEL, LEGACY_SESSION_DIR_RE, LEVEL_DISCLAIMER, type LayaTriageConfig, LayaTriageConfigSchema, type LevelArea, type LevelBug, type LevelInput, type ListOptions, type LoadingStrategy, LoadingStrategySchema, MAX_AREAS, MAX_EVIDENCE_PER_AREA, MAX_EVIDENCE_TOTAL, MAX_PATTERNS, MAX_STATE_CHARS, type ManifestStats, type MobileAppConfig, MobileAppConfigSchema, type MobileDeviceConfig, MobileDeviceConfigSchema, type MobileScopeConfig, MobileScopeConfigSchema, type MobileTargetConfig, MobileTargetConfigSchema, type MobileWebConfig, MobileWebConfigSchema, type NoulAnswer, type NoulQuestion, type ParsedBug, type ParsedClaim, type ParsedSession, type ParsedSessionDir, type ParsedTable, type ParsedVerdict, type PredictedVerdict, QUALIOW_GITIGNORE_ENTRIES, QUALIOW_GITIGNORE_HEADER, REDACTION_CATEGORIES, RISK_TABLE_HEADING, type RedactOptions, type RegistryEntry, type ReportMeta, type RiskRanking, type RiskRow, type RiskTier, type Route, type RouteDecision, type RoutingThresholds, SESSION_DIR_RE, SESSION_KINDS, SEVERITY_CRITERIA, type SafetyConfig, SafetyConfigSchema, type ScopeConfig, ScopeConfigSchema, type ScoreAnswer, type ScoreQuestion, type ScrubResult, type SessionContinueCheckResult, type SessionFinalizeResult, type SessionKind, type SessionLevelResult, type SessionMetrics, type SessionMetricsRecord, SessionMetricsRecordSchema, SessionMetricsSchema, type SessionRow, type SeverityCounts, SeverityCountsSchema, type SeverityName, type SourceRepoConfig, SourceRepoConfigSchema, type SpawnResult, type Spawner, type SyncResult, type SystemOneRequest, type SystemOneResponse, type TargetConfig, TargetConfigSchema, type TriageAnswer, type TriageAnswers, TriageApiError, type TriageBlockInput, type TriageMode, TriageNotEnabledError, type TriageProvider, TriageProviderSchema, type TriageQuestion, type TriageResult, type TriageState, type TriageUsage, UNTRUSTED_CLOSE, UNTRUSTED_OPEN, VERDICT_CRITERIA, type ValidationError, type ValidationResult, type VerificationConfig, VerificationConfigSchema, WebTargetConfigSchema, appendSessionMetrics, appendSessionMetricsDeduped, assertResponse, assessContract2, authCommand, backoffMs, buildManifestRegistry, buildQuestionSet, buildTableRow, buildTriageState, callSystemOne, collectEvidence, combineRoutes, computeLevel, computeStats, containsSecrets, csvEscape, describeSessionDir, estimateCostUsd, evaluateContract2, extractCoverage, extractListSection, extractNumberedList, extractReportMeta, extractSection, fitStateToBudget, generateHtmlReport, generateJiraExport, generateJsonReport, generateMarkdownSummary, getPackageRoot, getPackageVersion, hasConfidentialityHeader, headersMatchColumns, inputsDigest, isAuthPath, isLoopbackEndpoint, isSessionFinalized, judgeCommand, listReleaseDirs, loadFalsePositivePatterns, loadSessionForOutput, mergeGitignore, missingColumns, normaliseJudgeVerdict, normaliseSeverity, parseAreas, parseBugReport, parseClaimCard, parseMarkdownTable, parseRiskTable, parseSession, parseSessionDirName, parseSeverityField, parseTimeBox, parseVerdictBlock, pathOfUrl, readAllMetrics, readContainedText, readEnvVar, readSessionIndex, redact, redactFilledValue, reduceForMetrics, relInside, renderBacklog, renderLevel, renderTriageBlock, resolveDataDir, resolveDomainPath, resolveEvidence, resolvePlaywrightCli, resolveProviders, resolveSessionDir, resolveSkillsSource, resolveTargetPath, route, runAuthFill, runExplore, runInit, runJudgeTriage, runKb, runKbDigest, runList, runReport, runSessionContinueCheck, runSessionFinalize, runSessionLevel, runValidate, scrubForTransmission, sessionDirName, sessionDirOfClaim, sessionTimestamp, slugify, syncKnowledgeManifest, toPredictedVerdict, validateAllConfigs, validateDomainConfig, validateKnowledgeBase, validateKnowledgeEntry, validateTargetConfig };