clavarium 0.2.236-next.1 → 0.2.237-beta.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 (104) hide show
  1. package/config/launch/claude-code.sh +40 -19
  2. package/config/launch/codex.sh +37 -0
  3. package/config/launch/json-set.mjs +5 -2
  4. package/config/launch/mcp-relay.mjs +98 -0
  5. package/config/launch/mcp-sock.sh +31 -0
  6. package/config/launch/screen-watch.mjs +173 -0
  7. package/config/launch/toml-block.mjs +26 -0
  8. package/config/launch/tools-host.mjs +93 -0
  9. package/config/launch/vibe.sh +40 -0
  10. package/config/machine/clavarium-beat +44 -0
  11. package/config/machine/clavarium-beat-one +40 -0
  12. package/config/machine/clavarium-enter +60 -0
  13. package/config/tools.json +170 -12
  14. package/deploy/clavarium-host +385 -31
  15. package/deploy/clavarium-tunnel +14 -3
  16. package/deploy/clavarium.mjs +4 -0
  17. package/deploy/git-read +57 -5
  18. package/deploy/install.sh +11 -5
  19. package/deploy/maintenance.html +5 -2
  20. package/deploy/online.mjs +251 -8
  21. package/deploy/relay.sh +53 -27
  22. package/deploy/tunnel.mjs +7 -5
  23. package/deploy/updater.mjs +168 -25
  24. package/npm-shrinkwrap.json +245 -19
  25. package/package.json +9 -6
  26. package/server/agenda.mjs +140 -0
  27. package/server/api.mjs +392 -28
  28. package/server/apikeys.mjs +1372 -0
  29. package/server/beat.mjs +189 -0
  30. package/server/binders.mjs +42 -0
  31. package/server/boxcollect.mjs +276 -0
  32. package/server/boxes.mjs +348 -29
  33. package/server/bridge.mjs +13 -4
  34. package/server/browsers.mjs +364 -0
  35. package/server/capacity.mjs +37 -10
  36. package/server/carry.mjs +143 -0
  37. package/server/catalog.mjs +48 -0
  38. package/server/contactview.mjs +122 -0
  39. package/server/conversations.mjs +1122 -46
  40. package/server/copywork.mjs +34 -0
  41. package/server/demandes.mjs +251 -0
  42. package/server/desktop.mjs +102 -0
  43. package/server/devices.mjs +1 -0
  44. package/server/dictation-engines.mjs +91 -0
  45. package/server/dockets.mjs +49 -6
  46. package/server/door.mjs +19 -5
  47. package/server/events.mjs +3 -0
  48. package/server/features.mjs +366 -0
  49. package/server/files.mjs +43 -1
  50. package/server/gitaccess.mjs +12 -3
  51. package/server/gitchecks.mjs +17 -3
  52. package/server/gitkeeper.mjs +45 -10
  53. package/server/gitpush.mjs +286 -71
  54. package/server/gitrunner.mjs +144 -10
  55. package/server/grants.mjs +47 -11
  56. package/server/guide.mjs +31 -10
  57. package/server/health.mjs +138 -12
  58. package/server/jobs.mjs +138 -0
  59. package/server/linkguard.mjs +191 -0
  60. package/server/machinelist.mjs +58 -0
  61. package/server/mailref.mjs +90 -0
  62. package/server/mailview.mjs +204 -0
  63. package/server/main.mjs +425 -47
  64. package/server/mcpoauth.mjs +338 -0
  65. package/server/mcpx.mjs +175 -0
  66. package/server/network.mjs +125 -13
  67. package/server/profile.mjs +129 -0
  68. package/server/relayjoin.mjs +67 -0
  69. package/server/resources.mjs +6 -0
  70. package/server/revive.mjs +70 -0
  71. package/server/rooms.mjs +462 -0
  72. package/server/secrets.mjs +25 -12
  73. package/server/serverlogs.mjs +30 -4
  74. package/server/settingswords.mjs +375 -0
  75. package/server/signinhelp.mjs +239 -0
  76. package/server/speech.mjs +40 -4
  77. package/server/spoken.mjs +60 -0
  78. package/server/sshconsole.mjs +99 -0
  79. package/server/sshmachine.mjs +76 -0
  80. package/server/store.mjs +15 -1
  81. package/server/suggest.mjs +66 -0
  82. package/server/talk.mjs +228 -55
  83. package/server/tethers.mjs +223 -13
  84. package/server/toolbox.mjs +30 -7
  85. package/server/tools.mjs +38 -6
  86. package/server/updates.mjs +7 -2
  87. package/server/vm.mjs +215 -46
  88. package/server/vmwatch.mjs +82 -23
  89. package/server/voice.mjs +183 -51
  90. package/server/wakelearn.mjs +214 -0
  91. package/server/wakeups.mjs +42 -2
  92. package/server/watchdog.mjs +102 -0
  93. package/web/app.js +5590 -1237
  94. package/web/desk.js +531 -0
  95. package/web/device.html +15 -2
  96. package/web/features.js +480 -0
  97. package/web/index.html +874 -490
  98. package/web/kit.js +1142 -0
  99. package/web/links.js +2 -2
  100. package/web/mail-view.js +386 -0
  101. package/web/manifest.webmanifest +4 -0
  102. package/web/style.css +1592 -268
  103. package/web/voice-core.js +48 -0
  104. package/web/voice.js +13 -5
