spana-test 0.5.0 → 0.7.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 (73) hide show
  1. package/.agents/skills/spana-testing/SKILL.md +126 -246
  2. package/README.md +2 -2
  3. package/dist/agent/index.d.ts +2 -2
  4. package/dist/agent/index.js +5 -5
  5. package/dist/{storybook-CxaP3YDz.d.ts → app-D_UyZBsl.d.ts} +213 -10
  6. package/dist/{chunk-WSA5QPTA.js → chunk-2IXXEXTL.js} +2 -2
  7. package/dist/{chunk-3YE2POGD.js → chunk-3SH5JQF7.js} +143 -3
  8. package/dist/chunk-3SH5JQF7.js.map +1 -0
  9. package/dist/chunk-54ASKII6.js +183 -0
  10. package/dist/chunk-54ASKII6.js.map +1 -0
  11. package/dist/{chunk-LRGT342X.js → chunk-6B5Y75V4.js} +1633 -533
  12. package/dist/chunk-6B5Y75V4.js.map +1 -0
  13. package/dist/{chunk-SQL3YRR5.js → chunk-JYFPZRCN.js} +21 -3
  14. package/dist/chunk-JYFPZRCN.js.map +1 -0
  15. package/dist/{chunk-UJQ7PID5.js → chunk-KNSAHEXI.js} +78 -3
  16. package/dist/chunk-KNSAHEXI.js.map +1 -0
  17. package/dist/{chunk-3TRMQCUT.js → chunk-PLE7RFQE.js} +31 -2
  18. package/dist/chunk-PLE7RFQE.js.map +1 -0
  19. package/dist/{chunk-H3RWZCID.js → chunk-RURZVMZ7.js} +104 -3
  20. package/dist/chunk-RURZVMZ7.js.map +1 -0
  21. package/dist/{chunk-XENRC3YO.js → chunk-T3EBOYLS.js} +751 -59
  22. package/dist/chunk-T3EBOYLS.js.map +1 -0
  23. package/dist/{chunk-PJKIXVSO.js → chunk-T5CROOR7.js} +898 -238
  24. package/dist/chunk-T5CROOR7.js.map +1 -0
  25. package/dist/{chunk-5245YBLL.js → chunk-Y2RZNOKU.js} +2 -2
  26. package/dist/cli.js +11 -11
  27. package/dist/cli.js.map +1 -1
  28. package/dist/config-loader-NIDQGP3K.js +9 -0
  29. package/dist/{doctor-command-WB3O2H64.js → doctor-command-WPEVZEZ4.js} +3 -3
  30. package/dist/{filters-Q3ALKWZ5.js → filters-MQG2RMPX.js} +4 -2
  31. package/dist/flow-g6AICPAl.d.ts +95 -0
  32. package/dist/gherkin/steps.d.ts +2 -2
  33. package/dist/{html-F3X3XPSX.js → html-IKCTZH2U.js} +194 -3
  34. package/dist/html-IKCTZH2U.js.map +1 -0
  35. package/dist/index.d.ts +436 -21
  36. package/dist/index.js +328 -7
  37. package/dist/index.js.map +1 -1
  38. package/dist/{runner-6HK62Q7B.js → runner-TF4OKPYP.js} +2 -2
  39. package/dist/{screenshot-compare-3QRHHSFZ.js → screenshot-compare-POTXVUTL.js} +21 -1
  40. package/dist/screenshot-compare-POTXVUTL.js.map +1 -0
  41. package/dist/{server-PRM7BVVD.js → server-EBPYK3VE.js} +5 -5
  42. package/dist/{server-QWJJB3WG.js → server-IGLBFEU7.js} +2 -2
  43. package/dist/{session-2E6OK6BH.js → session-QRWH3SPW.js} +4 -4
  44. package/dist/{session-Ddem-Q5n.d.ts → session-cJ_tZjCL.d.ts} +22 -1
  45. package/dist/{studio-command-O3NN5BCG.js → studio-command-FLA5HKRK.js} +2 -2
  46. package/dist/{test-command-FYOZ6QAE.js → test-command-P5W7UD52.js} +24 -10
  47. package/dist/test-command-P5W7UD52.js.map +1 -0
  48. package/dist/{validator-HZ2A3NEI.js → validator-BLOLIHUY.js} +3 -3
  49. package/package.json +3 -2
  50. package/dist/chunk-3TRMQCUT.js.map +0 -1
  51. package/dist/chunk-3YE2POGD.js.map +0 -1
  52. package/dist/chunk-H3RWZCID.js.map +0 -1
  53. package/dist/chunk-LRGT342X.js.map +0 -1
  54. package/dist/chunk-PJKIXVSO.js.map +0 -1
  55. package/dist/chunk-SQL3YRR5.js.map +0 -1
  56. package/dist/chunk-UJQ7PID5.js.map +0 -1
  57. package/dist/chunk-XENRC3YO.js.map +0 -1
  58. package/dist/config-loader-XGDDJGVY.js +0 -9
  59. package/dist/flow-CyRC-tTc.d.ts +0 -176
  60. package/dist/html-F3X3XPSX.js.map +0 -1
  61. package/dist/screenshot-compare-3QRHHSFZ.js.map +0 -1
  62. package/dist/test-command-FYOZ6QAE.js.map +0 -1
  63. /package/dist/{chunk-WSA5QPTA.js.map → chunk-2IXXEXTL.js.map} +0 -0
  64. /package/dist/{chunk-5245YBLL.js.map → chunk-Y2RZNOKU.js.map} +0 -0
  65. /package/dist/{config-loader-XGDDJGVY.js.map → config-loader-NIDQGP3K.js.map} +0 -0
  66. /package/dist/{doctor-command-WB3O2H64.js.map → doctor-command-WPEVZEZ4.js.map} +0 -0
  67. /package/dist/{filters-Q3ALKWZ5.js.map → filters-MQG2RMPX.js.map} +0 -0
  68. /package/dist/{runner-6HK62Q7B.js.map → runner-TF4OKPYP.js.map} +0 -0
  69. /package/dist/{server-PRM7BVVD.js.map → server-EBPYK3VE.js.map} +0 -0
  70. /package/dist/{server-QWJJB3WG.js.map → server-IGLBFEU7.js.map} +0 -0
  71. /package/dist/{session-2E6OK6BH.js.map → session-QRWH3SPW.js.map} +0 -0
  72. /package/dist/{studio-command-O3NN5BCG.js.map → studio-command-FLA5HKRK.js.map} +0 -0
  73. /package/dist/{validator-HZ2A3NEI.js.map → validator-BLOLIHUY.js.map} +0 -0
