@dxos/client-protocol 0.8.4-main.84f28bd → 0.8.4-main.a4bbb77

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dxos/client-protocol",
3
- "version": "0.8.4-main.84f28bd",
3
+ "version": "0.8.4-main.a4bbb77",
4
4
  "description": "Core DXOS Client API.",
5
5
  "homepage": "https://dxos.org",
6
6
  "bugs": "https://github.com/dxos/dxos/issues",
@@ -11,6 +11,7 @@
11
11
  "type": "module",
12
12
  "exports": {
13
13
  ".": {
14
+ "source": "./src/index.ts",
14
15
  "types": "./dist/types/src/index.d.ts",
15
16
  "browser": "./dist/lib/browser/index.mjs",
16
17
  "node": "./dist/lib/node-esm/index.mjs"
@@ -26,19 +27,19 @@
26
27
  ],
27
28
  "dependencies": {
28
29
  "base-x": "~3.0.9",
29
- "effect": "3.16.13",
30
- "@dxos/async": "0.8.4-main.84f28bd",
31
- "@dxos/config": "0.8.4-main.84f28bd",
32
- "@dxos/context": "0.8.4-main.84f28bd",
33
- "@dxos/credentials": "0.8.4-main.84f28bd",
34
- "@dxos/echo": "0.8.4-main.84f28bd",
35
- "@dxos/echo-db": "0.8.4-main.84f28bd",
36
- "@dxos/echo-schema": "0.8.4-main.84f28bd",
37
- "@dxos/invariant": "0.8.4-main.84f28bd",
38
- "@dxos/keys": "0.8.4-main.84f28bd",
39
- "@dxos/node-std": "0.8.4-main.84f28bd",
40
- "@dxos/protocols": "0.8.4-main.84f28bd",
41
- "@dxos/rpc": "0.8.4-main.84f28bd"
30
+ "effect": "3.18.3",
31
+ "@dxos/config": "0.8.4-main.a4bbb77",
32
+ "@dxos/context": "0.8.4-main.a4bbb77",
33
+ "@dxos/async": "0.8.4-main.a4bbb77",
34
+ "@dxos/echo": "0.8.4-main.a4bbb77",
35
+ "@dxos/echo-db": "0.8.4-main.a4bbb77",
36
+ "@dxos/credentials": "0.8.4-main.a4bbb77",
37
+ "@dxos/echo-schema": "0.8.4-main.a4bbb77",
38
+ "@dxos/invariant": "0.8.4-main.a4bbb77",
39
+ "@dxos/node-std": "0.8.4-main.a4bbb77",
40
+ "@dxos/keys": "0.8.4-main.a4bbb77",
41
+ "@dxos/protocols": "0.8.4-main.a4bbb77",
42
+ "@dxos/rpc": "0.8.4-main.a4bbb77"
42
43
  },
43
44
  "peerDependencies": {
44
45
  "effect": "^3.13.3"
package/src/config.ts CHANGED
@@ -18,7 +18,7 @@ export const EXPECTED_CONFIG_VERSION = 1;
18
18
  export const defaultConfig: ConfigProto = { version: 1 };
19
19
 
20
20
  // TODO(burdon): Allow override via env? Generalize since currently NodeJS only.
21
- const HOME = typeof process !== 'undefined' ? process?.env?.HOME ?? '' : '';
21
+ const HOME = typeof process !== 'undefined' ? (process?.env?.HOME ?? '') : '';
22
22
 
23
23
  // Base directories.
24
24
  // TODO(burdon): Consider Windows, Linux, OSX.
package/src/echo.ts CHANGED
@@ -3,7 +3,7 @@
3
3
  //
4
4
 
5
5
  import type { MulticastObservable } from '@dxos/async';
6
- import type { QueryFn } from '@dxos/echo-db';
6
+ import type { Queryable } from '@dxos/echo-db';
7
7
  import type { PublicKey, SpaceId } from '@dxos/keys';
8
8
  import type { Invitation, SpaceArchive } from '@dxos/protocols/proto/dxos/client/services';
9
9
 
@@ -12,17 +12,10 @@ import type { PropertiesTypeProps } from './schema';
12
12
  import type { Space } from './space';
13
13
 
14
14
  /**
15
- * TODO(burdon): Public API (move comments here).
15
+ * Public database API.
16
16
  */
17
- // TODO(wittjosiah): Rename?
18
- // https://ts.dev/style/#naming-style
19
- // ClientApi? ClientProtocol?
20
- export interface Echo extends MulticastObservable<Space[]> {
21
- /**
22
- * Resolves when the default space is available.
23
- */
24
- waitUntilReady(): Promise<void>;
25
-
17
+ // TODO(wittjosiah): Rename Database (not product name).
18
+ export interface Echo extends MulticastObservable<Space[]>, Queryable {
26
19
  /**
27
20
  * Observable which indicates when the default space is available.
28
21
  */
@@ -50,6 +43,11 @@ export interface Echo extends MulticastObservable<Space[]> {
50
43
  */
51
44
  get default(): Space;
52
45
 
46
+ /**
47
+ * Resolves when the default space is available.
48
+ */
49
+ waitUntilReady(): Promise<void>;
50
+
53
51
  /**
54
52
  * Creates a new space.
55
53
  */
@@ -66,11 +64,4 @@ export interface Echo extends MulticastObservable<Space[]> {
66
64
  join(invitation: Invitation | string): AuthenticatingInvitation;
67
65
 
68
66
  joinBySpaceKey(spaceKey: PublicKey): Promise<Space>;
69
-
70
- /**
71
- * Query all spaces.
72
- * @param filter
73
- * @param options
74
- */
75
- query: QueryFn;
76
67
  }
package/src/halo.ts CHANGED
@@ -6,8 +6,8 @@ import { type MulticastObservable } from '@dxos/async';
6
6
  import { type PublicKey } from '@dxos/keys';
7
7
  import { type Contact, type Device, type Identity, type Invitation } from '@dxos/protocols/proto/dxos/client/services';
8
8
  import {
9
- type DeviceProfileDocument,
10
9
  type Credential,
10
+ type DeviceProfileDocument,
11
11
  type Presentation,
12
12
  type ProfileDocument,
13
13
  } from '@dxos/protocols/proto/dxos/halo/credentials';
package/src/index.ts CHANGED
@@ -4,11 +4,11 @@
4
4
 
5
5
  export * from './client';
6
6
  export * from './config';
7
- export * from './echo';
8
- export * from './halo';
7
+ export type * from './echo';
8
+ export type * from './halo';
9
9
  export * from './invitations';
10
10
  export * from './service-definitions';
11
- export * from './shell';
12
- export * from './space';
11
+ export type * from './shell';
12
+ export type * from './space';
13
13
  export * from './timeouts';
14
14
  export * from './schema';
package/src/schema.ts CHANGED
@@ -5,6 +5,7 @@
5
5
  import { Schema } from 'effect';
6
6
 
7
7
  import { Type } from '@dxos/echo';
8
+ import { Queue } from '@dxos/echo-db';
8
9
  import { TypedObject } from '@dxos/echo-schema';
9
10
 
10
11
  export const TYPE_PROPERTIES = 'dxos.org/type/Properties';
@@ -19,7 +20,7 @@ export class PropertiesType extends TypedObject({
19
20
  // TODO(wittjosiah): Make generic?
20
21
  hue: Schema.optional(Schema.String),
21
22
  icon: Schema.optional(Schema.String),
22
- invocationTraceQueue: Schema.optional(Type.Ref(Type.Expando)),
23
+ invocationTraceQueue: Schema.optional(Type.Ref(Queue)),
23
24
  },
24
25
  { record: true },
25
26
  ) {}
@@ -6,15 +6,15 @@ import { type Event } from '@dxos/async';
6
6
  import { schema } from '@dxos/protocols/proto';
7
7
  import type { FunctionRegistryService } from '@dxos/protocols/proto/dxos/agent/functions';
8
8
  import type {
9
+ ContactsService,
9
10
  DevicesService,
11
+ EdgeAgentService,
10
12
  IdentityService,
11
13
  InvitationsService,
12
14
  LoggingService,
13
15
  NetworkService,
14
16
  SpacesService,
15
17
  SystemService,
16
- ContactsService,
17
- EdgeAgentService,
18
18
  } from '@dxos/protocols/proto/dxos/client/services';
19
19
  import type { DevtoolsHost } from '@dxos/protocols/proto/dxos/devtools/host';
20
20
  import type { QueryService } from '@dxos/protocols/proto/dxos/echo/query';
package/src/shell.ts CHANGED
@@ -5,8 +5,8 @@
5
5
  import { type Event } from '@dxos/async';
6
6
  import { type PublicKey } from '@dxos/keys';
7
7
  import {
8
- type InvitationUrlRequest,
9
8
  type AppContextRequest,
9
+ type InvitationUrlRequest,
10
10
  type LayoutRequest,
11
11
  type ShellLayout,
12
12
  } from '@dxos/protocols/proto/dxos/iframe';
package/src/space.ts CHANGED
@@ -2,16 +2,16 @@
2
2
  // Copyright 2021 DXOS.org
3
3
  //
4
4
 
5
- import { type MulticastObservable, type CleanupFn } from '@dxos/async';
5
+ import { type CleanupFn, type MulticastObservable } from '@dxos/async';
6
6
  import { type SpecificCredential } from '@dxos/credentials';
7
- import { type QueueFactory, type EchoDatabase, type AnyLiveObject } from '@dxos/echo-db';
7
+ import { type AnyLiveObject, type EchoDatabase, type QueueFactory } from '@dxos/echo-db';
8
8
  import { type PublicKey, type SpaceId } from '@dxos/keys';
9
9
  import {
10
10
  type Contact,
11
11
  type CreateEpochRequest,
12
12
  type Invitation,
13
- type Space as SpaceData,
14
13
  type SpaceArchive,
14
+ type Space as SpaceData,
15
15
  type SpaceMember,
16
16
  type SpaceState,
17
17
  type UpdateMemberRoleRequest,