babylon.models.entities.sovereign
Spec-070 Sovereign entity (FR-001 – FR-004 + FR-040 / FR-040b).
A Sovereign is an institution-side authority that CLAIMS Territories
and applies a per-tick metabolic_impact along its CLAIMS edges.
Crystallizes the ruling-Faction’s ColonialStance into an
ExtractionPolicy which drives the Territory habitability
trajectory.
Cross-references:
I.16 Organization vs Institution: Sovereign is institution-side (crystallized authority that survives ruling-faction change).
I.20 Political Claims as Overlay: CLAIMS edges are overlays on the immutable spatial substrate.
II.9 Morphism Dyadic: CLAIMS / ADMINISTERS edges are dyadic.
FR-040b special case: SOV_EXTERIOR_NULL is a PROVISIONAL exterior
fallback Sovereign with ruling_faction_id=None and
extraction_policy=CONTINUE. The Pydantic validator must permit
this exact combination while rejecting any other None-ruling /
non-CONTINUE pairing.
Classes
|
Authority that claims Territory (spec-070). |
- class babylon.models.entities.sovereign.Sovereign(**data)[source]
Bases:
BaseModelAuthority that claims Territory (spec-070).
- Parameters:
id (str)
name (str)
sovereignty_type (SovereigntyType)
legitimacy (Annotated[float, FieldInfo(annotation=NoneType, required=True, description='Value in range [0.0, 1.0] representing likelihood', metadata=[Ge(ge=0.0), Le(le=1.0)]), AfterValidator(func=~babylon.kernel.math.quantize)])
color_hex (str)
capital_territory_id (str | None)
ruling_faction_id (str | None)
extraction_policy (ExtractionPolicy)
founded_tick (int)
dissolved_tick (int | None)
- id
Stable ID matching
^SOV_[A-Z][A-Z0-9_]*$.
- name
Display name.
- sovereignty_type
Classification (recognized_state, provisional, insurgent, occupation, secessionist, emergency).
- legitimacy
Current legitimacy ∈
[0, 1].<= 0.0triggersSOVEREIGN_COLLAPSEper FR-023.
- color_hex
UI color in
#RRGGBBform.
- capital_territory_id
Optional capital territory ID.
- ruling_faction_id
ID of the
BalkanizationFactioncurrently in power.Noneonly for SOV_EXTERIOR_NULL per FR-040b.
- extraction_policy
Derived deterministically from the ruling faction’s
colonial_stance. Must beCONTINUEwhenruling_faction_idisNone.
- founded_tick
Tick the Sovereign was instantiated.
- dissolved_tick
Optional dissolution tick.
- model_config: ClassVar[ConfigDict] = {'frozen': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- sovereignty_type: SovereigntyType
- legitimacy: Annotated[float, FieldInfo(annotation=NoneType, required=True, description='Value in range [0.0, 1.0] representing likelihood', metadata=[Ge(ge=0.0), Le(le=1.0)]), AfterValidator(func=quantize)]
- extraction_policy: ExtractionPolicy