This repository has been archived on 2026-05-05. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
engram-retired/engrams/engram-projection/src/lib.rs
T
Will Anderson d1ec384b27 rename crates/ to engrams/, bindings/ to receptors/
- crates/ → engrams/ (Rust engrams live here)
- bindings/ → receptors/ (cross-language access points into the graph)
- Cargo.toml workspace paths updated
2026-04-29 03:27:33 -05:00

34 lines
1.2 KiB
Rust

/// Engram Projection Layer — schema-as-a-view over the activation surface.
///
/// # The Core Insight
///
/// Engram has no schema. A node has: embedding (semantic identity), content
/// (arbitrary bytes), metadata via tier/type, and salience. Schema is a
/// *projection* — a view imposed on the activation surface at query time.
///
/// The same Engram graph can surface as relational rows, JSON documents,
/// wide-column families, or key-value pairs depending on how you project it.
/// Migrations are free because there is nothing to migrate — you just update
/// the projection.
///
/// # How It Works
///
/// 1. Register a `ProjectionSchema` that describes which nodes are in scope
/// and how to map their fields.
/// 2. At query time, run spreading activation (or use an existing result set).
/// 3. Apply the projection to map `ActivatedNode`s into the projected view.
///
/// The projection is purely a read-time transform. It never modifies the graph.
pub mod engine;
pub mod error;
pub mod registry;
pub mod schema;
pub use engine::ProjectionEngine;
pub use error::ProjectionError;
pub use registry::ProjectionRegistry;
pub use schema::{
FieldMapping, FieldSource, NodeFilter, ProjectedRow, ProjectionResult, ProjectionSchema,
ProjectionType,
};