@staix/agent-console 0.0.0-stage → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/CHANGELOG.md +49 -0
  2. package/LICENSE +21 -0
  3. package/README.md +354 -2
  4. package/bin/acon.js +8 -0
  5. package/package.json +38 -4
  6. package/shell/asset-viewer.css +5 -0
  7. package/shell/asset-viewer.html +11 -0
  8. package/shell/asset-viewer.js +23 -0
  9. package/shell/icon.svg +1 -0
  10. package/shell/index.html +53 -0
  11. package/shell/shell.css +534 -0
  12. package/shell/shell.js +2214 -0
  13. package/shell/space-view.js +164 -0
  14. package/shell/space.js +241 -0
  15. package/shell/space3d.js +364 -0
  16. package/shell/static.js +111 -0
  17. package/shell/vendor/BufferGeometryUtils.js +1523 -0
  18. package/shell/vendor/GLTFLoader.js +5006 -0
  19. package/shell/vendor/NOTICE +30 -0
  20. package/shell/vendor/SkeletonUtils.js +496 -0
  21. package/shell/vendor/manifest.json +42 -0
  22. package/shell/vendor/mermaid/NOTICE +25 -0
  23. package/shell/vendor/mermaid/manifest.json +19 -0
  24. package/shell/vendor/mermaid/mermaid.js +3580 -0
  25. package/shell/vendor/three.core.js +61162 -0
  26. package/shell/vendor/three.module.js +19537 -0
  27. package/shell/visual-frame.css +5 -0
  28. package/shell/visual-frame.html +14 -0
  29. package/shell/visual-frame.js +54 -0
  30. package/src/assets.ts +200 -0
  31. package/src/canonical.ts +16 -0
  32. package/src/cli.ts +246 -0
  33. package/src/conformance.ts +299 -0
  34. package/src/contract.ts +276 -0
  35. package/src/install.ts +248 -0
  36. package/src/pets.ts +63 -0
  37. package/src/plugins.ts +357 -0
  38. package/src/serve.ts +184 -0
  39. package/src/server.ts +462 -0
  40. package/src/setup.ts +74 -0
  41. package/src/space.ts +106 -0
  42. package/src/static.ts +102 -0
  43. package/test/fixtures/review/cases.json +726 -0
