@dxos/client-services 0.3.2-main.14bd43d → 0.3.2-main.3e3dd7a

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.
@@ -1,7 +1,9 @@
1
1
  "use strict";
2
+ var __create = Object.create;
2
3
  var __defProp = Object.defineProperty;
3
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
5
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
6
8
  var __export = (target, all) => {
7
9
  for (var name in all)
@@ -15,6 +17,14 @@ var __copyProps = (to, from, except, desc) => {
15
17
  }
16
18
  return to;
17
19
  };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
18
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
29
 
20
30
  // packages/sdk/client-services/src/index.ts
@@ -694,6 +704,7 @@ Identity = _ts_decorate([
694
704
  ], Identity);
695
705
 
696
706
  // packages/sdk/client-services/src/packlets/identity/identity-manager.ts
707
+ var import_platform = __toESM(require("platform"));
697
708
  var import_async6 = require("@dxos/async");
698
709
  var import_context3 = require("@dxos/context");
699
710
  var import_credentials4 = require("@dxos/credentials");
@@ -735,7 +746,7 @@ var IdentityManager = class IdentityManager2 {
735
746
  id: traceId
736
747
  }), {
737
748
  F: __dxlog_file3,
738
- L: 73,
749
+ L: 75,
739
750
  S: this,
740
751
  C: (f, a) => f(...a)
741
752
  });
@@ -744,7 +755,7 @@ var IdentityManager = class IdentityManager2 {
744
755
  identityRecord
745
756
  }, {
746
757
  F: __dxlog_file3,
747
- L: 76,
758
+ L: 78,
748
759
  S: this,
749
760
  C: (f, a) => f(...a)
750
761
  });
@@ -757,7 +768,7 @@ var IdentityManager = class IdentityManager2 {
757
768
  displayName: this._identity.profileDocument?.displayName
758
769
  }, {
759
770
  F: __dxlog_file3,
760
- L: 81,
771
+ L: 83,
761
772
  S: this,
762
773
  C: (f, a) => f(...a)
763
774
  });
@@ -767,7 +778,7 @@ var IdentityManager = class IdentityManager2 {
767
778
  id: traceId
768
779
  }), {
769
780
  F: __dxlog_file3,
770
- L: 87,
781
+ L: 89,
771
782
  S: this,
772
783
  C: (f, a) => f(...a)
773
784
  });
