/**
 * Workflow Builder — defines a workflow with a single `.run()` entry point.
 *
 * Usage:
 *   defineWorkflow({ name: "my-workflow", inputs: [...] })
 *     .for<"copilot">()
 *     .run(async (ctx) => {
 *       await ctx.stage({ name: "research" }, {}, {}, async (s) => { ... });
 *       await ctx.stage({ name: "plan" }, {}, {}, async (s) => { ... });
 *     })
 *     .compile()
 */
import type { AgentType, WorkflowOptions, WorkflowContext, WorkflowDefinition, WorkflowInput } from "./types.ts";
type AnyInputs = readonly WorkflowInput[];
/**
 * Chainable workflow builder. Records the run callback,
 * then .compile() seals it into a WorkflowDefinition.
 */
export declare class WorkflowBuilder<A extends AgentType = AgentType, I extends AnyInputs = AnyInputs> {
    /** @internal Brand for detection across package boundaries */
    readonly __brand: "WorkflowBuilder";
    private readonly options;
    private runFn;
    constructor(options: WorkflowOptions<I>);
    /**
     * Narrow the agent type for this workflow while preserving typed inputs.
     *
     * Use `.for<"copilot">()` **before** `.run()` instead of passing the
     * agent as a type parameter to `defineWorkflow`. This allows TypeScript
     * to infer input names from the `inputs` array AND narrow the agent
     * type for `stage()` callbacks.
     *
     * @example
     * ```typescript
     * defineWorkflow({
     *   name: "my-workflow",
     *   inputs: [{ name: "greeting", type: "string" }],
     * })
     *   .for<"copilot">()
     *   .run(async (ctx) => {
     *     ctx.inputs.greeting; // ✓ typed
     *     ctx.inputs.prompt;   // ✗ compile error
     *   })
     *   .compile();
     * ```
     */
    for<B extends AgentType>(): WorkflowBuilder<B, I>;
    /**
     * Set the workflow's entry point.
     *
     * The callback receives a {@link WorkflowContext} with `stage()` for
     * spawning agent sessions, and `transcript()` / `getMessages()` for
     * reading completed session outputs. Use native TypeScript control flow
     * (loops, conditionals, `Promise.all()`) for orchestration.
     */
    run(fn: (ctx: WorkflowContext<A, I>) => Promise<void>): this;
    /**
     * Compile the workflow into a sealed WorkflowDefinition.
     *
     * After calling compile(), the returned object is consumed by the
     * Atomic CLI runtime.
     */
    compile(): WorkflowDefinition<A, I>;
}
/**
 * Entry point for defining a workflow.
 *
 * Write the `inputs` array inline so TypeScript infers literal field
 * names and enforces them on `ctx.inputs`. Use `.for<Agent>()` to
 * narrow the agent type while keeping typed inputs:
 *
 * @example
 * ```typescript
 * import { defineWorkflow } from "@bastani/atomic/workflows";
 *
 * export default defineWorkflow({
 *   name: "hello",
 *   description: "Two-session demo",
 *   inputs: [
 *     { name: "greeting", type: "string", required: true },
 *   ],
 * })
 *   .for<"copilot">()
 *   .run(async (ctx) => {
 *     ctx.inputs.greeting; // ✓ string | undefined
 *     ctx.inputs.prompt;   // ✗ compile error — not declared
 *   })
 *   .compile();
 * ```
 */
export declare function defineWorkflow<const I extends readonly WorkflowInput[] = readonly WorkflowInput[]>(options: WorkflowOptions<I>): WorkflowBuilder<AgentType, I>;
export {};
//# sourceMappingURL=define-workflow.d.ts.map