## Unified PTY-Based Exec Tool
Note: this requires to have this flag in the config:
`use_experimental_unified_exec_tool=true`
- Adds a PTY-backed interactive exec feature (“unified_exec”) with
session reuse via
session_id, bounded output (128 KiB), and timeout clamping (≤ 60 s).
- Protocol: introduces ResponseItem::UnifiedExec { session_id,
arguments, timeout_ms }.
- Tools: exposes unified_exec as a function tool (Responses API);
excluded from Chat
Completions payload while still supported in tool lists.
- Path handling: resolves commands via PATH (or explicit paths), with
UTF‑8/newline‑aware
truncation (truncate_middle).
- Tests: cover command parsing, path resolution, session
persistence/cleanup, multi‑session
isolation, timeouts, and truncation behavior.
16 lines
595 B
Rust
16 lines
595 B
Rust
mod exec_command_params;
|
|
mod exec_command_session;
|
|
mod responses_api;
|
|
mod session_id;
|
|
mod session_manager;
|
|
|
|
pub use exec_command_params::ExecCommandParams;
|
|
pub use exec_command_params::WriteStdinParams;
|
|
pub(crate) use exec_command_session::ExecCommandSession;
|
|
pub use responses_api::EXEC_COMMAND_TOOL_NAME;
|
|
pub use responses_api::WRITE_STDIN_TOOL_NAME;
|
|
pub use responses_api::create_exec_command_tool_for_responses_api;
|
|
pub use responses_api::create_write_stdin_tool_for_responses_api;
|
|
pub use session_manager::SessionManager as ExecSessionManager;
|
|
pub use session_manager::result_into_payload;
|