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:
@@ -3,7 +3,6 @@ use std::sync::Arc;
|
||||
|
||||
use crate::catalog::SkillCatalog;
|
||||
use crate::catalog::SkillProviderError;
|
||||
use crate::catalog::SkillProviderResult;
|
||||
use crate::catalog::SkillReadResult;
|
||||
use crate::catalog::SkillSearchResult;
|
||||
use crate::catalog::SkillSourceKind;
|
||||
@@ -40,17 +39,12 @@ impl SkillProviderSource {
|
||||
Self::new(SkillSourceKind::Executor, label, provider)
|
||||
}
|
||||
|
||||
pub fn cloud(label: impl Into<String>, provider: Arc<dyn SkillProvider>) -> Self {
|
||||
Self::new(SkillSourceKind::Cloud, label, provider)
|
||||
}
|
||||
|
||||
fn should_list(&self, query: &SkillListQuery<'_>) -> bool {
|
||||
match &self.kind {
|
||||
SkillSourceKind::Host => query.include_host_skills,
|
||||
SkillSourceKind::Executor => {
|
||||
query.executor_capability_discovery_v2.is_some() || !query.executor_roots.is_empty()
|
||||
}
|
||||
SkillSourceKind::Cloud => query.include_cloud_skills,
|
||||
SkillSourceKind::Custom(_) => true,
|
||||
}
|
||||
}
|
||||
@@ -97,29 +91,6 @@ impl SkillProviders {
|
||||
self
|
||||
}
|
||||
|
||||
pub fn with_cloud_provider(mut self, provider: Arc<dyn SkillProvider>) -> Self {
|
||||
self.sources
|
||||
.push(SkillProviderSource::cloud("cloud", provider));
|
||||
self
|
||||
}
|
||||
|
||||
pub(crate) fn has_cloud_provider(&self) -> bool {
|
||||
self.sources
|
||||
.iter()
|
||||
.any(|source| source.kind == SkillSourceKind::Cloud)
|
||||
}
|
||||
|
||||
pub(crate) fn cloud_mcp_resources<'a>(
|
||||
&self,
|
||||
resources: Option<&'a codex_mcp::McpResourceClient>,
|
||||
) -> Option<&'a codex_mcp::McpResourceClient> {
|
||||
resources.filter(|_| {
|
||||
self.sources.iter().any(|source| {
|
||||
source.kind == SkillSourceKind::Cloud && source.provider.uses_mcp_resources()
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
pub(crate) fn has_host_provider(&self) -> bool {
|
||||
self.sources
|
||||
.iter()
|
||||
@@ -131,29 +102,6 @@ impl SkillProviders {
|
||||
.await
|
||||
}
|
||||
|
||||
pub(crate) async fn list_cloud_for_turn(
|
||||
&self,
|
||||
query: SkillListQuery<'_>,
|
||||
) -> SkillProviderResult<SkillCatalog> {
|
||||
let mut catalog = SkillCatalog::default();
|
||||
|
||||
for source in self
|
||||
.sources
|
||||
.iter()
|
||||
.filter(|source| source.kind == SkillSourceKind::Cloud)
|
||||
{
|
||||
let source_catalog = source.provider.list(query.clone()).await.map_err(|err| {
|
||||
SkillProviderError::new(format!(
|
||||
"{} skills unavailable: {}",
|
||||
source.label, err.message
|
||||
))
|
||||
})?;
|
||||
catalog.extend(source_catalog);
|
||||
}
|
||||
|
||||
Ok(catalog)
|
||||
}
|
||||
|
||||
pub(crate) async fn list_executor_for_turn(&self, query: SkillListQuery<'_>) -> SkillCatalog {
|
||||
self.list_matching(&query, |source| source.kind == SkillSourceKind::Executor)
|
||||
.await
|
||||
|
||||
Reference in New Issue
Block a user