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:
@@ -27,7 +27,7 @@ Practical guides for extending and working with the Daemon Boyfriend codebase.
|
||||
```bash
|
||||
# Clone repository
|
||||
git clone <repository-url>
|
||||
cd daemon-boyfriend
|
||||
cd loyal-companion
|
||||
|
||||
# Create virtual environment
|
||||
python -m venv venv
|
||||
@@ -61,7 +61,7 @@ OPENAI_API_KEY=your_key
|
||||
|
||||
```bash
|
||||
# Run the bot
|
||||
python -m daemon_boyfriend
|
||||
python -m loyal_companion
|
||||
|
||||
# Or with Docker
|
||||
docker-compose up -d
|
||||
@@ -73,7 +73,7 @@ docker-compose up -d
|
||||
|
||||
### Step 1: Create Provider Class
|
||||
|
||||
Create `src/daemon_boyfriend/services/providers/new_provider.py`:
|
||||
Create `src/loyal_companion/services/providers/new_provider.py`:
|
||||
|
||||
```python
|
||||
"""New Provider implementation."""
|
||||
@@ -197,7 +197,7 @@ class Settings(BaseSettings):
|
||||
# In tests/test_providers.py
|
||||
|
||||
import pytest
|
||||
from daemon_boyfriend.services.providers import NewProvider
|
||||
from loyal_companion.services.providers import NewProvider
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_new_provider():
|
||||
@@ -250,8 +250,8 @@ import logging
|
||||
import discord
|
||||
from discord.ext import commands
|
||||
|
||||
from daemon_boyfriend.config import settings
|
||||
from daemon_boyfriend.services.database import db
|
||||
from loyal_companion.config import settings
|
||||
from loyal_companion.services.database import db
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
@@ -313,7 +313,7 @@ from datetime import datetime, timezone
|
||||
from sqlalchemy import select
|
||||
from sqlalchemy.ext.asyncio import AsyncSession
|
||||
|
||||
from daemon_boyfriend.models import User
|
||||
from loyal_companion.models import User
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
@@ -399,7 +399,7 @@ class Settings(BaseSettings):
|
||||
```python
|
||||
# In cogs/ai_chat.py
|
||||
|
||||
from daemon_boyfriend.services.new_feature_service import NewFeatureService
|
||||
from loyal_companion.services.new_feature_service import NewFeatureService
|
||||
|
||||
class AIChatCog(commands.Cog):
|
||||
async def _build_enhanced_prompt(self, ...):
|
||||
@@ -427,7 +427,7 @@ pip install -e ".[dev]"
|
||||
python -m pytest tests/ -v
|
||||
|
||||
# Run with coverage
|
||||
python -m pytest tests/ --cov=daemon_boyfriend --cov-report=term-missing
|
||||
python -m pytest tests/ --cov=loyal_companion --cov-report=term-missing
|
||||
|
||||
# Run specific test file
|
||||
python -m pytest tests/test_models.py -v
|
||||
@@ -442,7 +442,7 @@ python -m pytest tests/test_services.py::TestMoodService -v
|
||||
# In tests/test_new_feature.py
|
||||
|
||||
import pytest
|
||||
from daemon_boyfriend.services.new_feature_service import NewFeatureService
|
||||
from loyal_companion.services.new_feature_service import NewFeatureService
|
||||
|
||||
|
||||
class TestNewFeatureService:
|
||||
@@ -517,7 +517,7 @@ docker-compose down
|
||||
pip install -r requirements.txt
|
||||
|
||||
# Run with process manager (e.g., systemd)
|
||||
# Create /etc/systemd/system/daemon-boyfriend.service:
|
||||
# Create /etc/systemd/system/loyal-companion.service:
|
||||
|
||||
[Unit]
|
||||
Description=Daemon Boyfriend Discord Bot
|
||||
@@ -526,10 +526,10 @@ After=network.target postgresql.service
|
||||
[Service]
|
||||
Type=simple
|
||||
User=daemon
|
||||
WorkingDirectory=/opt/daemon-boyfriend
|
||||
Environment="PATH=/opt/daemon-boyfriend/venv/bin"
|
||||
EnvironmentFile=/opt/daemon-boyfriend/.env
|
||||
ExecStart=/opt/daemon-boyfriend/venv/bin/python -m daemon_boyfriend
|
||||
WorkingDirectory=/opt/loyal-companion
|
||||
Environment="PATH=/opt/loyal-companion/venv/bin"
|
||||
EnvironmentFile=/opt/loyal-companion/.env
|
||||
ExecStart=/opt/loyal-companion/venv/bin/python -m loyal_companion
|
||||
Restart=always
|
||||
RestartSec=10
|
||||
|
||||
@@ -539,18 +539,18 @@ WantedBy=multi-user.target
|
||||
|
||||
```bash
|
||||
# Enable and start
|
||||
sudo systemctl enable daemon-boyfriend
|
||||
sudo systemctl start daemon-boyfriend
|
||||
sudo systemctl enable loyal-companion
|
||||
sudo systemctl start loyal-companion
|
||||
```
|
||||
|
||||
### Database Setup
|
||||
|
||||
```bash
|
||||
# Create database
|
||||
sudo -u postgres createdb daemon_boyfriend
|
||||
sudo -u postgres createdb loyal_companion
|
||||
|
||||
# Run schema
|
||||
psql -U postgres -d daemon_boyfriend -f schema.sql
|
||||
psql -U postgres -d loyal_companion -f schema.sql
|
||||
|
||||
# Or let the bot create tables
|
||||
# (tables are created automatically on first run)
|
||||
|
||||
Reference in New Issue
Block a user