@dxos/protocols 0.3.8-next.a5a9bfc → 0.3.8

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.
@@ -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;AAqgB7C,MAAM,CAAC,MAAM,UAAU,GAAG,gBAAgB,CAAC,IAAI,CAAC,KAAK,CAAC,+99FAA+99F,CAAC,CAAC,CAAC;AACxh+F,MAAM,CAAC,MAAM,MAAM,GAAG,MAAM,CAAC,QAAQ,CAAkB,UAAU,EAAE,aAAa,CAAC,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;AAugB7C,MAAM,CAAC,MAAM,UAAU,GAAG,gBAAgB,CAAC,IAAI,CAAC,KAAK,CAAC,k7+FAAk7+F,CAAC,CAAC,CAAC;AAC3++F,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.8-next.a5a9bfc",
3
+ "version": "0.3.8",
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/invariant": "0.3.8-next.a5a9bfc",
37
- "@dxos/keys": "0.3.8-next.a5a9bfc",
38
- "@dxos/timeframe": "0.3.8-next.a5a9bfc",
39
- "@dxos/codec-protobuf": "0.3.8-next.a5a9bfc"
36
+ "@dxos/codec-protobuf": "0.3.8",
37
+ "@dxos/keys": "0.3.8",
38
+ "@dxos/invariant": "0.3.8",
39
+ "@dxos/timeframe": "0.3.8"
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 {
@@ -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
  }
@@ -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:
@@ -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
  }