executable-stories-formatters 0.17.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 +2509 -16778
  7. package/dist/cli.js.map +1 -1
  8. package/dist/index.cjs +2324 -15956
  9. package/dist/index.cjs.map +1 -1
  10. package/dist/index.d.cts +117 -1259
  11. package/dist/index.d.ts +117 -1259
  12. package/dist/index.js +2323 -15949
  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.ts CHANGED
@@ -1,6 +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.js';
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.js';
3
- import * as http from 'node:http';
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.js';
8
+ export { JestAdapterOptions, JestAggregatedResult, JestFileResult, JestTestResult, PlaywrightAdapterOptions, PlaywrightAnnotation, PlaywrightAttachment, PlaywrightError, PlaywrightLocation, PlaywrightStatus, PlaywrightTestCase, PlaywrightTestResult, StoryFileReport, VitestAdapterOptions, VitestSerializedError, VitestState, VitestTestCase, VitestTestModule, VitestTestResult } from './adapters.js';
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';
4
25
 
5
26
  /**
6
27
  * Notification types for webhook integrations (Slack, Teams).
@@ -126,32 +147,16 @@ declare class ConfluenceFormatter {
126
147
  /**
127
148
  * Configuration options for ACL and formatters.
128
149
  */
129
- /** Options for canonicalizing raw run data */
130
- interface CanonicalizeOptions {
131
- /** Attachment handling options */
132
- attachments?: {
133
- /** Max bytes before attachment becomes external link. Default: 512KB (524288) */
134
- maxEmbedBytes?: number;
135
- /** Directory for external attachments */
136
- externalDir?: string;
137
- };
138
- /** Cucumber compatibility options */
139
- cucumber?: {
140
- /** Include trailing space in keywords (e.g., "Given "). Default: true */
141
- keywordSpacing?: boolean;
142
- /** Generate deterministic line numbers. Default: true */
143
- deterministicLines?: boolean;
144
- };
145
- /** Default timestamps if not provided in raw data */
146
- defaults?: {
147
- /** Default start time (epoch ms). Default: Date.now() */
148
- startedAtMs?: number;
149
- /** Default finish time (epoch ms). Default: Date.now() */
150
- finishedAtMs?: number;
151
- };
152
- }
150
+
153
151
  /** Output format for report generation */
154
- 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";
155
160
  /** Sort order for test cases in reports (deterministic for diff-friendly output) */
156
161
  type SortTestCasesMode = "id" | "source" | "none";
157
162
  /** Output mode for report routing */
@@ -177,7 +182,7 @@ interface OutputRule {
177
182
  /** Output filename override (without extension) */
178
183
  outputName?: string;
179
184
  /** Formats to generate for matched files */
180
- formats?: OutputFormat[];
185
+ formats?: FormatInput[];
181
186
  }
182
187
  /** Output configuration for report routing */
