executable-stories-formatters 0.4.0 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { S as StoryMeta, a as StoryStep, D as DocEntry, R as RawStatus, b as RawAttachment, c as RawRun, d as RawCIInfo, e as adaptJestRun, f as adaptPlaywrightRun, g as adaptVitestRun } from './index-DyeUWfYK.js';
2
- export { h as DocPhase, J as JestAdapterOptions, i as JestAggregatedResult, j as JestFileResult, k as JestTestResult, O as OtelAttributeValue, l as OtelSpan, P as PlaywrightAdapterOptions, m as PlaywrightAnnotation, n as PlaywrightAttachment, o as PlaywrightError, p as PlaywrightLocation, q as PlaywrightStatus, r as PlaywrightTestCase, s as PlaywrightTestResult, t as RawStepEvent, u as RawTestCase, v as STORY_META_KEY, w as StepKeyword, x as StepMode, y as StoryFileReport, V as VitestAdapterOptions, z as VitestSerializedError, A as VitestState, B as VitestTestCase, C as VitestTestModule, E as VitestTestResult } from './index-DyeUWfYK.js';
1
+ import { S as StoryMeta, C as CIInfo$1, a as StoryStep, D as DocEntry, R as RawStatus, b as RawAttachment, c as RawRun, d as CIProvider, e as RawCIInfo, f as adaptJestRun, g as adaptPlaywrightRun, h as adaptVitestRun } from './index-C4QO-SVT.js';
2
+ export { i as DocPhase, J as JestAdapterOptions, j as JestAggregatedResult, k as JestFileResult, l as JestTestResult, O as OtelAttributeValue, m as OtelSpan, P as PlaywrightAdapterOptions, n as PlaywrightAnnotation, o as PlaywrightAttachment, p as PlaywrightError, q as PlaywrightLocation, r as PlaywrightStatus, s as PlaywrightTestCase, t as PlaywrightTestResult, u as RawStepEvent, v as RawTestCase, w as STORY_META_KEY, x as StepKeyword, y as StepMode, z as StoryFileReport, V as VitestAdapterOptions, A as VitestSerializedError, B as VitestState, E as VitestTestCase, F as VitestTestModule, G as VitestTestResult, H as toCIInfo, I as toRawCIInfo } from './index-C4QO-SVT.js';
3
3
 
4
4
  /**
5
5
  * Canonical types for Layer 2: Anti-Corruption Layer output.
@@ -85,6 +85,9 @@ interface CIInfo {
85
85
  name: string;
86
86
  url?: string;
87
87
  buildNumber?: string;
88
+ branch?: string;
89
+ commitSha?: string;
90
+ prNumber?: string;
88
91
  }
89
92
  /** Coverage summary for the test run */
