import { z } from "zod"; import pc from "picocolors"; import { AUTH_STATE_HOOK_CONTAINER_STORAGE_STATE_PATH, AUTH_STATE_HOOK_JSON_ENV, AUTH_STATE_HOOK_STORAGE_STATE_FILENAME, AUTH_STATE_HOOK_STORAGE_STATE_PATH_ENV, AUTH_STATE_HOOK_WORKSPACE_DIR, AccessibilityViolation, Action, ActionPlanCache, Direction, DocumentScrollOffsets, HookDefinition, HookDefinition as HookDefinition$1, HookResult, HookRuntime, IOSDeviceType, InterimNode, Planner, PlatformAdapter, PlatformConfig, RUNTIME_IMAGE_MAP, RefBinding, RemoteBrowserConfig, RemoteBrowserProtocol, RemoteDeviceConfig, RemoteFailureKind, RemoteLease, RemoteLeaseSource, RemotePluginBrowserConfig, RemotePluginDeviceConfig, RemoteProgress, RemoteProtocol, RemoteRefusalError, RemoteRefusalMemory, RemoteSessionRegistry, RuntimeAuthStateConfig, SandboxRunnerOptions, ScreenshotCompressor, SecretRedactor, SecretResolver, SecretStore, StorageStatePort, SwipeSignal, TestResult, Verifier, WorkingMemoryPort, buildAuthStateHookEnv, hookRunnerImage, isReservedAuthStateHookEnvKey, parseEnvFile, serializeEnvFile, stripReservedAuthStateHookEnv } from "@vostride/agent-qa-runner"; import { CST, Document } from "yaml"; import { RemoteEntryLike, TestEditPatchSet } from "@vostride/agent-qa-schema"; import { CheckResult, PLUGIN_ENVIRONMENT_NAMES, PLUGIN_WINDOWS_ENVIRONMENT_NAMES, PluginManifest, pluginEnvironment } from "@vostride/agent-qa-plugin-kit/protocol"; import { LanguageModel } from "ai"; import "ajv/dist/2020.js"; export declare const CaptureConfigSchema: z.ZodObject<{ variable: z.ZodString; method: z.ZodEnum<{ ai: "ai"; regex: "regex"; selector: "selector"; }>; pattern: z.ZodOptional; selector: z.ZodOptional; description: z.ZodOptional; }, z.core.$strict>; export declare const TestStepSchema: z.ZodUnion>>; capture: z.ZodOptional; pattern: z.ZodOptional; selector: z.ZodOptional; description: z.ZodOptional; }, z.core.$strict>>; }, z.core.$strict>]>; export declare const TestMetaSchema: z.ZodObject<{ timeout: z.ZodOptional>>; retries: z.ZodOptional; record: z.ZodOptional; }, z.core.$strict>; export declare const TestDefinitionSchema: z.ZodObject<{ 'test-id': z.ZodString; name: z.ZodString; target: z.ZodString; context: z.ZodOptional; use: z.ZodOptional>; headless: z.ZodOptional; viewport: z.ZodOptional; height: z.ZodOptional; }, z.core.$strict>>; remote: z.ZodOptional; }, z.core.$strict>>; timeout: z.ZodOptional>>; test: z.ZodOptional>>; navigation: z.ZodOptional>>; }, z.core.$strict>>; planner: z.ZodOptional; maxPlanningTurns: z.ZodOptional; previousStepCount: z.ZodOptional; }, z.core.$strict>>; logCapture: z.ZodOptional; network: z.ZodOptional; }, z.core.$strict>>; cache: z.ZodOptional; authState: z.ZodOptional; capture: z.ZodOptional; }, z.core.$strict>]>>; mobile: z.ZodOptional>; }, z.core.$strict>>; llm: z.ZodOptional; parallel: z.ZodOptional; workers: z.ZodOptional; device: z.ZodOptional; }, z.core.$strict>>>; meta: z.ZodOptional>>; retries: z.ZodOptional; record: z.ZodOptional; }, z.core.$strict>>; setup: z.ZodOptional>; teardown: z.ZodOptional>; steps: z.ZodArray>>; capture: z.ZodOptional; pattern: z.ZodOptional; selector: z.ZodOptional; description: z.ZodOptional; }, z.core.$strict>>; }, z.core.$strict>]>>>; }, z.core.$strict>; export declare const MobileAppStateSchema: z.ZodEnum<{ preserve: "preserve"; reset: "reset"; }>; export declare const MobileUseSchema: z.ZodObject<{ appState: z.ZodEnum<{ preserve: "preserve"; reset: "reset"; }>; }, z.core.$strict>; export declare const MobileUseOverrideSchema: z.ZodObject<{ appState: z.ZodOptional>; }, z.core.$strict>; export declare const AuthStateUseSchema: z.ZodUnion; capture: z.ZodOptional; }, z.core.$strict>]>; interface NormalizedAuthStateUse { name: string; load: boolean; capture: boolean; } export declare function normalizeAuthStateUse(use: { authState?: unknown; } | undefined): NormalizedAuthStateUse | undefined; export declare const UseSchema: z.ZodObject<{ browser: z.ZodOptional; headless: z.ZodBoolean; viewport: z.ZodOptional>; remote: z.ZodOptional; }, z.core.$strict>>; mobile: z.ZodOptional; }, z.core.$strict>>; timeout: z.ZodOptional>; test: z.ZodPipe>; navigation: z.ZodPipe>; }, z.core.$strict>>; planner: z.ZodOptional; maxPlanningTurns: z.ZodOptional; previousStepCount: z.ZodNumber; }, z.core.$strict>>; logCapture: z.ZodOptional>; cache: z.ZodOptional; llm: z.ZodOptional; buildTag: z.ZodOptional; parallel: z.ZodOptional; workers: z.ZodOptional; }, z.core.$strict>; declare const UseOverrideSchema: z.ZodObject<{ browser: z.ZodOptional>; headless: z.ZodOptional; viewport: z.ZodOptional; height: z.ZodOptional; }, z.core.$strict>>; remote: z.ZodOptional; }, z.core.$strict>>; timeout: z.ZodOptional>>; test: z.ZodOptional>>; navigation: z.ZodOptional>>; }, z.core.$strict>>; planner: z.ZodOptional; maxPlanningTurns: z.ZodOptional; previousStepCount: z.ZodOptional; }, z.core.$strict>>; logCapture: z.ZodOptional; network: z.ZodOptional; }, z.core.$strict>>; cache: z.ZodOptional; authState: z.ZodOptional; capture: z.ZodOptional; }, z.core.$strict>]>>; mobile: z.ZodOptional>; }, z.core.$strict>>; llm: z.ZodOptional; parallel: z.ZodOptional; workers: z.ZodOptional; device: z.ZodOptional; }, z.core.$strict>; type TestStep = z.infer; type TestMeta = z.infer; type TestConfig = z.infer; type TestDefinition = z.infer; type CaptureConfig = z.infer; export declare const WorkspaceSchema: z.ZodObject<{ testMatch: z.ZodArray; suiteMatch: z.ZodArray; testPathIgnore: z.ZodOptional>; hooksFile: z.ZodString; envFile: z.ZodString; secretsFile: z.ZodString; }, z.core.$strict>; export declare const DashboardConfigSchema: z.ZodObject<{ port: z.ZodOptional; dbPath: z.ZodOptional; artifactsDir: z.ZodOptional; baseUrl: z.ZodOptional; workspace: z.ZodOptional; host: z.ZodOptional; }, z.core.$strict>; /** * The one member set for "this host is loopback", used by the dashboard's pre-listen bind guard in * `startServer`, which refuses a non-loopback dashboard host at runtime with no exemption. */ export declare const LOOPBACK_HOSTS: readonly string[]; /** Whether a configured host names a loopback interface. The one predicate over the one set. */ export declare function isLoopbackHost(host: string): boolean; export declare const McpConfigSchema: z.ZodObject<{ enabled: z.ZodOptional; port: z.ZodOptional; }, z.core.$strict>; export declare const CacheConfigSchema: z.ZodObject<{ dir: z.ZodString; }, z.core.$strict>; export declare const AuthStateConfigSchema: z.ZodObject<{ dir: z.ZodString; }, z.core.$strict>; export declare const LoggingConfigSchema: z.ZodObject<{ level: z.ZodEnum<{ debug: "debug"; error: "error"; info: "info"; silent: "silent"; warn: "warn"; }>; }, z.core.$strict>; export declare const RecordingConfigSchema: z.ZodObject<{ enabled: z.ZodDefault; keepFailuresOnly: z.ZodOptional; }, z.core.$strict>; export declare const AccessibilityConfigSchema: z.ZodObject<{ enabled: z.ZodBoolean; standard: z.ZodOptional>; runAfter: z.ZodOptional>; failOnViolation: z.ZodOptional; disableRules: z.ZodOptional>; exclude: z.ZodOptional>; }, z.core.$strict>; export declare const ServicesSchema: z.ZodObject<{ dashboard: z.ZodOptional; dbPath: z.ZodOptional; artifactsDir: z.ZodOptional; baseUrl: z.ZodOptional; workspace: z.ZodOptional; host: z.ZodOptional; }, z.core.$strict>>; mcp: z.ZodOptional; port: z.ZodOptional; }, z.core.$strict>>; cache: z.ZodOptional>; authState: z.ZodOptional>; logging: z.ZodOptional; }, z.core.$strict>>; recording: z.ZodOptional; keepFailuresOnly: z.ZodOptional; }, z.core.$strict>>>; accessibility: z.ZodOptional>; runAfter: z.ZodOptional>; failOnViolation: z.ZodOptional; disableRules: z.ZodOptional>; exclude: z.ZodOptional>; }, z.core.$strict>>; vision: z.ZodOptional>>; effectiveResolution: z.ZodOptional; }, z.core.$strict>>; }, z.core.$strict>; export declare const KnowledgeConfigSchema: z.ZodObject<{ dir: z.ZodDefault; }, z.core.$strict>; export declare const TargetSchema: z.ZodObject<{ product: z.ZodOptional; platform: z.ZodEnum<{ android: "android"; ios: "ios"; web: "web"; }>; bundleId: z.ZodOptional; appPackage: z.ZodOptional; appActivity: z.ZodOptional; app: z.ZodOptional; ref: z.ZodOptional; }, z.core.$strict>>; device: z.ZodOptional; url: z.ZodOptional; environment: z.ZodOptional>; }, z.core.$strict>; export declare const DeviceProfileSchema: z.ZodObject<{ platform: z.ZodEnum<{ android: "android"; ios: "ios"; }>; model: z.ZodOptional; os: z.ZodOptional; id: z.ZodOptional; remote: z.ZodOptional; capabilities: z.ZodOptional>; }, z.core.$strict>; export declare const RegistrySchema: z.ZodObject<{ llms: z.ZodDefault; providerHeaders: z.ZodOptional>; vision: z.ZodDefault; name: z.ZodString; contextWindow: z.ZodOptional>>; }, z.core.$strict>>>>; remotes: z.ZodDefault; url: z.ZodString; query: z.ZodOptional]>>>; headers: z.ZodOptional>; basicAuth: z.ZodOptional>; connectTimeout: z.ZodOptional>>; context: z.ZodOptional>; capabilities: z.ZodOptional>; }, z.core.$strict>, z.ZodObject<{ name: z.ZodString; plugin: z.ZodString; settings: z.ZodOptional>; connectTimeout: z.ZodOptional>>; uploadTimeout: z.ZodOptional>>; context: z.ZodOptional>; capabilities: z.ZodOptional>; }, z.core.$strict>]>>>>; targets: z.ZodOptional; platform: z.ZodEnum<{ android: "android"; ios: "ios"; web: "web"; }>; bundleId: z.ZodOptional; appPackage: z.ZodOptional; appActivity: z.ZodOptional; app: z.ZodOptional; ref: z.ZodOptional; }, z.core.$strict>>; device: z.ZodOptional; url: z.ZodOptional; environment: z.ZodOptional>; }, z.core.$strict>>>; devices: z.ZodOptional; model: z.ZodOptional; os: z.ZodOptional; id: z.ZodOptional; remote: z.ZodOptional; capabilities: z.ZodOptional>; }, z.core.$strict>>>; }, z.core.$strict>; export declare const AnalyticsSchema: z.ZodObject<{ privacy: z.ZodOptional>; passRateScope: z.ZodOptional]>>>; }, z.core.$strict>>; }, z.core.$strict>; export declare const DurationString: z.ZodPipe>; export declare const SizeString: z.ZodPipe>; export declare const ModelConfigSchema: z.ZodObject<{ provider: z.ZodString; model: z.ZodString; baseURL: z.ZodOptional; providerHeaders: z.ZodOptional>; vision: z.ZodDefault; }, z.core.$strict>; export declare const NameSlugSchema: z.ZodString; export declare const NamedLLMConfigSchema: z.ZodObject<{ provider: z.ZodString; model: z.ZodString; baseURL: z.ZodOptional; providerHeaders: z.ZodOptional>; vision: z.ZodDefault; name: z.ZodString; contextWindow: z.ZodOptional>>; }, z.core.$strict>; export declare const TimeoutConfigSchema: z.ZodObject<{ step: z.ZodPipe>; test: z.ZodPipe>; navigation: z.ZodPipe>; }, z.core.$strict>; export declare const BrowserConfigSchema: z.ZodObject<{ name: z.ZodEnum<{ chromium: "chromium"; firefox: "firefox"; webkit: "webkit"; }>; headless: z.ZodBoolean; viewport: z.ZodOptional>; remote: z.ZodOptional; }, z.core.$strict>; export declare const PlannerConfigSchema: z.ZodObject<{ maxActions: z.ZodOptional; maxPlanningTurns: z.ZodOptional; previousStepCount: z.ZodNumber; }, z.core.$strict>; export declare const LogCaptureConfigSchema: z.ZodObject<{ console: z.ZodBoolean; network: z.ZodBoolean; }, z.core.$strict>; export declare const PluginEntrySchema: z.ZodUnion>; }, z.core.$strict>, z.ZodObject<{ name: z.ZodString; path: z.ZodString; options: z.ZodOptional>; }, z.core.$strict>]>; type PluginEntry = z.infer; export declare const PluginsSchema: z.ZodArray>; }, z.core.$strict>, z.ZodObject<{ name: z.ZodString; path: z.ZodString; options: z.ZodOptional>; }, z.core.$strict>]>>; export declare const AgentQaConfigSchema: z.ZodPipe, z.ZodObject<{ workspace: z.ZodObject<{ testMatch: z.ZodArray; suiteMatch: z.ZodArray; testPathIgnore: z.ZodOptional>; hooksFile: z.ZodString; envFile: z.ZodString; secretsFile: z.ZodString; }, z.core.$strict>; services: z.ZodOptional; dbPath: z.ZodOptional; artifactsDir: z.ZodOptional; baseUrl: z.ZodOptional; workspace: z.ZodOptional; host: z.ZodOptional; }, z.core.$strict>>; mcp: z.ZodOptional; port: z.ZodOptional; }, z.core.$strict>>; cache: z.ZodOptional>; authState: z.ZodOptional>; logging: z.ZodOptional; }, z.core.$strict>>; recording: z.ZodOptional; keepFailuresOnly: z.ZodOptional; }, z.core.$strict>>>; accessibility: z.ZodOptional>; runAfter: z.ZodOptional>; failOnViolation: z.ZodOptional; disableRules: z.ZodOptional>; exclude: z.ZodOptional>; }, z.core.$strict>>; vision: z.ZodOptional>>; effectiveResolution: z.ZodOptional; }, z.core.$strict>>; }, z.core.$strict>>>; knowledge: z.ZodPrefault; }, z.core.$strict>>; registry: z.ZodOptional; providerHeaders: z.ZodOptional>; vision: z.ZodDefault; name: z.ZodString; contextWindow: z.ZodOptional>>; }, z.core.$strict>>>>; remotes: z.ZodDefault; url: z.ZodString; query: z.ZodOptional]>>>; headers: z.ZodOptional>; basicAuth: z.ZodOptional>; connectTimeout: z.ZodOptional>>; context: z.ZodOptional>; capabilities: z.ZodOptional>; }, z.core.$strict>, z.ZodObject<{ name: z.ZodString; plugin: z.ZodString; settings: z.ZodOptional>; connectTimeout: z.ZodOptional>>; uploadTimeout: z.ZodOptional>>; context: z.ZodOptional>; capabilities: z.ZodOptional>; }, z.core.$strict>]>>>>; targets: z.ZodOptional; platform: z.ZodEnum<{ android: "android"; ios: "ios"; web: "web"; }>; bundleId: z.ZodOptional; appPackage: z.ZodOptional; appActivity: z.ZodOptional; app: z.ZodOptional; ref: z.ZodOptional; }, z.core.$strict>>; device: z.ZodOptional; url: z.ZodOptional; environment: z.ZodOptional>; }, z.core.$strict>>>; devices: z.ZodOptional; model: z.ZodOptional; os: z.ZodOptional; id: z.ZodOptional; remote: z.ZodOptional; capabilities: z.ZodOptional>; }, z.core.$strict>>>; }, z.core.$strict>>; use: z.ZodOptional; headless: z.ZodBoolean; viewport: z.ZodOptional>; remote: z.ZodOptional; }, z.core.$strict>>; mobile: z.ZodOptional; }, z.core.$strict>>; timeout: z.ZodOptional>; test: z.ZodPipe>; navigation: z.ZodPipe>; }, z.core.$strict>>; planner: z.ZodOptional; maxPlanningTurns: z.ZodOptional; previousStepCount: z.ZodNumber; }, z.core.$strict>>; logCapture: z.ZodOptional>; cache: z.ZodOptional; llm: z.ZodOptional; buildTag: z.ZodOptional; parallel: z.ZodOptional; workers: z.ZodOptional; }, z.core.$strict>>; plugins: z.ZodOptional>; }, z.core.$strict>, z.ZodObject<{ name: z.ZodString; path: z.ZodString; options: z.ZodOptional>; }, z.core.$strict>]>>>; analytics: z.ZodOptional>; passRateScope: z.ZodOptional]>>>; }, z.core.$strict>>; }, z.core.$strict>>; }, z.core.$strict>>; type AgentQaConfig = z.infer; type WorkspaceConfig = z.infer; type ServicesConfig = z.infer; type RegistryConfig = z.infer; type UseConfig = z.infer; export declare const UrlRemoteEntrySchema: z.ZodObject<{ name: z.ZodString; protocol: z.ZodEnum<{ appium: "appium"; cdp: "cdp"; playwright: "playwright"; }>; url: z.ZodString; query: z.ZodOptional]>>>; headers: z.ZodOptional>; basicAuth: z.ZodOptional>; connectTimeout: z.ZodOptional>>; context: z.ZodOptional>; capabilities: z.ZodOptional>; }, z.core.$strict>; export declare const PluginRemoteEntrySchema: z.ZodObject<{ name: z.ZodString; plugin: z.ZodString; settings: z.ZodOptional>; connectTimeout: z.ZodOptional>>; uploadTimeout: z.ZodOptional>>; context: z.ZodOptional>; capabilities: z.ZodOptional>; }, z.core.$strict>; export declare const RemoteEntrySchema: z.ZodUnion; url: z.ZodString; query: z.ZodOptional]>>>; headers: z.ZodOptional>; basicAuth: z.ZodOptional>; connectTimeout: z.ZodOptional>>; context: z.ZodOptional>; capabilities: z.ZodOptional>; }, z.core.$strict>, z.ZodObject<{ name: z.ZodString; plugin: z.ZodString; settings: z.ZodOptional>; connectTimeout: z.ZodOptional>>; uploadTimeout: z.ZodOptional>>; context: z.ZodOptional>; capabilities: z.ZodOptional>; }, z.core.$strict>]>; type UrlRemoteEntry = z.infer; type PluginRemoteEntry = z.infer; type RemoteEntry = z.infer; export declare function isPluginRemoteEntry(entry: RemoteEntry): entry is PluginRemoteEntry; export declare function isUrlRemoteEntry(entry: RemoteEntry): entry is UrlRemoteEntry; export declare const LOCAL_FILE_NAME = "agent-qa.local.yaml"; export declare const RETIRED_LOCAL_FILE_MESSAGE = "agent-qa.local.yaml is no longer read: describe each device under registry.devices with model and os (id pins one unit), and set app.path on the target. Delete the file."; export declare function leftoverLocalFileRefusal(dirs: readonly string[]): string | undefined; export declare const configShapeScan: z.ZodUnknown; export declare function resolveKnowledgeRoot(knowledge: { dir: string; }, configDir: string): string; export declare const SuiteTestEntrySchema: z.ZodObject<{ test: z.ZodString; id: z.ZodString; }, z.core.$strict>; export declare const SuiteDefinitionSchema: z.ZodObject<{ 'suite-id': z.ZodOptional; name: z.ZodString; target: z.ZodString; context: z.ZodOptional; setup: z.ZodOptional>; teardown: z.ZodOptional>; tests: z.ZodArray>; use: z.ZodOptional>; headless: z.ZodOptional; viewport: z.ZodOptional; height: z.ZodOptional; }, z.core.$strict>>; remote: z.ZodOptional; }, z.core.$strict>>; timeout: z.ZodOptional>>; test: z.ZodOptional>>; navigation: z.ZodOptional>>; }, z.core.$strict>>; planner: z.ZodOptional; maxPlanningTurns: z.ZodOptional; previousStepCount: z.ZodOptional; }, z.core.$strict>>; logCapture: z.ZodOptional; network: z.ZodOptional; }, z.core.$strict>>; cache: z.ZodOptional; authState: z.ZodOptional; capture: z.ZodOptional; }, z.core.$strict>]>>; mobile: z.ZodOptional>; }, z.core.$strict>>; llm: z.ZodOptional; parallel: z.ZodOptional; workers: z.ZodOptional; device: z.ZodOptional; }, z.core.$strict>>>; }, z.core.$strict>; export declare const HookDefinitionSchema: z.ZodObject<{ id: z.ZodString; name: z.ZodString; runtime: z.ZodEnum<{ bash: "bash"; bun: "bun"; node: "node"; python: "python"; }>; file: z.ZodString; deps: z.ZodDefault>>; packageFile: z.ZodOptional; timeout: z.ZodPipe>; network: z.ZodDefault>; }, z.core.$strip>; export declare const HooksFileSchema: z.ZodObject<{ hooks: z.ZodArray; file: z.ZodString; deps: z.ZodDefault>>; packageFile: z.ZodOptional; timeout: z.ZodPipe>; network: z.ZodDefault>; }, z.core.$strip>>; }, z.core.$strip>; export type HooksFileConfig = z.infer; type RunTextEnv = Readonly>; interface PrintRunTextOptions { readonly env?: RunTextEnv; readonly stdoutIsData?: boolean; } export declare function isGitHubActions(env?: RunTextEnv): boolean; export declare function guardRunText(text: string, env?: RunTextEnv): string; export declare function guardJsonText(serialized: string, env?: RunTextEnv): string; /** Marks this process's stdout as carrying a JSON document or protocol; returns the release. */ export declare function reserveStdoutForData(): () => void; export declare function printRunText(text: string, print?: (text: string) => void, options?: PrintRunTextOptions): void; type LogColors = ReturnType; type LogLineLevel = 'error' | 'warn' | 'info' | 'debug'; interface LogLine { tag: string; message: string; level?: LogLineLevel; data?: Record; time?: Date; } export declare function isCi(env?: RunTextEnv): boolean; export declare function colorEnabled(env: RunTextEnv, isTTY: boolean): boolean; export declare function colorsFor(stream: { isTTY?: boolean; }, env?: RunTextEnv): LogColors; export declare function formatLogLine(line: LogLine, colors: LogColors): string; export declare function printLogLine(line: LogLine, options?: { env?: RunTextEnv; to?: 'stdout' | 'stderr'; }): void; interface ParseError { file: string; line: number; column: number; message: string; severity: 'error' | 'warning'; source: string; suggestion?: string; } interface FormatOptions { noColor?: boolean; colors?: Pick; } export declare function formatParseError(error: ParseError, opts?: FormatOptions): string; interface ParseResult { tests: TestDefinition[]; errors: ParseError[]; } interface ParsedTestBinding { test: TestDefinition; filePath: string; fileContent: string; } interface ParseAllTestBindingsResult { bindings: ParsedTestBinding[]; errors: ParseError[]; } export declare function parseTestFile(content: string, filePath: string): ParseResult; export declare function parseAllTestBindings(filePaths: string[]): Promise; export declare function parseAllTests(filePaths: string[]): Promise; interface FileAttachment { name: string; path: string; content: Buffer; mimeType: string; } export declare function resolveFileReferences(stepText: string, testFilePath: string): Promise<{ resolvedText: string; attachments: FileAttachment[]; }>; type SuiteDefinition = z.infer; interface SuiteResult { runId?: string; name: string; status: 'passed' | 'failed' | 'cancelled'; tests: TestResult[]; duration: number; failedAt?: number; } export declare function parseSuiteFile(filePath: string): Promise; /** * A test document parsed so that BOTH halves survive: the composed model a pointer resolves * against, and the token array the render concatenates. * * The two are not redundant. Pointer resolution needs the model (`getIn`-shaped navigation over * maps and sequences); byte preservation needs the tokens. Handing a caller only one of them would * force it to re-parse to get the other, and a second parse is a second opinion about the source. */ interface ParsedTestDocument { readonly source: string; readonly filePath: string; readonly tokens: CST.Token[]; readonly doc: Document; } /** A pointer addressed a document root outside `EDITABLE_POINTER_ROOTS`. */ export declare class PatchPointerOutsideEditableRegionError extends Error { readonly pointer: string; constructor(pointer: string); } /** A pointer named a node the document does not have. */ export declare class PatchPointerUnresolvableError extends Error { readonly pointer: string; readonly detail: string; constructor(pointer: string, detail: string); } export declare class PatchOpUnsupportedTargetError extends Error { readonly pointer: string; readonly detail: string; constructor(pointer: string, detail: string); } /** * A document this project cannot run — checked on the SOURCE before anything is applied and on the * RENDERED bytes before anything may be written. * * Both directions matter. Validating only the render would let a pre-existing invalidity be * blamed on the patch; validating only the source would let a CST mutation that produced * structurally broken YAML reach a file. Same predicate, same evidence, two call sites. */ export declare class PatchedDocumentInvalidError extends Error { readonly phase: 'source' | 'rendered'; readonly detail: string; constructor(phase: 'source' | 'rendered', detail: string); } /** * Parse a test file retaining the CST token array beside the composed document. * * The composer is given `keepSourceTokens` so every node carries a `srcToken` back-reference; that * back-reference is the entire bridge between a pointer (which addresses the model) and a mutation * (which must land on the syntax). */ export declare function parseTestFileWithTokens(source: string, filePath: string): ParsedTestDocument; /** * Apply a patch set in document order, mutating `parsed.doc` and its tokens in place. * * TWO PROPERTIES THE ORDER BUYS. First, the fence runs over the WHOLE set before any mutation, so * a set mixing a legitimate op with an out-of-region one leaves nothing behind — a per-op check * would have already rewritten the legitimate target by the time it refused. Second, each pointer * resolves against the document as PRIOR ops left it, which is what RFC-6902 means by a sequence * of operations: an `add` earlier in an array shifts every later index, and resolving every * pointer against the original document would edit a plausible, schema-valid, wrong step. */ export declare function applyPatchSetToTestDoc(parsed: ParsedTestDocument, patchSet: TestEditPatchSet): void; /** * Concatenate the whole token array back to bytes, then refuse anything unrunnable. * * THE RENDER IS OVER `parsed.tokens`, NEVER OVER THE DOCUMENT TOKEN ALONE. `CST.stringify`'s own * doc comment states it "applies no validation whatsoever, and simply concatenates the sources in * their logical order" — that concatenation IS the byte-preservation guarantee. A file's leading * comment is a separate token in the parser's output stream, positioned BEFORE the document token, * so `CST.stringify(documentToken)` drops it. That is the one genuinely non-obvious line here, it * was measured rather than reasoned about, and the frozen corpus's untouched-round-trip row is * the cell that catches a regression to it. */ export declare function renderPatchedTestDoc(parsed: ParsedTestDocument, filePath?: string): string; export declare function estimateTokens(text: string): number; interface MobileNode { index: number; type: string; label?: string; value?: string; bounds?: { x: number; y: number; width: number; height: number; }; enabled?: boolean; children: MobileNode[]; } interface RefEntry { role: string; name?: string; bounds?: { x: number; y: number; width: number; height: number; }; nativeType?: string; value?: string; editable?: boolean; /** Android's raw `input-type` bitmask from the observed node. */ inputType?: number; } /** Execute-time ref -> resolution record map (adapter-private `lastRefs`). */ type MobileRefMap = Record; interface ParsedMobileSource { nodes: InterimNode[]; } export declare function parseMobileSource(xml: string, platform: 'android' | 'ios', viewport?: { width: number; height: number; }): ParsedMobileSource; export declare function buildRefEntries(nodes: InterimNode[], binding: Record): Record; export declare function deriveMobileScroll(nodes: InterimNode[], viewport: { width: number; height: number; }): { offsetX: number; offsetY: number; contentWidth: number; contentHeight: number; }; export declare const ANDROID_ROLE_MAP: Record; export declare const IOS_ROLE_MAP: Record; export declare const IOS_EDITABLE_TYPES: ReadonlySet; export declare function normalizeRole(type: string, platform: 'android' | 'ios'): string; export declare class MobileElementResolver { private refs; constructor(refs: MobileRefMap); resolve(ref: string): { role: string; name?: string; bounds: { x: number; y: number; width: number; height: number; }; center: { x: number; y: number; }; }; resolveAction(action: Action): { bounds: { x: number; y: number; width: number; height: number; }; center: { x: number; y: number; }; } | null; } export declare const KEY_MAP: Record; export declare function computePinch(centerX: number, centerY: number, scale: number, startDistance?: number): { finger1Start: { x: number; y: number; }; finger1End: { x: number; y: number; }; finger2Start: { x: number; y: number; }; finger2End: { x: number; y: number; }; }; export declare function computeFingerPositions(centerX: number, centerY: number, fingers: number, spacing?: number): { x: number; y: number; }[]; export declare function computeSwipe(centerX: number, centerY: number, direction: 'up' | 'down' | 'left' | 'right', distance: number): { startX: number; startY: number; endX: number; endY: number; }; export type MobilePlatform = 'android' | 'ios'; export type MobileAppState = 'preserve' | 'reset'; export type MobileSetupErrorCategory = 'device-resolution' | 'appium-startup' | 'device-readiness' | 'adapter-load' | 'app-install' | 'app-launch'; export interface MobileSetupErrorOptions { category: MobileSetupErrorCategory; message: string; platform?: MobilePlatform; targetName?: string; deviceName?: string; appId?: string; cause?: unknown; sourceTrace?: string[]; } export declare class MobileSetupError extends Error { readonly category: MobileSetupErrorCategory; readonly platform?: MobilePlatform; readonly targetName?: string; readonly deviceName?: string; readonly appId?: string; readonly sourceTrace?: string[]; readonly cause?: unknown; constructor(options: MobileSetupErrorOptions); } export interface ResolvedMobileDevice { name: string; platform: MobilePlatform; model?: string; os?: string; id?: string; capabilities?: Record; remote?: RemoteDeviceConfig | RemotePluginDeviceConfig; } export interface ResolvedMobileAppInstall { path?: string; sourceTrace: Record; } export interface ResolvedMobileApp { ref?: string; bundleId?: string; appPackage?: string; appActivity?: string; deepLinkAppId?: string; install?: ResolvedMobileAppInstall; sourceTrace: Record; } export type MobileDevicePlan = { kind: 'remote'; remote: RemoteDeviceConfig | RemotePluginDeviceConfig; } | { kind: 'here'; search: { model?: string; os?: string; id?: string; }; }; export interface ResolvedMobileRunConfig { platform: MobilePlatform; targetName: string; deviceName: string; device: ResolvedMobileDevice; plan: MobileDevicePlan; app: ResolvedMobileApp; appState: MobileAppState; sourceTrace: string[]; } export interface ResolveMobileRunConfigInput { config: Record; targetName: string; platform?: MobilePlatform; explicitDeviceName?: string; useDeviceName?: string; appState?: MobileAppState; configFilePath?: string; } export declare function resolveMobileRunConfig(input: ResolveMobileRunConfigInput): ResolvedMobileRunConfig; export type DevicePlace = { kind: 'local'; device: string; } | { kind: 'remote'; device: string; remote: RemoteDeviceConfig | RemotePluginDeviceConfig; }; export interface SelectDevicePlaceInput { devices: Record; remotes: readonly RemoteEntry[]; device: string; file?: string; } export type SelectDevicePlaceResult = { place: DevicePlace; } | { refusal: string; }; export declare function toRemoteDeviceConfig(entry: UrlRemoteEntry): RemoteDeviceConfig; export declare function toRemotePluginDeviceConfig(entry: PluginRemoteEntry): RemotePluginDeviceConfig; export declare function selectDevicePlace(input: SelectDevicePlaceInput): SelectDevicePlaceResult; export type DeviceProfiles = Record; export interface DeviceTarget { name: string; platform: string; device?: string; } export interface SelectTestDeviceInput { devices: DeviceProfiles; remotes: readonly RemoteEntry[]; target: DeviceTarget; flag?: string; test?: string; file?: string; } export declare function selectTestDevice(input: SelectTestDeviceInput): SelectDevicePlaceResult; export interface SuiteMemberDevice { file: string; pick?: string; target: DeviceTarget; } export interface SelectSuiteDeviceInput { devices: DeviceProfiles; remotes: readonly RemoteEntry[]; suiteName: string; suiteFile: string; flag?: string; suite?: string; members: readonly SuiteMemberDevice[]; } export declare function selectSuiteDevice(input: SelectSuiteDeviceInput): SelectDevicePlaceResult; export declare const W3C_STANDARD_CAPABILITIES: readonly string[]; export type CapabilityMap = Record; export declare function mergeCapabilities(...layers: (CapabilityMap | undefined)[]): CapabilityMap; export declare function capabilityValue(caps: CapabilityMap, name: string): unknown; export interface StaticCapabilityInput { device: string; platform: MobilePlatform; model?: string; os?: string; id?: string; remote?: { name: string; capabilities?: CapabilityMap; }; capabilities?: CapabilityMap; } export declare function staticCapabilityContradictions(input: StaticCapabilityInput): string[]; export interface RunStartCapabilityInput { device: string; target: { name: string; appPackage?: string; appActivity?: string; bundleId?: string; }; appState: 'preserve' | 'reset'; browserMode: boolean; remote?: { name: string; capabilities?: CapabilityMap; }; capabilities?: CapabilityMap; } export declare function runStartCapabilityContradictions(input: RunStartCapabilityInput): string[]; export interface RemoteAppInput { device: string; remote: string; target: string; appRef?: string; appPath?: string; capabilities: CapabilityMap; } export type RemoteAppResult = { app?: string; } | { refusal: string; }; export declare function remoteAppCapability(input: RemoteAppInput): RemoteAppResult; export declare function remoteDerivedIdentity(input: { model?: string; os?: string; id?: string; }): CapabilityMap; export interface AttachedAndroid { serial: string; state: string; model?: string; os?: string; avd?: string; } export interface AvdHere { name: string; profile?: string; displayName?: string; os?: string; apiLevel?: string; } export interface AndroidHere { attached: AttachedAndroid[]; avds: AvdHere[]; problem?: string; } export interface SimulatorHere { name: string; udid: string; os: string; state: string; available: boolean; } export interface IOSHere { simulators: SimulatorHere[]; problem?: string; } export interface DeviceFound { udid?: string; avd?: string; name?: string; os?: string; running: boolean; description: string; } export interface FindDeviceHereInput { device: string; platform: 'android' | 'ios'; model?: string; os?: string; id?: string; android?: AndroidHere; ios?: IOSHere; } export type FindDeviceHereResult = { found: DeviceFound; } | { refusal: string; }; export declare function normalizeDeviceText(text: string): string; export declare function osMatches(want: string, have: string | undefined): boolean; export declare function findDeviceHere(input: FindDeviceHereInput): FindDeviceHereResult; export declare function describeAndroidHere(listing: AndroidHere): string[]; export declare function describeIOSHere(listing: IOSHere): string[]; export type AppiumEndpointChoice = { kind: 'remote'; } | { kind: 'given'; url: string; } | { kind: 'host-or-start'; } | { refusal: string; }; export interface ChooseAppiumEndpointInput { device: { name: string; remote?: unknown; }; envUrl?: string; } export declare function chooseAppiumEndpoint(input: ChooseAppiumEndpointInput): AppiumEndpointChoice; /** One WebView scroller with a structural identity: `document`, or a flat-tree path plus tag, id and class. */ interface IdentifiedScrollOffsets extends DocumentScrollOffsets { id: string; } /** * A WebDriver `execute` function body. It answers `null` when a frame (`iframe`, `frame`, `embed`, * `object`, `fencedframe`) with positive area intersects the viewport, because a swipe over it * moves content the page cannot measure. Otherwise it answers the document scroller first (id * `document`), then every on-screen element scroller in the document and its open shadow roots, * in tree order. A body whose overflow propagates to the viewport is not a member. Nothing is * written to the page: ids derive from structure alone. Closed shadow roots are unreachable. */ export declare const WEBVIEW_SCROLLERS_SCRIPT: string; /** A non-empty array of members with string ids, finite offsets and no duplicate id; else undefined. */ export declare function parseWebViewScrollers(raw: unknown): IdentifiedScrollOffsets[] | undefined; /** * Before and after are paired by id. The same membership is judged by the scroller-set rule; a * changed membership is `moved` only when a member present in both reads moved, else `unknown`. */ export declare function webViewSwipeSignal(direction: Direction, before: readonly IdentifiedScrollOffsets[] | undefined, after: readonly IdentifiedScrollOffsets[] | undefined): SwipeSignal; export declare const AUTH_STATE_SCHEMA_VERSION = 2; export declare const AUTH_STATE_SLUG_PATTERN: RegExp; export declare const AuthStateNameSchema: z.ZodString; export declare const TargetNameSchema: z.ZodString; export declare const AuthStateMetadataSchema: z.ZodObject<{ version: z.ZodLiteral<2>; kind: z.ZodLiteral<"web">; target: z.ZodString; name: z.ZodString; capturedAt: z.ZodISODateTime; }, z.core.$strict>; type AuthStateMetadata = z.infer; type AuthStateTargetPlatform = 'web' | 'android' | 'ios'; interface ResolveAuthStatePathsInput { configDir: string; authStateDir?: string; targetName: string; stateName: string; target?: { platform: AuthStateTargetPlatform; }; platform?: AuthStateTargetPlatform; } interface ResolvedAuthStatePaths { targetName: string; stateName: string; rootDir: string; targetDir: string; payloadPath: string; metadataPath: string; } interface ResolveAuthStateRootInput { configDir: string; authStateDir?: string; } export declare function resolveAuthStateRoot(input: ResolveAuthStateRootInput): string; export declare function resolveAuthStatePaths(input: ResolveAuthStatePathsInput): ResolvedAuthStatePaths; interface WriteAuthStateFilesInput { payload: unknown; metadata: AuthStateMetadata; } interface ListAuthStateMetadataInput { configDir: string; authStateDir?: string; targetName?: string; } interface RemoveAuthStateFilesInput { configDir: string; authStateDir?: string; targetName: string; stateName: string; target?: Parameters[0]['target']; platform?: Parameters[0]['platform']; } interface RemoveAuthStateTargetInput { configDir: string; authStateDir?: string; targetName: string; target?: Parameters[0]['target']; platform?: Parameters[0]['platform']; } export declare function readAuthStateMetadata(paths: ResolvedAuthStatePaths): Promise; export declare function writeAuthStateFiles(paths: ResolvedAuthStatePaths, input: WriteAuthStateFilesInput): Promise; export declare function listAuthStateMetadata(input: ListAuthStateMetadataInput): Promise; export declare function removeAuthStateFiles(input: RemoveAuthStateFilesInput): Promise; export declare function removeAuthStateTarget(input: RemoveAuthStateTargetInput): Promise; interface ResolveAuthStateForRunInput { configDir: string; authStateDir?: string; targetName: string; stateName: string; target?: { platform: AuthStateTargetPlatform; }; platform?: AuthStateTargetPlatform; } interface ResolvedAuthStateForRun { version: number; kind: 'web'; targetName: string; stateName: string; capturedAt: string; storageStatePath: string; } export declare function resolveAuthStateForRun(input: ResolveAuthStateForRunInput): Promise; type AuthProvider = string; type LLMModelAdapter = 'openai-responses' | 'anthropic-messages'; type BuiltInLLMProviderMode = 'openai-compatible' | 'anthropic-compatible' | 'openai-subscription' | 'anthropic-subscription' | 'gemini'; type LLMProviderMode = BuiltInLLMProviderMode | (string & {}); interface OAuthTokens { access: string; refresh: string; expires: number; accountId?: string; } type AuthCredential = { type: 'oauth'; provider: AuthProvider; tokens: OAuthTokens; signedInAt?: number; } | { type: 'api'; provider: string; key: string; } | { type: 'bearer'; provider: string; token: string; }; type AuthStore = Record; type ResolvedLLMAuth = { kind: 'api-key'; credentialKey: string; provider: BuiltInLLMProviderMode; apiKey: string; } | { kind: 'bearer-token'; credentialKey: string; provider: 'anthropic-compatible'; token: string; } | { kind: 'auth-fetch'; credentialKey: string; provider: string; modelAdapter: LLMModelAdapter; fetch: typeof globalThis.fetch; expires?: number; } | { kind: 'unauthenticated'; credentialKey: string; provider: 'openai-compatible' | 'anthropic-compatible'; optional: true; message: string; } | { kind: 'missing'; credentialKey: string; provider: string; required: true; message: string; }; type TokenRefreshFn = (provider: AuthProvider, refreshToken: string) => Promise; export declare function getAuthPath(options?: { env?: NodeJS.ProcessEnv; homeDir?: string; }): string; export declare function readAuth(path?: string): Promise; type SavedCredential = { name: string; type: 'oauth'; provider: string; signIn: { renews: boolean; expires?: number; signedInAt?: number; }; } | { name: string; type: 'api' | 'bearer'; provider: string; }; export declare function listSavedCredentials(path?: string): Promise; export declare function writeAuth(provider: string, credential: AuthCredential, path?: string): Promise; export declare function removeAuth(provider: string, path?: string): Promise; export declare function getCredential(provider: string, path?: string): Promise; interface LLMAuthConfig { provider: LLMProviderMode | string; model: string; baseURL?: string; providerHeaders?: Record; } export declare const PUBLIC_PROVIDER_API_HOSTS: readonly string[]; export declare function resolveLLMAuth(configName: string, llmConfig: LLMAuthConfig, authPath?: string, configPath?: string): Promise; type DashboardAuthMode = 'browser-poll' | 'manual-code'; interface DashboardAuthMetadata { mode: DashboardAuthMode; buttonLabel?: string; } interface StartAuthContext { configName: string; callbackUrl?: string; } interface StartAuthResult { authorizeUrl: string; sessionState?: unknown; waitForTokens?: Promise; cleanup?: () => void; } interface ExchangeCodeContext { code: string; sessionState: unknown; } interface CreateAuthFetchContext { getTokens: () => Promise; onRefreshed: (tokens: OAuthTokens) => Promise; } interface LLMAuthProviderPlugin { providerId: string; credentialProviderId: string; label: string; modelAdapter: LLMModelAdapter; dashboardAuth: DashboardAuthMetadata; startAuth?: (ctx: StartAuthContext) => Promise; exchangeCode?: (ctx: ExchangeCodeContext) => Promise; createAuthFetch: (ctx: CreateAuthFetchContext) => typeof globalThis.fetch; } export declare function registerLLMAuthProviderPlugin(plugin: LLMAuthProviderPlugin): void; export declare function registerLLMAuthProviderPlugins(providerPlugins: LLMAuthProviderPlugin[]): void; export declare function getLLMAuthProviderPlugin(providerId: string): LLMAuthProviderPlugin | undefined; export declare function listLLMAuthProviderPlugins(): LLMAuthProviderPlugin[]; export declare function clearLLMAuthProviderPlugins(): void; type PluginOrigin = 'first-party' | 'third-party' | 'path'; type PluginEntryState = 'ok' | 'not_installed' | 'version_mismatch' | 'protocol_mismatch' | 'bad_manifest' | 'unused'; interface PluginEntryInput { name: string; package?: string; path?: string; options?: unknown; } interface PluginRemoteInput { name: string; plugin?: string; } interface ResolvePluginEntryOptions { configDir: string; configPath?: string; agentQaVersion: string; protocols?: { current: number; }; } interface ResolvedPluginEntry { name: string; label: string; origin: PluginOrigin; state: PluginEntryState; reason?: string; install?: string; packageDir?: string; packageJsonPath?: string; version?: string; manifest?: PluginManifest; inProcess: boolean; } type InProcessPluginKind = 'model-auth' | 'model-provider'; interface InProcessRefusal { entry: string; state: 'not_installed' | 'version_mismatch' | 'bad_manifest'; reason: string; } interface InProcessSelection { load: ResolvedPluginEntry[]; refusals: InProcessRefusal[]; } export declare function supportedPluginProtocols(current?: number): number[]; export declare function pluginInstallLine(entry: PluginEntryInput, configPath?: string): string | undefined; export declare function resolvePluginEntry(entry: PluginEntryInput, options: ResolvePluginEntryOptions): ResolvedPluginEntry; export declare function resolvePluginEntries(config: { plugins: readonly PluginEntryInput[]; remotes?: readonly PluginRemoteInput[]; }, options: ResolvePluginEntryOptions): ResolvedPluginEntry[]; export declare function selectInProcessPluginEntries(entries: readonly PluginEntryInput[], kind: InProcessPluginKind, options: ResolvePluginEntryOptions, remotes?: readonly PluginRemoteInput[]): InProcessSelection; interface AuthPluginBundle { providers: LLMAuthProviderPlugin[]; } interface LoadLLMAuthPluginsOptions { baseDir?: string; remotes?: readonly PluginRemoteInput[]; configPath?: string; } export declare function loadLLMAuthPlugins(entries: readonly PluginEntry[] | undefined, options?: LoadLLMAuthPluginsOptions): Promise; export declare function clearLoadedLLMAuthPluginModules(): void; export declare function generatePKCE(): { verifier: string; challenge: string; }; export declare function generateState(): string; interface CreateAuthFetchOptions { provider: AuthProvider; getTokens: () => Promise; refreshTokens: TokenRefreshFn; onTokensRefreshed: (tokens: OAuthTokens) => Promise; headerTransform?: (headers: Headers, tokens: OAuthTokens) => void; urlTransform?: (url: string) => string; } export declare function createAuthFetch(options: CreateAuthFetchOptions): typeof globalThis.fetch; interface ProviderPluginDescriptor { id: string; label: string; adapter: (transport: unknown, modelId: string) => unknown; authModes: string[]; needsBaseURL?: boolean; subscription?: boolean; credentialOptional?: boolean; modelAdapter?: string; baseURLPlaceholder?: string; defaultModel?: string; } interface LoadProviderPluginsOptions { baseDir?: string; remotes?: readonly PluginRemoteInput[]; configPath?: string; } export declare function loadProviderPlugins(entries: readonly PluginEntry[] | undefined, options?: LoadProviderPluginsOptions): Promise; export declare function clearLoadedProviderPluginModules(): void; type LogLevel = 'silent' | 'error' | 'warn' | 'info' | 'debug'; export declare const LOG_LEVEL_PRIORITY: Record; type LogSource = 'agent' | 'adapter' | 'cache' | 'planner' | 'hook' | 'runner'; interface LogEntry { id: string; stepId: string | null; runId: string; level: Exclude; source: LogSource; message: string; data: Record; timestamp: string; } interface LogStorage { insertLogs(entries: LogEntry[]): void; getLogs(opts: { runId?: string; stepId?: string; level?: string; source?: string; limit?: number; offset?: number; }): LogEntry[]; } interface ScopedLogger { debug(msg: string, data?: Record): void; info(msg: string, data?: Record): void; warn(msg: string, data?: Record): void; error(msg: string, data?: Record): void; } export declare const AgentLogDataSchema: z.ZodObject<{ hasScreenshot: z.ZodOptional; duration: z.ZodOptional; elementCount: z.ZodOptional; }, z.core.$strip>; export declare const AdapterLogDataSchema: z.ZodObject<{ actionType: z.ZodOptional; selector: z.ZodOptional; coordinates: z.ZodOptional>; elementProperties: z.ZodOptional>; duration: z.ZodOptional; }, z.core.$strip>; export declare const CacheLogDataSchema: z.ZodObject<{ operation: z.ZodEnum<{ "batch-purge": "batch-purge"; bypass: "bypass"; get: "get"; invalidate: "invalidate"; set: "set"; }>; stepHash: z.ZodOptional; screenHash: z.ZodOptional; hit: z.ZodOptional; age: z.ZodOptional; entriesDeleted: z.ZodOptional; }, z.core.$strip>; export declare const PlannerLogDataSchema: z.ZodObject<{ model: z.ZodOptional; promptTokens: z.ZodOptional; completionTokens: z.ZodOptional; latencyMs: z.ZodOptional; confidence: z.ZodOptional; actionType: z.ZodOptional; }, z.core.$strip>; export declare const HookLogDataSchema: z.ZodObject<{ hookName: z.ZodOptional; phase: z.ZodOptional>; duration: z.ZodOptional; success: z.ZodOptional; }, z.core.$strip>; export declare const RunnerLogDataSchema: z.ZodObject<{ stepIndex: z.ZodOptional; totalSteps: z.ZodOptional; testName: z.ZodOptional; variablesCaptured: z.ZodOptional; }, z.core.$strip>; export declare const LogSourceDataSchemas: Record; interface MemberLogScope { runId: string; readonly pending: LogEntry[]; } /** * The host's async-context primitive, named STRUCTURALLY so this package never imports * `node:async_hooks`. * * `packages/core`'s host baseline is a regenerable DEBT record with a per-area clearance map — a * list that is meant to shrink — so a new host import here would be new debt, not a permission. * The composition root already owns every other reach into the world, so it owns this one too and * injects it. `node:async_hooks`'s `AsyncLocalStorage` satisfies this exactly, with * no adapter. */ interface AsyncScopeStore { getStore(): T | undefined; run(store: T, fn: () => R): R; } /** Thrown when a caller asks for member isolation the composition root never wired up. */ export declare class MemberLogScopeUnavailableError extends Error { constructor(); } export declare class LogManager { private buffer; private currentStepId; private runId; private runIdSet; private readonly displayLevel; private readonly storage?; private readonly ndjson; private redactor?; private readonly memberScope?; private readonly env?; constructor(opts: { runId?: string; displayLevel: LogLevel; storage?: LogStorage; ndjson?: boolean; redactor?: SecretRedactor; memberScope?: AsyncScopeStore; env?: RunTextEnv; }); setRedactor(redactor: SecretRedactor | undefined): void; runInMemberScope(fn: () => T): T; log(level: Exclude, source: LogSource, message: string, data?: Record): void; private shouldDisplay; /** * The SECOND writer on the `AGENT_QA_EVENT:` stdout channel — the first is the CLI's * `reporters/wire-reporter.ts`, which prints run-event envelopes on the same prefix. Both are * armed by `AGENT_QA_LIVE_EVENTS=true` (this one indirectly: `commands/run.ts` passes * `ndjson: process.env.AGENT_QA_LIVE_EVENTS === 'true'`), both are off by default, and nothing in * the product sets that variable. Entries are already redacted above, and are printed verbatim. * A supported opt-in; the user-facing contract for both writers is the CLI README's * "Live events on stdout (opt-in)". Do not change this line shape without mirroring it there. */ private emitNdjson; setCurrentStep(stepId: string): void; clearCurrentStep(): void; setRunId(runId: string): void; flush(): void; getBuffer(): LogEntry[]; createScopedLogger(source: LogSource): ScopedLogger; } interface RunSuiteConfig { runId?: string; adapter: PlatformAdapter; platformConfig: PlatformConfig; planner: Planner; verifier: Verifier; cache?: ActionPlanCache; workingMemory?: WorkingMemoryPort; storageState?: StorageStatePort; compressor?: ScreenshotCompressor; plannerModel: LanguageModel; verifierModel: LanguageModel; captureScreenshots?: boolean; timeouts?: { step?: number; test?: number; navigation?: number; }; logger?: LogManager; configContent?: string; suiteFileContent?: string; envFileVars?: Record; inlineVars?: Record; cliVars?: Record; resolvedHooks?: Map; sandboxOptions?: SandboxRunnerOptions; logCapture?: { console?: boolean; network?: boolean; }; accessibility?: { enabled: boolean; standard?: 'wcag2a' | 'wcag2aa' | 'wcag2aaa'; runAfter?: 'every-step' | 'test-end'; failOnViolation?: boolean; disableRules?: string[]; exclude?: string[]; }; accessibilityCheck?: (page: unknown, options: { standard?: 'wcag2a' | 'wcag2aa' | 'wcag2aaa'; disableRules?: string[]; exclude?: string[]; }) => Promise; vision?: { screenshotSize?: number; effectiveResolution?: number; }; /** Vision gate resolved once per run at the composition root; passed through to each test. */ visionGate?: { attachImage: boolean; captureMode: 'full' | 'textOnly'; promptNote: string; }; product?: string; createAdapter?: () => Promise; resolveUrl?: (targetName: string) => string | undefined; artifactContext?: Record; authStateCapture?: { capture: () => Promise; failureSummary: string; }; secretStore?: SecretStore; secretRedactor?: SecretRedactor; } export declare function patchTestForSuite(test: TestDefinition, suite: SuiteDefinition, _index: number): TestDefinition; export type WorkspaceFileKind = 'test' | 'suite'; export interface ResolvedWorkspaceFile { configuredPath: string; absolutePath: string; workspaceRelativePath: string; } export interface WorkspaceFileRecord { kind: WorkspaceFileKind; absolutePath: string; workspaceRelativePath: string; } export interface ResolvedWorkspacePaths { configPath: string; configDir: string; testMatch: string[]; suiteMatch: string[]; testPathIgnore: string[]; hooksFile: ResolvedWorkspaceFile; envFile: ResolvedWorkspaceFile; secretsFile: ResolvedWorkspaceFile; } interface ResolveWorkspacePathsInput { config: AgentQaConfig; configPath: string; requireExistingFiles?: boolean; } export declare function workspaceRelativeIdentityPath(configDir: string, filePath: string): string; export declare function resolveWorkspacePaths(input: ResolveWorkspacePathsInput): ResolvedWorkspacePaths; export declare function discoverWorkspaceFiles(input: { workspace: ResolvedWorkspacePaths; kind: WorkspaceFileKind; }): Promise; export declare function resolveWorkspaceFileTarget(input: { workspace: ResolvedWorkspacePaths; kind: WorkspaceFileKind; filePath: string; requireExisting?: boolean; }): Promise; export declare function isWorkspacePathMatch(input: { workspace: ResolvedWorkspacePaths; kind: WorkspaceFileKind; workspaceRelativePath: string; }): boolean; interface ValidationDiagnostic { file: string; line: number; column: number; message: string; severity: 'error' | 'warning'; } interface ValidationResult { diagnostics: ValidationDiagnostic[]; fileCount: number; errorCount: number; warningCount: number; } export declare const VALID_FILENAME_RE: RegExp; export declare function validateConfig(configPath: string): Promise; export declare function validateTestFile(filePath: string, content: string): ValidationDiagnostic[]; export declare function validateSuiteFile(filePath: string, content: string, basedir: string): ValidationDiagnostic[]; export declare function validateFilename(filePath: string): ValidationDiagnostic[]; export declare function detectGlobOverlap(testMatch: string[], suiteMatch: string[], ignore: string[], cwd?: string): Promise; export declare function validateFiles(filePaths: string[], configPath?: string, options?: { basedir?: string; }): Promise; export declare function validateProject(options?: { configPath?: string; files?: string[]; testMatch?: string[]; testPathIgnore?: string[]; suiteMatch?: string[]; hooksFile?: string; workspace?: ResolvedWorkspacePaths; }): Promise; export declare function yamlParseFailureMessage(error: unknown): string; export declare function formatDiagnostics(result: ValidationResult): string; export declare function formatDiagnosticsPlain(result: ValidationResult): string; export declare function warnIfOutOfBounds(coords: { x?: number; y?: number; }, viewport: { width: number; height: number; }, actionType: string): void; export declare function parseHooksFile(filePath: string): Promise<{ hooks: HookDefinition$1[]; errors: string[]; }>; export declare function generateHookId(): string; export declare function generateRunId(): string; export declare function isCanonicalRunId(value: string): boolean; export type RunAttributes = Record; export declare const INTERNAL_ATTRIBUTE_PREFIX = "agent-qa."; export declare const ATTR_TRIGGER = "agent-qa.trigger"; export declare const ATTR_RUNNER = "agent-qa.runner"; export declare const ATTR_GATE_RUN = "agent-qa.gate-run"; export type RunAttributeTrigger = 'cli' | 'dashboard' | 'api' | 'mcp'; export type RunAttributeRunner = 'local' | 'remote'; export declare const RUN_ATTRIBUTE_KEY_MAX_LENGTH = 256; export declare const RUN_ATTRIBUTE_VALUE_MAX_LENGTH = 4096; export interface ParsedRunAttrFlags { attributes: RunAttributes; duplicateKeys: string[]; } export declare function validateUserRunAttributes(input: unknown, sourceLabel?: string): RunAttributes; export declare function parseRunAttrFlags(flags: string[] | undefined): ParsedRunAttrFlags; export declare function buildInternalRunAttributes(input: { trigger: RunAttributeTrigger; runner: RunAttributeRunner; }): RunAttributes; export declare function mergeRunAttributes(internal: RunAttributes, user: RunAttributes): RunAttributes; export declare function sortRunAttributesForDisplay(attributes: RunAttributes, activeKeys?: string[]): Array<[string, string]>; export declare function formatRunAttributesBlock(attributes: RunAttributes): string; interface PluginField { path: string; type: string; required: boolean; default?: unknown; description?: string; credential: boolean; } interface PluginDescription { entry: string; package?: string; path?: string; origin: ResolvedPluginEntry['origin']; version?: string; protocol?: number; serves: string[]; methods: string[]; runFacts: string[]; skill?: string; options: PluginField[]; settings: PluginField[]; } export declare function describePlugin(resolved: ResolvedPluginEntry): PluginDescription; export declare function isNpmPackageName(name: string): boolean; export declare function pluginsAddLine(packageName: string, configPath?: string, cwd?: string): string; export declare const SUBSCRIPTION_AUTH_PACKAGE = "@vostride/agent-qa-subscription-auth"; type PluginManifestRead = { ok: true; manifest: PluginManifest; name: string; version: string; packageDir: string; } | { ok: false; issue: string; name?: string; version?: string; packageDir: string; }; export declare function readPluginManifest(packageJsonPath: string): PluginManifestRead; export declare const MAX_PLUGIN_SCHEMA_BYTES: number; export declare const MAX_PLUGIN_SCHEMA_DEPTH = 64; interface PluginConfigIssue { scope: 'options' | 'settings'; remote?: string; path: (string | number)[]; message: string; } interface PluginConfigInput { options: unknown; remotes: readonly { name: string; settings?: unknown; }[]; } export declare function checkPluginConfig(resolved: ResolvedPluginEntry, config: PluginConfigInput): PluginConfigIssue[]; interface PluginRemoteUse { remote: string; place: 'web' | 'device'; } interface PluginRemoteRefusal { remote: string; entry: string; kind: 'version' | 'refused' | 'auth'; message: string; place?: PluginRemoteUse['place']; } interface PluginRemoteRefusalsInput extends ResolvePluginEntryOptions { plugins: readonly PluginEntryInput[]; remotes: readonly { name: string; plugin?: string; settings?: unknown; }[]; uses: readonly PluginRemoteUse[]; declaredSecrets?: { has(name: string): boolean; }; } export declare function pluginRemoteRefusals(input: PluginRemoteRefusalsInput): PluginRemoteRefusal[]; interface PluginPackageCheck { name: string; ok: boolean; detail?: string; warning?: boolean; } interface PluginPackageReport { packageDir?: string; remote: boolean; checks: PluginPackageCheck[]; } interface ValidatePluginPackageOptions { configDir: string; configPath?: string; agentQaVersion: string; cwd?: string; } export declare function validatePluginPackage(target: string, options: ValidatePluginPackageOptions): PluginPackageReport; export type WebPlace = { kind: 'local'; } | { kind: 'remote'; remote: RemoteBrowserConfig | RemotePluginBrowserConfig; }; export type BrowserEngine = 'chromium' | 'firefox' | 'webkit'; export interface SelectWebPlaceInput { remotes: readonly RemoteEntry[]; suite?: string; test?: string; config?: string; file?: string; engine?: BrowserEngine; } export interface SuiteMemberPick { file: string; pick?: string; } export interface SelectSuitePlaceInput { remotes: readonly RemoteEntry[]; suiteName: string; suiteFile: string; suite?: string; config?: string; members: readonly SuiteMemberPick[]; engine?: BrowserEngine; } export type SelectWebPlaceResult = { place: WebPlace; } | { refusal: string; }; export type BrowserRemoteEntry = (UrlRemoteEntry & { protocol: RemoteBrowserProtocol; }) | PluginRemoteEntry; export declare function toRemoteBrowserConfig(entry: UrlRemoteEntry & { protocol: RemoteBrowserProtocol; }): RemoteBrowserConfig; export declare function toRemoteBrowserConfig(entry: PluginRemoteEntry): RemotePluginBrowserConfig; export declare function toRemoteBrowserConfig(entry: BrowserRemoteEntry): RemoteBrowserConfig | RemotePluginBrowserConfig; export declare function selectWebPlace(input: SelectWebPlaceInput): SelectWebPlaceResult; export declare function selectSuitePlace(input: SelectSuitePlaceInput): SelectWebPlaceResult; export declare function runnerForPlaces(places: readonly (WebPlace | DevicePlace)[]): RunAttributeRunner; export declare function projectRemotesInConfigText(raw: string): string; export type RemoteConnectionFields = Pick; export interface ConnectionSecretSplit { readonly stepStore: SecretStore; readonly connectionNames: ReadonlySet; } export declare function splitConnectionSecrets(store: SecretStore, config: unknown): ConnectionSecretSplit; export interface MissingRemoteSecret { readonly remote: R; readonly name: string; } export declare function missingRemoteSecrets(remotes: readonly R[], store: { has(name: string): boolean; }): MissingRemoteSecret[]; export declare function missingRemoteSecretSentence(missing: MissingRemoteSecret, secretsFile: string | undefined): string; export interface DeviceUse { readonly device: string; readonly remote?: RemoteConnectionFields | undefined; readonly appRef?: string | undefined; } export interface MissingDeviceSecret { readonly device: string; readonly remote?: RemoteConnectionFields | undefined; readonly name: string; } export declare function missingDeviceSecrets(used: readonly DeviceUse[], devices: Readonly>, store: { has(name: string): boolean; }): MissingDeviceSecret[]; export declare function missingDeviceSecretSentence(missing: MissingDeviceSecret, secretsFile: string | undefined): string; export interface ConnectionSecretMisuseInput { readonly names: ReadonlySet; readonly file: string; readonly steps: readonly unknown[]; readonly target?: string; } export declare function connectionSecretMisuse(input: ConnectionSecretMisuseInput): string[]; export interface RemoteDeviceEndpoint { readonly protocol: 'http' | 'https'; readonly hostname: string; readonly port: number; readonly path: string; readonly query?: Readonly>; } export interface RemoteDeviceConnection extends RemoteDeviceEndpoint { readonly headers: Readonly>; } export declare function remoteDeviceEndpoint(url: URL): RemoteDeviceEndpoint | undefined; export interface RemoteDeviceConnectionInput { readonly remote: RemoteDeviceConfig; readonly device: string; readonly secrets?: SecretResolver | undefined; readonly secretsFile?: string | undefined; } export declare function resolveRemoteDeviceConnection(input: RemoteDeviceConnectionInput): RemoteDeviceConnection; /** How long any request after the new session may go unanswered before the test ends as lost. */ export declare const REMOTE_COMMAND_BOUND_MS = 120000; type RemoteNamed = Pick; export declare function remoteDeviceLabel(remote: RemoteNamed): string; export interface RemoteDeviceReply { readonly statusCode: number; readonly body: unknown; } export interface RemoteDeviceRequestBounds { readonly clientTimeoutMs: number; boundRequest(request: T): T; captureReply(reply: T): T; markOpened(): void; newSessionReply(): RemoteDeviceReply | undefined; } export declare function createRemoteDeviceRequestBounds(options: { connectTimeoutMs: number; commandBoundMs: number; }): RemoteDeviceRequestBounds; export declare function classifyNewSessionFailure(reply: RemoteDeviceReply | undefined, error: unknown): RemoteFailureKind; export declare function serverReasonLine(source: { reply?: RemoteDeviceReply | undefined; error?: unknown; }, mask: (text: string) => string): string | undefined; export interface RemoteDeviceRefusalContext { readonly remote: RemoteDeviceConfig; readonly device: string; readonly secretsFile?: string | undefined; readonly secretNames: readonly string[]; readonly reason?: string | undefined; } export declare function remoteDeviceRefusalSentence(kind: RemoteFailureKind, context: RemoteDeviceRefusalContext): string; export declare function classifyCommandFailure(error: unknown): 'lost' | 'ended' | undefined; export declare function remoteDeviceLostSentence(kind: 'lost' | 'ended', context: { remote: RemoteNamed; device: string; error?: unknown; }): string; export declare function scrubDeviceEndpoint(text: string, remote: RemoteNamed): string; export declare function deviceDebugLoggingRefusal(env: { WDIO_LOG_LEVEL?: string | undefined; NODE_DEBUG?: string | undefined; }, context: { remote: Pick; device: string; }): string | undefined; export declare function webdriverLogLevel(options: { verbose: boolean; anyRemoteDevice: boolean; }): 'info' | 'silent'; export declare function anyRemoteDevice(config: { registry?: { devices?: Record | undefined; } | undefined; }): boolean; export declare function iosDeviceTypeFromInfo(info: unknown): IOSDeviceType; export declare function isUnknownCommandError(error: unknown): boolean; export declare function remoteDeviceRefusalKey(remote: Pick, device: string, kind: RemoteFailureKind | undefined): string; export declare function referencedSecretNames(value: unknown): string[]; export interface DeviceSecretsInput { readonly connectionSecrets?: SecretResolver | undefined; readonly secretsFile?: string | undefined; } export declare function withDeviceSecretsResolved(capabilities: CapabilityMap, options: DeviceSecretsInput, subject: string, details?: { remote?: string; }): CapabilityMap; export declare function rememberedDeviceRefusal(memory: RemoteRefusalMemory | undefined, remoteDevice: Pick, device: string): RemoteRefusalError | undefined; export declare function refuseLeakingDeviceLogs(device: string, remote: { name: string; }, label: string): void; export interface RemoteDeviceProfile { readonly name: string; readonly model?: string | undefined; readonly os?: string | undefined; readonly id?: string | undefined; readonly capabilities?: CapabilityMap | undefined; } export interface RemoteDeviceTest { readonly platform: MobilePlatform; readonly device: RemoteDeviceProfile; readonly target: RunStartCapabilityInput['target']; readonly appState: 'preserve' | 'reset'; readonly browserName: string | undefined; readonly appRef?: string | undefined; readonly appPath?: string | undefined; readonly testName?: string | undefined; readonly derived: CapabilityMap; } export interface PluginDeviceSessionOptions extends DeviceSecretsInput { readonly refusalMemory?: RemoteRefusalMemory | undefined; readonly pluginSessions?: RemoteLeaseSource | undefined; } export interface PluginDeviceSessionInput extends RemoteDeviceTest { readonly remote: RemotePluginDeviceConfig; readonly options: PluginDeviceSessionOptions; open(session: { remote: RemoteDeviceConfig; connection: RemoteDeviceConnection; capabilities: CapabilityMap; }): Promise; } export interface PluginDeviceSession { readonly driver: Driver; readonly lease: RemoteLease; readonly release: () => Promise; readonly remote: RemoteDeviceConfig; } export declare function remoteDeviceCapabilities(test: RemoteDeviceTest, remote: RemoteDeviceConfig, options: DeviceSecretsInput): CapabilityMap; export declare function createPluginDeviceSession(input: PluginDeviceSessionInput): Promise>; interface PluginAnswerContext { serves: readonly string[]; place: 'web' | 'device'; engine?: string; remote: string; entry: string; } export declare function checkPluginAnswer(answer: { protocol: RemoteProtocol; url: string; }, context: PluginAnswerContext): RemoteRefusalError | undefined; interface PluginHostBounds { initializeMs: number; checkMs: number; startedMs: number; endMs: number; releaseMs: number; shutdownMs: number; signalMs: number; cancelGraceMs: number; killAfterMs: number; } export declare const DEFAULT_PLUGIN_HOST_BOUNDS: PluginHostBounds; interface PluginHostProgress extends RemoteProgress { remote: string; entry: string; } interface PluginHostPoolInput { configDir: string; configPath?: string; plugins: readonly PluginEntryInput[]; agentQaVersion: string; hostVersions: { playwright: string; webdriverio: string; }; resolveSecrets: (value: Record) => Record; runFacts?: { runId?: string; }; marksSessions?: boolean; mask: (text: string) => string; onMask?: (entry: string, values: readonly string[]) => void; onProgress?: (event: PluginHostProgress) => void; debugLog?: (line: string) => void; sessions?: RemoteSessionRegistry; bounds?: Partial; } type PluginUploadRequest = Parameters>[0]; interface PluginCheckRemote { name: string; settings?: Record; } interface PluginHostPool extends RemoteLeaseSource { uploadApp(request: PluginUploadRequest): Promise<{ ref: string; }>; check(entry: string, remotes: readonly PluginCheckRemote[]): Promise; shutdown(options?: { signal?: boolean; }): Promise; } export declare function createPluginHostPool(input: PluginHostPoolInput): PluginHostPool; interface PluginHostVersions { playwright: string; webdriverio: string; } export declare function installedPackageVersion(specifier: string, fromUrl: string): string; export declare function pluginHostVersions(fromUrl: string): PluginHostVersions; export declare function pluginSecretResolver(secrets: SecretResolver | undefined, secretsFile: string): (value: Record) => Record; export declare const AGENT_QA_VERSION: string; export declare function getAgentQaVersion(): string; export declare const VERSION_CHECK_CACHE_TTL_MS: number; export declare const VERSION_CHECK_TIMEOUT_MS = 5000; export interface AgentQaUpdateStatus { installedVersion: string; latestVersion?: string; updateAvailable: boolean; checkedAt?: string; } type VersionCheckFetch = (input: string | URL | Request, init?: RequestInit) => Promise; export interface VersionCheckOptions { cachePath?: string; fetchImpl?: VersionCheckFetch; now?: () => Date; timeoutMs?: number; cacheTtlMs?: number; homeDir?: string; } export interface VersionCheckResponse { statusCode?: number; setEncoding(encoding: BufferEncoding): unknown; on(event: string, listener: (...args: any[]) => void): unknown; resume(): unknown; } export interface VersionCheckClientRequest { on(event: string, listener: (...args: any[]) => void): unknown; destroy(): unknown; } export type VersionCheckRequest = (url: string, options: { headers: Record; timeout: number; }, onResponse: (response: VersionCheckResponse) => void) => VersionCheckClientRequest; export declare function getAgentQaVersionCheckCachePath(homeDir?: string): string; export declare function compareSemverVersions(left: string, right: string): -1 | 0 | 1 | undefined; export declare function validSemverVersion(version: unknown): string | undefined; export interface AgentQaBreakingStep { from: string; to: string; } export declare function agentQaBreakingSteps(from: string, to: string): AgentQaBreakingStep[]; export declare function semverRangeFloor(range: string): string | undefined; export declare function getAgentQaUpdateStatus(options?: VersionCheckOptions): Promise; export declare function readCachedAgentQaUpdateStatus(options: { homeDir?: string; currentVersion: string; }): Promise; export interface LatestAgentQaAnswer { source: 'registry' | 'cache' | 'none'; latestVersion?: string; } export declare function askLatestAgentQaVersion(options: { homeDir?: string; fetchImpl: VersionCheckFetch; timeoutMs: number; now?: () => Date; }): Promise; export declare const VERSION_REFRESH_START_WINDOW_MS: number; export declare const VERSION_REFRESH_DEADLINE_MS = 15000; export declare function claimAgentQaVersionRefresh(options: { homeDir?: string; now: number; }): Promise; export declare function refreshAgentQaVersionCheck(options: { homeDir?: string; now: number; request: VersionCheckRequest; deadlineMs?: number; }): Promise; export declare const DEFAULT_AGENT_QA_RUNTIME_DIR = ".agent-qa"; export declare const DEFAULT_AGENT_QA_ARTIFACTS_DIR = ".agent-qa/artifacts"; export declare const DEFAULT_AGENT_QA_CACHE_DIR = ".agent-qa/cache"; export declare const DEFAULT_AGENT_QA_AUTH_STATES_DIR = ".agent-qa/auth-states"; export declare const DEFAULT_AGENT_QA_SCREENSHOTS_DIR = ".agent-qa/artifacts/screenshots"; export declare const DEFAULT_AGENT_QA_VIDEOS_DIR = ".agent-qa/artifacts/videos"; export declare const DEFAULT_AGENT_QA_RUNS_DB_PATH = ".agent-qa/runs.db"; export declare const LEGACY_AGENT_QA_DASHBOARD_DB_PATH = ".agent-qa/dashboard.db"; /** * The runs database a config names, without migrating anything: the configured path, else the * default, else a legacy dashboard.db nothing has renamed yet. The writer's resolver renames that * legacy file on top of this; the CLI reader binds only the configured or default path. */ export declare function locateRunsDbPath(configDir: string, configuredDbPath?: string): string; export declare function isPathInsideDir(childPath: string, parentDir: string): boolean; export { AUTH_STATE_HOOK_CONTAINER_STORAGE_STATE_PATH, AUTH_STATE_HOOK_JSON_ENV, AUTH_STATE_HOOK_STORAGE_STATE_FILENAME, AUTH_STATE_HOOK_STORAGE_STATE_PATH_ENV, AUTH_STATE_HOOK_WORKSPACE_DIR, type AgentQaConfig, type AsyncScopeStore, type AuthCredential, type AuthPluginBundle, type AuthProvider, type AuthStateMetadata, type AuthStateTargetPlatform, type AuthStore, type CaptureConfig, type CreateAuthFetchContext, type CreateAuthFetchOptions, type DashboardAuthMetadata, type DashboardAuthMode, type ExchangeCodeContext, type FileAttachment, type HookDefinition, type HookResult, type HookRuntime, type IdentifiedScrollOffsets, type InProcessPluginKind, type InProcessRefusal, type InProcessSelection, type LLMAuthProviderPlugin, type LLMModelAdapter, type LLMProviderMode, type ListAuthStateMetadataInput, type LoadLLMAuthPluginsOptions, type LogColors, type LogEntry, type LogLevel, type LogLine, type LogLineLevel, type LogSource, type LogStorage, type MemberLogScope, type MobileNode, type MobileRefMap, type NormalizedAuthStateUse, type OAuthTokens, PLUGIN_ENVIRONMENT_NAMES, PLUGIN_WINDOWS_ENVIRONMENT_NAMES, type ParseAllTestBindingsResult, type ParseError, type ParseResult, type ParsedMobileSource, type ParsedTestBinding, type ParsedTestDocument, type PluginAnswerContext, type PluginCheckRemote, type PluginConfigInput, type PluginConfigIssue, type PluginDescription, type PluginEntry, type PluginEntryInput, type PluginEntryState, type PluginField, type PluginHostBounds, type PluginHostPool, type PluginHostPoolInput, type PluginHostProgress, type PluginHostVersions, type PluginManifestRead, type PluginOrigin, type PluginPackageCheck, type PluginPackageReport, type PluginRemoteEntry, type PluginRemoteInput, type PluginRemoteRefusal, type PluginRemoteRefusalsInput, type PluginRemoteUse, type PluginUploadRequest, type PrintRunTextOptions, type ProviderPluginDescriptor, RUNTIME_IMAGE_MAP, type RefEntry, type RegistryConfig, type RemoteEntry, type RemoveAuthStateFilesInput, type RemoveAuthStateTargetInput, type ResolveAuthStateForRunInput, type ResolveAuthStatePathsInput, type ResolveAuthStateRootInput, type ResolvePluginEntryOptions, type ResolvedAuthStateForRun, type ResolvedAuthStatePaths, type ResolvedLLMAuth, type ResolvedPluginEntry, type RunSuiteConfig, type RunTextEnv, type SavedCredential, type ScopedLogger, type ServicesConfig, type StartAuthContext, type StartAuthResult, type SuiteDefinition, type SuiteResult, type TestConfig, type TestDefinition, type TestMeta, type TestStep, type TokenRefreshFn, type UrlRemoteEntry, type UseConfig, type ValidatePluginPackageOptions, type ValidationDiagnostic, type ValidationResult, type WorkspaceConfig, type WriteAuthStateFilesInput, buildAuthStateHookEnv, hookRunnerImage, isReservedAuthStateHookEnvKey, parseEnvFile, pluginEnvironment, serializeEnvFile, stripReservedAuthStateHookEnv };