import type { AgentActionRunner } from './runner.js'; import type { ActionDefinition, JsonPointer, StepReference, WorkflowDefinition, WorkflowStep } from './types.js'; export type DefinedAction = ActionDefinition; export type ActionCatalog = Readonly>>; export type ActionInput = Action extends ActionDefinition ? Input : never; export type ActionOutput = Action extends ActionDefinition ? Output : never; export type WorkflowInputFor = StepReference | (T extends readonly (infer Item)[] ? readonly WorkflowInputFor[] : T extends object ? { readonly [Key in keyof T]: WorkflowInputFor; } : T); export type WorkflowStepOptions = Pick; export type WorkflowBuilderStepContext = { readonly fromStep: >(stepId: StepId, path?: JsonPointer) => StepReference; }; export type WorkflowBuilderOutputs = Readonly>; export type WorkflowBuilder> = { step(id: StepId extends keyof Outputs ? never : StepId, action: ActionDefinition, input: WorkflowInputFor | ((context: WorkflowBuilderStepContext) => WorkflowInputFor), options?: WorkflowStepOptions): WorkflowBuilder>>; build(): WorkflowDefinition; }; export declare function defineAction(definition: ActionDefinition): DefinedAction; export declare function defineActionCatalog(catalog: Catalog): Catalog; export declare function registerActionCatalog(runner: AgentActionRunner, catalog: ActionCatalog): void; export declare function defineWorkflow(workflowName: string): WorkflowBuilder; //# sourceMappingURL=builder.d.ts.map