import type { IMatrixContext } from '../core/IMatrixContext';
import type { IMethodSpec } from '../reflection/IInterfaceDescriptor';
export interface IRrRequestOptions {
    timeoutMs?: number;
    signal?: AbortSignal;
    IMethodSpec?: IMethodSpec;
    /**
     * G15: Parent root to try as fallback on timeout.
     * When set and a timeout occurs, RequestReply rewrites the target
     * to the parent root and retries once before returning the original error.
     */
    fallbackParentRoot?: string;
    /** @deprecated Use fallbackParentRoot. */
    fallbackParentRealm?: string;
}
export declare function setRRTimingLogs(enable: boolean): void;
export declare class RequestReply {
    static execute<TReq, TRes>(context: IMatrixContext, targetMount: string, op: string, params: TReq, opts?: IRrRequestOptions): Promise<TRes>;
    /** @internal Core execute logic — separated for G15 fallback retry. */
    private static _executeInner;
    /**
     * ADR-022: Fire-and-forget send to a target's $inbox.
     * Handles both local and cross-root routing (same routing as execute()),
     * but does NOT wait for a reply. Used for event-driven prompt delivery.
     */
    static sendToInbox(context: IMatrixContext, targetMount: string, op: string, payload: Record<string, unknown>): void;
    /**
     * Bind an RR handler at a given mount + op.
     * Returns an unsubscribe function.
     */
    static bind<TReq, TRes>(context: IMatrixContext, mount: string, op: string, handler: (params: TReq) => Promise<TRes> | TRes, IMethodSpec?: IMethodSpec): () => void;
    /**
     * G15: Execute with parent root fallback.
     * On timeout, if a parent root is configured, rewrites the target to the
     * parent root and retries once. Returns the original error if fallback also fails.
     */
    static executeWithFallback<TReq, TRes>(context: IMatrixContext, targetMount: string, op: string, params: TReq, opts?: IRrRequestOptions): Promise<TRes>;
}
export declare const requestReply: typeof RequestReply.execute;
//# sourceMappingURL=RequestReply.d.ts.map