Rulvar API reference / @rulvar/executor / loadEffectLedger
Function: loadEffectLedger()
ts
function loadEffectLedger(path, options?): Promise<EffectLedgerScan>;Defined in: packages/executor/src/ledger.ts:376
Scans a JSONL ledger file into intents, outcomes, and the orphaned intents a host must reconcile, pairing attempts exactly (RV501). A torn TRAILING fragment (the crash-mid-write artifact) is tolerated and reported; everything else the scan cannot decode, parse, and validate, invalid UTF-8, non-object JSON, a missing required field, an unknown phase (RV607), fails the scan closed with a typed LedgerCorruptionError unless tolerateCorrupt asks for the lines as data (RV502). Under tolerateCorrupt the scan never throws anything rawer than that: a malformed line is data, not an exception.
Parameters
| Parameter | Type |
|---|---|
path | string |
options? | { tolerateCorrupt?: boolean; } |
options.tolerateCorrupt? | boolean |
Returns
Promise<EffectLedgerScan>