@dxos/client-services 0.1.56-main.be59a09 → 0.1.56-main.c19b7cd
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-K67JOICT.mjs → chunk-ZOTHWLK5.mjs} +228 -149
- package/dist/lib/browser/chunk-ZOTHWLK5.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +14 -12
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/packlets/testing/index.mjs +2 -2
- package/dist/lib/browser/packlets/testing/index.mjs.map +3 -3
- package/dist/lib/node/index.cjs +223 -142
- package/dist/lib/node/index.cjs.map +3 -3
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node/packlets/testing/index.cjs +210 -131
- package/dist/lib/node/packlets/testing/index.cjs.map +3 -3
- package/dist/types/src/packlets/identity/identity-manager.d.ts +2 -1
- package/dist/types/src/packlets/identity/identity-manager.d.ts.map +1 -1
- package/dist/types/src/packlets/identity/identity.d.ts +3 -2
- package/dist/types/src/packlets/identity/identity.d.ts.map +1 -1
- package/dist/types/src/packlets/services/client-rpc-server.d.ts.map +1 -1
- package/dist/types/src/packlets/services/service-context.d.ts +2 -1
- package/dist/types/src/packlets/services/service-context.d.ts.map +1 -1
- package/dist/types/src/packlets/services/service-host.d.ts +3 -1
- package/dist/types/src/packlets/services/service-host.d.ts.map +1 -1
- package/dist/types/src/packlets/spaces/data-space.d.ts.map +1 -1
- package/dist/types/src/packlets/vault/iframe-host-runtime.d.ts.map +1 -1
- package/dist/types/src/packlets/vault/worker-runtime.d.ts.map +1 -1
- package/dist/types/src/version.d.ts +1 -1
- package/package.json +34 -33
- package/src/packlets/devices/devices-service.test.ts +2 -1
- package/src/packlets/identity/identity-manager.test.ts +4 -3
- package/src/packlets/identity/identity-manager.ts +9 -5
- package/src/packlets/identity/identity-service.test.ts +2 -1
- package/src/packlets/identity/identity.test.ts +7 -6
- package/src/packlets/identity/identity.ts +8 -3
- package/src/packlets/invitations/device-invitation-protocol.test.ts +2 -1
- package/src/packlets/network/network-service.test.ts +2 -1
- package/src/packlets/services/client-rpc-server.ts +4 -4
- package/src/packlets/services/service-context.test.ts +59 -0
- package/src/packlets/services/service-context.ts +11 -6
- package/src/packlets/services/service-host.test.ts +6 -5
- package/src/packlets/services/service-host.ts +15 -3
- package/src/packlets/services/service-registry.test.ts +2 -1
- package/src/packlets/spaces/data-space.ts +17 -5
- package/src/packlets/spaces/spaces-service.test.ts +2 -1
- package/src/packlets/testing/test-builder.ts +1 -1
- package/src/packlets/vault/iframe-host-runtime.ts +2 -1
- package/src/packlets/vault/worker-runtime.ts +2 -1
- package/src/version.ts +1 -1
- package/dist/lib/browser/chunk-K67JOICT.mjs.map +0 -7
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Event } from '@dxos/async';
|
|
2
|
+
import { Context } from '@dxos/context';
|
|
2
3
|
import { MetadataStore, SpaceManager } from '@dxos/echo-pipeline';
|
|
3
4
|
import { FeedStore } from '@dxos/feed-store';
|
|
4
5
|
import { Keyring } from '@dxos/keyring';
|
|
@@ -31,7 +32,7 @@ export declare class IdentityManager {
|
|
|
31
32
|
private _identity?;
|
|
32
33
|
constructor(_metadataStore: MetadataStore, _keyring: Keyring, _feedStore: FeedStore<FeedMessage>, _spaceManager: SpaceManager);
|
|
33
34
|
get identity(): Identity | undefined;
|
|
34
|
-
open(): Promise<void>;
|
|
35
|
+
open(ctx: Context): Promise<void>;
|
|
35
36
|
close(): Promise<void>;
|
|
36
37
|
createIdentity({ displayName }?: CreateIdentityOptions): Promise<Identity>;
|
|
37
38
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"identity-manager.d.ts","sourceRoot":"","sources":["../../../../../src/packlets/identity/identity-manager.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"identity-manager.d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,aAAa,EAAE,YAAY;IAG9C,IAAI,QAAQ,yBAEX;IAGK,IAAI,CAAC,GAAG,EAAE,OAAO;IAoBjB,KAAK;IAIL,cAAc,CAAC,EAAE,WAAW,EAAE,GAAE,qBAA0B;IAmEhE;;OAEG;IACG,cAAc,CAAC,MAAM,EAAE,kBAAkB;YA+BjC,kBAAkB;YA2ClB,eAAe;CAc9B"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Event } from '@dxos/async';
|
|
2
|
+
import { Context } from '@dxos/context';
|
|
2
3
|
import { CredentialSigner } from '@dxos/credentials';
|
|
3
4
|
import { Signer } from '@dxos/crypto';
|
|
4
5
|
import { Space } from '@dxos/echo-pipeline';
|
|
@@ -27,8 +28,8 @@ export declare class Identity {
|
|
|
27
28
|
readonly stateUpdate: Event<void>;
|
|
28
29
|
constructor({ space, signer, identityKey, deviceKey }: IdentityParams);
|
|
29
30
|
get authorizedDeviceKeys(): ComplexSet<PublicKey>;
|
|
30
|
-
open(): Promise<void>;
|
|
31
|
-
close(): Promise<void>;
|
|
31
|
+
open(ctx: Context): Promise<void>;
|
|
32
|
+
close(ctx: Context): Promise<void>;
|
|
32
33
|
ready(): Promise<void>;
|
|
33
34
|
get profileDocument(): ProfileDocument | undefined;
|
|
34
35
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"identity.d.ts","sourceRoot":"","sources":["../../../../../src/packlets/identity/identity.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAEpC,OAAO,EAEL,gBAAgB,EAIjB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAEtC,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAG5C,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAGvC,OAAO,EAAgB,eAAe,EAAE,MAAM,6CAA6C,CAAC;AAC5F,OAAO,EAAE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I,oBAAoB,IAAI,UAAU,CAAC,SAAS,CAAC,CAEhD;IAGK,IAAI,CAAC,GAAG,EAAE,OAAO;IAOjB,KAAK,CAAC,GAAG,EAAE,OAAO;IAOlB,KAAK;IAMX,IAAI,eAAe,IAAI,eAAe,GAAG,SAAS,CAEjD;IAED;;OAEG;IACH,IAAI,eAAe,mDAElB;IAED,IAAI,YAAY,cAEf;IAED,IAAI,kBAAkB,cAErB;IAED,IAAI,qBAAqB,4EAExB;IAED,uBAAuB,IAAI,sBAAsB;IAQjD;;;OAGG;IACH,2BAA2B,IAAI,gBAAgB;IAS/C;;OAEG;IACH,yBAAyB,IAAI,gBAAgB;IAIvC,WAAW,CAAC,EAAE,SAAS,EAAE,cAAc,EAAE,WAAW,EAAE,EAAE,sBAAsB;CA2CrF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client-rpc-server.d.ts","sourceRoot":"","sources":["../../../../../src/packlets/services/client-rpc-server.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,GAAG,EAAkB,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAEnE,OAAO,EAA4B,cAAc,
|
|
1
|
+
{"version":3,"file":"client-rpc-server.d.ts","sourceRoot":"","sources":["../../../../../src/packlets/services/client-rpc-server.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,GAAG,EAAkB,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAEnE,OAAO,EAA4B,cAAc,EAAiB,MAAM,WAAW,CAAC;AACpF,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE1C,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAErD,MAAM,MAAM,qBAAqB,GAAG;IAClC,eAAe,EAAE,eAAe,CAAC,cAAc,CAAC,CAAC;IACjD,UAAU,CAAC,EAAE,CACX,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,GAAG,EACX,OAAO,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,KAAK,YAAY,CAAC,GAAG,CAAC,KACxD,OAAO,CAAC,GAAG,CAAC,CAAC;IAClB,YAAY,CAAC,EAAE,CACb,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,GAAG,EACX,OAAO,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,KAAK,MAAM,CAAC,GAAG,CAAC,KAClD,YAAY,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC;CAChC,GAAG,IAAI,CAAC,cAAc,EAAE,aAAa,GAAG,eAAe,CAAC,CAAC;AAE1D,qBAAa,eAAe;IAC1B,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAkC;IACnE,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAU;IACnC,OAAO,CAAC,QAAQ,CAAC,aAAa,CAA0C;IACxE,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAsC;IAClE,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAwC;gBAE1D,MAAM,EAAE,qBAAqB;IAgCnC,IAAI;IAIJ,KAAK;IAIX,OAAO,CAAC,kBAAkB;CAiB3B"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Trigger } from '@dxos/async';
|
|
2
|
+
import { Context } from '@dxos/context';
|
|
2
3
|
import { MetadataStore, SpaceManager, DataServiceSubscriptions, SnapshotStore } from '@dxos/echo-pipeline';
|
|
3
4
|
import { FeedStore } from '@dxos/feed-store';
|
|
4
5
|
import { Keyring } from '@dxos/keyring';
|
|
@@ -38,7 +39,7 @@ export declare class ServiceContext {
|
|
|
38
39
|
private _deviceSpaceSync?;
|
|
39
40
|
private readonly _instanceId;
|
|
40
41
|
constructor(storage: Storage, networkManager: NetworkManager, signalManager: SignalManager, modelFactory: ModelFactory);
|
|
41
|
-
open(): Promise<void>;
|
|
42
|
+
open(ctx: Context): Promise<void>;
|
|
42
43
|
close(): Promise<void>;
|
|
43
44
|
createIdentity(params?: CreateIdentityOptions): Promise<import("../identity").Identity>;
|
|
44
45
|
getInvitationHandler(invitation: Partial<Invitation> & Pick<Invitation, 'kind'>): InvitationProtocol;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service-context.d.ts","sourceRoot":"","sources":["../../../../../src/packlets/services/service-context.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"service-context.d.ts","sourceRoot":"","sources":["../../../../../src/packlets/services/service-context.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACtC,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAGxC,OAAO,EAEL,aAAa,EACb,YAAY,EACZ,wBAAwB,EACxB,aAAa,EACd,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAe,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAE1D,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAGxC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAEvD,OAAO,EAAE,UAAU,EAAE,MAAM,4CAA4C,CAAC;AACxE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sCAAsC,CAAC;AAExE,OAAO,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAC;AAGjE,OAAO,EAAE,qBAAqB,EAAE,eAAe,EAAsB,MAAM,aAAa,CAAC;AACzF,OAAO,EAEL,kBAAkB,EAClB,kBAAkB,EAEnB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,gBAAgB,E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Manager } from '@dxos/messaging';
|
|
4
5
|
import { ModelFactory } from '@dxos/model-factory';
|
|
5
6
|
import { TransportFactory } from '@dxos/network-manager';
|
|
@@ -37,6 +38,7 @@ export declare class ClientServicesHost {
|
|
|
37
38
|
private readonly _serviceRegistry;
|
|
38
39
|
private readonly _systemService;
|
|
39
40
|
private readonly _loggingService;
|
|
41
|
+
private readonly _tracingService;
|
|
40
42
|
private _config?;
|
|
41
43
|
private readonly _statusUpdate;
|
|
42
44
|
private readonly _modelFactory;
|
|
@@ -60,7 +62,7 @@ export declare class ClientServicesHost {
|
|
|
60
62
|
* Can only be called once.
|
|
61
63
|
*/
|
|
62
64
|
initialize({ config, ...options }: InitializeOptions): void;
|
|
63
|
-
open(): Promise<void>;
|
|
65
|
+
open(ctx: Context): Promise<void>;
|
|
64
66
|
close(): Promise<void>;
|
|
65
67
|
reset(): Promise<void>;
|
|
66
68
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service-host.d.ts","sourceRoot":"","sources":["../../../../../src/packlets/services/service-host.ts"],"names":[],"mappings":"AAKA,OAAO,EAAuB,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAC5E,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"service-host.d.ts","sourceRoot":"","sources":["../../../../../src/packlets/services/service-host.ts"],"names":[],"mappings":"AAKA,OAAO,EAAuB,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAC5E,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAMxC,OAAO,EAAE,aAAa,EAA0B,MAAM,iBAAiB,CAAC;AACxE,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAgD,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAGvG,OAAO,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAC;AAetD,OAAO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IAAI,YAAY,GAAG,SAAS,CAEpC;IAEK,KAAK;IAmDL,IAAI;CAOX"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"worker-runtime.d.ts","sourceRoot":"","sources":["../../../../../src/packlets/vault/worker-runtime.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"worker-runtime.d.ts","sourceRoot":"","sources":["../../../../../src/packlets/vault/worker-runtime.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAKtC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE1C,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAIjD,MAAM,MAAM,mBAAmB,GAAG;IAChC,OAAO,EAAE,OAAO,CAAC;IACjB,UAAU,EAAE,OAAO,CAAC;IACpB,SAAS,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF;;;;GAIG;AACH,qBAAa,aAAa;IAUtB,OAAO,CAAC,QAAQ,CAAC,eAAe;IATlC,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAAqC;IACvE,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAoC;IAC3D,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAA4B;IACrD,OAAO,CAAC,qBAAqB,CAAC,CAAgB;IAC9C,OAAO,CAAC,eAAe,CAAsB;IAC7C,OAAO,CAAC,OAAO,CAAU;gBAIN,eAAe,EAAE,MAAM,YAAY,CAAC,MAAM,CAAC;IAK9D,IAAI,IAAI,uBAEP;IAEK,KAAK;IAsBL,IAAI;IAKV;;OAEG;IACG,aAAa,CAAC,EAAE,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,EAAE,mBAAmB;IAqB3E;;OAEG;IACH,OAAO,CAAC,gBAAgB;CAoBzB"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const DXOS_VERSION = "0.1.56-main.
|
|
1
|
+
export declare const DXOS_VERSION = "0.1.56-main.c19b7cd";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/client-services",
|
|
3
|
-
"version": "0.1.56-main.
|
|
3
|
+
"version": "0.1.56-main.c19b7cd",
|
|
4
4
|
"description": "DXOS client services implementation",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
@@ -21,41 +21,42 @@
|
|
|
21
21
|
"src"
|
|
22
22
|
],
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@dxos/async": "0.1.56-main.
|
|
25
|
-
"@dxos/client-protocol": "0.1.56-main.
|
|
26
|
-
"@dxos/codec-protobuf": "0.1.56-main.
|
|
27
|
-
"@dxos/config": "0.1.56-main.
|
|
28
|
-
"@dxos/context": "0.1.56-main.
|
|
29
|
-
"@dxos/credentials": "0.1.56-main.
|
|
30
|
-
"@dxos/crypto": "0.1.56-main.
|
|
31
|
-
"@dxos/debug": "0.1.56-main.
|
|
32
|
-
"@dxos/
|
|
33
|
-
"@dxos/echo-
|
|
34
|
-
"@dxos/echo-
|
|
35
|
-
"@dxos/
|
|
36
|
-
"@dxos/feed-store": "0.1.56-main.
|
|
37
|
-
"@dxos/
|
|
38
|
-
"@dxos/
|
|
39
|
-
"@dxos/keys": "0.1.56-main.
|
|
40
|
-
"@dxos/
|
|
41
|
-
"@dxos/
|
|
42
|
-
"@dxos/
|
|
43
|
-
"@dxos/model-factory": "0.1.56-main.
|
|
44
|
-
"@dxos/
|
|
45
|
-
"@dxos/node-std": "0.1.56-main.
|
|
46
|
-
"@dxos/
|
|
47
|
-
"@dxos/
|
|
48
|
-
"@dxos/
|
|
49
|
-
"@dxos/
|
|
50
|
-
"@dxos/teleport-extension-gossip": "0.1.56-main.
|
|
51
|
-
"@dxos/teleport-extension-object-sync": "0.1.56-main.
|
|
52
|
-
"@dxos/text-model": "0.1.56-main.
|
|
53
|
-
"@dxos/timeframe": "0.1.56-main.
|
|
54
|
-
"@dxos/
|
|
24
|
+
"@dxos/async": "0.1.56-main.c19b7cd",
|
|
25
|
+
"@dxos/client-protocol": "0.1.56-main.c19b7cd",
|
|
26
|
+
"@dxos/codec-protobuf": "0.1.56-main.c19b7cd",
|
|
27
|
+
"@dxos/config": "0.1.56-main.c19b7cd",
|
|
28
|
+
"@dxos/context": "0.1.56-main.c19b7cd",
|
|
29
|
+
"@dxos/credentials": "0.1.56-main.c19b7cd",
|
|
30
|
+
"@dxos/crypto": "0.1.56-main.c19b7cd",
|
|
31
|
+
"@dxos/debug": "0.1.56-main.c19b7cd",
|
|
32
|
+
"@dxos/document-model": "0.1.56-main.c19b7cd",
|
|
33
|
+
"@dxos/echo-db": "0.1.56-main.c19b7cd",
|
|
34
|
+
"@dxos/echo-pipeline": "0.1.56-main.c19b7cd",
|
|
35
|
+
"@dxos/errors": "0.1.56-main.c19b7cd",
|
|
36
|
+
"@dxos/feed-store": "0.1.56-main.c19b7cd",
|
|
37
|
+
"@dxos/invariant": "0.1.56-main.c19b7cd",
|
|
38
|
+
"@dxos/keyring": "0.1.56-main.c19b7cd",
|
|
39
|
+
"@dxos/keys": "0.1.56-main.c19b7cd",
|
|
40
|
+
"@dxos/lock-file": "0.1.56-main.c19b7cd",
|
|
41
|
+
"@dxos/log": "0.1.56-main.c19b7cd",
|
|
42
|
+
"@dxos/messaging": "0.1.56-main.c19b7cd",
|
|
43
|
+
"@dxos/model-factory": "0.1.56-main.c19b7cd",
|
|
44
|
+
"@dxos/network-manager": "0.1.56-main.c19b7cd",
|
|
45
|
+
"@dxos/node-std": "0.1.56-main.c19b7cd",
|
|
46
|
+
"@dxos/protocols": "0.1.56-main.c19b7cd",
|
|
47
|
+
"@dxos/random-access-storage": "0.1.56-main.c19b7cd",
|
|
48
|
+
"@dxos/rpc": "0.1.56-main.c19b7cd",
|
|
49
|
+
"@dxos/teleport": "0.1.56-main.c19b7cd",
|
|
50
|
+
"@dxos/teleport-extension-gossip": "0.1.56-main.c19b7cd",
|
|
51
|
+
"@dxos/teleport-extension-object-sync": "0.1.56-main.c19b7cd",
|
|
52
|
+
"@dxos/text-model": "0.1.56-main.c19b7cd",
|
|
53
|
+
"@dxos/timeframe": "0.1.56-main.c19b7cd",
|
|
54
|
+
"@dxos/tracing": "0.1.56-main.c19b7cd",
|
|
55
|
+
"@dxos/util": "0.1.56-main.c19b7cd"
|
|
55
56
|
},
|
|
56
57
|
"devDependencies": {
|
|
57
58
|
"@types/readable-stream": "^2.3.9",
|
|
58
|
-
"@dxos/signal": "0.1.56-main.
|
|
59
|
+
"@dxos/signal": "0.1.56-main.c19b7cd"
|
|
59
60
|
},
|
|
60
61
|
"publishConfig": {
|
|
61
62
|
"access": "public"
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
import { expect } from 'chai';
|
|
6
6
|
|
|
7
7
|
import { Trigger } from '@dxos/async';
|
|
8
|
+
import { Context } from '@dxos/context';
|
|
8
9
|
import { DevicesService, Device } from '@dxos/protocols/proto/dxos/client/services';
|
|
9
10
|
import { afterEach, afterTest, beforeEach, describe, test } from '@dxos/test';
|
|
10
11
|
|
|
@@ -18,7 +19,7 @@ describe('DevicesService', () => {
|
|
|
18
19
|
|
|
19
20
|
beforeEach(async () => {
|
|
20
21
|
serviceContext = createServiceContext();
|
|
21
|
-
await serviceContext.open();
|
|
22
|
+
await serviceContext.open(new Context());
|
|
22
23
|
devicesService = new DevicesServiceImpl(serviceContext.identityManager);
|
|
23
24
|
});
|
|
24
25
|
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import { expect } from 'chai';
|
|
6
6
|
|
|
7
|
+
import { Context } from '@dxos/context';
|
|
7
8
|
import { valueEncoding, MetadataStore, SpaceManager, AuthStatus, SnapshotStore } from '@dxos/echo-pipeline';
|
|
8
9
|
import { FeedFactory, FeedStore } from '@dxos/feed-store';
|
|
9
10
|
import { Keyring } from '@dxos/keyring';
|
|
@@ -64,7 +65,7 @@ describe('identity/identity-manager', () => {
|
|
|
64
65
|
|
|
65
66
|
test('creates identity', async () => {
|
|
66
67
|
const { identityManager } = await setupPeer();
|
|
67
|
-
await identityManager.open();
|
|
68
|
+
await identityManager.open(new Context());
|
|
68
69
|
afterTest(() => identityManager.close());
|
|
69
70
|
|
|
70
71
|
const identity = await identityManager.createIdentity();
|
|
@@ -75,13 +76,13 @@ describe('identity/identity-manager', () => {
|
|
|
75
76
|
const storage = createStorage({ type: StorageType.RAM });
|
|
76
77
|
|
|
77
78
|
const peer1 = await setupPeer({ storage });
|
|
78
|
-
await peer1.identityManager.open();
|
|
79
|
+
await peer1.identityManager.open(new Context());
|
|
79
80
|
const identity1 = await peer1.identityManager.createIdentity();
|
|
80
81
|
await peer1.identityManager.close();
|
|
81
82
|
await peer1.feedStore.close();
|
|
82
83
|
|
|
83
84
|
const peer2 = await setupPeer({ storage });
|
|
84
|
-
await peer2.identityManager.open();
|
|
85
|
+
await peer2.identityManager.open(new Context());
|
|
85
86
|
|
|
86
87
|
expect(peer2.identityManager.identity).to.exist;
|
|
87
88
|
expect(peer2.identityManager.identity!.identityKey).to.deep.eq(identity1.identityKey);
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
//
|
|
4
4
|
|
|
5
5
|
import { Event } from '@dxos/async';
|
|
6
|
+
import { Context } from '@dxos/context';
|
|
6
7
|
import { createCredentialSignerWithKey, CredentialGenerator } from '@dxos/credentials';
|
|
7
8
|
import { MetadataStore, SpaceManager, SwarmIdentity } from '@dxos/echo-pipeline';
|
|
8
9
|
import { FeedStore } from '@dxos/feed-store';
|
|
@@ -15,6 +16,7 @@ import { FeedMessage } from '@dxos/protocols/proto/dxos/echo/feed';
|
|
|
15
16
|
import { IdentityRecord, SpaceMetadata } from '@dxos/protocols/proto/dxos/echo/metadata';
|
|
16
17
|
import { AdmittedFeed } from '@dxos/protocols/proto/dxos/halo/credentials';
|
|
17
18
|
import { Timeframe } from '@dxos/timeframe';
|
|
19
|
+
import { trace as Trace } from '@dxos/tracing';
|
|
18
20
|
import { deferFunction } from '@dxos/util';
|
|
19
21
|
|
|
20
22
|
import { createAuthProvider } from './authenticator';
|
|
@@ -46,6 +48,7 @@ export type CreateIdentityOptions = {
|
|
|
46
48
|
};
|
|
47
49
|
|
|
48
50
|
// TODO(dmaretskyi): Rename: represents the peer's state machine.
|
|
51
|
+
@Trace.resource()
|
|
49
52
|
export class IdentityManager {
|
|
50
53
|
readonly stateUpdate = new Event();
|
|
51
54
|
|
|
@@ -64,7 +67,8 @@ export class IdentityManager {
|
|
|
64
67
|
return this._identity;
|
|
65
68
|
}
|
|
66
69
|
|
|
67
|
-
|
|
70
|
+
@Trace.span()
|
|
71
|
+
async open(ctx: Context) {
|
|
68
72
|
const traceId = PublicKey.random().toHex();
|
|
69
73
|
log.trace('dxos.halo.identity-manager.open', trace.begin({ id: traceId }));
|
|
70
74
|
await this._metadataStore.load();
|
|
@@ -73,7 +77,7 @@ export class IdentityManager {
|
|
|
73
77
|
log('identity record', { identityRecord });
|
|
74
78
|
if (identityRecord) {
|
|
75
79
|
this._identity = await this._constructIdentity(identityRecord);
|
|
76
|
-
await this._identity.open();
|
|
80
|
+
await this._identity.open(ctx);
|
|
77
81
|
await this._identity.ready();
|
|
78
82
|
log.trace('dxos.halo.identity', {
|
|
79
83
|
identityKey: identityRecord.identityKey,
|
|
@@ -85,7 +89,7 @@ export class IdentityManager {
|
|
|
85
89
|
}
|
|
86
90
|
|
|
87
91
|
async close() {
|
|
88
|
-
await this._identity?.close();
|
|
92
|
+
await this._identity?.close(new Context());
|
|
89
93
|
}
|
|
90
94
|
|
|
91
95
|
async createIdentity({ displayName }: CreateIdentityOptions = {}) {
|
|
@@ -105,7 +109,7 @@ export class IdentityManager {
|
|
|
105
109
|
};
|
|
106
110
|
|
|
107
111
|
const identity = await this._constructIdentity(identityRecord);
|
|
108
|
-
await identity.open();
|
|
112
|
+
await identity.open(new Context());
|
|
109
113
|
|
|
110
114
|
{
|
|
111
115
|
const generator = new CredentialGenerator(this._keyring, identityRecord.identityKey, identityRecord.deviceKey);
|
|
@@ -175,7 +179,7 @@ export class IdentityManager {
|
|
|
175
179
|
};
|
|
176
180
|
const identity = await this._constructIdentity(identityRecord);
|
|
177
181
|
|
|
178
|
-
await identity.open();
|
|
182
|
+
await identity.open(new Context());
|
|
179
183
|
this._identity = identity;
|
|
180
184
|
await this._metadataStore.setIdentityRecord(identityRecord);
|
|
181
185
|
await this._identity.ready();
|
|
@@ -6,6 +6,7 @@ import chai, { expect } from 'chai';
|
|
|
6
6
|
import chaiAsPromised from 'chai-as-promised';
|
|
7
7
|
|
|
8
8
|
import { Trigger } from '@dxos/async';
|
|
9
|
+
import { Context } from '@dxos/context';
|
|
9
10
|
import { PublicKey } from '@dxos/keys';
|
|
10
11
|
import { Identity, IdentityService } from '@dxos/protocols/proto/dxos/client/services';
|
|
11
12
|
import { afterEach, afterTest, beforeEach, describe, test } from '@dxos/test';
|
|
@@ -22,7 +23,7 @@ describe('IdentityService', () => {
|
|
|
22
23
|
|
|
23
24
|
beforeEach(async () => {
|
|
24
25
|
serviceContext = createServiceContext();
|
|
25
|
-
await serviceContext.open();
|
|
26
|
+
await serviceContext.open(new Context());
|
|
26
27
|
identityService = new IdentityServiceImpl(serviceContext);
|
|
27
28
|
});
|
|
28
29
|
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import expect from 'expect';
|
|
6
6
|
|
|
7
|
+
import { Context } from '@dxos/context';
|
|
7
8
|
import { CredentialGenerator, verifyCredential } from '@dxos/credentials';
|
|
8
9
|
import {
|
|
9
10
|
MetadataStore,
|
|
@@ -106,8 +107,8 @@ describe('identity/identity', () => {
|
|
|
106
107
|
space,
|
|
107
108
|
});
|
|
108
109
|
|
|
109
|
-
await identity.open();
|
|
110
|
-
afterTest(() => identity.close());
|
|
110
|
+
await identity.open(new Context());
|
|
111
|
+
afterTest(() => identity.close(new Context()));
|
|
111
112
|
|
|
112
113
|
//
|
|
113
114
|
// Identity genesis
|
|
@@ -219,8 +220,8 @@ describe('identity/identity', () => {
|
|
|
219
220
|
space,
|
|
220
221
|
}));
|
|
221
222
|
|
|
222
|
-
await identity.open();
|
|
223
|
-
afterTest(() => identity.close());
|
|
223
|
+
await identity.open(new Context());
|
|
224
|
+
afterTest(() => identity.close(new Context()));
|
|
224
225
|
|
|
225
226
|
//
|
|
226
227
|
// Identity genesis
|
|
@@ -310,8 +311,8 @@ describe('identity/identity', () => {
|
|
|
310
311
|
space,
|
|
311
312
|
}));
|
|
312
313
|
|
|
313
|
-
await identity.open();
|
|
314
|
-
afterTest(() => identity.close());
|
|
314
|
+
await identity.open(new Context());
|
|
315
|
+
afterTest(() => identity.close(new Context()));
|
|
315
316
|
}
|
|
316
317
|
|
|
317
318
|
//
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import { Event } from '@dxos/async';
|
|
6
6
|
import { AUTH_TIMEOUT, LOAD_CONTROL_FEEDS_TIMEOUT } from '@dxos/client-protocol';
|
|
7
|
+
import { Context } from '@dxos/context';
|
|
7
8
|
import {
|
|
8
9
|
DeviceStateMachine,
|
|
9
10
|
CredentialSigner,
|
|
@@ -21,6 +22,7 @@ import { log } from '@dxos/log';
|
|
|
21
22
|
import { FeedMessage } from '@dxos/protocols/proto/dxos/echo/feed';
|
|
22
23
|
import { AdmittedFeed, ProfileDocument } from '@dxos/protocols/proto/dxos/halo/credentials';
|
|
23
24
|
import { DeviceAdmissionRequest } from '@dxos/protocols/proto/dxos/halo/invitations';
|
|
25
|
+
import { trace } from '@dxos/tracing';
|
|
24
26
|
import { ComplexSet } from '@dxos/util';
|
|
25
27
|
|
|
26
28
|
import { TrustedKeySetAuthVerifier } from './authenticator';
|
|
@@ -35,6 +37,7 @@ export type IdentityParams = {
|
|
|
35
37
|
/**
|
|
36
38
|
* Agent identity manager, which includes the agent's Halo space.
|
|
37
39
|
*/
|
|
40
|
+
@trace.resource()
|
|
38
41
|
export class Identity {
|
|
39
42
|
public readonly space: Space;
|
|
40
43
|
private readonly _signer: Signer;
|
|
@@ -76,13 +79,15 @@ export class Identity {
|
|
|
76
79
|
return this._deviceStateMachine.authorizedDeviceKeys;
|
|
77
80
|
}
|
|
78
81
|
|
|
79
|
-
|
|
82
|
+
@trace.span()
|
|
83
|
+
async open(ctx: Context) {
|
|
80
84
|
await this.space.spaceState.addCredentialProcessor(this._deviceStateMachine);
|
|
81
85
|
await this.space.spaceState.addCredentialProcessor(this._profileStateMachine);
|
|
82
|
-
await this.space.open();
|
|
86
|
+
await this.space.open(ctx);
|
|
83
87
|
}
|
|
84
88
|
|
|
85
|
-
|
|
89
|
+
@trace.span()
|
|
90
|
+
async close(ctx: Context) {
|
|
86
91
|
await this.authVerifier.close();
|
|
87
92
|
await this.space.spaceState.removeCredentialProcessor(this._profileStateMachine);
|
|
88
93
|
await this.space.spaceState.removeCredentialProcessor(this._deviceStateMachine);
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
import { expect } from 'chai';
|
|
6
6
|
|
|
7
7
|
import { asyncChain } from '@dxos/async';
|
|
8
|
+
import { Context } from '@dxos/context';
|
|
8
9
|
import { Invitation } from '@dxos/protocols/proto/dxos/client/services';
|
|
9
10
|
import { describe, test, afterTest } from '@dxos/test';
|
|
10
11
|
|
|
@@ -19,7 +20,7 @@ const closeAfterTest = async (peer: ServiceContext) => {
|
|
|
19
20
|
describe('services/device', () => {
|
|
20
21
|
test('creates identity', async () => {
|
|
21
22
|
const peer = createServiceContext();
|
|
22
|
-
await peer.open();
|
|
23
|
+
await peer.open(new Context());
|
|
23
24
|
afterTest(() => peer.close());
|
|
24
25
|
|
|
25
26
|
const identity = await peer.createIdentity();
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
import { expect } from 'chai';
|
|
6
6
|
|
|
7
7
|
import { Trigger } from '@dxos/async';
|
|
8
|
+
import { Context } from '@dxos/context';
|
|
8
9
|
import { NetworkService, ConnectionState } from '@dxos/protocols/proto/dxos/client/services';
|
|
9
10
|
import { afterEach, afterTest, beforeEach, describe, test } from '@dxos/test';
|
|
10
11
|
|
|
@@ -18,7 +19,7 @@ describe('NetworkService', () => {
|
|
|
18
19
|
|
|
19
20
|
beforeEach(async () => {
|
|
20
21
|
serviceContext = createServiceContext();
|
|
21
|
-
await serviceContext.open();
|
|
22
|
+
await serviceContext.open(new Context());
|
|
22
23
|
networkService = new NetworkServiceImpl(serviceContext.networkManager, serviceContext.signalManager);
|
|
23
24
|
});
|
|
24
25
|
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import { ClientServices } from '@dxos/client-protocol';
|
|
6
6
|
import { Any, ServiceHandler, Stream } from '@dxos/codec-protobuf';
|
|
7
7
|
import { raise } from '@dxos/debug';
|
|
8
|
-
import { parseMethodName, RpcPeer, RpcPeerOptions } from '@dxos/rpc';
|
|
8
|
+
import { parseMethodName, RpcPeer, RpcPeerOptions, ServiceBundle } from '@dxos/rpc';
|
|
9
9
|
import { MaybePromise } from '@dxos/util';
|
|
10
10
|
|
|
11
11
|
import { ServiceRegistry } from './service-registry';
|
|
@@ -74,16 +74,16 @@ export class ClientRpcServer {
|
|
|
74
74
|
private _getServiceHandler(serviceName: string) {
|
|
75
75
|
if (!this._handlerCache.has(serviceName)) {
|
|
76
76
|
const [key, descriptor] =
|
|
77
|
-
Object.entries(this._serviceRegistry.descriptors).find(
|
|
77
|
+
Object.entries(this._serviceRegistry.descriptors as ServiceBundle<Record<string, any>>).find(
|
|
78
78
|
([key, descriptor]) => descriptor.name === serviceName,
|
|
79
79
|
) ?? raise(new Error(`Service not available: ${serviceName}`));
|
|
80
80
|
|
|
81
|
-
const service = this._serviceRegistry.services[key as keyof ClientServices];
|
|
81
|
+
const service = this._serviceRegistry.services[key as keyof ClientServices] as any;
|
|
82
82
|
if (!service) {
|
|
83
83
|
throw new Error(`Service not available: ${serviceName}`);
|
|
84
84
|
}
|
|
85
85
|
|
|
86
|
-
this._handlerCache.set(serviceName, descriptor.createServer(service
|
|
86
|
+
this._handlerCache.set(serviceName, descriptor.createServer(service));
|
|
87
87
|
}
|
|
88
88
|
|
|
89
89
|
return this._handlerCache.get(serviceName)!;
|
|
@@ -2,9 +2,18 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
+
import { expect } from 'chai';
|
|
6
|
+
|
|
7
|
+
import { DocumentModel, DocumentModelState, MutationBuilder } from '@dxos/document-model';
|
|
8
|
+
import { createModelMutation, encodeModelMutation, genesisMutation } from '@dxos/echo-db';
|
|
9
|
+
import { WriteReceipt } from '@dxos/feed-store';
|
|
10
|
+
import { PublicKey } from '@dxos/keys';
|
|
11
|
+
import { log } from '@dxos/log';
|
|
5
12
|
import { MemorySignalManagerContext } from '@dxos/messaging';
|
|
6
13
|
import { Invitation } from '@dxos/protocols/proto/dxos/client/services';
|
|
7
14
|
import { describe, test } from '@dxos/test';
|
|
15
|
+
import { Timeframe } from '@dxos/timeframe';
|
|
16
|
+
import { range } from '@dxos/util';
|
|
8
17
|
|
|
9
18
|
import { createServiceContext, syncItemsLocal } from '../testing';
|
|
10
19
|
import { performInvitation } from '../testing/invitation-utils';
|
|
@@ -16,11 +25,61 @@ describe('services/ServiceContext', () => {
|
|
|
16
25
|
await device1.createIdentity();
|
|
17
26
|
const space1 = await device1.dataSpaceManager!.createSpace();
|
|
18
27
|
|
|
28
|
+
const itemId = PublicKey.random().toHex();
|
|
29
|
+
await space1.dataPipeline.databaseHost!.getWriteStream()?.write({
|
|
30
|
+
batch: genesisMutation(itemId, DocumentModel.meta.type),
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
let counter = 0;
|
|
34
|
+
|
|
35
|
+
for (const _ in range(5)) {
|
|
36
|
+
const receipts: WriteReceipt[] = [];
|
|
37
|
+
for (const _ in range(50)) {
|
|
38
|
+
receipts.push(
|
|
39
|
+
await space1.dataPipeline.databaseHost!.getWriteStream()!.write({
|
|
40
|
+
batch: createModelMutation(
|
|
41
|
+
itemId,
|
|
42
|
+
encodeModelMutation(DocumentModel.meta, new MutationBuilder().set('counter', ++counter).build()),
|
|
43
|
+
),
|
|
44
|
+
}),
|
|
45
|
+
);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
await space1.dataPipeline.pipelineState!.waitUntilTimeframe(
|
|
49
|
+
Timeframe.merge(...receipts.map((receipt) => new Timeframe([[receipt.feedKey, receipt.seq]]))),
|
|
50
|
+
);
|
|
51
|
+
|
|
52
|
+
await space1.createEpoch();
|
|
53
|
+
log.info('epoch', { number: space1.dataPipeline.currentEpoch?.subject.assertion.number });
|
|
54
|
+
}
|
|
55
|
+
|
|
19
56
|
const device2 = createServiceContext({ signalContext: networkContext });
|
|
20
57
|
await Promise.all(performInvitation({ host: device1, guest: device2, options: { kind: Invitation.Kind.DEVICE } }));
|
|
21
58
|
|
|
22
59
|
await device2.dataSpaceManager!.waitUntilSpaceReady(space1!.key);
|
|
23
60
|
const space2 = await device2.dataSpaceManager!.spaces.get(space1.key);
|
|
61
|
+
|
|
62
|
+
log.info('peer 2', {
|
|
63
|
+
currentEpoch: space2!.dataPipeline.currentEpoch?.subject.assertion.number,
|
|
64
|
+
appliedEpoch: space2!.dataPipeline.appliedEpoch?.subject.assertion.number,
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
await space2?.dataPipeline.onNewEpoch.waitForCondition(
|
|
68
|
+
() =>
|
|
69
|
+
space2!.dataPipeline.appliedEpoch?.subject.assertion.number ===
|
|
70
|
+
space1.dataPipeline.currentEpoch?.subject.assertion.number,
|
|
71
|
+
);
|
|
72
|
+
|
|
73
|
+
expect(space2!.dataPipeline.currentEpoch!.subject.assertion.number).to.equal(
|
|
74
|
+
space1.dataPipeline.currentEpoch!.subject.assertion.number,
|
|
75
|
+
);
|
|
76
|
+
expect(space2!.dataPipeline.appliedEpoch!.subject.assertion.number).to.equal(
|
|
77
|
+
space1.dataPipeline.appliedEpoch!.subject.assertion.number,
|
|
78
|
+
);
|
|
79
|
+
|
|
80
|
+
const item2 = space2!.dataPipeline.itemManager.entities.get(itemId);
|
|
81
|
+
expect((item2!.state as DocumentModelState).data.counter).to.equal(counter);
|
|
82
|
+
|
|
24
83
|
await syncItemsLocal(space1.dataPipeline, space2!.dataPipeline);
|
|
25
84
|
});
|
|
26
85
|
|