forked from kent/consciousness
Separates the Claude-specific daemon (idle timer, tmux pane detection, prompt injection, RPC server, session hooks) from the universal infrastructure (channels, supervisor, notify, daemon protocol). thalamus/ now contains only substrate-independent code: the channel client/supervisor, notification system, daemon_capnp protocol, and shared helpers (now(), home()). claude/ contains: idle.rs, tmux.rs, context.rs, rpc.rs, config.rs, hook.rs (moved from subconscious/), plus the daemon CLI and server startup code from thalamus/mod.rs. All re-exports preserved for backward compatibility. Co-Authored-By: Proof of Concept <poc@bcachefs.org>
28 lines
745 B
Rust
28 lines
745 B
Rust
// thalamus/ — universal notification routing and channel infrastructure
|
|
//
|
|
// Contains the shared daemon protocol, notification system, channel
|
|
// client/supervisor, and utility helpers used by both Claude-specific
|
|
// code (in claude/) and the future substrate-independent consciousness
|
|
// binary.
|
|
|
|
pub mod channels;
|
|
pub mod supervisor;
|
|
pub mod notify;
|
|
|
|
pub mod daemon_capnp {
|
|
include!(concat!(env!("OUT_DIR"), "/schema/daemon_capnp.rs"));
|
|
}
|
|
|
|
use std::path::PathBuf;
|
|
use std::time::{SystemTime, UNIX_EPOCH};
|
|
|
|
pub fn now() -> f64 {
|
|
SystemTime::now()
|
|
.duration_since(UNIX_EPOCH)
|
|
.unwrap()
|
|
.as_secs_f64()
|
|
}
|
|
|
|
pub fn home() -> PathBuf {
|
|
PathBuf::from(std::env::var("HOME").unwrap_or_else(|_| "/root".into()))
|
|
}
|