Skip to content

Dashboard command center, extended bot API, and stability fixes#3

Open
packetloss404 wants to merge 1 commit into
dyoburon:mainfrom
packetloss404:fix/conversation-and-building
Open

Dashboard command center, extended bot API, and stability fixes#3
packetloss404 wants to merge 1 commit into
dyoburon:mainfrom
packetloss404:fix/conversation-and-building

Conversation

@packetloss404

@packetloss404 packetloss404 commented Mar 22, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add bot control endpoints: pause, resume, follow, stop, walkto, equip
  • Add terrain scanning and online player list API endpoints
  • Expose detailed bot status: armor, hotbar, XP, stats, combat state, voyager state
  • Guard bot._client.chat and bot.players null checks to prevent crashes on reconnect

Test plan

  • Verify new API endpoints respond correctly via curl
  • Confirm bot detailed status includes armor, XP, and stats data
  • Test bot reconnection doesn't crash on auth or head tracking

🤖 Generated with Claude Code

Backend API:
- Add /api/bots/:name/pause, /resume, /follow, /stop, /walkto endpoints
- Add /api/bots/:name/equip endpoint for gear-up command
- Add /api/terrain endpoint for map terrain scanning
- Add /api/players endpoint for online player list

Extended bot data:
- Expose armor slots, offhand, hotbar in getDetailedStatus()
- Expose XP level/points/progress from bot.experience
- Expose StatsTracker data (mined, crafted, killed, deaths, damage)
- Expose combat state (lastAttackerName, instinctActive)
- Expose voyager internalState and queuedTaskCount
- Add StatsTracker.getStats() and VoyagerLoop.getQueuedTaskCount()

Bug fixes:
- Guard bot._client.chat calls during auth to prevent crash on reconnect
- Guard bot.players null check in head tracking interval

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@packetloss404 packetloss404 force-pushed the fix/conversation-and-building branch from 654dbfd to 71821b4 Compare March 22, 2026 18:41
@packetloss404 packetloss404 changed the title Add Voyager learning loop, bot equip system, and web dashboard API Dashboard command center, extended bot API, and stability fixes Mar 22, 2026
packetloss404 pushed a commit to packetloss404/mc-server-bot that referenced this pull request Jun 17, 2026
First api.ts decomposition (review dyoburon#3). createAPIServer is a ~4400-line closure
defining ~140 routes inline. Extracting per-domain modules of the form
registerXRoutes(app, deps), behavior-preserving, safest-first.

Terrain (GET /api/terrain, /api/terrain/height) is read-only and only needs
BotManager — moved verbatim to routes/terrainRoutes.ts, called from
createAPIServer with { botManager }. Establishes the extraction pattern.

Build clean (tsc); 441/441 tests pass. Live smoke-test pending at next deploy.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
packetloss404 pushed a commit to packetloss404/mc-server-bot that referenced this pull request Jun 17, 2026
…oute modules

First batch of the api.ts (createAPIServer) decomposition (review dyoburon#3). Moved
terrain, schematics (incl. multer upload), and supply-chain route groups into
src/server/routes/*Routes.ts behind registerXRoutes(app, deps); lifted shared
helpers (asyncH/isSafeBotName/isSafeFilename/sanitizeErrorMessage) to
routes/helpers.ts. Behavior-preserving; createAPIServer still owns wiring + the
return object.

Build clean; 441/441 tests pass. Live smoke to follow.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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