mirror of
https://github.com/okieselbach/AutopilotMonitor.git
synced 2026-10-24 20:53:06 +00:00
824ef9a19c
Make the agent's silent 48h absolute session-age break visible: on break, before cleanup/exit, fire a SessionAgeEmergencyBreak AgentErrorReport over the resilient emergency channel; the backend (Part B) materializes it as an agent_emergency_break timeline event and the timeout classifier terminalizes the session instead of waiting out grace. Decoupled so the guard stays pure and its unit tests are untouched: - CheckSessionAgeEmergencyBreak gains optional Action onBreakFired = null, invoked once when the break is confirmed, before marker/cleanup, fully swallowed. - New EmergencyBreakReporter.TrySend builds a throwaway auth bundle (BackendClientFactory) and sends, bounded to a 5s wait. AgentBootstrap wires it; GetAgentVersion made internal. NOTE: agent targets net48 and was NOT compiled in this environment (only the .NET 8 SDK is available) — to be built/verified locally. The Shared AgentErrorType value is verified (compiled in the backend build).