@dxos/protocols 0.1.39 → 0.1.40

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 (44) hide show
  1. package/dist/cjs/src/proto/gen/dxos/client/services.d.ts +37 -1
  2. package/dist/cjs/src/proto/gen/dxos/client/services.d.ts.map +1 -1
  3. package/dist/cjs/src/proto/gen/dxos/client/services.js +22 -1
  4. package/dist/cjs/src/proto/gen/dxos/client/services.js.map +1 -1
  5. package/dist/cjs/src/proto/gen/dxos/config.d.ts +2 -10
  6. package/dist/cjs/src/proto/gen/dxos/config.d.ts.map +1 -1
  7. package/dist/cjs/src/proto/gen/dxos/config.js.map +1 -1
  8. package/dist/cjs/src/proto/gen/dxos/devtools/host.d.ts +31 -31
  9. package/dist/cjs/src/proto/gen/dxos/devtools/host.d.ts.map +1 -1
  10. package/dist/cjs/src/proto/gen/dxos/halo/invitations.d.ts +27 -3
  11. package/dist/cjs/src/proto/gen/dxos/halo/invitations.d.ts.map +1 -1
  12. package/dist/cjs/src/proto/gen/dxos/halo/invitations.js +13 -1
  13. package/dist/cjs/src/proto/gen/dxos/halo/invitations.js.map +1 -1
  14. package/dist/cjs/src/proto/gen/index.d.ts +6 -0
  15. package/dist/cjs/src/proto/gen/index.d.ts.map +1 -1
  16. package/dist/cjs/src/proto/gen/index.js +1 -1
  17. package/dist/cjs/src/proto/gen/index.js.map +1 -1
  18. package/dist/cjs/tsconfig.tsbuildinfo +1 -1
  19. package/dist/esm/src/proto/gen/dxos/client/services.d.ts +37 -1
  20. package/dist/esm/src/proto/gen/dxos/client/services.d.ts.map +1 -1
  21. package/dist/esm/src/proto/gen/dxos/client/services.js +21 -0
  22. package/dist/esm/src/proto/gen/dxos/client/services.js.map +1 -1
  23. package/dist/esm/src/proto/gen/dxos/config.d.ts +2 -10
  24. package/dist/esm/src/proto/gen/dxos/config.d.ts.map +1 -1
  25. package/dist/esm/src/proto/gen/dxos/config.js.map +1 -1
  26. package/dist/esm/src/proto/gen/dxos/devtools/host.d.ts +31 -31
  27. package/dist/esm/src/proto/gen/dxos/devtools/host.d.ts.map +1 -1
  28. package/dist/esm/src/proto/gen/dxos/halo/invitations.d.ts +27 -3
  29. package/dist/esm/src/proto/gen/dxos/halo/invitations.d.ts.map +1 -1
  30. package/dist/esm/src/proto/gen/dxos/halo/invitations.js +12 -0
  31. package/dist/esm/src/proto/gen/dxos/halo/invitations.js.map +1 -1
  32. package/dist/esm/src/proto/gen/index.d.ts +6 -0
  33. package/dist/esm/src/proto/gen/index.d.ts.map +1 -1
  34. package/dist/esm/src/proto/gen/index.js +1 -1
  35. package/dist/esm/src/proto/gen/index.js.map +1 -1
  36. package/package.json +5 -5
  37. package/src/proto/dxos/client/services.proto +25 -1
  38. package/src/proto/dxos/config.proto +2 -2
  39. package/src/proto/dxos/halo/invitations.proto +17 -3
  40. package/src/proto/gen/dxos/client/services.ts +37 -1
  41. package/src/proto/gen/dxos/config.ts +2 -10
  42. package/src/proto/gen/dxos/devtools/host.ts +31 -31
  43. package/src/proto/gen/dxos/halo/invitations.ts +27 -3
  44. package/src/proto/gen/index.ts +7 -1
@@ -325,11 +325,35 @@ message CancelInvitationRequest {
325
325
  string invitation_id = 1;
326
326
  }
327
327
 
328
+ message InvitationMethod {
329
+ oneof kind {
330
+ Invitation created = 1;
331
+ Invitation accepted = 2;
332
+ }
333
+ }
334
+
335
+ message QueryInvitationsResponse {
336
+ enum Action {
337
+ ADDED = 0;
338
+ REMOVED = 1;
339
+ }
340
+
341
+ enum Type {
342
+ CREATED = 0;
343
+ ACCEPTED = 1;
344
+ }
345
+
346
+ Action action = 1;
347
+ Type type = 2;
348
+ repeated Invitation invitations = 3;
349
+ }
350
+
328
351
  service InvitationsService {
329
352
  rpc CreateInvitation(Invitation) returns (stream Invitation);
330
- rpc Authenticate(AuthenticationRequest) returns (google.protobuf.Empty);
331
353
  rpc AcceptInvitation(Invitation) returns (stream Invitation);
354
+ rpc Authenticate(AuthenticationRequest) returns (google.protobuf.Empty);
332
355
  rpc CancelInvitation(CancelInvitationRequest) returns (google.protobuf.Empty);
356
+ rpc QueryInvitations(google.protobuf.Empty) returns (stream QueryInvitationsResponse);
333
357
  }
