import type { RuntimeAction, RuntimeOutcome } from './runtime-action.js'; import { type RuntimeValue } from './runtime-json.js'; import type { RuntimeExecutor, RuntimeInvocationContext, WorkflowRun } from './workflow-run.js'; export interface RuntimeStepInput { input: RuntimeValue; outputs: Readonly>; activation?: RuntimeValue; } export interface RuntimeHandlerContext { action: Readonly; context?: RuntimeInvocationContext; run?: Readonly; } export type RuntimeHandlerResult = Pick & { output: Output; }; export interface RuntimeHandlerOptions { type: 'invoke_skill' | 'call_tool' | 'handoff'; /** 校验并解码工作流输入;也可在此组合上游 outputs 和 activation。 */ parseInput(value: RuntimeStepInput): Input; execute(input: Input, context: RuntimeHandlerContext): RuntimeHandlerResult | Promise>; } export interface RuntimeHandler { type: RuntimeHandlerOptions['type']; execute(action: Readonly, context?: RuntimeInvocationContext, run?: Readonly): Promise; } export interface CreateRuntimeExecutorOptions { id: string; includeRun?: boolean; capabilities?: readonly string[]; handlers: Readonly>; } export declare function defineRuntimeHandler(options: RuntimeHandlerOptions): RuntimeHandler; /** 只按已注册的 ref 和步骤类型路由,不发现或调用宿主未注册的工具。 */ export declare function createRuntimeExecutor(options: CreateRuntimeExecutorOptions): RuntimeExecutor; //# sourceMappingURL=runtime-handlers.d.ts.map