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

@@ -86,7 +86,7 @@ pub type ExtensionFuture<'a, T> = Pin<Box<dyn Future<Output = T> + Send + 'a>>;
/// are frozen for the runtime and do not include lifecycle-contributor state.
/// Auto-discovered plugin servers are resolved by the plugin manager. Declare
/// executor plugins separately so the host attributes their MCP servers
/// and connectors to the same identity as their other capabilities.
/// to the same identity as their other capabilities.
pub trait McpServerContributor<C: Sync>: Send + Sync {
/// Stable identity used for registration provenance and conflict diagnostics.
fn id(&self) -> &'static str;
@@ -96,12 +96,7 @@ pub trait McpServerContributor<C: Sync>: Send + Sync {
context: McpServerContributionContext<'a, C>,
) -> ExtensionFuture<'a, Vec<McpServerContribution>>;
/// Reads canonical hosted-plugin IDs from published state without discovery or MCP I/O.
fn hosted_plugin_ids(&self, _context: McpServerContributionContext<'_, C>) -> Vec<String> {
Vec::new()
}
/// Declares executor plugins, including those without MCP servers or connectors. Each
/// Declares executor plugins, including those without MCP servers. Each
/// declaration identifies the plugin once; its deferred MCP data cannot change that identity.
/// Return plugins in precedence order: across contributors in registration order, the first
/// plugin wins if several provide the same server. Use the supplied plugin policy for both

View File

@@ -183,7 +183,7 @@ pub struct SelectedPluginIdentity {
}
/// An executor plugin and its deferred MCP data. Callers that only need the identity can drop
/// `mcp` without loading server or connector configuration. A plugin still owns its skills when
/// `mcp` without loading server configuration. A plugin still owns its skills when
/// it has no MCP data.
pub struct SelectedPlugin<'a> {
pub selected_root_id: String,
@@ -199,7 +199,6 @@ pub struct SelectedPluginContribution {
pub plugin_display_name: String,
/// Environment that supplied the plugin, independent of where its MCP servers run.
pub source_environment_id: String,
pub connector_ids: Vec<String>,
pub servers: Vec<(String, McpServerConfig)>,
}
@@ -213,25 +212,12 @@ pub enum McpServerContribution {
},
/// Adds an ordinary extension-owned server with its own HTTP protocol mode.
/// The mode applies only if this registration wins server resolution; it
/// does not grant controller-owned Apps cache or environment authority.
/// does not grant environment authority.
SetWithProtocolMode {
name: String,
config: Box<McpServerConfig>,
protocol_mode: crate::McpProtocolMode,
},
/// Registers the controller-owned Apps server under its reserved name.
HostedApps {
config: Box<McpServerConfig>,
/// Overrides the HTTP protocol mode, or uses the hosted Apps default when absent.
protocol_mode: Option<crate::McpProtocolMode>,
},
/// Attributes Apps connectors to an account-hosted plugin. Plugins from executor folders must
/// use `McpServerContributor::selected_plugins`, even if they only provide Apps connectors.
HostedPluginConnectors {
plugin_id: String,
plugin_display_name: String,
connector_ids: Vec<String>,
},
/// Removes a named MCP server.
Remove { name: String },
}

View File

@@ -43,8 +43,6 @@ pub enum ToolCallOutcome {
/// Provenance captured from the immutable MCP call selected for one tool invocation.
#[derive(Clone, Debug, Eq, PartialEq)]
pub enum McpToolSource {
/// A connector routed through the host-owned Codex Apps MCP server.
Connector,
/// An MCP server whose frozen registration matches the active Codex configuration.
Config,
/// An MCP server registered by a locally loaded plugin.
@@ -78,9 +76,7 @@ impl McpToolContext {
) -> Self {
let tool = call.tool_info().clone();
let registration = call.config().mcp_server_catalog.server(call.server_name());
let source = if tool.connector_id.is_some() && call.is_host_owned_apps() {
McpToolSource::Connector
} else if call.is_selected_plugin_server() {
let source = if call.is_selected_plugin_server() {
McpToolSource::SelectedPlugin
} else if let Some(McpServerSource::Plugin(plugin)) =
registration.map(ResolvedMcpServer::source)