aKode fase 2b-2: rimosso login ChatGPT e tutti i sottosistemi solo-ChatGPT

- Login: resta solo chiave API (+ header, Bedrock). Rimossi OAuth/browser,
  device code, refresh/revoke su auth.openai.com, PAT, agent/workload identity,
  runtime agent instance, backend-client e openapi-models, workspace routing.
- Rimossi: generazione immagini (ext + skill imagegen), history notes, plugin
  remoti (catalogo, sync, share), cyber access program, daybreak, cloud config
  e requirements (config_server ora fail-closed), attestation, frozen cloud
  skills, EMA MCP auth, Codex Apps/connettori, ricerca ospitata, header/zstd/
  routing/cookie del backend Codex, fallback OPENAI_API_KEY del realtime.
- Messaggi d'errore senza link a chatgpt.com.
- Chiavi di config legacy accettate e ignorate; feature rimosse = Stage::Removed.
- Test: cancellati solo quelli del codice rimosso; test di sicurezza
  (sandbox estensioni, permessi, redazione, auth storage, requirements)
  adattati. Restano solo fallimenti d'ambiente (code-mode-host/V8, ~/.agents).
- Istruzioni di sistema invariate.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
andrea.difonzo
2026-11-10 16:20:15 +01:00
parent 82347a58ed
commit 6089fbde91
1573 changed files with 10289 additions and 177679 deletions

View File

@@ -16,7 +16,6 @@ use codex_core_api::AskForApproval;
use codex_core_api::AuthKeyringBackendKind;
use codex_core_api::AuthManager;
use codex_core_api::AutoCompactTokenLimitScope;
use codex_core_api::CodexAppsToolsCache;
use codex_core_api::CodexHomeUserInstructionsProvider;
use codex_core_api::CodexThread;
use codex_core_api::Config;
@@ -68,7 +67,6 @@ use codex_core_api::bootstrap_auth_config;
use codex_core_api::built_in_model_providers;
use codex_core_api::find_codex_home;
use codex_core_api::init_state_db;
use codex_core_api::install_image_generation_extension;
use codex_core_api::item_event_to_server_notification;
use codex_core_api::load_config_toml_with_layer_stack;
use codex_core_api::local_agent_graph_store_from_state_db;
@@ -142,10 +140,7 @@ async fn run_main(arg0_paths: Arg0DispatchPaths) -> anyhow::Result<()> {
let user_instructions_provider = Arc::new(CodexHomeUserInstructionsProvider::new(
config.codex_home.clone(),
));
let mut extensions = ExtensionRegistryBuilder::<Config>::new();
install_image_generation_extension(&mut extensions, auth_manager.clone(), |config: &Config| {
Some(config.codex_home.clone())
});
let extensions = ExtensionRegistryBuilder::<Config>::new();
let startup = codex_core_api::build_startup_models(
&config,
Arc::clone(&auth_manager),
@@ -155,7 +150,6 @@ async fn run_main(arg0_paths: Arg0DispatchPaths) -> anyhow::Result<()> {
let thread_manager = ThreadManager::new(
&config,
startup,
CodexAppsToolsCache::default(),
SessionSource::Exec,
environment_manager,
Arc::new(extensions.build()),
@@ -163,7 +157,6 @@ async fn run_main(arg0_paths: Arg0DispatchPaths) -> anyhow::Result<()> {
passthrough_image_store(),
Arc::clone(&thread_store),
local_agent_graph_store_from_state_db(state_db.as_ref()),
/*attestation_provider*/ None,
/*external_time_provider*/ None,
);
@@ -246,7 +239,6 @@ async fn new_config(
startup_warnings: Vec::new(),
bypass_hook_trust: false,
model,
daybreak_enabled: false,
service_tier: None,
review_model: None,
model_context_window: None,
@@ -286,7 +278,6 @@ async fn new_config(
include_collaboration_mode_instructions: false,
include_skill_instructions: false,
skill_max_context_tokens: None,
cloud_skill_enabled: false,
orchestrator_mcp_enabled: false,
include_environment_context: false,
include_environment_context_time: true,
@@ -327,7 +318,6 @@ async fn new_config(
workspace_roots_explicit: false,
cli_auth_credentials_store_mode: auth_config.auth_credentials_store_mode,
mcp_servers: Constrained::allow_any(HashMap::new()),
mcp_enterprise_managed_auth: None,
non_prefixed_mcp_tool_servers: None,
mcp_oauth_credentials_store_mode,
mcp_oauth_callback_port: None,
@@ -365,11 +355,8 @@ async fn new_config(
model_reasoning_summary: None,
model_catalog: None,
model_verbosity: None,
chatgpt_base_url: auth_config
.chatgpt_base_url
.clone()
.unwrap_or_else(|| "https://chatgpt.com/backend-api/".to_string()),
chatgpt_base_url_is_explicit: auth_config.chatgpt_base_url.is_some(),
chatgpt_base_url: "https://chatgpt.com/backend-api/".to_string(),
chatgpt_base_url_is_explicit: false,
respect_system_proxy,
apps_mcp_product_sku: None,
responses_api_metadata: BTreeMap::new(),
@@ -382,7 +369,7 @@ async fn new_config(
experimental_realtime_ws_startup_context: None,
experimental_realtime_start_instructions: None,
experimental_thread_store: ThreadStoreConfig::Local,
forced_chatgpt_workspace_id: auth_config.forced_chatgpt_workspace_id.clone(),
forced_chatgpt_workspace_id: None,
forced_login_method: auth_config.forced_login_method,
web_search_mode: Constrained::allow_any(WebSearchMode::Disabled),
web_search_config: None,