@dxos/client-services 0.7.5-labs.8a82073 → 0.7.5-labs.c0e040f

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.
@@ -397,7 +397,7 @@ import { SpaceMember } from "@dxos/protocols/proto/dxos/client/services";
397
397
  import { TRACE_PROCESSOR } from "@dxos/tracing";
398
398
 
399
399
  // packages/sdk/client-services/src/version.ts
400
- var DXOS_VERSION = "0.7.5-labs.8a82073";
400
+ var DXOS_VERSION = "0.7.5-labs.c0e040f";
401
401
 
402
402
  // packages/sdk/client-services/src/packlets/services/platform.ts
403
403
  import { Platform } from "@dxos/protocols/proto/dxos/client/services";
@@ -649,7 +649,7 @@ import { ClientServicesProviderResource } from "@dxos/client-protocol";
649
649
  import { ConfigResource } from "@dxos/config";
650
650
  import { GetDiagnosticsRequest } from "@dxos/protocols/proto/dxos/client/services";
651
651
  import { TRACE_PROCESSOR as TRACE_PROCESSOR2 } from "@dxos/tracing";
652
- import { jsonKeyReplacer, nonNullable } from "@dxos/util";
652
+ import { jsonKeyReplacer, isNonNullable } from "@dxos/util";
653
653
  var GET_DIAGNOSTICS_RPC_TIMEOUT = 1e4;
654
654
  var DiagnosticsCollector = class {
655
655
  static {
@@ -682,7 +682,7 @@ var findSystemServiceProvider = () => {
682
682
  };
683
683
  var findConfigs = () => {
684
684
  const configs = TRACE_PROCESSOR2.findResourcesByAnnotation(ConfigResource);
685
- return configs.map((r) => r.instance.deref()).filter(nonNullable);
685
+ return configs.map((r) => r.instance.deref()).filter(isNonNullable);
686
686
  };
687
687
 
688
688
  // packages/sdk/client-services/src/packlets/identity/authenticator.ts
@@ -2530,7 +2530,7 @@ var DataSpaceManager = class extends Resource4 {
2530
2530
  });
2531
2531
  dataSpace.postOpen.append(async () => {
2532
2532
  const setting = dataSpace.getEdgeReplicationSetting();
2533
- if (setting === EdgeReplicationSetting.ENABLED) {
2533
+ if (!setting || setting === EdgeReplicationSetting.ENABLED) {
2534
2534
  await this._echoEdgeReplicator?.connectToSpace(dataSpace.id);
2535
2535
  } else if (this._echoEdgeReplicator) {
2536
2536
  log7("not connecting EchoEdgeReplicator because of EdgeReplicationSetting", {
@@ -2545,7 +2545,7 @@ var DataSpaceManager = class extends Resource4 {
2545
2545
  });
2546
2546
  dataSpace.preClose.append(async () => {
2547
2547
  const setting = dataSpace.getEdgeReplicationSetting();
2548
- if (setting === EdgeReplicationSetting.ENABLED) {
2548
+ if (!setting || setting === EdgeReplicationSetting.ENABLED) {
2549
2549
  await this._echoEdgeReplicator?.disconnectFromSpace(dataSpace.id);
2550
2550
  }
2551
2551
  });
@@ -7159,6 +7159,18 @@ var EdgeAgentManager = class extends Resource6 {
7159
7159
  haloSpaceKey: this._identity.haloSpaceKey.toHex()
7160
7160
  });
7161
7161
  const deviceKey = PublicKey13.fromHex(response.deviceKey);
7162
+ if (await this._identity.authorizedDeviceKeys.has(deviceKey)) {
7163
+ log22.info("agent was already added to HALO, ignoring response", {
7164
+ response
7165
+ }, {
7166
+ F: __dxlog_file26,
7167
+ L: 67,
7168
+ S: this,
7169
+ C: (f, a) => f(...a)
7170
+ });
7171
+ this._updateStatus(EdgeAgentStatus.ACTIVE, deviceKey);
7172
+ return;
7173
+ }
7162
7174
  await this._identity.admitDevice({
7163
7175
  deviceKey,
7164
7176
  controlFeedKey: PublicKey13.fromHex(response.feedKey),
@@ -7167,7 +7179,7 @@ var EdgeAgentManager = class extends Resource6 {
7167
7179
  });
7168
7180
  log22("agent created", response, {
7169
7181
  F: __dxlog_file26,
7170
- L: 73,
7182
+ L: 79,
7171
7183
  S: this,
7172
7184
  C: (f, a) => f(...a)
7173
7185
  });
@@ -7179,7 +7191,7 @@ var EdgeAgentManager = class extends Resource6 {
7179
7191
  isEnabled
7180
7192
  }, {
7181
7193
  F: __dxlog_file26,
7182
- L: 81,
7194
+ L: 87,
7183
7195
  S: this,
7184
7196
  C: (f, a) => f(...a)
7185
7197
  });
@@ -7212,7 +7224,7 @@ var EdgeAgentManager = class extends Resource6 {
7212
7224
  async _fetchAgentStatus() {
7213
7225
  invariant18(this._edgeHttpClient, void 0, {
7214
7226
  F: __dxlog_file26,
7215
- L: 115,
7227
+ L: 121,
7216
7228
  S: this,
7217
7229
  A: [
7218
7230
  "this._edgeHttpClient",
@@ -7222,7 +7234,7 @@ var EdgeAgentManager = class extends Resource6 {
7222
7234
  try {
7223
7235
  log22("fetching agent status", void 0, {
7224
7236
  F: __dxlog_file26,
7225
- L: 117,
7237
+ L: 123,
7226
7238
  S: this,
7227
7239
  C: (f, a) => f(...a)
7228
7240
  });
@@ -7241,7 +7253,7 @@ var EdgeAgentManager = class extends Resource6 {
7241
7253
  err
7242
7254
  }, {
7243
7255
  F: __dxlog_file26,
7244
- L: 127,
7256
+ L: 133,
7245
7257
  S: this,
7246
7258
  C: (f, a) => f(...a)
7247
7259
  });
@@ -7254,7 +7266,7 @@ var EdgeAgentManager = class extends Resource6 {
7254
7266
  retryAfterMs
7255
7267
  }, {
7256
7268
  F: __dxlog_file26,
7257
- L: 132,
7269
+ L: 138,
7258
7270
  S: this,
7259
7271
  C: (f, a) => f(...a)
7260
7272
  });
@@ -7290,7 +7302,7 @@ var EdgeAgentManager = class extends Resource6 {
7290
7302
  spaceId: space.id
7291
7303
  }, {
7292
7304
  F: __dxlog_file26,
7293
- L: 159,
7305
+ L: 165,
7294
7306
  S: this,
7295
7307
  C: (f, a) => f(...a)
7296
7308
  });
@@ -7310,7 +7322,7 @@ var EdgeAgentManager = class extends Resource6 {
7310
7322
  status
7311
7323
  }, {
7312
7324
  F: __dxlog_file26,
7313
- L: 175,
7325
+ L: 181,
7314
7326
  S: this,
7315
7327
  C: (f, a) => f(...a)
7316
7328
  });
@@ -9165,4 +9177,4 @@ export {
9165
9177
  importProfileData,
9166
9178
  ClientServicesHost
9167
9179
  };
9168
- //# sourceMappingURL=chunk-XCOUT2K5.mjs.map
9180
+ //# sourceMappingURL=chunk-SQBUU2A7.mjs.map