import { DetourRegistry } from './detour-registry.js';
import type { HubContext, HubDirection, StageSnapshotRecorder } from './hub-context.js';
import type { JsonValue } from '../types/json.js';
export type HubStageKind = 'format' | 'semantic' | 'config';
export interface HubStageRuntime {
    readonly context: HubContext;
    readonly detours: DetourRegistry;
}
export interface HubStageDefinition {
    readonly name: string;
    readonly kind: HubStageKind;
    readonly direction: HubDirection;
    readonly execute: (input: JsonValue, runtime: HubStageRuntime) => Promise<JsonValue> | JsonValue;
}
export interface HubPlan {
    readonly protocol: string;
    readonly direction: HubDirection;
    readonly passthrough?: {
        readonly mode: 'identity' | 'clone';
    };
    readonly stages: readonly HubStageDefinition[];
}
export interface RunHubPlanOptions {
    readonly plan: HubPlan;
    readonly context: HubContext;
    readonly initialInput: JsonValue;
    readonly recorder?: StageSnapshotRecorder;
    readonly detours?: DetourRegistry;
}
export declare function runHubPlan(options: RunHubPlanOptions): Promise<JsonValue>;
