@dxos/protocols 0.8.4-main.84f28bd → 0.8.4-main.f9ba587

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