Rinomina: crate akode-*, cartelle akode-rs/ e akode-cli/, binario akode, ~/.akode, AKODE_* (A)
Riapplica la fase 5 di aKode (86e7c72e) sulla base ripulita:
- crate codex-* -> akode-*, codex-rs -> akode-rs, codex-cli -> akode-cli, binario e ausiliari akode;
- ~/.codex -> ~/.akode, CODEX_HOME -> AKODE_HOME, variabili CODEX_* -> AKODE_*, .codex/ -> .akode/ di progetto;
nessun fallback a ~/.codex o a CODEX_*;
- testi per l'utente "Codex" -> "aKode"; testi verso il modello e istruzioni di sistema invariati;
- snapshot insta rinominati (non ancora rigenerati).
I conflitti con la base ripulita sono stati risolti riapplicando la rinomina ai file senza le
funzioni di imeAI (script di mappa dei token per file).
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
60
akode-rs/akode-mcp/src/runtime/status.rs
Normal file
60
akode-rs/akode-mcp/src/runtime/status.rs
Normal file
@@ -0,0 +1,60 @@
|
||||
//! Read selected-server metadata from one published thread runtime.
|
||||
|
||||
use std::sync::Arc;
|
||||
|
||||
use super::McpRuntime;
|
||||
use super::McpRuntimeContext;
|
||||
use crate::McpConfig;
|
||||
use crate::McpServerStatusSnapshot;
|
||||
use crate::McpSnapshotDetail;
|
||||
use crate::ResolvedMcpServer;
|
||||
use crate::mcp::collect_mcp_server_status_snapshot_from_manager;
|
||||
use crate::mcp::compute_auth_statuses;
|
||||
use crate::mcp::effective_mcp_servers;
|
||||
|
||||
impl McpRuntime {
|
||||
/// Reuses the selected connection and catalog without starting unrelated servers.
|
||||
/// Configuration and metadata belong to the same captured runtime publication.
|
||||
/// An expected registration excludes mismatched connections before discovery.
|
||||
pub async fn server_status_snapshot(
|
||||
&self,
|
||||
server: &str,
|
||||
detail: McpSnapshotDetail,
|
||||
expected_registration: Option<&ResolvedMcpServer>,
|
||||
runtime_context: &McpRuntimeContext,
|
||||
) -> anyhow::Result<(Arc<McpConfig>, McpServerStatusSnapshot)> {
|
||||
let current = self.current.load_full();
|
||||
let runtime_context = runtime_context.clone().with_selected_environments(
|
||||
Arc::clone(¤t.environment_selections),
|
||||
current.ready_environments.clone(),
|
||||
);
|
||||
let config = Arc::clone(
|
||||
current
|
||||
.config
|
||||
.as_ref()
|
||||
.ok_or_else(|| anyhow::anyhow!("MCP runtime is not configured"))?,
|
||||
);
|
||||
let mut servers = effective_mcp_servers(&config, current.auth.as_ref());
|
||||
servers.retain(|name, _| {
|
||||
name == server
|
||||
&& expected_registration
|
||||
.is_none_or(|expected| config.mcp_server_catalog.server(name) == Some(expected))
|
||||
});
|
||||
let auth_statuses = compute_auth_statuses(
|
||||
servers.iter(),
|
||||
config.mcp_oauth_credentials_store_mode,
|
||||
config.auth_keyring_backend_kind,
|
||||
current.auth.as_ref(),
|
||||
&runtime_context,
|
||||
)
|
||||
.await;
|
||||
let snapshot = collect_mcp_server_status_snapshot_from_manager(
|
||||
¤t.connections,
|
||||
auth_statuses,
|
||||
servers.into_keys().collect(),
|
||||
detail,
|
||||
)
|
||||
.await;
|
||||
Ok((config, snapshot))
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user