executable-stories-formatters 1.0.1 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -1,27 +1,33 @@
1
- import { TestRunResult, TestCaseResult, TestStatus, Attachment } from 'executable-stories-core/types/test-result';
2
- export { Attachment, CIInfo, CoverageSummary, StepResult, TestCaseAttempt, TestCaseEvidence, TestCaseResult, TestRunResult, TestStatus } from 'executable-stories-core/types/test-result';
3
- import { StoryStep, DocEntry, NormalizedTicket, StepKeyword } from 'executable-stories-core/types/story';
4
- export { DocEntry, DocPhase, NormalizedTicket, STORY_META_KEY, StepKeyword, StepMode, StoryMeta, StoryStep } from 'executable-stories-core/types/story';
5
- import { CIInfo, CIProvider } from 'executable-stories-core/types/ci';
6
- export { CIProvider, CIInfo as TypedCIInfo, toCIInfo, toRawCIInfo } from 'executable-stories-core/types/ci';
7
- import { adaptJestRun, adaptPlaywrightRun, adaptVitestRun } from './adapters.cjs';
8
- export { JestAdapterOptions, JestAggregatedResult, JestFileResult, JestTestResult, PlaywrightAdapterOptions, PlaywrightAnnotation, PlaywrightAttachment, PlaywrightError, PlaywrightLocation, PlaywrightStatus, PlaywrightTestCase, PlaywrightTestResult, StoryFileReport, VitestAdapterOptions, VitestSerializedError, VitestState, VitestTestCase, VitestTestModule, VitestTestResult } from './adapters.cjs';
9
- export { OtelAttributeValue, OtelSpan } from 'executable-stories-core/types/otel';
10
- import { RawCIInfo } from 'executable-stories-core/types/raw';
11
- export { RawAttachment, RawCIInfo, RawRun, RawStatus, RawStepEvent, RawTestCase } from 'executable-stories-core/types/raw';
12
- import { StoryReport, TestStatus as TestStatus$1, ReportStep } from 'executable-stories-core/types/story-report';
13
- export { ReportAttachment, ReportCIInfo, ReportCoverageSummary, ReportDocCode, ReportDocCustom, ReportDocEntry, ReportDocKv, ReportDocLink, ReportDocMermaid, ReportDocNote, ReportDocScreenshot, ReportDocSection, ReportDocTable, ReportDocTag, ReportFeature, ReportScenario, ReportStep, ReportSummary, ReportTicket, STORY_REPORT_SCHEMA_MAJOR, STORY_REPORT_SCHEMA_VERSION, StoryReport, StoryReportSchemaVersion } from 'executable-stories-core/types/story-report';
14
- export { ES_THEME_TOKENS_CSS, ES_THEME_TOKEN_VALUES } from 'executable-stories-core/theme/tokens';
15
- export { canonicalizeRun, deriveStepResults, generateRunId, generateTestCaseId, mergeStepResults, normalizeStatus, resolveAttachment, resolveAttachments, slugify } from 'executable-stories-core/converters/acl/index';
16
- export { ValidationResult, assertValidRun, validateCanonicalRun } from 'executable-stories-core/converters/acl/validate';
17
- export { RunState, advanceState, initialRunState } from 'executable-stories-core';
18
- export { toStoryReport } from 'executable-stories-core/converters/story-report';
19
- import { Envelope } from 'executable-stories-core/types/cucumber-messages';
20
- export { parseEnvelopes, parseNdjson } from 'executable-stories-core/converters/ndjson-parser';
21
- export { formatDuration, msToNanoseconds, nanosecondsToMs } from 'executable-stories-core/utils/duration';
22
- export { HtmlDocOptions, buildHtmlDocEntry } from 'executable-stories-core/utils/doc-builders';
23
- import { CanonicalizeOptions } from 'executable-stories-core/types/canonicalize';
24
- export { CanonicalizeOptions } from 'executable-stories-core/types/canonicalize';
1
+ import { C as CIInfo$1, a as CIProvider, T as TestRunResult, b as TestCaseResult, S as StoryStep, D as DocEntry, c as TestStatus$1, N as NormalizedTicket, A as Attachment, d as DocPhase, O as OtelSpan, R as RawStatus, e as StepResult, f as RawAttachment, g as RawRun, h as RawCIInfo, i as StepKeyword$1, j as adaptJestRun, k as adaptPlaywrightRun, l as adaptVitestRun } from './index-Cfs2L3di.cjs';
2
+ export { m as CIInfo, n as CoverageSummary, J as JestAdapterOptions, o as JestAggregatedResult, p as JestFileResult, q as JestTestResult, r as OtelAttributeValue, P as PlaywrightAdapterOptions, s as PlaywrightAnnotation, t as PlaywrightAttachment, u as PlaywrightError, v as PlaywrightLocation, w as PlaywrightStatus, x as PlaywrightTestCase, y as PlaywrightTestResult, z as RawStepEvent, B as RawTestCase, E as STORY_META_KEY, F as StepMode, G as StoryFileReport, H as StoryMeta, I as TestCaseAttempt, K as TestCaseEvidence, V as VitestAdapterOptions, L as VitestSerializedError, M as VitestState, Q as VitestTestCase, U as VitestTestModule, W as VitestTestResult, X as toCIInfo, Y as toRawCIInfo } from './index-Cfs2L3di.cjs';
3
+
4
+ /**
5
+ * Configuration options for ACL and formatters.
6
+ */
7
+ /** Options for canonicalizing raw run data */
8
+ interface CanonicalizeOptions {
9
+ /** Attachment handling options */
10
+ attachments?: {
11
+ /** Max bytes before attachment becomes external link. Default: 512KB (524288) */
12
+ maxEmbedBytes?: number;
13
+ /** Directory for external attachments */
14
+ externalDir?: string;
15
+ };
16
+ /** Cucumber compatibility options */
17
+ cucumber?: {
18
+ /** Include trailing space in keywords (e.g., "Given "). Default: true */
19
+ keywordSpacing?: boolean;
20
+ /** Generate deterministic line numbers. Default: true */
21
+ deterministicLines?: boolean;
22
+ };
23
+ /** Default timestamps if not provided in raw data */
24
+ defaults?: {
25
+ /** Default start time (epoch ms). Default: Date.now() */
26
+ startedAtMs?: number;
27
+ /** Default finish time (epoch ms). Default: Date.now() */
28
+ finishedAtMs?: number;
29
+ };
30
+ }
25
31
 
26
32
  /**
27
33
  * Notification types for webhook integrations (Slack, Teams).
@@ -39,7 +45,7 @@ interface NotificationSummary {
39
45
  name: string;
40
46
  error?: string;
41
47
  }>;
42
- ci?: CIInfo;
48
+ ci?: CIInfo$1;
43
49
  reportUrl?: string;
44
50
  }
45
51
  /** When to send notifications. */
