@dxos/client-services 0.7.5-labs.f5080a1 → 0.7.5-labs.ff2ff30
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-DBNNIIDX.mjs → chunk-AMSHD6GR.mjs} +24 -12
- package/dist/lib/browser/chunk-AMSHD6GR.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-ILDTBTLD.cjs → chunk-UQAKITCH.cjs} +27 -15
- package/dist/lib/node/chunk-UQAKITCH.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-3MCQQTE7.mjs → chunk-V6DIXWIU.mjs} +24 -12
- package/dist/lib/node-esm/chunk-V6DIXWIU.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-manager.d.ts.map +1 -1
- package/dist/types/src/version.d.ts +1 -1
- package/package.json +38 -38
- package/src/packlets/agents/edge-agent-manager.ts +6 -0
- package/src/packlets/spaces/data-space-manager.ts +2 -2
- package/src/version.ts +1 -1
- package/dist/lib/browser/chunk-DBNNIIDX.mjs.map +0 -7
- package/dist/lib/node/chunk-ILDTBTLD.cjs.map +0 -7
- package/dist/lib/node-esm/chunk-3MCQQTE7.mjs.map +0 -7
|
@@ -32,7 +32,7 @@ __export(testing_exports, {
|
|
|
32
32
|
sanitizeInvitation: () => sanitizeInvitation
|
|
33
33
|
});
|
|
34
34
|
module.exports = __toCommonJS(testing_exports);
|
|
35
|
-
var
|
|
35
|
+
var import_chunk_UQAKITCH = require("../chunk-UQAKITCH.cjs");
|
|
36
36
|
var import_credentials = require("@dxos/credentials");
|
|
37
37
|
var import_keys = require("@dxos/keys");
|
|
38
38
|
var import_async = require("@dxos/async");
|
|
@@ -235,7 +235,7 @@ var createInvitation = async (host, options) => {
|
|
|
235
235
|
authMethod: import_services.Invitation.AuthMethod.NONE,
|
|
236
236
|
...options ?? {}
|
|
237
237
|
};
|
|
238
|
-
if (host instanceof
|
|
238
|
+
if (host instanceof import_chunk_UQAKITCH.ServiceContext) {
|
|
239
239
|
return host.invitationsManager.createInvitation({
|
|
240
240
|
kind: import_services.Invitation.Kind.SPACE,
|
|
241
241
|
...options
|
|
@@ -245,7 +245,7 @@ var createInvitation = async (host, options) => {
|
|
|
245
245
|
};
|
|
246
246
|
var acceptInvitation = (guest, invitation, guestDeviceProfile) => {
|
|
247
247
|
invitation = sanitizeInvitation(invitation);
|
|
248
|
-
if (guest instanceof
|
|
248
|
+
if (guest instanceof import_chunk_UQAKITCH.ServiceContext) {
|
|
249
249
|
return guest.invitationsManager.acceptInvitation({
|
|
250
250
|
invitation,
|
|
251
251
|
deviceProfile: guestDeviceProfile
|
|
@@ -255,7 +255,7 @@ var acceptInvitation = (guest, invitation, guestDeviceProfile) => {
|
|
|
255
255
|
};
|
|
256
256
|
var __dxlog_file2 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/testing/test-builder.ts";
|
|
257
257
|
var createServiceHost = (config, signalManagerContext) => {
|
|
258
|
-
return new
|
|
258
|
+
return new import_chunk_UQAKITCH.ClientServicesHost({
|
|
259
259
|
config,
|
|
260
260
|
signalManager: new import_messaging.MemorySignalManager(signalManagerContext),
|
|
261
261
|
transportFactory: import_network_manager.MemoryTransportFactory
|
|
@@ -274,7 +274,7 @@ var createServiceContext = async ({ signalManagerFactory = async () => {
|
|
|
274
274
|
});
|
|
275
275
|
const level = (0, import_testing.createTestLevel)();
|
|
276
276
|
await level.open();
|
|
277
|
-
return new
|
|
277
|
+
return new import_chunk_UQAKITCH.ServiceContext(storage, level, networkManager, signalManager, void 0, void 0, {
|
|
278
278
|
invitationConnectionDefaultParams: {
|
|
279
279
|
teleport: {
|
|
280
280
|
controlHeartbeatInterval: 200
|
|
@@ -385,7 +385,7 @@ var TestPeer = class {
|
|
|
385
385
|
return this._props.meshEchoReplicator ??= new import_echo_pipeline.MeshEchoReplicator();
|
|
386
386
|
}
|
|
387
387
|
get dataSpaceManager() {
|
|
388
|
-
return this._props.dataSpaceManager ??= new
|
|
388
|
+
return this._props.dataSpaceManager ??= new import_chunk_UQAKITCH.DataSpaceManager({
|
|
389
389
|
spaceManager: this.spaceManager,
|
|
390
390
|
metadataStore: this.metadataStore,
|
|
391
391
|
keyring: this.keyring,
|
|
@@ -400,9 +400,9 @@ var TestPeer = class {
|
|
|
400
400
|
});
|
|
401
401
|
}
|
|
402
402
|
get invitationsManager() {
|
|
403
|
-
return this._props.invitationsManager ??= new
|
|
403
|
+
return this._props.invitationsManager ??= new import_chunk_UQAKITCH.InvitationsManager(new import_chunk_UQAKITCH.InvitationsHandler(this.networkManager), (invitation) => {
|
|
404
404
|
if (invitation.kind === import_services2.Invitation.Kind.SPACE) {
|
|
405
|
-
return new
|
|
405
|
+
return new import_chunk_UQAKITCH.SpaceInvitationProtocol(this.dataSpaceManager, this.identity, this.keyring, invitation.spaceKey);
|
|
406
406
|
} else {
|
|
407
407
|
throw new Error("not implemented");
|
|
408
408
|
}
|
|
@@ -397,7 +397,7 @@ import { SpaceMember } from "@dxos/protocols/proto/dxos/client/services";
|
|
|
397
397
|
import { TRACE_PROCESSOR } from "@dxos/tracing";
|
|
398
398
|
|
|
399
399
|
// packages/sdk/client-services/src/version.ts
|
|
400
|
-
var DXOS_VERSION = "0.7.5-labs.
|
|
400
|
+
var DXOS_VERSION = "0.7.5-labs.ff2ff30";
|
|
401
401
|
|
|
402
402
|
// packages/sdk/client-services/src/packlets/services/platform.ts
|
|
403
403
|
import { Platform } from "@dxos/protocols/proto/dxos/client/services";
|
|
@@ -2452,7 +2452,7 @@ var DataSpaceManager = class extends Resource4 {
|
|
|
2452
2452
|
});
|
|
2453
2453
|
dataSpace.postOpen.append(async () => {
|
|
2454
2454
|
const setting = dataSpace.getEdgeReplicationSetting();
|
|
2455
|
-
if (setting === EdgeReplicationSetting.ENABLED) {
|
|
2455
|
+
if (!setting || setting === EdgeReplicationSetting.ENABLED) {
|
|
2456
2456
|
await this._echoEdgeReplicator?.connectToSpace(dataSpace.id);
|
|
2457
2457
|
} else if (this._echoEdgeReplicator) {
|
|
2458
2458
|
log6("not connecting EchoEdgeReplicator because of EdgeReplicationSetting", {
|
|
@@ -2467,7 +2467,7 @@ var DataSpaceManager = class extends Resource4 {
|
|
|
2467
2467
|
});
|
|
2468
2468
|
dataSpace.preClose.append(async () => {
|
|
2469
2469
|
const setting = dataSpace.getEdgeReplicationSetting();
|
|
2470
|
-
if (setting === EdgeReplicationSetting.ENABLED) {
|
|
2470
|
+
if (!setting || setting === EdgeReplicationSetting.ENABLED) {
|
|
2471
2471
|
await this._echoEdgeReplicator?.disconnectFromSpace(dataSpace.id);
|
|
2472
2472
|
}
|
|
2473
2473
|
});
|
|
@@ -7016,6 +7016,18 @@ var EdgeAgentManager = class extends Resource6 {
|
|
|
7016
7016
|
haloSpaceKey: this._identity.haloSpaceKey.toHex()
|
|
7017
7017
|
});
|
|
7018
7018
|
const deviceKey = PublicKey13.fromHex(response.deviceKey);
|
|
7019
|
+
if (await this._identity.authorizedDeviceKeys.has(deviceKey)) {
|
|
7020
|
+
log21.info("agent was already added to HALO, ignoring response", {
|
|
7021
|
+
response
|
|
7022
|
+
}, {
|
|
7023
|
+
F: __dxlog_file25,
|
|
7024
|
+
L: 67,
|
|
7025
|
+
S: this,
|
|
7026
|
+
C: (f, a) => f(...a)
|
|
7027
|
+
});
|
|
7028
|
+
this._updateStatus(EdgeAgentStatus.ACTIVE, deviceKey);
|
|
7029
|
+
return;
|
|
7030
|
+
}
|
|
7019
7031
|
await this._identity.admitDevice({
|
|
7020
7032
|
deviceKey,
|
|
7021
7033
|
controlFeedKey: PublicKey13.fromHex(response.feedKey),
|
|
@@ -7024,7 +7036,7 @@ var EdgeAgentManager = class extends Resource6 {
|
|
|
7024
7036
|
});
|
|
7025
7037
|
log21("agent created", response, {
|
|
7026
7038
|
F: __dxlog_file25,
|
|
7027
|
-
L:
|
|
7039
|
+
L: 79,
|
|
7028
7040
|
S: this,
|
|
7029
7041
|
C: (f, a) => f(...a)
|
|
7030
7042
|
});
|
|
@@ -7036,7 +7048,7 @@ var EdgeAgentManager = class extends Resource6 {
|
|
|
7036
7048
|
isEnabled
|
|
7037
7049
|
}, {
|
|
7038
7050
|
F: __dxlog_file25,
|
|
7039
|
-
L:
|
|
7051
|
+
L: 87,
|
|
7040
7052
|
S: this,
|
|
7041
7053
|
C: (f, a) => f(...a)
|
|
7042
7054
|
});
|
|
@@ -7069,7 +7081,7 @@ var EdgeAgentManager = class extends Resource6 {
|
|
|
7069
7081
|
async _fetchAgentStatus() {
|
|
7070
7082
|
invariant19(this._edgeHttpClient, void 0, {
|
|
7071
7083
|
F: __dxlog_file25,
|
|
7072
|
-
L:
|
|
7084
|
+
L: 121,
|
|
7073
7085
|
S: this,
|
|
7074
7086
|
A: [
|
|
7075
7087
|
"this._edgeHttpClient",
|
|
@@ -7079,7 +7091,7 @@ var EdgeAgentManager = class extends Resource6 {
|
|
|
7079
7091
|
try {
|
|
7080
7092
|
log21("fetching agent status", void 0, {
|
|
7081
7093
|
F: __dxlog_file25,
|
|
7082
|
-
L:
|
|
7094
|
+
L: 123,
|
|
7083
7095
|
S: this,
|
|
7084
7096
|
C: (f, a) => f(...a)
|
|
7085
7097
|
});
|
|
@@ -7098,7 +7110,7 @@ var EdgeAgentManager = class extends Resource6 {
|
|
|
7098
7110
|
err
|
|
7099
7111
|
}, {
|
|
7100
7112
|
F: __dxlog_file25,
|
|
7101
|
-
L:
|
|
7113
|
+
L: 133,
|
|
7102
7114
|
S: this,
|
|
7103
7115
|
C: (f, a) => f(...a)
|
|
7104
7116
|
});
|
|
@@ -7111,7 +7123,7 @@ var EdgeAgentManager = class extends Resource6 {
|
|
|
7111
7123
|
retryAfterMs
|
|
7112
7124
|
}, {
|
|
7113
7125
|
F: __dxlog_file25,
|
|
7114
|
-
L:
|
|
7126
|
+
L: 138,
|
|
7115
7127
|
S: this,
|
|
7116
7128
|
C: (f, a) => f(...a)
|
|
7117
7129
|
});
|
|
@@ -7147,7 +7159,7 @@ var EdgeAgentManager = class extends Resource6 {
|
|
|
7147
7159
|
spaceId: space.id
|
|
7148
7160
|
}, {
|
|
7149
7161
|
F: __dxlog_file25,
|
|
7150
|
-
L:
|
|
7162
|
+
L: 165,
|
|
7151
7163
|
S: this,
|
|
7152
7164
|
C: (f, a) => f(...a)
|
|
7153
7165
|
});
|
|
@@ -7167,7 +7179,7 @@ var EdgeAgentManager = class extends Resource6 {
|
|
|
7167
7179
|
status
|
|
7168
7180
|
}, {
|
|
7169
7181
|
F: __dxlog_file25,
|
|
7170
|
-
L:
|
|
7182
|
+
L: 181,
|
|
7171
7183
|
S: this,
|
|
7172
7184
|
C: (f, a) => f(...a)
|
|
7173
7185
|
});
|
|
@@ -9022,4 +9034,4 @@ export {
|
|
|
9022
9034
|
importProfileData,
|
|
9023
9035
|
ClientServicesHost
|
|
9024
9036
|
};
|
|
9025
|
-
//# sourceMappingURL=chunk-
|
|
9037
|
+
//# sourceMappingURL=chunk-V6DIXWIU.mjs.map
|