Skip to content

Rulvar API reference


Rulvar API reference / @rulvar/core / ResumeOptions

Interface: ResumeOptions

Defined in: packages/core/src/engine/engine.ts:617

Properties

PropertyTypeDescriptionDefined in
acknowledgeOpenWireIntents?booleanThe unknown-outcome acknowledgment (RV4006): a run under the 'intent' receipt posture that crashed between a wire's journaled intent and its receipt holds wires whose outcome this process never learned; the provider may have billed them, and a blind redispatch could pay twice, so resume refuses typed. Passing true acknowledges the risk explicitly (reconcile the invoice's openIntents lane against the provider statement first) and the new segment journals the acknowledgment, so the override is as durable as the intents it waves through.packages/core/src/engine/engine.ts:670
args?unknownThe run's original arguments: not journaled for in-process workflows in v1, so the host supplies them (resume binding residuals).packages/core/src/engine/engine.ts:622
bodyHash?"warn" | "refuse"What an in-process body-hash mismatch does (RV3001). The default 'warn' keeps the historical design: the mismatch emits the loud RULVAR_RESUME_HASH_MISMATCH warning and the resume proceeds, because the journal decides replay versus live per content keys and reports orphans honestly. 'refuse' turns the same mismatch into a typed ConfigError BEFORE ownership, meta writes, or any append: the pin for hosts that treat an edited body as a different workflow. The vocabulary is EvidenceContract.enforce's. Name mismatches and compiled source mismatches are hard errors regardless, exactly as before.packages/core/src/engine/engine.ts:635
configFingerprint?stringThe host's asserted config identity for this resume (RV3210), compared against the RunMeta-recorded RunOptions.configFingerprint BEFORE ownership, meta writes, or any append. Both present and unequal is a typed ConfigError always, no posture knob: supplying the fingerprint IS the assertion. A recorded fingerprint the resume does not supply warns (RULVAR_RESUME_FINGERPRINT_UNCHECKED); a supplied one the run never recorded warns (RULVAR_RESUME_FINGERPRINT_UNRECORDED), because absence means NOT RECORDED, never a verdict.packages/core/src/engine/engine.ts:682
dryRun?booleanDry-run: replay-strict matching; the first would-be-live call throws JournalMissError and the run settles with that typed error, zero live calls performed.packages/core/src/engine/engine.ts:688
invalidate?number[]invalidate/retry: entries to unpin before matching.packages/core/src/engine/engine.ts:690
lease?LeaseQueue mode: the worker's lease. The engine carries it on EVERY durable mutation of this resume: every journal append (the kernel's single append site; M8 entry amendment; DEF-6; FR-703), every putMeta, and every transcript blob write (checkpoints, compaction summaries, worktree patches, workflow sources). Over a store declaring the fencedWrites capability a stale worker's writes are ALL rejected by the fencing epoch and never become visible; over a store without the marker the journal stays fenced as always and the meta/blob surfaces remain advisory (the fenced run state RFC).packages/core/src/engine/engine.ts:702
run?{ budgetUsd?: number; maxInFlightExposureUsd?: number; }Ceiling overrides for the resumed segment and the run's remaining life (RV2208). The RV1504 rule stands: the RunMeta-recorded posture is what a bare resume restores; this field is the ONE explicit way to change that posture after genesis. Each supplied value is validated exactly like its RunOptions counterpart, applied to this segment's budget, written back by the segment's first meta write (a LATER bare resume restores the overridden posture, not the genesis one), and journaled as a run_budget_override decision naming the recorded and applied values and the settled spend it was judged against. A budgetUsd below the journal's settled spend refuses typed before ownership, meta, or any append: such a ceiling would exhaust the segment before its first turn and read like a fresh money death. Absent fields keep the recorded values; an absent object keeps the historical behavior byte for byte. Under a recorded RunOptions.budgetPolicy 'immutable-lifetime' (RV3902) any applying override refuses typed before ownership, raise and lower alike: the door this field is exists only under the 'segment' posture.packages/core/src/engine/engine.ts:724
run.budgetUsd?number-packages/core/src/engine/engine.ts:724
run.maxInFlightExposureUsd?number-packages/core/src/engine/engine.ts:724
scope?ExecutionScopeThe scope assertion (RV4007), the configFingerprint semantics: a supplied scope that differs from the recorded one refuses the resume typed before ownership; a supplied scope over a run that recorded none warns (absence means NOT RECORDED); a recorded scope resumes verbatim whether or not it is re-asserted. The comparison normalizes the supplied scope under the RECORDED normalization table first (RV4302), so a host that re-supplies the same raw values it started with asserts successfully.packages/core/src/engine/engine.ts:646
scopePolicy?ScopePolicyThe scope policy assertion (RV4302). The recorded normalization table is the journal's, never this option's: a supplied normalize table is compared against the recorded one by canonical bytes, and a conflict refuses typed before ownership (the args-binding rule: recorded at genesis, asserted on resume). A table supplied over a run that recorded none warns and is NOT applied (applying it would let a resume move the recorded identity). unknown applies to the supplied copy's own intake only.packages/core/src/engine/engine.ts:658