refactor: Transform daemon_boyfriend into Loyal Companion

Rebrand and personalize the bot as 'Bartender' - a companion for those
who love deeply and feel intensely.

Major changes:
- Rename package: daemon_boyfriend -> loyal_companion
- New default personality: Bartender - wise, steady, non-judgmental
- Grief-aware system prompt (no toxic positivity, attachment-informed)
- New relationship levels: New Face -> Close Friend progression
- Bartender-style mood modifiers (steady presence)
- New fact types: attachment_pattern, grief_context, coping_mechanism
- Lower mood decay (0.05) for emotional stability
- Higher fact extraction rate (0.4) - Bartender pays attention

Updated all imports, configs, Docker files, and documentation.
This commit is contained in:
2026-01-14 18:08:35 +01:00
parent 3d939201f0
commit dbd534d860
60 changed files with 310 additions and 381 deletions

View File

@@ -11,8 +11,8 @@ from sqlalchemy import event
from sqlalchemy.ext.asyncio import AsyncSession, async_sessionmaker, create_async_engine
from sqlalchemy.pool import StaticPool
from daemon_boyfriend.config import Settings
from daemon_boyfriend.models.base import Base
from loyal_companion.config import Settings
from loyal_companion.models.base import Base
# --- Event Loop Fixture ---
@@ -140,7 +140,7 @@ def mock_discord_bot() -> MagicMock:
@pytest.fixture
def mock_ai_response() -> MagicMock:
"""Create a mock AI response."""
from daemon_boyfriend.services.providers.base import AIResponse
from loyal_companion.services.providers.base import AIResponse
return AIResponse(
content="This is a test response from the AI.",
@@ -207,7 +207,7 @@ def mock_gemini_client() -> MagicMock:
@pytest_asyncio.fixture
async def sample_user(db_session: AsyncSession):
"""Create a sample user in the database."""
from daemon_boyfriend.models import User
from loyal_companion.models import User
user = User(
discord_id=123456789,
@@ -223,7 +223,7 @@ async def sample_user(db_session: AsyncSession):
@pytest_asyncio.fixture
async def sample_user_with_facts(db_session: AsyncSession, sample_user):
"""Create a sample user with facts."""
from daemon_boyfriend.models import UserFact
from loyal_companion.models import UserFact
facts = [
UserFact(
@@ -252,7 +252,7 @@ async def sample_user_with_facts(db_session: AsyncSession, sample_user):
@pytest_asyncio.fixture
async def sample_conversation(db_session: AsyncSession, sample_user):
"""Create a sample conversation."""
from daemon_boyfriend.models import Conversation
from loyal_companion.models import Conversation
conversation = Conversation(
user_id=sample_user.id,
@@ -268,7 +268,7 @@ async def sample_conversation(db_session: AsyncSession, sample_user):
@pytest_asyncio.fixture
async def sample_bot_state(db_session: AsyncSession):
"""Create a sample bot state."""
from daemon_boyfriend.models import BotState
from loyal_companion.models import BotState
bot_state = BotState(
guild_id=111222333,
@@ -284,7 +284,7 @@ async def sample_bot_state(db_session: AsyncSession):
@pytest_asyncio.fixture
async def sample_user_relationship(db_session: AsyncSession, sample_user):
"""Create a sample user relationship."""
from daemon_boyfriend.models import UserRelationship
from loyal_companion.models import UserRelationship
relationship = UserRelationship(
user_id=sample_user.id,