@bjornpagen/bumbledb 0.2.0 → 0.3.0

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 (84) hide show
  1. package/COOKBOOK.md +462 -406
  2. package/README.md +66 -31
  3. package/dist/closed.d.ts +121 -25
  4. package/dist/closed.d.ts.map +1 -1
  5. package/dist/closed.js +108 -42
  6. package/dist/closed.js.map +1 -1
  7. package/dist/db.d.ts +12 -1
  8. package/dist/db.d.ts.map +1 -1
  9. package/dist/db.js +20 -5
  10. package/dist/db.js.map +1 -1
  11. package/dist/face.d.ts +100 -55
  12. package/dist/face.d.ts.map +1 -1
  13. package/dist/face.js +36 -10
  14. package/dist/face.js.map +1 -1
  15. package/dist/fields.d.ts +50 -79
  16. package/dist/fields.d.ts.map +1 -1
  17. package/dist/fields.js +20 -53
  18. package/dist/fields.js.map +1 -1
  19. package/dist/index.d.ts +17 -12
  20. package/dist/index.d.ts.map +1 -1
  21. package/dist/index.js +10 -6
  22. package/dist/index.js.map +1 -1
  23. package/dist/law.d.ts +224 -0
  24. package/dist/law.d.ts.map +1 -0
  25. package/dist/law.js +224 -0
  26. package/dist/law.js.map +1 -0
  27. package/dist/lower.d.ts +17 -10
  28. package/dist/lower.d.ts.map +1 -1
  29. package/dist/lower.js +34 -23
  30. package/dist/lower.js.map +1 -1
  31. package/dist/native.d.ts +6 -2
  32. package/dist/native.d.ts.map +1 -1
  33. package/dist/native.js.map +1 -1
  34. package/dist/query/atom.d.ts +88 -50
  35. package/dist/query/atom.d.ts.map +1 -1
  36. package/dist/query/atom.js +4 -1
  37. package/dist/query/atom.js.map +1 -1
  38. package/dist/query/lower.d.ts +71 -56
  39. package/dist/query/lower.d.ts.map +1 -1
  40. package/dist/query/lower.js +90 -43
  41. package/dist/query/lower.js.map +1 -1
  42. package/dist/query/predicate.d.ts +10 -9
  43. package/dist/query/predicate.d.ts.map +1 -1
  44. package/dist/query/predicate.js +2 -2
  45. package/dist/query/predicate.js.map +1 -1
  46. package/dist/query/scope.d.ts +76 -41
  47. package/dist/query/scope.d.ts.map +1 -1
  48. package/dist/query/scope.js +77 -30
  49. package/dist/query/scope.js.map +1 -1
  50. package/dist/query/select.d.ts +5 -5
  51. package/dist/query/select.d.ts.map +1 -1
  52. package/dist/relation.d.ts +21 -8
  53. package/dist/relation.d.ts.map +1 -1
  54. package/dist/relation.js +13 -7
  55. package/dist/relation.js.map +1 -1
  56. package/dist/schema.d.ts +41 -3
  57. package/dist/schema.d.ts.map +1 -1
  58. package/dist/schema.js +16 -2
  59. package/dist/schema.js.map +1 -1
  60. package/dist/spec.d.ts +7 -6
  61. package/dist/spec.d.ts.map +1 -1
  62. package/dist/spec.js.map +1 -1
  63. package/dist/statements.d.ts +61 -31
  64. package/dist/statements.d.ts.map +1 -1
  65. package/dist/statements.js +22 -17
  66. package/dist/statements.js.map +1 -1
  67. package/package.json +2 -2
  68. package/src/closed.ts +243 -68
  69. package/src/db.ts +23 -5
  70. package/src/face.ts +162 -84
  71. package/src/fields.ts +57 -136
  72. package/src/index.ts +42 -16
  73. package/src/law.ts +519 -0
  74. package/src/lower.ts +36 -23
  75. package/src/native.ts +6 -2
  76. package/src/query/atom.ts +105 -58
  77. package/src/query/lower.ts +271 -139
  78. package/src/query/predicate.ts +43 -33
  79. package/src/query/scope.ts +125 -49
  80. package/src/query/select.ts +5 -5
  81. package/src/relation.ts +15 -9
  82. package/src/schema.ts +48 -7
  83. package/src/spec.ts +7 -6
  84. package/src/statements.ts +83 -43
