Skip to content

v4.1.0

Latest

Choose a tag to compare

@github-actions github-actions released this 09 Jun 20:48
4caa131

Minor Changes

  • ccda5c6: Add engine.retry(runId) — replay a failed run from the step that failed. Memoized ok step results are preserved; the failed_terminal step row is deleted, the run is reset to pending with attempts=0, a resumed event is recorded, and the run is re-enqueued atomically. Returns a RetryResult discriminated by kind: "queued", "missing", or "not_failed" (with the current status).

    This is replay, not restart: a fresh handle.start(input) is a brand-new run and re-executes every step. engine.retry(runId) resumes the same runId and skips work already done.

Patch Changes

  • d0fcf0d: Fix engine.status() and engine.listRuns() rows showing every column as unknown on the consumer side. The root cause: RunRow (and friends) were typeof runs.$inferSelect, which carries drizzle's column brand into the bundled .d.ts. The bundle re-renders drizzle under a vendored namespace, so a consumer's drizzle copy can't dereference the brand — every per-column inference collapses to unknown.

    RunRow, StepRow, TimerRow, SignalRow, EventRow are now hand-written interfaces with concrete field types (id: string, status: RunStatus, createdAt: Date, error: FlowError | null, tags: string[] | null, jsonb columns as unknown, etc.). A compile-time equivalence check pins each interface to drizzle's $inferSelect of the runtime table, so a column rename or type change here fails the build instead of drifting.

    No runtime change; structurally identical shapes — consumers just get usable types in engine.status().run.name etc. without casts.