fix(delegation): résout idea_ask_agent quand la cible revient au prompt sans idea_reply
Introduit le seam TurnResolution : sur prompt-ready, après un délai de grâce, la délégation en attente est résolue de façon typée plutôt que de rester bloquée indéfiniment (jusquà 24h). Couvre domain (mailbox), infrastructure (mailbox/input) et application (orchestrator/error), avec tests étendus. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@ -13,7 +13,7 @@ use application::{
|
||||
TerminalSessions, TicketWorkSource, TicketWorkStatus,
|
||||
};
|
||||
use domain::mailbox::{
|
||||
AgentQueueSnapshot, MailboxError, PendingReply, QueuedTicketSnapshot, Ticket,
|
||||
AgentQueueSnapshot, MailboxError, PendingReply, QueuedTicketSnapshot, Ticket, TurnResolution,
|
||||
};
|
||||
use domain::ports::{
|
||||
AgentContextStore, AgentSession, AgentSessionError, PtyHandle, ReplyStream, StoreError,
|
||||
@ -123,7 +123,7 @@ impl FakeInput {
|
||||
|
||||
impl InputMediator for FakeInput {
|
||||
fn enqueue(&self, _agent: AgentId, _ticket: Ticket) -> PendingReply {
|
||||
let fut: Pin<Box<dyn Future<Output = Result<String, MailboxError>> + Send>> =
|
||||
let fut: Pin<Box<dyn Future<Output = Result<TurnResolution, MailboxError>> + Send>> =
|
||||
Box::pin(async { Err(MailboxError::Cancelled) });
|
||||
PendingReply::new(fut)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user