import type { AttachedBrowserDevice, AuthRun, AuthRunListResponse, AuthRunMutationResponse, BrowserAction, BrowserActionReceipt, BrowserClipboard, BrowserDiagnosticBatch, BrowserDiagnosticKind, BrowserDownload, BrowserDownloadListResponse, BrowserDownloadSaveResponse, BrowserDomReadLocator, BrowserDomReadResponse, BrowserDomSafeAttribute, BrowserIdentity, BrowserIdentityListResponse, BrowserIdentityMutationResponse, BrowserLocator, BrowserObservation, BrowserPermission, BrowserPermissionSetting, BrowserRevisionListResponse, BrowserSession, BrowserSessionMutationResponse, BrowserTarget, ComputerAction, ComputerActionReceipt, ComputerClipboard, ComputerLocator, ComputerObservation, ComputerSession, ComputerSessionMutationResponse, ComputerTargetListResponse, ExternalAuthRunRequest, ExternalAuthRunResponse, InteractionPlacement, PublishBrowserRevisionResponse, ReportAuthRunRequest, RequestHumanInteractionToolInput, RequestHumanInteractionToolOutput, SiteAuthConnection, SiteAuthConnectionListResponse, StartAuthRunRequest, UpdateBrowserIdentityRequest, VerifyAuthRunRequest } from "@opengeni/contracts"; import type { CodemodeCallOptions, CodemodeClient } from "./index.js"; import { type CodemodeClientProvider } from "./environment.js"; import { CodemodeArtifactCollection } from "./artifacts.js"; import { type CodemodeLocalImage } from "./images.js"; export { CodemodeToolExecutionError } from "./structured.js"; export type InteractionDiscovery = { browserRevision: number; computerRevision: number; identityRevision: number; attachedBrowserRevision: number; browsers: BrowserSession[]; computers: ComputerSession[]; identities: BrowserIdentity[]; /** Online machines ready for the extension; listed only when no attached * profile is connected. */ attachedBrowserBridges: Array<{ enrollmentId: string; connectedProfileCount: number; }>; attachedBrowsers: Array<{ id: string; name: string; profileLabel?: string; browserName: string; platform: AttachedBrowserDevice["platform"]; state: AttachedBrowserDevice["state"]; tabCount: number; /** Capabilities this profile lacks; absent when it supports all of them. */ unsupported?: string[]; }>; }; export type CodemodeBrowserOpenOptions = { browserSessionId?: string | undefined; mode?: "reuse_or_create" | "new" | undefined; name?: string | undefined; initialUrl?: string | undefined; headless?: boolean | undefined; /** `{ kind: "attached_device" }` without a deviceId opens the person's own * connected Chrome (the only, or most recently active, profile). */ placement?: InteractionPlacement | { kind: "attached_device"; } | undefined; identityId?: string | undefined; baseRevisionId?: string | undefined; linkedComputerSessionId?: string | undefined; }; export type CodemodeComputerOpenOptions = { computerSessionId?: string | undefined; mode?: "reuse_or_create" | "new" | undefined; name?: string | undefined; placement?: InteractionPlacement | undefined; }; export type BrowserActionFences = { expectedTargetGeneration?: string | undefined; expectedDocumentGeneration?: string | null | undefined; expectedFrameId?: string | null | undefined; }; export type CodemodeBrowserScreenshotOptions = { /** Capture the entire scrollable page when supported by the browser. */ fullPage?: boolean | undefined; /** JPEG quality, 1–100. Reduce it if a large image exceeds the journal bound. */ quality?: number | undefined; /** Save the still at this exact path. Existing files are never overwritten. */ saveTo?: string | undefined; }; export type CodemodeBrowserScreenshotMetadata = Readonly<{ kind: "browser_screenshot"; browserSessionId: string; targetId: string; frameId: string; targetGeneration: string; documentGeneration: string; mediaType: "image/png" | "image/jpeg"; width: number; height: number; deviceScaleFactor: number; scrollX: number; scrollY: number; capturedAt: string; fullPage: boolean; }>; export type CodemodeBrowserScreenshot = CodemodeLocalImage & Readonly<{ /** Small structured frame metadata; pixel bytes stay in the local image file. */ metadata: CodemodeBrowserScreenshotMetadata; }>; export type CodemodeBrowserAgentNode = Readonly<{ ref: string; role: string; depth: number; name?: string; description?: string; value?: string | { redacted: true; reason: string; }; /** Omitted when empty. */ states?: readonly string[]; /** Omitted when empty. */ actions?: readonly string[]; }>; export type CodemodeBrowserAgentView = Readonly<{ sourceKind: "snapshot" | "diff" | "none"; nodes: readonly CodemodeBrowserAgentNode[]; /** Nodes left out by the output budget; absent when nothing was left out. */ omittedNodeCount?: number; /** The largest regions holding the left-out nodes. */ omittedRegions?: readonly Readonly<{ role: string; name?: string; count: number; }>[]; removedRefCount?: number; clippedFieldCount?: number; }>; /** A tab with the identity, page, selection and fences a next call needs. */ export type CodemodeBrowserTarget = Readonly<{ id: string; kind: BrowserTarget["kind"]; title: string; url: string; selected: boolean; controllerGeneration: string; targetGeneration: string; documentGeneration: string | null; }>; export type CodemodeBrowserTargetList = Readonly<{ browserSessionId: string; targets: readonly CodemodeBrowserTarget[]; }>; /** The compact default observation. Empty, zero and default fields are * omitted; use observeFull() for the complete BrowserObservation. */ export type CodemodeBrowserAgentObservation = Readonly<{ target: CodemodeBrowserTarget; frameId?: string; viewport?: Readonly<{ width: number; height: number; deviceScaleFactor?: number; maxTouchPoints?: number; }>; focusedRef?: string; changedRegions?: BrowserObservation["changedRegions"]; diagnostics?: BrowserObservation["diagnostics"]; dialog?: NonNullable; screenshot?: NonNullable; agentView: CodemodeBrowserAgentView; }>; /** The compact default receipt; pass view "full" for the complete * BrowserActionReceipt with operation id and timestamps. */ export type CodemodeBrowserActionReceipt = Readonly<{ targetId: string; state: BrowserActionReceipt["state"]; error?: NonNullable; targets?: BrowserActionReceipt["targets"]; observation?: CodemodeBrowserAgentObservation; }>; export type CodemodeBrowserActionOptions = BrowserActionFences & { view?: "compact" | "full" | "none" | undefined; }; export type CodemodeBrowserAxReadOptions = Readonly<{ mode?: "matches" | "count" | "subtree"; ref?: string; scopeRef?: string; role?: string; nameContains?: string; textContains?: string; state?: string; action?: string; limit?: number; }>; export type CodemodeBrowserDomReadOptions = BrowserActionFences & Readonly<{ mode: "dom"; dom: { kind: "element"; locator: BrowserDomReadLocator; attributes?: readonly BrowserDomSafeAttribute[]; maxChars?: number; } | { kind: "count"; selector: string; }; }>; export type CodemodeBrowserReadOptions = CodemodeBrowserAxReadOptions | CodemodeBrowserDomReadOptions; export type CodemodeBrowserAxReadResult = Readonly<{ browserSessionId: string; targetId: string; observationId: string; targetGeneration: string; documentGeneration: string | null; frameId: string | null; source: "accessibility"; mode: "matches" | "count" | "subtree"; scopeFound: boolean; nodes: readonly CodemodeBrowserAgentNode[]; totalMatches: number; omittedMatches: number; clippedFieldCount: number; maxNodeBytes: number; }>; export type CodemodeBrowserReadResult = CodemodeBrowserAxReadResult | (BrowserDomReadResponse & { source: "dom"; }); export type ComputerActionFences = { expectedTargetGeneration?: string | undefined; expectedObservationId?: string | null | undefined; expectedFrameId?: string | null | undefined; }; /** Authored object facade over the exact atomic Browser/Computer catalog. */ export declare class OpenGeniCodemode { readonly browsers: CodemodeBrowserCollection; readonly computers: CodemodeComputerCollection; readonly artifacts: CodemodeArtifactCollection; readonly auth: CodemodeAuth; constructor(client?: CodemodeClient | CodemodeClientProvider); discover(options?: { scope?: "current_session" | "workspace" | "attached_browsers" | undefined; includeTerminal?: boolean | undefined; includeArchivedIdentities?: boolean | undefined; includeDisconnectedDevices?: boolean | undefined; }, callOptions?: CodemodeCallOptions): Promise; requestHuman(request: RequestHumanInteractionToolInput, callOptions?: CodemodeCallOptions): Promise; } export declare class CodemodeBrowserCollection { readonly client: CodemodeClientProvider; readonly identities: CodemodeBrowserIdentityCollection; constructor(client: CodemodeClientProvider); list(options?: { includeTerminal?: boolean | undefined; }, callOptions?: CodemodeCallOptions): Promise; open(options?: CodemodeBrowserOpenOptions, callOptions?: CodemodeCallOptions): Promise; use(browserSessionId: string): CodemodeBrowser; } export declare class CodemodeBrowserIdentityCollection { private readonly client; constructor(client: CodemodeClientProvider); list(options?: { includeArchived?: boolean | undefined; }, callOptions?: CodemodeCallOptions): Promise; get(identityId: string, callOptions?: CodemodeCallOptions): Promise; create(name: string, callOptions?: CodemodeCallOptions): Promise; revisions(identityId: string, callOptions?: CodemodeCallOptions): Promise; update(identityId: string, update: Omit, callOptions?: CodemodeCallOptions): Promise; } export declare class CodemodeBrowser { private readonly client; readonly id: string; readonly tabs: CodemodeBrowserTabCollection; readonly auth: CodemodeBrowserAuth; readonly clipboard: CodemodeBrowserClipboard; readonly downloads: CodemodeBrowserDownloadCollection; constructor(client: CodemodeClientProvider, id: string); refresh(callOptions?: CodemodeCallOptions): Promise; observe(targetId?: string, callOptions?: CodemodeCallOptions): Promise; observeFull(targetId?: string, callOptions?: CodemodeCallOptions): Promise; read(options?: CodemodeBrowserReadOptions & { targetId?: string | undefined; }, callOptions?: CodemodeCallOptions): Promise; screenshot(options?: CodemodeBrowserScreenshotOptions & { targetId?: string | undefined; }, callOptions?: CodemodeCallOptions): Promise; act(action: BrowserAction, options?: CodemodeBrowserActionOptions & { targetId?: string | undefined; }, callOptions?: CodemodeCallOptions): Promise; diagnostics(targetId?: string, options?: { kinds?: BrowserDiagnosticKind[] | undefined; after?: number | undefined; limit?: number | undefined; }, callOptions?: CodemodeCallOptions): Promise; publish(input: { identityId: string; expectedHeadGeneration: number; advanceDefault?: boolean | undefined; }, callOptions?: CodemodeCallOptions): Promise; suspend(callOptions?: CodemodeCallOptions): Promise; resume(callOptions?: CodemodeCallOptions): Promise; end(callOptions?: CodemodeCallOptions): Promise; private lifecycle; } export declare class CodemodeBrowserDownloadCollection { private readonly client; private readonly browserSessionId; constructor(client: CodemodeClientProvider, browserSessionId: string); list(callOptions?: CodemodeCallOptions): Promise; download(downloadId: string): CodemodeBrowserDownload; } export declare class CodemodeBrowserDownload { private readonly client; private readonly browserSessionId; readonly id: string; constructor(client: CodemodeClientProvider, browserSessionId: string, id: string); get(callOptions?: CodemodeCallOptions): Promise; saveToWorkspace(destinationPath: string, options?: { overwrite?: boolean | undefined; }, callOptions?: CodemodeCallOptions): Promise; } export declare class CodemodeBrowserClipboard { private readonly client; private readonly browserSessionId; private readonly tabs; constructor(client: CodemodeClientProvider, browserSessionId: string, tabs: CodemodeBrowserTabCollection); read(callOptions?: CodemodeCallOptions): Promise; write(text: string, options?: BrowserActionFences & { targetId?: string | undefined; }, callOptions?: CodemodeCallOptions): Promise; clear(options?: BrowserActionFences & { targetId?: string | undefined; }, callOptions?: CodemodeCallOptions): Promise; copy(options?: BrowserActionFences & { targetId?: string | undefined; locator?: BrowserLocator | undefined; content?: "selection" | "value" | "text" | undefined; }, callOptions?: CodemodeCallOptions): Promise; paste(options?: BrowserActionFences & { targetId?: string | undefined; locator?: BrowserLocator | undefined; text?: string | undefined; }, callOptions?: CodemodeCallOptions): Promise; private act; } export declare class CodemodeBrowserTabCollection { private readonly client; private readonly browserSessionId; constructor(client: CodemodeClientProvider, browserSessionId: string); list(callOptions?: CodemodeCallOptions): Promise; selected(callOptions?: CodemodeCallOptions): Promise; use(targetId: string): CodemodeBrowserTab; open(url?: string, callOptions?: CodemodeCallOptions): Promise; select(targetId: string, callOptions?: CodemodeCallOptions): Promise; close(targetId: string, callOptions?: CodemodeCallOptions): Promise; resolveId(targetId: string | undefined, callOptions: CodemodeCallOptions): Promise; } export declare class CodemodeBrowserTab { private readonly client; readonly browserSessionId: string; readonly id: string; constructor(client: CodemodeClientProvider, browserSessionId: string, id: string); observe(callOptions?: CodemodeCallOptions): Promise; observeFull(callOptions?: CodemodeCallOptions): Promise; read(options?: CodemodeBrowserReadOptions, callOptions?: CodemodeCallOptions): Promise; screenshot(options?: CodemodeBrowserScreenshotOptions, callOptions?: CodemodeCallOptions): Promise; act(action: BrowserAction, fences?: CodemodeBrowserActionOptions, callOptions?: CodemodeCallOptions): Promise; /** Navigate this tab. `waitUntil` also waits for that load state, which is * useful before a screenshot of a page that loads its data after `load`. */ navigate(url: string, options?: CodemodeCallOptions & { waitUntil?: "load" | "network_idle" | undefined; }): Promise; targets?: BrowserActionReceipt["targets"]; observation?: CodemodeBrowserAgentObservation; }>>; setPermission(permission: BrowserPermission, setting: BrowserPermissionSetting, fences?: BrowserActionFences, callOptions?: CodemodeCallOptions): Promise; requestHuman(reason: string, options?: { kind?: "manual_login" | "mfa" | "external_action" | "confirmation" | "other"; authRunId?: string | undefined; expiresInSeconds?: number | undefined; }, callOptions?: CodemodeCallOptions): Promise; getByRole(role: string, options?: { name?: string; exact?: boolean; }): CodemodeBrowserLocator; getByText(text: string): CodemodeBrowserLocator; getByLabel(text: string): CodemodeBrowserLocator; getByPlaceholder(text: string): CodemodeBrowserLocator; getByTestId(value: string): CodemodeBrowserLocator; locator(selector: string): CodemodeBrowserLocator; ref(ref: string): CodemodeBrowserLocator; } export declare class CodemodeBrowserLocator { private readonly tab; readonly locator: BrowserLocator; constructor(tab: CodemodeBrowserTab, locator: BrowserLocator); click(options?: { button?: "left" | "right" | "middle"; }, callOptions?: CodemodeCallOptions): Promise; targets?: BrowserActionReceipt["targets"]; observation?: CodemodeBrowserAgentObservation; }>>; doubleClick(callOptions?: CodemodeCallOptions): Promise; targets?: BrowserActionReceipt["targets"]; observation?: CodemodeBrowserAgentObservation; }>>; hover(callOptions?: CodemodeCallOptions): Promise; targets?: BrowserActionReceipt["targets"]; observation?: CodemodeBrowserAgentObservation; }>>; fill(value: string, callOptions?: CodemodeCallOptions): Promise; targets?: BrowserActionReceipt["targets"]; observation?: CodemodeBrowserAgentObservation; }>>; type(text: string, callOptions?: CodemodeCallOptions): Promise; targets?: BrowserActionReceipt["targets"]; observation?: CodemodeBrowserAgentObservation; }>>; press(key: string, callOptions?: CodemodeCallOptions): Promise; targets?: BrowserActionReceipt["targets"]; observation?: CodemodeBrowserAgentObservation; }>>; select(values: string[], callOptions?: CodemodeCallOptions): Promise; targets?: BrowserActionReceipt["targets"]; observation?: CodemodeBrowserAgentObservation; }>>; check(checked?: boolean, callOptions?: CodemodeCallOptions): Promise; targets?: BrowserActionReceipt["targets"]; observation?: CodemodeBrowserAgentObservation; }>>; } export declare class CodemodeAuth { private readonly client; constructor(client: CodemodeClientProvider); listConnections(options?: { includeArchived?: boolean | undefined; }, callOptions?: CodemodeCallOptions): Promise; getConnection(siteAuthConnectionId: string, callOptions?: CodemodeCallOptions): Promise; listRuns(options?: { browserSessionId?: string | undefined; siteAuthConnectionId?: string | undefined; includeSettled?: boolean | undefined; }, callOptions?: CodemodeCallOptions): Promise; getRun(authRunId: string, callOptions?: CodemodeCallOptions): Promise; use(browserSessionId: string, authRunId: string): CodemodeAuthRun; } export declare class CodemodeBrowserAuth { private readonly client; private readonly browserSessionId; constructor(client: CodemodeClientProvider, browserSessionId: string); listRuns(options?: { siteAuthConnectionId?: string | undefined; includeSettled?: boolean | undefined; }, callOptions?: CodemodeCallOptions): Promise; start(request: Omit, callOptions?: CodemodeCallOptions): Promise; use(authRunId: string): CodemodeAuthRun; } export declare class CodemodeAuthRun { private readonly client; readonly browserSessionId: string; readonly id: string; constructor(client: CodemodeClientProvider, browserSessionId: string, id: string); get(callOptions?: CodemodeCallOptions): Promise; report(request: Omit, callOptions?: CodemodeCallOptions): Promise; advanceExternal(request: Omit, callOptions?: CodemodeCallOptions): Promise; verify(request: Omit, callOptions?: CodemodeCallOptions): Promise; } export declare class CodemodeComputerCollection { private readonly client; constructor(client: CodemodeClientProvider); list(options?: { includeTerminal?: boolean | undefined; }, callOptions?: CodemodeCallOptions): Promise; open(options?: CodemodeComputerOpenOptions, callOptions?: CodemodeCallOptions): Promise; use(computerSessionId: string): CodemodeComputer; } export declare class CodemodeComputer { private readonly client; readonly id: string; readonly targets: CodemodeComputerTargetCollection; readonly apps: CodemodeComputerTargetCollection; readonly clipboard: CodemodeComputerClipboard; constructor(client: CodemodeClientProvider, id: string); refresh(callOptions?: CodemodeCallOptions): Promise; observe(targetId?: string, callOptions?: CodemodeCallOptions): Promise; act(action: ComputerAction, options?: ComputerActionFences & { targetId?: string | undefined; }, callOptions?: CodemodeCallOptions): Promise; launch(applicationId: string, callOptions?: CodemodeCallOptions): Promise<{ computerSessionId: string; controllerGeneration: string; targets: { id: string; computerSessionId: string; controllerGeneration: string; targetGeneration: string; kind: "app" | "screen" | "window"; applicationId: string | null; processId: number | null; title: string; bounds: { x: number; y: number; width: number; height: number; } | null; focused: boolean; offScreen?: true | undefined; }[]; }>; end(callOptions?: CodemodeCallOptions): Promise; } export declare class CodemodeComputerClipboard { private readonly client; readonly computerSessionId: string; private readonly targets; constructor(client: CodemodeClientProvider, computerSessionId: string, targets: CodemodeComputerTargetCollection); read(callOptions?: CodemodeCallOptions): Promise; write(text: string, options?: { targetId?: string | undefined; }, callOptions?: CodemodeCallOptions): Promise; clear(options?: { targetId?: string | undefined; }, callOptions?: CodemodeCallOptions): Promise; copy(options?: { targetId?: string | undefined; }, callOptions?: CodemodeCallOptions): Promise; paste(options?: { targetId?: string | undefined; }, callOptions?: CodemodeCallOptions): Promise; private mutate; } export declare class CodemodeComputerTargetCollection { private readonly client; private readonly computerSessionId; constructor(client: CodemodeClientProvider, computerSessionId: string); list(callOptions?: CodemodeCallOptions): Promise; use(targetId: string): CodemodeComputerTarget; focused(callOptions?: CodemodeCallOptions): Promise; resolveId(targetId: string | undefined, callOptions: CodemodeCallOptions): Promise; resolveSeatId(targetId: string | undefined, callOptions: CodemodeCallOptions): Promise; } export declare class CodemodeComputerTarget { private readonly client; readonly computerSessionId: string; readonly id: string; constructor(client: CodemodeClientProvider, computerSessionId: string, id: string); observe(callOptions?: CodemodeCallOptions): Promise; act(action: ComputerAction, fences?: ComputerActionFences, callOptions?: CodemodeCallOptions): Promise; requestHuman(reason: string, options?: { kind?: "manual_login" | "mfa" | "external_action" | "confirmation" | "other"; expiresInSeconds?: number | undefined; }, callOptions?: CodemodeCallOptions): Promise; getByRole(role: string, options?: { name?: string; exact?: boolean; }): CodemodeComputerLocator; getByText(text: string, exact?: boolean): CodemodeComputerLocator; getByLabel(text: string, exact?: boolean): CodemodeComputerLocator; getByIdentifier(value: string): CodemodeComputerLocator; ref(ref: string): CodemodeComputerLocator; } export declare class CodemodeComputerLocator { private readonly target; readonly locator: ComputerLocator; constructor(target: CodemodeComputerTarget, locator: ComputerLocator); invoke(callOptions?: CodemodeCallOptions): Promise<{ protocolVersion: 1; operationId: string; computerSessionId: string; controllerGeneration: string; targetId: string; state: "completed" | "dispatched" | "failed" | "outcome_unknown" | "prepared"; dispatchedAt: string | null; settledAt: string | null; observation: { protocolVersion: 1; observationId: string; computerSessionId: string; target: { id: string; computerSessionId: string; controllerGeneration: string; targetGeneration: string; kind: "app" | "screen" | "window"; applicationId: string | null; processId: number | null; title: string; bounds: { x: number; y: number; width: number; height: number; } | null; focused: boolean; offScreen?: true | undefined; }; frameId: string | null; semantic: { kind: "snapshot"; roots: import("@opengeni/contracts").InteractionSemanticNodeValue[]; nodeCount: number; incomplete?: { reason: "node_budget" | "time_budget"; unreadCount: number; } | undefined; } | { kind: "diff"; baseObservationId: string; removedRefs: string[]; changed: import("@opengeni/contracts").InteractionSemanticNodeValue[]; } | null; screenshot: { available: true; artifactId: string; kind: "assistant_completion" | "browser_screenshot" | "computer_screenshot" | "event_media" | "file" | "generated_image" | "generated_video" | "internal_update" | "tool_result"; contentType: string; originalBytes: number; sha256: string; retainedAt: string; dimensions?: { width: number; height: number; } | undefined; retention: { policy: "workspace_file"; expiresAt: null; } | { policy: "session_screenshot"; expiresAt: string; }; retrieval: { method: "GET"; path: string; acceptRanges: "bytes"; maxRangeBytes: number; }; } | null; focusedRef: string | null; changedRegions: { x: number; y: number; width: number; height: number; }[]; observedAt: string; } | null; error: { code: "attempt_stale" | "capacity_exhausted" | "controller_lost" | "controller_stale" | "document_stale" | "driver_failed" | "frame_stale" | "invalid_action" | "locator_ambiguous" | "locator_not_found" | "machine_locked" | "observation_stale" | "operation_conflict" | "outcome_unknown" | "permission_denied" | "resource_not_found" | "resource_unavailable" | "tab_crashed" | "tab_not_responding" | "target_not_found" | "target_stale" | "timeout" | "unsupported"; message: string; retryable: boolean; details?: Record | undefined; } | null; }>; focus(callOptions?: CodemodeCallOptions): Promise<{ protocolVersion: 1; operationId: string; computerSessionId: string; controllerGeneration: string; targetId: string; state: "completed" | "dispatched" | "failed" | "outcome_unknown" | "prepared"; dispatchedAt: string | null; settledAt: string | null; observation: { protocolVersion: 1; observationId: string; computerSessionId: string; target: { id: string; computerSessionId: string; controllerGeneration: string; targetGeneration: string; kind: "app" | "screen" | "window"; applicationId: string | null; processId: number | null; title: string; bounds: { x: number; y: number; width: number; height: number; } | null; focused: boolean; offScreen?: true | undefined; }; frameId: string | null; semantic: { kind: "snapshot"; roots: import("@opengeni/contracts").InteractionSemanticNodeValue[]; nodeCount: number; incomplete?: { reason: "node_budget" | "time_budget"; unreadCount: number; } | undefined; } | { kind: "diff"; baseObservationId: string; removedRefs: string[]; changed: import("@opengeni/contracts").InteractionSemanticNodeValue[]; } | null; screenshot: { available: true; artifactId: string; kind: "assistant_completion" | "browser_screenshot" | "computer_screenshot" | "event_media" | "file" | "generated_image" | "generated_video" | "internal_update" | "tool_result"; contentType: string; originalBytes: number; sha256: string; retainedAt: string; dimensions?: { width: number; height: number; } | undefined; retention: { policy: "workspace_file"; expiresAt: null; } | { policy: "session_screenshot"; expiresAt: string; }; retrieval: { method: "GET"; path: string; acceptRanges: "bytes"; maxRangeBytes: number; }; } | null; focusedRef: string | null; changedRegions: { x: number; y: number; width: number; height: number; }[]; observedAt: string; } | null; error: { code: "attempt_stale" | "capacity_exhausted" | "controller_lost" | "controller_stale" | "document_stale" | "driver_failed" | "frame_stale" | "invalid_action" | "locator_ambiguous" | "locator_not_found" | "machine_locked" | "observation_stale" | "operation_conflict" | "outcome_unknown" | "permission_denied" | "resource_not_found" | "resource_unavailable" | "tab_crashed" | "tab_not_responding" | "target_not_found" | "target_stale" | "timeout" | "unsupported"; message: string; retryable: boolean; details?: Record | undefined; } | null; }>; setValue(value: string | number | boolean, callOptions?: CodemodeCallOptions): Promise<{ protocolVersion: 1; operationId: string; computerSessionId: string; controllerGeneration: string; targetId: string; state: "completed" | "dispatched" | "failed" | "outcome_unknown" | "prepared"; dispatchedAt: string | null; settledAt: string | null; observation: { protocolVersion: 1; observationId: string; computerSessionId: string; target: { id: string; computerSessionId: string; controllerGeneration: string; targetGeneration: string; kind: "app" | "screen" | "window"; applicationId: string | null; processId: number | null; title: string; bounds: { x: number; y: number; width: number; height: number; } | null; focused: boolean; offScreen?: true | undefined; }; frameId: string | null; semantic: { kind: "snapshot"; roots: import("@opengeni/contracts").InteractionSemanticNodeValue[]; nodeCount: number; incomplete?: { reason: "node_budget" | "time_budget"; unreadCount: number; } | undefined; } | { kind: "diff"; baseObservationId: string; removedRefs: string[]; changed: import("@opengeni/contracts").InteractionSemanticNodeValue[]; } | null; screenshot: { available: true; artifactId: string; kind: "assistant_completion" | "browser_screenshot" | "computer_screenshot" | "event_media" | "file" | "generated_image" | "generated_video" | "internal_update" | "tool_result"; contentType: string; originalBytes: number; sha256: string; retainedAt: string; dimensions?: { width: number; height: number; } | undefined; retention: { policy: "workspace_file"; expiresAt: null; } | { policy: "session_screenshot"; expiresAt: string; }; retrieval: { method: "GET"; path: string; acceptRanges: "bytes"; maxRangeBytes: number; }; } | null; focusedRef: string | null; changedRegions: { x: number; y: number; width: number; height: number; }[]; observedAt: string; } | null; error: { code: "attempt_stale" | "capacity_exhausted" | "controller_lost" | "controller_stale" | "document_stale" | "driver_failed" | "frame_stale" | "invalid_action" | "locator_ambiguous" | "locator_not_found" | "machine_locked" | "observation_stale" | "operation_conflict" | "outcome_unknown" | "permission_denied" | "resource_not_found" | "resource_unavailable" | "tab_crashed" | "tab_not_responding" | "target_not_found" | "target_stale" | "timeout" | "unsupported"; message: string; retryable: boolean; details?: Record | undefined; } | null; }>; select(callOptions?: CodemodeCallOptions): Promise<{ protocolVersion: 1; operationId: string; computerSessionId: string; controllerGeneration: string; targetId: string; state: "completed" | "dispatched" | "failed" | "outcome_unknown" | "prepared"; dispatchedAt: string | null; settledAt: string | null; observation: { protocolVersion: 1; observationId: string; computerSessionId: string; target: { id: string; computerSessionId: string; controllerGeneration: string; targetGeneration: string; kind: "app" | "screen" | "window"; applicationId: string | null; processId: number | null; title: string; bounds: { x: number; y: number; width: number; height: number; } | null; focused: boolean; offScreen?: true | undefined; }; frameId: string | null; semantic: { kind: "snapshot"; roots: import("@opengeni/contracts").InteractionSemanticNodeValue[]; nodeCount: number; incomplete?: { reason: "node_budget" | "time_budget"; unreadCount: number; } | undefined; } | { kind: "diff"; baseObservationId: string; removedRefs: string[]; changed: import("@opengeni/contracts").InteractionSemanticNodeValue[]; } | null; screenshot: { available: true; artifactId: string; kind: "assistant_completion" | "browser_screenshot" | "computer_screenshot" | "event_media" | "file" | "generated_image" | "generated_video" | "internal_update" | "tool_result"; contentType: string; originalBytes: number; sha256: string; retainedAt: string; dimensions?: { width: number; height: number; } | undefined; retention: { policy: "workspace_file"; expiresAt: null; } | { policy: "session_screenshot"; expiresAt: string; }; retrieval: { method: "GET"; path: string; acceptRanges: "bytes"; maxRangeBytes: number; }; } | null; focusedRef: string | null; changedRegions: { x: number; y: number; width: number; height: number; }[]; observedAt: string; } | null; error: { code: "attempt_stale" | "capacity_exhausted" | "controller_lost" | "controller_stale" | "document_stale" | "driver_failed" | "frame_stale" | "invalid_action" | "locator_ambiguous" | "locator_not_found" | "machine_locked" | "observation_stale" | "operation_conflict" | "outcome_unknown" | "permission_denied" | "resource_not_found" | "resource_unavailable" | "tab_crashed" | "tab_not_responding" | "target_not_found" | "target_stale" | "timeout" | "unsupported"; message: string; retryable: boolean; details?: Record | undefined; } | null; }>; expand(callOptions?: CodemodeCallOptions): Promise<{ protocolVersion: 1; operationId: string; computerSessionId: string; controllerGeneration: string; targetId: string; state: "completed" | "dispatched" | "failed" | "outcome_unknown" | "prepared"; dispatchedAt: string | null; settledAt: string | null; observation: { protocolVersion: 1; observationId: string; computerSessionId: string; target: { id: string; computerSessionId: string; controllerGeneration: string; targetGeneration: string; kind: "app" | "screen" | "window"; applicationId: string | null; processId: number | null; title: string; bounds: { x: number; y: number; width: number; height: number; } | null; focused: boolean; offScreen?: true | undefined; }; frameId: string | null; semantic: { kind: "snapshot"; roots: import("@opengeni/contracts").InteractionSemanticNodeValue[]; nodeCount: number; incomplete?: { reason: "node_budget" | "time_budget"; unreadCount: number; } | undefined; } | { kind: "diff"; baseObservationId: string; removedRefs: string[]; changed: import("@opengeni/contracts").InteractionSemanticNodeValue[]; } | null; screenshot: { available: true; artifactId: string; kind: "assistant_completion" | "browser_screenshot" | "computer_screenshot" | "event_media" | "file" | "generated_image" | "generated_video" | "internal_update" | "tool_result"; contentType: string; originalBytes: number; sha256: string; retainedAt: string; dimensions?: { width: number; height: number; } | undefined; retention: { policy: "workspace_file"; expiresAt: null; } | { policy: "session_screenshot"; expiresAt: string; }; retrieval: { method: "GET"; path: string; acceptRanges: "bytes"; maxRangeBytes: number; }; } | null; focusedRef: string | null; changedRegions: { x: number; y: number; width: number; height: number; }[]; observedAt: string; } | null; error: { code: "attempt_stale" | "capacity_exhausted" | "controller_lost" | "controller_stale" | "document_stale" | "driver_failed" | "frame_stale" | "invalid_action" | "locator_ambiguous" | "locator_not_found" | "machine_locked" | "observation_stale" | "operation_conflict" | "outcome_unknown" | "permission_denied" | "resource_not_found" | "resource_unavailable" | "tab_crashed" | "tab_not_responding" | "target_not_found" | "target_stale" | "timeout" | "unsupported"; message: string; retryable: boolean; details?: Record | undefined; } | null; }>; collapse(callOptions?: CodemodeCallOptions): Promise<{ protocolVersion: 1; operationId: string; computerSessionId: string; controllerGeneration: string; targetId: string; state: "completed" | "dispatched" | "failed" | "outcome_unknown" | "prepared"; dispatchedAt: string | null; settledAt: string | null; observation: { protocolVersion: 1; observationId: string; computerSessionId: string; target: { id: string; computerSessionId: string; controllerGeneration: string; targetGeneration: string; kind: "app" | "screen" | "window"; applicationId: string | null; processId: number | null; title: string; bounds: { x: number; y: number; width: number; height: number; } | null; focused: boolean; offScreen?: true | undefined; }; frameId: string | null; semantic: { kind: "snapshot"; roots: import("@opengeni/contracts").InteractionSemanticNodeValue[]; nodeCount: number; incomplete?: { reason: "node_budget" | "time_budget"; unreadCount: number; } | undefined; } | { kind: "diff"; baseObservationId: string; removedRefs: string[]; changed: import("@opengeni/contracts").InteractionSemanticNodeValue[]; } | null; screenshot: { available: true; artifactId: string; kind: "assistant_completion" | "browser_screenshot" | "computer_screenshot" | "event_media" | "file" | "generated_image" | "generated_video" | "internal_update" | "tool_result"; contentType: string; originalBytes: number; sha256: string; retainedAt: string; dimensions?: { width: number; height: number; } | undefined; retention: { policy: "workspace_file"; expiresAt: null; } | { policy: "session_screenshot"; expiresAt: string; }; retrieval: { method: "GET"; path: string; acceptRanges: "bytes"; maxRangeBytes: number; }; } | null; focusedRef: string | null; changedRegions: { x: number; y: number; width: number; height: number; }[]; observedAt: string; } | null; error: { code: "attempt_stale" | "capacity_exhausted" | "controller_lost" | "controller_stale" | "document_stale" | "driver_failed" | "frame_stale" | "invalid_action" | "locator_ambiguous" | "locator_not_found" | "machine_locked" | "observation_stale" | "operation_conflict" | "outcome_unknown" | "permission_denied" | "resource_not_found" | "resource_unavailable" | "tab_crashed" | "tab_not_responding" | "target_not_found" | "target_stale" | "timeout" | "unsupported"; message: string; retryable: boolean; details?: Record | undefined; } | null; }>; private semantic; } export declare function createOpenGeniCodemode(client?: CodemodeClient | CodemodeClientProvider): OpenGeniCodemode; export declare const openGeni: OpenGeniCodemode;