How juzzydee/oneiro works
Oneiro is a cognitive-memory service exposed through authenticated MCP tools and scheduled Worker jobs. Its main interaction is: a model captures an episodic memory, encoding turns it into semantic knowledge, distillation selects standing orientation, and recall returns orientation plus relevant memories. Memory storage, embeddings, and vector search support these stages; separate scheduled processes consolidate and calibrate memory. The tree and README establish several capabilities whose implementation was not sampled, so their subsystem nodes are shown without speculative internal wiring.
Main entry points: worker_store.rs Memory store · worker_encode.rs Episodic encoding · worker_wake.rs Scheduled jobs · worker_mcp.rs Hybrid recall
Components 21
MCP access
- Worker entry
src/lib.rs - MCP endpoint
src/worker_mcp.rs - Request auth
src/worker_auth_ctx.rs - OAuth
src/worker_oauth.rs
Memory lifecycle
- Memory store
src/worker_store.rs - Hybrid recall
src/worker_mcp.rs - Embedding
src/worker_embed.rs - Episodic encoding
src/worker_encode.rs - Batch encoding
src/worker_encode_batch.rs - Orientation distil
src/worker_orient_distill.rs - Decay and access
src/worker_store.rs
Cognitive loops
- Semantic defrag
src/worker_cscc.rs - REM consolidation
src/worker_rem.rs - Dialectic review
src/worker_dialectic.rs - Audit records
src/worker_dialectic_audit.rs
Worker platform
- D1 database
- Vector index
- Scheduled jobs
src/worker_wake.rs - Worker KV
Other components
- Model client
- Claude API
Connections 33
- Model client → Worker entry: sends requests
- Worker entry → Request auth: validates bearer
- Worker entry → MCP endpoint: dispatches MCP
- Request auth → OAuth: checks OAuth
- OAuth → Worker KV: validates token
- MCP endpoint → Hybrid recall: handles recall
- MCP endpoint → Memory store: handles memory tools
- Hybrid recall → Memory store: loads candidates
- Hybrid recall → Embedding: embeds query
- Hybrid recall → Vector index: searches vectors
- Embedding → Claude API: requests embeddings
- Episodic encoding → Claude API: requests judgments
- Episodic encoding → Memory store: writes lineage
- Episodic encoding → Embedding: embeds semantics
- Episodic encoding → Vector index: upserts vectors
- Batch encoding → Episodic encoding: runs encoding
- Orientation distil → Claude API: requests synthesis
- Orientation distil → Memory store: reads and writes
- Decay and access → Memory store: updates strength
- Scheduled jobs → Semantic defrag: starts scheduled job
- Scheduled jobs → Orientation distil: starts scheduled job
- Scheduled jobs → Dialectic review: starts scheduled job
- Scheduled jobs → REM consolidation: starts scheduled job
- Semantic defrag → Memory store: loads and merges
- Semantic defrag → Vector index: clusters vectors
- Semantic defrag → Claude API: judges clusters
- REM consolidation → Memory store: consolidates memories
- REM consolidation → Claude API: requests decisions
- Dialectic review → Memory store: reviews orientation
- Dialectic review → Claude API: runs dialogue
- Dialectic review → Audit records: records run
- Audit records → D1 database: writes audit rows
- Memory store → D1 database: reads and writes