@dxos/client-services 0.3.11-main.927e4ba → 0.3.11-main.9b81c36

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.
Files changed (36) hide show
  1. package/dist/lib/browser/{chunk-D5MCMADP.mjs → chunk-VRYKPNTD.mjs} +130 -43
  2. package/dist/lib/browser/chunk-VRYKPNTD.mjs.map +7 -0
  3. package/dist/lib/browser/index.mjs +1 -1
  4. package/dist/lib/browser/meta.json +1 -1
  5. package/dist/lib/browser/packlets/testing/index.mjs +1 -1
  6. package/dist/lib/node/{chunk-XVKOKG24.cjs → chunk-ZO7Y6LD6.cjs} +217 -130
  7. package/dist/lib/node/chunk-ZO7Y6LD6.cjs.map +7 -0
  8. package/dist/lib/node/index.cjs +37 -37
  9. package/dist/lib/node/meta.json +1 -1
  10. package/dist/lib/node/packlets/testing/index.cjs +8 -8
  11. package/dist/types/src/packlets/network/network-service.d.ts.map +1 -1
  12. package/dist/types/src/packlets/services/diagnostics.d.ts +32 -16
  13. package/dist/types/src/packlets/services/diagnostics.d.ts.map +1 -1
  14. package/dist/types/src/packlets/services/platform.d.ts +1 -14
  15. package/dist/types/src/packlets/services/platform.d.ts.map +1 -1
  16. package/dist/types/src/packlets/spaces/automerge-space-state.d.ts +2 -0
  17. package/dist/types/src/packlets/spaces/automerge-space-state.d.ts.map +1 -1
  18. package/dist/types/src/packlets/spaces/data-space-manager.d.ts.map +1 -1
  19. package/dist/types/src/packlets/spaces/data-space.d.ts +2 -0
  20. package/dist/types/src/packlets/spaces/data-space.d.ts.map +1 -1
  21. package/dist/types/src/packlets/system/system-service.d.ts +3 -2
  22. package/dist/types/src/packlets/system/system-service.d.ts.map +1 -1
  23. package/dist/types/src/version.d.ts +1 -1
  24. package/package.json +35 -35
  25. package/src/packlets/identity/identity-manager.ts +1 -1
  26. package/src/packlets/network/network-service.ts +5 -1
  27. package/src/packlets/services/diagnostics.ts +52 -16
  28. package/src/packlets/services/platform.ts +7 -19
  29. package/src/packlets/spaces/automerge-space-state.ts +4 -0
  30. package/src/packlets/spaces/data-space-manager.ts +5 -1
  31. package/src/packlets/spaces/data-space.ts +37 -4
  32. package/src/packlets/spaces/spaces-service.ts +2 -2
  33. package/src/packlets/system/system-service.ts +7 -1
  34. package/src/version.ts +1 -1
  35. package/dist/lib/browser/chunk-D5MCMADP.mjs.map +0 -7
  36. package/dist/lib/node/chunk-XVKOKG24.cjs.map +0 -7
@@ -996,7 +996,7 @@ var IdentityManager = class {
996
996
  genesisFeedKey: spaceRecord.genesisFeedKey
997
997
  },
998
998
  swarmIdentity,
