Skip to main content

Module persistence

Module persistence 

Source
Expand description

Versioned persistence for the Rust client.

The first Rust implementation wrote bare AgentEvent values to JSONL. The types in this module deliberately accept that format as schema zero and provide migration helpers for versioned envelopes. Session metadata accepts the legacy flattened shape as well as the current envelope. Metadata remains flattened so older CodeSwarm state files stay readable.

Structs§

BufferedSessionMetadataStore
Background writer for runtime session metadata snapshots.
LoadedEvents
Events read from a versioned log, including the source versions observed.
LoadedSessionMetadata
A loaded metadata value carries the version from which it was imported.
MigrationReport
Result of converting a file to the current schema.
SessionMetadata
Metadata imported from either a legacy plain object or the Rust envelope. The map intentionally retains unknown keys for forward compatibility.
SessionMetadataStore
File-backed session metadata with schema migration.
VersionedEventLog
A JSONL event log that accepts legacy bare events and version-zero envelopes.

Enums§

PersistenceError
Persistence operations report malformed input, unsupported versions, and I/O failures through this type.

Constants§

CURRENT_SCHEMA_VERSION
The current on-disk schema for Rust persistence.

Functions§

import_legacy_session_metadata
Convert a legacy session metadata blob to the current Rust metadata value.