@dxos/protocols 0.8.4-main.9735255 → 0.8.4-main.9be5663bfe

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