feat(agent): conversation par paire + entrée médiée + pivot terminal/MCP
Coeur inter-agents consolidé et surface front réalignée sur la décision "terminal natif PTY, pas d'UI chat" (Option 1). Domaine - nouveaux modules conversation, mailbox, input, fileguard (ports + types) - orchestrator/profile/events étendus (conversation par paire, FIFO) Application / Infrastructure - orchestrator/service + context_guard : sérialisation FIFO par agent, garde RW mémoire/contexte, dispatch ask/reply - adapters in-memory conversation / mailbox / input / fileguard - registry session + lifecycle agent durcis (1 agent = 1 session vivante) - outils MCP idea_* alignés sur le nouveau dispatch Frontend - MediatedInput + useAgentBusy : entrée utilisateur médiée par IdeA, terminal = vue sortie inchangée - suppression de la vue chat structurée (AgentChatView) — abandonnée - adapter input + ports mis à jour Divers - .ideai/ : mémoire projet + briefs de cadrage versionnés ; requests/ runtime ignoré ; agents projet réels (DevBackend/DevFrontend/QA) Tests : Rust (domain/application/infrastructure/app-tauri) + front (346) verts. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@ -19,6 +19,7 @@ export type DomainEvent =
|
||||
| { type: "agentLaunched"; agentId: string; sessionId: string }
|
||||
| { type: "agentExited"; agentId: string; code: number }
|
||||
| { type: "agentProfileChanged"; agentId: string; profileId: string }
|
||||
| { type: "agentBusyChanged"; agentId: string; busy: boolean }
|
||||
| { type: "templateUpdated"; templateId: string; version: number }
|
||||
| { type: "agentDriftDetected"; agentId: string; from: number; to: number }
|
||||
| { type: "agentSynced"; agentId: string; to: number }
|
||||
@ -283,49 +284,6 @@ export interface TerminalSession {
|
||||
* session assignment and the hosting cell had none yet; absent otherwise.
|
||||
*/
|
||||
assignedConversationId?: string;
|
||||
/**
|
||||
* How the frontend should render the cell hosting this session (mirror of the
|
||||
* backend `TerminalSessionDto.cellKind`, ARCHITECTURE §17.6). `"chat"` ⇒ a
|
||||
* structured AI session driven by `agent_send`/`reattach_agent_chat` (rendered
|
||||
* as an `AgentChatView`); `"pty"` ⇒ a raw terminal (xterm). **Derived**
|
||||
* backend-side from the launch routing — a single source of truth.
|
||||
*/
|
||||
cellKind: CellKind;
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether a session's hosting cell renders as a structured chat view or a raw
|
||||
* terminal (mirror of the backend `CellKind`, ARCHITECTURE §17.6). The
|
||||
* `LayoutGrid` switches `AgentChatView` vs `TerminalView` on this value.
|
||||
*/
|
||||
export type CellKind = "pty" | "chat";
|
||||
|
||||
/**
|
||||
* One incremental event of an AI agent's reply turn (mirror of the backend
|
||||
* `ReplyChunk`, ARCHITECTURE §17.7). Tagged on `kind` (camelCase on the wire),
|
||||
* so the view branches without positional parsing:
|
||||
*
|
||||
* - `textDelta`: a text fragment of the current turn (accumulated live);
|
||||
* - `toolActivity`: a human-readable tool-activity badge (best-effort);
|
||||
* - `final`: the **deterministic** end-of-turn chunk carrying the aggregated
|
||||
* final content — after it the turn is frozen and the stream ends.
|
||||
*/
|
||||
export type ReplyChunk =
|
||||
| { kind: "textDelta"; text: string }
|
||||
| { kind: "toolActivity"; label: string }
|
||||
| { kind: "final"; content: string };
|
||||
|
||||
/**
|
||||
* The retained **conversation scrollback** of a still-live structured session
|
||||
* (mirror of the backend `ReattachChatDto`, ARCHITECTURE §17.7), returned by
|
||||
* `reattachChat`. The frontend replays `scrollback` to rebuild the visible turns
|
||||
* before subsequent chunks arrive over the freshly-registered channel.
|
||||
*/
|
||||
export interface ReattachChatDto {
|
||||
/** The session that was re-attached (echoed back). */
|
||||
sessionId: string;
|
||||
/** The chunks already streamed for this conversation, in order. */
|
||||
scrollback: ReplyChunk[];
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user