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
Remove greetingBehavior from reflex system, delete lastGreetingAtBySpeaker tracking from ReflexSocialState and context snapshot, unregister greeting behavior from ReflexManager, clean up stale comments about greeting behavior compatibility
Remove returnValue assignment from sandbox.lastRun after script execution (keep only returnRaw for typed values), add test verifying prevRun does not expose stringified returnValue property, update brain-prompt.md to remove returnValue references and guide users to stringify returnRaw explicitly for text output (JSON.stringify(prevRun.returnRaw)), update value-first rule examples to use prevRun.returnRaw instea
Replace LLM traces panel with live conversation view showing real-time chat messages, add ConversationUpdateEvent/RequestConversationCommand types, implement emitConversationUpdate in Brain to broadcast conversation state changes (on forgetConversation/turn completion/errors), add session boundary tracking to grey out cleared conversations, implement typing indicator during LLM processing, add collapsible system
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
Add try-catch wrapped bot.chat call in executeGiveUpAction to broadcast "[debug] Giving up for {cooldownSeconds}s: {reason}" message, log warning on chat failure
Add pause checks at start of each retry attempt, after backoff sleep, and before REPL execution to allow !pause command to interrupt brain processing mid-turn, log interruption events with scheduler tags tracking attempt number and event context
Add NoActionBudgetState interface tracking remaining/default/max budget, implement budget system with DEFAULT=3/MAX=8 limits and STAGNATION_REPEAT_LIMIT=2, add setNoActionFollowupBudget/getNoActionBudgetState/resetNoActionFollowupBudget methods, track stagnation via buildNoActionSignature comparing returnValue+logs across turns, block follow-ups when budget exhausted or stagnated and emit brain
Add test confirming executeStopAction cancels active control action (goToPlayer), marks it as cancelled in queue snapshot, calls bot.interrupt, and does not enqueue failure feedback event for the cancelled action
Extract normalizeReplCode/rewriteTrailingExpressionToReturn from Brain to new repl-code-normalizer module, add test verifying single-line statements with trailing expressions return values (const nearestLog = [...]; nearestLog)
Add ControlActionQueueEntry/ActionQueueSnapshot types tracking action state (pending/executing/succeeded/failed/cancelled), implement control action queue with MAX_QUEUED_CONTROL_ACTIONS=5 and MAX_PENDING_CONTROL_ACTIONS=4 capacity limits, add enqueueControlAction to queue async control actions (skip chat/skip/stop/readonly tools) instead of blocking turn completion, implement runControlActionWorker processing
Add includeBuiltins parameter to Brain.getReplState/JavaScriptPlanner.describeGlobals to optionally skip REPL builtins (skip/use/log/forget_conversation), default to excluding builtins in get_state MCP tool to reduce noise (pass includeBuiltins:true to include them), update SKILL.md documenting builtin filtering behavior, add tests verifying get_state calls getReplState with includeBuiltins flag, ad
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
Add shouldRetryError helper consolidating retry decision logic, expand rate limit detection to catch token_quota_exceeded errors and quota-related messages (token quota/tokens per minute/too many tokens), implement exponential backoff for rate limits (1s→5s with jitter) vs fixed 150ms for other retries, skip turn gracefully on retry exhaustion instead of throwing non-auth errors, log lastError context when
Add isCerebrasBaseURL helper detecting cerebras.ai/cerebras.com domains, conditionally omit reasoning parameter when using Cerebras baseURL since their API doesn't support reasoning field, preserve reasoning defaults (effort: low) for non-Cerebras providers
Replace verbose JSDoc-style tool formatting with pipe-delimited compact format (name|description|sig:positional|obj:object|args:params), abbreviate common words in descriptions (Automatically→Auto, approximately→approx, coordinate→coord, inventory→inv, nearest→near, number of→#, player→plyr, resource→res, position→pos, whether→if), flatten parameter descriptions from multi-line @param blocks to semic
Add paused state to Brain with setPaused/togglePaused/isPaused methods, suppress all event processing while paused (log suppression to llmLogEntries with scheduler/paused/suppressed tags), add !pause chat command in CognitiveEngine to toggle pause state with confirmation message, expose paused flag in getReplState/getSnapshot for debug visibility, add test verifying ll
Update SKILL.md and mcp-surface.md to recommend compact value reads (query.self/snapshot/inventory helpers), document query runtime shortcuts (self/count/has/summary/snapshot) in mcp-surface.md, add query.self/snapshot usage examples to brain-prompt.md composable patterns, remove degraded environment sentinel warnings now that inject_chat refreshes reflex context first
Add query.self() returning one-shot self state (pos/health/food/heldItem/gameMode/isRaining/timeOfDay), add query.snapshot(range) returning combined self/inventory/nearby snapshot with counts/summary/emptySlots/totalStacks and blocks/entities/ores within range, add inventory.count(name)/has(name, atLeast)/summary() helpers for item queries, register query.self/snapshot as readonly functions in JavaScriptPlanner sandbox
Re-equip block-appropriate tool after ensurePickaxe crafting/ensuring workflow to capture newly crafted pickaxe, add second canHarvest check post-equip to verify harvestability with new tool, replace generic Error with ActionError(RESOURCE_MISSING) for missing tool failures to enable proper error handling
Set inspect depth to null (unlimited) in JavaScriptPlanner.evaluate to fully expand nested objects instead of truncating with [Object] placeholder, add maxArrayLength/maxStringLength limits (100/10000) to prevent unbounded output, add test verifying nested pos objects render as `{ x: 10, y: 64, z: -2 }` instead of `[Object]`
Add forget_conversation() usage examples to SKILL.md and mcp-surface.md, document two-turn value-first flow (read/query returns data first, follow-up turn acts on returned value), add prompt-behavior validation workflow for testing read->action patterns, note forget_conversation clears only conversation memory without touching llm state
Add forgetConversation method to Brain that clears conversationHistory and lastLlmInputSnapshot, expose as forget_conversation() global in JavaScriptPlanner sandbox, update brain-prompt with value-first rule mandating read->return->act pattern for world/query-dependent requests to avoid acting on unresolved variables, add tests verifying forgetConversation only clears conversation state without touching ll
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
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
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
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
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:
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 (