@dxos/client-services 0.7.5-main.9d26e3a → 0.7.5-main.9d2a38b
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-27A4ATQX.mjs → chunk-RFZHCLFI.mjs} +105 -70
- package/dist/lib/browser/chunk-RFZHCLFI.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +1 -1
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/testing/index.mjs +1 -1
- package/dist/lib/node/{chunk-7FKXMJDD.cjs → chunk-WCTGAZLA.cjs} +140 -105
- package/dist/lib/node/chunk-WCTGAZLA.cjs.map +7 -0
- package/dist/lib/node/index.cjs +47 -47
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node/testing/index.cjs +8 -8
- package/dist/lib/node-esm/{chunk-HGN7FHFK.mjs → chunk-RSOLUJE6.mjs} +105 -70
- package/dist/lib/node-esm/chunk-RSOLUJE6.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +1 -1
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/testing/index.mjs +1 -1
- package/dist/types/src/packlets/agents/edge-agent-service.d.ts +1 -1
- package/dist/types/src/packlets/agents/edge-agent-service.d.ts.map +1 -1
- package/dist/types/src/packlets/devices/devices-service.d.ts +1 -1
- package/dist/types/src/packlets/devices/devices-service.d.ts.map +1 -1
- package/dist/types/src/packlets/devtools/devtools.d.ts +1 -1
- package/dist/types/src/packlets/devtools/devtools.d.ts.map +1 -1
- package/dist/types/src/packlets/devtools/feeds.d.ts +1 -1
- package/dist/types/src/packlets/devtools/feeds.d.ts.map +1 -1
- package/dist/types/src/packlets/devtools/keys.d.ts +1 -1
- package/dist/types/src/packlets/devtools/keys.d.ts.map +1 -1
- package/dist/types/src/packlets/devtools/metadata.d.ts +1 -1
- package/dist/types/src/packlets/devtools/metadata.d.ts.map +1 -1
- package/dist/types/src/packlets/devtools/network.d.ts +1 -1
- package/dist/types/src/packlets/devtools/network.d.ts.map +1 -1
- package/dist/types/src/packlets/devtools/spaces.d.ts +1 -1
- package/dist/types/src/packlets/devtools/spaces.d.ts.map +1 -1
- package/dist/types/src/packlets/identity/contacts-service.d.ts +1 -1
- package/dist/types/src/packlets/identity/contacts-service.d.ts.map +1 -1
- package/dist/types/src/packlets/identity/identity-service.d.ts +1 -1
- package/dist/types/src/packlets/identity/identity-service.d.ts.map +1 -1
- package/dist/types/src/packlets/invitations/invitations-service.d.ts +1 -1
- package/dist/types/src/packlets/invitations/invitations-service.d.ts.map +1 -1
- package/dist/types/src/packlets/logging/logging-service.d.ts +1 -1
- package/dist/types/src/packlets/logging/logging-service.d.ts.map +1 -1
- package/dist/types/src/packlets/network/network-service.d.ts +9 -2
- package/dist/types/src/packlets/network/network-service.d.ts.map +1 -1
- package/dist/types/src/packlets/services/service-context.d.ts.map +1 -1
- package/dist/types/src/packlets/spaces/notarization-plugin.d.ts +3 -0
- package/dist/types/src/packlets/spaces/notarization-plugin.d.ts.map +1 -1
- package/dist/types/src/packlets/spaces/spaces-service.d.ts +1 -1
- package/dist/types/src/packlets/spaces/spaces-service.d.ts.map +1 -1
- package/dist/types/src/packlets/system/system-service.d.ts +1 -1
- package/dist/types/src/packlets/system/system-service.d.ts.map +1 -1
- package/dist/types/src/version.d.ts +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +38 -38
- package/src/packlets/agents/edge-agent-service.ts +1 -1
- package/src/packlets/devices/devices-service.ts +1 -1
- package/src/packlets/devtools/devtools.ts +1 -1
- package/src/packlets/devtools/feeds.ts +1 -1
- package/src/packlets/devtools/keys.ts +1 -1
- package/src/packlets/devtools/metadata.ts +1 -1
- package/src/packlets/devtools/network.ts +1 -1
- package/src/packlets/devtools/spaces.ts +1 -1
- package/src/packlets/identity/contacts-service.ts +1 -1
- package/src/packlets/identity/identity-service.ts +1 -1
- package/src/packlets/invitations/invitations-service.ts +1 -1
- package/src/packlets/logging/logging-service.ts +1 -1
- package/src/packlets/network/network-service.ts +39 -1
- package/src/packlets/services/service-context.ts +1 -0
- package/src/packlets/spaces/notarization-plugin.ts +32 -17
- package/src/packlets/spaces/spaces-service.ts +1 -1
- package/src/packlets/system/system-service.ts +1 -1
- package/src/version.ts +1 -1
- package/dist/lib/browser/chunk-27A4ATQX.mjs.map +0 -7
- package/dist/lib/node/chunk-7FKXMJDD.cjs.map +0 -7
- package/dist/lib/node-esm/chunk-HGN7FHFK.mjs.map +0 -7
|
@@ -2,7 +2,7 @@ import "@dxos/node-std/globals";
|
|
|
2
2
|
|
|
3
3
|
// packages/sdk/client-services/src/packlets/devtools/feeds.ts
|
|
4
4
|
import { EventSubscriptions } from "@dxos/async";
|
|
5
|
-
import { Stream } from "@dxos/codec-protobuf";
|
|
5
|
+
import { Stream } from "@dxos/codec-protobuf/stream";
|
|
6
6
|
import { FeedIterator } from "@dxos/feed-store";
|
|
7
7
|
import { PublicKey } from "@dxos/keys";
|
|
8
8
|
import { log } from "@dxos/log";
|
|
@@ -113,7 +113,7 @@ var subscribeToFeedBlocks = ({ feedStore }, { feedKey, maxBlocks = 10 }) => {
|
|
|
113
113
|
};
|
|
114
114
|
|
|
115
115
|
// packages/sdk/client-services/src/packlets/devtools/network.ts
|
|
116
|
-
import { Stream as Stream2 } from "@dxos/codec-protobuf";
|
|
116
|
+
import { Stream as Stream2 } from "@dxos/codec-protobuf/stream";
|
|
117
117
|
import { Context } from "@dxos/context";
|
|
118
118
|
import { PublicKey as PublicKey2 } from "@dxos/keys";
|
|
119
119
|
var __dxlog_file2 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/devtools/network.ts";
|
|
@@ -210,7 +210,7 @@ var getNetworkPeers = ({ networkManager }, request) => {
|
|
|
210
210
|
};
|
|
211
211
|
|
|
212
212
|
// packages/sdk/client-services/src/packlets/devtools/spaces.ts
|
|
213
|
-
import { Stream as Stream3 } from "@dxos/codec-protobuf";
|
|
213
|
+
import { Stream as Stream3 } from "@dxos/codec-protobuf/stream";
|
|
214
214
|
var subscribeToSpaces = (context, { spaceKeys = [] }) => {
|
|
215
215
|
return new Stream3(({ next }) => {
|
|
216
216
|
let unsubscribe;
|
|
@@ -247,11 +247,11 @@ var subscribeToSpaces = (context, { spaceKeys = [] }) => {
|
|
|
247
247
|
|
|
248
248
|
// packages/sdk/client-services/src/packlets/devtools/devtools.ts
|
|
249
249
|
import { Event as AsyncEvent } from "@dxos/async";
|
|
250
|
-
import { Stream as Stream6 } from "@dxos/codec-protobuf";
|
|
250
|
+
import { Stream as Stream6 } from "@dxos/codec-protobuf/stream";
|
|
251
251
|
|
|
252
252
|
// packages/sdk/client-services/src/packlets/devtools/keys.ts
|
|
253
253
|
import { scheduleTask } from "@dxos/async";
|
|
254
|
-
import { Stream as Stream4 } from "@dxos/codec-protobuf";
|
|
254
|
+
import { Stream as Stream4 } from "@dxos/codec-protobuf/stream";
|
|
255
255
|
var subscribeToKeyringKeys = ({ keyring }) => new Stream4(({ next, ctx }) => {
|
|
256
256
|
const update = async () => {
|
|
257
257
|
next({
|
|
@@ -263,7 +263,7 @@ var subscribeToKeyringKeys = ({ keyring }) => new Stream4(({ next, ctx }) => {
|
|
|
263
263
|
});
|
|
264
264
|
|
|
265
265
|
// packages/sdk/client-services/src/packlets/devtools/metadata.ts
|
|
266
|
-
import { Stream as Stream5 } from "@dxos/codec-protobuf";
|
|
266
|
+
import { Stream as Stream5 } from "@dxos/codec-protobuf/stream";
|
|
267
267
|
var subscribeToMetadata = ({ context }) => new Stream5(({ next, ctx }) => {
|
|
268
268
|
context.metadataStore.update.on(ctx, (data) => next({
|
|
269
269
|
metadata: data
|
|
@@ -397,7 +397,7 @@ import { SpaceMember } from "@dxos/protocols/proto/dxos/client/services";
|
|
|
397
397
|
import { TRACE_PROCESSOR } from "@dxos/tracing";
|
|
398
398
|
|
|
399
399
|
// packages/sdk/client-services/src/version.ts
|
|
400
|
-
var DXOS_VERSION = "0.7.5-main.
|
|
400
|
+
var DXOS_VERSION = "0.7.5-main.9d2a38b";
|
|
401
401
|
|
|
402
402
|
// packages/sdk/client-services/src/packlets/services/platform.ts
|
|
403
403
|
import { Platform } from "@dxos/protocols/proto/dxos/client/services";
|
|
@@ -1451,6 +1451,7 @@ var NotarizationPlugin = class extends Resource3 {
|
|
|
1451
1451
|
this._processedCredentials = new ComplexSet(PublicKey4.hash);
|
|
1452
1452
|
this._processCredentialsTriggers = new ComplexMap3(PublicKey4.hash);
|
|
1453
1453
|
this._activeEdgePollingIntervalHandle = void 0;
|
|
1454
|
+
this._activeEdgePollingEnabled = false;
|
|
1454
1455
|
this._spaceId = params.spaceId;
|
|
1455
1456
|
this._activeEdgePollingInterval = params.activeEdgePollingInterval ?? DEFAULT_ACTIVE_EDGE_POLLING_INTERVAL;
|
|
1456
1457
|
if (params.edgeClient && params.edgeFeatures?.feedReplicator) {
|
|
@@ -1458,15 +1459,6 @@ var NotarizationPlugin = class extends Resource3 {
|
|
|
1458
1459
|
}
|
|
1459
1460
|
}
|
|
1460
1461
|
setActiveEdgePollingEnabled(enabled) {
|
|
1461
|
-
invariant4(this.isOpen, void 0, {
|
|
1462
|
-
F: __dxlog_file8,
|
|
1463
|
-
L: 109,
|
|
1464
|
-
S: this,
|
|
1465
|
-
A: [
|
|
1466
|
-
"this.isOpen",
|
|
1467
|
-
""
|
|
1468
|
-
]
|
|
1469
|
-
});
|
|
1470
1462
|
const client = this._edgeClient;
|
|
1471
1463
|
invariant4(client, void 0, {
|
|
1472
1464
|
F: __dxlog_file8,
|
|
@@ -1477,30 +1469,30 @@ var NotarizationPlugin = class extends Resource3 {
|
|
|
1477
1469
|
""
|
|
1478
1470
|
]
|
|
1479
1471
|
});
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
clearInterval(this._activeEdgePollingIntervalHandle);
|
|
1488
|
-
this._activeEdgePollingIntervalHandle = void 0;
|
|
1472
|
+
this._activeEdgePollingEnabled = enabled;
|
|
1473
|
+
if (this.isOpen) {
|
|
1474
|
+
if (enabled && !this._activeEdgePollingIntervalHandle) {
|
|
1475
|
+
this._startPeriodicEdgePolling(client);
|
|
1476
|
+
} else if (!enabled && this._activeEdgePollingIntervalHandle) {
|
|
1477
|
+
this._stopPeriodicEdgePolling();
|
|
1478
|
+
}
|
|
1489
1479
|
}
|
|
1490
1480
|
}
|
|
1491
1481
|
get hasWriter() {
|
|
1492
1482
|
return !!this._writer;
|
|
1493
1483
|
}
|
|
1494
1484
|
async _open() {
|
|
1495
|
-
if (this._edgeClient
|
|
1496
|
-
|
|
1485
|
+
if (this._edgeClient) {
|
|
1486
|
+
if (this._activeEdgePollingEnabled) {
|
|
1487
|
+
this._startPeriodicEdgePolling(this._edgeClient);
|
|
1488
|
+
}
|
|
1489
|
+
if (this._writer) {
|
|
1490
|
+
this._notarizePendingEdgeCredentials(this._edgeClient, this._writer);
|
|
1491
|
+
}
|
|
1497
1492
|
}
|
|
1498
1493
|
}
|
|
1499
1494
|
async _close() {
|
|
1500
|
-
|
|
1501
|
-
clearInterval(this._activeEdgePollingIntervalHandle);
|
|
1502
|
-
this._activeEdgePollingIntervalHandle = void 0;
|
|
1503
|
-
}
|
|
1495
|
+
this._stopPeriodicEdgePolling();
|
|
1504
1496
|
await this._ctx.dispose();
|
|
1505
1497
|
}
|
|
1506
1498
|
/**
|
|
@@ -1678,10 +1670,23 @@ var NotarizationPlugin = class extends Resource3 {
|
|
|
1678
1670
|
]
|
|
1679
1671
|
});
|
|
1680
1672
|
this._writer = writer;
|
|
1681
|
-
if (this._edgeClient) {
|
|
1673
|
+
if (this._edgeClient && this.isOpen) {
|
|
1682
1674
|
this._notarizePendingEdgeCredentials(this._edgeClient, writer);
|
|
1683
1675
|
}
|
|
1684
1676
|
}
|
|
1677
|
+
_startPeriodicEdgePolling(client) {
|
|
1678
|
+
this._activeEdgePollingIntervalHandle = setInterval(() => {
|
|
1679
|
+
if (this._writer) {
|
|
1680
|
+
this._notarizePendingEdgeCredentials(client, this._writer);
|
|
1681
|
+
}
|
|
1682
|
+
}, this._activeEdgePollingInterval);
|
|
1683
|
+
}
|
|
1684
|
+
_stopPeriodicEdgePolling() {
|
|
1685
|
+
if (this._activeEdgePollingIntervalHandle) {
|
|
1686
|
+
clearInterval(this._activeEdgePollingIntervalHandle);
|
|
1687
|
+
this._activeEdgePollingIntervalHandle = void 0;
|
|
1688
|
+
}
|
|
1689
|
+
}
|
|
1685
1690
|
/**
|
|
1686
1691
|
* The method is used only for adding agent feeds to spaces.
|
|
1687
1692
|
* When an agent is created we can admit them into all the existing spaces. In case the operation fails
|
|
@@ -1700,7 +1705,7 @@ var NotarizationPlugin = class extends Resource3 {
|
|
|
1700
1705
|
if (!credentials.length) {
|
|
1701
1706
|
log5("edge did not return credentials for notarization", void 0, {
|
|
1702
1707
|
F: __dxlog_file8,
|
|
1703
|
-
L:
|
|
1708
|
+
L: 311,
|
|
1704
1709
|
S: this,
|
|
1705
1710
|
C: (f, a) => f(...a)
|
|
1706
1711
|
});
|
|
@@ -1710,7 +1715,7 @@ var NotarizationPlugin = class extends Resource3 {
|
|
|
1710
1715
|
count: credentials.length
|
|
1711
1716
|
}, {
|
|
1712
1717
|
F: __dxlog_file8,
|
|
1713
|
-
L:
|
|
1718
|
+
L: 315,
|
|
1714
1719
|
S: this,
|
|
1715
1720
|
C: (f, a) => f(...a)
|
|
1716
1721
|
});
|
|
@@ -1723,7 +1728,7 @@ var NotarizationPlugin = class extends Resource3 {
|
|
|
1723
1728
|
count: decodedCredentials.length
|
|
1724
1729
|
}, {
|
|
1725
1730
|
F: __dxlog_file8,
|
|
1726
|
-
L:
|
|
1731
|
+
L: 324,
|
|
1727
1732
|
S: this,
|
|
1728
1733
|
C: (f, a) => f(...a)
|
|
1729
1734
|
});
|
|
@@ -1751,7 +1756,7 @@ var NotarizationPlugin = class extends Resource3 {
|
|
|
1751
1756
|
for (const credential of credentials) {
|
|
1752
1757
|
invariant4(credential.id, "Credential must have an id", {
|
|
1753
1758
|
F: __dxlog_file8,
|
|
1754
|
-
L:
|
|
1759
|
+
L: 350,
|
|
1755
1760
|
S: this,
|
|
1756
1761
|
A: [
|
|
1757
1762
|
"credential.id",
|
|
@@ -1775,7 +1780,7 @@ var NotarizationPlugin = class extends Resource3 {
|
|
|
1775
1780
|
peer: extension.localPeerId
|
|
1776
1781
|
}, {
|
|
1777
1782
|
F: __dxlog_file8,
|
|
1778
|
-
L:
|
|
1783
|
+
L: 365,
|
|
1779
1784
|
S: this,
|
|
1780
1785
|
C: (f, a) => f(...a)
|
|
1781
1786
|
});
|
|
@@ -1787,7 +1792,7 @@ var NotarizationPlugin = class extends Resource3 {
|
|
|
1787
1792
|
peer: extension.localPeerId
|
|
1788
1793
|
}, {
|
|
1789
1794
|
F: __dxlog_file8,
|
|
1790
|
-
L:
|
|
1795
|
+
L: 370,
|
|
1791
1796
|
S: this,
|
|
1792
1797
|
C: (f, a) => f(...a)
|
|
1793
1798
|
});
|
|
@@ -1804,7 +1809,7 @@ var NotarizationPlugin = class extends Resource3 {
|
|
|
1804
1809
|
peers: Array.from(this._extensions).map((extension) => extension.remotePeerId)
|
|
1805
1810
|
}, {
|
|
1806
1811
|
F: __dxlog_file8,
|
|
1807
|
-
L:
|
|
1812
|
+
L: 382,
|
|
1808
1813
|
S: this,
|
|
1809
1814
|
C: (f, a) => f(...a)
|
|
1810
1815
|
});
|
|
@@ -1820,7 +1825,7 @@ var handleEdgeError = (error) => {
|
|
|
1820
1825
|
if (!(error instanceof EdgeCallFailedError) || error.errorData) {
|
|
1821
1826
|
log5.catch(error, void 0, {
|
|
1822
1827
|
F: __dxlog_file8,
|
|
1823
|
-
L:
|
|
1828
|
+
L: 396,
|
|
1824
1829
|
S: void 0,
|
|
1825
1830
|
C: (f, a) => f(...a)
|
|
1826
1831
|
});
|
|
@@ -1829,7 +1834,7 @@ var handleEdgeError = (error) => {
|
|
|
1829
1834
|
reason: error.reason
|
|
1830
1835
|
}, {
|
|
1831
1836
|
F: __dxlog_file8,
|
|
1832
|
-
L:
|
|
1837
|
+
L: 398,
|
|
1833
1838
|
S: void 0,
|
|
1834
1839
|
C: (f, a) => f(...a)
|
|
1835
1840
|
});
|
|
@@ -2670,7 +2675,7 @@ DataSpaceManager = _ts_decorate3([
|
|
|
2670
2675
|
|
|
2671
2676
|
// packages/sdk/client-services/src/packlets/spaces/spaces-service.ts
|
|
2672
2677
|
import { EventSubscriptions as EventSubscriptions2, UpdateScheduler, scheduleTask as scheduleTask3 } from "@dxos/async";
|
|
2673
|
-
import { Stream as Stream7 } from "@dxos/codec-protobuf";
|
|
2678
|
+
import { Stream as Stream7 } from "@dxos/codec-protobuf/stream";
|
|
2674
2679
|
import { createAdmissionCredentials as createAdmissionCredentials2, getCredentialAssertion as getCredentialAssertion3 } from "@dxos/credentials";
|
|
2675
2680
|
import { raise } from "@dxos/debug";
|
|
2676
2681
|
import { writeMessages as writeMessages2 } from "@dxos/feed-store";
|
|
@@ -3756,7 +3761,7 @@ IdentityManager = _ts_decorate5([
|
|
|
3756
3761
|
|
|
3757
3762
|
// packages/sdk/client-services/src/packlets/identity/identity-service.ts
|
|
3758
3763
|
import { Trigger as Trigger4, sleep as sleep2 } from "@dxos/async";
|
|
3759
|
-
import { Stream as Stream8 } from "@dxos/codec-protobuf";
|
|
3764
|
+
import { Stream as Stream8 } from "@dxos/codec-protobuf/stream";
|
|
3760
3765
|
import { Resource as Resource5 } from "@dxos/context";
|
|
3761
3766
|
import { createCredential as createCredential2, signPresentation } from "@dxos/credentials";
|
|
3762
3767
|
import { invariant as invariant9 } from "@dxos/invariant";
|
|
@@ -6140,7 +6145,7 @@ var createAdmissionKeypair = () => {
|
|
|
6140
6145
|
};
|
|
6141
6146
|
|
|
6142
6147
|
// packages/sdk/client-services/src/packlets/invitations/invitations-service.ts
|
|
6143
|
-
import { Stream as Stream9 } from "@dxos/codec-protobuf";
|
|
6148
|
+
import { Stream as Stream9 } from "@dxos/codec-protobuf/stream";
|
|
6144
6149
|
import { QueryInvitationsResponse } from "@dxos/protocols/proto/dxos/client/services";
|
|
6145
6150
|
import { trace as trace8 } from "@dxos/tracing";
|
|
6146
6151
|
var InvitationsServiceImpl = class {
|
|
@@ -7322,7 +7327,7 @@ _ts_decorate9([
|
|
|
7322
7327
|
], EdgeAgentManager.prototype, "createAgent", null);
|
|
7323
7328
|
|
|
7324
7329
|
// packages/sdk/client-services/src/packlets/agents/edge-agent-service.ts
|
|
7325
|
-
import { Stream as Stream11 } from "@dxos/codec-protobuf";
|
|
7330
|
+
import { Stream as Stream11 } from "@dxos/codec-protobuf/stream";
|
|
7326
7331
|
import { EdgeAgentStatus as EdgeAgentStatus2 } from "@dxos/protocols";
|
|
7327
7332
|
import { QueryAgentStatusResponse, QueryEdgeStatusResponse } from "@dxos/protocols/proto/dxos/client/services";
|
|
7328
7333
|
var EdgeAgentServiceImpl = class {
|
|
@@ -7630,7 +7635,8 @@ var ServiceContext = class extends Resource7 {
|
|
|
7630
7635
|
this.recoveryManager = new EdgeIdentityRecoveryManager(this.keyring, this._edgeHttpClient, () => this.identityManager.identity, this._acceptIdentity.bind(this));
|
|
7631
7636
|
this.echoHost = new EchoHost({
|
|
7632
7637
|
kv: this.level,
|
|
7633
|
-
peerIdProvider: () => this.identityManager.identity?.deviceKey?.toHex()
|
|
7638
|
+
peerIdProvider: () => this.identityManager.identity?.deviceKey?.toHex(),
|
|
7639
|
+
getSpaceKeyByRootDocumentId: (documentId) => this.spaceManager.findSpaceByRootDocumentId(documentId)?.key
|
|
7634
7640
|
});
|
|
7635
7641
|
this._meshReplicator = new MeshEchoReplicator();
|
|
7636
7642
|
this.invitations = new InvitationsHandler(this.networkManager, this._edgeHttpClient, _runtimeParams?.invitationConnectionDefaultParams);
|
|
@@ -7649,7 +7655,7 @@ var ServiceContext = class extends Resource7 {
|
|
|
7649
7655
|
await this._checkStorageVersion();
|
|
7650
7656
|
log24("opening...", void 0, {
|
|
7651
7657
|
F: __dxlog_file28,
|
|
7652
|
-
L:
|
|
7658
|
+
L: 199,
|
|
7653
7659
|
S: this,
|
|
7654
7660
|
C: (f, a) => f(...a)
|
|
7655
7661
|
});
|
|
@@ -7657,7 +7663,7 @@ var ServiceContext = class extends Resource7 {
|
|
|
7657
7663
|
id: this._instanceId
|
|
7658
7664
|
}), {
|
|
7659
7665
|
F: __dxlog_file28,
|
|
7660
|
-
L:
|
|
7666
|
+
L: 200,
|
|
7661
7667
|
S: this,
|
|
7662
7668
|
C: (f, a) => f(...a)
|
|
7663
7669
|
});
|
|
@@ -7684,7 +7690,7 @@ var ServiceContext = class extends Resource7 {
|
|
|
7684
7690
|
count: loadedInvitations.invitations?.length
|
|
7685
7691
|
}, {
|
|
7686
7692
|
F: __dxlog_file28,
|
|
7687
|
-
L:
|
|
7693
|
+
L: 228,
|
|
7688
7694
|
S: this,
|
|
7689
7695
|
C: (f, a) => f(...a)
|
|
7690
7696
|
});
|
|
@@ -7692,13 +7698,13 @@ var ServiceContext = class extends Resource7 {
|
|
|
7692
7698
|
id: this._instanceId
|
|
7693
7699
|
}), {
|
|
7694
7700
|
F: __dxlog_file28,
|
|
7695
|
-
L:
|
|
7701
|
+
L: 230,
|
|
7696
7702
|
S: this,
|
|
7697
7703
|
C: (f, a) => f(...a)
|
|
7698
7704
|
});
|
|
7699
7705
|
log24("opened", void 0, {
|
|
7700
7706
|
F: __dxlog_file28,
|
|
7701
|
-
L:
|
|
7707
|
+
L: 231,
|
|
7702
7708
|
S: this,
|
|
7703
7709
|
C: (f, a) => f(...a)
|
|
7704
7710
|
});
|
|
@@ -7706,7 +7712,7 @@ var ServiceContext = class extends Resource7 {
|
|
|
7706
7712
|
async _close(ctx) {
|
|
7707
7713
|
log24("closing...", void 0, {
|
|
7708
7714
|
F: __dxlog_file28,
|
|
7709
|
-
L:
|
|
7715
|
+
L: 235,
|
|
7710
7716
|
S: this,
|
|
7711
7717
|
C: (f, a) => f(...a)
|
|
7712
7718
|
});
|
|
@@ -7725,7 +7731,7 @@ var ServiceContext = class extends Resource7 {
|
|
|
7725
7731
|
await this._edgeConnection?.close();
|
|
7726
7732
|
log24("closed", void 0, {
|
|
7727
7733
|
F: __dxlog_file28,
|
|
7728
|
-
L:
|
|
7734
|
+
L: 251,
|
|
7729
7735
|
S: this,
|
|
7730
7736
|
C: (f, a) => f(...a)
|
|
7731
7737
|
});
|
|
@@ -7736,7 +7742,7 @@ var ServiceContext = class extends Resource7 {
|
|
|
7736
7742
|
await identity.joinNetwork();
|
|
7737
7743
|
await this._initialize(new Context9(void 0, {
|
|
7738
7744
|
F: __dxlog_file28,
|
|
7739
|
-
L:
|
|
7745
|
+
L: 258
|
|
7740
7746
|
}));
|
|
7741
7747
|
return identity;
|
|
7742
7748
|
}
|
|
@@ -7747,7 +7753,7 @@ var ServiceContext = class extends Resource7 {
|
|
|
7747
7753
|
const factory = this._handlerFactories.get(invitation.kind);
|
|
7748
7754
|
invariant20(factory, `Unknown invitation kind: ${invitation.kind}`, {
|
|
7749
7755
|
F: __dxlog_file28,
|
|
7750
|
-
L:
|
|
7756
|
+
L: 267,
|
|
7751
7757
|
S: this,
|
|
7752
7758
|
A: [
|
|
7753
7759
|
"factory",
|
|
@@ -7773,7 +7779,7 @@ var ServiceContext = class extends Resource7 {
|
|
|
7773
7779
|
await this.identityManager.acceptIdentity(identity, identityRecord, params.deviceProfile);
|
|
7774
7780
|
await this._initialize(new Context9(void 0, {
|
|
7775
7781
|
F: __dxlog_file28,
|
|
7776
|
-
L:
|
|
7782
|
+
L: 286
|
|
7777
7783
|
}));
|
|
7778
7784
|
return identity;
|
|
7779
7785
|
}
|
|
@@ -7787,7 +7793,7 @@ var ServiceContext = class extends Resource7 {
|
|
|
7787
7793
|
async _initialize(ctx) {
|
|
7788
7794
|
log24("initializing spaces...", void 0, {
|
|
7789
7795
|
F: __dxlog_file28,
|
|
7790
|
-
L:
|
|
7796
|
+
L: 301,
|
|
7791
7797
|
S: this,
|
|
7792
7798
|
C: (f, a) => f(...a)
|
|
7793
7799
|
});
|
|
@@ -7826,7 +7832,7 @@ var ServiceContext = class extends Resource7 {
|
|
|
7826
7832
|
this._handlerFactories.set(Invitation10.Kind.SPACE, (invitation) => {
|
|
7827
7833
|
invariant20(this.dataSpaceManager, "dataSpaceManager not initialized yet", {
|
|
7828
7834
|
F: __dxlog_file28,
|
|
7829
|
-
L:
|
|
7835
|
+
L: 339,
|
|
7830
7836
|
S: this,
|
|
7831
7837
|
A: [
|
|
7832
7838
|
"this.dataSpaceManager",
|
|
@@ -7850,7 +7856,7 @@ var ServiceContext = class extends Resource7 {
|
|
|
7850
7856
|
details: assertion
|
|
7851
7857
|
}, {
|
|
7852
7858
|
F: __dxlog_file28,
|
|
7853
|
-
L:
|
|
7859
|
+
L: 355,
|
|
7854
7860
|
S: this,
|
|
7855
7861
|
C: (f, a) => f(...a)
|
|
7856
7862
|
});
|
|
@@ -7861,7 +7867,7 @@ var ServiceContext = class extends Resource7 {
|
|
|
7861
7867
|
details: assertion
|
|
7862
7868
|
}, {
|
|
7863
7869
|
F: __dxlog_file28,
|
|
7864
|
-
L:
|
|
7870
|
+
L: 359,
|
|
7865
7871
|
S: this,
|
|
7866
7872
|
C: (f, a) => f(...a)
|
|
7867
7873
|
});
|
|
@@ -7872,7 +7878,7 @@ var ServiceContext = class extends Resource7 {
|
|
|
7872
7878
|
details: assertion
|
|
7873
7879
|
}, {
|
|
7874
7880
|
F: __dxlog_file28,
|
|
7875
|
-
L:
|
|
7881
|
+
L: 364,
|
|
7876
7882
|
S: this,
|
|
7877
7883
|
C: (f, a) => f(...a)
|
|
7878
7884
|
});
|
|
@@ -7883,7 +7889,7 @@ var ServiceContext = class extends Resource7 {
|
|
|
7883
7889
|
} catch (err) {
|
|
7884
7890
|
log24.catch(err, void 0, {
|
|
7885
7891
|
F: __dxlog_file28,
|
|
7886
|
-
L:
|
|
7892
|
+
L: 370,
|
|
7887
7893
|
S: this,
|
|
7888
7894
|
C: (f, a) => f(...a)
|
|
7889
7895
|
});
|
|
@@ -7904,7 +7910,7 @@ var ServiceContext = class extends Resource7 {
|
|
|
7904
7910
|
swarms: this.networkManager.topics
|
|
7905
7911
|
}, {
|
|
7906
7912
|
F: __dxlog_file28,
|
|
7907
|
-
L:
|
|
7913
|
+
L: 384,
|
|
7908
7914
|
S: this,
|
|
7909
7915
|
C: (f, a) => f(...a)
|
|
7910
7916
|
});
|
|
@@ -7918,7 +7924,7 @@ var ServiceContext = class extends Resource7 {
|
|
|
7918
7924
|
});
|
|
7919
7925
|
invariant20(identity.deviceCredentialChain, void 0, {
|
|
7920
7926
|
F: __dxlog_file28,
|
|
7921
|
-
L:
|
|
7927
|
+
L: 403,
|
|
7922
7928
|
S: this,
|
|
7923
7929
|
A: [
|
|
7924
7930
|
"identity.deviceCredentialChain",
|
|
@@ -8228,7 +8234,7 @@ import { WebsocketRpcClient } from "@dxos/websocket-rpc";
|
|
|
8228
8234
|
|
|
8229
8235
|
// packages/sdk/client-services/src/packlets/devices/devices-service.ts
|
|
8230
8236
|
import { EventSubscriptions as EventSubscriptions3 } from "@dxos/async";
|
|
8231
|
-
import { Stream as Stream12 } from "@dxos/codec-protobuf";
|
|
8237
|
+
import { Stream as Stream12 } from "@dxos/codec-protobuf/stream";
|
|
8232
8238
|
import { invariant as invariant22 } from "@dxos/invariant";
|
|
8233
8239
|
import { Device as Device2, DeviceKind as DeviceKind2 } from "@dxos/protocols/proto/dxos/client/services";
|
|
8234
8240
|
var __dxlog_file30 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/devices/devices-service.ts";
|
|
@@ -8318,7 +8324,7 @@ var DevicesServiceImpl = class {
|
|
|
8318
8324
|
|
|
8319
8325
|
// packages/sdk/client-services/src/packlets/identity/contacts-service.ts
|
|
8320
8326
|
import { EventSubscriptions as EventSubscriptions4, scheduleTask as scheduleTask9, UpdateScheduler as UpdateScheduler2 } from "@dxos/async";
|
|
8321
|
-
import { Stream as Stream13 } from "@dxos/codec-protobuf";
|
|
8327
|
+
import { Stream as Stream13 } from "@dxos/codec-protobuf/stream";
|
|
8322
8328
|
import { PublicKey as PublicKey17 } from "@dxos/keys";
|
|
8323
8329
|
import { ComplexMap as ComplexMap5, ComplexSet as ComplexSet6 } from "@dxos/util";
|
|
8324
8330
|
var ContactsServiceImpl = class {
|
|
@@ -8401,7 +8407,7 @@ var ContactsServiceImpl = class {
|
|
|
8401
8407
|
|
|
8402
8408
|
// packages/sdk/client-services/src/packlets/logging/logging-service.ts
|
|
8403
8409
|
import { Event as Event10 } from "@dxos/async";
|
|
8404
|
-
import { Stream as Stream14 } from "@dxos/codec-protobuf";
|
|
8410
|
+
import { Stream as Stream14 } from "@dxos/codec-protobuf/stream";
|
|
8405
8411
|
import { PublicKey as PublicKey18 } from "@dxos/keys";
|
|
8406
8412
|
import { getContextFromEntry, log as log26 } from "@dxos/log";
|
|
8407
8413
|
import { QueryLogsRequest } from "@dxos/protocols/proto/dxos/client/services";
|
|
@@ -8524,7 +8530,7 @@ var shouldLog = (entry2, request) => {
|
|
|
8524
8530
|
var LOG_PROCESSING = 0;
|
|
8525
8531
|
|
|
8526
8532
|
// packages/sdk/client-services/src/packlets/network/network-service.ts
|
|
8527
|
-
import { Stream as Stream15 } from "@dxos/codec-protobuf";
|
|
8533
|
+
import { Stream as Stream15 } from "@dxos/codec-protobuf/stream";
|
|
8528
8534
|
var NetworkServiceImpl = class {
|
|
8529
8535
|
constructor(networkManager, signalManager) {
|
|
8530
8536
|
this.networkManager = networkManager;
|
|
@@ -8554,10 +8560,39 @@ var NetworkServiceImpl = class {
|
|
|
8554
8560
|
async updateConfig(request) {
|
|
8555
8561
|
await this.networkManager.setConnectionState(request.swarm);
|
|
8556
8562
|
}
|
|
8563
|
+
async joinSwarm(request) {
|
|
8564
|
+
return this.signalManager.join(request);
|
|
8565
|
+
}
|
|
8566
|
+
async leaveSwarm(request) {
|
|
8567
|
+
return this.signalManager.leave(request);
|
|
8568
|
+
}
|
|
8569
|
+
subscribeSwarmState(request) {
|
|
8570
|
+
return new Stream15(({ next }) => {
|
|
8571
|
+
const unsubscribe = this.signalManager.swarmState?.on((state) => {
|
|
8572
|
+
if (request.topic.equals(state.swarmKey)) {
|
|
8573
|
+
next(state);
|
|
8574
|
+
}
|
|
8575
|
+
});
|
|
8576
|
+
return unsubscribe;
|
|
8577
|
+
});
|
|
8578
|
+
}
|
|
8579
|
+
async sendMessage(message) {
|
|
8580
|
+
return this.signalManager.sendMessage(message);
|
|
8581
|
+
}
|
|
8582
|
+
subscribeMessages(peer) {
|
|
8583
|
+
return new Stream15(({ next }) => {
|
|
8584
|
+
const unsubscribe = this.signalManager.onMessage.on((message) => {
|
|
8585
|
+
if (message.recipient.peerKey === peer.peerKey) {
|
|
8586
|
+
next(message);
|
|
8587
|
+
}
|
|
8588
|
+
});
|
|
8589
|
+
return unsubscribe;
|
|
8590
|
+
});
|
|
8591
|
+
}
|
|
8557
8592
|
};
|
|
8558
8593
|
|
|
8559
8594
|
// packages/sdk/client-services/src/packlets/system/system-service.ts
|
|
8560
|
-
import { Stream as Stream16 } from "@dxos/codec-protobuf";
|
|
8595
|
+
import { Stream as Stream16 } from "@dxos/codec-protobuf/stream";
|
|
8561
8596
|
import { GetDiagnosticsRequest as GetDiagnosticsRequest2 } from "@dxos/protocols/proto/dxos/client/services";
|
|
8562
8597
|
import { jsonKeyReplacer as jsonKeyReplacer2 } from "@dxos/util";
|
|
8563
8598
|
var SystemServiceImpl = class {
|
|
@@ -9061,4 +9096,4 @@ export {
|
|
|
9061
9096
|
importProfileData,
|
|
9062
9097
|
ClientServicesHost
|
|
9063
9098
|
};
|
|
9064
|
-
//# sourceMappingURL=chunk-
|
|
9099
|
+
//# sourceMappingURL=chunk-RFZHCLFI.mjs.map
|