@kaminari-ad/mcp 0.2.0 → 0.2.1

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.
package/CHANGELOG.md CHANGED
@@ -7,6 +7,71 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.2.1] - 2026-05-18
11
+
12
+ Patch release — clear Node-version error message, correct `engines`
13
+ declaration, and the default API URL is now the real API host. No
14
+ tool surface change.
15
+
16
+ ### Fixed
17
+
18
+ - **Default `KAMINARI_AD_API_URL` pointed at the wrong host.**
19
+ v0.2.0 defaulted to `https://kaminari.ad`, which is the marketing
20
+ landing page — `kaminari.ad` does NOT serve `/api/v1/*` routes
21
+ (returns HTTP 404 for every tool call). The actual API host is
22
+ `https://app.kaminari.ad` (note the `app.` subdomain).
23
+ Users who set `KAMINARI_AD_API_URL` explicitly were unaffected;
24
+ users who relied on the default got 404 on every tool call. The
25
+ internal `gen-api-types` script already used the correct host
26
+ (`app.kaminari.ad`) for OpenAPI generation — only the runtime
27
+ default drifted. Now corrected here, in `.env.example`, and pinned
28
+ by a unit test against future regressions.
29
+ - **Cryptic `webidl.util.markAsUncloneable is not a function`
30
+ startup crash on Node < 22.19.** The underlying `undici@8.x`
31
+ removed feature probes in v8.0.3 and now imports `markAsUncloneable`
32
+ unconditionally — that symbol only exists on Node 22.19+. v0.2.0
33
+ declared `engines.node = ">=22.13.0"`, so npm warned but did not
34
+ block install on Node 22.13–22.18 or Node 20; users hit the
35
+ cryptic webidl error at first invocation.
36
+ - `engines.node` bumped to `>=22.19.0` to match the real floor.
37
+ Consumers with `engine-strict=true` (or `npm install
38
+ --engine-strict`) are now blocked at install time with a clear
39
+ `EBADENGINE` message.
40
+ - New runtime preflight in `bin.ts::main()` catches the case where
41
+ install slipped through (npx pulls fresh on every run; npx does
42
+ not honour `engine-strict` by default). Prints a clean message
43
+ and exits with code 2, BEFORE any dynamic import pulls undici:
44
+
45
+ ```
46
+ @kaminari-ad/mcp requires Node.js >=22.19.0 (you have v20.x.x).
47
+ The underlying undici 8.x HTTP client uses markAsUncloneable
48
+ from node:worker_threads, available only on Node 22.19+.
49
+ Older Node crashes at import time with the cryptic message
50
+ `webidl.util.markAsUncloneable is not a function`.
51
+
52
+ Please upgrade Node and re-run: https://nodejs.org/en/download
53
+ ```
54
+
55
+ ### Internal
56
+
57
+ - `tsup.config.ts` flipped to `splitting: true`. Required for the
58
+ preflight to actually run before undici loads: without splitting
59
+ esbuild inlines every dynamic `await import("./presentation/...")`
60
+ call into the top-level bundle, eagerly importing undici/MCP SDK/
61
+ pino at startup. With splitting on, transport bootstraps stay as
62
+ separate chunks loaded only after `main()` runs the Node check.
63
+ - `scripts/check-bundle-size.ts` rewritten to aggregate every
64
+ runtime `.js` chunk under `dist/` instead of just `dist/bin.js`.
65
+ With splitting on, `bin.js` is a thin ~5 KB preflight + dispatch
66
+ shim and the actual shipping cost lives in the transport / vendor
67
+ chunks. Total artifact: 173 KB across 5 chunks (smaller than
68
+ v0.2.0's 218 KB monolithic bundle thanks to tree-shaking now seeing
69
+ each chunk in isolation). Limit unchanged at 500 KB.
70
+ - `src/shared/check-node-version.ts` — pure function extracted from
71
+ `bin.ts` so the version preflight can be unit-tested without
72
+ `process.exit` side effects. Test pins all boundary cases (22.18 /
73
+ 22.19 / 22.20 / 23.x / 20.x / prerelease tags / garbage input).
74
+
10
75
  ## [0.2.0] - 2026-05-17
11
76
 
12
77
  Comprehensive parser-drift sweep across all `/api/v1/*` list
@@ -571,7 +636,9 @@ Initial public release. The first version that ships to npm under
571
636
  need them.
572
637
  - Invoice PDF fetcher — same reason.
573
638
 
574
- [Unreleased]: https://github.com/kaminari-ad/mcp/compare/v0.1.5...HEAD
639
+ [Unreleased]: https://github.com/kaminari-ad/mcp/compare/v0.2.1...HEAD
640
+ [0.2.1]: https://github.com/kaminari-ad/mcp/compare/v0.2.0...v0.2.1
641
+ [0.2.0]: https://github.com/kaminari-ad/mcp/compare/v0.1.5...v0.2.0
575
642
  [0.1.5]: https://github.com/kaminari-ad/mcp/compare/v0.1.0...v0.1.5
576
643
  [0.1.4]: https://github.com/kaminari-ad/mcp/compare/v0.1.0...v0.1.4
577
644
  [0.1.3]: https://github.com/kaminari-ad/mcp/compare/v0.1.0...v0.1.3
package/README.md CHANGED
@@ -121,7 +121,7 @@ make test-unit # unit only
121
121
  make test-isolation # tenant-isolation suite
122
122
  ```
123
123
 
124
- Or directly with `npm` if you have Node 22 LTS on the host (matches `.nvmrc` / `engines.node`):
124
+ Or directly with `npm` if you have Node `>=22.19.0` on the host (matches `engines.node`; `.nvmrc` pins the minor for dev parity with CI). The package gates strictly at `22.19.0` because `undici@8.x` requires `markAsUncloneable` from `node:worker_threads` (Node 22.19+).
125
125
 
126
126
  ```bash
127
127
  npm ci --legacy-peer-deps