@dxos/protocols 0.1.1 → 0.1.3
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/src/proto/gen/dxos/bot.d.ts +11 -11
- package/dist/src/proto/gen/dxos/bot.d.ts.map +1 -1
- package/dist/src/proto/gen/dxos/client/services.d.ts +247 -0
- package/dist/src/proto/gen/dxos/client/services.d.ts.map +1 -0
- package/dist/src/proto/gen/dxos/client/services.js +32 -0
- package/dist/src/proto/gen/dxos/client/services.js.map +1 -0
- package/dist/src/proto/gen/dxos/client.d.ts +49 -68
- package/dist/src/proto/gen/dxos/client.d.ts.map +1 -1
- package/dist/src/proto/gen/dxos/config.d.ts +0 -16
- package/dist/src/proto/gen/dxos/config.d.ts.map +1 -1
- package/dist/src/proto/gen/dxos/config.js +0 -12
- package/dist/src/proto/gen/dxos/config.js.map +1 -1
- package/dist/src/proto/gen/dxos/devtools/host.d.ts +52 -21
- package/dist/src/proto/gen/dxos/devtools/host.d.ts.map +1 -1
- package/dist/src/proto/gen/dxos/devtools/{swarmLog.d.ts → swarm.d.ts} +4 -4
- package/dist/src/proto/gen/dxos/devtools/swarm.d.ts.map +1 -0
- package/dist/src/proto/gen/dxos/devtools/{swarmLog.js → swarm.js} +1 -1
- package/dist/src/proto/gen/dxos/devtools/swarm.js.map +1 -0
- package/dist/src/proto/gen/dxos/echo/feed.d.ts.map +1 -1
- package/dist/src/proto/gen/dxos/echo/metadata.d.ts +5 -5
- package/dist/src/proto/gen/dxos/echo/metadata.d.ts.map +1 -1
- package/dist/src/proto/gen/dxos/echo/service.d.ts +3 -3
- package/dist/src/proto/gen/dxos/echo/service.d.ts.map +1 -1
- package/dist/src/proto/gen/dxos/echo/snapshot.d.ts +2 -2
- package/dist/src/proto/gen/dxos/halo/credentials/auth.d.ts +3 -3
- package/dist/src/proto/gen/dxos/halo/credentials/greet.d.ts +1 -1
- package/dist/src/proto/gen/dxos/halo/credentials.d.ts +25 -27
- package/dist/src/proto/gen/dxos/halo/credentials.d.ts.map +1 -1
- package/dist/src/proto/gen/dxos/halo/credentials.js +5 -5
- package/dist/src/proto/gen/dxos/halo/invitations.d.ts +10 -44
- package/dist/src/proto/gen/dxos/halo/invitations.d.ts.map +1 -1
- package/dist/src/proto/gen/dxos/halo/invitations.js +0 -13
- package/dist/src/proto/gen/dxos/halo/invitations.js.map +1 -1
- package/dist/src/proto/gen/dxos/halo/keys.d.ts +2 -2
- package/dist/src/proto/gen/dxos/halo/keys.js +1 -1
- package/dist/src/proto/gen/dxos/halo/signed.d.ts +1 -1
- package/dist/src/proto/gen/dxos/service/publisher.d.ts +1 -0
- package/dist/src/proto/gen/dxos/service/publisher.d.ts.map +1 -1
- package/dist/src/proto/gen/dxos/service/scheduler.d.ts +1 -1
- package/dist/src/proto/gen/dxos/service/scheduler.d.ts.map +1 -1
- package/dist/src/proto/gen/index.d.ts +56 -41
- package/dist/src/proto/gen/index.d.ts.map +1 -1
- package/dist/src/proto/gen/index.js +1 -1
- package/dist/src/proto/gen/index.js.map +1 -1
- package/package.json +5 -5
- package/proto/dxos/client/services.d.ts +2 -0
- package/proto/dxos/{devtools/swarmLog.d.ts.map → client/services.d.ts.map} +2 -2
- package/proto/dxos/client/services.js +2 -0
- package/proto/dxos/devtools/diagnostics.d.ts +2 -0
- package/proto/dxos/devtools/diagnostics.d.ts.map +10 -0
- package/proto/dxos/devtools/diagnostics.js +2 -0
- package/proto/dxos/devtools/swarm.d.ts +2 -0
- package/proto/dxos/{halo/credentials/party.d.ts.map → devtools/swarm.d.ts.map} +2 -2
- package/proto/dxos/devtools/{swarmLog.js → swarm.js} +1 -1
- package/src/proto/dxos/bot.proto +11 -11
- package/src/proto/dxos/client/services.proto +197 -0
- package/src/proto/dxos/client.proto +49 -55
- package/src/proto/dxos/config.proto +2 -15
- package/src/proto/dxos/devtools/diagnostics.proto +28 -0
- package/src/proto/dxos/devtools/host.proto +21 -23
- package/src/proto/dxos/devtools/{swarmLog.proto → swarm.proto} +1 -1
- package/src/proto/dxos/echo/metadata.proto +6 -6
- package/src/proto/dxos/echo/service.proto +3 -3
- package/src/proto/dxos/echo/snapshot.proto +5 -5
- package/src/proto/dxos/echo/timeframe.proto +1 -1
- package/src/proto/dxos/halo/credentials/auth.proto +3 -3
- package/src/proto/dxos/halo/credentials/greet.proto +19 -19
- package/src/proto/dxos/halo/credentials.proto +21 -20
- package/src/proto/dxos/halo/invitations.proto +9 -27
- package/src/proto/dxos/halo/keys.proto +2 -2
- package/src/proto/dxos/halo/signed.proto +1 -1
- package/src/proto/dxos/service/publisher.proto +1 -0
- package/src/proto/dxos/service/scheduler.proto +1 -1
- package/src/proto/gen/dxos/bot.ts +12 -12
- package/src/proto/gen/dxos/client/services.ts +283 -0
- package/src/proto/gen/dxos/client.ts +50 -69
- package/src/proto/gen/dxos/config.ts +2 -18
- package/src/proto/gen/dxos/devtools/host.ts +53 -22
- package/src/proto/gen/dxos/devtools/{swarmLog.ts → swarm.ts} +4 -4
- package/src/proto/gen/dxos/echo/feed.ts +2 -2
- package/src/proto/gen/dxos/echo/metadata.ts +7 -7
- package/src/proto/gen/dxos/echo/model/messenger.ts +2 -2
- package/src/proto/gen/dxos/echo/model/object.ts +2 -2
- package/src/proto/gen/dxos/echo/model/text.ts +2 -2
- package/src/proto/gen/dxos/echo/service.ts +5 -5
- package/src/proto/gen/dxos/echo/snapshot.ts +4 -4
- package/src/proto/gen/dxos/echo/timeframe.ts +2 -2
- package/src/proto/gen/dxos/halo/credentials/auth.ts +5 -5
- package/src/proto/gen/dxos/halo/credentials/greet.ts +3 -3
- package/src/proto/gen/dxos/halo/credentials/identity.ts +2 -2
- package/src/proto/gen/dxos/halo/credentials.ts +27 -29
- package/src/proto/gen/dxos/halo/invitations.ts +12 -46
- package/src/proto/gen/dxos/halo/keyring.ts +2 -2
- package/src/proto/gen/dxos/halo/keys.ts +4 -4
- package/src/proto/gen/dxos/halo/signed.ts +3 -3
- package/src/proto/gen/dxos/iframe.ts +2 -2
- package/src/proto/gen/dxos/keys.ts +2 -2
- package/src/proto/gen/dxos/mesh/bridge.ts +2 -2
- package/src/proto/gen/dxos/mesh/broadcast.ts +2 -2
- package/src/proto/gen/dxos/mesh/messaging.ts +2 -2
- package/src/proto/gen/dxos/mesh/presence.ts +2 -2
- package/src/proto/gen/dxos/mesh/protocol.ts +2 -2
- package/src/proto/gen/dxos/mesh/replicator.ts +2 -2
- package/src/proto/gen/dxos/mesh/signal.ts +2 -2
- package/src/proto/gen/dxos/mesh/swarm.ts +2 -2
- package/src/proto/gen/dxos/registry.ts +2 -2
- package/src/proto/gen/dxos/rpc.ts +2 -2
- package/src/proto/gen/dxos/service/publisher.ts +3 -2
- package/src/proto/gen/dxos/service/scheduler.ts +3 -3
- package/src/proto/gen/dxos/type.ts +2 -2
- package/src/proto/gen/example/testing/data.ts +2 -2
- package/src/proto/gen/example/testing/rpc.ts +2 -2
- package/src/proto/gen/google/protobuf.ts +2 -2
- package/src/proto/gen/index.ts +57 -42
- package/dist/src/proto/gen/dxos/devtools/swarmLog.d.ts.map +0 -1
- package/dist/src/proto/gen/dxos/devtools/swarmLog.js.map +0 -1
- package/dist/src/proto/gen/dxos/halo/credentials/party.d.ts +0 -82
- package/dist/src/proto/gen/dxos/halo/credentials/party.d.ts.map +0 -1
- package/dist/src/proto/gen/dxos/halo/credentials/party.js +0 -19
- package/dist/src/proto/gen/dxos/halo/credentials/party.js.map +0 -1
- package/proto/dxos/devtools/swarmLog.d.ts +0 -2
- package/proto/dxos/halo/credentials/party.d.ts +0 -2
- package/proto/dxos/halo/credentials/party.js +0 -2
- package/src/proto/dxos/halo/credentials/party.proto +0 -127
- package/src/proto/gen/dxos/halo/credentials/party.ts +0 -119
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/proto/gen/index.ts"],"names":[],"mappings":";;;;;;AAAA,yDAA8C;AAyC9C,qEAA6C;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/proto/gen/index.ts"],"names":[],"mappings":";;;;;;AAAA,yDAA8C;AAyC9C,qEAA6C;AAqWhC,QAAA,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,gjhHAAgjhH,CAAC,CAAC;AAC1khH,QAAA,MAAM,GAAG,uBAAM,CAAC,QAAQ,CAAkB,kBAAU,EAAE,uBAAa,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/protocols",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"description": "Protobuf definitions for DXOS protocols.",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
@@ -18,10 +18,10 @@
|
|
|
18
18
|
"src"
|
|
19
19
|
],
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@dxos/codec-protobuf": "0.1.
|
|
22
|
-
"@dxos/hypercore": "0.1.
|
|
23
|
-
"@dxos/keys": "0.1.
|
|
24
|
-
"@dxos/timeframe": "0.1.
|
|
21
|
+
"@dxos/codec-protobuf": "0.1.3",
|
|
22
|
+
"@dxos/hypercore": "0.1.3",
|
|
23
|
+
"@dxos/keys": "0.1.3",
|
|
24
|
+
"@dxos/timeframe": "0.1.3",
|
|
25
25
|
"assert": "^2.0.0",
|
|
26
26
|
"util": "^0.12.4"
|
|
27
27
|
},
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"file": "
|
|
3
|
+
"file": "services.d.ts",
|
|
4
4
|
"sourceRoot": "",
|
|
5
5
|
"sources": [
|
|
6
|
-
"../../../src/proto/dxos/
|
|
6
|
+
"../../../src/proto/dxos/client/services.proto"
|
|
7
7
|
],
|
|
8
8
|
"names": [],
|
|
9
9
|
"mappings": "AAIA,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC"
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"file": "
|
|
3
|
+
"file": "swarm.d.ts",
|
|
4
4
|
"sourceRoot": "",
|
|
5
5
|
"sources": [
|
|
6
|
-
"
|
|
6
|
+
"../../../src/proto/dxos/devtools/swarm.proto"
|
|
7
7
|
],
|
|
8
8
|
"names": [],
|
|
9
9
|
"mappings": "AAIA,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC"
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// Generated file: do not edit.
|
|
2
|
-
module.exports = require('../../../dist/src/proto/gen/dxos/devtools/
|
|
2
|
+
module.exports = require('../../../dist/src/proto/gen/dxos/devtools/swarm');
|
package/src/proto/dxos/bot.proto
CHANGED
|
@@ -8,8 +8,8 @@ import "google/protobuf/empty.proto";
|
|
|
8
8
|
import "google/protobuf/timestamp.proto";
|
|
9
9
|
|
|
10
10
|
import "dxos/client.proto";
|
|
11
|
+
import "dxos/client/services.proto";
|
|
11
12
|
import "dxos/config.proto";
|
|
12
|
-
import "dxos/halo/invitations.proto";
|
|
13
13
|
import "dxos/keys.proto";
|
|
14
14
|
|
|
15
15
|
package dxos.bot;
|
|
@@ -47,7 +47,7 @@ message Bot {
|
|
|
47
47
|
|
|
48
48
|
optional BotPackageSpecifier package_specifier = 3;
|
|
49
49
|
optional google.protobuf.Timestamp last_start = 4;
|
|
50
|
-
optional dxos.keys.PublicKey
|
|
50
|
+
optional dxos.keys.PublicKey space_key = 5;
|
|
51
51
|
|
|
52
52
|
message Runtime {
|
|
53
53
|
optional int32 exit_code = 1;
|
|
@@ -66,11 +66,11 @@ message GetBotsResponse {
|
|
|
66
66
|
message SpawnBotRequest {
|
|
67
67
|
optional BotPackageSpecifier package = 1;
|
|
68
68
|
|
|
69
|
-
/// Invitation for the bot to join the target
|
|
70
|
-
optional dxos.
|
|
69
|
+
/// Invitation for the bot to join the target space.
|
|
70
|
+
optional dxos.client.services.Invitation invitation = 2;
|
|
71
71
|
|
|
72
|
-
/// Key of the
|
|
73
|
-
optional dxos.keys.PublicKey
|
|
72
|
+
/// Key of the space bot is invited to.
|
|
73
|
+
optional dxos.keys.PublicKey space_key = 3;
|
|
74
74
|
}
|
|
75
75
|
|
|
76
76
|
message SendCommandRequest {
|
|
@@ -92,8 +92,8 @@ message GetLogsRequest {
|
|
|
92
92
|
}
|
|
93
93
|
|
|
94
94
|
message BotReport {
|
|
95
|
-
/// Details of the
|
|
96
|
-
optional dxos.client.
|
|
95
|
+
/// Details of the space the bot was spawned for.
|
|
96
|
+
optional dxos.client.SpaceDetails space_details = 1;
|
|
97
97
|
}
|
|
98
98
|
|
|
99
99
|
/// Service that is used by clients to communicate with bot factory.
|
|
@@ -120,8 +120,8 @@ message InitializeRequest {
|
|
|
120
120
|
/// Bot runtime configuration.
|
|
121
121
|
optional dxos.config.Config config = 1;
|
|
122
122
|
|
|
123
|
-
/// Invitation for the bot to join the target
|
|
124
|
-
optional dxos.
|
|
123
|
+
/// Invitation for the bot to join the target space.
|
|
124
|
+
optional dxos.client.services.Invitation invitation = 2;
|
|
125
125
|
|
|
126
126
|
/// ID of the bot.
|
|
127
127
|
optional string id = 3;
|
|
@@ -134,7 +134,7 @@ message StartRequest {
|
|
|
134
134
|
|
|
135
135
|
/// Service that is used by bots communicating with bot factory.
|
|
136
136
|
service BotService {
|
|
137
|
-
/// Initialize Client, create profile, and join a
|
|
137
|
+
/// Initialize Client, create profile, and join a space.
|
|
138
138
|
rpc Initialize(InitializeRequest) returns (google.protobuf.Empty);
|
|
139
139
|
|
|
140
140
|
/// Start an initialized bot.
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2021 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
syntax = "proto3";
|
|
6
|
+
|
|
7
|
+
import "google/protobuf/empty.proto";
|
|
8
|
+
|
|
9
|
+
import "dxos/config.proto";
|
|
10
|
+
import "dxos/halo/credentials.proto";
|
|
11
|
+
import "dxos/keys.proto";
|
|
12
|
+
|
|
13
|
+
// TODO(burdon): Restructure all services.
|
|
14
|
+
// TODO(burdon): Reorganize packages (e.g., client.services, echo.database).
|
|
15
|
+
|
|
16
|
+
package dxos.client.services;
|
|
17
|
+
|
|
18
|
+
//
|
|
19
|
+
// Design notes:
|
|
20
|
+
// - Basic CRUD methods for records (streaming queries).
|
|
21
|
+
// - Custom Request/Response objects for complex operations; otherwise generic structs for simplicity.
|
|
22
|
+
// - Normalize records for performance (e.g., Space members separate from Space metadata).
|
|
23
|
+
//
|
|
24
|
+
|
|
25
|
+
//
|
|
26
|
+
// System
|
|
27
|
+
//
|
|
28
|
+
|
|
29
|
+
service SystemService {
|
|
30
|
+
rpc GetConfig(google.protobuf.Empty) returns (dxos.config.Config); // TODO(burdon): Stream?
|
|
31
|
+
rpc Reset(google.protobuf.Empty) returns (google.protobuf.Empty);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
//
|
|
35
|
+
// Signing
|
|
36
|
+
// TODO(burdon): Rename Crypto/KeystoreService?
|
|
37
|
+
//
|
|
38
|
+
|
|
39
|
+
// TODO(burdon): Metadata (e.g., added, expired).
|
|
40
|
+
message KeyRecord {
|
|
41
|
+
dxos.keys.PublicKey public_key = 1;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
message SignRequest {
|
|
45
|
+
dxos.keys.PublicKey public_key = 1;
|
|
46
|
+
bytes payload = 2;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
message SignResponse {
|
|
50
|
+
bytes signed = 2;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
service SigningService {
|
|
54
|
+
rpc UpdateKeyRecord(KeyRecord) returns (KeyRecord);
|
|
55
|
+
rpc Sign(SignRequest) returns (SignResponse);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
//
|
|
59
|
+
// Halo
|
|
60
|
+
//
|
|
61
|
+
|
|
62
|
+
message Identity {
|
|
63
|
+
dxos.keys.PublicKey identity_key = 1;
|
|
64
|
+
halo.credentials.ProfileDocument profile = 2;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
message RecoverProfileRequest {
|
|
68
|
+
bytes recovery_key = 1;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
service HaloService {
|
|
72
|
+
rpc RecoverProfile(RecoverProfileRequest) returns (Identity);
|
|
73
|
+
rpc UpdateProfile(Identity) returns (google.protobuf.Empty);
|
|
74
|
+
rpc QueryProfile(google.protobuf.Empty) returns (stream Identity);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
//
|
|
78
|
+
// Devices
|
|
79
|
+
//
|
|
80
|
+
|
|
81
|
+
// TODO(burdon): Preferences (in database).
|
|
82
|
+
message Device {
|
|
83
|
+
dxos.keys.PublicKey device_key = 1;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
message QueryDevicesResponse {
|
|
87
|
+
repeated Device devices = 1;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
service DevicesService {
|
|
91
|
+
rpc UpdateDevice(google.protobuf.Empty) returns (Device);
|
|
92
|
+
rpc QueryDevices(google.protobuf.Empty) returns (stream QueryDevicesResponse);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
//
|
|
96
|
+
// Contacts
|
|
97
|
+
//
|
|
98
|
+
|
|
99
|
+
message Contact {
|
|
100
|
+
halo.credentials.ProfileDocument profile = 1;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
service ContactsService {
|
|
104
|
+
rpc UpdateContact(google.protobuf.Empty) returns (Contact);
|
|
105
|
+
rpc QueryContacts(google.protobuf.Empty) returns (stream Contact);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
//
|
|
109
|
+
// Data Spaces
|
|
110
|
+
// TODO(burdon): Move to dxos.echo? Or rename dxos.echo => dxos.database?
|
|
111
|
+
//
|
|
112
|
+
|
|
113
|
+
// TODO(burdon): Preferences (in database).
|
|
114
|
+
message Space {
|
|
115
|
+
dxos.keys.PublicKey space_key = 1;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
message QueryMembersRequest {}
|
|
119
|
+
message QueryMembersResponse {
|
|
120
|
+
dxos.halo.credentials.IdentityProfile members = 1;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
service SpacesService {
|
|
124
|
+
rpc CreateSpace(google.protobuf.Empty) returns (Space);
|
|
125
|
+
rpc QuerySpaces(google.protobuf.Empty) returns (stream Space);
|
|
126
|
+
rpc QueryMembers(QueryMembersRequest) returns (stream QueryMembersResponse);
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
//
|
|
130
|
+
// Invitations (Halo and Data Spaces).
|
|
131
|
+
//
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* Represents the invitation state passed between client and service.
|
|
135
|
+
*/
|
|
136
|
+
message Invitation {
|
|
137
|
+
enum Type {
|
|
138
|
+
/// Requires both to be online with OTP to complete key exchange.
|
|
139
|
+
INTERACTIVE = 0;
|
|
140
|
+
/// Interactive without OTP.
|
|
141
|
+
INTERACTIVE_TESTING = 1;
|
|
142
|
+
/// Guest's identity key is known; invitation can be accepted by any valid peer.
|
|
143
|
+
OFFLINE = 2;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
enum State {
|
|
147
|
+
INIT = 0;
|
|
148
|
+
CONNECTING = 1;
|
|
149
|
+
CONNECTED = 2;
|
|
150
|
+
AUTHENTICATING = 3;
|
|
151
|
+
SUCCESS = 4;
|
|
152
|
+
CANCELLED = 5;
|
|
153
|
+
TIMEOUT = 6;
|
|
154
|
+
ERROR = 7;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
/// Local identifier.
|
|
158
|
+
optional string invitation_id = 1;
|
|
159
|
+
|
|
160
|
+
/// Determined when created.
|
|
161
|
+
optional Type type = 2;
|
|
162
|
+
|
|
163
|
+
/// Local state.
|
|
164
|
+
optional State state = 3;
|
|
165
|
+
|
|
166
|
+
/// Local error code.
|
|
167
|
+
optional int32 error_code = 4;
|
|
168
|
+
|
|
169
|
+
/// Swarm rendezvous (random).
|
|
170
|
+
optional dxos.keys.PublicKey swarm_key = 5;
|
|
171
|
+
|
|
172
|
+
/// Guest's identity (only present if OFFLINE).
|
|
173
|
+
optional dxos.keys.PublicKey identity_key = 6;
|
|
174
|
+
|
|
175
|
+
/// Authentication code created by host.
|
|
176
|
+
optional string authentication_code = 7;
|
|
177
|
+
|
|
178
|
+
/// Space key (if data invitation).
|
|
179
|
+
optional dxos.keys.PublicKey space_key = 8;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
message AuthenticationRequest {
|
|
183
|
+
string invitation_id = 1;
|
|
184
|
+
string authentication_code = 2;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
message CancelInvitationRequest {
|
|
188
|
+
string invitation_id = 1;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
// TODO(burdon): Separate implementations for HALO/Data Spaces.
|
|
192
|
+
service InvitationsService {
|
|
193
|
+
rpc CreateInvitation(Invitation) returns (stream Invitation);
|
|
194
|
+
rpc Authenticate(AuthenticationRequest) returns (google.protobuf.Empty);
|
|
195
|
+
rpc AcceptInvitation(Invitation) returns (stream Invitation);
|
|
196
|
+
rpc CancelInvitation(CancelInvitationRequest) returns (google.protobuf.Empty);
|
|
197
|
+
}
|
|
@@ -6,10 +6,10 @@ syntax = "proto3";
|
|
|
6
6
|
|
|
7
7
|
import "google/protobuf/empty.proto";
|
|
8
8
|
|
|
9
|
+
import "dxos/client/services.proto";
|
|
9
10
|
import "dxos/config.proto";
|
|
10
11
|
import "dxos/echo/snapshot.proto";
|
|
11
12
|
import "dxos/echo/timeframe.proto";
|
|
12
|
-
import "dxos/halo/invitations.proto";
|
|
13
13
|
import "dxos/halo/keys.proto";
|
|
14
14
|
import "dxos/keys.proto";
|
|
15
15
|
|
|
@@ -26,7 +26,6 @@ service SystemService {
|
|
|
26
26
|
|
|
27
27
|
//
|
|
28
28
|
// Invitations shared across HALO and ECHO.
|
|
29
|
-
// TODO(burdon): Consolidate with invitation protobufs.
|
|
30
29
|
//
|
|
31
30
|
|
|
32
31
|
enum InvitationState {
|
|
@@ -38,7 +37,7 @@ enum InvitationState {
|
|
|
38
37
|
|
|
39
38
|
/// Invitation process created by sender.
|
|
40
39
|
message InvitationRequest {
|
|
41
|
-
optional dxos.
|
|
40
|
+
optional dxos.client.services.Invitation descriptor = 1;
|
|
42
41
|
|
|
43
42
|
InvitationState state = 2;
|
|
44
43
|
|
|
@@ -55,8 +54,8 @@ message RedeemedInvitation {
|
|
|
55
54
|
/// Only if state == ERROR.
|
|
56
55
|
optional string error = 3;
|
|
57
56
|
|
|
58
|
-
/// Only on
|
|
59
|
-
optional dxos.keys.PublicKey
|
|
57
|
+
/// Only on space invitations that are finished.
|
|
58
|
+
optional dxos.keys.PublicKey space_key = 4;
|
|
60
59
|
}
|
|
61
60
|
|
|
62
61
|
message AuthenticateInvitationRequest {
|
|
@@ -70,8 +69,9 @@ message AuthenticateInvitationRequest {
|
|
|
70
69
|
//
|
|
71
70
|
|
|
72
71
|
message Profile {
|
|
73
|
-
|
|
74
|
-
|
|
72
|
+
// TODO(burdon): Remove identity from Profile (space of identity).
|
|
73
|
+
dxos.keys.PublicKey identity_key = 1;
|
|
74
|
+
optional string displayName = 2;
|
|
75
75
|
}
|
|
76
76
|
|
|
77
77
|
message SubscribeProfileResponse {
|
|
@@ -79,14 +79,16 @@ message SubscribeProfileResponse {
|
|
|
79
79
|
}
|
|
80
80
|
|
|
81
81
|
message CreateProfileRequest {
|
|
82
|
-
optional
|
|
83
|
-
optional bytes
|
|
84
|
-
|
|
82
|
+
optional bytes public_key = 1;
|
|
83
|
+
optional bytes secret_key = 2;
|
|
84
|
+
// TODO(burdon): Profile.
|
|
85
|
+
optional string displayName = 3;
|
|
85
86
|
}
|
|
86
87
|
|
|
87
88
|
message RecoverProfileRequest {
|
|
88
89
|
string seed_phrase = 1;
|
|
89
90
|
}
|
|
91
|
+
|
|
90
92
|
message Contact {
|
|
91
93
|
dxos.keys.PublicKey public_key = 1;
|
|
92
94
|
optional string display_name = 2;
|
|
@@ -102,7 +104,7 @@ service ProfileService {
|
|
|
102
104
|
rpc SubscribeProfile (google.protobuf.Empty) returns (stream SubscribeProfileResponse);
|
|
103
105
|
|
|
104
106
|
rpc CreateInvitation(google.protobuf.Empty) returns (stream InvitationRequest);
|
|
105
|
-
rpc AcceptInvitation(dxos.
|
|
107
|
+
rpc AcceptInvitation(dxos.client.services.Invitation) returns (stream RedeemedInvitation);
|
|
106
108
|
rpc AuthenticateInvitation(AuthenticateInvitationRequest) returns (google.protobuf.Empty);
|
|
107
109
|
}
|
|
108
110
|
|
|
@@ -154,54 +156,56 @@ service HaloService {
|
|
|
154
156
|
//
|
|
155
157
|
|
|
156
158
|
// TODO(burdon): Rename Space.
|
|
157
|
-
message
|
|
158
|
-
message Member {
|
|
159
|
-
dxos.keys.PublicKey public_key = 1;
|
|
160
|
-
optional string display_name = 2;
|
|
161
|
-
}
|
|
162
|
-
|
|
159
|
+
message Space {
|
|
163
160
|
dxos.keys.PublicKey public_key = 1;
|
|
164
161
|
bool is_open = 2;
|
|
165
162
|
bool is_active = 3;
|
|
166
163
|
|
|
167
|
-
repeated
|
|
164
|
+
repeated SpaceMember members = 4;
|
|
168
165
|
}
|
|
169
166
|
|
|
170
|
-
message
|
|
171
|
-
dxos.keys.PublicKey
|
|
167
|
+
message SubscribeSpaceRequest {
|
|
168
|
+
dxos.keys.PublicKey space_key = 1;
|
|
172
169
|
}
|
|
173
170
|
|
|
174
|
-
message
|
|
175
|
-
dxos.keys.PublicKey
|
|
171
|
+
message GetSpaceDetailsRequest {
|
|
172
|
+
dxos.keys.PublicKey space_key = 1;
|
|
176
173
|
}
|
|
177
174
|
|
|
178
|
-
message
|
|
175
|
+
message SpaceDetails {
|
|
179
176
|
/// The timeframe of mutations processed by the client.
|
|
180
177
|
dxos.echo.timeframe.TimeframeVector processed_timeframe = 1;
|
|
181
178
|
}
|
|
182
179
|
|
|
183
|
-
|
|
184
|
-
|
|
180
|
+
// TODO(burdon): Reconcile with dxos.halo.credentials.SpaceMember.
|
|
181
|
+
// TODO(burdon): Reconcile with Profile.
|
|
182
|
+
message SpaceMember {
|
|
183
|
+
dxos.keys.PublicKey identity_key = 1;
|
|
184
|
+
optional Profile profile = 2;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
message SubscribeSpaceResponse {
|
|
188
|
+
optional Space space = 1;
|
|
185
189
|
}
|
|
186
190
|
|
|
187
|
-
message
|
|
188
|
-
repeated
|
|
191
|
+
message SubscribeSpacesResponse {
|
|
192
|
+
repeated Space spaces = 1;
|
|
189
193
|
}
|
|
190
194
|
|
|
191
195
|
message CreateInvitationRequest {
|
|
192
|
-
dxos.keys.PublicKey
|
|
196
|
+
dxos.keys.PublicKey space_key = 1;
|
|
193
197
|
|
|
194
198
|
/// When specified the invitation will be of OFFLINE type, not requiring secret exchange.
|
|
195
199
|
optional dxos.keys.PublicKey invitee_key = 2;
|
|
196
200
|
}
|
|
197
201
|
|
|
198
|
-
message
|
|
202
|
+
message SpaceActivationOptions {
|
|
199
203
|
bool global = 1;
|
|
200
204
|
bool device = 2;
|
|
201
205
|
}
|
|
202
206
|
|
|
203
|
-
message
|
|
204
|
-
dxos.keys.PublicKey
|
|
207
|
+
message SetSpaceStateRequest {
|
|
208
|
+
dxos.keys.PublicKey space_key = 1;
|
|
205
209
|
|
|
206
210
|
optional bool open = 2;
|
|
207
211
|
optional bool active_global = 3;
|
|
@@ -209,46 +213,36 @@ message SetPartyStateRequest {
|
|
|
209
213
|
}
|
|
210
214
|
|
|
211
215
|
message SubscribeMembersRequest {
|
|
212
|
-
dxos.keys.PublicKey
|
|
216
|
+
dxos.keys.PublicKey space_key = 1;
|
|
213
217
|
}
|
|
214
218
|
|
|
215
219
|
message SubscribeMembersResponse {
|
|
216
|
-
|
|
217
|
-
dxos.keys.PublicKey public_key = 1; // TODO(burdon): Rename xxx_key.
|
|
218
|
-
optional string display_name = 2;
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
repeated PartyMember members = 1;
|
|
220
|
+
repeated SpaceMember members = 1;
|
|
222
221
|
}
|
|
223
222
|
|
|
224
223
|
message CreateSnapshotRequest {
|
|
225
|
-
dxos.keys.PublicKey
|
|
224
|
+
dxos.keys.PublicKey space_key = 1;
|
|
226
225
|
}
|
|
227
226
|
|
|
228
227
|
//
|
|
229
228
|
// Service definition
|
|
230
229
|
//
|
|
231
230
|
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
rpc
|
|
235
|
-
rpc SubscribeParties (google.protobuf.Empty) returns (stream SubscribePartiesResponse);
|
|
231
|
+
service SpaceService {
|
|
232
|
+
rpc SubscribeToSpace (SubscribeSpaceRequest) returns (stream SubscribeSpaceResponse);
|
|
233
|
+
rpc SubscribeSpaces (google.protobuf.Empty) returns (stream SubscribeSpacesResponse);
|
|
236
234
|
|
|
237
|
-
rpc
|
|
235
|
+
rpc GetSpaceDetails(GetSpaceDetailsRequest) returns (SpaceDetails);
|
|
238
236
|
|
|
239
|
-
rpc
|
|
240
|
-
rpc
|
|
237
|
+
rpc CreateSpace(google.protobuf.Empty) returns (Space);
|
|
238
|
+
rpc CloneSpace(dxos.echo.snapshot.SpaceSnapshot) returns (Space);
|
|
241
239
|
|
|
242
|
-
/// Open and close or activate and deactivate a
|
|
243
|
-
rpc
|
|
244
|
-
|
|
245
|
-
// TODO(burdon): Rename.
|
|
246
|
-
rpc CreateInvitation(CreateInvitationRequest) returns (stream InvitationRequest);
|
|
247
|
-
rpc AcceptInvitation(dxos.halo.invitations.InvitationDescriptor) returns (stream RedeemedInvitation);
|
|
248
|
-
rpc AuthenticateInvitation(AuthenticateInvitationRequest) returns (google.protobuf.Empty);
|
|
240
|
+
/// Open and close or activate and deactivate a space.
|
|
241
|
+
rpc SetSpaceState(SetSpaceStateRequest) returns (Space);
|
|
249
242
|
|
|
250
|
-
// TODO(rzadp): Remove and join with Subscribing to
|
|
243
|
+
// TODO(rzadp): Remove and join with Subscribing to Space.
|
|
244
|
+
// Deprecated.
|
|
251
245
|
rpc SubscribeMembers (SubscribeMembersRequest) returns (stream SubscribeMembersResponse);
|
|
252
246
|
|
|
253
|
-
rpc CreateSnapshot(CreateSnapshotRequest) returns (echo.snapshot.
|
|
247
|
+
rpc CreateSnapshot(CreateSnapshotRequest) returns (echo.snapshot.SpaceSnapshot);
|
|
254
248
|
}
|
|
@@ -62,18 +62,6 @@ message Module {
|
|
|
62
62
|
|
|
63
63
|
message Runtime {
|
|
64
64
|
message Client {
|
|
65
|
-
/// Whether the client services are local with ClientServiceHost or remote and need to be accessed via ClientServiceProxy. Defaults to AUTOMATIC.
|
|
66
|
-
enum Mode {
|
|
67
|
-
/// Connects to the browser wallet if avialable, otherwise runs services in the local mode.
|
|
68
|
-
AUTOMATIC = 0;
|
|
69
|
-
|
|
70
|
-
/// Run services in the local mode.
|
|
71
|
-
LOCAL = 1;
|
|
72
|
-
|
|
73
|
-
/// Connect to the browser wallet or to the remote services through the RPC port.
|
|
74
|
-
REMOTE = 2;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
65
|
message Storage {
|
|
78
66
|
enum StorageDriver {
|
|
79
67
|
RAM = 0;
|
|
@@ -104,9 +92,8 @@ message Runtime {
|
|
|
104
92
|
/// Milliseconds
|
|
105
93
|
optional int32 invitation_expiration = 5;
|
|
106
94
|
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
optional string remote_source = 7;
|
|
95
|
+
// TODO(burdon): Remove?
|
|
96
|
+
optional string remote_source = 6;
|
|
110
97
|
}
|
|
111
98
|
|
|
112
99
|
message App {
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2021 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
syntax = "proto3";
|
|
6
|
+
|
|
7
|
+
import "dxos/keys.proto";
|
|
8
|
+
|
|
9
|
+
package dxos.devtools.host;
|
|
10
|
+
|
|
11
|
+
message Services {
|
|
12
|
+
repeated SpaceStats spaces = 1;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
message SpaceStats {
|
|
16
|
+
dxos.keys.PublicKey key = 1;
|
|
17
|
+
repeated PeerStats peers = 2;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
message PeerStats {
|
|
21
|
+
FeedStats control_feed = 1;
|
|
22
|
+
FeedStats data_feed = 2;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
message FeedStats {
|
|
26
|
+
dxos.keys.PublicKey key = 1;
|
|
27
|
+
int32 length = 2;
|
|
28
|
+
}
|