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

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