surface agent: add surface_hooks config and reduce search hops

Add surface_hooks config field — list of hook event names that trigger
the surface agent (e.g. ["UserPromptSubmit"]). Empty list disables it.

Reduce surface agent search from 3-5 hops to 2-3 to keep prompt size
under the API endpoint's connection limit.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
ProofOfConcept 2026-03-24 12:27:40 -04:00
parent 9a0121250b
commit 78c93dde4d
2 changed files with 10 additions and 7 deletions

View file

@ -70,6 +70,10 @@ pub struct Config {
/// Surface agent timeout in seconds. Kill if running longer than this.
#[serde(default)]
pub surface_timeout_secs: Option<u32>,
/// Hook events that trigger the surface agent (e.g. ["UserPromptSubmit"]).
/// Empty list disables surface agent.
#[serde(default)]
pub surface_hooks: Vec<String>,
}
impl Default for Config {
@ -109,6 +113,7 @@ impl Default for Config {
"separator".into(), "split".into(),
],
surface_timeout_secs: None,
surface_hooks: vec![],
}
}
}