import type { Employee, ModelRegistry } from "../shared/types.js"; import { resolveBinding, type WorkflowBindingContext } from "./bindings.js"; import { type EngineChainSource } from "./engine-chain.js"; import type { EmployeeNode } from "./model.js"; import type { WorkflowRepository } from "./repository.js"; import type { ResolvedEmployeeConfig, WorkflowError, WorkflowRunDetail } from "./runtime.js"; import type { WorkflowSessionExecutor } from "./session-executor.js"; import type { WorkflowTodoDispatchOverride } from "./todo-ports.js"; /** The narrow slice of the runner's options this resolution needs. Declared * here rather than imported from `runner.ts` so the dependency runs one way. */ export interface DispatchResolutionDeps { employees: () => ReadonlyMap; models: () => ModelRegistry; repository: WorkflowRepository; executor: Pick; todoDispatch?: WorkflowTodoDispatchOverride; /** The configured `engines..fallback` chains, so an attempt whose engine * could not serve the turn re-dispatches on one that can. Absent = no chains, * and a run that freezes on the failure exactly as it did before. */ engineFallback?: EngineChainSource; } export declare function bindingContext(run: WorkflowRunDetail): WorkflowBindingContext; export declare function resolveString(binding: Parameters>[0], context: WorkflowBindingContext, label: string): string; /** Whether a chain would carry this node's next attempt past the failure that * just settled — the retry boundary's half of the same question `dispatchTarget` * answers, asked through the same walk so the two cannot disagree about whether * a run is out of options. */ export declare function hasSubstitute(run: WorkflowRunDetail, attempt: WorkflowRunDetail["attempts"][number], failure: WorkflowError, options: DispatchResolutionDeps): boolean; export declare function resolveDispatch(run: WorkflowRunDetail, node: EmployeeNode, options: DispatchResolutionDeps): ResolvedEmployeeConfig; //# sourceMappingURL=node-dispatch.d.ts.map