Commit graph

12 commits

Author SHA1 Message Date
b60cc8a987 Add combat debug logging (gameMode, target id, distance)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-30 14:25:24 -05:00
513507e941 Smart crafting: walk to table, check materials, report results
Bridge craft_item now:
- Fuzzy-matches item names (wooden_pickaxe, wood_pickaxe, etc.)
- Searches for crafting table within 32 blocks
- Walks to crafting table if found but not close enough
- Checks if materials are available
- Reports specific failure reasons to chat:
  "I need a crafting table" / "I don't have the materials"
- Reports success: "Done! Crafted 1 wooden pickaxe."

Brain now:
- Reports craft success/failure to in-game chat
- Reports any HIGH priority task failure to chat
- Handles craft_item as async (waits for pathfinding + crafting)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-30 13:53:48 -05:00
813f8704bb Smarter craft command parsing — stops at prepositions
- Craft regex captures full text, then parser extracts item name
- Strips filler words (a, an, some, the)
- Stops at prepositions (with, from, using, in, for)
- Takes max 3 words for item name
- "craft sticks with wood" → "sticks"
- "craft a wooden pickaxe" → "wooden_pickaxe"

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-30 13:47:52 -05:00
09464043bf Fix: task executes before response, craft parses single word
- Commands now get a quick "On it" / "Got it" acknowledgment
- No AI call before task runs — Doug does the task FIRST
- Craft regex captures single word only ("sticks" not "sticks with")

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-30 13:37:53 -05:00
9c7ae89dd2 Fix craft parsing, sustained combat, combat cooldown
- Craft regex now captures only 1-2 words (not entire sentence)
- Mine regex same fix
- Combat is now sustained: bridge keeps attacking every 500ms until
  target dies, leaves range, or 10s timeout
- Combat has 12-second cooldown to prevent spam
- Bot chases target if too far for melee during combat

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-30 13:34:34 -05:00
3832094a5c Remove old behaviors package dir conflicting with behaviors.py
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-30 13:26:13 -05:00
be4476ce4d Phase 3b: Command parsing, AI context, player instructions
- CommandParser: regex-based parsing for follow, stop, go, chest,
  craft, mine, give, attack, look commands
- Commands converted to high-priority tasks in the brain's queue
- AI prompt now includes real-time context: current action, health,
  nearby players, hostiles, time of day
- Doug answers "what are you doing?" truthfully based on actual state
- Player commands get personality-appropriate AI acknowledgments
- Brain's wants_ai_chat signal wired for unprompted chat

Supported commands:
  "Doug, follow me" → follow_player task
  "Doug, stop" → stop task
  "Doug, open that chest" → open_chest task
  "Doug, sort the chest" → sort_chest task
  "Doug, craft a pickaxe" → craft_item task
  "Doug, mine some stone" → find + dig task
  "Doug, attack that" → attack_nearest_hostile task

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-30 13:15:59 -05:00
b609d4c896 Phase 3: Task queue, behavior engine, trait-driven decisions
- TaskQueue with 6 priority levels (IDLE → CRITICAL)
- BehaviorEngine generates tasks based on persona traits:
  - Survival: flee (bravery-weighted), eat, seek shelter (anxiety)
  - Combat: attack hostiles (bravery threshold)
  - Social: follow players (sociability), approach for interaction
  - Exploration: read signs, check containers, wander (curiosity range)
  - Organization: inventory management (OCD quirk)
  - Idle: look around, unprompted chat (chatty_cathy)
- Brain rewritten to use scan → generate → execute loop
- New bridge actions: open_chest, close_container, transfer_item,
  scan_surroundings, find_blocks, attack_nearest_hostile,
  list_recipes, craft_item, use_block, drop_item
- Traits influence: flee distance, wander range, combat willingness,
  social approach frequency, container curiosity
- Brain passes persona traits from database to behavior engine
- Unprompted AI chat via wants_ai_chat signal

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-30 12:48:15 -05:00
8f616598fd Fix chat, brain stability, MariaDB reconnect, suppress warnings
- Listen on raw 'text' packet for Bedrock chat (pattern-based chat event
  doesn't fire reliably on Bedrock)
- Brain: add safety reset for stuck pending_status flag
- MariaDB: add retry-on-disconnect for all query methods
- Suppress harmless punycode deprecation warning from Node.js
- Add mineflayer-bedrock lib packages (mineflayer, prismarine-chunk,
  prismarine-registry) for movement support
- Exclude minecraft-data from git (278MB, installed via npm)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-30 12:33:17 -05:00
d0a96ce028 Rebuild bridge on mineflayer-bedrock — real movement!
- Replace raw bedrock-protocol packets with mineflayer-bedrock
- Movement uses pathfinder (setGoal/GoalNear) — works on server-auth BDS
- No cheats, no OP, no teleports — Doug walks like a real player
- Bridge is now plain JS (no TypeScript) with Node 22
- Brain uses move_to with pathfinder instead of fake teleport steps
- Fix MariaDB connection timeout with auto-reconnect
- Tested: bot spawns and walks on vanilla BDS 1.26.11

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-30 11:56:56 -05:00
9aa0abbf59 Phase 1+2: Doug connects, chats, brain loop (movement WIP)
- Hybrid Python/Node.js architecture with WebSocket bridge
- PySide6 desktop app with smoky blue futuristic theme
- bedrock-protocol connection (offline + Xbox Live auth + Realms)
- Ollama integration with lean persona prompt
- 40 personality traits (15 sliders + 23 quirks + 2 toggles)
- Chat working in-game with personality
- Brain loop with decision engine
- Movement code (needs mineflayer-bedrock for proper server-auth)
- Entity tracking framework
- RakNet protocol 11 patch for newer BDS

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-30 10:30:39 -05:00
13f5c84069 Phase 1 complete: Doug connects, chats with personality
- Hybrid Python/Node.js architecture with WebSocket bridge
- PySide6 desktop app with smoky blue futuristic theme
- Dashboard, Create Doug, Settings screens
- bedrock-protocol connection to BDS (offline + Xbox Live auth)
- Realm support (auth flow with device code + browser auto-open)
- Ollama integration with lean persona prompt (~95 tokens)
- 40 personality traits (15 sliders + 23 quirks + 2 toggles)
- SQLite + MariaDB database with 12 tables
- Chat working in-game with proper Bedrock text packet format
- RakNet protocol 11 patch for newer BDS versions
- jsp-raknet backend (native crashes on ARM64 macOS)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-30 02:03:25 -05:00