package repository import ( "context" "errors" ) var ( ErrCompanionReadUnavailable = errors.New("companion consistent read unavailable") ErrCompanionReadOnly = errors.New("companion snapshot is read-only") ErrCompanionSelection = errors.New("invalid companion selection") ErrCompanionAccountMismatch = errors.New("companion account mismatch") ErrCompanionCharacterUnavailable = errors.New("companion character missing or deleted") ) // CompanionSourceState is detached repository data, not a client packet. // Reading it grants neither a live session nor permission to create an APC. type CompanionSourceState struct { Owner CharacterRecord Source CharacterRecord Equipment EquipmentRecord Skill SkillRecord HasEquipment bool HasSkill bool } // CompanionSourceReader is an optional character-repository capability. // Implementations must read owner, source, equipment and skills in ONE // read-only database snapshot from the authoritative write route. A loop of // ordinary Group.Load calls is not an acceptable implementation. // accountID and ownerID must come from the authenticated server session. type CompanionSourceReader interface { ReadCompanionSource(context.Context, string, string, string) (CompanionSourceState, error) }