Expose code-mode tools through globals (#14517)

Summary
- make all code-mode tools accessible as globals so callers only need
`tools.<name>`
- rename text/image helpers and key globals (store, load, ALL_TOOLS,
etc.) to reflect the new shared namespace
- update the JS bridge, runners, descriptions, router, and tests to
follow the new API

Testing
- Not run (not requested)
This commit is contained in:
pakrym-oai
2026-03-12 15:43:59 -07:00
committed by GitHub
Unverified
parent b560494c9f
commit a2546d5dff
10 changed files with 325 additions and 246 deletions
+5
View File
@@ -9,6 +9,7 @@ use tracing::Instrument;
use tracing::instrument;
use tracing::trace_span;
use crate::client_common::tools::ToolSpec;
use crate::codex::Session;
use crate::codex::TurnContext;
use crate::error::CodexErr;
@@ -46,6 +47,10 @@ impl ToolCallRuntime {
}
}
pub(crate) fn find_spec(&self, tool_name: &str) -> Option<ToolSpec> {
self.router.find_spec(tool_name)
}
#[instrument(level = "trace", skip_all)]
pub(crate) fn handle_tool_call(
self,