angee.nexus.managers
Collection behavior for derived party edges and user cadences.
_PairRollup
@dataclass
class _PairRollup()The in-memory aggregate for one canonical party pair.
add
def add(*, message_id: Any, thread_id: Any, source_party_id: Any,
target_party_id: Any, platform: str, interaction_at: Any) -> NoneAdd one directed event, ignoring overlap between derivation sources.
PartyGraph
@dataclass(frozen=True)
class PartyGraph()One bounded graph projection in deterministic discovery order.
NexusOverviewRows
@dataclass(frozen=True)
class NexusOverviewRows()Viewer-relative fading and due-today relationship intelligence.
TieQuerySet
class TieQuerySet(AngeeQuerySet[Any])Party-pair scopes over the derived edge collection.
around_party
def around_party(party: Any) -> SelfReturn edges touching party, retaining the queryset's REBAC scope.
party_graph
def party_graph(*,
root: Any | None = None,
circle: Any | None = None,
lenses: Iterable[str] | None = None,
depth: int = 1,
limit: int = 60) -> PartyGraphReturn a bounded actor-visible party graph from one party or circle.
The projection composes three declared lenses: Ego (derived Nexus ties plus typed Parties relationships), Circle (membership), and Identity (suggested handle links, including unresolved candidates). Every contributing queryset applies its own ambient REBAC scope before a row can become a node or edge. limit bounds all nodes, the proportional edge ceiling bounds dense neighbourhoods, and depth is capped so one authored read can never become an unbounded crawl. No sudo path exists.
overview_for
def overview_for(viewer: Any,
*,
user_id: Any,
peek_limit: int = 6,
now: Any | None = None) -> NexusOverviewRowsReturn bounded overview facts relative to the viewer's own party.
TieManager
class TieManager(AngeeManager.from_queryset(TieQuerySet))Own the deliberate-interaction derivation and canonical pair lookups.
for_parties
def for_parties(first: Any, second: Any) -> Any | NoneReturn the canonically ordered edge between two parties, when present.
recompute
def recompute(party_ids: Iterable[Any] | None = None,
*,
now: Any | None = None) -> intReplace derived edges from addressed messages, replies, and mentions.
CadenceManager
class CadenceManager(AngeeManager)Own derived due-date refreshes for the human cadence collection.
refresh_touch_due
def refresh_touch_due() -> NoneRefresh every cadence after the derived edge collection changes.