bbsbot
2026-02-04
TW2002 twbot package built out with login reliability fixes, orientation system, and trading mechanics
64 files · 16,069+ · 37-
TW2002 bot package (twbot)
8 files changed
__init__.pyStandalone twbot package rootbot.pyMain TW2002 bot with modular structureadmin.pyAdmin tools for game configurationlogin.pyLogin state machine with baud rate handlingorientation.pyThree-layer orientation system with baud rate handlingtrading.pyTrading execution with port navigation and hagglingio.pyIO layer for game communicationerrors.pyError types for bot operations
- Created standalone
twbotpackage with modular structure: bot, admin, login, orientation, parsing, trading, io, errors instantiate behavioral6 files
__init__.pybot.pyadmin.pylogin.pyorientation.pytrading.py
- Implemented three-layer orientation system with baud rate handling
instantiate
internal
1 file
orientation.py
- Added trading execution with port navigation and haggling
instantiate
internal
1 file
trading.py
- Built admin tools for game configuration
instantiate
internal
1 file
admin.py
Login and connection reliability
3 files changed
login.pyLogin timing fixes and state machine hardeningsession.pySession wait_and_respond timeout increasesbot.pyDivision by zero fix and loop timing improvements
- Fixed critical bot timing bug: wait for idle state before returning from
wait_and_respond()remediate behavioral1 file
session.py
- Increased login timeout from 5s to 10s for game server response time
harden
behavioral
1 file
login.py
- Increased
wait_and_respondtimeout from 10s to 20s for game loading delays harden internal1 file
session.py
- Fixed division by zero in session summary when initial credits are 0
remediate
internal
1 file
bot.py
- Fixed bot loop timing issue with variable timeouts and continue statements
remediate
internal
1 file
bot.py
Validation and testing system
4 files changed
test_login_prompts.pyLogin sequence and prompt detection teststest_login_sequence.pyLogin flow test coveragetest_orientation.pyOrientation system test coveragerules.jsonValidation rules added to TW2002 config (Phase 3)
- Added comprehensive validation and menu exploration tests
qualify
internal
3 files
test_login_prompts.pytest_login_sequence.pytest_orientation.py
- Implemented screen content validation infrastructure (Phase 1-2)
qualify
internal
1 file
extractor.py
- Added validation rules to tw2002 config (Phase 3)
baseline
internal
1 file
rules.json
- Wired up validation checks in bot logic
qualify
internal
1 file
bot.py
Pattern detection improvements
2 files changed
rules.pyPattern detection fixes and edge case documentationprompts.jsonExpanded login prompt patterns
Debug tooling
2 files changed
DEBUG_GUIDE.mdSystematic debugging guide for login issuesdebug_login_diagnostic.pyLogin diagnostic tool for debugging stuck states
- Added systematic debugging guide for login issues
specify
internal
1 file
DEBUG_GUIDE.md
- Added login diagnostic tools for debugging stuck states
specify
internal
1 file
debug_login_diagnostic.py
- Multiple debug scripts for game selection, login flow, and screen content
specify
internal
3 files
debug_game_selection.pydebug_login_show_screens.pydebug_screen_content.py
Documentation
3 files changed
TEDIT_REFERENCE.mdTEDIT login flow and MCP-BBS escape sequence handling docsTWGS_LOGIN_FLOW.mdTWGS login sequence documentationIMPLEMENTATION_COMPLETE.mdImplementation complete document with architecture and test results