executable-stories-formatters 0.16.0 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) hide show
  1. package/README.md +6 -4
  2. package/dist/adapters.cjs.map +1 -1
  3. package/dist/adapters.d.cts +183 -1
  4. package/dist/adapters.d.ts +183 -1
  5. package/dist/adapters.js.map +1 -1
  6. package/dist/cli.js +1945 -15988
  7. package/dist/cli.js.map +1 -1
  8. package/dist/index.cjs +2353 -15773
  9. package/dist/index.cjs.map +1 -1
  10. package/dist/index.d.cts +127 -1174
  11. package/dist/index.d.ts +127 -1174
  12. package/dist/index.js +2350 -15770
  13. package/dist/index.js.map +1 -1
  14. package/package.json +15 -11
  15. package/schemas/README.md +0 -1
  16. package/templates/astro-thin/astro.config.mjs +62 -0
  17. package/templates/astro-thin/executable-stories.config.mjs +47 -0
  18. package/templates/astro-thin/gitignore +3 -0
  19. package/templates/astro-thin/package.json +20 -0
  20. package/templates/astro-thin/reports/sample-run.json +133 -0
  21. package/templates/astro-thin/src/content/docs/404.md +20 -0
  22. package/templates/astro-thin/src/content/docs/guides/writing-docs.mdx +7 -0
  23. package/templates/astro-thin/src/content/docs/index.mdx +44 -0
  24. package/templates/astro-thin/src/content.config.ts +26 -0
  25. package/templates/astro-thin/src/styles/stories.css +32 -0
  26. package/templates/astro-thin/tsconfig.json +5 -0
  27. package/dist/index-CXrzCk9p.d.cts +0 -628
  28. package/dist/index-CXrzCk9p.d.ts +0 -628
  29. package/schemas/story-report-v1.json +0 -456
  30. package/templates/astro-starlight/astro.config.mjs +0 -57
  31. package/templates/astro-starlight/gitignore +0 -14
  32. package/templates/astro-starlight/package.json +0 -20
  33. package/templates/astro-starlight/public/stories/assets/.gitkeep +0 -0
  34. package/templates/astro-starlight/public/stories/notes-index.json +0 -4
  35. package/templates/astro-starlight/public/stories/story-report.json +0 -17
  36. package/templates/astro-starlight/src/components/ApiOperations.astro +0 -366
  37. package/templates/astro-starlight/src/components/Checklist.astro +0 -15
  38. package/templates/astro-starlight/src/components/HealthDashboard.astro +0 -171
  39. package/templates/astro-starlight/src/components/PageTitle.astro +0 -53
  40. package/templates/astro-starlight/src/components/VerifiedBy.astro +0 -281
  41. package/templates/astro-starlight/src/components/VerifiedStep.astro +0 -91
  42. package/templates/astro-starlight/src/content/docs/examples/example-adr.mdx +0 -45
  43. package/templates/astro-starlight/src/content/docs/guides/behavior-portal.mdx +0 -41
  44. package/templates/astro-starlight/src/content/docs/guides/writing-docs.mdx +0 -49
  45. package/templates/astro-starlight/src/content/docs/index.mdx +0 -49
  46. package/templates/astro-starlight/src/content/docs/stories/.gitkeep +0 -0
  47. package/templates/astro-starlight/src/content.config.ts +0 -18
  48. package/templates/astro-starlight/src/lib/config.ts +0 -50
  49. package/templates/astro-starlight/src/lib/render-doc-entry.ts +0 -154
  50. package/templates/astro-starlight/src/lib/report-health.ts +0 -61
  51. package/templates/astro-starlight/src/lib/verification.ts +0 -247
  52. package/templates/astro-starlight/src/pages/explorer/explorer.css +0 -729
  53. package/templates/astro-starlight/src/pages/explorer/index.astro +0 -404
  54. package/templates/astro-starlight/src/styles/global.css +0 -293
  55. package/templates/astro-starlight/src/styles/themes/corporate.css +0 -83
  56. package/templates/astro-starlight/src/styles/themes/dashboard.css +0 -76
  57. package/templates/astro-starlight/src/styles/themes/default.css +0 -86
  58. package/templates/astro-starlight/src/styles/themes/minimal.css +0 -87
  59. package/templates/astro-starlight/src/styles/themes/playful.css +0 -77
  60. package/templates/astro-starlight/src/styles/themes/terminal.css +0 -77
  61. package/templates/astro-starlight/tsconfig.json +0 -13
package/dist/index.d.cts CHANGED
@@ -1,5 +1,27 @@
1
- import { C as CIInfo, T as TestRunResult, a as TestCaseResult, S as StoryStep, D as DocEntry, b as TestStatus$1, N as NormalizedTicket, A as Attachment, c as DocPhase, O as OtelSpan, d as StepResult, e as CIProvider, R as RawStatus, f as RawAttachment, g as RawRun, h as RawCIInfo, i as StepKeyword$1, j as adaptJestRun, k as adaptPlaywrightRun, l as adaptVitestRun } from './index-CXrzCk9p.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-CXrzCk9p.cjs';
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';
3
25
 
4
26
  /**
5
27
  * Notification types for webhook integrations (Slack, Teams).
@@ -125,32 +147,16 @@ declare class ConfluenceFormatter {
125
147
  /**
126
148
  * Configuration options for ACL and formatters.
127
149
  */
128
- /** Options for canonicalizing raw run data */
129
- interface CanonicalizeOptions {
130
- /** Attachment handling options */
131
- attachments?: {
132
- /** Max bytes before attachment becomes external link. Default: 512KB (524288) */
133
- maxEmbedBytes?: number;
134
- /** Directory for external attachments */
135
- externalDir?: string;
136
- };
137
- /** Cucumber compatibility options */
138
- cucumber?: {
139
- /** Include trailing space in keywords (e.g., "Given "). Default: true */
140
- keywordSpacing?: boolean;
141
- /** Generate deterministic line numbers. Default: true */
142
- deterministicLines?: boolean;
143
- };
144
- /** Default timestamps if not provided in raw data */
145
- defaults?: {
146
- /** Default start time (epoch ms). Default: Date.now() */
147
- startedAtMs?: number;
148
- /** Default finish time (epoch ms). Default: Date.now() */
149
- finishedAtMs?: number;
150
- };
151
- }
150
+
152
151
  /** Output format for report generation */
153
- type OutputFormat = "astro" | "behavior-manifest-json" | "confluence" | "cucumber-json" | "cucumber-messages" | "cucumber-html" | "html" | "junit" | "markdown" | "release-manifest" | "scenario-index-json" | "story-report-json" | "traceability-matrix";
152
+ type OutputFormat = "astro-markdown" | "behavior-manifest-json" | "confluence" | "cucumber-json" | "cucumber-messages" | "cucumber-html" | "html" | "junit" | "markdown" | "release-manifest" | "scenario-index-json" | "story-report-json" | "traceability-matrix";
153
+ /**
154
+ * Format names accepted as INPUT. Adds `"astro"` as a deprecated alias for
155
+ * `"astro-markdown"` — it is normalised (with a warning) wherever formats enter
156
+ * the pipeline, so existing programmatic/config callers keep working.
157
+ * @deprecated `"astro"` — use `"astro-markdown"`.
158
+ */
159
+ type FormatInput = OutputFormat | "astro";
154
160
  /** Sort order for test cases in reports (deterministic for diff-friendly output) */
155
161
  type SortTestCasesMode = "id" | "source" | "none";
156
162
  /** Output mode for report routing */
@@ -176,7 +182,7 @@ interface OutputRule {
176
182
  /** Output filename override (without extension) */
177
183
  outputName?: string;
178
184
  /** Formats to generate for matched files */
179
- formats?: OutputFormat[];
185
+ formats?: FormatInput[];
180
186
  }
181
187
  /** Output configuration for report routing */