package/src/fields.ts CHANGED
@@ -1,21 +1,18 @@
1
1
  /**
2
2
  * Field descriptors — the value half of the `schema!` field grammar
3
- * (`docs/architecture/70-api.md`), STRUCTURAL edition: `bool`, `u64`, `i64`,
3
+ * (`docs/architecture/70-api.md`), MINIMAL edition: `bool`, `u64`, `i64`,
4
4
  * `str`, `bytes(n)`, `interval(u64|i64[, width])`, each a plain frozen value
5
- * that IS its own descriptor type — `{ kind, domain, fresh?, width?,
6
- * element? }` — honest at runtime and in the type alike. A field's VALUE
7
- * type is its bare structural type (`u64` → `bigint`, `str` → `string`,
8
- * `bytes(n)` → `Uint8Array`, intervals → `{ start, end }`): no brands, no
9
- * phantoms, no minting casts. The domain is a string LABEL in the
10
- * descriptor type, attached by `.as("HolderId")` (the mirror of Rust's
11
- * `as HolderId`); same-string domains link fields, and the relational
12
- * builders (statements, queries) compare the labels structurally the
13
- * domain wall lives in the builders and the engine, never on the value.
14
- * The macro's refusals are reproduced representationally: `.as` exists only
15
- * where Rust's `as` is legal (u64, i64, bytes, intervals — never bool/str),
16
- * `.fresh` exists only on u64 (bare or after `.as`), and no field-level
17
- * constraint vocabulary of any kind exists — `unique`/`fk` are unwritable,
18
- * not rejected.
5
+ * that IS its own descriptor type — `{ kind, width?, element?, fresh? }` —
6
+ * honest at runtime and in the type alike. A field's VALUE type is its bare
7
+ * structural type (`u64` → `bigint`, `str` → `string`, `bytes(n)` →
8
+ * `Uint8Array`, intervals → `{ start, end }`): no brands, no phantoms, no
9
+ * minting casts. A descriptor carries STRUCTURE ONLY domains are never
10
+ * declared anywhere (the owner ruling: THE LAWS TYPE THE COLUMNS): a
11
+ * field's domain is COMPUTED by `schema()` from the statement list, where
12
+ * the dependencies themselves induce the equivalence classes. The macro's
13
+ * refusals are reproduced representationally: `.fresh` exists only on u64,
14
+ * and no field-level constraint vocabulary of any kind exists
15
+ * `unique`/`fk` are unwritable, not rejected.
19
16
  */
20
17
 
21
18
  import * as errors from "@superbuilders/errors"
@@ -23,8 +20,8 @@ import type { LiteralSpec } from "#spec.ts"
23
20
 
24
21
  /**
25
22
  * A half-open interval `[start, end)` as a plain value object — the ONE
26
- * interval value type, whatever the field's element domain or width label.
27
- * The ray is representable (`end` = the element domain's MAX_END); widths
23
+ * interval value type, whatever the field's element type or width label.
24
+ * The ray is representable (`end` = the element type's MAX_END); widths
28
25
  * and signedness are NOT modeled on the value — they are descriptor-type
29
26
  * labels the engine judges at the typed write boundary. Interval fields
30
27
  * derive no order (the Rust refusal, `docs/architecture/10-data-model.md`),
@@ -52,68 +49,52 @@ function span(start: bigint, end: bigint): IntervalValue {
52
49
  /**
53
50
  * A closed relation's roster as seen from a referencing field: the handle
54
51
  * namespace `where()` selections and ground axioms resolve bare handle ids
55
- * through (the macro's own rule: a handle is legal exactly on a field whose
56
- * domain is a closed relation's handle domain).
52
+ * through (the macro's own rule: a handle is legal exactly on a field that
53
+ * references a closed relation).
57
54
  */
58
55
  interface ClosedRoster {
59
56
  readonly name: string
60
57
  readonly handles: readonly string[]
61
58
  }
62
59
 
