/**
 * Identifies which test produced a given scan. Attached to each emitted
 * result and forwarded to the server.
 *
 * Populated by `Controller.setTestContext()` (Playwright Test, WDIO
 * runner) or by `setGlobalTestContext()` (vanilla-Playwright and
 * vanilla-WDIO fallback). Cypress dispatches scan events directly from
 * the browser context and bypasses both.
 *
 * Canonical definition; `extension/src/types.d.ts` holds a structural
 * copy since the extension bundle can't import this file. Drift is
 * guarded by an assignability test in `testContext.test.ts`.
 */
export interface TestContext {
    test_file_path: string | null;
    test_location: string[] | null;
}
/**
 * Strip the user's home directory from a test-file path so usernames
 * don't leak. Backslashes are normalized to `/` so a Windows path still
 * works when processed on a POSIX runner.
 */
export declare function toRelativeTestFile(testFile: string | null | undefined): string | null;
/** A valid location is a non-empty array of strings; anything else → `null`. */
export declare function isValidTestLocation(loc: unknown): loc is string[];
/**
 * Single gate for turning raw caller input into a storage-safe `TestContext`.
 */
export declare function normalizeTestContext(ctx: TestContext | null | undefined): TestContext | null;
/**
 * Called by the vanilla-driver setup files at each test's start/end.
 * Framework-aware adapters (Playwright Test, WDIO runner) bypass this
 * and call `Controller.setTestContext()` directly.
 */
export declare function setGlobalTestContext(ctx: TestContext | null): void;
/** Fallback read by `Controller` when no per-instance context was set. */
export declare function getGlobalTestContext(): TestContext | null;