999
- onNetworkConnection: () => {
999
+ onAuthorizedConnection: () => {
1000
1000
  },
1001
1001
  onAuthFailure: () => {
1002
1002
  log3.warn("auth failure", void 0, {
@@ -2533,29 +2533,32 @@ import { invariant as invariant9 } from "@dxos/invariant";
2533
2533
  import { log as log8 } from "@dxos/log";
2534
2534
  import { STORAGE_VERSION } from "@dxos/protocols";
2535
2535
  import { SpaceMember } from "@dxos/protocols/proto/dxos/client/services";
2536
+ import { TRACE_PROCESSOR } from "@dxos/tracing";
2536
2537
 
2537
2538
  // packages/sdk/client-services/src/packlets/services/platform.ts
2539
+ import { Platform } from "@dxos/protocols/proto/dxos/client/services";
2538
2540
  var getPlatform = () => {
2539
2541
  if (process.browser) {
2540
2542
  if (typeof window !== "undefined") {
2541
2543
  const { userAgent } = window.navigator;
2542
2544
  return {
2543
- type: "browser",
2545
+ type: Platform.PLATFORM_TYPE.BROWSER,
2544
2546
  userAgent,
2545
2547
  uptime: Math.floor((Date.now() - window.performance.timeOrigin) / 1e3)
2546
2548
  };
2547
2549
  } else {
2548
2550
  return {
2549
- type: "shared-worker",
2551
+ type: Platform.PLATFORM_TYPE.SHARED_WORKER,
2550
2552
  uptime: Math.floor((Date.now() - performance.timeOrigin) / 1e3)
2551
2553
  };
2552
2554
  }
2553
2555
  } else {
2554
2556
  const { platform: platform2, version, arch } = process;
2555
2557
  return {
2556
- type: "node",
2557
- platform: `${platform2} ${version} ${arch}`,
2558
- runtime: process.version,
2558
+ type: Platform.PLATFORM_TYPE.NODE,
2559
+ platform: platform2,
2560
+ arch,
2561
+ runtime: version,
2559
2562
  uptime: Math.floor(process.uptime()),
2560
2563
  memory: process.memoryUsage()
2561
2564
  };
@@ -2563,7 +2566,7 @@ var getPlatform = () => {
2563
2566
  };
2564
2567
 
2565
2568
  // packages/sdk/client-services/src/version.ts
2566
- var DXOS_VERSION = "0.3.11-main.927e4ba";
2569
+ var DXOS_VERSION = "0.3.11-main.9b81c36";
2567
2570
 
2568
2571
  // packages/sdk/client-services/src/packlets/services/diagnostics.ts
2569
2572
  var __dxlog_file10 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/services/diagnostics.ts";
@@ -2577,12 +2580,13 @@ var createDiagnostics = async (clientServices, serviceContext, config) => {
2577
2580
  storage: {
2578
2581
  version: STORAGE_VERSION
2579
2582
  }
2580
- }
2583
+ },
2584
+ trace: TRACE_PROCESSOR.getDiagnostics()
2581
2585
  };
2582
2586
  {
2583
2587
  invariant9(clientServices.LoggingService, "SystemService is not available.", {
2584
2588
  F: __dxlog_file10,
2585
- L: 92,
2589
+ L: 111,
2586
2590
  S: void 0,
2587
2591
  A: [
2588
2592
  "clientServices.LoggingService",
@@ -2593,6 +2597,21 @@ var createDiagnostics = async (clientServices, serviceContext, config) => {
2593
2597
  timeout: DEFAULT_TIMEOUT
2594
2598
  }).catch(() => void 0);
2595
2599
  }
2600
+ if (typeof navigator !== "undefined" && navigator.storage) {
2601
+ const map = /* @__PURE__ */ new Map();
2602
+ const dir = await navigator.storage.getDirectory();
2603
+ for await (const filename of dir?.keys()) {
2604
+ const idx = filename.indexOf("-", filename.indexOf("-") + 1);
2605
+ if (idx === -1) {
2606
+ continue;
2607
+ }
2608
+ map.set(filename.slice(0, idx), (map.get(filename.slice(0, idx)) ?? 0) + 1);
2609
+ }
2610
+ diagnostics.storage = Array.from(map.entries()).sort((a, b) => b[1] - a[1]).map(([file, count]) => ({
2611
+ file,
2612
+ count
2613
+ }));
2614
+ }
2596
2615
  const identity = serviceContext.identityManager.identity;
2597
2616
  if (identity) {
2598
2617
  diagnostics.identity = {
@@ -2633,7 +2652,7 @@ var getProperties = (space) => {
2633
2652
  } catch (err) {
2634
2653
  log8.warn(err.message, void 0, {
2635
2654
  F: __dxlog_file10,
2636
- L: 160,
2655
+ L: 196,
2637
2656
  S: void 0,
2638
2657
  C: (f, a) => f(...a)
2639
2658
  });
@@ -2689,11 +2708,12 @@ var getSpaceStats = async (space) => {
2689
2708
  };
2690
2709
 
2691
2710
  // packages/sdk/client-services/src/packlets/spaces/data-space.ts
2692
- import { Event as Event5, scheduleTask as scheduleTask4, sleep as sleep2, synchronized, trackLeaks } from "@dxos/async";
2711
+ import { Event as Event5, asyncTimeout, scheduleTask as scheduleTask4, sleep as sleep2, synchronized, trackLeaks } from "@dxos/async";
2693
2712
  import { AUTH_TIMEOUT as AUTH_TIMEOUT2 } from "@dxos/client-protocol";
2694
- import { cancelWithContext as cancelWithContext2, Context as Context7 } from "@dxos/context";
2713
+ import { cancelWithContext as cancelWithContext2, Context as Context7, ContextDisposedError } from "@dxos/context";
2695
2714
  import { timed } from "@dxos/debug";
2696
2715
  import { createMappedFeedWriter } from "@dxos/echo-pipeline";
2716
+ import { failedInvariant } from "@dxos/invariant";
2697
2717
  import { PublicKey as PublicKey8 } from "@dxos/keys";
2698
2718
  import { log as log10 } from "@dxos/log";
2699
2719
  import { CancelledError, SystemError } from "@dxos/protocols";
@@ -2706,7 +2726,8 @@ import { ComplexSet as ComplexSet3 } from "@dxos/util";
2706
2726
  // packages/sdk/client-services/src/packlets/spaces/automerge-space-state.ts
2707
2727
  import { checkCredentialType } from "@dxos/credentials";
2708
2728
  var AutomergeSpaceState = class {
2709
- constructor() {
2729
+ constructor(_onNewRoot) {
2730
+ this._onNewRoot = _onNewRoot;
2710
2731
  this.rootUrl = void 0;
2711
2732
  this.lastEpoch = void 0;
2712
2733
  }
@@ -2717,6 +2738,7 @@ var AutomergeSpaceState = class {
2717
2738
  this.lastEpoch = credential;
2718
2739
  if (credential.subject.assertion.automergeRoot) {
2719
2740
  this.rootUrl = credential.subject.assertion.automergeRoot;
2741
+ this._onNewRoot(this.rootUrl);
2720
2742
  }
2721
2743
  }
2722
2744
  };
@@ -3008,7 +3030,7 @@ var DataSpace = class {
3008
3030
  this._notarizationPlugin = new NotarizationPlugin();
3009
3031
  this._cache = void 0;
3010
3032
  // TODO(dmaretskyi): Move into Space?
3011
- this._automergeSpaceState = new AutomergeSpaceState();
3033
+ this._automergeSpaceState = new AutomergeSpaceState((rootUrl) => this._onNewAutomergeRoot(rootUrl));
3012
3034
  this._state = SpaceState.CLOSED;
3013
3035
  /**
3014
3036
  * Error for _state === SpaceState.ERROR.
@@ -3037,7 +3059,7 @@ var DataSpace = class {
3037
3059
  state: SpaceState[this._state]
3038
3060
  }, {
3039
3061
  F: __dxlog_file12,
3040
- L: 137,
3062
+ L: 141,
3041
3063
  S: this,
3042
3064
  C: (f, a) => f(...a)
3043
3065
  });
@@ -3070,6 +3092,12 @@ var DataSpace = class {
3070
3092
  get automergeSpaceState() {
3071
3093
  return this._automergeSpaceState;
3072
3094
  }
3095
+ get _automergeInfo() {
3096
+ return {
3097
+ rootUrl: this._automergeSpaceState.rootUrl,
3098
+ lastEpoch: this._automergeSpaceState.lastEpoch
3099
+ };
3100
+ }
3073
3101
  async open() {
3074
3102
  await this._open();
3075
3103
  }
@@ -3084,7 +3112,7 @@ var DataSpace = class {
3084
3112
  state: SpaceState[this._state]
3085
3113
  }, {
3086
3114
  F: __dxlog_file12,
3087
- L: 189,
3115
+ L: 203,
3088
3116
  S: this,
3089
3117
  C: (f, a) => f(...a)
3090
3118
  });
@@ -3102,7 +3130,7 @@ var DataSpace = class {
3102
3130
  state: SpaceState[this._state]
3103
3131
  }, {
3104
3132
  F: __dxlog_file12,
3105
- L: 203,
3133
+ L: 217,
3106
3134
  S: this,
3107
3135
  C: (f, a) => f(...a)
3108
3136
  });
@@ -3131,10 +3159,10 @@ var DataSpace = class {
3131
3159
  this.metrics.pipelineInitBegin = /* @__PURE__ */ new Date();
3132
3160
  await this.initializeDataPipeline();
3133
3161
  } catch (err) {
3134
- if (err instanceof CancelledError) {
3162
+ if (err instanceof CancelledError || err instanceof ContextDisposedError) {
3135
3163
  log10("data pipeline initialization cancelled", err, {
3136
3164
  F: __dxlog_file12,
3137
- L: 236,
3165
+ L: 250,
3138
3166
  S: this,
3139
3167
  C: (f, a) => f(...a)
3140
3168
  });
@@ -3142,7 +3170,7 @@ var DataSpace = class {
3142
3170
  }
3143
3171
  log10.error("Error initializing data pipeline", err, {
3144
3172
  F: __dxlog_file12,
3145
- L: 240,
3173
+ L: 254,
3146
3174
  S: this,
3147
3175
  C: (f, a) => f(...a)
3148
3176
  });
@@ -3151,7 +3179,7 @@ var DataSpace = class {
3151
3179
  state: SpaceState[this._state]
3152
3180
  }, {
3153
3181
  F: __dxlog_file12,
3154
- L: 242,
3182
+ L: 256,
3155
3183
  S: this,
3156
3184
  C: (f, a) => f(...a)
3157
3185
  });
@@ -3171,7 +3199,7 @@ var DataSpace = class {
3171
3199
  state: SpaceState[this._state]
3172
3200
  }, {
3173
3201
  F: __dxlog_file12,
3174
- L: 258,
3202
+ L: 272,
3175
3203
  S: this,
3176
3204
  C: (f, a) => f(...a)
3177
3205
  });
@@ -3182,7 +3210,7 @@ var DataSpace = class {
3182
3210
  await cancelWithContext2(this._ctx, this._inner.dataPipeline.ensureEpochInitialized());
3183
3211
  log10("waiting for data pipeline to reach target timeframe", void 0, {
3184
3212
  F: __dxlog_file12,
3185
- L: 272,
3213
+ L: 286,
3186
3214
  S: this,
3187
3215
  C: (f, a) => f(...a)
3188
3216
  });
@@ -3193,7 +3221,7 @@ var DataSpace = class {
3193
3221
  this.metrics.dataPipelineReady = /* @__PURE__ */ new Date();
3194
3222
  log10("data pipeline ready", void 0, {
3195
3223
  F: __dxlog_file12,
3196
- L: 281,
3224
+ L: 295,
3197
3225
  S: this,
3198
3226
  C: (f, a) => f(...a)
3199
3227
  });
@@ -3203,7 +3231,7 @@ var DataSpace = class {
3203
3231
  state: SpaceState[this._state]
3204
3232
  }, {
3205
3233
  F: __dxlog_file12,
3206
- L: 285,
3234
+ L: 299,
3207
3235
  S: this,
3208
3236
  C: (f, a) => f(...a)
3209
3237
  });
@@ -3219,7 +3247,7 @@ var DataSpace = class {
3219
3247
  await this._createWritableFeeds();
3220
3248
  log10("writable feeds created", void 0, {
3221
3249
  F: __dxlog_file12,
3222
- L: 301,
3250
+ L: 315,
3223
3251
  S: this,
3224
3252
  C: (f, a) => f(...a)
3225
3253
  });
@@ -3276,6 +3304,40 @@ var DataSpace = class {
3276
3304
  await this._metadataStore.setWritableFeedKeys(this.key, this.inner.controlFeedKey, this.inner.dataFeedKey);
3277
3305
  }
3278
3306
  }
3307
+ _onNewAutomergeRoot(rootUrl) {
3308
+ log10("loading automerge root doc for space", {
3309
+ space: this.key,
3310
+ rootUrl
3311
+ }, {
3312
+ F: __dxlog_file12,
3313
+ L: 381,
3314
+ S: this,
3315
+ C: (f, a) => f(...a)
3316
+ });
3317
+ const handle = this._automergeHost.repo.find(rootUrl);
3318
+ queueMicrotask(async () => {
3319
+ try {
3320
+ await asyncTimeout(handle.whenReady(), 5e3);
3321
+ const doc = handle.docSync() ?? failedInvariant();
3322
+ if (!doc.experimental_spaceKey) {
3323
+ handle.change((doc2) => {
3324
+ doc2.experimental_spaceKey = this.key.toHex();
3325
+ });
3326
+ }
3327
+ } catch (err) {
3328
+ log10.warn("error loading automerge root doc", {
3329
+ space: this.key,
3330
+ rootUrl,
3331
+ err
3332
+ }, {
3333
+ F: __dxlog_file12,
3334
+ L: 394,
3335
+ S: this,
3336
+ C: (f, a) => f(...a)
3337
+ });
3338
+ }
3339
+ });
3340
+ }
3279
3341
  // TODO(dmaretskyi): Use profile from signing context.
3280
3342
  async updateOwnProfile(profile) {
3281
3343
  const credential = await this._signingContext.credentialSigner.createCredential({
@@ -3359,13 +3421,29 @@ var DataSpace = class {
3359
3421
  state: SpaceState[this._state]
3360
3422
  }, {
3361
3423
  F: __dxlog_file12,
3362
- L: 450,
3424
+ L: 483,
3363
3425
  S: this,
3364
3426
  C: (f, a) => f(...a)
3365
3427
  });
3366
3428
  this.stateUpdate.emit();
3367
3429
  }
3368
3430
  };
3431
+ _ts_decorate4([
3432
+ trace6.info()
3433
+ ], DataSpace.prototype, "_inner", void 0);
3434
+ _ts_decorate4([
3435
+ trace6.info()
3436
+ ], DataSpace.prototype, "key", null);
3437
+ _ts_decorate4([
3438
+ trace6.info({
3439
+ enum: SpaceState
3440
+ })
3441
+ ], DataSpace.prototype, "state", null);
3442
+ _ts_decorate4([
3443
+ trace6.info({
3444
+ depth: null
3445
+ })
3446
+ ], DataSpace.prototype, "_automergeInfo", null);
3369
3447
  _ts_decorate4([
3370
3448
  synchronized
3371
3449
  ], DataSpace.prototype, "open", null);
@@ -3392,7 +3470,8 @@ _ts_decorate4([
3392
3470
  synchronized
3393
3471
  ], DataSpace.prototype, "deactivate", null);
3394
3472
  DataSpace = _ts_decorate4([
3395
- trackLeaks("open", "close")
3473
+ trackLeaks("open", "close"),
3474
+ trace6.resource()
3396
3475
  ], DataSpace);
3397
3476
 
3398
3477
  // packages/sdk/client-services/src/packlets/spaces/data-space-manager.ts
@@ -3618,12 +3697,15 @@ var DataSpaceManager = class {
3618
3697
  });
3619
3698
  const space = await this._constructSpace(metadata);
3620
3699
  const automergeRoot = this._automergeHost.repo.create();
3700
+ automergeRoot.change((doc) => {
3701
+ doc.experimental_spaceKey = spaceKey.toHex();
3702
+ });
3621
3703
  const credentials = await spaceGenesis(this._keyring, this._signingContext, space.inner, automergeRoot.url);
3622
3704
  await this._metadataStore.addSpace(metadata);
3623
3705
  const memberCredential = credentials[1];
3624
3706
  invariant11(getCredentialAssertion2(memberCredential)["@type"] === "dxos.halo.credentials.SpaceMember", void 0, {
3625
3707
  F: __dxlog_file13,
3626
- L: 151,
3708
+ L: 154,
3627
3709
  S: this,
3628
3710
  A: [
3629
3711
  "getCredentialAssertion(memberCredential)['@type'] === 'dxos.halo.credentials.SpaceMember'",
@@ -3641,13 +3723,13 @@ var DataSpaceManager = class {
3641
3723
  opts
3642
3724
  }, {
3643
3725
  F: __dxlog_file13,
3644
- L: 163,
3726
+ L: 166,
3645
3727
  S: this,
3646
3728
  C: (f, a) => f(...a)
3647
3729
  });
3648
3730
  invariant11(this._isOpen, "Not open.", {
3649
3731
  F: __dxlog_file13,
3650
- L: 164,
3732
+ L: 167,
3651
3733
  S: this,
3652
3734
  A: [
3653
3735
  "this._isOpen",
@@ -3656,7 +3738,7 @@ var DataSpaceManager = class {
3656
3738
  });
3657
3739
  invariant11(!this._spaces.has(opts.spaceKey), "Space already exists.", {
3658
3740
  F: __dxlog_file13,
3659
- L: 165,
3741
+ L: 168,
3660
3742
  S: this,
3661
3743
  A: [
3662
3744
  "!this._spaces.has(opts.spaceKey)",
@@ -3691,7 +3773,7 @@ var DataSpaceManager = class {
3691
3773
  metadata
3692
3774
  }, {
3693
3775
  F: __dxlog_file13,
3694
- L: 198,
3776
+ L: 201,
3695
3777
  S: this,
3696
3778
  C: (f, a) => f(...a)
3697
3779
  });
@@ -3718,17 +3800,18 @@ var DataSpaceManager = class {
3718
3800
  credentialProvider: createAuthProvider(this._signingContext.credentialSigner),
3719
3801
  credentialAuthenticator: deferFunction2(() => dataSpace.authVerifier.verifier)
3720
3802
  },
3721
- onNetworkConnection: (session) => {
3803
+ onAuthorizedConnection: (session) => {
3722
3804
  session.addExtension("dxos.mesh.teleport.gossip", gossip.createExtension({
3723
3805
  remotePeerId: session.remotePeerId
3724
3806
  }));
3725
3807
  session.addExtension("dxos.mesh.teleport.notarization", dataSpace.notarizationPlugin.createExtension());
3808
+ this._automergeHost.authorizeDevice(space.key, session.remotePeerId);
3726
3809
  session.addExtension("dxos.mesh.teleport.automerge", this._automergeHost.createExtension());
3727
3810
  },
3728
3811
  onAuthFailure: () => {
3729
3812
  log11.warn("auth failure", void 0, {
3730
3813
  F: __dxlog_file13,
3731
- L: 234,
3814
+ L: 238,
3732
3815
  S: this,
3733
3816
  C: (f, a) => f(...a)
3734
3817
  });
@@ -3752,7 +3835,7 @@ var DataSpaceManager = class {
3752
3835
  space: space.key
3753
3836
  }, {
3754
3837
  F: __dxlog_file13,
3755
- L: 252,
3838
+ L: 256,
3756
3839
  S: this,
3757
3840
  C: (f, a) => f(...a)
3758
3841
  });
@@ -3764,7 +3847,7 @@ var DataSpaceManager = class {
3764
3847
  open: this._isOpen
3765
3848
  }, {
3766
3849
  F: __dxlog_file13,
3767
- L: 259,
3850
+ L: 263,
3768
3851
  S: this,
3769
3852
  C: (f, a) => f(...a)
3770
3853
  });
@@ -3777,7 +3860,7 @@ var DataSpaceManager = class {
3777
3860
  space: space.key
3778
3861
  }, {
3779
3862
  F: __dxlog_file13,
3780
- L: 265,
3863
+ L: 269,
3781
3864
  S: this,
3782
3865
  C: (f, a) => f(...a)
3783
3866
  });
@@ -4333,7 +4416,7 @@ var ServiceRegistry = class {
4333
4416
  };
4334
4417
 
4335
4418
  // packages/sdk/client-services/src/packlets/locks/browser.ts
4336
- import { asyncTimeout, Trigger as Trigger6 } from "@dxos/async";
4419
+ import { asyncTimeout as asyncTimeout2, Trigger as Trigger6 } from "@dxos/async";
4337
4420
  import { RESOURCE_LOCK_TIMEOUT } from "@dxos/client-protocol";
4338
4421
  import { log as log14, logInfo } from "@dxos/log";
4339
4422
  function _ts_decorate7(decorators, target, key, desc) {
@@ -4374,7 +4457,7 @@ var Lock = class {
4374
4457
  S: this,
4375
4458
  C: (f, a) => f(...a)
4376
4459
  });
4377
- await asyncTimeout(this._requestLock(), RESOURCE_LOCK_TIMEOUT);
4460
+ await asyncTimeout2(this._requestLock(), RESOURCE_LOCK_TIMEOUT);
4378
4461
  log14("acquired lock", void 0, {
4379
4462
  F: __dxlog_file16,
4380
4463
  L: 44,
@@ -4521,7 +4604,7 @@ import { createSimplePeerTransportFactory, NetworkManager } from "@dxos/network-
4521
4604
  import { trace as trace9 } from "@dxos/protocols";
4522
4605
  import { SystemStatus } from "@dxos/protocols/proto/dxos/client/services";
4523
4606
  import { TextModel } from "@dxos/text-model";
4524
- import { TRACE_PROCESSOR, trace as Trace3 } from "@dxos/tracing";
4607
+ import { TRACE_PROCESSOR as TRACE_PROCESSOR2, trace as Trace3 } from "@dxos/tracing";
4525
4608
  import { WebsocketRpcClient } from "@dxos/websocket-rpc";
4526
4609
 
4527
4610
  // packages/sdk/client-services/src/packlets/devices/devices-service.ts
@@ -4697,6 +4780,7 @@ var NetworkServiceImpl = class {
4697
4780
  const update = () => {
4698
4781
  next({
4699
4782
  swarm: this.networkManager.connectionState,
4783
+ connectionInfo: this.networkManager.connectionLog?.swarms,
4700
4784
  signaling: this.signalManager.getStatus().map(({ host, state }) => ({
4701
4785
  server: host,
4702
4786
  state
@@ -4746,6 +4830,9 @@ var SystemServiceImpl = class {
4746
4830
  })))
4747
4831
  };
4748
4832
  }
4833
+ async getPlatform() {
4834
+ return getPlatform();
4835
+ }
4749
4836
  async updateStatus({ status }) {
4750
4837
  await this._onUpdateStatus(status);
4751
4838
  }
@@ -4809,7 +4896,7 @@ var ClientServicesHost = class {
4809
4896
  lockKey,
4810
4897
  callbacks
4811
4898
  } = {}) {
4812
- this._tracingService = TRACE_PROCESSOR.createTraceSender();
4899
+ this._tracingService = TRACE_PROCESSOR2.createTraceSender();
4813
4900
  this._statusUpdate = new Event8();
4814
4901
  this._opening = false;
4815
4902
  this._open = false;
@@ -5207,4 +5294,4 @@ export {
5207
5294
  createDefaultModelFactory,
5208
5295
  ClientServicesHost
5209
5296
  };
5210
- //# sourceMappingURL=chunk-D5MCMADP.mjs.map
5297
+ //# sourceMappingURL=chunk-VRYKPNTD.mjs.map