@@ -1,27 +1,29 @@
1
1
  {
2
2
  "name": "clavarium",
3
- "version": "0.2.236-next.1",
3
+ "version": "0.2.237-beta.1",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "clavarium",
9
- "version": "0.2.236-next.1",
9
+ "version": "0.2.237-beta.1",
10
10
  "license": "MIT",
11
11
  "dependencies": {
12
12
  "@xterm/addon-fit": "^0.11.0",
13
13
  "@xterm/xterm": "^6.0.0",
14
- "clavarium-binder": "0.1.44-next.1",
15
- "clavarium-docket": "0.1.1",
16
- "clavarium-parley": "0.17.35-next.1",
17
- "clavarium-tether": "0.1.0-next.46",
14
+ "clavarium-binder": "0.1.66-next.1",
15
+ "clavarium-docket": "0.1.2-next.3",
16
+ "clavarium-parley": "0.17.96-next.1",
17
+ "clavarium-tether": "0.1.0-next.79",
18
+ "mammoth": "1.13.0",
18
19
  "mermaid": "11.17.2",
19
20
  "node-pty": "^1.1.0",
20
21
  "pdfjs-dist": "6.4.299",
21
22
  "prismjs": "1.30.0",
22
23
  "qrcode": "^1.5.4",
23
24
  "web-push": "^3.6.7",
24
- "ws": "^8.18.0"
25
+ "ws": "^8.18.0",
26
+ "xlsx": "https://cdn.sheetjs.com/xlsx-0.20.3/xlsx-0.20.3.tgz"
25
27
  },
26
28
  "bin": {
27
29
  "clavarium": "deploy/clavarium.mjs"
@@ -610,6 +612,15 @@
610
612
  "d3-transition": "^3.0.1"
611
613
  }
612
614
  },
615
+ "node_modules/@xmldom/xmldom": {
616
+ "version": "0.8.15",
617
+ "resolved": "https://registry.npmjs.org/@xmldom/xmldom/-/xmldom-0.8.15.tgz",
618
+ "integrity": "sha512-/5NV/vDALVFDXgLmfsy9TRCBlKwO2LNBFzpzvb9iIj+jR+eSc6DLYYvVOdivT/jm7MtU6TebYuRmzEOI7w40UA==",
619
+ "license": "MIT",
620
+ "engines": {
621
+ "node": ">=10.0.0"
622
+ }
623
+ },
613
624
  "node_modules/@xterm/addon-fit": {
614
625
  "version": "0.11.0",
615
626
  "resolved": "https://registry.npmjs.org/@xterm/addon-fit/-/addon-fit-0.11.0.tgz",
@@ -658,6 +669,15 @@
658
669
  "url": "https://github.com/chalk/ansi-styles?sponsor=1"
659
670
  }
660
671
  },
672
+ "node_modules/argparse": {
673
+ "version": "1.0.10",
674
+ "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz",
675
+ "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==",
676
+ "license": "MIT",
677
+ "dependencies": {
678
+ "sprintf-js": "~1.0.2"
679
+ }
680
+ },
661
681
  "node_modules/asn1": {
662
682
  "version": "0.2.6",
663
683
  "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.6.tgz",
@@ -680,6 +700,26 @@
680
700
  "safer-buffer": "^2.1.0"
681
701
  }
682
702
  },
703
+ "node_modules/base64-js": {
704
+ "version": "1.5.1",
705
+ "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz",
706
+ "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==",
707
+ "funding": [
708
+ {
709
+ "type": "github",
710
+ "url": "https://github.com/sponsors/feross"
711
+ },
712
+ {
713
+ "type": "patreon",
714
+ "url": "https://www.patreon.com/feross"
715
+ },
716
+ {
717
+ "type": "consulting",
718
+ "url": "https://feross.org/support"
719
+ }
720
+ ],
721
+ "license": "MIT"
722
+ },
683
723
  "node_modules/bcrypt-pbkdf": {
684
724
  "version": "1.0.2",
685
725
  "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz",
@@ -721,9 +761,9 @@
721
761
  }
722
762
  },
723
763
  "node_modules/clavarium-binder": {
724
- "version": "0.1.44-next.1",
725
- "resolved": "https://registry.npmjs.org/clavarium-binder/-/clavarium-binder-0.1.44-next.1.tgz",
726
- "integrity": "sha512-GJMZBnxneV0775Aeo2bSnKgB/QkeBjH+3oCxpdr3qX9CQgu5gMrPaRLbQdfp/Q5uZLjRScKRlxdqlFajvnqs8g==",
764
+ "version": "0.1.66-next.1",
765
+ "resolved": "https://registry.npmjs.org/clavarium-binder/-/clavarium-binder-0.1.66-next.1.tgz",
766
+ "integrity": "sha512-fidWpyIoxPlQ1IiBrtRf44A5ev7J/ydCuhNfLlz38FSnrHqIhSMc3vb2QUG4McOtc7C46Dr15ZvN5cjnHx2yZg==",
727
767
  "license": "MIT",
728
768
  "bin": {
729
769
  "binder": "bin/binder.mjs",
@@ -734,9 +774,9 @@
734
774
  }
735
775
  },
