@nac3/runtime 2.6.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/SPEC.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # NAC3 -- Native Agent Contract
2
2
 
3
- **Version:** 2.6.0 (stable -- the v2.5 surface plus the v2.6 plugin extension hooks: discovery, self-description, emitter-listen)
3
+ **Version:** 2.9.0 (stable -- the v2.5 surface, the v2.6 plugin extension hooks (discovery, self-description, emitter-listen), the v2.7 authenticity surface (HMAC-verified manifests, dispatch provenance, the probing validator, the surface doors of 15.12, the headless profile), the v2.8 vocabulary (45 surface roles, 7 declared aliases, the complete event table of 6.4, and `register_role`) and the v2.9 document vocabulary: the five roles this project's own generated pages had been painting since before the vocabulary existed)
4
4
  **Status:** Stable release. The npm dist-tag `latest` points here; section 9.1 states what that guarantees and what a prerelease does not. This document states its version in exactly one place, the line above. The shipped RFCs and their Layer 2 + Layer 3 evidence are listed in `README.md` and `runtime/CHANGELOG.md`.
5
5
  **License:** Apache-2.0
6
6
  **Editor:** Yujin (yujin.app)
@@ -32,8 +32,12 @@ system.
32
32
 
33
33
  ## 1. Roles
34
34
 
35
- Every agent-relevant DOM element carries `data-nac-role`. The
36
- canonical roles are:
35
+ Every agent-relevant DOM element carries `data-nac-role`.
36
+
37
+ ### 1.1 Core roles
38
+
39
+ The roles below are the vocabulary the protocol has declared since
40
+ v1.0, plus the additions each row notes:
37
41
 
38
42
  | Role | Meaning | Example |
39
43
  |------|---------|---------|
@@ -58,6 +62,212 @@ canonical roles are:
58
62
  | `drop-target` | A place a `draggable` can be dropped (since 1.6.2). | `<ul data-nac-role="drop-target">` |
59
63
  | `button` | **Tolerated, not recommended.** A legacy button that only needs to be clickable, with no action contract. The runtime treats it as `action`. Prefer `action` with an explicit `data-nac-action`. | `<button data-nac-role="button">` |
60
64
 
65
+ ### 1.2 Surface roles (v2.8)
66
+
67
+ The twenty roles above are the vocabulary the protocol declared
68
+ through v2.7. They are not the vocabulary the protocol *used*:
69
+ measured against this tree on 2026-11-25, **67 distinct roles were
70
+ in use and 52 of them were not declared anywhere** -- not in this
71
+ table, not in the runtime's known-role set, not in the click
72
+ completion map. The runtime already emitted 121 distinct `nac:*`
73
+ events, of which this document named 16.
74
+
75
+ That gap was not cosmetic. `NAC.click()` picks the event it waits
76
+ for from the role on the target, and a role it does not know falls
77
+ back to the `action` family -- so a click on a widget that answers
78
+ with `nac:map:marker_selected` waited five seconds for
79
+ `nac:action:succeeded`, timed out, and reported that *the widget*
80
+ had not acknowledged. The protocol blamed the page for not speaking
81
+ a word the protocol did not have.
82
+
83
+ The roles below close that gap. They are **additive**: nothing in
84
+ the table above changed meaning, and section 12 promise 3 (the
85
+ canonical role set never shrinks) holds. Section 1.5 declares the
86
+ seven legacy spellings this tree had grown, each mapped to the
87
+ canonical role it means, so no markup that worked before stops
88
+ working.
89
+
90
+ **Maps.** The interior of a map is drawn, not marked up. The host
91
+ addresses what it owns; the pixels stay out of reach (section
92
+ 15.12).
93
+
94
+ | Role | Meaning | Example |
95
+ |------|---------|---------|
96
+ | `map` | A map viewport. Its own state (centre, zoom) is readable; its interior is reached through the elements below, never by coordinates in an id. | `<div data-nac-role="map">` |
97
+ | `map-layer` | A layer of a map that can be turned on and off. | `<li data-nac-role="map-layer">` |
98
+ | `map-marker` | A point of interest on a map. | `<button data-nac-role="map-marker">` |
99
+
100
+ **Charts.** The one family where what an agent needs is to *read*,
101
+ not to press. `chart-series` is the operable part; `chart-point`
102
+ carries the datum and is read-only.
103
+
104
+ | Role | Meaning | Example |
105
+ |------|---------|---------|
106
+ | `chart` | A chart host. | `<figure data-nac-role="chart">` |
107
+ | `chart-series` | One series of a chart. Clickable: toggling a series is the operation a chart offers. | `<li data-nac-role="chart-series">` |
108
+ | `chart-point` | One datum of a series. Read-only: it is addressable so an agent can read a value it would otherwise have to infer from pixels. | `<circle data-nac-role="chart-point">` |
109
+
110
+ **Calendar.**
111
+
112
+ | Role | Meaning | Example |
113
+ |------|---------|---------|
114
+ | `calendar` | A calendar host. Carries its own view state (month / week / day), which changes without any element being operated. | `<div data-nac-role="calendar">` |
115
+ | `calendar-event` | An entry on a calendar. | `<li data-nac-role="calendar-event">` |
116
+
117
+ **Tree.**
118
+
119
+ | Role | Meaning | Example |
120
+ |------|---------|---------|
121
+ | `tree` | A tree host. | `<ul data-nac-role="tree">` |
122
+ | `tree-node` | A node of a tree. Its expanded state is `data-nac-state`, not a separate role. | `<li data-nac-role="tree-node">` |
123
+ | `tree-children` | The container holding the children of a `tree-node`. It exists as a role because a collapsed subtree is present in the DOM and not operable, which is exactly what an agent has to be able to tell. | `<ul data-nac-role="tree-children">` |
124
+
125
+ **Timeline.** A timeline is usually paginated, and that is why its
126
+ load events are normative (section 6.4): an agent that cannot hear
127
+ `nac:timeline:loaded_more` reports the first page as the whole
128
+ record.
129
+
130
+ | Role | Meaning | Example |
131
+ |------|---------|---------|
132
+ | `timeline` | A chronological feed. | `<ol data-nac-role="timeline">` |
133
+ | `timeline-item` | One entry of a timeline. | `<li data-nac-role="timeline-item">` |
134
+
135
+ **Carousel.** The only family where the protocol has to talk about
136
+ time: a carousel with autoplay changes without anyone touching it,
137
+ so what an agent read a moment ago can stop being true. Section 6.4
138
+ keeps `nac:carousel:advanced` (the verb completed) distinct from
139
+ `nac:carousel:slide_changed` (the state moved, possibly on its
140
+ own).
141
+
142
+ | Role | Meaning | Example |
143
+ |------|---------|---------|
144
+ | `carousel` | A slide container that MAY advance on its own. | `<div data-nac-role="carousel">` |
145
+ | `carousel-slide` | One slide of a carousel. | `<li data-nac-role="carousel-slide">` |
146
+
147
+ **Live regions.** What the agent did not ask for and has to learn
148
+ about anyway. These map one-to-one onto ARIA, which is deliberate:
149
+ `docs/ACCESSIBILITY.md` claims that what makes an interface
150
+ navigable by an agent makes it navigable by a screen reader, and
151
+ this is where that stops being a sentence.
152
+
153
+ | Role | Meaning | Example |
154
+ |------|---------|---------|
155
+ | `status` | A short statement of current state, replaced in place (ARIA `role="status"`, polite). | `<span data-nac-role="status">` |
156
+ | `log` | An append-only record where new entries arrive at the end (ARIA `role="log"`). | `<div data-nac-role="log">` |
157
+ | `toast` | A transient notification that disappears on its own. Clicking it dismisses it. | `<div data-nac-role="toast">` |
158
+ | `toast-region` | The container a `toast` is appended to. Same element/container pairing as `data-table` and `row`. | `<div data-nac-role="toast-region">` |
159
+ | `banner` | A notification that persists until dismissed. | `<div data-nac-role="banner">` |
160
+ | `feedback` | The outcome of one operation, attached to the control that produced it: a state, a message and an optional error. Narrower than `status` and read by `NAC.read_feedback()`, which is why it is its own role. | `<span data-nac-role="feedback">` |
161
+
162
+ **Overlays.** An overlay creates the one problem an agent cannot
163
+ work around on its own: what was behind it is still in the DOM and
164
+ is no longer operable. An overlay host SHOULD declare
165
+ `undrivable_until` (section 19.1) on the entries it occludes, so a
166
+ refusal names the gate instead of reporting a hidden element.
167
+
168
+ | Role | Meaning | Example |
169
+ |------|---------|---------|
170
+ | `modal` | An overlay that occludes the whole surface behind it. `confirm-dialog` is the special case of a modal that asks a confirmation; `modal` is the general one. | `<div data-nac-role="modal">` |
171
+ | `drawer` | An edge-anchored overlay. The only role with an intermediate state of its own (`peek`: partially open, and what is operable in that state is up to the host to declare). | `<aside data-nac-role="drawer">` |
172
+ | `bottom-sheet` | A bottom-anchored overlay. | `<div data-nac-role="bottom-sheet">` |
173
+
174
+ **Controls whose value is not their text.** A combobox shows
175
+ "Argentina" and sends `AR`; a slider shows a position and sends a
176
+ number. These declare that the field has resolvable options or a
177
+ numeric range, which is what tells an agent to go through
178
+ `NAC.options()` / `NAC.set_options_resolver()` (section 5.1.3)
179
+ instead of typing what it sees.
180
+
181
+ | Role | Meaning | Example |
182
+ |------|---------|---------|
183
+ | `combobox` | A field whose displayed text is not its value. | `<input data-nac-role="combobox">` |
184
+ | `listbox` | A list of options whose selection is the value. Its children are `option`. | `<ul data-nac-role="listbox">` |
185
+ | `slider` | A continuous value control. | `<input type="range" data-nac-role="slider">` |
186
+ | `richtext` | A rich-text editor. Its operations (format, link, mention) are not value edits and have their own events. | `<div data-nac-role="richtext">` |
187
+
188
+ **Tabs, steps and accordions: the containers the protocol was
189
+ missing.** Each of these three families declared its *control* and
190
+ not its *content*, so an agent could activate a tab and had no way
191
+ to name what appeared.
192
+
193
+ | Role | Meaning | Example |
194
+ |------|---------|---------|
195
+ | `tablist` | The container of `tab` controls (ARIA `role="tablist"`). | `<div data-nac-role="tablist">` |
196
+ | `tabpanel` | The content a `tab` reveals (ARIA `role="tabpanel"`). | `<section data-nac-role="tabpanel">` |
197
+ | `stepper` | The container of `step` indicators. | `<ol data-nac-role="stepper">` |
198
+ | `accordion-section` | The content an `accordion-toggle` reveals. | `<section data-nac-role="accordion-section">` |
199
+
200
+ **Navigation containers.** Measured, not assumed: in this tree
201
+ `breadcrumb` sits on a `<nav>` and `pagination-control` on the
202
+ pager's container, so neither was a rival spelling of
203
+ `breadcrumb-item` / `pagination-item`. They were the containers,
204
+ and the containers were never declared.
205
+
206
+ | Role | Meaning | Example |
207
+ |------|---------|---------|
208
+ | `breadcrumb` | The container of `breadcrumb-item` hops. | `<nav data-nac-role="breadcrumb">` |
209
+ | `pagination-control` | The container of `pagination-item` controls. | `<div data-nac-role="pagination-control">` |
210
+
211
+ **Identity, and the state of the interface itself.** The last two
212
+ are the ones that matter most to an agent and were hardest to say:
213
+ the difference between "it has not loaded yet", "there is nothing
214
+ here, and that is not an error" and "it failed" is the difference
215
+ between waiting, moving on, and reporting a problem. None of the
216
+ four is clickable, and none of them is in the click completion map
217
+ -- putting them there would make `click()` promise a completion
218
+ nobody emits.
219
+
220
+ | Role | Meaning | Example |
221
+ |------|---------|---------|
222
+ | `avatar` | The visual identity of a person or account. Read-only. | `<span data-nac-role="avatar">` |
223
+ | `presence-indicator` | The availability of a person or account. Changes without being operated; its value is in `data-nac-state`. | `<span data-nac-role="presence-indicator">` |
224
+ | `skeleton` | A placeholder standing where real content will be. Means **not loaded yet**, never "empty". | `<div data-nac-role="skeleton">` |
225
+ | `empty-state` | The element shown in place of content when there is none. Means **nothing to show, and this is not an error**. | `<div data-nac-role="empty-state">` |
226
+
227
+ **Structure.** The last group is the one where the work was mostly
228
+ in what NOT to declare (section 1.5 has the discards). These seven
229
+ stayed because each one is consumed by something: three are queried
230
+ by the reference runtime itself, one is the host of a documented
231
+ verb, and one is the door section 15.12 decided on.
232
+
233
+ | Role | Meaning | Example |
234
+ |------|---------|---------|
235
+ | `list` | An ordered collection. The host of `NAC.reorder()`, whose completion event is `nac:list:reordered`. | `<ul data-nac-role="list">` |
236
+ | `row` | One row of a `data-table`. Read by the reference runtime to place cell ids. | `<tr data-nac-role="row">` |
237
+ | `menu` | A popup menu. **Not a `navigation` landmark**: a menu is transient and occludes, a landmark is permanent. | `<div data-nac-role="menu">` |
238
+ | `label` | The human name of a control. Read by the reference runtime when deriving a label for an element that has none. | `<span data-nac-role="label">` |
239
+ | `value` | The rendered value of a datum. Read-only, and the reason it exists: a screenless agent (section 19) has no other way to address a number that is only on screen. | `<strong data-nac-role="value">` |
240
+ | `paragraph` | A prose block addressable for reading. Declared for the same reason as `value`: under section 19 reading is a capability, not a side effect of having a screen. | `<p data-nac-role="paragraph">` |
241
+ | `canvas` | A host whose interior is **not in the DOM**. A role is not enough to operate it: its interior is reached through the plugin extension contract of section 15, which is the door section 15.12 assigned to this surface. Declaring `canvas` without that contract would promise what cannot be delivered. | `<div data-nac-role="canvas">` |
242
+
243
+ **Document (v2.9).** The group that measuring this project's own site
244
+ put in the table. The generator that renders this specification as a
245
+ NAC3 page paints these five on every page it emits -- 45 677 elements
246
+ across 526 pages, measured on 2026-11-27 with the published validator
247
+ -- and until v2.9 the vocabulary did not have them, so the document
248
+ that declares the vocabulary was served marked up in words it did not
249
+ declare. They are **additive** and read-only: section 12 promise 3
250
+ holds, and none of them has a completion event (section 6.4).
251
+
252
+ They are declared rather than un-painted because document structure is
253
+ a capability, not decoration. Under section 19 reading is not a side
254
+ effect of having a screen: an agent with no screen navigates prose by
255
+ heading, and `code` is the difference between text that may be
256
+ summarised and text that must be reproduced. `list` and `paragraph`
257
+ were already declared, so `list-item` and `heading` being absent was
258
+ half a family -- which is why the measurement came back in the tens of
259
+ thousands rather than in dozens.
260
+
261
+ | Role | Meaning | Example |
262
+ |------|---------|---------|
263
+ | `heading` | A section title. Its depth travels in `data-nac-level`, so the headings of a document are an outline an agent can walk without parsing prose. | `<h2 data-nac-role="heading" data-nac-level="2">` |
264
+ | `list-item` | One entry of a `list`. Declared because the host was already declared and its entries are what an agent addresses. | `<li data-nac-role="list-item">` |
265
+ | `code` | A block of code, or of any text that must be read **verbatim**. Read-only. The distinction from `paragraph` is normative for a reader: a paraphrase of a code block is wrong. | `<pre data-nac-role="code">` |
266
+ | `code-inline` | The same promise inside a line of prose. Declared separately from `code` because collapsing whitespace is correct for one and wrong for the other. | `<code data-nac-role="code-inline">` |
267
+ | `note` | An aside: a remark that belongs to the page but not to its main flow. Read-only. | `<blockquote data-nac-role="note">` |
268
+
269
+ ### 1.3 Unknown roles
270
+
61
271
  Roles outside this list are reserved for future use. A NAC-strict
62
272
  runtime SHOULD reject unknown roles at register-time (v2.2). A
63
273
  NAC-permissive runtime MAY treat unknown roles as `action` for
@@ -71,6 +281,121 @@ reading prose. They agree as of v2.5. Any future divergence is
71
281
  visible in that flag rather than hidden in a difference of opinion
72
282
  between a document and an implementation.
73
283
 
284
+ ### 1.4 Registering a role (v2.8)
285
+
286
+ Sections 1.1 and 1.2 are a **closed** vocabulary, and section 1.3
287
+ says what a runtime does with a word that is not in it. That
288
+ closure is what makes a role worth reading: an agent that meets
289
+ `data-nac-role="action"` knows what it means without asking the
290
+ page.
291
+
292
+ It also meant that extending the vocabulary required editing this
293
+ document, the reference runtime, the static validator and nine
294
+ translations -- so nobody outside this repository could do it. That
295
+ is not a theoretical limitation. It is the measured cause of the
296
+ fifty-two undeclared roles this release absorbed: somebody needed a
297
+ word, the only door that was open was writing it into the HTML, and
298
+ no rule compared the markup against the vocabulary, so it worked
299
+ for four years.
300
+
301
+ From v2.8 there is a door:
302
+
303
+ ```js
304
+ NAC.register_role('gantt-bar', {
305
+ events: ['nac:gantt:bar_moved'], // its completion event
306
+ describes: 'one bar of a Gantt chart',
307
+ plugin: 'scheduling'
308
+ });
309
+ ```
310
+
311
+ From that call on, within that page: the manifest validator accepts
312
+ the role instead of reporting `manifest_role_unknown`,
313
+ `NAC.click()` waits for `nac:gantt:bar_moved` instead of falling
314
+ back to the `action` family and timing out, and `NAC.roles()`
315
+ reports the role with `source: "registered"` so a consumer can
316
+ always tell which half of the contract a word came from.
317
+
318
+ A registration is refused, by throwing, when the name is a
319
+ canonical role (a page does not get to redefine `action`: an agent
320
+ that trusted the protocol's meaning would be reading a different
321
+ contract on every page), when it is a declared alias of section
322
+ 1.5, when the name is not `^[a-z][a-z0-9-]*$`, or when a completion
323
+ event is not a `nac:` name. Registering the same role twice with
324
+ the same definition is idempotent -- a page that registers on every
325
+ render must not fail on the second one. Registering it with a
326
+ *different* definition throws, because two definitions of one word
327
+ is the drift this registry exists to prevent.
328
+
329
+ **The static half, and why it is not optional.** A registered role
330
+ exists only while the page is loaded, and `npx nac3 lint` runs with
331
+ no page: it reads files. A role declared in JavaScript is invisible
332
+ to it, so the lint would report a page as wrong for using a role
333
+ that page itself declares. Making the lint execute the page it is
334
+ validating is not an option -- a validator that runs its subject
335
+ has stopped being one. So a page that registers roles declares them
336
+ a second time, in a `nac3.roles.json` the lint can read:
337
+
338
+ ```json
339
+ {
340
+ "roles": [
341
+ { "role": "gantt-bar",
342
+ "events": ["nac:gantt:bar_moved"],
343
+ "describes": "one bar of a Gantt chart" }
344
+ ]
345
+ }
346
+ ```
347
+
348
+ Two declarations of one fact is exactly the producer/consumer
349
+ asymmetry the rest of this release spent its time removing, so it
350
+ is not left to good intentions: the lint reports
351
+ `role_registration_undeclared` when a page calls `register_role`
352
+ for a role its `nac3.roles.json` does not carry, and
353
+ `role_registration_orphan` in the other direction. A registered
354
+ role is **page-scoped**: it is not a proposal to add a word to this
355
+ document, and it carries none of the stability guarantees of
356
+ section 12.
357
+
358
+
359
+ ---
360
+
361
+ ## 1.5 Declared aliases
362
+
363
+ Seven spellings were in use in this tree for roles that already had
364
+ a name, or for concepts that are not roles. They are declared here
365
+ rather than deleted, for the reason section 12 gives: a spelling
366
+ that ever worked keeps working. The runtime resolves an alias to
367
+ its canonical role before anything else looks at it; the static
368
+ lint reports `dom_role_legacy_spelling` (severity `warn`) so a tree
369
+ can be migrated deliberately instead of all at once.
370
+
371
+ | Spelling in use | Canonical role | Why it is not its own role |
372
+ |-----------------|----------------|----------------------------|
373
+ | `treenode` | `tree-node` | Every multi-word canonical role in section 1 is hyphenated (`breadcrumb-item`, `accordion-toggle`, `sort-control`, `data-table`, `drop-target`). The unhyphenated spelling was the odd one out, not a different concept. |
374
+ | `timeline-entry` | `timeline-item` | The `-item` suffix is already canonical twice (`breadcrumb-item`, `pagination-item`). One suffix for "one of these", not two. |
375
+ | `input` | `field` | `field` is the canonical role for anything the user types or toggles, and has been since v1.0. |
376
+ | `textbox` | `field` | Same. The ARIA role name is `textbox`; the NAC3 role name is `field`, and section 1 is the authority on NAC3 role names. |
377
+ | `panel` | `region` | A nameable area inside a section is a `region`. `panel` was a second word for it. |
378
+ | `fab` | `action` | A floating action button is a button. Where it floats is presentation; the contract is `action`. |
379
+ | `dropzone` | `drop-target` | `drop-target` has been canonical since 1.6.2 and is what `NAC.drag_drop()` resolves. |
380
+
381
+ Two candidates were **rejected as aliases and kept as roles**.
382
+ `label` looked like presentation, and then measurement showed
383
+ the reference runtime queries `[data-nac-role="label"]` to derive a
384
+ name for an element that has none. A role the implementation reads
385
+ is part of the contract whether the document says so or not, which
386
+ is rule 10 of `docs/WORKING_AGREEMENT.md` applied to a role instead
387
+ of a sentence. And `feedback`, which looked like a second word for
388
+ `status` until the same measurement found `NAC.read_feedback()` -- a
389
+ published verb, since v1.3 -- filtering on it. The same measurement
390
+ kept `row`, `toast`, `toast-region` and `banner`.
391
+
392
+ Four concepts were discarded outright rather than aliased, because
393
+ nothing in the tree used them and inventing a role for them would
394
+ have been the opposite of this work: a pixel, a coordinate, a
395
+ viewport offset and a frame are **arguments**, not names. Section
396
+ 15.12 already decided that: an instant, a coordinate or an area
397
+ travels as an argument to a verb and never as part of an id.
398
+
74
399
  ---
75
400
 
76
401
  ## 2. Names
@@ -166,6 +491,51 @@ plugin manifest, finds the verb `save`, and emits
166
491
  sub-collections; same semantics as `elements[]` filtered by
167
492
  role. Demos pick the shape that reads cleanest to humans.
168
493
 
494
+ #### `undrivable_until` -- a gated surface, declared (2.7.0)
495
+
496
+ An `elements[]` entry MAY carry `undrivable_until: '<nac_id>'`:
497
+ the id of the element that has to be operated before this one can
498
+ be. It is the honest declaration for a surface that is painted and
499
+ declared but lives behind a closed panel, a collapsed drawer or a
500
+ step that has not been reached yet.
501
+
502
+ ```js
503
+ elements: [
504
+ { id: 'chat.toggle', role: 'action', actions: [{ verb: 'open' }] },
505
+ { id: 'chat.send', role: 'action', actions: [{ verb: 'send' }],
506
+ undrivable_until: 'chat.toggle' }
507
+ ]
508
+ ```
509
+
510
+ Three things follow, and none of them loosens anything:
511
+
512
+ - `NAC.click()` still **refuses** the element while it is hidden.
513
+ It really is unreachable, and pretending otherwise is the silent
514
+ damage this protocol exists to remove. What changes is the
515
+ rejection: `NacError('hidden')` now carries `.gate` and a
516
+ message naming the id to operate first, and
517
+ `nac:command:rejected` carries the same in `detail.gate`.
518
+ - `NAC.validate_global({probe: true})` stops reporting it as
519
+ `nac_id_declared_not_reachable` and reports it in the `gated`
520
+ bucket as `nac_id_undrivable_until_gate` (severity `info`),
521
+ which is not a finding (section 10.1).
522
+ - the declaration is **checked**. If `undrivable_until` names an id
523
+ that is not a usable way in -- no manifest declares it, it is not
524
+ mounted, it is on two nodes so `find()` picks by document order, or
525
+ it is itself unreachable -- the validator reports
526
+ `nac_id_undrivable_gate_unusable` at severity **error**, with
527
+ `gate_problem` saying which of the four it is. That is a harder
528
+ finding than the warn it replaced. A promised way in that does not
529
+ open is worse than no promise, because an agent will wait for it.
530
+
531
+ Absent the field nothing changes, so every manifest published before
532
+ 2.7.0 keeps the behaviour it had. The field was added because this
533
+ project's own landing page had no way to express it: the probe
534
+ reported seven correct and useless findings for a chat panel that is
535
+ closed on purpose, and the only alternatives were to stop declaring
536
+ the surface -- worse for the agent -- or to stop painting it until
537
+ opened, which is a rewrite of a published widget (audit N-39).
538
+
169
539
  ### 4.3 i18n
170
540
 
171
541
  Every `label_i18n` MUST cover all 10 NAC3 locales:
@@ -178,6 +548,19 @@ es, en, pt, fr, ja, zh, hi, ar, de, it
178
548
  partial coverage during brownfield migration; production manifests
179
549
  should ship 10 locales.
180
550
 
551
+ **The fallback chain, when coverage is partial (normative since
552
+ 2.7.0).** A manifest that covers the 10 locales never reaches this
553
+ rule; one that does not, does. Asked for a label in a locale the map
554
+ does not carry, the runtime answers in this order: **the requested
555
+ locale, then `es`, then `en`, then the first locale the map
556
+ carries**, and only then the key itself. The order is not alphabetical
557
+ and not English-first: it is the order the reference runtime has
558
+ resolved since 2.0, written down here because for two years it was
559
+ only in the code, and an undocumented resolution order is a coin flip
560
+ an adopter discovers in production (decision D-14). It does not
561
+ contradict section 4.3.2: that section is about the language of THIS
562
+ DOCUMENT, not about which string a host's own catalogue serves.
563
+
181
564
  #### 4.3.1 What the ten locales are a requirement ON
182
565
 
183
566
  The requirement above is a requirement on the **adopter's manifest** --
@@ -374,9 +757,12 @@ release, to formalise the schema grammar and make enforcement
374
757
  the default. **That did not happen in 2.4 and has not happened
375
758
  through 2.5.** The sentence is removed rather than re-dated: a
376
759
  promise with a version number attached, left standing past that
377
- version, reads to an agent as a capability it can expect. Formalising the
378
- grammar and wiring enforcement is tracked as an open question in
379
- section 13, where it is listed as open and undated.
760
+ version, reads to an agent as a capability it can expect.
761
+ **As of 2.7.0 the question is closed, not open**: `payload_schema`
762
+ stays informational, enforcement is not part of the protocol, and
763
+ the row in section 13 records the decision and its reasons. An agent
764
+ reads the field as DOCUMENTATION of what a host expects, never as a
765
+ guarantee that anything checked it.
380
766
 
381
767
  #### Disabled-state semantics (v2.3 hotfix from alpha.2)
382
768
 
@@ -769,13 +1155,45 @@ All async methods reject with `NacError` whose `code` is one of:
769
1155
 
770
1156
  ### 5.2 Introspection
771
1157
 
1158
+ Everything an agent can ASK without changing anything. All of it is
1159
+ synchronous: it reads the document and the registry and reaches no
1160
+ surface.
1161
+
772
1162
  ```ts
1163
+ /* the document, as the protocol sees it */
773
1164
  NAC.describe(): { active: string|null, plugins: PluginSnap[] }
774
1165
  NAC.describe_v2(): { v2_scope_entries: [...], sitemap: ..., data_tables: [...] }
775
1166
  NAC.manifest(plugin_slug: string): Manifest|null
1167
+
1168
+ /* resolution: one element, or every element of a role */
1169
+ NAC.find(nac_id: string, opts?: {plugin?: string}): ElementSnap|null
1170
+ NAC.list(role?: string): ElementSnap[]
1171
+
1172
+ /* state an agent must be able to read rather than infer */
1173
+ NAC.read_feedback(): Array<{ nac_id, state, message, error }>
1174
+ NAC.snapshot_state(): { errors: [...], ... }
1175
+
1176
+ /* the role vocabulary, with the provenance of every word (v2.8, 1.4) */
1177
+ NAC.roles(): { spec_version, canonical: string[], aliases: {...},
1178
+ registered: [...], click_events: {...}, no_click_event: string[] }
1179
+ NAC.canonical_role(role: string): string
1180
+
1181
+ /* conformance */
776
1182
  NAC.validate_global(opts?: {probe?: boolean}): GlobalReport // named buckets, see 10.1
777
1183
  ```
778
1184
 
1185
+ `find` is the one worth pointing at, because it is the resolver every
1186
+ other verb is built on and it was published for seven minor versions
1187
+ without this document naming it. `find(id)` answers *what is this id,
1188
+ and is it there* -- without clicking it, without focusing it, without
1189
+ touching the page. An agent that wants to check a precondition before
1190
+ acting has needed exactly that from the start; until v2.8 it had to
1191
+ read `js/nac.js` to learn the verb existed. Audit PND-129.
1192
+
1193
+ `list(role)` is its plural: every element the page declares with that
1194
+ role, or every declared element when the argument is omitted. Both
1195
+ return the same element shape the buckets of 10.1 use.
1196
+
779
1197
  ### 5.3 Data tables (since 2.1)
780
1198
 
781
1199
  The data-table primitives are NOT part of the core runtime
@@ -979,6 +1397,49 @@ Every action emits a deterministic completion event. The runtime's
979
1397
  | `sort-control` | `nac:table:sort_changed` | -- |
980
1398
  | `filter-control` | `nac:table:filter_changed` | -- |
981
1399
 
1400
+ | `map-layer` | `nac:map:layer_toggled` | -- |
1401
+ | `map-marker` | `nac:map:marker_selected` | -- |
1402
+ | `chart-series` | `nac:chart:series_toggled` | -- |
1403
+ | `calendar-event` | `nac:calendar:event_selected` | -- |
1404
+ | `tree-node` | `nac:tree:selected` | -- |
1405
+ | `carousel-slide` | `nac:carousel:slide_changed` | -- |
1406
+ | `toast` | `nac:toast:dismissed` | -- |
1407
+ | `banner` | `nac:banner:dismissed` | -- |
1408
+ | `combobox` | `nac:field:changed` | -- |
1409
+ | `listbox` | `nac:field:changed` | -- |
1410
+ | `slider` | `nac:slider:value_changed` | -- |
1411
+ | `richtext` | `nac:richtext:format_applied` | -- |
1412
+
1413
+ The `tab` row above gained its failure event in v2.8:
1414
+ `nac:tab:activation_failed` existed in the runtime from v2.2 and was
1415
+ not in this table, so `NAC.click()` on a tab whose activation was
1416
+ refused waited out its full timeout instead of rejecting at once.
1417
+
1418
+ **The forty-six roles with no completion event of their own.** They are
1419
+ listed because the absence is part of the contract, not an
1420
+ oversight: `plugin`, `section`, `region`, `navigation`,
1421
+ `data-table`, `confirm-dialog`, `draggable`, `drop-target`, `map`,
1422
+ `chart`, `chart-point`, `calendar`, `tree`, `tree-children`,
1423
+ `timeline`, `timeline-item`, `carousel`, `status`, `log`,
1424
+ `toast-region`, `feedback`, `modal`, `drawer`, `bottom-sheet`, `tablist`,
1425
+ `tabpanel`, `stepper`, `accordion-section`, `breadcrumb`,
1426
+ `pagination-control`, `avatar`, `presence-indicator`, `skeleton`,
1427
+ `empty-state`, `list`, `row`, `menu`, `label`, `value`, `paragraph`,
1428
+ `canvas`, `heading`, `list-item`, `code`, `code-inline` and `note`.
1429
+
1430
+ Four of those are structural hosts, two are driven by
1431
+ `NAC.drag_drop()` rather than by a click, and the rest are
1432
+ read-only or are containers whose control carries the event. What
1433
+ `NAC.click()` does with them has not changed: it clicks, and it
1434
+ still listens for the `action` family, because a host is free to
1435
+ make a region clickable and emit `nac:action:succeeded`. What
1436
+ changed in v2.7 is that the timeout says which of the two happened
1437
+ instead of blaming the widget, and what changed in v2.8 is that
1438
+ the list above is complete -- before it, a click on any of the
1439
+ thirty-three roles v2.8 added to it fell through to the `action`
1440
+ family indistinguishably from a role nobody had thought about.
1441
+
1442
+
982
1443
  ### 6.1 Event detail shape
983
1444
 
984
1445
  Every event detail carries the canonical id field plus `plugin`:
@@ -1025,6 +1486,318 @@ click started. Hence the separate event family.
1025
1486
 
1026
1487
  ---
1027
1488
 
1489
+ ### 6.4 The complete event vocabulary (v2.8)
1490
+
1491
+ Through v2.7 this document named **16** events and the reference
1492
+ runtime emitted **121**. The other 105 were signals the system
1493
+ produced that no consumer could learn about by reading the
1494
+ specification -- only by reading the implementation, which is the
1495
+ one thing a protocol exists to make unnecessary.
1496
+
1497
+ The tables below are the whole vocabulary. They are normative in
1498
+ the same sense as section 1: an event the reference runtime emits
1499
+ and this section does not name is a defect, and
1500
+ `scripts/check-event-vocabulary.mjs` refuses the build when that
1501
+ happens -- in both directions, so a name retired from the code
1502
+ cannot be left declared here either.
1503
+
1504
+ Three conventions, stated once because they recur:
1505
+
1506
+ - **A completion is not a state.** `nac:carousel:advanced` says a
1507
+ verb finished; `nac:carousel:slide_changed` says the view moved,
1508
+ and it fires on its own when autoplay runs. Only the first is
1509
+ something an agent can wait for.
1510
+ - **Four pairs are duplicates, kept on purpose.** Each pair below
1511
+ marks one spelling **canonical** and keeps the other emitted,
1512
+ because both shipped and a listener may be bound to either.
1513
+ Section 12 promise 2 is why they are not deleted.
1514
+ - **A two-segment name is not a family member.** It is about the
1515
+ runtime or the page rather than about one element, so it has no
1516
+ family to belong to.
1517
+
1518
+ **`action` -- the default contract**
1519
+
1520
+ The family every `action` and `button` answers with. `requested` and `dispatching` are the two halves of the call leaving; `succeeded` and `failed` are the effect landing. A host that emits `nac:action:confirmed` has resolved a confirmation gate (section 5.1.4).
1521
+
1522
+ | Event | What it means |
1523
+ |-------|---------------|
1524
+ | `nac:action:requested` | A verb was asked for. Emitted before any effect; this is where a host validates a payload. |
1525
+ | `nac:action:dispatching` | The request passed validation and is on its way to the host handler. |
1526
+ | `nac:action:succeeded` | The effect happened. The completion event of `action` and `button`. |
1527
+ | `nac:action:failed` | The effect did not happen. Carries the reason. |
1528
+ | `nac:action:confirmed` | A confirmation gate in front of an action was resolved affirmatively. |
1529
+
1530
+ **`command` -- what the runtime itself refused**
1531
+
1532
+ These do not come from a widget: the runtime emits them about its own verbs, so a silent miss can be heard instead of only thrown (v1.8).
1533
+
1534
+ | Event | What it means |
1535
+ |-------|---------------|
1536
+ | `nac:command_pending` | A verb was accepted and has not resolved yet. |
1537
+ | `nac:command_done` | A verb resolved. |
1538
+ | `nac:command_failed` | A verb rejected after reaching its target. |
1539
+ | `nac:command_rejected` | A verb was refused before reaching a target (not found, hidden, disabled, gated). |
1540
+ | `nac:command:failed` | The three-segment spelling of `nac:command_failed`, emitted alongside it since v1.8 for listeners that filter by family. |
1541
+ | `nac:command:rejected` | The three-segment spelling of `nac:command_rejected`. |
1542
+
1543
+ **`field` and value controls**
1544
+
1545
+ One event for a value change, whatever the control. A `slider` has its own because the value is continuous and the host may coalesce.
1546
+
1547
+ | Event | What it means |
1548
+ |-------|---------------|
1549
+ | `nac:field:changed` | The value of a `field`, `option`, `combobox` or `listbox` changed. |
1550
+ | `nac:slider:value_changed` | The value of a `slider` changed. |
1551
+ | `nac:tags:added` | A tag was added to a multi-value field. |
1552
+ | `nac:tags:removed` | A tag was removed from a multi-value field. |
1553
+
1554
+ **`richtext` -- editing that is not a value change**
1555
+
1556
+ Formatting is not typing: the document changed shape, not content. `format_applied` is the canonical completion of a `richtext` click; `formatted` is kept because it shipped first and a listener may be bound to it.
1557
+
1558
+ | Event | What it means |
1559
+ |-------|---------------|
1560
+ | `nac:richtext:format_applied` | A formatting operation completed. **Canonical.** |
1561
+ | `nac:richtext:formatted` | Deprecated spelling of `format_applied`, still emitted. |
1562
+ | `nac:richtext:link_inserted` | A link was inserted. |
1563
+ | `nac:richtext:mention_picked` | A mention was chosen from the editor picker. This is an option resolution happening while typing (section 5.1.3). |
1564
+
1565
+ **`tab`, `step`, `accordion` and `section` -- progressive disclosure**
1566
+
1567
+ The three families whose control was declared and whose content was not until v2.8. `section:reached` is the only one that fires without anybody operating anything: it means a scroll brought a landmark into view.
1568
+
1569
+ | Event | What it means |
1570
+ |-------|---------------|
1571
+ | `nac:tab:activated` | A tab was activated. The completion event of `tab`. |
1572
+ | `nac:tab:changed` | The active tab of a `tablist` changed, including when the host changed it on its own. |
1573
+ | `nac:tab:activation_failed` | A tab refused activation. The failure event of `tab`. |
1574
+ | `nac:step:advanced` | A wizard moved forward. |
1575
+ | `nac:step:back` | A wizard moved backward. |
1576
+ | `nac:step:completed` | The last step of a `stepper` was completed. |
1577
+ | `nac:accordion:expanded` | An `accordion-section` opened. |
1578
+ | `nac:accordion:collapsed` | An `accordion-section` closed. |
1579
+ | `nac:section:expanded` | A collapsible `section` opened. |
1580
+ | `nac:section:collapsed` | A collapsible `section` closed. |
1581
+ | `nac:section:reached` | A `section` came into view. State, not a completion: nobody asked for it. |
1582
+
1583
+ **`table` and `dt` -- the data-table surface**
1584
+
1585
+ `nac:table:*` are the three completions a column header or pager produces. The eleven `nac:dt:*` are the editable-table surface of 2.1 and are about the *model*, not about a click: an agent that edits a cell has to be able to tell a validated edit from a committed one.
1586
+
1587
+ | Event | What it means |
1588
+ |-------|---------------|
1589
+ | `nac:table:sort_changed` | A column sort changed. The completion event of `sort-control`. |
1590
+ | `nac:table:filter_changed` | A column filter changed. The completion event of `filter-control`. |
1591
+ | `nac:table:page_changed` | The page of a paginated table changed. The completion event of `pagination-item`. |
1592
+ | `nac:dt:registered` | A data table was registered with the runtime. |
1593
+ | `nac:dt:unregistered` | A data table was removed. |
1594
+ | `nac:dt:cell_edited` | A cell took a new value in the edit buffer. Not yet committed. |
1595
+ | `nac:dt:validation_failed` | An edit was rejected by the table validator; the buffer still holds the old value. |
1596
+ | `nac:dt:committed` | The edit buffer was written through. |
1597
+ | `nac:dt:discarded` | The edit buffer was dropped without writing. |
1598
+ | `nac:dt:row_added` | A row was added. |
1599
+ | `nac:dt:row_removed` | A row was removed. |
1600
+ | `nac:dt:selection_changed` | The selected rows changed. |
1601
+ | `nac:dt:aggregate_changed` | A footer aggregate recomputed. |
1602
+ | `nac:dt:matrix_cell_set` | A cell of a matrix-shaped table took a value. |
1603
+
1604
+ **`map` -- six events for a surface with no DOM inside**
1605
+
1606
+ `marker_selected` is the canonical completion of a click on a `map-marker`; `marker_clicked` is kept because it shipped first. `moved` and `zoom_changed` are state and arrive without anybody operating an element, which is why an agent must not treat two reads of a map as comparable (section 15.12).
1607
+
1608
+ | Event | What it means |
1609
+ |-------|---------------|
1610
+ | `nac:map:marker_selected` | A marker became the selection. **Canonical** completion of `map-marker`. |
1611
+ | `nac:map:marker_clicked` | Deprecated spelling of `marker_selected`, still emitted. |
1612
+ | `nac:map:layer_toggled` | A `map-layer` was turned on or off. Completion of `map-layer`. |
1613
+ | `nac:map:focused` | The map centred on something it was asked to focus. |
1614
+ | `nac:map:moved` | The viewport moved. State. |
1615
+ | `nac:map:zoom_changed` | The zoom level changed. State. |
1616
+
1617
+ **`chart` -- reading, not pressing**
1618
+
1619
+ | Event | What it means |
1620
+ |-------|---------------|
1621
+ | `nac:chart:series_toggled` | A `chart-series` was shown or hidden. Completion of `chart-series`. |
1622
+ | `nac:chart:filtered` | The chart data was filtered. |
1623
+ | `nac:chart:data_loaded` | New data arrived. Every `chart-point` read before this event is stale. |
1624
+
1625
+ **`calendar`**
1626
+
1627
+ Same shape as the map: a duplicated pair, and one event that is about the whole view rather than about an element.
1628
+
1629
+ | Event | What it means |
1630
+ |-------|---------------|
1631
+ | `nac:calendar:event_selected` | A `calendar-event` became the selection. **Canonical** completion of `calendar-event`. |
1632
+ | `nac:calendar:event_clicked` | Deprecated spelling of `event_selected`, still emitted. |
1633
+ | `nac:calendar:date_selected` | A date was selected. |
1634
+ | `nac:calendar:view_changed` | The calendar changed view (month / week / day). State of the `calendar`, not of an element. |
1635
+
1636
+ **`tree`**
1637
+
1638
+ `invalidated` is the one that is easy to get wrong: it is a cache invalidation, not a success. An agent that reads it as a completion believes something finished that never started.
1639
+
1640
+ | Event | What it means |
1641
+ |-------|---------------|
1642
+ | `nac:tree:selected` | A `tree-node` became the selection. Completion of `tree-node`. |
1643
+ | `nac:tree:expanded` | A node opened; its `tree-children` is now operable. |
1644
+ | `nac:tree:collapsed` | A node closed; its `tree-children` is in the DOM and not operable. |
1645
+ | `nac:tree:invalidated` | The cached shape of the tree is no longer valid. **Not a completion.** |
1646
+
1647
+ **`timeline` -- the two events that stop an agent from reporting a page as the whole record**
1648
+
1649
+ | Event | What it means |
1650
+ |-------|---------------|
1651
+ | `nac:timeline:loaded` | The first page of a timeline arrived. |
1652
+ | `nac:timeline:loaded_more` | A further page arrived. While this can still fire, the record is incomplete. |
1653
+
1654
+ **`carousel` -- the one family where the protocol talks about time**
1655
+
1656
+ `advanced` and `slide_changed` are not the same event with two names, and this is the distinction that makes the pair worth keeping: one is *the verb completed*, the other is *the state moved*, and the state moves on its own when autoplay is running.
1657
+
1658
+ | Event | What it means |
1659
+ |-------|---------------|
1660
+ | `nac:carousel:advanced` | A carousel advanced because it was asked to. The verb completed. |
1661
+ | `nac:carousel:slide_changed` | The visible slide changed, including on its own. Completion of `carousel-slide`. |
1662
+ | `nac:carousel:autoplay_paused` | Autoplay stopped. From here a read of the carousel stays true. |
1663
+ | `nac:carousel:autoplay_resumed` | Autoplay started again. From here it does not. |
1664
+
1665
+ **`toast`, `banner` -- what the agent did not ask for**
1666
+
1667
+ `shown` is the canonical appearance; `fired` is kept because it shipped first and is emitted at call time rather than at paint time.
1668
+
1669
+ | Event | What it means |
1670
+ |-------|---------------|
1671
+ | `nac:toast:shown` | A `toast` appeared. **Canonical.** |
1672
+ | `nac:toast:fired` | A toast was requested. Deprecated as the appearance signal, still emitted. |
1673
+ | `nac:toast:dismissed` | A toast went away, by click or by timeout. Completion of `toast`. |
1674
+ | `nac:banner:dismissed` | A `banner` was dismissed. Completion of `banner`. |
1675
+
1676
+ **`drawer`, `editor`, `plugin` -- containers opening and closing**
1677
+
1678
+ `nac:drawer:peek` is the only intermediate container state in the protocol: neither open nor closed. What is operable in that state is for the host to declare, with `undrivable_until` (section 19.1).
1679
+
1680
+ | Event | What it means |
1681
+ |-------|---------------|
1682
+ | `nac:drawer:opened` | A `drawer` opened. |
1683
+ | `nac:drawer:closed` | A `drawer` closed. |
1684
+ | `nac:drawer:peek` | A drawer is partially open. |
1685
+ | `nac:editor:opened` | The field editor of section 5.1.3 opened. |
1686
+ | `nac:editor:closed` | The field editor closed. |
1687
+ | `nac:plugin:opened` | A plugin surface opened. |
1688
+ | `nac:plugin:closed` | A plugin surface closed. |
1689
+ | `nac:plugin:minimized` | A plugin surface was minimized. |
1690
+ | `nac:plugin:maximized` | A plugin surface was maximized. |
1691
+ | `nac:plugin:restored` | A plugin surface returned to its previous size. |
1692
+ | `nac:plugin:reset` | A plugin surface was reset to its initial state. |
1693
+ | `nac:plugin:invalidated` | A plugin surface declared its cached description stale. |
1694
+ | `nac:plugin:invoked` | A section 15 primitive was invoked on a registered plugin. |
1695
+ | `nac:plugin:read` | A section 15 `read` resolved. |
1696
+ | `nac:plugin:event` | A section 15 `subscribe` delivered an event. |
1697
+
1698
+ The last three are composed at emit time (`'nac:plugin:' + kind`)
1699
+ rather than written as literals, so a scan of the runtime's string
1700
+ constants cannot see them. Nine names in this section are like that
1701
+ -- these three plus the `nac:authority:*` family and
1702
+ `nac:action:confirmed`. `scripts/check-event-vocabulary.mjs` does
1703
+ not carry a list of them: it reads the kinds off the call sites of
1704
+ the three emitters that compose them, so a new one cannot slip past
1705
+ a mechanical gate by being dynamic.
1706
+
1707
+ **`confirm` -- the gate in front of a destructive action**
1708
+
1709
+ | Event | What it means |
1710
+ |-------|---------------|
1711
+ | `nac:confirm:requested` | A confirmation was asked for; a `confirm-dialog` is now the surface. |
1712
+ | `nac:confirm:confirmed` | The affirmative branch was taken. |
1713
+ | `nac:confirm:cancelled` | The negative branch was taken. Failure event of `confirm-button`. |
1714
+ | `nac:confirm:resolved` | The gate closed, either way. Completion of `confirm-button`. |
1715
+ | `nac:action:confirm:requested` | A confirmation gate opened in front of a named action (v1.9 family, four segments). |
1716
+ | `nac:action:confirm:granted` | The gate was granted. |
1717
+ | `nac:action:confirm:denied` | The gate was denied. |
1718
+
1719
+ **`drag` -- the four events of `NAC.drag_drop()`**
1720
+
1721
+ The verb has been documented since 1.6.2 and its events were not. All four are about the same gesture and only the last two are terminal.
1722
+
1723
+ | Event | What it means |
1724
+ |-------|---------------|
1725
+ | `nac:drag:started` | A `draggable` was picked up. |
1726
+ | `nac:drag:over` | The pointer is over a `drop-target` that would accept the drop. |
1727
+ | `nac:drag:dropped` | The drop happened. Terminal. |
1728
+ | `nac:drag:cancelled` | The gesture ended with no drop. Terminal. |
1729
+
1730
+ **`list` -- the event of `NAC.reorder()`**
1731
+
1732
+ | Event | What it means |
1733
+ |-------|---------------|
1734
+ | `nac:list:reordered` | A `list` took a new order. Carries the index that was actually applied, which is not necessarily the one asked for (section 5.1). |
1735
+
1736
+ **Navigation and focus**
1737
+
1738
+ | Event | What it means |
1739
+ |-------|---------------|
1740
+ | `nac:breadcrumb:navigated` | A `breadcrumb-item` was followed. Completion of `breadcrumb-item`. |
1741
+ | `nac:focus:moved` | The runtime moved focus (section 17). |
1742
+ | `nac:state:changed` | A `data-nac-state` value changed on an addressable element. |
1743
+ | `nac:mode:requested` | A host-defined mode change was asked for. |
1744
+ | `nac:authority:requested` | An elevated-authority step was asked for (section 5.1.7). |
1745
+ | `nac:authority:granted` | The scope was granted. A granted `high` satisfies `medium` and `low`; a granted `low` satisfies neither of the higher two. |
1746
+ | `nac:authority:denied` | The scope was refused. |
1747
+ | `nac:authority:revoked` | A previously granted scope was withdrawn. Idempotent: revoking what was never granted emits nothing. |
1748
+ | `nac:authority:expired` | A granted scope reached its time limit. This one arrives without anybody doing anything, so an agent that cached a capability has to listen for it. |
1749
+
1750
+ **Lifecycle of the runtime itself**
1751
+
1752
+ Two-segment names, and that is deliberate: they are not about any element, so there is no family to put them in.
1753
+
1754
+ | Event | What it means |
1755
+ |-------|---------------|
1756
+ | `nac:installed` | The runtime installed on the page. |
1757
+ | `nac:v2_installed` | The v2 extension module installed. |
1758
+ | `nac:registered` | A manifest was registered. |
1759
+ | `nac:locale_changed` | The active locale changed (section 4.3). |
1760
+ | `nac:role_registered` | A host declared a page-scoped role with `NAC.register_role()` (section 1.4). From this event on, that role resolves. |
1761
+ | `nac:source_changed` | The provenance source for synthetic actions changed (section 15.7). |
1762
+ | `nac:fatal` | The runtime reached a state it will not continue from. |
1763
+
1764
+ **Resolution warnings -- the protocol telling on the page**
1765
+
1766
+ These are the ones a conformance run should be read against: each one is the runtime saying it could answer, and that the answer rested on something the page should fix.
1767
+
1768
+ | Event | What it means |
1769
+ |-------|---------------|
1770
+ | `nac:duplicate_warn` | Two elements carried the same `data-nac-id`; the first in document order was used. |
1771
+ | `nac:depth_warn` | Resolution crossed more nesting levels than the protocol expects. |
1772
+ | `nac:disambiguation_requested` | A name matched more than one element and the runtime refused to choose (section 5.4). |
1773
+ | `nac:autoregister_orphan_warn` | An element was auto-registered because no manifest claimed it. |
1774
+ | `nac:adopt_failed` | An element could not be adopted into a manifest. |
1775
+ | `nac:autoregister_role_underivable` | No declared role could be derived for an element, so none was written (section 1). |
1776
+ | `nac:i18n_skipped` | A label was not translated because its catalogue entry was missing (section 4.3). |
1777
+ | `nac:virtual_resolver_slow` | A virtualised-surface resolver took longer than its budget (section 15.12). |
1778
+
1779
+ **Shadow DOM**
1780
+
1781
+ | Event | What it means |
1782
+ |-------|---------------|
1783
+ | `nac:shadow_blocked` | Resolution stopped at a closed shadow root that had not volunteered exposure (section 5.1.6). |
1784
+ | `nac:shadow_depth_exceeded` | Shadow nesting went past the configured limit. |
1785
+ | `nac:shadow_protocol_violation` | A shadow root exposed something the protocol does not allow. |
1786
+
1787
+ **Cross-frame**
1788
+
1789
+ Seven events for one question -- is the document in that frame speaking this protocol, and can its claims be trusted (section 7).
1790
+
1791
+ | Event | What it means |
1792
+ |-------|---------------|
1793
+ | `nac:iframe_describe_received` | A framed document answered a description request. |
1794
+ | `nac:iframe_handshake_timeout` | A framed document did not answer in time. |
1795
+ | `nac:iframe_version_mismatch` | A framed document runs a different protocol version. |
1796
+ | `nac:iframe_untrusted` | A message arrived from an origin that is not on the trust list. |
1797
+ | `nac:iframe_signature_missing` | A framed claim arrived unsigned where a signature is required. |
1798
+ | `nac:iframe_signature_invalid` | A framed claim arrived with a signature that did not verify. |
1799
+ | `nac:iframe_no_secret_at_nac3` | A signature could not be checked because no secret was registered. |
1800
+
1028
1801
  ## 7. Provenance
1029
1802
 
1030
1803
  ### 7.1 isTrusted
@@ -1092,15 +1865,32 @@ A page is at **NAC3 Conformance Level 1** if:
1092
1865
  - Every clickable widget that an agent should be able to operate
1093
1866
  carries `data-nac-id` and `data-nac-role`.
1094
1867
  - Every `data-nac-role="action"` element fires
1095
- `nac:action:succeeded` after its side effect.
1868
+ `nac:action:succeeded` after its side effect -- **except when that
1869
+ side effect is a navigation that unloads the document**, where there
1870
+ is no "after": nothing is left to emit the event and nothing is left
1871
+ to hear it. Such an element MAY emit BEFORE navigating, which is what
1872
+ lets an agent await a confirmation, and a validator MUST report the
1873
+ ones that do not as navigating rather than as failing. (Through 2.6
1874
+ this bullet carried no exception, so a page whose actions are plain
1875
+ `<a href>` links could not reach level 1 at all -- 31 of the 39
1876
+ actions of this project's own landing page are such links. The
1877
+ reference validator already separated them and answered
1878
+ `unverified`; what was missing was the sentence. Audit N-38, closed
1879
+ in 2.7.0.)
1096
1880
  - The page registers at least one plugin manifest via
1097
1881
  `NAC.register()`.
1098
1882
  - `NAC.click(id)` works for every advertised id.
1099
1883
 
1100
1884
  A page is at **NAC3 Conformance Level 2** if it also:
1101
1885
 
1102
- - Registers `tabs[]`, `fields[]`, `actions[]` arrays explicitly
1103
- in its manifest (not inferred from DOM).
1886
+ - Declares its surface EXPLICITLY in the manifest instead of leaving
1887
+ it to be inferred from the DOM, in either published shape:
1888
+ `elements[]` with a `role` on every entry, which is the canonical
1889
+ shape of section 4, or the legacy `tabs[]` / `fields[]` /
1890
+ `actions[]` arrays. (Through 2.6 this bullet named only the three
1891
+ legacy arrays, so a page written the way section 4 documents failed
1892
+ level 2 as worded -- including this project's own landing page,
1893
+ whose two manifests use `elements[]`. Audit N-37, closed in 2.7.0.)
1104
1894
  - Provides `label_i18n` covering all 10 NAC3 locales for every
1105
1895
  user-facing label.
1106
1896
  - Implements the v2.0 brownfield primitives: scope tree,
@@ -1203,6 +1993,7 @@ without parsing a message:
1203
1993
  {
1204
1994
  ok: boolean, // false when any error-severity finding exists
1205
1995
  has_errors: boolean,
1996
+ probed: boolean, // the echo of opts.probe (since 2.7.0)
1206
1997
  duplicates: [{ code: 'nac_id_duplicate_across_plugins',
1207
1998
  severity: 'error', nac_id, plugins: string[] }],
1208
1999
  orphans: [{ code: 'nac_id_orphan_in_dom',
@@ -1211,6 +2002,17 @@ without parsing a message:
1211
2002
  unmounted: [{ code: 'nac_id_declared_not_mounted',
1212
2003
  severity: 'warn', nac_id, in_manifest, in_dom,
1213
2004
  plugin }],
2005
+ ambiguous: [{ code: 'nac_id_ambiguous_in_dom',
2006
+ severity: 'error', nac_id, count, plugin, hint }],
2007
+ unreachable:
2008
+ [{ code: 'nac_id_declared_not_reachable',
2009
+ severity: 'warn', nac_id, reason, plugin, hint },
2010
+ { code: 'nac_id_undrivable_gate_unusable',
2011
+ severity: 'error', nac_id, reason, gate,
2012
+ gate_problem, plugin, hint }],
2013
+ gated: [{ code: 'nac_id_undrivable_until_gate',
2014
+ severity: 'info', nac_id, reason, gate, plugin,
2015
+ hint }],
1214
2016
  convention_violations:
1215
2017
  [{ code: 'nac_id_missing_plugin_prefix',
1216
2018
  severity: 'warn', nac_id, plugin, hint }],
@@ -1224,11 +2026,36 @@ without parsing a message:
1224
2026
  }
1225
2027
  ```
1226
2028
 
1227
- The five codes, their severity and what to do about each are
2029
+ The codes, their severity and what to do about each are
1228
2030
  published as data at `api/latest/findings.json`, under
1229
2031
  `global_buckets`. Finding codes are stable across patch releases;
1230
2032
  new codes only in minor bumps, and a code is never reused for a
1231
- different condition (section 12, promise 4).
2033
+ different condition (section 12, promise 4). The last four arrived in
2034
+ 2.7.0 and are reported only when the validator is asked to probe.
2035
+
2036
+ **`gated` is not a findings bucket.** An element that declares what
2037
+ opens it is keeping the contract, not breaking it, so `gated` is
2038
+ excluded from `ok`, from `has_errors` and from the "zero findings"
2039
+ threshold of conformance level 3 (section 8). It is reported because
2040
+ an agent reading a validation report is exactly who needs to know
2041
+ that an id it can see needs a panel opened first.
2042
+
2043
+ **The `probe` option (2.7.0).** `probe: false` is the default and is
2044
+ the whole of what 2.5 did: compare the registered manifests against
2045
+ the ids present in the DOM, which is a comparison of two lists.
2046
+ `probe: true` also asks whether each declared element can be
2047
+ OPERATED, and that question is what the two new buckets answer:
2048
+ `ambiguous` -- the same id on more than one node, so `find()`
2049
+ resolves it by document order and re-ordering the markup changes
2050
+ what an agent does -- and `unreachable` -- mounted, but behind
2051
+ `aria-hidden="true"`, behind `inert`, or not displayed, which is
2052
+ exactly what `NAC.click()` refuses with `NacError('hidden')`.
2053
+ Probing reads the DOM and the computed style; it clicks nothing and
2054
+ mutates nothing. Through 2.6 the reference runtime declared this
2055
+ function with NO parameters and ignored `probe` entirely, so the
2056
+ level 3 check of section 8 was the level 2 check with a stricter
2057
+ threshold rather than the deeper inspection the sentence implies
2058
+ (audit N-35, closed in 2.7.0).
1232
2059
 
1233
2060
  **Versions before 2.5.0 attached no code to these buckets**, and
1234
2061
  this section described a flat array of findings that the reference
@@ -1282,6 +2109,35 @@ NAC3 standardises only step 2's input/output shape (the
1282
2109
  `NAC.describe()` snapshot + the action shape). Steps 1, 3, 4 are
1283
2110
  outside the spec; you compose what you like.
1284
2111
 
2112
+ ### 11.1 A screenless assistant routes through the intermediary (v2.7)
2113
+
2114
+ A caller with no screen -- a web IVR, an assistant embedded in a device,
2115
+ a voice runner with no page open -- uses the same four pieces. Exactly
2116
+ two things change, and neither is a new primitive:
2117
+
2118
+ 1. **Step 2's input is the MANIFEST.** There is no page to snapshot, so
2119
+ the capability snapshot is `NAC.describePlugin(slug)` plus the
2120
+ declared state read through `NAC.read` -- not `NAC.describe()`.
2121
+ The labels, hints, params and units of 15.11 are what make that
2122
+ snapshot speakable, which is why they exist.
2123
+ 2. **The dispatcher uses `NAC.call` / `read` / `subscribe`** where a
2124
+ page would have used `click` / `fill` / `tab`. The verb changes;
2125
+ the contract does not.
2126
+
2127
+ Step 2's OUTPUT is unchanged: the same structured intent shape. Steps 1
2128
+ and 4 -- the recogniser and the synthesiser -- stay outside this spec,
2129
+ and this section does not bring them in.
2130
+
2131
+ The application on the other side has to be in the headless profile
2132
+ (section 19) for the call to be auditable at all: with no document and
2133
+ no event sink there is nobody to receive the provenance row, and 19.4
2134
+ refuses rather than act unobserved.
2135
+
2136
+ Reference: `demos/v27-headless-voice/voice-broker.mjs`, whose header
2137
+ names which of the four pieces a deployment replaces and which it
2138
+ keeps. Owner decision D-26 (2026-11-25) wrote this door down; it
2139
+ existed before, undocumented.
2140
+
1285
2141
  ---
1286
2142
 
1287
2143
  ## 12. Stability guarantees
@@ -1334,7 +2190,7 @@ to make about `payload_schema`.
1334
2190
  | Should `data-nac-role="navigation"` ever resolve to a tab? | **DECIDED: no** | v2.5 | Decided in 2.2.0 and enforced since: a `tab.`-prefixed id with role `navigation` raises `tab_id_manifest_role_drift`, and with `STRICT_VALIDATION` (default `true` since 2.3.0) `NAC.register` throws. `tab_by_label` resolves tabs only from `m.tabs[]` and `elements[role=='tab']`. `navigation` is a landmark region, never a switchable panel. See sections 1 and 10. |
1335
2191
  | Should `NAC.click()` accept relative ids (e.g. `'./save'`)? | **OPEN, not implemented** | v2.5 | The resolver matches `data-nac-id` exactly and scopes by plugin -- the active one, or `opts.plugin`. That scoping already covers the case the question was asking for (`NAC.click('save', {plugin:'invoice'})`), so the pressure for a relative syntax is low and nothing is in progress. Deciding it would mean adding a path grammar to section 2, where ids are declared opaque to the runtime. |
1336
2192
  | Should manifests support inheritance / extension across plugins (one base manifest extended by a tenant)? | **OPEN, candidate for the next major** | v2.5 | Not implemented. **Not to be confused with section 15**, "plugin extension contract": that shipped in v2.5 and is a backend-routing mechanism (`registerPlugin` / `call` / `read` / `subscribe`), not manifest inheritance. The question here is about one manifest deriving from another, which touches the id-uniqueness rules of section 2 and is why it is held for a major. |
1337
- | Should `payload_schema` enforcement be formalised and turned on? | **OPEN, undated** | v2.5 | Moved here from section 5, which promised it for v2.4. It did not land in v2.4 and has not landed through v2.5; the reference runtime does not read the field. See section 5 for exactly what is and is not validated today. |
2193
+ | Should `payload_schema` enforcement be formalised and turned on? | **DECIDED: no -- it stays informational** | v2.7.0 | Decided in 2.7.0 (D-15), after three releases of being open and undated. Three reasons, in order of weight. (1) An agent cannot tell a host that validates from one that does not, so a schema that is enforced by SOME runtimes is worse than one enforced by none: the agent must validate before sending either way, which is what section 5 already tells it to do. (2) Turning enforcement on would make every manifest in the field a candidate for rejection on upgrade -- the field was accepted and never checked since 2.3, so nobody's schema has ever had to be right. (3) The grammar is a JSON-Schema-shaped subset precisely so a runtime need not ship a validator; formalising it walks that back. A host that wants payload validation does it in its `nac:action:requested` listener, where it also has the application context the schema does not. |
1338
2194
  | Should `validate_global()` findings carry a code from the published catalogue? | **DECIDED: yes, shipped in 2.5.0** | v2.5 | Every item of every bucket carries `code` + `severity`, so section 12 promise 4 now covers a real set instead of an empty one. The five codes are published under `global_buckets` in `api/latest/findings.json`, and the generator READS them off a fixture that provokes each bucket rather than writing them by hand -- the previous version wrote `code: null` for a bucket that had carried a code since 2.5.0 and published both claims in the same file. Building that fixture is also what found audit N-33: the validator could not see a manifest written in the canonical shape. See 10.1. |
1339
2195
 
1340
2196
  ---
@@ -1400,7 +2256,7 @@ code, is the authority.
1400
2256
 
1401
2257
  ---
1402
2258
 
1403
- ## 15. Plugin extension contract -- canvas + API surfaces (v2.5, extended in v2.6)
2259
+ ## 15. Plugin extension contract -- canvas + API surfaces (v2.5, extended in v2.6 and v2.7)
1404
2260
 
1405
2261
  Sections 1-14 assume the agent-relevant surface is **DOM**. Every
1406
2262
  addressable element has a `data-nac-id` attribute, every verb fires
@@ -1431,6 +2287,13 @@ for an observer with nothing to observe, and a declared code space for
1431
2287
  a plugin's own errors (15.9). A manifest written against v2.5 needs no
1432
2288
  changes.
1433
2289
 
2290
+ v2.7 adds no primitive either, and no manifest field. What it adds is
2291
+ 15.12: WHICH surface enters by which of the three doors, and why --
2292
+ so an adopter arriving with a virtualised grid, a map, a media player,
2293
+ an embedded PDF or a 3D scene finds their own case named instead of
2294
+ inferring it from silence. Nothing a v2.5 or v2.6 manifest does
2295
+ changes.
2296
+
1434
2297
  ### 15.1 Why a new primitive set
1435
2298
 
1436
2299
  DOM-only `NAC.click(id)` cannot:
@@ -1466,6 +2329,12 @@ NAC.describePlugin(slug: string): PluginDescriptor
1466
2329
  NAC.registerApiHandle(name: string, obj: object): void
1467
2330
  NAC.unregisterApiHandle(name: string): boolean
1468
2331
  NAC.apiHandles(): string[]
2332
+
2333
+ /* v2.7 -- the headless profile (sec 19) */
2334
+ NAC.profile(slug: string): PluginProfile
2335
+ NAC.setEventSink(fn: ((row: ProvenanceRow) => void) | null): typeof fn
2336
+ NAC.eventSink(): ((row: ProvenanceRow) => void) | null
2337
+ NAC.provenanceStatus(): ProvenanceStatus
1469
2338
  ```
1470
2339
 
1471
2340
  - `registerPlugin(slug, manifest)` registers a v2.5 plugin. A given
@@ -1495,10 +2364,29 @@ NAC.apiHandles(): string[]
1495
2364
  a manifest can reference with `handle`. The object itself never
1496
2365
  enters the manifest -- manifests stay pure JSON.
1497
2366
 
1498
- `call`, `read` and `subscribe` reach a surface and are therefore async
1499
- (Promise-returning). `unsubscribe`, `plugins`, `describePlugin` and the
1500
- handle registry only touch local state and are synchronous;
1501
- `unsubscribe` is also idempotent.
2367
+ - `profile(slug)` answers whether a registered plugin needs a document
2368
+ at all, MEASURED from its bindings and not from what it claimed
2369
+ (sec 19.1). `setEventSink(fn)` installs the one bus that is not the
2370
+ DOM, so the `nac:plugin:*` family survives where no document exists;
2371
+ `provenanceStatus()` reports which buses are live and counts every
2372
+ row that reached neither (sec 19.4). All four are SYNCHRONOUS: they
2373
+ read or write local state and reach no surface.
2374
+
2375
+ `call` and `read` reach a surface and are therefore async
2376
+ (Promise-returning). `subscribe` is **synchronous**: it validates the
2377
+ plugin, the event path and the backend, attaches the listener and
2378
+ returns the handle, all before returning -- so it signals failure by
2379
+ THROWING a `NacError`, not by rejecting. `unsubscribe`, `plugins`,
2380
+ `describePlugin` and the handle registry only touch local state and are
2381
+ synchronous too; `unsubscribe` is also idempotent.
2382
+
2383
+ That `subscribe` is synchronous is worth stating plainly, because this
2384
+ document said the opposite through v2.7 while the signature three
2385
+ paragraphs above declared the truth. A consumer that believed the prose
2386
+ would write `await NAC.subscribe(...)` -- which happens to work, since
2387
+ awaiting a non-Promise is free -- and then guard it with `.catch()`,
2388
+ which does not: the throw escapes uncaught and the page loses the very
2389
+ error this protocol named for it.
1502
2390
 
1503
2391
  ### 15.3 Plugin manifest shape
1504
2392
 
@@ -1507,6 +2395,9 @@ interface PluginManifest {
1507
2395
  slug: string;
1508
2396
  label?: string; /* v2.6 -- human name of the surface */
1509
2397
  hint?: string; /* v2.6 -- one line on what it is for */
2398
+ headless?: boolean; /* v2.7 -- the profile of sec 19: every
2399
+ binding reaches its surface with no
2400
+ document. Absent means false. */
1510
2401
  verbs: { [verb_path: string]: VerbBinding };
1511
2402
  state: { [state_path: string]: StateBinding[] };
1512
2403
  events: { [event_path: string]: EventBinding };
@@ -1571,6 +2462,12 @@ Verbs and events have **exactly one** binding. State has an
1571
2462
  **ordered array** of bindings: the runtime walks the chain in
1572
2463
  order, returning the first source that successfully resolved.
1573
2464
 
2465
+ `headless` (v2.7) is likewise optional, and declaring it is the ONLY
2466
+ way into the profile of section 19 -- it is never inferred. When it is
2467
+ declared, every binding is checked against the profile at register time
2468
+ (19.1); when it is absent the manifest behaves exactly as it did in
2469
+ 2.5 and 2.6.
2470
+
1574
2471
  Every field marked `v2.6` is OPTIONAL: a manifest written against
1575
2472
  v2.5 stays valid without changes. What is not optional is being
1576
2473
  well-formed WHEN declared -- a `label` that is not a string, or a
@@ -1601,9 +2498,9 @@ this document is 2.6 and not 2.5.3.
1601
2498
  **Fail-closed rule for an observer with nothing to observe (v2.6).**
1602
2499
  `synthetic-mutation` resolves every observed state path to the DOM
1603
2500
  element its primary `dom-mirror` binding selects. When a selector
1604
- matches no element, `subscribe` MUST reject with
1605
- `backend_target_missing`, naming the state paths and selectors that
1606
- did not resolve. It MUST NOT return a handle: a subscription that
2501
+ matches no element, `subscribe` MUST refuse with
2502
+ `backend_target_missing` -- by throwing, since it is synchronous (15.2)
2503
+ -- naming the state paths and selectors that did not resolve. It MUST NOT return a handle: a subscription that
1607
2504
  observes nothing resolves successfully and then never fires, which is
1608
2505
  precisely the silent damage this protocol exists to remove -- and
1609
2506
  until 2.5.2 that is what the reference runtime did.
@@ -1748,8 +2645,8 @@ never knows or cares which source answered.
1748
2645
 
1749
2646
  ### 15.9 Errors
1750
2647
 
1751
- `NAC.call` / `read` / `subscribe` reject with `NacError` whose `code`
1752
- is one of:
2648
+ `NAC.call` and `NAC.read` reject, and `subscribe` throws (15.2), with
2649
+ a `NacError` whose `code` is one of:
1753
2650
 
1754
2651
  - `plugin_not_registered` -- the slug has no v2.5 manifest.
1755
2652
  - `verb_not_declared` -- the verb path is not in the manifest.
@@ -1766,11 +2663,31 @@ is one of:
1766
2663
  - `state_unreadable` -- every binding in a state chain failed; see
1767
2664
  15.6.
1768
2665
  - `timeout` -- a backend did not respond within its declared
1769
- `timeout_ms` (default 5000 for verbs, 1000 for state reads).
2666
+ `timeout_ms`. The default is **5000 for verbs and 5000 for state
2667
+ reads**, and a binding sets its own with `timeout_ms`. Through 2.6
2668
+ this line published "1000 for state reads", which no release ever
2669
+ implemented: the one backend that can time out (`script-bridge`)
2670
+ reads `binding.timeout_ms || 5000` and never looks at who called it. The text is corrected
2671
+ rather than the code (D-16): cutting a read's default to 1000 would
2672
+ make a backend that answers in 1.4 s start timing out on upgrade,
2673
+ with nothing changed in the adopter's own code, and a read that
2674
+ fails slower than advertised costs latency where the other
2675
+ direction costs correctness.
1770
2676
  - `invalid` -- argument shape is wrong (bad slug, malformed
1771
2677
  manifest at register time, etc).
1772
-
1773
- **The plugin code space (v2.6).** The ten codes above are the whole
2678
+ - `no_document` (v2.7) -- a backend that reaches its surface THROUGH
2679
+ the document was dispatched where there is no document: no page, no
2680
+ iframe, no selector to resolve. Raised by the six DOM-requiring
2681
+ backends of 15.4, and -- outside this contract -- by the DOM
2682
+ primitives of sections 1 to 14, which until 2.6 let a raw
2683
+ `ReferenceError` through instead. See 19.3.
2684
+ - `provenance_unobservable` (v2.7) -- a plugin that declares
2685
+ `headless: true` was reached where its `nac:plugin:*` row can
2686
+ arrive nowhere: no document AND no event sink. Refused BEFORE the
2687
+ effect, because an action nobody can audit is the silent damage this
2688
+ protocol exists to remove. See 19.4.
2689
+
2690
+ **The plugin code space (v2.6).** The twelve codes above are the whole
1774
2691
  contract vocabulary, and they are deliberately about ROUTING: they say
1775
2692
  the protocol could not get there, never why the application said no. A
1776
2693
  plugin that needs a code of its own -- `row_not_materialized` as
@@ -1785,12 +2702,12 @@ throw e; /* inside the backend the manifest routes to */
1785
2702
  ```
1786
2703
 
1787
2704
  `NAC.call` and `NAC.subscribe` surface such a code verbatim on
1788
- `err.code`. A code that is NEITHER one of the ten NOR under the
2705
+ `err.code`. A code that is NEITHER one of the twelve NOR under the
1789
2706
  `plugin.` prefix is refused as `invalid`, with the refused string
1790
2707
  preserved on `err.offending_code`: an undeclared code that travelled
1791
2708
  anyway is how a vocabulary stops being a vocabulary. The prefix is
1792
- reserved -- the ten contract codes will never take it, so a plugin
1793
- code can never collide with a future one.
2709
+ reserved -- the contract codes will never take it, so a plugin code can
2710
+ never collide with a future one.
1794
2711
 
1795
2712
  ### 15.10 Discovery of the registry (v2.6)
1796
2713
 
@@ -1918,6 +2835,294 @@ Rules:
1918
2835
 
1919
2836
  ---
1920
2837
 
2838
+ ### 15.12 Which surface enters by which door (v2.7)
2839
+
2840
+ Sections 15.1 to 15.11 say HOW a plugin reaches a surface. They never
2841
+ said WHICH surfaces an adopter is expected to bring, so an evaluator
2842
+ arriving with a virtualised grid, a map, a video player, an embedded
2843
+ PDF or a WebXR scene found their own case in neither list -- not in
2844
+ what the protocol covers, not in what it declares out of scope -- and
2845
+ had to guess. Guessing in favour of the protocol is the expensive
2846
+ direction: it is discovered after the migration, not before.
2847
+
2848
+ This section is the answer, surface by surface. It adds no primitive,
2849
+ no backend and no manifest field: a manifest written against v2.5 or
2850
+ v2.6 needs no changes. What it adds is a door for each surface, and
2851
+ the reason.
2852
+
2853
+ There are three doors and only three:
2854
+
2855
+ - **DOM** (sections 1-14). The actionable thing is a node; the name
2856
+ resolves by querying the document.
2857
+ - **This extension contract** (section 15). The actionable thing is
2858
+ not a node, or the action is not a click. A plugin declares the
2859
+ routing and the runtime stays agnostic of the app.
2860
+ - **Out of scope**, declared. The surface is named as a published
2861
+ limit and the protocol refuses instead of degrading. A declared
2862
+ limit is a feature of a protocol whose whole claim is that it does
2863
+ not damage silently.
2864
+
2865
+ | Surface | Door | Where |
2866
+ |---|---|---|
2867
+ | Virtualised collections (react-window, TanStack Virtual, ag-grid) | extension contract | 15.12.1 |
2868
+ | Map canvases (Leaflet, Mapbox GL, Google Maps) | extension contract | 15.12.3 |
2869
+ | Media players reachable by script (Video.js, Plyr, the YouTube iframe API, a bare `<video>` or `<audio>`) | extension contract | 15.12.4 |
2870
+ | The browser's own media control bar | out of scope | 15.12.4 |
2871
+ | Embedded PDF in a DOM-based viewer (pdf.js and relatives) | extension contract | 15.12.5 |
2872
+ | Embedded PDF in the browser's built-in viewer | out of scope | 15.12.5 |
2873
+ | XR and 3D scenes (WebXR, Three.js, Babylon, Unity WebGL) | out of scope | 15.12.6 |
2874
+ | Voice-only interfaces with no document (a web IVR, a screenless assistant, a voice device) | extension contract, in the headless profile of section 19 -- and the intermediary of 11.1 | 15.12.7 |
2875
+
2876
+ The last row is the one this table could not fill when it shipped, and
2877
+ the reason it took its own decision is in 15.12.7: it was never a
2878
+ routing question.
2879
+
2880
+ #### 15.12.1 Virtualised collections
2881
+
2882
+ The most common surface in business software, and the one where this
2883
+ protocol most resembles its own enemy: the first twenty rows answer,
2884
+ row 4000 does not, because the virtualiser never mounted it. A name
2885
+ that works until the user scrolls is exactly the silent damage NAC3
2886
+ exists to remove.
2887
+
2888
+ Routing is not the hard part -- a virtualiser has an API and
2889
+ `sdk-call` reaches it. The hard part is that in a virtualised
2890
+ collection IDENTITY OUTLIVES THE NODE, while section 7 resolves names
2891
+ by querying the document. The rules:
2892
+
2893
+ 1. A row's name is derived from its key in the DATA -- a primary key,
2894
+ a stable ordinal -- and never from its position on screen. A name
2895
+ that means "the third visible row" is not addressable: after a
2896
+ scroll it points at a different row.
2897
+ 2. The DOM primitives (section 5) keep their meaning exactly. With the
2898
+ row unmounted `NAC.find` resolves nothing and `NAC.click` fails
2899
+ closed. That is correct, and a runtime MUST NOT work around it by
2900
+ scrolling on its own: moving a user's viewport to satisfy a lookup
2901
+ is a side effect nobody asked for.
2902
+ 3. Reaching a row that the DATA has and the DOM does not is a plugin
2903
+ call, and the plugin MUST distinguish the two failures with two
2904
+ codes of its own (15.9):
2905
+ - `plugin.row_not_materialized` -- the row exists in the
2906
+ collection and is not mounted. Retryable after materialisation.
2907
+ - `plugin.row_not_found` -- there is no such row. Retrying will
2908
+ never work.
2909
+ One code for both is the defect this rule forbids: with a single
2910
+ code an agent cannot tell "scroll and try again" from "stop".
2911
+ 4. Materialisation is a DECLARED VERB of the plugin and the adopter
2912
+ owns it, because only the adopter knows which scroll container and
2913
+ which API bring a row in. The verb MUST be idempotent: asking for a
2914
+ row already on screen succeeds without moving anything.
2915
+ 5. A subscription scoped to a row that is not mounted is a declared
2916
+ choice and never an accident. Declared WITHOUT `root`, it MUST be
2917
+ refused with `backend_target_missing` (15.4): a handle that never
2918
+ fires is a silent failure wearing the shape of a success. Declared
2919
+ WITH `root` -- a container that outlives the row -- it is accepted
2920
+ and fires when the row mounts, and that is the form a virtualised
2921
+ collection should publish.
2922
+ 6. A name taken while the row was on screen and used after it was
2923
+ unmounted behaves as (2) and (3) say: the name stays valid, the
2924
+ node does not, and the answer says which of the two happened.
2925
+
2926
+ **`declareVirtual` is the path that came before this door, and it keeps
2927
+ working.** `NAC.declareVirtual(spec)` has been in the extensions module
2928
+ since 2.0 -- a slug pattern with `{i}`, a count and a resolver -- and it
2929
+ answers this same surface through the DOM door. It resolves a row in one
2930
+ call and returns `null` for BOTH failures: the pattern that matched
2931
+ nothing, and the index outside the collection. That is one code for two
2932
+ answers, which is what rule 3 forbids. The owner blessed THIS door (D-30,
2933
+ 2026-11-27): a virtualised collection enters through the extension
2934
+ contract of section 15, and that is what a new adopter writes.
2935
+ `declareVirtual` is neither removed nor deprecated into a warning --
2936
+ promise 7 of section 12 means code written against it in 2.0 keeps
2937
+ running unchanged -- but it does not satisfy rule 3, so an agent driving
2938
+ a collection through it can only retry blindly. The two are not
2939
+ equivalent, and which one a tree uses is not a matter of taste.
2940
+
2941
+ Reference plugin and receipt: `demos/v27-virtual-grid/`, 10,000 rows
2942
+ over a hand-written virtualiser, driven by
2943
+ `scripts/run-demo-v27-virtual-grid.mjs`.
2944
+
2945
+ #### 15.12.2 Positions, instants and areas are arguments, not names
2946
+
2947
+ Three surfaces in the table -- maps, media timelines and 3D scenes --
2948
+ share one problem that has nothing to do with how they are reached:
2949
+ what the user wants to act on is a POINT IN A CONTINUOUS SPACE.
2950
+ "Centre on Berlin." "Go to minute four." "Select everything within
2951
+ this radius." A name cannot say that, and there are infinitely many
2952
+ such points, so no registry of names can enumerate them.
2953
+
2954
+ NAC3 does NOT add a continuous addressing scheme. That is a decision,
2955
+ not an omission. The vocabulary is the one 15.11 already publishes:
2956
+
2957
+ - The ELEMENT is named: the map, the player, the scene. One id.
2958
+ - The POSITION is an ARGUMENT of a declared verb -- typed, with its
2959
+ unit and its range in `params` (15.11). `view.set` takes degrees;
2960
+ `media.seek` takes seconds; a radius takes metres.
2961
+ - An agent composes the call from that declaration and never has to
2962
+ guess the unit, which is the whole reason `unit` exists.
2963
+
2964
+ **Confirming an effect on a value that moves.** Sections 6 and 18
2965
+ confirm an action by observing a discrete change. A continuous value
2966
+ defeats that: by the time a read returns, the value has moved, so
2967
+ equality on a sampled value is not a confirmation -- it is a race the
2968
+ protocol would lose at sixty frames per second. The contract:
2969
+
2970
+ 1. If the surface emits its own settle event -- `moveend`, `seeked`,
2971
+ `ratechange` -- the plugin MUST declare it (`emitter-listen`,
2972
+ 15.4) and THAT event is the confirmation. This is the preferred
2973
+ form, because the surface itself says when it stopped moving.
2974
+ 2. If it emits none, the plugin's verb MUST NOT resolve on an equality
2975
+ test. It resolves once its backend observed the requested value
2976
+ within a TOLERANCE the plugin owns and declares in its own
2977
+ documentation -- a seek is confirmed within a frame, not to the
2978
+ microsecond. The tolerance belongs to the plugin, never to the
2979
+ runtime: the runtime cannot know what "close enough" means on a
2980
+ surface it knows nothing about.
2981
+ 3. An agent MUST NOT read a continuous state twice and infer an
2982
+ effect from the difference. Something else may have moved it: the
2983
+ user, an animation, the media clock.
2984
+
2985
+ #### 15.12.3 Map canvases
2986
+
2987
+ A real map is MIXED, and the published canvas limit reads as if it
2988
+ were not. The controls -- zoom buttons, layer switcher, search box --
2989
+ are ordinary DOM and are covered by sections 1-14. The tiles are
2990
+ always images. The markers are DOM in Leaflet and pixels in Mapbox GL
2991
+ or deck.gl. So "a map is canvas, therefore excluded" is wrong in both
2992
+ directions, and an adopter of Leaflet who read the limit and concluded
2993
+ their map was entirely covered also had the wrong answer.
2994
+
2995
+ The door: the controls by DOM, everything else by this contract. The
2996
+ view is set with a verb whose `params` declare degrees and a zoom
2997
+ level (15.11), read back through a state path, and confirmed with the
2998
+ library's own `moveend` (15.12.2 rule 1). Pixels are never read, and a
2999
+ marker painted into a canvas is reachable only if the library can name
3000
+ it in its own API -- which is the plugin's declaration to make, not a
3001
+ promise this protocol makes for it.
3002
+
3003
+ Reference plugin and receipt: `demos/v26-leaflet-plugin/` against
3004
+ Leaflet 1.9.4, driven by `scripts/run-demo-v26-leaflet-plugin.mjs` --
3005
+ a library this project does not control and cannot adjust if the
3006
+ contract does not fit.
3007
+
3008
+ #### 15.12.4 Media players
3009
+
3010
+ What is actionable in a player is half buttons and half an INSTANT.
3011
+ The buttons are DOM when the player draws its own; the instant is
3012
+ 15.12.2. Two cases, and the line between them is not where an adopter
3013
+ expects it:
3014
+
3015
+ - **A player reachable by script** -- Video.js, Plyr, the YouTube
3016
+ iframe API, or a bare `<video>` / `<audio>` element -- enters by
3017
+ this contract. A media element IS an API: `currentTime`,
3018
+ `playbackRate` and `textTracks` are scriptable, so even a player
3019
+ whose CONTROLS belong to the browser is drivable through its
3020
+ element.
3021
+ - **The browser's own control bar** -- what `<video controls>` paints
3022
+ -- is out of scope, for the same reason as a closed shadow root: it
3023
+ is rendered by the user agent, not by the document. It exposes no
3024
+ nodes, it cannot carry an attribute, and NAC3 does not read pixels.
3025
+ An agent that asks for the pause button of the native bar does not
3026
+ get it. It gets `media.pause` on the element, which is the same
3027
+ effect through a door that exists.
3028
+
3029
+ Verbs declare their units: a seek takes seconds, a rate takes a
3030
+ multiplier, a subtitle track takes a BCP 47 language tag.
3031
+ Confirmation uses the element's own events -- `seeked`, `ratechange`,
3032
+ `cuechange` -- per 15.12.2 rule 1; a player that emits none falls to
3033
+ rule 2.
3034
+
3035
+ Reference plugin and receipt: `demos/v27-media-player/`, driven by
3036
+ `scripts/run-demo-v27-media-player.mjs`.
3037
+
3038
+ #### 15.12.5 Embedded PDF
3039
+
3040
+ The only surface in the table whose honest answer depends on the
3041
+ VIEWER and not on the protocol, so it gets both halves of the answer
3042
+ instead of one verdict.
3043
+
3044
+ - **The browser's built-in viewer** -- what a bare `<embed>`, or an
3045
+ `<iframe>` pointed at a `.pdf`, gets you -- is OUT OF SCOPE. It is
3046
+ an internal user-agent surface: no nodes, no attributes, nothing a
3047
+ document can mark, and reading it would mean reading pixels. An
3048
+ agent that asks for "page 7" of that viewer gets a refusal, not a
3049
+ guess.
3050
+ - **A DOM-based viewer** -- pdf.js and its relatives -- enters by this
3051
+ contract. The page is an argument with a unit (`page`), not a name,
3052
+ per 15.12.2; the text layer is real DOM; the fields of an AcroForm
3053
+ live in the document and not in the page, so they are reachable
3054
+ only through the viewer's API and the plugin declares them one by
3055
+ one or not at all.
3056
+
3057
+ Neither half promises OCR, layout inference or pixel reading. A PDF
3058
+ that is a scan of paper carries no text to reach, and no door in this
3059
+ protocol changes that.
3060
+
3061
+ #### 15.12.6 XR and 3D scenes
3062
+
3063
+ Out of scope, by its own name, and NOT as a special case of canvas --
3064
+ the reason is different and an adopter deserves the real one. A WebXR
3065
+ scene is painted through WebGL, so the canvas limit happens to contain
3066
+ it, but pixels are not what makes it unreachable:
3067
+
3068
+ 1. The addressable unit is an entity with a pose and an orientation in
3069
+ three dimensions, occluded by other entities. A name does not
3070
+ locate it, and 15.12.2 declares that this protocol does not address
3071
+ a continuous space.
3072
+ 2. There is no click. Selection is gaze, grab or controller, and it
3073
+ has duration.
3074
+ 3. The scene renders at 72 to 90 frames per second with no discrete
3075
+ event saying an action happened, so section 18 effect detection has
3076
+ nothing to anchor to.
3077
+
3078
+ There is also no DOM-shaped standard to route to: Three.js, Babylon,
3079
+ A-Frame and Unity WebGL each expose a different scene tree, and none
3080
+ of them is the document.
3081
+
3082
+ If an adopter brings a real case, the door would be this contract
3083
+ against the scene tree of one engine -- A-Frame, whose entities are
3084
+ elements, is the realistic target -- and that is a future decision,
3085
+ not a promise made here. Spending the protocol's budget on the rarest
3086
+ surface before the most common one (15.12.1) would be the wrong order.
3087
+
3088
+ #### 15.12.7 Voice-only interfaces, with no document at all
3089
+
3090
+ A voice-only interface has nothing to mark: a web IVR, an assistant
3091
+ embedded in a device, a voice runner with no page open. Until 2.7 this
3092
+ protocol was spoken BY voice over a document -- the voice was the input
3093
+ channel and the page was still the surface.
3094
+
3095
+ This was the one row the 15.12 table could not fill when it shipped,
3096
+ and not because the routing was hard. It asks whether a MANIFEST alone
3097
+ is enough to operate an application, and the two possible answers are
3098
+ two different definitions of NAC3 that cannot both be true: a markup
3099
+ layer for documents, or a contract about capabilities whose most common
3100
+ incarnation is a document. Owner decision D-26 (2026-11-25) chose the
3101
+ second and asked for both doors to be built.
3102
+
3103
+ So this surface enters by two doors at once, which no other row of the
3104
+ table does:
3105
+
3106
+ - **The application side** enters by this extension contract, in the
3107
+ **headless profile** of section 19. The manifest is the surface;
3108
+ every binding reaches it without a document; and the provenance that
3109
+ used to vanish where no document existed now travels over a bus that
3110
+ is not the DOM.
3111
+ - **The agent side** enters by the **intermediary** of section 11.1.
3112
+ The capability snapshot is the manifest rather than a page, and the
3113
+ dispatcher calls `call` where a page would have called `click`.
3114
+
3115
+ What this does NOT bring in is speech. A recogniser and a synthesiser
3116
+ are outside this spec (section 11) and stay there: a protocol that
3117
+ promised to transcribe would be promising something it does not
3118
+ implement, and 15.12 exists to stop exactly that.
3119
+
3120
+ Reference plugin and receipt: `demos/v27-headless-voice/`, driven by
3121
+ `scripts/run-demo-v27-headless-voice.mjs` -- no browser, no network, no
3122
+ microphone, because the absence of a screen is the surface under test.
3123
+
3124
+ ---
3125
+
1921
3126
  ## 16. Tree navigation (v2.5 -- SHIPPED in 2.5.0-alpha.5 / RFC V25-02)
1922
3127
 
1923
3128
  Hierarchical command navigation primitives for assistive flows and
@@ -2017,7 +3222,177 @@ some specific value at some point".
2017
3222
 
2018
3223
  ---
2019
3224
 
3225
+ ## 19. Headless profile -- the manifest as the surface (v2.7)
3226
+
3227
+ Sections 1 to 14 address nodes. Section 15 addresses a surface a node
3228
+ cannot reach. Neither says what happens when there is no document AT
3229
+ ALL, and 15.12.7 sends that case here.
3230
+
3231
+ This section adds no primitive and no backend. What it says is that the
3232
+ extension contract ALREADY is a capability interface: a plugin whose
3233
+ every binding reaches its surface without a document is operable with
3234
+ no document, and `plugins()` + `describePlugin()` are the resolution
3235
+ surface, because they read the manifest and never the page. What was
3236
+ missing was not routing. It was the declaration, the refusals, and one
3237
+ thing that was genuinely absent -- a provenance bus that is not the DOM.
3238
+
3239
+ **What this decides about the protocol**, because the two statements
3240
+ cannot both be true: NAC3 is a contract about CAPABILITIES. The
3241
+ document is its most common incarnation, the one every section before
3242
+ 15 is written for, and the one an adopter should still reach for when a
3243
+ page exists -- but it is not the definition. A name resolves against
3244
+ whatever the contract says it resolves against: a node, where there is
3245
+ a document; a declared verb, state or event path, where there is not.
3246
+
3247
+ ### 19.1 The profile is declared, and the predicate is mechanical
3248
+
3249
+ A manifest enters the profile by declaring it:
3250
+
3251
+ ```json
3252
+ { "slug": "clinic", "headless": true, "verbs": { }, "state": { }, "events": { } }
3253
+ ```
3254
+
3255
+ Of the nine backends of 15.4, three reach their surface without a
3256
+ document and six do not. This is a property of what each one does, not
3257
+ a policy:
3258
+
3259
+ | Backend | In the profile? | Why |
3260
+ |---|---|---|
3261
+ | `sdk-call` | yes | walks a dotted path on a registered API handle, or on the global object |
3262
+ | `emitter-listen` | yes | subscribes to the library's own emitter |
3263
+ | `synthetic-poll` | inherits | re-reads the state paths it observes; DOM-free exactly when all of them are |
3264
+ | `postmessage` | no | posts to the `contentWindow` of an iframe a CSS selector matched |
3265
+ | `postmessage-listen` | no | filters `window.message` by that same iframe |
3266
+ | `script-bridge` | no | posts to the `contentWindow` of an iframe a CSS selector matched |
3267
+ | `dom-mirror` | no | reads a DOM element a CSS selector matched |
3268
+ | `same-origin-window` | no | reads into an iframe's `contentWindow` |
3269
+ | `synthetic-mutation` | no | observes DOM mutations with a `MutationObserver` |
3270
+
3271
+ The rules:
3272
+
3273
+ 1. **The profile is never inferred.** `headless` absent means outside
3274
+ it, which is every manifest written before 2.7. Declared, it MUST be
3275
+ a boolean: the string `"true"` is a typo that would silently leave
3276
+ the plugin outside the profile it meant to enter, so it is refused
3277
+ and not coerced.
3278
+ 2. **A declared manifest is CHECKED at register time.**
3279
+ `registerPlugin` MUST reject with `invalid` when any binding needs
3280
+ a document, naming the offending ones -- the reference runtime also
3281
+ hands back the whole list on `err.dom_required`. The adopter learns
3282
+ on the bench, not on a device with no screen.
3283
+ 3. **A state chain is checked WHOLE, not at its first link.** A chain
3284
+ whose fallback is a `dom-mirror` works in a browser and degrades to
3285
+ nothing without one. Outside the profile that is a legitimate
3286
+ fallback chain (15.6); inside it, it is a declaration error.
3287
+ 4. **`synthetic-poll` inherits the question** from every state path it
3288
+ observes, and an observed path the manifest does not declare is
3289
+ itself refused: a poll over an undeclared state resolves and then
3290
+ never fires, which is the failure shape 15.4 already refuses.
3291
+ 5. **`profile(slug)` answers for ANY registered plugin**, declared or
3292
+ not, and separates the two questions:
3293
+ `declared_headless` is what the manifest claimed; `headless` is
3294
+ what its bindings measure. They differ when a manifest would work
3295
+ with no page and never said so, which is a thing an agent can
3296
+ usefully discover.
3297
+ 6. **The descriptor carries it.** `plugins()` and `describePlugin()`
3298
+ expose `headless`, so an agent that discovered a plugin does not
3299
+ need a second call to learn whether it needs a page.
3300
+
3301
+ ### 19.2 Resolution without a document
3302
+
3303
+ The id space of this profile is the manifest's own paths -- verbs,
3304
+ state, events. There are no `data-nac-*` attributes, because there is
3305
+ nothing to put them on.
3306
+
3307
+ An agent therefore resolves in three steps, all of which already
3308
+ existed: `plugins()` to discover, `describePlugin(slug)` to read the
3309
+ shape (the labels, hints, params and units of 15.11 are what make it
3310
+ speakable), `call` / `read` / `subscribe` to act. There is no
3311
+ `describe()` snapshot, because there is nothing to snapshot: the
3312
+ manifest IS the snapshot, and unlike a page it does not change while
3313
+ the agent is reading it.
3314
+
3315
+ ### 19.3 The DOM primitives fail closed
3316
+
3317
+ With no document, the primitives of sections 1 to 14 MUST refuse with
3318
+ `no_document` -- `find`, `click`, `fill`, `describe`, `narrate`,
3319
+ `tree`, `context`, `validate_global` and anything else that resolves a
3320
+ name by querying the document. The refusal names the way in that does
3321
+ exist (`call` / `read` / `subscribe`).
3322
+
3323
+ Two notes, because the previous behaviour was worse than useless:
3324
+
3325
+ - Through 2.6 those primitives threw a raw
3326
+ `ReferenceError: document is not defined` from whichever line
3327
+ happened to touch it first. That is not a code a caller can branch
3328
+ on, and it reads like a bug in the runtime rather than a refusal.
3329
+ - `validate_global()` returned `{ok: true}` for a tree that does not
3330
+ exist. A false green is worse than a crash: a build step could
3331
+ report a conformant page where there was no page.
3332
+
3333
+ What this does NOT change: importing the runtime where no document
3334
+ exists -- Node, a worker, an SSR build -- is still supported and still
3335
+ silent, as it has been since 2.2.1. Only CALLING a DOM primitive
3336
+ refuses, and it refuses by name.
3337
+
3338
+ ### 19.4 Confirmation and provenance without DOM events
3339
+
3340
+ The `nac:plugin:*` family of 15.7 is dispatched on `document`. With no
3341
+ document, every release through 2.6 lost it: the dispatch sat inside a
3342
+ `try/catch`, the call reported success, and nothing anywhere said a row
3343
+ had been dropped. An unauditable action is the silent damage section 7
3344
+ exists to remove, and the runtime was committing it.
3345
+
3346
+ - **`setEventSink(fn)` installs a bus that is not the DOM.** The sink
3347
+ receives `{type, detail}` with the SAME type names and the SAME
3348
+ detail shapes as the DOM family: the bus changes, the contract does
3349
+ not. It is ADDITIVE -- where a document exists the events still reach
3350
+ it, so installing a sink to collect an audit log takes nothing away
3351
+ from an existing consumer.
3352
+ - **A sink MUST NOT throw.** The effect has already happened when the
3353
+ row is emitted, so a runtime MUST NOT undo it and MUST NOT retry.
3354
+ What it owes the caller is the count: a row lost to a throwing sink
3355
+ is reported in `provenanceStatus().sink_errors`.
3356
+ - **Inside the profile, no bus means no call.** When a plugin declares
3357
+ `headless: true` and there is neither a document nor a sink,
3358
+ `call` / `read` / `subscribe` MUST refuse with
3359
+ `provenance_unobservable` BEFORE dispatching. The refusal names
3360
+ `setEventSink` as the way out.
3361
+ - **Outside the profile, the loss is COUNTED.** A manifest that never
3362
+ declared the profile keeps the 2.6 behaviour exactly -- the call goes
3363
+ through and the row is dropped -- but the drop lands in
3364
+ `provenanceStatus().dropped`. Counting is the floor; refusing would
3365
+ turn an upgrade into a breaking change for every adopter who runs the
3366
+ runtime server-side today.
3367
+ - **Effect confirmation is the rule of 15.12.2 again.** The effect of
3368
+ an action is confirmed by the surface's own event, through
3369
+ `emitter-listen`, or by reading declared state with `expect` /
3370
+ `diff` (section 18). Never by a DOM event: there is none.
3371
+
3372
+ ### 19.5 What the profile does not promise
3373
+
3374
+ - **No speech.** Recognition and synthesis are outside this spec
3375
+ (section 11) and this profile does not bring them in.
3376
+ - **No transport.** A headless plugin is not automatically remote. How
3377
+ the agent and the application reach each other -- in process, over a
3378
+ socket, across a queue -- is the adopter's, exactly as it was for a
3379
+ page.
3380
+ - **It is not a permission system**, for the same reason the DOM
3381
+ profile is not: a declared verb is an intent-level signal and the
3382
+ server still authorises every call.
3383
+ - **It does not say a voice application SHOULD be headless.** A page
3384
+ that exists and is marked up is the common case and the cheaper one.
3385
+ This profile is for the case where there is no page at all.
3386
+
3387
+ Reference plugin and receipt: `demos/v27-headless-voice/`, driven by
3388
+ `scripts/run-demo-v27-headless-voice.mjs`. It books an appointment end
3389
+ to end in a process with no `document` and no `window`, loading the
3390
+ runtime from the published package entry; the evidence of a screenless
3391
+ run is a transcript and an audit trail, not a screenshot.
3392
+
3393
+ ---
3394
+
2020
3395
  *This document is the canonical NAC3 v2.5 specification.
2021
3396
  Sections 0-14 are unchanged from v2.4 stable. Sections 15-18 ship
2022
- in v2.5. Edits to this file constitute spec changes and require an
2023
- RFC; see `CONTRIBUTING.md`.*
3397
+ in v2.5; section 19 ships in v2.7. Edits to this file constitute spec
3398
+ changes and require an RFC; see `CONTRIBUTING.md`.*