@dxos/client-services 0.8.2-main.fbd8ed0 → 0.8.2-staging.4d6ad0f

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 (100) hide show
  1. package/dist/lib/browser/{chunk-I3QLQXQD.mjs → chunk-AA2G5WEV.mjs} +375 -394
  2. package/dist/lib/browser/chunk-AA2G5WEV.mjs.map +7 -0
  3. package/dist/lib/browser/index.mjs +1 -1
  4. package/dist/lib/browser/index.mjs.map +3 -3
  5. package/dist/lib/browser/meta.json +1 -1
  6. package/dist/lib/browser/testing/index.mjs +1 -1
  7. package/dist/lib/browser/testing/index.mjs.map +3 -3
  8. package/dist/lib/node/{chunk-Y747YVDI.cjs → chunk-JC3EZ3VA.cjs} +378 -386
  9. package/dist/lib/node/chunk-JC3EZ3VA.cjs.map +7 -0
  10. package/dist/lib/node/index.cjs +47 -47
  11. package/dist/lib/node/index.cjs.map +3 -3
  12. package/dist/lib/node/meta.json +1 -1
  13. package/dist/lib/node/testing/index.cjs +8 -8
  14. package/dist/lib/node/testing/index.cjs.map +3 -3
  15. package/dist/lib/node-esm/{chunk-XNCWQTDB.mjs → chunk-ZCHUTUNU.mjs} +375 -383
  16. package/dist/lib/node-esm/chunk-ZCHUTUNU.mjs.map +7 -0
  17. package/dist/lib/node-esm/index.mjs +1 -1
  18. package/dist/lib/node-esm/index.mjs.map +3 -3
  19. package/dist/lib/node-esm/meta.json +1 -1
  20. package/dist/lib/node-esm/testing/index.mjs +1 -1
  21. package/dist/lib/node-esm/testing/index.mjs.map +3 -3
  22. package/dist/types/src/packlets/agents/edge-agent-manager.d.ts.map +1 -1
  23. package/dist/types/src/packlets/identity/authenticator.d.ts.map +1 -1
  24. package/dist/types/src/packlets/identity/default-space-state-machine.d.ts.map +1 -1
  25. package/dist/types/src/packlets/identity/identity-manager.d.ts +2 -2
  26. package/dist/types/src/packlets/identity/identity-manager.d.ts.map +1 -1
  27. package/dist/types/src/packlets/identity/identity-recovery-manager.d.ts +1 -1
  28. package/dist/types/src/packlets/identity/identity-recovery-manager.d.ts.map +1 -1
  29. package/dist/types/src/packlets/identity/identity-service.d.ts.map +1 -1
  30. package/dist/types/src/packlets/identity/identity.d.ts.map +1 -1
  31. package/dist/types/src/packlets/invitations/device-invitation-protocol.d.ts.map +1 -1
  32. package/dist/types/src/packlets/invitations/edge-invitation-handler.d.ts.map +1 -1
  33. package/dist/types/src/packlets/invitations/invitation-guest-extenstion.d.ts.map +1 -1
  34. package/dist/types/src/packlets/invitations/invitation-host-extension.d.ts.map +1 -1
  35. package/dist/types/src/packlets/invitations/invitation-topology.d.ts.map +1 -1
  36. package/dist/types/src/packlets/invitations/invitations-manager.d.ts.map +1 -1
  37. package/dist/types/src/packlets/invitations/space-invitation-protocol.d.ts +1 -1
  38. package/dist/types/src/packlets/invitations/space-invitation-protocol.d.ts.map +1 -1
  39. package/dist/types/src/packlets/locks/browser.d.ts.map +1 -1
  40. package/dist/types/src/packlets/locks/node.d.ts.map +1 -1
  41. package/dist/types/src/packlets/logging/logging-service.d.ts.map +1 -1
  42. package/dist/types/src/packlets/network/network-service.d.ts.map +1 -1
  43. package/dist/types/src/packlets/services/client-rpc-server.d.ts.map +1 -1
  44. package/dist/types/src/packlets/services/service-context.d.ts +1 -0
  45. package/dist/types/src/packlets/services/service-context.d.ts.map +1 -1
  46. package/dist/types/src/packlets/services/service-host.d.ts.map +1 -1
  47. package/dist/types/src/packlets/services/service-registry.d.ts.map +1 -1
  48. package/dist/types/src/packlets/space-export/space-archive-writer.d.ts.map +1 -1
  49. package/dist/types/src/packlets/spaces/automerge-space-state.d.ts.map +1 -1
  50. package/dist/types/src/packlets/spaces/data-space-manager.d.ts.map +1 -1
  51. package/dist/types/src/packlets/spaces/data-space.d.ts.map +1 -1
  52. package/dist/types/src/packlets/spaces/edge-feed-replicator.d.ts.map +1 -1
  53. package/dist/types/src/packlets/spaces/notarization-plugin.d.ts.map +1 -1
  54. package/dist/types/src/packlets/spaces/spaces-service.d.ts.map +1 -1
  55. package/dist/types/src/packlets/system/system-service.d.ts.map +1 -1
  56. package/dist/types/src/packlets/testing/test-builder.d.ts.map +1 -1
  57. package/dist/types/src/packlets/worker/worker-runtime.d.ts.map +1 -1
  58. package/dist/types/src/packlets/worker/worker-session.d.ts.map +1 -1
  59. package/dist/types/src/version.d.ts +1 -1
  60. package/dist/types/src/version.d.ts.map +1 -1
  61. package/package.json +39 -39
  62. package/src/packlets/agents/edge-agent-manager.ts +6 -6
  63. package/src/packlets/identity/authenticator.ts +2 -2
  64. package/src/packlets/identity/default-space-state-machine.ts +1 -1
  65. package/src/packlets/identity/identity-manager.ts +13 -9
  66. package/src/packlets/identity/identity-recovery-manager.ts +6 -4
  67. package/src/packlets/identity/identity-service.ts +4 -4
  68. package/src/packlets/identity/identity.ts +5 -5
  69. package/src/packlets/invitations/device-invitation-protocol.ts +1 -1
  70. package/src/packlets/invitations/edge-invitation-handler.ts +3 -3
  71. package/src/packlets/invitations/invitation-guest-extenstion.ts +3 -3
  72. package/src/packlets/invitations/invitation-host-extension.ts +5 -5
  73. package/src/packlets/invitations/invitation-topology.ts +1 -1
  74. package/src/packlets/invitations/invitations-handler.ts +2 -2
  75. package/src/packlets/invitations/invitations-manager.ts +15 -4
  76. package/src/packlets/invitations/space-invitation-protocol.ts +1 -1
  77. package/src/packlets/locks/browser.ts +4 -4
  78. package/src/packlets/locks/node.ts +2 -2
  79. package/src/packlets/logging/logging-service.ts +2 -2
  80. package/src/packlets/network/network-service.ts +2 -2
  81. package/src/packlets/services/client-rpc-server.ts +2 -2
  82. package/src/packlets/services/service-context.ts +10 -6
  83. package/src/packlets/services/service-host.ts +8 -4
  84. package/src/packlets/services/service-registry.ts +3 -3
  85. package/src/packlets/space-export/space-archive-writer.ts +3 -3
  86. package/src/packlets/spaces/automerge-space-state.ts +3 -3
  87. package/src/packlets/spaces/data-space-manager.ts +14 -14
  88. package/src/packlets/spaces/data-space.ts +18 -18
  89. package/src/packlets/spaces/edge-feed-replicator.ts +12 -12
  90. package/src/packlets/spaces/notarization-plugin.test.ts +1 -1
  91. package/src/packlets/spaces/notarization-plugin.ts +18 -18
  92. package/src/packlets/spaces/spaces-service.ts +5 -5
  93. package/src/packlets/system/system-service.ts +2 -2
  94. package/src/packlets/testing/test-builder.ts +3 -3
  95. package/src/packlets/worker/worker-runtime.ts +4 -4
  96. package/src/packlets/worker/worker-session.ts +3 -3
  97. package/src/version.ts +1 -1
  98. package/dist/lib/browser/chunk-I3QLQXQD.mjs.map +0 -7
  99. package/dist/lib/node/chunk-Y747YVDI.cjs.map +0 -7
  100. package/dist/lib/node-esm/chunk-XNCWQTDB.mjs.map +0 -7
