100 Commits
Author SHA1 Message Date
Rin e3cc93f36f chore(stage-tamagotchi-godot): use stable path for main scene (#1865) 2026-05-23 17:18:18 +08:00
Rin b7e9ce1a3d fix(ci): min-integrity: none for safeoutput mcp call (#1645) 2026-04-12 18:02:58 +08:00
Rin 4e1946da43 fix(ci): pr triage permission (#1619) 2026-04-11 01:03:03 +08:00
Rin 2876817f6f chore(ci): add label sync and PR triage workflows (#1575) 2026-04-05 03:11:13 +08:00
Rinautofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>Neko Ayaka
fdeb9561bc feat(minecraft,stage-*): airi integration, isolated-vm plus misc updates (#1371)
* feat(minecraft): contextflow integration

Add AiriBridge to cognitive engine to enable communication with Airi system. Expose `notifyAiri` and `updateAiriContext` functions in JS planner runtime globals for sending notifications and context updates from agent code.

* refactor(minecraft): remove redundant destinations field from airi-bridge

Remove hardcoded `destinations: ['minecraft']` from spark:command, spark:notify, and context:update events as the destination is already implied by the bridge context.

* feat(minecraft): complete AIRI context flow integration

Wire up bidirectional AIRI ↔ Minecraft communication via dedicated
signal channels instead of reusing signal:chat_message.

- Add airi_command and airi_context to PerceptionSignalType
- Route spark:command intents: action/plan/proposal/reroute emit
  signal:airi_command; context intent emits signal:airi_context
- Add inbound context:update listener so AIRI can push context to
  the Minecraft agent
- airi_context signals are injected into conversation history directly
  without triggering a full cognitive cycle
- airi_command events reset the no-action budget (like player chat)
- enterContext/exitContext auto-emit context:update back to AIRI for
  task lifecycle visibility
- Add sendEmit() helper for queued/working/done progress reporting

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* feat(minecraft): report bot startup state to AIRI

Send initial context update to AIRI when brain comes online, including
bot username, server address, position, health, game mode, and list of
other online players. Tagged with 'startup' and bot username for
filtering.

* feat(minecraft): manage bot config through airi

* feat(stage-ui): add minecraft service shell

* fix(stage-ui): use applied minecraft config for chat context

* fix(minecraft): fall back on invalid env port

* fix(minecraft): support quoted env values

* fix(minecraft): ignore empty env overrides

* fix(stage-ui): keep minecraft draft during apply

* fix(stage-ui): simplify minecraft heartbeat label

* feat(stage-ui): simplify minecraft settings shell

* fix(minecraft): use registry heartbeat for stage liveness

* chore(minecraft): remove annoying detector decision logging

* fix(minecraft): limit context flow to bot pushes

* fix(minecraft): use workspace server sdk

* fix(stage-ui): replay registry snapshots for late listeners

* chore(minecraft): add todo for explicit stage deregistration

* feat: improve context flow observability

* fix(stage-ui): remove redundant header and callout from settings and context flow pages

* feat(stage-ui): enhance context flow prompt projection UI with readiness indicator

* docs(stage-ui): clarify context flow prompt projection terminology

* fix(stage-ui): add test for clone-safe context snapshots with nested fields

* todo

* fix(minecraft): avoid blocking startup on airi connection

* Remove LLM timeouts from the Minecraft brain

* Remove context boundary system from Minecraft brain

* feat(minecraft): use isolated-vm for JS planner sandbox

* refactor(minecraft): harden planner sandbox defaults

* Remove LLM attempt timeout guard

* [autofix.ci] apply automated fixes

* Fix server runtime shutdown signal handling

* Remove misleading Minecraft integration toggle

* contextflow destination to stage-*

* chore(deps): updated

* Add settings layout route for web devtools

* chore: default to expand context panels

* fix(server-*): should export more types, and for module:announced should ignore self

* refactor(minecraft): better context orchestration, handle module announce, context sync, and more

* feat(stage-ui): not spark command ready

* [autofix.ci] apply automated fixes

* clean up

* refactor: use :class arrays per AGENTS.md styling guidelines

* cleanup bloated tests

* rm more tests

* use errorMessageFrom

* hardcode to reduce bloat

* update setup instructions

* timeout for brain

* remove more bloat

* fix

---------

Co-authored-by-agent: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by-agent: Codex
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Neko Ayaka <neko@ayaka.moe>
2026-04-01 23:33:59 +08:00
Rinshinohara-rinautofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>Neko
a8441ba17d fix(stage-pages): XSS vulnerability in provider definition (#1492)
Authored-by-agent: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Co-authored-by: shinohara-rin <25588514+shinohara-rin@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Neko <neko@ayaka.moe>
2026-04-01 23:18:02 +08:00
Rin d5be1a079e fix(server-runtime): import Buffer 2026-03-29 00:31:23 +08:00
Rinautofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>RainbowBirdNeko
f85a809d7c refactor(stage-*): analytics and telemetry, including consent (#1414)
---------

Co-authored-by-agent: Codex <267193182+codex@users.noreply.github.com>
Co-authored-by-agent: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: RainbowBird <rbxin2003@outlook.com>
Co-authored-by: Neko <neko@ayaka.moe>
2026-03-24 13:01:39 +08:00
Rin 7b5f19ed78 chore: remove unused dependencies from component-calling and twitter-services 2026-03-18 02:46:21 +08:00
Rin 4fb47a0379 docs(AGENTS.md): use errorMesageFrom (#1372) 2026-03-15 14:43:55 +08:00
RinandClaude Opus 4.6 688836912d chore: disable PostHog telemetry in development mode (#1365)
* chore: disable PostHog telemetry in development mode

Skip posthog.init() when import.meta.env.DEV is true to avoid
sending telemetry data during local development.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Apply suggestions from code review

Co-authored-by: Rin <shinohara-rin@users.noreply.github.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-15 09:39:54 +08:00
RinandNeko 623f35a7e3 feat(stage-pages,stage-ui,i18n): disable auto trigger for chatcompletion check and use explict button (#1336)
Co-authored-by-agent: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: Neko <neko@ayaka.moe>
2026-03-15 04:39:30 +08:00
Rin 1a1f720c93 fix(server-runtime): shutdown server on interruption properly (#1356)
Co-authored-by-agent: Claude Opus 4.6
2026-03-14 21:44:13 +08:00
Rin 621d16c8bd fix(stage-ui): fix hash scroll on SPA navigation to providers page (#1347)
The settings layout uses a scrollable div with overflow-y-auto, not
window. useScrollToHash was scrolling window which had no effect on
SPA navigation. Point it at the actual scroll container instead.

Authored-by-agent: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
2026-03-14 03:35:03 +08:00
Rin e83c17fe57 fix(minecraft): xss mitigation for minecraft debug dashboard (#1344)
Authored-by-agent: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
2026-03-14 00:20:15 +08:00
Rin bed6b475a3 fix(stage-tamagotchi): bring back onboarding dialog (#1104) 2026-03-09 22:06:13 +08:00
Rin 88ac92f3a1 fix(stage-ui): fix LM studio validation problem and add CORS note (#1175) 2026-03-08 18:41:43 +08:00
Rin 7b11d1e0bd feat(minecraft): disable debug servers by default (#1193) 2026-03-08 18:41:32 +08:00
Rin 561b608c03 fix(minecraft): downgrade to mitigate upstream issue and mcp cleanup (#1192)
* fix(minecraft): downgrade minecraft-data to 3.102.3

Serialization error for play.toServer : Write error for undefined : The value of "value" is out of range. It must be >= -128 and <= 127. Received 218 stack=RangeError [ERR_OUT_OF_RANGE]: Write error for undefined : The value of "value" is out of range. It must be >= -128 and <= 127. Received 218

* fix(minecraft): close existing MCP transports on client reconnect

Handle client refresh scenarios by closing existing streamable and SSE transports before creating new ones, preventing resource leaks and connection conflicts.
2026-03-08 05:54:49 +08:00
Rin b9ef42fb85 chore(stage-pages): add Minecraft integration unavailability notice with WIP bot setup instructions (#1161) 2026-03-06 14:55:53 +08:00
Rin ea6f4dfb63 fix(stage-pages): treat comet speech as openai-compatible as it doesn't support voice listing (#1060) 2026-03-02 01:34:28 +08:00
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 91e5158cf3 refactor(minecraft): redesign debug dashboard conversation view with turn-based grouping and context boundary visualization
Replaces flat message list with collapsible turn cards (user+assistant pairs). Parses user messages into tagged sections ([EVENT], [FEEDBACK], [PERCEPTION], etc.) with inline/collapsible rendering based on content type. Adds context status bar showing active context label and archived summaries. Introduces Brain.broadcastConversationState() to emit full context metadata (active
2026-02-19 00:25:06 +08:00
Rin 08afe0f2aa feat(minecraft): add context boundary system with auto-summarization to prevent unbounded conversation history growth
Introduces task context boundaries via enterContext()/exitContext() REPL functions. Active context messages remain in full; completed contexts are summarized and archived. Adds [CONTEXT_HISTORY] prefix message with archived summaries, auto-trim when active context exceeds 30 messages, and auto-collapse when >10 summaries accumulate. Provides history query runtime (recent/search/playerChats/
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 f3486005ea refactor(minecraft): simplify EventBus by removing history and trace query features
Strips ring buffer history storage, getHistory(), getEventsByTrace(), and historySize config from EventBus. Removes logger dependency and default config object. EventBus now only handles emit/subscribe/dispatch without persistent event storage. Updates container to use zero-config createEventBus(). Moves event-bus from cognitive/os/ to cognitive/ directory.

Update services/minecraft/codex-skills/minecraft-debug-mcp/references/mcp-surface.md

Update services/minecraft/codex-skills/minecraft-debug-mcp/references/mcp-surface.md

Update services/minecraft/codex-skills/minecraft-debug-mcp/SKILL.md
2026-02-18 11:14:46 +08:00
Rin fca2f9a244 docs(minecraft): update README to reflect current perception pipeline and cognitive architecture
Replaces outdated attention-detector/buffer references with EventRegistry + RuleEngine pipeline. Updates Conscious layer to Brain/JS-planner/Query-DSL. Clarifies Action layer components (TaskExecutor, ActionRegistry, Tool Catalog). Revises project structure to match current codebase organization.
2026-02-18 11:14:46 +08:00
Rin aa2d7af17c refactor(minecraft): further cleanup 2026-02-18 11:14:45 +08:00
Rin 13805ab7b5 chore(minecraft): remove unused scenario test files
Removes basic-chat.json and damage-reaction.json scenario definitions that are no longer used for testing chat responses and damage reactions.
2026-02-18 11:14:45 +08:00
Rin ae297e8b06 refactor(minecraft): dead code cleanup
Strips saliency thresholds, window counters, signal generation, and route filtering from all perception event definitions and EventRegistry. Events now emit raw data directly via onRawEvent callback without conscious/reflex/debug routing or threshold-based filtering. Removes WindowCounter, SaliencySnapshot, and related timer/slot logic.
2026-02-18 11:14:45 +08:00
Rin 46b1a8d438 refactor(minecraft): replace look-at and teabag behaviors with idle-gaze behavior 2026-02-18 11:14:45 +08:00
Rin 2022c733b3 feat(minecraft): add map() query DSL for ASCII spatial awareness and terrain visualization
Adds `query.map(options?)` to Brain's query runtime, returning ASCII top-down or cross-section maps with configurable radius (1-32), entity/elevation overlays, and yLevel slicing. Symbols include ground, stone, water, lava, trees, ores, chests, players, and mobs. Enables spatial navigation, resource finding, and underground exploration.
2026-02-18 11:14:45 +08:00
Rin 122be40782 chore(minecraft): add @modelcontextprotocol/sdk dependency 2026-02-18 11:14:45 +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 e668b9b410 fix(minecraft): nullify EventRegistry context on stop() to prevent stale handler execution
When stop() is called before detachFromBot(), mineflayer listeners remain
attached. Nullifying context ensures handleMineflayerEvent's guard clause
silently ignores any events that fire in this window.
2026-02-18 11:14:44 +08:00
Rin 32957e4269 fix(minecraft): make action tool globals updatable so REPL reflects runtime action changes
Action tools were defined with configurable: false, preventing updates after
the first evaluate() call. New defineUpdatableGlobal uses configurable: true
so installActionTools can redefine them when available actions change.
2026-02-18 11:14:44 +08:00
Rin a140ce5065 fix(minecraft): stop McpReplServer and destroy Brain on cleanup to prevent port conflicts on reconnect 2026-02-18 11:14:44 +08:00
Rin 303c07747d fix(minecraft): fix Brain resource leaks, race conditions, and unbounded growth
- Store and clean up EventBus subscription and TaskExecutor listeners in destroy()
- Clear stopCancelledControlActionIds Set in destroy() to prevent unbounded growth
- Use setImmediate in enqueueEvent to prevent re-entrant processQueue bypassing isProcessing guard
- Add conversation history trimming (max 40 messages) to prevent exceeding LLM context window
- Remove duplicate pause check block before REPL execution
2026-02-18 11:14:44 +08:00
Rin 2202154b1d fix(minecraft): remove hardcoded return in isCerebrasBaseURL that prevented reasoning from being sent to all LLM providers 2026-02-18 11:14:44 +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 6a50bcf98e feat(minecraft): remove greeting reflex behavior and associated state tracking
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
2026-02-18 11:14:43 +08:00
Rin b170094a99 fix(minecraft): add toJSON/inspect.custom serialization to query chains for cleaner REPL output 2026-02-18 11:14:43 +08:00
Rin 797a00346b chore(minecraft): document query.gaze + remove stale gaze context 2026-02-18 11:14:43 +08:00
Rin 942d03584a feat(minecraft): move gaze to perception + query.gaze 2026-02-18 11:14:43 +08:00
Rin 5ea05fb33e fix(minecraft): remove returnValue from prevRun/lastRun to prevent stringified return mirror exposure
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
2026-02-18 11:14:43 +08:00
Rin 4a354c357e feat(minecraft): add live conversation panel with session tracking and processing state
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
2026-02-18 11:14:42 +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 9a35b853a9 feat(minecraft): add error-burst guard to prevent LLM error loops with mandatory giveUp+chat recovery
Add ErrorBurstGuardState interface tracking threshold/windowTurns/errorTurnCount/recentTurnIds/recentErrorSummary/suggestedCooldownSeconds/triggeredAtTurnId, implement error-burst detection with ERROR_BURST_THRESHOLD=3/WINDOW_TURNS=5/COOLDOWN_SECONDS=45 constants, add isErrorLlmLogEntry/describeErrorLlmLogEntry/collectRecentErrorTurns helpers to identify repl_error/repl_result with errorCount/feedback
2026-02-18 11:14:42 +08:00
Rin 604167c93e fix(minecraft): announce giveUp cooldown to chat with reason when bot gives up
Add try-catch wrapped bot.chat call in executeGiveUpAction to broadcast "[debug] Giving up for {cooldownSeconds}s: {reason}" message, log warning on chat failure
2026-02-18 11:14:42 +08:00
Rin 7d4a0f1224 fix(minecraft): add pause checks during LLM retry loop to prevent execution while paused
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
2026-02-18 11:14:42 +08:00
Rin 0f536b9e4b feat(minecraft): add budgeted no-action follow-up system with stagnation detection and player chat reset
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
2026-02-18 11:14:42 +08:00
Rin e700a177ef fix(minecraft): stop action cancels active control action without emitting failure feedback
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
2026-02-18 11:14:42 +08:00
Rin cbcd23597f fix(minecraft): semicolon now works in single line
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)
2026-02-18 11:14:42 +08:00
Rin 3f059527c3 feat(minecraft): add control action queue to brain for async action management with capacity limits
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
2026-02-18 11:14:41 +08:00
Rin 8010c49d94 feat(minecraft): add includeBuiltins option to get_state tool to filter REPL builtins by default
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
2026-02-18 11:14:41 +08:00
Rin 42e5e33745 fix(minecraft): persist prevRun returnRaw for typed value reuse 2026-02-18 11:14:41 +08:00
Rin 1f7e9468c4 chore(minecraft): rename planner to repl naming 2026-02-18 11:14:41 +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 81381353c8 feat(minecraft): improve error retry logic with exponential backoff and quota detection
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
2026-02-18 11:14:41 +08:00
Rin cbf85af68b fix(minecraft): skip reasoning parameter for Cerebras API to avoid unsupported field errors
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
2026-02-18 11:14:41 +08:00
Rin 5a72898fd0 chore(minecraft): add callable-only reminder and evaluation-loop escape rules to brain prompt
Add callable-only reminder section enforcing function call syntax (query.inventory().summary() not .summary), add invSummary composable pattern example, extend value-first rule with evaluation-loop escape requirement (after one eval turn must call action/chat tool or giveUp), add tests verifying callable reminder/summary example/loop-escape rules appear in prompt
2026-02-18 11:14:41 +08:00
Rin ca109ba9b8 feat(minecraft): compact brain prompt tool descriptions to reduce token usage
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
2026-02-18 11:14:40 +08:00
Rin b124de0f47 feat(minecraft): add pause/resume control for cognitive engine via !pause command and Brain.setPaused/togglePaused/isPaused methods
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
2026-02-18 11:14:40 +08:00
Rin 48ad59b1cc docs(minecraft): document query.self/snapshot helpers and remove degraded environment sentinel references
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
2026-02-18 11:14:40 +08:00
Rin 5642b1e204 feat(minecraft): add query.self/snapshot helpers and inventory count/has/summary methods
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
2026-02-18 11:14:40 +08:00
Rin a9f95aeb53 fix(minecraft): mcp-initiated chat no longer cause "SOMETHING WENT WRONG" 2026-02-18 11:14:40 +08:00
Rin 447f779393 fix(minecraft): re-equip tool after ensurePickaxe and throw typed error for missing harvest tools
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
2026-02-18 11:14:40 +08:00
Rin 843b149e3d fix(minecraft): render nested return objects without [Object] truncation in planner output
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]`
2026-02-18 11:14:40 +08:00
Rin da4af1b9d1 feat(minecraft): document forget_conversation and value-first prompt workflow in MCP skill reference
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
2026-02-18 11:14:40 +08:00
Rin b5978a74d5 feat(minecraft): add forgetConversation runtime function for prompt/debug reset workflows
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
2026-02-18 11:14:39 +08:00
Rin 27c3b7f84a fix(minecraft): llm can now obtain expression results
Add rewriteTrailingExpressionToReturn helper that rewrites final non-statement expressions to return statements, apply to both normalizeReplCode and LLM planner evaluation paths to capture trailing expression values (e.g. `inv;` returns inventory array), skip rewrite if code contains explicit return/ends with block syntax/is statement keyword, add tests verifying debug REPL and multi-line LLM scripts capture trailing expression
2026-02-18 11:14:39 +08:00
Rin b32c2cac89 feat(minecraft): add llm trace endpoint and compact prompt payloads 2026-02-18 11:14:39 +08:00
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