Riapplica la fase 5 di aKode (86e7c72e) sulla base ripulita:
- crate codex-* -> akode-*, codex-rs -> akode-rs, codex-cli -> akode-cli, binario e ausiliari akode;
- ~/.codex -> ~/.akode, CODEX_HOME -> AKODE_HOME, variabili CODEX_* -> AKODE_*, .codex/ -> .akode/ di progetto;
nessun fallback a ~/.codex o a CODEX_*;
- testi per l'utente "Codex" -> "aKode"; testi verso il modello e istruzioni di sistema invariati;
- snapshot insta rinominati (non ancora rigenerati).
I conflitti con la base ripulita sono stati risolti riapplicando la rinomina ai file senza le
funzioni di imeAI (script di mappa dei token per file).
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
41 lines
1.6 KiB
Rust
41 lines
1.6 KiB
Rust
//! Minimal exec-server fixture for Bazel-only integration tests.
|
|
//!
|
|
//! Linking only exec-server avoids depending on the full Codex CLI binary
|
|
//! when a test only needs a WebSocket executor endpoint. It handles the arg0
|
|
//! helper mode because sandboxed process requests re-exec this binary.
|
|
|
|
use akode_exec_server::ExecServerRuntimeOptions;
|
|
use akode_http_client::HttpClientFactory;
|
|
use akode_http_client::OutboundProxyPolicy;
|
|
use std::ffi::OsStr;
|
|
|
|
const AKODE_LINUX_SANDBOX_EXE_ENV_VAR: &str = "AKODE_TEST_LINUX_SANDBOX_EXE";
|
|
|
|
fn main() -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
|
|
#[cfg(target_os = "linux")]
|
|
akode_utils_pty::init_spawn_helper(std::env::args_os());
|
|
let mut args = std::env::args_os();
|
|
let _ = args.next();
|
|
let argv1 = args.next();
|
|
#[cfg(unix)]
|
|
if argv1.as_deref() == Some(OsStr::new(akode_exec_server::AKODE_ARG0_EXEC_HELPER_ARG1)) {
|
|
akode_exec_server::run_arg0_exec_helper_main();
|
|
}
|
|
if argv1.as_deref() == Some(OsStr::new(akode_exec_server::AKODE_FS_HELPER_ARG1)) {
|
|
akode_exec_server::run_fs_helper_main();
|
|
}
|
|
|
|
let current_exe = std::env::current_exe()?;
|
|
let codex_linux_sandbox_exe =
|
|
std::env::var_os(AKODE_LINUX_SANDBOX_EXE_ENV_VAR).map(std::path::PathBuf::from);
|
|
let runtime_paths = ExecServerRuntimeOptions::new(current_exe, codex_linux_sandbox_exe)?;
|
|
tokio::runtime::Builder::new_multi_thread()
|
|
.enable_all()
|
|
.build()?
|
|
.block_on(akode_exec_server::run_main(
|
|
"ws://127.0.0.1:0",
|
|
runtime_paths,
|
|
HttpClientFactory::new(OutboundProxyPolicy::ReqwestDefault),
|
|
))
|
|
}
|