aKode fase 5: rinomina interna (crate akode-*, akode-rs/, akode-cli/, binario akode, AKODE_*, ~/.akode, snapshot)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
andrea.difonzo
2026-11-11 11:06:46 +01:00
parent df99318392
commit 86e7c72e5f
10383 changed files with 749164 additions and 749170 deletions

View File

@@ -0,0 +1,40 @@
//! 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),
))
}