awesome-mineflayer-mcp 1.0.2 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (122) hide show
  1. package/NOTICE +29 -0
  2. package/README.md +185 -17
  3. package/dist/account-config.d.ts +41 -0
  4. package/dist/account-config.d.ts.map +1 -0
  5. package/dist/account-config.js +86 -0
  6. package/dist/account-config.js.map +1 -0
  7. package/dist/bot/events.d.ts +6 -1
  8. package/dist/bot/events.d.ts.map +1 -1
  9. package/dist/bot/events.js +12 -2
  10. package/dist/bot/events.js.map +1 -1
  11. package/dist/bot/manager.d.ts +5 -0
  12. package/dist/bot/manager.d.ts.map +1 -1
  13. package/dist/bot/manager.js +54 -13
  14. package/dist/bot/manager.js.map +1 -1
  15. package/dist/bot/render.d.ts +34 -0
  16. package/dist/bot/render.d.ts.map +1 -0
  17. package/dist/bot/render.js +232 -0
  18. package/dist/bot/render.js.map +1 -0
  19. package/dist/bot/screenshot.d.ts +23 -0
  20. package/dist/bot/screenshot.d.ts.map +1 -0
  21. package/dist/bot/screenshot.js +288 -0
  22. package/dist/bot/screenshot.js.map +1 -0
  23. package/dist/config.d.ts +32 -1
  24. package/dist/config.d.ts.map +1 -1
  25. package/dist/config.js +109 -1
  26. package/dist/config.js.map +1 -1
  27. package/dist/index.js +41 -2
  28. package/dist/index.js.map +1 -1
  29. package/dist/lib.d.ts +18 -0
  30. package/dist/lib.d.ts.map +1 -0
  31. package/dist/lib.js +15 -0
  32. package/dist/lib.js.map +1 -0
  33. package/dist/prompts/register.d.ts +14 -0
  34. package/dist/prompts/register.d.ts.map +1 -0
  35. package/dist/prompts/register.js +142 -0
  36. package/dist/prompts/register.js.map +1 -0
  37. package/dist/resources/register.d.ts.map +1 -1
  38. package/dist/resources/register.js +42 -2
  39. package/dist/resources/register.js.map +1 -1
  40. package/dist/server.d.ts.map +1 -1
  41. package/dist/server.js +13 -2
  42. package/dist/server.js.map +1 -1
  43. package/dist/setup.d.ts +9 -0
  44. package/dist/setup.d.ts.map +1 -0
  45. package/dist/setup.js +150 -0
  46. package/dist/setup.js.map +1 -0
  47. package/dist/tools/build.d.ts +11 -0
  48. package/dist/tools/build.d.ts.map +1 -0
  49. package/dist/tools/build.js +293 -0
  50. package/dist/tools/build.js.map +1 -0
  51. package/dist/tools/chat.d.ts.map +1 -1
  52. package/dist/tools/chat.js +27 -4
  53. package/dist/tools/chat.js.map +1 -1
  54. package/dist/tools/containers.d.ts.map +1 -1
  55. package/dist/tools/containers.js +12 -0
  56. package/dist/tools/containers.js.map +1 -1
  57. package/dist/tools/crafting.d.ts.map +1 -1
  58. package/dist/tools/crafting.js +5 -1
  59. package/dist/tools/crafting.js.map +1 -1
  60. package/dist/tools/enchant-anvil.d.ts.map +1 -1
  61. package/dist/tools/enchant-anvil.js +5 -2
  62. package/dist/tools/enchant-anvil.js.map +1 -1
  63. package/dist/tools/events.d.ts.map +1 -1
  64. package/dist/tools/events.js +7 -1
  65. package/dist/tools/events.js.map +1 -1
  66. package/dist/tools/furnace.d.ts.map +1 -1
  67. package/dist/tools/furnace.js +3 -0
  68. package/dist/tools/furnace.js.map +1 -1
  69. package/dist/tools/lifecycle.d.ts.map +1 -1
  70. package/dist/tools/lifecycle.js +41 -0
  71. package/dist/tools/lifecycle.js.map +1 -1
  72. package/dist/tools/raw.d.ts +10 -0
  73. package/dist/tools/raw.d.ts.map +1 -0
  74. package/dist/tools/raw.js +133 -0
  75. package/dist/tools/raw.js.map +1 -0
  76. package/dist/tools/registry.d.ts +7 -0
  77. package/dist/tools/registry.d.ts.map +1 -1
  78. package/dist/tools/registry.js +14 -4
  79. package/dist/tools/registry.js.map +1 -1
  80. package/dist/tools/state-inspect.d.ts.map +1 -1
  81. package/dist/tools/state-inspect.js +43 -0
  82. package/dist/tools/state-inspect.js.map +1 -1
  83. package/dist/tools/villager.d.ts.map +1 -1
  84. package/dist/tools/villager.js +3 -0
  85. package/dist/tools/villager.js.map +1 -1
  86. package/dist/tools/vision.d.ts +4 -0
  87. package/dist/tools/vision.d.ts.map +1 -0
  88. package/dist/tools/vision.js +106 -0
  89. package/dist/tools/vision.js.map +1 -0
  90. package/dist/tools/waypoints.d.ts +4 -0
  91. package/dist/tools/waypoints.d.ts.map +1 -0
  92. package/dist/tools/waypoints.js +144 -0
  93. package/dist/tools/waypoints.js.map +1 -0
  94. package/dist/util/async.d.ts +9 -0
  95. package/dist/util/async.d.ts.map +1 -0
  96. package/dist/util/async.js +33 -0
  97. package/dist/util/async.js.map +1 -0
  98. package/dist/util/errors.d.ts +10 -1
  99. package/dist/util/errors.d.ts.map +1 -1
  100. package/dist/util/errors.js +76 -0
  101. package/dist/util/errors.js.map +1 -1
  102. package/dist/util/format.d.ts +7 -0
  103. package/dist/util/format.d.ts.map +1 -1
  104. package/dist/util/format.js +15 -1
  105. package/dist/util/format.js.map +1 -1
  106. package/dist/util/png.d.ts +10 -0
  107. package/dist/util/png.d.ts.map +1 -0
  108. package/dist/util/png.js +55 -0
  109. package/dist/util/png.js.map +1 -0
  110. package/dist/util/redact.d.ts +9 -0
  111. package/dist/util/redact.d.ts.map +1 -0
  112. package/dist/util/redact.js +16 -0
  113. package/dist/util/redact.js.map +1 -0
  114. package/dist/util/result.d.ts +10 -0
  115. package/dist/util/result.d.ts.map +1 -1
  116. package/dist/util/result.js +45 -2
  117. package/dist/util/result.js.map +1 -1
  118. package/dist/waypoints.d.ts +15 -0
  119. package/dist/waypoints.d.ts.map +1 -0
  120. package/dist/waypoints.js +25 -0
  121. package/dist/waypoints.js.map +1 -0
  122. package/package.json +31 -3
