Skip to main content

Crate eidetic

Crate eidetic 

Source
Expand description

§Eidetic

Private local-memory lane for the mere browser. Eidetic owns the vocabulary for owner-scoped local blobs, caches, and accumulated browsing memory — the lane that “keeps the impressions over time” in Mere’s printing-press metaphor (engines → inker → platen → eidetic).

Eidetic defines typed Request / Response enums, an async Store trait that storage backends implement (fjall, redb, OPFS, …), and a dispatch helper that routes requests to a store. Eidetic does not pick a storage backend, mount filesystems, or know about graphs — it is the pure boundary between reducer-emitted memory requests and concrete blob storage.

§Why async

Browser-side stores (OPFS via FileSystemSyncAccessHandle in workers, or other wasm-bindgen-backed implementations) cannot expose a synchronous I/O surface from Rust — there is no block_on in wasm32-unknown-unknown. The trait is therefore async, with native fjall/redb implementations returning ready futures (no actual async work) and browser implementations actually awaiting JS Promises. The trait uses ?Send so it works on both single-threaded wasm and multi-threaded native; consumers .await eidetic calls in their existing context rather than spawning them.

Eidetic is distinct from:

  • transport (peer transport state — networked, not local-private),
  • gemot (community/federation flora — shared, not private),
  • host UI state (transient, not durable).

§Temporal-integrity contract (R0 invariant)

Adopted from the donor graphshell history/memory subsystem (per the adoption roadmap R0; the same contract binds the navigation side in node-lineage). Three invariants, already embodied by engram::Engram and the Store trait, named here so they hold as backends and tiers are added:

  1. Temporal-integrity — an engram::Engram is immutable and content-hashed; edits do not exist. A refresh produces a new engram with a fresh hash; a stored blob is never mutated in place.
  2. Replay-isolation — reading or replaying stored memory does not mutate the store. A Store read leaves history untouched, so re-deriving a past state is side-effect-free.
  3. Shared-projection — derived views (“recent”, caches, indices) are projections over the single engram store, never a second authoritative store.

Re-exports§

pub use browsing::BROWSING_TRACE_SCHEMA_REF;
pub use browsing::BrowsingMemory;
pub use browsing::BrowsingTrace;
pub use browsing::PageRef;
pub use browsing::TraceEvent;
pub use browsing::TraceTransition;
pub use browsing::bootstrap_browsing_schema;
pub use browsing::save_trace;
pub use bundle::BUNDLE_SCHEMA_REF;
pub use bundle::Bundle;
pub use bundle::BundleMember;
pub use bundle::bundle_schema_ref;
pub use bundle::load_bundle;
pub use bundle::save_bundle;
pub use bundle::verify_required_members;
pub use deleted::DeletedNode;
pub use deleted::clear_deleted;
pub use deleted::list_deleted;
pub use deleted::purge_deleted;
pub use deleted::record_deleted;
pub use engram::Engram;
pub use engram::TimeBounds;
pub use manifest::BlobFetcher;
pub use manifest::BlobManifest;
pub use manifest::BlobSource;
pub use manifest::NoFetcher;
pub use manifest::delete_manifest;
pub use models::ModelComponents;
pub use models::ModelLibrary;
pub use models::ModelManifest;
pub use schema::Hash;
pub use schema::ManifestId;
pub use schema::ModerationState;
pub use schema::PrivacyClass;
pub use schema::ProvenanceOrigin;
pub use schema::ProvenanceRecord;
pub use schema::SchemaRef;
pub use schema::SignatureRef;
pub use schema::Timestamp;
pub use schema::TrustEnvelope;
pub use schema::TrustLevel;
pub use schema_def::JsonLdValidator;
pub use schema_def::JsonSchemaValidator;
pub use schema_def::META_SCHEMA_REF;
pub use schema_def::MereNativeFieldSpec;
pub use schema_def::MereNativeSchemaBody;
pub use schema_def::MereNativeSchemaBuilder;
pub use schema_def::MereNativeValidator;
pub use schema_def::SchemaDefinition;
pub use schema_def::SchemaFormat;
pub use schema_def::SchemaValidator;
pub use schema_def::bootstrap_meta_schema;
pub use schema_def::find_schema_by_id;
pub use schema_def::load_schema;
pub use schema_def::meta_schema_engram;
pub use schema_def::meta_schema_ref;
pub use schema_def::save_schema;
pub use schema_def::validate_against_schema;
pub use schema_def::validate_payload;
pub use seal::PayloadSealer;
pub use seal::SealEpochId;
pub use seal::SealedBlobRef;
pub use seal::is_private_lane;
pub use seal::resolve_sealed_blob;
pub use seal::seal_marker;
pub use seal::seal_payload_for_store;
pub use typed::TypedPayload;
pub use typed::list_typed;
pub use typed::load_typed;
pub use typed::load_typed_sealed;
pub use typed::save_typed;
pub use typed::save_typed_sealed;

Modules§

browsing
Layer 4 — browsing memory, the domain the crate was named for.
bundle
Bundle — a typed payload that carries a list of typed memory references. The composite-engram pattern from the inherited engram_spec.md TransferProfile, narrowed to a stable Mere shape.
deleted
Deleted-node tombstones: an append-only record of nodes removed from a session graph, kept in the private eidetic memory so a deletion is auditable and (later) recoverable.
engram
Engram envelope — schema-typed, immutable, time-bounded snapshot.
manifest
Layer 2 — typed metadata about blobs.
models
Model layer — ModelManifest, ModelLibrary, and ModelComponents.
pack
The pack schema (participant gate B4): a portable denizen as an eidetic engram under mere.pack/v1.
schema
Schema, identity, and three-axis classification types for Layer 2.
schema_def
Polyglot schema definitions for schema engrams.
seal
Encrypt-at-rest seam for the private lane (persona-wallet gap #2).
typed
Layer 3 — Rust-side bindings for schema-conformant typed payloads.

Structs§

Error
Error type returned by Store implementations and dispatch.
MemoryBackend
The storage seam, muniment’s (2026-07-12).

Enums§

Request
Request emitted by reducers and routed to a Store.
Response
Response returned by dispatch after a Request resolves.
WriteOp
The storage seam, muniment’s (2026-07-12).

Traits§

Backend
The storage seam, muniment’s (2026-07-12).
Store
The storage seam, muniment’s (2026-07-12).

Functions§

bootstrap
Idempotent first-init seeding for any Store.
dispatch
Route a Request to a Store and produce the matching Response.

Type Aliases§

Result
Crate-level result alias.