63
- /** The `bool` field descriptor: value type `boolean`. No `.as`, no `.fresh` (macro parity). */
60
+ /** The `bool` field descriptor: value type `boolean`. No `.fresh` (macro parity). */
64
61
  interface BoolField {
65
62
  readonly kind: "bool"
66
- readonly domain: undefined
67
63
  }
68
64
 
69
- /** The `str` field descriptor: value type `string`. No `.as`, no `.fresh` (macro parity). */
65
+ /** The `str` field descriptor: value type `string`. No `.fresh` (macro parity). */
70
66
  interface StrField {
71
67
  readonly kind: "str"
72
- readonly domain: undefined
73
68
  }
74
69
 
75
70
  /**
76
- * A `fresh`-marked u64 field descriptor — `id: u64.as("AccountId").fresh`
77
- * (Rust: `id: u64 as AccountId, fresh`). The mark is a structural label
78
- * (`fresh: true`) in the descriptor type AND on the runtime value; it
79
- * implies the key `R(field) -> R`, which the ENGINE materializes
80
- * (`SchemaDescriptor::materialized_statements`). Terminal: no builder
81
- * property survives the mark.
71
+ * A `fresh`-marked u64 field descriptor — `id: u64.fresh`. The mark is a
72
+ * structural label (`fresh: true`) in the descriptor type AND on the
73
+ * runtime value; it implies the key `R(field) -> R`, which the ENGINE
74
+ * materializes (`SchemaDescriptor::materialized_statements`), and it makes
75
+ * the field a GENERATOR — `schema()` names its equivalence class by the
76
+ * declaration coordinate (`"Account.id"`). Terminal: no builder property
77
+ * survives the mark.
82
78
  */
