Imported from uburuntu/msu_hub_bot (
src/msu_hub_bot/providers/AGENTS.md). Install upstream withnpx skills add uburuntu/msu_hub_bot --skill providers. Copyright stays with the author.
Provider adapters
- Own provider protocols, response parsing and downloads; replies belong in commands/. wit.py and wolfram.py also register Telegram handlers, so trace their routes when changing them.
- An imported module or reachable home page does not prove its active command works; check the actual request and response path.
- exceptions.py defines
ExternalServiceErrorand user-readable failures; preserve caller contracts when normalizing transport and parsing errors. - Bound the whole operation, including polling and retries, and own session/file cleanup explicitly.
- Prefer results and structured failures over Telegram objects; keep natural Russian/English explanations in the command layer.
- Provider retirement must account for every caller, callback, startup applet and configuration field; several adapters serve multiple commands.
- Remove only the intended adapter from mixed modules, and preserve the purpose of retained features when a backend changes.
_api2ch/is isolated third-party source usingpydantic.v1; access it throughdvach.pyand keep SDK changes separate from application model migrations.- jdoodle.py owns the compiler catalog and request models; aliases and stdin conversations belong to commands/prog.py. Preserve Wolfram's established crop/layout behavior.