@dxos/client-services 0.8.3 → 0.8.4-main.05e74ebcff
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/LICENSE +102 -5
- package/README.md +1 -1
- package/dist/lib/browser/chunk-QCWEHHJW.mjs +24 -0
- package/dist/lib/browser/chunk-QCWEHHJW.mjs.map +7 -0
- package/dist/lib/browser/{chunk-LBG3C332.mjs → chunk-U2YFOK57.mjs} +3848 -5128
- package/dist/lib/browser/chunk-U2YFOK57.mjs.map +7 -0
- package/dist/lib/browser/chunk-XJRPB3GA.mjs +22 -0
- package/dist/lib/browser/chunk-XJRPB3GA.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +454 -148
- 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 +88 -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 +86 -0
- package/dist/lib/browser/packlets/locks/browser.mjs.map +7 -0
- package/dist/lib/browser/packlets/locks/node.mjs +48 -0
- package/dist/lib/browser/packlets/locks/node.mjs.map +7 -0
- package/dist/lib/browser/testing/index.mjs +40 -41
- package/dist/lib/browser/testing/index.mjs.map +3 -3
- package/dist/lib/node-esm/chunk-2DT3MZRL.mjs +22 -0
- package/dist/lib/node-esm/chunk-2DT3MZRL.mjs.map +7 -0
- 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-SKGQLRKS.mjs → chunk-OMK2O7UD.mjs} +3247 -4395
- package/dist/lib/node-esm/chunk-OMK2O7UD.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +454 -148
- 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 +88 -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 +86 -0
- package/dist/lib/node-esm/packlets/locks/browser.mjs.map +7 -0
- package/dist/lib/node-esm/packlets/locks/node.mjs +48 -0
- package/dist/lib/node-esm/packlets/locks/node.mjs.map +7 -0
- package/dist/lib/node-esm/testing/index.mjs +40 -41
- 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 +3 -2
- 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/keys.d.ts.map +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.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-collector.d.ts.map +1 -1
- package/dist/types/src/packlets/diagnostics/diagnostics.d.ts +3 -4
- 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 +8 -7
- package/dist/types/src/packlets/identity/identity-recovery-manager.d.ts.map +1 -1
- package/dist/types/src/packlets/identity/identity-service.d.ts +6 -10
- 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 +6 -5
- 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 +2 -2
- package/dist/types/src/packlets/invitations/edge-invitation-handler.d.ts.map +1 -1
- package/dist/types/src/packlets/invitations/index.d.ts +1 -1
- package/dist/types/src/packlets/invitations/index.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 +8 -5
- package/dist/types/src/packlets/invitations/invitation-protocol.d.ts.map +1 -1
- package/dist/types/src/packlets/invitations/invitation-state.d.ts.map +1 -1
- package/dist/types/src/packlets/invitations/invitation-topology.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 +4 -4
- package/dist/types/src/packlets/invitations/invitations-service.d.ts.map +1 -1
- package/dist/types/src/packlets/invitations/space-invitation-protocol.d.ts +5 -4
- 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/browser.d.ts.map +1 -1
- package/dist/types/src/packlets/locks/index.d.ts +2 -2
- package/dist/types/src/packlets/locks/index.d.ts.map +1 -1
- package/dist/types/src/packlets/locks/node.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 +7 -6
- package/dist/types/src/packlets/network/network-service.d.ts.map +1 -1
- package/dist/types/src/packlets/services/client-rpc-server.d.ts +5 -5
- 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 -10
- package/dist/types/src/packlets/services/service-context.d.ts.map +1 -1
- package/dist/types/src/packlets/services/service-host.d.ts +21 -8
- package/dist/types/src/packlets/services/service-host.d.ts.map +1 -1
- package/dist/types/src/packlets/services/service-registry.d.ts.map +1 -1
- package/dist/types/src/packlets/services/util.d.ts.map +1 -1
- package/dist/types/src/packlets/space-export/archive-format.d.ts +9 -0
- package/dist/types/src/packlets/space-export/archive-format.d.ts.map +1 -0
- package/dist/types/src/packlets/space-export/index.d.ts +4 -1
- package/dist/types/src/packlets/space-export/index.d.ts.map +1 -1
- package/dist/types/src/packlets/space-export/serialized-space-reader.d.ts +23 -0
- package/dist/types/src/packlets/space-export/serialized-space-reader.d.ts.map +1 -0
- package/dist/types/src/packlets/space-export/serialized-space-writer.d.ts +36 -0
- package/dist/types/src/packlets/space-export/serialized-space-writer.d.ts.map +1 -0
- 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 +8 -2
- 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 +31 -20
- package/dist/types/src/packlets/spaces/data-space-manager.d.ts.map +1 -1
- package/dist/types/src/packlets/spaces/data-space.d.ts +30 -13
- 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/epoch-migrations.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 -9
- package/dist/types/src/packlets/spaces/notarization-plugin.d.ts.map +1 -1
- package/dist/types/src/packlets/spaces/spaces-service.d.ts +11 -8
- package/dist/types/src/packlets/spaces/spaces-service.d.ts.map +1 -1
- package/dist/types/src/packlets/storage/level.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/storage/util.d.ts.map +1 -1
- package/dist/types/src/packlets/system/system-service.d.ts +2 -2
- package/dist/types/src/packlets/system/system-service.d.ts.map +1 -1
- package/dist/types/src/packlets/testing/credential-utils.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 +41 -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 -4
- package/dist/types/src/packlets/worker/worker-session.d.ts.map +1 -1
- package/dist/types/src/testing/setup.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 +73 -56
- package/src/index.ts +1 -0
- package/src/packlets/agents/edge-agent-manager.ts +10 -7
- package/src/packlets/agents/edge-agent-service.ts +17 -5
- package/src/packlets/devices/devices-service.test.ts +3 -3
- package/src/packlets/devices/devices-service.ts +2 -2
- package/src/packlets/devtools/devtools.ts +29 -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 +2 -3
- 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 +2 -2
- package/src/packlets/identity/identity-manager.test.ts +8 -8
- package/src/packlets/identity/identity-manager.ts +25 -24
- package/src/packlets/identity/identity-recovery-manager.ts +22 -18
- package/src/packlets/identity/identity-service.test.ts +8 -28
- package/src/packlets/identity/identity-service.ts +13 -80
- package/src/packlets/identity/identity.test.ts +11 -11
- package/src/packlets/identity/identity.ts +17 -39
- package/src/packlets/invitations/device-invitation-protocol.test.ts +4 -4
- package/src/packlets/invitations/device-invitation-protocol.ts +8 -6
- package/src/packlets/invitations/edge-invitation-handler.ts +10 -6
- package/src/packlets/invitations/index.ts +1 -1
- package/src/packlets/invitations/invitation-guest-extenstion.ts +7 -5
- package/src/packlets/invitations/invitation-host-extension.ts +15 -16
- package/src/packlets/invitations/invitation-protocol.ts +8 -5
- package/src/packlets/invitations/invitation-state.ts +1 -15
- package/src/packlets/invitations/invitations-handler.test.ts +301 -292
- package/src/packlets/invitations/invitations-handler.ts +77 -25
- package/src/packlets/invitations/invitations-manager.ts +43 -18
- package/src/packlets/invitations/invitations-service.ts +10 -10
- package/src/packlets/invitations/space-invitation-protocol.test.ts +26 -25
- package/src/packlets/invitations/space-invitation-protocol.ts +13 -17
- package/src/packlets/invitations/utils.ts +1 -1
- package/src/packlets/locks/browser.ts +1 -1
- package/src/packlets/locks/index.ts +2 -2
- package/src/packlets/logging/logging-service.ts +22 -17
- package/src/packlets/logging/logging.test.ts +1 -1
- package/src/packlets/network/network-service.test.ts +3 -3
- package/src/packlets/network/network-service.ts +12 -10
- package/src/packlets/services/client-rpc-server.ts +20 -17
- package/src/packlets/services/feed-syncer.test.ts +340 -0
- package/src/packlets/services/feed-syncer.ts +377 -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 +160 -67
- package/src/packlets/services/service-host.test.ts +10 -9
- package/src/packlets/services/service-host.ts +88 -49
- package/src/packlets/services/service-registry.test.ts +1 -1
- package/src/packlets/space-export/archive-format.ts +42 -0
- package/src/packlets/space-export/index.ts +4 -1
- package/src/packlets/space-export/serialized-space-reader.ts +111 -0
- package/src/packlets/space-export/serialized-space-writer.ts +252 -0
- package/src/packlets/space-export/space-archive-reader.ts +65 -4
- package/src/packlets/space-export/space-archive-writer.ts +44 -6
- package/src/packlets/space-export/space-archive.test.ts +461 -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 +134 -129
- package/src/packlets/spaces/data-space.ts +71 -42
- package/src/packlets/spaces/edge-feed-replicator.test.ts +4 -4
- package/src/packlets/spaces/edge-feed-replicator.ts +13 -11
- package/src/packlets/spaces/epoch-migrations.ts +6 -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 +20 -12
- package/src/packlets/spaces/spaces-service.ts +140 -38
- 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 +189 -17
- package/src/packlets/worker/worker-session.ts +15 -21
- package/src/version.ts +1 -5
- package/README.yml +0 -5
- package/dist/lib/browser/chunk-LBG3C332.mjs.map +0 -7
- package/dist/lib/node/chunk-LMGLGOUU.cjs +0 -9311
- package/dist/lib/node/chunk-LMGLGOUU.cjs.map +0 -7
- package/dist/lib/node/index.cjs +0 -437
- package/dist/lib/node/index.cjs.map +0 -7
- package/dist/lib/node/meta.json +0 -1
- package/dist/lib/node/testing/index.cjs +0 -452
- package/dist/lib/node/testing/index.cjs.map +0 -7
- package/dist/lib/node-esm/chunk-SKGQLRKS.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,92 +1,109 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/client-services",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.4-main.05e74ebcff",
|
|
4
4
|
"description": "DXOS client services implementation",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
7
|
-
"
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "https://github.com/dxos/dxos"
|
|
10
|
+
},
|
|
11
|
+
"license": "FSL-1.1-Apache-2.0",
|
|
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
|
-
"typesVersions": {
|
|
31
|
-
"*": {
|
|
32
|
-
"testing": [
|
|
33
|
-
"dist/types/src/testing/index.d.ts"
|
|
34
|
-
]
|
|
35
|
-
}
|
|
36
|
-
},
|
|
37
50
|
"files": [
|
|
38
|
-
"testing.d.ts",
|
|
39
|
-
"testing.js",
|
|
40
51
|
"dist",
|
|
41
52
|
"src"
|
|
42
53
|
],
|
|
43
54
|
"dependencies": {
|
|
44
|
-
"@automerge/automerge": "3.
|
|
45
|
-
"@automerge/automerge-repo": "2.0.
|
|
55
|
+
"@automerge/automerge": "3.2.6",
|
|
56
|
+
"@automerge/automerge-repo": "2.6.0-subduction.17",
|
|
57
|
+
"@effect/experimental": "0.58.0",
|
|
58
|
+
"@effect/sql": "0.49.0",
|
|
59
|
+
"@effect/sql-sqlite-node": "0.50.1",
|
|
46
60
|
"@obsidize/tar-browserify": "^5.2.0",
|
|
47
61
|
"cbor-x": "^1.5.4",
|
|
62
|
+
"effect": "3.20.0",
|
|
48
63
|
"platform": "^1.3.6",
|
|
49
|
-
"@dxos/
|
|
50
|
-
"@dxos/
|
|
51
|
-
"@dxos/
|
|
52
|
-
"@dxos/config": "0.8.
|
|
53
|
-
"@dxos/credentials": "0.8.
|
|
54
|
-
"@dxos/
|
|
55
|
-
"@dxos/
|
|
56
|
-
"@dxos/
|
|
57
|
-
"@dxos/echo-
|
|
58
|
-
"@dxos/
|
|
59
|
-
"@dxos/echo
|
|
60
|
-
"@dxos/
|
|
61
|
-
"@dxos/
|
|
62
|
-
"@dxos/feed
|
|
63
|
-
"@dxos/
|
|
64
|
-
"@dxos/
|
|
65
|
-
"@dxos/keyring": "0.8.
|
|
66
|
-
"@dxos/
|
|
67
|
-
"@dxos/
|
|
68
|
-
"@dxos/
|
|
69
|
-
"@dxos/
|
|
70
|
-
"@dxos/
|
|
71
|
-
"@dxos/
|
|
72
|
-
"@dxos/
|
|
73
|
-
"@dxos/
|
|
74
|
-
"@dxos/
|
|
75
|
-
"@dxos/
|
|
76
|
-
"@dxos/
|
|
77
|
-
"@dxos/teleport
|
|
78
|
-
"@dxos/
|
|
79
|
-
"@dxos/
|
|
80
|
-
"@dxos/
|
|
81
|
-
"@dxos/timeframe": "0.8.
|
|
82
|
-
"@dxos/
|
|
64
|
+
"@dxos/codec-protobuf": "0.8.4-main.05e74ebcff",
|
|
65
|
+
"@dxos/async": "0.8.4-main.05e74ebcff",
|
|
66
|
+
"@dxos/client-protocol": "0.8.4-main.05e74ebcff",
|
|
67
|
+
"@dxos/config": "0.8.4-main.05e74ebcff",
|
|
68
|
+
"@dxos/credentials": "0.8.4-main.05e74ebcff",
|
|
69
|
+
"@dxos/crypto": "0.8.4-main.05e74ebcff",
|
|
70
|
+
"@dxos/context": "0.8.4-main.05e74ebcff",
|
|
71
|
+
"@dxos/debug": "0.8.4-main.05e74ebcff",
|
|
72
|
+
"@dxos/echo-db": "0.8.4-main.05e74ebcff",
|
|
73
|
+
"@dxos/echo-pipeline": "0.8.4-main.05e74ebcff",
|
|
74
|
+
"@dxos/echo": "0.8.4-main.05e74ebcff",
|
|
75
|
+
"@dxos/effect": "0.8.4-main.05e74ebcff",
|
|
76
|
+
"@dxos/feed-store": "0.8.4-main.05e74ebcff",
|
|
77
|
+
"@dxos/feed": "0.8.4-main.05e74ebcff",
|
|
78
|
+
"@dxos/edge-client": "0.8.4-main.05e74ebcff",
|
|
79
|
+
"@dxos/echo-protocol": "0.8.4-main.05e74ebcff",
|
|
80
|
+
"@dxos/keyring": "0.8.4-main.05e74ebcff",
|
|
81
|
+
"@dxos/kv-store": "0.8.4-main.05e74ebcff",
|
|
82
|
+
"@dxos/invariant": "0.8.4-main.05e74ebcff",
|
|
83
|
+
"@dxos/log": "0.8.4-main.05e74ebcff",
|
|
84
|
+
"@dxos/lock-file": "0.8.4-main.05e74ebcff",
|
|
85
|
+
"@dxos/keys": "0.8.4-main.05e74ebcff",
|
|
86
|
+
"@dxos/messaging": "0.8.4-main.05e74ebcff",
|
|
87
|
+
"@dxos/network-manager": "0.8.4-main.05e74ebcff",
|
|
88
|
+
"@dxos/node-std": "0.8.4-main.05e74ebcff",
|
|
89
|
+
"@dxos/protocols": "0.8.4-main.05e74ebcff",
|
|
90
|
+
"@dxos/random-access-storage": "0.8.4-main.05e74ebcff",
|
|
91
|
+
"@dxos/rpc": "0.8.4-main.05e74ebcff",
|
|
92
|
+
"@dxos/teleport": "0.8.4-main.05e74ebcff",
|
|
93
|
+
"@dxos/sql-sqlite": "0.8.4-main.05e74ebcff",
|
|
94
|
+
"@dxos/teleport-extension-gossip": "0.8.4-main.05e74ebcff",
|
|
95
|
+
"@dxos/teleport-extension-object-sync": "0.8.4-main.05e74ebcff",
|
|
96
|
+
"@dxos/timeframe": "0.8.4-main.05e74ebcff",
|
|
97
|
+
"@dxos/tracing": "0.8.4-main.05e74ebcff",
|
|
98
|
+
"@dxos/util": "0.8.4-main.05e74ebcff",
|
|
99
|
+
"@dxos/websocket-rpc": "0.8.4-main.05e74ebcff"
|
|
83
100
|
},
|
|
84
101
|
"devDependencies": {
|
|
85
102
|
"@types/platform": "^1.3.4",
|
|
86
103
|
"@types/readable-stream": "^2.3.9",
|
|
87
104
|
"get-port-please": "^3.1.1",
|
|
88
|
-
"@dxos/signal": "0.8.
|
|
89
|
-
"@dxos/test-utils": "0.8.
|
|
105
|
+
"@dxos/signal": "0.8.4-main.05e74ebcff",
|
|
106
|
+
"@dxos/test-utils": "0.8.4-main.05e74ebcff"
|
|
90
107
|
},
|
|
91
108
|
"publishConfig": {
|
|
92
109
|
"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';
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
//
|
|
4
4
|
|
|
5
5
|
import { DeferredTask, Event, scheduleTask, synchronized } from '@dxos/async';
|
|
6
|
+
import { Context } from '@dxos/context';
|
|
6
7
|
import { Resource } from '@dxos/context';
|
|
7
8
|
import { type EdgeHttpClient } from '@dxos/edge-client';
|
|
8
9
|
import { invariant } from '@dxos/invariant';
|
|
@@ -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
|
}
|
|
@@ -2,14 +2,16 @@
|
|
|
2
2
|
// Copyright 2024 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
+
import { type RequestOptions } from '@dxos/codec-protobuf';
|
|
5
6
|
import { Stream } from '@dxos/codec-protobuf/stream';
|
|
7
|
+
import { Context } from '@dxos/context';
|
|
6
8
|
import { type EdgeConnection } from '@dxos/edge-client';
|
|
7
9
|
import { EdgeAgentStatus } from '@dxos/protocols';
|
|
8
10
|
import {
|
|
9
|
-
|
|
11
|
+
type EdgeAgentService,
|
|
10
12
|
EdgeStatus,
|
|
13
|
+
QueryAgentStatusResponse,
|
|
11
14
|
type QueryEdgeStatusResponse,
|
|
12
|
-
type EdgeAgentService,
|
|
13
15
|
} from '@dxos/protocols/proto/dxos/client/services';
|
|
14
16
|
|
|
15
17
|
import { type EdgeAgentManager } from './edge-agent-manager';
|
|
@@ -25,7 +27,17 @@ export class EdgeAgentServiceImpl implements EdgeAgentService {
|
|
|
25
27
|
queryEdgeStatus(): Stream<QueryEdgeStatusResponse> {
|
|
26
28
|
return new Stream(({ ctx, next }) => {
|
|
27
29
|
const update = () => {
|
|
28
|
-
next({
|
|
30
|
+
next({
|
|
31
|
+
status: this._edgeConnection?.status ?? {
|
|
32
|
+
state: EdgeStatus.ConnectionState.NOT_CONNECTED,
|
|
33
|
+
rtt: 0,
|
|
34
|
+
uptime: 0,
|
|
35
|
+
rateBytesUp: 0,
|
|
36
|
+
rateBytesDown: 0,
|
|
37
|
+
messagesSent: 0,
|
|
38
|
+
messagesReceived: 0,
|
|
39
|
+
},
|
|
40
|
+
});
|
|
29
41
|
};
|
|
30
42
|
|
|
31
43
|
this._edgeConnection?.statusChanged.on(ctx, update);
|
|
@@ -33,8 +45,8 @@ export class EdgeAgentServiceImpl implements EdgeAgentService {
|
|
|
33
45
|
});
|
|
34
46
|
}
|
|
35
47
|
|
|
36
|
-
async createAgent(): Promise<void> {
|
|
37
|
-
return (await this._agentManagerProvider()).createAgent();
|
|
48
|
+
async createAgent(_request: void, options?: RequestOptions): Promise<void> {
|
|
49
|
+
return (await this._agentManagerProvider()).createAgent(options?.ctx ?? Context.default());
|
|
38
50
|
}
|
|
39
51
|
|
|
40
52
|
queryAgentStatus(): Stream<QueryAgentStatusResponse> {
|
|
@@ -2,16 +2,16 @@
|
|
|
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';
|
|
14
|
+
import { DevicesServiceImpl } from './devices-service';
|
|
15
15
|
|
|
16
16
|
describe('DevicesService', () => {
|
|
17
17
|
let serviceContext: ServiceContext;
|
|
@@ -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,26 @@ 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';
|
|
44
45
|
import { subscribeToFeedBlocks, subscribeToFeeds } from './feeds';
|
|
45
46
|
import { subscribeToKeyringKeys } from './keys';
|
|
46
47
|
import { subscribeToMetadata } from './metadata';
|
|
47
48
|
import { subscribeToNetworkStatus, subscribeToSignal, subscribeToSwarmInfo } from './network';
|
|
48
49
|
import { subscribeToSpaces } from './spaces';
|
|
49
|
-
import { type ServiceContext } from '../services';
|
|
50
50
|
|
|
51
51
|
export class DevtoolsHostEvents {
|
|
52
52
|
readonly ready = new AsyncEvent();
|
|
53
53
|
}
|
|
54
54
|
|
|
55
|
-
export type
|
|
55
|
+
export type DevtoolsServiceProps = {
|
|
56
56
|
events: DevtoolsHostEvents;
|
|
57
57
|
config: Config;
|
|
58
58
|
context: ServiceContext;
|
|
@@ -62,9 +62,9 @@ export type DevtoolsServiceParams = {
|
|
|
62
62
|
* @deprecated
|
|
63
63
|
*/
|
|
64
64
|
export class DevtoolsServiceImpl implements DevtoolsHost {
|
|
65
|
-
constructor(private readonly params:
|
|
65
|
+
constructor(private readonly params: DevtoolsServiceProps) {}
|
|
66
66
|
|
|
67
|
-
events(
|
|
67
|
+
events(_request: void): Stream<Event> {
|
|
68
68
|
return new Stream<Event>(({ next }) => {
|
|
69
69
|
this.params.events.ready.on(() => {
|
|
70
70
|
next({ ready: {} });
|
|
@@ -72,7 +72,7 @@ export class DevtoolsServiceImpl implements DevtoolsHost {
|
|
|
72
72
|
});
|
|
73
73
|
}
|
|
74
74
|
|
|
75
|
-
async getConfig(
|
|
75
|
+
async getConfig(_request: void): Promise<GetConfigResponse> {
|
|
76
76
|
return { config: JSON.stringify(this.params.config.values) }; // 😨
|
|
77
77
|
}
|
|
78
78
|
|
|
@@ -101,65 +101,65 @@ export class DevtoolsServiceImpl implements DevtoolsHost {
|
|
|
101
101
|
};
|
|
102
102
|
}
|
|
103
103
|
|
|
104
|
-
resetStorage(
|
|
104
|
+
resetStorage(_request: ResetStorageRequest): Promise<void> {
|
|
105
105
|
throw new Error();
|
|
106
106
|
}
|
|
107
107
|
|
|
108
|
-
enableDebugLogging(
|
|
108
|
+
enableDebugLogging(_request: EnableDebugLoggingRequest): Promise<EnableDebugLoggingResponse> {
|
|
109
109
|
throw new Error();
|
|
110
110
|
}
|
|
111
111
|
|
|
112
|
-
disableDebugLogging(
|
|
112
|
+
disableDebugLogging(_request: EnableDebugLoggingRequest): Promise<EnableDebugLoggingResponse> {
|
|
113
113
|
throw new Error();
|
|
114
114
|
}
|
|
115
115
|
|
|
116
|
-
subscribeToKeyringKeys(
|
|
116
|
+
subscribeToKeyringKeys(_request: SubscribeToKeyringKeysRequest): Stream<SubscribeToKeyringKeysResponse> {
|
|
117
117
|
return subscribeToKeyringKeys({ keyring: this.params.context.keyring });
|
|
118
118
|
}
|
|
119
119
|
|
|
120
120
|
subscribeToCredentialMessages(
|
|
121
|
-
|
|
121
|
+
_request: SubscribeToCredentialMessagesRequest,
|
|
122
122
|
): Stream<SubscribeToCredentialMessagesResponse> {
|
|
123
123
|
throw new Error();
|
|
124
124
|
}
|
|
125
125
|
|
|
126
|
-
subscribeToSpaces(
|
|
127
|
-
return subscribeToSpaces(this.params.context,
|
|
126
|
+
subscribeToSpaces(_request: SubscribeToSpacesRequest): Stream<SubscribeToSpacesResponse> {
|
|
127
|
+
return subscribeToSpaces(this.params.context, _request);
|
|
128
128
|
}
|
|
129
129
|
|
|
130
|
-
subscribeToItems(
|
|
130
|
+
subscribeToItems(_request: SubscribeToItemsRequest): Stream<SubscribeToItemsResponse> {
|
|
131
131
|
throw new Error();
|
|
132
132
|
}
|
|
133
133
|
|
|
134
|
-
subscribeToFeeds(
|
|
135
|
-
return subscribeToFeeds(this.params.context,
|
|
134
|
+
subscribeToFeeds(_request: SubscribeToFeedsRequest): Stream<SubscribeToFeedsResponse> {
|
|
135
|
+
return subscribeToFeeds(this.params.context, _request);
|
|
136
136
|
}
|
|
137
137
|
|
|
138
|
-
subscribeToFeedBlocks(
|
|
139
|
-
return subscribeToFeedBlocks({ feedStore: this.params.context.feedStore },
|
|
138
|
+
subscribeToFeedBlocks(_request: SubscribeToFeedBlocksRequest): Stream<SubscribeToFeedBlocksResponse> {
|
|
139
|
+
return subscribeToFeedBlocks({ feedStore: this.params.context.feedStore }, _request);
|
|
140
140
|
}
|
|
141
141
|
|
|
142
|
-
getSpaceSnapshot(
|
|
142
|
+
getSpaceSnapshot(_request: GetSpaceSnapshotRequest): Promise<GetSpaceSnapshotResponse> {
|
|
143
143
|
throw new Error();
|
|
144
144
|
}
|
|
145
145
|
|
|
146
|
-
saveSpaceSnapshot(
|
|
146
|
+
saveSpaceSnapshot(_request: SaveSpaceSnapshotRequest): Promise<SaveSpaceSnapshotResponse> {
|
|
147
147
|
throw new Error();
|
|
148
148
|
}
|
|
149
149
|
|
|
150
|
-
clearSnapshots(
|
|
150
|
+
clearSnapshots(_request: ClearSnapshotsRequest): Promise<void> {
|
|
151
151
|
throw new Error();
|
|
152
152
|
}
|
|
153
153
|
|
|
154
|
-
getNetworkPeers(
|
|
154
|
+
getNetworkPeers(_request: GetNetworkPeersRequest): Promise<GetNetworkPeersResponse> {
|
|
155
155
|
throw new Error();
|
|
156
156
|
}
|
|
157
157
|
|
|
158
|
-
subscribeToNetworkTopics(
|
|
158
|
+
subscribeToNetworkTopics(_request: void): Stream<SubscribeToNetworkTopicsResponse> {
|
|
159
159
|
throw new Error();
|
|
160
160
|
}
|
|
161
161
|
|
|
162
|
-
subscribeToSignalStatus(
|
|
162
|
+
subscribeToSignalStatus(_request: void): Stream<SubscribeToSignalStatusResponse> {
|
|
163
163
|
return subscribeToNetworkStatus({ signalManager: this.params.context.signalManager });
|
|
164
164
|
}
|
|
165
165
|
|
|
@@ -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,19 +11,19 @@ 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';
|
|
24
24
|
import { type SwarmInfo } from '@dxos/protocols/proto/dxos/devtools/swarm';
|
|
25
25
|
import { type Epoch } from '@dxos/protocols/proto/dxos/halo/credentials';
|
|
26
|
-
import { type Resource
|
|
26
|
+
import { type Resource } from '@dxos/protocols/proto/dxos/tracing';
|
|
27
27
|
import { TRACE_PROCESSOR } from '@dxos/tracing';
|
|
28
28
|
|
|
29
29
|
import { DXOS_VERSION } from '../../version';
|
|
@@ -62,7 +62,6 @@ export type Diagnostics = {
|
|
|
62
62
|
|
|
63
63
|
export type TraceDiagnostic = {
|
|
64
64
|
resources: Record<string, Resource>;
|
|
65
|
-
spans: Span[];
|
|
66
65
|
logs: LogEntry[];
|
|
67
66
|
};
|
|
68
67
|
|
|
@@ -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,8 +10,8 @@ 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';
|
|
14
|
+
import { type IdentityManager } from './identity-manager';
|
|
15
15
|
|
|
16
16
|
export class ContactsServiceImpl implements ContactsService {
|
|
17
17
|
constructor(
|