Commit Graph
39 Commits
Author SHA1 Message Date
Kunal Bhujbal 57b04d957b fix(minecraft): add stop method to Ticker to prevent resource leak (#1213) 2026-03-09 20:45:46 +08:00
19822e3c43 refactor(minecraft): migrate reflex runtime to alien-signals, harden zod validation, and unify skill utilities (#1092)
* chore: use utils

* feat: refactor pathfinding stagnation detection and add navigation tests

* refactor(minecraft): simplify ensure.ts with shared ensureMined helper

* refactor(minecraft): centralize collectible block aliases and extraction flow

- move block collection usage onto the dedicated action module
- extract collectible alias expansion for ores, deepslate variants, and dirt
- keep exact block validation strict while widening collection lookups
- preserve original smelting errors when temporary furnace cleanup fails
- add regression coverage for alias handling and furnace cleanup

* chore: sleep() using shared utils

* refactor(minecraft): container helpers; guarantee close in takeFromChest()

* chore: add unsafe type comment

refactor: zod schema for YAML rule DSL

refactor: zod for hardened config validation

refactor: zod schema for ws client command validation

* refactor(minecraft): alien-signals for reflex context/runtime/manager state

* fix(minecraft): prevent reconnect deadlock before spawn; centralize plugin lifecycle

* fix(minecraft): make command chat listener idempotent across spawn/reconnect

* refactor(minecraft): extract reconnect state machine into connection supervisor; further centralize plugin-related logic

* fix(minecraft): temp type fix

* fix(minecraft): add LLM call timeout/cancel boundaries and ignore pause abort errors

* fix(minecraft): enforce deterministic temporal rule semantics and honor accumulator.mode

* fix(minecraft): preserve callback errors during container cleanup

* fix(minecraft): report EventBus subscriber failures via project logger

* refactor(minecraft): migrate perception temporal accumulator to detector with decision tracing

* feat(minecraft): add detector.groupBy and optimize rule engine detector hot path

* fix(minecraft): bound event queue and temp anti-starvation scheduling

* fix(minecraft): normalize debug dashboard tool param typing

* [autofix.ci] apply automated fixes

---------

Co-authored-by: Neko <neko@ayaka.moe>
Co-authored-by: Rin <shinohara-rin@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-03-07 03:01:49 +08:00
Rin a135b07957 fix(minecraft): await reconnect plugin initialization before spawn hooks to prevent race conditions
Plugin loadPlugin calls were fire-and-forget during reconnect, allowing spawn
event handlers to run before plugins finished loading. Now initializeReconnectPlugins
runs sequentially and spawn waits for completion before invoking spawned hooks.
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 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 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 c250ecfeec feat(minecraft): add automatic reconnection with configurable retry limit
Add reconnect option to MineflayerOptions with enabled flag and maxRetries (default: 5), implement tryReconnect method to handle kicked/end events, extract setupBotEventHandlers to reuse on reconnect, track reconnect state with reconnectAttempts/isReconnecting/isStopping flags, add @types/node dependency for setTimeout typing
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
Rin 54b3bfdc06 refactor(minecraft): remove legacy action adapter and simplify execution model
- Remove unused ActionLLMHandler and createActionNeuriAgent from adapter.ts
- Replace execution:'parallel'/'sequential' with readonly:true for query tools
- Add 'skip' action for explicit no-op turns
- Remove error suggestion logic (now handled by brain retry)
- Simplify TaskExecutor to use ActionAgent.performAction directly
- Update tests to use createNeuriAgent() without bot parameter
2026-02-18 11:14:08 +08:00
Rin 3c2862516d chore(minecraft): clean up (bot as any) and test files 2026-02-18 11:12:46 +08:00
Rin 69c61c1a81 feat(minecraft): auto respawn 2026-02-18 11:12:45 +08:00
Rin 0b3a9f24e5 refactor(minecraft): better blackboard and task scheduling 2026-02-18 11:12:04 +08:00
Rin 39a5acebfd feat(minecraft): implement raw event pipeline 2026-02-18 11:10:02 +08:00
Rin 8d629a90a2 chore(minecraft): remove bot chat messages and unused inventory functions
bot chat replaced with Error
2026-02-18 11:10:02 +08:00
Rin 1ac8e3fb28 fix(minecraft): implement proper interrupt method to stop bot actions
- Add `interrupt()` method to Mineflayer class with comprehensive action stopping
- Stop pathfinder, pvp, digging, item usage, and control states
- Replace non-working `emit('interrupt')` with `interrupt()` call in stop tool
- Add logging for interrupt requests and completion
- Remove FIXME comment as issue is now resolved
2026-02-18 11:10:01 +08:00
Rin 4b2d06db3b chore(minecraft): various legacy code cleanup 2026-02-18 11:10:00 +08:00
Rin 8facbdacfc feat(minecraft): architecture redesign, blackboard pattern and OODA 2026-02-18 11:09:58 +08:00
Rin 9b698ae42d feat(minecraft): async concious
update dashboard
2026-02-18 11:09:58 +08:00
Neko Ayaka 20cb21f82f fix: usLogg from @guiiai/logg error 2025-09-10 21:18:48 +08:00
RainbowBird 733b8893c7 refactor: replace useLogg with useLogger (#563) 2025-09-07 23:47:23 +08:00
Neko Ayaka 8ee87f9e70 style(*): stronger import sort 2025-06-30 02:23:40 +08:00
Neko AyakaandMakito cc449b1d0c style: use @sumimakito integrated perfectionist/sort-imports`
Co-authored-by: Makito <5277268+sumimakito@users.noreply.github.com>
2025-06-17 14:03:27 +08:00
RainbowBird fdb1bd1b00 chore: useLogger 2025-02-07 01:55:41 +08:00
RainbowBird 2631b4041b refactor: move prompt to self folders 2025-02-07 01:22:44 +08:00
Neko Ayaka 0a7e1b9bf4 chore: bump deps 2025-02-03 15:37:12 +07:00
RainbowBird b804f687cd refactor: planning agent v2 (#2) 2025-01-22 00:47:59 +08:00
RainbowBird 0ba9cf631f feat: planning, action, chat, memory agent implementation (#1) 2025-01-22 00:41:51 +08:00
RainbowBird a550722aef style: import 2025-01-18 19:08:07 +08:00
RainbowBird 5d70b7ae53 chore: short memory 2025-01-17 02:03:33 +08:00
RainbowBird fa99d16c22 chore: bot reconnect 2025-01-17 00:58:49 +08:00
Neko Ayaka 49fc75e1f1 fix: send before connected 2025-01-16 23:19:45 +08:00
RainbowBird a4ad2b698b refactor: split libs 2025-01-10 00:43:14 +08:00
Neko Ayaka d94dfd4e8c chore: slight change 2025-01-09 18:38:14 +08:00
RainbowBird bdca7bb91c chore: global interrupt event 2025-01-09 14:56:31 +08:00
RainbowBird 95cb59a319 fix: status 2025-01-09 14:17:06 +08:00
RainbowBird 799eec284d fix: loadPlugin 2025-01-09 13:46:56 +08:00
RainbowBird 8381f2da08 refactor: EventEmitter3 2025-01-09 13:14:39 +08:00
RainbowBird 244361a11c fix: issues 2025-01-09 01:59:43 +08:00
Neko Ayaka b0e5100c93 refactor: better structure v1 2025-01-09 01:47:51 +08:00