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

@@ -10,14 +10,6 @@ use toml::Value as TomlValue;
use super::stack::RequirementsCompositionError;
// Authentication requirements that cloud-managed layers cannot set.
const LOCAL_ONLY_AUTH_REQUIREMENTS: &[&str] = &[
"allowed_login_methods",
"allowed_chatgpt_workspaces",
"cli_auth_credentials_store",
"chatgpt_base_url",
];
#[derive(Clone, Debug)]
pub struct RequirementsLayerEntry {
pub(super) source: RequirementSource,
@@ -102,19 +94,6 @@ impl ComposableRequirementsLayer {
.map(|base_dir| AbsolutePathBufGuard::new(base_dir.as_path()));
let mut regular_toml = parse_layer_toml(&toml, &source)?;
if matches!(source, RequirementSource::EnterpriseManaged { .. })
&& regular_toml.get("config_server").is_some()
{
return Err(RequirementsCompositionError::Parse {
layer_source: source.clone(),
message: "config_server may only be configured in local managed requirements"
.into(),
});
}
// These fields can only be set locally; ignore them before validating cloud policy.
strip_cloud_auth_requirements(&source, &mut regular_toml);
// Provider fragments can be incomplete until all requirements layers
// are merged. Resolve explicit paths while their source base is still
// available, without deserializing complete auth command objects.
@@ -293,14 +272,6 @@ fn strip_special_fields(layer_toml: &mut TomlValue) {
remove_nested_field_and_prune_empty(layer_toml, &["auto_review", "required_on_models"]);
}
pub(crate) fn strip_cloud_auth_requirements(source: &RequirementSource, value: &mut TomlValue) {
if matches!(source, RequirementSource::EnterpriseManaged { .. }) {
for field in LOCAL_ONLY_AUTH_REQUIREMENTS {
remove_top_level_field(value, field);
}
}
}
fn remove_top_level_field(value: &mut TomlValue, key: &str) -> Option<TomlValue> {
value.as_table_mut()?.remove(key)
}