babylon.engine.community_state_store
Community state store protocol and default implementation (Feature 033).
Decouples bifurcation analysis from CommunitySystem internals via a read-only protocol. The default in-memory implementation wraps the existing mutable dict maintained by CommunitySystem.
See also
babylon.engine.systems.community: CommunitySystem that owns state.
specs/033-bifurcation-topology/research.md: R1 architecture decision.
Classes
|
Read interface for community consciousness data. |
|
Default store wrapping the existing in-memory community_states dict. |
- class babylon.engine.community_state_store.CommunityStateStore(*args, **kwargs)[source]
Bases:
ProtocolRead interface for community consciousness data.
Default implementation wraps the existing in-memory dict. Future PostgreSQL adapter implements the same protocol.
- __init__(*args, **kwargs)
- class babylon.engine.community_state_store.InMemoryCommunityStateStore(states)[source]
Bases:
objectDefault store wrapping the existing in-memory community_states dict.
- Parameters:
states (
dict[CommunityType,CommunityState]) – Reference to the mutable community_states dict maintained by CommunitySystem. Not copied — reads reflect live mutations.
- __init__(states)[source]
- Parameters:
states (dict[CommunityType, CommunityState])
- Return type:
None