import type { AdapterContext } from '../conversion/hub/types/chat-envelope.js';
import type { JsonObject } from '../conversion/hub/types/json.js';
import type { ProviderInvoker } from './types.js';
import type { StageRecorder } from '../conversion/hub/format-adapters/index.js';
export interface ServerToolOrchestrationOptions {
    chat: JsonObject;
    adapterContext: AdapterContext;
    requestId: string;
    entryEndpoint: string;
    providerProtocol: string;
    stageRecorder?: StageRecorder;
    reenterPipeline?: (options: {
        entryEndpoint: string;
        requestId: string;
        body: JsonObject;
        metadata?: JsonObject;
    }) => Promise<{
        body?: JsonObject;
        __sse_responses?: unknown;
        format?: string;
    }>;
    clientInjectDispatch?: (options: {
        entryEndpoint: string;
        requestId: string;
        body?: JsonObject;
        metadata?: JsonObject;
    }) => Promise<{
        ok: boolean;
        reason?: string;
    }>;
    providerInvoker?: ProviderInvoker;
}
export interface ServerToolOrchestrationResult {
    chat: JsonObject;
    executed: boolean;
    flowId?: string;
}
export declare function runServerToolOrchestration(options: ServerToolOrchestrationOptions): Promise<ServerToolOrchestrationResult>;
