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:
@@ -1,14 +1,14 @@
|
||||
[package]
|
||||
edition = "2024"
|
||||
name = "codex-exec"
|
||||
name = "llmx-exec"
|
||||
version = { workspace = true }
|
||||
|
||||
[[bin]]
|
||||
name = "codex-exec"
|
||||
name = "llmx-exec"
|
||||
path = "src/main.rs"
|
||||
|
||||
[lib]
|
||||
name = "codex_exec"
|
||||
name = "llmx_exec"
|
||||
path = "src/lib.rs"
|
||||
|
||||
[lints]
|
||||
@@ -17,15 +17,15 @@ workspace = true
|
||||
[dependencies]
|
||||
anyhow = { workspace = true }
|
||||
clap = { workspace = true, features = ["derive"] }
|
||||
codex-arg0 = { workspace = true }
|
||||
codex-common = { workspace = true, features = [
|
||||
llmx-arg0 = { workspace = true }
|
||||
llmx-common = { workspace = true, features = [
|
||||
"cli",
|
||||
"elapsed",
|
||||
"sandbox_summary",
|
||||
] }
|
||||
codex-core = { workspace = true }
|
||||
codex-ollama = { workspace = true }
|
||||
codex-protocol = { workspace = true }
|
||||
llmx-core = { workspace = true }
|
||||
llmx-ollama = { workspace = true }
|
||||
llmx-protocol = { workspace = true }
|
||||
mcp-types = { workspace = true }
|
||||
opentelemetry-appender-tracing = { workspace = true }
|
||||
owo-colors = { workspace = true }
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
use clap::Parser;
|
||||
use clap::ValueEnum;
|
||||
use codex_common::CliConfigOverrides;
|
||||
use llmx_common::CliConfigOverrides;
|
||||
use std::path::PathBuf;
|
||||
|
||||
#[derive(Parser, Debug)]
|
||||
@@ -24,7 +24,7 @@ pub struct Cli {
|
||||
/// Select the sandbox policy to use when executing model-generated shell
|
||||
/// commands.
|
||||
#[arg(long = "sandbox", short = 's', value_enum)]
|
||||
pub sandbox_mode: Option<codex_common::SandboxModeCliArg>,
|
||||
pub sandbox_mode: Option<llmx_common::SandboxModeCliArg>,
|
||||
|
||||
/// Configuration profile from config.toml to specify default options.
|
||||
#[arg(long = "profile", short = 'p')]
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
use std::path::Path;
|
||||
|
||||
use codex_core::config::Config;
|
||||
use codex_core::protocol::Event;
|
||||
use codex_core::protocol::SessionConfiguredEvent;
|
||||
use llmx_core::config::Config;
|
||||
use llmx_core::protocol::Event;
|
||||
use llmx_core::protocol::SessionConfiguredEvent;
|
||||
|
||||
pub(crate) enum CodexStatus {
|
||||
Running,
|
||||
|
||||
@@ -1,29 +1,29 @@
|
||||
use codex_common::elapsed::format_duration;
|
||||
use codex_common::elapsed::format_elapsed;
|
||||
use codex_core::config::Config;
|
||||
use codex_core::protocol::AgentMessageEvent;
|
||||
use codex_core::protocol::AgentReasoningRawContentEvent;
|
||||
use codex_core::protocol::BackgroundEventEvent;
|
||||
use codex_core::protocol::DeprecationNoticeEvent;
|
||||
use codex_core::protocol::ErrorEvent;
|
||||
use codex_core::protocol::Event;
|
||||
use codex_core::protocol::EventMsg;
|
||||
use codex_core::protocol::ExecCommandBeginEvent;
|
||||
use codex_core::protocol::ExecCommandEndEvent;
|
||||
use codex_core::protocol::FileChange;
|
||||
use codex_core::protocol::McpInvocation;
|
||||
use codex_core::protocol::McpToolCallBeginEvent;
|
||||
use codex_core::protocol::McpToolCallEndEvent;
|
||||
use codex_core::protocol::PatchApplyBeginEvent;
|
||||
use codex_core::protocol::PatchApplyEndEvent;
|
||||
use codex_core::protocol::SessionConfiguredEvent;
|
||||
use codex_core::protocol::StreamErrorEvent;
|
||||
use codex_core::protocol::TaskCompleteEvent;
|
||||
use codex_core::protocol::TurnAbortReason;
|
||||
use codex_core::protocol::TurnDiffEvent;
|
||||
use codex_core::protocol::WarningEvent;
|
||||
use codex_core::protocol::WebSearchEndEvent;
|
||||
use codex_protocol::num_format::format_with_separators;
|
||||
use llmx_common::elapsed::format_duration;
|
||||
use llmx_common::elapsed::format_elapsed;
|
||||
use llmx_core::config::Config;
|
||||
use llmx_core::protocol::AgentMessageEvent;
|
||||
use llmx_core::protocol::AgentReasoningRawContentEvent;
|
||||
use llmx_core::protocol::BackgroundEventEvent;
|
||||
use llmx_core::protocol::DeprecationNoticeEvent;
|
||||
use llmx_core::protocol::ErrorEvent;
|
||||
use llmx_core::protocol::Event;
|
||||
use llmx_core::protocol::EventMsg;
|
||||
use llmx_core::protocol::ExecCommandBeginEvent;
|
||||
use llmx_core::protocol::ExecCommandEndEvent;
|
||||
use llmx_core::protocol::FileChange;
|
||||
use llmx_core::protocol::McpInvocation;
|
||||
use llmx_core::protocol::McpToolCallBeginEvent;
|
||||
use llmx_core::protocol::McpToolCallEndEvent;
|
||||
use llmx_core::protocol::PatchApplyBeginEvent;
|
||||
use llmx_core::protocol::PatchApplyEndEvent;
|
||||
use llmx_core::protocol::SessionConfiguredEvent;
|
||||
use llmx_core::protocol::StreamErrorEvent;
|
||||
use llmx_core::protocol::TaskCompleteEvent;
|
||||
use llmx_core::protocol::TurnAbortReason;
|
||||
use llmx_core::protocol::TurnDiffEvent;
|
||||
use llmx_core::protocol::WarningEvent;
|
||||
use llmx_core::protocol::WebSearchEndEvent;
|
||||
use llmx_protocol::num_format::format_with_separators;
|
||||
use owo_colors::OwoColorize;
|
||||
use owo_colors::Style;
|
||||
use shlex::try_join;
|
||||
@@ -34,9 +34,9 @@ use std::time::Instant;
|
||||
use crate::event_processor::CodexStatus;
|
||||
use crate::event_processor::EventProcessor;
|
||||
use crate::event_processor::handle_last_message;
|
||||
use codex_common::create_config_summary_entries;
|
||||
use codex_protocol::plan_tool::StepStatus;
|
||||
use codex_protocol::plan_tool::UpdatePlanArgs;
|
||||
use llmx_common::create_config_summary_entries;
|
||||
use llmx_protocol::plan_tool::StepStatus;
|
||||
use llmx_protocol::plan_tool::UpdatePlanArgs;
|
||||
|
||||
/// This should be configurable. When used in CI, users may not want to impose
|
||||
/// a limit so they can see the full transcript.
|
||||
@@ -61,7 +61,7 @@ pub(crate) struct EventProcessorWithHumanOutput {
|
||||
show_agent_reasoning: bool,
|
||||
show_raw_agent_reasoning: bool,
|
||||
last_message_path: Option<PathBuf>,
|
||||
last_total_token_usage: Option<codex_core::protocol::TokenUsageInfo>,
|
||||
last_total_token_usage: Option<llmx_core::protocol::TokenUsageInfo>,
|
||||
final_message: Option<String>,
|
||||
}
|
||||
|
||||
|
||||
@@ -33,24 +33,24 @@ use crate::exec_events::TurnFailedEvent;
|
||||
use crate::exec_events::TurnStartedEvent;
|
||||
use crate::exec_events::Usage;
|
||||
use crate::exec_events::WebSearchItem;
|
||||
use codex_core::config::Config;
|
||||
use codex_core::protocol::AgentMessageEvent;
|
||||
use codex_core::protocol::AgentReasoningEvent;
|
||||
use codex_core::protocol::Event;
|
||||
use codex_core::protocol::EventMsg;
|
||||
use codex_core::protocol::ExecCommandBeginEvent;
|
||||
use codex_core::protocol::ExecCommandEndEvent;
|
||||
use codex_core::protocol::FileChange;
|
||||
use codex_core::protocol::McpToolCallBeginEvent;
|
||||
use codex_core::protocol::McpToolCallEndEvent;
|
||||
use codex_core::protocol::PatchApplyBeginEvent;
|
||||
use codex_core::protocol::PatchApplyEndEvent;
|
||||
use codex_core::protocol::SessionConfiguredEvent;
|
||||
use codex_core::protocol::TaskCompleteEvent;
|
||||
use codex_core::protocol::TaskStartedEvent;
|
||||
use codex_core::protocol::WebSearchEndEvent;
|
||||
use codex_protocol::plan_tool::StepStatus;
|
||||
use codex_protocol::plan_tool::UpdatePlanArgs;
|
||||
use llmx_core::config::Config;
|
||||
use llmx_core::protocol::AgentMessageEvent;
|
||||
use llmx_core::protocol::AgentReasoningEvent;
|
||||
use llmx_core::protocol::Event;
|
||||
use llmx_core::protocol::EventMsg;
|
||||
use llmx_core::protocol::ExecCommandBeginEvent;
|
||||
use llmx_core::protocol::ExecCommandEndEvent;
|
||||
use llmx_core::protocol::FileChange;
|
||||
use llmx_core::protocol::McpToolCallBeginEvent;
|
||||
use llmx_core::protocol::McpToolCallEndEvent;
|
||||
use llmx_core::protocol::PatchApplyBeginEvent;
|
||||
use llmx_core::protocol::PatchApplyEndEvent;
|
||||
use llmx_core::protocol::SessionConfiguredEvent;
|
||||
use llmx_core::protocol::TaskCompleteEvent;
|
||||
use llmx_core::protocol::TaskStartedEvent;
|
||||
use llmx_core::protocol::WebSearchEndEvent;
|
||||
use llmx_protocol::plan_tool::StepStatus;
|
||||
use llmx_protocol::plan_tool::UpdatePlanArgs;
|
||||
use serde_json::Value as JsonValue;
|
||||
use tracing::error;
|
||||
use tracing::warn;
|
||||
@@ -63,7 +63,7 @@ pub struct EventProcessorWithJsonOutput {
|
||||
running_patch_applies: HashMap<String, PatchApplyBeginEvent>,
|
||||
// Tracks the todo list for the current turn (at most one per turn).
|
||||
running_todo_list: Option<RunningTodoList>,
|
||||
last_total_token_usage: Option<codex_core::protocol::TokenUsage>,
|
||||
last_total_token_usage: Option<llmx_core::protocol::TokenUsage>,
|
||||
running_mcp_tool_calls: HashMap<String, RunningMcpToolCall>,
|
||||
last_critical_error: Option<ThreadErrorEvent>,
|
||||
}
|
||||
|
||||
@@ -11,22 +11,22 @@ pub mod event_processor_with_jsonl_output;
|
||||
pub mod exec_events;
|
||||
|
||||
pub use cli::Cli;
|
||||
use codex_core::AuthManager;
|
||||
use codex_core::BUILT_IN_OSS_MODEL_PROVIDER_ID;
|
||||
use codex_core::ConversationManager;
|
||||
use codex_core::NewConversation;
|
||||
use codex_core::auth::enforce_login_restrictions;
|
||||
use codex_core::config::Config;
|
||||
use codex_core::config::ConfigOverrides;
|
||||
use codex_core::git_info::get_git_repo_root;
|
||||
use codex_core::protocol::AskForApproval;
|
||||
use codex_core::protocol::Event;
|
||||
use codex_core::protocol::EventMsg;
|
||||
use codex_core::protocol::Op;
|
||||
use codex_core::protocol::SessionSource;
|
||||
use codex_ollama::DEFAULT_OSS_MODEL;
|
||||
use codex_protocol::config_types::SandboxMode;
|
||||
use codex_protocol::user_input::UserInput;
|
||||
use llmx_core::AuthManager;
|
||||
use llmx_core::BUILT_IN_OSS_MODEL_PROVIDER_ID;
|
||||
use llmx_core::ConversationManager;
|
||||
use llmx_core::NewConversation;
|
||||
use llmx_core::auth::enforce_login_restrictions;
|
||||
use llmx_core::config::Config;
|
||||
use llmx_core::config::ConfigOverrides;
|
||||
use llmx_core::git_info::get_git_repo_root;
|
||||
use llmx_core::protocol::AskForApproval;
|
||||
use llmx_core::protocol::Event;
|
||||
use llmx_core::protocol::EventMsg;
|
||||
use llmx_core::protocol::Op;
|
||||
use llmx_core::protocol::SessionSource;
|
||||
use llmx_ollama::DEFAULT_OSS_MODEL;
|
||||
use llmx_protocol::config_types::SandboxMode;
|
||||
use llmx_protocol::user_input::UserInput;
|
||||
use event_processor_with_human_output::EventProcessorWithHumanOutput;
|
||||
use event_processor_with_jsonl_output::EventProcessorWithJsonOutput;
|
||||
use opentelemetry_appender_tracing::layer::OpenTelemetryTracingBridge;
|
||||
@@ -44,8 +44,8 @@ use tracing_subscriber::prelude::*;
|
||||
use crate::cli::Command as ExecCommand;
|
||||
use crate::event_processor::CodexStatus;
|
||||
use crate::event_processor::EventProcessor;
|
||||
use codex_core::default_client::set_default_originator;
|
||||
use codex_core::find_conversation_path_by_id_str;
|
||||
use llmx_core::default_client::set_default_originator;
|
||||
use llmx_core::find_conversation_path_by_id_str;
|
||||
|
||||
pub async fn run_main(cli: Cli, codex_linux_sandbox_exe: Option<PathBuf>) -> anyhow::Result<()> {
|
||||
if let Err(err) = set_default_originator("codex_exec".to_string()) {
|
||||
@@ -198,7 +198,7 @@ pub async fn run_main(cli: Cli, codex_linux_sandbox_exe: Option<PathBuf>) -> any
|
||||
std::process::exit(1);
|
||||
}
|
||||
|
||||
let otel = codex_core::otel_init::build_provider(&config, env!("CARGO_PKG_VERSION"));
|
||||
let otel = llmx_core::otel_init::build_provider(&config, env!("CARGO_PKG_VERSION"));
|
||||
|
||||
#[allow(clippy::print_stderr)]
|
||||
let otel = match otel {
|
||||
@@ -211,7 +211,7 @@ pub async fn run_main(cli: Cli, codex_linux_sandbox_exe: Option<PathBuf>) -> any
|
||||
|
||||
if let Some(provider) = otel.as_ref() {
|
||||
let otel_layer = 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),
|
||||
);
|
||||
|
||||
let _ = tracing_subscriber::registry()
|
||||
@@ -232,7 +232,7 @@ pub async fn run_main(cli: Cli, codex_linux_sandbox_exe: Option<PathBuf>) -> any
|
||||
};
|
||||
|
||||
if oss {
|
||||
codex_ollama::ensure_oss_ready(&config)
|
||||
llmx_ollama::ensure_oss_ready(&config)
|
||||
.await
|
||||
.map_err(|e| anyhow::anyhow!("OSS setup failed: {e}"))?;
|
||||
}
|
||||
@@ -376,7 +376,7 @@ async fn resolve_resume_path(
|
||||
) -> anyhow::Result<Option<PathBuf>> {
|
||||
if args.last {
|
||||
let default_provider_filter = vec![config.model_provider_id.clone()];
|
||||
match codex_core::RolloutRecorder::list_conversations(
|
||||
match llmx_core::RolloutRecorder::list_conversations(
|
||||
&config.codex_home,
|
||||
1,
|
||||
None,
|
||||
|
||||
@@ -10,10 +10,10 @@
|
||||
//! This allows us to ship a completely separate set of functionality as part
|
||||
//! of the `codex-exec` binary.
|
||||
use clap::Parser;
|
||||
use codex_arg0::arg0_dispatch_or_else;
|
||||
use codex_common::CliConfigOverrides;
|
||||
use codex_exec::Cli;
|
||||
use codex_exec::run_main;
|
||||
use llmx_arg0::arg0_dispatch_or_else;
|
||||
use llmx_common::CliConfigOverrides;
|
||||
use llmx_exec::Cli;
|
||||
use llmx_exec::run_main;
|
||||
|
||||
#[derive(Parser, Debug)]
|
||||
struct TopCli {
|
||||
|
||||
@@ -1,49 +1,49 @@
|
||||
use codex_core::protocol::AgentMessageEvent;
|
||||
use codex_core::protocol::AgentReasoningEvent;
|
||||
use codex_core::protocol::ErrorEvent;
|
||||
use codex_core::protocol::Event;
|
||||
use codex_core::protocol::EventMsg;
|
||||
use codex_core::protocol::ExecCommandBeginEvent;
|
||||
use codex_core::protocol::ExecCommandEndEvent;
|
||||
use codex_core::protocol::FileChange;
|
||||
use codex_core::protocol::McpInvocation;
|
||||
use codex_core::protocol::McpToolCallBeginEvent;
|
||||
use codex_core::protocol::McpToolCallEndEvent;
|
||||
use codex_core::protocol::PatchApplyBeginEvent;
|
||||
use codex_core::protocol::PatchApplyEndEvent;
|
||||
use codex_core::protocol::SessionConfiguredEvent;
|
||||
use codex_core::protocol::WarningEvent;
|
||||
use codex_core::protocol::WebSearchEndEvent;
|
||||
use codex_exec::event_processor_with_jsonl_output::EventProcessorWithJsonOutput;
|
||||
use codex_exec::exec_events::AgentMessageItem;
|
||||
use codex_exec::exec_events::CommandExecutionItem;
|
||||
use codex_exec::exec_events::CommandExecutionStatus;
|
||||
use codex_exec::exec_events::ErrorItem;
|
||||
use codex_exec::exec_events::ItemCompletedEvent;
|
||||
use codex_exec::exec_events::ItemStartedEvent;
|
||||
use codex_exec::exec_events::ItemUpdatedEvent;
|
||||
use codex_exec::exec_events::McpToolCallItem;
|
||||
use codex_exec::exec_events::McpToolCallItemError;
|
||||
use codex_exec::exec_events::McpToolCallItemResult;
|
||||
use codex_exec::exec_events::McpToolCallStatus;
|
||||
use codex_exec::exec_events::PatchApplyStatus;
|
||||
use codex_exec::exec_events::PatchChangeKind;
|
||||
use codex_exec::exec_events::ReasoningItem;
|
||||
use codex_exec::exec_events::ThreadErrorEvent;
|
||||
use codex_exec::exec_events::ThreadEvent;
|
||||
use codex_exec::exec_events::ThreadItem;
|
||||
use codex_exec::exec_events::ThreadItemDetails;
|
||||
use codex_exec::exec_events::ThreadStartedEvent;
|
||||
use codex_exec::exec_events::TodoItem as ExecTodoItem;
|
||||
use codex_exec::exec_events::TodoListItem as ExecTodoListItem;
|
||||
use codex_exec::exec_events::TurnCompletedEvent;
|
||||
use codex_exec::exec_events::TurnFailedEvent;
|
||||
use codex_exec::exec_events::TurnStartedEvent;
|
||||
use codex_exec::exec_events::Usage;
|
||||
use codex_exec::exec_events::WebSearchItem;
|
||||
use codex_protocol::plan_tool::PlanItemArg;
|
||||
use codex_protocol::plan_tool::StepStatus;
|
||||
use codex_protocol::plan_tool::UpdatePlanArgs;
|
||||
use llmx_core::protocol::AgentMessageEvent;
|
||||
use llmx_core::protocol::AgentReasoningEvent;
|
||||
use llmx_core::protocol::ErrorEvent;
|
||||
use llmx_core::protocol::Event;
|
||||
use llmx_core::protocol::EventMsg;
|
||||
use llmx_core::protocol::ExecCommandBeginEvent;
|
||||
use llmx_core::protocol::ExecCommandEndEvent;
|
||||
use llmx_core::protocol::FileChange;
|
||||
use llmx_core::protocol::McpInvocation;
|
||||
use llmx_core::protocol::McpToolCallBeginEvent;
|
||||
use llmx_core::protocol::McpToolCallEndEvent;
|
||||
use llmx_core::protocol::PatchApplyBeginEvent;
|
||||
use llmx_core::protocol::PatchApplyEndEvent;
|
||||
use llmx_core::protocol::SessionConfiguredEvent;
|
||||
use llmx_core::protocol::WarningEvent;
|
||||
use llmx_core::protocol::WebSearchEndEvent;
|
||||
use llmx_exec::event_processor_with_jsonl_output::EventProcessorWithJsonOutput;
|
||||
use llmx_exec::exec_events::AgentMessageItem;
|
||||
use llmx_exec::exec_events::CommandExecutionItem;
|
||||
use llmx_exec::exec_events::CommandExecutionStatus;
|
||||
use llmx_exec::exec_events::ErrorItem;
|
||||
use llmx_exec::exec_events::ItemCompletedEvent;
|
||||
use llmx_exec::exec_events::ItemStartedEvent;
|
||||
use llmx_exec::exec_events::ItemUpdatedEvent;
|
||||
use llmx_exec::exec_events::McpToolCallItem;
|
||||
use llmx_exec::exec_events::McpToolCallItemError;
|
||||
use llmx_exec::exec_events::McpToolCallItemResult;
|
||||
use llmx_exec::exec_events::McpToolCallStatus;
|
||||
use llmx_exec::exec_events::PatchApplyStatus;
|
||||
use llmx_exec::exec_events::PatchChangeKind;
|
||||
use llmx_exec::exec_events::ReasoningItem;
|
||||
use llmx_exec::exec_events::ThreadErrorEvent;
|
||||
use llmx_exec::exec_events::ThreadEvent;
|
||||
use llmx_exec::exec_events::ThreadItem;
|
||||
use llmx_exec::exec_events::ThreadItemDetails;
|
||||
use llmx_exec::exec_events::ThreadStartedEvent;
|
||||
use llmx_exec::exec_events::TodoItem as ExecTodoItem;
|
||||
use llmx_exec::exec_events::TodoListItem as ExecTodoListItem;
|
||||
use llmx_exec::exec_events::TurnCompletedEvent;
|
||||
use llmx_exec::exec_events::TurnFailedEvent;
|
||||
use llmx_exec::exec_events::TurnStartedEvent;
|
||||
use llmx_exec::exec_events::Usage;
|
||||
use llmx_exec::exec_events::WebSearchItem;
|
||||
use llmx_protocol::plan_tool::PlanItemArg;
|
||||
use llmx_protocol::plan_tool::StepStatus;
|
||||
use llmx_protocol::plan_tool::UpdatePlanArgs;
|
||||
use mcp_types::CallToolResult;
|
||||
use mcp_types::ContentBlock;
|
||||
use mcp_types::TextContent;
|
||||
@@ -63,7 +63,7 @@ fn event(id: &str, msg: EventMsg) -> Event {
|
||||
fn session_configured_produces_thread_started_event() {
|
||||
let mut ep = EventProcessorWithJsonOutput::new(None);
|
||||
let session_id =
|
||||
codex_protocol::ConversationId::from_string("67e55044-10b1-426f-9247-bb680e5fe0c8")
|
||||
llmx_protocol::ConversationId::from_string("67e55044-10b1-426f-9247-bb680e5fe0c8")
|
||||
.unwrap();
|
||||
let rollout_path = PathBuf::from("/tmp/rollout.json");
|
||||
let ev = event(
|
||||
@@ -92,7 +92,7 @@ fn task_started_produces_turn_started_event() {
|
||||
let mut ep = EventProcessorWithJsonOutput::new(None);
|
||||
let out = ep.collect_thread_events(&event(
|
||||
"t1",
|
||||
EventMsg::TaskStarted(codex_core::protocol::TaskStartedEvent {
|
||||
EventMsg::TaskStarted(llmx_core::protocol::TaskStartedEvent {
|
||||
model_context_window: Some(32_000),
|
||||
}),
|
||||
));
|
||||
@@ -208,7 +208,7 @@ fn plan_update_emits_todo_list_started_updated_and_completed() {
|
||||
// Task completes => item.completed (same id, latest state)
|
||||
let complete = event(
|
||||
"p3",
|
||||
EventMsg::TaskComplete(codex_core::protocol::TaskCompleteEvent {
|
||||
EventMsg::TaskComplete(llmx_core::protocol::TaskCompleteEvent {
|
||||
last_agent_message: None,
|
||||
}),
|
||||
);
|
||||
@@ -452,7 +452,7 @@ fn plan_update_after_complete_starts_new_todo_list_with_new_id() {
|
||||
let _ = ep.collect_thread_events(&start);
|
||||
let complete = event(
|
||||
"t2",
|
||||
EventMsg::TaskComplete(codex_core::protocol::TaskCompleteEvent {
|
||||
EventMsg::TaskComplete(llmx_core::protocol::TaskCompleteEvent {
|
||||
last_agent_message: None,
|
||||
}),
|
||||
);
|
||||
@@ -530,7 +530,7 @@ fn error_event_produces_error() {
|
||||
let mut ep = EventProcessorWithJsonOutput::new(None);
|
||||
let out = ep.collect_thread_events(&event(
|
||||
"e1",
|
||||
EventMsg::Error(codex_core::protocol::ErrorEvent {
|
||||
EventMsg::Error(llmx_core::protocol::ErrorEvent {
|
||||
message: "boom".to_string(),
|
||||
}),
|
||||
));
|
||||
@@ -569,7 +569,7 @@ fn stream_error_event_produces_error() {
|
||||
let mut ep = EventProcessorWithJsonOutput::new(None);
|
||||
let out = ep.collect_thread_events(&event(
|
||||
"e1",
|
||||
EventMsg::StreamError(codex_core::protocol::StreamErrorEvent {
|
||||
EventMsg::StreamError(llmx_core::protocol::StreamErrorEvent {
|
||||
message: "retrying".to_string(),
|
||||
}),
|
||||
));
|
||||
@@ -600,7 +600,7 @@ fn error_followed_by_task_complete_produces_turn_failed() {
|
||||
|
||||
let complete_event = event(
|
||||
"e2",
|
||||
EventMsg::TaskComplete(codex_core::protocol::TaskCompleteEvent {
|
||||
EventMsg::TaskComplete(llmx_core::protocol::TaskCompleteEvent {
|
||||
last_agent_message: None,
|
||||
}),
|
||||
);
|
||||
@@ -897,21 +897,21 @@ fn task_complete_produces_turn_completed_with_usage() {
|
||||
let mut ep = EventProcessorWithJsonOutput::new(None);
|
||||
|
||||
// First, feed a TokenCount event with known totals.
|
||||
let usage = codex_core::protocol::TokenUsage {
|
||||
let usage = llmx_core::protocol::TokenUsage {
|
||||
input_tokens: 1200,
|
||||
cached_input_tokens: 200,
|
||||
output_tokens: 345,
|
||||
reasoning_output_tokens: 0,
|
||||
total_tokens: 0,
|
||||
};
|
||||
let info = codex_core::protocol::TokenUsageInfo {
|
||||
let info = llmx_core::protocol::TokenUsageInfo {
|
||||
total_token_usage: usage.clone(),
|
||||
last_token_usage: usage,
|
||||
model_context_window: None,
|
||||
};
|
||||
let token_count_event = event(
|
||||
"e1",
|
||||
EventMsg::TokenCount(codex_core::protocol::TokenCountEvent {
|
||||
EventMsg::TokenCount(llmx_core::protocol::TokenCountEvent {
|
||||
info: Some(info),
|
||||
rate_limits: None,
|
||||
}),
|
||||
@@ -921,7 +921,7 @@ fn task_complete_produces_turn_completed_with_usage() {
|
||||
// Then TaskComplete should produce turn.completed with the captured usage.
|
||||
let complete_event = event(
|
||||
"e2",
|
||||
EventMsg::TaskComplete(codex_core::protocol::TaskCompleteEvent {
|
||||
EventMsg::TaskComplete(llmx_core::protocol::TaskCompleteEvent {
|
||||
last_agent_message: Some("done".to_string()),
|
||||
}),
|
||||
);
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
use anyhow::Context;
|
||||
use assert_cmd::prelude::*;
|
||||
use codex_core::CODEX_APPLY_PATCH_ARG1;
|
||||
use llmx_core::CODEX_APPLY_PATCH_ARG1;
|
||||
use core_test_support::responses::ev_apply_patch_custom_tool_call;
|
||||
use core_test_support::responses::ev_apply_patch_function_call;
|
||||
use core_test_support::responses::ev_completed;
|
||||
@@ -50,7 +50,7 @@ fn test_standalone_exec_cli_can_use_apply_patch() -> anyhow::Result<()> {
|
||||
#[tokio::test(flavor = "multi_thread", worker_threads = 4)]
|
||||
async fn test_apply_patch_tool() -> anyhow::Result<()> {
|
||||
use core_test_support::skip_if_no_network;
|
||||
use core_test_support::test_codex_exec::test_codex_exec;
|
||||
use core_test_support::test_llmx_exec::test_codex_exec;
|
||||
|
||||
skip_if_no_network!(Ok(()));
|
||||
|
||||
@@ -99,7 +99,7 @@ async fn test_apply_patch_tool() -> anyhow::Result<()> {
|
||||
#[tokio::test(flavor = "multi_thread", worker_threads = 4)]
|
||||
async fn test_apply_patch_freeform_tool() -> anyhow::Result<()> {
|
||||
use core_test_support::skip_if_no_network;
|
||||
use core_test_support::test_codex_exec::test_codex_exec;
|
||||
use core_test_support::test_llmx_exec::test_codex_exec;
|
||||
|
||||
skip_if_no_network!(Ok(()));
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ use core_test_support::responses::ev_completed;
|
||||
use core_test_support::responses::mount_sse_once_match;
|
||||
use core_test_support::responses::sse;
|
||||
use core_test_support::responses::start_mock_server;
|
||||
use core_test_support::test_codex_exec::test_codex_exec;
|
||||
use core_test_support::test_llmx_exec::test_codex_exec;
|
||||
use wiremock::matchers::header;
|
||||
|
||||
#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#![allow(clippy::expect_used, clippy::unwrap_used)]
|
||||
|
||||
use core_test_support::responses;
|
||||
use core_test_support::test_codex_exec::test_codex_exec;
|
||||
use core_test_support::test_llmx_exec::test_codex_exec;
|
||||
use wiremock::matchers::header;
|
||||
|
||||
/// Verify that when the server reports an error, `codex-exec` exits with a
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#![allow(clippy::expect_used, clippy::unwrap_used)]
|
||||
|
||||
use core_test_support::responses;
|
||||
use core_test_support::test_codex_exec::test_codex_exec;
|
||||
use core_test_support::test_llmx_exec::test_codex_exec;
|
||||
use serde_json::Value;
|
||||
use wiremock::matchers::any;
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#![allow(clippy::unwrap_used, clippy::expect_used)]
|
||||
use anyhow::Context;
|
||||
use core_test_support::test_codex_exec::test_codex_exec;
|
||||
use core_test_support::test_llmx_exec::test_codex_exec;
|
||||
use serde_json::Value;
|
||||
use std::path::Path;
|
||||
use std::string::ToString;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#![cfg(unix)]
|
||||
use codex_core::protocol::SandboxPolicy;
|
||||
use codex_core::spawn::StdioPolicy;
|
||||
use llmx_core::protocol::SandboxPolicy;
|
||||
use llmx_core::spawn::StdioPolicy;
|
||||
use std::collections::HashMap;
|
||||
use std::future::Future;
|
||||
use std::io;
|
||||
@@ -19,7 +19,7 @@ async fn spawn_command_under_sandbox(
|
||||
stdio_policy: StdioPolicy,
|
||||
env: HashMap<String, String>,
|
||||
) -> std::io::Result<Child> {
|
||||
use codex_core::seatbelt::spawn_command_under_seatbelt;
|
||||
use llmx_core::seatbelt::spawn_command_under_seatbelt;
|
||||
spawn_command_under_seatbelt(
|
||||
command,
|
||||
command_cwd,
|
||||
@@ -40,7 +40,7 @@ async fn spawn_command_under_sandbox(
|
||||
stdio_policy: StdioPolicy,
|
||||
env: HashMap<String, String>,
|
||||
) -> std::io::Result<Child> {
|
||||
use codex_core::landlock::spawn_command_under_linux_sandbox;
|
||||
use llmx_core::landlock::spawn_command_under_linux_sandbox;
|
||||
let codex_linux_sandbox_exe = assert_cmd::cargo::cargo_bin("codex-exec");
|
||||
spawn_command_under_linux_sandbox(
|
||||
codex_linux_sandbox_exe,
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#![allow(clippy::expect_used, clippy::unwrap_used)]
|
||||
|
||||
use core_test_support::responses;
|
||||
use core_test_support::test_codex_exec::test_codex_exec;
|
||||
use core_test_support::test_llmx_exec::test_codex_exec;
|
||||
use wiremock::matchers::any;
|
||||
|
||||
/// Verify that when the server reports an error, `codex-exec` exits with a
|
||||
|
||||
Reference in New Issue
Block a user