feat(agent): reprise des sessions au redémarrage (B2) — commande + ResumeProjectPanel

- Tauri : commande list_resumable_agents (projectId) + ResumableAgentListDto
  { resumable } / ResumableAgentDto (camelCase, conversationId omis si None),
  câblage state.rs (réutilise stores + ProfileStore, aucun nouveau port).
- Front : gateway listResumableAgents, ResumeProjectPanel monté à l'ouverture
  de projet (opt-in, FR) : Reprendre (launch_agent nodeId+conversationId),
  Nouvelle conversation (setCellConversation(null) puis launch), Ignorer,
  Tout reprendre/ignorer. resumeSupported=false ⇒ « relance à neuf ».
- doc : §15.2 coquille agents→resumable (alignée use case/back/front).

Tests : app-tauri dto 9/9 ; vitest 324 (+10) ; workspace Rust 0 échec. 0 régression.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-09 13:04:41 +02:00
parent b82e3e1a40
commit 7375f706da
15 changed files with 992 additions and 6 deletions

View File

@ -31,6 +31,7 @@ import type {
MemoryType,
Project,
ProfileAvailability,
ResumableAgent,
Skill,
SkillScope,
Template,
@ -75,6 +76,14 @@ export interface ConversationDetails {
export interface AgentGateway {
/** Lists all agents belonging to the given project. */
listAgents(projectId: string): Promise<Agent[]>;
/**
* Lists the agents that can be **resumed** when the project is (re)opened
* (ARCHITECTURE §15.2): a read-only inventory of agent cells that were running
* and/or carry a persisted conversation id at close time. Drives the
* `ResumeProjectPanel` shown once on open; an empty list ⇒ no panel. Pure
* inventory: no PTY is spawned by this call.
*/
listResumableAgents(projectId: string): Promise<ResumableAgent[]>;
/**
* Lists the agents that currently own a live session and the cell hosting
* each. Used to disable an agent already running in another cell (it cannot be