@dxos/client-services 0.5.9-main.eacfffa → 0.5.9-next.728078d

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.
@@ -85,7 +85,6 @@ var subscribeToFeedBlocks = ({ feedStore }, { feedKey, maxBlocks = 10 }) => {
85
85
  import { Stream as Stream2 } from "@dxos/codec-protobuf";
86
86
  import { Context } from "@dxos/context";
87
87
  import { PublicKey as PublicKey2 } from "@dxos/keys";
88
- var __dxlog_file = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/devtools/network.ts";
89
88
  var subscribeToNetworkStatus = ({ signalManager }) => new Stream2(({ next, close }) => {
90
89
  const update = () => {
91
90
  try {
@@ -101,10 +100,7 @@ var subscribeToNetworkStatus = ({ signalManager }) => new Stream2(({ next, close
101
100
  update();
102
101
  });
103
102
  var subscribeToSignal = ({ signalManager }) => new Stream2(({ next }) => {
104
- const ctx = new Context(void 0, {
105
- F: __dxlog_file,
106
- L: 36
107
- });
103
+ const ctx = new Context();
108
104
  signalManager.onMessage.on(ctx, (message) => {
109
105
  next({
110
106
  message: {
@@ -359,7 +355,7 @@ import { SpaceMember } from "@dxos/protocols/proto/dxos/client/services";
359
355
  import { TRACE_PROCESSOR } from "@dxos/tracing";
360
356
 
361
357
  // packages/sdk/client-services/src/version.ts
362
- var DXOS_VERSION = "0.5.9-main.eacfffa";
358
+ var DXOS_VERSION = "0.5.9-next.728078d";
363
359
 
364
360
  // packages/sdk/client-services/src/packlets/services/platform.ts
365
361
  import { Platform } from "@dxos/protocols/proto/dxos/client/services";
@@ -392,7 +388,7 @@ var getPlatform = () => {
392
388
  };
393
389
 
394
390
  // packages/sdk/client-services/src/packlets/diagnostics/diagnostics.ts
395
- var __dxlog_file2 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/diagnostics/diagnostics.ts";
391
+ var __dxlog_file = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/diagnostics/diagnostics.ts";
396
392
  var DEFAULT_TIMEOUT = 1e3;
397
393
  var createDiagnostics = async (clientServices, serviceContext, config) => {
398
394
  const diagnostics = {
@@ -409,7 +405,7 @@ var createDiagnostics = async (clientServices, serviceContext, config) => {
409
405
  await Promise.all([
410
406
  (async () => {
411
407
  invariant(clientServices.LoggingService, "SystemService is not available.", {
412
- F: __dxlog_file2,
408
+ F: __dxlog_file,
413
409
  L: 110,
414
410
  S: void 0,
415
411
  A: [
@@ -514,7 +510,7 @@ var getStorageDiagnostics = async () => {
514
510
  // packages/sdk/client-services/src/packlets/diagnostics/browser-diagnostics-broadcast.ts
515
511
  import { Trigger } from "@dxos/async";
516
512
  import { log } from "@dxos/log";
517
- var __dxlog_file3 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/diagnostics/browser-diagnostics-broadcast.ts";
513
+ var __dxlog_file2 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/diagnostics/browser-diagnostics-broadcast.ts";
518
514
  var CHANNEL_NAME = "dxos.diagnostics.broadcast";
519
515
  var MessageType;
520
516
  (function(MessageType2) {
@@ -583,7 +579,7 @@ var createCollectDiagnosticsBroadcastHandler = (systemService) => {
583
579
  }
584
580
  } catch (error) {
585
581
  log.catch(error, void 0, {
586
- F: __dxlog_file3,
582
+ F: __dxlog_file2,
587
583
  L: 77,
588
584
  S: void 0,
589
585
  C: (f, a) => f(...a)
@@ -691,7 +687,7 @@ import { Context as Context2 } from "@dxos/context";
691
687
  import { verifyCredential } from "@dxos/credentials";
692
688
  import { log as log2 } from "@dxos/log";
693
689
  import { schema } from "@dxos/protocols";
694
- var __dxlog_file4 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/identity/authenticator.ts";
690
+ var __dxlog_file3 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/identity/authenticator.ts";
695
691
  var Credential = schema.getCodecForType("dxos.halo.credentials.Credential");
696
692
  var createAuthProvider = (signer) => async (nonce) => {
697
693
  const credential = await signer.createCredential({
@@ -706,10 +702,7 @@ var createAuthProvider = (signer) => async (nonce) => {
706
702
  var TrustedKeySetAuthVerifier = class {
707
703
  constructor(_params) {
708
704
  this._params = _params;
709
- this._ctx = new Context2(void 0, {
710
- F: __dxlog_file4,
711
- L: 45
712
- });
705
+ this._ctx = new Context2();
713
706
  }
714
707
  async close() {
715
708
  await this._ctx.dispose();
@@ -720,7 +713,7 @@ var TrustedKeySetAuthVerifier = class {
720
713
  log2("authenticating...", {
721
714
  credential
722
715
  }, {
723
- F: __dxlog_file4,
716
+ F: __dxlog_file3,
724
717
  L: 56,
725
718
  S: this,
726
719
  C: (f, a) => f(...a)
@@ -730,7 +723,7 @@ var TrustedKeySetAuthVerifier = class {
730
723
  log2("Invalid credential", {
731
724
  result
732
725
  }, {
733
- F: __dxlog_file4,
726
+ F: __dxlog_file3,
734
727
  L: 60,
735
728
  S: this,
736
729
  C: (f, a) => f(...a)
@@ -742,7 +735,7 @@ var TrustedKeySetAuthVerifier = class {
742
735
  nonce,
743
736
  credential
744
737
  }, {
745
- F: __dxlog_file4,
738
+ F: __dxlog_file3,
746
739
  L: 65,
747
740
  S: this,
748
741
  C: (f, a) => f(...a)
@@ -753,7 +746,7 @@ var TrustedKeySetAuthVerifier = class {
753
746
  log2("key is not currently in trusted set, waiting...", {
754
747
  key: credential.issuer
755
748
  }, {
756
- F: __dxlog_file4,
749
+ F: __dxlog_file3,
757
750
  L: 70,
758
751
  S: this,
759
752
  C: (f, a) => f(...a)
@@ -769,7 +762,7 @@ var TrustedKeySetAuthVerifier = class {
769
762
  log2("auth success", {
770
763
  key: credential.issuer
771
764
  }, {
772
- F: __dxlog_file4,
765
+ F: __dxlog_file3,
773
766
  L: 81,
774
767
  S: this,
775
768
  C: (f, a) => f(...a)
@@ -779,7 +772,7 @@ var TrustedKeySetAuthVerifier = class {
779
772
  log2("key is not currently in trusted set, waiting...", {
780
773
  key: credential.issuer
781
774
  }, {
782
- F: __dxlog_file4,
775
+ F: __dxlog_file3,
783
776
  L: 84,
784
777
  S: this,
785
778
  C: (f, a) => f(...a)
@@ -820,7 +813,7 @@ import { ComplexSet } from "@dxos/util";
820
813
  import { getCredentialAssertion } from "@dxos/credentials";
821
814
  import { SpaceId } from "@dxos/keys";
822
815
  import { log as log3 } from "@dxos/log";
823
- var __dxlog_file5 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/identity/default-space-state-machine.ts";
816
+ var __dxlog_file4 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/identity/default-space-state-machine.ts";
824
817
  var DefaultSpaceStateMachine = class {
825
818
  constructor(_params) {
826
819
  this._params = _params;
@@ -837,7 +830,7 @@ var DefaultSpaceStateMachine = class {
837
830
  expectedIdentity: this._params.identityKey,
838
831
  credential
839
832
  }, {
840
- F: __dxlog_file5,
833
+ F: __dxlog_file4,
841
834
  L: 32,
842
835
  S: this,
843
836
  C: (f, a) => f(...a)
@@ -848,7 +841,7 @@ var DefaultSpaceStateMachine = class {
848
841
  log3.warn("Invalid default space id", {
849
842
  id: assertion.spaceId
850
843
  }, {
851
- F: __dxlog_file5,
844
+ F: __dxlog_file4,
852
845
  L: 36,
853
846
  S: this,
854
847
  C: (f, a) => f(...a)
@@ -873,7 +866,7 @@ function _ts_decorate2(decorators, target, key, desc) {
873
866
  r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
874
867
  return c > 3 && r && Object.defineProperty(target, key, r), r;
875
868
  }
876
- var __dxlog_file6 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/identity/identity.ts";
869
+ var __dxlog_file5 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/identity/identity.ts";
877
870
  var Identity = class {
878
871
  constructor({ space, signer, identityKey, deviceKey, presence }) {
879
872
  this.stateUpdate = new Event();
@@ -885,7 +878,7 @@ var Identity = class {
885
878
  log4.trace("dxos.halo.device", {
886
879
  deviceKey
887
880
  }, {
888
- F: __dxlog_file6,
881
+ F: __dxlog_file5,
889
882
  L: 70,
890
883
  S: this,
891
884
  C: (f, a) => f(...a)
@@ -964,7 +957,7 @@ var Identity = class {
964
957
  */
965
958
  getIdentityCredentialSigner() {
966
959
  invariant2(this._deviceStateMachine.deviceCredentialChain, "Device credential chain is not ready.", {
967
- F: __dxlog_file6,
960
+ F: __dxlog_file5,
968
961
  L: 159,
969
962
  S: this,
970
963
  A: [
@@ -1008,7 +1001,7 @@ var Identity = class {
1008
1001
  controlFeedKey,
1009
1002
  dataFeedKey
1010
1003
  }, {
1011
- F: __dxlog_file6,
1004
+ F: __dxlog_file5,
1012
1005
  L: 184,
1013
1006
  S: this,
1014
1007
  C: (f, a) => f(...a)
@@ -1085,7 +1078,7 @@ function _ts_decorate3(decorators, target, key, desc) {
1085
1078
  r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
1086
1079
  return c > 3 && r && Object.defineProperty(target, key, r), r;
1087
1080
  }
1088
- var __dxlog_file7 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/identity/identity-manager.ts";
1081
+ var __dxlog_file6 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/identity/identity-manager.ts";
1089
1082
  var DEVICE_PRESENCE_ANNOUNCE_INTERVAL = 1e4;
1090
1083
  var DEVICE_PRESENCE_OFFLINE_TIMEOUT = 2e4;
1091
1084
  var IdentityManager = class {
@@ -1109,7 +1102,7 @@ var IdentityManager = class {
1109
1102
  log5.trace("dxos.halo.identity-manager.open", trace3.begin({
1110
1103
  id: traceId
1111
1104
  }), {
1112
- F: __dxlog_file7,
1105
+ F: __dxlog_file6,
1113
1106
  L: 104,
1114
1107
  S: this,
1115
1108
  C: (f, a) => f(...a)
@@ -1118,7 +1111,7 @@ var IdentityManager = class {
1118
1111
  log5("identity record", {
1119
1112
  identityRecord
1120
1113
  }, {
1121
- F: __dxlog_file7,
1114
+ F: __dxlog_file6,
1122
1115
  L: 107,
1123
1116
  S: this,
1124
1117
  C: (f, a) => f(...a)
@@ -1131,7 +1124,7 @@ var IdentityManager = class {
1131
1124
  identityKey: identityRecord.identityKey,
1132
1125
  displayName: this._identity.profileDocument?.displayName
1133
1126
  }, {
1134
- F: __dxlog_file7,
1127
+ F: __dxlog_file6,
1135
1128
  L: 112,
1136
1129
  S: this,
1137
1130
  C: (f, a) => f(...a)
@@ -1141,21 +1134,18 @@ var IdentityManager = class {
1141
1134
  log5.trace("dxos.halo.identity-manager.open", trace3.end({
1142
1135
  id: traceId
1143
1136
  }), {
1144
- F: __dxlog_file7,
1137
+ F: __dxlog_file6,
1145
1138
  L: 119,
1146
1139
  S: this,
1147
1140
  C: (f, a) => f(...a)
1148
1141
  });
1149
1142
  }
1150
1143
  async close() {
1151
- await this._identity?.close(new Context3(void 0, {
1152
- F: __dxlog_file7,
1153
- L: 123
1154
- }));
1144
+ await this._identity?.close(new Context3());
1155
1145
  }
1156
1146
  async createIdentity({ displayName, deviceProfile } = {}) {
1157
1147
  invariant3(!this._identity, "Identity already exists.", {
1158
- F: __dxlog_file7,
1148
+ F: __dxlog_file6,
1159
1149
  L: 128,
1160
1150
  S: this,
1161
1151
  A: [
@@ -1164,7 +1154,7 @@ var IdentityManager = class {
1164
1154
  ]
1165
1155
  });
1166
1156
  log5("creating identity...", void 0, {
1167
- F: __dxlog_file7,
1157
+ F: __dxlog_file6,
1168
1158
  L: 129,
1169
1159
  S: this,
1170
1160
  C: (f, a) => f(...a)
@@ -1181,14 +1171,11 @@ var IdentityManager = class {
1181
1171
  }
1182
1172
  };
1183
1173
  const identity = await this._constructIdentity(identityRecord);
1184
- await identity.open(new Context3(void 0, {
1185
- F: __dxlog_file7,
1186
- L: 144
1187
- }));
1174
+ await identity.open(new Context3());
1188
1175
  {
1189
1176
  const generator = new CredentialGenerator(this._keyring, identityRecord.identityKey, identityRecord.deviceKey);
1190
1177
  invariant3(identityRecord.haloSpace.genesisFeedKey, "Genesis feed key is required.", {
1191
- F: __dxlog_file7,
1178
+ F: __dxlog_file6,
1192
1179
  L: 148,
1193
1180
  S: this,
1194
1181
  A: [
@@ -1197,7 +1184,7 @@ var IdentityManager = class {
1197
1184
  ]
1198
1185
  });
1199
1186
  invariant3(identityRecord.haloSpace.dataFeedKey, "Data feed key is required.", {
1200
- F: __dxlog_file7,
1187
+ F: __dxlog_file6,
1201
1188
  L: 149,
1202
1189
  S: this,
1203
1190
  A: [
@@ -1236,7 +1223,7 @@ var IdentityManager = class {
1236
1223
  identityKey: identityRecord.identityKey,
1237
1224
  displayName: this._identity.profileDocument?.displayName
1238
1225
  }, {
1239
- F: __dxlog_file7,
1226
+ F: __dxlog_file6,
1240
1227
  L: 191,
1241
1228
  S: this,
1242
1229
  C: (f, a) => f(...a)
@@ -1247,7 +1234,7 @@ var IdentityManager = class {
1247
1234
  deviceKey: identity.deviceKey,
1248
1235
  profile: identity.profileDocument
1249
1236
  }, {
1250
- F: __dxlog_file7,
1237
+ F: __dxlog_file6,
1251
1238
  L: 197,
1252
1239
  S: this,
1253
1240
  C: (f, a) => f(...a)
@@ -1284,13 +1271,13 @@ var IdentityManager = class {
1284
1271
  log5("accepting identity", {
1285
1272
  params
1286
1273
  }, {
1287
- F: __dxlog_file7,
1274
+ F: __dxlog_file6,
1288
1275
  L: 235,
1289
1276
  S: this,
1290
1277
  C: (f, a) => f(...a)
1291
1278
  });
1292
1279
  invariant3(!this._identity, "Identity already exists.", {
1293
- F: __dxlog_file7,
1280
+ F: __dxlog_file6,
1294
1281
  L: 236,
1295
1282
  S: this,
1296
1283
  A: [
@@ -1310,10 +1297,7 @@ var IdentityManager = class {
1310
1297
  }
1311
1298
  };
1312
1299
  const identity = await this._constructIdentity(identityRecord);
1313
- await identity.open(new Context3(void 0, {
1314
- F: __dxlog_file7,
1315
- L: 251
1316
- }));
1300
+ await identity.open(new Context3());
1317
1301
  this._identity = identity;
1318
1302
  await this._metadataStore.setIdentityRecord(identityRecord);
1319
1303
  await this._identity.ready();
@@ -1321,7 +1305,7 @@ var IdentityManager = class {
1321
1305
  identityKey: identityRecord.identityKey,
1322
1306
  displayName: this._identity.profileDocument?.displayName
1323
1307
  }, {
1324
- F: __dxlog_file7,
1308
+ F: __dxlog_file6,
1325
1309
  L: 255,
1326
1310
  S: this,
1327
1311
  C: (f, a) => f(...a)
@@ -1335,7 +1319,7 @@ var IdentityManager = class {
1335
1319
  identityKey: identity.identityKey,
1336
1320
  deviceKey: identity.deviceKey
1337
1321
  }, {
1338
- F: __dxlog_file7,
1322
+ F: __dxlog_file6,
1339
1323
  L: 265,
1340
1324
  S: this,
1341
1325
  C: (f, a) => f(...a)
@@ -1347,7 +1331,7 @@ var IdentityManager = class {
1347
1331
  */
1348
1332
  async updateProfile(profile) {
1349
1333
  invariant3(this._identity, "Identity not initialized.", {
1350
- F: __dxlog_file7,
1334
+ F: __dxlog_file6,
1351
1335
  L: 273,
1352
1336
  S: this,
1353
1337
  A: [
@@ -1378,7 +1362,7 @@ var IdentityManager = class {
1378
1362
  }
1379
1363
  async updateDeviceProfile(profile) {
1380
1364
  invariant3(this._identity, "Identity not initialized.", {
1381
- F: __dxlog_file7,
1365
+ F: __dxlog_file6,
1382
1366
  L: 290,
1383
1367
  S: this,
1384
1368
  A: [
@@ -1414,7 +1398,7 @@ var IdentityManager = class {
1414
1398
  }
1415
1399
  async _constructIdentity(identityRecord) {
1416
1400
  invariant3(!this._identity, void 0, {
1417
- F: __dxlog_file7,
1401
+ F: __dxlog_file6,
1418
1402
  L: 316,
1419
1403
  S: this,
1420
1404
  A: [
@@ -1425,7 +1409,7 @@ var IdentityManager = class {
1425
1409
  log5("constructing identity", {
1426
1410
  identityRecord
1427
1411
  }, {
1428
- F: __dxlog_file7,
1412
+ F: __dxlog_file6,
1429
1413
  L: 317,
1430
1414
  S: this,
1431
1415
  C: (f, a) => f(...a)
@@ -1440,7 +1424,7 @@ var IdentityManager = class {
1440
1424
  gossip
1441
1425
  });
1442
1426
  invariant3(identityRecord.haloSpace.controlFeedKey, void 0, {
1443
- F: __dxlog_file7,
1427
+ F: __dxlog_file6,
1444
1428
  L: 330,
1445
1429
  S: this,
1446
1430
  A: [
@@ -1452,7 +1436,7 @@ var IdentityManager = class {
1452
1436
  writable: true
1453
1437
  });
1454
1438
  invariant3(identityRecord.haloSpace.dataFeedKey, void 0, {
1455
- F: __dxlog_file7,
1439
+ F: __dxlog_file6,
1456
1440
  L: 334,
1457
1441
  S: this,
1458
1442
  A: [
@@ -1486,7 +1470,7 @@ var IdentityManager = class {
1486
1470
  log5("done", {
1487
1471
  identityKey: identityRecord.identityKey
1488
1472
  }, {
1489
- F: __dxlog_file7,
1473
+ F: __dxlog_file6,
1490
1474
  L: 360,
1491
1475
  S: this,
1492
1476
  C: (f, a) => f(...a)
@@ -1511,7 +1495,7 @@ var IdentityManager = class {
1511
1495
  },
1512
1496
  onAuthFailure: () => {
1513
1497
  log5.warn("auth failure", void 0, {
1514
- F: __dxlog_file7,
1498
+ F: __dxlog_file6,
1515
1499
  L: 385,
1516
1500
  S: this,
1517
1501
  C: (f, a) => f(...a)
@@ -1544,7 +1528,7 @@ import { invariant as invariant4 } from "@dxos/invariant";
1544
1528
  import { log as log6 } from "@dxos/log";
1545
1529
  import { SpaceState } from "@dxos/protocols/proto/dxos/client/services";
1546
1530
  import { safeAwaitAll } from "@dxos/util";
1547
- var __dxlog_file8 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/identity/identity-service.ts";
1531
+ var __dxlog_file7 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/identity/identity-service.ts";
1548
1532
  var DEFAULT_SPACE_SEARCH_TIMEOUT = 1e4;
1549
1533
  var IdentityServiceImpl = class extends Resource {
1550
1534
  constructor(_identityManager, _keyring, _dataSpaceManagerProvider, _createIdentity, _onProfileUpdate) {
@@ -1574,7 +1558,7 @@ var IdentityServiceImpl = class extends Resource {
1574
1558
  const space = await dataSpaceManager.createDefaultSpace();
1575
1559
  const identity = this._identityManager.identity;
1576
1560
  invariant4(identity, void 0, {
1577
- F: __dxlog_file8,
1561
+ F: __dxlog_file7,
1578
1562
  L: 59,
1579
1563
  S: this,
1580
1564
  A: [
@@ -1608,7 +1592,7 @@ var IdentityServiceImpl = class extends Resource {
1608
1592
  }
1609
1593
  async updateProfile(profile) {
1610
1594
  invariant4(this._identityManager.identity, "Identity not initialized.", {
1611
- F: __dxlog_file8,
1595
+ F: __dxlog_file7,
1612
1596
  L: 89,
1613
1597
  S: this,
1614
1598
  A: [
@@ -1622,7 +1606,7 @@ var IdentityServiceImpl = class extends Resource {
1622
1606
  }
1623
1607
  async signPresentation({ presentation, nonce }) {
1624
1608
  invariant4(this._identityManager.identity, "Identity not initialized.", {
1625
- F: __dxlog_file8,
1609
+ F: __dxlog_file7,
1626
1610
  L: 96,
1627
1611
  S: this,
1628
1612
  A: [
@@ -1657,7 +1641,7 @@ var IdentityServiceImpl = class extends Resource {
1657
1641
  log6.warn("Multiple default spaces found. Using the first one.", {
1658
1642
  duplicate: space.id
1659
1643
  }, {
1660
- F: __dxlog_file8,
1644
+ F: __dxlog_file7,
1661
1645
  L: 127,
1662
1646
  S: this,
1663
1647
  C: (f, a) => f(...a)
@@ -1685,7 +1669,7 @@ var IdentityServiceImpl = class extends Resource {
1685
1669
  import { invariant as invariant5 } from "@dxos/invariant";
1686
1670
  import { AlreadyJoinedError } from "@dxos/protocols";
1687
1671
  import { Invitation } from "@dxos/protocols/proto/dxos/client/services";
1688
- var __dxlog_file9 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/invitations/device-invitation-protocol.ts";
1672
+ var __dxlog_file8 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/invitations/device-invitation-protocol.ts";
1689
1673
  var DeviceInvitationProtocol = class {
1690
1674
  constructor(_keyring, _getIdentity, _acceptIdentity) {
1691
1675
  this._keyring = _keyring;
@@ -1711,7 +1695,7 @@ var DeviceInvitationProtocol = class {
1711
1695
  }
1712
1696
  async admit(_, request) {
1713
1697
  invariant5(request.device, void 0, {
1714
- F: __dxlog_file9,
1698
+ F: __dxlog_file8,
1715
1699
  L: 50,
1716
1700
  S: this,
1717
1701
  A: [
@@ -1757,7 +1741,7 @@ var DeviceInvitationProtocol = class {
1757
1741
  }
1758
1742
  async accept(response, request) {
1759
1743
  invariant5(response.device, void 0, {
1760
- F: __dxlog_file9,
1744
+ F: __dxlog_file8,
1761
1745
  L: 95,
1762
1746
  S: this,
1763
1747
  A: [
@@ -1767,7 +1751,7 @@ var DeviceInvitationProtocol = class {
1767
1751
  });
1768
1752
  const { identityKey, haloSpaceKey, genesisFeedKey, controlTimeframe } = response.device;
1769
1753
  invariant5(request.device, void 0, {
1770
- F: __dxlog_file9,
1754
+ F: __dxlog_file8,
1771
1755
  L: 98,
1772
1756
  S: this,
1773
1757
  A: [
@@ -1836,7 +1820,7 @@ var tryAcquireBeforeContextDisposed = async (ctx, mutex) => {
1836
1820
  };
1837
1821
 
1838
1822
  // packages/sdk/client-services/src/packlets/invitations/invitation-guest-extenstion.ts
1839
- var __dxlog_file10 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/invitations/invitation-guest-extenstion.ts";
1823
+ var __dxlog_file9 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/invitations/invitation-guest-extenstion.ts";
1840
1824
  var OPTIONS_TIMEOUT = 1e4;
1841
1825
  var InvitationGuestExtension = class extends RpcExtension {
1842
1826
  constructor(_invitationFlowMutex, _callbacks) {
@@ -1850,10 +1834,7 @@ var InvitationGuestExtension = class extends RpcExtension {
1850
1834
  });
1851
1835
  this._invitationFlowMutex = _invitationFlowMutex;
1852
1836
  this._callbacks = _callbacks;
1853
- this._ctx = new Context4(void 0, {
1854
- F: __dxlog_file10,
1855
- L: 33
1856
- });
1837
+ this._ctx = new Context4();
1857
1838
  this._remoteOptionsTrigger = new Trigger4();
1858
1839
  this._invitationFlowLock = null;
1859
1840
  }
@@ -1865,7 +1846,7 @@ var InvitationGuestExtension = class extends RpcExtension {
1865
1846
  InvitationHostService: {
1866
1847
  options: async (options) => {
1867
1848
  invariant6(!this._remoteOptions, "Remote options already set.", {
1868
- F: __dxlog_file10,
1849
+ F: __dxlog_file9,
1869
1850
  L: 63,
1870
1851
  S: this,
1871
1852
  A: [
@@ -1892,14 +1873,14 @@ var InvitationGuestExtension = class extends RpcExtension {
1892
1873
  await super.onOpen(context);
1893
1874
  try {
1894
1875
  log7("guest acquire lock", void 0, {
1895
- F: __dxlog_file10,
1876
+ F: __dxlog_file9,
1896
1877
  L: 84,
1897
1878
  S: this,
1898
1879
  C: (f, a) => f(...a)
1899
1880
  });
1900
1881
  this._invitationFlowLock = await tryAcquireBeforeContextDisposed(this._ctx, this._invitationFlowMutex);
1901
1882
  log7("guest lock acquired", void 0, {
1902
- F: __dxlog_file10,
1883
+ F: __dxlog_file9,
1903
1884
  L: 86,
1904
1885
  S: this,
1905
1886
  C: (f, a) => f(...a)
@@ -1908,7 +1889,7 @@ var InvitationGuestExtension = class extends RpcExtension {
1908
1889
  role: Options.Role.GUEST
1909
1890
  }));
1910
1891
  log7("options sent", void 0, {
1911
- F: __dxlog_file10,
1892
+ F: __dxlog_file9,
1912
1893
  L: 88,
1913
1894
  S: this,
1914
1895
  C: (f, a) => f(...a)
@@ -1917,7 +1898,7 @@ var InvitationGuestExtension = class extends RpcExtension {
1917
1898
  timeout: OPTIONS_TIMEOUT
1918
1899
  }));
1919
1900
  log7("options received", void 0, {
1920
- F: __dxlog_file10,
1901
+ F: __dxlog_file9,
1921
1902
  L: 90,
1922
1903
  S: this,
1923
1904
  C: (f, a) => f(...a)
@@ -1951,7 +1932,7 @@ var InvitationGuestExtension = class extends RpcExtension {
1951
1932
  this._invitationFlowLock.release();
1952
1933
  this._invitationFlowLock = null;
1953
1934
  log7("invitation flow lock released", void 0, {
1954
- F: __dxlog_file10,
1935
+ F: __dxlog_file9,
1955
1936
  L: 123,
1956
1937
  S: this,
1957
1938
  C: (f, a) => f(...a)
@@ -1971,7 +1952,7 @@ import { InvalidInvitationExtensionRoleError as InvalidInvitationExtensionRoleEr
1971
1952
  import { Invitation as Invitation3 } from "@dxos/protocols/proto/dxos/client/services";
1972
1953
  import { AuthenticationResponse, Options as Options2 } from "@dxos/protocols/proto/dxos/halo/invitations";
1973
1954
  import { RpcExtension as RpcExtension2 } from "@dxos/teleport";
1974
- var __dxlog_file11 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/invitations/invitation-host-extension.ts";
1955
+ var __dxlog_file10 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/invitations/invitation-host-extension.ts";
1975
1956
  var OPTIONS_TIMEOUT2 = 1e4;
1976
1957
  var MAX_OTP_ATTEMPTS = 3;
1977
1958
  var InvitationHostExtension = class extends RpcExtension2 {
@@ -1986,10 +1967,7 @@ var InvitationHostExtension = class extends RpcExtension2 {
1986
1967
  });
1987
1968
  this._invitationFlowMutex = _invitationFlowMutex;
1988
1969
  this._callbacks = _callbacks;
1989
- this._ctx = new Context5(void 0, {
1990
- F: __dxlog_file11,
1991
- L: 52
1992
- });
1970
+ this._ctx = new Context5();
1993
1971
  this._remoteOptionsTrigger = new Trigger5();
1994
1972
  this._challenge = void 0;
1995
1973
  this.guestProfile = void 0;
@@ -2008,7 +1986,7 @@ var InvitationHostExtension = class extends RpcExtension2 {
2008
1986
  InvitationHostService: {
2009
1987
  options: async (options) => {
2010
1988
  invariant7(!this._remoteOptions, "Remote options already set.", {
2011
- F: __dxlog_file11,
1989
+ F: __dxlog_file10,
2012
1990
  L: 101,
2013
1991
  S: this,
2014
1992
  A: [
@@ -2025,7 +2003,7 @@ var InvitationHostExtension = class extends RpcExtension2 {
2025
2003
  log8.trace("dxos.sdk.invitation-handler.host.introduce", trace4.begin({
2026
2004
  id: traceId
2027
2005
  }), {
2028
- F: __dxlog_file11,
2006
+ F: __dxlog_file10,
2029
2007
  L: 110,
2030
2008
  S: this,
2031
2009
  C: (f, a) => f(...a)
@@ -2037,7 +2015,7 @@ var InvitationHostExtension = class extends RpcExtension2 {
2037
2015
  expected: invitation.invitationId,
2038
2016
  actual: invitationId
2039
2017
  }, {
2040
- F: __dxlog_file11,
2018
+ F: __dxlog_file10,
2041
2019
  L: 116,
2042
2020
  S: this,
2043
2021
  C: (f, a) => f(...a)
@@ -2051,7 +2029,7 @@ var InvitationHostExtension = class extends RpcExtension2 {
2051
2029
  log8("guest introduced themselves", {
2052
2030
  guestProfile: profile
2053
2031
  }, {
2054
- F: __dxlog_file11,
2032
+ F: __dxlog_file10,
2055
2033
  L: 125,
2056
2034
  S: this,
2057
2035
  C: (f, a) => f(...a)
@@ -2062,7 +2040,7 @@ var InvitationHostExtension = class extends RpcExtension2 {
2062
2040
  log8.trace("dxos.sdk.invitation-handler.host.introduce", trace4.end({
2063
2041
  id: traceId
2064
2042
  }), {
2065
- F: __dxlog_file11,
2043
+ F: __dxlog_file10,
2066
2044
  L: 132,
2067
2045
  S: this,
2068
2046
  C: (f, a) => f(...a)
@@ -2077,7 +2055,7 @@ var InvitationHostExtension = class extends RpcExtension2 {
2077
2055
  log8.trace("dxos.sdk.invitation-handler.host.authenticate", trace4.begin({
2078
2056
  id: traceId
2079
2057
  }), {
2080
- F: __dxlog_file11,
2058
+ F: __dxlog_file10,
2081
2059
  L: 141,
2082
2060
  S: this,
2083
2061
  C: (f, a) => f(...a)
@@ -2086,7 +2064,7 @@ var InvitationHostExtension = class extends RpcExtension2 {
2086
2064
  log8("received authentication request", {
2087
2065
  authCode: code
2088
2066
  }, {
2089
- F: __dxlog_file11,
2067
+ F: __dxlog_file10,
2090
2068
  L: 144,
2091
2069
  S: this,
2092
2070
  C: (f, a) => f(...a)
@@ -2100,7 +2078,7 @@ var InvitationHostExtension = class extends RpcExtension2 {
2100
2078
  switch (invitation.authMethod) {
2101
2079
  case Invitation3.AuthMethod.NONE: {
2102
2080
  log8("authentication not required", void 0, {
2103
- F: __dxlog_file11,
2081
+ F: __dxlog_file10,
2104
2082
  L: 152,
2105
2083
  S: this,
2106
2084
  C: (f, a) => f(...a)
@@ -2138,7 +2116,7 @@ var InvitationHostExtension = class extends RpcExtension2 {
2138
2116
  log8.error("invalid authentication method", {
2139
2117
  authMethod: invitation.authMethod
2140
2118
  }, {
2141
- F: __dxlog_file11,
2119
+ F: __dxlog_file10,
2142
2120
  L: 190,
2143
2121
  S: this,
2144
2122
  C: (f, a) => f(...a)
@@ -2163,7 +2141,7 @@ var InvitationHostExtension = class extends RpcExtension2 {
2163
2141
  status
2164
2142
  }
2165
2143
  }), {
2166
- F: __dxlog_file11,
2144
+ F: __dxlog_file10,
2167
2145
  L: 202,
2168
2146
  S: this,
2169
2147
  C: (f, a) => f(...a)
@@ -2177,7 +2155,7 @@ var InvitationHostExtension = class extends RpcExtension2 {
2177
2155
  log8.trace("dxos.sdk.invitation-handler.host.admit", trace4.begin({
2178
2156
  id: traceId
2179
2157
  }), {
2180
- F: __dxlog_file11,
2158
+ F: __dxlog_file10,
2181
2159
  L: 208,
2182
2160
  S: this,
2183
2161
  C: (f, a) => f(...a)
@@ -2194,7 +2172,7 @@ var InvitationHostExtension = class extends RpcExtension2 {
2194
2172
  log8.trace("dxos.sdk.invitation-handler.host.admit", trace4.end({
2195
2173
  id: traceId
2196
2174
  }), {
2197
- F: __dxlog_file11,
2175
+ F: __dxlog_file10,
2198
2176
  L: 222,
2199
2177
  S: this,
2200
2178
  C: (f, a) => f(...a)
@@ -2212,14 +2190,14 @@ var InvitationHostExtension = class extends RpcExtension2 {
2212
2190
  await super.onOpen(context);
2213
2191
  try {
2214
2192
  log8("host acquire lock", void 0, {
2215
- F: __dxlog_file11,
2193
+ F: __dxlog_file10,
2216
2194
  L: 237,
2217
2195
  S: this,
2218
2196
  C: (f, a) => f(...a)
2219
2197
  });
2220
2198
  this._invitationFlowLock = await tryAcquireBeforeContextDisposed(this._ctx, this._invitationFlowMutex);
2221
2199
  log8("host lock acquired", void 0, {
2222
- F: __dxlog_file11,
2200
+ F: __dxlog_file10,
2223
2201
  L: 239,
2224
2202
  S: this,
2225
2203
  C: (f, a) => f(...a)
@@ -2230,7 +2208,7 @@ var InvitationHostExtension = class extends RpcExtension2 {
2230
2208
  role: Options2.Role.HOST
2231
2209
  });
2232
2210
  log8("options sent", void 0, {
2233
- F: __dxlog_file11,
2211
+ F: __dxlog_file10,
2234
2212
  L: 243,
2235
2213
  S: this,
2236
2214
  C: (f, a) => f(...a)
@@ -2239,7 +2217,7 @@ var InvitationHostExtension = class extends RpcExtension2 {
2239
2217
  timeout: OPTIONS_TIMEOUT2
2240
2218
  }));
2241
2219
  log8("options received", void 0, {
2242
- F: __dxlog_file11,
2220
+ F: __dxlog_file10,
2243
2221
  L: 245,
2244
2222
  S: this,
2245
2223
  C: (f, a) => f(...a)
@@ -2293,7 +2271,7 @@ var InvitationHostExtension = class extends RpcExtension2 {
2293
2271
  this._invitationFlowLock?.release();
2294
2272
  this._invitationFlowLock = null;
2295
2273
  log8("invitation flow lock released", void 0, {
2296
- F: __dxlog_file11,
2274
+ F: __dxlog_file10,
2297
2275
  L: 300,
2298
2276
  S: this,
2299
2277
  C: (f, a) => f(...a)
@@ -2309,7 +2287,7 @@ import { PublicKey as PublicKey6 } from "@dxos/keys";
2309
2287
  import { log as log9 } from "@dxos/log";
2310
2288
  import { Options as Options3 } from "@dxos/protocols/proto/dxos/halo/invitations";
2311
2289
  import { ComplexSet as ComplexSet2 } from "@dxos/util";
2312
- var __dxlog_file12 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/invitations/invitation-topology.ts";
2290
+ var __dxlog_file11 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/invitations/invitation-topology.ts";
2313
2291
  var InvitationTopology = class {
2314
2292
  constructor(_role) {
2315
2293
  this._role = _role;
@@ -2317,7 +2295,7 @@ var InvitationTopology = class {
2317
2295
  }
2318
2296
  init(controller) {
2319
2297
  invariant8(!this._controller, "Already initialized.", {
2320
- F: __dxlog_file12,
2298
+ F: __dxlog_file11,
2321
2299
  L: 42,
2322
2300
  S: this,
2323
2301
  A: [
@@ -2329,7 +2307,7 @@ var InvitationTopology = class {
2329
2307
  }
2330
2308
  update() {
2331
2309
  invariant8(this._controller, "Not initialized.", {
2332
- F: __dxlog_file12,
2310
+ F: __dxlog_file11,
2333
2311
  L: 47,
2334
2312
  S: this,
2335
2313
  A: [
@@ -2352,7 +2330,7 @@ var InvitationTopology = class {
2352
2330
  ownPeerId,
2353
2331
  remotePeerId: firstUnknownPeer
2354
2332
  }, {
2355
- F: __dxlog_file12,
2333
+ F: __dxlog_file11,
2356
2334
  L: 69,
2357
2335
  S: this,
2358
2336
  C: (f, a) => f(...a)
@@ -2363,7 +2341,7 @@ var InvitationTopology = class {
2363
2341
  }
2364
2342
  async onOffer(peer) {
2365
2343
  invariant8(this._controller, "Not initialized.", {
2366
- F: __dxlog_file12,
2344
+ F: __dxlog_file11,
2367
2345
  L: 76,
2368
2346
  S: this,
2369
2347
  A: [
@@ -2382,7 +2360,7 @@ var InvitationTopology = class {
2382
2360
  };
2383
2361
 
2384
2362
  // packages/sdk/client-services/src/packlets/invitations/invitations-handler.ts
2385
- var __dxlog_file13 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/invitations/invitations-handler.ts";
2363
+ var __dxlog_file12 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/invitations/invitations-handler.ts";
2386
2364
  var MAX_DELEGATED_INVITATION_HOST_TRIES = 3;
2387
2365
  var InvitationsHandler = class {
2388
2366
  /**
@@ -2407,7 +2385,7 @@ var InvitationsHandler = class {
2407
2385
  try {
2408
2386
  const deviceKey = admissionRequest.device?.deviceKey ?? admissionRequest.space?.deviceKey;
2409
2387
  invariant9(deviceKey, void 0, {
2410
- F: __dxlog_file13,
2388
+ F: __dxlog_file12,
2411
2389
  L: 90,
2412
2390
  S: this,
2413
2391
  A: [
@@ -2436,7 +2414,7 @@ var InvitationsHandler = class {
2436
2414
  log10.trace("dxos.sdk.invitations-handler.host.onOpen", trace5.begin({
2437
2415
  id: traceId
2438
2416
  }), {
2439
- F: __dxlog_file13,
2417
+ F: __dxlog_file12,
2440
2418
  L: 115,
2441
2419
  S: this,
2442
2420
  C: (f, a) => f(...a)
@@ -2444,7 +2422,7 @@ var InvitationsHandler = class {
2444
2422
  log10("connected", {
2445
2423
  ...protocol.toJSON()
2446
2424
  }, {
2447
- F: __dxlog_file13,
2425
+ F: __dxlog_file12,
2448
2426
  L: 116,
2449
2427
  S: this,
2450
2428
  C: (f, a) => f(...a)
@@ -2456,7 +2434,7 @@ var InvitationsHandler = class {
2456
2434
  guest: deviceKey,
2457
2435
  ...protocol.toJSON()
2458
2436
  }, {
2459
- F: __dxlog_file13,
2437
+ F: __dxlog_file12,
2460
2438
  L: 118,
2461
2439
  S: this,
2462
2440
  C: (f, a) => f(...a)
@@ -2465,7 +2443,7 @@ var InvitationsHandler = class {
2465
2443
  log10.trace("dxos.sdk.invitations-handler.host.onOpen", trace5.end({
2466
2444
  id: traceId
2467
2445
  }), {
2468
- F: __dxlog_file13,
2446
+ F: __dxlog_file12,
2469
2447
  L: 120,
2470
2448
  S: this,
2471
2449
  C: (f, a) => f(...a)
@@ -2480,7 +2458,7 @@ var InvitationsHandler = class {
2480
2458
  log10("timeout", {
2481
2459
  ...protocol.toJSON()
2482
2460
  }, {
2483
- F: __dxlog_file13,
2461
+ F: __dxlog_file12,
2484
2462
  L: 129,
2485
2463
  S: this,
2486
2464
  C: (f, a) => f(...a)
@@ -2489,7 +2467,7 @@ var InvitationsHandler = class {
2489
2467
  } else {
2490
2468
  if (guardedState.error(extension, err)) {
2491
2469
  log10.error("failed", err, {
2492
- F: __dxlog_file13,
2470
+ F: __dxlog_file12,
2493
2471
  L: 133,
2494
2472
  S: this,
2495
2473
  C: (f, a) => f(...a)
@@ -2500,7 +2478,7 @@ var InvitationsHandler = class {
2500
2478
  id: traceId,
2501
2479
  error: err
2502
2480
  }), {
2503
- F: __dxlog_file13,
2481
+ F: __dxlog_file12,
2504
2482
  L: 136,
2505
2483
  S: this,
2506
2484
  C: (f, a) => f(...a)
@@ -2514,7 +2492,7 @@ var InvitationsHandler = class {
2514
2492
  log10("invalid role", {
2515
2493
  ...err.context
2516
2494
  }, {
2517
- F: __dxlog_file13,
2495
+ F: __dxlog_file12,
2518
2496
  L: 144,
2519
2497
  S: this,
2520
2498
  C: (f, a) => f(...a)
@@ -2526,7 +2504,7 @@ var InvitationsHandler = class {
2526
2504
  log10("timeout", {
2527
2505
  err
2528
2506
  }, {
2529
- F: __dxlog_file13,
2507
+ F: __dxlog_file12,
2530
2508
  L: 149,
2531
2509
  S: this,
2532
2510
  C: (f, a) => f(...a)
@@ -2535,7 +2513,7 @@ var InvitationsHandler = class {
2535
2513
  } else {
2536
2514
  if (guardedState.error(extension, err)) {
2537
2515
  log10.error("failed", err, {
2538
- F: __dxlog_file13,
2516
+ F: __dxlog_file12,
2539
2517
  L: 153,
2540
2518
  S: this,
2541
2519
  C: (f, a) => f(...a)
@@ -2549,7 +2527,7 @@ var InvitationsHandler = class {
2549
2527
  if (invitation.lifetime && invitation.created) {
2550
2528
  if (invitation.created.getTime() + invitation.lifetime * 1e3 < Date.now()) {
2551
2529
  log10.warn("invitation has already expired", void 0, {
2552
- F: __dxlog_file13,
2530
+ F: __dxlog_file12,
2553
2531
  L: 164,
2554
2532
  S: this,
2555
2533
  C: (f, a) => f(...a)
@@ -2572,7 +2550,7 @@ var InvitationsHandler = class {
2572
2550
  const { timeout = INVITATION_TIMEOUT } = invitation;
2573
2551
  if (deviceProfile) {
2574
2552
  invariant9(invitation.kind === Invitation4.Kind.DEVICE, "deviceProfile provided for non-device invitation", {
2575
- F: __dxlog_file13,
2553
+ F: __dxlog_file12,
2576
2554
  L: 197,
2577
2555
  S: this,
2578
2556
  A: [
@@ -2590,7 +2568,7 @@ var InvitationsHandler = class {
2590
2568
  invitationType: Invitation4.Type.DELEGATED,
2591
2569
  triedPeers: triedPeersIds.size
2592
2570
  }, {
2593
- F: __dxlog_file13,
2571
+ F: __dxlog_file12,
2594
2572
  L: 205,
2595
2573
  S: this,
2596
2574
  C: (f, a) => f(...a)
@@ -2617,7 +2595,7 @@ var InvitationsHandler = class {
2617
2595
  admitted,
2618
2596
  currentState: guardedState.current.state
2619
2597
  }, {
2620
- F: __dxlog_file13,
2598
+ F: __dxlog_file12,
2621
2599
  L: 233,
2622
2600
  S: this,
2623
2601
  C: (f, a) => f(...a)
@@ -2635,7 +2613,7 @@ var InvitationsHandler = class {
2635
2613
  log10.trace("dxos.sdk.invitations-handler.guest.onOpen", trace5.begin({
2636
2614
  id: traceId
2637
2615
  }), {
2638
- F: __dxlog_file13,
2616
+ F: __dxlog_file12,
2639
2617
  L: 245,
2640
2618
  S: this,
2641
2619
  C: (f, a) => f(...a)
@@ -2647,7 +2625,7 @@ var InvitationsHandler = class {
2647
2625
  log10("connected", {
2648
2626
  ...protocol.toJSON()
2649
2627
  }, {
2650
- F: __dxlog_file13,
2628
+ F: __dxlog_file12,
2651
2629
  L: 256,
2652
2630
  S: this,
2653
2631
  C: (f, a) => f(...a)
@@ -2656,7 +2634,7 @@ var InvitationsHandler = class {
2656
2634
  log10("introduce", {
2657
2635
  ...protocol.toJSON()
2658
2636
  }, {
2659
- F: __dxlog_file13,
2637
+ F: __dxlog_file12,
2660
2638
  L: 260,
2661
2639
  S: this,
2662
2640
  C: (f, a) => f(...a)
@@ -2669,7 +2647,7 @@ var InvitationsHandler = class {
2669
2647
  ...protocol.toJSON(),
2670
2648
  response: introductionResponse
2671
2649
  }, {
2672
- F: __dxlog_file13,
2650
+ F: __dxlog_file12,
2673
2651
  L: 265,
2674
2652
  S: this,
2675
2653
  C: (f, a) => f(...a)
@@ -2690,7 +2668,7 @@ var InvitationsHandler = class {
2690
2668
  log10("request admission", {
2691
2669
  ...protocol.toJSON()
2692
2670
  }, {
2693
- F: __dxlog_file13,
2671
+ F: __dxlog_file12,
2694
2672
  L: 291,
2695
2673
  S: this,
2696
2674
  C: (f, a) => f(...a)
@@ -2702,7 +2680,7 @@ var InvitationsHandler = class {
2702
2680
  log10("admitted by host", {
2703
2681
  ...protocol.toJSON()
2704
2682
  }, {
2705
- F: __dxlog_file13,
2683
+ F: __dxlog_file12,
2706
2684
  L: 302,
2707
2685
  S: this,
2708
2686
  C: (f, a) => f(...a)
@@ -2715,7 +2693,7 @@ var InvitationsHandler = class {
2715
2693
  log10.trace("dxos.sdk.invitations-handler.guest.onOpen", trace5.end({
2716
2694
  id: traceId
2717
2695
  }), {
2718
- F: __dxlog_file13,
2696
+ F: __dxlog_file12,
2719
2697
  L: 308,
2720
2698
  S: this,
2721
2699
  C: (f, a) => f(...a)
@@ -2725,7 +2703,7 @@ var InvitationsHandler = class {
2725
2703
  log10("timeout", {
2726
2704
  ...protocol.toJSON()
2727
2705
  }, {
2728
- F: __dxlog_file13,
2706
+ F: __dxlog_file12,
2729
2707
  L: 311,
2730
2708
  S: this,
2731
2709
  C: (f, a) => f(...a)
@@ -2733,7 +2711,7 @@ var InvitationsHandler = class {
2733
2711
  guardedState.set(extension, Invitation4.State.TIMEOUT);
2734
2712
  } else {
2735
2713
  log10("auth failed", err, {
2736
- F: __dxlog_file13,
2714
+ F: __dxlog_file12,
2737
2715
  L: 314,
2738
2716
  S: this,
2739
2717
  C: (f, a) => f(...a)
@@ -2745,7 +2723,7 @@ var InvitationsHandler = class {
2745
2723
  id: traceId,
2746
2724
  error: err
2747
2725
  }), {
2748
- F: __dxlog_file13,
2726
+ F: __dxlog_file12,
2749
2727
  L: 318,
2750
2728
  S: this,
2751
2729
  C: (f, a) => f(...a)
@@ -2761,7 +2739,7 @@ var InvitationsHandler = class {
2761
2739
  log10("timeout", {
2762
2740
  ...protocol.toJSON()
2763
2741
  }, {
2764
- F: __dxlog_file13,
2742
+ F: __dxlog_file12,
2765
2743
  L: 327,
2766
2744
  S: this,
2767
2745
  C: (f, a) => f(...a)
@@ -2769,7 +2747,7 @@ var InvitationsHandler = class {
2769
2747
  guardedState.set(extension, Invitation4.State.TIMEOUT);
2770
2748
  } else {
2771
2749
  log10("auth failed", err, {
2772
- F: __dxlog_file13,
2750
+ F: __dxlog_file12,
2773
2751
  L: 330,
2774
2752
  S: this,
2775
2753
  C: (f, a) => f(...a)
@@ -2787,7 +2765,7 @@ var InvitationsHandler = class {
2787
2765
  await ctx.dispose();
2788
2766
  } else {
2789
2767
  invariant9(invitation.swarmKey, void 0, {
2790
- F: __dxlog_file13,
2768
+ F: __dxlog_file12,
2791
2769
  L: 345,
2792
2770
  S: this,
2793
2771
  A: [
@@ -2881,29 +2859,16 @@ var InvitationsHandler = class {
2881
2859
  };
2882
2860
  }
2883
2861
  _logStateUpdate(invitation, actor, newState) {
2884
- if (this._isNotTerminal(newState)) {
2885
- log10("invitation state update", {
2886
- actor: actor?.constructor.name,
2887
- newState: stateToString(newState),
2888
- oldState: stateToString(invitation.state)
2889
- }, {
2890
- F: __dxlog_file13,
2891
- L: 439,
2892
- S: this,
2893
- C: (f, a) => f(...a)
2894
- });
2895
- } else {
2896
- log10.info("invitation state update", {
2897
- actor: actor?.constructor.name,
2898
- newState: stateToString(newState),
2899
- oldState: stateToString(invitation.state)
2900
- }, {
2901
- F: __dxlog_file13,
2902
- L: 445,
2903
- S: this,
2904
- C: (f, a) => f(...a)
2905
- });
2906
- }
2862
+ log10("invitation state update", {
2863
+ actor: actor?.constructor.name,
2864
+ newState: stateToString(newState),
2865
+ oldState: stateToString(invitation.state)
2866
+ }, {
2867
+ F: __dxlog_file12,
2868
+ L: 438,
2869
+ S: this,
2870
+ C: (f, a) => f(...a)
2871
+ });
2907
2872
  }
2908
2873
  _isNotTerminal(currentState) {
2909
2874
  return ![
@@ -2917,16 +2882,16 @@ var InvitationsHandler = class {
2917
2882
  async _handleGuestOtpAuth(extension, setState, authenticated, options) {
2918
2883
  for (let attempt = 1; attempt <= MAX_OTP_ATTEMPTS; attempt++) {
2919
2884
  log10("guest waiting for authentication code...", void 0, {
2920
- F: __dxlog_file13,
2921
- L: 470,
2885
+ F: __dxlog_file12,
2886
+ L: 462,
2922
2887
  S: this,
2923
2888
  C: (f, a) => f(...a)
2924
2889
  });
2925
2890
  setState(Invitation4.State.READY_FOR_AUTHENTICATION);
2926
2891
  const authCode = await authenticated.wait(options);
2927
2892
  log10("sending authentication request", void 0, {
2928
- F: __dxlog_file13,
2929
- L: 474,
2893
+ F: __dxlog_file12,
2894
+ L: 466,
2930
2895
  S: this,
2931
2896
  C: (f, a) => f(...a)
2932
2897
  });
@@ -2944,8 +2909,8 @@ var InvitationsHandler = class {
2944
2909
  log10("retrying invalid code", {
2945
2910
  attempt
2946
2911
  }, {
2947
- F: __dxlog_file13,
2948
- L: 485,
2912
+ F: __dxlog_file12,
2913
+ L: 477,
2949
2914
  S: this,
2950
2915
  C: (f, a) => f(...a)
2951
2916
  });
@@ -2962,8 +2927,8 @@ var InvitationsHandler = class {
2962
2927
  throw new Error("challenge missing in the introduction");
2963
2928
  }
2964
2929
  log10("sending authentication request", void 0, {
2965
- F: __dxlog_file13,
2966
- L: 504,
2930
+ F: __dxlog_file12,
2931
+ L: 496,
2967
2932
  S: this,
2968
2933
  C: (f, a) => f(...a)
2969
2934
  });
@@ -3090,7 +3055,7 @@ import { log as log11 } from "@dxos/log";
3090
3055
  import { AlreadyJoinedError as AlreadyJoinedError2, AuthorizationError, InvalidInvitationError, SpaceNotFoundError } from "@dxos/protocols";
3091
3056
  import { Invitation as Invitation5 } from "@dxos/protocols/proto/dxos/client/services";
3092
3057
  import { SpaceMember as SpaceMember2 } from "@dxos/protocols/proto/dxos/halo/credentials";
3093
- var __dxlog_file14 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/invitations/space-invitation-protocol.ts";
3058
+ var __dxlog_file13 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/invitations/space-invitation-protocol.ts";
3094
3059
  var SpaceInvitationProtocol = class {
3095
3060
  constructor(_spaceManager, _signingContext, _keyring, _spaceKey) {
3096
3061
  this._spaceManager = _spaceManager;
@@ -3125,7 +3090,7 @@ var SpaceInvitationProtocol = class {
3125
3090
  }
3126
3091
  async admit(invitation, request, guestProfile) {
3127
3092
  invariant10(this._spaceKey, void 0, {
3128
- F: __dxlog_file14,
3093
+ F: __dxlog_file13,
3129
3094
  L: 76,
3130
3095
  S: this,
3131
3096
  A: [
@@ -3135,7 +3100,7 @@ var SpaceInvitationProtocol = class {
3135
3100
  });
3136
3101
  const space = this._spaceManager.spaces.get(this._spaceKey);
3137
3102
  invariant10(space, void 0, {
3138
- F: __dxlog_file14,
3103
+ F: __dxlog_file13,
3139
3104
  L: 78,
3140
3105
  S: this,
3141
3106
  A: [
@@ -3144,7 +3109,7 @@ var SpaceInvitationProtocol = class {
3144
3109
  ]
3145
3110
  });
3146
3111
  invariant10(request.space, void 0, {
3147
- F: __dxlog_file14,
3112
+ F: __dxlog_file13,
3148
3113
  L: 80,
3149
3114
  S: this,
3150
3115
  A: [
@@ -3160,14 +3125,14 @@ var SpaceInvitationProtocol = class {
3160
3125
  host: this._signingContext.deviceKey,
3161
3126
  guest: deviceKey
3162
3127
  }, {
3163
- F: __dxlog_file14,
3128
+ F: __dxlog_file13,
3164
3129
  L: 87,
3165
3130
  S: this,
3166
3131
  C: (f, a) => f(...a)
3167
3132
  });
3168
3133
  const credentials = await createAdmissionCredentials(this._signingContext.credentialSigner, identityKey, space.key, space.inner.genesisFeedKey, invitation.role ?? SpaceMember2.Role.ADMIN, space.inner.spaceState.membershipChainHeads, guestProfile, invitation.delegationCredentialId);
3169
3134
  invariant10(credentials[0].credential, void 0, {
3170
- F: __dxlog_file14,
3135
+ F: __dxlog_file13,
3171
3136
  L: 101,
3172
3137
  S: this,
3173
3138
  A: [
@@ -3177,7 +3142,7 @@ var SpaceInvitationProtocol = class {
3177
3142
  });
3178
3143
  const spaceMemberCredential = credentials[0].credential.credential;
3179
3144
  invariant10(getCredentialAssertion2(spaceMemberCredential)["@type"] === "dxos.halo.credentials.SpaceMember", void 0, {
3180
- F: __dxlog_file14,
3145
+ F: __dxlog_file13,
3181
3146
  L: 103,
3182
3147
  S: this,
3183
3148
  A: [
@@ -3195,7 +3160,7 @@ var SpaceInvitationProtocol = class {
3195
3160
  }
3196
3161
  async delegate(invitation) {
3197
3162
  invariant10(this._spaceKey, void 0, {
3198
- F: __dxlog_file14,
3163
+ F: __dxlog_file13,
3199
3164
  L: 116,
3200
3165
  S: this,
3201
3166
  A: [
@@ -3205,7 +3170,7 @@ var SpaceInvitationProtocol = class {
3205
3170
  });
3206
3171
  const space = this._spaceManager.spaces.get(this._spaceKey);
3207
3172
  invariant10(space, void 0, {
3208
- F: __dxlog_file14,
3173
+ F: __dxlog_file13,
3209
3174
  L: 118,
3210
3175
  S: this,
3211
3176
  A: [
@@ -3215,7 +3180,7 @@ var SpaceInvitationProtocol = class {
3215
3180
  });
3216
3181
  if (invitation.authMethod === Invitation5.AuthMethod.KNOWN_PUBLIC_KEY) {
3217
3182
  invariant10(invitation.guestKeypair?.publicKey, void 0, {
3218
- F: __dxlog_file14,
3183
+ F: __dxlog_file13,
3219
3184
  L: 120,
3220
3185
  S: this,
3221
3186
  A: [
@@ -3228,7 +3193,7 @@ var SpaceInvitationProtocol = class {
3228
3193
  host: this._signingContext.deviceKey,
3229
3194
  id: invitation.invitationId
3230
3195
  }, {
3231
- F: __dxlog_file14,
3196
+ F: __dxlog_file13,
3232
3197
  L: 123,
3233
3198
  S: this,
3234
3199
  C: (f, a) => f(...a)
@@ -3243,7 +3208,7 @@ var SpaceInvitationProtocol = class {
3243
3208
  guestKey: invitation.authMethod === Invitation5.AuthMethod.KNOWN_PUBLIC_KEY ? invitation.guestKeypair.publicKey : void 0
3244
3209
  });
3245
3210
  invariant10(credential.credential, void 0, {
3246
- F: __dxlog_file14,
3211
+ F: __dxlog_file13,
3247
3212
  L: 143,
3248
3213
  S: this,
3249
3214
  A: [
@@ -3258,7 +3223,7 @@ var SpaceInvitationProtocol = class {
3258
3223
  }
3259
3224
  async cancelDelegation(invitation) {
3260
3225
  invariant10(this._spaceKey, void 0, {
3261
- F: __dxlog_file14,
3226
+ F: __dxlog_file13,
3262
3227
  L: 149,
3263
3228
  S: this,
3264
3229
  A: [
@@ -3267,7 +3232,7 @@ var SpaceInvitationProtocol = class {
3267
3232
  ]
3268
3233
  });
3269
3234
  invariant10(invitation.type === Invitation5.Type.DELEGATED && invitation.delegationCredentialId, void 0, {
3270
- F: __dxlog_file14,
3235
+ F: __dxlog_file13,
3271
3236
  L: 150,
3272
3237
  S: this,
3273
3238
  A: [
@@ -3277,7 +3242,7 @@ var SpaceInvitationProtocol = class {
3277
3242
  });
3278
3243
  const space = this._spaceManager.spaces.get(this._spaceKey);
3279
3244
  invariant10(space, void 0, {
3280
- F: __dxlog_file14,
3245
+ F: __dxlog_file13,
3281
3246
  L: 152,
3282
3247
  S: this,
3283
3248
  A: [
@@ -3289,14 +3254,14 @@ var SpaceInvitationProtocol = class {
3289
3254
  host: this._signingContext.deviceKey,
3290
3255
  id: invitation.invitationId
3291
3256
  }, {
3292
- F: __dxlog_file14,
3257
+ F: __dxlog_file13,
3293
3258
  L: 154,
3294
3259
  S: this,
3295
3260
  C: (f, a) => f(...a)
3296
3261
  });
3297
3262
  const credential = await createCancelDelegatedSpaceInvitationCredential(this._signingContext.credentialSigner, space.key, invitation.delegationCredentialId);
3298
3263
  invariant10(credential.credential, void 0, {
3299
- F: __dxlog_file14,
3264
+ F: __dxlog_file13,
3300
3265
  L: 161,
3301
3266
  S: this,
3302
3267
  A: [
@@ -3335,7 +3300,7 @@ var SpaceInvitationProtocol = class {
3335
3300
  }
3336
3301
  async accept(response) {
3337
3302
  invariant10(response.space, void 0, {
3338
- F: __dxlog_file14,
3303
+ F: __dxlog_file13,
3339
3304
  L: 196,
3340
3305
  S: this,
3341
3306
  A: [
@@ -3346,7 +3311,7 @@ var SpaceInvitationProtocol = class {
3346
3311
  const { credential, controlTimeframe, dataTimeframe } = response.space;
3347
3312
  const assertion = getCredentialAssertion2(credential);
3348
3313
  invariant10(assertion["@type"] === "dxos.halo.credentials.SpaceMember", "Invalid credential", {
3349
- F: __dxlog_file14,
3314
+ F: __dxlog_file13,
3350
3315
  L: 199,
3351
3316
  S: this,
3352
3317
  A: [
@@ -3355,7 +3320,7 @@ var SpaceInvitationProtocol = class {
3355
3320
  ]
3356
3321
  });
3357
3322
  invariant10(credential.subject.id.equals(this._signingContext.identityKey), void 0, {
3358
- F: __dxlog_file14,
3323
+ F: __dxlog_file13,
3359
3324
  L: 200,
3360
3325
  S: this,
3361
3326
  A: [
@@ -3390,7 +3355,7 @@ import { PublicKey as PublicKey8 } from "@dxos/keys";
3390
3355
  import { log as log12 } from "@dxos/log";
3391
3356
  import { Invitation as Invitation6 } from "@dxos/protocols/proto/dxos/client/services";
3392
3357
  import { SpaceMember as SpaceMember3 } from "@dxos/protocols/proto/dxos/halo/credentials";
3393
- var __dxlog_file15 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/invitations/invitations-manager.ts";
3358
+ var __dxlog_file14 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/invitations/invitations-manager.ts";
3394
3359
  var InvitationsManager = class {
3395
3360
  constructor(_invitationsHandler, _getHandler, _metadataStore) {
3396
3361
  this._invitationsHandler = _invitationsHandler;
@@ -3433,7 +3398,7 @@ var InvitationsManager = class {
3433
3398
  await this._persistIfRequired(handler, stream, invitation);
3434
3399
  } catch (err) {
3435
3400
  log12.catch(err, void 0, {
3436
- F: __dxlog_file15,
3401
+ F: __dxlog_file14,
3437
3402
  L: 82,
3438
3403
  S: this,
3439
3404
  C: (f, a) => f(...a)
@@ -3456,7 +3421,7 @@ var InvitationsManager = class {
3456
3421
  const freshInvitations = persistentInvitations.filter((invitation) => !hasInvitationExpired(invitation));
3457
3422
  const loadTasks = freshInvitations.map((persistentInvitation) => {
3458
3423
  invariant11(!this._createInvitations.get(persistentInvitation.invitationId), "invitation already exists", {
3459
- F: __dxlog_file15,
3424
+ F: __dxlog_file14,
3460
3425
  L: 103,
3461
3426
  S: this,
3462
3427
  A: [
@@ -3475,7 +3440,7 @@ var InvitationsManager = class {
3475
3440
  };
3476
3441
  } catch (err) {
3477
3442
  log12.catch(err, void 0, {
3478
- F: __dxlog_file15,
3443
+ F: __dxlog_file14,
3479
3444
  L: 110,
3480
3445
  S: this,
3481
3446
  C: (f, a) => f(...a)
@@ -3507,13 +3472,13 @@ var InvitationsManager = class {
3507
3472
  }
3508
3473
  async authenticate({ invitationId, authCode }) {
3509
3474
  log12("authenticating...", void 0, {
3510
- F: __dxlog_file15,
3475
+ F: __dxlog_file14,
3511
3476
  L: 140,
3512
3477
  S: this,
3513
3478
  C: (f, a) => f(...a)
3514
3479
  });
3515
3480
  invariant11(invitationId, void 0, {
3516
- F: __dxlog_file15,
3481
+ F: __dxlog_file14,
3517
3482
  L: 141,
3518
3483
  S: this,
3519
3484
  A: [
@@ -3526,7 +3491,7 @@ var InvitationsManager = class {
3526
3491
  log12.warn("invalid invitation", {
3527
3492
  invitationId
3528
3493
  }, {
3529
- F: __dxlog_file15,
3494
+ F: __dxlog_file14,
3530
3495
  L: 144,
3531
3496
  S: this,
3532
3497
  C: (f, a) => f(...a)
@@ -3539,13 +3504,13 @@ var InvitationsManager = class {
3539
3504
  log12("cancelInvitation...", {
3540
3505
  invitationId
3541
3506
  }, {
3542
- F: __dxlog_file15,
3507
+ F: __dxlog_file14,
3543
3508
  L: 151,
3544
3509
  S: this,
3545
3510
  C: (f, a) => f(...a)
3546
3511
  });
3547
3512
  invariant11(invitationId, void 0, {
3548
- F: __dxlog_file15,
3513
+ F: __dxlog_file14,
3549
3514
  L: 152,
3550
3515
  S: this,
3551
3516
  A: [
@@ -3619,15 +3584,12 @@ var InvitationsManager = class {
3619
3584
  stream.error(err);
3620
3585
  void ctx.dispose();
3621
3586
  }
3622
- }, {
3623
- F: __dxlog_file15,
3624
- L: 234
3625
3587
  });
3626
3588
  ctx.onDispose(() => {
3627
3589
  log12("complete", {
3628
3590
  ...handler.toJSON()
3629
3591
  }, {
3630
- F: __dxlog_file15,
3592
+ F: __dxlog_file14,
3631
3593
  L: 241,
3632
3594
  S: this,
3633
3595
  C: (f, a) => f(...a)
@@ -3660,7 +3622,7 @@ var InvitationsManager = class {
3660
3622
  log12("timeout", {
3661
3623
  ...handler.toJSON()
3662
3624
  }, {
3663
- F: __dxlog_file15,
3625
+ F: __dxlog_file14,
3664
3626
  L: 261,
3665
3627
  S: this,
3666
3628
  C: (f, a) => f(...a)
@@ -3671,7 +3633,7 @@ var InvitationsManager = class {
3671
3633
  });
3672
3634
  } else {
3673
3635
  log12.warn("auth failed", err, {
3674
- F: __dxlog_file15,
3636
+ F: __dxlog_file14,
3675
3637
  L: 264,
3676
3638
  S: this,
3677
3639
  C: (f, a) => f(...a)
@@ -3683,15 +3645,12 @@ var InvitationsManager = class {
3683
3645
  }
3684
3646
  void ctx.dispose();
3685
3647
  }
3686
- }, {
3687
- F: __dxlog_file15,
3688
- L: 258
3689
3648
  });
3690
3649
  ctx.onDispose(() => {
3691
3650
  log12("complete", {
3692
3651
  ...handler.toJSON()
3693
3652
  }, {
3694
- F: __dxlog_file15,
3653
+ F: __dxlog_file14,
3695
3654
  L: 271,
3696
3655
  S: this,
3697
3656
  C: (f, a) => f(...a)
@@ -3736,7 +3695,7 @@ var InvitationsManager = class {
3736
3695
  await this._metadataStore.removeInvitation(invitation.invitationId);
3737
3696
  } catch (err) {
3738
3697
  log12.catch(err, void 0, {
3739
- F: __dxlog_file15,
3698
+ F: __dxlog_file14,
3740
3699
  L: 307,
3741
3700
  S: this,
3742
3701
  C: (f, a) => f(...a)
@@ -3823,7 +3782,7 @@ import { invariant as invariant12 } from "@dxos/invariant";
3823
3782
  import { log as log13 } from "@dxos/log";
3824
3783
  import { CreateEpochRequest } from "@dxos/protocols/proto/dxos/client/services";
3825
3784
  import { assignDeep } from "@dxos/util";
3826
- var __dxlog_file16 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/spaces/epoch-migrations.ts";
3785
+ var __dxlog_file15 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/spaces/epoch-migrations.ts";
3827
3786
  var runEpochMigration = async (ctx, context) => {
3828
3787
  switch (context.migration) {
3829
3788
  case CreateEpochRequest.Migration.INIT_AUTOMERGE: {
@@ -3847,7 +3806,7 @@ var runEpochMigration = async (ctx, context) => {
3847
3806
  }
3848
3807
  case CreateEpochRequest.Migration.FRAGMENT_AUTOMERGE_ROOT: {
3849
3808
  log13.info("Fragmenting", void 0, {
3850
- F: __dxlog_file16,
3809
+ F: __dxlog_file15,
3851
3810
  L: 63,
3852
3811
  S: void 0,
3853
3812
  C: (f, a) => f(...a)
@@ -3859,7 +3818,7 @@ var runEpochMigration = async (ctx, context) => {
3859
3818
  const properties = findInlineObjectOfType(rootHandle.docSync(), TYPE_PROPERTIES);
3860
3819
  const otherObjects = objects.filter(([key]) => key !== properties?.[0]);
3861
3820
  invariant12(properties, "Properties not found", {
3862
- F: __dxlog_file16,
3821
+ F: __dxlog_file15,
3863
3822
  L: 73,
3864
3823
  S: void 0,
3865
3824
  A: [
@@ -3875,7 +3834,7 @@ var runEpochMigration = async (ctx, context) => {
3875
3834
  };
3876
3835
  const newRoot = context.repo.create(newSpaceDoc);
3877
3836
  invariant12(typeof newRoot.url === "string" && newRoot.url.length > 0, void 0, {
3878
- F: __dxlog_file16,
3837
+ F: __dxlog_file15,
3879
3838
  L: 78,
3880
3839
  S: void 0,
3881
3840
  A: [
@@ -3906,7 +3865,7 @@ var runEpochMigration = async (ctx, context) => {
3906
3865
  const rootHandle = context.repo.find(currentRootUrl);
3907
3866
  await cancelWithContext4(ctx, asyncTimeout2(rootHandle.whenReady(), 1e4));
3908
3867
  invariant12(rootHandle.docSync(), "Root doc not found", {
3909
- F: __dxlog_file16,
3868
+ F: __dxlog_file15,
3910
3869
  L: 100,
3911
3870
  S: void 0,
3912
3871
  A: [
@@ -3919,7 +3878,7 @@ var runEpochMigration = async (ctx, context) => {
3919
3878
  const handle = context.repo.find(url);
3920
3879
  await cancelWithContext4(ctx, asyncTimeout2(handle.whenReady(), 1e4));
3921
3880
  invariant12(handle.docSync(), "Doc not found", {
3922
- F: __dxlog_file16,
3881
+ F: __dxlog_file15,
3923
3882
  L: 107,
3924
3883
  S: void 0,
3925
3884
  A: [
@@ -3941,7 +3900,7 @@ var runEpochMigration = async (ctx, context) => {
3941
3900
  }
3942
3901
  case CreateEpochRequest.Migration.REPLACE_AUTOMERGE_ROOT: {
3943
3902
  invariant12(context.newAutomergeRoot, void 0, {
3944
- F: __dxlog_file16,
3903
+ F: __dxlog_file15,
3945
3904
  L: 124,
3946
3905
  S: void 0,
3947
3906
  A: [
@@ -3967,17 +3926,14 @@ import { log as log14 } from "@dxos/log";
3967
3926
  import { schema as schema4 } from "@dxos/protocols";
3968
3927
  import { RpcExtension as RpcExtension3 } from "@dxos/teleport";
3969
3928
  import { ComplexMap as ComplexMap2, ComplexSet as ComplexSet4, entry } from "@dxos/util";
3970
- var __dxlog_file17 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/spaces/notarization-plugin.ts";
3929
+ var __dxlog_file16 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/spaces/notarization-plugin.ts";
3971
3930
  var DEFAULT_RETRY_TIMEOUT = 1e3;
3972
3931
  var DEFAULT_SUCCESS_DELAY = 1e3;
3973
3932
  var DEFAULT_NOTARIZE_TIMEOUT = 1e4;
3974
3933
  var WRITER_NOT_SET_ERROR_CODE = "WRITER_NOT_SET";
3975
3934
  var NotarizationPlugin = class {
3976
3935
  constructor() {
3977
- this._ctx = new Context7(void 0, {
3978
- F: __dxlog_file17,
3979
- L: 62
3980
- });
3936
+ this._ctx = new Context7();
3981
3937
  this._extensionOpened = new Event5();
3982
3938
  this._extensions = /* @__PURE__ */ new Set();
3983
3939
  this._processedCredentials = new ComplexSet4(PublicKey9.hash);
@@ -3998,13 +3954,13 @@ var NotarizationPlugin = class {
3998
3954
  log14("notarize", {
3999
3955
  credentials
4000
3956
  }, {
4001
- F: __dxlog_file17,
3957
+ F: __dxlog_file16,
4002
3958
  L: 90,
4003
3959
  S: this,
4004
3960
  C: (f, a) => f(...a)
4005
3961
  });
4006
3962
  invariant13(credentials.every((credential) => credential.id), "Credentials must have an id", {
4007
- F: __dxlog_file17,
3963
+ F: __dxlog_file16,
4008
3964
  L: 91,
4009
3965
  S: this,
4010
3966
  A: [
@@ -4018,7 +3974,7 @@ var NotarizationPlugin = class {
4018
3974
  log14.warn("Notarization error", {
4019
3975
  err
4020
3976
  }, {
4021
- F: __dxlog_file17,
3977
+ F: __dxlog_file16,
4022
3978
  L: 99,
4023
3979
  S: this,
4024
3980
  C: (f, a) => f(...a)
@@ -4034,7 +3990,7 @@ var NotarizationPlugin = class {
4034
3990
  timeout,
4035
3991
  peers: Array.from(this._extensions).map((extension) => extension.remotePeerId)
4036
3992
  }, {
4037
- F: __dxlog_file17,
3993
+ F: __dxlog_file16,
4038
3994
  L: 111,
4039
3995
  S: this,
4040
3996
  C: (f, a) => f(...a)
@@ -4057,7 +4013,7 @@ var NotarizationPlugin = class {
4057
4013
  log14.info("Exhausted all peers to notarize with", {
4058
4014
  retryIn: retryTimeout
4059
4015
  }, {
4060
- F: __dxlog_file17,
4016
+ F: __dxlog_file16,
4061
4017
  L: 136,
4062
4018
  S: this,
4063
4019
  C: (f, a) => f(...a)
@@ -4071,7 +4027,7 @@ var NotarizationPlugin = class {
4071
4027
  peer: peer.localPeerId,
4072
4028
  credentialId: credentials.map((credential) => credential.id)
4073
4029
  }, {
4074
- F: __dxlog_file17,
4030
+ F: __dxlog_file16,
4075
4031
  L: 143,
4076
4032
  S: this,
4077
4033
  C: (f, a) => f(...a)
@@ -4080,7 +4036,7 @@ var NotarizationPlugin = class {
4080
4036
  credentials: credentials.filter((credential) => !this._processedCredentials.has(credential.id))
4081
4037
  });
4082
4038
  log14("success", void 0, {
4083
- F: __dxlog_file17,
4039
+ F: __dxlog_file16,
4084
4040
  L: 147,
4085
4041
  S: this,
4086
4042
  C: (f, a) => f(...a)
@@ -4089,7 +4045,7 @@ var NotarizationPlugin = class {
4089
4045
  } catch (err) {
4090
4046
  if (!ctx.disposed && !err.message.includes(WRITER_NOT_SET_ERROR_CODE)) {
4091
4047
  log14.info("error notarizing (recoverable)", err, {
4092
- F: __dxlog_file17,
4048
+ F: __dxlog_file16,
4093
4049
  L: 151,
4094
4050
  S: this,
4095
4051
  C: (f, a) => f(...a)
@@ -4107,7 +4063,7 @@ var NotarizationPlugin = class {
4107
4063
  errors.wait()
4108
4064
  ]);
4109
4065
  log14("done", void 0, {
4110
- F: __dxlog_file17,
4066
+ F: __dxlog_file16,
4111
4067
  L: 162,
4112
4068
  S: this,
4113
4069
  C: (f, a) => f(...a)
@@ -4129,7 +4085,7 @@ var NotarizationPlugin = class {
4129
4085
  }
4130
4086
  setWriter(writer) {
4131
4087
  invariant13(!this._writer, "Writer already set.", {
4132
- F: __dxlog_file17,
4088
+ F: __dxlog_file16,
4133
4089
  L: 181,
4134
4090
  S: this,
4135
4091
  A: [
@@ -4154,7 +4110,7 @@ var NotarizationPlugin = class {
4154
4110
  }
4155
4111
  for (const credential of request.credentials ?? []) {
4156
4112
  invariant13(credential.id, "Credential must have an id", {
4157
- F: __dxlog_file17,
4113
+ F: __dxlog_file16,
4158
4114
  L: 200,
4159
4115
  S: this,
4160
4116
  A: [
@@ -4174,7 +4130,7 @@ var NotarizationPlugin = class {
4174
4130
  log14("extension opened", {
4175
4131
  peer: extension.localPeerId
4176
4132
  }, {
4177
- F: __dxlog_file17,
4133
+ F: __dxlog_file16,
4178
4134
  L: 211,
4179
4135
  S: this,
4180
4136
  C: (f, a) => f(...a)
@@ -4186,7 +4142,7 @@ var NotarizationPlugin = class {
4186
4142
  log14("extension closed", {
4187
4143
  peer: extension.localPeerId
4188
4144
  }, {
4189
- F: __dxlog_file17,
4145
+ F: __dxlog_file16,
4190
4146
  L: 216,
4191
4147
  S: this,
4192
4148
  C: (f, a) => f(...a)
@@ -4303,13 +4259,10 @@ function _using_ctx() {
4303
4259
  }
4304
4260
  };
4305
4261
  }
4306
- var __dxlog_file18 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/spaces/data-space.ts";
4262
+ var __dxlog_file17 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/spaces/data-space.ts";
4307
4263
  var DataSpace = class {
4308
4264
  constructor(params) {
4309
- this._ctx = new Context8(void 0, {
4310
- F: __dxlog_file18,
4311
- L: 84
4312
- });
4265
+ this._ctx = new Context8();
4313
4266
  this._notarizationPlugin = new NotarizationPlugin();
4314
4267
  this._cache = void 0;
4315
4268
  // TODO(dmaretskyi): Move into Space?
@@ -4343,7 +4296,7 @@ var DataSpace = class {
4343
4296
  log15("new state", {
4344
4297
  state: SpaceState2[this._state]
4345
4298
  }, {
4346
- F: __dxlog_file18,
4299
+ F: __dxlog_file17,
4347
4300
  L: 146,
4348
4301
  S: this,
4349
4302
  C: (f, a) => f(...a)
@@ -4398,15 +4351,12 @@ var DataSpace = class {
4398
4351
  await this._inner.spaceState.addCredentialProcessor(this._notarizationPlugin);
4399
4352
  await this._automergeSpaceState.open();
4400
4353
  await this._inner.spaceState.addCredentialProcessor(this._automergeSpaceState);
4401
- await this._inner.open(new Context8(void 0, {
4402
- F: __dxlog_file18,
4403
- L: 215
4404
- }));
4354
+ await this._inner.open(new Context8());
4405
4355
  this._state = SpaceState2.CONTROL_ONLY;
4406
4356
  log15("new state", {
4407
4357
  state: SpaceState2[this._state]
4408
4358
  }, {
4409
- F: __dxlog_file18,
4359
+ F: __dxlog_file17,
4410
4360
  L: 217,
4411
4361
  S: this,
4412
4362
  C: (f, a) => f(...a)
@@ -4424,16 +4374,13 @@ var DataSpace = class {
4424
4374
  log15("new state", {
4425
4375
  state: SpaceState2[this._state]
4426
4376
  }, {
4427
- F: __dxlog_file18,
4377
+ F: __dxlog_file17,
4428
4378
  L: 231,
4429
4379
  S: this,
4430
4380
  C: (f, a) => f(...a)
4431
4381
  });
4432
4382
  await this._ctx.dispose();
4433
- this._ctx = new Context8(void 0, {
4434
- F: __dxlog_file18,
4435
- L: 233
4436
- });
4383
+ this._ctx = new Context8();
4437
4384
  await this.authVerifier.close();
4438
4385
  await this._inner.close();
4439
4386
  await this._inner.spaceState.removeCredentialProcessor(this._automergeSpaceState);
@@ -4460,7 +4407,7 @@ var DataSpace = class {
4460
4407
  } catch (err) {
4461
4408
  if (err instanceof CancelledError || err instanceof ContextDisposedError3) {
4462
4409
  log15("data pipeline initialization cancelled", err, {
4463
- F: __dxlog_file18,
4410
+ F: __dxlog_file17,
4464
4411
  L: 265,
4465
4412
  S: this,
4466
4413
  C: (f, a) => f(...a)
@@ -4468,7 +4415,7 @@ var DataSpace = class {
4468
4415
  return;
4469
4416
  }
4470
4417
  log15.error("Error initializing data pipeline", err, {
4471
- F: __dxlog_file18,
4418
+ F: __dxlog_file17,
4472
4419
  L: 269,
4473
4420
  S: this,
4474
4421
  C: (f, a) => f(...a)
@@ -4477,7 +4424,7 @@ var DataSpace = class {
4477
4424
  log15("new state", {
4478
4425
  state: SpaceState2[this._state]
4479
4426
  }, {
4480
- F: __dxlog_file18,
4427
+ F: __dxlog_file17,
4481
4428
  L: 271,
4482
4429
  S: this,
4483
4430
  C: (f, a) => f(...a)
@@ -4497,7 +4444,7 @@ var DataSpace = class {
4497
4444
  log15("new state", {
4498
4445
  state: SpaceState2[this._state]
4499
4446
  }, {
4500
- F: __dxlog_file18,
4447
+ F: __dxlog_file17,
4501
4448
  L: 287,
4502
4449
  S: this,
4503
4450
  C: (f, a) => f(...a)
@@ -4514,7 +4461,7 @@ var DataSpace = class {
4514
4461
  log15("new state", {
4515
4462
  state: SpaceState2[this._state]
4516
4463
  }, {
4517
- F: __dxlog_file18,
4464
+ F: __dxlog_file17,
4518
4465
  L: 306,
4519
4466
  S: this,
4520
4467
  C: (f, a) => f(...a)
@@ -4530,7 +4477,7 @@ var DataSpace = class {
4530
4477
  this.metrics.controlPipelineReady = /* @__PURE__ */ new Date();
4531
4478
  await this._createWritableFeeds();
4532
4479
  log15("writable feeds created", void 0, {
4533
- F: __dxlog_file18,
4480
+ F: __dxlog_file17,
4534
4481
  L: 322,
4535
4482
  S: this,
4536
4483
  C: (f, a) => f(...a)
@@ -4593,7 +4540,7 @@ var DataSpace = class {
4593
4540
  space: this.key,
4594
4541
  rootUrl
4595
4542
  }, {
4596
- F: __dxlog_file18,
4543
+ F: __dxlog_file17,
4597
4544
  L: 388,
4598
4545
  S: this,
4599
4546
  C: (f, a) => f(...a)
@@ -4647,7 +4594,7 @@ var DataSpace = class {
4647
4594
  rootUrl,
4648
4595
  err
4649
4596
  }, {
4650
- F: __dxlog_file18,
4597
+ F: __dxlog_file17,
4651
4598
  L: 431,
4652
4599
  S: this,
4653
4600
  C: (f, a) => f(...a)
@@ -4733,7 +4680,7 @@ var DataSpace = class {
4733
4680
  log15("new state", {
4734
4681
  state: SpaceState2[this._state]
4735
4682
  }, {
4736
- F: __dxlog_file18,
4683
+ F: __dxlog_file17,
4737
4684
  L: 512,
4738
4685
  S: this,
4739
4686
  C: (f, a) => f(...a)
@@ -4890,7 +4837,7 @@ function _ts_decorate5(decorators, target, key, desc) {
4890
4837
  r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
4891
4838
  return c > 3 && r && Object.defineProperty(target, key, r), r;
4892
4839
  }
4893
- var __dxlog_file19 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/spaces/data-space-manager.ts";
4840
+ var __dxlog_file18 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/spaces/data-space-manager.ts";
4894
4841
  var PRESENCE_ANNOUNCE_INTERVAL = 1e4;
4895
4842
  var PRESENCE_OFFLINE_TIMEOUT = 2e4;
4896
4843
  var DEFAULT_SPACE_KEY = "__DEFAULT__";
@@ -4904,10 +4851,7 @@ var DataSpaceManager = class {
4904
4851
  this._echoHost = _echoHost;
4905
4852
  this._invitationsManager = _invitationsManager;
4906
4853
  this._params = _params;
4907
- this._ctx = new Context9(void 0, {
4908
- F: __dxlog_file19,
4909
- L: 94
4910
- });
4854
+ this._ctx = new Context9();
4911
4855
  this.updated = new Event7();
4912
4856
  this._spaces = new ComplexMap3(PublicKey11.hash);
4913
4857
  this._isOpen = false;
@@ -4941,7 +4885,7 @@ var DataSpaceManager = class {
4941
4885
  }
4942
4886
  async open() {
4943
4887
  log16("open", void 0, {
4944
- F: __dxlog_file19,
4888
+ F: __dxlog_file18,
4945
4889
  L: 146,
4946
4890
  S: this,
4947
4891
  C: (f, a) => f(...a)
@@ -4949,7 +4893,7 @@ var DataSpaceManager = class {
4949
4893
  log16.trace("dxos.echo.data-space-manager.open", Trace2.begin({
4950
4894
  id: this._instanceId
4951
4895
  }), {
4952
- F: __dxlog_file19,
4896
+ F: __dxlog_file18,
4953
4897
  L: 147,
4954
4898
  S: this,
4955
4899
  C: (f, a) => f(...a)
@@ -4957,7 +4901,7 @@ var DataSpaceManager = class {
4957
4901
  log16("metadata loaded", {
4958
4902
  spaces: this._metadataStore.spaces.length
4959
4903
  }, {
4960
- F: __dxlog_file19,
4904
+ F: __dxlog_file18,
4961
4905
  L: 148,
4962
4906
  S: this,
4963
4907
  C: (f, a) => f(...a)
@@ -4967,7 +4911,7 @@ var DataSpaceManager = class {
4967
4911
  log16("load space", {
4968
4912
  spaceMetadata
4969
4913
  }, {
4970
- F: __dxlog_file19,
4914
+ F: __dxlog_file18,
4971
4915
  L: 152,
4972
4916
  S: this,
4973
4917
  C: (f, a) => f(...a)
@@ -4978,7 +4922,7 @@ var DataSpaceManager = class {
4978
4922
  spaceMetadata,
4979
4923
  err
4980
4924
  }, {
4981
- F: __dxlog_file19,
4925
+ F: __dxlog_file18,
4982
4926
  L: 155,
4983
4927
  S: this,
4984
4928
  C: (f, a) => f(...a)
@@ -4990,7 +4934,7 @@ var DataSpaceManager = class {
4990
4934
  log16.trace("dxos.echo.data-space-manager.open", Trace2.end({
4991
4935
  id: this._instanceId
4992
4936
  }), {
4993
- F: __dxlog_file19,
4937
+ F: __dxlog_file18,
4994
4938
  L: 162,
4995
4939
  S: this,
4996
4940
  C: (f, a) => f(...a)
@@ -4998,7 +4942,7 @@ var DataSpaceManager = class {
4998
4942
  }
4999
4943
  async close() {
5000
4944
  log16("close", void 0, {
5001
- F: __dxlog_file19,
4945
+ F: __dxlog_file18,
5002
4946
  L: 167,
5003
4947
  S: this,
5004
4948
  C: (f, a) => f(...a)
@@ -5015,7 +4959,7 @@ var DataSpaceManager = class {
5015
4959
  */
5016
4960
  async createSpace() {
5017
4961
  invariant14(this._isOpen, "Not open.", {
5018
- F: __dxlog_file19,
4962
+ F: __dxlog_file18,
5019
4963
  L: 181,
5020
4964
  S: this,
5021
4965
  A: [
@@ -5036,7 +4980,7 @@ var DataSpaceManager = class {
5036
4980
  log16("creating space...", {
5037
4981
  spaceKey
5038
4982
  }, {
5039
- F: __dxlog_file19,
4983
+ F: __dxlog_file18,
5040
4984
  L: 193,
5041
4985
  S: this,
5042
4986
  C: (f, a) => f(...a)
@@ -5048,7 +4992,7 @@ var DataSpaceManager = class {
5048
4992
  await this._metadataStore.addSpace(metadata);
5049
4993
  const memberCredential = credentials[1];
5050
4994
  invariant14(getCredentialAssertion3(memberCredential)["@type"] === "dxos.halo.credentials.SpaceMember", void 0, {
5051
- F: __dxlog_file19,
4995
+ F: __dxlog_file18,
5052
4996
  L: 203,
5053
4997
  S: this,
5054
4998
  A: [
@@ -5080,7 +5024,7 @@ var DataSpaceManager = class {
5080
5024
  version: space.databaseRoot.getVersion(),
5081
5025
  spaceId: space.id
5082
5026
  }, {
5083
- F: __dxlog_file19,
5027
+ F: __dxlog_file18,
5084
5028
  L: 228,
5085
5029
  S: this,
5086
5030
  C: (f, a) => f(...a)
@@ -5115,7 +5059,7 @@ var DataSpaceManager = class {
5115
5059
  async _getSpaceRootDocument(space) {
5116
5060
  const automergeIndex = space.automergeSpaceState.rootUrl;
5117
5061
  invariant14(automergeIndex, void 0, {
5118
- F: __dxlog_file19,
5062
+ F: __dxlog_file18,
5119
5063
  L: 261,
5120
5064
  S: this,
5121
5065
  A: [
@@ -5132,13 +5076,13 @@ var DataSpaceManager = class {
5132
5076
  log16("accept space", {
5133
5077
  opts
5134
5078
  }, {
5135
- F: __dxlog_file19,
5079
+ F: __dxlog_file18,
5136
5080
  L: 270,
5137
5081
  S: this,
5138
5082
  C: (f, a) => f(...a)
5139
5083
  });
5140
5084
  invariant14(this._isOpen, "Not open.", {
5141
- F: __dxlog_file19,
5085
+ F: __dxlog_file18,
5142
5086
  L: 271,
5143
5087
  S: this,
5144
5088
  A: [
@@ -5147,7 +5091,7 @@ var DataSpaceManager = class {
5147
5091
  ]
5148
5092
  });
5149
5093
  invariant14(!this._spaces.has(opts.spaceKey), "Space already exists.", {
5150
- F: __dxlog_file19,
5094
+ F: __dxlog_file18,
5151
5095
  L: 272,
5152
5096
  S: this,
5153
5097
  A: [
@@ -5183,7 +5127,7 @@ var DataSpaceManager = class {
5183
5127
  log16("construct space", {
5184
5128
  metadata
5185
5129
  }, {
5186
- F: __dxlog_file19,
5130
+ F: __dxlog_file18,
5187
5131
  L: 306,
5188
5132
  S: this,
5189
5133
  C: (f, a) => f(...a)
@@ -5221,7 +5165,7 @@ var DataSpaceManager = class {
5221
5165
  },
5222
5166
  onAuthFailure: () => {
5223
5167
  log16.warn("auth failure", void 0, {
5224
- F: __dxlog_file19,
5168
+ F: __dxlog_file18,
5225
5169
  L: 343,
5226
5170
  S: this,
5227
5171
  C: (f, a) => f(...a)
@@ -5254,7 +5198,7 @@ var DataSpaceManager = class {
5254
5198
  log16("before space ready", {
5255
5199
  space: space.key
5256
5200
  }, {
5257
- F: __dxlog_file19,
5201
+ F: __dxlog_file18,
5258
5202
  L: 370,
5259
5203
  S: this,
5260
5204
  C: (f, a) => f(...a)
@@ -5265,7 +5209,7 @@ var DataSpaceManager = class {
5265
5209
  space: space.key,
5266
5210
  open: this._isOpen
5267
5211
  }, {
5268
- F: __dxlog_file19,
5212
+ F: __dxlog_file18,
5269
5213
  L: 373,
5270
5214
  S: this,
5271
5215
  C: (f, a) => f(...a)
@@ -5284,7 +5228,7 @@ var DataSpaceManager = class {
5284
5228
  log16("before space close", {
5285
5229
  space: space.key
5286
5230
  }, {
5287
- F: __dxlog_file19,
5231
+ F: __dxlog_file18,
5288
5232
  L: 381,
5289
5233
  S: this,
5290
5234
  C: (f, a) => f(...a)
@@ -5325,7 +5269,7 @@ var DataSpaceManager = class {
5325
5269
  peersOnline: presence.getPeersOnline().length,
5326
5270
  closedSessions
5327
5271
  }, {
5328
- F: __dxlog_file19,
5272
+ F: __dxlog_file18,
5329
5273
  L: 417,
5330
5274
  S: this,
5331
5275
  C: (f, a) => f(...a)
@@ -5340,7 +5284,7 @@ var DataSpaceManager = class {
5340
5284
  log16("closing a session with a removed peer", {
5341
5285
  peerId: peerState.peerId
5342
5286
  }, {
5343
- F: __dxlog_file19,
5287
+ F: __dxlog_file18,
5344
5288
  L: 431,
5345
5289
  S: this,
5346
5290
  C: (f, a) => f(...a)
@@ -5412,7 +5356,7 @@ import { log as log17 } from "@dxos/log";
5412
5356
  import { ApiError, SpaceNotFoundError as SpaceNotFoundError2, encodeError, IdentityNotInitializedError, AuthorizationError as AuthorizationError2 } from "@dxos/protocols";
5413
5357
  import { SpaceMember as SpaceMember7, SpaceState as SpaceState4 } from "@dxos/protocols/proto/dxos/client/services";
5414
5358
  import { trace as trace8 } from "@dxos/tracing";
5415
- var __dxlog_file20 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/spaces/spaces-service.ts";
5359
+ var __dxlog_file19 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/spaces/spaces-service.ts";
5416
5360
  var SpacesServiceImpl = class {
5417
5361
  constructor(_identityManager, _spaceManager, _getDataSpaceManager) {
5418
5362
  this._identityManager = _identityManager;
@@ -5456,7 +5400,7 @@ var SpacesServiceImpl = class {
5456
5400
  }
5457
5401
  const credentials = await createAdmissionCredentials2(identity.getIdentityCredentialSigner(), request.memberKey, space.key, space.genesisFeedKey, request.newRole, space.spaceState.membershipChainHeads);
5458
5402
  invariant15(credentials[0].credential, void 0, {
5459
- F: __dxlog_file20,
5403
+ F: __dxlog_file19,
5460
5404
  L: 98,
5461
5405
  S: this,
5462
5406
  A: [
@@ -5466,7 +5410,7 @@ var SpacesServiceImpl = class {
5466
5410
  });
5467
5411
  const spaceMemberCredential = credentials[0].credential.credential;
5468
5412
  invariant15(getCredentialAssertion4(spaceMemberCredential)["@type"] === "dxos.halo.credentials.SpaceMember", void 0, {
5469
- F: __dxlog_file20,
5413
+ F: __dxlog_file19,
5470
5414
  L: 100,
5471
5415
  S: this,
5472
5416
  A: [
@@ -5484,7 +5428,7 @@ var SpacesServiceImpl = class {
5484
5428
  log17("update", {
5485
5429
  spaces
5486
5430
  }, {
5487
- F: __dxlog_file20,
5431
+ F: __dxlog_file19,
5488
5432
  L: 111,
5489
5433
  S: this,
5490
5434
  C: (f, a) => f(...a)
@@ -5576,7 +5520,7 @@ var SpacesServiceImpl = class {
5576
5520
  });
5577
5521
  } else {
5578
5522
  invariant15(!credential.id, "Id on unsigned credentials is not allowed", {
5579
- F: __dxlog_file20,
5523
+ F: __dxlog_file19,
5580
5524
  L: 209,
5581
5525
  S: this,
5582
5526
  A: [
@@ -5585,7 +5529,7 @@ var SpacesServiceImpl = class {
5585
5529
  ]
5586
5530
  });
5587
5531
  invariant15(this._identityManager.identity, "Identity is not available", {
5588
- F: __dxlog_file20,
5532
+ F: __dxlog_file19,
5589
5533
  L: 210,
5590
5534
  S: this,
5591
5535
  A: [
@@ -5595,7 +5539,7 @@ var SpacesServiceImpl = class {
5595
5539
  });
5596
5540
  const signer = this._identityManager.identity.getIdentityCredentialSigner();
5597
5541
  invariant15(credential.issuer.equals(signer.getIssuer()), void 0, {
5598
- F: __dxlog_file20,
5542
+ F: __dxlog_file19,
5599
5543
  L: 212,
5600
5544
  S: this,
5601
5545
  A: [
@@ -5713,7 +5657,7 @@ function _ts_decorate6(decorators, target, key, desc) {
5713
5657
  r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5714
5658
  return c > 3 && r && Object.defineProperty(target, key, r), r;
5715
5659
  }
5716
- var __dxlog_file21 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/services/service-context.ts";
5660
+ var __dxlog_file20 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/services/service-context.ts";
5717
5661
  var ServiceContext = class extends Resource3 {
5718
5662
  constructor(storage, level, networkManager, signalManager, _runtimeParams) {
5719
5663
  super();
@@ -5757,7 +5701,7 @@ var ServiceContext = class extends Resource3 {
5757
5701
  async _open(ctx) {
5758
5702
  await this._checkStorageVersion();
5759
5703
  log18("opening...", void 0, {
5760
- F: __dxlog_file21,
5704
+ F: __dxlog_file20,
5761
5705
  L: 149,
5762
5706
  S: this,
5763
5707
  C: (f, a) => f(...a)
@@ -5765,7 +5709,7 @@ var ServiceContext = class extends Resource3 {
5765
5709
  log18.trace("dxos.sdk.service-context.open", trace9.begin({
5766
5710
  id: this._instanceId
5767
5711
  }), {
5768
- F: __dxlog_file21,
5712
+ F: __dxlog_file20,
5769
5713
  L: 150,
5770
5714
  S: this,
5771
5715
  C: (f, a) => f(...a)
@@ -5783,7 +5727,7 @@ var ServiceContext = class extends Resource3 {
5783
5727
  log18("loaded persistent invitations", {
5784
5728
  count: loadedInvitations.invitations?.length
5785
5729
  }, {
5786
- F: __dxlog_file21,
5730
+ F: __dxlog_file20,
5787
5731
  L: 163,
5788
5732
  S: this,
5789
5733
  C: (f, a) => f(...a)
@@ -5791,13 +5735,13 @@ var ServiceContext = class extends Resource3 {
5791
5735
  log18.trace("dxos.sdk.service-context.open", trace9.end({
5792
5736
  id: this._instanceId
5793
5737
  }), {
5794
- F: __dxlog_file21,
5738
+ F: __dxlog_file20,
5795
5739
  L: 165,
5796
5740
  S: this,
5797
5741
  C: (f, a) => f(...a)
5798
5742
  });
5799
5743
  log18("opened", void 0, {
5800
- F: __dxlog_file21,
5744
+ F: __dxlog_file20,
5801
5745
  L: 166,
5802
5746
  S: this,
5803
5747
  C: (f, a) => f(...a)
@@ -5805,7 +5749,7 @@ var ServiceContext = class extends Resource3 {
5805
5749
  }
5806
5750
  async _close(ctx) {
5807
5751
  log18("closing...", void 0, {
5808
- F: __dxlog_file21,
5752
+ F: __dxlog_file20,
5809
5753
  L: 170,
5810
5754
  S: this,
5811
5755
  C: (f, a) => f(...a)
@@ -5822,7 +5766,7 @@ var ServiceContext = class extends Resource3 {
5822
5766
  await this.networkManager.close();
5823
5767
  await this.signalManager.close();
5824
5768
  log18("closed", void 0, {
5825
- F: __dxlog_file21,
5769
+ F: __dxlog_file20,
5826
5770
  L: 182,
5827
5771
  S: this,
5828
5772
  C: (f, a) => f(...a)
@@ -5830,16 +5774,13 @@ var ServiceContext = class extends Resource3 {
5830
5774
  }
5831
5775
  async createIdentity(params = {}) {
5832
5776
  const identity = await this.identityManager.createIdentity(params);
5833
- await this._initialize(new Context10(void 0, {
5834
- F: __dxlog_file21,
5835
- L: 187
5836
- }));
5777
+ await this._initialize(new Context10());
5837
5778
  return identity;
5838
5779
  }
5839
5780
  getInvitationHandler(invitation) {
5840
5781
  const factory = this._handlerFactories.get(invitation.kind);
5841
5782
  invariant16(factory, `Unknown invitation kind: ${invitation.kind}`, {
5842
- F: __dxlog_file21,
5783
+ F: __dxlog_file20,
5843
5784
  L: 193,
5844
5785
  S: this,
5845
5786
  A: [
@@ -5859,10 +5800,7 @@ var ServiceContext = class extends Resource3 {
5859
5800
  }
5860
5801
  async _acceptIdentity(params) {
5861
5802
  const identity = await this.identityManager.acceptIdentity(params);
5862
- await this._initialize(new Context10(void 0, {
5863
- F: __dxlog_file21,
5864
- L: 209
5865
- }));
5803
+ await this._initialize(new Context10());
5866
5804
  return identity;
5867
5805
  }
5868
5806
  async _checkStorageVersion() {
@@ -5874,7 +5812,7 @@ var ServiceContext = class extends Resource3 {
5874
5812
  // Called when identity is created.
5875
5813
  async _initialize(ctx) {
5876
5814
  log18("initializing spaces...", void 0, {
5877
- F: __dxlog_file21,
5815
+ F: __dxlog_file20,
5878
5816
  L: 224,
5879
5817
  S: this,
5880
5818
  C: (f, a) => f(...a)
@@ -5897,7 +5835,7 @@ var ServiceContext = class extends Resource3 {
5897
5835
  await this.dataSpaceManager.open();
5898
5836
  this._handlerFactories.set(Invitation8.Kind.SPACE, (invitation) => {
5899
5837
  invariant16(this.dataSpaceManager, "dataSpaceManager not initialized yet", {
5900
- F: __dxlog_file21,
5838
+ F: __dxlog_file20,
5901
5839
  L: 249,
5902
5840
  S: this,
5903
5841
  A: [
@@ -5921,7 +5859,7 @@ var ServiceContext = class extends Resource3 {
5921
5859
  log18("dataSpaceManager not initialized yet, ignoring space admission", {
5922
5860
  details: assertion
5923
5861
  }, {
5924
- F: __dxlog_file21,
5862
+ F: __dxlog_file20,
5925
5863
  L: 265,
5926
5864
  S: this,
5927
5865
  C: (f, a) => f(...a)
@@ -5932,7 +5870,7 @@ var ServiceContext = class extends Resource3 {
5932
5870
  log18("space already exists, ignoring space admission", {
5933
5871
  details: assertion
5934
5872
  }, {
5935
- F: __dxlog_file21,
5873
+ F: __dxlog_file20,
5936
5874
  L: 269,
5937
5875
  S: this,
5938
5876
  C: (f, a) => f(...a)
@@ -5943,7 +5881,7 @@ var ServiceContext = class extends Resource3 {
5943
5881
  log18("accepting space recorded in halo", {
5944
5882
  details: assertion
5945
5883
  }, {
5946
- F: __dxlog_file21,
5884
+ F: __dxlog_file20,
5947
5885
  L: 274,
5948
5886
  S: this,
5949
5887
  C: (f, a) => f(...a)
@@ -5954,7 +5892,7 @@ var ServiceContext = class extends Resource3 {
5954
5892
  });
5955
5893
  } catch (err) {
5956
5894
  log18.catch(err, void 0, {
5957
- F: __dxlog_file21,
5895
+ F: __dxlog_file20,
5958
5896
  L: 280,
5959
5897
  S: this,
5960
5898
  C: (f, a) => f(...a)
@@ -6014,7 +5952,7 @@ function _ts_decorate7(decorators, target, key, desc) {
6014
5952
  r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6015
5953
  return c > 3 && r && Object.defineProperty(target, key, r), r;
6016
5954
  }
6017
- var __dxlog_file22 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/locks/browser.ts";
5955
+ var __dxlog_file21 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/locks/browser.ts";
6018
5956
  var Message;
6019
5957
  (function(Message2) {
6020
5958
  Message2["ACQUIRING"] = "acquiring";
@@ -6037,28 +5975,28 @@ var Lock = class {
6037
5975
  });
6038
5976
  try {
6039
5977
  log19("aquiring lock...", void 0, {
6040
- F: __dxlog_file22,
5978
+ F: __dxlog_file21,
6041
5979
  L: 42,
6042
5980
  S: this,
6043
5981
  C: (f, a) => f(...a)
6044
5982
  });
6045
5983
  await asyncTimeout3(this._requestLock(), RESOURCE_LOCK_TIMEOUT);
6046
5984
  log19("acquired lock", void 0, {
6047
- F: __dxlog_file22,
5985
+ F: __dxlog_file21,
6048
5986
  L: 44,
6049
5987
  S: this,
6050
5988
  C: (f, a) => f(...a)
6051
5989
  });
6052
5990
  } catch {
6053
5991
  log19("stealing lock...", void 0, {
6054
- F: __dxlog_file22,
5992
+ F: __dxlog_file21,
6055
5993
  L: 46,
6056
5994
  S: this,
6057
5995
  C: (f, a) => f(...a)
6058
5996
  });
6059
5997
  await this._requestLock(true);
6060
5998
  log19("stolen lock", void 0, {
6061
- F: __dxlog_file22,
5999
+ F: __dxlog_file21,
6062
6000
  L: 48,
6063
6001
  S: this,
6064
6002
  C: (f, a) => f(...a)
@@ -6077,7 +6015,7 @@ var Lock = class {
6077
6015
  log19("requesting lock...", {
6078
6016
  steal
6079
6017
  }, {
6080
- F: __dxlog_file22,
6018
+ F: __dxlog_file21,
6081
6019
  L: 63,
6082
6020
  S: this,
6083
6021
  C: (f, a) => f(...a)
@@ -6091,14 +6029,14 @@ var Lock = class {
6091
6029
  this._releaseTrigger = new Trigger9();
6092
6030
  await this._releaseTrigger.wait();
6093
6031
  log19("releasing lock...", void 0, {
6094
- F: __dxlog_file22,
6032
+ F: __dxlog_file21,
6095
6033
  L: 72,
6096
6034
  S: this,
6097
6035
  C: (f, a) => f(...a)
6098
6036
  });
6099
6037
  await this._onRelease?.();
6100
6038
  log19("released lock", void 0, {
6101
- F: __dxlog_file22,
6039
+ F: __dxlog_file21,
6102
6040
  L: 74,
6103
6041
  S: this,
6104
6042
  C: (f, a) => f(...a)
@@ -6110,7 +6048,7 @@ var Lock = class {
6110
6048
  log19("recieved lock", {
6111
6049
  steal
6112
6050
  }, {
6113
- F: __dxlog_file22,
6051
+ F: __dxlog_file21,
6114
6052
  L: 81,
6115
6053
  S: this,
6116
6054
  C: (f, a) => f(...a)
@@ -6198,13 +6136,151 @@ var createLevel = async (config) => {
6198
6136
  return level;
6199
6137
  };
6200
6138
 
6139
+ // packages/sdk/client-services/src/packlets/storage/profile-archive.ts
6140
+ import { cbor } from "@dxos/automerge/automerge-repo";
6141
+ import { invariant as invariant17 } from "@dxos/invariant";
6142
+ import { log as log20 } from "@dxos/log";
6143
+ import { ProfileArchiveEntryType } from "@dxos/protocols";
6144
+ import { arrayToBuffer } from "@dxos/util";
6145
+ var __dxlog_file22 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/storage/profile-archive.ts";
6146
+ var encodeProfileArchive = (profile) => cbor.encode(profile);
6147
+ var decodeProfileArchive = (data) => cbor.decode(data);
6148
+ var exportProfileData = async ({ storage, level }) => {
6149
+ const archive = {
6150
+ storage: [],
6151
+ meta: {
6152
+ timestamp: (/* @__PURE__ */ new Date()).toISOString()
6153
+ }
6154
+ };
6155
+ {
6156
+ const directory = await storage.createDirectory();
6157
+ const files = await directory.list();
6158
+ log20.info("begin exporting files", {
6159
+ count: files.length
6160
+ }, {
6161
+ F: __dxlog_file22,
6162
+ L: 30,
6163
+ S: void 0,
6164
+ C: (f, a) => f(...a)
6165
+ });
6166
+ for (const filename of files) {
6167
+ const file = await directory.getOrCreateFile(filename);
6168
+ const { size } = await file.stat();
6169
+ const data = await file.read(0, size);
6170
+ archive.storage.push({
6171
+ type: ProfileArchiveEntryType.FILE,
6172
+ key: filename,
6173
+ value: data
6174
+ });
6175
+ }
6176
+ log20.info("done exporting files", {
6177
+ count: files.length
6178
+ }, {
6179
+ F: __dxlog_file22,
6180
+ L: 41,
6181
+ S: void 0,
6182
+ C: (f, a) => f(...a)
6183
+ });
6184
+ }
6185
+ {
6186
+ log20.info("begin exporting kv pairs", void 0, {
6187
+ F: __dxlog_file22,
6188
+ L: 45,
6189
+ S: void 0,
6190
+ C: (f, a) => f(...a)
6191
+ });
6192
+ const iter = await level.iterator({
6193
+ keyEncoding: "binary",
6194
+ valueEncoding: "binary"
6195
+ });
6196
+ let count = 0;
6197
+ for await (const [key, value] of iter) {
6198
+ archive.storage.push({
6199
+ type: ProfileArchiveEntryType.KEY_VALUE,
6200
+ key,
6201
+ value
6202
+ });
6203
+ count++;
6204
+ }
6205
+ log20.info("done exporting kv pairs", {
6206
+ count
6207
+ }, {
6208
+ F: __dxlog_file22,
6209
+ L: 56,
6210
+ S: void 0,
6211
+ C: (f, a) => f(...a)
6212
+ });
6213
+ }
6214
+ return archive;
6215
+ };
6216
+ var importProfileData = async ({ storage, level }, archive) => {
6217
+ const batch = level.batch();
6218
+ for (const entry2 of archive.storage) {
6219
+ switch (entry2.type) {
6220
+ case ProfileArchiveEntryType.FILE: {
6221
+ const directory = await storage.createDirectory();
6222
+ invariant17(typeof entry2.key === "string", "Invalid key type", {
6223
+ F: __dxlog_file22,
6224
+ L: 78,
6225
+ S: void 0,
6226
+ A: [
6227
+ "typeof entry.key === 'string'",
6228
+ "'Invalid key type'"
6229
+ ]
6230
+ });
6231
+ const file = await directory.getOrCreateFile(entry2.key);
6232
+ invariant17(entry2.value instanceof Uint8Array, "Invalid value type", {
6233
+ F: __dxlog_file22,
6234
+ L: 80,
6235
+ S: void 0,
6236
+ A: [
6237
+ "entry.value instanceof Uint8Array",
6238
+ "'Invalid value type'"
6239
+ ]
6240
+ });
6241
+ await file.write(0, arrayToBuffer(entry2.value));
6242
+ await file.close();
6243
+ break;
6244
+ }
6245
+ case ProfileArchiveEntryType.KEY_VALUE: {
6246
+ invariant17(entry2.key instanceof Uint8Array, "Invalid key type", {
6247
+ F: __dxlog_file22,
6248
+ L: 86,
6249
+ S: void 0,
6250
+ A: [
6251
+ "entry.key instanceof Uint8Array",
6252
+ "'Invalid key type'"
6253
+ ]
6254
+ });
6255
+ invariant17(entry2.value instanceof Uint8Array, "Invalid value type", {
6256
+ F: __dxlog_file22,
6257
+ L: 87,
6258
+ S: void 0,
6259
+ A: [
6260
+ "entry.value instanceof Uint8Array",
6261
+ "'Invalid value type'"
6262
+ ]
6263
+ });
6264
+ batch.put(entry2.key, entry2.value, {
6265
+ keyEncoding: "binary",
6266
+ valueEncoding: "binary"
6267
+ });
6268
+ break;
6269
+ }
6270
+ default:
6271
+ throw new Error(`Invalid entry type: ${entry2.type}`);
6272
+ }
6273
+ }
6274
+ await batch.write();
6275
+ };
6276
+
6201
6277
  // packages/sdk/client-services/src/packlets/services/service-host.ts
6202
6278
  import { Event as Event9, synchronized as synchronized3 } from "@dxos/async";
6203
6279
  import { clientServiceBundle } from "@dxos/client-protocol";
6204
6280
  import { Context as Context11 } from "@dxos/context";
6205
- import { invariant as invariant18 } from "@dxos/invariant";
6281
+ import { invariant as invariant19 } from "@dxos/invariant";
6206
6282
  import { PublicKey as PublicKey16 } from "@dxos/keys";
6207
- import { log as log21 } from "@dxos/log";
6283
+ import { log as log22 } from "@dxos/log";
6208
6284
  import { WebsocketSignalManager } from "@dxos/messaging";
6209
6285
  import { SwarmNetworkManager, createSimplePeerTransportFactory } from "@dxos/network-manager";
6210
6286
  import { trace as trace10 } from "@dxos/protocols";
@@ -6215,7 +6291,7 @@ import { WebsocketRpcClient } from "@dxos/websocket-rpc";
6215
6291
  // packages/sdk/client-services/src/packlets/devices/devices-service.ts
6216
6292
  import { EventSubscriptions as EventSubscriptions3 } from "@dxos/async";
6217
6293
  import { Stream as Stream11 } from "@dxos/codec-protobuf";
6218
- import { invariant as invariant17 } from "@dxos/invariant";
6294
+ import { invariant as invariant18 } from "@dxos/invariant";
6219
6295
  import { Device as Device2, DeviceKind as DeviceKind2 } from "@dxos/protocols/proto/dxos/client/services";
6220
6296
  var __dxlog_file23 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/devices/devices-service.ts";
6221
6297
  var DevicesServiceImpl = class {
@@ -6234,7 +6310,7 @@ var DevicesServiceImpl = class {
6234
6310
  devices: []
6235
6311
  });
6236
6312
  } else {
6237
- invariant17(this._identityManager.identity?.presence, "presence not present", {
6313
+ invariant18(this._identityManager.identity?.presence, "presence not present", {
6238
6314
  F: __dxlog_file23,
6239
6315
  L: 32,
6240
6316
  S: this,
@@ -6345,7 +6421,7 @@ var findConfigs = () => {
6345
6421
  import { Event as Event8 } from "@dxos/async";
6346
6422
  import { Stream as Stream12 } from "@dxos/codec-protobuf";
6347
6423
  import { PublicKey as PublicKey15 } from "@dxos/keys";
6348
- import { getContextFromEntry, log as log20 } from "@dxos/log";
6424
+ import { getContextFromEntry, log as log21 } from "@dxos/log";
6349
6425
  import { QueryLogsRequest } from "@dxos/protocols/proto/dxos/client/services";
6350
6426
  import { getDebugName, jsonify, numericalValues, tracer } from "@dxos/util";
6351
6427
  var LoggingServiceImpl = class {
@@ -6358,11 +6434,11 @@ var LoggingServiceImpl = class {
6358
6434
  };
6359
6435
  }
6360
6436
  async open() {
6361
- log20.runtimeConfig.processors.push(this._logProcessor);
6437
+ log21.runtimeConfig.processors.push(this._logProcessor);
6362
6438
  }
6363
6439
  async close() {
6364
- const index = log20.runtimeConfig.processors.findIndex((processor) => processor === this._logProcessor);
6365
- log20.runtimeConfig.processors.splice(index, 1);
6440
+ const index = log21.runtimeConfig.processors.findIndex((processor) => processor === this._logProcessor);
6441
+ log21.runtimeConfig.processors.splice(index, 1);
6366
6442
  }
6367
6443
  async controlMetrics({ reset, record }) {
6368
6444
  if (reset) {
@@ -6599,10 +6675,7 @@ var ClientServicesHost = class {
6599
6675
  lockKey,
6600
6676
  onAcquire: () => {
6601
6677
  if (!this._opening) {
6602
- void this.open(new Context11(void 0, {
6603
- F: __dxlog_file24,
6604
- L: 120
6605
- }));
6678
+ void this.open(new Context11());
6606
6679
  }
6607
6680
  },
6608
6681
  onRelease: () => this.close()
@@ -6657,7 +6730,7 @@ var ClientServicesHost = class {
6657
6730
  * Can only be called once.
6658
6731
  */
6659
6732
  initialize({ config, ...options }) {
6660
- invariant18(!this._open, "service host is open", {
6733
+ invariant19(!this._open, "service host is open", {
6661
6734
  F: __dxlog_file24,
6662
6735
  L: 186,
6663
6736
  S: this,
@@ -6666,14 +6739,14 @@ var ClientServicesHost = class {
6666
6739
  "'service host is open'"
6667
6740
  ]
6668
6741
  });
6669
- log21("initializing...", void 0, {
6742
+ log22("initializing...", void 0, {
6670
6743
  F: __dxlog_file24,
6671
6744
  L: 187,
6672
6745
  S: this,
6673
6746
  C: (f, a) => f(...a)
6674
6747
  });
6675
6748
  if (config) {
6676
- invariant18(!this._config, "config already set", {
6749
+ invariant19(!this._config, "config already set", {
6677
6750
  F: __dxlog_file24,
6678
6751
  L: 190,
6679
6752
  S: this,
@@ -6688,7 +6761,7 @@ var ClientServicesHost = class {
6688
6761
  }
6689
6762
  }
6690
6763
  if (!options.signalManager) {
6691
- log21.warn("running signaling without telemetry metadata.", void 0, {
6764
+ log22.warn("running signaling without telemetry metadata.", void 0, {
6692
6765
  F: __dxlog_file24,
6693
6766
  L: 198,
6694
6767
  S: this,
@@ -6699,7 +6772,7 @@ var ClientServicesHost = class {
6699
6772
  iceServers: this._config?.get("runtime.services.ice")
6700
6773
  }), signalManager = new WebsocketSignalManager(this._config?.get("runtime.services.signaling") ?? []) } = options;
6701
6774
  this._signalManager = signalManager;
6702
- invariant18(!this._networkManager, "network manager already set", {
6775
+ invariant19(!this._networkManager, "network manager already set", {
6703
6776
  F: __dxlog_file24,
6704
6777
  L: 209,
6705
6778
  S: this,
@@ -6713,7 +6786,7 @@ var ClientServicesHost = class {
6713
6786
  transportFactory,
6714
6787
  signalManager
6715
6788
  });
6716
- log21("initialized", void 0, {
6789
+ log22("initialized", void 0, {
6717
6790
  F: __dxlog_file24,
6718
6791
  L: 216,
6719
6792
  S: this,
@@ -6725,7 +6798,7 @@ var ClientServicesHost = class {
6725
6798
  return;
6726
6799
  }
6727
6800
  const traceId = PublicKey16.random().toHex();
6728
- log21.trace("dxos.client-services.host.open", trace10.begin({
6801
+ log22.trace("dxos.client-services.host.open", trace10.begin({
6729
6802
  id: traceId
6730
6803
  }), {
6731
6804
  F: __dxlog_file24,
@@ -6733,7 +6806,7 @@ var ClientServicesHost = class {
6733
6806
  S: this,
6734
6807
  C: (f, a) => f(...a)
6735
6808
  });
6736
- invariant18(this._config, "config not set", {
6809
+ invariant19(this._config, "config not set", {
6737
6810
  F: __dxlog_file24,
6738
6811
  L: 229,
6739
6812
  S: this,
@@ -6742,7 +6815,7 @@ var ClientServicesHost = class {
6742
6815
  "'config not set'"
6743
6816
  ]
6744
6817
  });
6745
- invariant18(this._storage, "storage not set", {
6818
+ invariant19(this._storage, "storage not set", {
6746
6819
  F: __dxlog_file24,
6747
6820
  L: 230,
6748
6821
  S: this,
@@ -6751,7 +6824,7 @@ var ClientServicesHost = class {
6751
6824
  "'storage not set'"
6752
6825
  ]
6753
6826
  });
6754
- invariant18(this._signalManager, "signal manager not set", {
6827
+ invariant19(this._signalManager, "signal manager not set", {
6755
6828
  F: __dxlog_file24,
6756
6829
  L: 231,
6757
6830
  S: this,
@@ -6760,7 +6833,7 @@ var ClientServicesHost = class {
6760
6833
  "'signal manager not set'"
6761
6834
  ]
6762
6835
  });
6763
- invariant18(this._networkManager, "network manager not set", {
6836
+ invariant19(this._networkManager, "network manager not set", {
6764
6837
  F: __dxlog_file24,
6765
6838
  L: 232,
6766
6839
  S: this,
@@ -6770,7 +6843,7 @@ var ClientServicesHost = class {
6770
6843
  ]
6771
6844
  });
6772
6845
  this._opening = true;
6773
- log21("opening...", {
6846
+ log22("opening...", {
6774
6847
  lockKey: this._resourceLock?.lockKey
6775
6848
  }, {
6776
6849
  F: __dxlog_file24,
@@ -6824,7 +6897,7 @@ var ClientServicesHost = class {
6824
6897
  this._open = true;
6825
6898
  this._statusUpdate.emit();
6826
6899
  const deviceKey = this._serviceContext.identityManager.identity?.deviceKey;
6827
- log21("opened", {
6900
+ log22("opened", {
6828
6901
  deviceKey
6829
6902
  }, {
6830
6903
  F: __dxlog_file24,
@@ -6832,7 +6905,7 @@ var ClientServicesHost = class {
6832
6905
  S: this,
6833
6906
  C: (f, a) => f(...a)
6834
6907
  });
6835
- log21.trace("dxos.client-services.host.open", trace10.end({
6908
+ log22.trace("dxos.client-services.host.open", trace10.end({
6836
6909
  id: traceId
6837
6910
  }), {
6838
6911
  F: __dxlog_file24,
@@ -6846,7 +6919,7 @@ var ClientServicesHost = class {
6846
6919
  return;
6847
6920
  }
6848
6921
  const deviceKey = this._serviceContext.identityManager.identity?.deviceKey;
6849
- log21("closing...", {
6922
+ log22("closing...", {
6850
6923
  deviceKey
6851
6924
  }, {
6852
6925
  F: __dxlog_file24,
@@ -6864,7 +6937,7 @@ var ClientServicesHost = class {
6864
6937
  await this._level?.close();
6865
6938
  this._open = false;
6866
6939
  this._statusUpdate.emit();
6867
- log21("closed", {
6940
+ log22("closed", {
6868
6941
  deviceKey
6869
6942
  }, {
6870
6943
  F: __dxlog_file24,
@@ -6875,7 +6948,7 @@ var ClientServicesHost = class {
6875
6948
  }
6876
6949
  async reset() {
6877
6950
  const traceId = PublicKey16.random().toHex();
6878
- log21.trace("dxos.sdk.client-services-host.reset", trace10.begin({
6951
+ log22.trace("dxos.sdk.client-services-host.reset", trace10.begin({
6879
6952
  id: traceId
6880
6953
  }), {
6881
6954
  F: __dxlog_file24,
@@ -6883,7 +6956,7 @@ var ClientServicesHost = class {
6883
6956
  S: this,
6884
6957
  C: (f, a) => f(...a)
6885
6958
  });
6886
- log21.info("resetting...", void 0, {
6959
+ log22.info("resetting...", void 0, {
6887
6960
  F: __dxlog_file24,
6888
6961
  L: 342,
6889
6962
  S: this,
@@ -6891,13 +6964,13 @@ var ClientServicesHost = class {
6891
6964
  });
6892
6965
  await this._serviceContext?.close();
6893
6966
  await this._storage.reset();
6894
- log21.info("reset", void 0, {
6967
+ log22.info("reset", void 0, {
6895
6968
  F: __dxlog_file24,
6896
6969
  L: 345,
6897
6970
  S: this,
6898
6971
  C: (f, a) => f(...a)
6899
6972
  });
6900
- log21.trace("dxos.sdk.client-services-host.reset", trace10.end({
6973
+ log22.trace("dxos.sdk.client-services-host.reset", trace10.end({
6901
6974
  id: traceId
6902
6975
  }), {
6903
6976
  F: __dxlog_file24,
@@ -6967,8 +7040,12 @@ export {
6967
7040
  isLocked,
6968
7041
  createStorageObjects,
6969
7042
  createLevel,
7043
+ encodeProfileArchive,
7044
+ decodeProfileArchive,
7045
+ exportProfileData,
7046
+ importProfileData,
6970
7047
  ClientServicesHost,
6971
7048
  ClientServicesProviderResource,
6972
7049
  DiagnosticsCollector
6973
7050
  };
6974
- //# sourceMappingURL=chunk-J4DDMC6A.mjs.map
7051
+ //# sourceMappingURL=chunk-Q2PH3QCC.mjs.map