@cyanheads/browser-compat-mcp-server 0.3.0 → 0.3.2
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/AGENTS.md +7 -7
- package/CLAUDE.md +7 -7
- package/README.md +12 -12
- package/THIRD_PARTY_NOTICES.md +7 -7
- package/changelog/0.3.x/0.3.1.md +36 -0
- package/changelog/0.3.x/0.3.2.md +39 -0
- package/changelog/template.md +20 -11
- package/dist/data/browserslist-bcd-map.d.ts +7 -6
- package/dist/data/browserslist-bcd-map.d.ts.map +1 -1
- package/dist/data/browserslist-bcd-map.js +7 -6
- package/dist/data/browserslist-bcd-map.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/mcp-server/tools/definitions/browsercompat-check-baseline.tool.d.ts +1 -0
- package/dist/mcp-server/tools/definitions/browsercompat-check-baseline.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/browsercompat-check-baseline.tool.js +31 -7
- package/dist/mcp-server/tools/definitions/browsercompat-check-baseline.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/browsercompat-compare-support.tool.d.ts +13 -2
- package/dist/mcp-server/tools/definitions/browsercompat-compare-support.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/browsercompat-compare-support.tool.js +134 -71
- package/dist/mcp-server/tools/definitions/browsercompat-compare-support.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/browsercompat-list-reference.tool.js +2 -2
- package/dist/mcp-server/tools/definitions/browsercompat-list-reference.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/browsercompat-search-features.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/browsercompat-search-features.tool.js +17 -42
- package/dist/mcp-server/tools/definitions/browsercompat-search-features.tool.js.map +1 -1
- package/dist/services/bcd/bcd-service.d.ts +10 -3
- package/dist/services/bcd/bcd-service.d.ts.map +1 -1
- package/dist/services/bcd/bcd-service.js +25 -4
- package/dist/services/bcd/bcd-service.js.map +1 -1
- package/dist/services/targets/targets-service.d.ts +32 -11
- package/dist/services/targets/targets-service.d.ts.map +1 -1
- package/dist/services/targets/targets-service.js +92 -25
- package/dist/services/targets/targets-service.js.map +1 -1
- package/dist/services/targets/types.d.ts +23 -6
- package/dist/services/targets/types.d.ts.map +1 -1
- package/package.json +14 -14
- package/server.json +3 -3
- package/skills/browser-compat-guide/SKILL.md +5 -3
package/AGENTS.md
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# Developer Protocol
|
|
2
2
|
|
|
3
3
|
**Server:** browser-compat-mcp-server
|
|
4
|
-
**Version:** 0.3.
|
|
5
|
-
**Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.13.
|
|
6
|
-
**Engines:** Bun ≥1.4.
|
|
4
|
+
**Version:** 0.3.2
|
|
5
|
+
**Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.13.24`
|
|
6
|
+
**Engines:** Bun ≥1.4.4, Node ≥24.0.0
|
|
7
7
|
**MCP SDK:** `@modelcontextprotocol/server` ^2.4.0
|
|
8
8
|
**Zod:** ^4.6.7
|
|
9
9
|
|
|
@@ -160,9 +160,9 @@ export function getServerConfig() {
|
|
|
160
160
|
}
|
|
161
161
|
```
|
|
162
162
|
|
|
163
|
-
`parseEnvConfig` maps Zod schema paths → env var names so errors name the variable (`MY_API_KEY`) not the path (`apiKey`). Throws `ConfigurationError`, which the framework prints as a clean startup banner.
|
|
163
|
+
`parseEnvConfig` maps Zod schema paths → env var names so errors name the variable (`MY_API_KEY`) not the path (`apiKey`). Throws `ConfigurationError`, which the framework prints as a clean startup banner when the call runs in `setup()`; a call at import, such as a module-scope `disabledTool()` gate, exits on the raw stack instead.
|
|
164
164
|
|
|
165
|
-
For env booleans use `z.stringbool()`, never `z.coerce.boolean()` — `Boolean("false")` is `true`, so a coerced flag can't be disabled through the environment. `z.stringbool()` parses `true/false
|
|
165
|
+
For env booleans use `z.stringbool()`, never `z.coerce.boolean()` — `Boolean("false")` is `true`, so a coerced flag can't be disabled through the environment. `z.stringbool()` parses `true/false`, `1/0`, `yes/no`, `on/off`, `y/n`, and `enabled/disabled` (any case) and rejects anything else, so `=false` actually disables.
|
|
166
166
|
|
|
167
167
|
### Server identity and instructions
|
|
168
168
|
|
|
@@ -222,7 +222,7 @@ Handlers receive a unified `ctx` object. Key properties:
|
|
|
222
222
|
|
|
223
223
|
Handlers throw — the framework catches, classifies, and formats.
|
|
224
224
|
|
|
225
|
-
**Recommended: typed error contract.** Declare `errors: [{ reason, code, when, recovery, retryable?, severity?, thrownBy? }]` on `tool()` / `resource()` to receive `ctx.fail(reason, …)` typed against the reason union. TypeScript catches typos at compile time, `data.reason` is auto-populated for observability, linter enforces conformance against the handler body. `recovery` is required (≥ 5 words, lint-validated) — the single source of truth for the agent's next move. The framework puts it on the wire whenever a failure carrying that `reason` arrives without a hint — a bare `ctx.fail('reason')` or a service throw with `data: { reason }` — as `data.recovery.hint`, mirrored into `content[]` text unless the message already contains it verbatim; override with an explicit `{ recovery: { hint: '...' } }` when dynamic runtime context matters. Every error envelope also carries `data.requestId`, the id the server's log records for that call carry, and `content[]` closes with `(reason … · request <id>)`. Mark an entry the service layer throws with `thrownBy: 'service'` so `error-contract-unthrown` skips it — lint-only metadata, nothing at runtime reads it. Baseline codes (`InternalError`, `ServiceUnavailable`, `Timeout`, `ValidationError`, `SerializationError`, `RequestCancelled`) bubble freely and don't need declaring.
|
|
225
|
+
**Recommended: typed error contract.** Declare `errors: [{ reason, code, when, recovery, retryable?, severity?, thrownBy? }]` on `tool()` / `resource()` to receive `ctx.fail(reason, …)` typed against the reason union. TypeScript catches typos at compile time, `data.reason` is auto-populated for observability, linter enforces conformance against the handler body. `recovery` is required (≥ 5 words, lint-validated) — the single source of truth for the agent's next move. The framework puts it on the wire whenever a failure carrying that `reason` arrives without a hint — a bare `ctx.fail('reason')` or a service throw with `data: { reason }` — as `data.recovery.hint`, mirrored into `content[]` text unless the message already contains it verbatim; override with an explicit `{ recovery: { hint: '...' } }` when dynamic runtime context matters. A declared `retryable` reaches the same failures the same way, as `data.retryable`, unless the throw sets its own. Every error envelope also carries `data.requestId`, the id the server's log records for that call carry, and `content[]` closes with `(reason … · request <id>)`. Mark an entry the service layer throws with `thrownBy: 'service'` so `error-contract-unthrown` skips it — lint-only metadata, nothing at runtime reads it. Baseline codes (`InternalError`, `ServiceUnavailable`, `Timeout`, `ValidationError`, `SerializationError`, `RequestCancelled`) bubble freely and don't need declaring.
|
|
226
226
|
|
|
227
227
|
```ts
|
|
228
228
|
import { JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors';
|
|
@@ -389,7 +389,7 @@ When you complete a skill's checklist, check the boxes and add a completion time
|
|
|
389
389
|
|
|
390
390
|
## Bundling
|
|
391
391
|
|
|
392
|
-
`npm run bundle` produces a `.mcpb` extension bundle for one-click install in Claude Desktop. `mcpb pack` reads `.mcpbignore`, not `.gitignore`, so every root path the bundle must not ship — source, tests, docs, caches, logs, agent docs, plugin manifests, gitignored local files — needs a root-anchored line there (`/docs/`, never `docs/`, which also strips `node_modules/*/docs/`); `lint:packaging` names each missing or unanchored line. Root `skills/` ships on purpose. The pack step is followed by `scripts/clean-mcpb.ts`, which prunes dev dependencies (`mcpb clean`) and strips four classes of `node_modules/**` content that root-anchored `.mcpbignore` patterns cannot reach: dependency-shipped agent docs
|
|
392
|
+
`npm run bundle` produces a `.mcpb` extension bundle for one-click install in Claude Desktop. `mcpb pack` reads `.mcpbignore`, not `.gitignore`, so every root path the bundle must not ship — source, tests, docs, caches, logs, agent docs, plugin manifests, gitignored local files — needs a root-anchored line there (`/docs/`, never `docs/`, which also strips `node_modules/*/docs/`); `lint:packaging` names each missing or unanchored line. Root `skills/` ships on purpose. The pack step is followed by `scripts/clean-mcpb.ts`, which prunes dev dependencies (`mcpb clean`) and strips four classes of `node_modules/**` content that root-anchored `.mcpbignore` patterns cannot reach: dependency-shipped agent docs — `framework-skills/`, `skills/`, `.claude/`, `.agents/`, `AGENTS.md`, and `CLAUDE.md` at a package's root, and `SKILL.md` anywhere (a `skills/` deeper in a package is runtime code and stays); platform-specific native bindings, which would otherwise lock the bundle to the platform it was packed on; node-gyp build output beside a `binding.gyp` (`config.gypi`, Makefiles, `obj.target/`, `.deps/`, object files and debug symbols), which records the packing machine's paths — compiled `*.node` addons stay; and build-only package files — the framework's `changelog/`, `scripts/`, `templates/`, and config bases (`biome.json`, `vitest.config.base.mjs`, `config/tsconfig.base.json`), and `better-sqlite3`'s `deps/` and `src/` C sources. A server using DataCanvas therefore ships a portable bundle without the DuckDB native — `@duckdb/node-api` is an optional peer loaded lazily, so canvas tools report an actionable install hint and every other tool works normally. MCPB is stdio-only — HTTP and Cloudflare Workers deployments are unaffected. Consumers who don't need it can delete `manifest.json` and `.mcpbignore`; `lint:packaging` skips cleanly.
|
|
393
393
|
|
|
394
394
|
**Adding an env var requires both files:** `server.json` (registry discovery, `environmentVariables[]`) and `manifest.json` (bundle install UX, `mcp_config.env` + `user_config`). `lint:packaging` (run by `devcheck`) verifies the env var names match, that every `user_config` option is wired into `mcp_config.env` as `"X": "${user_config.X}"` (the host substitutes nothing else — `"${X}"` reaches the server as that literal string), and that an optional string option carries `"default": ""`.
|
|
395
395
|
|
package/CLAUDE.md
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# Developer Protocol
|
|
2
2
|
|
|
3
3
|
**Server:** browser-compat-mcp-server
|
|
4
|
-
**Version:** 0.3.
|
|
5
|
-
**Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.13.
|
|
6
|
-
**Engines:** Bun ≥1.4.
|
|
4
|
+
**Version:** 0.3.2
|
|
5
|
+
**Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.13.24`
|
|
6
|
+
**Engines:** Bun ≥1.4.4, Node ≥24.0.0
|
|
7
7
|
**MCP SDK:** `@modelcontextprotocol/server` ^2.4.0
|
|
8
8
|
**Zod:** ^4.6.7
|
|
9
9
|
|
|
@@ -160,9 +160,9 @@ export function getServerConfig() {
|
|
|
160
160
|
}
|
|
161
161
|
```
|
|
162
162
|
|
|
163
|
-
`parseEnvConfig` maps Zod schema paths → env var names so errors name the variable (`MY_API_KEY`) not the path (`apiKey`). Throws `ConfigurationError`, which the framework prints as a clean startup banner.
|
|
163
|
+
`parseEnvConfig` maps Zod schema paths → env var names so errors name the variable (`MY_API_KEY`) not the path (`apiKey`). Throws `ConfigurationError`, which the framework prints as a clean startup banner when the call runs in `setup()`; a call at import, such as a module-scope `disabledTool()` gate, exits on the raw stack instead.
|
|
164
164
|
|
|
165
|
-
For env booleans use `z.stringbool()`, never `z.coerce.boolean()` — `Boolean("false")` is `true`, so a coerced flag can't be disabled through the environment. `z.stringbool()` parses `true/false
|
|
165
|
+
For env booleans use `z.stringbool()`, never `z.coerce.boolean()` — `Boolean("false")` is `true`, so a coerced flag can't be disabled through the environment. `z.stringbool()` parses `true/false`, `1/0`, `yes/no`, `on/off`, `y/n`, and `enabled/disabled` (any case) and rejects anything else, so `=false` actually disables.
|
|
166
166
|
|
|
167
167
|
### Server identity and instructions
|
|
168
168
|
|
|
@@ -222,7 +222,7 @@ Handlers receive a unified `ctx` object. Key properties:
|
|
|
222
222
|
|
|
223
223
|
Handlers throw — the framework catches, classifies, and formats.
|
|
224
224
|
|
|
225
|
-
**Recommended: typed error contract.** Declare `errors: [{ reason, code, when, recovery, retryable?, severity?, thrownBy? }]` on `tool()` / `resource()` to receive `ctx.fail(reason, …)` typed against the reason union. TypeScript catches typos at compile time, `data.reason` is auto-populated for observability, linter enforces conformance against the handler body. `recovery` is required (≥ 5 words, lint-validated) — the single source of truth for the agent's next move. The framework puts it on the wire whenever a failure carrying that `reason` arrives without a hint — a bare `ctx.fail('reason')` or a service throw with `data: { reason }` — as `data.recovery.hint`, mirrored into `content[]` text unless the message already contains it verbatim; override with an explicit `{ recovery: { hint: '...' } }` when dynamic runtime context matters. Every error envelope also carries `data.requestId`, the id the server's log records for that call carry, and `content[]` closes with `(reason … · request <id>)`. Mark an entry the service layer throws with `thrownBy: 'service'` so `error-contract-unthrown` skips it — lint-only metadata, nothing at runtime reads it. Baseline codes (`InternalError`, `ServiceUnavailable`, `Timeout`, `ValidationError`, `SerializationError`, `RequestCancelled`) bubble freely and don't need declaring.
|
|
225
|
+
**Recommended: typed error contract.** Declare `errors: [{ reason, code, when, recovery, retryable?, severity?, thrownBy? }]` on `tool()` / `resource()` to receive `ctx.fail(reason, …)` typed against the reason union. TypeScript catches typos at compile time, `data.reason` is auto-populated for observability, linter enforces conformance against the handler body. `recovery` is required (≥ 5 words, lint-validated) — the single source of truth for the agent's next move. The framework puts it on the wire whenever a failure carrying that `reason` arrives without a hint — a bare `ctx.fail('reason')` or a service throw with `data: { reason }` — as `data.recovery.hint`, mirrored into `content[]` text unless the message already contains it verbatim; override with an explicit `{ recovery: { hint: '...' } }` when dynamic runtime context matters. A declared `retryable` reaches the same failures the same way, as `data.retryable`, unless the throw sets its own. Every error envelope also carries `data.requestId`, the id the server's log records for that call carry, and `content[]` closes with `(reason … · request <id>)`. Mark an entry the service layer throws with `thrownBy: 'service'` so `error-contract-unthrown` skips it — lint-only metadata, nothing at runtime reads it. Baseline codes (`InternalError`, `ServiceUnavailable`, `Timeout`, `ValidationError`, `SerializationError`, `RequestCancelled`) bubble freely and don't need declaring.
|
|
226
226
|
|
|
227
227
|
```ts
|
|
228
228
|
import { JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors';
|
|
@@ -389,7 +389,7 @@ When you complete a skill's checklist, check the boxes and add a completion time
|
|
|
389
389
|
|
|
390
390
|
## Bundling
|
|
391
391
|
|
|
392
|
-
`npm run bundle` produces a `.mcpb` extension bundle for one-click install in Claude Desktop. `mcpb pack` reads `.mcpbignore`, not `.gitignore`, so every root path the bundle must not ship — source, tests, docs, caches, logs, agent docs, plugin manifests, gitignored local files — needs a root-anchored line there (`/docs/`, never `docs/`, which also strips `node_modules/*/docs/`); `lint:packaging` names each missing or unanchored line. Root `skills/` ships on purpose. The pack step is followed by `scripts/clean-mcpb.ts`, which prunes dev dependencies (`mcpb clean`) and strips four classes of `node_modules/**` content that root-anchored `.mcpbignore` patterns cannot reach: dependency-shipped agent docs
|
|
392
|
+
`npm run bundle` produces a `.mcpb` extension bundle for one-click install in Claude Desktop. `mcpb pack` reads `.mcpbignore`, not `.gitignore`, so every root path the bundle must not ship — source, tests, docs, caches, logs, agent docs, plugin manifests, gitignored local files — needs a root-anchored line there (`/docs/`, never `docs/`, which also strips `node_modules/*/docs/`); `lint:packaging` names each missing or unanchored line. Root `skills/` ships on purpose. The pack step is followed by `scripts/clean-mcpb.ts`, which prunes dev dependencies (`mcpb clean`) and strips four classes of `node_modules/**` content that root-anchored `.mcpbignore` patterns cannot reach: dependency-shipped agent docs — `framework-skills/`, `skills/`, `.claude/`, `.agents/`, `AGENTS.md`, and `CLAUDE.md` at a package's root, and `SKILL.md` anywhere (a `skills/` deeper in a package is runtime code and stays); platform-specific native bindings, which would otherwise lock the bundle to the platform it was packed on; node-gyp build output beside a `binding.gyp` (`config.gypi`, Makefiles, `obj.target/`, `.deps/`, object files and debug symbols), which records the packing machine's paths — compiled `*.node` addons stay; and build-only package files — the framework's `changelog/`, `scripts/`, `templates/`, and config bases (`biome.json`, `vitest.config.base.mjs`, `config/tsconfig.base.json`), and `better-sqlite3`'s `deps/` and `src/` C sources. A server using DataCanvas therefore ships a portable bundle without the DuckDB native — `@duckdb/node-api` is an optional peer loaded lazily, so canvas tools report an actionable install hint and every other tool works normally. MCPB is stdio-only — HTTP and Cloudflare Workers deployments are unaffected. Consumers who don't need it can delete `manifest.json` and `.mcpbignore`; `lint:packaging` skips cleanly.
|
|
393
393
|
|
|
394
394
|
**Adding an env var requires both files:** `server.json` (registry discovery, `environmentVariables[]`) and `manifest.json` (bundle install UX, `mcp_config.env` + `user_config`). `lint:packaging` (run by `devcheck`) verifies the env var names match, that every `user_config` option is wired into `mcp_config.env` as `"X": "${user_config.X}"` (the host substitutes nothing else — `"${X}"` reaches the server as that literal string), and that an optional string option carries `"default": ""`.
|
|
395
395
|
|
package/README.md
CHANGED
|
@@ -49,7 +49,7 @@ The [browser-compat-guide](./skills/browser-compat-guide/SKILL.md) covers assess
|
|
|
49
49
|
|
|
50
50
|
### `browsercompat_list_reference` <sub>tool</sub>
|
|
51
51
|
|
|
52
|
-
- Required `topic`: `bcd_namespaces` (12), `bcd_browsers` (17), `browserslist_agents` (19), `baseline_states` (4), `groups` (
|
|
52
|
+
- Required `topic`: `bcd_namespaces` (12), `bcd_browsers` (17), `browserslist_agents` (19 browser agents plus Node.js), `baseline_states` (4), `groups` (106), or `snapshots` (11). Group and snapshot ids feed the search filters.
|
|
53
53
|
- Entries carry `id`, `label`, and `detail`, plus `count`, `reported`, `bcd_browser`, `usage_percent`, `maps_from`, or `spec_url` where applicable. An agent's `bcd_browser: null` means support comparisons cannot evaluate it and report it in `unchecked_targets`.
|
|
54
54
|
|
|
55
55
|
---
|
|
@@ -65,7 +65,7 @@ The [browser-compat-guide](./skills/browser-compat-guide/SKILL.md) covers assess
|
|
|
65
65
|
### `browsercompat_check_baseline` <sub>tool</sub>
|
|
66
66
|
|
|
67
67
|
- BCD keys or web-features ids, 1–200 characters each. Up to 100 are accepted and the first 20 are evaluated in input order; the rest come back verbatim in `omitted_features`. More than 100 is rejected, and a whitespace-only entry returns `invalid_feature_input`.
|
|
68
|
-
- Results carry Baseline state and dates, `limiting_browser`, `deprecated`, `experimental`, and `discouraged`, plus `usage_percent_excluded` and `usage_source` where caniuse covers the feature. Usage is left out when unavailable, never reported as zero.
|
|
68
|
+
- Results carry Baseline state and dates, `limiting_browser`, `deprecated`, `experimental`, and `discouraged`, plus `usage_percent_excluded`, `usage_percent_prefixed`, and `usage_source` where caniuse covers the feature. `usage_percent_excluded` is the traffic without default, unprefixed, unflagged support; `usage_percent_prefixed` is the part of it a vendor prefix recovers. Usage is left out when unavailable, never reported as zero.
|
|
69
69
|
- `all_widely_available` is true only when every entry resolves at `widely` and none was omitted; it does not assess deprecation.
|
|
70
70
|
|
|
71
71
|
---
|
|
@@ -74,15 +74,15 @@ The [browser-compat-guide](./skills/browser-compat-guide/SKILL.md) covers assess
|
|
|
74
74
|
|
|
75
75
|
- `query`, 1–100 characters, accepts names, keywords, or notation such as `Array.prototype.at`, `display: grid`, or `<dialog>`. Combine `namespace` (12 BCD namespaces), `baseline` (`widely`, `newly`, `limited`, `not_mapped`), `group` (including nested groups), and `snapshot` (such as `ecmascript-2023`).
|
|
76
76
|
- `matched_on` says why a result ranked where it did, and `support_summary` covers the seven Baseline core browsers: `Firefox 33 (flagged)`, `Safari 3 (prefixed)`, `Chrome 94 (partial)`, and `Edge ≤18` preserve the selected verdict and addition bound; `—` means unsupported, removed, or preview-only, and `?` means unknown. Typed failures: `invalid_query` (zero searchable tokens), `unknown_group`, `unknown_snapshot`.
|
|
77
|
-
- Page with `limit` (default 10,
|
|
77
|
+
- Page with `limit` (default 10, 1–1000; `cap` reports the requested size) and `offset` (default 0); `totalCount` and `nextOffset` drive paging. When filters exclude every match, the notice gives the count available without them. A query with no matches anywhere gets spelling and discovery guidance.
|
|
78
78
|
|
|
79
79
|
---
|
|
80
80
|
|
|
81
81
|
### `browsercompat_compare_support` <sub>tool</sub>
|
|
82
82
|
|
|
83
|
-
- Up to 20 features per call against a required self-contained `targets` browserslist query, such as `defaults` or `> 0.5%, last 2 versions`; config packages and custom configuration are rejected, and local config discovery is disabled. Up to 100 features are accepted and the rest come back in `omitted_features`, which makes `all_clear` false. Typed failures
|
|
83
|
+
- Up to 20 features per call against a required self-contained `targets` browserslist query, such as `defaults` or `> 0.5%, last 2 versions`; config packages and custom configuration are rejected, and local config discovery is disabled. Up to 100 features are accepted and the rest come back in `omitted_features`, which makes `all_clear` false. Node queries such as `maintained node versions` use BCD’s `nodejs` records. A target beyond the newest recorded release is unchecked. Typed failures include `invalid_target_query`, `unknown_region`, `no_targets_resolved`, and `invalid_feature_input`.
|
|
84
84
|
- Each `verdict` is `clears`, `fails`, `inconclusive`, `miss`, or `ambiguous`. A feature clears only when every target in the query was evaluated and supports it, so a query that includes a browser with no compatibility data, as `defaults` does, never clears. `all_clear` is true only when every feature clears.
|
|
85
|
-
-
|
|
85
|
+
- Pass `usage_region` to weight traffic by a country or region, such as `CN` or `alt-as`. The default is global. `failing_coverage_percent` gives each compared feature’s failing traffic across the whole query. Every failing run and paged failing target carries `usage_percent`. Node targets carry zero traffic weight. Target rows page with `target_offset` (default 0) and `target_limit` (default 10, 1–1000; `cap` reports the requested size); verdicts and totals are the same on every page, and `totalCount` and `nextOffset` drive paging.
|
|
86
86
|
|
|
87
87
|
---
|
|
88
88
|
|
|
@@ -90,12 +90,12 @@ The [browser-compat-guide](./skills/browser-compat-guide/SKILL.md) covers assess
|
|
|
90
90
|
|
|
91
91
|
| Package | Version | License | Supplies |
|
|
92
92
|
|:---|:---|:---|:---|
|
|
93
|
-
| [`@mdn/browser-compat-data`](https://github.com/mdn/browser-compat-data) | `^8.1.
|
|
94
|
-
| [`web-features`](https://github.com/web-platform-dx/web-features) | `^3.
|
|
95
|
-
| [`caniuse-lite`](https://github.com/browserslist/caniuse-lite) | `^1.0.
|
|
96
|
-
| [`browserslist`](https://github.com/browserslist/browserslist) | `^4.29.
|
|
93
|
+
| [`@mdn/browser-compat-data`](https://github.com/mdn/browser-compat-data) | `^8.1.11` | CC0-1.0 | Per-browser support, standards status, MDN and specification links |
|
|
94
|
+
| [`web-features`](https://github.com/web-platform-dx/web-features) | `^3.48.0` | Apache-2.0 | Baseline state and dates, feature-level core-browser support, discouraged flags, groups, ECMAScript snapshots |
|
|
95
|
+
| [`caniuse-lite`](https://github.com/browserslist/caniuse-lite) | `^1.0.30001828` | CC-BY-4.0 | Usage weighting, plus feature titles for the search index |
|
|
96
|
+
| [`browserslist`](https://github.com/browserslist/browserslist) | `^4.29.6` | MIT | Target query resolution and coverage figures |
|
|
97
97
|
|
|
98
|
-
CC BY 4.0 requires attribution wherever the caniuse data travels, so
|
|
98
|
+
CC BY 4.0 requires attribution wherever the caniuse data travels, so responses carrying global usage figures carry this attribution: `Usage data from caniuse.com, © Can I Use contributors, CC BY 4.0. Figures are percentage points of global traffic. The bundled data tracks ~97.6% of global traffic; the remainder is untracked and unknown.` Regional comparisons name the selected audience. All values are raw percentage points of that audience’s traffic. Full license texts and notices are in [`THIRD_PARTY_NOTICES.md`](./THIRD_PARTY_NOTICES.md).
|
|
99
99
|
|
|
100
100
|
---
|
|
101
101
|
|
|
@@ -113,7 +113,7 @@ Browser-compat-specific:
|
|
|
113
113
|
Agent-friendly output:
|
|
114
114
|
|
|
115
115
|
- Every response echoes `data_version`, the version of each bundled dataset behind the answer
|
|
116
|
-
-
|
|
116
|
+
- Targets without data appear in `unchecked_targets`. A known failure still yields `fails`. With unchecked targets and no known failure, a compared feature is `inconclusive`.
|
|
117
117
|
- Misses are results, not failures: `found: false` with `guidance` naming the next call, and typed errors with recovery hints
|
|
118
118
|
- Usage figures state the population they are a share of and carry the caniuse attribution
|
|
119
119
|
|
|
@@ -201,7 +201,7 @@ MCP_TRANSPORT_TYPE=http MCP_HTTP_PORT=3010 bun run start:http
|
|
|
201
201
|
|
|
202
202
|
### Prerequisites
|
|
203
203
|
|
|
204
|
-
- [Bun v1.4.
|
|
204
|
+
- [Bun v1.4.4](https://bun.sh/) or higher (or Node.js v24+).
|
|
205
205
|
- No API keys, accounts, or network access required — every dataset ships with the package.
|
|
206
206
|
|
|
207
207
|
### Installation
|
package/THIRD_PARTY_NOTICES.md
CHANGED
|
@@ -6,10 +6,10 @@ attribution those datasets require.
|
|
|
6
6
|
|
|
7
7
|
| Dataset | Version range | License | Source |
|
|
8
8
|
|:--------|:--------------|:--------|:-------|
|
|
9
|
-
| `@mdn/browser-compat-data` | ^8.1.
|
|
10
|
-
| `web-features` | ^3.
|
|
11
|
-
| `caniuse-lite` | ^1.0.
|
|
12
|
-
| `browserslist` | ^4.29.
|
|
9
|
+
| `@mdn/browser-compat-data` | ^8.1.11 | CC0-1.0 | https://github.com/mdn/browser-compat-data |
|
|
10
|
+
| `web-features` | ^3.48.0 | Apache-2.0 | https://github.com/web-platform-dx/web-features |
|
|
11
|
+
| `caniuse-lite` | ^1.0.30001828 | CC-BY-4.0 | https://github.com/browserslist/caniuse-lite |
|
|
12
|
+
| `browserslist` | ^4.29.6 | MIT | https://github.com/browserslist/browserslist |
|
|
13
13
|
|
|
14
14
|
Every tool response echoes the exact version of each dataset it answered from, under
|
|
15
15
|
`data_version`.
|
|
@@ -243,10 +243,10 @@ beyond carrying the license text below and stating this attribution.
|
|
|
243
243
|
|
|
244
244
|
Browser usage and support statistics from the Can I Use project, licensed under the Creative
|
|
245
245
|
Commons Attribution 4.0 International License. CC BY 4.0 requires attribution wherever the
|
|
246
|
-
data is conveyed
|
|
247
|
-
|
|
246
|
+
data is conveyed. Every response with a usage percentage credits Can I Use in its `attribution`
|
|
247
|
+
field. Regional comparisons identify the selected audience. The global attribution reads:
|
|
248
248
|
|
|
249
|
-
> Usage data from caniuse.com, © Can I Use contributors, CC BY 4.0. Figures are percentage points of global traffic. The bundled data tracks ~97.
|
|
249
|
+
> Usage data from caniuse.com, © Can I Use contributors, CC BY 4.0. Figures are percentage points of global traffic. The bundled data tracks ~97.6% of global traffic; the remainder is untracked and unknown.
|
|
250
250
|
|
|
251
251
|
Full license: https://creativecommons.org/licenses/by/4.0/legalcode
|
|
252
252
|
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
---
|
|
2
|
+
summary: "Grouped browserslist targets are judged at every release they span, usage exclusion counts only default unprefixed support and reports the prefix-recoverable share, and requested page sizes up to 1000 are honored."
|
|
3
|
+
breaking: false
|
|
4
|
+
security: false
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# 0.3.1 — 2026-11-11
|
|
8
|
+
|
|
9
|
+
## Added
|
|
10
|
+
|
|
11
|
+
- **`usage_percent_prefixed`** on `browsercompat_check_baseline` results reports the part of `usage_percent_excluded` where the feature works only with a vendor prefix ([#39](https://github.com/cyanheads/browser-compat-mcp-server/issues/39)).
|
|
12
|
+
|
|
13
|
+
## Changed
|
|
14
|
+
|
|
15
|
+
- **`limit` (`browsercompat_search_features`) and `target_limit` (`browsercompat_compare_support`)** are honored up to the schema maximum of 1000 instead of being served as 50 and 10; defaults stay 10, and `cap` reports the requested size ([#40](https://github.com/cyanheads/browser-compat-mcp-server/issues/40)).
|
|
16
|
+
- **Bundled datasets** refreshed: `browsercompat_list_reference` lists 105 `groups` (was 104), and the caniuse attribution string reports ~97.6% tracked traffic (was ~97.5%).
|
|
17
|
+
- **Development tooling** resynced from the framework: skills, `devcheck`, packaging lint, release script, `.env.example` JWT audience and issuer entries.
|
|
18
|
+
|
|
19
|
+
## Fixed
|
|
20
|
+
|
|
21
|
+
- **Grouped browserslist tokens** such as `ios_saf 15.0-15.1` are judged at every BCD release they span, so a removal inside the range now fails the target instead of clearing at the lower endpoint ([#38](https://github.com/cyanheads/browser-compat-mcp-server/issues/38)).
|
|
22
|
+
- **`usage_percent_excluded`** counts a browser version as supported only for default, unprefixed, enabled support; prefix-required (`x`) and disabled-by-default (`d`) caniuse support are now excluded, except for features whose compat keys are all vendor-prefixed names ([#39](https://github.com/cyanheads/browser-compat-mcp-server/issues/39)).
|
|
23
|
+
|
|
24
|
+
## Dependencies
|
|
25
|
+
|
|
26
|
+
- `@cyanheads/mcp-ts-core` ^0.13.18 → ^0.13.22
|
|
27
|
+
- `@mdn/browser-compat-data` ^8.1.7 → ^8.1.8
|
|
28
|
+
- `browserslist` ^4.29.4 → ^4.29.5
|
|
29
|
+
- `caniuse-lite` ^1.0.30001819 → ^1.0.30001823
|
|
30
|
+
- `web-features` ^3.44.0 → ^3.45.0
|
|
31
|
+
- `@biomejs/biome` 2.6.3 → 2.6.6
|
|
32
|
+
- `@types/node` 26.6.5 → 26.6.6
|
|
33
|
+
- `@vitest/coverage-istanbul` 5.0.5 → 5.1.0
|
|
34
|
+
- `tsc-alias` ^1.9.9 → ^1.9.10
|
|
35
|
+
- `vitest` ^5.0.5 → ^5.1.0
|
|
36
|
+
- `engines.bun` >=1.4.0 → >=1.4.4
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
---
|
|
2
|
+
summary: "Measure failing browser traffic by audience and compare Node.js targets."
|
|
3
|
+
breaking: false
|
|
4
|
+
security: false
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# 0.3.2 — 2026-11-27
|
|
8
|
+
|
|
9
|
+
## Added
|
|
10
|
+
|
|
11
|
+
- **Failing traffic** appears per feature, per failing version run, and per paged failing target in `browsercompat_compare_support`. Feature and run totals cover the entire query on every page. ([#43](https://github.com/cyanheads/browser-compat-mcp-server/issues/43))
|
|
12
|
+
- **`usage_region`** weights every compare-support traffic figure using a bundled country or regional dataset, such as `CN` or `alt-as`. Omit it for global traffic. ([#44](https://github.com/cyanheads/browser-compat-mcp-server/issues/44))
|
|
13
|
+
- **Node.js targets** such as `maintained node versions` use BCD's `nodejs` data for exact compatibility keys and carry zero browser traffic. Web-features comparisons leave Node unchecked and return compatibility keys for follow-up. ([#45](https://github.com/cyanheads/browser-compat-mcp-server/issues/45))
|
|
14
|
+
|
|
15
|
+
## Changed
|
|
16
|
+
|
|
17
|
+
- **Compare-support guidance** explains that a known failure takes precedence over unchecked targets and that aggregate coverage counts only targets evaluated for every compared feature.
|
|
18
|
+
- **BCD identifiers** changed in the bundled data. Drop the `at_` prefix from the 16 margin keys under `css.at-rules.page.`, use `api.SpeechGrammarList.addFromUri` in place of `api.SpeechGrammarList.addFromURI`, and use `css.properties.hyphenate-limit-lines` for the former prefixed key.
|
|
19
|
+
- **Obsolete BCD entries** now return exact-key misses: `api.DelegatedInkTrailPresenter.expectedImprovement`, `api.History.pushState.unused_parameter`, `api.History.replaceState.unused_parameter`, `api.PushSubscription.subscriptionId`, and `css.properties.alt`.
|
|
20
|
+
|
|
21
|
+
## Fixed
|
|
22
|
+
|
|
23
|
+
- **Targets beyond BCD's numeric ceiling** are unchecked as `unknown_version`. This applies to both endpoints of grouped versions. ([#42](https://github.com/cyanheads/browser-compat-mcp-server/issues/42))
|
|
24
|
+
- **Filtered searches with zero hits** report the unfiltered count when dropping filters would help. Queries with no matches anywhere get spelling and discovery guidance. ([#46](https://github.com/cyanheads/browser-compat-mcp-server/issues/46))
|
|
25
|
+
|
|
26
|
+
## Dependencies
|
|
27
|
+
|
|
28
|
+
- `@cyanheads/mcp-ts-core` ^0.13.22 → ^0.13.24
|
|
29
|
+
- `@mdn/browser-compat-data` ^8.1.8 → ^8.1.11
|
|
30
|
+
- `browserslist` ^4.29.5 → ^4.29.6
|
|
31
|
+
- `caniuse-lite` ^1.0.30001823 → ^1.0.30001828
|
|
32
|
+
- `web-features` ^3.45.0 → ^3.48.0
|
|
33
|
+
- `@biomejs/biome` 2.6.6 → 2.6.9
|
|
34
|
+
- `@types/node` 26.6.6 → 26.6.11
|
|
35
|
+
- `@vitest/coverage-istanbul` 5.1.0 → ^5.1.2
|
|
36
|
+
- `fast-check` ^4.10.2 → ^4.11.0
|
|
37
|
+
- `ignore` ^7.0.14 → ^7.0.17
|
|
38
|
+
- `tsc-alias` ^1.9.10 → ^1.9.11
|
|
39
|
+
- `vitest` ^5.1.0 → ^5.1.2
|
package/changelog/template.md
CHANGED
|
@@ -75,17 +75,19 @@ security: false
|
|
|
75
75
|
Example — same fact, right size:
|
|
76
76
|
|
|
77
77
|
TOO LONG: **`fetchWithTimeout`'s `timeoutMs` bounds the whole exchange**
|
|
78
|
-
(#341). `fetch`
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
the deadline when the body closes,
|
|
78
|
+
([#341](https://github.com/cyanheads/mcp-ts-core/issues/341)). `fetch`
|
|
79
|
+
resolves once headers arrive and the deadline was cleared as the helper
|
|
80
|
+
returned, so a peer that answered promptly and then stalled the stream
|
|
81
|
+
held the request open indefinitely. A 2xx carrying a body now comes back
|
|
82
|
+
as a passthrough wrapper that disarms the deadline when the body closes,
|
|
83
|
+
errors, or is cancelled; …
|
|
83
84
|
[+90 more words of mechanism and edge cases]
|
|
84
85
|
|
|
85
86
|
RIGHT: **`fetchWithTimeout`'s `timeoutMs` now bounds the whole
|
|
86
|
-
exchange, not just the headers**
|
|
87
|
-
|
|
88
|
-
|
|
87
|
+
exchange, not just the headers**
|
|
88
|
+
([#341](https://github.com/cyanheads/mcp-ts-core/issues/341)). A stalled
|
|
89
|
+
body aborts with the same `Timeout` error; the returned `Response` is a
|
|
90
|
+
wrapper, so identity assertions (`toBe(response)`) no longer hold.
|
|
89
91
|
|
|
90
92
|
Narrative intro: skip by default. Add one short sentence only when the
|
|
91
93
|
release theme genuinely needs framing the bullets can't carry. When many
|
|
@@ -116,14 +118,21 @@ security: false
|
|
|
116
118
|
resolves to whatever real item already owns 42, and timeline previews pull
|
|
117
119
|
in that unrelated item's metadata.
|
|
118
120
|
|
|
121
|
+
Outside reporters: when the issue or PR came from outside the project
|
|
122
|
+
(`git-wrapup` step 5 says how to tell), thank its author in the same
|
|
123
|
+
parenthetical, profile linked by full URL for the same reason:
|
|
124
|
+
|
|
125
|
+
([#38](https://github.com/cyanheads/mcp-ts-core/issues/38), thanks [@octocat](https://github.com/octocat)!)
|
|
126
|
+
|
|
119
127
|
TAG ANNOTATIONS — the annotated tag body renders as the GitHub Release body
|
|
120
128
|
via `gh release create --notes-from-tag`. It is a condensed digest of this
|
|
121
129
|
entry, never a copy, and its format is owned by the `release-and-publish`
|
|
122
130
|
skill (step 4, "Create the annotated tag"): a short subject line without the
|
|
123
131
|
version, flat headline bullets — no Keep-a-Changelog section headers, no
|
|
124
|
-
gates line — at most one deps line, issue backlinks
|
|
125
|
-
last. In release-PR mode the `git-wrapup`
|
|
126
|
-
PR body's `## Changes` and the tag copies
|
|
132
|
+
gates line — at most one deps line, issue backlinks with any outside-reporter
|
|
133
|
+
thanks, and the changelog link last. In release-PR mode the `git-wrapup`
|
|
134
|
+
skill authors those bullets as the PR body's `## Changes` and the tag copies
|
|
135
|
+
them.
|
|
127
136
|
-->
|
|
128
137
|
|
|
129
138
|
## Added
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @fileoverview Hand-maintained mapping from browserslist/caniuse agent ids to
|
|
3
|
-
* browser-compat-data browser ids. Declares
|
|
4
|
-
*
|
|
5
|
-
*
|
|
3
|
+
* browser-compat-data browser ids. Declares every caniuse agent and the
|
|
4
|
+
* browserslist Node.js runtime target. Unmapped agents remain visible as
|
|
5
|
+
* unchecked targets.
|
|
6
6
|
* @module data/browserslist-bcd-map
|
|
7
7
|
*/
|
|
8
8
|
/**
|
|
9
|
-
* Every caniuse agent id, mapped to
|
|
9
|
+
* Every caniuse agent id and Node.js, mapped to a browser-compat-data id or to
|
|
10
10
|
* `null` where no counterpart exists. `webview_ios` is the one reported BCD
|
|
11
11
|
* browser with no agent, so it never appears as a target.
|
|
12
12
|
*/
|
|
@@ -30,10 +30,11 @@ export declare const BROWSERSLIST_BCD_MAP: {
|
|
|
30
30
|
readonly baidu: null;
|
|
31
31
|
readonly kaios: null;
|
|
32
32
|
readonly ie_mob: null;
|
|
33
|
+
readonly node: 'nodejs';
|
|
33
34
|
};
|
|
34
|
-
/** A
|
|
35
|
+
/** A browserslist target id declared in {@link BROWSERSLIST_BCD_MAP}. */
|
|
35
36
|
export type BrowserslistAgentId = keyof typeof BROWSERSLIST_BCD_MAP;
|
|
36
|
-
/** Resolve a
|
|
37
|
+
/** Resolve a browserslist agent id to a BCD browser id, or `null` when none exists. */
|
|
37
38
|
export declare function bcdBrowserForAgent(agent: string): string | null;
|
|
38
39
|
/** True when the agent id is declared in the map, mapped or not. */
|
|
39
40
|
export declare function isDeclaredAgent(agent: string): agent is BrowserslistAgentId;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"browserslist-bcd-map.d.ts","sourceRoot":"","sources":["../../src/data/browserslist-bcd-map.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH;;;;GAIG;AACH,eAAO,MAAM,oBAAoB;qBACvB,QAAQ;sBACP,gBAAgB;mBACnB,MAAM;sBACH,SAAS;qBACV,iBAAiB;iBACrB,IAAI;oBACD,OAAO;qBACN,eAAe;qBACf,QAAQ;sBACP,YAAY;sBACZ,yBAAyB;sBACzB,iBAAiB;;;;;;;;
|
|
1
|
+
{"version":3,"file":"browserslist-bcd-map.d.ts","sourceRoot":"","sources":["../../src/data/browserslist-bcd-map.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH;;;;GAIG;AACH,eAAO,MAAM,oBAAoB;qBACvB,QAAQ;sBACP,gBAAgB;mBACnB,MAAM;sBACH,SAAS;qBACV,iBAAiB;iBACrB,IAAI;oBACD,OAAO;qBACN,eAAe;qBACf,QAAQ;sBACP,YAAY;sBACZ,yBAAyB;sBACzB,iBAAiB;;;;;;;;mBAQpB,QAAQ;CACkC,CAAC;AAEnD,yEAAyE;AACzE,MAAM,MAAM,mBAAmB,GAAG,MAAM,OAAO,oBAAoB,CAAC;AAEpE,uFAAuF;AACvF,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAE/D;AAED,oEAAoE;AACpE,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,mBAAmB,CAE3E"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @fileoverview Hand-maintained mapping from browserslist/caniuse agent ids to
|
|
3
|
-
* browser-compat-data browser ids. Declares
|
|
4
|
-
*
|
|
5
|
-
*
|
|
3
|
+
* browser-compat-data browser ids. Declares every caniuse agent and the
|
|
4
|
+
* browserslist Node.js runtime target. Unmapped agents remain visible as
|
|
5
|
+
* unchecked targets.
|
|
6
6
|
* @module data/browserslist-bcd-map
|
|
7
7
|
*/
|
|
8
8
|
/**
|
|
9
|
-
* Every caniuse agent id, mapped to
|
|
9
|
+
* Every caniuse agent id and Node.js, mapped to a browser-compat-data id or to
|
|
10
10
|
* `null` where no counterpart exists. `webview_ios` is the one reported BCD
|
|
11
11
|
* browser with no agent, so it never appears as a target.
|
|
12
12
|
*/
|
|
@@ -30,10 +30,11 @@ export const BROWSERSLIST_BCD_MAP = {
|
|
|
30
30
|
baidu: null,
|
|
31
31
|
kaios: null,
|
|
32
32
|
ie_mob: null,
|
|
33
|
+
node: 'nodejs',
|
|
33
34
|
};
|
|
34
|
-
/** Resolve a
|
|
35
|
+
/** Resolve a browserslist agent id to a BCD browser id, or `null` when none exists. */
|
|
35
36
|
export function bcdBrowserForAgent(agent) {
|
|
36
|
-
return BROWSERSLIST_BCD_MAP[agent]
|
|
37
|
+
return isDeclaredAgent(agent) ? BROWSERSLIST_BCD_MAP[agent] : null;
|
|
37
38
|
}
|
|
38
39
|
/** True when the agent id is declared in the map, mapped or not. */
|
|
39
40
|
export function isDeclaredAgent(agent) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"browserslist-bcd-map.js","sourceRoot":"","sources":["../../src/data/browserslist-bcd-map.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH;;;;GAIG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAClC,MAAM,EAAE,QAAQ;IAChB,OAAO,EAAE,gBAAgB;IACzB,IAAI,EAAE,MAAM;IACZ,OAAO,EAAE,SAAS;IAClB,MAAM,EAAE,iBAAiB;IACzB,EAAE,EAAE,IAAI;IACR,KAAK,EAAE,OAAO;IACd,MAAM,EAAE,eAAe;IACvB,MAAM,EAAE,QAAQ;IAChB,OAAO,EAAE,YAAY;IACrB,OAAO,EAAE,yBAAyB;IAClC,OAAO,EAAE,iBAAiB;IAC1B,OAAO,EAAE,IAAI;IACb,EAAE,EAAE,IAAI;IACR,MAAM,EAAE,IAAI;IACZ,MAAM,EAAE,IAAI;IACZ,KAAK,EAAE,IAAI;IACX,KAAK,EAAE,IAAI;IACX,MAAM,EAAE,IAAI;
|
|
1
|
+
{"version":3,"file":"browserslist-bcd-map.js","sourceRoot":"","sources":["../../src/data/browserslist-bcd-map.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH;;;;GAIG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAClC,MAAM,EAAE,QAAQ;IAChB,OAAO,EAAE,gBAAgB;IACzB,IAAI,EAAE,MAAM;IACZ,OAAO,EAAE,SAAS;IAClB,MAAM,EAAE,iBAAiB;IACzB,EAAE,EAAE,IAAI;IACR,KAAK,EAAE,OAAO;IACd,MAAM,EAAE,eAAe;IACvB,MAAM,EAAE,QAAQ;IAChB,OAAO,EAAE,YAAY;IACrB,OAAO,EAAE,yBAAyB;IAClC,OAAO,EAAE,iBAAiB;IAC1B,OAAO,EAAE,IAAI;IACb,EAAE,EAAE,IAAI;IACR,MAAM,EAAE,IAAI;IACZ,MAAM,EAAE,IAAI;IACZ,KAAK,EAAE,IAAI;IACX,KAAK,EAAE,IAAI;IACX,MAAM,EAAE,IAAI;IACZ,IAAI,EAAE,QAAQ;CACkC,CAAC;AAKnD,uFAAuF;AACvF,MAAM,UAAU,kBAAkB,CAAC,KAAa;IAC9C,OAAO,eAAe,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,oBAAoB,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;AACrE,CAAC;AAED,oEAAoE;AACpE,MAAM,UAAU,eAAe,CAAC,KAAa;IAC3C,OAAO,MAAM,CAAC,MAAM,CAAC,oBAAoB,EAAE,KAAK,CAAC,CAAC;AACpD,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -31,7 +31,7 @@ await createApp({
|
|
|
31
31
|
resources: [],
|
|
32
32
|
prompts: [],
|
|
33
33
|
skills: 'skills',
|
|
34
|
-
instructions: 'Browser support and Baseline status for web platform features, served from bundled MDN browser-compat-data, web-features, and caniuse data — offline, no API key, no rate limit. Start at browsercompat_search_features when the feature key is unknown; browsercompat_get_feature returns the per-feature record and browsercompat_check_baseline answers ship-or-not across up to 20 features at once. Feature inputs accept a BCD key (css.selectors.has) or a web-features id (has); resolved_as identifies successful matches, and unresolved features come back as found: false rather than errors. A web-features id that spans several BCD keys, such as grid, is answered from web-features’ own release per Baseline core browser for the feature as a whole, with its compat_keys for a key-level follow-up. browsercompat_compare_support requires an explicit browserslist query and evaluates all of it on every call: verdicts, coverage, and totals describe the whole query, while the target rows cover
|
|
34
|
+
instructions: 'Browser support and Baseline status for web platform features, served from bundled MDN browser-compat-data, web-features, and caniuse data — offline, no API key, no rate limit. Start at browsercompat_search_features when the feature key is unknown; browsercompat_get_feature returns the per-feature record and browsercompat_check_baseline answers ship-or-not across up to 20 features at once. Feature inputs accept a BCD key (css.selectors.has) or a web-features id (has); resolved_as identifies successful matches, and unresolved features come back as found: false rather than errors. A web-features id that spans several BCD keys, such as grid, is answered from web-features’ own release per Baseline core browser for the feature as a whole, with its compat_keys for a key-level follow-up. browsercompat_compare_support requires an explicit browserslist query and evaluates all of it on every call: verdicts, coverage, and totals describe the whole query, while the target rows cover target_limit query targets per call (10 by default, up to 1000) — pass nextOffset as target_offset for the next page. A feature clears only when every target in the query was evaluated and supports it; a known failure yields fails even when another target is unchecked. With unchecked targets and no known failure, a compared feature is inconclusive. browsercompat_list_reference enumerates the namespaces, browser ids, browserslist agents, Baseline states, groups, and snapshots the other tools expect. Every response echoes data_version; the data is a package snapshot, so a feature that shipped in the last few weeks may lag.',
|
|
35
35
|
// Keyless public reference data — serve the full inventory without an auth gate.
|
|
36
36
|
landing: { requireAuth: false },
|
|
37
37
|
setup(core) {
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA;;;GAGG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,0BAA0B,EAAE,MAAM,qEAAqE,CAAC;AACjH,OAAO,EAAE,2BAA2B,EAAE,MAAM,sEAAsE,CAAC;AACnH,OAAO,EAAE,uBAAuB,EAAE,MAAM,kEAAkE,CAAC;AAC3G,OAAO,EAAE,0BAA0B,EAAE,MAAM,qEAAqE,CAAC;AACjH,OAAO,EAAE,2BAA2B,EAAE,MAAM,sEAAsE,CAAC;AACnH,OAAO,EAAE,kBAAkB,EAAE,MAAM,yCAAyC,CAAC;AAC7E,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAC9D,OAAO,EAAE,cAAc,EAAE,MAAM,iDAAiD,CAAC;AACjF,OAAO,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAC;AACvE,OAAO,EAAE,iBAAiB,EAAE,MAAM,uCAAuC,CAAC;AAE1E,MAAM,SAAS,CAAC;IACd,IAAI,EAAE,2BAA2B;IACjC,KAAK,EAAE,2BAA2B;IAClC,UAAU,EAAE;QACV,YAAY,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,QAAQ,EAAE;QACxD,iBAAiB,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,QAAQ,EAAE;KAC9D;IACD,KAAK,EAAE;QACL,0BAA0B;QAC1B,uBAAuB;QACvB,0BAA0B;QAC1B,2BAA2B;QAC3B,2BAA2B;KAC5B;IACD,SAAS,EAAE,EAAE;IACb,OAAO,EAAE,EAAE;IACX,MAAM,EAAE,QAAQ;IAChB,YAAY,EACV,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA;;;GAGG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,0BAA0B,EAAE,MAAM,qEAAqE,CAAC;AACjH,OAAO,EAAE,2BAA2B,EAAE,MAAM,sEAAsE,CAAC;AACnH,OAAO,EAAE,uBAAuB,EAAE,MAAM,kEAAkE,CAAC;AAC3G,OAAO,EAAE,0BAA0B,EAAE,MAAM,qEAAqE,CAAC;AACjH,OAAO,EAAE,2BAA2B,EAAE,MAAM,sEAAsE,CAAC;AACnH,OAAO,EAAE,kBAAkB,EAAE,MAAM,yCAAyC,CAAC;AAC7E,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAC9D,OAAO,EAAE,cAAc,EAAE,MAAM,iDAAiD,CAAC;AACjF,OAAO,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAC;AACvE,OAAO,EAAE,iBAAiB,EAAE,MAAM,uCAAuC,CAAC;AAE1E,MAAM,SAAS,CAAC;IACd,IAAI,EAAE,2BAA2B;IACjC,KAAK,EAAE,2BAA2B;IAClC,UAAU,EAAE;QACV,YAAY,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,QAAQ,EAAE;QACxD,iBAAiB,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,QAAQ,EAAE;KAC9D;IACD,KAAK,EAAE;QACL,0BAA0B;QAC1B,uBAAuB;QACvB,0BAA0B;QAC1B,2BAA2B;QAC3B,2BAA2B;KAC5B;IACD,SAAS,EAAE,EAAE;IACb,OAAO,EAAE,EAAE;IACX,MAAM,EAAE,QAAQ;IAChB,YAAY,EACV,glDAAglD;IACllD,iFAAiF;IACjF,OAAO,EAAE,EAAE,WAAW,EAAE,KAAK,EAAE;IAE/B,KAAK,CAAC,IAAI;QACR,wEAAwE;QACxE,4EAA4E;QAC5E,qBAAqB;QACrB,OAAO,CAAC,GAAG,CAAC;YACV,aAAa,EAAE;YACf,kBAAkB,EAAE;YACpB,iBAAiB,EAAE;YACnB,gBAAgB,EAAE;YAClB,cAAc,EAAE;SACjB,CAAC,CAAC,KAAK,CAAC,CAAC,KAAc,EAAE,EAAE;YAC1B,IAAI,CAAC,MAAM,CAAC,KAAK,CACf,wBAAwB,EACxB,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAC1D,CAAC;QACJ,CAAC,CAAC,CAAC;IACL,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -55,6 +55,7 @@ export declare const browsercompatCheckBaseline: import("@cyanheads/mcp-ts-core"
|
|
|
55
55
|
according_to: z.ZodArray<z.ZodString>;
|
|
56
56
|
}, z.core.$strip>>;
|
|
57
57
|
usage_percent_excluded: z.ZodOptional<z.ZodNumber>;
|
|
58
|
+
usage_percent_prefixed: z.ZodOptional<z.ZodNumber>;
|
|
58
59
|
usage_source: z.ZodOptional<z.ZodString>;
|
|
59
60
|
compat_keys: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
60
61
|
compat_keys_total: z.ZodOptional<z.ZodNumber>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"browsercompat-check-baseline.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/browsercompat-check-baseline.tool.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"browsercompat-check-baseline.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/browsercompat-check-baseline.tool.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AA6GjE,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkPrC,CAAC"}
|
|
@@ -15,6 +15,17 @@ import { markdownText } from '../../../utils/markdown-text.js';
|
|
|
15
15
|
import { BaselineSchema, batchCompatKeys, DiscouragedSchema, FEATURES_MAX, FEATURES_PER_CALL, formatBaselineLine, formatBatchCompatKeys, formatLimitingBrowser, formatOmittedFeatures, LimitingBrowserSchema, ResolvedAsSchema, } from './compat-shapes.js';
|
|
16
16
|
/** What the usage figure is a share of, stated on every result that carries one. */
|
|
17
17
|
const USAGE_SOURCE = 'Feature-level caniuse figure; reported for a BCD key only when it is the feature’s sole declared compat key. Percentage points of global traffic; untracked traffic is unknown.';
|
|
18
|
+
/** A BCD key segment spelled with a vendor prefix, such as `-webkit-text-stroke`. */
|
|
19
|
+
const VENDOR_PREFIXED_SEGMENT = /^-(?:webkit|moz|ms|o)-/;
|
|
20
|
+
/**
|
|
21
|
+
* True when the feature owns at least one compat key and every one names a
|
|
22
|
+
* vendor-prefixed identifier: the feature is spelled with the prefix, so
|
|
23
|
+
* caniuse's prefix-required support is support for it as written.
|
|
24
|
+
*/
|
|
25
|
+
function spelledWithPrefix(compatKeys) {
|
|
26
|
+
return (compatKeys.length > 0 &&
|
|
27
|
+
compatKeys.every((key) => key.split('.').some((segment) => VENDOR_PREFIXED_SEGMENT.test(segment))));
|
|
28
|
+
}
|
|
18
29
|
const ResultSchema = z.object({
|
|
19
30
|
input: z.string().describe('The feature string as the caller sent it.'),
|
|
20
31
|
found: z.boolean().describe('True when the feature string resolved to a tracked entry.'),
|
|
@@ -37,11 +48,15 @@ const ResultSchema = z.object({
|
|
|
37
48
|
usage_percent_excluded: z
|
|
38
49
|
.number()
|
|
39
50
|
.optional()
|
|
40
|
-
.describe('Feature-level percentage points of global traffic excluded. A resolved BCD key receives
|
|
51
|
+
.describe('Feature-level percentage points of global traffic excluded: browser versions where caniuse records no support that works by default, so partial, prefix-required, flag-gated, and unknown support all count as excluded. For a feature whose compat keys all name a vendor-prefixed identifier, such as -webkit-text-stroke, prefix-required support counts as supported. A resolved BCD key receives the figure only when it is the feature’s sole declared compat key. Absent without caniuse data — never zero in that case.'),
|
|
52
|
+
usage_percent_prefixed: z
|
|
53
|
+
.number()
|
|
54
|
+
.optional()
|
|
55
|
+
.describe('Of usage_percent_excluded, the percentage points of global traffic where the feature works only with a vendor prefix; writing the prefixed form recovers this share. Present whenever usage_percent_excluded is, and never larger.'),
|
|
41
56
|
usage_source: z
|
|
42
57
|
.string()
|
|
43
58
|
.optional()
|
|
44
|
-
.describe('What usage_percent_excluded
|
|
59
|
+
.describe('What usage_percent_excluded and usage_percent_prefixed are shares of. Present whenever those figures are.'),
|
|
45
60
|
compat_keys: z
|
|
46
61
|
.array(z.string())
|
|
47
62
|
.optional()
|
|
@@ -160,10 +175,12 @@ export const browsercompatCheckBaseline = tool('browsercompat_check_baseline', {
|
|
|
160
175
|
const discouraged = featureId === null ? undefined : baseline.discouraged(featureId);
|
|
161
176
|
const featureKeys = featureId === null ? [] : baseline.compatKeys(featureId);
|
|
162
177
|
const usageMatches = key === null || (featureKeys.length === 1 && featureKeys[0] === key);
|
|
163
|
-
const
|
|
178
|
+
const usage = featureId === null || !usageMatches
|
|
164
179
|
? undefined
|
|
165
|
-
: targets.excludedUsage(baseline.caniuseIds(featureId)
|
|
166
|
-
|
|
180
|
+
: targets.excludedUsage(baseline.caniuseIds(featureId), {
|
|
181
|
+
spelledWithPrefix: spelledWithPrefix(featureKeys),
|
|
182
|
+
});
|
|
183
|
+
if (usage !== undefined)
|
|
167
184
|
anyUsage = true;
|
|
168
185
|
results.push({
|
|
169
186
|
input: entry,
|
|
@@ -177,9 +194,13 @@ export const browsercompatCheckBaseline = tool('browsercompat_check_baseline', {
|
|
|
177
194
|
? {}
|
|
178
195
|
: { deprecated: leaf.status.deprecated, experimental: leaf.status.experimental }),
|
|
179
196
|
...(discouraged === undefined ? {} : { discouraged }),
|
|
180
|
-
...(
|
|
197
|
+
...(usage === undefined
|
|
181
198
|
? {}
|
|
182
|
-
: {
|
|
199
|
+
: {
|
|
200
|
+
usage_percent_excluded: usage.excludedPercent,
|
|
201
|
+
usage_percent_prefixed: usage.prefixedPercent,
|
|
202
|
+
usage_source: USAGE_SOURCE,
|
|
203
|
+
}),
|
|
183
204
|
...(compatKeys === undefined ? {} : batchCompatKeys(compatKeys)),
|
|
184
205
|
});
|
|
185
206
|
}
|
|
@@ -229,6 +250,9 @@ export const browsercompatCheckBaseline = tool('browsercompat_check_baseline', {
|
|
|
229
250
|
if (item.usage_percent_excluded !== undefined) {
|
|
230
251
|
lines.push(`**usage_percent_excluded:** ${item.usage_percent_excluded}%`);
|
|
231
252
|
}
|
|
253
|
+
if (item.usage_percent_prefixed !== undefined) {
|
|
254
|
+
lines.push(`**usage_percent_prefixed:** ${item.usage_percent_prefixed}%`);
|
|
255
|
+
}
|
|
232
256
|
if (item.usage_source !== undefined)
|
|
233
257
|
lines.push(`**usage_source:** ${markdownText(item.usage_source)}`);
|
|
234
258
|
if (item.compat_keys) {
|