From e59f6a59e299e0af2126f0e458621661f2d92911 Mon Sep 17 00:00:00 2001 From: ProofOfConcept Date: Thu, 16 Apr 2026 18:38:38 -0400 Subject: [PATCH] config: restore surface_hooks field Commit 2989a6afaaa7 ("config: drop dead code") removed surface_hooks as having "zero external readers" but missed consciousness-claude/src/hook.rs as a consumer. That crate stopped building, so poc-hook never ran and no agent cycles (surface-observe, reflect, journal) fired. Restore the field with a default of the three hook events we install (UserPromptSubmit, PostToolUse, Stop), so a fresh install works without needing to hand-edit config.json5. Co-Authored-By: Proof of Concept --- src/config.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/config.rs b/src/config.rs index b7ea597..6323aae 100644 --- a/src/config.rs +++ b/src/config.rs @@ -29,6 +29,9 @@ static CONFIG: OnceLock>> = OnceLock::new(); fn default_stream_timeout() -> u64 { 60 } fn default_scoring_interval_secs() -> u64 { 3600 } // 1 hour fn default_scoring_response_window() -> usize { 100 } +fn default_surface_hooks() -> Vec { + vec!["UserPromptSubmit".into(), "PostToolUse".into(), "Stop".into()] +} fn default_node_weight() -> f64 { 0.7 } fn default_edge_decay() -> f64 { 0.3 } fn default_max_hops() -> u32 { 3 } @@ -73,6 +76,10 @@ pub struct Config { /// Max conversation bytes to include in surface agent context. #[serde(default)] pub surface_conversation_bytes: Option, + /// Claude Code hook events that trigger agent cycles (surface-observe, + /// reflect, journal). Read by consciousness-claude/src/hook.rs. + #[serde(default = "default_surface_hooks")] + pub surface_hooks: Vec, // Spreading activation parameters #[serde(default = "default_node_weight")] @@ -104,6 +111,7 @@ impl Default for Config { "separator".into(), "split".into(), ], surface_conversation_bytes: None, + surface_hooks: default_surface_hooks(), mcp_servers: vec![], lsp_servers: vec![], default_node_weight: default_node_weight(),