83
- interface FreshU64Field<Domain extends string | undefined = undefined> {
79
+ interface FreshU64Field {
84
80
  readonly kind: "u64"
85
- readonly domain: Domain
86
81
  readonly fresh: true
87
82
  }
88
83
 
89
84
  /**
90
- * A domain-labeled u64 field descriptor `const HolderId =
91
- * u64.as("HolderId")` (Rust: `u64 as HolderId`). The label lives in the
92
- * descriptor type only; the value type stays bare `bigint`. `.fresh` marks
93
- * the field as engine-minted — the property doubles as the mark itself:
94
- * on an unmarked descriptor it holds the marked descriptor, on a marked
95
- * one it IS the literal `true` (one structural property, read either way).
85
+ * The `u64` field descriptor. `.fresh` marks the field as engine-minted —
86
+ * the property doubles as the mark itself: on an unmarked descriptor it
87
+ * holds the marked descriptor, on a marked one it IS the literal `true`
88
+ * (one structural property, read either way).
96
89
  */
97
- interface U64Field<Domain extends string | undefined = undefined> {
90
+ interface U64Field {
98
91
  readonly kind: "u64"
99
- readonly domain: Domain
100
- readonly fresh: FreshU64Field<Domain>
92
+ readonly fresh: FreshU64Field
101
93
  }
102
94
 
103
- /** The `u64` constructor value: a bare u64 descriptor plus `.as` (one application — `.as` is absent on the result). */
104
- interface U64Ctor extends U64Field<undefined> {
105
- as<const Domain extends string>(domain: Domain): U64Field<Domain>
106
- }
107
-
108
- /** A domain-labeled i64 field descriptor. Terminal: `.fresh` is legal on u64 only. */
109
- interface I64Field<Domain extends string | undefined = undefined> {
95
+ /** The `i64` field descriptor. Terminal: `.fresh` is legal on u64 only. */
96
+ interface I64Field {
110
97
  readonly kind: "i64"
111
- readonly domain: Domain
112
- }
113
-
114
- /** The `i64` constructor value: a bare i64 descriptor plus `.as`. */
115
- interface I64Ctor extends I64Field<undefined> {
116
- as<const Domain extends string>(domain: Domain): I64Field<Domain>
117
98
  }
118
99
 
119
100
  /**
@@ -122,15 +103,9 @@ interface I64Ctor extends I64Field<undefined> {
122
103
  * value type is bare `Uint8Array`. No order is derived — no comparators
123
104
  * exist on the value type (the engine refuses order on bytes).
124
105
  */
125
- interface BytesField<Width extends number = number, Domain extends string | undefined = undefined> {
106
+ interface BytesField<Width extends number = number> {
126
107
  readonly kind: "bytes"
127
108
  readonly width: Width
128
- readonly domain: Domain
129
- }
130
-
131
- /** A `bytes(n)` constructor value: a bare bytes descriptor plus `.as`. */
132
- interface BytesCtor<Width extends number = number> extends BytesField<Width, undefined> {
133
- as<const Domain extends string>(domain: Domain): BytesField<Width, Domain>
134
109
  }
135
110
 
136
111
  /**
@@ -141,52 +116,32 @@ interface BytesCtor<Width extends number = number> extends BytesField<Width, und
141
116
  */
142
117
  interface IntervalField<
143
118
  Element extends "u64" | "i64" = "u64" | "i64",
144
- Width extends bigint | undefined = bigint | undefined,
145
- Domain extends string | undefined = undefined
119
+ Width extends bigint | undefined = bigint | undefined
146
120
  > {
147
121
  readonly kind: "interval"
148
122
  readonly element: Element
149
123
  readonly width: Width
150
- readonly domain: Domain
151
- }
152
-
153
- /** An `interval(e[, w])` constructor value: a bare interval descriptor plus `.as`. */
154
- interface IntervalCtor<
155
- Element extends "u64" | "i64" = "u64" | "i64",
156
- Width extends bigint | undefined = bigint | undefined
157
- > extends IntervalField<Element, Width, undefined> {
158
- as<const Domain extends string>(domain: Domain): IntervalField<Element, Width, Domain>
159
124
  }
160
125
 
161
126
  /**
162
127
  * A closed relation's reference field descriptor (`Kind.id`) — a u64
163
- * descriptor whose domain is the closed relation's handle domain
164
- * (`"KindId"`, mirroring Rust's `closed relation Kind as KindId`) and
165
- * whose roster resolves bare handle ids in selections and ground axioms.
166
- * Terminal: no `.as`, no `.fresh` — its domain IS the closed relation's.
128
+ * descriptor carrying the closed linkage: the roster resolves bare handle
129
+ * ids in selections and ground axioms, and `schema()` names the id's
130
+ * generator class `"Kind.id"`. Terminal: no `.fresh` a vocabulary's rows
131
+ * are ground axioms, never minted.
167
132
  */
168
- interface ClosedIdField<Domain extends string = string> {
133
+ interface ClosedIdField {
169
134
  readonly kind: "u64"
170
- readonly domain: Domain
171
135
  readonly closed: ClosedRoster
172
136
  }
173
137
 
174
- /** Any field descriptor, whatever its kind, domain label, or marks. */
175
- type AnyField =
176
- | BoolField
177
- | StrField
178
- | U64Field<string | undefined>
179
- | FreshU64Field<string | undefined>
180
- | I64Field<string | undefined>
181
- | BytesField<number, string | undefined>
182
- | IntervalField<"u64" | "i64", bigint | undefined, string | undefined>
183
- | ClosedIdField
138
+ /** Any field descriptor, whatever its kind or marks. */
139
+ type AnyField = BoolField | StrField | U64Field | FreshU64Field | I64Field | BytesField | IntervalField | ClosedIdField
184
140
 
185
141
  /**
186
142
  * The bare structural VALUE type of a field descriptor — the one total
187
143
  * definition every fact, result row, and query term reads: `bool` →
188
- * `boolean`, `str` → `string`, `u64`/`i64` → `bigint` (domain labels
189
- * included — the label never touches the value), `bytes<N>` →
144
+ * `boolean`, `str` → `string`, `u64`/`i64` → `bigint`, `bytes<N>`
190
145
  * `Uint8Array`, intervals → {@link IntervalValue}.
191
146
  */
192
147
  type Infer<F extends AnyField> = F extends { readonly kind: "bool" }
@@ -271,35 +226,20 @@ function assertDeclarationOrderKey(where: string, name: string): void {
271
226
  }
272
227
  }
273
228
 
274
- /** Builds one fresh-marked u64 descriptor (the `.fresh` property of an unmarked one). */
275
- function freshU64<Domain extends string | undefined>(domain: Domain): FreshU64Field<Domain> {
276
- return Object.freeze({ kind: "u64", domain, fresh: true })
277
- }
229
+ /** The one fresh-marked u64 descriptor (the `.fresh` property of the unmarked one). */
230
+ const freshU64: FreshU64Field = Object.freeze({ kind: "u64", fresh: true })
278
231
 
279
232
  /** The one `u64` constructor value. */
280
- const u64: U64Ctor = Object.freeze({
281
- kind: "u64",
282
- domain: undefined,
283
- fresh: freshU64(undefined),
284
- as<const Domain extends string>(domain: Domain): U64Field<Domain> {
285
- return Object.freeze({ kind: "u64", domain, fresh: freshU64(domain) })
286
- }
287
- })
233
+ const u64: U64Field = Object.freeze({ kind: "u64", fresh: freshU64 })
288
234
 
289
235
  /** The one `i64` constructor value. */
290
- const i64: I64Ctor = Object.freeze({
291
- kind: "i64",
292
- domain: undefined,
293
- as<const Domain extends string>(domain: Domain): I64Field<Domain> {
294
- return Object.freeze({ kind: "i64", domain })
295
- }
296
- })
236
+ const i64: I64Field = Object.freeze({ kind: "i64" })
297
237
 
298
238
  /** The one `bool` constructor value. */
299
- const bool: BoolField = Object.freeze({ kind: "bool", domain: undefined })
239
+ const bool: BoolField = Object.freeze({ kind: "bool" })
300
240
 
301
241
  /** The one `str` constructor value. */
302
- const str: StrField = Object.freeze({ kind: "str", domain: undefined })
242
+ const str: StrField = Object.freeze({ kind: "str" })
303
243
 
304
244
  /**
305
245
  * The `bytes<N>` field constructor. The width is mandatory and a
@@ -308,20 +248,13 @@ const str: StrField = Object.freeze({ kind: "str", domain: undefined })
308
248
  * § the `schema!` grammar: N ∈ 1..=64 — bare `bytes` does not parse), the
309
249
  * macro-expansion boundary's analog being construction.
310
250
  */
311
- function bytes<const Width extends number>(width: Width): BytesCtor<Width> {
251
+ function bytes<const Width extends number>(width: Width): BytesField<Width> {
312
252
  if (!Number.isInteger(width) || width < 1 || width > 64) {
313
253
  throw errors.new(
314
254
  `bytes width must be an integer in 1..=64 (got ${width}) — docs/architecture/70-api.md pins the range at declaration`
315
255
  )
316
256
  }
317
- return Object.freeze({
318
- kind: "bytes",
319
- width,
320
- domain: undefined,
321
- as<const Domain extends string>(domain: Domain): BytesField<Width, Domain> {
322
- return Object.freeze({ kind: "bytes", width, domain })
323
- }
324
- })
257
+ return Object.freeze({ kind: "bytes", width })
325
258
  }
326
259
 
327
260
  /**
@@ -333,12 +266,12 @@ function bytes<const Width extends number>(width: Width): BytesCtor<Width> {
333
266
  * (`docs/architecture/70-api.md`: w ≥ 1; `interval<u64, 0>` is an
334
267
  * expansion error naming the field).
335
268
  */
336
- function interval<Element extends U64Ctor | I64Ctor>(element: Element): IntervalCtor<Element["kind"], undefined>
337
- function interval<Element extends U64Ctor | I64Ctor, const Width extends bigint>(
269
+ function interval<Element extends U64Field | I64Field>(element: Element): IntervalField<Element["kind"], undefined>
270
+ function interval<Element extends U64Field | I64Field, const Width extends bigint>(
338
271
  element: Element,
339
272
  width: Width
340
- ): IntervalCtor<Element["kind"], Width>
341
- function interval(element: U64Ctor | I64Ctor, width?: bigint): IntervalCtor<"u64" | "i64", bigint | undefined> {
273
+ ): IntervalField<Element["kind"], Width>
274
+ function interval(element: U64Field | I64Field, width?: bigint): IntervalField<"u64" | "i64", bigint | undefined> {
342
275
  const elementKind = element.kind
343
276
  if (elementKind !== "u64" && elementKind !== "i64") {
344
277
  throw errors.new(`interval element must be the u64 or i64 field constructor (got ${elementKind})`)
@@ -348,15 +281,7 @@ function interval(element: U64Ctor | I64Ctor, width?: bigint): IntervalCtor<"u64
348
281
  `interval width must be >= 1 (got ${width}) — docs/architecture/70-api.md pins w >= 1 at declaration`
349
282
  )
350
283
  }
351
- return Object.freeze({
352
- kind: "interval",
353
- element: elementKind,
354
- width,
355
- domain: undefined,
356
- as<const Domain extends string>(domain: Domain): IntervalField<"u64" | "i64", bigint | undefined, Domain> {
357
- return Object.freeze({ kind: "interval", element: elementKind, width, domain })
358
- }
359
- })
284
+ return Object.freeze({ kind: "interval", element: elementKind, width })
360
285
  }
361
286
 
362
287
  /**
@@ -411,19 +336,15 @@ function literalOf(field: AnyField, value: unknown): LiteralSpec {
411
336
  export type {
412
337
  AnyField,
413
338
  BoolField,
414
- BytesCtor,
415
339
  BytesField,
416
340
  ClosedIdField,
417
341
  ClosedRoster,
418
342
  FreshU64Field,
419
- I64Ctor,
420
343
  I64Field,
421
344
  Infer,
422
- IntervalCtor,
423
345
  IntervalField,
424
346
  IntervalValue,
425
347
  StrField,
426
- U64Ctor,
427
348
  U64Field
428
349
  }
429
350
  export { assertDeclarationOrderKey, bool, bytes, i64, interval, literalOf, span, str, u64 }
package/src/index.ts CHANGED
@@ -1,16 +1,20 @@
1
1
  /**
2
2
  * @bjornpagen/bumbledb — the type-theoretic TypeScript SDK for the
3
3
  * bumbledb embedded relational engine. Public surface: the structural type
4
- * kernel (fields with schema-level domain labels, `relation()`,
5
- * `closed()`), the statement
6
- * algebra with `schema()` and `SchemaSpec` lowering (PRD-06), the `Db`
4
+ * kernel (fields as pure structure, `relation()`, `closed()` — domains are
5
+ * never declared: THE LAWS TYPE THE COLUMNS, `schema()` computing every
6
+ * field's equivalence class FROM the statement list at both tiers), the
7
+ * statement algebra with `schema()` and `SchemaSpec` lowering (PRD-06), the `Db`
7
8
  * runtime (path-cached stores, transactions, typed violations, scoped
8
9
  * snapshot reads, the witnessed write loop with `abandon` — PRD-07, zero
9
10
  * closables), the query surface (Datalog as values, kysely-shaped:
10
11
  * `query(S).rule(r => r.match(...).where(...).select(...))` with
11
12
  * string-named domain-typed vars, params typed by use, negation,
12
13
  * conditions, aggregates, and stratified recursion via `program()`/`rec` —
13
- * `db.prepare` as a plain value), and the exhume surface
14
+ * `db.prepare` as a plain value; the comparison/connective builders are
15
+ * also free exports, and the free names `eq`/`not`/`and`/`or` collide with
16
+ * common host identifiers — import aliasing is the answer; the SDK does
17
+ * not rename for collision-avoidance), and the exhume surface
14
18
  * (`Db.exhume` — the one schema-independent read path: the store's
15
19
  * self-described shapes and raw facts by name, typed at bare structural
16
20
  * values, deliberately schema-free). The raw native bridge is not exported.
@@ -18,6 +22,7 @@
18
22
 
19
23
  export type {
20
24
  AnyClosed,
25
+ AnySelectedClosed,
21
26
  AxiomRow,
22
27
  Axioms,
23
28
  Closed,
@@ -25,7 +30,9 @@ export type {
25
30
  ClosedCore,
26
31
  ClosedData,
27
32
  ClosedRow,
28
- PayloadField
33
+ ClosedSelectionInput,
34
+ PayloadField,
35
+ SelectedClosed
29
36
  } from "#closed.ts"
30
37
  export { closed } from "#closed.ts"
31
38
  export type { Count } from "#count.ts"
@@ -43,7 +50,7 @@ export type {
43
50
  WitnessedWriteResult,
44
51
  WriteResult
45
52
  } from "#db.ts"
46
- export { abandon, Db } from "#db.ts"
53
+ export { abandon, Db, ErrNewtypeMismatch } from "#db.ts"
47
54
  export type {
48
55
  Exhumed,
49
56
  ExhumedAxiom,
@@ -63,35 +70,33 @@ export type {
63
70
  Face,
64
71
  FaceArityMismatch,
65
72
  FaceData,
66
- FaceDomainMismatch,
67
- FaceDomains,
68
73
  FaceFields,
69
74
  FaceOwner,
75
+ FaceShapeMismatch,
76
+ FaceShapes,
70
77
  FaceSource,
71
78
  OneOf,
79
+ OwnerOf,
72
80
  SameArity,
73
- SameDomains
81
+ SameShapes
74
82
  } from "#face.ts"
75
83
  export { on, oneOf } from "#face.ts"
76
84
  export type {
77
85
  AnyField,
78
86
  BoolField,
79
- BytesCtor,
80
87
  BytesField,
81
88
  ClosedIdField,
82
89
  ClosedRoster,
83
90
  FreshU64Field,
84
- I64Ctor,
85
91
  I64Field,
86
92
  Infer,
87
- IntervalCtor,
88
93
  IntervalField,
89
94
  IntervalValue,
90
95
  StrField,
91
- U64Ctor,
92
96
  U64Field
93
97
  } from "#fields.ts"
94
98
  export { bool, bytes, i64, interval, span, str, u64 } from "#fields.ts"
99
+ export type { ClassesOf, ClassWall, LawfulStatements, RelationClasses, SchemaClasses } from "#law.ts"
95
100
  export { lower, lowerClosed, lowerRelation } from "#lower.ts"
96
101
  export type { KeyFact, Minted } from "#marshal.ts"
97
102
  export type {
@@ -106,6 +111,8 @@ export type {
106
111
  AnyCond,
107
112
  BindingInput,
108
113
  Cmp,
114
+ MatchFields,
115
+ MatchOwner,
109
116
  MatchShape,
110
117
  NotAtom,
111
118
  RecData,
@@ -113,7 +120,7 @@ export type {
113
120
  SelectColumn,
114
121
  Tree
115
122
  } from "#query/atom.ts"
116
- export { ALLEN } from "#query/atom.ts"
123
+ export { ALLEN, allen, and, covers, eq, ge, gt, le, lt, ne, not, or, pointIn } from "#query/atom.ts"
117
124
  export type {
118
125
  AnyQuery,
119
126
  AnyRuleValue,
@@ -136,7 +143,17 @@ export type {
136
143
  export { lowerQuery, query } from "#query/lower.ts"
137
144
  export type { ProgramScope, Rec } from "#query/predicate.ts"
138
145
  export { program } from "#query/predicate.ts"
139
- export type { Duration, MaskParam, Param, ParamEntry, ParamsRecord, SetParam, Var } from "#query/scope.ts"
146
+ export type {
147
+ ClassedField,
148
+ Duration,
149
+ MaskParam,
150
+ Param,
151
+ ParamEntry,
152
+ ParamsRecord,
153
+ SetParam,
154
+ Var,
155
+ VarsRecord
156
+ } from "#query/scope.ts"
140
157
  export type { Agg, SelectEntry } from "#query/select.ts"
141
158
  export type {
142
159
  AnyRelation,
@@ -172,5 +189,14 @@ export type {
172
189
  WindowSpec
173
190
  } from "#spec.ts"
174
191
  export { renderLiteral, renderLiteralSet, renderWindow } from "#spec.ts"
175
- export type { KeyData, KeyStatement, Statement, StatementData } from "#statements.ts"
192
+ export type {
193
+ ContainedStatement,
194
+ ContainmentData,
195
+ KeyData,
196
+ KeyStatement,
197
+ Statement,
198
+ StatementData,
199
+ WindowData,
200
+ WindowStatement
201
+ } from "#statements.ts"
176
202
  export { contained, key, mirrors, renderStatement, window } from "#statements.ts"