736
776
  "node_modules/clavarium-docket": {
737
- "version": "0.1.1",
738
- "resolved": "https://registry.npmjs.org/clavarium-docket/-/clavarium-docket-0.1.1.tgz",
739
- "integrity": "sha512-ssmnIfkBmOeKaHXBrL97qsaBp6Tc6OwX08WksQjpBGZx/QklwRvZqXgOYZ/Nk7Hk3HO0xXrJy5EyHbFcLVXfiA==",
777
+ "version": "0.1.2-next.3",
778
+ "resolved": "https://registry.npmjs.org/clavarium-docket/-/clavarium-docket-0.1.2-next.3.tgz",
779
+ "integrity": "sha512-UNm3mtqv2SMcEBkP6M+ki760+SjQYQHJwGvaEYoCajx68LUw41gAMXNaqVpawsgRfk0TRPk3nRnfol5mhilZXA==",
740
780
  "license": "MIT",
741
781
  "bin": {
742
782
  "docket": "bin/docket.mjs",
@@ -747,9 +787,9 @@
747
787
  }
748
788
  },
749
789
  "node_modules/clavarium-parley": {
750
- "version": "0.17.35-next.1",
751
- "resolved": "https://registry.npmjs.org/clavarium-parley/-/clavarium-parley-0.17.35-next.1.tgz",
752
- "integrity": "sha512-bUR/1I9ZqEXWJ7SoxPYdkjlOHJ8dnML5A0ZQGfuEOl4YNuB6ULT4PoWqHfj0fVhY2j6BjDLvHJKZJ8WouEGXig==",
790
+ "version": "0.17.96-next.1",
791
+ "resolved": "https://registry.npmjs.org/clavarium-parley/-/clavarium-parley-0.17.96-next.1.tgz",
792
+ "integrity": "sha512-UpRSpfdJOdoRFUsT5X/7pPaKPJ4PlnVvpdM1lml7ETXIFHJmhIGNe71Dixd+h6ETXI9rQfZ4FJ8b5CJJGjrcAg==",
753
793
  "license": "MIT",
754
794
  "bin": {
755
795
  "parley": "bin/parley.mjs",
@@ -760,9 +800,9 @@
760
800
  }
761
801
  },
762
802
  "node_modules/clavarium-tether": {
763
- "version": "0.1.0-next.46",
764
- "resolved": "https://registry.npmjs.org/clavarium-tether/-/clavarium-tether-0.1.0-next.46.tgz",
765
- "integrity": "sha512-p6B9kM1A4CUN/OyLWf5IpsKvQ5SiTir7P+X2BcnRQBml+S9z/1nS0Xs7vxhk4ekDui/x0Dh5xMOO4IvaCLhaeA==",
803
+ "version": "0.1.0-next.79",
804
+ "resolved": "https://registry.npmjs.org/clavarium-tether/-/clavarium-tether-0.1.0-next.79.tgz",
805
+ "integrity": "sha512-oRbJn6olIySm1RbQLwuBK0tMklv5VIqOCYovRAdzg01BBrn9HyoDALIyOrj9VtNS1I6RsIAoI4GRU3yozNtLWw==",
766
806
  "license": "MIT",
767
807
  "bin": {
768
808
  "tether": "bin/cli.mjs",
@@ -813,6 +853,12 @@
813
853
  "node": ">= 10"
814
854
  }
815
855
  },
856
+ "node_modules/core-util-is": {
857
+ "version": "1.0.3",
858
+ "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz",
859
+ "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==",
860
+ "license": "MIT"
861
+ },
816
862
  "node_modules/cose-base": {
817
863
  "version": "1.0.3",
818
864
  "resolved": "https://registry.npmjs.org/cose-base/-/cose-base-1.0.3.tgz",
@@ -1382,6 +1428,12 @@
1382
1428
  "integrity": "sha512-qiSlmBq9+BCdCA/L46dw8Uy93mloxsPSbwnm5yrKn2vMPiy8KyAskTF6zuV/j5BMsmOGZDPs7KjU+mjb670kfA==",
1383
1429
  "license": "MIT"
1384
1430
  },
1431
+ "node_modules/dingbat-to-unicode": {
1432
+ "version": "1.0.2",
1433
+ "resolved": "https://registry.npmjs.org/dingbat-to-unicode/-/dingbat-to-unicode-1.0.2.tgz",
1434
+ "integrity": "sha512-R0bRerYzy/EZP6QzD3Hkl6JjUDA1Mnn+pd928w0nWjPzihnbAR6dcjGJGiRyznj5E4S1duEKzWrTqw02DPcdzg==",
1435
+ "license": "BSD-2-Clause"
1436
+ },
1385
1437
  "node_modules/dompurify": {
1386
1438
  "version": "3.4.17",
1387
1439
  "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-3.4.17.tgz",
@@ -1391,6 +1443,15 @@
1391
1443
  "@types/trusted-types": "^2.0.7"
1392
1444
  }
1393
1445
  },
1446
+ "node_modules/duck": {
1447
+ "version": "0.1.12",
1448
+ "resolved": "https://registry.npmjs.org/duck/-/duck-0.1.12.tgz",
1449
+ "integrity": "sha512-wkctla1O6VfP89gQ+J/yDesM0S7B7XLXjKGzXxMDVFg7uEn706niAtyYovKbyq1oT9YwDcly721/iUWoc8MVRg==",
1450
+ "license": "BSD",
1451
+ "dependencies": {
1452
+ "underscore": "^1.13.1"
1453
+ }
1454
+ },
1394
1455
  "node_modules/ecdsa-sig-formatter": {
1395
1456
  "version": "1.0.11",
1396
1457
  "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz",
@@ -1489,6 +1550,12 @@
1489
1550
  "node": ">=0.10.0"
1490
1551
  }
