feat(session-limits): LS8-front — filet humain niveau 3 (saisie d'heure de reprise)

UI permettant à l'humain de renseigner l'heure de reprise quand le
niveau 2 détecte une limite sans heure exploitable.

- ports/index.ts : setResumeAt(agentId, resetsAtMs) sur InputGateway.
- adapters/input.ts : setResumeAt → invoke("set_resume_at").
- adapters/mock/index.ts : MockInputGateway.setResumeAt (resumeArmings[]).
- features/agents/useAgents.ts : action setResumeAt (sans mutation optimiste).
- features/agents/AgentLimitBadge.tsx : formulaire de saisie d'heure sur
  l'état suspected sans heure + helper pur timeInputToEpochMs (TODO LS7 retiré).
- features/agents/AgentsPanel.tsx : câblage onSetResumeAt.

Tests AgentLimitBadge.test.tsx mis à jour au nouveau contrat + couverture LS8 ;
typecheck propre, suite agents verte.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-17 08:44:54 +02:00
parent c480d2820a
commit 5d9dd32c29
7 changed files with 225 additions and 29 deletions

View File

@ -561,6 +561,15 @@ export interface InputGateway {
* `agentResumeCancelled` on success, which clears the countdown in the UI.
*/
cancelResume(agentId: string): Promise<boolean>;
/**
* Human net (level 3, ARCHITECTURE §21.1): arms a resume at a user-chosen
* instant for an agent whose limit was *suspected* without a reliable reset
* time. `resetsAtMs` is the chosen wake-up in epoch-milliseconds; the backend
* clamps a past instant to "now" (⇒ immediate resume). This arms the same
* cancellable resume as the automatic path and re-emits `agentResumeScheduled`,
* so the UI flips on its own from "heure inconnue" to the nominal countdown.
*/
setResumeAt(agentId: string, resetsAtMs: number): Promise<void>;
}
/**