mirror of
https://github.com/openai/codex.git
synced 2026-10-23 04:23:49 +00:00
## What changed - Move the V8 implementation into a dedicated `codex-code-mode-runtime` crate used by `codex-code-mode-host`, removing the embedded runtime fallback from the Codex process. - Resolve the host executable from the active installation layout and check its availability before selecting tools. - Fall back to direct tools with a one-time warning when optional code mode is unavailable. Keep `code_mode_only` and `disable_in_process_fallback` configurations fail-closed. ## Testing - Cover host discovery for standalone and package layouts, including missing hosts and symlinks. - Verify direct-tool fallback, one-time warnings, and fail-closed code-mode-only behavior. GitOrigin-RevId: 5aa3c6f1db148b2231fc24089a2ee0e2b00dbddb
48 lines
1.7 KiB
Rust
48 lines
1.7 KiB
Rust
mod description;
|
|
pub mod host;
|
|
mod response;
|
|
mod runtime;
|
|
mod session;
|
|
|
|
pub use description::CODE_MODE_PRAGMA_PREFIX;
|
|
pub use description::CodeModeToolKind;
|
|
pub use description::EnabledToolMetadata;
|
|
pub use description::ToolDefinition;
|
|
pub use description::ToolNamespaceDescription;
|
|
pub use description::augment_tool_definition;
|
|
pub use description::build_exec_tool_description;
|
|
pub use description::build_wait_tool_description;
|
|
pub use description::enabled_tool_metadata;
|
|
pub use description::is_code_mode_nested_tool;
|
|
pub use description::normalize_code_mode_identifier;
|
|
pub use description::parse_exec_source;
|
|
pub use description::render_code_mode_sample;
|
|
pub use description::render_json_schema_to_typescript;
|
|
pub use response::DEFAULT_IMAGE_DETAIL;
|
|
pub use response::FunctionCallOutputContentItem;
|
|
pub use response::ImageDetail;
|
|
pub use runtime::CodeModeNestedToolCall;
|
|
pub use runtime::DEFAULT_EXEC_YIELD_TIME_MS;
|
|
pub use runtime::DEFAULT_MAX_OUTPUT_TOKENS_PER_EXEC_CALL;
|
|
pub use runtime::DEFAULT_WAIT_YIELD_TIME_MS;
|
|
pub use runtime::ExecuteRequest;
|
|
pub use runtime::ExecuteToPendingOutcome;
|
|
pub use runtime::RuntimeResponse;
|
|
pub use runtime::WaitOutcome;
|
|
pub use runtime::WaitRequest;
|
|
pub use runtime::WaitToPendingOutcome;
|
|
pub use runtime::WaitToPendingRequest;
|
|
pub use session::CellId;
|
|
pub use session::CodeModeSession;
|
|
pub use session::CodeModeSessionDelegate;
|
|
pub use session::CodeModeSessionProvider;
|
|
pub use session::CodeModeSessionProviderFuture;
|
|
pub use session::CodeModeSessionResultFuture;
|
|
pub use session::NoopCodeModeSessionDelegate;
|
|
pub use session::NotificationFuture;
|
|
pub use session::StartedCell;
|
|
pub use session::ToolInvocationFuture;
|
|
|
|
pub const PUBLIC_TOOL_NAME: &str = "exec";
|
|
pub const WAIT_TOOL_NAME: &str = "wait";
|