1491
1552
  },
1553
+ "node_modules/immediate": {
1554
+ "version": "3.0.6",
1555
+ "resolved": "https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz",
1556
+ "integrity": "sha512-XXOFtyqDjNDAQxVfYxuF7g9Il/IbWmmlQg2MYKOH8ExIT1qg6xc4zyS3HaEEATgs1btfzxq15ciUiY7gjSXRGQ==",
1557
+ "license": "MIT"
1558
+ },
1492
1559
  "node_modules/import-meta-resolve": {
1493
1560
  "version": "4.2.0",
1494
1561
  "resolved": "https://registry.npmjs.org/import-meta-resolve/-/import-meta-resolve-4.2.0.tgz",
@@ -1523,6 +1590,24 @@
1523
1590
  "node": ">=8"
1524
1591
  }
1525
1592
  },
1593
+ "node_modules/isarray": {
1594
+ "version": "1.0.0",
1595
+ "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
1596
+ "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==",
1597
+ "license": "MIT"
1598
+ },
1599
+ "node_modules/jszip": {
1600
+ "version": "3.10.2",
1601
+ "resolved": "https://registry.npmjs.org/jszip/-/jszip-3.10.2.tgz",
1602
+ "integrity": "sha512-3l+rb15IOWtUhU0H5MFqES/T6Kh7abYwjosBey/vD6hDt8zoEffkSC5Ws5SGtgVw3gBx2NEbhTeSW1+kWkpyTQ==",
1603
+ "license": "(MIT OR GPL-3.0-or-later)",
1604
+ "dependencies": {
1605
+ "lie": "~3.3.0",
1606
+ "pako": "~1.0.2",
1607
+ "readable-stream": "~2.3.6",
1608
+ "setimmediate": "^1.0.5"
1609
+ }
1610
+ },
1526
1611
  "node_modules/jwa": {
1527
1612
  "version": "2.0.1",
1528
1613
  "resolved": "https://registry.npmjs.org/jwa/-/jwa-2.0.1.tgz",
@@ -1580,6 +1665,15 @@
1580
1665
  "integrity": "sha512-8h2oVEZNktL4BH2JCOI90iD1yXwL6iNW7KcCKT2QZgQJR2vbqDsldCTPRU9NifTCqHZci57XvQQ15YTu+sTYPg==",
1581
1666
  "license": "MIT"
1582
1667
  },
1668
+ "node_modules/lie": {
1669
+ "version": "3.3.0",
1670
+ "resolved": "https://registry.npmjs.org/lie/-/lie-3.3.0.tgz",
1671
+ "integrity": "sha512-UaiMJzeWRlEujzAuw5LokY1L5ecNQYZKfmyZ9L7wDHb/p5etKaxXhohBcrw0EYby+G/NA52vRSN4N39dxHAIwQ==",
1672
+ "license": "MIT",
1673
+ "dependencies": {
1674
+ "immediate": "~3.0.5"
1675
+ }
1676
+ },
1583
1677
  "node_modules/locate-path": {
1584
1678
  "version": "5.0.0",
1585
1679
  "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz",
@@ -1598,6 +1692,39 @@
1598
1692
  "integrity": "sha512-J8xewKD/Gk22OZbhpOVSwcs60zhd95ESDwezOFuA3/099925PdHJ7OFHNTGtajL3AlZkykD32HykiMo+BIBI8A==",
1599
1693
  "license": "MIT"
1600
1694
  },
1695
+ "node_modules/lop": {
1696
+ "version": "0.4.2",
1697
+ "resolved": "https://registry.npmjs.org/lop/-/lop-0.4.2.tgz",
1698
+ "integrity": "sha512-RefILVDQ4DKoRZsJ4Pj22TxE3omDO47yFpkIBoDKzkqPRISs5U1cnAdg/5583YPkWPaLIYHOKRMQSvjFsO26cw==",
1699
+ "license": "BSD-2-Clause",
1700
+ "dependencies": {
1701
+ "duck": "^0.1.12",
1702
+ "option": "~0.2.1",
1703
+ "underscore": "^1.13.1"
1704
+ }
1705
+ },
1706
+ "node_modules/mammoth": {
1707
+ "version": "1.13.0",
1708
+ "resolved": "https://registry.npmjs.org/mammoth/-/mammoth-1.13.0.tgz",
1709
+ "integrity": "sha512-2cawcYFcP7ISfXbBcL9lmVgTNWo88v/52ND1gnywHtVT/pX0//puPnf0iMPV9ZgmuvNOE+zkIhDgZ9M2c2dDDg==",
1710
+ "license": "BSD-2-Clause",
1711
+ "dependencies": {
1712
+ "@xmldom/xmldom": "^0.8.6",
1713
+ "argparse": "~1.0.3",
1714
+ "base64-js": "^1.5.1",
1715
+ "dingbat-to-unicode": "^1.0.1",
1716
+ "jszip": "^3.7.1",
1717
+ "lop": "^0.4.2",
1718
+ "underscore": "^1.13.1",
1719
+ "xmlbuilder": "^10.0.0"
1720
+ },
1721
+ "bin": {
1722
+ "mammoth": "bin/mammoth"
1723
+ },
1724
+ "engines": {
1725
+ "node": ">=12.0.0"
1726
+ }
1727
+ },
1601
1728
  "node_modules/marked": {
1602
1729
  "version": "16.4.2",
1603
1730
  "resolved": "https://registry.npmjs.org/marked/-/marked-16.4.2.tgz",
@@ -1684,6 +1811,12 @@
1684
1811
  "node-addon-api": "^7.1.0"
1685
1812
  }
