@dxos/client-services 0.1.5 → 0.1.7

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 (164) hide show
  1. package/LICENSE +5 -18
  2. package/README.md +14 -10
  3. package/README.yml +5 -0
  4. package/dist/src/packlets/deprecated/profile.d.ts +2 -5
  5. package/dist/src/packlets/deprecated/profile.d.ts.map +1 -1
  6. package/dist/src/packlets/deprecated/profile.js +1 -73
  7. package/dist/src/packlets/deprecated/profile.js.map +1 -1
  8. package/dist/src/packlets/deprecated/system.d.ts +4 -0
  9. package/dist/src/packlets/deprecated/system.d.ts.map +1 -1
  10. package/dist/src/packlets/deprecated/system.js +6 -0
  11. package/dist/src/packlets/deprecated/system.js.map +1 -1
  12. package/dist/src/packlets/deprecated/tracing.d.ts +1 -1
  13. package/dist/src/packlets/deprecated/tracing.js +1 -1
  14. package/dist/src/packlets/devtools/devtools.d.ts +3 -0
  15. package/dist/src/packlets/devtools/devtools.d.ts.map +1 -1
  16. package/dist/src/packlets/devtools/devtools.js +3 -1
  17. package/dist/src/packlets/devtools/devtools.js.map +1 -1
  18. package/dist/src/packlets/devtools/feeds.d.ts.map +1 -1
  19. package/dist/src/packlets/devtools/feeds.js +5 -3
  20. package/dist/src/packlets/devtools/feeds.js.map +1 -1
  21. package/dist/src/packlets/identity/devices-service-impl.d.ts.map +1 -1
  22. package/dist/src/packlets/identity/devices-service-impl.js.map +1 -1
  23. package/dist/src/packlets/identity/identity-manager.d.ts +2 -2
  24. package/dist/src/packlets/identity/identity-manager.d.ts.map +1 -1
  25. package/dist/src/packlets/identity/identity-manager.js +44 -43
  26. package/dist/src/packlets/identity/identity-manager.js.map +1 -1
  27. package/dist/src/packlets/identity/identity.d.ts +3 -0
  28. package/dist/src/packlets/identity/identity.d.ts.map +1 -1
  29. package/dist/src/packlets/identity/identity.js +51 -1
  30. package/dist/src/packlets/identity/identity.js.map +1 -1
  31. package/dist/src/packlets/invitations/halo-invitations-handler.d.ts +23 -0
  32. package/dist/src/packlets/invitations/halo-invitations-handler.d.ts.map +1 -0
  33. package/dist/src/packlets/invitations/halo-invitations-handler.js +231 -0
  34. package/dist/src/packlets/invitations/halo-invitations-handler.js.map +1 -0
  35. package/dist/src/packlets/invitations/halo-invitations-handler.test.d.ts +2 -0
  36. package/dist/src/packlets/invitations/halo-invitations-handler.test.d.ts.map +1 -0
  37. package/dist/src/packlets/invitations/halo-invitations-handler.test.js +69 -0
  38. package/dist/src/packlets/invitations/halo-invitations-handler.test.js.map +1 -0
  39. package/dist/src/packlets/invitations/halo-invitations-proxy.d.ts +8 -0
  40. package/dist/src/packlets/invitations/halo-invitations-proxy.d.ts.map +1 -0
  41. package/dist/src/packlets/invitations/halo-invitations-proxy.js +17 -0
  42. package/dist/src/packlets/invitations/halo-invitations-proxy.js.map +1 -0
  43. package/dist/src/packlets/invitations/halo-invitations-service.d.ts +13 -0
  44. package/dist/src/packlets/invitations/halo-invitations-service.d.ts.map +1 -0
  45. package/dist/src/packlets/invitations/halo-invitations-service.js +20 -0
  46. package/dist/src/packlets/invitations/halo-invitations-service.js.map +1 -0
  47. package/dist/src/packlets/invitations/halo-invitations-service.test.d.ts +2 -0
  48. package/dist/src/packlets/invitations/halo-invitations-service.test.d.ts.map +1 -0
  49. package/dist/src/packlets/invitations/halo-invitations-service.test.js +83 -0
  50. package/dist/src/packlets/invitations/halo-invitations-service.test.js.map +1 -0
  51. package/dist/src/packlets/invitations/index.d.ts +5 -1
  52. package/dist/src/packlets/invitations/index.d.ts.map +1 -1
  53. package/dist/src/packlets/invitations/index.js +5 -1
  54. package/dist/src/packlets/invitations/index.js.map +1 -1
  55. package/dist/src/packlets/invitations/invitations-handler.d.ts +48 -0
  56. package/dist/src/packlets/invitations/invitations-handler.d.ts.map +1 -0
  57. package/dist/src/packlets/invitations/invitations-handler.js +18 -0
  58. package/dist/src/packlets/invitations/invitations-handler.js.map +1 -0
  59. package/dist/src/packlets/invitations/invitations-proxy.d.ts +11 -7
  60. package/dist/src/packlets/invitations/invitations-proxy.d.ts.map +1 -1
  61. package/dist/src/packlets/invitations/invitations-proxy.js +5 -10
  62. package/dist/src/packlets/invitations/invitations-proxy.js.map +1 -1
  63. package/dist/src/packlets/invitations/invitations-service.d.ts +25 -0
  64. package/dist/src/packlets/invitations/invitations-service.d.ts.map +1 -0
  65. package/dist/src/packlets/invitations/invitations-service.js +174 -0
  66. package/dist/src/packlets/invitations/invitations-service.js.map +1 -0
  67. package/dist/src/packlets/invitations/invitations.d.ts +10 -42
  68. package/dist/src/packlets/invitations/invitations.d.ts.map +1 -1
  69. package/dist/src/packlets/invitations/invitations.js +5 -2
  70. package/dist/src/packlets/invitations/invitations.js.map +1 -1
  71. package/dist/src/packlets/invitations/space-invitations-handler.d.ts +6 -6
  72. package/dist/src/packlets/invitations/space-invitations-handler.d.ts.map +1 -1
  73. package/dist/src/packlets/invitations/space-invitations-handler.js +18 -19
  74. package/dist/src/packlets/invitations/space-invitations-handler.js.map +1 -1
  75. package/dist/src/packlets/invitations/space-invitations-handler.test.js +5 -5
  76. package/dist/src/packlets/invitations/space-invitations-handler.test.js.map +1 -1
  77. package/dist/src/packlets/invitations/space-invitations-proxy.d.ts +1 -1
  78. package/dist/src/packlets/invitations/space-invitations-proxy.d.ts.map +1 -1
  79. package/dist/src/packlets/invitations/space-invitations-proxy.js +2 -2
  80. package/dist/src/packlets/invitations/space-invitations-proxy.js.map +1 -1
  81. package/dist/src/packlets/invitations/space-invitations-service.d.ts +8 -14
  82. package/dist/src/packlets/invitations/space-invitations-service.d.ts.map +1 -1
  83. package/dist/src/packlets/invitations/space-invitations-service.js +11 -169
  84. package/dist/src/packlets/invitations/space-invitations-service.js.map +1 -1
  85. package/dist/src/packlets/invitations/space-invitations-service.test.js +4 -4
  86. package/dist/src/packlets/invitations/space-invitations-service.test.js.map +1 -1
  87. package/dist/src/packlets/services/service-context.d.ts +2 -2
  88. package/dist/src/packlets/services/service-context.d.ts.map +1 -1
  89. package/dist/src/packlets/services/service-context.js +8 -8
  90. package/dist/src/packlets/services/service-context.js.map +1 -1
  91. package/dist/src/packlets/services/service-definitions.d.ts +5 -4
  92. package/dist/src/packlets/services/service-definitions.d.ts.map +1 -1
  93. package/dist/src/packlets/services/service-definitions.js +6 -4
  94. package/dist/src/packlets/services/service-definitions.js.map +1 -1
  95. package/dist/src/packlets/services/service-host.d.ts.map +1 -1
  96. package/dist/src/packlets/services/service-host.js +10 -8
  97. package/dist/src/packlets/services/service-host.js.map +1 -1
  98. package/dist/src/packlets/services/service-proxy.js +1 -1
  99. package/dist/src/packlets/services/service-registry.test.js +2 -2
  100. package/dist/src/packlets/services/service-registry.test.js.map +1 -1
  101. package/dist/src/packlets/vault/iframe-runtime.d.ts +5 -4
  102. package/dist/src/packlets/vault/iframe-runtime.d.ts.map +1 -1
  103. package/dist/src/packlets/vault/iframe-runtime.js +4 -12
  104. package/dist/src/packlets/vault/iframe-runtime.js.map +1 -1
  105. package/dist/src/packlets/vault/worker-runtime.d.ts +4 -3
  106. package/dist/src/packlets/vault/worker-runtime.d.ts.map +1 -1
  107. package/dist/src/packlets/vault/worker-runtime.js +29 -24
  108. package/dist/src/packlets/vault/worker-runtime.js.map +1 -1
  109. package/dist/src/packlets/vault/worker-session.d.ts +5 -2
  110. package/dist/src/packlets/vault/worker-session.d.ts.map +1 -1
  111. package/dist/src/packlets/vault/worker-session.js +23 -10
  112. package/dist/src/packlets/vault/worker-session.js.map +1 -1
  113. package/package.json +26 -26
  114. package/src/packlets/deprecated/profile.ts +2 -84
  115. package/src/packlets/deprecated/system.ts +7 -0
  116. package/src/packlets/deprecated/tracing.ts +1 -1
  117. package/src/packlets/devtools/devtools.ts +3 -1
  118. package/src/packlets/devtools/feeds.ts +5 -3
  119. package/src/packlets/identity/devices-service-impl.ts +0 -1
  120. package/src/packlets/identity/identity-manager.ts +50 -49
  121. package/src/packlets/identity/identity.ts +58 -1
  122. package/src/packlets/invitations/halo-invitations-handler.test.ts +79 -0
  123. package/src/packlets/invitations/halo-invitations-handler.ts +255 -0
  124. package/src/packlets/invitations/halo-invitations-proxy.ts +14 -0
  125. package/src/packlets/invitations/halo-invitations-service.test.ts +96 -0
  126. package/src/packlets/invitations/halo-invitations-service.ts +24 -0
  127. package/src/packlets/invitations/index.ts +5 -1
  128. package/src/packlets/invitations/invitations-handler.ts +59 -0
  129. package/src/packlets/invitations/invitations-proxy.ts +15 -13
  130. package/src/packlets/invitations/invitations-service.ts +184 -0
  131. package/src/packlets/invitations/invitations.ts +14 -46
  132. package/src/packlets/invitations/space-invitations-handler.test.ts +6 -6
  133. package/src/packlets/invitations/space-invitations-handler.ts +16 -16
  134. package/src/packlets/invitations/space-invitations-proxy.ts +2 -2
  135. package/src/packlets/invitations/space-invitations-service.test.ts +13 -13
  136. package/src/packlets/invitations/space-invitations-service.ts +16 -177
  137. package/src/packlets/services/service-context.ts +6 -6
  138. package/src/packlets/services/service-definitions.ts +20 -10
  139. package/src/packlets/services/service-host.ts +15 -7
  140. package/src/packlets/services/service-proxy.ts +1 -1
  141. package/src/packlets/services/service-registry.test.ts +5 -5
  142. package/src/packlets/vault/iframe-runtime.ts +8 -15
  143. package/src/packlets/vault/worker-runtime.ts +36 -30
  144. package/src/packlets/vault/worker-session.ts +20 -6
  145. package/dist/src/packlets/invitations/halo-invitations.d.ts +0 -23
  146. package/dist/src/packlets/invitations/halo-invitations.d.ts.map +0 -1
  147. package/dist/src/packlets/invitations/halo-invitations.js +0 -154
  148. package/dist/src/packlets/invitations/halo-invitations.js.map +0 -1
  149. package/dist/src/packlets/invitations/halo-invitations.test.d.ts +0 -2
  150. package/dist/src/packlets/invitations/halo-invitations.test.d.ts.map +0 -1
  151. package/dist/src/packlets/invitations/halo-invitations.test.js +0 -34
  152. package/dist/src/packlets/invitations/halo-invitations.test.js.map +0 -1
  153. package/dist/src/packlets/services/iframe-service-proxy.d.ts +0 -23
  154. package/dist/src/packlets/services/iframe-service-proxy.d.ts.map +0 -1
  155. package/dist/src/packlets/services/iframe-service-proxy.js +0 -53
  156. package/dist/src/packlets/services/iframe-service-proxy.js.map +0 -1
  157. package/dist/src/packlets/services/service-host.test.d.ts +0 -2
  158. package/dist/src/packlets/services/service-host.test.d.ts.map +0 -1
  159. package/dist/src/packlets/services/service-host.test.js +0 -68
  160. package/dist/src/packlets/services/service-host.test.js.map +0 -1
  161. package/src/packlets/invitations/halo-invitations.test.ts +0 -40
  162. package/src/packlets/invitations/halo-invitations.ts +0 -164
  163. package/src/packlets/services/iframe-service-proxy.ts +0 -71
  164. package/src/packlets/services/service-host.test.ts +0 -76
