Dashboard overhaul: control platform, fleet management, and coordination UI#5
Open
packetloss404 wants to merge 107 commits intodyoburon:mainfrom
Open
Dashboard overhaul: control platform, fleet management, and coordination UI#5packetloss404 wants to merge 107 commits intodyoburon:mainfrom
packetloss404 wants to merge 107 commits intodyoburon:mainfrom
Conversation
Absorbed the mc-server-web Next.js dashboard into web/ directory. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Guard against null bot.players and bot.entity in head tracking and ambient chat to prevent crashes during bot initialization. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Backend: - BuildCoordinator orchestrates multi-bot schematic builds - Y-layer partitioning splits work across bots (bottom-up) - Real-time Socket.IO progress events (build:started, build:progress, etc.) - 8 new API endpoints for schematics and build management - BUILDING state added to BotState enum Frontend: - New /build page with schematic selection, bot assignment, and live progress - Build progress cards with per-bot status and progress bars - Socket.IO listeners for real-time build updates - Build nav item in sidebar Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Backend: - ChainCoordinator manages sequential multi-bot supply chains - Shared chests as handoff points between stages - 3 built-in templates (iron ingots, stone tools, bread production) - Polling-based stage completion detection via VoyagerLoop - Retry logic, loop support, and persistent storage - 8 new API endpoints for chain CRUD and control - Socket.IO events for real-time chain progress Frontend: - New /chains page with chain list, creation form, and detail view - Template-based and custom chain creation with bot/chest assignment - Horizontal flow visualization with stage status indicators - Chain nav item in sidebar Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Social Memory (src/social/SocialMemory.ts): - Persistent memories with importance scoring and decay - Heuristic reflection system (summarizes experiences into insights) - Emotional state tracking (mood, energy, sociability) - Memory context builder for LLM prompts - Keyword-based relevant memory retrieval Bot Communications (src/social/BotComms.ts): - Inter-bot message routing with queues and listeners - Message types: chat, request, inform, greeting - Real-time delivery via registered callbacks Enhanced Social AI: - AffinityManager now tracks relationship events (last 20 per pair) - Natural language relationship summaries for prompts - System prompt includes nearby bots, memories, emotional state - Personality-aware social context in all LLM calls - Bots detect and route messages from other bots Integration: - VoyagerLoop task success/failure callbacks update social memory - 10-minute reflection intervals generate insights - 3 new API endpoints for memories, messages, and bot messaging Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- GeminiClient: conditional thinkingConfig (only for models that support it) - BotInstance: class selection after login (maps personality to server class) - BotInstance: proactive login before register, fix double reconnect - BuildCoordinator: async schematic loading with bot version - Build page: null safety on placedBlocks and assignments - Config: switch to gemini-3-flash-preview model Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Partition by block count instead of Y-layers for equal work distribution - Increase setblock delay to 250ms to avoid server spam kicks - Stop pathfinding and clear control states before building - Pause voyager loop during builds, resume when done - Execute bot assignments in parallel instead of sequential - Add bot pause/resume/stop/follow/walkto API endpoints Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Tabbed bot selection: "Use Existing Bots" or "Create Bots for Task" - AI recommendation based on schematic block count (~15 min target) - Name prefix, personality selector, and bot count stepper (1-5) - Create-then-wait-then-build flow with progress messages - 90s connection timeout with partial connection support - Estimated build time display based on selected bot count Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Build system: - Auto-OP and whitelist bots on creation via existing OP bot - Creative mode during builds to prevent bot deaths - Switch back to survival after build completes - Teleport bots above build site (Y+50) to avoid suffocation - Memory-efficient block storage (raw numbers instead of Vec3) - Skip full block counting for huge schematics (>500K volume) - Block count safety limit (50K actual blocks) - Player/bot position picker for build origin coordinates API: - Add /api/players endpoint for online player positions Skills: - New auto-generated skills from bot runtime Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Merged upstream changes while keeping all local features: - BlackboardManager for shared bot state - Swarm directive system for coordinated multi-bot goals - Claude/Anthropic LLM provider (kept Gemini as active provider) - Diagnostics snapshot API - Drowning instinct, join stagger, improved task API Local features preserved: - Build system (multi-bot schematic building) - Supply chain automation - Social AI (memory, bot comms, emotional state) - Build page with bot creation and player position picker Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Move render-time ref mutations (botsRef, playersRef) into useEffect to fix React 18 strict/concurrent mode violations. Extract MapToolbar, MapEntitySidebar, and mapDrawing utilities into separate files under web/src/components/map/. Add MapMode type and interaction mode state to prepare for future features (markers, zones, routes). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
# Conflicts: # web/src/lib/api.ts
# Conflicts: # AGENTS.md
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…quadManager Set up vitest test infrastructure and create control service stubs with comprehensive unit tests (19 tests across 4 files) covering command lifecycle, mission status transitions, marker CRUD, zone management, squad membership, and socket event emission. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ints Introduces src/control/MarkerStore.ts with full CRUD for markers, zones, and routes backed by JSON file persistence. Emits Socket.IO events on mutations. Adds spatial helpers (findNearestMarker, isInsideZone). REST endpoints added to api.ts: - GET/POST/PATCH/DELETE /api/markers - GET/POST/PATCH/DELETE /api/zones - GET/POST/PATCH/DELETE /api/routes Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…nt migration Introduces src/control/CommandCenter.ts as the central command dispatch service for bot control. Commands flow through a typed lifecycle (queued -> started -> succeeded/failed/cancelled) with Socket.IO events emitted at each transition and persistence to data/commands.json. Adds REST endpoints: POST/GET /api/commands, GET /api/commands/:id, POST /api/commands/:id/cancel. Also adds bot action shortcuts (pause/resume/stop/follow/walkto) that route through CommandCenter. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Define CommandRecord and MissionRecord interfaces in api.ts - Add useControlStore with command tracking, bot selection, and pending/history derived lists - Add useMissionStore with mission CRUD and sorted mission list - Subscribe SocketProvider to command:* and mission:* socket events with proper cleanup and payload unwrapping Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…sion endpoints - Create src/control/MissionManager.ts with full CRUD, lifecycle transitions (pause/resume/cancel/retry), bot queue management, and JSON persistence - Add 7 public queue accessor methods to VoyagerLoop (getQueueLength, getQueuedTasksDetailed, removeQueuedTask, insertTaskAtFront, reorderQueue, clearQueue) without modifying existing private fields or loop logic - Add 9 REST endpoints for missions and bot queue management in api.ts - Extend BotInstance.getDetailedStatus() with queuedTaskCount and previews - Copy control type definitions (MissionTypes, CommandTypes, FleetTypes, WorldTypes) into worktree Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace direct endpoint calls (pauseBot, resumeBot, stopBot, followPlayer, walkTo) with api.createCommand() for unified command dispatching. Adds fallback to legacy endpoints if the command API returns 404. Introduces useControlStore for command history tracking and displays a "Recent Commands" section with colored status dots below the main buttons. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Introduces src/control/RoleManager.ts for managing bot role assignments (guard, builder, hauler, etc.) with JSON file persistence and Socket.IO event emission on mutations. Adds REST endpoints in api.ts for listing, creating, reading, updating, and deleting role assignments. A bot can only have one active role at a time — creating a new one replaces the old. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
# Conflicts: # src/control/CommandTypes.ts # src/server/api.ts
# Conflicts: # src/control/CommandTypes.ts # src/server/api.ts
…l shutdown - All services: debounced saves (1s batch), try/catch on all disk I/O, corrupt file recovery with empty state, ensureDir on write - CommandCenter: cleanup() removes commands >24h and caps at 500, shutdown() cancels active commands with "server shutdown" reason, structured logs include commandId/botName/type/status/source/durationMs - MissionManager: cleanup() removes terminal missions >24h and caps at 200, shutdown() cancels running/queued missions, structured log fields include missionId/botName/type/status/source/durationMs - MarkerStore: debounced per-collection saves, shutdown() flushes all, structured logs include markerId/name/kind, zoneId/name, routeId/name - SquadManager: debounced save, shutdown(), structured logs with squadId/name/action - RoleManager: debounced save, shutdown(), corrupt file recovery, structured logs with assignmentId/botName/role/action - Tests: added cleanup, shutdown, and debounce verification tests Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…atform health check
- Move all control platform singletons (CommandCenter, MissionManager,
MarkerStore, SquadManager, RoleManager, CommanderService, BuildCoordinator,
ChainCoordinator) to single instantiation block at top of createAPIServer
- Pass markerStore to CommandCenter constructor so marker-based commands
(move_to_marker, return_to_base, guard_zone, patrol_route) work correctly
- Remove duplicate /api/roles GET route (was registered twice after merges)
- Remove duplicate setRoleManager wiring and override timeout interval
- Add controlPlatform stats to /api/status health check endpoint
- All existing endpoints (task, pause, resume, stop, follow, walkto, bot CRUD)
verified to return { success: true } on success and { error } on failure
- Sync dependent files from main (control/, build/, social/, supplychain/)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ation - Add test/control/RoleManager.test.ts: assignment CRUD, one-role-per-bot replacement, override tracking, override expiry, socket events - Add test/control/CommanderService.test.ts: no-LLM parse, LLM parse, plan structure validation, plan execution, unknown plan ID handling - Add test/control/integration.test.ts: cross-service tests for commands, missions, markers, squads, zone containment, spatial lookup - Extend MarkerStore.test.ts: routes, zone/route update/delete, findNearestMarker, isInsideZone (rectangle + circle) - Extend SquadManager.test.ts: update, delete, edge cases - Update AGENTS.md: control services reference, full API endpoint summary, complete test commands, dashboard run instructions - Update CLAUDE.md (local only, gitignored): control platform architecture, API endpoint summary, comprehensive data file listing Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
# Conflicts: # src/control/CommandCenter.ts # src/control/MarkerStore.ts # src/control/MissionManager.ts # src/control/RoleManager.ts # src/control/SquadManager.ts # test/control/CommandCenter.test.ts # test/control/MarkerStore.test.ts # test/control/MissionManager.test.ts # test/control/SquadManager.test.ts
# Conflicts: # src/control/CommandCenter.ts # src/control/MarkerStore.ts # src/control/MissionManager.ts # src/control/RoleManager.ts # src/control/SquadManager.ts # src/server/api.ts
# Conflicts: # src/control/CommandCenter.ts # src/control/CommanderService.ts # src/control/MarkerStore.ts # src/control/MissionManager.ts # src/control/RoleManager.ts # src/control/SquadManager.ts # src/server/api.ts
Resolved all conflict markers in MarkerStore.ts (10 conflicts) and RoleManager.ts (9 conflicts), keeping the HEAD versions with debounced saves, error handling, and richer structured logging. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Remove calls to nonexistent cleanup() and shutdown() methods on MissionManager and CommandCenter - Mark unimplemented feature tests (cleanup, shutdown) as .todo() - Fix persistence tests: save/persist are synchronous, not debounced - Remove mm.shutdown() from afterEach since the method doesn't exist Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
# Conflicts: # web/src/components/Sidebar.tsx # web/src/components/SocketProvider.tsx
# Conflicts: # web/src/app/map/page.tsx
# Conflicts: # web/src/app/fleet/page.tsx # web/src/components/FleetSelectionBar.tsx
…prep Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…nd click-to-place - SchematicPlacementStore for cross-component communication - drawSchematicFootprint() shared canvas drawing function - SchematicMiniMap inline component on Build page with terrain, markers, and footprint - "Pick on Map" button toggles the mini-map, click to set origin - Footprint summary showing dimensions and coordinate range - Footprint overlay renders on full Map page too - Active build footprint shown in green on map during construction Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…merges Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- npm start now uses --max-old-space-size=8192 - Block limit raised from 50k to 500k - File size guard: reject schematics over 10MB before loading - Metadata loading threshold raised to 10MB so all schematics show dimensions Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…e guard - Schematics over 50KB compressed now estimate dimensions from file size instead of parsing the full NBT voxel array (prevents 8GB OOM) - startBuild rejects schematics with volume > 2M voxels before iterating - Small schematics still get exact block counts Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ain API, foundation filling, personality tasks, event-driven sockets Bug fixes: - Fix memory leaks in BotInstance (timers, listeners, cooldown map not cleared on disconnect) - Fix container/furnace never closing on error (try-finally) - Wire up affinity system (onHit, isHostile, onGift callback) - Fix file write race conditions (2s debounce + atomic writes on 6 data managers) - Fix walkTo race condition and attack.ts double-resolve - Fix path traversal vulnerability in schematic endpoint - Fix voyager pause flag desync (Set-based pauseReasons replacing boolean) - Fix squad mission resolution (resolve squad IDs to bot names) - Fix multi-bot mission progress (wait for ALL assignees) - Fix bot-to-bot message loop risk (require direct request phrases) - Fix override expiry timer never running - Fix inventory listener crash on startup - Auto-cleanup build bots on completion - Player chat tasks now interrupt autonomous tasks and auto-resume paused loops Features: - Terrain scanning API (/api/terrain, /api/terrain/height, /api/terrain/heightmap) - Build foundation filling (auto-fill gaps under schematic with stone) - Snap-to-ground build placement (auto-detect ground level) - Personality-specific task selection (farmers farm, guards guard, etc.) - Emotional state drives ambient chat frequency - Bot-to-bot task coordination (process inter-bot requests) - Event-driven socket updates (replacing 2s polling with EventEmitter) - Trimmed AI prompts (~60% reduction in ActionAgent, critic examples 11→5) - Graceful shutdown flushes all pending writes - CHANGELOG.md and dev notes Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Migrate task queueing, swarm directives, long-term goal display, and blackboard reservations from dashboard/ to web/ - Delete old vanilla JS dashboard and its static serving - Add 60s watchdog to auto-reconnect disconnected bots - Fix TypeError in history page (undefined command type) - Fix TypeError in map page (undefined assigneeIds) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
web/monorepo directory, add Vitest test infrastructure, standardize logging, add health/metrics endpointsTest plan
npm run buildcompiles cleanlynpx vitestfor backend/frontend unit tests🤖 Generated with Claude Code