UNPKG

@workflow-manager/runner

Version:

CLI runner for in-memory and markdown workflow orchestration using ATEP-like envelopes

22 lines (21 loc) • 926 B
import type { RunEvent, RunObserver, RunSnapshot, StepDetailSnapshot, WorkflowDefinition } from "./types.js"; export interface RunArchiveInfo { path: string; runId: string; } export interface ArchiveRecord { type: "metadata" | "event" | "snapshot"; occurredAt: string; data: Record<string, unknown>; } export declare function defaultRunArchiveDirectory(): string; export declare function createRunArchive(workflow: WorkflowDefinition, runId: string, directory?: string): RunArchive & RunArchiveInfo; export declare class RunArchive implements RunObserver { readonly path: string; constructor(path: string); writeMetadata(workflow: WorkflowDefinition, runId: string): void; onEvent(event: RunEvent): void; onSnapshot(snapshot: RunSnapshot, stepDetails: StepDetailSnapshot[]): void; onLog(): void; } export declare function readRunArchive(filePath: string): ArchiveRecord[] | string;