StaticcanStaticmodalityResolve a modality singleton by its canonical name. Throws when not found — every consumer should know which modality it's asking for; a missing modality is a config bug.
Accepts the modality NAME ('vision', 'sound', 'verbal-esp'),
NOT the BodyPlan organ key (the sound modality's organ key is
'hearing'). To resolve from an organ key, use
modalityByOrganKey.
StaticmodalityResolve a modality singleton by its BodyPlan organ key. Used by
sensorium when walking BodyPlan.sensoryPorts.modality strings
(which are organ keys, not modality names). Returns null when no
modality declares this organ key — a reserved organ in the
BodyPlan with no v1 modality is silently dropped from the
sensorium rather than throwing.
StaticperceiveStaticpreloadCombined async preload for sense / ESP verb-level validators.
Warms anatomy (species + clades + body plan) AND modality
singletons in parallel — the two everything-must-be-live
concerns the validators' sync body assumes. Validators wire
this into their preload hook.
StaticpreloadLazy-load every modality singleton. The substrate is not
bootstrap-eager-loaded — modalities follow the same pattern
as locomotion modes / species clades: singletons load on
first verb-level demand via their validator's async
preload hook. After this call, sync modalityByName /
modalityByOrganKey lookups resolve.
Tolerant of individual template misses (a fresh DB without
the seeds yet, an in-progress migration); each modality's
StuffApi.singleton failure logs and the cache simply omits
that modality. Sense / ESP validators surface their polite
refusal downstream when their modality is missing.
StaticsensoriumEffective sensorium — the modalities the viewer can perceive.
Walks (a) the viewer's BodyPlan sensoryPorts.modality strings
(innate organs) and resolves each to its modality singleton via
modalityByOrganKey. Returns the deduped union.
Also includes modalities granted by mixins the viewer composes
(or has activated via augment-conferral), via
MixinApi.getActiveMixins + _grantsModalities.
Returns [] defensively when:
Staticsignal
Predicate: does the viewer's sensorium include
modality?Used by the four physical
requires*validators and bySensorMixin.filterMessagefor modality-attributed frame reception gating.