182
188
  interface OutputConfig {
@@ -206,7 +212,7 @@ interface FormatterOptions {
206
212
  /** Tags to exclude test cases (any match). Applied after includeTags. */
207
213
  excludeTags?: string[];
208
214
  /** Output formats to generate. Default: ["html"] */
209
- formats?: OutputFormat[];
215
+ formats?: FormatInput[];
210
216
  /** Output directory for generated reports. Default: "reports" */
211
217
  outputDir?: string;
212
218
  /** Base filename (without extension). Default: "index" */
@@ -237,36 +243,19 @@ interface FormatterOptions {
237
243
  /** Pretty-print JSON output. Default: true */
238
244
  pretty?: boolean;
239
245
  };
240
- /** HTML specific options */
246
+ /**
247
+ * HTML specific options. The HTML report renders via executable-stories-react;
248
+ * only these CDN toggles and the title affect it. The string renderer's
249
+ * darkMode, searchable, startCollapsed, embed, toc, and markdown options were
250
+ * removed with it — the React report owns that behavior.
251
+ */
241
252
  html?: {
242
253
  /** Report title. Default: "Test Results" */
243
254
  title?: string;
244
- /** Include dark mode toggle. Default: true */
245
- darkMode?: boolean;
246
- /** Include search/filter functionality. Default: true */
247
- searchable?: boolean;
248
- /** Start with scenarios collapsed. Default: false */
249
- startCollapsed?: boolean;
250
- /** Embed screenshots inline (base64). Default: true */
251
- embedScreenshots?: boolean;
252
- /** Inline local html doc files as iframe srcdoc. Default: true ("none" asset mode), false under "copy". */
253
- embedHtmlFiles?: boolean;
254
255
  /** Enable syntax highlighting for code blocks (via highlight.js CDN). Default: true */
255
256
  syntaxHighlighting?: boolean;
256
257
  /** Enable live Mermaid diagram rendering (via Mermaid.js CDN). Default: true */
257
258
  mermaidEnabled?: boolean;
258
- /** Enable Markdown parsing for section doc entries (via marked.js CDN). Default: true */
259
- markdownEnabled?: boolean;
260
- /** Base URL for source permalinks. E.g., "https://github.com/user/repo/blob/main" */
261
- permalinkBaseUrl?: string;
262
- /** URL template for ticket links. Use {ticket} as placeholder. E.g., "https://jira.example.com/browse/{ticket}" */
263
- ticketUrlTemplate?: string;
264
- /** Theme name. Default: "default". Available: default, corporate, terminal, minimal, dashboard, playful */
265
- theme?: string;
266
- /** Show table of contents sidebar. Default: true */
267
- tocEnabled?: boolean;
268
- /** Include theme picker with all CSS-only themes embedded. Default: false */
269
- themePickerEnabled?: boolean;
270
259
  };
271
260
  /** JUnit XML specific options */
272
261
  junit?: {
@@ -428,19 +417,8 @@ interface ResolvedFormatterOptions {
428
417
  };
429
418
  html: {
430
419
  title: string;
431
- darkMode: boolean;
432
- searchable: boolean;
433
- startCollapsed: boolean;
434
- embedScreenshots: boolean;
435
- embedHtmlFiles: boolean;
436
420
  syntaxHighlighting: boolean;
437
421
  mermaidEnabled: boolean;
438
- markdownEnabled: boolean;
439
- permalinkBaseUrl?: string;
440
- ticketUrlTemplate?: string;
441
- theme: string;
442
- tocEnabled: boolean;
443
- themePickerEnabled: boolean;
444
422
  };
445
423
  junit: {
446
424
  suiteName: string;
@@ -520,7 +498,7 @@ interface ScenarioSnapshot {
520
498
  scenario: string;
521
499
  sourceFile: string;
522
500
  sourceLine: number;
523
- status: TestStatus$1;
501
+ status: TestStatus;
524
502
  durationMs: number;
525
503
  tags: string[];
526
504
  titlePath: string[];
@@ -687,199 +665,6 @@ interface ExecutableStoriesConfig {
687
665
  formatters?: Record<string, Formatter>;
688
666
  }
689
667
 
690
- /**
691
- * StoryReport — public, frozen contract for UI renderers.
692
- *
693
- * Distinct from internal TestRunResult. Pre-grouped feature → scenario tree,
694
- * with pre-computed summaries at every level. Adapter concerns (rawStatus,
695
- * projectName, titlePath) are stripped at the toStoryReport boundary.
696
- *
697
- * Versioning: semver-style "<major>.<minor>". Additive-only within a major.
698
- * Source of truth: schemas/story-report-v1.json. Types here must stay in sync.
699
- */
700
-
701
- type StoryReportSchemaVersion = `1.${number}`;
702
- type TestStatus = "passed" | "failed" | "skipped" | "pending";
703
- type StepKeyword = "Given" | "When" | "Then" | "And" | "But";
704
- type StepMode = "normal" | "skip" | "only" | "todo" | "fails" | "concurrent";
705
- interface ReportSummary {
706
- total: number;
707
- passed: number;
708
- failed: number;
709
- skipped: number;
710
- pending: number;
711
- durationMs: number;
712
- }
713
- interface ReportTicket {
714
- id: string;
715
- url?: string;
716
- }
717
- interface ReportAttachment {
718
- name: string;
719
- mediaType: string;
720
- body: string;
721
- contentEncoding: "BASE64" | "IDENTITY";
722
- }
723
- interface ReportCIInfo {
724
- name: string;
725
- url?: string;
726
- buildNumber?: string;
727
- branch?: string;
728
- commitSha?: string;
729
- prNumber?: string;
730
- }
731
- interface ReportCoverageSummary {
732
- linesPct?: number;
733
- branchesPct?: number;
734
- functionsPct?: number;
735
- statementsPct?: number;
736
- }
737
- type ReportDocEntry = ReportDocNote | ReportDocTag | ReportDocKv | ReportDocCode | ReportDocTable | ReportDocLink | ReportDocSection | ReportDocMermaid | ReportDocScreenshot | ReportDocVideo | ReportDocHtml | ReportDocCustom;
738
- interface ReportDocNote {
739
- kind: "note";
740
- text: string;
741
- phase: DocPhase;
742
- children?: ReportDocEntry[];
743
- }
744
- interface ReportDocTag {
745
- kind: "tag";
746
- names: string[];
747
- phase: DocPhase;
748
- children?: ReportDocEntry[];
749
- }
750
- interface ReportDocKv {
751
- kind: "kv";
752
- label: string;
753
- value: unknown;
754
- phase: DocPhase;
755
- children?: ReportDocEntry[];
756
- }
757
- interface ReportDocCode {
758
- kind: "code";
759
- label: string;
760
- content: string;
761
- lang?: string;
762
- phase: DocPhase;
763
- children?: ReportDocEntry[];
764
- }
765
- interface ReportDocTable {
766
- kind: "table";
767
- label: string;
768
- columns: string[];
769
- rows: string[][];
770
- phase: DocPhase;
771
- children?: ReportDocEntry[];
772
- }
773
- interface ReportDocLink {
774
- kind: "link";
775
- label: string;
776
- url: string;
777
- phase: DocPhase;
778
- children?: ReportDocEntry[];
779
- }
780
- interface ReportDocSection {
781
- kind: "section";
782
- title: string;
783
- markdown: string;
784
- phase: DocPhase;
785
- children?: ReportDocEntry[];
786
- }
787
- interface ReportDocMermaid {
788
- kind: "mermaid";
789
- code: string;
790
- title?: string;
791
- phase: DocPhase;
792
- children?: ReportDocEntry[];
793
- }
794
- interface ReportDocScreenshot {
795
- kind: "screenshot";
796
- path: string;
797
- alt?: string;
798
- phase: DocPhase;
799
- children?: ReportDocEntry[];
800
- }
801
- interface ReportDocVideo {
802
- kind: "video";
803
- path: string;
804
- caption?: string;
805
- poster?: string;
806
- phase: DocPhase;
807
- children?: ReportDocEntry[];
808
- }
809
- interface ReportDocHtml {
810
- kind: "html";
811
- /** Local HTML file path (exactly one of path/url/content) */
812
- path?: string;
813
- /** Remote URL rendered via iframe src (exactly one of path/url/content) */
814
- url?: string;
815
- /** Inline HTML content rendered via iframe srcdoc (exactly one of path/url/content) */
816
- content?: string;
817
- title?: string;
818
- /** Iframe height: number → px, string passed through (e.g. "60vh"). Default 400px. */
819
- height?: number | string;
820
- phase: DocPhase;
821
- children?: ReportDocEntry[];
822
- }
823
- interface ReportDocCustom {
824
- kind: "custom";
825
- type: string;
826
- data: unknown;
827
- phase: DocPhase;
828
- children?: ReportDocEntry[];
829
- }
830
- interface ReportStep {
831
- id: string;
832
- index: number;
833
- keyword: StepKeyword;
834
- text: string;
835
- status: TestStatus;
836
- durationMs: number;
837
- errorMessage?: string;
838
- mode?: StepMode;
839
- docEntries: ReportDocEntry[];
840
- }
841
- interface ReportScenario {
842
- id: string;
843
- title: string;
844
- status: TestStatus;
845
- durationMs: number;
846
- tags: string[];
847
- tickets?: ReportTicket[];
848
- /** Product-code paths/globs this scenario exercises (project-root-relative). */
849
- covers?: string[];
850
- sourceLine?: number;
851
- errorMessage?: string;
852
- errorStack?: string;
853
- retry: number;
854
- retries: number;
855
- docEntries: ReportDocEntry[];
856
- steps: ReportStep[];
857
- attachments: ReportAttachment[];
858
- }
859
- interface ReportFeature {
860
- id: string;
861
- title: string;
862
- sourceFile: string;
863
- summary: ReportSummary;
864
- scenarios: ReportScenario[];
865
- }
866
- interface StoryReport {
867
- schemaVersion: StoryReportSchemaVersion;
868
- runId: string;
869
- startedAtMs: number;
870
- finishedAtMs: number;
871
- durationMs: number;
872
- projectRoot: string;
873
- packageVersion?: string;
874
- gitSha?: string;
875
- ci?: ReportCIInfo;
876
- coverage?: ReportCoverageSummary;
877
- summary: ReportSummary;
878
- features: ReportFeature[];
879
- }
880
- declare const STORY_REPORT_SCHEMA_VERSION: StoryReportSchemaVersion;
881
- declare const STORY_REPORT_SCHEMA_MAJOR: 1;
882
-
883
668
  /**
884
669
  * Review types — the model behind the Evidence-Driven Review report.
885
670
  *
@@ -941,7 +726,7 @@ interface ReviewClaim {
941
726
  sourceFile: string;
942
727
  sourceLine: number;
943
728
  /** Test outcome. */
944
- status: TestStatus$1;
729
+ status: TestStatus;
945
730
  /** Derived from file convention / `audience:` tag. */
946
731
  audience: ReviewAudience;
947
732
  /** Declared via `change:*` tag (defaults to `unknown`). */
@@ -992,497 +777,6 @@ interface ReviewResult {
992
777
  changedFiles: ChangedFileReview[];
993
778
  }
994
779
 
995
- /**
996
- * Render an OTel trace waterfall (fn(args, deps)).
997
- */
998
-
999
- interface RenderTraceViewArgs {
1000
- spans: OtelSpan[] | undefined;
1001
- }
1002
- interface RenderTraceViewDeps {
1003
- escapeHtml: (str: string) => string;
1004
- }
1005
-
1006
- /**
1007
- * Render attachments section (fn(args, deps)).
1008
- */
1009
-
1010
- interface RenderAttachmentsArgs {
1011
- attachments: Attachment[];
1012
- }
1013
- interface RenderAttachmentsDeps {
1014
- escapeHtml: (str: string) => string;
1015
- embedScreenshots: boolean;
1016
- }
1017
-
1018
- /**
1019
- * Render error box (fn(args, deps)).
1020
- */
1021
- interface RenderErrorBoxArgs {
1022
- message: string;
1023
- stack?: string;
1024
- }
1025
- interface RenderErrorBoxDeps {
1026
- escapeHtml: (str: string) => string;
1027
- }
1028
-
1029
- interface RenderStepsArgs {
1030
- steps: StoryStep[];
1031
- stepResults: StepResult[];
1032
- }
1033
- interface RenderStepsDeps {
1034
- escapeHtml: (str: string) => string;
1035
- getStatusIcon: (status: TestStatus$1) => string;
1036
- renderDocs: (docs: DocEntry[] | undefined, containerClass: string) => string;
1037
- highlightStepParams?: (text: string) => string;
1038
- }
1039
-
1040
- /**
1041
- * Types for history tracking and test metrics.
1042
- */
1043
-
1044
- interface HistoryEntry {
1045
- runId: string;
1046
- timestamp: number;
1047
- status: "passed" | "failed" | "skipped" | "pending";
1048
- durationMs: number;
1049
- ci?: {
1050
- provider?: CIProvider;
1051
- branch?: string;
1052
- commitSha?: string;
1053
- };
1054
- }
1055
- interface TestHistory {
1056
- testId: string;
1057
- testName: string;
1058
- sourceFile: string;
1059
- sourceLine?: number;
1060
- entries: HistoryEntry[];
1061
- }
1062
- interface HistoryStore {
1063
- version: 1;
1064
- maxRuns: number;
1065
- tests: Record<string, TestHistory>;
1066
- lastUpdated: number;
1067
- }
1068
- type StabilityGrade = "A" | "B" | "C" | "D" | "F";
1069
- type FlakinessLevel = "stable" | "unstable" | "flaky";
1070
- type PerformanceTrend = "improving" | "stable" | "regressing";
1071
- interface TestMetrics {
1072
- testId: string;
1073
- flakinessLevel: FlakinessLevel;
1074
- flakinessScore: number;
1075
- failureRate: number;
1076
- stabilityGrade: StabilityGrade;
1077
- performanceTrend: PerformanceTrend;
1078
- avgDurationMs: number;
1079
- passRate: number;
1080
- longestPassStreak: number;
1081
- consecutiveFailures: number;
1082
- sampleSize: number;
1083
- }
1084
-
1085
- interface RenderScenarioArgs {
1086
- tc: TestCaseResult;
1087
- metrics?: TestMetrics;
1088
- }
1089
- interface RenderScenarioDeps {
1090
- escapeHtml: (str: string) => string;
1091
- getStatusIcon: (status: TestStatus$1) => string;
1092
- startCollapsed: boolean;
1093
- renderSteps: (args: RenderStepsArgs, deps: RenderStepsDeps) => string;
1094
- renderDocs: (docs: DocEntry[] | undefined, containerClass: string) => string;
1095
- renderErrorBox: (args: RenderErrorBoxArgs, deps: RenderErrorBoxDeps) => string;
1096
- renderAttachments: (args: RenderAttachmentsArgs, deps: RenderAttachmentsDeps) => string;
1097
- renderTraceView: (args: RenderTraceViewArgs, deps: RenderTraceViewDeps) => string;
1098
- embedScreenshots: boolean;
1099
- permalinkBaseUrl?: string;
1100
- ticketUrlTemplate?: string;
1101
- }
1102
-
1103
- interface RenderFeatureArgs {
1104
- file: string;
1105
- testCases: TestCaseResult[];
1106
- metricsMap?: Map<string, TestMetrics>;
1107
- }
1108
- interface RenderFeatureDeps {
1109
- escapeHtml: (str: string) => string;
1110
- startCollapsed: boolean;
1111
- renderScenario: (args: RenderScenarioArgs, deps: RenderScenarioDeps) => string;
1112
- scenarioDeps: RenderScenarioDeps;
1113
- }
1114
-
1115
- /**
1116
- * Render summary cards section (fn(args, deps)).
1117
- * No deps: pure counts to HTML.
1118
- */
1119
- interface RenderSummaryArgs {
1120
- total: number;
1121
- passed: number;
1122
- failed: number;
1123
- skipped: number;
1124
- }
1125
- interface RenderSummaryDeps {
1126
- }
1127
-
1128
- /**
1129
- * Render meta info section (fn(args, deps)).
1130
- */
1131
- interface RenderMetaInfoArgs {
1132
- startedAtMs: number;
1133
- durationMs: number;
1134
- packageVersion?: string;
1135
- gitSha?: string;
1136
- ciName?: string;
1137
- ciBranch?: string;
1138
- ciUrl?: string;
1139
- ciCommitSha?: string;
1140
- ciBuildNumber?: string;
1141
- }
1142
- interface RenderMetaInfoDeps {
1143
- escapeHtml: (str: string) => string;
1144
- }
1145
-
1146
- /**
1147
- * Render tag filter bar (fn(args, deps)).
1148
- * Displays a collapsible tag bar with clickable tag pills for filtering scenarios,
1149
- * ARIA attributes for accessibility, and a results counter.
1150
- */
1151
- interface RenderTagBarArgs {
1152
- tags: string[];
1153
- totalScenarios: number;
1154
- }
1155
- interface RenderTagBarDeps {
1156
- escapeHtml: (str: string) => string;
1157
- }
1158
-
1159
- /**
1160
- * Render failure summary block with deep links to failed scenarios (fn(args, deps)).
1161
- */
1162
-
1163
- interface RenderFailureSummaryArgs {
1164
- failedCases: TestCaseResult[];
1165
- }
1166
- interface RenderFailureSummaryDeps {
1167
- escapeHtml: (str: string) => string;
1168
- }
1169
-
1170
- interface BuildBodyArgs {
1171
- run: TestRunResult;
1172
- metricsMap?: Map<string, TestMetrics>;
1173
- }
1174
- interface BuildBodyDeps {
1175
- renderMetaInfo: (args: RenderMetaInfoArgs, deps: RenderMetaInfoDeps) => string;
1176
- renderSummary: (args: RenderSummaryArgs, deps: RenderSummaryDeps) => string;
1177
- renderTagBar: (args: RenderTagBarArgs, deps: RenderTagBarDeps) => string;
1178
- renderFeature: (args: RenderFeatureArgs, deps: RenderFeatureDeps) => string;
1179
- renderFailureSummary: (args: RenderFailureSummaryArgs, deps: RenderFailureSummaryDeps) => string;
1180
- metaDeps: RenderMetaInfoDeps;
1181
- summaryDeps: RenderSummaryDeps;
1182
- tagBarDeps: RenderTagBarDeps;
1183
- featureDeps: RenderFeatureDeps;
1184
- failureSummaryDeps: RenderFailureSummaryDeps;
1185
- }
1186
-
1187
- /**
1188
- * HTML Report Template.
1189
- *
1190
- * Assembles the report document and inlines the browser-side interactivity
1191
- * scripts (defined in ./template-scripts) into a <script> tag.
1192
- */
1193
- /** Options for HTML template generation */
1194
- interface HtmlTemplateOptions {
1195
- includeSearch?: boolean;
1196
- includeDarkMode?: boolean;
1197
- syntaxHighlighting?: boolean;
1198
- mermaidEnabled?: boolean;
1199
- markdownEnabled?: boolean;
1200
- /** Additional inline JS injected after core JS (used by themes). */
1201
- additionalJs?: string;
1202
- /** Additional ESM import statements for CDN libraries (used by themes). */
1203
- additionalImports?: string[];
1204
- /** Pre-rendered TOC sidebar HTML. Placed as sibling of .container inside .report-layout. */
1205
- tocHtml?: string;
1206
- /** Pre-rendered theme picker HTML (select element). */
1207
- themePickerHtml?: string;
1208
- /** Additional theme CSS blocks to embed (for theme picker). */
1209
- additionalThemeCss?: Array<{
1210
- name: string;
1211
- label: string;
1212
- css: string;
1213
- }>;
1214
- /** Name of the currently active theme (for data-theme-name attribute). */
1215
- activeThemeName?: string;
1216
- }
1217
-
1218
- /**
1219
- * HTML theme type definitions.
1220
- */
1221
-
1222
- /** Built-in theme names */
1223
- type HtmlThemeName = "default" | "corporate" | "terminal" | "minimal" | "dashboard" | "playful";
1224
- /** A theme definition */
1225
- interface HtmlTheme {
1226
- /** Theme identifier */
1227
- name: string;
1228
- /** Display label */
1229
- label: string;
1230
- /** Full CSS string (replaces CSS_STYLES). Must define all custom properties for both light and dark modes. */
1231
- css: string;
1232
- /** Optional: override body rendering. Receives the same (args, deps) as buildBody. */
1233
- buildBody?: (args: BuildBodyArgs, deps: BuildBodyDeps) => string;
1234
- /** Optional: override the HTML template wrapper. */
1235
- generateTemplate?: (title: string, styles: string, body: string, options: HtmlTemplateOptions) => string;
1236
- /** Optional: additional inline JS injected after core JS. */
1237
- additionalJs?: string;
1238
- /** Optional: additional ESM import statements for CDN libraries. */
1239
- additionalImports?: string[];
1240
- }
1241
-
1242
- /**
1243
- * Theme registry — resolves theme names to theme objects.
1244
- */
1245
-
1246
- /** Resolve a theme by name or pass through a custom theme object. */
1247
- declare function resolveTheme(nameOrTheme: string | HtmlTheme): HtmlTheme;
1248
- /** List available built-in theme names. */
1249
- declare function getAvailableThemes(): string[];
1250
- /** Get all themes that only use CSS (no custom body/template overrides). */
1251
- declare function getCssOnlyThemes(): HtmlTheme[];
1252
-
1253
- /**
1254
- * Canonical executable-stories theme tokens (--es-*).
1255
- *
1256
- * Source of truth for the `--es-color-*`, `--es-space-*`, `--es-font-*`,
1257
- * `--es-size-*`, `--es-radius`, `--es-line`, and `--es-measure` CSS custom
1258
- * properties consumed by:
1259
- *
1260
- * - executable-stories-react (styles.css)
1261
- * - executable-stories-formatters HTML report (CSS_STYLES, via this module)
1262
- *
1263
- * Consumer-side overrides on `:root` or any ancestor of the report cascade
1264
- * through both: setting `--es-color-failed: red` on body re-colors failures
1265
- * in both the standalone HTML report and the React component.
1266
- *
1267
- * The HTML formatter's pre-existing tokens (--success, --error, etc.)
1268
- * remain in place for backward compatibility; the --es-* tokens are emitted
1269
- * alongside them as the public override surface.
1270
- */
1271
- declare const ES_THEME_TOKENS_CSS: string;
1272
- /**
1273
- * JS-level mirror of the token values (for cases where TypeScript code needs
1274
- * to read them — e.g., dynamic style injection or theme generators).
1275
- */
1276
- declare const ES_THEME_TOKEN_VALUES: {
1277
- readonly light: {
1278
- readonly "--es-color-bg": "#ffffff";
1279
- readonly "--es-color-fg": "#111827";
1280
- readonly "--es-color-muted": "#6b7280";
1281
- readonly "--es-color-border": "#e5e7eb";
1282
- readonly "--es-color-surface": "#f9fafb";
1283
- readonly "--es-color-link": "#2563eb";
1284
- readonly "--es-color-passed": "#16a34a";
1285
- readonly "--es-color-failed": "#dc2626";
1286
- readonly "--es-color-skipped": "#9ca3af";
1287
- readonly "--es-color-pending": "#d97706";
1288
- };
1289
- readonly dark: {
1290
- readonly "--es-color-bg": "#0b0f17";
1291
- readonly "--es-color-fg": "#e5e7eb";
1292
- readonly "--es-color-muted": "#9ca3af";
1293
- readonly "--es-color-border": "#1f2937";
1294
- readonly "--es-color-surface": "#111827";
1295
- readonly "--es-color-link": "#60a5fa";
1296
- readonly "--es-color-passed": "#4ade80";
1297
- readonly "--es-color-failed": "#f87171";
1298
- readonly "--es-color-skipped": "#6b7280";
1299
- readonly "--es-color-pending": "#fbbf24";
1300
- };
1301
- };
1302
-
1303
- /**
1304
- * Status mapping from raw framework statuses to canonical TestStatus.
1305
- */
1306
-
1307
- /**
1308
- * Convert a raw status to canonical TestStatus.
1309
- *
1310
- * @param raw - The raw status from a framework
1311
- * @returns The canonical TestStatus
1312
- */
1313
- declare function normalizeStatus(raw: RawStatus): TestStatus$1;
1314
-
1315
- /**
1316
- * ID generation and slug helpers for deterministic, Cucumber-compatible IDs.
1317
- */
1318
- /**
1319
- * Generate a deterministic test case ID from source file and scenario name.
1320
- *
1321
- * @param sourceFile - The source file path
1322
- * @param scenario - The scenario name
1323
- * @returns A 12-character hex ID
1324
- */
1325
- declare function generateTestCaseId(sourceFile: string, scenario: string): string;
1326
- /**
1327
- * Generate a deterministic run ID from timestamp and project root.
1328
- *
1329
- * @param startedAtMs - Run start timestamp
1330
- * @param projectRoot - Project root directory
1331
- * @returns A 16-character hex ID
1332
- */
1333
- declare function generateRunId(startedAtMs: number, projectRoot: string): string;
1334
- /**
1335
- * Slugify a string for Cucumber JSON IDs.
1336
- *
1337
- * Converts to lowercase, replaces path separators/spaces with hyphens,
1338
- * removes other special chars, and trims leading/trailing hyphens.
1339
- *
1340
- * @param text - The text to slugify
1341
- * @returns A URL-safe slug
1342
- */
1343
- declare function slugify(text: string): string;
1344
-
1345
- /**
1346
- * Step fallback rules for deriving step results from scenario status.
1347
- *
1348
- * When frameworks don't provide step-level results, we derive them
1349
- * from the overall scenario status using these rules.
1350
- */
1351
-
1352
- /**
1353
- * Derive step results from story steps and scenario status.
1354
- *
1355
- * Rules:
1356
- * - Passed: All steps are passed
1357
- * - Skipped/Pending: All steps are skipped/pending
1358
- * - Failed: Steps up to failure are passed, failing step is failed, rest are skipped
1359
- * (Heuristic: last step is the failure, or use error info if available)
1360
- *
1361
- * @param steps - Story steps with keywords and text
1362
- * @param scenarioStatus - Overall scenario status
1363
- * @param error - Optional error information to help identify failing step
1364
- * @returns Array of step results
1365
- */
1366
- declare function deriveStepResults(steps: StoryStep[], scenarioStatus: TestStatus$1, error?: {
1367
- message?: string;
1368
- stack?: string;
1369
- }): StepResult[];
1370
- /**
1371
- * Merge raw step events with derived step results.
1372
- *
1373
- * When we have partial step data from the framework, merge it with
1374
- * the derived results, preferring actual data over derived.
1375
- *
1376
- * @param derived - Derived step results from fallback rules
1377
- * @param events - Raw step events from framework (if any)
1378
- * @returns Merged step results
1379
- */
1380
- declare function mergeStepResults(derived: StepResult[], events?: Array<{
1381
- index?: number;
1382
- stepId?: string;
1383
- status?: string;
1384
- durationMs?: number;
1385
- errorMessage?: string;
1386
- }>): StepResult[];
1387
-
1388
- /**
1389
- * Attachment resolution: embed vs link decision.
1390
- *
1391
- * Attachments can either be embedded inline (base64) or linked to
1392
- * external files based on size thresholds.
1393
- */
1394
-
1395
- /** Options for attachment resolution */
1396
- interface AttachmentOptions {
1397
- /** Max bytes before attachment becomes external link. Default: 512KB */
1398
- maxEmbedBytes?: number;
1399
- /** Directory for external attachments */
1400
- externalDir?: string;
1401
- /** Project root for relative paths */
1402
- projectRoot?: string;
1403
- }
1404
- /**
1405
- * Resolve a raw attachment to a canonical attachment.
1406
- *
1407
- * Decision logic:
1408
- * 1. If body is already provided, use it (check size for encoding decision)
1409
- * 2. If path is provided, read file and decide embed vs link
1410
- * 3. For large files, return a URL reference instead of embedding
1411
- *
1412
- * @param raw - Raw attachment from framework
1413
- * @param options - Resolution options
1414
- * @returns Resolved canonical attachment
1415
- */
1416
- declare function resolveAttachment(raw: RawAttachment, options?: AttachmentOptions): Attachment;
1417
- /**
1418
- * Resolve multiple attachments.
1419
- *
1420
- * @param attachments - Raw attachments array
1421
- * @param options - Resolution options
1422
- * @returns Resolved canonical attachments
1423
- */
1424
- declare function resolveAttachments(attachments: RawAttachment[] | undefined, options?: AttachmentOptions): Attachment[];
1425
-
1426
- /**
1427
- * Anti-Corruption Layer (ACL) - Layer 2.
1428
- *
1429
- * Transforms permissive RawRun data from framework adapters into
1430
- * strict canonical TestRunResult for formatters.
1431
- */
1432
-
1433
- /**
1434
- * Canonicalize a raw run into a strict TestRunResult.
1435
- *
1436
- * This is the main entry point for the ACL. It:
1437
- * - Enforces required fields with defaults
1438
- * - Normalizes statuses to TestStatus enum
1439
- * - Applies step fallback rules
1440
- * - Resolves attachments (embed vs link)
1441
- * - Generates deterministic IDs
1442
- *
1443
- * @param raw - Raw run data from a framework adapter
1444
- * @param options - Canonicalization options
1445
- * @returns Strict canonical TestRunResult
1446
- */
1447
- declare function canonicalizeRun(raw: RawRun, options?: CanonicalizeOptions): TestRunResult;
1448
-
1449
- /**
1450
- * Validation helpers for canonical TestRunResult.
1451
- *
1452
- * Used in tests to verify ACL output meets all invariants.
1453
- */
1454
-
1455
- /** Validation result */
1456
- interface ValidationResult {
1457
- /** Whether the run is valid */
1458
- valid: boolean;
1459
- /** List of validation errors */
1460
- errors: string[];
1461
- }
1462
- /**
1463
- * Validate a canonical TestRunResult.
1464
- *
1465
- * Checks:
1466
- * - All required fields are present
1467
- * - stepResults length matches story.steps length
1468
- * - stepResults indexes are valid and unique
1469
- * - Durations are non-negative
1470
- * - Timestamps are valid
1471
- *
1472
- * @param run - The TestRunResult to validate
1473
- * @returns Validation result with errors if any
1474
- */
1475
- declare function validateCanonicalRun(run: TestRunResult): ValidationResult;
1476
- /**
1477
- * Assert that a run is valid, throwing if not.
1478
- *
1479
- * Useful in tests.
1480
- *
1481
- * @param run - The TestRunResult to validate
1482
- * @throws Error if validation fails
1483
- */
1484
- declare function assertValidRun(run: TestRunResult): void;
1485
-
1486
780
  /**
1487
781
  * Cucumber JSON Formatter - Layer 3.
1488
782
  *
@@ -1602,7 +896,7 @@ interface ScenarioIndex {
1602
896
  interface ScenarioIndexItem {
1603
897
  id: string;
1604
898
  title: string;
1605
- status: TestStatus;
899
+ status: TestStatus$1;
1606
900
  feature: string;
1607
901
  sourceFile: string;
1608
902
  sourceLine?: number;
@@ -1625,13 +919,13 @@ interface ScenarioIndexStep {
1625
919
  index: number;
1626
920
  keyword: ReportStep["keyword"];
1627
921
  text: string;
1628
- status: TestStatus;
922
+ status: TestStatus$1;
1629
923
  durationMs: number;
1630
924
  errorMessage?: string;
1631
925
  docKinds: string[];
1632
926
  }
1633
927
  interface ScenarioIndexFilters {
1634
- statuses?: TestStatus[];
928
+ statuses?: TestStatus$1[];
1635
929
  tags?: string[];
1636
930
  sourceFiles?: string[];
1637
931
  }
@@ -1713,11 +1007,17 @@ interface RegenerateDeps {
1713
1007
  readFile?: (filePath: string) => string;
1714
1008
  }
1715
1009
  /**
1716
- * Read a raw-run (or canonical) file and regenerate the requested agent
1717
- * artifacts via the canonical {@link ReportGenerator}. Returns the written
1718
- * file paths. This is the unit of work the watcher repeats; it is also useful
1719
- * standalone for a one-shot regenerate.
1010
+ * Read a raw-run (or canonical) file once, canonicalize it, and regenerate the
1011
+ * requested agent artifacts via the canonical {@link ReportGenerator}. Returns
1012
+ * both the written file paths and the canonical run, so a caller that also needs
1013
+ * the run (e.g. `serve`, to diff it) does not read and canonicalize a second
1014
+ * time. This is the unit of work the watcher repeats.
1720
1015
  */
1016
+ declare function regenerateRun(options: WatchOptions, deps?: RegenerateDeps): Promise<{
1017
+ files: string[];
1018
+ run: TestRunResult;
1019
+ }>;
1020
+ /** Regenerate artifacts and return just the written file paths. */
1721
1021
  declare function regenerateArtifacts(options: WatchOptions, deps?: RegenerateDeps): Promise<string[]>;
1722
1022
  interface WatchDeps extends RegenerateDeps {
1723
1023
  /** Watch a path, calling the listener on every change. Injectable for tests. */
@@ -1744,8 +1044,8 @@ interface BehaviorDiffEntry {
1744
1044
  title: string;
1745
1045
  sourceFile: string;
1746
1046
  kind: ScenarioChangeKind;
1747
- baselineStatus?: TestStatus;
1748
- currentStatus?: TestStatus;
1047
+ baselineStatus?: TestStatus$1;
1048
+ currentStatus?: TestStatus$1;
1749
1049
  }
1750
1050
  interface BehaviorDiff {
1751
1051
  schemaVersion: "1.0";
@@ -1763,7 +1063,7 @@ interface BehaviorDiff {
1763
1063
  * Classify a single scenario's status transition between two runs.
1764
1064
  * Shares the `ScenarioChangeKind` vocabulary with the full compare engine.
1765
1065
  */
1766
- declare function classifyStatusChange(baseline: TestStatus | undefined, current: TestStatus | undefined): ScenarioChangeKind;
1066
+ declare function classifyStatusChange(baseline: TestStatus$1 | undefined, current: TestStatus$1 | undefined): ScenarioChangeKind;
1767
1067
  /**
1768
1068
  * Scenario-level diff of two StoryReports, keyed by scenario id. Reports status
1769
1069
  * transitions (the agent triage signal), not the full field-by-field diff that
@@ -1771,83 +1071,6 @@ declare function classifyStatusChange(baseline: TestStatus | undefined, current:
1771
1071
  */
1772
1072
  declare function diffStoryReports(baseline: StoryReport, current: StoryReport): BehaviorDiff;
1773
1073
 
1774
- /**
1775
- * toStoryReport — convert a canonical TestRunResult into the public
1776
- * StoryReport shape consumed by UI renderers.
1777
- *
1778
- * - Groups by sourceFile (relative to projectRoot when possible).
1779
- * - Derives feature title from titlePath[0] when available, otherwise file basename.
1780
- * - Strips adapter-only fields (rawStatus, projectName, raw titlePath).
1781
- * - Pre-computes summary counts at every level.
1782
- * - Generates stable IDs suitable for deep linking.
1783
- */
1784
-
1785
- /**
1786
- * Convert a canonical TestRunResult into a frozen-shape StoryReport for UI renderers.
1787
- */
1788
- declare function toStoryReport(run: TestRunResult): StoryReport;
1789
-
1790
- /**
1791
- * HTML Formatter - Layer 3.
1792
- *
1793
- * Transforms canonical TestRunResult into a standalone HTML report.
1794
- * Implemented via createHtmlFormatter (fn(args, deps) pattern).
1795
- */
1796
-
1797
- /** Options for HTML formatting */
1798
- interface HtmlOptions {
1799
- /** Report title. Default: "Test Results" */
1800
- title?: string;
1801
- /** Include dark mode toggle. Default: true */
1802
- darkMode?: boolean;
1803
- /** Include search/filter functionality. Default: true */
1804
- searchable?: boolean;
1805
- /** Start scenarios collapsed. Default: false */
1806
- startCollapsed?: boolean;
1807
- /** Embed screenshots inline (base64). Default: true */
1808
- embedScreenshots?: boolean;
1809
- /** Inline local html doc files as iframe srcdoc (self-contained report). Default: true */
1810
- embedHtmlFiles?: boolean;
1811
- /** Enable syntax highlighting for code blocks (via highlight.js CDN). Default: true */
1812
- syntaxHighlighting?: boolean;
1813
- /** Enable live Mermaid diagram rendering (via Mermaid.js CDN). Default: true */
1814
- mermaidEnabled?: boolean;
1815
- /** Enable Markdown parsing for section doc entries (via marked.js CDN). Default: true */
1816
- markdownEnabled?: boolean;
1817
- /** Base URL for source permalinks. E.g., "https://github.com/user/repo/blob/main" */
1818
- permalinkBaseUrl?: string;
1819
- /** URL template for ticket links. Use {ticket} as placeholder. E.g., "https://jira.example.com/browse/{ticket}" */
1820
- ticketUrlTemplate?: string;
1821
- /** Show table of contents sidebar. Default: true */
1822
- tocEnabled?: boolean;
1823
- /** Theme name or custom theme object. Default: "default" */
1824
- theme?: string | HtmlTheme;
1825
- /** Include theme picker with all CSS-only themes embedded. Default: false */
1826
- themePickerEnabled?: boolean;
1827
- }
1828
- /**
1829
- * HTML Formatter.
1830
- *
1831
- * Transforms TestRunResult into a standalone HTML report with:
1832
- * - Dark/light mode toggle
1833
- * - Search/filter functionality
1834
- * - Collapsible features and scenarios
1835
- * - Modern, accessible design
1836
- *
1837
- * Thin wrapper around createHtmlFormatter for backward compatibility.
1838
- */
1839
- declare class HtmlFormatter {
1840
- private formatFn;
1841
- constructor(options?: HtmlOptions);
1842
- /**
1843
- * Format a test run into standalone HTML.
1844
- *
1845
- * @param run - Canonical test run result
1846
- * @returns HTML string
1847
- */
1848
- format(run: TestRunResult): string;
1849
- }
1850
-
1851
1074
  /**
1852
1075
  * JUnit XML Formatter - Layer 3.
1853
1076
  *
@@ -2217,243 +1440,6 @@ declare function rewriteAssetPaths(markdown: string, assetsBaseUrl: string, path
2217
1440
  */
2218
1441
  declare function copyMarkdownAssets(options: CopyMarkdownAssetsOptions): AstroAssetResult;
2219
1442
 
2220
- /**
2221
- * Cucumber Messages types for NDJSON output.
2222
- *
2223
- * Minimal own types (no @cucumber/messages dependency) — consistent with
2224
- * the project's zero-external-deps-at-runtime approach.
2225
- *
2226
- * Based on the Cucumber Messages protocol:
2227
- * https://github.com/cucumber/messages
2228
- */
2229
- /** Protobuf-style timestamp { seconds, nanos } */
2230
- interface Timestamp {
2231
- seconds: number;
2232
- nanos: number;
2233
- }
2234
- /** Protobuf-style duration { seconds, nanos } */
2235
- interface Duration {
2236
- seconds: number;
2237
- nanos: number;
2238
- }
2239
- /** Location in a source file */
2240
- interface Location {
2241
- line: number;
2242
- column?: number;
2243
- }
2244
- interface Meta {
2245
- protocolVersion: string;
2246
- implementation: {
2247
- name: string;
2248
- version: string;
2249
- };
2250
- runtime: {
2251
- name: string;
2252
- version: string;
2253
- };
2254
- os: {
2255
- name: string;
2256
- };
2257
- cpu: {
2258
- name: string;
2259
- };
2260
- }
2261
- interface Source {
2262
- uri: string;
2263
- data: string;
2264
- mediaType: "text/x.cucumber.gherkin+plain";
2265
- }
2266
- interface Tag {
2267
- location: Location;
2268
- name: string;
2269
- id: string;
2270
- }
2271
- type KeywordType = "Unknown" | "Context" | "Action" | "Outcome" | "Conjunction";
2272
- interface DocString {
2273
- location: Location;
2274
- mediaType?: string;
2275
- content: string;
2276
- delimiter: string;
2277
- }
2278
- interface TableCell {
2279
- location: Location;
2280
- value: string;
2281
- }
2282
- interface TableRow {
2283
- location: Location;
2284
- cells: TableCell[];
2285
- id: string;
2286
- }
2287
- interface DataTable {
2288
- location: Location;
2289
- rows: TableRow[];
2290
- }
2291
- interface Step {
2292
- location: Location;
2293
- keyword: string;
2294
- keywordType: KeywordType;
2295
- text: string;
2296
- id: string;
2297
- docString?: DocString;
2298
- dataTable?: DataTable;
2299
- }
2300
- interface Scenario {
2301
- location: Location;
2302
- tags: Tag[];
2303
- keyword: string;
2304
- name: string;
2305
- description: string;
2306
- steps: Step[];
2307
- id: string;
2308
- }
2309
- interface Background {
2310
- location: Location;
2311
- keyword: string;
2312
- name: string;
2313
- description: string;
2314
- steps: Step[];
2315
- id: string;
2316
- }
2317
- type FeatureChild = {
2318
- background: Background;
2319
- scenario?: undefined;
2320
- } | {
2321
- scenario: Scenario;
2322
- background?: undefined;
2323
- };
2324
- interface Feature {
2325
- location: Location;
2326
- tags: Tag[];
2327
- language: string;
2328
- keyword: string;
2329
- name: string;
2330
- description: string;
2331
- children: FeatureChild[];
2332
- }
2333
- interface GherkinDocument {
2334
- uri: string;
2335
- feature: Feature;
2336
- }
2337
- type PickleStepType = "Unknown" | "Context" | "Action" | "Outcome";
2338
- interface PickleDocString {
2339
- mediaType?: string;
2340
- content: string;
2341
- }
2342
- interface PickleTableCell {
2343
- value: string;
2344
- }
2345
- interface PickleTableRow {
2346
- cells: PickleTableCell[];
2347
- }
2348
- interface PickleTable {
2349
- rows: PickleTableRow[];
2350
- }
2351
- interface PickleStepArgument {
2352
- docString?: PickleDocString;
2353
- dataTable?: PickleTable;
2354
- }
2355
- interface PickleStep {
2356
- astNodeIds: string[];
2357
- id: string;
2358
- type: PickleStepType;
2359
- text: string;
2360
- argument?: PickleStepArgument;
2361
- }
2362
- interface PickleTag {
2363
- name: string;
2364
- astNodeId: string;
2365
- }
2366
- interface Pickle {
2367
- id: string;
2368
- uri: string;
2369
- name: string;
2370
- language: string;
2371
- steps: PickleStep[];
2372
- tags: PickleTag[];
2373
- astNodeIds: string[];
2374
- }
2375
- type TestStepResultStatus = "UNKNOWN" | "PASSED" | "SKIPPED" | "PENDING" | "UNDEFINED" | "AMBIGUOUS" | "FAILED";
2376
- interface TestStepResult {
2377
- duration: Duration;
2378
- status: TestStepResultStatus;
2379
- message?: string;
2380
- }
2381
- interface TestStep {
2382
- id: string;
2383
- pickleStepId?: string;
2384
- stepDefinitionIds?: string[];
2385
- }
2386
- interface TestCase {
2387
- id: string;
2388
- pickleId: string;
2389
- testSteps: TestStep[];
2390
- }
2391
- interface TestRunStarted {
2392
- timestamp: Timestamp;
2393
- }
2394
- interface TestCaseStarted {
2395
- id: string;
2396
- testCaseId: string;
2397
- timestamp: Timestamp;
2398
- attempt: number;
2399
- }
2400
- interface TestStepStarted {
2401
- testCaseStartedId: string;
2402
- testStepId: string;
2403
- timestamp: Timestamp;
2404
- }
2405
- interface TestStepFinished {
2406
- testCaseStartedId: string;
2407
- testStepId: string;
2408
- testStepResult: TestStepResult;
2409
- timestamp: Timestamp;
2410
- }
2411
- interface TestCaseFinished {
2412
- testCaseStartedId: string;
2413
- timestamp: Timestamp;
2414
- willBeRetried: boolean;
2415
- }
2416
- interface TestRunFinished {
2417
- timestamp: Timestamp;
2418
- success: boolean;
2419
- }
2420
- type AttachmentContentEncoding = "IDENTITY" | "BASE64";
2421
- interface CucumberAttachment {
2422
- testCaseStartedId: string;
2423
- testStepId?: string;
2424
- body: string;
2425
- mediaType: string;
2426
- contentEncoding: AttachmentContentEncoding;
2427
- }
2428
- /**
2429
- * Each NDJSON line is one Envelope with exactly one field set.
2430
- */
2431
- type Envelope = {
2432
- meta: Meta;
2433
- } | {
2434
- source: Source;
2435
- } | {
2436
- gherkinDocument: GherkinDocument;
2437
- } | {
2438
- pickle: Pickle;
2439
- } | {
2440
- testRunStarted: TestRunStarted;
2441
- } | {
2442
- testCase: TestCase;
2443
- } | {
2444
- testCaseStarted: TestCaseStarted;
2445
- } | {
2446
- testStepStarted: TestStepStarted;
2447
- } | {
2448
- testStepFinished: TestStepFinished;
2449
- } | {
2450
- testCaseFinished: TestCaseFinished;
2451
- } | {
2452
- testRunFinished: TestRunFinished;
2453
- } | {
2454
- attachment: CucumberAttachment;
2455
- };
2456
-
2457
1443
  /**
2458
1444
  * CucumberMessagesFormatter — produces NDJSON compatible with @cucumber/html-formatter.
2459
1445
  *
@@ -2524,14 +1510,11 @@ declare class CucumberHtmlFormatter {
2524
1510
 
2525
1511
  interface RunDiffHtmlOptions {
2526
1512
  title?: string;
2527
- /** Theme name or custom theme object. Default: "default" */
2528
- theme?: string | HtmlTheme;
2529
1513
  /** Enable dark mode toggle. Default: true */
2530
1514
  darkMode?: boolean;
2531
1515
  }
2532
1516
  declare class RunDiffHtmlFormatter {
2533
1517
  private title;
2534
- private theme;
2535
1518
  private darkMode;
2536
1519
  constructor(options?: RunDiffHtmlOptions);
2537
1520
  format(diff: RunDiffResult): string;
@@ -2546,32 +1529,6 @@ declare class RunDiffMarkdownFormatter {
2546
1529
  format(diff: RunDiffResult): string;
2547
1530
  }
2548
1531
 
2549
- /**
2550
- * NDJSON-to-TestRunResult parser.
2551
- *
2552
- * Parses Cucumber Messages NDJSON (one JSON envelope per line) back into
2553
- * a TestRunResult suitable for rendering by HtmlFormatter or other formatters.
2554
- *
2555
- * This is the NDJSON compat path: it produces a minimal but sufficient
2556
- * TestRunResult. Fields not present in the NDJSON stream are given
2557
- * sensible defaults.
2558
- */
2559
-
2560
- /**
2561
- * Parse an NDJSON string into a TestRunResult.
2562
- *
2563
- * @param ndjson - NDJSON string (one JSON envelope per line)
2564
- * @returns TestRunResult reconstructed from the envelopes
2565
- */
2566
- declare function parseNdjson(ndjson: string): TestRunResult;
2567
- /**
2568
- * Parse an array of Envelope objects into a TestRunResult.
2569
- *
2570
- * @param envelopes - Array of Cucumber Messages envelopes
2571
- * @returns TestRunResult reconstructed from the envelopes
2572
- */
2573
- declare function parseEnvelopes(envelopes: Envelope[]): TestRunResult;
2574
-
2575
1532
  /**
2576
1533
  * Git information utilities.
2577
1534
  *
@@ -2601,33 +1558,6 @@ declare function findGitDir(start: string): string | undefined;
2601
1558
  */
2602
1559
  declare function readBranchName(cwd?: string): string | undefined;
2603
1560
 
2604
- /**
2605
- * Duration formatting utilities.
2606
- */
2607
- /**
2608
- * Format milliseconds as human-readable duration.
2609
- *
2610
- * @param ms - Duration in milliseconds
2611
- * @returns Formatted string (e.g., "123 ms", "1.5 s", "2m 30s")
2612
- */
2613
- declare function formatDuration(ms: number): string;
2614
- /**
2615
- * Convert milliseconds to nanoseconds.
2616
- *
2617
- * Used for Cucumber JSON format which expects nanoseconds.
2618
- *
2619
- * @param ms - Duration in milliseconds
2620
- * @returns Duration in nanoseconds
2621
- */
2622
- declare function msToNanoseconds(ms: number): number;
2623
- /**
2624
- * Convert nanoseconds to milliseconds.
2625
- *
2626
- * @param ns - Duration in nanoseconds
2627
- * @returns Duration in milliseconds
2628
- */
2629
- declare function nanosecondsToMs(ns: number): number;
2630
-
2631
1561
  /**
2632
1562
  * Metadata utilities for reading package information.
2633
1563
  */
@@ -2691,31 +1621,6 @@ declare function tryGetActiveOtelContext(): OtelTraceContext | undefined;
2691
1621
  */
2692
1622
  declare function resolveTraceUrl(template: string | undefined, traceId: string): string | undefined;
2693
1623
 
2694
- /**
2695
- * Canonical builders for doc entries whose construction carries a rule worth
2696
- * keeping in one place. Adapters import these instead of re-implementing the
2697
- * logic (the `html` exactly-one-of-source rule was previously copied verbatim
2698
- * across the Vitest, Jest, Cypress, and Playwright adapters).
2699
- */
2700
-
2701
- /** Source/presentation options for an `html` doc entry. */
2702
- interface HtmlDocOptions {
2703
- /** Local HTML file path (inlined into the report by default). */
2704
- path?: string;
2705
- /** Remote URL rendered via iframe src. */
2706
- url?: string;
2707
- /** Inline HTML content rendered via iframe srcdoc. */
2708
- content?: string;
2709
- title?: string;
2710
- /** Iframe height: number → px, string passed through (e.g. '60vh'). Default 400px. */
2711
- height?: number | string;
2712
- }
2713
- /**
2714
- * Build an `html` DocEntry, enforcing that exactly one of path/url/content is
2715
- * set. Throws otherwise — this is the single source of that rule.
2716
- */
2717
- declare function buildHtmlDocEntry(options: HtmlDocOptions): DocEntry;
2718
-
2719
1624
  /**
2720
1625
  * Notification orchestrator.
2721
1626
  *
@@ -2894,6 +1799,51 @@ declare function signBody(args: {
2894
1799
  /** Strip ANSI escape sequences. Regex: \x1B\[[0-?]*[ -/]*[@-~] */
2895
1800
  declare function stripAnsi(text: string): string;
2896
1801
 
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
+
2897
1847
  /**
2898
1848
  * History store: load, save, update (fn(args, deps) pattern).
2899
1849
  */
@@ -2993,6 +1943,8 @@ declare function hasSufficientHistory(entries: unknown[], min: number): boolean;
2993
1943
  interface ListScenariosArgs {
2994
1944
  testCases: TestCaseResult[];
2995
1945
  format: "text" | "json" | "csv" | "markdown-table";
1946
+ /** Emit compact (single-line) JSON for agent consumption. Only affects "json". Default false. */
1947
+ minify?: boolean;
2996
1948
  }
2997
1949
  type ListScenariosDeps = Record<string, never>;
2998
1950
  declare function listScenarios(args: ListScenariosArgs, _deps: ListScenariosDeps): string;
@@ -3014,13 +1966,13 @@ declare function listScenarios(args: ListScenariosArgs, _deps: ListScenariosDeps
3014
1966
  interface CheckArgs {
3015
1967
  testCases: TestCaseResult[];
3016
1968
  /** Baseline scenario statuses keyed by scenario id, for regressed/fixed deltas. */
3017
- baseline?: Map<string, TestStatus$1>;
1969
+ baseline?: Map<string, TestStatus>;
3018
1970
  format: "text" | "json";
3019
1971
  }
3020
1972
  type CheckDeps = Record<string, never>;
3021
1973
  /** A single rendered step inside a failing scenario. */
3022
1974
  interface CheckStep {
3023
- keyword: StepKeyword$1;
1975
+ keyword: StepKeyword;
3024
1976
  text: string;
3025
1977
  /** True when this step is the one that failed. */
3026
1978
  failed: boolean;
@@ -3138,7 +2090,7 @@ interface TriageItem {
3138
2090
  rank: number;
3139
2091
  id: string;
3140
2092
  scenario: string;
3141
- status: TestStatus$1;
2093
+ status: TestStatus;
3142
2094
  /** `sourceFile:sourceLine` */
3143
2095
  location: string;
3144
2096
  /** Product-code paths to fix. Empty when the scenario declared no `covers`. */
@@ -3160,7 +2112,7 @@ interface TriageReport {
3160
2112
  interface TriageArgs {
3161
2113
  testCases: TestCaseResult[];
3162
2114
  /** Baseline statuses by scenario id, to flag regressions and rank them first. */
3163
- baseline?: Map<string, TestStatus$1>;
2115
+ baseline?: Map<string, TestStatus>;
3164
2116
  format: "text" | "json";
3165
2117
  }
3166
2118
  type TriageDeps = Record<string, never>;
@@ -3256,14 +2208,11 @@ declare class ReviewMarkdownFormatter {
3256
2208
 
3257
2209
  interface ReviewHtmlOptions {
3258
2210
  title?: string;
3259
- /** Theme name or custom theme object. Default: "default" */
3260
- theme?: string | HtmlTheme;
3261
2211
  /** Enable dark mode toggle. Default: true */
3262
2212
  darkMode?: boolean;
3263
2213
  }
3264
2214
  declare class ReviewHtmlFormatter {
3265
2215
  private title;
3266
- private theme;
3267
2216
  private darkMode;
3268
2217
  constructor(options?: ReviewHtmlOptions);
3269
2218
  format(review: ReviewResult): string;
@@ -3393,7 +2342,7 @@ interface TraceabilityRequirement {
3393
2342
  scenarios: Array<{
3394
2343
  id: string;
3395
2344
  title: string;
3396
- status: TestStatus$1;
2345
+ status: TestStatus;
3397
2346
  sourceFile: string;
3398
2347
  sourceLine: number;
3399
2348
  covers: string[];
@@ -3422,7 +2371,7 @@ interface TraceabilityMatrix {
3422
2371
  untraced: Array<{
3423
2372
  id: string;
3424
2373
  title: string;
3425
- status: TestStatus$1;
2374
+ status: TestStatus;
3426
2375
  sourceFile: string;
3427
2376
  sourceLine: number;
3428
2377
  }>;
@@ -3441,7 +2390,8 @@ declare function toTraceabilityMatrix(run: TestRunResult): TraceabilityMatrix;
3441
2390
  * Architecture:
3442
2391
  * - Layer 1: Framework Adapters (adaptJestRun, adaptVitestRun, adaptPlaywrightRun)
3443
2392
  * - Layer 2: Anti-Corruption Layer (canonicalizeRun)
3444
- * - Layer 3: Formatters (CucumberJsonFormatter, HtmlFormatter, JUnitFormatter, MarkdownFormatter)
2393
+ * - Layer 3: Formatters (CucumberJsonFormatter, JUnitFormatter, MarkdownFormatter; the
2394
+ * HTML report renders via executable-stories-react — the `html` format)
3445
2395
  */
3446
2396
 
3447
2397
  /** Arguments for generate function */
@@ -3473,16 +2423,12 @@ interface GenerateCompareResult {
3473
2423
  */
3474
2424
  declare function joinNameAndExt(name: string, ext: string): string;
3475
2425
  /**
3476
- * High-level report generator that combines multiple formatters.
3477
- *
3478
- * Accepts ONLY canonical TestRunResult - use adapters + canonicalizeRun first.
3479
- *
3480
- * Supports output routing:
3481
- * - Aggregated: All test cases in a single file
3482
- * - Colocated mirrored: Files mirrored under outputDir preserving directory structure
3483
- * - Colocated adjacent: Files written next to source files
3484
- * - Rule-based: Different routing based on source file patterns
2426
+ * Normalise input formats to canonical {@link OutputFormat}s. Accepts the
2427
+ * deprecated `"astro"` alias (renamed to `"astro-markdown"`) and warns once per
2428
+ * process so programmatic/config callers passing `"astro"` keep working
2429
+ * instead of throwing, matching the CLI's deprecation behaviour.
3485
2430
  */
2431
+ declare function normalizeFormats(formats: ReadonlyArray<FormatInput>): OutputFormat[];
3486
2432
  declare class ReportGenerator {
3487
2433
  private options;
3488
2434
  private deps;
@@ -3506,6 +2452,13 @@ declare class ReportGenerator {
3506
2452
  * Format content for a specific format.
3507
2453
  */
3508
2454
  private formatContent;
2455
+ /**
2456
+ * Render a standalone HTML report via the shared React component tree
2457
+ * (executable-stories-react). This is the same renderer the Astro docs site
2458
+ * uses, so the two outputs cannot drift. Imported lazily so React stays out
2459
+ * of the eager bundle unless this format is requested.
2460
+ */
2461
+ private formatHtmlReact;
3509
2462
  }
3510
2463
  /**
3511
2464
  * Factory function to create a ReportGenerator with dependency injection.
@@ -3541,4 +2494,4 @@ declare function normalizeVitestResults(testModules: Parameters<typeof adaptVite
3541
2494
  */
3542
2495
  declare function normalizePlaywrightResults(testResults: Parameters<typeof adaptPlaywrightRun>[0], adapterOptions?: Parameters<typeof adaptPlaywrightRun>[1], canonicalizeOptions?: CanonicalizeOptions): TestRunResult;
3543
2496
 
3544
- 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, HtmlFormatter, type HtmlOptions, type HtmlTheme, type HtmlThemeName, 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, RunDiffHtmlFormatter, type RunDiffHtmlOptions, RunDiffMarkdownFormatter, type RunDiffMarkdownOptions, type RunDiffResult, type RunDiffSummary, 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 as TypedCIInfo, type ValidationResult, type WatchDeps, type WatchHandle, type WatchOptions, type WebhookPayload, type WebhookSignerHmac, type WriteFile, adaptJestRun, adaptPlaywrightRun, adaptVitestRun, 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, getAvailableThemes, getCssOnlyThemes, getDeploymentStatus, getEnvironmentDrift, gradeEvidence, hasSufficientHistory, isReviewableSource, isTestFile, joinNameAndExt, listScenarios, loadHistory, mergeStepResults, msToNanoseconds, nanosecondsToMs, normalizeJestResults, normalizePlaywrightResults, normalizeStatus, normalizeVitestResults, parseEnvelopes, parseNdjson, publishConfluencePage, publishJiraIssue, readBranchName, readGitSha, readPackageVersion, recordDeployment, regenerateArtifacts, renderCheck, renderGoal, renderTriage, resolveAttachment, resolveAttachments, resolveTheme, resolveTraceUrl, rewriteAssetPaths, saveHistory, scenariosCoveringPaths, sendNotifications, sendSlackNotification, sendTeamsNotification, sendWebhookNotification, signBody, slugify, startWatch, stripAnsi, toBehaviorManifest, toReleaseManifest, toScenarioIndex, toStoryReport, toTraceabilityMatrix, tryGetActiveOtelContext, updateHistory, validateCanonicalRun };
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 };