Skip to content

Graphorin API reference v0.1.0


Graphorin API reference / @graphorin/sessions / / SessionExportWriterOptions

Interface: SessionExportWriterOptions

Defined in: packages/sessions/src/export/writer.ts:27

Options accepted by createSessionExportWriter.

Stable

Properties

PropertyModifierTypeDescriptionDefined in
embedderIds?readonlyreadonly string[]Active embedder ids, surfaced for embedder-mismatch import handling.packages/sessions/src/export/writer.ts:40
encrypt?readonlySessionExportEncryptionConfigAES-256-GCM passphrase. When supplied the writer XORs every body byte with the keystream and writes the cipher metadata on the footer. The key is derived via crypto.scryptSync(passphrase, salt, 32) for forward compatibility with Node's crypto APIs. Encryption is intentionally header-and-footer aware: the meta header + footer remain plaintext so importers can fail fast with a precise error before consuming the body.packages/sessions/src/export/writer.ts:53
hash?readonlybooleanCompute a SHA-256 of the body bytes and write it on the footer.packages/sessions/src/export/writer.ts:42
minRuntimeVersion?readonlystringMinimum runtime version that can read the resulting file.packages/sessions/src/export/writer.ts:31
now?readonly() => numberOverride Date.now() for tests.packages/sessions/src/export/writer.ts:55
schemaUrl?readonlystringOptional schemaUrl to embed in the meta header. Conventionally a stable URL that serves the JSON Schema document for the session export format — for example a raw.githubusercontent.com URL pointing at the schema file in this repository.packages/sessions/src/export/writer.ts:38
writerreadonlystringWriter identifier surfaced in the meta header (e.g. 'graphorin@0.1.0').packages/sessions/src/export/writer.ts:29