@dxos/client-protocol 0.8.4-main.9be5663bfe → 0.8.4-main.abd8ff62ef

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 (32) hide show
  1. package/dist/lib/browser/{chunk-XZ3UMPW2.mjs → chunk-GCBXMPTW.mjs} +15 -4
  2. package/dist/lib/browser/chunk-GCBXMPTW.mjs.map +7 -0
  3. package/dist/lib/browser/index.mjs +5 -12
  4. package/dist/lib/browser/index.mjs.map +3 -3
  5. package/dist/lib/browser/meta.json +1 -1
  6. package/dist/lib/browser/types/index.mjs +3 -1
  7. package/dist/lib/node-esm/{chunk-3LD3QH4M.mjs → chunk-2RN4CLEW.mjs} +15 -4
  8. package/dist/lib/node-esm/chunk-2RN4CLEW.mjs.map +7 -0
  9. package/dist/lib/node-esm/index.mjs +5 -12
  10. package/dist/lib/node-esm/index.mjs.map +3 -3
  11. package/dist/lib/node-esm/meta.json +1 -1
  12. package/dist/lib/node-esm/types/index.mjs +3 -1
  13. package/dist/types/src/config.d.ts.map +1 -1
  14. package/dist/types/src/echo.d.ts +1 -1
  15. package/dist/types/src/echo.d.ts.map +1 -1
  16. package/dist/types/src/invitations/encoder.d.ts.map +1 -1
  17. package/dist/types/src/invitations/invitations.d.ts +2 -2
  18. package/dist/types/src/invitations/invitations.d.ts.map +1 -1
  19. package/dist/types/src/service.d.ts +0 -2
  20. package/dist/types/src/service.d.ts.map +1 -1
  21. package/dist/types/src/space.d.ts +9 -2
  22. package/dist/types/src/space.d.ts.map +1 -1
  23. package/dist/types/src/types/SpaceProperties.d.ts +32 -4
  24. package/dist/types/src/types/SpaceProperties.d.ts.map +1 -1
  25. package/dist/types/tsconfig.tsbuildinfo +1 -1
  26. package/package.json +11 -18
  27. package/src/echo.ts +1 -1
  28. package/src/service.ts +0 -4
  29. package/src/space.ts +10 -2
  30. package/src/types/SpaceProperties.ts +20 -3
  31. package/dist/lib/browser/chunk-XZ3UMPW2.mjs.map +0 -7
  32. package/dist/lib/node-esm/chunk-3LD3QH4M.mjs.map +0 -7
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dxos/client-protocol",
3
- "version": "0.8.4-main.9be5663bfe",
3
+ "version": "0.8.4-main.abd8ff62ef",
4
4
  "description": "Core DXOS Client API.",
5
5
  "homepage": "https://dxos.org",
6
6
  "bugs": "https://github.com/dxos/dxos/issues",
@@ -27,13 +27,6 @@
27
27
  }
28
28
  },
29
29
  "types": "dist/types/src/index.d.ts",
