@dxos/client-services 0.1.58-main.353d0d1 → 0.1.58-main.44da53d

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 (38) hide show
  1. package/dist/lib/browser/{chunk-FJAPMZDU.mjs → chunk-PSL7MYD4.mjs} +164 -116
  2. package/dist/lib/browser/chunk-PSL7MYD4.mjs.map +7 -0
  3. package/dist/lib/browser/index.mjs +7 -6
  4. package/dist/lib/browser/index.mjs.map +3 -3
  5. package/dist/lib/browser/meta.json +1 -1
  6. package/dist/lib/browser/packlets/testing/index.mjs +3 -3
  7. package/dist/lib/browser/packlets/testing/index.mjs.map +3 -3
  8. package/dist/lib/node/index.cjs +204 -155
  9. package/dist/lib/node/index.cjs.map +3 -3
  10. package/dist/lib/node/meta.json +1 -1
  11. package/dist/lib/node/packlets/testing/index.cjs +203 -155
  12. package/dist/lib/node/packlets/testing/index.cjs.map +3 -3
  13. package/dist/types/src/packlets/invitations/invitation-extension.d.ts.map +1 -1
  14. package/dist/types/src/packlets/invitations/invitations-handler.d.ts +3 -3
  15. package/dist/types/src/packlets/invitations/invitations-handler.d.ts.map +1 -1
  16. package/dist/types/src/packlets/invitations/invitations-service.d.ts.map +1 -1
  17. package/dist/types/src/packlets/spaces/data-space.d.ts.map +1 -1
  18. package/dist/types/src/packlets/spaces/spaces-service.d.ts +1 -1
  19. package/dist/types/src/packlets/spaces/spaces-service.d.ts.map +1 -1
  20. package/dist/types/src/packlets/testing/invitation-utils.d.ts +5 -5
  21. package/dist/types/src/packlets/testing/invitation-utils.d.ts.map +1 -1
  22. package/dist/types/src/packlets/vault/shell-runtime.d.ts +1 -1
  23. package/dist/types/src/packlets/vault/shell-runtime.d.ts.map +1 -1
  24. package/dist/types/src/version.d.ts +1 -1
  25. package/package.json +34 -35
  26. package/src/packlets/identity/authenticator.ts +1 -1
  27. package/src/packlets/invitations/invitation-extension.ts +1 -2
  28. package/src/packlets/invitations/invitations-handler.ts +7 -8
  29. package/src/packlets/invitations/invitations-service.ts +11 -7
  30. package/src/packlets/services/service-context.ts +2 -2
  31. package/src/packlets/spaces/data-space.ts +10 -2
  32. package/src/packlets/spaces/spaces-service.ts +29 -8
  33. package/src/packlets/storage/storage.ts +1 -1
  34. package/src/packlets/testing/invitation-utils.ts +9 -9
  35. package/src/packlets/vault/iframe-proxy-runtime.ts +1 -1
  36. package/src/packlets/vault/shell-runtime.ts +4 -4
  37. package/src/version.ts +1 -1
  38. package/dist/lib/browser/chunk-FJAPMZDU.mjs.map +0 -7
@@ -1158,26 +1158,24 @@ var DeviceInvitationProtocol = class {
1158
1158
 
1159
1159
  // packages/sdk/client-services/src/packlets/invitations/invitations-handler.ts
1160
1160
  import { PushStream, scheduleTask as scheduleTask2, TimeoutError, Trigger as Trigger3 } from "@dxos/async";
1161
- import { AuthenticatingInvitationObservable, AUTHENTICATION_CODE_LENGTH, CancellableInvitationObservable, INVITATION_TIMEOUT } from "@dxos/client-protocol";
1161
+ import { AuthenticatingInvitation, AUTHENTICATION_CODE_LENGTH, CancellableInvitation, INVITATION_TIMEOUT } from "@dxos/client-protocol";
1162
1162
  import { Context as Context5 } from "@dxos/context";
1163
1163
  import { generatePasscode } from "@dxos/credentials";
1164
- import { InvalidInvitationExtensionRoleError as InvalidInvitationExtensionRoleError2 } from "@dxos/errors";
1165
1164
  import { invariant as invariant6 } from "@dxos/invariant";
1166
1165
  import { PublicKey as PublicKey5 } from "@dxos/keys";
1167
1166
  import { log as log5 } from "@dxos/log";
1168
1167
  import { createTeleportProtocolFactory, StarTopology } from "@dxos/network-manager";
1169
- import { trace as trace4 } from "@dxos/protocols";
1168
+ import { InvalidInvitationExtensionRoleError as InvalidInvitationExtensionRoleError2, trace as trace4 } from "@dxos/protocols";
1170
1169
  import { Invitation as Invitation3 } from "@dxos/protocols/proto/dxos/client/services";
1171
1170
  import { AuthenticationResponse as AuthenticationResponse2 } from "@dxos/protocols/proto/dxos/halo/invitations";
1172
1171
 
1173
1172
  // packages/sdk/client-services/src/packlets/invitations/invitation-extension.ts
1174
1173
  import { Trigger as Trigger2 } from "@dxos/async";
1175
1174
  import { cancelWithContext, Context as Context4 } from "@dxos/context";
1176
- import { InvalidInvitationExtensionRoleError } from "@dxos/errors";
1177
1175
  import { invariant as invariant5 } from "@dxos/invariant";
1178
1176
  import { PublicKey as PublicKey4 } from "@dxos/keys";
1179
1177
  import { log as log4 } from "@dxos/log";
1180
- import { schema as schema2, trace as trace3 } from "@dxos/protocols";
1178
+ import { InvalidInvitationExtensionRoleError, schema as schema2, trace as trace3 } from "@dxos/protocols";
1181
1179
  import { Invitation as Invitation2 } from "@dxos/protocols/proto/dxos/client/services";
1182
1180
  import { AuthenticationResponse, Options } from "@dxos/protocols/proto/dxos/halo/invitations";
1183
1181
  import { RpcExtension } from "@dxos/teleport";
@@ -1211,7 +1209,7 @@ var InvitationHostExtension = class extends RpcExtension {
1211
1209
  options: async (options) => {
1212
1210
  invariant5(!this._remoteOptions, "Remote options already set.", {
1213
1211
  F: __dxlog_file6,
1214
- L: 88,
1212
+ L: 87,
1215
1213
  S: this,
1216
1214
  A: [
1217
1215
  "!this._remoteOptions",
@@ -1228,7 +1226,7 @@ var InvitationHostExtension = class extends RpcExtension {
1228
1226
  id: traceId
1229
1227
  }), {
1230
1228
  F: __dxlog_file6,
1231
- L: 97,
1229
+ L: 96,
1232
1230
  S: this,
1233
1231
  C: (f, a) => f(...a)
1234
1232
  });
@@ -1238,7 +1236,7 @@ var InvitationHostExtension = class extends RpcExtension {
1238
1236
  invitationId
1239
1237
  }, {
1240
1238
  F: __dxlog_file6,
1241
- L: 101,
1239
+ L: 100,
1242
1240
  S: this,
1243
1241
  C: (f, a) => f(...a)
1244
1242
  });
@@ -1252,7 +1250,7 @@ var InvitationHostExtension = class extends RpcExtension {
1252
1250
  guestProfile: profile
1253
1251
  }, {
1254
1252
  F: __dxlog_file6,
1255
- L: 110,
1253
+ L: 109,
1256
1254
  S: this,
1257
1255
  C: (f, a) => f(...a)
1258
1256
  });
@@ -1265,7 +1263,7 @@ var InvitationHostExtension = class extends RpcExtension {
1265
1263
  id: traceId
1266
1264
  }), {
1267
1265
  F: __dxlog_file6,
1268
- L: 117,
1266
+ L: 116,
1269
1267
  S: this,
1270
1268
  C: (f, a) => f(...a)
1271
1269
  });
