import type { McpFormBinding, McpPresenterIdentity } from "../../core/mcp-form-types.ts";
import { type McpFormClock, type McpPresenterReply } from "./mcp-form-dialog.ts";
import type { McpPresenterConnection, McpPresenterConnectionContext, Sender } from "./mcp-presenter-bindings.ts";
import * as presenterGrants from "./mcp-presenter-grants.ts";
export type { McpPresenterConnection } from "./mcp-presenter-bindings.ts";
export type { McpPresenterRegistration } from "./mcp-presenter-grants.ts";
/** Host-owned only. No public session command can call enrollment or install a registration. */
export declare class McpPresenterAuthority {
    /** The host process this authority belongs to: its protocol `instanceId`, so a launcher can name the host it replaces. */
    readonly instance: string;
    private readonly state;
    constructor(options?: {
        readonly clock?: McpFormClock;
    });
    dispose(): void;
    connect(id: string, send: Sender): McpPresenterConnection;
    attach(sender: McpPresenterConnection, handle: McpFormBinding): void;
    connectionContext(sender: McpPresenterConnection, sessionId: string): McpPresenterConnectionContext | undefined;
    detach(sender: McpPresenterConnection, handle?: McpFormBinding): void;
    withdraw(sender: McpPresenterConnection): void;
    bind(sessionId: string, durableId: string, admit: () => void): McpFormBinding;
    /** Called only after the protected bootstrap has pinned and authenticated its launch principal. */
    enroll(principal?: string, identity?: McpPresenterIdentity): {
        register: (handle: McpFormBinding, sender: McpPresenterConnection, options: {
            readonly kind: import("../../core/mcp-form-types.ts").McpFormScope["presenterKind"];
            readonly features?: readonly string[];
        }) => presenterGrants.McpPresenterRegistration;
        acquire: (handle: presenterGrants.McpPresenterRegistration) => {
            readonly grantId: string;
            readonly scope: import("../../core/mcp-form-types.ts").McpFormScope;
        };
        revoke: (handle: presenterGrants.McpPresenterRegistration) => void;
    };
    /** Whether a current account-principal grant on the binding negotiated `secret_input_v1` (D11 secret phase 3.2). */
    secretInputHeld(handle: McpFormBinding): boolean;
    /** The current account-principal grants with `secret_input_v1` on the binding (D11 secret phase 5.1). */
    secretCandidates(handle: McpFormBinding): presenterGrants.Grant[];
    /** Whether a grant is still current: its registration, binding, connection and attachment epoch all hold. */
    isCurrent(grant: presenterGrants.Grant): boolean;
    receive(sender: McpPresenterConnection, value: unknown): McpPresenterReply;
}
//# sourceMappingURL=mcp-presenter-authority.d.ts.map