diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 8194c05..5f57f34 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -17,8 +17,7 @@ don't clone it to work on the server. stripping (`node src/index.ts`); no ts-node. (`engines` in `package.json` is the looser `>=20` — that governs the _published_ bundle's runtime, not this from-source dev workflow.) -- **Windows-native by default.** DF + DFHack run on the Windows host; there is no - headless mode yet (that's [#27](https://github.com/alexanderolvera/dfhack-mcp/issues/27)). +- **Windows-native by default.** DF + DFHack run on the Windows host; headless mode is available via Docker (see [docker/README.md](docker/README.md)) ([#27](https://github.com/alexanderolvera/dfhack-mcp/issues/27)). - **Don't expose the fort.** Never enable `allow_remote` in `remote-server.json`. DFHack's RPC only accepts connections that _originate_ from `127.0.0.1`, so the server talks to `localhost:5000` by default. `DFHACK_HOST` / `DFHACK_PORT` can diff --git a/README.md b/README.md index 74f4961..89a2682 100644 --- a/README.md +++ b/README.md @@ -207,6 +207,7 @@ All optional, set in your MCP client's `env` for the server: | `DFHACK_PORT` | `5000` | Port for DFHack's Remote RPC. | | `DFHACK_MCP_ACTUATORS` | _(unset)_ | Set to `1` to expose the write actuators (off = strictly read-only). | | `DFHACK_MCP_DEV` | _(unset)_ | Set to `1` to expose `run_lua`, a raw DFHack Lua escape hatch (reads **and writes** game state; for tool authors only). | +| `DFHACK_MCP_QUERY_DIR` | `src/dfhack-queries/` (dev) / `dist/dfhack-queries/` (bundled) | Overrides the directory from which the MCP query scripts are loaded. | ## Troubleshooting diff --git a/src/wiki/api.ts b/src/wiki/api.ts index 3aa38f1..d094e6a 100644 --- a/src/wiki/api.ts +++ b/src/wiki/api.ts @@ -1,7 +1,8 @@ import { cleanHtml } from './clean.ts'; +import pkg from '../../package.json' with { type: 'json' }; const API = 'https://dwarffortresswiki.org/api.php'; -const USER_AGENT = 'dfhack-mcp/0.1 (personal DF co-pilot)'; +const USER_AGENT = `${pkg.name}/${pkg.version} (personal DF co-pilot)`; // The wiki kept DF2014 for the Steam/Premium release — a known constant, no v50. export const VERSION_NS = 'DF2014'; const SEARCH_LIMIT = 8;