Commit Graph
15 Commits
Author SHA1 Message Date
Rin a5287c08d2 refactor(minecraft): add ETA-based pathfinding timeout with stuck detection and retry limits
Patches mineflayer-pathfinder to implement estimated-time-of-arrival based navigation timeouts (2× estimated travel time + grace period). Adds stuck detection counter that triggers failure after 3 consecutive resets without progress. Introduces patchedGoto wrapper returning {ok, reason, elapsedMs, estimatedTimeMs, message} for all navigation calls. Updates goToPlayer/goToPosition actions to surface timeout
2026-02-19 00:25:06 +08:00
Rin 4ce0c427bc refactor(minecraft): simplify giveUp action to halt until player input instead of timed cooldown
Removes cooldown_seconds parameter and timer-based resumption from giveUp action. Brain now uses boolean givenUp flag instead of giveUpUntil timestamp. Action halts all autonomous processing until next player chat message. Updates error-burst guard to remove suggestedCooldownSeconds field. Adjusts prompts, tests, and MCP server to reflect halt-until-input semantics.
2026-02-19 00:25:06 +08:00
Rin aa2d7af17c refactor(minecraft): further cleanup 2026-02-18 11:14:45 +08:00
Rin fdb0d26b4d feat(minecraft): add patterns runtime to REPL with block alias support for collect actions
Add PatternRuntime to brain sandbox exposing patterns.get/find/ids/list helpers for known-working recipes, update mcp-surface.md to document patterns global, add patterns to brain-prompt.md globals list with usage guidance, expose patterns in js-planner sandbox and introspection, add test coverage for patterns.get/find in REPL, integrate matchesBlockAlias in breakBlockAt action to support variant-aware block verification

[autofix.ci] apply automated fixes

chore(minecraft): cleanup

[autofix.ci] apply automated fixes
2026-02-18 11:14:44 +08:00
Rin 165fde7745 fix(minecraft): remove autoCraft action and fix craftRecipe num parameter to mean craft count not output count
Remove autoCraft action (redundant with craftRecipe's auto-handling of intermediate materials), update craftRecipe description to clarify num parameter is craft count not output item count (e.g. crafting planks once yields 4 planks), fix ensurePlanks to pass logsToCraft instead of logsToCraft*PLANKS_PER_LOG to craftRecipe, fix craftRecipe to use replaceAll instead of replace for space norm
2026-02-18 11:14:42 +08:00
Rin ca6f157192 feat(minecraft): prioritize player chat over stale feedback/follow-ups in brain event queue
Add event priority system (player_chat=0, perception=1, feedback=2, no_action_followup=3) with getEventPriority helper, implement coalesceQueue() to stable-sort queue by priority and drop redundant no-action follow-ups when player chat is waiting, call coalesceQueue before each queue shift to ensure player messages are processed first, add tests verifying chat promotion/followup dropping/order preservation
2026-02-18 11:14:41 +08:00
Rin e9087a341b feat(minecraft): add query DSL for read-only runtime introspection with composable block/entity/inventory queries
Add createQueryRuntime helper exposing query.blocks/blockAt/entities/inventory/craftable with chainable filters (within/limit/whereName/whereType/isOre/sortByDistance/names/first/list/countByName/uniq/whereIncludes), inject query/bot/mineflayer globals into JavaScriptPlanner sandbox and RuntimeGlobals, remove redundant inventory/nearbyBlocks/craftable/entities/searchForBlock/searchForEntity
2026-02-18 11:14:38 +08:00
Rin 6d7db23f6c feat(minecraft): expect guardrails and a working gaze api
Add toCoord/cloneVec3 helpers, return structured telemetry from goToPlayer/goToCoordinate with ok/startPos/endPos/movedDistance/distanceToTargetBefore/distanceToTargetAfter fields, track lastPlannerOutcome summary (actionCount/okCount/errorCount/returnValue/logs) in Brain and inject as [SCRIPT] context with truncation, implement expect/expectMoved/expectNear guardrail tools in JavaScriptPlanner to validate action
2026-02-18 11:14:38 +08:00
Rin 7438361008 refactor(minecraft): replace blocking followPlayer with reflex auto-follow system
Replace async followPlayer skill with sync reflex-based auto-follow that runs during idle mode, add clearFollowTarget action to disable auto-follow before independent movement, add autonomy state to ReflexContext tracking followPlayer/followDistance/followActive/followLastError, implement reconcileAutoFollow in ReflexRuntime using pathfinder GoalFollow that pauses during work/wander/alert modes, add followControl:
2026-02-18 11:14:38 +08:00
Rin 80aa5ba66d fix(minecraft): clamp unsolicited chat and ignore harness wrappers 2026-02-18 11:14:38 +08:00
Rin 9e31bf33d5 refactor(minecraft): change action return types from string to unknown and improve search actions
Replace string return type with unknown in ActionRegistry/TaskExecutor to support structured responses, change searchForBlock/searchForEntity from navigation to pure search returning structured data with found/block/entity/distance fields, add validation result handling in js-planner to return failed validations as ActionRuntimeResult instead of throwing, use nullish coalescing (??) instead of OR (
2026-02-18 11:14:37 +08:00
Rin e69e6608b8 feat(minecraft): add giveUp tool with cooldown suppression 2026-02-18 11:14:37 +08:00
Rin b02d4a9b8b feat(minecraft): run conscious brain in js repl with runtime globals 2026-02-18 11:14:37 +08:00
Rin 4e1ba4537a feat(minecraft): use js REPL for llm interface, would could possibly go wrong 2026-02-18 11:14:37 +08:00
Rin 6488a3b43c feat(minecraft): back to xsai, again :D 2026-02-18 11:14:36 +08:00