package/NOTICE ADDED
@@ -0,0 +1,29 @@
1
+ awesome-mineflayer-mcp
2
+ Copyright (c) 2026 Ryker Geesaman
3
+
4
+ This product is licensed under the MIT License (see LICENSE).
5
+
6
+ It is built on, and at runtime depends on, the following third-party packages.
7
+ Each is the property of its respective authors and is distributed under its own
8
+ license (all MIT at the time of writing — consult each package for exact terms):
9
+
10
+ Model Context Protocol
11
+ - @modelcontextprotocol/sdk (MIT) https://github.com/modelcontextprotocol/typescript-sdk
12
+
13
+ Mineflayer ecosystem (PrismarineJS)
14
+ - mineflayer (MIT) https://github.com/PrismarineJS/mineflayer
15
+ - mineflayer-pathfinder (MIT) https://github.com/PrismarineJS/mineflayer-pathfinder
16
+ - mineflayer-pvp (MIT) https://github.com/PrismarineJS/mineflayer-pvp
17
+ - mineflayer-collectblock (MIT) https://github.com/PrismarineJS/mineflayer-collectblock
18
+ - mineflayer-tool (MIT) https://github.com/PrismarineJS/mineflayer-tool
19
+ - mineflayer-auto-eat (MIT) https://github.com/link-discord/mineflayer-auto-eat
20
+ - mineflayer-armor-manager (MIT) https://github.com/PrismarineJS/MineflayerArmorManager
21
+ - minecraft-data (MIT) https://github.com/PrismarineJS/minecraft-data
22
+ - prismarine-item (MIT) https://github.com/PrismarineJS/prismarine-item
23
+ - vec3 (MIT) https://github.com/PrismarineJS/node-vec3
24
+
25
+ Validation
26
+ - zod (MIT) https://github.com/colinhacks/zod
27
+
28
+ Minecraft is a trademark of Mojang Synergies AB. This project is not affiliated
29
+ with, endorsed by, or sponsored by Mojang or Microsoft.
package/README.md CHANGED
@@ -4,7 +4,7 @@
4
4
  [![node](https://img.shields.io/node/v/awesome-mineflayer-mcp.svg)](https://nodejs.org)
5
5
  [![license: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](./LICENSE)
6
6
 
7
- A production-ready [Model Context Protocol](https://modelcontextprotocol.io) server that gives an LLM agent **standalone-equivalent control** over a [Mineflayer](https://github.com/PrismarineJS/mineflayer) Minecraft bot — movement, mining, crafting, inventory, combat, containers, chat, and much more — exposed as **110 strongly-typed tools** across 23 groups, with full bot lifecycle management and dual (poll + push) event streaming.
7
+ A production-ready [Model Context Protocol](https://modelcontextprotocol.io) server that gives an LLM agent **standalone-equivalent control** over a [Mineflayer](https://github.com/PrismarineJS/mineflayer) Minecraft bot — movement, mining, crafting, inventory, combat, containers, chat, and much more — exposed as **123 strongly-typed tools** across 26 groups, plus **guided prompts**, **vision** (real first-person screenshots + schematic maps), persistent **waypoints**, build/dig **macros**, and dual (poll + push) event streaming, with full bot lifecycle management. Tool results carry both human-readable text and machine-readable `structuredContent`.
8
8
 
9
9
  Backed by the Mineflayer ecosystem: `mineflayer-pathfinder` (A\* navigation), `mineflayer-pvp` (combat), `mineflayer-collectblock` (gathering), `mineflayer-tool` (auto tool-select), `mineflayer-auto-eat`, and `mineflayer-armor-manager`.
10
10
 
@@ -13,9 +13,18 @@ Backed by the Mineflayer ecosystem: `mineflayer-pathfinder` (A\* navigation), `m
13
13
  ## Requirements
14
14
 
15
15
  - **Node.js ≥ 20** (developed on 22.16)
16
- - A Minecraft server to connect to (Java Edition). The bot auto-detects the server version.
16
+ - A Minecraft server to connect to (Java Edition). The bot auto-detects the server version. Don't have one? See [Get a server to test against](#get-a-minecraft-server-to-test-against).
17
17
  - For online-mode servers: a Microsoft account (`auth: "microsoft"`).
18
18
 
19
+ ### Supported versions
20
+
21
+ | | Supported |
22
+ |---|---|
23
+ | Minecraft (Java) | the range supported by the bundled `mineflayer` 4.37 / `minecraft-data` (roughly **1.8 → 1.21.x**); version is auto-detected, or pass `version` explicitly |
24
+ | Node.js | **20, 22** (LTS) |
25
+
26
+ A few tools only work on newer versions/features (e.g. `elytra_fly`, chat signing). On a version mismatch the bot is kicked with an `outdated client/server` message — pass an explicit `version`.
27
+
19
28
  ## Installation
20
29
 
21
30
  Run it on demand with **npx** (no install needed):
@@ -55,16 +64,88 @@ Add it to your client's MCP server configuration. The recommended form uses `npx
55
64
 
56
65
  If you installed it globally, use `"command": "awesome-mineflayer-mcp"` with `"args": []` instead.
57
66
 
67
+ ## Get a Minecraft server to test against
68
+
69
+ If you don't already have a server, spin up a throwaway **offline-mode** one with Docker (no account needed):
70
+
71
+ ```bash
72
+ # from a clone of this repo:
73
+ docker compose up -d # offline 1.20.4 server on localhost:25565
74
+ docker compose logs -f # wait for "Done (…)! For help, type "help""
75
+ ```
76
+
77
+ …or a one-liner without the repo:
78
+
79
+ ```bash
80
+ docker run -d --name mc -p 25565:25565 -e EULA=TRUE -e ONLINE_MODE=FALSE -e VERSION=1.20.4 itzg/minecraft-server
81
+ ```
82
+
83
+ Then connect: `connect_bot { host: "localhost", username: "DevBot", auth: "offline" }`. Tear it down with `docker compose down -v` (or `docker rm -f mc`). Don't expose an offline-mode server to the public internet.
84
+
85
+ ## Autonomous operation (default account)
86
+
87
+ For hands-off use, configure a **default account** so the bot connects automatically on startup — no `connect_bot` call required. Run the interactive setup:
88
+
89
+ ```bash
90
+ npx awesome-mineflayer-mcp setup
91
+ ```
92
+
93
+ It asks for the server host/port, an **offline** or **Microsoft** account, and whether to auto-connect on startup, then writes `~/.awesome-mineflayer-mcp/config.json` (**no password is stored**). For a Microsoft account it runs the device-code sign-in **once** and caches the token under `profilesFolder`, so later startups need no prompt.
94
+
95
+ On startup the server auto-connects the configured account (verify with `get_connection_status`). The agent can also call **`connect_default`** to (re)connect it or **`get_default_account`** to inspect it.
96
+
97
+ ### Configure without the wizard (env vars)
98
+
99
+ You can set the default account entirely from your MCP client config — handy for headless deploys. Environment variables override the config file:
100
+
101
+ ```json
102
+ {
103
+ "mcpServers": {
104
+ "mineflayer": {
105
+ "command": "npx",
106
+ "args": ["-y", "awesome-mineflayer-mcp"],
107
+ "env": {
108
+ "MCP_DEFAULT_HOST": "play.example.net",
109
+ "MCP_DEFAULT_USERNAME": "MyBot",
110
+ "MCP_DEFAULT_AUTH": "offline",
111
+ "MCP_AUTO_CONNECT": "true"
112
+ }
113
+ }
114
+ }
115
+ }
116
+ ```
117
+
118
+ For Microsoft auth in a headless setup, run `setup` once locally first (or point `MCP_PROFILES_FOLDER` at a directory with a pre-cached token).
119
+
58
120
  ## Configuration (environment variables)
59
121
 
60
122
  | Variable | Default | Purpose |
61
123
  |---|---|---|
62
- | `MCP_DISABLE_GROUPS` | _(none)_ | Comma-separated tool-group keys to disable (see catalog). Trim the surface for clients that struggle with 110 tools. |
124
+ | `MCP_DISABLE_GROUPS` | _(none)_ | Comma-separated tool-group keys to disable (see catalog). Trim the surface for clients that struggle with a large tool list. |
63
125
  | `MCP_CHARACTER_LIMIT` | `25000` | Max characters returned by any single tool call (truncated with a marker). |
64
126
  | `MCP_EVENT_BUFFER` | `1000` | Size of the in-memory event ring buffer. |
65
127
  | `MCP_THROTTLE_MS` | `250` | Minimum spacing between pushed resource-update / log notifications. |
66
128
  | `MCP_PROXIMITY_RADIUS` | `32` | Radius (blocks) for proximity-filtered events (entity spawns, sounds). |
67
129
  | `MCP_ACTION_TIMEOUT_MS` | `60000` | Default timeout for long actions when the caller omits one. |
130
+ | `MCP_DEFAULT_HOST` / `MCP_DEFAULT_PORT` | — | Default server to auto-connect on startup. |
131
+ | `MCP_DEFAULT_USERNAME` | — | Default account name (offline) or email (microsoft). |
132
+ | `MCP_DEFAULT_AUTH` | `offline` | Default auth mode: `offline` or `microsoft`. |
133
+ | `MCP_DEFAULT_VERSION` | auto | Force a protocol version for the default account. |
134
+ | `MCP_DEFAULT_AUTO_RECONNECT` | `true` | Auto-reconnect the default account on disconnect. |
135
+ | `MCP_AUTO_CONNECT` | `true`† | Auto-connect the default on startup († when a default is configured). |
136
+ | `MCP_PROFILES_FOLDER` | `<home>/profiles` | Microsoft auth token-cache directory. |
137
+ | `AWESOME_MINEFLAYER_MCP_HOME` | `~/.awesome-mineflayer-mcp` | Config + token-cache directory. |
138
+ | `MCP_READ_ONLY` | `false` | Observe-only mode: register only read-only tools (+ lifecycle). See [Safety](#safety--guardrails). |
139
+ | `MCP_COMMAND_DENY` | _(admin verbs)_ | Slash commands `run_command` blocks. Setting it **replaces** the default; set empty to allow all. |
140
+ | `MCP_COMMAND_ALLOW` | _(none)_ | If set, a strict allow-list: only these commands run (deny list ignored). |
141
+ | `MCP_ALLOWED_HOSTS` | _(any)_ | Comma-separated allow-list of hosts the bot may connect to. |
142
+ | `MCP_CHAT_MIN_INTERVAL_MS` | `0` | Minimum spacing between outbound chat/whisper/command sends (anti-spam). |
143
+ | `MCP_ENABLE_RAW` | `false` | Enable the advanced/unsafe `raw` protocol tool group (direct packet send/subscribe). |
144
+ | `MCP_SCREENSHOT_WIDTH` / `_HEIGHT` | `800` / `450` | Default `get_screenshot` image size (px). |
145
+ | `MCP_SCREENSHOT_LOAD_MS` | `2500` | How long to let the world render before capturing a screenshot. |
146
+ | `MCP_VIEW_DISTANCE` | `4` | Chunk render distance for screenshots. |
147
+ | `MCP_SCREENSHOT_BROWSER_CHANNEL` | _(auto)_ | Browser channel for screenshots (`chrome`, `msedge`, `chromium`). |
148
+ | `MCP_SCREENSHOT_EXECUTABLE_PATH` | _(none)_ | Explicit browser executable path for screenshots (overrides channel). |
68
149
 
69
150
  Example — disable rarely-used groups:
70
151
 
@@ -74,26 +155,30 @@ MCP_DISABLE_GROUPS=creative,villager,enchanting,settings
74
155
 
75
156
  ## Quick start (tool flow)
76
157
 
77
- 1. **`connect_bot`** `{ host, username, auth }` — required first; resolves once the bot spawns.
158
+ 1. **`connect_bot`** `{ host, username, auth }` — connect (resolves once the bot spawns). *Skip this if you configured a [default account](#autonomous-operation-default-account) — the bot auto-connects on startup; just check `get_connection_status`.*
78
159
  2. Act: **`goto`**, **`dig`**, **`collect_block`**, **`craft_item`**, **`pvp_attack`**, **`chat`**, …
79
- 3. Observe: poll **`get_events`** (pass the returned `nextSince` each time) and **`get_state`**; or subscribe to the `bot://*` resources.
160
+ 3. Observe: call **`get_observation`** for a one-shot snapshot (vitals, position, inventory, nearby entities, new events) — pass the returned `events.nextSince` back each tick. Or compose **`get_state`** / **`get_inventory`** / **`list_entities`** / **`get_events`**, or subscribe to the `bot://*` resources.
80
161
  4. **`disconnect_bot`** when done.
81
162
 
163
+ New to the server? Use the **`getting_started`** prompt (see [Prompts](#prompts)) for an in-context walkthrough.
164
+
82
165
  Block / item / entity arguments accept **human names** (`"iron_ore"`, `"diamond_pickaxe"`, `"zombie"`); unknown names return fuzzy suggestions.
83
166
 
84
167
  ## Authentication
85
168
 
86
169
  - `auth: "offline"` (default) — offline-mode servers; `username` is the in-game name.
87
- - `auth: "microsoft"` — `username` is the account email. A device-code prompt is emitted as an `msa_code` event / log notification. Set **`profilesFolder`** to cache the token so subsequent runs skip the prompt, or pass a cached `accessToken`.
170
+ - `auth: "microsoft"` — `username` is the account email. A device-code prompt is emitted as an `msa_code` event / log notification. Set **`profilesFolder`** to cache the token so subsequent runs skip the prompt, or pass a cached `accessToken`. **Tip:** run `npx awesome-mineflayer-mcp setup` once to do the device-code sign-in and cache the token, then the server connects autonomously (see [Autonomous operation](#autonomous-operation-default-account)).
88
171
 
89
172
  ---
90
173
 
91
- ## Tool catalog (110 tools, 23 groups)
174
+ ## Tool catalog (123 tools, 26 groups)
175
+
176
+ > Full generated reference (every tool, prompt, resource): [`docs/TOOLS.md`](docs/TOOLS.md).
92
177
 
93
178
  Group keys (for `MCP_DISABLE_GROUPS`) are shown in brackets.
94
179
 
95
- - **Lifecycle** `[lifecycle]` — `connect_bot`, `disconnect_bot`, `reconnect_bot`, `respawn`, `get_connection_status`
96
- - **State & inspection** `[state]` (read-only) — `get_state`, `get_inventory`, `list_players`, `list_entities`, `find_nearest_entity`, `get_entity_details`, `get_scoreboards`, `get_teams`, `get_boss_bars`, `get_control_states`, `get_chat_patterns`, `support_feature`, `pathfinder_status`, `get_settings`, `get_physics`, `get_loaded_plugins`
180
+ - **Lifecycle** `[lifecycle]` — `connect_bot`, `connect_default`, `disconnect_bot`, `reconnect_bot`, `respawn`, `get_connection_status`, `get_default_account`
181
+ - **State & inspection** `[state]` (read-only) — `get_observation` (one-call snapshot for an agent's observe loop), `get_state`, `get_inventory`, `list_players`, `list_entities`, `find_nearest_entity`, `get_entity_details`, `get_scoreboards`, `get_teams`, `get_boss_bars`, `get_control_states`, `get_chat_patterns`, `support_feature`, `pathfinder_status`, `get_settings`, `get_physics`, `get_loaded_plugins`
97
182
  - **World queries** `[world]` (read-only) — `get_block_at`, `find_blocks`, `get_cursor_target`, `get_blocks_in_region`, `wait_for_chunks_to_load`
98
183
  - **Movement & pathfinding** `[movement]` — `goto`, `set_goal`, `flee_from`, `follow_entity`, `stop_pathfinding`, `get_path_to`, `configure_movements`, `configure_pathfinder`, `set_control_state`, `clear_control_states`, `elytra_fly`, `wait_for_ticks`, `set_physics_enabled`
99
184
  - **Look** `[look]` — `look_at`, `look`, `look_at_entity`
@@ -114,10 +199,57 @@ Group keys (for `MCP_DISABLE_GROUPS`) are shown in brackets.
114
199
  - **Chat & communication** `[chat]` — `chat`, `whisper`, `run_command`, `tab_complete`, `register_chat_pattern`, `remove_chat_pattern`, `wait_for_message`
115
200
  - **Settings** `[settings]` — `set_settings`
116
201
  - **Creative mode** `[creative]` — `creative_set_inventory_slot`, `creative_clear_inventory`, `creative_fly`, `creative_fly_to`
202
+ - **Vision** `[vision]` — `get_screenshot` (real first-person textured game render), `render_map` (dependency-free schematic map) — see [Vision](#vision--let-the-agent-see)
203
+ - **Waypoints** `[waypoints]` — `set_waypoint`, `list_waypoints`, `delete_waypoint`, `goto_waypoint` (persisted across restarts)
204
+ - **Build & dig macros** `[build]` — `clear_region`, `dig_tunnel`, `dig_staircase`, `fill_region` (cancellable, multi-block)
117
205
  - **Events & telemetry** `[events]` — `get_events`, `cancel_task`
206
+ - **Raw protocol** `[raw]` — `send_packet`, `subscribe_packet`, `list_packet_subscriptions` (advanced/unsafe; **off unless `MCP_ENABLE_RAW=true`**)
118
207
 
119
208
  Long-running actions (`goto`, `dig`, `collect_block`, `pvp_attack`, `fish`, `smelt_item`, `craft_item`) are mutually exclusive and cancellable — start a new movement/combat action to supersede the prior one, or call `stop_pathfinding` / `pvp_stop` / `cancel_collect` / `cancel_fish` / `cancel_task`.
120
209
 
210
+ ## Prompts
211
+
212
+ The server exposes **guided, parameterized workflows** as MCP prompts — clients surface them as slash-commands / templates. They teach an agent how to chain the right tools for a goal:
213
+
214
+ - **`getting_started`** — orientation: connect → observe → act → recover.
215
+ - **`gather_wood`** `{ count?, logType? }` — find trees and collect logs.
216
+ - **`mine_to_diamonds`** `{ targetY? }` — descend safely and branch-mine.
217
+ - **`build_shelter`** `{ material? }` — enclose a safe space before nightfall.
218
+ - **`find_and_smelt`** `{ input, fuel? }` — mine/gather an input and smelt it.
219
+ - **`follow_and_defend`** `{ player }` — follow a player and fight off hostiles.
220
+
221
+ Block/item arguments offer name autocompletion drawn from the connected world.
222
+
223
+ ## Vision — let the agent *see*
224
+
225
+ Two complementary tools return PNG images as MCP image content, so a vision-capable model (and a human) can look at the world instead of reconstructing it from JSON.
226
+
227
+ ### `get_screenshot` — a real game render
228
+
229
+ Captures an **actual textured Minecraft render** of what the bot sees — first-person from its eyes (default) or a third-person orbit — exactly like an in-game screenshot. Under the hood, [`prismarine-viewer`](https://github.com/PrismarineJS/prismarine-viewer) renders the real world (client-side WebGL) and a headless browser screenshots it. Args: `width`, `height`, `firstPerson`, `waitMs`, `viewDistance`.
230
+
231
+ **Setup (one-time).** The renderer deps ship as **optional** packages (installed by default with `npm install`). All you also need is a browser:
232
+
233
+ - Already have **Google Chrome or Microsoft Edge**? Nothing to do — it's used automatically.
234
+ - Otherwise run **`npx playwright install chromium`** once.
235
+ - Headless servers: install Chrome/Chromium, or set `MCP_SCREENSHOT_EXECUTABLE_PATH` / `MCP_SCREENSHOT_BROWSER_CHANNEL`.
236
+
237
+ If the deps/browser aren't available, `get_screenshot` returns a clear `UNSUPPORTED` error with these steps — the rest of the server is unaffected. The renderer packages are pure-JS (no native build), but if you want the leanest possible install and don't need screenshots, use `npm install --omit=optional`.
238
+
239
+ ### `render_map` — a dependency-free schematic
240
+
241
+ A lightweight colored top-down map (or `mode:"slice"` cross-section) drawn from block data with a **built-in PNG encoder** (no extra deps at all). Good as a minimap/overview or when the screenshot extras aren't installed. North (−Z) is up; bot = white dot with a facing tick; players cyan, hostiles red, passives yellow, items grey; includes a block legend.
242
+
243
+ ## Safety & guardrails
244
+
245
+ Sensible defaults that matter once an agent drives the bot autonomously (especially with a [default account](#autonomous-operation-default-account)):
246
+
247
+ - **Command policy.** `run_command` blocks server-administration verbs by default (`op`, `deop`, `ban`, `kick`, `stop`, `whitelist`, and the `execute`/`function`/`schedule` wrappers, …). Ordinary gameplay commands (`/tp`, `/time`, `/give`, …) are allowed. Override with `MCP_COMMAND_DENY` (replaces the default; empty = allow all) or lock down with `MCP_COMMAND_ALLOW` (strict allow-list). This is **best-effort defense-in-depth**, not a hard boundary — it gates on the first command verb, and a bot with operator permissions could still find a way around it. For untrusted/autonomous deployments, prefer `MCP_COMMAND_ALLOW`, `MCP_READ_ONLY`, and not granting the bot's account operator rights. **Note:** incoming player chat is delivered to your agent as events — treat it as untrusted input.
248
+ - **Host allow-list.** `MCP_ALLOWED_HOSTS` restricts which servers `connect_bot` / `reconnect_bot` may join, so an agent can't repoint the bot (and its cached token) at an arbitrary address.
249
+ - **Read-only mode.** `MCP_READ_ONLY=true` registers only observation tools (plus connection management) — look-but-don't-touch.
250
+ - **Rate limiting.** `MCP_CHAT_MIN_INTERVAL_MS` spaces outbound chat/commands to avoid spam-kicks.
251
+ - **No secret leakage.** Passwords / access tokens are never stored on disk and are redacted from connection-error messages.
252
+
121
253
  ## Resources
122
254
 
123
255
  Subscribe-capable JSON resources for clients that support resource subscriptions:
@@ -127,6 +259,9 @@ Subscribe-capable JSON resources for clients that support resource subscriptions
127
259
  - `world://entities` — up to 50 nearest tracked entities
128
260
  - `world://players` — server roster
129
261
  - `bot://events` — tail of recent events
262
+ - `bot://waypoints` — saved named waypoints
263
+
264
+ Plus parameterized **resource templates** for on-demand lookups: `block://{x}/{y}/{z}` and `entity://{id}`.
130
265
 
131
266
  ## Events
132
267
 
@@ -153,25 +288,58 @@ Architecture and the full design rationale: [`docs/superpowers/specs/2026-06-28-
153
288
 
154
289
  ```
155
290
  src/
156
- index.ts entry (stdio transport, graceful shutdown)
157
- server.ts builds the McpServer, registers tool groups + resources
158
- config.ts env + constants
291
+ index.ts entry (stdio transport, graceful shutdown, crash guards)
292
+ server.ts builds the McpServer, registers tool groups + resources + prompts
293
+ config.ts env + constants + safety policy (groups, read-only, command/host allow-lists)
159
294
  bot/ manager (lifecycle FSM), plugins, events, wire-events, state, windows, action-locks
160
295
  tools/ one module per tool group (+ registry.ts)
296
+ prompts/ guided multi-tool workflows
161
297
  resources/ MCP resources + push notifications
162
- util/ errors, format, result, resolve (name→id + fuzzy), serialize
298
+ util/ errors, format, result, resolve (name→id + fuzzy), serialize, async, redact
163
299
  schemas/ shared Zod fragments
164
300
  ```
165
301
 
302
+ See [`CONTRIBUTING.md`](CONTRIBUTING.md) for how to add a tool/group and run a local test server.
303
+
166
304
  ## Publishing (maintainers)
167
305
 
306
+ Pushing a `v*` tag publishes to **npm**, **GitHub Container Registry** (Docker), the **MCP Registry**, and updates **Smithery** — all via [`.github/workflows/ci.yml`](.github/workflows/ci.yml). `npm version` keeps `package.json`, `src/config.ts`, and `server.json` in sync.
307
+
308
+ ```bash
309
+ npm version minor # bumps + syncs versions, commits, and tags
310
+ git push --follow-tags # triggers the release jobs
311
+ ```
312
+
313
+ Full one-time setup and the step-by-step release checklist are in [`RELEASE.md`](RELEASE.md). The published npm package ships only `dist/`, `README.md`, `LICENSE`, and `NOTICE` (see the `files` field).
314
+
315
+ ## Troubleshooting
316
+
317
+ Connection failures now return a **specific error code and suggestions** (not an opaque `INTERNAL`). Common cases:
318
+
319
+ | Symptom / error | Likely cause | Fix |
320
+ |---|---|---|
321
+ | `CONNECT_REFUSED` (ECONNREFUSED) | Wrong host/port, or server not running | Check `host`/`port`; confirm the server has finished starting (default port 25565). |
322
+ | `CONNECT_REFUSED` (ENOTFOUND) | Hostname doesn't resolve | Double-check the server address. |
323
+ | `ONLINE_MODE` / "unverified username" | Server is online-mode; bot used offline auth | Use `auth: "microsoft"`, or set `online-mode=false` on the server. |
324
+ | `VERSION_MISMATCH` / "outdated client/server" | Auto-detected version is wrong | Pass an explicit `version` (e.g. `"1.20.4"`). |
325
+ | Chat rejected / "secure profile" | Server requires signed chat | Connect with `disableChatSigning: true`. |
326
+ | `AUTH_FAILED` | Stale/invalid Microsoft token | Re-run `npx awesome-mineflayer-mcp setup`, or clear the `profilesFolder` cache and sign in again. |
327
+ | `FORBIDDEN` on `run_command` | Command blocked by policy | See [Safety](#safety--guardrails) — adjust `MCP_COMMAND_DENY` / `MCP_COMMAND_ALLOW`. |
328
+ | `FORBIDDEN` on `connect_bot` | Host not in allow-list | Add it to `MCP_ALLOWED_HOSTS` (or unset to allow any). |
329
+ | `NO_PATH` | Pathfinder can't reach the goal | Move closer, clear obstacles, or relax `configure_movements`. |
330
+ | Microsoft device-code prompt | First-time MSA sign-in | Visit the URL from the `msa_code` event; set `profilesFolder` to cache it. |
331
+
332
+ First-run sign-in for Microsoft auth is interactive once — run `npx awesome-mineflayer-mcp setup` to do it and cache the token.
333
+
334
+ ## Docker
335
+
336
+ A `Dockerfile` is included for headless/autonomous deployments (configure a default account via `MCP_DEFAULT_*`):
337
+
168
338
  ```bash
169
- npm version patch # or minor / major — bumps package.json + tags
170
- npm publish # the `prepare` script builds dist/ first; publishes to npm
171
- git push --follow-tags
339
+ docker build -t awesome-mineflayer-mcp .
172
340
  ```
173
341
 
174
- The published package ships only `dist/`, `README.md`, and `LICENSE` (see the `files` field).
342
+ Mount a volume at `/root/.awesome-mineflayer-mcp` to persist the config and Microsoft token cache. (The server speaks MCP over stdio, so a container is most useful for autonomous default-account runs rather than for a client to spawn.)
175
343
 
176
344
  ## Limitations
177
345
 
@@ -0,0 +1,41 @@
1
+ /**
2
+ * Persisted "default account" configuration for autonomous operation.
3
+ *
4
+ * Stored at ~/.awesome-mineflayer-mcp/config.json (override the directory with
5
+ * AWESOME_MINEFLAYER_MCP_HOME). NO secrets are stored: offline needs none, and
6
+ * Microsoft auth relies on the token cache under `profilesFolder` (managed by
7
+ * prismarine-auth), not a saved password. Environment variables override the
8
+ * file so MCP-client configs can set everything inline.
9
+ */
10
+ import type { ConnectOptions } from "./bot/manager.js";
11
+ export declare function configHome(): string;
12
+ export declare function configPath(): string;
13
+ export declare function defaultProfilesFolder(): string;
14
+ export interface StoredAccount {
15
+ host: string;
16
+ port?: number;
17
+ username: string;
18
+ auth: "offline" | "microsoft";
19
+ version?: string;
20
+ autoReconnect?: boolean;
21
+ profilesFolder?: string;
22
+ }
23
+ export interface StoredConfig {
24
+ account?: StoredAccount;
25
+ autoConnect?: boolean;
26
+ }
27
+ export declare function loadConfig(): StoredConfig;
28
+ export declare function saveConfig(cfg: StoredConfig): string;
29
+ export interface ResolvedDefault {
30
+ /** ConnectOptions ready to pass to BotManager.connect, or null if unconfigured. */
31
+ opts: ConnectOptions | null;
32
+ /** Whether the server should auto-connect on startup. */
33
+ autoConnect: boolean;
34
+ /** Where the values came from. */
35
+ source: "env" | "file" | "none";
36
+ /** Sanitized account view for display (no secrets). */
37
+ account: StoredAccount | null;
38
+ }
39
+ /** Merge stored config with environment overrides into ConnectOptions. */
40
+ export declare function resolveDefaultConnect(): ResolvedDefault;
41
+ //# sourceMappingURL=account-config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"account-config.d.ts","sourceRoot":"","sources":["../src/account-config.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAKH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAEvD,wBAAgB,UAAU,IAAI,MAAM,CAGnC;AAED,wBAAgB,UAAU,IAAI,MAAM,CAEnC;AAED,wBAAgB,qBAAqB,IAAI,MAAM,CAE9C;AAED,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,SAAS,GAAG,WAAW,CAAC;IAC9B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,YAAY;IAC3B,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,wBAAgB,UAAU,IAAI,YAAY,CAQzC;AAED,wBAAgB,UAAU,CAAC,GAAG,EAAE,YAAY,GAAG,MAAM,CAKpD;AAUD,MAAM,WAAW,eAAe;IAC9B,mFAAmF;IACnF,IAAI,EAAE,cAAc,GAAG,IAAI,CAAC;IAC5B,yDAAyD;IACzD,WAAW,EAAE,OAAO,CAAC;IACrB,kCAAkC;IAClC,MAAM,EAAE,KAAK,GAAG,MAAM,GAAG,MAAM,CAAC;IAChC,uDAAuD;IACvD,OAAO,EAAE,aAAa,GAAG,IAAI,CAAC;CAC/B;AAED,0EAA0E;AAC1E,wBAAgB,qBAAqB,IAAI,eAAe,CA2CvD"}
@@ -0,0 +1,86 @@
1
+ /**
2
+ * Persisted "default account" configuration for autonomous operation.
3
+ *
4
+ * Stored at ~/.awesome-mineflayer-mcp/config.json (override the directory with
5
+ * AWESOME_MINEFLAYER_MCP_HOME). NO secrets are stored: offline needs none, and
6
+ * Microsoft auth relies on the token cache under `profilesFolder` (managed by
7
+ * prismarine-auth), not a saved password. Environment variables override the
8
+ * file so MCP-client configs can set everything inline.
9
+ */
10
+ import os from "node:os";
11
+ import path from "node:path";
12
+ import fs from "node:fs";
13
+ export function configHome() {
14
+ const env = process.env.AWESOME_MINEFLAYER_MCP_HOME?.trim();
15
+ return env && env.length > 0 ? env : path.join(os.homedir(), ".awesome-mineflayer-mcp");
16
+ }
17
+ export function configPath() {
18
+ return path.join(configHome(), "config.json");
19
+ }
20
+ export function defaultProfilesFolder() {
21
+ return path.join(configHome(), "profiles");
22
+ }
23
+ export function loadConfig() {
24
+ try {
25
+ const raw = fs.readFileSync(configPath(), "utf8");
26
+ const parsed = JSON.parse(raw);
27
+ return parsed && typeof parsed === "object" ? parsed : {};
28
+ }
29
+ catch {
30
+ return {};
31
+ }
32
+ }
33
+ export function saveConfig(cfg) {
34
+ fs.mkdirSync(configHome(), { recursive: true });
35
+ const p = configPath();
36
+ fs.writeFileSync(p, `${JSON.stringify(cfg, null, 2)}\n`, { encoding: "utf8", mode: 0o600 });
37
+ return p;
38
+ }
39
+ function envBool(v) {
40
+ if (v === undefined)
41
+ return undefined;
42
+ const s = v.trim().toLowerCase();
43
+ if (["1", "true", "yes", "on"].includes(s))
44
+ return true;
45
+ if (["0", "false", "no", "off"].includes(s))
46
+ return false;
47
+ return undefined;
48
+ }
49
+ /** Merge stored config with environment overrides into ConnectOptions. */
50
+ export function resolveDefaultConnect() {
51
+ const cfg = loadConfig();
52
+ const fileAcct = cfg.account ?? null;
53
+ const host = process.env.MCP_DEFAULT_HOST?.trim() || fileAcct?.host;
54
+ const username = process.env.MCP_DEFAULT_USERNAME?.trim() || fileAcct?.username;
55
+ const authEnv = process.env.MCP_DEFAULT_AUTH?.trim();
56
+ const auth = authEnv === "offline" || authEnv === "microsoft" ? authEnv : (fileAcct?.auth ?? "offline");
57
+ if (!host || !username) {
58
+ return { opts: null, autoConnect: false, source: "none", account: null };
59
+ }
60
+ const portEnv = process.env.MCP_DEFAULT_PORT;
61
+ const portParsed = portEnv ? Number.parseInt(portEnv, 10) : fileAcct?.port;
62
+ const port = portParsed && Number.isFinite(portParsed) ? portParsed : undefined;
63
+ const version = process.env.MCP_DEFAULT_VERSION?.trim() || fileAcct?.version || undefined;
64
+ const autoReconnect = envBool(process.env.MCP_DEFAULT_AUTO_RECONNECT) ?? fileAcct?.autoReconnect ?? true;
65
+ const profilesFolder = process.env.MCP_PROFILES_FOLDER?.trim() ||
66
+ fileAcct?.profilesFolder ||
67
+ (auth === "microsoft" ? defaultProfilesFolder() : undefined);
68
+ const opts = {
69
+ host,
70
+ username,
71
+ auth,
72
+ autoReconnect,
73
+ ...(port !== undefined ? { port } : {}),
74
+ ...(version ? { version } : {}),
75
+ ...(profilesFolder ? { profilesFolder } : {}),
76
+ };
77
+ const usedEnv = Boolean(process.env.MCP_DEFAULT_HOST?.trim() || process.env.MCP_DEFAULT_USERNAME?.trim());
78
+ const autoConnect = envBool(process.env.MCP_AUTO_CONNECT) ?? cfg.autoConnect ?? true;
79
+ return {
80
+ opts,
81
+ autoConnect,
82
+ source: usedEnv ? "env" : "file",
83
+ account: { host, port, username, auth, version, autoReconnect, profilesFolder },
84
+ };
85
+ }
86
+ //# sourceMappingURL=account-config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"account-config.js","sourceRoot":"","sources":["../src/account-config.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,MAAM,SAAS,CAAC;AAGzB,MAAM,UAAU,UAAU;IACxB,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,2BAA2B,EAAE,IAAI,EAAE,CAAC;IAC5D,OAAO,GAAG,IAAI,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,yBAAyB,CAAC,CAAC;AAC1F,CAAC;AAED,MAAM,UAAU,UAAU;IACxB,OAAO,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,EAAE,aAAa,CAAC,CAAC;AAChD,CAAC;AAED,MAAM,UAAU,qBAAqB;IACnC,OAAO,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,EAAE,UAAU,CAAC,CAAC;AAC7C,CAAC;AAiBD,MAAM,UAAU,UAAU;IACxB,IAAI,CAAC;QACH,MAAM,GAAG,GAAG,EAAE,CAAC,YAAY,CAAC,UAAU,EAAE,EAAE,MAAM,CAAC,CAAC;QAClD,MAAM,MAAM,GAAY,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QACxC,OAAO,MAAM,IAAI,OAAO,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAE,MAAuB,CAAC,CAAC,CAAC,EAAE,CAAC;IAC9E,CAAC;IAAC,MAAM,CAAC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,IAAI;QACJ,QAAQ;QACR,IAAI;QACJ,aAAa;QACb,GAAG,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACvC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAC/B,GAAG,CAAC,cAAc,CAAC,CAAC,CAAC,EAAE,cAAc,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KAC9C,CAAC;IAEF,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,gBAAgB,EAAE,IAAI,EAAE,IAAI,OAAO,CAAC,GAAG,CAAC,oBAAoB,EAAE,IAAI,EAAE,CAAC,CAAC;IAC1G,MAAM,WAAW,GAAG,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,gBAAgB,CAAC,IAAI,GAAG,CAAC,WAAW,IAAI,IAAI,CAAC;IAErF,OAAO;QACL,IAAI;QACJ,WAAW;QACX,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM;QAChC,OAAO,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE;KAChF,CAAC;AACJ,CAAC"}
@@ -21,7 +21,12 @@ export interface DrainOptions {
21
21
  since?: number;
22
22
  /** Restrict to these event types. */
23
23
  types?: string[];
24
- /** Return at most this many (most recent kept). */
24
+ /**
25
+ * Return at most this many events, OLDEST matching first. When more than
26
+ * `limit` are pending, the surplus is NOT dropped: `nextSince` is set to the
27
+ * last event actually returned so the remainder is delivered (in order,
28
+ * without loss) on the next call.
29
+ */
25
30
  limit?: number;
26
31
  }
27
32
  export interface DrainResult {
@@ -1 +1 @@
1
- {"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../src/bot/events.ts"],"names":[],"mappings":"AAAA;;;;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CAGd"}
@@ -41,10 +41,20 @@ export class EventBus {
41
41
  const set = new Set(types);
42
42
  out = out.filter((e) => set.has(e.type));
43
43
  }
44
+ // By default the caller has now seen everything up to the latest seq.
45
+ let nextSince = this.seqCounter;
44
46
  if (limit !== undefined && limit >= 0 && out.length > limit) {
45
- out = out.slice(out.length - limit);
47
+ // Forward-paginate: hand back the OLDEST `limit` events and rewind the
48
+ // cursor to the last one returned, so the remainder is delivered on the
49
+ // next call instead of being silently skipped (which the previous
50
+ // "keep newest N, advance to seqCounter" behaviour did).
51
+ out = out.slice(0, limit);
52
+ // Advance the cursor only to the last event actually returned. When limit
53
+ // is 0 (out becomes empty), DON'T jump to seqCounter — that would skip all
54
+ // unread events; rewind to just before the oldest retained event instead.
55
+ nextSince = out.length > 0 ? out[out.length - 1].seq : (since ?? oldestSeq - 1);
46
56
  }
47
- return { events: out, nextSince: this.seqCounter, dropped };
57
+ return { events: out, nextSince, dropped };
48
58
  }
49
59
  /** Most recent `n` events (used to seed the events resource). */
50
60
  recent(n) {
@@ -1 +1 @@
1
- {"version":3,"file":"events.js","sourceRoot":"","sources":["../../src/bot/events.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAgCjD,MAAM,OAAO,QAAQ;IACX,MAAM,GAAgB,EAAE,CAAC;IACzB,UAAU,GAAG,CAAC,CAAC;IACN,SAAS,GAAG,IAAI,GAAG,EAAqB,CAAC;IACzC,QAAQ,CAAS;IAElC,YAAY,QAAQ,GAAG,iBAAiB;QACtC,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,QAAQ,CAAC,CAAC;IACxC,CAAC;IAED,+DAA+D;IAC/D,IAAI,CAAC,IAAY,EAAE,OAAgB,IAAI;QACrC,MAAM,KAAK,GAAc,EAAE,GAAG,EAAE,EAAE,IAAI,CAAC,UAAU,EAAE,EAAE,EAAE,IAAI,CAAC,GAAG,EA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C,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC;IAChE,CAAC;IAED,IAAI,OAAO;QACT,OAAO,IAAI,CAAC,UAAU,CAAC;IACzB,CAAC;IAED,iEAAiE;IACjE,MAAM,CAAC,QAA2B;QAChC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;QAC7B,OAAO,GAAG,EAAE;YACV,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;QAClC,CAAC,CAAC;IACJ,CAAC;IAED,KAAK;QACH,IAAI,CAAC,MAAM,GAAG,EAAE,CAAC;IACnB,CAAC;CACF"}
@@ -59,6 +59,11 @@ export declare class BotManager {
59
59
  reconnect(override?: Partial<ConnectOptions>): Promise<Record<string, unknown>>;
60
60
  /** Best-effort shutdown for process exit. */
61
61
  shutdown(): void;
62
+ private assertHostAllowed;
63
+ /** Strip any configured secrets from a reason string before it leaves the process. */
64
+ private redact;
65
+ /** Build a typed, actionable error from a raw connect/login failure reason. */
66
+ private connectError;
62
67
  private buildBotOptions;
63
68
  private spawnBot;
64
69
  /** Permanent end/kicked handling (active after a successful spawn). */
@@ -1 +1 @@
1
- {"version":3,"file":"manager.d.ts","sourceRoot":"","sources":["../../src/bot/manager.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAa,KAAK,GAAG,EAAE,MAAM,YAAY,CAAC;AAEjD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAIrD,MAAM,MAAM,gBAAgB,GACxB,cAAc,GACd,YAAY,GACZ,QAAQ,GACR,cAAc,CAAC;AAEnB,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,IAA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