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:
@@ -7,11 +7,8 @@ use codex_utils_plugins::PluginIdentity;
|
||||
use codex_utils_plugins::PluginSkillRoot;
|
||||
use codex_utils_plugins::SkillDiscoveryMode;
|
||||
|
||||
use crate::AppConnectorId;
|
||||
use crate::AppDeclaration;
|
||||
use crate::PluginCapabilitySummary;
|
||||
use crate::PluginHookSource;
|
||||
use crate::app_connector_ids_from_declarations;
|
||||
|
||||
const MAX_CAPABILITY_SUMMARY_DESCRIPTION_LEN: usize = 1024;
|
||||
|
||||
@@ -19,7 +16,6 @@ const MAX_CAPABILITY_SUMMARY_DESCRIPTION_LEN: usize = 1024;
|
||||
#[derive(Debug, Clone, PartialEq)]
|
||||
pub struct LoadedPlugin<M> {
|
||||
pub config_name: String,
|
||||
pub remote_plugin_id: Option<String>,
|
||||
pub manifest_name: Option<String>,
|
||||
pub plugin_namespace: Option<String>,
|
||||
pub manifest_description: Option<String>,
|
||||
@@ -30,7 +26,6 @@ pub struct LoadedPlugin<M> {
|
||||
pub disabled_skill_paths: HashSet<PathUri>,
|
||||
pub has_enabled_skills: bool,
|
||||
pub mcp_servers: HashMap<String, M>,
|
||||
pub apps: Vec<AppDeclaration>,
|
||||
pub hook_sources: Vec<PluginHookSource>,
|
||||
pub hook_load_warnings: Vec<String>,
|
||||
pub error: Option<String>,
|
||||
@@ -67,13 +62,9 @@ fn plugin_capability_summary_from_loaded<M>(
|
||||
description: prompt_safe_plugin_description(plugin.manifest_description.as_deref()),
|
||||
has_skills: plugin.has_enabled_skills,
|
||||
mcp_server_names,
|
||||
app_connector_ids: app_connector_ids_from_declarations(&plugin.apps),
|
||||
};
|
||||
|
||||
(summary.has_skills
|
||||
|| !summary.mcp_server_names.is_empty()
|
||||
|| !summary.app_connector_ids.is_empty())
|
||||
.then_some(summary)
|
||||
(summary.has_skills || !summary.mcp_server_names.is_empty()).then_some(summary)
|
||||
}
|
||||
|
||||
/// Normalizes plugin descriptions for inclusion in model-facing capability summaries.
|
||||
@@ -147,7 +138,6 @@ impl<M: Clone> PluginLoadOutcome<M> {
|
||||
path: path.clone(),
|
||||
plugin_identity: PluginIdentity {
|
||||
plugin_id: plugin.config_name.clone(),
|
||||
remote_plugin_id: plugin.remote_plugin_id.clone(),
|
||||
},
|
||||
plugin_namespace: plugin_namespace.clone(),
|
||||
plugin_root: plugin.root.clone(),
|
||||
@@ -173,15 +163,6 @@ impl<M: Clone> PluginLoadOutcome<M> {
|
||||
mcp_servers
|
||||
}
|
||||
|
||||
pub fn effective_apps(&self) -> Vec<AppConnectorId> {
|
||||
app_connector_ids_from_declarations(
|
||||
self.plugins
|
||||
.iter()
|
||||
.filter(|plugin| plugin.is_active())
|
||||
.flat_map(|plugin| plugin.apps.iter()),
|
||||
)
|
||||
}
|
||||
|
||||
pub fn effective_plugin_hook_sources(&self) -> Vec<PluginHookSource> {
|
||||
self.iter_effective_plugin_hook_sources().cloned().collect()
|
||||
}
|
||||
@@ -227,7 +208,6 @@ mod tests {
|
||||
fn loaded_plugin(config_name: &str, skill_roots: Vec<AbsolutePathBuf>) -> LoadedPlugin<()> {
|
||||
LoadedPlugin {
|
||||
config_name: config_name.to_string(),
|
||||
remote_plugin_id: None,
|
||||
manifest_name: None,
|
||||
plugin_namespace: Some(
|
||||
config_name
|
||||
@@ -243,7 +223,6 @@ mod tests {
|
||||
disabled_skill_paths: HashSet::new(),
|
||||
has_enabled_skills: true,
|
||||
mcp_servers: HashMap::new(),
|
||||
apps: Vec::new(),
|
||||
hook_sources: Vec::new(),
|
||||
hook_load_warnings: Vec::new(),
|
||||
error: None,
|
||||
@@ -253,8 +232,7 @@ mod tests {
|
||||
#[test]
|
||||
fn effective_plugin_skill_roots_preserves_first_plugin_for_shared_root() {
|
||||
let shared_root = test_path("shared-skills");
|
||||
let mut first_plugin = loaded_plugin("zeta@test", vec![shared_root.clone()]);
|
||||
first_plugin.remote_plugin_id = Some("plugins~Plugin_zeta".to_string());
|
||||
let first_plugin = loaded_plugin("zeta@test", vec![shared_root.clone()]);
|
||||
let outcome = PluginLoadOutcome::from_plugins(vec![
|
||||
first_plugin,
|
||||
loaded_plugin("alpha@test", vec![shared_root.clone()]),
|
||||
@@ -266,7 +244,6 @@ mod tests {
|
||||
path: shared_root,
|
||||
plugin_identity: PluginIdentity {
|
||||
plugin_id: "zeta@test".to_string(),
|
||||
remote_plugin_id: Some("plugins~Plugin_zeta".to_string()),
|
||||
},
|
||||
plugin_namespace: "zeta".to_string(),
|
||||
plugin_root: test_path("zeta@test"),
|
||||
|
||||
Reference in New Issue
Block a user