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:
@@ -9,44 +9,23 @@ use serde_json::Map;
|
||||
use serde_json::Value;
|
||||
|
||||
/// Projects privileged capabilities only to their intended recipients.
|
||||
/// Verification requires the host-owned plugin service; network policy requires a trusted
|
||||
/// ChatGPT origin. Server names and caller-supplied capabilities do not grant either privilege.
|
||||
pub(crate) fn server_mcp_extensions(
|
||||
extensions: &ClientMcpExtensions,
|
||||
server_name: &str,
|
||||
server: Option<&crate::catalog::ResolvedMcpServer>,
|
||||
advertise_network_policy: bool,
|
||||
chatgpt_base_url: &str,
|
||||
) -> ClientMcpExtensions {
|
||||
let plugin_service = server.is_some_and(|server| {
|
||||
server
|
||||
.source()
|
||||
.is_host_owned_apps(server_name, server.config())
|
||||
});
|
||||
let network_policy = advertise_network_policy
|
||||
&& server.is_some_and(|server| {
|
||||
crate::mcp::is_trusted_chatgpt_mcp_server(&server.config().transport, chatgpt_base_url)
|
||||
});
|
||||
/// User verification required the hosted plugin service and network policy metadata was only
|
||||
/// offered to trusted hosted origins; aKode never connects to either, so both are stripped for
|
||||
/// every server. Server names and caller-supplied capabilities grant neither.
|
||||
pub(crate) fn server_mcp_extensions(extensions: &ClientMcpExtensions) -> ClientMcpExtensions {
|
||||
ClientMcpExtensions::new(
|
||||
extensions
|
||||
.iter()
|
||||
.filter(|(id, _)| *id != crate::MCP_NETWORK_POLICY_META_CAPABILITY)
|
||||
.map(|(id, settings)| {
|
||||
let mut settings = settings.clone();
|
||||
if !plugin_service
|
||||
&& id == OPENAI_ELICITATION_EXTENSION_ID
|
||||
if id == OPENAI_ELICITATION_EXTENSION_ID
|
||||
&& let Some(settings) = settings.as_object_mut()
|
||||
{
|
||||
settings.remove("userVerification");
|
||||
}
|
||||
(id.to_string(), settings)
|
||||
})
|
||||
.chain(network_policy.then(|| {
|
||||
(
|
||||
crate::MCP_NETWORK_POLICY_META_CAPABILITY.to_string(),
|
||||
Value::Object(Map::new()),
|
||||
)
|
||||
})),
|
||||
}),
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user