From 69f4b95f8eb52a125f8fca3d6005c577884b281a Mon Sep 17 00:00:00 2001 From: xj Date: Thu, 19 Feb 2026 03:15:10 -0800 Subject: [PATCH] fix(hooks): add JsonSchema derive to HooksConfig and BuiltinHooksConfig Upstream main now derives schemars::JsonSchema on all config structs. Our HooksConfig and BuiltinHooksConfig were missing it, causing CI Build (Smoke) failure when the merge commit was compiled. --- src/agent/loop_.rs | 3 +++ src/config/schema.rs | 4 ++-- src/tools/delegate.rs | 1 + 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/agent/loop_.rs b/src/agent/loop_.rs index ff4d1a649..fd8ef928f 100644 --- a/src/agent/loop_.rs +++ b/src/agent/loop_.rs @@ -1300,6 +1300,7 @@ pub(crate) async fn agent_turn( max_tool_iterations, None, None, + None, ) .await } @@ -2126,6 +2127,7 @@ pub async fn run( config.agent.max_tool_iterations, None, None, + None, ) .await?; final_output = response.clone(); @@ -2245,6 +2247,7 @@ pub async fn run( config.agent.max_tool_iterations, None, None, + None, ) .await { diff --git a/src/config/schema.rs b/src/config/schema.rs index da4bce13b..80837be74 100644 --- a/src/config/schema.rs +++ b/src/config/schema.rs @@ -1761,7 +1761,7 @@ impl Default for ObservabilityConfig { // ── Hooks ──────────────────────────────────────────────────────── -#[derive(Debug, Clone, Serialize, Deserialize)] +#[derive(Debug, Clone, Serialize, Deserialize, JsonSchema)] pub struct HooksConfig { /// Enable lifecycle hook execution. /// @@ -1781,7 +1781,7 @@ impl Default for HooksConfig { } } -#[derive(Debug, Clone, Serialize, Deserialize)] +#[derive(Debug, Clone, Serialize, Deserialize, JsonSchema)] pub struct BuiltinHooksConfig { /// Enable the command-logger hook (logs tool calls for auditing). pub command_logger: bool, diff --git a/src/tools/delegate.rs b/src/tools/delegate.rs index 4c5a8c23a..e3b57e329 100644 --- a/src/tools/delegate.rs +++ b/src/tools/delegate.rs @@ -409,6 +409,7 @@ impl DelegateTool { agent_config.max_iterations, None, None, + None, ), ) .await;