Marchio: nome inviato ai server MCP e testi residui allineati ad aKode (A)

- il client MCP si presenta come "akode-mcp-client" / titolo "aKode" (prima codex-mcp-client / Codex);
- ILLEGAL_ENV_VAR_PREFIX di arg0 = "AKODE_" (le variabili AKODE_* non si caricano da .env);
- testi per l'utente (errori di contesto, "Trust this folder? aKode can read...", approvazioni,
  firma del baseline, snapshot) riportati come in aKode 0.9.2 dove la differenza era solo di nome.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
andrea.difonzo
2026-11-17 12:55:34 +01:00
parent 203cd7a3f6
commit 47d6f1eb6b
119 changed files with 187 additions and 187 deletions

View File

@@ -4146,7 +4146,7 @@ async fn permissions_profiles_allow_unknown_special_paths() -> std::io::Result<(
);
assert!(
config.startup_warnings.iter().any(|warning| warning.contains(
"Configured filesystem path `:future_special_path` is not recognized by this version of Codex and will be ignored."
"Configured filesystem path `:future_special_path` is not recognized by this version of aKode and will be ignored."
)),
"{:?}",
config.startup_warnings
@@ -4187,7 +4187,7 @@ async fn permissions_profiles_allow_unknown_special_paths_with_nested_entries()
);
assert!(
config.startup_warnings.iter().any(|warning| warning.contains(
"Configured filesystem path `:future_special_path` with nested entry `docs` is not recognized by this version of Codex and will be ignored."
"Configured filesystem path `:future_special_path` with nested entry `docs` is not recognized by this version of aKode and will be ignored."
)),
"{:?}",
config.startup_warnings
@@ -4218,7 +4218,7 @@ async fn permissions_profiles_allow_missing_filesystem_with_warning() -> std::io
);
assert!(
config.startup_warnings.iter().any(|warning| warning.contains(
"Permissions profile `dev` does not define any recognized filesystem entries for this version of Codex."
"Permissions profile `dev` does not define any recognized filesystem entries for this version of aKode."
)),
"{:?}",
config.startup_warnings
@@ -4246,7 +4246,7 @@ async fn permissions_profiles_allow_empty_filesystem_with_warning() -> std::io::
);
assert!(
config.startup_warnings.iter().any(|warning| warning.contains(
"Permissions profile `dev` does not define any recognized filesystem entries for this version of Codex."
"Permissions profile `dev` does not define any recognized filesystem entries for this version of aKode."
)),
"{:?}",
config.startup_warnings
@@ -11136,7 +11136,7 @@ sandbox_mode = "danger-full-access"
assert_eq!(err.kind(), std::io::ErrorKind::InvalidInput);
assert_eq!(
err.to_string(),
"`approval_policy = \"never\"` cannot be used because requirements do not allow `sandbox_mode = \"danger-full-access\"`; Codex would fall back to read-only permissions with approvals disabled. Choose an `approval_policy` based on what you need, such as `on-request`, or choose an allowed sandbox mode."
"`approval_policy = \"never\"` cannot be used because requirements do not allow `sandbox_mode = \"danger-full-access\"`; aKode would fall back to read-only permissions with approvals disabled. Choose an `approval_policy` based on what you need, such as `on-request`, or choose an allowed sandbox mode."
);
Ok(())
}
@@ -11170,7 +11170,7 @@ default_permissions = "dev"
assert_eq!(err.kind(), std::io::ErrorKind::InvalidInput);
assert_eq!(
err.to_string(),
"`approval_policy = \"never\"` cannot be used because requirements do not allow `sandbox_mode = \"danger-full-access\"`; Codex would fall back to read-only permissions with approvals disabled. Choose an `approval_policy` based on what you need, such as `on-request`, or choose an allowed sandbox mode."
"`approval_policy = \"never\"` cannot be used because requirements do not allow `sandbox_mode = \"danger-full-access\"`; aKode would fall back to read-only permissions with approvals disabled. Choose an `approval_policy` based on what you need, such as `on-request`, or choose an allowed sandbox mode."
);
Ok(())
}

View File

