Skip to content

Rulvar API reference


Rulvar API reference / @rulvar/core / FileTranscriptStore

Class: FileTranscriptStore

Defined in: packages/core/src/stores/jsonl.ts:338

File-backed TranscriptStore (M6-T02): blobs (transcripts, checkpoints, persisted CompiledWorkflow sources) as one file per ref under dir, so compiled runs resume across processes. Refs follow the <runId>/<name> convention; nested segments become directories.

Every ref is contained under dir (v1.36.0 review SEC-P1): each segment must match [A-Za-z0-9._-] and be neither empty, '.', nor '..', and the resolved path must stay under the resolved root. A '..' segment used to pass the per-segment alphabet (dots are in it) and, via join, escape the root; a caller passing an untrusted ref (or an untrusted runId, which prefixes checkpoint and workflow-source refs) could read, write, or delete .bin files outside dir.

Implements

Constructors

Constructor

ts
new FileTranscriptStore(options): FileTranscriptStore;

Defined in: packages/core/src/stores/jsonl.ts:341

Parameters

ParameterType
options{ dir: string; }
options.dirstring

Returns

FileTranscriptStore

Methods

delete()

ts
delete(ref): Promise<void>;

Defined in: packages/core/src/stores/jsonl.ts:429

Deletes one blob; a missing ref is a no-op, never an error (M8-T04 amendment, OQ-20: retention is impossible without blob deletion). The cascade over a run's blobs is ENGINE-side (Engine.deleteRun), never a store obligation.

Parameters

ParameterType
refstring

Returns

Promise&lt;void&gt;

Implementation of

TranscriptStore.delete


get()

ts
get(ref): Promise<Bytes | null>;

Defined in: packages/core/src/stores/jsonl.ts:385

Parameters

ParameterType
refstring

Returns

Promise&lt;Bytes | null&gt;

Implementation of

TranscriptStore.get


list()

ts
list(runId): Promise<string[]>;

Defined in: packages/core/src/stores/jsonl.ts:397

Parameters

ParameterType
runIdstring

Returns

Promise&lt;string[]&gt;

Implementation of

TranscriptStore.list


put()

ts
put(ref, blob): Promise<void>;

Defined in: packages/core/src/stores/jsonl.ts:376

Parameters

ParameterType
refstring
blobBytes

Returns

Promise&lt;void&gt;

Implementation of

TranscriptStore.put