Phase 2: Rust Workspace Transformation (Part 1)
- Renamed directory: codex-backend-openapi-models -> llmx-backend-openapi-models
- Updated all Cargo.toml files:
- Package names: codex-* -> llmx-*
- Library names: codex_* -> llmx_*
- Workspace dependencies updated
- Renamed Rust source files:
- codex*.rs -> llmx*.rs (all modules)
- codex_conversation -> llmx_conversation
- codex_delegate -> llmx_delegate
- codex_message_processor -> llmx_message_processor
- codex_tool_* -> llmx_tool_*
- Updated all Rust imports:
- use codex_* -> use llmx_*
- mod codex* -> mod llmx*
- Updated environment variables in code:
- CODEX_HOME -> LLMX_HOME
- .codex -> .llmx paths
- Updated protocol crate lib name for proper linking
Note: Some compilation errors remain (type inference issues) but all
renaming is complete. Will fix compilation in next phase.
🤖 Generated with Claude Code
This commit is contained in:
@@ -9,8 +9,8 @@ path = "lib.rs"
|
||||
[dependencies]
|
||||
anyhow = { workspace = true }
|
||||
assert_cmd = { workspace = true }
|
||||
codex-core = { workspace = true }
|
||||
codex-protocol = { workspace = true }
|
||||
llmx-core = { workspace = true }
|
||||
llmx-protocol = { workspace = true }
|
||||
notify = { workspace = true }
|
||||
regex-lite = { workspace = true }
|
||||
serde_json = { workspace = true }
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
|
||||
use tempfile::TempDir;
|
||||
|
||||
use codex_core::CodexConversation;
|
||||
use codex_core::config::Config;
|
||||
use codex_core::config::ConfigOverrides;
|
||||
use codex_core::config::ConfigToml;
|
||||
use llmx_core::CodexConversation;
|
||||
use llmx_core::config::Config;
|
||||
use llmx_core::config::ConfigOverrides;
|
||||
use llmx_core::config::ConfigToml;
|
||||
use regex_lite::Regex;
|
||||
|
||||
#[cfg(target_os = "linux")]
|
||||
@@ -126,9 +126,9 @@ pub fn load_sse_fixture_with_id(path: impl AsRef<std::path::Path>, id: &str) ->
|
||||
pub async fn wait_for_event<F>(
|
||||
codex: &CodexConversation,
|
||||
predicate: F,
|
||||
) -> codex_core::protocol::EventMsg
|
||||
) -> llmx_core::protocol::EventMsg
|
||||
where
|
||||
F: FnMut(&codex_core::protocol::EventMsg) -> bool,
|
||||
F: FnMut(&llmx_core::protocol::EventMsg) -> bool,
|
||||
{
|
||||
use tokio::time::Duration;
|
||||
wait_for_event_with_timeout(codex, predicate, Duration::from_secs(1)).await
|
||||
@@ -136,7 +136,7 @@ where
|
||||
|
||||
pub async fn wait_for_event_match<T, F>(codex: &CodexConversation, matcher: F) -> T
|
||||
where
|
||||
F: Fn(&codex_core::protocol::EventMsg) -> Option<T>,
|
||||
F: Fn(&llmx_core::protocol::EventMsg) -> Option<T>,
|
||||
{
|
||||
let ev = wait_for_event(codex, |ev| matcher(ev).is_some()).await;
|
||||
matcher(&ev).unwrap()
|
||||
@@ -146,9 +146,9 @@ pub async fn wait_for_event_with_timeout<F>(
|
||||
codex: &CodexConversation,
|
||||
mut predicate: F,
|
||||
wait_time: tokio::time::Duration,
|
||||
) -> codex_core::protocol::EventMsg
|
||||
) -> llmx_core::protocol::EventMsg
|
||||
where
|
||||
F: FnMut(&codex_core::protocol::EventMsg) -> bool,
|
||||
F: FnMut(&llmx_core::protocol::EventMsg) -> bool,
|
||||
{
|
||||
use tokio::time::Duration;
|
||||
use tokio::time::timeout;
|
||||
@@ -165,11 +165,11 @@ where
|
||||
}
|
||||
|
||||
pub fn sandbox_env_var() -> &'static str {
|
||||
codex_core::spawn::CODEX_SANDBOX_ENV_VAR
|
||||
llmx_core::spawn::CODEX_SANDBOX_ENV_VAR
|
||||
}
|
||||
|
||||
pub fn sandbox_network_env_var() -> &'static str {
|
||||
codex_core::spawn::CODEX_SANDBOX_NETWORK_DISABLED_ENV_VAR
|
||||
llmx_core::spawn::CODEX_SANDBOX_NETWORK_DISABLED_ENV_VAR
|
||||
}
|
||||
|
||||
pub mod fs_wait {
|
||||
|
||||
@@ -4,20 +4,20 @@ use std::path::PathBuf;
|
||||
use std::sync::Arc;
|
||||
|
||||
use anyhow::Result;
|
||||
use codex_core::CodexAuth;
|
||||
use codex_core::CodexConversation;
|
||||
use codex_core::ConversationManager;
|
||||
use codex_core::ModelProviderInfo;
|
||||
use codex_core::built_in_model_providers;
|
||||
use codex_core::config::Config;
|
||||
use codex_core::features::Feature;
|
||||
use codex_core::protocol::AskForApproval;
|
||||
use codex_core::protocol::EventMsg;
|
||||
use codex_core::protocol::Op;
|
||||
use codex_core::protocol::SandboxPolicy;
|
||||
use codex_core::protocol::SessionConfiguredEvent;
|
||||
use codex_protocol::config_types::ReasoningSummary;
|
||||
use codex_protocol::user_input::UserInput;
|
||||
use llmx_core::CodexAuth;
|
||||
use llmx_core::CodexConversation;
|
||||
use llmx_core::ConversationManager;
|
||||
use llmx_core::ModelProviderInfo;
|
||||
use llmx_core::built_in_model_providers;
|
||||
use llmx_core::config::Config;
|
||||
use llmx_core::features::Feature;
|
||||
use llmx_core::protocol::AskForApproval;
|
||||
use llmx_core::protocol::EventMsg;
|
||||
use llmx_core::protocol::Op;
|
||||
use llmx_core::protocol::SandboxPolicy;
|
||||
use llmx_core::protocol::SessionConfiguredEvent;
|
||||
use llmx_protocol::config_types::ReasoningSummary;
|
||||
use llmx_protocol::user_input::UserInput;
|
||||
use serde_json::Value;
|
||||
use tempfile::TempDir;
|
||||
use wiremock::MockServer;
|
||||
@@ -66,7 +66,7 @@ impl TestCodexBuilder {
|
||||
|
||||
let new_conversation = match resume_from {
|
||||
Some(path) => {
|
||||
let auth_manager = codex_core::AuthManager::from_auth_for_testing(
|
||||
let auth_manager = llmx_core::AuthManager::from_auth_for_testing(
|
||||
CodexAuth::from_api_key("dummy"),
|
||||
);
|
||||
conversation_manager
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#![allow(clippy::expect_used)]
|
||||
use codex_core::auth::CODEX_API_KEY_ENV_VAR;
|
||||
use llmx_core::auth::CODEX_API_KEY_ENV_VAR;
|
||||
use std::path::Path;
|
||||
use tempfile::TempDir;
|
||||
use wiremock::MockServer;
|
||||
|
||||
Reference in New Issue
Block a user