logs: consolidate all logging under ~/.consciousness/logs/

All log output was scattered across ~/.consciousness/memory/ (daemon,
task logs, LLM call logs), ~/.consciousness/agent-sessions/ (observe),
and only hook logs were already in the right place.

Move everything to ~/.consciousness/logs/ with agent-specific subdirs:
  - daemon.log, daemon/ (task logs)
  - {agent_name}/ (knowledge agent logs, e.g. surface-observe/, reflect/)
  - llm/{caller}/ (LLM call logs)
  - observe.log (poc-agent observe)
  - hook-{session_id} (already correct)
  - debug.log (already correct)

Also includes the session.rs and hook.rs fixes from the previous
session (sessions dir → ~/.consciousness/sessions/).

Co-Authored-By: Proof of Concept <poc@bcachefs.org>
This commit is contained in:
ProofOfConcept 2026-03-28 20:39:20 -04:00
parent 0d2bf81a50
commit 39b07311e6
7 changed files with 31 additions and 14 deletions

View file

@ -61,7 +61,11 @@ fn session_dir() -> PathBuf {
}
fn socket_path() -> PathBuf { session_dir().join("agent.sock") }
fn log_path() -> PathBuf { session_dir().join("observe.log") }
fn log_path() -> PathBuf {
let dir = dirs::home_dir().unwrap_or_default().join(".consciousness/logs");
let _ = std::fs::create_dir_all(&dir);
dir.join("observe.log")
}
fn cursor_path() -> PathBuf { session_dir().join("read-cursor") }
// --- Client commands ---