@nac3/runtime 2.5.0-alpha.5 → 2.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +1017 -887
- package/README.md +145 -145
- package/SPEC.md +1761 -1442
- package/contract-head.json +16 -0
- package/dist/cli-levels.json +214 -0
- package/dist/cli-url.mjs +751 -0
- package/dist/cli.js +232 -38
- package/dist/nac-chat-client.d.ts +5 -75
- package/dist/nac-v2-extensions.d.ts +71 -68
- package/dist/nac.browser.js +118 -31
- package/dist/nac.cjs +118 -31
- package/dist/nac.d.ts +140 -34
- package/dist/nac.mjs +118 -31
- package/package.json +19 -19
package/CHANGELOG.md
CHANGED
|
@@ -1,887 +1,1017 @@
|
|
|
1
|
-
# Changelog
|
|
2
|
-
|
|
3
|
-
## 2.5.0
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
the
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
(
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
`
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
and
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
`
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
requires
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
- **`
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
- **`
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
-
|
|
160
|
-
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
expected
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
across
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
- `
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
- `
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
-
|
|
241
|
-
|
|
242
|
-
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
-
|
|
283
|
-
`
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
- `
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
- `NAC.
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
`
|
|
370
|
-
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
- `
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
`
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
}
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
-
|
|
546
|
-
|
|
547
|
-
`
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
-
|
|
552
|
-
|
|
553
|
-
for
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
`nac:action:succeeded`
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
###
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
`
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
- `
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
- `
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 2.5.0 -- 2026-10-26
|
|
4
|
+
|
|
5
|
+
Stabilises the 2.5 line. First stable release of the 2.5 series: `latest`
|
|
6
|
+
points here, and the stability guarantees of SPEC section 10 and the
|
|
7
|
+
finding-code guarantees of section 12 begin at this version.
|
|
8
|
+
|
|
9
|
+
### Fixed
|
|
10
|
+
|
|
11
|
+
- **`fill()` no longer throws on a host with a partial DOM, and the
|
|
12
|
+
fallback it always had is finally reachable** (audit N-44). `fill()`
|
|
13
|
+
writes an input value through the native property setter on
|
|
14
|
+
`HTMLInputElement.prototype` rather than with `el.value = v`, because
|
|
15
|
+
React tracks the original setter and a plain assignment is silently
|
|
16
|
+
reverted on the next render -- a controlled input never sees the
|
|
17
|
+
value. A fallback existed for a host without those constructors, and
|
|
18
|
+
it could never run: the guard tested the property DESCRIPTOR while
|
|
19
|
+
the expression producing it reached through
|
|
20
|
+
`window.HTMLInputElement.prototype`. On a partial DOM -- a test shim,
|
|
21
|
+
an SSR or headless context -- `fill()` threw
|
|
22
|
+
`TypeError: Cannot read properties of undefined (reading 'prototype')`
|
|
23
|
+
before any fallback could run, and that TypeError carries no `code`,
|
|
24
|
+
so a caller branching on the error contract got nothing usable.
|
|
25
|
+
The three call sites (`checked`, `SELECT.value`,
|
|
26
|
+
`INPUT`/`TEXTAREA.value`) now share one helper that checks the
|
|
27
|
+
constructor before the descriptor.
|
|
28
|
+
**No change in a browser:** the constructors always exist there, the
|
|
29
|
+
native setter is used exactly as before, and a Chromium lock
|
|
30
|
+
(`npm run test:fill-setter`) now proves it by spying on the
|
|
31
|
+
instance property the native setter bypasses.
|
|
32
|
+
|
|
33
|
+
- **The copy-paste install snippet on the project landing page
|
|
34
|
+
published an `integrity` hash that matched no released file** (audit
|
|
35
|
+
N-40). It carried the hash computed over CRLF bytes from a Windows
|
|
36
|
+
working tree; the fix that moved every real `<script>` tag onto the
|
|
37
|
+
LF hash never reached the snippet, because the snippet is
|
|
38
|
+
HTML-escaped and so was not a script tag. Anyone who copied it got a
|
|
39
|
+
browser that refused to execute the runtime, reported only as a
|
|
40
|
+
console line. Does not affect `npm install`; it affected the
|
|
41
|
+
documented CDN path. The snippet hash now has a single producer and
|
|
42
|
+
the gate refuses any `sha384` on the page that is not a published
|
|
43
|
+
hash.
|
|
44
|
+
|
|
45
|
+
- **`validate_global()` can see a manifest written the documented way**
|
|
46
|
+
(audit N-33). The id collector behind it read only the legacy manifest
|
|
47
|
+
groups (`actions`, `fields`, `tabs`, `kpis`, `charts`, keyed by
|
|
48
|
+
`nac_id`) and never the canonical `elements: [{ id }]` shape of SPEC
|
|
49
|
+
section 4 -- the shape every demo ships and the rest of the runtime
|
|
50
|
+
reads. Against a canonical manifest it reported `total_ids: 0`, listed
|
|
51
|
+
every declared element as an orphan, could not report a duplicate, an
|
|
52
|
+
unmounted id or a convention violation at all, and still answered
|
|
53
|
+
`ok: true`. Measured on this project's own landing page: 2 plugins,
|
|
54
|
+
64 declared elements, `total_ids: 0`, 128 orphans. After the fix:
|
|
55
|
+
`total_ids: 64`, 64 orphans -- and those 64 are exactly the undeclared
|
|
56
|
+
ids a separate audit had counted by hand.
|
|
57
|
+
**Upgrade note:** a host that gates CI on `has_errors` may see its
|
|
58
|
+
first failure after upgrading. That is a true positive that was always
|
|
59
|
+
there, not a new rule. Both manifest shapes are read from now on.
|
|
60
|
+
|
|
61
|
+
### Added
|
|
62
|
+
|
|
63
|
+
- **`nac validate <url>` loads the page and REPORTS A CONFORMANCE
|
|
64
|
+
LEVEL** (audit N-18, second half). Until now URL mode aborted with
|
|
65
|
+
exit 2 and a message about Playwright, and no mode of the CLI ever
|
|
66
|
+
printed a level -- while SPEC section 8 said, in those words, that
|
|
67
|
+
this command "reports the highest level a page reaches".
|
|
68
|
+
|
|
69
|
+
The validator loads the page in a real browser, waits for the manifest
|
|
70
|
+
registry to stop moving rather than for a fixed sleep, and reports
|
|
71
|
+
against the identifiers published in `levels.json`. It follows the
|
|
72
|
+
published rule: a level is asserted only when every machine-checkable
|
|
73
|
+
requirement of that level and of every lower level passes, and
|
|
74
|
+
anything no tool can decide is reported `unverified` -- never assumed.
|
|
75
|
+
Three verdicts, and the difference between the last two is the point:
|
|
76
|
+
`pass` measured and it holds, `fail` measured and it does not,
|
|
77
|
+
`unverified` **not measured**.
|
|
78
|
+
|
|
79
|
+
Every level it reports carries its coverage -- "asserted on N of M
|
|
80
|
+
requirements" -- and the words *this is a measurement, not a
|
|
81
|
+
certification*. Directory mode now says out loud that it cannot decide
|
|
82
|
+
a level, instead of printing a finding count a reader could mistake
|
|
83
|
+
for one.
|
|
84
|
+
|
|
85
|
+
- `--drive` clicks the advertised controls, which is what decides the
|
|
86
|
+
two behavioural requirements of level 1. Off by default: clicking
|
|
87
|
+
every control on somebody's production page is not a read-only
|
|
88
|
+
operation.
|
|
89
|
+
- `--json` emits the whole report. `--timeout`, `--drive-roles`,
|
|
90
|
+
`--drive-limit` for the rest.
|
|
91
|
+
- **Playwright is optional and is NOT a dependency of this package.**
|
|
92
|
+
It is resolved at call time; when it is missing the CLI exits 3 and
|
|
93
|
+
prints the two commands that install it. A runtime that pulled a
|
|
94
|
+
browser into every adopter's `node_modules` to offer a tool most of
|
|
95
|
+
them never run would be charging everyone for nobody.
|
|
96
|
+
|
|
97
|
+
The level definitions are NOT in the CLI. They are generated from
|
|
98
|
+
SPEC section 8 through the same module that produces
|
|
99
|
+
`api/v/<version>/levels.json`, and each requirement publishes the name
|
|
100
|
+
of the `decider` that judges it. The build refuses to emit a CLI whose
|
|
101
|
+
decider table disagrees with the contract in either direction.
|
|
102
|
+
|
|
103
|
+
- **The contract publishes the `conformance_tier` vocabulary**
|
|
104
|
+
(audit N-29). `contract.json` used to publish the field as
|
|
105
|
+
`type: "string"` and not its values, so a machine could see the field
|
|
106
|
+
and had no way to learn that `NAC-3-versioned` is not a level name.
|
|
107
|
+
It now publishes the three values with what each one requires, which
|
|
108
|
+
one this runtime declares, where they are defined, and the sentence
|
|
109
|
+
that separates the two taxonomies: a **tier** describes what the
|
|
110
|
+
runtime implements (RFC V24-04 section 6); a **level** describes what
|
|
111
|
+
the page declares and does (SPEC section 8). The values are extracted
|
|
112
|
+
from the RFC, never typed, and the build refuses any disagreement
|
|
113
|
+
between the RFC, the sidecar and the value the runtime declares.
|
|
114
|
+
|
|
115
|
+
- **Every `validate_global()` bucket carries `code` + `severity`**
|
|
116
|
+
(audit N-14, SPEC sec 10.1 + 12 promise 4). New codes:
|
|
117
|
+
`nac_id_duplicate_across_plugins` (error),
|
|
118
|
+
`nac_id_orphan_in_dom` (warn),
|
|
119
|
+
`nac_id_declared_not_mounted` (warn),
|
|
120
|
+
`nac_id_missing_plugin_prefix` (warn).
|
|
121
|
+
`plugin_instance_violations` already carried
|
|
122
|
+
`duplicate_plugin_no_instance_id`. Promise 4 of section 12 named this
|
|
123
|
+
validator while every bucket was uncoded, so it covered an empty set;
|
|
124
|
+
it covers a real one now. The codes are published with their severity
|
|
125
|
+
and a fix under `global_buckets` in `api/latest/findings.json`.
|
|
126
|
+
|
|
127
|
+
### Changed
|
|
128
|
+
|
|
129
|
+
- **SPEC section 10.1 describes the shape the runtime actually returns**
|
|
130
|
+
(audit N-34): an object of named buckets, not the flat array of
|
|
131
|
+
findings the section had documented since before 1.0.
|
|
132
|
+
|
|
133
|
+
## 2.5.0-alpha.5 -- 2026-05-25
|
|
134
|
+
|
|
135
|
+
NAC3 v2.5.0-alpha.5 ships the remaining three assistive blocks of
|
|
136
|
+
the v2.5 line: **Block B tree navigation**, **Block C assistive
|
|
137
|
+
labels**, **Block D effect detection**. The full v2.5 surface is
|
|
138
|
+
now GA: every SHIPPED RFC (V24-01/02/04/05 + V25-01/02/03/04) has
|
|
139
|
+
runtime code + Layer 2 demo + Layer 3 Pilot LIVE evidence.
|
|
140
|
+
|
|
141
|
+
### Added
|
|
142
|
+
|
|
143
|
+
- **`NAC.narrate(plugin, nac_id) -> string | null`** (RFC V25-03 /
|
|
144
|
+
SPEC sec 17). Canonical human-readable label resolution. Priority:
|
|
145
|
+
`aria-label > visible text > data-nac-label > nac_id`. Nested
|
|
146
|
+
addressable children excluded from parent's visible-text. Whitespace
|
|
147
|
+
values at any tier fall through.
|
|
148
|
+
- **`NAC.context(plugin) -> { breadcrumb: [{nac_id, label}, ...] }`**
|
|
149
|
+
(RFC V25-02 / SPEC sec 16). Walks up from `document.activeElement`
|
|
150
|
+
through addressable ancestors. Labels via narrate.
|
|
151
|
+
- **`NAC.tree(plugin, rootId?) -> [{nac_id, label, opens?, leaf?}, ...]`**
|
|
152
|
+
(RFC V25-02). Enumerates IMMEDIATE addressable children of rootId
|
|
153
|
+
(or the plugin root). Honours `data-nac-opens` and `data-nac-leaf`
|
|
154
|
+
authoring attributes.
|
|
155
|
+
- **`NAC.expect(plugin, statePath, value, opts?) -> Promise<value>`**
|
|
156
|
+
(RFC V25-04 / SPEC sec 18). Polls `NAC.read()` until the comparator
|
|
157
|
+
returns truthy or the deadline fires (default 5000ms timeout,
|
|
158
|
+
100ms poll). Rejects `NacError('timeout')` on deadline.
|
|
159
|
+
- **`NAC.diff(plugin, statePath, actionFn) -> Promise<{before, after, changed}>`**
|
|
160
|
+
(RFC V25-04). Snapshots state, awaits actionFn, snapshots again.
|
|
161
|
+
JSON-stringify compare for the `changed` flag.
|
|
162
|
+
|
|
163
|
+
### Evidence (Layer 2 + Layer 3 LIVE)
|
|
164
|
+
|
|
165
|
+
- V25-02 tree-nav: L2 18 PASS / L3 LIVE 4 PASS.
|
|
166
|
+
- V25-03 narrate: L2 12 PASS / L3 LIVE 6 PASS.
|
|
167
|
+
- V25-04 expect+diff: L2 17 PASS / L3 LIVE 7 PASS.
|
|
168
|
+
|
|
169
|
+
Each demo + Pilot driver under `demos/` and `scripts/`, evidence in
|
|
170
|
+
`evidence/v25-0{2,3,4}*/<date>/`. Total LIVE Claude cost: ~$0.04.
|
|
171
|
+
|
|
172
|
+
### Status of v2.5 line
|
|
173
|
+
|
|
174
|
+
All 8 RFCs of the v2.5 line are now SHIPPED with full L2 + L3 LIVE
|
|
175
|
+
evidence. Collabora pilot can now consume the full surface end-to-end.
|
|
176
|
+
|
|
177
|
+
---
|
|
178
|
+
|
|
179
|
+
## 2.5.0-alpha.4 -- 2026-05-25
|
|
180
|
+
|
|
181
|
+
NAC3 v2.5.0-alpha.4 closes the V24-04 contract: every mutating
|
|
182
|
+
verb now honours `expected_*` parameters, and `STRICT_VERSIONING`
|
|
183
|
+
default flips from `false` to `true`. Adopters that do not opt in
|
|
184
|
+
to OCC explicitly will get `version_required` and must either pass
|
|
185
|
+
expected parameters or set `NAC.STRICT_VERSIONING = false` once
|
|
186
|
+
at bootstrap.
|
|
187
|
+
|
|
188
|
+
### Added (V24-04 -- final dispatch hook)
|
|
189
|
+
|
|
190
|
+
- **`tab(plugin, tab_key, opts?)`** -- third argument added. opts
|
|
191
|
+
accepts `expected_plugin_version` / `expected_tree_version` /
|
|
192
|
+
`expected_element_state_hash`. The single-arg ergonomic form
|
|
193
|
+
(e.g., `tab('conduit.tab.feed__home')`) keeps working; when
|
|
194
|
+
called as `tab(bareId, opts)` the runtime detects the object
|
|
195
|
+
and re-binds. Both two-arg and single-arg paths run the OCC
|
|
196
|
+
gate after element resolution + before the tab click.
|
|
197
|
+
- **`tab_by_label(plugin, label, opts?)`** -- propagates opts
|
|
198
|
+
through to `tab()`.
|
|
199
|
+
|
|
200
|
+
### Changed (V24-04 -- default flip)
|
|
201
|
+
|
|
202
|
+
- **`NAC.STRICT_VERSIONING` defaults to `true`** in alpha.4.
|
|
203
|
+
Rationale: every mutating verb (click / fill / select / invoke
|
|
204
|
+
/ tab / tab_by_label / click_by_verb via click) now honours the
|
|
205
|
+
OCC gate, so the strict default is finally safe to flip.
|
|
206
|
+
- Callers that do NOT pass `expected_*` parameters must set
|
|
207
|
+
`NAC.STRICT_VERSIONING = false` at bootstrap if they want the
|
|
208
|
+
pre-alpha.4 behaviour (silent dispatch ignoring OCC state).
|
|
209
|
+
- Code reviewers should reject any new callsite that catches
|
|
210
|
+
`version_required` without escalating to the user -- swallowing
|
|
211
|
+
the error defeats the point of the contract.
|
|
212
|
+
|
|
213
|
+
### Breaking changes since alpha.3
|
|
214
|
+
|
|
215
|
+
- ALL test files that exercised mutating verbs (`click`,
|
|
216
|
+
`click_by_verb`, `fill`, `select`, `invoke`, `tab`,
|
|
217
|
+
`tab_by_label`) without passing `expected_*` started failing
|
|
218
|
+
on the STRICT default flip. Fix: opt out at the top of the test
|
|
219
|
+
file with `NAC.STRICT_VERSIONING = false;` after the runtime
|
|
220
|
+
loads. Applied across all internal tests as part of this
|
|
221
|
+
commit; downstream adopters that have similar tests need the
|
|
222
|
+
same one-line addition.
|
|
223
|
+
|
|
224
|
+
### Tests
|
|
225
|
+
|
|
226
|
+
stage12-snapshot-versioning.mjs grows two assertions:
|
|
227
|
+
|
|
228
|
+
- `tab() with stale expected_tree_version throws snapshot_stale`
|
|
229
|
+
- `tab() under STRICT without expected_* throws version_required`
|
|
230
|
+
|
|
231
|
+
Total suite: **386 PASS / 0 FAIL** across 14 stage suites.
|
|
232
|
+
|
|
233
|
+
### Pending for 2.5.0 stable promotion (alpha -> latest)
|
|
234
|
+
|
|
235
|
+
Per `PROJECT.md` sec 3.1 (three-layer test bar, instituted
|
|
236
|
+
2026-05-25), `npm dist-tag add @nac3/runtime@2.5.0 latest`
|
|
237
|
+
requires:
|
|
238
|
+
|
|
239
|
+
- Layer 1 unit tests green (already 386/0). ✓
|
|
240
|
+
- Layer 2 visual demos + Playwright + screenshots in
|
|
241
|
+
`evidence/<feature>/<run-date>/` per RFC.
|
|
242
|
+
- Layer 3 Pilot-driven high-complexity statements run against
|
|
243
|
+
each demo, with reasoning trace + screenshots saved.
|
|
244
|
+
- Pablo's explicit OK after reviewing Layer 2 + Layer 3
|
|
245
|
+
evidence.
|
|
246
|
+
|
|
247
|
+
Layer 2 + Layer 3 building scheduled next. V25-02 / V25-03 /
|
|
248
|
+
V25-04 RFCs remain DRAFT; target subsequent 2.5.x patches.
|
|
249
|
+
|
|
250
|
+
---
|
|
251
|
+
|
|
252
|
+
## 2.5.0-alpha.3 -- 2026-05-23
|
|
253
|
+
|
|
254
|
+
NAC3 v2.5.0-alpha.3 wires the V24-04 OCC dispatch hooks into the
|
|
255
|
+
mutating verbs. The contract now has teeth: an agent that passes
|
|
256
|
+
mismatched `expected_*` parameters gets `NacError('snapshot_stale',
|
|
257
|
+
...)` synchronously, BEFORE any side effect occurs. No partial
|
|
258
|
+
mutations on stale state. No silent damage.
|
|
259
|
+
|
|
260
|
+
### Added (V24-04 -- dispatch enforcement)
|
|
261
|
+
|
|
262
|
+
Every mutating verb that accepts `opts` now calls
|
|
263
|
+
`_resolveVersionExpectations(opts, el)` after the element lookup +
|
|
264
|
+
disabled / hidden / aria preflight checks, and BEFORE the side
|
|
265
|
+
effect:
|
|
266
|
+
|
|
267
|
+
- **`click(nac_id, opts?)`** -- after the v2.3 capability gate +
|
|
268
|
+
v1.8 hidden gate + v1.9 aria preflight, before `el.click()`.
|
|
269
|
+
- **`fill(nac_id, value, opts?)`** -- after the fillability preflight,
|
|
270
|
+
before native-setter `el.value = ...`.
|
|
271
|
+
- **`select(nac_id, option, opts?)`** -- after `_findElement`, before
|
|
272
|
+
the select-option write.
|
|
273
|
+
- **`invoke(action_id, payload, opts?)`** -- after `_findElement`,
|
|
274
|
+
before the `nac:action:requested` dispatch.
|
|
275
|
+
|
|
276
|
+
Verbs that inherit click/tab transitively are covered automatically:
|
|
277
|
+
|
|
278
|
+
- **`click_by_verb(plugin, verb, opts?)`** -- resolves to a `nac_id`
|
|
279
|
+
then dispatches `click(id, opts)`. The OCC gate runs inside the
|
|
280
|
+
nested click. Caller passes `expected_*` in opts and they flow
|
|
281
|
+
through.
|
|
282
|
+
- **`tab_by_label(plugin, label, opts?)`** -- similarly delegates to
|
|
283
|
+
`tab(...)`. But because `tab` itself does not yet accept `opts`
|
|
284
|
+
(signature change pending alpha.4), `expected_*` passed to
|
|
285
|
+
`tab_by_label` is currently dropped. This will close in alpha.4.
|
|
286
|
+
|
|
287
|
+
### Pending for 2.5.0-alpha.4
|
|
288
|
+
|
|
289
|
+
- `tab(plugin, tab_key, opts?)` accepts opts + threads OCC gate.
|
|
290
|
+
- `NAC.STRICT_VERSIONING` default flips from `false` to `true` once
|
|
291
|
+
tab is covered (so all mutating verbs uniformly require
|
|
292
|
+
`expected_*` under strict mode).
|
|
293
|
+
- E2E demo `example-v25-snapshot-versioning.php` for the landing.
|
|
294
|
+
|
|
295
|
+
### Conditional-await pattern
|
|
296
|
+
|
|
297
|
+
To avoid introducing a microtask boundary that would reorder
|
|
298
|
+
side-effect-then-immediate-check call patterns (which several
|
|
299
|
+
v23-editor tests rely on with synchronous `NAC.click_by_verb()`
|
|
300
|
+
followed by an immediate DOM check), the OCC hook is conditional:
|
|
301
|
+
|
|
302
|
+
- When opts has any `expected_*` key OR `NAC.STRICT_VERSIONING` is
|
|
303
|
+
true: `await _resolveVersionExpectations(...)`. May throw
|
|
304
|
+
`snapshot_stale` / `version_required` / `feature_not_supported`.
|
|
305
|
+
- Otherwise: no await, no microtask. Existing behaviour preserved.
|
|
306
|
+
|
|
307
|
+
This keeps backward compatibility intact for code that never opted
|
|
308
|
+
into OCC, while making `expected_*`-aware callers see the contract.
|
|
309
|
+
|
|
310
|
+
### Tests
|
|
311
|
+
|
|
312
|
+
stage12-snapshot-versioning.mjs gains 7 new assertions for the
|
|
313
|
+
dispatch enforcement: stale plugin_version + stale tree_version
|
|
314
|
+
both raise `snapshot_stale` with structured `reason` + `slug` +
|
|
315
|
+
expected/current pairs; current plugin_version passes the gate and
|
|
316
|
+
proceeds (then hits the timeout, NOT snapshot_stale); STRICT mode
|
|
317
|
+
without expected_* throws `version_required`.
|
|
318
|
+
|
|
319
|
+
Total suite: **386 PASS / 0 FAIL** across 14 stage suites.
|
|
320
|
+
|
|
321
|
+
---
|
|
322
|
+
|
|
323
|
+
## 2.5.0-alpha.2 -- 2026-05-23
|
|
324
|
+
|
|
325
|
+
NAC3 v2.5.0-alpha.2 lands the V24-04 OCC foundation that was
|
|
326
|
+
deferred from alpha.1. This is an additive release on top of
|
|
327
|
+
alpha.1 -- everything that worked in alpha.1 still works.
|
|
328
|
+
|
|
329
|
+
### Added (V24-04 -- foundation SHIPPED)
|
|
330
|
+
|
|
331
|
+
The snapshot versioning + optimistic concurrency framework from
|
|
332
|
+
RFC V24-04 lands as a foundation layer:
|
|
333
|
+
|
|
334
|
+
- `_tree_version` + `_plugin_versions` Map -- per-(slug, instance_id)
|
|
335
|
+
monotonic version counters. Bumped on every structural mutation
|
|
336
|
+
observed by the runtime MutationObserver + on every syncPlugin
|
|
337
|
+
call.
|
|
338
|
+
- `_resolvePluginScope(el)` walks ancestor [data-nac-plugin] roots
|
|
339
|
+
with WeakMap caching to avoid O(depth) walks on every mutation.
|
|
340
|
+
- `_bumpPluginVersion(slug, instance_id, trigger)` + `_bumpTreeVersion`
|
|
341
|
+
atomic helpers: increment counter, push to `_version_history`
|
|
342
|
+
(capped at 500), dispatch `nac:plugin:invalidated` +
|
|
343
|
+
`nac:tree:invalidated` events.
|
|
344
|
+
- Single document-rooted MutationObserver that filters mutations to
|
|
345
|
+
data-nac-* attribute changes + addNodes/removeNodes that contain
|
|
346
|
+
data-nac-* descendants. Pure value/text changes do NOT bump.
|
|
347
|
+
- `element_state_hash` (128-bit SHA-256 truncated) over a canonical
|
|
348
|
+
5-key state (visible, disabled, value, text, custom). Sync impl
|
|
349
|
+
+ async crypto.subtle path when available. Byte-identical digests
|
|
350
|
+
across paths.
|
|
351
|
+
- `markHydrationComplete()` + 100ms fallback for SSR-then-hydrate
|
|
352
|
+
scenarios. Tagged trigger='hydration_complete' on the resulting
|
|
353
|
+
bump events.
|
|
354
|
+
- `versionHistory(limit?)` devtools surface -- last N bumps, most
|
|
355
|
+
recent first.
|
|
356
|
+
|
|
357
|
+
### Added (V24-04 -- describe() additions)
|
|
358
|
+
|
|
359
|
+
- `describe()` output now carries `tree_version` at the root +
|
|
360
|
+
`plugin_version` + `plugin_instance_id` per plugin entry +
|
|
361
|
+
`element_state_hash` per element entry. All three are read-only
|
|
362
|
+
observers; consuming them is opt-in.
|
|
363
|
+
|
|
364
|
+
### Added (V24-04 -- NAC.* surface)
|
|
365
|
+
|
|
366
|
+
- `NAC.STRICT_VERSIONING` (default **false** in alpha.2; will flip to
|
|
367
|
+
true in alpha.3 after one soak window). When true,
|
|
368
|
+
every mutating API call without `expected_*` parameters throws
|
|
369
|
+
`NacError('version_required', ...)`.
|
|
370
|
+
- `NAC.eager_hashing` (default false) -- placeholder flag for future
|
|
371
|
+
cache-the-hash-on-mutate optimization.
|
|
372
|
+
- `NAC.conformance_tier` (default `'NAC-3-versioned'`). Runtimes that
|
|
373
|
+
declare the legacy `'NAC-3'` tier explicitly reject `expected_*`
|
|
374
|
+
parameters with `NacError('feature_not_supported', ...)`.
|
|
375
|
+
- `NAC.markHydrationComplete()` -- explicit hydration ack.
|
|
376
|
+
- `NAC.versionHistory(limit?)` -- devtools.
|
|
377
|
+
|
|
378
|
+
### V24-02 syncPlugin consolidation
|
|
379
|
+
|
|
380
|
+
syncPlugin's version stamp now uses the V24-04 `_bumpPluginVersion`
|
|
381
|
+
machinery instead of the alpha.1 per-call timestamp string. The
|
|
382
|
+
return shape (`{replaced, slug, version}`) is unchanged, but the
|
|
383
|
+
`version` value is now `v_<N>` instead of `v_<base36-ts>_<seq>`.
|
|
384
|
+
Tests pass either format (just check the `v_` prefix and that
|
|
385
|
+
versions differ across calls).
|
|
386
|
+
|
|
387
|
+
### Pending for 2.5.0-alpha.3
|
|
388
|
+
|
|
389
|
+
- **Dispatch enforcement hooks.** `click` / `click_by_verb` / `tab` /
|
|
390
|
+
`tab_by_label` / `fill` / `select` / `invoke` accept
|
|
391
|
+
`expected_plugin_version` / `expected_tree_version` /
|
|
392
|
+
`expected_element_state_hash` parameters and reject with
|
|
393
|
+
`NacError('snapshot_stale', ...)` on mismatch via
|
|
394
|
+
`_resolveVersionExpectations()` (the helper is already in this
|
|
395
|
+
release; the hooks are not yet wired into the dispatch verbs).
|
|
396
|
+
- **`STRICT_VERSIONING` default flip** from false to true. Gated on
|
|
397
|
+
the dispatch hooks landing.
|
|
398
|
+
- **V25-02/03/04 drafts** -- tree navigation, assistive labels,
|
|
399
|
+
effect detection. Target subsequent 2.5.x patches.
|
|
400
|
+
|
|
401
|
+
### Tests
|
|
402
|
+
|
|
403
|
+
`runtime/test/` adds stage12-snapshot-versioning.mjs (23 PASS):
|
|
404
|
+
API surface, describe() additions, syncPlugin bump events, version
|
|
405
|
+
history, markHydrationComplete idempotency, hydration trigger
|
|
406
|
+
tagging.
|
|
407
|
+
|
|
408
|
+
Suite total: **377 PASS / 0 FAIL** across 14 stage suites.
|
|
409
|
+
|
|
410
|
+
### Migration notes
|
|
411
|
+
|
|
412
|
+
- Code consuming `describe()` output that did NOT expect
|
|
413
|
+
`tree_version` / `plugin_version` / `element_state_hash` keys is
|
|
414
|
+
unaffected: those keys are additive. Code that explicitly checked
|
|
415
|
+
describe().plugins[i] for an enumerated key set might fail; the
|
|
416
|
+
fix is to ignore unknown keys (forward-compatible default).
|
|
417
|
+
- syncPlugin's `result.version` value format changed (see V24-02
|
|
418
|
+
section above). Tests that asserted the exact alpha.1 format
|
|
419
|
+
string would need to relax to a prefix-only check.
|
|
420
|
+
|
|
421
|
+
---
|
|
422
|
+
|
|
423
|
+
## 2.5.0-alpha.1 -- 2026-05-23
|
|
424
|
+
|
|
425
|
+
NAC3 v2.5.0-alpha.1 is a **consolidation release**. Two parallel
|
|
426
|
+
development lines that diverged during May 2026 are unified here.
|
|
427
|
+
The yujinapp/nac-spec repository becomes the SOLE source of truth
|
|
428
|
+
for NAC3 from this commit forward; the prior development copies
|
|
429
|
+
under rpaforce-crm (`packages/nac/`, `yujin.app/nac-spec/`) are
|
|
430
|
+
deleted in that monorepo's history.
|
|
431
|
+
|
|
432
|
+
### Lines unified
|
|
433
|
+
|
|
434
|
+
- **Line A** (was on this repo, RFC track): V24-01 plugin slug
|
|
435
|
+
uniqueness, V24-02 idempotent syncPlugin (was announced in
|
|
436
|
+
2.3.x changelog but never landed in code -- now implemented
|
|
437
|
+
for the first time with full test coverage), V24-04 snapshot
|
|
438
|
+
versioning + OCC (in flight, see "Pending" below), V24-05
|
|
439
|
+
agent authority + sudo (was DRAFT, ships SHIPPED here).
|
|
440
|
+
- **Line B** (was on rpaforce-crm, contract track): V25-01 plugin
|
|
441
|
+
extension contract for canvas+API surfaces (Block A: 8 backends
|
|
442
|
+
complete + tests).
|
|
443
|
+
|
|
444
|
+
### Added (V25-01 -- NEW)
|
|
445
|
+
|
|
446
|
+
- `NAC.registerPlugin(slug, manifest)` declarative plugin
|
|
447
|
+
registration for surfaces where verbs / state / events route
|
|
448
|
+
through something other than direct DOM (postMessage to iframe,
|
|
449
|
+
plugin SDK call, script bridge, DOM mirror, same-origin window,
|
|
450
|
+
synthesised events).
|
|
451
|
+
- `NAC.call(plugin, verb_path, args)` abstract verb dispatch.
|
|
452
|
+
- `NAC.read(plugin, state_path)` abstract state read with declared
|
|
453
|
+
fallback chain semantics.
|
|
454
|
+
- `NAC.subscribe(plugin, event_path, cb) / unsubscribe(handle)`
|
|
455
|
+
event subscription with backend routing.
|
|
456
|
+
- 8 backend kinds in fixed vocabulary: `postmessage`,
|
|
457
|
+
`postmessage-listen`, `sdk-call`, `script-bridge`, `dom-mirror`,
|
|
458
|
+
`same-origin-window`, `synthetic-mutation`, `synthetic-poll`.
|
|
459
|
+
- Declarative extractor mini-DSL (`text` / `value` / `present` /
|
|
460
|
+
`attribute:NAME` / `classList.contains:CLASS` / dotted-path).
|
|
461
|
+
- Provenance event family: `nac:plugin:invoked` / `:read` / `:event`
|
|
462
|
+
with `{plugin, backend, request_id, source, trusted, duration_ms,
|
|
463
|
+
ok, error}` payload.
|
|
464
|
+
|
|
465
|
+
### Added (V24-02 -- NEW IMPLEMENTATION)
|
|
466
|
+
|
|
467
|
+
- `NAC.syncPlugin(manifest)` / `NAC.syncPlugin(slug, manifest)`
|
|
468
|
+
-- idempotent registration. Replaces the manifest for a slug
|
|
469
|
+
instead of appending; SPA hosts call this on remount without
|
|
470
|
+
accumulating stale entries.
|
|
471
|
+
- Returns `{ replaced: boolean, slug, version }`.
|
|
472
|
+
- Emits `nac:plugin:invalidated` on REPLACE (not on first-add),
|
|
473
|
+
detail `{plugin_slug, plugin_instance_id, from_version,
|
|
474
|
+
to_version, trigger: 'syncPlugin'}`.
|
|
475
|
+
|
|
476
|
+
### Added (V24-05 -- NEW)
|
|
477
|
+
|
|
478
|
+
- `NAC.set_confirm_handler(fn)` -- register async (req) => boolean.
|
|
479
|
+
- `NAC.confirm_action(action_id, message, opts?)` -- Promise<boolean>.
|
|
480
|
+
Sudo bypass: short-circuits true if elevation already granted
|
|
481
|
+
for the requested scope (or higher).
|
|
482
|
+
- `NAC.request_authority(scope, ttl_ms, opts?)` -- sudo-style
|
|
483
|
+
time-bounded elevation. Scope rank: high > medium > low.
|
|
484
|
+
- `NAC.has_authority(scope) -> bool`.
|
|
485
|
+
- `NAC.revoke_authority(scope) -> void` (idempotent).
|
|
486
|
+
- Provenance event family:
|
|
487
|
+
`nac:authority:requested / :granted / :denied / :revoked / :expired`,
|
|
488
|
+
`nac:action:confirmed / :rejected`.
|
|
489
|
+
- SUPERSEDES the v1.9 confirm_action mechanism (removed: it was
|
|
490
|
+
unused + had a strictly narrower contract).
|
|
491
|
+
|
|
492
|
+
### Added (V24-01 -- CONSOLIDATED + ENFORCED)
|
|
493
|
+
|
|
494
|
+
- `NAC.HARD_DEDUP` flag (default true). Gates the synchronous
|
|
495
|
+
throw in `NAC.register` + the boot-time pass.
|
|
496
|
+
- `NAC.register` throws `NacError('duplicate_plugin_no_instance_id',
|
|
497
|
+
...)` synchronously when the DOM already contains multiple roots
|
|
498
|
+
for the registered slug and any of them omits / duplicates
|
|
499
|
+
`data-nac-plugin-id`.
|
|
500
|
+
- Boot-time pass on `DOMContentLoaded` runs the same check across
|
|
501
|
+
every `[data-nac-plugin]` root. On first violation: dispatches
|
|
502
|
+
`nac:fatal` event + paints a fixed-position red banner
|
|
503
|
+
(`#__nac_fatal_banner__`) + re-throws asynchronously so test
|
|
504
|
+
harnesses + browsers catch it.
|
|
505
|
+
- `validate_global()` extended with `plugin_instance_violations`
|
|
506
|
+
array -- structured findings for CI gates.
|
|
507
|
+
- Migration: `NAC.HARD_DEDUP = false` BEFORE any `register()`
|
|
508
|
+
call opts out for one release window. Flag removed in v2.6.
|
|
509
|
+
|
|
510
|
+
### New: PROJECT.md at repo root
|
|
511
|
+
|
|
512
|
+
PROJECT.md documents the post-migration topology, the RFC process
|
|
513
|
+
states (Proposed / In implementation / Implemented / Alpha /
|
|
514
|
+
Production), the doc-update invariant (every RFC transition
|
|
515
|
+
touches SPEC + CHANGELOG + USER_MANUAL + TECHNICAL_DESIGN + demos
|
|
516
|
+
list + benchmark numbers + Sumi KB), and the programming +
|
|
517
|
+
architecture norms. Read it FIRST before any contribution.
|
|
518
|
+
|
|
519
|
+
### Tests
|
|
520
|
+
|
|
521
|
+
`runtime/test/` suite now has 13 stages:
|
|
522
|
+
|
|
523
|
+
smoke + v22 + v23-{invoke,shadow,capabilities,editor,interop}
|
|
524
|
+
+ stage2-disambiguation + stage7-strict-resolution + stage8-plugin-extension
|
|
525
|
+
+ stage9-sync-plugin + stage10-authority-sudo + stage11-plugin-id-dedup
|
|
526
|
+
|
|
527
|
+
`npm test` exit code 0, 349 PASS / 0 FAIL.
|
|
528
|
+
|
|
529
|
+
### Pending for 2.5.0-alpha.2
|
|
530
|
+
|
|
531
|
+
- V24-04 snapshot versioning + OCC -- in implementation, code in
|
|
532
|
+
flight. Targets `NAC.STRICT_VERSIONING=true` by default, with
|
|
533
|
+
`expected_plugin_version` / `expected_tree_version` enforcement
|
|
534
|
+
on every mutating API. The `plugin_version` + `element_state_hash`
|
|
535
|
+
fields will appear in `describe()` output.
|
|
536
|
+
- V25-02 tree navigation (`context`, `tree`, `data-nac-opens`)
|
|
537
|
+
-- DRAFT, target 2.5.x.
|
|
538
|
+
- V25-03 assistive labels (`narrate`) -- DRAFT, target 2.5.x.
|
|
539
|
+
- V25-04 effect detection (`expect`, `diff`) -- DRAFT, target 2.5.x.
|
|
540
|
+
|
|
541
|
+
### Migration notes
|
|
542
|
+
|
|
543
|
+
- Code that ran fine under 2.4.0 (strict resolution + disambiguation)
|
|
544
|
+
continues to work unchanged in 2.5; that contract is stable.
|
|
545
|
+
- Code that called the pre-existing v1.9 `confirm_action` must
|
|
546
|
+
migrate to V24-05 (`confirm_action` + `set_confirm_handler` +
|
|
547
|
+
`request_authority`). The argument shape changed
|
|
548
|
+
(`(action_id, opts)` -> `(action_id, message, opts)`). Audit
|
|
549
|
+
callers; no automatic migration tool.
|
|
550
|
+
- Code that registered the same plugin slug on multiple DOM roots
|
|
551
|
+
WITHOUT `data-nac-plugin-id` now throws at register time. Either
|
|
552
|
+
add the attribute, OR set `NAC.HARD_DEDUP=false` before
|
|
553
|
+
registering for a one-release migration window.
|
|
554
|
+
|
|
555
|
+
---
|
|
556
|
+
|
|
557
|
+
## 2.4.0 -- 2026-05-21
|
|
558
|
+
|
|
559
|
+
NAC3 v2.4.0 is a **behavior-of-contract change**: id / verb / qualifier
|
|
560
|
+
resolution becomes strict. Backwards-compatible with code paths that
|
|
561
|
+
already supplied unambiguous arguments, **NOT** backwards-compatible
|
|
562
|
+
with code paths that depended on the previous lenient (`indexOf`)
|
|
563
|
+
fallback to resolve to the first near-match.
|
|
564
|
+
|
|
565
|
+
### Why this changed (the principle, not a feature)
|
|
566
|
+
|
|
567
|
+
The lenient resolution in 2.3.x violated the spec's 0-silent-damage
|
|
568
|
+
invariant. Specifically, `click_by_verb(plugin, verb, { qualifier })`
|
|
569
|
+
would, on a no-exact-suffix match, fall through to an `indexOf(qualifier)`
|
|
570
|
+
substring search and resolve silently to whatever element happened to
|
|
571
|
+
contain the qualifier string anywhere in its id. The H4 benchmark on the
|
|
572
|
+
Conduit case study (2026-05-21) showed that **12 of 18 "model failures"
|
|
573
|
+
on the canonical flows were actually silent runtime damage** — the
|
|
574
|
+
agent emitted an invalid qualifier, the runtime sent it to the wrong
|
|
575
|
+
element, the agent looped against the wrong page state. Strict
|
|
576
|
+
resolution rescues those 12 (see `nac-spec/conduit/H4_STRICT_NAC_REPORT.md`).
|
|
577
|
+
|
|
578
|
+
For an assistive-software use case (the principal driver of this
|
|
579
|
+
project), a silent dispatch to the wrong element with no recovery path
|
|
580
|
+
is a safety blocker. Strict resolution closes that gap.
|
|
581
|
+
|
|
582
|
+
### New error model — disambiguation contract
|
|
583
|
+
|
|
584
|
+
When `click_by_verb` / `tab` / `tab_by_label` cannot resolve a request
|
|
585
|
+
unambiguously, the runtime now:
|
|
586
|
+
|
|
587
|
+
1. Emits `nac:disambiguation_requested` on `document` with a
|
|
588
|
+
structured detail payload (see below).
|
|
589
|
+
2. Throws `NacError` with `err.code` ∈ `{no_matching_instance,
|
|
590
|
+
ambiguous_qualifier, ambiguous_tab, ambiguous_label}` AND
|
|
591
|
+
`err.candidates: [{nac_id, label}, ...]` pre-validated against the
|
|
592
|
+
live DOM.
|
|
593
|
+
|
|
594
|
+
Detail / candidates payload:
|
|
595
|
+
```js
|
|
596
|
+
{
|
|
597
|
+
method: 'click_by_verb' | 'tab' | 'tab_by_label',
|
|
598
|
+
plugin: string | null,
|
|
599
|
+
query: { verb?, qualifier?, label?, id? },
|
|
600
|
+
reason: 'no_matching_instance' | 'ambiguous_qualifier' | 'ambiguous_tab' |
|
|
601
|
+
'ambiguous_label' | 'ambiguous_label_exact' | 'ambiguous_label_fuzzy' |
|
|
602
|
+
'no_matching_label',
|
|
603
|
+
candidates: [{ nac_id: string, label: string }, ...]
|
|
604
|
+
}
|
|
605
|
+
```
|
|
606
|
+
|
|
607
|
+
A reactive host (chat UI / voice agent / screen-reader) can listen
|
|
608
|
+
on the event and present the options to the user as *"did you
|
|
609
|
+
mean A or B?"*. A synchronous catcher can read `err.candidates`
|
|
610
|
+
directly. An autonomous agent (Pilot, etc.) can inject the candidates
|
|
611
|
+
into the next turn's prompt so the LLM picks from a DOM-validated
|
|
612
|
+
list instead of re-guessing a qualifier.
|
|
613
|
+
|
|
614
|
+
### What changed in the resolvers
|
|
615
|
+
|
|
616
|
+
- **`click_by_verb` with qualifier:** only exact-equality or anchored
|
|
617
|
+
suffix (`id === qualifier || id.endsWith('__' + qualifier)`)
|
|
618
|
+
resolves. Multiple matches → `ambiguous_qualifier`. Zero matches →
|
|
619
|
+
`no_matching_instance`. **The `indexOf` substring fallback is
|
|
620
|
+
removed.**
|
|
621
|
+
- **`tab` single-arg form:** bare id resolves to exact match in DOM. If
|
|
622
|
+
no exact, exactly one anchored-prefix instance
|
|
623
|
+
(`id.startsWith(bare + '__')`) resolves; multiple → `ambiguous_tab`;
|
|
624
|
+
zero → `no_matching_instance`.
|
|
625
|
+
- **`tab_by_label`:** two-tier strict — exact label match first
|
|
626
|
+
(errors if multiple), then substring match (errors if multiple).
|
|
627
|
+
Fuzzy match preserved for voice/assistive use case; ambiguity
|
|
628
|
+
caught.
|
|
629
|
+
|
|
630
|
+
### Verification
|
|
631
|
+
|
|
632
|
+
- `packages/nac/test/stage2-disambiguation.mjs` — pre-existing
|
|
633
|
+
tab_by_label cases still PASS (B1–B4).
|
|
634
|
+
- `packages/nac/test/stage7-strict-resolution.mjs` (new) — 9/9
|
|
635
|
+
invariants pass under JSDOM shim.
|
|
636
|
+
- `nac3-bench/bench/scripts/stage7_strict_nac.mjs` (new) — 9/9
|
|
637
|
+
invariants pass under Playwright against a live page.
|
|
638
|
+
- `nac3-bench/bench/h4_results/h4_2026-05-21T19-01-19-040Z.json` —
|
|
639
|
+
cheap-model benchmark with strict NAC: 48/54 = 89% (vs 36/54 = 67%
|
|
640
|
+
under lenient).
|
|
641
|
+
|
|
642
|
+
### Migration guide
|
|
643
|
+
|
|
644
|
+
If your code was passing fuzzy qualifiers and depending on the runtime
|
|
645
|
+
to pick "something close", the upgrade requires you to:
|
|
646
|
+
- Either supply the full `nac_id` directly (always unambiguous), OR
|
|
647
|
+
- Pass the exact `__suffix` of the instance you want, OR
|
|
648
|
+
- Listen for `nac:disambiguation_requested` / catch `NacError` with
|
|
649
|
+
`err.candidates` and pick from the returned list.
|
|
650
|
+
|
|
651
|
+
Most users won't be affected — the only callers that broke during the
|
|
652
|
+
internal regression were the ones that were already broken silently in
|
|
653
|
+
2.3.x but happened to land on the wrong-but-related element instead of
|
|
654
|
+
failing.
|
|
655
|
+
|
|
656
|
+
---
|
|
657
|
+
|
|
658
|
+
## 2.3.1 -- 2026-05-13 (stable, blank republish)
|
|
659
|
+
|
|
660
|
+
Identical source to 2.3.0. The 2.3.0 tag had already been published to
|
|
661
|
+
npm as a preview; 2.3.1 is the first installable stable version. No
|
|
662
|
+
behavioural changes.
|
|
663
|
+
|
|
664
|
+
---
|
|
665
|
+
|
|
666
|
+
## 2.3.0 -- 2026-05-13 (stable)
|
|
667
|
+
|
|
668
|
+
NAC3 v2.3.0 is the first stable release of the payload-bearing
|
|
669
|
+
contract. Everything in 2.3.0-alpha.1 and 2.3.0-alpha.2 is rolled
|
|
670
|
+
in; the alpha tags are deprecated. New in stable (beyond the alpha
|
|
671
|
+
preview):
|
|
672
|
+
|
|
673
|
+
### New primitives
|
|
674
|
+
|
|
675
|
+
- **`NAC.invoke(action_id, payload, opts?)`** -- payload-bearing
|
|
676
|
+
action. Dispatches `nac:action:requested`, awaits the host's
|
|
677
|
+
`nac:action:succeeded` / `:failed` with the same `request_id`.
|
|
678
|
+
Default timeout 30 s. (Promoted from 2.3.0-alpha.1.)
|
|
679
|
+
- **`NAC.utter(action_id, {text, lang?, voice?})`** -- ergonomic
|
|
680
|
+
shortcut for `verb='utter'`. (Promoted from 2.3.0-alpha.1.)
|
|
681
|
+
- **`NAC.bindTab(el, handler, ctx, opts?)`** -- tab companion to
|
|
682
|
+
`bindAction`. Emits `nac:tab:activated` / `:activation_failed`
|
|
683
|
+
for you. Sister of v2.2's `bindAction`.
|
|
684
|
+
- **`NAC.edit_field(nac_id)`** -- field editor primitive promoted
|
|
685
|
+
from preview to GA. Selection, replace, AI syntax correction,
|
|
686
|
+
save/cancel verbs. Modal mounts the `nac_editor` plugin
|
|
687
|
+
idempotently with all 10 locales.
|
|
688
|
+
|
|
689
|
+
### Shadow DOM resolution (F1 + F6)
|
|
690
|
+
|
|
691
|
+
- **Open shadow DOM**: the runtime walks `el.shadowRoot`
|
|
692
|
+
recursively up to depth 10. Any element with `data-nac-id`
|
|
693
|
+
inside an open shadow root is now resolvable by `NAC.click`,
|
|
694
|
+
`NAC.fill`, `NAC.invoke`, etc. with no glue code.
|
|
695
|
+
- **Closed shadow DOM**: voluntary exposure contract. A
|
|
696
|
+
component MAY expose a `nac3` getter on the host element
|
|
697
|
+
implementing `query(selector)` (mandatory),
|
|
698
|
+
`queryAll(selector)` (recommended), and `describe()` (optional).
|
|
699
|
+
The runtime delegates to those methods.
|
|
700
|
+
- **Error events** for closed shadow:
|
|
701
|
+
- `nac:shadow_blocked` -- emitted once per host with
|
|
702
|
+
`detail.reason` in `'exposure_threw'`, `'not_exposed'`.
|
|
703
|
+
- `nac:shadow_protocol_violation` -- emitted when an exposed
|
|
704
|
+
method returns a non-Element value.
|
|
705
|
+
- All events use `composed: true` so they correctly cross shadow
|
|
706
|
+
boundaries to document-level listeners.
|
|
707
|
+
|
|
708
|
+
### Auth-aware capabilities (F7)
|
|
709
|
+
|
|
710
|
+
- Manifest entries MAY declare `requires_capability: 'verb_slug'`
|
|
711
|
+
at the element level or per `action.verb`. Array values use
|
|
712
|
+
OR semantics ("at least one cap matches passes").
|
|
713
|
+
- `NAC.setCapabilities([...])`, `NAC.grantCapability(cap)`,
|
|
714
|
+
`NAC.revokeCapability(cap)`, `NAC.userCapabilities()` manage
|
|
715
|
+
the user's capability set.
|
|
716
|
+
- `NAC.click` and `NAC.invoke` gate against the set before
|
|
717
|
+
dispatch. Missing cap -> reject with `code='capability_required'`
|
|
718
|
+
+ emit `nac:command:rejected`.
|
|
719
|
+
|
|
720
|
+
### Strict validation default (F3)
|
|
721
|
+
|
|
722
|
+
- `NAC.STRICT_VALIDATION` default flipped from `false` to **`true`**
|
|
723
|
+
in v2.3 stable, per the v2.2 migration promise.
|
|
724
|
+
`NAC.register` now throws `code='strict_validation'` on
|
|
725
|
+
`manifest_role_unknown` / `tab_id_manifest_role_drift` /
|
|
726
|
+
`manifest_dom_role_mismatch` findings.
|
|
727
|
+
- Opt-out: set `NAC.STRICT_VALIDATION = false` BEFORE any
|
|
728
|
+
`register()` call in your bootstrap. See
|
|
729
|
+
`guides/MIGRATION_v2.2_to_v2.3.md` for the playbook.
|
|
730
|
+
|
|
731
|
+
### Hotfix carryover from alpha.2
|
|
732
|
+
|
|
733
|
+
- `NAC.invoke` does NOT reject with `code='disabled'` on elements
|
|
734
|
+
with `disabled` or `aria-disabled='true'`. `invoke` is a logical
|
|
735
|
+
payload-bearing request, not a synthetic click. `NAC.click` still
|
|
736
|
+
rejects on disabled (click semantics preserved). Pinned down by
|
|
737
|
+
test v23-invoke.mjs T7/T8/T9 so the relaxation cannot silently
|
|
738
|
+
regress.
|
|
739
|
+
|
|
740
|
+
### Test surface
|
|
741
|
+
|
|
742
|
+
`npm test` now chains 7 suites (75+ assertions):
|
|
743
|
+
smoke, v22, v23-invoke, v23-shadow, v23-capabilities, v23-editor,
|
|
744
|
+
v23-interop. Plus 5 stage suites + live Playwright E2E
|
|
745
|
+
(`atlas-pro-v23-utter-e2e.mjs` 16/16 GREEN against the deployed
|
|
746
|
+
demo).
|
|
747
|
+
|
|
748
|
+
### Spec text
|
|
749
|
+
|
|
750
|
+
SPEC.md updated:
|
|
751
|
+
- Section 5.1.4 -- `NAC.invoke` + `NAC.utter` final wording.
|
|
752
|
+
- Section 5.1.5 -- Shadow DOM resolution (open, cap 10).
|
|
753
|
+
- Section 5.1.6 -- Closed shadow DOM exposure API (voluntary).
|
|
754
|
+
- Section 5.1.7 -- Auth-aware capabilities.
|
|
755
|
+
- Section 13 -- `edit_field` promoted from preview to GA.
|
|
756
|
+
|
|
757
|
+
### Reference adopters
|
|
758
|
+
|
|
759
|
+
- Atlas Pro voice ad (`ads-demo/atlas-pro/`) -- production live,
|
|
760
|
+
uses `NAC.utter` + payload schema.
|
|
761
|
+
- React demo (`packages/nac-react-demo/`) -- adopts payload-bearing
|
|
762
|
+
pattern for the chat-to-todos flow.
|
|
763
|
+
- Angular demo (`packages/nac-angular-demo/`) -- mirror of React.
|
|
764
|
+
- Web Component demos: `example-v23-shadow-open.html` and
|
|
765
|
+
`example-v23-shadow-closed.html`.
|
|
766
|
+
|
|
767
|
+
## 2.3.0-alpha.2 -- 2026-05-13 (superseded by 2.3.0)
|
|
768
|
+
|
|
769
|
+
Hotfix on top of 2.3.0-alpha.1:
|
|
770
|
+
|
|
771
|
+
- `NAC.invoke` no longer rejects with `code='disabled'` when the
|
|
772
|
+
target element has `disabled` or `aria-disabled='true'` set. The
|
|
773
|
+
`disabled` HTML attribute is a click-event UX guard; `invoke` is
|
|
774
|
+
a logical payload-bearing request, not a synthetic click. Hosts
|
|
775
|
+
that need to refuse an invoke based on UI state should do it in
|
|
776
|
+
their `nac:action:requested` listener and emit
|
|
777
|
+
`nac:action:failed` with a meaningful code. This was hitting the
|
|
778
|
+
Atlas Pro mic which gets `disabled = true` during /parse +
|
|
779
|
+
/tts processing, blocking subsequent NAC.utter calls from
|
|
780
|
+
external agents mid-conversation. Reproduced in the video-gen
|
|
781
|
+
pipeline (every turn after the demo's first state-transition).
|
|
782
|
+
- Bumped CLI version + smoke test assertions to match.
|
|
783
|
+
|
|
784
|
+
## 2.3.0-alpha.1 -- 2026-05-12
|
|
785
|
+
|
|
786
|
+
### New: payload-bearing actions via `NAC.invoke` + `NAC.utter`
|
|
787
|
+
|
|
788
|
+
The NAC v2.2 contract was click-and-go: an agent triggers
|
|
789
|
+
`NAC.click(id)` or `NAC.click_by_verb(plugin, verb)` and the host
|
|
790
|
+
does whatever it does. That works for verb-and-state actions
|
|
791
|
+
(`save`, `cancel`, `submit`, `delete`) but breaks down when the
|
|
792
|
+
action needs **data** from the agent: `utter(text)`,
|
|
793
|
+
`search(query)`, `send_message(body)`, `upload(file)`,
|
|
794
|
+
`schedule(date)`. Hosts had no way to receive an agent's payload
|
|
795
|
+
via a synthetic click.
|
|
796
|
+
|
|
797
|
+
v2.3 adds the missing primitive:
|
|
798
|
+
|
|
799
|
+
```ts
|
|
800
|
+
NAC.invoke(action_id, payload, opts?): Promise<{ok, request_id, ack}>
|
|
801
|
+
NAC.utter(action_id, {text, lang?, voice?}): Promise<...>
|
|
802
|
+
```
|
|
803
|
+
|
|
804
|
+
`NAC.invoke` dispatches a `nac:action:requested` CustomEvent on
|
|
805
|
+
the host element (bubbles) with the agent's `payload` + a
|
|
806
|
+
runtime-issued `request_id`. The host listens, processes, emits
|
|
807
|
+
`nac:action:succeeded` (or `:failed`) echoing the same
|
|
808
|
+
`request_id`. The runtime correlates and resolves the Promise.
|
|
809
|
+
|
|
810
|
+
Default timeout 30 s (vs 5 s for click). On timeout the Promise
|
|
811
|
+
rejects with `code='timeout'`.
|
|
812
|
+
|
|
813
|
+
`NAC.utter(id, opts)` is the ergonomic shortcut for `verb='utter'`
|
|
814
|
+
-- equivalent to `NAC.invoke(id, {verb:'utter', text, lang, voice})`.
|
|
815
|
+
|
|
816
|
+
Manifest entries for payload-bearing actions can declare an
|
|
817
|
+
informational `payload_schema`:
|
|
818
|
+
|
|
819
|
+
```js
|
|
820
|
+
{ id: 'atlas_pro_ad.mic', role: 'action',
|
|
821
|
+
actions: [
|
|
822
|
+
{ verb: 'listen' },
|
|
823
|
+
{ verb: 'utter',
|
|
824
|
+
payload_schema: {
|
|
825
|
+
text: { type: 'string', required: true, max: 4000 },
|
|
826
|
+
lang: { type: 'string', enum: ['en','es','pt','fr','it','de','ja','zh','hi','ar'] }
|
|
827
|
+
}
|
|
828
|
+
}
|
|
829
|
+
]
|
|
830
|
+
}
|
|
831
|
+
```
|
|
832
|
+
|
|
833
|
+
Click-style verbs (`NAC.click`, `NAC.click_by_verb`) continue to
|
|
834
|
+
work unchanged. The new contract is purely additive; no demo
|
|
835
|
+
behaviour regresses.
|
|
836
|
+
|
|
837
|
+
#### First adopter
|
|
838
|
+
|
|
839
|
+
Atlas Pro (`https://yujin.app/nac-spec/ads-demo/atlas-pro/`)
|
|
840
|
+
declares both `listen` (click-only, existing) and `utter`
|
|
841
|
+
(payload-bearing) on its `atlas_pro_ad.mic` action. The same
|
|
842
|
+
`/ad-orchestrator/parse` + `/ad-orchestrator/tts` loop drives
|
|
843
|
+
either path -- agents with their own STT call `listen`, agents
|
|
844
|
+
with their own LM call `utter` with the recognised text.
|
|
845
|
+
|
|
846
|
+
#### Test coverage
|
|
847
|
+
|
|
848
|
+
- `test/v23-invoke.mjs` (new) -- 22 assertions covering happy
|
|
849
|
+
path, ack echo, host-failed path, invalid args, not-found,
|
|
850
|
+
custom timeout. PASS.
|
|
851
|
+
- `test/v22.mjs` -- amended to accept v2.3.x in addition to
|
|
852
|
+
v2.2.x. PASS.
|
|
853
|
+
- `test/smoke.mjs` -- updated version assertions. PASS.
|
|
854
|
+
|
|
855
|
+
#### Files touched
|
|
856
|
+
|
|
857
|
+
- `yujin.app/nac-spec/js/nac.js` -- `invoke()` + `utter()` (~150
|
|
858
|
+
LOC additive). Public API surface +2 functions. NAC.version
|
|
859
|
+
bumped to '2.3.0-alpha.1', spec_version to '2.3'.
|
|
860
|
+
- `yujin.app/nac-spec/SPEC.md` -- new section 5.1.4 + header
|
|
861
|
+
version line.
|
|
862
|
+
- `yujin.app/nac-spec/ads-demo/atlas-pro/index.html` -- manifest
|
|
863
|
+
declares the `utter` verb + DOM listener routes into the demo's
|
|
864
|
+
existing `handleUtterance(text)`.
|
|
865
|
+
- `packages/nac/package.json`, `build.mjs`, `test/smoke.mjs` --
|
|
866
|
+
version bumps + new test in `npm test`.
|
|
867
|
+
|
|
868
|
+
#### Not yet wired
|
|
869
|
+
|
|
870
|
+
- `STRICT_VALIDATION` enforcement of `payload_schema` (alpha:
|
|
871
|
+
schema is informational).
|
|
872
|
+
- A `NAC.search` / `NAC.upload` / `NAC.send_message` ergonomic
|
|
873
|
+
shortcut sibling to `NAC.utter`. The generic `NAC.invoke` works
|
|
874
|
+
today; concrete shortcuts can be added without re-spec.
|
|
875
|
+
|
|
876
|
+
## 2.2.1 -- 2026-05-12
|
|
877
|
+
|
|
878
|
+
### Bug fix: importable in Node / SSR / test contexts
|
|
879
|
+
|
|
880
|
+
Pre-launch smoke test caught that `import '@nac3/runtime'` and
|
|
881
|
+
`import '@nac3/runtime/chat-client'` crashed in Node.js with
|
|
882
|
+
`ReferenceError: document is not defined`. The bundles had
|
|
883
|
+
top-level `document.dispatchEvent` and `document.addEventListener`
|
|
884
|
+
calls firing at module-evaluation time.
|
|
885
|
+
|
|
886
|
+
Fix: wrap browser-only init in `typeof document !== 'undefined'`
|
|
887
|
+
guards. In the browser the behaviour is unchanged (the events
|
|
888
|
+
still fire on install + the confirm listener still attaches). In
|
|
889
|
+
Node / SSR / Vitest / Jest the bundles now import as no-ops
|
|
890
|
+
instead of crashing.
|
|
891
|
+
|
|
892
|
+
Files patched (no API change):
|
|
893
|
+
- `dist/nac.{mjs,cjs,browser.js}` -- guarded `nac:installed`
|
|
894
|
+
dispatch + `_installA11yHintBridge()` call.
|
|
895
|
+
- `dist/nac-chat-client.{mjs,cjs,browser.js}` -- guarded
|
|
896
|
+
`nac:confirm:requested` listener attach.
|
|
897
|
+
- `dist/nac-v2-extensions.*` -- unchanged (it already early-bails
|
|
898
|
+
when the main runtime is not present).
|
|
899
|
+
|
|
900
|
+
Verified: all three entry points (`@nac3/runtime`,
|
|
901
|
+
`@nac3/runtime/extensions`, `@nac3/runtime/chat-client`) now
|
|
902
|
+
import cleanly under Node 22 ESM + CommonJS `require`.
|
|
903
|
+
|
|
904
|
+
## 2.2.0 -- 2026-05-10
|
|
905
|
+
|
|
906
|
+
Same-day v2.2 ships the constructor-strict validator + action-ack
|
|
907
|
+
helper. Both items moved from the v2.2 roadmap into the runtime
|
|
908
|
+
with no breaking changes (warning-only mode by default).
|
|
909
|
+
|
|
910
|
+
### V22-01 -- `NAC.register` strict validator
|
|
911
|
+
|
|
912
|
+
`NAC.register(manifest)` now checks each manifest entry against
|
|
913
|
+
three rules and emits `console.error` for findings:
|
|
914
|
+
|
|
915
|
+
- `manifest_role_unknown` -- the entry's `role` is outside the
|
|
916
|
+
canonical set (the 18 roles in SPEC sec 1).
|
|
917
|
+
- `tab_id_manifest_role_drift` -- the entry's id matches `^tab\.`
|
|
918
|
+
but its role is not `'tab'`. NAC.tab() and NAC.tab_by_label()
|
|
919
|
+
query the canonical role only; a drift here makes the tab
|
|
920
|
+
invisible to those resolvers (the bug class that broke
|
|
921
|
+
example-v21-data-table.php on 2026-05-09).
|
|
922
|
+
- `manifest_dom_role_mismatch` -- the corresponding DOM element
|
|
923
|
+
is mounted, and its `data-nac-role` differs from the manifest's
|
|
924
|
+
`role` value. Catches the case where an HTML author and a JS
|
|
925
|
+
author drift apart on what role to use.
|
|
926
|
+
|
|
927
|
+
A new flag `NAC.STRICT_VALIDATION` toggles findings between
|
|
928
|
+
warning-only (default; ships in 2.2) and throwing (will be the
|
|
929
|
+
v2.3 default; opt-in in 2.2 for adopters who want to gate CI).
|
|
930
|
+
|
|
931
|
+
Migration window: v2.2 = console.error only, v2.3 = throw
|
|
932
|
+
default, v3.0 = remove the flag.
|
|
933
|
+
|
|
934
|
+
### V22-02 -- `NAC.bindAction` helper
|
|
935
|
+
|
|
936
|
+
New helper:
|
|
937
|
+
|
|
938
|
+
```js
|
|
939
|
+
NAC.bindAction(buttonEl, function (ev) { /* side effect */ }, {
|
|
940
|
+
plugin: 'invoice', action_id: 'invoice.save'
|
|
941
|
+
});
|
|
942
|
+
```
|
|
943
|
+
|
|
944
|
+
Bakes the `nac:action:succeeded` / `:failed` contract into the
|
|
945
|
+
runtime so brownfield panels cannot forget to emit the ack event.
|
|
946
|
+
Handles sync handlers + Promise-returning handlers; emits failure
|
|
947
|
+
on throw + preserves normal error semantics; returns an unbinder
|
|
948
|
+
function.
|
|
949
|
+
|
|
950
|
+
Removes the foot-gun that produced the v20-panel timeout reports
|
|
951
|
+
on 2026-05-09 (every voice command on example-v20-full.php
|
|
952
|
+
replied "No pude ejecutar X: timeout" because the panel handlers
|
|
953
|
+
did the work synchronously but never emitted the ack).
|
|
954
|
+
|
|
955
|
+
### Tests
|
|
956
|
+
|
|
957
|
+
- `test/smoke.mjs` -- 36/36 PASS (artefact integrity + d.ts
|
|
958
|
+
surface + CLI version + CLI lint over demos + package.json
|
|
959
|
+
consistency, version asserts now check 2.2.0).
|
|
960
|
+
- `test/v22.mjs` -- new. 14/14 PASS. 5 strict-validator cases
|
|
961
|
+
(clean, unknown-role, tab-drift, DOM mismatch, strict-throws)
|
|
962
|
+
+ 5 bindAction cases (sync ack, throw -> failed event, Promise
|
|
963
|
+
ack, unbinder, ctx validation) + NAC sanity checks.
|
|
964
|
+
|
|
965
|
+
Run via: `npm test` (chains both suites).
|
|
966
|
+
|
|
967
|
+
### Known to-dos
|
|
968
|
+
|
|
969
|
+
- Per-action signing (v3.0 candidate).
|
|
970
|
+
- v2.3 will flip `STRICT_VALIDATION` default to true.
|
|
971
|
+
- v2.3 will ship `NAC.bindTab(el, handler, ctx)` companion for
|
|
972
|
+
tab-role widgets.
|
|
973
|
+
|
|
974
|
+
## 2.1.0 -- 2026-05-10
|
|
975
|
+
|
|
976
|
+
First public release. Wraps the reference runtime that has been
|
|
977
|
+
running in production at yujin.app since 2026-04 as the npm package
|
|
978
|
+
`@nac3/runtime`.
|
|
979
|
+
|
|
980
|
+
### Spec
|
|
981
|
+
|
|
982
|
+
- v2.1 with data-table primitive (collection / matrix /
|
|
983
|
+
matrix-singletree subkinds; `dt_add_row` / `dt_edit_cell` /
|
|
984
|
+
aggregates / transactional commit).
|
|
985
|
+
- Brownfield migration story shipped (v2.0 extensions: scope tree,
|
|
986
|
+
ephemeral capture, autoRegister, HMAC, isTrusted).
|
|
987
|
+
- 18 canonical roles, 11 success-event families.
|
|
988
|
+
- 10-locale i18n contract.
|
|
989
|
+
|
|
990
|
+
### Package
|
|
991
|
+
|
|
992
|
+
- ESM + CJS + browser builds.
|
|
993
|
+
- TypeScript declarations (permissive surface; v2.2 ships
|
|
994
|
+
hand-authored full types).
|
|
995
|
+
- CLI: `npx nac validate <dir>` does static lint of HTML/PHP.
|
|
996
|
+
- Single source of truth: package built from
|
|
997
|
+
`yujin.app/nac-spec/js/*.js`, no maintenance duplication.
|
|
998
|
+
|
|
999
|
+
### Demos
|
|
1000
|
+
|
|
1001
|
+
- `example.php` -- v1.9 reference, 27 widgets.
|
|
1002
|
+
- `example-v20-full.php` -- brownfield migration of v1.9 to v2.0.
|
|
1003
|
+
- `example-v20-primitives-showcase.php` -- didactic showcase of
|
|
1004
|
+
the 8 v2.0 primitives.
|
|
1005
|
+
- `example-v21-data-table.php` -- live data-table demo wired to
|
|
1006
|
+
the Yujin chat backend.
|
|
1007
|
+
|
|
1008
|
+
All demos hosted at yujin.app/nac-spec/.
|
|
1009
|
+
|
|
1010
|
+
### Known limitations
|
|
1011
|
+
|
|
1012
|
+
- No per-action signing yet (only manifests). v3.0 candidate.
|
|
1013
|
+
- Constructor (`NAC.register`) is permissive on unknown roles; the
|
|
1014
|
+
v2.2 strict-validator landing fixes this.
|
|
1015
|
+
- CLI URL mode (`nac validate https://...`) requires Playwright;
|
|
1016
|
+
the package does not pull Playwright as a hard dep. Static-lint
|
|
1017
|
+
mode works without it.
|