Skip to main content

Module journal

Module journal 

Source
Expand description

Journal / Resume — checkpoint persistence with replay semantics (M1).

Provides:

  • JournalStore — wraps RunStore with cache-key index for O(1) lookups
  • AgentCacheKey — deterministic blake3-based key for agent invocations
  • JournalCallback trait — scheduler integration hook
  • ResumeContext — orchestrates run recovery
  • gc_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§

AgentCacheKey
Deterministic cache key for an agent invocation. Normalizes whitespace/unicode to ensure cache hits across formatting differences.
CompositeJournalCallback
Composite callback that chains multiple JournalCallback implementations.
JournalStore
JournalStore wraps RunStore with replay semantics.
ResumeContext
Context for resuming a run.

Enums§

JournalError
RunCreationMode
Options for creating a run (new or resume).

Functions§

gc_runs
Clean up old completed/cancelled runs.