@dxos/client-services 0.1.58-main.9626f9e → 0.1.58-main.9a149c5

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 (36) hide show
  1. package/dist/lib/browser/{chunk-WQTWAJOX.mjs → chunk-BWEABFZG.mjs} +70 -74
  2. package/dist/lib/browser/chunk-BWEABFZG.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 +110 -113
  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 +111 -115
  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.map +1 -1
  19. package/dist/types/src/packlets/testing/invitation-utils.d.ts +5 -5
  20. package/dist/types/src/packlets/testing/invitation-utils.d.ts.map +1 -1
  21. package/dist/types/src/packlets/vault/shell-runtime.d.ts +1 -1
  22. package/dist/types/src/packlets/vault/shell-runtime.d.ts.map +1 -1
  23. package/dist/types/src/version.d.ts +1 -1
  24. package/package.json +34 -35
  25. package/src/packlets/invitations/invitation-extension.ts +1 -2
  26. package/src/packlets/invitations/invitations-handler.ts +7 -8
  27. package/src/packlets/invitations/invitations-service.ts +5 -5
  28. package/src/packlets/services/service-context.ts +2 -2
  29. package/src/packlets/spaces/data-space.ts +1 -1
  30. package/src/packlets/spaces/spaces-service.ts +3 -4
  31. package/src/packlets/storage/storage.ts +1 -1
  32. package/src/packlets/testing/invitation-utils.ts +9 -9
  33. package/src/packlets/vault/iframe-proxy-runtime.ts +1 -1
  34. package/src/packlets/vault/shell-runtime.ts +4 -4
  35. package/src/version.ts +1 -1
  36. package/dist/lib/browser/chunk-WQTWAJOX.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 () => {
@@ -2473,7 +2471,7 @@ import { STORAGE_VERSION } from "@dxos/protocols";
2473
2471
  import { SpaceMember } from "@dxos/protocols/proto/dxos/client/services";
2474
2472
 
2475
2473
  // packages/sdk/client-services/src/version.ts
2476
- var DXOS_VERSION = "0.1.58-main.9626f9e";
2474
+ var DXOS_VERSION = "0.1.58-main.9a149c5";
2477
2475
 
2478
2476
  // packages/sdk/client-services/src/packlets/services/platform.ts
2479
2477
  var getPlatform = () => {
@@ -2627,9 +2625,9 @@ import { AUTH_TIMEOUT as AUTH_TIMEOUT2 } from "@dxos/client-protocol";
2627
2625
  import { cancelWithContext as cancelWithContext2, Context as Context7 } from "@dxos/context";
2628
2626
  import { timed } from "@dxos/debug";
2629
2627
  import { createMappedFeedWriter } from "@dxos/echo-pipeline";
2630
- import { CancelledError, SystemError } from "@dxos/errors";
2631
2628
  import { PublicKey as PublicKey7 } from "@dxos/keys";
2632
2629
  import { log as log10 } from "@dxos/log";
2630
+ import { CancelledError, SystemError } from "@dxos/protocols";
2633
2631
  import { SpaceState } from "@dxos/protocols/proto/dxos/client/services";
2634
2632
  import { AdmittedFeed as AdmittedFeed3 } from "@dxos/protocols/proto/dxos/halo/credentials";
2635
2633
  import { Timeframe as Timeframe2 } from "@dxos/timeframe";
@@ -3684,11 +3682,9 @@ DataSpaceManager = _ts_decorate4([
3684
3682
  import { EventSubscriptions as EventSubscriptions2, UpdateScheduler, scheduleTask as scheduleTask5 } from "@dxos/async";
3685
3683
  import { Stream as Stream10 } from "@dxos/codec-protobuf";
3686
3684
  import { raise as raise2 } from "@dxos/debug";
3687
- import { SpaceNotFoundError } from "@dxos/echo-pipeline";
3688
- import { ApiError } from "@dxos/errors";
3689
3685
  import { invariant as invariant12 } from "@dxos/invariant";
3690
3686
  import { log as log12 } from "@dxos/log";
3691
- import { encodeError } from "@dxos/protocols";
3687
+ import { ApiError, SpaceNotFoundError, encodeError } from "@dxos/protocols";
3692
3688
  import { SpaceMember as SpaceMember3, SpaceState as SpaceState3 } from "@dxos/protocols/proto/dxos/client/services";
3693
3689
  var __dxlog_file14 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/spaces/spaces-service.ts";
3694
3690
  var SpacesServiceImpl = class {
@@ -3731,7 +3727,7 @@ var SpacesServiceImpl = class {
3731
3727
  spaces
3732
3728
  }, {
3733
3729
  F: __dxlog_file14,
3734
- L: 79,
3730
+ L: 78,
3735
3731
  S: this,
3736
3732
  C: (f, a) => f(...a)
3737
3733
  });
@@ -3751,7 +3747,7 @@ var SpacesServiceImpl = class {
3751
3747
  subscriptions.add(space.stateUpdate.on(ctx, () => scheduler.forceTrigger()));
3752
3748
  subscriptions.add(space.presence.updated.on(ctx, () => scheduler.trigger()));
3753
3749
  subscriptions.add(space.dataPipeline.onNewEpoch.on(ctx, () => scheduler.trigger()));
3754
- space.inner.controlPipeline.state.timeframeUpdate.on(ctx, () => scheduler.trigger());
3750
+ subscriptions.add(space.inner.controlPipeline.state.timeframeUpdate.on(ctx, () => scheduler.trigger()));
3755
3751
  if (space.dataPipeline.pipelineState) {
3756
3752
  subscriptions.add(space.dataPipeline.pipelineState.timeframeUpdate.on(ctx, () => scheduler.trigger()));
3757
3753
  }
@@ -3817,7 +3813,7 @@ var SpacesServiceImpl = class {
3817
3813
  } else {
3818
3814
  invariant12(!credential.id, "Id on unsigned credentials is not allowed", {
3819
3815
  F: __dxlog_file14,
3820
- L: 169,
3816
+ L: 168,
3821
3817
  S: this,
3822
3818
  A: [
3823
3819
  "!credential.id",
@@ -3826,7 +3822,7 @@ var SpacesServiceImpl = class {
3826
3822
  });
3827
3823
  invariant12(this._identityManager.identity, "Identity is not available", {
3828
3824
  F: __dxlog_file14,
3829
- L: 170,
3825
+ L: 169,
3830
3826
  S: this,
3831
3827
  A: [
3832
3828
  "this._identityManager.identity",
@@ -3836,7 +3832,7 @@ var SpacesServiceImpl = class {
3836
3832
  const signer = this._identityManager.identity.getIdentityCredentialSigner();
3837
3833
  invariant12(credential.issuer.equals(signer.getIssuer()), void 0, {
3838
3834
  F: __dxlog_file14,
3839
- L: 172,
3835
+ L: 171,
3840
3836
  S: this,
3841
3837
  A: [
3842
3838
  "credential.issuer.equals(signer.getIssuer())",
@@ -3914,7 +3910,7 @@ import { invariant as invariant13 } from "@dxos/invariant";
3914
3910
  import { Keyring } from "@dxos/keyring";
3915
3911
  import { PublicKey as PublicKey9 } from "@dxos/keys";
3916
3912
  import { log as log13 } from "@dxos/log";
3917
- import { STORAGE_VERSION as STORAGE_VERSION2, trace as trace7 } from "@dxos/protocols";
3913
+ import { InvalidStorageVersionError, STORAGE_VERSION as STORAGE_VERSION2, trace as trace7 } from "@dxos/protocols";
3918
3914
  import { Invitation as Invitation6 } from "@dxos/protocols/proto/dxos/client/services";
3919
3915
  import { BlobStore } from "@dxos/teleport-extension-object-sync";
3920
3916
  import { trace as Trace2 } from "@dxos/tracing";
@@ -4057,7 +4053,7 @@ var ServiceContext = class ServiceContext2 {
4057
4053
  async _checkStorageVersion() {
4058
4054
  await this.metadataStore.load();
4059
4055
  if (this.metadataStore.version !== STORAGE_VERSION2) {
4060
- throw new Error(`Invalid storage version: current=${this.metadataStore.version}, expected=${STORAGE_VERSION2}`);
4056
+ throw new InvalidStorageVersionError(STORAGE_VERSION2, this.metadataStore.version);
4061
4057
  }
4062
4058
  }
4063
4059
  // Called when identity is created.
@@ -4291,7 +4287,7 @@ var isLocked = (lockPath) => {
4291
4287
 
4292
4288
  // packages/sdk/client-services/src/packlets/storage/storage.ts
4293
4289
  import { DX_DATA } from "@dxos/client-protocol";
4294
- import { InvalidConfigError } from "@dxos/errors";
4290
+ import { InvalidConfigError } from "@dxos/protocols";
4295
4291
  import { Runtime } from "@dxos/protocols/proto/dxos/config";
4296
4292
  import { createStorage, StorageType } from "@dxos/random-access-storage";
4297
4293
  import { isNode } from "@dxos/util";
@@ -5009,4 +5005,4 @@ export {
5009
5005
  createDefaultModelFactory,
5010
5006
  ClientServicesHost
5011
5007
  };
5012
- //# sourceMappingURL=chunk-WQTWAJOX.mjs.map
5008
+ //# sourceMappingURL=chunk-BWEABFZG.mjs.map