@dxos/protocols 0.8.4-main.406dc2a → 0.8.4-main.40e3dcdf1b

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