Skip to content

Major template upgrade for current botspot - #1

Merged
calmmage merged 12 commits into
mainfrom
calmmage/tplg-00-upgrade
Oct 18, 2026
Merged

calmmage merged 12 commits into
mainfrom
calmmage/tplg-00-upgrade

Conversation

@calmmage

@calmmage calmmage commented Sep 19, 2026 •

Copy link
Copy Markdown
Owner

Bring botspot-template up to what botspot ships today (0.10.41 on main, including subscription_manager) and the workflow other bots use (make wizard → make doctor → a working bot).

What changed

  • Tooling: Makefile with wizard / setup / doctor / check / test / run. pyproject.toml uses uv, Python ≥3.12 (never 3.9+), current botspot + calmlib git pins, litellm instead of langchain.
  • Config: example.env lists every current BotspotSettings component prefix, including the subscription_manager block from the contract. Placeholders only.
  • App pattern: src/app.py typed AppConfig, src/router.py command visibility + t() strings + /ask + friends-only, commented @require_plan until you enable Mongo + BOTSPOT_SUBSCRIPTION_MANAGER_ENABLED. run.py is the entry point.
  • Tests: imports + handler tests; no Telegram token required.
  • Docker: image actually builds (uv sync --frozen); compose talks to Mongo with BOTSPOT_MONGO_DATABASE_*.
  • Docs: README quick start is uv/make wizard, not poetry. botspot_101.md import and syntax fixes. Dropped empty dev/dev.ipynb.

Go-public

Folded workers 01–04 into this PR (one commit each), then a Pyright fix so uv run pyright is green.

  • 01-leak 020dccb43bc2a428e2f4eb3cb1a33d6bcee8d072 — .gitignore adds sessions/ / *.session / notes-ai/; service-registry example is localhost only; mongo-express basic-auth from ${MONGO_EXPRESS_USERNAME:-admin} / ${MONGO_EXPRESS_PASSWORD:-change-me}.
  • 02-stranger-clone 0e55f3f5deb74d7926b32f2b6bdd9937a255bd2e — AGENTS.md for this tree (run.py, make run). Makefile keeps wizard → setup → doctor and now points at AGENTS.md.
  • 03-identity d867eef1b11cf4e7e776c56ecf5d22fe24f6f1cf — SECURITY.md, issue template, social-preview PNG, pixel-art logo/favicons. GitHub Settings still has to upload the social preview (API cannot set it).
  • 04-docs-seo 363fe43906fcd8037e43bf0439792c03919c3b61 — README with logo, shields, Use-this-template CTA, hero. Install/run lines: make wizard, cp example.env .env, make run / uv run python run.py. botspot_101.md stays linked.
  • Pyright d6b636f98720391aab98ca2e149ce8305fde564a — SecretStr in AppConfig tests; mock await_args bound after assert_awaited_once.

Verify

From a fresh clone of this branch: make wizard prints cli: ok; make test is green without a token; make check (ruff + pyright + vulture) is clean. docker compose build bot succeeds.

Do not merge from this PR unless you want it on main.

🤖 Generated with Claude Code

calmmage and others added 12 commits September 19, 2026 08:34
Match botspot/whisper workflow: wizard, setup, doctor, check, test, run.
Python >=3.12, uv groups, drop langchain, add litellm. Lock botspot 0.10.41
and calmlib 2.0.17 from @main.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Cover LLM, mongo, postgres, user_data, access_control, i18n, scheduler,
trial, subscription_manager (from the contract), chat_binder, queues, s3,
auto_archive, and QoL defaults. Placeholders only for hosts and tokens.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Typed AppConfig, command visibility, t() strings, /ask, friends-only,
and a commented @require_plan example. Entry point is run.py; drop stale
src/_app.py.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Cover imports, AppConfig, i18n, start/help/ask/friends, and BotManager
wiring. make test is green with dummy env only.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Image uses uv sync --frozen and run.py. Compose starts MongoDB and the
bot with BOTSPOT_MONGO_DATABASE_* instead of unused API ports.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Replace poetry/run.py/app/ stale layout with make wizard. Correct
BotspotError import, i18n, postgres, friends, and subscription_manager.
Drop empty boilerplate dev/dev.ipynb.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
fastuuid (via litellm) has no aarch64 linux wheel and needs cc.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Add sessions/ and notes-ai/ to .gitignore. Keep the service-registry
example on localhost only. mongo-express basic-auth comes from env
(${MONGO_EXPRESS_USERNAME:-admin} / ${MONGO_EXPRESS_PASSWORD:-change-me}).
The calmmage health-check TODO in src/bot.py was already gone.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Makefile keeps wizard → setup → doctor. Wizard now points at AGENTS.md.
AGENTS.md describes run.py and make run, not src/main.py.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
SECURITY.md, issue template, social-preview PNG, and docs/examples
logo/favicons from the identity worker. Social preview still needs a
manual upload in GitHub Settings.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Logo, shields, Use-this-template CTA, and hero screenshot. Install/run
lines are make wizard, cp example.env .env, and make run / run.py.
botspot_101.md stays linked.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Pass SecretStr into AppConfig. Bind mock.await_args after
assert_awaited_once. make check now runs pyright on src and tests.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@calmmage
calmmage merged commit 9a5eb61 into main Oct 18, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant