add deferred watchdog self-close tool

This commit is contained in:
Friel
2026-04-01 03:06:22 +00:00
parent 63b1bb2a8e
commit 4abe6e63e8
10 changed files with 400 additions and 6 deletions
+17
View File
@@ -312,6 +312,23 @@ pub fn create_close_agent_tool_v2() -> ToolSpec {
})
}
pub fn create_watchdog_self_close_tool() -> ToolSpec {
ToolSpec::Function(ResponsesApiTool {
name: "watchdog_self_close".to_string(),
description:
"Watchdog-only: close this watchdog check-in thread and terminate immediately."
.to_string(),
strict: false,
defer_loading: Some(true),
parameters: JsonSchema::Object {
properties: BTreeMap::new(),
required: None,
additional_properties: Some(false.into()),
},
output_schema: Some(close_agent_output_schema()),
})
}
fn agent_status_output_schema() -> Value {
json!({
"oneOf": [
+1
View File
@@ -29,6 +29,7 @@ pub use agent_tool::create_spawn_agent_tool_v1;
pub use agent_tool::create_spawn_agent_tool_v2;
pub use agent_tool::create_wait_agent_tool_v1;
pub use agent_tool::create_wait_agent_tool_v2;
pub use agent_tool::create_watchdog_self_close_tool;
pub use code_mode::augment_tool_spec_for_code_mode;
pub use code_mode::tool_spec_to_code_mode_tool_definition;
pub use dynamic_tool::parse_dynamic_tool;