@dxos/client-services 0.8.4-main.b97322e → 0.8.4-main.bcb3aa67d6
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-WKKP35EC.mjs → chunk-5A3KX2RY.mjs} +4406 -3958
- package/dist/lib/browser/chunk-5A3KX2RY.mjs.map +7 -0
- 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/index.mjs +481 -78
- 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 +45 -26
- 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-ZE2HYS56.mjs → chunk-FNPO5UMU.mjs} +4302 -3722
- package/dist/lib/node-esm/chunk-FNPO5UMU.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/index.mjs +481 -78
- 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 +45 -26
- package/dist/lib/node-esm/testing/index.mjs.map +3 -3
- package/dist/types/src/index.d.ts +1 -0
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/packlets/agents/edge-agent-manager.d.ts +3 -2
- package/dist/types/src/packlets/agents/edge-agent-manager.d.ts.map +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.map +1 -1
- package/dist/types/src/packlets/devtools/devtools.d.ts +20 -20
- 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/network.d.ts +1 -1
- package/dist/types/src/packlets/devtools/network.d.ts.map +1 -1
- package/dist/types/src/packlets/diagnostics/browser-diagnostics-broadcast.d.ts +1 -1
- package/dist/types/src/packlets/diagnostics/browser-diagnostics-broadcast.d.ts.map +1 -1
- package/dist/types/src/packlets/diagnostics/diagnostics-broadcast.d.ts +1 -1
- package/dist/types/src/packlets/diagnostics/diagnostics-broadcast.d.ts.map +1 -1
- package/dist/types/src/packlets/diagnostics/diagnostics.d.ts +1 -1
- package/dist/types/src/packlets/diagnostics/diagnostics.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/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-manager.d.ts +7 -7
- package/dist/types/src/packlets/identity/identity-manager.d.ts.map +1 -1
- package/dist/types/src/packlets/identity/identity-recovery-manager.d.ts +7 -6
- package/dist/types/src/packlets/identity/identity-recovery-manager.d.ts.map +1 -1
- package/dist/types/src/packlets/identity/identity-service.d.ts +1 -6
- package/dist/types/src/packlets/identity/identity-service.d.ts.map +1 -1
- package/dist/types/src/packlets/identity/identity.d.ts +9 -12
- package/dist/types/src/packlets/identity/identity.d.ts.map +1 -1
- package/dist/types/src/packlets/invitations/device-invitation-protocol.d.ts +4 -4
- package/dist/types/src/packlets/invitations/device-invitation-protocol.d.ts.map +1 -1
- package/dist/types/src/packlets/invitations/edge-invitation-handler.d.ts +1 -1
- package/dist/types/src/packlets/invitations/edge-invitation-handler.d.ts.map +1 -1
- package/dist/types/src/packlets/invitations/invitation-guest-extenstion.d.ts.map +1 -1
- package/dist/types/src/packlets/invitations/invitation-host-extension.d.ts.map +1 -1
- package/dist/types/src/packlets/invitations/invitation-protocol.d.ts +3 -4
- package/dist/types/src/packlets/invitations/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/invitations/invitations-manager.d.ts +3 -3
- package/dist/types/src/packlets/invitations/invitations-manager.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/invitations/space-invitation-protocol.d.ts +3 -3
- package/dist/types/src/packlets/invitations/space-invitation-protocol.d.ts.map +1 -1
- package/dist/types/src/packlets/invitations/utils.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/logging/logging-service.d.ts +5 -1
- package/dist/types/src/packlets/logging/logging-service.d.ts.map +1 -1
- package/dist/types/src/packlets/network/network-service.d.ts +2 -2
- package/dist/types/src/packlets/network/network-service.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/feed-syncer.d.ts +59 -0
- package/dist/types/src/packlets/services/feed-syncer.d.ts.map +1 -0
- package/dist/types/src/packlets/services/feed-syncer.test.d.ts +2 -0
- package/dist/types/src/packlets/services/feed-syncer.test.d.ts.map +1 -0
- package/dist/types/src/packlets/services/platform.d.ts.map +1 -1
- package/dist/types/src/packlets/services/service-context.d.ts +14 -9
- package/dist/types/src/packlets/services/service-context.d.ts.map +1 -1
- package/dist/types/src/packlets/services/service-host.d.ts +20 -6
- package/dist/types/src/packlets/services/service-host.d.ts.map +1 -1
- package/dist/types/src/packlets/space-export/space-archive-reader.d.ts +9 -1
- package/dist/types/src/packlets/space-export/space-archive-reader.d.ts.map +1 -1
- package/dist/types/src/packlets/space-export/space-archive-writer.d.ts +7 -1
- package/dist/types/src/packlets/space-export/space-archive-writer.d.ts.map +1 -1
- package/dist/types/src/packlets/space-export/space-archive.test.d.ts +2 -0
- package/dist/types/src/packlets/space-export/space-archive.test.d.ts.map +1 -0
- package/dist/types/src/packlets/spaces/automerge-space-state.d.ts +1 -1
- package/dist/types/src/packlets/spaces/automerge-space-state.d.ts.map +1 -1
- package/dist/types/src/packlets/spaces/data-space-manager.d.ts +28 -16
- package/dist/types/src/packlets/spaces/data-space-manager.d.ts.map +1 -1
- package/dist/types/src/packlets/spaces/data-space.d.ts +28 -12
- 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/genesis.d.ts +2 -1
- package/dist/types/src/packlets/spaces/genesis.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/spaces/spaces-service.d.ts +3 -3
- package/dist/types/src/packlets/spaces/spaces-service.d.ts.map +1 -1
- package/dist/types/src/packlets/storage/profile-archive.d.ts.map +1 -1
- package/dist/types/src/packlets/storage/storage.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/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 +8 -7
- package/dist/types/src/packlets/testing/test-builder.d.ts.map +1 -1
- package/dist/types/src/packlets/worker/worker-runtime.d.ts +31 -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/src/version.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +72 -48
- package/src/index.ts +1 -0
- package/src/packlets/agents/edge-agent-manager.ts +10 -7
- package/src/packlets/agents/edge-agent-service.ts +15 -5
- package/src/packlets/devices/devices-service.test.ts +4 -3
- package/src/packlets/devices/devices-service.ts +2 -2
- package/src/packlets/devtools/devtools.ts +30 -29
- package/src/packlets/devtools/feeds.ts +2 -2
- package/src/packlets/devtools/network.ts +1 -1
- package/src/packlets/diagnostics/browser-diagnostics-broadcast.ts +1 -1
- package/src/packlets/diagnostics/diagnostics-broadcast.ts +1 -1
- package/src/packlets/diagnostics/diagnostics-collector.ts +1 -1
- package/src/packlets/diagnostics/diagnostics.ts +1 -1
- package/src/packlets/diagnostics/index.ts +1 -1
- package/src/packlets/identity/authenticator.node.test.ts +1 -1
- package/src/packlets/identity/authenticator.ts +3 -3
- package/src/packlets/identity/contacts-service.ts +3 -2
- package/src/packlets/identity/identity-manager.test.ts +8 -8
- package/src/packlets/identity/identity-manager.ts +23 -20
- package/src/packlets/identity/identity-recovery-manager.ts +22 -18
- package/src/packlets/identity/identity-service.test.ts +9 -28
- package/src/packlets/identity/identity-service.ts +5 -75
- package/src/packlets/identity/identity.test.ts +11 -11
- package/src/packlets/identity/identity.ts +16 -37
- package/src/packlets/invitations/device-invitation-protocol.test.ts +1 -1
- package/src/packlets/invitations/device-invitation-protocol.ts +6 -5
- package/src/packlets/invitations/edge-invitation-handler.ts +5 -4
- package/src/packlets/invitations/invitation-guest-extenstion.ts +7 -5
- package/src/packlets/invitations/invitation-host-extension.ts +8 -6
- package/src/packlets/invitations/invitation-protocol.ts +3 -4
- package/src/packlets/invitations/invitations-handler.test.ts +8 -7
- package/src/packlets/invitations/invitations-handler.ts +13 -13
- package/src/packlets/invitations/invitations-manager.ts +40 -17
- package/src/packlets/invitations/invitations-service.ts +5 -5
- package/src/packlets/invitations/space-invitation-protocol.test.ts +19 -18
- package/src/packlets/invitations/space-invitation-protocol.ts +13 -16
- package/src/packlets/invitations/utils.ts +1 -1
- package/src/packlets/locks/browser.ts +1 -1
- package/src/packlets/locks/index.ts +1 -1
- package/src/packlets/logging/logging-service.ts +7 -3
- package/src/packlets/logging/logging.test.ts +1 -1
- package/src/packlets/network/network-service.test.ts +4 -3
- package/src/packlets/network/network-service.ts +7 -6
- package/src/packlets/services/client-rpc-server.ts +5 -5
- package/src/packlets/services/feed-syncer.test.ts +340 -0
- package/src/packlets/services/feed-syncer.ts +337 -0
- package/src/packlets/services/platform.ts +7 -1
- package/src/packlets/services/service-context.test.ts +4 -3
- package/src/packlets/services/service-context.ts +139 -52
- package/src/packlets/services/service-host.test.ts +11 -9
- package/src/packlets/services/service-host.ts +78 -28
- package/src/packlets/services/service-registry.test.ts +2 -1
- package/src/packlets/space-export/space-archive-reader.ts +65 -4
- package/src/packlets/space-export/space-archive-writer.ts +42 -5
- package/src/packlets/space-export/space-archive.test.ts +287 -0
- package/src/packlets/space-export/tar.test.ts +1 -1
- package/src/packlets/spaces/automerge-space-state.ts +1 -1
- package/src/packlets/spaces/data-space-manager.test.ts +79 -13
- package/src/packlets/spaces/data-space-manager.ts +124 -116
- package/src/packlets/spaces/data-space.ts +60 -35
- package/src/packlets/spaces/edge-feed-replicator.test.ts +4 -4
- package/src/packlets/spaces/edge-feed-replicator.ts +12 -11
- package/src/packlets/spaces/epoch-migrations.ts +5 -5
- package/src/packlets/spaces/genesis.ts +6 -1
- package/src/packlets/spaces/notarization-plugin.test.ts +3 -3
- package/src/packlets/spaces/notarization-plugin.ts +13 -12
- package/src/packlets/spaces/spaces-service.test.ts +12 -8
- package/src/packlets/spaces/spaces-service.ts +57 -31
- package/src/packlets/storage/profile-archive.ts +1 -1
- package/src/packlets/storage/storage.ts +7 -8
- package/src/packlets/system/system-service.test.ts +1 -1
- package/src/packlets/system/system-service.ts +4 -4
- package/src/packlets/testing/invitation-utils.ts +11 -7
- package/src/packlets/testing/test-builder.ts +39 -13
- package/src/packlets/worker/worker-runtime.ts +152 -13
- package/src/packlets/worker/worker-session.ts +11 -11
- package/src/version.ts +1 -1
- package/dist/lib/browser/chunk-WKKP35EC.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-ZE2HYS56.mjs.map +0 -7
- package/dist/types/src/packlets/identity/default-space-state-machine.d.ts +0 -19
- package/dist/types/src/packlets/identity/default-space-state-machine.d.ts.map +0 -1
- package/src/packlets/identity/default-space-state-machine.ts +0 -44
package/package.json
CHANGED
|
@@ -1,31 +1,51 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/client-services",
|
|
3
|
-
"version": "0.8.4-main.
|
|
3
|
+
"version": "0.8.4-main.bcb3aa67d6",
|
|
4
4
|
"description": "DXOS client services implementation",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "https://github.com/dxos/dxos"
|
|
10
|
+
},
|
|
7
11
|
"license": "MIT",
|
|
8
12
|
"author": "DXOS.org",
|
|
9
|
-
"sideEffects":
|
|
13
|
+
"sideEffects": false,
|
|
10
14
|
"type": "module",
|
|
15
|
+
"imports": {
|
|
16
|
+
"#locks-platform": {
|
|
17
|
+
"source": {
|
|
18
|
+
"browser": "./src/packlets/locks/browser.ts",
|
|
19
|
+
"default": "./src/packlets/locks/node.ts"
|
|
20
|
+
},
|
|
21
|
+
"types": "./dist/types/src/packlets/locks/node.d.ts",
|
|
22
|
+
"browser": "./dist/lib/browser/packlets/locks/browser.mjs",
|
|
23
|
+
"default": "./dist/lib/node-esm/packlets/locks/node.mjs"
|
|
24
|
+
},
|
|
25
|
+
"#diagnostics-broadcast": {
|
|
26
|
+
"source": {
|
|
27
|
+
"browser": "./src/packlets/diagnostics/browser-diagnostics-broadcast.ts",
|
|
28
|
+
"default": "./src/packlets/diagnostics/diagnostics-broadcast.ts"
|
|
29
|
+
},
|
|
30
|
+
"types": "./dist/types/src/packlets/diagnostics/diagnostics-broadcast.d.ts",
|
|
31
|
+
"browser": "./dist/lib/browser/packlets/diagnostics/browser-diagnostics-broadcast.mjs",
|
|
32
|
+
"default": "./dist/lib/node-esm/packlets/diagnostics/diagnostics-broadcast.mjs"
|
|
33
|
+
}
|
|
34
|
+
},
|
|
11
35
|
"exports": {
|
|
12
36
|
".": {
|
|
37
|
+
"source": "./src/index.ts",
|
|
13
38
|
"types": "./dist/types/src/index.d.ts",
|
|
14
39
|
"browser": "./dist/lib/browser/index.mjs",
|
|
15
40
|
"node": "./dist/lib/node-esm/index.mjs"
|
|
16
41
|
},
|
|
17
42
|
"./testing": {
|
|
43
|
+
"source": "./src/testing/index.ts",
|
|
18
44
|
"types": "./dist/types/src/testing/index.d.ts",
|
|
19
45
|
"browser": "./dist/lib/browser/testing/index.mjs",
|
|
20
46
|
"node": "./dist/lib/node-esm/testing/index.mjs"
|
|
21
47
|
}
|
|
22
48
|
},
|
|
23
|
-
"browser": {
|
|
24
|
-
"jsondown": false,
|
|
25
|
-
"./src/packlets/locks/node.ts": "./src/packlets/locks/browser.ts",
|
|
26
|
-
"./src/packlets/diagnostics/diagnostics-broadcast.ts": "./src/packlets/diagnostics/browser-diagnostics-broadcast.ts",
|
|
27
|
-
"./testing.js": "./dist/lib/browser/packlets/testing/index.mjs"
|
|
28
|
-
},
|
|
29
49
|
"types": "dist/types/src/index.d.ts",
|
|
30
50
|
"typesVersions": {
|
|
31
51
|
"*": {
|
|
@@ -35,58 +55,62 @@
|
|
|
35
55
|
}
|
|
36
56
|
},
|
|
37
57
|
"files": [
|
|
38
|
-
"testing.d.ts",
|
|
39
|
-
"testing.js",
|
|
40
58
|
"dist",
|
|
41
59
|
"src"
|
|
42
60
|
],
|
|
43
61
|
"dependencies": {
|
|
44
|
-
"@automerge/automerge": "3.
|
|
45
|
-
"@automerge/automerge-repo": "2.
|
|
62
|
+
"@automerge/automerge": "3.2.3",
|
|
63
|
+
"@automerge/automerge-repo": "2.5.1",
|
|
64
|
+
"@effect/experimental": "0.58.0",
|
|
65
|
+
"@effect/sql": "0.49.0",
|
|
66
|
+
"@effect/sql-sqlite-node": "0.50.1",
|
|
46
67
|
"@obsidize/tar-browserify": "^5.2.0",
|
|
47
68
|
"cbor-x": "^1.5.4",
|
|
69
|
+
"effect": "3.20.0",
|
|
48
70
|
"platform": "^1.3.6",
|
|
49
|
-
"@dxos/
|
|
50
|
-
"@dxos/
|
|
51
|
-
"@dxos/codec-protobuf": "0.8.4-main.
|
|
52
|
-
"@dxos/
|
|
53
|
-
"@dxos/
|
|
54
|
-
"@dxos/
|
|
55
|
-
"@dxos/
|
|
56
|
-
"@dxos/debug": "0.8.4-main.
|
|
57
|
-
"@dxos/echo
|
|
58
|
-
"@dxos/echo-
|
|
59
|
-
"@dxos/echo-
|
|
60
|
-
"@dxos/echo-
|
|
61
|
-
"@dxos/edge-client": "0.8.4-main.
|
|
62
|
-
"@dxos/
|
|
63
|
-
"@dxos/
|
|
64
|
-
"@dxos/invariant": "0.8.4-main.
|
|
65
|
-
"@dxos/
|
|
66
|
-
"@dxos/
|
|
67
|
-
"@dxos/
|
|
68
|
-
"@dxos/
|
|
69
|
-
"@dxos/
|
|
70
|
-
"@dxos/
|
|
71
|
-
"@dxos/
|
|
72
|
-
"@dxos/
|
|
73
|
-
"@dxos/
|
|
74
|
-
"@dxos/
|
|
75
|
-
"@dxos/
|
|
76
|
-
"@dxos/
|
|
77
|
-
"@dxos/
|
|
78
|
-
"@dxos/
|
|
79
|
-
"@dxos/timeframe": "0.8.4-main.
|
|
80
|
-
"@dxos/
|
|
81
|
-
"@dxos/util": "0.8.4-main.
|
|
82
|
-
"@dxos/websocket-rpc": "0.8.4-main.
|
|
71
|
+
"@dxos/client-protocol": "0.8.4-main.bcb3aa67d6",
|
|
72
|
+
"@dxos/async": "0.8.4-main.bcb3aa67d6",
|
|
73
|
+
"@dxos/codec-protobuf": "0.8.4-main.bcb3aa67d6",
|
|
74
|
+
"@dxos/context": "0.8.4-main.bcb3aa67d6",
|
|
75
|
+
"@dxos/credentials": "0.8.4-main.bcb3aa67d6",
|
|
76
|
+
"@dxos/crypto": "0.8.4-main.bcb3aa67d6",
|
|
77
|
+
"@dxos/config": "0.8.4-main.bcb3aa67d6",
|
|
78
|
+
"@dxos/debug": "0.8.4-main.bcb3aa67d6",
|
|
79
|
+
"@dxos/echo": "0.8.4-main.bcb3aa67d6",
|
|
80
|
+
"@dxos/echo-db": "0.8.4-main.bcb3aa67d6",
|
|
81
|
+
"@dxos/echo-protocol": "0.8.4-main.bcb3aa67d6",
|
|
82
|
+
"@dxos/echo-pipeline": "0.8.4-main.bcb3aa67d6",
|
|
83
|
+
"@dxos/edge-client": "0.8.4-main.bcb3aa67d6",
|
|
84
|
+
"@dxos/effect": "0.8.4-main.bcb3aa67d6",
|
|
85
|
+
"@dxos/feed-store": "0.8.4-main.bcb3aa67d6",
|
|
86
|
+
"@dxos/invariant": "0.8.4-main.bcb3aa67d6",
|
|
87
|
+
"@dxos/feed": "0.8.4-main.bcb3aa67d6",
|
|
88
|
+
"@dxos/keyring": "0.8.4-main.bcb3aa67d6",
|
|
89
|
+
"@dxos/keys": "0.8.4-main.bcb3aa67d6",
|
|
90
|
+
"@dxos/kv-store": "0.8.4-main.bcb3aa67d6",
|
|
91
|
+
"@dxos/log": "0.8.4-main.bcb3aa67d6",
|
|
92
|
+
"@dxos/lock-file": "0.8.4-main.bcb3aa67d6",
|
|
93
|
+
"@dxos/messaging": "0.8.4-main.bcb3aa67d6",
|
|
94
|
+
"@dxos/network-manager": "0.8.4-main.bcb3aa67d6",
|
|
95
|
+
"@dxos/node-std": "0.8.4-main.bcb3aa67d6",
|
|
96
|
+
"@dxos/protocols": "0.8.4-main.bcb3aa67d6",
|
|
97
|
+
"@dxos/rpc": "0.8.4-main.bcb3aa67d6",
|
|
98
|
+
"@dxos/teleport": "0.8.4-main.bcb3aa67d6",
|
|
99
|
+
"@dxos/sql-sqlite": "0.8.4-main.bcb3aa67d6",
|
|
100
|
+
"@dxos/random-access-storage": "0.8.4-main.bcb3aa67d6",
|
|
101
|
+
"@dxos/timeframe": "0.8.4-main.bcb3aa67d6",
|
|
102
|
+
"@dxos/teleport-extension-gossip": "0.8.4-main.bcb3aa67d6",
|
|
103
|
+
"@dxos/util": "0.8.4-main.bcb3aa67d6",
|
|
104
|
+
"@dxos/websocket-rpc": "0.8.4-main.bcb3aa67d6",
|
|
105
|
+
"@dxos/tracing": "0.8.4-main.bcb3aa67d6",
|
|
106
|
+
"@dxos/teleport-extension-object-sync": "0.8.4-main.bcb3aa67d6"
|
|
83
107
|
},
|
|
84
108
|
"devDependencies": {
|
|
85
109
|
"@types/platform": "^1.3.4",
|
|
86
110
|
"@types/readable-stream": "^2.3.9",
|
|
87
111
|
"get-port-please": "^3.1.1",
|
|
88
|
-
"@dxos/
|
|
89
|
-
"@dxos/
|
|
112
|
+
"@dxos/test-utils": "0.8.4-main.bcb3aa67d6",
|
|
113
|
+
"@dxos/signal": "0.8.4-main.bcb3aa67d6"
|
|
90
114
|
},
|
|
91
115
|
"publishConfig": {
|
|
92
116
|
"access": "public"
|
package/src/index.ts
CHANGED
|
@@ -8,6 +8,7 @@ export * from './packlets/identity';
|
|
|
8
8
|
export * from './packlets/invitations';
|
|
9
9
|
export * from './packlets/locks';
|
|
10
10
|
export * from './packlets/services';
|
|
11
|
+
export * from './packlets/space-export';
|
|
11
12
|
export * from './packlets/spaces';
|
|
12
13
|
export * from './packlets/storage';
|
|
13
14
|
export * from './packlets/worker';
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
// Copyright 2024 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
+
import { Context } from '@dxos/context';
|
|
5
6
|
import { DeferredTask, Event, scheduleTask, synchronized } from '@dxos/async';
|
|
6
7
|
import { Resource } from '@dxos/context';
|
|
7
8
|
import { type EdgeHttpClient } from '@dxos/edge-client';
|
|
@@ -50,12 +51,12 @@ export class EdgeAgentManager extends Resource {
|
|
|
50
51
|
}
|
|
51
52
|
|
|
52
53
|
@synchronized
|
|
53
|
-
public async createAgent(): Promise<void> {
|
|
54
|
+
public async createAgent(ctx: Context): Promise<void> {
|
|
54
55
|
invariant(this.isOpen);
|
|
55
56
|
invariant(this._edgeHttpClient);
|
|
56
57
|
invariant(this._edgeFeatures?.agents);
|
|
57
58
|
|
|
58
|
-
const response = await this._edgeHttpClient.createAgent({
|
|
59
|
+
const response = await this._edgeHttpClient.createAgent(ctx, {
|
|
59
60
|
identityKey: this._identity.identityKey.toHex(),
|
|
60
61
|
haloSpaceId: this._identity.haloSpaceId,
|
|
61
62
|
haloSpaceKey: this._identity.haloSpaceKey.toHex(),
|
|
@@ -92,7 +93,7 @@ export class EdgeAgentManager extends Resource {
|
|
|
92
93
|
|
|
93
94
|
this._lastKnownDeviceCount = this._identity.authorizedDeviceKeys.size;
|
|
94
95
|
this._fetchAgentStatusTask = new DeferredTask(this._ctx, async () => {
|
|
95
|
-
await this._fetchAgentStatus();
|
|
96
|
+
await this._fetchAgentStatus(this._ctx);
|
|
96
97
|
});
|
|
97
98
|
this._fetchAgentStatusTask.schedule();
|
|
98
99
|
|
|
@@ -117,11 +118,13 @@ export class EdgeAgentManager extends Resource {
|
|
|
117
118
|
this._lastKnownDeviceCount = 0;
|
|
118
119
|
}
|
|
119
120
|
|
|
120
|
-
protected async _fetchAgentStatus(): Promise<void> {
|
|
121
|
+
protected async _fetchAgentStatus(ctx: Context): Promise<void> {
|
|
121
122
|
invariant(this._edgeHttpClient);
|
|
122
123
|
try {
|
|
123
124
|
log('fetching agent status');
|
|
124
|
-
const { agent } = await this._edgeHttpClient.getAgentStatus({
|
|
125
|
+
const { agent } = await this._edgeHttpClient.getAgentStatus(ctx, {
|
|
126
|
+
ownerIdentityKey: this._identity.identityKey,
|
|
127
|
+
});
|
|
125
128
|
const wasAgentCreatedDuringQuery = this._agentStatus === EdgeAgentStatus.ACTIVE;
|
|
126
129
|
if (!wasAgentCreatedDuringQuery) {
|
|
127
130
|
const deviceKey = agent.deviceKey ? PublicKey.fromHex(agent.deviceKey) : undefined;
|
|
@@ -162,7 +165,7 @@ export class EdgeAgentManager extends Resource {
|
|
|
162
165
|
space.notarizationPlugin.setActiveEdgePollingEnabled(agentFeedNeedsNotarization);
|
|
163
166
|
activePollingEnabled = activePollingEnabled || agentFeedNeedsNotarization;
|
|
164
167
|
|
|
165
|
-
log.
|
|
168
|
+
log.verbose('set active edge polling', { enabled: agentFeedNeedsNotarization, spaceId: space.id });
|
|
166
169
|
}
|
|
167
170
|
|
|
168
171
|
if (activePollingEnabled) {
|
|
@@ -178,6 +181,6 @@ export class EdgeAgentManager extends Resource {
|
|
|
178
181
|
if (deviceKey) {
|
|
179
182
|
this._ensureAgentIsInSpaces(deviceKey);
|
|
180
183
|
}
|
|
181
|
-
log.
|
|
184
|
+
log.verbose('agent status update', { status });
|
|
182
185
|
}
|
|
183
186
|
}
|
|
@@ -6,12 +6,12 @@ import { Stream } from '@dxos/codec-protobuf/stream';
|
|
|
6
6
|
import { type EdgeConnection } from '@dxos/edge-client';
|
|
7
7
|
import { EdgeAgentStatus } from '@dxos/protocols';
|
|
8
8
|
import {
|
|
9
|
-
|
|
9
|
+
type EdgeAgentService,
|
|
10
10
|
EdgeStatus,
|
|
11
|
+
QueryAgentStatusResponse,
|
|
11
12
|
type QueryEdgeStatusResponse,
|
|
12
|
-
type EdgeAgentService,
|
|
13
13
|
} from '@dxos/protocols/proto/dxos/client/services';
|
|
14
|
-
|
|
14
|
+
import { Context } from '@dxos/context';
|
|
15
15
|
import { type EdgeAgentManager } from './edge-agent-manager';
|
|
16
16
|
|
|
17
17
|
// TODO(wittjosiah): This service is not currently exposed on the client api, it must be called directly.
|
|
@@ -25,7 +25,17 @@ export class EdgeAgentServiceImpl implements EdgeAgentService {
|
|
|
25
25
|
queryEdgeStatus(): Stream<QueryEdgeStatusResponse> {
|
|
26
26
|
return new Stream(({ ctx, next }) => {
|
|
27
27
|
const update = () => {
|
|
28
|
-
next({
|
|
28
|
+
next({
|
|
29
|
+
status: this._edgeConnection?.status ?? {
|
|
30
|
+
state: EdgeStatus.ConnectionState.NOT_CONNECTED,
|
|
31
|
+
rtt: 0,
|
|
32
|
+
uptime: 0,
|
|
33
|
+
rateBytesUp: 0,
|
|
34
|
+
rateBytesDown: 0,
|
|
35
|
+
messagesSent: 0,
|
|
36
|
+
messagesReceived: 0,
|
|
37
|
+
},
|
|
38
|
+
});
|
|
29
39
|
};
|
|
30
40
|
|
|
31
41
|
this._edgeConnection?.statusChanged.on(ctx, update);
|
|
@@ -34,7 +44,7 @@ export class EdgeAgentServiceImpl implements EdgeAgentService {
|
|
|
34
44
|
}
|
|
35
45
|
|
|
36
46
|
async createAgent(): Promise<void> {
|
|
37
|
-
return (await this._agentManagerProvider()).createAgent();
|
|
47
|
+
return (await this._agentManagerProvider()).createAgent(Context.default());
|
|
38
48
|
}
|
|
39
49
|
|
|
40
50
|
queryAgentStatus(): Stream<QueryAgentStatusResponse> {
|
|
@@ -2,17 +2,18 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import { afterEach,
|
|
5
|
+
import { afterEach, beforeEach, describe, expect, onTestFinished, test } from 'vitest';
|
|
6
6
|
|
|
7
7
|
import { Trigger } from '@dxos/async';
|
|
8
8
|
import { Context } from '@dxos/context';
|
|
9
9
|
import { log } from '@dxos/log';
|
|
10
|
-
import { type
|
|
10
|
+
import { type Device, type DevicesService } from '@dxos/protocols/proto/dxos/client/services';
|
|
11
11
|
|
|
12
|
-
import { DevicesServiceImpl } from './devices-service';
|
|
13
12
|
import { type ServiceContext } from '../services';
|
|
14
13
|
import { createServiceContext } from '../testing';
|
|
15
14
|
|
|
15
|
+
import { DevicesServiceImpl } from './devices-service';
|
|
16
|
+
|
|
16
17
|
describe('DevicesService', () => {
|
|
17
18
|
let serviceContext: ServiceContext;
|
|
18
19
|
let devicesService: DevicesService;
|
|
@@ -9,8 +9,8 @@ import { invariant } from '@dxos/invariant';
|
|
|
9
9
|
import {
|
|
10
10
|
Device,
|
|
11
11
|
DeviceKind,
|
|
12
|
-
EdgeStatus,
|
|
13
12
|
type DevicesService,
|
|
13
|
+
EdgeStatus,
|
|
14
14
|
type QueryDevicesResponse,
|
|
15
15
|
} from '@dxos/protocols/proto/dxos/client/services';
|
|
16
16
|
import { type DeviceProfileDocument } from '@dxos/protocols/proto/dxos/halo/credentials';
|
|
@@ -44,7 +44,7 @@ export class DevicesServiceImpl implements DevicesService {
|
|
|
44
44
|
presence = Device.PresenceState.ONLINE;
|
|
45
45
|
} else if (profile.os?.toUpperCase() === 'EDGE') {
|
|
46
46
|
presence =
|
|
47
|
-
this._edgeConnection?.status === EdgeStatus.CONNECTED
|
|
47
|
+
this._edgeConnection?.status.state === EdgeStatus.ConnectionState.CONNECTED
|
|
48
48
|
? Device.PresenceState.ONLINE
|
|
49
49
|
: Device.PresenceState.OFFLINE;
|
|
50
50
|
} else {
|
|
@@ -11,14 +11,18 @@ import {
|
|
|
11
11
|
type EnableDebugLoggingRequest,
|
|
12
12
|
type EnableDebugLoggingResponse,
|
|
13
13
|
type Event,
|
|
14
|
+
type GetBlobsResponse,
|
|
14
15
|
type GetConfigResponse,
|
|
15
16
|
type GetNetworkPeersRequest,
|
|
16
17
|
type GetNetworkPeersResponse,
|
|
18
|
+
type GetSnapshotsResponse,
|
|
17
19
|
type GetSpaceSnapshotRequest,
|
|
18
20
|
type GetSpaceSnapshotResponse,
|
|
19
21
|
type ResetStorageRequest,
|
|
20
22
|
type SaveSpaceSnapshotRequest,
|
|
21
23
|
type SaveSpaceSnapshotResponse,
|
|
24
|
+
type SignalResponse,
|
|
25
|
+
type StorageInfo,
|
|
22
26
|
type SubscribeToCredentialMessagesRequest,
|
|
23
27
|
type SubscribeToCredentialMessagesResponse,
|
|
24
28
|
type SubscribeToFeedBlocksRequest,
|
|
@@ -29,30 +33,27 @@ import {
|
|
|
29
33
|
type SubscribeToItemsResponse,
|
|
30
34
|
type SubscribeToKeyringKeysRequest,
|
|
31
35
|
type SubscribeToKeyringKeysResponse,
|
|
36
|
+
type SubscribeToMetadataResponse,
|
|
32
37
|
type SubscribeToNetworkTopicsResponse,
|
|
38
|
+
type SubscribeToSignalStatusResponse,
|
|
33
39
|
type SubscribeToSpacesRequest,
|
|
34
40
|
type SubscribeToSpacesResponse,
|
|
35
|
-
type SubscribeToSignalStatusResponse,
|
|
36
|
-
type SignalResponse,
|
|
37
41
|
type SubscribeToSwarmInfoResponse,
|
|
38
|
-
type StorageInfo,
|
|
39
|
-
type GetSnapshotsResponse,
|
|
40
|
-
type SubscribeToMetadataResponse,
|
|
41
|
-
type GetBlobsResponse,
|
|
42
42
|
} from '@dxos/protocols/proto/dxos/devtools/host';
|
|
43
43
|
|
|
44
|
+
import { type ServiceContext } from '../services';
|
|
45
|
+
|
|
44
46
|
import { subscribeToFeedBlocks, subscribeToFeeds } from './feeds';
|
|
45
47
|
import { subscribeToKeyringKeys } from './keys';
|
|
46
48
|
import { subscribeToMetadata } from './metadata';
|
|
47
49
|
import { subscribeToNetworkStatus, subscribeToSignal, subscribeToSwarmInfo } from './network';
|
|
48
50
|
import { subscribeToSpaces } from './spaces';
|
|
49
|
-
import { type ServiceContext } from '../services';
|
|
50
51
|
|
|
51
52
|
export class DevtoolsHostEvents {
|
|
52
53
|
readonly ready = new AsyncEvent();
|
|
53
54
|
}
|
|
54
55
|
|
|
55
|
-
export type
|
|
56
|
+
export type DevtoolsServiceProps = {
|
|
56
57
|
events: DevtoolsHostEvents;
|
|
57
58
|
config: Config;
|
|
58
59
|
context: ServiceContext;
|
|
@@ -62,9 +63,9 @@ export type DevtoolsServiceParams = {
|
|
|
62
63
|
* @deprecated
|
|
63
64
|
*/
|
|
64
65
|
export class DevtoolsServiceImpl implements DevtoolsHost {
|
|
65
|
-
constructor(private readonly params:
|
|
66
|
+
constructor(private readonly params: DevtoolsServiceProps) {}
|
|
66
67
|
|
|
67
|
-
events(
|
|
68
|
+
events(_request: void): Stream<Event> {
|
|
68
69
|
return new Stream<Event>(({ next }) => {
|
|
69
70
|
this.params.events.ready.on(() => {
|
|
70
71
|
next({ ready: {} });
|
|
@@ -72,7 +73,7 @@ export class DevtoolsServiceImpl implements DevtoolsHost {
|
|
|
72
73
|
});
|
|
73
74
|
}
|
|
74
75
|
|
|
75
|
-
async getConfig(
|
|
76
|
+
async getConfig(_request: void): Promise<GetConfigResponse> {
|
|
76
77
|
return { config: JSON.stringify(this.params.config.values) }; // 😨
|
|
77
78
|
}
|
|
78
79
|
|
|
@@ -101,65 +102,65 @@ export class DevtoolsServiceImpl implements DevtoolsHost {
|
|
|
101
102
|
};
|
|
102
103
|
}
|
|
103
104
|
|
|
104
|
-
resetStorage(
|
|
105
|
+
resetStorage(_request: ResetStorageRequest): Promise<void> {
|
|
105
106
|
throw new Error();
|
|
106
107
|
}
|
|
107
108
|
|
|
108
|
-
enableDebugLogging(
|
|
109
|
+
enableDebugLogging(_request: EnableDebugLoggingRequest): Promise<EnableDebugLoggingResponse> {
|
|
109
110
|
throw new Error();
|
|
110
111
|
}
|
|
111
112
|
|
|
112
|
-
disableDebugLogging(
|
|
113
|
+
disableDebugLogging(_request: EnableDebugLoggingRequest): Promise<EnableDebugLoggingResponse> {
|
|
113
114
|
throw new Error();
|
|
114
115
|
}
|
|
115
116
|
|
|
116
|
-
subscribeToKeyringKeys(
|
|
117
|
+
subscribeToKeyringKeys(_request: SubscribeToKeyringKeysRequest): Stream<SubscribeToKeyringKeysResponse> {
|
|
117
118
|
return subscribeToKeyringKeys({ keyring: this.params.context.keyring });
|
|
118
119
|
}
|
|
119
120
|
|
|
120
121
|
subscribeToCredentialMessages(
|
|
121
|
-
|
|
122
|
+
_request: SubscribeToCredentialMessagesRequest,
|
|
122
123
|
): Stream<SubscribeToCredentialMessagesResponse> {
|
|
123
124
|
throw new Error();
|
|
124
125
|
}
|
|
125
126
|
|
|
126
|
-
subscribeToSpaces(
|
|
127
|
-
return subscribeToSpaces(this.params.context,
|
|
127
|
+
subscribeToSpaces(_request: SubscribeToSpacesRequest): Stream<SubscribeToSpacesResponse> {
|
|
128
|
+
return subscribeToSpaces(this.params.context, _request);
|
|
128
129
|
}
|
|
129
130
|
|
|
130
|
-
subscribeToItems(
|
|
131
|
+
subscribeToItems(_request: SubscribeToItemsRequest): Stream<SubscribeToItemsResponse> {
|
|
131
132
|
throw new Error();
|
|
132
133
|
}
|
|
133
134
|
|
|
134
|
-
subscribeToFeeds(
|
|
135
|
-
return subscribeToFeeds(this.params.context,
|
|
135
|
+
subscribeToFeeds(_request: SubscribeToFeedsRequest): Stream<SubscribeToFeedsResponse> {
|
|
136
|
+
return subscribeToFeeds(this.params.context, _request);
|
|
136
137
|
}
|
|
137
138
|
|
|
138
|
-
subscribeToFeedBlocks(
|
|
139
|
-
return subscribeToFeedBlocks({ feedStore: this.params.context.feedStore },
|
|
139
|
+
subscribeToFeedBlocks(_request: SubscribeToFeedBlocksRequest): Stream<SubscribeToFeedBlocksResponse> {
|
|
140
|
+
return subscribeToFeedBlocks({ feedStore: this.params.context.feedStore }, _request);
|
|
140
141
|
}
|
|
141
142
|
|
|
142
|
-
getSpaceSnapshot(
|
|
143
|
+
getSpaceSnapshot(_request: GetSpaceSnapshotRequest): Promise<GetSpaceSnapshotResponse> {
|
|
143
144
|
throw new Error();
|
|
144
145
|
}
|
|
145
146
|
|
|
146
|
-
saveSpaceSnapshot(
|
|
147
|
+
saveSpaceSnapshot(_request: SaveSpaceSnapshotRequest): Promise<SaveSpaceSnapshotResponse> {
|
|
147
148
|
throw new Error();
|
|
148
149
|
}
|
|
149
150
|
|
|
150
|
-
clearSnapshots(
|
|
151
|
+
clearSnapshots(_request: ClearSnapshotsRequest): Promise<void> {
|
|
151
152
|
throw new Error();
|
|
152
153
|
}
|
|
153
154
|
|
|
154
|
-
getNetworkPeers(
|
|
155
|
+
getNetworkPeers(_request: GetNetworkPeersRequest): Promise<GetNetworkPeersResponse> {
|
|
155
156
|
throw new Error();
|
|
156
157
|
}
|
|
157
158
|
|
|
158
|
-
subscribeToNetworkTopics(
|
|
159
|
+
subscribeToNetworkTopics(_request: void): Stream<SubscribeToNetworkTopicsResponse> {
|
|
159
160
|
throw new Error();
|
|
160
161
|
}
|
|
161
162
|
|
|
162
|
-
subscribeToSignalStatus(
|
|
163
|
+
subscribeToSignalStatus(_request: void): Stream<SubscribeToSignalStatusResponse> {
|
|
163
164
|
return subscribeToNetworkStatus({ signalManager: this.params.context.signalManager });
|
|
164
165
|
}
|
|
165
166
|
|
|
@@ -9,10 +9,10 @@ import { FeedIterator, type FeedStore, type FeedWrapper } from '@dxos/feed-store
|
|
|
9
9
|
import { PublicKey } from '@dxos/keys';
|
|
10
10
|
import { log } from '@dxos/log';
|
|
11
11
|
import {
|
|
12
|
-
type SubscribeToFeedsRequest,
|
|
13
|
-
type SubscribeToFeedsResponse,
|
|
14
12
|
type SubscribeToFeedBlocksRequest,
|
|
15
13
|
type SubscribeToFeedBlocksResponse,
|
|
14
|
+
type SubscribeToFeedsRequest,
|
|
15
|
+
type SubscribeToFeedsResponse,
|
|
16
16
|
} from '@dxos/protocols/proto/dxos/devtools/host';
|
|
17
17
|
import { type FeedMessage } from '@dxos/protocols/proto/dxos/echo/feed';
|
|
18
18
|
import { ComplexMap } from '@dxos/util';
|
|
@@ -10,9 +10,9 @@ import { type SwarmNetworkManager } from '@dxos/network-manager';
|
|
|
10
10
|
import {
|
|
11
11
|
type GetNetworkPeersRequest,
|
|
12
12
|
type GetNetworkPeersResponse,
|
|
13
|
+
type SignalResponse,
|
|
13
14
|
type SubscribeToNetworkTopicsResponse,
|
|
14
15
|
type SubscribeToSignalStatusResponse,
|
|
15
|
-
type SignalResponse,
|
|
16
16
|
type SubscribeToSwarmInfoResponse,
|
|
17
17
|
} from '@dxos/protocols/proto/dxos/devtools/host';
|
|
18
18
|
|
|
@@ -7,8 +7,8 @@ import { log } from '@dxos/log';
|
|
|
7
7
|
import { type SystemService } from '@dxos/protocols/proto/dxos/client/services';
|
|
8
8
|
|
|
9
9
|
import {
|
|
10
|
-
type CollectDiagnosticsBroadcastSender,
|
|
11
10
|
type CollectDiagnosticsBroadcastHandler,
|
|
11
|
+
type CollectDiagnosticsBroadcastSender,
|
|
12
12
|
} from './diagnostics-collector';
|
|
13
13
|
|
|
14
14
|
const CHANNEL_NAME = 'dxos.diagnostics.broadcast';
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
import { type SystemService } from '@dxos/protocols/proto/dxos/client/services';
|
|
6
6
|
|
|
7
7
|
import {
|
|
8
|
-
type CollectDiagnosticsBroadcastSender,
|
|
9
8
|
type CollectDiagnosticsBroadcastHandler,
|
|
9
|
+
type CollectDiagnosticsBroadcastSender,
|
|
10
10
|
} from './diagnostics-collector';
|
|
11
11
|
|
|
12
12
|
export const createCollectDiagnosticsBroadcastSender = (): CollectDiagnosticsBroadcastSender => {
|
|
@@ -6,7 +6,7 @@ import { type ClientServicesProvider, ClientServicesProviderResource } from '@dx
|
|
|
6
6
|
import { type Config, ConfigResource } from '@dxos/config';
|
|
7
7
|
import { GetDiagnosticsRequest } from '@dxos/protocols/proto/dxos/client/services';
|
|
8
8
|
import { TRACE_PROCESSOR } from '@dxos/tracing';
|
|
9
|
-
import { type JsonKeyOptions,
|
|
9
|
+
import { type JsonKeyOptions, isNonNullable, jsonKeyReplacer } from '@dxos/util';
|
|
10
10
|
|
|
11
11
|
import { createCollectDiagnosticsBroadcastSender } from './diagnostics-broadcast';
|
|
12
12
|
|
|
@@ -11,13 +11,13 @@ import { invariant } from '@dxos/invariant';
|
|
|
11
11
|
import { type PublicKey } from '@dxos/keys';
|
|
12
12
|
import { STORAGE_VERSION } from '@dxos/protocols';
|
|
13
13
|
import {
|
|
14
|
-
SpaceMember,
|
|
15
14
|
type Device,
|
|
16
15
|
type Identity,
|
|
17
16
|
type LogEntry,
|
|
18
17
|
type Metrics,
|
|
19
18
|
type NetworkStatus,
|
|
20
19
|
type Platform,
|
|
20
|
+
SpaceMember,
|
|
21
21
|
type Space as SpaceProto,
|
|
22
22
|
} from '@dxos/protocols/proto/dxos/client/services';
|
|
23
23
|
import { type SubscribeToFeedsResponse } from '@dxos/protocols/proto/dxos/devtools/host';
|
|
@@ -11,7 +11,7 @@ import { Keyring } from '@dxos/keyring';
|
|
|
11
11
|
import { PublicKey } from '@dxos/keys';
|
|
12
12
|
import { ComplexSet } from '@dxos/util';
|
|
13
13
|
|
|
14
|
-
import {
|
|
14
|
+
import { TrustedKeySetAuthVerifier, createAuthProvider } from './authenticator';
|
|
15
15
|
|
|
16
16
|
describe('identity/authenticator', () => {
|
|
17
17
|
test('verifies credentials', async () => {
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import { type Event, Trigger } from '@dxos/async';
|
|
6
6
|
import { Context } from '@dxos/context';
|
|
7
|
-
import {
|
|
7
|
+
import { type CredentialSigner, verifyCredential } from '@dxos/credentials';
|
|
8
8
|
import { type AuthProvider, type AuthVerifier } from '@dxos/echo-pipeline';
|
|
9
9
|
import { type PublicKey } from '@dxos/keys';
|
|
10
10
|
import { log } from '@dxos/log';
|
|
@@ -27,7 +27,7 @@ export const createAuthProvider =
|
|
|
27
27
|
return Credential.encode(credential);
|
|
28
28
|
};
|
|
29
29
|
|
|
30
|
-
export type
|
|
30
|
+
export type TrustedKeySetAuthVerifierProps = {
|
|
31
31
|
// TODO(dmaretskyi): Change to `isTrusted: (key) => bool`.
|
|
32
32
|
trustedKeysProvider: () => ComplexSet<PublicKey>;
|
|
33
33
|
update: Event<void>;
|
|
@@ -44,7 +44,7 @@ export type TrustedKeySetAuthVerifierParams = {
|
|
|
44
44
|
export class TrustedKeySetAuthVerifier {
|
|
45
45
|
private _ctx = new Context();
|
|
46
46
|
|
|
47
|
-
constructor(private readonly _params:
|
|
47
|
+
constructor(private readonly _params: TrustedKeySetAuthVerifierProps) {}
|
|
48
48
|
|
|
49
49
|
async close(): Promise<void> {
|
|
50
50
|
await this._ctx.dispose();
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// Copyright 2024 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import { SubscriptionList, UpdateScheduler, scheduleTask } from '@dxos/async';
|
|
6
6
|
import { Stream } from '@dxos/codec-protobuf/stream';
|
|
7
7
|
import { type MemberInfo } from '@dxos/credentials';
|
|
8
8
|
import { type SpaceManager } from '@dxos/echo-pipeline';
|
|
@@ -10,9 +10,10 @@ import { PublicKey } from '@dxos/keys';
|
|
|
10
10
|
import { type Contact, type ContactBook, type ContactsService } from '@dxos/protocols/proto/dxos/client/services';
|
|
11
11
|
import { ComplexMap, ComplexSet } from '@dxos/util';
|
|
12
12
|
|
|
13
|
-
import { type IdentityManager } from './identity-manager';
|
|
14
13
|
import { type DataSpaceManager } from '../spaces';
|
|
15
14
|
|
|
15
|
+
import { type IdentityManager } from './identity-manager';
|
|
16
|
+
|
|
16
17
|
export class ContactsServiceImpl implements ContactsService {
|
|
17
18
|
constructor(
|
|
18
19
|
private readonly _identityManager: IdentityManager,
|