executable-stories-formatters 1.19.1 → 1.21.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.cts CHANGED
@@ -1534,8 +1534,10 @@ interface ReviewClaim {
1534
1534
  status: TestStatus;
1535
1535
  /** Derived from file convention / `audience:` tag. */
1536
1536
  audience: ReviewAudience;
1537
- /** Declared via `change:*` tag (defaults to `unknown`). */
1537
+ /** Declared via `change:*` tag (defaults to `unknown`), or inferred by Jev when `changeTypeConfidence` is set. */
1538
1538
  changeType: ChangeType;
1539
+ /** Present only when `changeType` was inferred rather than declared. */
1540
+ changeTypeConfidence?: number;
1539
1541
  /** Graded credibility of this claim's proof. */
1540
1542
  strength: EvidenceStrength;
1541
1543
  /** Human-readable reasons the strength was assigned (what corroborated / what was missing). */
@@ -2944,6 +2946,47 @@ declare function buildCheck(args: CheckArgs, _deps?: CheckDeps): CheckReport;
2944
2946
  */
2945
2947
  declare function renderCheck(report: CheckReport, format: "text" | "json"): string;
2946
2948
 
2949
+ type JevQuestion = {
2950
+ type: "noul";
2951
+ instructions: string;
2952
+ } | {
2953
+ type: "choice";
2954
+ instructions: string;
2955
+ criteria: Record<string, string | null>;
2956
+ } | {
2957
+ type: "score";
2958
+ instructions: string;
2959
+ criteria: string[];
2960
+ };
2961
+ type JevAnswer = {
2962
+ type: "noul";
2963
+ noul: number;
2964
+ } | {
2965
+ type: "choice";
2966
+ choice: string;
2967
+ probabilities: Record<string, number>;
2968
+ confidence: number;
2969
+ } | {
2970
+ type: "score";
2971
+ score: number;
2972
+ probabilities: Record<string, number>;
2973
+ confidence: number;
2974
+ };
2975
+ interface JevClient {
2976
+ model: string;
2977
+ ask(state: unknown, questions: Record<string, JevQuestion>): Promise<Record<string, JevAnswer>>;
2978
+ }
2979
+ interface JevClientOptions {
2980
+ apiKey: string;
2981
+ model?: string;
2982
+ endpoint?: string;
2983
+ fetch?: typeof globalThis.fetch;
2984
+ timeoutMs?: number;
2985
+ }
2986
+ declare function createJevClient(options: JevClientOptions): JevClient;
2987
+ /** A client when `JEV_API_KEY` is set, else undefined (deterministic output only). */
2988
+ declare function jevFromEnv(env?: NodeJS.ProcessEnv): JevClient | undefined;
2989
+
2947
2990
  /**
2948
2991
  * `goal` — a behavioral definition-of-done for autonomous agent loops.
2949
2992
  *
@@ -2985,6 +3028,8 @@ interface GoalReport {
2985
3028
  ratchet: {
2986
3029
  enforced: boolean;
2987
3030
  violations: RatchetViolation[];
3031
+ /** Jev's read of scenarios that changed without shrinking. Never affects `met`. */
3032
+ advisories: RatchetViolation[];
2988
3033
  };
2989
3034
  }
2990
3035
  interface GoalArgs {
@@ -2999,6 +3044,13 @@ interface GoalArgs {
2999
3044
  }
3000
3045
  type GoalDeps = Record<string, never>;
3001
3046
  declare function buildGoal(args: GoalArgs, _deps?: GoalDeps): GoalReport;
3047
+ /**
3048
+ * The step-count ratchet sees counts, so merging two steps keeps it clean.
3049
+ * When a baseline scenario's steps were rewritten without shrinking, ask Jev
3050
+ * whether the new version checks less. Advisory only: `met` is decided by
3051
+ * the rules above, and this is a judgment.
3052
+ */
3053
+ declare function enrichGoal(report: GoalReport, args: GoalArgs, jev: JevClient): Promise<GoalReport>;
3002
3054
  declare function renderGoal(report: GoalReport, format: "text" | "json"): string;
3003
3055
 
3004
3056
  /**
@@ -3043,7 +3095,18 @@ interface TriageItem {
3043
3095
  /** Passed in the baseline, failing now. Ranked first. */
3044
3096
  regressed: boolean;
3045
3097
  reason: "regression" | "failing";
3098
+ /** Jev's pick when `covers` is empty: a path the run already routes to, with its probability. */
3099
+ suggestedCovers?: {
3100
+ path: string;
3101
+ probability: number;
3102
+ };
3103
+ /** Jev's read of what failed: the product, the test itself, or the environment. */
3104
+ failureKind?: {
3105
+ kind: FailureKind;
3106
+ confidence: number;
3107
+ };
3046
3108
  }
