aKode: rimossa la memoria nativa di Codex e le funzioni senza codice; meno chiamate al modello
Memoria nativa (memories) rimossa del tutto: - features: memories, memory_tool, external_agent_memory_import, chronicle (alias telepathy) diventano Removed; le chiavi restano accettate e memories/memory_tool/[memories] producono un solo avviso senza link («La sezione [memories] e la chiave memory_tool non sono più usate da aKode: la memoria a lungo termine è il plugin memoria di imeAI.»). - Tolti i crate memories/read, memories/write ed ext/memories, l'avvio della pipeline a ogni turno (app-server), l'estensione, /memories e la richiesta di attivazione nella TUI, `akode debug clear-memories`, l'importazione delle memorie da altri agenti (memory_import.rs, detect/memory.rs; il resto di /import resta). - core: niente più MemoriesConfig, citazioni delle memorie, metriche e marcatura «polluted» dei thread; [memories] (MemoriesToml) resta solo come sezione accettata e ignorata. - state: memories_1.sqlite e memories_v2_1.sqlite non vengono più aperti né cancellati; la colonna threads.memory_mode resta, nessuna migrazione. - Protocollo app-server invariato per compatibilità col daemon: memory/reset risponde «non supportato» senza cancellare nulla, memory/status non è mai pronto, thread/memory/read non ha riassunto. Altre rimozioni: - I 14 flag dell'app desktop di OpenAI senza codice (tool_suggest, in_app_*, browser_use*, computer_use, bedrock_setup_wizard, workspace_dependencies) e analytics_plan_history: Removed, chiavi accettate; analytics_plan_history esce da /experimental. - Skill: tolto l'esperimento «shadow selection» e i selettori collegati. Meno chiamate al modello non richieste: - Titoli dei thread: il primo messaggio dell'utente su una riga, troncato a 36 caratteri; `[tui] auto_title = true` riattiva i titoli generati. - `[tui] auto_recap` predefinito false; `goals` spento di default. Privacy: installation_id e gli id di sessione/thread/finestra (e il blocco dei metadati del turno che li ripete) vanno in client_metadata e negli header di compatibilità solo ai provider locali (loopback, IP privati 10/8, 172.16/12, 192.168/16, host .local/.lan). Domini OpenAI: tolti i link visibili (avviso dei flag deprecati, profili, bubblewrap), l'attribuzione Codex nei commit (sempre spenta), la riscrittura dell'URL della documentazione OpenAI via MCP e la registrazione remota dell'exec-server verso host OpenAI (ora solo loopback); il riconoscimento delle destinazioni OpenAI confronta i domini etichetta per etichetta. Il binario non contiene più «openai.com» né «chatgpt.com». Test adattati (sicurezza compresa: guardian, ruolo ostile, exec-server ora più restrittivo); rimossi solo quelli del codice tolto. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -41,7 +41,6 @@ use akode_config::types::AuthCredentialsStoreMode;
|
||||
use akode_config::types::AuthKeyringBackendKind;
|
||||
use akode_config::types::History;
|
||||
use akode_config::types::McpServerConfig;
|
||||
use akode_config::types::MemoriesConfig;
|
||||
use akode_config::types::ModelAvailabilityNuxConfig;
|
||||
use akode_config::types::Notice;
|
||||
use akode_config::types::OAuthCredentialsStoreMode;
|
||||
@@ -96,7 +95,6 @@ use akode_model_provider_info::built_in_model_providers;
|
||||
use akode_model_provider_info::merge_configured_model_providers;
|
||||
use akode_models_manager::ModelsManagerConfig;
|
||||
use akode_prompts::ResolvedModelMessages;
|
||||
use akode_protocol::MemoryVersion;
|
||||
use akode_protocol::config_types::AltScreenMode;
|
||||
use akode_protocol::config_types::AutoCompactTokenLimitScope;
|
||||
use akode_protocol::config_types::ForcedLoginMethod;
|
||||
@@ -698,6 +696,22 @@ pub const DEFAULT_MAX_REPEATED_FAILURES: u32 = 3;
|
||||
/// Default for `[agent] announce_nudges`.
|
||||
pub const DEFAULT_ANNOUNCE_NUDGES: u32 = 1;
|
||||
|
||||
/// Session delivery of the `memoria` plugin (`[memoria] deliver_sessions`).
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||
pub struct MemoriaDeliveryConfig {
|
||||
pub enabled: bool,
|
||||
pub idle_minutes: u64,
|
||||
}
|
||||
|
||||
impl Default for MemoriaDeliveryConfig {
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
enabled: true,
|
||||
idle_minutes: 10,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Session-start briefing of the `memoria` plugin (`[memoria]`).
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||
pub struct MemoriaBriefingConfig {
|
||||
@@ -915,6 +929,10 @@ pub struct Config {
|
||||
/// Generate automatic TUI recaps. Manual `/recap` remains available when disabled.
|
||||
pub tui_auto_recap: bool,
|
||||
|
||||
/// Ask the model for automatic thread titles (`[tui] auto_title`). When disabled the
|
||||
/// title is the first user message truncated to one line.
|
||||
pub tui_auto_title: bool,
|
||||
|
||||
/// Persisted startup availability NUX state for model tooltips.
|
||||
pub model_availability_nux: ModelAvailabilityNuxConfig,
|
||||
|
||||
@@ -1093,9 +1111,6 @@ pub struct Config {
|
||||
/// Maximum token budget allowed for a goal and default budget for new goals.
|
||||
pub max_goal_token_budget: Option<i64>,
|
||||
|
||||
/// Memories subsystem settings.
|
||||
pub memories: MemoriesConfig,
|
||||
|
||||
/// Directory containing all Codex state (defaults to `~/.akode` but can be
|
||||
/// overridden by the `AKODE_HOME` environment variable).
|
||||
pub codex_home: AbsolutePathBuf,
|
||||
@@ -1253,6 +1268,9 @@ pub struct Config {
|
||||
/// Session-start briefing of the `memoria` plugin (`[memoria]`).
|
||||
pub memoria_briefing: MemoriaBriefingConfig,
|
||||
|
||||
/// Session delivery of the `memoria` plugin (`[memoria]`).
|
||||
pub memoria_delivery: MemoriaDeliveryConfig,
|
||||
|
||||
/// Idle timeout for unsubscribed app-server threads.
|
||||
pub thread_unload_delay: Duration,
|
||||
|
||||
@@ -3643,6 +3661,14 @@ impl Config {
|
||||
},
|
||||
feature_overrides,
|
||||
);
|
||||
if cfg.memories.is_some() {
|
||||
// `[memories]` è accettata ma ignorata: stesso avviso unico di
|
||||
// `[features].memories` e `[features].memory_tool`.
|
||||
configured_features.record_legacy_usage_force(
|
||||
akode_features::REMOVED_MEMORIES_ALIAS,
|
||||
Feature::MemoryTool,
|
||||
);
|
||||
}
|
||||
if cfg.agents.as_ref().and_then(|agents| agents.enabled) == Some(true)
|
||||
&& !configured_features.enabled(Feature::Collab)
|
||||
&& managed_features::project_overrides_legacy_subagent_opt_out(&config_layer_stack)
|
||||
@@ -3787,21 +3813,6 @@ impl Config {
|
||||
));
|
||||
}
|
||||
|
||||
let mut memories = cfg.memories.clone().unwrap_or_default();
|
||||
// Fresh profiles have no V1 context to preserve or warm up before using V2.
|
||||
// Keep explicit selections and transition opt-outs, and fail closed on IO errors.
|
||||
if features.enabled(Feature::MemoryTool)
|
||||
&& memories.version.is_none()
|
||||
&& memories.dual_write != Some(false)
|
||||
&& matches!(
|
||||
tokio::fs::try_exists(codex_home.join(MemoryVersion::V1.directory_name())).await,
|
||||
Ok(false)
|
||||
)
|
||||
{
|
||||
memories.version = Some(MemoryVersion::V2);
|
||||
}
|
||||
let memories_config: MemoriesConfig = memories.into();
|
||||
let memories_root = codex_home.join(memories_config.version.directory_name());
|
||||
|
||||
let profiles_are_active = effective_permission_selection.profiles_are_active(
|
||||
default_permissions_override.as_deref(),
|
||||
@@ -4273,6 +4284,17 @@ impl Config {
|
||||
.clamp(300, 3000),
|
||||
}
|
||||
};
|
||||
let memoria_delivery = {
|
||||
let defaults = MemoriaDeliveryConfig::default();
|
||||
let toml = cfg.memoria.clone().unwrap_or_default();
|
||||
MemoriaDeliveryConfig {
|
||||
enabled: toml.deliver_sessions.unwrap_or(defaults.enabled),
|
||||
idle_minutes: toml
|
||||
.deliver_idle_minutes
|
||||
.unwrap_or(defaults.idle_minutes)
|
||||
.clamp(1, 1440),
|
||||
}
|
||||
};
|
||||
let background_terminal_max_timeout = cfg
|
||||
.background_terminal_max_timeout
|
||||
.unwrap_or(DEFAULT_MAX_BACKGROUND_TERMINAL_TIMEOUT_MS)
|
||||
@@ -4557,14 +4579,11 @@ impl Config {
|
||||
&features,
|
||||
cfg.features.as_ref(),
|
||||
)?;
|
||||
let mut helper_readable_roots: Vec<_> = std::env::var_os("PATH")
|
||||
let helper_readable_roots: Vec<_> = std::env::var_os("PATH")
|
||||
.as_deref()
|
||||
.and_then(|path| permissions::active_arg0_helper_dir(&codex_home, path))
|
||||
.into_iter()
|
||||
.collect();
|
||||
if features.enabled(Feature::MemoryTool) && memories_config.use_memories {
|
||||
helper_readable_roots.push(memories_root);
|
||||
}
|
||||
let effective_permission_profile = constrained_permission_profile.value.get().clone();
|
||||
let (mut effective_file_system_sandbox_policy, effective_network_sandbox_policy) =
|
||||
effective_permission_profile.to_runtime_permissions();
|
||||
@@ -4786,7 +4805,6 @@ impl Config {
|
||||
})
|
||||
})
|
||||
.transpose()?,
|
||||
memories: memories_config,
|
||||
agent_interrupt_message_enabled,
|
||||
codex_home,
|
||||
sqlite,
|
||||
@@ -4877,6 +4895,7 @@ impl Config {
|
||||
max_repeated_failures,
|
||||
announce_nudges,
|
||||
memoria_briefing,
|
||||
memoria_delivery,
|
||||
thread_unload_delay,
|
||||
ghost_snapshot,
|
||||
multi_agent_v2,
|
||||
@@ -4931,7 +4950,8 @@ impl Config {
|
||||
.as_ref()
|
||||
.map(|t| t.show_server_version_notice)
|
||||
.unwrap_or(true),
|
||||
tui_auto_recap: cfg.tui.as_ref().map(|t| t.auto_recap).unwrap_or(/*default*/ true),
|
||||
tui_auto_recap: cfg.tui.as_ref().map(|t| t.auto_recap).unwrap_or(/*default*/ false),
|
||||
tui_auto_title: cfg.tui.as_ref().map(|t| t.auto_title).unwrap_or(/*default*/ false),
|
||||
model_availability_nux: cfg
|
||||
.tui
|
||||
.as_ref()
|
||||
|
||||
Reference in New Issue
Block a user