import type { RuntimeStore } from '../runtime/store/index.js';
import type { RuntimeEventBus } from '../runtime/events/index.js';
import type { AutomationRouteBinding } from '../automation/routes.js';
import type { AutomationSurfaceKind } from '../automation/types.js';
import { AutomationRouteStore } from '../automation/store/routes.js';
import type { FeatureFlagManager } from '../runtime/feature-flags/index.js';
export interface UpsertRouteBindingInput {
    readonly id?: string | undefined;
    readonly kind: AutomationRouteBinding['kind'];
    readonly surfaceKind: AutomationRouteBinding['surfaceKind'];
    readonly surfaceId: string;
    readonly externalId: string;
    readonly sessionPolicy?: AutomationRouteBinding['sessionPolicy'] | undefined;
    readonly threadPolicy?: AutomationRouteBinding['threadPolicy'] | undefined;
    readonly deliveryGuarantee?: AutomationRouteBinding['deliveryGuarantee'] | undefined;
    readonly threadId?: string | undefined;
    readonly channelId?: string | undefined;
    readonly sessionId?: string | undefined;
    readonly jobId?: string | undefined;
    readonly runId?: string | undefined;
    readonly title?: string | undefined;
    readonly metadata?: Record<string, unknown> | undefined;
}
export interface PatchRouteBindingInput {
    readonly sessionPolicy?: AutomationRouteBinding['sessionPolicy'] | undefined;
    readonly threadPolicy?: AutomationRouteBinding['threadPolicy'] | undefined;
    readonly deliveryGuarantee?: AutomationRouteBinding['deliveryGuarantee'] | undefined;
    readonly threadId?: string | undefined;
    readonly channelId?: string | undefined;
    readonly sessionId?: string | null | undefined;
    readonly jobId?: string | null | undefined;
    readonly runId?: string | null | undefined;
    readonly title?: string | undefined;
    readonly metadata?: Record<string, unknown> | undefined;
}
type RouteBindingFeatureFlags = Pick<FeatureFlagManager, 'isEnabled'>;
export declare class RouteBindingManager {
    private readonly store;
    private readonly bindings;
    private runtimeDispatch;
    private runtimeBus;
    private readonly featureFlags;
    private loaded;
    constructor(config?: {
        readonly store?: AutomationRouteStore | undefined;
        readonly runtimeStore?: RuntimeStore | undefined;
        readonly runtimeBus?: RuntimeEventBus | undefined;
        readonly featureFlags?: RouteBindingFeatureFlags | null | undefined;
    });
    private isEnabled;
    private requireEnabled;
    attachRuntime(config: {
        readonly runtimeStore?: RuntimeStore | null | undefined;
        readonly runtimeBus?: RuntimeEventBus | null | undefined;
    }): void;
    start(): Promise<void>;
    listBindings(): AutomationRouteBinding[];
    getBinding(bindingId: string): AutomationRouteBinding | undefined;
    resolve(surfaceKind: AutomationSurfaceKind, externalId: string, threadId?: string): AutomationRouteBinding | undefined;
    upsertBinding(input: UpsertRouteBindingInput): Promise<AutomationRouteBinding>;
    captureReplyTarget(bindingId: string, replyTargetId: string, threadId?: string): Promise<AutomationRouteBinding | null>;
    patchBinding(bindingId: string, patch: PatchRouteBindingInput): Promise<AutomationRouteBinding | null>;
    removeBinding(bindingId: string): Promise<boolean>;
    recordFailure(surfaceKind: AutomationSurfaceKind, externalId: string, error: string): void;
}
export {};
//# sourceMappingURL=route-manager.d.ts.map