agent conversation fix

This commit is contained in:
2026-06-27 12:42:37 +02:00
parent c2d1a669c5
commit 1fc7869160
38 changed files with 1173 additions and 1549 deletions

View File

@ -164,6 +164,21 @@ pub trait InputMediator: Send + Sync {
/// authority of the FIFO/busy state and correlation only.
fn enqueue(&self, agent: AgentId, ticket: Ticket) -> PendingReply;
/// Headless/system enqueue: appends `ticket` to the same FIFO and marks the agent
/// busy, but does **not** deliver any text to the human terminal surface.
///
/// This is for inter-agent structured/headless turns where the real transport is
/// [`crate::ports::AgentSession::send`] and the answer is its final response. The
/// mailbox ticket remains useful for queue/workstate accounting and cancellation,
/// but publishing [`crate::events::DomainEvent::DelegationReady`] here would leak
/// the same task into the user's CLI cell.
///
/// Default keeps compatibility for simple mediators; production overrides it to
/// suppress delivery.
fn enqueue_silent(&self, agent: AgentId, ticket: Ticket) -> PendingReply {
self.enqueue(agent, ticket)
}
/// Registers (or refreshes) the live input [`PtyHandle`] of `agent` so a later
/// [`InputMediator::enqueue`] delivers the turn through it (cadrage C3 §5.2).
///