export declare const HANDOFF_AUTHORIZATION_SCHEMA_VERSION = "onboard-client-bootstrap-authorization-v1"; export declare const HANDOFF_AUTHORIZATION_ACTIONS: readonly ["preview_authorization", "approve_authorization", "consume_authorization", "cancel_authorization"]; export type HandoffAuthorizationAction = typeof HANDOFF_AUTHORIZATION_ACTIONS[number]; export interface HandoffAuthorizationAuthority { runId: string; packetRevision: number; packetHash: string; associationFingerprint: string; evidenceRevisionHash: string; internalTeamRevision: string; configRevision: string; targetIdentity: Record; actions: string[]; commandIdentity: { command: string; source: string; sourceDigest: string; }; expiresAt: string; } export interface HandoffAuthorizationCommandInput { action: HandoffAuthorizationAction; runId: string; authority?: HandoffAuthorizationAuthority; previewHash?: string; expectedAuthorizationRevision?: number; approvalEvent?: Record; operation?: string; effectIdentity?: string; sendIntent?: Record; cancellationEvent?: Record; } export type HandoffAuthorizationProtectedCallback = (input: { runId: string; operation: string; effectIdentity: string; previewHash: string; }) => Promise>; export interface HandoffAuthorizationOptions { adminHome: string; now?: () => string; protectedCallback?: HandoffAuthorizationProtectedCallback; } type AuthorizationStatus = "previewed" | "approved" | "consuming" | "consumed" | "cancelled" | "revoked"; type AuthorizationErrorCode = "handoff_authorization_input_invalid" | "handoff_authorization_packet_drift" | "handoff_authorization_authority_drift" | "handoff_authorization_expired" | "handoff_authorization_cross_run" | "handoff_authorization_actor_unauthorized" | "handoff_authorization_revision_conflict" | "handoff_authorization_cancelled" | "handoff_authorization_in_progress" | "handoff_authorization_consumed" | "handoff_authorization_revoked" | "handoff_authorization_callback_failed" | "handoff_authorization_store_insecure" | "handoff_authorization_store_unreadable" | "handoff_authorization_store_busy" | "handoff_send_authority_separate" | "handoff_gmail_send_approval_required"; export type HandoffAuthorizationCommandResult = { ok: true; kind: "handoff_authorization_preview" | "handoff_authorization_receipt"; action: HandoffAuthorizationAction; runId: string; status: AuthorizationStatus; authorizationRevision: number; previewHash: string; approvedBy?: string; operation?: string; effectIdentity?: string; callbackReceiptHash?: string; callbackInvoked: boolean; replayed: boolean; writeAttempted: boolean; } | { ok: false; kind: "handoff_authorization_rejected"; code: AuthorizationErrorCode; action: HandoffAuthorizationAction; runId: string; status: AuthorizationStatus | "rejected"; authorizationRevision: number | null; previewHash: string | null; callbackInvoked: false; replayed: false; writeAttempted: boolean; }; export declare function adminOnboardClientHandoffAuthorization(input: HandoffAuthorizationCommandInput, options: HandoffAuthorizationOptions): Promise; export {};