refactor: Phase 8 — backend deletion (chat / voice / push / journal / curator)
Mega-commit. Strips all server-side LLM machinery now that Phase 7 has
removed the corresponding UI surfaces and the MCP HTTP endpoint is the
sole assistant interface.
Deleted (services/):
chat, generation_buffer, generation_log, generation_task, llm, tools/
(entire package), stt, tts, voice_config, voice_library, push,
journal_closeout, journal_pipeline, journal_prep, journal_scheduler,
journal_search, curator, curator_scheduler, consolidation,
tag_suggestions, research, weather, article_fetcher, pending_actions,
moments, assist, wikipedia.
Deleted (routes/):
chat, voice, push, journal, quick_capture, fable_mcp_dist.
Deleted (models/):
conversation, generation_tool_log, push_subscription,
pending_curator_action, moment, weather_cache.
Deleted (tests/):
test_generation_log, test_journal_*, test_consolidation, test_lookup_tool,
test_notes_consolidation_trigger, test_record_moment_guards,
test_research_pipeline, test_tools_*, test_tool_use_fixes,
test_voice_library, test_weather_service, test_calendar_tool_tz,
test_wikipedia.
Deleted (top-level):
fable-mcp/ (legacy standalone stdio package — wheel-build pipeline
also removed from Dockerfile).
app.py:
- blueprint registrations for the 6 deleted routes
- startup hook trimmed: no more Ollama warmup, KV-cache priming,
journal/curator schedulers, voice model loading
- shutdown hook simplified
- httpx import dropped (was for Ollama calls)
pyproject.toml:
- removed deps: pywebpush, feedparser, html2text, trafilatura
- removed [voice] extras entirely
- description updated for the MCP-first architecture
Dockerfile:
- removed faster-whisper / piper-tts install steps
- removed bundled piper voice download stage
- removed fable-mcp wheel build stage
Surviving-file edits:
- services/auth.py: drop Conversation table claim on first-user setup
- services/backup.py: drop conversation / push-subscription export+restore;
v1/v2 restore now silently skip pre-pivot conversation data
- services/notes.py: drop maybe_consolidate trigger on task done/cancelled;
drop _maybe_trigger_project_summary (LLM auto-summary)
- services/projects.py: drop generate_project_summary + backfill_project_summaries
(both LLM-driven)
- services/user_profile.py: drop append_observations / consolidate /
clear_learned_data (curator-tied) and build_profile_context
(was LLM system-prompt builder)
- services/notifications.py: stub out _fire_push_notif (was send_push_notification)
- services/event_scheduler.py: drop event-reminder push + chat-retention
cleanup job; keep CalDAV pull-sync + reminders job (in-app)
- services/diagnostics.py: _curator_busy() always False
- routes/notes.py: drop /assist, /assist/stream, /suggest-tags endpoints
- routes/tasks.py: drop /<id>/consolidate endpoint
- routes/settings.py: drop /models, KV-cache-prime-on-save, journal-schedule
timezone hook, and the SearXNG search-test endpoint; inline _is_private_url
(was in services/llm.py)
- routes/admin.py: drop /voice, /voice/reload endpoints
- routes/profile.py: drop /consolidate, /observations (GET, DELETE)
- models/__init__.py: drop the 6 dead model imports
Frontend cascade:
- stores/push.ts: deleted entirely (no callers after Phase 7)
- stores/settings.ts: drop checkVoiceStatus + voice-status state
- views/SettingsView.vue: drop Locations section + journalConfig state
(was tied to /api/journal/config); drop JournalConfig + journal/voice
api/client imports
- frontend/api/client.ts: orphaned voice/journal/profile-observation/
fable-mcp-dist exports are left as dead but harmless (call them and
they 404; type-check is clean).
Pre-existing v1 backups that contained conversations/messages still
restore — those tables are silently dropped from the import path.
Anyone pulling the new image with a populated database will need the
Phase 9 migration to drop the dead tables (coming next).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
-50
@@ -17,56 +17,6 @@ COPY src/ src/
|
||||
RUN --mount=type=cache,target=/root/.cache/pip \
|
||||
pip install .
|
||||
|
||||
# Speech-to-text (faster-whisper + soundfile). faster-whisper is pure
|
||||
# Python; the actual inference engine is ctranslate2 (C++) which has
|
||||
# cp314 wheels as of v4.7.2 (2026-05-19). No torch needed — ctranslate2
|
||||
# does its own CPU inference. Image add: ~150 MB.
|
||||
RUN --mount=type=cache,target=/root/.cache/pip \
|
||||
pip install faster-whisper soundfile
|
||||
|
||||
# Text-to-speech (piper-tts). Replaces kokoro, which has been
|
||||
# stale upstream since April 2025 (requires_python<3.13). Piper depends
|
||||
# only on onnxruntime (already pulled in for STT via faster-whisper) and
|
||||
# pathvalidate — total Python overhead is tiny. Voice models are separate
|
||||
# .onnx + .onnx.json files bundled below.
|
||||
RUN --mount=type=cache,target=/root/.cache/pip \
|
||||
pip install piper-tts
|
||||
|
||||
# Bundle two default voices in the image so first-run TTS works offline.
|
||||
# Additional voices can be downloaded at runtime into /data/voices via the
|
||||
# admin UI (see services/tts.py for the voice-discovery logic).
|
||||
# Voice catalog: https://huggingface.co/rhasspy/piper-voices
|
||||
#
|
||||
# Using Python's urllib instead of curl/wget because python:3.14-slim
|
||||
# ships neither; python is obviously available. The heredoc requires
|
||||
# the BuildKit Dockerfile 1.3+ frontend, which the `# syntax=...:1`
|
||||
# directive at the top of this file already pulls in.
|
||||
RUN <<'PYEOF' python3
|
||||
import os, urllib.request
|
||||
|
||||
VOICES = ["en_US-amy-medium", "en_US-ryan-medium"]
|
||||
BASE = "https://huggingface.co/rhasspy/piper-voices/resolve/main/en/en_US"
|
||||
TARGET = "/opt/piper-voices"
|
||||
os.makedirs(TARGET, exist_ok=True)
|
||||
for v in VOICES:
|
||||
dataset = v.split("-")[1]
|
||||
for ext in ("onnx", "onnx.json"):
|
||||
url = f"{BASE}/{dataset}/medium/{v}.{ext}"
|
||||
path = os.path.join(TARGET, f"{v}.{ext}")
|
||||
print(f"Downloading {url}", flush=True)
|
||||
urllib.request.urlretrieve(url, path)
|
||||
size = os.path.getsize(path)
|
||||
print(f" -> {path} ({size:,} bytes)", flush=True)
|
||||
PYEOF
|
||||
|
||||
# Build the fable-mcp wheel so it can be served for download
|
||||
COPY fable-mcp/ fable-mcp/
|
||||
RUN --mount=type=cache,target=/root/.cache/pip \
|
||||
pip install build hatchling \
|
||||
&& python -m build --wheel ./fable-mcp --outdir /app/dist/ \
|
||||
&& pip uninstall -y build \
|
||||
&& rm -rf fable-mcp/
|
||||
|
||||
COPY --from=build-frontend /build/dist/ src/fabledassistant/static/
|
||||
COPY alembic.ini .
|
||||
COPY alembic/ alembic/
|
||||
|
||||
Reference in New Issue
Block a user