@cyanheads/browser-compat-mcp-server 0.2.0 → 0.3.0
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 +23 -10
- package/CLAUDE.md +23 -10
- package/Dockerfile +20 -7
- package/README.md +33 -36
- package/THIRD_PARTY_NOTICES.md +5 -6
- package/changelog/0.2.x/0.2.1.md +41 -0
- package/changelog/0.3.x/0.3.0.md +39 -0
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/mcp-server/tools/definitions/browsercompat-check-baseline.tool.d.ts +5 -2
- 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 +48 -21
- 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 +44 -3
- 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 +228 -87
- package/dist/mcp-server/tools/definitions/browsercompat-compare-support.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/browsercompat-get-feature.tool.d.ts +44 -13
- package/dist/mcp-server/tools/definitions/browsercompat-get-feature.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/browsercompat-get-feature.tool.js +67 -15
- package/dist/mcp-server/tools/definitions/browsercompat-get-feature.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 +14 -6
- package/dist/mcp-server/tools/definitions/browsercompat-search-features.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/compat-shapes.d.ts +128 -16
- package/dist/mcp-server/tools/definitions/compat-shapes.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/compat-shapes.js +179 -23
- package/dist/mcp-server/tools/definitions/compat-shapes.js.map +1 -1
- package/dist/services/baseline/baseline-service.d.ts +11 -3
- package/dist/services/baseline/baseline-service.d.ts.map +1 -1
- package/dist/services/baseline/baseline-service.js +29 -2
- package/dist/services/baseline/baseline-service.js.map +1 -1
- package/dist/services/baseline/types.d.ts +11 -0
- package/dist/services/baseline/types.d.ts.map +1 -1
- package/dist/services/bcd/bcd-service.d.ts +31 -12
- package/dist/services/bcd/bcd-service.d.ts.map +1 -1
- package/dist/services/bcd/bcd-service.js +157 -75
- package/dist/services/bcd/bcd-service.js.map +1 -1
- package/dist/services/bcd/types.d.ts +29 -4
- package/dist/services/bcd/types.d.ts.map +1 -1
- package/dist/services/search/search-service.d.ts +20 -2
- package/dist/services/search/search-service.d.ts.map +1 -1
- package/dist/services/search/search-service.js +115 -20
- package/dist/services/search/search-service.js.map +1 -1
- package/dist/services/targets/targets-service.d.ts +7 -10
- package/dist/services/targets/targets-service.d.ts.map +1 -1
- package/dist/services/targets/targets-service.js +18 -10
- package/dist/services/targets/targets-service.js.map +1 -1
- package/dist/services/targets/types.d.ts +6 -4
- package/dist/services/targets/types.d.ts.map +1 -1
- package/package.json +16 -15
- package/server.json +10 -24
- package/skills/browser-compat-guide/SKILL.md +48 -0
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: browser-compat-guide
|
|
3
|
+
description: Assess concrete web code against a project's browser target policy with browsercompat_* tools. Use for shipping decisions, choosing between feature-level and subfeature evidence, or diagnosing historical browser failures and support qualifiers.
|
|
4
|
+
license: Apache-2.0
|
|
5
|
+
metadata:
|
|
6
|
+
author: "cyanheads"
|
|
7
|
+
version: "1.0"
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## Scope
|
|
11
|
+
|
|
12
|
+
Use this guide when reviewing the browser requirements of code being written or changed. The server supplies bundled compatibility evidence; it does not run the application, test a polyfill, or fetch the prose behind an MDN or specification link. Use the returned links when the decision depends on behavior beyond the compatibility record.
|
|
13
|
+
|
|
14
|
+
## Identifiers
|
|
15
|
+
|
|
16
|
+
`browsercompat_search_features` yields BCD keys for individual APIs, attributes, values, and other subfeatures, and web-features ids for broader capabilities. Keep BCD key casing exactly as returned: `api.Crypto` and `api.crypto` are different entries.
|
|
17
|
+
|
|
18
|
+
Choose the identifier that matches the code's dependency. A feature id such as `grid` answers for the capability as a whole; it does not establish support for every key it owns. Use `browsercompat_get_feature` to inspect its `compat_keys`, then select the key for the actual behavior. Use `browsercompat_list_reference` to resolve browser and group vocabulary rather than translating ids by guesswork.
|
|
19
|
+
|
|
20
|
+
## Gates
|
|
21
|
+
|
|
22
|
+
1. Establish the project's browser target policy before making a project shipping claim. Baseline describes general availability across its core browsers; it does not replace the project's explicit targets. If the policy is unknown, report the available evidence and leave the project verdict unresolved.
|
|
23
|
+
2. Match the evidence to the code's behavior before accepting a feature-level answer. When a multi-key id cannot answer for the required browser or subfeature, inspect its keys and compare the relevant BCD key. Keep the target policy intact; excluding unchecked browsers to obtain a pass changes the question.
|
|
24
|
+
3. Separate lack of evidence from evidence of no support. A miss asks for identifier discovery; `not_mapped` means no Baseline mapping; `no_compat_data` means no per-browser compatibility record; an unchecked target remains unresolved. None alone proves that the browser cannot run the feature. If a filtered search finds nothing, broaden the filters before declaring the feature absent.
|
|
25
|
+
4. Assess deprecation and discouragement separately from availability. `all_widely_available` does not account for either advisory, and an omitted status field does not establish that a feature is recommended.
|
|
26
|
+
5. For an older target, inspect the statement behind its verdict before recommending a prefix, flag, or fallback. A current-browser support row can select a different statement from the one relevant to that historical release. Preserve partial-support qualifiers and version bounds when describing the result.
|
|
27
|
+
6. Complete the requested feature set before giving an aggregate decision: entries in `omitted_features` still need another call. Use whole-query verdicts and failure totals for the decision; page target rows only when their individual evidence is needed.
|
|
28
|
+
7. Carry the snapshot date or dataset versions into conclusions about recent browser changes. When the returned snapshot cannot establish a recent release's behavior, verify current primary evidence before giving a definitive answer.
|
|
29
|
+
|
|
30
|
+
## Core chain
|
|
31
|
+
|
|
32
|
+
Read the code to identify the exact API, property value, attribute, or subfeature it requires. Search for that behavior, inspect the candidate record, and confirm that its identifier describes the dependency. Compare those identifiers against the project's explicit browser policy. Report supported behavior, demonstrated failures, and unresolved coverage separately, with the returned evidence for each.
|
|
33
|
+
|
|
34
|
+
## Workflows
|
|
35
|
+
|
|
36
|
+
### Review a change for shipping
|
|
37
|
+
|
|
38
|
+
Use `browsercompat_check_baseline` for availability and advisories across the identified features, then `browsercompat_compare_support` for the project's targets. For a failure, use the per-feature `failing_ranges` to identify affected browser versions. Inspect target rows and the full feature record only where needed to decide whether the code requires a fallback, a different feature, or a stated browser restriction. A fallback needs its own compatibility assessment; this server does not prove that the application selects it correctly.
|
|
39
|
+
|
|
40
|
+
### Diagnose a historical browser failure
|
|
41
|
+
|
|
42
|
+
Compare the exact failing browser version and the BCD key for the failing behavior. Inspect the failing row's support statement, then use `browsercompat_get_feature` to read the browser's main row and `other_statements`, including notes and links. An earlier prefixed or flagged implementation may be there even when the main row describes clean support in the newest release. If the verdict is unknown, preserve that uncertainty rather than inferring an exact release from a bound.
|
|
43
|
+
|
|
44
|
+
### Express the target policy
|
|
45
|
+
|
|
46
|
+
Pass a self-contained browserslist expression. Use explicit browser versions for a reproduction and the project's actual expression for a shipping review. A comma or `or` forms a union (`chrome 100, firefox 100`); `and` intersects selections (`last 2 versions and > 0.5%`). Do not turn a union into an intersection to reduce failures. `defaults` is a browserslist policy, not a way to load the project's configuration.
|
|
47
|
+
|
|
48
|
+
Resolve configuration packages and custom usage statistics in the project's own environment before calling this server; it cannot read the caller's project configuration. Preserve the resulting browser/version targets when expressing them explicitly. Follow the tool's current query validation and recovery guidance.
|