@@ -22,7 +22,7 @@ import type { FeedMessage } from '@dxos/protocols/proto/dxos/echo/feed';
22
22
  import { Storage } from '@dxos/random-access-storage';
23
23
 
24
24
  import { IdentityManager } from '../identity';
25
- import { HaloInvitations, SpaceInvitationsHandler } from '../invitations';
25
+ import { HaloInvitationsHandler, SpaceInvitationsHandler } from '../invitations';
26
26
 
27
27
  /**
28
28
  * Shared backend for all client services.
@@ -35,7 +35,7 @@ export class ServiceContext {
35
35
  public readonly feedStore: FeedStore<FeedMessage>;
36
36
  public readonly keyring: Keyring;
37
37
  public readonly identityManager: IdentityManager;
38
- public readonly haloInvitations: HaloInvitations;
38
+ public readonly haloInvitations: HaloInvitationsHandler;
39
39
 
40
40
  // Initialized after identity is initialized.
41
41
  public spaceManager?: SpaceManager;
@@ -69,9 +69,8 @@ export class ServiceContext {
69
69
  );
70
70
 
71
71
  // TODO(burdon): _initialize called in multiple places.
72
- this.haloInvitations = new HaloInvitations(this.identityManager, this.networkManager, async () => {
73
- await this._initialize();
74
- });
72
+ // TODO(burdon): Call _initialize on success.
73
+ this.haloInvitations = new HaloInvitationsHandler(this.networkManager, this.identityManager);
75
74
  }
76
75
 
77
76
  async open() {
@@ -100,6 +99,7 @@ export class ServiceContext {
100
99
  return identity;
101
100
  }
102
101
 
102
+ // Called when identity is created.
103
103
  private async _initialize() {
104
104
  const identity = this.identityManager.identity ?? failUndefined();
105
105
  const signingContext: SigningContext = {
@@ -123,7 +123,7 @@ export class ServiceContext {
123
123
 
124
124
  await spaceManager.open();
125
125
  this.spaceManager = spaceManager;
126
- this.spaceInvitations = new SpaceInvitationsHandler(this.spaceManager, this.networkManager, signingContext);
126
+ this.spaceInvitations = new SpaceInvitationsHandler(this.networkManager, this.spaceManager, signingContext);
127
127
  this.initialized.wake();
128
128
  }
129
129
  }
@@ -4,7 +4,12 @@
4
4
 
5
5
  import { schema } from '@dxos/protocols';
6
6
  import { ProfileService, SystemService, SpaceService } from '@dxos/protocols/proto/dxos/client';
7
- import { SpacesService, InvitationsService, DevicesService } from '@dxos/protocols/proto/dxos/client/services';
7
+ import {
8
+ HaloInvitationsService,
9
+ SpaceInvitationsService,
10
+ SpacesService,
11
+ DevicesService
12
+ } from '@dxos/protocols/proto/dxos/client/services';
8
13
  import { DevtoolsHost, TracingService } from '@dxos/protocols/proto/dxos/devtools/host';
9
14
  import { DataService } from '@dxos/protocols/proto/dxos/echo/service';
10
15
  import { createServiceBundle, ServiceBundle } from '@dxos/rpc';
@@ -14,16 +19,19 @@ import { createServiceBundle, ServiceBundle } from '@dxos/rpc';
14
19
  //
15
20
 
16
21
  export type ClientServices = {
22
+ HaloInvitationsService: HaloInvitationsService;
23
+ DevicesService: DevicesService;
24
+
25
+ SpaceInvitationsService: SpaceInvitationsService;
26
+ SpacesService: SpacesService;
27
+
28
+ // TODO(burdon): Deprecated.
17
29
  SpaceService: SpaceService;
18
30
  DataService: DataService;
19
31
  ProfileService: ProfileService;
20
32
  SystemService: SystemService;
21
33
  DevtoolsHost: DevtoolsHost;
22
34
  TracingService: TracingService;
23
-
24
- SpacesService: SpacesService;
25
- SpaceInvitationsService: InvitationsService;
26
- DevicesService: DevicesService;
27
35
  };
28
36
 
29
37
  /**
@@ -41,14 +49,16 @@ export interface ClientServicesProvider {
41
49
  * Services supported by host.
42
50
  */
