Files
codex/codex-rs/app-server/tests/suite/v2/mod.rs
T
Channing Conger ee6257ae1c Dynamic tool calls - allow dynamic registration
Add experimental app-server support for connection-owned dynamic tool providers over both `stdio` and websocket.

Clients can now:
- register a tool with `toolProvider/register`
- unregister it with `toolProvider/unregister`

Registered tools are stored in an app-server registry, mapped back to the owning connection, and routed through the existing dynamic tool call flow. Tools with `injectIntoContext: true` are exposed to the model; tools with `injectIntoContext: false` remain callable only from `js_repl` via `codex.tool(...)`.

This also extends dynamic tool call events with `thread_id` so provider-owned tools can be invoked from newly created or resumed threads.

```mermaid
sequenceDiagram
    participant Client as Provider Client
    participant AppServer as App Server
    participant ThreadClient as Thread Client
    participant Core as Core Thread

    Client->>AppServer: toolProvider/register(tool)
    AppServer->>AppServer: store tool -> owning connection

    ThreadClient->>AppServer: thread/start
    AppServer->>Core: load thread + sync registered tools

    ThreadClient->>AppServer: turn/start
    AppServer->>Core: submit user input
    Core-->>AppServer: DynamicToolCallRequest(thread_id, tool, args, provider_owned=true)

    AppServer->>Client: item/tool/call
    Client-->>AppServer: DynamicToolCallResponse
    AppServer->>Core: submit dynamic tool response
    Core-->>AppServer: continue turn
2026-03-11 13:09:17 -07:00

49 lines
1003 B
Rust

mod account;
mod analytics;
mod app_list;
mod collaboration_mode_list;
#[cfg(unix)]
mod command_exec;
mod compaction;
mod config_rpc;
mod connection_handling_websocket;
#[cfg(unix)]
mod connection_handling_websocket_unix;
mod dynamic_tools;
mod experimental_api;
mod experimental_feature_list;
mod initialize;
mod mcp_server_elicitation;
mod model_list;
mod output_schema;
mod plan_item;
mod plugin_install;
mod plugin_list;
mod plugin_uninstall;
mod rate_limits;
mod realtime_conversation;
mod request_permissions;
mod request_user_input;
mod review;
mod safety_check_downgrade;
mod skills_list;
mod thread_archive;
mod thread_fork;
mod thread_list;
mod thread_loaded_list;
mod thread_metadata_update;
mod thread_name_websocket;
mod thread_read;
mod thread_resume;
mod thread_rollback;
mod thread_start;
mod thread_status;
mod thread_unarchive;
mod thread_unsubscribe;
mod tool_provider_websocket;
mod turn_interrupt;
mod turn_start;
mod turn_start_zsh_fork;
mod turn_steer;
mod windows_sandbox_setup;