334
358
 
335
359
  //
@@ -301,7 +301,7 @@ message Runtime {
301
301
  }
302
302
 
303
303
  message Signal {
304
- optional string server = 1;
304
+ string server = 1;
305
305
  optional string api = 2;
306
306
  optional string status = 3;
307
307
  }
@@ -336,7 +336,7 @@ message Runtime {
336
336
  optional AppServer app = 2;
337
337
  optional Dxns dxns = 3;
338
338
  optional Ipfs ipfs = 4;
339
- optional Signal signal = 5;
339
+ repeated Signal signaling = 5;
340
340
  repeated Ice ice = 6;
341
341
  optional Machine machine = 7;
342
342
  optional BotHost bot = 8;
@@ -13,6 +13,16 @@ import "dxos/keys.proto";
13
13
 
14
14
  package dxos.halo.invitations;
15
15
 
16
+ message Options {
17
+ enum Role {
18
+ GUEST = 0;
19
+ HOST = 1;
20
+ }
21
+
22
+ /// Role of the peer.
23
+ Role role = 1;
24
+ }
25
+
16
26
  message IntroductionRequest {
17
27
  /// Guest's profile.
18
28
  optional halo.credentials.ProfileDocument profile = 1;
@@ -87,13 +97,17 @@ message AdmissionResponse {
87
97
 
88
98
  /// Host service for two peers exchanging an invitation.
89
99
  // TODO(wittjosiah): Handle invitations where guest is the initiatating peer.
100
+ // TODO(dmaretskyi): Rename to InvitationExtensionService.
90
101
  service InvitationHostService {
91
- /// Introduce guest to the host.
102
+ /// Both peers must call this method before any other.
103
+ rpc Options(Options) returns (google.protobuf.Empty);
104
+
105
+ /// Introduce guest to the host. Only on the host.
92
106
  rpc Introduce(IntroductionRequest) returns (IntroductionResponse);
93
107
 
94
- /// Authenticate request.
108
+ /// Authenticate request. Only on the host.
95
109
  rpc Authenticate(AuthenticationRequest) returns (AuthenticationResponse);
96
110
 
97
- /// Process admission credentials.
111
+ /// Process admission credentials. Only on the host.
98
112
  rpc Admit(AdmissionRequest) returns (AdmissionResponse);
99
113
  }
@@ -511,15 +511,51 @@ export interface AuthenticationRequest {
511
511
  export interface CancelInvitationRequest {
512
512
  invitationId: string;
513
513
  }
514
+ /**
515
+ * Defined in:
516
+ * {@link file://./../../../dxos/client/services.proto}
517
+ */
518
+ export interface InvitationMethod {
519
+ created?: Invitation;
520
+ accepted?: Invitation;
521
+ }
522
+ /**
523
+ * Defined in:
524
+ * {@link file://./../../../dxos/client/services.proto}
525
+ */
526
+ export interface QueryInvitationsResponse {
527
+ action: QueryInvitationsResponse.Action;
528
+ type: QueryInvitationsResponse.Type;
529
+ invitations?: Invitation[];
530
+ }
531
+ export namespace QueryInvitationsResponse {
532
+ /**
533
+ * Defined in:
534
+ * {@link file://./../../../dxos/client/services.proto}
535
+ */
536
+ export enum Action {
537
+ ADDED = 0,
538
+ REMOVED = 1
539
+ }
540
+ /**
541
+ * Defined in:
542
+ * {@link file://./../../../dxos/client/services.proto}
543
+ */
544
+ export enum Type {
545
+ CREATED = 0,
546
+ ACCEPTED = 1
547
+ }
548
+ }
514
549
  /**
515
550
  * Defined in:
516
551
  * {@link file://./../../../dxos/client/services.proto}
517
552
  */
518
553
  export interface InvitationsService {
519
554
  createInvitation: (request: Invitation) => Stream<Invitation>;
520
- authenticate: (request: AuthenticationRequest) => Promise<void>;
521
555
  acceptInvitation: (request: Invitation) => Stream<Invitation>;
556
+ authenticate: (request: AuthenticationRequest) => Promise<void>;
522
557
  cancelInvitation: (request: CancelInvitationRequest) => Promise<void>;
558
+ queryInvitations: (request: void) => Stream<QueryInvitationsResponse>;
523
559
  }
524
560
  /**
525
561
  * Defined in:
@@ -666,11 +666,7 @@ export namespace Runtime {
666
666
  * - proto3_optional = true
667
667
  */
668
668
  ipfs?: Runtime.Services.Ipfs;
669
- /**
670
- * Options:
671
- * - proto3_optional = true
672
- */
673
- signal?: Runtime.Services.Signal;
669
+ signaling?: Runtime.Services.Signal[];
674
670
  ice?: Runtime.Services.Ice[];
675
671
  /**
676
672
  * Options:
@@ -812,11 +808,7 @@ export namespace Runtime {
812
808
  * {@link file://./../../dxos/config.proto}
813
809
  */
814
810
  export interface Signal {
815
- /**
816
- * Options:
817
- * - proto3_optional = true
818
- */
819
- server?: string;
811
+ server: string;
820
812
  /**
821
813
  * Options:
822
814
  * - proto3_optional = true
@@ -47,6 +47,37 @@ import * as dxos_type from "../type";
47
47
  import * as example_testing_data from "../../example/testing/data";
48
48
  import * as example_testing_rpc from "../../example/testing/rpc";
49
49
  import * as google_protobuf from "../../google/protobuf";
50
+ /**
51
+ * Defined in:
52
+ * {@link file://./../../../dxos/devtools/diagnostics.proto}
53
+ */
54
+ export interface Services {
55
+ spaces?: SpaceStats[];
56
+ }
57
+ /**
58
+ * Defined in:
59
+ * {@link file://./../../../dxos/devtools/diagnostics.proto}
60
+ */
61
+ export interface SpaceStats {
62
+ key: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
63
+ peers?: PeerStats[];
64
+ }
65
+ /**
66
+ * Defined in:
67
+ * {@link file://./../../../dxos/devtools/diagnostics.proto}
68
+ */
69
+ export interface PeerStats {
70
+ controlFeed: FeedStats;
71
+ dataFeed: FeedStats;
72
+ }
73
+ /**
74
+ * Defined in:
75
+ * {@link file://./../../../dxos/devtools/diagnostics.proto}
76
+ */
77
+ export interface FeedStats {
78
+ key: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
79
+ length: number;
80
+ }
50
81
  /**
51
82
  * Defined in:
52
83
  * {@link file://./../../../dxos/devtools/host.proto}
@@ -431,34 +462,3 @@ export interface TracingService {
431
462
  export interface SetTracingOptionsRequest {
432
463
  enable: boolean;
433
464
  }
434
- /**
435
- * Defined in:
436
- * {@link file://./../../../dxos/devtools/diagnostics.proto}
437
- */
438
- export interface Services {
439
- spaces?: SpaceStats[];
440
- }
441
- /**
442
- * Defined in:
443
- * {@link file://./../../../dxos/devtools/diagnostics.proto}
444
- */
445
- export interface SpaceStats {
446
- key: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
447
- peers?: PeerStats[];
448
- }
449
- /**
450
- * Defined in:
451
- * {@link file://./../../../dxos/devtools/diagnostics.proto}
452
- */
453
- export interface PeerStats {
454
- controlFeed: FeedStats;
455
- dataFeed: FeedStats;
456
- }
457
- /**
458
- * Defined in:
459
- * {@link file://./../../../dxos/devtools/diagnostics.proto}
460
- */
461
- export interface FeedStats {
462
- key: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
463
- length: number;
464
- }
@@ -47,6 +47,26 @@ import * as dxos_type from "../type";
47
47
  import * as example_testing_data from "../../example/testing/data";
48
48
  import * as example_testing_rpc from "../../example/testing/rpc";
49
49
  import * as google_protobuf from "../../google/protobuf";
50
+ /**
51
+ * Defined in:
52
+ * {@link file://./../../../dxos/halo/invitations.proto}
53
+ */
54
+ export interface Options {
55
+ /**
56
+ * Role of the peer.
57
+ */
58
+ role: Options.Role;
59
+ }
60
+ export namespace Options {
61
+ /**
62
+ * Defined in:
63
+ * {@link file://./../../../dxos/halo/invitations.proto}
64
+ */
65
+ export enum Role {
66
+ GUEST = 0,
67
+ HOST = 1
68
+ }
69
+ }
50
70
  /**
51
71
  * Defined in:
52
72
  * {@link file://./../../../dxos/halo/invitations.proto}
@@ -183,15 +203,19 @@ export interface AdmissionResponse {
183
203
  */
184
204
  export interface InvitationHostService {
185
205
  /**
186
- * Introduce guest to the host.
206
+ * Both peers must call this method before any other.
207
+ */
208
+ options: (request: Options) => Promise<void>;
209
+ /**
210
+ * Introduce guest to the host. Only on the host.
187
211
  */
188
212
  introduce: (request: IntroductionRequest) => Promise<IntroductionResponse>;
189
213
  /**
190
- * Authenticate request.
214
+ * Authenticate request. Only on the host.
191
215
  */
192
216
  authenticate: (request: AuthenticationRequest) => Promise<AuthenticationResponse>;
193
217
  /**
194
- * Process admission credentials.
218
+ * Process admission credentials. Only on the host.
195
219
  */
196
220
  admit: (request: AdmissionRequest) => Promise<AdmissionResponse>;
197
221
  }