@dxos/client-services 0.3.5-main.cc26d3f → 0.3.5-main.d14658e

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.
@@ -185,7 +185,7 @@ var getPlatform = () => {
185
185
  };
186
186
 
187
187
  // packages/sdk/client-services/src/version.ts
188
- var DXOS_VERSION = "0.3.5-main.cc26d3f";
188
+ var DXOS_VERSION = "0.3.5-main.d14658e";
189
189
 
190
190
  // packages/sdk/client-services/src/packlets/services/diagnostics.ts
191
191
  var __dxlog_file = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/services/diagnostics.ts";
@@ -1274,7 +1274,6 @@ var InvitationHostExtension = class extends import_teleport.RpcExtension {
1274
1274
  C: (f, a) => f(...a)
1275
1275
  });
1276
1276
  return {
1277
- spaceKey: this.invitation.authMethod === import_services3.Invitation.AuthMethod.NONE ? this.invitation.spaceKey : void 0,
1278
1277
  authMethod: this.invitation.authMethod
1279
1278
  };
1280
1279
  },
@@ -1284,7 +1283,7 @@ var InvitationHostExtension = class extends import_teleport.RpcExtension {
1284
1283
  id: traceId
1285
1284
  }), {
1286
1285
  F: __dxlog_file7,
1287
- L: 125,
1286
+ L: 124,
1288
1287
  S: this,
1289
1288
  C: (f, a) => f(...a)
1290
1289
  });
@@ -1292,14 +1291,14 @@ var InvitationHostExtension = class extends import_teleport.RpcExtension {
1292
1291
  authCode: code
1293
1292
  }, {
1294
1293
  F: __dxlog_file7,
1295
- L: 126,
1294
+ L: 125,
1296
1295
  S: this,
1297
1296
  C: (f, a) => f(...a)
1298
1297
  });
1299
1298
  let status = import_invitations.AuthenticationResponse.Status.OK;
1300
1299
  (0, import_invariant6.invariant)(this.invitation, "Invitation is not set.", {
1301
1300
  F: __dxlog_file7,
1302
- L: 129,
1301
+ L: 128,
1303
1302
  S: this,
1304
1303
  A: [
1305
1304
  "this.invitation",
@@ -1310,7 +1309,7 @@ var InvitationHostExtension = class extends import_teleport.RpcExtension {
1310
1309
  case import_services3.Invitation.AuthMethod.NONE: {
1311
1310
  (0, import_log5.log)("authentication not required", void 0, {
1312
1311
  F: __dxlog_file7,
1313
- L: 132,
1312
+ L: 131,
1314
1313
  S: this,
1315
1314
  C: (f, a) => f(...a)
1316
1315
  });
@@ -1335,7 +1334,7 @@ var InvitationHostExtension = class extends import_teleport.RpcExtension {
1335
1334
  authMethod: this.invitation.authMethod
1336
1335
  }, {
1337
1336
  F: __dxlog_file7,
1338
- L: 150,
1337
+ L: 149,
1339
1338
  S: this,
1340
1339
  C: (f, a) => f(...a)
1341
1340
  });
@@ -1350,7 +1349,7 @@ var InvitationHostExtension = class extends import_teleport.RpcExtension {
1350
1349
  }
1351
1350
  }), {
1352
1351
  F: __dxlog_file7,
1353
- L: 156,
1352
+ L: 155,
1354
1353
  S: this,
1355
1354
  C: (f, a) => f(...a)
1356
1355
  });
@@ -1364,14 +1363,14 @@ var InvitationHostExtension = class extends import_teleport.RpcExtension {
1364
1363
  id: traceId
1365
1364
  }), {
1366
1365
  F: __dxlog_file7,
1367
- L: 162,
1366
+ L: 161,
1368
1367
  S: this,
1369
1368
  C: (f, a) => f(...a)
1370
1369
  });
