@dxos/protocols 0.8.4-main.bc674ce → 0.8.4-main.bcb3aa67d6

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.
Files changed (202) hide show
  1. package/README.md +1 -1
  2. package/dist/src/FeedProtocol.d.ts +528 -0
  3. package/dist/src/FeedProtocol.d.ts.map +1 -0
  4. package/dist/src/FeedProtocol.js +237 -0
  5. package/dist/src/FeedProtocol.js.map +1 -0
  6. package/dist/src/FunctionProtocol.d.ts +2 -2
  7. package/dist/src/FunctionProtocol.d.ts.map +1 -1
  8. package/dist/src/buf/proto/gen/dxos/client/queue_pb.d.ts +42 -0
  9. package/dist/src/buf/proto/gen/dxos/client/queue_pb.d.ts.map +1 -1
  10. package/dist/src/buf/proto/gen/dxos/client/queue_pb.js +7 -2
  11. package/dist/src/buf/proto/gen/dxos/client/queue_pb.js.map +1 -1
  12. package/dist/src/buf/proto/gen/dxos/client/services_pb.d.ts +33 -3
  13. package/dist/src/buf/proto/gen/dxos/client/services_pb.d.ts.map +1 -1
  14. package/dist/src/buf/proto/gen/dxos/client/services_pb.js +46 -37
  15. package/dist/src/buf/proto/gen/dxos/client/services_pb.js.map +1 -1
  16. package/dist/src/buf/proto/gen/dxos/config_pb.d.ts +0 -4
  17. package/dist/src/buf/proto/gen/dxos/config_pb.d.ts.map +1 -1
  18. package/dist/src/buf/proto/gen/dxos/config_pb.js +1 -1
  19. package/dist/src/buf/proto/gen/dxos/config_pb.js.map +1 -1
  20. package/dist/src/buf/proto/gen/dxos/echo/metadata_pb.d.ts +6 -0
  21. package/dist/src/buf/proto/gen/dxos/echo/metadata_pb.d.ts.map +1 -1
  22. package/dist/src/buf/proto/gen/dxos/echo/metadata_pb.js +1 -1
  23. package/dist/src/buf/proto/gen/dxos/echo/metadata_pb.js.map +1 -1
  24. package/dist/src/buf/proto/gen/dxos/edge/messenger_pb.d.ts +28 -0
  25. package/dist/src/buf/proto/gen/dxos/edge/messenger_pb.d.ts.map +1 -1
  26. package/dist/src/buf/proto/gen/dxos/edge/messenger_pb.js +10 -5
  27. package/dist/src/buf/proto/gen/dxos/edge/messenger_pb.js.map +1 -1
  28. package/dist/src/buf/proto/gen/dxos/google_pb.js +1 -1
  29. package/dist/src/buf/proto/gen/dxos/halo/credentials_pb.d.ts +39 -0
  30. package/dist/src/buf/proto/gen/dxos/halo/credentials_pb.d.ts.map +1 -1
  31. package/dist/src/buf/proto/gen/dxos/halo/credentials_pb.js +27 -2
  32. package/dist/src/buf/proto/gen/dxos/halo/credentials_pb.js.map +1 -1
  33. package/dist/src/buf/proto/gen/dxos/tracing_pb.js +1 -1
  34. package/dist/src/codec.test.js +1 -1
  35. package/dist/src/edge/EdgeFunctionEnv.d.ts +11 -23
  36. package/dist/src/edge/EdgeFunctionEnv.d.ts.map +1 -1
  37. package/dist/src/edge/edge.d.ts +165 -0
  38. package/dist/src/edge/edge.d.ts.map +1 -1
  39. package/dist/src/edge/edge.js +13 -0
  40. package/dist/src/edge/edge.js.map +1 -1
  41. package/dist/src/edge/errors.d.ts +1 -1
  42. package/dist/src/edge/errors.js +1 -1
  43. package/dist/src/edge/index.d.ts +3 -3
  44. package/dist/src/edge/index.js +3 -3
  45. package/dist/src/errors/encoding.d.ts +1 -1
  46. package/dist/src/errors/encoding.js +1 -1
  47. package/dist/src/errors/errors.d.ts +1 -1
  48. package/dist/src/errors/errors.js +1 -1
  49. package/dist/src/errors/errors.test.js +1 -1
  50. package/dist/src/errors/helpers.d.ts +1 -1
  51. package/dist/src/errors/index.d.ts +5 -5
  52. package/dist/src/errors/index.js +5 -5
  53. package/dist/src/index.d.ts +12 -12
  54. package/dist/src/index.d.ts.map +1 -1
  55. package/dist/src/index.js +11 -12
  56. package/dist/src/index.js.map +1 -1
  57. package/dist/src/indexing.test.js +1 -1
  58. package/dist/src/proto/gen/dxos/client/services.d.ts +1008 -973
  59. package/dist/src/proto/gen/dxos/client/services.d.ts.map +1 -1
  60. package/dist/src/proto/gen/dxos/client/services.js +95 -94
  61. package/dist/src/proto/gen/dxos/client/services.js.map +1 -1
  62. package/dist/src/proto/gen/dxos/config.d.ts +0 -5
  63. package/dist/src/proto/gen/dxos/config.d.ts.map +1 -1
  64. package/dist/src/proto/gen/dxos/config.js.map +1 -1
  65. package/dist/src/proto/gen/dxos/devtools/host.d.ts +31 -31
  66. package/dist/src/proto/gen/dxos/devtools/host.d.ts.map +1 -1
  67. package/dist/src/proto/gen/dxos/echo/metadata.d.ts +4 -0
  68. package/dist/src/proto/gen/dxos/echo/metadata.d.ts.map +1 -1
  69. package/dist/src/proto/gen/dxos/echo/metadata.js.map +1 -1
  70. package/dist/src/proto/gen/dxos/edge/messenger.d.ts +24 -0
  71. package/dist/src/proto/gen/dxos/edge/messenger.d.ts.map +1 -1
  72. package/dist/src/proto/gen/dxos/edge/messenger.js.map +1 -1
  73. package/dist/src/proto/gen/dxos/halo/credentials.d.ts +15 -1
  74. package/dist/src/proto/gen/dxos/halo/credentials.d.ts.map +1 -1
  75. package/dist/src/proto/gen/dxos/halo/credentials.js +9 -0
  76. package/dist/src/proto/gen/dxos/halo/credentials.js.map +1 -1
  77. package/dist/src/proto/gen/google/protobuf.d.ts +326 -40
  78. package/dist/src/proto/gen/google/protobuf.d.ts.map +1 -1
  79. package/dist/src/proto/gen/google/protobuf.js +127 -1
  80. package/dist/src/proto/gen/google/protobuf.js.map +1 -1
  81. package/dist/src/proto/gen/index.d.ts +28 -0
  82. package/dist/src/proto/gen/index.d.ts.map +1 -1
  83. package/dist/src/proto/gen/index.js +1 -1
  84. package/dist/src/proto/gen/index.js.map +1 -1
  85. package/dist/src/proto/index.d.ts +2 -2
  86. package/dist/src/proto/index.js +1 -1
  87. package/dist/src/proto/types.d.ts +1 -1
  88. package/dist/src/space-archive.d.ts +60 -1
  89. package/dist/src/space-archive.d.ts.map +1 -1
  90. package/dist/src/space-archive.js +13 -1
  91. package/dist/src/space-archive.js.map +1 -1
  92. package/dist/src/types.d.ts +2 -2
  93. package/dist/tsconfig.tsbuildinfo +1 -1
  94. package/package.json +14 -14
  95. package/src/FeedProtocol.ts +320 -0
  96. package/src/FunctionProtocol.ts +2 -4
  97. package/src/buf/proto/gen/dxos/agent/dashboard_pb.ts +1 -1
  98. package/src/buf/proto/gen/dxos/agent/echo-proxy_pb.ts +1 -1
  99. package/src/buf/proto/gen/dxos/agent/epoch_pb.ts +1 -1
  100. package/src/buf/proto/gen/dxos/agent/functions_pb.ts +1 -1
  101. package/src/buf/proto/gen/dxos/bot_pb.ts +1 -1
  102. package/src/buf/proto/gen/dxos/client/invitation_pb.ts +1 -1
  103. package/src/buf/proto/gen/dxos/client/logging_pb.ts +1 -1
  104. package/src/buf/proto/gen/dxos/client/queue_pb.ts +51 -2
  105. package/src/buf/proto/gen/dxos/client/services_pb.ts +77 -40
  106. package/src/buf/proto/gen/dxos/config_pb.ts +2 -7
  107. package/src/buf/proto/gen/dxos/devtools/diagnostics_pb.ts +1 -1
  108. package/src/buf/proto/gen/dxos/devtools/host_pb.ts +1 -1
  109. package/src/buf/proto/gen/dxos/devtools/swarm_pb.ts +1 -1
  110. package/src/buf/proto/gen/dxos/echo/blob_pb.ts +1 -1
  111. package/src/buf/proto/gen/dxos/echo/feed_pb.ts +1 -1
  112. package/src/buf/proto/gen/dxos/echo/filter_pb.ts +1 -1
  113. package/src/buf/proto/gen/dxos/echo/indexing_pb.ts +1 -1
  114. package/src/buf/proto/gen/dxos/echo/metadata_pb.ts +9 -2
  115. package/src/buf/proto/gen/dxos/echo/model/document_pb.ts +1 -1
  116. package/src/buf/proto/gen/dxos/echo/model/messenger_pb.ts +1 -1
  117. package/src/buf/proto/gen/dxos/echo/model/text_pb.ts +1 -1
  118. package/src/buf/proto/gen/dxos/echo/object_pb.ts +1 -1
  119. package/src/buf/proto/gen/dxos/echo/query_pb.ts +1 -1
  120. package/src/buf/proto/gen/dxos/echo/service_pb.ts +1 -1
  121. package/src/buf/proto/gen/dxos/echo/snapshot_pb.ts +1 -1
  122. package/src/buf/proto/gen/dxos/echo/timeframe_pb.ts +1 -1
  123. package/src/buf/proto/gen/dxos/edge/calls_pb.ts +1 -1
  124. package/src/buf/proto/gen/dxos/edge/messenger_pb.ts +39 -6
  125. package/src/buf/proto/gen/dxos/edge/signal_pb.ts +1 -1
  126. package/src/buf/proto/gen/dxos/error_pb.ts +1 -1
  127. package/src/buf/proto/gen/dxos/field_options_pb.ts +1 -1
  128. package/src/buf/proto/gen/dxos/google_pb.ts +1 -1
  129. package/src/buf/proto/gen/dxos/gravity_pb.ts +1 -1
  130. package/src/buf/proto/gen/dxos/halo/credentials/auth_pb.ts +1 -1
  131. package/src/buf/proto/gen/dxos/halo/credentials/greet_pb.ts +1 -1
  132. package/src/buf/proto/gen/dxos/halo/credentials/identity_pb.ts +1 -1
  133. package/src/buf/proto/gen/dxos/halo/credentials_pb.ts +49 -3
  134. package/src/buf/proto/gen/dxos/halo/invitations_pb.ts +1 -1
  135. package/src/buf/proto/gen/dxos/halo/keyring_pb.ts +1 -1
  136. package/src/buf/proto/gen/dxos/halo/keys_pb.ts +1 -1
  137. package/src/buf/proto/gen/dxos/halo/signed_pb.ts +1 -1
  138. package/src/buf/proto/gen/dxos/iframe_pb.ts +1 -1
  139. package/src/buf/proto/gen/dxos/keys_pb.ts +1 -1
  140. package/src/buf/proto/gen/dxos/mesh/bridge_pb.ts +1 -1
  141. package/src/buf/proto/gen/dxos/mesh/broadcast_pb.ts +1 -1
  142. package/src/buf/proto/gen/dxos/mesh/messaging_pb.ts +1 -1
  143. package/src/buf/proto/gen/dxos/mesh/muxer_pb.ts +1 -1
  144. package/src/buf/proto/gen/dxos/mesh/presence_pb.ts +1 -1
  145. package/src/buf/proto/gen/dxos/mesh/protocol_pb.ts +1 -1
  146. package/src/buf/proto/gen/dxos/mesh/replicator_pb.ts +1 -1
  147. package/src/buf/proto/gen/dxos/mesh/signal_pb.ts +1 -1
  148. package/src/buf/proto/gen/dxos/mesh/swarm_pb.ts +1 -1
  149. package/src/buf/proto/gen/dxos/mesh/teleport/admission-discovery_pb.ts +1 -1
  150. package/src/buf/proto/gen/dxos/mesh/teleport/auth_pb.ts +1 -1
  151. package/src/buf/proto/gen/dxos/mesh/teleport/automerge_pb.ts +1 -1
  152. package/src/buf/proto/gen/dxos/mesh/teleport/blobsync_pb.ts +1 -1
  153. package/src/buf/proto/gen/dxos/mesh/teleport/control_pb.ts +1 -1
  154. package/src/buf/proto/gen/dxos/mesh/teleport/gossip_pb.ts +1 -1
  155. package/src/buf/proto/gen/dxos/mesh/teleport/notarization_pb.ts +1 -1
  156. package/src/buf/proto/gen/dxos/mesh/teleport/replicator_pb.ts +1 -1
  157. package/src/buf/proto/gen/dxos/registry_pb.ts +1 -1
  158. package/src/buf/proto/gen/dxos/rpc_pb.ts +1 -1
  159. package/src/buf/proto/gen/dxos/service/agentmanager_pb.ts +1 -1
  160. package/src/buf/proto/gen/dxos/service/publisher_pb.ts +1 -1
  161. package/src/buf/proto/gen/dxos/service/supervisor_pb.ts +1 -1
  162. package/src/buf/proto/gen/dxos/service/tunnel_pb.ts +1 -1
  163. package/src/buf/proto/gen/dxos/tracing_pb.ts +1 -1
  164. package/src/buf/proto/gen/dxos/type_pb.ts +1 -1
  165. package/src/buf/proto/gen/dxos/value_pb.ts +1 -1
  166. package/src/buf/proto/gen/example/testing/data_pb.ts +1 -1
  167. package/src/buf/proto/gen/example/testing/rpc_pb.ts +1 -1
  168. package/src/codec.test.ts +1 -1
  169. package/src/edge/EdgeFunctionEnv.ts +20 -26
  170. package/src/edge/edge.ts +120 -0
  171. package/src/edge/errors.ts +1 -1
  172. package/src/edge/index.ts +3 -3
  173. package/src/errors/encoding.ts +2 -2
  174. package/src/errors/errors.test.ts +1 -1
  175. package/src/errors/errors.ts +2 -2
  176. package/src/errors/helpers.ts +1 -1
  177. package/src/errors/index.ts +5 -5
  178. package/src/index.ts +12 -14
  179. package/src/indexing.test.ts +1 -1
  180. package/src/proto/dxos/client/queue.proto +11 -0
  181. package/src/proto/dxos/client/services.proto +9 -1
  182. package/src/proto/dxos/config.proto +1 -3
  183. package/src/proto/dxos/echo/metadata.proto +3 -0
  184. package/src/proto/dxos/edge/messenger.proto +10 -0
  185. package/src/proto/dxos/halo/credentials.proto +15 -0
  186. package/src/proto/gen/dxos/client/services.ts +1008 -973
  187. package/src/proto/gen/dxos/config.ts +0 -5
  188. package/src/proto/gen/dxos/devtools/host.ts +31 -31
  189. package/src/proto/gen/dxos/echo/metadata.ts +4 -0
  190. package/src/proto/gen/dxos/edge/messenger.ts +24 -0
  191. package/src/proto/gen/dxos/halo/credentials.ts +15 -1
  192. package/src/proto/gen/google/protobuf.ts +326 -40
  193. package/src/proto/gen/index.ts +29 -1
  194. package/src/proto/index.ts +2 -2
  195. package/src/proto/types.ts +1 -1
  196. package/src/space-archive.ts +70 -1
  197. package/src/types.ts +2 -2
  198. package/dist/src/queue.d.ts +0 -3
  199. package/dist/src/queue.d.ts.map +0 -1
  200. package/dist/src/queue.js +0 -5
  201. package/dist/src/queue.js.map +0 -1
  202. package/src/queue.ts +0 -14
