import type { HandoverParkedEntry } from "./host-handover-parked.ts";
import { type Attach, type Open } from "./predecessor-attach.ts";
import { type RouteRecord } from "./predecessor-peer.ts";
import type { RpcInboundRecord, RpcResponse } from "./rpc-types.ts";
import type { RpcSessionRow } from "./session-registry-types.ts";
import type { RouterContext } from "./session-router-context.ts";
/** The refused attach did not create a writer. Re-enter the local claim path if the park beat the attach. */
export declare const RETRY_ROUTED_OPEN = "retry_routed_open";
/** A successor's routes to the sessions its draining predecessor still runs (senpi#7098). */
export declare class PredecessorRoutes {
    private readonly table;
    constructor(host: RouterContext);
    private get host();
    set reopen(reopen: (entry: HandoverParkedEntry) => Promise<RpcResponse | undefined>);
    handleFor(path: string | undefined): string | undefined;
    rows(): RpcSessionRow[];
    discover(): Promise<void>;
    /** Generation-local rpc-N handles collide; a predecessor handle alone never selects a remote writer. */
    attachByIdentity(command: Attach, refusal: RpcResponse): Promise<RpcResponse>;
    attachPath(command: Open, caller: string): Promise<RpcResponse | undefined>;
    open(command: Open, caller: string, detail: Readonly<Record<string, unknown>> | undefined): Promise<RpcResponse | typeof RETRY_ROUTED_OPEN | undefined>;
    /** A pending switch is retried: the open itself stops retrying once the close grace window has passed. */
    private retryAfterSwitch;
    command(command: RpcInboundRecord, local: () => Promise<RpcResponse | undefined>): Promise<RpcResponse | undefined> | undefined;
    /**
     * A narrowing declaration is not acknowledged until every upstream copy has installed it. A copy that refuses it or
     * does not answer is cut instead (its route switches to a local reopen), so the declaration holds everywhere and its
     * reply is never held by a predecessor.
     */
    configure(caller: string, record: RouteRecord): Promise<void>;
    /** Called after the ordinary reopen built the binding, before the next caller can dispatch locally. */
    adopt(id: string): void;
    release(caller: string): void;
    dispose(): void;
}
//# sourceMappingURL=predecessor-routes.d.ts.map