1686
1813
  },
1814
+ "node_modules/option": {
1815
+ "version": "0.2.4",
1816
+ "resolved": "https://registry.npmjs.org/option/-/option-0.2.4.tgz",
1817
+ "integrity": "sha512-pkEqbDyl8ou5cpq+VsnQbe/WlEy5qS7xPzMS1U55OCG9KPvwFD46zDbxQIj3egJSFc3D+XhYOPUzz49zQAVy7A==",
1818
+ "license": "BSD-2-Clause"
1819
+ },
1687
1820
  "node_modules/p-limit": {
1688
1821
  "version": "2.3.0",
1689
1822
  "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz",
@@ -1726,6 +1859,12 @@
1726
1859
  "integrity": "sha512-zAMfbta9nPA8AKkA4WdmNAT8R8s6Dk0/xwPsqNnRidMFcLo1YkLuPDTgs2f64XdzS8vbLNnoJ+uUIkgbz7oRHA==",
1727
1860
  "license": "MIT"
1728
1861
  },
1862
+ "node_modules/pako": {
1863
+ "version": "1.0.11",
1864
+ "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz",
1865
+ "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==",
1866
+ "license": "(MIT AND Zlib)"
1867
+ },
1729
1868
  "node_modules/path-data-parser": {
1730
1869
  "version": "0.1.0",
1731
1870
  "resolved": "https://registry.npmjs.org/path-data-parser/-/path-data-parser-0.1.0.tgz",
@@ -1787,6 +1926,12 @@
1787
1926
  "node": ">=6"
1788
1927
  }
1789
1928
  },
1929
+ "node_modules/process-nextick-args": {
1930
+ "version": "2.0.1",
1931
+ "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz",
1932
+ "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==",
1933
+ "license": "MIT"
1934
+ },
1790
1935
  "node_modules/qrcode": {
1791
1936
  "version": "1.5.4",
1792
1937
  "resolved": "https://registry.npmjs.org/qrcode/-/qrcode-1.5.4.tgz",
@@ -1804,6 +1949,27 @@
1804
1949
  "node": ">=10.13.0"
1805
1950
  }
1806
1951
  },
1952
+ "node_modules/readable-stream": {
1953
+ "version": "2.3.8",
1954
+ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz",
1955
+ "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==",
1956
+ "license": "MIT",
1957
+ "dependencies": {
1958
+ "core-util-is": "~1.0.0",
1959
+ "inherits": "~2.0.3",
1960
+ "isarray": "~1.0.0",
1961
+ "process-nextick-args": "~2.0.0",
1962
+ "safe-buffer": "~5.1.1",
1963
+ "string_decoder": "~1.1.1",
1964
+ "util-deprecate": "~1.0.1"
1965
+ }
1966
+ },
1967
+ "node_modules/readable-stream/node_modules/safe-buffer": {
1968
+ "version": "5.1.2",
1969
+ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
1970
+ "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==",
1971
+ "license": "MIT"
1972
+ },
1807
1973
  "node_modules/require-directory": {
1808
1974
  "version": "2.1.1",
1809
1975
  "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz",
@@ -1875,6 +2041,12 @@
1875
2041
  "integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==",
1876
2042
  "license": "ISC"
1877
2043
  },
2044
+ "node_modules/setimmediate": {
2045
+ "version": "1.0.5",
2046
+ "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz",
2047
+ "integrity": "sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==",
2048
+ "license": "MIT"
2049
+ },
1878
2050
  "node_modules/sherpa-onnx-darwin-arm64": {
1879
2051
  "version": "1.13.8",
1880
2052
  "resolved": "https://registry.npmjs.org/sherpa-onnx-darwin-arm64/-/sherpa-onnx-darwin-arm64-1.13.8.tgz",
@@ -1968,6 +2140,12 @@
1968
2140
  "win32"
1969
2141
  ]
1970
2142
  },
2143
+ "node_modules/sprintf-js": {
2144
+ "version": "1.0.3",
2145
+ "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz",
2146
+ "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==",
2147
+ "license": "BSD-3-Clause"
2148
+ },
1971
2149
  "node_modules/ssh2": {
1972
2150
  "version": "1.17.0",
1973
2151
  "resolved": "https://registry.npmjs.org/ssh2/-/ssh2-1.17.0.tgz",
@@ -1992,6 +2170,21 @@
1992
2170
  "integrity": "sha512-cEmp9QeXXRmjj/rVp9oyiqcvyocWab/HaoN4+bwFeZ7QzykJD6L3yD4v12K1x0tHpqRqVpJevN3gW7kyM39Bqg==",
1993
2171
  "license": "MIT"
1994
2172
  },