@@ -778,7 +789,7 @@ var IdentityManager = class IdentityManager2 {
778
789
  async createIdentity({ displayName } = {}) {
779
790
  (0, import_invariant2.invariant)(!this._identity, "Identity already exists.", {
780
791
  F: __dxlog_file3,
781
- L: 95,
792
+ L: 97,
782
793
  S: this,
783
794
  A: [
784
795
  "!this._identity",
@@ -787,7 +798,7 @@ var IdentityManager = class IdentityManager2 {
787
798
  });
788
799
  (0, import_log3.log)("creating identity...", void 0, {
789
800
  F: __dxlog_file3,
790
- L: 96,
801
+ L: 98,
791
802
  S: this,
792
803
  C: (f, a) => f(...a)
793
804
  });
@@ -808,7 +819,7 @@ var IdentityManager = class IdentityManager2 {
808
819
  const generator = new import_credentials4.CredentialGenerator(this._keyring, identityRecord.identityKey, identityRecord.deviceKey);
809
820
  (0, import_invariant2.invariant)(identityRecord.haloSpace.genesisFeedKey, "Genesis feed key is required.", {
810
821
  F: __dxlog_file3,
811
- L: 115,
822
+ L: 117,
812
823
  S: this,
813
824
  A: [
814
825
  "identityRecord.haloSpace.genesisFeedKey",
@@ -817,7 +828,7 @@ var IdentityManager = class IdentityManager2 {
817
828
  });
818
829
  (0, import_invariant2.invariant)(identityRecord.haloSpace.dataFeedKey, "Data feed key is required.", {
819
830
  F: __dxlog_file3,
820
- L: 116,
831
+ L: 118,
821
832
  S: this,
822
833
  A: [
823
834
  "identityRecord.haloSpace.dataFeedKey",
@@ -836,6 +847,13 @@ var IdentityManager = class IdentityManager2 {
836
847
  }));
837
848
  }
838
849
  credentials.push(await generator.createDeviceAuthorization(identityRecord.deviceKey));
850
+ credentials.push(await generator.createDeviceProfile({
851
+ platform: import_platform.default.name,
852
+ platformVersion: import_platform.default.version,
853
+ architecture: typeof import_platform.default.os?.architecture === "number" ? String(import_platform.default.os.architecture) : void 0,
854
+ os: import_platform.default.os?.family,
855
+ osVersion: import_platform.default.os?.version
856
+ }));
839
857
  for (const credential of credentials) {
840
858
  await identity.controlPipeline.writer.write({
841
859
  credential: {
@@ -852,7 +870,7 @@ var IdentityManager = class IdentityManager2 {
852
870
  displayName: this._identity.profileDocument?.displayName
853
871
  }, {
854
872
  F: __dxlog_file3,
855
- L: 151,
873
+ L: 163,
856
874
  S: this,
857
875
  C: (f, a) => f(...a)
858
876
  });
@@ -862,7 +880,7 @@ var IdentityManager = class IdentityManager2 {
862
880
  deviceKey: identity.deviceKey
863
881
  }, {
864
882
  F: __dxlog_file3,
865
- L: 157,
883
+ L: 169,
866
884
  S: this,
867
885
  C: (f, a) => f(...a)
868
886
  });
@@ -876,13 +894,13 @@ var IdentityManager = class IdentityManager2 {
876
894
  params
877
895
  }, {
878
896
  F: __dxlog_file3,
879
- L: 165,
897
+ L: 177,
880
898
  S: this,
881
899
  C: (f, a) => f(...a)
882
900
  });
883
901
  (0, import_invariant2.invariant)(!this._identity, "Identity already exists.", {
884
902
  F: __dxlog_file3,
885
- L: 166,
903
+ L: 178,
886
904
  S: this,
887
905
  A: [
888
906
  "!this._identity",
@@ -910,7 +928,7 @@ var IdentityManager = class IdentityManager2 {
910
928
  displayName: this._identity.profileDocument?.displayName
911
929
  }, {
912
930
  F: __dxlog_file3,
913
- L: 185,
931
+ L: 197,
914
932
  S: this,
915
933
  C: (f, a) => f(...a)
916
934
  });
@@ -920,7 +938,7 @@ var IdentityManager = class IdentityManager2 {
920
938
  deviceKey: identity.deviceKey
921
939
  }, {
922
940
  F: __dxlog_file3,
923
- L: 191,
941
+ L: 203,
924
942
  S: this,
925
943
  C: (f, a) => f(...a)
926
944
  });
@@ -932,7 +950,7 @@ var IdentityManager = class IdentityManager2 {
932
950
  async updateProfile(profile) {
933
951
  (0, import_invariant2.invariant)(this._identity, "Identity not initialized.", {
934
952
  F: __dxlog_file3,
935
- L: 199,
953
+ L: 211,
936
954
  S: this,
937
955
  A: [
938
956
  "this._identity",
@@ -960,51 +978,10 @@ var IdentityManager = class IdentityManager2 {
960
978
  this.stateUpdate.emit();
961
979
  return profile;
962
980
  }
963
- async updateDevice({ deviceKey, profile }) {
964
- (0, import_invariant2.invariant)(this._identity, "Identity not initialized.", {
965
- F: __dxlog_file3,
966
- L: 216,
967
- S: this,
968
- A: [
969
- "this._identity",
970
- "'Identity not initialized.'"
971
- ]
972
- });
973
- (0, import_invariant2.invariant)(this._identity.authorizedDeviceKeys.has(deviceKey), "Device not authorized.", {
974
- F: __dxlog_file3,
975
- L: 218,
976
- S: this,
977
- A: [
978
- "this._identity.authorizedDeviceKeys.has(deviceKey)",
979
- "'Device not authorized.'"
980
- ]
981
- });
982
- const credential = await this._identity.getIdentityCredentialSigner().createCredential({
983
- subject: this._identity.identityKey,
984
- assertion: {
985
- "@type": "dxos.halo.credentials.DeviceProfile",
986
- deviceKey,
987
- profile
988
- }
989
- });
990
- const receipt = await this._identity.controlPipeline.writer.write({
991
- credential: {
992
- credential
993
- }
994
- });
995
- await this._identity.controlPipeline.state.waitUntilTimeframe(new import_timeframe.Timeframe([
996
- [
997
- receipt.feedKey,
998
- receipt.seq
999
- ]
1000
- ]));
1001
- this.stateUpdate.emit();
1002
- return profile;
1003
- }
1004
981
  async _constructIdentity(identityRecord) {
1005
982
  (0, import_invariant2.invariant)(!this._identity, void 0, {
1006
983
  F: __dxlog_file3,
1007
- L: 236,
984
+ L: 228,
1008
985
  S: this,
1009
986
  A: [
1010
987
  "!this._identity",
@@ -1015,13 +992,13 @@ var IdentityManager = class IdentityManager2 {
1015
992
  identityRecord
1016
993
  }, {
1017
994
  F: __dxlog_file3,
1018
- L: 237,
995
+ L: 229,
1019
996
  S: this,
1020
997
  C: (f, a) => f(...a)
1021
998
  });
1022
999
  (0, import_invariant2.invariant)(identityRecord.haloSpace.controlFeedKey, void 0, {
1023
1000
  F: __dxlog_file3,
1024
- L: 240,
1001
+ L: 232,
1025
1002
  S: this,
1026
1003
  A: [
1027
1004
  "identityRecord.haloSpace.controlFeedKey",
@@ -1033,7 +1010,7 @@ var IdentityManager = class IdentityManager2 {
1033
1010
  });
1034
1011
  (0, import_invariant2.invariant)(identityRecord.haloSpace.dataFeedKey, void 0, {
1035
1012
  F: __dxlog_file3,
1036
- L: 244,
1013
+ L: 236,
1037
1014
  S: this,
1038
1015
  A: [
1039
1016
  "identityRecord.haloSpace.dataFeedKey",
@@ -1065,7 +1042,7 @@ var IdentityManager = class IdentityManager2 {
1065
1042
  identityKey: identityRecord.identityKey
1066
1043
  }, {
1067
1044
  F: __dxlog_file3,
1068
- L: 268,
1045
+ L: 260,
1069
1046
  S: this,
1070
1047
  C: (f, a) => f(...a)
1071
1048
  });
@@ -1086,7 +1063,7 @@ var IdentityManager = class IdentityManager2 {
1086
1063
  onAuthFailure: () => {
1087
1064
  import_log3.log.warn("auth failure", void 0, {
1088
1065
  F: __dxlog_file3,
1089
- L: 287,
1066
+ L: 279,
1090
1067
  S: this,
1091
1068
  C: (f, a) => f(...a)
1092
1069
  });
@@ -2300,15 +2277,6 @@ var InvitationsServiceImpl = class {
2300
2277
  await accepted.cancel();
2301
2278
  this._acceptInvitations.delete(invitationId);
2302
2279
  this._removedAccepted.emit(accepted.get());
2303
- } else {
2304
- import_log6.log.warn("invalid invitation", {
2305
- invitationId
2306
- }, {
2307
- F: __dxlog_file8,
2308
- L: 132,
2309
- S: this,
2310
- C: (f, a) => f(...a)
2311
- });
2312
2280
  }
2313
2281
  }
2314
2282
  queryInvitations() {
@@ -2596,10 +2564,10 @@ var getPlatform = () => {
2596
2564
  };
2597
2565
  }
2598
2566
  } else {
2599
- const { platform, version, arch } = process;
2567
+ const { platform: platform2, version, arch } = process;
2600
2568
  return {
2601
2569
  type: "node",
2602
- platform: `${platform} ${version} ${arch}`,
2570
+ platform: `${platform2} ${version} ${arch}`,
2603
2571
  runtime: process.version,
2604
2572
  uptime: Math.floor(process.uptime()),
2605
2573
  memory: process.memoryUsage()
@@ -2608,7 +2576,7 @@ var getPlatform = () => {
2608
2576
  };
2609
2577
 
2610
2578
  // packages/sdk/client-services/src/version.ts
2611
- var DXOS_VERSION = "0.3.2-main.14bd43d";
2579
+ var DXOS_VERSION = "0.3.2-main.3e3dd7a";
2612
2580
 
2613
2581
  // packages/sdk/client-services/src/packlets/services/diagnostics.ts
2614
2582
  var __dxlog_file10 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/services/diagnostics.ts";
@@ -4278,7 +4246,7 @@ var import_context10 = require("@dxos/context");
4278
4246
  var import_document_model2 = require("@dxos/document-model");
4279
4247
  var import_echo_pipeline3 = require("@dxos/echo-pipeline");
4280
4248
  var import_echo_schema = require("@dxos/echo-schema");
4281
- var import_invariant16 = require("@dxos/invariant");
4249
+ var import_invariant15 = require("@dxos/invariant");
4282
4250
  var import_keys12 = require("@dxos/keys");
4283
4251
  var import_log16 = require("@dxos/log");
4284
4252
  var import_messaging = require("@dxos/messaging");
@@ -4317,33 +4285,13 @@ var ServiceRegistry = class {
4317
4285
  // packages/sdk/client-services/src/packlets/devices/devices-service.ts
4318
4286
  var import_async15 = require("@dxos/async");
4319
4287
  var import_codec_protobuf12 = require("@dxos/codec-protobuf");
4320
- var import_invariant14 = require("@dxos/invariant");
4321
4288
  var import_services11 = require("@dxos/protocols/proto/dxos/client/services");
4322
- var __dxlog_file16 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/devices/devices-service.ts";
4323
4289
  var DevicesServiceImpl = class {
4324
4290
  constructor(_identityManager) {
4325
4291
  this._identityManager = _identityManager;
4326
4292
  }
4327
4293
  async updateDevice(profile) {
4328
- (0, import_invariant14.invariant)(this._identityManager.identity, "Identity not initialized", {
4329
- F: __dxlog_file16,
4330
- L: 17,
4331
- S: this,
4332
- A: [
4333
- "this._identityManager.identity",
4334
- "'Identity not initialized'"
4335
- ]
4336
- });
4337
- const deviceKey = this._identityManager.identity.deviceKey;
4338
- await this._identityManager.updateDevice({
4339
- deviceKey,
4340
- profile
4341
- });
4342
- return {
4343
- deviceKey,
4344
- kind: import_services11.DeviceKind.CURRENT,
4345
- profile
4346
- };
4294
+ throw new Error("Method not implemented.");
4347
4295
  }
4348
4296
  queryDevices() {
4349
4297
  return new import_codec_protobuf12.Stream(({ next }) => {
@@ -4379,7 +4327,7 @@ var DevicesServiceImpl = class {
4379
4327
  };
4380
4328
 
4381
4329
  // packages/sdk/client-services/src/packlets/locks/node.ts
4382
- var import_invariant15 = require("@dxos/invariant");
4330
+ var import_invariant14 = require("@dxos/invariant");
4383
4331
  var import_lock_file = require("@dxos/lock-file");
4384
4332
  var import_log14 = require("@dxos/log");
4385
4333
  function _ts_decorate6(decorators, target, key, desc) {
@@ -4392,7 +4340,7 @@ function _ts_decorate6(decorators, target, key, desc) {
4392
4340
  r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
4393
4341
  return c > 3 && r && Object.defineProperty(target, key, r), r;
4394
4342
  }
4395
- var __dxlog_file17 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/locks/node.ts";
4343
+ var __dxlog_file16 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/locks/node.ts";
4396
4344
  var Lock = class {
4397
4345
  constructor({ lockKey: lockPath, onAcquire, onRelease }) {
4398
4346
  this._lockPath = lockPath;
@@ -4404,7 +4352,7 @@ var Lock = class {
4404
4352
  }
4405
4353
  async acquire() {
4406
4354
  (0, import_log14.log)("acquiring lock...", void 0, {
4407
- F: __dxlog_file17,
4355
+ F: __dxlog_file16,
4408
4356
  L: 32,
4409
4357
  S: this,
4410
4358
  C: (f, a) => f(...a)
@@ -4412,7 +4360,7 @@ var Lock = class {
4412
4360
  this._fileHandle = await import_lock_file.LockFile.acquire(this._lockPath);
4413
4361
  await this._onAcquire?.();
4414
4362
  (0, import_log14.log)("acquired lock", void 0, {
4415
- F: __dxlog_file17,
4363
+ F: __dxlog_file16,
4416
4364
  L: 37,
4417
4365
  S: this,
4418
4366
  C: (f, a) => f(...a)
@@ -4420,8 +4368,8 @@ var Lock = class {
4420
4368
  }
4421
4369
  async release() {
4422
4370
  await this._onRelease?.();
4423
- (0, import_invariant15.invariant)(this._fileHandle, "Lock is not acquired", {
4424
- F: __dxlog_file17,
4371
+ (0, import_invariant14.invariant)(this._fileHandle, "Lock is not acquired", {
4372
+ F: __dxlog_file16,
4425
4373
  L: 42,
4426
4374
  S: this,
4427
4375
  A: [
@@ -4700,7 +4648,7 @@ function _ts_decorate7(decorators, target, key, desc) {
4700
4648
  r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
4701
4649
  return c > 3 && r && Object.defineProperty(target, key, r), r;
4702
4650
  }
4703
- var __dxlog_file18 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/services/service-host.ts";
4651
+ var __dxlog_file17 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/services/service-host.ts";
4704
4652
  var createDefaultModelFactory = () => {
4705
4653
  return new import_model_factory.ModelFactory().registerModel(import_document_model2.DocumentModel).registerModel(import_text_model.TextModel);
4706
4654
  };
@@ -4800,8 +4748,8 @@ var ClientServicesHost = class ClientServicesHost2 {
4800
4748
  * Can only be called once.
4801
4749
  */
4802
4750
  initialize({ config, ...options }) {
4803
- (0, import_invariant16.invariant)(!this._open, "service host is open", {
4804
- F: __dxlog_file18,
4751
+ (0, import_invariant15.invariant)(!this._open, "service host is open", {
4752
+ F: __dxlog_file17,
4805
4753
  L: 201,
4806
4754
  S: this,
4807
4755
  A: [
@@ -4810,14 +4758,14 @@ var ClientServicesHost = class ClientServicesHost2 {
4810
4758
  ]
4811
4759
  });
4812
4760
  (0, import_log16.log)("initializing...", void 0, {
4813
- F: __dxlog_file18,
4761
+ F: __dxlog_file17,
4814
4762
  L: 202,
4815
4763
  S: this,
4816
4764
  C: (f, a) => f(...a)
4817
4765
  });
4818
4766
  if (config) {
4819
- (0, import_invariant16.invariant)(!this._config, "config already set", {
4820
- F: __dxlog_file18,
4767
+ (0, import_invariant15.invariant)(!this._config, "config already set", {
4768
+ F: __dxlog_file17,
4821
4769
  L: 205,
4822
4770
  S: this,
4823
4771
  A: [
@@ -4834,8 +4782,8 @@ var ClientServicesHost = class ClientServicesHost2 {
4834
4782
  iceServers: this._config?.get("runtime.services.ice")
4835
4783
  }), signalManager = new import_messaging.WebsocketSignalManager(this._config?.get("runtime.services.signaling") ?? []) } = options;
4836
4784
  this._signalManager = signalManager;
4837
- (0, import_invariant16.invariant)(!this._networkManager, "network manager already set", {
4838
- F: __dxlog_file18,
4785
+ (0, import_invariant15.invariant)(!this._networkManager, "network manager already set", {
4786
+ F: __dxlog_file17,
4839
4787
  L: 221,
4840
4788
  S: this,
4841
4789
  A: [
@@ -4849,7 +4797,7 @@ var ClientServicesHost = class ClientServicesHost2 {
4849
4797
  signalManager
4850
4798
  });
4851
4799
  (0, import_log16.log)("initialized", void 0, {
4852
- F: __dxlog_file18,
4800
+ F: __dxlog_file17,
4853
4801
  L: 228,
4854
4802
  S: this,
4855
4803
  C: (f, a) => f(...a)
@@ -4863,13 +4811,13 @@ var ClientServicesHost = class ClientServicesHost2 {
4863
4811
  import_log16.log.trace("dxos.client-services.host.open", import_protocols12.trace.begin({
4864
4812
  id: traceId
4865
4813
  }), {
4866
- F: __dxlog_file18,
4814
+ F: __dxlog_file17,
4867
4815
  L: 239,
4868
4816
  S: this,
4869
4817
  C: (f, a) => f(...a)
4870
4818
  });
4871
- (0, import_invariant16.invariant)(this._config, "config not set", {
4872
- F: __dxlog_file18,
4819
+ (0, import_invariant15.invariant)(this._config, "config not set", {
4820
+ F: __dxlog_file17,
4873
4821
  L: 241,
4874
4822
  S: this,
4875
4823
  A: [
@@ -4877,8 +4825,8 @@ var ClientServicesHost = class ClientServicesHost2 {
4877
4825
  "'config not set'"
4878
4826
  ]
4879
4827
  });
4880
- (0, import_invariant16.invariant)(this._storage, "storage not set", {
4881
- F: __dxlog_file18,
4828
+ (0, import_invariant15.invariant)(this._storage, "storage not set", {
4829
+ F: __dxlog_file17,
4882
4830
  L: 242,
4883
4831
  S: this,
4884
4832
  A: [
@@ -4886,8 +4834,8 @@ var ClientServicesHost = class ClientServicesHost2 {
4886
4834
  "'storage not set'"
4887
4835
  ]
4888
4836
  });
4889
- (0, import_invariant16.invariant)(this._signalManager, "signal manager not set", {
4890
- F: __dxlog_file18,
4837
+ (0, import_invariant15.invariant)(this._signalManager, "signal manager not set", {
4838
+ F: __dxlog_file17,
4891
4839
  L: 243,
4892
4840
  S: this,
4893
4841
  A: [
@@ -4895,8 +4843,8 @@ var ClientServicesHost = class ClientServicesHost2 {
4895
4843
  "'signal manager not set'"
4896
4844
  ]
4897
4845
  });
4898
- (0, import_invariant16.invariant)(this._networkManager, "network manager not set", {
4899
- F: __dxlog_file18,
4846
+ (0, import_invariant15.invariant)(this._networkManager, "network manager not set", {
4847
+ F: __dxlog_file17,
4900
4848
  L: 244,
4901
4849
  S: this,
4902
4850
  A: [
@@ -4908,7 +4856,7 @@ var ClientServicesHost = class ClientServicesHost2 {
4908
4856
  (0, import_log16.log)("opening...", {
4909
4857
  lockKey: this._resourceLock?.lockKey
4910
4858
  }, {
4911
- F: __dxlog_file18,
4859
+ F: __dxlog_file17,
4912
4860
  L: 247,
4913
4861
  S: this,
4914
4862
  C: (f, a) => f(...a)
@@ -4954,7 +4902,7 @@ var ClientServicesHost = class ClientServicesHost2 {
4954
4902
  (0, import_log16.log)("opened", {
4955
4903
  deviceKey
4956
4904
  }, {
4957
- F: __dxlog_file18,
4905
+ F: __dxlog_file17,
4958
4906
  L: 316,
4959
4907
  S: this,
4960
4908
  C: (f, a) => f(...a)
@@ -4962,7 +4910,7 @@ var ClientServicesHost = class ClientServicesHost2 {
4962
4910
  import_log16.log.trace("dxos.client-services.host.open", import_protocols12.trace.end({
4963
4911
  id: traceId
4964
4912
  }), {
4965
- F: __dxlog_file18,
4913
+ F: __dxlog_file17,
4966
4914
  L: 317,
4967
4915
  S: this,
4968
4916
  C: (f, a) => f(...a)
@@ -4976,7 +4924,7 @@ var ClientServicesHost = class ClientServicesHost2 {
4976
4924
  (0, import_log16.log)("closing...", {
4977
4925
  deviceKey
4978
4926
  }, {
4979
- F: __dxlog_file18,
4927
+ F: __dxlog_file17,
4980
4928
  L: 328,
4981
4929
  S: this,
4982
4930
  C: (f, a) => f(...a)
@@ -4992,7 +4940,7 @@ var ClientServicesHost = class ClientServicesHost2 {
4992
4940
  (0, import_log16.log)("closed", {
4993
4941
  deviceKey
4994
4942
  }, {
4995
- F: __dxlog_file18,
4943
+ F: __dxlog_file17,
4996
4944
  L: 335,
4997
4945
  S: this,
4998
4946
  C: (f, a) => f(...a)
@@ -5003,13 +4951,13 @@ var ClientServicesHost = class ClientServicesHost2 {
5003
4951
  import_log16.log.trace("dxos.sdk.client-services-host.reset", import_protocols12.trace.begin({
5004
4952
  id: traceId
5005
4953
  }), {
5006
- F: __dxlog_file18,
4954
+ F: __dxlog_file17,
5007
4955
  L: 340,
5008
4956
  S: this,
5009
4957
  C: (f, a) => f(...a)
5010
4958
  });
5011
4959
  (0, import_log16.log)("resetting...", void 0, {
5012
- F: __dxlog_file18,
4960
+ F: __dxlog_file17,
5013
4961
  L: 342,
5014
4962
  S: this,
5015
4963
  C: (f, a) => f(...a)
@@ -5017,7 +4965,7 @@ var ClientServicesHost = class ClientServicesHost2 {
5017
4965
  await this._serviceContext?.close();
5018
4966
  await this._storage.reset();
5019
4967
  (0, import_log16.log)("reset", void 0, {
5020
- F: __dxlog_file18,
4968
+ F: __dxlog_file17,
5021
4969
  L: 345,
5022
4970
  S: this,
5023
4971
  C: (f, a) => f(...a)
@@ -5025,7 +4973,7 @@ var ClientServicesHost = class ClientServicesHost2 {
5025
4973
  import_log16.log.trace("dxos.sdk.client-services-host.reset", import_protocols12.trace.end({
5026
4974
  id: traceId
5027
4975
  }), {
5028
- F: __dxlog_file18,
4976
+ F: __dxlog_file17,
5029
4977
  L: 346,
5030
4978
  S: this,
5031
4979
  C: (f, a) => f(...a)
@@ -5082,10 +5030,10 @@ var import_util11 = require("@dxos/util");
5082
5030
  // packages/sdk/client-services/src/packlets/vault/shell-runtime.ts
5083
5031
  var import_async18 = require("@dxos/async");
5084
5032
  var import_client_protocol6 = require("@dxos/client-protocol");
5085
- var import_invariant17 = require("@dxos/invariant");
5033
+ var import_invariant16 = require("@dxos/invariant");
5086
5034
  var import_iframe = require("@dxos/protocols/proto/dxos/iframe");
5087
5035
  var import_rpc2 = require("@dxos/rpc");
5088
- var __dxlog_file19 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/vault/shell-runtime.ts";
5036
+ var __dxlog_file18 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/vault/shell-runtime.ts";
5089
5037
  var ShellRuntimeImpl = class {
5090
5038
  constructor(_port) {
5091
5039
  this._port = _port;
@@ -5112,8 +5060,8 @@ var ShellRuntimeImpl = class {
5112
5060
  });
5113
5061
  }
5114
5062
  async setAppContext(context) {
5115
- (0, import_invariant17.invariant)(this._appRpc, "runtime not open", {
5116
- F: __dxlog_file19,
5063
+ (0, import_invariant16.invariant)(this._appRpc, "runtime not open", {
5064
+ F: __dxlog_file18,
5117
5065
  L: 44,
5118
5066
  S: this,
5119
5067
  A: [
@@ -5158,7 +5106,7 @@ function _ts_decorate8(decorators, target, key, desc) {
5158
5106
  r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5159
5107
  return c > 3 && r && Object.defineProperty(target, key, r), r;
5160
5108
  }
5161
- var __dxlog_file20 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/vault/iframe-host-runtime.ts";
5109
+ var __dxlog_file19 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/vault/iframe-host-runtime.ts";
5162
5110
  var LOCK_KEY = "DXOS_RESOURCE_LOCK";
5163
5111
  var IFrameHostRuntime = class {
5164
5112
  constructor({ config, origin, appPort, shellPort }) {
@@ -5179,7 +5127,7 @@ var IFrameHostRuntime = class {
5179
5127
  }
5180
5128
  async start() {
5181
5129
  (0, import_log17.log)("starting...", void 0, {
5182
- F: __dxlog_file20,
5130
+ F: __dxlog_file19,
5183
5131
  L: 71,
5184
5132
  S: this,
5185
5133
  C: (f, a) => f(...a)
@@ -5228,7 +5176,7 @@ var IFrameHostRuntime = class {
5228
5176
  ]);
5229
5177
  this._ready.wake(void 0);
5230
5178
  (0, import_log17.log)("started", void 0, {
5231
- F: __dxlog_file20,
5179
+ F: __dxlog_file19,
5232
5180
  L: 114,
5233
5181
  S: this,
5234
5182
  C: (f, a) => f(...a)
@@ -5236,7 +5184,7 @@ var IFrameHostRuntime = class {
5236
5184
  } catch (err) {
5237
5185
  this._ready.wake(err);
5238
5186
  import_log17.log.catch(err, void 0, {
5239
- F: __dxlog_file20,
5187
+ F: __dxlog_file19,
5240
5188
  L: 117,
5241
5189
  S: this,
5242
5190
  C: (f, a) => f(...a)
@@ -5245,7 +5193,7 @@ var IFrameHostRuntime = class {
5245
5193
  }
5246
5194
  async stop() {
5247
5195
  (0, import_log17.log)("stopping...", void 0, {
5248
- F: __dxlog_file20,
5196
+ F: __dxlog_file19,
5249
5197
  L: 122,
5250
5198
  S: this,
5251
5199
  C: (f, a) => f(...a)
@@ -5254,7 +5202,7 @@ var IFrameHostRuntime = class {
5254
5202
  await this._clientServices.close();
5255
5203
  await this._shellRuntime?.close();
5256
5204
  (0, import_log17.log)("stopped", void 0, {
5257
- F: __dxlog_file20,
5205
+ F: __dxlog_file19,
5258
5206
  L: 126,
5259
5207
  S: this,
5260
5208
  C: (f, a) => f(...a)
@@ -5273,7 +5221,7 @@ var import_network_manager4 = require("@dxos/network-manager");
5273
5221
  var import_protocols13 = require("@dxos/protocols");
5274
5222
  var import_rpc3 = require("@dxos/rpc");
5275
5223
  var import_util12 = require("@dxos/util");
5276
- var __dxlog_file21 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/vault/iframe-proxy-runtime.ts";
5224
+ var __dxlog_file20 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/vault/iframe-proxy-runtime.ts";
5277
5225
  var IFrameProxyRuntime = class {
5278
5226
  constructor({ config, systemPort, shellPort }) {
5279
5227
  this._id = String(Math.floor(Math.random() * 1e6));
@@ -5321,7 +5269,7 @@ var IFrameProxyRuntime = class {
5321
5269
  });
5322
5270
  } catch (err) {
5323
5271
  import_log18.log.catch(err, void 0, {
5324
- F: __dxlog_file21,
5272
+ F: __dxlog_file20,
5325
5273
  L: 85,
5326
5274
  S: this,
5327
5275
  C: (f, a) => f(...a)
@@ -5351,7 +5299,7 @@ var import_network_manager5 = require("@dxos/network-manager");
5351
5299
  // packages/sdk/client-services/src/packlets/vault/worker-session.ts
5352
5300
  var import_async21 = require("@dxos/async");
5353
5301
  var import_client_protocol9 = require("@dxos/client-protocol");
5354
- var import_invariant18 = require("@dxos/invariant");
5302
+ var import_invariant17 = require("@dxos/invariant");
5355
5303
  var import_log19 = require("@dxos/log");
5356
5304
  var import_rpc4 = require("@dxos/rpc");
5357
5305
  var import_util13 = require("@dxos/util");
@@ -5365,13 +5313,13 @@ function _ts_decorate9(decorators, target, key, desc) {
5365
5313
  r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5366
5314
  return c > 3 && r && Object.defineProperty(target, key, r), r;
5367
5315
  }
5368
- var __dxlog_file22 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/vault/worker-session.ts";
5316
+ var __dxlog_file21 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/vault/worker-session.ts";
5369
5317
  var WorkerSession = class {
5370
5318
  constructor({ serviceHost, systemPort, appPort, shellPort, readySignal }) {
5371
5319
  this._startTrigger = new import_async21.Trigger();
5372
5320
  this.onClose = new import_util13.Callback();
5373
- (0, import_invariant18.invariant)(serviceHost, void 0, {
5374
- F: __dxlog_file22,
5321
+ (0, import_invariant17.invariant)(serviceHost, void 0, {
5322
+ F: __dxlog_file21,
5375
5323
  L: 49,
5376
5324
  S: this,
5377
5325
  A: [
@@ -5426,7 +5374,7 @@ var WorkerSession = class {
5426
5374
  await this.close();
5427
5375
  } catch (err) {
5428
5376
  import_log19.log.catch(err, void 0, {
5429
- F: __dxlog_file22,
5377
+ F: __dxlog_file21,
5430
5378
  L: 99,
5431
5379
  S: this,
5432
5380
  C: (f, a) => f(...a)
@@ -5443,7 +5391,7 @@ var WorkerSession = class {
5443
5391
  }
5444
5392
  async open() {
5445
5393
  import_log19.log.info("opening...", void 0, {
5446
- F: __dxlog_file22,
5394
+ F: __dxlog_file21,
5447
5395
  L: 113,
5448
5396
  S: this,
5449
5397
  C: (f, a) => f(...a)
@@ -5460,7 +5408,7 @@ var WorkerSession = class {
5460
5408
  void this._afterLockReleases(this.lockKey, () => this.close());
5461
5409
  }
5462
5410
  import_log19.log.info("opened", void 0, {
5463
- F: __dxlog_file22,
5411
+ F: __dxlog_file21,
5464
5412
  L: 124,
5465
5413
  S: this,
5466
5414
  C: (f, a) => f(...a)
@@ -5468,7 +5416,7 @@ var WorkerSession = class {
5468
5416
  }
5469
5417
  async close() {
5470
5418
  import_log19.log.info("closing...", void 0, {
5471
- F: __dxlog_file22,
5419
+ F: __dxlog_file21,
5472
5420
  L: 128,
5473
5421
  S: this,
5474
5422
  C: (f, a) => f(...a)
@@ -5477,7 +5425,7 @@ var WorkerSession = class {
5477
5425
  await this.onClose.callIfSet();
5478
5426
  } catch (err) {
5479
5427
  import_log19.log.catch(err, void 0, {
5480
- F: __dxlog_file22,
5428
+ F: __dxlog_file21,
5481
5429
  L: 132,
5482
5430
  S: this,
5483
5431
  C: (f, a) => f(...a)
@@ -5488,7 +5436,7 @@ var WorkerSession = class {
5488
5436
  this._iframeRpc.close()
5489
5437
  ]);
5490
5438
  import_log19.log.info("closed", void 0, {
5491
- F: __dxlog_file22,
5439
+ F: __dxlog_file21,
5492
5440
  L: 136,
5493
5441
  S: this,
5494
5442
  C: (f, a) => f(...a)
@@ -5499,7 +5447,7 @@ var WorkerSession = class {
5499
5447
  await (0, import_async21.asyncTimeout)(this._shellClientRpc.open(), 1e3);
5500
5448
  } catch {
5501
5449
  import_log19.log.info("No shell connected.", void 0, {
5502
- F: __dxlog_file22,
5450
+ F: __dxlog_file21,
5503
5451
  L: 143,
5504
5452
  S: this,
5505
5453
  C: (f, a) => f(...a)
@@ -5519,7 +5467,7 @@ _ts_decorate9([
5519
5467
  ], WorkerSession.prototype, "lockKey", void 0);
5520
5468
 
5521
5469
  // packages/sdk/client-services/src/packlets/vault/worker-runtime.ts
5522
- var __dxlog_file23 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/vault/worker-runtime.ts";
5470
+ var __dxlog_file22 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/vault/worker-runtime.ts";
5523
5471
  var WorkerRuntime = class {
5524
5472
  constructor(_configProvider) {
5525
5473
  this._configProvider = _configProvider;
@@ -5539,7 +5487,7 @@ var WorkerRuntime = class {
5539
5487
  }
5540
5488
  async start() {
5541
5489
  (0, import_log20.log)("starting...", void 0, {
5542
- F: __dxlog_file23,
5490
+ F: __dxlog_file22,
5543
5491
  L: 52,
5544
5492
  S: this,
5545
5493
  C: (f, a) => f(...a)
@@ -5555,7 +5503,7 @@ var WorkerRuntime = class {
5555
5503
  await this._clientServices.open(new import_context12.Context());
5556
5504
  this._ready.wake(void 0);
5557
5505
  (0, import_log20.log)("started", void 0, {
5558
- F: __dxlog_file23,
5506
+ F: __dxlog_file22,
5559
5507
  L: 66,
5560
5508
  S: this,
5561
5509
  C: (f, a) => f(...a)
@@ -5563,7 +5511,7 @@ var WorkerRuntime = class {
5563
5511
  } catch (err) {
5564
5512
  this._ready.wake(err);
5565
5513
  import_log20.log.error("starting", err, {
5566
- F: __dxlog_file23,
5514
+ F: __dxlog_file22,
5567
5515
  L: 69,
5568
5516
  S: this,
5569
5517
  C: (f, a) => f(...a)
@@ -5597,7 +5545,7 @@ var WorkerRuntime = class {
5597
5545
  */
5598
5546
  _reconnectWebrtc() {
5599
5547
  (0, import_log20.log)("reconnecting webrtc...", void 0, {
5600
- F: __dxlog_file23,
5548
+ F: __dxlog_file22,
5601
5549
  L: 106,
5602
5550
  S: this,
5603
5551
  C: (f, a) => f(...a)