AgentLlmSessions class
Pool of model-pinned LlmPortAdapter instances. Hosts register an
adapter per key (provider id, model id, or composite — host's choice)
and read the resulting Map<String, LlmPort> view through
providers when wiring InfraPorts.
Constructors
-
AgentLlmSessions({Map<
String, LlmPortAdapter> ? initial})
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
-
keys
→ Iterable<
String> -
All registered keys, in registration order.
no setter
-
providers
→ Map<
String, LlmPort> -
Read-only view shaped for
InfraPorts.llmProviders. Keys are exactly what the host registered (FlowBrain_resolveLlmFordoes_llmProviders[model.provider]lookups). Returns the same UnmodifiableMapView instance on every call so downstream captures stay in sync with post-boot mutations.no setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
addAll(
Map< String, LlmPortAdapter> additions) → void -
Bulk register every entry of
additions. Same semantics as calling register for each entry — existing keys are replaced, new keys appended. Replaces theflowbrain.llmProviders.addAll(...)pattern hosts used against the raw wiring Map (FR-LLM-008). -
clear(
) → void - Drop every registered adapter. Used when the host switches workspace or re-boots wiring from scratch.
-
contains(
String key) → bool -
truewhenkeyhas an adapter installed. -
get(
String key) → LlmPortAdapter? -
Adapter for
key, ornullwhen nothing is registered. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
rebuild(
String key, LlmPortAdapter factory()) → void -
Replace the adapter at
keyby runningfactory(typically rebuilt from new apiKey / endpoint settings). Convenience over register-after- unregister so callers don't briefly leave the slot empty. -
register(
String key, LlmPortAdapter adapter) → void -
Register or replace the adapter at
key. Replacing implicitly invalidates the previous adapter for that key only — other keys keep their cached underlying provider (FR-LLM-004 scope). -
toString(
) → String -
A string representation of this object.
inherited
-
unregister(
String key) → void -
Remove the adapter at
key. No-op when absent.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited