@dxos/protocols 2.28.0
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/index.d.ts +1 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/index.js +5 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/proto/gen/dxos/bot.d.ts +109 -0
- package/dist/src/proto/gen/dxos/bot.d.ts.map +1 -0
- package/dist/src/proto/gen/dxos/bot.js +14 -0
- package/dist/src/proto/gen/dxos/bot.js.map +1 -0
- package/dist/src/proto/gen/dxos/client.d.ts +179 -0
- package/dist/src/proto/gen/dxos/client.d.ts.map +1 -0
- package/dist/src/proto/gen/dxos/client.js +11 -0
- package/dist/src/proto/gen/dxos/client.js.map +1 -0
- package/dist/src/proto/gen/dxos/config.d.ts +210 -0
- package/dist/src/proto/gen/dxos/config.d.ts.map +1 -0
- package/dist/src/proto/gen/dxos/config.js +29 -0
- package/dist/src/proto/gen/dxos/config.js.map +1 -0
- package/dist/src/proto/gen/dxos/credentials/auth.d.ts +11 -0
- package/dist/src/proto/gen/dxos/credentials/auth.d.ts.map +1 -0
- package/dist/src/proto/gen/dxos/credentials/auth.js +3 -0
- package/dist/src/proto/gen/dxos/credentials/auth.js.map +1 -0
- package/dist/src/proto/gen/dxos/credentials/greet.d.ts +39 -0
- package/dist/src/proto/gen/dxos/credentials/greet.d.ts.map +1 -0
- package/dist/src/proto/gen/dxos/credentials/greet.js +15 -0
- package/dist/src/proto/gen/dxos/credentials/greet.js.map +1 -0
- package/dist/src/proto/gen/dxos/credentials/identity.d.ts +10 -0
- package/dist/src/proto/gen/dxos/credentials/identity.d.ts.map +1 -0
- package/dist/src/proto/gen/dxos/credentials/identity.js +3 -0
- package/dist/src/proto/gen/dxos/credentials/identity.js.map +1 -0
- package/dist/src/proto/gen/dxos/credentials/party.d.ts +49 -0
- package/dist/src/proto/gen/dxos/credentials/party.d.ts.map +1 -0
- package/dist/src/proto/gen/dxos/credentials/party.js +15 -0
- package/dist/src/proto/gen/dxos/credentials/party.js.map +1 -0
- package/dist/src/proto/gen/dxos/credentials.d.ts +25 -0
- package/dist/src/proto/gen/dxos/credentials.d.ts.map +1 -0
- package/dist/src/proto/gen/dxos/credentials.js +3 -0
- package/dist/src/proto/gen/dxos/credentials.js.map +1 -0
- package/dist/src/proto/gen/dxos/devtools.d.ts +196 -0
- package/dist/src/proto/gen/dxos/devtools.d.ts.map +1 -0
- package/dist/src/proto/gen/dxos/devtools.js +3 -0
- package/dist/src/proto/gen/dxos/devtools.js.map +1 -0
- package/dist/src/proto/gen/dxos/echo/feed.d.ts +69 -0
- package/dist/src/proto/gen/dxos/echo/feed.d.ts.map +1 -0
- package/dist/src/proto/gen/dxos/echo/feed.js +13 -0
- package/dist/src/proto/gen/dxos/echo/feed.js.map +1 -0
- package/dist/src/proto/gen/dxos/echo/invitation.d.ts +20 -0
- package/dist/src/proto/gen/dxos/echo/invitation.d.ts.map +1 -0
- package/dist/src/proto/gen/dxos/echo/invitation.js +12 -0
- package/dist/src/proto/gen/dxos/echo/invitation.js.map +1 -0
- package/dist/src/proto/gen/dxos/echo/metadata.d.ts +19 -0
- package/dist/src/proto/gen/dxos/echo/metadata.d.ts.map +1 -0
- package/dist/src/proto/gen/dxos/echo/metadata.js +3 -0
- package/dist/src/proto/gen/dxos/echo/metadata.js.map +1 -0
- package/dist/src/proto/gen/dxos/echo/service.d.ts +47 -0
- package/dist/src/proto/gen/dxos/echo/service.d.ts.map +1 -0
- package/dist/src/proto/gen/dxos/echo/service.js +3 -0
- package/dist/src/proto/gen/dxos/echo/service.js.map +1 -0
- package/dist/src/proto/gen/dxos/echo/snapshot.d.ts +51 -0
- package/dist/src/proto/gen/dxos/echo/snapshot.d.ts.map +1 -0
- package/dist/src/proto/gen/dxos/echo/snapshot.js +3 -0
- package/dist/src/proto/gen/dxos/echo/snapshot.js.map +1 -0
- package/dist/src/proto/gen/dxos/halo/keys.d.ts +59 -0
- package/dist/src/proto/gen/dxos/halo/keys.d.ts.map +1 -0
- package/dist/src/proto/gen/dxos/halo/keys.js +13 -0
- package/dist/src/proto/gen/dxos/halo/keys.js.map +1 -0
- package/dist/src/proto/gen/dxos/rpc.d.ts +41 -0
- package/dist/src/proto/gen/dxos/rpc.d.ts.map +1 -0
- package/dist/src/proto/gen/dxos/rpc.js +12 -0
- package/dist/src/proto/gen/dxos/rpc.js.map +1 -0
- package/dist/src/proto/gen/google/protobuf.d.ts +277 -0
- package/dist/src/proto/gen/google/protobuf.d.ts.map +1 -0
- package/dist/src/proto/gen/google/protobuf.js +58 -0
- package/dist/src/proto/gen/google/protobuf.js.map +1 -0
- package/dist/src/proto/gen/index.d.ts +249 -0
- package/dist/src/proto/gen/index.d.ts.map +1 -0
- package/dist/src/proto/gen/index.js +7 -0
- package/dist/src/proto/gen/index.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +35 -0
- package/src/index.ts +3 -0
- package/src/proto/dxos/bot.proto +120 -0
- package/src/proto/dxos/client.proto +237 -0
- package/src/proto/dxos/config.proto +254 -0
- package/src/proto/dxos/devtools.proto +271 -0
- package/src/proto/dxos/echo/feed.proto +93 -0
- package/src/proto/dxos/echo/invitation.proto +29 -0
- package/src/proto/dxos/echo/metadata.proto +30 -0
- package/src/proto/dxos/echo/service.proto +64 -0
- package/src/proto/dxos/echo/snapshot.proto +88 -0
- package/src/proto/dxos/halo/auth.proto +20 -0
- package/src/proto/dxos/halo/greet.proto +125 -0
- package/src/proto/dxos/halo/identity.proto +24 -0
- package/src/proto/dxos/halo/keys.proto +88 -0
- package/src/proto/dxos/halo/party.proto +127 -0
- package/src/proto/dxos/halo/signed.proto +42 -0
- package/src/proto/dxos/rpc.proto +59 -0
- package/src/proto/gen/dxos/bot.ts +120 -0
- package/src/proto/gen/dxos/client.ts +190 -0
- package/src/proto/gen/dxos/config.ts +225 -0
- package/src/proto/gen/dxos/credentials/auth.ts +26 -0
- package/src/proto/gen/dxos/credentials/greet.ts +53 -0
- package/src/proto/gen/dxos/credentials/identity.ts +25 -0
- package/src/proto/gen/dxos/credentials/party.ts +63 -0
- package/src/proto/gen/dxos/credentials.ts +39 -0
- package/src/proto/gen/dxos/devtools.ts +206 -0
- package/src/proto/gen/dxos/echo/feed.ts +84 -0
- package/src/proto/gen/dxos/echo/invitation.ts +36 -0
- package/src/proto/gen/dxos/echo/metadata.ts +33 -0
- package/src/proto/gen/dxos/echo/service.ts +59 -0
- package/src/proto/gen/dxos/echo/snapshot.ts +66 -0
- package/src/proto/gen/dxos/halo/keys.ts +74 -0
- package/src/proto/gen/dxos/rpc.ts +56 -0
- package/src/proto/gen/google/protobuf.ts +293 -0
- package/src/proto/gen/index.ts +248 -0
package/package.json
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@dxos/protocols",
|
|
3
|
+
"version": "2.28.0",
|
|
4
|
+
"description": "Protobuf definitions for DXOS protocols.",
|
|
5
|
+
"bugs": {
|
|
6
|
+
"url": "'https://github.com/dxos/protocols/issues"
|
|
7
|
+
},
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "git+https://github.com/dxos/protocols.git"
|
|
11
|
+
},
|
|
12
|
+
"license": "MIT",
|
|
13
|
+
"author": "DXOS.org",
|
|
14
|
+
"main": "dist/src/index.js",
|
|
15
|
+
"types": "dist/src/index.d.ts",
|
|
16
|
+
"files": [
|
|
17
|
+
"dist",
|
|
18
|
+
"src"
|
|
19
|
+
],
|
|
20
|
+
"dependencies": {
|
|
21
|
+
"@dxos/codec-protobuf": "2.28.0"
|
|
22
|
+
},
|
|
23
|
+
"devDependencies": {
|
|
24
|
+
"@dxos/toolchain-node-library": "2.28.0"
|
|
25
|
+
},
|
|
26
|
+
"publishConfig": {
|
|
27
|
+
"access": "public"
|
|
28
|
+
},
|
|
29
|
+
"scripts": {
|
|
30
|
+
"build": "toolchain build",
|
|
31
|
+
"build:test": "toolchain build:test",
|
|
32
|
+
"lint": "toolchain lint",
|
|
33
|
+
"test": "toolchain test"
|
|
34
|
+
}
|
|
35
|
+
}
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
import "google/protobuf/empty.proto";
|
|
4
|
+
import "./client.proto";
|
|
5
|
+
import "./config.proto";
|
|
6
|
+
import "./echo/invitation.proto";
|
|
7
|
+
|
|
8
|
+
package dxos.bot;
|
|
9
|
+
|
|
10
|
+
message BotPackageSpecifier {
|
|
11
|
+
oneof kind {
|
|
12
|
+
string dxn = 1;
|
|
13
|
+
string ipfs_cid = 2;
|
|
14
|
+
string local_path = 3;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
message Bot {
|
|
19
|
+
enum Status {
|
|
20
|
+
STOPPED = 0;
|
|
21
|
+
STARTING = 1;
|
|
22
|
+
RUNNING = 2;
|
|
23
|
+
STOPPING = 3;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
string id = 1;
|
|
27
|
+
Status status = 2;
|
|
28
|
+
BotPackageSpecifier package_specifier = 3;
|
|
29
|
+
Timestamp last_start = 4;
|
|
30
|
+
dxos.halo.keys.PubKey party_key = 5;
|
|
31
|
+
|
|
32
|
+
message Runtime {
|
|
33
|
+
int32 exit_code = 1;
|
|
34
|
+
string exit_signal = 2;
|
|
35
|
+
string error = 3;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
Runtime runtime = 6;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
message GetBotsResponse {
|
|
42
|
+
repeated Bot bots = 1;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
message SpawnBotRequest {
|
|
46
|
+
BotPackageSpecifier package = 1;
|
|
47
|
+
|
|
48
|
+
/// Invitation for the bot to join the target party.
|
|
49
|
+
dxos.echo.InvitationDescriptor invitation = 2;
|
|
50
|
+
|
|
51
|
+
/// Key of the party bot is invited to.
|
|
52
|
+
dxos.halo.keys.PubKey party_key = 3;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
message SendCommandRequest {
|
|
56
|
+
string bot_id = 1;
|
|
57
|
+
|
|
58
|
+
bytes command = 2;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
message SendCommandResponse {
|
|
62
|
+
bytes response = 1;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
message GetLogsResponse {
|
|
66
|
+
bytes chunk = 1;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
message GetLogsRequest {
|
|
70
|
+
string bot_id = 1;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
/// Service that is used by clients to communicate with bot factory.
|
|
75
|
+
service BotFactoryService {
|
|
76
|
+
rpc GetBots(google.protobuf.Empty) returns (GetBotsResponse);
|
|
77
|
+
|
|
78
|
+
rpc SpawnBot(SpawnBotRequest) returns (Bot);
|
|
79
|
+
|
|
80
|
+
// TODO(dmaretskyi): Invitations.
|
|
81
|
+
|
|
82
|
+
rpc Start(Bot) returns (Bot);
|
|
83
|
+
rpc Stop(Bot) returns (Bot);
|
|
84
|
+
rpc Remove(Bot) returns (google.protobuf.Empty);
|
|
85
|
+
rpc GetLogs(GetLogsRequest) returns (stream GetLogsResponse);
|
|
86
|
+
|
|
87
|
+
// TODO(dmaretskyi): querying metrics/state.
|
|
88
|
+
|
|
89
|
+
rpc SendCommand(SendCommandRequest) returns (SendCommandResponse);
|
|
90
|
+
|
|
91
|
+
rpc RemoveAll(google.protobuf.Empty) returns (google.protobuf.Empty);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
message InitializeRequest {
|
|
95
|
+
/// Bot runtime configuration.
|
|
96
|
+
dxos.config.Config config = 1;
|
|
97
|
+
|
|
98
|
+
/// Invitation for the bot to join the target party.
|
|
99
|
+
dxos.echo.InvitationDescriptor invitation = 2;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
message StartRequest {
|
|
103
|
+
/// Bot runtime configuration.
|
|
104
|
+
dxos.config.Config config = 1;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
/// Service that is used by bots communicating with bot factory.
|
|
108
|
+
service BotService {
|
|
109
|
+
/// Initialize Client, create profile, and join a party.
|
|
110
|
+
rpc Initialize(InitializeRequest) returns (google.protobuf.Empty);
|
|
111
|
+
|
|
112
|
+
/// Initialize Client.
|
|
113
|
+
rpc Start(StartRequest) returns (google.protobuf.Empty);
|
|
114
|
+
|
|
115
|
+
/// Custom commands sent to the bot factory.
|
|
116
|
+
rpc Command(SendCommandRequest) returns (SendCommandResponse);
|
|
117
|
+
|
|
118
|
+
/// Stop the bot.
|
|
119
|
+
rpc Stop(google.protobuf.Empty) returns (google.protobuf.Empty);
|
|
120
|
+
}
|
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2021 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
syntax = "proto3";
|
|
6
|
+
|
|
7
|
+
import "google/protobuf/empty.proto";
|
|
8
|
+
import "config.proto";
|
|
9
|
+
import "./echo/invitation.proto";
|
|
10
|
+
import "./echo/snapshot.proto";
|
|
11
|
+
import "./halo/keys.proto";
|
|
12
|
+
|
|
13
|
+
package dxos.client;
|
|
14
|
+
|
|
15
|
+
//
|
|
16
|
+
// SYSTEM
|
|
17
|
+
//
|
|
18
|
+
|
|
19
|
+
service SystemService {
|
|
20
|
+
rpc GetConfig(google.protobuf.Empty) returns (Config);
|
|
21
|
+
rpc Reset (google.protobuf.Empty) returns (google.protobuf.Empty);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
//
|
|
25
|
+
// Invitations shared across HALO and ECHO
|
|
26
|
+
//
|
|
27
|
+
|
|
28
|
+
enum InvitationState {
|
|
29
|
+
WAITING_FOR_CONNECTION = 1;
|
|
30
|
+
CONNECTED = 2;
|
|
31
|
+
SUCCESS = 3;
|
|
32
|
+
ERROR = 4;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/// Invitation process created by sender.
|
|
36
|
+
message InvitationRequest {
|
|
37
|
+
InvitationDescriptor descriptor = 1;
|
|
38
|
+
|
|
39
|
+
InvitationState state = 2;
|
|
40
|
+
|
|
41
|
+
/// Only if state == ERROR.
|
|
42
|
+
string error = 3;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/// Invitation that is being redeemed.
|
|
46
|
+
message RedeemedInvitation {
|
|
47
|
+
string id = 1;
|
|
48
|
+
|
|
49
|
+
InvitationState state = 2;
|
|
50
|
+
|
|
51
|
+
/// Only if state == ERROR.
|
|
52
|
+
string error = 3;
|
|
53
|
+
|
|
54
|
+
/// Only on party invitations that are finished.
|
|
55
|
+
dxos.halo.keys.PubKey partyKey = 4;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
message AuthenticateInvitationRequest {
|
|
59
|
+
/// Id from corresponding RedeemedInvitation.
|
|
60
|
+
string processId = 1;
|
|
61
|
+
bytes secret = 2;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
//
|
|
65
|
+
// HALO
|
|
66
|
+
//
|
|
67
|
+
|
|
68
|
+
message Profile {
|
|
69
|
+
required dxos.halo.keys.PubKey publicKey = 1;
|
|
70
|
+
string username = 2;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
message SubscribeProfileResponse {
|
|
74
|
+
Profile profile = 1;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
message CreateProfileRequest {
|
|
78
|
+
string username = 1;
|
|
79
|
+
bytes publicKey = 2;
|
|
80
|
+
bytes secretKey = 3;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
message RecoverProfileRequest {
|
|
84
|
+
string seedPhrase = 1;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
message Contact {
|
|
88
|
+
dxos.halo.keys.PubKey publicKey = 1;
|
|
89
|
+
string displayName = 2;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
message Contacts {
|
|
93
|
+
repeated Contact contacts = 1;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
service ProfileService {
|
|
97
|
+
rpc SubscribeProfile (google.protobuf.Empty) returns (stream SubscribeProfileResponse);
|
|
98
|
+
rpc CreateProfile(CreateProfileRequest) returns (Profile);
|
|
99
|
+
rpc RecoverProfile(RecoverProfileRequest) returns (Profile);
|
|
100
|
+
|
|
101
|
+
rpc CreateInvitation(google.protobuf.Empty) returns (stream InvitationRequest);
|
|
102
|
+
rpc AcceptInvitation(InvitationDescriptor) returns (stream RedeemedInvitation);
|
|
103
|
+
rpc AuthenticateInvitation(AuthenticateInvitationRequest) returns (google.protobuf.Empty);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
message AddKeyRecordRequest {
|
|
107
|
+
KeyRecord keyRecord = 1;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
message SignRequest {
|
|
111
|
+
/**
|
|
112
|
+
* - The public key of the key that is supposed to be used for signing.
|
|
113
|
+
*/
|
|
114
|
+
PubKey publicKey = 1;
|
|
115
|
+
|
|
116
|
+
bytes payload = 2;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
message SignResponse {
|
|
120
|
+
bytes signed = 2;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
message SetPreferenceRequest {
|
|
124
|
+
string key = 1;
|
|
125
|
+
string value = 2;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
message GetPreferenceRequest {
|
|
129
|
+
string key = 1;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
message GetPreferenceResponse {
|
|
133
|
+
string value = 1;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
service HaloService {
|
|
137
|
+
rpc SubscribeContacts(google.protobuf.Empty) returns (stream Contacts);
|
|
138
|
+
|
|
139
|
+
rpc AddKeyRecord(AddKeyRecordRequest) returns (google.protobuf.Empty);
|
|
140
|
+
rpc Sign(SignRequest) returns (SignResponse);
|
|
141
|
+
|
|
142
|
+
rpc SetGlobalPreference(SetPreferenceRequest) returns (google.protobuf.Empty);
|
|
143
|
+
rpc GetGlobalPreference(GetPreferenceRequest) returns (GetPreferenceResponse);
|
|
144
|
+
|
|
145
|
+
rpc SetDevicePreference(SetPreferenceRequest) returns (google.protobuf.Empty);
|
|
146
|
+
rpc GetDevicePreference(GetPreferenceRequest) returns (GetPreferenceResponse);
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
//
|
|
150
|
+
// ECHO
|
|
151
|
+
//
|
|
152
|
+
|
|
153
|
+
message Party {
|
|
154
|
+
message Member {
|
|
155
|
+
required dxos.halo.keys.PubKey publicKey = 1;
|
|
156
|
+
string displayName = 2;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
required dxos.halo.keys.PubKey publicKey = 1;
|
|
160
|
+
required bool isOpen = 2;
|
|
161
|
+
required bool isActive = 3;
|
|
162
|
+
|
|
163
|
+
repeated Member members = 4;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
message SubscribePartyRequest {
|
|
167
|
+
required dxos.halo.keys.PubKey partyKey = 1;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
message SubscribePartyResponse {
|
|
171
|
+
Party party = 1;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
message SubscribePartiesResponse {
|
|
176
|
+
repeated Party parties = 1;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
message CreateInvitationRequest {
|
|
180
|
+
required dxos.halo.keys.PubKey partyKey = 1;
|
|
181
|
+
|
|
182
|
+
/// When specified the invitation will be of OFFLINE type, not requiring secret exchange.
|
|
183
|
+
dxos.halo.keys.PubKey inviteeKey = 2;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
message PartyActivationOptions {
|
|
187
|
+
bool global = 1;
|
|
188
|
+
bool device = 2;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
message SetPartyStateRequest {
|
|
192
|
+
required dxos.halo.keys.PubKey partyKey = 1;
|
|
193
|
+
|
|
194
|
+
bool open = 2;
|
|
195
|
+
bool activeGlobal = 3;
|
|
196
|
+
bool activeDevice = 4;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
message SubscribeMembersRequest {
|
|
200
|
+
required dxos.halo.keys.PubKey partyKey = 1;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
message SubscribeMembersResponse {
|
|
204
|
+
message PartyMember {
|
|
205
|
+
required dxos.halo.keys.PubKey publicKey = 1;
|
|
206
|
+
string displayName = 2;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
repeated PartyMember members = 1;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
message CreateSnaspotRequest {
|
|
213
|
+
dxos.halo.keys.PubKey partyKey = 1;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
|
|
217
|
+
service PartyService {
|
|
218
|
+
// TODO(rzadp): Combine the two into one?
|
|
219
|
+
rpc SubscribeToParty (SubscribePartyRequest) returns (stream SubscribePartyResponse);
|
|
220
|
+
rpc SubscribeParties (google.protobuf.Empty) returns (stream SubscribePartiesResponse);
|
|
221
|
+
|
|
222
|
+
rpc CreateParty(google.protobuf.Empty) returns(Party);
|
|
223
|
+
rpc CloneParty(PartySnapshot) returns(Party);
|
|
224
|
+
|
|
225
|
+
/// Open and close or activate and deactivate a party.
|
|
226
|
+
rpc SetPartyState(SetPartyStateRequest) returns(Party);
|
|
227
|
+
|
|
228
|
+
rpc CreateInvitation(CreateInvitationRequest) returns (stream InvitationRequest);
|
|
229
|
+
rpc AcceptInvitation(InvitationDescriptor) returns (stream RedeemedInvitation);
|
|
230
|
+
rpc AuthenticateInvitation(AuthenticateInvitationRequest) returns (google.protobuf.Empty);
|
|
231
|
+
|
|
232
|
+
// TODO(rzadp): Remove and join with Subscribing to Party.
|
|
233
|
+
rpc SubscribeMembers (SubscribeMembersRequest) returns (stream SubscribeMembersResponse);
|
|
234
|
+
|
|
235
|
+
rpc CreateSnapshot(CreateSnaspotRequest) returns (PartySnapshot);
|
|
236
|
+
}
|
|
237
|
+
|
|
@@ -0,0 +1,254 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2021 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
syntax = "proto3";
|
|
6
|
+
|
|
7
|
+
package dxos.config;
|
|
8
|
+
|
|
9
|
+
import "google/protobuf/timestamp.proto";
|
|
10
|
+
import "google/protobuf/descriptor.proto";
|
|
11
|
+
|
|
12
|
+
message Config {
|
|
13
|
+
int32 version = 1;
|
|
14
|
+
|
|
15
|
+
//
|
|
16
|
+
// Deploy configuration.
|
|
17
|
+
//
|
|
18
|
+
|
|
19
|
+
Module module = 2;
|
|
20
|
+
|
|
21
|
+
//
|
|
22
|
+
// Build configuration.
|
|
23
|
+
//
|
|
24
|
+
|
|
25
|
+
Build build = 3;
|
|
26
|
+
|
|
27
|
+
//
|
|
28
|
+
// Runtime configuration.
|
|
29
|
+
//
|
|
30
|
+
|
|
31
|
+
Runtime runtime = 4;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
message Module {
|
|
35
|
+
// Specific to record type.
|
|
36
|
+
message Record {
|
|
37
|
+
message App {
|
|
38
|
+
repeated string content_type = 1;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
App app = 1;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
// Current build.
|
|
45
|
+
message Build {
|
|
46
|
+
string version = 1;
|
|
47
|
+
string commit_hash = 2;
|
|
48
|
+
google.protobuf.Timestamp timestamp = 3;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
string name = 1;
|
|
52
|
+
string type = 2;
|
|
53
|
+
string version = 3;
|
|
54
|
+
|
|
55
|
+
string author = 4;
|
|
56
|
+
string license = 5;
|
|
57
|
+
string description = 6;
|
|
58
|
+
string repository = 7;
|
|
59
|
+
string repository_version = 8;
|
|
60
|
+
repeated string keywords = 9;
|
|
61
|
+
string display_name = 10;
|
|
62
|
+
string npm_url = 11;
|
|
63
|
+
|
|
64
|
+
Build build = 101;
|
|
65
|
+
Record record = 102;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
message Build {
|
|
69
|
+
string command = 1;
|
|
70
|
+
string out = 2;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
message Runtime {
|
|
74
|
+
message Client {
|
|
75
|
+
/// Whether the client services are local with ClientServiceHost or remote and need to be accessed via ClientServiceProxy. Defaults to AUTOMATIC.
|
|
76
|
+
enum Mode {
|
|
77
|
+
/// Connects to the browser wallet if avialable, otherwise runs services in the local mode.
|
|
78
|
+
AUTOMATIC = 0;
|
|
79
|
+
|
|
80
|
+
/// Run services in the local mode.
|
|
81
|
+
LOCAL = 1;
|
|
82
|
+
|
|
83
|
+
/// Connect to the browser wallet or to the remote services through the RPC port.
|
|
84
|
+
REMOTE = 2;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
message Storage {
|
|
88
|
+
enum StorageDriver {
|
|
89
|
+
RAM = 0;
|
|
90
|
+
IDB = 1;
|
|
91
|
+
CHROME = 2;
|
|
92
|
+
FIREFOX = 3;
|
|
93
|
+
NODE = 4;
|
|
94
|
+
|
|
95
|
+
// Only for key storage:
|
|
96
|
+
|
|
97
|
+
LEVELJS = 11;
|
|
98
|
+
JSONDOWN = 12;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
bool persistent = 1;
|
|
102
|
+
StorageDriver storage_type = 2;
|
|
103
|
+
StorageDriver key_storage = 3;
|
|
104
|
+
string path = 4;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
string debug = 1 [(env) = "DEBUG"];
|
|
108
|
+
Storage storage = 2;
|
|
109
|
+
bool enable_snapshots = 3;
|
|
110
|
+
|
|
111
|
+
/// Milliseconds
|
|
112
|
+
int32 snapshot_interval = 4;
|
|
113
|
+
|
|
114
|
+
/// Milliseconds
|
|
115
|
+
int32 invitation_expiration = 5;
|
|
116
|
+
|
|
117
|
+
Mode mode = 6;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
message App {
|
|
121
|
+
string org = 1;
|
|
122
|
+
string theme = 2;
|
|
123
|
+
string website = 3;
|
|
124
|
+
string publicUrl = 4 [(env) = "PUBLIC_URL"];
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
// CLI configuration
|
|
128
|
+
message CLI {
|
|
129
|
+
message AppServe {
|
|
130
|
+
message Serve {
|
|
131
|
+
string config = 1;
|
|
132
|
+
string login_app = 2;
|
|
133
|
+
string key_phrase = 3;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
Serve serve = 1;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
message Package {
|
|
140
|
+
string package = 1;
|
|
141
|
+
string channel = 2;
|
|
142
|
+
string bin = 3;
|
|
143
|
+
string config = 4;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
string node_path = 1;
|
|
147
|
+
AppServe app = 2;
|
|
148
|
+
Package console = 3;
|
|
149
|
+
Package mdns = 4;
|
|
150
|
+
Package signal = 5;
|
|
151
|
+
string npm_client = 6;
|
|
152
|
+
string channel = 7;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
message Props {
|
|
156
|
+
string title = 1;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
message System {
|
|
160
|
+
string debug = 1;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
//
|
|
164
|
+
// DXOS Services.
|
|
165
|
+
//
|
|
166
|
+
message Services {
|
|
167
|
+
message Kube {
|
|
168
|
+
|
|
169
|
+
message Endpoints {
|
|
170
|
+
string logs = 1;
|
|
171
|
+
string services = 2;
|
|
172
|
+
string cert = 3;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
Endpoints endpoints = 1;
|
|
176
|
+
string public_url = 2;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
message AppServer {
|
|
180
|
+
string prefix = 1;
|
|
181
|
+
string server = 2;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
message Dxns {
|
|
185
|
+
/// DXNS endpoint.
|
|
186
|
+
string server = 1;
|
|
187
|
+
|
|
188
|
+
/**
|
|
189
|
+
* Substrate account URI. This is a secret.
|
|
190
|
+
* KUBEs do not serve this with the config but we store it in profile.yml.
|
|
191
|
+
*
|
|
192
|
+
* TODO(dmaretskyi): Deprecate this and move it to keyring.
|
|
193
|
+
*/
|
|
194
|
+
string accountUri = 2;
|
|
195
|
+
|
|
196
|
+
/**
|
|
197
|
+
* Public Polkadot Address.
|
|
198
|
+
*/
|
|
199
|
+
string address = 3;
|
|
200
|
+
|
|
201
|
+
/**
|
|
202
|
+
* Public address of a DXNS Account.
|
|
203
|
+
*/
|
|
204
|
+
string account = 4;
|
|
205
|
+
|
|
206
|
+
string faucet = 5;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
message Ipfs {
|
|
210
|
+
string server = 1;
|
|
211
|
+
string gateway = 2;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
message Signal {
|
|
215
|
+
string server = 1;
|
|
216
|
+
string api = 2;
|
|
217
|
+
string status = 3;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
message Ice {
|
|
221
|
+
string urls = 1;
|
|
222
|
+
string username = 2;
|
|
223
|
+
string credential = 3;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
message Machine {
|
|
227
|
+
string do_access_token = 1;
|
|
228
|
+
string github_access_token = 2;
|
|
229
|
+
string github_username = 3;
|
|
230
|
+
string dns_domain = 4;
|
|
231
|
+
string npm_access_token = 5;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
message BotFactory {
|
|
235
|
+
string topic = 1;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
Kube kube = 1;
|
|
239
|
+
AppServer app = 2;
|
|
240
|
+
Dxns dxns = 3;
|
|
241
|
+
Ipfs ipfs = 4;
|
|
242
|
+
Signal signal = 5;
|
|
243
|
+
repeated Ice ice = 6;
|
|
244
|
+
Machine machine = 7;
|
|
245
|
+
BotFactory bot = 8;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
Client client = 1;
|
|
249
|
+
App app = 2;
|
|
250
|
+
CLI cli = 3;
|
|
251
|
+
Props props = 4;
|
|
252
|
+
Services services = 5;
|
|
253
|
+
System system = 6;
|
|
254
|
+
}
|