@@ -1280,7 +1278,7 @@ var InvitationHostExtension = class extends RpcExtension {
1280
1278
  id: traceId
1281
1279
  }), {
1282
1280
  F: __dxlog_file6,
1283
- L: 126,
1281
+ L: 125,
1284
1282
  S: this,
1285
1283
  C: (f, a) => f(...a)
1286
1284
  });
@@ -1288,14 +1286,14 @@ var InvitationHostExtension = class extends RpcExtension {
1288
1286
  authCode: code
1289
1287
  }, {
1290
1288
  F: __dxlog_file6,
1291
- L: 127,
1289
+ L: 126,
1292
1290
  S: this,
1293
1291
  C: (f, a) => f(...a)
1294
1292
  });
1295
1293
  let status = AuthenticationResponse.Status.OK;
1296
1294
  invariant5(this.invitation, "Invitation is not set.", {
1297
1295
  F: __dxlog_file6,
1298
- L: 130,
1296
+ L: 129,
1299
1297
  S: this,
1300
1298
  A: [
1301
1299
  "this.invitation",
@@ -1306,7 +1304,7 @@ var InvitationHostExtension = class extends RpcExtension {
1306
1304
  case Invitation2.AuthMethod.NONE: {
1307
1305
  log4("authentication not required", void 0, {
1308
1306
  F: __dxlog_file6,
1309
- L: 133,
1307
+ L: 132,
1310
1308
  S: this,
1311
1309
  C: (f, a) => f(...a)
1312
1310
  });
@@ -1331,7 +1329,7 @@ var InvitationHostExtension = class extends RpcExtension {
1331
1329
  authMethod: this.invitation.authMethod
1332
1330
  }, {
1333
1331
  F: __dxlog_file6,
1334
- L: 151,
1332
+ L: 150,
1335
1333
  S: this,
1336
1334
  C: (f, a) => f(...a)
1337
1335
  });
@@ -1346,7 +1344,7 @@ var InvitationHostExtension = class extends RpcExtension {
1346
1344
  }
1347
1345
  }), {
1348
1346
  F: __dxlog_file6,
1349
- L: 157,
1347
+ L: 156,
1350
1348
  S: this,
1351
1349
  C: (f, a) => f(...a)
1352
1350
  });
@@ -1360,14 +1358,14 @@ var InvitationHostExtension = class extends RpcExtension {
1360
1358
  id: traceId
1361
1359
  }), {
1362
1360
  F: __dxlog_file6,
1363
- L: 163,
1361
+ L: 162,
1364
1362
  S: this,
1365
1363
  C: (f, a) => f(...a)
1366
1364
  });