2173
+ "node_modules/string_decoder": {
2174
+ "version": "1.1.1",
2175
+ "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
2176
+ "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
2177
+ "license": "MIT",
2178
+ "dependencies": {
2179
+ "safe-buffer": "~5.1.0"
2180
+ }
2181
+ },
2182
+ "node_modules/string_decoder/node_modules/safe-buffer": {
2183
+ "version": "5.1.2",
2184
+ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
2185
+ "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==",
2186
+ "license": "MIT"
2187
+ },
1995
2188
  "node_modules/string-width": {
1996
2189
  "version": "4.2.3",
1997
2190
  "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",
@@ -2049,6 +2242,18 @@
2049
2242
  "license": "Unlicense",
2050
2243
  "optional": true
2051
2244
  },
2245
+ "node_modules/underscore": {
2246
+ "version": "1.13.8",
2247
+ "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.13.8.tgz",
2248
+ "integrity": "sha512-DXtD3ZtEQzc7M8m4cXotyHR+FAS18C64asBYY5vqZexfYryNNnDc02W4hKg3rdQuqOYas1jkseX0+nZXjTXnvQ==",
2249
+ "license": "MIT"
2250
+ },
2251
+ "node_modules/util-deprecate": {
2252
+ "version": "1.0.2",
2253
+ "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
2254
+ "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==",
2255
+ "license": "MIT"
2256
+ },
2052
2257
  "node_modules/uuid": {
2053
2258
  "version": "14.0.3",
2054
2259
  "resolved": "https://registry.npmjs.org/uuid/-/uuid-14.0.3.tgz",
@@ -2122,6 +2327,27 @@
2122
2327
  }
2123
2328
  }
2124
2329
  },
2330
+ "node_modules/xlsx": {
2331
+ "version": "0.20.3",
2332
+ "resolved": "https://cdn.sheetjs.com/xlsx-0.20.3/xlsx-0.20.3.tgz",
2333
+ "integrity": "sha512-oLDq3jw7AcLqKWH2AhCpVTZl8mf6X2YReP+Neh0SJUzV/BdZYjth94tG5toiMB1PPrYtxOCfaoUCkvtuH+3AJA==",
2334
+ "license": "Apache-2.0",
2335
+ "bin": {
2336
+ "xlsx": "bin/xlsx.njs"
2337
+ },
2338
+ "engines": {
2339
+ "node": ">=0.8"
2340
+ }
2341
+ },
2342
+ "node_modules/xmlbuilder": {
2343
+ "version": "10.1.1",
2344
+ "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-10.1.1.tgz",
2345
+ "integrity": "sha512-OyzrcFLL/nb6fMGHbiRDuPup9ljBycsdCypwuyg5AAHvyWzGfChJpCXMG88AGTIMFhGZ9RccFN1e6lhg3hkwKg==",
2346
+ "license": "MIT",
2347
+ "engines": {
2348
+ "node": ">=4.0"
2349
+ }
2350
+ },
2125
2351
  "node_modules/y18n": {
2126
2352
  "version": "4.0.3",
2127
2353
  "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clavarium",
3
- "version": "0.2.236-next.1",
3
+ "version": "0.2.237-beta.1",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "description": "A conversation is a VM with a terminal in it. Everything else is a folder.",
@@ -36,6 +36,7 @@
36
36
  "check:hooks": "node tools/check-hooks.mjs",
37
37
  "test:e2e": "node --test --test-concurrency=1 \"e2e/*.e2e.mjs\"",
38
38
  "toolbox": "node deploy/parley-archive.mjs",
39
+ "extension": "node tools/extension-zips.mjs",
39
40
  "acceptance": "node acceptance/run.mjs"
40
41
  },
