@nac3/runtime 2.5.0-alpha.5 → 2.5.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 +1051 -887
- package/README.md +145 -145
- package/SPEC.md +1783 -1442
- package/contract-head.json +16 -0
- package/dist/cli-levels.json +214 -0
- package/dist/cli-url.mjs +751 -0
- package/dist/cli.js +232 -38
- package/dist/nac-chat-client.d.ts +5 -75
- package/dist/nac-v2-extensions.d.ts +71 -68
- package/dist/nac.browser.js +118 -31
- package/dist/nac.cjs +118 -31
- package/dist/nac.d.ts +140 -34
- package/dist/nac.mjs +118 -31
- package/package.json +19 -19
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"api_schema": 1,
|
|
3
|
+
"chain_head": "sha384-IEi9Sxq1e04WqL4ho3+BiKq6qXWJhYEkCKHfspmO9EUnPV9TiOD1dOTurNGc2pn9",
|
|
4
|
+
"entry_count": 3,
|
|
5
|
+
"generated_by": "scripts/build-contract-api.mjs",
|
|
6
|
+
"note": "The third of three independent witnesses of the contract chain head (audit N-24). This copy is immutable once published: npm does not allow a version to be republished, so a host that rewrites the chain cannot reach back and change it. If this head disagrees with the one the host serves for this version, do not trust the host. Present from 2.5.0 onward; earlier releases were published before this API existed.",
|
|
7
|
+
"protocol": "NAC3",
|
|
8
|
+
"published_at": "2026-10-26",
|
|
9
|
+
"runtime_version": "2.5.1",
|
|
10
|
+
"surface": "contract-head-witness",
|
|
11
|
+
"witnesses": {
|
|
12
|
+
"host": "api/index.json served by the web host (chain_head)",
|
|
13
|
+
"package": "this file, inside the published @nac3/runtime tarball",
|
|
14
|
+
"repository": "the git history of api/index.json in the source repository"
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
{
|
|
2
|
+
"generated_by": "runtime/build.mjs from SPEC.md section 8 via scripts/spec-levels.mjs",
|
|
3
|
+
"note": "Build input for the CLI validator. The published, signed copy of the same facts is api/v/<version>/levels.json.",
|
|
4
|
+
"version": "2.5.1",
|
|
5
|
+
"spec_version": "2.5",
|
|
6
|
+
"locales_required": [
|
|
7
|
+
"es",
|
|
8
|
+
"en",
|
|
9
|
+
"pt",
|
|
10
|
+
"fr",
|
|
11
|
+
"ja",
|
|
12
|
+
"zh",
|
|
13
|
+
"hi",
|
|
14
|
+
"ar",
|
|
15
|
+
"de",
|
|
16
|
+
"it"
|
|
17
|
+
],
|
|
18
|
+
"click_observable_roles": {
|
|
19
|
+
"action": [
|
|
20
|
+
"nac:action:succeeded",
|
|
21
|
+
"nac:action:failed"
|
|
22
|
+
],
|
|
23
|
+
"option": [
|
|
24
|
+
"nac:field:changed"
|
|
25
|
+
],
|
|
26
|
+
"tab": [
|
|
27
|
+
"nac:tab:activated"
|
|
28
|
+
],
|
|
29
|
+
"breadcrumb-item": [
|
|
30
|
+
"nac:breadcrumb:navigated"
|
|
31
|
+
],
|
|
32
|
+
"accordion-toggle": [
|
|
33
|
+
"nac:accordion:expanded",
|
|
34
|
+
"nac:accordion:collapsed"
|
|
35
|
+
],
|
|
36
|
+
"step": [
|
|
37
|
+
"nac:step:advanced"
|
|
38
|
+
],
|
|
39
|
+
"pagination-item": [
|
|
40
|
+
"nac:table:page_changed"
|
|
41
|
+
],
|
|
42
|
+
"confirm-button": [
|
|
43
|
+
"nac:confirm:resolved",
|
|
44
|
+
"nac:confirm:cancelled"
|
|
45
|
+
],
|
|
46
|
+
"field": [
|
|
47
|
+
"nac:field:changed"
|
|
48
|
+
],
|
|
49
|
+
"sort-control": [
|
|
50
|
+
"nac:table:sort_changed"
|
|
51
|
+
],
|
|
52
|
+
"filter-control": [
|
|
53
|
+
"nac:table:filter_changed"
|
|
54
|
+
]
|
|
55
|
+
},
|
|
56
|
+
"reporting": {
|
|
57
|
+
"note": "A level may be reported only when every machine_checkable requirement of that level and of every lower level passes. Requirements that no tool can decide are reported unverified, never assumed. A report that cites a level must also state how many of its requirements were decided."
|
|
58
|
+
},
|
|
59
|
+
"levels": [
|
|
60
|
+
{
|
|
61
|
+
"id": "nac3-conformance-level-1",
|
|
62
|
+
"level": 1,
|
|
63
|
+
"display_name": "NAC3 Conformance Level 1",
|
|
64
|
+
"legacy_display_name": "NAC-1",
|
|
65
|
+
"cumulative": false,
|
|
66
|
+
"requirements": [
|
|
67
|
+
{
|
|
68
|
+
"id": "L1-dd0bd4a0",
|
|
69
|
+
"text": "Every clickable widget that an agent should be able to operate carries `data-nac-id` and `data-nac-role`.",
|
|
70
|
+
"text_sha384": "sha384-j3EccnTJffrFyTGTBhktgDu5jcTnAu1msfFNT2wFDLyUsNksotJjbCzerlDLPTf8",
|
|
71
|
+
"machine_checkable": false,
|
|
72
|
+
"check": "human",
|
|
73
|
+
"decider": null,
|
|
74
|
+
"requires_drive": false,
|
|
75
|
+
"falsified_by": [],
|
|
76
|
+
"note": "A tool cannot decide which widgets an agent SHOULD be able to operate. It can report unannotated interactive elements as candidates; whether each one belongs in the contract is the author's call. Any validator that reports this requirement as passed is overreaching."
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"id": "L1-fc278d09",
|
|
80
|
+
"text": "Every `data-nac-role=\"action\"` element fires `nac:action:succeeded` after its side effect.",
|
|
81
|
+
"text_sha384": "sha384-6IyP2dxizNAvAGFY8nPrMQ6+0eKeerkXDFGJEF/aaFAVUtVSMFzxjuefOJpoviVy",
|
|
82
|
+
"machine_checkable": true,
|
|
83
|
+
"check": "behavioural",
|
|
84
|
+
"decider": "action_completion_events",
|
|
85
|
+
"requires_drive": true,
|
|
86
|
+
"falsified_by": [],
|
|
87
|
+
"note": "Decidable only by clicking every advertised action and waiting for its completion event. No finding code covers it: a validator must drive the page and report the ids that never completed."
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"id": "L1-bb23d963",
|
|
91
|
+
"text": "The page registers at least one plugin manifest via `NAC.register()`.",
|
|
92
|
+
"text_sha384": "sha384-h4xO/CCA+qJNBu7Xp2vJEylobWm0k2De7YIdEQI1EjeLJ78yk85ROMDQZEc4odIx",
|
|
93
|
+
"machine_checkable": true,
|
|
94
|
+
"check": "static",
|
|
95
|
+
"decider": "manifest_registered",
|
|
96
|
+
"requires_drive": false,
|
|
97
|
+
"falsified_by": [
|
|
98
|
+
"no_manifest"
|
|
99
|
+
],
|
|
100
|
+
"note": "Decidable by asking the runtime for its registered manifests after the page settles."
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
"id": "L1-1f78457d",
|
|
104
|
+
"text": "`NAC.click(id)` works for every advertised id.",
|
|
105
|
+
"text_sha384": "sha384-ndiKxR+qIPGNkI4eZwE158BPjbtXD+s1vZs1oZqSGl0mAaq/V/HpPHfC8Wb6d6SY",
|
|
106
|
+
"machine_checkable": true,
|
|
107
|
+
"check": "behavioural",
|
|
108
|
+
"decider": "click_resolves_and_lands",
|
|
109
|
+
"requires_drive": true,
|
|
110
|
+
"falsified_by": [
|
|
111
|
+
"missing_in_dom",
|
|
112
|
+
"plugin_not_mounted"
|
|
113
|
+
],
|
|
114
|
+
"note": "Resolution can be checked statically; that the click actually lands needs the page driven."
|
|
115
|
+
}
|
|
116
|
+
]
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
"id": "nac3-conformance-level-2",
|
|
120
|
+
"level": 2,
|
|
121
|
+
"display_name": "NAC3 Conformance Level 2",
|
|
122
|
+
"legacy_display_name": "NAC-2",
|
|
123
|
+
"cumulative": true,
|
|
124
|
+
"requirements": [
|
|
125
|
+
{
|
|
126
|
+
"id": "L2-f6a7aa72",
|
|
127
|
+
"text": "Registers `tabs[]`, `fields[]`, `actions[]` arrays explicitly in its manifest (not inferred from DOM).",
|
|
128
|
+
"text_sha384": "sha384-qfF53+n/AsHuAeu0Lfbo/3PoKFd+rlJL/xf88CO4qLLQban9Hdk1yEU4NlmbA2NS",
|
|
129
|
+
"machine_checkable": true,
|
|
130
|
+
"check": "static",
|
|
131
|
+
"decider": "manifest_declares_groups",
|
|
132
|
+
"requires_drive": false,
|
|
133
|
+
"falsified_by": [],
|
|
134
|
+
"note": "Decidable by reading the registered manifest: the three arrays are present and non-empty, rather than inferred from the DOM. No finding code reports their absence today. Read LITERALLY, as the validator must: the sentence names tabs[] / fields[] / actions[], which is the LEGACY manifest shape. Section 4 documents `elements: [{id, role}]` as the canonical one, and audit N-33 is the record of what reading only the legacy groups cost. A page written the documented way therefore fails this requirement as worded. The validator does not reinterpret the sentence -- that is what the hash-keyed review is for. Tracked as audit N-37."
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
"id": "L2-610ad4be",
|
|
138
|
+
"text": "Provides `label_i18n` covering all 10 NAC3 locales for every user-facing label.",
|
|
139
|
+
"text_sha384": "sha384-/SmujOyfyfbhHD/JB/DmJfkBS0w5F2RsJJZJ7uIH9d2ckfccP1kuFayhb/Ea/8te",
|
|
140
|
+
"machine_checkable": true,
|
|
141
|
+
"check": "static",
|
|
142
|
+
"decider": "label_i18n_covers_locales",
|
|
143
|
+
"requires_drive": false,
|
|
144
|
+
"falsified_by": [],
|
|
145
|
+
"note": "Decidable by comparing every label_i18n against the 10 required locales published in contract.json. Gap worth naming: no finding code reports incomplete locale coverage, so a page can miss this and no validator currently says so."
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
"id": "L2-cf01fc03",
|
|
149
|
+
"text": "Implements the v2.0 brownfield primitives: scope tree, ephemeral capture, autoRegister.watch.",
|
|
150
|
+
"text_sha384": "sha384-aUm/oI5UhZdQCNrxIO1olGuEaU46HASMg1Aga2tWVV27PrGIc9/g2PmCd3ht2mOG",
|
|
151
|
+
"machine_checkable": false,
|
|
152
|
+
"check": "human",
|
|
153
|
+
"decider": null,
|
|
154
|
+
"requires_drive": false,
|
|
155
|
+
"falsified_by": [],
|
|
156
|
+
"note": "A tool cannot distinguish a page that does not need the brownfield primitives from one that needed them and skipped them. Observing that they were called proves use, not conformance."
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
"id": "L2-984aa1a1",
|
|
160
|
+
"text": "Passes `NAC.validate_global({probe: false})` with zero `error`-severity findings.",
|
|
161
|
+
"text_sha384": "sha384-34d0xK6T07qc7Z5B6CTrQCBBTKqSa1mR4kLsJVHhoiGWOSPLlzuqUYahKUnQS6d9",
|
|
162
|
+
"machine_checkable": true,
|
|
163
|
+
"check": "static",
|
|
164
|
+
"decider": "validate_global_no_errors",
|
|
165
|
+
"requires_drive": false,
|
|
166
|
+
"falsified_by": [],
|
|
167
|
+
"note": "Decided today by the counts in the error-severity buckets of validate_global, because those findings carry no codes yet. When the buckets get codes this becomes falsified_by a code list."
|
|
168
|
+
}
|
|
169
|
+
]
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
"id": "nac3-conformance-level-3",
|
|
173
|
+
"level": 3,
|
|
174
|
+
"display_name": "NAC3 Conformance Level 3",
|
|
175
|
+
"legacy_display_name": "NAC-3",
|
|
176
|
+
"cumulative": true,
|
|
177
|
+
"requirements": [
|
|
178
|
+
{
|
|
179
|
+
"id": "L3-cc540e31",
|
|
180
|
+
"text": "Carries HMAC-signed manifests.",
|
|
181
|
+
"text_sha384": "sha384-SCzRE3480NmJW1pwZDYGdd4BND5eO/hWImjUMV3YijdWwMNaYeFVX9/0af9SSHAF",
|
|
182
|
+
"machine_checkable": true,
|
|
183
|
+
"check": "static",
|
|
184
|
+
"decider": "manifest_hmac_block_present",
|
|
185
|
+
"requires_drive": false,
|
|
186
|
+
"falsified_by": [],
|
|
187
|
+
"note": "Decidable only in the NEGATIVE, and that is the whole of it. A manifest that carries no provenance block definitively does not satisfy this, so the validator can FAIL it. Whether a block that IS present is authentic cannot be decided: the validator has no tenant secret, and -- measured while building the validator for audit N-18 -- the runtime exposes no manifest verification at all. NAC.sign_provenance / NAC.verify_provenance operate on an event's detail.source, never on a manifest, so there is nothing on the page that can say 'I verified this'. Tracked as audit N-36. Until that exists, this requirement reports fail or unverified and never pass, which is why no tool can assert level 3 today."
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
"id": "L3-788469c4",
|
|
191
|
+
"text": "Distinguishes `isTrusted` for security-sensitive verbs.",
|
|
192
|
+
"text_sha384": "sha384-yb/vat4c8XyXR9Y5SaMjmKW+TniJJnyahGXkGkvkP/6Bobff090sDLbKTxbV4q+D",
|
|
193
|
+
"machine_checkable": false,
|
|
194
|
+
"check": "human",
|
|
195
|
+
"decider": null,
|
|
196
|
+
"requires_drive": false,
|
|
197
|
+
"falsified_by": [],
|
|
198
|
+
"note": "Which verbs are security-sensitive is a product decision. A tool can report which actions refuse untrusted clicks; it cannot know which ones should."
|
|
199
|
+
},
|
|
200
|
+
{
|
|
201
|
+
"id": "L3-4bdc1b16",
|
|
202
|
+
"text": "Passes `NAC.validate_global({probe: true})` with zero findings.",
|
|
203
|
+
"text_sha384": "sha384-LsrEiYGyTKFsR2QbpYaAkZLnHunuHKScq0LLlRHPIRSw/7mAkVCKAtE1Mp5vAzQz",
|
|
204
|
+
"machine_checkable": true,
|
|
205
|
+
"check": "static",
|
|
206
|
+
"decider": "validate_global_no_findings",
|
|
207
|
+
"requires_drive": false,
|
|
208
|
+
"falsified_by": [],
|
|
209
|
+
"note": "Same call as the level 2 requirement above with a stricter threshold: zero findings of ANY severity. Gap measured while building the validator for audit N-18: validate_global() takes NO arguments and never reads `probe`, although SPEC.md section 10.1 publishes the signature as validate_global(opts?: {probe?: boolean}). So passing {probe: true} is accepted and ignored, and this check is exactly the level 2 one with a stricter threshold rather than the deeper probing the sentence implies. Tracked as audit N-35."
|
|
210
|
+
}
|
|
211
|
+
]
|
|
212
|
+
}
|
|
213
|
+
]
|
|
214
|
+
}
|