export declare const DEFAULT_PROMPT_ASYNC_POST_DISPATCH_HOLD_MS = 250;
export declare const DEFAULT_PROMPT_DISPATCH_TIMEOUT_MS = 30000;
export declare const DEFAULT_PROMPT_GATE_MESSAGES_FETCH_TIMEOUT_MS = 5000;
type PromptAsyncInput = {
    path?: {
        id?: string;
    };
    body?: unknown;
    query?: unknown;
    signal?: unknown;
    [key: string]: unknown;
};
type PromptMessagesQuery = {
    directory: string;
    limit?: number;
};
type PromptAsyncClient<TInput> = {
    session?: {
        status?: () => Promise<unknown>;
        messages?: (input: {
            path: {
                id: string;
            };
            query: PromptMessagesQuery;
        }) => Promise<unknown>;
        promptAsync?: (input: TInput) => Promise<unknown>;
    };
};
type PromptClient<TInput> = {
    session?: {
        status?: () => Promise<unknown>;
        messages?: (input: {
            path: {
                id: string;
            };
            query: PromptMessagesQuery;
        }) => Promise<unknown>;
        prompt?: (input: TInput) => Promise<unknown>;
    };
};
export type InternalPromptDispatchMode = "async" | "sync";
type InternalPromptDispatchCommonArgs<TInput> = {
    sessionID: string;
    input: TInput;
    source: string;
    settleMs?: number;
    postDispatchHoldMs?: number;
    dispatchTimeoutMs?: number;
    checkStatus?: boolean;
    checkToolState?: boolean;
};
export type InternalPromptDispatchArgs<TInput = PromptAsyncInput> = InternalPromptDispatchCommonArgs<TInput> & ({
    mode: "async";
    client: PromptAsyncClient<TInput>;
} | {
    mode: "sync";
    client: PromptClient<TInput>;
});
export type InternalPromptDispatchResult = {
    status: "dispatched";
    response: unknown;
} | {
    status: "active";
} | {
    status: "reserved";
    reservedBy: string;
} | {
    status: "unavailable";
} | {
    status: "failed";
    error: unknown;
};
export type PromptAsyncGateResult = InternalPromptDispatchResult;
type PromptAsyncReservationReleaseOptions = {
    reservedBy?: string | readonly string[];
    reservedByPrefix?: string | readonly string[];
};
export declare function _setPromptGateMessagesFetchTimeoutMsForTesting(value: number | undefined): void;
export declare function dispatchInternalPrompt<TInput = PromptAsyncInput>(args: InternalPromptDispatchArgs<TInput>): Promise<InternalPromptDispatchResult>;
export declare function releaseAllPromptAsyncReservationsForTesting(): void;
export declare function releasePromptAsyncReservation(sessionID: string, source: string, options?: PromptAsyncReservationReleaseOptions): boolean;
export {};
