@dxos/echo 0.8.2-staging.7ac8446 → 0.8.2

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 (46) hide show
  1. package/README.md +116 -0
  2. package/dist/lib/browser/index.mjs +241 -32
  3. package/dist/lib/browser/index.mjs.map +4 -4
  4. package/dist/lib/browser/meta.json +1 -1
  5. package/dist/lib/node/index.cjs +243 -28
  6. package/dist/lib/node/index.cjs.map +4 -4
  7. package/dist/lib/node/meta.json +1 -1
  8. package/dist/lib/node-esm/index.mjs +241 -32
  9. package/dist/lib/node-esm/index.mjs.map +4 -4
  10. package/dist/lib/node-esm/meta.json +1 -1
  11. package/dist/types/src/Obj.d.ts +39 -0
  12. package/dist/types/src/Obj.d.ts.map +1 -0
  13. package/dist/types/src/Ref.d.ts +11 -0
  14. package/dist/types/src/Ref.d.ts.map +1 -0
  15. package/dist/types/src/Relation.d.ts +19 -0
  16. package/dist/types/src/Relation.d.ts.map +1 -0
  17. package/dist/types/src/Type.d.ts +80 -42
  18. package/dist/types/src/Type.d.ts.map +1 -1
  19. package/dist/types/src/{Database.d.ts → experimental/database.d.ts} +1 -1
  20. package/dist/types/src/experimental/database.d.ts.map +1 -0
  21. package/dist/types/src/experimental/index.d.ts +1 -0
  22. package/dist/types/src/experimental/index.d.ts.map +1 -0
  23. package/dist/types/src/{Queue.d.ts → experimental/queue.d.ts} +1 -1
  24. package/dist/types/src/experimental/queue.d.ts.map +1 -0
  25. package/dist/types/src/{Space.d.ts → experimental/space.d.ts} +1 -1
  26. package/dist/types/src/experimental/space.d.ts.map +1 -0
  27. package/dist/types/src/index.d.ts +5 -5
  28. package/dist/types/src/index.d.ts.map +1 -1
  29. package/dist/types/src/{api.test.d.ts.map → test/api.test.d.ts.map} +1 -1
  30. package/dist/types/tsconfig.tsbuildinfo +1 -1
  31. package/package.json +14 -15
  32. package/src/Obj.ts +86 -0
  33. package/src/Ref.ts +21 -0
  34. package/src/Relation.ts +45 -0
  35. package/src/Type.ts +103 -75
  36. package/src/{Database.ts → experimental/database.ts} +1 -1
  37. package/src/experimental/index.ts +7 -0
  38. package/src/{Queue.ts → experimental/queue.ts} +1 -1
  39. package/src/index.ts +6 -7
  40. package/src/test/api.test.ts +128 -0
  41. package/dist/types/src/Database.d.ts.map +0 -1
  42. package/dist/types/src/Queue.d.ts.map +0 -1
  43. package/dist/types/src/Space.d.ts.map +0 -1
  44. package/src/api.test.ts +0 -94
  45. /package/dist/types/src/{api.test.d.ts → test/api.test.d.ts} +0 -0
  46. /package/src/{Space.ts → experimental/space.ts} +0 -0
