Repository navigation
fix(wiki): version User-Agent and update setup docs - #99
Dodothereal wants to merge 5 commits into
Conversation
…CHANGELOG.md to remove outdated stabilizing paragraph; amend CONTRIBUTING.md to acknowledge Docker headless mode; modify src/wiki/api.ts to read USER_AGENT from package.json; add DFHACK_MCP_QUERY_DIR to README.md configuration table
| @@ -1,7 +1,8 @@ | |||
| import { cleanHtml } from './clean.ts'; | |||
| import pkg from '../../package.json'; | |||
There was a problem hiding this comment.
Bare json file import will break (per the CI error). Check the pattern used in src\index.ts
Importing a JSON file into an ECMAScript module requires a 'type: "json"' import attribute when 'module' is set to 'NodeNext'.
… and correct values)
|
Hi, just a gentle ping on this in case it slipped through - no rush at all. Happy to rebase, split, or adjust anything if that helps. Thanks for maintaining this project. |
src/wiki/api.ts imported package.json as a bare ESM import, which
under module: nodenext fails typecheck with TS1543 and throws
ERR_IMPORT_ATTRIBUTE_MISSING at runtime for the dev path
(node src/index.ts, which T0 spawns). Use the `with { type: 'json' }`
import attribute the compiler asks for.
|
Fixed the import with I also narrowed the old diff to the versioned User-Agent and the Docker/query-directory docs, keeping main's current comment and compatibility policy. The description now references #72 without claiming to close its whole sweep. Typecheck, lint, build, T0 (37/46 tools), and all 23 unit tests pass independently. The source and npm-packed bundle both return the expected wiki result with the versioned header; the packed runtime was also checked on Node 20. No live DFHack run was needed for this change. The hosted CI run is waiting for maintainer approval before it can execute: https://github.com/alexanderolvera/dfhack-mcp/actions/runs/40250847687. |
The wiki requests still identify the server as
dfhack-mcp/0.1, and the setup docs omit the existing Docker path and query-script directory override.Use the package name/version in the wiki User-Agent, with the JSON import attribute required by NodeNext. Update the Docker note in CONTRIBUTING and document
DFHACK_MCP_QUERY_DIRin README.Related to #72. This covers those three items, rather than closing the full description-drift sweep. The outdated gameData header and 0.x paragraph from the issue have already changed on main; this revision preserves the current code-comment and compatibility policy.
Validation on the final head: typecheck (including TypeScript 5.6.3), lint, build, T0 verification (37/46 tools), and 23 unit tests passed independently. Offline MCP stdio probes verified wiki results and the actual versioned User-Agent from source, the bundle, and an npm-packed installation on Node 24 and the published Node 20 runtime. No live DFHack test is claimed. Hosted CI is waiting for maintainer approval: https://github.com/alexanderolvera/dfhack-mcp/actions/runs/40250847687.
AI assistance: the original PR was prepared with Claude Code. This revision used DeepSeek V4.1 Flash, separate independent verification, and final Codex review. No human review is claimed.