eve
Version:
Filesystem-first framework for durable backend AI agents that run anywhere.
84 lines • 3.31 kB
TypeScript
import { type World } from '#compiled/@workflow/world/index.js';
export interface RecreateRunOptions {
deploymentId?: string;
specVersion?: number;
/**
* Queue namespace of the target deployment (e.g. `'eve'` for topics like
* `__eve_wkf_workflow_*`). Falls back to `WORKFLOW_QUEUE_NAMESPACE` in
* the calling process. Cross-context callers (e.g. the observability
* dashboard) must pass the target deployment's namespace explicitly —
* a run enqueued to a topic the target deployment has no consumer for
* is never picked up.
*/
namespace?: string;
}
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[];
/**
* Queue namespace of the run's deployment (e.g. `'eve'`), used when
* re-enqueueing the run after completing its waits. Falls back to
* `WORKFLOW_QUEUE_NAMESPACE` in the calling process. Cross-context
* callers (e.g. the observability dashboard) must pass it explicitly.
*/
namespace?: string;
}
export interface ReenqueueRunOptions {
/**
* Queue namespace of the run's deployment (e.g. `'eve'`). Falls back to
* `WORKFLOW_QUEUE_NAMESPACE` in the calling process. Cross-context
* callers (e.g. the observability dashboard) must pass it explicitly.
*/
namespace?: string;
}
export interface CancelRunOptions {
/**
* Optional free-text reason for the cancellation (max 512 chars), recorded
* on the run_cancelled event and surfaced in the run detail view.
*/
cancelReason?: 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.
*
* @param options - Optional cancellation settings. `cancelReason` records a
* free-text reason (max 512 chars) on the run_cancelled event.
*/
export declare function cancelRun(world: World, runId: string, options?: CancelRunOptions): Promise<void>;
/**
* Re-enqueue a workflow run.
*/
export declare function reenqueueRun(world: World, runId: string, options?: ReenqueueRunOptions): 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