@@ -71,6 +77,51 @@ interface WebhookPayload {
71
77
  summary: NotificationSummary;
72
78
  }
73
79
 
80
+ /**
81
+ * Types for history tracking and test metrics.
82
+ */
83
+
84
+ interface HistoryEntry {
85
+ runId: string;
86
+ timestamp: number;
87
+ status: "passed" | "failed" | "skipped" | "pending";
88
+ durationMs: number;
89
+ ci?: {
90
+ provider?: CIProvider;
91
+ branch?: string;
92
+ commitSha?: string;
93
+ };
94
+ }
95
+ interface TestHistory {
96
+ testId: string;
97
+ testName: string;
98
+ sourceFile: string;
99
+ sourceLine?: number;
100
+ entries: HistoryEntry[];
101
+ }
102
+ interface HistoryStore {
103
+ version: 1;
104
+ maxRuns: number;
105
+ tests: Record<string, TestHistory>;
106
+ lastUpdated: number;
107
+ }
108
+ type StabilityGrade = "A" | "B" | "C" | "D" | "F";
109
+ type FlakinessLevel = "stable" | "unstable" | "flaky";
110
+ type PerformanceTrend = "improving" | "stable" | "regressing";
111
+ interface TestMetrics {
112
+ testId: string;
113
+ flakinessLevel: FlakinessLevel;
114
+ flakinessScore: number;
115
+ failureRate: number;
116
+ stabilityGrade: StabilityGrade;
117
+ performanceTrend: PerformanceTrend;
118
+ avgDurationMs: number;
119
+ passRate: number;
120
+ longestPassStreak: number;
121
+ consecutiveFailures: number;
122
+ sampleSize: number;
123
+ }
124
+
74
125
  /**
75
126
  * Confluence (ADF) Formatter — Layer 3.
76
127
  *
@@ -256,7 +307,16 @@ interface FormatterOptions {
256
307
  syntaxHighlighting?: boolean;
257
308
  /** Enable live Mermaid diagram rendering (via Mermaid.js CDN). Default: true */
258
309
  mermaidEnabled?: boolean;
310
+ /** Days before the report shows a stale warning. 0 disables. Default: 7 */
311
+ staleAfterDays?: number;
259
312
  };
313
+ /**
314
+ * Run history store (see loadHistory/updateHistory). When set, the HTML
315
+ * report embeds each scenario's recent run history so cards can show a
316
+ * run-over-run timeline. Update the store with the current run before
317
+ * passing it so the report includes this run as the latest entry.
318
+ */
319
+ historyStore?: HistoryStore;
260
320
  /** JUnit XML specific options */