43
51
  export const clientServiceBundle = createServiceBundle<ClientServices>({
52
+ HaloInvitationsService: schema.getService('dxos.client.services.HaloInvitationsService'),
53
+ DevicesService: schema.getService('dxos.client.services.DevicesService'),
54
+ SpaceInvitationsService: schema.getService('dxos.client.services.SpaceInvitationsService'),
55
+ SpacesService: schema.getService('dxos.client.services.SpacesService'),
56
+
57
+ // TODO(burdon): Deprecated.
44
58
  SpaceService: schema.getService('dxos.client.SpaceService'),
45
59
  DataService: schema.getService('dxos.echo.service.DataService'),
46
60
  ProfileService: schema.getService('dxos.client.ProfileService'),
47
61
  SystemService: schema.getService('dxos.client.SystemService'),
48
62
  DevtoolsHost: schema.getService('dxos.devtools.host.DevtoolsHost'),
49
- TracingService: schema.getService('dxos.devtools.host.TracingService'),
50
-
51
- SpacesService: schema.getService('dxos.client.services.SpacesService'),
52
- SpaceInvitationsService: schema.getService('dxos.client.services.InvitationsService'),
53
- DevicesService: schema.getService('dxos.client.services.DevicesService')
63
+ TracingService: schema.getService('dxos.devtools.host.TracingService')
54
64
  });
