import { REMOTE_COMPUTER_CONTROL_TOOL } from '@xopcai/computer-control-contract'; import { REMOTE_BROWSER_CONTROL_TOOL } from '@xopcai/browser-control-contract/remote'; import { type DesktopOperationReview, type DesktopOperationIntent, type DesktopOperationReceipt } from '@xopcai/endpoint-tools-protocol'; export interface ReviewedDesktopExecutionScope { gatewayId: string; deviceId: string; authorizationRevision: number; tool: typeof REMOTE_COMPUTER_CONTROL_TOOL | typeof REMOTE_BROWSER_CONTROL_TOOL; toolRevision: string; } /** Clear stale admission metadata only after native manual stop verification, never merely after reconnect/revocation. */ export declare function hasReviewedDesktopExecutionStop(scope: ReviewedDesktopExecutionScope): boolean; /** Persist the immutable intent before sending any command that may change the device. */ export declare function recordDesktopOperationIntent(input: DesktopOperationIntent, grantId: string, now?: number): DesktopOperationIntent; /** Accept only terminal evidence for the already-recorded intent; this never authorizes a retry. */ export declare function recordDesktopOperationReceipt(intent: DesktopOperationIntent, input: DesktopOperationReceipt): void; /** Metadata lookup is scoped to the authenticated device and its pinned Gateway identity. */ export declare function getDesktopOperationIntent(operationId: string, deviceId: string, gatewayId: string): DesktopOperationIntent | undefined; export declare function getDesktopOperationReceipt(operationId: string, deviceId: string, gatewayId: string): DesktopOperationReceipt | undefined; export declare function listDesktopOperationsForReview(deviceId: string, gatewayId: string): { receipt?: { operationId: string; state: "unknown" | "failed" | "running" | "succeeded" | "stopped" | "recorded" | "cancel-requested"; updatedAt: number; executionStopped: boolean; resultHash?: string | undefined; invocationId?: string | undefined; connectionInstanceId?: string | undefined; } | undefined; intent: { operationId: string; gatewayId: string; deviceId: string; tool: string; argumentHash: string; toolRevision: string; authorizationRevision: number; expiresAt: number; workspaceId?: string | undefined; }; generation: number; }[]; export declare function reviewDesktopOperation(operationId: string, deviceId: string, gatewayId: string, input: DesktopOperationReview, now?: number): { operationId: string; reviewed: true; outcome: "unknown"; reviewId: string; }; export declare function getDesktopOperationForReview(operationId: string, deviceId: string, gatewayId: string): { review?: { reviewId: string; expectedGeneration: number; intentFingerprint: string; executorStopped: true; localStatus: "recorded" | "not-found"; receipt?: { operationId: string; state: "unknown" | "failed" | "running" | "succeeded" | "stopped" | "recorded" | "cancel-requested"; updatedAt: number; executionStopped: boolean; resultHash?: string | undefined; invocationId?: string | undefined; connectionInstanceId?: string | undefined; } | undefined; } | undefined; intent: { operationId: string; gatewayId: string; deviceId: string; tool: string; argumentHash: string; toolRevision: string; authorizationRevision: number; expiresAt: number; workspaceId?: string | undefined; }; state: string; generation: number; } | undefined;