import type { ControlVerificationAbandonment } from "@onebots/core/control"; import { type GatewayVerificationReply } from "../gateway/verification-contracts.js"; import type { GatewayVerificationOperation } from "./gateway-verification-client.js"; import { projectVerification } from "./verification-record.js"; import type { PersistedOperationObserver } from "../persisted-operation-observer.js"; interface Context { gatewayInstanceId: string; configVersion: string; } export interface ControlVerificationServiceOptions { directory: string; currentContext(): Context | undefined; forward(context: Context, operation: GatewayVerificationOperation): Promise; timeoutMs?: number; acknowledgeWhileStopped?(commit: () => Operation): Promise; abandonWhileStopped?(commit: () => ControlVerificationAbandonment): Promise; onOperation?: PersistedOperationObserver; } type Operation = ReturnType; /** 单一 manager 工作区锁内使用;答案只保留到当前派发,回执不保存答案。 */ export declare class ControlVerificationService { private readonly options; private readonly store; private readonly pending; private closed; private activeForwards; private readonly timeoutMs; constructor(options: ControlVerificationServiceOptions); health(): { available: boolean; }; private context; private current; snapshot(): Promise<{ challenges: import("@onebots/core/control").ControlVerificationChallenge[]; gatewayInstanceId: string; configVersion: string; }>; operation(owner: string, id: string, localRecovery?: boolean): Operation; reconcile(owner: string, id: string, authorized?: () => boolean, localRecovery?: boolean): Promise; acknowledge(owner: string, id: string, acceptUnknownOutcome: boolean, authorized?: () => boolean, localRecovery?: boolean): Promise; abandonment(owner: string, id: string, localRecovery?: boolean): ControlVerificationAbandonment; abandon(owner: string, id: string, confirm: boolean, authorized?: () => boolean, localRecovery?: boolean): Promise; execute(owner: string, input: unknown, authorized?: () => boolean): Promise; private forward; close(): Promise; } export {}; //# sourceMappingURL=verification-service.d.ts.map