migrate.rs was a one-time markdown→capnp conversion that's long done. Remove it and update the identity.rs comment to reference the new ~/.consciousness/ path.
73 lines
2 KiB
Rust
73 lines
2 KiB
Rust
// consciousness — unified crate for memory, agents, and subconscious processes
|
|
//
|
|
// thought/ — shared cognitive substrate (tools, context, memory ops)
|
|
// hippocampus/ — memory storage, retrieval, consolidation
|
|
// subconscious/ — autonomous agents (reflect, surface, consolidate, ...)
|
|
// agent/ — interactive agent (TUI, tools, API clients)
|
|
|
|
/// Debug logging macro — writes to ~/.consciousness/logs/debug.log
|
|
#[macro_export]
|
|
macro_rules! dbglog {
|
|
($($arg:tt)*) => {{
|
|
use std::io::Write;
|
|
let log_dir = std::path::PathBuf::from(
|
|
std::env::var("HOME").unwrap_or_else(|_| "/tmp".to_string()))
|
|
.join(".consciousness/logs");
|
|
let _ = std::fs::create_dir_all(&log_dir);
|
|
if let Ok(mut f) = std::fs::OpenOptions::new()
|
|
.create(true).append(true)
|
|
.open(log_dir.join("debug.log"))
|
|
{
|
|
let _ = writeln!(f, $($arg)*);
|
|
}
|
|
}};
|
|
}
|
|
|
|
// Agent infrastructure
|
|
pub mod agent;
|
|
|
|
// Shared cognitive infrastructure — used by both agent and subconscious
|
|
pub mod thought;
|
|
|
|
// Memory graph
|
|
pub mod hippocampus;
|
|
|
|
// Autonomous agents
|
|
pub mod subconscious;
|
|
|
|
// Unified configuration
|
|
pub mod config;
|
|
|
|
// Session state
|
|
pub mod session;
|
|
|
|
// Shared utilities
|
|
pub mod util;
|
|
|
|
// CLI handlers
|
|
pub mod cli;
|
|
|
|
// TUI for memory-search
|
|
pub mod tui;
|
|
|
|
// Generated capnp bindings
|
|
pub mod memory_capnp {
|
|
include!(concat!(env!("OUT_DIR"), "/schema/memory_capnp.rs"));
|
|
}
|
|
|
|
// Re-exports — all existing crate::X paths keep working
|
|
pub use hippocampus::{
|
|
store, graph, lookups, cursor, query,
|
|
similarity, spectral, neuro, counters,
|
|
transcript, memory,
|
|
};
|
|
pub use hippocampus::query::engine as search;
|
|
pub use hippocampus::query::parser as query_parser;
|
|
|
|
pub use subconscious as agents;
|
|
pub use subconscious::{
|
|
llm, audit, consolidate, knowledge,
|
|
enrich, digest, daemon,
|
|
};
|
|
// Backward compat: memory_search moved from hippocampus to subconscious::hook
|
|
pub use subconscious::hook as memory_search;
|