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

@@ -1,22 +1,12 @@
//! Read-only installed-version selection and persisted installation identity.
//! Read-only installed-version selection.
use codex_utils_absolute_path::AbsolutePathBuf;
use semver::Version;
use serde::Deserialize;
use serde::Serialize;
use std::cmp::Ordering;
use std::fs;
pub const DEFAULT_PLUGIN_VERSION: &str = "local";
pub const PLUGINS_CACHE_DIR: &str = "plugins/cache";
pub const REMOTE_PLUGIN_INSTALL_METADATA_FILE: &str = ".codex-remote-plugin-install.json";
pub const REMOTE_PLUGIN_INSTALL_METADATA_SCHEMA_VERSION: u8 = 1;
#[derive(Debug, Deserialize, Serialize)]
pub struct RemotePluginInstallMetadata {
pub schema_version: u8,
pub remote_plugin_id: String,
}
pub fn validate_plugin_version_segment(plugin_version: &str) -> Result<(), String> {
if plugin_version.is_empty() {
@@ -66,23 +56,3 @@ pub fn active_plugin_version(plugin_base_root: &AbsolutePathBuf) -> Option<Strin
discovered_versions.pop()
}
}
/// Validates persisted installation metadata and returns its normalized remote identity.
pub fn parse_remote_plugin_id(contents: &str) -> Result<String, String> {
let metadata: RemotePluginInstallMetadata = serde_json::from_str(contents)
.map_err(|err| format!("failed to parse remote plugin install metadata: {err}"))?;
if metadata.schema_version != REMOTE_PLUGIN_INSTALL_METADATA_SCHEMA_VERSION {
return Err(format!(
"unsupported remote plugin install metadata schema version: {}",
metadata.schema_version
));
}
let remote_plugin_id = metadata.remote_plugin_id.trim();
if remote_plugin_id.is_empty() {
return Err(
"invalid remote plugin install metadata: remote plugin id must not be blank"
.to_string(),
);
}
Ok(remote_plugin_id.to_string())
}