bbsbot
2026-02-08
Major module decomposition splits bot.py, trading.py, orientation.py, and ai_strategy.py into focused sub-packages
259 files · 11,035+ · 4,379-
Module decomposition
9 files changed
__init__.pyOrientation package replacing monolithic orientation.pydetection.pyOrientation detection logic extractedknowledge.pyOrientation knowledge base extractedlayers.pyOrientation layers extractedmodels.pyOrientation data models extractedparsing.pyOrientation screen parsing extractedbot_core.pyCore bot logic extracted from bot.pybot_navigation.pyNavigation logic extracted from bot.pybot_twerk.pyTwerk strategy logic extracted from bot.py
- Split
orientation.py(1273 lines) intoorientation/package: detection.py, knowledge.py, layers.py, models.py, parsing.py decouple internal5 files
detection.pyknowledge.pylayers.pymodels.pyparsing.py
- Split
ai_strategy.py(882 lines) intostrategies/ai/: decision_maker.py, feedback_loop.py, goals.py, orchestration.py, validator.py decouple internal1 file
ai_strategy.py
- Split
trading.py(884 lines) intotrading/: execution.py, navigation.py, operations.py, parsers.py, validation.py decouple internal1 file
operations.py
- Split
bot.py(823 lines) into: bot_core.py, bot_navigation.py, bot_twerk.py decouple internal3 files
bot_core.pybot_navigation.pybot_twerk.py
Game-specific MCP tools
3 files changed
mcp_tools.pyMCP tools with --tools flag for granular registrationmcp_tools_control.pyBot control MCP endpointsmcp_tools_session.pySession management MCP endpoints
- Implemented
--toolsflag for granular MCP tool registration (replacing--game) interface behavioral1 file
mcp_tools.py
- Added game filtering so only relevant tools are exposed to MCP clients
interface
internal
1 file
mcp_tools.py
- Created proxy tools for simplified BBS tool access (twbot_debug)
interface
internal
1 file
mcp_tools.py
- Added MCP tools for session management (mcp_tools_session.py) and control (mcp_tools_control.py)
interface
internal
2 files
mcp_tools_session.pymcp_tools_control.py
- Comprehensive documentation for game-specific MCP tools
specify
internal
1 file
mcp_tools.py
Terminal spy/hijack
2 files changed
term_routes.pyTerminal routes API for remote terminal accessapp.pySwarm terminal bridge connecting dashboard to bot terminals
- Added terminal routes API (
api/term_routes.py) for remote terminal access interface behavioral1 file
term_routes.py
- Implemented swarm terminal bridge for connecting dashboard to bot terminals
interface
behavioral
1 file
app.py
- Added terminal spy mode for observing live bot sessions
instantiate
internal
1 file
term_routes.py
Dashboard improvements
1 file changed
swarm_routes.pySwarm API with spawn controls and config dropdown
- Added spawn controls to dashboard UI with config dropdown
instantiate
behavioral
1 file
swarm_routes.py
- Added emoji activity badges and improved completed bot display
instantiate
behavioral
1 file
swarm_routes.py
- Ship name extraction, orientation steps, completed stats, and LLM thinking status
instantiate
internal
1 file
swarm_routes.py
- Event ledger for bots replacing raw log display
instantiate
behavioral
1 file
swarm_routes.py
- Player name parsing and swarm controls
instantiate
internal
1 file
swarm_routes.py
- Improved activity tracking and login state visibility
instantiate
internal
1 file
swarm_routes.py
Session and worker reliability
5 files changed
session.pySession creation bottleneck fixsession_manager.pySession manager hardeninglogin.pyLogin loop bug fix and LLM diagnostics__init__.pyStuck bot analyzer modulestuck_bot_analyzer.pyDiagnostics for tracking and resolving stuck bots
- Fixed critical session creation bottleneck causing bot timeouts
remediate
behavioral
1 file
session.py
- Fixed orientation polling loop bottleneck causing mid-run disconnections
remediate
behavioral
1 file
layers.py
- Fixed login loop bug, credits tracking, and added LLM diagnostics
remediate
behavioral
1 file
login.py
- Fixed turns_max being set to 0 on completion
remediate
internal
1 file
bot_core.py
- Fixed dashboard spawn config dropdown for non-existent directories
remediate
behavioral
1 file
swarm_routes.py
Diagnostics
1 file changed
stuck_bot_analyzer.pyStuck bot analyzer for diagnosing stalled bots
Bot status enhancements
2 files changed
bot_core.pyImproved bot status with ID, activity, and auto-detect turnsrules.jsonCorporate Listings prompt pattern and menu screen detection added
- Improved bot status dashboard: show ID, Activity, auto-detect turns
instantiate
behavioral
1 file
bot_core.py
- Added Corporate Listings prompt pattern and menu screen detection
instantiate
behavioral
1 file
rules.json
- Added hijack indicator to dashboard and bot status tracking
instantiate
behavioral
1 file
swarm_routes.py
- Debounce dashboard table updates to prevent button click failures
harden
behavioral
1 file
swarm_routes.py