import type { ChannelSchema, ONIConfig, ONICheckpointer } from "./types.js"; import type { ONISkeletonV3 } from "./graph.js"; export interface TaskOptions { /** Retry policy */ maxAttempts?: number; initialDelay?: number; } export interface TaskDef { name: string; invoke: (input: TInput, config?: ONIConfig) => Promise; } export declare function task(name: string, fn: (input: TInput, config?: ONIConfig) => Promise | TOutput, opts?: TaskOptions): TaskDef; export interface EntrypointOptions> { channels: ChannelSchema; checkpointer?: ONICheckpointer; /** Node name (default: "entrypoint") */ name?: string; } /** * Create a compiled skeleton from a single async function. * The function receives full state and returns a partial update. * * @example * const app = entrypoint( * { channels: { query: lastValue(() => ""), answer: lastValue(() => "") } }, * async (state) => { * const answer = await myLLM(state.query); * return { answer }; * } * ); */ export declare function entrypoint>(opts: EntrypointOptions, fn: (state: S, config?: ONIConfig) => Promise> | Partial): ONISkeletonV3; export declare function pipe>(opts: EntrypointOptions, ...tasks: Array<(state: S, config?: ONIConfig) => Promise> | Partial>): ONISkeletonV3; export declare function branch>(condition: (state: S) => string, branches: Record Promise> | Partial>, opts: EntrypointOptions): ONISkeletonV3; export { interrupt, getUserInput, getUserApproval, getUserSelection } from "./hitl/interrupt.js"; //# sourceMappingURL=functional.d.ts.map