New src/thought/ module containing tools and infrastructure shared between poc-agent and subconscious agents: memory operations, file tools, bash, context window management. Currently coexists with agent/tools/ — next step is to wire up both agent/ and subconscious/ to use thought::dispatch instead of duplicating the routing logic. Move dbglog macro to lib.rs so it's available crate-wide regardless of module compilation order.
67 lines
1.6 KiB
Rust
67 lines
1.6 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 /tmp/poc-debug.log
|
|
#[macro_export]
|
|
macro_rules! dbglog {
|
|
($($arg:tt)*) => {{
|
|
use std::io::Write;
|
|
if let Ok(mut f) = std::fs::OpenOptions::new()
|
|
.create(true).append(true)
|
|
.open("/tmp/poc-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_search, migrate, 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,
|
|
};
|