package/README.md CHANGED
@@ -19,3 +19,119 @@ pnpm i @dxos/echo
19
19
  Your ideas, issues, and code are most welcome. Please take a look at our [community code of conduct](https://github.com/dxos/dxos/blob/main/CODE_OF_CONDUCT.md), the [issue guide](https://github.com/dxos/dxos/blob/main/CONTRIBUTING.md#submitting-issues), and the [PR contribution guide](https://github.com/dxos/dxos/blob/main/CONTRIBUTING.md#submitting-prs).
20
20
 
21
21
  License: [MIT](./LICENSE) Copyright 2022 © DXOS
22
+
23
+ ## API
24
+
25
+ ```ts
26
+ import { Type, Obj, Relation, Ref, Query, Filter } from '@dxos/echo';
27
+ ```
28
+
29
+ | | Object | Relation | Ref |
30
+ | ----------------------------- | ------------------------------- | ------------------------------------------- | --------------- |
31
+ | **SCHEMA API** |
32
+ | Define schema | `Type.Obj()` | `Type.Relation()` | `Type.Ref()` |
33
+ | Any schema type | `Type.Obj.Any` | `Type.Relation.Any` | `Type.Ref.Any` |
34
+ | Get DXN (of schema) | `Type.getDXN(schema)` | `Type.getDXN(schema)` | |
35
+ | Get typename (of schema) | `Type.getTypename(schema)` | `Type.getTypename(schema)` | |
36
+ | Get type metadata (of schema) | `Type.getMeta(schema)` | `Type.getMeta(schema)` | |
37
+ | Is mutable schema | `Type.isMutable(schema)` | `Type.isMutable(schema)` |
38
+ | **DATA API** |
39
+ | Any instance type | `Obj.Any` | `Relation.Any` | `Ref.Any` |
40
+ | Create object | `Obj.make(Schema, { ... })` | `Relation.make(Schema, { ... })` | `Ref.make(obj)` |
41
+ | Check kind | `Obj.isObject(x): x is Obj.Any` | `Relation.isRelation(x): x is Relation.Any` | `Ref.isRef(x)` |
42
+ | Check instance of | `Obj.instanceOf(Schema, obj)` | `Obj.instanceOf(Schema, rel)` | |
43
+ | Get schema | `Obj.getSchema(obj)` | `Obj.getSchema(obj)` | |
44
+ | Get DXN (of instance) | `Obj.getDXN(obj)` | `Obj.getDXN(obj)` | |
45
+ | Get typename (of instance) | `Obj.getTypename(obj)` | `Obj.getTypename(obj)` | |
46
+ | Get Meta | `Obj.getMeta(obj)` | `Obj.getMeta(relation)` | |
47
+ | Is deleted | `Obj.isDeleted(obj)` | `Obj.isDeleted(obj)` | |
48
+ | Get relation source | | `Relation.getSource(relation)` |
49
+ | Get relation target | | `Relation.getTarget(relation)` | |
50
+ | Expando | `Expando` |
51
+
52
+ ```ts
53
+ Type.getDXN(schema) == DXN.parse('dxn:type:example.com/type/Person:0.1.0');
54
+ Type.getMeta(schema) == { typename: }
55
+ Type.getTypename(schema) === 'example.com/type/Person'
56
+ Type.getVersion(schema) === '0.1.0'
57
+
58
+ Obj.getDXN(obj) === DXN.parse('dxn:echo:SSSSSSSSSS:XXXXXXXXXXXXX')
59
+
60
+ // We need this for objects that have typename defined, but their schema can't be resolved (Obj.getSchema(obj) === undefined)
61
+ Obj.getSchemaDXN(obj) === DXN.parse('dxn:type:example.com/type/Person:0.1.0');
62
+
63
+ /**
64
+ * @deprecated
65
+ **/
66
+ // TODO(dmaretskyi): Consider keeping it as a shorthand for zType.getTypename(Obj.getSchema(obj)) ?? Obj.getSchemaDXN(obj)?.asTypeDXN()?.type`
67
+ Obj.getTypename(obj) === 'example.com/type/Person'
68
+ ```
69
+
70
+ ISSUE: Create vs live: Is it fundamentally the same thing?
71
+
72
+ ## Object construction
73
+
74
+ Option 1:
75
+
76
+ ```ts
77
+ Relation.make(EmployeeOf, {
78
+ [Relation.Source]: cyberdyne,
79
+ [Relation.Target]: bill,
80
+ [Obj.Meta]: {
81
+ keys: [{ url: 'acme.com', id: '123' }],
82
+ },
83
+ since: '2022',
84
+ });
85
+ ```
86
+
87
+ Option 2:
88
+
89
+ ```ts
90
+ Obj.make(Contact, {
91
+ name: 'Bill',
92
+ });
93
+
94
+ Relation.make(
95
+ Employee,
96
+ {
97
+ source: cyberdyne,
98
+ target: bill,
99
+ meta: {
100
+ keys: [{ url: 'acme.com', id: '123' }],
101
+ },
102
+ },
103
+ {
104
+ since: '2022',
105
+ },
106
+ );
107
+ ```
108
+
109
+ ## Object model representation.
110
+
111
+ ### JSON serialization
112
+
113
+ ```ts
114
+ Obj.toJSON(obj);
115
+ Obj.fromJSON(json, { graph, db });
116
+ ```
117
+
118
+ Defines attributes and encoding placed on objects.
119
+
120
+ | | Optional | Runtime prop | Runtime type | JSON prop | JSON type | Description |
121
+ | ---------------- | ---------------------- | ----------------------------------- | ---------------------- | --------------------------- | --------- | ------------------------------------ |
122
+ | Id | No | `id` | `ObjectID` ULID string | `id` | string | Unique object ID |
123
+ | Self DXN | Yes | `Symbol(@dxos/echo/Self)` | `DXN` | `@self` | string | DXN to the object itself |
124
+ | Typename | No | `Symbol(@dxos/echo/Typename)` | `DXN` | `@type` | string | DXN to the object type |
125
+ | Tombstone marker | Yes | `Symbol(@dxos/echo/Deleted)` | `boolean` | `@deleted` | boolean | Deletion marker |
126
+ | Metadata | Yes | `Symbol(@dxos/echo/Meta)` | Metadata object | `@meta` | object | Metadata section |
127
+ | Entity kind | No | `Symbol(@dxos/echo/EntityKind)` | `EntityKind` | (inferred from other props) | string | Obj vs Relation |
128
+ | Relation Source | No (only on relations) | `Symbol(@dxos/echo/RelationSource)` | `DXN` | `@relationSource` | string | Relation source DXN |
129
+ | Relation Target | No (only on relations) | `Symbol(@dxos/echo/RelationTarget)` | `DXN` | `@relationTarget` | string | Relation target DXN |
130
+ | Hypergraph | Yes | `Symbol(@dxos/echo/Hypergraph)` | `Hypergraph` | - | - | Pointer to runtime hypergraph object |
131
+ | Database | Yes | `Symbol(@dxos/echo/Database)` | `Database` | - | - | Pointer to runtime database object |
132
+
133
+ ### Value representation
134
+
135
+ | | Runtime | JSON |
136
+ | --------- | ------- | -------------------- |
137
+ | Reference | `Ref` | `{ "/": "dxn:..." }` |
@@ -5,45 +5,254 @@ var __export = (target, all) => {
5
5
  __defProp(target, name, { get: all[name], enumerable: true });
6
6
  };
7
7
 
8
- // packages/core/echo/echo/src/index.ts
9
- import { DXN } from "@dxos/keys";
10
-
11
- // packages/core/echo/echo/src/Database.ts
12
- var Database_exports = {};
13
-
14
- // packages/core/echo/echo/src/Queue.ts
15
- var Queue_exports = {};
16
-
17
- // packages/core/echo/echo/src/Space.ts
18
- var Space_exports = {};
19
-
20
8
  // packages/core/echo/echo/src/Type.ts
21
9
  var Type_exports = {};
22
10
  __export(Type_exports, {
11
+ DXN: () => DXN,
12
+ Expando: () => Expando,
13
+ Format: () => Format,
14
+ JsonSchema: () => JsonSchemaType,
23
15
  Kind: () => EntityKind,
16
+ Obj: () => Obj,
24
17
  ObjectId: () => ObjectId,
25
- Ref: () => Ref,
26
- create: () => create,
27
- def: () => def,
28
- getDXN: () => getSchemaDXN,
29
- getMeta: () => getTypeAnnotation,
30
- getSchema: () => getSchema,
31
- getTypename: () => getSchemaTypename,
32
- getVersion: () => getSchemaVersion,
33
- instanceOf: () => isInstanceOf,
34
- ref: () => ref
18
+ Ref: () => Ref2,
19
+ Relation: () => Relation,
20
+ SpaceId: () => SpaceId,
21
+ getDXN: () => getDXN,
22
+ getMeta: () => getMeta,
23
+ getTypename: () => getTypename,
24
+ getVersion: () => getVersion,
25
+ isMutable: () => isMutable2,
26
+ toJsonSchema: () => toJsonSchema
27
+ });
28
+ import * as EchoSchema from "@dxos/echo-schema";
29
+ import { invariant } from "@dxos/invariant";
30
+ import { EntityKind } from "@dxos/echo-schema";
31
+ import { SpaceId, ObjectId, DXN } from "@dxos/keys";
32
+ import {
33
+ Expando,
34
+ JsonSchemaType,
35
+ toJsonSchema,
36
+ Format
37
+ } from "@dxos/echo-schema";
38
+ var __dxlog_file = "/home/runner/work/dxos/dxos/packages/core/echo/echo/src/Type.ts";
39
+ var Obj = EchoSchema.EchoObject;
40
+ var Relation = EchoSchema.EchoRelation;
41
+ var Ref2 = EchoSchema.Ref;
42
+ var getDXN = (schema) => {
43
+ return EchoSchema.getSchemaDXN(schema);
44
+ };
45
+ var getTypename = (schema) => {
46
+ const typename = EchoSchema.getSchemaTypename(schema);
47
+ invariant(typeof typename === "string" && !typename.startsWith("dxn:"), "Invalid typename", {
48
+ F: __dxlog_file,
49
+ L: 84,
50
+ S: void 0,
51
+ A: [
52
+ "typeof typename === 'string' && !typename.startsWith('dxn:')",
53
+ "'Invalid typename'"
54
+ ]
55
+ });
56
+ return typename;
57
+ };
58
+ var getVersion = (schema) => {
59
+ const version = EchoSchema.getSchemaVersion(schema);
60
+ invariant(typeof version === "string" && version.match(/^\d+\.\d+\.\d+$/), "Invalid version", {
61
+ F: __dxlog_file,
62
+ L: 94,
63
+ S: void 0,
64
+ A: [
65
+ "typeof version === 'string' && version.match(/^\\d+\\.\\d+\\.\\d+$/)",
66
+ "'Invalid version'"
67
+ ]
68
+ });
69
+ return version;
70
+ };
71
+ var getMeta = (schema) => {
72
+ return EchoSchema.getTypeAnnotation(schema);
73
+ };
74
+ var isMutable2 = (schema) => {
75
+ return EchoSchema.isMutable(schema);
76
+ };
77
+
78
+ // packages/core/echo/echo/src/Obj.ts
79
+ var Obj_exports = {};
80
+ __export(Obj_exports, {
81
+ getDXN: () => getDXN3,
82
+ getMeta: () => getMeta3,
83
+ getSchema: () => getSchema2,
84
+ getSchemaDXN: () => getSchemaDXN2,
85
+ getTypename: () => getTypename3,
86
+ instanceOf: () => instanceOf,
87
+ isDeleted: () => isDeleted2,
88
+ isObject: () => isObject,
89
+ make: () => make
90
+ });
91
+ import { Schema } from "effect";
92
+ import * as EchoSchema2 from "@dxos/echo-schema";
93
+ import { assertArgument, invariant as invariant2 } from "@dxos/invariant";
94
+ import * as LiveObject from "@dxos/live-object";
95
+ var __dxlog_file2 = "/home/runner/work/dxos/dxos/packages/core/echo/echo/src/Obj.ts";
96
+ var make = LiveObject.live;
97
+ var isObject = (obj) => {
98
+ return LiveObject.isLiveObject(obj);
99
+ };
100
+ var instanceOf = (...args) => {
101
+ if (args.length === 1) {
102
+ return (obj) => EchoSchema2.isInstanceOf(args[0], obj);
103
+ }
104
+ return EchoSchema2.isInstanceOf(args[0], args[1]);
105
+ };
106
+ var getSchema2 = EchoSchema2.getSchema;
107
+ var getDXN3 = (obj) => {
108
+ assertArgument(!Schema.isSchema(obj), "Object should not be a schema.");
109
+ const dxn = EchoSchema2.getDXN(obj);
110
+ invariant2(dxn != null, "Invalid object.", {
111
+ F: __dxlog_file2,
112
+ L: 48,
113
+ S: void 0,
114
+ A: [
115
+ "dxn != null",
116
+ "'Invalid object.'"
117
+ ]
118
+ });
119
+ return dxn;
120
+ };
121
+ var getSchemaDXN2 = (obj) => {
122
+ const type = EchoSchema2.getType(obj);
123
+ invariant2(type != null, "Invalid object.", {
124
+ F: __dxlog_file2,
125
+ L: 58,
126
+ S: void 0,
127
+ A: [
128
+ "type != null",
129
+ "'Invalid object.'"
130
+ ]
131
+ });
132
+ return type;
133
+ };
134
+ var getTypename3 = (obj) => {
135
+ const schema = getSchema2(obj);
136
+ if (schema == null) {
137
+ return getSchemaDXN2(obj)?.asTypeDXN()?.type;
138
+ }
139
+ return EchoSchema2.getTypename(schema);
140
+ };
141
+ var getMeta3 = (obj) => {
142
+ const meta = EchoSchema2.getMeta(obj);
143
+ invariant2(meta != null, "Invalid object.", {
144
+ F: __dxlog_file2,
145
+ L: 78,
146
+ S: void 0,
147
+ A: [
148
+ "meta != null",
149
+ "'Invalid object.'"
150
+ ]
151
+ });
152
+ return meta;
153
+ };
154
+ var isDeleted2 = (obj) => {
155
+ const deleted = EchoSchema2.isDeleted(obj);
156
+ invariant2(typeof deleted === "boolean", "Invalid object.", {
157
+ F: __dxlog_file2,
158
+ L: 84,
159
+ S: void 0,
160
+ A: [
161
+ "typeof deleted === 'boolean'",
162
+ "'Invalid object.'"
163
+ ]
164
+ });
165
+ return deleted;
166
+ };
167
+
168
+ // packages/core/echo/echo/src/Relation.ts
169
+ var Relation_exports = {};
170
+ __export(Relation_exports, {
171
+ getSource: () => getSource,
172
+ getTarget: () => getTarget,
173
+ isRelation: () => isRelation,
174
+ make: () => make2
35
175
  });
36
- import { EchoObject, EntityKind, ObjectId, Ref as Ref$, getTypeAnnotation, getSchema, getSchemaDXN, getSchemaTypename, getSchemaVersion, isInstanceOf } from "@dxos/echo-schema";
37
- import { create as create$, makeRef } from "@dxos/live-object";
38
- var ref = makeRef;
39
- var create = create$;
40
- var def = (meta) => EchoObject(meta);
41
- var Ref = (self) => Ref$(self);
176
+ import * as EchoSchema3 from "@dxos/echo-schema";
177
+ import { invariant as invariant3 } from "@dxos/invariant";
178
+ import * as LiveObject2 from "@dxos/live-object";
179
+ var __dxlog_file3 = "/home/runner/work/dxos/dxos/packages/core/echo/echo/src/Relation.ts";
180
+ var make2 = LiveObject2.live;
181
+ var isRelation = (value) => {
182
+ if (typeof value !== "object" || value === null) {
183
+ return false;
184
+ }
185
+ if (EchoSchema3.ATTR_RELATION_SOURCE in value || EchoSchema3.ATTR_RELATION_TARGET in value) {
186
+ return true;
187
+ }
188
+ const kind = value[EchoSchema3.EntityKindPropertyId];
189
+ return kind === EchoSchema3.EntityKind.Relation;
190
+ };
191
+ var getSource = (relation) => {
192
+ invariant3(isRelation(relation), void 0, {
193
+ F: __dxlog_file3,
194
+ L: 30,
195
+ S: void 0,
196
+ A: [
197
+ "isRelation(relation)",
198
+ ""
199
+ ]
200
+ });
201
+ const obj = relation[EchoSchema3.RelationSourceId];
202
+ invariant3(obj !== void 0, `Invalid source: ${relation.id}`, {
203
+ F: __dxlog_file3,
204
+ L: 32,
205
+ S: void 0,
206
+ A: [
207
+ "obj !== undefined",
208
+ "`Invalid source: ${relation.id}`"
209
+ ]
210
+ });
211
+ return obj;
212
+ };
213
+ var getTarget = (relation) => {
214
+ invariant3(isRelation(relation), void 0, {
215
+ F: __dxlog_file3,
216
+ L: 41,
217
+ S: void 0,
218
+ A: [
219
+ "isRelation(relation)",
220
+ ""
221
+ ]
222
+ });
223
+ const obj = relation[EchoSchema3.RelationTargetId];
224
+ invariant3(obj !== void 0, `Invalid target: ${relation.id}`, {
225
+ F: __dxlog_file3,
226
+ L: 43,
227
+ S: void 0,
228
+ A: [
229
+ "obj !== undefined",
230
+ "`Invalid target: ${relation.id}`"
231
+ ]
232
+ });
233
+ return obj;
234
+ };
235
+
236
+ // packages/core/echo/echo/src/Ref.ts
237
+ var Ref_exports = {};
238
+ __export(Ref_exports, {
239
+ fromDXN: () => fromDXN,
240
+ isRef: () => isRef,
241
+ make: () => make3
242
+ });
243
+ import * as EchoSchema4 from "@dxos/echo-schema";
244
+ var make3 = EchoSchema4.Ref.make;
245
+ var isRef = EchoSchema4.Ref.isRef;
246
+ var fromDXN = EchoSchema4.Ref.fromDXN;
247
+
248
+ // packages/core/echo/echo/src/index.ts
249
+ import { Filter, Query } from "@dxos/echo-schema";
42
250
  export {
43
- DXN,
44
- Database_exports as Database,
45
- Queue_exports as Queue,
46
- Space_exports as Space,
251
+ Filter,
252
+ Obj_exports as Obj,
253
+ Query,
254
+ Ref_exports as Ref,
255
+ Relation_exports as Relation,
47
256
  Type_exports as Type
48
257
  };
49
258
  //# sourceMappingURL=index.mjs.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../src/index.ts", "../../../src/Database.ts", "../../../src/Queue.ts", "../../../src/Space.ts", "../../../src/Type.ts"],
4
- "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { DXN } from '@dxos/keys';\n\nexport { DXN };\n\nexport * as Database from './Database';\nexport * as Queue from './Queue';\nexport * as Space from './Space';\nexport * as Type from './Type';\n", "//\n// Copyright 2025 DXOS.org\n//\n\n/**\n * Database API.\n *\n * @category api namespace\n * @since 0.9.0\n */\nexport declare namespace Database {}\n", "//\n// Copyright 2025 DXOS.org\n//\n\n/**\n * Queue API.\n *\n * @category api namespace\n * @since 0.9.0\n */\nexport declare namespace Queue {}\n", "//\n// Copyright 2025 DXOS.org\n//\n\n/**\n * Space API.\n *\n * @category api namespace\n * @since 0.9.0\n */\nexport declare namespace Space {}\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { type Schema } from 'effect';\n\nimport {\n type BaseSchema,\n type EchoSchema,\n type Expando as Expando$,\n type ImmutableSchema,\n type JsonSchemaType,\n type TypeMeta,\n EchoObject,\n EntityKind,\n ObjectId,\n Ref as Ref$,\n getTypeAnnotation,\n getSchema,\n getSchemaDXN,\n getSchemaTypename,\n getSchemaVersion,\n isInstanceOf,\n} from '@dxos/echo-schema';\nimport { create as create$, makeRef } from '@dxos/live-object';\n\n// NOTES:\n// - New Echo package and namespaces allow for incremental migration; vastly simplifies imports.\n// - Split into separate ECHO namespaces: Database, Space, Type, Query, Queue.\n// - Example; import { Database, Type, Query, Queue } from '@dxos/echo';\n// - Use `declare namespace` for types (no code is generated). See Effect pattern, where Schema is a namespace, interface, and function.\n// - Test with @dxos/schema/testing types.\n// - Define user (Composer) types in namespace (e.g., of plugin) and drop Type suffix; remove all deprecated Braneframe types.\n\nexport type { TypeMeta as Meta, JsonSchemaType as JsonSchema };\nexport {\n EntityKind as Kind,\n ObjectId,\n getTypeAnnotation as getMeta,\n getSchema,\n getSchemaDXN as getDXN,\n getSchemaTypename as getTypename,\n getSchemaVersion as getVersion,\n isInstanceOf as instanceOf,\n};\n\n/**\n * Type API.\n *\n * @category api namespace\n * @since 0.9.0\n */\nexport declare namespace Type {\n /**\n * A schema that can be extended with arbitrary properties.\n */\n export type Expando = Expando$;\n\n export type Abstract<T = any> = BaseSchema<T>;\n export type ImmutableType<T> = ImmutableSchema<T>;\n export type MutableType<T> = EchoSchema<T>;\n}\n\n//\n// Constructors\n//\n\nexport const ref = makeRef;\nexport const create = create$;\n\n//\n// Combinators\n//\n\n/**\n * Defines an ECHO type.\n *\n * @example\n * ```ts\n * const Org = S.Struct({\n * name: S.String,\n * }).pipe(Type.def({ typename: 'example.com/type/Org', version: '1.0.0' }));\n * ```\n */\nexport const def = (meta: TypeMeta) => EchoObject(meta);\n\n/**\n * Defines a reference to an ECHO object.\n *\n * @example\n * ```ts\n * import { Type } from '@dxos/echo';\n * const Contact = S.Struct({\n * name: S.String,\n * employer: Type.Ref(Org),\n * }).pipe(Type.def({ typename: 'example.com/type/Contact', version: '1.0.0' }));\n * ```\n */\nexport const Ref = <S extends Schema.Schema.AnyNoContext>(self: S) => Ref$<Schema.Schema.Type<S>>(self);\n"],
5
- "mappings": ";;;;;;;;AAIA,SAASA,WAAW;;;ACJpB;;;ACAA;;;ACAA;;;ACAA;;;;;;;;;;;;;;;AAMA,SAOEC,YACAC,YACAC,UACAC,OAAOC,MACPC,mBACAC,WACAC,cACAC,mBACAC,kBACAC,oBACK;AACP,SAASC,UAAUC,SAASC,eAAe;AA2CpC,IAAMC,MAAMC;AACZ,IAAMC,SAASC;AAgBf,IAAMC,MAAM,CAACC,SAAmBC,WAAWD,IAAAA;AAc3C,IAAME,MAAM,CAAuCC,SAAYC,KAA4BD,IAAAA;",
6
- "names": ["DXN", "EchoObject", "EntityKind", "ObjectId", "Ref", "Ref$", "getTypeAnnotation", "getSchema", "getSchemaDXN", "getSchemaTypename", "getSchemaVersion", "isInstanceOf", "create", "create$", "makeRef", "ref", "makeRef", "create", "create$", "def", "meta", "EchoObject", "Ref", "self", "Ref$"]
3
+ "sources": ["../../../src/Type.ts", "../../../src/Obj.ts", "../../../src/Relation.ts", "../../../src/Ref.ts", "../../../src/index.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { type Schema } from 'effect';\n\nimport type { EncodedReference } from '@dxos/echo-protocol';\nimport * as EchoSchema from '@dxos/echo-schema';\nimport { invariant } from '@dxos/invariant';\nimport type * as Keys from '@dxos/keys';\n\n/**\n * ECHO schema.\n */\nexport type Schema = EchoSchema.EchoSchema;\n\n/**\n * EchoObject schema.\n */\nexport const Obj = EchoSchema.EchoObject;\n\n/**\n * EchoRelation schema.\n */\nexport const Relation = EchoSchema.EchoRelation;\n\n/**\n * Ref schema.\n */\nexport const Ref: <S extends Obj.Any>(schema: S) => EchoSchema.Ref$<Schema.Schema.Type<S>> = EchoSchema.Ref;\n\nexport namespace Obj {\n /**\n * Type that represents an arbitrary schema type of an object.\n * NOTE: This is not an instance type.\n */\n // TODO(dmaretskyi): If schema was covariant, we could specify props in here, like `id: ObjectId`.\n export type Any = Schema.Schema.AnyNoContext;\n}\n\nexport namespace Relation {\n /**\n * Type that represents an arbitrary schema type of a relation.\n * NOTE: This is not an instance type.\n */\n // TODO(dmaretskyi): If schema was covariant, we could specify props in here, like `id: ObjectId`.\n export type Any = Schema.Schema.AnyNoContext;\n\n /**\n * Get relation target type.\n */\n export type Target<A> = A extends EchoSchema.RelationSourceTargetRefs<infer T, infer _S> ? T : never;\n\n /**\n * Get relation source type.\n */\n export type Source<A> = A extends EchoSchema.RelationSourceTargetRefs<infer _T, infer S> ? S : never;\n}\n\nexport namespace Ref {\n /**\n * Type that represents an arbitrary schema type of a reference.\n * NOTE: This is not an instance type.\n */\n export type Any = Schema.Schema<EchoSchema.Ref<any>, EncodedReference>;\n}\n\n/**\n * Gets the full DXN of the schema.\n * Will include the version if it's a `type` DXN.\n * @example \"dxn:example.com/type/Person:0.1.0\"\n * @example \"dxn:echo:SSSSSSSSSS:XXXXXXXXXXXXX\"\n */\nexport const getDXN = (schema: Obj.Any | Relation.Any): Keys.DXN | undefined => {\n return EchoSchema.getSchemaDXN(schema);\n};\n\n/**\n * @param schema - Schema to get the typename from.\n * @returns The typename of the schema. Example: `example.com/type/Person`.\n */\nexport const getTypename = (schema: Obj.Any | Relation.Any): string => {\n const typename = EchoSchema.getSchemaTypename(schema);\n invariant(typeof typename === 'string' && !typename.startsWith('dxn:'), 'Invalid typename');\n return typename;\n};\n\n/**\n * Gets the version of the schema.\n * @example 0.1.0\n */\nexport const getVersion = (schema: Obj.Any | Relation.Any): string => {\n const version = EchoSchema.getSchemaVersion(schema);\n invariant(typeof version === 'string' && version.match(/^\\d+\\.\\d+\\.\\d+$/), 'Invalid version');\n return version;\n};\n\n/**\n * ECHO type metadata.\n */\nexport type Meta = EchoSchema.TypeAnnotation;\n\n/**\n * Gets the meta data of the schema.\n */\nexport const getMeta = (schema: Obj.Any | Relation.Any): Meta | undefined => {\n return EchoSchema.getTypeAnnotation(schema);\n};\n\nexport { EntityKind as Kind } from '@dxos/echo-schema';\n\n/**\n * @returns True if the schema is mutable.\n */\nexport const isMutable = (schema: Obj.Any | Relation.Any): boolean => {\n return EchoSchema.isMutable(schema);\n};\n\nexport { SpaceId, ObjectId, DXN } from '@dxos/keys';\n\nexport {\n //\n Expando,\n JsonSchemaType as JsonSchema,\n toJsonSchema,\n Format,\n} from '@dxos/echo-schema';\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { Schema } from 'effect';\n\nimport * as EchoSchema from '@dxos/echo-schema';\nimport { assertArgument, invariant } from '@dxos/invariant';\nimport type { DXN } from '@dxos/keys';\nimport * as LiveObject from '@dxos/live-object';\n\nimport type * as Type from './Type';\n\nexport type Any = EchoSchema.AnyEchoObject;\n\nexport const make = LiveObject.live;\n\n// TODO(dmaretskyi): Currently broken\nexport const isObject = (obj: unknown): obj is Any => {\n return LiveObject.isLiveObject(obj);\n};\n\n/**\n * Check that object or relation is an instance of a schema.\n * @example\n * ```ts\n * const person = Obj.make(Person, { name: 'John' });\n * const isPerson = Obj.instanceOf(Person);\n * isPerson(person); // true\n * ```\n */\nexport const instanceOf: {\n <S extends Type.Relation.Any | Type.Obj.Any>(schema: S): (value: unknown) => value is S;\n <S extends Type.Relation.Any | Type.Obj.Any>(schema: S, value: unknown): value is S;\n} = ((...args: any[]) => {\n if (args.length === 1) {\n return (obj: unknown) => EchoSchema.isInstanceOf(args[0], obj);\n }\n\n return EchoSchema.isInstanceOf(args[0], args[1]);\n}) as any;\n\nexport const getSchema = EchoSchema.getSchema;\n\nexport const getDXN = (obj: Any): DXN => {\n assertArgument(!Schema.isSchema(obj), 'Object should not be a schema.');\n const dxn = EchoSchema.getDXN(obj);\n invariant(dxn != null, 'Invalid object.');\n return dxn;\n};\n\n/**\n * @returns The DXN of the object's type.\n * @example dxn:example.com/type/Contact:1.0.0\n */\nexport const getSchemaDXN = (obj: Any): DXN => {\n const type = EchoSchema.getType(obj);\n invariant(type != null, 'Invalid object.');\n return type;\n};\n\n/**\n * @returns The typename of the object's type.\n * @example `example.com/type/Contact`\n */\nexport const getTypename = (obj: Any): string | undefined => {\n const schema = getSchema(obj);\n if (schema == null) {\n // Try to extract typename from DXN.\n return getSchemaDXN(obj)?.asTypeDXN()?.type;\n }\n\n return EchoSchema.getTypename(schema);\n};\n\nexport const getMeta = (obj: Any): EchoSchema.ObjectMeta => {\n const meta = EchoSchema.getMeta(obj);\n invariant(meta != null, 'Invalid object.');\n return meta;\n};\n\nexport const isDeleted = (obj: Any): boolean => {\n const deleted = EchoSchema.isDeleted(obj);\n invariant(typeof deleted === 'boolean', 'Invalid object.');\n return deleted;\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport * as EchoSchema from '@dxos/echo-schema';\nimport { invariant } from '@dxos/invariant';\nimport * as LiveObject from '@dxos/live-object';\n\nexport type Any = EchoSchema.AnyEchoObject & EchoSchema.RelationSourceTargetRefs;\n\nexport const make = LiveObject.live;\n\nexport const isRelation = (value: unknown): value is Any => {\n if (typeof value !== 'object' || value === null) {\n return false;\n }\n if (EchoSchema.ATTR_RELATION_SOURCE in value || EchoSchema.ATTR_RELATION_TARGET in value) {\n return true;\n }\n\n const kind = (value as any)[EchoSchema.EntityKindPropertyId];\n return kind === EchoSchema.EntityKind.Relation;\n};\n\n/**\n * @returns Relation source.\n * @throws If the object is not a relation.\n */\nexport const getSource = <T extends Any>(relation: T): EchoSchema.RelationSource<T> => {\n invariant(isRelation(relation));\n const obj = relation[EchoSchema.RelationSourceId];\n invariant(obj !== undefined, `Invalid source: ${relation.id}`);\n return obj;\n};\n\n/**\n * @returns Relation target.\n * @throws If the object is not a relation.\n */\nexport const getTarget = <T extends Any>(relation: T): EchoSchema.RelationTarget<T> => {\n invariant(isRelation(relation));\n const obj = relation[EchoSchema.RelationTargetId];\n invariant(obj !== undefined, `Invalid target: ${relation.id}`);\n return obj;\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport * as EchoSchema from '@dxos/echo-schema';\n\nimport type * as Obj from './Obj';\n\nexport type Any = EchoSchema.Ref<Obj.Any>;\n\nexport const make = EchoSchema.Ref.make;\n\nexport const isRef: (value: unknown) => value is Any = EchoSchema.Ref.isRef;\n\n// TODO(dmaretskyi): Consider just allowing `make` to accept DXN.\nexport const fromDXN = EchoSchema.Ref.fromDXN;\n\n/**\n * Extract reference target.\n */\nexport type Target<R extends Any> = R extends EchoSchema.Ref<infer T> ? T : never;\n", "//\n// Copyright 2025 DXOS.org\n//\n\nexport * as Type from './Type';\nexport * as Obj from './Obj';\nexport * as Relation from './Relation';\nexport * as Ref from './Ref';\n\nexport { type Live } from '@dxos/live-object';\nexport { Filter, Query } from '@dxos/echo-schema';\n"],
5
+ "mappings": ";;;;;;;;AAAA;;;;;;;;;aAAAA;EAAA;;;;;;mBAAAC;EAAA;;AAOA,YAAYC,gBAAgB;AAC5B,SAASC,iBAAiB;AAqG1B,SAAuBC,kBAAY;AASnC,SAASC,SAASC,UAAUC,WAAW;AAEvC;EAEEC;EACkBC;EAClBC;EACAC;OACK;;AA3GA,IAAMC,MAAiBC;AAKvB,IAAMC,WAAsBC;AAK5B,IAAMf,OAA2FA;AA4CjG,IAAMgB,SAAS,CAACC,WAAAA;AACrB,SAAkBC,wBAAaD,MAAAA;AACjC;AAMO,IAAME,cAAc,CAACF,WAAAA;AAC1B,QAAMG,WAAsBC,6BAAkBJ,MAAAA;AAC9Cd,YAAU,OAAOiB,aAAa,YAAY,CAACA,SAASE,WAAW,MAAA,GAAS,oBAAA;;;;;;;;;AACxE,SAAOF;AACT;AAMO,IAAMG,aAAa,CAACN,WAAAA;AACzB,QAAMO,UAAqBC,4BAAiBR,MAAAA;AAC5Cd,YAAU,OAAOqB,YAAY,YAAYA,QAAQE,MAAM,iBAAA,GAAoB,mBAAA;;;;;;;;;AAC3E,SAAOF;AACT;AAUO,IAAMG,UAAU,CAACV,WAAAA;AACtB,SAAkBW,6BAAkBX,MAAAA;AACtC;AAOO,IAAMhB,aAAY,CAACgB,WAAAA;AACxB,SAAkBhB,qBAAUgB,MAAAA;AAC9B;;;ACpHA;;gBAAAY;EAAA,eAAAC;EAAA,iBAAAC;EAAA,oBAAAC;EAAA,mBAAAC;EAAA;mBAAAC;EAAA;;;AAIA,SAASC,cAAc;AAEvB,YAAYC,iBAAgB;AAC5B,SAASC,gBAAgBC,aAAAA,kBAAiB;AAE1C,YAAYC,gBAAgB;;AAMrB,IAAMC,OAAkBC;AAGxB,IAAMC,WAAW,CAACC,QAAAA;AACvB,SAAkBC,wBAAaD,GAAAA;AACjC;AAWO,IAAME,aAGR,IAAIC,SAAAA;AACP,MAAIA,KAAKC,WAAW,GAAG;AACrB,WAAO,CAACJ,QAA4BK,yBAAaF,KAAK,CAAA,GAAIH,GAAAA;EAC5D;AAEA,SAAkBK,yBAAaF,KAAK,CAAA,GAAIA,KAAK,CAAA,CAAE;AACjD;AAEO,IAAMf,aAAuBA;AAE7B,IAAMF,UAAS,CAACc,QAAAA;AACrBN,iBAAe,CAACF,OAAOc,SAASN,GAAAA,GAAM,gCAAA;AACtC,QAAMO,MAAiBrB,mBAAOc,GAAAA;AAC9BL,EAAAA,WAAUY,OAAO,MAAM,mBAAA;;;;;;;;;AACvB,SAAOA;AACT;AAMO,IAAMlB,gBAAe,CAACW,QAAAA;AAC3B,QAAMQ,OAAkBC,oBAAQT,GAAAA;AAChCL,EAAAA,WAAUa,QAAQ,MAAM,mBAAA;;;;;;;;;AACxB,SAAOA;AACT;AAMO,IAAMlB,eAAc,CAACU,QAAAA;AAC1B,QAAMU,SAAStB,WAAUY,GAAAA;AACzB,MAAIU,UAAU,MAAM;AAElB,WAAOrB,cAAaW,GAAAA,GAAMW,UAAAA,GAAaH;EACzC;AAEA,SAAkBlB,wBAAYoB,MAAAA;AAChC;AAEO,IAAMvB,WAAU,CAACa,QAAAA;AACtB,QAAMY,OAAkBzB,oBAAQa,GAAAA;AAChCL,EAAAA,WAAUiB,QAAQ,MAAM,mBAAA;;;;;;;;;AACxB,SAAOA;AACT;AAEO,IAAMrB,aAAY,CAACS,QAAAA;AACxB,QAAMa,UAAqBtB,sBAAUS,GAAAA;AACrCL,EAAAA,WAAU,OAAOkB,YAAY,WAAW,mBAAA;;;;;;;;;AACxC,SAAOA;AACT;;;ACrFA;;;;;cAAAC;;AAIA,YAAYC,iBAAgB;AAC5B,SAASC,aAAAA,kBAAiB;AAC1B,YAAYC,iBAAgB;;AAIrB,IAAMH,QAAkBI;AAExB,IAAMC,aAAa,CAACC,UAAAA;AACzB,MAAI,OAAOA,UAAU,YAAYA,UAAU,MAAM;AAC/C,WAAO;EACT;AACA,MAAeC,oCAAwBD,SAAoBE,oCAAwBF,OAAO;AACxF,WAAO;EACT;AAEA,QAAMG,OAAQH,MAAyBI,gCAAoB;AAC3D,SAAOD,SAAoBE,uBAAWC;AACxC;AAMO,IAAMC,YAAY,CAAgBC,aAAAA;AACvCZ,EAAAA,WAAUG,WAAWS,QAAAA,GAAAA,QAAAA;;;;;;;;;AACrB,QAAMC,MAAMD,SAAoBE,4BAAgB;AAChDd,EAAAA,WAAUa,QAAQE,QAAW,mBAAmBH,SAASI,EAAE,IAAE;;;;;;;;;AAC7D,SAAOH;AACT;AAMO,IAAMI,YAAY,CAAgBL,aAAAA;AACvCZ,EAAAA,WAAUG,WAAWS,QAAAA,GAAAA,QAAAA;;;;;;;;;AACrB,QAAMC,MAAMD,SAAoBM,4BAAgB;AAChDlB,EAAAA,WAAUa,QAAQE,QAAW,mBAAmBH,SAASI,EAAE,IAAE;;;;;;;;;AAC7D,SAAOH;AACT;;;AC5CA;;;;cAAAM;;AAIA,YAAYC,iBAAgB;AAMrB,IAAMC,QAAkBC,gBAAID;AAE5B,IAAME,QAAqDD,gBAAIC;AAG/D,IAAMC,UAAqBF,gBAAIE;;;ACLtC,SAASC,QAAQC,aAAa;",
6
+ "names": ["Ref", "isMutable", "EchoSchema", "invariant", "Kind", "SpaceId", "ObjectId", "DXN", "Expando", "JsonSchema", "toJsonSchema", "Format", "Obj", "EchoObject", "Relation", "EchoRelation", "getDXN", "schema", "getSchemaDXN", "getTypename", "typename", "getSchemaTypename", "startsWith", "getVersion", "version", "getSchemaVersion", "match", "getMeta", "getTypeAnnotation", "getDXN", "getMeta", "getSchema", "getSchemaDXN", "getTypename", "isDeleted", "Schema", "EchoSchema", "assertArgument", "invariant", "LiveObject", "make", "live", "isObject", "obj", "isLiveObject", "instanceOf", "args", "length", "isInstanceOf", "isSchema", "dxn", "type", "getType", "schema", "asTypeDXN", "meta", "deleted", "make", "EchoSchema", "invariant", "LiveObject", "live", "isRelation", "value", "ATTR_RELATION_SOURCE", "ATTR_RELATION_TARGET", "kind", "EntityKindPropertyId", "EntityKind", "Relation", "getSource", "relation", "obj", "RelationSourceId", "undefined", "id", "getTarget", "RelationTargetId", "make", "EchoSchema", "make", "Ref", "isRef", "fromDXN", "Filter", "Query"]
7
7
  }
