AGENTS.md
+26 −13
https://raw.githubusercontent.com/grinv/mal-mcp/HEAD/AGENTS.md
− scripts/ # build-tests.mjs, run-tests.mjs, check-api.mjs, sync-version.mjs,− # preversion-check.mjs (npm version gate — see .agents/skills/release/SKILL.md),− # check-changelog-coverage.mjs (see docs-consistency-check skill),− # check-chainable-optional-fields.mjs (see tool-description-check skill)− npm test # build tests with esbuild, run with node:test− - Runtime floor is **Node ≥ 20.11** (global `fetch`/`AbortSignal.any` in− `lib/http.ts`, `import.meta.dirname` in `scripts/*.mjs`, the test suite's− `mock.timers` `'Date'` API). tsup targets `node20`. This floor covers− `scripts/` too, not just `src/` — CI's `node: 20` matrix entry always− resolves to the latest 20.x patch, so a script quietly needing a newer− Node than the declared floor won't fail CI.− tool descriptions) and MCP Registry details.− domain `tools/`, `prompts.ts`, `check-api.mjs`). New MCP servers (e.g. TMDB,+ scripts/ # dev tooling, .ts run directly by node (typechecked with src/):+ # run-tests.ts, check-api.ts, sync-version.ts,+ # preversion-check.ts (npm version gate — see .agents/skills/release/SKILL.md),+ # check-changelog-coverage.ts (see docs-consistency-check skill),+ # check-chainable-optional-fields.ts (see tool-description-check skill)+ npm test # node:test over src/**/*.test.ts (native type stripping, no build)+ - Runtime floor is **Node ≥ 22.18** — the first 22.x that runs `.ts` files+ directly (type stripping on by default, no warning), which is how the test+ suite runs: no build step, so relative imports name the real `.ts` file and+ tsconfig's `erasableSyntaxOnly` rules out enums, namespaces and parameter+ properties. The code also relies on `URL.parse` and `Promise.withResolvers`+ (22.x). tsup targets `node22`. `manifest.json`'s+ `compatibility.runtimes.node` declares the same floor for `.mcpb` hosts+ (`manifest.test.ts` keeps it equal to `engines.node`). This floor covers+ `scripts/` too, not just `src/`. CI tests the exact floor (`"22.18.0"`)+ plus the newer LTS lines: a bare `22` would resolve to the newest 22.x+ and let code needing a later minor than the declared floor pass CI. Only+ the tested floor is declared, never an older version the code "should" run+ on: promising a version CI never runs is how the Node 20 floor drifted.+ - `npm run typecheck` (also the first step of `npm run build`) covers `src/`,+ `scripts/`, `tsup.config.ts` and `eslint.config.js` (via `checkJs`; it stays+ `.js` because ESLint loads a `.ts` config only through `jiti` or an unstable+ flag). tsconfig uses `"module": "node20"`, which implies the Node16+ resolution rules.+ unpushed tags) and MCP Registry details.+ domain `tools/`, `prompts.ts`, `check-api.ts`). New MCP servers (e.g. TMDB,