30
- "typesVersions": {
31
- "*": {
32
- "./types": [
33
- "./dist/types/src/types/index.d.ts"
34
- ]
35
- }
36
- },
37
30
  "files": [
38
31
  "dist",
39
32
  "src"
@@ -41,16 +34,16 @@
41
34
  "dependencies": {
42
35
  "base-x": "~3.0.11",
43
36
  "effect": "3.20.0",
44
- "@dxos/context": "0.8.4-main.9be5663bfe",
45
- "@dxos/credentials": "0.8.4-main.9be5663bfe",
46
- "@dxos/echo": "0.8.4-main.9be5663bfe",
47
- "@dxos/async": "0.8.4-main.9be5663bfe",
48
- "@dxos/invariant": "0.8.4-main.9be5663bfe",
49
- "@dxos/keys": "0.8.4-main.9be5663bfe",
50
- "@dxos/echo-db": "0.8.4-main.9be5663bfe",
51
- "@dxos/protocols": "0.8.4-main.9be5663bfe",
52
- "@dxos/node-std": "0.8.4-main.9be5663bfe",
53
- "@dxos/rpc": "0.8.4-main.9be5663bfe"
37
+ "@dxos/async": "0.8.4-main.abd8ff62ef",
38
+ "@dxos/context": "0.8.4-main.abd8ff62ef",
39
+ "@dxos/echo": "0.8.4-main.abd8ff62ef",
40
+ "@dxos/credentials": "0.8.4-main.abd8ff62ef",
41
+ "@dxos/echo-db": "0.8.4-main.abd8ff62ef",
42
+ "@dxos/invariant": "0.8.4-main.abd8ff62ef",
43
+ "@dxos/keys": "0.8.4-main.abd8ff62ef",
44
+ "@dxos/node-std": "0.8.4-main.abd8ff62ef",
45
+ "@dxos/protocols": "0.8.4-main.abd8ff62ef",
46
+ "@dxos/rpc": "0.8.4-main.abd8ff62ef"
54
47
  },
55
48
  "peerDependencies": {
56
49
  "effect": "3.20.0"
package/src/echo.ts CHANGED
@@ -37,7 +37,7 @@ export interface Echo extends MulticastObservable<Space[]>, Database.Queryable {
37
37
  * Creates a new space.
38
38
  */
39
39
  create(
40
- props?: Pick<SpaceProperties, 'name' | 'hue' | 'icon' | 'invocationTraceQueue'>,
40
+ props?: Pick<SpaceProperties, 'name' | 'hue' | 'icon' | 'invocationTraceFeed'>,
41
41
  options?: { tags?: string[]; membershipPolicy?: MembershipPolicy },
42
42
  ): Promise<Space>;
43
43
 
package/src/service.ts CHANGED
@@ -21,7 +21,6 @@ import type { QueryService } from '@dxos/protocols/proto/dxos/echo/query';
21
21
  import type { DataService } from '@dxos/protocols/proto/dxos/echo/service';
22
22
  import type { AppService, ShellService, WorkerService } from '@dxos/protocols/proto/dxos/iframe';
23
23
  import type { BridgeService } from '@dxos/protocols/proto/dxos/mesh/bridge';
24
- import type { TracingService } from '@dxos/protocols/proto/dxos/tracing';
25
24
  import { type ServiceBundle, createServiceBundle } from '@dxos/rpc';
26
25
 
27
26
  export type { QueueService } from '@dxos/protocols/proto/dxos/client/services';
@@ -49,8 +48,6 @@ export type ClientServices = {
49
48
 
50
49
  // TODO(burdon): Deprecated.
51
50
  DevtoolsHost: DevtoolsHost;
52
-
53
- TracingService: TracingService;
54
51
  };
55
52
 
56
53
  /**
@@ -104,7 +101,6 @@ export const clientServiceBundle = createServiceBundle<ClientServices>({
104
101
 
105
102
  // TODO(burdon): Deprecated.
106
103
  DevtoolsHost: schema.getService('dxos.devtools.host.DevtoolsHost'),
107
- TracingService: schema.getService('dxos.tracing.TracingService'),
108
104
  });
109
105
 
110
106
  export type IframeServiceBundle = {
package/src/space.ts CHANGED
@@ -14,7 +14,7 @@ import {
14
14
  type Contact,
15
15
  type CreateEpochRequest,
16
16
  type Invitation,
17
- type SpaceArchive,
17
+ SpaceArchive,
18
18
  type Space as SpaceData,
19
19
  type SpaceMember,
20
20
  type SpaceState,
@@ -32,6 +32,14 @@ export type CreateEpochOptions = {
32
32
  automergeRootUrl?: string;
33
33
  };
34
34
 
35
+ export type ExportSpaceOptions = {
36
+ /**
37
+ * Archive format.
38
+ * @default SpaceArchive.Format.BINARY
39
+ */
40
+ format?: SpaceArchive.Format;
41
+ };
42
+
35
43
  export interface SpaceInternal {
36
44
  get db(): EchoDatabase;
37
45
  get data(): SpaceData;
@@ -46,7 +54,7 @@ export interface SpaceInternal {
46
54
  // TOOD(burdon): Start to factor out credentials.
47
55
  removeMember(memberKey: PublicKey): Promise<void>;
48
56
 
49
- export(): Promise<SpaceArchive>;
57
+ export(options?: ExportSpaceOptions): Promise<SpaceArchive>;
50
58
 
51
59
  /**
52
60
  * Migrate space data to the latest version.
@@ -4,8 +4,13 @@
4
4
 
5
5
  import * as Schema from 'effect/Schema';
6
6
 
7
- import { Annotation, Ref, Type } from '@dxos/echo';
8
- import { Queue } from '@dxos/echo-db';
7
+ import { Annotation, Feed, Ref, Type } from '@dxos/echo';
8
+
9
+ /**
10
+ * Where do triggers get executed.
11
+ */
12
+ export const ComputeEnvironment = Schema.Literal('disabled', 'local', 'edge');
13
+ export type ComputeEnvironment = Schema.Schema.Type<typeof ComputeEnvironment>;
9
14
 
10
15
  export const SpacePropertiesSchema = Schema.Struct(
11
16
  {
@@ -17,7 +22,19 @@ export const SpacePropertiesSchema = Schema.Struct(
17
22
  // TODO(burdon): Change to mode (no booleans?)
18
23
  // TODO(wittjosiah): Make optional with default value.
19
24
  edgeReplication: Schema.optional(Schema.Boolean),
20
- invocationTraceQueue: Schema.optional(Ref.Ref(Queue)),
25
+
26
+ /**
27
+ * @deprecated
28
+ */
29
+ invocationTraceFeed: Schema.optional(Ref.Ref(Feed.Feed)),
30
+
31
+ /**
32
+ * Preference for trigger execution.
33
+ * *disabled* - triggers do not run locally or on EDGE.
34
+ * *local* - triggers are executed locally on the client, edge is not running triggers.
35
+ * *edge* - triggers are executed on the edge, triggers are not run locally.
36
+ */
37
+ computeEnvironment: Schema.optional(ComputeEnvironment),
21
38
 
22
39
  //
23
40
  // User properties.
@@ -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, Ref, 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(Ref.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/** @deprecated Use SpaceProperties instead. */\nexport const LegacySpaceProperties = SpacePropertiesSchema.pipe(\n Type.object({\n typename: 'org.dxos.type.space-properties',\n version: '0.1.0',\n }),\n Annotation.SystemTypeAnnotation.set(true),\n);\n\nexport interface LegacySpaceProperties extends Schema.Schema.Type<typeof LegacySpaceProperties> {}\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 typename: 'org.dxos.type.spaceProperties',\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,KAAKC,YAAY;AACtC,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,IAAIA,IAAIC,KAAAA,CAAAA;;;;EAM9CC,MAAaR,gBAAgBS,aAAM;EACnCC,MAAaV,gBAAgBS,aAAM;EACnCE,KAAYX,gBAAgBS,aAAM;AACpC,GACA;EACEG,KAAYH;EACZI,OAAcC;AAChB,CAAA;AAMK,IAAMC,wBAAwBlB,sBAAsBmB,KACzDC,KAAKC,OAAO;EACVC,UAAU;EACVC,SAAS;AACX,CAAA,GACAC,WAAWC,qBAAqBC,IAAI,IAAA,CAAA;AAO/B,IAAMC,kBAAkB3B,sBAAsBmB,KACnDC,KAAKC,OAAO;EACVC,UAAU;EACVC,SAAS;AACX,CAAA,GACAC,WAAWC,qBAAqBC,IAAI,IAAA,CAAA;",
6
- "names": ["Schema", "Annotation", "Ref", "Type", "Queue", "SpacePropertiesSchema", "Struct", "archived", "optional", "Boolean", "annotations", "title", "edgeReplication", "invocationTraceQueue", "Ref", "Queue", "name", "String", "icon", "hue", "key", "value", "Any", "LegacySpaceProperties", "pipe", "Type", "object", "typename", "version", "Annotation", "SystemTypeAnnotation", "set", "SpaceProperties"]
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, Ref, 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(Ref.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/** @deprecated Use SpaceProperties instead. */\nexport const LegacySpaceProperties = SpacePropertiesSchema.pipe(\n Type.object({\n typename: 'org.dxos.type.space-properties',\n version: '0.1.0',\n }),\n Annotation.SystemTypeAnnotation.set(true),\n);\n\nexport interface LegacySpaceProperties extends Schema.Schema.Type<typeof LegacySpaceProperties> {}\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 typename: 'org.dxos.type.spaceProperties',\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,KAAKC,YAAY;AACtC,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,IAAIA,IAAIC,KAAAA,CAAAA;;;;EAM9CC,MAAaR,gBAAgBS,aAAM;EACnCC,MAAaV,gBAAgBS,aAAM;EACnCE,KAAYX,gBAAgBS,aAAM;AACpC,GACA;EACEG,KAAYH;EACZI,OAAcC;AAChB,CAAA;AAMK,IAAMC,wBAAwBlB,sBAAsBmB,KACzDC,KAAKC,OAAO;EACVC,UAAU;EACVC,SAAS;AACX,CAAA,GACAC,WAAWC,qBAAqBC,IAAI,IAAA,CAAA;AAO/B,IAAMC,kBAAkB3B,sBAAsBmB,KACnDC,KAAKC,OAAO;EACVC,UAAU;EACVC,SAAS;AACX,CAAA,GACAC,WAAWC,qBAAqBC,IAAI,IAAA,CAAA;",
6
- "names": ["Schema", "Annotation", "Ref", "Type", "Queue", "SpacePropertiesSchema", "Struct", "archived", "optional", "Boolean", "annotations", "title", "edgeReplication", "invocationTraceQueue", "Ref", "Queue", "name", "String", "icon", "hue", "key", "value", "Any", "LegacySpaceProperties", "pipe", "Type", "object", "typename", "version", "Annotation", "SystemTypeAnnotation", "set", "SpaceProperties"]
7
- }