@@ -1 +1 @@
1
- {"inputs":{"packages/core/echo/echo/src/Database.ts":{"bytes":689,"imports":[],"format":"esm"},"packages/core/echo/echo/src/Queue.ts":{"bytes":671,"imports":[],"format":"esm"},"packages/core/echo/echo/src/Space.ts":{"bytes":671,"imports":[],"format":"esm"},"packages/core/echo/echo/src/Type.ts":{"bytes":6001,"imports":[{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/live-object","kind":"import-statement","external":true}],"format":"esm"},"packages/core/echo/echo/src/index.ts":{"bytes":1157,"imports":[{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"packages/core/echo/echo/src/Database.ts","kind":"import-statement","original":"./Database"},{"path":"packages/core/echo/echo/src/Queue.ts","kind":"import-statement","original":"./Queue"},{"path":"packages/core/echo/echo/src/Space.ts","kind":"import-statement","original":"./Space"},{"path":"packages/core/echo/echo/src/Type.ts","kind":"import-statement","original":"./Type"}],"format":"esm"}},"outputs":{"packages/core/echo/echo/dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":4021},"packages/core/echo/echo/dist/lib/browser/index.mjs":{"imports":[{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/live-object","kind":"import-statement","external":true}],"exports":["DXN","Database","Queue","Space","Type"],"entryPoint":"packages/core/echo/echo/src/index.ts","inputs":{"packages/core/echo/echo/src/index.ts":{"bytesInOutput":34},"packages/core/echo/echo/src/Database.ts":{"bytesInOutput":27},"packages/core/echo/echo/src/Queue.ts":{"bytesInOutput":24},"packages/core/echo/echo/src/Space.ts":{"bytesInOutput":24},"packages/core/echo/echo/src/Type.ts":{"bytesInOutput":744}},"bytes":1421}}}
1
+ {"inputs":{"packages/core/echo/echo/src/Type.ts":{"bytes":8839,"imports":[{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true}],"format":"esm"},"packages/core/echo/echo/src/Obj.ts":{"bytes":8124,"imports":[{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/live-object","kind":"import-statement","external":true}],"format":"esm"},"packages/core/echo/echo/src/Relation.ts":{"bytes":5369,"imports":[{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/live-object","kind":"import-statement","external":true}],"format":"esm"},"packages/core/echo/echo/src/Ref.ts":{"bytes":1595,"imports":[{"path":"@dxos/echo-schema","kind":"import-statement","external":true}],"format":"esm"},"packages/core/echo/echo/src/index.ts":{"bytes":1162,"imports":[{"path":"packages/core/echo/echo/src/Type.ts","kind":"import-statement","original":"./Type"},{"path":"packages/core/echo/echo/src/Obj.ts","kind":"import-statement","original":"./Obj"},{"path":"packages/core/echo/echo/src/Relation.ts","kind":"import-statement","original":"./Relation"},{"path":"packages/core/echo/echo/src/Ref.ts","kind":"import-statement","original":"./Ref"},{"path":"@dxos/echo-schema","kind":"import-statement","external":true}],"format":"esm"}},"outputs":{"packages/core/echo/echo/dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":12154},"packages/core/echo/echo/dist/lib/browser/index.mjs":{"imports":[{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/live-object","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/live-object","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true}],"exports":["Filter","Obj","Query","Ref","Relation","Type"],"entryPoint":"packages/core/echo/echo/src/index.ts","inputs":{"packages/core/echo/echo/src/Type.ts":{"bytesInOutput":1927},"packages/core/echo/echo/src/index.ts":{"bytesInOutput":51},"packages/core/echo/echo/src/Obj.ts":{"bytesInOutput":2226},"packages/core/echo/echo/src/Relation.ts":{"bytesInOutput":1700},"packages/core/echo/echo/src/Ref.ts":{"bytesInOutput":276}},"bytes":6748}}}