import type { AckServer } from './ack-server.js'; import type { ConfirmDecision, ConfirmTransport } from './types.js'; export interface ConfirmGateOpts { /** Pluggable transport — ntfy in production; mock in tests. */ transport: ConfirmTransport; /** Shared local ack server (one per process). */ ackServer: AckServer; /** Per-portal override comes from policy; this is the cross-portal default. * Configurable so tests can use ms-scale timeouts without slowing the suite. */ timeoutMs?: number; } /** * The OOB confirm gate. Mints a token, pushes the prompt over the transport, * races the human's click against a timeout, returns the decision. * * Failure modes (all map to a final ConfirmDecision): * - transport.send() throws → `transport_error` (gate doesn't fall * back to silently allowing the sign; * the caller maps this to RPC_POLICY_DENIED) * - human clicks Approve / Deny → `approved` / `denied` * - clock runs out → `timeout` (cancels the token so a late * click returns 410 Gone instead of being * silently absorbed) * * Concurrent requests are isolated: each call mints its own token, the ack * server matches by token, so two pending confirms cannot cross-resolve. */ export declare class ConfirmGate { #private; constructor(opts: ConfirmGateOpts); /** Transport name — used for audit log + startup banner. */ get transportName(): string; request(input: { portal: string; summary: string; }): Promise; } //# sourceMappingURL=gate.d.ts.map