@@ -14,7 +14,7 @@ import { TextModel } from '@dxos/text-model';
14
14
  import { SpaceServiceImpl, ProfileServiceImpl, SystemServiceImpl, TracingServiceImpl } from '../deprecated';
15
15
  import { DevtoolsServiceImpl, DevtoolsHostEvents } from '../devtools';
16
16
  import { DevicesServiceImpl } from '../identity/devices-service-impl';
17
- import { SpaceInvitationsServiceImpl } from '../invitations';
17
+ import { HaloInvitationsServiceImpl, SpaceInvitationsServiceImpl } from '../invitations';
18
18
  import { SpacesServiceImpl } from '../spaces';
19
19
  import { createStorageObjects } from '../storage';
20
20
  import { ServiceContext } from './service-context';
@@ -55,25 +55,33 @@ export class ClientServicesHost implements ClientServicesProvider {
55
55
 
56
56
  // TODO(burdon): Start to think of DMG (dynamic services).
57
57
  this._serviceRegistry = new ServiceRegistry<ClientServices>(clientServiceBundle, {
58
- SpacesService: new SpacesServiceImpl(),
58
+ HaloInvitationsService: new HaloInvitationsServiceImpl(
59
+ this._serviceContext.identityManager,
60
+ this._serviceContext.haloInvitations
61
+ ),
62
+
63
+ DevicesService: new DevicesServiceImpl(this._serviceContext.identityManager),
64
+
59
65
  SpaceInvitationsService: new SpaceInvitationsServiceImpl(
60
66
  this._serviceContext.identityManager,
61
- () => this._serviceContext.spaceManager ?? raise(new Error('SpaceManager not initialized')),
62
- () => this._serviceContext.spaceInvitations ?? raise(new Error('SpaceInvitations not initialized'))
67
+ () => this._serviceContext.spaceInvitations ?? raise(new Error('SpaceInvitations not initialized')),
68
+ () => this._serviceContext.spaceManager ?? raise(new Error('SpaceManager not initialized'))
63
69
  ),
64
70
 
65
- SpaceService: new SpaceServiceImpl(this._serviceContext),
71
+ SpacesService: new SpacesServiceImpl(),
72
+
66
73
  DataService: new DataServiceImpl(this._serviceContext.dataServiceSubscriptions),
67
74
 
75
+ // TODO(burdon): Move to new protobuf definitions.
68
76
  ProfileService: new ProfileServiceImpl(this._serviceContext),
77
+ SpaceService: new SpaceServiceImpl(this._serviceContext),
69
78
  SystemService: new SystemServiceImpl(config),
70
79
  TracingService: new TracingServiceImpl(config),
71
80
  DevtoolsHost: new DevtoolsServiceImpl({
72
81
  events: new DevtoolsHostEvents(),
73
82
  config,
74
83
  context: this._serviceContext
75
- }),
76
- DevicesService: new DevicesServiceImpl(this._serviceContext.identityManager)
84
+ })
77
85
  });
78
86
  }
79
87
 
