@a-t-h-i/bot-lobby 0.6.44 → 0.6.46
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/README.md +15 -4
- package/package.json +1 -6
- package/src/execution/agent-runner.ts +0 -2
- package/src/execution/delegation.ts +1 -2
- package/src/execution/pi-runner.ts +2 -6
- package/src/execution/task-cancellation.ts +27 -0
- package/src/index.ts +0 -3
- package/src/lobby/host.ts +5 -12
- package/src/lobby/planner.ts +1 -6
- package/src/lobby/prompts.ts +4 -7
- package/src/lobby/quickfix.ts +0 -2
- package/src/lobby/runtime.ts +1 -5
- package/src/lobby/service.ts +77 -7
- package/src/lobby/topics.ts +0 -1
- package/src/pi/tools.ts +2 -2
- package/src/state/persistence.ts +26 -1
- package/src/webui/api/index.ts +13 -45
- package/src/webui/api/tasks.ts +39 -2
- package/src/webui/dev/fake-service.ts +0 -57
- package/src/webui/dev/fixtures.ts +0 -6
- package/src/webui/palette-core.ts +233 -2
- package/src/webui/protocol.ts +6 -103
- package/src/workflow/workflow.ts +16 -20
- package/webui/dist/assets/index-BJ1fEle9.js +110 -0
- package/webui/dist/assets/index-BdtiIB9L.css +2 -0
- package/webui/dist/build.json +39 -107
- package/webui/dist/index.html +2 -2
- package/src/excalidraw/check.ts +0 -31
- package/src/excalidraw/client.ts +0 -334
- package/src/excalidraw/room.ts +0 -118
- package/src/excalidraw/scene.ts +0 -746
- package/src/excalidraw/sessions.ts +0 -302
- package/src/excalidraw/tools.ts +0 -223
- package/src/lobby/models/metrics.ts +0 -14
- package/src/webui/api/excalidraw.ts +0 -105
- package/src/webui/api/metrics.ts +0 -96
- package/webui/dist/assets/index-C0T8aK16.js +0 -110
- package/webui/dist/assets/index-XtSiJAAR.css +0 -2
package/webui/dist/build.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
|
-
"hash": "
|
|
3
|
-
"builtAt": "2026-10-
|
|
2
|
+
"hash": "44ae0a7d08d0f0c860d5299fdddd1521df143ae76b865c975b70d62f335842a2",
|
|
3
|
+
"builtAt": "2026-10-13T23:01:05.500Z",
|
|
4
4
|
"files": [
|
|
5
5
|
{
|
|
6
6
|
"path": "src/lobby/prompts.ts",
|
|
7
|
-
"sha256": "
|
|
7
|
+
"sha256": "4a705f59f54682a71b9ffa53570a3d9be1fe139f5da8372b0598c8707d63aee7"
|
|
8
8
|
},
|
|
9
9
|
{
|
|
10
10
|
"path": "src/webui/protocol.ts",
|
|
11
|
-
"sha256": "
|
|
11
|
+
"sha256": "d5a2b938c1ff5cb4f50c13268bb437766f65c202bd7607b9fbfb7a058e4e36d4"
|
|
12
12
|
},
|
|
13
13
|
{
|
|
14
14
|
"path": "webui/components.json",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
},
|
|
25
25
|
{
|
|
26
26
|
"path": "webui/src/app/AltH.tsx",
|
|
27
|
-
"sha256": "
|
|
27
|
+
"sha256": "a760972ea3deaaa3fefcbc4352d63c010b09fb1ea7d3aa29b7eb67c2a6420f4d"
|
|
28
28
|
},
|
|
29
29
|
{
|
|
30
30
|
"path": "webui/src/app/AppTools.tsx",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
},
|
|
33
33
|
{
|
|
34
34
|
"path": "webui/src/app/Composer.tsx",
|
|
35
|
-
"sha256": "
|
|
35
|
+
"sha256": "5e268afa7d5cfdf650d55dbb9a9a477bbc0bdca53ad3cf18adb36b4e71b4c79c"
|
|
36
36
|
},
|
|
37
37
|
{
|
|
38
38
|
"path": "webui/src/app/Header.tsx",
|
|
@@ -48,11 +48,11 @@
|
|
|
48
48
|
},
|
|
49
49
|
{
|
|
50
50
|
"path": "webui/src/app/PhoneTabs.tsx",
|
|
51
|
-
"sha256": "
|
|
51
|
+
"sha256": "eab9d2bdd15a702b529fbf292d9335a2a7243ae10a2148e450e0fdbb918fcf84"
|
|
52
52
|
},
|
|
53
53
|
{
|
|
54
54
|
"path": "webui/src/app/ProjectFolderDialog.tsx",
|
|
55
|
-
"sha256": "
|
|
55
|
+
"sha256": "a2bd027322c72a947c4c85ee583f3b401c9415a46a55a38fc93efc2de7030b34"
|
|
56
56
|
},
|
|
57
57
|
{
|
|
58
58
|
"path": "webui/src/app/ProjectSwitcher.tsx",
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
},
|
|
61
61
|
{
|
|
62
62
|
"path": "webui/src/app/Shell.tsx",
|
|
63
|
-
"sha256": "
|
|
63
|
+
"sha256": "fe5739ce1f56b2002274ed948f85cd99a0f33c097a82ae62ab31baf5f9e75fa7"
|
|
64
64
|
},
|
|
65
65
|
{
|
|
66
66
|
"path": "webui/src/app/Sidebar.tsx",
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
},
|
|
77
77
|
{
|
|
78
78
|
"path": "webui/src/app/TabIcons.tsx",
|
|
79
|
-
"sha256": "
|
|
79
|
+
"sha256": "6205394cd77f672efe6affc9dc4f765c7b0b28b69ee1c87393028a7234672ec8"
|
|
80
80
|
},
|
|
81
81
|
{
|
|
82
82
|
"path": "webui/src/app/TabStrip.tsx",
|
|
@@ -120,7 +120,7 @@
|
|
|
120
120
|
},
|
|
121
121
|
{
|
|
122
122
|
"path": "webui/src/app/phoneCarousel.ts",
|
|
123
|
-
"sha256": "
|
|
123
|
+
"sha256": "e3031ac90e2062b27d7d7e8958eaa29721bea25e2097749771fe35d5be81f1b2"
|
|
124
124
|
},
|
|
125
125
|
{
|
|
126
126
|
"path": "webui/src/app/readTopic.ts",
|
|
@@ -132,7 +132,7 @@
|
|
|
132
132
|
},
|
|
133
133
|
{
|
|
134
134
|
"path": "webui/src/app/router.ts",
|
|
135
|
-
"sha256": "
|
|
135
|
+
"sha256": "c205e52d7591e67bdcc4bb47e83f890deda169abcc7d3710526e860246b0650a"
|
|
136
136
|
},
|
|
137
137
|
{
|
|
138
138
|
"path": "webui/src/app/sound.ts",
|
|
@@ -140,7 +140,7 @@
|
|
|
140
140
|
},
|
|
141
141
|
{
|
|
142
142
|
"path": "webui/src/app/taskRoute.ts",
|
|
143
|
-
"sha256": "
|
|
143
|
+
"sha256": "0d683f985c5f3787bef4a481dbefea30b93c960523879313c25cea01ec1208cd"
|
|
144
144
|
},
|
|
145
145
|
{
|
|
146
146
|
"path": "webui/src/app/useApiRead.ts",
|
|
@@ -196,7 +196,7 @@
|
|
|
196
196
|
},
|
|
197
197
|
{
|
|
198
198
|
"path": "webui/src/components/ui/alert-dialog.tsx",
|
|
199
|
-
"sha256": "
|
|
199
|
+
"sha256": "119fded71513a3b1ea22f1a9e833c36fa63e74405ae7a83e74cb9faa04f086b5"
|
|
200
200
|
},
|
|
201
201
|
{
|
|
202
202
|
"path": "webui/src/components/ui/badge.tsx",
|
|
@@ -252,7 +252,7 @@
|
|
|
252
252
|
},
|
|
253
253
|
{
|
|
254
254
|
"path": "webui/src/components/ui/toaster.tsx",
|
|
255
|
-
"sha256": "
|
|
255
|
+
"sha256": "6b77318cdbb2e03883bab82709fd5fe856edd6c3ebeb0d3e29f8900aad342e04"
|
|
256
256
|
},
|
|
257
257
|
{
|
|
258
258
|
"path": "webui/src/components/ui/tooltip.tsx",
|
|
@@ -260,7 +260,7 @@
|
|
|
260
260
|
},
|
|
261
261
|
{
|
|
262
262
|
"path": "webui/src/index.css",
|
|
263
|
-
"sha256": "
|
|
263
|
+
"sha256": "566435ec3a072eb7643432fd87ed4d23edfb1c376835221de75bcb6a718f58dc"
|
|
264
264
|
},
|
|
265
265
|
{
|
|
266
266
|
"path": "webui/src/lib/act.ts",
|
|
@@ -364,15 +364,15 @@
|
|
|
364
364
|
},
|
|
365
365
|
{
|
|
366
366
|
"path": "webui/src/prompts/MockupViewer.tsx",
|
|
367
|
-
"sha256": "
|
|
367
|
+
"sha256": "bcf076888a230e89f9d4dbac2b544f5ff9852ad0b29a839abcd71357b649cf12"
|
|
368
368
|
},
|
|
369
369
|
{
|
|
370
370
|
"path": "webui/src/prompts/QuestionCard.tsx",
|
|
371
|
-
"sha256": "
|
|
371
|
+
"sha256": "046423859f7e921ffe8dd31e55dd229a161ebf4fc9f794fe4c7a73eabcff28e5"
|
|
372
372
|
},
|
|
373
373
|
{
|
|
374
374
|
"path": "webui/src/prompts/QuestionPopup.tsx",
|
|
375
|
-
"sha256": "
|
|
375
|
+
"sha256": "1db09e21bc793672b68f3bdd099de50fe5a2069362ef0ca9f22bb58be4fa793d"
|
|
376
376
|
},
|
|
377
377
|
{
|
|
378
378
|
"path": "webui/src/prompts/StaticPreview.tsx",
|
|
@@ -386,25 +386,9 @@
|
|
|
386
386
|
"path": "webui/src/prompts/payload.ts",
|
|
387
387
|
"sha256": "00aff317aa805303ffb8c6a451bf7b30841cc8a19cf079187cf61a535fe0619a"
|
|
388
388
|
},
|
|
389
|
-
{
|
|
390
|
-
"path": "webui/src/tabs/excalidraw/ExcalidrawTab.tsx",
|
|
391
|
-
"sha256": "e255e3579b7f6c929c05c2437519182e0a429255c94658ff1fe12ac4d356d13f"
|
|
392
|
-
},
|
|
393
|
-
{
|
|
394
|
-
"path": "webui/src/tabs/excalidraw/SessionDetail.tsx",
|
|
395
|
-
"sha256": "97835ddcd29b89d4768d081ae0c73021fceb7aa174827c8cfb5c68ec1e6e40f0"
|
|
396
|
-
},
|
|
397
|
-
{
|
|
398
|
-
"path": "webui/src/tabs/excalidraw/SessionList.tsx",
|
|
399
|
-
"sha256": "8d2ea9741214c30c85e8940e95724f71d3d33ab1cfe57f8889f8743285a7f954"
|
|
400
|
-
},
|
|
401
|
-
{
|
|
402
|
-
"path": "webui/src/tabs/excalidraw/words.ts",
|
|
403
|
-
"sha256": "134b86797a1911abb7d5c396d0603de8a35ed66a8419b98e2d1fef0e154ee5ae"
|
|
404
|
-
},
|
|
405
389
|
{
|
|
406
390
|
"path": "webui/src/tabs/git/GitTab.tsx",
|
|
407
|
-
"sha256": "
|
|
391
|
+
"sha256": "3514bdf364cc4d20612a86857aa19b795716ca1c8aec9695eef478fd3457c98a"
|
|
408
392
|
},
|
|
409
393
|
{
|
|
410
394
|
"path": "webui/src/tabs/git/PullDetail.tsx",
|
|
@@ -428,7 +412,7 @@
|
|
|
428
412
|
},
|
|
429
413
|
{
|
|
430
414
|
"path": "webui/src/tabs/issues/IssuesTab.tsx",
|
|
431
|
-
"sha256": "
|
|
415
|
+
"sha256": "6c9ba8911c22fea81c77935acfc65fa0b029aba707e38f2caf64f2bd806ea140"
|
|
432
416
|
},
|
|
433
417
|
{
|
|
434
418
|
"path": "webui/src/tabs/issues/words.ts",
|
|
@@ -436,7 +420,7 @@
|
|
|
436
420
|
},
|
|
437
421
|
{
|
|
438
422
|
"path": "webui/src/tabs/knowledge/Editors.tsx",
|
|
439
|
-
"sha256": "
|
|
423
|
+
"sha256": "ba8f8670ffde33cf4cc3d671a76b6f41b0e09ada927338a0dbc8927279d62c4e"
|
|
440
424
|
},
|
|
441
425
|
{
|
|
442
426
|
"path": "webui/src/tabs/knowledge/FileDetail.tsx",
|
|
@@ -476,7 +460,7 @@
|
|
|
476
460
|
},
|
|
477
461
|
{
|
|
478
462
|
"path": "webui/src/tabs/lobby/Thoughts.tsx",
|
|
479
|
-
"sha256": "
|
|
463
|
+
"sha256": "1ecf5f407247a2206d4999fe06672c91a6144388ca96bc62f3d8a64d8aa26562"
|
|
480
464
|
},
|
|
481
465
|
{
|
|
482
466
|
"path": "webui/src/tabs/lobby/busy.ts",
|
|
@@ -498,34 +482,6 @@
|
|
|
498
482
|
"path": "webui/src/tabs/lobby/weave.ts",
|
|
499
483
|
"sha256": "c22b23e409642a05d6b50dcb90f606f4635b8ebf6b7c56f443ec7d9c810d6b5a"
|
|
500
484
|
},
|
|
501
|
-
{
|
|
502
|
-
"path": "webui/src/tabs/metrics/Charts.tsx",
|
|
503
|
-
"sha256": "e0f6294f2f0f31b79fca4d291524c0dc46e229a44de602595f2d89c7826d041f"
|
|
504
|
-
},
|
|
505
|
-
{
|
|
506
|
-
"path": "webui/src/tabs/metrics/Classifier.tsx",
|
|
507
|
-
"sha256": "08624cdf2e74b01e1ec3640b5145ee21e995d19db971fea6628c17ce80991671"
|
|
508
|
-
},
|
|
509
|
-
{
|
|
510
|
-
"path": "webui/src/tabs/metrics/DateFilter.tsx",
|
|
511
|
-
"sha256": "49b9955a9a314ce2aed14811b405a1b6c81af4eff69e887c2a72a16d772a7163"
|
|
512
|
-
},
|
|
513
|
-
{
|
|
514
|
-
"path": "webui/src/tabs/metrics/MetricsTab.tsx",
|
|
515
|
-
"sha256": "06f8ba70e205c134548c5602da03974d199a63bb1eae41a5d340a8d29d823cf9"
|
|
516
|
-
},
|
|
517
|
-
{
|
|
518
|
-
"path": "webui/src/tabs/metrics/MetricsTable.tsx",
|
|
519
|
-
"sha256": "dde7487a676dc7514b1124b91fbd1c930c6d184afc1ce9d4aeefff6a30373a45"
|
|
520
|
-
},
|
|
521
|
-
{
|
|
522
|
-
"path": "webui/src/tabs/metrics/Tiles.tsx",
|
|
523
|
-
"sha256": "ed968d73751ebb511516e8c9b3e89b01cb470124c27effb935dc305797409288"
|
|
524
|
-
},
|
|
525
|
-
{
|
|
526
|
-
"path": "webui/src/tabs/metrics/words.ts",
|
|
527
|
-
"sha256": "684c84d1ec9e782140d7d4796529f00fcbf1d0a36f9f4e50c081f19c3df61e73"
|
|
528
|
-
},
|
|
529
485
|
{
|
|
530
486
|
"path": "webui/src/tabs/plan/Conversation.tsx",
|
|
531
487
|
"sha256": "8fe5db3fdf973afda7fd0bfedca5ad0cb4b0ff3db275ecdb412df14d2bd1fee8"
|
|
@@ -580,35 +536,11 @@
|
|
|
580
536
|
},
|
|
581
537
|
{
|
|
582
538
|
"path": "webui/src/tabs/registry.tsx",
|
|
583
|
-
"sha256": "
|
|
584
|
-
},
|
|
585
|
-
{
|
|
586
|
-
"path": "webui/src/tabs/sessions/ChatView.tsx",
|
|
587
|
-
"sha256": "a6d7be372fddb100816304d1b0f8ba2462fa57b05b39394470f432fac5074062"
|
|
588
|
-
},
|
|
589
|
-
{
|
|
590
|
-
"path": "webui/src/tabs/sessions/Dialogs.tsx",
|
|
591
|
-
"sha256": "b356f5220f0bdbcc8bbc65328033d4ecee5cd19a398ef0980835ba8ff617be21"
|
|
592
|
-
},
|
|
593
|
-
{
|
|
594
|
-
"path": "webui/src/tabs/sessions/SessionDetail.tsx",
|
|
595
|
-
"sha256": "57a6772eae6441ebe7fc12e43d15cf7ab6e4a5833adc80f67f1467ab68d2bb4e"
|
|
596
|
-
},
|
|
597
|
-
{
|
|
598
|
-
"path": "webui/src/tabs/sessions/SessionsTab.tsx",
|
|
599
|
-
"sha256": "06b786f615e62fb74aa48de1f8e0e3b850db5796a2782a0371832c0690f5bb7e"
|
|
600
|
-
},
|
|
601
|
-
{
|
|
602
|
-
"path": "webui/src/tabs/sessions/WhereIcon.tsx",
|
|
603
|
-
"sha256": "4233416cf305ea409bfcc3efd72fff09c57ceaf6e60a1230ec3bb77d150fc21f"
|
|
604
|
-
},
|
|
605
|
-
{
|
|
606
|
-
"path": "webui/src/tabs/sessions/words.ts",
|
|
607
|
-
"sha256": "4754645dbbb727d1278283f3afdd634b58e4b01e61ddd3f84d6aa84d01f1e8ba"
|
|
539
|
+
"sha256": "6205bec77f47a8a83dee0ee88a3644a05f8c25ab62c2065bf47da3fe8d374749"
|
|
608
540
|
},
|
|
609
541
|
{
|
|
610
542
|
"path": "webui/src/tabs/settings/SettingsForm.tsx",
|
|
611
|
-
"sha256": "
|
|
543
|
+
"sha256": "93c9ef05485f632c0a68d20f283fb4238524ccfe4da982f66ae983e473c36fbb"
|
|
612
544
|
},
|
|
613
545
|
{
|
|
614
546
|
"path": "webui/src/tabs/settings/SettingsTab.tsx",
|
|
@@ -620,11 +552,11 @@
|
|
|
620
552
|
},
|
|
621
553
|
{
|
|
622
554
|
"path": "webui/src/tabs/settings/parts.tsx",
|
|
623
|
-
"sha256": "
|
|
555
|
+
"sha256": "29ad5b69cc1b67caa8b304ed5942d19197b9c5670583dbec1e46337768822e76"
|
|
624
556
|
},
|
|
625
557
|
{
|
|
626
558
|
"path": "webui/src/tabs/settings/words.ts",
|
|
627
|
-
"sha256": "
|
|
559
|
+
"sha256": "a4a0ba4cf548fcb63d4bacb2c8b7f6c7c20487bf5951d58a7fb04325441f6519"
|
|
628
560
|
},
|
|
629
561
|
{
|
|
630
562
|
"path": "webui/src/tabs/tasks/Comments.tsx",
|
|
@@ -632,11 +564,11 @@
|
|
|
632
564
|
},
|
|
633
565
|
{
|
|
634
566
|
"path": "webui/src/tabs/tasks/DeliveryReview.tsx",
|
|
635
|
-
"sha256": "
|
|
567
|
+
"sha256": "72d76d6e6736f5e6d56534696d98c51e1ede44024dc3f31e0adb09c9ff0b3f7d"
|
|
636
568
|
},
|
|
637
569
|
{
|
|
638
570
|
"path": "webui/src/tabs/tasks/DetailSections.tsx",
|
|
639
|
-
"sha256": "
|
|
571
|
+
"sha256": "2abf152f2a36e60a35fa31465a1b18380a2a912e8125ada54e0bb9947b6685a7"
|
|
640
572
|
},
|
|
641
573
|
{
|
|
642
574
|
"path": "webui/src/tabs/tasks/OpenInSession.tsx",
|
|
@@ -652,23 +584,23 @@
|
|
|
652
584
|
},
|
|
653
585
|
{
|
|
654
586
|
"path": "webui/src/tabs/tasks/ResumeTask.tsx",
|
|
655
|
-
"sha256": "
|
|
587
|
+
"sha256": "3bbaa2342151be92262f350a7aee0c832a3609a02e1737c356070a17fad67837"
|
|
656
588
|
},
|
|
657
589
|
{
|
|
658
|
-
"path": "webui/src/tabs/tasks/
|
|
659
|
-
"sha256": "
|
|
590
|
+
"path": "webui/src/tabs/tasks/TaskDetail.tsx",
|
|
591
|
+
"sha256": "45459fa495940ec37f44a5e54be228a7c1b368bfefcd00052ba27df41c0193d6"
|
|
660
592
|
},
|
|
661
593
|
{
|
|
662
|
-
"path": "webui/src/tabs/tasks/
|
|
663
|
-
"sha256": "
|
|
594
|
+
"path": "webui/src/tabs/tasks/TaskInterventions.tsx",
|
|
595
|
+
"sha256": "6e7d22e9c41052c3fdc624e24026012b0258a0e93f93683c50328c34bc5a82dc"
|
|
664
596
|
},
|
|
665
597
|
{
|
|
666
598
|
"path": "webui/src/tabs/tasks/TaskList.tsx",
|
|
667
|
-
"sha256": "
|
|
599
|
+
"sha256": "1005f150fe3b91331c66c0e10e89526ef8a80ae6ecbfdf02d64de04fd1b65b64"
|
|
668
600
|
},
|
|
669
601
|
{
|
|
670
602
|
"path": "webui/src/tabs/tasks/TasksTab.tsx",
|
|
671
|
-
"sha256": "
|
|
603
|
+
"sha256": "9923567df7cb9a52f8a1e2f84567eab5d7fdc26107ff248302019bb81e498491"
|
|
672
604
|
},
|
|
673
605
|
{
|
|
674
606
|
"path": "webui/src/tabs/tasks/words.ts",
|
|
@@ -692,7 +624,7 @@
|
|
|
692
624
|
},
|
|
693
625
|
{
|
|
694
626
|
"path": "webui/src/ui/EffortSlider.tsx",
|
|
695
|
-
"sha256": "
|
|
627
|
+
"sha256": "0590baefa6c17ca9d4372d8658f8508e0578d61da6160165e4e5116c41adb706"
|
|
696
628
|
},
|
|
697
629
|
{
|
|
698
630
|
"path": "webui/src/ui/Frame.tsx",
|
|
@@ -720,7 +652,7 @@
|
|
|
720
652
|
},
|
|
721
653
|
{
|
|
722
654
|
"path": "webui/src/ui/SplitPane.tsx",
|
|
723
|
-
"sha256": "
|
|
655
|
+
"sha256": "fd8742f29f219fd257e1b682e1bfe032f20d599c8313f829f981ccc1d155dcb9"
|
|
724
656
|
},
|
|
725
657
|
{
|
|
726
658
|
"path": "webui/src/ui/WorkingMark.tsx",
|
|
@@ -732,7 +664,7 @@
|
|
|
732
664
|
},
|
|
733
665
|
{
|
|
734
666
|
"path": "webui/src/ui/rows.ts",
|
|
735
|
-
"sha256": "
|
|
667
|
+
"sha256": "41c1e5f9f0c3b8abc0006209bb76dff6e45366740be1c7aa623c348c9253685f"
|
|
736
668
|
},
|
|
737
669
|
{
|
|
738
670
|
"path": "webui/src/ui/task-facts.tsx",
|
package/webui/dist/index.html
CHANGED
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
|
|
14
14
|
<title>bot-lobby</title>
|
|
15
15
|
<meta property="csp-nonce" nonce="__CSP_NONCE__">
|
|
16
|
-
<script type="module" crossorigin src="/assets/index-
|
|
17
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
16
|
+
<script type="module" crossorigin src="/assets/index-BJ1fEle9.js" nonce="__CSP_NONCE__"></script>
|
|
17
|
+
<link rel="stylesheet" crossorigin href="/assets/index-BdtiIB9L.css" nonce="__CSP_NONCE__">
|
|
18
18
|
</head>
|
|
19
19
|
<body>
|
|
20
20
|
<div id="root"></div>
|
package/src/excalidraw/check.ts
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* "Does this session work?": join the room for a moment, as a seat named
|
|
3
|
-
* after the lobby, and say what is there — the server reached, who is in the
|
|
4
|
-
* room, how much is on the board, whether the link's key fits. The seat leaves
|
|
5
|
-
* again at once, so a check never leaves an extra collaborator in the room.
|
|
6
|
-
*/
|
|
7
|
-
import { ExcalidrawRoom, type RoomOptions } from "./client.ts";
|
|
8
|
-
import { parseRoomLink } from "./room.ts";
|
|
9
|
-
|
|
10
|
-
export interface CheckResult {
|
|
11
|
-
ok: boolean;
|
|
12
|
-
text: string;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export async function checkSession(link: string, name: string, options: Pick<RoomOptions, "server" | "sceneWaitMs" | "connectTimeoutMs" | "connect"> = {}): Promise<CheckResult> {
|
|
16
|
-
const parsed = parseRoomLink(link);
|
|
17
|
-
if (!parsed) return { ok: false, text: "not a valid room link" };
|
|
18
|
-
const room = new ExcalidrawRoom({ link: parsed, username: "bot-lobby · check", name, ...options });
|
|
19
|
-
try {
|
|
20
|
-
const status = await room.ready();
|
|
21
|
-
// Give an answer to the newcomer's arrival a moment more when someone is there but the board has not come yet.
|
|
22
|
-
if (status.undecryptable > 0 && status.elements === 0) return { ok: false, text: "reached the room, but its messages would not open: the link's key does not match, so it may have been copied incompletely" };
|
|
23
|
-
if (status.peers === 0) return { ok: true, text: "reached the server; nobody has this session open yet — open the link in Excalidraw, and agents can read and draw" };
|
|
24
|
-
const who = status.people.length > 0 ? status.people.join(", ") : `${status.peers} other${status.peers === 1 ? "" : "s"}`;
|
|
25
|
-
return { ok: true, text: `reached the room with ${who}; ${status.synced ? `${status.elements} element${status.elements === 1 ? "" : "s"} on the board` : "the board has not been sent yet (it comes when someone in the room answers)"}` };
|
|
26
|
-
} catch (error) {
|
|
27
|
-
return { ok: false, text: (error as Error).message };
|
|
28
|
-
} finally {
|
|
29
|
-
room.close();
|
|
30
|
-
}
|
|
31
|
-
}
|