/**
 * Bootstrap a workflow run.
 *
 * Responsibilities (UI doc §3.4 / §7 landing #1):
 *   1. write the params blob to `runs/<runId>/blobs/<inputHash>`
 *   2. resolve every subagent's `bot` field through the supplied
 *      `botResolver` and freeze the result into `runCreated.botSnapshots`
 *      so future rename in bots.json doesn't drift the historical view
 *   3. append `runCreated` followed by `runStarted`
 *
 * The caller owns the EventLog (it already wrote the workflow.json
 * snapshot to `runs/<runId>/workflow.json` before calling) and drives
 * the orchestrator after `createRun` returns.
 */
import type { WorkflowDefinition } from './definition.js';
import type { EventLog } from './events/append.js';
import type { BotSnapshot, OutputRef } from './events/payloads.js';
import { type RunChatBinding } from './loader.js';
import type { RunCreatedEvent, RunStartedEvent } from './events/types.js';
export type { BotSnapshot };
/**
 * Resolves a `bot` reference (the workflow JSON `bot` field, matching
 * bots.json `name`) into the immutable snapshot to embed in `runCreated`.
 * Return `undefined` if the bot doesn't exist — `createRun` will throw.
 */
export type BotResolver = (botName: string) => BotSnapshot | undefined;
export type CreateRunInput = {
    def: WorkflowDefinition;
    /** Params object passed to the run; written verbatim as the input blob. */
    params: Record<string, unknown>;
    /** open_id / user identifier / 'system' for whoever triggered the run. */
    initiator: string;
    botResolver: BotResolver;
    /**
     * Override computed revisionId.  Useful if caller already hashed the
     * spec (e.g. from a registry cache).  Defaults to `computeRevisionId(def)`.
     */
    revisionId?: string;
    /** Chat target used by fan-out to push approval cards for this run. */
    chatBinding?: RunChatBinding;
};
export type CreateRunResult = {
    runCreatedEvent: RunCreatedEvent;
    runStartedEvent: RunStartedEvent;
    inputRef: OutputRef;
};
export declare function createRun(log: EventLog, input: CreateRunInput): Promise<CreateRunResult>;
//# sourceMappingURL=run-init.d.ts.map