1367
1365
  try {
1368
1366
  invariant5(this.invitation, "Invitation is not set.", {
1369
1367
  F: __dxlog_file6,
1370
- L: 166,
1368
+ L: 165,
1371
1369
  S: this,
1372
1370
  A: [
1373
1371
  "this.invitation",
@@ -1382,7 +1380,7 @@ var InvitationHostExtension = class extends RpcExtension {
1382
1380
  id: traceId
1383
1381
  }), {
1384
1382
  F: __dxlog_file6,
1385
- L: 174,
1383
+ L: 173,
1386
1384
  S: this,
1387
1385
  C: (f, a) => f(...a)
1388
1386
  });
@@ -1439,7 +1437,7 @@ var InvitationGuestExtension = class extends RpcExtension {
1439
1437
  options: async (options) => {
1440
1438
  invariant5(!this._remoteOptions, "Remote options already set.", {
1441
1439
  F: __dxlog_file6,
1442
- L: 241,
1440
+ L: 240,
1443
1441
  S: this,
1444
1442
  A: [
1445
1443
  "!this._remoteOptions",
@@ -1466,7 +1464,7 @@ var InvitationGuestExtension = class extends RpcExtension {
1466
1464
  try {
1467
1465
  log4("begin options", void 0, {
1468
1466
  F: __dxlog_file6,
1469
- L: 262,
1467
+ L: 261,
1470
1468
  S: this,
1471
1469
  C: (f, a) => f(...a)
1472
1470
  });
@@ -1478,7 +1476,7 @@ var InvitationGuestExtension = class extends RpcExtension {
1478
1476
  }));
1479
1477
  log4("end options", void 0, {
1480
1478
  F: __dxlog_file6,
1481
- L: 265,
1479
+ L: 264,
1482
1480
  S: this,
1483
1481
  C: (f, a) => f(...a)
1484
1482
  });
@@ -1492,7 +1490,7 @@ var InvitationGuestExtension = class extends RpcExtension {
1492
1490
  } catch (err) {
1493
1491
  log4("openError", err, {
1494
1492
  F: __dxlog_file6,
1495
- L: 275,
1493
+ L: 274,
1496
1494
  S: this,
1497
1495
  C: (f, a) => f(...a)
1498
1496
  });
@@ -1502,7 +1500,7 @@ var InvitationGuestExtension = class extends RpcExtension {
1502
1500
  async onClose() {
1503
1501
  log4("onClose", void 0, {
1504
1502
  F: __dxlog_file6,
1505
- L: 281,
1503
+ L: 280,
1506
1504
  S: this,
1507
1505
  C: (f, a) => f(...a)
1508
1506
  });
@@ -1525,7 +1523,7 @@ var InvitationsHandler = class {
1525
1523
  const authCode = options?.authCode ?? (authMethod === Invitation3.AuthMethod.SHARED_SECRET ? generatePasscode(AUTHENTICATION_CODE_LENGTH) : void 0);
1526
1524
  invariant6(protocol, void 0, {
1527
1525
  F: __dxlog_file7,
1528
- L: 76,
1526
+ L: 75,
1529
1527
  S: this,
1530
1528
  A: [
1531
1529
  "protocol",
@@ -1554,7 +1552,7 @@ var InvitationsHandler = class {
1554
1552
  ...protocol.toJSON()
1555
1553
  }, {
1556
1554
  F: __dxlog_file7,
1557
- L: 98,
1555
+ L: 97,
1558
1556
  S: this,
1559
1557
  C: (f, a) => f(...a)
1560
1558
  });
@@ -1579,7 +1577,7 @@ var InvitationsHandler = class {
1579
1577
  const deviceKey = admissionRequest.device?.deviceKey ?? admissionRequest.space?.deviceKey;
1580
1578
  invariant6(deviceKey, void 0, {
1581
1579
  F: __dxlog_file7,
1582
- L: 119,
1580
+ L: 118,
1583
1581
  S: this,
1584
1582
  A: [
1585
1583
  "deviceKey",
@@ -1602,7 +1600,7 @@ var InvitationsHandler = class {
1602
1600
  id: traceId
1603
1601
  }), {
1604
1602
  F: __dxlog_file7,
1605
- L: 137,
1603
+ L: 136,
1606
1604
  S: this,
1607
1605
  C: (f, a) => f(...a)
1608
1606
  });
@@ -1610,7 +1608,7 @@ var InvitationsHandler = class {
1610
1608
  ...protocol.toJSON()
1611
1609
  }, {
1612
1610
  F: __dxlog_file7,
1613
- L: 138,
1611
+ L: 137,
1614
1612
  S: this,
1615
1613
  C: (f, a) => f(...a)
1616
1614
  });
@@ -1626,7 +1624,7 @@ var InvitationsHandler = class {
1626
1624
  ...protocol.toJSON()
1627
1625
  }, {
1628
1626
  F: __dxlog_file7,
1629
- L: 141,
1627
+ L: 140,
1630
1628
  S: this,
1631
1629
  C: (f, a) => f(...a)
1632
1630
  });
@@ -1638,7 +1636,7 @@ var InvitationsHandler = class {
1638
1636
  id: traceId
1639
1637
  }), {
1640
1638
  F: __dxlog_file7,
1641
- L: 143,
1639
+ L: 142,
1642
1640
  S: this,
1643
1641
  C: (f, a) => f(...a)
1644
1642
  });
@@ -1648,7 +1646,7 @@ var InvitationsHandler = class {
1648
1646
  ...protocol.toJSON()
1649
1647
  }, {
1650
1648
  F: __dxlog_file7,
1651
- L: 146,
1649
+ L: 145,
1652
1650
  S: this,
1653
1651
  C: (f, a) => f(...a)
1654
1652
  });
@@ -1659,7 +1657,7 @@ var InvitationsHandler = class {
1659
1657
  } else {
1660
1658
  log5.error("failed", err, {
1661
1659
  F: __dxlog_file7,
1662
- L: 149,
1660
+ L: 148,
1663
1661
  S: this,
1664
1662
  C: (f, a) => f(...a)
1665
1663
  });
@@ -1670,7 +1668,7 @@ var InvitationsHandler = class {
1670
1668
  error: err
1671
1669
  }), {
1672
1670
  F: __dxlog_file7,
1673
- L: 152,
1671
+ L: 151,
1674
1672
  S: this,
1675
1673
  C: (f, a) => f(...a)
1676
1674
  });
@@ -1691,7 +1689,7 @@ var InvitationsHandler = class {
1691
1689
  ...protocol.toJSON()
1692
1690
  }, {
1693
1691
  F: __dxlog_file7,
1694
- L: 167,
1692
+ L: 166,
1695
1693
  S: this,
1696
1694
  C: (f, a) => f(...a)
1697
1695
  });
@@ -1702,7 +1700,7 @@ var InvitationsHandler = class {
1702
1700
  } else {
1703
1701
  log5.error("failed", err, {
1704
1702
  F: __dxlog_file7,
1705
- L: 170,
1703
+ L: 169,
1706
1704
  S: this,
1707
1705
  C: (f, a) => f(...a)
1708
1706
  });
@@ -1730,7 +1728,7 @@ var InvitationsHandler = class {
1730
1728
  state: Invitation3.State.CONNECTING
1731
1729
  });
1732
1730
  });
1733
- const observable = new CancellableInvitationObservable({
1731
+ const observable = new CancellableInvitation({
1734
1732
  initialInvitation: invitation,
1735
1733
  subscriber: stream.observable,
1736
1734
  onCancel: async () => {
@@ -1747,7 +1745,7 @@ var InvitationsHandler = class {
1747
1745
  const { timeout = INVITATION_TIMEOUT } = invitation;
1748
1746
  invariant6(protocol, void 0, {
1749
1747
  F: __dxlog_file7,
1750
- L: 211,
1748
+ L: 210,
1751
1749
  S: this,
1752
1750
  A: [
1753
1751
  "protocol",
@@ -1761,7 +1759,7 @@ var InvitationsHandler = class {
1761
1759
  const setState = (newData) => {
1762
1760
  invariant6(newData.state !== void 0, void 0, {
1763
1761
  F: __dxlog_file7,
1764
- L: 222,
1762
+ L: 221,
1765
1763
  S: this,
1766
1764
  A: [
1767
1765
  "newData.state !== undefined",
@@ -1781,7 +1779,7 @@ var InvitationsHandler = class {
1781
1779
  ...protocol.toJSON()
1782
1780
  }, {
1783
1781
  F: __dxlog_file7,
1784
- L: 230,
1782
+ L: 229,
1785
1783
  S: this,
1786
1784
  C: (f, a) => f(...a)
1787
1785
  });
@@ -1791,7 +1789,7 @@ var InvitationsHandler = class {
1791
1789
  } else {
1792
1790
  log5.warn("auth failed", err, {
1793
1791
  F: __dxlog_file7,
1794
- L: 233,
1792
+ L: 232,
1795
1793
  S: this,
1796
1794
  C: (f, a) => f(...a)
1797
1795
  });
@@ -1805,7 +1803,7 @@ var InvitationsHandler = class {
1805
1803
  ...protocol.toJSON()
1806
1804
  }, {
1807
1805
  F: __dxlog_file7,
1808
- L: 241,
1806
+ L: 240,
1809
1807
  S: this,
1810
1808
  C: (f, a) => f(...a)
1811
1809
  });
@@ -1820,7 +1818,7 @@ var InvitationsHandler = class {
1820
1818
  currentState
1821
1819
  }, {
1822
1820
  F: __dxlog_file7,
1823
- L: 251,
1821
+ L: 250,
1824
1822
  S: this,
1825
1823
  C: (f, a) => f(...a)
1826
1824
  });
@@ -1835,7 +1833,7 @@ var InvitationsHandler = class {
1835
1833
  id: traceId
1836
1834
  }), {
1837
1835
  F: __dxlog_file7,
1838
- L: 260,
1836
+ L: 259,
1839
1837
  S: this,
1840
1838
  C: (f, a) => f(...a)
1841
1839
  });
@@ -1847,7 +1845,7 @@ var InvitationsHandler = class {
1847
1845
  ...protocol.toJSON()
1848
1846
  }, {
1849
1847
  F: __dxlog_file7,
1850
- L: 268,
1848
+ L: 267,
1851
1849
  S: this,
1852
1850
  C: (f, a) => f(...a)
1853
1851
  });
@@ -1858,7 +1856,7 @@ var InvitationsHandler = class {
1858
1856
  ...protocol.toJSON()
1859
1857
  }, {
1860
1858
  F: __dxlog_file7,
1861
- L: 272,
1859
+ L: 271,
1862
1860
  S: this,
1863
1861
  C: (f, a) => f(...a)
1864
1862
  });
@@ -1868,7 +1866,7 @@ var InvitationsHandler = class {
1868
1866
  response: introductionResponse
1869
1867
  }, {
1870
1868
  F: __dxlog_file7,
1871
- L: 276,
1869
+ L: 275,
1872
1870
  S: this,
1873
1871
  C: (f, a) => f(...a)
1874
1872
  });
@@ -1880,7 +1878,7 @@ var InvitationsHandler = class {
1880
1878
  for (let attempt = 1; attempt <= MAX_OTP_ATTEMPTS; attempt++) {
1881
1879
  log5("guest waiting for authentication code...", void 0, {
1882
1880
  F: __dxlog_file7,
1883
- L: 285,
1881
+ L: 284,
1884
1882
  S: this,
1885
1883
  C: (f, a) => f(...a)
1886
1884
  });
@@ -1892,7 +1890,7 @@ var InvitationsHandler = class {
1892
1890
  });
1893
1891
  log5("sending authentication request", void 0, {
1894
1892
  F: __dxlog_file7,
1895
- L: 289,
1893
+ L: 288,
1896
1894
  S: this,
1897
1895
  C: (f, a) => f(...a)
1898
1896
  });
@@ -1913,7 +1911,7 @@ var InvitationsHandler = class {
1913
1911
  attempt
1914
1912
  }, {
1915
1913
  F: __dxlog_file7,
1916
- L: 300,
1914
+ L: 299,
1917
1915
  S: this,
1918
1916
  C: (f, a) => f(...a)
1919
1917
  });
@@ -1930,7 +1928,7 @@ var InvitationsHandler = class {
1930
1928
  ...protocol.toJSON()
1931
1929
  }, {
1932
1930
  F: __dxlog_file7,
1933
- L: 311,
1931
+ L: 310,
1934
1932
  S: this,
1935
1933
  C: (f, a) => f(...a)
1936
1934
  });
@@ -1942,7 +1940,7 @@ var InvitationsHandler = class {
1942
1940
  ...protocol.toJSON()
1943
1941
  }, {
1944
1942
  F: __dxlog_file7,
1945
- L: 322,
1943
+ L: 321,
1946
1944
  S: this,
1947
1945
  C: (f, a) => f(...a)
1948
1946
  });
@@ -1954,7 +1952,7 @@ var InvitationsHandler = class {
1954
1952
  id: traceId
1955
1953
  }), {
1956
1954
  F: __dxlog_file7,
1957
- L: 324,
1955
+ L: 323,
1958
1956
  S: this,
1959
1957
  C: (f, a) => f(...a)
1960
1958
  });
@@ -1964,7 +1962,7 @@ var InvitationsHandler = class {
1964
1962
  ...protocol.toJSON()
1965
1963
  }, {
1966
1964
  F: __dxlog_file7,
1967
- L: 327,
1965
+ L: 326,
1968
1966
  S: this,
1969
1967
  C: (f, a) => f(...a)
1970
1968
  });
@@ -1974,7 +1972,7 @@ var InvitationsHandler = class {
1974
1972
  } else {
1975
1973
  log5("auth failed", err, {
1976
1974
  F: __dxlog_file7,
1977
- L: 330,
1975
+ L: 329,
1978
1976
  S: this,
1979
1977
  C: (f, a) => f(...a)
1980
1978
  });
@@ -1985,7 +1983,7 @@ var InvitationsHandler = class {
1985
1983
  error: err
1986
1984
  }), {
1987
1985
  F: __dxlog_file7,
1988
- L: 333,
1986
+ L: 332,
1989
1987
  S: this,
1990
1988
  C: (f, a) => f(...a)
1991
1989
  });
@@ -2003,7 +2001,7 @@ var InvitationsHandler = class {
2003
2001
  ...protocol.toJSON()
2004
2002
  }, {
2005
2003
  F: __dxlog_file7,
2006
- L: 344,
2004
+ L: 343,
2007
2005
  S: this,
2008
2006
  C: (f, a) => f(...a)
2009
2007
  });
@@ -2013,7 +2011,7 @@ var InvitationsHandler = class {
2013
2011
  } else {
2014
2012
  log5("auth failed", err, {
2015
2013
  F: __dxlog_file7,
2016
- L: 347,
2014
+ L: 346,
2017
2015
  S: this,
2018
2016
  C: (f, a) => f(...a)
2019
2017
  });
@@ -2026,7 +2024,7 @@ var InvitationsHandler = class {
2026
2024
  scheduleTask2(ctx, async () => {
2027
2025
  invariant6(invitation.swarmKey, void 0, {
2028
2026
  F: __dxlog_file7,
2029
- L: 357,
2027
+ L: 356,
2030
2028
  S: this,
2031
2029
  A: [
2032
2030
  "invitation.swarmKey",
@@ -2048,7 +2046,7 @@ var InvitationsHandler = class {
2048
2046
  state: Invitation3.State.CONNECTING
2049
2047
  });
2050
2048
  });
2051
- const observable = new AuthenticatingInvitationObservable({
2049
+ const observable = new AuthenticatingInvitation({
2052
2050
  initialInvitation: invitation,
2053
2051
  subscriber: stream.observable,
2054
2052
  onCancel: async () => {
@@ -2070,7 +2068,7 @@ import { Event as Event3 } from "@dxos/async";
2070
2068
  import { Stream as Stream8 } from "@dxos/codec-protobuf";
2071
2069
  import { invariant as invariant7 } from "@dxos/invariant";
2072
2070
  import { log as log6 } from "@dxos/log";
2073
- import { QueryInvitationsResponse } from "@dxos/protocols/proto/dxos/client/services";
2071
+ import { Invitation as Invitation4, QueryInvitationsResponse } from "@dxos/protocols/proto/dxos/client/services";
2074
2072
  var __dxlog_file8 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/invitations/invitations-service.ts";
2075
2073
  var InvitationsServiceImpl = class {
2076
2074
  constructor(_invitationsHandler, _getHandler) {
@@ -2106,7 +2104,9 @@ var InvitationsServiceImpl = class {
2106
2104
  }, () => {
2107
2105
  close();
2108
2106
  this._createInvitations.delete(invitation.get().invitationId);
2109
- this._removedCreated.emit(invitation.get());
2107
+ if (invitation.get().type !== Invitation4.Type.MULTIUSE) {
2108
+ this._removedCreated.emit(invitation.get());
2109
+ }
2110
2110
  });
2111
2111
  });
2112
2112
  }
@@ -2129,20 +2129,22 @@ var InvitationsServiceImpl = class {
2129
2129
  }, () => {
2130
2130
  close();
2131
2131
  this._acceptInvitations.delete(invitation.get().invitationId);
2132
- this._removedAccepted.emit(invitation.get());
2132
+ if (invitation.get().type !== Invitation4.Type.MULTIUSE) {
2133
+ this._removedAccepted.emit(invitation.get());
2134
+ }
2133
2135
  });
2134
2136
  });
2135
2137
  }
2136
2138
  async authenticate({ invitationId, authCode }) {
2137
2139
  log6("authenticating...", void 0, {
2138
2140
  F: __dxlog_file8,
2139
- L: 104,
2141
+ L: 108,
2140
2142
  S: this,
2141
2143
  C: (f, a) => f(...a)
2142
2144
  });
2143
2145
  invariant7(invitationId, void 0, {
2144
2146
  F: __dxlog_file8,
2145
- L: 105,
2147
+ L: 109,
2146
2148
  S: this,
2147
2149
  A: [
2148
2150
  "invitationId",
@@ -2155,7 +2157,7 @@ var InvitationsServiceImpl = class {
2155
2157
  invitationId
2156
2158
  }, {
2157
2159
  F: __dxlog_file8,
2158
- L: 108,
2160
+ L: 112,
2159
2161
  S: this,
2160
2162
  C: (f, a) => f(...a)
2161
2163
  });
@@ -2166,13 +2168,13 @@ var InvitationsServiceImpl = class {
2166
2168
  async cancelInvitation({ invitationId }) {
2167
2169
  log6("deleting...", void 0, {
2168
2170
  F: __dxlog_file8,
2169
- L: 115,
2171
+ L: 119,
2170
2172
  S: this,
2171
2173
  C: (f, a) => f(...a)
2172
2174
  });
2173
2175
  invariant7(invitationId, void 0, {
2174
2176
  F: __dxlog_file8,
2175
- L: 116,
2177
+ L: 120,
2176
2178
  S: this,
2177
2179
  A: [
2178
2180
  "invitationId",
@@ -2194,7 +2196,7 @@ var InvitationsServiceImpl = class {
2194
2196
  invitationId
2195
2197
  }, {
2196
2198
  F: __dxlog_file8,
2197
- L: 128,
2199
+ L: 132,
2198
2200
  S: this,
2199
2201
  C: (f, a) => f(...a)
2200
2202
  });
@@ -2257,7 +2259,7 @@ import { createAdmissionCredentials, getCredentialAssertion } from "@dxos/creden
2257
2259
  import { writeMessages as writeMessages2 } from "@dxos/feed-store";
2258
2260
  import { invariant as invariant8 } from "@dxos/invariant";
2259
2261
  import { log as log7 } from "@dxos/log";
2260
- import { Invitation as Invitation4 } from "@dxos/protocols/proto/dxos/client/services";
2262
+ import { Invitation as Invitation5 } from "@dxos/protocols/proto/dxos/client/services";
2261
2263
  var __dxlog_file9 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/invitations/space-invitation-protocol.ts";
2262
2264
  var SpaceInvitationProtocol = class {
2263
2265
  constructor(_spaceManager, _signingContext, _keyring, _spaceKey) {
@@ -2274,7 +2276,7 @@ var SpaceInvitationProtocol = class {
2274
2276
  }
2275
2277
  getInvitationContext() {
2276
2278
  return {
2277
- kind: Invitation4.Kind.SPACE,
2279
+ kind: Invitation5.Kind.SPACE,
2278
2280
  spaceKey: this._spaceKey
2279
2281
  };
2280
2282
  }
@@ -2469,7 +2471,7 @@ import { STORAGE_VERSION } from "@dxos/protocols";
2469
2471
  import { SpaceMember } from "@dxos/protocols/proto/dxos/client/services";
2470
2472
 
2471
2473
  // packages/sdk/client-services/src/version.ts
2472
- var DXOS_VERSION = "0.1.58-main.353d0d1";
2474
+ var DXOS_VERSION = "0.1.58-main.44da53d";
2473
2475
 
2474
2476
  // packages/sdk/client-services/src/packlets/services/platform.ts
2475
2477
  var getPlatform = () => {
@@ -2623,9 +2625,9 @@ import { AUTH_TIMEOUT as AUTH_TIMEOUT2 } from "@dxos/client-protocol";
2623
2625
  import { cancelWithContext as cancelWithContext2, Context as Context7 } from "@dxos/context";
2624
2626
  import { timed } from "@dxos/debug";
2625
2627
  import { createMappedFeedWriter } from "@dxos/echo-pipeline";
2626
- import { CancelledError, SystemError } from "@dxos/errors";
2627
2628
  import { PublicKey as PublicKey7 } from "@dxos/keys";
2628
2629
  import { log as log10 } from "@dxos/log";
2630
+ import { CancelledError, SystemError } from "@dxos/protocols";
2629
2631
  import { SpaceState } from "@dxos/protocols/proto/dxos/client/services";
2630
2632
  import { AdmittedFeed as AdmittedFeed3 } from "@dxos/protocols/proto/dxos/halo/credentials";
2631
2633
  import { Timeframe as Timeframe2 } from "@dxos/timeframe";
@@ -2934,7 +2936,7 @@ var DataSpace = class DataSpace2 {
2934
2936
  this._signingContext = params.signingContext;
2935
2937
  this._callbacks = params.callbacks ?? {};
2936
2938
  this.authVerifier = new TrustedKeySetAuthVerifier({
2937
- trustedKeysProvider: () => new ComplexSet2(PublicKey7.hash, Array.from(this._inner.spaceState.members.keys())),
2939
+ trustedKeysProvider: () => new ComplexSet2(PublicKey7.hash, Array.from(this._inner.spaceState.members.values()).filter((member) => !member.removed).map((member) => member.key)),
2938
2940
  update: this._inner.stateUpdate,
2939
2941
  authTimeout: AUTH_TIMEOUT2
2940
2942
  });
@@ -2944,7 +2946,7 @@ var DataSpace = class DataSpace2 {
2944
2946
  state: SpaceState[this._state]
2945
2947
  }, {
2946
2948
  F: __dxlog_file12,
2947
- L: 112,
2949
+ L: 118,
2948
2950
  S: this,
2949
2951
  C: (f, a) => f(...a)
2950
2952
  });
@@ -2978,6 +2980,7 @@ var DataSpace = class DataSpace2 {
2978
2980
  await this._open();
2979
2981
  }
2980
2982
  async _open() {
2983
+ await this._gossip.open();
2981
2984
  await this._notarizationPlugin.open();
2982
2985
  await this._inner.spaceState.addCredentialProcessor(this._notarizationPlugin);
2983
2986
  await this._inner.open(new Context7());
@@ -2986,7 +2989,7 @@ var DataSpace = class DataSpace2 {
2986
2989
  state: SpaceState[this._state]
2987
2990
  }, {
2988
2991
  F: __dxlog_file12,
2989
- L: 158,
2992
+ L: 165,
2990
2993
  S: this,
2991
2994
  C: (f, a) => f(...a)
2992
2995
  });
@@ -3004,7 +3007,7 @@ var DataSpace = class DataSpace2 {
3004
3007
  state: SpaceState[this._state]
3005
3008
  }, {
3006
3009
  F: __dxlog_file12,
3007
- L: 172,
3010
+ L: 179,
3008
3011
  S: this,
3009
3012
  C: (f, a) => f(...a)
3010
3013
  });
@@ -3015,6 +3018,7 @@ var DataSpace = class DataSpace2 {
3015
3018
  await this._inner.spaceState.removeCredentialProcessor(this._notarizationPlugin);
3016
3019
  await this._notarizationPlugin.close();
3017
3020
  await this._presence.destroy();
3021
+ await this._gossip.close();
3018
3022
  }
3019
3023
  async postMessage(channel, message) {
3020
3024
  return this._gossip.postMessage(channel, message);
@@ -3034,7 +3038,7 @@ var DataSpace = class DataSpace2 {
3034
3038
  if (err instanceof CancelledError) {
3035
3039
  log10("data pipeline initialization cancelled", err, {
3036
3040
  F: __dxlog_file12,
3037
- L: 203,
3041
+ L: 211,
3038
3042
  S: this,
3039
3043
  C: (f, a) => f(...a)
3040
3044
  });
@@ -3042,7 +3046,7 @@ var DataSpace = class DataSpace2 {
3042
3046
  }
3043
3047
  log10.error("Error initializing data pipeline", err, {
3044
3048
  F: __dxlog_file12,
3045
- L: 207,
3049
+ L: 215,
3046
3050
  S: this,
3047
3051
  C: (f, a) => f(...a)
3048
3052
  });
@@ -3051,7 +3055,7 @@ var DataSpace = class DataSpace2 {
3051
3055
  state: SpaceState[this._state]
3052
3056
  }, {
3053
3057
  F: __dxlog_file12,
3054
- L: 209,
3058
+ L: 217,
3055
3059
  S: this,
3056
3060
  C: (f, a) => f(...a)
3057
3061
  });
@@ -3071,7 +3075,7 @@ var DataSpace = class DataSpace2 {
3071
3075
  state: SpaceState[this._state]
3072
3076
  }, {
3073
3077
  F: __dxlog_file12,
3074
- L: 225,
3078
+ L: 233,
3075
3079
  S: this,
3076
3080
  C: (f, a) => f(...a)
3077
3081
  });
@@ -3082,7 +3086,7 @@ var DataSpace = class DataSpace2 {
3082
3086
  await cancelWithContext2(this._ctx, this._inner.dataPipeline.ensureEpochInitialized());
3083
3087
  log10("waiting for data pipeline to reach target timeframe", void 0, {
3084
3088
  F: __dxlog_file12,
3085
- L: 239,
3089
+ L: 247,
3086
3090
  S: this,
3087
3091
  C: (f, a) => f(...a)
3088
3092
  });
@@ -3093,7 +3097,7 @@ var DataSpace = class DataSpace2 {
3093
3097
  this.metrics.dataPipelineReady = /* @__PURE__ */ new Date();
3094
3098
  log10("data pipeline ready", void 0, {
3095
3099
  F: __dxlog_file12,
3096
- L: 248,
3100
+ L: 256,
3097
3101
  S: this,
3098
3102
  C: (f, a) => f(...a)
3099
3103
  });
@@ -3103,7 +3107,7 @@ var DataSpace = class DataSpace2 {
3103
3107
  state: SpaceState[this._state]
3104
3108
  }, {
3105
3109
  F: __dxlog_file12,
3106
- L: 252,
3110
+ L: 260,
3107
3111
  S: this,
3108
3112
  C: (f, a) => f(...a)
3109
3113
  });
@@ -3119,7 +3123,7 @@ var DataSpace = class DataSpace2 {
3119
3123
  await this._createWritableFeeds();
3120
3124
  log10("writable feeds created", void 0, {
3121
3125
  F: __dxlog_file12,
3122
- L: 268,
3126
+ L: 276,
3123
3127
  S: this,
3124
3128
  C: (f, a) => f(...a)
3125
3129
  });
@@ -3224,7 +3228,7 @@ var DataSpace = class DataSpace2 {
3224
3228
  state: SpaceState[this._state]
3225
3229
  }, {
3226
3230
  F: __dxlog_file12,
3227
- L: 384,
3231
+ L: 392,
3228
3232
  S: this,
3229
3233
  C: (f, a) => f(...a)
3230
3234
  });
@@ -3678,10 +3682,9 @@ DataSpaceManager = _ts_decorate4([
3678
3682
  import { EventSubscriptions as EventSubscriptions2, UpdateScheduler, scheduleTask as scheduleTask5 } from "@dxos/async";
3679
3683
  import { Stream as Stream10 } from "@dxos/codec-protobuf";
3680
3684
  import { raise as raise2 } from "@dxos/debug";
3681
- import { SpaceNotFoundError } from "@dxos/echo-pipeline";
3682
- import { ApiError } from "@dxos/errors";
3685
+ import { invariant as invariant12 } from "@dxos/invariant";
3683
3686
  import { log as log12 } from "@dxos/log";
3684
- import { encodeError } from "@dxos/protocols";
3687
+ import { ApiError, SpaceNotFoundError, encodeError } from "@dxos/protocols";
3685
3688
  import { SpaceMember as SpaceMember3, SpaceState as SpaceState3 } from "@dxos/protocols/proto/dxos/client/services";
3686
3689
  var __dxlog_file14 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/spaces/spaces-service.ts";
3687
3690
  var SpacesServiceImpl = class {
@@ -3781,8 +3784,8 @@ var SpacesServiceImpl = class {
3781
3784
  });
3782
3785
  });
3783
3786
  }
3784
- queryCredentials({ spaceKey }) {
3785
- return new Stream10(({ ctx, next }) => {
3787
+ queryCredentials({ spaceKey, noTail }) {
3788
+ return new Stream10(({ ctx, next, close }) => {
3786
3789
  const space = this._spaceManager.spaces.get(spaceKey) ?? raise2(new SpaceNotFoundError(spaceKey));
3787
3790
  const processor = {
3788
3791
  processCredential: async (credential) => {
@@ -3790,17 +3793,62 @@ var SpacesServiceImpl = class {
3790
3793
  }
3791
3794
  };
3792
3795
  ctx.onDispose(() => space.spaceState.removeCredentialProcessor(processor));
3793
- scheduleTask5(ctx, () => space.spaceState.addCredentialProcessor(processor));
3796
+ scheduleTask5(ctx, async () => {
3797
+ await space.spaceState.addCredentialProcessor(processor);
3798
+ if (noTail) {
3799
+ close();
3800
+ }
3801
+ });
3794
3802
  });
3795
3803
  }
3796
3804
  async writeCredentials({ spaceKey, credentials }) {
3797
3805
  const space = this._spaceManager.spaces.get(spaceKey) ?? raise2(new SpaceNotFoundError(spaceKey));
3798
3806
  for (const credential of credentials ?? []) {
3799
- await space.controlPipeline.writer.write({
3800
- credential: {
3801
- credential
3802
- }
3803
- });
3807
+ if (credential.proof) {
3808
+ await space.controlPipeline.writer.write({
3809
+ credential: {
3810
+ credential
3811
+ }
3812
+ });
3813
+ } else {
3814
+ invariant12(!credential.id, "Id on unsigned credentials is not allowed", {
3815
+ F: __dxlog_file14,
3816
+ L: 168,
3817
+ S: this,
3818
+ A: [
3819
+ "!credential.id",
3820
+ "'Id on unsigned credentials is not allowed'"
3821
+ ]
3822
+ });
3823
+ invariant12(this._identityManager.identity, "Identity is not available", {
3824
+ F: __dxlog_file14,
3825
+ L: 169,
3826
+ S: this,
3827
+ A: [
3828
+ "this._identityManager.identity",
3829
+ "'Identity is not available'"
3830
+ ]
3831
+ });
3832
+ const signer = this._identityManager.identity.getIdentityCredentialSigner();
3833
+ invariant12(credential.issuer.equals(signer.getIssuer()), void 0, {
3834
+ F: __dxlog_file14,
3835
+ L: 171,
3836
+ S: this,
3837
+ A: [
3838
+ "credential.issuer.equals(signer.getIssuer())",
3839
+ ""
3840
+ ]
3841
+ });
3842
+ const signedCredential = await signer.createCredential({
3843
+ subject: credential.subject.id,
3844
+ assertion: credential.subject.assertion
3845
+ });
3846
+ await space.controlPipeline.writer.write({
3847
+ credential: {
3848
+ credential: signedCredential
3849
+ }
3850
+ });
3851
+ }
3804
3852
  }
3805
3853
  }
3806
3854
  async createEpoch({ spaceKey }) {
@@ -3839,7 +3887,7 @@ var SpacesServiceImpl = class {
3839
3887
  displayName: member.assertion.profile?.displayName
3840
3888
  }
3841
3889
  },
3842
- presence: isMe || peers.length > 0 ? SpaceMember3.PresenceState.ONLINE : SpaceMember3.PresenceState.OFFLINE,
3890
+ presence: member.removed ? SpaceMember3.PresenceState.REMOVED : isMe || peers.length > 0 ? SpaceMember3.PresenceState.ONLINE : SpaceMember3.PresenceState.OFFLINE,
3843
3891
  peerStates: peers
3844
3892
  };
3845
3893
  }),
@@ -3858,12 +3906,12 @@ import { getCredentialAssertion as getCredentialAssertion3 } from "@dxos/credent
3858
3906
  import { failUndefined as failUndefined3 } from "@dxos/debug";
3859
3907
  import { valueEncoding, MetadataStore, SpaceManager, DataServiceSubscriptions, SnapshotStore } from "@dxos/echo-pipeline";
3860
3908
  import { FeedFactory, FeedStore } from "@dxos/feed-store";
3861
- import { invariant as invariant12 } from "@dxos/invariant";
3909
+ import { invariant as invariant13 } from "@dxos/invariant";
3862
3910
  import { Keyring } from "@dxos/keyring";
3863
3911
  import { PublicKey as PublicKey9 } from "@dxos/keys";
3864
3912
  import { log as log13 } from "@dxos/log";
3865
- import { STORAGE_VERSION as STORAGE_VERSION2, trace as trace7 } from "@dxos/protocols";
3866
- import { Invitation as Invitation5 } from "@dxos/protocols/proto/dxos/client/services";
3913
+ import { InvalidStorageVersionError, STORAGE_VERSION as STORAGE_VERSION2, trace as trace7 } from "@dxos/protocols";
3914
+ import { Invitation as Invitation6 } from "@dxos/protocols/proto/dxos/client/services";
3867
3915
  import { BlobStore } from "@dxos/teleport-extension-object-sync";
3868
3916
  import { trace as Trace2 } from "@dxos/tracing";
3869
3917
  import { safeInstanceof } from "@dxos/util";
@@ -3913,7 +3961,7 @@ var ServiceContext = class ServiceContext2 {
3913
3961
  });
3914
3962
  this.identityManager = new IdentityManager(this.metadataStore, this.keyring, this.feedStore, this.spaceManager);
3915
3963
  this.invitations = new InvitationsHandler(this.networkManager);
3916
- this._handlerFactories.set(Invitation5.Kind.DEVICE, () => new DeviceInvitationProtocol(this.keyring, () => this.identityManager.identity ?? failUndefined3(), this._acceptIdentity.bind(this)));
3964
+ this._handlerFactories.set(Invitation6.Kind.DEVICE, () => new DeviceInvitationProtocol(this.keyring, () => this.identityManager.identity ?? failUndefined3(), this._acceptIdentity.bind(this)));
3917
3965
  }
3918
3966
  async open(ctx) {
3919
3967
  await this._checkStorageVersion();
@@ -3986,7 +4034,7 @@ var ServiceContext = class ServiceContext2 {
3986
4034
  }
3987
4035
  getInvitationHandler(invitation) {
3988
4036
  const factory = this._handlerFactories.get(invitation.kind);
3989
- invariant12(factory, `Unknown invitation kind: ${invitation.kind}`, {
4037
+ invariant13(factory, `Unknown invitation kind: ${invitation.kind}`, {
3990
4038
  F: __dxlog_file15,
3991
4039
  L: 174,
3992
4040
  S: this,
@@ -4005,7 +4053,7 @@ var ServiceContext = class ServiceContext2 {
4005
4053
  async _checkStorageVersion() {
4006
4054
  await this.metadataStore.load();
4007
4055
  if (this.metadataStore.version !== STORAGE_VERSION2) {
4008
- throw new Error(`Invalid storage version: current=${this.metadataStore.version}, expected=${STORAGE_VERSION2}`);
4056
+ throw new InvalidStorageVersionError(STORAGE_VERSION2, this.metadataStore.version);
4009
4057
  }
4010
4058
  }
4011
4059
  // Called when identity is created.
@@ -4032,8 +4080,8 @@ var ServiceContext = class ServiceContext2 {
4032
4080
  };
4033
4081
  this.dataSpaceManager = new DataSpaceManager(this.spaceManager, this.metadataStore, this.dataServiceSubscriptions, this.keyring, signingContext, this.feedStore);
4034
4082
  await this.dataSpaceManager.open();
4035
- this._handlerFactories.set(Invitation5.Kind.SPACE, (invitation) => {
4036
- invariant12(this.dataSpaceManager, "dataSpaceManager not initialized yet", {
4083
+ this._handlerFactories.set(Invitation6.Kind.SPACE, (invitation) => {
4084
+ invariant13(this.dataSpaceManager, "dataSpaceManager not initialized yet", {
4037
4085
  F: __dxlog_file15,
4038
4086
  L: 218,
4039
4087
  S: this,
@@ -4239,7 +4287,7 @@ var isLocked = (lockPath) => {
4239
4287
 
4240
4288
  // packages/sdk/client-services/src/packlets/storage/storage.ts
4241
4289
  import { DX_DATA } from "@dxos/client-protocol";
4242
- import { InvalidConfigError } from "@dxos/errors";
4290
+ import { InvalidConfigError } from "@dxos/protocols";
4243
4291
  import { Runtime } from "@dxos/protocols/proto/dxos/config";
4244
4292
  import { createStorage, StorageType } from "@dxos/random-access-storage";
4245
4293
  import { isNode } from "@dxos/util";
@@ -4316,7 +4364,7 @@ import { clientServiceBundle } from "@dxos/client-protocol";
4316
4364
  import { Context as Context10 } from "@dxos/context";
4317
4365
  import { DocumentModel as DocumentModel2 } from "@dxos/document-model";
4318
4366
  import { DataServiceImpl } from "@dxos/echo-pipeline";
4319
- import { invariant as invariant13 } from "@dxos/invariant";
4367
+ import { invariant as invariant14 } from "@dxos/invariant";
4320
4368
  import { PublicKey as PublicKey10 } from "@dxos/keys";
4321
4369
  import { log as log16 } from "@dxos/log";
4322
4370
  import { WebsocketSignalManager } from "@dxos/messaging";
@@ -4673,7 +4721,7 @@ var ClientServicesHost = class ClientServicesHost2 {
4673
4721
  * Can only be called once.
4674
4722
  */
4675
4723
  initialize({ config, ...options }) {
4676
- invariant13(!this._open, "service host is open", {
4724
+ invariant14(!this._open, "service host is open", {
4677
4725
  F: __dxlog_file17,
4678
4726
  L: 184,
4679
4727
  S: this,
@@ -4689,7 +4737,7 @@ var ClientServicesHost = class ClientServicesHost2 {
4689
4737
  C: (f, a) => f(...a)
4690
4738
  });
4691
4739
  if (config) {
4692
- invariant13(!this._config, "config already set", {
4740
+ invariant14(!this._config, "config already set", {
4693
4741
  F: __dxlog_file17,
4694
4742
  L: 188,
4695
4743
  S: this,
@@ -4707,7 +4755,7 @@ var ClientServicesHost = class ClientServicesHost2 {
4707
4755
  iceServers: this._config?.get("runtime.services.ice")
4708
4756
  }), signalManager = new WebsocketSignalManager(this._config?.get("runtime.services.signaling") ?? []) } = options;
4709
4757
  this._signalManager = signalManager;
4710
- invariant13(!this._networkManager, "network manager already set", {
4758
+ invariant14(!this._networkManager, "network manager already set", {
4711
4759
  F: __dxlog_file17,
4712
4760
  L: 204,
4713
4761
  S: this,
@@ -4741,7 +4789,7 @@ var ClientServicesHost = class ClientServicesHost2 {
4741
4789
  S: this,
4742
4790
  C: (f, a) => f(...a)
4743
4791
  });
4744
- invariant13(this._config, "config not set", {
4792
+ invariant14(this._config, "config not set", {
4745
4793
  F: __dxlog_file17,
4746
4794
  L: 224,
4747
4795
  S: this,
@@ -4750,7 +4798,7 @@ var ClientServicesHost = class ClientServicesHost2 {
4750
4798
  "'config not set'"
4751
4799
  ]
4752
4800
  });
4753
- invariant13(this._storage, "storage not set", {
4801
+ invariant14(this._storage, "storage not set", {
4754
4802
  F: __dxlog_file17,
4755
4803
  L: 225,
4756
4804
  S: this,
@@ -4759,7 +4807,7 @@ var ClientServicesHost = class ClientServicesHost2 {
4759
4807
  "'storage not set'"
4760
4808
  ]
4761
4809
  });
4762
- invariant13(this._signalManager, "signal manager not set", {
4810
+ invariant14(this._signalManager, "signal manager not set", {
4763
4811
  F: __dxlog_file17,
4764
4812
  L: 226,
4765
4813
  S: this,
@@ -4768,7 +4816,7 @@ var ClientServicesHost = class ClientServicesHost2 {
4768
4816
  "'signal manager not set'"
4769
4817
  ]
4770
4818
  });
4771
- invariant13(this._networkManager, "network manager not set", {
4819
+ invariant14(this._networkManager, "network manager not set", {
4772
4820
  F: __dxlog_file17,
4773
4821
  L: 227,
4774
4822
  S: this,
@@ -4957,4 +5005,4 @@ export {
4957
5005
  createDefaultModelFactory,
4958
5006
  ClientServicesHost
4959
5007
  };
4960
- //# sourceMappingURL=chunk-FJAPMZDU.mjs.map
5008
+ //# sourceMappingURL=chunk-PSL7MYD4.mjs.map