HostKeyResolver class final

The host-injectable key-slot resolver (issue #1322 Gap 2): the ONE resolution chain as a pure service. Keychain/SharedPreferences access stays with the host — it injects envRead/storeRead over its own stores; the SDK supplies only the chain, the slot naming, and the drift hints.

Constructors

HostKeyResolver({required String? envRead(String name), String? storeRead(String name)?, Iterable<String> knownSlotNames = const []})
const

Properties

envRead → String? Function(String name)
Reads a genuine process-environment value (the host's env, dotenv, dart-defines — its choice).
final
hashCode → int
The hash code for this object.
no setterinherited
knownSlotNames → Iterable<String>
The slot names the host KNOWS about (its saved provider entries' own slots — the registry leg). A known pinned twin of the canonical (<canonical>_…) holding a value wins over the canonical, exactly like the CLI's saved entries pin their own slots — and produces the drift hint instead of a silently empty request.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
storeRead → String? Function(String name)?
Reads the host's secure store (Keychain / SharedPreferences-backed / in-memory). Null = store-less host (env-only resolution).
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
resolveKey({String? provider, required String baseUrl, String? model, List<String> envNames = const [], String? defaultBaseUrl, String? activeCustomKeyName}) → HostKeyResolution
Resolves the effective key-slot name for provider/baseUrl. The model argument is accepted for call-site symmetry with host config shapes; slot selection keys on provider + endpoint only (a model never has its own slot). envNames and defaultBaseUrl are the catalog facts — omit them (the defaults) and resolution is store-only, so the env-name leg can never hijack a custom endpoint. activeCustomKeyName is the active custom registry entry's own slot, when the host tracks one.
toString() → String
A string representation of this object.
inherited

Operators

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