@dxos/client-protocol 0.8.4-main.bc674ce → 0.8.4-main.c351d160a8

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.bc674ce",
3
+ "version": "0.8.4-main.c351d160a8",
4
4
  "description": "Core DXOS Client API.",
5
5
  "homepage": "https://dxos.org",
6
6
  "bugs": "https://github.com/dxos/dxos/issues",
@@ -39,21 +39,21 @@
39
39
  "src"
40
40
  ],
41
41
  "dependencies": {
42
- "base-x": "~3.0.9",
43
- "effect": "3.19.11",
44
- "@dxos/context": "0.8.4-main.bc674ce",
45
- "@dxos/async": "0.8.4-main.bc674ce",
46
- "@dxos/credentials": "0.8.4-main.bc674ce",
47
- "@dxos/invariant": "0.8.4-main.bc674ce",
48
- "@dxos/keys": "0.8.4-main.bc674ce",
49
- "@dxos/echo-db": "0.8.4-main.bc674ce",
50
- "@dxos/node-std": "0.8.4-main.bc674ce",
51
- "@dxos/protocols": "0.8.4-main.bc674ce",
52
- "@dxos/echo": "0.8.4-main.bc674ce",
53
- "@dxos/rpc": "0.8.4-main.bc674ce"
42
+ "base-x": "~3.0.11",
43
+ "effect": "3.19.16",
44
+ "@dxos/context": "0.8.4-main.c351d160a8",
45
+ "@dxos/async": "0.8.4-main.c351d160a8",
46
+ "@dxos/credentials": "0.8.4-main.c351d160a8",
47
+ "@dxos/echo": "0.8.4-main.c351d160a8",
48
+ "@dxos/echo-db": "0.8.4-main.c351d160a8",
49
+ "@dxos/protocols": "0.8.4-main.c351d160a8",
50
+ "@dxos/node-std": "0.8.4-main.c351d160a8",
51
+ "@dxos/rpc": "0.8.4-main.c351d160a8",
52
+ "@dxos/invariant": "0.8.4-main.c351d160a8",
53
+ "@dxos/keys": "0.8.4-main.c351d160a8"
54
54
  },
55
55
  "peerDependencies": {
56
- "effect": "3.19.11"
56
+ "effect": "3.19.16"
57
57
  },
58
58
  "publishConfig": {
59
59
  "access": "public"
package/src/config.ts CHANGED
@@ -60,9 +60,9 @@ export namespace DXEnv {
60
60
  }
61
61
  }
62
62
 
63
- // Base directories.
64
- // TODO(burdon): Consider Windows, Linux, OSX.
65
- // https://wiki.archlinux.org/title/XDG_Base_Directory
66
- // Each `/dx` directory should contain `/profile/<DX_PROFILE>` subdirectories.
67
- export const getProfilePath = (root: string, profile: string, file: string | undefined = undefined) =>
63
+ // Profile layout: profile/<name> is the profile dir; profile/<name>.yml is the config file.
64
+ export const getProfilePath = (root: string, profile: string, file?: string) =>
68
65
  `${root}/profile/${profile}` + (file ? `/${file}` : '');
66
+
67
+ /** Path to the profile config file (profile/<name>.yml). */
68
+ export const getProfileConfigPath = (root: string, profile: string) => `${getProfilePath(root, profile)}.yml`;
package/src/service.ts CHANGED
@@ -3,7 +3,6 @@
3
3
  //
4
4
 
5
5
  import { type Event } from '@dxos/async';
6
- import { type QueueService } from '@dxos/protocols';
7
6
  import { schema } from '@dxos/protocols/proto';