package/dist/index.d.ts CHANGED
@@ -1,12 +1,12 @@
1
- import { F as FlowDefinition, a as FlowContext, b as FlowConfig, P as PromiseApp } from './flow-CyRC-tTc.js';
2
- export { c as FlowFn, d as PromiseExpectation, S as SecondarySession, e as SecondarySessionOptions, f as Sessions, g as flow } from './flow-CyRC-tTc.js';
3
- import { R as RawDriverService, D as DriverError, a as DomElementMatch, P as Platform, E as ExtendedSelector, T as TapMode, b as ProvConfig, c as DomChannel, d as DomTargetInfo, S as Selector, e as DomWaitForSelectorOptions, f as DomIdleOptions, g as DomStorageEntries, h as DomClearStorageOptions, B as BrowserRouteMatcher, i as BrowserMockResponse, j as BrowserConsoleLog, k as BrowserJSError, l as BrowserName, m as ElectrobunAppConfig, n as ElectrobunRenderer, A as AppiumExecutionConfig, o as AppConfig } from './storybook-CxaP3YDz.js';
4
- export { p as ArtifactConfig, q as BackUntilVisibleOptions, r as BridgeConfig, s as BrowserHAR, t as BrowserNetworkConditions, u as DeviceInfo, v as DeviceStateConfig, w as DismissKeyboardOptions, x as DomChannelKind, y as DomRect, z as ElectronAppConfig, L as LaunchOptions, C as RelativeSelector, F as ScrollUntilVisibleOptions, G as StorybookConfig, H as StorybookOpenOptions, I as StorybookValue, J as TouchAction, K as TouchSequence, W as WarmDaemonConfig, M as WebBrowserEngine, N as WebExecutionConfig, O as WebResourceBlockType, Q as buildDomWaitForSelectorScript, U as defineConfig, V as isSystemUISelector, X as isTestIDSelector, Y as systemUI } from './storybook-CxaP3YDz.js';
5
- import { E as Element, B as Bounds, C as ConnectOptions, S as Session } from './session-Ddem-Q5n.js';
1
+ import { F as FlowDefinition, a as FlowContext, b as FlowConfig } from './flow-g6AICPAl.js';
2
+ export { c as FlowFn, P as PromiseExpectation, S as SecondarySession, d as SecondarySessionOptions, e as Sessions, f as flow } from './flow-g6AICPAl.js';
3
+ import { R as RawDriverService, D as DriverError, a as DomElementMatch, P as Platform, E as ExtendedSelector, T as TapMode, b as ProvConfig, c as DomChannel, d as DomTargetInfo, S as Selector, e as DomWaitForSelectorOptions, f as DomWaitForHiddenOptions, g as DomWaitForMatchOptions, h as DomWaitForMatchResult, i as DomFillOptions, j as DomIdleOptions, k as DomStorageEntries, l as DomClearStorageOptions, B as BrowserRouteMatcher, m as BrowserMockResponse, n as BrowserConsoleLog, o as BrowserJSError, p as BrowserName, V as VirtualAuthenticatorOptions, q as ElectrobunAppConfig, r as ElectrobunRenderer, A as AppiumExecutionConfig, s as AppConfig, t as PromiseApp } from './app-D_UyZBsl.js';
4
+ export { u as ArtifactConfig, v as BackUntilVisibleOptions, w as BridgeConfig, x as BrowserHAR, y as BrowserNetworkConditions, z as DeviceInfo, C as DeviceStateConfig, F as DismissKeyboardOptions, G as DomChannelKind, H as DomRect, I as ElectronAppConfig, L as LaunchOptions, J as RelativeSelector, K as ScrollUntilVisibleOptions, M as StorybookConfig, N as StorybookOpenOptions, O as StorybookValue, Q as TouchAction, U as TouchSequence, W as VideoRecordingMode, X as VirtualCredential, Y as WarmDaemonConfig, Z as WebBrowserEngine, _ as WebExecutionConfig, $ as WebResourceBlockType, a0 as buildDomFillScript, a1 as buildDomWaitForHiddenScript, a2 as buildDomWaitForMatchScript, a3 as buildDomWaitForSelectorScript, a4 as defineConfig, a5 as isSystemUISelector, a6 as isTestIDSelector, a7 as systemUI } from './app-D_UyZBsl.js';
5
+ import { E as Element, B as Bounds, C as ConnectOptions, S as Session } from './session-cJ_tZjCL.js';
6
6
  import { Socket } from 'node:net';
7
7
  import { Effect } from 'effect';
8
8
  import { Browser, _electron, chromium } from 'playwright-core';
9
- import { spawn } from 'node:child_process';
9
+ import { spawn, execFileSync } from 'node:child_process';
10
10
 