@@ -22,7 +22,7 @@ export class ClientServicesProxy implements ClientServicesProvider {
22
22
  port: RpcPort,
23
23
  // NOTE: With lower timeout the shared worker does not have enough time to start.
24
24
  // TODO(dmaretskyi): Find better ways to detected when the worker has finished loading. It might take a while on slow connections.
25
- private readonly _timeout = 1000
25
+ private readonly _timeout = 3000
26
26
  ) {
27
27
  this._proxy = createProtoRpcPeer({
28
28
  requested: clientServiceBundle,
@@ -7,7 +7,7 @@ import assert from 'assert';
7
7
  import { Trigger } from '@dxos/async';
8
8
  import { log } from '@dxos/log';
9
9
  import { schema } from '@dxos/protocols';
10
- import { Invitation, InvitationsService } from '@dxos/protocols/proto/dxos/client/services';
10
+ import { Invitation, SpaceInvitationsService } from '@dxos/protocols/proto/dxos/client/services';
11
11
  import { createLinkedPorts, createProtoRpcPeer, createServiceBundle } from '@dxos/rpc';
12
12
 
13
13
  import { SpaceInvitationsProxy, SpaceInvitationsServiceImpl } from '../invitations';
@@ -17,11 +17,11 @@ import { ServiceRegistry } from './service-registry';
17
17
  // TODO(burdon): Create TestService (that doesn't require peers).
18
18
 
19
19
  type TestServices = {
20
- SpaceInvitationsService: InvitationsService;
20
+ SpaceInvitationsService: SpaceInvitationsService;
21
21
  };
22
22
 
23
23
  const serviceBundle = createServiceBundle<TestServices>({
24
- SpaceInvitationsService: schema.getService('dxos.client.services.InvitationsService')
24
+ SpaceInvitationsService: schema.getService('dxos.client.services.SpaceInvitationsService')
25
25
  });
26
26
 
27
27
  describe('service registry', function () {
@@ -37,8 +37,8 @@ describe('service registry', function () {
37
37
  const serviceRegistry = new ServiceRegistry(serviceBundle, {
38
38
  SpaceInvitationsService: new SpaceInvitationsServiceImpl(
39
39
  serviceContext.identityManager,
40
- () => serviceContext.spaceManager!,
41
- () => serviceContext.spaceInvitations!
40
+ () => serviceContext.spaceInvitations!,
41
+ () => serviceContext.spaceManager!
42
42
  )
43
43
  });
44
44
 
@@ -5,12 +5,14 @@
5
5
  import { WebRTCTransportService } from '@dxos/network-manager';
6
6
  import { BridgeService } from '@dxos/protocols/proto/dxos/mesh/bridge';
7
7
  import { createProtoRpcPeer, ProtoRpcPeer, RpcPort } from '@dxos/rpc';
8
- import { PortMuxer } from '@dxos/rpc-tunnel';
9
8
 
10
9
  import { iframeServiceBundle, WorkerServiceBundle, workerServiceBundle } from './services';
11
10
 
11
+ // NOTE: Keep as RpcPorts to avoid dependency on @dxos/rpc-tunnel so we don't depend on browser-specific apis.
12
12
  export type IframeRuntimeParams = {
13
- portMuxer: PortMuxer;
13
+ systemPort: RpcPort;
14
+ workerAppPort: RpcPort;
15
+ windowAppPort: RpcPort;
14
16
  };
15
17
 
16
18
  /**
@@ -23,13 +25,10 @@ export class IFrameRuntime {
23
25
  private readonly _systemRpc: ProtoRpcPeer<WorkerServiceBundle>;
24
26
  private readonly _transportService = new WebRTCTransportService();
25
27
 
26
- constructor({ portMuxer }: IframeRuntimeParams) {
27
- this._systemPort = portMuxer.createWorkerPort({ channel: 'dxos:system' });
28
- this._workerAppPort = portMuxer.createWorkerPort({ channel: 'dxos:app' });
29
- this._windowAppPort = portMuxer.createIFramePort({
30
- channel: 'dxos:app',
31
- onOrigin: (origin) => this.open(origin)
32
- });
28
+ constructor({ systemPort, workerAppPort, windowAppPort }: IframeRuntimeParams) {
29
+ this._systemPort = systemPort;
30
+ this._windowAppPort = windowAppPort;
31
+ this._workerAppPort = workerAppPort;
33
32
 
34
33
  this._systemRpc = createProtoRpcPeer({
35
34
  requested: workerServiceBundle,
@@ -45,15 +44,9 @@ export class IFrameRuntime {
45
44
  port: this._systemPort,
46
45
  timeout: 200
47
46
  });
48
- }
49
47
 
50
- start() {
51
48
  this._workerAppPort.subscribe((msg) => this._windowAppPort.send(msg));
52
49
  this._windowAppPort.subscribe((msg) => this._workerAppPort.send(msg));
53
-
54
- window.addEventListener('beforeunload', () => {
55
- this.close().catch((err) => console.error(err));
56
- });
57
50
  }
58
51
 
59
52
  async open(origin: string) {
@@ -2,20 +2,20 @@
2
2
  // Copyright 2022 DXOS.org
3
3
  //
4
4
 
5
- import assert from 'node:assert';
6
-
7
5
  import { Trigger } from '@dxos/async';
8
6
  import { Config } from '@dxos/config';
9
- import { WebsocketSignalManager } from '@dxos/messaging';
7
+ import { MemorySignalManager, MemorySignalManagerContext, WebsocketSignalManager } from '@dxos/messaging';
10
8
  import { NetworkManager, WebRTCTransportProxyFactory } from '@dxos/network-manager';
11
- import { PortMuxer } from '@dxos/rpc-tunnel';
9
+ import { RpcPort } from '@dxos/rpc';
12
10
  import { MaybePromise } from '@dxos/util';
13
11
 
14
12
  import { ClientServicesHost } from '../services';
15
13
  import { WorkerSession } from './worker-session';
16
14
 
15
+ // NOTE: Keep as RpcPorts to avoid dependency on @dxos/rpc-tunnel so we don't depend on browser-specific apis.
17
16
  export type CreateSessionParams = {
18
- portMuxer: PortMuxer;
17
+ appPort: RpcPort;
18
+ systemPort: RpcPort;
19
19
  };
20
20
 
21
21
  /**
@@ -25,7 +25,7 @@ export type CreateSessionParams = {
25
25
  */
26
26
  export class WorkerRuntime {
27
27
  private readonly _transportFactory = new WebRTCTransportProxyFactory();
28
- private readonly _ready = new Trigger();
28
+ private readonly _ready = new Trigger<Error | undefined>();
29
29
  private readonly sessions = new Set<WorkerSession>();
30
30
  private _sessionForNetworking?: WorkerSession;
31
31
  private _clientServices!: ClientServicesHost;
@@ -34,24 +34,28 @@ export class WorkerRuntime {
34
34
  // prettier-ignore
35
35
  constructor(
36
36
  private readonly _configProvider: () => MaybePromise<Config>
37
- ) {}
37
+ ) { }
38
38
 
39
39
  async start() {
40
- this._config = await this._configProvider();
41
- const signalServer = this._config.get('runtime.services.signal.server');
42
- // TODO(wittjosiah): Networking shouldn't be required.
43
- assert(signalServer);
44
- this._clientServices = new ClientServicesHost({
45
- config: this._config,
46
- networkManager: new NetworkManager({
47
- log: true,
48
- signalManager: new WebsocketSignalManager([signalServer]),
49
- transportFactory: this._transportFactory
50
- })
51
- });
52
-
53
- await this._clientServices.open();
54
- this._ready.wake();
40
+ try {
41
+ this._config = await this._configProvider();
42
+ const signalServer = this._config.get('runtime.services.signal.server');
43
+ this._clientServices = new ClientServicesHost({
44
+ config: this._config,
45
+ networkManager: new NetworkManager({
46
+ log: true,
47
+ signalManager: signalServer
48
+ ? new WebsocketSignalManager([signalServer])
49
+ : new MemorySignalManager(new MemorySignalManagerContext()), // TODO(dmaretskyi): Inject this context.
50
+ transportFactory: this._transportFactory
51
+ })
52
+ });
53
+
54
+ await this._clientServices.open();
55
+ this._ready.wake(undefined);
56
+ } catch (err: any) {
57
+ this._ready.wake(err);
58
+ }
55
59
  }
56
60
 
57
61
  async stop() {
@@ -62,16 +66,18 @@ export class WorkerRuntime {
62
66
  /**
63
67
  * Create a new session.
64
68
  */
65
- async createSession({ portMuxer }: CreateSessionParams) {
66
- const appPort = portMuxer.createWorkerPort({ channel: 'dxos:app' });
67
- const systemPort = portMuxer.createWorkerPort({ channel: 'dxos:system' });
68
-
69
- await this._ready.wait();
70
-
69
+ async createSession({ appPort, systemPort }: CreateSessionParams) {
71
70
  const session = new WorkerSession({
72
- clientServices: this._clientServices,
71
+ getServices: async () => {
72
+ const error = await this._ready.wait();
73
+ if (error !== undefined) {
74
+ throw error;
75
+ }
76
+ return this._clientServices;
77
+ },
73
78
  appPort,
74
- systemPort
79
+ systemPort,
80
+ readySignal: this._ready
75
81
  });
76
82
 
77
83
  // When tab is closed.
@@ -8,13 +8,14 @@ import { BridgeService } from '@dxos/protocols/proto/dxos/mesh/bridge';
8
8
  import { createProtoRpcPeer, ProtoRpcPeer, RpcPort } from '@dxos/rpc';
9
9
  import { Callback } from '@dxos/util';
10
10
 
11
- import { ClientServicesHost } from '../services';
11
+ import { clientServiceBundle, ClientServicesHost } from '../services';
12
12
  import { IframeServiceBundle, iframeServiceBundle, workerServiceBundle } from './services';
13
13
 
14
14
  export type WorkerSessionParams = {
15
- clientServices: ClientServicesHost;
15
+ getServices: () => Promise<ClientServicesHost>;
16
16
  systemPort: RpcPort;
17
17
  appPort: RpcPort;
18
+ readySignal: Trigger<Error | undefined>;
18
19
  options?: {
19
20
  heartbeatInterval: number;
20
21
  };
@@ -27,6 +28,7 @@ export class WorkerSession {
27
28
  private readonly _clientRpc: ProtoRpcPeer<{}>;
28
29
  private readonly _systemRpc: ProtoRpcPeer<IframeServiceBundle>;
29
30
  private readonly _startTrigger = new Trigger();
31
+ private readonly _getServices: () => Promise<ClientServicesHost>;
30
32
  private readonly _options: NonNullable<WorkerSessionParams['options']>;
31
33
  private _heartbeatTimer?: NodeJS.Timeout;
32
34
 
@@ -36,7 +38,7 @@ export class WorkerSession {
36
38
  public bridgeService?: BridgeService;
37
39
 
38
40
  constructor({
39
- clientServices,
41
+ getServices,
40
42
  systemPort,
41
43
  appPort,
42
44
  options = {
@@ -44,10 +46,22 @@ export class WorkerSession {
44
46
  }
45
47
  }: WorkerSessionParams) {
46
48
  this._options = options;
49
+ this._getServices = getServices;
47
50
 
48
51
  this._clientRpc = createProtoRpcPeer({
49
- exposed: clientServices.descriptors,
50
- handlers: clientServices.services,
52
+ exposed: clientServiceBundle,
53
+ handlers: {
54
+ HaloInvitationsService: async () => (await this._getServices()).services.HaloInvitationsService,
55
+ DevicesService: async () => (await this._getServices()).services.DevicesService,
56
+ SpaceInvitationsService: async () => (await this._getServices()).services.SpaceInvitationsService,
57
+ SpacesService: async () => (await this._getServices()).services.SpacesService,
58
+ SpaceService: async () => (await this._getServices()).services.SpaceService,
59
+ DataService: async () => (await this._getServices()).services.DataService,
60
+ ProfileService: async () => (await this._getServices()).services.ProfileService,
61
+ SystemService: async () => (await this._getServices()).services.SystemService,
62
+ DevtoolsHost: async () => (await this._getServices()).services.DevtoolsHost,
63
+ TracingService: async () => (await this._getServices()).services.TracingService
64
+ },
51
65
  port: appPort
52
66
  });
53
67
 
@@ -82,7 +96,7 @@ export class WorkerSession {
82
96
  async open() {
83
97
  await Promise.all([this._clientRpc.open(), this._systemRpc.open()]);
84
98
 
85
- await this._startTrigger.wait(); // TODO(dmaretskyi): Timeout.
99
+ await this._startTrigger.wait({ timeout: 3_000 });
86
100
 
87
101
  this._heartbeatTimer = setInterval(async () => {
88
102
  try {
@@ -1,23 +0,0 @@
1
- import { NetworkManager } from '@dxos/network-manager';
2
- import { Invitation } from '@dxos/protocols/proto/dxos/client/services';
3
- import { Identity, IdentityManager } from '../identity';
4
- /**
5
- * Creates and processes Halo invitations between devices.
6
- */
7
- export declare class HaloInvitations {
8
- private readonly _identityManager;
9
- private readonly _networkManager;
10
- private readonly _onInitialize;
11
- constructor(_identityManager: IdentityManager, _networkManager: NetworkManager, _onInitialize: () => Promise<void>);
12
- /**
13
- * Sends a HALO admission offer and waits for guest to accept.
14
- */
15
- createInvitation({ onFinish }?: {
16
- onFinish?: () => void;
17
- }): Promise<Invitation>;
18
- /**
19
- * Joins an existing identity HALO by invitation.
20
- */
21
- acceptInvitation(invitation: Invitation): Promise<Identity>;
22
- }
23
- //# sourceMappingURL=halo-invitations.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"halo-invitations.d.ts","sourceRoot":"","sources":["../../../../src/packlets/invitations/halo-invitations.ts"],"names":[],"mappings":"AAUA,OAAO,EAAyB,cAAc,EAAgB,MAAM,uBAAuB,CAAC;AAG5F,OAAO,EAAE,UAAU,EAAE,MAAM,4CAA4C,CAAC;AAGxE,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAExD;;GAEG;AACH,qBAAa,eAAe;IAExB,OAAO,CAAC,QAAQ,CAAC,gBAAgB;IACjC,OAAO,CAAC,QAAQ,CAAC,eAAe;IAChC,OAAO,CAAC,QAAQ,CAAC,aAAa;gBAFb,gBAAgB,EAAE,eAAe,EACjC,eAAe,EAAE,cAAc,EAC/B,aAAa,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC;IAGrD;;OAEG;IACG,gBAAgB,CAAC,EAAE,QAAQ,EAAE,GAAE;QAAE,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAA;KAAO,GAAG,OAAO,CAAC,UAAU,CAAC;IAoEzF;;OAEG;IACG,gBAAgB,CAAC,UAAU,EAAE,UAAU,GAAG,OAAO,CAAC,QAAQ,CAAC;CA6DlE"}
@@ -1,154 +0,0 @@
1
- "use strict";
2
- //
3
- // Copyright 2022 DXOS.org
4
- //
5
- var __importDefault = (this && this.__importDefault) || function (mod) {
6
- return (mod && mod.__esModule) ? mod : { "default": mod };
7
- };
8
- Object.defineProperty(exports, "__esModule", { value: true });
9
- exports.HaloInvitations = void 0;
10
- const assert_1 = __importDefault(require("assert"));
11
- const async_1 = require("@dxos/async");
12
- const debug_1 = require("@dxos/debug");
13
- const keys_1 = require("@dxos/keys");
14
- const log_1 = require("@dxos/log");
15
- const network_manager_1 = require("@dxos/network-manager");
16
- const protocol_plugin_rpc_1 = require("@dxos/protocol-plugin-rpc");
17
- const protocols_1 = require("@dxos/protocols");
18
- const services_1 = require("@dxos/protocols/proto/dxos/client/services");
19
- const rpc_1 = require("@dxos/rpc");
20
- /**
21
- * Creates and processes Halo invitations between devices.
22
- */
23
- class HaloInvitations {
24
- constructor(_identityManager, _networkManager, _onInitialize // TODO(burdon): ???
25
- ) {
26
- this._identityManager = _identityManager;
27
- this._networkManager = _networkManager;
28
- this._onInitialize = _onInitialize;
29
- }
30
- /**
31
- * Sends a HALO admission offer and waits for guest to accept.
32
- */
33
- async createInvitation({ onFinish } = {}) {
34
- var _a;
35
- const identity = (_a = this._identityManager.identity) !== null && _a !== void 0 ? _a : (0, debug_1.failUndefined)();
36
- const plugin = (0, protocol_plugin_rpc_1.createRpcPlugin)(async (port) => {
37
- const peer = (0, rpc_1.createProtoRpcPeer)({
38
- requested: {
39
- HaloGuestService: protocols_1.schema.getService('dxos.halo.invitations.HaloGuestService')
40
- },
41
- exposed: {
42
- HaloHostService: protocols_1.schema.getService('dxos.halo.invitations.HaloHostService')
43
- },
44
- handlers: {
45
- HaloHostService: {
46
- presentAdmissionCredentials: async ({ deviceKey, controlFeedKey, dataFeedKey }) => {
47
- (0, log_1.log)('processing admission request', { identityKey: identity.identityKey, deviceKey }, { file: "packages/sdk/client-services/src/packlets/invitations/halo-invitations.ts", line: 46 });
48
- // TODO(burdon): Use CredentialGenerator.
49
- const signer = identity.getIdentityCredentialSigner();
50
- await identity.controlPipeline.writer.write({
51
- '@type': 'dxos.echo.feed.CredentialsMessage',
52
- credential: await signer.createCredential({
53
- subject: deviceKey,
54
- assertion: {
55
- '@type': 'dxos.halo.credentials.AuthorizedDevice',
56
- identityKey: identity.identityKey,
57
- deviceKey
58
- }
59
- })
60
- });
61
- // TODO(dmaretskyi): Admit guest's feeds otherwise messages from them won't be processed by the pipeline.
62
- }
63
- }
64
- },
65
- port
66
- });
67
- await peer.open();
68
- {
69
- (0, log_1.log)('sending admission offer', { identityKey: identity.identityKey }, { file: "packages/sdk/client-services/src/packlets/invitations/halo-invitations.ts", line: 71 });
70
- await peer.rpc.HaloGuestService.presentAdmissionOffer({
71
- identityKey: identity.identityKey,
72
- haloSpaceKey: identity.haloSpaceKey,
73
- genesisFeedKey: identity.haloGenesisFeedKey
74
- });
75
- onFinish === null || onFinish === void 0 ? void 0 : onFinish();
76
- }
77
- await peer.close();
78
- await connection.close();
79
- });
80
- const topic = keys_1.PublicKey.random();
81
- const peerId = keys_1.PublicKey.random(); // TODO(burdon): Fails if using the actual peer key.
82
- const connection = await this._networkManager.openSwarmConnection({
83
- topic,
84
- peerId: topic,
85
- // peerId,
86
- protocol: (0, network_manager_1.createProtocolFactory)(topic, peerId, [plugin]),
87
- topology: new network_manager_1.StarTopology(topic)
88
- });
89
- return {
90
- type: services_1.Invitation.Type.INTERACTIVE,
91
- swarmKey: topic
92
- };
93
- }
94
- /**
95
- * Joins an existing identity HALO by invitation.
96
- */
97
- async acceptInvitation(invitation) {
98
- const admitted = new async_1.Trigger(); // TODO(burdon): Must not share across multiple connections.
99
- const plugin = (0, protocol_plugin_rpc_1.createRpcPlugin)(async (port) => {
100
- const peer = (0, rpc_1.createProtoRpcPeer)({
101
- requested: {
102
- // TODO(burdon): Rename in-bound.
103
- HaloHostService: protocols_1.schema.getService('dxos.halo.invitations.HaloHostService')
104
- },
105
- exposed: {
106
- // TODO(burdon): Rename out-bound?
107
- HaloGuestService: protocols_1.schema.getService('dxos.halo.invitations.HaloGuestService')
108
- },
109
- handlers: {
110
- // TODO(burdon): Factory to create handlers and open/close handlers.
111
- HaloGuestService: {
112
- presentAdmissionOffer: async ({ identityKey, haloSpaceKey, genesisFeedKey }) => {
113
- (0, log_1.log)('processing admission offer', { identityKey }, { file: "packages/sdk/client-services/src/packlets/invitations/halo-invitations.ts", line: 120 });
114
- const identity = await this._identityManager.acceptIdentity({
115
- identityKey,
116
- haloSpaceKey,
117
- haloGenesisFeedKey: genesisFeedKey
118
- });
119
- (0, log_1.log)('sending admission request', { identityKey: invitation.identityKey }, { file: "packages/sdk/client-services/src/packlets/invitations/halo-invitations.ts", line: 127 });
120
- await peer.rpc.HaloHostService.presentAdmissionCredentials({
121
- deviceKey: identity.deviceKey,
122
- controlFeedKey: keys_1.PublicKey.random(),
123
- dataFeedKey: keys_1.PublicKey.random()
124
- });
125
- // TODO(burdon): Document.
126
- await identity.ready();
127
- admitted.wake(identity);
128
- }
129
- }
130
- },
131
- port
132
- });
133
- await peer.open();
134
- await admitted.wait();
135
- await peer.close();
136
- });
137
- (0, assert_1.default)(invitation.swarmKey);
138
- const topic = keys_1.PublicKey.from(invitation.swarmKey);
139
- const peerId = keys_1.PublicKey.random(); // TODO(burdon): Fails if using the actual peer key.
140
- const connection = await this._networkManager.openSwarmConnection({
141
- topic,
142
- peerId: keys_1.PublicKey.random(),
143
- // peerId,
144
- protocol: (0, network_manager_1.createProtocolFactory)(topic, peerId, [plugin]),
145
- topology: new network_manager_1.StarTopology(topic)
146
- });
147
- const identity = await admitted.wait();
148
- await this._onInitialize();
149
- await connection.close();
150
- return identity;
151
- }
152
- }
153
- exports.HaloInvitations = HaloInvitations;
154
- //# sourceMappingURL=halo-invitations.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"halo-invitations.js","sourceRoot":"","sources":["../../../../src/packlets/invitations/halo-invitations.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;;;;;;AAEF,oDAA4B;AAE5B,uCAAsC;AACtC,uCAA4C;AAC5C,qCAAuC;AACvC,mCAAgC;AAChC,2DAA4F;AAC5F,mEAA4D;AAC5D,+CAAyC;AACzC,yEAAwE;AACxE,mCAA+C;AAI/C;;GAEG;AACH,MAAa,eAAe;IAC1B,YACmB,gBAAiC,EACjC,eAA+B,EAC/B,aAAkC,CAAC,oBAAoB;;QAFvD,qBAAgB,GAAhB,gBAAgB,CAAiB;QACjC,oBAAe,GAAf,eAAe,CAAgB;QAC/B,kBAAa,GAA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,GAAG,gBAAS,CAAC,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;QAClD,MAAM,MAAM,GAAG,gBAAS,CAAC,MAAM,EAAE,CAAC,CAAC,oDAAoD;QACvF,MAAM,UAAU,GAAG,MAAM,IAAI,CAAC,eAAe,CAAC,mBAAmB,CAAC;YAChE,KAAK;YACL,MAAM,EAAE,gBAAS,CAAC,MAAM,EAAE;YAC1B,UAAU;YACV,QAAQ,EAAE,IAAA,uCAAqB,EAAC,KAAK,EAAE,MAAM,EAAE,CAAC,MAAM,CAAC,CAAC;YACxD,QAAQ,EAAE,IAAI,8BAAY,CAAC,KAAK,CAAC;SAClC,CAAC,CAAC;QAEH,MAAM,QAAQ,GAAG,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC;QACvC,MAAM,IAAI,CAAC,aAAa,EAAE,CAAC;QAC3B,MAAM,UAAU,CAAC,KAAK,EAAE,CAAC;QACzB,OAAO,QAAQ,CAAC;IAClB,CAAC;CACF;AA9ID,0CA8IC"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=halo-invitations.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"halo-invitations.test.d.ts","sourceRoot":"","sources":["../../../../src/packlets/invitations/halo-invitations.test.ts"],"names":[],"mappings":""}