Rulvar API reference / @rulvar/executor / ToolEffectLedger
Interface: ToolEffectLedger
Defined in: packages/executor/src/spi.ts:102
The side-effect ledger seam. An executor calls record once per dispatch (success or failure). Binding an approval to its effect is then a lookup: the approval entry and the effect share (runId, tool, argsHash), and the idempotency key is stable across a rerun of the same call.
Methods
intent()?
optional intent(entry): void | Promise<void>;Defined in: packages/executor/src/spi.ts:116
The two-phase capability (RV404): when the method is present, the reference executors durably record the intent BEFORE the external effect is dispatched (awaited; a failed write refuses the dispatch with the typed ledger code) and the outcome record after it. A host crash between the effect and the outcome row then leaves an orphan intent, the reconciliation signal, instead of an untracked effect: an intent whose OWN attempt has no outcome row (RV501) means "look this key up with the effect's provider before retrying or compensating". Absent, the ledger keeps the historical single-record contract and executor behavior is byte-identical.
Parameters
| Parameter | Type |
|---|---|
entry | ToolEffectIntent |
Returns
void | Promise<void>
record()
record(entry): void | Promise<void>;Defined in: packages/executor/src/spi.ts:103
Parameters
| Parameter | Type |
|---|---|
entry | ToolEffectRecord |
Returns
void | Promise<void>