41
42
  "engines": {
@@ -44,17 +45,19 @@
44
45
  "dependencies": {
45
46
  "@xterm/addon-fit": "^0.11.0",
46
47
  "@xterm/xterm": "^6.0.0",
47
- "clavarium-binder": "0.1.44-next.1",
48
- "clavarium-docket": "0.1.1",
49
- "clavarium-parley": "0.17.35-next.1",
50
- "clavarium-tether": "0.1.0-next.46",
48
+ "clavarium-binder": "0.1.66-next.1",
49
+ "clavarium-docket": "0.1.2-next.3",
50
+ "clavarium-parley": "0.17.96-next.1",
51
+ "clavarium-tether": "0.1.0-next.79",
52
+ "mammoth": "1.13.0",
51
53
  "mermaid": "11.17.2",
52
54
  "node-pty": "^1.1.0",
53
55
  "pdfjs-dist": "6.4.299",
54
56
  "prismjs": "1.30.0",
55
57
  "qrcode": "^1.5.4",
56
58
  "web-push": "^3.6.7",
57
- "ws": "^8.18.0"
59
+ "ws": "^8.18.0",
60
+ "xlsx": "https://cdn.sheetjs.com/xlsx-0.20.3/xlsx-0.20.3.tgz"
58
61
  },
59
62
  "publishConfig": {
60
63
  "access": "public"
@@ -0,0 +1,140 @@
1
+ /* A CALENDAR, SEEN BY ITS OWNER (16-11): the agenda of a calendar asset (a Tether target of kind calendar), shown
2
+ * in its asset panel, so Outlook need not stay open beside Clavarium.
3
+ *
4
+ * POST /api/tether/agenda {target, from?, to?} from/to: days (YYYY-MM-DD), in the calendar's zone; to is
5
+ * not in the window. Default: today and the next 7 days. -> { target, title, zone,
6
+ * from, to, events: [...], more, partial }
7
+ *
8
+ * READ THROUGH TETHER, as an agent's calendar-list is: the same connector, the same sign-in -- which stays in this
9
+ * server (the keeper reveals it to the connector alone), never in the answer, never in the browser. The read is the
10
+ * owner's own in Tether's journal (keeper read, as a mail opened by its reference: mailref.mjs), never an agent's,
11
+ * never asked of anyone. Nothing is kept here.
12
+ *
13
+ * EACH EVENT: { id, title, start, end, allDay, location, organizer, online, attendees, show }. Times are the
14
+ * calendar's wall clock (Europe/Paris, Tether's zone): 'YYYY-MM-DDTHH:MM', or 'YYYY-MM-DD' all day.
15
+ * A Tether that hands its events as data (`data.events`, the same fields) gives them all; one that gives only its
16
+ * text lines (0.1.0-next.67) gives id, start, title and place: the answer says `partial`. */
17
+ import { Refusal } from './conversations.mjs';
18
+
19
+ /* Tether's own zone (connectors/calendar.mjs TZ): its times are said in it. */
20
+ export const ZONE = 'Europe/Paris';
21
+ export const EVENTS_MAX = 200;
22
+ export const DAYS_DEFAULT = 7; /* one week from today: the pages follow each other, no day twice */
23
+ export const DAYS_MAX = 42; /* six weeks at most in one read */
24
+ export const READ_MS = 30_000;
25
+ const TEXT_MAX = 400;
26
+ const DAY = /^\d{4}-\d{2}-\d{2}$/;
27
+ const refused = (status, kind, message) => Object.assign(new Refusal(status, message), { kind });
28
+
29
+ /* ---------- days, in the calendar's zone ---------- */
30
+ const partsAt = (ms, zone) => Object.fromEntries(new Intl.DateTimeFormat('en-CA', { timeZone: zone, year: 'numeric', month: '2-digit', day: '2-digit', hour: '2-digit', minute: '2-digit', second: '2-digit', hourCycle: 'h23' })
31
+ .formatToParts(new Date(ms)).filter((x) => x.type !== 'literal').map((x) => [x.type, Number(x.value)]));
32
+ /* The day it is now there: 'YYYY-MM-DD'. */
33
+ export function todayIn(zone = ZONE, now = Date.now()) {
34
+ const p = partsAt(now, zone);
35
+ return `${p.year}-${String(p.month).padStart(2, '0')}-${String(p.day).padStart(2, '0')}`;
36
+ }
37
+ /* A day plus n days. */
38
+ export function addDays(day, n) {
39
+ const [y, m, d] = day.split('-').map(Number);
40
+ return new Date(Date.UTC(y, m - 1, d + n)).toISOString().slice(0, 10);
41
+ }
42
+ /* The instant a day starts there (its midnight), as an ISO time: a summer or winter hour made right. */
43
+ export function startOf(day, zone = ZONE) {
44
+ const [y, m, d] = day.split('-').map(Number);
45
+ const wall = Date.UTC(y, m - 1, d);
46
+ let at = wall;
47
+ for (let i = 0; i < 2; i++) {
48
+ const p = partsAt(at, zone);
49
+ at -= Date.UTC(p.year, p.month - 1, p.day, p.hour, p.minute, p.second) - wall;
50
+ }
51
+ return new Date(at).toISOString();
52
+ }
53
+ const isDay = (s) => DAY.test(s) && !Number.isNaN(Date.parse(`${s}T00:00:00Z`)) && new Date(`${s}T00:00:00Z`).toISOString().slice(0, 10) === s;
54
+
55
+ /* The window asked, checked: days, from before to, six weeks at most. */
56
+ export function windowOf({ from, to } = {}, { zone = ZONE, now = Date.now() } = {}) {
57
+ const f = from === undefined || from === null || from === '' ? todayIn(zone, now) : String(from);
58
+ if (!isDay(f)) throw refused(400, 'bad-window', 'The first day is not a date (YYYY-MM-DD).');
59
+ const t = to === undefined || to === null || to === '' ? addDays(f, DAYS_DEFAULT) : String(to);
60
+ if (!isDay(t)) throw refused(400, 'bad-window', 'The last day is not a date (YYYY-MM-DD).');
61
+ const days = (Date.parse(`${t}T00:00:00Z`) - Date.parse(`${f}T00:00:00Z`)) / 86_400_000;
62
+ if (days < 1) throw refused(400, 'bad-window', 'The last day comes before the first.');
63
+ if (days > DAYS_MAX) throw refused(400, 'bad-window', `${DAYS_MAX} days at most at once.`);
64
+ return { from: f, to: t };
65
+ }
66
+
67
+ /* ---------- events ---------- */
68
+ const line = (v, max = TEXT_MAX) => String(v ?? '').replace(/[\r\n\t]+/g, ' ').trim().slice(0, max);
69
+ /* A time as the page reads it: 'YYYY-MM-DDTHH:MM', 'YYYY-MM-DD', or null. */
70
+ const timeOf = (v) => {
71
+ const m = /^(\d{4}-\d{2}-\d{2})(?:[T ](\d{2}):(\d{2}))?/.exec(String(v ?? '').trim());
72
+ return !m ? null : m[2] ? `${m[1]}T${m[2]}:${m[3]}` : m[1];
73
+ };
74
+ /* An online meeting's link: a web address, nothing else (never a script's). */
75
+ const linkOf = (v) => { try { const u = new URL(String(v ?? '')); return u.protocol === 'https:' ? u.href.slice(0, 2000) : null; } catch { return null; } };
76
+ /* An invitation's text, as text: lines kept, control characters dropped, short. The page shows it as text only. */
77
+ export const NOTES_MAX = 2000;
78
+ const notesOf = (v) => String(v ?? '').replace(/[\u0000-\u0008\u000b-\u001f\u007f]/g, '').replace(/\n{3,}/g, '\n\n').trim().slice(0, NOTES_MAX);
79
+ const SHOW = { busy: 'busy', free: 'free', tentative: 'tentative', oof: 'away', away: 'away', workingelsewhere: 'elsewhere', elsewhere: 'elsewhere' };
80
+
81
+ /* WHAT TETHER HANDED AS DATA, where its keeper puts it: a person's read answers { ok, text, data: { size, ...the
82
+ connector's own fields } }, so a connector's `data` arrives one level down (data.data). Both are read (16-11: the
83
+ panels read only the top level, and fell back to the text lines: no invitation text, no link, no organizer). */
84
+ export const handed = (got) => (got?.data?.data && typeof got.data.data === 'object' && !Array.isArray(got.data.data) ? { ...got, data: got.data.data } : got);
85
+
86
+ /* A meeting its organiser cancelled: Tether says so (Microsoft's isCancelled), or its title does, as the calendar
87
+ servers write it on an invitee's copy (« Annulé : », "Canceled:"). The page strikes it out (17-11). */
88
+ export const CANCELLED = /^\s*(annul[ée]e?|canceled|cancelled|abgesagt|cancelado|annullato)\s*:/i;
89
+ /* One event Tether handed as data, kept to the fields the page shows. */
90
+ export function eventOf(e) {
91
+ const start = timeOf(e?.start);
92
+ if (!start) return null;
93
+ const allDay = e.allDay === true || (start.length === 10 && e.allDay !== false);
94
+ const n = Number(e.attendees);
95
+ return {
96
+ id: line(e.id, 2048), title: line(e.title) || '(no title)', start, end: timeOf(e.end), allDay,
97
+ location: line(e.location), organizer: line(e.organizer, 320), online: linkOf(e.online), notes: notesOf(e.notes),
98
+ attendees: Number.isInteger(n) && n >= 0 ? n : null, show: SHOW[String(e.show ?? '').toLowerCase()] ?? null,
99
+ cancelled: e.cancelled === true || CANCELLED.test(String(e.title ?? '')),
100
+ };
101
+ }
102
+
103
+ /* The text lines Tether's calendar-list says (an id, then " start — title @ place [categories]"), read back. */
104
+ export function eventsOfText(text) {
105
+ const out = [];
106
+ const lines = String(text ?? '').split('\n');
107
+ for (let i = 0; i < lines.length; i++) {
108
+ const head = lines[i];
109
+ if (!head || head.startsWith(' ') || head.startsWith('(')) continue;
110
+ const m = /^ {2}(\d{4}-\d{2}-\d{2}(?: \d{2}:\d{2})?) — (.*)$/.exec(lines[i + 1] ?? '');
111
+ if (!m) continue;
112
+ i++;
113
+ const [, title, location] = /^(.*?)(?: {2}@ (.*?))?(?: {2}\[[^\]]*\])?$/.exec(m[2]);
114
+ const id = head.replace(/ {2}\(repeats:.*\)$/, '');
115
+ out.push(eventOf({ id, title, start: m[1], location }));
116
+ }
117
+ return out.filter(Boolean);
118
+ }
119
+
120
+ /* THE AGENDA OF A CALENDAR TARGET, read now. `tethers`: Tethers (tethers.mjs). `who`: { id, name }, said in
121
+ Tether's journal. `wait`: how long the calendar is waited for. */
122
+ export async function readAgenda(tethers, { target, from, to } = {}, { who, zone = ZONE, now = Date.now(), wait = READ_MS } = {}) {
123
+ if (!tethers) throw refused(503, 'unreachable', 'Calendars are not reached from this server.');
124
+ const t = tethers.store().target(String(target ?? ''));
125
+ if (!t || t.kind !== 'calendar') throw refused(404, 'gone', 'No such calendar.');
126
+ const w = windowOf({ from, to }, { zone, now });
127
+ let timer;
128
+ const late = new Promise((resolve) => { timer = setTimeout(() => resolve(null), wait); timer.unref?.(); });
129
+ let got;
130
+ try { got = await Promise.race([tethers.read('calendar.list', { target: t.id, from: startOf(w.from, zone), to: startOf(w.to, zone) }, who), late]); }
131
+ finally { clearTimeout(timer); }
132
+ if (got === null) throw refused(504, 'late', `${t.title} did not answer in time. Try again.`);
133
+ if (!got?.ok) throw refused(502, 'unreachable', `${t.title} could not be read: ${line(got?.text, 300) || 'no answer'}.`);
134
+ got = handed(got);
135
+ const given = Array.isArray(got.data?.events);
136
+ const all = (given ? got.data.events.map(eventOf).filter(Boolean) : eventsOfText(got.text))
137
+ .sort((a, b) => a.start.localeCompare(b.start));
138
+ const more = all.length > EVENTS_MAX || got.data?.more === true || /\(Showing the first \d+ events/.test(String(got.text ?? ''));
139
+ return { target: t.id, title: t.title, zone, from: w.from, to: w.to, events: all.slice(0, EVENTS_MAX), more, partial: !given };
140
+ }