aKode: avviso chiaro per i server MCP irraggiungibili in exec e login mcp:<server> senza avviso fuorviante

Trovati nel test end-to-end del plugin memoria con imeAI:
- `akode exec` ignorava mcpServer/startupStatus/updated: se il server MCP non
  rispondeva restavano solo le righe ERROR di rmcp. Ora l'uscita testuale
  stampa «warning: MCP server `memoria` is not reachable (...); aKode continues
  without its tools.» e quella JSON un elemento error; il filtro di exec lascia
  passare gli aggiornamenti del thread principale (o senza thread).
- `akode login --provider mcp:<server> --with-api-key` avvisava che il
  provider di modelli `mcp:<server>` non era in config.toml e suggeriva una
  sezione [model_providers.mcp:<server>] sbagliata; ora spiega che la chiave è
  il Bearer del server MCP. Gli avvisi per i provider di modelli restano.
- prove: messaggio e silenzio per gli altri stati, filtro per thread,
  avvisi di login per mcp: e per provider sconosciuti.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
andrea.difonzo
2026-11-14 19:56:48 +01:00
parent a005236bcb
commit ea5eef634a
6 changed files with 152 additions and 10 deletions

View File

@@ -447,6 +447,16 @@ impl EventProcessorWithJsonOutput {
events.extend(warning.events);
warning.status
}
ServerNotification::McpServerStatusUpdated(notification) => {
match crate::event_processor::mcp_startup_failure_message(&notification) {
Some(message) => {
let warning = self.collect_warning(message);
events.extend(warning.events);
warning.status
}
None => CodexStatus::Running,
}
}
ServerNotification::Error(notification) => {
let message = match notification.error.additional_details {
Some(details) if !details.is_empty() => {