From 2ae3326b09b26983c07ed9352f6b27bfa3ce75de Mon Sep 17 00:00:00 2001 From: root Date: Sat, 7 Mar 2026 15:28:47 +0000 Subject: [PATCH] feat: add relationship types to shared Co-Authored-By: Claude Opus 4.6 --- shared/src/types.ts | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/shared/src/types.ts b/shared/src/types.ts index 048d6d0..756f37c 100644 --- a/shared/src/types.ts +++ b/shared/src/types.ts @@ -83,6 +83,22 @@ export interface SocialState { outcome: InteractionOutcome | null; globalCooldown: number; pairCooldowns: Map; + lastOutcome: LastOutcome | null; +} + +export interface RelationshipData { + value: number; // -100 to 100 + interactions: number; // total interaction count + lastInteractionTick: number; + status: 'active' | 'memory'; +} + +export type Relationships = Map; + +export interface LastOutcome { + partnerId: EntityId; + outcome: InteractionOutcome; + tick: number; } // Network protocol messages @@ -101,6 +117,13 @@ export interface EntityState { partnerId: EntityId | null; outcome: InteractionOutcome | null; }; + relationships?: Array<{ + entityId: EntityId; + name: string; + value: number; + classification: string; + status: 'active' | 'memory'; + }>; } export interface WorldState {