/** * @file * * Factory for creating transport instances from {@link ObsidianTransportOptions}. */ import type { ObsidianTransportOptions } from './transport-options.cjs'; import type { ObsidianTransport } from './transport.cjs'; /** * Creates a new transport instance from the given options. * * @param options - Transport configuration. Defaults to an owned desktop CDP transport. * @returns A new transport instance. */ export declare function createTransportFromOptions(options?: ObsidianTransportOptions): Promise; /** * Returns a cached transport instance, creating one from the given options * if not already cached. * * The transport is cached per worker process so WebSocket/Appium sessions * are reused across calls within the same test worker. * * This is the single entry point every worker-side caller uses for the **ambient** * transport, so it is also where a failed global setup is turned into a failing test. * A failed setup publishes no transport options, and `undefined` options mean the owned * **desktop** CDP default — so without this guard an Android project's suite would run * on desktop and then die on an unrelated CDP error, hiding the real cause (**L9**). * The setup path itself is unaffected: `coreSetup` builds its transport through * {@link createTransportFromOptions} with explicit options. * * @param options - Transport configuration. Defaults to an owned desktop CDP transport. * @returns The cached or newly created transport. * @throws {IntegrationSetupFailedError} When this project's global setup failed. */ export declare function getOrCreateTransport(options?: ObsidianTransportOptions): Promise; /** * Stops every emulator this harness started whose run can no longer stop it * itself, verifying each stop. * * For the global teardown of a Vitest project whose transport lives in its test * workers rather than in a transport global setup: the worker auto-starts the * emulator, Vitest ends the worker without a teardown, and only the main * process's teardown gets a turn — holding no handle to the emulator, but able * to find it by its marker (`emulator-marker.ts`). * * Call it while holding the `android` setup lock (L7): that is what guarantees * no other Android run is using a marked emulator. Emulators without a marker are * never touched. */ export declare function stopHarnessStartedEmulators(): Promise;