261
321
  junit?: {
262
322
  /** Test suite name. Default: "Test Suite" */
@@ -419,7 +479,9 @@ interface ResolvedFormatterOptions {
419
479
  title: string;
420
480
  syntaxHighlighting: boolean;
421
481
  mermaidEnabled: boolean;
482
+ staleAfterDays: number;
422
483
  };
484
+ historyStore: HistoryStore | undefined;
423
485
  junit: {
424
486
  suiteName: string;
425
487
  includeOutput: boolean;
@@ -498,7 +560,7 @@ interface ScenarioSnapshot {
498
560
  scenario: string;
499
561
  sourceFile: string;
500
562
  sourceLine: number;
501
- status: TestStatus;
563
+ status: TestStatus$1;
502
564
  durationMs: number;
503
565
  tags: string[];
504
566
  titlePath: string[];
@@ -546,7 +608,7 @@ interface RunDiffResult {
546
608
  summary: RunDiffSummary;
547
609
  scenarios: ScenarioDiff[];
548
610
  }
549
- type CompareFormat = "html" | "markdown";
611
+ type CompareFormat = "html" | "markdown" | "changelog";
550
612
  interface CompareFormatterOptions {
551
613
  title?: string;
552
614
  }
@@ -665,6 +727,207 @@ interface ExecutableStoriesConfig {
665
727
  formatters?: Record<string, Formatter>;
666
728
  }
667
729
 
730
+ /**
731
+ * StoryReport — public, frozen contract for UI renderers.
732
+ *
733
+ * Distinct from internal TestRunResult. Pre-grouped feature → scenario tree,
734
+ * with pre-computed summaries at every level. Adapter concerns (rawStatus,
735
+ * projectName, titlePath) are stripped at the toStoryReport boundary.
736
+ *
737
+ * Versioning: semver-style "<major>.<minor>". Additive-only within a major.
738
+ * Source of truth: schemas/story-report-v1.json. Types here must stay in sync.
739
+ */
740
+
741
+ type StoryReportSchemaVersion = `1.${number}`;
742
+ type TestStatus = "passed" | "failed" | "skipped" | "pending";
743
+ type StepKeyword = "Given" | "When" | "Then" | "And" | "But";
744
+ type StepMode = "normal" | "skip" | "only" | "todo" | "fails" | "concurrent";
745
+ interface ReportSummary {
746
+ total: number;
747
+ passed: number;
748
+ failed: number;
749
+ skipped: number;
750
+ pending: number;
751
+ durationMs: number;
752
+ }
753
+ interface ReportTicket {
754
+ id: string;
755
+ url?: string;
756
+ }
757
+ interface ReportAttachment {
758
+ name: string;
759
+ mediaType: string;
760
+ body: string;
761
+ contentEncoding: "BASE64" | "IDENTITY";
762
+ }
763
+ interface ReportCIInfo {
764
+ name: string;
765
+ url?: string;
766
+ buildNumber?: string;
767
+ branch?: string;
768
+ commitSha?: string;
769
+ prNumber?: string;
770
+ }
771
+ interface ReportCoverageSummary {
772
+ linesPct?: number;
773
+ branchesPct?: number;
774
+ functionsPct?: number;
775
+ statementsPct?: number;
776
+ }
777
+ type ReportDocEntry = ReportDocNote | ReportDocTag | ReportDocKv | ReportDocCode | ReportDocTable | ReportDocLink | ReportDocSection | ReportDocMermaid | ReportDocScreenshot | ReportDocVideo | ReportDocHtml | ReportDocCustom;
778
+ interface ReportDocNote {
779
+ kind: "note";
780
+ text: string;
781
+ phase: DocPhase;
782
+ children?: ReportDocEntry[];
783
+ }
784
+ interface ReportDocTag {
785
+ kind: "tag";
786
+ names: string[];
787
+ phase: DocPhase;
788
+ children?: ReportDocEntry[];
789
+ }
790
+ interface ReportDocKv {
791
+ kind: "kv";
792
+ label: string;
793
+ value: unknown;
794
+ phase: DocPhase;
795
+ children?: ReportDocEntry[];
796
+ }
797
+ interface ReportDocCode {
798
+ kind: "code";
799
+ label: string;
800
+ content: string;
801
+ lang?: string;
802
+ phase: DocPhase;
803
+ children?: ReportDocEntry[];
804
+ }
805
+ interface ReportDocTable {
806
+ kind: "table";
807
+ label: string;
808
+ columns: string[];
809
+ rows: string[][];
810
+ phase: DocPhase;
811
+ children?: ReportDocEntry[];
812
+ }
813
+ interface ReportDocLink {
814
+ kind: "link";
815
+ label: string;
816
+ url: string;
817
+ phase: DocPhase;
818
+ children?: ReportDocEntry[];
819
+ }
820
+ interface ReportDocSection {
821
+ kind: "section";
822
+ title: string;
823
+ markdown: string;
824
+ phase: DocPhase;
825
+ children?: ReportDocEntry[];
826
+ }
827
+ interface ReportDocMermaid {
828
+ kind: "mermaid";
829
+ code: string;
830
+ title?: string;
831
+ phase: DocPhase;
832
+ children?: ReportDocEntry[];
833
+ }
834
+ interface ReportDocScreenshot {
835
+ kind: "screenshot";
836
+ path: string;
837
+ alt?: string;
838
+ phase: DocPhase;
839
+ children?: ReportDocEntry[];
840
+ }
841
+ interface ReportDocVideo {
842
+ kind: "video";
843
+ path: string;
844
+ caption?: string;
845
+ poster?: string;
846
+ phase: DocPhase;
847
+ children?: ReportDocEntry[];
848
+ }
849
+ interface ReportDocHtml {
850
+ kind: "html";
851
+ /** Local HTML file path (exactly one of path/url/content) */
852
+ path?: string;
853
+ /** Remote URL rendered via iframe src (exactly one of path/url/content) */
854
+ url?: string;
855
+ /** Inline HTML content rendered via iframe srcdoc (exactly one of path/url/content) */
856
+ content?: string;
857
+ title?: string;
858
+ /** Iframe height: number → px, string passed through (e.g. "60vh"). Default 400px. */
859
+ height?: number | string;
860
+ phase: DocPhase;
861
+ children?: ReportDocEntry[];
862
+ }
863
+ interface ReportDocCustom {
864
+ kind: "custom";
865
+ type: string;
866
+ data: unknown;
867
+ phase: DocPhase;
868
+ children?: ReportDocEntry[];
869
+ }
870
+ interface ReportStep {
871
+ id: string;
872
+ index: number;
873
+ keyword: StepKeyword;
874
+ text: string;
875
+ status: TestStatus;
876
+ durationMs: number;
877
+ errorMessage?: string;
878
+ mode?: StepMode;
879
+ docEntries: ReportDocEntry[];
880
+ }
881
+ interface ReportScenario {
882
+ id: string;
883
+ title: string;
884
+ status: TestStatus;
885
+ /**
886
+ * True for scenarios authored with the framework's todo modifier
887
+ * (e.g. `it.todo`): specified behavior with no implementation yet.
888
+ * Canonical status stays "pending"; this flags why.
889
+ */
890
+ planned?: boolean;
891
+ durationMs: number;
892
+ tags: string[];
893
+ tickets?: ReportTicket[];
894
+ /** Product-code paths/globs this scenario exercises (project-root-relative). */
895
+ covers?: string[];
896
+ sourceLine?: number;
897
+ errorMessage?: string;
898
+ errorStack?: string;
899
+ retry: number;
900
+ retries: number;
901
+ docEntries: ReportDocEntry[];
902
+ steps: ReportStep[];
903
+ attachments: ReportAttachment[];
904
+ /** OTel spans for the trace waterfall (carried through from the run). */
905
+ otelSpans?: OtelSpan[];
906
+ }
907
+ interface ReportFeature {
908
+ id: string;
909
+ title: string;
910
+ sourceFile: string;
911
+ summary: ReportSummary;
912
+ scenarios: ReportScenario[];
913
+ }
914
+ interface StoryReport {
915
+ schemaVersion: StoryReportSchemaVersion;
916
+ runId: string;
917
+ startedAtMs: number;
918
+ finishedAtMs: number;
919
+ durationMs: number;
920
+ projectRoot: string;
921
+ packageVersion?: string;
922
+ gitSha?: string;
923
+ ci?: ReportCIInfo;
924
+ coverage?: ReportCoverageSummary;
925
+ summary: ReportSummary;
926
+ features: ReportFeature[];
927
+ }
928
+ declare const STORY_REPORT_SCHEMA_VERSION: StoryReportSchemaVersion;
929
+ declare const STORY_REPORT_SCHEMA_MAJOR: 1;
930
+
668
931
  /**
669
932
  * Review types — the model behind the Evidence-Driven Review report.
670
933
  *
@@ -726,7 +989,7 @@ interface ReviewClaim {
726
989
  sourceFile: string;
727
990
  sourceLine: number;
728
991
  /** Test outcome. */
729
- status: TestStatus;
992
+ status: TestStatus$1;
730
993
  /** Derived from file convention / `audience:` tag. */
731
994
  audience: ReviewAudience;
732
995
  /** Declared via `change:*` tag (defaults to `unknown`). */
@@ -777,6 +1040,239 @@ interface ReviewResult {
777
1040
  changedFiles: ChangedFileReview[];
778
1041
  }
779
1042
 
1043
+ /**
1044
+ * Canonical executable-stories theme tokens (--es-*).
1045
+ *
1046
+ * Source of truth for the `--es-color-*`, `--es-space-*`, `--es-font-*`,
1047
+ * `--es-size-*`, `--es-radius`, `--es-line`, and `--es-measure` CSS custom
1048
+ * properties consumed by:
1049
+ *
1050
+ * - executable-stories-react (styles.css)
1051
+ * - executable-stories-formatters HTML report (CSS_STYLES, via this module)
1052
+ *
1053
+ * Consumer-side overrides on `:root` or any ancestor of the report cascade
1054
+ * through both: setting `--es-color-failed: red` on body re-colors failures
1055
+ * in both the standalone HTML report and the React component.
1056
+ *
1057
+ * The HTML formatter's pre-existing tokens (--success, --error, etc.)
1058
+ * remain in place for backward compatibility; the --es-* tokens are emitted
1059
+ * alongside them as the public override surface.
1060
+ */
1061
+ declare const ES_THEME_TOKENS_CSS: string;
1062
+ /**
1063
+ * JS-level mirror of the token values (for cases where TypeScript code needs
1064
+ * to read them — e.g., dynamic style injection or theme generators).
1065
+ */
1066
+ declare const ES_THEME_TOKEN_VALUES: {
1067
+ readonly light: {
1068
+ readonly "--es-color-bg": "#ffffff";
1069
+ readonly "--es-color-fg": "#111827";
1070
+ readonly "--es-color-muted": "#6b7280";
1071
+ readonly "--es-color-border": "#e5e7eb";
1072
+ readonly "--es-color-surface": "#f9fafb";
1073
+ readonly "--es-color-link": "#2563eb";
1074
+ readonly "--es-color-passed": "#16a34a";
1075
+ readonly "--es-color-failed": "#dc2626";
1076
+ readonly "--es-color-skipped": "#9ca3af";
1077
+ readonly "--es-color-pending": "#d97706";
1078
+ };
1079
+ readonly dark: {
1080
+ readonly "--es-color-bg": "#0b0f17";
1081
+ readonly "--es-color-fg": "#e5e7eb";
1082
+ readonly "--es-color-muted": "#9ca3af";
1083
+ readonly "--es-color-border": "#1f2937";
1084
+ readonly "--es-color-surface": "#111827";
1085
+ readonly "--es-color-link": "#60a5fa";
1086
+ readonly "--es-color-passed": "#4ade80";
1087
+ readonly "--es-color-failed": "#f87171";
1088
+ readonly "--es-color-skipped": "#6b7280";
1089
+ readonly "--es-color-pending": "#fbbf24";
1090
+ };
1091
+ };
1092
+
1093
+ /**
1094
+ * Status mapping from raw framework statuses to canonical TestStatus.
1095
+ */
1096
+
1097
+ /**
1098
+ * Convert a raw status to canonical TestStatus.
1099
+ *
1100
+ * @param raw - The raw status from a framework
1101
+ * @returns The canonical TestStatus
1102
+ */
1103
+ declare function normalizeStatus(raw: RawStatus): TestStatus$1;
1104
+
1105
+ /**
1106
+ * ID generation and slug helpers for deterministic, Cucumber-compatible IDs.
1107
+ */
1108
+ /**
1109
+ * Generate a deterministic test case ID from source file and scenario name.
1110
+ *
1111
+ * @param sourceFile - The source file path
1112
+ * @param scenario - The scenario name
1113
+ * @returns A 12-character hex ID
1114
+ */
1115
+ declare function generateTestCaseId(sourceFile: string, scenario: string): string;
1116
+ /**
1117
+ * Generate a deterministic run ID from timestamp and project root.
1118
+ *
1119
+ * @param startedAtMs - Run start timestamp
1120
+ * @param projectRoot - Project root directory
1121
+ * @returns A 16-character hex ID
1122
+ */
1123
+ declare function generateRunId(startedAtMs: number, projectRoot: string): string;
1124
+ /**
1125
+ * Slugify a string for Cucumber JSON IDs.
1126
+ *
1127
+ * Converts to lowercase, replaces path separators/spaces with hyphens,
1128
+ * removes other special chars, and trims leading/trailing hyphens.
1129
+ *
1130
+ * @param text - The text to slugify
1131
+ * @returns A URL-safe slug
1132
+ */
1133
+ declare function slugify(text: string): string;
1134
+
1135
+ /**
1136
+ * Step fallback rules for deriving step results from scenario status.
1137
+ *
1138
+ * When frameworks don't provide step-level results, we derive them
1139
+ * from the overall scenario status using these rules.
1140
+ */
1141
+
1142
+ /**
1143
+ * Derive step results from story steps and scenario status.
1144
+ *
1145
+ * Rules:
1146
+ * - Passed: All steps are passed
1147
+ * - Skipped/Pending: All steps are skipped/pending
1148
+ * - Failed: Steps up to failure are passed, failing step is failed, rest are skipped
1149
+ * (Heuristic: last step is the failure, or use error info if available)
1150
+ *
1151
+ * @param steps - Story steps with keywords and text
1152
+ * @param scenarioStatus - Overall scenario status
1153
+ * @param error - Optional error information to help identify failing step
1154
+ * @returns Array of step results
1155
+ */
1156
+ declare function deriveStepResults(steps: StoryStep[], scenarioStatus: TestStatus$1, error?: {
1157
+ message?: string;
1158
+ stack?: string;
1159
+ }): StepResult[];
1160
+ /**
1161
+ * Merge raw step events with derived step results.
1162
+ *
1163
+ * When we have partial step data from the framework, merge it with
1164
+ * the derived results, preferring actual data over derived.
1165
+ *
1166
+ * @param derived - Derived step results from fallback rules
1167
+ * @param events - Raw step events from framework (if any)
1168
+ * @returns Merged step results
1169
+ */
1170
+ declare function mergeStepResults(derived: StepResult[], events?: Array<{
1171
+ index?: number;
1172
+ stepId?: string;
1173
+ status?: string;
1174
+ durationMs?: number;
1175
+ errorMessage?: string;
1176
+ }>): StepResult[];
1177
+
1178
+ /**
1179
+ * Attachment resolution: embed vs link decision.
1180
+ *
1181
+ * Attachments can either be embedded inline (base64) or linked to
1182
+ * external files based on size thresholds.
1183
+ */
1184
+
1185
+ /** Options for attachment resolution */
1186
+ interface AttachmentOptions {
1187
+ /** Max bytes before attachment becomes external link. Default: 512KB */
1188
+ maxEmbedBytes?: number;
1189
+ /** Directory for external attachments */
1190
+ externalDir?: string;
1191
+ /** Project root for relative paths */
1192
+ projectRoot?: string;
1193
+ }
1194
+ /**
1195
+ * Resolve a raw attachment to a canonical attachment.
1196
+ *
1197
+ * Decision logic:
1198
+ * 1. If body is already provided, use it (check size for encoding decision)
1199
+ * 2. If path is provided, read file and decide embed vs link
1200
+ * 3. For large files, return a URL reference instead of embedding
1201
+ *
1202
+ * @param raw - Raw attachment from framework
1203
+ * @param options - Resolution options
1204
+ * @returns Resolved canonical attachment
1205
+ */
1206
+ declare function resolveAttachment(raw: RawAttachment, options?: AttachmentOptions): Attachment;
1207
+ /**
1208
+ * Resolve multiple attachments.
1209
+ *
1210
+ * @param attachments - Raw attachments array
1211
+ * @param options - Resolution options
1212
+ * @returns Resolved canonical attachments
1213
+ */
1214
+ declare function resolveAttachments(attachments: RawAttachment[] | undefined, options?: AttachmentOptions): Attachment[];
1215
+
1216
+ /**
1217
+ * Anti-Corruption Layer (ACL) - Layer 2.
1218
+ *
1219
+ * Transforms permissive RawRun data from framework adapters into
1220
+ * strict canonical TestRunResult for formatters.
1221
+ */
1222
+
1223
+ /**
1224
+ * Canonicalize a raw run into a strict TestRunResult.
1225
+ *
1226
+ * This is the main entry point for the ACL. It:
1227
+ * - Enforces required fields with defaults
1228
+ * - Normalizes statuses to TestStatus enum
1229
+ * - Applies step fallback rules
1230
+ * - Resolves attachments (embed vs link)
1231
+ * - Generates deterministic IDs
1232
+ *
1233
+ * @param raw - Raw run data from a framework adapter
1234
+ * @param options - Canonicalization options
1235
+ * @returns Strict canonical TestRunResult
1236
+ */
1237
+ declare function canonicalizeRun(raw: RawRun, options?: CanonicalizeOptions): TestRunResult;
1238
+
1239
+ /**
1240
+ * Validation helpers for canonical TestRunResult.
1241
+ *
1242
+ * Used in tests to verify ACL output meets all invariants.
1243
+ */
1244
+
1245
+ /** Validation result */
1246
+ interface ValidationResult {
1247
+ /** Whether the run is valid */
1248
+ valid: boolean;
1249
+ /** List of validation errors */
1250
+ errors: string[];
1251
+ }
1252
+ /**
1253
+ * Validate a canonical TestRunResult.
1254
+ *
1255
+ * Checks:
1256
+ * - All required fields are present
1257
+ * - stepResults length matches story.steps length
1258
+ * - stepResults indexes are valid and unique
1259
+ * - Durations are non-negative
1260
+ * - Timestamps are valid
1261
+ *
1262
+ * @param run - The TestRunResult to validate
1263
+ * @returns Validation result with errors if any
1264
+ */
1265
+ declare function validateCanonicalRun(run: TestRunResult): ValidationResult;
1266
+ /**
1267
+ * Assert that a run is valid, throwing if not.
1268
+ *
1269
+ * Useful in tests.
1270
+ *
1271
+ * @param run - The TestRunResult to validate
1272
+ * @throws Error if validation fails
1273
+ */
1274
+ declare function assertValidRun(run: TestRunResult): void;
1275
+
780
1276
  /**
781
1277
  * Cucumber JSON Formatter - Layer 3.
782
1278
  *
@@ -896,7 +1392,13 @@ interface ScenarioIndex {
896
1392
  interface ScenarioIndexItem {
897
1393
  id: string;
898
1394
  title: string;
899
- status: TestStatus$1;
1395
+ /**
1396
+ * Content hash (title + step keywords/texts) for explainer provenance —
1397
+ * copy into an explainer's frontmatter `scenarios[].hash` so
1398
+ * `check-explainers` can detect drift. Status is deliberately excluded.
1399
+ */
1400
+ hash: string;
1401
+ status: TestStatus;
900
1402
  feature: string;
901
1403
  sourceFile: string;
902
1404
  sourceLine?: number;
@@ -919,13 +1421,13 @@ interface ScenarioIndexStep {
919
1421
  index: number;
920
1422
  keyword: ReportStep["keyword"];
921
1423
  text: string;
922
- status: TestStatus$1;
1424
+ status: TestStatus;
923
1425
  durationMs: number;
924
1426
  errorMessage?: string;
925
1427
  docKinds: string[];
926
1428
  }
927
1429
  interface ScenarioIndexFilters {
928
- statuses?: TestStatus$1[];
1430
+ statuses?: TestStatus[];
929
1431
  tags?: string[];
930
1432
  sourceFiles?: string[];
931
1433
  }
@@ -1039,13 +1541,367 @@ interface WatchHandle {
1039
1541
  */
1040
1542
  declare function startWatch(options: WatchOptions, deps?: WatchDeps): WatchHandle;
1041
1543
 
1544
+ /**
1545
+ * Cucumber Messages types for NDJSON output.
1546
+ *
1547
+ * Minimal own types (no @cucumber/messages dependency) — consistent with
1548
+ * the project's zero-external-deps-at-runtime approach.
1549
+ *
1550
+ * Based on the Cucumber Messages protocol:
1551
+ * https://github.com/cucumber/messages
1552
+ */
1553
+ /** Protobuf-style timestamp { seconds, nanos } */
1554
+ interface Timestamp {
1555
+ seconds: number;
1556
+ nanos: number;
1557
+ }
1558
+ /** Protobuf-style duration { seconds, nanos } */
1559
+ interface Duration {
1560
+ seconds: number;
1561
+ nanos: number;
1562
+ }
1563
+ /** Location in a source file */
1564
+ interface Location {
1565
+ line: number;
1566
+ column?: number;
1567
+ }
1568
+ interface Meta {
1569
+ protocolVersion: string;
1570
+ implementation: {
1571
+ name: string;
1572
+ version: string;
1573
+ };
1574
+ runtime: {
1575
+ name: string;
1576
+ version: string;
1577
+ };
1578
+ os: {
1579
+ name: string;
1580
+ };
1581
+ cpu: {
1582
+ name: string;
1583
+ };
1584
+ }
1585
+ interface Source {
1586
+ uri: string;
1587
+ data: string;
1588
+ mediaType: "text/x.cucumber.gherkin+plain";
1589
+ }
1590
+ interface Tag {
1591
+ location: Location;
1592
+ name: string;
1593
+ id: string;
1594
+ }
1595
+ type KeywordType = "Unknown" | "Context" | "Action" | "Outcome" | "Conjunction";
1596
+ interface DocString {
1597
+ location: Location;
1598
+ mediaType?: string;
1599
+ content: string;
1600
+ delimiter: string;
1601
+ }
1602
+ interface TableCell {
1603
+ location: Location;
1604
+ value: string;
1605
+ }
1606
+ interface TableRow {
1607
+ location: Location;
1608
+ cells: TableCell[];
1609
+ id: string;
1610
+ }
1611
+ interface DataTable {
1612
+ location: Location;
1613
+ rows: TableRow[];
1614
+ }
1615
+ interface Step {
1616
+ location: Location;
1617
+ keyword: string;
1618
+ keywordType: KeywordType;
1619
+ text: string;
1620
+ id: string;
1621
+ docString?: DocString;
1622
+ dataTable?: DataTable;
1623
+ }
1624
+ interface Scenario {
1625
+ location: Location;
1626
+ tags: Tag[];
1627
+ keyword: string;
1628
+ name: string;
1629
+ description: string;
1630
+ steps: Step[];
1631
+ id: string;
1632
+ }
1633
+ interface Background {
1634
+ location: Location;
1635
+ keyword: string;
1636
+ name: string;
1637
+ description: string;
1638
+ steps: Step[];
1639
+ id: string;
1640
+ }
1641
+ type FeatureChild = {
1642
+ background: Background;
1643
+ scenario?: undefined;
1644
+ } | {
1645
+ scenario: Scenario;
1646
+ background?: undefined;
1647
+ };
1648
+ interface Feature {
1649
+ location: Location;
1650
+ tags: Tag[];
1651
+ language: string;
1652
+ keyword: string;
1653
+ name: string;
1654
+ description: string;
1655
+ children: FeatureChild[];
1656
+ }
1657
+ interface GherkinDocument {
1658
+ uri: string;
1659
+ feature: Feature;
1660
+ }
1661
+ type PickleStepType = "Unknown" | "Context" | "Action" | "Outcome";
1662
+ interface PickleDocString {
1663
+ mediaType?: string;
1664
+ content: string;
1665
+ }
1666
+ interface PickleTableCell {
1667
+ value: string;
1668
+ }
1669
+ interface PickleTableRow {
1670
+ cells: PickleTableCell[];
1671
+ }
1672
+ interface PickleTable {
1673
+ rows: PickleTableRow[];
1674
+ }
1675
+ interface PickleStepArgument {
1676
+ docString?: PickleDocString;
1677
+ dataTable?: PickleTable;
1678
+ }
1679
+ interface PickleStep {
1680
+ astNodeIds: string[];
1681
+ id: string;
1682
+ type: PickleStepType;
1683
+ text: string;
1684
+ argument?: PickleStepArgument;
1685
+ }
1686
+ interface PickleTag {
1687
+ name: string;
1688
+ astNodeId: string;
1689
+ }
1690
+ interface Pickle {
1691
+ id: string;
1692
+ uri: string;
1693
+ name: string;
1694
+ language: string;
1695
+ steps: PickleStep[];
1696
+ tags: PickleTag[];
1697
+ astNodeIds: string[];
1698
+ }
1699
+ type TestStepResultStatus = "UNKNOWN" | "PASSED" | "SKIPPED" | "PENDING" | "UNDEFINED" | "AMBIGUOUS" | "FAILED";
1700
+ interface TestStepResult {
1701
+ duration: Duration;
1702
+ status: TestStepResultStatus;
1703
+ message?: string;
1704
+ }
1705
+ interface TestStep {
1706
+ id: string;
1707
+ pickleStepId?: string;
1708
+ stepDefinitionIds?: string[];
1709
+ }
1710
+ interface TestCase {
1711
+ id: string;
1712
+ pickleId: string;
1713
+ testSteps: TestStep[];
1714
+ }
1715
+ interface TestRunStarted {
1716
+ timestamp: Timestamp;
1717
+ }
1718
+ interface TestCaseStarted {
1719
+ id: string;
1720
+ testCaseId: string;
1721
+ timestamp: Timestamp;
1722
+ attempt: number;
1723
+ }
1724
+ interface TestStepStarted {
1725
+ testCaseStartedId: string;
1726
+ testStepId: string;
1727
+ timestamp: Timestamp;
1728
+ }
1729
+ interface TestStepFinished {
1730
+ testCaseStartedId: string;
1731
+ testStepId: string;
1732
+ testStepResult: TestStepResult;
1733
+ timestamp: Timestamp;
1734
+ }
1735
+ interface TestCaseFinished {
1736
+ testCaseStartedId: string;
1737
+ timestamp: Timestamp;
1738
+ willBeRetried: boolean;
1739
+ }
1740
+ interface TestRunFinished {
1741
+ timestamp: Timestamp;
1742
+ success: boolean;
1743
+ }
1744
+ type AttachmentContentEncoding = "IDENTITY" | "BASE64";
1745
+ interface CucumberAttachment {
1746
+ testCaseStartedId: string;
1747
+ testStepId?: string;
1748
+ body: string;
1749
+ mediaType: string;
1750
+ contentEncoding: AttachmentContentEncoding;
1751
+ }
1752
+ /**
1753
+ * Each NDJSON line is one Envelope with exactly one field set.
1754
+ */
1755
+ type Envelope = {
1756
+ meta: Meta;
1757
+ } | {
1758
+ source: Source;
1759
+ } | {
1760
+ gherkinDocument: GherkinDocument;
1761
+ } | {
1762
+ pickle: Pickle;
1763
+ } | {
1764
+ testRunStarted: TestRunStarted;
1765
+ } | {
1766
+ testCase: TestCase;
1767
+ } | {
1768
+ testCaseStarted: TestCaseStarted;
1769
+ } | {
1770
+ testStepStarted: TestStepStarted;
1771
+ } | {
1772
+ testStepFinished: TestStepFinished;
1773
+ } | {
1774
+ testCaseFinished: TestCaseFinished;
1775
+ } | {
1776
+ testRunFinished: TestRunFinished;
1777
+ } | {
1778
+ attachment: CucumberAttachment;
1779
+ };
1780
+
1781
+ /**
1782
+ * Convert a canonical TestRunResult into a frozen-shape StoryReport for UI renderers.
1783
+ */
1784
+ declare function toStoryReport(run: TestRunResult): StoryReport;
1785
+
1786
+ /**
1787
+ * NDJSON-to-TestRunResult parser.
1788
+ *
1789
+ * Parses Cucumber Messages NDJSON (one JSON envelope per line) back into
1790
+ * a TestRunResult suitable for rendering by HtmlFormatter or other formatters.
1791
+ *
1792
+ * This is the NDJSON compat path: it produces a minimal but sufficient
1793
+ * TestRunResult. Fields not present in the NDJSON stream are given
1794
+ * sensible defaults.
1795
+ */
1796
+
1797
+ /**
1798
+ * Parse an NDJSON string into a TestRunResult.
1799
+ *
1800
+ * @param ndjson - NDJSON string (one JSON envelope per line)
1801
+ * @returns TestRunResult reconstructed from the envelopes
1802
+ */
1803
+ declare function parseNdjson(ndjson: string): TestRunResult;
1804
+ /**
1805
+ * Parse an array of Envelope objects into a TestRunResult.
1806
+ *
1807
+ * @param envelopes - Array of Cucumber Messages envelopes
1808
+ * @returns TestRunResult reconstructed from the envelopes
1809
+ */
1810
+ declare function parseEnvelopes(envelopes: Envelope[]): TestRunResult;
1811
+
1812
+ /**
1813
+ * Session trajectory primitive — the valuable part of the old `serve.ts`.
1814
+ *
1815
+ * Pins a session baseline (the first run observed) and folds each subsequent run
1816
+ * forward, so a docs/agent loop can show "how this run compares to where the
1817
+ * session started" rather than just the noise between adjacent runs. Pure (no
1818
+ * I/O, no diff engine) so it lives in core and is consumable by the Astro
1819
+ * integration and the CLI alike. Diffing the runs is layered on top by the
1820
+ * consumer (the diff engine lives in the formatters package).
1821
+ */
1822
+
1823
+ /**
1824
+ * The realtime state a live view renders. The session baseline is pinned to the
1825
+ * first run observed after boot, so the headline tracks the whole loop's
1826
+ * trajectory rather than the noise between any two adjacent iterations.
1827
+ */
1828
+ interface RunState {
1829
+ /** First run observed this session — the trajectory anchor. */
1830
+ sessionBaseline: TestRunResult | null;
1831
+ /** The run immediately before {@link RunState.current} — the per-iteration anchor. */
1832
+ previous: TestRunResult | null;
1833
+ /** Latest run. */
1834
+ current: TestRunResult | null;
1835
+ /** How many runs have been observed since boot. */
1836
+ runCount: number;
1837
+ }
1838
+ /** The empty state before any run has been observed. */
1839
+ declare const initialRunState: RunState;
1840
+ /**
1841
+ * Fold a freshly-read run into the prior state. The first run pins the session
1842
+ * baseline; later runs shift `previous`/`current` forward. Pure.
1843
+ */
1844
+ declare function advanceState(prev: RunState, run: TestRunResult): RunState;
1845
+
1846
+ /**
1847
+ * Canonical builders for doc entries whose construction carries a rule worth
1848
+ * keeping in one place. Adapters import these instead of re-implementing the
1849
+ * logic (the `html` exactly-one-of-source rule was previously copied verbatim
1850
+ * across the Vitest, Jest, Cypress, and Playwright adapters).
1851
+ */
1852
+
1853
+ /** Source/presentation options for an `html` doc entry. */
1854
+ interface HtmlDocOptions {
1855
+ /** Local HTML file path (inlined into the report by default). */
1856
+ path?: string;
1857
+ /** Remote URL rendered via iframe src. */
1858
+ url?: string;
1859
+ /** Inline HTML content rendered via iframe srcdoc. */
1860
+ content?: string;
1861
+ title?: string;
1862
+ /** Iframe height: number → px, string passed through (e.g. '60vh'). Default 400px. */
1863
+ height?: number | string;
1864
+ }
1865
+ /**
1866
+ * Build an `html` DocEntry, enforcing that exactly one of path/url/content is
1867
+ * set. Throws otherwise — this is the single source of that rule.
1868
+ */
1869
+ declare function buildHtmlDocEntry(options: HtmlDocOptions): DocEntry;
1870
+
1871
+ /**
1872
+ * Duration formatting utilities.
1873
+ */
1874
+ /**
1875
+ * Format milliseconds as human-readable duration.
1876
+ *
1877
+ * @param ms - Duration in milliseconds
1878
+ * @returns Formatted string (e.g., "123 ms", "1.5 s", "2m 30s")
1879
+ */
1880
+ declare function formatDuration(ms: number): string;
1881
+ /**
1882
+ * Convert milliseconds to nanoseconds.
1883
+ *
1884
+ * Used for Cucumber JSON format which expects nanoseconds.
1885
+ *
1886
+ * @param ms - Duration in milliseconds
1887
+ * @returns Duration in nanoseconds
1888
+ */
1889
+ declare function msToNanoseconds(ms: number): number;
1890
+ /**
1891
+ * Convert nanoseconds to milliseconds.
1892
+ *
1893
+ * @param ns - Duration in nanoseconds
1894
+ * @returns Duration in milliseconds
1895
+ */
1896
+ declare function nanosecondsToMs(ns: number): number;
1897
+
1042
1898
  interface BehaviorDiffEntry {
1043
1899
  id: string;
1044
1900
  title: string;
1045
1901
  sourceFile: string;
1046
1902
  kind: ScenarioChangeKind;
1047
- baselineStatus?: TestStatus$1;
1048
- currentStatus?: TestStatus$1;
1903
+ baselineStatus?: TestStatus;
1904
+ currentStatus?: TestStatus;
1049
1905
  }
1050
1906
  interface BehaviorDiff {
1051
1907
  schemaVersion: "1.0";
@@ -1063,7 +1919,7 @@ interface BehaviorDiff {
1063
1919
  * Classify a single scenario's status transition between two runs.
1064
1920
  * Shares the `ScenarioChangeKind` vocabulary with the full compare engine.
1065
1921
  */
1066
- declare function classifyStatusChange(baseline: TestStatus$1 | undefined, current: TestStatus$1 | undefined): ScenarioChangeKind;
1922
+ declare function classifyStatusChange(baseline: TestStatus | undefined, current: TestStatus | undefined): ScenarioChangeKind;
1067
1923
  /**
1068
1924
  * Scenario-level diff of two StoryReports, keyed by scenario id. Reports status
1069
1925
  * transitions (the agent triage signal), not the full field-by-field diff that
@@ -1529,6 +2385,22 @@ declare class RunDiffMarkdownFormatter {
1529
2385
  format(diff: RunDiffResult): string;
1530
2386
  }
1531
2387
 
2388
+ interface RunDiffChangelogOptions {
2389
+ title?: string;
2390
+ }
2391
+ /**
2392
+ * Behavior changelog between two runs: release-notes-style Markdown built
2393
+ * from the same RunDiffResult as `compare`'s review outputs, but written for
2394
+ * the reader of a release ("what can the product do now") rather than the
2395
+ * reviewer of a diff. New behaviors include their Given/When/Then steps so
2396
+ * the entry reads as a specification, not a test name.
2397
+ */
2398
+ declare class RunDiffChangelogFormatter {
2399
+ private readonly title;
2400
+ constructor(options?: RunDiffChangelogOptions);
2401
+ format(diff: RunDiffResult): string;
2402
+ }
2403
+
1532
2404
  /**
1533
2405
  * Git information utilities.
1534
2406
  *
@@ -1653,7 +2525,7 @@ interface SendNotificationsDeps {
1653
2525
  logger: {
1654
2526
  warn(msg: string): void;
1655
2527
  };
1656
- toCIInfo: (raw?: RawCIInfo) => CIInfo | undefined;
2528
+ toCIInfo: (raw?: RawCIInfo) => CIInfo$1 | undefined;
1657
2529
  env?: Record<string, string | undefined>;
1658
2530
  }
1659
2531
  /**
@@ -1799,51 +2671,6 @@ declare function signBody(args: {
1799
2671
  /** Strip ANSI escape sequences. Regex: \x1B\[[0-?]*[ -/]*[@-~] */
1800
2672
  declare function stripAnsi(text: string): string;
1801
2673
 
1802
- /**
1803
- * Types for history tracking and test metrics.
1804
- */
1805
-
1806
- interface HistoryEntry {
1807
- runId: string;
1808
- timestamp: number;
1809
- status: "passed" | "failed" | "skipped" | "pending";
1810
- durationMs: number;
1811
- ci?: {
1812
- provider?: CIProvider;
1813
- branch?: string;
1814
- commitSha?: string;
1815
- };
1816
- }
1817
- interface TestHistory {
1818
- testId: string;
1819
- testName: string;
1820
- sourceFile: string;
1821
- sourceLine?: number;
1822
- entries: HistoryEntry[];
1823
- }
1824
- interface HistoryStore {
1825
- version: 1;
1826
- maxRuns: number;
1827
- tests: Record<string, TestHistory>;
1828
- lastUpdated: number;
1829
- }
1830
- type StabilityGrade = "A" | "B" | "C" | "D" | "F";
1831
- type FlakinessLevel = "stable" | "unstable" | "flaky";
1832
- type PerformanceTrend = "improving" | "stable" | "regressing";
1833
- interface TestMetrics {
1834
- testId: string;
1835
- flakinessLevel: FlakinessLevel;
1836
- flakinessScore: number;
1837
- failureRate: number;
1838
- stabilityGrade: StabilityGrade;
1839
- performanceTrend: PerformanceTrend;
1840
- avgDurationMs: number;
1841
- passRate: number;
1842
- longestPassStreak: number;
1843
- consecutiveFailures: number;
1844
- sampleSize: number;
1845
- }
1846
-
1847
2674
  /**
1848
2675
  * History store: load, save, update (fn(args, deps) pattern).
1849
2676
  */
@@ -1966,13 +2793,13 @@ declare function listScenarios(args: ListScenariosArgs, _deps: ListScenariosDeps
1966
2793
  interface CheckArgs {
1967
2794
  testCases: TestCaseResult[];
1968
2795
  /** Baseline scenario statuses keyed by scenario id, for regressed/fixed deltas. */
1969
- baseline?: Map<string, TestStatus>;
2796
+ baseline?: Map<string, TestStatus$1>;
1970
2797
  format: "text" | "json";
1971
2798
  }
1972
2799
  type CheckDeps = Record<string, never>;
1973
2800
  /** A single rendered step inside a failing scenario. */
1974
2801
  interface CheckStep {
1975
- keyword: StepKeyword;
2802
+ keyword: StepKeyword$1;
1976
2803
  text: string;
1977
2804
  /** True when this step is the one that failed. */
1978
2805
  failed: boolean;
@@ -2090,7 +2917,7 @@ interface TriageItem {
2090
2917
  rank: number;
2091
2918
  id: string;
2092
2919
  scenario: string;
2093
- status: TestStatus;
2920
+ status: TestStatus$1;
2094
2921
  /** `sourceFile:sourceLine` */
2095
2922
  location: string;
2096
2923
  /** Product-code paths to fix. Empty when the scenario declared no `covers`. */
@@ -2112,7 +2939,7 @@ interface TriageReport {
2112
2939
  interface TriageArgs {
2113
2940
  testCases: TestCaseResult[];
2114
2941
  /** Baseline statuses by scenario id, to flag regressions and rank them first. */
2115
- baseline?: Map<string, TestStatus>;
2942
+ baseline?: Map<string, TestStatus$1>;
2116
2943
  format: "text" | "json";
2117
2944
  }
2118
2945
  type TriageDeps = Record<string, never>;
@@ -2342,7 +3169,7 @@ interface TraceabilityRequirement {
2342
3169
  scenarios: Array<{
2343
3170
  id: string;
2344
3171
  title: string;
2345
- status: TestStatus;
3172
+ status: TestStatus$1;
2346
3173
  sourceFile: string;
2347
3174
  sourceLine: number;
2348
3175
  covers: string[];
@@ -2371,7 +3198,7 @@ interface TraceabilityMatrix {
2371
3198
  untraced: Array<{
2372
3199
  id: string;
2373
3200
  title: string;
2374
- status: TestStatus;
3201
+ status: TestStatus$1;
2375
3202
  sourceFile: string;
2376
3203
  sourceLine: number;
2377
3204
  }>;
@@ -2469,7 +3296,7 @@ declare function createReportGenerator(options?: FormatterOptions, deps?: Partia
2469
3296
  declare function generateRunComparison(args: {
2470
3297
  baseline: TestRunResult;
2471
3298
  current: TestRunResult;
2472
- formats: Array<"html" | "markdown">;
3299
+ formats: Array<"html" | "markdown" | "changelog">;
2473
3300
  outputDir?: string;
2474
3301
  outputName?: string;
2475
3302
  title?: string;
@@ -2494,4 +3321,4 @@ declare function normalizeVitestResults(testModules: Parameters<typeof adaptVite
2494
3321
  */
2495
3322
  declare function normalizePlaywrightResults(testResults: Parameters<typeof adaptPlaywrightRun>[0], adapterOptions?: Parameters<typeof adaptPlaywrightRun>[1], canonicalizeOptions?: CanonicalizeOptions): TestRunResult;
2496
3323
 
2497
- export { type AstroAssetResult, AstroFormatter, type AstroFormatterOptions as AstroFormatterOpts, type BehaviorDebuggerIssue, type BehaviorDiff, type BehaviorDiffEntry, type BehaviorManifest, BehaviorManifestJsonFormatter, type BehaviorManifestJsonOptions, type BehaviorSourceFile, type BehaviorTag, type BundleOptions, type BundleResult, 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, 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 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, type NotificationSummary, type NotifyCondition, 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, type RecordDeploymentArgs, type RecordDeploymentResult, type ReleaseManifest, ReleaseManifestFormatter, ReportGenerator, type ResolvedFormatterOptions, type ReviewAudience, type ReviewBand, type ReviewClaim, type ReviewContext, ReviewHtmlFormatter, type ReviewHtmlOptions, ReviewMarkdownFormatter, type ReviewMarkdownOptions, type ReviewResult, type ReviewSummary, RunDiffHtmlFormatter, type RunDiffHtmlOptions, RunDiffMarkdownFormatter, type RunDiffMarkdownOptions, type RunDiffResult, type RunDiffSummary, 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 TestHistory, type TestMetrics, 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, adaptJestRun, adaptPlaywrightRun, adaptVitestRun, buildCheck, buildGoal, buildReview, buildTriage, bundleAssets, calculateFlakiness, calculateStability, classifyStatusChange, clearVersionCache, computeTestMetrics, copyMarkdownAssets, createPrCommentSummary, createReportGenerator, deriveAudience, deriveChangeType, detectCI, detectPerformanceTrend, diffRuns, diffStoryReports, findGitDir, generateRunComparison, getDeploymentStatus, getEnvironmentDrift, gradeEvidence, hasSufficientHistory, isReviewableSource, isTestFile, joinNameAndExt, listScenarios, loadHistory, normalizeFormats, normalizeJestResults, normalizePlaywrightResults, normalizeVitestResults, publishConfluencePage, publishJiraIssue, readBranchName, readGitSha, readPackageVersion, recordDeployment, regenerateArtifacts, regenerateRun, renderCheck, renderGoal, renderTriage, resolveTraceUrl, rewriteAssetPaths, saveHistory, scenariosCoveringPaths, sendNotifications, sendSlackNotification, sendTeamsNotification, sendWebhookNotification, signBody, startWatch, stripAnsi, toBehaviorManifest, toReleaseManifest, toScenarioIndex, toTraceabilityMatrix, tryGetActiveOtelContext, updateHistory };
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 };