@dxos/client-services 0.8.4-main.7ace549 → 0.8.4-main.937b3ca
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.
- package/dist/lib/browser/chunk-NQSC7HOE.mjs +22 -0
- package/dist/lib/browser/chunk-NQSC7HOE.mjs.map +7 -0
- package/dist/lib/browser/chunk-QCWEHHJW.mjs +24 -0
- package/dist/lib/browser/chunk-QCWEHHJW.mjs.map +7 -0
- package/dist/lib/browser/{chunk-NXGWBEOK.mjs → chunk-UDCUM4WV.mjs} +922 -1265
- package/dist/lib/browser/chunk-UDCUM4WV.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +432 -65
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/packlets/diagnostics/browser-diagnostics-broadcast.mjs +93 -0
- package/dist/lib/browser/packlets/diagnostics/browser-diagnostics-broadcast.mjs.map +7 -0
- package/dist/lib/browser/packlets/diagnostics/diagnostics-broadcast.mjs +11 -0
- package/dist/lib/browser/packlets/diagnostics/diagnostics-broadcast.mjs.map +7 -0
- package/dist/lib/browser/packlets/locks/browser.mjs +126 -0
- package/dist/lib/browser/packlets/locks/browser.mjs.map +7 -0
- package/dist/lib/browser/packlets/locks/node.mjs +66 -0
- package/dist/lib/browser/packlets/locks/node.mjs.map +7 -0
- package/dist/lib/browser/testing/index.mjs +24 -12
- package/dist/lib/browser/testing/index.mjs.map +3 -3
- package/dist/lib/node-esm/chunk-2SZHAWBN.mjs +24 -0
- package/dist/lib/node-esm/chunk-2SZHAWBN.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-PKEGMOQ4.mjs +22 -0
- package/dist/lib/node-esm/chunk-PKEGMOQ4.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-AO4R6IID.mjs → chunk-Q56HAUWS.mjs} +421 -633
- package/dist/lib/node-esm/chunk-Q56HAUWS.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +432 -65
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/packlets/diagnostics/browser-diagnostics-broadcast.mjs +93 -0
- package/dist/lib/node-esm/packlets/diagnostics/browser-diagnostics-broadcast.mjs.map +7 -0
- package/dist/lib/node-esm/packlets/diagnostics/diagnostics-broadcast.mjs +11 -0
- package/dist/lib/node-esm/packlets/diagnostics/diagnostics-broadcast.mjs.map +7 -0
- package/dist/lib/node-esm/packlets/locks/browser.mjs +126 -0
- package/dist/lib/node-esm/packlets/locks/browser.mjs.map +7 -0
- package/dist/lib/node-esm/packlets/locks/node.mjs +66 -0
- package/dist/lib/node-esm/packlets/locks/node.mjs.map +7 -0
- package/dist/lib/node-esm/testing/index.mjs +24 -12
- package/dist/lib/node-esm/testing/index.mjs.map +3 -3
- package/dist/types/src/packlets/devtools/devtools.d.ts +2 -2
- package/dist/types/src/packlets/devtools/devtools.d.ts.map +1 -1
- package/dist/types/src/packlets/diagnostics/index.d.ts +1 -1
- package/dist/types/src/packlets/diagnostics/index.d.ts.map +1 -1
- package/dist/types/src/packlets/identity/authenticator.d.ts +2 -2
- package/dist/types/src/packlets/identity/authenticator.d.ts.map +1 -1
- package/dist/types/src/packlets/identity/default-space-state-machine.d.ts +2 -2
- package/dist/types/src/packlets/identity/default-space-state-machine.d.ts.map +1 -1
- package/dist/types/src/packlets/identity/identity-manager.d.ts +4 -4
- package/dist/types/src/packlets/identity/identity-manager.d.ts.map +1 -1
- package/dist/types/src/packlets/identity/identity-recovery-manager.d.ts +2 -2
- package/dist/types/src/packlets/identity/identity-recovery-manager.d.ts.map +1 -1
- package/dist/types/src/packlets/identity/identity.d.ts +2 -2
- package/dist/types/src/packlets/identity/identity.d.ts.map +1 -1
- package/dist/types/src/packlets/invitations/device-invitation-protocol.d.ts +2 -2
- package/dist/types/src/packlets/invitations/device-invitation-protocol.d.ts.map +1 -1
- package/dist/types/src/packlets/invitations/invitations-handler.d.ts +4 -4
- package/dist/types/src/packlets/invitations/invitations-handler.d.ts.map +1 -1
- package/dist/types/src/packlets/locks/index.d.ts +1 -1
- package/dist/types/src/packlets/locks/index.d.ts.map +1 -1
- package/dist/types/src/packlets/services/client-rpc-server.d.ts +2 -2
- package/dist/types/src/packlets/services/client-rpc-server.d.ts.map +1 -1
- package/dist/types/src/packlets/services/service-context.d.ts +13 -7
- package/dist/types/src/packlets/services/service-context.d.ts.map +1 -1
- package/dist/types/src/packlets/services/service-host.d.ts +19 -5
- package/dist/types/src/packlets/services/service-host.d.ts.map +1 -1
- package/dist/types/src/packlets/space-export/space-archive-writer.d.ts.map +1 -1
- package/dist/types/src/packlets/spaces/data-space-manager.d.ts +10 -5
- package/dist/types/src/packlets/spaces/data-space-manager.d.ts.map +1 -1
- package/dist/types/src/packlets/spaces/data-space.d.ts +2 -2
- package/dist/types/src/packlets/spaces/data-space.d.ts.map +1 -1
- package/dist/types/src/packlets/spaces/edge-feed-replicator.d.ts +2 -2
- package/dist/types/src/packlets/spaces/edge-feed-replicator.d.ts.map +1 -1
- package/dist/types/src/packlets/spaces/notarization-plugin.d.ts +6 -6
- package/dist/types/src/packlets/spaces/notarization-plugin.d.ts.map +1 -1
- package/dist/types/src/packlets/testing/invitation-utils.d.ts +6 -3
- package/dist/types/src/packlets/testing/invitation-utils.d.ts.map +1 -1
- package/dist/types/src/packlets/testing/test-builder.d.ts +6 -5
- package/dist/types/src/packlets/testing/test-builder.d.ts.map +1 -1
- package/dist/types/src/packlets/worker/worker-runtime.d.ts +23 -4
- package/dist/types/src/packlets/worker/worker-runtime.d.ts.map +1 -1
- package/dist/types/src/packlets/worker/worker-session.d.ts +2 -2
- package/dist/types/src/packlets/worker/worker-session.d.ts.map +1 -1
- package/dist/types/src/version.d.ts +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +70 -48
- package/src/packlets/devtools/devtools.ts +2 -2
- package/src/packlets/diagnostics/index.ts +1 -1
- package/src/packlets/identity/authenticator.ts +2 -2
- package/src/packlets/identity/default-space-state-machine.ts +2 -2
- package/src/packlets/identity/identity-manager.ts +6 -6
- package/src/packlets/identity/identity-recovery-manager.ts +2 -2
- package/src/packlets/identity/identity.ts +2 -2
- package/src/packlets/invitations/device-invitation-protocol.ts +2 -2
- package/src/packlets/invitations/invitations-handler.ts +6 -6
- package/src/packlets/locks/index.ts +1 -1
- package/src/packlets/services/client-rpc-server.ts +4 -4
- package/src/packlets/services/service-context.ts +30 -19
- package/src/packlets/services/service-host.ts +56 -16
- package/src/packlets/space-export/space-archive-writer.ts +3 -2
- package/src/packlets/spaces/data-space-manager.ts +35 -16
- package/src/packlets/spaces/data-space.ts +6 -5
- package/src/packlets/spaces/edge-feed-replicator.ts +2 -2
- package/src/packlets/spaces/epoch-migrations.ts +2 -2
- package/src/packlets/spaces/notarization-plugin.test.ts +2 -2
- package/src/packlets/spaces/notarization-plugin.ts +6 -6
- package/src/packlets/testing/invitation-utils.ts +7 -4
- package/src/packlets/testing/test-builder.ts +36 -10
- package/src/packlets/worker/worker-runtime.ts +141 -11
- package/src/packlets/worker/worker-session.ts +4 -4
- package/src/version.ts +1 -1
- package/dist/lib/browser/chunk-NXGWBEOK.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-AO4R6IID.mjs.map +0 -7
|
@@ -1,4 +1,11 @@
|
|
|
1
1
|
import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
createCollectDiagnosticsBroadcastSender
|
|
4
|
+
} from "./chunk-PKEGMOQ4.mjs";
|
|
5
|
+
import {
|
|
6
|
+
__export,
|
|
7
|
+
__reExport
|
|
8
|
+
} from "./chunk-2SZHAWBN.mjs";
|
|
2
9
|
|
|
3
10
|
// src/packlets/devtools/feeds.ts
|
|
4
11
|
import { SubscriptionList } from "@dxos/async";
|
|
@@ -396,7 +403,7 @@ import { SpaceMember } from "@dxos/protocols/proto/dxos/client/services";
|
|
|
396
403
|
import { TRACE_PROCESSOR } from "@dxos/tracing";
|
|
397
404
|
|
|
398
405
|
// src/version.ts
|
|
399
|
-
var DXOS_VERSION = "0.8.4-main.
|
|
406
|
+
var DXOS_VERSION = "0.8.4-main.937b3ca";
|
|
400
407
|
|
|
401
408
|
// src/packlets/services/platform.ts
|
|
402
409
|
import { Platform } from "@dxos/protocols/proto/dxos/client/services";
|
|
@@ -550,21 +557,6 @@ var getStorageDiagnostics = async () => {
|
|
|
550
557
|
}));
|
|
551
558
|
};
|
|
552
559
|
|
|
553
|
-
// src/packlets/diagnostics/diagnostics-broadcast.ts
|
|
554
|
-
var createCollectDiagnosticsBroadcastSender = () => {
|
|
555
|
-
return {
|
|
556
|
-
broadcastDiagnosticsRequest: async () => void 0
|
|
557
|
-
};
|
|
558
|
-
};
|
|
559
|
-
var createCollectDiagnosticsBroadcastHandler = (_) => {
|
|
560
|
-
return {
|
|
561
|
-
start: () => {
|
|
562
|
-
},
|
|
563
|
-
stop: () => {
|
|
564
|
-
}
|
|
565
|
-
};
|
|
566
|
-
};
|
|
567
|
-
|
|
568
560
|
// src/packlets/diagnostics/diagnostics-collector.ts
|
|
569
561
|
import { ClientServicesProviderResource } from "@dxos/client-protocol";
|
|
570
562
|
import { ConfigResource } from "@dxos/config";
|
|
@@ -604,6 +596,15 @@ var findConfigs = () => {
|
|
|
604
596
|
return configs.map((r) => r.instance.deref()).filter(isNonNullable);
|
|
605
597
|
};
|
|
606
598
|
|
|
599
|
+
// src/packlets/diagnostics/index.ts
|
|
600
|
+
var diagnostics_exports = {};
|
|
601
|
+
__export(diagnostics_exports, {
|
|
602
|
+
DiagnosticsCollector: () => DiagnosticsCollector,
|
|
603
|
+
createDiagnostics: () => createDiagnostics
|
|
604
|
+
});
|
|
605
|
+
__reExport(diagnostics_exports, diagnostics_broadcast_star);
|
|
606
|
+
import * as diagnostics_broadcast_star from "#diagnostics-broadcast";
|
|
607
|
+
|
|
607
608
|
// src/packlets/identity/authenticator.ts
|
|
608
609
|
import { Trigger } from "@dxos/async";
|
|
609
610
|
import { Context as Context2 } from "@dxos/context";
|
|
@@ -1247,7 +1248,7 @@ import { Event as Event7, Mutex as Mutex2, scheduleTask as scheduleTask4, sleep
|
|
|
1247
1248
|
import { AUTH_TIMEOUT as AUTH_TIMEOUT2 } from "@dxos/client-protocol";
|
|
1248
1249
|
import { Context as Context6, ContextDisposedError, cancelWithContext as cancelWithContext2 } from "@dxos/context";
|
|
1249
1250
|
import { timed, warnAfterTimeout } from "@dxos/debug";
|
|
1250
|
-
import {
|
|
1251
|
+
import { createMappedFeedWriter } from "@dxos/echo-pipeline";
|
|
1251
1252
|
import { SpaceDocVersion as SpaceDocVersion2 } from "@dxos/echo-protocol";
|
|
1252
1253
|
import { failedInvariant as failedInvariant3, invariant as invariant11 } from "@dxos/invariant";
|
|
1253
1254
|
import { PublicKey as PublicKey8 } from "@dxos/keys";
|
|
@@ -1279,9 +1280,9 @@ import { SpaceProperties } from "@dxos/client-protocol";
|
|
|
1279
1280
|
import { Context as Context4, LifecycleState, Resource as Resource2, cancelWithContext } from "@dxos/context";
|
|
1280
1281
|
import { createAdmissionCredentials, getCredentialAssertion } from "@dxos/credentials";
|
|
1281
1282
|
import { Type } from "@dxos/echo";
|
|
1282
|
-
import {
|
|
1283
|
-
import { AuthStatus, CredentialServerExtension, DatabaseRoot,
|
|
1284
|
-
import { SpaceDocVersion, createIdFromSpaceKey
|
|
1283
|
+
import { getSchemaDXN } from "@dxos/echo/internal";
|
|
1284
|
+
import { AuthStatus, CredentialServerExtension, DatabaseRoot, findInlineObjectOfType } from "@dxos/echo-pipeline";
|
|
1285
|
+
import { EncodedReference, SpaceDocVersion, createIdFromSpaceKey } from "@dxos/echo-protocol";
|
|
1285
1286
|
import { writeMessages } from "@dxos/feed-store";
|
|
1286
1287
|
import { assertArgument, assertState, failedInvariant, invariant as invariant3 } from "@dxos/invariant";
|
|
1287
1288
|
import { ObjectId, PublicKey as PublicKey4 } from "@dxos/keys";
|
|
@@ -1391,7 +1392,7 @@ var DataSpaceManager = class extends Resource2 {
|
|
|
1391
1392
|
_edgeFeatures = void 0;
|
|
1392
1393
|
_meshReplicator = void 0;
|
|
1393
1394
|
_echoEdgeReplicator = void 0;
|
|
1394
|
-
|
|
1395
|
+
_runtimeProps = void 0;
|
|
1395
1396
|
constructor(params) {
|
|
1396
1397
|
super();
|
|
1397
1398
|
this._spaceManager = params.spaceManager;
|
|
@@ -1406,14 +1407,17 @@ var DataSpaceManager = class extends Resource2 {
|
|
|
1406
1407
|
this._edgeFeatures = params.edgeFeatures;
|
|
1407
1408
|
this._echoEdgeReplicator = params.echoEdgeReplicator;
|
|
1408
1409
|
this._edgeHttpClient = params.edgeHttpClient;
|
|
1409
|
-
this.
|
|
1410
|
+
this._runtimeProps = params.runtimeProps;
|
|
1410
1411
|
trace.diagnostic({
|
|
1411
1412
|
id: "spaces",
|
|
1412
1413
|
name: "Spaces",
|
|
1413
1414
|
fetch: async () => {
|
|
1414
1415
|
return Promise.all(Array.from(this._spaces.values()).map(async (space) => {
|
|
1415
1416
|
const rootUrl = space.automergeSpaceState.rootUrl;
|
|
1416
|
-
const rootHandle = rootUrl ? await this._echoHost.
|
|
1417
|
+
const rootHandle = rootUrl ? await this._echoHost.loadDoc(Context4.default(void 0, {
|
|
1418
|
+
F: __dxlog_file6,
|
|
1419
|
+
L: 187
|
|
1420
|
+
}), rootUrl) : void 0;
|
|
1417
1421
|
await rootHandle?.whenReady();
|
|
1418
1422
|
const rootDoc = rootHandle?.doc();
|
|
1419
1423
|
const properties = rootDoc && findInlineObjectOfType(rootDoc, Type.getTypename(SpaceProperties));
|
|
@@ -1443,7 +1447,7 @@ var DataSpaceManager = class extends Resource2 {
|
|
|
1443
1447
|
async _open() {
|
|
1444
1448
|
log4("open", void 0, {
|
|
1445
1449
|
F: __dxlog_file6,
|
|
1446
|
-
L:
|
|
1450
|
+
L: 221,
|
|
1447
1451
|
S: this,
|
|
1448
1452
|
C: (f, a) => f(...a)
|
|
1449
1453
|
});
|
|
@@ -1451,7 +1455,7 @@ var DataSpaceManager = class extends Resource2 {
|
|
|
1451
1455
|
id: this._instanceId
|
|
1452
1456
|
}), {
|
|
1453
1457
|
F: __dxlog_file6,
|
|
1454
|
-
L:
|
|
1458
|
+
L: 222,
|
|
1455
1459
|
S: this,
|
|
1456
1460
|
C: (f, a) => f(...a)
|
|
1457
1461
|
});
|
|
@@ -1459,39 +1463,64 @@ var DataSpaceManager = class extends Resource2 {
|
|
|
1459
1463
|
spaces: this._metadataStore.spaces.length
|
|
1460
1464
|
}, {
|
|
1461
1465
|
F: __dxlog_file6,
|
|
1462
|
-
L:
|
|
1466
|
+
L: 223,
|
|
1463
1467
|
S: this,
|
|
1464
1468
|
C: (f, a) => f(...a)
|
|
1465
1469
|
});
|
|
1470
|
+
const spacesToActivate = [];
|
|
1466
1471
|
await forEachAsync(this._metadataStore.spaces, async (spaceMetadata) => {
|
|
1467
1472
|
try {
|
|
1468
1473
|
log4("load space", {
|
|
1469
1474
|
spaceMetadata
|
|
1470
1475
|
}, {
|
|
1471
1476
|
F: __dxlog_file6,
|
|
1472
|
-
L:
|
|
1477
|
+
L: 228,
|
|
1473
1478
|
S: this,
|
|
1474
1479
|
C: (f, a) => f(...a)
|
|
1475
1480
|
});
|
|
1476
|
-
await this._constructSpace(spaceMetadata);
|
|
1481
|
+
const space = await this._constructSpace(spaceMetadata);
|
|
1482
|
+
if (this._runtimeProps?.autoActivateSpaces && spaceMetadata.state === SpaceState.SPACE_ACTIVE) {
|
|
1483
|
+
spacesToActivate.push(space);
|
|
1484
|
+
}
|
|
1477
1485
|
} catch (err) {
|
|
1478
1486
|
log4.error("Error loading space", {
|
|
1479
1487
|
spaceMetadata,
|
|
1480
1488
|
err
|
|
1481
1489
|
}, {
|
|
1482
1490
|
F: __dxlog_file6,
|
|
1483
|
-
L:
|
|
1491
|
+
L: 235,
|
|
1484
1492
|
S: this,
|
|
1485
1493
|
C: (f, a) => f(...a)
|
|
1486
1494
|
});
|
|
1487
1495
|
}
|
|
1488
1496
|
});
|
|
1497
|
+
for (const space of spacesToActivate) {
|
|
1498
|
+
log4("auto-activating space", {
|
|
1499
|
+
spaceKey: space.key
|
|
1500
|
+
}, {
|
|
1501
|
+
F: __dxlog_file6,
|
|
1502
|
+
L: 241,
|
|
1503
|
+
S: this,
|
|
1504
|
+
C: (f, a) => f(...a)
|
|
1505
|
+
});
|
|
1506
|
+
space.activate().catch((err) => {
|
|
1507
|
+
log4.error("Error auto-activating space", {
|
|
1508
|
+
spaceKey: space.key,
|
|
1509
|
+
err
|
|
1510
|
+
}, {
|
|
1511
|
+
F: __dxlog_file6,
|
|
1512
|
+
L: 243,
|
|
1513
|
+
S: this,
|
|
1514
|
+
C: (f, a) => f(...a)
|
|
1515
|
+
});
|
|
1516
|
+
});
|
|
1517
|
+
}
|
|
1489
1518
|
this.updated.emit();
|
|
1490
1519
|
log4.trace("dxos.echo.data-space-manager.open", Trace.end({
|
|
1491
1520
|
id: this._instanceId
|
|
1492
1521
|
}), {
|
|
1493
1522
|
F: __dxlog_file6,
|
|
1494
|
-
L:
|
|
1523
|
+
L: 249,
|
|
1495
1524
|
S: this,
|
|
1496
1525
|
C: (f, a) => f(...a)
|
|
1497
1526
|
});
|
|
@@ -1499,7 +1528,7 @@ var DataSpaceManager = class extends Resource2 {
|
|
|
1499
1528
|
async _close() {
|
|
1500
1529
|
log4("close", void 0, {
|
|
1501
1530
|
F: __dxlog_file6,
|
|
1502
|
-
L:
|
|
1531
|
+
L: 254,
|
|
1503
1532
|
S: this,
|
|
1504
1533
|
C: (f, a) => f(...a)
|
|
1505
1534
|
});
|
|
@@ -1530,7 +1559,7 @@ var DataSpaceManager = class extends Resource2 {
|
|
|
1530
1559
|
spaceKey
|
|
1531
1560
|
}, {
|
|
1532
1561
|
F: __dxlog_file6,
|
|
1533
|
-
L:
|
|
1562
|
+
L: 287,
|
|
1534
1563
|
S: this,
|
|
1535
1564
|
C: (f, a) => f(...a)
|
|
1536
1565
|
});
|
|
@@ -1538,7 +1567,7 @@ var DataSpaceManager = class extends Resource2 {
|
|
|
1538
1567
|
if (options.documents) {
|
|
1539
1568
|
invariant3(Object.keys(options.documents).every((documentId) => /^[a-zA-Z0-9]+$/.test(documentId)), "Invalid document IDs", {
|
|
1540
1569
|
F: __dxlog_file6,
|
|
1541
|
-
L:
|
|
1570
|
+
L: 292,
|
|
1542
1571
|
S: this,
|
|
1543
1572
|
A: [
|
|
1544
1573
|
"Object.keys(options.documents).every((documentId) => /^[a-zA-Z0-9]+$/.test(documentId))",
|
|
@@ -1550,7 +1579,7 @@ var DataSpaceManager = class extends Resource2 {
|
|
|
1550
1579
|
documentId
|
|
1551
1580
|
}, {
|
|
1552
1581
|
F: __dxlog_file6,
|
|
1553
|
-
L:
|
|
1582
|
+
L: 299,
|
|
1554
1583
|
S: this,
|
|
1555
1584
|
C: (f, a) => f(...a)
|
|
1556
1585
|
});
|
|
@@ -1569,7 +1598,7 @@ var DataSpaceManager = class extends Resource2 {
|
|
|
1569
1598
|
spaceKey
|
|
1570
1599
|
}, {
|
|
1571
1600
|
F: __dxlog_file6,
|
|
1572
|
-
L:
|
|
1601
|
+
L: 317,
|
|
1573
1602
|
S: this,
|
|
1574
1603
|
C: (f, a) => f(...a)
|
|
1575
1604
|
});
|
|
@@ -1578,7 +1607,7 @@ var DataSpaceManager = class extends Resource2 {
|
|
|
1578
1607
|
const newRootDocId = documentIdMapping[interpretAsDocumentId(options.rootUrl)] ?? failedInvariant();
|
|
1579
1608
|
const rootDocHandle = await this._echoHost.loadDoc(Context4.default(void 0, {
|
|
1580
1609
|
F: __dxlog_file6,
|
|
1581
|
-
L:
|
|
1610
|
+
L: 322
|
|
1582
1611
|
}), newRootDocId);
|
|
1583
1612
|
DatabaseRoot.mapLinks(rootDocHandle, documentIdMapping);
|
|
1584
1613
|
root = await this._echoHost.openSpaceRoot(spaceId, `automerge:${newRootDocId}`);
|
|
@@ -1590,7 +1619,7 @@ var DataSpaceManager = class extends Resource2 {
|
|
|
1590
1619
|
spaceKey
|
|
1591
1620
|
}, {
|
|
1592
1621
|
F: __dxlog_file6,
|
|
1593
|
-
L:
|
|
1622
|
+
L: 331,
|
|
1594
1623
|
S: this,
|
|
1595
1624
|
C: (f, a) => f(...a)
|
|
1596
1625
|
});
|
|
@@ -1600,7 +1629,7 @@ var DataSpaceManager = class extends Resource2 {
|
|
|
1600
1629
|
spaceKey
|
|
1601
1630
|
}, {
|
|
1602
1631
|
F: __dxlog_file6,
|
|
1603
|
-
L:
|
|
1632
|
+
L: 336,
|
|
1604
1633
|
S: this,
|
|
1605
1634
|
C: (f, a) => f(...a)
|
|
1606
1635
|
});
|
|
@@ -1609,7 +1638,7 @@ var DataSpaceManager = class extends Resource2 {
|
|
|
1609
1638
|
const memberCredential = credentials[1];
|
|
1610
1639
|
invariant3(getCredentialAssertion(memberCredential)["@type"] === "dxos.halo.credentials.SpaceMember", void 0, {
|
|
1611
1640
|
F: __dxlog_file6,
|
|
1612
|
-
L:
|
|
1641
|
+
L: 342,
|
|
1613
1642
|
S: this,
|
|
1614
1643
|
A: [
|
|
1615
1644
|
"getCredentialAssertion(memberCredential)['@type'] === 'dxos.halo.credentials.SpaceMember'",
|
|
@@ -1623,7 +1652,7 @@ var DataSpaceManager = class extends Resource2 {
|
|
|
1623
1652
|
spaceKey
|
|
1624
1653
|
}, {
|
|
1625
1654
|
F: __dxlog_file6,
|
|
1626
|
-
L:
|
|
1655
|
+
L: 347,
|
|
1627
1656
|
S: this,
|
|
1628
1657
|
C: (f, a) => f(...a)
|
|
1629
1658
|
});
|
|
@@ -1641,7 +1670,7 @@ var DataSpaceManager = class extends Resource2 {
|
|
|
1641
1670
|
spaceId: space.id
|
|
1642
1671
|
}, {
|
|
1643
1672
|
F: __dxlog_file6,
|
|
1644
|
-
L:
|
|
1673
|
+
L: 360,
|
|
1645
1674
|
S: this,
|
|
1646
1675
|
C: (f, a) => f(...a)
|
|
1647
1676
|
});
|
|
@@ -1659,7 +1688,7 @@ var DataSpaceManager = class extends Resource2 {
|
|
|
1659
1688
|
spaceId: space.id
|
|
1660
1689
|
}, {
|
|
1661
1690
|
F: __dxlog_file6,
|
|
1662
|
-
L:
|
|
1691
|
+
L: 374,
|
|
1663
1692
|
S: this,
|
|
1664
1693
|
C: (f, a) => f(...a)
|
|
1665
1694
|
});
|
|
@@ -1671,7 +1700,7 @@ var DataSpaceManager = class extends Resource2 {
|
|
|
1671
1700
|
const document = await this._getSpaceRootDocument(space);
|
|
1672
1701
|
const properties = {
|
|
1673
1702
|
system: {
|
|
1674
|
-
type:
|
|
1703
|
+
type: EncodedReference.fromDXN(getSchemaDXN(SpaceProperties))
|
|
1675
1704
|
},
|
|
1676
1705
|
data: {
|
|
1677
1706
|
[DEFAULT_SPACE_KEY]: this._signingContext.identityKey.toHex()
|
|
@@ -1694,14 +1723,19 @@ var DataSpaceManager = class extends Resource2 {
|
|
|
1694
1723
|
const automergeIndex = space.automergeSpaceState.rootUrl;
|
|
1695
1724
|
invariant3(automergeIndex, void 0, {
|
|
1696
1725
|
F: __dxlog_file6,
|
|
1697
|
-
L:
|
|
1726
|
+
L: 407,
|
|
1698
1727
|
S: this,
|
|
1699
1728
|
A: [
|
|
1700
1729
|
"automergeIndex",
|
|
1701
1730
|
""
|
|
1702
1731
|
]
|
|
1703
1732
|
});
|
|
1704
|
-
const document = await this._echoHost.
|
|
1733
|
+
const document = await this._echoHost.loadDoc(Context4.default(void 0, {
|
|
1734
|
+
F: __dxlog_file6,
|
|
1735
|
+
L: 408
|
|
1736
|
+
}), automergeIndex, {
|
|
1737
|
+
fetchFromNetwork: true
|
|
1738
|
+
});
|
|
1705
1739
|
await document.whenReady();
|
|
1706
1740
|
return document;
|
|
1707
1741
|
}
|
|
@@ -1711,13 +1745,13 @@ var DataSpaceManager = class extends Resource2 {
|
|
|
1711
1745
|
opts
|
|
1712
1746
|
}, {
|
|
1713
1747
|
F: __dxlog_file6,
|
|
1714
|
-
L:
|
|
1748
|
+
L: 418,
|
|
1715
1749
|
S: this,
|
|
1716
1750
|
C: (f, a) => f(...a)
|
|
1717
1751
|
});
|
|
1718
1752
|
invariant3(this._lifecycleState === LifecycleState.OPEN, "Not open.", {
|
|
1719
1753
|
F: __dxlog_file6,
|
|
1720
|
-
L:
|
|
1754
|
+
L: 419,
|
|
1721
1755
|
S: this,
|
|
1722
1756
|
A: [
|
|
1723
1757
|
"this._lifecycleState === LifecycleState.OPEN",
|
|
@@ -1726,7 +1760,7 @@ var DataSpaceManager = class extends Resource2 {
|
|
|
1726
1760
|
});
|
|
1727
1761
|
invariant3(!this._spaces.has(opts.spaceKey), "Space already exists.", {
|
|
1728
1762
|
F: __dxlog_file6,
|
|
1729
|
-
L:
|
|
1763
|
+
L: 420,
|
|
1730
1764
|
S: this,
|
|
1731
1765
|
A: [
|
|
1732
1766
|
"!this._spaces.has(opts.spaceKey)",
|
|
@@ -1750,7 +1784,7 @@ var DataSpaceManager = class extends Resource2 {
|
|
|
1750
1784
|
const space = this._spaceManager.spaces.get(options.spaceKey);
|
|
1751
1785
|
invariant3(space, void 0, {
|
|
1752
1786
|
F: __dxlog_file6,
|
|
1753
|
-
L:
|
|
1787
|
+
L: 440,
|
|
1754
1788
|
S: this,
|
|
1755
1789
|
A: [
|
|
1756
1790
|
"space",
|
|
@@ -1763,7 +1797,7 @@ var DataSpaceManager = class extends Resource2 {
|
|
|
1763
1797
|
const credentials = await createAdmissionCredentials(this._signingContext.credentialSigner, options.identityKey, space.key, space.genesisFeedKey, options.role, space.spaceState.membershipChainHeads, options.profile, options.delegationCredentialId);
|
|
1764
1798
|
invariant3(credentials[0].credential, void 0, {
|
|
1765
1799
|
F: __dxlog_file6,
|
|
1766
|
-
L:
|
|
1800
|
+
L: 459,
|
|
1767
1801
|
S: this,
|
|
1768
1802
|
A: [
|
|
1769
1803
|
"credentials[0].credential",
|
|
@@ -1773,7 +1807,7 @@ var DataSpaceManager = class extends Resource2 {
|
|
|
1773
1807
|
const spaceMemberCredential = credentials[0].credential.credential;
|
|
1774
1808
|
invariant3(getCredentialAssertion(spaceMemberCredential)["@type"] === "dxos.halo.credentials.SpaceMember", void 0, {
|
|
1775
1809
|
F: __dxlog_file6,
|
|
1776
|
-
L:
|
|
1810
|
+
L: 461,
|
|
1777
1811
|
S: this,
|
|
1778
1812
|
A: [
|
|
1779
1813
|
"getCredentialAssertion(spaceMemberCredential)['@type'] === 'dxos.halo.credentials.SpaceMember'",
|
|
@@ -1811,7 +1845,7 @@ var DataSpaceManager = class extends Resource2 {
|
|
|
1811
1845
|
const space = this._spaces.get(spaceKey);
|
|
1812
1846
|
invariant3(space, "Space not found.", {
|
|
1813
1847
|
F: __dxlog_file6,
|
|
1814
|
-
L:
|
|
1848
|
+
L: 498,
|
|
1815
1849
|
S: this,
|
|
1816
1850
|
A: [
|
|
1817
1851
|
"space",
|
|
@@ -1836,7 +1870,7 @@ var DataSpaceManager = class extends Resource2 {
|
|
|
1836
1870
|
metadata
|
|
1837
1871
|
}, {
|
|
1838
1872
|
F: __dxlog_file6,
|
|
1839
|
-
L:
|
|
1873
|
+
L: 517,
|
|
1840
1874
|
S: this,
|
|
1841
1875
|
C: (f, a) => f(...a)
|
|
1842
1876
|
});
|
|
@@ -1844,8 +1878,8 @@ var DataSpaceManager = class extends Resource2 {
|
|
|
1844
1878
|
localPeerId: this._signingContext.deviceKey
|
|
1845
1879
|
});
|
|
1846
1880
|
const presence = new Presence({
|
|
1847
|
-
announceInterval: this.
|
|
1848
|
-
offlineTimeout: this.
|
|
1881
|
+
announceInterval: this._runtimeProps?.spaceMemberPresenceAnnounceInterval ?? PRESENCE_ANNOUNCE_INTERVAL,
|
|
1882
|
+
offlineTimeout: this._runtimeProps?.spaceMemberPresenceOfflineTimeout ?? PRESENCE_OFFLINE_TIMEOUT,
|
|
1849
1883
|
identityKey: this._signingContext.identityKey,
|
|
1850
1884
|
gossip
|
|
1851
1885
|
});
|
|
@@ -1880,7 +1914,7 @@ var DataSpaceManager = class extends Resource2 {
|
|
|
1880
1914
|
err
|
|
1881
1915
|
}, {
|
|
1882
1916
|
F: __dxlog_file6,
|
|
1883
|
-
L:
|
|
1917
|
+
L: 559,
|
|
1884
1918
|
S: this,
|
|
1885
1919
|
C: (f, a) => f(...a)
|
|
1886
1920
|
});
|
|
@@ -1890,7 +1924,7 @@ var DataSpaceManager = class extends Resource2 {
|
|
|
1890
1924
|
onAuthFailure: () => {
|
|
1891
1925
|
log4.warn("auth failure", void 0, {
|
|
1892
1926
|
F: __dxlog_file6,
|
|
1893
|
-
L:
|
|
1927
|
+
L: 564,
|
|
1894
1928
|
S: this,
|
|
1895
1929
|
C: (f, a) => f(...a)
|
|
1896
1930
|
});
|
|
@@ -1923,7 +1957,7 @@ var DataSpaceManager = class extends Resource2 {
|
|
|
1923
1957
|
space: space.key
|
|
1924
1958
|
}, {
|
|
1925
1959
|
F: __dxlog_file6,
|
|
1926
|
-
L:
|
|
1960
|
+
L: 591,
|
|
1927
1961
|
S: this,
|
|
1928
1962
|
C: (f, a) => f(...a)
|
|
1929
1963
|
});
|
|
@@ -1934,7 +1968,7 @@ var DataSpaceManager = class extends Resource2 {
|
|
|
1934
1968
|
open: this._lifecycleState === LifecycleState.OPEN
|
|
1935
1969
|
}, {
|
|
1936
1970
|
F: __dxlog_file6,
|
|
1937
|
-
L:
|
|
1971
|
+
L: 594,
|
|
1938
1972
|
S: this,
|
|
1939
1973
|
C: (f, a) => f(...a)
|
|
1940
1974
|
});
|
|
@@ -1953,7 +1987,7 @@ var DataSpaceManager = class extends Resource2 {
|
|
|
1953
1987
|
space: space.key
|
|
1954
1988
|
}, {
|
|
1955
1989
|
F: __dxlog_file6,
|
|
1956
|
-
L:
|
|
1990
|
+
L: 602,
|
|
1957
1991
|
S: this,
|
|
1958
1992
|
C: (f, a) => f(...a)
|
|
1959
1993
|
});
|
|
@@ -1963,7 +1997,7 @@ var DataSpaceManager = class extends Resource2 {
|
|
|
1963
1997
|
edgeConnection: this._edgeConnection,
|
|
1964
1998
|
edgeHttpClient: this._edgeHttpClient,
|
|
1965
1999
|
edgeFeatures: this._edgeFeatures,
|
|
1966
|
-
activeEdgeNotarizationPollingInterval: this.
|
|
2000
|
+
activeEdgeNotarizationPollingInterval: this._runtimeProps?.activeEdgeNotarizationPollingInterval
|
|
1967
2001
|
});
|
|
1968
2002
|
dataSpace.postOpen.append(async () => {
|
|
1969
2003
|
const setting = dataSpace.getEdgeReplicationSetting();
|
|
@@ -1974,7 +2008,7 @@ var DataSpaceManager = class extends Resource2 {
|
|
|
1974
2008
|
spaceId: dataSpace.id
|
|
1975
2009
|
}, {
|
|
1976
2010
|
F: __dxlog_file6,
|
|
1977
|
-
L:
|
|
2011
|
+
L: 616,
|
|
1978
2012
|
S: this,
|
|
1979
2013
|
C: (f, a) => f(...a)
|
|
1980
2014
|
});
|
|
@@ -2004,7 +2038,7 @@ var DataSpaceManager = class extends Resource2 {
|
|
|
2004
2038
|
space: space.key
|
|
2005
2039
|
}, {
|
|
2006
2040
|
F: __dxlog_file6,
|
|
2007
|
-
L:
|
|
2041
|
+
L: 643,
|
|
2008
2042
|
S: this,
|
|
2009
2043
|
C: (f, a) => f(...a)
|
|
2010
2044
|
});
|
|
@@ -2037,7 +2071,7 @@ var DataSpaceManager = class extends Resource2 {
|
|
|
2037
2071
|
closedSessions
|
|
2038
2072
|
}, {
|
|
2039
2073
|
F: __dxlog_file6,
|
|
2040
|
-
L:
|
|
2074
|
+
L: 669,
|
|
2041
2075
|
S: this,
|
|
2042
2076
|
C: (f, a) => f(...a)
|
|
2043
2077
|
});
|
|
@@ -2052,7 +2086,7 @@ var DataSpaceManager = class extends Resource2 {
|
|
|
2052
2086
|
peerId: peerState.peerId
|
|
2053
2087
|
}, {
|
|
2054
2088
|
F: __dxlog_file6,
|
|
2055
|
-
L:
|
|
2089
|
+
L: 683,
|
|
2056
2090
|
S: this,
|
|
2057
2091
|
C: (f, a) => f(...a)
|
|
2058
2092
|
});
|
|
@@ -2129,6 +2163,7 @@ import { trace as trace2 } from "@dxos/tracing";
|
|
|
2129
2163
|
import { Resource as Resource3 } from "@dxos/context";
|
|
2130
2164
|
import { assertArgument as assertArgument2, assertState as assertState2 } from "@dxos/invariant";
|
|
2131
2165
|
import { SpaceArchiveFileStructure, SpaceArchiveVersion } from "@dxos/protocols";
|
|
2166
|
+
import { createFilename } from "@dxos/util";
|
|
2132
2167
|
var CURRENT_VERSION = SpaceArchiveVersion.V1;
|
|
2133
2168
|
var SpaceArchiveWriter = class extends Resource3 {
|
|
2134
2169
|
_tar;
|
|
@@ -2161,6 +2196,7 @@ var SpaceArchiveWriter = class extends Resource3 {
|
|
|
2161
2196
|
async finish() {
|
|
2162
2197
|
assertState2(this._archive, "Not open");
|
|
2163
2198
|
assertState2(this._meta, "Not started");
|
|
2199
|
+
assertState2(this._meta.spaceId, "No space ID set");
|
|
2164
2200
|
assertState2(this._currentRootUrl, "No root URL set");
|
|
2165
2201
|
const metadata = {
|
|
2166
2202
|
version: CURRENT_VERSION,
|
|
@@ -2174,8 +2210,12 @@ var SpaceArchiveWriter = class extends Resource3 {
|
|
|
2174
2210
|
this._archive.addTextFile(SpaceArchiveFileStructure.metadata, JSON.stringify(metadata));
|
|
2175
2211
|
const binary = this._archive.toUint8Array();
|
|
2176
2212
|
return {
|
|
2177
|
-
|
|
2178
|
-
|
|
2213
|
+
filename: createFilename({
|
|
2214
|
+
parts: [
|
|
2215
|
+
this._meta.spaceId
|
|
2216
|
+
],
|
|
2217
|
+
ext: "tar"
|
|
2218
|
+
}),
|
|
2179
2219
|
contents: binary
|
|
2180
2220
|
};
|
|
2181
2221
|
}
|
|
@@ -3706,7 +3746,7 @@ var LOAD_DOC_TIMEOUT = 1e4;
|
|
|
3706
3746
|
var runEpochMigration = async (ctx, context) => {
|
|
3707
3747
|
switch (context.migration) {
|
|
3708
3748
|
case CreateEpochRequest.Migration.INIT_AUTOMERGE: {
|
|
3709
|
-
const document = context.echoHost.createDoc();
|
|
3749
|
+
const document = await context.echoHost.createDoc();
|
|
3710
3750
|
await context.echoHost.flush();
|
|
3711
3751
|
return {
|
|
3712
3752
|
newRoot: document.url
|
|
@@ -3719,7 +3759,7 @@ var runEpochMigration = async (ctx, context) => {
|
|
|
3719
3759
|
const rootHandle = await context.echoHost.loadDoc(ctx, context.currentRoot, {
|
|
3720
3760
|
timeout: LOAD_DOC_TIMEOUT
|
|
3721
3761
|
});
|
|
3722
|
-
const newRoot = context.echoHost.createDoc(rootHandle.doc());
|
|
3762
|
+
const newRoot = await context.echoHost.createDoc(rootHandle.doc());
|
|
3723
3763
|
await context.echoHost.flush();
|
|
3724
3764
|
return {
|
|
3725
3765
|
newRoot: newRoot.url
|
|
@@ -4284,7 +4324,7 @@ var __dxlog_file15 = "/__w/dxos/dxos/packages/sdk/client-services/src/packlets/s
|
|
|
4284
4324
|
var DataSpace = class {
|
|
4285
4325
|
_ctx = new Context6(void 0, {
|
|
4286
4326
|
F: __dxlog_file15,
|
|
4287
|
-
L:
|
|
4327
|
+
L: 100
|
|
4288
4328
|
});
|
|
4289
4329
|
_inner;
|
|
4290
4330
|
_gossip;
|
|
@@ -4346,7 +4386,7 @@ var DataSpace = class {
|
|
|
4346
4386
|
state: SpaceState4[this._state]
|
|
4347
4387
|
}, {
|
|
4348
4388
|
F: __dxlog_file15,
|
|
4349
|
-
L:
|
|
4389
|
+
L: 176,
|
|
4350
4390
|
S: this,
|
|
4351
4391
|
C: (f, a) => f(...a)
|
|
4352
4392
|
});
|
|
@@ -4405,7 +4445,7 @@ var DataSpace = class {
|
|
|
4405
4445
|
}
|
|
4406
4446
|
await this._inner.open(new Context6(void 0, {
|
|
4407
4447
|
F: __dxlog_file15,
|
|
4408
|
-
L:
|
|
4448
|
+
L: 250
|
|
4409
4449
|
}));
|
|
4410
4450
|
await this._inner.startProtocol();
|
|
4411
4451
|
await this._edgeFeedReplicator?.open();
|
|
@@ -4414,7 +4454,7 @@ var DataSpace = class {
|
|
|
4414
4454
|
state: SpaceState4[this._state]
|
|
4415
4455
|
}, {
|
|
4416
4456
|
F: __dxlog_file15,
|
|
4417
|
-
L:
|
|
4457
|
+
L: 256,
|
|
4418
4458
|
S: this,
|
|
4419
4459
|
C: (f, a) => f(...a)
|
|
4420
4460
|
});
|
|
@@ -4434,14 +4474,14 @@ var DataSpace = class {
|
|
|
4434
4474
|
state: SpaceState4[this._state]
|
|
4435
4475
|
}, {
|
|
4436
4476
|
F: __dxlog_file15,
|
|
4437
|
-
L:
|
|
4477
|
+
L: 275,
|
|
4438
4478
|
S: this,
|
|
4439
4479
|
C: (f, a) => f(...a)
|
|
4440
4480
|
});
|
|
4441
4481
|
await this._ctx.dispose();
|
|
4442
4482
|
this._ctx = new Context6(void 0, {
|
|
4443
4483
|
F: __dxlog_file15,
|
|
4444
|
-
L:
|
|
4484
|
+
L: 277
|
|
4445
4485
|
});
|
|
4446
4486
|
if (this._edgeFeedReplicator) {
|
|
4447
4487
|
this.inner.protocol.feedAdded.remove(this._onFeedAdded);
|
|
@@ -4474,7 +4514,7 @@ var DataSpace = class {
|
|
|
4474
4514
|
if (err instanceof CancelledError || err instanceof ContextDisposedError) {
|
|
4475
4515
|
log12("data pipeline initialization cancelled", err, {
|
|
4476
4516
|
F: __dxlog_file15,
|
|
4477
|
-
L:
|
|
4517
|
+
L: 315,
|
|
4478
4518
|
S: this,
|
|
4479
4519
|
C: (f, a) => f(...a)
|
|
4480
4520
|
});
|
|
@@ -4482,7 +4522,7 @@ var DataSpace = class {
|
|
|
4482
4522
|
}
|
|
4483
4523
|
log12.error("Error initializing data pipeline", err, {
|
|
4484
4524
|
F: __dxlog_file15,
|
|
4485
|
-
L:
|
|
4525
|
+
L: 319,
|
|
4486
4526
|
S: this,
|
|
4487
4527
|
C: (f, a) => f(...a)
|
|
4488
4528
|
});
|
|
@@ -4491,7 +4531,7 @@ var DataSpace = class {
|
|
|
4491
4531
|
state: SpaceState4[this._state]
|
|
4492
4532
|
}, {
|
|
4493
4533
|
F: __dxlog_file15,
|
|
4494
|
-
L:
|
|
4534
|
+
L: 321,
|
|
4495
4535
|
S: this,
|
|
4496
4536
|
C: (f, a) => f(...a)
|
|
4497
4537
|
});
|
|
@@ -4513,13 +4553,13 @@ var DataSpace = class {
|
|
|
4513
4553
|
state: SpaceState4[this._state]
|
|
4514
4554
|
}, {
|
|
4515
4555
|
F: __dxlog_file15,
|
|
4516
|
-
L:
|
|
4556
|
+
L: 337,
|
|
4517
4557
|
S: this,
|
|
4518
4558
|
C: (f, a) => f(...a)
|
|
4519
4559
|
});
|
|
4520
4560
|
log12("initializing control pipeline", void 0, {
|
|
4521
4561
|
F: __dxlog_file15,
|
|
4522
|
-
L:
|
|
4562
|
+
L: 339,
|
|
4523
4563
|
S: this,
|
|
4524
4564
|
C: (f, a) => f(...a)
|
|
4525
4565
|
});
|
|
@@ -4528,21 +4568,21 @@ var DataSpace = class {
|
|
|
4528
4568
|
const ready = this.stateUpdate.waitForCondition(() => this._state === SpaceState4.SPACE_READY);
|
|
4529
4569
|
log12("initializing automerge root", void 0, {
|
|
4530
4570
|
F: __dxlog_file15,
|
|
4531
|
-
L:
|
|
4571
|
+
L: 347,
|
|
4532
4572
|
S: this,
|
|
4533
4573
|
C: (f, a) => f(...a)
|
|
4534
4574
|
});
|
|
4535
4575
|
this._automergeSpaceState.startProcessingRootDocs();
|
|
4536
4576
|
log12("waiting for space to be ready", void 0, {
|
|
4537
4577
|
F: __dxlog_file15,
|
|
4538
|
-
L:
|
|
4578
|
+
L: 351,
|
|
4539
4579
|
S: this,
|
|
4540
4580
|
C: (f, a) => f(...a)
|
|
4541
4581
|
});
|
|
4542
4582
|
await ready;
|
|
4543
4583
|
log12("space is ready", void 0, {
|
|
4544
4584
|
F: __dxlog_file15,
|
|
4545
|
-
L:
|
|
4585
|
+
L: 353,
|
|
4546
4586
|
S: this,
|
|
4547
4587
|
C: (f, a) => f(...a)
|
|
4548
4588
|
});
|
|
@@ -4550,7 +4590,7 @@ var DataSpace = class {
|
|
|
4550
4590
|
async *getAllDocuments() {
|
|
4551
4591
|
invariant11(this._databaseRoot, "Space is not ready", {
|
|
4552
4592
|
F: __dxlog_file15,
|
|
4553
|
-
L:
|
|
4593
|
+
L: 357,
|
|
4554
4594
|
S: this,
|
|
4555
4595
|
A: [
|
|
4556
4596
|
"this._databaseRoot",
|
|
@@ -4566,7 +4606,7 @@ var DataSpace = class {
|
|
|
4566
4606
|
for (const documentUrl of this._databaseRoot.getAllLinkedDocuments()) {
|
|
4567
4607
|
const data = await this._echoHost.exportDoc(Context6.default(void 0, {
|
|
4568
4608
|
F: __dxlog_file15,
|
|
4569
|
-
L:
|
|
4609
|
+
L: 363
|
|
4570
4610
|
}), documentUrl);
|
|
4571
4611
|
yield [
|
|
4572
4612
|
documentUrl.replace(/^automerge:/, ""),
|
|
@@ -4581,7 +4621,7 @@ var DataSpace = class {
|
|
|
4581
4621
|
state: SpaceState4[this._state]
|
|
4582
4622
|
}, {
|
|
4583
4623
|
F: __dxlog_file15,
|
|
4584
|
-
L:
|
|
4624
|
+
L: 372,
|
|
4585
4625
|
S: this,
|
|
4586
4626
|
C: (f, a) => f(...a)
|
|
4587
4627
|
});
|
|
@@ -4598,7 +4638,7 @@ var DataSpace = class {
|
|
|
4598
4638
|
await this._createWritableFeeds();
|
|
4599
4639
|
log12("writable feeds created", void 0, {
|
|
4600
4640
|
F: __dxlog_file15,
|
|
4601
|
-
L:
|
|
4641
|
+
L: 389,
|
|
4602
4642
|
S: this,
|
|
4603
4643
|
C: (f, a) => f(...a)
|
|
4604
4644
|
});
|
|
@@ -4652,7 +4692,7 @@ var DataSpace = class {
|
|
|
4652
4692
|
count: credentials.length
|
|
4653
4693
|
}, {
|
|
4654
4694
|
F: __dxlog_file15,
|
|
4655
|
-
L:
|
|
4695
|
+
L: 447,
|
|
4656
4696
|
S: this,
|
|
4657
4697
|
C: (f, a) => f(...a)
|
|
4658
4698
|
});
|
|
@@ -4663,14 +4703,14 @@ var DataSpace = class {
|
|
|
4663
4703
|
});
|
|
4664
4704
|
log12("credentials notarized", void 0, {
|
|
4665
4705
|
F: __dxlog_file15,
|
|
4666
|
-
L:
|
|
4706
|
+
L: 451,
|
|
4667
4707
|
S: this,
|
|
4668
4708
|
C: (f, a) => f(...a)
|
|
4669
4709
|
});
|
|
4670
4710
|
} catch (err) {
|
|
4671
4711
|
log12.error("error notarizing credentials for feed admission", err, {
|
|
4672
4712
|
F: __dxlog_file15,
|
|
4673
|
-
L:
|
|
4713
|
+
L: 453,
|
|
4674
4714
|
S: this,
|
|
4675
4715
|
C: (f, a) => f(...a)
|
|
4676
4716
|
});
|
|
@@ -4685,7 +4725,7 @@ var DataSpace = class {
|
|
|
4685
4725
|
rootUrl
|
|
4686
4726
|
}, {
|
|
4687
4727
|
F: __dxlog_file15,
|
|
4688
|
-
L:
|
|
4728
|
+
L: 463,
|
|
4689
4729
|
S: this,
|
|
4690
4730
|
C: (f, a) => f(...a)
|
|
4691
4731
|
});
|
|
@@ -4699,7 +4739,12 @@ var DataSpace = class {
|
|
|
4699
4739
|
};
|
|
4700
4740
|
try {
|
|
4701
4741
|
await warnAfterTimeout(5e3, "Automerge root doc load timeout (DataSpace)", async () => {
|
|
4702
|
-
handle = await cancelWithContext2(this._ctx, this._echoHost.
|
|
4742
|
+
handle = await cancelWithContext2(this._ctx, this._echoHost.loadDoc(Context6.default(void 0, {
|
|
4743
|
+
F: __dxlog_file15,
|
|
4744
|
+
L: 473
|
|
4745
|
+
}), rootUrl, {
|
|
4746
|
+
fetchFromNetwork: true
|
|
4747
|
+
}));
|
|
4703
4748
|
await cancelWithContext2(this._ctx, handle.whenReady());
|
|
4704
4749
|
});
|
|
4705
4750
|
if (this._ctx.disposed) {
|
|
@@ -4740,7 +4785,7 @@ var DataSpace = class {
|
|
|
4740
4785
|
err
|
|
4741
4786
|
}, {
|
|
4742
4787
|
F: __dxlog_file15,
|
|
4743
|
-
L:
|
|
4788
|
+
L: 512,
|
|
4744
4789
|
S: this,
|
|
4745
4790
|
C: (f, a) => f(...a)
|
|
4746
4791
|
});
|
|
@@ -4830,7 +4875,7 @@ var DataSpace = class {
|
|
|
4830
4875
|
state: SpaceState4[this._state]
|
|
4831
4876
|
}, {
|
|
4832
4877
|
F: __dxlog_file15,
|
|
4833
|
-
L:
|
|
4878
|
+
L: 594,
|
|
4834
4879
|
S: this,
|
|
4835
4880
|
C: (f, a) => f(...a)
|
|
4836
4881
|
});
|
|
@@ -5921,14 +5966,14 @@ var MAX_DELEGATED_INVITATION_HOST_TRIES = 3;
|
|
|
5921
5966
|
var InvitationsHandler = class {
|
|
5922
5967
|
_networkManager;
|
|
5923
5968
|
_edgeClient;
|
|
5924
|
-
|
|
5969
|
+
_connectionProps;
|
|
5925
5970
|
/**
|
|
5926
5971
|
* @internal
|
|
5927
5972
|
*/
|
|
5928
|
-
constructor(_networkManager, _edgeClient,
|
|
5973
|
+
constructor(_networkManager, _edgeClient, _connectionProps) {
|
|
5929
5974
|
this._networkManager = _networkManager;
|
|
5930
5975
|
this._edgeClient = _edgeClient;
|
|
5931
|
-
this.
|
|
5976
|
+
this._connectionProps = _connectionProps;
|
|
5932
5977
|
}
|
|
5933
5978
|
handleInvitationFlow(ctx, stream, protocol, invitation) {
|
|
5934
5979
|
log18.verbose("dxos.sdk.invitations-handler.handleInvitationFlow", {
|
|
@@ -6372,7 +6417,7 @@ var InvitationsHandler = class {
|
|
|
6372
6417
|
});
|
|
6373
6418
|
return extension;
|
|
6374
6419
|
};
|
|
6375
|
-
const edgeInvitationHandler = new EdgeInvitationHandler(this.
|
|
6420
|
+
const edgeInvitationHandler = new EdgeInvitationHandler(this._connectionProps?.edgeInvitations, this._edgeClient, {
|
|
6376
6421
|
onInvitationSuccess: async (admissionResponse, admissionRequest) => {
|
|
6377
6422
|
const result = await protocol.accept(admissionResponse, admissionRequest);
|
|
6378
6423
|
log18.info("admitted by edge", {
|
|
@@ -6432,7 +6477,7 @@ var InvitationsHandler = class {
|
|
|
6432
6477
|
topic: invitation.swarmKey,
|
|
6433
6478
|
protocolProvider: createTeleportProtocolFactory(async (teleport) => {
|
|
6434
6479
|
teleport.addExtension("dxos.halo.invitations", extensionFactory());
|
|
6435
|
-
}, this.
|
|
6480
|
+
}, this._connectionProps?.teleport),
|
|
6436
6481
|
topology: new InvitationTopology(role),
|
|
6437
6482
|
label
|
|
6438
6483
|
});
|
|
@@ -7291,162 +7336,27 @@ var InvitationsManager = class {
|
|
|
7291
7336
|
}
|
|
7292
7337
|
};
|
|
7293
7338
|
|
|
7294
|
-
// src/packlets/locks/
|
|
7295
|
-
|
|
7296
|
-
|
|
7297
|
-
import
|
|
7298
|
-
function _ts_decorate7(decorators, target, key, desc) {
|
|
7299
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
7300
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
7301
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
7302
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7303
|
-
}
|
|
7304
|
-
var __dxlog_file25 = "/__w/dxos/dxos/packages/sdk/client-services/src/packlets/locks/node.ts";
|
|
7305
|
-
var Lock = class {
|
|
7306
|
-
_lockPath;
|
|
7307
|
-
_onAcquire;
|
|
7308
|
-
_onRelease;
|
|
7309
|
-
_fileHandle;
|
|
7310
|
-
constructor({ lockKey: lockPath, onAcquire, onRelease }) {
|
|
7311
|
-
this._lockPath = lockPath;
|
|
7312
|
-
this._onAcquire = onAcquire;
|
|
7313
|
-
this._onRelease = onRelease;
|
|
7314
|
-
}
|
|
7315
|
-
get lockKey() {
|
|
7316
|
-
return this._lockPath;
|
|
7317
|
-
}
|
|
7318
|
-
async acquire() {
|
|
7319
|
-
log21("acquiring lock...", void 0, {
|
|
7320
|
-
F: __dxlog_file25,
|
|
7321
|
-
L: 32,
|
|
7322
|
-
S: this,
|
|
7323
|
-
C: (f, a) => f(...a)
|
|
7324
|
-
});
|
|
7325
|
-
this._fileHandle = await LockFile.acquire(this._lockPath);
|
|
7326
|
-
await this._onAcquire?.();
|
|
7327
|
-
log21("acquired lock", void 0, {
|
|
7328
|
-
F: __dxlog_file25,
|
|
7329
|
-
L: 37,
|
|
7330
|
-
S: this,
|
|
7331
|
-
C: (f, a) => f(...a)
|
|
7332
|
-
});
|
|
7333
|
-
}
|
|
7334
|
-
async release() {
|
|
7335
|
-
await this._onRelease?.();
|
|
7336
|
-
invariant20(this._fileHandle, "Lock is not acquired", {
|
|
7337
|
-
F: __dxlog_file25,
|
|
7338
|
-
L: 42,
|
|
7339
|
-
S: this,
|
|
7340
|
-
A: [
|
|
7341
|
-
"this._fileHandle",
|
|
7342
|
-
"'Lock is not acquired'"
|
|
7343
|
-
]
|
|
7344
|
-
});
|
|
7345
|
-
await LockFile.release(this._fileHandle);
|
|
7346
|
-
}
|
|
7347
|
-
};
|
|
7348
|
-
_ts_decorate7([
|
|
7349
|
-
logInfo3
|
|
7350
|
-
], Lock.prototype, "lockKey", null);
|
|
7351
|
-
var isLocked = (lockPath) => LockFile.isLocked(lockPath);
|
|
7352
|
-
|
|
7353
|
-
// src/packlets/services/client-rpc-server.ts
|
|
7354
|
-
import { Stream as Stream10 } from "@dxos/codec-protobuf";
|
|
7355
|
-
import { raise as raise2 } from "@dxos/debug";
|
|
7356
|
-
import { RpcPeer, parseMethodName } from "@dxos/rpc";
|
|
7357
|
-
import { MapCounter, trace as trace9 } from "@dxos/tracing";
|
|
7358
|
-
function _ts_decorate8(decorators, target, key, desc) {
|
|
7359
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
7360
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
7361
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
7362
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7363
|
-
}
|
|
7364
|
-
var ClientRpcServer = class {
|
|
7365
|
-
_serviceRegistry;
|
|
7366
|
-
_rpcPeer;
|
|
7367
|
-
_handlerCache = /* @__PURE__ */ new Map();
|
|
7368
|
-
_handleCall;
|
|
7369
|
-
_handleStream;
|
|
7370
|
-
_callMetrics = new MapCounter();
|
|
7371
|
-
get _services() {
|
|
7372
|
-
return Object.keys(this._serviceRegistry.services);
|
|
7373
|
-
}
|
|
7374
|
-
constructor(params) {
|
|
7375
|
-
const { serviceRegistry, handleCall, handleStream, ...rpcOptions } = params;
|
|
7376
|
-
this._handleCall = handleCall;
|
|
7377
|
-
this._handleStream = handleStream;
|
|
7378
|
-
this._serviceRegistry = serviceRegistry;
|
|
7379
|
-
this._rpcPeer = new RpcPeer({
|
|
7380
|
-
...rpcOptions,
|
|
7381
|
-
callHandler: (method, params2) => {
|
|
7382
|
-
const [serviceName, methodName] = parseMethodName(method);
|
|
7383
|
-
const handler = (method2, params3) => this._getServiceHandler(serviceName).call(method2, params3);
|
|
7384
|
-
this._callMetrics.inc(`${serviceName}.${methodName} request`);
|
|
7385
|
-
if (this._handleCall) {
|
|
7386
|
-
return this._handleCall(methodName, params2, handler);
|
|
7387
|
-
} else {
|
|
7388
|
-
return handler(methodName, params2);
|
|
7389
|
-
}
|
|
7390
|
-
},
|
|
7391
|
-
streamHandler: (method, params2) => {
|
|
7392
|
-
const [serviceName, methodName] = parseMethodName(method);
|
|
7393
|
-
const handler = (method2, params3) => this._getServiceHandler(serviceName).callStream(method2, params3);
|
|
7394
|
-
this._callMetrics.inc(`${serviceName}.${methodName} request stream`);
|
|
7395
|
-
if (this._handleStream) {
|
|
7396
|
-
return Stream10.map(Stream10.unwrapPromise(this._handleStream(methodName, params2, handler)), (data) => {
|
|
7397
|
-
this._callMetrics.inc(`${serviceName}.${methodName} response stream`);
|
|
7398
|
-
return data;
|
|
7399
|
-
});
|
|
7400
|
-
} else {
|
|
7401
|
-
return handler(methodName, params2);
|
|
7402
|
-
}
|
|
7403
|
-
}
|
|
7404
|
-
});
|
|
7405
|
-
}
|
|
7406
|
-
async open() {
|
|
7407
|
-
await this._rpcPeer.open();
|
|
7408
|
-
}
|
|
7409
|
-
async close() {
|
|
7410
|
-
await this._rpcPeer.close();
|
|
7411
|
-
}
|
|
7412
|
-
_getServiceHandler(serviceName) {
|
|
7413
|
-
if (!this._handlerCache.has(serviceName)) {
|
|
7414
|
-
const [key, descriptor] = Object.entries(this._serviceRegistry.descriptors).find(([key2, descriptor2]) => descriptor2.name === serviceName) ?? raise2(new Error(`Service not available: ${serviceName}`));
|
|
7415
|
-
const service = this._serviceRegistry.services[key];
|
|
7416
|
-
if (!service) {
|
|
7417
|
-
throw new Error(`Service not available: ${serviceName}`);
|
|
7418
|
-
}
|
|
7419
|
-
this._handlerCache.set(serviceName, descriptor.createServer(service));
|
|
7420
|
-
}
|
|
7421
|
-
return this._handlerCache.get(serviceName);
|
|
7422
|
-
}
|
|
7423
|
-
};
|
|
7424
|
-
_ts_decorate8([
|
|
7425
|
-
trace9.metricsCounter()
|
|
7426
|
-
], ClientRpcServer.prototype, "_callMetrics", void 0);
|
|
7427
|
-
_ts_decorate8([
|
|
7428
|
-
trace9.info()
|
|
7429
|
-
], ClientRpcServer.prototype, "_services", null);
|
|
7430
|
-
ClientRpcServer = _ts_decorate8([
|
|
7431
|
-
trace9.resource()
|
|
7432
|
-
], ClientRpcServer);
|
|
7339
|
+
// src/packlets/locks/index.ts
|
|
7340
|
+
var locks_exports = {};
|
|
7341
|
+
__reExport(locks_exports, locks_platform_star);
|
|
7342
|
+
import * as locks_platform_star from "#locks-platform";
|
|
7433
7343
|
|
|
7434
7344
|
// src/packlets/agents/edge-agent-manager.ts
|
|
7435
7345
|
import { DeferredTask as DeferredTask2, Event as Event9, scheduleTask as scheduleTask8, synchronized as synchronized3 } from "@dxos/async";
|
|
7436
7346
|
import { Resource as Resource7 } from "@dxos/context";
|
|
7437
|
-
import { invariant as
|
|
7347
|
+
import { invariant as invariant20 } from "@dxos/invariant";
|
|
7438
7348
|
import { PublicKey as PublicKey13 } from "@dxos/keys";
|
|
7439
|
-
import { log as
|
|
7349
|
+
import { log as log21 } from "@dxos/log";
|
|
7440
7350
|
import { EdgeAgentStatus, EdgeCallFailedError as EdgeCallFailedError3 } from "@dxos/protocols";
|
|
7441
7351
|
import { SpaceState as SpaceState5 } from "@dxos/protocols/proto/dxos/client/services";
|
|
7442
7352
|
import { EdgeReplicationSetting as EdgeReplicationSetting2 } from "@dxos/protocols/proto/dxos/echo/metadata";
|
|
7443
|
-
function
|
|
7353
|
+
function _ts_decorate7(decorators, target, key, desc) {
|
|
7444
7354
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
7445
7355
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
7446
7356
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
7447
7357
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7448
7358
|
}
|
|
7449
|
-
var
|
|
7359
|
+
var __dxlog_file25 = "/__w/dxos/dxos/packages/sdk/client-services/src/packlets/agents/edge-agent-manager.ts";
|
|
7450
7360
|
var AGENT_STATUS_QUERY_RETRY_INTERVAL = 5e3;
|
|
7451
7361
|
var AGENT_STATUS_QUERY_RETRY_JITTER = 1e3;
|
|
7452
7362
|
var AGENT_FEED_ADDED_CHECK_INTERVAL_MS = 3e3;
|
|
@@ -7470,8 +7380,8 @@ var EdgeAgentManager = class extends Resource7 {
|
|
|
7470
7380
|
return this._agentStatus && this._agentStatus !== EdgeAgentStatus.NOT_FOUND;
|
|
7471
7381
|
}
|
|
7472
7382
|
async createAgent() {
|
|
7473
|
-
|
|
7474
|
-
F:
|
|
7383
|
+
invariant20(this.isOpen, void 0, {
|
|
7384
|
+
F: __dxlog_file25,
|
|
7475
7385
|
L: 54,
|
|
7476
7386
|
S: this,
|
|
7477
7387
|
A: [
|
|
@@ -7479,8 +7389,8 @@ var EdgeAgentManager = class extends Resource7 {
|
|
|
7479
7389
|
""
|
|
7480
7390
|
]
|
|
7481
7391
|
});
|
|
7482
|
-
|
|
7483
|
-
F:
|
|
7392
|
+
invariant20(this._edgeHttpClient, void 0, {
|
|
7393
|
+
F: __dxlog_file25,
|
|
7484
7394
|
L: 55,
|
|
7485
7395
|
S: this,
|
|
7486
7396
|
A: [
|
|
@@ -7488,8 +7398,8 @@ var EdgeAgentManager = class extends Resource7 {
|
|
|
7488
7398
|
""
|
|
7489
7399
|
]
|
|
7490
7400
|
});
|
|
7491
|
-
|
|
7492
|
-
F:
|
|
7401
|
+
invariant20(this._edgeFeatures?.agents, void 0, {
|
|
7402
|
+
F: __dxlog_file25,
|
|
7493
7403
|
L: 56,
|
|
7494
7404
|
S: this,
|
|
7495
7405
|
A: [
|
|
@@ -7504,10 +7414,10 @@ var EdgeAgentManager = class extends Resource7 {
|
|
|
7504
7414
|
});
|
|
7505
7415
|
const deviceKey = PublicKey13.fromHex(response.deviceKey);
|
|
7506
7416
|
if (await this._identity.authorizedDeviceKeys.has(deviceKey)) {
|
|
7507
|
-
|
|
7417
|
+
log21.info("agent was already added to HALO, ignoring response", {
|
|
7508
7418
|
response
|
|
7509
7419
|
}, {
|
|
7510
|
-
F:
|
|
7420
|
+
F: __dxlog_file25,
|
|
7511
7421
|
L: 67,
|
|
7512
7422
|
S: this,
|
|
7513
7423
|
C: (f, a) => f(...a)
|
|
@@ -7521,8 +7431,8 @@ var EdgeAgentManager = class extends Resource7 {
|
|
|
7521
7431
|
// TODO: agents don't have data feed, should be removed
|
|
7522
7432
|
dataFeedKey: PublicKey13.random()
|
|
7523
7433
|
});
|
|
7524
|
-
|
|
7525
|
-
F:
|
|
7434
|
+
log21("agent created", response, {
|
|
7435
|
+
F: __dxlog_file25,
|
|
7526
7436
|
L: 79,
|
|
7527
7437
|
S: this,
|
|
7528
7438
|
C: (f, a) => f(...a)
|
|
@@ -7531,10 +7441,10 @@ var EdgeAgentManager = class extends Resource7 {
|
|
|
7531
7441
|
}
|
|
7532
7442
|
async _open() {
|
|
7533
7443
|
const isEnabled = this._edgeHttpClient && this._edgeFeatures?.agents;
|
|
7534
|
-
|
|
7444
|
+
log21("edge agent manager open", {
|
|
7535
7445
|
isEnabled
|
|
7536
7446
|
}, {
|
|
7537
|
-
F:
|
|
7447
|
+
F: __dxlog_file25,
|
|
7538
7448
|
L: 87,
|
|
7539
7449
|
S: this,
|
|
7540
7450
|
C: (f, a) => f(...a)
|
|
@@ -7566,8 +7476,8 @@ var EdgeAgentManager = class extends Resource7 {
|
|
|
7566
7476
|
this._lastKnownDeviceCount = 0;
|
|
7567
7477
|
}
|
|
7568
7478
|
async _fetchAgentStatus() {
|
|
7569
|
-
|
|
7570
|
-
F:
|
|
7479
|
+
invariant20(this._edgeHttpClient, void 0, {
|
|
7480
|
+
F: __dxlog_file25,
|
|
7571
7481
|
L: 121,
|
|
7572
7482
|
S: this,
|
|
7573
7483
|
A: [
|
|
@@ -7576,8 +7486,8 @@ var EdgeAgentManager = class extends Resource7 {
|
|
|
7576
7486
|
]
|
|
7577
7487
|
});
|
|
7578
7488
|
try {
|
|
7579
|
-
|
|
7580
|
-
F:
|
|
7489
|
+
log21("fetching agent status", void 0, {
|
|
7490
|
+
F: __dxlog_file25,
|
|
7581
7491
|
L: 123,
|
|
7582
7492
|
S: this,
|
|
7583
7493
|
C: (f, a) => f(...a)
|
|
@@ -7593,10 +7503,10 @@ var EdgeAgentManager = class extends Resource7 {
|
|
|
7593
7503
|
} catch (err) {
|
|
7594
7504
|
if (err instanceof EdgeCallFailedError3) {
|
|
7595
7505
|
if (!err.isRetryable) {
|
|
7596
|
-
|
|
7506
|
+
log21.warn("non retryable error on agent status fetch attempt", {
|
|
7597
7507
|
err
|
|
7598
7508
|
}, {
|
|
7599
|
-
F:
|
|
7509
|
+
F: __dxlog_file25,
|
|
7600
7510
|
L: 133,
|
|
7601
7511
|
S: this,
|
|
7602
7512
|
C: (f, a) => f(...a)
|
|
@@ -7605,11 +7515,11 @@ var EdgeAgentManager = class extends Resource7 {
|
|
|
7605
7515
|
}
|
|
7606
7516
|
}
|
|
7607
7517
|
const retryAfterMs = AGENT_STATUS_QUERY_RETRY_INTERVAL + Math.random() * AGENT_STATUS_QUERY_RETRY_JITTER;
|
|
7608
|
-
|
|
7518
|
+
log21.info("agent status fetching failed", {
|
|
7609
7519
|
err,
|
|
7610
7520
|
retryAfterMs
|
|
7611
7521
|
}, {
|
|
7612
|
-
F:
|
|
7522
|
+
F: __dxlog_file25,
|
|
7613
7523
|
L: 138,
|
|
7614
7524
|
S: this,
|
|
7615
7525
|
C: (f, a) => f(...a)
|
|
@@ -7641,11 +7551,11 @@ var EdgeAgentManager = class extends Resource7 {
|
|
|
7641
7551
|
].some((feed) => feed.assertion.deviceKey.equals(agentDeviceKey));
|
|
7642
7552
|
space.notarizationPlugin.setActiveEdgePollingEnabled(agentFeedNeedsNotarization);
|
|
7643
7553
|
activePollingEnabled = activePollingEnabled || agentFeedNeedsNotarization;
|
|
7644
|
-
|
|
7554
|
+
log21.verbose("set active edge polling", {
|
|
7645
7555
|
enabled: agentFeedNeedsNotarization,
|
|
7646
7556
|
spaceId: space.id
|
|
7647
7557
|
}, {
|
|
7648
|
-
F:
|
|
7558
|
+
F: __dxlog_file25,
|
|
7649
7559
|
L: 165,
|
|
7650
7560
|
S: this,
|
|
7651
7561
|
C: (f, a) => f(...a)
|
|
@@ -7662,22 +7572,22 @@ var EdgeAgentManager = class extends Resource7 {
|
|
|
7662
7572
|
if (deviceKey) {
|
|
7663
7573
|
this._ensureAgentIsInSpaces(deviceKey);
|
|
7664
7574
|
}
|
|
7665
|
-
|
|
7575
|
+
log21.verbose("agent status update", {
|
|
7666
7576
|
status
|
|
7667
7577
|
}, {
|
|
7668
|
-
F:
|
|
7578
|
+
F: __dxlog_file25,
|
|
7669
7579
|
L: 181,
|
|
7670
7580
|
S: this,
|
|
7671
7581
|
C: (f, a) => f(...a)
|
|
7672
7582
|
});
|
|
7673
7583
|
}
|
|
7674
7584
|
};
|
|
7675
|
-
|
|
7585
|
+
_ts_decorate7([
|
|
7676
7586
|
synchronized3
|
|
7677
7587
|
], EdgeAgentManager.prototype, "createAgent", null);
|
|
7678
7588
|
|
|
7679
7589
|
// src/packlets/agents/edge-agent-service.ts
|
|
7680
|
-
import { Stream as
|
|
7590
|
+
import { Stream as Stream10 } from "@dxos/codec-protobuf/stream";
|
|
7681
7591
|
import { EdgeAgentStatus as EdgeAgentStatus2 } from "@dxos/protocols";
|
|
7682
7592
|
import { EdgeStatus as EdgeStatus2, QueryAgentStatusResponse } from "@dxos/protocols/proto/dxos/client/services";
|
|
7683
7593
|
var EdgeAgentServiceImpl = class {
|
|
@@ -7689,7 +7599,7 @@ var EdgeAgentServiceImpl = class {
|
|
|
7689
7599
|
}
|
|
7690
7600
|
// TODO(mykola): Reconcile with NetworkService.queryStatus.
|
|
7691
7601
|
queryEdgeStatus() {
|
|
7692
|
-
return new
|
|
7602
|
+
return new Stream10(({ ctx, next }) => {
|
|
7693
7603
|
const update = () => {
|
|
7694
7604
|
next({
|
|
7695
7605
|
status: this._edgeConnection?.status ?? {
|
|
@@ -7711,7 +7621,7 @@ var EdgeAgentServiceImpl = class {
|
|
|
7711
7621
|
return (await this._agentManagerProvider()).createAgent();
|
|
7712
7622
|
}
|
|
7713
7623
|
queryAgentStatus() {
|
|
7714
|
-
return new
|
|
7624
|
+
return new Stream10(({ ctx, next }) => {
|
|
7715
7625
|
next({
|
|
7716
7626
|
status: QueryAgentStatusResponse.AgentStatus.UNKNOWN
|
|
7717
7627
|
});
|
|
@@ -7749,11 +7659,11 @@ import { failUndefined as failUndefined2, warnAfterTimeout as warnAfterTimeout2
|
|
|
7749
7659
|
import { EchoEdgeReplicator, EchoHost, MeshEchoReplicator, MetadataStore, SpaceManager, valueEncoding } from "@dxos/echo-pipeline";
|
|
7750
7660
|
import { createChainEdgeIdentity, createEphemeralEdgeIdentity } from "@dxos/edge-client";
|
|
7751
7661
|
import { FeedFactory, FeedStore } from "@dxos/feed-store";
|
|
7752
|
-
import { invariant as
|
|
7662
|
+
import { invariant as invariant22 } from "@dxos/invariant";
|
|
7753
7663
|
import { Keyring } from "@dxos/keyring";
|
|
7754
7664
|
import { PublicKey as PublicKey15 } from "@dxos/keys";
|
|
7755
|
-
import { log as
|
|
7756
|
-
import { InvalidStorageVersionError, STORAGE_VERSION as STORAGE_VERSION2, trace as
|
|
7665
|
+
import { log as log23 } from "@dxos/log";
|
|
7666
|
+
import { InvalidStorageVersionError, STORAGE_VERSION as STORAGE_VERSION2, trace as trace9 } from "@dxos/protocols";
|
|
7757
7667
|
import { Invitation as Invitation10 } from "@dxos/protocols/proto/dxos/client/services";
|
|
7758
7668
|
import { BlobStore } from "@dxos/teleport-extension-object-sync";
|
|
7759
7669
|
import { trace as Trace3 } from "@dxos/tracing";
|
|
@@ -7762,13 +7672,13 @@ import { safeInstanceof } from "@dxos/util";
|
|
|
7762
7672
|
// src/packlets/identity/identity-recovery-manager.ts
|
|
7763
7673
|
import { generateSeedPhrase, keyPairFromSeedPhrase } from "@dxos/credentials";
|
|
7764
7674
|
import { sign as sign3 } from "@dxos/crypto";
|
|
7765
|
-
import { invariant as
|
|
7675
|
+
import { invariant as invariant21 } from "@dxos/invariant";
|
|
7766
7676
|
import { PublicKey as PublicKey14 } from "@dxos/keys";
|
|
7767
|
-
import { log as
|
|
7677
|
+
import { log as log22 } from "@dxos/log";
|
|
7768
7678
|
import { EdgeAuthChallengeError as EdgeAuthChallengeError2 } from "@dxos/protocols";
|
|
7769
7679
|
import { schema as schema6 } from "@dxos/protocols/proto";
|
|
7770
7680
|
import { Timeframe as Timeframe5 } from "@dxos/timeframe";
|
|
7771
|
-
var
|
|
7681
|
+
var __dxlog_file26 = "/__w/dxos/dxos/packages/sdk/client-services/src/packlets/identity/identity-recovery-manager.ts";
|
|
7772
7682
|
var EdgeIdentityRecoveryManager = class {
|
|
7773
7683
|
_keyring;
|
|
7774
7684
|
_edgeClient;
|
|
@@ -7782,8 +7692,8 @@ var EdgeIdentityRecoveryManager = class {
|
|
|
7782
7692
|
}
|
|
7783
7693
|
async createRecoveryCredential({ data }) {
|
|
7784
7694
|
const identity = this._identityProvider();
|
|
7785
|
-
|
|
7786
|
-
F:
|
|
7695
|
+
invariant21(identity, void 0, {
|
|
7696
|
+
F: __dxlog_file26,
|
|
7787
7697
|
L: 39,
|
|
7788
7698
|
S: this,
|
|
7789
7699
|
A: [
|
|
@@ -7833,8 +7743,8 @@ var EdgeIdentityRecoveryManager = class {
|
|
|
7833
7743
|
};
|
|
7834
7744
|
}
|
|
7835
7745
|
async requestRecoveryChallenge() {
|
|
7836
|
-
|
|
7837
|
-
F:
|
|
7746
|
+
invariant21(this._edgeClient, "Not connected to EDGE.", {
|
|
7747
|
+
F: __dxlog_file26,
|
|
7838
7748
|
L: 76,
|
|
7839
7749
|
S: this,
|
|
7840
7750
|
A: [
|
|
@@ -7863,8 +7773,8 @@ var EdgeIdentityRecoveryManager = class {
|
|
|
7863
7773
|
}
|
|
7864
7774
|
}
|
|
7865
7775
|
async recoverIdentityWithExternalSignature({ lookupKey, deviceKey, controlFeedKey, signature, clientDataJson, authenticatorData }) {
|
|
7866
|
-
|
|
7867
|
-
F:
|
|
7776
|
+
invariant21(this._edgeClient, "Not connected to EDGE.", {
|
|
7777
|
+
F: __dxlog_file26,
|
|
7868
7778
|
L: 108,
|
|
7869
7779
|
S: this,
|
|
7870
7780
|
A: [
|
|
@@ -7897,8 +7807,8 @@ var EdgeIdentityRecoveryManager = class {
|
|
|
7897
7807
|
* Recovery identity using an opaque token sent to the user's email.
|
|
7898
7808
|
*/
|
|
7899
7809
|
async recoverIdentityWithToken({ token }) {
|
|
7900
|
-
|
|
7901
|
-
F:
|
|
7810
|
+
invariant21(this._edgeClient, "Not connected to EDGE.", {
|
|
7811
|
+
F: __dxlog_file26,
|
|
7902
7812
|
L: 141,
|
|
7903
7813
|
S: this,
|
|
7904
7814
|
A: [
|
|
@@ -7925,8 +7835,8 @@ var EdgeIdentityRecoveryManager = class {
|
|
|
7925
7835
|
});
|
|
7926
7836
|
}
|
|
7927
7837
|
async recoverIdentity({ recoveryCode }) {
|
|
7928
|
-
|
|
7929
|
-
F:
|
|
7838
|
+
invariant21(this._edgeClient, "Not connected to EDGE.", {
|
|
7839
|
+
F: __dxlog_file26,
|
|
7930
7840
|
L: 165,
|
|
7931
7841
|
S: this,
|
|
7932
7842
|
A: [
|
|
@@ -7956,8 +7866,8 @@ var EdgeIdentityRecoveryManager = class {
|
|
|
7956
7866
|
signature: Buffer.from(signature).toString("base64")
|
|
7957
7867
|
});
|
|
7958
7868
|
}
|
|
7959
|
-
|
|
7960
|
-
F:
|
|
7869
|
+
log22.info("recovering identity", response, {
|
|
7870
|
+
F: __dxlog_file26,
|
|
7961
7871
|
L: 191,
|
|
7962
7872
|
S: this,
|
|
7963
7873
|
C: (f, a) => f(...a)
|
|
@@ -7980,7 +7890,7 @@ var decodeCredential = (credentialBase64) => {
|
|
|
7980
7890
|
};
|
|
7981
7891
|
|
|
7982
7892
|
// src/packlets/services/service-context.ts
|
|
7983
|
-
function
|
|
7893
|
+
function _ts_decorate8(decorators, target, key, desc) {
|
|
7984
7894
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
7985
7895
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
7986
7896
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
@@ -8051,7 +7961,7 @@ function _ts_dispose_resources4(env) {
|
|
|
8051
7961
|
return next();
|
|
8052
7962
|
})(env);
|
|
8053
7963
|
}
|
|
8054
|
-
var
|
|
7964
|
+
var __dxlog_file27 = "/__w/dxos/dxos/packages/sdk/client-services/src/packlets/services/service-context.ts";
|
|
8055
7965
|
var ServiceContext = class extends Resource8 {
|
|
8056
7966
|
storage;
|
|
8057
7967
|
level;
|
|
@@ -8059,7 +7969,8 @@ var ServiceContext = class extends Resource8 {
|
|
|
8059
7969
|
signalManager;
|
|
8060
7970
|
_edgeConnection;
|
|
8061
7971
|
_edgeHttpClient;
|
|
8062
|
-
|
|
7972
|
+
_runtime;
|
|
7973
|
+
_runtimeProps;
|
|
8063
7974
|
_edgeFeatures;
|
|
8064
7975
|
_edgeIdentityUpdateMutex = new Mutex4();
|
|
8065
7976
|
initialized = new Trigger7();
|
|
@@ -8081,8 +7992,20 @@ var ServiceContext = class extends Resource8 {
|
|
|
8081
7992
|
_handlerFactories = /* @__PURE__ */ new Map();
|
|
8082
7993
|
_deviceSpaceSync;
|
|
8083
7994
|
_instanceId = PublicKey15.random().toHex();
|
|
8084
|
-
constructor(storage, level, networkManager, signalManager, _edgeConnection, _edgeHttpClient,
|
|
8085
|
-
super(), this.storage = storage, this.level = level, this.networkManager = networkManager, this.signalManager = signalManager, this._edgeConnection = _edgeConnection, this._edgeHttpClient = _edgeHttpClient, this.
|
|
7995
|
+
constructor(storage, level, networkManager, signalManager, _edgeConnection, _edgeHttpClient, _runtime, _runtimeProps, _edgeFeatures) {
|
|
7996
|
+
super(), this.storage = storage, this.level = level, this.networkManager = networkManager, this.signalManager = signalManager, this._edgeConnection = _edgeConnection, this._edgeHttpClient = _edgeHttpClient, this._runtime = _runtime, this._runtimeProps = _runtimeProps, this._edgeFeatures = _edgeFeatures;
|
|
7997
|
+
log23("runtimeProps", this._runtimeProps, {
|
|
7998
|
+
F: __dxlog_file27,
|
|
7999
|
+
L: 120,
|
|
8000
|
+
S: this,
|
|
8001
|
+
C: (f, a) => f(...a)
|
|
8002
|
+
});
|
|
8003
|
+
log23("edgeFeatures", this._edgeFeatures, {
|
|
8004
|
+
F: __dxlog_file27,
|
|
8005
|
+
L: 121,
|
|
8006
|
+
S: this,
|
|
8007
|
+
C: (f, a) => f(...a)
|
|
8008
|
+
});
|
|
8086
8009
|
this.metadataStore = new MetadataStore(storage.createDirectory("metadata"));
|
|
8087
8010
|
this.blobStore = new BlobStore(storage.createDirectory("blobs"));
|
|
8088
8011
|
this.keyring = new Keyring(storage.createDirectory("keyring"));
|
|
@@ -8101,15 +8024,15 @@ var ServiceContext = class extends Resource8 {
|
|
|
8101
8024
|
networkManager: this.networkManager,
|
|
8102
8025
|
blobStore: this.blobStore,
|
|
8103
8026
|
metadataStore: this.metadataStore,
|
|
8104
|
-
disableP2pReplication: this.
|
|
8027
|
+
disableP2pReplication: this._runtimeProps?.disableP2pReplication
|
|
8105
8028
|
});
|
|
8106
8029
|
this.identityManager = new IdentityManager({
|
|
8107
8030
|
metadataStore: this.metadataStore,
|
|
8108
8031
|
keyring: this.keyring,
|
|
8109
8032
|
feedStore: this.feedStore,
|
|
8110
8033
|
spaceManager: this.spaceManager,
|
|
8111
|
-
devicePresenceOfflineTimeout: this.
|
|
8112
|
-
devicePresenceAnnounceInterval: this.
|
|
8034
|
+
devicePresenceOfflineTimeout: this._runtimeProps?.devicePresenceOfflineTimeout,
|
|
8035
|
+
devicePresenceAnnounceInterval: this._runtimeProps?.devicePresenceAnnounceInterval,
|
|
8113
8036
|
edgeConnection: this._edgeConnection,
|
|
8114
8037
|
edgeFeatures: this._edgeFeatures
|
|
8115
8038
|
});
|
|
@@ -8119,14 +8042,16 @@ var ServiceContext = class extends Resource8 {
|
|
|
8119
8042
|
peerIdProvider: () => this.identityManager.identity?.deviceKey?.toHex(),
|
|
8120
8043
|
getSpaceKeyByRootDocumentId: (documentId) => this.spaceManager.findSpaceByRootDocumentId(documentId)?.key,
|
|
8121
8044
|
indexing: {
|
|
8122
|
-
vector: this.
|
|
8123
|
-
|
|
8045
|
+
vector: this._runtimeProps?.enableVectorIndexing,
|
|
8046
|
+
sqlIndex: this._runtimeProps?.enableSqlite
|
|
8047
|
+
},
|
|
8048
|
+
runtime: this._runtime,
|
|
8049
|
+
localQueues: this._runtimeProps?.enableLocalQueues
|
|
8124
8050
|
});
|
|
8125
|
-
this.
|
|
8126
|
-
this.invitations = new InvitationsHandler(this.networkManager, this._edgeHttpClient, _runtimeParams?.invitationConnectionDefaultParams);
|
|
8051
|
+
this.invitations = new InvitationsHandler(this.networkManager, this._edgeHttpClient, _runtimeProps?.invitationConnectionDefaultProps);
|
|
8127
8052
|
this.invitationsManager = new InvitationsManager(this.invitations, (invitation) => this.getInvitationHandler(invitation), this.metadataStore);
|
|
8128
8053
|
this._handlerFactories.set(Invitation10.Kind.DEVICE, () => new DeviceInvitationProtocol(this.keyring, () => this.identityManager.identity ?? failUndefined2(), this._acceptIdentity.bind(this)));
|
|
8129
|
-
if (!this.
|
|
8054
|
+
if (!this._runtimeProps?.disableP2pReplication) {
|
|
8130
8055
|
this._meshReplicator = new MeshEchoReplicator();
|
|
8131
8056
|
}
|
|
8132
8057
|
if (this._edgeConnection && this._edgeFeatures?.echoReplicator && this._edgeHttpClient) {
|
|
@@ -8138,17 +8063,17 @@ var ServiceContext = class extends Resource8 {
|
|
|
8138
8063
|
}
|
|
8139
8064
|
async _open(ctx) {
|
|
8140
8065
|
await this._checkStorageVersion();
|
|
8141
|
-
|
|
8142
|
-
F:
|
|
8143
|
-
L:
|
|
8066
|
+
log23("opening...", void 0, {
|
|
8067
|
+
F: __dxlog_file27,
|
|
8068
|
+
L: 215,
|
|
8144
8069
|
S: this,
|
|
8145
8070
|
C: (f, a) => f(...a)
|
|
8146
8071
|
});
|
|
8147
|
-
|
|
8072
|
+
log23.trace("dxos.sdk.service-context.open", trace9.begin({
|
|
8148
8073
|
id: this._instanceId
|
|
8149
8074
|
}), {
|
|
8150
|
-
F:
|
|
8151
|
-
L:
|
|
8075
|
+
F: __dxlog_file27,
|
|
8076
|
+
L: 216,
|
|
8152
8077
|
S: this,
|
|
8153
8078
|
C: (f, a) => f(...a)
|
|
8154
8079
|
});
|
|
@@ -8171,33 +8096,33 @@ var ServiceContext = class extends Resource8 {
|
|
|
8171
8096
|
await this._initialize(ctx);
|
|
8172
8097
|
}
|
|
8173
8098
|
const loadedInvitations = await this.invitationsManager.loadPersistentInvitations();
|
|
8174
|
-
|
|
8099
|
+
log23("loaded persistent invitations", {
|
|
8175
8100
|
count: loadedInvitations.invitations?.length
|
|
8176
8101
|
}, {
|
|
8177
|
-
F:
|
|
8178
|
-
L:
|
|
8102
|
+
F: __dxlog_file27,
|
|
8103
|
+
L: 244,
|
|
8179
8104
|
S: this,
|
|
8180
8105
|
C: (f, a) => f(...a)
|
|
8181
8106
|
});
|
|
8182
|
-
|
|
8107
|
+
log23.trace("dxos.sdk.service-context.open", trace9.end({
|
|
8183
8108
|
id: this._instanceId
|
|
8184
8109
|
}), {
|
|
8185
|
-
F:
|
|
8186
|
-
L:
|
|
8110
|
+
F: __dxlog_file27,
|
|
8111
|
+
L: 246,
|
|
8187
8112
|
S: this,
|
|
8188
8113
|
C: (f, a) => f(...a)
|
|
8189
8114
|
});
|
|
8190
|
-
|
|
8191
|
-
F:
|
|
8192
|
-
L:
|
|
8115
|
+
log23("opened", void 0, {
|
|
8116
|
+
F: __dxlog_file27,
|
|
8117
|
+
L: 247,
|
|
8193
8118
|
S: this,
|
|
8194
8119
|
C: (f, a) => f(...a)
|
|
8195
8120
|
});
|
|
8196
8121
|
}
|
|
8197
8122
|
async _close(ctx) {
|
|
8198
|
-
|
|
8199
|
-
F:
|
|
8200
|
-
L:
|
|
8123
|
+
log23("closing...", void 0, {
|
|
8124
|
+
F: __dxlog_file27,
|
|
8125
|
+
L: 251,
|
|
8201
8126
|
S: this,
|
|
8202
8127
|
C: (f, a) => f(...a)
|
|
8203
8128
|
});
|
|
@@ -8214,9 +8139,9 @@ var ServiceContext = class extends Resource8 {
|
|
|
8214
8139
|
await this._edgeConnection?.close();
|
|
8215
8140
|
await this.feedStore.close();
|
|
8216
8141
|
await this.metadataStore.close();
|
|
8217
|
-
|
|
8218
|
-
F:
|
|
8219
|
-
L:
|
|
8142
|
+
log23("closed", void 0, {
|
|
8143
|
+
F: __dxlog_file27,
|
|
8144
|
+
L: 267,
|
|
8220
8145
|
S: this,
|
|
8221
8146
|
C: (f, a) => f(...a)
|
|
8222
8147
|
});
|
|
@@ -8226,8 +8151,8 @@ var ServiceContext = class extends Resource8 {
|
|
|
8226
8151
|
await this._setNetworkIdentity();
|
|
8227
8152
|
await identity.joinNetwork();
|
|
8228
8153
|
await this._initialize(new Context10(void 0, {
|
|
8229
|
-
F:
|
|
8230
|
-
L:
|
|
8154
|
+
F: __dxlog_file27,
|
|
8155
|
+
L: 274
|
|
8231
8156
|
}));
|
|
8232
8157
|
return identity;
|
|
8233
8158
|
}
|
|
@@ -8236,9 +8161,9 @@ var ServiceContext = class extends Resource8 {
|
|
|
8236
8161
|
throw new Error("Identity must be created before joining a space.");
|
|
8237
8162
|
}
|
|
8238
8163
|
const factory = this._handlerFactories.get(invitation.kind);
|
|
8239
|
-
|
|
8240
|
-
F:
|
|
8241
|
-
L:
|
|
8164
|
+
invariant22(factory, `Unknown invitation kind: ${invitation.kind}`, {
|
|
8165
|
+
F: __dxlog_file27,
|
|
8166
|
+
L: 283,
|
|
8242
8167
|
S: this,
|
|
8243
8168
|
A: [
|
|
8244
8169
|
"factory",
|
|
@@ -8263,8 +8188,8 @@ var ServiceContext = class extends Resource8 {
|
|
|
8263
8188
|
await identity.joinNetwork();
|
|
8264
8189
|
await this.identityManager.acceptIdentity(identity, identityRecord, params.deviceProfile);
|
|
8265
8190
|
await this._initialize(new Context10(void 0, {
|
|
8266
|
-
F:
|
|
8267
|
-
L:
|
|
8191
|
+
F: __dxlog_file27,
|
|
8192
|
+
L: 302
|
|
8268
8193
|
}));
|
|
8269
8194
|
return identity;
|
|
8270
8195
|
}
|
|
@@ -8276,9 +8201,9 @@ var ServiceContext = class extends Resource8 {
|
|
|
8276
8201
|
}
|
|
8277
8202
|
// Called when identity is created.
|
|
8278
8203
|
async _initialize(ctx) {
|
|
8279
|
-
|
|
8280
|
-
F:
|
|
8281
|
-
L:
|
|
8204
|
+
log23("initializing spaces...", void 0, {
|
|
8205
|
+
F: __dxlog_file27,
|
|
8206
|
+
L: 317,
|
|
8282
8207
|
S: this,
|
|
8283
8208
|
C: (f, a) => f(...a)
|
|
8284
8209
|
});
|
|
@@ -8308,16 +8233,16 @@ var ServiceContext = class extends Resource8 {
|
|
|
8308
8233
|
edgeHttpClient: this._edgeHttpClient,
|
|
8309
8234
|
echoEdgeReplicator: this._echoEdgeReplicator,
|
|
8310
8235
|
meshReplicator: this._meshReplicator,
|
|
8311
|
-
|
|
8236
|
+
runtimeProps: this._runtimeProps,
|
|
8312
8237
|
edgeFeatures: this._edgeFeatures
|
|
8313
8238
|
});
|
|
8314
8239
|
await this.dataSpaceManager.open();
|
|
8315
8240
|
this.edgeAgentManager = new EdgeAgentManager(this._edgeFeatures, this._edgeHttpClient, this.dataSpaceManager, identity);
|
|
8316
8241
|
await this.edgeAgentManager.open();
|
|
8317
8242
|
this._handlerFactories.set(Invitation10.Kind.SPACE, (invitation) => {
|
|
8318
|
-
|
|
8319
|
-
F:
|
|
8320
|
-
L:
|
|
8243
|
+
invariant22(this.dataSpaceManager, "dataSpaceManager not initialized yet", {
|
|
8244
|
+
F: __dxlog_file27,
|
|
8245
|
+
L: 355,
|
|
8321
8246
|
S: this,
|
|
8322
8247
|
A: [
|
|
8323
8248
|
"this.dataSpaceManager",
|
|
@@ -8337,33 +8262,33 @@ var ServiceContext = class extends Resource8 {
|
|
|
8337
8262
|
return;
|
|
8338
8263
|
}
|
|
8339
8264
|
if (!this.dataSpaceManager) {
|
|
8340
|
-
|
|
8265
|
+
log23("dataSpaceManager not initialized yet, ignoring space admission", {
|
|
8341
8266
|
details: assertion
|
|
8342
8267
|
}, {
|
|
8343
|
-
F:
|
|
8344
|
-
L:
|
|
8268
|
+
F: __dxlog_file27,
|
|
8269
|
+
L: 371,
|
|
8345
8270
|
S: this,
|
|
8346
8271
|
C: (f, a) => f(...a)
|
|
8347
8272
|
});
|
|
8348
8273
|
return;
|
|
8349
8274
|
}
|
|
8350
8275
|
if (this.dataSpaceManager.spaces.has(assertion.spaceKey)) {
|
|
8351
|
-
|
|
8276
|
+
log23("space already exists, ignoring space admission", {
|
|
8352
8277
|
details: assertion
|
|
8353
8278
|
}, {
|
|
8354
|
-
F:
|
|
8355
|
-
L:
|
|
8279
|
+
F: __dxlog_file27,
|
|
8280
|
+
L: 375,
|
|
8356
8281
|
S: this,
|
|
8357
8282
|
C: (f, a) => f(...a)
|
|
8358
8283
|
});
|
|
8359
8284
|
return;
|
|
8360
8285
|
}
|
|
8361
8286
|
try {
|
|
8362
|
-
|
|
8287
|
+
log23("accepting space recorded in halo", {
|
|
8363
8288
|
details: assertion
|
|
8364
8289
|
}, {
|
|
8365
|
-
F:
|
|
8366
|
-
L:
|
|
8290
|
+
F: __dxlog_file27,
|
|
8291
|
+
L: 380,
|
|
8367
8292
|
S: this,
|
|
8368
8293
|
C: (f, a) => f(...a)
|
|
8369
8294
|
});
|
|
@@ -8372,9 +8297,9 @@ var ServiceContext = class extends Resource8 {
|
|
|
8372
8297
|
genesisFeedKey: assertion.genesisFeedKey
|
|
8373
8298
|
});
|
|
8374
8299
|
} catch (err) {
|
|
8375
|
-
|
|
8376
|
-
F:
|
|
8377
|
-
L:
|
|
8300
|
+
log23.catch(err, void 0, {
|
|
8301
|
+
F: __dxlog_file27,
|
|
8302
|
+
L: 386,
|
|
8378
8303
|
S: this,
|
|
8379
8304
|
C: (f, a) => f(...a)
|
|
8380
8305
|
});
|
|
@@ -8394,12 +8319,12 @@ var ServiceContext = class extends Resource8 {
|
|
|
8394
8319
|
let edgeIdentity;
|
|
8395
8320
|
const identity = this.identityManager.identity;
|
|
8396
8321
|
if (identity) {
|
|
8397
|
-
|
|
8322
|
+
log23("setting identity on edge connection", {
|
|
8398
8323
|
identity: identity.identityKey.toHex(),
|
|
8399
8324
|
swarms: this.networkManager.topics
|
|
8400
8325
|
}, {
|
|
8401
|
-
F:
|
|
8402
|
-
L:
|
|
8326
|
+
F: __dxlog_file27,
|
|
8327
|
+
L: 400,
|
|
8403
8328
|
S: this,
|
|
8404
8329
|
C: (f, a) => f(...a)
|
|
8405
8330
|
});
|
|
@@ -8411,9 +8336,9 @@ var ServiceContext = class extends Resource8 {
|
|
|
8411
8336
|
await warnAfterTimeout2(1e4, "Waiting for identity to be ready for edge connection", async () => {
|
|
8412
8337
|
await identity.ready();
|
|
8413
8338
|
});
|
|
8414
|
-
|
|
8415
|
-
F:
|
|
8416
|
-
L:
|
|
8339
|
+
invariant22(identity.deviceCredentialChain, void 0, {
|
|
8340
|
+
F: __dxlog_file27,
|
|
8341
|
+
L: 419,
|
|
8417
8342
|
S: this,
|
|
8418
8343
|
A: [
|
|
8419
8344
|
"identity.deviceCredentialChain",
|
|
@@ -8439,13 +8364,13 @@ var ServiceContext = class extends Resource8 {
|
|
|
8439
8364
|
}
|
|
8440
8365
|
}
|
|
8441
8366
|
};
|
|
8442
|
-
|
|
8367
|
+
_ts_decorate8([
|
|
8443
8368
|
Trace3.span()
|
|
8444
8369
|
], ServiceContext.prototype, "_open", null);
|
|
8445
|
-
|
|
8370
|
+
_ts_decorate8([
|
|
8446
8371
|
Trace3.span()
|
|
8447
8372
|
], ServiceContext.prototype, "_initialize", null);
|
|
8448
|
-
ServiceContext =
|
|
8373
|
+
ServiceContext = _ts_decorate8([
|
|
8449
8374
|
safeInstanceof("dxos.client-services.ServiceContext"),
|
|
8450
8375
|
Trace3.resource()
|
|
8451
8376
|
], ServiceContext);
|
|
@@ -8532,165 +8457,6 @@ var createLevel = async (config) => {
|
|
|
8532
8457
|
return level;
|
|
8533
8458
|
};
|
|
8534
8459
|
|
|
8535
|
-
// src/packlets/storage/profile-archive.ts
|
|
8536
|
-
import { cbor } from "@automerge/automerge-repo";
|
|
8537
|
-
import { invariant as invariant24 } from "@dxos/invariant";
|
|
8538
|
-
import { log as log25 } from "@dxos/log";
|
|
8539
|
-
import { ProfileArchiveEntryType } from "@dxos/protocols";
|
|
8540
|
-
import { arrayToBuffer as arrayToBuffer2 } from "@dxos/util";
|
|
8541
|
-
var __dxlog_file29 = "/__w/dxos/dxos/packages/sdk/client-services/src/packlets/storage/profile-archive.ts";
|
|
8542
|
-
var encodeProfileArchive = (profile) => cbor.encode(profile);
|
|
8543
|
-
var decodeProfileArchive = (data) => cbor.decode(data);
|
|
8544
|
-
var exportProfileData = async ({ storage, level }) => {
|
|
8545
|
-
const archive = {
|
|
8546
|
-
storage: [],
|
|
8547
|
-
meta: {
|
|
8548
|
-
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
8549
|
-
}
|
|
8550
|
-
};
|
|
8551
|
-
{
|
|
8552
|
-
const directory = await storage.createDirectory();
|
|
8553
|
-
const files = await directory.list();
|
|
8554
|
-
log25.info("begin exporting files", {
|
|
8555
|
-
count: files.length
|
|
8556
|
-
}, {
|
|
8557
|
-
F: __dxlog_file29,
|
|
8558
|
-
L: 31,
|
|
8559
|
-
S: void 0,
|
|
8560
|
-
C: (f, a) => f(...a)
|
|
8561
|
-
});
|
|
8562
|
-
for (const filename of files) {
|
|
8563
|
-
const file = await directory.getOrCreateFile(filename);
|
|
8564
|
-
const { size } = await file.stat();
|
|
8565
|
-
const data = await file.read(0, size);
|
|
8566
|
-
archive.storage.push({
|
|
8567
|
-
type: ProfileArchiveEntryType.FILE,
|
|
8568
|
-
key: filename,
|
|
8569
|
-
value: data
|
|
8570
|
-
});
|
|
8571
|
-
}
|
|
8572
|
-
log25.info("done exporting files", {
|
|
8573
|
-
count: files.length
|
|
8574
|
-
}, {
|
|
8575
|
-
F: __dxlog_file29,
|
|
8576
|
-
L: 42,
|
|
8577
|
-
S: void 0,
|
|
8578
|
-
C: (f, a) => f(...a)
|
|
8579
|
-
});
|
|
8580
|
-
}
|
|
8581
|
-
{
|
|
8582
|
-
log25.info("begin exporting kv pairs", void 0, {
|
|
8583
|
-
F: __dxlog_file29,
|
|
8584
|
-
L: 46,
|
|
8585
|
-
S: void 0,
|
|
8586
|
-
C: (f, a) => f(...a)
|
|
8587
|
-
});
|
|
8588
|
-
const iter = await level.iterator({
|
|
8589
|
-
keyEncoding: "binary",
|
|
8590
|
-
valueEncoding: "binary"
|
|
8591
|
-
});
|
|
8592
|
-
let count = 0;
|
|
8593
|
-
for await (const [key, value] of iter) {
|
|
8594
|
-
archive.storage.push({
|
|
8595
|
-
type: ProfileArchiveEntryType.KEY_VALUE,
|
|
8596
|
-
key,
|
|
8597
|
-
value
|
|
8598
|
-
});
|
|
8599
|
-
count++;
|
|
8600
|
-
}
|
|
8601
|
-
log25.info("done exporting kv pairs", {
|
|
8602
|
-
count
|
|
8603
|
-
}, {
|
|
8604
|
-
F: __dxlog_file29,
|
|
8605
|
-
L: 57,
|
|
8606
|
-
S: void 0,
|
|
8607
|
-
C: (f, a) => f(...a)
|
|
8608
|
-
});
|
|
8609
|
-
}
|
|
8610
|
-
return archive;
|
|
8611
|
-
};
|
|
8612
|
-
var importProfileData = async ({ storage, level }, archive) => {
|
|
8613
|
-
let batch = level.batch();
|
|
8614
|
-
let count = 0;
|
|
8615
|
-
for (const entry2 of archive.storage) {
|
|
8616
|
-
switch (entry2.type) {
|
|
8617
|
-
case ProfileArchiveEntryType.FILE: {
|
|
8618
|
-
const directory = await storage.createDirectory();
|
|
8619
|
-
invariant24(typeof entry2.key === "string", "Invalid key type", {
|
|
8620
|
-
F: __dxlog_file29,
|
|
8621
|
-
L: 80,
|
|
8622
|
-
S: void 0,
|
|
8623
|
-
A: [
|
|
8624
|
-
"typeof entry.key === 'string'",
|
|
8625
|
-
"'Invalid key type'"
|
|
8626
|
-
]
|
|
8627
|
-
});
|
|
8628
|
-
const file = await directory.getOrCreateFile(entry2.key);
|
|
8629
|
-
invariant24(entry2.value instanceof Uint8Array, "Invalid value type", {
|
|
8630
|
-
F: __dxlog_file29,
|
|
8631
|
-
L: 82,
|
|
8632
|
-
S: void 0,
|
|
8633
|
-
A: [
|
|
8634
|
-
"entry.value instanceof Uint8Array",
|
|
8635
|
-
"'Invalid value type'"
|
|
8636
|
-
]
|
|
8637
|
-
});
|
|
8638
|
-
await file.write(0, arrayToBuffer2(entry2.value));
|
|
8639
|
-
await file.close();
|
|
8640
|
-
break;
|
|
8641
|
-
}
|
|
8642
|
-
case ProfileArchiveEntryType.KEY_VALUE: {
|
|
8643
|
-
invariant24(entry2.key instanceof Uint8Array, "Invalid key type", {
|
|
8644
|
-
F: __dxlog_file29,
|
|
8645
|
-
L: 88,
|
|
8646
|
-
S: void 0,
|
|
8647
|
-
A: [
|
|
8648
|
-
"entry.key instanceof Uint8Array",
|
|
8649
|
-
"'Invalid key type'"
|
|
8650
|
-
]
|
|
8651
|
-
});
|
|
8652
|
-
invariant24(entry2.value instanceof Uint8Array, "Invalid value type", {
|
|
8653
|
-
F: __dxlog_file29,
|
|
8654
|
-
L: 89,
|
|
8655
|
-
S: void 0,
|
|
8656
|
-
A: [
|
|
8657
|
-
"entry.value instanceof Uint8Array",
|
|
8658
|
-
"'Invalid value type'"
|
|
8659
|
-
]
|
|
8660
|
-
});
|
|
8661
|
-
batch.put(entry2.key, entry2.value, {
|
|
8662
|
-
keyEncoding: "binary",
|
|
8663
|
-
valueEncoding: "binary"
|
|
8664
|
-
});
|
|
8665
|
-
break;
|
|
8666
|
-
}
|
|
8667
|
-
default:
|
|
8668
|
-
throw new Error(`Invalid entry type: ${entry2.type}`);
|
|
8669
|
-
}
|
|
8670
|
-
if (++count % 1e3 === 0) {
|
|
8671
|
-
await batch.write();
|
|
8672
|
-
batch = level.batch();
|
|
8673
|
-
log25.info("importing", {
|
|
8674
|
-
count,
|
|
8675
|
-
total: archive.storage.length,
|
|
8676
|
-
progress: `${(count / archive.storage.length * 100).toFixed()}%`
|
|
8677
|
-
}, {
|
|
8678
|
-
F: __dxlog_file29,
|
|
8679
|
-
L: 102,
|
|
8680
|
-
S: void 0,
|
|
8681
|
-
C: (f, a) => f(...a)
|
|
8682
|
-
});
|
|
8683
|
-
}
|
|
8684
|
-
}
|
|
8685
|
-
log25.info("committing changes..", void 0, {
|
|
8686
|
-
F: __dxlog_file29,
|
|
8687
|
-
L: 110,
|
|
8688
|
-
S: void 0,
|
|
8689
|
-
C: (f, a) => f(...a)
|
|
8690
|
-
});
|
|
8691
|
-
await batch.write();
|
|
8692
|
-
};
|
|
8693
|
-
|
|
8694
8460
|
// src/packlets/services/service-registry.ts
|
|
8695
8461
|
var ServiceRegistry = class {
|
|
8696
8462
|
_serviceBundle;
|
|
@@ -8718,26 +8484,30 @@ var ServiceRegistry = class {
|
|
|
8718
8484
|
};
|
|
8719
8485
|
|
|
8720
8486
|
// src/packlets/services/service-host.ts
|
|
8487
|
+
import * as SqlClient from "@effect/sql/SqlClient";
|
|
8488
|
+
import * as Effect from "effect/Effect";
|
|
8721
8489
|
import { Event as Event11, synchronized as synchronized4 } from "@dxos/async";
|
|
8722
8490
|
import { clientServiceBundle } from "@dxos/client-protocol";
|
|
8723
8491
|
import { Context as Context11 } from "@dxos/context";
|
|
8724
8492
|
import { EdgeClient, EdgeHttpClient, createStubEdgeIdentity } from "@dxos/edge-client";
|
|
8725
|
-
import {
|
|
8493
|
+
import { RuntimeProvider } from "@dxos/effect";
|
|
8494
|
+
import { invariant as invariant24 } from "@dxos/invariant";
|
|
8726
8495
|
import { PublicKey as PublicKey19 } from "@dxos/keys";
|
|
8727
|
-
import { log as
|
|
8496
|
+
import { log as log25 } from "@dxos/log";
|
|
8728
8497
|
import { EdgeSignalManager, WebsocketSignalManager } from "@dxos/messaging";
|
|
8729
8498
|
import { SwarmNetworkManager, createIceProvider, createRtcTransportFactory } from "@dxos/network-manager";
|
|
8730
|
-
import { trace as
|
|
8499
|
+
import { trace as trace10 } from "@dxos/protocols";
|
|
8731
8500
|
import { SystemStatus } from "@dxos/protocols/proto/dxos/client/services";
|
|
8501
|
+
import * as SqlExport from "@dxos/sql-sqlite/SqlExport";
|
|
8732
8502
|
import { TRACE_PROCESSOR as TRACE_PROCESSOR3, trace as Trace4 } from "@dxos/tracing";
|
|
8733
8503
|
import { WebsocketRpcClient } from "@dxos/websocket-rpc";
|
|
8734
8504
|
|
|
8735
8505
|
// src/packlets/devices/devices-service.ts
|
|
8736
8506
|
import { SubscriptionList as SubscriptionList3 } from "@dxos/async";
|
|
8737
|
-
import { Stream as
|
|
8738
|
-
import { invariant as
|
|
8507
|
+
import { Stream as Stream11 } from "@dxos/codec-protobuf/stream";
|
|
8508
|
+
import { invariant as invariant23 } from "@dxos/invariant";
|
|
8739
8509
|
import { Device as Device2, DeviceKind as DeviceKind2, EdgeStatus as EdgeStatus3 } from "@dxos/protocols/proto/dxos/client/services";
|
|
8740
|
-
var
|
|
8510
|
+
var __dxlog_file28 = "/__w/dxos/dxos/packages/sdk/client-services/src/packlets/devices/devices-service.ts";
|
|
8741
8511
|
var DevicesServiceImpl = class {
|
|
8742
8512
|
_identityManager;
|
|
8743
8513
|
_edgeConnection;
|
|
@@ -8749,7 +8519,7 @@ var DevicesServiceImpl = class {
|
|
|
8749
8519
|
return this._identityManager.updateDeviceProfile(profile);
|
|
8750
8520
|
}
|
|
8751
8521
|
queryDevices() {
|
|
8752
|
-
return new
|
|
8522
|
+
return new Stream11(({ next }) => {
|
|
8753
8523
|
const update = () => {
|
|
8754
8524
|
const deviceKeys = this._identityManager.identity?.authorizedDeviceKeys;
|
|
8755
8525
|
if (!deviceKeys) {
|
|
@@ -8757,8 +8527,8 @@ var DevicesServiceImpl = class {
|
|
|
8757
8527
|
devices: []
|
|
8758
8528
|
});
|
|
8759
8529
|
} else {
|
|
8760
|
-
|
|
8761
|
-
F:
|
|
8530
|
+
invariant23(this._identityManager.identity?.presence, "presence not present", {
|
|
8531
|
+
F: __dxlog_file28,
|
|
8762
8532
|
L: 37,
|
|
8763
8533
|
S: this,
|
|
8764
8534
|
A: [
|
|
@@ -8826,7 +8596,7 @@ var DevicesServiceImpl = class {
|
|
|
8826
8596
|
|
|
8827
8597
|
// src/packlets/identity/contacts-service.ts
|
|
8828
8598
|
import { SubscriptionList as SubscriptionList4, UpdateScheduler as UpdateScheduler2, scheduleTask as scheduleTask9 } from "@dxos/async";
|
|
8829
|
-
import { Stream as
|
|
8599
|
+
import { Stream as Stream12 } from "@dxos/codec-protobuf/stream";
|
|
8830
8600
|
import { PublicKey as PublicKey17 } from "@dxos/keys";
|
|
8831
8601
|
import { ComplexMap as ComplexMap5, ComplexSet as ComplexSet6 } from "@dxos/util";
|
|
8832
8602
|
var ContactsServiceImpl = class {
|
|
@@ -8880,7 +8650,7 @@ var ContactsServiceImpl = class {
|
|
|
8880
8650
|
}
|
|
8881
8651
|
queryContacts() {
|
|
8882
8652
|
const subscribedSpaceKeySet = new ComplexSet6(PublicKey17.hash);
|
|
8883
|
-
return new
|
|
8653
|
+
return new Stream12(({ next, ctx }) => {
|
|
8884
8654
|
const pushUpdateTask = new UpdateScheduler2(ctx, async () => {
|
|
8885
8655
|
const contacts = await this.getContacts();
|
|
8886
8656
|
next(contacts);
|
|
@@ -8912,9 +8682,9 @@ var ContactsServiceImpl = class {
|
|
|
8912
8682
|
|
|
8913
8683
|
// src/packlets/logging/logging-service.ts
|
|
8914
8684
|
import { Event as Event10 } from "@dxos/async";
|
|
8915
|
-
import { Stream as
|
|
8685
|
+
import { Stream as Stream13 } from "@dxos/codec-protobuf/stream";
|
|
8916
8686
|
import { PublicKey as PublicKey18 } from "@dxos/keys";
|
|
8917
|
-
import { getContextFromEntry, log as
|
|
8687
|
+
import { getContextFromEntry, log as log24 } from "@dxos/log";
|
|
8918
8688
|
import { QueryLogsRequest } from "@dxos/protocols/proto/dxos/client/services";
|
|
8919
8689
|
import { getDebugName, jsonify, numericalValues, tracer } from "@dxos/util";
|
|
8920
8690
|
var LoggingServiceImpl = class {
|
|
@@ -8922,11 +8692,11 @@ var LoggingServiceImpl = class {
|
|
|
8922
8692
|
_started = Date.now();
|
|
8923
8693
|
_sessionId = PublicKey18.random().toHex();
|
|
8924
8694
|
async open() {
|
|
8925
|
-
|
|
8695
|
+
log24.runtimeConfig.processors.push(this._logProcessor);
|
|
8926
8696
|
}
|
|
8927
8697
|
async close() {
|
|
8928
|
-
const index =
|
|
8929
|
-
|
|
8698
|
+
const index = log24.runtimeConfig.processors.findIndex((processor) => processor === this._logProcessor);
|
|
8699
|
+
log24.runtimeConfig.processors.splice(index, 1);
|
|
8930
8700
|
}
|
|
8931
8701
|
async controlMetrics({ reset, record }) {
|
|
8932
8702
|
if (reset) {
|
|
@@ -8952,7 +8722,7 @@ var LoggingServiceImpl = class {
|
|
|
8952
8722
|
stats: numericalValues(events, "duration")
|
|
8953
8723
|
};
|
|
8954
8724
|
};
|
|
8955
|
-
return new
|
|
8725
|
+
return new Stream13(({ next }) => {
|
|
8956
8726
|
const update = () => {
|
|
8957
8727
|
const metrics2 = {
|
|
8958
8728
|
timestamp: /* @__PURE__ */ new Date(),
|
|
@@ -8974,7 +8744,7 @@ var LoggingServiceImpl = class {
|
|
|
8974
8744
|
});
|
|
8975
8745
|
}
|
|
8976
8746
|
queryLogs(request) {
|
|
8977
|
-
return new
|
|
8747
|
+
return new Stream13(({ ctx, next }) => {
|
|
8978
8748
|
const handler = (entry2) => {
|
|
8979
8749
|
if (LOG_PROCESSING > 0) {
|
|
8980
8750
|
return;
|
|
@@ -9034,7 +8804,7 @@ var shouldLog = (entry2, request) => {
|
|
|
9034
8804
|
var LOG_PROCESSING = 0;
|
|
9035
8805
|
|
|
9036
8806
|
// src/packlets/network/network-service.ts
|
|
9037
|
-
import { Stream as
|
|
8807
|
+
import { Stream as Stream14 } from "@dxos/codec-protobuf/stream";
|
|
9038
8808
|
var NetworkServiceImpl = class {
|
|
9039
8809
|
networkManager;
|
|
9040
8810
|
signalManager;
|
|
@@ -9045,7 +8815,7 @@ var NetworkServiceImpl = class {
|
|
|
9045
8815
|
this.edgeConnection = edgeConnection;
|
|
9046
8816
|
}
|
|
9047
8817
|
queryStatus() {
|
|
9048
|
-
return new
|
|
8818
|
+
return new Stream14(({ ctx, next }) => {
|
|
9049
8819
|
const update = () => {
|
|
9050
8820
|
next({
|
|
9051
8821
|
swarm: this.networkManager.connectionState,
|
|
@@ -9074,7 +8844,7 @@ var NetworkServiceImpl = class {
|
|
|
9074
8844
|
return this.signalManager.query(request);
|
|
9075
8845
|
}
|
|
9076
8846
|
subscribeSwarmState(request) {
|
|
9077
|
-
return new
|
|
8847
|
+
return new Stream14(({ ctx, next }) => {
|
|
9078
8848
|
this.signalManager.swarmState?.on(ctx, (state) => {
|
|
9079
8849
|
if (request.topic.equals(state.swarmKey)) {
|
|
9080
8850
|
next(state);
|
|
@@ -9086,7 +8856,7 @@ var NetworkServiceImpl = class {
|
|
|
9086
8856
|
return this.signalManager.sendMessage(message);
|
|
9087
8857
|
}
|
|
9088
8858
|
subscribeMessages(peer) {
|
|
9089
|
-
return new
|
|
8859
|
+
return new Stream14(({ ctx, next }) => {
|
|
9090
8860
|
this.signalManager.onMessage.on(ctx, (message) => {
|
|
9091
8861
|
if (message.recipient.peerKey === peer.peerKey) {
|
|
9092
8862
|
next(message);
|
|
@@ -9097,7 +8867,7 @@ var NetworkServiceImpl = class {
|
|
|
9097
8867
|
};
|
|
9098
8868
|
|
|
9099
8869
|
// src/packlets/system/system-service.ts
|
|
9100
|
-
import { Stream as
|
|
8870
|
+
import { Stream as Stream15 } from "@dxos/codec-protobuf/stream";
|
|
9101
8871
|
import { GetDiagnosticsRequest as GetDiagnosticsRequest2 } from "@dxos/protocols/proto/dxos/client/services";
|
|
9102
8872
|
import { jsonKeyReplacer as jsonKeyReplacer2 } from "@dxos/util";
|
|
9103
8873
|
var SystemServiceImpl = class {
|
|
@@ -9139,7 +8909,7 @@ var SystemServiceImpl = class {
|
|
|
9139
8909
|
}
|
|
9140
8910
|
// TODO(burdon): Standardize interval option in stream request?
|
|
9141
8911
|
queryStatus({ interval = 3e3 } = {}) {
|
|
9142
|
-
return new
|
|
8912
|
+
return new Stream15(({ next }) => {
|
|
9143
8913
|
const update = () => {
|
|
9144
8914
|
next({
|
|
9145
8915
|
status: this._getCurrentStatus()
|
|
@@ -9160,13 +8930,13 @@ var SystemServiceImpl = class {
|
|
|
9160
8930
|
};
|
|
9161
8931
|
|
|
9162
8932
|
// src/packlets/services/service-host.ts
|
|
9163
|
-
function
|
|
8933
|
+
function _ts_decorate9(decorators, target, key, desc) {
|
|
9164
8934
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
9165
8935
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
9166
8936
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
9167
8937
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
9168
8938
|
}
|
|
9169
|
-
var
|
|
8939
|
+
var __dxlog_file29 = "/__w/dxos/dxos/packages/sdk/client-services/src/packlets/services/service-host.ts";
|
|
9170
8940
|
var ClientServicesHost = class {
|
|
9171
8941
|
_resourceLock;
|
|
9172
8942
|
_serviceRegistry;
|
|
@@ -9184,7 +8954,8 @@ var ClientServicesHost = class {
|
|
|
9184
8954
|
_edgeConnection = void 0;
|
|
9185
8955
|
_edgeHttpClient = void 0;
|
|
9186
8956
|
_serviceContext;
|
|
9187
|
-
|
|
8957
|
+
_runtime;
|
|
8958
|
+
_runtimeProps;
|
|
9188
8959
|
diagnosticsBroadcastHandler;
|
|
9189
8960
|
_opening = false;
|
|
9190
8961
|
_open = false;
|
|
@@ -9198,18 +8969,14 @@ var ClientServicesHost = class {
|
|
|
9198
8969
|
// TODO(wittjosiah): Turn this on by default.
|
|
9199
8970
|
lockKey,
|
|
9200
8971
|
callbacks,
|
|
9201
|
-
|
|
9202
|
-
|
|
8972
|
+
runtime,
|
|
8973
|
+
runtimeProps
|
|
8974
|
+
}) {
|
|
9203
8975
|
this._storage = storage;
|
|
9204
8976
|
this._level = level;
|
|
9205
8977
|
this._callbacks = callbacks;
|
|
9206
|
-
this.
|
|
9207
|
-
|
|
9208
|
-
this._runtimeParams.disableP2pReplication = config?.get("runtime.client.disableP2pReplication", false);
|
|
9209
|
-
}
|
|
9210
|
-
if (this._runtimeParams.enableVectorIndexing === void 0) {
|
|
9211
|
-
this._runtimeParams.enableVectorIndexing = config?.get("runtime.client.enableVectorIndexing", false);
|
|
9212
|
-
}
|
|
8978
|
+
this._runtime = runtime;
|
|
8979
|
+
this._runtimeProps = runtimeProps ?? {};
|
|
9213
8980
|
if (config) {
|
|
9214
8981
|
this.initialize({
|
|
9215
8982
|
config,
|
|
@@ -9218,13 +8985,13 @@ var ClientServicesHost = class {
|
|
|
9218
8985
|
});
|
|
9219
8986
|
}
|
|
9220
8987
|
if (lockKey) {
|
|
9221
|
-
this._resourceLock = new Lock({
|
|
8988
|
+
this._resourceLock = new locks_exports.Lock({
|
|
9222
8989
|
lockKey,
|
|
9223
8990
|
onAcquire: () => {
|
|
9224
8991
|
if (!this._opening) {
|
|
9225
8992
|
void this.open(new Context11(void 0, {
|
|
9226
|
-
F:
|
|
9227
|
-
L:
|
|
8993
|
+
F: __dxlog_file29,
|
|
8994
|
+
L: 147
|
|
9228
8995
|
}));
|
|
9229
8996
|
}
|
|
9230
8997
|
},
|
|
@@ -9249,7 +9016,7 @@ var ClientServicesHost = class {
|
|
|
9249
9016
|
await this.reset();
|
|
9250
9017
|
}
|
|
9251
9018
|
});
|
|
9252
|
-
this.diagnosticsBroadcastHandler = createCollectDiagnosticsBroadcastHandler(this._systemService);
|
|
9019
|
+
this.diagnosticsBroadcastHandler = (0, diagnostics_exports.createCollectDiagnosticsBroadcastHandler)(this._systemService);
|
|
9253
9020
|
this._loggingService = new LoggingServiceImpl();
|
|
9254
9021
|
this._serviceRegistry = new ServiceRegistry(clientServiceBundle, {
|
|
9255
9022
|
SystemService: this._systemService,
|
|
@@ -9275,30 +9042,57 @@ var ClientServicesHost = class {
|
|
|
9275
9042
|
return this._serviceRegistry.services;
|
|
9276
9043
|
}
|
|
9277
9044
|
/**
|
|
9045
|
+
* Debugging util.
|
|
9046
|
+
*/
|
|
9047
|
+
async exportSqliteDatabase() {
|
|
9048
|
+
return await RuntimeProvider.runPromise(this._runtime)(Effect.gen(function* () {
|
|
9049
|
+
const sql = yield* SqlExport.SqlExport;
|
|
9050
|
+
return yield* sql.export;
|
|
9051
|
+
}));
|
|
9052
|
+
}
|
|
9053
|
+
/**
|
|
9054
|
+
* Debugging util.
|
|
9055
|
+
*/
|
|
9056
|
+
async runSqliteQuery(query, params) {
|
|
9057
|
+
return await RuntimeProvider.runPromise(this._runtime)(Effect.gen(function* () {
|
|
9058
|
+
const sql = yield* SqlClient.SqlClient;
|
|
9059
|
+
return yield* sql`${sql.unsafe(query, params)}`;
|
|
9060
|
+
}));
|
|
9061
|
+
}
|
|
9062
|
+
/**
|
|
9278
9063
|
* Initialize the service host with the config.
|
|
9279
9064
|
* Config can also be provided in the constructor.
|
|
9280
9065
|
* Can only be called once.
|
|
9281
9066
|
*/
|
|
9282
9067
|
initialize({ config, ...options }) {
|
|
9283
|
-
|
|
9284
|
-
F:
|
|
9285
|
-
L:
|
|
9068
|
+
invariant24(!this._open, "service host is open", {
|
|
9069
|
+
F: __dxlog_file29,
|
|
9070
|
+
L: 237,
|
|
9286
9071
|
S: this,
|
|
9287
9072
|
A: [
|
|
9288
9073
|
"!this._open",
|
|
9289
9074
|
"'service host is open'"
|
|
9290
9075
|
]
|
|
9291
9076
|
});
|
|
9292
|
-
|
|
9293
|
-
F:
|
|
9294
|
-
L:
|
|
9077
|
+
log25("initializing...", void 0, {
|
|
9078
|
+
F: __dxlog_file29,
|
|
9079
|
+
L: 238,
|
|
9295
9080
|
S: this,
|
|
9296
9081
|
C: (f, a) => f(...a)
|
|
9297
9082
|
});
|
|
9298
9083
|
if (config) {
|
|
9299
|
-
|
|
9300
|
-
|
|
9301
|
-
|
|
9084
|
+
if (this._runtimeProps.disableP2pReplication === void 0) {
|
|
9085
|
+
this._runtimeProps.disableP2pReplication = config?.get("runtime.client.disableP2pReplication", false);
|
|
9086
|
+
}
|
|
9087
|
+
if (this._runtimeProps.enableVectorIndexing === void 0) {
|
|
9088
|
+
this._runtimeProps.enableVectorIndexing = config?.get("runtime.client.enableVectorIndexing", false);
|
|
9089
|
+
}
|
|
9090
|
+
if (this._runtimeProps.enableLocalQueues === void 0) {
|
|
9091
|
+
this._runtimeProps.enableLocalQueues = config?.get("runtime.client.enableLocalQueues", false);
|
|
9092
|
+
}
|
|
9093
|
+
invariant24(!this._config, "config already set", {
|
|
9094
|
+
F: __dxlog_file29,
|
|
9095
|
+
L: 251,
|
|
9302
9096
|
S: this,
|
|
9303
9097
|
A: [
|
|
9304
9098
|
"!this._config",
|
|
@@ -9325,9 +9119,9 @@ var ClientServicesHost = class {
|
|
|
9325
9119
|
edgeConnection: this._edgeConnection
|
|
9326
9120
|
}) : new WebsocketSignalManager(this._config?.get("runtime.services.signaling") ?? []) } = options;
|
|
9327
9121
|
this._signalManager = signalManager;
|
|
9328
|
-
|
|
9329
|
-
F:
|
|
9330
|
-
L:
|
|
9122
|
+
invariant24(!this._networkManager, "network manager already set", {
|
|
9123
|
+
F: __dxlog_file29,
|
|
9124
|
+
L: 282,
|
|
9331
9125
|
S: this,
|
|
9332
9126
|
A: [
|
|
9333
9127
|
"!this._networkManager",
|
|
@@ -9343,9 +9137,9 @@ var ClientServicesHost = class {
|
|
|
9343
9137
|
peerKey: this._edgeConnection.peerKey
|
|
9344
9138
|
} : void 0
|
|
9345
9139
|
});
|
|
9346
|
-
|
|
9347
|
-
F:
|
|
9348
|
-
L:
|
|
9140
|
+
log25("initialized", void 0, {
|
|
9141
|
+
F: __dxlog_file29,
|
|
9142
|
+
L: 295,
|
|
9349
9143
|
S: this,
|
|
9350
9144
|
C: (f, a) => f(...a)
|
|
9351
9145
|
});
|
|
@@ -9355,44 +9149,44 @@ var ClientServicesHost = class {
|
|
|
9355
9149
|
return;
|
|
9356
9150
|
}
|
|
9357
9151
|
const traceId = PublicKey19.random().toHex();
|
|
9358
|
-
|
|
9152
|
+
log25.trace("dxos.client-services.host.open", trace10.begin({
|
|
9359
9153
|
id: traceId
|
|
9360
9154
|
}), {
|
|
9361
|
-
F:
|
|
9362
|
-
L:
|
|
9155
|
+
F: __dxlog_file29,
|
|
9156
|
+
L: 306,
|
|
9363
9157
|
S: this,
|
|
9364
9158
|
C: (f, a) => f(...a)
|
|
9365
9159
|
});
|
|
9366
|
-
|
|
9367
|
-
F:
|
|
9368
|
-
L:
|
|
9160
|
+
invariant24(this._config, "config not set", {
|
|
9161
|
+
F: __dxlog_file29,
|
|
9162
|
+
L: 308,
|
|
9369
9163
|
S: this,
|
|
9370
9164
|
A: [
|
|
9371
9165
|
"this._config",
|
|
9372
9166
|
"'config not set'"
|
|
9373
9167
|
]
|
|
9374
9168
|
});
|
|
9375
|
-
|
|
9376
|
-
F:
|
|
9377
|
-
L:
|
|
9169
|
+
invariant24(this._storage, "storage not set", {
|
|
9170
|
+
F: __dxlog_file29,
|
|
9171
|
+
L: 309,
|
|
9378
9172
|
S: this,
|
|
9379
9173
|
A: [
|
|
9380
9174
|
"this._storage",
|
|
9381
9175
|
"'storage not set'"
|
|
9382
9176
|
]
|
|
9383
9177
|
});
|
|
9384
|
-
|
|
9385
|
-
F:
|
|
9386
|
-
L:
|
|
9178
|
+
invariant24(this._signalManager, "signal manager not set", {
|
|
9179
|
+
F: __dxlog_file29,
|
|
9180
|
+
L: 310,
|
|
9387
9181
|
S: this,
|
|
9388
9182
|
A: [
|
|
9389
9183
|
"this._signalManager",
|
|
9390
9184
|
"'signal manager not set'"
|
|
9391
9185
|
]
|
|
9392
9186
|
});
|
|
9393
|
-
|
|
9394
|
-
F:
|
|
9395
|
-
L:
|
|
9187
|
+
invariant24(this._networkManager, "network manager not set", {
|
|
9188
|
+
F: __dxlog_file29,
|
|
9189
|
+
L: 311,
|
|
9396
9190
|
S: this,
|
|
9397
9191
|
A: [
|
|
9398
9192
|
"this._networkManager",
|
|
@@ -9400,11 +9194,11 @@ var ClientServicesHost = class {
|
|
|
9400
9194
|
]
|
|
9401
9195
|
});
|
|
9402
9196
|
this._opening = true;
|
|
9403
|
-
|
|
9197
|
+
log25("opening...", {
|
|
9404
9198
|
lockKey: this._resourceLock?.lockKey
|
|
9405
9199
|
}, {
|
|
9406
|
-
F:
|
|
9407
|
-
L:
|
|
9200
|
+
F: __dxlog_file29,
|
|
9201
|
+
L: 314,
|
|
9408
9202
|
S: this,
|
|
9409
9203
|
C: (f, a) => f(...a)
|
|
9410
9204
|
});
|
|
@@ -9414,7 +9208,7 @@ var ClientServicesHost = class {
|
|
|
9414
9208
|
}
|
|
9415
9209
|
await this._level.open();
|
|
9416
9210
|
await this._loggingService.open();
|
|
9417
|
-
this._serviceContext = new ServiceContext(this._storage, this._level, this._networkManager, this._signalManager, this._edgeConnection, this._edgeHttpClient, this.
|
|
9211
|
+
this._serviceContext = new ServiceContext(this._storage, this._level, this._networkManager, this._signalManager, this._edgeConnection, this._edgeHttpClient, this._runtime, this._runtimeProps, this._config.get("runtime.client.edgeFeatures"));
|
|
9418
9212
|
const dataSpaceManagerProvider = async () => {
|
|
9419
9213
|
await this._serviceContext.initialized.wait();
|
|
9420
9214
|
return this._serviceContext.dataSpaceManager;
|
|
@@ -9433,6 +9227,7 @@ var ClientServicesHost = class {
|
|
|
9433
9227
|
SpacesService: new SpacesServiceImpl(this._serviceContext.identityManager, this._serviceContext.spaceManager, dataSpaceManagerProvider),
|
|
9434
9228
|
DataService: this._serviceContext.echoHost.dataService,
|
|
9435
9229
|
QueryService: this._serviceContext.echoHost.queryService,
|
|
9230
|
+
QueueService: this._serviceContext.echoHost.queuesService,
|
|
9436
9231
|
NetworkService: new NetworkServiceImpl(this._serviceContext.networkManager, this._serviceContext.signalManager, this._edgeConnection),
|
|
9437
9232
|
LoggingService: this._loggingService,
|
|
9438
9233
|
TracingService: this._tracingService,
|
|
@@ -9461,19 +9256,19 @@ var ClientServicesHost = class {
|
|
|
9461
9256
|
this._open = true;
|
|
9462
9257
|
this._statusUpdate.emit();
|
|
9463
9258
|
const deviceKey = this._serviceContext.identityManager.identity?.deviceKey;
|
|
9464
|
-
|
|
9259
|
+
log25("opened", {
|
|
9465
9260
|
deviceKey
|
|
9466
9261
|
}, {
|
|
9467
|
-
F:
|
|
9468
|
-
L:
|
|
9262
|
+
F: __dxlog_file29,
|
|
9263
|
+
L: 417,
|
|
9469
9264
|
S: this,
|
|
9470
9265
|
C: (f, a) => f(...a)
|
|
9471
9266
|
});
|
|
9472
|
-
|
|
9267
|
+
log25.trace("dxos.client-services.host.open", trace10.end({
|
|
9473
9268
|
id: traceId
|
|
9474
9269
|
}), {
|
|
9475
|
-
F:
|
|
9476
|
-
L:
|
|
9270
|
+
F: __dxlog_file29,
|
|
9271
|
+
L: 418,
|
|
9477
9272
|
S: this,
|
|
9478
9273
|
C: (f, a) => f(...a)
|
|
9479
9274
|
});
|
|
@@ -9483,11 +9278,11 @@ var ClientServicesHost = class {
|
|
|
9483
9278
|
return;
|
|
9484
9279
|
}
|
|
9485
9280
|
const deviceKey = this._serviceContext.identityManager.identity?.deviceKey;
|
|
9486
|
-
|
|
9281
|
+
log25("closing...", {
|
|
9487
9282
|
deviceKey
|
|
9488
9283
|
}, {
|
|
9489
|
-
F:
|
|
9490
|
-
L:
|
|
9284
|
+
F: __dxlog_file29,
|
|
9285
|
+
L: 429,
|
|
9491
9286
|
S: this,
|
|
9492
9287
|
C: (f, a) => f(...a)
|
|
9493
9288
|
});
|
|
@@ -9501,28 +9296,28 @@ var ClientServicesHost = class {
|
|
|
9501
9296
|
await this._level?.close();
|
|
9502
9297
|
this._open = false;
|
|
9503
9298
|
this._statusUpdate.emit();
|
|
9504
|
-
|
|
9299
|
+
log25("closed", {
|
|
9505
9300
|
deviceKey
|
|
9506
9301
|
}, {
|
|
9507
|
-
F:
|
|
9508
|
-
L:
|
|
9302
|
+
F: __dxlog_file29,
|
|
9303
|
+
L: 438,
|
|
9509
9304
|
S: this,
|
|
9510
9305
|
C: (f, a) => f(...a)
|
|
9511
9306
|
});
|
|
9512
9307
|
}
|
|
9513
9308
|
async reset() {
|
|
9514
9309
|
const traceId = PublicKey19.random().toHex();
|
|
9515
|
-
|
|
9310
|
+
log25.trace("dxos.sdk.client-services-host.reset", trace10.begin({
|
|
9516
9311
|
id: traceId
|
|
9517
9312
|
}), {
|
|
9518
|
-
F:
|
|
9519
|
-
L:
|
|
9313
|
+
F: __dxlog_file29,
|
|
9314
|
+
L: 443,
|
|
9520
9315
|
S: this,
|
|
9521
9316
|
C: (f, a) => f(...a)
|
|
9522
9317
|
});
|
|
9523
|
-
|
|
9524
|
-
F:
|
|
9525
|
-
L:
|
|
9318
|
+
log25.info("resetting...", void 0, {
|
|
9319
|
+
F: __dxlog_file29,
|
|
9320
|
+
L: 445,
|
|
9526
9321
|
S: this,
|
|
9527
9322
|
C: (f, a) => f(...a)
|
|
9528
9323
|
});
|
|
@@ -9532,27 +9327,27 @@ var ClientServicesHost = class {
|
|
|
9532
9327
|
try {
|
|
9533
9328
|
await this._level.clear();
|
|
9534
9329
|
} catch (err) {
|
|
9535
|
-
|
|
9330
|
+
log25.warn("failed to clear leveldb during reset", {
|
|
9536
9331
|
err
|
|
9537
9332
|
}, {
|
|
9538
|
-
F:
|
|
9539
|
-
L:
|
|
9333
|
+
F: __dxlog_file29,
|
|
9334
|
+
L: 455,
|
|
9540
9335
|
S: this,
|
|
9541
9336
|
C: (f, a) => f(...a)
|
|
9542
9337
|
});
|
|
9543
9338
|
}
|
|
9544
9339
|
await this._storage.reset();
|
|
9545
|
-
|
|
9546
|
-
F:
|
|
9547
|
-
L:
|
|
9340
|
+
log25.info("reset", void 0, {
|
|
9341
|
+
F: __dxlog_file29,
|
|
9342
|
+
L: 458,
|
|
9548
9343
|
S: this,
|
|
9549
9344
|
C: (f, a) => f(...a)
|
|
9550
9345
|
});
|
|
9551
|
-
|
|
9346
|
+
log25.trace("dxos.sdk.client-services-host.reset", trace10.end({
|
|
9552
9347
|
id: traceId
|
|
9553
9348
|
}), {
|
|
9554
|
-
F:
|
|
9555
|
-
L:
|
|
9349
|
+
F: __dxlog_file29,
|
|
9350
|
+
L: 459,
|
|
9556
9351
|
S: this,
|
|
9557
9352
|
C: (f, a) => f(...a)
|
|
9558
9353
|
});
|
|
@@ -9564,24 +9359,24 @@ var ClientServicesHost = class {
|
|
|
9564
9359
|
return identity;
|
|
9565
9360
|
}
|
|
9566
9361
|
};
|
|
9567
|
-
|
|
9362
|
+
_ts_decorate9([
|
|
9568
9363
|
Trace4.info()
|
|
9569
9364
|
], ClientServicesHost.prototype, "_opening", void 0);
|
|
9570
|
-
|
|
9365
|
+
_ts_decorate9([
|
|
9571
9366
|
Trace4.info()
|
|
9572
9367
|
], ClientServicesHost.prototype, "_open", void 0);
|
|
9573
|
-
|
|
9368
|
+
_ts_decorate9([
|
|
9574
9369
|
Trace4.info()
|
|
9575
9370
|
], ClientServicesHost.prototype, "_resetting", void 0);
|
|
9576
|
-
|
|
9371
|
+
_ts_decorate9([
|
|
9577
9372
|
synchronized4,
|
|
9578
9373
|
Trace4.span()
|
|
9579
9374
|
], ClientServicesHost.prototype, "open", null);
|
|
9580
|
-
|
|
9375
|
+
_ts_decorate9([
|
|
9581
9376
|
synchronized4,
|
|
9582
9377
|
Trace4.span()
|
|
9583
9378
|
], ClientServicesHost.prototype, "close", null);
|
|
9584
|
-
ClientServicesHost =
|
|
9379
|
+
ClientServicesHost = _ts_decorate9([
|
|
9585
9380
|
Trace4.resource()
|
|
9586
9381
|
], ClientServicesHost);
|
|
9587
9382
|
|
|
@@ -9597,9 +9392,8 @@ export {
|
|
|
9597
9392
|
DevtoolsHostEvents,
|
|
9598
9393
|
DevtoolsServiceImpl,
|
|
9599
9394
|
createDiagnostics,
|
|
9600
|
-
createCollectDiagnosticsBroadcastSender,
|
|
9601
|
-
createCollectDiagnosticsBroadcastHandler,
|
|
9602
9395
|
DiagnosticsCollector,
|
|
9396
|
+
diagnostics_exports,
|
|
9603
9397
|
createAuthProvider,
|
|
9604
9398
|
TrustedKeySetAuthVerifier,
|
|
9605
9399
|
EdgeFeedReplicator,
|
|
@@ -9615,19 +9409,13 @@ export {
|
|
|
9615
9409
|
InvitationsServiceImpl,
|
|
9616
9410
|
SpaceInvitationProtocol,
|
|
9617
9411
|
InvitationsManager,
|
|
9618
|
-
|
|
9619
|
-
isLocked,
|
|
9620
|
-
ClientRpcServer,
|
|
9412
|
+
locks_exports,
|
|
9621
9413
|
EdgeAgentManager,
|
|
9622
9414
|
EdgeAgentServiceImpl,
|
|
9623
9415
|
ServiceContext,
|
|
9624
9416
|
createStorageObjects,
|
|
9625
9417
|
createLevel,
|
|
9626
|
-
encodeProfileArchive,
|
|
9627
|
-
decodeProfileArchive,
|
|
9628
|
-
exportProfileData,
|
|
9629
|
-
importProfileData,
|
|
9630
9418
|
ServiceRegistry,
|
|
9631
9419
|
ClientServicesHost
|
|
9632
9420
|
};
|
|
9633
|
-
//# sourceMappingURL=chunk-
|
|
9421
|
+
//# sourceMappingURL=chunk-Q56HAUWS.mjs.map
|