183
188
  interface OutputConfig {
@@ -207,7 +212,7 @@ interface FormatterOptions {
207
212
  /** Tags to exclude test cases (any match). Applied after includeTags. */
208
213
  excludeTags?: string[];
209
214
  /** Output formats to generate. Default: ["html"] */
210
- formats?: OutputFormat[];
215
+ formats?: FormatInput[];
211
216
  /** Output directory for generated reports. Default: "reports" */
212
217
  outputDir?: string;
213
218
  /** Base filename (without extension). Default: "index" */
@@ -238,36 +243,19 @@ interface FormatterOptions {
238
243
  /** Pretty-print JSON output. Default: true */
239
244
  pretty?: boolean;
240
245
  };
241
- /** 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
+ */
242
252
  html?: {
243
253
  /** Report title. Default: "Test Results" */
244
254
  title?: string;
245
- /** Include dark mode toggle. Default: true */
246
- darkMode?: boolean;
247
- /** Include search/filter functionality. Default: true */
248
- searchable?: boolean;
249
- /** Start with scenarios collapsed. Default: false */
250
- startCollapsed?: boolean;
251
- /** Embed screenshots inline (base64). Default: true */
252
- embedScreenshots?: boolean;
253
- /** Inline local html doc files as iframe srcdoc. Default: true ("none" asset mode), false under "copy". */
254
- embedHtmlFiles?: boolean;
255
255
  /** Enable syntax highlighting for code blocks (via highlight.js CDN). Default: true */
256
256
  syntaxHighlighting?: boolean;
257
257
  /** Enable live Mermaid diagram rendering (via Mermaid.js CDN). Default: true */
258
258
  mermaidEnabled?: boolean;
259
- /** Enable Markdown parsing for section doc entries (via marked.js CDN). Default: true */
260
- markdownEnabled?: boolean;
261
- /** Base URL for source permalinks. E.g., "https://github.com/user/repo/blob/main" */
262
- permalinkBaseUrl?: string;
263
- /** URL template for ticket links. Use {ticket} as placeholder. E.g., "https://jira.example.com/browse/{ticket}" */
264
- ticketUrlTemplate?: string;
265
- /** Theme name. Default: "default". Available: default, corporate, terminal, minimal, dashboard, playful */
266
- theme?: string;
267
- /** Show table of contents sidebar. Default: true */
268
- tocEnabled?: boolean;
269
- /** Include theme picker with all CSS-only themes embedded. Default: false */
270
- themePickerEnabled?: boolean;
271
259
  };
272
260
  /** JUnit XML specific options */
273
261
  junit?: {
@@ -429,19 +417,8 @@ interface ResolvedFormatterOptions {
429
417
  };
430
418
  html: {
431
419
  title: string;
432
- darkMode: boolean;
433
- searchable: boolean;
434
- startCollapsed: boolean;
435
- embedScreenshots: boolean;
436
- embedHtmlFiles: boolean;
437
420
  syntaxHighlighting: boolean;
438
421
  mermaidEnabled: boolean;
439
- markdownEnabled: boolean;
440
- permalinkBaseUrl?: string;
441
- ticketUrlTemplate?: string;
442
- theme: string;
443
- tocEnabled: boolean;
444
- themePickerEnabled: boolean;
445
422
  };
446
423
  junit: {
447
424
  suiteName: string;
@@ -521,7 +498,7 @@ interface ScenarioSnapshot {
521
498
  scenario: string;
522
499
  sourceFile: string;
523
500
  sourceLine: number;
524
- status: TestStatus$1;
501
+ status: TestStatus;
525
502
  durationMs: number;
526
503
  tags: string[];
527
504
  titlePath: string[];
@@ -688,199 +665,6 @@ interface ExecutableStoriesConfig {
688
665
  formatters?: Record<string, Formatter>;
689
666
  }
690
667
 
691
- /**
692
- * StoryReport — public, frozen contract for UI renderers.
693
- *
694
- * Distinct from internal TestRunResult. Pre-grouped feature → scenario tree,
695
- * with pre-computed summaries at every level. Adapter concerns (rawStatus,
696
- * projectName, titlePath) are stripped at the toStoryReport boundary.
697
- *
698
- * Versioning: semver-style "<major>.<minor>". Additive-only within a major.
699
- * Source of truth: schemas/story-report-v1.json. Types here must stay in sync.
700
- */
701
-
702
- type StoryReportSchemaVersion = `1.${number}`;
703
- type TestStatus = "passed" | "failed" | "skipped" | "pending";
704
- type StepKeyword = "Given" | "When" | "Then" | "And" | "But";
705
- type StepMode = "normal" | "skip" | "only" | "todo" | "fails" | "concurrent";
706
- interface ReportSummary {
707
- total: number;
708
- passed: number;
709
- failed: number;
710
- skipped: number;
711
- pending: number;
712
- durationMs: number;
713
- }
714
- interface ReportTicket {
715
- id: string;
716
- url?: string;
717
- }
718
- interface ReportAttachment {
719
- name: string;
720
- mediaType: string;
721
- body: string;
722
- contentEncoding: "BASE64" | "IDENTITY";
723
- }
724
- interface ReportCIInfo {
725
- name: string;
726
- url?: string;
727
- buildNumber?: string;
728
- branch?: string;
729
- commitSha?: string;
730
- prNumber?: string;
731
- }
732
- interface ReportCoverageSummary {
733
- linesPct?: number;
734
- branchesPct?: number;
735
- functionsPct?: number;
736
- statementsPct?: number;
737
- }
738
- type ReportDocEntry = ReportDocNote | ReportDocTag | ReportDocKv | ReportDocCode | ReportDocTable | ReportDocLink | ReportDocSection | ReportDocMermaid | ReportDocScreenshot | ReportDocVideo | ReportDocHtml | ReportDocCustom;
739
- interface ReportDocNote {
740
- kind: "note";
741
- text: string;
742
- phase: DocPhase;
743
- children?: ReportDocEntry[];
744
- }
745
- interface ReportDocTag {
746
- kind: "tag";
747
- names: string[];
748
- phase: DocPhase;
749
- children?: ReportDocEntry[];
750
- }
751
- interface ReportDocKv {
752
- kind: "kv";
753
- label: string;
754
- value: unknown;
755
- phase: DocPhase;
756
- children?: ReportDocEntry[];
757
- }
758
- interface ReportDocCode {
759
- kind: "code";
760
- label: string;
761
- content: string;
762
- lang?: string;
763
- phase: DocPhase;
764
- children?: ReportDocEntry[];
765
- }
766
- interface ReportDocTable {
767
- kind: "table";
768
- label: string;
769
- columns: string[];
770
- rows: string[][];
771
- phase: DocPhase;
772
- children?: ReportDocEntry[];
773
- }
774
- interface ReportDocLink {
775
- kind: "link";
776
- label: string;
777
- url: string;
778
- phase: DocPhase;
779
- children?: ReportDocEntry[];
780
- }
781
- interface ReportDocSection {
782
- kind: "section";
783
- title: string;
784
- markdown: string;
785
- phase: DocPhase;
786
- children?: ReportDocEntry[];
787
- }
788
- interface ReportDocMermaid {
789
- kind: "mermaid";
790
- code: string;
791
- title?: string;
792
- phase: DocPhase;
793
- children?: ReportDocEntry[];
794
- }
795
- interface ReportDocScreenshot {
796
- kind: "screenshot";
797
- path: string;
798
- alt?: string;
799
- phase: DocPhase;
800
- children?: ReportDocEntry[];
801
- }
802
- interface ReportDocVideo {
803
- kind: "video";
804
- path: string;
805
- caption?: string;
806
- poster?: string;
807
- phase: DocPhase;
808
- children?: ReportDocEntry[];
809
- }
810
- interface ReportDocHtml {
811
- kind: "html";
812
- /** Local HTML file path (exactly one of path/url/content) */
813
- path?: string;
814
- /** Remote URL rendered via iframe src (exactly one of path/url/content) */
815
- url?: string;
816
- /** Inline HTML content rendered via iframe srcdoc (exactly one of path/url/content) */
817
- content?: string;
818
- title?: string;
819
- /** Iframe height: number → px, string passed through (e.g. "60vh"). Default 400px. */
820
- height?: number | string;
821
- phase: DocPhase;
822
- children?: ReportDocEntry[];
823
- }
824
- interface ReportDocCustom {
825
- kind: "custom";
826
- type: string;
827
- data: unknown;
828
- phase: DocPhase;
829
- children?: ReportDocEntry[];
830
- }
831
- interface ReportStep {
832
- id: string;
833
- index: number;
834
- keyword: StepKeyword;
835
- text: string;
836
- status: TestStatus;
837
- durationMs: number;
838
- errorMessage?: string;
839
- mode?: StepMode;
840
- docEntries: ReportDocEntry[];
841
- }
842
- interface ReportScenario {
843
- id: string;
844
- title: string;
845
- status: TestStatus;
846
- durationMs: number;
847
- tags: string[];
848
- tickets?: ReportTicket[];
849
- /** Product-code paths/globs this scenario exercises (project-root-relative). */
850
- covers?: string[];
851
- sourceLine?: number;
852
- errorMessage?: string;
853
- errorStack?: string;
854
- retry: number;
855
- retries: number;
856
- docEntries: ReportDocEntry[];
857
- steps: ReportStep[];
858
- attachments: ReportAttachment[];
859
- }
860
- interface ReportFeature {
861
- id: string;
862
- title: string;
863
- sourceFile: string;
864
- summary: ReportSummary;
865
- scenarios: ReportScenario[];
866
- }
867
- interface StoryReport {
868
- schemaVersion: StoryReportSchemaVersion;
869
- runId: string;
870
- startedAtMs: number;
871
- finishedAtMs: number;
872
- durationMs: number;
873
- projectRoot: string;
874
- packageVersion?: string;
875
- gitSha?: string;
876
- ci?: ReportCIInfo;
877
- coverage?: ReportCoverageSummary;
878
- summary: ReportSummary;
879
- features: ReportFeature[];
880
- }
881
- declare const STORY_REPORT_SCHEMA_VERSION: StoryReportSchemaVersion;
882
- declare const STORY_REPORT_SCHEMA_MAJOR: 1;
883
-
884
668
  /**
885
669
  * Review types — the model behind the Evidence-Driven Review report.
886
670
  *
@@ -942,7 +726,7 @@ interface ReviewClaim {
942
726
  sourceFile: string;
943
727
  sourceLine: number;
944
728
  /** Test outcome. */
945
- status: TestStatus$1;
729
+ status: TestStatus;
946
730
  /** Derived from file convention / `audience:` tag. */
947
731
  audience: ReviewAudience;
948
732
  /** Declared via `change:*` tag (defaults to `unknown`). */
@@ -993,497 +777,6 @@ interface ReviewResult {
993
777
  changedFiles: ChangedFileReview[];
994
778
  }
995
779
 
996
- /**
997
- * Render an OTel trace waterfall (fn(args, deps)).
998
- */
999
-
1000
- interface RenderTraceViewArgs {
1001
- spans: OtelSpan[] | undefined;
1002
- }
1003
- interface RenderTraceViewDeps {
1004
- escapeHtml: (str: string) => string;
1005
- }
1006
-
1007
- /**
1008
- * Render attachments section (fn(args, deps)).
1009
- */
1010
-
1011
- interface RenderAttachmentsArgs {
1012
- attachments: Attachment[];
1013
- }
1014
- interface RenderAttachmentsDeps {
1015
- escapeHtml: (str: string) => string;
1016
- embedScreenshots: boolean;
1017
- }
1018
-
1019
- /**
1020
- * Render error box (fn(args, deps)).
1021
- */
1022
- interface RenderErrorBoxArgs {
1023
- message: string;
1024
- stack?: string;
1025
- }
1026
- interface RenderErrorBoxDeps {
1027
- escapeHtml: (str: string) => string;
1028
- }
1029
-
1030
- interface RenderStepsArgs {
1031
- steps: StoryStep[];
1032
- stepResults: StepResult[];
1033
- }
1034
- interface RenderStepsDeps {
1035
- escapeHtml: (str: string) => string;
1036
- getStatusIcon: (status: TestStatus$1) => string;
1037
- renderDocs: (docs: DocEntry[] | undefined, containerClass: string) => string;
1038
- highlightStepParams?: (text: string) => string;
1039
- }
1040
-
1041
- /**
1042
- * Types for history tracking and test metrics.
1043
- */
1044
-
1045
- interface HistoryEntry {
1046
- runId: string;
1047
- timestamp: number;
1048
- status: "passed" | "failed" | "skipped" | "pending";
1049
- durationMs: number;
1050
- ci?: {
1051
- provider?: CIProvider;
1052
- branch?: string;
1053
- commitSha?: string;
1054
- };
1055
- }
1056
- interface TestHistory {
1057
- testId: string;
1058
- testName: string;
1059
- sourceFile: string;
1060
- sourceLine?: number;
1061
- entries: HistoryEntry[];
1062
- }
1063
- interface HistoryStore {
1064
- version: 1;
1065
- maxRuns: number;
1066
- tests: Record<string, TestHistory>;
1067
- lastUpdated: number;
1068
- }
1069
- type StabilityGrade = "A" | "B" | "C" | "D" | "F";
1070
- type FlakinessLevel = "stable" | "unstable" | "flaky";
1071
- type PerformanceTrend = "improving" | "stable" | "regressing";
1072
- interface TestMetrics {
1073
- testId: string;
1074
- flakinessLevel: FlakinessLevel;
1075
- flakinessScore: number;
1076
- failureRate: number;
1077
- stabilityGrade: StabilityGrade;
1078
- performanceTrend: PerformanceTrend;
1079
- avgDurationMs: number;
1080
- passRate: number;
1081
- longestPassStreak: number;
1082
- consecutiveFailures: number;
1083
- sampleSize: number;
1084
- }
1085
-
1086
- interface RenderScenarioArgs {
1087
- tc: TestCaseResult;
1088
- metrics?: TestMetrics;
1089
- }
1090
- interface RenderScenarioDeps {
1091
- escapeHtml: (str: string) => string;
1092
- getStatusIcon: (status: TestStatus$1) => string;
1093
- startCollapsed: boolean;
1094
- renderSteps: (args: RenderStepsArgs, deps: RenderStepsDeps) => string;
1095
- renderDocs: (docs: DocEntry[] | undefined, containerClass: string) => string;
1096
- renderErrorBox: (args: RenderErrorBoxArgs, deps: RenderErrorBoxDeps) => string;
1097
- renderAttachments: (args: RenderAttachmentsArgs, deps: RenderAttachmentsDeps) => string;
1098
- renderTraceView: (args: RenderTraceViewArgs, deps: RenderTraceViewDeps) => string;
1099
- embedScreenshots: boolean;
1100
- permalinkBaseUrl?: string;
1101
- ticketUrlTemplate?: string;
1102
- }
1103
-
1104
- interface RenderFeatureArgs {
1105
- file: string;
1106
- testCases: TestCaseResult[];
1107
- metricsMap?: Map<string, TestMetrics>;
1108
- }
1109
- interface RenderFeatureDeps {
1110
- escapeHtml: (str: string) => string;
1111
- startCollapsed: boolean;
1112
- renderScenario: (args: RenderScenarioArgs, deps: RenderScenarioDeps) => string;
1113
- scenarioDeps: RenderScenarioDeps;
1114
- }
1115
-
1116
- /**
1117
- * Render summary cards section (fn(args, deps)).
1118
- * No deps: pure counts to HTML.
1119
- */
1120
- interface RenderSummaryArgs {
1121
- total: number;
1122
- passed: number;
1123
- failed: number;
1124
- skipped: number;
1125
- }
1126
- interface RenderSummaryDeps {
1127
- }
1128
-
1129
- /**
1130
- * Render meta info section (fn(args, deps)).
1131
- */
1132
- interface RenderMetaInfoArgs {
1133
- startedAtMs: number;
1134
- durationMs: number;
1135
- packageVersion?: string;
1136
- gitSha?: string;
1137
- ciName?: string;
1138
- ciBranch?: string;
1139
- ciUrl?: string;
1140
- ciCommitSha?: string;
1141
- ciBuildNumber?: string;
1142
- }
1143
- interface RenderMetaInfoDeps {
1144
- escapeHtml: (str: string) => string;
1145
- }
1146
-
1147
- /**
1148
- * Render tag filter bar (fn(args, deps)).
1149
- * Displays a collapsible tag bar with clickable tag pills for filtering scenarios,
1150
- * ARIA attributes for accessibility, and a results counter.
1151
- */
1152
- interface RenderTagBarArgs {
1153
- tags: string[];
1154
- totalScenarios: number;
1155
- }
1156
- interface RenderTagBarDeps {
1157
- escapeHtml: (str: string) => string;
1158
- }
1159
-
1160
- /**
1161
- * Render failure summary block with deep links to failed scenarios (fn(args, deps)).
1162
- */
1163
-
1164
- interface RenderFailureSummaryArgs {
1165
- failedCases: TestCaseResult[];
1166
- }
1167
- interface RenderFailureSummaryDeps {
1168
- escapeHtml: (str: string) => string;
1169
- }
1170
-
1171
- interface BuildBodyArgs {
1172
- run: TestRunResult;
1173
- metricsMap?: Map<string, TestMetrics>;
1174
- }
1175
- interface BuildBodyDeps {
1176
- renderMetaInfo: (args: RenderMetaInfoArgs, deps: RenderMetaInfoDeps) => string;
1177
- renderSummary: (args: RenderSummaryArgs, deps: RenderSummaryDeps) => string;
1178
- renderTagBar: (args: RenderTagBarArgs, deps: RenderTagBarDeps) => string;
1179
- renderFeature: (args: RenderFeatureArgs, deps: RenderFeatureDeps) => string;
1180
- renderFailureSummary: (args: RenderFailureSummaryArgs, deps: RenderFailureSummaryDeps) => string;
1181
- metaDeps: RenderMetaInfoDeps;
1182
- summaryDeps: RenderSummaryDeps;
1183
- tagBarDeps: RenderTagBarDeps;
1184
- featureDeps: RenderFeatureDeps;
1185
- failureSummaryDeps: RenderFailureSummaryDeps;
1186
- }
1187
-
1188
- /**
1189
- * HTML Report Template.
1190
- *
1191
- * Assembles the report document and inlines the browser-side interactivity
1192
- * scripts (defined in ./template-scripts) into a <script> tag.
1193
- */
1194
- /** Options for HTML template generation */
1195
- interface HtmlTemplateOptions {
1196
- includeSearch?: boolean;
1197
- includeDarkMode?: boolean;
1198
- syntaxHighlighting?: boolean;
1199
- mermaidEnabled?: boolean;
1200
- markdownEnabled?: boolean;
1201
- /** Additional inline JS injected after core JS (used by themes). */
1202
- additionalJs?: string;
1203
- /** Additional ESM import statements for CDN libraries (used by themes). */
1204
- additionalImports?: string[];
1205
- /** Pre-rendered TOC sidebar HTML. Placed as sibling of .container inside .report-layout. */
1206
- tocHtml?: string;
1207
- /** Pre-rendered theme picker HTML (select element). */
1208
- themePickerHtml?: string;
1209
- /** Additional theme CSS blocks to embed (for theme picker). */
1210
- additionalThemeCss?: Array<{
1211
- name: string;
1212
- label: string;
1213
- css: string;
1214
- }>;
1215
- /** Name of the currently active theme (for data-theme-name attribute). */
1216
- activeThemeName?: string;
1217
- }
1218
-
1219
- /**
1220
- * HTML theme type definitions.
1221
- */
1222
-
1223
- /** Built-in theme names */
1224
- type HtmlThemeName = "default" | "corporate" | "terminal" | "minimal" | "dashboard" | "playful";
1225
- /** A theme definition */
1226
- interface HtmlTheme {
1227
- /** Theme identifier */
1228
- name: string;
1229
- /** Display label */
1230
- label: string;
1231
- /** Full CSS string (replaces CSS_STYLES). Must define all custom properties for both light and dark modes. */
1232
- css: string;
1233
- /** Optional: override body rendering. Receives the same (args, deps) as buildBody. */
1234
- buildBody?: (args: BuildBodyArgs, deps: BuildBodyDeps) => string;
1235
- /** Optional: override the HTML template wrapper. */
1236
- generateTemplate?: (title: string, styles: string, body: string, options: HtmlTemplateOptions) => string;
1237
- /** Optional: additional inline JS injected after core JS. */
1238
- additionalJs?: string;
1239
- /** Optional: additional ESM import statements for CDN libraries. */
1240
- additionalImports?: string[];
1241
- }
1242
-
1243
- /**
1244
- * Theme registry — resolves theme names to theme objects.
1245
- */
1246
-
1247
- /** Resolve a theme by name or pass through a custom theme object. */
1248
- declare function resolveTheme(nameOrTheme: string | HtmlTheme): HtmlTheme;
1249
- /** List available built-in theme names. */
1250
- declare function getAvailableThemes(): string[];
1251
- /** Get all themes that only use CSS (no custom body/template overrides). */
1252
- declare function getCssOnlyThemes(): HtmlTheme[];
1253
-
1254
- /**
1255
- * Canonical executable-stories theme tokens (--es-*).
1256
- *
1257
- * Source of truth for the `--es-color-*`, `--es-space-*`, `--es-font-*`,
1258
- * `--es-size-*`, `--es-radius`, `--es-line`, and `--es-measure` CSS custom
1259
- * properties consumed by:
1260
- *
1261
- * - executable-stories-react (styles.css)
1262
- * - executable-stories-formatters HTML report (CSS_STYLES, via this module)
1263
- *
1264
- * Consumer-side overrides on `:root` or any ancestor of the report cascade
1265
- * through both: setting `--es-color-failed: red` on body re-colors failures
1266
- * in both the standalone HTML report and the React component.
1267
- *
1268
- * The HTML formatter's pre-existing tokens (--success, --error, etc.)
1269
- * remain in place for backward compatibility; the --es-* tokens are emitted
1270
- * alongside them as the public override surface.
1271
- */
1272
- declare const ES_THEME_TOKENS_CSS: string;
1273
- /**
1274
- * JS-level mirror of the token values (for cases where TypeScript code needs
1275
- * to read them — e.g., dynamic style injection or theme generators).
1276
- */
1277
- declare const ES_THEME_TOKEN_VALUES: {
1278
- readonly light: {
1279
- readonly "--es-color-bg": "#ffffff";
1280
- readonly "--es-color-fg": "#111827";
1281
- readonly "--es-color-muted": "#6b7280";
1282
- readonly "--es-color-border": "#e5e7eb";
1283
- readonly "--es-color-surface": "#f9fafb";
1284
- readonly "--es-color-link": "#2563eb";
1285
- readonly "--es-color-passed": "#16a34a";
1286
- readonly "--es-color-failed": "#dc2626";
1287
- readonly "--es-color-skipped": "#9ca3af";
1288
- readonly "--es-color-pending": "#d97706";
1289
- };
1290
- readonly dark: {
1291
- readonly "--es-color-bg": "#0b0f17";
1292
- readonly "--es-color-fg": "#e5e7eb";
1293
- readonly "--es-color-muted": "#9ca3af";
1294
- readonly "--es-color-border": "#1f2937";
1295
- readonly "--es-color-surface": "#111827";
1296
- readonly "--es-color-link": "#60a5fa";
1297
- readonly "--es-color-passed": "#4ade80";
1298
- readonly "--es-color-failed": "#f87171";
1299
- readonly "--es-color-skipped": "#6b7280";
1300
- readonly "--es-color-pending": "#fbbf24";
1301
- };
1302
- };
1303
-
1304
- /**
1305
- * Status mapping from raw framework statuses to canonical TestStatus.
1306
- */
1307
-
1308
- /**
1309
- * Convert a raw status to canonical TestStatus.
1310
- *
1311
- * @param raw - The raw status from a framework
1312
- * @returns The canonical TestStatus
1313
- */
1314
- declare function normalizeStatus(raw: RawStatus): TestStatus$1;
1315
-
1316
- /**
1317
- * ID generation and slug helpers for deterministic, Cucumber-compatible IDs.
1318
- */
1319
- /**
1320
- * Generate a deterministic test case ID from source file and scenario name.
1321
- *
1322
- * @param sourceFile - The source file path
1323
- * @param scenario - The scenario name
1324
- * @returns A 12-character hex ID
1325
- */
1326
- declare function generateTestCaseId(sourceFile: string, scenario: string): string;
1327
- /**
1328
- * Generate a deterministic run ID from timestamp and project root.
1329
- *
1330
- * @param startedAtMs - Run start timestamp
1331
- * @param projectRoot - Project root directory
1332
- * @returns A 16-character hex ID
1333
- */
1334
- declare function generateRunId(startedAtMs: number, projectRoot: string): string;
1335
- /**
1336
- * Slugify a string for Cucumber JSON IDs.
1337
- *
1338
- * Converts to lowercase, replaces path separators/spaces with hyphens,
1339
- * removes other special chars, and trims leading/trailing hyphens.
1340
- *
1341
- * @param text - The text to slugify
1342
- * @returns A URL-safe slug
1343
- */
1344
- declare function slugify(text: string): string;
1345
-
1346
- /**
1347
- * Step fallback rules for deriving step results from scenario status.
1348
- *
1349
- * When frameworks don't provide step-level results, we derive them
1350
- * from the overall scenario status using these rules.
1351
- */
1352
-
1353
- /**
1354
- * Derive step results from story steps and scenario status.
1355
- *
1356
- * Rules:
1357
- * - Passed: All steps are passed
1358
- * - Skipped/Pending: All steps are skipped/pending
1359
- * - Failed: Steps up to failure are passed, failing step is failed, rest are skipped
1360
- * (Heuristic: last step is the failure, or use error info if available)
1361
- *
1362
- * @param steps - Story steps with keywords and text
1363
- * @param scenarioStatus - Overall scenario status
1364
- * @param error - Optional error information to help identify failing step
1365
- * @returns Array of step results
1366
- */
1367
- declare function deriveStepResults(steps: StoryStep[], scenarioStatus: TestStatus$1, error?: {
1368
- message?: string;
1369
- stack?: string;
1370
- }): StepResult[];
1371
- /**
1372
- * Merge raw step events with derived step results.
1373
- *
1374
- * When we have partial step data from the framework, merge it with
1375
- * the derived results, preferring actual data over derived.
1376
- *
1377
- * @param derived - Derived step results from fallback rules
1378
- * @param events - Raw step events from framework (if any)
1379
- * @returns Merged step results
1380
- */
1381
- declare function mergeStepResults(derived: StepResult[], events?: Array<{
1382
- index?: number;
1383
- stepId?: string;
1384
- status?: string;
1385
- durationMs?: number;
1386
- errorMessage?: string;
1387
- }>): StepResult[];
1388
-
1389
- /**
1390
- * Attachment resolution: embed vs link decision.
1391
- *
1392
- * Attachments can either be embedded inline (base64) or linked to
1393
- * external files based on size thresholds.
1394
- */
1395
-
1396
- /** Options for attachment resolution */
1397
- interface AttachmentOptions {
1398
- /** Max bytes before attachment becomes external link. Default: 512KB */
1399
- maxEmbedBytes?: number;
1400
- /** Directory for external attachments */
1401
- externalDir?: string;
1402
- /** Project root for relative paths */
1403
- projectRoot?: string;
1404
- }
1405
- /**
1406
- * Resolve a raw attachment to a canonical attachment.
1407
- *
1408
- * Decision logic:
1409
- * 1. If body is already provided, use it (check size for encoding decision)
1410
- * 2. If path is provided, read file and decide embed vs link
1411
- * 3. For large files, return a URL reference instead of embedding
1412
- *
1413
- * @param raw - Raw attachment from framework
1414
- * @param options - Resolution options
1415
- * @returns Resolved canonical attachment
1416
- */
1417
- declare function resolveAttachment(raw: RawAttachment, options?: AttachmentOptions): Attachment;
1418
- /**
1419
- * Resolve multiple attachments.
1420
- *
1421
- * @param attachments - Raw attachments array
1422
- * @param options - Resolution options
1423
- * @returns Resolved canonical attachments
1424
- */
1425
- declare function resolveAttachments(attachments: RawAttachment[] | undefined, options?: AttachmentOptions): Attachment[];
1426
-
1427
- /**
1428
- * Anti-Corruption Layer (ACL) - Layer 2.
1429
- *
1430
- * Transforms permissive RawRun data from framework adapters into
1431
- * strict canonical TestRunResult for formatters.
1432
- */
1433
-
1434
- /**
1435
- * Canonicalize a raw run into a strict TestRunResult.
1436
- *
1437
- * This is the main entry point for the ACL. It:
1438
- * - Enforces required fields with defaults
1439
- * - Normalizes statuses to TestStatus enum
1440
- * - Applies step fallback rules
1441
- * - Resolves attachments (embed vs link)
1442
- * - Generates deterministic IDs
1443
- *
1444
- * @param raw - Raw run data from a framework adapter
1445
- * @param options - Canonicalization options
1446
- * @returns Strict canonical TestRunResult
1447
- */
1448
- declare function canonicalizeRun(raw: RawRun, options?: CanonicalizeOptions): TestRunResult;
1449
-
1450
- /**
1451
- * Validation helpers for canonical TestRunResult.
1452
- *
1453
- * Used in tests to verify ACL output meets all invariants.
1454
- */
1455
-
1456
- /** Validation result */
1457
- interface ValidationResult {
1458
- /** Whether the run is valid */
1459
- valid: boolean;
1460
- /** List of validation errors */
1461
- errors: string[];
1462
- }
1463
- /**
1464
- * Validate a canonical TestRunResult.
1465
- *
1466
- * Checks:
1467
- * - All required fields are present
1468
- * - stepResults length matches story.steps length
1469
- * - stepResults indexes are valid and unique
1470
- * - Durations are non-negative
1471
- * - Timestamps are valid
1472
- *
1473
- * @param run - The TestRunResult to validate
1474
- * @returns Validation result with errors if any
1475
- */
1476
- declare function validateCanonicalRun(run: TestRunResult): ValidationResult;
1477
- /**
1478
- * Assert that a run is valid, throwing if not.
1479
- *
1480
- * Useful in tests.
1481
- *
1482
- * @param run - The TestRunResult to validate
1483
- * @throws Error if validation fails
1484
- */
1485
- declare function assertValidRun(run: TestRunResult): void;
1486
-
1487
780
  /**
1488
781
  * Cucumber JSON Formatter - Layer 3.
1489
782
  *
@@ -1603,7 +896,7 @@ interface ScenarioIndex {
1603
896
  interface ScenarioIndexItem {
1604
897
  id: string;
1605
898
  title: string;
1606
- status: TestStatus;
899
+ status: TestStatus$1;
1607
900
  feature: string;
1608
901
  sourceFile: string;
1609
902
  sourceLine?: number;
@@ -1626,13 +919,13 @@ interface ScenarioIndexStep {
1626
919
  index: number;
1627
920
  keyword: ReportStep["keyword"];
1628
921
  text: string;
1629
- status: TestStatus;
922
+ status: TestStatus$1;
1630
923
  durationMs: number;
1631
924
  errorMessage?: string;
1632
925
  docKinds: string[];
1633
926
  }
1634
927
  interface ScenarioIndexFilters {
1635
- statuses?: TestStatus[];
928
+ statuses?: TestStatus$1[];
1636
929
  tags?: string[];
1637
930
  sourceFiles?: string[];
1638
931
  }
@@ -1746,101 +1039,13 @@ interface WatchHandle {
1746
1039
  */
1747
1040
  declare function startWatch(options: WatchOptions, deps?: WatchDeps): WatchHandle;
1748
1041
 
1749
- interface ServeOptions {
1750
- /** Path to the raw-run (or canonical) JSON the framework adapter writes. */
1751
- input: string;
1752
- outputDir: string;
1753
- outputName: string;
1754
- formats: OutputFormat[];
1755
- /** Input is "raw" (default) or already-canonical "canonical". */
1756
- inputType?: "raw" | "canonical";
1757
- /** Synthesize story metadata for plain tests (raw input only). Default true. */
1758
- synthesize?: boolean;
1759
- /** Port for the live server. Default 4321. */
1760
- port?: number;
1761
- /** Host to bind. Default "127.0.0.1". */
1762
- host?: string;
1763
- /** Coalesce rapid change events. Default 150ms. */
1764
- debounceMs?: number;
1765
- }
1766
- /**
1767
- * The realtime state the server renders. The session baseline is pinned to the
1768
- * first run we observe after boot, so the headline tracks the whole loop's
1769
- * trajectory rather than the noise between any two adjacent iterations.
1770
- */
1771
- interface RunState {
1772
- /** First run observed this session — the trajectory anchor. */
1773
- sessionBaseline: TestRunResult | null;
1774
- /** The run immediately before {@link current} — the per-iteration anchor. */
1775
- previous: TestRunResult | null;
1776
- /** Latest run. */
1777
- current: TestRunResult | null;
1778
- /** How many runs we have observed since boot. */
1779
- runCount: number;
1780
- }
1781
- /**
1782
- * Fold a freshly-read run into the prior state. Pure so the trajectory logic is
1783
- * testable without a server or filesystem: the first run pins the session
1784
- * baseline; later runs shift `previous`/`current` forward.
1785
- */
1786
- declare function advanceState(prev: RunState, run: TestRunResult): RunState;
1787
- /** The two diffs the live view — and a portal payload — care about. */
1788
- interface RunDeltas {
1789
- /** Versus the first run of the session: the loop's trajectory. */
1790
- session: RunDiffResult | null;
1791
- /** Versus the immediately-previous run: what the last iteration did. */
1792
- iteration: RunDiffResult | null;
1793
- }
1794
- /**
1795
- * Derive the session and per-iteration diffs from the run history. Both are null
1796
- * until there are two runs to compare. Pure, computed once per run — this is the
1797
- * single source the strip renders from and the same payload a portal sink would
1798
- * push, so neither re-runs the compare engine.
1799
- */
1800
- declare function computeDeltas(state: RunState): RunDeltas;
1801
- /**
1802
- * Render the delta strip that sits above the report. This is the one thing a
1803
- * dumb static server cannot do — it needs the prior runs and the compare
1804
- * engine. Pure, so the copy is unit-testable.
1805
- */
1806
- declare function renderDeltaStrip(state: RunState): string;
1807
- /**
1808
- * Inject the live bits into a generated (static) report without touching the
1809
- * file on disk: the strip after <body>, the style + reload client before
1810
- * </body>. The artifact stays a clean static file for the CI/Action path.
1811
- */
1812
- declare function injectLiveBits(html: string, stripHtml: string): string;
1813
- interface ServeDeps {
1814
- readFile?: (filePath: string) => string;
1815
- watch?: (filePath: string, listener: () => void) => {
1816
- close: () => void;
1817
- };
1818
- log?: (message: string) => void;
1819
- /** Inject a server factory for tests. */
1820
- createServer?: (handler: http.RequestListener) => http.Server;
1821
- }
1822
- interface ServeHandle {
1823
- /** Resolved listening port (useful when port 0 picks a free one). */
1824
- port: number;
1825
- close: () => void;
1826
- }
1827
- /**
1828
- * Serve the living docs at a URL and push a reload whenever the framework
1829
- * rewrites its raw-run. The watch loop (debounce, coalesce, initial build) is
1830
- * delegated to {@link startWatch}; `serve` only adds the HTTP surface and, on
1831
- * each run, the delta strip — "what changed since you started this loop" —
1832
- * rendered from the in-memory run history. That strip is the one thing a static
1833
- * file server cannot give you.
1834
- */
1835
- declare function startServe(options: ServeOptions, deps?: ServeDeps): ServeHandle;
1836
-
1837
1042
  interface BehaviorDiffEntry {
1838
1043
  id: string;
1839
1044
  title: string;
1840
1045
  sourceFile: string;
1841
1046
  kind: ScenarioChangeKind;
1842
- baselineStatus?: TestStatus;
1843
- currentStatus?: TestStatus;
1047
+ baselineStatus?: TestStatus$1;
1048
+ currentStatus?: TestStatus$1;
1844
1049
  }
1845
1050
  interface BehaviorDiff {
1846
1051
  schemaVersion: "1.0";
@@ -1858,7 +1063,7 @@ interface BehaviorDiff {
1858
1063
  * Classify a single scenario's status transition between two runs.
1859
1064
  * Shares the `ScenarioChangeKind` vocabulary with the full compare engine.
1860
1065
  */
1861
- declare function classifyStatusChange(baseline: TestStatus | undefined, current: TestStatus | undefined): ScenarioChangeKind;
1066
+ declare function classifyStatusChange(baseline: TestStatus$1 | undefined, current: TestStatus$1 | undefined): ScenarioChangeKind;
1862
1067
  /**
1863
1068
  * Scenario-level diff of two StoryReports, keyed by scenario id. Reports status
1864
1069
  * transitions (the agent triage signal), not the full field-by-field diff that
@@ -1866,83 +1071,6 @@ declare function classifyStatusChange(baseline: TestStatus | undefined, current:
1866
1071
  */
1867
1072
  declare function diffStoryReports(baseline: StoryReport, current: StoryReport): BehaviorDiff;
1868
1073
 
1869
- /**
1870
- * toStoryReport — convert a canonical TestRunResult into the public
1871
- * StoryReport shape consumed by UI renderers.
1872
- *
1873
- * - Groups by sourceFile (relative to projectRoot when possible).
1874
- * - Derives feature title from titlePath[0] when available, otherwise file basename.
1875
- * - Strips adapter-only fields (rawStatus, projectName, raw titlePath).
1876
- * - Pre-computes summary counts at every level.
1877
- * - Generates stable IDs suitable for deep linking.
1878
- */
1879
-
1880
- /**
1881
- * Convert a canonical TestRunResult into a frozen-shape StoryReport for UI renderers.
1882
- */
1883
- declare function toStoryReport(run: TestRunResult): StoryReport;
1884
-
1885
- /**
1886
- * HTML Formatter - Layer 3.
1887
- *
1888
- * Transforms canonical TestRunResult into a standalone HTML report.
1889
- * Implemented via createHtmlFormatter (fn(args, deps) pattern).
1890
- */
1891
-
1892
- /** Options for HTML formatting */
1893
- interface HtmlOptions {
1894
- /** Report title. Default: "Test Results" */
1895
- title?: string;
1896
- /** Include dark mode toggle. Default: true */
1897
- darkMode?: boolean;
1898
- /** Include search/filter functionality. Default: true */
1899
- searchable?: boolean;
1900
- /** Start scenarios collapsed. Default: false */
1901
- startCollapsed?: boolean;
1902
- /** Embed screenshots inline (base64). Default: true */
1903
- embedScreenshots?: boolean;
1904
- /** Inline local html doc files as iframe srcdoc (self-contained report). Default: true */
1905
- embedHtmlFiles?: boolean;
1906
- /** Enable syntax highlighting for code blocks (via highlight.js CDN). Default: true */
1907
- syntaxHighlighting?: boolean;
1908
- /** Enable live Mermaid diagram rendering (via Mermaid.js CDN). Default: true */
1909
- mermaidEnabled?: boolean;
1910
- /** Enable Markdown parsing for section doc entries (via marked.js CDN). Default: true */
1911
- markdownEnabled?: boolean;
1912
- /** Base URL for source permalinks. E.g., "https://github.com/user/repo/blob/main" */
1913
- permalinkBaseUrl?: string;
1914
- /** URL template for ticket links. Use {ticket} as placeholder. E.g., "https://jira.example.com/browse/{ticket}" */
1915
- ticketUrlTemplate?: string;
1916
- /** Show table of contents sidebar. Default: true */
1917
- tocEnabled?: boolean;
1918
- /** Theme name or custom theme object. Default: "default" */
1919
- theme?: string | HtmlTheme;
1920
- /** Include theme picker with all CSS-only themes embedded. Default: false */
1921
- themePickerEnabled?: boolean;
1922
- }
1923
- /**
1924
- * HTML Formatter.
1925
- *
1926
- * Transforms TestRunResult into a standalone HTML report with:
1927
- * - Dark/light mode toggle
1928
- * - Search/filter functionality
1929
- * - Collapsible features and scenarios
1930
- * - Modern, accessible design
1931
- *
1932
- * Thin wrapper around createHtmlFormatter for backward compatibility.
1933
- */
1934
- declare class HtmlFormatter {
1935
- private formatFn;
1936
- constructor(options?: HtmlOptions);
1937
- /**
1938
- * Format a test run into standalone HTML.
1939
- *
1940
- * @param run - Canonical test run result
1941
- * @returns HTML string
1942
- */
1943
- format(run: TestRunResult): string;
1944
- }
1945
-
1946
1074
  /**
1947
1075
  * JUnit XML Formatter - Layer 3.
1948
1076
  *
@@ -2312,243 +1440,6 @@ declare function rewriteAssetPaths(markdown: string, assetsBaseUrl: string, path
2312
1440
  */
2313
1441
  declare function copyMarkdownAssets(options: CopyMarkdownAssetsOptions): AstroAssetResult;
2314
1442
 
2315
- /**
2316
- * Cucumber Messages types for NDJSON output.
2317
- *
2318
- * Minimal own types (no @cucumber/messages dependency) — consistent with
2319
- * the project's zero-external-deps-at-runtime approach.
2320
- *
2321
- * Based on the Cucumber Messages protocol:
2322
- * https://github.com/cucumber/messages
2323
- */
2324
- /** Protobuf-style timestamp { seconds, nanos } */
2325
- interface Timestamp {
2326
- seconds: number;
2327
- nanos: number;
2328
- }
2329
- /** Protobuf-style duration { seconds, nanos } */
2330
- interface Duration {
2331
- seconds: number;
2332
- nanos: number;
2333
- }
2334
- /** Location in a source file */
2335
- interface Location {
2336
- line: number;
2337
- column?: number;
2338
- }
2339
- interface Meta {
2340
- protocolVersion: string;
2341
- implementation: {
2342
- name: string;
2343
- version: string;
2344
- };
2345
- runtime: {
2346
- name: string;
2347
- version: string;
2348
- };
2349
- os: {
2350
- name: string;
2351
- };
2352
- cpu: {
2353
- name: string;
2354
- };
2355
- }
2356
- interface Source {
2357
- uri: string;
2358
- data: string;
2359
- mediaType: "text/x.cucumber.gherkin+plain";
2360
- }
2361
- interface Tag {
2362
- location: Location;
2363
- name: string;
2364
- id: string;
2365
- }
2366
- type KeywordType = "Unknown" | "Context" | "Action" | "Outcome" | "Conjunction";
2367
- interface DocString {
2368
- location: Location;
2369
- mediaType?: string;
2370
- content: string;
2371
- delimiter: string;
2372
- }
2373
- interface TableCell {
2374
- location: Location;
2375
- value: string;
2376
- }
2377
- interface TableRow {
2378
- location: Location;
2379
- cells: TableCell[];
2380
- id: string;
2381
- }
2382
- interface DataTable {
2383
- location: Location;
2384
- rows: TableRow[];
2385
- }
2386
- interface Step {
2387
- location: Location;
2388
- keyword: string;
2389
- keywordType: KeywordType;
2390
- text: string;
2391
- id: string;
2392
- docString?: DocString;
2393
- dataTable?: DataTable;
2394
- }
2395
- interface Scenario {
2396
- location: Location;
2397
- tags: Tag[];
2398
- keyword: string;
2399
- name: string;
2400
- description: string;
2401
- steps: Step[];
2402
- id: string;
2403
- }
2404
- interface Background {
2405
- location: Location;
2406
- keyword: string;
2407
- name: string;
2408
- description: string;
2409
- steps: Step[];
2410
- id: string;
2411
- }
2412
- type FeatureChild = {
2413
- background: Background;
2414
- scenario?: undefined;
2415
- } | {
2416
- scenario: Scenario;
2417
- background?: undefined;
2418
- };
2419
- interface Feature {
2420
- location: Location;
2421
- tags: Tag[];
2422
- language: string;
2423
- keyword: string;
2424
- name: string;
2425
- description: string;
2426
- children: FeatureChild[];
2427
- }
2428
- interface GherkinDocument {
2429
- uri: string;
2430
- feature: Feature;
2431
- }
2432
- type PickleStepType = "Unknown" | "Context" | "Action" | "Outcome";
2433
- interface PickleDocString {
2434
- mediaType?: string;
2435
- content: string;
2436
- }
2437
- interface PickleTableCell {
2438
- value: string;
2439
- }
2440
- interface PickleTableRow {
2441
- cells: PickleTableCell[];
2442
- }
2443
- interface PickleTable {
2444
- rows: PickleTableRow[];
2445
- }
2446
- interface PickleStepArgument {
2447
- docString?: PickleDocString;
2448
- dataTable?: PickleTable;
2449
- }
2450
- interface PickleStep {
2451
- astNodeIds: string[];
2452
- id: string;
2453
- type: PickleStepType;
2454
- text: string;
2455
- argument?: PickleStepArgument;
2456
- }
2457
- interface PickleTag {
2458
- name: string;
2459
- astNodeId: string;
2460
- }
2461
- interface Pickle {
2462
- id: string;
2463
- uri: string;
2464
- name: string;
2465
- language: string;
2466
- steps: PickleStep[];
2467
- tags: PickleTag[];
2468
- astNodeIds: string[];
2469
- }
2470
- type TestStepResultStatus = "UNKNOWN" | "PASSED" | "SKIPPED" | "PENDING" | "UNDEFINED" | "AMBIGUOUS" | "FAILED";
2471
- interface TestStepResult {
2472
- duration: Duration;
2473
- status: TestStepResultStatus;
2474
- message?: string;
2475
- }
2476
- interface TestStep {
2477
- id: string;
2478
- pickleStepId?: string;
2479
- stepDefinitionIds?: string[];
2480
- }
2481
- interface TestCase {
2482
- id: string;
2483
- pickleId: string;
2484
- testSteps: TestStep[];
2485
- }
2486
- interface TestRunStarted {
2487
- timestamp: Timestamp;
2488
- }
2489
- interface TestCaseStarted {
2490
- id: string;
2491
- testCaseId: string;
2492
- timestamp: Timestamp;
2493
- attempt: number;
2494
- }
2495
- interface TestStepStarted {
2496
- testCaseStartedId: string;
2497
- testStepId: string;
2498
- timestamp: Timestamp;
2499
- }
2500
- interface TestStepFinished {
2501
- testCaseStartedId: string;
2502
- testStepId: string;
2503
- testStepResult: TestStepResult;
2504
- timestamp: Timestamp;
2505
- }
2506
- interface TestCaseFinished {
2507
- testCaseStartedId: string;
2508
- timestamp: Timestamp;
2509
- willBeRetried: boolean;
2510
- }
2511
- interface TestRunFinished {
2512
- timestamp: Timestamp;
2513
- success: boolean;
2514
- }
2515
- type AttachmentContentEncoding = "IDENTITY" | "BASE64";
2516
- interface CucumberAttachment {
2517
- testCaseStartedId: string;
2518
- testStepId?: string;
2519
- body: string;
2520
- mediaType: string;
2521
- contentEncoding: AttachmentContentEncoding;
2522
- }
2523
- /**
2524
- * Each NDJSON line is one Envelope with exactly one field set.
2525
- */
2526
- type Envelope = {
2527
- meta: Meta;
2528
- } | {
2529
- source: Source;
2530
- } | {
2531
- gherkinDocument: GherkinDocument;
2532
- } | {
2533
- pickle: Pickle;
2534
- } | {
2535
- testRunStarted: TestRunStarted;
2536
- } | {
2537
- testCase: TestCase;
2538
- } | {
2539
- testCaseStarted: TestCaseStarted;
2540
- } | {
2541
- testStepStarted: TestStepStarted;
2542
- } | {
2543
- testStepFinished: TestStepFinished;
2544
- } | {
2545
- testCaseFinished: TestCaseFinished;
2546
- } | {
2547
- testRunFinished: TestRunFinished;
2548
- } | {
2549
- attachment: CucumberAttachment;
2550
- };
2551
-
2552
1443
  /**
2553
1444
  * CucumberMessagesFormatter — produces NDJSON compatible with @cucumber/html-formatter.
2554
1445
  *
@@ -2619,14 +1510,11 @@ declare class CucumberHtmlFormatter {
2619
1510
 
2620
1511
  interface RunDiffHtmlOptions {
2621
1512
  title?: string;
2622
- /** Theme name or custom theme object. Default: "default" */
2623
- theme?: string | HtmlTheme;
2624
1513
  /** Enable dark mode toggle. Default: true */
2625
1514
  darkMode?: boolean;
2626
1515
  }
2627
1516
  declare class RunDiffHtmlFormatter {
2628
1517
  private title;
2629
- private theme;
2630
1518
  private darkMode;
2631
1519
  constructor(options?: RunDiffHtmlOptions);
2632
1520
  format(diff: RunDiffResult): string;
@@ -2641,32 +1529,6 @@ declare class RunDiffMarkdownFormatter {
2641
1529
  format(diff: RunDiffResult): string;
2642
1530
  }
2643
1531
 
2644
- /**
2645
- * NDJSON-to-TestRunResult parser.
2646
- *
2647
- * Parses Cucumber Messages NDJSON (one JSON envelope per line) back into
2648
- * a TestRunResult suitable for rendering by HtmlFormatter or other formatters.
2649
- *
2650
- * This is the NDJSON compat path: it produces a minimal but sufficient
2651
- * TestRunResult. Fields not present in the NDJSON stream are given
2652
- * sensible defaults.
2653
- */
2654
-
2655
- /**
2656
- * Parse an NDJSON string into a TestRunResult.
2657
- *
2658
- * @param ndjson - NDJSON string (one JSON envelope per line)
2659
- * @returns TestRunResult reconstructed from the envelopes
2660
- */
2661
- declare function parseNdjson(ndjson: string): TestRunResult;
2662
- /**
2663
- * Parse an array of Envelope objects into a TestRunResult.
2664
- *
2665
- * @param envelopes - Array of Cucumber Messages envelopes
2666
- * @returns TestRunResult reconstructed from the envelopes
2667
- */
2668
- declare function parseEnvelopes(envelopes: Envelope[]): TestRunResult;
2669
-
2670
1532
  /**
2671
1533
  * Git information utilities.
2672
1534
  *
@@ -2696,33 +1558,6 @@ declare function findGitDir(start: string): string | undefined;
2696
1558
  */
2697
1559
  declare function readBranchName(cwd?: string): string | undefined;
2698
1560
 
2699
- /**
2700
- * Duration formatting utilities.
2701
- */
2702
- /**
2703
- * Format milliseconds as human-readable duration.
2704
- *
2705
- * @param ms - Duration in milliseconds
2706
- * @returns Formatted string (e.g., "123 ms", "1.5 s", "2m 30s")
2707
- */
2708
- declare function formatDuration(ms: number): string;
2709
- /**
2710
- * Convert milliseconds to nanoseconds.
2711
- *
2712
- * Used for Cucumber JSON format which expects nanoseconds.
2713
- *
2714
- * @param ms - Duration in milliseconds
2715
- * @returns Duration in nanoseconds
2716
- */
2717
- declare function msToNanoseconds(ms: number): number;
2718
- /**
2719
- * Convert nanoseconds to milliseconds.
2720
- *
2721
- * @param ns - Duration in nanoseconds
2722
- * @returns Duration in milliseconds
2723
- */
2724
- declare function nanosecondsToMs(ns: number): number;
2725
-
2726
1561
  /**
2727
1562
  * Metadata utilities for reading package information.
2728
1563
  */
@@ -2786,31 +1621,6 @@ declare function tryGetActiveOtelContext(): OtelTraceContext | undefined;
2786
1621
  */
2787
1622
  declare function resolveTraceUrl(template: string | undefined, traceId: string): string | undefined;
2788
1623
 
2789
- /**
2790
- * Canonical builders for doc entries whose construction carries a rule worth
2791
- * keeping in one place. Adapters import these instead of re-implementing the
2792
- * logic (the `html` exactly-one-of-source rule was previously copied verbatim
2793
- * across the Vitest, Jest, Cypress, and Playwright adapters).
2794
- */
2795
-
2796
- /** Source/presentation options for an `html` doc entry. */
2797
- interface HtmlDocOptions {
2798
- /** Local HTML file path (inlined into the report by default). */
2799
- path?: string;
2800
- /** Remote URL rendered via iframe src. */
2801
- url?: string;
2802
- /** Inline HTML content rendered via iframe srcdoc. */
2803
- content?: string;
2804
- title?: string;
2805
- /** Iframe height: number → px, string passed through (e.g. '60vh'). Default 400px. */
2806
- height?: number | string;
2807
- }
2808
- /**
2809
- * Build an `html` DocEntry, enforcing that exactly one of path/url/content is
2810
- * set. Throws otherwise — this is the single source of that rule.
2811
- */
2812
- declare function buildHtmlDocEntry(options: HtmlDocOptions): DocEntry;
2813
-
2814
1624
  /**
2815
1625
  * Notification orchestrator.
2816
1626
  *
@@ -2989,6 +1799,51 @@ declare function signBody(args: {
2989
1799
  /** Strip ANSI escape sequences. Regex: \x1B\[[0-?]*[ -/]*[@-~] */
2990
1800
  declare function stripAnsi(text: string): string;
2991
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
+
2992
1847
  /**
2993
1848
  * History store: load, save, update (fn(args, deps) pattern).
2994
1849
  */
@@ -3088,6 +1943,8 @@ declare function hasSufficientHistory(entries: unknown[], min: number): boolean;
3088
1943
  interface ListScenariosArgs {
3089
1944
  testCases: TestCaseResult[];
3090
1945
  format: "text" | "json" | "csv" | "markdown-table";
1946
+ /** Emit compact (single-line) JSON for agent consumption. Only affects "json". Default false. */
1947
+ minify?: boolean;
3091
1948
  }
3092
1949
  type ListScenariosDeps = Record<string, never>;
3093
1950
  declare function listScenarios(args: ListScenariosArgs, _deps: ListScenariosDeps): string;
@@ -3109,13 +1966,13 @@ declare function listScenarios(args: ListScenariosArgs, _deps: ListScenariosDeps
3109
1966
  interface CheckArgs {
3110
1967
  testCases: TestCaseResult[];
3111
1968
  /** Baseline scenario statuses keyed by scenario id, for regressed/fixed deltas. */
3112
- baseline?: Map<string, TestStatus$1>;
1969
+ baseline?: Map<string, TestStatus>;
3113
1970
  format: "text" | "json";
3114
1971
  }
3115
1972
  type CheckDeps = Record<string, never>;
3116
1973
  /** A single rendered step inside a failing scenario. */
3117
1974
  interface CheckStep {
3118
- keyword: StepKeyword$1;
1975
+ keyword: StepKeyword;
3119
1976
  text: string;
3120
1977
  /** True when this step is the one that failed. */
3121
1978
  failed: boolean;
@@ -3233,7 +2090,7 @@ interface TriageItem {
3233
2090
  rank: number;
3234
2091
  id: string;
3235
2092
  scenario: string;
3236
- status: TestStatus$1;
2093
+ status: TestStatus;
3237
2094
  /** `sourceFile:sourceLine` */
3238
2095
  location: string;
3239
2096
  /** Product-code paths to fix. Empty when the scenario declared no `covers`. */
@@ -3255,7 +2112,7 @@ interface TriageReport {
3255
2112
  interface TriageArgs {
3256
2113
  testCases: TestCaseResult[];
3257
2114
  /** Baseline statuses by scenario id, to flag regressions and rank them first. */
3258
- baseline?: Map<string, TestStatus$1>;
2115
+ baseline?: Map<string, TestStatus>;
3259
2116
  format: "text" | "json";
3260
2117
  }
3261
2118
  type TriageDeps = Record<string, never>;
@@ -3351,14 +2208,11 @@ declare class ReviewMarkdownFormatter {
3351
2208
 
3352
2209
  interface ReviewHtmlOptions {
3353
2210
  title?: string;
3354
- /** Theme name or custom theme object. Default: "default" */
3355
- theme?: string | HtmlTheme;
3356
2211
  /** Enable dark mode toggle. Default: true */
3357
2212
  darkMode?: boolean;
3358
2213
  }
3359
2214
  declare class ReviewHtmlFormatter {
3360
2215
  private title;
3361
- private theme;
3362
2216
  private darkMode;
3363
2217
  constructor(options?: ReviewHtmlOptions);
3364
2218
  format(review: ReviewResult): string;
@@ -3488,7 +2342,7 @@ interface TraceabilityRequirement {
3488
2342
  scenarios: Array<{
3489
2343
  id: string;
3490
2344
  title: string;
3491
- status: TestStatus$1;
2345
+ status: TestStatus;
3492
2346
  sourceFile: string;
3493
2347
  sourceLine: number;
3494
2348
  covers: string[];
@@ -3517,7 +2371,7 @@ interface TraceabilityMatrix {
3517
2371
  untraced: Array<{
3518
2372
  id: string;
3519
2373
  title: string;
3520
- status: TestStatus$1;
2374
+ status: TestStatus;
3521
2375
  sourceFile: string;
3522
2376
  sourceLine: number;
3523
2377
  }>;
@@ -3536,7 +2390,8 @@ declare function toTraceabilityMatrix(run: TestRunResult): TraceabilityMatrix;
3536
2390
  * Architecture:
3537
2391
  * - Layer 1: Framework Adapters (adaptJestRun, adaptVitestRun, adaptPlaywrightRun)
3538
2392
  * - Layer 2: Anti-Corruption Layer (canonicalizeRun)
3539
- * - 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)
3540
2395
  */
3541
2396
 
3542
2397
  /** Arguments for generate function */
@@ -3568,16 +2423,12 @@ interface GenerateCompareResult {
3568
2423
  */
3569
2424
  declare function joinNameAndExt(name: string, ext: string): string;
3570
2425
  /**
3571
- * High-level report generator that combines multiple formatters.
3572
- *
3573
- * Accepts ONLY canonical TestRunResult - use adapters + canonicalizeRun first.
3574
- *
3575
- * Supports output routing:
3576
- * - Aggregated: All test cases in a single file
3577
- * - Colocated mirrored: Files mirrored under outputDir preserving directory structure
3578
- * - Colocated adjacent: Files written next to source files
3579
- * - 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.
3580
2430
  */
2431
+ declare function normalizeFormats(formats: ReadonlyArray<FormatInput>): OutputFormat[];
3581
2432
  declare class ReportGenerator {
3582
2433
  private options;
3583
2434
  private deps;
@@ -3601,6 +2452,13 @@ declare class ReportGenerator {
3601
2452
  * Format content for a specific format.
3602
2453
  */
3603
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;
3604
2462
  }
3605
2463
  /**
3606
2464
  * Factory function to create a ReportGenerator with dependency injection.
@@ -3636,4 +2494,4 @@ declare function normalizeVitestResults(testModules: Parameters<typeof adaptVite
3636
2494
  */
3637
2495
  declare function normalizePlaywrightResults(testResults: Parameters<typeof adaptPlaywrightRun>[0], adapterOptions?: Parameters<typeof adaptPlaywrightRun>[1], canonicalizeOptions?: CanonicalizeOptions): TestRunResult;
3638
2496
 
3639
- 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, type RunDeltas, 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 ServeDeps, type ServeHandle, type ServeOptions, 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, advanceState, assertValidRun, buildCheck, buildGoal, buildHtmlDocEntry, buildReview, buildTriage, bundleAssets, calculateFlakiness, calculateStability, canonicalizeRun, classifyStatusChange, clearVersionCache, computeDeltas, computeTestMetrics, copyMarkdownAssets, createPrCommentSummary, createReportGenerator, deriveAudience, deriveChangeType, deriveStepResults, detectCI, detectPerformanceTrend, diffRuns, diffStoryReports, findGitDir, formatDuration, generateRunComparison, generateRunId, generateTestCaseId, getAvailableThemes, getCssOnlyThemes, getDeploymentStatus, getEnvironmentDrift, gradeEvidence, hasSufficientHistory, injectLiveBits, isReviewableSource, isTestFile, joinNameAndExt, listScenarios, loadHistory, mergeStepResults, msToNanoseconds, nanosecondsToMs, normalizeJestResults, normalizePlaywrightResults, normalizeStatus, normalizeVitestResults, parseEnvelopes, parseNdjson, publishConfluencePage, publishJiraIssue, readBranchName, readGitSha, readPackageVersion, recordDeployment, regenerateArtifacts, regenerateRun, renderCheck, renderDeltaStrip, renderGoal, renderTriage, resolveAttachment, resolveAttachments, resolveTheme, resolveTraceUrl, rewriteAssetPaths, saveHistory, scenariosCoveringPaths, sendNotifications, sendSlackNotification, sendTeamsNotification, sendWebhookNotification, signBody, slugify, startServe, 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 };