@@ -509,7 +509,7 @@ impl Permissions {
}
/// Workspace roots that came from user-visible configuration or runtime
/// selection. Internal aKode-only writable roots are intentionally excluded.
/// selection. Internal Codex-only writable roots are intentionally excluded.
pub fn user_visible_workspace_roots(&self) -> &[AbsolutePathBuf] {
&self.workspace_roots
}
@@ -642,7 +642,7 @@ impl Permissions {
}
// A profile override only inherits the selected profile's proxy/allowlist config
// when aKode is still responsible for the network policy. `Disabled` means no
// when Codex is still responsible for the network policy. `Disabled` means no
// outer sandbox, so starting the managed proxy would narrow the override.
fn profile_allows_configured_network_proxy(permission_profile: &PermissionProfile) -> bool {
match permission_profile {
@@ -844,23 +844,23 @@ pub struct Config {
/// Compact prompt override.
pub compact_prompt: Option<String>,
/// Optional external notifier command. When set, aKode will spawn this
/// Optional external notifier command. When set, Codex will spawn this
/// program after each completed *turn* (i.e. when the agent finishes
/// processing a user submission). The value must be the full command
/// broken into argv tokens **without** the trailing JSON argument - aKode
/// broken into argv tokens **without** the trailing JSON argument - Codex
/// appends one extra argument containing a JSON payload describing the
/// event.
///
/// Example `~/.akode/config.toml` snippet:
///
/// ```toml
/// notify = ["notify-send", "aKode"]
/// notify = ["notify-send", "Codex"]
/// ```
///
/// which will be invoked as:
///
/// ```shell
/// notify-send aKode '{"type":"agent-turn-complete","turn-id":"12345"}'
/// notify-send Codex '{"type":"agent-turn-complete","turn-id":"12345"}'
/// ```
///
/// If unset the feature is disabled.
@@ -988,12 +988,12 @@ pub struct Config {
pub workspace_roots_explicit: bool,
/// Preferred store for CLI auth credentials.
/// file (default): Use a file in the aKode home directory.
/// file (default): Use a file in the Codex home directory.
/// keyring: Use an OS-specific keyring service.
/// auto: Use the OS-specific keyring service if available, otherwise use a file.
pub cli_auth_credentials_store_mode: AuthCredentialsStoreMode,
/// Definition for MCP servers that aKode can reach out to for tool calls.
/// Definition for MCP servers that Codex can reach out to for tool calls.
pub mcp_servers: Constrained<HashMap<String, McpServerConfig>>,
/// When present, only these MCP servers omit the legacy `mcp__` namespace prefix.
@@ -1001,16 +1001,16 @@ pub struct Config {
/// Preferred store for MCP OAuth credentials.
/// keyring: Use an OS-specific keyring service.
/// Credentials stored in the keyring will only be readable by aKode unless the user explicitly grants access via OS-level keyring access.
/// Credentials stored in the keyring will only be readable by Codex unless the user explicitly grants access via OS-level keyring access.
/// https://github.com/openai/codex/blob/main/akode-rs/rmcp-client/src/oauth.rs#L2
/// file: AKODE_HOME/.credentials.json
/// This file will be readable to aKode and other applications running as the same user.
/// This file will be readable to Codex and other applications running as the same user.
/// auto (default): keyring if available, otherwise file.
pub mcp_oauth_credentials_store_mode: OAuthCredentialsStoreMode,
/// Optional fixed port to use for the local HTTP callback server used during MCP OAuth login.
///
/// When unset, aKode will bind to an ephemeral port chosen by the OS.
/// When unset, Codex will bind to an ephemeral port chosen by the OS.
pub mcp_oauth_callback_port: Option<u16>,
/// Optional redirect URI to use during MCP OAuth login.
@@ -1062,11 +1062,11 @@ pub struct Config {
/// Memories subsystem settings.
pub memories: MemoriesConfig,
/// Directory containing all aKode state (defaults to `~/.akode` but can be
/// Directory containing all Codex state (defaults to `~/.akode` but can be
/// overridden by the `AKODE_HOME` environment variable).
pub codex_home: AbsolutePathBuf,
/// Resolved configuration shared by all aKode SQLite databases.
/// Resolved configuration shared by all Codex SQLite databases.
pub sqlite: akode_state::SqliteConfig,
/// Directory for log files (defaults to `$AKODE_HOME/log`).
@@ -1096,7 +1096,7 @@ pub struct Config {
/// output will be hyperlinked using the specified URI scheme.
pub file_opener: UriBasedFileOpener,
/// Path to the current aKode executable. This cannot be set in the config
/// Path to the current Codex executable. This cannot be set in the config
/// file: it must be set in code via [`ConfigOverrides`].
pub codex_self_exe: Option<PathBuf>,
@@ -1136,7 +1136,7 @@ pub struct Config {
/// Optional verbosity control for GPT-5 models (Responses API `text.verbosity`).
pub model_verbosity: Option<Verbosity>,
/// Whether aKode-owned clients should respect host system proxy settings.
/// Whether Codex-owned clients should respect host system proxy settings.
pub respect_system_proxy: bool,
/// Optional product SKU forwarded to the host-owned apps MCP server.
@@ -1246,8 +1246,8 @@ pub struct Config {
/// Collection of various notices we show the user
pub notices: Notice,
/// When `true`, checks for aKode updates on startup and surfaces update prompts.
/// Set to `false` only if your aKode updates are centrally managed.
/// When `true`, checks for Codex updates on startup and surfaces update prompts.
/// Set to `false` only if your Codex updates are centrally managed.
/// Defaults to `true`.
pub check_for_update_on_startup: bool,
@@ -2121,7 +2121,7 @@ impl Config {
.await
}
/// Load a default configuration for a specific aKode home without reading
/// Load a default configuration for a specific Codex home without reading
/// user, project, or system config layers.
pub async fn load_default_with_cli_overrides_for_codex_home(
codex_home: PathBuf,
@@ -5264,7 +5264,7 @@ fn normalize_guardian_policy_config(value: Option<&str>) -> Option<String> {
})
}
/// Returns the path to the aKode configuration directory, which can be
/// Returns the path to the Codex configuration directory, which can be
/// specified by the `AKODE_HOME` environment variable. If not set, defaults to
/// `~/.akode`.
///
@@ -5276,7 +5276,7 @@ pub fn find_codex_home() -> std::io::Result<AbsolutePathBuf> {
akode_utils_home_dir::find_codex_home()
}
/// Returns the path to the folder where aKode logs are stored. Does not verify
/// Returns the path to the folder where Codex logs are stored. Does not verify
/// that the directory exists.
pub fn log_dir(cfg: &Config) -> std::io::Result<PathBuf> {
Ok(cfg.log_dir.clone())