@dxos/client-services 0.3.2 → 0.3.3-main.052ad73

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.
@@ -344,7 +344,7 @@ import { Context as Context2 } from "@dxos/context";
344
344
  import { verifyCredential } from "@dxos/credentials";
345
345
  import { log } from "@dxos/log";
346
346
  import { schema } from "@dxos/protocols";
347
- var __dxlog_file = "/mnt/ramdisk/work/packages/sdk/client-services/src/packlets/identity/authenticator.ts";
347
+ var __dxlog_file = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/identity/authenticator.ts";
348
348
  var Credential = schema.getCodecForType("dxos.halo.credentials.Credential");
349
349
  var createAuthProvider = (signer) => async (nonce) => {
350
350
  const credential = await signer.createCredential({
@@ -475,7 +475,7 @@ function _ts_decorate(decorators, target, key, desc) {
475
475
  r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
476
476
  return c > 3 && r && Object.defineProperty(target, key, r), r;
477
477
  }
478
- var __dxlog_file2 = "/mnt/ramdisk/work/packages/sdk/client-services/src/packlets/identity/identity.ts";
478
+ var __dxlog_file2 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/identity/identity.ts";
479
479
  var Identity = class Identity2 {
480
480
  constructor({ space, signer, identityKey, deviceKey }) {
481
481
  this.stateUpdate = new Event();
@@ -657,7 +657,7 @@ function _ts_decorate2(decorators, target, key, desc) {
657
657
  r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
658
658
  return c > 3 && r && Object.defineProperty(target, key, r), r;
659
659
  }
660
- var __dxlog_file3 = "/mnt/ramdisk/work/packages/sdk/client-services/src/packlets/identity/identity-manager.ts";
660
+ var __dxlog_file3 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/identity/identity-manager.ts";
661
661
  var IdentityManager = class IdentityManager2 {
662
662
  // TODO(burdon): IdentityManagerParams.
663
663
  // TODO(dmaretskyi): Perhaps this should take/generate the peerKey outside of an initialized identity.
@@ -1017,7 +1017,7 @@ import { Stream as Stream7 } from "@dxos/codec-protobuf";
1017
1017
  import { signPresentation } from "@dxos/credentials";
1018
1018
  import { todo } from "@dxos/debug";
1019
1019
  import { invariant as invariant3 } from "@dxos/invariant";
1020
- var __dxlog_file4 = "/mnt/ramdisk/work/packages/sdk/client-services/src/packlets/identity/identity-service.ts";
1020
+ var __dxlog_file4 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/identity/identity-service.ts";
1021
1021
  var IdentityServiceImpl = class {
1022
1022
  constructor(_createIdentity, _identityManager, _keyring) {
1023
1023
  this._createIdentity = _createIdentity;
@@ -1086,7 +1086,7 @@ var IdentityServiceImpl = class {
1086
1086
  // packages/sdk/client-services/src/packlets/invitations/device-invitation-protocol.ts
1087
1087
  import { invariant as invariant4 } from "@dxos/invariant";
1088
1088
  import { Invitation } from "@dxos/protocols/proto/dxos/client/services";
1089
- var __dxlog_file5 = "/mnt/ramdisk/work/packages/sdk/client-services/src/packlets/invitations/device-invitation-protocol.ts";
1089
+ var __dxlog_file5 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/invitations/device-invitation-protocol.ts";
1090
1090
  var DeviceInvitationProtocol = class {
1091
1091
  constructor(_keyring, _getIdentity, _acceptIdentity) {
1092
1092
  this._keyring = _keyring;
@@ -1196,7 +1196,7 @@ import { InvalidInvitationExtensionRoleError, schema as schema2, trace as trace3
1196
1196
  import { Invitation as Invitation2 } from "@dxos/protocols/proto/dxos/client/services";
1197
1197
  import { AuthenticationResponse, Options } from "@dxos/protocols/proto/dxos/halo/invitations";
1198
1198
  import { RpcExtension } from "@dxos/teleport";
1199
- var __dxlog_file6 = "/mnt/ramdisk/work/packages/sdk/client-services/src/packlets/invitations/invitation-extension.ts";
1199
+ var __dxlog_file6 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/invitations/invitation-extension.ts";
1200
1200
  var OPTIONS_TIMEOUT = 1e4;
1201
1201
  var MAX_OTP_ATTEMPTS = 3;
1202
1202
  var InvitationHostExtension = class extends RpcExtension {
@@ -1527,7 +1527,7 @@ var InvitationGuestExtension = class extends RpcExtension {
1527
1527
  var isAuthenticationRequired = (invitation) => invitation.authMethod !== Invitation2.AuthMethod.NONE;
1528
1528
 
1529
1529
  // packages/sdk/client-services/src/packlets/invitations/invitations-handler.ts
1530
- var __dxlog_file7 = "/mnt/ramdisk/work/packages/sdk/client-services/src/packlets/invitations/invitations-handler.ts";
1530
+ var __dxlog_file7 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/invitations/invitations-handler.ts";
1531
1531
  var InvitationsHandler = class {
1532
1532
  /**
1533
1533
  * @internal
@@ -2086,7 +2086,7 @@ import { Stream as Stream8 } from "@dxos/codec-protobuf";
2086
2086
  import { invariant as invariant7 } from "@dxos/invariant";
2087
2087
  import { log as log6 } from "@dxos/log";
2088
2088
  import { Invitation as Invitation4, QueryInvitationsResponse } from "@dxos/protocols/proto/dxos/client/services";
2089
- var __dxlog_file8 = "/mnt/ramdisk/work/packages/sdk/client-services/src/packlets/invitations/invitations-service.ts";
2089
+ var __dxlog_file8 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/invitations/invitations-service.ts";
2090
2090
  var InvitationsServiceImpl = class {
2091
2091
  constructor(_invitationsHandler, _getHandler) {
2092
2092
  this._invitationsHandler = _invitationsHandler;
@@ -2268,7 +2268,7 @@ import { writeMessages as writeMessages2 } from "@dxos/feed-store";
2268
2268
  import { invariant as invariant8 } from "@dxos/invariant";
2269
2269
  import { log as log7 } from "@dxos/log";
2270
2270
  import { Invitation as Invitation5 } from "@dxos/protocols/proto/dxos/client/services";
2271
- var __dxlog_file9 = "/mnt/ramdisk/work/packages/sdk/client-services/src/packlets/invitations/space-invitation-protocol.ts";
2271
+ var __dxlog_file9 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/invitations/space-invitation-protocol.ts";
2272
2272
  var SpaceInvitationProtocol = class {
2273
2273
  constructor(_spaceManager, _signingContext, _keyring, _spaceKey) {
2274
2274
  this._spaceManager = _spaceManager;
@@ -2420,9 +2420,21 @@ var SpaceInvitationProtocol = class {
2420
2420
  import { Stream as Stream9 } from "@dxos/codec-protobuf";
2421
2421
  import { raise } from "@dxos/debug";
2422
2422
  import { parseMethodName, RpcPeer } from "@dxos/rpc";
2423
- var ClientRpcServer = class {
2423
+ import { MapCounter, trace as trace5 } from "@dxos/tracing";
2424
+ function _ts_decorate3(decorators, target, key, desc) {
2425
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
2426
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
2427
+ r = Reflect.decorate(decorators, target, key, desc);
2428
+ else
2429
+ for (var i = decorators.length - 1; i >= 0; i--)
2430
+ if (d = decorators[i])
2431
+ r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
2432
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
2433
+ }
2434
+ var ClientRpcServer = class ClientRpcServer2 {
2424
2435
  constructor(params) {
2425
2436
  this._handlerCache = /* @__PURE__ */ new Map();
2437
+ this._callMetrics = new MapCounter();
2426
2438
  const { serviceRegistry, handleCall, handleStream, ...rpcOptions } = params;
2427
2439
  this._handleCall = handleCall;
2428
2440
  this._handleStream = handleStream;
@@ -2432,6 +2444,7 @@ var ClientRpcServer = class {
2432
2444
  callHandler: (method, params2) => {
2433
2445
  const [serviceName, methodName] = parseMethodName(method);
2434
2446
  const handler = (method2, params3) => this._getServiceHandler(serviceName).call(method2, params3);
2447
+ this._callMetrics.inc(`${serviceName}.${methodName} request`);
2435
2448
  if (this._handleCall) {
2436
2449
  return this._handleCall(methodName, params2, handler);
2437
2450
  } else {
@@ -2441,14 +2454,21 @@ var ClientRpcServer = class {
2441
2454
  streamHandler: (method, params2) => {
2442
2455
  const [serviceName, methodName] = parseMethodName(method);
2443
2456
  const handler = (method2, params3) => this._getServiceHandler(serviceName).callStream(method2, params3);
2457
+ this._callMetrics.inc(`${serviceName}.${methodName} request stream`);
2444
2458
  if (this._handleStream) {
2445
- return Stream9.unwrapPromise(this._handleStream(methodName, params2, handler));
2459
+ return Stream9.map(Stream9.unwrapPromise(this._handleStream(methodName, params2, handler)), (data) => {
2460
+ this._callMetrics.inc(`${serviceName}.${methodName} response stream`);
2461
+ return data;
2462
+ });
2446
2463
  } else {
2447
2464
  return handler(methodName, params2);
2448
2465
  }
2449
2466
  }
2450
2467
  });
2451
2468
  }
2469
+ get _services() {
2470
+ return Object.keys(this._serviceRegistry.services);
2471
+ }
2452
2472
  async open() {
2453
2473
  await this._rpcPeer.open();
2454
2474
  }
@@ -2467,6 +2487,15 @@ var ClientRpcServer = class {
2467
2487
  return this._handlerCache.get(serviceName);
2468
2488
  }
2469
2489
  };
2490
+ _ts_decorate3([
2491
+ trace5.metricsCounter()
2492
+ ], ClientRpcServer.prototype, "_callMetrics", void 0);
2493
+ _ts_decorate3([
2494
+ trace5.info()
2495
+ ], ClientRpcServer.prototype, "_services", null);
2496
+ ClientRpcServer = _ts_decorate3([
2497
+ trace5.resource()
2498
+ ], ClientRpcServer);
2470
2499
 
2471
2500
  // packages/sdk/client-services/src/packlets/services/diagnostics.ts
2472
2501
  import { getFirstStreamValue } from "@dxos/codec-protobuf";
@@ -2507,10 +2536,10 @@ var getPlatform = () => {
2507
2536
  };
2508
2537
 
2509
2538
  // packages/sdk/client-services/src/version.ts
2510
- var DXOS_VERSION = "0.3.2";
2539
+ var DXOS_VERSION = "0.3.3-main.052ad73";
2511
2540
 
2512
2541
  // packages/sdk/client-services/src/packlets/services/diagnostics.ts
2513
- var __dxlog_file10 = "/mnt/ramdisk/work/packages/sdk/client-services/src/packlets/services/diagnostics.ts";
2542
+ var __dxlog_file10 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/services/diagnostics.ts";
2514
2543
  var DEFAULT_TIMEOUT = 1e3;
2515
2544
  var createDiagnostics = async (clientServices, serviceContext, config) => {
2516
2545
  const diagnostics = {
@@ -2526,7 +2555,7 @@ var createDiagnostics = async (clientServices, serviceContext, config) => {
2526
2555
  {
2527
2556
  invariant9(clientServices.LoggingService, "SystemService is not available.", {
2528
2557
  F: __dxlog_file10,
2529
- L: 88,
2558
+ L: 92,
2530
2559
  S: void 0,
2531
2560
  A: [
2532
2561
  "clientServices.LoggingService",
@@ -2559,6 +2588,11 @@ var createDiagnostics = async (clientServices, serviceContext, config) => {
2559
2588
  bytes,
2560
2589
  length
2561
2590
  }));
2591
+ const status = await getFirstStreamValue(clientServices.NetworkService.queryStatus(), {
2592
+ timeout: DEFAULT_TIMEOUT
2593
+ }).catch(() => void 0);
2594
+ diagnostics.networkStatus = status;
2595
+ diagnostics.swarms = serviceContext.networkManager.connectionLog?.swarms;
2562
2596
  }
2563
2597
  diagnostics.config = config.values;
2564
2598
  return diagnostics;
@@ -2572,7 +2606,7 @@ var getProperties = (space) => {
2572
2606
  } catch (err) {
2573
2607
  log8.warn(err.message, void 0, {
2574
2608
  F: __dxlog_file10,
2575
- L: 145,
2609
+ L: 160,
2576
2610
  S: void 0,
2577
2611
  C: (f, a) => f(...a)
2578
2612
  });
@@ -2639,7 +2673,7 @@ import { CancelledError, SystemError } from "@dxos/protocols";
2639
2673
  import { SpaceState } from "@dxos/protocols/proto/dxos/client/services";
2640
2674
  import { AdmittedFeed as AdmittedFeed3 } from "@dxos/protocols/proto/dxos/halo/credentials";
2641
2675
  import { Timeframe as Timeframe2 } from "@dxos/timeframe";
2642
- import { trace as trace5 } from "@dxos/tracing";
2676
+ import { trace as trace6 } from "@dxos/tracing";
2643
2677
  import { ComplexSet as ComplexSet3 } from "@dxos/util";
2644
2678
 
2645
2679
  // packages/sdk/client-services/src/packlets/spaces/notarization-plugin.ts
@@ -2651,7 +2685,7 @@ import { log as log9 } from "@dxos/log";
2651
2685
  import { schema as schema3 } from "@dxos/protocols";
2652
2686
  import { RpcExtension as RpcExtension2 } from "@dxos/teleport";
2653
2687
  import { ComplexMap as ComplexMap2, ComplexSet as ComplexSet2, entry } from "@dxos/util";
2654
- var __dxlog_file11 = "/mnt/ramdisk/work/packages/sdk/client-services/src/packlets/spaces/notarization-plugin.ts";
2688
+ var __dxlog_file11 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/spaces/notarization-plugin.ts";
2655
2689
  var DEFAULT_RETRY_TIMEOUT = 1e3;
2656
2690
  var DEFAULT_SUCCESS_DELAY = 1e3;
2657
2691
  var DEFAULT_NOTARIZE_TIMEOUT = 1e4;
@@ -2911,7 +2945,7 @@ var NotarizationTeleportExtension = class extends RpcExtension2 {
2911
2945
  };
2912
2946
 
2913
2947
  // packages/sdk/client-services/src/packlets/spaces/data-space.ts
2914
- function _ts_decorate3(decorators, target, key, desc) {
2948
+ function _ts_decorate4(decorators, target, key, desc) {
2915
2949
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
2916
2950
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
2917
2951
  r = Reflect.decorate(decorators, target, key, desc);
@@ -2921,7 +2955,7 @@ function _ts_decorate3(decorators, target, key, desc) {
2921
2955
  r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
2922
2956
  return c > 3 && r && Object.defineProperty(target, key, r), r;
2923
2957
  }
2924
- var __dxlog_file12 = "/mnt/ramdisk/work/packages/sdk/client-services/src/packlets/spaces/data-space.ts";
2958
+ var __dxlog_file12 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/spaces/data-space.ts";
2925
2959
  var ENABLE_FEED_PURGE = false;
2926
2960
  var DataSpace = class DataSpace2 {
2927
2961
  constructor(params) {
@@ -3243,32 +3277,32 @@ var DataSpace = class DataSpace2 {
3243
3277
  this.stateUpdate.emit();
3244
3278
  }
3245
3279
  };
3246
- _ts_decorate3([
3280
+ _ts_decorate4([
3247
3281
  synchronized
3248
3282
  ], DataSpace.prototype, "open", null);
3249
- _ts_decorate3([
3283
+ _ts_decorate4([
3250
3284
  synchronized
3251
3285
  ], DataSpace.prototype, "close", null);
3252
- _ts_decorate3([
3253
- trace5.span({
3286
+ _ts_decorate4([
3287
+ trace6.span({
3254
3288
  showInBrowserTimeline: true
3255
3289
  })
3256
3290
  ], DataSpace.prototype, "initializeDataPipeline", null);
3257
- _ts_decorate3([
3258
- trace5.span({
3291
+ _ts_decorate4([
3292
+ trace6.span({
3259
3293
  showInBrowserTimeline: true
3260
3294
  })
3261
3295
  ], DataSpace.prototype, "_initializeAndReadControlPipeline", null);
3262
- _ts_decorate3([
3296
+ _ts_decorate4([
3263
3297
  timed(1e4)
3264
3298
  ], DataSpace.prototype, "_createWritableFeeds", null);
3265
- _ts_decorate3([
3299
+ _ts_decorate4([
3266
3300
  synchronized
3267
3301
  ], DataSpace.prototype, "activate", null);
3268
- _ts_decorate3([
3302
+ _ts_decorate4([
3269
3303
  synchronized
3270
3304
  ], DataSpace.prototype, "deactivate", null);
3271
- DataSpace = _ts_decorate3([
3305
+ DataSpace = _ts_decorate4([
3272
3306
  trackLeaks("open", "close")
3273
3307
  ], DataSpace);
3274
3308
 
@@ -3279,7 +3313,7 @@ import { getCredentialAssertion as getCredentialAssertion2 } from "@dxos/credent
3279
3313
  import { invariant as invariant11 } from "@dxos/invariant";
3280
3314
  import { PublicKey as PublicKey9 } from "@dxos/keys";
3281
3315
  import { log as log11 } from "@dxos/log";
3282
- import { trace as trace6 } from "@dxos/protocols";
3316
+ import { trace as trace7 } from "@dxos/protocols";
3283
3317
  import { SpaceState as SpaceState2 } from "@dxos/protocols/proto/dxos/client/services";
3284
3318
  import { Gossip, Presence } from "@dxos/teleport-extension-gossip";
3285
3319
  import { ComplexMap as ComplexMap3, deferFunction as deferFunction2, forEachAsync } from "@dxos/util";
@@ -3354,7 +3388,7 @@ var spaceGenesis = async (keyring, signingContext, space) => {
3354
3388
  };
3355
3389
 
3356
3390
  // packages/sdk/client-services/src/packlets/spaces/data-space-manager.ts
3357
- function _ts_decorate4(decorators, target, key, desc) {
3391
+ function _ts_decorate5(decorators, target, key, desc) {
3358
3392
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3359
3393
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
3360
3394
  r = Reflect.decorate(decorators, target, key, desc);
@@ -3364,7 +3398,7 @@ function _ts_decorate4(decorators, target, key, desc) {
3364
3398
  r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
3365
3399
  return c > 3 && r && Object.defineProperty(target, key, r), r;
3366
3400
  }
3367
- var __dxlog_file13 = "/mnt/ramdisk/work/packages/sdk/client-services/src/packlets/spaces/data-space-manager.ts";
3401
+ var __dxlog_file13 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/spaces/data-space-manager.ts";
3368
3402
  var DataSpaceManager = class DataSpaceManager2 {
3369
3403
  constructor(_spaceManager, _metadataStore, _dataServiceSubscriptions, _keyring, _signingContext, _feedStore) {
3370
3404
  this._spaceManager = _spaceManager;
@@ -3390,7 +3424,7 @@ var DataSpaceManager = class DataSpaceManager2 {
3390
3424
  S: this,
3391
3425
  C: (f, a) => f(...a)
3392
3426
  });
3393
- log11.trace("dxos.echo.data-space-manager.open", trace6.begin({
3427
+ log11.trace("dxos.echo.data-space-manager.open", trace7.begin({
3394
3428
  id: this._instanceId
3395
3429
  }), {
3396
3430
  F: __dxlog_file13,
@@ -3436,7 +3470,7 @@ var DataSpaceManager = class DataSpaceManager2 {
3436
3470
  space.initializeDataPipelineAsync();
3437
3471
  }
3438
3472
  }
3439
- log11.trace("dxos.echo.data-space-manager.open", trace6.end({
3473
+ log11.trace("dxos.echo.data-space-manager.open", trace7.end({
3440
3474
  id: this._instanceId
3441
3475
  }), {
3442
3476
  F: __dxlog_file13,
@@ -3670,19 +3704,19 @@ var DataSpaceManager = class DataSpaceManager2 {
3670
3704
  return dataSpace;
3671
3705
  }
3672
3706
  };
3673
- _ts_decorate4([
3707
+ _ts_decorate5([
3674
3708
  synchronized2
3675
3709
  ], DataSpaceManager.prototype, "open", null);
3676
- _ts_decorate4([
3710
+ _ts_decorate5([
3677
3711
  synchronized2
3678
3712
  ], DataSpaceManager.prototype, "close", null);
3679
- _ts_decorate4([
3713
+ _ts_decorate5([
3680
3714
  synchronized2
3681
3715
  ], DataSpaceManager.prototype, "createSpace", null);
3682
- _ts_decorate4([
3716
+ _ts_decorate5([
3683
3717
  synchronized2
3684
3718
  ], DataSpaceManager.prototype, "acceptSpace", null);
3685
- DataSpaceManager = _ts_decorate4([
3719
+ DataSpaceManager = _ts_decorate5([
3686
3720
  trackLeaks2("open", "close")
3687
3721
  ], DataSpaceManager);
3688
3722
 
@@ -3694,7 +3728,7 @@ import { invariant as invariant12 } from "@dxos/invariant";
3694
3728
  import { log as log12 } from "@dxos/log";
3695
3729
  import { ApiError, SpaceNotFoundError, encodeError } from "@dxos/protocols";
3696
3730
  import { SpaceMember as SpaceMember3, SpaceState as SpaceState3 } from "@dxos/protocols/proto/dxos/client/services";
3697
- var __dxlog_file14 = "/mnt/ramdisk/work/packages/sdk/client-services/src/packlets/spaces/spaces-service.ts";
3731
+ var __dxlog_file14 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/spaces/spaces-service.ts";
3698
3732
  var SpacesServiceImpl = class {
3699
3733
  constructor(_identityManager, _spaceManager, _dataServiceSubscriptions, _getDataSpaceManager) {
3700
3734
  this._identityManager = _identityManager;
@@ -3918,12 +3952,12 @@ import { invariant as invariant13 } from "@dxos/invariant";
3918
3952
  import { Keyring } from "@dxos/keyring";
3919
3953
  import { PublicKey as PublicKey10 } from "@dxos/keys";
3920
3954
  import { log as log13 } from "@dxos/log";
3921
- import { InvalidStorageVersionError, STORAGE_VERSION as STORAGE_VERSION2, trace as trace7 } from "@dxos/protocols";
3955
+ import { InvalidStorageVersionError, STORAGE_VERSION as STORAGE_VERSION2, trace as trace8 } from "@dxos/protocols";
3922
3956
  import { Invitation as Invitation6 } from "@dxos/protocols/proto/dxos/client/services";
3923
3957
  import { BlobStore } from "@dxos/teleport-extension-object-sync";
3924
3958
  import { trace as Trace2 } from "@dxos/tracing";
3925
3959
  import { safeInstanceof } from "@dxos/util";
3926
- function _ts_decorate5(decorators, target, key, desc) {
3960
+ function _ts_decorate6(decorators, target, key, desc) {
3927
3961
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3928
3962
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
3929
3963
  r = Reflect.decorate(decorators, target, key, desc);
@@ -3933,7 +3967,7 @@ function _ts_decorate5(decorators, target, key, desc) {
3933
3967
  r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
3934
3968
  return c > 3 && r && Object.defineProperty(target, key, r), r;
3935
3969
  }
3936
- var __dxlog_file15 = "/mnt/ramdisk/work/packages/sdk/client-services/src/packlets/services/service-context.ts";
3970
+ var __dxlog_file15 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/services/service-context.ts";
3937
3971
  var ServiceContext = class ServiceContext2 {
3938
3972
  constructor(storage, networkManager, signalManager, modelFactory) {
3939
3973
  this.storage = storage;
@@ -3978,7 +4012,7 @@ var ServiceContext = class ServiceContext2 {
3978
4012
  S: this,
3979
4013
  C: (f, a) => f(...a)
3980
4014
  });
3981
- log13.trace("dxos.sdk.service-context.open", trace7.begin({
4015
+ log13.trace("dxos.sdk.service-context.open", trace8.begin({
3982
4016
  id: this._instanceId
3983
4017
  }), {
3984
4018
  F: __dxlog_file15,
@@ -3994,7 +4028,7 @@ var ServiceContext = class ServiceContext2 {
3994
4028
  if (this.identityManager.identity) {
3995
4029
  await this._initialize(ctx);
3996
4030
  }
3997
- log13.trace("dxos.sdk.service-context.open", trace7.end({
4031
+ log13.trace("dxos.sdk.service-context.open", trace8.end({
3998
4032
  id: this._instanceId
3999
4033
  }), {
4000
4034
  F: __dxlog_file15,
@@ -4157,13 +4191,13 @@ var ServiceContext = class ServiceContext2 {
4157
4191
  await identity.space.spaceState.addCredentialProcessor(this._deviceSpaceSync);
4158
4192
  }
4159
4193
  };
4160
- _ts_decorate5([
4194
+ _ts_decorate6([
4161
4195
  Trace2.span()
4162
4196
  ], ServiceContext.prototype, "open", null);
4163
- _ts_decorate5([
4197
+ _ts_decorate6([
4164
4198
  Trace2.span()
4165
4199
  ], ServiceContext.prototype, "_initialize", null);
4166
- ServiceContext = _ts_decorate5([
4200
+ ServiceContext = _ts_decorate6([
4167
4201
  safeInstanceof("dxos.client-services.ServiceContext"),
4168
4202
  Trace2.resource()
4169
4203
  ], ServiceContext);
@@ -4196,7 +4230,7 @@ var ServiceRegistry = class {
4196
4230
  import { asyncTimeout, Trigger as Trigger6 } from "@dxos/async";
4197
4231
  import { RESOURCE_LOCK_TIMEOUT } from "@dxos/client-protocol";
4198
4232
  import { log as log14, logInfo } from "@dxos/log";
4199
- function _ts_decorate6(decorators, target, key, desc) {
4233
+ function _ts_decorate7(decorators, target, key, desc) {
4200
4234
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4201
4235
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
4202
4236
  r = Reflect.decorate(decorators, target, key, desc);
@@ -4206,7 +4240,7 @@ function _ts_decorate6(decorators, target, key, desc) {
4206
4240
  r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
4207
4241
  return c > 3 && r && Object.defineProperty(target, key, r), r;
4208
4242
  }
4209
- var __dxlog_file16 = "/mnt/ramdisk/work/packages/sdk/client-services/src/packlets/locks/browser.ts";
4243
+ var __dxlog_file16 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/locks/browser.ts";
4210
4244
  var Message;
4211
4245
  (function(Message2) {
4212
4246
  Message2["ACQUIRING"] = "acquiring";
@@ -4309,7 +4343,7 @@ var Lock = class {
4309
4343
  });
4310
4344
  }
4311
4345
  };
4312
- _ts_decorate6([
4346
+ _ts_decorate7([
4313
4347
  logInfo
4314
4348
  ], Lock.prototype, "lockKey", null);
4315
4349
  var isLocked = (lockPath) => {
@@ -4378,7 +4412,7 @@ import { log as log16 } from "@dxos/log";
4378
4412
  import { WebsocketSignalManager } from "@dxos/messaging";
4379
4413
  import { ModelFactory } from "@dxos/model-factory";
4380
4414
  import { createSimplePeerTransportFactory, NetworkManager } from "@dxos/network-manager";
4381
- import { trace as trace8 } from "@dxos/protocols";
4415
+ import { trace as trace9 } from "@dxos/protocols";
4382
4416
  import { SystemStatus } from "@dxos/protocols/proto/dxos/client/services";
4383
4417
  import { TextModel } from "@dxos/text-model";
4384
4418
  import { TRACE_PROCESSOR, trace as Trace3 } from "@dxos/tracing";
@@ -4632,7 +4666,7 @@ var SystemServiceImpl = class {
4632
4666
  };
4633
4667
 
4634
4668
  // packages/sdk/client-services/src/packlets/services/service-host.ts
4635
- function _ts_decorate7(decorators, target, key, desc) {
4669
+ function _ts_decorate8(decorators, target, key, desc) {
4636
4670
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4637
4671
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
4638
4672
  r = Reflect.decorate(decorators, target, key, desc);
@@ -4642,7 +4676,7 @@ function _ts_decorate7(decorators, target, key, desc) {
4642
4676
  r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
4643
4677
  return c > 3 && r && Object.defineProperty(target, key, r), r;
4644
4678
  }
4645
- var __dxlog_file17 = "/mnt/ramdisk/work/packages/sdk/client-services/src/packlets/services/service-host.ts";
4679
+ var __dxlog_file17 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/services/service-host.ts";
4646
4680
  var createDefaultModelFactory = () => {
4647
4681
  return new ModelFactory().registerModel(DocumentModel2).registerModel(TextModel);
4648
4682
  };
@@ -4802,7 +4836,7 @@ var ClientServicesHost = class ClientServicesHost2 {
4802
4836
  return;
4803
4837
  }
4804
4838
  const traceId = PublicKey11.random().toHex();
4805
- log16.trace("dxos.client-services.host.open", trace8.begin({
4839
+ log16.trace("dxos.client-services.host.open", trace9.begin({
4806
4840
  id: traceId
4807
4841
  }), {
4808
4842
  F: __dxlog_file17,
@@ -4901,7 +4935,7 @@ var ClientServicesHost = class ClientServicesHost2 {
4901
4935
  S: this,
4902
4936
  C: (f, a) => f(...a)
4903
4937
  });
4904
- log16.trace("dxos.client-services.host.open", trace8.end({
4938
+ log16.trace("dxos.client-services.host.open", trace9.end({
4905
4939
  id: traceId
4906
4940
  }), {
4907
4941
  F: __dxlog_file17,
@@ -4942,7 +4976,7 @@ var ClientServicesHost = class ClientServicesHost2 {
4942
4976
  }
4943
4977
  async reset() {
4944
4978
  const traceId = PublicKey11.random().toHex();
4945
- log16.trace("dxos.sdk.client-services-host.reset", trace8.begin({
4979
+ log16.trace("dxos.sdk.client-services-host.reset", trace9.begin({
4946
4980
  id: traceId
4947
4981
  }), {
4948
4982
  F: __dxlog_file17,
@@ -4964,7 +4998,7 @@ var ClientServicesHost = class ClientServicesHost2 {
4964
4998
  S: this,
4965
4999
  C: (f, a) => f(...a)
4966
5000
  });
4967
- log16.trace("dxos.sdk.client-services-host.reset", trace8.end({
5001
+ log16.trace("dxos.sdk.client-services-host.reset", trace9.end({
4968
5002
  id: traceId
4969
5003
  }), {
4970
5004
  F: __dxlog_file17,
@@ -4994,21 +5028,21 @@ var ClientServicesHost = class ClientServicesHost2 {
4994
5028
  return identity;
4995
5029
  }
4996
5030
  };
4997
- _ts_decorate7([
5031
+ _ts_decorate8([
4998
5032
  Trace3.info()
4999
5033
  ], ClientServicesHost.prototype, "_opening", void 0);
5000
- _ts_decorate7([
5034
+ _ts_decorate8([
5001
5035
  Trace3.info()
5002
5036
  ], ClientServicesHost.prototype, "_open", void 0);
5003
- _ts_decorate7([
5037
+ _ts_decorate8([
5004
5038
  synchronized3,
5005
5039
  Trace3.span()
5006
5040
  ], ClientServicesHost.prototype, "open", null);
5007
- _ts_decorate7([
5041
+ _ts_decorate8([
5008
5042
  synchronized3,
5009
5043
  Trace3.span()
5010
5044
  ], ClientServicesHost.prototype, "close", null);
5011
- ClientServicesHost = _ts_decorate7([
5045
+ ClientServicesHost = _ts_decorate8([
5012
5046
  Trace3.resource()
5013
5047
  ], ClientServicesHost);
5014
5048
 
@@ -5045,4 +5079,4 @@ export {
5045
5079
  createDefaultModelFactory,
5046
5080
  ClientServicesHost
5047
5081
  };
5048
- //# sourceMappingURL=chunk-5YN7ZUGL.mjs.map
5082
+ //# sourceMappingURL=chunk-A4MFFX7V.mjs.map