Skip to content

fix(wiki): version User-Agent and update setup docs - #99

Open
Dodothereal wants to merge 5 commits into
alexanderolvera:mainfrom
Dodothereal:fix/72-stale-docs-description-drift-sweep-gamed
Open

Dodothereal wants to merge 5 commits into
alexanderolvera:mainfrom
Dodothereal:fix/72-stale-docs-description-drift-sweep-gamed

Conversation

@Dodothereal

@Dodothereal Dodothereal commented Jul 23, 2026 •

Copy link
Copy Markdown

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_DIR in 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.

…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
Copilot AI review requested due to automatic review settings July 23, 2026 08:05

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Comment thread src/wiki/api.ts Outdated
@@ -1,7 +1,8 @@
import { cleanHtml } from './clean.ts';
import pkg from '../../package.json';

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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'.

@Dodothereal

Copy link
Copy Markdown
Author

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.
@Dodothereal Dodothereal changed the title docs: update header, changelog, contributing, readme, and wiki agent user agent fix(wiki): version User-Agent and update setup docs Oct 26, 2026
@Dodothereal

Dodothereal commented Oct 26, 2026 •

Copy link
Copy Markdown
Author

Fixed the import with with { type: 'json' } and merged current main. The bare import reproduced TS1543 and ERR_IMPORT_ATTRIBUTE_MISSING. Copying the relative createRequire call into this module passed typecheck but broke the bundled path; the JSON attribute works in source and is inlined into the bundle.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants