Marchio: allineamento fine della rinomina (A)

Le righe che differivano dalla rinomina di aKode solo per codex/akode (header e user agent
codex_cli_rs -> akode_cli_rs, nomi di file, testi di test) sono riportate come in aKode 0.9.2;
dove la mappa automatica aveva rinominato troppo (stringhe di protocollo, residenza) e'
ripristinato il testo originale.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
andrea.difonzo
2026-11-17 12:53:28 +01:00
parent 832a749d76
commit 203cd7a3f6
150 changed files with 456 additions and 560 deletions

View File

@@ -938,14 +938,14 @@ fn installation_check(show_details: bool) -> DoctorCheck {
let mut remediation = None;
if path_entries.len() > 1 {
details.push(format!("PATH akode entries: {}", path_entries.len()));
details.push(format!("PATH codex entries: {}", path_entries.len()));
}
if show_details || path_entries.len() > 1 {
details.extend(
path_entries
.iter()
.enumerate()
.map(|(index, path)| format!("PATH akode #{}: {path}", index + 1)),
.map(|(index, path)| format!("PATH codex #{}: {path}", index + 1)),
);
}
@@ -3335,7 +3335,7 @@ mod tests {
#[test]
fn config_overrides_from_interactive_preserves_global_options() {
let interactive = TuiCli::parse_from([
"akode",
"codex",
"--oss",
"--local-provider",
"ollama",
@@ -4046,7 +4046,7 @@ mod tests {
async fn mcp_check_fails_required_missing_stdio_command() {
let required_server: McpServerConfig = toml::from_str(
r#"
command = "definitely-missing-akode-doctor-mcp"
command = "definitely-missing-codex-doctor-mcp"
required = true
"#,
)
@@ -4063,7 +4063,7 @@ mod tests {
insta::assert_snapshot!(check.remediation.unwrap(), @"Correct the listed MCP server configuration errors. Alternatively, disable the affected server.");
assert!(check.details.iter().any(|detail| {
detail.contains(
"required: stdio command \"definitely-missing-akode-doctor-mcp\" is not resolvable",
"required: stdio command \"definitely-missing-codex-doctor-mcp\" is not resolvable",
)
}));
}
@@ -4077,7 +4077,7 @@ mod tests {
let cwd = toml::Value::String(cwd.to_string());
let remote_server: McpServerConfig = toml::from_str(&format!(
r#"
command = "definitely-missing-akode-doctor-mcp"
command = "definitely-missing-codex-doctor-mcp"
environment_id = "remote"
cwd = {cwd}
required = true

View File

@@ -2,9 +2,9 @@
source: cli/src/doctor/output.rs
expression: "rendered.replace('\\u{1b}', \"<ESC>\")"
---
<ESC>[38;5;10m✓<ESC>[39m state <ESC>[2m<ESC>[38;5;117m/tmp/logs_2.sqlite<ESC>[39m, <ESC>[38;5;117m~/goals_1.sqlite<ESC>[39m integrity check; try <ESC>[38;5;117m--summary<ESC>[39m or <ESC>[38;5;117mcodex doctor<ESC>[39m<ESC>[0m
<ESC>[38;5;10m✓<ESC>[39m state <ESC>[2m<ESC>[38;5;117m/tmp/logs_2.sqlite<ESC>[39m, <ESC>[38;5;117m~/goals_1.sqlite<ESC>[39m integrity check; try <ESC>[38;5;117m--summary<ESC>[39m or <ESC>[38;5;117makode doctor<ESC>[39m<ESC>[0m
<ESC>[38;5;240mlocations <ESC>[39m see <ESC>[38;5;117m./logs<ESC>[39m, <ESC>[38;5;117m../goals<ESC>[39m. C:\logs, D:/goals. c:\logs, \\server\share\logs, \\?\C:\logs, \\?\UNC\server\share\logs, \\.\pipe\codex, \??\C:\logs, \DosDevices\C:\logs, \rooted. <ESC>[38;5;117mhttp://localhost:8080<ESC>[39m: <ESC>[38;5;117mhttps://example.com<ESC>[39m; <ESC>[38;5;117mwss://example.com<ESC>[39m) and <ESC>[38;5;117m/tmp/my data/logs_2.sqlite<ESC>[39m
<ESC>[38;5;214m⚠<ESC>[39m state <ESC>[38;5;117m/tmp/logs_2.sqlite<ESC>[39m, <ESC>[38;5;117m~/goals_1.sqlite<ESC>[39m integrity check; try <ESC>[38;5;117m--summary<ESC>[39m or <ESC>[38;5;117mcodex doctor<ESC>[39m
<ESC>[38;5;214m⚠<ESC>[39m state <ESC>[38;5;117m/tmp/logs_2.sqlite<ESC>[39m, <ESC>[38;5;117m~/goals_1.sqlite<ESC>[39m integrity check; try <ESC>[38;5;117m--summary<ESC>[39m or <ESC>[38;5;117makode doctor<ESC>[39m
<ESC>[38;5;240mlocations <ESC>[39m see <ESC>[38;5;117m./logs<ESC>[39m, <ESC>[38;5;117m../goals<ESC>[39m. C:\logs, D:/goals. c:\logs, \\server\share\logs, \\?\C:\logs, \\?\UNC\server\share\logs, \\.\pipe\codex, \??\C:\logs, \DosDevices\C:\logs, \rooted. <ESC>[38;5;117mhttp://localhost:8080<ESC>[39m: <ESC>[38;5;117mhttps://example.com<ESC>[39m; <ESC>[38;5;117mwss://example.com<ESC>[39m) and <ESC>[38;5;117m/tmp/my data/logs_2.sqlite<ESC>[39m
<ESC>[38;5;196m✗<ESC>[39m state <ESC>[38;5;196m/tmp/logs_2.sqlite<ESC>[39m, <ESC>[38;5;196m~/goals_1.sqlite<ESC>[39m integrity check; try <ESC>[38;5;117m--summary<ESC>[39m or <ESC>[38;5;117mcodex doctor<ESC>[39m
<ESC>[38;5;196m✗<ESC>[39m state <ESC>[38;5;196m/tmp/logs_2.sqlite<ESC>[39m, <ESC>[38;5;196m~/goals_1.sqlite<ESC>[39m integrity check; try <ESC>[38;5;117m--summary<ESC>[39m or <ESC>[38;5;117makode doctor<ESC>[39m
<ESC>[38;5;240mlocations <ESC>[39m see <ESC>[38;5;196m./logs<ESC>[39m, <ESC>[38;5;196m../goals<ESC>[39m. C:\logs, D:/goals. c:\logs, \\server\share\logs, \\?\C:\logs, \\?\UNC\server\share\logs, \\.\pipe\codex, \??\C:\logs, \DosDevices\C:\logs, \rooted. <ESC>[38;5;196mhttp://localhost:8080<ESC>[39m: <ESC>[38;5;196mhttps://example.com<ESC>[39m; <ESC>[38;5;196mwss://example.com<ESC>[39m) and <ESC>[38;5;196m/tmp/my data/logs_2.sqlite<ESC>[39m

View File

@@ -99,8 +99,8 @@ use akode_terminal_detection::TerminalName;
// If a sub‑command is given, ignore requirements of the default args.
subcommand_negates_reqs = true,
// The executable is sometimes invoked via a platform‑specific name like
// `akode-x86_64-unknown-linux-musl`, but the help output should always use
// the generic `akode` command name that users run.
// `codex-x86_64-unknown-linux-musl`, but the help output should always use
// the generic `codex` command name that users run.
bin_name = "akode",
override_usage = "akode [OPTIONS] [PROMPT]\n akode [OPTIONS] <COMMAND> [ARGS]"
)]
@@ -1260,8 +1260,8 @@ async fn dispatch_cli(
let socket_path = match proxy_cli.socket_path {
Some(socket_path) => socket_path,
None => {
let akode_home = find_codex_home()?;
akode_app_server::app_server_control_socket_path(&akode_home)?
let codex_home = find_codex_home()?;
akode_app_server::app_server_control_socket_path(&codex_home)?
}
};
akode_stdio_to_uds::run(socket_path.as_path()).await?;
@@ -1695,27 +1695,27 @@ fn profile_v2_for_subcommand<'a>(
subcommand: DebugSubcommand::PromptInput(_),
}) => Ok(Some(profile_v2)),
_ => anyhow::bail!(
"--profile only applies to runtime commands, `akode mcp`, and `akode migrate-nfs-db`: `akode`, `akode exec`, `akode review`, `akode resume`, `akode queue`, `akode archive`, `akode delete`, `akode unarchive`, `akode fork`, `akode mcp`, `akode migrate-nfs-db`, `akode sandbox`, and `akode debug prompt-input`."
"--profile only applies to runtime commands, `akode mcp`, and `akode migrate-nfs-db`: `codex`, `akode exec`, `akode review`, `akode resume`, `akode queue`, `akode archive`, `akode delete`, `akode unarchive`, `akode fork`, `akode mcp`, `akode migrate-nfs-db`, `akode sandbox`, and `akode debug prompt-input`."
),
}
}
async fn enable_feature_in_config(feature: &str) -> anyhow::Result<()> {
FeatureToggles::validate_feature(feature)?;
let akode_home = find_codex_home()?;
ConfigEditsBuilder::new(&akode_home)
let codex_home = find_codex_home()?;
ConfigEditsBuilder::new(&codex_home)
.set_feature_enabled(feature, /*enabled*/ true)
.apply()
.await?;
println!("Enabled feature `{feature}` in config.toml.");
maybe_print_under_development_feature_warning(&akode_home, feature);
maybe_print_under_development_feature_warning(&codex_home, feature);
Ok(())
}
async fn disable_feature_in_config(feature: &str) -> anyhow::Result<()> {
FeatureToggles::validate_feature(feature)?;
let akode_home = find_codex_home()?;
ConfigEditsBuilder::new(&akode_home)
let codex_home = find_codex_home()?;
ConfigEditsBuilder::new(&codex_home)
.set_feature_enabled(feature, /*enabled*/ false)
.apply()
.await?;
@@ -1728,10 +1728,10 @@ fn loader_overrides_for_profile(
) -> anyhow::Result<LoaderOverrides> {
match profile_v2 {
Some(profile_v2) => {
let akode_home = find_codex_home()?;
let codex_home = find_codex_home()?;
Ok(loader_overrides_for_profile_at_codex_home(
Some(profile_v2),
&akode_home,
&codex_home,
))
}
None => Ok(LoaderOverrides::default()),
@@ -1740,11 +1740,11 @@ fn loader_overrides_for_profile(
fn loader_overrides_for_profile_at_codex_home(
profile_v2: Option<&ProfileV2Name>,
akode_home: &std::path::Path,
codex_home: &std::path::Path,
) -> LoaderOverrides {
match profile_v2 {
Some(profile_v2) => LoaderOverrides {
user_config_path: Some(resolve_profile_v2_config_path(akode_home, profile_v2)),
user_config_path: Some(resolve_profile_v2_config_path(codex_home, profile_v2)),
user_config_profile: Some(profile_v2.clone()),
..Default::default()
},
@@ -1752,7 +1752,7 @@ fn loader_overrides_for_profile_at_codex_home(
}
}
fn maybe_print_under_development_feature_warning(akode_home: &std::path::Path, feature: &str) {
fn maybe_print_under_development_feature_warning(codex_home: &std::path::Path, feature: &str) {
let Some(spec) = FEATURES.iter().find(|spec| spec.key == feature) else {
return;
};
@@ -1760,7 +1760,7 @@ fn maybe_print_under_development_feature_warning(akode_home: &std::path::Path, f
return;
}
let config_path = akode_home.join(akode_config::CONFIG_TOML_FILE);
let config_path = codex_home.join(akode_config::CONFIG_TOML_FILE);
eprintln!(
"Under-development features enabled: {feature}. Under-development features are incomplete and may behave unpredictably. To suppress this warning, set `suppress_unstable_features_warning = true` in {}.",
config_path.display()
@@ -2338,7 +2338,7 @@ fn finalize_resume_interactive(
mut resume_cli: TuiCli,
) -> TuiCli {
// Start with the parsed interactive CLI so resume shares the same
// configuration surface area as `akode` without additional flags.
// configuration surface area as `codex` without additional flags.
// Clap assigns the first positional to `session_id`. With `--last`, reinterpret it as the
// prompt when no second positional prompt was provided.
let resume_session_id = if last && resume_cli.prompt.is_none() {
@@ -2372,7 +2372,7 @@ fn finalize_fork_interactive(
mut fork_cli: TuiCli,
) -> TuiCli {
// Start with the parsed interactive CLI so fork shares the same
// configuration surface area as `akode` without additional flags.
// configuration surface area as `codex` without additional flags.
// Clap assigns the first positional to `session_id`. With `--last`, reinterpret it as the
// prompt when no second positional prompt was provided.
let fork_session_id = if last && fork_cli.prompt.is_none() {
@@ -2494,7 +2494,7 @@ mod tests {
async fn updater_http_client_factory_honors_respect_system_proxy() {
let akode_home = tempfile::tempdir().expect("temporary aKode home");
let config = ConfigBuilder::default()
.akode_home(akode_home.path().to_path_buf())
.codex_home(codex_home.path().to_path_buf())
.cli_overrides(vec![(
"features.respect_system_proxy".to_string(),
toml::Value::Boolean(true),
@@ -2540,7 +2540,7 @@ enabled = true
let mut overrides = LoaderOverrides::without_managed_config_for_tests();
overrides.system_requirements_path = Some(requirements);
let config = ConfigBuilder::default()
.akode_home(home.path().to_path_buf())
.codex_home(home.path().to_path_buf())
.loader_overrides(overrides)
.build()
.await
@@ -2688,15 +2688,15 @@ enabled = true
#[test]
fn profile_loader_overrides_use_explicit_codex_home() -> anyhow::Result<()> {
let akode_home = tempfile::tempdir()?;
let codex_home = tempfile::tempdir()?;
let profile: ProfileV2Name = "work".parse()?;
let overrides =
loader_overrides_for_profile_at_codex_home(Some(&profile), akode_home.path());
loader_overrides_for_profile_at_codex_home(Some(&profile), codex_home.path());
assert_eq!(
overrides.user_config_path,
Some(resolve_profile_v2_config_path(akode_home.path(), &profile))
Some(resolve_profile_v2_config_path(codex_home.path(), &profile))
);
assert_eq!(overrides.user_config_profile, Some(profile));
Ok(())
@@ -3044,8 +3044,8 @@ enabled = true
}
fn default_app_server_socket_path() -> AbsolutePathBuf {
let akode_home = find_codex_home().expect("akode home");
akode_app_server::app_server_control_socket_path(&akode_home)
let codex_home = find_codex_home().expect("codex home");
akode_app_server::app_server_control_socket_path(&codex_home)
.expect("default app-server socket path")
}
@@ -3566,7 +3566,7 @@ enabled = true
vec![
"Token usage: total=2 input=0 output=2",
"To continue this session, run:",
" \u{1b}[36mcodex resume 123e4567-e89b-12d3-a456-426614174000\u{1b}[39m",
" \u{1b}[36makode resume 123e4567-e89b-12d3-a456-426614174000\u{1b}[39m",
]
);
}
@@ -3598,8 +3598,8 @@ enabled = true
vec![
"Token usage: total=2 input=0 output=2",
"To continue this session, run:",
" \u{1b}[36mcodex resume 123e4567-e89b-12d3-a456-426614174000\u{1b}[39m",
"Or run \u{1b}[36mcodex resume\u{1b}[39m and select \u{1b}[36mmy-thread\u{1b}[39m.",
" \u{1b}[36makode resume 123e4567-e89b-12d3-a456-426614174000\u{1b}[39m",
"Or run \u{1b}[36makode resume\u{1b}[39m and select \u{1b}[36mmy-thread\u{1b}[39m.",
]
);
}
@@ -4396,7 +4396,7 @@ enabled = true
"--ws-auth",
"capability-token",
"--ws-token-file",
"/tmp/akode-token",
"/tmp/codex-token",
]
.as_ref(),
);
@@ -4406,7 +4406,7 @@ enabled = true
);
assert_eq!(
app_server.auth.ws_token_file,
Some(PathBuf::from("/tmp/akode-token"))
Some(PathBuf::from("/tmp/codex-token"))
);
}
@@ -4419,7 +4419,7 @@ enabled = true
"--ws-auth",
"signed-bearer-token",
"--ws-shared-secret-file",
"/tmp/akode-secret",
"/tmp/codex-secret",
"--ws-issuer",
"issuer",
"--ws-audience",
@@ -4435,7 +4435,7 @@ enabled = true
);
assert_eq!(
app_server.auth.ws_shared_secret_file,
Some(PathBuf::from("/tmp/akode-secret"))
Some(PathBuf::from("/tmp/codex-secret"))
);
assert_eq!(app_server.auth.ws_issuer.as_deref(), Some("issuer"));
assert_eq!(app_server.auth.ws_audience.as_deref(), Some("audience"));

View File

@@ -9,5 +9,5 @@ akode fork --worktree --last: `akode fork --worktree` requires an explicit sessi
akode exec resume --worktree session: `--worktree` cannot resume an existing session; use `akode exec fork --worktree`
akode exec review --worktree: `--worktree` is not supported for code review
akode resume --worktree session: `--worktree` supports new interactive sessions, `akode fork`, `akode exec`, and `akode exec fork`
codex archive session --worktree: `--worktree` supports new interactive sessions, `akode fork`, `akode exec`, and `akode exec fork`
codex queue --thread session --message hi --worktree: `--worktree` supports new interactive sessions, `akode fork`, `akode exec`, and `akode exec fork`
akode archive session --worktree: `--worktree` supports new interactive sessions, `akode fork`, `akode exec`, and `akode exec fork`
akode queue --thread session --message hi --worktree: `--worktree` supports new interactive sessions, `akode fork`, `akode exec`, and `akode exec fork`

View File

@@ -131,7 +131,7 @@ fn agents_reject_inputs_that_cannot_be_applied() -> Result<()> {
#[test]
fn app_server_emits_json_info_events() -> Result<()> {
let codex_home = TempDir::new()?;
let event = app_server_json_shutdown_event("codex", &["app-server"], codex_home.path())?;
let event = app_server_json_shutdown_event("akode", &["app-server"], codex_home.path())?;
assert_eq!(
event,

View File

@@ -29,8 +29,8 @@ fn winget_package_starts_and_reselects_daemon() -> Result<()> {
for helper in [
"akode-code-mode-host.exe",
"akode-path/rg.exe",
"akode-resources/codex-command-runner.exe",
"akode-resources/codex-windows-sandbox-setup.exe",
"akode-resources/akode-command-runner.exe",
"akode-resources/akode-windows-sandbox-setup.exe",
] {
std::fs::write(package.join(helper), b"runtime fixture")?;
}

View File

@@ -246,7 +246,7 @@ async fn daemon_startup(command: &str) -> Result<()> {
let managed = home
.path()
.join("packages/app-server-daemon/current/bin")
.join(if cfg!(windows) { "akode.exe" } else { "codex" });
.join(if cfg!(windows) { "akode.exe" } else { "akode" });
fs::create_dir_all(home.path().join("packages/app-server-daemon/current/bin"))?;
// Hard links change the executable's ctime and invalidate Rosetta's translation cache.
#[cfg(unix)]

View File

@@ -55,7 +55,7 @@ where
let initialized_response = json!({
"id": initialize["id"],
"result": {
"userAgent": "codex_cli_rs/0.0.0-test",
"userAgent": "akode_cli_rs/0.0.0-test",
"codexHome": codex_home,
},
});

View File

@@ -269,7 +269,7 @@ trust_level = "trusted"
let _daemon = if backend == "daemon" {
let bin = home.join("packages/app-server-daemon/current/bin");
fs::create_dir_all(&bin)?;
let managed = bin.join(if cfg!(windows) { "akode.exe" } else { "codex" });
let managed = bin.join(if cfg!(windows) { "akode.exe" } else { "akode" });
// Hard links change the executable's ctime and invalidate Rosetta's translation cache.
#[cfg(unix)]
std::os::unix::fs::symlink(program.canonicalize()?, &managed)?;