@dxos/client-services 0.1.36 → 0.1.37-next.41339e7

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.
@@ -936,7 +936,7 @@ import { generatePasscode } from "@dxos/credentials";
936
936
  import { PublicKey as PublicKey4 } from "@dxos/keys";
937
937
  import { log as log4 } from "@dxos/log";
938
938
  import { createTeleportProtocolFactory, StarTopology } from "@dxos/network-manager";
939
- import { schema as schema2 } from "@dxos/protocols";
939
+ import { schema as schema2, trace as trace2 } from "@dxos/protocols";
940
940
  import { Invitation as Invitation2 } from "@dxos/protocols/proto/dxos/client/services";
941
941
  import { AuthenticationResponse } from "@dxos/protocols/proto/dxos/halo/invitations";
942
942
  import { RpcExtension } from "@dxos/teleport";
@@ -972,7 +972,7 @@ var InvitationsHandler = class {
972
972
  ...protocol.toJSON()
973
973
  }, {
974
974
  file: "invitations-handler.ts",
975
- line: 102,
975
+ line: 106,
976
976
  scope: this,
977
977
  callSite: (f, a) => f(...a)
978
978
  });
@@ -990,7 +990,7 @@ var InvitationsHandler = class {
990
990
  ...protocol.toJSON()
991
991
  }, {
992
992
  file: "invitations-handler.ts",
993
- line: 115,
993
+ line: 119,
994
994
  scope: this,
995
995
  callSite: (f, a) => f(...a)
996
996
  });
@@ -1009,7 +1009,7 @@ var InvitationsHandler = class {
1009
1009
  authCode: code
1010
1010
  }, {
1011
1011
  file: "invitations-handler.ts",
1012
- line: 134,
1012
+ line: 138,
1013
1013
  scope: this,
1014
1014
  callSite: (f, a) => f(...a)
1015
1015
  });
@@ -1018,7 +1018,7 @@ var InvitationsHandler = class {
1018
1018
  case Invitation2.AuthMethod.NONE: {
1019
1019
  log4("authentication not required", {}, {
1020
1020
  file: "invitations-handler.ts",
1021
- line: 139,
1021
+ line: 143,
1022
1022
  scope: this,
1023
1023
  callSite: (f, a) => f(...a)
1024
1024
  });
@@ -1043,7 +1043,7 @@ var InvitationsHandler = class {
1043
1043
  authMethod: invitation.authMethod
1044
1044
  }, {
1045
1045
  file: "invitations-handler.ts",
1046
- line: 157,
1046
+ line: 161,
1047
1047
  scope: this,
1048
1048
  callSite: (f, a) => f(...a)
1049
1049
  });
@@ -1073,12 +1073,22 @@ var InvitationsHandler = class {
1073
1073
  },
1074
1074
  onOpen: () => {
1075
1075
  scheduleTask(ctx, async () => {
1076
+ const traceId = PublicKey4.random().toHex();
1076
1077
  try {
1078
+ log4.trace("dxos.sdk.invitations-handler.host.onOpen", trace2.begin({
1079
+ id: traceId,
1080
+ parentId: this._traceParent
1081
+ }), {
1082
+ file: "invitations-handler.ts",
1083
+ line: 196,
1084
+ scope: this,
1085
+ callSite: (f, a) => f(...a)
1086
+ });
1077
1087
  log4("connected", {
1078
1088
  ...protocol.toJSON()
1079
1089
  }, {
1080
1090
  file: "invitations-handler.ts",
1081
- line: 191,
1091
+ line: 200,
1082
1092
  scope: this,
1083
1093
  callSite: (f, a) => f(...a)
1084
1094
  });
@@ -1094,7 +1104,7 @@ var InvitationsHandler = class {
1094
1104
  ...protocol.toJSON()
1095
1105
  }, {
1096
1106
  file: "invitations-handler.ts",
1097
- line: 194,
1107
+ line: 203,
1098
1108
  scope: this,
1099
1109
  callSite: (f, a) => f(...a)
1100
1110
  });
@@ -1102,13 +1112,21 @@ var InvitationsHandler = class {
1102
1112
  ...invitation,
1103
1113
  state: Invitation2.State.SUCCESS
1104
1114
  });
1115
+ log4.trace("dxos.sdk.invitations-handler.host.onOpen", trace2.end({
1116
+ id: traceId
1117
+ }), {
1118
+ file: "invitations-handler.ts",
1119
+ line: 205,
1120
+ scope: this,
1121
+ callSite: (f, a) => f(...a)
1122
+ });
1105
1123
  } catch (err) {
1106
1124
  if (err instanceof TimeoutError) {
1107
1125
  log4("timeout", {
1108
1126
  ...protocol.toJSON()
1109
1127
  }, {
1110
1128
  file: "invitations-handler.ts",
1111
- line: 198,
1129
+ line: 208,
1112
1130
  scope: this,
1113
1131
  callSite: (f, a) => f(...a)
1114
1132
  });
@@ -1119,12 +1137,21 @@ var InvitationsHandler = class {
1119
1137
  } else {
1120
1138
  log4.error("failed", err, {
1121
1139
  file: "invitations-handler.ts",
1122
- line: 201,
1140
+ line: 211,
1123
1141
  scope: this,
1124
1142
  callSite: (f, a) => f(...a)
1125
1143
  });
1126
1144
  stream.error(err);
1127
1145
  }
1146
+ log4.trace("dxos.sdk.invitations-handler.host.onOpen", trace2.error({
1147
+ id: traceId,
1148
+ error: err
1149
+ }), {
1150
+ file: "invitations-handler.ts",
1151
+ line: 214,
1152
+ scope: this,
1153
+ callSite: (f, a) => f(...a)
1154
+ });
1128
1155
  } finally {
1129
1156
  if (type !== Invitation2.Type.MULTIUSE) {
1130
1157
  await sleep(ON_CLOSE_DELAY);
@@ -1134,6 +1161,7 @@ var InvitationsHandler = class {
1134
1161
  });
1135
1162
  }
1136
1163
  });
1164
+ extension._traceParent = this._traceParent;
1137
1165
  return extension;
1138
1166
  };
