feat(workstate): UI live-state des conversations/délégations (Lot A frontend)
Ajoute le port et l'adaptateur workState (+ mock) côté frontend, le type domaine associé, et la feature `workstate` (panneau ProjectWorkStatePanel + hook useProjectWorkState) consommant le read-model live exposé par le backend. Intègre le panneau dans ProjectsView. Tests verts (workstate + projects). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@ -133,6 +133,36 @@ export interface GatewayError {
|
||||
message: string;
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// Work state (UX conversations/delegations live read-model)
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
/** Live session currently associated with an agent in the work-state read-model. */
|
||||
export interface LiveWorkSession {
|
||||
nodeId: string;
|
||||
sessionId: string;
|
||||
kind: "pty" | "structured";
|
||||
}
|
||||
|
||||
/** Busy/idle status for an agent in the work-state read-model. */
|
||||
export type WorkBusyState =
|
||||
| { state: "idle" }
|
||||
| { state: "busy"; ticket: string; sinceMs: number };
|
||||
|
||||
/** One agent row in the project work-state read-model. */
|
||||
export interface AgentWorkState {
|
||||
agentId: string;
|
||||
name: string;
|
||||
profileId: string;
|
||||
live?: LiveWorkSession;
|
||||
busy: WorkBusyState;
|
||||
}
|
||||
|
||||
/** Minimal read-only live-state surface for a project. */
|
||||
export interface ProjectWorkState {
|
||||
agents: AgentWorkState[];
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// Permissions (LP1)
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user