@kinti/a11y-toolkit 0.0.0-stage → 5.21.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/README.md +28 -2
- package/bin/a11y-toolkit-mcp.cjs +3 -0
- package/bin/a11y-toolkit.cjs +3 -0
- package/lib/runner.cjs +36 -0
- package/package.json +34 -4
package/README.md
CHANGED
|
@@ -1,3 +1,29 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @kinti/a11y-toolkit (npm launcher)
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Zero-dependency WCAG 2.2 accessibility engine: **34 MCP tools + CLI**. This
|
|
4
|
+
npm package is a thin Node launcher — the engine itself is Python
|
|
5
|
+
(stdlib-only), run through [uv](https://docs.astral.sh/uv/) so nothing is
|
|
6
|
+
installed globally.
|
|
7
|
+
|
|
8
|
+
## Use
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
npx -y @kinti/a11y-toolkit audit --url https://example.com # CLI
|
|
12
|
+
npx -y @kinti/a11y-toolkit pair "#1f2328" "#fbfaf7" # contrast
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
As an MCP server (stdio):
|
|
16
|
+
|
|
17
|
+
```json
|
|
18
|
+
{ "mcpServers": { "a11y-toolkit": {
|
|
19
|
+
"command": "npx", "args": ["-y", "@kinti/a11y-toolkit", "a11y-toolkit-mcp"] } } }
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## Requirements
|
|
23
|
+
|
|
24
|
+
Python at runtime, installed on demand by [uv](https://docs.astral.sh/uv/)
|
|
25
|
+
(`curl -LsSf https://astral.sh/uv/install.sh | sh`). If uv is missing, the
|
|
26
|
+
launcher prints the exact one-liner for your OS.
|
|
27
|
+
|
|
28
|
+
Prefer pure Python? `uvx --from a11y-toolkit a11y-toolkit-mcp` is the same
|
|
29
|
+
thing without Node. Docs: [kinti/a11y-toolkit](https://github.com/kinti/a11y-toolkit).
|
package/lib/runner.cjs
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/* Shared launcher: runs the a11y-toolkit engine through uv (uvx).
|
|
3
|
+
* The engine is Python (stdlib-only); this wrapper only opens the Node
|
|
4
|
+
* door. If uv is missing, we say exactly how to get it — no cryptic
|
|
5
|
+
* spawn errors. */
|
|
6
|
+
const { spawn } = require('child_process');
|
|
7
|
+
|
|
8
|
+
const UVX = process.platform === 'win32' ? 'uvx.exe' : 'uvx';
|
|
9
|
+
// Pin de versión: el launcher SIEMPRE ejecuta la versión del motor con la
|
|
10
|
+
// que se publicó (la de este package.json, que versionar bumbea con cada
|
|
11
|
+
// release). Reproducible y auditable: nada de "descarga la última" en
|
|
12
|
+
// tiempo de ejecución.
|
|
13
|
+
const VERSION = require('../package.json').version;
|
|
14
|
+
|
|
15
|
+
function run(entry) {
|
|
16
|
+
const args = ['--from', `a11y-toolkit==${VERSION}`, entry, ...process.argv.slice(2)];
|
|
17
|
+
const child = spawn(UVX, args, { stdio: 'inherit' });
|
|
18
|
+
child.on('error', (e) => {
|
|
19
|
+
if (e.code === 'ENOENT') {
|
|
20
|
+
console.error('a11y-toolkit: "uvx" (uv) is not installed.');
|
|
21
|
+
console.error('');
|
|
22
|
+
console.error('The engine is Python; this launcher runs it via uv. Install uv (one line):');
|
|
23
|
+
console.error(' macOS/Linux: curl -LsSf https://astral.sh/uv/install.sh | sh');
|
|
24
|
+
console.error(' macOS (brew): brew install uv');
|
|
25
|
+
console.error(' Windows (PowerShell): powershell -c "irm https://astral.sh/uv/install.ps1 | iex"');
|
|
26
|
+
console.error(' or: pip install uv');
|
|
27
|
+
console.error('');
|
|
28
|
+
console.error('Then run this command again. https://github.com/kinti/a11y-toolkit');
|
|
29
|
+
process.exit(1);
|
|
30
|
+
}
|
|
31
|
+
throw e;
|
|
32
|
+
});
|
|
33
|
+
child.on('close', (code) => process.exit(code === null ? 1 : code));
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
module.exports = { run };
|
package/package.json
CHANGED
|
@@ -1,6 +1,36 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kinti/a11y-toolkit",
|
|
3
|
-
"version": "
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "5.21.0",
|
|
4
|
+
"description": "Zero-dependency WCAG 2.2 accessibility engine (34 MCP tools + CLI): audits, contrast fixing, SHA-256-sealed evidence packs, SARIF, EARL/ACT, CI ratchet. Node launcher; the engine itself is Python via uv.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+https://github.com/kinti/a11y-toolkit.git"
|
|
9
|
+
},
|
|
10
|
+
"homepage": "https://a11y.es",
|
|
11
|
+
"author": "Jes\u00fas Quintana",
|
|
12
|
+
"bin": {
|
|
13
|
+
"a11y-toolkit": "bin/a11y-toolkit.cjs",
|
|
14
|
+
"a11y-toolkit-mcp": "bin/a11y-toolkit-mcp.cjs"
|
|
15
|
+
},
|
|
16
|
+
"files": [
|
|
17
|
+
"bin/",
|
|
18
|
+
"lib/",
|
|
19
|
+
"README.md"
|
|
20
|
+
],
|
|
21
|
+
"keywords": [
|
|
22
|
+
"accessibility",
|
|
23
|
+
"wcag",
|
|
24
|
+
"wcag22",
|
|
25
|
+
"a11y",
|
|
26
|
+
"mcp",
|
|
27
|
+
"mcp-server",
|
|
28
|
+
"contrast",
|
|
29
|
+
"eaa",
|
|
30
|
+
"sarif",
|
|
31
|
+
"agent"
|
|
32
|
+
],
|
|
33
|
+
"engines": {
|
|
34
|
+
"node": ">=16"
|
|
35
|
+
}
|
|
36
|
+
}
|