AgentSdkResumeStore class final
A small JSON-backed session id → conversation id map, persisted at
file.
Loaded lazily on first access and cached in memory; every mutation flushes the whole map back to disk (the map is tiny — one entry per live session).
No operation throws for a damaged store, in either direction. A missing file reads as empty, a corrupt or unreadable one degrades to empty, and a flush that cannot land is dropped. The cache is authoritative for the lifetime of the instance either way, so a damaged store costs fresh sessions after a restart and nothing at all before one — never a failed call.
Constructors
- AgentSdkResumeStore(File file)
Properties
Methods
-
lookup(
String sessionKey) → Future< String?> -
The conversation id stored for
sessionKey, ornull. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
put(
String sessionKey, String conversationId) → Future< void> -
Stores
conversationIdundersessionKey, flushing to disk. -
remove(
String sessionKey) → Future< void> -
Removes any id stored for
sessionKey, flushing to disk. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited