@nac3/runtime 2.8.0 → 2.9.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/CHANGELOG.md +111 -0
- package/README.md +1 -0
- package/SPEC.md +45 -4
- package/contract-head.json +4 -4
- package/dist/cli-levels.json +2 -2
- package/dist/cli-lint.mjs +255 -6
- package/dist/cli.js +3 -3
- package/dist/nac-mcp-interop.browser.js +556 -0
- package/dist/nac-mcp-interop.cjs +561 -0
- package/dist/nac-mcp-interop.d.ts +57 -0
- package/dist/nac-mcp-interop.mjs +561 -0
- package/dist/nac-v2-extensions.d.ts +1 -1
- package/dist/nac.browser.js +33 -5
- package/dist/nac.cjs +33 -5
- package/dist/nac.d.ts +1 -1
- package/dist/nac.mjs +33 -5
- package/package.json +28 -10
package/dist/nac.cjs
CHANGED
|
@@ -7,7 +7,7 @@ const _g = typeof globalThis !== 'undefined' ? globalThis : (typeof window !== '
|
|
|
7
7
|
=====================================================================
|
|
8
8
|
|
|
9
9
|
AUTHORITATIVE VERSION CONSTANT: see the global.NAC export at the
|
|
10
|
-
bottom of this file. `version: '2.
|
|
10
|
+
bottom of this file. `version: '2.9.0', spec_version: '2.9'`
|
|
11
11
|
is the normative declaration. The dated changelog sections below are
|
|
12
12
|
historical notes; if they ever drift from the export, the export
|
|
13
13
|
wins.
|
|
@@ -1791,7 +1791,33 @@ const _g = typeof globalThis !== 'undefined' ? globalThis : (typeof window !== '
|
|
|
1791
1791
|
/* Structure. Every one of these is consumed by something: three
|
|
1792
1792
|
are queried by this runtime, `list` hosts reorder(), and
|
|
1793
1793
|
`canvas` is the door section 15.12 assigned to that surface. */
|
|
1794
|
-
'list', 'row', 'menu', 'label', 'value', 'paragraph', 'canvas'
|
|
1794
|
+
'list', 'row', 'menu', 'label', 'value', 'paragraph', 'canvas',
|
|
1795
|
+
|
|
1796
|
+
/* ---- v2.9.0: the document vocabulary (SPEC.md 1.2) ----------
|
|
1797
|
+
THE DEFECT THIS CLOSES, and it was this project's own site.
|
|
1798
|
+
Measured 2026-11-27 with the PUBLISHED validator over the
|
|
1799
|
+
whole tree: 45 677 elements across 526 pages carried a role
|
|
1800
|
+
the specification did not declare, and they were not written
|
|
1801
|
+
by hand -- a single producer emits them,
|
|
1802
|
+
scripts/build-spec-html.mjs, which renders the normative text
|
|
1803
|
+
itself as a NAC3 page. So the document that declares the
|
|
1804
|
+
vocabulary was being served marked up in words it did not
|
|
1805
|
+
declare, 354 times per page.
|
|
1806
|
+
|
|
1807
|
+
Why declaring them is the right half of the fix rather than
|
|
1808
|
+
un-painting them: these are document structure, and under
|
|
1809
|
+
section 19 reading a document is a capability, not a side
|
|
1810
|
+
effect of having a screen. An agent with no screen navigates
|
|
1811
|
+
prose by heading; code says the text inside must be read
|
|
1812
|
+
verbatim rather than paraphrased. list and paragraph were
|
|
1813
|
+
already declared, so list-item and heading missing was half a
|
|
1814
|
+
family, which is why the count was in the tens of thousands.
|
|
1815
|
+
|
|
1816
|
+
All five are read-only: they go in _CLICK_NO_EVENT_ROLES
|
|
1817
|
+
below, never in the click family map, because putting a
|
|
1818
|
+
read-only role in that map would make click() promise a
|
|
1819
|
+
completion nobody emits. */
|
|
1820
|
+
'heading', 'list-item', 'code', 'code-inline', 'note'
|
|
1795
1821
|
]);
|
|
1796
1822
|
|
|
1797
1823
|
/* ---- Declared aliases (SPEC.md 1.5) ---------------------------
|
|
@@ -3495,7 +3521,7 @@ const _g = typeof globalThis !== 'undefined' ? globalThis : (typeof window !== '
|
|
|
3495
3521
|
}
|
|
3496
3522
|
}
|
|
3497
3523
|
return {
|
|
3498
|
-
spec_version: '2.
|
|
3524
|
+
spec_version: '2.9',
|
|
3499
3525
|
canonical: Array.from(_KNOWN_ROLES_V22),
|
|
3500
3526
|
aliases: Object.assign({}, _ROLE_ALIASES),
|
|
3501
3527
|
registered: registered,
|
|
@@ -3795,6 +3821,8 @@ const _g = typeof globalThis !== 'undefined' ? globalThis : (typeof window !== '
|
|
|
3795
3821
|
'breadcrumb', 'pagination-control',
|
|
3796
3822
|
'avatar', 'presence-indicator', 'skeleton', 'empty-state',
|
|
3797
3823
|
'list', 'row', 'menu', 'label', 'value', 'paragraph', 'canvas',
|
|
3824
|
+
/* v2.9.0: the five document roles. Read-only, every one. */
|
|
3825
|
+
'heading', 'list-item', 'code', 'code-inline', 'note',
|
|
3798
3826
|
]);
|
|
3799
3827
|
|
|
3800
3828
|
/* v1.6.4: field types whose click() act on a value (toggle).
|
|
@@ -10215,8 +10243,8 @@ const _g = typeof globalThis !== 'undefined' ? globalThis : (typeof window !== '
|
|
|
10215
10243
|
|
|
10216
10244
|
global.NAC = {
|
|
10217
10245
|
__nac_v1_installed: true,
|
|
10218
|
-
version: '2.
|
|
10219
|
-
spec_version: '2.
|
|
10246
|
+
version: '2.9.0',
|
|
10247
|
+
spec_version: '2.9',
|
|
10220
10248
|
/* v2.2.0 (V22-01) -- strict validation toggle. When true,
|
|
10221
10249
|
NAC.register throws on findings (manifest_role_unknown,
|
|
10222
10250
|
tab_id_manifest_role_drift, manifest_dom_role_mismatch).
|
package/dist/nac.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// Generated by build.mjs -- do not edit. Source: js/nac.js
|
|
2
|
-
// Core runtime surface for @nac3/runtime v2.
|
|
2
|
+
// Core runtime surface for @nac3/runtime v2.9.0.
|
|
3
3
|
// The data-table (dt_*) + brownfield primitives live in the
|
|
4
4
|
// extensions entry: import '@nac3/runtime/extensions' and see
|
|
5
5
|
// the NACExtensions interface in nac-v2-extensions.d.ts.
|
package/dist/nac.mjs
CHANGED
|
@@ -7,7 +7,7 @@ const _g = typeof globalThis !== 'undefined' ? globalThis : (typeof window !== '
|
|
|
7
7
|
=====================================================================
|
|
8
8
|
|
|
9
9
|
AUTHORITATIVE VERSION CONSTANT: see the global.NAC export at the
|
|
10
|
-
bottom of this file. `version: '2.
|
|
10
|
+
bottom of this file. `version: '2.9.0', spec_version: '2.9'`
|
|
11
11
|
is the normative declaration. The dated changelog sections below are
|
|
12
12
|
historical notes; if they ever drift from the export, the export
|
|
13
13
|
wins.
|
|
@@ -1791,7 +1791,33 @@ const _g = typeof globalThis !== 'undefined' ? globalThis : (typeof window !== '
|
|
|
1791
1791
|
/* Structure. Every one of these is consumed by something: three
|
|
1792
1792
|
are queried by this runtime, `list` hosts reorder(), and
|
|
1793
1793
|
`canvas` is the door section 15.12 assigned to that surface. */
|
|
1794
|
-
'list', 'row', 'menu', 'label', 'value', 'paragraph', 'canvas'
|
|
1794
|
+
'list', 'row', 'menu', 'label', 'value', 'paragraph', 'canvas',
|
|
1795
|
+
|
|
1796
|
+
/* ---- v2.9.0: the document vocabulary (SPEC.md 1.2) ----------
|
|
1797
|
+
THE DEFECT THIS CLOSES, and it was this project's own site.
|
|
1798
|
+
Measured 2026-11-27 with the PUBLISHED validator over the
|
|
1799
|
+
whole tree: 45 677 elements across 526 pages carried a role
|
|
1800
|
+
the specification did not declare, and they were not written
|
|
1801
|
+
by hand -- a single producer emits them,
|
|
1802
|
+
scripts/build-spec-html.mjs, which renders the normative text
|
|
1803
|
+
itself as a NAC3 page. So the document that declares the
|
|
1804
|
+
vocabulary was being served marked up in words it did not
|
|
1805
|
+
declare, 354 times per page.
|
|
1806
|
+
|
|
1807
|
+
Why declaring them is the right half of the fix rather than
|
|
1808
|
+
un-painting them: these are document structure, and under
|
|
1809
|
+
section 19 reading a document is a capability, not a side
|
|
1810
|
+
effect of having a screen. An agent with no screen navigates
|
|
1811
|
+
prose by heading; code says the text inside must be read
|
|
1812
|
+
verbatim rather than paraphrased. list and paragraph were
|
|
1813
|
+
already declared, so list-item and heading missing was half a
|
|
1814
|
+
family, which is why the count was in the tens of thousands.
|
|
1815
|
+
|
|
1816
|
+
All five are read-only: they go in _CLICK_NO_EVENT_ROLES
|
|
1817
|
+
below, never in the click family map, because putting a
|
|
1818
|
+
read-only role in that map would make click() promise a
|
|
1819
|
+
completion nobody emits. */
|
|
1820
|
+
'heading', 'list-item', 'code', 'code-inline', 'note'
|
|
1795
1821
|
]);
|
|
1796
1822
|
|
|
1797
1823
|
/* ---- Declared aliases (SPEC.md 1.5) ---------------------------
|
|
@@ -3495,7 +3521,7 @@ const _g = typeof globalThis !== 'undefined' ? globalThis : (typeof window !== '
|
|
|
3495
3521
|
}
|
|
3496
3522
|
}
|
|
3497
3523
|
return {
|
|
3498
|
-
spec_version: '2.
|
|
3524
|
+
spec_version: '2.9',
|
|
3499
3525
|
canonical: Array.from(_KNOWN_ROLES_V22),
|
|
3500
3526
|
aliases: Object.assign({}, _ROLE_ALIASES),
|
|
3501
3527
|
registered: registered,
|
|
@@ -3795,6 +3821,8 @@ const _g = typeof globalThis !== 'undefined' ? globalThis : (typeof window !== '
|
|
|
3795
3821
|
'breadcrumb', 'pagination-control',
|
|
3796
3822
|
'avatar', 'presence-indicator', 'skeleton', 'empty-state',
|
|
3797
3823
|
'list', 'row', 'menu', 'label', 'value', 'paragraph', 'canvas',
|
|
3824
|
+
/* v2.9.0: the five document roles. Read-only, every one. */
|
|
3825
|
+
'heading', 'list-item', 'code', 'code-inline', 'note',
|
|
3798
3826
|
]);
|
|
3799
3827
|
|
|
3800
3828
|
/* v1.6.4: field types whose click() act on a value (toggle).
|
|
@@ -10215,8 +10243,8 @@ const _g = typeof globalThis !== 'undefined' ? globalThis : (typeof window !== '
|
|
|
10215
10243
|
|
|
10216
10244
|
global.NAC = {
|
|
10217
10245
|
__nac_v1_installed: true,
|
|
10218
|
-
version: '2.
|
|
10219
|
-
spec_version: '2.
|
|
10246
|
+
version: '2.9.0',
|
|
10247
|
+
spec_version: '2.9',
|
|
10220
10248
|
/* v2.2.0 (V22-01) -- strict validation toggle. When true,
|
|
10221
10249
|
NAC.register throws on findings (manifest_role_unknown,
|
|
10222
10250
|
tab_id_manifest_role_drift, manifest_dom_role_mismatch).
|
package/package.json
CHANGED
|
@@ -1,17 +1,27 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nac3/runtime",
|
|
3
|
-
"version": "2.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "2.9.0",
|
|
4
|
+
"description": "a few HTML attributes that let AI agents, voice runners, RPA bots and screen readers drive any web UI by name instead of by CSS selector",
|
|
5
5
|
"keywords": [
|
|
6
|
+
"nac-spec",
|
|
7
|
+
"nac3",
|
|
6
8
|
"nac",
|
|
7
9
|
"native-agent-contract",
|
|
8
|
-
"agent",
|
|
9
|
-
"
|
|
10
|
-
"
|
|
11
|
-
"automation",
|
|
10
|
+
"agent-protocol",
|
|
11
|
+
"ai-agents",
|
|
12
|
+
"agentic-ai",
|
|
13
|
+
"browser-automation",
|
|
14
|
+
"web-automation",
|
|
15
|
+
"ui-automation",
|
|
16
|
+
"rpa",
|
|
17
|
+
"voice-ui",
|
|
18
|
+
"screen-reader",
|
|
19
|
+
"a11y",
|
|
12
20
|
"accessibility",
|
|
13
|
-
"
|
|
21
|
+
"semantic-html",
|
|
22
|
+
"html-attributes",
|
|
14
23
|
"ui-contract",
|
|
24
|
+
"specification",
|
|
15
25
|
"yujin"
|
|
16
26
|
],
|
|
17
27
|
"homepage": "https://yujin.app/nac-spec/",
|
|
@@ -50,6 +60,13 @@
|
|
|
50
60
|
"browser": "./dist/nac-chat-client.browser.js",
|
|
51
61
|
"default": "./dist/nac-chat-client.mjs"
|
|
52
62
|
},
|
|
63
|
+
"./mcp-interop": {
|
|
64
|
+
"types": "./dist/nac-mcp-interop.d.ts",
|
|
65
|
+
"import": "./dist/nac-mcp-interop.mjs",
|
|
66
|
+
"require": "./dist/nac-mcp-interop.cjs",
|
|
67
|
+
"browser": "./dist/nac-mcp-interop.browser.js",
|
|
68
|
+
"default": "./dist/nac-mcp-interop.mjs"
|
|
69
|
+
},
|
|
53
70
|
"./package.json": "./package.json"
|
|
54
71
|
},
|
|
55
72
|
"bin": {
|
|
@@ -67,7 +84,7 @@
|
|
|
67
84
|
],
|
|
68
85
|
"scripts": {
|
|
69
86
|
"build": "node ./build.mjs",
|
|
70
|
-
"test": "node ./test/smoke.mjs && node ./test/lint-rules.mjs && node ./test/cli-harness.mjs && node ./test/battery-coverage.mjs && node ./test/v22.mjs && node ./test/v23-invoke.mjs && node ./test/v23-shadow.mjs && node ./test/v23-capabilities.mjs && node ./test/v23-editor.mjs && node ./test/v23-interop.mjs && node ./test/roles-click.mjs && node ./test/role-vocabulary.mjs && node ./test/autoregister-roles.mjs && node ./test/drag-reorder.mjs && node ./test/options-resolver.mjs && node ./test/i18n-catalog.mjs && node ./test/visibility-editor.mjs && node ./test/data-table.mjs && node ./test/narrate-context.mjs && node ./test/effect-trust.mjs && node ./test/stage1-audio.mjs && node ./test/stage2-disambiguation.mjs && node ./test/stage3-backend.mjs && node ./test/stage4-calls.mjs && node ./test/stage6-ack.mjs && node ./test/stage6b-longtail.mjs && node ./test/stage7-strict-resolution.mjs && node ./test/stage8-plugin-extension.mjs && node ./test/stage9-sync-plugin.mjs && node ./test/stage10-authority-sudo.mjs && node ./test/stage11-plugin-id-dedup.mjs && node ./test/stage12-snapshot-versioning.mjs && node ./test/stage13-plugin-hooks.mjs && node ./test/manifest-hmac.mjs && node ./test/dispatch-source.mjs && node ./test/frozen-promises.mjs && node ./test/undrivable-gate.mjs && node ./test/headless-profile.mjs",
|
|
87
|
+
"test": "node ./test/smoke.mjs && node ./test/lint-rules.mjs && node ./test/cli-harness.mjs && node ./test/battery-coverage.mjs && node ./test/v22.mjs && node ./test/v23-invoke.mjs && node ./test/v23-shadow.mjs && node ./test/v23-capabilities.mjs && node ./test/v23-editor.mjs && node ./test/v23-interop.mjs && node ./test/roles-click.mjs && node ./test/role-vocabulary.mjs && node ./test/autoregister-roles.mjs && node ./test/drag-reorder.mjs && node ./test/options-resolver.mjs && node ./test/i18n-catalog.mjs && node ./test/visibility-editor.mjs && node ./test/data-table.mjs && node ./test/narrate-context.mjs && node ./test/effect-trust.mjs && node ./test/stage1-audio.mjs && node ./test/stage2-disambiguation.mjs && node ./test/stage3-backend.mjs && node ./test/stage4-calls.mjs && node ./test/stage6-ack.mjs && node ./test/stage6b-longtail.mjs && node ./test/stage7-strict-resolution.mjs && node ./test/stage8-plugin-extension.mjs && node ./test/stage9-sync-plugin.mjs && node ./test/stage10-authority-sudo.mjs && node ./test/stage11-plugin-id-dedup.mjs && node ./test/stage12-snapshot-versioning.mjs && node ./test/stage13-plugin-hooks.mjs && node ./test/manifest-hmac.mjs && node ./test/dispatch-source.mjs && node ./test/frozen-promises.mjs && node ./test/undrivable-gate.mjs && node ./test/headless-profile.mjs && node ./test/mcp-interop-entry.mjs",
|
|
71
88
|
"test:smoke": "node ./test/smoke.mjs",
|
|
72
89
|
"test:lint-rules": "node ./test/lint-rules.mjs",
|
|
73
90
|
"test:cli-harness": "node ./test/cli-harness.mjs",
|
|
@@ -92,7 +109,7 @@
|
|
|
92
109
|
"test:stage12": "node ./test/stage12-snapshot-versioning.mjs",
|
|
93
110
|
"test:stage13": "node ./test/stage13-plugin-hooks.mjs",
|
|
94
111
|
"prepublishOnly": "npm run build && node ../scripts/check-version-coherence.mjs && npm test",
|
|
95
|
-
"postpublish": "node ../scripts/verify-npm-publication.mjs --mode post-publish --retries
|
|
112
|
+
"postpublish": "node ../scripts/verify-npm-publication.mjs --mode post-publish --retries 40 --retry-delay 15000",
|
|
96
113
|
"test:roles": "node ./test/roles-click.mjs",
|
|
97
114
|
"test:role-vocabulary": "node ./test/role-vocabulary.mjs",
|
|
98
115
|
"test:autoregister-roles": "node ./test/autoregister-roles.mjs",
|
|
@@ -107,7 +124,8 @@
|
|
|
107
124
|
"test:source": "node ./test/dispatch-source.mjs",
|
|
108
125
|
"test:frozen": "node ./test/frozen-promises.mjs",
|
|
109
126
|
"test:undrivable": "node ./test/undrivable-gate.mjs",
|
|
110
|
-
"test:headless": "node ./test/headless-profile.mjs"
|
|
127
|
+
"test:headless": "node ./test/headless-profile.mjs",
|
|
128
|
+
"test:mcp-interop": "node ./test/mcp-interop-entry.mjs"
|
|
111
129
|
},
|
|
112
130
|
"engines": {
|
|
113
131
|
"node": ">=18"
|