@dxos/client-services 0.3.11-main.8d54a30 → 0.3.11-main.8feb6a5

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.
@@ -31,7 +31,7 @@ __export(testing_exports, {
31
31
  syncItemsLocal: () => syncItemsLocal
32
32
  });
33
33
  module.exports = __toCommonJS(testing_exports);
34
- var import_chunk_FFVCPJTG = require("../../chunk-FFVCPJTG.cjs");
34
+ var import_chunk_72F5Z47S = require("../../chunk-72F5Z47S.cjs");
35
35
  var import_credentials = require("@dxos/credentials");
36
36
  var import_keys = require("@dxos/keys");
37
37
  var import_async = require("@dxos/async");
@@ -216,7 +216,7 @@ var createInvitation = (host, options) => {
216
216
  authMethod: import_services.Invitation.AuthMethod.NONE,
217
217
  ...options ?? {}
218
218
  };
219
- if (host instanceof import_chunk_FFVCPJTG.ServiceContext) {
219
+ if (host instanceof import_chunk_72F5Z47S.ServiceContext) {
220
220
  const hostHandler = host.getInvitationHandler({
221
221
  kind: import_services.Invitation.Kind.SPACE,
222
222
  ...options
@@ -227,7 +227,7 @@ var createInvitation = (host, options) => {
227
227
  };
228
228
  var acceptInvitation = (guest, invitation) => {
229
229
  invitation = sanitizeInvitation(invitation);
230
- if (guest instanceof import_chunk_FFVCPJTG.ServiceContext) {
230
+ if (guest instanceof import_chunk_72F5Z47S.ServiceContext) {
231
231
  const guestHandler = guest.getInvitationHandler({
232
232
  kind: invitation.kind
233
233
  });
@@ -236,7 +236,7 @@ var acceptInvitation = (guest, invitation) => {
236
236
  return guest.join(invitation);
237
237
  };
238
238
  var createServiceHost = (config, signalManagerContext) => {
239
- return new import_chunk_FFVCPJTG.ClientServicesHost({
239
+ return new import_chunk_72F5Z47S.ClientServicesHost({
240
240
  config,
241
241
  signalManager: new import_messaging.MemorySignalManager(signalManagerContext),
242
242
  transportFactory: import_network_manager.MemoryTransportFactory
@@ -250,8 +250,8 @@ var createServiceContext = ({ signalContext = new import_messaging.MemorySignalM
250
250
  signalManager,
251
251
  transportFactory: import_network_manager.MemoryTransportFactory
252
252
  });
253
- const modelFactory = (0, import_chunk_FFVCPJTG.createDefaultModelFactory)();
254
- return new import_chunk_FFVCPJTG.ServiceContext(storage, networkManager, signalManager, modelFactory);
253
+ const modelFactory = (0, import_chunk_72F5Z47S.createDefaultModelFactory)();
254
+ return new import_chunk_72F5Z47S.ServiceContext(storage, networkManager, signalManager, modelFactory);
255
255
  };
256
256
  var createPeers = async (numPeers) => {
257
257
  const signalContext = new import_messaging.MemorySignalManagerContext();
@@ -335,7 +335,7 @@ var TestPeer = class {
335
335
  feedStore: this.feedStore,
336
336
  networkManager: this.networkManager,
337
337
  metadataStore: this.metadataStore,
338
- modelFactory: (0, import_chunk_FFVCPJTG.createDefaultModelFactory)(),
338
+ modelFactory: (0, import_chunk_72F5Z47S.createDefaultModelFactory)(),
339
339
  snapshotStore: this.snapshotStore,
340
340
  blobStore: this.blobStore
341
341
  });
@@ -347,7 +347,7 @@ var TestPeer = class {
347
347
  return this._props.automergeHost ??= new import_echo_pipeline.AutomergeHost(this.storage.createDirectory("automerge"));
348
348
  }
349
349
  get dataSpaceManager() {
350
- return this._props.dataSpaceManager ??= new import_chunk_FFVCPJTG.DataSpaceManager(this.spaceManager, this.metadataStore, new import_echo_pipeline.DataServiceSubscriptions(), this.keyring, this.identity, this.feedStore, this.automergeHost);
350
+ return this._props.dataSpaceManager ??= new import_chunk_72F5Z47S.DataSpaceManager(this.spaceManager, this.metadataStore, new import_echo_pipeline.DataServiceSubscriptions(), this.keyring, this.identity, this.feedStore, this.automergeHost);
351
351
  }
352
352
  async createIdentity() {
353
353
  this._props.signingContext ??= await createSigningContext(this.keyring);
@@ -1,6 +1,6 @@
1
1
  import { Stream } from '@dxos/codec-protobuf';
2
2
  import { type Keyring } from '@dxos/keyring';
3
- import { type Identity, type IdentityService, type QueryIdentityResponse, type RecoverIdentityRequest, type SignPresentationRequest } from '@dxos/protocols/proto/dxos/client/services';
3
+ import { type CreateIdentityRequest, type Identity, type IdentityService, type QueryIdentityResponse, type RecoverIdentityRequest, type SignPresentationRequest } from '@dxos/protocols/proto/dxos/client/services';
4
4
  import { type Presentation, type ProfileDocument } from '@dxos/protocols/proto/dxos/halo/credentials';
5
5
  import { type CreateIdentityOptions, type IdentityManager } from './identity-manager';
6
6
  export declare class IdentityServiceImpl implements IdentityService {
@@ -8,8 +8,8 @@ export declare class IdentityServiceImpl implements IdentityService {
8
8
  private readonly _identityManager;
9
9
  private readonly _keyring;
10
10
  private readonly _onProfileUpdate?;
11
- constructor(_createIdentity: (params?: CreateIdentityOptions) => Promise<Identity>, _identityManager: IdentityManager, _keyring: Keyring, _onProfileUpdate?: ((profile: ProfileDocument | undefined) => Promise<void>) | undefined);
12
- createIdentity(request: ProfileDocument): Promise<Identity>;
11
+ constructor(_createIdentity: (params: CreateIdentityOptions, useAutomerge: boolean) => Promise<Identity>, _identityManager: IdentityManager, _keyring: Keyring, _onProfileUpdate?: ((profile: ProfileDocument | undefined) => Promise<void>) | undefined);
12
+ createIdentity(request: CreateIdentityRequest): Promise<Identity>;
13
13
  recoverIdentity(request: RecoverIdentityRequest): Promise<Identity>;
14
14
  queryIdentity(): Stream<QueryIdentityResponse>;
15
15
  private _getIdentity;
@@ -1 +1 @@
1
- {"version":3,"file":"identity-service.d.ts","sourceRoot":"","sources":["../../../../../src/packlets/identity/identity-service.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAI9C,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EACL,KAAK,QAAQ,EACb,KAAK,eAAe,EACpB,KAAK,qBAAqB,EAC1B,KAAK,sBAAsB,EAC3B,KAAK,uBAAuB,EAC7B,MAAM,4CAA4C,CAAC;AACpD,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,eAAe,EAAE,MAAM,6CAA6C,CAAC;AAEtG,OAAO,EAAE,KAAK,qBAAqB,EAAE,KAA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OAAO,CAAC,QAAQ,CAAC,aAAa,CAAe;IAC7C,OAAO,CAAC,cAAc,CAAC,CAAgB;IACvC,OAAO,CAAC,eAAe,CAAC,CAAiB;IACzC,OAAO,CAAC,QAAQ,CAAC,CAAU;IAC3B,OAAO,CAAC,UAAU,CAAC,CAA8B;IACjD,OAAO,CAAC,cAAc,CAAC,CAAyC;IAEhE,OAAO,CAAC,eAAe,CAAkB;IAGzC,OAAO,CAAC,QAAQ,CAAS;IAGzB,OAAO,CAAC,KAAK,CAAS;gBAEV,EACV,MAAM,EACN,YAA0C,EAC1C,gBAAgB,EAChB,aAAa,EACb,OAAO,EAEP,OAAO,EACP,SAAS,GACV,GAAE,wBAA6B;IAiDhC,IAAI,MAAM,YAET;IAED,IAAI,MAAM,uBAET;IAED,IAAI,OAAO,mBAEV;IAED,IAAI,eAAe,oCAElB;IAED,IAAI,WAAW,sDAEd;IAED,IAAI,QAAQ,4BAEX;IAED;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,EAAE,GAAG,OAAO,EAAE,EAAE,iBAAiB;IAiC9C,IAAI,CAAC,GAAG,EAAE,OAAO;IA6FjB,KAAK;IAgBL,KAAK;YAYG,eAAe;CAiC9B"}
@@ -1,2 +1,2 @@
1
- export declare const DXOS_VERSION = "0.3.11-main.8d54a30";
1
+ export declare const DXOS_VERSION = "0.3.11-main.8feb6a5";
2
2
  //# sourceMappingURL=version.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dxos/client-services",
3
- "version": "0.3.11-main.8d54a30",
3
+ "version": "0.3.11-main.8feb6a5",
4
4
  "description": "DXOS client services implementation",
5
5
  "homepage": "https://dxos.org",
6
6
  "bugs": "https://github.com/dxos/dxos/issues",
@@ -22,44 +22,44 @@
22
22
  ],
23
23
  "dependencies": {
24
24
  "platform": "^1.3.6",
25
- "@dxos/async": "0.3.11-main.8d54a30",
26
- "@dxos/client-protocol": "0.3.11-main.8d54a30",
27
- "@dxos/config": "0.3.11-main.8d54a30",
28
- "@dxos/codec-protobuf": "0.3.11-main.8d54a30",
29
- "@dxos/context": "0.3.11-main.8d54a30",
30
- "@dxos/credentials": "0.3.11-main.8d54a30",
31
- "@dxos/crypto": "0.3.11-main.8d54a30",
32
- "@dxos/debug": "0.3.11-main.8d54a30",
33
- "@dxos/echo-db": "0.3.11-main.8d54a30",
34
- "@dxos/echo-pipeline": "0.3.11-main.8d54a30",
35
- "@dxos/document-model": "0.3.11-main.8d54a30",
36
- "@dxos/echo-schema": "0.3.11-main.8d54a30",
37
- "@dxos/feed-store": "0.3.11-main.8d54a30",
38
- "@dxos/invariant": "0.3.11-main.8d54a30",
39
- "@dxos/keyring": "0.3.11-main.8d54a30",
40
- "@dxos/keys": "0.3.11-main.8d54a30",
41
- "@dxos/lock-file": "0.3.11-main.8d54a30",
42
- "@dxos/log": "0.3.11-main.8d54a30",
43
- "@dxos/messaging": "0.3.11-main.8d54a30",
44
- "@dxos/model-factory": "0.3.11-main.8d54a30",
45
- "@dxos/network-manager": "0.3.11-main.8d54a30",
46
- "@dxos/node-std": "0.3.11-main.8d54a30",
47
- "@dxos/protocols": "0.3.11-main.8d54a30",
48
- "@dxos/rpc": "0.3.11-main.8d54a30",
49
- "@dxos/teleport": "0.3.11-main.8d54a30",
50
- "@dxos/teleport-extension-object-sync": "0.3.11-main.8d54a30",
51
- "@dxos/random-access-storage": "0.3.11-main.8d54a30",
52
- "@dxos/timeframe": "0.3.11-main.8d54a30",
53
- "@dxos/text-model": "0.3.11-main.8d54a30",
54
- "@dxos/teleport-extension-gossip": "0.3.11-main.8d54a30",
55
- "@dxos/tracing": "0.3.11-main.8d54a30",
56
- "@dxos/util": "0.3.11-main.8d54a30",
57
- "@dxos/websocket-rpc": "0.3.11-main.8d54a30"
25
+ "@dxos/async": "0.3.11-main.8feb6a5",
26
+ "@dxos/client-protocol": "0.3.11-main.8feb6a5",
27
+ "@dxos/codec-protobuf": "0.3.11-main.8feb6a5",
28
+ "@dxos/config": "0.3.11-main.8feb6a5",
29
+ "@dxos/credentials": "0.3.11-main.8feb6a5",
30
+ "@dxos/crypto": "0.3.11-main.8feb6a5",
31
+ "@dxos/context": "0.3.11-main.8feb6a5",
32
+ "@dxos/debug": "0.3.11-main.8feb6a5",
33
+ "@dxos/document-model": "0.3.11-main.8feb6a5",
34
+ "@dxos/echo-pipeline": "0.3.11-main.8feb6a5",
35
+ "@dxos/echo-db": "0.3.11-main.8feb6a5",
36
+ "@dxos/feed-store": "0.3.11-main.8feb6a5",
37
+ "@dxos/invariant": "0.3.11-main.8feb6a5",
38
+ "@dxos/echo-schema": "0.3.11-main.8feb6a5",
39
+ "@dxos/keyring": "0.3.11-main.8feb6a5",
40
+ "@dxos/keys": "0.3.11-main.8feb6a5",
41
+ "@dxos/lock-file": "0.3.11-main.8feb6a5",
42
+ "@dxos/log": "0.3.11-main.8feb6a5",
43
+ "@dxos/model-factory": "0.3.11-main.8feb6a5",
44
+ "@dxos/messaging": "0.3.11-main.8feb6a5",
45
+ "@dxos/network-manager": "0.3.11-main.8feb6a5",
46
+ "@dxos/node-std": "0.3.11-main.8feb6a5",
47
+ "@dxos/protocols": "0.3.11-main.8feb6a5",
48
+ "@dxos/random-access-storage": "0.3.11-main.8feb6a5",
49
+ "@dxos/rpc": "0.3.11-main.8feb6a5",
50
+ "@dxos/teleport-extension-gossip": "0.3.11-main.8feb6a5",
51
+ "@dxos/teleport": "0.3.11-main.8feb6a5",
52
+ "@dxos/teleport-extension-object-sync": "0.3.11-main.8feb6a5",
53
+ "@dxos/text-model": "0.3.11-main.8feb6a5",
54
+ "@dxos/tracing": "0.3.11-main.8feb6a5",
55
+ "@dxos/timeframe": "0.3.11-main.8feb6a5",
56
+ "@dxos/util": "0.3.11-main.8feb6a5",
57
+ "@dxos/websocket-rpc": "0.3.11-main.8feb6a5"
58
58
  },
59
59
  "devDependencies": {
60
60
  "@types/platform": "^1.3.4",
61
61
  "@types/readable-stream": "^2.3.9",
62
- "@dxos/signal": "0.3.11-main.8d54a30"
62
+ "@dxos/signal": "0.3.11-main.8feb6a5"
63
63
  },
64
64
  "publishConfig": {
65
65
  "access": "public"
@@ -44,7 +44,7 @@ describe('IdentityService', () => {
44
44
  });
45
45
 
46
46
  test('creates a new identity with a display name', async () => {
47
- const identity = await identityService.createIdentity({ displayName: 'Example' });
47
+ const identity = await identityService.createIdentity({ profile: { displayName: 'Example' } });
48
48
 
49
49
  expect(identity.identityKey).to.be.instanceof(PublicKey);
50
50
  expect(identity.spaceKey).to.be.instanceof(PublicKey);
@@ -8,6 +8,7 @@ import { todo } from '@dxos/debug';
8
8
  import { invariant } from '@dxos/invariant';
9
9
  import { type Keyring } from '@dxos/keyring';
10
10
  import {
11
+ type CreateIdentityRequest,
11
12
  type Identity,
12
13
  type IdentityService,
13
14
  type QueryIdentityResponse,
@@ -18,16 +19,18 @@ import { type Presentation, type ProfileDocument } from '@dxos/protocols/proto/d
18
19
 
19
20
  import { type CreateIdentityOptions, type IdentityManager } from './identity-manager';
20
21
 
22
+ const CREATE_PROFILE_WITH_AUTOMERGE_DEFAULT = true;
23
+
21
24
  export class IdentityServiceImpl implements IdentityService {
22
25
  constructor(
23
- private readonly _createIdentity: (params?: CreateIdentityOptions) => Promise<Identity>,
26
+ private readonly _createIdentity: (params: CreateIdentityOptions, useAutomerge: boolean) => Promise<Identity>,
24
27
  private readonly _identityManager: IdentityManager,
25
28
  private readonly _keyring: Keyring,
26
29
  private readonly _onProfileUpdate?: (profile: ProfileDocument | undefined) => Promise<void>,
27
30
  ) {}
28
31
 
29
- async createIdentity(request: ProfileDocument): Promise<Identity> {
30
- await this._createIdentity(request);
32
+ async createIdentity(request: CreateIdentityRequest): Promise<Identity> {
33
+ await this._createIdentity(request.profile ?? {}, request.useAutomerge ?? CREATE_PROFILE_WITH_AUTOMERGE_DEFAULT);
31
34
  return this._getIdentity()!;
32
35
  }
33
36
 
@@ -321,7 +321,7 @@ export class InvitationsHandler {
321
321
 
322
322
  // 5. Success.
323
323
  log('admitted by host', { ...protocol.toJSON() });
324
- setState({ ...result, state: Invitation.State.SUCCESS });
324
+ setState({ ...result, target: invitation.target, state: Invitation.State.SUCCESS });
325
325
  log.trace('dxos.sdk.invitations-handler.guest.onOpen', trace.end({ id: traceId }));
326
326
  } catch (err: any) {
327
327
  if (err instanceof TimeoutError) {
@@ -8,7 +8,7 @@ import { type Config } from '@dxos/config';
8
8
  import { Context } from '@dxos/context';
9
9
  import { DocumentModel } from '@dxos/document-model';
10
10
  import { DataServiceImpl } from '@dxos/echo-pipeline';
11
- import { type TypedObject, base } from '@dxos/echo-schema';
11
+ import { type TypedObject, base, getRawDoc } from '@dxos/echo-schema';
12
12
  import { invariant } from '@dxos/invariant';
13
13
  import { PublicKey } from '@dxos/keys';
14
14
  import { log } from '@dxos/log';
@@ -28,7 +28,7 @@ import { ServiceContext } from './service-context';
28
28
  import { ServiceRegistry } from './service-registry';
29
29
  import { DevicesServiceImpl } from '../devices';
30
30
  import { DevtoolsServiceImpl, DevtoolsHostEvents } from '../devtools';
31
- import { type CreateIdentityOptions, IdentityServiceImpl } from '../identity';
31
+ import { IdentityServiceImpl, type CreateIdentityOptions } from '../identity';
32
32
  import { InvitationsServiceImpl } from '../invitations';
33
33
  import { Lock, type ResourceLock } from '../locks';
34
34
  import { LoggingServiceImpl } from '../logging';
@@ -260,7 +260,7 @@ export class ClientServicesHost {
260
260
  SystemService: this._systemService,
261
261
 
262
262
  IdentityService: new IdentityServiceImpl(
263
- (params) => this._createIdentity(params),
263
+ (params, useAutomerge) => this._createIdentity(params, useAutomerge),
264
264
  this._serviceContext.identityManager,
265
265
  this._serviceContext.keyring,
266
266
  (profile) => this._serviceContext.broadcastProfileUpdate(profile),
@@ -351,21 +351,36 @@ export class ClientServicesHost {
351
351
  await this._callbacks?.onReset?.();
352
352
  }
353
353
 
354
- private async _createIdentity(params?: CreateIdentityOptions) {
354
+ private async _createIdentity(params: CreateIdentityOptions, useAutomerge: boolean) {
355
355
  const identity = await this._serviceContext.createIdentity(params);
356
356
 
357
357
  // Setup default space.
358
358
  await this._serviceContext.initialized.wait();
359
359
  const space = await this._serviceContext.dataSpaceManager!.createSpace();
360
- const obj: TypedObject = new Properties(undefined, { automerge: false });
360
+
361
+ const obj: TypedObject = new Properties(undefined, { automerge: useAutomerge });
361
362
  obj[defaultKey] = identity.identityKey.toHex();
362
- await this._serviceRegistry.services.DataService!.write({
363
- spaceKey: space.key,
364
- batch: {
365
- objects: [createGenesisMutationFromTypedObject(obj)],
366
- },
367
- });
368
- await this._serviceRegistry.services.DataService!.flush({ spaceKey: space.key });
363
+
364
+ if (!useAutomerge) {
365
+ await this._serviceRegistry.services.DataService!.write({
366
+ spaceKey: space.key,
367
+ batch: {
368
+ objects: [createGenesisMutationFromTypedObject(obj)],
369
+ },
370
+ });
371
+ await this._serviceRegistry.services.DataService!.flush({ spaceKey: space.key });
372
+ } else {
373
+ // TODO(dmaretskyi): Refactor this.
374
+ const automergeIndex = space.automergeSpaceState.rootUrl;
375
+ invariant(automergeIndex);
376
+ const document = await this._serviceContext.automergeHost.repo.find(automergeIndex as any);
377
+ await document.whenReady();
378
+
379
+ document.change((doc: any) => {
380
+ doc.objects ??= {};
381
+ doc.objects[obj[base]._id] = getRawDoc(obj).handle.docSync();
382
+ });
383
+ }
369
384
 
370
385
  return identity;
371
386
  }
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const DXOS_VERSION = "0.3.11-main.8d54a30";
1
+ export const DXOS_VERSION = "0.3.11-main.8feb6a5";