90
93
  interface CoverageSummary {
@@ -121,6 +124,54 @@ interface TestRunResult {
121
124
  coverage?: CoverageSummary;
122
125
  }
123
126
 
127
+ /**
128
+ * Notification types for webhook integrations (Slack, Teams).
129
+ */
130
+
131
+ /** Summary of a test run for notification payloads. */
132
+ interface NotificationSummary {
133
+ total: number;
134
+ passed: number;
135
+ failed: number;
136
+ skipped: number;
137
+ durationMs: number;
138
+ failedTests: Array<{
139
+ testId?: string;
140
+ name: string;
141
+ error?: string;
142
+ }>;
143
+ ci?: CIInfo$1;
144
+ reportUrl?: string;
145
+ }
146
+ /** When to send notifications. */
147
+ type NotifyCondition = "always" | "on-failure" | "never";
148
+ /** HMAC-SHA256 signing configuration for generic webhooks. */
149
+ interface WebhookSignerHmac {
150
+ type: "hmac-sha256";
151
+ /** Secret key for HMAC computation */
152
+ secret: string;
153
+ /** Request header name for signature, e.g. "X-Signature" */
154
+ header: string;
155
+ /** Include timestamp in signed payload and emit timestamp header? */
156
+ includeTimestamp?: boolean;
157
+ /** Request header name for timestamp (default: "X-Timestamp"). Only emitted when includeTimestamp is true. */
158
+ timestampHeader?: string;
159
+ }
160
+ /** Configuration for a generic webhook endpoint. */
161
+ interface GenericWebhookNotifierOptions {
162
+ url: string;
163
+ condition?: NotifyCondition;
164
+ method?: "POST" | "PUT";
165
+ headers?: Record<string, string>;
166
+ signer?: WebhookSignerHmac;
167
+ }
168
+ /** Versioned envelope sent to generic webhooks. */
169
+ interface WebhookPayload {
170
+ schemaVersion: 1;
171
+ event: "test_run_finished";
172
+ summary: NotificationSummary;
173
+ }
174
+
124
175
  /**
125
176
  * Configuration options for ACL and formatters.
126
177
  */
@@ -247,6 +298,28 @@ interface FormatterOptions {
247
298
  };
248
299
  /** Markdown specific options */
249
300
  markdown?: MarkdownFormatterOptions;
301
+ /** History tracking options */
302
+ history?: {
303
+ /** Path to JSON history file (enables tracking) */
304
+ filePath?: string;
305
+ /** Max runs to keep in history per test. Default: 10 */
306
+ maxRuns?: number;
307
+ };
308
+ /** Notification options */
309
+ notification?: {
310
+ /** Slack webhook URL (fallback: SLACK_WEBHOOK_URL env var) */
311
+ slackWebhookUrl?: string;
312
+ /** Teams webhook URL (fallback: TEAMS_WEBHOOK_URL env var) */
313
+ teamsWebhookUrl?: string;
314
+ /** When to send: "always", "on-failure", "never". Default: "on-failure" */
315
+ condition?: NotifyCondition;
316
+ /** URL to link in notifications */
317
+ reportUrl?: string;
318
+ /** Max failed tests to show. Default: 5 */
319
+ maxFailedTests?: number;
320
+ /** Generic webhook configurations */
321
+ webhooks?: GenericWebhookNotifierOptions[];
322
+ };
250
323
  /** Logger for warnings and info. Default: console */
251
324
  logger?: Logger;
252
325
  /** File writer function. Default: fs.promises.writeFile */
@@ -736,6 +809,51 @@ declare class CucumberJsonFormatter {
736
809
  private docEntryToArgument;
737
810
  }
738
811
 
812
+ /**
813
+ * Types for history tracking and test metrics.
814
+ */
815
+
816
+ interface HistoryEntry {
817
+ runId: string;
818
+ timestamp: number;
819
+ status: "passed" | "failed" | "skipped" | "pending";
820
+ durationMs: number;
821
+ ci?: {
822
+ provider?: CIProvider;
823
+ branch?: string;
824
+ commitSha?: string;
825
+ };
826
+ }
827
+ interface TestHistory {
828
+ testId: string;
829
+ testName: string;
830
+ sourceFile: string;
831
+ sourceLine?: number;
832
+ entries: HistoryEntry[];
833
+ }
834
+ interface HistoryStore {
835
+ version: 1;
836
+ maxRuns: number;
837
+ tests: Record<string, TestHistory>;
838
+ lastUpdated: number;
839
+ }
840
+ type StabilityGrade = "A" | "B" | "C" | "D" | "F";
841
+ type FlakinessLevel = "stable" | "unstable" | "flaky";
842
+ type PerformanceTrend = "improving" | "stable" | "regressing";
843
+ interface TestMetrics {
844
+ testId: string;
845
+ flakinessLevel: FlakinessLevel;
846
+ flakinessScore: number;
847
+ failureRate: number;
848
+ stabilityGrade: StabilityGrade;
849
+ performanceTrend: PerformanceTrend;
850
+ avgDurationMs: number;
851
+ passRate: number;
852
+ longestPassStreak: number;
853
+ consecutiveFailures: number;
854
+ sampleSize: number;
855
+ }
856
+
739
857
  /**
740
858
  * HTML Formatter - Layer 3.
741
859
  *
@@ -1371,8 +1489,19 @@ declare function clearVersionCache(): void;
1371
1489
  /**
1372
1490
  * CI environment auto-detection utility.
1373
1491
  *
1374
- * Detects known CI providers from environment variables.
1375
- * Precedence: GitHub Actions > CircleCI > Jenkins > Travis > GitLab CI > generic CI
1492
+ * Detects known CI providers from environment variables and populates
1493
+ * branch, commit SHA, PR number, build number, and URL metadata.
1494
+ *
1495
+ * Precedence (checked in order, first match wins):
1496
+ * 1. TF_BUILD=True -> azure
1497
+ * 2. BUILDKITE=true -> buildkite
1498
+ * 3. GITHUB_ACTIONS=true -> github
1499
+ * 4. GITLAB_CI=true -> gitlab
1500
+ * 5. CIRCLECI=true -> circleci
1501
+ * 6. JENKINS_URL defined -> jenkins
1502
+ * 7. TRAVIS=true -> travis
1503
+ * 8. CI=true -> unknown (generic fallback; note: fires in dev shells too)
1504
+ * 9. Nothing -> undefined (not in CI)
1376
1505
  */
1377
1506
 
1378
1507
  /**
@@ -1402,6 +1531,275 @@ declare function tryGetActiveOtelContext(): OtelTraceContext | undefined;
1402
1531
  */
1403
1532
  declare function resolveTraceUrl(template: string | undefined, traceId: string): string | undefined;
1404
1533
 
1534
+ /**
1535
+ * Notification orchestrator.
1536
+ *
1537
+ * Builds a NotificationSummary from a TestRunResult and dispatches
1538
+ * to configured notifiers (Slack, Teams, generic webhooks) based on condition.
1539
+ *
1540
+ * Env fallback and defaults are resolved internally so CLI and reporters
1541
+ * behave identically with zero duplication.
1542
+ *
1543
+ * Follows the fn(args, deps) pattern.
1544
+ * Never throws. Never logs webhook URLs.
1545
+ */
1546
+
1547
+ /** Arguments for sendNotifications. */
1548
+ interface SendNotificationsArgs {
1549
+ run: TestRunResult;
1550
+ /** Notification config from FormatterOptions.notification (or CLI-assembled equivalent) */
1551
+ notification?: {
1552
+ slackWebhookUrl?: string;
1553
+ teamsWebhookUrl?: string;
1554
+ condition?: NotifyCondition;
1555
+ reportUrl?: string;
1556
+ maxFailedTests?: number;
1557
+ webhooks?: GenericWebhookNotifierOptions[];
1558
+ };
1559
+ }
1560
+ /** Injectable dependencies for sendNotifications. */
1561
+ interface SendNotificationsDeps {
1562
+ fetch?: typeof globalThis.fetch;
1563
+ logger: {
1564
+ warn(msg: string): void;
1565
+ };
1566
+ toCIInfo: (raw?: RawCIInfo) => CIInfo$1 | undefined;
1567
+ env?: Record<string, string | undefined>;
1568
+ }
1569
+ /**
1570
+ * Send notifications to all configured channels.
1571
+ *
1572
+ * Resolves env fallbacks and defaults internally.
1573
+ * Never throws. Logs warnings for failures.
1574
+ * Never logs webhook URLs.
1575
+ */
1576
+ declare function sendNotifications(args: SendNotificationsArgs, deps: SendNotificationsDeps): Promise<void>;
1577
+
1578
+ /**
1579
+ * Slack webhook notifier using Block Kit.
1580
+ *
1581
+ * Follows the fn(args, deps) pattern.
1582
+ * Never logs the webhook URL.
1583
+ */
1584
+
1585
+ /** Arguments for sendSlackNotification. */
1586
+ interface SlackNotificationArgs {
1587
+ summary: NotificationSummary;
1588
+ webhookUrl: string;
1589
+ maxFailedTests?: number;
1590
+ }
1591
+ /** Injectable dependencies for sendSlackNotification. */
1592
+ interface SlackNotificationDeps {
1593
+ fetch: typeof globalThis.fetch;
1594
+ logger: {
1595
+ warn(msg: string): void;
1596
+ };
1597
+ }
1598
+ /** Result of a notification send attempt. */
1599
+ interface NotificationResult {
1600
+ ok: boolean;
1601
+ error?: string;
1602
+ }
1603
+ /**
1604
+ * Send a Slack notification via incoming webhook.
1605
+ *
1606
+ * Never throws. Returns `{ ok, error? }`.
1607
+ * Never logs the webhook URL.
1608
+ */
1609
+ declare function sendSlackNotification(args: SlackNotificationArgs, deps: SlackNotificationDeps): Promise<NotificationResult>;
1610
+
1611
+ /**
1612
+ * Microsoft Teams webhook notifier using Adaptive Cards.
1613
+ *
1614
+ * Follows the fn(args, deps) pattern.
1615
+ * Never logs the webhook URL.
1616
+ */
1617
+
1618
+ /** Arguments for sendTeamsNotification. */
1619
+ interface TeamsNotificationArgs {
1620
+ summary: NotificationSummary;
1621
+ webhookUrl: string;
1622
+ maxFailedTests?: number;
1623
+ }
1624
+ /** Injectable dependencies for sendTeamsNotification. */
1625
+ interface TeamsNotificationDeps {
1626
+ fetch: typeof globalThis.fetch;
1627
+ logger: {
1628
+ warn(msg: string): void;
1629
+ };
1630
+ }
1631
+ /** Result of a notification send attempt. */
1632
+ interface TeamsNotificationResult {
1633
+ ok: boolean;
1634
+ error?: string;
1635
+ }
1636
+ /**
1637
+ * Send a Teams notification via incoming webhook.
1638
+ *
1639
+ * Never throws. Returns `{ ok, error? }`.
1640
+ * Never logs the webhook URL.
1641
+ */
1642
+ declare function sendTeamsNotification(args: TeamsNotificationArgs, deps: TeamsNotificationDeps): Promise<TeamsNotificationResult>;
1643
+
1644
+ /**
1645
+ * Generic webhook notifier.
1646
+ *
1647
+ * Sends a versioned JSON envelope to arbitrary HTTP endpoints with optional
1648
+ * HMAC-SHA256 signing. Follows the fn(args, deps) pattern.
1649
+ *
1650
+ * Never throws. Never logs the webhook URL.
1651
+ */
1652
+
1653
+ /** Arguments for sendWebhookNotification. */
1654
+ interface WebhookNotificationArgs {
1655
+ summary: NotificationSummary;
1656
+ options: GenericWebhookNotifierOptions;
1657
+ maxFailedTests?: number;
1658
+ }
1659
+ /** Injectable dependencies for sendWebhookNotification. */
1660
+ interface WebhookNotificationDeps {
1661
+ fetch: typeof globalThis.fetch;
1662
+ logger: {
1663
+ warn(msg: string): void;
1664
+ };
1665
+ }
1666
+ /** Result of a webhook send attempt. */
1667
+ interface WebhookNotificationResult {
1668
+ ok: boolean;
1669
+ error?: string;
1670
+ }
1671
+ /**
1672
+ * Send a notification to a generic webhook endpoint.
1673
+ *
1674
+ * Never throws. Returns `{ ok, error? }`.
1675
+ * Never logs the webhook URL.
1676
+ */
1677
+ declare function sendWebhookNotification(args: WebhookNotificationArgs, deps: WebhookNotificationDeps): Promise<WebhookNotificationResult>;
1678
+
1679
+ /**
1680
+ * HMAC-SHA256 signing for generic webhook payloads.
1681
+ *
1682
+ * Pure function, isolated for testing.
1683
+ * Uses node:crypto — zero new dependencies.
1684
+ */
1685
+ /** Result of HMAC signing. */
1686
+ interface HmacSignResult {
1687
+ /** Signature in format "sha256=<hex>" (GitHub-style, widely recognized) */
1688
+ signature: string;
1689
+ /** ISO 8601 timestamp, only present when includeTimestamp is true */
1690
+ timestamp?: string;
1691
+ }
1692
+ /**
1693
+ * Compute HMAC-SHA256 signature for a request body.
1694
+ *
1695
+ * When `includeTimestamp` is true, the signed input is `"<timestamp>.<body>"` and the
1696
+ * timestamp is returned for the caller to emit as a header.
1697
+ */
1698
+ declare function signBody(args: {
1699
+ body: string;
1700
+ secret: string;
1701
+ includeTimestamp?: boolean;
1702
+ /** Injectable for deterministic testing */
1703
+ timestamp?: string;
1704
+ }): HmacSignResult;
1705
+
1706
+ /**
1707
+ * No-dependency ANSI escape sequence stripper.
1708
+ */
1709
+ /** Strip ANSI escape sequences. Regex: \x1B\[[0-?]*[ -/]*[@-~] */
1710
+ declare function stripAnsi(text: string): string;
1711
+
1712
+ /**
1713
+ * History store: load, save, update (fn(args, deps) pattern).
1714
+ */
1715
+
1716
+ interface LoadHistoryArgs {
1717
+ filePath: string;
1718
+ }
1719
+ interface LoadHistoryDeps {
1720
+ readFile: (path: string) => string | undefined;
1721
+ logger: {
1722
+ warn(msg: string): void;
1723
+ };
1724
+ }
1725
+ declare function loadHistory(args: LoadHistoryArgs, deps: LoadHistoryDeps): HistoryStore;
1726
+ interface SaveHistoryArgs {
1727
+ filePath: string;
1728
+ store: HistoryStore;
1729
+ }
1730
+ interface SaveHistoryDeps {
1731
+ writeFile: (path: string, content: string) => void;
1732
+ }
1733
+ declare function saveHistory(args: SaveHistoryArgs, deps: SaveHistoryDeps): void;
1734
+ interface UpdateHistoryArgs {
1735
+ store: HistoryStore;
1736
+ run: TestRunResult;
1737
+ maxRuns: number;
1738
+ }
1739
+ declare function updateHistory(args: UpdateHistoryArgs): HistoryStore;
1740
+
1741
+ /**
1742
+ * Flakiness calculation based on status transitions.
1743
+ */
1744
+
1745
+ interface FlakinessResult {
1746
+ flakinessLevel: FlakinessLevel;
1747
+ flakinessScore: number;
1748
+ failureRate: number;
1749
+ longestPassStreak: number;
1750
+ longestFailStreak: number;
1751
+ }
1752
+ declare function calculateFlakiness(args: {
1753
+ entries: HistoryEntry[];
1754
+ }): FlakinessResult;
1755
+
1756
+ /**
1757
+ * Performance trend detection via half-split comparison.
1758
+ */
1759
+
1760
+ interface PerformanceResult {
1761
+ trend: PerformanceTrend;
1762
+ avgDurationMs: number;
1763
+ }
1764
+ declare function detectPerformanceTrend(args: {
1765
+ entries: HistoryEntry[];
1766
+ }): PerformanceResult;
1767
+
1768
+ /**
1769
+ * Stability grade calculation (composite score).
1770
+ */
1771
+
1772
+ interface CalculateStabilityArgs {
1773
+ passRate: number;
1774
+ flakinessScore: number;
1775
+ longestPassStreak: number;
1776
+ sampleSize: number;
1777
+ }
1778
+ declare function calculateStability(args: CalculateStabilityArgs): StabilityGrade;
1779
+
1780
+ /**
1781
+ * Composite test metrics from history entries.
1782
+ */
1783
+
1784
+ declare function computeTestMetrics(args: {
1785
+ testId: string;
1786
+ entries: HistoryEntry[];
1787
+ }): TestMetrics;
1788
+
1789
+ /**
1790
+ * Centralized sample-size policy for history metrics.
1791
+ *
1792
+ * Easy to tune without hunting across files.
1793
+ */
1794
+ /** Minimum duration-bearing entries for performance trend analysis. */
1795
+ declare const MIN_PERF_SAMPLES = 6;
1796
+ /** Minimum entries before showing badges/metrics in reports. */
1797
+ declare const MIN_METRIC_SAMPLES = 5;
1798
+ /** Minimum entries for flakiness calculation (below this → "stable"). */
1799
+ declare const MIN_FLAKINESS_SAMPLES = 3;
1800
+ /** Check whether an array meets the minimum sample threshold. */
1801
+ declare function hasSufficientHistory(entries: unknown[], min: number): boolean;
1802
+
1405
1803
  /**
1406
1804
  * @executable-stories/formatters
1407
1805
  *
@@ -1491,4 +1889,4 @@ declare function normalizeVitestResults(testModules: Parameters<typeof adaptVite
1491
1889
  */
1492
1890
  declare function normalizePlaywrightResults(testResults: Parameters<typeof adaptPlaywrightRun>[0], adapterOptions?: Parameters<typeof adaptPlaywrightRun>[1], canonicalizeOptions?: CanonicalizeOptions): TestRunResult;
1493
1891
 
1494
- export { type Attachment, type CIInfo, type CanonicalizeOptions, type ColocatedStyle, type CoverageSummary, CucumberHtmlFormatter, type CucumberHtmlOptions, CucumberJsonFormatter, type CucumberJsonOptions, CucumberMessagesFormatter, type CucumberMessagesOptions, DocEntry, type FormatterOptions, type GenerateArgs, type GenerateDeps, type GenerateResult, HtmlFormatter, type HtmlOptions, type IJsonDataTable, type IJsonDocString, type IJsonEmbedding, type IJsonFeature, type IJsonScenario, type IJsonStep, type IJsonStepArgument, type IJsonStepResult, type IJsonTableRow, type IJsonTag, JUnitFormatter, type JUnitOptions, type Logger, MarkdownFormatter, type MarkdownFormatterOptions, type MarkdownOptions, type MarkdownRenderers, type OtelTraceContext, type OutputConfig, type OutputFormat, type OutputMode, type OutputRule, RawAttachment, RawCIInfo, RawRun, RawStatus, ReportGenerator, type ResolvedFormatterOptions, type StepResult, StoryMeta, StoryStep, type TestCaseAttempt, type TestCaseResult, type TestRunResult, type TestStatus, type ValidationResult, type WriteFile, adaptJestRun, adaptPlaywrightRun, adaptVitestRun, assertValidRun, canonicalizeRun, clearVersionCache, createReportGenerator, deriveStepResults, detectCI, findGitDir, formatDuration, generateRunId, generateTestCaseId, mergeStepResults, msToNanoseconds, nanosecondsToMs, normalizeJestResults, normalizePlaywrightResults, normalizeStatus, normalizeVitestResults, parseEnvelopes, parseNdjson, readBranchName, readGitSha, readPackageVersion, resolveAttachment, resolveAttachments, resolveTraceUrl, slugify, tryGetActiveOtelContext, validateCanonicalRun };
1892
+ export { type Attachment, type CIInfo, CIProvider, type CanonicalizeOptions, type ColocatedStyle, type CoverageSummary, CucumberHtmlFormatter, type CucumberHtmlOptions, CucumberJsonFormatter, type CucumberJsonOptions, CucumberMessagesFormatter, type CucumberMessagesOptions, DocEntry, type FlakinessLevel, type FormatterOptions, type GenerateArgs, type GenerateDeps, type GenerateResult, type GenericWebhookNotifierOptions, type HistoryEntry, type HistoryStore, HtmlFormatter, type HtmlOptions, type IJsonDataTable, type IJsonDocString, type IJsonEmbedding, type IJsonFeature, type IJsonScenario, type IJsonStep, type IJsonStepArgument, type IJsonStepResult, type IJsonTableRow, type IJsonTag, JUnitFormatter, type JUnitOptions, 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, RawAttachment, RawCIInfo, RawRun, RawStatus, ReportGenerator, type ResolvedFormatterOptions, type StabilityGrade, type StepResult, StoryMeta, StoryStep, type TestCaseAttempt, type TestCaseResult, type TestHistory, type TestMetrics, type TestRunResult, type TestStatus, CIInfo$1 as TypedCIInfo, type ValidationResult, type WebhookPayload, type WebhookSignerHmac, type WriteFile, adaptJestRun, adaptPlaywrightRun, adaptVitestRun, assertValidRun, calculateFlakiness, calculateStability, canonicalizeRun, clearVersionCache, computeTestMetrics, createReportGenerator, deriveStepResults, detectCI, detectPerformanceTrend, findGitDir, formatDuration, generateRunId, generateTestCaseId, hasSufficientHistory, loadHistory, mergeStepResults, msToNanoseconds, nanosecondsToMs, normalizeJestResults, normalizePlaywrightResults, normalizeStatus, normalizeVitestResults, parseEnvelopes, parseNdjson, readBranchName, readGitSha, readPackageVersion, resolveAttachment, resolveAttachments, resolveTraceUrl, saveHistory, sendNotifications, sendSlackNotification, sendTeamsNotification, sendWebhookNotification, signBody, slugify, stripAnsi, tryGetActiveOtelContext, updateHistory, validateCanonicalRun };