11
11
  interface HierarchyCache {
12
12
  /** Get the hierarchy, using cache if fresh enough. */
@@ -285,6 +285,15 @@ interface CdpDomChannelOptions {
285
285
  /** Injectable WebSocket factory for testing */
286
286
  createWebSocket?: WebSocketFactory;
287
287
  }
288
+ interface CdpChildSessionInfo {
289
+ sessionId: string;
290
+ targetId?: string;
291
+ url?: string;
292
+ }
293
+ type CdpFrameOffsetResolver = (child: CdpChildSessionInfo) => Promise<{
294
+ x: number;
295
+ y: number;
296
+ }>;
288
297
  declare class CdpDomChannel implements DomChannel {
289
298
  readonly kind: "cdp";
290
299
  private readonly endpointUrl;
@@ -297,7 +306,11 @@ declare class CdpDomChannel implements DomChannel {
297
306
  private connected;
298
307
  private nextId;
299
308
  private pending;
309
+ private eventListeners;
300
310
  private currentTargetId;
311
+ private activeSessionId;
312
+ private childSessions;
313
+ private frameOffsetResolver?;
301
314
  constructor(options: CdpDomChannelOptions);
302
315
  isConnected(): boolean;
303
316
  listTargets(): Promise<DomTargetInfo[]>;
@@ -306,10 +319,28 @@ declare class CdpDomChannel implements DomChannel {
306
319
  connect(): Promise<void>;
307
320
  private openSocket;
308
321
  private rejectAllPending;
309
- sendCommand<T = any>(method: string, params?: Record<string, unknown>): Promise<T>;
322
+ setSessionId(sessionId: string | null): void;
323
+ get sessionId(): string | null;
324
+ /** Register an attached cross-origin iframe (OOPIF) flattened CDP session. */
325
+ addChildSession(sessionId: string, meta?: {
326
+ targetId?: string;
327
+ url?: string;
328
+ }): void;
329
+ removeChildSession(sessionId: string): void;
330
+ clearChildSessions(): void;
331
+ getChildSessions(): CdpChildSessionInfo[];
332
+ setFrameOffsetResolver(resolver: CdpFrameOffsetResolver | undefined): void;
333
+ onEvent(method: string, listener: (params: any, sessionId?: string) => void): () => void;
334
+ waitForEvent<T = any>(method: string, timeoutMs?: number, predicate?: (params: T, sessionId?: string) => boolean): Promise<T>;
335
+ sendCommand<T = any>(method: string, params?: Record<string, unknown>, sessionId?: string | null): Promise<T>;
336
+ evaluateOnSession<T = unknown>(sessionId: string | null | undefined, script: string | ((...args: any[]) => T), ...args: any[]): Promise<T>;
310
337
  evaluate<T = unknown>(script: string | ((...args: any[]) => T), ...args: any[]): Promise<T>;
338
+ private applyChildOffset;
311
339
  query(selector: Selector): Promise<DomElementMatch[]>;
312
340
  waitForSelector(selector: Selector, opts?: DomWaitForSelectorOptions): Promise<DomElementMatch[]>;
341
+ waitForHidden(selector: Selector, opts?: DomWaitForHiddenOptions): Promise<boolean>;
342
+ waitForMatch(selector: Selector, opts: DomWaitForMatchOptions): Promise<DomWaitForMatchResult>;
343
+ fillDom(selector: Selector, value: string, opts?: DomFillOptions): Promise<boolean>;
313
344
  tapDom(selector: Selector): Promise<boolean>;
314
345
  scrollIntoView(selector: Selector): Promise<DomElementMatch | null>;
315
346
  reload(): Promise<void>;
@@ -611,8 +642,16 @@ interface PlaywrightConfig {
611
642
  blockResources?: Array<"image" | "font" | "media" | "stylesheet">;
612
643
  /** Connect to an already-running warm Chromium CDP endpoint instead of launching a new browser process. */
613
644
  cdpEndpoint?: string;
645
+ /** Connect to a remote Playwright WebSocket server (e.g. BrowserStack Automate Web `wss://cdp.browserstack.com/playwright?...`). */
646
+ wsEndpoint?: string;
614
647
  /** Reuse a persistent detached headless Chromium daemon across CLI runs (Flashwright-style warm session). */
615
648
  warmBrowser?: boolean;
649
+ /** Scope key for isolating warm Chromium daemons across concurrent repos/runs (defaults to cwd hash). */
650
+ warmBrowserScope?: string;
651
+ /** Create a fresh isolated BrowserContext per flow via a pre-warmed context pool + background teardown. */
652
+ freshContextPerFlow?: boolean;
653
+ /** Automatically attach a CDP WebAuthn virtual authenticator (passkey) to every fresh context. */
654
+ virtualAuthenticator?: boolean | VirtualAuthenticatorOptions;
616
655
  /** Attach a built-in zero-setup Playwright DOM channel for ~1ms `{ testID }` queries without full DOM dumps. Default: true. */
617
656
  enableDomChannel?: boolean;
618
657
  }
@@ -620,28 +659,59 @@ interface PlaywrightConfig {
620
659
  * Connect to an existing warm headless Chromium daemon or start a detached one
621
660
  * registered in Spana's warm daemon registry (`spana daemon status|stop`).
622
661
  */
623
- declare function ensureWarmBrowserDaemon(config?: Pick<PlaywrightConfig, "executablePath" | "headless">): Promise<{
662
+ declare function ensureWarmBrowserDaemon(config?: Pick<PlaywrightConfig, "executablePath" | "headless" | "warmBrowserScope">): Promise<{
624
663
  browser: Browser;
625
664
  cdpUrl: string;
626
665
  reused: boolean;
627
666
  }>;
628
667
  declare function connectPlaywrightOverCDP(cdpEndpoint: string): Promise<Browser>;
668
+ declare function connectPlaywrightOverWS(wsEndpoint: string, browserName?: BrowserName): Promise<Browser>;
629
669
  declare function launchPlaywrightBrowser(config?: Pick<PlaywrightConfig, "browser" | "headless" | "channel" | "executablePath">): Promise<Browser>;
630
670
 
631
- interface PrelaunchedWebBrowser {
632
- browserPromise: Promise<Browser>;
633
- ownsBrowser: boolean;
671
+ interface TestResult {
672
+ name: string;
673
+ platform: Platform;
674
+ status: "passed" | "failed" | "skipped";
675
+ flaky?: boolean;
676
+ attempts?: number;
677
+ durationMs: number;
678
+ error?: FlowError;
679
+ attachments?: Attachment[];
680
+ steps?: StepResult[];
681
+ scenarioSteps?: ScenarioStepResult[];
682
+ }
683
+
684
+ interface DirectCdpBrowserLaunchOptions {
685
+ /** Explicit Chromium/Chrome binary path. Auto-detects system Chrome or Playwright Chromium if omitted. */
686
+ executablePath?: string;
687
+ /** Run headless (default: true). */
688
+ headless?: boolean;
689
+ /** Reuse a detached warm Chromium daemon across CLI runs. */
690
+ warmBrowser?: boolean;
691
+ /** Isolation scope key for warm Chromium daemon (defaults to cwd hash). */
692
+ warmBrowserScope?: string;
693
+ /** Extra Chrome launch flags. */
694
+ args?: string[];
695
+ }
696
+ interface DirectCdpBrowserHandle {
697
+ /** HTTP debugging endpoint, e.g. `http://127.0.0.1:9322`. */
698
+ httpEndpoint: string;
699
+ /** Browser-level CDP WebSocket URL (`ws://127.0.0.1:.../devtools/browser/...`). */
700
+ browserWsUrl: string;
701
+ /** True when attached to a pre-existing warm daemon (close will NOT kill it). */
702
+ reused: boolean;
703
+ pid?: number;
704
+ close(): Promise<void>;
634
705
  }
635
706
  /**
636
- * Start launching (or connecting to a warm/CDP) Playwright browser immediately
637
- * so browser boot overlaps with flow discovery and TypeScript imports.
707
+ * Launch (or attach to a warm) Chromium process directly over raw CDP WebSocket —
708
+ * completely bypassing Playwright's Node client↔server IPC pipe!
638
709
  */
639
- declare function speculativelyPrelaunchWebBrowser(config: ProvConfig): PrelaunchedWebBrowser | undefined;
640
-
710
+ declare function launchDirectCdpBrowser(options?: DirectCdpBrowserLaunchOptions): Promise<DirectCdpBrowserHandle>;
641
711
  interface LightweightCdpDriverOptions {
642
712
  /**
643
713
  * HTTP CDP endpoint (e.g. `"http://127.0.0.1:9222"` for Lightpanda or Chrome `--remote-debugging-port`)
644
- * OR direct WebSocket debugger URL (`"ws://127.0.0.1:9222/devtools/page/..."`).
714
+ * OR direct WebSocket debugger URL (`"ws://127.0.0.1:9222/devtools/page/..."` or `"/devtools/browser/..."`).
645
715
  */
646
716
  cdpUrl: string;
647
717
  /** Optional base URL used when `launchApp()` receives a relative path. */
@@ -653,19 +723,62 @@ interface LightweightCdpDriverOptions {
653
723
  width: number;
654
724
  height: number;
655
725
  };
726
+ /**
727
+ * Use isolated CDP browser contexts (`Target.createBrowserContext` + flattened CDP sessions)
728
+ * on a browser-level WebSocket — zero Playwright Node client↔server pipe!
729
+ * Auto-enabled when `cdpUrl` is a `/devtools/browser/` URL or `freshContextPerFlow` is true.
730
+ */
731
+ useBrowserContexts?: boolean;
732
+ /** Pre-warm the next isolated CDP browser context while the current flow runs, and dispose old contexts asynchronously. */
733
+ freshContextPerFlow?: boolean;
734
+ /** Navigation wait condition (`"load"`, `"domcontentloaded"`, or `"commit"`). Default: `"load"` in browser-context mode. */
735
+ waitUntil?: "domcontentloaded" | "load" | "networkidle" | "commit";
736
+ /** Collapse CSS transitions & animations to 0.001ms via `Page.addScriptToEvaluateOnNewDocument`. */
737
+ instantAnimations?: boolean;
738
+ /** Abort specified resource types before hitting the network. */
739
+ blockResources?: Array<"image" | "font" | "media" | "stylesheet">;
740
+ /** Automatically attach a CDP WebAuthn virtual authenticator (passkey) to every context. */
741
+ virtualAuthenticator?: boolean | VirtualAuthenticatorOptions;
742
+ /** Optional Playwright-compatible storageState JSON path to preload into contexts. */
743
+ storageState?: string;
656
744
  /** Injectable fetch & WebSocket factory for tests. */
657
745
  fetchFn?: typeof fetch;
658
746
  createWebSocket?: WebSocketFactory;
659
747
  }
660
748
  /**
661
- * Lightweight CDP-direct browser driver for **Lightpanda**, remote CDP grids,
662
- * or headless Chrome `--remote-debugging-port` — zero Playwright client overhead!
749
+ * Direct CDP Chromium / Lightpanda driver speaking raw WebSocket CDP directly
750
+ * from Bun/Node to the browser — completely eliminating Playwright's Node
751
+ * client↔server IPC pipe!
663
752
  *
664
- * Attaches `CdpDomChannel` directly so `{ testID }` queries (including Shadow DOM
665
- * & same-origin `<iframe>` piercing) resolve in ~1 ms without full DOM dumps.
753
+ * Supports:
754
+ * - Page-level attach (Lightpanda or existing tab)
755
+ * - Full browser-level isolated contexts (`Target.createBrowserContext`), pre-warmed
756
+ * context pooling (`freshContextPerFlow`), background async context disposal,
757
+ * built-in WebAuthn virtual passkeys, network mocking (`Fetch`), cookies/auth state,
758
+ * and single-round-trip MutationObserver actionability via `CdpDomChannel`.
666
759
  */
667
760
  declare function makeLightweightCdpDriver(options: LightweightCdpDriverOptions): Effect.Effect<RawDriverService, DriverError>;
668
761
 
762
+ /**
763
+ * Resolve the effective web browser engine.
764
+ * - `"auto"`: automatically selects direct CDP (`"cdp"`, zero Playwright pipe) for Chromium
765
+ * when no Playwright-only features (`wsEndpoint`, `channel`, `artifacts.har`) are requested,
766
+ * and falls back seamlessly to `"playwright"` otherwise.
767
+ * - Explicit `"cdp"`, `"playwright"`, or `"lightpanda"` is respected verbatim.
768
+ */
769
+ declare function resolveWebEngine(config: ProvConfig): "playwright" | "cdp" | "lightpanda";
770
+ interface PrelaunchedWebBrowser {
771
+ browserPromise: Promise<Browser>;
772
+ ownsBrowser: boolean;
773
+ /** Populated when `execution.web.engine === "cdp"` speculatively launches direct Chromium. */
774
+ cdpBrowserPromise?: Promise<DirectCdpBrowserHandle>;
775
+ }
776
+ /**
777
+ * Start launching (or connecting to a warm/CDP) browser immediately
778
+ * so browser boot overlaps with flow discovery and TypeScript imports.
779
+ */
780
+ declare function speculativelyPrelaunchWebBrowser(config: ProvConfig): PrelaunchedWebBrowser | undefined;
781
+
669
782
  /** Order flows descending by known duration (longest first) while preserving order on ties. */
670
783
  declare function orderFlowsLongestFirst(flows: FlowDefinition[], durationHintsMs?: Record<string, number>): FlowDefinition[];
671
784
 
@@ -1021,6 +1134,32 @@ interface PathRuleFilterOptions {
1021
1134
  * Flows not matched by any rule fail open and run automatically.
1022
1135
  */
1023
1136
  declare function pathRuleFilter(options: PathRuleFilterOptions): TestFilter;
1137
+ interface DeterministicImpactFilterOptions {
1138
+ name?: string;
1139
+ /** Additional path-to-flow rules combined with automatic static import-graph tracing. */
1140
+ pathMappings?: PathRule[];
1141
+ /** Flow tags that are NEVER skipped (e.g. `["smoke"]`). */
1142
+ alwaysRunTags?: string[];
1143
+ /** Path prefixes that force the entire suite to run (e.g. `["src/shared/", "db/"]`). */
1144
+ runAllOnPaths?: string[];
1145
+ /**
1146
+ * When true (default), if a changed file is NOT imported by any flow and does not
1147
+ * match any `pathMappings`, fail open and run all flows so unmapped app changes are
1148
+ * never silently missed. Set to `false` for strict import-graph-only selection.
1149
+ */
1150
+ failOpenOnUnmappedChange?: boolean;
1151
+ /** Max recursive import depth to trace from each flow file. Default: 12. */
1152
+ maxDepth?: number;
1153
+ }
1154
+ /**
1155
+ * 100% deterministic, zero-AI test impact filter for `--changed-since`.
1156
+ *
1157
+ * Recursively traces static ESM/CJS imports (`import`, `export ... from`, `require`)
1158
+ * from every `.flow.ts` file and combines them with optional `pathMappings`.
1159
+ * Fails open on config/lockfile changes, `runAllOnPaths`, and (by default) any
1160
+ * changed file not covered by any import graph or path mapping.
1161
+ */
1162
+ declare function deterministicImpactFilter(options?: DeterministicImpactFilterOptions): TestFilter;
1024
1163
  /**
1025
1164
  * Run a chain of `TestFilter`s sequentially over candidate flows.
1026
1165
  * Any filter that throws fails open (keeps all remaining flows) and logs a note.
@@ -1091,6 +1230,83 @@ declare function createFlowWithFixtures<Fixtures extends Record<string, unknown>
1091
1230
  (name: string, fn: (ctx: FlowContext<T, R> & Fixtures) => Promise<void>): FlowDefinition<T, R>;
1092
1231
  (name: string, config: ExtendedFlowConfig<R, SessionName>, fn: (ctx: FlowContext<T, R> & Fixtures) => Promise<void>): FlowDefinition<T, R>;
1093
1232
  };
1233
+ interface ApiClientOptions {
1234
+ /** Base URL for API/test-control endpoints (e.g. `"http://localhost:3000/api"`). */
1235
+ baseUrl: string;
1236
+ /** Default headers attached to every request (e.g. `{ Authorization: "Bearer ..." }`). */
1237
+ headers?: Record<string, string>;
1238
+ /** Optional custom fetch implementation for testing. */
1239
+ fetchFn?: typeof fetch;
1240
+ }
1241
+ interface ApiRequestOptions {
1242
+ headers?: Record<string, string>;
1243
+ query?: Record<string, string | number | boolean | undefined>;
1244
+ signal?: AbortSignal;
1245
+ }
1246
+ interface ApiResponse<T = unknown> {
1247
+ status: number;
1248
+ ok: boolean;
1249
+ headers: Headers;
1250
+ data: T;
1251
+ }
1252
+ interface ApiClient {
1253
+ get<T = unknown>(path: string, opts?: ApiRequestOptions): Promise<ApiResponse<T>>;
1254
+ post<T = unknown>(path: string, body?: unknown, opts?: ApiRequestOptions): Promise<ApiResponse<T>>;
1255
+ put<T = unknown>(path: string, body?: unknown, opts?: ApiRequestOptions): Promise<ApiResponse<T>>;
1256
+ patch<T = unknown>(path: string, body?: unknown, opts?: ApiRequestOptions): Promise<ApiResponse<T>>;
1257
+ delete<T = unknown>(path: string, opts?: ApiRequestOptions): Promise<ApiResponse<T>>;
1258
+ /** Register an automatic teardown callback (runs in strict LIFO order on `cleanup()`). */
1259
+ onCleanup(fn: () => Promise<void> | void): void;
1260
+ /** Run all registered cleanup callbacks in reverse (LIFO) order and clear the queue. */
1261
+ cleanup(): Promise<void>;
1262
+ }
1263
+ /**
1264
+ * First-class HTTP client for seeding and tearing down test data via API/test-control
1265
+ * endpoints inside Spana flows and lazy fixtures (far faster than UI setup).
1266
+ */
1267
+ declare function createApiClient(options: ApiClientOptions): ApiClient;
1268
+ /**
1269
+ * Convenience lazy fixture builder for `createFlowWithFixtures`:
1270
+ * provides a fresh `ApiClient` to each flow and automatically executes all
1271
+ * `api.onCleanup(...)` hooks in LIFO order even when the flow throws.
1272
+ */
1273
+ declare function createApiFixture<Deps extends Record<string, unknown> = Record<string, never>, T extends string = string, R extends string = string>(options: ApiClientOptions | ((ctx: FlowContext<T, R> & Deps) => ApiClientOptions)): FixtureFn<ApiClient, Deps, T, R>;
1274
+ interface PersonaDefinition<T extends string = string, R extends string = string> {
1275
+ name: string;
1276
+ /** Sign in once (via API, virtual passkey, or UI) and return storage entries or a saved storageStatePath. */
1277
+ signIn: (ctx: FlowContext<T, R>) => Promise<{
1278
+ storage?: DomStorageEntries;
1279
+ storageStatePath?: string;
1280
+ } | void>;
1281
+ /** Optional cache key discriminator (e.g. base URL or tenant ID). */
1282
+ cacheKey?: string;
1283
+ /** Optional route to navigate to after restoring cached auth state. */
1284
+ navigateTo?: R;
1285
+ }
1286
+ /** Define a reusable authenticated persona for `PersonaAuthCache`. */
1287
+ declare function definePersona<T extends string = string, R extends string = string>(name: string, config: Omit<PersonaDefinition<T, R>, "name">): PersonaDefinition<T, R>;
1288
+ interface CachedPersonaState {
1289
+ storage?: DomStorageEntries;
1290
+ storageStatePath?: string;
1291
+ cachedAt: number;
1292
+ }
1293
+ /**
1294
+ * In-memory per-persona auth state cache (single-flight safe across parallel workers).
1295
+ * Signs a persona in ONCE (including passkey / WebAuthn flows), caches its auth state,
1296
+ * and restores it in milliseconds across all remaining flows.
1297
+ */
1298
+ declare class PersonaAuthCache {
1299
+ private readonly cache;
1300
+ private readonly inflight;
1301
+ private keyFor;
1302
+ get(name: string, cacheKey?: string): CachedPersonaState | undefined;
1303
+ invalidate(name?: string, cacheKey?: string): void;
1304
+ /**
1305
+ * Ensure `persona` is authenticated in `ctx`. On cache miss, executes `persona.signIn(ctx)`
1306
+ * once (coalescing concurrent callers); on cache hit, restores cookies/storageState directly.
1307
+ */
1308
+ authenticate<T extends string = string, R extends string = string>(persona: PersonaDefinition<T, R>, ctx: FlowContext<T, R>): Promise<CachedPersonaState>;
1309
+ }
1094
1310
 
1095
1311
  /** A deterministic action recorded from an `agent.act(goal)` execution. */
1096
1312
  type RecordedAction = {
@@ -1217,6 +1433,205 @@ declare class ReplaySession {
1217
1433
  getSummary(): ReplayCacheSummary;
1218
1434
  }
1219
1435
 
1436
+ interface NativePngCompareResult {
1437
+ match: boolean;
1438
+ sizeMismatch: boolean;
1439
+ diffPixelCount: number;
1440
+ diffPixelRatio: number;
1441
+ diffImage?: Buffer;
1442
+ }
1443
+ interface NativeXmlRawNode {
1444
+ tagName: string;
1445
+ attrs: Record<string, string>;
1446
+ children: NativeXmlRawNode[];
1447
+ }
1448
+ /** Check whether Spana's native Rust accelerator (`libspana_native`) is loaded and active. */
1449
+ declare function isNativeAcceleratorActive(): boolean;
1450
+ /** Return the loaded native Rust library path, or `null` when running in pure-JS fallback mode. */
1451
+ declare function getNativeAcceleratorPath(): string | null;
1452
+ /** Accelerated Rust PNG diff (returns `null` if unavailable so caller falls back cleanly to JS). */
1453
+ declare function comparePngNative(expected: Buffer | Uint8Array, actual: Buffer | Uint8Array, threshold: number, maxDiffRatio: number, layoutTolerant: boolean): NativePngCompareResult | null;
1454
+ /** Accelerated Rust XML hierarchy tokenizer (returns `null` if unavailable so caller falls back to JS). */
1455
+ declare function tokenizeXmlNative(xml: string, wrapperTag: string): NativeXmlRawNode[] | null;
1456
+
1457
+ interface PlaybackFrame {
1458
+ /** Milliseconds elapsed since flow start. */
1459
+ timestampMs: number;
1460
+ /** Base64-encoded image bytes (no `data:` prefix). */
1461
+ dataBase64: string;
1462
+ mimeType: "image/jpeg" | "image/png";
1463
+ }
1464
+ interface PlaybackStepMarker {
1465
+ index: number;
1466
+ command: string;
1467
+ selector?: unknown;
1468
+ /** Relative ms since flow start when this step started. */
1469
+ startedAtMs: number;
1470
+ durationMs: number;
1471
+ status: "passed" | "failed";
1472
+ error?: string;
1473
+ /** Optional viewport pixel coordinate tapped during this step (for click-ripple overlay). */
1474
+ tapPoint?: {
1475
+ x: number;
1476
+ y: number;
1477
+ };
1478
+ }
1479
+ interface FlowPlaybackTrace {
1480
+ version: 1;
1481
+ flowName: string;
1482
+ platform: string;
1483
+ startedAtIso: string;
1484
+ durationMs: number;
1485
+ viewport?: {
1486
+ width: number;
1487
+ height: number;
1488
+ };
1489
+ frames: PlaybackFrame[];
1490
+ steps: PlaybackStepMarker[];
1491
+ videoPath?: string;
1492
+ }
1493
+ interface StopRecordingOptions {
1494
+ keep: boolean;
1495
+ outputDir: string;
1496
+ fileStem: string;
1497
+ steps?: PlaybackStepMarker[];
1498
+ viewport?: {
1499
+ width: number;
1500
+ height: number;
1501
+ };
1502
+ }
1503
+ interface StopRecordingResult {
1504
+ playbackJsonPath?: string;
1505
+ videoPath?: string;
1506
+ frameCount: number;
1507
+ }
1508
+ interface VideoRecorderHandle {
1509
+ stop(opts: StopRecordingOptions): Promise<StopRecordingResult>;
1510
+ }
1511
+ interface CdpScreencastLike {
1512
+ sendCommand<T = any>(method: string, params?: Record<string, unknown>, sessionId?: string | null): Promise<T>;
1513
+ onEvent(method: string, listener: (params: any, sessionId?: string) => void): () => void;
1514
+ }
1515
+ interface CdpScreencastRecorderOptions {
1516
+ flowName: string;
1517
+ platform: string;
1518
+ /** Max captured JPEG frames per flow (ring-bounded). Default: 180. */
1519
+ maxFrames?: number;
1520
+ /** JPEG quality 1–100. Default: 65 (fast & compact). */
1521
+ quality?: number;
1522
+ maxWidth?: number;
1523
+ maxHeight?: number;
1524
+ everyNthFrame?: number;
1525
+ /** Attempt to mux captured JPEG frames into an `.mp4` via `ffmpeg` if available on PATH. Default: true. */
1526
+ exportMp4?: boolean;
1527
+ spawnFn?: typeof spawn;
1528
+ }
1529
+ /**
1530
+ * Best-effort mux of captured JPEG frames into an H.264 `.mp4` via `ffmpeg`.
1531
+ * Returns the written `outputPath` on success, or `undefined` if `ffmpeg` isn't available.
1532
+ */
1533
+ declare function exportFramesToMp4(frames: PlaybackFrame[], outputPath: string, spawnFn?: typeof spawn): Promise<string | undefined>;
1534
+ /**
1535
+ * Start asynchronous Chromium CDP screencast recording (`Page.startScreencast`).
1536
+ * Captures lightweight JPEG frames directly from Chromium's compositor with minimal
1537
+ * test overhead, writes a self-contained `*-playback.json` trace for `report.html`,
1538
+ * and optionally exports an `.mp4` video if `ffmpeg` is available.
1539
+ */
1540
+ declare function startCdpScreencastRecorder(cdp: CdpScreencastLike, options: CdpScreencastRecorderOptions): Promise<VideoRecorderHandle>;
1541
+ /**
1542
+ * Start native Android screen recording via `adb shell screenrecord`.
1543
+ * Automatically pulls the `.mp4` on stop when `keep: true` and cleans up the device file.
1544
+ */
1545
+ declare function startAndroidVideoRecorder(serial: string, options: {
1546
+ outputPath: string;
1547
+ spawnFn?: typeof spawn;
1548
+ execFileSyncFn?: typeof execFileSync;
1549
+ }): VideoRecorderHandle;
1550
+ /**
1551
+ * Start native iOS Simulator H.264 video recording via `xcrun simctl io <udid> recordVideo`.
1552
+ */
1553
+ declare function startIosSimulatorVideoRecorder(udid: string, options: {
1554
+ outputPath: string;
1555
+ spawnFn?: typeof spawn;
1556
+ }): VideoRecorderHandle;
1557
+ /**
1558
+ * Fallback playback trace builder from step screenshots (`artifacts.captureSteps: true`).
1559
+ * Guarantees interactive step-by-step playback works on EVERY target (Web, Playwright,
1560
+ * Android, iOS, Electron, Electrobun) even without CDP screencast or ffmpeg.
1561
+ */
1562
+ declare function buildPlaybackTraceFromSteps(input: {
1563
+ flowName: string;
1564
+ platform: string;
1565
+ durationMs: number;
1566
+ steps: StepResult[];
1567
+ viewport?: {
1568
+ width: number;
1569
+ height: number;
1570
+ };
1571
+ videoPath?: string;
1572
+ }): FlowPlaybackTrace | null;
1573
+
1574
+ declare const DEFAULT_MAX_WORKERS_PER_PROCESS = 8;
1575
+ interface ProcessPartitionPlan {
1576
+ totalWorkers: number;
1577
+ maxWorkersPerProcess: number;
1578
+ processCount: number;
1579
+ workersPerProcess: number[];
1580
+ }
1581
+ /**
1582
+ * Plan how to split `totalWorkers` across OS processes.
1583
+ * - Up to `maxWorkersPerProcess` (default 8): 1 single in-process Bun event loop (zero IPC overhead).
1584
+ * - Above `maxWorkersPerProcess` (e.g. 16 or 32 workers on large CI boxes): evenly divides
1585
+ * workers across `Math.ceil(totalWorkers / maxWorkersPerProcess)` OS processes so each
1586
+ * process gets its own JS heap, GC, and event loop.
1587
+ */
1588
+ declare function planProcessPool(totalWorkers: number, maxWorkersPerProcess?: number): ProcessPartitionPlan;
1589
+ /**
1590
+ * Partition flows across `processCount` buckets using Longest-Processing-Time-First (LPT)
1591
+ * bin packing when `durationHintsMs` are available so every child process finishes together.
1592
+ */
1593
+ declare function partitionFlowsAcrossProcesses<T>(items: T[], processCount: number, options?: {
1594
+ durationHintsMs?: Record<string, number>;
1595
+ getName?: (item: T) => string;
1596
+ }): T[][];
1597
+ interface ProcessShardCommand {
1598
+ command: string;
1599
+ args: string[];
1600
+ env?: Record<string, string>;
1601
+ reportJsonPath: string;
1602
+ }
1603
+ interface ProcessShardOutcome {
1604
+ shardIndex: number;
1605
+ workerCount: number;
1606
+ exitCode: number | null;
1607
+ durationMs: number;
1608
+ results: TestResult[];
1609
+ error?: string;
1610
+ }
1611
+ interface MultiProcessPoolOptions {
1612
+ totalWorkers: number;
1613
+ maxWorkersPerProcess?: number;
1614
+ buildShardCommand: (shardIndex: number, shardTotal: number, workerCount: number) => ProcessShardCommand;
1615
+ spawnFn?: typeof spawn;
1616
+ readReportFn?: (reportJsonPath: string) => TestResult[];
1617
+ cleanupReportFiles?: boolean;
1618
+ }
1619
+ interface MultiProcessPoolResult {
1620
+ results: TestResult[];
1621
+ totalDurationMs: number;
1622
+ passed: number;
1623
+ failed: number;
1624
+ skipped: number;
1625
+ flaky: number;
1626
+ processCount: number;
1627
+ processResults: ProcessShardOutcome[];
1628
+ }
1629
+ /**
1630
+ * Execute a high-concurrency suite (16–32+ workers) across multiple OS worker processes,
1631
+ * each running up to `maxWorkersPerProcess` in-process workers with its own JS heap & event loop.
1632
+ */
1633
+ declare function runMultiProcessPool(options: MultiProcessPoolOptions): Promise<MultiProcessPoolResult>;
1634
+
1220
1635
  /** MCP Tool definition advertised by `tools/list`. */
1221
1636
  interface McpToolDefinition {
1222
1637
  name: string;
@@ -1288,4 +1703,4 @@ declare class SpanaMcpServer {
1288
1703
  runStdio(): Promise<void>;
1289
1704
  }
1290
1705
 
1291
- export { type AgentActExecutor, AndroidWebViewCdpChannel, type AndroidWebViewCdpOptions, AppConfig, AppleWebInspectorClient, type AppliedFilterReport, type ApplyFiltersResult, type Attachment, BrowserConsoleLog, BrowserJSError, BrowserMockResponse, BrowserName, BrowserRouteMatcher, type CacheWriteStatus, CdpDomChannel, type CdpDomChannelOptions, type ChangedFile, type CloudProvider, type CloudProviderHelper, type CreateFixturesOptions, type DecisionBatchJudge, type DecisionBatchJudgeResult, type DecisionFilterOptions, type DecisionModelJudge, DomChannel, DomClearStorageOptions, DomElementMatch, DomIdleOptions, DomStorageEntries, DomTargetInfo, DomWaitForSelectorOptions, ElectrobunAppConfig, type ElectrobunDriverOptions, type ElectrobunLaunchPlan, ElectrobunRenderer, type ElectronDriverOptions, Element, type ExtendedFlowConfig, ExtendedSelector, type FailureCategory, type FilterCandidate, type FilterContext, type FilterDecisionOutput, type FilterUsage, type FixtureDefinition, type FixtureFn, type FixtureMap, FlowConfig, FlowContext, FlowDefinition, type FlowError, type FlowResult, type GitChanges, type GitHubPrReporterOptions, type HostOS, type JsonRpcRequest, type JsonRpcResponse, type LightweightCdpDriverOptions, type LogprobDecisionJudgeOptions, type McpContentBlock, type McpToolDefinition, type McpToolResult, type NamedSetupDefinition, type OllamaDecisionJudgeOptions, type PathRule, type PathRuleFilterOptions, Platform, type PrelaunchedWebBrowser, PromiseApp, ProvConfig, type RecordedAction, type ReplayCacheEntry, type ReplayCacheMode, ReplayCacheStore, type ReplayCacheSummary, ReplaySession, type ReplaySessionOptions, type ReplayStepOutcome, type Reporter, type ResolvedElementResult, type RunSummary, SPANA_MCP_TOOLS, type ScenarioStepResult, Selector, SpanaBridgeChannel, type SpanaBridgeServerOptions, SpanaMcpServer, type SpanaMcpServerOptions, type StepResult, TARGET_CHANNEL_MATRIX, TapMode, type TargetChannel, type TargetDescriptor, type TargetEngine, type TargetShell, type TestFilter, type WarmDaemonRecord, type WebInspectorListingPage, WebKitInspectorChannel, type WebKitInspectorOptions, applyNamedSetup, applyTestFilters, buildFilterCandidates, buildFlowFileFromLines, buildReplayCacheKey, collectGitChanges, connectPlaywrightOverCDP, createAndroidWebViewCdpChannel, createCdpDomChannel, createCompositeDomChannel, createFlowWithFixtures, createGitHubPrReporter, createLogprobDecisionJudge, createOllamaDecisionJudge, createSpanaBridgeChannel, createWebKitInspectorChannel, decisionFilter, decodeWebInspectorFrames, defineSetup, domRectToScreenBounds, encodeWebInspectorPacket, ensureWarmBrowserDaemon, extractDestructuredParamNames, findSimulatorWebInspectorSocket, findWebViewFrame, formatFilterSummary, formatGitHubPrMarkdown, formatSelectorCode, formatTargetMatrixTable, getHealthyWarmDaemon, invalidateWebViewFrameCache, isOffscreenInViewport, launchPlaywrightBrowser, listWarmDaemons, makeElectrobunDriver, makeElectronDriver, makeLightweightCdpDriver, orderFlowsLongestFirst, parseAndroidWebViewSockets, parseWebInspectorXmlFrame, pathRuleFilter, probabilityFromTopLogprobs, replayRecordedAction, resolveElectrobunEngine, resolveElectrobunLaunchPlan, resolveElementAcrossChannels, resolveTargetDescriptor, speculativelyPrelaunchWebBrowser, stopAllWarmDaemons, stopWarmDaemon, updateWarmDaemonSession };
1706
+ export { type AgentActExecutor, AndroidWebViewCdpChannel, type AndroidWebViewCdpOptions, type ApiClient, type ApiClientOptions, type ApiRequestOptions, type ApiResponse, AppConfig, AppleWebInspectorClient, type AppliedFilterReport, type ApplyFiltersResult, type Attachment, BrowserConsoleLog, BrowserJSError, BrowserMockResponse, BrowserName, BrowserRouteMatcher, type CacheWriteStatus, type CachedPersonaState, type CdpChildSessionInfo, CdpDomChannel, type CdpDomChannelOptions, type CdpFrameOffsetResolver, type CdpScreencastLike, type CdpScreencastRecorderOptions, type ChangedFile, type CloudProvider, type CloudProviderHelper, type CreateFixturesOptions, DEFAULT_MAX_WORKERS_PER_PROCESS, type DecisionBatchJudge, type DecisionBatchJudgeResult, type DecisionFilterOptions, type DecisionModelJudge, type DeterministicImpactFilterOptions, type DirectCdpBrowserHandle, type DirectCdpBrowserLaunchOptions, DomChannel, DomClearStorageOptions, DomElementMatch, DomFillOptions, DomIdleOptions, DomStorageEntries, DomTargetInfo, DomWaitForHiddenOptions, DomWaitForMatchOptions, DomWaitForMatchResult, DomWaitForSelectorOptions, ElectrobunAppConfig, type ElectrobunDriverOptions, type ElectrobunLaunchPlan, ElectrobunRenderer, type ElectronDriverOptions, Element, type ExtendedFlowConfig, ExtendedSelector, type FailureCategory, type FilterCandidate, type FilterContext, type FilterDecisionOutput, type FilterUsage, type FixtureDefinition, type FixtureFn, type FixtureMap, FlowConfig, FlowContext, FlowDefinition, type FlowError, type FlowPlaybackTrace, type FlowResult, type GitChanges, type GitHubPrReporterOptions, type HostOS, type JsonRpcRequest, type JsonRpcResponse, type LightweightCdpDriverOptions, type LogprobDecisionJudgeOptions, type McpContentBlock, type McpToolDefinition, type McpToolResult, type MultiProcessPoolOptions, type MultiProcessPoolResult, type NamedSetupDefinition, type NativePngCompareResult, type NativeXmlRawNode, type OllamaDecisionJudgeOptions, type PathRule, type PathRuleFilterOptions, PersonaAuthCache, type PersonaDefinition, Platform, type PlaybackFrame, type PlaybackStepMarker, type PrelaunchedWebBrowser, type ProcessPartitionPlan, type ProcessShardCommand, type ProcessShardOutcome, PromiseApp, ProvConfig, type RecordedAction, type ReplayCacheEntry, type ReplayCacheMode, ReplayCacheStore, type ReplayCacheSummary, ReplaySession, type ReplaySessionOptions, type ReplayStepOutcome, type Reporter, type ResolvedElementResult, type RunSummary, SPANA_MCP_TOOLS, type ScenarioStepResult, Selector, SpanaBridgeChannel, type SpanaBridgeServerOptions, SpanaMcpServer, type SpanaMcpServerOptions, type StepResult, type StopRecordingOptions, type StopRecordingResult, TARGET_CHANNEL_MATRIX, TapMode, type TargetChannel, type TargetDescriptor, type TargetEngine, type TargetShell, type TestFilter, type VideoRecorderHandle, VirtualAuthenticatorOptions, type WarmDaemonRecord, type WebInspectorListingPage, WebKitInspectorChannel, type WebKitInspectorOptions, applyNamedSetup, applyTestFilters, buildFilterCandidates, buildFlowFileFromLines, buildPlaybackTraceFromSteps, buildReplayCacheKey, collectGitChanges, comparePngNative, connectPlaywrightOverCDP, connectPlaywrightOverWS, createAndroidWebViewCdpChannel, createApiClient, createApiFixture, createCdpDomChannel, createCompositeDomChannel, createFlowWithFixtures, createGitHubPrReporter, createLogprobDecisionJudge, createOllamaDecisionJudge, createSpanaBridgeChannel, createWebKitInspectorChannel, decisionFilter, decodeWebInspectorFrames, definePersona, defineSetup, deterministicImpactFilter, domRectToScreenBounds, encodeWebInspectorPacket, ensureWarmBrowserDaemon, exportFramesToMp4, extractDestructuredParamNames, findSimulatorWebInspectorSocket, findWebViewFrame, formatFilterSummary, formatGitHubPrMarkdown, formatSelectorCode, formatTargetMatrixTable, getHealthyWarmDaemon, getNativeAcceleratorPath, invalidateWebViewFrameCache, isNativeAcceleratorActive, isOffscreenInViewport, launchDirectCdpBrowser, launchPlaywrightBrowser, listWarmDaemons, makeElectrobunDriver, makeElectronDriver, makeLightweightCdpDriver, orderFlowsLongestFirst, parseAndroidWebViewSockets, parseWebInspectorXmlFrame, partitionFlowsAcrossProcesses, pathRuleFilter, planProcessPool, probabilityFromTopLogprobs, replayRecordedAction, resolveElectrobunEngine, resolveElectrobunLaunchPlan, resolveElementAcrossChannels, resolveTargetDescriptor, resolveWebEngine, runMultiProcessPool, speculativelyPrelaunchWebBrowser, startAndroidVideoRecorder, startCdpScreencastRecorder, startIosSimulatorVideoRecorder, stopAllWarmDaemons, stopWarmDaemon, tokenizeXmlNative, updateWarmDaemonSession };