Commit Graph
2659 Commits
Author SHA1 Message Date
Rin 10251a9a80 feat(minecraft): interesting stuff happening! minecraft mcp 2026-02-18 11:14:39 +08:00
Rin 1ecedb203b fix(minecraft): correct gaze ray pitch direction 2026-02-18 11:14:39 +08:00
Rin e700676335 feat(minecraft): extract brain prompt to markdown template with hot-reload support
Move brain-prompt system prompt from inline TypeScript string to external brain-prompt.md file, implement template loading with fs.watch hot-reload in development mode, add renderTemplate helper for {{variable}} substitution to inject toolsFormatted, cache loaded template with ensureTemplateLoaded/ensureWatcher helpers to avoid repeated disk reads
2026-02-18 11:14:39 +08:00
Rin dc599dff25 refactor(minecraft): remove chat suppression logic and human chat timestamp tracking
Remove shouldAllowChatForEvent/updateHumanChatTimestamp methods, delete lastHumanChatAt/botUsername state fields, remove chat action suppression check in processEvent planner callback to simplify brain state management
2026-02-18 11:14:39 +08:00
Rin 4f382e0289 feat(minecraft): expose LLM log to runtime for introspection
Add LlmLogEntry interface with id/turnId/kind/timestamp/eventType/sourceType/sourceId/tags/text/metadata fields, implement createLlmLogRuntime helper exposing query API with chainable filters (byTurn/byKind/byEventType/byTag/last/list/count/clear), track llmLogEntries array with appendLlmLog method logging turn_input/llm_attempt/planner_result/planner_error/feedback/scheduler events, inject llmLog/currentInput globals
2026-02-18 11:14:39 +08:00
Rin 034f0f30af fix(minecraft): fix repl results not feeding to llm 2026-02-18 11:14:38 +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 1384161f42 feat(minecraft): add no-action follow-up system to prevent silent observation loops
Add NO_ACTION_FOLLOWUP_SOURCE_ID constant, implement queueNoActionFollowup method that schedules system_alert event with no_actions reason when planner returns zero actions during observation mode, suppress follow-up if already in follow-up chain to prevent infinite loops, update brain-prompt with feedback loop guard guidance to avoid chat->feedback->chat cycles and clarify feedback:true usage for diagnostic verification only
2026-02-18 11:14:38 +08:00
Rin f70f9fac46 feat(minecraft): capture and expose LLM input snapshot in REPL with source tracking
Add LlmInputSnapshot interface tracking systemPrompt/userMessage/messages/conversationHistory/updatedAt/attempt, store lastLlmInputSnapshot in Brain and inject into RuntimeGlobals as llmInput, expose llmInput/llmMessages/llmSystemPrompt/llmUserMessage/llmConversationHistory as frozen readonly globals in JavaScriptPlanner sandbox, add source:'manual'|'llm' field to DebugReplResult to distinguish user-triggered vs autonomous
2026-02-18 11:14:38 +08:00
Rin cce492f685 feat(minecraft): add REPL dashboard tab with live execution 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 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 b20d55508e feat(minecraft): (does it work???)use native reasoning field instead of [REASONING] prefix hack
Replace manual reasoning prefix concatenation with proper reasoning field in Message type, enable reasoning with configurable effort (default: low) in LLM calls, extract reasoningText from response instead of reasoning property
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 edde03216f refactor(minecraft): switch brain to stateless conversation with explicit history management
Replace stateful neuri.handle with handleStateless, maintain conversation history manually using Message[] array, append user/assistant messages only after successful parsing to avoid dirty data on retry
2026-02-18 11:14:08 +08:00
Rin b237ac846d feat(minecraft): add rate limit detection and backoff to brain retry logic
Add isRateLimitError helper to detect 429 status and rate limit messages, implement 500ms sleep on rate limit errors before retry
2026-02-18 11:14:08 +08:00
Rin 62f16570ca feat(minecraft): reasoning hack 2026-02-18 11:14:08 +08:00
Rin f59a11a5d6 fix(minecraft): sane tool description in system mesage 2026-02-18 11:14:08 +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 1c942a84c8 fix(minecraft): validate LLM response structure to retry on invalid format 2026-02-18 11:14:08 +08:00
Rin c21b997569 fix(minecraft): simplify brain error retry logic to catch edge cases
Remove isLikelyRecoverableError helper and retry all non-auth/bad-arg errors
2026-02-18 11:14:07 +08:00
Rin 02d3f38663 fix(minecraft): make logging actually meaningful
Ported from commit f8b73bbf (partial - debug files only):
- Add /api/logs endpoint for listing and loading persisted log files
- Add log file selector UI to debug dashboard
- Filter persistEvent to only save relevant event types
- Add refreshFileList and loadPersistedLog methods to LogsPanel
2026-02-18 11:14:07 +08:00
Rin cb13baf108 chore(minecraft): speckit 2026-02-18 11:14:07 +08:00
Rin e07d775202 refactor(minecraft): remove auto-follow behavior from reflex social mode 2026-02-18 11:14:07 +08:00
Rin a70c2e158f chore(minecraft): minecraft debug config 2026-02-18 11:14:07 +08:00
Rin 4b8f00ce99 feat(minecraft): borrow patch from mindcraft 2026-02-18 11:14:07 +08:00
Neko Ayaka 59b274b91a feat(minecraft-hub): init, but bugged 2026-02-18 11:13:33 +08:00
Rin 9ee5aa86ad chore(minecraft): TODO cleanup and ignore .agent/ 2026-02-18 11:13:08 +08:00
Rin f85b0d805e chore(minecraft): update brain prompt 2026-02-18 11:12:47 +08:00
Rin 260bc37935 fix(minecraft): invalid LLM output breaks blackboard 2026-02-18 11:12:47 +08:00
Rin 02c3949a40 feat(minecraft): use native tool calling for instant tasks 2026-02-18 11:12:47 +08:00
Rin d9b99bdda1 feat(minecraft): improve error handling and auto-craft intermediates...but it doesn't work very well
1. Wrap neuri tool invocations to catch ActionError and return as
   result strings instead of throwing. This allows the LLM to learn
   from tool failures during its reasoning phase.

