Bridges Telegram messages to Timmy via python-telegram-bot (optional
dependency). The bot token can be supplied through the TELEGRAM_TOKEN
env var or at runtime via the new POST /telegram/setup dashboard
endpoint, which (re)starts the bot without a restart.
Changes:
- src/telegram_bot/bot.py — TelegramBot singleton: token persistence
(telegram_state.json), lifecycle (start/stop), /start command and
message handler that forwards to Timmy
- src/dashboard/routes/telegram.py — /telegram/setup and /telegram/status
FastAPI routes
- src/dashboard/app.py — register telegram router; auto-start/stop bot
in lifespan hook
- src/config.py — TELEGRAM_TOKEN setting (pydantic-settings)
- pyproject.toml — [telegram] optional extra (python-telegram-bot>=21),
telegram_bot wheel include
- .env.example — TELEGRAM_TOKEN section
- .gitignore — exclude telegram_state.json (contains token)
- tests/conftest.py — stub telegram/telegram.ext for offline test runs
- tests/test_telegram_bot.py — 16 tests covering token helpers,
lifecycle, and all dashboard routes (370 total, all passing)
https://claude.ai/code/session_01CNBm3ZLobtx3Z1YogHq8ZS
agno's Ollama backend requires both the `ollama` and `openai` packages
(it uses the OpenAI-compatible wire format under the hood), but neither
was declared as a project dependency.
Ran a full import walk of all src modules in a fresh venv to confirm
zero missing imports after this change.
https://claude.ai/code/session_01W8jeKbHYNS75mPhGLYJxVq
agno ships sqlalchemy as an optional dependency under its `sqlite` extra.
Installing bare `agno` (without the extra) left sqlalchemy absent, causing
`ModuleNotFoundError: No module named 'sqlalchemy'` on `make dev`.
Changing the dependency spec from `agno>=1.4.0` to `agno[sqlite]>=1.4.0`
ensures sqlalchemy is installed automatically by `make install`.
Also added a troubleshooting entry to README.md for this error.
https://claude.ai/code/session_01W8jeKbHYNS75mPhGLYJxVq
Adds `src/self_tdd/watchdog.py` with a `_run_tests()` function that
shells out to pytest and a `watch` command that polls on a configurable
interval, printing green on recovery and full short-traceback output on
regression. No files are modified and no commits are made automatically.
Usage:
self-tdd watch # default 60s interval
self-tdd watch -i 15 # poll every 15s
Also adds 6 unit tests and wires the `self-tdd` entry point +
`src/self_tdd` wheel include into pyproject.toml.
https://claude.ai/code/session_01DMjQ5qMZ8iHeyix1j3GS7c
Config (src/config.py):
- pydantic-settings Settings class: OLLAMA_URL, OLLAMA_MODEL, DEBUG
- Reads from .env (gitignored) with sane defaults
- settings singleton imported by health.py and agent.py
Removes two hardcodes:
- health.py: OLLAMA_URL="http://localhost:11434" → settings.ollama_url
- agent.py: Ollama(id="llama3.2") → settings.ollama_model
app.py:
- logging.basicConfig at INFO — requests/errors now visible in terminal
- docs_url/redoc_url gated on settings.debug (off by default)
pyproject.toml:
- pydantic-settings>=2.0.0 added to main dependencies
- hatch wheel config updated to include src/config.py
.env.example: documents all three env vars with inline comments
.gitignore: add !.env.example negation so the template gets committed
.github/workflows/tests.yml: runs pytest --cov on every push/PR
(ubuntu-latest, Python 3.11, pip cache)
All 27 tests pass.
https://claude.ai/code/session_01M4L3R98N5fgXFZRvV8X9b6