Skip to content

Rulvar API reference


Rulvar API reference / @rulvar/rulvar / MetaLookupStore

Interface: MetaLookupStore ​

Defined in: packages/core/dist/index.d.ts

Exact lookup capability: fetch one run's meta without materializing the whole catalog (the v1.25.0 scale review: resume, HTTP status, and CLI point lookups were O(all runs) through listRuns). Optional exactly like the lease capability: engines and shells detect it with hasMetaLookup and fall back to listRuns + find, so a conformant store written before this capability keeps working unoptimized. A missing run resolves undefined, never a rejection.

Extends ​

Properties ​

PropertyModifierTypeDescriptionInherited fromDefined in
fencedWrites?readonlytrueFenced writes capability (the fenced run state RFC, phase 2), optional exactly like getMeta and leaseTtlMs: a store declaring fencedWrites: true PROMISES that every mutation carrying a lease (append, putMeta, delete) verifies it is the CURRENT holder for the run the mutation targets, atomically with the mutation itself, and rejects with the typed LeaseHeldError leaving nothing mutated when it is not (stale epoch, foreign owner, expired, or a lease whose runId is not the mutation's run). The engine threads the segment's lease into every one of these writes on a leased resume, so over a declaring store a superseded worker cannot overwrite run meta or delete run state, exactly as it already cannot append. A mutation carrying NO lease keeps the single-writer semantics unchanged. Stores written before this capability are unaffected: without the marker the extra argument is ignored and hosts know the surface is advisory.JournalStore.fencedWritespackages/core/dist/index.d.ts

Methods ​

append() ​

ts
append(
   runId, 
   e, 
lease?): Promise<void>;

Defined in: packages/core/dist/index.d.ts

Parameters ​

ParameterType
runIdstring
eJournalEntry
lease?Lease

Returns ​

Promise&lt;void&gt;

Inherited from ​

JournalStore.append


delete() ​

ts
delete(runId, lease?): Promise<void>;

Defined in: packages/core/dist/index.d.ts

Parameters ​

ParameterType
runIdstring
lease?Lease

Returns ​

Promise&lt;void&gt;

Inherited from ​

JournalStore.delete


getMeta() ​

ts
getMeta(runId): Promise<RunMeta | undefined>;

Defined in: packages/core/dist/index.d.ts

Parameters ​

ParameterType
runIdstring

Returns ​

Promise&lt;RunMeta | undefined&gt;


listRuns() ​

ts
listRuns(f?): Promise<RunMeta[]>;

Defined in: packages/core/dist/index.d.ts

Parameters ​

ParameterType
f?RunFilter

Returns ​

Promise&lt;RunMeta[]&gt;

Inherited from ​

JournalStore.listRuns


load() ​

ts
load(runId): Promise<JournalEntry[]>;

Defined in: packages/core/dist/index.d.ts

Parameters ​

ParameterType
runIdstring

Returns ​

Promise&lt;JournalEntry[]&gt;

Inherited from ​

JournalStore.load


putMeta() ​

ts
putMeta(m, lease?): Promise<void>;

Defined in: packages/core/dist/index.d.ts

Parameters ​

ParameterType
mRunMeta
lease?Lease

Returns ​

Promise&lt;void&gt;

Inherited from ​

JournalStore.putMeta