1139
1167
  scheduleTask(ctx, async () => {
@@ -1177,7 +1205,7 @@ var InvitationsHandler = class {
1177
1205
  ...protocol.toJSON()
1178
1206
  }, {
1179
1207
  file: "invitations-handler.ts",
1180
- line: 255,
1208
+ line: 267,
1181
1209
  scope: this,
1182
1210
  callSite: (f, a) => f(...a)
1183
1211
  });
@@ -1188,7 +1216,7 @@ var InvitationsHandler = class {
1188
1216
  } else {
1189
1217
  log4.warn("auth failed", err, {
1190
1218
  file: "invitations-handler.ts",
1191
- line: 258,
1219
+ line: 270,
1192
1220
  scope: this,
1193
1221
  callSite: (f, a) => f(...a)
1194
1222
  });
@@ -1202,7 +1230,7 @@ var InvitationsHandler = class {
1202
1230
  ...protocol.toJSON()
1203
1231
  }, {
1204
1232
  file: "invitations-handler.ts",
1205
- line: 266,
1233
+ line: 278,
1206
1234
  scope: this,
1207
1235
  callSite: (f, a) => f(...a)
1208
1236
  });
@@ -1213,7 +1241,17 @@ var InvitationsHandler = class {
1213
1241
  const extension = new InvitationGuestExtension({
1214
1242
  onOpen: () => {
1215
1243
  scheduleTask(ctx, async () => {
1244
+ const traceId = PublicKey4.random().toHex();
1216
1245
  try {
1246
+ log4.trace("dxos.sdk.invitations-handler.guest.onOpen", trace2.begin({
1247
+ id: traceId,
1248
+ parentId: this._traceParent
1249
+ }), {
1250
+ file: "invitations-handler.ts",
1251
+ line: 290,
1252
+ scope: this,
1253
+ callSite: (f, a) => f(...a)
1254
+ });
1217
1255
  if (++connectionCount > 1) {
1218
1256
  throw new Error(`multiple connections detected: ${connectionCount}`);
1219
1257
  }
@@ -1222,7 +1260,7 @@ var InvitationsHandler = class {
1222
1260
  ...protocol.toJSON()
1223
1261
  }, {
1224
1262
  file: "invitations-handler.ts",
1225
- line: 284,
1263
+ line: 301,
1226
1264
  scope: this,
1227
1265
  callSite: (f, a) => f(...a)
1228
1266
  });
@@ -1234,7 +1272,7 @@ var InvitationsHandler = class {
1234
1272
  ...protocol.toJSON()
1235
1273
  }, {
1236
1274
  file: "invitations-handler.ts",
1237
- line: 288,
1275
+ line: 305,
1238
1276
  scope: this,
1239
1277
  callSite: (f, a) => f(...a)
1240
1278
  });
@@ -1244,7 +1282,7 @@ var InvitationsHandler = class {
1244
1282
  response: introductionResponse
1245
1283
  }, {
1246
1284
  file: "invitations-handler.ts",
1247
- line: 292,
1285
+ line: 309,
1248
1286
  scope: this,
1249
1287
  callSite: (f, a) => f(...a)
1250
1288
  });
@@ -1256,7 +1294,7 @@ var InvitationsHandler = class {
1256
1294
  for (let attempt = 1; attempt <= MAX_OTP_ATTEMPTS; attempt++) {
1257
1295
  log4("guest waiting for authentication code...", {}, {
1258
1296
  file: "invitations-handler.ts",
1259
- line: 301,
1297
+ line: 318,
1260
1298
  scope: this,
1261
1299
  callSite: (f, a) => f(...a)
1262
1300
  });
@@ -1269,7 +1307,7 @@ var InvitationsHandler = class {
1269
1307
  });
1270
1308
  log4("sending authentication request", {}, {
1271
1309
  file: "invitations-handler.ts",
1272
- line: 305,
1310
+ line: 322,
1273
1311
  scope: this,
1274
1312
  callSite: (f, a) => f(...a)
1275
1313
  });
@@ -1291,7 +1329,7 @@ var InvitationsHandler = class {
1291
1329
  attempt
1292
1330
  }, {
1293
1331
  file: "invitations-handler.ts",
1294
- line: 316,
1332
+ line: 333,
1295
1333
  scope: this,
1296
1334
  callSite: (f, a) => f(...a)
1297
1335
  });
@@ -1309,7 +1347,7 @@ var InvitationsHandler = class {
1309
1347
  ...protocol.toJSON()
1310
1348
  }, {
1311
1349
  file: "invitations-handler.ts",
1312
- line: 327,
1350
+ line: 344,
1313
1351
  scope: this,
1314
1352
  callSite: (f, a) => f(...a)
1315
1353
  });
@@ -1320,7 +1358,7 @@ var InvitationsHandler = class {
1320
1358
  ...protocol.toJSON()
1321
1359
  }, {
1322
1360
  file: "invitations-handler.ts",
1323
- line: 335,
1361
+ line: 352,
1324
1362
  scope: this,
1325
1363
  callSite: (f, a) => f(...a)
1326
1364
  });
@@ -1329,13 +1367,21 @@ var InvitationsHandler = class {
1329
1367
  ...result,
1330
1368
  state: Invitation2.State.SUCCESS
1331
1369
  });
1370
+ log4.trace("dxos.sdk.invitations-handler.guest.onOpen", trace2.end({
1371
+ id: traceId
1372
+ }), {
1373
+ file: "invitations-handler.ts",
1374
+ line: 354,
1375
+ scope: this,
1376
+ callSite: (f, a) => f(...a)
1377
+ });
1332
1378
  } catch (err) {
1333
1379
  if (err instanceof TimeoutError) {
1334
1380
  log4("timeout", {
1335
1381
  ...protocol.toJSON()
1336
1382
  }, {
1337
1383
  file: "invitations-handler.ts",
1338
- line: 339,
1384
+ line: 357,
1339
1385
  scope: this,
1340
1386
  callSite: (f, a) => f(...a)
1341
1387
  });
@@ -1344,14 +1390,23 @@ var InvitationsHandler = class {
1344
1390
  state: Invitation2.State.TIMEOUT
1345
1391
  });
1346
1392
  } else {
1347
- log4.warn("auth failed", err, {
1393
+ log4("auth failed", err, {
1348
1394
  file: "invitations-handler.ts",
1349
- line: 342,
1395
+ line: 360,
1350
1396
  scope: this,
1351
1397
  callSite: (f, a) => f(...a)
1352
1398
  });
1353
1399
  stream.error(err);
1354
1400
  }
1401
+ log4.trace("dxos.sdk.invitations-handler.guest.onOpen", trace2.error({
1402
+ id: traceId,
1403
+ error: err
1404
+ }), {
1405
+ file: "invitations-handler.ts",
1406
+ line: 363,
1407
+ scope: this,
1408
+ callSite: (f, a) => f(...a)
1409
+ });
1355
1410
  } finally {
1356
1411
  await ctx.dispose();
1357
1412
  }
@@ -1410,13 +1465,73 @@ var InvitationHostExtension = class extends RpcExtension {
1410
1465
  // Perhaps in the future we will have more complex logic here.
1411
1466
  InvitationHostService: {
1412
1467
  introduce: async (request) => {
1413
- return this._callbacks.introduce(request);
1468
+ const traceId = PublicKey4.random().toHex();
1469
+ log4.trace("dxos.sdk.invitation-handler.host.introduce", trace2.begin({
1470
+ id: traceId,
1471
+ parentId: this._traceParent
1472
+ }), {
1473
+ file: "invitations-handler.ts",
1474
+ line: 442,
1475
+ scope: this,
1476
+ callSite: (f, a) => f(...a)
1477
+ });
1478
+ const response = await this._callbacks.introduce(request);
1479
+ log4.trace("dxos.sdk.invitation-handler.host.introduce", trace2.end({
1480
+ id: traceId
1481
+ }), {
1482
+ file: "invitations-handler.ts",
1483
+ line: 447,
1484
+ scope: this,
1485
+ callSite: (f, a) => f(...a)
1486
+ });
1487
+ return response;
1414
1488
  },
1415
1489
  authenticate: async (request) => {
1416
- return this._callbacks.authenticate(request);
1490
+ const traceId = PublicKey4.random().toHex();
1491
+ log4.trace("dxos.sdk.invitation-handler.host.authenticate", trace2.begin({
1492
+ id: traceId,
1493
+ parentId: this._traceParent
1494
+ }), {
1495
+ file: "invitations-handler.ts",
1496
+ line: 453,
1497
+ scope: this,
1498
+ callSite: (f, a) => f(...a)
1499
+ });
1500
+ const response = await this._callbacks.authenticate(request);
1501
+ log4.trace("dxos.sdk.invitation-handler.host.authenticate", trace2.end({
1502
+ id: traceId,
1503
+ data: {
1504
+ ...response
1505
+ }
1506
+ }), {
1507
+ file: "invitations-handler.ts",
1508
+ line: 458,
1509
+ scope: this,
1510
+ callSite: (f, a) => f(...a)
1511
+ });
1512
+ return response;
1417
1513
  },
1418
1514
  admit: async (request) => {
1419
- return this._callbacks.admit(request);
1515
+ const traceId = PublicKey4.random().toHex();
1516
+ log4.trace("dxos.sdk.invitation-handler.host.admit", trace2.begin({
1517
+ id: traceId,
1518
+ parentId: this._traceParent
1519
+ }), {
1520
+ file: "invitations-handler.ts",
1521
+ line: 464,
1522
+ scope: this,
1523
+ callSite: (f, a) => f(...a)
1524
+ });
1525
+ const response = await this._callbacks.admit(request);
1526
+ log4.trace("dxos.sdk.invitation-handler.host.admit", trace2.end({
1527
+ id: traceId
1528
+ }), {
1529
+ file: "invitations-handler.ts",
1530
+ line: 469,
1531
+ scope: this,
1532
+ callSite: (f, a) => f(...a)
1533
+ });
1534
+ return response;
1420
1535
  }
1421
1536
  }
1422
1537
  };
@@ -1923,7 +2038,7 @@ import { Event as Event7 } from "@dxos/async";
1923
2038
  import { clientServiceBundle, createDefaultModelFactory, PublicKey as PublicKey9 } from "@dxos/client";
1924
2039
  import { DataServiceImpl } from "@dxos/echo-pipeline";
1925
2040
  import { log as log15 } from "@dxos/log";
1926
- import { trace as trace4 } from "@dxos/protocols";
2041
+ import { trace as trace5 } from "@dxos/protocols";
1927
2042
  import { SystemStatus } from "@dxos/protocols/proto/dxos/client/services";
1928
2043
 
1929
2044
  // packages/sdk/client-services/src/packlets/deprecated/tracing.ts
@@ -2017,7 +2132,7 @@ import { getCredentialAssertion as getCredentialAssertion2 } from "@dxos/credent
2017
2132
  import { SnapshotManager, spaceGenesis } from "@dxos/echo-pipeline";
2018
2133
  import { PublicKey as PublicKey7 } from "@dxos/keys";
2019
2134
  import { log as log9 } from "@dxos/log";
2020
- import { trace as trace2 } from "@dxos/protocols";
2135
+ import { trace as trace3 } from "@dxos/protocols";
2021
2136
  import { Gossip, Presence } from "@dxos/teleport-extension-gossip";
2022
2137
  import { ComplexMap as ComplexMap3, deferFunction as deferFunction2 } from "@dxos/util";
2023
2138
 
@@ -2527,7 +2642,7 @@ var DataSpaceManager = class DataSpaceManager2 {
2527
2642
  scope: this,
2528
2643
  callSite: (f, a) => f(...a)
2529
2644
  });
2530
- log9.trace("dxos.echo.data-space-manager", trace2.begin({
2645
+ log9.trace("dxos.echo.data-space-manager", trace3.begin({
2531
2646
  id: this._instanceId,
2532
2647
  parentId: this._traceParent
2533
2648
  }), {
@@ -2572,7 +2687,7 @@ var DataSpaceManager = class DataSpaceManager2 {
2572
2687
  for (const space of this._spaces.values()) {
2573
2688
  await space.close();
2574
2689
  }
2575
- log9.trace("dxos.echo.data-space-manager", trace2.end({
2690
+ log9.trace("dxos.echo.data-space-manager", trace3.end({
2576
2691
  id: this._instanceId
2577
2692
  }), {
2578
2693
  file: "data-space-manager.ts",
@@ -3449,7 +3564,7 @@ import { FeedFactory, FeedStore } from "@dxos/feed-store";
3449
3564
  import { Keyring } from "@dxos/keyring";
3450
3565
  import { PublicKey as PublicKey8 } from "@dxos/keys";
3451
3566
  import { log as log14 } from "@dxos/log";
3452
- import { trace as trace3 } from "@dxos/protocols";
3567
+ import { trace as trace4 } from "@dxos/protocols";
3453
3568
  var ServiceContext = class {
3454
3569
  // prettier-ignore
3455
3570
  constructor(storage, networkManager, modelFactory) {
@@ -3481,23 +3596,24 @@ var ServiceContext = class {
3481
3596
  this.identityManager = new IdentityManager(this.metadataStore, this.keyring, this.feedStore, this.spaceManager);
3482
3597
  this.identityManager._traceParent = this._instanceId;
3483
3598
  this.invitations = new InvitationsHandler(this.networkManager);
3599
+ this.invitations._traceParent = this._instanceId;
3484
3600
  this._handlerFactories.set(Invitation5.Kind.DEVICE, () => new DeviceInvitationProtocol(this.keyring, () => {
3485
3601
  var _a;
3486
3602
  return (_a = this.identityManager.identity) != null ? _a : failUndefined2();
3487
3603
  }, this._acceptIdentity.bind(this)));
3488
3604
  }
3489
3605
  async open() {
3490
- log14.trace("dxos.sdk.service-context", trace3.begin({
3606
+ log14.trace("dxos.sdk.service-context", trace4.begin({
3491
3607
  id: this._instanceId
3492
3608
  }), {
3493
3609
  file: "service-context.ts",
3494
- line: 114,
3610
+ line: 115,
3495
3611
  scope: this,
3496
3612
  callSite: (f, a) => f(...a)
3497
3613
  });
3498
3614
  log14("opening...", {}, {
3499
3615
  file: "service-context.ts",
3500
- line: 116,
3616
+ line: 117,
3501
3617
  scope: this,
3502
3618
  callSite: (f, a) => f(...a)
3503
3619
  });
@@ -3509,7 +3625,7 @@ var ServiceContext = class {
3509
3625
  }
3510
3626
  log14("opened", {}, {
3511
3627
  file: "service-context.ts",
3512
- line: 123,
3628
+ line: 124,
3513
3629
  scope: this,
3514
3630
  callSite: (f, a) => f(...a)
3515
3631
  });
@@ -3518,7 +3634,7 @@ var ServiceContext = class {
3518
3634
  var _a, _b;
3519
3635
  log14("closing...", {}, {
3520
3636
  file: "service-context.ts",
3521
- line: 127,
3637
+ line: 128,
3522
3638
  scope: this,
3523
3639
  callSite: (f, a) => f(...a)
3524
3640
  });
@@ -3531,31 +3647,15 @@ var ServiceContext = class {
3531
3647
  this.dataServiceSubscriptions.clear();
3532
3648
  log14("closed", {}, {
3533
3649
  file: "service-context.ts",
3534
- line: 135,
3650
+ line: 136,
3535
3651
  scope: this,
3536
3652
  callSite: (f, a) => f(...a)
3537
3653
  });
3538
- log14.trace("dxos.sdk.service-context", trace3.end({
3654
+ log14.trace("dxos.sdk.service-context", trace4.end({
3539
3655
  id: this._instanceId
3540
3656
  }), {
3541
3657
  file: "service-context.ts",
3542
- line: 137,
3543
- scope: this,
3544
- callSite: (f, a) => f(...a)
3545
- });
3546
- }
3547
- async reset() {
3548
- log14("resetting...", {}, {
3549
- file: "service-context.ts",
3550
- line: 141,
3551
- scope: this,
3552
- callSite: (f, a) => f(...a)
3553
- });
3554
- await this.close();
3555
- await this.storage.reset();
3556
- log14("reset", {}, {
3557
- file: "service-context.ts",
3558
- line: 144,
3658
+ line: 138,
3559
3659
  scope: this,
3560
3660
  callSite: (f, a) => f(...a)
3561
3661
  });
@@ -3580,7 +3680,7 @@ var ServiceContext = class {
3580
3680
  var _a;
3581
3681
  log14("initializing spaces...", {}, {
3582
3682
  file: "service-context.ts",
3583
- line: 169,
3683
+ line: 163,
3584
3684
  scope: this,
3585
3685
  callSite: (f, a) => f(...a)
3586
3686
  });
@@ -3620,7 +3720,7 @@ var ServiceContext = class {
3620
3720
  details: assertion
3621
3721
  }, {
3622
3722
  file: "service-context.ts",
3623
- line: 211,
3723
+ line: 205,
3624
3724
  scope: this,
3625
3725
  callSite: (f, a) => f(...a)
3626
3726
  });
@@ -3631,7 +3731,7 @@ var ServiceContext = class {
3631
3731
  details: assertion
3632
3732
  }, {
3633
3733
  file: "service-context.ts",
3634
- line: 215,
3734
+ line: 209,
3635
3735
  scope: this,
3636
3736
  callSite: (f, a) => f(...a)
3637
3737
  });
@@ -3642,7 +3742,7 @@ var ServiceContext = class {
3642
3742
  details: assertion
3643
3743
  }, {
3644
3744
  file: "service-context.ts",
3645
- line: 220,
3745
+ line: 214,
3646
3746
  scope: this,
3647
3747
  callSite: (f, a) => f(...a)
3648
3748
  });
@@ -3653,7 +3753,7 @@ var ServiceContext = class {
3653
3753
  } catch (err) {
3654
3754
  log14.catch(err, {}, {
3655
3755
  file: "service-context.ts",
3656
- line: 226,
3756
+ line: 220,
3657
3757
  scope: this,
3658
3758
  callSite: (f, a) => f(...a)
3659
3759
  });
@@ -3731,8 +3831,7 @@ var ClientServicesHost = class {
3731
3831
  }
3732
3832
  },
3733
3833
  onReset: async () => {
3734
- assert13(this._serviceContext, "service host is closed");
3735
- await this._serviceContext.reset();
3834
+ await this.reset();
3736
3835
  }
3737
3836
  });
3738
3837
  this._serviceRegistry = new ServiceRegistry(clientServiceBundle, {
@@ -3775,11 +3874,11 @@ var ClientServicesHost = class {
3775
3874
  if (this._open) {
3776
3875
  return;
3777
3876
  }
3778
- log15.trace("dxos.sdk.client-services-host", trace4.begin({
3877
+ log15.trace("dxos.sdk.client-services-host", trace5.begin({
3779
3878
  id: this._instanceId
3780
3879
  }), {
3781
3880
  file: "service-host.ts",
3782
- line: 167,
3881
+ line: 166,
3783
3882
  scope: this,
3784
3883
  callSite: (f, a) => f(...a)
3785
3884
  });
@@ -3791,7 +3890,7 @@ var ClientServicesHost = class {
3791
3890
  lockKey: (_a = this._resourceLock) == null ? void 0 : _a.lockKey
3792
3891
  }, {
3793
3892
  file: "service-host.ts",
3794
- line: 174,
3893
+ line: 173,
3795
3894
  scope: this,
3796
3895
  callSite: (f, a) => f(...a)
3797
3896
  });
@@ -3825,7 +3924,7 @@ var ClientServicesHost = class {
3825
3924
  deviceKey
3826
3925
  }, {
3827
3926
  file: "service-host.ts",
3828
- line: 221,
3927
+ line: 220,
3829
3928
  scope: this,
3830
3929
  callSite: (f, a) => f(...a)
3831
3930
  });
@@ -3840,7 +3939,7 @@ var ClientServicesHost = class {
3840
3939
  deviceKey
3841
3940
  }, {
3842
3941
  file: "service-host.ts",
3843
- line: 230,
3942
+ line: 229,
3844
3943
  scope: this,
3845
3944
  callSite: (f, a) => f(...a)
3846
3945
  });
@@ -3854,15 +3953,32 @@ var ClientServicesHost = class {
3854
3953
  deviceKey
3855
3954
  }, {
3856
3955
  file: "service-host.ts",
3857
- line: 235,
3956
+ line: 234,
3858
3957
  scope: this,
3859
3958
  callSite: (f, a) => f(...a)
3860
3959
  });
3861
- log15.trace("dxos.sdk.client-services-host", trace4.end({
3960
+ log15.trace("dxos.sdk.client-services-host", trace5.end({
3862
3961
  id: this._instanceId
3863
3962
  }), {
3864
3963
  file: "service-host.ts",
3865
- line: 237,
3964
+ line: 236,
3965
+ scope: this,
3966
+ callSite: (f, a) => f(...a)
3967
+ });
3968
+ }
3969
+ async reset() {
3970
+ var _a;
3971
+ log15("resetting...", {}, {
3972
+ file: "service-host.ts",
3973
+ line: 240,
3974
+ scope: this,
3975
+ callSite: (f, a) => f(...a)
3976
+ });
3977
+ await ((_a = this._serviceContext) == null ? void 0 : _a.close());
3978
+ await this._storage.reset();
3979
+ log15("reset", {}, {
3980
+ file: "service-host.ts",
3981
+ line: 243,
3866
3982
  scope: this,
3867
3983
  callSite: (f, a) => f(...a)
3868
3984
  });
@@ -4083,4 +4199,4 @@ export {
4083
4199
  LocalClientServices,
4084
4200
  fromHost
4085
4201
  };
4086
- //# sourceMappingURL=chunk-2AYYVPWN.mjs.map
4202
+ //# sourceMappingURL=chunk-6PNXHM7C.mjs.map