8
7
  import type {
9
8
  ContactsService,
@@ -13,6 +12,7 @@ import type {
13
12
  InvitationsService,
14
13
  LoggingService,
15
14
  NetworkService,
15
+ QueueService,
16
16
  SpacesService,
17
17
  SystemService,
18
18
  } from '@dxos/protocols/proto/dxos/client/services';
@@ -24,7 +24,7 @@ import type { BridgeService } from '@dxos/protocols/proto/dxos/mesh/bridge';
24
24
  import type { TracingService } from '@dxos/protocols/proto/dxos/tracing';
25
25
  import { type ServiceBundle, createServiceBundle } from '@dxos/rpc';
26
26
 
27
- export { type QueueService } from '@dxos/protocols';
27
+ export type { QueueService } from '@dxos/protocols/proto/dxos/client/services';
28
28
 
29
29
  //
30
30
  // NOTE: Should contain client/proxy dependencies only.
package/src/space.ts CHANGED
@@ -103,7 +103,7 @@ export interface Space extends Messenger {
103
103
  /**
104
104
  * Properties object.
105
105
  */
106
- get properties(): Obj.Obj<SpaceProperties>;
106
+ get properties(): Obj.OfShape<SpaceProperties>;
107
107
 
108
108
  /**
109
109
  * Current state of space pipeline.
@@ -4,7 +4,7 @@
4
4
 
5
5
  import * as Schema from 'effect/Schema';
6
6
 
7
- import { Annotation, Type } from '@dxos/echo';
7
+ import { Annotation, Ref, Type } from '@dxos/echo';
8
8
  import { Queue } from '@dxos/echo-db';
9
9
 
10
10
  export const SpacePropertiesSchema = Schema.Struct(
@@ -17,7 +17,7 @@ export const SpacePropertiesSchema = Schema.Struct(
17
17
  // TODO(burdon): Change to mode (no booleans?)
18
18
  // TODO(wittjosiah): Make optional with default value.
19
19
  edgeReplication: Schema.optional(Schema.Boolean),
20
- invocationTraceQueue: Schema.optional(Type.Ref(Queue)),
20
+ invocationTraceQueue: Schema.optional(Ref.Ref(Queue)),
21
21
 
22
22
  //
23
23
  // User properties.
@@ -39,8 +39,7 @@ export type SpacePropertiesSchema = Schema.Schema.Type<typeof SpacePropertiesSch
39
39
  // TODO(burdon): Is separate schema def required for forms? Can it be extracted from SpaceProperties?
40
40
  export const SpaceProperties = SpacePropertiesSchema.pipe(
41
41
  Type.object({
42
- // TODO(burdon): Rename SpaceProperties.
43
- typename: 'dxos.org/type/Properties',
42
+ typename: 'org.dxos.type.space-properties',
44
43
  version: '0.1.0',
45
44
  }),
46
45
  Annotation.SystemTypeAnnotation.set(true),
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/types/SpaceProperties.ts"],
4
- "sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport * as Schema from 'effect/Schema';\n\nimport { Annotation, Type } from '@dxos/echo';\nimport { Queue } from '@dxos/echo-db';\n\nexport const SpacePropertiesSchema = Schema.Struct(\n {\n //\n // System properties.\n //\n\n archived: Schema.optional(Schema.Boolean.annotations({ title: 'Archive Space' })),\n // TODO(burdon): Change to mode (no booleans?)\n // TODO(wittjosiah): Make optional with default value.\n edgeReplication: Schema.optional(Schema.Boolean),\n invocationTraceQueue: Schema.optional(Type.Ref(Queue)),\n\n //\n // User properties.\n //\n\n name: Schema.optional(Schema.String),\n icon: Schema.optional(Schema.String),\n hue: Schema.optional(Schema.String),\n },\n {\n key: Schema.String,\n value: Schema.Any,\n },\n);\n\nexport type SpacePropertiesSchema = Schema.Schema.Type<typeof SpacePropertiesSchema>;\n\n// TODO(burdon): Pipe Schem.optional, or partial to entire struct to make everything optional?\n// TODO(burdon): Is separate schema def required for forms? Can it be extracted from SpaceProperties?\nexport const SpaceProperties = SpacePropertiesSchema.pipe(\n Type.object({\n // TODO(burdon): Rename SpaceProperties.\n typename: 'dxos.org/type/Properties',\n version: '0.1.0',\n }),\n Annotation.SystemTypeAnnotation.set(true),\n);\n\nexport interface SpaceProperties extends Schema.Schema.Type<typeof SpaceProperties> {}\n"],
5
- "mappings": ";AAIA,YAAYA,YAAY;AAExB,SAASC,YAAYC,YAAY;AACjC,SAASC,aAAa;AAEf,IAAMC,wBAA+BC,cAC1C;;;;EAKEC,UAAiBC,gBAAgBC,eAAQC,YAAY;IAAEC,OAAO;EAAgB,CAAA,CAAA;;;EAG9EC,iBAAwBJ,gBAAgBC,cAAO;EAC/CI,sBAA6BL,gBAASM,KAAKC,IAAIC,KAAAA,CAAAA;;;;EAM/CC,MAAaT,gBAAgBU,aAAM;EACnCC,MAAaX,gBAAgBU,aAAM;EACnCE,KAAYZ,gBAAgBU,aAAM;AACpC,GACA;EACEG,KAAYH;EACZI,OAAcC;AAChB,CAAA;AAOK,IAAMC,kBAAkBnB,sBAAsBoB,KACnDX,KAAKY,OAAO;;EAEVC,UAAU;EACVC,SAAS;AACX,CAAA,GACAC,WAAWC,qBAAqBC,IAAI,IAAA,CAAA;",
6
- "names": ["Schema", "Annotation", "Type", "Queue", "SpacePropertiesSchema", "Struct", "archived", "optional", "Boolean", "annotations", "title", "edgeReplication", "invocationTraceQueue", "Type", "Ref", "Queue", "name", "String", "icon", "hue", "key", "value", "Any", "SpaceProperties", "pipe", "object", "typename", "version", "Annotation", "SystemTypeAnnotation", "set"]
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/types/SpaceProperties.ts"],
4
- "sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport * as Schema from 'effect/Schema';\n\nimport { Annotation, Type } from '@dxos/echo';\nimport { Queue } from '@dxos/echo-db';\n\nexport const SpacePropertiesSchema = Schema.Struct(\n {\n //\n // System properties.\n //\n\n archived: Schema.optional(Schema.Boolean.annotations({ title: 'Archive Space' })),\n // TODO(burdon): Change to mode (no booleans?)\n // TODO(wittjosiah): Make optional with default value.\n edgeReplication: Schema.optional(Schema.Boolean),\n invocationTraceQueue: Schema.optional(Type.Ref(Queue)),\n\n //\n // User properties.\n //\n\n name: Schema.optional(Schema.String),\n icon: Schema.optional(Schema.String),\n hue: Schema.optional(Schema.String),\n },\n {\n key: Schema.String,\n value: Schema.Any,\n },\n);\n\nexport type SpacePropertiesSchema = Schema.Schema.Type<typeof SpacePropertiesSchema>;\n\n// TODO(burdon): Pipe Schem.optional, or partial to entire struct to make everything optional?\n// TODO(burdon): Is separate schema def required for forms? Can it be extracted from SpaceProperties?\nexport const SpaceProperties = SpacePropertiesSchema.pipe(\n Type.object({\n // TODO(burdon): Rename SpaceProperties.\n typename: 'dxos.org/type/Properties',\n version: '0.1.0',\n }),\n Annotation.SystemTypeAnnotation.set(true),\n);\n\nexport interface SpaceProperties extends Schema.Schema.Type<typeof SpaceProperties> {}\n"],
5
- "mappings": ";;;AAIA,YAAYA,YAAY;AAExB,SAASC,YAAYC,YAAY;AACjC,SAASC,aAAa;AAEf,IAAMC,wBAA+BC,cAC1C;;;;EAKEC,UAAiBC,gBAAgBC,eAAQC,YAAY;IAAEC,OAAO;EAAgB,CAAA,CAAA;;;EAG9EC,iBAAwBJ,gBAAgBC,cAAO;EAC/CI,sBAA6BL,gBAASM,KAAKC,IAAIC,KAAAA,CAAAA;;;;EAM/CC,MAAaT,gBAAgBU,aAAM;EACnCC,MAAaX,gBAAgBU,aAAM;EACnCE,KAAYZ,gBAAgBU,aAAM;AACpC,GACA;EACEG,KAAYH;EACZI,OAAcC;AAChB,CAAA;AAOK,IAAMC,kBAAkBnB,sBAAsBoB,KACnDX,KAAKY,OAAO;;EAEVC,UAAU;EACVC,SAAS;AACX,CAAA,GACAC,WAAWC,qBAAqBC,IAAI,IAAA,CAAA;",
6
- "names": ["Schema", "Annotation", "Type", "Queue", "SpacePropertiesSchema", "Struct", "archived", "optional", "Boolean", "annotations", "title", "edgeReplication", "invocationTraceQueue", "Type", "Ref", "Queue", "name", "String", "icon", "hue", "key", "value", "Any", "SpaceProperties", "pipe", "object", "typename", "version", "Annotation", "SystemTypeAnnotation", "set"]
7
- }