StationServices class
The STATION-level ambient services a node resolves from the tree in one inherited lookup (ADR-0009 D2/D3 — the MediaQuery pattern: related ambient data, one lookup, scoped to the station).
The kernel provides exactly one of these via an InheritedSeed<StationServices>
at the tree root, so every mounted node reaches the machine's process
transport (provider), the single bd write chokepoint (writer), the owned
state substation (stateSubstation), and the optional adopt-liveness seam
(liveness) — all genuinely per-machine. Nothing substation-scoped lives
here (ADR-0008 D5): the workspace/branch layout + source control are the
per-SubstationScope SourceControl's (ServiceBundle), not the station's —
so a non-git / non-source effect is expressible and the engine holds no
worktree-layout opinion (ADR-0007 §1).
Immutable and value-light: a handle to long-lived collaborators, not state. A
node captures it once in didChangeDependencies and uses the captured
reference across async gaps so it never touches the TreeContext (which
throws post-unmount) for I/O.
Constructors
- StationServices({required RuntimeProvider provider, required StationBeadWriter writer, required String stateSubstation, AllocationLiveness? liveness, WorkSignalProbe? workSignal, int maxConcurrentWork = kDefaultMaxConcurrentWork})
-
Bundles the station's process transport
provider, the bd writewriter, the ownedstateSubstation, the optional adopt-liveness seamliveness, and the concurrency-governor station default/ceilingmaxConcurrentWork.const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- liveness → AllocationLiveness?
-
The engine pgid-liveness half of the daemon adopt-freshness proof
(ADR-0009 D4) — the Host threads it into each
AllocationContext.liveness. Null (the default) ⇒ neverLive ⇒ the Host never adopts at mount (P1 offline). All-or-nothing with theRestartReconciler'sadoptProof: the composer wires BOTH (from a realProcessGroupController) at the live arm, or leaves both off — wiring one alone double-runs. This makes the two adopt halves symmetrically wireable (closing the adversarial-review footgun).final - maxConcurrentWork → int
-
The concurrency governor's STATION-WIDE default/ceiling (tg-42f,
declare-and-check — ADR-0008 D8 defers the general per-leaf
DartEnvironmentpermit governor; this is the narrower, cheaper work-bead slot budget the mount boundary checks). Serves two roles: the DEFAULT a substation's ownSubstationConfig.maxConcurrentWorkfalls back to when unset, AND the hard TOTAL ceiling across every substationWorkListmounts under this station — a substation override only narrows within that ceiling, never raises it. Threaded from--max-agents(StationArgs.maxAgents); defaults to kDefaultMaxConcurrentWork so a single-bead flow is unchanged.final - provider → RuntimeProvider
-
The process transport — spawn (
start), kill (stop), and the broadcast lifecycleRuntimeProvider.eventsstream the effect subscribes to.final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- stateSubstation → String
-
The_grid's OWNED state substation (
tgdog) — the partition session beads are minted into, kept separate from the read-only work source (A37).final - workSignal → WorkSignalProbe?
-
The station's work-signal probe — the COMPLETION FENCE's binding. The Host
threads it into each
AllocationContext.workSignal. Null (the default) ⇒ noWorkSignal ⇒ the fence is INERT and an inferred one-shot exit is taken at face value (today's behavior). The live composer binds it to its own source-control service's uncommitted-work probe, EXCLUDING the grid's own runtime dir (grid_sdk'sstationWorkSignal) — that impl is the composer's opinion, never the engine's (ADR-0008 D5). Unlike the adopt seam, this one is safe to arm ALONE: it can only WITHHOLD an unproven completion, never double-run anything.final - writer → StationBeadWriter
-
The single bd write chokepoint — the ONLY path session/lifecycle beads are
written through (
createSession/update/close), bd-only,--actor grid-controller, fail-closed on ownership (ADR-0006 Decision 2).final
Methods
-
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