Skip to main content

RestartStoreProtocol

Defined in the protocols module.
AI Agent Durable-store contract for cross-boot restart timestamps (Issue #4603). The pure decision (:class:PersistentRestartLoopGuard) lives in core; the wrapper injects a concrete store that reads/writes the timestamps to a small sentinel file. Both methods are best-effort: an implementation that cannot reach its backing store returns [] from :meth:load_events and silently drops :meth:save_events, so the breaker degrades to in-memory behaviour rather than crashing the gateway it protects.

Methods

load_events()

Return the persisted restart timestamps ([] when unavailable).

save_events()

Persist the restart timestamps (best-effort, never raises).

Source

View on GitHub

praisonaiagents/gateway/protocols.py at line 4962