AgentSdkResumeStrategy class abstract interface

Decides, per call, whether the provider resumes a stored conversation or starts fresh, and records the session id a successful call produced.

All three methods key off the call's LlmOptions so a single provider can be configured with any one strategy.

No method may throw because the session state is damaged — not just the read. resumeIdFor returns null (no resume) for state it cannot read, and record / evict return normally for state they cannot write. The provider awaits all three inline, record on the success path immediately before the terminal event, so a strategy that throws does not merely fail to persist a session id: it destroys the result of the call that produced it. A degraded store must cost at most one fresh call.

Implementers

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

evict(LlmOptions options) → Future<void>
Forgets the stored session id for this call after a session-shaped failure, so the immediate retry starts fresh. A no-op for read-only strategies.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
record(LlmOptions options, String conversationId) → Future<void>
Records the conversation id a successful call produced, so a later call of the same session can resume it. A no-op for read-only strategies (AgentSdkQuestResume).
resumeIdFor(LlmOptions options) → Future<String?>
The conversation id to resume for this call, or null to start a fresh session (an unknown key, a missing quest file).
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited