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:
parent
0d2bf81a50
commit
39b07311e6
7 changed files with 31 additions and 14 deletions
|
|
@ -18,9 +18,14 @@ pub struct Session {
|
|||
}
|
||||
|
||||
impl Session {
|
||||
fn sessions_dir() -> PathBuf {
|
||||
let dir = dirs::home_dir().unwrap_or_default().join(".consciousness/sessions");
|
||||
fs::create_dir_all(&dir).ok();
|
||||
dir
|
||||
}
|
||||
|
||||
pub fn from_json(input: &str) -> Option<Self> {
|
||||
let state_dir = crate::store::memory_dir().join("sessions");
|
||||
fs::create_dir_all(&state_dir).ok();
|
||||
let state_dir = Self::sessions_dir();
|
||||
|
||||
let json: serde_json::Value = serde_json::from_str(input).ok()?;
|
||||
let session_id = json["session_id"].as_str().unwrap_or("").to_string();
|
||||
|
|
@ -38,7 +43,7 @@ impl Session {
|
|||
/// Load from a session ID string
|
||||
pub fn from_id(session_id: String) -> Option<Self> {
|
||||
if session_id.is_empty() { return None; }
|
||||
let state_dir = crate::store::memory_dir().join("sessions");
|
||||
let state_dir = Self::sessions_dir();
|
||||
Some(Session {
|
||||
session_id,
|
||||
transcript_path: String::new(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue