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

@@ -2,7 +2,6 @@ use std::sync::Arc;
use crate::HostSkillsSnapshot;
use crate::InjectedHostSkillPrompts;
use codex_exec_server::LOCAL_ENVIRONMENT_ID;
use codex_extension_api::ConfigContributor;
use codex_extension_api::ContextContributor;
use codex_extension_api::ContextualUserFragment;
@@ -70,9 +69,6 @@ use crate::tools::skill_tools;
use crate::warnings::bounded_warnings;
use crate::world_state_catalogs::render_world_state_sections;
#[path = "cloud_skill.rs"]
mod cloud_skill;
struct SkillsExtension<C> {
providers: SkillProviders,
event_sink: Arc<dyn ExtensionEventSink>,
@@ -150,14 +146,8 @@ where
mcp_resources: input.mcp_resource_client.clone(),
extension_metrics: input.extension_metrics.clone(),
});
let cloud_skills_available = self.providers.has_cloud_provider()
&& !input
.environments
.iter()
.any(|environment| environment.environment_id == LOCAL_ENVIRONMENT_ID);
input.thread_store.insert(SkillsThreadState::new(
(self.config_from_host)(input.config),
cloud_skills_available,
input.extension_metrics,
));
})
@@ -179,10 +169,8 @@ where
if let Some(state) = thread_store.get::<SkillsThreadState>() {
state.set_config(next_config);
} else {
let cloud_skills_available = self.providers.has_cloud_provider();
thread_store.insert(SkillsThreadState::new(
next_config,
cloud_skills_available,
session_store
.get::<SkillsSessionState>()
.and_then(|state| state.extension_metrics.clone()),
@@ -216,7 +204,6 @@ where
host_snapshot: None,
include_host_skills: false,
include_bundled_skills: config.bundled_skills_enabled,
include_cloud_skills: false,
mcp_resources: session_store
.get::<SkillsSessionState>()
.and_then(|state| state.mcp_resources.clone()),
@@ -360,8 +347,7 @@ where
host_snapshot: host_snapshot.clone(),
include_host_skills: host_skills.is_none() && !host_catalog_in_world_state,
include_bundled_skills: config.bundled_skills_enabled,
// Cloud and executor catalogs come from the prepared step snapshot.
include_cloud_skills: false,
// Executor catalogs come from the prepared step snapshot.
mcp_resources: mcp_resources.clone(),
executor_capability_discovery: None,
executor_capability_discovery_v2: None,
@@ -401,7 +387,6 @@ where
let mut turn_catalog = catalog.clone();
turn_catalog.entries.retain(|entry| {
entry.authority.kind != SkillSourceKind::Executor
&& entry.authority.kind != SkillSourceKind::Cloud
});
let model_info = thread_store.get::<ModelInfo>();
let include_usage = model_info
@@ -537,7 +522,6 @@ impl<C> SkillsExtension<C> {
input: &TurnInputContext<'_>,
) -> Result<SkillReadResult, String> {
let context = match entry.authority.kind {
SkillSourceKind::Cloud => SkillReadContext::Cloud { mcp_resources },
SkillSourceKind::Custom(_) => SkillReadContext::Custom { mcp_resources },
SkillSourceKind::Host => SkillReadContext::Host {
host_snapshot,
@@ -631,7 +615,6 @@ pub fn install_with_providers_and_metrics<C>(
});
registry.thread_lifecycle_contributor(extension.clone());
registry.turn_lifecycle_contributor(Arc::new(SkillTelemetry));
registry.turn_lifecycle_contributor(extension.clone());
registry.config_contributor(extension.clone());
registry.prompt_contributor(extension.clone());
registry.turn_input_contributor(extension.clone());