import { type World } from '#compiled/@workflow/world/index.js';
export interface RecreateRunOptions {
    deploymentId?: string;
    specVersion?: number;
}
export interface StopSleepResult {
    /** Number of pending sleeps that were stopped */
    stoppedCount: number;
}
export interface ReadStreamOptions {
    /**
     * The index to start reading from. Defaults to 0.
     * Negative values start from the end (e.g. -3 reads the last 3 chunks).
     */
    startIndex?: number;
}
export interface StopSleepOptions {
    /**
     * Optional list of specific correlation IDs to target.
     * If provided, only these sleep calls will be interrupted.
     * If not provided, all pending sleep calls will be interrupted.
     */
    correlationIds?: string[];
}
/**
 * Start a new workflow run based on an existing run.
 */
export declare function recreateRunFromExisting(world: World, runId: string, options?: RecreateRunOptions): Promise<string>;
/**
 * Cancel a workflow run.
 */
export declare function cancelRun(world: World, runId: string): Promise<void>;
/**
 * Re-enqueue a workflow run.
 */
export declare function reenqueueRun(world: World, runId: string): Promise<void>;
/**
 * Wake up a workflow run by interrupting pending sleep() calls.
 */
export declare function wakeUpRun(world: World, runId: string, options?: StopSleepOptions): Promise<StopSleepResult>;
/**
 * Read from a stream by stream ID.
 * Returns a ReadableStream of Uint8Array chunks.
 */
export declare function readStream(world: World, runId: string, streamId: string, options?: ReadStreamOptions): Promise<ReadableStream<Uint8Array>>;
/**
 * List all stream IDs for a workflow run.
 */
export declare function listStreams(world: World, runId: string): Promise<string[]>;
//# sourceMappingURL=runs.d.ts.map