@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.
@@ -343,7 +343,7 @@ import { Context as Context2 } from "@dxos/context";
343
343
  import { verifyCredential } from "@dxos/credentials";
344
344
  import { log } from "@dxos/log";
345
345
  import { schema } from "@dxos/protocols";
346
- var __dxlog_file = "/mnt/ramdisk/work/packages/sdk/client-services/src/packlets/identity/authenticator.ts";
346
+ var __dxlog_file = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/identity/authenticator.ts";
347
347
  var Credential = schema.getCodecForType("dxos.halo.credentials.Credential");
348
348
  var createAuthProvider = (signer) => async (nonce) => {
349
349
  const credential = await signer.createCredential({
@@ -473,7 +473,7 @@ function _ts_decorate(decorators, target, key, desc) {
473
473
  r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
474
474
  return c > 3 && r && Object.defineProperty(target, key, r), r;
475
475
  }
476
- var __dxlog_file2 = "/mnt/ramdisk/work/packages/sdk/client-services/src/packlets/identity/identity.ts";
476
+ var __dxlog_file2 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/identity/identity.ts";
477
477
  var Identity = class Identity2 {
478
478
  constructor({ space, signer, identityKey, deviceKey }) {
479
479
  this.stateUpdate = new Event();
@@ -646,7 +646,7 @@ function _ts_decorate2(decorators, target, key, desc) {
646
646
  r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
647
647
  return c > 3 && r && Object.defineProperty(target, key, r), r;
648
648
  }
649
- var __dxlog_file3 = "/mnt/ramdisk/work/packages/sdk/client-services/src/packlets/identity/identity-manager.ts";
649
+ var __dxlog_file3 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/identity/identity-manager.ts";
650
650
  var IdentityManager = class IdentityManager2 {
651
651
  // TODO(burdon): IdentityManagerParams.
652
652
  // TODO(dmaretskyi): Perhaps this should take/generate the peerKey outside of an initialized identity.
@@ -996,7 +996,7 @@ import { Stream as Stream7 } from "@dxos/codec-protobuf";
996
996
  import { signPresentation } from "@dxos/credentials";
997
997
  import { todo } from "@dxos/debug";
998
998
  import { invariant as invariant3 } from "@dxos/invariant";
999
- var __dxlog_file4 = "/mnt/ramdisk/work/packages/sdk/client-services/src/packlets/identity/identity-service.ts";
999
+ var __dxlog_file4 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/identity/identity-service.ts";
1000
1000
  var IdentityServiceImpl = class {
1001
1001
  constructor(_createIdentity, _identityManager, _keyring) {
1002
1002
  this._createIdentity = _createIdentity;
@@ -1065,7 +1065,7 @@ var IdentityServiceImpl = class {
1065
1065
  // packages/sdk/client-services/src/packlets/invitations/device-invitation-protocol.ts
1066
1066
  import { invariant as invariant4 } from "@dxos/invariant";
1067
1067
  import { Invitation } from "@dxos/protocols/proto/dxos/client/services";
1068
- var __dxlog_file5 = "/mnt/ramdisk/work/packages/sdk/client-services/src/packlets/invitations/device-invitation-protocol.ts";
1068
+ var __dxlog_file5 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/invitations/device-invitation-protocol.ts";
1069
1069
  var DeviceInvitationProtocol = class {
1070
1070
  constructor(_keyring, _getIdentity, _acceptIdentity) {
1071
1071
  this._keyring = _keyring;
@@ -1177,7 +1177,7 @@ import { schema as schema2, trace as trace3 } from "@dxos/protocols";
1177
1177
  import { Invitation as Invitation2 } from "@dxos/protocols/proto/dxos/client/services";
1178
1178
  import { AuthenticationResponse, Options } from "@dxos/protocols/proto/dxos/halo/invitations";
1179
1179
  import { RpcExtension } from "@dxos/teleport";
1180
- var __dxlog_file6 = "/mnt/ramdisk/work/packages/sdk/client-services/src/packlets/invitations/invitation-extension.ts";
1180
+ var __dxlog_file6 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/invitations/invitation-extension.ts";
1181
1181
  var OPTIONS_TIMEOUT = 1e4;
1182
1182
  var MAX_OTP_ATTEMPTS = 3;
1183
1183
  var InvitationHostExtension = class extends RpcExtension {
@@ -1508,7 +1508,7 @@ var InvitationGuestExtension = class extends RpcExtension {
1508
1508
  var isAuthenticationRequired = (invitation) => invitation.authMethod !== Invitation2.AuthMethod.NONE;
1509
1509
 
1510
1510
  // packages/sdk/client-services/src/packlets/invitations/invitations-handler.ts
1511
- var __dxlog_file7 = "/mnt/ramdisk/work/packages/sdk/client-services/src/packlets/invitations/invitations-handler.ts";
1511
+ var __dxlog_file7 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/invitations/invitations-handler.ts";
1512
1512
  var InvitationsHandler = class {
1513
1513
  /**
1514
1514
  * @internal
@@ -2067,7 +2067,7 @@ import { Stream as Stream8 } from "@dxos/codec-protobuf";
2067
2067
  import { invariant as invariant7 } from "@dxos/invariant";
2068
2068
  import { log as log6 } from "@dxos/log";
2069
2069
  import { QueryInvitationsResponse } from "@dxos/protocols/proto/dxos/client/services";
2070
- var __dxlog_file8 = "/mnt/ramdisk/work/packages/sdk/client-services/src/packlets/invitations/invitations-service.ts";
2070
+ var __dxlog_file8 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/invitations/invitations-service.ts";
2071
2071
  var InvitationsServiceImpl = class {
2072
2072
  constructor(_invitationsHandler, _getHandler) {
2073
2073
  this._invitationsHandler = _invitationsHandler;
@@ -2252,7 +2252,7 @@ import { writeMessages as writeMessages2 } from "@dxos/feed-store";
2252
2252
  import { invariant as invariant8 } from "@dxos/invariant";
2253
2253
  import { log as log7 } from "@dxos/log";
2254
2254
  import { Invitation as Invitation4 } from "@dxos/protocols/proto/dxos/client/services";
2255
- var __dxlog_file9 = "/mnt/ramdisk/work/packages/sdk/client-services/src/packlets/invitations/space-invitation-protocol.ts";
2255
+ var __dxlog_file9 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/invitations/space-invitation-protocol.ts";
2256
2256
  var SpaceInvitationProtocol = class {
2257
2257
  constructor(_spaceManager, _signingContext, _keyring, _spaceKey) {
2258
2258
  this._spaceManager = _spaceManager;
@@ -2463,7 +2463,7 @@ import { STORAGE_VERSION } from "@dxos/protocols";
2463
2463
  import { SpaceMember } from "@dxos/protocols/proto/dxos/client/services";
2464
2464
 
2465
2465
  // packages/sdk/client-services/src/version.ts
2466
- var DXOS_VERSION = "0.1.56";
2466
+ var DXOS_VERSION = "0.1.57-main.281294d";
2467
2467
 
2468
2468
  // packages/sdk/client-services/src/packlets/services/platform.ts
2469
2469
  var getPlatform = () => {
@@ -2494,7 +2494,7 @@ var getPlatform = () => {
2494
2494
  };
2495
2495
 
2496
2496
  // packages/sdk/client-services/src/packlets/services/diagnostics.ts
2497
- var __dxlog_file10 = "/mnt/ramdisk/work/packages/sdk/client-services/src/packlets/services/diagnostics.ts";
2497
+ var __dxlog_file10 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/services/diagnostics.ts";
2498
2498
  var DEFAULT_TIMEOUT = 1e3;
2499
2499
  var createDiagnostics = async (clientServices, serviceContext, config) => {
2500
2500
  const diagnostics = {
@@ -2634,7 +2634,7 @@ import { log as log9 } from "@dxos/log";
2634
2634
  import { schema as schema3 } from "@dxos/protocols";
2635
2635
  import { RpcExtension as RpcExtension2 } from "@dxos/teleport";
2636
2636
  import { ComplexMap as ComplexMap2, ComplexSet, entry } from "@dxos/util";
2637
- var __dxlog_file11 = "/mnt/ramdisk/work/packages/sdk/client-services/src/packlets/spaces/notarization-plugin.ts";
2637
+ var __dxlog_file11 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/spaces/notarization-plugin.ts";
2638
2638
  var DEFAULT_RETRY_TIMEOUT = 1e3;
2639
2639
  var DEFAULT_SUCCESS_DELAY = 1e3;
2640
2640
  var DEFAULT_NOTARIZE_TIMEOUT = 1e4;
@@ -2904,7 +2904,7 @@ function _ts_decorate3(decorators, target, key, desc) {
2904
2904
  r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
2905
2905
  return c > 3 && r && Object.defineProperty(target, key, r), r;
2906
2906
  }
2907
- var __dxlog_file12 = "/mnt/ramdisk/work/packages/sdk/client-services/src/packlets/spaces/data-space.ts";
2907
+ var __dxlog_file12 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/spaces/data-space.ts";
2908
2908
  var ENABLE_FEED_PURGE = false;
2909
2909
  var DataSpace = class DataSpace2 {
2910
2910
  constructor(params) {
@@ -3275,7 +3275,7 @@ function _ts_decorate4(decorators, target, key, desc) {
3275
3275
  r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
3276
3276
  return c > 3 && r && Object.defineProperty(target, key, r), r;
3277
3277
  }
3278
- var __dxlog_file13 = "/mnt/ramdisk/work/packages/sdk/client-services/src/packlets/spaces/data-space-manager.ts";
3278
+ var __dxlog_file13 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/spaces/data-space-manager.ts";
3279
3279
  var DataSpaceManager = class DataSpaceManager2 {
3280
3280
  constructor(_spaceManager, _metadataStore, _dataServiceSubscriptions, _keyring, _signingContext, _feedStore) {
3281
3281
  this._spaceManager = _spaceManager;
@@ -3606,7 +3606,7 @@ import { log as log12 } from "@dxos/log";
3606
3606
  import { encodeError } from "@dxos/protocols";
3607
3607
  import { SpaceMember as SpaceMember3, SpaceState as SpaceState3 } from "@dxos/protocols/proto/dxos/client/services";
3608
3608
  import { humanize } from "@dxos/util";
3609
- var __dxlog_file14 = "/mnt/ramdisk/work/packages/sdk/client-services/src/packlets/spaces/spaces-service.ts";
3609
+ var __dxlog_file14 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/spaces/spaces-service.ts";
3610
3610
  var SpacesServiceImpl = class {
3611
3611
  constructor(_identityManager, _spaceManager, _dataServiceSubscriptions, _getDataSpaceManager) {
3612
3612
  this._identityManager = _identityManager;
@@ -3800,7 +3800,7 @@ function _ts_decorate5(decorators, target, key, desc) {
3800
3800
  r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
3801
3801
  return c > 3 && r && Object.defineProperty(target, key, r), r;
3802
3802
  }
3803
- var __dxlog_file15 = "/mnt/ramdisk/work/packages/sdk/client-services/src/packlets/services/service-context.ts";
3803
+ var __dxlog_file15 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/services/service-context.ts";
3804
3804
  var ServiceContext = class ServiceContext2 {
3805
3805
  // prettier-ignore
3806
3806
  constructor(storage, networkManager, signalManager, modelFactory) {
@@ -4048,7 +4048,7 @@ function _ts_decorate6(decorators, target, key, desc) {
4048
4048
  r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
4049
4049
  return c > 3 && r && Object.defineProperty(target, key, r), r;
4050
4050
  }
4051
- var __dxlog_file16 = "/mnt/ramdisk/work/packages/sdk/client-services/src/packlets/locks/browser.ts";
4051
+ var __dxlog_file16 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/locks/browser.ts";
4052
4052
  var Message;
4053
4053
  (function(Message2) {
4054
4054
  Message2["ACQUIRING"] = "acquiring";
@@ -4247,6 +4247,7 @@ import { trace as trace7 } from "@dxos/protocols";
4247
4247
  import { SystemStatus } from "@dxos/protocols/proto/dxos/client/services";
4248
4248
  import { TextModel } from "@dxos/text-model";
4249
4249
  import { TRACE_PROCESSOR, trace as Trace3 } from "@dxos/tracing";
4250
+ import { WebsocketRpcClient } from "@dxos/websocket-rpc";
4250
4251
 
4251
4252
  // packages/sdk/client-services/src/packlets/devices/devices-service.ts
4252
4253
  import { EventSubscriptions as EventSubscriptions3 } from "@dxos/async";
@@ -4505,7 +4506,7 @@ function _ts_decorate7(decorators, target, key, desc) {
4505
4506
  r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
4506
4507
  return c > 3 && r && Object.defineProperty(target, key, r), r;
4507
4508
  }
4508
- var __dxlog_file17 = "/mnt/ramdisk/work/packages/sdk/client-services/src/packlets/services/service-host.ts";
4509
+ var __dxlog_file17 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/services/service-host.ts";
4509
4510
  var createDefaultModelFactory = () => {
4510
4511
  return new ModelFactory().registerModel(DocumentModel2).registerModel(TextModel);
4511
4512
  };
@@ -4595,7 +4596,7 @@ var ClientServicesHost = class ClientServicesHost2 {
4595
4596
  initialize({ config, ...options }) {
4596
4597
  invariant13(!this._open, "service host is open", {
4597
4598
  F: __dxlog_file17,
4598
- L: 181,
4599
+ L: 184,
4599
4600
  S: this,
4600
4601
  A: [
4601
4602
  "!this._open",
@@ -4604,14 +4605,14 @@ var ClientServicesHost = class ClientServicesHost2 {
4604
4605
  });
4605
4606
  log16("initializing...", void 0, {
4606
4607
  F: __dxlog_file17,
4607
- L: 182,
4608
+ L: 185,
4608
4609
  S: this,
4609
4610
  C: (f, a) => f(...a)
4610
4611
  });
4611
4612
  if (config) {
4612
4613
  invariant13(!this._config, "config already set", {
4613
4614
  F: __dxlog_file17,
4614
- L: 185,
4615
+ L: 188,
4615
4616
  S: this,
4616
4617
  A: [
4617
4618
  "!this._config",
@@ -4629,7 +4630,7 @@ var ClientServicesHost = class ClientServicesHost2 {
4629
4630
  this._signalManager = signalManager;
4630
4631
  invariant13(!this._networkManager, "network manager already set", {
4631
4632
  F: __dxlog_file17,
4632
- L: 201,
4633
+ L: 204,
4633
4634
  S: this,
4634
4635
  A: [
4635
4636
  "!this._networkManager",
@@ -4643,7 +4644,7 @@ var ClientServicesHost = class ClientServicesHost2 {
4643
4644
  });
4644
4645
  log16("initialized", void 0, {
4645
4646
  F: __dxlog_file17,
4646
- L: 208,
4647
+ L: 211,
4647
4648
  S: this,
4648
4649
  C: (f, a) => f(...a)
4649
4650
  });
@@ -4657,13 +4658,13 @@ var ClientServicesHost = class ClientServicesHost2 {
4657
4658
  id: traceId
4658
4659
  }), {
4659
4660
  F: __dxlog_file17,
4660
- L: 219,
4661
+ L: 222,
4661
4662
  S: this,
4662
4663
  C: (f, a) => f(...a)
4663
4664
  });
4664
4665
  invariant13(this._config, "config not set", {
4665
4666
  F: __dxlog_file17,
4666
- L: 221,
4667
+ L: 224,
4667
4668
  S: this,
4668
4669
  A: [
4669
4670
  "this._config",
@@ -4672,7 +4673,7 @@ var ClientServicesHost = class ClientServicesHost2 {
4672
4673
  });
4673
4674
  invariant13(this._storage, "storage not set", {
4674
4675
  F: __dxlog_file17,
4675
- L: 222,
4676
+ L: 225,
4676
4677
  S: this,
4677
4678
  A: [
4678
4679
  "this._storage",
@@ -4681,7 +4682,7 @@ var ClientServicesHost = class ClientServicesHost2 {
4681
4682
  });
4682
4683
  invariant13(this._signalManager, "signal manager not set", {
4683
4684
  F: __dxlog_file17,
4684
- L: 223,
4685
+ L: 226,
4685
4686
  S: this,
4686
4687
  A: [
4687
4688
  "this._signalManager",
@@ -4690,7 +4691,7 @@ var ClientServicesHost = class ClientServicesHost2 {
4690
4691
  });
4691
4692
  invariant13(this._networkManager, "network manager not set", {
4692
4693
  F: __dxlog_file17,
4693
- L: 224,
4694
+ L: 227,
4694
4695
  S: this,
4695
4696
  A: [
4696
4697
  "this._networkManager",
@@ -4702,7 +4703,7 @@ var ClientServicesHost = class ClientServicesHost2 {
4702
4703
  lockKey: this._resourceLock?.lockKey
4703
4704
  }, {
4704
4705
  F: __dxlog_file17,
4705
- L: 227,
4706
+ L: 230,
4706
4707
  S: this,
4707
4708
  C: (f, a) => f(...a)
4708
4709
  });
@@ -4730,6 +4731,16 @@ var ClientServicesHost = class ClientServicesHost2 {
4730
4731
  })
4731
4732
  });
4732
4733
  await this._serviceContext.open(ctx);
4734
+ const devtoolsProxy = this._config?.get("runtime.client.devtoolsProxy");
4735
+ if (devtoolsProxy) {
4736
+ this._devtoolsProxy = new WebsocketRpcClient({
4737
+ url: devtoolsProxy,
4738
+ requested: {},
4739
+ exposed: clientServiceBundle,
4740
+ handlers: this.services
4741
+ });
4742
+ void this._devtoolsProxy.open();
4743
+ }
4733
4744
  this._opening = false;
4734
4745
  this._open = true;
4735
4746
  this._statusUpdate.emit();
@@ -4738,7 +4749,7 @@ var ClientServicesHost = class ClientServicesHost2 {
4738
4749
  deviceKey
4739
4750
  }, {
4740
4751
  F: __dxlog_file17,
4741
- L: 284,
4752
+ L: 299,
4742
4753
  S: this,
4743
4754
  C: (f, a) => f(...a)
4744
4755
  });
@@ -4746,7 +4757,7 @@ var ClientServicesHost = class ClientServicesHost2 {
4746
4757
  id: traceId
4747
4758
  }), {
4748
4759
  F: __dxlog_file17,
4749
- L: 285,
4760
+ L: 300,
4750
4761
  S: this,
4751
4762
  C: (f, a) => f(...a)
4752
4763
  });
@@ -4760,10 +4771,11 @@ var ClientServicesHost = class ClientServicesHost2 {
4760
4771
  deviceKey
4761
4772
  }, {
4762
4773
  F: __dxlog_file17,
4763
- L: 296,
4774
+ L: 311,
4764
4775
  S: this,
4765
4776
  C: (f, a) => f(...a)
4766
4777
  });
4778
+ await this._devtoolsProxy?.close();
4767
4779
  this._serviceRegistry.setServices({
4768
4780
  SystemService: this._systemService
4769
4781
  });
@@ -4775,7 +4787,7 @@ var ClientServicesHost = class ClientServicesHost2 {
4775
4787
  deviceKey
4776
4788
  }, {
4777
4789
  F: __dxlog_file17,
4778
- L: 302,
4790
+ L: 318,
4779
4791
  S: this,
4780
4792
  C: (f, a) => f(...a)
4781
4793
  });
@@ -4786,13 +4798,13 @@ var ClientServicesHost = class ClientServicesHost2 {
4786
4798
  id: traceId
4787
4799
  }), {
4788
4800
  F: __dxlog_file17,
4789
- L: 307,
4801
+ L: 323,
4790
4802
  S: this,
4791
4803
  C: (f, a) => f(...a)
4792
4804
  });
4793
4805
  log16("resetting...", void 0, {
4794
4806
  F: __dxlog_file17,
4795
- L: 309,
4807
+ L: 325,
4796
4808
  S: this,
4797
4809
  C: (f, a) => f(...a)
4798
4810
  });
@@ -4800,7 +4812,7 @@ var ClientServicesHost = class ClientServicesHost2 {
4800
4812
  await this._storage.reset();
4801
4813
  log16("reset", void 0, {
4802
4814
  F: __dxlog_file17,
4803
- L: 312,
4815
+ L: 328,
4804
4816
  S: this,
4805
4817
  C: (f, a) => f(...a)
4806
4818
  });
@@ -4808,7 +4820,7 @@ var ClientServicesHost = class ClientServicesHost2 {
4808
4820
  id: traceId
4809
4821
  }), {
4810
4822
  F: __dxlog_file17,
4811
- L: 313,
4823
+ L: 329,
4812
4824
  S: this,
4813
4825
  C: (f, a) => f(...a)
4814
4826
  });
@@ -4866,4 +4878,4 @@ export {
4866
4878
  createDefaultModelFactory,
4867
4879
  ClientServicesHost
4868
4880
  };
4869
- //# sourceMappingURL=chunk-SUKLFUNG.mjs.map
4881
+ //# sourceMappingURL=chunk-K3F5SH4N.mjs.map