EnvironmentRegistry class
name → AgentEnvironment, across TWO namespaces (gc's builtin-vs-custom
base grammar — BaseScope): builtins are the shipped defaults (empty
here; the harness collapse pow-ebf.4 supplies claude/copilot/pi/opencode as
data), custom the box/substation authoring. A name in BOTH: custom is the
leaf and a same-named builtins entry layers UNDER it (the EnvBaseUndeclared
convention).
Constructors
-
EnvironmentRegistry({required Map<
String, AgentEnvironment> custom, Map<String, AgentEnvironment> builtins = const {}}) -
Creates the registry over its
customauthoring and optionalbuiltins(shipped defaults; empty untilpow-ebf.4supplies them).const
Properties
-
builtins
→ Map<
String, AgentEnvironment> -
The shipped-default environments (gc
builtin:scope). Empty until the harness collapse (pow-ebf.4) supplies them as data.final -
custom
→ Map<
String, AgentEnvironment> -
The box/substation-authored environments (gc
provider:scope).final - hashCode → int
-
The hash code for this object.
no setterinherited
-
names
→ Iterable<
String> -
Every armed NAME (custom ∪ builtin), sorted for stable refusal text.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
validatedEnvironments
→ Iterable<
AgentEnvironment> -
Every armed environment that passes the boot LEGALITY check (MOMENT 1),
flattened: each armed name that RESOLVES and is a legal, spawnable combo
(
_legalityRefusal- the same rule validate applies).no setter
Methods
-
nameOf(
AgentEnvironment environment) → String -
The REVERSE map: the armed NAME whose resolved environment equals
environment, compared in the AgentEnvironment.flattened normal form. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
resolve(
String name) → AgentEnvironment -
MOMENT 2 (per-work, fail-closed): the FLATTENED environment armed under
name, itsbasechain walked (honoring the BaseScope grammar and the standalone barrier) and folded via AgentEnvironment.resolve. THROWS EnvironmentRegistryError on an unknown name, abasecycle, or a danglingbase— NEVER a silent default. -
toString(
) → String -
A string representation of this object.
inherited
-
validate(
{Map< String, String> armedNames = const {}, SiteBinding siteBinding = SiteBinding.none}) → String? - MOMENT 1 (boot-eager): the FIRST refusal message across the whole armed set, or null when the box is legally configured. Checks, in order:
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited