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

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