ProviderQueueRuntime class final

The wired queue: the sticky RAM state, the driven stream function, and the entries it was built from. Hosts keep ONE instance per session (the stickiness); editors mutate the yaml and re-resolve — the next rebuild() swaps the chain live (AC7/UT-31).

Constructors

ProviderQueueRuntime.build(ProviderQueueResolution resolution, {required Map<String, String> secrets, StreamFunction streamFactory(String kind, String apiKey)?, Future<String> mintChatGptCredentials(String refreshToken)?, ModelRolesRetryPolicy policy = const ModelRolesRetryPolicy(), DateTime now()?, double jitterFraction()?, Future<bool> sleeper(Duration delay, CancelToken? cancelToken)?, void onNotice(FallbackNotice notice)?, QuotaFeed? quotaFeed, void onBindingWarning(String line)?})
Builds the runtime from a resolution and the secrets snapshot. policy/now/jitterFraction/sleeper pass through to the wrapper (tests inject a deterministic clock). quotaFeed threads through to the FallbackStreamFunction (issue #823 AC8 soft-bench); null keeps routing byte-identical.
factory

Properties

entries → List<ProviderQueueEntry>
The resolved (refs materialized) queue entries.
final
hashCode → int
The hash code for this object.
no setterinherited
resolution → ProviderQueueResolution
The winning scope, entries, shadowed scopes, and boot notices.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
state → ProviderQueueState
The sticky cursor + per-entry health (never persisted).
final
streamFunction → FallbackStreamFunction
The queue-driven stream function — the default role's stream.
final

Methods

addNoticeListener(void handler(FallbackNotice notice)) → void
Registers handler for every queue retry/rotation/failover notice (gh-1617 review r2): hosts build the runtime at boot but wire the agent later, so a failover listener that re-syncs display state (agent.state.model — the watchdog's arm-time window reads it) cannot always ride the build's onNotice. Fired after the build handler, in attach order.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

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