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

@@ -97,7 +97,6 @@ fn plugin_skill_root_for_skill_path(
path: skills_root.abs(),
plugin_identity: PluginIdentity {
plugin_id: plugin_id.to_string(),
remote_plugin_id: None,
},
plugin_namespace: plugin_namespace.to_string(),
plugin_root: plugin_root.abs(),
@@ -432,7 +431,6 @@ async fn snapshot_for_config_preserves_host_precedence_for_symlinked_plugin_root
),
scope: SkillScope::User,
plugin_id: None,
remote_plugin_id: None,
}]
);
}
@@ -502,91 +500,6 @@ async fn skills_list_snapshots_share_host_roots_only_within_one_request() {
);
}
#[tokio::test]
async fn skills_for_config_refreshes_cache_when_remote_plugin_id_changes() {
let codex_home = tempfile::tempdir().expect("tempdir");
let cwd = tempfile::tempdir().expect("tempdir");
let skill_path = write_plugin_skill(
&codex_home,
"test",
"sample",
"sample-search",
"sample-search",
"search sample data",
);
let config_layer_stack = config_stack(&codex_home, "");
let mut plugin_skill_root =
plugin_skill_root_for_skill_path(&skill_path, "sample@test", "sample");
let skills_service = HostSkillsService::new(
codex_home.path().abs(),
/*bundled_skills_enabled*/ true,
);
let plugin_input = HostSkillsLoadInput::new(
cwd.path().abs(),
vec![plugin_skill_root.clone()],
config_layer_stack.clone(),
)
.with_plugin_skill_snapshots(Some(test_plugin_skill_snapshots()));
let plugin_snapshot = skills_service
.snapshot_for_config(
&plugin_input,
Some(&codex_exec_server::FileSystemEnvironmentAccessor::unrestricted(&LOCAL_FS)),
)
.await;
fs::write(
&skill_path,
"---\nname: sample-search\ndescription: updated sample data\n---\n\n# Body\n",
)
.expect("update plugin skill");
let listing_input = plugin_input
.clone()
.with_plugin_skill_snapshots(/*plugin_skill_snapshots*/ None);
let listing_snapshot = skills_service
.for_request()
.snapshot_for_cwd(
&listing_input,
/*force_reload*/ false,
Some(Arc::clone(&LOCAL_FS)),
)
.await;
assert_eq!(
(
plugin_snapshot
.outcome()
.skills
.iter()
.find(|skill| skill.name == "sample:sample-search")
.map(|skill| skill.description.as_str()),
listing_snapshot
.outcome()
.skills
.iter()
.find(|skill| skill.name == "sample:sample-search")
.map(|skill| skill.description.as_str()),
),
(Some("search sample data"), Some("updated sample data"))
);
plugin_skill_root.plugin_identity.remote_plugin_id = Some("plugins~Plugin_sample".to_string());
let refreshed = skills_for_config_with_stack(
&skills_service,
&cwd,
&config_layer_stack,
&[plugin_skill_root],
)
.await;
assert_eq!(
refreshed
.skills
.iter()
.find(|skill| skill.name == "sample:sample-search")
.and_then(|skill| skill.remote_plugin_id.as_deref()),
Some("plugins~Plugin_sample")
);
}
#[tokio::test]
async fn set_extra_roots_replaces_runtime_roots_and_clears_cache() {
let codex_home = tempfile::tempdir().expect("tempdir");