config: restore surface_hooks field
Commit 2989a6afaa ("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 <poc@bcachefs.org>
This commit is contained in:
parent
6f20e68865
commit
e59f6a59e2
1 changed files with 8 additions and 0 deletions
|
|
@ -29,6 +29,9 @@ static CONFIG: OnceLock<RwLock<Arc<Config>>> = 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<String> {
|
||||
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<usize>,
|
||||
/// 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<String>,
|
||||
|
||||
// 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(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue