@witbitz/sdk 4.5.0 → 4.7.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/README.md +2 -2
- package/a2aCore.js +32 -0
- package/acctV2Switch.js +3 -2
- package/acctV2UiCore.js +2 -2
- package/addPreferred.js +62 -0
- package/cloudDevicePins.js +1 -1
- package/codeBrowse.js +17 -7
- package/codeCache.js +4 -3
- package/codeCloud.js +4 -0
- package/connections.js +1 -1
- package/earlierHistory.js +32 -0
- package/emailFork.js +3 -1
- package/emptySpaces.js +2 -0
- package/l1-worker-src.js +1 -1
- package/manifest.json +33 -30
- package/memberChange.js +16 -4
- package/ownAgentLink.js +4 -1
- package/package.json +5 -2
- package/roomRoles.js +116 -0
- package/roomRoster.js +15 -6
- package/sdkA2A.js +58 -13
- package/sdkBackup.js +1 -0
- package/sdkBackupV2.js +25 -6
- package/sdkBrowserPrivate.js +5 -0
- package/sdkComputers.js +1 -0
- package/sdkExports.js +11 -3
- package/sdkRekey.js +87 -12
- package/spaceClient.js +7 -3
- package/vault-core.js +58 -29
- package/vault-kit.mjs +1 -1
- package/witbitz-admin.mjs +11 -11
- package/witbitz-sdk.d.ts +32 -8
- package/witbitz-sdk.js +139 -20
package/manifest.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "4.
|
|
3
|
-
"commit": "
|
|
4
|
-
"released": "2026-11-
|
|
2
|
+
"version": "4.7.0",
|
|
3
|
+
"commit": "a98d5ae3b3fceb654ceed8264e49babac09f8d62",
|
|
4
|
+
"released": "2026-11-29",
|
|
5
5
|
"files": {
|
|
6
|
-
"a2aCore.js": "sha384-
|
|
6
|
+
"a2aCore.js": "sha384-rnS5krIO4jMP44Rk55sMqVXUqQ+AOrYvMeLJ+lcaCr9uIEia1X6Yl39mmHOKt1/6",
|
|
7
7
|
"a2aShared.js": "sha384-8ZySzE/00iuVY9rHn+OF4ffcmGL/7z2eyFbRNIGejqnnnbf/AdHncYqLPU7RPq8L",
|
|
8
8
|
"accountErase.js": "sha384-NmL/Hut7W2hEBotQFAlOGitejoS7Ije/d0Lr0ZN8CQJ3w43JcfyYhHe5iu3q+QhV",
|
|
9
9
|
"accountIndexDoc.js": "sha384-zEK6m1LRZp7YLxRa724StGmxaH01TEzOJRpQicSTc2HEHNrdeNSj5gsHqf3010rT",
|
|
@@ -17,10 +17,11 @@
|
|
|
17
17
|
"acctV2Client.js": "sha384-/1HW620EUxJMrdInzNeknjn6fC1NUPFBCGtFoYV6nRR5sSGvwXvra/Q5gVA1c45w",
|
|
18
18
|
"acctV2Keys.js": "sha384-xlfDiwkXSQWjiKBcceDCfsoCVcuLRxxC/p8jss/K9M2gMn4x62ZE5UlFkm9eTpIV",
|
|
19
19
|
"acctV2Legacy.js": "sha384-QlBzwihqxBMe+eejAzEVYV4vnbJxj/3PNrtkovy+g1CMrIqQmDxeWkyLlcwPS2lG",
|
|
20
|
-
"acctV2Switch.js": "sha384-
|
|
21
|
-
"acctV2UiCore.js": "sha384-
|
|
20
|
+
"acctV2Switch.js": "sha384-kFTFjxcIn9nKkpUUMEOdl7ZoQupXWBt5w7tZrcuZVx4xUsfryE3aPzEg4+KJm29W",
|
|
21
|
+
"acctV2UiCore.js": "sha384-sFx9BatgYWF0mYYN//KYbFIfIuF1xZOFnKmS11CMhVHC18Jye+6uxFP79Ds1qQoR",
|
|
22
22
|
"acctV2WebAuthn.js": "sha384-tfWRaxzO6+mKfyXTbNDssa3VxQLTQeFTTA6WhXmq5dtL3SSog1QPd7v/0r9T/Z39",
|
|
23
23
|
"acctV2Wire.js": "sha384-umBkf5pazE80LpOByLC7mdcrLiWUHzB4+OpdvUybpJ2KgpOsQ5ftgr0IInNmqKKT",
|
|
24
|
+
"addPreferred.js": "sha384-npT8Hea1UtImEiC7CMvZ3t9CQRVHqbjxEEQeoCWFJaDt2lTrdjL+4ipvek2NX8NQ",
|
|
24
25
|
"address.js": "sha384-GlXfyjK8I9tPdW9WDfcll/dzPtQe7G/EsJDw4yozjKi2dahI2Ogn9ira13iVbeK7",
|
|
25
26
|
"agentDoorTools.js": "sha384-u4D5/n3QWb16kqYWgWqmU1oP+DuPs7oMcPuTxTePYqeGLphYTVQ9oP0nbaxHioRU",
|
|
26
27
|
"attestedBox.js": "sha384-ym0iKYAKeSLc+WyAICW9gN+ebNsnylxeJbEtK7EksVuzUM9qfgjXIkvWR7YpkEP1",
|
|
@@ -36,12 +37,12 @@
|
|
|
36
37
|
"chatLock.js": "sha384-esaR4aW2erKA7BP9PNkIbKiyPzWVh58Mohl8rRiHyZg7eJ5I6htSZLexwjVucTtT",
|
|
37
38
|
"chatLockSw.js": "sha384-5/z9q4rpuiVjOXOD/XjjqH5nJwSRm/L4cRyNIpzArSplOwVMpfX4KZjIW4rbGWTP",
|
|
38
39
|
"cloudDeviceBuilds.js": "sha384-FAyylkqCHVe0vvbvZnUH4/JuR15pexmiO/gLys+YRjNZEBkvOUFp8Kg3m/yNAp0G",
|
|
39
|
-
"cloudDevicePins.js": "sha384-
|
|
40
|
+
"cloudDevicePins.js": "sha384-PzhTc/N+uLjCcNc+b4BnDVagpSy90cvurEmFOx3mGBoFxJr9sGyyurSYuFYfvJOy",
|
|
40
41
|
"cloudDeviceSeal.js": "sha384-1pc+0oFx924IQVeSAAH5LzOp/l7p79fH6MhROKnS0Q9wnU2Y0oJYs2carCVxLdqe",
|
|
41
42
|
"codeAttachments.js": "sha384-ufp2O+y/clLkfUq9cOKGKA0tFATGI8BByGkHwzcabxAfY2f+ON+Po6Bl0+VdGL8H",
|
|
42
|
-
"codeBrowse.js": "sha384-
|
|
43
|
-
"codeCache.js": "sha384-
|
|
44
|
-
"codeCloud.js": "sha384-
|
|
43
|
+
"codeBrowse.js": "sha384-4zwyAaZvPTdvt5fqmfoVJlOVlWw66NHp6W52FcxUJrXnOabNmMG2BNkgUNeIDd68",
|
|
44
|
+
"codeCache.js": "sha384-v+VTvCPVyaiHcAwecYOnhqvzcWJqNe8Et/peRiU07epMSpRPZnmdMFxGhwo74aaz",
|
|
45
|
+
"codeCloud.js": "sha384-yW3qX8IId2B5QyQiUGSRfeBey5kuSAwOoKiyTFeMkECn29DIj8RuO9dBsqRY0rl4",
|
|
45
46
|
"codeCloudKeys.js": "sha384-SGf8gNR3NQaDKlwIMB0MWinfAatj202hjJrRtHR6rC82qpI000J7q4BGpBkC9cbb",
|
|
46
47
|
"codeCommands.js": "sha384-vDl7wobjRwSKgcmhhOVu2pM1ZMYzoiZKwgBjeLFE1ZC0+Oinm8L2dautSvM4yDY/",
|
|
47
48
|
"codeComputers.js": "sha384-RkOIVwwOwyZRzDWJoqoLAUVxXhsC9xTC0tHHWRuaruZG+dGo1hLXXmZJPt1kkfe4",
|
|
@@ -69,7 +70,7 @@
|
|
|
69
70
|
"connPending.js": "sha384-dLLfaofnAA3C7UVB/n/3Q0UEJ21bBc7DM6avTA7m3TAU3rkYrigq2g/9uVBj96ZF",
|
|
70
71
|
"connWrap.js": "sha384-sm4dfCD3aQa5fznh1JERZ+2lvq2iarPry6ityLlqPPGlwsZBGzM093gGt6WPM7eA",
|
|
71
72
|
"connectionEntry.js": "sha384-aS2dtKOxjkOiU4prWDhVx7SBDnxuom84NNi6+xxQgTaGhCPesdqMp9hhxnTbxWpr",
|
|
72
|
-
"connections.js": "sha384-
|
|
73
|
+
"connections.js": "sha384-uS//9x4l2n+ae3F6gknHN7mrS8OIEffEoVHrsNoLijZWairNUlukiqGfu4HrDT6c",
|
|
73
74
|
"credits.js": "sha384-P5JOB3TkJPiTGu5H7Zp/J7H34zLPok9Xhmo6aoQzP0BVBmaoywNeUrYB8R6Qe/m4",
|
|
74
75
|
"csAttest.js": "sha384-hAFpb3ky1/DB/qgh/UuAKB3HC7nFl11mrR/0+Uh/jQfW/fCW9cx0WOZXMFHHq/WZ",
|
|
75
76
|
"deviceAttest.js": "sha384-wQWq/l5hgjwPxqrGG8XYSIouFxEIMe048qALDDyXHNaHCH/rsufvv31bmDTsczV/",
|
|
@@ -77,10 +78,11 @@
|
|
|
77
78
|
"deviceKeyCore.js": "sha384-dA+UIUgvUsJNHY8s3vufUNb84MVTjf+7ITQK+nmpFx0NiYHoNBy++Lc3mys+wnt5",
|
|
78
79
|
"deviceSeal.js": "sha384-mBad+znurqKyoHJJbSDsAYvmVF9aSamidPZsFyw5xAxEzA2gaAil1ThTDsXFjFbV",
|
|
79
80
|
"e2ee.js": "sha384-uMzRbdRSuG+Aj3RfMMsguXP4sYGSWPLp8aBIRpMHJ9vKAjtzhAg8FGpfCVpI5xmH",
|
|
81
|
+
"earlierHistory.js": "sha384-EfwAu7IEQX0psiS1aWasJwhFFOqGNtZnCtOSim+Q7x8XxTJE1kG7E539DuYsS0GI",
|
|
80
82
|
"eat.js": "sha384-MJ4WfNn+0X0WLfa8DEuCss+2HBY7TXuXmC+RWIVvB+kAcSXX6rw9q/g5EH6bbgBM",
|
|
81
|
-
"emailFork.js": "sha384-
|
|
83
|
+
"emailFork.js": "sha384-t8LdmJjGUo3nypJ3Z4HNou991UOoO2BHSTvmHmy06A1jFmZIyZeOlqL8ZKtCPreH",
|
|
82
84
|
"emailSignIn.js": "sha384-boc9bHIdZmie1BaOJfGOnBDvrufTqPPO+6YeGFQVoKOaMoR7Z/pbFFmGJnjKA10M",
|
|
83
|
-
"emptySpaces.js": "sha384-
|
|
85
|
+
"emptySpaces.js": "sha384-BPOMXq0mpGts+YvHzGBfK9wT1xtyZvZqvxWcSBYrvOlH7XamiXjTmnJ5K7VGMnFH",
|
|
84
86
|
"encSource.js": "sha384-ofgX5C8aGQ5UfBJeygQigJ7uU5O+h01xVW6LvNHEfQRFnhsYoA45Wum5utj7dZk2",
|
|
85
87
|
"enclaveAccept.js": "sha384-JtMGY9/+oWoaKPeL9OCb8KZzhPf9Yi+ObdENhEG89kfxfirPUOsa7tSZWwrIE3VR",
|
|
86
88
|
"enclaveClaim.js": "sha384-stebiUabSWBKTdm3uTJ7COr+qlnckO1aV652yB/3H3olH9WFBCLaNxQf6I6Ce1qn",
|
|
@@ -106,7 +108,7 @@
|
|
|
106
108
|
"laneLinkCore.js": "sha384-bdUhU+o0amycFRuRZCAeo+E2zWtHQiYgW9ffY0CqotDCmldBD8RG9CGL3Z6IwXga",
|
|
107
109
|
"ledgerView.js": "sha384-fL++ZXJfO54k1harJd+GHPFyCJQcMpg5A7yAblbFhjq/XUvJEteIV7sHbK+4p9uF",
|
|
108
110
|
"mcpRecommended.js": "sha384-Gk+4KPSHrmRhVVkA3Wlrk1WoGSqRNVHLfrhBFIPWQhYhDkqSACFh/qrHp1H1atCS",
|
|
109
|
-
"memberChange.js": "sha384-
|
|
111
|
+
"memberChange.js": "sha384-vmnmUgHq6pPk15R3LDQA5HMSN+0hBi4SgbVBJXRBTD9uYiLEpT8qtePSFNdi1bL7",
|
|
110
112
|
"mirrorBatch.js": "sha384-ji6KmcfgJPcTuucsW9a5SXGlTocLmTD6fW+nOIhZutMTiBh1AEgXa/fOZlcEoDdI",
|
|
111
113
|
"mkseal.js": "sha384-O5n50dLqnJyHJDK5nmP//KePkkSz9ZnSsrSFeTQW1njCzzvtH4kov0tKbOdwq+IU",
|
|
112
114
|
"nativePush.js": "sha384-UwfPqJvxuLSc+4cz+2ImNpwjhF4olPUVgh8ViuqPNJTQbouEH8OljaT8Fq5QceNV",
|
|
@@ -119,7 +121,7 @@
|
|
|
119
121
|
"opRouting.js": "sha384-DKD+zriDYl/H6tl2KEJezT3LK+fp/Tf/9GZlArV01CJVRCIkoH6DIm7oraDcpcoL",
|
|
120
122
|
"opencodeWire.js": "sha384-lJ8uIFr3NJ2O6eNdODCm0LUqRTkKFLhBAnsCEo3/Yc2T6rChicF9HaoBCH/mJnQU",
|
|
121
123
|
"oprf.js": "sha384-4dagoY2MlLnCLIyH3Er/H1TF3Wnj7i6NxlnUJlyDYOygykiSqQ4+43ZDU9WgXbxC",
|
|
122
|
-
"ownAgentLink.js": "sha384-
|
|
124
|
+
"ownAgentLink.js": "sha384-0QIfH01OMccgFy/zueJ/KIM9g8y3vBxJNJlkH0dcIAPOzDP/e/ulhW38QaC2zd9d",
|
|
123
125
|
"ownerPolicy.js": "sha384-F1mrlfWmYDSFtJE1CWmHMI5sqdtt6x+SVOnZhb8W+t37L5vK3SLcNCue278CMCtK",
|
|
124
126
|
"pdfOptions.js": "sha384-WwPyouZTiDiN3qD8n5ExLdR/1BONmlVALh3rjo78jCvuCmILulEcD6A0o6iYub5P",
|
|
125
127
|
"pdfText.js": "sha384-jFEk2vZIylTBHjhNZWoFQWHuXnuCoCtbxarcd9yMZcQ+wer5XQlNuwl7J14sHq3E",
|
|
@@ -142,7 +144,8 @@
|
|
|
142
144
|
"roomIntake.js": "sha384-PC4d2NNUMbaCaxgC5H+NDfX18yca+Zo06EAOwBd5s9BJJOW8SXnp8NGxO50AG6Kl",
|
|
143
145
|
"roomName.js": "sha384-GT7/NXN+OJIvGNVsliPY+O/+RC1Xapg+TCAZxMSqDpzTdJ1EUpPZalKXN4RivT4+",
|
|
144
146
|
"roomPass.js": "sha384-l47V/HhjQWFxJOxWm9SLP+ECDDmwc0KoiIBS+2c98AIqGEw5iOU8xE6Oaw31RSaQ",
|
|
145
|
-
"
|
|
147
|
+
"roomRoles.js": "sha384-9n6jWPlyYDhDfQijorjcxx/vZXX5pI7cForT0xbmkATUSo7nalWr9xNaSlgk7dm6",
|
|
148
|
+
"roomRoster.js": "sha384-RUkuezzheIEvZQKrlT/eAgMhqOrVWh2R7epfDOQOSkfADw9iIg/57Mi53b6ne/Po",
|
|
146
149
|
"roomSettings.js": "sha384-OV2g5ae1e2JmyQl2FOEBZk/0qKCT/BNRULRLT0RapvEvshfFY2HOiyaoT0U/DzFB",
|
|
147
150
|
"roomState.js": "sha384-SFWOMqdRoZeowpZ+uUltsnRPnkVQKZmEsA1k1GvACo6KSiVeqe+5GX6fDL+63g8Y",
|
|
148
151
|
"roomStreamClient.js": "sha384-OZ2Xt4EqRTnhRNnDD3OWPLi0zmXpPTgU7dYtpGx/2M2S4p0cd91r76Ue3H1R89af",
|
|
@@ -153,21 +156,21 @@
|
|
|
153
156
|
"safeMediaPins.js": "sha384-ck3rBAvVaHZ+K1xwF3iNEfQwVx35NtZNFIYtB+0PmINTieOaXTw2ID+OZABcBLSo",
|
|
154
157
|
"scheduleNext.js": "sha384-7Xu8xaDNV473aZLJub6/fdX52zUgGhUDke0CGMOCD7l6+HpsdkI3S/UK8DVuppdx",
|
|
155
158
|
"schedulesDoc.js": "sha384-goD3ZkheAxrSYDxMz+oylHXUUhdfvJya+oF+whxrZ3YTtVmuDO1IGR4PrhajA0n5",
|
|
156
|
-
"sdkA2A.js": "sha384-
|
|
159
|
+
"sdkA2A.js": "sha384-WPgDGsvaJBStXw4Zhcs1G4FlM+aElih5qP2JHtspAnMT8Tr+8BSrOj2dNfFBTDP1",
|
|
157
160
|
"sdkAccount.js": "sha384-BY/WJI8NkUqu/VXoEX7fr1cFp/xT6fT1Z2/DQByrp5qxXB0V/KuPmq1CK1ZHF6Gs",
|
|
158
161
|
"sdkAccountDoc.js": "sha384-uM2b2+6neFTLnX70SVKXHvXcvKjecGRxU5wXoxafiysCHnZjAtR9d1xQQEXErE4x",
|
|
159
162
|
"sdkAccountSections.js": "sha384-5CmYkh5fIZOOc/SdmR+Ix32TAJdQc7tqzIusuAZnNzu6lahUDjPaAxToBKZvO3fL",
|
|
160
163
|
"sdkAgui.js": "sha384-oVwPKHW53+SHofOzZicxnHC5QP6qMbJCJLLF7MHYUuD+nC7vewH2hqOKV3vc0aJs",
|
|
161
164
|
"sdkAttest.js": "sha384-s4vq547Vhg2dGVm53XaHgzuC9xSyXvU9WlG8t63s/fiyiAtiGM0uSOxfpzO7HQlW",
|
|
162
|
-
"sdkBackup.js": "sha384-
|
|
163
|
-
"sdkBackupV2.js": "sha384-
|
|
164
|
-
"sdkBrowserPrivate.js": "sha384-
|
|
165
|
+
"sdkBackup.js": "sha384-bgokIMBjFsb4/Syd1dRyHofABe/ELw/1ROvb8zmBZ8NbXCAw+wBDT1Ad7m0lMjQ6",
|
|
166
|
+
"sdkBackupV2.js": "sha384-yNWjU8Cr/fh2DSTA6I2nfQB1nHRD0jENrAqe3Azy6Dhsu4tskaX310DB+hlRHKr4",
|
|
167
|
+
"sdkBrowserPrivate.js": "sha384-LmbHgfSSFbTz6P1uBm0kHfIV8an1nnyepvnpX6/ELMrDDHlWlzuspLOstOCvMW4f",
|
|
165
168
|
"sdkBuilds.js": "sha384-98mac3jp5DARBMNVJSwqiI4kXCs4LlSnNmDOtbxsEF4IdrHetse2p+njQZoXqVEG",
|
|
166
169
|
"sdkCloudDevice.js": "sha384-Nk18FVoWqlN3XyYhKqnaLlTNZzVHia0F6ChQFzdTAMTZhICvRIB75wKawtrWjocd",
|
|
167
|
-
"sdkComputers.js": "sha384
|
|
170
|
+
"sdkComputers.js": "sha384-ekOsMRO4cFdo9tbookA8rh76xJGNaRn3Y2O/fkIiDdkR7nyMFPoEkdBUv9kZwegj",
|
|
168
171
|
"sdkDictation.js": "sha384-eK4MjyycSp+i/0jg90DzHXe//QuFGKW+F3uXMvSNkotHhamiX6wN3Sal5P6D7NXw",
|
|
169
172
|
"sdkErase.js": "sha384-kJDYZZ4pCwu24rqy21bdUnNzgjuXkS4FvwjMNwHs/kUf0w4Vo5HOP3sj7LEE0KVr",
|
|
170
|
-
"sdkExports.js": "sha384-
|
|
173
|
+
"sdkExports.js": "sha384-O4WVEc+Ecyke2lIs0bd0uyqOmP1a433nAuozvfzabu1HFZDVrxmi0MqfZ8iCdzAt",
|
|
171
174
|
"sdkInvitations.js": "sha384-ZWK1d055LRmMLLx+frvrAWxPaJT+h5N/QWlmRLg+3gsDEpyi3aj1XlZHAjQAzm7j",
|
|
172
175
|
"sdkKeptAgent.js": "sha384-OS+VP2GPpjSXfSoel3C0Pw4MWxZH7HZm+jO/ZJwyPiQcvnhZja7TGmJhoxx7Va0P",
|
|
173
176
|
"sdkKeptIntake.js": "sha384-K02pjf9CW6cC7yifCpFWwVIBnDTCQ2c/eGfyAbPDMprArJorbddtnzNi4FyMws5Z",
|
|
@@ -175,7 +178,7 @@
|
|
|
175
178
|
"sdkPlan.js": "sha384-YzaZ4s9SHCNDOP/Avn6w+rxlONsl7ZzfWIbyY6RCVX0DAbA2fLB9eRzQRAwloggw",
|
|
176
179
|
"sdkProtect.js": "sha384-iAeAAC1Xvjcv1odagezcsgMQPZEpy6PExEMc91LrajM6yTxftWiWRFHGbXWMjF+i",
|
|
177
180
|
"sdkRedact.js": "sha384-wrk7y+RYN33bDy9WjgjKWO56qOYwJdzTeAJU1cf/+QAPTz6cBW9wY4uqGlMarMva",
|
|
178
|
-
"sdkRekey.js": "sha384-
|
|
181
|
+
"sdkRekey.js": "sha384-0b/b2OleYGx7Qreiop7zKZcKRtRYMH2ZzNdYlcmGHbjv+1sq7hcR1gFFEsvoIuAR",
|
|
179
182
|
"sdkReport.js": "sha384-kEnWCgXzYc/SoS57F9oLUa5egSOszjGV75upnbgfJOZdu3BrnHzhBcsswg8+e00o",
|
|
180
183
|
"sdkSafeMedia.js": "sha384-0s5Zcq1gO+XXyxJbHGOmIeXuFtpY7d2HMdsj4R4oAaCkIV+X1W9SuEIwPSmCMAmE",
|
|
181
184
|
"sdkSchedules.js": "sha384-qy+Q8mhbaKYZNSNwwYRNQKS+oxtimwld8mxAG6g5vR2vo4lkzDPl3k1Q0+J+uZx7",
|
|
@@ -191,7 +194,7 @@
|
|
|
191
194
|
"sharedViews.js": "sha384-+tw2Oj/1X1XXM+5PW4rVSyZOHXJ9yocOqbPc2NZ6245otJxaI5yKVZYnepHndBwL",
|
|
192
195
|
"sheetChrome.js": "sha384-2nTqz57klkEZhvjhwM03b/ISOaFy9Qh6L2uDlk/QwdD+Ua86ao7ostLaI1eTaRoq",
|
|
193
196
|
"siri.js": "sha384-WYAr+BM+JaTQlWfQ7eHylDgmhyK427uaJ8IvocIrX73B4qgQp1L2zrOGmFvMQEpK",
|
|
194
|
-
"spaceClient.js": "sha384-
|
|
197
|
+
"spaceClient.js": "sha384-LDxYWVhUk6blkV0EH2f5cMPYtHAW73Fz5N6kWHWDr7hX9lo+2Fd0jtzHEHW3MWBz",
|
|
195
198
|
"spaceConfig.js": "sha384-Pb3W47eQ8xQSGkL9yD521UFnn+tp4vV3+F5Y3Qf92d5jLPmEeZqo3Zbj1idGb4Wd",
|
|
196
199
|
"spaceEmailGate.js": "sha384-iynfCnft76GXEDC9p7K+mWkYpH+k1zHSSuuKi1JoSHCrHjcojoLB39WviO359U4K",
|
|
197
200
|
"spaceExport.js": "sha384-j9nsGBzycJ7w9YFYaMkufu4zOIs87GYW4LfHvW9fCZ4Ms57ptn7yw4BY6rI80nQG",
|
|
@@ -217,8 +220,8 @@
|
|
|
217
220
|
"usageReceipts.js": "sha384-2jq24tFKYlEdmmG2wB1IGeS65eY1vmJTx+HbZgcE8WauyQMA5RyCZwC1nqnd7GBO",
|
|
218
221
|
"usageSummary.js": "sha384-Ox1QVGMJ9QwuddinJ0lCCqzzTH2gQlVh8d8Ozd0v6Vp6esApiWkdfbM5vgW0VT6C",
|
|
219
222
|
"util.js": "sha384-wYUVRuJQGeY7x+4ckFhal5xSNqJy5p3KsF1Dw8yWUW9354XrYtAX2cn+h53faZdo",
|
|
220
|
-
"vault-core.js": "sha384-
|
|
221
|
-
"vault-kit.mjs": "sha384-
|
|
223
|
+
"vault-core.js": "sha384-gIGxcrArSkVsP3ab4tvsuxj85oi9JeRK68J/Oc2uY4I7pd4b1ydDs5B9ui7Lm5XX",
|
|
224
|
+
"vault-kit.mjs": "sha384-fezooQ+NhxZWC13pdCu0ncU9EVV64rCcH5if0yAAj5eui5zIsDleQzRPhOwgLheg",
|
|
222
225
|
"vault-screens.js": "sha384-URf4/cjWLnzLt/dryA3odAUeJCe6lKmWxbDAl67nVpWIJerK/6tHf1DrS2SJj+KS",
|
|
223
226
|
"vaultAtRest.js": "sha384-1zrXlwg5pMed4Yl60eAAFFaCh8rMKryoHxX9v802PXFfDiV4piavKybVYVD5RBTL",
|
|
224
227
|
"vaultCoreLock.js": "sha384-2RdHJjbgp/Qr1JzXX21I71vbiVmWl1Uv7JpBKnU/+InBaa0vC1B19EAMhYZ1LZ0/",
|
|
@@ -232,14 +235,14 @@
|
|
|
232
235
|
"voiceAttest.js": "sha384-H+Uxa7jFO7kaLjxhZnSwgZ/GrgQLjCFV3o6hhQE4l0yw1mI1Nx6HKZVKSkhVJ9sW",
|
|
233
236
|
"voiceCert.js": "sha384-lYIUZhCjHZUqJOqIaV0JrMVJXl4u5O32+kofC6kSVAmwOUbpme9mMh0ZhNcrYYEj",
|
|
234
237
|
"witbitz-admin.js": "sha384-/e0V5Q5jYfuJVnomnQaXiI2hszGueuX5W2PbYApdFAowZXHW24m+mpxW+KHfSywE",
|
|
235
|
-
"witbitz-sdk.js": "sha384-
|
|
238
|
+
"witbitz-sdk.js": "sha384-m9FHdABtrnhMpo1T9zWzkInymNBMEZ/5QiO9uNwyRklXEBD6wLEH3QJugqmPtnvj",
|
|
236
239
|
"workerClient.js": "sha384-f/z7EfUCWakRS00R8UfWGnVIZDtWBA3WPXl2B5orVAkeyvaTUXVqC+hDqb4hkAB6",
|
|
237
240
|
"workerLiveness.js": "sha384-BSL4mziJ9HE+b2ILIHccsIxSloOr0NKm6pGrRrPN77cRLcwzaJHEEtrjrQcIgVZH",
|
|
238
241
|
"x509.js": "sha384-YAuy3/aSUomw0Ne+aDTto3HTb9yzdgA+1h44DimiEMjkMYOq/O6MhuRZKsbXmSSp",
|
|
239
|
-
"witbitz-sdk.d.ts": "sha384-
|
|
242
|
+
"witbitz-sdk.d.ts": "sha384-bO138VoQVdsIwAdn2I60//aDOic8cBGkpZb4cPOFw7b2zwczd18QE2UQX0twzcJu",
|
|
240
243
|
"witbitz-admin.d.ts": "sha384-ikmN7qyKXg/WdVWmRORgw9LNt/n+M0zJaKcKbLlY0W+nEIH9b4uCCUbket/jWbwX",
|
|
241
244
|
"decrypt.html": "sha384-3xRvQ++CfE5Fdxf+zHU51M4wxGNthg4NZqrgfaO0vaHiKTKNplmgWBotsf1o8vTS",
|
|
242
|
-
"witbitz-admin.mjs": "sha384-
|
|
243
|
-
"l1-worker-src.js": "sha384-
|
|
245
|
+
"witbitz-admin.mjs": "sha384-LIJMOhifpwvM43LDyOVO14iSibNv+uXY0uHOUxwWHOTIDD85isj6QBkGottphkxa",
|
|
246
|
+
"l1-worker-src.js": "sha384-7pLejzbh49u67tyvYU3Pcw/lvfDHmllFsfXNwBJjFxQc3Xz424cxzch+S3yf7tof"
|
|
244
247
|
}
|
|
245
248
|
}
|
package/memberChange.js
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
// the config's own shape, and each remaining member's grant address and invite key. Nothing here holds a key.
|
|
4
4
|
import { memberHash } from './rosterHash.js'
|
|
5
5
|
import { govOf } from './emailFork.js'
|
|
6
|
+
import { roleTags } from './roomRoles.js' // owners and admins by @username tag (docs/spaces-usernames.md § 13.1)
|
|
6
7
|
import { resolveHandle } from './inviteEnroll.js'
|
|
7
8
|
import { findInvitee } from './inviteSend.js'
|
|
8
9
|
|
|
@@ -79,8 +80,14 @@ export async function membersAfter (cfg, want, room) {
|
|
|
79
80
|
if (Array.isArray(al.users) && dropUsers.size) allow.users = al.users.filter((u) => !(u && typeof u === 'object' && dropUsers.has(lc(u.username))))
|
|
80
81
|
if (Array.isArray(want.domains)) allow.domains = normalizeDomains(want.domains)
|
|
81
82
|
for (const k of Object.keys(allow)) if (allow[k] === undefined || (Array.isArray(allow[k]) && !allow[k].length && k !== 'emails')) delete allow[k]
|
|
82
|
-
|
|
83
|
-
|
|
83
|
+
// ROLES BY TAG (docs/spaces-usernames.md § 13.1): `want.ownerTags` / `want.adminTags` state them; unstated, the room's are kept — a
|
|
84
|
+
// change that does not touch a role held by a tag must not drop it (an older change knew only emails) — less those it removes
|
|
85
|
+
const TK = { owners: 'ownerTags', admins: 'adminTags' }
|
|
86
|
+
const keptTags = (k) => (Array.isArray(want[TK[k]]) ? want[TK[k]] : roleTags(cfg && cfg[k])).filter((t) => typeof t === 'string' && t && !removedMh.has(t))
|
|
87
|
+
const oTags = [...new Set(keptTags('owners'))], aTags = [...new Set(keptTags('admins'))].filter((t) => !oTags.includes(t))
|
|
88
|
+
const had = (k) => Array.isArray(want[TK[k]]) || roleTags(cfg && cfg[k]).length > 0 // `tags: []` says "none now" (spaceClient.setConfig keeps an unstated one)
|
|
89
|
+
const set = (k, xs, tags) => ({ emails: [...new Set((xs || []).map(lc))], ...(tags.length || had(k) ? { tags } : {}) })
|
|
90
|
+
return { allow, owners: set('owners', want.owners, oTags), admins: set('admins', (want.admins || []).filter((e) => !(want.owners || []).map(lc).includes(lc(e))), aTags), removed }
|
|
84
91
|
}
|
|
85
92
|
|
|
86
93
|
// HIDDEN MEMBERS NOBODY HAS SEEN: an address the list keeps only as its hash (allow.mh — a private invite not opened yet) has no
|
|
@@ -108,11 +115,15 @@ export async function stillOnList (cfg, room, people = []) {
|
|
|
108
115
|
// `people`: addresses, or the guest book's records ({ email, entries }). A person added by @USERNAME is on the list by an `mh:` entry
|
|
109
116
|
// that is NOT the hash of their email (a tag or a handle's hash — memberTag.mjs): the guest book recorded which entry let them in,
|
|
110
117
|
// and that entry still on the list keeps them (sync sweep 2026-11-23 #2 — they vanished from Members after any re-key)
|
|
111
|
-
|
|
118
|
+
// …and a record with NO email (docs/spaces-usernames.md § 13: the server hands the members a person in by @username alone without it)
|
|
119
|
+
// is on the list by the same entries, keyed by the @username it names.
|
|
120
|
+
const byEntry = new Map(), byEntryUser = new Map()
|
|
112
121
|
for (const p of people || []) {
|
|
113
122
|
if (!p || typeof p !== 'object') continue
|
|
114
123
|
const e = lc(p.email), ents = Array.isArray(p.entries) ? p.entries : []
|
|
115
|
-
|
|
124
|
+
const listed = ents.some((x) => typeof x === 'string' && ((x.startsWith('mh:') && mh.has(x.slice(3))) || (x.startsWith('u:') && (Array.isArray(al.users) ? al.users : []).some((u) => u && lc(u.handle) === lc(x.slice(2))))))
|
|
125
|
+
if (e && EMAIL.test(e) && listed) byEntry.set(e, true)
|
|
126
|
+
else if (!e && p.user && listed) byEntryUser.set(lc(p.user).replace(/^@/, ''), true)
|
|
116
127
|
}
|
|
117
128
|
const emailsOf = (people || []).map((p) => (p && typeof p === 'object' ? p.email : p))
|
|
118
129
|
const hashed = new Map()
|
|
@@ -120,6 +131,7 @@ export async function stillOnList (cfg, room, people = []) {
|
|
|
120
131
|
return (email, user) => {
|
|
121
132
|
const e = lc(email)
|
|
122
133
|
if (e && EMAIL.test(e)) return ok.has(e) || domains.some((d) => e.endsWith('@' + d)) || hashed.get(e) === true || byEntry.get(e) === true
|
|
134
|
+
if (user && byEntryUser.get(lc(user).replace(/^@/, '')) === true) return true // in by an entry their record names (§ 13)
|
|
123
135
|
return !!(user && byUser) // no email to decide by: kept only where the list names people by @username
|
|
124
136
|
}
|
|
125
137
|
}
|
package/ownAgentLink.js
CHANGED
|
@@ -41,13 +41,16 @@ export async function linkOwnAgent ({ lane, space, spaceName, laneName }, d) {
|
|
|
41
41
|
// RESULTS IN: the private room's job peer, named after the always-on Space
|
|
42
42
|
if (!d.hasLane(lane)) await d.enableLane(lane, 'Private assistant')
|
|
43
43
|
if (!d.hasLane(space)) await d.enableLane(space, spaceName)
|
|
44
|
-
if (d.hosted()) prepared = await d.prepare({ space, laneUrl:
|
|
44
|
+
if (d.hosted()) { const laneUrlAt = d.mcpUrl(lane), spaceUrlAt = d.mcpUrl(space); prepared = await d.prepare({ space, laneUrl: laneUrlAt, spaceUrl: spaceUrlAt, laneName, spaceName }); if (prepared) prepared = { ...prepared, laneUrlAt, spaceUrlAt } }
|
|
45
45
|
const inTok = await d.addPeer(lane, spaceName, { reply: 'ask', job: true, ...(prepared && { tokenHash: prepared.reportHash }) })
|
|
46
46
|
done.lPeer = inTok.id
|
|
47
47
|
// JOBS OUT: the always-on Space's own door, a peer for this private assistant, answered by the device
|
|
48
48
|
const outTok = await d.addPeer(space, ownPeerName(laneName), { reply: 'auto', own: true, ...(prepared && { tokenHash: prepared.jobHash }) })
|
|
49
49
|
done.sPeer = outTok.id
|
|
50
50
|
await d.push()
|
|
51
|
+
// A NEW ADDRESS ON THE WAY (handle_taken, a2aLane publishGrant: the old one was the other Witbitz app's account's): the vault
|
|
52
|
+
// prepared the links with the old addresses — undone below; a second try prepares them with the new ones.
|
|
53
|
+
if (prepared && (d.mcpUrl(lane) !== prepared.laneUrlAt || d.mcpUrl(space) !== prepared.spaceUrlAt)) throw new Error('This assistant was given a new address (your other Witbitz app was using the old one). Link it again.')
|
|
51
54
|
await d.syncSpaceAgents(space) // what the cloud device reads: who may write, answered without asking, as the member's own
|
|
52
55
|
done.reported = true // also clear a target whose acknowledgement was lost
|
|
53
56
|
if (prepared) {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@witbitz/sdk",
|
|
3
|
-
"version": "4.
|
|
4
|
-
"description": "The Witbitz SDK: Spaces — end-to-end encrypted rooms with an AI assistant — in your own app. The same bytes as https://witbitz.chat/sdk/4.
|
|
3
|
+
"version": "4.7.0",
|
|
4
|
+
"description": "The Witbitz SDK: Spaces — end-to-end encrypted rooms with an AI assistant — in your own app. The same bytes as https://witbitz.chat/sdk/4.7.0/",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./witbitz-sdk.js",
|
|
7
7
|
"types": "./witbitz-sdk.d.ts",
|
|
@@ -39,6 +39,7 @@
|
|
|
39
39
|
"acctV2UiCore.js",
|
|
40
40
|
"acctV2WebAuthn.js",
|
|
41
41
|
"acctV2Wire.js",
|
|
42
|
+
"addPreferred.js",
|
|
42
43
|
"address.js",
|
|
43
44
|
"agentDoorTools.js",
|
|
44
45
|
"attestedBox.js",
|
|
@@ -96,6 +97,7 @@
|
|
|
96
97
|
"deviceKeyCore.js",
|
|
97
98
|
"deviceSeal.js",
|
|
98
99
|
"e2ee.js",
|
|
100
|
+
"earlierHistory.js",
|
|
99
101
|
"eat.js",
|
|
100
102
|
"emailFork.js",
|
|
101
103
|
"emailSignIn.js",
|
|
@@ -163,6 +165,7 @@
|
|
|
163
165
|
"roomIntake.js",
|
|
164
166
|
"roomName.js",
|
|
165
167
|
"roomPass.js",
|
|
168
|
+
"roomRoles.js",
|
|
166
169
|
"roomRoster.js",
|
|
167
170
|
"roomSettings.js",
|
|
168
171
|
"roomState.js",
|
package/roomRoles.js
ADDED
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
// roomRoles.js — OWNERS AND ADMINS BY EMAIL OR BY THEIR @USERNAME TAG (docs/spaces-usernames.md § 13.1; the owner, 2026-11-29:
|
|
2
|
+
// "Change it."). A verified room's roles are `owners: { emails, tags }` and `admins: { emails, tags }`: an owner or admin who prefers
|
|
3
|
+
// their @username ("Add me to Spaces as @username", § 13) is named by the room's TAG for them (§ 12) — the value that also admits them
|
|
4
|
+
// from `allow.mh` — so their email is nowhere in the sealed config the members read. One rule for the Spaces apps and the SDK:
|
|
5
|
+
// • a tag goes into a role only when the server says it may (`op:'user' mode:'tag'` answers `roles: true` — the Lambda's
|
|
6
|
+
// ROLE_TAGS switch, set once the Lambda and the turn enclave check tag roles); otherwise the role names the email, as before;
|
|
7
|
+
// • a role never admits anyone: whoever holds a role by tag is put on the list by it too;
|
|
8
|
+
// • who holds a role tag is read from the guest book (roster_seen records the entries each person signed in by: 'mh:<tag>').
|
|
9
|
+
// Pure of the DOM; the client is injected.
|
|
10
|
+
import { validUsername } from './address.js'
|
|
11
|
+
|
|
12
|
+
const lc = (s) => String(s || '').trim().toLowerCase()
|
|
13
|
+
const TAG = /^[A-Za-z0-9_-]{16,128}$/
|
|
14
|
+
|
|
15
|
+
/** A role's emails (lowercased, unique). */
|
|
16
|
+
export const roleEmails = (o) => [...new Set((o && Array.isArray(o.emails) ? o.emails : []).map(lc).filter(Boolean))]
|
|
17
|
+
/** A role's tags (valid, unique — base64url, case kept). */
|
|
18
|
+
export const roleTags = (o) => [...new Set((o && Array.isArray(o.tags) ? o.tags : []).filter((t) => typeof t === 'string' && TAG.test(t)))]
|
|
19
|
+
/** A role in the config's shape: emails always, tags only when there are any (a room with none is sealed exactly as before). */
|
|
20
|
+
export const roleOf = (emails, tags) => { const t = [...new Set((tags || []).filter((x) => typeof x === 'string' && TAG.test(x)))]; return { emails: [...new Set((emails || []).map(lc).filter(Boolean))], ...(t.length ? { tags: t } : {}) } }
|
|
21
|
+
|
|
22
|
+
/** The room's roles: owners and admins (admins without the owners — an owner is an admin), by email and by tag. */
|
|
23
|
+
export function rolesOf (cfg) {
|
|
24
|
+
const owners = roleEmails(cfg && cfg.owners), ownerTags = roleTags(cfg && cfg.owners)
|
|
25
|
+
return { owners, admins: roleEmails(cfg && cfg.admins).filter((e) => !owners.includes(e)), ownerTags, adminTags: roleTags(cfg && cfg.admins).filter((t) => !ownerTags.includes(t)) }
|
|
26
|
+
}
|
|
27
|
+
/** Does the room name any owner or admin (by email or by tag)? */
|
|
28
|
+
export const hasRoles = (cfg) => { const r = rolesOf(cfg); return !!(r.owners.length || r.admins.length || r.ownerTags.length || r.adminTags.length) }
|
|
29
|
+
/** The role a person holds here: 'owner' | 'admin' | ''. `who` = { email, tags: [their tag(s) for this room] }. */
|
|
30
|
+
export function roleFor (cfg, who = {}) {
|
|
31
|
+
const r = rolesOf(cfg), e = lc(who.email), tags = Array.isArray(who.tags) ? who.tags : []
|
|
32
|
+
if ((e && r.owners.includes(e)) || tags.some((t) => r.ownerTags.includes(t))) return 'owner'
|
|
33
|
+
if ((e && r.admins.includes(e)) || tags.some((t) => r.adminTags.includes(t))) return 'admin'
|
|
34
|
+
return ''
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/** The tag a name may hold a role by in this room — only when the server says tag roles are on (`roles: true`). → tag | ''. */
|
|
38
|
+
export async function roleTagFor (client, username, room) {
|
|
39
|
+
const u = validUsername(String(username || '').replace(/^@/, ''))
|
|
40
|
+
if (!u || !client || typeof client.userTag !== 'function') return ''
|
|
41
|
+
try { const t = await client.userTag(u, room); return t && t.status === 200 && t.roles === true && typeof t.tag === 'string' && TAG.test(t.tag) ? t.tag : '' } catch { return '' }
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/** The @username a signed-in person prefers to be named by in a role (whoami: a username, and the preference not switched off). → name | ''. */
|
|
45
|
+
export async function ownRoleName (client, idToken) {
|
|
46
|
+
try {
|
|
47
|
+
if (!idToken || !client || typeof client.userWhoami !== 'function') return ''
|
|
48
|
+
const w = await client.userWhoami(idToken)
|
|
49
|
+
return w && w.status === 200 && w.username && w.asUser !== false ? (validUsername(String(w.username)) || '') : ''
|
|
50
|
+
} catch { return '' }
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/** THE ROLES OF A NEW SPACE, as each person prefers. `people` = [{ role: 'owners'|'admins', email, username }] — the creator, and anyone
|
|
54
|
+
* made owner or admin who prefers their @username. Each whose name may hold a role here (roleTagFor) is named by the tag in that role
|
|
55
|
+
* and goes on the list by the name (`allow.tagUsers` — the create stores it as the same tag), and their email leaves the role and the
|
|
56
|
+
* list; anyone else keeps their email. `allow`: the create's list ({ emails, hidden?, tagUsers?, … }). → { owners, admins, allow, placed } */
|
|
57
|
+
export async function placeRoles ({ room, owners, admins, allow }, people, { client } = {}) {
|
|
58
|
+
const roles = { owners: { emails: roleEmails(owners), tags: roleTags(owners) }, admins: { emails: roleEmails(admins), tags: roleTags(admins) } }
|
|
59
|
+
const al = { ...(allow || {}) }
|
|
60
|
+
const placed = []
|
|
61
|
+
for (const p of (Array.isArray(people) ? people : [])) {
|
|
62
|
+
if (!p || (p.role !== 'owners' && p.role !== 'admins')) continue
|
|
63
|
+
const email = lc(p.email), name = validUsername(String(p.username || '').replace(/^@/, ''))
|
|
64
|
+
if (!name) continue
|
|
65
|
+
const tag = await roleTagFor(client, name, room)
|
|
66
|
+
if (!tag) continue // the server cannot take a tag role yet (or the name did not tag): the email stays
|
|
67
|
+
const r = roles[p.role]
|
|
68
|
+
if (!r.tags.includes(tag)) r.tags.push(tag)
|
|
69
|
+
if (email) { r.emails = r.emails.filter((e) => e !== email); if (p.role === 'owners') roles.admins.emails = roles.admins.emails.filter((e) => e !== email) }
|
|
70
|
+
for (const k of ['emails', 'hidden']) if (Array.isArray(al[k]) && email) al[k] = al[k].filter((e) => lc(e) !== email)
|
|
71
|
+
al.tagUsers = [...new Set([...(Array.isArray(al.tagUsers) ? al.tagUsers : []), name])]
|
|
72
|
+
placed.push({ role: p.role, email, username: name, tag })
|
|
73
|
+
}
|
|
74
|
+
return { owners: roleOf(roles.owners.emails, roles.owners.tags), admins: roleOf(roles.admins.emails, roles.admins.tags), allow: al, placed }
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/** WHO HOLDS EACH ROLE TAG, from the guest book (`roster_seen` people: { email?, user?, entries: ['mh:<tag>', …] }). → Map tag → { email, user }. */
|
|
78
|
+
export function tagHolders (people, tags) {
|
|
79
|
+
const want = new Set((tags || []).filter((t) => typeof t === 'string' && t))
|
|
80
|
+
const out = new Map()
|
|
81
|
+
for (const p of (Array.isArray(people) ? people : Object.values(people || {}))) {
|
|
82
|
+
if (!p || p.left || !Array.isArray(p.entries)) continue
|
|
83
|
+
for (const x of p.entries) if (typeof x === 'string' && x.startsWith('mh:') && want.has(x.slice(3)) && !out.has(x.slice(3))) out.set(x.slice(3), { email: lc(p.email), user: lc(p.user).replace(/^@/, '') })
|
|
84
|
+
}
|
|
85
|
+
return out
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/** WHO HOLDS EACH ROLE TAG — the guest book's entries first, then each member's @username asked for its tag here (`userTag(name, room)`):
|
|
89
|
+
* a role granted in place to someone on the list by email is not among the entries they signed in by, and every tag-role holder has a
|
|
90
|
+
* username (the tag is their name's). Only tags still unmatched are asked for, each name once. → Map tag → { email, user }. */
|
|
91
|
+
export async function roleTagHolders (people, tags, { room, userTag } = {}) {
|
|
92
|
+
const list = Array.isArray(people) ? people : Object.values(people || {})
|
|
93
|
+
const out = tagHolders(list, tags)
|
|
94
|
+
const left = new Set((tags || []).filter((t) => typeof t === 'string' && t && !out.has(t)))
|
|
95
|
+
if (!left.size || typeof userTag !== 'function') return out
|
|
96
|
+
const asked = new Set([...out.values()].map((h) => h.user).filter(Boolean)) // a person holds one tag in a room: one already matched is not asked
|
|
97
|
+
for (const p of list) {
|
|
98
|
+
if (!left.size) break
|
|
99
|
+
if (!p || p.left || !p.user) continue
|
|
100
|
+
const u = lc(p.user).replace(/^@/, '')
|
|
101
|
+
if (!u || asked.has(u)) continue
|
|
102
|
+
asked.add(u)
|
|
103
|
+
const t = await Promise.resolve().then(() => userTag(u, room)).catch(() => null)
|
|
104
|
+
const tag = t && t.status === 200 && typeof t.tag === 'string' ? t.tag : ''
|
|
105
|
+
if (tag && left.has(tag)) { out.set(tag, { email: lc(p.email), user: u }); left.delete(tag) }
|
|
106
|
+
}
|
|
107
|
+
return out
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
/** The role tags a guest-book person (by email or @username) holds them by — what a demotion or removal drops. */
|
|
111
|
+
export async function tagsOfPerson (people, cfg, { email = '', user = '' } = {}, { room, userTag } = {}) {
|
|
112
|
+
const r = rolesOf(cfg), all = [...r.ownerTags, ...r.adminTags], e = lc(email), u = lc(user).replace(/^@/, '')
|
|
113
|
+
if (!all.length) return []
|
|
114
|
+
const held = await roleTagHolders(people, all, { room, userTag })
|
|
115
|
+
return all.filter((t) => { const h = held.get(t); return !!h && ((e && h.email === e) || (u && h.user === u)) })
|
|
116
|
+
}
|
package/roomRoster.js
CHANGED
|
@@ -19,7 +19,10 @@ export function verifiedPosters(entries, seen, { withId = false } = {}) {
|
|
|
19
19
|
const person = Object.prototype.hasOwnProperty.call(seen, id) ? seen[id] : null
|
|
20
20
|
if (person?.left) continue
|
|
21
21
|
const owner = person?.swapped ? null : person
|
|
22
|
-
|
|
22
|
+
// A person the roster serves by @username alone (no email in their record) never gets one back from an edit's stamp — rows and
|
|
23
|
+
// renames made before the server stopped stamping it still carry it (sync sweep 2026-11-29 #5).
|
|
24
|
+
const servedByUser = !!(owner && owner.user && !owner.email)
|
|
25
|
+
const stampedEmail = !servedByUser && (e.kind === 'data' || e.kind === 'title') && typeof e.email === 'string' ? e.email.trim().toLowerCase() : ''
|
|
23
26
|
const email = owner?.email || stampedEmail || (e.emailNameVerified === true ? String(e.name || '').trim().toLowerCase() : '')
|
|
24
27
|
const user = owner?.user || e.user || ''
|
|
25
28
|
if (email || user) posters.push({ email, user, ...(withId && !person?.swapped ? { id } : {}) })
|
|
@@ -116,8 +119,11 @@ export function selfRow ({ grantSpk = null, signPub = null, deviceId = '', name
|
|
|
116
119
|
* Hidden entries cannot be named, only counted. `rows` = listRoster(...) output; `seenIdentity(id)` → "@user" | email | "". */
|
|
117
120
|
// `onList(email, user)` (verifiedMove.stillOnList): a room re-keyed in place keeps its guest book and its history, so a REMOVED
|
|
118
121
|
// member still has rows and posts — they are not members. Absent (a room never re-keyed): every sighting is a member, as before.
|
|
119
|
-
|
|
122
|
+
// `nameOf(email, user)` → the VIEWER's own name for that person in People, or '' (docs/spaces-usernames.md § 13; owner, 2026-11-29): the
|
|
123
|
+
// display order is that name → @username → email, everywhere a person is shown. Absent: @username → email, as before.
|
|
124
|
+
export function membersView ({ allow = {}, rows = [], seenIdentity = () => '', seenPerson = null, posters = [], myEmail = '', mineId = '', myName = '', hiddenUnseen = null, seenHandles = new Set(), onList = null, nameOf = null } = {}) {
|
|
120
125
|
const norm = (s) => String(s || '').trim().toLowerCase()
|
|
126
|
+
const peopleName = (email, user) => { if (typeof nameOf !== 'function') return ''; try { return String(nameOf(email || '', user || '') || '').trim() } catch { return '' } }
|
|
121
127
|
const me = norm(myEmail)
|
|
122
128
|
// ONE ROW PER PERSON (2026-10-04, sp-294n…: four "@alice" rows for one person on four keys, and both listed emails
|
|
123
129
|
// "not yet opened" — the owner's own and an account with five verified posts). A row is a signing KEY, and every
|
|
@@ -165,7 +171,7 @@ export function membersView ({ allow = {}, rows = [], seenIdentity = () => '', s
|
|
|
165
171
|
for (const x of ordered) {
|
|
166
172
|
if (x.email) covered.add(x.email)
|
|
167
173
|
if (x.user) covered.add(norm('@' + x.user))
|
|
168
|
-
const label = x.user ? '@' + x.user : (x.email || (x.me ? (myName || x.label) : x.label))
|
|
174
|
+
const label = (!x.me && peopleName(x.email, x.user)) || (x.user ? '@' + x.user : (x.email || (x.me ? (myName || x.label) : x.label)))
|
|
169
175
|
const address = x.email || (x.user ? '@' + x.user : '')
|
|
170
176
|
items.push({ label, tag: x.me ? 'you' : 'signed in', ...(x.id ? { id: x.id } : {}), ...(address ? { address } : {}), ...(x.user ? { user: x.user } : {}) })
|
|
171
177
|
}
|
|
@@ -173,8 +179,8 @@ export function membersView ({ allow = {}, rows = [], seenIdentity = () => '', s
|
|
|
173
179
|
// an older room's @username entry: { handle, username } — the username it had THEN. A signed-in member whose handle it is
|
|
174
180
|
// (seenHandles: the caller resolved the signed-in usernames) is that member under their new name, not a second person.
|
|
175
181
|
const users = Array.isArray(allow.users) ? allow.users.filter((u) => !(u && typeof u === 'object' && u.handle && (seenHandles.has(String(u.handle)) || seenHandles.has(String(u.handle).toLowerCase().trim())))).map((u) => (u && typeof u === 'object' ? u.username : u)).filter(Boolean) : []
|
|
176
|
-
for (const e of emails) if (!covered.has(norm(e))) items.push({ label: e, tag: 'not yet opened', address: e })
|
|
177
|
-
for (const u of users) if (!covered.has(norm('@' + u))) items.push({ label: '@' + u, tag: 'not yet opened', address: '@' + u, user: u })
|
|
182
|
+
for (const e of emails) if (!covered.has(norm(e))) items.push({ label: peopleName(norm(e), '') || e, tag: 'not yet opened', address: e })
|
|
183
|
+
for (const u of users) if (!covered.has(norm('@' + u))) items.push({ label: peopleName('', u) || '@' + u, tag: 'not yet opened', address: '@' + u, user: u })
|
|
178
184
|
const domains = Array.isArray(allow.domains) ? allow.domains.filter(Boolean) : []
|
|
179
185
|
for (const d of domains) items.push({ label: 'anyone at @' + d, tag: 'allowed' })
|
|
180
186
|
// Hidden (hashed) entries: the caller matches them against the people the room verified (rosterHash.memberHash of
|
|
@@ -194,7 +200,10 @@ export function membersView ({ allow = {}, rows = [], seenIdentity = () => '', s
|
|
|
194
200
|
// list said "Not yet opened" for good). A removal — or leaving — marks the member's record `left` (roomLeave.markLeft) and every
|
|
195
201
|
// reader skips such a record; it still holds the email, so this said "seen", the device never announced again, and the mark never
|
|
196
202
|
// cleared. The server writes a fresh record over a `left` one (spaceService roster_seen `mine`).
|
|
197
|
-
|
|
203
|
+
// ⚑ …and a record with no email IS a sighting when it names the @username (docs/spaces-usernames.md § 13): the server hands the members
|
|
204
|
+
// a person who prefers their @username — and is on the list only by it — without the email; read as unseen, that member's device
|
|
205
|
+
// announced again on every open.
|
|
206
|
+
export const unseenIn = (seen, id) => !!id && !(seen && typeof seen === 'object' && seen[id] && (seen[id].email || seen[id].user) && !seen[id].left)
|
|
198
207
|
/** Seen, but before the record kept WHICH list entries this person is (2026-10-23, rosterCount samePeople): announced ONCE more
|
|
199
208
|
* per room and key on this page (never retried — a server that does not keep them yet answers the same) so one person on the list by email and by
|
|
200
209
|
* @username counts once. */
|