@dxos/client-services 0.1.56 → 0.1.57-main.281294d

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.
@@ -71,7 +71,7 @@ var import_protocols = require("@dxos/protocols");
71
71
  var import_services = require("@dxos/protocols/proto/dxos/client/services");
72
72
 
73
73
  // packages/sdk/client-services/src/version.ts
74
- var DXOS_VERSION = "0.1.56";
74
+ var DXOS_VERSION = "0.1.57-main.281294d";
75
75
 
76
76
  // packages/sdk/client-services/src/packlets/services/platform.ts
77
77
  var getPlatform = () => {
@@ -102,7 +102,7 @@ var getPlatform = () => {
102
102
  };
103
103
 
104
104
  // packages/sdk/client-services/src/packlets/services/diagnostics.ts
105
- var __dxlog_file = "/mnt/ramdisk/work/packages/sdk/client-services/src/packlets/services/diagnostics.ts";
105
+ var __dxlog_file = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/services/diagnostics.ts";
106
106
  var DEFAULT_TIMEOUT = 1e3;
107
107
  var createDiagnostics = async (clientServices, serviceContext, config) => {
108
108
  const diagnostics = {
@@ -242,7 +242,7 @@ var import_context = require("@dxos/context");
242
242
  var import_credentials3 = require("@dxos/credentials");
243
243
  var import_log2 = require("@dxos/log");
244
244
  var import_protocols2 = require("@dxos/protocols");
245
- var __dxlog_file2 = "/mnt/ramdisk/work/packages/sdk/client-services/src/packlets/identity/authenticator.ts";
245
+ var __dxlog_file2 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/identity/authenticator.ts";
246
246
  var Credential = import_protocols2.schema.getCodecForType("dxos.halo.credentials.Credential");
247
247
  var createAuthProvider = (signer) => async (nonce) => {
248
248
  const credential = await signer.createCredential({
@@ -372,7 +372,7 @@ function _ts_decorate(decorators, target, key, desc) {
372
372
  r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
373
373
  return c > 3 && r && Object.defineProperty(target, key, r), r;
374
374
  }
375
- var __dxlog_file3 = "/mnt/ramdisk/work/packages/sdk/client-services/src/packlets/identity/identity.ts";
375
+ var __dxlog_file3 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/identity/identity.ts";
376
376
  var Identity = class Identity2 {
377
377
  constructor({ space, signer, identityKey, deviceKey }) {
378
378
  this.stateUpdate = new import_async2.Event();
@@ -545,7 +545,7 @@ function _ts_decorate2(decorators, target, key, desc) {
545
545
  r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
546
546
  return c > 3 && r && Object.defineProperty(target, key, r), r;
547
547
  }
548
- var __dxlog_file4 = "/mnt/ramdisk/work/packages/sdk/client-services/src/packlets/identity/identity-manager.ts";
548
+ var __dxlog_file4 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/identity/identity-manager.ts";
549
549
  var IdentityManager = class IdentityManager2 {
550
550
  // TODO(burdon): IdentityManagerParams.
551
551
  // TODO(dmaretskyi): Perhaps this should take/generate the peerKey outside of an initialized identity.
@@ -895,7 +895,7 @@ var import_codec_protobuf3 = require("@dxos/codec-protobuf");
895
895
  var import_credentials8 = require("@dxos/credentials");
896
896
  var import_debug3 = require("@dxos/debug");
897
897
  var import_invariant4 = require("@dxos/invariant");
898
- var __dxlog_file5 = "/mnt/ramdisk/work/packages/sdk/client-services/src/packlets/identity/identity-service.ts";
898
+ var __dxlog_file5 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/identity/identity-service.ts";
899
899
  var IdentityServiceImpl = class {
900
900
  constructor(_createIdentity, _identityManager, _keyring) {
901
901
  this._createIdentity = _createIdentity;
@@ -964,7 +964,7 @@ var IdentityServiceImpl = class {
964
964
  // packages/sdk/client-services/src/packlets/invitations/device-invitation-protocol.ts
965
965
  var import_invariant5 = require("@dxos/invariant");
966
966
  var import_services2 = require("@dxos/protocols/proto/dxos/client/services");
967
- var __dxlog_file6 = "/mnt/ramdisk/work/packages/sdk/client-services/src/packlets/invitations/device-invitation-protocol.ts";
967
+ var __dxlog_file6 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/invitations/device-invitation-protocol.ts";
968
968
  var DeviceInvitationProtocol = class {
969
969
  constructor(_keyring, _getIdentity, _acceptIdentity) {
970
970
  this._keyring = _keyring;
@@ -1076,7 +1076,7 @@ var import_protocols4 = require("@dxos/protocols");
1076
1076
  var import_services3 = require("@dxos/protocols/proto/dxos/client/services");
1077
1077
  var import_invitations = require("@dxos/protocols/proto/dxos/halo/invitations");
1078
1078
  var import_teleport = require("@dxos/teleport");
1079
- var __dxlog_file7 = "/mnt/ramdisk/work/packages/sdk/client-services/src/packlets/invitations/invitation-extension.ts";
1079
+ var __dxlog_file7 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/invitations/invitation-extension.ts";
1080
1080
  var OPTIONS_TIMEOUT = 1e4;
1081
1081
  var MAX_OTP_ATTEMPTS = 3;
1082
1082
  var InvitationHostExtension = class extends import_teleport.RpcExtension {
@@ -1407,7 +1407,7 @@ var InvitationGuestExtension = class extends import_teleport.RpcExtension {
1407
1407
  var isAuthenticationRequired = (invitation) => invitation.authMethod !== import_services3.Invitation.AuthMethod.NONE;
1408
1408
 
1409
1409
  // packages/sdk/client-services/src/packlets/invitations/invitations-handler.ts
1410
- var __dxlog_file8 = "/mnt/ramdisk/work/packages/sdk/client-services/src/packlets/invitations/invitations-handler.ts";
1410
+ var __dxlog_file8 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/invitations/invitations-handler.ts";
1411
1411
  var InvitationsHandler = class {
1412
1412
  /**
1413
1413
  * @internal
@@ -1966,7 +1966,7 @@ var import_codec_protobuf4 = require("@dxos/codec-protobuf");
1966
1966
  var import_invariant8 = require("@dxos/invariant");
1967
1967
  var import_log7 = require("@dxos/log");
1968
1968
  var import_services5 = require("@dxos/protocols/proto/dxos/client/services");
1969
- var __dxlog_file9 = "/mnt/ramdisk/work/packages/sdk/client-services/src/packlets/invitations/invitations-service.ts";
1969
+ var __dxlog_file9 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/invitations/invitations-service.ts";
1970
1970
  var InvitationsServiceImpl = class {
1971
1971
  constructor(_invitationsHandler, _getHandler) {
1972
1972
  this._invitationsHandler = _invitationsHandler;
@@ -2151,7 +2151,7 @@ var import_feed_store2 = require("@dxos/feed-store");
2151
2151
  var import_invariant9 = require("@dxos/invariant");
2152
2152
  var import_log8 = require("@dxos/log");
2153
2153
  var import_services6 = require("@dxos/protocols/proto/dxos/client/services");
2154
- var __dxlog_file10 = "/mnt/ramdisk/work/packages/sdk/client-services/src/packlets/invitations/space-invitation-protocol.ts";
2154
+ var __dxlog_file10 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/invitations/space-invitation-protocol.ts";
2155
2155
  var SpaceInvitationProtocol = class {
2156
2156
  constructor(_spaceManager, _signingContext, _keyring, _spaceKey) {
2157
2157
  this._spaceManager = _spaceManager;
@@ -2334,7 +2334,7 @@ var import_log9 = require("@dxos/log");
2334
2334
  var import_protocols6 = require("@dxos/protocols");
2335
2335
  var import_teleport2 = require("@dxos/teleport");
2336
2336
  var import_util2 = require("@dxos/util");
2337
- var __dxlog_file11 = "/mnt/ramdisk/work/packages/sdk/client-services/src/packlets/spaces/notarization-plugin.ts";
2337
+ var __dxlog_file11 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/spaces/notarization-plugin.ts";
2338
2338
  var DEFAULT_RETRY_TIMEOUT = 1e3;
2339
2339
  var DEFAULT_SUCCESS_DELAY = 1e3;
2340
2340
  var DEFAULT_NOTARIZE_TIMEOUT = 1e4;
@@ -2604,7 +2604,7 @@ function _ts_decorate3(decorators, target, key, desc) {
2604
2604
  r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
2605
2605
  return c > 3 && r && Object.defineProperty(target, key, r), r;
2606
2606
  }
2607
- var __dxlog_file12 = "/mnt/ramdisk/work/packages/sdk/client-services/src/packlets/spaces/data-space.ts";
2607
+ var __dxlog_file12 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/spaces/data-space.ts";
2608
2608
  var ENABLE_FEED_PURGE = false;
2609
2609
  var DataSpace = class DataSpace2 {
2610
2610
  constructor(params) {
@@ -2963,7 +2963,7 @@ function _ts_decorate4(decorators, target, key, desc) {
2963
2963
  r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
2964
2964
  return c > 3 && r && Object.defineProperty(target, key, r), r;
2965
2965
  }
2966
- var __dxlog_file13 = "/mnt/ramdisk/work/packages/sdk/client-services/src/packlets/spaces/data-space-manager.ts";
2966
+ var __dxlog_file13 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/spaces/data-space-manager.ts";
2967
2967
  var DataSpaceManager = class DataSpaceManager2 {
2968
2968
  constructor(_spaceManager, _metadataStore, _dataServiceSubscriptions, _keyring, _signingContext, _feedStore) {
2969
2969
  this._spaceManager = _spaceManager;
@@ -3294,7 +3294,7 @@ var import_log12 = require("@dxos/log");
3294
3294
  var import_protocols8 = require("@dxos/protocols");
3295
3295
  var import_services9 = require("@dxos/protocols/proto/dxos/client/services");
3296
3296
  var import_util5 = require("@dxos/util");
3297
- var __dxlog_file14 = "/mnt/ramdisk/work/packages/sdk/client-services/src/packlets/spaces/spaces-service.ts";
3297
+ var __dxlog_file14 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/spaces/spaces-service.ts";
3298
3298
  var SpacesServiceImpl = class {
3299
3299
  constructor(_identityManager, _spaceManager, _dataServiceSubscriptions, _getDataSpaceManager) {
3300
3300
  this._identityManager = _identityManager;
@@ -3473,7 +3473,7 @@ function _ts_decorate5(decorators, target, key, desc) {
3473
3473
  r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
3474
3474
  return c > 3 && r && Object.defineProperty(target, key, r), r;
3475
3475
  }
3476
- var __dxlog_file15 = "/mnt/ramdisk/work/packages/sdk/client-services/src/packlets/services/service-context.ts";
3476
+ var __dxlog_file15 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/services/service-context.ts";
3477
3477
  var ServiceContext = class ServiceContext2 {
3478
3478
  // prettier-ignore
3479
3479
  constructor(storage, networkManager, signalManager, modelFactory) {
@@ -3723,6 +3723,7 @@ var import_protocols10 = require("@dxos/protocols");
3723
3723
  var import_services14 = require("@dxos/protocols/proto/dxos/client/services");
3724
3724
  var import_text_model = require("@dxos/text-model");
3725
3725
  var import_tracing4 = require("@dxos/tracing");
3726
+ var import_websocket_rpc = require("@dxos/websocket-rpc");
3726
3727
 
3727
3728
  // packages/sdk/client-services/src/packlets/devices/devices-service.ts
3728
3729
  var import_async12 = require("@dxos/async");
@@ -4088,7 +4089,7 @@ function _ts_decorate6(decorators, target, key, desc) {
4088
4089
  r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
4089
4090
  return c > 3 && r && Object.defineProperty(target, key, r), r;
4090
4091
  }
4091
- var __dxlog_file16 = "/mnt/ramdisk/work/packages/sdk/client-services/src/packlets/locks/node.ts";
4092
+ var __dxlog_file16 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/locks/node.ts";
4092
4093
  var Lock = class {
4093
4094
  constructor({ lockKey: lockPath, onAcquire, onRelease }) {
4094
4095
  this._lockPath = lockPath;
@@ -4419,7 +4420,7 @@ function _ts_decorate7(decorators, target, key, desc) {
4419
4420
  r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
4420
4421
  return c > 3 && r && Object.defineProperty(target, key, r), r;
4421
4422
  }
4422
- var __dxlog_file17 = "/mnt/ramdisk/work/packages/sdk/client-services/src/packlets/services/service-host.ts";
4423
+ var __dxlog_file17 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/services/service-host.ts";
4423
4424
  var createDefaultModelFactory = () => {
4424
4425
  return new import_model_factory.ModelFactory().registerModel(import_document_model2.DocumentModel).registerModel(import_text_model.TextModel);
4425
4426
  };
@@ -4509,7 +4510,7 @@ var ClientServicesHost = class ClientServicesHost2 {
4509
4510
  initialize({ config, ...options }) {
4510
4511
  (0, import_invariant14.invariant)(!this._open, "service host is open", {
4511
4512
  F: __dxlog_file17,
4512
- L: 181,
4513
+ L: 184,
4513
4514
  S: this,
4514
4515
  A: [
4515
4516
  "!this._open",
@@ -4518,14 +4519,14 @@ var ClientServicesHost = class ClientServicesHost2 {
4518
4519
  });
4519
4520
  (0, import_log16.log)("initializing...", void 0, {
4520
4521
  F: __dxlog_file17,
4521
- L: 182,
4522
+ L: 185,
4522
4523
  S: this,
4523
4524
  C: (f, a) => f(...a)
4524
4525
  });
4525
4526
  if (config) {
4526
4527
  (0, import_invariant14.invariant)(!this._config, "config already set", {
4527
4528
  F: __dxlog_file17,
4528
- L: 185,
4529
+ L: 188,
4529
4530
  S: this,
4530
4531
  A: [
4531
4532
  "!this._config",
@@ -4543,7 +4544,7 @@ var ClientServicesHost = class ClientServicesHost2 {
4543
4544
  this._signalManager = signalManager;
4544
4545
  (0, import_invariant14.invariant)(!this._networkManager, "network manager already set", {
4545
4546
  F: __dxlog_file17,
4546
- L: 201,
4547
+ L: 204,
4547
4548
  S: this,
4548
4549
  A: [
4549
4550
  "!this._networkManager",
@@ -4557,7 +4558,7 @@ var ClientServicesHost = class ClientServicesHost2 {
4557
4558
  });
4558
4559
  (0, import_log16.log)("initialized", void 0, {
4559
4560
  F: __dxlog_file17,
4560
- L: 208,
4561
+ L: 211,
4561
4562
  S: this,
4562
4563
  C: (f, a) => f(...a)
4563
4564
  });
@@ -4571,13 +4572,13 @@ var ClientServicesHost = class ClientServicesHost2 {
4571
4572
  id: traceId
4572
4573
  }), {
4573
4574
  F: __dxlog_file17,
4574
- L: 219,
4575
+ L: 222,
4575
4576
  S: this,
4576
4577
  C: (f, a) => f(...a)
4577
4578
  });
4578
4579
  (0, import_invariant14.invariant)(this._config, "config not set", {
4579
4580
  F: __dxlog_file17,
4580
- L: 221,
4581
+ L: 224,
4581
4582
  S: this,
4582
4583
  A: [
4583
4584
  "this._config",
@@ -4586,7 +4587,7 @@ var ClientServicesHost = class ClientServicesHost2 {
4586
4587
  });
4587
4588
  (0, import_invariant14.invariant)(this._storage, "storage not set", {
4588
4589
  F: __dxlog_file17,
4589
- L: 222,
4590
+ L: 225,
4590
4591
  S: this,
4591
4592
  A: [
4592
4593
  "this._storage",
@@ -4595,7 +4596,7 @@ var ClientServicesHost = class ClientServicesHost2 {
4595
4596
  });
4596
4597
  (0, import_invariant14.invariant)(this._signalManager, "signal manager not set", {
4597
4598
  F: __dxlog_file17,
4598
- L: 223,
4599
+ L: 226,
4599
4600
  S: this,
4600
4601
  A: [
4601
4602
  "this._signalManager",
@@ -4604,7 +4605,7 @@ var ClientServicesHost = class ClientServicesHost2 {
4604
4605
  });
4605
4606
  (0, import_invariant14.invariant)(this._networkManager, "network manager not set", {
4606
4607
  F: __dxlog_file17,
4607
- L: 224,
4608
+ L: 227,
4608
4609
  S: this,
4609
4610
  A: [
4610
4611
  "this._networkManager",
@@ -4616,7 +4617,7 @@ var ClientServicesHost = class ClientServicesHost2 {
4616
4617
  lockKey: this._resourceLock?.lockKey
4617
4618
  }, {
4618
4619
  F: __dxlog_file17,
4619
- L: 227,
4620
+ L: 230,
4620
4621
  S: this,
4621
4622
  C: (f, a) => f(...a)
4622
4623
  });
@@ -4644,6 +4645,16 @@ var ClientServicesHost = class ClientServicesHost2 {
4644
4645
  })
4645
4646
  });
4646
4647
  await this._serviceContext.open(ctx);
4648
+ const devtoolsProxy = this._config?.get("runtime.client.devtoolsProxy");
4649
+ if (devtoolsProxy) {
4650
+ this._devtoolsProxy = new import_websocket_rpc.WebsocketRpcClient({
4651
+ url: devtoolsProxy,
4652
+ requested: {},
4653
+ exposed: import_client_protocol5.clientServiceBundle,
4654
+ handlers: this.services
4655
+ });
4656
+ void this._devtoolsProxy.open();
4657
+ }
4647
4658
  this._opening = false;
4648
4659
  this._open = true;
4649
4660
  this._statusUpdate.emit();
@@ -4652,7 +4663,7 @@ var ClientServicesHost = class ClientServicesHost2 {
4652
4663
  deviceKey
4653
4664
  }, {
4654
4665
  F: __dxlog_file17,
4655
- L: 284,
4666
+ L: 299,
4656
4667
  S: this,
4657
4668
  C: (f, a) => f(...a)
4658
4669
  });
@@ -4660,7 +4671,7 @@ var ClientServicesHost = class ClientServicesHost2 {
4660
4671
  id: traceId
4661
4672
  }), {
4662
4673
  F: __dxlog_file17,
4663
- L: 285,
4674
+ L: 300,
4664
4675
  S: this,
4665
4676
  C: (f, a) => f(...a)
4666
4677
  });
@@ -4674,10 +4685,11 @@ var ClientServicesHost = class ClientServicesHost2 {
4674
4685
  deviceKey
4675
4686
  }, {
4676
4687
  F: __dxlog_file17,
4677
- L: 296,
4688
+ L: 311,
4678
4689
  S: this,
4679
4690
  C: (f, a) => f(...a)
4680
4691
  });
4692
+ await this._devtoolsProxy?.close();
4681
4693
  this._serviceRegistry.setServices({
4682
4694
  SystemService: this._systemService
4683
4695
  });
@@ -4689,7 +4701,7 @@ var ClientServicesHost = class ClientServicesHost2 {
4689
4701
  deviceKey
4690
4702
  }, {
4691
4703
  F: __dxlog_file17,
4692
- L: 302,
4704
+ L: 318,
4693
4705
  S: this,
4694
4706
  C: (f, a) => f(...a)
4695
4707
  });
@@ -4700,13 +4712,13 @@ var ClientServicesHost = class ClientServicesHost2 {
4700
4712
  id: traceId
4701
4713
  }), {
4702
4714
  F: __dxlog_file17,
4703
- L: 307,
4715
+ L: 323,
4704
4716
  S: this,
4705
4717
  C: (f, a) => f(...a)
4706
4718
  });
4707
4719
  (0, import_log16.log)("resetting...", void 0, {
4708
4720
  F: __dxlog_file17,
4709
- L: 309,
4721
+ L: 325,
4710
4722
  S: this,
4711
4723
  C: (f, a) => f(...a)
4712
4724
  });
@@ -4714,7 +4726,7 @@ var ClientServicesHost = class ClientServicesHost2 {
4714
4726
  await this._storage.reset();
4715
4727
  (0, import_log16.log)("reset", void 0, {
4716
4728
  F: __dxlog_file17,
4717
- L: 312,
4729
+ L: 328,
4718
4730
  S: this,
4719
4731
  C: (f, a) => f(...a)
4720
4732
  });
@@ -4722,7 +4734,7 @@ var ClientServicesHost = class ClientServicesHost2 {
4722
4734
  id: traceId
4723
4735
  }), {
4724
4736
  F: __dxlog_file17,
4725
- L: 313,
4737
+ L: 329,
4726
4738
  S: this,
4727
4739
  C: (f, a) => f(...a)
4728
4740
  });
@@ -4748,7 +4760,7 @@ ClientServicesHost = _ts_decorate7([
4748
4760
  ], ClientServicesHost);
4749
4761
 
4750
4762
  // packages/sdk/client-services/src/packlets/testing/invitation-utils.ts
4751
- var __dxlog_file18 = "/mnt/ramdisk/work/packages/sdk/client-services/src/packlets/testing/invitation-utils.ts";
4763
+ var __dxlog_file18 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/testing/invitation-utils.ts";
4752
4764
  var sanitizeInvitation = (invitation) => {
4753
4765
  return {
4754
4766
  invitationId: invitation.invitationId,