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 | 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 | undefined; } type RouteBindingFeatureFlags = Pick; 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; /** * Whether route binding is switched on at all. * * Public because a caller has to be able to tell "you have no bindings" from * "bindings are turned off", and from the outside those are the same answer: * `listBindings()` returns `[]` for both, `getBinding()` returns `undefined` * for both, and `resolve()` returns `undefined` for both. Inbound mail is the * case that made it matter, with `integrations.routeBinding` off it resolved * no notice route, recorded every arriving message as `no-route-binding`, and * went on reporting healthy while announcing nothing. An unrelated flag * turning a capability into a recorder is only diagnosable if the flag's * state is askable. */ isRouteBindingEnabled(): boolean; private requireEnabled; attachRuntime(config: { readonly runtimeStore?: RuntimeStore | null | undefined; readonly runtimeBus?: RuntimeEventBus | null | undefined; }): void; start(): Promise; listBindings(): AutomationRouteBinding[]; getBinding(bindingId: string): AutomationRouteBinding | undefined; resolve(surfaceKind: AutomationSurfaceKind, externalId: string, threadId?: string): AutomationRouteBinding | undefined; upsertBinding(input: UpsertRouteBindingInput): Promise; captureReplyTarget(bindingId: string, replyTargetId: string, threadId?: string): Promise; patchBinding(bindingId: string, patch: PatchRouteBindingInput): Promise; removeBinding(bindingId: string): Promise; recordFailure(surfaceKind: AutomationSurfaceKind, externalId: string, error: string): void; } export {}; //# sourceMappingURL=route-manager.d.ts.map