3109
+ type FailureKind = "product" | "test" | "infra";
3047
3110
  interface TriageReport {
3048
3111
  total: number;
3049
3112
  failing: number;
@@ -3062,6 +3125,14 @@ interface TriageArgs {
3062
3125
  }
3063
3126
  type TriageDeps = Record<string, never>;
3064
3127
  declare function buildTriage(args: TriageArgs, _deps?: TriageDeps): TriageReport;
3128
+ /**
3129
+ * For each failing scenario with no `covers`, ask Jev to pick from the paths
3130
+ * this run already routes to (every declared `covers`, plus CODEOWNERS
3131
+ * patterns), and to say whether the product, the test, or the environment
3132
+ * failed. The declared-`covers` count stays as declared: a suggestion is not
3133
+ * a declaration.
3134
+ */
3135
+ declare function enrichTriage(report: TriageReport, testCases: TestCaseResult[], jev: JevClient, codeowners?: readonly CodeownersRule[]): Promise<TriageReport>;
3065
3136
  interface RenderTriageOptions {
3066
3137
  /** Group the text worklist under each CODEOWNERS owner. */
3067
3138
  byOwner?: boolean;
@@ -3249,11 +3320,12 @@ declare function gradeEvidence(testCase: TestCaseResult, audience: ReviewAudienc
3249
3320
  */
3250
3321
  declare function buildReview(run: ReviewResult["run"], context?: ReviewContext): ReviewResult;
3251
3322
  /**
3252
- * Code Diff integrity diagnostics: orphaned/ambiguous anchors and unverified
3253
- * scenario references. The CLI prints these as warnings; `--strict-code-diff`
3254
- * turns them into review-gate failures so CI catches explainers that lost
3255
- * their grounding.
3323
+ * For claims with no `change:*` tag, ask Jev to pick the change-type from the
3324
+ * scenario plus the hunks of the files it covers. Confident answers are
3325
+ * written back with their confidence so every renderer can say "inferred";
3326
+ * the rest stay `unknown`.
3256
3327
  */
3328
+ declare function enrichReview(review: ReviewResult, jev: JevClient): Promise<ReviewResult>;
3257
3329
  declare function codeDiffDiagnostics(review: ReviewResult): string[];
3258
3330
 
3259
3331
  /**
@@ -3628,4 +3700,4 @@ declare function normalizeVitestResults(testModules: Parameters<typeof adaptVite
3628
3700
  */
3629
3701
  declare function normalizePlaywrightResults(testResults: Parameters<typeof adaptPlaywrightRun>[0], adapterOptions?: Parameters<typeof adaptPlaywrightRun>[1], canonicalizeOptions?: CanonicalizeOptions): TestRunResult;
3630
3702
 
3631
- export { type AdapterDeps, AgentTextFormatter, type AggregateDeps, type AggregateResult, type AnchorResolution, type AnchorState, type AstroAssetResult, AstroFormatter, type AstroFormatterOptions as AstroFormatterOpts, type AttachPolicy, type BehaviorDebuggerIssue, type BehaviorDiff, type BehaviorDiffEntry, type BehaviorManifest, BehaviorManifestJsonFormatter, type BehaviorManifestJsonOptions, type BehaviorSourceFile, type BehaviorTag, type BundleOptions, type BundleResult, type CaseBody, type CaseResult, type ChangeType, type ChangedFile, type ChangedFileReview, type CheckArgs, type CheckDeps, type CheckFailure, type CheckReport, type CheckStep, type CodeDiffAnnotation, type CodeDiffAnnotationInput, type CodeDiffEvidence, type CodeDiffInput, type CodeDiffScenarioRef, type CodeDiffSidecar, type CodeDiffSidecarAnnotation, type ColocatedStyle, type CompareFormat, type CompareFormatterOptions, type ConfluenceAuth, ConfluenceFormatter, type ConfluenceFormatterOptions as ConfluenceFormatterOpts, type CopyMarkdownAssetsOptions, type CoverageClass, type CoverageJson, CucumberHtmlFormatter, type CucumberHtmlOptions, CucumberJsonFormatter, type CucumberJsonOptions, CucumberMessagesFormatter, type CucumberMessagesOptions, DEFAULT_LOCKFILE_PATH, type DeploymentEntry, type DeploymentLedger, type DeploymentStatus, type DiffAnchor, type DiffHunk, type DiffLine, type DiffRunsOptions, type EnvironmentDrift, type EvidenceStrength, type ExecutableStoriesConfig, type FetchFn, type FileChangeKind, type FileDiff, type FlakinessLevel, type Formatter, type FormatterOptions, type GenerateArgs, type GenerateCompareResult, type GenerateDeps, type GenerateResult, type GenericWebhookNotifierOptions, type GoalArgs, type GoalDeps, type GoalReport, type GoalRequirementResult, type HistoryEntry, type HistoryStore, type IJsonDataTable, type IJsonDocString, type IJsonEmbedding, type IJsonFeature, type IJsonScenario, type IJsonStep, type IJsonStepArgument, type IJsonStepResult, type IJsonTableRow, type IJsonTag, JUnitFormatter, type JUnitOptions, type JiraAuth, type JiraPublishMode, type ListScenariosArgs, type ListScenariosDeps, type LockEntry, type Lockfile, type Logger, MIN_FLAKINESS_SAMPLES, MIN_METRIC_SAMPLES, MIN_PERF_SAMPLES, MarkdownFormatter, type MarkdownFormatterOptions, type MarkdownOptions, type MarkdownRenderers, type NotificationSummary, type NotifyCondition, type OutputConfig, type OutputFormat, type OutputMode, type OutputRule, PROVIDER_NAMES, type PerformanceTrend, type ProviderName, type PublishConfluenceArgs, type PublishConfluenceDeps, type PublishConfluenceResult, type PublishJiraArgs, type PublishJiraDeps, type PublishJiraResult, type RatchetViolation, type RecordDeploymentArgs, type RecordDeploymentResult, type RecordResultsSummary, type ReleaseManifest, ReleaseManifestFormatter, type RemoteCase, ReportGenerator, type ResolvedFormatterOptions, type ResultAttachment, type ReviewAudience, type ReviewBand, type ReviewClaim, type ReviewContext, ReviewHtmlFormatter, type ReviewHtmlOptions, ReviewMarkdownFormatter, type ReviewMarkdownOptions, type ReviewResult, type ReviewSummary, RunDiffChangelogFormatter, type RunDiffChangelogOptions, RunDiffHtmlFormatter, type RunDiffHtmlOptions, RunDiffMarkdownFormatter, type RunDiffMarkdownOptions, type RunDiffResult, type RunDiffSummary, type RunsResetResult, type RunsStatusReport, type ScenarioChangeFlags, type ScenarioChangeKind, type ScenarioDiff, type ScenarioIndex, type ScenarioIndexFilters, type ScenarioIndexItem, ScenarioIndexJsonFormatter, type ScenarioIndexJsonOptions, type ScenarioIndexStep, type ScenarioSnapshot, type SortTestCasesMode, type StabilityGrade, type StarlightBadge, StoryReportJsonFormatter, type StoryReportJsonOptions, type SyncAnalysis, type SyncApplyResult, type SyncEngineConfig, type SyncProvider, type SyncTargets, type TestHistory, type TestMetrics, type TestRailConfig, TraceabilityCsvFormatter, type TraceabilityMatrix, TraceabilityMatrixFormatter, type TraceabilityRequirement, type TriageArgs, type TriageDeps, type TriageItem, type TriageReport, type WatchDeps, type WatchHandle, type WatchOptions, type WebhookPayload, type WebhookSignerHmac, type WriteFile, type XrayConfig, adaptJestRun, adaptPlaywrightRun, adaptVitestRun, aggregateReports, analyzeSync, applySync, assembleCodeDiff, buildCheck, buildCoverageJson, buildGoal, buildProvider, buildReview, buildTriage, bundleAssets, calculateFlakiness, calculateStability, classifyStatusChange, clearVersionCache, codeDiffDiagnostics, collectAttachments, computeTestMetrics, copyMarkdownAssets, createAnchor, createPrCommentSummary, createReportGenerator, createTestRailProvider, createXrayProvider, deriveAudience, deriveChangeType, detectCI, detectPerformanceTrend, diffRuns, diffStoryReports, emptyLockfile, findGitDir, generateRunComparison, getDeploymentStatus, getEnvironmentDrift, gradeEvidence, hasSufficientHistory, hashCaseBody, isProviderName, isReviewableSource, isTestFile, joinNameAndExt, listScenarios, loadHistory, normalizeFormats, normalizeJestResults, normalizePlaywrightResults, normalizeVitestResults, parseLockfile, parseUnifiedDiff, projectBehaviours, publishConfluencePage, publishJiraIssue, readBranchName, readGitSha, readLockfile, readPackageVersion, recordDeployment, regenerateArtifacts, regenerateRun, relocateAnchor, renderApplyResult, renderCheck, renderCoverageMarkdown, renderCoverageText, renderGoal, renderPlan, renderTriage, rewriteAssetPaths, runsReset, runsStatus, saveHistory, scenariosCoveringPaths, sendNotifications, sendSlackNotification, sendTeamsNotification, sendWebhookNotification, serializeLockfile, signBody, startWatch, stripAnsi, toAgentText, toBehaviorManifest, toCaseBody, toReleaseManifest, toScenarioIndex, toTraceabilityMatrix, updateHistory, writeLockfile };
3703
+ export { type AdapterDeps, AgentTextFormatter, type AggregateDeps, type AggregateResult, type AnchorResolution, type AnchorState, type AstroAssetResult, AstroFormatter, type AstroFormatterOptions as AstroFormatterOpts, type AttachPolicy, type BehaviorDebuggerIssue, type BehaviorDiff, type BehaviorDiffEntry, type BehaviorManifest, BehaviorManifestJsonFormatter, type BehaviorManifestJsonOptions, type BehaviorSourceFile, type BehaviorTag, type BundleOptions, type BundleResult, type CaseBody, type CaseResult, type ChangeType, type ChangedFile, type ChangedFileReview, type CheckArgs, type CheckDeps, type CheckFailure, type CheckReport, type CheckStep, type CodeDiffAnnotation, type CodeDiffAnnotationInput, type CodeDiffEvidence, type CodeDiffInput, type CodeDiffScenarioRef, type CodeDiffSidecar, type CodeDiffSidecarAnnotation, type ColocatedStyle, type CompareFormat, type CompareFormatterOptions, type ConfluenceAuth, ConfluenceFormatter, type ConfluenceFormatterOptions as ConfluenceFormatterOpts, type CopyMarkdownAssetsOptions, type CoverageClass, type CoverageJson, CucumberHtmlFormatter, type CucumberHtmlOptions, CucumberJsonFormatter, type CucumberJsonOptions, CucumberMessagesFormatter, type CucumberMessagesOptions, DEFAULT_LOCKFILE_PATH, type DeploymentEntry, type DeploymentLedger, type DeploymentStatus, type DiffAnchor, type DiffHunk, type DiffLine, type DiffRunsOptions, type EnvironmentDrift, type EvidenceStrength, type ExecutableStoriesConfig, type FailureKind, type FetchFn, type FileChangeKind, type FileDiff, type FlakinessLevel, type Formatter, type FormatterOptions, type GenerateArgs, type GenerateCompareResult, type GenerateDeps, type GenerateResult, type GenericWebhookNotifierOptions, type GoalArgs, type GoalDeps, type GoalReport, type GoalRequirementResult, type HistoryEntry, type HistoryStore, type IJsonDataTable, type IJsonDocString, type IJsonEmbedding, type IJsonFeature, type IJsonScenario, type IJsonStep, type IJsonStepArgument, type IJsonStepResult, type IJsonTableRow, type IJsonTag, JUnitFormatter, type JUnitOptions, type JevAnswer, type JevClient, type JevQuestion, type JiraAuth, type JiraPublishMode, type ListScenariosArgs, type ListScenariosDeps, type LockEntry, type Lockfile, type Logger, MIN_FLAKINESS_SAMPLES, MIN_METRIC_SAMPLES, MIN_PERF_SAMPLES, MarkdownFormatter, type MarkdownFormatterOptions, type MarkdownOptions, type MarkdownRenderers, type NotificationSummary, type NotifyCondition, type OutputConfig, type OutputFormat, type OutputMode, type OutputRule, PROVIDER_NAMES, type PerformanceTrend, type ProviderName, type PublishConfluenceArgs, type PublishConfluenceDeps, type PublishConfluenceResult, type PublishJiraArgs, type PublishJiraDeps, type PublishJiraResult, type RatchetViolation, type RecordDeploymentArgs, type RecordDeploymentResult, type RecordResultsSummary, type ReleaseManifest, ReleaseManifestFormatter, type RemoteCase, ReportGenerator, type ResolvedFormatterOptions, type ResultAttachment, type ReviewAudience, type ReviewBand, type ReviewClaim, type ReviewContext, ReviewHtmlFormatter, type ReviewHtmlOptions, ReviewMarkdownFormatter, type ReviewMarkdownOptions, type ReviewResult, type ReviewSummary, RunDiffChangelogFormatter, type RunDiffChangelogOptions, RunDiffHtmlFormatter, type RunDiffHtmlOptions, RunDiffMarkdownFormatter, type RunDiffMarkdownOptions, type RunDiffResult, type RunDiffSummary, type RunsResetResult, type RunsStatusReport, type ScenarioChangeFlags, type ScenarioChangeKind, type ScenarioDiff, type ScenarioIndex, type ScenarioIndexFilters, type ScenarioIndexItem, ScenarioIndexJsonFormatter, type ScenarioIndexJsonOptions, type ScenarioIndexStep, type ScenarioSnapshot, type SortTestCasesMode, type StabilityGrade, type StarlightBadge, StoryReportJsonFormatter, type StoryReportJsonOptions, type SyncAnalysis, type SyncApplyResult, type SyncEngineConfig, type SyncProvider, type SyncTargets, type TestHistory, type TestMetrics, type TestRailConfig, TraceabilityCsvFormatter, type TraceabilityMatrix, TraceabilityMatrixFormatter, type TraceabilityRequirement, type TriageArgs, type TriageDeps, type TriageItem, type TriageReport, type WatchDeps, type WatchHandle, type WatchOptions, type WebhookPayload, type WebhookSignerHmac, type WriteFile, type XrayConfig, adaptJestRun, adaptPlaywrightRun, adaptVitestRun, aggregateReports, analyzeSync, applySync, assembleCodeDiff, buildCheck, buildCoverageJson, buildGoal, buildProvider, buildReview, buildTriage, bundleAssets, calculateFlakiness, calculateStability, classifyStatusChange, clearVersionCache, codeDiffDiagnostics, collectAttachments, computeTestMetrics, copyMarkdownAssets, createAnchor, createJevClient, createPrCommentSummary, createReportGenerator, createTestRailProvider, createXrayProvider, deriveAudience, deriveChangeType, detectCI, detectPerformanceTrend, diffRuns, diffStoryReports, emptyLockfile, enrichGoal, enrichReview, enrichTriage, findGitDir, generateRunComparison, getDeploymentStatus, getEnvironmentDrift, gradeEvidence, hasSufficientHistory, hashCaseBody, isProviderName, isReviewableSource, isTestFile, jevFromEnv, joinNameAndExt, listScenarios, loadHistory, normalizeFormats, normalizeJestResults, normalizePlaywrightResults, normalizeVitestResults, parseLockfile, parseUnifiedDiff, projectBehaviours, publishConfluencePage, publishJiraIssue, readBranchName, readGitSha, readLockfile, readPackageVersion, recordDeployment, regenerateArtifacts, regenerateRun, relocateAnchor, renderApplyResult, renderCheck, renderCoverageMarkdown, renderCoverageText, renderGoal, renderPlan, renderTriage, rewriteAssetPaths, runsReset, runsStatus, saveHistory, scenariosCoveringPaths, sendNotifications, sendSlackNotification, sendTeamsNotification, sendWebhookNotification, serializeLockfile, signBody, startWatch, stripAnsi, toAgentText, toBehaviorManifest, toCaseBody, toReleaseManifest, toScenarioIndex, toTraceabilityMatrix, updateHistory, writeLockfile };
package/dist/index.d.ts CHANGED
@@ -1534,8 +1534,10 @@ interface ReviewClaim {
1534
1534
  status: TestStatus;
1535
1535
  /** Derived from file convention / `audience:` tag. */
1536
1536
  audience: ReviewAudience;
1537
- /** Declared via `change:*` tag (defaults to `unknown`). */
1537
+ /** Declared via `change:*` tag (defaults to `unknown`), or inferred by Jev when `changeTypeConfidence` is set. */
1538
1538
  changeType: ChangeType;
1539
+ /** Present only when `changeType` was inferred rather than declared. */
1540
+ changeTypeConfidence?: number;
1539
1541
  /** Graded credibility of this claim's proof. */
1540
1542
  strength: EvidenceStrength;
1541
1543
  /** Human-readable reasons the strength was assigned (what corroborated / what was missing). */
@@ -2944,6 +2946,47 @@ declare function buildCheck(args: CheckArgs, _deps?: CheckDeps): CheckReport;
2944
2946
  */
2945
2947
  declare function renderCheck(report: CheckReport, format: "text" | "json"): string;
2946
2948
 
2949
+ type JevQuestion = {
2950
+ type: "noul";
2951
+ instructions: string;
2952
+ } | {
2953
+ type: "choice";
2954
+ instructions: string;
2955
+ criteria: Record<string, string | null>;
2956
+ } | {
2957
+ type: "score";
2958
+ instructions: string;
2959
+ criteria: string[];
2960
+ };
2961
+ type JevAnswer = {
2962
+ type: "noul";
2963
+ noul: number;
2964
+ } | {
2965
+ type: "choice";
2966
+ choice: string;
2967
+ probabilities: Record<string, number>;
2968
+ confidence: number;
2969
+ } | {
2970
+ type: "score";
2971
+ score: number;
2972
+ probabilities: Record<string, number>;
2973
+ confidence: number;
2974
+ };
2975
+ interface JevClient {
2976
+ model: string;
2977
+ ask(state: unknown, questions: Record<string, JevQuestion>): Promise<Record<string, JevAnswer>>;
2978
+ }
2979
+ interface JevClientOptions {
2980
+ apiKey: string;
2981
+ model?: string;
2982
+ endpoint?: string;
2983
+ fetch?: typeof globalThis.fetch;
2984
+ timeoutMs?: number;
2985
+ }
2986
+ declare function createJevClient(options: JevClientOptions): JevClient;
2987
+ /** A client when `JEV_API_KEY` is set, else undefined (deterministic output only). */
2988
+ declare function jevFromEnv(env?: NodeJS.ProcessEnv): JevClient | undefined;
2989
+
2947
2990
  /**
2948
2991
  * `goal` — a behavioral definition-of-done for autonomous agent loops.
2949
2992
  *
@@ -2985,6 +3028,8 @@ interface GoalReport {
2985
3028
  ratchet: {
2986
3029
  enforced: boolean;
2987
3030
  violations: RatchetViolation[];
3031
+ /** Jev's read of scenarios that changed without shrinking. Never affects `met`. */
3032
+ advisories: RatchetViolation[];
2988
3033
  };
2989
3034
  }
2990
3035
  interface GoalArgs {
@@ -2999,6 +3044,13 @@ interface GoalArgs {
2999
3044
  }
3000
3045
  type GoalDeps = Record<string, never>;
3001
3046
  declare function buildGoal(args: GoalArgs, _deps?: GoalDeps): GoalReport;
3047
+ /**
3048
+ * The step-count ratchet sees counts, so merging two steps keeps it clean.
3049
+ * When a baseline scenario's steps were rewritten without shrinking, ask Jev
3050
+ * whether the new version checks less. Advisory only: `met` is decided by
3051
+ * the rules above, and this is a judgment.
3052
+ */
3053
+ declare function enrichGoal(report: GoalReport, args: GoalArgs, jev: JevClient): Promise<GoalReport>;
3002
3054
  declare function renderGoal(report: GoalReport, format: "text" | "json"): string;
3003
3055
 
3004
3056
  /**
@@ -3043,7 +3095,18 @@ interface TriageItem {
3043
3095
  /** Passed in the baseline, failing now. Ranked first. */
3044
3096
  regressed: boolean;
3045
3097
  reason: "regression" | "failing";
3098
+ /** Jev's pick when `covers` is empty: a path the run already routes to, with its probability. */
3099
+ suggestedCovers?: {
3100
+ path: string;
3101
+ probability: number;
3102
+ };
3103
+ /** Jev's read of what failed: the product, the test itself, or the environment. */
3104
+ failureKind?: {
3105
+ kind: FailureKind;
3106
+ confidence: number;
3107
+ };
3046
3108
  }
3109
+ type FailureKind = "product" | "test" | "infra";
3047
3110
  interface TriageReport {
3048
3111
  total: number;
3049
3112
  failing: number;
@@ -3062,6 +3125,14 @@ interface TriageArgs {
3062
3125
  }
3063
3126
  type TriageDeps = Record<string, never>;
3064
3127
  declare function buildTriage(args: TriageArgs, _deps?: TriageDeps): TriageReport;
3128
+ /**
3129
+ * For each failing scenario with no `covers`, ask Jev to pick from the paths
3130
+ * this run already routes to (every declared `covers`, plus CODEOWNERS
3131
+ * patterns), and to say whether the product, the test, or the environment
3132
+ * failed. The declared-`covers` count stays as declared: a suggestion is not
3133
+ * a declaration.
3134
+ */
3135
+ declare function enrichTriage(report: TriageReport, testCases: TestCaseResult[], jev: JevClient, codeowners?: readonly CodeownersRule[]): Promise<TriageReport>;
3065
3136
  interface RenderTriageOptions {
3066
3137
  /** Group the text worklist under each CODEOWNERS owner. */
3067
3138
  byOwner?: boolean;
@@ -3249,11 +3320,12 @@ declare function gradeEvidence(testCase: TestCaseResult, audience: ReviewAudienc
3249
3320
  */
3250
3321
  declare function buildReview(run: ReviewResult["run"], context?: ReviewContext): ReviewResult;
3251
3322
  /**
3252
- * Code Diff integrity diagnostics: orphaned/ambiguous anchors and unverified
3253
- * scenario references. The CLI prints these as warnings; `--strict-code-diff`
3254
- * turns them into review-gate failures so CI catches explainers that lost
3255
- * their grounding.
3323
+ * For claims with no `change:*` tag, ask Jev to pick the change-type from the
3324
+ * scenario plus the hunks of the files it covers. Confident answers are
3325
+ * written back with their confidence so every renderer can say "inferred";
3326
+ * the rest stay `unknown`.
3256
3327
  */
3328
+ declare function enrichReview(review: ReviewResult, jev: JevClient): Promise<ReviewResult>;
3257
3329
  declare function codeDiffDiagnostics(review: ReviewResult): string[];
3258
3330
 
3259
3331
  /**
@@ -3628,4 +3700,4 @@ declare function normalizeVitestResults(testModules: Parameters<typeof adaptVite
3628
3700
  */
3629
3701
  declare function normalizePlaywrightResults(testResults: Parameters<typeof adaptPlaywrightRun>[0], adapterOptions?: Parameters<typeof adaptPlaywrightRun>[1], canonicalizeOptions?: CanonicalizeOptions): TestRunResult;
3630
3702
 
3631
- export { type AdapterDeps, AgentTextFormatter, type AggregateDeps, type AggregateResult, type AnchorResolution, type AnchorState, type AstroAssetResult, AstroFormatter, type AstroFormatterOptions as AstroFormatterOpts, type AttachPolicy, type BehaviorDebuggerIssue, type BehaviorDiff, type BehaviorDiffEntry, type BehaviorManifest, BehaviorManifestJsonFormatter, type BehaviorManifestJsonOptions, type BehaviorSourceFile, type BehaviorTag, type BundleOptions, type BundleResult, type CaseBody, type CaseResult, type ChangeType, type ChangedFile, type ChangedFileReview, type CheckArgs, type CheckDeps, type CheckFailure, type CheckReport, type CheckStep, type CodeDiffAnnotation, type CodeDiffAnnotationInput, type CodeDiffEvidence, type CodeDiffInput, type CodeDiffScenarioRef, type CodeDiffSidecar, type CodeDiffSidecarAnnotation, type ColocatedStyle, type CompareFormat, type CompareFormatterOptions, type ConfluenceAuth, ConfluenceFormatter, type ConfluenceFormatterOptions as ConfluenceFormatterOpts, type CopyMarkdownAssetsOptions, type CoverageClass, type CoverageJson, CucumberHtmlFormatter, type CucumberHtmlOptions, CucumberJsonFormatter, type CucumberJsonOptions, CucumberMessagesFormatter, type CucumberMessagesOptions, DEFAULT_LOCKFILE_PATH, type DeploymentEntry, type DeploymentLedger, type DeploymentStatus, type DiffAnchor, type DiffHunk, type DiffLine, type DiffRunsOptions, type EnvironmentDrift, type EvidenceStrength, type ExecutableStoriesConfig, type FetchFn, type FileChangeKind, type FileDiff, type FlakinessLevel, type Formatter, type FormatterOptions, type GenerateArgs, type GenerateCompareResult, type GenerateDeps, type GenerateResult, type GenericWebhookNotifierOptions, type GoalArgs, type GoalDeps, type GoalReport, type GoalRequirementResult, type HistoryEntry, type HistoryStore, type IJsonDataTable, type IJsonDocString, type IJsonEmbedding, type IJsonFeature, type IJsonScenario, type IJsonStep, type IJsonStepArgument, type IJsonStepResult, type IJsonTableRow, type IJsonTag, JUnitFormatter, type JUnitOptions, type JiraAuth, type JiraPublishMode, type ListScenariosArgs, type ListScenariosDeps, type LockEntry, type Lockfile, type Logger, MIN_FLAKINESS_SAMPLES, MIN_METRIC_SAMPLES, MIN_PERF_SAMPLES, MarkdownFormatter, type MarkdownFormatterOptions, type MarkdownOptions, type MarkdownRenderers, type NotificationSummary, type NotifyCondition, type OutputConfig, type OutputFormat, type OutputMode, type OutputRule, PROVIDER_NAMES, type PerformanceTrend, type ProviderName, type PublishConfluenceArgs, type PublishConfluenceDeps, type PublishConfluenceResult, type PublishJiraArgs, type PublishJiraDeps, type PublishJiraResult, type RatchetViolation, type RecordDeploymentArgs, type RecordDeploymentResult, type RecordResultsSummary, type ReleaseManifest, ReleaseManifestFormatter, type RemoteCase, ReportGenerator, type ResolvedFormatterOptions, type ResultAttachment, type ReviewAudience, type ReviewBand, type ReviewClaim, type ReviewContext, ReviewHtmlFormatter, type ReviewHtmlOptions, ReviewMarkdownFormatter, type ReviewMarkdownOptions, type ReviewResult, type ReviewSummary, RunDiffChangelogFormatter, type RunDiffChangelogOptions, RunDiffHtmlFormatter, type RunDiffHtmlOptions, RunDiffMarkdownFormatter, type RunDiffMarkdownOptions, type RunDiffResult, type RunDiffSummary, type RunsResetResult, type RunsStatusReport, type ScenarioChangeFlags, type ScenarioChangeKind, type ScenarioDiff, type ScenarioIndex, type ScenarioIndexFilters, type ScenarioIndexItem, ScenarioIndexJsonFormatter, type ScenarioIndexJsonOptions, type ScenarioIndexStep, type ScenarioSnapshot, type SortTestCasesMode, type StabilityGrade, type StarlightBadge, StoryReportJsonFormatter, type StoryReportJsonOptions, type SyncAnalysis, type SyncApplyResult, type SyncEngineConfig, type SyncProvider, type SyncTargets, type TestHistory, type TestMetrics, type TestRailConfig, TraceabilityCsvFormatter, type TraceabilityMatrix, TraceabilityMatrixFormatter, type TraceabilityRequirement, type TriageArgs, type TriageDeps, type TriageItem, type TriageReport, type WatchDeps, type WatchHandle, type WatchOptions, type WebhookPayload, type WebhookSignerHmac, type WriteFile, type XrayConfig, adaptJestRun, adaptPlaywrightRun, adaptVitestRun, aggregateReports, analyzeSync, applySync, assembleCodeDiff, buildCheck, buildCoverageJson, buildGoal, buildProvider, buildReview, buildTriage, bundleAssets, calculateFlakiness, calculateStability, classifyStatusChange, clearVersionCache, codeDiffDiagnostics, collectAttachments, computeTestMetrics, copyMarkdownAssets, createAnchor, createPrCommentSummary, createReportGenerator, createTestRailProvider, createXrayProvider, deriveAudience, deriveChangeType, detectCI, detectPerformanceTrend, diffRuns, diffStoryReports, emptyLockfile, findGitDir, generateRunComparison, getDeploymentStatus, getEnvironmentDrift, gradeEvidence, hasSufficientHistory, hashCaseBody, isProviderName, isReviewableSource, isTestFile, joinNameAndExt, listScenarios, loadHistory, normalizeFormats, normalizeJestResults, normalizePlaywrightResults, normalizeVitestResults, parseLockfile, parseUnifiedDiff, projectBehaviours, publishConfluencePage, publishJiraIssue, readBranchName, readGitSha, readLockfile, readPackageVersion, recordDeployment, regenerateArtifacts, regenerateRun, relocateAnchor, renderApplyResult, renderCheck, renderCoverageMarkdown, renderCoverageText, renderGoal, renderPlan, renderTriage, rewriteAssetPaths, runsReset, runsStatus, saveHistory, scenariosCoveringPaths, sendNotifications, sendSlackNotification, sendTeamsNotification, sendWebhookNotification, serializeLockfile, signBody, startWatch, stripAnsi, toAgentText, toBehaviorManifest, toCaseBody, toReleaseManifest, toScenarioIndex, toTraceabilityMatrix, updateHistory, writeLockfile };
3703
+ export { type AdapterDeps, AgentTextFormatter, type AggregateDeps, type AggregateResult, type AnchorResolution, type AnchorState, type AstroAssetResult, AstroFormatter, type AstroFormatterOptions as AstroFormatterOpts, type AttachPolicy, type BehaviorDebuggerIssue, type BehaviorDiff, type BehaviorDiffEntry, type BehaviorManifest, BehaviorManifestJsonFormatter, type BehaviorManifestJsonOptions, type BehaviorSourceFile, type BehaviorTag, type BundleOptions, type BundleResult, type CaseBody, type CaseResult, type ChangeType, type ChangedFile, type ChangedFileReview, type CheckArgs, type CheckDeps, type CheckFailure, type CheckReport, type CheckStep, type CodeDiffAnnotation, type CodeDiffAnnotationInput, type CodeDiffEvidence, type CodeDiffInput, type CodeDiffScenarioRef, type CodeDiffSidecar, type CodeDiffSidecarAnnotation, type ColocatedStyle, type CompareFormat, type CompareFormatterOptions, type ConfluenceAuth, ConfluenceFormatter, type ConfluenceFormatterOptions as ConfluenceFormatterOpts, type CopyMarkdownAssetsOptions, type CoverageClass, type CoverageJson, CucumberHtmlFormatter, type CucumberHtmlOptions, CucumberJsonFormatter, type CucumberJsonOptions, CucumberMessagesFormatter, type CucumberMessagesOptions, DEFAULT_LOCKFILE_PATH, type DeploymentEntry, type DeploymentLedger, type DeploymentStatus, type DiffAnchor, type DiffHunk, type DiffLine, type DiffRunsOptions, type EnvironmentDrift, type EvidenceStrength, type ExecutableStoriesConfig, type FailureKind, type FetchFn, type FileChangeKind, type FileDiff, type FlakinessLevel, type Formatter, type FormatterOptions, type GenerateArgs, type GenerateCompareResult, type GenerateDeps, type GenerateResult, type GenericWebhookNotifierOptions, type GoalArgs, type GoalDeps, type GoalReport, type GoalRequirementResult, type HistoryEntry, type HistoryStore, type IJsonDataTable, type IJsonDocString, type IJsonEmbedding, type IJsonFeature, type IJsonScenario, type IJsonStep, type IJsonStepArgument, type IJsonStepResult, type IJsonTableRow, type IJsonTag, JUnitFormatter, type JUnitOptions, type JevAnswer, type JevClient, type JevQuestion, type JiraAuth, type JiraPublishMode, type ListScenariosArgs, type ListScenariosDeps, type LockEntry, type Lockfile, type Logger, MIN_FLAKINESS_SAMPLES, MIN_METRIC_SAMPLES, MIN_PERF_SAMPLES, MarkdownFormatter, type MarkdownFormatterOptions, type MarkdownOptions, type MarkdownRenderers, type NotificationSummary, type NotifyCondition, type OutputConfig, type OutputFormat, type OutputMode, type OutputRule, PROVIDER_NAMES, type PerformanceTrend, type ProviderName, type PublishConfluenceArgs, type PublishConfluenceDeps, type PublishConfluenceResult, type PublishJiraArgs, type PublishJiraDeps, type PublishJiraResult, type RatchetViolation, type RecordDeploymentArgs, type RecordDeploymentResult, type RecordResultsSummary, type ReleaseManifest, ReleaseManifestFormatter, type RemoteCase, ReportGenerator, type ResolvedFormatterOptions, type ResultAttachment, type ReviewAudience, type ReviewBand, type ReviewClaim, type ReviewContext, ReviewHtmlFormatter, type ReviewHtmlOptions, ReviewMarkdownFormatter, type ReviewMarkdownOptions, type ReviewResult, type ReviewSummary, RunDiffChangelogFormatter, type RunDiffChangelogOptions, RunDiffHtmlFormatter, type RunDiffHtmlOptions, RunDiffMarkdownFormatter, type RunDiffMarkdownOptions, type RunDiffResult, type RunDiffSummary, type RunsResetResult, type RunsStatusReport, type ScenarioChangeFlags, type ScenarioChangeKind, type ScenarioDiff, type ScenarioIndex, type ScenarioIndexFilters, type ScenarioIndexItem, ScenarioIndexJsonFormatter, type ScenarioIndexJsonOptions, type ScenarioIndexStep, type ScenarioSnapshot, type SortTestCasesMode, type StabilityGrade, type StarlightBadge, StoryReportJsonFormatter, type StoryReportJsonOptions, type SyncAnalysis, type SyncApplyResult, type SyncEngineConfig, type SyncProvider, type SyncTargets, type TestHistory, type TestMetrics, type TestRailConfig, TraceabilityCsvFormatter, type TraceabilityMatrix, TraceabilityMatrixFormatter, type TraceabilityRequirement, type TriageArgs, type TriageDeps, type TriageItem, type TriageReport, type WatchDeps, type WatchHandle, type WatchOptions, type WebhookPayload, type WebhookSignerHmac, type WriteFile, type XrayConfig, adaptJestRun, adaptPlaywrightRun, adaptVitestRun, aggregateReports, analyzeSync, applySync, assembleCodeDiff, buildCheck, buildCoverageJson, buildGoal, buildProvider, buildReview, buildTriage, bundleAssets, calculateFlakiness, calculateStability, classifyStatusChange, clearVersionCache, codeDiffDiagnostics, collectAttachments, computeTestMetrics, copyMarkdownAssets, createAnchor, createJevClient, createPrCommentSummary, createReportGenerator, createTestRailProvider, createXrayProvider, deriveAudience, deriveChangeType, detectCI, detectPerformanceTrend, diffRuns, diffStoryReports, emptyLockfile, enrichGoal, enrichReview, enrichTriage, findGitDir, generateRunComparison, getDeploymentStatus, getEnvironmentDrift, gradeEvidence, hasSufficientHistory, hashCaseBody, isProviderName, isReviewableSource, isTestFile, jevFromEnv, joinNameAndExt, listScenarios, loadHistory, normalizeFormats, normalizeJestResults, normalizePlaywrightResults, normalizeVitestResults, parseLockfile, parseUnifiedDiff, projectBehaviours, publishConfluencePage, publishJiraIssue, readBranchName, readGitSha, readLockfile, readPackageVersion, recordDeployment, regenerateArtifacts, regenerateRun, relocateAnchor, renderApplyResult, renderCheck, renderCoverageMarkdown, renderCoverageText, renderGoal, renderPlan, renderTriage, rewriteAssetPaths, runsReset, runsStatus, saveHistory, scenariosCoveringPaths, sendNotifications, sendSlackNotification, sendTeamsNotification, sendWebhookNotification, serializeLockfile, signBody, startWatch, stripAnsi, toAgentText, toBehaviorManifest, toCaseBody, toReleaseManifest, toScenarioIndex, toTraceabilityMatrix, updateHistory, writeLockfile };