angee.nexus.models
Relationship analytics derived from deliberate party-to-party interactions.
Tie is fully recomputable from messaging: directed message recipients, replies, and mentions become one canonical party pair. Thread-roster co-membership is deliberately not evidence of a tie — a message sent into a 100-member group is not 99 relationships. Record chatter and public-post threads are outside this analytics surface.
Gravity is log2(message_count + 1) × recency × reciprocity × diversity. Recency decays on a 30-day scale, reciprocity is the smaller directional count divided by the larger, and every platform after the first adds ten percent. Fading begins when silence exceeds the greater of sixty days or eight times the edge's average interaction interval; fewer than two interactions establish no rhythm and never fade.
Cadence is the addon's sole human-authored fact. Its due date derives from a user's cadence and the last interaction on that user's party edge.
Tie
class Tie(SqidMixin, AngeeModel)A fully derived interaction edge between two canonically ordered parties.
Meta
class Meta()Django model options for the derived pair edge.
__str__
def __str__() -> strReturn the canonical pair and current gravity for Django displays.
compute_gravity
@staticmethod
def compute_gravity(*, message_count: int, a_to_b_count: int,
b_to_a_count: int, last_at: datetime.datetime | None,
platform_count: int, now: datetime.datetime) -> floatReturn volume × recency × reciprocity × platform diversity.
check_fading
@staticmethod
def check_fading(*, message_count: int, first_at: datetime.datetime | None,
last_at: datetime.datetime | None,
now: datetime.datetime) -> boolReturn whether silence exceeds max(8 × average interval, 60 days).
save
def save(*args: Any, **kwargs: Any) -> NonePersist the pair in canonical primary-key order.
Cadence
class Cadence(SqidMixin, AngeeModel)One user's human-authored stay-in-touch intent for one party.
Meta
class Meta()Django model options for the user-party cadence.
__str__
def __str__() -> strReturn the cadence's user-party key for Django displays.
derive_touch_due
def derive_touch_due() -> datetime.datetime | NoneDerive the next due date from the viewer's party edge.
refresh_touch_due
def refresh_touch_due() -> NoneRecompute and persist the server-owned due date.
apply_create_defaults
def apply_create_defaults() -> Mapping[str, Sequence[Any]]Bind a blank user relation to the authenticated REBAC actor.
save
def save(*args: Any, **kwargs: Any) -> NoneRefresh the server-owned due date whenever cadence intent changes.