import type { RpcConnectionOptions } from "./connection-handler.ts";
import { type RoleDeclaration } from "./connection-roles.ts";
import type { RpcCommand } from "./rpc-types.ts";
/** A declaration belongs to one actual socket registration, never a session or launch profile. */
export declare class CompactSelection {
    capabilities: readonly string[];
    selected: boolean;
    admitted: boolean;
    refused: boolean;
    declare(next: readonly string[] | undefined, supported: boolean, roles: (caps: readonly string[]) => boolean): string | undefined;
    wireCapabilities(caps: readonly string[], enabled: boolean): readonly string[];
    ack(): {
        capabilities: ("compact_message_updates_v1" | "event_resync")[];
    } | undefined;
}
/** Unknown/inherited opt-ins cannot stand in for an actual endpoint implementation. */
export declare function advertisedCompactCapabilities(caps: readonly string[], supported: boolean): string[];
export declare function declarationReply(record: object, selection: CompactSelection | undefined): object | undefined;
/**
 * Shared handler applies session flags only after host validation; classic handlers never select compact. `incarnation`
 * is the one the declaring command captured (omo-relay-daemon#307); a declaration from a retired one is refused for
 * this command only (`delegation_incarnation_stale`), locally or by the host.
 */
export declare function sessionDeclaration(options: RpcConnectionOptions, command: Extract<RpcCommand, {
    type: "set_client_info";
}>, current: readonly string[] | undefined, declare: (caps: string[], incarnation: number | undefined) => RoleDeclaration, replace: (caps: string[]) => void, incarnation: number | undefined): {
    capabilities: readonly string[] | undefined;
    refusal: string;
    grantChanged?: undefined;
} | {
    capabilities: readonly string[] | undefined;
    refusal: undefined;
    grantChanged: boolean;
};
//# sourceMappingURL=compact-negotiation.d.ts.map