mirror of
https://github.com/openai/codex.git
synced 2026-11-06 20:20:34 +00:00
add deferred watchdog self-close tool
This commit is contained in:
@@ -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": [
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user