Skip to content

angee.nexus.managers

Collection behavior for derived party edges and user cadences.

_PairRollup

python
@dataclass
class _PairRollup()

The in-memory aggregate for one canonical party pair.

add

python
def add(*, message_id: Any, thread_id: Any, source_party_id: Any,
        target_party_id: Any, platform: str, interaction_at: Any) -> None

Add one directed event, ignoring overlap between derivation sources.

PartyGraph

python
@dataclass(frozen=True)
class PartyGraph()

One bounded graph projection in deterministic discovery order.

NexusOverviewRows

python
@dataclass(frozen=True)
class NexusOverviewRows()

Viewer-relative fading and due-today relationship intelligence.

TieQuerySet

python
class TieQuerySet(AngeeQuerySet[Any])

Party-pair scopes over the derived edge collection.

around_party

python
def around_party(party: Any) -> Self

Return edges touching party, retaining the queryset's REBAC scope.

party_graph

python
def party_graph(*,
                root: Any | None = None,
                circle: Any | None = None,
                lenses: Iterable[str] | None = None,
                depth: int = 1,
                limit: int = 60) -> PartyGraph

Return 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

python
def overview_for(viewer: Any,
                 *,
                 user_id: Any,
                 peek_limit: int = 6,
                 now: Any | None = None) -> NexusOverviewRows

Return bounded overview facts relative to the viewer's own party.

TieManager

python
class TieManager(AngeeManager.from_queryset(TieQuerySet))

Own the deliberate-interaction derivation and canonical pair lookups.

for_parties

python
def for_parties(first: Any, second: Any) -> Any | None

Return the canonically ordered edge between two parties, when present.

recompute

python
def recompute(party_ids: Iterable[Any] | None = None,
              *,
              now: Any | None = None) -> int

Replace derived edges from addressed messages, replies, and mentions.

CadenceManager

python
class CadenceManager(AngeeManager)

Own derived due-date refreshes for the human cadence collection.

refresh_touch_due

python
def refresh_touch_due() -> None

Refresh every cadence after the derived edge collection changes.

Released under the AGPL-3.0 License.