import type { McpFormBinding } from "../../core/mcp-form-types.ts";
import type { PresenterAccountAuthority } from "../rpc/mcp-presenter-account.ts";
import type { McpPresenterAuthority, McpPresenterConnection } from "../rpc/mcp-presenter-authority.ts";
import { type PresenterHostSurface } from "../rpc/mcp-presenter-host-surface.ts";
import type { SessionEventWriterConnection } from "../rpc/session-event-connection.ts";
import type { SealedSecretSource } from "../rpc/secret-sealed-holders.ts";
import type { LocalMcpPresenter } from "./mcp-local-presenter.ts";
export declare const TERMINAL_PRESENTER_COMMANDS: readonly ["mcp_presenter_context", "mcp_form_presented", "mcp_form_response", "mcp_form_sync", "mcp_presenter_secret_answer"];
export interface TerminalMcpPresenter {
    readonly local: LocalMcpPresenter;
    /** Injected by the distribution at TUI start, never by a command: lets same-account devices enroll. */
    readonly account?: PresenterAccountAuthority;
}
/**
 * The terminal's presenter surface, and its control endpoint when an account authority is injected: a terminal has no
 * fd-4 path, so every other presenter on it is an account principal. A failed start leaves the surface without one.
 */
export declare function startTerminalPresenters(presenter: TerminalMcpPresenter): Promise<{
    readonly surface: TerminalPresenterSurface;
    readonly dispose: () => Promise<void>;
}>;
export declare class TerminalPresenterSurface implements PresenterHostSurface {
    readonly authority: McpPresenterAuthority;
    /** The TUI owns this authority: a control over it revokes only its own grants when it stops. */
    readonly sharedAuthority = true;
    private readonly binding;
    private readonly sessionId;
    private readonly peers;
    private controlEndpoint?;
    private readonly local;
    constructor(local: LocalMcpPresenter);
    attachSealedSecrets(source: SealedSecretSource): () => void;
    getMcpFormBinding(sessionId: string): McpFormBinding | undefined;
    findMcpPresenterConnection(nonce: string): McpPresenterConnection | undefined;
    getConnectionCapabilities(id: string): readonly string[] | undefined;
    advertiseMcpPresenterControl(path: string): void;
    withdrawMcpPresenterControl(path: string): void;
    opened(id: string, transport: SessionEventWriterConnection): void;
    declare(id: string, capabilities: readonly string[]): void;
    attach(id: string): void;
    detach(id: string): void;
    closed(id: string): void;
    /** A private frame from connection `id`, answered on that connection: authority is checked before any lookup. */
    receive(id: string, frame: Readonly<Record<string, unknown>>): void;
}
//# sourceMappingURL=terminal-presenter-surface.d.ts.map