@dxos/protocols 0.3.8-next.f4e0086 → 0.3.9-main.03b62b6
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/cjs/src/proto/gen/dxos/agent/functions.d.ts +6 -0
- package/dist/cjs/src/proto/gen/dxos/agent/functions.d.ts.map +1 -1
- package/dist/cjs/src/proto/gen/dxos/client/services.d.ts +15 -0
- package/dist/cjs/src/proto/gen/dxos/client/services.d.ts.map +1 -1
- package/dist/cjs/src/proto/gen/dxos/client/services.js +13 -1
- package/dist/cjs/src/proto/gen/dxos/client/services.js.map +1 -1
- package/dist/cjs/src/proto/gen/dxos/devtools/swarm.d.ts +30 -0
- package/dist/cjs/src/proto/gen/dxos/devtools/swarm.d.ts.map +1 -1
- package/dist/cjs/src/proto/gen/dxos/echo/service.d.ts +25 -0
- package/dist/cjs/src/proto/gen/dxos/echo/service.d.ts.map +1 -1
- package/dist/cjs/src/proto/gen/dxos/halo/credentials.d.ts +7 -0
- package/dist/cjs/src/proto/gen/dxos/halo/credentials.d.ts.map +1 -1
- package/dist/cjs/src/proto/gen/dxos/mesh/bridge.d.ts +30 -0
- package/dist/cjs/src/proto/gen/dxos/mesh/bridge.d.ts.map +1 -1
- package/dist/cjs/src/proto/gen/dxos/mesh/bridge.js.map +1 -1
- package/dist/cjs/src/proto/gen/index.d.ts +7 -0
- package/dist/cjs/src/proto/gen/index.d.ts.map +1 -1
- package/dist/cjs/src/proto/gen/index.js +1 -1
- package/dist/cjs/src/proto/gen/index.js.map +1 -1
- package/dist/cjs/tsconfig.tsbuildinfo +1 -1
- package/dist/esm/src/proto/gen/dxos/agent/functions.d.ts +6 -0
- package/dist/esm/src/proto/gen/dxos/agent/functions.d.ts.map +1 -1
- package/dist/esm/src/proto/gen/dxos/client/services.d.ts +15 -0
- package/dist/esm/src/proto/gen/dxos/client/services.d.ts.map +1 -1
- package/dist/esm/src/proto/gen/dxos/client/services.js +12 -0
- package/dist/esm/src/proto/gen/dxos/client/services.js.map +1 -1
- package/dist/esm/src/proto/gen/dxos/devtools/swarm.d.ts +30 -0
- package/dist/esm/src/proto/gen/dxos/devtools/swarm.d.ts.map +1 -1
- package/dist/esm/src/proto/gen/dxos/echo/service.d.ts +25 -0
- package/dist/esm/src/proto/gen/dxos/echo/service.d.ts.map +1 -1
- package/dist/esm/src/proto/gen/dxos/halo/credentials.d.ts +7 -0
- package/dist/esm/src/proto/gen/dxos/halo/credentials.d.ts.map +1 -1
- package/dist/esm/src/proto/gen/dxos/mesh/bridge.d.ts +30 -0
- package/dist/esm/src/proto/gen/dxos/mesh/bridge.d.ts.map +1 -1
- package/dist/esm/src/proto/gen/dxos/mesh/bridge.js.map +1 -1
- package/dist/esm/src/proto/gen/index.d.ts +7 -0
- package/dist/esm/src/proto/gen/index.d.ts.map +1 -1
- package/dist/esm/src/proto/gen/index.js +1 -1
- package/dist/esm/src/proto/gen/index.js.map +1 -1
- package/package.json +5 -5
- package/src/proto/dxos/agent/functions.proto +4 -0
- package/src/proto/dxos/client/services.proto +9 -0
- package/src/proto/dxos/devtools/swarm.proto +7 -0
- package/src/proto/dxos/echo/service.proto +16 -0
- package/src/proto/dxos/halo/credentials.proto +4 -0
- package/src/proto/dxos/mesh/bridge.proto +23 -0
- package/src/proto/gen/dxos/agent/functions.ts +6 -0
- package/src/proto/gen/dxos/client/services.ts +15 -0
- package/src/proto/gen/dxos/devtools/swarm.ts +30 -0
- package/src/proto/gen/dxos/echo/service.ts +25 -0
- package/src/proto/gen/dxos/halo/credentials.ts +7 -0
- package/src/proto/gen/dxos/mesh/bridge.ts +30 -0
- package/src/proto/gen/index.ts +8 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/proto/gen/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AA4DhE,OAAO,aAAa,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/proto/gen/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AA4DhE,OAAO,aAAa,MAAM,kBAAkB,CAAC;AA4gB7C,MAAM,CAAC,MAAM,UAAU,GAAG,gBAAgB,CAAC,IAAI,CAAC,KAAK,CAAC,uzhGAAuzhG,CAAC,CAAC,CAAC;AACh3hG,MAAM,CAAC,MAAM,MAAM,GAAG,MAAM,CAAC,QAAQ,CAAkB,UAAU,EAAE,aAAa,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/protocols",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.9-main.03b62b6",
|
|
4
4
|
"description": "Protobuf definitions for DXOS protocols.",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
@@ -33,10 +33,10 @@
|
|
|
33
33
|
"src"
|
|
34
34
|
],
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@dxos/
|
|
37
|
-
"@dxos/
|
|
38
|
-
"@dxos/
|
|
39
|
-
"@dxos/
|
|
36
|
+
"@dxos/invariant": "0.3.9-main.03b62b6",
|
|
37
|
+
"@dxos/timeframe": "0.3.9-main.03b62b6",
|
|
38
|
+
"@dxos/keys": "0.3.9-main.03b62b6",
|
|
39
|
+
"@dxos/codec-protobuf": "0.3.9-main.03b62b6"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"glob": "~7.1.6"
|
|
@@ -4,14 +4,17 @@
|
|
|
4
4
|
|
|
5
5
|
syntax = "proto3";
|
|
6
6
|
|
|
7
|
+
// TODO(burdon): dxos.agent.plugin.functions
|
|
7
8
|
package dxos.agent.functions;
|
|
8
9
|
|
|
9
10
|
import "google/protobuf/empty.proto";
|
|
10
11
|
|
|
11
12
|
message FunctionsConfig {
|
|
12
13
|
optional int32 port = 1;
|
|
14
|
+
optional string manifest = 2;
|
|
13
15
|
}
|
|
14
16
|
|
|
17
|
+
// TODO(burdon): Reconcile with typedefs.
|
|
15
18
|
message Function {
|
|
16
19
|
string name = 1;
|
|
17
20
|
}
|
|
@@ -23,6 +26,7 @@ message RegisterRequest {
|
|
|
23
26
|
|
|
24
27
|
message RegisterResponse {
|
|
25
28
|
string registration_id = 1;
|
|
29
|
+
string endpoint = 2;
|
|
26
30
|
}
|
|
27
31
|
|
|
28
32
|
message UnregisterRequest {
|
|
@@ -306,7 +306,16 @@ message QueryCredentialsRequest {
|
|
|
306
306
|
}
|
|
307
307
|
|
|
308
308
|
message CreateEpochRequest {
|
|
309
|
+
enum Migration {
|
|
310
|
+
NONE = 0;
|
|
311
|
+
|
|
312
|
+
/// Init empty automerge document as the space root. Disables legacy ECHO snapshot creation.
|
|
313
|
+
INIT_AUTOMERGE = 1;
|
|
314
|
+
}
|
|
315
|
+
|
|
309
316
|
dxos.keys.PublicKey space_key = 1;
|
|
317
|
+
|
|
318
|
+
optional Migration migration = 2;
|
|
310
319
|
}
|
|
311
320
|
|
|
312
321
|
service SpacesService {
|
|
@@ -41,6 +41,13 @@ message ConnectionInfo {
|
|
|
41
41
|
optional string identity = 9;
|
|
42
42
|
optional uint32 readBufferSize = 10;
|
|
43
43
|
optional uint32 writeBufferSize = 11;
|
|
44
|
+
optional google.protobuf.Timestamp last_update = 12;
|
|
45
|
+
optional string transport_details = 13;
|
|
46
|
+
// TODO(nf): uint64?
|
|
47
|
+
optional uint32 transport_bytes_sent = 14;
|
|
48
|
+
optional uint32 transport_bytes_received = 15;
|
|
49
|
+
optional uint32 transport_packets_sent = 16;
|
|
50
|
+
optional uint32 transport_packets_received = 17;
|
|
44
51
|
}
|
|
45
52
|
|
|
46
53
|
message ConnectionEvent {
|
|
@@ -50,8 +50,24 @@ message FlushRequest {
|
|
|
50
50
|
dxos.keys.PublicKey space_key = 1;
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
+
// Automerge specific.
|
|
54
|
+
message SyncRepoRequest {
|
|
55
|
+
string id = 1;
|
|
56
|
+
|
|
57
|
+
optional bytes sync_message = 2;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
message SyncRepoResponse {
|
|
61
|
+
optional bytes sync_message = 1;
|
|
62
|
+
}
|
|
63
|
+
|
|
53
64
|
service DataService {
|
|
54
65
|
rpc Subscribe(SubscribeRequest) returns (stream EchoEvent);
|
|
55
66
|
rpc Write(WriteRequest) returns (MutationReceipt); // TODO(burdon): Rename SubmitMutation.
|
|
56
67
|
rpc Flush(FlushRequest) returns (google.protobuf.Empty);
|
|
68
|
+
|
|
69
|
+
// Automerge specific.
|
|
70
|
+
|
|
71
|
+
rpc SyncRepo(SyncRepoRequest) returns (stream SyncRepoResponse);
|
|
72
|
+
rpc SendSyncMessage(SyncRepoRequest) returns (google.protobuf.Empty); // TODO(dmaretskyi): Bidirectional streams.
|
|
57
73
|
}
|
|
@@ -115,11 +115,15 @@ message Epoch {
|
|
|
115
115
|
/// Id of the previous epoch. Identified by the credential id.
|
|
116
116
|
optional dxos.keys.PublicKey previous_id = 2;
|
|
117
117
|
|
|
118
|
+
// TODO(dmaretskyi): Deprecate.
|
|
118
119
|
/// Epoch start timeframe. Indexes correspond to last mutations included into the snapshot.
|
|
119
120
|
dxos.echo.timeframe.TimeframeVector timeframe = 10;
|
|
120
121
|
|
|
121
122
|
/// Epoch start snapshot.
|
|
122
123
|
optional string snapshot_cid = 11;
|
|
124
|
+
|
|
125
|
+
/// URL of the automerge document representing the space root.
|
|
126
|
+
optional string automerge_root = 12;
|
|
123
127
|
}
|
|
124
128
|
|
|
125
129
|
/// [ASSERTION]: Associates a space that will implement Agent's HALO with an Identity.
|
|
@@ -7,6 +7,7 @@ syntax = "proto3";
|
|
|
7
7
|
import "dxos/keys.proto";
|
|
8
8
|
import "dxos/mesh/swarm.proto";
|
|
9
9
|
import "google/protobuf/empty.proto";
|
|
10
|
+
import "google/protobuf/struct.proto";
|
|
10
11
|
|
|
11
12
|
package dxos.mesh.bridge;
|
|
12
13
|
|
|
@@ -26,6 +27,13 @@ service BridgeService {
|
|
|
26
27
|
|
|
27
28
|
///
|
|
28
29
|
rpc Close(CloseRequest) returns (google.protobuf.Empty);
|
|
30
|
+
|
|
31
|
+
///
|
|
32
|
+
rpc GetDetails(DetailsRequest) returns (DetailsResponse);
|
|
33
|
+
|
|
34
|
+
///
|
|
35
|
+
rpc GetStats(StatsRequest) returns (StatsResponse);
|
|
36
|
+
|
|
29
37
|
}
|
|
30
38
|
|
|
31
39
|
enum ConnectionState {
|
|
@@ -74,3 +82,18 @@ message DataRequest {
|
|
|
74
82
|
message CloseRequest{
|
|
75
83
|
dxos.keys.PublicKey proxy_id = 1;
|
|
76
84
|
}
|
|
85
|
+
|
|
86
|
+
message DetailsRequest{
|
|
87
|
+
dxos.keys.PublicKey proxy_id = 1;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
message DetailsResponse{
|
|
91
|
+
string details = 1;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
message StatsRequest{
|
|
95
|
+
dxos.keys.PublicKey proxy_id = 1;
|
|
96
|
+
}
|
|
97
|
+
message StatsResponse{
|
|
98
|
+
google.protobuf.Struct stats = 1;
|
|
99
|
+
}
|
|
@@ -68,6 +68,11 @@ export interface FunctionsConfig {
|
|
|
68
68
|
* - proto3_optional = true
|
|
69
69
|
*/
|
|
70
70
|
port?: number;
|
|
71
|
+
/**
|
|
72
|
+
* Options:
|
|
73
|
+
* - proto3_optional = true
|
|
74
|
+
*/
|
|
75
|
+
manifest?: string;
|
|
71
76
|
}
|
|
72
77
|
/**
|
|
73
78
|
* Defined in:
|
|
@@ -90,6 +95,7 @@ export interface RegisterRequest {
|
|
|
90
95
|
*/
|
|
91
96
|
export interface RegisterResponse {
|
|
92
97
|
registrationId: string;
|
|
98
|
+
endpoint: string;
|
|
93
99
|
}
|
|
94
100
|
/**
|
|
95
101
|
* Defined in:
|
|
@@ -696,6 +696,21 @@ export interface QueryCredentialsRequest {
|
|
|
696
696
|
*/
|
|
697
697
|
export interface CreateEpochRequest {
|
|
698
698
|
spaceKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
|
|
699
|
+
/**
|
|
700
|
+
* Options:
|
|
701
|
+
* - proto3_optional = true
|
|
702
|
+
*/
|
|
703
|
+
migration?: CreateEpochRequest.Migration;
|
|
704
|
+
}
|
|
705
|
+
export namespace CreateEpochRequest {
|
|
706
|
+
/**
|
|
707
|
+
* Defined in:
|
|
708
|
+
* {@link file://./../../../dxos/client/services.proto}
|
|
709
|
+
*/
|
|
710
|
+
export enum Migration {
|
|
711
|
+
NONE = 0,
|
|
712
|
+
INIT_AUTOMERGE = 1
|
|
713
|
+
}
|
|
699
714
|
}
|
|
700
715
|
/**
|
|
701
716
|
* Defined in:
|
|
@@ -109,6 +109,36 @@ export interface ConnectionInfo {
|
|
|
109
109
|
* - proto3_optional = true
|
|
110
110
|
*/
|
|
111
111
|
writeBufferSize?: number;
|
|
112
|
+
/**
|
|
113
|
+
* Options:
|
|
114
|
+
* - proto3_optional = true
|
|
115
|
+
*/
|
|
116
|
+
lastUpdate?: ReturnType<(typeof substitutions)["google.protobuf.Timestamp"]["decode"]>;
|
|
117
|
+
/**
|
|
118
|
+
* Options:
|
|
119
|
+
* - proto3_optional = true
|
|
120
|
+
*/
|
|
121
|
+
transportDetails?: string;
|
|
122
|
+
/**
|
|
123
|
+
* Options:
|
|
124
|
+
* - proto3_optional = true
|
|
125
|
+
*/
|
|
126
|
+
transportBytesSent?: number;
|
|
127
|
+
/**
|
|
128
|
+
* Options:
|
|
129
|
+
* - proto3_optional = true
|
|
130
|
+
*/
|
|
131
|
+
transportBytesReceived?: number;
|
|
132
|
+
/**
|
|
133
|
+
* Options:
|
|
134
|
+
* - proto3_optional = true
|
|
135
|
+
*/
|
|
136
|
+
transportPacketsSent?: number;
|
|
137
|
+
/**
|
|
138
|
+
* Options:
|
|
139
|
+
* - proto3_optional = true
|
|
140
|
+
*/
|
|
141
|
+
transportPacketsReceived?: number;
|
|
112
142
|
}
|
|
113
143
|
export namespace ConnectionInfo {
|
|
114
144
|
/**
|
|
@@ -135,6 +135,29 @@ export interface MutationReceipt {
|
|
|
135
135
|
export interface FlushRequest {
|
|
136
136
|
spaceKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
|
|
137
137
|
}
|
|
138
|
+
/**
|
|
139
|
+
* Defined in:
|
|
140
|
+
* {@link file://./../../../dxos/echo/service.proto}
|
|
141
|
+
*/
|
|
142
|
+
export interface SyncRepoRequest {
|
|
143
|
+
id: string;
|
|
144
|
+
/**
|
|
145
|
+
* Options:
|
|
146
|
+
* - proto3_optional = true
|
|
147
|
+
*/
|
|
148
|
+
syncMessage?: Uint8Array;
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
* Defined in:
|
|
152
|
+
* {@link file://./../../../dxos/echo/service.proto}
|
|
153
|
+
*/
|
|
154
|
+
export interface SyncRepoResponse {
|
|
155
|
+
/**
|
|
156
|
+
* Options:
|
|
157
|
+
* - proto3_optional = true
|
|
158
|
+
*/
|
|
159
|
+
syncMessage?: Uint8Array;
|
|
160
|
+
}
|
|
138
161
|
/**
|
|
139
162
|
* Defined in:
|
|
140
163
|
* {@link file://./../../../dxos/echo/service.proto}
|
|
@@ -143,4 +166,6 @@ export interface DataService {
|
|
|
143
166
|
subscribe: (request: SubscribeRequest, options?: RequestOptions) => Stream<EchoEvent>;
|
|
144
167
|
write: (request: WriteRequest, options?: RequestOptions) => Promise<MutationReceipt>;
|
|
145
168
|
flush: (request: FlushRequest, options?: RequestOptions) => Promise<void>;
|
|
169
|
+
syncRepo: (request: SyncRepoRequest, options?: RequestOptions) => Stream<SyncRepoResponse>;
|
|
170
|
+
sendSyncMessage: (request: SyncRepoRequest, options?: RequestOptions) => Promise<void>;
|
|
146
171
|
}
|
|
@@ -179,6 +179,13 @@ export interface Epoch {
|
|
|
179
179
|
* - proto3_optional = true
|
|
180
180
|
*/
|
|
181
181
|
snapshotCid?: string;
|
|
182
|
+
/**
|
|
183
|
+
* URL of the automerge document representing the space root.
|
|
184
|
+
*
|
|
185
|
+
* Options:
|
|
186
|
+
* - proto3_optional = true
|
|
187
|
+
*/
|
|
188
|
+
automergeRoot?: string;
|
|
182
189
|
}
|
|
183
190
|
/**
|
|
184
191
|
* [ASSERTION]: Associates a space that will implement Agent's HALO with an Identity.
|
|
@@ -67,6 +67,8 @@ export interface BridgeService {
|
|
|
67
67
|
sendSignal: (request: SignalRequest, options?: RequestOptions) => Promise<void>;
|
|
68
68
|
sendData: (request: DataRequest, options?: RequestOptions) => Promise<void>;
|
|
69
69
|
close: (request: CloseRequest, options?: RequestOptions) => Promise<void>;
|
|
70
|
+
getDetails: (request: DetailsRequest, options?: RequestOptions) => Promise<DetailsResponse>;
|
|
71
|
+
getStats: (request: StatsRequest, options?: RequestOptions) => Promise<StatsResponse>;
|
|
70
72
|
}
|
|
71
73
|
/**
|
|
72
74
|
* Defined in:
|
|
@@ -146,3 +148,31 @@ export interface DataRequest {
|
|
|
146
148
|
export interface CloseRequest {
|
|
147
149
|
proxyId: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
|
|
148
150
|
}
|
|
151
|
+
/**
|
|
152
|
+
* Defined in:
|
|
153
|
+
* {@link file://./../../../dxos/mesh/bridge.proto}
|
|
154
|
+
*/
|
|
155
|
+
export interface DetailsRequest {
|
|
156
|
+
proxyId: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* Defined in:
|
|
160
|
+
* {@link file://./../../../dxos/mesh/bridge.proto}
|
|
161
|
+
*/
|
|
162
|
+
export interface DetailsResponse {
|
|
163
|
+
details: string;
|
|
164
|
+
}
|
|
165
|
+
/**
|
|
166
|
+
* Defined in:
|
|
167
|
+
* {@link file://./../../../dxos/mesh/bridge.proto}
|
|
168
|
+
*/
|
|
169
|
+
export interface StatsRequest {
|
|
170
|
+
proxyId: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
|
|
171
|
+
}
|
|
172
|
+
/**
|
|
173
|
+
* Defined in:
|
|
174
|
+
* {@link file://./../../../dxos/mesh/bridge.proto}
|
|
175
|
+
*/
|
|
176
|
+
export interface StatsResponse {
|
|
177
|
+
stats: ReturnType<(typeof substitutions)["google.protobuf.Struct"]["decode"]>;
|
|
178
|
+
}
|