executable-stories-formatters 1.3.0 → 1.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/cli.js +1706 -350
- package/dist/cli.js.map +1 -1
- package/dist/index.cjs +720 -137
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +247 -1
- package/dist/index.d.ts +247 -1
- package/dist/index.js +715 -137
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/schemas/raw-run.schema.json +427 -106
- package/templates/astro-thin/astro.config.mjs +6 -22
- package/templates/astro-thin/executable-stories.config.mjs +5 -0
- package/templates/astro-thin/reports/sample-run.json +108 -27
- package/templates/astro-thin/src/content/docs/guides/writing-docs.mdx +51 -0
- package/templates/astro-thin/src/content/docs/index.mdx +7 -0
package/dist/index.d.cts
CHANGED
|
@@ -928,6 +928,69 @@ interface StoryReport {
|
|
|
928
928
|
declare const STORY_REPORT_SCHEMA_VERSION: StoryReportSchemaVersion;
|
|
929
929
|
declare const STORY_REPORT_SCHEMA_MAJOR: 1;
|
|
930
930
|
|
|
931
|
+
/**
|
|
932
|
+
* Diff types — parsed unified patches and content-anchored annotation targets.
|
|
933
|
+
*
|
|
934
|
+
* These are contract types: they serialize into the review result JSON
|
|
935
|
+
* (`ReviewResult.codeDiffs`), so they live in the type layer like every other
|
|
936
|
+
* review contract. The parsing/anchoring implementation is `review/diff-anchor`.
|
|
937
|
+
*/
|
|
938
|
+
/** One line of a hunk body. */
|
|
939
|
+
interface DiffLine {
|
|
940
|
+
kind: "add" | "del" | "context";
|
|
941
|
+
text: string;
|
|
942
|
+
}
|
|
943
|
+
/** One `@@` hunk. */
|
|
944
|
+
interface DiffHunk {
|
|
945
|
+
oldStart: number;
|
|
946
|
+
newStart: number;
|
|
947
|
+
/** Trailing section heading from the `@@` line, if any. */
|
|
948
|
+
header: string;
|
|
949
|
+
lines: DiffLine[];
|
|
950
|
+
}
|
|
951
|
+
/** One file's diff. `oldPath`/`newPath` are undefined for /dev/null (add/delete). */
|
|
952
|
+
interface FileDiff {
|
|
953
|
+
oldPath?: string;
|
|
954
|
+
newPath?: string;
|
|
955
|
+
hunks: DiffHunk[];
|
|
956
|
+
}
|
|
957
|
+
/**
|
|
958
|
+
* A content-anchored annotation target. Stores the actual lines (relocation
|
|
959
|
+
* needs them for fuzzy matching); `hash` is the derived stable identity.
|
|
960
|
+
*/
|
|
961
|
+
interface DiffAnchor {
|
|
962
|
+
/** sha256 over normalized changed + context lines — stable identity. */
|
|
963
|
+
hash: string;
|
|
964
|
+
/** Path hint (file the anchor was created in). Preferred during relocation, but anchors survive renames. */
|
|
965
|
+
file: string;
|
|
966
|
+
/** The anchored changed lines (add/del), in order. Never dropped during fuzz. */
|
|
967
|
+
changed: Array<{
|
|
968
|
+
kind: "add" | "del";
|
|
969
|
+
text: string;
|
|
970
|
+
}>;
|
|
971
|
+
/** Hunk lines preceding the changed run (outermost first). */
|
|
972
|
+
contextBefore: string[];
|
|
973
|
+
/** Hunk lines following the changed run (innermost first). */
|
|
974
|
+
contextAfter: string[];
|
|
975
|
+
}
|
|
976
|
+
type AnchorState = "anchored" | "ambiguous" | "orphaned";
|
|
977
|
+
/** Where (and whether) an anchor relocated in a regenerated patch. */
|
|
978
|
+
interface AnchorResolution {
|
|
979
|
+
state: AnchorState;
|
|
980
|
+
/** The remaining fields are set together when `state` is `anchored`: */
|
|
981
|
+
/** Index into the parsed files array — renderers index directly, no path search. */
|
|
982
|
+
fileIndex?: number;
|
|
983
|
+
/** Display path of the matched file. */
|
|
984
|
+
file?: string;
|
|
985
|
+
hunkIndex?: number;
|
|
986
|
+
/** Index within `hunk.lines` of the first changed line. */
|
|
987
|
+
lineIndex?: number;
|
|
988
|
+
/** Length of the anchored changed run (for highlighting). */
|
|
989
|
+
lineCount?: number;
|
|
990
|
+
/** How many outermost context lines (per side) were ignored to match. */
|
|
991
|
+
fuzz?: number;
|
|
992
|
+
}
|
|
993
|
+
|
|
931
994
|
/**
|
|
932
995
|
* Review types — the model behind the Evidence-Driven Review report.
|
|
933
996
|
*
|
|
@@ -979,6 +1042,75 @@ interface ReviewContext {
|
|
|
979
1042
|
baseRef?: string;
|
|
980
1043
|
/** Head ref/sha (informational). */
|
|
981
1044
|
headRef?: string;
|
|
1045
|
+
/** Code Diff evidence groups (patch + annotation sidecar), supplied at the CLI/Action layer. */
|
|
1046
|
+
codeDiffs?: CodeDiffInput[];
|
|
1047
|
+
}
|
|
1048
|
+
/** One annotation from the Code Diff sidecar, ordered by concept (not Git file order). */
|
|
1049
|
+
interface CodeDiffAnnotationInput {
|
|
1050
|
+
/**
|
|
1051
|
+
* Content anchor — never a bare line number (see `review/diff-anchor`).
|
|
1052
|
+
* Absent when assembly could not produce one; `unresolved` then names the state.
|
|
1053
|
+
*/
|
|
1054
|
+
anchor?: DiffAnchor;
|
|
1055
|
+
/**
|
|
1056
|
+
* Set instead of `anchor` when assembly failed: `orphaned` (no matching
|
|
1057
|
+
* changed line) or `ambiguous` (the match was not unique). Rendered as that
|
|
1058
|
+
* state directly, so authoring mistakes surface visibly.
|
|
1059
|
+
*/
|
|
1060
|
+
unresolved?: "orphaned" | "ambiguous";
|
|
1061
|
+
/** Explanatory prose (plain text — rendered verbatim, never as HTML or Markdown). */
|
|
1062
|
+
text: string;
|
|
1063
|
+
/** Short conceptual label (drives the outline ordering). */
|
|
1064
|
+
label?: string;
|
|
1065
|
+
/** StoryReport scenario IDs whose execution proves this hunk's effect. */
|
|
1066
|
+
scenarioIds?: string[];
|
|
1067
|
+
}
|
|
1068
|
+
/** One Code Diff evidence group fed in at the CLI/Action layer — NEVER by adapters. */
|
|
1069
|
+
interface CodeDiffInput {
|
|
1070
|
+
/** Human title for this evidence group. */
|
|
1071
|
+
title: string;
|
|
1072
|
+
/** Unified diff content, expected from `git diff --histogram`. */
|
|
1073
|
+
patch: string;
|
|
1074
|
+
/**
|
|
1075
|
+
* Canonical HTTPS patch URL — audit provenance only, never a second render
|
|
1076
|
+
* source. Only `https:` URLs render as links; anything else renders inert.
|
|
1077
|
+
*/
|
|
1078
|
+
patchUrl?: string;
|
|
1079
|
+
/** Human comparison labels; default from `baseRef`/`headRef`. */
|
|
1080
|
+
baseLabel?: string;
|
|
1081
|
+
headLabel?: string;
|
|
1082
|
+
annotations: CodeDiffAnnotationInput[];
|
|
1083
|
+
}
|
|
1084
|
+
/** A scenario cited by an annotation, resolved against the current run. */
|
|
1085
|
+
interface CodeDiffScenarioRef {
|
|
1086
|
+
id: string;
|
|
1087
|
+
/** False = the cited scenario is not in this run — render as "unverified reference". */
|
|
1088
|
+
resolved: boolean;
|
|
1089
|
+
scenario?: string;
|
|
1090
|
+
status?: TestStatus$1;
|
|
1091
|
+
}
|
|
1092
|
+
/** An annotation resolved against the parsed patch and the run. */
|
|
1093
|
+
interface CodeDiffAnnotation {
|
|
1094
|
+
/** Stable identity of the content anchor. Absent when assembly never produced one. */
|
|
1095
|
+
anchorHash?: string;
|
|
1096
|
+
/** Plain-text prose, rendered verbatim. */
|
|
1097
|
+
text: string;
|
|
1098
|
+
label?: string;
|
|
1099
|
+
/** anchored / ambiguous / orphaned — ambiguous and orphaned render visibly, never guessed. */
|
|
1100
|
+
resolution: AnchorResolution;
|
|
1101
|
+
scenarios: CodeDiffScenarioRef[];
|
|
1102
|
+
}
|
|
1103
|
+
/** Code Diff evidence on the review result, ready for formatters to render. */
|
|
1104
|
+
interface CodeDiffEvidence {
|
|
1105
|
+
title: string;
|
|
1106
|
+
/** The raw unified patch (audit fallback; renderers escape it as text). */
|
|
1107
|
+
patch: string;
|
|
1108
|
+
patchUrl?: string;
|
|
1109
|
+
baseLabel?: string;
|
|
1110
|
+
headLabel?: string;
|
|
1111
|
+
/** Parsed files/hunks so renderers never re-parse. */
|
|
1112
|
+
files: FileDiff[];
|
|
1113
|
+
annotations: CodeDiffAnnotation[];
|
|
982
1114
|
}
|
|
983
1115
|
/** One reviewable claim = one story/test case, enriched for review. */
|
|
984
1116
|
interface ReviewClaim {
|
|
@@ -1038,6 +1170,8 @@ interface ReviewResult {
|
|
|
1038
1170
|
claims: ReviewClaim[];
|
|
1039
1171
|
/** Changed source files, sorted uncovered → weak → covered. */
|
|
1040
1172
|
changedFiles: ChangedFileReview[];
|
|
1173
|
+
/** Code Diff evidence groups (empty when the context supplied none). */
|
|
1174
|
+
codeDiffs: CodeDiffEvidence[];
|
|
1041
1175
|
}
|
|
1042
1176
|
|
|
1043
1177
|
/**
|
|
@@ -2978,6 +3112,104 @@ declare function gradeEvidence(testCase: TestCaseResult, audience: ReviewAudienc
|
|
|
2978
3112
|
* banded — the 🔴 uncovered band being the reviewer's first stop.
|
|
2979
3113
|
*/
|
|
2980
3114
|
declare function buildReview(run: ReviewResult["run"], context?: ReviewContext): ReviewResult;
|
|
3115
|
+
/**
|
|
3116
|
+
* Code Diff integrity diagnostics: orphaned/ambiguous anchors and unverified
|
|
3117
|
+
* scenario references. The CLI prints these as warnings; `--strict-code-diff`
|
|
3118
|
+
* turns them into review-gate failures so CI catches explainers that lost
|
|
3119
|
+
* their grounding.
|
|
3120
|
+
*/
|
|
3121
|
+
declare function codeDiffDiagnostics(review: ReviewResult): string[];
|
|
3122
|
+
|
|
3123
|
+
/**
|
|
3124
|
+
* Code Diff sidecar assembly — the authoring seam for Code Diff evidence.
|
|
3125
|
+
*
|
|
3126
|
+
* Authors (normally the `explain-change` skill) never hand-write content
|
|
3127
|
+
* anchors. The sidecar names a file and a unique substring of one changed
|
|
3128
|
+
* line; assembly locates that line in the `git diff --histogram` patch and
|
|
3129
|
+
* builds the real content anchor from it. A match that fails to locate still
|
|
3130
|
+
* produces an annotation, explicitly marked `unresolved` (orphaned or
|
|
3131
|
+
* ambiguous), so authoring mistakes surface visibly instead of disappearing.
|
|
3132
|
+
*/
|
|
3133
|
+
|
|
3134
|
+
/** Hand-authored (or agent-authored) annotation entry in the sidecar file. */
|
|
3135
|
+
interface CodeDiffSidecarAnnotation {
|
|
3136
|
+
/** Repo-relative path of the changed file. */
|
|
3137
|
+
file: string;
|
|
3138
|
+
/** Substring of exactly one changed line in the patch. */
|
|
3139
|
+
match: string;
|
|
3140
|
+
/** Explanatory prose (plain text — rendered verbatim). */
|
|
3141
|
+
text: string;
|
|
3142
|
+
label?: string;
|
|
3143
|
+
scenarioIds?: string[];
|
|
3144
|
+
}
|
|
3145
|
+
/** The sidecar document (JSON). The patch itself is supplied separately. */
|
|
3146
|
+
interface CodeDiffSidecar {
|
|
3147
|
+
title: string;
|
|
3148
|
+
/** Canonical HTTPS patch URL — audit provenance only. */
|
|
3149
|
+
patchUrl?: string;
|
|
3150
|
+
baseLabel?: string;
|
|
3151
|
+
headLabel?: string;
|
|
3152
|
+
/** Ordered by concept, not Git file order. */
|
|
3153
|
+
annotations: CodeDiffSidecarAnnotation[];
|
|
3154
|
+
}
|
|
3155
|
+
/**
|
|
3156
|
+
* Assemble a {@link CodeDiffInput} from a sidecar and a unified patch.
|
|
3157
|
+
* Returns authoring warnings alongside — a located match gets a real content
|
|
3158
|
+
* anchor; a missed or non-unique match gets a bare anchor that resolves
|
|
3159
|
+
* orphaned, plus a warning saying why.
|
|
3160
|
+
*/
|
|
3161
|
+
declare function assembleCodeDiff(args: {
|
|
3162
|
+
sidecar: CodeDiffSidecar;
|
|
3163
|
+
patch: string;
|
|
3164
|
+
}): {
|
|
3165
|
+
input: CodeDiffInput;
|
|
3166
|
+
warnings: string[];
|
|
3167
|
+
};
|
|
3168
|
+
|
|
3169
|
+
/**
|
|
3170
|
+
* Diff anchoring — content-anchored annotation targets for Code Diff evidence.
|
|
3171
|
+
*
|
|
3172
|
+
* An annotation must stay attached to the right hunk after the patch is
|
|
3173
|
+
* regenerated (which, for AI-authored changes, happens constantly). Line
|
|
3174
|
+
* numbers are the wrong key: they detach on rebase/force-push. This module
|
|
3175
|
+
* anchors by content instead, the way `patch(1)` does — the anchor is the
|
|
3176
|
+
* changed lines plus a bounded window of surrounding context, and relocation
|
|
3177
|
+
* matches that content in the new patch with progressive fuzz (outermost
|
|
3178
|
+
* context lines are dropped first; the changed lines are never dropped).
|
|
3179
|
+
*
|
|
3180
|
+
* Resolution states:
|
|
3181
|
+
* - `anchored` — exactly one match above the fuzz threshold.
|
|
3182
|
+
* - `ambiguous` — multiple matches (e.g. duplicate identical lines); the
|
|
3183
|
+
* annotation must render visibly un-located, never guessed.
|
|
3184
|
+
* - `orphaned` — no match; the annotation renders with a "could not locate
|
|
3185
|
+
* in current patch" notice, never silently reattached.
|
|
3186
|
+
*
|
|
3187
|
+
* Pure functions, no I/O — patches are generated at the CLI/Action layer
|
|
3188
|
+
* (with `git diff --histogram` for hunk stability), never by adapters.
|
|
3189
|
+
*/
|
|
3190
|
+
|
|
3191
|
+
/**
|
|
3192
|
+
* Parse a unified diff into files and hunks. Hunk bodies are consumed by
|
|
3193
|
+
* line count from the `@@` header, so content lines that look like file
|
|
3194
|
+
* headers (e.g. a context line starting with `--- `) parse correctly.
|
|
3195
|
+
*/
|
|
3196
|
+
declare function parseUnifiedDiff(patch: string): FileDiff[];
|
|
3197
|
+
/**
|
|
3198
|
+
* Create an anchor for the contiguous run of changed lines starting at
|
|
3199
|
+
* `lines[lineIndex]` in the given hunk (the authoring seam — used by the
|
|
3200
|
+
* CLI/sidecar assembly helper, not by hand).
|
|
3201
|
+
*/
|
|
3202
|
+
declare function createAnchor(args: {
|
|
3203
|
+
file: FileDiff;
|
|
3204
|
+
hunkIndex: number;
|
|
3205
|
+
lineIndex: number;
|
|
3206
|
+
}): DiffAnchor;
|
|
3207
|
+
/**
|
|
3208
|
+
* Relocate an anchor in a (re)generated patch. The anchor's own file is
|
|
3209
|
+
* searched first so a duplicate block elsewhere in the repo cannot make an
|
|
3210
|
+
* exact in-file match ambiguous; other files are the rename fallback.
|
|
3211
|
+
*/
|
|
3212
|
+
declare function relocateAnchor(anchor: DiffAnchor, files: FileDiff[]): AnchorResolution;
|
|
2981
3213
|
|
|
2982
3214
|
/**
|
|
2983
3215
|
* Convention-based derivation for the review report.
|
|
@@ -3271,6 +3503,20 @@ declare class ReportGenerator {
|
|
|
3271
3503
|
* @returns Map of output format to generated file paths
|
|
3272
3504
|
*/
|
|
3273
3505
|
generate(run: TestRunResult): Promise<GenerateResult>;
|
|
3506
|
+
/**
|
|
3507
|
+
* Whether any output is colocated — the global mode, or any per-rule mode.
|
|
3508
|
+
* A colocated rule under a global aggregated mode still writes per-file
|
|
3509
|
+
* reports that need an index.
|
|
3510
|
+
*/
|
|
3511
|
+
private hasColocatedOutput;
|
|
3512
|
+
/**
|
|
3513
|
+
* Write the entry-point page for a colocated HTML report tree. `htmlPaths` is
|
|
3514
|
+
* every HTML report already written this run. Returns the path written, or
|
|
3515
|
+
* undefined when there is nothing to index or the index would clobber a report
|
|
3516
|
+
* already at `index.html` — a colocated source file that produces it, or, in
|
|
3517
|
+
* mixed mode, the global aggregate (whose default output name is also index).
|
|
3518
|
+
*/
|
|
3519
|
+
private writeColocatedIndex;
|
|
3274
3520
|
/**
|
|
3275
3521
|
* Generate reports for a single format.
|
|
3276
3522
|
*/
|
|
@@ -3321,4 +3567,4 @@ declare function normalizeVitestResults(testModules: Parameters<typeof adaptVite
|
|
|
3321
3567
|
*/
|
|
3322
3568
|
declare function normalizePlaywrightResults(testResults: Parameters<typeof adaptPlaywrightRun>[0], adapterOptions?: Parameters<typeof adaptPlaywrightRun>[1], canonicalizeOptions?: CanonicalizeOptions): TestRunResult;
|
|
3323
3569
|
|
|
3324
|
-
export { type AstroAssetResult, AstroFormatter, type AstroFormatterOptions as AstroFormatterOpts, Attachment, type BehaviorDebuggerIssue, type BehaviorDiff, type BehaviorDiffEntry, type BehaviorManifest, BehaviorManifestJsonFormatter, type BehaviorManifestJsonOptions, type BehaviorSourceFile, type BehaviorTag, type BundleOptions, type BundleResult, CIProvider, type CanonicalizeOptions, type ChangeType, type ChangedFile, type ChangedFileReview, type CheckArgs, type CheckDeps, type CheckFailure, type CheckReport, type CheckStep, type ColocatedStyle, type CompareFormat, type CompareFormatterOptions, type ConfluenceAuth, ConfluenceFormatter, type ConfluenceFormatterOptions as ConfluenceFormatterOpts, type CopyMarkdownAssetsOptions, CucumberHtmlFormatter, type CucumberHtmlOptions, CucumberJsonFormatter, type CucumberJsonOptions, CucumberMessagesFormatter, type CucumberMessagesOptions, type DeploymentEntry, type DeploymentLedger, type DeploymentStatus, DocEntry, DocPhase, ES_THEME_TOKENS_CSS, ES_THEME_TOKEN_VALUES, type EnvironmentDrift, type EvidenceStrength, type ExecutableStoriesConfig, type FetchFn, type FileChangeKind, 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 HtmlDocOptions, 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 Logger, MIN_FLAKINESS_SAMPLES, MIN_METRIC_SAMPLES, MIN_PERF_SAMPLES, MarkdownFormatter, type MarkdownFormatterOptions, type MarkdownOptions, type MarkdownRenderers, NormalizedTicket, type NotificationSummary, type NotifyCondition, OtelSpan, type OtelTraceContext, type OutputConfig, type OutputFormat, type OutputMode, type OutputRule, type PerformanceTrend, type PublishConfluenceArgs, type PublishConfluenceDeps, type PublishConfluenceResult, type PublishJiraArgs, type PublishJiraDeps, type PublishJiraResult, type RatchetViolation, RawAttachment, RawCIInfo, RawRun, RawStatus, type RecordDeploymentArgs, type RecordDeploymentResult, type ReleaseManifest, ReleaseManifestFormatter, type ReportAttachment, type ReportCIInfo, type ReportCoverageSummary, type ReportDocCode, type ReportDocCustom, type ReportDocEntry, type ReportDocKv, type ReportDocLink, type ReportDocMermaid, type ReportDocNote, type ReportDocScreenshot, type ReportDocSection, type ReportDocTable, type ReportDocTag, type ReportFeature, ReportGenerator, type ReportScenario, type ReportStep, type ReportSummary, type ReportTicket, type ResolvedFormatterOptions, 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 RunState, STORY_REPORT_SCHEMA_MAJOR, STORY_REPORT_SCHEMA_VERSION, 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, StepKeyword$1 as StepKeyword, StepResult, type StoryReport, StoryReportJsonFormatter, type StoryReportJsonOptions, type StoryReportSchemaVersion, StoryStep, TestCaseResult, type TestHistory, type TestMetrics, TestRunResult, TestStatus$1 as TestStatus, type TraceabilityMatrix, TraceabilityMatrixFormatter, type TraceabilityRequirement, type TriageArgs, type TriageDeps, type TriageItem, type TriageReport, CIInfo$1 as TypedCIInfo, type ValidationResult, type WatchDeps, type WatchHandle, type WatchOptions, type WebhookPayload, type WebhookSignerHmac, type WriteFile, adaptJestRun, adaptPlaywrightRun, adaptVitestRun, advanceState, assertValidRun, buildCheck, buildGoal, buildHtmlDocEntry, buildReview, buildTriage, bundleAssets, calculateFlakiness, calculateStability, canonicalizeRun, classifyStatusChange, clearVersionCache, computeTestMetrics, copyMarkdownAssets, createPrCommentSummary, createReportGenerator, deriveAudience, deriveChangeType, deriveStepResults, detectCI, detectPerformanceTrend, diffRuns, diffStoryReports, findGitDir, formatDuration, generateRunComparison, generateRunId, generateTestCaseId, getDeploymentStatus, getEnvironmentDrift, gradeEvidence, hasSufficientHistory, initialRunState, isReviewableSource, isTestFile, joinNameAndExt, listScenarios, loadHistory, mergeStepResults, msToNanoseconds, nanosecondsToMs, normalizeFormats, normalizeJestResults, normalizePlaywrightResults, normalizeStatus, normalizeVitestResults, parseEnvelopes, parseNdjson, publishConfluencePage, publishJiraIssue, readBranchName, readGitSha, readPackageVersion, recordDeployment, regenerateArtifacts, regenerateRun, renderCheck, renderGoal, renderTriage, resolveAttachment, resolveAttachments, resolveTraceUrl, rewriteAssetPaths, saveHistory, scenariosCoveringPaths, sendNotifications, sendSlackNotification, sendTeamsNotification, sendWebhookNotification, signBody, slugify, startWatch, stripAnsi, toBehaviorManifest, toReleaseManifest, toScenarioIndex, toStoryReport, toTraceabilityMatrix, tryGetActiveOtelContext, updateHistory, validateCanonicalRun };
|
|
3570
|
+
export { type AnchorResolution, type AnchorState, type AstroAssetResult, AstroFormatter, type AstroFormatterOptions as AstroFormatterOpts, Attachment, type BehaviorDebuggerIssue, type BehaviorDiff, type BehaviorDiffEntry, type BehaviorManifest, BehaviorManifestJsonFormatter, type BehaviorManifestJsonOptions, type BehaviorSourceFile, type BehaviorTag, type BundleOptions, type BundleResult, CIProvider, type CanonicalizeOptions, 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, CucumberHtmlFormatter, type CucumberHtmlOptions, CucumberJsonFormatter, type CucumberJsonOptions, CucumberMessagesFormatter, type CucumberMessagesOptions, type DeploymentEntry, type DeploymentLedger, type DeploymentStatus, type DiffAnchor, type DiffHunk, type DiffLine, DocEntry, DocPhase, ES_THEME_TOKENS_CSS, ES_THEME_TOKEN_VALUES, 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 HtmlDocOptions, 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 Logger, MIN_FLAKINESS_SAMPLES, MIN_METRIC_SAMPLES, MIN_PERF_SAMPLES, MarkdownFormatter, type MarkdownFormatterOptions, type MarkdownOptions, type MarkdownRenderers, NormalizedTicket, type NotificationSummary, type NotifyCondition, OtelSpan, type OtelTraceContext, type OutputConfig, type OutputFormat, type OutputMode, type OutputRule, type PerformanceTrend, type PublishConfluenceArgs, type PublishConfluenceDeps, type PublishConfluenceResult, type PublishJiraArgs, type PublishJiraDeps, type PublishJiraResult, type RatchetViolation, RawAttachment, RawCIInfo, RawRun, RawStatus, type RecordDeploymentArgs, type RecordDeploymentResult, type ReleaseManifest, ReleaseManifestFormatter, type ReportAttachment, type ReportCIInfo, type ReportCoverageSummary, type ReportDocCode, type ReportDocCustom, type ReportDocEntry, type ReportDocKv, type ReportDocLink, type ReportDocMermaid, type ReportDocNote, type ReportDocScreenshot, type ReportDocSection, type ReportDocTable, type ReportDocTag, type ReportFeature, ReportGenerator, type ReportScenario, type ReportStep, type ReportSummary, type ReportTicket, type ResolvedFormatterOptions, 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 RunState, STORY_REPORT_SCHEMA_MAJOR, STORY_REPORT_SCHEMA_VERSION, 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, StepKeyword$1 as StepKeyword, StepResult, type StoryReport, StoryReportJsonFormatter, type StoryReportJsonOptions, type StoryReportSchemaVersion, StoryStep, TestCaseResult, type TestHistory, type TestMetrics, TestRunResult, TestStatus$1 as TestStatus, type TraceabilityMatrix, TraceabilityMatrixFormatter, type TraceabilityRequirement, type TriageArgs, type TriageDeps, type TriageItem, type TriageReport, CIInfo$1 as TypedCIInfo, type ValidationResult, type WatchDeps, type WatchHandle, type WatchOptions, type WebhookPayload, type WebhookSignerHmac, type WriteFile, adaptJestRun, adaptPlaywrightRun, adaptVitestRun, advanceState, assembleCodeDiff, assertValidRun, buildCheck, buildGoal, buildHtmlDocEntry, buildReview, buildTriage, bundleAssets, calculateFlakiness, calculateStability, canonicalizeRun, classifyStatusChange, clearVersionCache, codeDiffDiagnostics, computeTestMetrics, copyMarkdownAssets, createAnchor, createPrCommentSummary, createReportGenerator, deriveAudience, deriveChangeType, deriveStepResults, detectCI, detectPerformanceTrend, diffRuns, diffStoryReports, findGitDir, formatDuration, generateRunComparison, generateRunId, generateTestCaseId, getDeploymentStatus, getEnvironmentDrift, gradeEvidence, hasSufficientHistory, initialRunState, isReviewableSource, isTestFile, joinNameAndExt, listScenarios, loadHistory, mergeStepResults, msToNanoseconds, nanosecondsToMs, normalizeFormats, normalizeJestResults, normalizePlaywrightResults, normalizeStatus, normalizeVitestResults, parseEnvelopes, parseNdjson, parseUnifiedDiff, publishConfluencePage, publishJiraIssue, readBranchName, readGitSha, readPackageVersion, recordDeployment, regenerateArtifacts, regenerateRun, relocateAnchor, renderCheck, renderGoal, renderTriage, resolveAttachment, resolveAttachments, resolveTraceUrl, rewriteAssetPaths, saveHistory, scenariosCoveringPaths, sendNotifications, sendSlackNotification, sendTeamsNotification, sendWebhookNotification, signBody, slugify, startWatch, stripAnsi, toBehaviorManifest, toReleaseManifest, toScenarioIndex, toStoryReport, toTraceabilityMatrix, tryGetActiveOtelContext, updateHistory, validateCanonicalRun };
|
package/dist/index.d.ts
CHANGED
|
@@ -928,6 +928,69 @@ interface StoryReport {
|
|
|
928
928
|
declare const STORY_REPORT_SCHEMA_VERSION: StoryReportSchemaVersion;
|
|
929
929
|
declare const STORY_REPORT_SCHEMA_MAJOR: 1;
|
|
930
930
|
|
|
931
|
+
/**
|
|
932
|
+
* Diff types — parsed unified patches and content-anchored annotation targets.
|
|
933
|
+
*
|
|
934
|
+
* These are contract types: they serialize into the review result JSON
|
|
935
|
+
* (`ReviewResult.codeDiffs`), so they live in the type layer like every other
|
|
936
|
+
* review contract. The parsing/anchoring implementation is `review/diff-anchor`.
|
|
937
|
+
*/
|
|
938
|
+
/** One line of a hunk body. */
|
|
939
|
+
interface DiffLine {
|
|
940
|
+
kind: "add" | "del" | "context";
|
|
941
|
+
text: string;
|
|
942
|
+
}
|
|
943
|
+
/** One `@@` hunk. */
|
|
944
|
+
interface DiffHunk {
|
|
945
|
+
oldStart: number;
|
|
946
|
+
newStart: number;
|
|
947
|
+
/** Trailing section heading from the `@@` line, if any. */
|
|
948
|
+
header: string;
|
|
949
|
+
lines: DiffLine[];
|
|
950
|
+
}
|
|
951
|
+
/** One file's diff. `oldPath`/`newPath` are undefined for /dev/null (add/delete). */
|
|
952
|
+
interface FileDiff {
|
|
953
|
+
oldPath?: string;
|
|
954
|
+
newPath?: string;
|
|
955
|
+
hunks: DiffHunk[];
|
|
956
|
+
}
|
|
957
|
+
/**
|
|
958
|
+
* A content-anchored annotation target. Stores the actual lines (relocation
|
|
959
|
+
* needs them for fuzzy matching); `hash` is the derived stable identity.
|
|
960
|
+
*/
|
|
961
|
+
interface DiffAnchor {
|
|
962
|
+
/** sha256 over normalized changed + context lines — stable identity. */
|
|
963
|
+
hash: string;
|
|
964
|
+
/** Path hint (file the anchor was created in). Preferred during relocation, but anchors survive renames. */
|
|
965
|
+
file: string;
|
|
966
|
+
/** The anchored changed lines (add/del), in order. Never dropped during fuzz. */
|
|
967
|
+
changed: Array<{
|
|
968
|
+
kind: "add" | "del";
|
|
969
|
+
text: string;
|
|
970
|
+
}>;
|
|
971
|
+
/** Hunk lines preceding the changed run (outermost first). */
|
|
972
|
+
contextBefore: string[];
|
|
973
|
+
/** Hunk lines following the changed run (innermost first). */
|
|
974
|
+
contextAfter: string[];
|
|
975
|
+
}
|
|
976
|
+
type AnchorState = "anchored" | "ambiguous" | "orphaned";
|
|
977
|
+
/** Where (and whether) an anchor relocated in a regenerated patch. */
|
|
978
|
+
interface AnchorResolution {
|
|
979
|
+
state: AnchorState;
|
|
980
|
+
/** The remaining fields are set together when `state` is `anchored`: */
|
|
981
|
+
/** Index into the parsed files array — renderers index directly, no path search. */
|
|
982
|
+
fileIndex?: number;
|
|
983
|
+
/** Display path of the matched file. */
|
|
984
|
+
file?: string;
|
|
985
|
+
hunkIndex?: number;
|
|
986
|
+
/** Index within `hunk.lines` of the first changed line. */
|
|
987
|
+
lineIndex?: number;
|
|
988
|
+
/** Length of the anchored changed run (for highlighting). */
|
|
989
|
+
lineCount?: number;
|
|
990
|
+
/** How many outermost context lines (per side) were ignored to match. */
|
|
991
|
+
fuzz?: number;
|
|
992
|
+
}
|
|
993
|
+
|
|
931
994
|
/**
|
|
932
995
|
* Review types — the model behind the Evidence-Driven Review report.
|
|
933
996
|
*
|
|
@@ -979,6 +1042,75 @@ interface ReviewContext {
|
|
|
979
1042
|
baseRef?: string;
|
|
980
1043
|
/** Head ref/sha (informational). */
|
|
981
1044
|
headRef?: string;
|
|
1045
|
+
/** Code Diff evidence groups (patch + annotation sidecar), supplied at the CLI/Action layer. */
|
|
1046
|
+
codeDiffs?: CodeDiffInput[];
|
|
1047
|
+
}
|
|
1048
|
+
/** One annotation from the Code Diff sidecar, ordered by concept (not Git file order). */
|
|
1049
|
+
interface CodeDiffAnnotationInput {
|
|
1050
|
+
/**
|
|
1051
|
+
* Content anchor — never a bare line number (see `review/diff-anchor`).
|
|
1052
|
+
* Absent when assembly could not produce one; `unresolved` then names the state.
|
|
1053
|
+
*/
|
|
1054
|
+
anchor?: DiffAnchor;
|
|
1055
|
+
/**
|
|
1056
|
+
* Set instead of `anchor` when assembly failed: `orphaned` (no matching
|
|
1057
|
+
* changed line) or `ambiguous` (the match was not unique). Rendered as that
|
|
1058
|
+
* state directly, so authoring mistakes surface visibly.
|
|
1059
|
+
*/
|
|
1060
|
+
unresolved?: "orphaned" | "ambiguous";
|
|
1061
|
+
/** Explanatory prose (plain text — rendered verbatim, never as HTML or Markdown). */
|
|
1062
|
+
text: string;
|
|
1063
|
+
/** Short conceptual label (drives the outline ordering). */
|
|
1064
|
+
label?: string;
|
|
1065
|
+
/** StoryReport scenario IDs whose execution proves this hunk's effect. */
|
|
1066
|
+
scenarioIds?: string[];
|
|
1067
|
+
}
|
|
1068
|
+
/** One Code Diff evidence group fed in at the CLI/Action layer — NEVER by adapters. */
|
|
1069
|
+
interface CodeDiffInput {
|
|
1070
|
+
/** Human title for this evidence group. */
|
|
1071
|
+
title: string;
|
|
1072
|
+
/** Unified diff content, expected from `git diff --histogram`. */
|
|
1073
|
+
patch: string;
|
|
1074
|
+
/**
|
|
1075
|
+
* Canonical HTTPS patch URL — audit provenance only, never a second render
|
|
1076
|
+
* source. Only `https:` URLs render as links; anything else renders inert.
|
|
1077
|
+
*/
|
|
1078
|
+
patchUrl?: string;
|
|
1079
|
+
/** Human comparison labels; default from `baseRef`/`headRef`. */
|
|
1080
|
+
baseLabel?: string;
|
|
1081
|
+
headLabel?: string;
|
|
1082
|
+
annotations: CodeDiffAnnotationInput[];
|
|
1083
|
+
}
|
|
1084
|
+
/** A scenario cited by an annotation, resolved against the current run. */
|
|
1085
|
+
interface CodeDiffScenarioRef {
|
|
1086
|
+
id: string;
|
|
1087
|
+
/** False = the cited scenario is not in this run — render as "unverified reference". */
|
|
1088
|
+
resolved: boolean;
|
|
1089
|
+
scenario?: string;
|
|
1090
|
+
status?: TestStatus$1;
|
|
1091
|
+
}
|
|
1092
|
+
/** An annotation resolved against the parsed patch and the run. */
|
|
1093
|
+
interface CodeDiffAnnotation {
|
|
1094
|
+
/** Stable identity of the content anchor. Absent when assembly never produced one. */
|
|
1095
|
+
anchorHash?: string;
|
|
1096
|
+
/** Plain-text prose, rendered verbatim. */
|
|
1097
|
+
text: string;
|
|
1098
|
+
label?: string;
|
|
1099
|
+
/** anchored / ambiguous / orphaned — ambiguous and orphaned render visibly, never guessed. */
|
|
1100
|
+
resolution: AnchorResolution;
|
|
1101
|
+
scenarios: CodeDiffScenarioRef[];
|
|
1102
|
+
}
|
|
1103
|
+
/** Code Diff evidence on the review result, ready for formatters to render. */
|
|
1104
|
+
interface CodeDiffEvidence {
|
|
1105
|
+
title: string;
|
|
1106
|
+
/** The raw unified patch (audit fallback; renderers escape it as text). */
|
|
1107
|
+
patch: string;
|
|
1108
|
+
patchUrl?: string;
|
|
1109
|
+
baseLabel?: string;
|
|
1110
|
+
headLabel?: string;
|
|
1111
|
+
/** Parsed files/hunks so renderers never re-parse. */
|
|
1112
|
+
files: FileDiff[];
|
|
1113
|
+
annotations: CodeDiffAnnotation[];
|
|
982
1114
|
}
|
|
983
1115
|
/** One reviewable claim = one story/test case, enriched for review. */
|
|
984
1116
|
interface ReviewClaim {
|
|
@@ -1038,6 +1170,8 @@ interface ReviewResult {
|
|
|
1038
1170
|
claims: ReviewClaim[];
|
|
1039
1171
|
/** Changed source files, sorted uncovered → weak → covered. */
|
|
1040
1172
|
changedFiles: ChangedFileReview[];
|
|
1173
|
+
/** Code Diff evidence groups (empty when the context supplied none). */
|
|
1174
|
+
codeDiffs: CodeDiffEvidence[];
|
|
1041
1175
|
}
|
|
1042
1176
|
|
|
1043
1177
|
/**
|
|
@@ -2978,6 +3112,104 @@ declare function gradeEvidence(testCase: TestCaseResult, audience: ReviewAudienc
|
|
|
2978
3112
|
* banded — the 🔴 uncovered band being the reviewer's first stop.
|
|
2979
3113
|
*/
|
|
2980
3114
|
declare function buildReview(run: ReviewResult["run"], context?: ReviewContext): ReviewResult;
|
|
3115
|
+
/**
|
|
3116
|
+
* Code Diff integrity diagnostics: orphaned/ambiguous anchors and unverified
|
|
3117
|
+
* scenario references. The CLI prints these as warnings; `--strict-code-diff`
|
|
3118
|
+
* turns them into review-gate failures so CI catches explainers that lost
|
|
3119
|
+
* their grounding.
|
|
3120
|
+
*/
|
|
3121
|
+
declare function codeDiffDiagnostics(review: ReviewResult): string[];
|
|
3122
|
+
|
|
3123
|
+
/**
|
|
3124
|
+
* Code Diff sidecar assembly — the authoring seam for Code Diff evidence.
|
|
3125
|
+
*
|
|
3126
|
+
* Authors (normally the `explain-change` skill) never hand-write content
|
|
3127
|
+
* anchors. The sidecar names a file and a unique substring of one changed
|
|
3128
|
+
* line; assembly locates that line in the `git diff --histogram` patch and
|
|
3129
|
+
* builds the real content anchor from it. A match that fails to locate still
|
|
3130
|
+
* produces an annotation, explicitly marked `unresolved` (orphaned or
|
|
3131
|
+
* ambiguous), so authoring mistakes surface visibly instead of disappearing.
|
|
3132
|
+
*/
|
|
3133
|
+
|
|
3134
|
+
/** Hand-authored (or agent-authored) annotation entry in the sidecar file. */
|
|
3135
|
+
interface CodeDiffSidecarAnnotation {
|
|
3136
|
+
/** Repo-relative path of the changed file. */
|
|
3137
|
+
file: string;
|
|
3138
|
+
/** Substring of exactly one changed line in the patch. */
|
|
3139
|
+
match: string;
|
|
3140
|
+
/** Explanatory prose (plain text — rendered verbatim). */
|
|
3141
|
+
text: string;
|
|
3142
|
+
label?: string;
|
|
3143
|
+
scenarioIds?: string[];
|
|
3144
|
+
}
|
|
3145
|
+
/** The sidecar document (JSON). The patch itself is supplied separately. */
|
|
3146
|
+
interface CodeDiffSidecar {
|
|
3147
|
+
title: string;
|
|
3148
|
+
/** Canonical HTTPS patch URL — audit provenance only. */
|
|
3149
|
+
patchUrl?: string;
|
|
3150
|
+
baseLabel?: string;
|
|
3151
|
+
headLabel?: string;
|
|
3152
|
+
/** Ordered by concept, not Git file order. */
|
|
3153
|
+
annotations: CodeDiffSidecarAnnotation[];
|
|
3154
|
+
}
|
|
3155
|
+
/**
|
|
3156
|
+
* Assemble a {@link CodeDiffInput} from a sidecar and a unified patch.
|
|
3157
|
+
* Returns authoring warnings alongside — a located match gets a real content
|
|
3158
|
+
* anchor; a missed or non-unique match gets a bare anchor that resolves
|
|
3159
|
+
* orphaned, plus a warning saying why.
|
|
3160
|
+
*/
|
|
3161
|
+
declare function assembleCodeDiff(args: {
|
|
3162
|
+
sidecar: CodeDiffSidecar;
|
|
3163
|
+
patch: string;
|
|
3164
|
+
}): {
|
|
3165
|
+
input: CodeDiffInput;
|
|
3166
|
+
warnings: string[];
|
|
3167
|
+
};
|
|
3168
|
+
|
|
3169
|
+
/**
|
|
3170
|
+
* Diff anchoring — content-anchored annotation targets for Code Diff evidence.
|
|
3171
|
+
*
|
|
3172
|
+
* An annotation must stay attached to the right hunk after the patch is
|
|
3173
|
+
* regenerated (which, for AI-authored changes, happens constantly). Line
|
|
3174
|
+
* numbers are the wrong key: they detach on rebase/force-push. This module
|
|
3175
|
+
* anchors by content instead, the way `patch(1)` does — the anchor is the
|
|
3176
|
+
* changed lines plus a bounded window of surrounding context, and relocation
|
|
3177
|
+
* matches that content in the new patch with progressive fuzz (outermost
|
|
3178
|
+
* context lines are dropped first; the changed lines are never dropped).
|
|
3179
|
+
*
|
|
3180
|
+
* Resolution states:
|
|
3181
|
+
* - `anchored` — exactly one match above the fuzz threshold.
|
|
3182
|
+
* - `ambiguous` — multiple matches (e.g. duplicate identical lines); the
|
|
3183
|
+
* annotation must render visibly un-located, never guessed.
|
|
3184
|
+
* - `orphaned` — no match; the annotation renders with a "could not locate
|
|
3185
|
+
* in current patch" notice, never silently reattached.
|
|
3186
|
+
*
|
|
3187
|
+
* Pure functions, no I/O — patches are generated at the CLI/Action layer
|
|
3188
|
+
* (with `git diff --histogram` for hunk stability), never by adapters.
|
|
3189
|
+
*/
|
|
3190
|
+
|
|
3191
|
+
/**
|
|
3192
|
+
* Parse a unified diff into files and hunks. Hunk bodies are consumed by
|
|
3193
|
+
* line count from the `@@` header, so content lines that look like file
|
|
3194
|
+
* headers (e.g. a context line starting with `--- `) parse correctly.
|
|
3195
|
+
*/
|
|
3196
|
+
declare function parseUnifiedDiff(patch: string): FileDiff[];
|
|
3197
|
+
/**
|
|
3198
|
+
* Create an anchor for the contiguous run of changed lines starting at
|
|
3199
|
+
* `lines[lineIndex]` in the given hunk (the authoring seam — used by the
|
|
3200
|
+
* CLI/sidecar assembly helper, not by hand).
|
|
3201
|
+
*/
|
|
3202
|
+
declare function createAnchor(args: {
|
|
3203
|
+
file: FileDiff;
|
|
3204
|
+
hunkIndex: number;
|
|
3205
|
+
lineIndex: number;
|
|
3206
|
+
}): DiffAnchor;
|
|
3207
|
+
/**
|
|
3208
|
+
* Relocate an anchor in a (re)generated patch. The anchor's own file is
|
|
3209
|
+
* searched first so a duplicate block elsewhere in the repo cannot make an
|
|
3210
|
+
* exact in-file match ambiguous; other files are the rename fallback.
|
|
3211
|
+
*/
|
|
3212
|
+
declare function relocateAnchor(anchor: DiffAnchor, files: FileDiff[]): AnchorResolution;
|
|
2981
3213
|
|
|
2982
3214
|
/**
|
|
2983
3215
|
* Convention-based derivation for the review report.
|
|
@@ -3271,6 +3503,20 @@ declare class ReportGenerator {
|
|
|
3271
3503
|
* @returns Map of output format to generated file paths
|
|
3272
3504
|
*/
|
|
3273
3505
|
generate(run: TestRunResult): Promise<GenerateResult>;
|
|
3506
|
+
/**
|
|
3507
|
+
* Whether any output is colocated — the global mode, or any per-rule mode.
|
|
3508
|
+
* A colocated rule under a global aggregated mode still writes per-file
|
|
3509
|
+
* reports that need an index.
|
|
3510
|
+
*/
|
|
3511
|
+
private hasColocatedOutput;
|
|
3512
|
+
/**
|
|
3513
|
+
* Write the entry-point page for a colocated HTML report tree. `htmlPaths` is
|
|
3514
|
+
* every HTML report already written this run. Returns the path written, or
|
|
3515
|
+
* undefined when there is nothing to index or the index would clobber a report
|
|
3516
|
+
* already at `index.html` — a colocated source file that produces it, or, in
|
|
3517
|
+
* mixed mode, the global aggregate (whose default output name is also index).
|
|
3518
|
+
*/
|
|
3519
|
+
private writeColocatedIndex;
|
|
3274
3520
|
/**
|
|
3275
3521
|
* Generate reports for a single format.
|
|
3276
3522
|
*/
|
|
@@ -3321,4 +3567,4 @@ declare function normalizeVitestResults(testModules: Parameters<typeof adaptVite
|
|
|
3321
3567
|
*/
|
|
3322
3568
|
declare function normalizePlaywrightResults(testResults: Parameters<typeof adaptPlaywrightRun>[0], adapterOptions?: Parameters<typeof adaptPlaywrightRun>[1], canonicalizeOptions?: CanonicalizeOptions): TestRunResult;
|
|
3323
3569
|
|
|
3324
|
-
export { type AstroAssetResult, AstroFormatter, type AstroFormatterOptions as AstroFormatterOpts, Attachment, type BehaviorDebuggerIssue, type BehaviorDiff, type BehaviorDiffEntry, type BehaviorManifest, BehaviorManifestJsonFormatter, type BehaviorManifestJsonOptions, type BehaviorSourceFile, type BehaviorTag, type BundleOptions, type BundleResult, CIProvider, type CanonicalizeOptions, type ChangeType, type ChangedFile, type ChangedFileReview, type CheckArgs, type CheckDeps, type CheckFailure, type CheckReport, type CheckStep, type ColocatedStyle, type CompareFormat, type CompareFormatterOptions, type ConfluenceAuth, ConfluenceFormatter, type ConfluenceFormatterOptions as ConfluenceFormatterOpts, type CopyMarkdownAssetsOptions, CucumberHtmlFormatter, type CucumberHtmlOptions, CucumberJsonFormatter, type CucumberJsonOptions, CucumberMessagesFormatter, type CucumberMessagesOptions, type DeploymentEntry, type DeploymentLedger, type DeploymentStatus, DocEntry, DocPhase, ES_THEME_TOKENS_CSS, ES_THEME_TOKEN_VALUES, type EnvironmentDrift, type EvidenceStrength, type ExecutableStoriesConfig, type FetchFn, type FileChangeKind, 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 HtmlDocOptions, 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 Logger, MIN_FLAKINESS_SAMPLES, MIN_METRIC_SAMPLES, MIN_PERF_SAMPLES, MarkdownFormatter, type MarkdownFormatterOptions, type MarkdownOptions, type MarkdownRenderers, NormalizedTicket, type NotificationSummary, type NotifyCondition, OtelSpan, type OtelTraceContext, type OutputConfig, type OutputFormat, type OutputMode, type OutputRule, type PerformanceTrend, type PublishConfluenceArgs, type PublishConfluenceDeps, type PublishConfluenceResult, type PublishJiraArgs, type PublishJiraDeps, type PublishJiraResult, type RatchetViolation, RawAttachment, RawCIInfo, RawRun, RawStatus, type RecordDeploymentArgs, type RecordDeploymentResult, type ReleaseManifest, ReleaseManifestFormatter, type ReportAttachment, type ReportCIInfo, type ReportCoverageSummary, type ReportDocCode, type ReportDocCustom, type ReportDocEntry, type ReportDocKv, type ReportDocLink, type ReportDocMermaid, type ReportDocNote, type ReportDocScreenshot, type ReportDocSection, type ReportDocTable, type ReportDocTag, type ReportFeature, ReportGenerator, type ReportScenario, type ReportStep, type ReportSummary, type ReportTicket, type ResolvedFormatterOptions, 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 RunState, STORY_REPORT_SCHEMA_MAJOR, STORY_REPORT_SCHEMA_VERSION, 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, StepKeyword$1 as StepKeyword, StepResult, type StoryReport, StoryReportJsonFormatter, type StoryReportJsonOptions, type StoryReportSchemaVersion, StoryStep, TestCaseResult, type TestHistory, type TestMetrics, TestRunResult, TestStatus$1 as TestStatus, type TraceabilityMatrix, TraceabilityMatrixFormatter, type TraceabilityRequirement, type TriageArgs, type TriageDeps, type TriageItem, type TriageReport, CIInfo$1 as TypedCIInfo, type ValidationResult, type WatchDeps, type WatchHandle, type WatchOptions, type WebhookPayload, type WebhookSignerHmac, type WriteFile, adaptJestRun, adaptPlaywrightRun, adaptVitestRun, advanceState, assertValidRun, buildCheck, buildGoal, buildHtmlDocEntry, buildReview, buildTriage, bundleAssets, calculateFlakiness, calculateStability, canonicalizeRun, classifyStatusChange, clearVersionCache, computeTestMetrics, copyMarkdownAssets, createPrCommentSummary, createReportGenerator, deriveAudience, deriveChangeType, deriveStepResults, detectCI, detectPerformanceTrend, diffRuns, diffStoryReports, findGitDir, formatDuration, generateRunComparison, generateRunId, generateTestCaseId, getDeploymentStatus, getEnvironmentDrift, gradeEvidence, hasSufficientHistory, initialRunState, isReviewableSource, isTestFile, joinNameAndExt, listScenarios, loadHistory, mergeStepResults, msToNanoseconds, nanosecondsToMs, normalizeFormats, normalizeJestResults, normalizePlaywrightResults, normalizeStatus, normalizeVitestResults, parseEnvelopes, parseNdjson, publishConfluencePage, publishJiraIssue, readBranchName, readGitSha, readPackageVersion, recordDeployment, regenerateArtifacts, regenerateRun, renderCheck, renderGoal, renderTriage, resolveAttachment, resolveAttachments, resolveTraceUrl, rewriteAssetPaths, saveHistory, scenariosCoveringPaths, sendNotifications, sendSlackNotification, sendTeamsNotification, sendWebhookNotification, signBody, slugify, startWatch, stripAnsi, toBehaviorManifest, toReleaseManifest, toScenarioIndex, toStoryReport, toTraceabilityMatrix, tryGetActiveOtelContext, updateHistory, validateCanonicalRun };
|
|
3570
|
+
export { type AnchorResolution, type AnchorState, type AstroAssetResult, AstroFormatter, type AstroFormatterOptions as AstroFormatterOpts, Attachment, type BehaviorDebuggerIssue, type BehaviorDiff, type BehaviorDiffEntry, type BehaviorManifest, BehaviorManifestJsonFormatter, type BehaviorManifestJsonOptions, type BehaviorSourceFile, type BehaviorTag, type BundleOptions, type BundleResult, CIProvider, type CanonicalizeOptions, 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, CucumberHtmlFormatter, type CucumberHtmlOptions, CucumberJsonFormatter, type CucumberJsonOptions, CucumberMessagesFormatter, type CucumberMessagesOptions, type DeploymentEntry, type DeploymentLedger, type DeploymentStatus, type DiffAnchor, type DiffHunk, type DiffLine, DocEntry, DocPhase, ES_THEME_TOKENS_CSS, ES_THEME_TOKEN_VALUES, 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 HtmlDocOptions, 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 Logger, MIN_FLAKINESS_SAMPLES, MIN_METRIC_SAMPLES, MIN_PERF_SAMPLES, MarkdownFormatter, type MarkdownFormatterOptions, type MarkdownOptions, type MarkdownRenderers, NormalizedTicket, type NotificationSummary, type NotifyCondition, OtelSpan, type OtelTraceContext, type OutputConfig, type OutputFormat, type OutputMode, type OutputRule, type PerformanceTrend, type PublishConfluenceArgs, type PublishConfluenceDeps, type PublishConfluenceResult, type PublishJiraArgs, type PublishJiraDeps, type PublishJiraResult, type RatchetViolation, RawAttachment, RawCIInfo, RawRun, RawStatus, type RecordDeploymentArgs, type RecordDeploymentResult, type ReleaseManifest, ReleaseManifestFormatter, type ReportAttachment, type ReportCIInfo, type ReportCoverageSummary, type ReportDocCode, type ReportDocCustom, type ReportDocEntry, type ReportDocKv, type ReportDocLink, type ReportDocMermaid, type ReportDocNote, type ReportDocScreenshot, type ReportDocSection, type ReportDocTable, type ReportDocTag, type ReportFeature, ReportGenerator, type ReportScenario, type ReportStep, type ReportSummary, type ReportTicket, type ResolvedFormatterOptions, 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 RunState, STORY_REPORT_SCHEMA_MAJOR, STORY_REPORT_SCHEMA_VERSION, 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, StepKeyword$1 as StepKeyword, StepResult, type StoryReport, StoryReportJsonFormatter, type StoryReportJsonOptions, type StoryReportSchemaVersion, StoryStep, TestCaseResult, type TestHistory, type TestMetrics, TestRunResult, TestStatus$1 as TestStatus, type TraceabilityMatrix, TraceabilityMatrixFormatter, type TraceabilityRequirement, type TriageArgs, type TriageDeps, type TriageItem, type TriageReport, CIInfo$1 as TypedCIInfo, type ValidationResult, type WatchDeps, type WatchHandle, type WatchOptions, type WebhookPayload, type WebhookSignerHmac, type WriteFile, adaptJestRun, adaptPlaywrightRun, adaptVitestRun, advanceState, assembleCodeDiff, assertValidRun, buildCheck, buildGoal, buildHtmlDocEntry, buildReview, buildTriage, bundleAssets, calculateFlakiness, calculateStability, canonicalizeRun, classifyStatusChange, clearVersionCache, codeDiffDiagnostics, computeTestMetrics, copyMarkdownAssets, createAnchor, createPrCommentSummary, createReportGenerator, deriveAudience, deriveChangeType, deriveStepResults, detectCI, detectPerformanceTrend, diffRuns, diffStoryReports, findGitDir, formatDuration, generateRunComparison, generateRunId, generateTestCaseId, getDeploymentStatus, getEnvironmentDrift, gradeEvidence, hasSufficientHistory, initialRunState, isReviewableSource, isTestFile, joinNameAndExt, listScenarios, loadHistory, mergeStepResults, msToNanoseconds, nanosecondsToMs, normalizeFormats, normalizeJestResults, normalizePlaywrightResults, normalizeStatus, normalizeVitestResults, parseEnvelopes, parseNdjson, parseUnifiedDiff, publishConfluencePage, publishJiraIssue, readBranchName, readGitSha, readPackageVersion, recordDeployment, regenerateArtifacts, regenerateRun, relocateAnchor, renderCheck, renderGoal, renderTriage, resolveAttachment, resolveAttachments, resolveTraceUrl, rewriteAssetPaths, saveHistory, scenariosCoveringPaths, sendNotifications, sendSlackNotification, sendTeamsNotification, sendWebhookNotification, signBody, slugify, startWatch, stripAnsi, toBehaviorManifest, toReleaseManifest, toScenarioIndex, toStoryReport, toTraceabilityMatrix, tryGetActiveOtelContext, updateHistory, validateCanonicalRun };
|