Expand description
Journal / Resume — checkpoint persistence with replay semantics (M1).
Provides:
JournalStore— wrapsRunStorewith cache-key index for O(1) lookupsAgentCacheKey— deterministic blake3-based key for agent invocationsJournalCallbacktrait — scheduler integration hookResumeContext— orchestrates run recoverygc_runs()— cleanup old completed runs
Thread safety: All public methods take &self (interior mutability via RwLock).
The underlying checkpoint data is protected by a single writer lock.
Lifecycle: new() → init_run() → cache_agent()* → flush() 或: open() → has_completed()/get_cached() → workflow resume logic
Structs§
- Agent
Cache Key - Deterministic cache key for an agent invocation. Normalizes whitespace/unicode to ensure cache hits across formatting differences.
- Composite
Journal Callback - Composite callback that chains multiple JournalCallback implementations.
- Journal
Store - JournalStore wraps RunStore with replay semantics.
- Resume
Context - Context for resuming a run.
Enums§
- Journal
Error - RunCreation
Mode - Options for creating a run (new or resume).
Functions§
- gc_runs
- Clean up old completed/cancelled runs.