@@ -67,1495 +67,1530 @@ import * as example_testing_rpc from "../../example/testing/rpc.js";
67
67
  import * as google_protobuf from "../../google/protobuf.js";
68
68
  /**
69
69
  * Defined in:
70
- * {@link file://./../../../dxos/client/invitation.proto}
70
+ * {@link file://./../../../dxos/client/queue.proto}
71
71
  */
72
- export interface AdmissionKeypair {
73
- publicKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
72
+ export interface QueueQuery {
73
+ spaceId: string;
74
74
  /**
75
75
  * Options:
76
76
  * - proto3_optional = true
77
77
  */
78
- privateKey?: ReturnType<(typeof substitutions)["dxos.keys.PrivateKey"]["decode"]>;
79
- }
80
- /**
81
- * Runtime state of the space object.
82
- *
83
- * Defined in:
84
- * {@link file://./../../../dxos/client/invitation.proto}
85
- */
86
- export enum SpaceState {
87
- INVALID = 0,
88
- SPACE_INACTIVE = 2,
89
- SPACE_ACTIVE = 6,
90
- SPACE_CLOSED = 1,
91
- SPACE_CONTROL_ONLY = 7,
92
- SPACE_INITIALIZING = 4,
93
- SPACE_READY = 3,
94
- SPACE_ERROR = 5,
95
- SPACE_REQUIRES_MIGRATION = 8
96
- }
97
- /**
98
- * Represents the invitation state passed between client and service.
99
- *
100
- * Defined in:
101
- * {@link file://./../../../dxos/client/invitation.proto}
102
- */
103
- export interface Invitation {
104
- /**
105
- * Local identifier (random).
106
- */
107
- invitationId: string;
108
- /**
109
- * Determines the behavior of the invitation.
110
- */
111
- type: Invitation.Type;
78
+ queuesNamespace?: string;
112
79
  /**
113
- * Kind of access the invitation will grant.
80
+ * Queries the whole space if missing.
114
81
  */
115
- kind: Invitation.Kind;
82
+ queueIds?: string[];
116
83
  /**
117
- * How the invitation is authenticated.
84
+ * Filter items after this cursor. Exclusive.
85
+ *
86
+ * Options:
87
+ * - proto3_optional = true
118
88
  */
119
- authMethod: Invitation.AuthMethod;
89
+ after?: string;
120
90
  /**
121
- * Swarm rendezvous (random).
91
+ * Filter items before this cursor. Exclusive.
92
+ *
93
+ * Options:
94
+ * - proto3_optional = true
122
95
  */
123
- swarmKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
96
+ before?: string;
124
97
  /**
125
- * Local state.
98
+ * Filter items after this position. Inclusive.
99
+ *
100
+ * Options:
101
+ * - proto3_optional = true
126
102
  */
127
- state: Invitation.State;
103
+ beginPosition?: string;
128
104
  /**
129
- * Timeout for guest to complete invitation once connected (ms).
105
+ * Filter items before this position. Exclusive.
130
106
  *
131
107
  * Options:
132
108
  * - proto3_optional = true
133
109
  */
134
- timeout?: number;
110
+ endPosition?: string;
135
111
  /**
136
- * Guest's identity.
137
- *
138
112
  * Options:
139
113
  * - proto3_optional = true
140
114
  */
141
- identityKey?: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
115
+ limit?: number;
142
116
  /**
143
- * Space to join (only present if kind is SPACE).
144
- *
145
117
  * Options:
146
118
  * - proto3_optional = true
147
119
  */
148
- spaceKey?: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
120
+ reverse?: boolean;
121
+ objectIds?: string[];
122
+ }
123
+ /**
124
+ * Defined in:
125
+ * {@link file://./../../../dxos/client/queue.proto}
126
+ */
127
+ export interface QueueQueryResult {
128
+ objects?: ReturnType<(typeof substitutions)["google.protobuf.Struct"]["decode"]>[];
149
129
  /**
150
- * Authentication code created by host (only present if auth_method is SHARED_SECRET).
130
+ * Cursor to query the next items. Can be passed to `after` in query to keep querying.
131
+ */
132
+ nextCursor: string;
133
+ prevCursor: string;
134
+ }
135
+ /**
136
+ * Defined in:
137
+ * {@link file://./../../../dxos/client/queue.proto}
138
+ */
139
+ export interface QueryQueueRequest {
140
+ query: QueueQuery;
141
+ }
142
+ /**
143
+ * Defined in:
144
+ * {@link file://./../../../dxos/client/queue.proto}
145
+ */
146
+ export interface InsertIntoQueueRequest {
147
+ subspaceTag: string;
148
+ spaceId: string;
149
+ queueId: string;
150
+ objects?: ReturnType<(typeof substitutions)["google.protobuf.Struct"]["decode"]>[];
151
+ }
152
+ /**
153
+ * Defined in:
154
+ * {@link file://./../../../dxos/client/queue.proto}
155
+ */
156
+ export interface DeleteFromQueueRequest {
157
+ subspaceTag: string;
158
+ spaceId: string;
159
+ queueId: string;
160
+ objectIds?: string[];
161
+ }
162
+ /**
163
+ * Defined in:
164
+ * {@link file://./../../../dxos/client/queue.proto}
165
+ */
166
+ export interface SyncQueueRequest {
167
+ subspaceTag: string;
168
+ spaceId: string;
169
+ queueId: string;
170
+ /**
171
+ * Whether to push local changes to the server. Defaults to true.
151
172
  *
152
173
  * Options:
153
174
  * - proto3_optional = true
154
175
  */
155
- authCode?: string;
176
+ shouldPush?: boolean;
156
177
  /**
157
- * Path or identifier to navigate to after successful authentication.
178
+ * Whether to pull remote changes from the server. Defaults to true.
158
179
  *
159
180
  * Options:
160
181
  * - proto3_optional = true
161
182
  */
162
- target?: string;
183
+ shouldPull?: boolean;
184
+ }
185
+ /**
186
+ * Defined in:
187
+ * {@link file://./../../../dxos/client/queue.proto}
188
+ */
189
+ export interface QueueService {
190
+ queryQueue: (request: QueryQueueRequest, options?: RequestOptions) => Promise<QueueQueryResult>;
191
+ insertIntoQueue: (request: InsertIntoQueueRequest, options?: RequestOptions) => Promise<void>;
192
+ deleteFromQueue: (request: DeleteFromQueueRequest, options?: RequestOptions) => Promise<void>;
193
+ syncQueue: (request: SyncQueueRequest, options?: RequestOptions) => Promise<void>;
194
+ }
195
+ /**
196
+ * Defined in:
197
+ * {@link file://./../../../dxos/client/services.proto}
198
+ */
199
+ export enum SystemStatus {
200
+ INACTIVE = 0,
201
+ ACTIVE = 1
202
+ }
203
+ /**
204
+ * Defined in:
205
+ * {@link file://./../../../dxos/client/services.proto}
206
+ */
207
+ export interface UpdateStatusRequest {
208
+ status: SystemStatus;
209
+ }
210
+ /**
211
+ * Defined in:
212
+ * {@link file://./../../../dxos/client/services.proto}
213
+ */
214
+ export interface QueryStatusRequest {
163
215
  /**
164
- * Host should resume invitation on startup until timeout.
165
- *
166
216
  * Options:
167
217
  * - proto3_optional = true
168
218
  */
169
- persistent?: boolean;
219
+ interval?: number;
220
+ }
221
+ /**
222
+ * Defined in:
223
+ * {@link file://./../../../dxos/client/services.proto}
224
+ */
225
+ export interface QueryStatusResponse {
226
+ status: SystemStatus;
227
+ }
228
+ /**
229
+ * Defined in:
230
+ * {@link file://./../../../dxos/client/services.proto}
231
+ */
232
+ export interface GetDiagnosticsRequest {
170
233
  /**
171
234
  * Options:
172
235
  * - proto3_optional = true
173
236
  */
174
- created?: ReturnType<(typeof substitutions)["google.protobuf.Timestamp"]["decode"]>;
237
+ keys?: GetDiagnosticsRequest.KEY_OPTION;
238
+ }
239
+ export namespace GetDiagnosticsRequest {
240
+ /**
241
+ * Defined in:
242
+ * {@link file://./../../../dxos/client/services.proto}
243
+ */
244
+ export enum KEY_OPTION {
245
+ NONE = 0,
246
+ TRUNCATE = 1,
247
+ HUMANIZE = 2
248
+ }
249
+ }
250
+ /**
251
+ * Defined in:
252
+ * {@link file://./../../../dxos/client/services.proto}
253
+ */
254
+ export interface GetDiagnosticsResponse {
255
+ timestamp: ReturnType<(typeof substitutions)["google.protobuf.Timestamp"]["decode"]>;
256
+ diagnostics: ReturnType<(typeof substitutions)["google.protobuf.Struct"]["decode"]>;
257
+ }
258
+ /**
259
+ * Defined in:
260
+ * {@link file://./../../../dxos/client/services.proto}
261
+ */
262
+ export interface Platform {
263
+ type: Platform.PLATFORM_TYPE;
175
264
  /**
265
+ * The User-Agent string from a browser
266
+ *
176
267
  * Options:
177
268
  * - proto3_optional = true
178
269
  */
179
- lifetime?: number;
270
+ userAgent?: string;
180
271
  /**
181
- * Whether an invitation can be used multiple times.
272
+ * e.g process.platform from node, e.g. 'darwin', 'linux', 'win32'
182
273
  *
183
274
  * Options:
184
275
  * - proto3_optional = true
185
276
  */
186
- multiUse?: boolean;
277
+ platform?: string;
187
278
  /**
188
- * Guest's keypair required for AuthMethod.KNOWN_PUBLIC_KEY.
279
+ * the Node.JS arch string, e.g. 'arm64', 'x64'
189
280
  *
190
281
  * Options:
191
282
  * - proto3_optional = true
192
283
  */
193
- guestKeypair?: AdmissionKeypair;
284
+ arch?: string;
194
285
  /**
195
- * Present on Type.DELEGATED invitations.
286
+ * the node.js version string
196
287
  *
197
288
  * Options:
198
289
  * - proto3_optional = true
199
290
  */
200
- delegationCredentialId?: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
291
+ runtime?: string;
201
292
  /**
202
- * Role of the admitted member, defaults to ADMIN.
293
+ * the number of seconds the client has been up
203
294
  *
204
295
  * Options:
205
296
  * - proto3_optional = true
206
297
  */
207
- role?: dxos_halo_credentials.SpaceMember.Role;
298
+ uptime?: number;
208
299
  /**
209
- * Id of a the space to join (only present if kind is SPACE).
300
+ * e.g. NodeJS.MemoryUsage, subject to change
210
301
  *
211
302
  * Options:
212
303
  * - proto3_optional = true
213
304
  */
214
- spaceId?: string;
305
+ memory?: ReturnType<(typeof substitutions)["google.protobuf.Struct"]["decode"]>;
215
306
  }
216
- export namespace Invitation {
307
+ export namespace Platform {
217
308
  /**
218
309
  * Defined in:
219
- * {@link file://./../../../dxos/client/invitation.proto}
310
+ * {@link file://./../../../dxos/client/services.proto}
220
311
  */
221
- export enum Type {
222
- INTERACTIVE = 0,
223
- DELEGATED = 1,
224
- MULTIUSE = 2
312
+ export enum PLATFORM_TYPE {
313
+ BROWSER = 0,
314
+ SHARED_WORKER = 1,
315
+ NODE = 2,
316
+ DEDICATED_WORKER = 3
225
317
  }
318
+ }
319
+ /**
320
+ * Defined in:
321
+ * {@link file://./../../../dxos/client/services.proto}
322
+ */
323
+ export interface SystemService {
226
324
  /**
227
- * Defined in:
228
- * {@link file://./../../../dxos/client/invitation.proto}
325
+ * Get the static config of the client.
229
326
  */
230
- export enum Kind {
231
- DEVICE = 0,
232
- SPACE = 1
233
- }
327
+ getConfig: (request: void, options?: RequestOptions) => Promise<dxos_config.Config>;
234
328
  /**
235
- * Defined in:
236
- * {@link file://./../../../dxos/client/invitation.proto}
329
+ * Get the diagnostics snapshot.
237
330
  */
238
- export enum AuthMethod {
239
- NONE = 0,
240
- SHARED_SECRET = 1,
241
- KNOWN_PUBLIC_KEY = 2
242
- }
331
+ getDiagnostics: (request: GetDiagnosticsRequest, options?: RequestOptions) => Promise<GetDiagnosticsResponse>;
243
332
  /**
244
- * Defined in:
245
- * {@link file://./../../../dxos/client/invitation.proto}
333
+ * Update the status of the client. Used to re-activate an inactive client.
246
334
  */
247
- export enum State {
248
- INIT = 0,
249
- CONNECTING = 1,
250
- CONNECTED = 2,
251
- READY_FOR_AUTHENTICATION = 3,
252
- AUTHENTICATING = 4,
253
- SUCCESS = 5,
254
- CANCELLED = 6,
255
- TIMEOUT = 7,
256
- ERROR = 8,
257
- EXPIRED = 9
258
- }
335
+ updateStatus: (request: UpdateStatusRequest, options?: RequestOptions) => Promise<void>;
336
+ /**
337
+ * Stream the status of the client.
338
+ */
339
+ queryStatus: (request: QueryStatusRequest, options?: RequestOptions) => Stream<QueryStatusResponse>;
340
+ /**
341
+ * Reset the client.
342
+ */
343
+ reset: (request: void, options?: RequestOptions) => Promise<void>;
344
+ /**
345
+ * Get platform Information
346
+ */
347
+ getPlatform: (request: void, options?: RequestOptions) => Promise<Platform>;
259
348
  }
260
349
  /**
261
350
  * Defined in:
262
- * {@link file://./../../../dxos/client/logging.proto}
351
+ * {@link file://./../../../dxos/client/services.proto}
263
352
  */
264
- export interface Metrics {
265
- timestamp: ReturnType<(typeof substitutions)["google.protobuf.Timestamp"]["decode"]>;
266
- values?: Metrics.KeyPair[];
353
+ export interface Identity {
354
+ did: string;
355
+ identityKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
356
+ /**
357
+ * Options:
358
+ * - proto3_optional = true
359
+ */
360
+ spaceKey?: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
361
+ /**
362
+ * Options:
363
+ * - proto3_optional = true
364
+ */
365
+ profile?: dxos_halo_credentials.ProfileDocument;
267
366
  }
268
- export namespace Metrics {
367
+ /**
368
+ * Defined in:
369
+ * {@link file://./../../../dxos/client/services.proto}
370
+ */
371
+ export interface RequestRecoveryChallengeResponse {
372
+ deviceKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
373
+ controlFeedKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
374
+ challenge: string;
375
+ }
376
+ /**
377
+ * Defined in:
378
+ * {@link file://./../../../dxos/client/services.proto}
379
+ */
380
+ export interface RecoverIdentityRequest {
381
+ recoveryCode?: string;
382
+ external?: RecoverIdentityRequest.ExternalSignature;
383
+ token?: string;
384
+ }
385
+ export namespace RecoverIdentityRequest {
269
386
  /**
270
387
  * Defined in:
271
- * {@link file://./../../../dxos/client/logging.proto}
388
+ * {@link file://./../../../dxos/client/services.proto}
272
389
  */
273
- export interface KeyPair {
274
- /**
275
- * Options:
276
- * - proto3_optional = true
277
- */
278
- key?: string;
390
+ export interface ExternalSignature {
391
+ lookupKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
392
+ deviceKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
393
+ controlFeedKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
394
+ signature: Uint8Array;
279
395
  /**
280
396
  * Options:
281
397
  * - proto3_optional = true
282
398
  */
283
- value?: dxos_value.Value;
399
+ clientDataJson?: Uint8Array;
284
400
  /**
285
401
  * Options:
286
402
  * - proto3_optional = true
287
403
  */
288
- stats?: dxos_value.Stats;
404
+ authenticatorData?: Uint8Array;
289
405
  }
290
406
  }
291
407
  /**
292
408
  * Defined in:
293
- * {@link file://./../../../dxos/client/logging.proto}
409
+ * {@link file://./../../../dxos/client/services.proto}
294
410
  */
295
- export interface ControlMetricsRequest {
411
+ export interface RecoveryCredentialData {
296
412
  /**
297
- * Options:
298
- * - proto3_optional = true
413
+ * Recovery key used to validate recovery challenge signature.
299
414
  */
300
- reset?: boolean;
415
+ recoveryKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
301
416
  /**
302
- * Options:
303
- * - proto3_optional = true
417
+ * Public key used to identify the recovery key.
304
418
  */
305
- record?: boolean;
419
+ lookupKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
420
+ /**
421
+ * Algorithm used to generate the recovery key.
422
+ */
423
+ algorithm: string;
306
424
  }
307
425
  /**
308
426
  * Defined in:
309
- * {@link file://./../../../dxos/client/logging.proto}
427
+ * {@link file://./../../../dxos/client/services.proto}
310
428
  */
311
- export interface ControlMetricsResponse {
429
+ export interface CreateRecoveryCredentialRequest {
312
430
  /**
431
+ * If not provided, a new key will be generated.
432
+ *
313
433
  * Options:
314
434
  * - proto3_optional = true
315
435
  */
316
- recording?: boolean;
436
+ data?: RecoveryCredentialData;
317
437
  }
318
438
  /**
319
439
  * Defined in:
320
- * {@link file://./../../../dxos/client/logging.proto}
440
+ * {@link file://./../../../dxos/client/services.proto}
321
441
  */
322
- export interface QueryMetricsRequest {
442
+ export interface CreateRecoveryCredentialResponse {
323
443
  /**
324
444
  * Options:
325
445
  * - proto3_optional = true
326
446
  */
327
- interval?: number;
328
- }
329
- /**
330
- * Defined in:
331
- * {@link file://./../../../dxos/client/logging.proto}
332
- */
333
- export interface QueryMetricsResponse {
334
- timestamp: ReturnType<(typeof substitutions)["google.protobuf.Timestamp"]["decode"]>;
335
- metrics: Metrics;
447
+ recoveryCode?: string;
336
448
  }
337
449
  /**
338
450
  * Defined in:
339
- * {@link file://./../../../dxos/client/logging.proto}
451
+ * {@link file://./../../../dxos/client/services.proto}
340
452
  */
341
- export enum LogLevel {
342
- NONE = 0,
343
- TRACE = 5,
344
- DEBUG = 10,
345
- VERBOSE = 11,
346
- INFO = 12,
347
- WARN = 13,
348
- ERROR = 14
453
+ export interface QueryIdentityResponse {
454
+ /**
455
+ * Options:
456
+ * - proto3_optional = true
457
+ */
458
+ identity?: Identity;
349
459
  }
350
460
  /**
351
461
  * Defined in:
352
- * {@link file://./../../../dxos/client/logging.proto}
462
+ * {@link file://./../../../dxos/client/services.proto}
353
463
  */
354
- export interface QueryLogsRequest {
355
- filters?: QueryLogsRequest.Filter[];
464
+ export interface SignPresentationRequest {
465
+ presentation: dxos_halo_credentials.Presentation;
356
466
  /**
357
467
  * Options:
358
468
  * - proto3_optional = true
359
469
  */
360
- options?: QueryLogsRequest.MatchingOptions;
361
- }
362
- export namespace QueryLogsRequest {
363
- /**
364
- * Defined in:
365
- * {@link file://./../../../dxos/client/logging.proto}
366
- */
367
- export enum MatchingOptions {
368
- NONE = 0,
369
- INCLUSIVE = 1,
370
- EXPLICIT = 2
371
- }
372
- /**
373
- * Defined in:
374
- * {@link file://./../../../dxos/client/logging.proto}
375
- */
376
- export interface Filter {
377
- level: LogLevel;
378
- /**
379
- * Options:
380
- * - proto3_optional = true
381
- */
382
- pattern?: string;
383
- }
470
+ nonce?: Uint8Array;
384
471
  }
385
472
  /**
386
473
  * Defined in:
387
- * {@link file://./../../../dxos/client/logging.proto}
474
+ * {@link file://./../../../dxos/client/services.proto}
388
475
  */
389
- export interface LogEntry {
390
- level: LogLevel;
391
- message: string;
476
+ export interface CreateIdentityRequest {
392
477
  /**
393
478
  * Options:
394
479
  * - proto3_optional = true
395
480
  */
396
- context?: ReturnType<(typeof substitutions)["google.protobuf.Struct"]["decode"]>;
481
+ profile?: dxos_halo_credentials.ProfileDocument;
397
482
  /**
398
483
  * Options:
399
484
  * - proto3_optional = true
400
485
  */
401
- meta?: LogEntry.Meta;
486
+ deviceProfile?: dxos_halo_credentials.DeviceProfileDocument;
487
+ }
488
+ /**
489
+ * Defined in:
490
+ * {@link file://./../../../dxos/client/services.proto}
491
+ */
492
+ export interface IdentityService {
493
+ createIdentity: (request: CreateIdentityRequest, options?: RequestOptions) => Promise<Identity>;
494
+ requestRecoveryChallenge: (request: void, options?: RequestOptions) => Promise<RequestRecoveryChallengeResponse>;
495
+ recoverIdentity: (request: RecoverIdentityRequest, options?: RequestOptions) => Promise<Identity>;
496
+ createRecoveryCredential: (request: CreateRecoveryCredentialRequest, options?: RequestOptions) => Promise<CreateRecoveryCredentialResponse>;
497
+ queryIdentity: (request: void, options?: RequestOptions) => Stream<QueryIdentityResponse>;
498
+ updateProfile: (request: dxos_halo_credentials.ProfileDocument, options?: RequestOptions) => Promise<Identity>;
499
+ signPresentation: (request: SignPresentationRequest, options?: RequestOptions) => Promise<dxos_halo_credentials.Presentation>;
500
+ createAuthCredential: (request: void, options?: RequestOptions) => Promise<dxos_halo_credentials.Credential>;
501
+ }
502
+ /**
503
+ * Defined in:
504
+ * {@link file://./../../../dxos/client/services.proto}
505
+ */
506
+ export enum DeviceKind {
507
+ CURRENT = 0,
508
+ TRUSTED = 1
509
+ }
510
+ /**
511
+ * Defined in:
512
+ * {@link file://./../../../dxos/client/services.proto}
513
+ */
514
+ export interface Device {
515
+ deviceKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
516
+ kind: DeviceKind;
402
517
  /**
403
518
  * Options:
404
519
  * - proto3_optional = true
405
520
  */
406
- error?: dxos_error.Error;
407
- timestamp: ReturnType<(typeof substitutions)["google.protobuf.Timestamp"]["decode"]>;
521
+ profile?: dxos_halo_credentials.DeviceProfileDocument;
522
+ presence: Device.PresenceState;
408
523
  }
409
- export namespace LogEntry {
524
+ export namespace Device {
410
525
  /**
411
526
  * Defined in:
412
- * {@link file://./../../../dxos/client/logging.proto}
527
+ * {@link file://./../../../dxos/client/services.proto}
413
528
  */
414
- export interface Meta {
415
- file: string;
416
- line: number;
417
- /**
418
- * Options:
419
- * - proto3_optional = true
420
- */
421
- scope?: ReturnType<(typeof substitutions)["google.protobuf.Struct"]["decode"]>;
422
- /**
423
- * Options:
424
- * - proto3_optional = true
425
- */
426
- resourceId?: number;
529
+ export enum PresenceState {
530
+ OFFLINE = 0,
531
+ ONLINE = 1,
532
+ REMOVED = 2
427
533
  }
428
534
  }
429
535
  /**
430
536
  * Defined in:
431
- * {@link file://./../../../dxos/client/logging.proto}
537
+ * {@link file://./../../../dxos/client/services.proto}
432
538
  */
433
- export interface LoggingService {
434
- controlMetrics: (request: ControlMetricsRequest, options?: RequestOptions) => Promise<ControlMetricsResponse>;
435
- queryMetrics: (request: QueryMetricsRequest, options?: RequestOptions) => Stream<QueryMetricsResponse>;
436
- queryLogs: (request: QueryLogsRequest, options?: RequestOptions) => Stream<LogEntry>;
539
+ export interface QueryDevicesResponse {
540
+ devices?: Device[];
437
541
  }
438
542
  /**
439
543
  * Defined in:
440
- * {@link file://./../../../dxos/client/queue.proto}
544
+ * {@link file://./../../../dxos/client/services.proto}
441
545
  */
442
- export interface QueueQuery {
443
- spaceId: string;
444
- /**
445
- * Options:
446
- * - proto3_optional = true
447
- */
448
- queuesNamespace?: string;
449
- /**
450
- * Queries the whole space if missing.
451
- */
452
- queueIds?: string[];
453
- /**
454
- * Filter items after this cursor. Exclusive.
455
- *
456
- * Options:
457
- * - proto3_optional = true
458
- */
459
- after?: string;
460
- /**
461
- * Filter items before this cursor. Exclusive.
462
- *
463
- * Options:
464
- * - proto3_optional = true
465
- */
466
- before?: string;
467
- /**
468
- * Filter items after this position. Inclusive.
469
- *
470
- * Options:
471
- * - proto3_optional = true
472
- */
473
- beginPosition?: string;
474
- /**
475
- * Filter items before this position. Exclusive.
476
- *
477
- * Options:
478
- * - proto3_optional = true
479
- */
480
- endPosition?: string;
481
- /**
482
- * Options:
483
- * - proto3_optional = true
484
- */
485
- limit?: number;
486
- /**
487
- * Options:
488
- * - proto3_optional = true
489
- */
490
- reverse?: boolean;
491
- objectIds?: string[];
546
+ export interface DevicesService {
547
+ updateDevice: (request: dxos_halo_credentials.DeviceProfileDocument, options?: RequestOptions) => Promise<Device>;
548
+ queryDevices: (request: void, options?: RequestOptions) => Stream<QueryDevicesResponse>;
492
549
  }
493
550
  /**
494
551
  * Defined in:
495
- * {@link file://./../../../dxos/client/queue.proto}
552
+ * {@link file://./../../../dxos/client/services.proto}
496
553
  */
497
- export interface QueueQueryResult {
498
- objects?: ReturnType<(typeof substitutions)["google.protobuf.Struct"]["decode"]>[];
554
+ export interface Contact {
555
+ identityKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
499
556
  /**
500
- * Cursor to query the next items. Can be passed to `after` in query to keep querying.
557
+ * Options:
558
+ * - proto3_optional = true
501
559
  */
502
- nextCursor: string;
503
- prevCursor: string;
504
- }
505
- /**
506
- * Defined in:
507
- * {@link file://./../../../dxos/client/queue.proto}
508
- */
509
- export interface QueryQueueRequest {
510
- query: QueueQuery;
511
- }
512
- /**
513
- * Defined in:
514
- * {@link file://./../../../dxos/client/queue.proto}
515
- */
516
- export interface InsertIntoQueueRequest {
517
- subspaceTag: string;
518
- spaceId: string;
519
- queueId: string;
520
- objects?: ReturnType<(typeof substitutions)["google.protobuf.Struct"]["decode"]>[];
521
- }
522
- /**
523
- * Defined in:
524
- * {@link file://./../../../dxos/client/queue.proto}
525
- */
526
- export interface DeleteFromQueueRequest {
527
- subspaceTag: string;
528
- spaceId: string;
529
- queueId: string;
530
- objectIds?: string[];
531
- }
532
- /**
533
- * Defined in:
534
- * {@link file://./../../../dxos/client/queue.proto}
535
- */
536
- export interface QueueService {
537
- queryQueue: (request: QueryQueueRequest, options?: RequestOptions) => Promise<QueueQueryResult>;
538
- insertIntoQueue: (request: InsertIntoQueueRequest, options?: RequestOptions) => Promise<void>;
539
- deleteFromQueue: (request: DeleteFromQueueRequest, options?: RequestOptions) => Promise<void>;
540
- }
541
- /**
542
- * Defined in:
543
- * {@link file://./../../../dxos/client/services.proto}
544
- */
545
- export enum SystemStatus {
546
- INACTIVE = 0,
547
- ACTIVE = 1
548
- }
549
- /**
550
- * Defined in:
551
- * {@link file://./../../../dxos/client/services.proto}
552
- */
553
- export interface UpdateStatusRequest {
554
- status: SystemStatus;
560
+ profile?: dxos_halo_credentials.ProfileDocument;
561
+ commonSpaces?: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>[];
555
562
  }
556
563
  /**
557
564
  * Defined in:
558
565
  * {@link file://./../../../dxos/client/services.proto}
559
566
  */
560
- export interface QueryStatusRequest {
561
- /**
562
- * Options:
563
- * - proto3_optional = true
564
- */
565
- interval?: number;
567
+ export interface ContactBook {
568
+ contacts?: Contact[];
566
569
  }
567
570
  /**
568
571
  * Defined in:
569
572
  * {@link file://./../../../dxos/client/services.proto}
570
573
  */
571
- export interface QueryStatusResponse {
572
- status: SystemStatus;
574
+ export interface ContactsService {
575
+ getContacts: (request: void, options?: RequestOptions) => Promise<ContactBook>;
576
+ queryContacts: (request: void, options?: RequestOptions) => Stream<ContactBook>;
573
577
  }
574
578
  /**
575
579
  * Defined in:
576
580
  * {@link file://./../../../dxos/client/services.proto}
577
581
  */
578
- export interface GetDiagnosticsRequest {
579
- /**
580
- * Options:
581
- * - proto3_optional = true
582
- */
583
- keys?: GetDiagnosticsRequest.KEY_OPTION;
582
+ export interface SpaceMember {
583
+ identity: Identity;
584
+ presence: SpaceMember.PresenceState;
585
+ peerStates?: dxos_mesh_presence.PeerState[];
586
+ role: dxos_halo_credentials.SpaceMember.Role;
584
587
  }
585
- export namespace GetDiagnosticsRequest {
588
+ export namespace SpaceMember {
586
589
  /**
587
590
  * Defined in:
588
591
  * {@link file://./../../../dxos/client/services.proto}
589
592
  */
590
- export enum KEY_OPTION {
591
- NONE = 0,
592
- TRUNCATE = 1,
593
- HUMANIZE = 2
593
+ export enum PresenceState {
594
+ OFFLINE = 0,
595
+ ONLINE = 1
594
596
  }
595
597
  }
596
598
  /**
597
599
  * Defined in:
598
600
  * {@link file://./../../../dxos/client/services.proto}
599
601
  */
600
- export interface GetDiagnosticsResponse {
601
- timestamp: ReturnType<(typeof substitutions)["google.protobuf.Timestamp"]["decode"]>;
602
- diagnostics: ReturnType<(typeof substitutions)["google.protobuf.Struct"]["decode"]>;
603
- }
604
- /**
605
- * Defined in:
606
- * {@link file://./../../../dxos/client/services.proto}
607
- */
608
- export interface Platform {
609
- type: Platform.PLATFORM_TYPE;
610
- /**
611
- * The User-Agent string from a browser
612
- *
613
- * Options:
614
- * - proto3_optional = true
615
- */
616
- userAgent?: string;
602
+ export interface Space {
603
+ id: string;
604
+ spaceKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
605
+ state: SpaceState;
617
606
  /**
618
- * e.g process.platform from node, e.g. 'darwin', 'linux', 'win32'
619
- *
620
607
  * Options:
621
608
  * - proto3_optional = true
622
609
  */
623
- platform?: string;
610
+ pipeline?: Space.PipelineState;
624
611
  /**
625
- * the Node.JS arch string, e.g. 'arm64', 'x64'
626
- *
627
612
  * Options:
628
613
  * - proto3_optional = true
629
614
  */
630
- arch?: string;
615
+ error?: dxos_error.Error;
631
616
  /**
632
- * the node.js version string
633
- *
634
617
  * Options:
635
618
  * - proto3_optional = true
636
619
  */
637
- runtime?: string;
620
+ edgeReplication?: dxos_echo_metadata.EdgeReplicationSetting;
621
+ tags?: string[];
622
+ membershipPolicy: dxos_halo_credentials.MembershipPolicy;
623
+ members?: SpaceMember[];
638
624
  /**
639
- * the number of seconds the client has been up
640
- *
641
625
  * Options:
642
626
  * - proto3_optional = true
643
627
  */
644
- uptime?: number;
628
+ creator?: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
645
629
  /**
646
- * e.g. NodeJS.MemoryUsage, subject to change
647
- *
648
630
  * Options:
649
631
  * - proto3_optional = true
650
632
  */
651
- memory?: ReturnType<(typeof substitutions)["google.protobuf.Struct"]["decode"]>;
633
+ cache?: dxos_echo_metadata.SpaceCache;
634
+ metrics: Space.Metrics;
652
635
  }
653
- export namespace Platform {
636
+ export namespace Space {
654
637
  /**
655
638
  * Defined in:
656
639
  * {@link file://./../../../dxos/client/services.proto}
657
640
  */
658
- export enum PLATFORM_TYPE {
659
- BROWSER = 0,
660
- SHARED_WORKER = 1,
661
- NODE = 2
641
+ export interface Metrics {
642
+ /**
643
+ * Options:
644
+ * - proto3_optional = true
645
+ */
646
+ open?: ReturnType<(typeof substitutions)["google.protobuf.Timestamp"]["decode"]>;
647
+ /**
648
+ * Options:
649
+ * - proto3_optional = true
650
+ */
651
+ pipelineInitBegin?: ReturnType<(typeof substitutions)["google.protobuf.Timestamp"]["decode"]>;
652
+ /**
653
+ * Options:
654
+ * - proto3_optional = true
655
+ */
656
+ controlPipelineReady?: ReturnType<(typeof substitutions)["google.protobuf.Timestamp"]["decode"]>;
657
+ /**
658
+ * Options:
659
+ * - proto3_optional = true
660
+ */
661
+ dataPipelineOpen?: ReturnType<(typeof substitutions)["google.protobuf.Timestamp"]["decode"]>;
662
+ /**
663
+ * Options:
664
+ * - proto3_optional = true
665
+ */
666
+ dataPipelineReady?: ReturnType<(typeof substitutions)["google.protobuf.Timestamp"]["decode"]>;
667
+ /**
668
+ * Options:
669
+ * - proto3_optional = true
670
+ */
671
+ ready?: ReturnType<(typeof substitutions)["google.protobuf.Timestamp"]["decode"]>;
662
672
  }
663
- }
664
- /**
665
- * Defined in:
666
- * {@link file://./../../../dxos/client/services.proto}
667
- */
668
- export interface SystemService {
669
- /**
670
- * Get the static config of the client.
671
- */
672
- getConfig: (request: void, options?: RequestOptions) => Promise<dxos_config.Config>;
673
- /**
674
- * Get the diagnostics snapshot.
675
- */
676
- getDiagnostics: (request: GetDiagnosticsRequest, options?: RequestOptions) => Promise<GetDiagnosticsResponse>;
677
- /**
678
- * Update the status of the client. Used to re-activate an inactive client.
679
- */
680
- updateStatus: (request: UpdateStatusRequest, options?: RequestOptions) => Promise<void>;
681
- /**
682
- * Stream the status of the client.
683
- */
684
- queryStatus: (request: QueryStatusRequest, options?: RequestOptions) => Stream<QueryStatusResponse>;
685
- /**
686
- * Reset the client.
687
- */
688
- reset: (request: void, options?: RequestOptions) => Promise<void>;
689
673
  /**
690
- * Get platform Information
674
+ * Defined in:
675
+ * {@link file://./../../../dxos/client/services.proto}
691
676
  */
692
- getPlatform: (request: void, options?: RequestOptions) => Promise<Platform>;
693
- }
677
+ export interface PipelineState {
678
+ /**
679
+ * Options:
680
+ * - proto3_optional = true
681
+ */
682
+ controlFeedKey?: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
683
+ /**
684
+ * Options:
685
+ * - proto3_optional = true
686
+ */
687
+ dataFeedKey?: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
688
+ /**
689
+ * TODO(burdon): Normalize _key suffix.
690
+ */
691
+ controlFeeds?: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>[];
692
+ dataFeeds?: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>[];
693
+ /**
694
+ * Last processed epoch. Might now have been applied yet.
695
+ *
696
+ * Options:
697
+ * - proto3_optional = true
698
+ */
699
+ currentEpoch?: dxos_halo_credentials.Credential;
700
+ /**
701
+ * Epoch that is currently applied.
702
+ *
703
+ * Options:
704
+ * - proto3_optional = true
705
+ */
706
+ appliedEpoch?: dxos_halo_credentials.Credential;
707
+ /**
708
+ * Mutations already processed.
709
+ *
710
+ * Options:
711
+ * - proto3_optional = true
712
+ */
713
+ currentControlTimeframe?: ReturnType<(typeof substitutions)["dxos.echo.timeframe.TimeframeVector"]["decode"]>;
714
+ /**
715
+ * Minimum timeframe to consider the state to be up-to-date.
716
+ *
717
+ * Options:
718
+ * - proto3_optional = true
719
+ */
720
+ targetControlTimeframe?: ReturnType<(typeof substitutions)["dxos.echo.timeframe.TimeframeVector"]["decode"]>;
721
+ /**
722
+ * All mutations stored in feeds.
723
+ *
724
+ * Options:
725
+ * - proto3_optional = true
726
+ */
727
+ totalControlTimeframe?: ReturnType<(typeof substitutions)["dxos.echo.timeframe.TimeframeVector"]["decode"]>;
728
+ /**
729
+ * All mutations known to exist on the network.
730
+ *
731
+ * Options:
732
+ * - proto3_optional = true
733
+ */
734
+ knownControlTimeframe?: ReturnType<(typeof substitutions)["dxos.echo.timeframe.TimeframeVector"]["decode"]>;
735
+ /**
736
+ * Start timeframe of the pipeline.
737
+ *
738
+ * Options:
739
+ * - proto3_optional = true
740
+ */
741
+ startDataTimeframe?: ReturnType<(typeof substitutions)["dxos.echo.timeframe.TimeframeVector"]["decode"]>;
742
+ /**
743
+ * Mutations already processed.
744
+ *
745
+ * Options:
746
+ * - proto3_optional = true
747
+ */
748
+ currentDataTimeframe?: ReturnType<(typeof substitutions)["dxos.echo.timeframe.TimeframeVector"]["decode"]>;
749
+ /**
750
+ * Minimum timeframe to consider the state to be up-to-date.
751
+ *
752
+ * Options:
753
+ * - proto3_optional = true
754
+ */
755
+ targetDataTimeframe?: ReturnType<(typeof substitutions)["dxos.echo.timeframe.TimeframeVector"]["decode"]>;
756
+ /**
757
+ * All mutations stored in feeds.
758
+ *
759
+ * Options:
760
+ * - proto3_optional = true
761
+ */
762
+ totalDataTimeframe?: ReturnType<(typeof substitutions)["dxos.echo.timeframe.TimeframeVector"]["decode"]>;
763
+ /**
764
+ * All mutations known to exist on the network.
765
+ *
766
+ * Options:
767
+ * - proto3_optional = true
768
+ */
769
+ knownDataTimeframe?: ReturnType<(typeof substitutions)["dxos.echo.timeframe.TimeframeVector"]["decode"]>;
770
+ /**
771
+ * URL of the current space root automerge document.
772
+ *
773
+ * Options:
774
+ * - proto3_optional = true
775
+ */
776
+ spaceRootUrl?: string;
777
+ }
778
+ }
694
779
  /**
695
780
  * Defined in:
696
781
  * {@link file://./../../../dxos/client/services.proto}
697
782
  */
698
- export interface Identity {
699
- did: string;
700
- identityKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
783
+ export interface CreateSpaceRequest {
784
+ tags?: string[];
785
+ membershipPolicy: dxos_halo_credentials.MembershipPolicy;
786
+ }
787
+ /**
788
+ * Defined in:
789
+ * {@link file://./../../../dxos/client/services.proto}
790
+ */
791
+ export interface UpdateSpaceRequest {
792
+ spaceKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
701
793
  /**
794
+ * Allowed values: ACTIVE, INACTIVE.
795
+ *
702
796
  * Options:
703
797
  * - proto3_optional = true
704
798
  */
705
- spaceKey?: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
799
+ state?: SpaceState;
706
800
  /**
707
801
  * Options:
708
802
  * - proto3_optional = true
709
803
  */
710
- profile?: dxos_halo_credentials.ProfileDocument;
804
+ edgeReplication?: dxos_echo_metadata.EdgeReplicationSetting;
711
805
  }
712
806
  /**
713
807
  * Defined in:
714
808
  * {@link file://./../../../dxos/client/services.proto}
715
809
  */
716
- export interface RequestRecoveryChallengeResponse {
717
- deviceKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
718
- controlFeedKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
719
- challenge: string;
810
+ export interface QuerySpacesResponse {
811
+ spaces?: Space[];
720
812
  }
721
813
  /**
722
814
  * Defined in:
723
815
  * {@link file://./../../../dxos/client/services.proto}
724
816
  */
725
- export interface RecoverIdentityRequest {
726
- recoveryCode?: string;
727
- external?: RecoverIdentityRequest.ExternalSignature;
728
- token?: string;
729
- }
730
- export namespace RecoverIdentityRequest {
731
- /**
732
- * Defined in:
733
- * {@link file://./../../../dxos/client/services.proto}
734
- */
735
- export interface ExternalSignature {
736
- lookupKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
737
- deviceKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
738
- controlFeedKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
739
- signature: Uint8Array;
740
- /**
741
- * Options:
742
- * - proto3_optional = true
743
- */
744
- clientDataJson?: Uint8Array;
745
- /**
746
- * Options:
747
- * - proto3_optional = true
748
- */
749
- authenticatorData?: Uint8Array;
750
- }
817
+ export interface PostMessageRequest {
818
+ spaceKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
819
+ channel: string;
820
+ message: ReturnType<(typeof substitutions)["google.protobuf.Any"]["decode"]>;
751
821
  }
752
822
  /**
753
823
  * Defined in:
754
824
  * {@link file://./../../../dxos/client/services.proto}
755
825
  */
756
- export interface RecoveryCredentialData {
757
- /**
758
- * Recovery key used to validate recovery challenge signature.
759
- */
760
- recoveryKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
761
- /**
762
- * Public key used to identify the recovery key.
763
- */
764
- lookupKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
765
- /**
766
- * Algorithm used to generate the recovery key.
767
- */
768
- algorithm: string;
826
+ export interface SubscribeMessagesRequest {
827
+ spaceKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
828
+ channel: string;
769
829
  }
770
830
  /**
771
831
  * Defined in:
772
832
  * {@link file://./../../../dxos/client/services.proto}
773
833
  */
774
- export interface CreateRecoveryCredentialRequest {
775
- /**
776
- * If not provided, a new key will be generated.
777
- *
778
- * Options:
779
- * - proto3_optional = true
780
- */
781
- data?: RecoveryCredentialData;
834
+ export interface WriteCredentialsRequest {
835
+ spaceKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
836
+ credentials?: dxos_halo_credentials.Credential[];
782
837
  }
783
838
  /**
784
839
  * Defined in:
785
840
  * {@link file://./../../../dxos/client/services.proto}
786
841
  */
787
- export interface CreateRecoveryCredentialResponse {
842
+ export interface QueryCredentialsRequest {
843
+ spaceKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
788
844
  /**
789
845
  * Options:
790
846
  * - proto3_optional = true
791
847
  */
792
- recoveryCode?: string;
848
+ noTail?: boolean;
793
849
  }
794
850
  /**
795
851
  * Defined in:
796
852
  * {@link file://./../../../dxos/client/services.proto}
797
853
  */
798
- export interface QueryIdentityResponse {
854
+ export interface CreateEpochRequest {
855
+ spaceKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
799
856
  /**
800
857
  * Options:
801
858
  * - proto3_optional = true
802
859
  */
803
- identity?: Identity;
804
- }
805
- /**
806
- * Defined in:
807
- * {@link file://./../../../dxos/client/services.proto}
808
- */
809
- export interface SignPresentationRequest {
810
- presentation: dxos_halo_credentials.Presentation;
860
+ migration?: CreateEpochRequest.Migration;
811
861
  /**
862
+ * For REPLACE_AUTOMERGE_ROOT migration.
863
+ *
812
864
  * Options:
813
865
  * - proto3_optional = true
814
866
  */
815
- nonce?: Uint8Array;
867
+ automergeRootUrl?: string;
868
+ }
869
+ export namespace CreateEpochRequest {
870
+ /**
871
+ * Defined in:
872
+ * {@link file://./../../../dxos/client/services.proto}
873
+ */
874
+ export enum Migration {
875
+ NONE = 0,
876
+ INIT_AUTOMERGE = 1,
877
+ PRUNE_AUTOMERGE_ROOT_HISTORY = 2,
878
+ FRAGMENT_AUTOMERGE_ROOT = 3,
879
+ REPLACE_AUTOMERGE_ROOT = 4,
880
+ MIGRATE_REFERENCES_TO_DXN = 5
881
+ }
816
882
  }
817
883
  /**
818
884
  * Defined in:
819
885
  * {@link file://./../../../dxos/client/services.proto}
820
886
  */
821
- export interface CreateIdentityRequest {
887
+ export interface CreateEpochResponse {
822
888
  /**
889
+ * Credential of the new epoch.
890
+ *
823
891
  * Options:
824
892
  * - proto3_optional = true
825
893
  */
826
- profile?: dxos_halo_credentials.ProfileDocument;
894
+ epochCredential?: dxos_halo_credentials.Credential;
827
895
  /**
896
+ * Control pipeline timeframe.
897
+ *
828
898
  * Options:
829
899
  * - proto3_optional = true
830
900
  */
831
- deviceProfile?: dxos_halo_credentials.DeviceProfileDocument;
901
+ controlTimeframe?: ReturnType<(typeof substitutions)["dxos.echo.timeframe.TimeframeVector"]["decode"]>;
832
902
  }
833
903
  /**
834
904
  * Defined in:
835
905
  * {@link file://./../../../dxos/client/services.proto}
836
906
  */
837
- export interface IdentityService {
838
- createIdentity: (request: CreateIdentityRequest, options?: RequestOptions) => Promise<Identity>;
839
- requestRecoveryChallenge: (request: void, options?: RequestOptions) => Promise<RequestRecoveryChallengeResponse>;
840
- recoverIdentity: (request: RecoverIdentityRequest, options?: RequestOptions) => Promise<Identity>;
841
- createRecoveryCredential: (request: CreateRecoveryCredentialRequest, options?: RequestOptions) => Promise<CreateRecoveryCredentialResponse>;
842
- queryIdentity: (request: void, options?: RequestOptions) => Stream<QueryIdentityResponse>;
843
- updateProfile: (request: dxos_halo_credentials.ProfileDocument, options?: RequestOptions) => Promise<Identity>;
844
- signPresentation: (request: SignPresentationRequest, options?: RequestOptions) => Promise<dxos_halo_credentials.Presentation>;
845
- createAuthCredential: (request: void, options?: RequestOptions) => Promise<dxos_halo_credentials.Credential>;
907
+ export interface UpdateMemberRoleRequest {
908
+ spaceKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
909
+ memberKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
910
+ newRole: dxos_halo_credentials.SpaceMember.Role;
846
911
  }
847
912
  /**
848
913
  * Defined in:
849
914
  * {@link file://./../../../dxos/client/services.proto}
850
915
  */
851
- export enum DeviceKind {
852
- CURRENT = 0,
853
- TRUSTED = 1
916
+ export interface AdmitContactRequest {
917
+ contact: Contact;
918
+ role: dxos_halo_credentials.SpaceMember.Role;
919
+ spaceKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
854
920
  }
855
921
  /**
856
922
  * Defined in:
857
923
  * {@link file://./../../../dxos/client/services.proto}
858
924
  */
859
- export interface Device {
860
- deviceKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
861
- kind: DeviceKind;
862
- /**
863
- * Options:
864
- * - proto3_optional = true
865
- */
866
- profile?: dxos_halo_credentials.DeviceProfileDocument;
867
- presence: Device.PresenceState;
868
- }
869
- export namespace Device {
870
- /**
871
- * Defined in:
872
- * {@link file://./../../../dxos/client/services.proto}
873
- */
874
- export enum PresenceState {
875
- OFFLINE = 0,
876
- ONLINE = 1,
877
- REMOVED = 2
878
- }
925
+ export interface ContactAdmission {
926
+ credential: dxos_halo_credentials.Credential;
879
927
  }
880
928
  /**
881
929
  * Defined in:
882
930
  * {@link file://./../../../dxos/client/services.proto}
883
931
  */
884
- export interface QueryDevicesResponse {
885
- devices?: Device[];
932
+ export interface JoinSpaceResponse {
933
+ space: Space;
886
934
  }
887
935
  /**
888
936
  * Defined in:
889
937
  * {@link file://./../../../dxos/client/services.proto}
890
938
  */
891
- export interface DevicesService {
892
- updateDevice: (request: dxos_halo_credentials.DeviceProfileDocument, options?: RequestOptions) => Promise<Device>;
893
- queryDevices: (request: void, options?: RequestOptions) => Stream<QueryDevicesResponse>;
939
+ export interface JoinBySpaceKeyRequest {
940
+ spaceKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
894
941
  }
895
942
  /**
896
943
  * Defined in:
897
944
  * {@link file://./../../../dxos/client/services.proto}
898
945
  */
899
- export interface Contact {
900
- identityKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
901
- /**
902
- * Options:
903
- * - proto3_optional = true
904
- */
905
- profile?: dxos_halo_credentials.ProfileDocument;
906
- commonSpaces?: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>[];
946
+ export interface SpaceArchive {
947
+ filename: string;
948
+ contents: Uint8Array;
907
949
  }
908
950
  /**
909
951
  * Defined in:
910
952
  * {@link file://./../../../dxos/client/services.proto}
911
953
  */
912
- export interface ContactBook {
913
- contacts?: Contact[];
954
+ export interface ExportSpaceRequest {
955
+ spaceId: string;
914
956
  }
915
957
  /**
916
958
  * Defined in:
917
959
  * {@link file://./../../../dxos/client/services.proto}
918
960
  */
919
- export interface ContactsService {
920
- getContacts: (request: void, options?: RequestOptions) => Promise<ContactBook>;
921
- queryContacts: (request: void, options?: RequestOptions) => Stream<ContactBook>;
961
+ export interface ExportSpaceResponse {
962
+ archive: SpaceArchive;
922
963
  }
923
964
  /**
924
965
  * Defined in:
925
966
  * {@link file://./../../../dxos/client/services.proto}
926
967
  */
927
- export interface SpaceMember {
928
- identity: Identity;
929
- presence: SpaceMember.PresenceState;
930
- peerStates?: dxos_mesh_presence.PeerState[];
931
- role: dxos_halo_credentials.SpaceMember.Role;
968
+ export interface ImportSpaceRequest {
969
+ archive: SpaceArchive;
932
970
  }
933
- export namespace SpaceMember {
971
+ /**
972
+ * Defined in:
973
+ * {@link file://./../../../dxos/client/services.proto}
974
+ */
975
+ export interface ImportSpaceResponse {
934
976
  /**
935
- * Defined in:
936
- * {@link file://./../../../dxos/client/services.proto}
977
+ * the ID of the new space.
937
978
  */
938
- export enum PresenceState {
939
- OFFLINE = 0,
940
- ONLINE = 1
941
- }
979
+ newSpaceId: string;
942
980
  }
943
981
  /**
944
982
  * Defined in:
945
983
  * {@link file://./../../../dxos/client/services.proto}
946
984
  */
947
- export interface Space {
948
- id: string;
949
- spaceKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
950
- state: SpaceState;
985
+ export interface SpacesService {
986
+ createSpace: (request: CreateSpaceRequest, options?: RequestOptions) => Promise<Space>;
987
+ updateSpace: (request: UpdateSpaceRequest, options?: RequestOptions) => Promise<void>;
988
+ querySpaces: (request: void, options?: RequestOptions) => Stream<QuerySpacesResponse>;
989
+ updateMemberRole: (request: UpdateMemberRoleRequest, options?: RequestOptions) => Promise<void>;
990
+ admitContact: (request: AdmitContactRequest, options?: RequestOptions) => Promise<void>;
991
+ joinBySpaceKey: (request: JoinBySpaceKeyRequest, options?: RequestOptions) => Promise<JoinSpaceResponse>;
951
992
  /**
952
- * Options:
953
- * - proto3_optional = true
993
+ * Broadcast an ephemeral message to the space swarm.
954
994
  */
955
- pipeline?: Space.PipelineState;
995
+ postMessage: (request: PostMessageRequest, options?: RequestOptions) => Promise<void>;
956
996
  /**
957
- * Options:
958
- * - proto3_optional = true
997
+ * Subscribe to messages from the space swarm.
959
998
  */
960
- error?: dxos_error.Error;
999
+ subscribeMessages: (request: SubscribeMessagesRequest, options?: RequestOptions) => Stream<dxos_mesh_teleport_gossip.GossipMessage>;
961
1000
  /**
962
- * Options:
963
- * - proto3_optional = true
1001
+ * Write credentials to the space control feed.
964
1002
  */
965
- edgeReplication?: dxos_echo_metadata.EdgeReplicationSetting;
966
- members?: SpaceMember[];
1003
+ writeCredentials: (request: WriteCredentialsRequest, options?: RequestOptions) => Promise<void>;
1004
+ /**
1005
+ * Query credentials from the space control feed.
1006
+ */
1007
+ queryCredentials: (request: QueryCredentialsRequest, options?: RequestOptions) => Stream<dxos_halo_credentials.Credential>;
1008
+ createEpoch: (request: CreateEpochRequest, options?: RequestOptions) => Promise<CreateEpochResponse>;
1009
+ exportSpace: (request: ExportSpaceRequest, options?: RequestOptions) => Promise<ExportSpaceResponse>;
1010
+ importSpace: (request: ImportSpaceRequest, options?: RequestOptions) => Promise<ImportSpaceResponse>;
1011
+ }
1012
+ /**
1013
+ * Defined in:
1014
+ * {@link file://./../../../dxos/client/services.proto}
1015
+ */
1016
+ export interface AcceptInvitationRequest {
1017
+ invitation: Invitation;
967
1018
  /**
968
1019
  * Options:
969
1020
  * - proto3_optional = true
970
1021
  */
971
- creator?: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
1022
+ deviceProfile?: dxos_halo_credentials.DeviceProfileDocument;
1023
+ }
1024
+ /**
1025
+ * Defined in:
1026
+ * {@link file://./../../../dxos/client/services.proto}
1027
+ */
1028
+ export interface AuthenticationRequest {
1029
+ invitationId: string;
1030
+ authCode: string;
1031
+ }
1032
+ /**
1033
+ * Defined in:
1034
+ * {@link file://./../../../dxos/client/services.proto}
1035
+ */
1036
+ export interface CancelInvitationRequest {
1037
+ invitationId: string;
1038
+ }
1039
+ /**
1040
+ * Defined in:
1041
+ * {@link file://./../../../dxos/client/services.proto}
1042
+ */
1043
+ export interface InvitationMethod {
1044
+ created?: Invitation;
1045
+ accepted?: Invitation;
1046
+ }
1047
+ /**
1048
+ * Defined in:
1049
+ * {@link file://./../../../dxos/client/services.proto}
1050
+ */
1051
+ export interface QueryInvitationsResponse {
1052
+ action: QueryInvitationsResponse.Action;
1053
+ type: QueryInvitationsResponse.Type;
1054
+ invitations?: Invitation[];
972
1055
  /**
973
1056
  * Options:
974
1057
  * - proto3_optional = true
975
1058
  */
976
- cache?: dxos_echo_metadata.SpaceCache;
977
- metrics: Space.Metrics;
1059
+ existing?: boolean;
978
1060
  }
979
- export namespace Space {
1061
+ export namespace QueryInvitationsResponse {
980
1062
  /**
981
1063
  * Defined in:
982
1064
  * {@link file://./../../../dxos/client/services.proto}
983
1065
  */
984
- export interface Metrics {
985
- /**
986
- * Options:
987
- * - proto3_optional = true
988
- */
989
- open?: ReturnType<(typeof substitutions)["google.protobuf.Timestamp"]["decode"]>;
990
- /**
991
- * Options:
992
- * - proto3_optional = true
993
- */
994
- pipelineInitBegin?: ReturnType<(typeof substitutions)["google.protobuf.Timestamp"]["decode"]>;
995
- /**
996
- * Options:
997
- * - proto3_optional = true
998
- */
999
- controlPipelineReady?: ReturnType<(typeof substitutions)["google.protobuf.Timestamp"]["decode"]>;
1000
- /**
1001
- * Options:
1002
- * - proto3_optional = true
1003
- */
1004
- dataPipelineOpen?: ReturnType<(typeof substitutions)["google.protobuf.Timestamp"]["decode"]>;
1005
- /**
1006
- * Options:
1007
- * - proto3_optional = true
1008
- */
1009
- dataPipelineReady?: ReturnType<(typeof substitutions)["google.protobuf.Timestamp"]["decode"]>;
1010
- /**
1011
- * Options:
1012
- * - proto3_optional = true
1013
- */
1014
- ready?: ReturnType<(typeof substitutions)["google.protobuf.Timestamp"]["decode"]>;
1066
+ export enum Action {
1067
+ ADDED = 0,
1068
+ REMOVED = 1,
1069
+ SAVED = 2,
1070
+ LOAD_COMPLETE = 3
1015
1071
  }
1016
1072
  /**
1017
1073
  * Defined in:
1018
1074
  * {@link file://./../../../dxos/client/services.proto}
1019
1075
  */
1020
- export interface PipelineState {
1021
- /**
1022
- * Options:
1023
- * - proto3_optional = true
1024
- */
1025
- controlFeedKey?: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
1026
- /**
1027
- * Options:
1028
- * - proto3_optional = true
1029
- */
1030
- dataFeedKey?: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
1031
- /**
1032
- * TODO(burdon): Normalize _key suffix.
1033
- */
1034
- controlFeeds?: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>[];
1035
- dataFeeds?: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>[];
1036
- /**
1037
- * Last processed epoch. Might now have been applied yet.
1038
- *
1039
- * Options:
1040
- * - proto3_optional = true
1041
- */
1042
- currentEpoch?: dxos_halo_credentials.Credential;
1043
- /**
1044
- * Epoch that is currently applied.
1045
- *
1046
- * Options:
1047
- * - proto3_optional = true
1048
- */
1049
- appliedEpoch?: dxos_halo_credentials.Credential;
1050
- /**
1051
- * Mutations already processed.
1052
- *
1053
- * Options:
1054
- * - proto3_optional = true
1055
- */
1056
- currentControlTimeframe?: ReturnType<(typeof substitutions)["dxos.echo.timeframe.TimeframeVector"]["decode"]>;
1057
- /**
1058
- * Minimum timeframe to consider the state to be up-to-date.
1059
- *
1060
- * Options:
1061
- * - proto3_optional = true
1062
- */
1063
- targetControlTimeframe?: ReturnType<(typeof substitutions)["dxos.echo.timeframe.TimeframeVector"]["decode"]>;
1064
- /**
1065
- * All mutations stored in feeds.
1066
- *
1067
- * Options:
1068
- * - proto3_optional = true
1069
- */
1070
- totalControlTimeframe?: ReturnType<(typeof substitutions)["dxos.echo.timeframe.TimeframeVector"]["decode"]>;
1071
- /**
1072
- * All mutations known to exist on the network.
1073
- *
1074
- * Options:
1075
- * - proto3_optional = true
1076
- */
1077
- knownControlTimeframe?: ReturnType<(typeof substitutions)["dxos.echo.timeframe.TimeframeVector"]["decode"]>;
1078
- /**
1079
- * Start timeframe of the pipeline.
1080
- *
1081
- * Options:
1082
- * - proto3_optional = true
1083
- */
1084
- startDataTimeframe?: ReturnType<(typeof substitutions)["dxos.echo.timeframe.TimeframeVector"]["decode"]>;
1085
- /**
1086
- * Mutations already processed.
1087
- *
1088
- * Options:
1089
- * - proto3_optional = true
1090
- */
1091
- currentDataTimeframe?: ReturnType<(typeof substitutions)["dxos.echo.timeframe.TimeframeVector"]["decode"]>;
1092
- /**
1093
- * Minimum timeframe to consider the state to be up-to-date.
1094
- *
1095
- * Options:
1096
- * - proto3_optional = true
1097
- */
1098
- targetDataTimeframe?: ReturnType<(typeof substitutions)["dxos.echo.timeframe.TimeframeVector"]["decode"]>;
1099
- /**
1100
- * All mutations stored in feeds.
1101
- *
1102
- * Options:
1103
- * - proto3_optional = true
1104
- */
1105
- totalDataTimeframe?: ReturnType<(typeof substitutions)["dxos.echo.timeframe.TimeframeVector"]["decode"]>;
1106
- /**
1107
- * All mutations known to exist on the network.
1108
- *
1109
- * Options:
1110
- * - proto3_optional = true
1111
- */
1112
- knownDataTimeframe?: ReturnType<(typeof substitutions)["dxos.echo.timeframe.TimeframeVector"]["decode"]>;
1113
- /**
1114
- * URL of the current space root automerge document.
1115
- *
1116
- * Options:
1117
- * - proto3_optional = true
1118
- */
1119
- spaceRootUrl?: string;
1076
+ export enum Type {
1077
+ CREATED = 0,
1078
+ ACCEPTED = 1
1120
1079
  }
1121
1080
  }
1122
1081
  /**
1123
1082
  * Defined in:
1124
1083
  * {@link file://./../../../dxos/client/services.proto}
1125
1084
  */
1126
- export interface UpdateSpaceRequest {
1127
- spaceKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
1128
- /**
1129
- * Allowed values: ACTIVE, INACTIVE.
1130
- *
1131
- * Options:
1132
- * - proto3_optional = true
1133
- */
1134
- state?: SpaceState;
1135
- /**
1136
- * Options:
1137
- * - proto3_optional = true
1138
- */
1139
- edgeReplication?: dxos_echo_metadata.EdgeReplicationSetting;
1085
+ export interface LoadPersistentInvitationsResponse {
1086
+ invitations?: Invitation[];
1140
1087
  }
1141
1088
  /**
1142
1089
  * Defined in:
1143
1090
  * {@link file://./../../../dxos/client/services.proto}
1144
1091
  */
1145
- export interface QuerySpacesResponse {
1146
- spaces?: Space[];
1092
+ export interface InvitationsService {
1093
+ createInvitation: (request: Invitation, options?: RequestOptions) => Stream<Invitation>;
1094
+ acceptInvitation: (request: AcceptInvitationRequest, options?: RequestOptions) => Stream<Invitation>;
1095
+ authenticate: (request: AuthenticationRequest, options?: RequestOptions) => Promise<void>;
1096
+ cancelInvitation: (request: CancelInvitationRequest, options?: RequestOptions) => Promise<void>;
1097
+ queryInvitations: (request: void, options?: RequestOptions) => Stream<QueryInvitationsResponse>;
1147
1098
  }
1148
1099
  /**
1149
1100
  * Defined in:
1150
1101
  * {@link file://./../../../dxos/client/services.proto}
1151
1102
  */
1152
- export interface PostMessageRequest {
1153
- spaceKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
1154
- channel: string;
1155
- message: ReturnType<(typeof substitutions)["google.protobuf.Any"]["decode"]>;
1103
+ export enum ConnectionState {
1104
+ OFFLINE = 0,
1105
+ ONLINE = 1
1156
1106
  }
1157
1107
  /**
1158
1108
  * Defined in:
1159
1109
  * {@link file://./../../../dxos/client/services.proto}
1160
1110
  */
1161
- export interface SubscribeMessagesRequest {
1162
- spaceKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
1163
- channel: string;
1111
+ export interface NetworkStatus {
1112
+ swarm: ConnectionState;
1113
+ signaling?: NetworkStatus.Signal[];
1114
+ connectionInfo?: dxos_devtools_swarm.SwarmInfo[];
1115
+ }
1116
+ export namespace NetworkStatus {
1117
+ /**
1118
+ * Defined in:
1119
+ * {@link file://./../../../dxos/client/services.proto}
1120
+ */
1121
+ export interface Signal {
1122
+ server: string;
1123
+ state: dxos_mesh_signal.SignalState;
1124
+ }
1164
1125
  }
1165
1126
  /**
1166
1127
  * Defined in:
1167
1128
  * {@link file://./../../../dxos/client/services.proto}
1168
1129
  */
1169
- export interface WriteCredentialsRequest {
1170
- spaceKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
1171
- credentials?: dxos_halo_credentials.Credential[];
1130
+ export interface UpdateConfigRequest {
1131
+ swarm: ConnectionState;
1172
1132
  }
1173
1133
  /**
1174
1134
  * Defined in:
1175
1135
  * {@link file://./../../../dxos/client/services.proto}
1176
1136
  */
1177
- export interface QueryCredentialsRequest {
1178
- spaceKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
1137
+ export interface SubscribeSwarmStateRequest {
1138
+ topic: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
1139
+ }
1140
+ /**
1141
+ * Defined in:
1142
+ * {@link file://./../../../dxos/client/services.proto}
1143
+ */
1144
+ export interface NetworkService {
1145
+ updateConfig: (request: UpdateConfigRequest, options?: RequestOptions) => Promise<void>;
1146
+ queryStatus: (request: void, options?: RequestOptions) => Stream<NetworkStatus>;
1147
+ joinSwarm: (request: dxos_edge_signal.JoinRequest, options?: RequestOptions) => Promise<void>;
1148
+ leaveSwarm: (request: dxos_edge_signal.LeaveRequest, options?: RequestOptions) => Promise<void>;
1179
1149
  /**
1180
- * Options:
1181
- * - proto3_optional = true
1150
+ * Query the swarm state without joining it.
1182
1151
  */
1183
- noTail?: boolean;
1152
+ querySwarm: (request: dxos_edge_signal.QueryRequest, options?: RequestOptions) => Promise<dxos_edge_messenger.SwarmResponse>;
1153
+ subscribeSwarmState: (request: SubscribeSwarmStateRequest, options?: RequestOptions) => Stream<dxos_edge_messenger.SwarmResponse>;
1154
+ sendMessage: (request: dxos_edge_signal.Message, options?: RequestOptions) => Promise<void>;
1155
+ subscribeMessages: (request: dxos_edge_messenger.Peer, options?: RequestOptions) => Stream<dxos_edge_signal.Message>;
1184
1156
  }
1185
1157
  /**
1186
1158
  * Defined in:
1187
1159
  * {@link file://./../../../dxos/client/services.proto}
1188
1160
  */
1189
- export interface CreateEpochRequest {
1190
- spaceKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
1161
+ export interface EdgeAgentService {
1162
+ queryEdgeStatus: (request: void, options?: RequestOptions) => Stream<QueryEdgeStatusResponse>;
1163
+ createAgent: (request: void, options?: RequestOptions) => Promise<void>;
1164
+ queryAgentStatus: (request: void, options?: RequestOptions) => Stream<QueryAgentStatusResponse>;
1165
+ }
1166
+ /**
1167
+ * Defined in:
1168
+ * {@link file://./../../../dxos/client/services.proto}
1169
+ */
1170
+ export interface EdgeStatus {
1171
+ state: EdgeStatus.ConnectionState;
1191
1172
  /**
1192
- * Options:
1193
- * - proto3_optional = true
1173
+ * Latency in ms
1194
1174
  */
1195
- migration?: CreateEpochRequest.Migration;
1175
+ rtt: number;
1196
1176
  /**
1197
- * For REPLACE_AUTOMERGE_ROOT migration.
1198
- *
1199
- * Options:
1200
- * - proto3_optional = true
1177
+ * How long the connection has been up
1201
1178
  */
1202
- automergeRootUrl?: string;
1179
+ uptime: number;
1180
+ /**
1181
+ * Upload rate in bytes per second
1182
+ */
1183
+ rateBytesUp: number;
1184
+ /**
1185
+ * Download rate in bytes per second
1186
+ */
1187
+ rateBytesDown: number;
1188
+ messagesSent: number;
1189
+ messagesReceived: number;
1203
1190
  }
1204
- export namespace CreateEpochRequest {
1191
+ export namespace EdgeStatus {
1205
1192
  /**
1206
1193
  * Defined in:
1207
1194
  * {@link file://./../../../dxos/client/services.proto}
1208
1195
  */
1209
- export enum Migration {
1210
- NONE = 0,
1211
- INIT_AUTOMERGE = 1,
1212
- PRUNE_AUTOMERGE_ROOT_HISTORY = 2,
1213
- FRAGMENT_AUTOMERGE_ROOT = 3,
1214
- REPLACE_AUTOMERGE_ROOT = 4,
1215
- MIGRATE_REFERENCES_TO_DXN = 5
1196
+ export enum ConnectionState {
1197
+ NOT_CONNECTED = 0,
1198
+ CONNECTED = 1
1216
1199
  }
1217
1200
  }
1218
1201
  /**
1219
1202
  * Defined in:
1220
1203
  * {@link file://./../../../dxos/client/services.proto}
1221
1204
  */
1222
- export interface CreateEpochResponse {
1223
- /**
1224
- * Credential of the new epoch.
1225
- *
1226
- * Options:
1227
- * - proto3_optional = true
1228
- */
1229
- epochCredential?: dxos_halo_credentials.Credential;
1230
- /**
1231
- * Control pipeline timeframe.
1232
- *
1233
- * Options:
1234
- * - proto3_optional = true
1235
- */
1236
- controlTimeframe?: ReturnType<(typeof substitutions)["dxos.echo.timeframe.TimeframeVector"]["decode"]>;
1205
+ export interface QueryEdgeStatusResponse {
1206
+ status: EdgeStatus;
1237
1207
  }
1238
1208
  /**
1239
1209
  * Defined in:
1240
1210
  * {@link file://./../../../dxos/client/services.proto}
1241
1211
  */
1242
- export interface UpdateMemberRoleRequest {
1243
- spaceKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
1244
- memberKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
1245
- newRole: dxos_halo_credentials.SpaceMember.Role;
1212
+ export interface QueryAgentStatusResponse {
1213
+ status: QueryAgentStatusResponse.AgentStatus;
1214
+ }
1215
+ export namespace QueryAgentStatusResponse {
1216
+ /**
1217
+ * Defined in:
1218
+ * {@link file://./../../../dxos/client/services.proto}
1219
+ */
1220
+ export enum AgentStatus {
1221
+ UNKNOWN = 0,
1222
+ ACTIVE = 1,
1223
+ INACTIVE = 2,
1224
+ NOT_FOUND = 3
1225
+ }
1246
1226
  }
1247
1227
  /**
1248
1228
  * Defined in:
1249
- * {@link file://./../../../dxos/client/services.proto}
1229
+ * {@link file://./../../../dxos/client/logging.proto}
1250
1230
  */
1251
- export interface AdmitContactRequest {
1252
- contact: Contact;
1253
- role: dxos_halo_credentials.SpaceMember.Role;
1254
- spaceKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
1231
+ export interface Metrics {
1232
+ timestamp: ReturnType<(typeof substitutions)["google.protobuf.Timestamp"]["decode"]>;
1233
+ values?: Metrics.KeyPair[];
1234
+ }
1235
+ export namespace Metrics {
1236
+ /**
1237
+ * Defined in:
1238
+ * {@link file://./../../../dxos/client/logging.proto}
1239
+ */
1240
+ export interface KeyPair {
1241
+ /**
1242
+ * Options:
1243
+ * - proto3_optional = true
1244
+ */
1245
+ key?: string;
1246
+ /**
1247
+ * Options:
1248
+ * - proto3_optional = true
1249
+ */
1250
+ value?: dxos_value.Value;
1251
+ /**
1252
+ * Options:
1253
+ * - proto3_optional = true
1254
+ */
1255
+ stats?: dxos_value.Stats;
1256
+ }
1255
1257
  }
1256
1258
  /**
1257
1259
  * Defined in:
1258
- * {@link file://./../../../dxos/client/services.proto}
1260
+ * {@link file://./../../../dxos/client/logging.proto}
1259
1261
  */
1260
- export interface ContactAdmission {
1261
- credential: dxos_halo_credentials.Credential;
1262
+ export interface ControlMetricsRequest {
1263
+ /**
1264
+ * Options:
1265
+ * - proto3_optional = true
1266
+ */
1267
+ reset?: boolean;
1268
+ /**
1269
+ * Options:
1270
+ * - proto3_optional = true
1271
+ */
1272
+ record?: boolean;
1262
1273
  }
1263
1274
  /**
1264
1275
  * Defined in:
1265
- * {@link file://./../../../dxos/client/services.proto}
1276
+ * {@link file://./../../../dxos/client/logging.proto}
1266
1277
  */
1267
- export interface JoinSpaceResponse {
1268
- space: Space;
1278
+ export interface ControlMetricsResponse {
1279
+ /**
1280
+ * Options:
1281
+ * - proto3_optional = true
1282
+ */
1283
+ recording?: boolean;
1269
1284
  }
1270
1285
  /**
1271
1286
  * Defined in:
1272
- * {@link file://./../../../dxos/client/services.proto}
1287
+ * {@link file://./../../../dxos/client/logging.proto}
1273
1288
  */
1274
- export interface JoinBySpaceKeyRequest {
1275
- spaceKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
1289
+ export interface QueryMetricsRequest {
1290
+ /**
1291
+ * Options:
1292
+ * - proto3_optional = true
1293
+ */
1294
+ interval?: number;
1276
1295
  }
1277
1296
  /**
1278
1297
  * Defined in:
1279
- * {@link file://./../../../dxos/client/services.proto}
1298
+ * {@link file://./../../../dxos/client/logging.proto}
1280
1299
  */
1281
- export interface SpaceArchive {
1282
- filename: string;
1283
- contents: Uint8Array;
1300
+ export interface QueryMetricsResponse {
1301
+ timestamp: ReturnType<(typeof substitutions)["google.protobuf.Timestamp"]["decode"]>;
1302
+ metrics: Metrics;
1284
1303
  }
1285
1304
  /**
1286
1305
  * Defined in:
1287
- * {@link file://./../../../dxos/client/services.proto}
1288
- */
1289
- export interface ExportSpaceRequest {
1290
- spaceId: string;
1291
- }
1292
- /**
1293
- * Defined in:
1294
- * {@link file://./../../../dxos/client/services.proto}
1295
- */
1296
- export interface ExportSpaceResponse {
1297
- archive: SpaceArchive;
1298
- }
1299
- /**
1300
- * Defined in:
1301
- * {@link file://./../../../dxos/client/services.proto}
1306
+ * {@link file://./../../../dxos/client/logging.proto}
1302
1307
  */
1303
- export interface ImportSpaceRequest {
1304
- archive: SpaceArchive;
1308
+ export enum LogLevel {
1309
+ NONE = 0,
1310
+ TRACE = 5,
1311
+ DEBUG = 10,
1312
+ VERBOSE = 11,
1313
+ INFO = 12,
1314
+ WARN = 13,
1315
+ ERROR = 14
1305
1316
  }
1306
1317
  /**
1307
1318
  * Defined in:
1308
- * {@link file://./../../../dxos/client/services.proto}
1319
+ * {@link file://./../../../dxos/client/logging.proto}
1309
1320
  */
1310
- export interface ImportSpaceResponse {
1321
+ export interface QueryLogsRequest {
1322
+ filters?: QueryLogsRequest.Filter[];
1311
1323
  /**
1312
- * the ID of the new space.
1324
+ * Options:
1325
+ * - proto3_optional = true
1313
1326
  */
1314
- newSpaceId: string;
1327
+ options?: QueryLogsRequest.MatchingOptions;
1315
1328
  }
1316
- /**
1317
- * Defined in:
1318
- * {@link file://./../../../dxos/client/services.proto}
1319
- */
1320
- export interface SpacesService {
1321
- createSpace: (request: void, options?: RequestOptions) => Promise<Space>;
1322
- updateSpace: (request: UpdateSpaceRequest, options?: RequestOptions) => Promise<void>;
1323
- querySpaces: (request: void, options?: RequestOptions) => Stream<QuerySpacesResponse>;
1324
- updateMemberRole: (request: UpdateMemberRoleRequest, options?: RequestOptions) => Promise<void>;
1325
- admitContact: (request: AdmitContactRequest, options?: RequestOptions) => Promise<void>;
1326
- joinBySpaceKey: (request: JoinBySpaceKeyRequest, options?: RequestOptions) => Promise<JoinSpaceResponse>;
1327
- /**
1328
- * Broadcast an ephemeral message to the space swarm.
1329
- */
1330
- postMessage: (request: PostMessageRequest, options?: RequestOptions) => Promise<void>;
1331
- /**
1332
- * Subscribe to messages from the space swarm.
1333
- */
1334
- subscribeMessages: (request: SubscribeMessagesRequest, options?: RequestOptions) => Stream<dxos_mesh_teleport_gossip.GossipMessage>;
1329
+ export namespace QueryLogsRequest {
1335
1330
  /**
1336
- * Write credentials to the space control feed.
1331
+ * Defined in:
1332
+ * {@link file://./../../../dxos/client/logging.proto}
1337
1333
  */
1338
- writeCredentials: (request: WriteCredentialsRequest, options?: RequestOptions) => Promise<void>;
1334
+ export enum MatchingOptions {
1335
+ NONE = 0,
1336
+ INCLUSIVE = 1,
1337
+ EXPLICIT = 2
1338
+ }
1339
1339
  /**
1340
- * Query credentials from the space control feed.
1340
+ * Defined in:
1341
+ * {@link file://./../../../dxos/client/logging.proto}
1341
1342
  */
1342
- queryCredentials: (request: QueryCredentialsRequest, options?: RequestOptions) => Stream<dxos_halo_credentials.Credential>;
1343
- createEpoch: (request: CreateEpochRequest, options?: RequestOptions) => Promise<CreateEpochResponse>;
1344
- exportSpace: (request: ExportSpaceRequest, options?: RequestOptions) => Promise<ExportSpaceResponse>;
1345
- importSpace: (request: ImportSpaceRequest, options?: RequestOptions) => Promise<ImportSpaceResponse>;
1343
+ export interface Filter {
1344
+ level: LogLevel;
1345
+ /**
1346
+ * Options:
1347
+ * - proto3_optional = true
1348
+ */
1349
+ pattern?: string;
1350
+ }
1346
1351
  }
1347
1352
  /**
1348
1353
  * Defined in:
1349
- * {@link file://./../../../dxos/client/services.proto}
1354
+ * {@link file://./../../../dxos/client/logging.proto}
1350
1355
  */
1351
- export interface AcceptInvitationRequest {
1352
- invitation: Invitation;
1356
+ export interface LogEntry {
1357
+ level: LogLevel;
1358
+ message: string;
1353
1359
  /**
1354
1360
  * Options:
1355
1361
  * - proto3_optional = true
1356
1362
  */
1357
- deviceProfile?: dxos_halo_credentials.DeviceProfileDocument;
1358
- }
1359
- /**
1360
- * Defined in:
1361
- * {@link file://./../../../dxos/client/services.proto}
1362
- */
1363
- export interface AuthenticationRequest {
1364
- invitationId: string;
1365
- authCode: string;
1366
- }
1367
- /**
1368
- * Defined in:
1369
- * {@link file://./../../../dxos/client/services.proto}
1370
- */
1371
- export interface CancelInvitationRequest {
1372
- invitationId: string;
1373
- }
1374
- /**
1375
- * Defined in:
1376
- * {@link file://./../../../dxos/client/services.proto}
1377
- */
1378
- export interface InvitationMethod {
1379
- created?: Invitation;
1380
- accepted?: Invitation;
1381
- }
1382
- /**
1383
- * Defined in:
1384
- * {@link file://./../../../dxos/client/services.proto}
1385
- */
1386
- export interface QueryInvitationsResponse {
1387
- action: QueryInvitationsResponse.Action;
1388
- type: QueryInvitationsResponse.Type;
1389
- invitations?: Invitation[];
1363
+ context?: ReturnType<(typeof substitutions)["google.protobuf.Struct"]["decode"]>;
1390
1364
  /**
1391
1365
  * Options:
1392
1366
  * - proto3_optional = true
1393
1367
  */
1394
- existing?: boolean;
1395
- }
1396
- export namespace QueryInvitationsResponse {
1368
+ meta?: LogEntry.Meta;
1397
1369
  /**
1398
- * Defined in:
1399
- * {@link file://./../../../dxos/client/services.proto}
1370
+ * Options:
1371
+ * - proto3_optional = true
1400
1372
  */
1401
- export enum Action {
1402
- ADDED = 0,
1403
- REMOVED = 1,
1404
- SAVED = 2,
1405
- LOAD_COMPLETE = 3
1406
- }
1373
+ error?: dxos_error.Error;
1374
+ timestamp: ReturnType<(typeof substitutions)["google.protobuf.Timestamp"]["decode"]>;
1375
+ }
1376
+ export namespace LogEntry {
1407
1377
  /**
1408
1378
  * Defined in:
1409
- * {@link file://./../../../dxos/client/services.proto}
1379
+ * {@link file://./../../../dxos/client/logging.proto}
1410
1380
  */
1411
- export enum Type {
1412
- CREATED = 0,
1413
- ACCEPTED = 1
1381
+ export interface Meta {
1382
+ file: string;
1383
+ line: number;
1384
+ /**
1385
+ * Options:
1386
+ * - proto3_optional = true
1387
+ */
1388
+ scope?: ReturnType<(typeof substitutions)["google.protobuf.Struct"]["decode"]>;
1389
+ /**
1390
+ * Options:
1391
+ * - proto3_optional = true
1392
+ */
1393
+ resourceId?: number;
1414
1394
  }
1415
1395
  }
1416
1396
  /**
1417
1397
  * Defined in:
1418
- * {@link file://./../../../dxos/client/services.proto}
1419
- */
1420
- export interface LoadPersistentInvitationsResponse {
1421
- invitations?: Invitation[];
1422
- }
1423
- /**
1424
- * Defined in:
1425
- * {@link file://./../../../dxos/client/services.proto}
1426
- */
1427
- export interface InvitationsService {
1428
- createInvitation: (request: Invitation, options?: RequestOptions) => Stream<Invitation>;
1429
- acceptInvitation: (request: AcceptInvitationRequest, options?: RequestOptions) => Stream<Invitation>;
1430
- authenticate: (request: AuthenticationRequest, options?: RequestOptions) => Promise<void>;
1431
- cancelInvitation: (request: CancelInvitationRequest, options?: RequestOptions) => Promise<void>;
1432
- queryInvitations: (request: void, options?: RequestOptions) => Stream<QueryInvitationsResponse>;
1433
- }
1434
- /**
1435
- * Defined in:
1436
- * {@link file://./../../../dxos/client/services.proto}
1398
+ * {@link file://./../../../dxos/client/logging.proto}
1437
1399
  */
1438
- export enum ConnectionState {
1439
- OFFLINE = 0,
1440
- ONLINE = 1
1400
+ export interface LoggingService {
1401
+ controlMetrics: (request: ControlMetricsRequest, options?: RequestOptions) => Promise<ControlMetricsResponse>;
1402
+ queryMetrics: (request: QueryMetricsRequest, options?: RequestOptions) => Stream<QueryMetricsResponse>;
1403
+ queryLogs: (request: QueryLogsRequest, options?: RequestOptions) => Stream<LogEntry>;
1441
1404
  }
1442
1405
  /**
1443
1406
  * Defined in:
1444
- * {@link file://./../../../dxos/client/services.proto}
1407
+ * {@link file://./../../../dxos/client/invitation.proto}
1445
1408
  */
1446
- export interface NetworkStatus {
1447
- swarm: ConnectionState;
1448
- signaling?: NetworkStatus.Signal[];
1449
- connectionInfo?: dxos_devtools_swarm.SwarmInfo[];
1450
- }
1451
- export namespace NetworkStatus {
1409
+ export interface AdmissionKeypair {
1410
+ publicKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
1452
1411
  /**
1453
- * Defined in:
1454
- * {@link file://./../../../dxos/client/services.proto}
1412
+ * Options:
1413
+ * - proto3_optional = true
1455
1414
  */
1456
- export interface Signal {
1457
- server: string;
1458
- state: dxos_mesh_signal.SignalState;
1459
- }
1460
- }
1461
- /**
1462
- * Defined in:
1463
- * {@link file://./../../../dxos/client/services.proto}
1464
- */
1465
- export interface UpdateConfigRequest {
1466
- swarm: ConnectionState;
1415
+ privateKey?: ReturnType<(typeof substitutions)["dxos.keys.PrivateKey"]["decode"]>;
1467
1416
  }
1468
1417
  /**
1418
+ * Runtime state of the space object.
1419
+ *
1469
1420
  * Defined in:
1470
- * {@link file://./../../../dxos/client/services.proto}
1421
+ * {@link file://./../../../dxos/client/invitation.proto}
1471
1422
  */
1472
- export interface SubscribeSwarmStateRequest {
1473
- topic: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
1423
+ export enum SpaceState {
1424
+ INVALID = 0,
1425
+ SPACE_INACTIVE = 2,
1426
+ SPACE_ACTIVE = 6,
1427
+ SPACE_CLOSED = 1,
1428
+ SPACE_CONTROL_ONLY = 7,
1429
+ SPACE_INITIALIZING = 4,
1430
+ SPACE_READY = 3,
1431
+ SPACE_ERROR = 5,
1432
+ SPACE_REQUIRES_MIGRATION = 8
1474
1433
  }
1475
1434
  /**
1435
+ * Represents the invitation state passed between client and service.
1436
+ *
1476
1437
  * Defined in:
1477
- * {@link file://./../../../dxos/client/services.proto}
1438
+ * {@link file://./../../../dxos/client/invitation.proto}
1478
1439
  */
1479
- export interface NetworkService {
1480
- updateConfig: (request: UpdateConfigRequest, options?: RequestOptions) => Promise<void>;
1481
- queryStatus: (request: void, options?: RequestOptions) => Stream<NetworkStatus>;
1482
- joinSwarm: (request: dxos_edge_signal.JoinRequest, options?: RequestOptions) => Promise<void>;
1483
- leaveSwarm: (request: dxos_edge_signal.LeaveRequest, options?: RequestOptions) => Promise<void>;
1440
+ export interface Invitation {
1484
1441
  /**
1485
- * Query the swarm state without joining it.
1442
+ * Local identifier (random).
1486
1443
  */
1487
- querySwarm: (request: dxos_edge_signal.QueryRequest, options?: RequestOptions) => Promise<dxos_edge_messenger.SwarmResponse>;
1488
- subscribeSwarmState: (request: SubscribeSwarmStateRequest, options?: RequestOptions) => Stream<dxos_edge_messenger.SwarmResponse>;
1489
- sendMessage: (request: dxos_edge_signal.Message, options?: RequestOptions) => Promise<void>;
1490
- subscribeMessages: (request: dxos_edge_messenger.Peer, options?: RequestOptions) => Stream<dxos_edge_signal.Message>;
1491
- }
1492
- /**
1493
- * Defined in:
1494
- * {@link file://./../../../dxos/client/services.proto}
1495
- */
1496
- export interface EdgeAgentService {
1497
- queryEdgeStatus: (request: void, options?: RequestOptions) => Stream<QueryEdgeStatusResponse>;
1498
- createAgent: (request: void, options?: RequestOptions) => Promise<void>;
1499
- queryAgentStatus: (request: void, options?: RequestOptions) => Stream<QueryAgentStatusResponse>;
1500
- }
1501
- /**
1502
- * Defined in:
1503
- * {@link file://./../../../dxos/client/services.proto}
1504
- */
1505
- export interface EdgeStatus {
1506
- state: EdgeStatus.ConnectionState;
1444
+ invitationId: string;
1507
1445
  /**
1508
- * Latency in ms
1446
+ * Determines the behavior of the invitation.
1509
1447
  */
1510
- rtt: number;
1448
+ type: Invitation.Type;
1511
1449
  /**
1512
- * How long the connection has been up
1450
+ * Kind of access the invitation will grant.
1513
1451
  */
1514
- uptime: number;
1452
+ kind: Invitation.Kind;
1515
1453
  /**
1516
- * Upload rate in bytes per second
1454
+ * How the invitation is authenticated.
1517
1455
  */
1518
- rateBytesUp: number;
1456
+ authMethod: Invitation.AuthMethod;
1519
1457
  /**
1520
- * Download rate in bytes per second
1458
+ * Swarm rendezvous (random).
1521
1459
  */
1522
- rateBytesDown: number;
1523
- messagesSent: number;
1524
- messagesReceived: number;
1460
+ swarmKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
1461
+ /**
1462
+ * Local state.
1463
+ */
1464
+ state: Invitation.State;
1465
+ /**
1466
+ * Timeout for guest to complete invitation once connected (ms).
1467
+ *
1468
+ * Options:
1469
+ * - proto3_optional = true
1470
+ */
1471
+ timeout?: number;
1472
+ /**
1473
+ * Guest's identity.
1474
+ *
1475
+ * Options:
1476
+ * - proto3_optional = true
1477
+ */
1478
+ identityKey?: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
1479
+ /**
1480
+ * Space to join (only present if kind is SPACE).
1481
+ *
1482
+ * Options:
1483
+ * - proto3_optional = true
1484
+ */
1485
+ spaceKey?: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
1486
+ /**
1487
+ * Authentication code created by host (only present if auth_method is SHARED_SECRET).
1488
+ *
1489
+ * Options:
1490
+ * - proto3_optional = true
1491
+ */
1492
+ authCode?: string;
1493
+ /**
1494
+ * Path or identifier to navigate to after successful authentication.
1495
+ *
1496
+ * Options:
1497
+ * - proto3_optional = true
1498
+ */
1499
+ target?: string;
1500
+ /**
1501
+ * Host should resume invitation on startup until timeout.
1502
+ *
1503
+ * Options:
1504
+ * - proto3_optional = true
1505
+ */
1506
+ persistent?: boolean;
1507
+ /**
1508
+ * Options:
1509
+ * - proto3_optional = true
1510
+ */
1511
+ created?: ReturnType<(typeof substitutions)["google.protobuf.Timestamp"]["decode"]>;
1512
+ /**
1513
+ * Options:
1514
+ * - proto3_optional = true
1515
+ */
1516
+ lifetime?: number;
1517
+ /**
1518
+ * Whether an invitation can be used multiple times.
1519
+ *
1520
+ * Options:
1521
+ * - proto3_optional = true
1522
+ */
1523
+ multiUse?: boolean;
1524
+ /**
1525
+ * Guest's keypair required for AuthMethod.KNOWN_PUBLIC_KEY.
1526
+ *
1527
+ * Options:
1528
+ * - proto3_optional = true
1529
+ */
1530
+ guestKeypair?: AdmissionKeypair;
1531
+ /**
1532
+ * Present on Type.DELEGATED invitations.
1533
+ *
1534
+ * Options:
1535
+ * - proto3_optional = true
1536
+ */
1537
+ delegationCredentialId?: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
1538
+ /**
1539
+ * Role of the admitted member, defaults to ADMIN.
1540
+ *
1541
+ * Options:
1542
+ * - proto3_optional = true
1543
+ */
1544
+ role?: dxos_halo_credentials.SpaceMember.Role;
1545
+ /**
1546
+ * Id of a the space to join (only present if kind is SPACE).
1547
+ *
1548
+ * Options:
1549
+ * - proto3_optional = true
1550
+ */
1551
+ spaceId?: string;
1525
1552
  }
1526
- export namespace EdgeStatus {
1553
+ export namespace Invitation {
1527
1554
  /**
1528
1555
  * Defined in:
1529
- * {@link file://./../../../dxos/client/services.proto}
1556
+ * {@link file://./../../../dxos/client/invitation.proto}
1530
1557
  */
1531
- export enum ConnectionState {
1532
- NOT_CONNECTED = 0,
1533
- CONNECTED = 1
1558
+ export enum Type {
1559
+ INTERACTIVE = 0,
1560
+ DELEGATED = 1,
1561
+ MULTIUSE = 2
1534
1562
  }
1535
- }
1536
- /**
1537
- * Defined in:
1538
- * {@link file://./../../../dxos/client/services.proto}
1539
- */
1540
- export interface QueryEdgeStatusResponse {
1541
- status: EdgeStatus;
1542
- }
1543
- /**
1544
- * Defined in:
1545
- * {@link file://./../../../dxos/client/services.proto}
1546
- */
1547
- export interface QueryAgentStatusResponse {
1548
- status: QueryAgentStatusResponse.AgentStatus;
1549
- }
1550
- export namespace QueryAgentStatusResponse {
1551
1563
  /**
1552
1564
  * Defined in:
1553
- * {@link file://./../../../dxos/client/services.proto}
1565
+ * {@link file://./../../../dxos/client/invitation.proto}
1554
1566
  */
1555
- export enum AgentStatus {
1556
- UNKNOWN = 0,
1557
- ACTIVE = 1,
1558
- INACTIVE = 2,
1559
- NOT_FOUND = 3
1567
+ export enum Kind {
1568
+ DEVICE = 0,
1569
+ SPACE = 1
1570
+ }
1571
+ /**
1572
+ * Defined in:
1573
+ * {@link file://./../../../dxos/client/invitation.proto}
1574
+ */
1575
+ export enum AuthMethod {
1576
+ NONE = 0,
1577
+ SHARED_SECRET = 1,
1578
+ KNOWN_PUBLIC_KEY = 2
1579
+ }
1580
+ /**
1581
+ * Defined in:
1582
+ * {@link file://./../../../dxos/client/invitation.proto}
1583
+ */
1584
+ export enum State {
1585
+ INIT = 0,
1586
+ CONNECTING = 1,
1587
+ CONNECTED = 2,
1588
+ READY_FOR_AUTHENTICATION = 3,
1589
+ AUTHENTICATING = 4,
1590
+ SUCCESS = 5,
1591
+ CANCELLED = 6,
1592
+ TIMEOUT = 7,
1593
+ ERROR = 8,
1594
+ EXPIRED = 9
1560
1595
  }
1561
1596
  }