move daemon, IRC, and remaining state to ~/.consciousness/

- Daemon socket/pid/log: ~/.consciousness/daemon.{sock,pid}, logs/daemon.log
- Daemon config: ~/.consciousness/daemon.toml
- Daemon state: ~/.consciousness/daemon-state.json
- IRC logs: ~/.consciousness/irc/logs/
- No more .claude/ references except Claude Code integration points
  (projects, settings, hooks, telegram, CLAUDE.md)
This commit is contained in:
ProofOfConcept 2026-03-27 21:11:02 -04:00
parent ccf13c3cb5
commit bf5b495632
5 changed files with 10 additions and 10 deletions

View file

@ -1,6 +1,6 @@
// Daemon configuration.
//
// Lives at ~/.claude/daemon.toml. Loaded on startup, updated at
// Lives at ~/.consciousness/daemon.toml. Loaded on startup, updated at
// runtime when modules change state (join channel, etc.).
use crate::home;
@ -9,7 +9,7 @@ use std::fs;
use std::path::PathBuf;
fn config_path() -> PathBuf {
home().join(".claude/daemon.toml")
home().join(".consciousness/daemon.toml")
}
#[derive(Debug, Clone, Serialize, Deserialize, Default)]

View file

@ -73,7 +73,7 @@ struct Persisted {
}
fn state_path() -> std::path::PathBuf {
home().join(".claude/hooks/daemon-state.json")
home().join(".consciousness/daemon-state.json")
}
/// Compute EWMA decay factor: 0.5^(elapsed / half_life).

View file

@ -40,11 +40,11 @@ pub fn home() -> PathBuf {
}
fn sock_path() -> PathBuf {
home().join(".claude/hooks/idle-timer.sock")
home().join(".consciousness/daemon.sock")
}
fn pid_path() -> PathBuf {
home().join(".claude/hooks/idle-daemon.pid")
home().join(".consciousness/daemon.pid")
}
// ── CLI ──────────────────────────────────────────────────────────
@ -448,10 +448,10 @@ async fn module_command(
// ── Server mode ──────────────────────────────────────────────────
async fn server_main() -> Result<(), Box<dyn std::error::Error>> {
let log_path = home().join(".claude/hooks/idle-daemon.log");
let log_path = home().join(".consciousness/logs/daemon.log");
let file_appender = tracing_appender::rolling::daily(
log_path.parent().unwrap(),
"idle-daemon.log",
"daemon.log",
);
tracing_subscriber::fmt()
.with_writer(file_appender)

View file

@ -429,12 +429,12 @@ fn classify_privmsg(nick: &str, target: &str, text: &str, my_nick: &str) -> (Str
}
/// Append a message to the per-channel or per-user log file.
/// Logs go to ~/.claude/irc/logs/{target}.log (e.g. #bcachefs.log, pm-kent.log)
/// Logs go to ~/.consciousness/irc/logs/{target}.log (e.g. #bcachefs.log, pm-kent.log)
fn append_log(target: &str, nick: &str, text: &str) {
use std::io::Write;
// Sanitize target for filename (strip leading #, lowercase)
let filename = format!("{}.log", target.trim_start_matches('#').to_lowercase());
let dir = home().join(".claude/irc/logs");
let dir = home().join(".consciousness/irc/logs");
let _ = std::fs::create_dir_all(&dir);
if let Ok(mut f) = std::fs::OpenOptions::new()
.create(true)