export type JevFabricState = "running" | "exited" | "failed" | "timed_out" | "cancelled"; /** A `status`/`wait`/`stop` result: running state or the final receipt. */ export interface JevFabricReceipt { id: string; state: JevFabricState; exitCode?: number | null; timedOut?: boolean; cancelled?: boolean; label?: string; } export interface JevFabricEvent { sequence?: number; type: string; data?: Record; after?: number; next?: number; } export interface JevFabricFollowEnd { reason: "finished" | "timeout"; next: number; receipt: JevFabricReceipt; } export interface JevFabricListedJob { id: string; /** `starting` until the worker is ready; then a status state. */ state: JevFabricState | "starting"; label?: string; startedAt?: number; } export declare class JevFabricError extends Error { readonly code: number | null; constructor(message: string, code: number | null); } export declare const parseReceipt: (value: unknown) => JevFabricReceipt; interface RunOptions { cwd?: string; env?: NodeJS.ProcessEnv; signal?: AbortSignal; /** Host-side ceiling for the CLI call itself, separate from the job lifetime. */ timeoutMs?: number; onLine?: (line: string) => void; } /** * Thin argv client for the jev-fabric CLI. Every call is a literal argv spawn * (no shell) against one explicit storage home. Budgets, deadlines and job * semantics stay in the binary; this only frames JSON. */ export declare class JevFabricCli { #private; readonly binary: string; readonly home: string; constructor(binary: string, home: string); run(args: readonly string[], options?: RunOptions): Promise; start(argv: readonly string[], options: { cwd: string; env?: NodeJS.ProcessEnv; timeoutMs: number; label?: string; }): Promise; status(id: string): Promise; stop(id: string): Promise; list(): Promise<{ jobs: JevFabricListedJob[]; truncated: boolean; }>; /** * One bounded live `follow` call: every retained event after the cursor as * the worker publishes it, then one `follow.end`. The ceiling never stops the job. */ follow(id: string, after: number, options: { timeoutMs: number; signal?: AbortSignal; onEvent: (event: JevFabricEvent) => void; }): Promise; } export {}; //# sourceMappingURL=client.d.ts.map