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
This commit is contained in:
Will Anderson
2026-04-29 03:27:33 -05:00
parent 61a4632163
commit 909c1577f1
89 changed files with 2114 additions and 452 deletions
+9 -8
View File
@@ -7,7 +7,8 @@
/// The nodes represent a tiny knowledge graph about the spreading activation
/// model itself — somewhat recursive, intentionally.
use engram_core::{
ActivatedNode, ConsolidationConfig, Edge, EngramDb, MemoryTier, Node, NodeType, RelationType,
ActivatedNode, ConsolidationConfig, Edge, EngramDb, MemoryTier, Node, NodeType,
EDGE_ACTIVATES, EDGE_CAUSES, EDGE_EXEMPLIFIES, EDGE_REFERENCES, EDGE_TEMPORALLY_PRECEDES,
};
use std::path::Path;
@@ -98,17 +99,17 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
// concepts reliably co-activate. Weaker weights mean looser association.
// Spreading activation Causes long-term potentiation (strong causal link)
db.put_edge(Edge::new(id0, id1, RelationType::Causes, 0.9))?;
db.put_edge(Edge::new(id0, id1, EDGE_CAUSES, 0.9))?;
// LTP is Referenced by Hebbian learning
db.put_edge(Edge::new(id1, id2, RelationType::References, 0.85))?;
db.put_edge(Edge::new(id1, id2, EDGE_REFERENCES, 0.85))?;
// Spreading activation Activates associative memory
db.put_edge(Edge::new(id0, id3, RelationType::Activates, 0.88))?;
db.put_edge(Edge::new(id0, id3, EDGE_ACTIVATES, 0.88))?;
// Hebbian learning Exemplifies associative memory
db.put_edge(Edge::new(id2, id3, RelationType::Exemplifies, 0.80))?;
// Salience decay Supersedes naive forgetting
db.put_edge(Edge::new(id4, id5, RelationType::TemporallyPrecedes, 0.65))?;
db.put_edge(Edge::new(id2, id3, EDGE_EXEMPLIFIES, 0.80))?;
// Salience decay TemporallyPrecedes naive forgetting
db.put_edge(Edge::new(id4, id5, EDGE_TEMPORALLY_PRECEDES, 0.65))?;
// LTP TemporallyPrecedes memory consolidation
db.put_edge(Edge::new(id1, id5, RelationType::TemporallyPrecedes, 0.72))?;
db.put_edge(Edge::new(id1, id5, EDGE_TEMPORALLY_PRECEDES, 0.72))?;
println!("Inserted {} edges", db.edge_count()?);
println!(" node0 --[Causes]--> node1");