2. Enhance craftRecipe to use the recipe planner for auto-crafting
   intermediate materials. If the bot has raw materials (e.g., logs)
   but not direct ingredients (e.g., planks), it will automatically
   craft the intermediates first.

3. Add memory note about the dual tool interface discovery (neuri
   native tool calls vs JSON actions through TaskExecutor) for future
   optimization work.
2026-02-18 11:12:46 +08:00
Rin b4f606e538 feat(minecraft): autocrafter and recepie planner 2026-02-18 11:12:46 +08:00
Rin 377d9378bd fix(debug): fix Zod 4 compatibility in tool-executor
In Zod 4, _def.defaultValue is the value itself, not a function.
This was causing 'curr._def.defaultValue is not a function' error
when the debug dashboard tried to extract tool definitions.
2026-02-18 11:12:46 +08:00
Rin e9dd2ce0ac fix(minecraft): fix craftables showing wrong results 2026-02-18 11:12:46 +08:00
Rin fc24f6e636 feat(minecraft): hurt source
limitations: the yaml rule doesn't support conditioning...
2026-02-18 11:12:46 +08:00
Rin e31d5e8cdf chore(minecraft): various context adjustments
make gaze context prompt more informative
provide time in hh AM/PM format instead of day/night
2026-02-18 11:12:46 +08:00
Rin 3c2862516d chore(minecraft): clean up (bot as any) and test files 2026-02-18 11:12:46 +08:00
Rin c77f56d81a feat(minecraft): track and display nearby players' held items in context 2026-02-18 11:12:46 +08:00
Rin 60133ae276 refactor(minecraft): linearize perception event flow, and more refactors
- Change brain retry behavior to abort on error instead of throwing
- Add JSON parsing utilities with better error messages for malformed LLM responses
- Treat JSON syntax errors as recoverable for retry logic
- Update conscious signal subscription to use 'conscious:signal:*' pattern
- Move RuleEngine and rule utilities from cognitive/os to cognitive/perception/rules
- Update tests to reflect new abort behavior (returns

cleanup comments and rename debug source

fix(minecraft): fix system message regression
2026-02-18 11:12:45 +08:00
Rin b493d8ed76 refactor(minecraft): declarative perception pipeline 2026-02-18 11:12:45 +08:00
Rin d53031ff38 feat(minecraft): accept system message 2026-02-18 11:12:45 +08:00
Rin 69c61c1a81 feat(minecraft): auto respawn 2026-02-18 11:12:45 +08:00
Neko Ayaka 5b6be077dc chore(deps): update 2026-02-18 11:12:45 +08:00