import { OpensteerEngineFactory, DomDescriptorStore as DomDescriptorStore$1, OpensteerExtractionDescriptorStore as OpensteerExtractionDescriptorStore$1 } from '@opensteer/runtime-core'; export { OpensteerEngineFactory, OpensteerEngineFactoryOptions, OpensteerRuntimeWorkspace } from '@opensteer/runtime-core'; type JsonPrimitive$1 = boolean | number | string | null; type JsonValue$1 = JsonPrimitive$1 | JsonObject$1 | JsonArray$1; interface JsonObject$1 { readonly [key: string]: JsonValue$1; } type JsonArray$1 = readonly JsonValue$1[]; declare const OPENSTEER_PROTOCOL_VERSION: string; type OpensteerProtocolVersion = typeof OPENSTEER_PROTOCOL_VERSION; interface ExternalBinaryLocation { readonly delivery: "external"; readonly uri: string; readonly mimeType: string; readonly byteLength: number; readonly sha256: string; } declare const brandSymbol: unique symbol; type Brand = Value & { readonly [brandSymbol]: Name; }; type SessionRef = Brand; type PageRef = Brand; type FrameRef = Brand; type DocumentRef = Brand; type NodeRef = Brand; type NetworkRequestId = Brand; type DownloadRef = Brand; type DialogRef = Brand; type ChooserRef = Brand; type WorkerRef = Brand; type DocumentEpoch = Brand; interface NodeLocator { readonly documentRef: DocumentRef; readonly documentEpoch: DocumentEpoch; readonly nodeRef: NodeRef; } type PageLifecycleState = "opening" | "open" | "closing" | "closed" | "crashed"; interface PageInfo { readonly pageRef: PageRef; readonly sessionRef: SessionRef; readonly targetId?: string; readonly openerPageRef?: PageRef; readonly url: string; readonly title: string; readonly lifecycleState: PageLifecycleState; } interface FrameInfo { readonly frameRef: FrameRef; readonly pageRef: PageRef; readonly parentFrameRef?: FrameRef; readonly documentRef: DocumentRef; readonly documentEpoch: DocumentEpoch; readonly url: string; readonly name?: string; readonly isMainFrame: boolean; } interface Point { readonly x: number; readonly y: number; } interface Size { readonly width: number; readonly height: number; } interface Rect { readonly x: number; readonly y: number; readonly width: number; readonly height: number; } type Quad = readonly [Point, Point, Point, Point]; interface ScrollOffset { readonly x: number; readonly y: number; } type CoordinateSpace = "document-css" | "layout-viewport-css" | "visual-viewport-css" | "computer-display-css" | "window" | "screen" | "device-pixel"; interface LayoutViewport { readonly origin: Point; readonly size: Size; } interface VisualViewport { readonly origin: Point; readonly offsetWithinLayoutViewport: ScrollOffset; readonly size: Size; } type DevicePixelRatio = Brand; type PageScaleFactor = Brand; type PageZoomFactor = Brand; interface ViewportMetrics { readonly layoutViewport: LayoutViewport; readonly visualViewport: VisualViewport; readonly scrollOffset: ScrollOffset; readonly contentSize: Size; readonly devicePixelRatio: DevicePixelRatio; readonly pageScaleFactor: PageScaleFactor; readonly pageZoomFactor: PageZoomFactor; } interface HeaderEntry { readonly name: string; readonly value: string; } type BodyPayloadEncoding = "identity" | "base64" | "gzip" | "deflate" | "brotli" | "unknown"; interface BodyPayload$1 { readonly bytes: Uint8Array; readonly encoding: BodyPayloadEncoding; readonly mimeType?: string; readonly charset?: string; readonly truncated: boolean; readonly capturedByteLength: number; readonly originalByteLength?: number; } type NetworkCaptureState = "pending" | "complete" | "failed" | "skipped"; type NetworkRecordKind = "http" | "websocket" | "event-stream"; type NetworkResourceType = "document" | "stylesheet" | "image" | "media" | "font" | "script" | "fetch" | "xhr" | "websocket" | "event-stream" | "manifest" | "texttrack" | "beacon" | "ping" | "preflight" | "other"; type NetworkInitiatorType = "parser" | "script" | "preload" | "redirect" | "user" | "service-worker" | "other"; interface NetworkInitiator { readonly type: NetworkInitiatorType; readonly url?: string; readonly lineNumber?: number; readonly columnNumber?: number; readonly requestId?: NetworkRequestId; readonly stackTrace?: readonly string[]; } interface NetworkTiming { readonly requestStartMs?: number; readonly dnsStartMs?: number; readonly dnsEndMs?: number; readonly connectStartMs?: number; readonly connectEndMs?: number; readonly sslStartMs?: number; readonly sslEndMs?: number; readonly requestSentMs?: number; readonly responseStartMs?: number; readonly responseEndMs?: number; readonly workerStartMs?: number; readonly workerReadyMs?: number; } interface NetworkTransferSizes { readonly requestHeadersBytes?: number; readonly responseHeadersBytes?: number; readonly encodedBodyBytes?: number; readonly decodedBodyBytes?: number; readonly transferSizeBytes?: number; } interface NetworkSourceMetadata { readonly protocol?: string; readonly remoteAddress?: { readonly ip?: string; readonly port?: number; }; readonly fromServiceWorker?: boolean; readonly fromDiskCache?: boolean; readonly fromMemoryCache?: boolean; readonly workerRef?: WorkerRef; } interface NetworkRecord$1 { readonly kind: NetworkRecordKind; readonly requestId: NetworkRequestId; readonly sessionRef: SessionRef; readonly pageRef?: PageRef; readonly frameRef?: FrameRef; readonly documentRef?: DocumentRef; readonly method: string; readonly url: string; readonly requestHeaders: readonly HeaderEntry[]; readonly responseHeaders: readonly HeaderEntry[]; readonly status?: number; readonly statusText?: string; readonly resourceType: NetworkResourceType; readonly redirectFromRequestId?: NetworkRequestId; readonly redirectToRequestId?: NetworkRequestId; readonly navigationRequest: boolean; readonly initiator?: NetworkInitiator; readonly timing?: NetworkTiming; readonly transfer?: NetworkTransferSizes; readonly source?: NetworkSourceMetadata; readonly captureState: NetworkCaptureState; readonly requestBodyState: NetworkCaptureState; readonly responseBodyState: NetworkCaptureState; readonly requestBodySkipReason?: string; readonly responseBodySkipReason?: string; readonly requestBodyError?: string; readonly responseBodyError?: string; readonly requestBody?: BodyPayload$1; readonly responseBody?: BodyPayload$1; } interface NetworkRecordFilterInput { readonly url?: string; readonly hostname?: string; readonly path?: string; readonly method?: string; readonly status?: string; readonly resourceType?: NetworkResourceType; } type ScreenshotFormat = "png" | "jpeg" | "webp"; interface ScreenshotArtifact$1 { readonly pageRef: PageRef; readonly frameRef?: FrameRef; readonly documentRef?: DocumentRef; readonly documentEpoch?: DocumentEpoch; readonly payload: BodyPayload$1; readonly format: ScreenshotFormat; readonly size: Size; readonly coordinateSpace: CoordinateSpace; readonly clip?: Rect; } interface HtmlSnapshot { readonly pageRef: PageRef; readonly frameRef: FrameRef; readonly documentRef: DocumentRef; readonly documentEpoch: DocumentEpoch; readonly url: string; readonly capturedAt: number; readonly html: string; } interface DomSnapshotNode { readonly snapshotNodeId: number; readonly nodeRef?: NodeRef; readonly parentSnapshotNodeId?: number; readonly childSnapshotNodeIds: readonly number[]; readonly shadowRootType?: "open" | "closed" | "user-agent"; readonly shadowHostNodeRef?: NodeRef; readonly contentDocumentRef?: DocumentRef; readonly nodeType: number; readonly nodeName: string; readonly nodeValue: string; readonly textContent?: string; readonly computedStyle?: { readonly display?: string; readonly visibility?: string; readonly opacity?: string; readonly position?: string; readonly cursor?: string; readonly overflowX?: string; readonly overflowY?: string; }; readonly attributes: readonly { readonly name: string; readonly value: string; }[]; readonly layout?: { readonly rect?: Rect; readonly quad?: Quad; readonly paintOrder?: number; }; } type ShadowDomSnapshotMode = "flattened" | "preserved" | "unsupported"; interface DomSnapshot { readonly pageRef: PageRef; readonly frameRef: FrameRef; readonly documentRef: DocumentRef; readonly parentDocumentRef?: DocumentRef; readonly documentEpoch: DocumentEpoch; readonly url: string; readonly capturedAt: number; readonly rootSnapshotNodeId: number; readonly shadowDomMode: ShadowDomSnapshotMode; readonly geometryCoordinateSpace?: CoordinateSpace; readonly nodes: readonly DomSnapshotNode[]; } interface HitTestResult { readonly inputPoint: Point; readonly inputCoordinateSpace: CoordinateSpace; readonly resolvedPoint: Point; readonly resolvedCoordinateSpace: CoordinateSpace; readonly pageRef: PageRef; readonly frameRef: FrameRef; readonly documentRef: DocumentRef; readonly documentEpoch: DocumentEpoch; readonly nodeRef?: NodeRef; readonly targetQuad?: Quad; readonly obscured: boolean; readonly pointerEventsSkipped: boolean; } type VisualStabilityScope = "main-frame" | "visible-frames"; type CookieSameSite = "strict" | "lax" | "none"; type CookiePriority = "low" | "medium" | "high"; interface CookieRecord { readonly sessionRef: SessionRef; readonly name: string; readonly value: string; readonly domain: string; readonly path: string; readonly secure: boolean; readonly httpOnly: boolean; readonly sameSite?: CookieSameSite; readonly priority?: CookiePriority; readonly partitionKey?: string; readonly session: boolean; readonly expiresAt?: number | null; } interface StorageEntry { readonly key: string; readonly value: string; } interface IndexedDbRecord { readonly key: unknown; readonly primaryKey?: unknown; readonly value: unknown; } interface IndexedDbIndexSnapshot { readonly name: string; readonly keyPath?: string | readonly string[]; readonly multiEntry: boolean; readonly unique: boolean; } interface IndexedDbObjectStoreSnapshot { readonly name: string; readonly keyPath?: string | readonly string[]; readonly autoIncrement: boolean; readonly indexes: readonly IndexedDbIndexSnapshot[]; readonly records: readonly IndexedDbRecord[]; } interface IndexedDbDatabaseSnapshot { readonly name: string; readonly version: number; readonly objectStores: readonly IndexedDbObjectStoreSnapshot[]; } interface StorageOriginSnapshot { readonly origin: string; readonly localStorage: readonly StorageEntry[]; readonly indexedDb?: readonly IndexedDbDatabaseSnapshot[]; } interface SessionStorageSnapshot { readonly pageRef: PageRef; readonly frameRef: FrameRef; readonly origin: string; readonly entries: readonly StorageEntry[]; } interface StorageSnapshot { readonly sessionRef: SessionRef; readonly capturedAt: number; readonly origins: readonly StorageOriginSnapshot[]; readonly sessionStorage?: readonly SessionStorageSnapshot[]; } interface BrowserCapabilities { readonly executor: { readonly sessionLifecycle: boolean; readonly pageLifecycle: boolean; readonly navigation: boolean; readonly pointerInput: boolean; readonly keyboardInput: boolean; readonly touchInput: boolean; readonly screenshots: boolean; readonly executionControl: { readonly pause: boolean; readonly resume: boolean; readonly freeze: boolean; }; }; readonly inspector: { readonly pageEnumeration: boolean; readonly frameEnumeration: boolean; readonly html: boolean; readonly domSnapshot: boolean; readonly visualStability: boolean; readonly text: boolean; readonly attributes: boolean; readonly hitTest: boolean; readonly viewportMetrics: boolean; readonly network: boolean; readonly networkBodies: boolean; readonly cookies: boolean; readonly localStorage: boolean; readonly sessionStorage: boolean; readonly indexedDb: boolean; }; readonly transport: { readonly sessionHttp: boolean; }; readonly instrumentation: { readonly initScripts: boolean; readonly routing: boolean; }; readonly events: { readonly pageLifecycle: boolean; readonly dialog: boolean; readonly download: boolean; readonly chooser: boolean; readonly worker: boolean; readonly console: boolean; readonly pageError: boolean; readonly websocket: boolean; readonly eventStream: boolean; readonly executionState: boolean; }; } interface PostLoadTrackerSnapshot { readonly lastMutationAt: number; readonly lastTrackedNetworkActivityAt: number; readonly trackedPendingFetches: number; readonly trackedPendingXhrs: number; } interface ActionBoundarySnapshot { readonly pageRef: PageRef; readonly documentRef: DocumentRef; readonly url?: string; readonly tracker?: PostLoadTrackerSnapshot; } type ActionBoundarySettleTrigger = "dom-action" | "navigation"; type ActionBoundaryTimedOutPhase = "bootstrap"; interface ActionBoundaryOutcome { readonly trigger: ActionBoundarySettleTrigger; readonly crossDocument: boolean; readonly bootstrapSettled: boolean; readonly observedMutationQuietMs?: number; readonly postLoadHandled?: boolean; readonly timedOutPhase?: ActionBoundaryTimedOutPhase; } type ConsoleLevel = "debug" | "log" | "info" | "warn" | "error" | "trace"; interface StepEventBase { readonly eventId: string; readonly kind: string; readonly timestamp: number; readonly sessionRef: SessionRef; readonly pageRef?: PageRef; readonly frameRef?: FrameRef; readonly documentRef?: DocumentRef; readonly documentEpoch?: DocumentEpoch; } interface PageCreatedStepEvent extends StepEventBase { readonly kind: "page-created"; readonly pageRef: PageRef; } interface PopupOpenedStepEvent extends StepEventBase { readonly kind: "popup-opened"; readonly pageRef: PageRef; readonly openerPageRef: PageRef; } interface PageClosedStepEvent extends StepEventBase { readonly kind: "page-closed"; readonly pageRef: PageRef; } interface DialogOpenedStepEvent extends StepEventBase { readonly kind: "dialog-opened"; readonly dialogRef: DialogRef; readonly dialogType: "alert" | "beforeunload" | "confirm" | "prompt"; readonly message: string; readonly defaultValue?: string; } interface DownloadStartedStepEvent extends StepEventBase { readonly kind: "download-started"; readonly downloadRef: DownloadRef; readonly url: string; readonly suggestedFilename?: string; } interface DownloadFinishedStepEvent extends StepEventBase { readonly kind: "download-finished"; readonly downloadRef: DownloadRef; readonly state: "completed" | "canceled" | "failed"; readonly filePath?: string; } interface ChooserOpenedStepEvent extends StepEventBase { readonly kind: "chooser-opened"; readonly chooserRef: ChooserRef; readonly chooserType: "file" | "select"; readonly multiple: boolean; readonly options?: readonly { readonly index: number; readonly label: string; readonly value: string; readonly selected: boolean; }[]; } interface WorkerCreatedStepEvent extends StepEventBase { readonly kind: "worker-created"; readonly workerRef: WorkerRef; readonly workerType: "dedicated" | "shared" | "service"; readonly url: string; } interface WorkerDestroyedStepEvent extends StepEventBase { readonly kind: "worker-destroyed"; readonly workerRef: WorkerRef; readonly workerType: "dedicated" | "shared" | "service"; readonly url: string; } interface ConsoleStepEvent extends StepEventBase { readonly kind: "console"; readonly level: ConsoleLevel; readonly text: string; readonly location?: { readonly url?: string; readonly lineNumber?: number; readonly columnNumber?: number; }; } interface PageErrorStepEvent extends StepEventBase { readonly kind: "page-error"; readonly message: string; readonly stack?: string; } interface WebSocketOpenedStepEvent extends StepEventBase { readonly kind: "websocket-opened"; readonly socketId: string; readonly url: string; } interface WebSocketFrameStepEvent extends StepEventBase { readonly kind: "websocket-frame"; readonly socketId: string; readonly direction: "sent" | "received"; readonly opcode?: number; readonly payloadPreview?: string; } interface WebSocketClosedStepEvent extends StepEventBase { readonly kind: "websocket-closed"; readonly socketId: string; readonly code?: number; readonly reason?: string; } interface EventStreamMessageStepEvent extends StepEventBase { readonly kind: "event-stream-message"; readonly streamId: string; readonly eventName?: string; readonly dataPreview?: string; } interface PausedStepEvent extends StepEventBase { readonly kind: "paused"; readonly reason?: string; } interface ResumedStepEvent extends StepEventBase { readonly kind: "resumed"; readonly reason?: string; } interface FrozenStepEvent extends StepEventBase { readonly kind: "frozen"; readonly reason?: string; } type StepEvent = PageCreatedStepEvent | PopupOpenedStepEvent | PageClosedStepEvent | DialogOpenedStepEvent | DownloadStartedStepEvent | DownloadFinishedStepEvent | ChooserOpenedStepEvent | WorkerCreatedStepEvent | WorkerDestroyedStepEvent | ConsoleStepEvent | PageErrorStepEvent | WebSocketOpenedStepEvent | WebSocketFrameStepEvent | WebSocketClosedStepEvent | EventStreamMessageStepEvent | PausedStepEvent | ResumedStepEvent | FrozenStepEvent; interface StepResult { readonly stepId: string; readonly sessionRef: SessionRef; readonly pageRef?: PageRef; readonly frameRef?: FrameRef; readonly documentRef?: DocumentRef; readonly documentEpoch?: DocumentEpoch; readonly startedAt: number; readonly completedAt: number; readonly durationMs: number; readonly events: readonly StepEvent[]; readonly data: TData; } type MouseButton = "left" | "middle" | "right"; type KeyModifier = "Shift" | "Control" | "Alt" | "Meta"; interface SessionTransportRequest { readonly method: string; readonly url: string; readonly headers?: readonly HeaderEntry[]; readonly body?: BodyPayload$1; readonly timeoutMs?: number; readonly followRedirects?: boolean; } interface SessionTransportResponse { readonly url: string; readonly status: number; readonly statusText: string; readonly headers: readonly HeaderEntry[]; readonly body?: BodyPayload$1; readonly redirected: boolean; } interface BrowserInitScriptInput { readonly sessionRef: SessionRef; readonly pageRef?: PageRef; readonly script: string; readonly args?: readonly unknown[]; } interface BrowserInitScriptRegistration { readonly registrationId: string; readonly sessionRef: SessionRef; readonly pageRef?: PageRef; } interface BrowserRouteRequest { readonly url: string; readonly method: string; readonly headers: readonly HeaderEntry[]; readonly resourceType: NetworkRecord$1["resourceType"]; readonly pageRef?: PageRef; readonly postData?: BodyPayload$1; } interface BrowserRouteFetchResult extends SessionTransportResponse { } type BrowserRouteHandlerResult = { readonly kind: "continue"; } | { readonly kind: "fulfill"; readonly status?: number; readonly headers?: readonly HeaderEntry[]; readonly body?: BodyPayload$1; readonly contentType?: string; } | { readonly kind: "abort"; readonly errorCode?: string; }; interface BrowserRouteRegistrationInput { readonly sessionRef: SessionRef; readonly pageRef?: PageRef; readonly urlPattern: string; readonly resourceTypes?: readonly NetworkRecord$1["resourceType"][]; readonly times?: number; readonly handler: (input: { readonly request: BrowserRouteRequest; fetchOriginal(): Promise; }) => Promise | BrowserRouteHandlerResult; } interface BrowserRouteRegistration { readonly routeId: string; readonly sessionRef: SessionRef; readonly pageRef?: PageRef; readonly urlPattern: string; } interface GetNetworkRecordsInput extends NetworkRecordFilterInput { readonly sessionRef: SessionRef; readonly pageRef?: PageRef; readonly requestIds?: readonly string[]; readonly includeBodies?: boolean; readonly signal?: AbortSignal; } interface BrowserExecutor { readonly capabilities: Readonly; createSession(): Promise; closeSession(input: { readonly sessionRef: SessionRef; }): Promise; createPage(input: { readonly sessionRef: SessionRef; readonly openerPageRef?: PageRef; readonly url?: string; }): Promise>; closePage(input: { readonly pageRef: PageRef; }): Promise>; activatePage(input: { readonly pageRef: PageRef; }): Promise>; navigate(input: { readonly pageRef: PageRef; readonly url: string; readonly referrer?: string; readonly timeoutMs?: number; }): Promise>; reload(input: { readonly pageRef: PageRef; readonly timeoutMs?: number; }): Promise>; goBack(input: { readonly pageRef: PageRef; }): Promise>; goForward(input: { readonly pageRef: PageRef; }): Promise>; stopLoading(input: { readonly pageRef: PageRef; }): Promise>; mouseMove(input: { readonly pageRef: PageRef; readonly point: Point; readonly coordinateSpace: CoordinateSpace; }): Promise>; mouseClick(input: { readonly pageRef: PageRef; readonly point: Point; readonly coordinateSpace: CoordinateSpace; readonly button?: MouseButton; readonly clickCount?: number; readonly modifiers?: readonly KeyModifier[]; }): Promise>; mouseScroll(input: { readonly pageRef: PageRef; readonly point: Point; readonly coordinateSpace: CoordinateSpace; readonly delta: Point; }): Promise>; keyPress(input: { readonly pageRef: PageRef; readonly key: string; readonly modifiers?: readonly KeyModifier[]; }): Promise>; textInput(input: { readonly pageRef: PageRef; readonly text: string; }): Promise>; captureScreenshot(input: { readonly pageRef: PageRef; readonly format?: ScreenshotFormat; readonly clip?: Rect; readonly clipSpace?: CoordinateSpace; readonly fullPage?: boolean; readonly includeCursor?: boolean; }): Promise>; setExecutionState(input: { readonly pageRef: PageRef; readonly paused?: boolean; readonly frozen?: boolean; }): Promise>; } interface BrowserInspector { readonly capabilities: Readonly; drainEvents(input: { readonly pageRef: PageRef; }): Promise; listPages(input: { readonly sessionRef: SessionRef; }): Promise; listFrames(input: { readonly pageRef: PageRef; }): Promise; getPageInfo(input: { readonly pageRef: PageRef; }): Promise; getFrameInfo(input: { readonly frameRef: FrameRef; }): Promise; getHtmlSnapshot(input: { readonly frameRef?: FrameRef; readonly documentRef?: DocumentRef; }): Promise; getDomSnapshot(input: { readonly frameRef?: FrameRef; readonly documentRef?: DocumentRef; }): Promise; getActionBoundarySnapshot(input: { readonly pageRef: PageRef; }): Promise; waitForVisualStability(input: { readonly pageRef: PageRef; readonly timeoutMs?: number; readonly settleMs?: number; readonly initialQuietMs?: number; readonly scope?: VisualStabilityScope; }): Promise; waitForPostLoadQuiet(input: { readonly pageRef: PageRef; readonly timeoutMs?: number; readonly quietMs?: number; readonly captureWindowMs?: number; readonly signal?: AbortSignal; }): Promise; readText(input: NodeLocator): Promise; readAttributes(input: NodeLocator): Promise; hitTest(input: { readonly pageRef: PageRef; readonly point: Point; readonly coordinateSpace: CoordinateSpace; readonly ignorePointerEventsNone?: boolean; readonly includeUserAgentShadowDom?: boolean; }): Promise; getViewportMetrics(input: { readonly pageRef: PageRef; }): Promise; getNetworkRecords(input: GetNetworkRecordsInput): Promise; getCookies(input: { readonly sessionRef: SessionRef; readonly urls?: readonly string[]; }): Promise; setCookies(input: { readonly sessionRef: SessionRef; readonly cookies: readonly CookieRecord[]; }): Promise; getStorageSnapshot(input: { readonly sessionRef: SessionRef; readonly includeSessionStorage?: boolean; readonly includeIndexedDb?: boolean; }): Promise; evaluatePage(input: { readonly pageRef: PageRef; readonly script: string; readonly args?: readonly unknown[]; readonly timeoutMs?: number; }): Promise>; evaluateFrame(input: { readonly frameRef: FrameRef; readonly script: string; readonly args?: readonly unknown[]; readonly timeoutMs?: number; }): Promise>; } interface SessionTransportExecutor { readonly capabilities: Readonly; executeRequest(input: { readonly sessionRef: SessionRef; readonly request: SessionTransportRequest; readonly signal?: AbortSignal; }): Promise>; } interface BrowserInstrumentation { readonly capabilities: Readonly; addInitScript(input: BrowserInitScriptInput): Promise; registerRoute(input: BrowserRouteRegistrationInput): Promise; } interface BrowserCoreEngine extends BrowserExecutor, BrowserInspector, SessionTransportExecutor, BrowserInstrumentation { } interface BodyPayload { readonly data: string; readonly encoding: BodyPayloadEncoding; readonly mimeType?: string; readonly charset?: string; readonly truncated: boolean; readonly capturedByteLength: number; readonly originalByteLength?: number; } interface NetworkRecord { readonly kind: NetworkRecordKind; readonly requestId: NetworkRequestId; readonly sessionRef: SessionRef; readonly pageRef?: PageRef; readonly frameRef?: FrameRef; readonly documentRef?: DocumentRef; readonly method: string; readonly url: string; readonly requestHeaders: readonly HeaderEntry[]; readonly responseHeaders: readonly HeaderEntry[]; readonly status?: number; readonly statusText?: string; readonly resourceType: NetworkResourceType; readonly redirectFromRequestId?: NetworkRequestId; readonly redirectToRequestId?: NetworkRequestId; readonly navigationRequest: boolean; readonly initiator?: NetworkInitiator; readonly timing?: NetworkTiming; readonly transfer?: NetworkTransferSizes; readonly source?: NetworkSourceMetadata; readonly captureState: NetworkCaptureState; readonly requestBodyState: NetworkCaptureState; readonly responseBodyState: NetworkCaptureState; readonly requestBodySkipReason?: string; readonly responseBodySkipReason?: string; readonly requestBodyError?: string; readonly responseBodyError?: string; readonly requestBody?: BodyPayload; readonly responseBody?: BodyPayload; } interface NetworkQueryRecord { readonly recordId: string; readonly capture?: string; readonly tags?: readonly string[]; readonly savedAt?: number; readonly record: NetworkRecord; } type OpensteerRequestScalar = string | number | boolean; type TransportKind = "direct-http" | "matched-tls" | "context-http" | "page-http" | "session-http"; interface OpensteerRequestEntry { readonly name: string; readonly value: string; } type OpensteerRequestParameterLocation = "path" | "query" | "header"; interface OpensteerRequestPlanParameter { readonly name: string; readonly in: OpensteerRequestParameterLocation; readonly wireName?: string; readonly required?: boolean; readonly description?: string; readonly defaultValue?: string; } interface OpensteerRequestPlanTransport { readonly kind: TransportKind; readonly requiresBrowser?: boolean; readonly requireSameOrigin?: boolean; readonly cookieJar?: string; } interface OpensteerRequestPlanEndpoint { readonly method: string; readonly urlTemplate: string; readonly defaultQuery?: readonly OpensteerRequestEntry[]; readonly defaultHeaders?: readonly OpensteerRequestEntry[]; } type OpensteerRequestPlanBodyKind = "json" | "form" | "text"; interface OpensteerRequestPlanBody { readonly kind?: OpensteerRequestPlanBodyKind; readonly contentType?: string; readonly required?: boolean; readonly description?: string; readonly template?: JsonValue$1 | string; readonly fields?: readonly OpensteerRequestEntry[]; } interface OpensteerRequestPlanResponseExpectation { readonly status: number | readonly number[]; readonly contentType?: string; } interface OpensteerRequestFailurePolicyHeaderMatch { readonly name: string; readonly valueIncludes: string; } interface OpensteerRequestFailurePolicy { readonly statusCodes?: readonly number[]; readonly finalUrlIncludes?: readonly string[]; readonly responseHeaders?: readonly OpensteerRequestFailurePolicyHeaderMatch[]; readonly responseBodyIncludes?: readonly string[]; } interface OpensteerRequestRetryBackoffPolicy { readonly strategy?: "fixed" | "exponential"; readonly delayMs: number; readonly maxDelayMs?: number; } interface OpensteerRequestRetryPolicy { readonly maxRetries: number; readonly backoff?: OpensteerRequestRetryBackoffPolicy; readonly respectRetryAfter?: boolean; readonly failurePolicy?: OpensteerRequestFailurePolicy; } interface OpensteerRequestPlanAuth { readonly strategy: "session-cookie" | "bearer-token" | "api-key" | "custom"; readonly failurePolicy?: OpensteerRequestFailurePolicy; readonly description?: string; } interface OpensteerRequestPlanPayload { readonly transport: OpensteerRequestPlanTransport; readonly endpoint: OpensteerRequestPlanEndpoint; readonly parameters?: readonly OpensteerRequestPlanParameter[]; readonly body?: OpensteerRequestPlanBody; readonly response?: OpensteerRequestPlanResponseExpectation; readonly retryPolicy?: OpensteerRequestRetryPolicy; readonly auth?: OpensteerRequestPlanAuth; } interface OpensteerRequestPlanFreshness { readonly lastValidatedAt?: number; readonly staleAt?: number; readonly expiresAt?: number; } interface OpensteerNetworkQueryInput { readonly pageRef?: PageRef; readonly recordId?: string; readonly requestId?: string; readonly capture?: string; readonly tag?: string; readonly url?: string; readonly hostname?: string; readonly path?: string; readonly method?: string; readonly status?: string | number; readonly resourceType?: NetworkResourceType; readonly includeBodies?: boolean; readonly json?: boolean; readonly before?: string; readonly after?: string; readonly limit?: number; } interface OpensteerGraphqlSummary { readonly operationType?: "query" | "mutation" | "subscription" | "unknown"; readonly operationName?: string; readonly persisted?: boolean; } interface OpensteerNetworkBodySummary { readonly bytes?: number; readonly contentType?: string; readonly streaming?: boolean; } interface OpensteerNetworkSummaryRecord { readonly recordId: string; readonly capture?: string; readonly savedAt?: number; readonly kind: NetworkQueryRecord["record"]["kind"]; readonly method: string; readonly status?: number; readonly resourceType: NetworkResourceType; readonly url: string; readonly request?: OpensteerNetworkBodySummary; readonly response?: OpensteerNetworkBodySummary; readonly graphql?: OpensteerGraphqlSummary; readonly websocket?: { readonly subprotocol?: string; }; } interface OpensteerNetworkQueryOutput { readonly records: readonly OpensteerNetworkSummaryRecord[]; } interface OpensteerParsedCookie { readonly name: string; readonly value: string; } interface OpensteerStructuredBodyPreview { readonly contentType?: string; readonly bytes: number; readonly truncated: boolean; readonly data?: JsonValue$1 | string; readonly note?: string; } interface OpensteerNetworkRedirectHop { readonly method: string; readonly status?: number; readonly url: string; readonly location?: string; readonly setCookie?: readonly string[]; } interface OpensteerNetworkDetailOutput { readonly recordId: string; readonly capture?: string; readonly savedAt?: number; readonly summary: OpensteerNetworkSummaryRecord; readonly requestHeaders: readonly HeaderEntry[]; readonly responseHeaders: readonly HeaderEntry[]; readonly cookiesSent?: readonly OpensteerParsedCookie[]; readonly requestBody?: OpensteerStructuredBodyPreview; readonly responseBody?: OpensteerStructuredBodyPreview; readonly graphql?: OpensteerGraphqlSummary & { readonly variables?: JsonValue$1; }; readonly redirectChain?: readonly OpensteerNetworkRedirectHop[]; readonly notes?: readonly string[]; readonly transportProbe?: { readonly recommended?: TransportKind; readonly attempts: readonly OpensteerReplayAttempt[]; }; } interface OpensteerReplayAttempt { readonly transport: TransportKind; readonly status?: number; readonly ok: boolean; readonly durationMs: number; readonly note?: string; readonly error?: string; } type OpensteerSessionFetchTransport = "auto" | "direct" | "matched-tls" | "context" | "page"; interface OpensteerSessionFetchInput { readonly pageRef?: PageRef; readonly url: string; readonly method?: string; readonly query?: OpensteerRequestScalarMap; readonly headers?: OpensteerRequestScalarMap; readonly body?: OpensteerRequestBodyInput; readonly transport?: OpensteerSessionFetchTransport; readonly cookies?: boolean; readonly followRedirects?: boolean; } type OpensteerStorageArea = "local" | "session"; interface OpensteerHiddenField { readonly path: string; readonly name: string; readonly value: string; } interface OpensteerStateDomainSnapshot { readonly domain: string; readonly cookies: readonly CookieRecord[]; readonly hiddenFields: readonly OpensteerHiddenField[]; readonly localStorage: readonly StorageEntry[]; readonly sessionStorage: readonly StorageEntry[]; readonly globals?: Readonly>; } interface OpensteerStateQueryOutput { readonly domains: readonly OpensteerStateDomainSnapshot[]; } type OpensteerRequestScalarMap = Readonly>; interface OpensteerJsonRequestBodyInput { readonly json: JsonValue$1; readonly contentType?: string; } interface OpensteerTextRequestBodyInput { readonly text: string; readonly contentType?: string; } interface OpensteerBase64RequestBodyInput { readonly base64: string; readonly contentType?: string; } type OpensteerRequestBodyInput = OpensteerJsonRequestBodyInput | OpensteerTextRequestBodyInput | OpensteerBase64RequestBodyInput; interface OpensteerStateSnapshot { readonly id: string; readonly capturedAt: number; readonly pageRef?: PageRef; readonly url?: string; readonly cookies?: readonly { readonly name: string; readonly value: string; readonly domain: string; readonly path: string; readonly secure: boolean; readonly httpOnly: boolean; readonly sameSite?: "strict" | "lax" | "none"; readonly priority?: "low" | "medium" | "high"; readonly partitionKey?: string; readonly session: boolean; readonly expiresAt?: number | null; }[]; readonly storage?: StorageSnapshot; readonly hiddenFields?: readonly { readonly path: string; readonly name: string; readonly value: string; }[]; readonly globals?: Readonly>; } interface OpensteerStateDelta { readonly beforeStateId?: string; readonly afterStateId?: string; readonly cookiesChanged: readonly string[]; readonly storageChanged: readonly string[]; readonly hiddenFieldsChanged: readonly string[]; readonly globalsChanged: readonly string[]; } interface ScreenshotArtifact { readonly pageRef: PageRef; readonly frameRef?: FrameRef; readonly documentRef?: DocumentRef; readonly documentEpoch?: DocumentEpoch; readonly payload: ExternalBinaryLocation; readonly format: "png" | "jpeg" | "webp"; readonly size: Size; readonly coordinateSpace: CoordinateSpace; readonly clip?: Rect; } declare const opensteerCapabilities: readonly ["sessions.manage", "pages.manage", "pages.navigate", "input.pointer", "input.keyboard", "input.touch", "artifacts.screenshot", "execution.pause", "execution.resume", "execution.freeze", "inspect.pages", "inspect.frames", "inspect.html", "inspect.domSnapshot", "inspect.text", "inspect.attributes", "inspect.hitTest", "inspect.viewportMetrics", "inspect.network", "inspect.networkBodies", "inspect.cookies", "inspect.localStorage", "inspect.sessionStorage", "inspect.indexedDb", "transport.sessionHttp", "instrumentation.initScripts", "instrumentation.routing", "events.pageLifecycle", "events.dialog", "events.download", "events.chooser", "events.worker", "events.console", "events.pageError", "events.websocket", "events.eventStream", "events.executionState", "surface.rest", "surface.mcp"]; type OpensteerCapability = (typeof opensteerCapabilities)[number]; declare const cloudSessionStatuses: readonly ["provisioning", "active", "closing", "closed", "failed"]; type CloudSessionStatus = (typeof cloudSessionStatuses)[number]; declare const cloudSessionRecordingStatuses: readonly ["idle", "recording", "completed", "failed"]; type CloudSessionRecordingStatus = (typeof cloudSessionRecordingStatuses)[number]; declare const cloudSessionSourceTypes: readonly ["agent-thread", "agent-run", "project-agent-run", "local-cloud", "manual"]; type CloudSessionSourceType = (typeof cloudSessionSourceTypes)[number]; type CloudSessionVisibilityScope = "team" | "owner"; type CloudProxyMode = "disabled" | "optional" | "required"; type CloudProxyProtocol = "http" | "https" | "socks5"; type CloudFingerprintMode = "off" | "auto"; type BrowserProfileStatus = "active" | "archived" | "error"; type BrowserProfileProxyPolicy = "strict_sticky"; type BrowserProfileArchiveFormat = "tar.gz"; type PortableBrowserProfileSnapshotFormat = "portable-cookies-v1+json.gz"; type PortableBrowserFamily = "chromium"; type BrowserProfileImportStatus = "awaiting_upload" | "queued" | "processing" | "ready" | "failed"; interface PortableBrowserProfileSnapshotSource { readonly browserFamily: PortableBrowserFamily; readonly browserName?: string; readonly browserMajor?: string; readonly browserBrand?: string; readonly captureMethod?: string; readonly platform?: string; readonly capturedAt: number; } interface BrowserProfileImportSnapshotSummary { readonly source: PortableBrowserProfileSnapshotSource; readonly cookieCount: number; readonly domainCount: number; } interface CloudViewport { readonly width: number; readonly height: number; } interface CloudGeolocation { readonly latitude: number; readonly longitude: number; readonly accuracy?: number; } interface CloudBrowserContextConfig { readonly viewport?: CloudViewport; readonly locale?: string; readonly timezoneId?: string; readonly geolocation?: CloudGeolocation; readonly colorScheme?: "light" | "dark" | "no-preference"; readonly userAgent?: string; readonly javaScriptEnabled?: boolean; readonly ignoreHTTPSErrors?: boolean; } interface CloudBrowserExtensionConfig { readonly includeDefaults?: boolean; readonly extensionKeys?: readonly string[]; } interface CloudBrowserLaunchConfig { readonly headless?: boolean; readonly context?: CloudBrowserContextConfig; readonly chromeArgs?: readonly string[]; readonly extensions?: CloudBrowserExtensionConfig; } interface CloudProxyPreference { readonly mode?: CloudProxyMode; readonly countryCode?: string; readonly region?: string; readonly city?: string; readonly proxyId?: string; } interface CloudFingerprintPreference { readonly mode?: CloudFingerprintMode; readonly locales?: readonly string[]; readonly minWidth?: number; readonly maxWidth?: number; readonly minHeight?: number; readonly maxHeight?: number; readonly slim?: boolean; } interface CloudBrowserProfilePreference { readonly profileId: string; readonly reuseIfActive?: boolean; } type CloudBrowserProfileLaunchPreference = CloudBrowserProfilePreference; interface CloudSessionLaunchConfig { readonly browser?: CloudBrowserLaunchConfig; readonly proxy?: CloudProxyPreference; readonly fingerprint?: CloudFingerprintPreference; readonly browserProfile?: CloudBrowserProfilePreference; } interface CloudSessionSummary { readonly sessionId: string; readonly workspaceId: string; readonly state: CloudSessionStatus; readonly createdAt: number; readonly sourceType: CloudSessionSourceType; readonly sourceRef?: string; readonly label?: string; } interface CloudSessionRecordingResult { readonly fileName: string; readonly script: string; readonly actionCount: number; } interface CloudSessionRecordingState { readonly sessionId: string; readonly status: CloudSessionRecordingStatus; readonly actionCount: number; readonly startedAt?: number; readonly stoppedAt?: number; readonly updatedAt: number; readonly error?: string; readonly result?: CloudSessionRecordingResult; } interface CloudRegistryImportEntry { readonly workspace: string; readonly recordId: string; readonly key: string; readonly version: string; readonly contentHash: string; readonly tags: readonly string[]; readonly provenance?: unknown; readonly payload: unknown; readonly createdAt: number; readonly updatedAt: number; } interface CloudRequestPlanImportEntry extends CloudRegistryImportEntry { readonly freshness?: unknown; } interface CloudRegistryImportRequest { readonly entries: readonly CloudRegistryImportEntry[]; } interface CloudRequestPlanImportRequest { readonly entries: readonly CloudRequestPlanImportEntry[]; } interface CloudRegistryImportResponse { readonly imported: number; readonly inserted: number; readonly updated: number; readonly skipped: number; } interface BrowserProfileDescriptor { readonly profileId: string; readonly teamId: string; readonly ownerUserId: string; readonly name: string; readonly status: BrowserProfileStatus; readonly proxyPolicy: BrowserProfileProxyPolicy; readonly stickyProxyId?: string; readonly proxyCountryCode?: string; readonly proxyRegion?: string; readonly proxyCity?: string; readonly fingerprintMode: CloudFingerprintMode; readonly fingerprintHash?: string; readonly activeSessionId?: string; readonly lastSessionId?: string; readonly lastLaunchedAt?: number; readonly latestRevision?: number; readonly latestStorageId?: string; readonly latestSizeBytes?: number; readonly latestArchiveSha256?: string; readonly latestArchiveFormat?: BrowserProfileArchiveFormat; readonly createdAt: number; readonly updatedAt: number; readonly lastError?: string; } interface BrowserProfileListResponse { readonly profiles: readonly BrowserProfileDescriptor[]; readonly nextCursor?: string; } interface BrowserProfileCreateRequest { readonly name: string; readonly proxy?: { readonly proxyId?: string; readonly countryCode?: string; readonly region?: string; readonly city?: string; }; readonly fingerprint?: { readonly mode?: CloudFingerprintMode; }; } interface BrowserProfileImportCreateRequest { readonly profileId: string; } interface BrowserProfileImportCreateResponse { readonly importId: string; readonly profileId: string; readonly status: BrowserProfileImportStatus; readonly uploadUrl: string; readonly uploadMethod: "PUT"; readonly uploadFormat: PortableBrowserProfileSnapshotFormat; readonly maxUploadBytes: number; } interface BrowserProfileImportDescriptor { readonly importId: string; readonly profileId: string; readonly status: BrowserProfileImportStatus; readonly uploadFormat: PortableBrowserProfileSnapshotFormat; readonly storageId?: string; readonly revision?: number; readonly error?: string; readonly snapshotSummary?: BrowserProfileImportSnapshotSummary; readonly createdAt: number; readonly updatedAt: number; } declare const opensteerErrorCodes: readonly ["invalid-request", "invalid-argument", "invalid-ref", "unsupported-version", "unsupported-operation", "unsupported-capability", "not-found", "stale-node-ref", "session-closed", "page-closed", "frame-detached", "timeout", "navigation-failed", "permission-denied", "conflict", "profile-unavailable", "auth-failure", "auth-recovery-failed", "browser-required", "rate-limited", "operation-failed", "internal"]; type OpensteerErrorCode = (typeof opensteerErrorCodes)[number]; interface OpensteerError { readonly code: OpensteerErrorCode; readonly message: string; readonly retriable: boolean; readonly capability?: OpensteerCapability; readonly details?: Readonly>; } interface OpensteerErrorOptions { readonly cause?: unknown; readonly retriable?: boolean; readonly capability?: OpensteerCapability; readonly details?: Readonly>; } declare class OpensteerProtocolError extends Error { readonly code: OpensteerErrorCode; readonly retriable: boolean; readonly capability: OpensteerCapability | undefined; readonly details: Readonly> | undefined; constructor(code: OpensteerErrorCode, message: string, options?: OpensteerErrorOptions); } declare function isOpensteerProtocolError(value: unknown): value is OpensteerProtocolError; type OpensteerArtifactKind = "screenshot" | "html-snapshot" | "dom-snapshot" | "cookies" | "storage-snapshot" | "script-source"; type ArtifactRelation = "result" | "before" | "after" | "capture" | "evidence" | "snapshot"; type ArtifactExternalLocation = ExternalBinaryLocation; interface ArtifactProvenance { readonly sourceArtifactId?: string; readonly transform?: string; } interface ScriptSourceArtifactData { readonly source: "inline" | "external" | "dynamic" | "worker"; readonly url?: string; readonly type?: string; readonly hash: string; readonly loadOrder: number; readonly content: string; } interface ArtifactInline { readonly delivery: "inline"; readonly data: TData; } interface ArtifactContext { readonly sessionRef?: SessionRef; readonly pageRef?: PageRef; readonly frameRef?: FrameRef; readonly documentRef?: DocumentRef; readonly documentEpoch?: DocumentEpoch; } interface OpensteerArtifactBase extends ArtifactContext { readonly artifactId: string; readonly kind: OpensteerArtifactKind; readonly createdAt: number; readonly provenance?: ArtifactProvenance; } interface ScreenshotArtifactRecord extends OpensteerArtifactBase { readonly kind: "screenshot"; readonly payload: ArtifactInline | ArtifactExternalLocation; } interface HtmlSnapshotArtifactRecord extends OpensteerArtifactBase { readonly kind: "html-snapshot"; readonly payload: ArtifactInline | ArtifactExternalLocation; } interface DomSnapshotArtifactRecord extends OpensteerArtifactBase { readonly kind: "dom-snapshot"; readonly payload: ArtifactInline | ArtifactExternalLocation; } interface CookiesArtifactRecord extends OpensteerArtifactBase { readonly kind: "cookies"; readonly payload: ArtifactInline | ArtifactExternalLocation; } interface StorageSnapshotArtifactRecord extends OpensteerArtifactBase { readonly kind: "storage-snapshot"; readonly payload: ArtifactInline | ArtifactExternalLocation; } interface ScriptSourceArtifactRecord extends OpensteerArtifactBase { readonly kind: "script-source"; readonly payload: ArtifactInline | ArtifactExternalLocation; } type OpensteerArtifact = ScreenshotArtifactRecord | HtmlSnapshotArtifactRecord | DomSnapshotArtifactRecord | CookiesArtifactRecord | StorageSnapshotArtifactRecord | ScriptSourceArtifactRecord; interface ArtifactReference { readonly artifactId: string; readonly kind: OpensteerArtifactKind; readonly relation: ArtifactRelation; } type TraceOutcome = "ok" | "error"; interface TraceContext { readonly sessionRef?: SessionRef; readonly pageRef?: PageRef; readonly frameRef?: FrameRef; readonly documentRef?: DocumentRef; readonly documentEpoch?: DocumentEpoch; } interface TraceRecord { readonly traceId: string; readonly stepId: string; readonly operation: string; readonly outcome: TraceOutcome; readonly startedAt: number; readonly completedAt: number; readonly durationMs: number; readonly context: TraceContext; readonly events: readonly StepEvent[]; readonly artifacts?: readonly ArtifactReference[]; readonly data?: TData; readonly error?: OpensteerError; } interface TraceBundle { readonly trace: TraceRecord; readonly artifacts?: readonly OpensteerArtifact[]; } declare const observabilityProfiles: readonly ["off", "baseline", "diagnostic"]; type ObservabilityProfile = (typeof observabilityProfiles)[number]; interface ObservabilityTraceContext { readonly traceparent?: string; readonly baggage?: string; } interface ObservabilityRedactionConfig { readonly sensitiveKeys?: readonly string[]; readonly sensitiveValues?: readonly string[]; } interface ObservabilityConfig { readonly profile: ObservabilityProfile; readonly labels?: Readonly>; readonly traceContext?: ObservabilityTraceContext; readonly redaction?: ObservabilityRedactionConfig; } interface ObservationContext { readonly sessionRef?: SessionRef; readonly pageRef?: PageRef; readonly frameRef?: FrameRef; readonly documentRef?: DocumentRef; readonly documentEpoch?: DocumentEpoch; } declare const observationEventPhases: readonly ["started", "updated", "completed", "failed", "occurred"]; type ObservationEventPhase = (typeof observationEventPhases)[number]; declare const observationEventKinds: readonly ["session", "operation", "page", "console", "error", "network", "artifact", "annotation", "runtime", "observability"]; type ObservationEventKind = (typeof observationEventKinds)[number]; interface ObservationEventError { readonly code?: string; readonly message: string; readonly retriable?: boolean; readonly details?: JsonValue$1; } interface ObservationEvent { readonly eventId: string; readonly sessionId: string; readonly sequence: number; readonly kind: ObservationEventKind; readonly phase: ObservationEventPhase; readonly createdAt: number; readonly correlationId: string; readonly spanId?: string; readonly parentSpanId?: string; readonly context?: ObservationContext; readonly data?: JsonValue$1; readonly error?: ObservationEventError; readonly artifactIds?: readonly string[]; } declare const observationArtifactKinds: readonly ["screenshot", "dom-snapshot", "html-snapshot", "trace-bundle", "frame-buffer", "request-body", "response-body", "log", "other"]; type ObservationArtifactKind = (typeof observationArtifactKinds)[number]; interface ObservationArtifact { readonly artifactId: string; readonly sessionId: string; readonly kind: ObservationArtifactKind; readonly createdAt: number; readonly context?: ObservationContext; readonly mediaType?: string; readonly byteLength?: number; readonly sha256?: string; readonly opensteerArtifactId?: string; readonly storageKey?: string; readonly metadata?: JsonValue$1; } interface ObservationSession { readonly sessionId: string; readonly profile: ObservabilityProfile; readonly labels?: Readonly>; readonly traceContext?: ObservabilityTraceContext; readonly openedAt: number; readonly updatedAt: number; readonly closedAt?: number; readonly currentSequence: number; readonly eventCount: number; readonly artifactCount: number; } interface OpenObservationSessionInput { readonly sessionId: string; readonly openedAt?: number; readonly config?: Partial; } interface ConfigureObservationSessionInput { readonly updatedAt?: number; readonly config?: Partial; } interface AppendObservationEventInput { readonly eventId?: string; readonly kind: ObservationEventKind; readonly phase: ObservationEventPhase; readonly createdAt: number; readonly correlationId: string; readonly spanId?: string; readonly parentSpanId?: string; readonly context?: ObservationContext; readonly data?: JsonValue$1; readonly error?: ObservationEventError; readonly artifactIds?: readonly string[]; } interface WriteObservationArtifactInput { readonly artifactId: string; readonly kind: ObservationArtifactKind; readonly createdAt: number; readonly context?: ObservationContext; readonly mediaType?: string; readonly byteLength?: number; readonly sha256?: string; readonly opensteerArtifactId?: string; readonly storageKey?: string; readonly metadata?: JsonValue$1; } interface SessionObservationSink { readonly sessionId: string; configure?(input: ConfigureObservationSessionInput): Promise; append(input: AppendObservationEventInput): Promise; appendBatch(input: readonly AppendObservationEventInput[]): Promise; writeArtifact(input: WriteObservationArtifactInput): Promise; flush(reason?: string): Promise; close(reason?: string): Promise; } interface ObservationSink { openSession(input: OpenObservationSessionInput): Promise; } interface OpensteerBrowserLaunchOptions { readonly headless?: boolean; readonly executablePath?: string; readonly args?: readonly string[]; readonly timeoutMs?: number; } interface OpensteerAttachBrowserOptions { readonly mode: "attach"; readonly endpoint?: string; readonly headers?: Readonly>; readonly freshTab?: boolean; } type OpensteerBrowserMode = "temporary" | "persistent"; type OpensteerBrowserOptions = OpensteerBrowserMode | OpensteerAttachBrowserOptions; interface OpensteerHumanizeOptions { /** Interpolate mouse paths with curves and jitter before clicks/scrolls. */ readonly mouse?: boolean; /** Realistic per-character typing cadence with key hold duration. */ readonly keyboard?: boolean; /** Break large scrolls into discrete wheel ticks with delays. */ readonly scroll?: boolean; } interface OpensteerBrowserContextOptions { readonly ignoreHTTPSErrors?: boolean; readonly locale?: string; readonly timezoneId?: string; readonly userAgent?: string; readonly viewport?: { readonly width: number; readonly height: number; } | null; readonly javaScriptEnabled?: boolean; readonly bypassCSP?: boolean; readonly reducedMotion?: "reduce" | "no-preference"; readonly colorScheme?: "light" | "dark" | "no-preference"; readonly stealthProfile?: OpensteerStealthProfileInput; /** * Enable human-like interaction patterns for mouse, keyboard, and scroll * events. When `true` (the default), all sub-options are enabled. Pass * `false` to disable, or an object to control individual categories. */ readonly humanize?: boolean | OpensteerHumanizeOptions; } interface OpensteerStealthProfileInput { readonly id?: string; readonly platform?: "macos" | "windows" | "linux"; readonly browserBrand?: "chrome" | "edge"; readonly browserVersion?: string; readonly userAgent?: string; readonly viewport?: { readonly width: number; readonly height: number; }; readonly screenResolution?: { readonly width: number; readonly height: number; }; readonly devicePixelRatio?: number; readonly maxTouchPoints?: number; readonly webglVendor?: string; readonly webglRenderer?: string; readonly fonts?: readonly string[]; readonly canvasNoiseSeed?: number; readonly audioNoiseSeed?: number; readonly locale?: string; readonly timezoneId?: string; } interface OpensteerActionResult { readonly tagName: string; readonly persist?: string; } interface OpensteerNavigationSummary { readonly url: string; readonly title: string; } interface OpensteerOpenInput { readonly url?: string; readonly workspace?: string; readonly browser?: OpensteerBrowserOptions; readonly launch?: OpensteerBrowserLaunchOptions; readonly context?: OpensteerBrowserContextOptions; } interface OpensteerOpenOutput extends OpensteerNavigationSummary { } interface OpensteerPageListInput { } interface OpensteerPageListOutput { readonly activePageRef?: PageRef; readonly pages: readonly PageInfo[]; } interface OpensteerPageNewInput { readonly url?: string; readonly openerPageRef?: PageRef; } interface OpensteerPageNewOutput extends OpensteerNavigationSummary { readonly pageRef: PageRef; } interface OpensteerPageActivateInput { readonly pageRef: PageRef; } interface OpensteerPageActivateOutput extends OpensteerNavigationSummary { } interface OpensteerPageCloseInput { readonly pageRef?: PageRef; } interface OpensteerPageCloseOutput { readonly closedPageRef: PageRef; readonly activePageRef?: PageRef; readonly pages: readonly PageInfo[]; } interface OpensteerPageGotoInput { readonly url: string; readonly captureNetwork?: string; } interface OpensteerPageGotoOutput extends OpensteerNavigationSummary { } interface OpensteerPageEvaluateInput { readonly script: string; readonly args?: readonly JsonValue$1[]; readonly pageRef?: PageRef; } interface OpensteerPageEvaluateOutput { readonly pageRef: PageRef; readonly value: JsonValue$1; } interface OpensteerAddInitScriptInput { readonly script: string; readonly args?: readonly JsonValue$1[]; readonly pageRef?: PageRef; } interface OpensteerAddInitScriptOutput { readonly registrationId: string; readonly sessionRef: SessionRef; readonly pageRef?: PageRef; } interface OpensteerSessionCloseOutput { readonly closed: true; } declare const opensteerComputerAnnotationNames: readonly ["clickable", "typeable", "scrollable", "grid", "selected"]; type OpensteerComputerAnnotation = (typeof opensteerComputerAnnotationNames)[number]; type OpensteerComputerMouseButton = "left" | "middle" | "right"; type OpensteerComputerKeyModifier = "Shift" | "Control" | "Alt" | "Meta"; interface OpensteerComputerClickAction { readonly type: "click"; readonly x: number; readonly y: number; readonly button?: OpensteerComputerMouseButton; readonly clickCount?: number; readonly modifiers?: readonly OpensteerComputerKeyModifier[]; } interface OpensteerComputerMoveAction { readonly type: "move"; readonly x: number; readonly y: number; } interface OpensteerComputerScrollAction { readonly type: "scroll"; readonly x: number; readonly y: number; readonly deltaX: number; readonly deltaY: number; } interface OpensteerComputerTypeAction { readonly type: "type"; readonly text: string; } interface OpensteerComputerKeyAction { readonly type: "key"; readonly key: string; readonly modifiers?: readonly OpensteerComputerKeyModifier[]; } interface OpensteerComputerDragAction { readonly type: "drag"; readonly start: Point; readonly end: Point; readonly steps?: number; } interface OpensteerComputerScreenshotAction { readonly type: "screenshot"; } interface OpensteerComputerWaitAction { readonly type: "wait"; readonly durationMs: number; } type OpensteerComputerAction = OpensteerComputerClickAction | OpensteerComputerMoveAction | OpensteerComputerScrollAction | OpensteerComputerTypeAction | OpensteerComputerKeyAction | OpensteerComputerDragAction | OpensteerComputerScreenshotAction | OpensteerComputerWaitAction; interface OpensteerComputerScreenshotOptions { readonly format?: ScreenshotFormat; readonly includeCursor?: boolean; readonly disableAnnotations?: readonly OpensteerComputerAnnotation[]; } interface OpensteerScreenshotSummary { readonly payload: ExternalBinaryLocation; readonly format: "png" | "jpeg" | "webp"; readonly size: Size; readonly coordinateSpace: CoordinateSpace; readonly clip?: Rect; } interface OpensteerComputerExecuteInput { readonly action: OpensteerComputerAction; readonly screenshot?: OpensteerComputerScreenshotOptions; readonly captureNetwork?: string; } interface OpensteerComputerExecuteOutput { readonly url: string; readonly title: string; readonly screenshot: OpensteerScreenshotSummary; } declare const opensteerSemanticOperationNames: readonly ["session.open", "page.list", "page.new", "page.activate", "page.close", "page.goto", "page.evaluate", "page.add-init-script", "page.snapshot", "dom.click", "dom.hover", "dom.input", "dom.scroll", "dom.extract", "network.query", "network.detail", "interaction.capture", "interaction.get", "interaction.diff", "interaction.replay", "artifact.read", "session.cookies", "session.storage", "session.state", "session.fetch", "scripts.capture", "scripts.beautify", "scripts.deobfuscate", "scripts.sandbox", "captcha.solve", "computer.execute", "session.close"]; type OpensteerSemanticOperationName = (typeof opensteerSemanticOperationNames)[number]; declare const opensteerSessionGrantKinds: readonly ["semantic", "automation", "view", "cdp"]; type OpensteerSessionGrantKind = (typeof opensteerSessionGrantKinds)[number]; type OpensteerSessionGrantTransport = "http" | "ws"; type OpensteerProviderMode$1 = "local" | "cloud"; type OpensteerSessionOwnership = "owned" | "attached" | "managed"; interface OpensteerProviderDescriptor { readonly mode: OpensteerProviderMode$1; readonly ownership: OpensteerSessionOwnership; readonly engine?: string; readonly baseUrl?: string; readonly region?: string; } interface OpensteerSessionCapabilities { readonly semanticOperations: readonly OpensteerSemanticOperationName[]; readonly protocolCapabilities?: readonly OpensteerCapability[]; readonly sessionGrants?: readonly OpensteerSessionGrantKind[]; readonly instrumentation: { readonly route: boolean; readonly interceptScript: boolean; readonly networkStream: boolean; }; } interface OpensteerSessionGrant { readonly kind: OpensteerSessionGrantKind; readonly transport: OpensteerSessionGrantTransport; readonly url: string; readonly token: string; readonly expiresAt: number; } interface OpensteerSessionAccessGrantResponse { readonly sessionId: string; readonly expiresAt: number; readonly grants: Partial>; } interface OpensteerRuntimeVersionInfo { readonly protocolVersion: OpensteerProtocolVersion; readonly runtimeCoreVersion?: string; readonly packages?: Readonly>; } interface OpensteerSessionInfo { readonly provider: OpensteerProviderDescriptor; readonly workspace?: string; readonly sessionId?: string; readonly activePageRef?: PageRef; readonly reconnectable: boolean; readonly capabilities: OpensteerSessionCapabilities; readonly grants?: readonly OpensteerSessionGrant[]; readonly runtime?: OpensteerRuntimeVersionInfo; } interface OpensteerInteractionEventRecord { readonly type: string; readonly timestamp: number; readonly targetPath?: string; readonly properties: Readonly>; } interface OpensteerInteractionTracePayload { readonly mode: "manual" | "automated"; readonly pageRef?: PageRef; readonly url?: string; readonly startedAt: number; readonly completedAt: number; readonly beforeState?: OpensteerStateSnapshot; readonly afterState?: OpensteerStateSnapshot; readonly stateDelta?: OpensteerStateDelta; readonly events: readonly OpensteerInteractionEventRecord[]; readonly networkRecordIds: readonly string[]; readonly caseId?: string; readonly notes?: string; } type MatchOperator = "exact" | "startsWith" | "contains"; interface AttributeMatchClause { readonly kind: "attr"; readonly key: string; readonly op?: MatchOperator; readonly value?: string; } interface PositionMatchClause { readonly kind: "position"; readonly axis: "nthOfType" | "nthChild"; } interface TextMatchClause { readonly kind: "text"; readonly value: string; } type MatchClause = AttributeMatchClause | PositionMatchClause | TextMatchClause; interface PathNodePosition { readonly nthChild: number; readonly nthOfType: number; } interface PathNode { readonly tag: string; readonly attrs: Readonly>; readonly position: PathNodePosition; readonly match: readonly MatchClause[]; } interface ContextHop { readonly kind: "iframe" | "shadow"; readonly host: readonly PathNode[]; } interface ElementRouteBase { readonly context: readonly ContextHop[]; readonly nodes: readonly PathNode[]; } interface StructuralElementAnchor extends ElementRouteBase { readonly resolution: "structural"; } interface ReplayElementPath extends ElementRouteBase { readonly resolution: "deterministic"; } declare const OPENSTEER_DOM_ACTION_BRIDGE_SYMBOL: unique symbol; type DomActionScrollAlignment = "start" | "center" | "end" | "nearest"; interface DomActionTargetInspection { readonly connected: boolean; readonly visible: boolean; readonly enabled: boolean; readonly editable: boolean; readonly pointerEvents: string; readonly bounds?: Rect; readonly contentQuads: readonly Quad[]; } interface DomActionScrollOptions { readonly block?: DomActionScrollAlignment; readonly inline?: DomActionScrollAlignment; } interface DomActionKeyPressInput { readonly key: string; readonly modifiers?: readonly KeyModifier[]; } interface DomActionSettleOptions { readonly operation: "dom.click" | "dom.hover" | "dom.input" | "dom.scroll"; readonly snapshot?: ActionBoundarySnapshot; readonly signal: AbortSignal; remainingMs(): number | undefined; policySettle(pageRef: PageRef, trigger: ActionBoundarySettleTrigger, boundary?: ActionBoundaryOutcome): Promise; } type DomPointerHitRelation = "self" | "descendant" | "ancestor" | "same-owner" | "outside" | "unknown"; interface DomPointerHitAssessment { readonly relation: DomPointerHitRelation; readonly blocking: boolean; readonly ambiguous?: boolean; readonly blockingDescription?: string; readonly canonicalTarget?: NodeLocator; readonly hitOwner?: NodeLocator; } interface BuildReplayPathOptions { readonly enableTextMatch?: boolean; } interface DomActionBridge { buildReplayPath(locator: NodeLocator, options?: BuildReplayPathOptions): Promise; inspectActionTarget(locator: NodeLocator): Promise; canonicalizePointerTarget(locator: NodeLocator): Promise; classifyPointerHit(input: { readonly target: NodeLocator; readonly hit: NodeLocator; readonly point: Point; }): Promise; scrollNodeIntoView(locator: NodeLocator, options?: DomActionScrollOptions): Promise; focusNode(locator: NodeLocator): Promise; pressKey(locator: NodeLocator, input: DomActionKeyPressInput): Promise; finalizeDomAction(pageRef: PageRef, options: DomActionSettleOptions): Promise; } interface DomActionBridgeProvider { [OPENSTEER_DOM_ACTION_BRIDGE_SYMBOL](): DomActionBridge; } declare function resolveDomActionBridge(engine: BrowserCoreEngine | DomActionBridgeProvider): DomActionBridge | undefined; type ArtifactPayloadType = "structured" | "binary"; type ProtocolArtifactDelivery = "external" | "inline-if-structured"; interface ArtifactScope extends TraceContext { } interface ArtifactManifest { readonly artifactId: string; readonly kind: OpensteerArtifactKind; readonly createdAt: number; readonly provenance?: ArtifactProvenance; readonly scope: ArtifactScope; readonly mediaType: string; readonly payloadType: ArtifactPayloadType; readonly byteLength: number; readonly sha256: string; readonly objectRelativePath: string; } type StructuredArtifactKind = Exclude; interface StructuredArtifactDataByKind { readonly "html-snapshot": HtmlSnapshot; readonly "dom-snapshot": DomSnapshot; readonly cookies: readonly CookieRecord[]; readonly "storage-snapshot": StorageSnapshot; readonly "script-source": ScriptSourceArtifactData; } type StructuredArtifactPayloadByKind = { [K in StructuredArtifactKind]: { readonly kind: K; readonly payloadType: "structured"; readonly data: StructuredArtifactDataByKind[K]; }; }; type StoredArtifactPayloadByKind = { readonly screenshot: { readonly kind: "screenshot"; readonly payloadType: "binary"; readonly data: Uint8Array; }; } & StructuredArtifactPayloadByKind; type StoredArtifactPayload = StoredArtifactPayloadByKind[OpensteerArtifactKind]; interface StoredArtifactRecord { readonly manifest: ArtifactManifest; readonly payload: StoredArtifactPayload; } type WriteStructuredArtifactInputByKind = { readonly artifactId?: string; readonly kind: K; readonly createdAt?: number; readonly provenance?: ArtifactProvenance; readonly scope?: ArtifactScope; readonly mediaType?: string; readonly data: StructuredArtifactDataByKind[K]; }; type WriteStructuredArtifactInput = { [K in StructuredArtifactKind]: WriteStructuredArtifactInputByKind; }[StructuredArtifactKind]; interface WriteBinaryArtifactInput { readonly artifactId?: string; readonly kind: "screenshot"; readonly createdAt?: number; readonly provenance?: ArtifactProvenance; readonly scope?: ArtifactScope; readonly mediaType: string; readonly data: Uint8Array; } interface OpensteerArtifactStore { readonly manifestsDirectory: string; readonly objectsDirectory: string; writeStructured(input: WriteStructuredArtifactInput): Promise; writeBinary(input: WriteBinaryArtifactInput): Promise; getManifest(artifactId: string): Promise; read(artifactId: string): Promise; toProtocolArtifactReference(artifactId: string, relation: ArtifactRelation): Promise; toProtocolArtifact(artifactId: string, options?: { readonly delivery?: ProtocolArtifactDelivery; }): Promise; } declare class FilesystemArtifactStore implements OpensteerArtifactStore { private readonly rootPath; readonly manifestsDirectory: string; readonly objectsDirectory: string; constructor(rootPath: string); initialize(): Promise; writeStructured(input: WriteStructuredArtifactInput): Promise; writeBinary(input: WriteBinaryArtifactInput): Promise; getManifest(artifactId: string): Promise; read(artifactId: string): Promise; toProtocolArtifactReference(artifactId: string, relation: ArtifactRelation): Promise; toProtocolArtifact(artifactId: string, options?: { readonly delivery?: ProtocolArtifactDelivery; }): Promise; private manifestPath; } declare function createArtifactStore(rootPath: string): FilesystemArtifactStore; declare function manifestToExternalBinaryLocation(rootPath: string, manifest: Pick): ExternalBinaryLocation; type JsonPrimitive = boolean | number | string | null; type JsonValue = JsonPrimitive | JsonObject | JsonArray; interface JsonObject { readonly [key: string]: JsonValue; } type JsonArray = readonly JsonValue[]; interface RegistryProvenance { readonly source: string; readonly sourceId?: string; readonly capturedAt?: number; readonly notes?: string; } interface RegistryRecord { readonly id: string; readonly key: string; readonly version: string; readonly createdAt: number; readonly updatedAt: number; readonly contentHash: string; readonly tags: readonly string[]; readonly provenance?: RegistryProvenance; readonly payload: TPayload; } type DescriptorRecord = RegistryRecord; type InteractionTraceRecord = RegistryRecord; type RequestPlanFreshness = OpensteerRequestPlanFreshness; interface RequestPlanRecord extends RegistryRecord { readonly freshness?: RequestPlanFreshness; } interface ResolveRegistryRecordInput { readonly key: string; readonly version?: string; } interface WriteDescriptorInput { readonly id?: string; readonly key: string; readonly version: string; readonly createdAt?: number; readonly updatedAt?: number; readonly tags?: readonly string[]; readonly provenance?: RegistryProvenance; readonly payload: TPayload; } interface WriteRequestPlanInput extends WriteDescriptorInput { readonly freshness?: RequestPlanFreshness; } interface WriteInteractionTraceInput extends WriteDescriptorInput { } interface ListRegistryRecordsInput { readonly key?: string; } interface UpdateRequestPlanFreshnessInput { readonly id: string; readonly updatedAt?: number; readonly freshness?: RequestPlanFreshness; } interface DescriptorRegistryStore { readonly recordsDirectory: string; readonly indexesDirectory: string; write(input: WriteDescriptorInput): Promise; getById(id: string): Promise; list(input?: ListRegistryRecordsInput): Promise; resolve(input: ResolveRegistryRecordInput): Promise; } interface RequestPlanRegistryStore { readonly recordsDirectory: string; readonly indexesDirectory: string; write(input: WriteRequestPlanInput): Promise; getById(id: string): Promise; list(input?: ListRegistryRecordsInput): Promise; resolve(input: ResolveRegistryRecordInput): Promise; updateFreshness(input: UpdateRequestPlanFreshnessInput): Promise; } interface InteractionTraceRegistryStore { readonly recordsDirectory: string; readonly indexesDirectory: string; write(input: WriteInteractionTraceInput): Promise; getById(id: string): Promise; list(input?: ListRegistryRecordsInput): Promise; resolve(input: ResolveRegistryRecordInput): Promise; } interface SavedNetworkQueryInput { readonly pageRef?: NetworkQueryRecord["record"]["pageRef"]; readonly recordId?: string; readonly requestId?: string; readonly capture?: string; readonly tag?: string; readonly url?: string; readonly hostname?: string; readonly path?: string; readonly method?: string; readonly status?: string | number; readonly resourceType?: NetworkResourceType; readonly includeBodies?: boolean; readonly limit?: number; } type SavedNetworkBodyWriteMode = "authoritative" | "metadata-only"; interface SavedNetworkSaveOptions { readonly bodyWriteMode: SavedNetworkBodyWriteMode; readonly tag?: string; } interface SavedNetworkStore { readonly databasePath: string; initialize(): Promise; save(records: readonly NetworkQueryRecord[], options: SavedNetworkSaveOptions): Promise; tagByFilter(filter: SavedNetworkQueryInput, tag: string): Promise; query(input?: SavedNetworkQueryInput): Promise; getByRecordId(recordId: string, options?: { readonly includeBodies?: boolean; }): Promise; clear(input?: { readonly capture?: string; readonly tag?: string; }): Promise; } interface ListObservationEventsInput { readonly kind?: ObservationEvent["kind"]; readonly phase?: ObservationEvent["phase"]; readonly correlationId?: string; readonly pageRef?: string; readonly afterSequence?: number; readonly from?: number; readonly to?: number; readonly limit?: number; } interface ListObservationArtifactsInput { readonly kind?: ObservationArtifact["kind"]; readonly pageRef?: string; readonly limit?: number; } interface FilesystemObservationStore extends ObservationSink { readonly sessionsDirectory: string; initialize(): Promise; getSession(sessionId: string): Promise; listEvents(sessionId: string, input?: ListObservationEventsInput): Promise; listArtifacts(sessionId: string, input?: ListObservationArtifactsInput): Promise; getArtifact(sessionId: string, artifactId: string): Promise; } interface NormalizedObservabilityConfig extends ObservabilityConfig { readonly profile: ObservabilityProfile; } declare function normalizeObservabilityConfig(input: Partial | undefined): NormalizedObservabilityConfig; declare function createObservationStore(rootPath: string, artifacts: OpensteerArtifactStore): FilesystemObservationStore; interface TraceRunManifest { readonly runId: string; readonly createdAt: number; readonly updatedAt: number; readonly entryCount: number; } interface CreateTraceRunInput { readonly runId?: string; readonly createdAt?: number; } interface AppendTraceEntryInput { readonly traceId?: string; readonly stepId?: string; readonly operation: string; readonly outcome: TraceOutcome; readonly startedAt: number; readonly completedAt: number; readonly context?: TraceContext; readonly events?: readonly StepEvent[]; readonly artifacts?: readonly ArtifactReference[]; readonly data?: TData; readonly error?: OpensteerError; } interface TraceEntryRecord { readonly runId: string; readonly sequence: number; readonly traceId: string; readonly stepId: string; readonly operation: string; readonly outcome: TraceOutcome; readonly startedAt: number; readonly completedAt: number; readonly durationMs: number; readonly context: TraceContext; readonly events: readonly StepEvent[]; readonly artifacts?: readonly ArtifactReference[]; readonly data?: TData; readonly error?: OpensteerError; } interface OpensteerTraceStore { readonly runsDirectory: string; createRun(input?: CreateTraceRunInput): Promise; getRun(runId: string): Promise; append(runId: string, input: AppendTraceEntryInput): Promise>; listEntries(runId: string): Promise; getEntry(runId: string, traceId: string): Promise; toProtocolTraceRecord(entry: TraceEntryRecord): TraceRecord; readProtocolTraceBundle(runId: string, traceId: string, options?: { readonly artifactDelivery?: ProtocolArtifactDelivery; }): Promise; } declare const OPENSTEER_FILESYSTEM_WORKSPACE_LAYOUT = "opensteer-workspace"; declare const OPENSTEER_FILESYSTEM_WORKSPACE_VERSION = 2; interface OpensteerWorkspaceManifest { readonly layout: typeof OPENSTEER_FILESYSTEM_WORKSPACE_LAYOUT; readonly version: typeof OPENSTEER_FILESYSTEM_WORKSPACE_VERSION; readonly scope: "workspace" | "temporary"; readonly workspace?: string; readonly createdAt: number; readonly updatedAt: number; readonly paths: { readonly browser: "browser"; readonly live: "live"; readonly artifacts: "artifacts"; readonly traces: "traces"; readonly observations: "observations"; readonly registry: "registry"; }; } interface CreateFilesystemOpensteerWorkspaceOptions { readonly rootPath: string; readonly workspace?: string; readonly scope?: "workspace" | "temporary"; readonly createdAt?: number; } interface FilesystemOpensteerWorkspace { readonly rootPath: string; readonly manifestPath: string; readonly manifest: OpensteerWorkspaceManifest; readonly browserPath: string; readonly browserManifestPath: string; readonly browserUserDataDir: string; readonly livePath: string; readonly liveLocalPath: string; readonly liveCloudPath: string; readonly artifactsPath: string; readonly tracesPath: string; readonly observationsPath: string; readonly registryPath: string; readonly lockPath: string; readonly artifacts: OpensteerArtifactStore; readonly traces: OpensteerTraceStore; readonly observations: FilesystemObservationStore; readonly registry: { readonly descriptors: DescriptorRegistryStore; readonly requestPlans: RequestPlanRegistryStore; readonly savedNetwork: SavedNetworkStore; readonly interactionTraces: InteractionTraceRegistryStore; }; lock(task: () => Promise): Promise; } declare function normalizeWorkspaceId(workspace: string): string; declare function resolveFilesystemWorkspacePath(input: { readonly rootDir: string; readonly workspace: string; }): string; declare function createFilesystemOpensteerWorkspace(options: CreateFilesystemOpensteerWorkspaceOptions): Promise; type DomActionPolicyOperation = "dom.click" | "dom.hover" | "dom.input" | "dom.scroll"; interface TimeoutResolutionInput { readonly operation: OpensteerSemanticOperationName; readonly signal?: AbortSignal; } interface TimeoutExecutionContext extends TimeoutResolutionInput { readonly signal: AbortSignal; readonly budgetMs: number | undefined; readonly deadlineAt: number | undefined; remainingMs(): number | undefined; throwIfAborted(): void; runStep(step: () => Promise): Promise; } interface TimeoutPolicy { resolveTimeoutMs(input: TimeoutResolutionInput): number | undefined; } type SettleTrigger = "navigation" | "dom-action" | "snapshot"; interface SettleDelayInput { readonly operation: OpensteerSemanticOperationName; readonly trigger: SettleTrigger; } interface SettleContext extends SettleDelayInput { readonly engine: BrowserCoreEngine; readonly pageRef: PageRef; readonly signal: AbortSignal; readonly remainingMs: number | undefined; readonly observedMutationQuietMs?: number; readonly postLoadHandled?: boolean; } interface SettleObserver { settle(input: SettleContext): Promise; } interface SettlePolicy { readonly observers?: readonly SettleObserver[]; resolveDelayMs(input: SettleDelayInput): number; } interface RetryEvaluationInput { readonly operation: OpensteerSemanticOperationName; readonly error: unknown; } interface RetryDecision { readonly retry: false; } interface RetryPolicy { evaluate(input: RetryEvaluationInput): RetryDecision | Promise; } interface FallbackEvaluationInput { readonly operation: OpensteerSemanticOperationName; readonly error: unknown; } interface FallbackDecision { readonly fallback: false; } interface FallbackPolicy { evaluate(input: FallbackEvaluationInput): FallbackDecision | Promise; } interface OpensteerPolicy { readonly timeout: TimeoutPolicy; readonly settle: SettlePolicy; readonly retry: RetryPolicy; readonly fallback: FallbackPolicy; } declare const defaultTimeoutPolicy: TimeoutPolicy; declare const defaultSettlePolicy: SettlePolicy; declare const defaultRetryPolicy: RetryPolicy; declare const defaultFallbackPolicy: FallbackPolicy; declare function defaultPolicy(): OpensteerPolicy; declare function settleWithPolicy(policy: SettlePolicy, input: SettleContext): Promise; declare function delayWithSignal(delayMs: number, signal: AbortSignal): Promise; declare function runWithPolicyTimeout(policy: TimeoutPolicy, input: TimeoutResolutionInput, operation: (context: TimeoutExecutionContext) => Promise): Promise; type DomPath = readonly PathNode[]; type ElementPath = ReplayElementPath; interface DomDescriptorPayload { readonly kind: "dom-target"; readonly method: string; readonly persist: string; readonly path: ReplayElementPath; readonly sourceUrl?: string; } interface DomDescriptorRecord { readonly id: string; readonly key: string; readonly version: string; readonly createdAt: number; readonly updatedAt: number; readonly payload: DomDescriptorPayload; } interface DescriptorTargetRef { readonly kind: "descriptor"; readonly persist: string; } interface LiveTargetRef { readonly kind: "live"; readonly locator: NodeLocator; readonly anchor?: StructuralElementAnchor; readonly persist?: string; } interface AnchorTargetRef { readonly kind: "anchor"; readonly anchor: StructuralElementAnchor; readonly persist?: string; } interface PathTargetRef { readonly kind: "path"; readonly path: ReplayElementPath; readonly persist?: string; } interface SelectorTargetRef { readonly kind: "selector"; readonly selector: string; readonly persist?: string; readonly frameRef?: FrameRef; readonly documentRef?: DocumentRef; } type DomTargetRef = DescriptorTargetRef | LiveTargetRef | AnchorTargetRef | PathTargetRef | SelectorTargetRef; interface ResolvedDomTarget { readonly source: "descriptor" | "live" | "anchor" | "path" | "selector"; readonly pageRef: PageRef; readonly frameRef: FrameRef; readonly documentRef: DocumentRef; readonly documentEpoch: DocumentEpoch; readonly nodeRef: NodeRef; readonly locator: NodeLocator; readonly snapshot: DomSnapshot; readonly node: DomSnapshotNode; readonly anchor: StructuralElementAnchor; readonly replayPath?: ReplayElementPath; readonly persist?: string; readonly selectorUsed?: string; readonly descriptor?: DomDescriptorRecord; } interface DomBuildPathInput { readonly locator: NodeLocator; readonly enableTextMatch?: boolean; } interface DomResolveTargetInput { readonly pageRef: PageRef; readonly method: string; readonly target: DomTargetRef; } interface DomWriteDescriptorInput { readonly method: string; readonly persist: string; readonly path: ReplayElementPath; readonly sourceUrl?: string; readonly createdAt?: number; readonly updatedAt?: number; } interface DomReadDescriptorInput { readonly method: string; readonly persist: string; } interface DomActionOutcome { readonly resolved: ResolvedDomTarget; readonly point: Point; readonly events?: readonly StepEvent[]; } interface DomClickInput { readonly pageRef: PageRef; readonly target: DomTargetRef; readonly button?: MouseButton; readonly clickCount?: number; readonly modifiers?: readonly KeyModifier[]; readonly position?: Point; readonly timeout?: TimeoutExecutionContext; } interface DomHoverInput { readonly pageRef: PageRef; readonly target: DomTargetRef; readonly position?: Point; readonly timeout?: TimeoutExecutionContext; } interface DomInputInput { readonly pageRef: PageRef; readonly target: DomTargetRef; readonly text: string; readonly pressEnter?: boolean; readonly timeout?: TimeoutExecutionContext; } interface DomScrollInput { readonly pageRef: PageRef; readonly target: DomTargetRef; readonly delta: Point; readonly position?: Point; readonly timeout?: TimeoutExecutionContext; } interface DomExtractFieldSelector { readonly key: string; readonly target?: DomTargetRef; readonly attribute?: string; readonly source?: "current_url"; } interface DomExtractFieldsInput { readonly pageRef: PageRef; readonly fields: readonly DomExtractFieldSelector[]; } interface DomArrayFieldSelector { readonly key: string; readonly path?: ReplayElementPath; readonly attribute?: string; readonly source?: "current_url"; } interface DomArraySelector { readonly itemParentPath: ReplayElementPath; readonly fields: readonly DomArrayFieldSelector[]; } interface DomExtractArrayRowsInput { readonly pageRef: PageRef; readonly array: DomArraySelector; } interface DomArrayRowMetadata { readonly key: string; readonly order: number; } interface DomExtractedArrayRow { readonly values: Readonly>; readonly meta: DomArrayRowMetadata; } interface DomRuntime { readonly engine: BrowserCoreEngine; buildAnchor(input: DomBuildPathInput): Promise; buildPath(input: DomBuildPathInput): Promise; resolveTarget(input: DomResolveTargetInput): Promise; writeDescriptor(input: DomWriteDescriptorInput): Promise; readDescriptor(input: DomReadDescriptorInput): Promise; click(input: DomClickInput): Promise; hover(input: DomHoverInput): Promise; input(input: DomInputInput): Promise; scroll(input: DomScrollInput): Promise; extractFields(input: DomExtractFieldsInput): Promise>>; extractArrayRows(input: DomExtractArrayRowsInput): Promise; validateArrayFieldPositionStripping(input: { readonly pageRef: PageRef; readonly itemParentPath: ReplayElementPath; readonly fields: readonly { readonly key: string; readonly originalPath: ReplayElementPath; readonly strippedPath: ReplayElementPath; }[]; }): Promise>>; } interface DomDescriptorStore { read(input: DomReadDescriptorInput): Promise; write(input: DomWriteDescriptorInput): Promise; } declare function createDomDescriptorStore(options: { readonly root?: FilesystemOpensteerWorkspace; readonly namespace?: string; }): DomDescriptorStore; declare function hashDomDescriptorPersist(persist: string): string; declare function buildDomDescriptorKey(options: { readonly namespace?: string; readonly method: string; readonly persist: string; }): string; declare function buildDomDescriptorPayload(input: DomWriteDescriptorInput): DomDescriptorPayload; declare function buildDomDescriptorVersion(payload: DomDescriptorPayload): string; declare function parseDomDescriptorRecord(record: DescriptorRecord): DomDescriptorRecord | undefined; declare function buildArrayFieldPathCandidates(path: ElementPath): string[]; declare function isCurrentUrlField(field: DomExtractFieldSelector | DomArrayFieldSelector): boolean; declare function normalizeExtractedValue(raw: unknown, attribute?: string): string | null; declare function resolveExtractedValueInContext(normalizedValue: string | null, options: { readonly attribute?: string; readonly baseURI?: string | null; readonly insideIframe?: boolean; }): string | null; type ElementPathErrorCode = "ERR_PATH_CONTEXT_HOST_NOT_FOUND" | "ERR_PATH_CONTEXT_HOST_NOT_UNIQUE" | "ERR_PATH_IFRAME_UNAVAILABLE" | "ERR_PATH_SHADOW_ROOT_UNAVAILABLE" | "ERR_PATH_TARGET_NOT_FOUND" | "ERR_PATH_TARGET_NOT_UNIQUE"; declare class ElementPathError extends Error { readonly code: ElementPathErrorCode; constructor(code: ElementPathErrorCode, message: string); } declare function buildPathCandidates(domPath: DomPath): string[]; declare function buildSegmentSelector(node: PathNode): string; declare const MATCH_ATTRIBUTE_PRIORITY: readonly ["class", "data-testid", "data-test", "data-qa", "data-cy", "name", "role", "type", "aria-label", "title", "placeholder", "for", "aria-controls", "aria-labelledby", "aria-describedby", "id", "href", "value", "src", "srcset", "imagesrcset", "ping", "alt"]; declare const STABLE_PRIMARY_ATTR_KEYS: readonly ["data-testid", "data-test", "data-qa", "data-cy", "name", "role", "type", "aria-label", "title", "placeholder"]; declare const DEFERRED_MATCH_ATTR_KEYS: readonly ["href", "src", "srcset", "imagesrcset", "ping", "value", "for", "aria-controls", "aria-labelledby", "aria-describedby"]; interface AttributeFilterOptions { readonly tag?: string; readonly allowClass?: boolean; } declare function isValidCssAttributeKey(key: string | null | undefined): boolean; declare function shouldKeepAttributeForPath(name: string, value: string, options?: AttributeFilterOptions): boolean; declare function cloneStructuralElementAnchor(anchor: StructuralElementAnchor): StructuralElementAnchor; declare function cloneReplayElementPath(path: ReplayElementPath): ReplayElementPath; declare function cloneElementPath(path: ReplayElementPath): ReplayElementPath; declare function buildPathSelectorHint(path: { readonly nodes: readonly PathNode[]; } | null | undefined): string; declare function sanitizeStructuralElementAnchor(anchor: StructuralElementAnchor): StructuralElementAnchor; declare function sanitizeReplayElementPath(path: ReplayElementPath): ReplayElementPath; declare function sanitizeElementPath(path: ReplayElementPath): ReplayElementPath; declare function createDomRuntime(options: { readonly engine: BrowserCoreEngine; readonly root?: FilesystemOpensteerWorkspace; readonly namespace?: string; readonly descriptorStore?: DomDescriptorStore; readonly policy?: OpensteerPolicy; }): DomRuntime; interface PersistedOpensteerExtractionValueNode { readonly $path: ElementPath; readonly attribute?: string; } interface PersistedOpensteerExtractionSourceNode { readonly $source: "current_url"; } interface PersistedOpensteerExtractionArrayVariantNode { readonly itemParentPath: ElementPath; readonly item: PersistedOpensteerExtractionNode; } interface PersistedOpensteerExtractionArrayNode { readonly $array: { readonly variants: readonly PersistedOpensteerExtractionArrayVariantNode[]; }; } interface PersistedOpensteerExtractionObjectNode { readonly [key: string]: PersistedOpensteerExtractionNode; } type PersistedOpensteerExtractionNode = PersistedOpensteerExtractionValueNode | PersistedOpensteerExtractionSourceNode | PersistedOpensteerExtractionArrayNode | PersistedOpensteerExtractionObjectNode; type PersistedOpensteerExtractionPayload = PersistedOpensteerExtractionObjectNode; interface OpensteerExtractionDescriptorPayload { readonly kind: "dom-extraction"; readonly persist: string; readonly root: PersistedOpensteerExtractionPayload; readonly templateHash?: string; readonly sourceUrl?: string; } interface OpensteerExtractionDescriptorRecord { readonly id: string; readonly key: string; readonly version: string; readonly createdAt: number; readonly updatedAt: number; readonly payload: OpensteerExtractionDescriptorPayload; } interface OpensteerExtractionDescriptorStore { read(input: { readonly persist: string; }): Promise; write(input: { readonly persist: string; readonly root: PersistedOpensteerExtractionPayload; readonly templateHash?: string; readonly sourceUrl?: string; readonly createdAt?: number; readonly updatedAt?: number; }): Promise; } declare function createOpensteerExtractionDescriptorStore(options: { readonly root?: FilesystemOpensteerWorkspace; readonly namespace?: string; }): OpensteerExtractionDescriptorStore; declare function parseExtractionDescriptorRecord(record: DescriptorRecord): OpensteerExtractionDescriptorRecord | undefined; type OpensteerEnvironment = Record; declare const OPENSTEER_ENGINE_NAMES: readonly ["playwright", "abp"]; type OpensteerEngineName = (typeof OPENSTEER_ENGINE_NAMES)[number]; declare const DEFAULT_OPENSTEER_ENGINE: OpensteerEngineName; declare function resolveOpensteerEngineName(input?: { readonly requested?: string; readonly environment?: string; }): OpensteerEngineName; declare function normalizeOpensteerEngineName(value: string, source?: string): OpensteerEngineName; type DisposableBrowserCoreEngine = BrowserCoreEngine & { dispose?: () => Promise; [Symbol.asyncDispose]?: () => Promise; }; interface WorkspaceBrowserBootstrap { readonly kind: "empty" | "cloneLocalProfile"; readonly sourceUserDataDir?: string; readonly sourceProfileDirectory?: string; } interface WorkspaceBrowserManifest { readonly mode: "persistent"; readonly createdAt: number; readonly updatedAt: number; readonly userDataDir: "browser/user-data"; readonly bootstrap: WorkspaceBrowserBootstrap; } interface WorkspaceLiveBrowserRecord { readonly mode: "persistent"; readonly ownership: "owned" | "attached"; readonly engine: OpensteerEngineName; readonly endpoint?: string; readonly baseUrl?: string; readonly remoteDebuggingUrl?: string; readonly sessionDir?: string; readonly pid: number; readonly startedAt: number; readonly executablePath?: string; readonly userDataDir: string; } interface OpensteerBrowserStatus { readonly mode: "temporary" | "persistent" | "attach"; readonly engine: OpensteerEngineName; readonly workspace?: string; readonly live: boolean; } interface OpensteerBrowserManagerOptions { readonly rootDir?: string; readonly rootPath?: string; readonly workspace?: string; readonly engineName?: OpensteerEngineName; readonly environment?: OpensteerEnvironment; readonly browser?: OpensteerBrowserOptions; readonly launch?: OpensteerBrowserLaunchOptions; readonly context?: OpensteerBrowserContextOptions; } declare class OpensteerBrowserManager { readonly mode: "temporary" | "persistent" | "attach"; readonly engineName: OpensteerEngineName; readonly rootPath: string; readonly workspace: string | undefined; readonly cleanupRootOnDisconnect: boolean; private readonly browserOptions; private readonly launchOptions; private readonly contextOptions; private workspaceStore; constructor(options?: OpensteerBrowserManagerOptions); createEngine(): Promise; status(): Promise; clonePersistentBrowser(input: { readonly sourceUserDataDir: string; readonly sourceProfileDirectory?: string; }): Promise; reset(): Promise; delete(): Promise; close(): Promise; private createAbpEngine; private createTemporaryAbpEngine; private createPersistentAbpEngine; private createAdoptedAbpEngine; private createTemporaryEngine; private createAttachEngine; private createPersistentEngine; private createAttachedEngine; private ensureWorkspaceStore; private ensurePersistentBrowserManifest; private readBrowserManifest; private readLivePersistentBrowser; private readStoredLiveBrowser; private resolveLivePersistentEngineName; private assertPersistentBrowserClosed; private closePersistentBrowser; private writeLivePersistentBrowser; private requirePersistentMode; private unregisterLocalViewSessionForRecord; } declare const OPENSTEER_PROVIDER_MODES: readonly ["local", "cloud"]; type OpensteerProviderMode = (typeof OPENSTEER_PROVIDER_MODES)[number]; type OpensteerProviderSource = "explicit" | "env" | "default"; interface OpensteerLocalProviderOptions { readonly mode: "local"; } interface OpensteerCloudProviderOptions { readonly mode: "cloud"; readonly apiKey?: string; readonly baseUrl?: string; readonly appBaseUrl?: string; readonly browserProfile?: CloudBrowserProfilePreference; readonly region?: string; readonly sessionId?: string; } type OpensteerProviderOptions = OpensteerLocalProviderOptions | OpensteerCloudProviderOptions; interface OpensteerResolvedProvider { readonly mode: OpensteerProviderMode; readonly source: OpensteerProviderSource; } declare function assertProviderSupportsEngine(provider: OpensteerProviderMode, engine: string): void; declare function normalizeOpensteerProviderMode(value: string, source?: string): OpensteerProviderMode; declare function resolveOpensteerProvider(input?: { readonly provider?: OpensteerProviderOptions; readonly environmentProvider?: string; }): OpensteerResolvedProvider; interface OpensteerRouteRequest { readonly url: string; readonly method: string; readonly headers: readonly HeaderEntry[]; readonly resourceType: NetworkRecord$1["resourceType"]; readonly pageRef?: PageRef; readonly postData?: BodyPayload$1; } interface OpensteerFetchedRouteResponse { readonly url: string; readonly status: number; readonly statusText: string; readonly headers: readonly HeaderEntry[]; readonly body?: BodyPayload$1; readonly redirected: boolean; } type OpensteerRouteHandlerResult = { readonly kind: "continue"; } | { readonly kind: "fulfill"; readonly status?: number; readonly headers?: readonly HeaderEntry[]; readonly body?: string | Uint8Array; readonly contentType?: string; } | { readonly kind: "abort"; readonly errorCode?: string; }; interface OpensteerRouteOptions { readonly pageRef?: PageRef; readonly urlPattern: string; readonly resourceTypes?: readonly NetworkRecord$1["resourceType"][]; readonly times?: number; readonly handler: (input: { readonly request: OpensteerRouteRequest; fetchOriginal(): Promise; }) => OpensteerRouteHandlerResult | Promise; } interface OpensteerRouteRegistration { readonly routeId: string; readonly sessionRef: SessionRef; readonly pageRef?: PageRef; readonly urlPattern: string; } interface OpensteerInterceptScriptOptions { readonly pageRef?: PageRef; readonly urlPattern: string; readonly times?: number; readonly handler: (input: { readonly url: string; readonly content: string; readonly headers: readonly HeaderEntry[]; readonly status: number; }) => string | Promise; } interface OpensteerRuntimeOptions { readonly workspace?: string; readonly rootDir?: string; readonly rootPath?: string; readonly engineName?: OpensteerEngineName; readonly environment?: OpensteerEnvironment; readonly browser?: OpensteerBrowserOptions; readonly launch?: OpensteerBrowserLaunchOptions; readonly context?: OpensteerBrowserContextOptions; readonly engine?: BrowserCoreEngine; readonly engineFactory?: OpensteerEngineFactory; readonly policy?: OpensteerPolicy; readonly descriptorStore?: DomDescriptorStore$1; readonly extractionDescriptorStore?: OpensteerExtractionDescriptorStore$1; readonly cleanupRootOnClose?: boolean; readonly observability?: Partial; readonly observationSessionId?: string; readonly observationSink?: ObservationSink; } interface OpensteerSessionRuntimeOptions { readonly name: string; readonly rootDir?: string; readonly rootPath?: string; readonly engineName?: OpensteerEngineName; readonly environment?: OpensteerEnvironment; readonly browser?: OpensteerBrowserOptions; readonly launch?: OpensteerBrowserLaunchOptions; readonly context?: OpensteerBrowserContextOptions; readonly engine?: BrowserCoreEngine; readonly engineFactory?: OpensteerEngineFactory; readonly policy?: OpensteerPolicy; readonly descriptorStore?: DomDescriptorStore$1; readonly extractionDescriptorStore?: OpensteerExtractionDescriptorStore$1; readonly cleanupRootOnClose?: boolean; readonly observability?: Partial; readonly observationSessionId?: string; readonly observationSink?: ObservationSink; } interface OpensteerTargetOptions { readonly element?: number; readonly selector?: string; readonly persist?: string; readonly captureNetwork?: string; } interface OpensteerClickOptions extends OpensteerTargetOptions { readonly button?: OpensteerComputerMouseButton; readonly clickCount?: number; readonly modifiers?: readonly OpensteerComputerKeyModifier[]; } interface OpensteerInputOptions extends OpensteerTargetOptions { readonly text: string; readonly pressEnter?: boolean; } interface OpensteerScrollOptions extends OpensteerTargetOptions { readonly direction: "up" | "down" | "left" | "right"; readonly amount: number; } interface OpensteerExtractOptions { readonly persist: string; } interface OpensteerWaitForPageOptions { readonly openerPageRef?: string; readonly urlIncludes?: string; readonly timeoutMs?: number; readonly pollIntervalMs?: number; } type OpensteerAddInitScriptOptions = OpensteerAddInitScriptInput; type OpensteerGotoOptions = Omit; type OpensteerNetworkQueryOptions = OpensteerNetworkQueryInput; type OpensteerNetworkQueryResult = OpensteerNetworkQueryOutput; type OpensteerNetworkDetailResult = OpensteerNetworkDetailOutput; type OpensteerFetchOptions = Omit & { readonly body?: string | OpensteerRequestBodyInput; }; type OpensteerComputerExecuteOptions = OpensteerComputerExecuteInput; type OpensteerStorageMap = Readonly>; type OpensteerBrowserState = OpensteerStateQueryOutput; interface OpensteerCookieJar { readonly domain?: string; has(name: string): boolean; get(name: string): string | undefined; getAll(): readonly CookieRecord[]; serialize(): string; } interface OpensteerDomController { click(input: OpensteerClickOptions): Promise; hover(input: OpensteerTargetOptions): Promise; input(input: OpensteerInputOptions): Promise; scroll(input: OpensteerScrollOptions): Promise; } interface OpensteerNetworkController { query(input?: OpensteerNetworkQueryOptions): Promise; detail(recordId: string, options?: { readonly probe?: boolean; }): Promise; } interface OpensteerOptions extends OpensteerRuntimeOptions { readonly provider?: OpensteerProviderOptions; } interface OpensteerBrowserCloneOptions { readonly sourceUserDataDir: string; readonly sourceProfileDirectory?: string; } interface OpensteerBrowserController { status(): Promise; clone(input: OpensteerBrowserCloneOptions): Promise; reset(): Promise; delete(): Promise; } declare class Opensteer { private readonly runtime; private readonly browserManager; readonly browser: OpensteerBrowserController; readonly dom: OpensteerDomController; readonly network: OpensteerNetworkController; constructor(options?: OpensteerOptions); open(input?: string | OpensteerOpenInput): Promise; info(): Promise; listPages(input?: OpensteerPageListInput): Promise; newPage(input?: OpensteerPageNewInput): Promise; activatePage(input: OpensteerPageActivateInput): Promise; closePage(input?: OpensteerPageCloseInput): Promise; goto(url: string, options?: OpensteerGotoOptions): Promise; evaluate(input: string | OpensteerPageEvaluateInput): Promise; addInitScript(input: string | OpensteerAddInitScriptInput): Promise; click(input: OpensteerClickOptions): Promise; hover(input: OpensteerTargetOptions): Promise; input(input: OpensteerInputOptions): Promise; scroll(input: OpensteerScrollOptions): Promise; extract(input: OpensteerExtractOptions): Promise; waitForPage(input?: OpensteerWaitForPageOptions): Promise; cookies(domain?: string): Promise; storage(domain?: string, type?: OpensteerStorageArea): Promise; state(domain?: string): Promise; fetch(url: string, options?: OpensteerFetchOptions): Promise; computerExecute(input: OpensteerComputerExecuteOptions): Promise; route(input: OpensteerRouteOptions): Promise; interceptScript(input: OpensteerInterceptScriptOptions): Promise; close(): Promise; disconnect(): Promise; private requireOwnedInstrumentationRuntime; } declare const DEFAULT_OPENSTEER_CLOUD_BASE_URL = "https://api.opensteer.com"; interface OpensteerCloudConfig { readonly apiKey: string; readonly baseUrl: string; readonly appBaseUrl?: string; readonly browserProfile?: CloudBrowserProfilePreference; } declare function resolveCloudConfig(input?: { readonly provider?: OpensteerProviderOptions; readonly environment?: OpensteerEnvironment; }): OpensteerCloudConfig | undefined; interface OpensteerResolvedRuntimeConfig { readonly provider: OpensteerResolvedProvider; readonly cloud?: OpensteerCloudConfig; } declare function resolveOpensteerRuntimeConfig(input?: { readonly provider?: OpensteerProviderOptions; readonly environment?: OpensteerEnvironment; }): OpensteerResolvedRuntimeConfig; type BrowserBrandId = "chrome" | "chrome-canary" | "chromium" | "brave" | "edge" | "vivaldi" | "helium"; interface SyncBrowserProfileCookiesInput { readonly profileId: string; readonly brandId?: BrowserBrandId; readonly userDataDir?: string; readonly profileDirectory?: string; readonly domains?: readonly string[]; } interface OpensteerCloudSessionCreateInput { readonly name?: string; readonly browser?: OpensteerBrowserLaunchOptions; readonly context?: OpensteerBrowserContextOptions; readonly browserProfile?: CloudBrowserProfilePreference; readonly observability?: Partial; readonly sourceType?: "manual" | "local-cloud"; readonly sourceRef?: string; readonly localWorkspaceRootPath?: string; } interface OpensteerCloudSessionDescriptor { readonly sessionId: string; readonly status?: string; readonly baseUrl?: string; readonly initialGrants?: Partial>; readonly initialGrantExpiresAt?: number; } interface OpensteerCloudSessionState { readonly status?: string; readonly runtimeWorkerId?: string; readonly registryDesiredRevision?: number; readonly registryLoadedRevision?: number; readonly idleTimeoutMs?: number; readonly absoluteTtlMs?: number; readonly expiresAt?: number; } interface CloudRequestOptions { readonly signal?: AbortSignal | undefined; readonly timeoutMs?: number | undefined; } declare class OpensteerCloudClient { private readonly config; constructor(config: OpensteerCloudConfig); getConfig(): OpensteerCloudConfig; createSession(input?: OpensteerCloudSessionCreateInput, options?: CloudRequestOptions): Promise; listSessions(): Promise; getSession(sessionId: string, options?: CloudRequestOptions): Promise; issueAccess(sessionId: string, capabilities: readonly OpensteerSessionGrantKind[], options?: CloudRequestOptions): Promise; getSessionRecording(sessionId: string): Promise; startSessionRecording(sessionId: string): Promise; stopSessionRecording(sessionId: string): Promise; closeSession(sessionId: string): Promise; createBrowserProfileImport(input: BrowserProfileImportCreateRequest): Promise; uploadBrowserProfileImportPayload(input: { readonly uploadUrl: string; readonly payload: Buffer | Uint8Array; }): Promise; getBrowserProfileImport(importId: string): Promise; syncBrowserProfileCookies(input: SyncBrowserProfileCookiesInput): Promise; importDescriptors(entries: readonly CloudRegistryImportEntry[]): Promise; importRequestPlans(input: CloudRequestPlanImportRequest): Promise; buildAuthorizationHeader(): string; private buildHeaders; private request; private waitForSessionClosed; } declare const OPENSTEER_LIVE_SESSION_LAYOUT = "opensteer-session"; declare const OPENSTEER_LIVE_SESSION_VERSION = 1; type OpensteerLiveSessionProvider = "local" | "cloud"; interface PersistedSessionRecordBase { readonly layout: typeof OPENSTEER_LIVE_SESSION_LAYOUT; readonly version: typeof OPENSTEER_LIVE_SESSION_VERSION; readonly provider: OpensteerLiveSessionProvider; readonly workspace?: string; readonly updatedAt: number; readonly activePageRef?: string; readonly activePageUrl?: string; readonly activePageTitle?: string; readonly reconnectable?: boolean; readonly capabilities?: OpensteerSessionCapabilities; } interface PersistedLocalBrowserSessionRecord extends PersistedSessionRecordBase { readonly provider: "local"; readonly engine: "playwright" | "abp"; readonly ownership?: Exclude; readonly endpoint?: string; readonly baseUrl?: string; readonly remoteDebuggingUrl?: string; readonly sessionDir?: string; readonly pid: number; readonly startedAt: number; readonly executablePath?: string; readonly userDataDir: string; } interface PersistedCloudSessionRecord extends PersistedSessionRecordBase { readonly provider: "cloud"; readonly sessionId: string; readonly startedAt: number; } type PersistedSessionRecord = PersistedLocalBrowserSessionRecord | PersistedCloudSessionRecord; declare function resolveLiveSessionRecordPath(rootPath: string, provider: OpensteerLiveSessionProvider): string; declare function resolveLocalSessionRecordPath(rootPath: string): string; declare function resolveCloudSessionRecordPath(rootPath: string): string; declare function readPersistedSessionRecord(rootPath: string, provider: OpensteerLiveSessionProvider): Promise; declare function readPersistedCloudSessionRecord(rootPath: string): Promise; declare function readPersistedLocalBrowserSessionRecord(rootPath: string): Promise; declare function writePersistedSessionRecord(rootPath: string, record: PersistedSessionRecord): Promise; declare function clearPersistedSessionRecord(rootPath: string, provider: OpensteerLiveSessionProvider): Promise; interface LocalChromeProfileDescriptor { readonly directory: string; readonly name: string; readonly userDataDir: string; } interface InspectedCdpEndpoint { readonly endpoint: string; readonly browser?: string; readonly protocolVersion?: string; readonly httpUrl?: string; readonly port?: number; } interface LocalCdpBrowserCandidate extends InspectedCdpEndpoint { readonly source: "devtools-active-port" | "fallback-port"; readonly installationBrand?: BrowserBrandId; readonly userDataDir?: string; } declare function listLocalChromeProfiles(userDataDir?: string): readonly LocalChromeProfileDescriptor[]; interface InspectCdpEndpointInput { readonly endpoint: string; readonly headers?: Readonly>; readonly timeoutMs?: number; } declare class OpensteerAttachAmbiguousError extends Error { readonly candidates: readonly LocalCdpBrowserCandidate[]; readonly code = "attach-ambiguous"; constructor(candidates: readonly LocalCdpBrowserCandidate[]); } declare function inspectCdpEndpoint(input: InspectCdpEndpointInput): Promise; declare function discoverLocalCdpBrowsers(input?: { readonly timeoutMs?: number; }): Promise; export { type AnchorTargetRef, type AppendTraceEntryInput, type ArtifactManifest, type ArtifactPayloadType, type ArtifactScope, type BrowserProfileArchiveFormat, type BrowserProfileCreateRequest, type BrowserProfileDescriptor, type BrowserProfileImportCreateRequest, type BrowserProfileImportCreateResponse, type BrowserProfileImportDescriptor, type BrowserProfileImportStatus, type BrowserProfileListResponse, type BrowserProfileStatus, type CloudBrowserContextConfig, type CloudBrowserExtensionConfig, type CloudBrowserLaunchConfig, type CloudBrowserProfileLaunchPreference, type CloudBrowserProfilePreference, type CloudFingerprintMode, type CloudFingerprintPreference, type CloudGeolocation, type CloudProxyMode, type CloudProxyPreference, type CloudProxyProtocol, type CloudRegistryImportEntry, type CloudRegistryImportRequest, type CloudRegistryImportResponse, type CloudRequestPlanImportEntry, type CloudRequestPlanImportRequest, type CloudSessionLaunchConfig, type CloudSessionSourceType, type CloudSessionStatus, type CloudSessionSummary, type CloudSessionVisibilityScope, type CloudViewport, type ContextHop, type CreateFilesystemOpensteerWorkspaceOptions, type CreateTraceRunInput, DEFAULT_OPENSTEER_CLOUD_BASE_URL, DEFAULT_OPENSTEER_ENGINE, DEFERRED_MATCH_ATTR_KEYS, type DescriptorRecord, type DescriptorRegistryStore, type DomActionBridge, type DomActionBridgeProvider, type DomActionOutcome, type DomActionPolicyOperation, type DomActionScrollAlignment, type DomActionScrollOptions, type DomActionSettleOptions, type DomActionTargetInspection, type DomArrayFieldSelector, type DomArrayRowMetadata, type DomArraySelector, type DomBuildPathInput, type DomClickInput, type DomDescriptorPayload, type DomDescriptorRecord, type DomDescriptorStore, type DomExtractArrayRowsInput, type DomExtractFieldSelector, type DomExtractFieldsInput, type DomExtractedArrayRow, type DomHoverInput, type DomInputInput, type DomPath, type DomReadDescriptorInput, type DomResolveTargetInput, type DomRuntime, type DomScrollInput, type DomTargetRef, type DomWriteDescriptorInput, type ElementPath, ElementPathError, type FallbackDecision, type FallbackEvaluationInput, type FallbackPolicy, FilesystemArtifactStore, type FilesystemObservationStore, type FilesystemOpensteerWorkspace, type InspectedCdpEndpoint, type InteractionTraceRecord, type InteractionTraceRegistryStore, type JsonArray, type JsonObject, type JsonPrimitive, type JsonValue, type ListObservationArtifactsInput, type ListObservationEventsInput, type LocalCdpBrowserCandidate, type LocalChromeProfileDescriptor, MATCH_ATTRIBUTE_PRIORITY, type MatchClause, OPENSTEER_DOM_ACTION_BRIDGE_SYMBOL, OPENSTEER_ENGINE_NAMES, OPENSTEER_FILESYSTEM_WORKSPACE_LAYOUT, OPENSTEER_FILESYSTEM_WORKSPACE_VERSION, Opensteer, type OpensteerAddInitScriptOptions, type OpensteerArtifactStore, OpensteerAttachAmbiguousError, type OpensteerBrowserCloneOptions, type OpensteerBrowserController, OpensteerBrowserManager, type OpensteerBrowserManagerOptions, type OpensteerBrowserState, type OpensteerBrowserStatus, type OpensteerClickOptions, OpensteerCloudClient, type OpensteerCloudConfig, type OpensteerCloudProviderOptions, type OpensteerCloudSessionCreateInput, type OpensteerCloudSessionDescriptor, type OpensteerComputerExecuteOptions, type OpensteerCookieJar, type OpensteerDomController, type OpensteerEngineName, type OpensteerError, type OpensteerErrorCode, type OpensteerExtractOptions, type OpensteerExtractionDescriptorPayload, type OpensteerExtractionDescriptorRecord, type OpensteerExtractionDescriptorStore, type OpensteerFetchOptions, type OpensteerFetchedRouteResponse, type OpensteerGotoOptions, type OpensteerInputOptions, type OpensteerInterceptScriptOptions, type OpensteerLiveSessionProvider, type OpensteerLocalProviderOptions, type OpensteerNetworkController, type OpensteerNetworkDetailResult, type OpensteerNetworkQueryOptions, type OpensteerNetworkQueryResult, type OpensteerOptions, type OpensteerPolicy, OpensteerProtocolError, type OpensteerProviderMode, type OpensteerProviderOptions, type OpensteerProviderSource, type OpensteerResolvedProvider, type OpensteerRouteHandlerResult, type OpensteerRouteOptions, type OpensteerRouteRegistration, type OpensteerRuntimeOptions, type OpensteerScrollOptions, type OpensteerSessionRuntimeOptions, type OpensteerStorageMap, type OpensteerTargetOptions, type OpensteerTraceStore, type OpensteerWaitForPageOptions, type OpensteerWorkspaceManifest, type PathNode, type PersistedCloudSessionRecord, type PersistedLocalBrowserSessionRecord, type PersistedSessionRecord, type ProtocolArtifactDelivery, type RegistryProvenance, type RegistryRecord, type ReplayElementPath, type RequestPlanRecord, type RequestPlanRegistryStore, type ResolveRegistryRecordInput, type ResolvedDomTarget, type RetryDecision, type RetryEvaluationInput, type RetryPolicy, STABLE_PRIMARY_ATTR_KEYS, type SavedNetworkQueryInput, type SavedNetworkStore, type SettleContext, type SettleDelayInput, type SettleObserver, type SettlePolicy, type SettleTrigger, type StoredArtifactPayload, type StoredArtifactRecord, type StructuralElementAnchor, type StructuredArtifactKind, type SyncBrowserProfileCookiesInput, type TimeoutExecutionContext, type TimeoutPolicy, type TimeoutResolutionInput, type TraceEntryRecord, type TraceRunManifest, type UpdateRequestPlanFreshnessInput, type WorkspaceBrowserBootstrap, type WorkspaceBrowserManifest, type WorkspaceLiveBrowserRecord, type WriteBinaryArtifactInput, type WriteDescriptorInput, type WriteInteractionTraceInput, type WriteRequestPlanInput, type WriteStructuredArtifactInput, assertProviderSupportsEngine, buildArrayFieldPathCandidates, buildDomDescriptorKey, buildDomDescriptorPayload, buildDomDescriptorVersion, buildPathCandidates, buildPathSelectorHint, buildSegmentSelector, clearPersistedSessionRecord, cloneElementPath, cloneReplayElementPath, cloneStructuralElementAnchor, createArtifactStore, createDomDescriptorStore, createDomRuntime, createFilesystemOpensteerWorkspace, createObservationStore, createOpensteerExtractionDescriptorStore, defaultFallbackPolicy, defaultPolicy, defaultRetryPolicy, defaultSettlePolicy, defaultTimeoutPolicy, delayWithSignal, discoverLocalCdpBrowsers, hashDomDescriptorPersist, inspectCdpEndpoint, isCurrentUrlField, isOpensteerProtocolError, isValidCssAttributeKey, listLocalChromeProfiles, manifestToExternalBinaryLocation, normalizeExtractedValue, normalizeObservabilityConfig, normalizeOpensteerEngineName, normalizeOpensteerProviderMode, normalizeWorkspaceId, opensteerErrorCodes, parseDomDescriptorRecord, parseExtractionDescriptorRecord, readPersistedCloudSessionRecord, readPersistedLocalBrowserSessionRecord, readPersistedSessionRecord, resolveCloudConfig, resolveCloudSessionRecordPath, resolveDomActionBridge, resolveExtractedValueInContext, resolveFilesystemWorkspacePath, resolveLiveSessionRecordPath, resolveLocalSessionRecordPath, resolveOpensteerEngineName, resolveOpensteerProvider, resolveOpensteerRuntimeConfig, runWithPolicyTimeout, sanitizeElementPath, sanitizeReplayElementPath, sanitizeStructuralElementAnchor, settleWithPolicy, shouldKeepAttributeForPath, writePersistedSessionRecord };