feat(agent): orchestration v3 — surface MCP model-agnostic (M0→M4) — §14.3
Expose l'orchestration IdeA comme serveur MCP par-dessus le même OrchestratorService::dispatch, avec repli fichier .ideai/requests pour les CLI sans MCP. v3 réduite à la surface MCP : la messagerie inter-agents et la corrélation requête↔réponse étaient déjà résolues par §17 (send_blocking). - M0 capacité MCP sur le profil (McpCapability/McpConfigStrategy/McpTransport) - M1 injection conf MCP au LaunchAgent + prose adaptée selon la surface - M2 serveur/adapter MCP (JSON-RPC 2.0 maison ; outils idea_*) + ListAgents - M3 câblage par projet (registre mcp_servers jumeau du watcher) - M4 observabilité UI : OrchestratorRequestProcessed.source = file|mcp + badge Trois portes d'entrée (fichier, MCP, UI) → un seul dispatch ; aucun nouveau port applicatif ; MCP confiné à l'adapter infra. Tous lots verts (cycle §3). Cadrage : .ideai/briefs/orchestration-v3-cadrage.md ; ARCHITECTURE.md §14.3. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@ -5,6 +5,21 @@ use crate::ids::{AgentId, ProfileId, ProjectId, SessionId, SkillId, TemplateId};
|
||||
use crate::memory::MemorySlug;
|
||||
use crate::template::TemplateVersion;
|
||||
|
||||
/// Which entry door a processed orchestration request arrived through.
|
||||
///
|
||||
/// IdeA exposes the *same* [`crate::OrchestratorService::dispatch`] behind two
|
||||
/// substitutable driving adapters (ARCHITECTURE §14.3 + cadrage `orchestration-v3`):
|
||||
/// the `.ideai/requests` filesystem watcher and the MCP server. This tag — set by
|
||||
/// the adapter that received the request, never inferred in the application — lets
|
||||
/// the presentation layer surface *how* a delegation came in.
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||
pub enum OrchestrationSource {
|
||||
/// A JSON request file dropped under `.ideai/requests/`.
|
||||
File,
|
||||
/// A `tools/call` on the MCP server.
|
||||
Mcp,
|
||||
}
|
||||
|
||||
/// Events emitted by the domain/application as state changes occur.
|
||||
///
|
||||
/// Deliberately *not* `Serialize`/`Deserialize`: events are an in-process
|
||||
@ -109,6 +124,9 @@ pub enum DomainEvent {
|
||||
action: String,
|
||||
/// Whether IdeA handled it successfully.
|
||||
ok: bool,
|
||||
/// Which entry door the request arrived through (file watcher vs MCP),
|
||||
/// tagged by the receiving adapter.
|
||||
source: OrchestrationSource,
|
||||
},
|
||||
/// A memory note was created or updated (`.md` written, index upserted).
|
||||
MemorySaved {
|
||||
|
||||
Reference in New Issue
Block a user