feat: livrable ticket #91 — notification fin BackgroundTask enrichie

- Backend: enrichissement HeadlessRendezvous avec requester/target/conversationId
- Frontend: toast 'Requester -> Target completed/...' explicite
- Clic ouvrant viewer de conversation pour visualiser l'échange
This commit is contained in:
2026-07-27 09:05:34 +02:00
parent 02603441c1
commit 038e90ecec
12 changed files with 563 additions and 35 deletions

View File

@ -1,7 +1,7 @@
//! Domain events published on the [`crate::ports::EventBus`] and relayed to the
//! presentation layer (ARCHITECTURE §3.2).
use crate::conversation::ConversationParty;
use crate::conversation::{ConversationId, ConversationParty};
use crate::device::DeviceId;
use crate::ids::{
AgentId, IssueId, LocalModelServerId, ProfileId, ProjectId, SessionId, SkillId, SprintId,
@ -14,6 +14,18 @@ use crate::plugin::{PluginId, PluginMcpServerId, PluginVersion};
use crate::sprint::{SprintOrder, SprintVersion};
use crate::template::TemplateVersion;
/// Context carried by terminal background-task events when they come from a
/// headless inter-agent rendezvous.
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct RendezvousContext {
/// Agent that requested the rendezvous, when known.
pub requester_agent_id: Option<AgentId>,
/// Target agent that owns the rendezvous conversation.
pub target_agent_id: AgentId,
/// Conversation opened by the target turn.
pub conversation_id: ConversationId,
}
/// Which entry door a processed orchestration request arrived through.
///
/// IdeA exposes the *same* [`crate::OrchestratorService::dispatch`] behind two
@ -142,6 +154,8 @@ pub enum DomainEvent {
task_id: TaskId,
/// The agent that owns completion delivery.
owner_agent_id: AgentId,
/// Rendezvous context when this terminal task is a headless ask.
rendezvous: Option<RendezvousContext>,
},
/// A first-class background task failed.
BackgroundTaskFailed {
@ -151,6 +165,8 @@ pub enum DomainEvent {
task_id: TaskId,
/// The agent that owns completion delivery.
owner_agent_id: AgentId,
/// Rendezvous context when this terminal task is a headless ask.
rendezvous: Option<RendezvousContext>,
},
/// A first-class background task was cancelled.
BackgroundTaskCancelled {
@ -160,6 +176,8 @@ pub enum DomainEvent {
task_id: TaskId,
/// The agent that owns completion delivery.
owner_agent_id: AgentId,
/// Rendezvous context when this terminal task is a headless ask.
rendezvous: Option<RendezvousContext>,
},
/// A first-class background task has a terminal result not yet delivered.
BackgroundTaskCompletionDeliveryPending {

View File

@ -76,6 +76,7 @@ mod validation;
// ---------------------------------------------------------------------------
pub use error::DomainError;
pub use events::RendezvousContext;
pub use ids::{
AgentId, IssueId, LayoutId, LocalModelServerId, NodeId, ProfileId, ProjectId, RuntimeAgentKey,