ShutdownForensicsProtocol
Defined in the protocols module.AI Agent Protocol for capturing forensics when a gateway dies unexpectedly. Pure contract consumed by the wrapper’s signal handlers.
snapshot
must be fast (<10ms), never raise, and never block the asyncio teardown;
spawn_diagnostic is fire-and-forget and must run the diagnostic in a
detached session so a SIGKILL on the process group does not also kill
the diagnostic. Concrete OS I/O (/proc reads, os.getrusage,
os.getloadavg, subprocess spawn) lives in the wrapper implementation.
Methods
snapshot()
Return a small, JSON-serialisable forensic context.
spawn_diagnostic()
Fire-and-forget a detached diagnostic into
log_dir.Source
View on GitHub
praisonaiagents/gateway/protocols.py at line 4124
