Commit Graph

14 Commits

Author SHA1 Message Date
prosolis
8f38d3d9f4 Switch config format from YAML to TOML
Replaces gopkg.in/yaml.v3 with github.com/BurntSushi/toml. Updates
struct tags, default config path, Dockerfile CMD, README, and ships
config.example.toml in place of the YAML example. ${ENV_VAR}
expansion still runs on the raw file before parsing, so the behavior
is unchanged.
2026-05-24 21:05:41 -07:00
prosolis
035089c159 Fix correctness bugs found by code review
- matrix: drop cryptohelper LoginAs so device.json creds aren't
  invalidated on every restart by Init's re-login
- matrix: thread ctx through PostThreadedReply; bot dispatcher derives
  per-command ctx from app lifecycle so SIGTERM cancels in-flight work
- matrix: isTokenValid verifies /whoami user_id matches configured one
- matrix: loadDevice distinguishes missing file from corrupt parse;
  refuse to silently overwrite a corrupt device.json
- matrix: Start checks Syncer type assertion and returns error
- arr: parseLookup skips empty-title items and extracts existing id
- bot: skip Add when Result.Exists; reply "already in library"
2026-05-24 20:50:51 -07:00
prosolis
8c295d183b Session 5: Dockerfile, config example, README rewrite
Multi-stage alpine Dockerfile builds with -tags goolm so libolm isn't
needed at runtime. Annotated config.example.yaml documents every field
and shows ${ENV_VAR} usage for secrets. README is rewritten for the Go
bot — Python-era web-portal docs are gone.
2026-05-24 20:29:13 -07:00
prosolis
0de6dd8c0d Session 4: command dispatcher and main entrypoint
Wire Matrix messages to the *arr clients. Dispatcher parses
"<prefix><cmd> <query>", routes movie/tv/music to Radarr/Sonarr/Lidarr,
adds the top hit, and replies in a thread. Unconfigured services reply
with a clear message instead of failing.
2026-05-24 20:27:17 -07:00
prosolis
206b378d93 Session 3: Radarr/Sonarr/Lidarr clients with add-on-search
Adds internal/arr with a shared HTTP layer and per-service clients that
look up candidates and POST the chosen one back with monitored=true and
search-on-add enabled. Lidarr requires metadata_profile_id, now part of
ArrConfig and validated when lidarr is set.
2026-05-24 20:22:50 -07:00
prosolis
5c7d21e574 Session 2: Matrix client with E2EE and room-scoped handler
Adapted from Pete: password login + device persistence, cryptohelper
with cross-signing bootstrap, sync loop with auto-join on invite, and
PostThreadedReply for command responses. Messages outside allowed_rooms
are dropped.
2026-05-24 20:16:09 -07:00
prosolis
5a706fedc4 Begin Go rewrite: remove Python, scaffold module and config
Pivot from FastAPI web portal to a Matrix command bot (modeled on Pete).
Users will issue !movie / !tv / !music commands in allowlisted rooms; the
bot performs a top-hit search against Radarr/Sonarr/Lidarr and adds it.

This commit is session 1 of a multi-session rewrite (see SESSION_PLAN.md):
  - Delete app/, requirements.txt, old Dockerfile, .env.example
  - Add go.mod (mautrix-go + yaml.v3)
  - Add internal/config: YAML loader with ${ENV} expansion, validates
    matrix creds, allowed_rooms, and per-service *arr config
  - Reset .gitignore / .dockerignore for the Go layout
2026-05-24 20:09:52 -07:00
prosolis
f4a718d44b Merge pull request #2 from prosolis/claude/bellhop-matrix-portal-MkQle
Autogenerate session key when not provided
2026-02-27 14:19:08 -08:00
Claude
5ab96df34f Reframe session key rotation as expected behavior, not a caveat
A restart generating a new key and invalidating sessions is a
security feature, not a problem. Update docs to present it neutrally.

https://claude.ai/code/session_018iMt5qm4j9bk8wzytLC3E6
2026-02-27 22:16:44 +00:00
Claude
bf6b1180de Auto-generate SESSION_SECRET_KEY when not provided
If the env var is unset, a random key is generated at startup. This
removes a manual setup step. The README and .env.example are updated
to reflect that the variable is now optional (but recommended in
production for session persistence across restarts).

https://claude.ai/code/session_018iMt5qm4j9bk8wzytLC3E6
2026-02-27 22:12:31 +00:00
prosolis
0e5cb9a24f Merge pull request #1 from prosolis/claude/bellhop-matrix-portal-MkQle
Initial push of Bellhop
2026-02-27 14:07:13 -08:00
Claude
003792f744 Add comprehensive README with setup, API reference, and architecture docs
https://claude.ai/code/session_018iMt5qm4j9bk8wzytLC3E6
2026-02-27 21:29:21 +00:00
Claude
05460237ee Implement Bellhop: Matrix-authenticated *arr request portal
- FastAPI backend with async SQLite session storage
- Matrix homeserver authentication (login/logout/session validation via whoami)
- Server-side proxy for Radarr, Sonarr, and Lidarr search & add APIs
- Fire-and-forget Matrix audit log bot for request tracking
- Rate-limited login endpoint (5 req/min per IP via slowapi)
- Single-page Alpine.js frontend with dark theme, media type tabs, search grid
- Dockerfile for single-container deployment
- Secure session cookies (httponly, samesite=strict, secure)

https://claude.ai/code/session_018iMt5qm4j9bk8wzytLC3E6
2026-02-27 21:24:53 +00:00
prosolis
e7b8e80e34 Initial commit 2026-02-27 13:15:26 -08:00