1371
1370
  try {
1372
1371
  (0, import_invariant6.invariant)(this.invitation, "Invitation is not set.", {
1373
1372
  F: __dxlog_file7,
1374
- L: 165,
1373
+ L: 164,
1375
1374
  S: this,
1376
1375
  A: [
1377
1376
  "this.invitation",
@@ -1386,7 +1385,7 @@ var InvitationHostExtension = class extends import_teleport.RpcExtension {
1386
1385
  id: traceId
1387
1386
  }), {
1388
1387
  F: __dxlog_file7,
1389
- L: 173,
1388
+ L: 172,
1390
1389
  S: this,
1391
1390
  C: (f, a) => f(...a)
1392
1391
  });
@@ -1443,7 +1442,7 @@ var InvitationGuestExtension = class extends import_teleport.RpcExtension {
1443
1442
  options: async (options) => {
1444
1443
  (0, import_invariant6.invariant)(!this._remoteOptions, "Remote options already set.", {
1445
1444
  F: __dxlog_file7,
1446
- L: 240,
1445
+ L: 239,
1447
1446
  S: this,
1448
1447
  A: [
1449
1448
  "!this._remoteOptions",
@@ -1470,7 +1469,7 @@ var InvitationGuestExtension = class extends import_teleport.RpcExtension {
1470
1469
  try {
1471
1470
  (0, import_log5.log)("begin options", void 0, {
1472
1471
  F: __dxlog_file7,
1473
- L: 261,
1472
+ L: 260,
1474
1473
  S: this,
1475
1474
  C: (f, a) => f(...a)
1476
1475
  });
@@ -1482,7 +1481,7 @@ var InvitationGuestExtension = class extends import_teleport.RpcExtension {
1482
1481
  }));
1483
1482
  (0, import_log5.log)("end options", void 0, {
1484
1483
  F: __dxlog_file7,
1485
- L: 264,
1484
+ L: 263,
1486
1485
  S: this,
1487
1486
  C: (f, a) => f(...a)
1488
1487
  });
@@ -1496,7 +1495,7 @@ var InvitationGuestExtension = class extends import_teleport.RpcExtension {
1496
1495
  } catch (err) {
1497
1496
  (0, import_log5.log)("openError", err, {
1498
1497
  F: __dxlog_file7,
1499
- L: 274,
1498
+ L: 273,
1500
1499
  S: this,
1501
1500
  C: (f, a) => f(...a)
1502
1501
  });
@@ -1506,7 +1505,7 @@ var InvitationGuestExtension = class extends import_teleport.RpcExtension {
1506
1505
  async onClose() {
1507
1506
  (0, import_log5.log)("onClose", void 0, {
1508
1507
  F: __dxlog_file7,
1509
- L: 280,
1508
+ L: 279,
1510
1509
  S: this,
1511
1510
  C: (f, a) => f(...a)
1512
1511
  });
@@ -1877,14 +1876,11 @@ var InvitationsHandler = class {
1877
1876
  C: (f, a) => f(...a)
1878
1877
  });
1879
1878
  invitation.authMethod = introductionResponse.authMethod;
1880
- if (introductionResponse.spaceKey) {
1881
- invitation.spaceKey = introductionResponse.spaceKey;
1882
- }
1883
1879
  if (isAuthenticationRequired(invitation)) {
1884
1880
  for (let attempt = 1; attempt <= MAX_OTP_ATTEMPTS; attempt++) {
1885
1881
  (0, import_log6.log)("guest waiting for authentication code...", void 0, {
1886
1882
  F: __dxlog_file8,
1887
- L: 289,
1883
+ L: 286,
1888
1884
  S: this,
1889
1885
  C: (f, a) => f(...a)
1890
1886
  });
@@ -1896,7 +1892,7 @@ var InvitationsHandler = class {
1896
1892
  });
1897
1893
  (0, import_log6.log)("sending authentication request", void 0, {
1898
1894
  F: __dxlog_file8,
1899
- L: 293,
1895
+ L: 290,
1900
1896
  S: this,
1901
1897
  C: (f, a) => f(...a)
1902
1898
  });
@@ -1917,7 +1913,7 @@ var InvitationsHandler = class {
1917
1913
  attempt
1918
1914
  }, {
1919
1915
  F: __dxlog_file8,
1920
- L: 304,
1916
+ L: 301,
1921
1917
  S: this,
1922
1918
  C: (f, a) => f(...a)
1923
1919
  });
@@ -1934,7 +1930,7 @@ var InvitationsHandler = class {
1934
1930
  ...protocol.toJSON()
1935
1931
  }, {
1936
1932
  F: __dxlog_file8,
1937
- L: 315,
1933
+ L: 312,
1938
1934
  S: this,
1939
1935
  C: (f, a) => f(...a)
1940
1936
  });
@@ -1946,7 +1942,7 @@ var InvitationsHandler = class {
1946
1942
  ...protocol.toJSON()
1947
1943
  }, {
1948
1944
  F: __dxlog_file8,
1949
- L: 326,
1945
+ L: 323,
1950
1946
  S: this,
1951
1947
  C: (f, a) => f(...a)
1952
1948
  });
@@ -1958,7 +1954,7 @@ var InvitationsHandler = class {
1958
1954
  id: traceId
1959
1955
  }), {
1960
1956
  F: __dxlog_file8,
1961
- L: 328,
1957
+ L: 325,
1962
1958
  S: this,
1963
1959
  C: (f, a) => f(...a)
1964
1960
  });
@@ -1968,7 +1964,7 @@ var InvitationsHandler = class {
1968
1964
  ...protocol.toJSON()
1969
1965
  }, {
1970
1966
  F: __dxlog_file8,
1971
- L: 331,
1967
+ L: 328,
1972
1968
  S: this,
1973
1969
  C: (f, a) => f(...a)
1974
1970
  });
@@ -1978,7 +1974,7 @@ var InvitationsHandler = class {
1978
1974
  } else {
1979
1975
  (0, import_log6.log)("auth failed", err, {
1980
1976
  F: __dxlog_file8,
1981
- L: 334,
1977
+ L: 331,
1982
1978
  S: this,
1983
1979
  C: (f, a) => f(...a)
1984
1980
  });
@@ -1989,7 +1985,7 @@ var InvitationsHandler = class {
1989
1985
  error: err
1990
1986
  }), {
1991
1987
  F: __dxlog_file8,
1992
- L: 337,
1988
+ L: 334,
1993
1989
  S: this,
1994
1990
  C: (f, a) => f(...a)
1995
1991
  });
@@ -2007,7 +2003,7 @@ var InvitationsHandler = class {
2007
2003
  ...protocol.toJSON()
2008
2004
  }, {
2009
2005
  F: __dxlog_file8,
2010
- L: 348,
2006
+ L: 345,
2011
2007
  S: this,
2012
2008
  C: (f, a) => f(...a)
2013
2009
  });
@@ -2017,7 +2013,7 @@ var InvitationsHandler = class {
2017
2013
  } else {
2018
2014
  (0, import_log6.log)("auth failed", err, {
2019
2015
  F: __dxlog_file8,
2020
- L: 351,
2016
+ L: 348,
2021
2017
  S: this,
2022
2018
  C: (f, a) => f(...a)
2023
2019
  });
@@ -2030,7 +2026,7 @@ var InvitationsHandler = class {
2030
2026
  (0, import_async5.scheduleTask)(ctx, async () => {
2031
2027
  (0, import_invariant7.invariant)(invitation.swarmKey, void 0, {
2032
2028
  F: __dxlog_file8,
2033
- L: 361,
2029
+ L: 358,
2034
2030
  S: this,
2035
2031
  A: [
2036
2032
  "invitation.swarmKey",
@@ -3143,6 +3139,8 @@ function _ts_decorate5(decorators, target, key, desc) {
3143
3139
  return c > 3 && r && Object.defineProperty(target, key, r), r;
3144
3140
  }
3145
3141
  var __dxlog_file13 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/spaces/data-space-manager.ts";
3142
+ var PRESENCE_ANNOUNCE_INTERVAL = 1e4;
3143
+ var PRESENCE_OFFLINE_TIMEOUT = 2e4;
3146
3144
  var DataSpaceManager = class DataSpaceManager2 {
3147
3145
  constructor(_spaceManager, _metadataStore, _dataServiceSubscriptions, _keyring, _signingContext, _feedStore) {
3148
3146
  this._spaceManager = _spaceManager;
@@ -3164,7 +3162,7 @@ var DataSpaceManager = class DataSpaceManager2 {
3164
3162
  async open() {
3165
3163
  (0, import_log11.log)("open", void 0, {
3166
3164
  F: __dxlog_file13,
3167
- L: 79,
3165
+ L: 82,
3168
3166
  S: this,
3169
3167
  C: (f, a) => f(...a)
3170
3168
  });
@@ -3172,7 +3170,7 @@ var DataSpaceManager = class DataSpaceManager2 {
3172
3170
  id: this._instanceId
3173
3171
  }), {
3174
3172
  F: __dxlog_file13,
3175
- L: 80,
3173
+ L: 83,
3176
3174
  S: this,
3177
3175
  C: (f, a) => f(...a)
3178
3176
  });
@@ -3180,7 +3178,7 @@ var DataSpaceManager = class DataSpaceManager2 {
3180
3178
  spaces: this._metadataStore.spaces.length
3181
3179
  }, {
3182
3180
  F: __dxlog_file13,
3183
- L: 81,
3181
+ L: 84,
3184
3182
  S: this,
3185
3183
  C: (f, a) => f(...a)
3186
3184
  });
@@ -3190,7 +3188,7 @@ var DataSpaceManager = class DataSpaceManager2 {
3190
3188
  spaceMetadata
3191
3189
  }, {
3192
3190
  F: __dxlog_file13,
3193
- L: 85,
3191
+ L: 88,
3194
3192
  S: this,
3195
3193
  C: (f, a) => f(...a)
3196
3194
  });
@@ -3201,7 +3199,7 @@ var DataSpaceManager = class DataSpaceManager2 {
3201
3199
  err
3202
3200
  }, {
3203
3201
  F: __dxlog_file13,
3204
- L: 88,
3202
+ L: 91,
3205
3203
  S: this,
3206
3204
  C: (f, a) => f(...a)
3207
3205
  });
@@ -3218,7 +3216,7 @@ var DataSpaceManager = class DataSpaceManager2 {
3218
3216
  id: this._instanceId
3219
3217
  }), {
3220
3218
  F: __dxlog_file13,
3221
- L: 101,
3219
+ L: 104,
3222
3220
  S: this,
3223
3221
  C: (f, a) => f(...a)
3224
3222
  });
@@ -3226,7 +3224,7 @@ var DataSpaceManager = class DataSpaceManager2 {
3226
3224
  async close() {
3227
3225
  (0, import_log11.log)("close", void 0, {
3228
3226
  F: __dxlog_file13,
3229
- L: 106,
3227
+ L: 109,
3230
3228
  S: this,
3231
3229
  C: (f, a) => f(...a)
3232
3230
  });
@@ -3242,7 +3240,7 @@ var DataSpaceManager = class DataSpaceManager2 {
3242
3240
  async createSpace() {
3243
3241
  (0, import_invariant11.invariant)(this._isOpen, "Not open.", {
3244
3242
  F: __dxlog_file13,
3245
- L: 119,
3243
+ L: 122,
3246
3244
  S: this,
3247
3245
  A: [
3248
3246
  "this._isOpen",
@@ -3263,7 +3261,7 @@ var DataSpaceManager = class DataSpaceManager2 {
3263
3261
  spaceKey
3264
3262
  }, {
3265
3263
  F: __dxlog_file13,
3266
- L: 131,
3264
+ L: 134,
3267
3265
  S: this,
3268
3266
  C: (f, a) => f(...a)
3269
3267
  });
@@ -3273,7 +3271,7 @@ var DataSpaceManager = class DataSpaceManager2 {
3273
3271
  const memberCredential = credentials[1];
3274
3272
  (0, import_invariant11.invariant)((0, import_credentials14.getCredentialAssertion)(memberCredential)["@type"] === "dxos.halo.credentials.SpaceMember", void 0, {
3275
3273
  F: __dxlog_file13,
3276
- L: 138,
3274
+ L: 141,
3277
3275
  S: this,
3278
3276
  A: [
3279
3277
  "getCredentialAssertion(memberCredential)['@type'] === 'dxos.halo.credentials.SpaceMember'",
@@ -3291,13 +3289,13 @@ var DataSpaceManager = class DataSpaceManager2 {
3291
3289
  opts
3292
3290
  }, {
3293
3291
  F: __dxlog_file13,
3294
- L: 150,
3292
+ L: 153,
3295
3293
  S: this,
3296
3294
  C: (f, a) => f(...a)
3297
3295
  });
3298
3296
  (0, import_invariant11.invariant)(this._isOpen, "Not open.", {
3299
3297
  F: __dxlog_file13,
3300
- L: 151,
3298
+ L: 154,
3301
3299
  S: this,
3302
3300
  A: [
3303
3301
  "this._isOpen",
@@ -3306,7 +3304,7 @@ var DataSpaceManager = class DataSpaceManager2 {
3306
3304
  });
3307
3305
  (0, import_invariant11.invariant)(!this._spaces.has(opts.spaceKey), "Space already exists.", {
3308
3306
  F: __dxlog_file13,
3309
- L: 152,
3307
+ L: 155,
3310
3308
  S: this,
3311
3309
  A: [
3312
3310
  "!this._spaces.has(opts.spaceKey)",
@@ -3341,7 +3339,7 @@ var DataSpaceManager = class DataSpaceManager2 {
3341
3339
  metadata
3342
3340
  }, {
3343
3341
  F: __dxlog_file13,
3344
- L: 185,
3342
+ L: 188,
3345
3343
  S: this,
3346
3344
  C: (f, a) => f(...a)
3347
3345
  });
@@ -3349,8 +3347,8 @@ var DataSpaceManager = class DataSpaceManager2 {
3349
3347
  localPeerId: this._signingContext.deviceKey
3350
3348
  });
3351
3349
  const presence = new import_teleport_extension_gossip.Presence({
3352
- announceInterval: 1e3,
3353
- offlineTimeout: 5e3,
3350
+ announceInterval: PRESENCE_ANNOUNCE_INTERVAL,
3351
+ offlineTimeout: PRESENCE_OFFLINE_TIMEOUT,
3354
3352
  identityKey: this._signingContext.identityKey,
3355
3353
  gossip
3356
3354
  });
@@ -3377,7 +3375,7 @@ var DataSpaceManager = class DataSpaceManager2 {
3377
3375
  onAuthFailure: () => {
3378
3376
  import_log11.log.warn("auth failure", void 0, {
3379
3377
  F: __dxlog_file13,
3380
- L: 220,
3378
+ L: 223,
3381
3379
  S: this,
3382
3380
  C: (f, a) => f(...a)
3383
3381
  });
@@ -3401,7 +3399,7 @@ var DataSpaceManager = class DataSpaceManager2 {
3401
3399
  space: space.key
3402
3400
  }, {
3403
3401
  F: __dxlog_file13,
3404
- L: 238,
3402
+ L: 241,
3405
3403
  S: this,
3406
3404
  C: (f, a) => f(...a)
3407
3405
  });
@@ -3413,7 +3411,7 @@ var DataSpaceManager = class DataSpaceManager2 {
3413
3411
  open: this._isOpen
3414
3412
  }, {
3415
3413
  F: __dxlog_file13,
3416
- L: 245,
3414
+ L: 248,
3417
3415
  S: this,
3418
3416
  C: (f, a) => f(...a)
3419
3417
  });
@@ -3426,7 +3424,7 @@ var DataSpaceManager = class DataSpaceManager2 {
3426
3424
  space: space.key
3427
3425
  }, {
3428
3426
  F: __dxlog_file13,
3429
- L: 251,
3427
+ L: 254,
3430
3428
  S: this,
3431
3429
  C: (f, a) => f(...a)
3432
3430
  });