import { type EmbeddedBrowserGrantMode, type EmbeddedBrowserGrantPayload, type EmbeddedBrowserGrantStatus } from '@xopcai/browser-control-contract/embedded'; export interface GatewayEmbeddedBrowserGrant extends EmbeddedBrowserGrantPayload { status: EmbeddedBrowserGrantStatus; lastLeaseAt: number; reservedClientMessageId?: string; runId?: string; revokedReason?: string; } export declare class EmbeddedBrowserGrantError extends Error { readonly code: string; readonly status: 400 | 401 | 403 | 404 | 409 | 410; constructor(code: string, message: string, status?: 400 | 401 | 403 | 404 | 409 | 410); } /** * In-memory Gateway mirror of Electron-signed embedded browser tab grants. * Grants are intentionally never persisted across Gateway restarts. */ export declare class EmbeddedBrowserGrantRegistry { private readonly getExpectedLaunchSecret; private readonly grants; private readonly byClientMessage; private readonly byRunId; constructor(getExpectedLaunchSecret?: () => string | undefined); verifyLaunchSecret(provided: string | undefined): boolean; createGrant(payload: EmbeddedBrowserGrantPayload): GatewayEmbeddedBrowserGrant; get(grantId: string): GatewayEmbeddedBrowserGrant | undefined; reserveForClientMessage(params: { grantId: string; conversationId: string; transcriptId?: string; endpointId?: string; clientMessageId: string; }): GatewayEmbeddedBrowserGrant; bindToRun(params: { conversationId: string; clientMessageId: string; runId: string; }): GatewayEmbeddedBrowserGrant | undefined; hasReservedClientMessage(conversationId: string, clientMessageId: string): boolean; getActiveForRun(conversationId: string, runId: string): GatewayEmbeddedBrowserGrant | undefined; getActiveForConversation(conversationId: string): GatewayEmbeddedBrowserGrant | undefined; renewLease(grantId: string, epoch: number): GatewayEmbeddedBrowserGrant; pauseGrant(grantId: string, epoch: number, reason: string): GatewayEmbeddedBrowserGrant | undefined; revokeGrant(grantId: string, reason: string, epoch?: number): GatewayEmbeddedBrowserGrant | undefined; releaseForRun(runId: string, reason?: string): void; revokeForEndpoint(endpointId: string, reason?: string): void; revokeForConversation(conversationId: string, reason?: string): void; private refreshExpiry; private sweepExpired; } export type EmbeddedBrowserGrantModeType = EmbeddedBrowserGrantMode;