@@ -0,0 +1,726 @@
1
+ {
2
+ "version": 1,
3
+ "description": "Strings of the form <N x c> stand for c repeated N times; a list with repeat is count copies of `of` with ids idPrefix+index. Shared ReviewAnchor/ReviewThread cases for agent-console (src/conformance.ts) and agent-hub#1056. Each invalid case names the field that must be rejected; validators may word problems differently.",
4
+ "bounds": {
5
+ "exact": 2000,
6
+ "context": 64,
7
+ "selectors": 4,
8
+ "threads": 200,
9
+ "body": 4000
10
+ },
11
+ "anchors": {
12
+ "valid": [
13
+ {
14
+ "name": "text lineRange + textQuote",
15
+ "value": {
16
+ "path": "docs/plan.md",
17
+ "contentHash": "911169ddaaf146aff539f58c26c489af3b892dff0fe283c1c264c65ae5aa59a2",
18
+ "selectors": [
19
+ {
20
+ "kind": "lineRange",
21
+ "startLine": 2,
22
+ "endLine": 3
23
+ },
24
+ {
25
+ "kind": "textQuote",
26
+ "exact": "Ship on Friday.",
27
+ "prefix": "\n\n",
28
+ "suffix": "\n"
29
+ }
30
+ ]
31
+ }
32
+ },
33
+ {
34
+ "name": "diff head side with hunk",
35
+ "value": {
36
+ "path": "src/a.ts",
37
+ "side": "head",
38
+ "contentHash": "911169ddaaf146aff539f58c26c489af3b892dff0fe283c1c264c65ae5aa59a2",
39
+ "selectors": [
40
+ {
41
+ "kind": "lineRange",
42
+ "startLine": 10,
43
+ "endLine": 10
44
+ },
45
+ {
46
+ "kind": "textQuote",
47
+ "exact": "x",
48
+ "prefix": "",
49
+ "suffix": ""
50
+ },
51
+ {
52
+ "kind": "diffHunk",
53
+ "hunkHeader": "@@ -8,3 +8,4 @@"
54
+ }
55
+ ]
56
+ }
57
+ },
58
+ {
59
+ "name": "projection without hash",
60
+ "value": {
61
+ "path": "report.hwp",
62
+ "projection": {
63
+ "name": "hwp-text",
64
+ "version": "1"
65
+ },
66
+ "selectors": [
67
+ {
68
+ "kind": "textQuote",
69
+ "exact": "결론",
70
+ "prefix": "",
71
+ "suffix": ""
72
+ }
73
+ ]
74
+ }
75
+ },
76
+ {
77
+ "name": "structural and region are valid but not created by the kit",
78
+ "value": {
79
+ "path": "deck.pdf",
80
+ "selectors": [
81
+ {
82
+ "kind": "structural",
83
+ "scheme": "pdf-outline",
84
+ "ref": "2.1"
85
+ },
86
+ {
87
+ "kind": "region",
88
+ "x": 0,
89
+ "y": 0,
90
+ "width": 10,
91
+ "height": 5,
92
+ "page": 1
93
+ }
94
+ ]
95
+ }
96
+ },
97
+ {
98
+ "name": "exact at the 2000 limit, context at 64",
99
+ "value": {
100
+ "path": "a",
101
+ "selectors": [
102
+ {
103
+ "kind": "textQuote",
104
+ "exact": "<2000 x x>",
105
+ "prefix": "<64 x p>",
106
+ "suffix": "<64 x s>"
107
+ }
108
+ ]
109
+ }
110
+ }
111
+ ],
112
+ "invalid": [
113
+ {
114
+ "name": "missing path",
115
+ "field": "path",
116
+ "value": {
117
+ "selectors": [
118
+ {
119
+ "kind": "textQuote",
120
+ "exact": "x",
121
+ "prefix": "",
122
+ "suffix": ""
123
+ }
124
+ ]
125
+ }
126
+ },
127
+ {
128
+ "name": "no selectors",
129
+ "field": "selectors",
130
+ "value": {
131
+ "path": "a",
132
+ "selectors": []
133
+ }
134
+ },
135
+ {
136
+ "name": "five selectors",
137
+ "field": "selectors",
138
+ "value": {
139
+ "path": "a",
140
+ "selectors": [
141
+ {
142
+ "kind": "textQuote",
143
+ "exact": "x",
144
+ "prefix": "",
145
+ "suffix": ""
146
+ },
147
+ {
148
+ "kind": "textQuote",
149
+ "exact": "x",
150
+ "prefix": "",
151
+ "suffix": ""
152
+ },
153
+ {
154
+ "kind": "textQuote",
155
+ "exact": "x",
156
+ "prefix": "",
157
+ "suffix": ""
158
+ },
159
+ {
160
+ "kind": "textQuote",
161
+ "exact": "x",
162
+ "prefix": "",
163
+ "suffix": ""
164
+ },
165
+ {
166
+ "kind": "textQuote",
167
+ "exact": "x",
168
+ "prefix": "",
169
+ "suffix": ""
170
+ }
171
+ ]
172
+ }
173
+ },
174
+ {
175
+ "name": "uppercase hash",
176
+ "field": "contentHash",
177
+ "value": {
178
+ "path": "a",
179
+ "contentHash": "911169DDAAF146AFF539F58C26C489AF3B892DFF0FE283C1C264C65AE5AA59A2",
180
+ "selectors": [
181
+ {
182
+ "kind": "textQuote",
183
+ "exact": "x",
184
+ "prefix": "",
185
+ "suffix": ""
186
+ }
187
+ ]
188
+ }
189
+ },
190
+ {
191
+ "name": "short hash",
192
+ "field": "contentHash",
193
+ "value": {
194
+ "path": "a",
195
+ "contentHash": "abc",
196
+ "selectors": [
197
+ {
198
+ "kind": "textQuote",
199
+ "exact": "x",
200
+ "prefix": "",
201
+ "suffix": ""
202
+ }
203
+ ]
204
+ }
205
+ },
206
+ {
207
+ "name": "bad side",
208
+ "field": "side",
209
+ "value": {
210
+ "path": "a",
211
+ "side": "left",
212
+ "selectors": [
213
+ {
214
+ "kind": "textQuote",
215
+ "exact": "x",
216
+ "prefix": "",
217
+ "suffix": ""
218
+ }
219
+ ]
220
+ }
221
+ },
222
+ {
223
+ "name": "projection without version",
224
+ "field": "projection",
225
+ "value": {
226
+ "path": "a",
227
+ "projection": {
228
+ "name": "p"
229
+ },
230
+ "selectors": [
231
+ {
232
+ "kind": "textQuote",
233
+ "exact": "x",
234
+ "prefix": "",
235
+ "suffix": ""
236
+ }
237
+ ]
238
+ }
239
+ },
240
+ {
241
+ "name": "lineRange start > end",
242
+ "field": "selectors",
243
+ "value": {
244
+ "path": "a",
245
+ "selectors": [
246
+ {
247
+ "kind": "lineRange",
248
+ "startLine": 5,
249
+ "endLine": 4
250
+ }
251
+ ]
252
+ }
253
+ },
254
+ {
255
+ "name": "lineRange zero",
256
+ "field": "selectors",
257
+ "value": {
258
+ "path": "a",
259
+ "selectors": [
260
+ {
261
+ "kind": "lineRange",
262
+ "startLine": 0,
263
+ "endLine": 1
264
+ }
265
+ ]
266
+ }
267
+ },
268
+ {
269
+ "name": "exact over 2000",
270
+ "field": "selectors",
271
+ "value": {
272
+ "path": "a",
273
+ "selectors": [
274
+ {
275
+ "kind": "textQuote",
276
+ "exact": "<2001 x x>",
277
+ "prefix": "",
278
+ "suffix": ""
279
+ }
280
+ ]
281
+ }
282
+ },
283
+ {
284
+ "name": "prefix over 64",
285
+ "field": "selectors",
286
+ "value": {
287
+ "path": "a",
288
+ "selectors": [
289
+ {
290
+ "kind": "textQuote",
291
+ "exact": "x",
292
+ "prefix": "<65 x p>",
293
+ "suffix": ""
294
+ }
295
+ ]
296
+ }
297
+ },
298
+ {
299
+ "name": "empty exact",
300
+ "field": "selectors",
301
+ "value": {
302
+ "path": "a",
303
+ "selectors": [
304
+ {
305
+ "kind": "textQuote",
306
+ "exact": "",
307
+ "prefix": "",
308
+ "suffix": ""
309
+ }
310
+ ]
311
+ }
312
+ },
313
+ {
314
+ "name": "missing suffix",
315
+ "field": "selectors",
316
+ "value": {
317
+ "path": "a",
318
+ "selectors": [
319
+ {
320
+ "kind": "textQuote",
321
+ "exact": "x",
322
+ "prefix": ""
323
+ }
324
+ ]
325
+ }
326
+ },
327
+ {
328
+ "name": "hunk header not @@",
329
+ "field": "selectors",
330
+ "value": {
331
+ "path": "a",
332
+ "selectors": [
333
+ {
334
+ "kind": "diffHunk",
335
+ "hunkHeader": "-8,3 +8,4"
336
+ }
337
+ ]
338
+ }
339
+ },
340
+ {
341
+ "name": "unknown kind",
342
+ "field": "selectors",
343
+ "value": {
344
+ "path": "a",
345
+ "selectors": [
346
+ {
347
+ "kind": "xpath",
348
+ "ref": "/a"
349
+ }
350
+ ]
351
+ }
352
+ },
353
+ {
354
+ "name": "negative region",
355
+ "field": "selectors",
356
+ "value": {
357
+ "path": "a",
358
+ "selectors": [
359
+ {
360
+ "kind": "region",
361
+ "x": -1,
362
+ "y": 0,
363
+ "width": 1,
364
+ "height": 1
365
+ }
366
+ ]
367
+ }
368
+ }
369
+ ]
370
+ },
371
+ "threads": {
372
+ "valid": [
373
+ {
374
+ "name": "open thread",
375
+ "value": {
376
+ "id": "t1",
377
+ "anchor": {
378
+ "path": "docs/plan.md",
379
+ "contentHash": "911169ddaaf146aff539f58c26c489af3b892dff0fe283c1c264c65ae5aa59a2",
380
+ "selectors": [
381
+ {
382
+ "kind": "lineRange",
383
+ "startLine": 2,
384
+ "endLine": 3
385
+ },
386
+ {
387
+ "kind": "textQuote",
388
+ "exact": "Ship on Friday.",
389
+ "prefix": "\n\n",
390
+ "suffix": "\n"
391
+ }
392
+ ]
393
+ },
394
+ "body": "Which Friday?",
395
+ "author": "owner",
396
+ "at": "2026-11-02T00:00:00Z",
397
+ "state": "open"
398
+ }
399
+ },
400
+ {
401
+ "name": "resolved, body at 4000",
402
+ "value": {
403
+ "id": "t2",
404
+ "anchor": {
405
+ "path": "docs/plan.md",
406
+ "contentHash": "911169ddaaf146aff539f58c26c489af3b892dff0fe283c1c264c65ae5aa59a2",
407
+ "selectors": [
408
+ {
409
+ "kind": "lineRange",
410
+ "startLine": 2,
411
+ "endLine": 3
412
+ },
413
+ {
414
+ "kind": "textQuote",
415
+ "exact": "Ship on Friday.",
416
+ "prefix": "\n\n",
417
+ "suffix": "\n"
418
+ }
419
+ ]
420
+ },
421
+ "body": "<4000 x b>",
422
+ "author": "owner",
423
+ "at": "2026-11-02T00:00:00Z",
424
+ "state": "resolved"
425
+ }
426
+ }
427
+ ],
428
+ "invalid": [
429
+ {
430
+ "name": "missing id",
431
+ "field": "id",
432
+ "value": {
433
+ "id": "",
434
+ "anchor": {
435
+ "path": "docs/plan.md",
436
+ "contentHash": "911169ddaaf146aff539f58c26c489af3b892dff0fe283c1c264c65ae5aa59a2",
437
+ "selectors": [
438
+ {
439
+ "kind": "lineRange",
440
+ "startLine": 2,
441
+ "endLine": 3
442
+ },
443
+ {
444
+ "kind": "textQuote",
445
+ "exact": "Ship on Friday.",
446
+ "prefix": "\n\n",
447
+ "suffix": "\n"
448
+ }
449
+ ]
450
+ },
451
+ "body": "Which Friday?",
452
+ "author": "owner",
453
+ "at": "2026-11-02T00:00:00Z",
454
+ "state": "open"
455
+ }
456
+ },
457
+ {
458
+ "name": "body over 4000",
459
+ "field": "body",
460
+ "value": {
461
+ "id": "t1",
462
+ "anchor": {
463
+ "path": "docs/plan.md",
464
+ "contentHash": "911169ddaaf146aff539f58c26c489af3b892dff0fe283c1c264c65ae5aa59a2",
465
+ "selectors": [
466
+ {
467
+ "kind": "lineRange",
468
+ "startLine": 2,
469
+ "endLine": 3
470
+ },
471
+ {
472
+ "kind": "textQuote",
473
+ "exact": "Ship on Friday.",
474
+ "prefix": "\n\n",
475
+ "suffix": "\n"
476
+ }
477
+ ]
478
+ },
479
+ "body": "<4001 x b>",
480
+ "author": "owner",
481
+ "at": "2026-11-02T00:00:00Z",
482
+ "state": "open"
483
+ }
484
+ },
485
+ {
486
+ "name": "empty body",
487
+ "field": "body",
488
+ "value": {
489
+ "id": "t1",
490
+ "anchor": {
491
+ "path": "docs/plan.md",
492
+ "contentHash": "911169ddaaf146aff539f58c26c489af3b892dff0fe283c1c264c65ae5aa59a2",
493
+ "selectors": [
494
+ {
495
+ "kind": "lineRange",
496
+ "startLine": 2,
497
+ "endLine": 3
498
+ },
499
+ {
500
+ "kind": "textQuote",
501
+ "exact": "Ship on Friday.",
502
+ "prefix": "\n\n",
503
+ "suffix": "\n"
504
+ }
505
+ ]
506
+ },
507
+ "body": "",
508
+ "author": "owner",
509
+ "at": "2026-11-02T00:00:00Z",
510
+ "state": "open"
511
+ }
512
+ },
513
+ {
514
+ "name": "bad at",
515
+ "field": "at",
516
+ "value": {
517
+ "id": "t1",
518
+ "anchor": {
519
+ "path": "docs/plan.md",
520
+ "contentHash": "911169ddaaf146aff539f58c26c489af3b892dff0fe283c1c264c65ae5aa59a2",
521
+ "selectors": [
522
+ {
523
+ "kind": "lineRange",
524
+ "startLine": 2,
525
+ "endLine": 3
526
+ },
527
+ {
528
+ "kind": "textQuote",
529
+ "exact": "Ship on Friday.",
530
+ "prefix": "\n\n",
531
+ "suffix": "\n"
532
+ }
533
+ ]
534
+ },
535
+ "body": "Which Friday?",
536
+ "author": "owner",
537
+ "at": "yesterday",
538
+ "state": "open"
539
+ }
540
+ },
541
+ {
542
+ "name": "bad state",
543
+ "field": "state",
544
+ "value": {
545
+ "id": "t1",
546
+ "anchor": {
547
+ "path": "docs/plan.md",
548
+ "contentHash": "911169ddaaf146aff539f58c26c489af3b892dff0fe283c1c264c65ae5aa59a2",
549
+ "selectors": [
550
+ {
551
+ "kind": "lineRange",
552
+ "startLine": 2,
553
+ "endLine": 3
554
+ },
555
+ {
556
+ "kind": "textQuote",
557
+ "exact": "Ship on Friday.",
558
+ "prefix": "\n\n",
559
+ "suffix": "\n"
560
+ }
561
+ ]
562
+ },
563
+ "body": "Which Friday?",
564
+ "author": "owner",
565
+ "at": "2026-11-02T00:00:00Z",
566
+ "state": "closed"
567
+ }
568
+ },
569
+ {
570
+ "name": "missing author",
571
+ "field": "author",
572
+ "value": {
573
+ "id": "t1",
574
+ "anchor": {
575
+ "path": "docs/plan.md",
576
+ "contentHash": "911169ddaaf146aff539f58c26c489af3b892dff0fe283c1c264c65ae5aa59a2",
577
+ "selectors": [
578
+ {
579
+ "kind": "lineRange",
580
+ "startLine": 2,
581
+ "endLine": 3
582
+ },
583
+ {
584
+ "kind": "textQuote",
585
+ "exact": "Ship on Friday.",
586
+ "prefix": "\n\n",
587
+ "suffix": "\n"
588
+ }
589
+ ]
590
+ },
591
+ "body": "Which Friday?",
592
+ "at": "2026-11-02T00:00:00Z",
593
+ "state": "open"
594
+ }
595
+ },
596
+ {
597
+ "name": "invalid anchor",
598
+ "field": "anchor",
599
+ "value": {
600
+ "id": "t1",
601
+ "anchor": {
602
+ "path": "a",
603
+ "selectors": []
604
+ },
605
+ "body": "Which Friday?",
606
+ "author": "owner",
607
+ "at": "2026-11-02T00:00:00Z",
608
+ "state": "open"
609
+ }
610
+ }
611
+ ],
612
+ "lists": {
613
+ "invalid": [
614
+ {
615
+ "name": "duplicate ids",
616
+ "field": "id",
617
+ "value": [
618
+ {
619
+ "id": "t1",
620
+ "anchor": {
621
+ "path": "docs/plan.md",
622
+ "contentHash": "911169ddaaf146aff539f58c26c489af3b892dff0fe283c1c264c65ae5aa59a2",
623
+ "selectors": [
624
+ {
625
+ "kind": "lineRange",
626
+ "startLine": 2,
627
+ "endLine": 3
628
+ },
629
+ {
630
+ "kind": "textQuote",
631
+ "exact": "Ship on Friday.",
632
+ "prefix": "\n\n",
633
+ "suffix": "\n"
634
+ }
635
+ ]
636
+ },
637
+ "body": "Which Friday?",
638
+ "author": "owner",
639
+ "at": "2026-11-02T00:00:00Z",
640
+ "state": "open"
641
+ },
642
+ {
643
+ "id": "t1",
644
+ "anchor": {
645
+ "path": "docs/plan.md",
646
+ "contentHash": "911169ddaaf146aff539f58c26c489af3b892dff0fe283c1c264c65ae5aa59a2",
647
+ "selectors": [
648
+ {
649
+ "kind": "lineRange",
650
+ "startLine": 2,
651
+ "endLine": 3
652
+ },
653
+ {
654
+ "kind": "textQuote",
655
+ "exact": "Ship on Friday.",
656
+ "prefix": "\n\n",
657
+ "suffix": "\n"
658
+ }
659
+ ]
660
+ },
661
+ "body": "Which Friday?",
662
+ "author": "owner",
663
+ "at": "2026-11-02T00:00:00Z",
664
+ "state": "open"
665
+ }
666
+ ]
667
+ },
668
+ {
669
+ "name": "201 threads",
670
+ "field": "threads",
671
+ "repeat": {
672
+ "count": 201,
673
+ "of": {
674
+ "id": "t1",
675
+ "anchor": {
676
+ "path": "docs/plan.md",
677
+ "contentHash": "911169ddaaf146aff539f58c26c489af3b892dff0fe283c1c264c65ae5aa59a2",
678
+ "selectors": [
679
+ {
680
+ "kind": "lineRange",
681
+ "startLine": 2,
682
+ "endLine": 3
683
+ },
684
+ {
685
+ "kind": "textQuote",
686
+ "exact": "Ship on Friday.",
687
+ "prefix": "\n\n",
688
+ "suffix": "\n"
689
+ }
690
+ ]
691
+ },
692
+ "body": "Which Friday?",
693
+ "author": "owner",
694
+ "at": "2026-11-02T00:00:00Z",
695
+ "state": "open"
696
+ },
697
+ "idPrefix": "t"
698
+ }
699
+ }
700
+ ]
701
+ }
702
+ },
703
+ "contentHash": [
704
+ {
705
+ "name": "raw bytes when no projection",
706
+ "text": "a\nb\n",
707
+ "sha256": "911169ddaaf146aff539f58c26c489af3b892dff0fe283c1c264c65ae5aa59a2"
708
+ },
709
+ {
710
+ "name": "projected text when projection is set, not the raw bytes",
711
+ "projection": {
712
+ "name": "crlf-to-lf",
713
+ "version": "1"
714
+ },
715
+ "raw": "# Plan\r\n\r\nShip on Friday.\r\n",
716
+ "projected": "# Plan\n\nShip on Friday.\n",
717
+ "sha256": "b279a1e888be2c4c3b05da37db723b25216f485407134760b0f0cee00dfe8892",
718
+ "rawSha256": "4afe3f93cb6aafdc8b99f4299eb4756c539b3ecb66542239950d294d01f43314"
719
+ },
720
+ {
721
+ "name": "UTF-8 bytes of non-ASCII text",
722
+ "text": "결론\n",
723
+ "sha256": "4489a5f81336d4ba989acef5d24b8f412ce3d55ca4c54e4bfeda3fc7453ab8fb"
724
+ }
725
+ ]
726
+ }