/**
 * 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[];
/**
 * Input names reserved because they collide with the atomic CLI's `workflow`
 * subcommand surface. The first block (`name` / `agent` / `detach` / `list`
 * / `help` / `version`) collides with the atomic CLI's `workflow` subcommand
 * flags (`-n/--name`, `-a/--agent`, `-d/--detach`, `-l/--list`, `-h/--help`,
 * `-v/--version`). The second block (`session` / `status`) collides with the
 * atomic CLI's management subcommands (`atomic workflow session …`,
 * `atomic workflow status`).
 *
 * User-app CLIs built with the SDK primitives are NOT bound by these
 * reservations at runtime — the check runs only inside `defineWorkflow` so
 * that workflows remain portable to the atomic CLI without renaming.
 */
export declare const RESERVED_INPUT_NAMES: readonly ["name", "agent", "detach", "list", "help", "version", "session", "status"];
/**
 * 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;
    private agentValue;
    constructor(options: WorkflowOptions<I>);
    /**
     * Narrow the agent type for this workflow while preserving typed inputs.
     *
     * Pass the agent as a runtime string argument so the compiled
     * {@link WorkflowDefinition} carries the `agent` field required by
     * the registry.
     *
     * @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>(agent: B): 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