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:
Sebastian Krüger
2025-11-11 14:29:57 +01:00
parent f237fe560d
commit cb8d941adf
346 changed files with 3256 additions and 3199 deletions

1514
llmx-rs/Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@@ -8,7 +8,7 @@ members = [
"apply-patch", "apply-patch",
"arg0", "arg0",
"feedback", "feedback",
"codex-backend-openapi-models", "llmx-backend-openapi-models",
"cloud-tasks", "cloud-tasks",
"cloud-tasks-client", "cloud-tasks-client",
"cli", "cli",
@@ -52,40 +52,40 @@ edition = "2024"
[workspace.dependencies] [workspace.dependencies]
# Internal # Internal
app_test_support = { path = "app-server/tests/common" } app_test_support = { path = "app-server/tests/common" }
codex-ansi-escape = { path = "ansi-escape" } llmx-ansi-escape = { path = "ansi-escape" }
codex-app-server = { path = "app-server" } llmx-app-server = { path = "app-server" }
codex-app-server-protocol = { path = "app-server-protocol" } llmx-app-server-protocol = { path = "app-server-protocol" }
codex-apply-patch = { path = "apply-patch" } llmx-apply-patch = { path = "apply-patch" }
codex-arg0 = { path = "arg0" } llmx-arg0 = { path = "arg0" }
codex-async-utils = { path = "async-utils" } llmx-async-utils = { path = "async-utils" }
codex-backend-client = { path = "backend-client" } llmx-backend-client = { path = "backend-client" }
codex-chatgpt = { path = "chatgpt" } llmx-chatgpt = { path = "chatgpt" }
codex-common = { path = "common" } llmx-common = { path = "common" }
codex-core = { path = "core" } llmx-core = { path = "core" }
codex-exec = { path = "exec" } llmx-exec = { path = "exec" }
codex-feedback = { path = "feedback" } llmx-feedback = { path = "feedback" }
codex-file-search = { path = "file-search" } llmx-file-search = { path = "file-search" }
codex-git = { path = "utils/git" } llmx-git = { path = "utils/git" }
codex-keyring-store = { path = "keyring-store" } llmx-keyring-store = { path = "keyring-store" }
codex-linux-sandbox = { path = "linux-sandbox" } llmx-linux-sandbox = { path = "linux-sandbox" }
codex-login = { path = "login" } llmx-login = { path = "login" }
codex-mcp-server = { path = "mcp-server" } llmx-mcp-server = { path = "mcp-server" }
codex-ollama = { path = "ollama" } llmx-ollama = { path = "ollama" }
codex-otel = { path = "otel" } llmx-otel = { path = "otel" }
codex-process-hardening = { path = "process-hardening" } llmx-process-hardening = { path = "process-hardening" }
codex-protocol = { path = "protocol" } llmx-protocol = { path = "protocol" }
codex-responses-api-proxy = { path = "responses-api-proxy" } llmx-responses-api-proxy = { path = "responses-api-proxy" }
codex-rmcp-client = { path = "rmcp-client" } llmx-rmcp-client = { path = "rmcp-client" }
codex-stdio-to-uds = { path = "stdio-to-uds" } llmx-stdio-to-uds = { path = "stdio-to-uds" }
codex-tui = { path = "tui" } llmx-tui = { path = "tui" }
codex-utils-cache = { path = "utils/cache" } llmx-utils-cache = { path = "utils/cache" }
codex-utils-image = { path = "utils/image" } llmx-utils-image = { path = "utils/image" }
codex-utils-json-to-toml = { path = "utils/json-to-toml" } llmx-utils-json-to-toml = { path = "utils/json-to-toml" }
codex-utils-pty = { path = "utils/pty" } llmx-utils-pty = { path = "utils/pty" }
codex-utils-readiness = { path = "utils/readiness" } llmx-utils-readiness = { path = "utils/readiness" }
codex-utils-string = { path = "utils/string" } llmx-utils-string = { path = "utils/string" }
codex-utils-tokenizer = { path = "utils/tokenizer" } llmx-utils-tokenizer = { path = "utils/tokenizer" }
codex-windows-sandbox = { path = "windows-sandbox-rs" } llmx-windows-sandbox = { path = "windows-sandbox-rs" }
core_test_support = { path = "core/tests/common" } core_test_support = { path = "core/tests/common" }
mcp-types = { path = "mcp-types" } mcp-types = { path = "mcp-types" }
mcp_test_support = { path = "mcp-server/tests/common" } mcp_test_support = { path = "mcp-server/tests/common" }
@@ -257,8 +257,8 @@ unwrap_used = "deny"
ignored = [ ignored = [
"icu_provider", "icu_provider",
"openssl-sys", "openssl-sys",
"codex-utils-readiness", "llmx-utils-readiness",
"codex-utils-tokenizer", "llmx-utils-tokenizer",
] ]
[profile.release] [profile.release]

View File

@@ -1,10 +1,10 @@
[package] [package]
edition = "2024" edition = "2024"
name = "codex-ansi-escape" name = "llmx-ansi-escape"
version = { workspace = true } version = { workspace = true }
[lib] [lib]
name = "codex_ansi_escape" name = "llmx_ansi_escape"
path = "src/lib.rs" path = "src/lib.rs"
[dependencies] [dependencies]

View File

@@ -1,10 +1,10 @@
[package] [package]
edition = "2024" edition = "2024"
name = "codex-app-server-protocol" name = "llmx-app-server-protocol"
version = { workspace = true } version = { workspace = true }
[lib] [lib]
name = "codex_app_server_protocol" name = "llmx_app_server_protocol"
path = "src/lib.rs" path = "src/lib.rs"
[lints] [lints]
@@ -13,7 +13,7 @@ workspace = true
[dependencies] [dependencies]
anyhow = { workspace = true } anyhow = { workspace = true }
clap = { workspace = true, features = ["derive"] } clap = { workspace = true, features = ["derive"] }
codex-protocol = { workspace = true } llmx-protocol = { workspace = true }
mcp-types = { workspace = true } mcp-types = { workspace = true }
paste = { workspace = true } paste = { workspace = true }
schemars = { workspace = true } schemars = { workspace = true }

View File

@@ -18,5 +18,5 @@ struct Args {
fn main() -> Result<()> { fn main() -> Result<()> {
let args = Args::parse(); let args = Args::parse();
codex_app_server_protocol::generate_types(&args.out_dir, args.prettier.as_deref()) llmx_app_server_protocol::generate_types(&args.out_dir, args.prettier.as_deref())
} }

View File

@@ -13,10 +13,10 @@ use crate::export_server_responses;
use anyhow::Context; use anyhow::Context;
use anyhow::Result; use anyhow::Result;
use anyhow::anyhow; use anyhow::anyhow;
use codex_protocol::parse_command::ParsedCommand; use llmx_protocol::parse_command::ParsedCommand;
use codex_protocol::protocol::EventMsg; use llmx_protocol::protocol::EventMsg;
use codex_protocol::protocol::FileChange; use llmx_protocol::protocol::FileChange;
use codex_protocol::protocol::SandboxPolicy; use llmx_protocol::protocol::SandboxPolicy;
use schemars::JsonSchema; use schemars::JsonSchema;
use schemars::schema_for; use schemars::schema_for;
use serde::Serialize; use serde::Serialize;

View File

@@ -9,11 +9,11 @@ use crate::export::GeneratedSchema;
use crate::export::write_json_schema; use crate::export::write_json_schema;
use crate::protocol::v1; use crate::protocol::v1;
use crate::protocol::v2; use crate::protocol::v2;
use codex_protocol::ConversationId; use llmx_protocol::ConversationId;
use codex_protocol::parse_command::ParsedCommand; use llmx_protocol::parse_command::ParsedCommand;
use codex_protocol::protocol::FileChange; use llmx_protocol::protocol::FileChange;
use codex_protocol::protocol::ReviewDecision; use llmx_protocol::protocol::ReviewDecision;
use codex_protocol::protocol::SandboxCommandAssessment; use llmx_protocol::protocol::SandboxCommandAssessment;
use paste::paste; use paste::paste;
use schemars::JsonSchema; use schemars::JsonSchema;
use serde::Deserialize; use serde::Deserialize;
@@ -436,8 +436,8 @@ server_request_definitions! {
#[serde(rename_all = "camelCase")] #[serde(rename_all = "camelCase")]
pub struct ApplyPatchApprovalParams { pub struct ApplyPatchApprovalParams {
pub conversation_id: ConversationId, pub conversation_id: ConversationId,
/// Use to correlate this with [codex_core::protocol::PatchApplyBeginEvent] /// Use to correlate this with [llmx_core::protocol::PatchApplyBeginEvent]
/// and [codex_core::protocol::PatchApplyEndEvent]. /// and [llmx_core::protocol::PatchApplyEndEvent].
pub call_id: String, pub call_id: String,
pub file_changes: HashMap<PathBuf, FileChange>, pub file_changes: HashMap<PathBuf, FileChange>,
/// Optional explanatory reason (e.g. request for extra write access). /// Optional explanatory reason (e.g. request for extra write access).
@@ -451,8 +451,8 @@ pub struct ApplyPatchApprovalParams {
#[serde(rename_all = "camelCase")] #[serde(rename_all = "camelCase")]
pub struct ExecCommandApprovalParams { pub struct ExecCommandApprovalParams {
pub conversation_id: ConversationId, pub conversation_id: ConversationId,
/// Use to correlate this with [codex_core::protocol::ExecCommandBeginEvent] /// Use to correlate this with [llmx_core::protocol::ExecCommandBeginEvent]
/// and [codex_core::protocol::ExecCommandEndEvent]. /// and [llmx_core::protocol::ExecCommandEndEvent].
pub call_id: String, pub call_id: String,
pub command: Vec<String>, pub command: Vec<String>,
pub cwd: PathBuf, pub cwd: PathBuf,
@@ -481,7 +481,7 @@ pub struct FuzzyFileSearchParams {
pub cancellation_token: Option<String>, pub cancellation_token: Option<String>,
} }
/// Superset of [`codex_file_search::FileMatch`] /// Superset of [`llmx_file_search::FileMatch`]
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, JsonSchema, TS)] #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, JsonSchema, TS)]
pub struct FuzzyFileSearchResult { pub struct FuzzyFileSearchResult {
pub root: String, pub root: String,
@@ -530,8 +530,8 @@ client_notification_definitions! {
mod tests { mod tests {
use super::*; use super::*;
use anyhow::Result; use anyhow::Result;
use codex_protocol::account::PlanType; use llmx_protocol::account::PlanType;
use codex_protocol::protocol::AskForApproval; use llmx_protocol::protocol::AskForApproval;
use pretty_assertions::assert_eq; use pretty_assertions::assert_eq;
use serde_json::json; use serde_json::json;

View File

@@ -1,18 +1,18 @@
use std::collections::HashMap; use std::collections::HashMap;
use std::path::PathBuf; use std::path::PathBuf;
use codex_protocol::ConversationId; use llmx_protocol::ConversationId;
use codex_protocol::config_types::ForcedLoginMethod; use llmx_protocol::config_types::ForcedLoginMethod;
use codex_protocol::config_types::ReasoningEffort; use llmx_protocol::config_types::ReasoningEffort;
use codex_protocol::config_types::ReasoningSummary; use llmx_protocol::config_types::ReasoningSummary;
use codex_protocol::config_types::SandboxMode; use llmx_protocol::config_types::SandboxMode;
use codex_protocol::config_types::Verbosity; use llmx_protocol::config_types::Verbosity;
use codex_protocol::models::ResponseItem; use llmx_protocol::models::ResponseItem;
use codex_protocol::protocol::AskForApproval; use llmx_protocol::protocol::AskForApproval;
use codex_protocol::protocol::EventMsg; use llmx_protocol::protocol::EventMsg;
use codex_protocol::protocol::SandboxPolicy; use llmx_protocol::protocol::SandboxPolicy;
use codex_protocol::protocol::SessionSource; use llmx_protocol::protocol::SessionSource;
use codex_protocol::protocol::TurnAbortReason; use llmx_protocol::protocol::TurnAbortReason;
use schemars::JsonSchema; use schemars::JsonSchema;
use serde::Deserialize; use serde::Deserialize;
use serde::Serialize; use serde::Serialize;

View File

@@ -2,13 +2,13 @@ use std::collections::HashMap;
use std::path::PathBuf; use std::path::PathBuf;
use crate::protocol::common::AuthMode; use crate::protocol::common::AuthMode;
use codex_protocol::ConversationId; use llmx_protocol::ConversationId;
use codex_protocol::account::PlanType; use llmx_protocol::account::PlanType;
use codex_protocol::config_types::ReasoningEffort; use llmx_protocol::config_types::ReasoningEffort;
use codex_protocol::config_types::ReasoningSummary; use llmx_protocol::config_types::ReasoningSummary;
use codex_protocol::protocol::RateLimitSnapshot as CoreRateLimitSnapshot; use llmx_protocol::protocol::RateLimitSnapshot as CoreRateLimitSnapshot;
use codex_protocol::protocol::RateLimitWindow as CoreRateLimitWindow; use llmx_protocol::protocol::RateLimitWindow as CoreRateLimitWindow;
use codex_protocol::user_input::UserInput as CoreUserInput; use llmx_protocol::user_input::UserInput as CoreUserInput;
use mcp_types::ContentBlock as McpContentBlock; use mcp_types::ContentBlock as McpContentBlock;
use schemars::JsonSchema; use schemars::JsonSchema;
use serde::Deserialize; use serde::Deserialize;
@@ -42,13 +42,13 @@ macro_rules! v2_enum_from_core {
} }
v2_enum_from_core!( v2_enum_from_core!(
pub enum AskForApproval from codex_protocol::protocol::AskForApproval { pub enum AskForApproval from llmx_protocol::protocol::AskForApproval {
UnlessTrusted, OnFailure, OnRequest, Never UnlessTrusted, OnFailure, OnRequest, Never
} }
); );
v2_enum_from_core!( v2_enum_from_core!(
pub enum SandboxMode from codex_protocol::config_types::SandboxMode { pub enum SandboxMode from llmx_protocol::config_types::SandboxMode {
ReadOnly, WorkspaceWrite, DangerFullAccess ReadOnly, WorkspaceWrite, DangerFullAccess
} }
); );
@@ -73,18 +73,18 @@ pub enum SandboxPolicy {
} }
impl SandboxPolicy { impl SandboxPolicy {
pub fn to_core(&self) -> codex_protocol::protocol::SandboxPolicy { pub fn to_core(&self) -> llmx_protocol::protocol::SandboxPolicy {
match self { match self {
SandboxPolicy::DangerFullAccess => { SandboxPolicy::DangerFullAccess => {
codex_protocol::protocol::SandboxPolicy::DangerFullAccess llmx_protocol::protocol::SandboxPolicy::DangerFullAccess
} }
SandboxPolicy::ReadOnly => codex_protocol::protocol::SandboxPolicy::ReadOnly, SandboxPolicy::ReadOnly => llmx_protocol::protocol::SandboxPolicy::ReadOnly,
SandboxPolicy::WorkspaceWrite { SandboxPolicy::WorkspaceWrite {
writable_roots, writable_roots,
network_access, network_access,
exclude_tmpdir_env_var, exclude_tmpdir_env_var,
exclude_slash_tmp, exclude_slash_tmp,
} => codex_protocol::protocol::SandboxPolicy::WorkspaceWrite { } => llmx_protocol::protocol::SandboxPolicy::WorkspaceWrite {
writable_roots: writable_roots.clone(), writable_roots: writable_roots.clone(),
network_access: *network_access, network_access: *network_access,
exclude_tmpdir_env_var: *exclude_tmpdir_env_var, exclude_tmpdir_env_var: *exclude_tmpdir_env_var,
@@ -94,14 +94,14 @@ impl SandboxPolicy {
} }
} }
impl From<codex_protocol::protocol::SandboxPolicy> for SandboxPolicy { impl From<llmx_protocol::protocol::SandboxPolicy> for SandboxPolicy {
fn from(value: codex_protocol::protocol::SandboxPolicy) -> Self { fn from(value: llmx_protocol::protocol::SandboxPolicy) -> Self {
match value { match value {
codex_protocol::protocol::SandboxPolicy::DangerFullAccess => { llmx_protocol::protocol::SandboxPolicy::DangerFullAccess => {
SandboxPolicy::DangerFullAccess SandboxPolicy::DangerFullAccess
} }
codex_protocol::protocol::SandboxPolicy::ReadOnly => SandboxPolicy::ReadOnly, llmx_protocol::protocol::SandboxPolicy::ReadOnly => SandboxPolicy::ReadOnly,
codex_protocol::protocol::SandboxPolicy::WorkspaceWrite { llmx_protocol::protocol::SandboxPolicy::WorkspaceWrite {
writable_roots, writable_roots,
network_access, network_access,
exclude_tmpdir_env_var, exclude_tmpdir_env_var,

View File

@@ -1,14 +1,14 @@
[package] [package]
edition = "2024" edition = "2024"
name = "codex-app-server" name = "llmx-app-server"
version = { workspace = true } version = { workspace = true }
[[bin]] [[bin]]
name = "codex-app-server" name = "llmx-app-server"
path = "src/main.rs" path = "src/main.rs"
[lib] [lib]
name = "codex_app_server" name = "llmx_app_server"
path = "src/lib.rs" path = "src/lib.rs"
[lints] [lints]
@@ -16,16 +16,16 @@ workspace = true
[dependencies] [dependencies]
anyhow = { workspace = true } anyhow = { workspace = true }
codex-arg0 = { workspace = true } llmx-arg0 = { workspace = true }
codex-common = { workspace = true, features = ["cli"] } llmx-common = { workspace = true, features = ["cli"] }
codex-core = { workspace = true } llmx-core = { workspace = true }
codex-backend-client = { workspace = true } llmx-backend-client = { workspace = true }
codex-file-search = { workspace = true } llmx-file-search = { workspace = true }
codex-login = { workspace = true } llmx-login = { workspace = true }
codex-protocol = { workspace = true } llmx-protocol = { workspace = true }
codex-app-server-protocol = { workspace = true } llmx-app-server-protocol = { workspace = true }
codex-feedback = { workspace = true } llmx-feedback = { workspace = true }
codex-utils-json-to-toml = { workspace = true } llmx-utils-json-to-toml = { workspace = true }
chrono = { workspace = true } chrono = { workspace = true }
serde = { workspace = true, features = ["derive"] } serde = { workspace = true, features = ["derive"] }
serde_json = { workspace = true } serde_json = { workspace = true }

View File

@@ -5,8 +5,8 @@ use std::path::PathBuf;
use std::sync::Arc; use std::sync::Arc;
use std::sync::atomic::AtomicBool; use std::sync::atomic::AtomicBool;
use codex_app_server_protocol::FuzzyFileSearchResult; use llmx_app_server_protocol::FuzzyFileSearchResult;
use codex_file_search as file_search; use llmx_file_search as file_search;
use tokio::task::JoinSet; use tokio::task::JoinSet;
use tracing::warn; use tracing::warn;

View File

@@ -1,8 +1,8 @@
#![deny(clippy::print_stdout, clippy::print_stderr)] #![deny(clippy::print_stdout, clippy::print_stderr)]
use codex_common::CliConfigOverrides; use llmx_common::CliConfigOverrides;
use codex_core::config::Config; use llmx_core::config::Config;
use codex_core::config::ConfigOverrides; use llmx_core::config::ConfigOverrides;
use opentelemetry_appender_tracing::layer::OpenTelemetryTracingBridge; use opentelemetry_appender_tracing::layer::OpenTelemetryTracingBridge;
use std::io::ErrorKind; use std::io::ErrorKind;
use std::io::Result as IoResult; use std::io::Result as IoResult;
@@ -11,8 +11,8 @@ use std::path::PathBuf;
use crate::message_processor::MessageProcessor; use crate::message_processor::MessageProcessor;
use crate::outgoing_message::OutgoingMessage; use crate::outgoing_message::OutgoingMessage;
use crate::outgoing_message::OutgoingMessageSender; use crate::outgoing_message::OutgoingMessageSender;
use codex_app_server_protocol::JSONRPCMessage; use llmx_app_server_protocol::JSONRPCMessage;
use codex_feedback::CodexFeedback; use llmx_feedback::CodexFeedback;
use tokio::io::AsyncBufReadExt; use tokio::io::AsyncBufReadExt;
use tokio::io::AsyncWriteExt; use tokio::io::AsyncWriteExt;
use tokio::io::BufReader; use tokio::io::BufReader;
@@ -28,7 +28,7 @@ use tracing_subscriber::filter::Targets;
use tracing_subscriber::layer::SubscriberExt; use tracing_subscriber::layer::SubscriberExt;
use tracing_subscriber::util::SubscriberInitExt; use tracing_subscriber::util::SubscriberInitExt;
mod codex_message_processor; mod llmx_message_processor;
mod error_code; mod error_code;
mod fuzzy_file_search; mod fuzzy_file_search;
mod message_processor; mod message_processor;
@@ -88,7 +88,7 @@ pub async fn run_main(
let feedback = CodexFeedback::new(); let feedback = CodexFeedback::new();
let otel = let otel =
codex_core::otel_init::build_provider(&config, env!("CARGO_PKG_VERSION")).map_err(|e| { llmx_core::otel_init::build_provider(&config, env!("CARGO_PKG_VERSION")).map_err(|e| {
std::io::Error::new( std::io::Error::new(
ErrorKind::InvalidData, ErrorKind::InvalidData,
format!("error loading otel config: {e}"), format!("error loading otel config: {e}"),
@@ -112,7 +112,7 @@ pub async fn run_main(
.with(feedback_layer) .with(feedback_layer)
.with(otel.as_ref().map(|provider| { .with(otel.as_ref().map(|provider| {
OpenTelemetryTracingBridge::new(&provider.logger).with_filter( OpenTelemetryTracingBridge::new(&provider.logger).with_filter(
tracing_subscriber::filter::filter_fn(codex_core::otel_init::codex_export_filter), tracing_subscriber::filter::filter_fn(llmx_core::otel_init::codex_export_filter),
) )
})) }))
.try_init(); .try_init();

View File

@@ -6,143 +6,143 @@ use crate::outgoing_message::OutgoingMessageSender;
use crate::outgoing_message::OutgoingNotification; use crate::outgoing_message::OutgoingNotification;
use chrono::DateTime; use chrono::DateTime;
use chrono::Utc; use chrono::Utc;
use codex_app_server_protocol::Account; use llmx_app_server_protocol::Account;
use codex_app_server_protocol::AccountLoginCompletedNotification; use llmx_app_server_protocol::AccountLoginCompletedNotification;
use codex_app_server_protocol::AccountRateLimitsUpdatedNotification; use llmx_app_server_protocol::AccountRateLimitsUpdatedNotification;
use codex_app_server_protocol::AccountUpdatedNotification; use llmx_app_server_protocol::AccountUpdatedNotification;
use codex_app_server_protocol::AddConversationListenerParams; use llmx_app_server_protocol::AddConversationListenerParams;
use codex_app_server_protocol::AddConversationSubscriptionResponse; use llmx_app_server_protocol::AddConversationSubscriptionResponse;
use codex_app_server_protocol::ApplyPatchApprovalParams; use llmx_app_server_protocol::ApplyPatchApprovalParams;
use codex_app_server_protocol::ApplyPatchApprovalResponse; use llmx_app_server_protocol::ApplyPatchApprovalResponse;
use codex_app_server_protocol::ArchiveConversationParams; use llmx_app_server_protocol::ArchiveConversationParams;
use codex_app_server_protocol::ArchiveConversationResponse; use llmx_app_server_protocol::ArchiveConversationResponse;
use codex_app_server_protocol::AskForApproval; use llmx_app_server_protocol::AskForApproval;
use codex_app_server_protocol::AuthMode; use llmx_app_server_protocol::AuthMode;
use codex_app_server_protocol::AuthStatusChangeNotification; use llmx_app_server_protocol::AuthStatusChangeNotification;
use codex_app_server_protocol::CancelLoginAccountParams; use llmx_app_server_protocol::CancelLoginAccountParams;
use codex_app_server_protocol::CancelLoginAccountResponse; use llmx_app_server_protocol::CancelLoginAccountResponse;
use codex_app_server_protocol::CancelLoginChatGptResponse; use llmx_app_server_protocol::CancelLoginChatGptResponse;
use codex_app_server_protocol::ClientRequest; use llmx_app_server_protocol::ClientRequest;
use codex_app_server_protocol::ConversationGitInfo; use llmx_app_server_protocol::ConversationGitInfo;
use codex_app_server_protocol::ConversationSummary; use llmx_app_server_protocol::ConversationSummary;
use codex_app_server_protocol::ExecCommandApprovalParams; use llmx_app_server_protocol::ExecCommandApprovalParams;
use codex_app_server_protocol::ExecCommandApprovalResponse; use llmx_app_server_protocol::ExecCommandApprovalResponse;
use codex_app_server_protocol::ExecOneOffCommandParams; use llmx_app_server_protocol::ExecOneOffCommandParams;
use codex_app_server_protocol::ExecOneOffCommandResponse; use llmx_app_server_protocol::ExecOneOffCommandResponse;
use codex_app_server_protocol::FeedbackUploadParams; use llmx_app_server_protocol::FeedbackUploadParams;
use codex_app_server_protocol::FeedbackUploadResponse; use llmx_app_server_protocol::FeedbackUploadResponse;
use codex_app_server_protocol::FuzzyFileSearchParams; use llmx_app_server_protocol::FuzzyFileSearchParams;
use codex_app_server_protocol::FuzzyFileSearchResponse; use llmx_app_server_protocol::FuzzyFileSearchResponse;
use codex_app_server_protocol::GetAccountParams; use llmx_app_server_protocol::GetAccountParams;
use codex_app_server_protocol::GetAccountRateLimitsResponse; use llmx_app_server_protocol::GetAccountRateLimitsResponse;
use codex_app_server_protocol::GetAccountResponse; use llmx_app_server_protocol::GetAccountResponse;
use codex_app_server_protocol::GetAuthStatusParams; use llmx_app_server_protocol::GetAuthStatusParams;
use codex_app_server_protocol::GetAuthStatusResponse; use llmx_app_server_protocol::GetAuthStatusResponse;
use codex_app_server_protocol::GetConversationSummaryParams; use llmx_app_server_protocol::GetConversationSummaryParams;
use codex_app_server_protocol::GetConversationSummaryResponse; use llmx_app_server_protocol::GetConversationSummaryResponse;
use codex_app_server_protocol::GetUserAgentResponse; use llmx_app_server_protocol::GetUserAgentResponse;
use codex_app_server_protocol::GetUserSavedConfigResponse; use llmx_app_server_protocol::GetUserSavedConfigResponse;
use codex_app_server_protocol::GitDiffToRemoteResponse; use llmx_app_server_protocol::GitDiffToRemoteResponse;
use codex_app_server_protocol::InputItem as WireInputItem; use llmx_app_server_protocol::InputItem as WireInputItem;
use codex_app_server_protocol::InterruptConversationParams; use llmx_app_server_protocol::InterruptConversationParams;
use codex_app_server_protocol::InterruptConversationResponse; use llmx_app_server_protocol::InterruptConversationResponse;
use codex_app_server_protocol::JSONRPCErrorError; use llmx_app_server_protocol::JSONRPCErrorError;
use codex_app_server_protocol::ListConversationsParams; use llmx_app_server_protocol::ListConversationsParams;
use codex_app_server_protocol::ListConversationsResponse; use llmx_app_server_protocol::ListConversationsResponse;
use codex_app_server_protocol::LoginAccountParams; use llmx_app_server_protocol::LoginAccountParams;
use codex_app_server_protocol::LoginApiKeyParams; use llmx_app_server_protocol::LoginApiKeyParams;
use codex_app_server_protocol::LoginApiKeyResponse; use llmx_app_server_protocol::LoginApiKeyResponse;
use codex_app_server_protocol::LoginChatGptCompleteNotification; use llmx_app_server_protocol::LoginChatGptCompleteNotification;
use codex_app_server_protocol::LoginChatGptResponse; use llmx_app_server_protocol::LoginChatGptResponse;
use codex_app_server_protocol::LogoutAccountResponse; use llmx_app_server_protocol::LogoutAccountResponse;
use codex_app_server_protocol::LogoutChatGptResponse; use llmx_app_server_protocol::LogoutChatGptResponse;
use codex_app_server_protocol::ModelListParams; use llmx_app_server_protocol::ModelListParams;
use codex_app_server_protocol::ModelListResponse; use llmx_app_server_protocol::ModelListResponse;
use codex_app_server_protocol::NewConversationParams; use llmx_app_server_protocol::NewConversationParams;
use codex_app_server_protocol::NewConversationResponse; use llmx_app_server_protocol::NewConversationResponse;
use codex_app_server_protocol::RemoveConversationListenerParams; use llmx_app_server_protocol::RemoveConversationListenerParams;
use codex_app_server_protocol::RemoveConversationSubscriptionResponse; use llmx_app_server_protocol::RemoveConversationSubscriptionResponse;
use codex_app_server_protocol::RequestId; use llmx_app_server_protocol::RequestId;
use codex_app_server_protocol::Result as JsonRpcResult; use llmx_app_server_protocol::Result as JsonRpcResult;
use codex_app_server_protocol::ResumeConversationParams; use llmx_app_server_protocol::ResumeConversationParams;
use codex_app_server_protocol::ResumeConversationResponse; use llmx_app_server_protocol::ResumeConversationResponse;
use codex_app_server_protocol::SandboxMode; use llmx_app_server_protocol::SandboxMode;
use codex_app_server_protocol::SendUserMessageParams; use llmx_app_server_protocol::SendUserMessageParams;
use codex_app_server_protocol::SendUserMessageResponse; use llmx_app_server_protocol::SendUserMessageResponse;
use codex_app_server_protocol::SendUserTurnParams; use llmx_app_server_protocol::SendUserTurnParams;
use codex_app_server_protocol::SendUserTurnResponse; use llmx_app_server_protocol::SendUserTurnResponse;
use codex_app_server_protocol::ServerNotification; use llmx_app_server_protocol::ServerNotification;
use codex_app_server_protocol::ServerRequestPayload; use llmx_app_server_protocol::ServerRequestPayload;
use codex_app_server_protocol::SessionConfiguredNotification; use llmx_app_server_protocol::SessionConfiguredNotification;
use codex_app_server_protocol::SetDefaultModelParams; use llmx_app_server_protocol::SetDefaultModelParams;
use codex_app_server_protocol::SetDefaultModelResponse; use llmx_app_server_protocol::SetDefaultModelResponse;
use codex_app_server_protocol::Thread; use llmx_app_server_protocol::Thread;
use codex_app_server_protocol::ThreadArchiveParams; use llmx_app_server_protocol::ThreadArchiveParams;
use codex_app_server_protocol::ThreadArchiveResponse; use llmx_app_server_protocol::ThreadArchiveResponse;
use codex_app_server_protocol::ThreadItem; use llmx_app_server_protocol::ThreadItem;
use codex_app_server_protocol::ThreadListParams; use llmx_app_server_protocol::ThreadListParams;
use codex_app_server_protocol::ThreadListResponse; use llmx_app_server_protocol::ThreadListResponse;
use codex_app_server_protocol::ThreadResumeParams; use llmx_app_server_protocol::ThreadResumeParams;
use codex_app_server_protocol::ThreadResumeResponse; use llmx_app_server_protocol::ThreadResumeResponse;
use codex_app_server_protocol::ThreadStartParams; use llmx_app_server_protocol::ThreadStartParams;
use codex_app_server_protocol::ThreadStartResponse; use llmx_app_server_protocol::ThreadStartResponse;
use codex_app_server_protocol::ThreadStartedNotification; use llmx_app_server_protocol::ThreadStartedNotification;
use codex_app_server_protocol::Turn; use llmx_app_server_protocol::Turn;
use codex_app_server_protocol::TurnInterruptParams; use llmx_app_server_protocol::TurnInterruptParams;
use codex_app_server_protocol::TurnInterruptResponse; use llmx_app_server_protocol::TurnInterruptResponse;
use codex_app_server_protocol::TurnStartParams; use llmx_app_server_protocol::TurnStartParams;
use codex_app_server_protocol::TurnStartResponse; use llmx_app_server_protocol::TurnStartResponse;
use codex_app_server_protocol::TurnStartedNotification; use llmx_app_server_protocol::TurnStartedNotification;
use codex_app_server_protocol::TurnStatus; use llmx_app_server_protocol::TurnStatus;
use codex_app_server_protocol::UserInfoResponse; use llmx_app_server_protocol::UserInfoResponse;
use codex_app_server_protocol::UserInput as V2UserInput; use llmx_app_server_protocol::UserInput as V2UserInput;
use codex_app_server_protocol::UserSavedConfig; use llmx_app_server_protocol::UserSavedConfig;
use codex_backend_client::Client as BackendClient; use llmx_backend_client::Client as BackendClient;
use codex_core::AuthManager; use llmx_core::AuthManager;
use codex_core::CodexConversation; use llmx_core::CodexConversation;
use codex_core::ConversationManager; use llmx_core::ConversationManager;
use codex_core::Cursor as RolloutCursor; use llmx_core::Cursor as RolloutCursor;
use codex_core::INTERACTIVE_SESSION_SOURCES; use llmx_core::INTERACTIVE_SESSION_SOURCES;
use codex_core::InitialHistory; use llmx_core::InitialHistory;
use codex_core::NewConversation; use llmx_core::NewConversation;
use codex_core::RolloutRecorder; use llmx_core::RolloutRecorder;
use codex_core::SessionMeta; use llmx_core::SessionMeta;
use codex_core::auth::CLIENT_ID; use llmx_core::auth::CLIENT_ID;
use codex_core::auth::login_with_api_key; use llmx_core::auth::login_with_api_key;
use codex_core::config::Config; use llmx_core::config::Config;
use codex_core::config::ConfigOverrides; use llmx_core::config::ConfigOverrides;
use codex_core::config::ConfigToml; use llmx_core::config::ConfigToml;
use codex_core::config::edit::ConfigEditsBuilder; use llmx_core::config::edit::ConfigEditsBuilder;
use codex_core::config_loader::load_config_as_toml; use llmx_core::config_loader::load_config_as_toml;
use codex_core::default_client::get_codex_user_agent; use llmx_core::default_client::get_codex_user_agent;
use codex_core::exec::ExecParams; use llmx_core::exec::ExecParams;
use codex_core::exec_env::create_env; use llmx_core::exec_env::create_env;
use codex_core::find_conversation_path_by_id_str; use llmx_core::find_conversation_path_by_id_str;
use codex_core::get_platform_sandbox; use llmx_core::get_platform_sandbox;
use codex_core::git_info::git_diff_to_remote; use llmx_core::git_info::git_diff_to_remote;
use codex_core::parse_cursor; use llmx_core::parse_cursor;
use codex_core::protocol::ApplyPatchApprovalRequestEvent; use llmx_core::protocol::ApplyPatchApprovalRequestEvent;
use codex_core::protocol::Event; use llmx_core::protocol::Event;
use codex_core::protocol::EventMsg; use llmx_core::protocol::EventMsg;
use codex_core::protocol::ExecApprovalRequestEvent; use llmx_core::protocol::ExecApprovalRequestEvent;
use codex_core::protocol::Op; use llmx_core::protocol::Op;
use codex_core::protocol::ReviewDecision; use llmx_core::protocol::ReviewDecision;
use codex_core::read_head_for_summary; use llmx_core::read_head_for_summary;
use codex_feedback::CodexFeedback; use llmx_feedback::CodexFeedback;
use codex_login::ServerOptions as LoginServerOptions; use llmx_login::ServerOptions as LoginServerOptions;
use codex_login::ShutdownHandle; use llmx_login::ShutdownHandle;
use codex_login::run_login_server; use llmx_login::run_login_server;
use codex_protocol::ConversationId; use llmx_protocol::ConversationId;
use codex_protocol::config_types::ForcedLoginMethod; use llmx_protocol::config_types::ForcedLoginMethod;
use codex_protocol::items::TurnItem; use llmx_protocol::items::TurnItem;
use codex_protocol::models::ResponseItem; use llmx_protocol::models::ResponseItem;
use codex_protocol::protocol::GitInfo; use llmx_protocol::protocol::GitInfo;
use codex_protocol::protocol::RateLimitSnapshot as CoreRateLimitSnapshot; use llmx_protocol::protocol::RateLimitSnapshot as CoreRateLimitSnapshot;
use codex_protocol::protocol::RolloutItem; use llmx_protocol::protocol::RolloutItem;
use codex_protocol::protocol::SessionMetaLine; use llmx_protocol::protocol::SessionMetaLine;
use codex_protocol::protocol::USER_MESSAGE_BEGIN; use llmx_protocol::protocol::USER_MESSAGE_BEGIN;
use codex_protocol::user_input::UserInput as CoreInputItem; use llmx_protocol::user_input::UserInput as CoreInputItem;
use codex_utils_json_to_toml::json_to_toml; use llmx_utils_json_to_toml::json_to_toml;
use std::collections::HashMap; use std::collections::HashMap;
use std::ffi::OsStr; use std::ffi::OsStr;
use std::io::Error as IoError; use std::io::Error as IoError;
@@ -473,7 +473,7 @@ impl CodexMessageProcessor {
async fn login_api_key_v2(&mut self, request_id: RequestId, params: LoginApiKeyParams) { async fn login_api_key_v2(&mut self, request_id: RequestId, params: LoginApiKeyParams) {
match self.login_api_key_common(&params).await { match self.login_api_key_common(&params).await {
Ok(()) => { Ok(()) => {
let response = codex_app_server_protocol::LoginAccountResponse::ApiKey {}; let response = llmx_app_server_protocol::LoginAccountResponse::ApiKey {};
self.outgoing.send_response(request_id, response).await; self.outgoing.send_response(request_id, response).await;
let payload_login_completed = AccountLoginCompletedNotification { let payload_login_completed = AccountLoginCompletedNotification {
@@ -688,7 +688,7 @@ impl CodexMessageProcessor {
} }
}); });
let response = codex_app_server_protocol::LoginAccountResponse::Chatgpt { let response = llmx_app_server_protocol::LoginAccountResponse::Chatgpt {
login_id: login_id.to_string(), login_id: login_id.to_string(),
auth_url, auth_url,
}; };
@@ -1087,10 +1087,10 @@ impl CodexMessageProcessor {
.unwrap_or_else(|| self.config.sandbox_policy.clone()); .unwrap_or_else(|| self.config.sandbox_policy.clone());
let sandbox_type = match &effective_policy { let sandbox_type = match &effective_policy {
codex_core::protocol::SandboxPolicy::DangerFullAccess => { llmx_core::protocol::SandboxPolicy::DangerFullAccess => {
codex_core::exec::SandboxType::None llmx_core::exec::SandboxType::None
} }
_ => get_platform_sandbox().unwrap_or(codex_core::exec::SandboxType::None), _ => get_platform_sandbox().unwrap_or(llmx_core::exec::SandboxType::None),
}; };
tracing::debug!("Sandbox type: {sandbox_type:?}"); tracing::debug!("Sandbox type: {sandbox_type:?}");
let codex_linux_sandbox_exe = self.config.codex_linux_sandbox_exe.clone(); let codex_linux_sandbox_exe = self.config.codex_linux_sandbox_exe.clone();
@@ -1099,7 +1099,7 @@ impl CodexMessageProcessor {
let sandbox_cwd = self.config.cwd.clone(); let sandbox_cwd = self.config.cwd.clone();
tokio::spawn(async move { tokio::spawn(async move {
match codex_core::exec::process_exec_tool_call( match llmx_core::exec::process_exec_tool_call(
exec_params, exec_params,
sandbox_type, sandbox_type,
&effective_policy, &effective_policy,
@@ -1494,7 +1494,7 @@ impl CodexMessageProcessor {
} }
} }
GetConversationSummaryParams::ConversationId { conversation_id } => { GetConversationSummaryParams::ConversationId { conversation_id } => {
match codex_core::find_conversation_path_by_id_str( match llmx_core::find_conversation_path_by_id_str(
&self.config.codex_home, &self.config.codex_home,
&conversation_id.to_string(), &conversation_id.to_string(),
) )
@@ -1911,7 +1911,7 @@ impl CodexMessageProcessor {
rollout_path: &Path, rollout_path: &Path,
) -> Result<(), JSONRPCErrorError> { ) -> Result<(), JSONRPCErrorError> {
// Verify rollout_path is under sessions dir. // Verify rollout_path is under sessions dir.
let rollout_folder = self.config.codex_home.join(codex_core::SESSIONS_SUBDIR); let rollout_folder = self.config.codex_home.join(llmx_core::SESSIONS_SUBDIR);
let canonical_sessions_dir = match tokio::fs::canonicalize(&rollout_folder).await { let canonical_sessions_dir = match tokio::fs::canonicalize(&rollout_folder).await {
Ok(path) => path, Ok(path) => path,
@@ -2028,7 +2028,7 @@ impl CodexMessageProcessor {
let archive_folder = self let archive_folder = self
.config .config
.codex_home .codex_home
.join(codex_core::ARCHIVED_SESSIONS_SUBDIR); .join(llmx_core::ARCHIVED_SESSIONS_SUBDIR);
tokio::fs::create_dir_all(&archive_folder).await?; tokio::fs::create_dir_all(&archive_folder).await?;
tokio::fs::rename(&canonical_rollout_path, &archive_folder.join(&file_name)).await?; tokio::fs::rename(&canonical_rollout_path, &archive_folder.join(&file_name)).await?;
Ok(()) Ok(())
@@ -2797,7 +2797,7 @@ fn extract_conversation_summary(
let preview = head let preview = head
.iter() .iter()
.filter_map(|value| serde_json::from_value::<ResponseItem>(value.clone()).ok()) .filter_map(|value| serde_json::from_value::<ResponseItem>(value.clone()).ok())
.find_map(|item| match codex_core::parse_turn_item(&item) { .find_map(|item| match llmx_core::parse_turn_item(&item) {
Some(TurnItem::UserMessage(user)) => Some(user.message()), Some(TurnItem::UserMessage(user)) => Some(user.message()),
_ => None, _ => None,
})?; })?;
@@ -2871,7 +2871,7 @@ fn summary_to_thread(summary: ConversationSummary) -> Thread {
mod tests { mod tests {
use super::*; use super::*;
use anyhow::Result; use anyhow::Result;
use codex_protocol::protocol::SessionSource; use llmx_protocol::protocol::SessionSource;
use pretty_assertions::assert_eq; use pretty_assertions::assert_eq;
use serde_json::json; use serde_json::json;
use tempfile::TempDir; use tempfile::TempDir;
@@ -2934,9 +2934,9 @@ mod tests {
#[tokio::test] #[tokio::test]
async fn read_summary_from_rollout_returns_empty_preview_when_no_user_message() -> Result<()> { async fn read_summary_from_rollout_returns_empty_preview_when_no_user_message() -> Result<()> {
use codex_protocol::protocol::RolloutItem; use llmx_protocol::protocol::RolloutItem;
use codex_protocol::protocol::RolloutLine; use llmx_protocol::protocol::RolloutLine;
use codex_protocol::protocol::SessionMetaLine; use llmx_protocol::protocol::SessionMetaLine;
use std::fs; use std::fs;
let temp_dir = TempDir::new()?; let temp_dir = TempDir::new()?;

View File

@@ -1,6 +1,6 @@
use codex_app_server::run_main; use llmx_app_server::run_main;
use codex_arg0::arg0_dispatch_or_else; use llmx_arg0::arg0_dispatch_or_else;
use codex_common::CliConfigOverrides; use llmx_common::CliConfigOverrides;
fn main() -> anyhow::Result<()> { fn main() -> anyhow::Result<()> {
arg0_dispatch_or_else(|codex_linux_sandbox_exe| async move { arg0_dispatch_or_else(|codex_linux_sandbox_exe| async move {

View File

@@ -1,24 +1,24 @@
use std::path::PathBuf; use std::path::PathBuf;
use crate::codex_message_processor::CodexMessageProcessor; use crate::llmx_message_processor::CodexMessageProcessor;
use crate::error_code::INVALID_REQUEST_ERROR_CODE; use crate::error_code::INVALID_REQUEST_ERROR_CODE;
use crate::outgoing_message::OutgoingMessageSender; use crate::outgoing_message::OutgoingMessageSender;
use codex_app_server_protocol::ClientInfo; use llmx_app_server_protocol::ClientInfo;
use codex_app_server_protocol::ClientRequest; use llmx_app_server_protocol::ClientRequest;
use codex_app_server_protocol::InitializeResponse; use llmx_app_server_protocol::InitializeResponse;
use codex_app_server_protocol::JSONRPCError; use llmx_app_server_protocol::JSONRPCError;
use codex_app_server_protocol::JSONRPCErrorError; use llmx_app_server_protocol::JSONRPCErrorError;
use codex_app_server_protocol::JSONRPCNotification; use llmx_app_server_protocol::JSONRPCNotification;
use codex_app_server_protocol::JSONRPCRequest; use llmx_app_server_protocol::JSONRPCRequest;
use codex_app_server_protocol::JSONRPCResponse; use llmx_app_server_protocol::JSONRPCResponse;
use codex_core::AuthManager; use llmx_core::AuthManager;
use codex_core::ConversationManager; use llmx_core::ConversationManager;
use codex_core::config::Config; use llmx_core::config::Config;
use codex_core::default_client::USER_AGENT_SUFFIX; use llmx_core::default_client::USER_AGENT_SUFFIX;
use codex_core::default_client::get_codex_user_agent; use llmx_core::default_client::get_codex_user_agent;
use codex_feedback::CodexFeedback; use llmx_feedback::CodexFeedback;
use codex_protocol::protocol::SessionSource; use llmx_protocol::protocol::SessionSource;
use std::sync::Arc; use std::sync::Arc;
pub(crate) struct MessageProcessor { pub(crate) struct MessageProcessor {

View File

@@ -1,9 +1,9 @@
use codex_app_server_protocol::AuthMode; use llmx_app_server_protocol::AuthMode;
use codex_app_server_protocol::Model; use llmx_app_server_protocol::Model;
use codex_app_server_protocol::ReasoningEffortOption; use llmx_app_server_protocol::ReasoningEffortOption;
use codex_common::model_presets::ModelPreset; use llmx_common::model_presets::ModelPreset;
use codex_common::model_presets::ReasoningEffortPreset; use llmx_common::model_presets::ReasoningEffortPreset;
use codex_common::model_presets::builtin_model_presets; use llmx_common::model_presets::builtin_model_presets;
pub fn supported_models(auth_mode: Option<AuthMode>) -> Vec<Model> { pub fn supported_models(auth_mode: Option<AuthMode>) -> Vec<Model> {
builtin_model_presets(auth_mode) builtin_model_presets(auth_mode)

View File

@@ -2,12 +2,12 @@ use std::collections::HashMap;
use std::sync::atomic::AtomicI64; use std::sync::atomic::AtomicI64;
use std::sync::atomic::Ordering; use std::sync::atomic::Ordering;
use codex_app_server_protocol::JSONRPCErrorError; use llmx_app_server_protocol::JSONRPCErrorError;
use codex_app_server_protocol::RequestId; use llmx_app_server_protocol::RequestId;
use codex_app_server_protocol::Result; use llmx_app_server_protocol::Result;
use codex_app_server_protocol::ServerNotification; use llmx_app_server_protocol::ServerNotification;
use codex_app_server_protocol::ServerRequest; use llmx_app_server_protocol::ServerRequest;
use codex_app_server_protocol::ServerRequestPayload; use llmx_app_server_protocol::ServerRequestPayload;
use serde::Serialize; use serde::Serialize;
use tokio::sync::Mutex; use tokio::sync::Mutex;
use tokio::sync::mpsc; use tokio::sync::mpsc;
@@ -141,13 +141,13 @@ pub(crate) struct OutgoingError {
#[cfg(test)] #[cfg(test)]
mod tests { mod tests {
use codex_app_server_protocol::AccountLoginCompletedNotification; use llmx_app_server_protocol::AccountLoginCompletedNotification;
use codex_app_server_protocol::AccountRateLimitsUpdatedNotification; use llmx_app_server_protocol::AccountRateLimitsUpdatedNotification;
use codex_app_server_protocol::AccountUpdatedNotification; use llmx_app_server_protocol::AccountUpdatedNotification;
use codex_app_server_protocol::AuthMode; use llmx_app_server_protocol::AuthMode;
use codex_app_server_protocol::LoginChatGptCompleteNotification; use llmx_app_server_protocol::LoginChatGptCompleteNotification;
use codex_app_server_protocol::RateLimitSnapshot; use llmx_app_server_protocol::RateLimitSnapshot;
use codex_app_server_protocol::RateLimitWindow; use llmx_app_server_protocol::RateLimitWindow;
use pretty_assertions::assert_eq; use pretty_assertions::assert_eq;
use serde_json::json; use serde_json::json;
use uuid::Uuid; use uuid::Uuid;

View File

@@ -11,9 +11,9 @@ anyhow = { workspace = true }
assert_cmd = { workspace = true } assert_cmd = { workspace = true }
base64 = { workspace = true } base64 = { workspace = true }
chrono = { workspace = true } chrono = { workspace = true }
codex-app-server-protocol = { workspace = true } llmx-app-server-protocol = { workspace = true }
codex-core = { workspace = true } llmx-core = { workspace = true }
codex-protocol = { workspace = true } llmx-protocol = { workspace = true }
serde = { workspace = true } serde = { workspace = true }
serde_json = { workspace = true } serde_json = { workspace = true }
tokio = { workspace = true, features = [ tokio = { workspace = true, features = [

View File

@@ -6,11 +6,11 @@ use base64::Engine;
use base64::engine::general_purpose::URL_SAFE_NO_PAD; use base64::engine::general_purpose::URL_SAFE_NO_PAD;
use chrono::DateTime; use chrono::DateTime;
use chrono::Utc; use chrono::Utc;
use codex_core::auth::AuthCredentialsStoreMode; use llmx_core::auth::AuthCredentialsStoreMode;
use codex_core::auth::AuthDotJson; use llmx_core::auth::AuthDotJson;
use codex_core::auth::save_auth; use llmx_core::auth::save_auth;
use codex_core::token_data::TokenData; use llmx_core::token_data::TokenData;
use codex_core::token_data::parse_id_token; use llmx_core::token_data::parse_id_token;
use serde_json::json; use serde_json::json;
/// Builder for writing a fake ChatGPT auth.json in tests. /// Builder for writing a fake ChatGPT auth.json in tests.

View File

@@ -8,7 +8,7 @@ pub use auth_fixtures::ChatGptAuthFixture;
pub use auth_fixtures::ChatGptIdTokenClaims; pub use auth_fixtures::ChatGptIdTokenClaims;
pub use auth_fixtures::encode_id_token; pub use auth_fixtures::encode_id_token;
pub use auth_fixtures::write_chatgpt_auth; pub use auth_fixtures::write_chatgpt_auth;
use codex_app_server_protocol::JSONRPCResponse; use llmx_app_server_protocol::JSONRPCResponse;
pub use mcp_process::McpProcess; pub use mcp_process::McpProcess;
pub use mock_model_server::create_mock_chat_completions_server; pub use mock_model_server::create_mock_chat_completions_server;
pub use mock_model_server::create_mock_chat_completions_server_unchecked; pub use mock_model_server::create_mock_chat_completions_server_unchecked;

View File

@@ -12,39 +12,39 @@ use tokio::process::ChildStdout;
use anyhow::Context; use anyhow::Context;
use assert_cmd::prelude::*; use assert_cmd::prelude::*;
use codex_app_server_protocol::AddConversationListenerParams; use llmx_app_server_protocol::AddConversationListenerParams;
use codex_app_server_protocol::ArchiveConversationParams; use llmx_app_server_protocol::ArchiveConversationParams;
use codex_app_server_protocol::CancelLoginAccountParams; use llmx_app_server_protocol::CancelLoginAccountParams;
use codex_app_server_protocol::CancelLoginChatGptParams; use llmx_app_server_protocol::CancelLoginChatGptParams;
use codex_app_server_protocol::ClientInfo; use llmx_app_server_protocol::ClientInfo;
use codex_app_server_protocol::ClientNotification; use llmx_app_server_protocol::ClientNotification;
use codex_app_server_protocol::FeedbackUploadParams; use llmx_app_server_protocol::FeedbackUploadParams;
use codex_app_server_protocol::GetAccountParams; use llmx_app_server_protocol::GetAccountParams;
use codex_app_server_protocol::GetAuthStatusParams; use llmx_app_server_protocol::GetAuthStatusParams;
use codex_app_server_protocol::InitializeParams; use llmx_app_server_protocol::InitializeParams;
use codex_app_server_protocol::InterruptConversationParams; use llmx_app_server_protocol::InterruptConversationParams;
use codex_app_server_protocol::JSONRPCError; use llmx_app_server_protocol::JSONRPCError;
use codex_app_server_protocol::JSONRPCMessage; use llmx_app_server_protocol::JSONRPCMessage;
use codex_app_server_protocol::JSONRPCNotification; use llmx_app_server_protocol::JSONRPCNotification;
use codex_app_server_protocol::JSONRPCRequest; use llmx_app_server_protocol::JSONRPCRequest;
use codex_app_server_protocol::JSONRPCResponse; use llmx_app_server_protocol::JSONRPCResponse;
use codex_app_server_protocol::ListConversationsParams; use llmx_app_server_protocol::ListConversationsParams;
use codex_app_server_protocol::LoginApiKeyParams; use llmx_app_server_protocol::LoginApiKeyParams;
use codex_app_server_protocol::ModelListParams; use llmx_app_server_protocol::ModelListParams;
use codex_app_server_protocol::NewConversationParams; use llmx_app_server_protocol::NewConversationParams;
use codex_app_server_protocol::RemoveConversationListenerParams; use llmx_app_server_protocol::RemoveConversationListenerParams;
use codex_app_server_protocol::RequestId; use llmx_app_server_protocol::RequestId;
use codex_app_server_protocol::ResumeConversationParams; use llmx_app_server_protocol::ResumeConversationParams;
use codex_app_server_protocol::SendUserMessageParams; use llmx_app_server_protocol::SendUserMessageParams;
use codex_app_server_protocol::SendUserTurnParams; use llmx_app_server_protocol::SendUserTurnParams;
use codex_app_server_protocol::ServerRequest; use llmx_app_server_protocol::ServerRequest;
use codex_app_server_protocol::SetDefaultModelParams; use llmx_app_server_protocol::SetDefaultModelParams;
use codex_app_server_protocol::ThreadArchiveParams; use llmx_app_server_protocol::ThreadArchiveParams;
use codex_app_server_protocol::ThreadListParams; use llmx_app_server_protocol::ThreadListParams;
use codex_app_server_protocol::ThreadResumeParams; use llmx_app_server_protocol::ThreadResumeParams;
use codex_app_server_protocol::ThreadStartParams; use llmx_app_server_protocol::ThreadStartParams;
use codex_app_server_protocol::TurnInterruptParams; use llmx_app_server_protocol::TurnInterruptParams;
use codex_app_server_protocol::TurnStartParams; use llmx_app_server_protocol::TurnStartParams;
use std::process::Command as StdCommand; use std::process::Command as StdCommand;
use tokio::process::Command; use tokio::process::Command;

View File

@@ -1,7 +1,7 @@
use anyhow::Result; use anyhow::Result;
use codex_protocol::ConversationId; use llmx_protocol::ConversationId;
use codex_protocol::protocol::SessionMeta; use llmx_protocol::protocol::SessionMeta;
use codex_protocol::protocol::SessionSource; use llmx_protocol::protocol::SessionSource;
use serde_json::json; use serde_json::json;
use std::fs; use std::fs;
use std::path::Path; use std::path::Path;

View File

@@ -1,13 +1,13 @@
use anyhow::Result; use anyhow::Result;
use app_test_support::McpProcess; use app_test_support::McpProcess;
use app_test_support::to_response; use app_test_support::to_response;
use codex_app_server_protocol::ArchiveConversationParams; use llmx_app_server_protocol::ArchiveConversationParams;
use codex_app_server_protocol::ArchiveConversationResponse; use llmx_app_server_protocol::ArchiveConversationResponse;
use codex_app_server_protocol::JSONRPCResponse; use llmx_app_server_protocol::JSONRPCResponse;
use codex_app_server_protocol::NewConversationParams; use llmx_app_server_protocol::NewConversationParams;
use codex_app_server_protocol::NewConversationResponse; use llmx_app_server_protocol::NewConversationResponse;
use codex_app_server_protocol::RequestId; use llmx_app_server_protocol::RequestId;
use codex_core::ARCHIVED_SESSIONS_SUBDIR; use llmx_core::ARCHIVED_SESSIONS_SUBDIR;
use std::path::Path; use std::path::Path;
use tempfile::TempDir; use tempfile::TempDir;
use tokio::time::timeout; use tokio::time::timeout;

View File

@@ -1,14 +1,14 @@
use anyhow::Result; use anyhow::Result;
use app_test_support::McpProcess; use app_test_support::McpProcess;
use app_test_support::to_response; use app_test_support::to_response;
use codex_app_server_protocol::AuthMode; use llmx_app_server_protocol::AuthMode;
use codex_app_server_protocol::GetAuthStatusParams; use llmx_app_server_protocol::GetAuthStatusParams;
use codex_app_server_protocol::GetAuthStatusResponse; use llmx_app_server_protocol::GetAuthStatusResponse;
use codex_app_server_protocol::JSONRPCError; use llmx_app_server_protocol::JSONRPCError;
use codex_app_server_protocol::JSONRPCResponse; use llmx_app_server_protocol::JSONRPCResponse;
use codex_app_server_protocol::LoginApiKeyParams; use llmx_app_server_protocol::LoginApiKeyParams;
use codex_app_server_protocol::LoginApiKeyResponse; use llmx_app_server_protocol::LoginApiKeyResponse;
use codex_app_server_protocol::RequestId; use llmx_app_server_protocol::RequestId;
use pretty_assertions::assert_eq; use pretty_assertions::assert_eq;
use std::path::Path; use std::path::Path;
use tempfile::TempDir; use tempfile::TempDir;

View File

@@ -1,19 +1,19 @@
use anyhow::Result; use anyhow::Result;
use app_test_support::McpProcess; use app_test_support::McpProcess;
use app_test_support::to_response; use app_test_support::to_response;
use codex_app_server_protocol::GetUserSavedConfigResponse; use llmx_app_server_protocol::GetUserSavedConfigResponse;
use codex_app_server_protocol::JSONRPCResponse; use llmx_app_server_protocol::JSONRPCResponse;
use codex_app_server_protocol::Profile; use llmx_app_server_protocol::Profile;
use codex_app_server_protocol::RequestId; use llmx_app_server_protocol::RequestId;
use codex_app_server_protocol::SandboxSettings; use llmx_app_server_protocol::SandboxSettings;
use codex_app_server_protocol::Tools; use llmx_app_server_protocol::Tools;
use codex_app_server_protocol::UserSavedConfig; use llmx_app_server_protocol::UserSavedConfig;
use codex_core::protocol::AskForApproval; use llmx_core::protocol::AskForApproval;
use codex_protocol::config_types::ForcedLoginMethod; use llmx_protocol::config_types::ForcedLoginMethod;
use codex_protocol::config_types::ReasoningEffort; use llmx_protocol::config_types::ReasoningEffort;
use codex_protocol::config_types::ReasoningSummary; use llmx_protocol::config_types::ReasoningSummary;
use codex_protocol::config_types::SandboxMode; use llmx_protocol::config_types::SandboxMode;
use codex_protocol::config_types::Verbosity; use llmx_protocol::config_types::Verbosity;
use pretty_assertions::assert_eq; use pretty_assertions::assert_eq;
use std::collections::HashMap; use std::collections::HashMap;
use std::path::Path; use std::path::Path;

View File

@@ -3,15 +3,15 @@ use app_test_support::McpProcess;
use app_test_support::create_final_assistant_message_sse_response; use app_test_support::create_final_assistant_message_sse_response;
use app_test_support::create_mock_chat_completions_server; use app_test_support::create_mock_chat_completions_server;
use app_test_support::to_response; use app_test_support::to_response;
use codex_app_server_protocol::AddConversationListenerParams; use llmx_app_server_protocol::AddConversationListenerParams;
use codex_app_server_protocol::AddConversationSubscriptionResponse; use llmx_app_server_protocol::AddConversationSubscriptionResponse;
use codex_app_server_protocol::InputItem; use llmx_app_server_protocol::InputItem;
use codex_app_server_protocol::JSONRPCResponse; use llmx_app_server_protocol::JSONRPCResponse;
use codex_app_server_protocol::NewConversationParams; use llmx_app_server_protocol::NewConversationParams;
use codex_app_server_protocol::NewConversationResponse; use llmx_app_server_protocol::NewConversationResponse;
use codex_app_server_protocol::RequestId; use llmx_app_server_protocol::RequestId;
use codex_app_server_protocol::SendUserMessageParams; use llmx_app_server_protocol::SendUserMessageParams;
use codex_app_server_protocol::SendUserMessageResponse; use llmx_app_server_protocol::SendUserMessageResponse;
use pretty_assertions::assert_eq; use pretty_assertions::assert_eq;
use serde_json::json; use serde_json::json;
use std::path::Path; use std::path::Path;

View File

@@ -1,8 +1,8 @@
use anyhow::Result; use anyhow::Result;
use anyhow::anyhow; use anyhow::anyhow;
use app_test_support::McpProcess; use app_test_support::McpProcess;
use codex_app_server_protocol::JSONRPCResponse; use llmx_app_server_protocol::JSONRPCResponse;
use codex_app_server_protocol::RequestId; use llmx_app_server_protocol::RequestId;
use pretty_assertions::assert_eq; use pretty_assertions::assert_eq;
use serde_json::json; use serde_json::json;
use tempfile::TempDir; use tempfile::TempDir;

View File

@@ -3,16 +3,16 @@
use std::path::Path; use std::path::Path;
use codex_app_server_protocol::AddConversationListenerParams; use llmx_app_server_protocol::AddConversationListenerParams;
use codex_app_server_protocol::InterruptConversationParams; use llmx_app_server_protocol::InterruptConversationParams;
use codex_app_server_protocol::InterruptConversationResponse; use llmx_app_server_protocol::InterruptConversationResponse;
use codex_app_server_protocol::JSONRPCResponse; use llmx_app_server_protocol::JSONRPCResponse;
use codex_app_server_protocol::NewConversationParams; use llmx_app_server_protocol::NewConversationParams;
use codex_app_server_protocol::NewConversationResponse; use llmx_app_server_protocol::NewConversationResponse;
use codex_app_server_protocol::RequestId; use llmx_app_server_protocol::RequestId;
use codex_app_server_protocol::SendUserMessageParams; use llmx_app_server_protocol::SendUserMessageParams;
use codex_app_server_protocol::SendUserMessageResponse; use llmx_app_server_protocol::SendUserMessageResponse;
use codex_core::protocol::TurnAbortReason; use llmx_core::protocol::TurnAbortReason;
use core_test_support::skip_if_no_network; use core_test_support::skip_if_no_network;
use tempfile::TempDir; use tempfile::TempDir;
use tokio::time::timeout; use tokio::time::timeout;
@@ -103,7 +103,7 @@ async fn shell_command_interruption() -> anyhow::Result<()> {
let send_user_id = mcp let send_user_id = mcp
.send_send_user_message_request(SendUserMessageParams { .send_send_user_message_request(SendUserMessageParams {
conversation_id, conversation_id,
items: vec![codex_app_server_protocol::InputItem::Text { items: vec![llmx_app_server_protocol::InputItem::Text {
text: "run first sleep command".to_string(), text: "run first sleep command".to_string(),
}], }],
}) })

View File

@@ -2,19 +2,19 @@ use anyhow::Result;
use app_test_support::McpProcess; use app_test_support::McpProcess;
use app_test_support::create_fake_rollout; use app_test_support::create_fake_rollout;
use app_test_support::to_response; use app_test_support::to_response;
use codex_app_server_protocol::JSONRPCNotification; use llmx_app_server_protocol::JSONRPCNotification;
use codex_app_server_protocol::JSONRPCResponse; use llmx_app_server_protocol::JSONRPCResponse;
use codex_app_server_protocol::ListConversationsParams; use llmx_app_server_protocol::ListConversationsParams;
use codex_app_server_protocol::ListConversationsResponse; use llmx_app_server_protocol::ListConversationsResponse;
use codex_app_server_protocol::NewConversationParams; // reused for overrides shape use llmx_app_server_protocol::NewConversationParams; // reused for overrides shape
use codex_app_server_protocol::RequestId; use llmx_app_server_protocol::RequestId;
use codex_app_server_protocol::ResumeConversationParams; use llmx_app_server_protocol::ResumeConversationParams;
use codex_app_server_protocol::ResumeConversationResponse; use llmx_app_server_protocol::ResumeConversationResponse;
use codex_app_server_protocol::ServerNotification; use llmx_app_server_protocol::ServerNotification;
use codex_app_server_protocol::SessionConfiguredNotification; use llmx_app_server_protocol::SessionConfiguredNotification;
use codex_core::protocol::EventMsg; use llmx_core::protocol::EventMsg;
use codex_protocol::models::ContentItem; use llmx_protocol::models::ContentItem;
use codex_protocol::models::ResponseItem; use llmx_protocol::models::ResponseItem;
use pretty_assertions::assert_eq; use pretty_assertions::assert_eq;
use tempfile::TempDir; use tempfile::TempDir;
use tokio::time::timeout; use tokio::time::timeout;

View File

@@ -4,31 +4,31 @@ use app_test_support::create_final_assistant_message_sse_response;
use app_test_support::create_mock_chat_completions_server; use app_test_support::create_mock_chat_completions_server;
use app_test_support::create_shell_sse_response; use app_test_support::create_shell_sse_response;
use app_test_support::to_response; use app_test_support::to_response;
use codex_app_server_protocol::AddConversationListenerParams; use llmx_app_server_protocol::AddConversationListenerParams;
use codex_app_server_protocol::AddConversationSubscriptionResponse; use llmx_app_server_protocol::AddConversationSubscriptionResponse;
use codex_app_server_protocol::ExecCommandApprovalParams; use llmx_app_server_protocol::ExecCommandApprovalParams;
use codex_app_server_protocol::InputItem; use llmx_app_server_protocol::InputItem;
use codex_app_server_protocol::JSONRPCNotification; use llmx_app_server_protocol::JSONRPCNotification;
use codex_app_server_protocol::JSONRPCResponse; use llmx_app_server_protocol::JSONRPCResponse;
use codex_app_server_protocol::NewConversationParams; use llmx_app_server_protocol::NewConversationParams;
use codex_app_server_protocol::NewConversationResponse; use llmx_app_server_protocol::NewConversationResponse;
use codex_app_server_protocol::RemoveConversationListenerParams; use llmx_app_server_protocol::RemoveConversationListenerParams;
use codex_app_server_protocol::RemoveConversationSubscriptionResponse; use llmx_app_server_protocol::RemoveConversationSubscriptionResponse;
use codex_app_server_protocol::RequestId; use llmx_app_server_protocol::RequestId;
use codex_app_server_protocol::SendUserMessageParams; use llmx_app_server_protocol::SendUserMessageParams;
use codex_app_server_protocol::SendUserMessageResponse; use llmx_app_server_protocol::SendUserMessageResponse;
use codex_app_server_protocol::SendUserTurnParams; use llmx_app_server_protocol::SendUserTurnParams;
use codex_app_server_protocol::SendUserTurnResponse; use llmx_app_server_protocol::SendUserTurnResponse;
use codex_app_server_protocol::ServerRequest; use llmx_app_server_protocol::ServerRequest;
use codex_core::protocol::AskForApproval; use llmx_core::protocol::AskForApproval;
use codex_core::protocol::SandboxPolicy; use llmx_core::protocol::SandboxPolicy;
use codex_core::protocol_config_types::ReasoningEffort; use llmx_core::protocol_config_types::ReasoningEffort;
use codex_core::protocol_config_types::ReasoningSummary; use llmx_core::protocol_config_types::ReasoningSummary;
use codex_core::spawn::CODEX_SANDBOX_NETWORK_DISABLED_ENV_VAR; use llmx_core::spawn::CODEX_SANDBOX_NETWORK_DISABLED_ENV_VAR;
use codex_protocol::config_types::SandboxMode; use llmx_protocol::config_types::SandboxMode;
use codex_protocol::parse_command::ParsedCommand; use llmx_protocol::parse_command::ParsedCommand;
use codex_protocol::protocol::Event; use llmx_protocol::protocol::Event;
use codex_protocol::protocol::EventMsg; use llmx_protocol::protocol::EventMsg;
use pretty_assertions::assert_eq; use pretty_assertions::assert_eq;
use std::env; use std::env;
use std::path::Path; use std::path::Path;
@@ -111,7 +111,7 @@ async fn test_codex_jsonrpc_conversation_flow() -> Result<()> {
let send_user_id = mcp let send_user_id = mcp
.send_send_user_message_request(SendUserMessageParams { .send_send_user_message_request(SendUserMessageParams {
conversation_id, conversation_id,
items: vec![codex_app_server_protocol::InputItem::Text { items: vec![llmx_app_server_protocol::InputItem::Text {
text: "text".to_string(), text: "text".to_string(),
}], }],
}) })
@@ -240,7 +240,7 @@ async fn test_send_user_turn_changes_approval_policy_behavior() -> Result<()> {
let send_user_id = mcp let send_user_id = mcp
.send_send_user_message_request(SendUserMessageParams { .send_send_user_message_request(SendUserMessageParams {
conversation_id, conversation_id,
items: vec![codex_app_server_protocol::InputItem::Text { items: vec![llmx_app_server_protocol::InputItem::Text {
text: "run python".to_string(), text: "run python".to_string(),
}], }],
}) })
@@ -285,7 +285,7 @@ async fn test_send_user_turn_changes_approval_policy_behavior() -> Result<()> {
// Approve so the first turn can complete // Approve so the first turn can complete
mcp.send_response( mcp.send_response(
request_id, request_id,
serde_json::json!({ "decision": codex_core::protocol::ReviewDecision::Approved }), serde_json::json!({ "decision": llmx_core::protocol::ReviewDecision::Approved }),
) )
.await?; .await?;
@@ -300,7 +300,7 @@ async fn test_send_user_turn_changes_approval_policy_behavior() -> Result<()> {
let send_turn_id = mcp let send_turn_id = mcp
.send_send_user_turn_request(SendUserTurnParams { .send_send_user_turn_request(SendUserTurnParams {
conversation_id, conversation_id,
items: vec![codex_app_server_protocol::InputItem::Text { items: vec![llmx_app_server_protocol::InputItem::Text {
text: "run python again".to_string(), text: "run python again".to_string(),
}], }],
cwd: working_directory.clone(), cwd: working_directory.clone(),

View File

@@ -1,17 +1,17 @@
use anyhow::Result; use anyhow::Result;
use app_test_support::McpProcess; use app_test_support::McpProcess;
use app_test_support::to_response; use app_test_support::to_response;
use codex_app_server_protocol::CancelLoginChatGptParams; use llmx_app_server_protocol::CancelLoginChatGptParams;
use codex_app_server_protocol::CancelLoginChatGptResponse; use llmx_app_server_protocol::CancelLoginChatGptResponse;
use codex_app_server_protocol::GetAuthStatusParams; use llmx_app_server_protocol::GetAuthStatusParams;
use codex_app_server_protocol::GetAuthStatusResponse; use llmx_app_server_protocol::GetAuthStatusResponse;
use codex_app_server_protocol::JSONRPCError; use llmx_app_server_protocol::JSONRPCError;
use codex_app_server_protocol::JSONRPCResponse; use llmx_app_server_protocol::JSONRPCResponse;
use codex_app_server_protocol::LoginChatGptResponse; use llmx_app_server_protocol::LoginChatGptResponse;
use codex_app_server_protocol::LogoutChatGptResponse; use llmx_app_server_protocol::LogoutChatGptResponse;
use codex_app_server_protocol::RequestId; use llmx_app_server_protocol::RequestId;
use codex_core::auth::AuthCredentialsStoreMode; use llmx_core::auth::AuthCredentialsStoreMode;
use codex_login::login_with_api_key; use llmx_login::login_with_api_key;
use serial_test::serial; use serial_test::serial;
use std::path::Path; use std::path::Path;
use std::time::Duration; use std::time::Duration;

View File

@@ -1,6 +1,6 @@
mod archive_conversation; mod archive_conversation;
mod auth; mod auth;
mod codex_message_processor_flow; mod llmx_message_processor_flow;
mod config; mod config;
mod create_conversation; mod create_conversation;
mod fuzzy_file_search; mod fuzzy_file_search;

View File

@@ -3,20 +3,20 @@ use app_test_support::McpProcess;
use app_test_support::create_final_assistant_message_sse_response; use app_test_support::create_final_assistant_message_sse_response;
use app_test_support::create_mock_chat_completions_server; use app_test_support::create_mock_chat_completions_server;
use app_test_support::to_response; use app_test_support::to_response;
use codex_app_server_protocol::AddConversationListenerParams; use llmx_app_server_protocol::AddConversationListenerParams;
use codex_app_server_protocol::AddConversationSubscriptionResponse; use llmx_app_server_protocol::AddConversationSubscriptionResponse;
use codex_app_server_protocol::InputItem; use llmx_app_server_protocol::InputItem;
use codex_app_server_protocol::JSONRPCNotification; use llmx_app_server_protocol::JSONRPCNotification;
use codex_app_server_protocol::JSONRPCResponse; use llmx_app_server_protocol::JSONRPCResponse;
use codex_app_server_protocol::NewConversationParams; use llmx_app_server_protocol::NewConversationParams;
use codex_app_server_protocol::NewConversationResponse; use llmx_app_server_protocol::NewConversationResponse;
use codex_app_server_protocol::RequestId; use llmx_app_server_protocol::RequestId;
use codex_app_server_protocol::SendUserMessageParams; use llmx_app_server_protocol::SendUserMessageParams;
use codex_app_server_protocol::SendUserMessageResponse; use llmx_app_server_protocol::SendUserMessageResponse;
use codex_protocol::ConversationId; use llmx_protocol::ConversationId;
use codex_protocol::models::ContentItem; use llmx_protocol::models::ContentItem;
use codex_protocol::models::ResponseItem; use llmx_protocol::models::ResponseItem;
use codex_protocol::protocol::RawResponseItemEvent; use llmx_protocol::protocol::RawResponseItemEvent;
use pretty_assertions::assert_eq; use pretty_assertions::assert_eq;
use std::path::Path; use std::path::Path;
use tempfile::TempDir; use tempfile::TempDir;

View File

@@ -1,11 +1,11 @@
use anyhow::Result; use anyhow::Result;
use app_test_support::McpProcess; use app_test_support::McpProcess;
use app_test_support::to_response; use app_test_support::to_response;
use codex_app_server_protocol::JSONRPCResponse; use llmx_app_server_protocol::JSONRPCResponse;
use codex_app_server_protocol::RequestId; use llmx_app_server_protocol::RequestId;
use codex_app_server_protocol::SetDefaultModelParams; use llmx_app_server_protocol::SetDefaultModelParams;
use codex_app_server_protocol::SetDefaultModelResponse; use llmx_app_server_protocol::SetDefaultModelResponse;
use codex_core::config::ConfigToml; use llmx_core::config::ConfigToml;
use pretty_assertions::assert_eq; use pretty_assertions::assert_eq;
use std::path::Path; use std::path::Path;
use tempfile::TempDir; use tempfile::TempDir;

View File

@@ -1,9 +1,9 @@
use anyhow::Result; use anyhow::Result;
use app_test_support::McpProcess; use app_test_support::McpProcess;
use app_test_support::to_response; use app_test_support::to_response;
use codex_app_server_protocol::GetUserAgentResponse; use llmx_app_server_protocol::GetUserAgentResponse;
use codex_app_server_protocol::JSONRPCResponse; use llmx_app_server_protocol::JSONRPCResponse;
use codex_app_server_protocol::RequestId; use llmx_app_server_protocol::RequestId;
use pretty_assertions::assert_eq; use pretty_assertions::assert_eq;
use tempfile::TempDir; use tempfile::TempDir;
use tokio::time::timeout; use tokio::time::timeout;
@@ -30,7 +30,7 @@ async fn get_user_agent_returns_current_codex_user_agent() -> Result<()> {
os_info.os_type(), os_info.os_type(),
os_info.version(), os_info.version(),
os_info.architecture().unwrap_or("unknown"), os_info.architecture().unwrap_or("unknown"),
codex_core::terminal::user_agent() llmx_core::terminal::user_agent()
); );
let received: GetUserAgentResponse = to_response(response)?; let received: GetUserAgentResponse = to_response(response)?;

View File

@@ -3,10 +3,10 @@ use app_test_support::ChatGptAuthFixture;
use app_test_support::McpProcess; use app_test_support::McpProcess;
use app_test_support::to_response; use app_test_support::to_response;
use app_test_support::write_chatgpt_auth; use app_test_support::write_chatgpt_auth;
use codex_app_server_protocol::JSONRPCResponse; use llmx_app_server_protocol::JSONRPCResponse;
use codex_app_server_protocol::RequestId; use llmx_app_server_protocol::RequestId;
use codex_app_server_protocol::UserInfoResponse; use llmx_app_server_protocol::UserInfoResponse;
use codex_core::auth::AuthCredentialsStoreMode; use llmx_core::auth::AuthCredentialsStoreMode;
use pretty_assertions::assert_eq; use pretty_assertions::assert_eq;
use std::time::Duration; use std::time::Duration;
use tempfile::TempDir; use tempfile::TempDir;

View File

@@ -5,21 +5,21 @@ use app_test_support::to_response;
use app_test_support::ChatGptAuthFixture; use app_test_support::ChatGptAuthFixture;
use app_test_support::write_chatgpt_auth; use app_test_support::write_chatgpt_auth;
use codex_app_server_protocol::Account; use llmx_app_server_protocol::Account;
use codex_app_server_protocol::AuthMode; use llmx_app_server_protocol::AuthMode;
use codex_app_server_protocol::CancelLoginAccountParams; use llmx_app_server_protocol::CancelLoginAccountParams;
use codex_app_server_protocol::CancelLoginAccountResponse; use llmx_app_server_protocol::CancelLoginAccountResponse;
use codex_app_server_protocol::GetAccountParams; use llmx_app_server_protocol::GetAccountParams;
use codex_app_server_protocol::GetAccountResponse; use llmx_app_server_protocol::GetAccountResponse;
use codex_app_server_protocol::JSONRPCError; use llmx_app_server_protocol::JSONRPCError;
use codex_app_server_protocol::JSONRPCResponse; use llmx_app_server_protocol::JSONRPCResponse;
use codex_app_server_protocol::LoginAccountResponse; use llmx_app_server_protocol::LoginAccountResponse;
use codex_app_server_protocol::LogoutAccountResponse; use llmx_app_server_protocol::LogoutAccountResponse;
use codex_app_server_protocol::RequestId; use llmx_app_server_protocol::RequestId;
use codex_app_server_protocol::ServerNotification; use llmx_app_server_protocol::ServerNotification;
use codex_core::auth::AuthCredentialsStoreMode; use llmx_core::auth::AuthCredentialsStoreMode;
use codex_login::login_with_api_key; use llmx_login::login_with_api_key;
use codex_protocol::account::PlanType as AccountPlanType; use llmx_protocol::account::PlanType as AccountPlanType;
use pretty_assertions::assert_eq; use pretty_assertions::assert_eq;
use serial_test::serial; use serial_test::serial;
use std::path::Path; use std::path::Path;

View File

@@ -4,14 +4,14 @@ use anyhow::Result;
use anyhow::anyhow; use anyhow::anyhow;
use app_test_support::McpProcess; use app_test_support::McpProcess;
use app_test_support::to_response; use app_test_support::to_response;
use codex_app_server_protocol::JSONRPCError; use llmx_app_server_protocol::JSONRPCError;
use codex_app_server_protocol::JSONRPCResponse; use llmx_app_server_protocol::JSONRPCResponse;
use codex_app_server_protocol::Model; use llmx_app_server_protocol::Model;
use codex_app_server_protocol::ModelListParams; use llmx_app_server_protocol::ModelListParams;
use codex_app_server_protocol::ModelListResponse; use llmx_app_server_protocol::ModelListResponse;
use codex_app_server_protocol::ReasoningEffortOption; use llmx_app_server_protocol::ReasoningEffortOption;
use codex_app_server_protocol::RequestId; use llmx_app_server_protocol::RequestId;
use codex_protocol::config_types::ReasoningEffort; use llmx_protocol::config_types::ReasoningEffort;
use pretty_assertions::assert_eq; use pretty_assertions::assert_eq;
use tempfile::TempDir; use tempfile::TempDir;
use tokio::time::timeout; use tokio::time::timeout;

View File

@@ -3,14 +3,14 @@ use app_test_support::ChatGptAuthFixture;
use app_test_support::McpProcess; use app_test_support::McpProcess;
use app_test_support::to_response; use app_test_support::to_response;
use app_test_support::write_chatgpt_auth; use app_test_support::write_chatgpt_auth;
use codex_app_server_protocol::GetAccountRateLimitsResponse; use llmx_app_server_protocol::GetAccountRateLimitsResponse;
use codex_app_server_protocol::JSONRPCError; use llmx_app_server_protocol::JSONRPCError;
use codex_app_server_protocol::JSONRPCResponse; use llmx_app_server_protocol::JSONRPCResponse;
use codex_app_server_protocol::LoginApiKeyParams; use llmx_app_server_protocol::LoginApiKeyParams;
use codex_app_server_protocol::RateLimitSnapshot; use llmx_app_server_protocol::RateLimitSnapshot;
use codex_app_server_protocol::RateLimitWindow; use llmx_app_server_protocol::RateLimitWindow;
use codex_app_server_protocol::RequestId; use llmx_app_server_protocol::RequestId;
use codex_core::auth::AuthCredentialsStoreMode; use llmx_core::auth::AuthCredentialsStoreMode;
use pretty_assertions::assert_eq; use pretty_assertions::assert_eq;
use serde_json::json; use serde_json::json;
use std::path::Path; use std::path::Path;

View File

@@ -1,14 +1,14 @@
use anyhow::Result; use anyhow::Result;
use app_test_support::McpProcess; use app_test_support::McpProcess;
use app_test_support::to_response; use app_test_support::to_response;
use codex_app_server_protocol::JSONRPCResponse; use llmx_app_server_protocol::JSONRPCResponse;
use codex_app_server_protocol::RequestId; use llmx_app_server_protocol::RequestId;
use codex_app_server_protocol::ThreadArchiveParams; use llmx_app_server_protocol::ThreadArchiveParams;
use codex_app_server_protocol::ThreadArchiveResponse; use llmx_app_server_protocol::ThreadArchiveResponse;
use codex_app_server_protocol::ThreadStartParams; use llmx_app_server_protocol::ThreadStartParams;
use codex_app_server_protocol::ThreadStartResponse; use llmx_app_server_protocol::ThreadStartResponse;
use codex_core::ARCHIVED_SESSIONS_SUBDIR; use llmx_core::ARCHIVED_SESSIONS_SUBDIR;
use codex_core::find_conversation_path_by_id_str; use llmx_core::find_conversation_path_by_id_str;
use std::path::Path; use std::path::Path;
use tempfile::TempDir; use tempfile::TempDir;
use tokio::time::timeout; use tokio::time::timeout;

View File

@@ -2,10 +2,10 @@ use anyhow::Result;
use app_test_support::McpProcess; use app_test_support::McpProcess;
use app_test_support::create_fake_rollout; use app_test_support::create_fake_rollout;
use app_test_support::to_response; use app_test_support::to_response;
use codex_app_server_protocol::JSONRPCResponse; use llmx_app_server_protocol::JSONRPCResponse;
use codex_app_server_protocol::RequestId; use llmx_app_server_protocol::RequestId;
use codex_app_server_protocol::ThreadListParams; use llmx_app_server_protocol::ThreadListParams;
use codex_app_server_protocol::ThreadListResponse; use llmx_app_server_protocol::ThreadListResponse;
use serde_json::json; use serde_json::json;
use tempfile::TempDir; use tempfile::TempDir;
use tokio::time::timeout; use tokio::time::timeout;

View File

@@ -2,12 +2,12 @@ use anyhow::Result;
use app_test_support::McpProcess; use app_test_support::McpProcess;
use app_test_support::create_mock_chat_completions_server; use app_test_support::create_mock_chat_completions_server;
use app_test_support::to_response; use app_test_support::to_response;
use codex_app_server_protocol::JSONRPCResponse; use llmx_app_server_protocol::JSONRPCResponse;
use codex_app_server_protocol::RequestId; use llmx_app_server_protocol::RequestId;
use codex_app_server_protocol::ThreadResumeParams; use llmx_app_server_protocol::ThreadResumeParams;
use codex_app_server_protocol::ThreadResumeResponse; use llmx_app_server_protocol::ThreadResumeResponse;
use codex_app_server_protocol::ThreadStartParams; use llmx_app_server_protocol::ThreadStartParams;
use codex_app_server_protocol::ThreadStartResponse; use llmx_app_server_protocol::ThreadStartResponse;
use tempfile::TempDir; use tempfile::TempDir;
use tokio::time::timeout; use tokio::time::timeout;

View File

@@ -2,12 +2,12 @@ use anyhow::Result;
use app_test_support::McpProcess; use app_test_support::McpProcess;
use app_test_support::create_mock_chat_completions_server; use app_test_support::create_mock_chat_completions_server;
use app_test_support::to_response; use app_test_support::to_response;
use codex_app_server_protocol::JSONRPCNotification; use llmx_app_server_protocol::JSONRPCNotification;
use codex_app_server_protocol::JSONRPCResponse; use llmx_app_server_protocol::JSONRPCResponse;
use codex_app_server_protocol::RequestId; use llmx_app_server_protocol::RequestId;
use codex_app_server_protocol::ThreadStartParams; use llmx_app_server_protocol::ThreadStartParams;
use codex_app_server_protocol::ThreadStartResponse; use llmx_app_server_protocol::ThreadStartResponse;
use codex_app_server_protocol::ThreadStartedNotification; use llmx_app_server_protocol::ThreadStartedNotification;
use std::path::Path; use std::path::Path;
use tempfile::TempDir; use tempfile::TempDir;
use tokio::time::timeout; use tokio::time::timeout;

View File

@@ -5,15 +5,15 @@ use app_test_support::McpProcess;
use app_test_support::create_mock_chat_completions_server; use app_test_support::create_mock_chat_completions_server;
use app_test_support::create_shell_sse_response; use app_test_support::create_shell_sse_response;
use app_test_support::to_response; use app_test_support::to_response;
use codex_app_server_protocol::JSONRPCResponse; use llmx_app_server_protocol::JSONRPCResponse;
use codex_app_server_protocol::RequestId; use llmx_app_server_protocol::RequestId;
use codex_app_server_protocol::ThreadStartParams; use llmx_app_server_protocol::ThreadStartParams;
use codex_app_server_protocol::ThreadStartResponse; use llmx_app_server_protocol::ThreadStartResponse;
use codex_app_server_protocol::TurnInterruptParams; use llmx_app_server_protocol::TurnInterruptParams;
use codex_app_server_protocol::TurnInterruptResponse; use llmx_app_server_protocol::TurnInterruptResponse;
use codex_app_server_protocol::TurnStartParams; use llmx_app_server_protocol::TurnStartParams;
use codex_app_server_protocol::TurnStartResponse; use llmx_app_server_protocol::TurnStartResponse;
use codex_app_server_protocol::UserInput as V2UserInput; use llmx_app_server_protocol::UserInput as V2UserInput;
use tempfile::TempDir; use tempfile::TempDir;
use tokio::time::timeout; use tokio::time::timeout;

View File

@@ -5,21 +5,21 @@ use app_test_support::create_mock_chat_completions_server;
use app_test_support::create_mock_chat_completions_server_unchecked; use app_test_support::create_mock_chat_completions_server_unchecked;
use app_test_support::create_shell_sse_response; use app_test_support::create_shell_sse_response;
use app_test_support::to_response; use app_test_support::to_response;
use codex_app_server_protocol::JSONRPCNotification; use llmx_app_server_protocol::JSONRPCNotification;
use codex_app_server_protocol::JSONRPCResponse; use llmx_app_server_protocol::JSONRPCResponse;
use codex_app_server_protocol::RequestId; use llmx_app_server_protocol::RequestId;
use codex_app_server_protocol::ServerRequest; use llmx_app_server_protocol::ServerRequest;
use codex_app_server_protocol::ThreadStartParams; use llmx_app_server_protocol::ThreadStartParams;
use codex_app_server_protocol::ThreadStartResponse; use llmx_app_server_protocol::ThreadStartResponse;
use codex_app_server_protocol::TurnStartParams; use llmx_app_server_protocol::TurnStartParams;
use codex_app_server_protocol::TurnStartResponse; use llmx_app_server_protocol::TurnStartResponse;
use codex_app_server_protocol::TurnStartedNotification; use llmx_app_server_protocol::TurnStartedNotification;
use codex_app_server_protocol::UserInput as V2UserInput; use llmx_app_server_protocol::UserInput as V2UserInput;
use codex_core::protocol_config_types::ReasoningEffort; use llmx_core::protocol_config_types::ReasoningEffort;
use codex_core::protocol_config_types::ReasoningSummary; use llmx_core::protocol_config_types::ReasoningSummary;
use codex_protocol::parse_command::ParsedCommand; use llmx_protocol::parse_command::ParsedCommand;
use codex_protocol::protocol::Event; use llmx_protocol::protocol::Event;
use codex_protocol::protocol::EventMsg; use llmx_protocol::protocol::EventMsg;
use core_test_support::skip_if_no_network; use core_test_support::skip_if_no_network;
use pretty_assertions::assert_eq; use pretty_assertions::assert_eq;
use std::path::Path; use std::path::Path;
@@ -87,7 +87,7 @@ async fn turn_start_emits_notifications_and_accepts_model_override() -> Result<(
serde_json::from_value(notif.params.expect("params must be present"))?; serde_json::from_value(notif.params.expect("params must be present"))?;
assert_eq!( assert_eq!(
started.turn.status, started.turn.status,
codex_app_server_protocol::TurnStatus::InProgress llmx_app_server_protocol::TurnStatus::InProgress
); );
// Send a second turn that exercises the overrides path: change the model. // Send a second turn that exercises the overrides path: change the model.
@@ -272,7 +272,7 @@ async fn turn_start_exec_approval_toggle_v2() -> Result<()> {
// Approve and wait for task completion // Approve and wait for task completion
mcp.send_response( mcp.send_response(
request_id, request_id,
serde_json::json!({ "decision": codex_core::protocol::ReviewDecision::Approved }), serde_json::json!({ "decision": llmx_core::protocol::ReviewDecision::Approved }),
) )
.await?; .await?;
timeout( timeout(
@@ -288,8 +288,8 @@ async fn turn_start_exec_approval_toggle_v2() -> Result<()> {
input: vec![V2UserInput::Text { input: vec![V2UserInput::Text {
text: "run python again".to_string(), text: "run python again".to_string(),
}], }],
approval_policy: Some(codex_app_server_protocol::AskForApproval::Never), approval_policy: Some(llmx_app_server_protocol::AskForApproval::Never),
sandbox_policy: Some(codex_app_server_protocol::SandboxPolicy::DangerFullAccess), sandbox_policy: Some(llmx_app_server_protocol::SandboxPolicy::DangerFullAccess),
model: Some("mock-model".to_string()), model: Some("mock-model".to_string()),
effort: Some(ReasoningEffort::Medium), effort: Some(ReasoningEffort::Medium),
summary: Some(ReasoningSummary::Auto), summary: Some(ReasoningSummary::Auto),
@@ -380,8 +380,8 @@ async fn turn_start_updates_sandbox_and_cwd_between_turns_v2() -> Result<()> {
text: "first turn".to_string(), text: "first turn".to_string(),
}], }],
cwd: Some(first_cwd.clone()), cwd: Some(first_cwd.clone()),
approval_policy: Some(codex_app_server_protocol::AskForApproval::Never), approval_policy: Some(llmx_app_server_protocol::AskForApproval::Never),
sandbox_policy: Some(codex_app_server_protocol::SandboxPolicy::WorkspaceWrite { sandbox_policy: Some(llmx_app_server_protocol::SandboxPolicy::WorkspaceWrite {
writable_roots: vec![first_cwd.clone()], writable_roots: vec![first_cwd.clone()],
network_access: false, network_access: false,
exclude_tmpdir_env_var: false, exclude_tmpdir_env_var: false,
@@ -411,8 +411,8 @@ async fn turn_start_updates_sandbox_and_cwd_between_turns_v2() -> Result<()> {
text: "second turn".to_string(), text: "second turn".to_string(),
}], }],
cwd: Some(second_cwd.clone()), cwd: Some(second_cwd.clone()),
approval_policy: Some(codex_app_server_protocol::AskForApproval::Never), approval_policy: Some(llmx_app_server_protocol::AskForApproval::Never),
sandbox_policy: Some(codex_app_server_protocol::SandboxPolicy::DangerFullAccess), sandbox_policy: Some(llmx_app_server_protocol::SandboxPolicy::DangerFullAccess),
model: Some("mock-model".to_string()), model: Some("mock-model".to_string()),
effort: Some(ReasoningEffort::Medium), effort: Some(ReasoningEffort::Medium),
summary: Some(ReasoningSummary::Auto), summary: Some(ReasoningSummary::Auto),

View File

@@ -1,10 +1,10 @@
[package] [package]
edition = "2024" edition = "2024"
name = "codex-apply-patch" name = "llmx-apply-patch"
version = { workspace = true } version = { workspace = true }
[lib] [lib]
name = "codex_apply_patch" name = "llmx_apply_patch"
path = "src/lib.rs" path = "src/lib.rs"
[[bin]] [[bin]]

View File

@@ -1,3 +1,3 @@
pub fn main() -> ! { pub fn main() -> ! {
codex_apply_patch::main() llmx_apply_patch::main()
} }

View File

@@ -1,10 +1,10 @@
[package] [package]
edition = "2024" edition = "2024"
name = "codex-arg0" name = "llmx-arg0"
version = { workspace = true } version = { workspace = true }
[lib] [lib]
name = "codex_arg0" name = "llmx_arg0"
path = "src/lib.rs" path = "src/lib.rs"
[lints] [lints]
@@ -12,9 +12,9 @@ workspace = true
[dependencies] [dependencies]
anyhow = { workspace = true } anyhow = { workspace = true }
codex-apply-patch = { workspace = true } llmx-apply-patch = { workspace = true }
codex-core = { workspace = true } llmx-core = { workspace = true }
codex-linux-sandbox = { workspace = true } llmx-linux-sandbox = { workspace = true }
dotenvy = { workspace = true } dotenvy = { workspace = true }
tempfile = { workspace = true } tempfile = { workspace = true }
tokio = { workspace = true, features = ["rt-multi-thread"] } tokio = { workspace = true, features = ["rt-multi-thread"] }

View File

@@ -2,7 +2,7 @@ use std::future::Future;
use std::path::Path; use std::path::Path;
use std::path::PathBuf; use std::path::PathBuf;
use codex_core::CODEX_APPLY_PATCH_ARG1; use llmx_core::CODEX_APPLY_PATCH_ARG1;
#[cfg(unix)] #[cfg(unix)]
use std::os::unix::fs::symlink; use std::os::unix::fs::symlink;
use tempfile::TempDir; use tempfile::TempDir;
@@ -22,9 +22,9 @@ pub fn arg0_dispatch() -> Option<TempDir> {
if exe_name == LINUX_SANDBOX_ARG0 { if exe_name == LINUX_SANDBOX_ARG0 {
// Safety: [`run_main`] never returns. // Safety: [`run_main`] never returns.
codex_linux_sandbox::run_main(); llmx_linux_sandbox::run_main();
} else if exe_name == APPLY_PATCH_ARG0 || exe_name == MISSPELLED_APPLY_PATCH_ARG0 { } else if exe_name == APPLY_PATCH_ARG0 || exe_name == MISSPELLED_APPLY_PATCH_ARG0 {
codex_apply_patch::main(); llmx_apply_patch::main();
} }
let argv1 = args.next().unwrap_or_default(); let argv1 = args.next().unwrap_or_default();
@@ -34,7 +34,7 @@ pub fn arg0_dispatch() -> Option<TempDir> {
Some(patch_arg) => { Some(patch_arg) => {
let mut stdout = std::io::stdout(); let mut stdout = std::io::stdout();
let mut stderr = std::io::stderr(); let mut stderr = std::io::stderr();
match codex_apply_patch::apply_patch(&patch_arg, &mut stdout, &mut stderr) { match llmx_apply_patch::apply_patch(&patch_arg, &mut stdout, &mut stderr) {
Ok(()) => 0, Ok(()) => 0,
Err(_) => 1, Err(_) => 1,
} }
@@ -70,7 +70,7 @@ pub fn arg0_dispatch() -> Option<TempDir> {
/// ///
/// When the current executable is invoked through the hard-link or alias named /// When the current executable is invoked through the hard-link or alias named
/// `codex-linux-sandbox` we *directly* execute /// `codex-linux-sandbox` we *directly* execute
/// [`codex_linux_sandbox::run_main`] (which never returns). Otherwise we: /// [`llmx_linux_sandbox::run_main`] (which never returns). Otherwise we:
/// ///
/// 1. Load `.env` values from `~/.codex/.env` before creating any threads. /// 1. Load `.env` values from `~/.codex/.env` before creating any threads.
/// 2. Construct a Tokio multi-thread runtime. /// 2. Construct a Tokio multi-thread runtime.
@@ -79,7 +79,7 @@ pub fn arg0_dispatch() -> Option<TempDir> {
/// 4. Execute the provided async `main_fn` inside that runtime, forwarding any /// 4. Execute the provided async `main_fn` inside that runtime, forwarding any
/// error. Note that `main_fn` receives `codex_linux_sandbox_exe: /// error. Note that `main_fn` receives `codex_linux_sandbox_exe:
/// Option<PathBuf>`, as an argument, which is generally needed as part of /// Option<PathBuf>`, as an argument, which is generally needed as part of
/// constructing [`codex_core::config::Config`]. /// constructing [`llmx_core::config::Config`].
/// ///
/// This function should be used to wrap any `main()` function in binary crates /// This function should be used to wrap any `main()` function in binary crates
/// in this workspace that depends on these helper CLIs. /// in this workspace that depends on these helper CLIs.
@@ -114,7 +114,7 @@ const ILLEGAL_ENV_VAR_PREFIX: &str = "CODEX_";
/// Security: Do not allow `.env` files to create or modify any variables /// Security: Do not allow `.env` files to create or modify any variables
/// with names starting with `CODEX_`. /// with names starting with `CODEX_`.
fn load_dotenv() { fn load_dotenv() {
if let Ok(codex_home) = codex_core::config::find_codex_home() if let Ok(codex_home) = llmx_core::config::find_codex_home()
&& let Ok(iter) = dotenvy::from_path_iter(codex_home.join(".env")) && let Ok(iter) = dotenvy::from_path_iter(codex_home.join(".env"))
{ {
set_filtered(iter); set_filtered(iter);

View File

@@ -1,6 +1,6 @@
[package] [package]
edition.workspace = true edition.workspace = true
name = "codex-async-utils" name = "llmx-async-utils"
version.workspace = true version.workspace = true
[lints] [lints]

View File

@@ -1,5 +1,5 @@
[package] [package]
name = "codex-backend-client" name = "llmx-backend-client"
version = "0.0.0" version = "0.0.0"
edition = "2024" edition = "2024"
publish = false publish = false
@@ -12,9 +12,9 @@ anyhow = "1"
serde = { version = "1", features = ["derive"] } serde = { version = "1", features = ["derive"] }
serde_json = "1" serde_json = "1"
reqwest = { version = "0.12", default-features = false, features = ["json", "rustls-tls"] } reqwest = { version = "0.12", default-features = false, features = ["json", "rustls-tls"] }
codex-backend-openapi-models = { path = "../codex-backend-openapi-models" } llmx-backend-openapi-models = { path = "../llmx-backend-openapi-models" }
codex-protocol = { workspace = true } llmx-protocol = { workspace = true }
codex-core = { workspace = true } llmx-core = { workspace = true }
[dev-dependencies] [dev-dependencies]
pretty_assertions = "1" pretty_assertions = "1"

View File

@@ -4,10 +4,10 @@ use crate::types::RateLimitStatusPayload;
use crate::types::RateLimitWindowSnapshot; use crate::types::RateLimitWindowSnapshot;
use crate::types::TurnAttemptsSiblingTurnsResponse; use crate::types::TurnAttemptsSiblingTurnsResponse;
use anyhow::Result; use anyhow::Result;
use codex_core::auth::CodexAuth; use llmx_core::auth::CodexAuth;
use codex_core::default_client::get_codex_user_agent; use llmx_core::default_client::get_codex_user_agent;
use codex_protocol::protocol::RateLimitSnapshot; use llmx_protocol::protocol::RateLimitSnapshot;
use codex_protocol::protocol::RateLimitWindow; use llmx_protocol::protocol::RateLimitWindow;
use reqwest::header::AUTHORIZATION; use reqwest::header::AUTHORIZATION;
use reqwest::header::CONTENT_TYPE; use reqwest::header::CONTENT_TYPE;
use reqwest::header::HeaderMap; use reqwest::header::HeaderMap;

View File

@@ -1,9 +1,9 @@
pub use codex_backend_openapi_models::models::PaginatedListTaskListItem; pub use llmx_backend_openapi_models::models::PaginatedListTaskListItem;
pub use codex_backend_openapi_models::models::PlanType; pub use llmx_backend_openapi_models::models::PlanType;
pub use codex_backend_openapi_models::models::RateLimitStatusDetails; pub use llmx_backend_openapi_models::models::RateLimitStatusDetails;
pub use codex_backend_openapi_models::models::RateLimitStatusPayload; pub use llmx_backend_openapi_models::models::RateLimitStatusPayload;
pub use codex_backend_openapi_models::models::RateLimitWindowSnapshot; pub use llmx_backend_openapi_models::models::RateLimitWindowSnapshot;
pub use codex_backend_openapi_models::models::TaskListItem; pub use llmx_backend_openapi_models::models::TaskListItem;
use serde::Deserialize; use serde::Deserialize;
use serde::de::Deserializer; use serde::de::Deserializer;

View File

@@ -1,6 +1,6 @@
[package] [package]
edition = "2024" edition = "2024"
name = "codex-chatgpt" name = "llmx-chatgpt"
version = { workspace = true } version = { workspace = true }
[lints] [lints]
@@ -9,12 +9,12 @@ workspace = true
[dependencies] [dependencies]
anyhow = { workspace = true } anyhow = { workspace = true }
clap = { workspace = true, features = ["derive"] } clap = { workspace = true, features = ["derive"] }
codex-common = { workspace = true, features = ["cli"] } llmx-common = { workspace = true, features = ["cli"] }
codex-core = { workspace = true } llmx-core = { workspace = true }
serde = { workspace = true, features = ["derive"] } serde = { workspace = true, features = ["derive"] }
serde_json = { workspace = true } serde_json = { workspace = true }
tokio = { workspace = true, features = ["full"] } tokio = { workspace = true, features = ["full"] }
codex-git = { workspace = true } llmx-git = { workspace = true }
[dev-dependencies] [dev-dependencies]
tempfile = { workspace = true } tempfile = { workspace = true }

View File

@@ -1,9 +1,9 @@
use std::path::PathBuf; use std::path::PathBuf;
use clap::Parser; use clap::Parser;
use codex_common::CliConfigOverrides; use llmx_common::CliConfigOverrides;
use codex_core::config::Config; use llmx_core::config::Config;
use codex_core::config::ConfigOverrides; use llmx_core::config::ConfigOverrides;
use crate::chatgpt_token::init_chatgpt_token_from_auth; use crate::chatgpt_token::init_chatgpt_token_from_auth;
use crate::get_task::GetTaskResponse; use crate::get_task::GetTaskResponse;
@@ -59,13 +59,13 @@ pub async fn apply_diff_from_task(
async fn apply_diff(diff: &str, cwd: Option<PathBuf>) -> anyhow::Result<()> { async fn apply_diff(diff: &str, cwd: Option<PathBuf>) -> anyhow::Result<()> {
let cwd = cwd.unwrap_or(std::env::current_dir().unwrap_or_else(|_| std::env::temp_dir())); let cwd = cwd.unwrap_or(std::env::current_dir().unwrap_or_else(|_| std::env::temp_dir()));
let req = codex_git::ApplyGitRequest { let req = llmx_git::ApplyGitRequest {
cwd, cwd,
diff: diff.to_string(), diff: diff.to_string(),
revert: false, revert: false,
preflight: false, preflight: false,
}; };
let res = codex_git::apply_git_patch(&req)?; let res = llmx_git::apply_git_patch(&req)?;
if res.exit_code != 0 { if res.exit_code != 0 {
anyhow::bail!( anyhow::bail!(
"Git apply failed (applied={}, skipped={}, conflicts={})\nstdout:\n{}\nstderr:\n{}", "Git apply failed (applied={}, skipped={}, conflicts={})\nstdout:\n{}\nstderr:\n{}",

View File

@@ -1,5 +1,5 @@
use codex_core::config::Config; use llmx_core::config::Config;
use codex_core::default_client::create_client; use llmx_core::default_client::create_client;
use crate::chatgpt_token::get_chatgpt_token_data; use crate::chatgpt_token::get_chatgpt_token_data;
use crate::chatgpt_token::init_chatgpt_token_from_auth; use crate::chatgpt_token::init_chatgpt_token_from_auth;

View File

@@ -1,10 +1,10 @@
use codex_core::CodexAuth; use llmx_core::CodexAuth;
use std::path::Path; use std::path::Path;
use std::sync::LazyLock; use std::sync::LazyLock;
use std::sync::RwLock; use std::sync::RwLock;
use codex_core::auth::AuthCredentialsStoreMode; use llmx_core::auth::AuthCredentialsStoreMode;
use codex_core::token_data::TokenData; use llmx_core::token_data::TokenData;
static CHATGPT_TOKEN: LazyLock<RwLock<Option<TokenData>>> = LazyLock::new(|| RwLock::new(None)); static CHATGPT_TOKEN: LazyLock<RwLock<Option<TokenData>>> = LazyLock::new(|| RwLock::new(None));

View File

@@ -1,4 +1,4 @@
use codex_core::config::Config; use llmx_core::config::Config;
use serde::Deserialize; use serde::Deserialize;
use crate::chatgpt_client::chatgpt_get_request; use crate::chatgpt_client::chatgpt_get_request;

View File

@@ -1,5 +1,5 @@
use codex_chatgpt::apply_command::apply_diff_from_task; use llmx_chatgpt::apply_command::apply_diff_from_task;
use codex_chatgpt::get_task::GetTaskResponse; use llmx_chatgpt::get_task::GetTaskResponse;
use std::path::Path; use std::path::Path;
use tempfile::TempDir; use tempfile::TempDir;
use tokio::process::Command; use tokio::process::Command;

View File

@@ -1,14 +1,14 @@
[package] [package]
edition = "2024" edition = "2024"
name = "codex-cli" name = "llmx-cli"
version = { workspace = true } version = { workspace = true }
[[bin]] [[bin]]
name = "codex" name = "llmx"
path = "src/main.rs" path = "src/main.rs"
[lib] [lib]
name = "codex_cli" name = "llmx_cli"
path = "src/lib.rs" path = "src/lib.rs"
[lints] [lints]
@@ -18,22 +18,22 @@ workspace = true
anyhow = { workspace = true } anyhow = { workspace = true }
clap = { workspace = true, features = ["derive"] } clap = { workspace = true, features = ["derive"] }
clap_complete = { workspace = true } clap_complete = { workspace = true }
codex-app-server = { workspace = true } llmx-app-server = { workspace = true }
codex-app-server-protocol = { workspace = true } llmx-app-server-protocol = { workspace = true }
codex-arg0 = { workspace = true } llmx-arg0 = { workspace = true }
codex-chatgpt = { workspace = true } llmx-chatgpt = { workspace = true }
codex-cloud-tasks = { path = "../cloud-tasks" } llmx-cloud-tasks = { path = "../cloud-tasks" }
codex-common = { workspace = true, features = ["cli"] } llmx-common = { workspace = true, features = ["cli"] }
codex-core = { workspace = true } llmx-core = { workspace = true }
codex-exec = { workspace = true } llmx-exec = { workspace = true }
codex-login = { workspace = true } llmx-login = { workspace = true }
codex-mcp-server = { workspace = true } llmx-mcp-server = { workspace = true }
codex-process-hardening = { workspace = true } llmx-process-hardening = { workspace = true }
codex-protocol = { workspace = true } llmx-protocol = { workspace = true }
codex-responses-api-proxy = { workspace = true } llmx-responses-api-proxy = { workspace = true }
codex-rmcp-client = { workspace = true } llmx-rmcp-client = { workspace = true }
codex-stdio-to-uds = { workspace = true } llmx-stdio-to-uds = { workspace = true }
codex-tui = { workspace = true } llmx-tui = { workspace = true }
ctor = { workspace = true } ctor = { workspace = true }
libc = { workspace = true } libc = { workspace = true }
owo-colors = { workspace = true } owo-colors = { workspace = true }
@@ -51,7 +51,7 @@ tokio = { workspace = true, features = [
tracing = { workspace = true } tracing = { workspace = true }
[target.'cfg(target_os = "windows")'.dependencies] [target.'cfg(target_os = "windows")'.dependencies]
codex_windows_sandbox = { package = "codex-windows-sandbox", path = "../windows-sandbox-rs" } codex_windows_sandbox = { package = "llmx-windows-sandbox", path = "../windows-sandbox-rs" }
[dev-dependencies] [dev-dependencies]
assert_cmd = { workspace = true } assert_cmd = { workspace = true }

View File

@@ -5,15 +5,15 @@ mod seatbelt;
use std::path::PathBuf; use std::path::PathBuf;
use codex_common::CliConfigOverrides; use llmx_common::CliConfigOverrides;
use codex_core::config::Config; use llmx_core::config::Config;
use codex_core::config::ConfigOverrides; use llmx_core::config::ConfigOverrides;
use codex_core::exec_env::create_env; use llmx_core::exec_env::create_env;
use codex_core::landlock::spawn_command_under_linux_sandbox; use llmx_core::landlock::spawn_command_under_linux_sandbox;
#[cfg(target_os = "macos")] #[cfg(target_os = "macos")]
use codex_core::seatbelt::spawn_command_under_seatbelt; use llmx_core::seatbelt::spawn_command_under_seatbelt;
use codex_core::spawn::StdioPolicy; use llmx_core::spawn::StdioPolicy;
use codex_protocol::config_types::SandboxMode; use llmx_protocol::config_types::SandboxMode;
use crate::LandlockCommand; use crate::LandlockCommand;
use crate::SeatbeltCommand; use crate::SeatbeltCommand;
@@ -136,12 +136,12 @@ async fn run_command_under_sandbox(
if let SandboxType::Windows = sandbox_type { if let SandboxType::Windows = sandbox_type {
#[cfg(target_os = "windows")] #[cfg(target_os = "windows")]
{ {
use codex_windows_sandbox::run_windows_sandbox_capture; use llmx_windows_sandbox::run_windows_sandbox_capture;
let policy_str = match &config.sandbox_policy { let policy_str = match &config.sandbox_policy {
codex_core::protocol::SandboxPolicy::DangerFullAccess => "workspace-write", llmx_core::protocol::SandboxPolicy::DangerFullAccess => "workspace-write",
codex_core::protocol::SandboxPolicy::ReadOnly => "read-only", llmx_core::protocol::SandboxPolicy::ReadOnly => "read-only",
codex_core::protocol::SandboxPolicy::WorkspaceWrite { .. } => "workspace-write", llmx_core::protocol::SandboxPolicy::WorkspaceWrite { .. } => "workspace-write",
}; };
let sandbox_cwd = sandbox_policy_cwd.clone(); let sandbox_cwd = sandbox_policy_cwd.clone();

View File

@@ -3,7 +3,7 @@ mod exit_status;
pub mod login; pub mod login;
use clap::Parser; use clap::Parser;
use codex_common::CliConfigOverrides; use llmx_common::CliConfigOverrides;
#[derive(Debug, Parser)] #[derive(Debug, Parser)]
pub struct SeatbeltCommand { pub struct SeatbeltCommand {

View File

@@ -1,16 +1,16 @@
use codex_app_server_protocol::AuthMode; use llmx_app_server_protocol::AuthMode;
use codex_common::CliConfigOverrides; use llmx_common::CliConfigOverrides;
use codex_core::CodexAuth; use llmx_core::CodexAuth;
use codex_core::auth::AuthCredentialsStoreMode; use llmx_core::auth::AuthCredentialsStoreMode;
use codex_core::auth::CLIENT_ID; use llmx_core::auth::CLIENT_ID;
use codex_core::auth::login_with_api_key; use llmx_core::auth::login_with_api_key;
use codex_core::auth::logout; use llmx_core::auth::logout;
use codex_core::config::Config; use llmx_core::config::Config;
use codex_core::config::ConfigOverrides; use llmx_core::config::ConfigOverrides;
use codex_login::ServerOptions; use llmx_login::ServerOptions;
use codex_login::run_device_code_login; use llmx_login::run_device_code_login;
use codex_login::run_login_server; use llmx_login::run_login_server;
use codex_protocol::config_types::ForcedLoginMethod; use llmx_protocol::config_types::ForcedLoginMethod;
use std::io::IsTerminal; use std::io::IsTerminal;
use std::io::Read; use std::io::Read;
use std::path::PathBuf; use std::path::PathBuf;

View File

@@ -3,25 +3,25 @@ use clap::CommandFactory;
use clap::Parser; use clap::Parser;
use clap_complete::Shell; use clap_complete::Shell;
use clap_complete::generate; use clap_complete::generate;
use codex_arg0::arg0_dispatch_or_else; use llmx_arg0::arg0_dispatch_or_else;
use codex_chatgpt::apply_command::ApplyCommand; use llmx_chatgpt::apply_command::ApplyCommand;
use codex_chatgpt::apply_command::run_apply_command; use llmx_chatgpt::apply_command::run_apply_command;
use codex_cli::LandlockCommand; use llmx_cli::LandlockCommand;
use codex_cli::SeatbeltCommand; use llmx_cli::SeatbeltCommand;
use codex_cli::WindowsCommand; use llmx_cli::WindowsCommand;
use codex_cli::login::read_api_key_from_stdin; use llmx_cli::login::read_api_key_from_stdin;
use codex_cli::login::run_login_status; use llmx_cli::login::run_login_status;
use codex_cli::login::run_login_with_api_key; use llmx_cli::login::run_login_with_api_key;
use codex_cli::login::run_login_with_chatgpt; use llmx_cli::login::run_login_with_chatgpt;
use codex_cli::login::run_login_with_device_code; use llmx_cli::login::run_login_with_device_code;
use codex_cli::login::run_logout; use llmx_cli::login::run_logout;
use codex_cloud_tasks::Cli as CloudTasksCli; use llmx_cloud_tasks::Cli as CloudTasksCli;
use codex_common::CliConfigOverrides; use llmx_common::CliConfigOverrides;
use codex_exec::Cli as ExecCli; use llmx_exec::Cli as ExecCli;
use codex_responses_api_proxy::Args as ResponsesApiProxyArgs; use llmx_responses_api_proxy::Args as ResponsesApiProxyArgs;
use codex_tui::AppExitInfo; use llmx_tui::AppExitInfo;
use codex_tui::Cli as TuiCli; use llmx_tui::Cli as TuiCli;
use codex_tui::update_action::UpdateAction; use llmx_tui::update_action::UpdateAction;
use owo_colors::OwoColorize; use owo_colors::OwoColorize;
use std::path::PathBuf; use std::path::PathBuf;
use supports_color::Stream; use supports_color::Stream;
@@ -32,9 +32,9 @@ mod wsl_paths;
use crate::mcp_cmd::McpCli; use crate::mcp_cmd::McpCli;
use codex_core::config::Config; use llmx_core::config::Config;
use codex_core::config::ConfigOverrides; use llmx_core::config::ConfigOverrides;
use codex_core::features::is_known_feature_key; use llmx_core::features::is_known_feature_key;
/// Codex CLI /// Codex CLI
/// ///
@@ -259,7 +259,7 @@ fn format_exit_messages(exit_info: AppExitInfo, color_enabled: bool) -> Vec<Stri
let mut lines = vec![format!( let mut lines = vec![format!(
"{}", "{}",
codex_core::protocol::FinalOutput::from(token_usage) llmx_core::protocol::FinalOutput::from(token_usage)
)]; )];
if let Some(session_id) = conversation_id { if let Some(session_id) = conversation_id {
@@ -369,8 +369,8 @@ enum FeaturesSubcommand {
List, List,
} }
fn stage_str(stage: codex_core::features::Stage) -> &'static str { fn stage_str(stage: llmx_core::features::Stage) -> &'static str {
use codex_core::features::Stage; use llmx_core::features::Stage;
match stage { match stage {
Stage::Experimental => "experimental", Stage::Experimental => "experimental",
Stage::Beta => "beta", Stage::Beta => "beta",
@@ -385,7 +385,7 @@ fn stage_str(stage: codex_core::features::Stage) -> &'static str {
#[ctor::ctor] #[ctor::ctor]
#[cfg(not(debug_assertions))] #[cfg(not(debug_assertions))]
fn pre_main_hardening() { fn pre_main_hardening() {
codex_process_hardening::pre_main_hardening(); llmx_process_hardening::pre_main_hardening();
} }
fn main() -> anyhow::Result<()> { fn main() -> anyhow::Result<()> {
@@ -413,7 +413,7 @@ async fn cli_main(codex_linux_sandbox_exe: Option<PathBuf>) -> anyhow::Result<()
&mut interactive.config_overrides, &mut interactive.config_overrides,
root_config_overrides.clone(), root_config_overrides.clone(),
); );
let exit_info = codex_tui::run_main(interactive, codex_linux_sandbox_exe).await?; let exit_info = llmx_tui::run_main(interactive, codex_linux_sandbox_exe).await?;
handle_app_exit(exit_info)?; handle_app_exit(exit_info)?;
} }
Some(Subcommand::Exec(mut exec_cli)) => { Some(Subcommand::Exec(mut exec_cli)) => {
@@ -421,10 +421,10 @@ async fn cli_main(codex_linux_sandbox_exe: Option<PathBuf>) -> anyhow::Result<()
&mut exec_cli.config_overrides, &mut exec_cli.config_overrides,
root_config_overrides.clone(), root_config_overrides.clone(),
); );
codex_exec::run_main(exec_cli, codex_linux_sandbox_exe).await?; llmx_exec::run_main(exec_cli, codex_linux_sandbox_exe).await?;
} }
Some(Subcommand::McpServer) => { Some(Subcommand::McpServer) => {
codex_mcp_server::run_main(codex_linux_sandbox_exe, root_config_overrides).await?; llmx_mcp_server::run_main(codex_linux_sandbox_exe, root_config_overrides).await?;
} }
Some(Subcommand::Mcp(mut mcp_cli)) => { Some(Subcommand::Mcp(mut mcp_cli)) => {
// Propagate any root-level config overrides (e.g. `-c key=value`). // Propagate any root-level config overrides (e.g. `-c key=value`).
@@ -433,16 +433,16 @@ async fn cli_main(codex_linux_sandbox_exe: Option<PathBuf>) -> anyhow::Result<()
} }
Some(Subcommand::AppServer(app_server_cli)) => match app_server_cli.subcommand { Some(Subcommand::AppServer(app_server_cli)) => match app_server_cli.subcommand {
None => { None => {
codex_app_server::run_main(codex_linux_sandbox_exe, root_config_overrides).await?; llmx_app_server::run_main(codex_linux_sandbox_exe, root_config_overrides).await?;
} }
Some(AppServerSubcommand::GenerateTs(gen_cli)) => { Some(AppServerSubcommand::GenerateTs(gen_cli)) => {
codex_app_server_protocol::generate_ts( llmx_app_server_protocol::generate_ts(
&gen_cli.out_dir, &gen_cli.out_dir,
gen_cli.prettier.as_deref(), gen_cli.prettier.as_deref(),
)?; )?;
} }
Some(AppServerSubcommand::GenerateJsonSchema(gen_cli)) => { Some(AppServerSubcommand::GenerateJsonSchema(gen_cli)) => {
codex_app_server_protocol::generate_json(&gen_cli.out_dir)?; llmx_app_server_protocol::generate_json(&gen_cli.out_dir)?;
} }
}, },
Some(Subcommand::Resume(ResumeCommand { Some(Subcommand::Resume(ResumeCommand {
@@ -457,7 +457,7 @@ async fn cli_main(codex_linux_sandbox_exe: Option<PathBuf>) -> anyhow::Result<()
last, last,
config_overrides, config_overrides,
); );
let exit_info = codex_tui::run_main(interactive, codex_linux_sandbox_exe).await?; let exit_info = llmx_tui::run_main(interactive, codex_linux_sandbox_exe).await?;
handle_app_exit(exit_info)?; handle_app_exit(exit_info)?;
} }
Some(Subcommand::Login(mut login_cli)) => { Some(Subcommand::Login(mut login_cli)) => {
@@ -506,7 +506,7 @@ async fn cli_main(codex_linux_sandbox_exe: Option<PathBuf>) -> anyhow::Result<()
&mut cloud_cli.config_overrides, &mut cloud_cli.config_overrides,
root_config_overrides.clone(), root_config_overrides.clone(),
); );
codex_cloud_tasks::run_main(cloud_cli, codex_linux_sandbox_exe).await?; llmx_cloud_tasks::run_main(cloud_cli, codex_linux_sandbox_exe).await?;
} }
Some(Subcommand::Sandbox(sandbox_args)) => match sandbox_args.cmd { Some(Subcommand::Sandbox(sandbox_args)) => match sandbox_args.cmd {
SandboxCommand::Macos(mut seatbelt_cli) => { SandboxCommand::Macos(mut seatbelt_cli) => {
@@ -514,7 +514,7 @@ async fn cli_main(codex_linux_sandbox_exe: Option<PathBuf>) -> anyhow::Result<()
&mut seatbelt_cli.config_overrides, &mut seatbelt_cli.config_overrides,
root_config_overrides.clone(), root_config_overrides.clone(),
); );
codex_cli::debug_sandbox::run_command_under_seatbelt( llmx_cli::debug_sandbox::run_command_under_seatbelt(
seatbelt_cli, seatbelt_cli,
codex_linux_sandbox_exe, codex_linux_sandbox_exe,
) )
@@ -525,7 +525,7 @@ async fn cli_main(codex_linux_sandbox_exe: Option<PathBuf>) -> anyhow::Result<()
&mut landlock_cli.config_overrides, &mut landlock_cli.config_overrides,
root_config_overrides.clone(), root_config_overrides.clone(),
); );
codex_cli::debug_sandbox::run_command_under_landlock( llmx_cli::debug_sandbox::run_command_under_landlock(
landlock_cli, landlock_cli,
codex_linux_sandbox_exe, codex_linux_sandbox_exe,
) )
@@ -536,7 +536,7 @@ async fn cli_main(codex_linux_sandbox_exe: Option<PathBuf>) -> anyhow::Result<()
&mut windows_cli.config_overrides, &mut windows_cli.config_overrides,
root_config_overrides.clone(), root_config_overrides.clone(),
); );
codex_cli::debug_sandbox::run_command_under_windows( llmx_cli::debug_sandbox::run_command_under_windows(
windows_cli, windows_cli,
codex_linux_sandbox_exe, codex_linux_sandbox_exe,
) )
@@ -551,12 +551,12 @@ async fn cli_main(codex_linux_sandbox_exe: Option<PathBuf>) -> anyhow::Result<()
run_apply_command(apply_cli, None).await?; run_apply_command(apply_cli, None).await?;
} }
Some(Subcommand::ResponsesApiProxy(args)) => { Some(Subcommand::ResponsesApiProxy(args)) => {
tokio::task::spawn_blocking(move || codex_responses_api_proxy::run_main(args)) tokio::task::spawn_blocking(move || llmx_responses_api_proxy::run_main(args))
.await??; .await??;
} }
Some(Subcommand::StdioToUds(cmd)) => { Some(Subcommand::StdioToUds(cmd)) => {
let socket_path = cmd.socket_path; let socket_path = cmd.socket_path;
tokio::task::spawn_blocking(move || codex_stdio_to_uds::run(socket_path.as_path())) tokio::task::spawn_blocking(move || llmx_stdio_to_uds::run(socket_path.as_path()))
.await??; .await??;
} }
Some(Subcommand::Features(FeaturesCli { sub })) => match sub { Some(Subcommand::Features(FeaturesCli { sub })) => match sub {
@@ -581,7 +581,7 @@ async fn cli_main(codex_linux_sandbox_exe: Option<PathBuf>) -> anyhow::Result<()
}; };
let config = Config::load_with_cli_overrides(cli_kv_overrides, overrides).await?; let config = Config::load_with_cli_overrides(cli_kv_overrides, overrides).await?;
for def in codex_core::features::FEATURES.iter() { for def in llmx_core::features::FEATURES.iter() {
let name = def.key; let name = def.key;
let stage = stage_str(def.stage); let stage = stage_str(def.stage);
let enabled = config.features.enabled(def.id); let enabled = config.features.enabled(def.id);
@@ -686,8 +686,8 @@ fn print_completion(cmd: CompletionCommand) {
mod tests { mod tests {
use super::*; use super::*;
use assert_matches::assert_matches; use assert_matches::assert_matches;
use codex_core::protocol::TokenUsage; use llmx_core::protocol::TokenUsage;
use codex_protocol::ConversationId; use llmx_protocol::ConversationId;
use pretty_assertions::assert_eq; use pretty_assertions::assert_eq;
fn finalize_from_args(args: &[&str]) -> TuiCli { fn finalize_from_args(args: &[&str]) -> TuiCli {
@@ -824,11 +824,11 @@ mod tests {
assert_eq!(interactive.config_profile.as_deref(), Some("my-profile")); assert_eq!(interactive.config_profile.as_deref(), Some("my-profile"));
assert_matches!( assert_matches!(
interactive.sandbox_mode, interactive.sandbox_mode,
Some(codex_common::SandboxModeCliArg::WorkspaceWrite) Some(llmx_common::SandboxModeCliArg::WorkspaceWrite)
); );
assert_matches!( assert_matches!(
interactive.approval_policy, interactive.approval_policy,
Some(codex_common::ApprovalModeCliArg::OnRequest) Some(llmx_common::ApprovalModeCliArg::OnRequest)
); );
assert!(interactive.full_auto); assert!(interactive.full_auto);
assert_eq!( assert_eq!(

View File

@@ -5,21 +5,21 @@ use anyhow::Result;
use anyhow::anyhow; use anyhow::anyhow;
use anyhow::bail; use anyhow::bail;
use clap::ArgGroup; use clap::ArgGroup;
use codex_common::CliConfigOverrides; use llmx_common::CliConfigOverrides;
use codex_common::format_env_display::format_env_display; use llmx_common::format_env_display::format_env_display;
use codex_core::config::Config; use llmx_core::config::Config;
use codex_core::config::ConfigOverrides; use llmx_core::config::ConfigOverrides;
use codex_core::config::edit::ConfigEditsBuilder; use llmx_core::config::edit::ConfigEditsBuilder;
use codex_core::config::find_codex_home; use llmx_core::config::find_codex_home;
use codex_core::config::load_global_mcp_servers; use llmx_core::config::load_global_mcp_servers;
use codex_core::config::types::McpServerConfig; use llmx_core::config::types::McpServerConfig;
use codex_core::config::types::McpServerTransportConfig; use llmx_core::config::types::McpServerTransportConfig;
use codex_core::features::Feature; use llmx_core::features::Feature;
use codex_core::mcp::auth::compute_auth_statuses; use llmx_core::mcp::auth::compute_auth_statuses;
use codex_core::protocol::McpAuthStatus; use llmx_core::protocol::McpAuthStatus;
use codex_rmcp_client::delete_oauth_tokens; use llmx_rmcp_client::delete_oauth_tokens;
use codex_rmcp_client::perform_oauth_login; use llmx_rmcp_client::perform_oauth_login;
use codex_rmcp_client::supports_oauth_login; use llmx_rmcp_client::supports_oauth_login;
/// [experimental] Launch Codex as an MCP server or manage configured MCP servers. /// [experimental] Launch Codex as an MCP server or manage configured MCP servers.
/// ///

View File

@@ -1,8 +1,8 @@
use std::path::Path; use std::path::Path;
use anyhow::Result; use anyhow::Result;
use codex_core::config::load_global_mcp_servers; use llmx_core::config::load_global_mcp_servers;
use codex_core::config::types::McpServerTransportConfig; use llmx_core::config::types::McpServerTransportConfig;
use predicates::str::contains; use predicates::str::contains;
use pretty_assertions::assert_eq; use pretty_assertions::assert_eq;
use tempfile::TempDir; use tempfile::TempDir;

View File

@@ -1,9 +1,9 @@
use std::path::Path; use std::path::Path;
use anyhow::Result; use anyhow::Result;
use codex_core::config::edit::ConfigEditsBuilder; use llmx_core::config::edit::ConfigEditsBuilder;
use codex_core::config::load_global_mcp_servers; use llmx_core::config::load_global_mcp_servers;
use codex_core::config::types::McpServerTransportConfig; use llmx_core::config::types::McpServerTransportConfig;
use predicates::prelude::PredicateBooleanExt; use predicates::prelude::PredicateBooleanExt;
use predicates::str::contains; use predicates::str::contains;
use pretty_assertions::assert_eq; use pretty_assertions::assert_eq;

View File

@@ -1,10 +1,10 @@
[package] [package]
name = "codex-cloud-tasks-client" name = "llmx-cloud-tasks-client"
version = { workspace = true } version = { workspace = true }
edition = "2024" edition = "2024"
[lib] [lib]
name = "codex_cloud_tasks_client" name = "llmx_cloud_tasks_client"
path = "src/lib.rs" path = "src/lib.rs"
[lints] [lints]
@@ -12,7 +12,7 @@ workspace = true
[features] [features]
default = ["online"] default = ["online"]
online = ["dep:codex-backend-client"] online = ["dep:llmx-backend-client"]
mock = [] mock = []
[dependencies] [dependencies]
@@ -23,5 +23,5 @@ diffy = "0.4.2"
serde = { version = "1", features = ["derive"] } serde = { version = "1", features = ["derive"] }
serde_json = "1" serde_json = "1"
thiserror = "2.0.17" thiserror = "2.0.17"
codex-backend-client = { path = "../backend-client", optional = true } llmx-backend-client = { path = "../backend-client", optional = true }
codex-git = { workspace = true } llmx-git = { workspace = true }

View File

@@ -13,8 +13,8 @@ use crate::api::TaskText;
use chrono::DateTime; use chrono::DateTime;
use chrono::Utc; use chrono::Utc;
use codex_backend_client as backend; use llmx_backend_client as backend;
use codex_backend_client::CodeTaskDetailsResponseExt; use llmx_backend_client::CodeTaskDetailsResponseExt;
#[derive(Clone)] #[derive(Clone)]
pub struct HttpClient { pub struct HttpClient {
@@ -362,13 +362,13 @@ mod api {
}); });
} }
let req = codex_git::ApplyGitRequest { let req = llmx_git::ApplyGitRequest {
cwd: std::env::current_dir().unwrap_or_else(|_| std::env::temp_dir()), cwd: std::env::current_dir().unwrap_or_else(|_| std::env::temp_dir()),
diff: diff.clone(), diff: diff.clone(),
revert: false, revert: false,
preflight, preflight,
}; };
let r = codex_git::apply_git_patch(&req) let r = llmx_git::apply_git_patch(&req)
.map_err(|e| CloudTaskError::Io(format!("git apply failed to run: {e}")))?; .map_err(|e| CloudTaskError::Io(format!("git apply failed to run: {e}")))?;
let status = if r.exit_code == 0 { let status = if r.exit_code == 0 {

View File

@@ -1,10 +1,10 @@
[package] [package]
edition = "2024" edition = "2024"
name = "codex-cloud-tasks" name = "llmx-cloud-tasks"
version = { workspace = true } version = { workspace = true }
[lib] [lib]
name = "codex_cloud_tasks" name = "llmx_cloud_tasks"
path = "src/lib.rs" path = "src/lib.rs"
[lints] [lints]
@@ -15,14 +15,14 @@ anyhow = { workspace = true }
base64 = { workspace = true } base64 = { workspace = true }
chrono = { workspace = true, features = ["serde"] } chrono = { workspace = true, features = ["serde"] }
clap = { workspace = true, features = ["derive"] } clap = { workspace = true, features = ["derive"] }
codex-cloud-tasks-client = { path = "../cloud-tasks-client", features = [ llmx-cloud-tasks-client = { path = "../cloud-tasks-client", features = [
"mock", "mock",
"online", "online",
] } ] }
codex-common = { path = "../common", features = ["cli"] } llmx-common = { path = "../common", features = ["cli"] }
codex-core = { path = "../core" } llmx-core = { path = "../core" }
codex-login = { path = "../login" } llmx-login = { path = "../login" }
codex-tui = { path = "../tui" } llmx-tui = { path = "../tui" }
crossterm = { workspace = true, features = ["event-stream"] } crossterm = { workspace = true, features = ["event-stream"] }
ratatui = { workspace = true } ratatui = { workspace = true }
reqwest = { workspace = true, features = ["json"] } reqwest = { workspace = true, features = ["json"] }

View File

@@ -40,9 +40,9 @@ pub struct ApplyModalState {
} }
use crate::scrollable_diff::ScrollableDiff; use crate::scrollable_diff::ScrollableDiff;
use codex_cloud_tasks_client::CloudBackend; use llmx_cloud_tasks_client::CloudBackend;
use codex_cloud_tasks_client::TaskId; use llmx_cloud_tasks_client::TaskId;
use codex_cloud_tasks_client::TaskSummary; use llmx_cloud_tasks_client::TaskSummary;
#[derive(Default)] #[derive(Default)]
pub struct App { pub struct App {
pub tasks: Vec<TaskSummary>, pub tasks: Vec<TaskSummary>,
@@ -148,7 +148,7 @@ pub struct DiffOverlay {
#[derive(Clone, Debug, Default)] #[derive(Clone, Debug, Default)]
pub struct AttemptView { pub struct AttemptView {
pub turn_id: Option<String>, pub turn_id: Option<String>,
pub status: codex_cloud_tasks_client::AttemptStatus, pub status: llmx_cloud_tasks_client::AttemptStatus,
pub attempt_placement: Option<i64>, pub attempt_placement: Option<i64>,
pub diff_lines: Vec<String>, pub diff_lines: Vec<String>,
pub text_lines: Vec<String>, pub text_lines: Vec<String>,
@@ -316,7 +316,7 @@ pub enum AppEvent {
turn_id: Option<String>, turn_id: Option<String>,
sibling_turn_ids: Vec<String>, sibling_turn_ids: Vec<String>,
attempt_placement: Option<i64>, attempt_placement: Option<i64>,
attempt_status: codex_cloud_tasks_client::AttemptStatus, attempt_status: llmx_cloud_tasks_client::AttemptStatus,
}, },
DetailsFailed { DetailsFailed {
id: TaskId, id: TaskId,
@@ -325,10 +325,10 @@ pub enum AppEvent {
}, },
AttemptsLoaded { AttemptsLoaded {
id: TaskId, id: TaskId,
attempts: Vec<codex_cloud_tasks_client::TurnAttempt>, attempts: Vec<llmx_cloud_tasks_client::TurnAttempt>,
}, },
/// Background completion of new task submission /// Background completion of new task submission
NewTaskSubmitted(Result<codex_cloud_tasks_client::CreatedTask, String>), NewTaskSubmitted(Result<llmx_cloud_tasks_client::CreatedTask, String>),
/// Background completion of apply preflight when opening modal or on demand /// Background completion of apply preflight when opening modal or on demand
ApplyPreflightFinished { ApplyPreflightFinished {
id: TaskId, id: TaskId,
@@ -341,7 +341,7 @@ pub enum AppEvent {
/// Background completion of apply action (actual patch application) /// Background completion of apply action (actual patch application)
ApplyFinished { ApplyFinished {
id: TaskId, id: TaskId,
result: std::result::Result<codex_cloud_tasks_client::ApplyOutcome, String>, result: std::result::Result<llmx_cloud_tasks_client::ApplyOutcome, String>,
}, },
} }
@@ -357,11 +357,11 @@ mod tests {
} }
#[async_trait::async_trait] #[async_trait::async_trait]
impl codex_cloud_tasks_client::CloudBackend for FakeBackend { impl llmx_cloud_tasks_client::CloudBackend for FakeBackend {
async fn list_tasks( async fn list_tasks(
&self, &self,
env: Option<&str>, env: Option<&str>,
) -> codex_cloud_tasks_client::Result<Vec<TaskSummary>> { ) -> llmx_cloud_tasks_client::Result<Vec<TaskSummary>> {
let key = env.map(str::to_string); let key = env.map(str::to_string);
let titles = self let titles = self
.by_env .by_env
@@ -373,11 +373,11 @@ mod tests {
out.push(TaskSummary { out.push(TaskSummary {
id: TaskId(format!("T-{i}")), id: TaskId(format!("T-{i}")),
title: t.to_string(), title: t.to_string(),
status: codex_cloud_tasks_client::TaskStatus::Ready, status: llmx_cloud_tasks_client::TaskStatus::Ready,
updated_at: Utc::now(), updated_at: Utc::now(),
environment_id: env.map(str::to_string), environment_id: env.map(str::to_string),
environment_label: None, environment_label: None,
summary: codex_cloud_tasks_client::DiffSummary::default(), summary: llmx_cloud_tasks_client::DiffSummary::default(),
is_review: false, is_review: false,
attempt_total: Some(1), attempt_total: Some(1),
}); });
@@ -388,8 +388,8 @@ mod tests {
async fn get_task_diff( async fn get_task_diff(
&self, &self,
_id: TaskId, _id: TaskId,
) -> codex_cloud_tasks_client::Result<Option<String>> { ) -> llmx_cloud_tasks_client::Result<Option<String>> {
Err(codex_cloud_tasks_client::CloudTaskError::Unimplemented( Err(llmx_cloud_tasks_client::CloudTaskError::Unimplemented(
"not used in test", "not used in test",
)) ))
} }
@@ -397,20 +397,20 @@ mod tests {
async fn get_task_messages( async fn get_task_messages(
&self, &self,
_id: TaskId, _id: TaskId,
) -> codex_cloud_tasks_client::Result<Vec<String>> { ) -> llmx_cloud_tasks_client::Result<Vec<String>> {
Ok(vec![]) Ok(vec![])
} }
async fn get_task_text( async fn get_task_text(
&self, &self,
_id: TaskId, _id: TaskId,
) -> codex_cloud_tasks_client::Result<codex_cloud_tasks_client::TaskText> { ) -> llmx_cloud_tasks_client::Result<llmx_cloud_tasks_client::TaskText> {
Ok(codex_cloud_tasks_client::TaskText { Ok(llmx_cloud_tasks_client::TaskText {
prompt: Some("Example prompt".to_string()), prompt: Some("Example prompt".to_string()),
messages: Vec::new(), messages: Vec::new(),
turn_id: Some("fake-turn".to_string()), turn_id: Some("fake-turn".to_string()),
sibling_turn_ids: Vec::new(), sibling_turn_ids: Vec::new(),
attempt_placement: Some(0), attempt_placement: Some(0),
attempt_status: codex_cloud_tasks_client::AttemptStatus::Completed, attempt_status: llmx_cloud_tasks_client::AttemptStatus::Completed,
}) })
} }
@@ -418,7 +418,7 @@ mod tests {
&self, &self,
_task: TaskId, _task: TaskId,
_turn_id: String, _turn_id: String,
) -> codex_cloud_tasks_client::Result<Vec<codex_cloud_tasks_client::TurnAttempt>> { ) -> llmx_cloud_tasks_client::Result<Vec<llmx_cloud_tasks_client::TurnAttempt>> {
Ok(Vec::new()) Ok(Vec::new())
} }
@@ -426,8 +426,8 @@ mod tests {
&self, &self,
_id: TaskId, _id: TaskId,
_diff_override: Option<String>, _diff_override: Option<String>,
) -> codex_cloud_tasks_client::Result<codex_cloud_tasks_client::ApplyOutcome> { ) -> llmx_cloud_tasks_client::Result<llmx_cloud_tasks_client::ApplyOutcome> {
Err(codex_cloud_tasks_client::CloudTaskError::Unimplemented( Err(llmx_cloud_tasks_client::CloudTaskError::Unimplemented(
"not used in test", "not used in test",
)) ))
} }
@@ -436,8 +436,8 @@ mod tests {
&self, &self,
_id: TaskId, _id: TaskId,
_diff_override: Option<String>, _diff_override: Option<String>,
) -> codex_cloud_tasks_client::Result<codex_cloud_tasks_client::ApplyOutcome> { ) -> llmx_cloud_tasks_client::Result<llmx_cloud_tasks_client::ApplyOutcome> {
Err(codex_cloud_tasks_client::CloudTaskError::Unimplemented( Err(llmx_cloud_tasks_client::CloudTaskError::Unimplemented(
"not used in test", "not used in test",
)) ))
} }
@@ -449,8 +449,8 @@ mod tests {
_git_ref: &str, _git_ref: &str,
_qa_mode: bool, _qa_mode: bool,
_best_of_n: usize, _best_of_n: usize,
) -> codex_cloud_tasks_client::Result<codex_cloud_tasks_client::CreatedTask> { ) -> llmx_cloud_tasks_client::Result<llmx_cloud_tasks_client::CreatedTask> {
Err(codex_cloud_tasks_client::CloudTaskError::Unimplemented( Err(llmx_cloud_tasks_client::CloudTaskError::Unimplemented(
"not used in test", "not used in test",
)) ))
} }

View File

@@ -1,6 +1,6 @@
use clap::Args; use clap::Args;
use clap::Parser; use clap::Parser;
use codex_common::CliConfigOverrides; use llmx_common::CliConfigOverrides;
#[derive(Parser, Debug, Default)] #[derive(Parser, Debug, Default)]
#[command(version)] #[command(version)]

View File

@@ -8,7 +8,7 @@ pub mod util;
pub use cli::Cli; pub use cli::Cli;
use anyhow::anyhow; use anyhow::anyhow;
use codex_login::AuthManager; use llmx_login::AuthManager;
use std::io::IsTerminal; use std::io::IsTerminal;
use std::io::Read; use std::io::Read;
use std::path::PathBuf; use std::path::PathBuf;
@@ -22,12 +22,12 @@ use util::append_error_log;
use util::set_user_agent_suffix; use util::set_user_agent_suffix;
struct ApplyJob { struct ApplyJob {
task_id: codex_cloud_tasks_client::TaskId, task_id: llmx_cloud_tasks_client::TaskId,
diff_override: Option<String>, diff_override: Option<String>,
} }
struct BackendContext { struct BackendContext {
backend: Arc<dyn codex_cloud_tasks_client::CloudBackend>, backend: Arc<dyn llmx_cloud_tasks_client::CloudBackend>,
base_url: String, base_url: String,
} }
@@ -43,13 +43,13 @@ async fn init_backend(user_agent_suffix: &str) -> anyhow::Result<BackendContext>
if use_mock { if use_mock {
return Ok(BackendContext { return Ok(BackendContext {
backend: Arc::new(codex_cloud_tasks_client::MockClient), backend: Arc::new(llmx_cloud_tasks_client::MockClient),
base_url, base_url,
}); });
} }
let ua = codex_core::default_client::get_codex_user_agent(); let ua = llmx_core::default_client::get_codex_user_agent();
let mut http = codex_cloud_tasks_client::HttpClient::new(base_url.clone())?.with_user_agent(ua); let mut http = llmx_cloud_tasks_client::HttpClient::new(base_url.clone())?.with_user_agent(ua);
let style = if base_url.contains("/backend-api") { let style = if base_url.contains("/backend-api") {
"wham" "wham"
} else { } else {
@@ -106,7 +106,7 @@ async fn run_exec_command(args: crate::cli::ExecCommand) -> anyhow::Result<()> {
let ctx = init_backend("codex_cloud_tasks_exec").await?; let ctx = init_backend("codex_cloud_tasks_exec").await?;
let prompt = resolve_query_input(query)?; let prompt = resolve_query_input(query)?;
let env_id = resolve_environment_id(&ctx, &environment).await?; let env_id = resolve_environment_id(&ctx, &environment).await?;
let created = codex_cloud_tasks_client::CloudBackend::create_task( let created = llmx_cloud_tasks_client::CloudBackend::create_task(
&*ctx.backend, &*ctx.backend,
&env_id, &env_id,
&prompt, &prompt,
@@ -192,17 +192,17 @@ fn resolve_query_input(query_arg: Option<String>) -> anyhow::Result<String> {
} }
} }
fn level_from_status(status: codex_cloud_tasks_client::ApplyStatus) -> app::ApplyResultLevel { fn level_from_status(status: llmx_cloud_tasks_client::ApplyStatus) -> app::ApplyResultLevel {
match status { match status {
codex_cloud_tasks_client::ApplyStatus::Success => app::ApplyResultLevel::Success, llmx_cloud_tasks_client::ApplyStatus::Success => app::ApplyResultLevel::Success,
codex_cloud_tasks_client::ApplyStatus::Partial => app::ApplyResultLevel::Partial, llmx_cloud_tasks_client::ApplyStatus::Partial => app::ApplyResultLevel::Partial,
codex_cloud_tasks_client::ApplyStatus::Error => app::ApplyResultLevel::Error, llmx_cloud_tasks_client::ApplyStatus::Error => app::ApplyResultLevel::Error,
} }
} }
fn spawn_preflight( fn spawn_preflight(
app: &mut app::App, app: &mut app::App,
backend: &Arc<dyn codex_cloud_tasks_client::CloudBackend>, backend: &Arc<dyn llmx_cloud_tasks_client::CloudBackend>,
tx: &UnboundedSender<app::AppEvent>, tx: &UnboundedSender<app::AppEvent>,
frame_tx: &UnboundedSender<Instant>, frame_tx: &UnboundedSender<Instant>,
title: String, title: String,
@@ -227,7 +227,7 @@ fn spawn_preflight(
task_id, task_id,
diff_override, diff_override,
} = job; } = job;
let result = codex_cloud_tasks_client::CloudBackend::apply_task_preflight( let result = llmx_cloud_tasks_client::CloudBackend::apply_task_preflight(
&*backend, &*backend,
task_id.clone(), task_id.clone(),
diff_override, diff_override,
@@ -264,7 +264,7 @@ fn spawn_preflight(
fn spawn_apply( fn spawn_apply(
app: &mut app::App, app: &mut app::App,
backend: &Arc<dyn codex_cloud_tasks_client::CloudBackend>, backend: &Arc<dyn llmx_cloud_tasks_client::CloudBackend>,
tx: &UnboundedSender<app::AppEvent>, tx: &UnboundedSender<app::AppEvent>,
frame_tx: &UnboundedSender<Instant>, frame_tx: &UnboundedSender<Instant>,
job: ApplyJob, job: ApplyJob,
@@ -288,7 +288,7 @@ fn spawn_apply(
task_id, task_id,
diff_override, diff_override,
} = job; } = job;
let result = codex_cloud_tasks_client::CloudBackend::apply_task( let result = llmx_cloud_tasks_client::CloudBackend::apply_task(
&*backend, &*backend,
task_id.clone(), task_id.clone(),
diff_override, diff_override,
@@ -384,7 +384,7 @@ pub async fn run_main(cli: Cli, _codex_linux_sandbox_exe: Option<PathBuf>) -> an
append_error_log(format!( append_error_log(format!(
"startup: wham_force_internal={} ua={}", "startup: wham_force_internal={} ua={}",
force_internal, force_internal,
codex_core::default_client::get_codex_user_agent() llmx_core::default_client::get_codex_user_agent()
)); ));
// Non-blocking initial load so the in-box spinner can animate // Non-blocking initial load so the in-box spinner can animate
app.status = "Loading tasks…".to_string(); app.status = "Loading tasks…".to_string();
@@ -509,7 +509,7 @@ pub async fn run_main(cli: Cli, _codex_linux_sandbox_exe: Option<PathBuf>) -> an
if let Some(page) = app.new_task.as_mut() { if let Some(page) = app.new_task.as_mut() {
if page.composer.flush_paste_burst_if_due() { needs_redraw = true; } if page.composer.flush_paste_burst_if_due() { needs_redraw = true; }
if page.composer.is_in_paste_burst() { if page.composer.is_in_paste_burst() {
let _ = frame_tx.send(Instant::now() + codex_tui::ComposerInput::recommended_flush_delay()); let _ = frame_tx.send(Instant::now() + llmx_tui::ComposerInput::recommended_flush_delay());
} }
} }
// Keep spinner pulsing only while loading. // Keep spinner pulsing only while loading.
@@ -742,7 +742,7 @@ pub async fn run_main(cli: Cli, _codex_linux_sandbox_exe: Option<PathBuf>) -> an
let tx = tx.clone(); let tx = tx.clone();
let task_id = id.clone(); let task_id = id.clone();
tokio::spawn(async move { tokio::spawn(async move {
match codex_cloud_tasks_client::CloudBackend::list_sibling_attempts( match llmx_cloud_tasks_client::CloudBackend::list_sibling_attempts(
&*backend, &*backend,
task_id.clone(), task_id.clone(),
turn_id, turn_id,
@@ -871,7 +871,7 @@ pub async fn run_main(cli: Cli, _codex_linux_sandbox_exe: Option<PathBuf>) -> an
match result { match result {
Ok(outcome) => { Ok(outcome) => {
app.status = outcome.message.clone(); app.status = outcome.message.clone();
if matches!(outcome.status, codex_cloud_tasks_client::ApplyStatus::Success) { if matches!(outcome.status, llmx_cloud_tasks_client::ApplyStatus::Success) {
app.apply_modal = None; app.apply_modal = None;
app.diff_overlay = None; app.diff_overlay = None;
// Refresh tasks after successful apply // Refresh tasks after successful apply
@@ -1070,7 +1070,7 @@ pub async fn run_main(cli: Cli, _codex_linux_sandbox_exe: Option<PathBuf>) -> an
_ => { _ => {
if page.submitting { if page.submitting {
// Ignore input while submitting // Ignore input while submitting
} else if let codex_tui::ComposerAction::Submitted(text) = page.composer.input(key) { } else if let llmx_tui::ComposerAction::Submitted(text) = page.composer.input(key) {
// Submit only if we have an env id // Submit only if we have an env id
if let Some(env) = page.env_id.clone() { if let Some(env) = page.env_id.clone() {
append_error_log(format!( append_error_log(format!(
@@ -1085,9 +1085,9 @@ pub async fn run_main(cli: Cli, _codex_linux_sandbox_exe: Option<PathBuf>) -> an
let best_of_n = page.best_of_n; let best_of_n = page.best_of_n;
tokio::spawn(async move { tokio::spawn(async move {
let git_ref = if let Ok(cwd) = std::env::current_dir() { let git_ref = if let Ok(cwd) = std::env::current_dir() {
if let Some(branch) = codex_core::git_info::default_branch_name(&cwd).await { if let Some(branch) = llmx_core::git_info::default_branch_name(&cwd).await {
branch branch
} else if let Some(branch) = codex_core::git_info::current_branch_name(&cwd).await { } else if let Some(branch) = llmx_core::git_info::current_branch_name(&cwd).await {
branch branch
} else { } else {
"main".to_string() "main".to_string()
@@ -1096,7 +1096,7 @@ pub async fn run_main(cli: Cli, _codex_linux_sandbox_exe: Option<PathBuf>) -> an
"main".to_string() "main".to_string()
}; };
let result = codex_cloud_tasks_client::CloudBackend::create_task(&*backend, &env, &text, &git_ref, false, best_of_n).await; let result = llmx_cloud_tasks_client::CloudBackend::create_task(&*backend, &env, &text, &git_ref, false, best_of_n).await;
let evt = match result { let evt = match result {
Ok(ok) => app::AppEvent::NewTaskSubmitted(Ok(ok)), Ok(ok) => app::AppEvent::NewTaskSubmitted(Ok(ok)),
Err(e) => app::AppEvent::NewTaskSubmitted(Err(format!("{e}"))), Err(e) => app::AppEvent::NewTaskSubmitted(Err(format!("{e}"))),
@@ -1110,7 +1110,7 @@ pub async fn run_main(cli: Cli, _codex_linux_sandbox_exe: Option<PathBuf>) -> an
needs_redraw = true; needs_redraw = true;
// If pasteburst is active, schedule a microflush frame. // If pasteburst is active, schedule a microflush frame.
if page.composer.is_in_paste_burst() { if page.composer.is_in_paste_burst() {
let _ = frame_tx.send(Instant::now() + codex_tui::ComposerInput::recommended_flush_delay()); let _ = frame_tx.send(Instant::now() + llmx_tui::ComposerInput::recommended_flush_delay());
} }
// Always schedule an immediate redraw for key edits in the composer. // Always schedule an immediate redraw for key edits in the composer.
let _ = frame_tx.send(Instant::now()); let _ = frame_tx.send(Instant::now());
@@ -1449,12 +1449,12 @@ pub async fn run_main(cli: Cli, _codex_linux_sandbox_exe: Option<PathBuf>) -> an
let diff_id = id.clone(); let diff_id = id.clone();
let diff_title = title.clone(); let diff_title = title.clone();
tokio::spawn(async move { tokio::spawn(async move {
match codex_cloud_tasks_client::CloudBackend::get_task_diff(&*backend, diff_id.clone()).await { match llmx_cloud_tasks_client::CloudBackend::get_task_diff(&*backend, diff_id.clone()).await {
Ok(Some(diff)) => { Ok(Some(diff)) => {
let _ = tx.send(app::AppEvent::DetailsDiffLoaded { id: diff_id, title: diff_title, diff }); let _ = tx.send(app::AppEvent::DetailsDiffLoaded { id: diff_id, title: diff_title, diff });
} }
Ok(None) => { Ok(None) => {
match codex_cloud_tasks_client::CloudBackend::get_task_text(&*backend, diff_id.clone()).await { match llmx_cloud_tasks_client::CloudBackend::get_task_text(&*backend, diff_id.clone()).await {
Ok(text) => { Ok(text) => {
let evt = app::AppEvent::DetailsMessagesLoaded { let evt = app::AppEvent::DetailsMessagesLoaded {
id: diff_id, id: diff_id,
@@ -1475,7 +1475,7 @@ pub async fn run_main(cli: Cli, _codex_linux_sandbox_exe: Option<PathBuf>) -> an
} }
Err(e) => { Err(e) => {
append_error_log(format!("get_task_diff failed for {}: {e}", diff_id.0)); append_error_log(format!("get_task_diff failed for {}: {e}", diff_id.0));
match codex_cloud_tasks_client::CloudBackend::get_task_text(&*backend, diff_id.clone()).await { match llmx_cloud_tasks_client::CloudBackend::get_task_text(&*backend, diff_id.clone()).await {
Ok(text) => { Ok(text) => {
let evt = app::AppEvent::DetailsMessagesLoaded { let evt = app::AppEvent::DetailsMessagesLoaded {
id: diff_id, id: diff_id,
@@ -1504,7 +1504,7 @@ pub async fn run_main(cli: Cli, _codex_linux_sandbox_exe: Option<PathBuf>) -> an
let msg_id = id; let msg_id = id;
let msg_title = title; let msg_title = title;
tokio::spawn(async move { tokio::spawn(async move {
if let Ok(text) = codex_cloud_tasks_client::CloudBackend::get_task_text(&*backend, msg_id.clone()).await { if let Ok(text) = llmx_cloud_tasks_client::CloudBackend::get_task_text(&*backend, msg_id.clone()).await {
let evt = app::AppEvent::DetailsMessagesLoaded { let evt = app::AppEvent::DetailsMessagesLoaded {
id: msg_id, id: msg_id,
title: msg_title, title: msg_title,
@@ -1531,7 +1531,7 @@ pub async fn run_main(cli: Cli, _codex_linux_sandbox_exe: Option<PathBuf>) -> an
} }
if let Some(task) = app.tasks.get(app.selected).cloned() { if let Some(task) = app.tasks.get(app.selected).cloned() {
match codex_cloud_tasks_client::CloudBackend::get_task_diff(&*backend, task.id.clone()).await { match llmx_cloud_tasks_client::CloudBackend::get_task_diff(&*backend, task.id.clone()).await {
Ok(Some(diff)) => { Ok(Some(diff)) => {
let diff_override = Some(diff.clone()); let diff_override = Some(diff.clone());
let task_id = task.id.clone(); let task_id = task.id.clone();
@@ -1712,8 +1712,8 @@ fn pretty_lines_from_error(raw: &str) -> Vec<String> {
#[cfg(test)] #[cfg(test)]
mod tests { mod tests {
use codex_tui::ComposerAction; use llmx_tui::ComposerAction;
use codex_tui::ComposerInput; use llmx_tui::ComposerInput;
use crossterm::event::KeyCode; use crossterm::event::KeyCode;
use crossterm::event::KeyEvent; use crossterm::event::KeyEvent;
use crossterm::event::KeyModifiers; use crossterm::event::KeyModifiers;

View File

@@ -1,4 +1,4 @@
use codex_tui::ComposerInput; use llmx_tui::ComposerInput;
pub struct NewTaskPage { pub struct NewTaskPage {
pub composer: ComposerInput, pub composer: ComposerInput,

View File

@@ -22,9 +22,9 @@ use crate::app::App;
use crate::app::AttemptView; use crate::app::AttemptView;
use chrono::Local; use chrono::Local;
use chrono::Utc; use chrono::Utc;
use codex_cloud_tasks_client::AttemptStatus; use llmx_cloud_tasks_client::AttemptStatus;
use codex_cloud_tasks_client::TaskStatus; use llmx_cloud_tasks_client::TaskStatus;
use codex_tui::render_markdown_text; use llmx_tui::render_markdown_text;
pub fn draw(frame: &mut Frame, app: &mut App) { pub fn draw(frame: &mut Frame, app: &mut App) {
let area = frame.area(); let area = frame.area();
@@ -783,7 +783,7 @@ fn style_diff_line(raw: &str) -> Line<'static> {
Line::from(vec![Span::raw(raw.to_string())]) Line::from(vec![Span::raw(raw.to_string())])
} }
fn render_task_item(_app: &App, t: &codex_cloud_tasks_client::TaskSummary) -> ListItem<'static> { fn render_task_item(_app: &App, t: &llmx_cloud_tasks_client::TaskSummary) -> ListItem<'static> {
let status = match t.status { let status = match t.status {
TaskStatus::Ready => "READY".green(), TaskStatus::Ready => "READY".green(),
TaskStatus::Pending => "PENDING".magenta(), TaskStatus::Pending => "PENDING".magenta(),

View File

@@ -2,12 +2,12 @@ use base64::Engine as _;
use chrono::Utc; use chrono::Utc;
use reqwest::header::HeaderMap; use reqwest::header::HeaderMap;
use codex_core::config::Config; use llmx_core::config::Config;
use codex_core::config::ConfigOverrides; use llmx_core::config::ConfigOverrides;
use codex_login::AuthManager; use llmx_login::AuthManager;
pub fn set_user_agent_suffix(suffix: &str) { pub fn set_user_agent_suffix(suffix: &str) {
if let Ok(mut guard) = codex_core::default_client::USER_AGENT_SUFFIX.lock() { if let Ok(mut guard) = llmx_core::default_client::USER_AGENT_SUFFIX.lock() {
guard.replace(suffix.to_string()); guard.replace(suffix.to_string());
} }
} }
@@ -79,7 +79,7 @@ pub async fn build_chatgpt_headers() -> HeaderMap {
use reqwest::header::USER_AGENT; use reqwest::header::USER_AGENT;
set_user_agent_suffix("codex_cloud_tasks_tui"); set_user_agent_suffix("codex_cloud_tasks_tui");
let ua = codex_core::default_client::get_codex_user_agent(); let ua = llmx_core::default_client::get_codex_user_agent();
let mut headers = HeaderMap::new(); let mut headers = HeaderMap::new();
headers.insert( headers.insert(
USER_AGENT, USER_AGENT,

View File

@@ -1,5 +1,5 @@
use codex_cloud_tasks_client::CloudBackend; use llmx_cloud_tasks_client::CloudBackend;
use codex_cloud_tasks_client::MockClient; use llmx_cloud_tasks_client::MockClient;
#[tokio::test] #[tokio::test]
async fn mock_backend_varies_by_env() { async fn mock_backend_varies_by_env() {

View File

@@ -1,6 +1,6 @@
[package] [package]
edition = "2024" edition = "2024"
name = "codex-common" name = "llmx-common"
version = { workspace = true } version = { workspace = true }
[lints] [lints]
@@ -8,9 +8,9 @@ workspace = true
[dependencies] [dependencies]
clap = { workspace = true, features = ["derive", "wrap_help"], optional = true } clap = { workspace = true, features = ["derive", "wrap_help"], optional = true }
codex-core = { workspace = true } llmx-core = { workspace = true }
codex-protocol = { workspace = true } llmx-protocol = { workspace = true }
codex-app-server-protocol = { workspace = true } llmx-app-server-protocol = { workspace = true }
serde = { workspace = true, optional = true } serde = { workspace = true, optional = true }
toml = { workspace = true, optional = true } toml = { workspace = true, optional = true }

View File

@@ -3,7 +3,7 @@
use clap::ValueEnum; use clap::ValueEnum;
use codex_core::protocol::AskForApproval; use llmx_core::protocol::AskForApproval;
#[derive(Clone, Copy, Debug, ValueEnum)] #[derive(Clone, Copy, Debug, ValueEnum)]
#[value(rename_all = "kebab-case")] #[value(rename_all = "kebab-case")]

View File

@@ -1,5 +1,5 @@
use codex_core::protocol::AskForApproval; use llmx_core::protocol::AskForApproval;
use codex_core::protocol::SandboxPolicy; use llmx_core::protocol::SandboxPolicy;
/// A simple preset pairing an approval policy with a sandbox policy. /// A simple preset pairing an approval policy with a sandbox policy.
#[derive(Debug, Clone)] #[derive(Debug, Clone)]

View File

@@ -1,5 +1,5 @@
use codex_core::WireApi; use llmx_core::WireApi;
use codex_core::config::Config; use llmx_core::config::Config;
use crate::sandbox_summary::summarize_sandbox_policy; use crate::sandbox_summary::summarize_sandbox_policy;

View File

@@ -1,5 +1,5 @@
use codex_app_server_protocol::AuthMode; use llmx_app_server_protocol::AuthMode;
use codex_core::protocol_config_types::ReasoningEffort; use llmx_core::protocol_config_types::ReasoningEffort;
/// A reasoning effort option that can be surfaced for a model. /// A reasoning effort option that can be surfaced for a model.
#[derive(Debug, Clone, Copy)] #[derive(Debug, Clone, Copy)]

View File

@@ -1,13 +1,13 @@
//! Standard type to use with the `--sandbox` (`-s`) CLI option. //! Standard type to use with the `--sandbox` (`-s`) CLI option.
//! //!
//! This mirrors the variants of [`codex_core::protocol::SandboxPolicy`], but //! This mirrors the variants of [`llmx_core::protocol::SandboxPolicy`], but
//! without any of the associated data so it can be expressed as a simple flag //! without any of the associated data so it can be expressed as a simple flag
//! on the command-line. Users that need to tweak the advanced options for //! on the command-line. Users that need to tweak the advanced options for
//! `workspace-write` can continue to do so via `-c` overrides or their //! `workspace-write` can continue to do so via `-c` overrides or their
//! `config.toml`. //! `config.toml`.
use clap::ValueEnum; use clap::ValueEnum;
use codex_protocol::config_types::SandboxMode; use llmx_protocol::config_types::SandboxMode;
#[derive(Clone, Copy, Debug, ValueEnum)] #[derive(Clone, Copy, Debug, ValueEnum)]
#[value(rename_all = "kebab-case")] #[value(rename_all = "kebab-case")]

View File

@@ -1,4 +1,4 @@
use codex_core::protocol::SandboxPolicy; use llmx_core::protocol::SandboxPolicy;
pub fn summarize_sandbox_policy(sandbox_policy: &SandboxPolicy) -> String { pub fn summarize_sandbox_policy(sandbox_policy: &SandboxPolicy) -> String {
match sandbox_policy { match sandbox_policy {

View File

@@ -1,11 +1,11 @@
[package] [package]
edition = "2024" edition = "2024"
name = "codex-core" name = "llmx-core"
version = { workspace = true } version = { workspace = true }
[lib] [lib]
doctest = false doctest = false
name = "codex_core" name = "llmx_core"
path = "src/lib.rs" path = "src/lib.rs"
[lints] [lints]
@@ -19,20 +19,20 @@ async-trait = { workspace = true }
base64 = { workspace = true } base64 = { workspace = true }
bytes = { workspace = true } bytes = { workspace = true }
chrono = { workspace = true, features = ["serde"] } chrono = { workspace = true, features = ["serde"] }
codex-app-server-protocol = { workspace = true } llmx-app-server-protocol = { workspace = true }
codex-apply-patch = { workspace = true } llmx-apply-patch = { workspace = true }
codex-async-utils = { workspace = true } llmx-async-utils = { workspace = true }
codex-file-search = { workspace = true } llmx-file-search = { workspace = true }
codex-git = { workspace = true } llmx-git = { workspace = true }
codex-keyring-store = { workspace = true } llmx-keyring-store = { workspace = true }
codex-otel = { workspace = true, features = ["otel"] } llmx-otel = { workspace = true, features = ["otel"] }
codex-protocol = { workspace = true } llmx-protocol = { workspace = true }
codex-rmcp-client = { workspace = true } llmx-rmcp-client = { workspace = true }
codex-utils-pty = { workspace = true } llmx-utils-pty = { workspace = true }
codex-utils-readiness = { workspace = true } llmx-utils-readiness = { workspace = true }
codex-utils-string = { workspace = true } llmx-utils-string = { workspace = true }
codex-utils-tokenizer = { workspace = true } llmx-utils-tokenizer = { workspace = true }
codex-windows-sandbox = { package = "codex-windows-sandbox", path = "../windows-sandbox-rs" } llmx-windows-sandbox = { package = "llmx-windows-sandbox", path = "../windows-sandbox-rs" }
dirs = { workspace = true } dirs = { workspace = true }
dunce = { workspace = true } dunce = { workspace = true }
env-flags = { workspace = true } env-flags = { workspace = true }
@@ -104,7 +104,7 @@ openssl-sys = { workspace = true, features = ["vendored"] }
[dev-dependencies] [dev-dependencies]
assert_cmd = { workspace = true } assert_cmd = { workspace = true }
assert_matches = { workspace = true } assert_matches = { workspace = true }
codex-arg0 = { workspace = true } llmx-arg0 = { workspace = true }
core_test_support = { workspace = true } core_test_support = { workspace = true }
ctor = { workspace = true } ctor = { workspace = true }
escargot = { workspace = true } escargot = { workspace = true }

View File

@@ -5,8 +5,8 @@ use crate::protocol::FileChange;
use crate::protocol::ReviewDecision; use crate::protocol::ReviewDecision;
use crate::safety::SafetyCheck; use crate::safety::SafetyCheck;
use crate::safety::assess_patch_safety; use crate::safety::assess_patch_safety;
use codex_apply_patch::ApplyPatchAction; use llmx_apply_patch::ApplyPatchAction;
use codex_apply_patch::ApplyPatchFileChange; use llmx_apply_patch::ApplyPatchFileChange;
use std::collections::HashMap; use std::collections::HashMap;
use std::path::PathBuf; use std::path::PathBuf;

View File

@@ -15,8 +15,8 @@ use std::sync::Arc;
use std::sync::Mutex; use std::sync::Mutex;
use std::time::Duration; use std::time::Duration;
use codex_app_server_protocol::AuthMode; use llmx_app_server_protocol::AuthMode;
use codex_protocol::config_types::ForcedLoginMethod; use llmx_protocol::config_types::ForcedLoginMethod;
pub use crate::auth::storage::AuthCredentialsStoreMode; pub use crate::auth::storage::AuthCredentialsStoreMode;
pub use crate::auth::storage::AuthDotJson; pub use crate::auth::storage::AuthDotJson;
@@ -31,7 +31,7 @@ use crate::token_data::PlanType as InternalPlanType;
use crate::token_data::TokenData; use crate::token_data::TokenData;
use crate::token_data::parse_id_token; use crate::token_data::parse_id_token;
use crate::util::try_parse_error_message; use crate::util::try_parse_error_message;
use codex_protocol::account::PlanType as AccountPlanType; use llmx_protocol::account::PlanType as AccountPlanType;
use serde_json::Value; use serde_json::Value;
use thiserror::Error; use thiserror::Error;
@@ -640,10 +640,10 @@ mod tests {
use crate::token_data::IdTokenInfo; use crate::token_data::IdTokenInfo;
use crate::token_data::KnownPlan as InternalKnownPlan; use crate::token_data::KnownPlan as InternalKnownPlan;
use crate::token_data::PlanType as InternalPlanType; use crate::token_data::PlanType as InternalPlanType;
use codex_protocol::account::PlanType as AccountPlanType; use llmx_protocol::account::PlanType as AccountPlanType;
use base64::Engine; use base64::Engine;
use codex_protocol::config_types::ForcedLoginMethod; use llmx_protocol::config_types::ForcedLoginMethod;
use pretty_assertions::assert_eq; use pretty_assertions::assert_eq;
use serde::Serialize; use serde::Serialize;
use serde_json::json; use serde_json::json;

View File

@@ -17,8 +17,8 @@ use std::sync::Arc;
use tracing::warn; use tracing::warn;
use crate::token_data::TokenData; use crate::token_data::TokenData;
use codex_keyring_store::DefaultKeyringStore; use llmx_keyring_store::DefaultKeyringStore;
use codex_keyring_store::KeyringStore; use llmx_keyring_store::KeyringStore;
/// Determine where Codex should store CLI auth credentials. /// Determine where Codex should store CLI auth credentials.
#[derive(Debug, Default, Copy, Clone, PartialEq, Eq, Serialize, Deserialize)] #[derive(Debug, Default, Copy, Clone, PartialEq, Eq, Serialize, Deserialize)]
@@ -287,7 +287,7 @@ mod tests {
use serde_json::json; use serde_json::json;
use tempfile::tempdir; use tempfile::tempdir;
use codex_keyring_store::tests::MockKeyringStore; use llmx_keyring_store::tests::MockKeyringStore;
use keyring::Error as KeyringError; use keyring::Error as KeyringError;
#[tokio::test] #[tokio::test]

View File

@@ -15,13 +15,13 @@ use crate::model_family::ModelFamily;
use crate::tools::spec::create_tools_json_for_chat_completions_api; use crate::tools::spec::create_tools_json_for_chat_completions_api;
use crate::util::backoff; use crate::util::backoff;
use bytes::Bytes; use bytes::Bytes;
use codex_otel::otel_event_manager::OtelEventManager; use llmx_otel::otel_event_manager::OtelEventManager;
use codex_protocol::models::ContentItem; use llmx_protocol::models::ContentItem;
use codex_protocol::models::FunctionCallOutputContentItem; use llmx_protocol::models::FunctionCallOutputContentItem;
use codex_protocol::models::ReasoningItemContent; use llmx_protocol::models::ReasoningItemContent;
use codex_protocol::models::ResponseItem; use llmx_protocol::models::ResponseItem;
use codex_protocol::protocol::SessionSource; use llmx_protocol::protocol::SessionSource;
use codex_protocol::protocol::SubAgentSource; use llmx_protocol::protocol::SubAgentSource;
use eventsource_stream::Eventsource; use eventsource_stream::Eventsource;
use futures::Stream; use futures::Stream;
use futures::StreamExt; use futures::StreamExt;
@@ -774,7 +774,7 @@ where
let is_assistant_message = matches!( let is_assistant_message = matches!(
&item, &item,
codex_protocol::models::ResponseItem::Message { role, .. } if role == "assistant" llmx_protocol::models::ResponseItem::Message { role, .. } if role == "assistant"
); );
if is_assistant_message { if is_assistant_message {
@@ -784,12 +784,12 @@ where
// seen any deltas; otherwise, deltas already built the // seen any deltas; otherwise, deltas already built the
// cumulative text and this would duplicate it. // cumulative text and this would duplicate it.
if this.cumulative.is_empty() if this.cumulative.is_empty()
&& let codex_protocol::models::ResponseItem::Message { && let llmx_protocol::models::ResponseItem::Message {
content, content,
.. ..
} = &item } = &item
&& let Some(text) = content.iter().find_map(|c| match c { && let Some(text) = content.iter().find_map(|c| match c {
codex_protocol::models::ContentItem::OutputText { llmx_protocol::models::ContentItem::OutputText {
text, text,
} => Some(text), } => Some(text),
_ => None, _ => None,
@@ -832,11 +832,11 @@ where
&& matches!(this.mode, AggregateMode::AggregatedOnly) && matches!(this.mode, AggregateMode::AggregatedOnly)
{ {
let aggregated_reasoning = let aggregated_reasoning =
codex_protocol::models::ResponseItem::Reasoning { llmx_protocol::models::ResponseItem::Reasoning {
id: String::new(), id: String::new(),
summary: Vec::new(), summary: Vec::new(),
content: Some(vec![ content: Some(vec![
codex_protocol::models::ReasoningItemContent::ReasoningText { llmx_protocol::models::ReasoningItemContent::ReasoningText {
text: std::mem::take(&mut this.cumulative_reasoning), text: std::mem::take(&mut this.cumulative_reasoning),
}, },
]), ]),
@@ -853,10 +853,10 @@ where
// the streamed deltas into a terminal OutputItemDone so callers // the streamed deltas into a terminal OutputItemDone so callers
// can persist/render the message once per turn. // can persist/render the message once per turn.
if !this.cumulative.is_empty() { if !this.cumulative.is_empty() {
let aggregated_message = codex_protocol::models::ResponseItem::Message { let aggregated_message = llmx_protocol::models::ResponseItem::Message {
id: None, id: None,
role: "assistant".to_string(), role: "assistant".to_string(),
content: vec![codex_protocol::models::ContentItem::OutputText { content: vec![llmx_protocol::models::ContentItem::OutputText {
text: std::mem::take(&mut this.cumulative), text: std::mem::take(&mut this.cumulative),
}], }],
}; };

View File

@@ -7,13 +7,13 @@ use std::time::Duration;
use bytes::Bytes; use bytes::Bytes;
use chrono::DateTime; use chrono::DateTime;
use chrono::Utc; use chrono::Utc;
use codex_app_server_protocol::AuthMode; use llmx_app_server_protocol::AuthMode;
use codex_otel::otel_event_manager::OtelEventManager; use llmx_otel::otel_event_manager::OtelEventManager;
use codex_protocol::ConversationId; use llmx_protocol::ConversationId;
use codex_protocol::config_types::ReasoningEffort as ReasoningEffortConfig; use llmx_protocol::config_types::ReasoningEffort as ReasoningEffortConfig;
use codex_protocol::config_types::ReasoningSummary as ReasoningSummaryConfig; use llmx_protocol::config_types::ReasoningSummary as ReasoningSummaryConfig;
use codex_protocol::models::ResponseItem; use llmx_protocol::models::ResponseItem;
use codex_protocol::protocol::SessionSource; use llmx_protocol::protocol::SessionSource;
use eventsource_stream::Eventsource; use eventsource_stream::Eventsource;
use futures::prelude::*; use futures::prelude::*;
use regex_lite::Regex; use regex_lite::Regex;

View File

@@ -3,11 +3,11 @@ use crate::error::Result;
use crate::model_family::ModelFamily; use crate::model_family::ModelFamily;
use crate::protocol::RateLimitSnapshot; use crate::protocol::RateLimitSnapshot;
use crate::protocol::TokenUsage; use crate::protocol::TokenUsage;
use codex_apply_patch::APPLY_PATCH_TOOL_INSTRUCTIONS; use llmx_apply_patch::APPLY_PATCH_TOOL_INSTRUCTIONS;
use codex_protocol::config_types::ReasoningEffort as ReasoningEffortConfig; use llmx_protocol::config_types::ReasoningEffort as ReasoningEffortConfig;
use codex_protocol::config_types::ReasoningSummary as ReasoningSummaryConfig; use llmx_protocol::config_types::ReasoningSummary as ReasoningSummaryConfig;
use codex_protocol::config_types::Verbosity as VerbosityConfig; use llmx_protocol::config_types::Verbosity as VerbosityConfig;
use codex_protocol::models::ResponseItem; use llmx_protocol::models::ResponseItem;
use futures::Stream; use futures::Stream;
use serde::Deserialize; use serde::Deserialize;
use serde::Serialize; use serde::Serialize;

View File

@@ -1,5 +1,5 @@
use codex_protocol::protocol::AskForApproval; use llmx_protocol::protocol::AskForApproval;
use codex_protocol::protocol::SandboxPolicy; use llmx_protocol::protocol::SandboxPolicy;
use crate::bash::parse_shell_lc_plain_commands; use crate::bash::parse_shell_lc_plain_commands;
use crate::is_safe_command::is_known_safe_command; use crate::is_safe_command::is_known_safe_command;

View File

@@ -16,12 +16,12 @@ use crate::protocol::TurnContextItem;
use crate::protocol::WarningEvent; use crate::protocol::WarningEvent;
use crate::truncate::truncate_middle; use crate::truncate::truncate_middle;
use crate::util::backoff; use crate::util::backoff;
use codex_protocol::items::TurnItem; use llmx_protocol::items::TurnItem;
use codex_protocol::models::ContentItem; use llmx_protocol::models::ContentItem;
use codex_protocol::models::ResponseInputItem; use llmx_protocol::models::ResponseInputItem;
use codex_protocol::models::ResponseItem; use llmx_protocol::models::ResponseItem;
use codex_protocol::protocol::RolloutItem; use llmx_protocol::protocol::RolloutItem;
use codex_protocol::user_input::UserInput; use llmx_protocol::user_input::UserInput;
use futures::prelude::*; use futures::prelude::*;
use tracing::error; use tracing::error;

View File

@@ -2,7 +2,7 @@ use crate::config::CONFIG_TOML_FILE;
use crate::config::types::McpServerConfig; use crate::config::types::McpServerConfig;
use crate::config::types::Notice; use crate::config::types::Notice;
use anyhow::Context; use anyhow::Context;
use codex_protocol::config_types::ReasoningEffort; use llmx_protocol::config_types::ReasoningEffort;
use std::collections::BTreeMap; use std::collections::BTreeMap;
use std::path::Path; use std::path::Path;
use std::path::PathBuf; use std::path::PathBuf;
@@ -536,7 +536,7 @@ impl ConfigEditsBuilder {
mod tests { mod tests {
use super::*; use super::*;
use crate::config::types::McpServerTransportConfig; use crate::config::types::McpServerTransportConfig;
use codex_protocol::config_types::ReasoningEffort; use llmx_protocol::config_types::ReasoningEffort;
use pretty_assertions::assert_eq; use pretty_assertions::assert_eq;
use tempfile::tempdir; use tempfile::tempdir;
use tokio::runtime::Builder; use tokio::runtime::Builder;

View File

@@ -32,14 +32,14 @@ use crate::project_doc::DEFAULT_PROJECT_DOC_FILENAME;
use crate::project_doc::LOCAL_PROJECT_DOC_FILENAME; use crate::project_doc::LOCAL_PROJECT_DOC_FILENAME;
use crate::protocol::AskForApproval; use crate::protocol::AskForApproval;
use crate::protocol::SandboxPolicy; use crate::protocol::SandboxPolicy;
use codex_app_server_protocol::Tools; use llmx_app_server_protocol::Tools;
use codex_app_server_protocol::UserSavedConfig; use llmx_app_server_protocol::UserSavedConfig;
use codex_protocol::config_types::ForcedLoginMethod; use llmx_protocol::config_types::ForcedLoginMethod;
use codex_protocol::config_types::ReasoningEffort; use llmx_protocol::config_types::ReasoningEffort;
use codex_protocol::config_types::ReasoningSummary; use llmx_protocol::config_types::ReasoningSummary;
use codex_protocol::config_types::SandboxMode; use llmx_protocol::config_types::SandboxMode;
use codex_protocol::config_types::Verbosity; use llmx_protocol::config_types::Verbosity;
use codex_rmcp_client::OAuthCredentialsStoreMode; use llmx_rmcp_client::OAuthCredentialsStoreMode;
use dirs::home_dir; use dirs::home_dir;
use dunce::canonicalize; use dunce::canonicalize;
use serde::Deserialize; use serde::Deserialize;

View File

@@ -2,10 +2,10 @@ use serde::Deserialize;
use std::path::PathBuf; use std::path::PathBuf;
use crate::protocol::AskForApproval; use crate::protocol::AskForApproval;
use codex_protocol::config_types::ReasoningEffort; use llmx_protocol::config_types::ReasoningEffort;
use codex_protocol::config_types::ReasoningSummary; use llmx_protocol::config_types::ReasoningSummary;
use codex_protocol::config_types::SandboxMode; use llmx_protocol::config_types::SandboxMode;
use codex_protocol::config_types::Verbosity; use llmx_protocol::config_types::Verbosity;
/// Collection of common configuration options that a user can define as a unit /// Collection of common configuration options that a user can define as a unit
/// in `config.toml`. /// in `config.toml`.
@@ -35,7 +35,7 @@ pub struct ConfigProfile {
pub features: Option<crate::features::FeaturesToml>, pub features: Option<crate::features::FeaturesToml>,
} }
impl From<ConfigProfile> for codex_app_server_protocol::Profile { impl From<ConfigProfile> for llmx_app_server_protocol::Profile {
fn from(config_profile: ConfigProfile) -> Self { fn from(config_profile: ConfigProfile) -> Self {
Self { Self {
model: config_profile.model, model: config_profile.model,

View File

@@ -381,7 +381,7 @@ pub struct SandboxWorkspaceWrite {
pub exclude_slash_tmp: bool, pub exclude_slash_tmp: bool,
} }
impl From<SandboxWorkspaceWrite> for codex_app_server_protocol::SandboxSettings { impl From<SandboxWorkspaceWrite> for llmx_app_server_protocol::SandboxSettings {
fn from(sandbox_workspace_write: SandboxWorkspaceWrite) -> Self { fn from(sandbox_workspace_write: SandboxWorkspaceWrite) -> Self {
Self { Self {
writable_roots: sandbox_workspace_write.writable_roots, writable_roots: sandbox_workspace_write.writable_roots,

View File

@@ -1,7 +1,7 @@
use codex_protocol::models::FunctionCallOutputPayload; use llmx_protocol::models::FunctionCallOutputPayload;
use codex_protocol::models::ResponseItem; use llmx_protocol::models::ResponseItem;
use codex_protocol::protocol::TokenUsage; use llmx_protocol::protocol::TokenUsage;
use codex_protocol::protocol::TokenUsageInfo; use llmx_protocol::protocol::TokenUsageInfo;
use std::ops::Deref; use std::ops::Deref;
use crate::context_manager::normalize; use crate::context_manager::normalize;

View File

@@ -1,14 +1,14 @@
use super::*; use super::*;
use crate::context_manager::truncate; use crate::context_manager::truncate;
use codex_git::GhostCommit; use llmx_git::GhostCommit;
use codex_protocol::models::ContentItem; use llmx_protocol::models::ContentItem;
use codex_protocol::models::FunctionCallOutputContentItem; use llmx_protocol::models::FunctionCallOutputContentItem;
use codex_protocol::models::FunctionCallOutputPayload; use llmx_protocol::models::FunctionCallOutputPayload;
use codex_protocol::models::LocalShellAction; use llmx_protocol::models::LocalShellAction;
use codex_protocol::models::LocalShellExecAction; use llmx_protocol::models::LocalShellExecAction;
use codex_protocol::models::LocalShellStatus; use llmx_protocol::models::LocalShellStatus;
use codex_protocol::models::ReasoningItemContent; use llmx_protocol::models::ReasoningItemContent;
use codex_protocol::models::ReasoningItemReasoningSummary; use llmx_protocol::models::ReasoningItemReasoningSummary;
use pretty_assertions::assert_eq; use pretty_assertions::assert_eq;
use regex_lite::Regex; use regex_lite::Regex;

View File

@@ -1,7 +1,7 @@
use std::collections::HashSet; use std::collections::HashSet;
use codex_protocol::models::FunctionCallOutputPayload; use llmx_protocol::models::FunctionCallOutputPayload;
use codex_protocol::models::ResponseItem; use llmx_protocol::models::ResponseItem;
use crate::util::error_or_panic; use crate::util::error_or_panic;

Some files were not shown because too many files have changed in this diff Show More