@@ -1 +1 @@
1
- {"version":3,"file":"test-builder.d.ts","sourceRoot":"","sources":["../../../../../src/packlets/testing/test-builder.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,cAAc,CAAC;AAI3C,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,YAAY,EAAiB,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAC/G,OAAO,EAAe,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC1D,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAE9C,OAAO,EAAuB,0BAA0B,EAAE,KAAK,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACtG,OAAO,EAA0B,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAEpF,OAAO,EAAiB,WAAW,EAAE,KAAK,OAAO,EAAE,MAAM,6BAA6B,CAAC;AACvF,OAAO,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAC;AAEjE,OAAO,EAAsB,kBAAkB,EAA2B,MAAM,gBAAgB,CAAC;AACjG,OAAO,EAAE,kBAAkB,EAAE,cAAc,EAAE,KAAK,2BAA2B,EAAE,MAAM,aAAa,CAAC;AACnG,OAAO,EAAE,g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;AAEzD,OAAO,EAAE,KAAK,kBAAkB,EAA+C,MAAM,aAAa,CAAC;AAEnG,MAAM,MAAM,mBAAmB,GAAG;IAChC,WAAW,EAAE,kBAAkB,CAAC;IAChC,UAAU,EAAE,OAAO,CAAC;IACpB,OAAO,EAAE,OAAO,CAAC;IAEjB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,WAAW,EAAE,OAAO,CAAC,KAAK,GAAG,SAAS,CAAC,CAAC;CACzC,CAAC;AAEF;;GAEG;AACH,qBAAa,aAAa;IACxB,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAkB;IAC7C,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAC,CAAkB;IACnD,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAoC;IAC/D,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAiB;IAC/C,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAqB;IAElD,SAAgB,OAAO,iBAAsB,OAAO,CAAC,IAAI,CAAC,EAAI;IAGvD,MAAM,CAAC,EAAE,MAAM,CAAC;IAGhB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,sBAAsB,CAAC,EAAE,OAAO,CAAC;IAGjC,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB,aAAa,CAAC,EAAE,aAAa,CAAC;gBAEzB,EAAE,WAAW,EAAE,UAAU,EAAE,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,EAAE,mBAAmB;IAoEvF,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAerB,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;YAYd,eAAe;IAQ7B,OAAO,CAAC,kBAAkB;CAO3B"}
@@ -1,2 +1,2 @@
1
- export declare const DXOS_VERSION = "0.8.2-main.fbd8ed0";
1
+ export declare const DXOS_VERSION = "0.8.2-staging.4d6ad0f";
2
2
  //# sourceMappingURL=version.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../../src/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY,uBAAuB,CAAC"}
1
+ {"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../../src/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY,0BAA0B,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dxos/client-services",
3
- "version": "0.8.2-main.fbd8ed0",
3
+ "version": "0.8.2-staging.4d6ad0f",
4
4
  "description": "DXOS client services implementation",
5
5
  "homepage": "https://dxos.org",
6
6
  "bugs": "https://github.com/dxos/dxos/issues",
@@ -41,52 +41,52 @@
41
41
  "src"
42
42
  ],
43
43
  "dependencies": {
44
- "@automerge/automerge": "3.0.0-beta.0",
45
- "@automerge/automerge-repo": "2.0.0",
44
+ "@automerge/automerge": "3.0.0-beta.4",
45
+ "@automerge/automerge-repo": "2.0.1",
46
46
  "@obsidize/tar-browserify": "^5.2.0",
47
47
  "cbor-x": "^1.5.4",
48
48
  "platform": "^1.3.6",
49
- "@dxos/async": "0.8.2-main.fbd8ed0",
50
- "@dxos/client-protocol": "0.8.2-main.fbd8ed0",
51
- "@dxos/config": "0.8.2-main.fbd8ed0",
52
- "@dxos/codec-protobuf": "0.8.2-main.fbd8ed0",
53
- "@dxos/context": "0.8.2-main.fbd8ed0",
54
- "@dxos/crypto": "0.8.2-main.fbd8ed0",
55
- "@dxos/debug": "0.8.2-main.fbd8ed0",
56
- "@dxos/credentials": "0.8.2-main.fbd8ed0",
57
- "@dxos/echo-db": "0.8.2-main.fbd8ed0",
58
- "@dxos/echo-pipeline": "0.8.2-main.fbd8ed0",
59
- "@dxos/echo-schema": "0.8.2-main.fbd8ed0",
60
- "@dxos/edge-client": "0.8.2-main.fbd8ed0",
61
- "@dxos/echo-protocol": "0.8.2-main.fbd8ed0",
62
- "@dxos/feed-store": "0.8.2-main.fbd8ed0",
63
- "@dxos/indexing": "0.8.2-main.fbd8ed0",
64
- "@dxos/invariant": "0.8.2-main.fbd8ed0",
65
- "@dxos/keyring": "0.8.2-main.fbd8ed0",
66
- "@dxos/keys": "0.8.2-main.fbd8ed0",
67
- "@dxos/lock-file": "0.8.2-main.fbd8ed0",
68
- "@dxos/kv-store": "0.8.2-main.fbd8ed0",
69
- "@dxos/messaging": "0.8.2-main.fbd8ed0",
70
- "@dxos/log": "0.8.2-main.fbd8ed0",
71
- "@dxos/network-manager": "0.8.2-main.fbd8ed0",
72
- "@dxos/node-std": "0.8.2-main.fbd8ed0",
73
- "@dxos/protocols": "0.8.2-main.fbd8ed0",
74
- "@dxos/random-access-storage": "0.8.2-main.fbd8ed0",
75
- "@dxos/rpc": "0.8.2-main.fbd8ed0",
76
- "@dxos/teleport-extension-gossip": "0.8.2-main.fbd8ed0",
77
- "@dxos/teleport": "0.8.2-main.fbd8ed0",
78
- "@dxos/teleport-extension-object-sync": "0.8.2-main.fbd8ed0",
79
- "@dxos/timeframe": "0.8.2-main.fbd8ed0",
80
- "@dxos/tracing": "0.8.2-main.fbd8ed0",
81
- "@dxos/util": "0.8.2-main.fbd8ed0",
82
- "@dxos/websocket-rpc": "0.8.2-main.fbd8ed0"
49
+ "@dxos/client-protocol": "0.8.2-staging.4d6ad0f",
50
+ "@dxos/codec-protobuf": "0.8.2-staging.4d6ad0f",
51
+ "@dxos/config": "0.8.2-staging.4d6ad0f",
52
+ "@dxos/context": "0.8.2-staging.4d6ad0f",
53
+ "@dxos/credentials": "0.8.2-staging.4d6ad0f",
54
+ "@dxos/crypto": "0.8.2-staging.4d6ad0f",
55
+ "@dxos/debug": "0.8.2-staging.4d6ad0f",
56
+ "@dxos/echo-db": "0.8.2-staging.4d6ad0f",
57
+ "@dxos/async": "0.8.2-staging.4d6ad0f",
58
+ "@dxos/echo-pipeline": "0.8.2-staging.4d6ad0f",
59
+ "@dxos/echo-protocol": "0.8.2-staging.4d6ad0f",
60
+ "@dxos/echo-schema": "0.8.2-staging.4d6ad0f",
61
+ "@dxos/edge-client": "0.8.2-staging.4d6ad0f",
62
+ "@dxos/feed-store": "0.8.2-staging.4d6ad0f",
63
+ "@dxos/indexing": "0.8.2-staging.4d6ad0f",
64
+ "@dxos/keyring": "0.8.2-staging.4d6ad0f",
65
+ "@dxos/keys": "0.8.2-staging.4d6ad0f",
66
+ "@dxos/kv-store": "0.8.2-staging.4d6ad0f",
67
+ "@dxos/lock-file": "0.8.2-staging.4d6ad0f",
68
+ "@dxos/invariant": "0.8.2-staging.4d6ad0f",
69
+ "@dxos/log": "0.8.2-staging.4d6ad0f",
70
+ "@dxos/messaging": "0.8.2-staging.4d6ad0f",
71
+ "@dxos/network-manager": "0.8.2-staging.4d6ad0f",
72
+ "@dxos/node-std": "0.8.2-staging.4d6ad0f",
73
+ "@dxos/rpc": "0.8.2-staging.4d6ad0f",
74
+ "@dxos/teleport-extension-gossip": "0.8.2-staging.4d6ad0f",
75
+ "@dxos/teleport": "0.8.2-staging.4d6ad0f",
76
+ "@dxos/random-access-storage": "0.8.2-staging.4d6ad0f",
77
+ "@dxos/teleport-extension-object-sync": "0.8.2-staging.4d6ad0f",
78
+ "@dxos/timeframe": "0.8.2-staging.4d6ad0f",
79
+ "@dxos/protocols": "0.8.2-staging.4d6ad0f",
80
+ "@dxos/tracing": "0.8.2-staging.4d6ad0f",
81
+ "@dxos/websocket-rpc": "0.8.2-staging.4d6ad0f",
82
+ "@dxos/util": "0.8.2-staging.4d6ad0f"
83
83
  },
84
84
  "devDependencies": {
85
85
  "@types/platform": "^1.3.4",
86
86
  "@types/readable-stream": "^2.3.9",
87
87
  "get-port-please": "^3.1.1",
88
- "@dxos/signal": "0.8.2-main.fbd8ed0",
89
- "@dxos/test-utils": "0.8.2-main.fbd8ed0"
88
+ "@dxos/signal": "0.8.2-staging.4d6ad0f",
89
+ "@dxos/test-utils": "0.8.2-staging.4d6ad0f"
90
90
  },
91
91
  "publishConfig": {
92
92
  "access": "public"
@@ -50,7 +50,7 @@ export class EdgeAgentManager extends Resource {
50
50
  }
51
51
 
52
52
  @synchronized
53
- public async createAgent() {
53
+ public async createAgent(): Promise<void> {
54
54
  invariant(this.isOpen);
55
55
  invariant(this._edgeHttpClient);
56
56
  invariant(this._edgeFeatures?.agents);
@@ -81,7 +81,7 @@ export class EdgeAgentManager extends Resource {
81
81
  this._updateStatus(EdgeAgentStatus.ACTIVE, deviceKey);
82
82
  }
83
83
 
84
- protected override async _open() {
84
+ protected override async _open(): Promise<void> {
85
85
  const isEnabled = this._edgeHttpClient && this._edgeFeatures?.agents;
86
86
 
87
87
  log('edge agent manager open', { isEnabled });
@@ -112,12 +112,12 @@ export class EdgeAgentManager extends Resource {
112
112
  });
113
113
  }
114
114
 
115
- protected override async _close() {
115
+ protected override async _close(): Promise<void> {
116
116
  this._fetchAgentStatusTask = undefined;
117
117
  this._lastKnownDeviceCount = 0;
118
118
  }
119
119
 
120
- protected async _fetchAgentStatus() {
120
+ protected async _fetchAgentStatus(): Promise<void> {
121
121
  invariant(this._edgeHttpClient);
122
122
  try {
123
123
  log('fetching agent status');
@@ -145,7 +145,7 @@ export class EdgeAgentManager extends Resource {
145
145
  * because most of the time we'll be getting an empty response.
146
146
  * Instead, we stay in active polling mode while there are spaces where we don't see our agent's feed.
147
147
  */
148
- protected _ensureAgentIsInSpaces(agentDeviceKey: PublicKey) {
148
+ protected _ensureAgentIsInSpaces(agentDeviceKey: PublicKey): void {
149
149
  let activePollingEnabled = false;
150
150
  for (const space of this._dataSpaceManager.spaces.values()) {
151
151
  if (space.getEdgeReplicationSetting() === EdgeReplicationSetting.DISABLED) {
@@ -171,7 +171,7 @@ export class EdgeAgentManager extends Resource {
171
171
  }
172
172
  }
173
173
 
174
- private _updateStatus(status: EdgeAgentStatus, deviceKey: PublicKey | undefined) {
174
+ private _updateStatus(status: EdgeAgentStatus, deviceKey: PublicKey | undefined): void {
175
175
  this._agentStatus = status;
176
176
  this._agentDeviceKey = deviceKey;
177
177
  this.agentStatusChanged.emit(status);
@@ -46,7 +46,7 @@ export class TrustedKeySetAuthVerifier {
46
46
 
47
47
  constructor(private readonly _params: TrustedKeySetAuthVerifierParams) {}
48
48
 
49
- async close() {
49
+ async close(): Promise<void> {
50
50
  await this._ctx.dispose();
51
51
  }
52
52
 
@@ -98,7 +98,7 @@ export class TrustedKeySetAuthVerifier {
98
98
  };
99
99
  }
100
100
 
101
- private _isTrustedKey(deviceKey: PublicKey) {
101
+ private _isTrustedKey(deviceKey: PublicKey): boolean {
102
102
  const deviceSet = this._params.trustedKeysProvider();
103
103
  return deviceSet.has(deviceKey);
104
104
  }
@@ -24,7 +24,7 @@ export class DefaultSpaceStateMachine implements CredentialProcessor {
24
24
  return this._spaceId;
25
25
  }
26
26
 
27
- async processCredential(credential: Credential) {
27
+ async processCredential(credential: Credential): Promise<void> {
28
28
  const assertion = getCredentialAssertion(credential);
29
29
  switch (assertion['@type']) {
30
30
  case 'dxos.halo.credentials.DefaultSpace': {
@@ -62,7 +62,7 @@ export type JoinIdentityParams = {
62
62
  };
63
63
 
64
64
  export type CreateIdentityOptions = {
65
- displayName?: string;
65
+ profile?: ProfileDocument;
66
66
  // device profile for device creating the identity.
67
67
  deviceProfile?: DeviceProfileDocument;
68
68
  };
@@ -111,7 +111,7 @@ export class IdentityManager {
111
111
  }
112
112
 
113
113
  @Trace.span({ showInBrowserTimeline: true })
114
- async open(ctx: Context) {
114
+ async open(ctx: Context): Promise<void> {
115
115
  const traceId = PublicKey.random().toHex();
116
116
  log.trace('dxos.halo.identity-manager.open', trace.begin({ id: traceId }));
117
117
 
@@ -131,11 +131,11 @@ export class IdentityManager {
131
131
  log.trace('dxos.halo.identity-manager.open', trace.end({ id: traceId }));
132
132
  }
133
133
 
134
- async close() {
134
+ async close(): Promise<void> {
135
135
  await this._identity?.close(new Context());
136
136
  }
137
137
 
138
- async createIdentity({ displayName, deviceProfile }: CreateIdentityOptions = {}) {
138
+ async createIdentity({ profile, deviceProfile }: CreateIdentityOptions = {}): Promise<Identity> {
139
139
  // TODO(nf): populate using context from ServiceContext?
140
140
  invariant(!this._identity, 'Identity already exists.');
141
141
  log('creating identity...');
@@ -171,8 +171,8 @@ export class IdentityManager {
171
171
  ),
172
172
  ];
173
173
 
174
- if (displayName) {
175
- credentials.push(await generator.createProfileCredential({ displayName }));
174
+ if (profile) {
175
+ credentials.push(await generator.createProfileCredential(profile));
176
176
  }
177
177
 
178
178
  // Device authorization (writes device chain).
@@ -263,7 +263,11 @@ export class IdentityManager {
263
263
  /**
264
264
  * Accept an existing identity. Expects its device key to be authorized (now or later).
265
265
  */
266
- public async acceptIdentity(identity: Identity, identityRecord: IdentityRecord, profile?: DeviceProfileDocument) {
266
+ public async acceptIdentity(
267
+ identity: Identity,
268
+ identityRecord: IdentityRecord,
269
+ profile?: DeviceProfileDocument,
270
+ ): Promise<void> {
267
271
  this._identity = identity;
268
272
 
269
273
  // Identity becomes ready after device chain is replicated. Wait for it before storing the record.
@@ -287,7 +291,7 @@ export class IdentityManager {
287
291
  /**
288
292
  * Update the profile document of an existing identity.
289
293
  */
290
- async updateProfile(profile: ProfileDocument) {
294
+ async updateProfile(profile: ProfileDocument): Promise<ProfileDocument> {
291
295
  invariant(this._identity, 'Identity not initialized.');
292
296
  // TODO(wittjosiah): Use CredentialGenerator.
293
297
  const credential = await this._identity.getIdentityCredentialSigner().createCredential({
@@ -330,7 +334,7 @@ export class IdentityManager {
330
334
  };
331
335
  }
332
336
 
333
- private async _constructIdentity(identityRecord: IdentityRecord) {
337
+ private async _constructIdentity(identityRecord: IdentityRecord): Promise<Identity> {
334
338
  invariant(!this._identity);
335
339
  log('constructing identity', { identityRecord });
336
340
 
@@ -32,7 +32,9 @@ export class EdgeIdentityRecoveryManager {
32
32
  private readonly _acceptRecoveredIdentity: (params: JoinIdentityParams) => Promise<Identity>,
33
33
  ) {}
34
34
 
35
- public async createRecoveryCredential({ data }: CreateRecoveryCredentialRequest) {
35
+ public async createRecoveryCredential({
36
+ data,
37
+ }: CreateRecoveryCredentialRequest): Promise<{ recoveryCode: string | undefined }> {
36
38
  const identity = this._identityProvider();
37
39
  invariant(identity);
38
40
 
@@ -102,7 +104,7 @@ export class EdgeIdentityRecoveryManager {
102
104
  signature,
103
105
  clientDataJson,
104
106
  authenticatorData,
105
- }: RecoverIdentityRequest.ExternalSignature) {
107
+ }: RecoverIdentityRequest.ExternalSignature): Promise<void> {
106
108
  invariant(this._edgeClient, 'Not connected to EDGE.');
107
109
 
108
110
  const request: EdgeRecoverIdentityRequest = {
@@ -135,7 +137,7 @@ export class EdgeIdentityRecoveryManager {
135
137
  /**
136
138
  * Recovery identity using an opaque token sent to the user's email.
137
139
  */
138
- public async recoverIdentityWithToken({ token }: { token: string }) {
140
+ public async recoverIdentityWithToken({ token }: { token: string }): Promise<void> {
139
141
  invariant(this._edgeClient, 'Not connected to EDGE.');
140
142
 
141
143
  const deviceKey = await this._keyring.createKey();
@@ -159,7 +161,7 @@ export class EdgeIdentityRecoveryManager {
159
161
  });
160
162
  }
161
163
 
162
- public async recoverIdentity({ recoveryCode }: { recoveryCode: string }) {
164
+ public async recoverIdentity({ recoveryCode }: { recoveryCode: string }): Promise<void> {
163
165
  invariant(this._edgeClient, 'Not connected to EDGE.');
164
166
 
165
167
  const recoveryKeypair = keyPairFromSeedPhrase(recoveryCode);
@@ -41,7 +41,7 @@ export class IdentityServiceImpl extends Resource implements IdentityService {
41
41
  super();
42
42
  }
43
43
 
44
- protected override async _open() {
44
+ protected override async _open(): Promise<void> {
45
45
  const identity = this._identityManager.identity;
46
46
  if (identity && !identity.defaultSpaceId) {
47
47
  await this._fixIdentityWithoutDefaultSpace(identity);
@@ -49,13 +49,13 @@ export class IdentityServiceImpl extends Resource implements IdentityService {
49
49
  }
50
50
 
51
51
  async createIdentity(request: CreateIdentityRequest): Promise<IdentityProto> {
52
- await this._createIdentity({ displayName: request.profile?.displayName, deviceProfile: request.deviceProfile });
52
+ await this._createIdentity({ profile: request.profile, deviceProfile: request.deviceProfile });
53
53
  const dataSpaceManager = this._dataSpaceManagerProvider();
54
54
  await this._createDefaultSpace(dataSpaceManager);
55
55
  return this._getIdentity()!;
56
56
  }
57
57
 
58
- private async _createDefaultSpace(dataSpaceManager: DataSpaceManager) {
58
+ private async _createDefaultSpace(dataSpaceManager: DataSpaceManager): Promise<void> {
59
59
  const space = await dataSpaceManager!.createDefaultSpace();
60
60
  const identity = this._identityManager.identity;
61
61
  invariant(identity);
@@ -141,7 +141,7 @@ export class IdentityServiceImpl extends Resource implements IdentityService {
141
141
  });
142
142
  }
143
143
 
144
- private async _fixIdentityWithoutDefaultSpace(identity: Identity) {
144
+ private async _fixIdentityWithoutDefaultSpace(identity: Identity): Promise<void> {
145
145
  let recodedDefaultSpace = false;
146
146
  let foundDefaultSpace = false;
147
147
  const dataSpaceManager = this._dataSpaceManagerProvider();
@@ -116,7 +116,7 @@ export class Identity {
116
116
  }
117
117
 
118
118
  @trace.span()
119
- async open(ctx: Context) {
119
+ async open(ctx: Context): Promise<void> {
120
120
  await this._presence?.open();
121
121
  await this.space.spaceState.addCredentialProcessor(this._deviceStateMachine);
122
122
  await this.space.spaceState.addCredentialProcessor(this._profileStateMachine);
@@ -127,13 +127,13 @@ export class Identity {
127
127
  await this.space.open(ctx);
128
128
  }
129
129
 
130
- public async joinNetwork() {
130
+ public async joinNetwork(): Promise<void> {
131
131
  await this.space.startProtocol();
132
132
  await this._edgeFeedReplicator?.open();
133
133
  }
134
134
 
135
135
  @trace.span()
136
- async close(ctx: Context) {
136
+ async close(ctx: Context): Promise<void> {
137
137
  await this._presence?.close();
138
138
  await this.authVerifier.close();
139
139
  await this.space.spaceState.removeCredentialProcessor(this._defaultSpaceStateMachine);
@@ -149,7 +149,7 @@ export class Identity {
149
149
  await this.space.close();
150
150
  }
151
151
 
152
- async ready() {
152
+ async ready(): Promise<void> {
153
153
  await this._deviceStateMachine.deviceChainReady.wait();
154
154
 
155
155
  await this.controlPipeline.state.waitUntilReachedTargetTimeframe({ timeout: LOAD_CONTROL_FEEDS_TIMEOUT });
@@ -210,7 +210,7 @@ export class Identity {
210
210
  return createCredentialSignerWithKey(this._signer, this.deviceKey);
211
211
  }
212
212
 
213
- async updateDefaultSpace(spaceId: SpaceId) {
213
+ async updateDefaultSpace(spaceId: SpaceId): Promise<void> {
214
214
  const credential = await this.getDeviceCredentialSigner().createCredential({
215
215
  subject: this.identityKey,
216
216
  assertion: { '@type': 'dxos.halo.credentials.DefaultSpace', spaceId },
@@ -66,7 +66,7 @@ export class DeviceInvitationProtocol implements InvitationProtocol {
66
66
  };
67
67
  }
68
68
 
69
- checkInvitation(invitation: Partial<Invitation>) {
69
+ checkInvitation(invitation: Partial<Invitation>): AlreadyJoinedError | undefined {
70
70
  try {
71
71
  const identity = this._getIdentity();
72
72
  if (identity) {
@@ -61,7 +61,7 @@ export class EdgeInvitationHandler implements FlowLockHolder {
61
61
  guardedState: GuardedInvitationState,
62
62
  protocol: InvitationProtocol,
63
63
  deviceProfile?: DeviceProfileDocument,
64
- ) {
64
+ ): void {
65
65
  if (!this._client) {
66
66
  log('edge disabled');
67
67
  return;
@@ -118,7 +118,7 @@ export class EdgeInvitationHandler implements FlowLockHolder {
118
118
  guardedState: GuardedInvitationState,
119
119
  admissionRequest: SpaceAdmissionRequest,
120
120
  spaceId: SpaceId,
121
- ) {
121
+ ): Promise<void> {
122
122
  try {
123
123
  log('edge invitation flow');
124
124
  this._flowLock = await tryAcquireBeforeContextDisposed(ctx, guardedState.mutex);
@@ -182,7 +182,7 @@ export class EdgeInvitationHandler implements FlowLockHolder {
182
182
  return this._flowLock != null;
183
183
  }
184
184
 
185
- private _calculateNextRetryMs() {
185
+ private _calculateNextRetryMs(): number {
186
186
  return this._retryInterval + Math.random() * this._retryJitter;
187
187
  }
188
188
  }
@@ -82,7 +82,7 @@ export class InvitationGuestExtension
82
82
  };
83
83
  }
84
84
 
85
- override async onOpen(context: ExtensionContext) {
85
+ override async onOpen(context: ExtensionContext): Promise<void> {
86
86
  await super.onOpen(context);
87
87
 
88
88
  try {
@@ -115,7 +115,7 @@ export class InvitationGuestExtension
115
115
  }
116
116
  }
117
117
 
118
- override async onClose() {
118
+ override async onClose(): Promise<void> {
119
119
  await this._destroy();
120
120
  }
121
121
 
@@ -123,7 +123,7 @@ export class InvitationGuestExtension
123
123
  await this._destroy();
124
124
  }
125
125
 
126
- private async _destroy() {
126
+ private async _destroy(): Promise<void> {
127
127
  await this._ctx.dispose();
128
128
  if (this._invitationFlowLock != null) {
129
129
  this._invitationFlowLock.release();
@@ -232,7 +232,7 @@ export class InvitationHostExtension
232
232
  };
233
233
  }
234
234
 
235
- override async onOpen(context: ExtensionContext) {
235
+ override async onOpen(context: ExtensionContext): Promise<void> {
236
236
  await super.onOpen(context);
237
237
 
238
238
  try {
@@ -272,7 +272,7 @@ export class InvitationHostExtension
272
272
  return invitation;
273
273
  }
274
274
 
275
- private _assertInvitationState(stateOrMany: Invitation.State | Invitation.State[]) {
275
+ private _assertInvitationState(stateOrMany: Invitation.State | Invitation.State[]): void {
276
276
  const invitation = this._requireActiveInvitation();
277
277
  const validStates = Array.isArray(stateOrMany) ? stateOrMany : [stateOrMany];
278
278
  if (!validStates.includes(invitation.state)) {
@@ -283,15 +283,15 @@ export class InvitationHostExtension
283
283
  }
284
284
  }
285
285
 
286
- override async onClose() {
286
+ override async onClose(): Promise<void> {
287
287
  await this._destroy();
288
288
  }
289
289
 
290
- override async onAbort() {
290
+ override async onAbort(): Promise<void> {
291
291
  await this._destroy();
292
292
  }
293
293
 
294
- private async _destroy() {
294
+ private async _destroy(): Promise<void> {
295
295
  await this._ctx.dispose();
296
296
  if (this._invitationFlowLock != null) {
297
297
  this._invitationFlowLock?.release();
@@ -81,7 +81,7 @@ export class InvitationTopology implements Topology {
81
81
  this._seenPeers.clear();
82
82
  }
83
83
 
84
- toString() {
84
+ toString(): string {
85
85
  return `InvitationTopology(${this._role === InvitationOptions.Role.GUEST ? 'guest' : 'host'})`;
86
86
  }
87
87
  }
@@ -453,7 +453,7 @@ export class InvitationsHandler {
453
453
  setState: (newState: Invitation.State) => void,
454
454
  authenticated: Trigger<string>,
455
455
  options: { timeout: number },
456
- ) {
456
+ ): Promise<void> {
457
457
  for (let attempt = 1; attempt <= MAX_OTP_ATTEMPTS; attempt++) {
458
458
  log('guest waiting for authentication code...');
459
459
  setState(Invitation.State.READY_FOR_AUTHENTICATION);
@@ -482,7 +482,7 @@ export class InvitationsHandler {
482
482
  setState: (newState: Invitation.State) => void,
483
483
  invitation: Invitation,
484
484
  introductionResponse: IntroductionResponse,
485
- ) {
485
+ ): Promise<void> {
486
486
  if (invitation.guestKeypair?.privateKey == null) {
487
487
  throw new Error('keypair missing in the invitation');
488
488
  }
@@ -182,7 +182,7 @@ export class InvitationsManager {
182
182
  return [...this._acceptInvitations.values()].map((i) => i.get());
183
183
  }
184
184
 
185
- onPersistentInvitationsLoaded(ctx: Context, callback: () => void) {
185
+ onPersistentInvitationsLoaded(ctx: Context, callback: () => void): void {
186
186
  if (this._persistentInvitationsLoaded) {
187
187
  callback();
188
188
  } else {
@@ -231,7 +231,10 @@ export class InvitationsManager {
231
231
  } satisfies Invitation;
232
232
  }
233
233
 
234
- private _createObservableInvitation(handler: InvitationProtocol, invitation: Invitation) {
234
+ private _createObservableInvitation(
235
+ handler: InvitationProtocol,
236
+ invitation: Invitation,
237
+ ): { ctx: Context; stream: PushStream<Invitation>; observableInvitation: CancellableInvitation } {
235
238
  const stream = new PushStream<Invitation>();
236
239
  const ctx = new Context({
237
240
  onError: (err) => {
@@ -254,7 +257,15 @@ export class InvitationsManager {
254
257
  return { ctx, stream, observableInvitation };
255
258
  }
256
259
 
257
- private _createObservableAcceptingInvitation(handler: InvitationProtocol, initialState: Invitation) {
260
+ private _createObservableAcceptingInvitation(
261
+ handler: InvitationProtocol,
262
+ initialState: Invitation,
263
+ ): {
264
+ ctx: Context;
265
+ invitation: AuthenticatingInvitation;
266
+ stream: PushStream<Invitation>;
267
+ otpEnteredTrigger: Trigger<string>;
268
+ } {
258
269
  const otpEnteredTrigger = new Trigger<string>();
259
270
  const stream = new PushStream<Invitation>();
260
271
  const ctx = new Context({
@@ -310,7 +321,7 @@ export class InvitationsManager {
310
321
  }
311
322
  }
312
323
 
313
- private _onInvitationComplete(invitation: CancellableInvitation, callback: () => void) {
324
+ private _onInvitationComplete(invitation: CancellableInvitation, callback: () => void): void {
314
325
  invitation.subscribe(
315
326
  () => {},
316
327
  () => {},
@@ -145,7 +145,7 @@ export class SpaceInvitationProtocol implements InvitationProtocol {
145
145
  await writeMessages(space.inner.controlPipeline.writer, [credential]);
146
146
  }
147
147
 
148
- checkInvitation(invitation: Partial<Invitation>) {
148
+ checkInvitation(invitation: Partial<Invitation>): InvalidInvitationError | AlreadyJoinedError | undefined {
149
149
  if (invitation.spaceKey == null) {
150
150
  return new InvalidInvitationError('No spaceKey was provided for a space invitation.');
151
151
  }
@@ -33,7 +33,7 @@ export class Lock implements ResourceLock {
33
33
  return this._lockKey;
34
34
  }
35
35
 
36
- async acquire() {
36
+ async acquire(): Promise<void> {
37
37
  this._broadcastChannel.postMessage({
38
38
  message: Message.ACQUIRING,
39
39
  });
@@ -49,17 +49,17 @@ export class Lock implements ResourceLock {
49
49
  }
50
50
  }
51
51
 
52
- async release() {
52
+ async release(): Promise<void> {
53
53
  this._releaseTrigger.wake();
54
54
  }
55
55
 
56
- private _onMessage(event: MessageEvent<any>) {
56
+ private _onMessage(event: MessageEvent<any>): void {
57
57
  if (event.data.message === Message.ACQUIRING) {
58
58
  this._releaseTrigger.wake();
59
59
  }
60
60
  }
61
61
 
62
- private async _requestLock(steal = false) {
62
+ private async _requestLock(steal = false): Promise<void> {
63
63
  log('requesting lock...', { steal });
64
64
  const acquired = new Trigger();
65
65