@bjornpagen/bumbledb 0.5.0 → 0.7.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 (100) hide show
  1. package/COOKBOOK.md +140 -136
  2. package/README.md +24 -11
  3. package/dist/closed.d.ts +7 -5
  4. package/dist/closed.d.ts.map +1 -1
  5. package/dist/closed.js +4 -1
  6. package/dist/closed.js.map +1 -1
  7. package/dist/count.js +1 -1
  8. package/dist/count.js.map +1 -1
  9. package/dist/db.d.ts +110 -73
  10. package/dist/db.d.ts.map +1 -1
  11. package/dist/db.js +172 -116
  12. package/dist/db.js.map +1 -1
  13. package/dist/exhume.d.ts +22 -10
  14. package/dist/exhume.d.ts.map +1 -1
  15. package/dist/exhume.js +42 -9
  16. package/dist/exhume.js.map +1 -1
  17. package/dist/face.d.ts +10 -6
  18. package/dist/face.d.ts.map +1 -1
  19. package/dist/face.js.map +1 -1
  20. package/dist/fields.d.ts +38 -16
  21. package/dist/fields.d.ts.map +1 -1
  22. package/dist/fields.js +33 -8
  23. package/dist/fields.js.map +1 -1
  24. package/dist/index.d.ts +9 -6
  25. package/dist/index.d.ts.map +1 -1
  26. package/dist/index.js +5 -2
  27. package/dist/index.js.map +1 -1
  28. package/dist/lower.d.ts +9 -9
  29. package/dist/lower.d.ts.map +1 -1
  30. package/dist/lower.js +17 -12
  31. package/dist/lower.js.map +1 -1
  32. package/dist/marshal.d.ts +17 -7
  33. package/dist/marshal.d.ts.map +1 -1
  34. package/dist/marshal.js +32 -10
  35. package/dist/marshal.js.map +1 -1
  36. package/dist/native.d.ts +60 -9
  37. package/dist/native.d.ts.map +1 -1
  38. package/dist/native.js.map +1 -1
  39. package/dist/query/atom.d.ts +199 -203
  40. package/dist/query/atom.d.ts.map +1 -1
  41. package/dist/query/atom.js +39 -48
  42. package/dist/query/atom.js.map +1 -1
  43. package/dist/query/find.d.ts +116 -0
  44. package/dist/query/find.d.ts.map +1 -0
  45. package/dist/query/{select.js → find.js} +22 -22
  46. package/dist/query/find.js.map +1 -0
  47. package/dist/query/lower.d.ts +131 -158
  48. package/dist/query/lower.d.ts.map +1 -1
  49. package/dist/query/lower.js +505 -494
  50. package/dist/query/lower.js.map +1 -1
  51. package/dist/query/predicate.d.ts +22 -14
  52. package/dist/query/predicate.d.ts.map +1 -1
  53. package/dist/query/predicate.js +35 -42
  54. package/dist/query/predicate.js.map +1 -1
  55. package/dist/query/run.d.ts +8 -8
  56. package/dist/query/run.d.ts.map +1 -1
  57. package/dist/query/run.js +16 -21
  58. package/dist/query/run.js.map +1 -1
  59. package/dist/query/scope.d.ts +139 -74
  60. package/dist/query/scope.d.ts.map +1 -1
  61. package/dist/query/scope.js +80 -33
  62. package/dist/query/scope.js.map +1 -1
  63. package/dist/relation.d.ts.map +1 -1
  64. package/dist/relation.js +3 -1
  65. package/dist/relation.js.map +1 -1
  66. package/dist/schema.d.ts.map +1 -1
  67. package/dist/schema.js +12 -2
  68. package/dist/schema.js.map +1 -1
  69. package/dist/spec.d.ts +20 -10
  70. package/dist/spec.d.ts.map +1 -1
  71. package/dist/spec.js.map +1 -1
  72. package/dist/statements.d.ts +22 -2
  73. package/dist/statements.d.ts.map +1 -1
  74. package/dist/statements.js +26 -5
  75. package/dist/statements.js.map +1 -1
  76. package/package.json +3 -3
  77. package/src/closed.ts +13 -7
  78. package/src/count.ts +1 -1
  79. package/src/db.ts +293 -177
  80. package/src/exhume.ts +48 -11
  81. package/src/face.ts +13 -6
  82. package/src/fields.ts +51 -15
  83. package/src/index.ts +12 -8
  84. package/src/lower.ts +17 -12
  85. package/src/marshal.ts +38 -13
  86. package/src/native.ts +59 -8
  87. package/src/query/atom.ts +297 -275
  88. package/src/query/find.ts +212 -0
  89. package/src/query/lower.ts +692 -724
  90. package/src/query/predicate.ts +37 -45
  91. package/src/query/run.ts +17 -22
  92. package/src/query/scope.ts +184 -90
  93. package/src/relation.ts +3 -1
  94. package/src/schema.ts +14 -2
  95. package/src/spec.ts +21 -9
  96. package/src/statements.ts +30 -6
  97. package/dist/query/select.d.ts +0 -128
  98. package/dist/query/select.d.ts.map +0 -1
  99. package/dist/query/select.js.map +0 -1
  100. package/src/query/select.ts +0 -215
@@ -1,68 +1,45 @@
1
1
  /**
2
- * Atoms and conditions, STRUCTURAL edition — the body vocabulary of a
3
- * rule, mirroring the engine IR variant for variant
2
+ * Atoms and conditions, REFERENCE-IDENTITY edition — the body vocabulary of
3
+ * a rule, mirroring the engine IR variant for variant
4
4
  * (`bumbledb/crates/bumbledb/src/ir.rs`, the bijection target;
5
5
  * `docs/architecture/20-query-ir.md` normative). A `match` binding record
6
- * binds fields to vars, params, ∈-set params, or bare structural literals
7
- * — a closed-reference field's literal is its handle NAME, and a plain
8
- * ARRAY of names there is membership, folded into the program (closed-only
9
- * by owner ruling; see {@link BindingInput})
6
+ * binds fields to VARIABLES (minted by {@link v}), params, ∈-set params, or
7
+ * bare structural literals — a closed-reference field's literal is its
8
+ * handle NAME, and a plain ARRAY of names there is membership
10
9
  * (unmentioned fields ARE the wildcard — no wildcard value exists);
11
10
  * `not(Rel, {...})` is negation-as-position (anti-join); `eq`/`ne` and the
12
11
  * order roster, `pointIn` (the one spelling of `ir::CmpOp::PointIn`,
13
12
  * always lowered interval-left), `allen` (the 13-bit mask pair
14
13
  * comparison), and `and`/`or` (the input condition-tree grammar) complete
15
14
  * the roster. Nothing beyond the IR exists here — and the walls the engine
16
- * enforces at prepare are TYPES first: a var joins only domain-equal
17
- * fields (`JoinOk`, checked against the rule environment AND against the
18
- * binding record's own same-named siblings two first occurrences of one
19
- * name inside one record are a join too), an
20
- * interval-typed var under a non-`pointIn` comparison is unwritable, and a
21
- * negated atom's variables must be positively bound (env membership IS the
22
- * safety rule). Every condition value carries its operands raw the
23
- * runtime representation is the type-inference carrier, no phantoms.
15
+ * enforces at prepare are TYPES first: a variable joins only class-equal
16
+ * fields, judged at every binding position against the var's MINT slot
17
+ * ({@link MintSlotOf}); because {@link JoinOk} is an equality, that ALONE
18
+ * makes every cross-binding join transitively class-equal (the env/sibling
19
+ * checks the name-keyed edition needed are gone). An interval-typed var
20
+ * under a non-`pointIn` comparison is unwritable. BOUNDNESS (a negated
21
+ * atom's variables must be positively bound) is the one check types cannot
22
+ * carry object identity is invisible to TS so it is a construction-time
23
+ * wall only.
24
24
  *
25
25
  * This module also owns the plain runtime DATA a built rule is made of
26
26
  * (`RuleData`/`RecData` and friends): frozen values the lowering walks —
27
- * pure data, so lowering stays a pure, stable function of the query value.
27
+ * pure data (variable references included), so lowering stays a pure,
28
+ * stable function of the query value.
28
29
  */
29
- import type { AnyClosed } from "#closed.ts";
30
30
  import type { AnyField, ClosedIdField, ClosedRoster, Infer, IntervalValue } from "#fields.ts";
31
31
  import type { ClassLookup, ClassRecordOf, SchemaClasses } from "#law.ts";
32
- import type { ClassedField, Duration, EnvShape, JoinOk, MaskParam, Param, ParamValueAt, SetParam, ShapeOf, Var } from "#query/scope.ts";
33
- import type { AnyRelation, FieldsShape, RelationFields } from "#relation.ts";
32
+ import type { AnyVar, ClassedField, Duration, JoinOk, MaskParam, MatchFields, MatchOwner, MintSlotOf, Param, ParamsRecord, ParamValueAt, SetParam, ShapeOf } from "#query/scope.ts";
33
+ import { inferred } from "#query/scope.ts";
34
+ import type { FieldsShape } from "#relation.ts";
34
35
  /**
35
- * What a query atom matches over: an ordinary relation or a CLOSED
36
- * vocabulary (ψ query atoms the engine folds a resolvable closed atom
37
- * into a plan-constant member set at prepare, or joins the L1-resident
38
- * virtual image when the shape does not fold; the SDK never pre-folds and
39
- * never knows which — transparency is the contract).
40
- */
41
- type MatchOwner = AnyRelation | AnyClosed;
42
- /**
43
- * The matchable field block of an atom owner: a relation's declared
44
- * fields; a closed relation's SEALED shape — the synthetic `id` (the
45
- * value's OWN roster-carrying descriptor, at its precise type: the handle
46
- * union rides into ψ id bindings and joins exactly as it does on a
47
- * referencing column) first, then the declared payload columns read
48
- * through the typed `columns` carrier (the one source of payload typing —
49
- * no parallel column table exists). The runtime twin is `sealedFieldsOf` in
50
- * `#query/lower.ts`; the id-first ordinal shift the two tiers share is
51
- * pinned by the lowering golden.
52
- */
53
- type MatchFields<R extends MatchOwner> = R extends AnyClosed ? {
54
- readonly id: R["id"];
55
- } & R["columns"] : R extends AnyRelation ? RelationFields<R> : never;
56
- /**
57
- * One atom-binding position as runtime data. `literalSet` is a membership
58
- * ARRAY at a closed-reference field, folded into the program: `name` is
59
- * the content-addressed registry key its dense `ParamId` is minted under
60
- * (the lowering rides the existing param-set term; the SDK itself supplies
61
- * the translated member set at every execute — never the host).
36
+ * One atom-binding position as runtime data. A variable rides BY REFERENCE
37
+ * (`ref`) object identity is the join. `literalSet` is a membership
38
+ * ARRAY at a closed-reference field, folded into the program.
62
39
  */
63
40
  type BindingTermData = {
64
41
  readonly kind: "var";
65
- readonly name: string;
42
+ readonly ref: AnyVar;
66
43
  } | {
67
44
  readonly kind: "param";
68
45
  readonly name: string;
@@ -91,10 +68,10 @@ interface AtomData {
91
68
  }
92
69
  /** One comparison operator name (mirrors `ir::CmpOp`). */
93
70
  type CmpKind = "eq" | "ne" | "lt" | "le" | "gt" | "ge" | "pointIn" | "allen";
94
- /** One comparison side as runtime data. */
71
+ /** One comparison side as runtime data (variables and the measure ride BY REFERENCE). */
95
72
  type CmpTermData = {
96
73
  readonly kind: "var";
97
- readonly name: string;
74
+ readonly ref: AnyVar;
98
75
  } | {
99
76
  readonly kind: "param";
100
77
  readonly name: string;
@@ -103,7 +80,7 @@ type CmpTermData = {
103
80
  readonly name: string;
104
81
  } | {
105
82
  readonly kind: "measure";
106
- readonly name: string;
83
+ readonly ref: AnyVar;
107
84
  } | {
108
85
  readonly kind: "literal";
109
86
  readonly value: unknown;
@@ -132,52 +109,59 @@ interface TreeData {
132
109
  }
133
110
  /** Any condition node as runtime data. */
134
111
  type CondData = CmpData | TreeData;
135
- /** One aggregate's runtime description (select vocabulary, over var NAMES). */
112
+ /** One aggregate's runtime description (find vocabulary, over variable REFERENCES). */
136
113
  type AggData = {
137
114
  readonly op: "count";
138
115
  } | {
139
116
  readonly op: "countDistinct";
140
- readonly over: string;
117
+ readonly over: AnyVar;
141
118
  } | {
142
119
  readonly op: "fold";
143
120
  readonly fold: "sum" | "min" | "max";
144
- readonly over: string | {
145
- readonly duration: string;
121
+ readonly over: AnyVar | {
122
+ readonly duration: AnyVar;
146
123
  };
147
124
  } | {
148
125
  readonly op: "arg";
149
126
  readonly direction: "argMax" | "argMin";
150
- readonly over: string;
151
- readonly key: string;
127
+ readonly over: AnyVar;
128
+ readonly key: AnyVar;
152
129
  } | {
153
130
  readonly op: "pack";
154
- readonly over: string;
131
+ readonly over: AnyVar;
155
132
  };
156
- /** One classified select entry as runtime data. */
157
- type SelectEntryData = {
133
+ /** One classified find entry as runtime data (variables and the measure ride BY REFERENCE). */
134
+ type FindEntryData = {
158
135
  readonly kind: "var";
159
- readonly over: string;
136
+ readonly over: AnyVar;
160
137
  } | {
161
138
  readonly kind: "measure";
162
- readonly over: string;
139
+ readonly over: AnyVar;
163
140
  } | {
164
141
  readonly kind: "aggregate";
165
142
  readonly agg: AggData;
166
143
  };
167
144
  /**
168
- * One answer column: its name (the row object key), its entry, and when
169
- * the column's value is a closed reference (a projected var or an
170
- * Arg-carried payload bound at a closed-referencing field) the roster the
171
- * decode lifts row ids back to handle NAMES through (the read half of the
172
- * marshal bijection; `undefined` on every bare column). The slice is
173
- * SDK-side marshaling data only: the wire `ProgramIr` never carries it.
145
+ * One answer column: its name (the row object key the find record's key,
146
+ * so renames are real and a duplicate column is unrepresentable), its entry,
147
+ * the classed mint SLOT its values flow from (a projected var or an
148
+ * Arg-carried payload; `undefined` for counts/folds/measures/pack, which
149
+ * derive numbers or intervals), and when that slot is a closed reference —
150
+ * the roster the decode lifts row ids back to handle NAMES through
151
+ * (`undefined` on every bare column). The slice is SDK-side marshaling data
152
+ * only: the wire `ProgramIr` never carries it.
174
153
  */
175
- interface SelectColumn {
154
+ interface FindColumn {
176
155
  readonly name: string;
177
- readonly entry: SelectEntryData;
156
+ readonly entry: FindEntryData;
178
157
  readonly closed: ClosedRoster | undefined;
158
+ readonly slot: ClassedField | undefined;
179
159
  }
180
- /** One body item of a rule, in written order. */
160
+ /**
161
+ * One body item of a rule, in written order. The idb join is a NAMED record
162
+ * over the rec's head keys (`key`) bound to local variables (`ref`) — the
163
+ * typed wall a record's unordered keys would otherwise lose.
164
+ */
181
165
  type RuleItem = {
182
166
  readonly kind: "atom";
183
167
  readonly atom: AtomData;
@@ -187,7 +171,12 @@ type RuleItem = {
187
171
  } | {
188
172
  readonly kind: "idb";
189
173
  readonly rec: RecData;
190
- readonly vars: readonly string[];
174
+ readonly bindings: ReadonlyArray<{
175
+ readonly key: string;
176
+ readonly ref: AnyVar;
177
+ }>;
178
+ /** `true` on a negated finished-stratum atom (`r.not(rec, {...})`): probed through its anti-probe, binds nothing. */
179
+ readonly negated: boolean;
191
180
  } | {
192
181
  readonly kind: "cond";
193
182
  readonly cond: CondData;
@@ -196,9 +185,7 @@ type RuleItem = {
196
185
  * One use of a parameter inside a rule, in written order: the census the
197
186
  * query-level registry folds (first use mints the dense `ParamId`, first
198
187
  * FIELD-ANCHORED use types the wire). `members` is present exactly on a
199
- * membership-array use (a literal set folded into the program): the handle
200
- * names the SDK itself translates and supplies at execute — the entry
201
- * never appears in the host's params object.
188
+ * membership-array use.
202
189
  */
203
190
  interface ParamUse {
204
191
  readonly name: string;
@@ -210,9 +197,7 @@ interface ParamUse {
210
197
  /** One complete rule as runtime data. */
211
198
  interface RuleData {
212
199
  readonly items: readonly RuleItem[];
213
- readonly select: readonly SelectColumn[];
214
- /** Variable name → the classed slot its FIRST positive binding carries (the runtime env — descriptor + class). */
215
- readonly varFields: Readonly<Record<string, ClassedField>>;
200
+ readonly finds: readonly FindColumn[];
216
201
  readonly paramUses: readonly ParamUse[];
217
202
  }
218
203
  /**
@@ -226,21 +211,13 @@ interface RecData {
226
211
  }
227
212
  /**
228
213
  * What a binding position of field `F` accepts: a bare structural literal
229
- * of the field's value type, a var/param/∈-set-param term — and, when the
230
- * field is interval-typed, a bare point literal (the IR's membership
231
- * typing rule: an element-typed term at an interval field is point
232
- * membership; an interval-typed term is value equality). A
233
- * CLOSED-reference field additionally takes a plain ARRAY of handle names
234
- * read as membership — `kind: ["Practice", "Review"]` (the drizzle law:
235
- * set membership is an array, never an operator). Arrays are CLOSED-ONLY
236
- * in this packet by owner ruling: ordinary u64/str membership already has
237
- * its spelling through `r.inSet` params; widening literal arrays to every
238
- * literal-capable kind is a separate future taste call — deliberately not
239
- * done here.
214
+ * of the field's value type, a variable/param/∈-set-param term — and, when
215
+ * the field is interval-typed, a bare point literal. A CLOSED-reference
216
+ * field additionally takes a plain ARRAY of handle names read as membership.
240
217
  */
241
218
  type BindingInput<F extends AnyField> = Infer<F> | (F extends ClosedIdField ? readonly Infer<F>[] : never) | (F extends {
242
219
  readonly kind: "interval";
243
- } ? bigint : never) | Var<string> | Param<string> | SetParam<string>;
220
+ } ? bigint : never) | AnyVar | Param<string> | SetParam<string>;
244
221
  /**
245
222
  * The `match`/`not` bindings record: per field, a term or literal of that
246
223
  * field's structural type; unmentioned fields are wildcards (absence IS
@@ -252,44 +229,22 @@ type MatchShape<F extends FieldsShape> = {
252
229
  /**
253
230
  * One field position of a bindings record as a classed slot: the declared
254
231
  * descriptor plus the slot's law-computed class, read off the relation's
255
- * class record (`CR` the schema class map's entry for the atom's
256
- * relation). The one shape every join judgment compares.
232
+ * class record (`CR`). The one shape a binding position's join judgment
233
+ * compares against.
257
234
  */
258
235
  type SlotAt<F extends FieldsShape, CR, K> = {
259
236
  readonly field: F[K & keyof F];
260
237
  readonly class: ClassLookup<CR, K>;
261
238
  };
262
239
  /**
263
- * The var binding's judgment against the incoming rule environment: a name
264
- * already bound must land on a class-equal slot (bare pairs only with bare).
265
- */
266
- type EnvJoinOk<Env extends EnvShape, F extends FieldsShape, CR, K, N extends string> = N extends keyof Env ? JoinOk<Env[N], SlotAt<F, CR, K>> : true;
267
- /**
268
- * The var binding's judgment against its OWN record's siblings: two
269
- * bindings of one var name inside a single bindings record are the same
270
- * join the environment check judges across atoms, so every same-named
271
- * sibling must be class-equal too. Without this arm two FIRST occurrences
272
- * of one name (a record the environment has not seen yet) would meet no
273
- * check at all — the intra-atom join would silently cross classes.
274
- */
275
- type SiblingJoinOk<F extends FieldsShape, CR, B, K extends keyof B, N extends string> = false extends {
276
- [K2 in Exclude<keyof B & keyof F, K>]: B[K2] extends Var<N> ? JoinOk<SlotAt<F, CR, K2>, SlotAt<F, CR, K>> : true;
277
- }[Exclude<keyof B & keyof F, K>] ? false : true;
278
- /**
279
- * The per-property join judgment of a bindings record: a var binding must
280
- * be class-equal to the rule environment's binding of the name AND to
281
- * every same-named sibling of its own record (a cross-class reuse maps
282
- * the property to `never` — the compile error the old value brand carried,
283
- * now law-born off the schema type's class map).
240
+ * The per-property join judgment of a bindings record: a VARIABLE binding
241
+ * must join its own MINT slot to the position slot (a cross-class reuse maps
242
+ * the property to `never`). Because {@link JoinOk} is an equality, judging
243
+ * every position against the mint slot makes all cross-binding joins
244
+ * mutually class-equal by transitivity — no env or sibling arm is needed.
284
245
  */
285
- type BindingOk<Env extends EnvShape, F extends FieldsShape, CR, B, K extends keyof B> = B[K] extends Var<infer N extends string> ? [EnvJoinOk<Env, F, CR, K, N>, SiblingJoinOk<F, CR, B, K, N>] extends [true, true] ? true : false : true;
286
- /** The validated bindings record (intersect with the inferred `B` errors land on the offending property). */
287
- type CheckBindings<Env extends EnvShape, F extends FieldsShape, CR, B> = {
288
- readonly [K in keyof B]: K extends keyof F ? (BindingOk<Env, F, CR, B, K> extends true ? B[K] : never) : never;
289
- };
290
- /** The environment a bindings record contributes: var name → the bound slot (descriptor + class). */
291
- type BindEnv<F extends FieldsShape, CR, B> = {
292
- readonly [K in keyof B & keyof F as B[K] extends Var<infer N extends string> ? N : never]: SlotAt<F, CR, K>;
246
+ type CheckBindings<Classes extends SchemaClasses, F extends FieldsShape, CR, B> = {
247
+ readonly [K in keyof B]: K extends keyof F ? B[K] extends AnyVar ? JoinOk<MintSlotOf<Classes, B[K]>, SlotAt<F, CR, K>> extends true ? B[K] : never : B[K] : never;
293
248
  };
294
249
  /** The params-object fragments a bindings record contributes (one union member per param use). */
295
250
  type BindParams<F extends FieldsShape, B> = {
@@ -301,8 +256,8 @@ type BindParams<F extends FieldsShape, B> = {
301
256
  }[keyof B & keyof F];
302
257
  /**
303
258
  * One comparison VALUE: op plus its operands, raw — the runtime
304
- * representation carries the operand types, so `.where`'s environment
305
- * check and the params inference both read the value itself (no phantom).
259
+ * representation carries the operands (variable references included), so
260
+ * `.where`'s judgment and the params inference both read the value itself.
306
261
  * `mask` is populated exactly for `allen`.
307
262
  */
308
263
  interface Cmp<Op extends CmpKind, L, R, M = undefined> {
@@ -321,45 +276,76 @@ interface Tree<Ch extends readonly AnyTreeChild[]> {
321
276
  /**
322
277
  * One negated-atom VALUE — negation is a position in the rule (anti-join
323
278
  * over sets, no null trick): a binding satisfies it iff NO fact matches.
324
- * Its variables must be positively bound in the rule — environment
325
- * membership at `.where` IS the safety rule, a compile error before it is
326
- * the engine's refusal.
279
+ * Its variables must be positively bound in the rule — a construction-time
280
+ * wall (BOUNDNESS is invisible to the type tier), before the engine's own
281
+ * refusal.
327
282
  */
328
283
  interface NotAtom<R extends MatchOwner, B> {
329
284
  readonly cond: "not";
330
285
  readonly relation: R;
331
286
  readonly bindings: B;
332
287
  }
288
+ /**
289
+ * A recursive predicate as a NEGATION target — the structural half of the
290
+ * rec reference (`data` carries rules, never fields, so an EDB or closed
291
+ * owner can never match it and the `not()` overloads stay disjoint).
292
+ */
293
+ interface RecTarget {
294
+ readonly name: string;
295
+ readonly data: RecData;
296
+ readonly [inferred]?: {
297
+ readonly params: ParamsRecord;
298
+ readonly head: HeadShapeOf;
299
+ };
300
+ }
301
+ /** The head signature a threaded rec target carries (`undefined` before its first rule seals one). */
302
+ type HeadShapeOf = Readonly<Record<string, ClassedField>> | undefined;
303
+ /**
304
+ * One negated FINISHED-STRATUM atom — negation OF a lower stratum is
305
+ * engine-legal (the strata judge refuses only negation *through* a cycle:
306
+ * a finished set is what keeps the operator monotone), and this value is
307
+ * its one spelling: `r.not(reach, { c })` in an output rule rejects every
308
+ * binding the finished stratum extends, through the engine's anti-probe.
309
+ * Binds nothing, only rejects — every variable it names must be positively
310
+ * bound in the rule (the same safety rule as EDB negation).
311
+ */
312
+ interface NotIdbAtom<Target extends RecTarget, B> {
313
+ readonly cond: "notIdb";
314
+ readonly target: Target;
315
+ readonly bindings: B;
316
+ }
333
317
  /** Any comparison value. */
334
318
  type AnyCmp = Cmp<CmpKind, unknown, unknown, unknown>;
335
319
  /** Any condition-tree child (trees hold comparisons and trees — never atoms). */
336
320
  type AnyTreeChild = AnyCmp | Tree<readonly AnyTreeChild[]>;
337
321
  /** Any negated-atom value. */
338
322
  type AnyNotAtom = NotAtom<MatchOwner, unknown>;
339
- /** Any `.where` input: a comparison, a condition tree, or a negated atom. */
340
- type AnyCond = AnyCmp | Tree<readonly AnyTreeChild[]> | AnyNotAtom;
323
+ /** Any negated finished-stratum value. */
324
+ type AnyNotIdbAtom = NotIdbAtom<RecTarget, unknown>;
325
+ /** Any `.where` input: a comparison, a condition tree, or a negated atom (EDB, closed, or finished stratum). */
326
+ type AnyCond = AnyCmp | Tree<readonly AnyTreeChild[]> | AnyNotAtom | AnyNotIdbAtom;
341
327
  /** What `eq`'s right side accepts (`ParamSet` is `Eq`-only — the IR's rule). */
342
- type EqRight = Var<string> | Param<string> | SetParam<string> | bigint | string | boolean | Uint8Array | IntervalValue;
328
+ type EqRight = AnyVar | Param<string> | SetParam<string> | bigint | string | boolean | Uint8Array | IntervalValue;
343
329
  /** What `ne`'s right side accepts. */
344
- type NeRight = Var<string> | Param<string> | bigint | string | boolean | Uint8Array | IntervalValue;
330
+ type NeRight = AnyVar | Param<string> | bigint | string | boolean | Uint8Array | IntervalValue;
345
331
  /** One side of an order comparison: orderable terms only (the IR's comparison rules). */
346
- type OrderSide = Var<string> | Param<string> | Duration<string> | bigint;
332
+ type OrderSide = AnyVar | Param<string> | Duration | bigint;
347
333
  /** The point side of `pointIn`. */
348
- type PointSide = Var<string> | Param<string> | bigint;
334
+ type PointSide = AnyVar | Param<string> | bigint;
349
335
  /** The interval side of `pointIn`/`allen`. */
350
- type IntervalSide = Var<string> | Param<string> | IntervalValue;
336
+ type IntervalSide = AnyVar | Param<string> | IntervalValue;
351
337
  /** Builds one comparison value. */
352
338
  declare function comparison<Op extends CmpKind, L, R, M>(op: Op, lhs: L, rhs: R, mask: M): Cmp<Op, L, R, M>;
353
339
  /**
354
340
  * The equality comparison (`ir::CmpOp::Eq`) — a bound variable against a
355
- * variable (var-to-var unification, domain-equal by the environment
356
- * check), a param (typed by the variable), an ∈-set param (`Eq`-only, the
357
- * IR's set rule), or a bare literal of the variable's own value type.
358
- * Prefer direct placement in `match` where punning applies.
341
+ * variable (var-to-var unification, class-equal by the join judgment), a
342
+ * param (typed by the variable), an ∈-set param (`Eq`-only), or a bare
343
+ * literal of the variable's own value type. Prefer direct placement in
344
+ * `match` where punning applies.
359
345
  */
360
- declare function eq<L extends Var<string>, const R extends EqRight>(left: L, right: R): Cmp<"eq", L, R>;
346
+ declare function eq<L extends AnyVar, const R extends EqRight>(left: L, right: R): Cmp<"eq", L, R>;
361
347
  /** Typed disequality (`ir::CmpOp::Ne`). "Not in set" has no operator — write a negated atom. */
362
- declare function ne<L extends Var<string>, const R extends NeRight>(left: L, right: R): Cmp<"ne", L, R>;
348
+ declare function ne<L extends AnyVar, const R extends NeRight>(left: L, right: R): Cmp<"ne", L, R>;
363
349
  /** Strict less-than (`ir::CmpOp::Lt`) — orderable sides only, never intervals/bytes/strings/bools. */
364
350
  declare function lt<const L extends OrderSide, const R extends OrderSide>(left: L, right: R): Cmp<"lt", L, R>;
365
351
  /** Less-or-equal (`ir::CmpOp::Le`). */
@@ -372,27 +358,20 @@ declare function ge<const L extends OrderSide, const R extends OrderSide>(left:
372
358
  * Point membership as a predicate (`ir::CmpOp::PointIn`) — THE one
373
359
  * spelling: `pointIn(t, w)` holds iff `w.start ≤ t < w.end`. The IR
374
360
  * orders the operands interval-left, point-right; the value stores them
375
- * that way whatever the surface argument order (a literal `span(...)`
376
- * interval operand is legal and tags by the point sibling's element
377
- * domain — the bug-hunt fix, now also a type-level guarantee).
378
- * Interval ⊇ interval is NOT this operator; that predicate is
379
- * `allen(a, ALLEN.covers, b)` — the name `covers` belongs to the Allen
380
- * roster alone (the canonical-utterance law: one meaning, one spelling).
361
+ * that way whatever the surface argument order. Interval interval is NOT
362
+ * this operator; that predicate is `allen(a, ALLEN.covers, b)`.
381
363
  */
382
364
  declare function pointIn<const P extends PointSide, const I extends IntervalSide>(point: P, interval: I): Cmp<"pointIn", I, P>;
383
365
  /**
384
366
  * The 13-bit mask range: bits above the low 13 are unrepresentable in the
385
367
  * engine's `AllenMask` (`bumbledb/crates/bumbledb/src/allen.rs`:
386
- * `AllenMask::new` refuses them) — the check here is the same boundary,
387
- * moved to construction where the message can name the constants.
368
+ * `AllenMask::new` refuses them).
388
369
  */
389
370
  declare const ALLEN_ALL_BITS: number;
390
371
  /**
391
372
  * The Allen coordinate system's named constants — the 13 basics in the
392
- * engine's palindromic bit order (bit i = basic i:
393
- * `bumbledb/crates/bumbledb/src/allen.rs`, a specified representation)
394
- * plus the workload composites, values identical to the engine's. Compose
395
- * with `|`: `ALLEN.before | ALLEN.meets`.
373
+ * engine's palindromic bit order plus the workload composites, values
374
+ * identical to the engine's. Compose with `|`: `ALLEN.before | ALLEN.meets`.
396
375
  */
397
376
  declare const ALLEN: Readonly<{
398
377
  before: number;
@@ -421,9 +400,7 @@ declare const ALLEN: Readonly<{
421
400
  * THE interval-pair comparison (`ir::CmpOp::Allen`): two interval terms of
422
401
  * one element type, satisfied iff the pair's classification is in the
423
402
  * 13-bit mask — a literal built from the `ALLEN` constants, or a mask
424
- * parameter (`r.maskParam`). Vacuous masks (empty/full) are the engine's
425
- * two distinct typed rejections; nothing is pre-judged here beyond the
426
- * representable bit range.
403
+ * parameter (`r.maskParam`).
427
404
  */
428
405
  declare function allen<const A extends IntervalSide, const M extends number | MaskParam<string>, const B extends IntervalSide>(left: A, mask: M, right: B): Cmp<"allen", A, B, M>;
429
406
  /**
@@ -436,70 +413,90 @@ declare function and<const C extends readonly AnyTreeChild[]>(...children: C): T
436
413
  /**
437
414
  * Disjunction node of the input condition grammar (`ConditionTree::Or`) —
438
415
  * the one place the surface admits a nested OR; validation distributes it
439
- * to DNF rules engine-side (OR is data or it is nothing). `Or([])` keeps
440
- * its algebraic reading (false: the rule denotes nothing).
416
+ * to DNF rules engine-side. `Or([])` keeps its algebraic reading (false).
441
417
  */
442
418
  declare function or<const C extends readonly AnyTreeChild[]>(...children: C): Tree<C>;
443
419
  /**
444
- * Negation — anti-join over sets: `not(Rel, { field: r.var("x"), ... })`
420
+ * Negation — anti-join over sets: `not(Rel, { field: someVar, ... })`
445
421
  * rejects every binding some matching fact extends. A negated atom binds
446
422
  * nothing, only rejects: every variable it names must be positively bound
447
- * in the rule, which `.where`'s environment check makes a COMPILE error
448
- * (the engine's safety refusal stands behind it). A CLOSED owner is legal
449
- * here too the engine folds a resolvable negated closed atom to the
450
- * COMPLEMENT of its member set (domain-witness guarded), and the SDK's
451
- * negation rules apply to it unchanged.
423
+ * in the rule, a construction-time wall (the engine's safety refusal stands
424
+ * behind it). A CLOSED owner is legal here too — and so is a FINISHED
425
+ * STRATUM: `not(reach, { c })` in an output rule negates the rec's
426
+ * finished set (a named record over its head keys, variables only — the
427
+ * same wall `idb()` holds), the one spelling of the engine-legal
428
+ * complement query (`(n) | Node(id: n), !reach(n);` on the Rust surface).
452
429
  */
453
430
  declare function not<R extends MatchOwner, const B extends MatchShape<MatchFields<R>>>(relation: R, bindings: B): NotAtom<R, B>;
431
+ declare function not<Target extends RecTarget, const B extends Readonly<Record<string, AnyVar>>>(target: Target, bindings: B): NotIdbAtom<Target, B>;
454
432
  /**
455
- * Whether a var name is bound in the environment at an orderable (u64/i64)
456
- * field. A CLOSED reference is excluded even though its kind is `u64`: a
457
- * vocabulary's declaration-id order is an accident, not semantics
458
- * (`docs/architecture/10-data-model.md` § orderability order on it is
459
- * refused exactly as the enum's ordinal order was), so every
460
- * order-comparison and fold position refuses closed-bound terms — this
461
- * judgment is the one gate they all read, and the construction-time
462
- * validations in `#query/lower.ts` are its runtime twin.
433
+ * Whether a variable's OWN field is orderable (u64/i64). A CLOSED reference
434
+ * is excluded even though its kind is `u64`: a vocabulary's declaration-id
435
+ * order is an accident, not semantics (`docs/architecture/10-data-model.md`
436
+ * § orderability), so every order-comparison and fold position refuses
437
+ * closed-bound terms this judgment is the one gate they all read, and the
438
+ * construction-time validations in `#query/lower.ts` are its runtime twin.
463
439
  */
464
- type OrderVarOk<Env extends EnvShape, N extends string> = N extends keyof Env ? Env[N]["field"] extends {
440
+ type OrderVarOk<V extends AnyVar> = V["field"] extends {
465
441
  readonly closed: ClosedRoster;
466
- } ? false : Env[N]["field"]["kind"] extends "u64" | "i64" ? true : false : false;
467
- /** Whether a var name is bound at an interval field. */
468
- type IntervalVarOk<Env extends EnvShape, N extends string> = N extends keyof Env ? Env[N]["field"]["kind"] extends "interval" ? true : false : false;
469
- /** One order-comparison side's judgment against the environment. */
470
- type OrderSideOk<Env extends EnvShape, T> = T extends Var<infer N extends string> ? OrderVarOk<Env, N> : T extends Duration<infer N extends string> ? IntervalVarOk<Env, N> : true;
442
+ } ? false : V["field"]["kind"] extends "u64" | "i64" ? true : false;
443
+ /** Whether a variable's OWN field is interval-typed. */
444
+ type IntervalVarOk<V extends AnyVar> = V["field"]["kind"] extends "interval" ? true : false;
445
+ /** One order-comparison side's judgment (off the term's own field). */
446
+ type OrderSideOk<T> = T extends AnyVar ? OrderVarOk<T> : T extends Duration<infer V extends AnyVar> ? IntervalVarOk<V> : true;
471
447
  /** One point side's judgment. */
472
- type PointSideOk<Env extends EnvShape, T> = T extends Var<infer N extends string> ? OrderVarOk<Env, N> : true;
448
+ type PointSideOk<T> = T extends AnyVar ? OrderVarOk<T> : true;
473
449
  /** One interval side's judgment. */
474
- type IntervalSideOk<Env extends EnvShape, T> = T extends Var<infer N extends string> ? IntervalVarOk<Env, N> : true;
475
- /** The `eq`/`ne` judgment: left var bound; right joins it (class-equal var, param, or an exact-type literal). */
476
- type EqOk<Env extends EnvShape, L, R> = L extends Var<infer N extends string> ? N extends keyof Env ? R extends Var<infer M extends string> ? M extends keyof Env ? JoinOk<Env[N], Env[M]> : false : R extends Param<string> | SetParam<string> ? true : [R] extends [Infer<Env[N]["field"]>] ? true : false : false : false;
477
- /** One negated-atom binding's judgment: a var must be positively bound (safety) AND class-equal. */
478
- type NotBindingOk<Env extends EnvShape, S extends ClassedField, T> = T extends Var<infer N extends string> ? (N extends keyof Env ? JoinOk<Env[N], S> : false) : true;
450
+ type IntervalSideOk<T> = T extends AnyVar ? IntervalVarOk<T> : true;
451
+ /** The `eq`/`ne` judgment: var-var joins by mint slot; var-literal is exact-typed by the var's own field. */
452
+ type EqOk<Classes extends SchemaClasses, L, R> = L extends AnyVar ? R extends AnyVar ? JoinOk<MintSlotOf<Classes, L>, MintSlotOf<Classes, R>> extends true ? true : false : R extends Param<string> | SetParam<string> ? true : [R] extends [Infer<L["field"]>] ? true : false : false;
453
+ /** One negated-atom binding's judgment: a variable must be class-equal (boundness is a runtime wall). */
454
+ type NotBindingOk<Classes extends SchemaClasses, S extends ClassedField, T> = T extends AnyVar ? JoinOk<MintSlotOf<Classes, T>, S> extends true ? true : false : true;
479
455
  /** The whole negated atom's judgment (`CR` — the negated relation's class record off the schema class map). */
480
- type NotOk<Env extends EnvShape, F extends FieldsShape, CR, B> = false extends {
481
- [K in keyof B]: NotBindingOk<Env, SlotAt<F, CR, K>, B[K]>;
456
+ type NotOk<Classes extends SchemaClasses, F extends FieldsShape, CR, B> = false extends {
457
+ [K in keyof B]: NotBindingOk<Classes, SlotAt<F, CR, K>, B[K]>;
458
+ }[keyof B] ? false : true;
459
+ /** Reads a rec target's sealed head signature off its inference slot (`undefined` on an unthreaded handle). */
460
+ type RecHeadOf<T> = T extends {
461
+ readonly [inferred]?: infer S;
462
+ } ? Exclude<S, undefined> extends {
463
+ readonly head: infer H;
464
+ } ? H : undefined : undefined;
465
+ /** Reads a rec target's params record off its inference slot. */
466
+ type RecParamsOf<T> = T extends {
467
+ readonly [inferred]?: infer S;
468
+ } ? Exclude<S, undefined> extends {
469
+ readonly params: infer P;
470
+ } ? P : never : never;
471
+ /** One negated finished-stratum position's judgment: a variable, class-equal to its head slot when the head is carried. */
472
+ type NotIdbBindingOk<Classes extends SchemaClasses, HeadSlot, V> = V extends AnyVar ? HeadSlot extends ClassedField ? JoinOk<HeadSlot, MintSlotOf<Classes, V>> extends true ? true : false : true : false;
473
+ /**
474
+ * The whole negated finished-stratum atom's judgment — the negation twin of
475
+ * the `idb()` chain's `CheckIdbBindings`: when the target carries its head
476
+ * (a threaded rec handle), the bindings record's key set must EXACTLY equal
477
+ * the head's and each variable must be class-equal to its head slot; an
478
+ * unthreaded handle still takes variables only.
479
+ */
480
+ type NotIdbOk<Classes extends SchemaClasses, Head, B> = Head extends Readonly<Record<string, ClassedField>> ? [keyof B] extends [keyof Head] ? [keyof Head] extends [keyof B] ? false extends {
481
+ [K in keyof B]: NotIdbBindingOk<Classes, Head[K & keyof Head], B[K]>;
482
+ }[keyof B] ? false : true : false : false : false extends {
483
+ [K in keyof B]: B[K] extends AnyVar ? true : false;
482
484
  }[keyof B] ? false : true;
483
485
  /**
484
- * One condition's judgment against the rule environment the type-level
485
- * twin of the engine's comparison roster: class-equal joins (off the
486
- * schema type's class map), orderable order sides (an interval var under a
487
- * non-`pointIn` op is exactly here refused), kind-correct
488
- * `pointIn`/`allen` sides, and negated-atom safety (the negated
489
- * relation's class record is resolved through `Classes` by its name). The
490
- * leading `[AnyTreeChild] extends [C]` arm is the recursion's base case:
491
- * at an UNRESOLVED constraint (the whole condition union — or a tree's
492
- * child union, which is the union itself) the judgment is vacuously true —
493
- * without it the constraint instantiation recurses into itself.
486
+ * One condition's judgment the type-level twin of the engine's comparison
487
+ * roster: class-equal joins (off the mint slots), orderable order sides (an
488
+ * interval var under a non-`pointIn` op is exactly here refused),
489
+ * kind-correct `pointIn`/`allen` sides, and negated-atom class safety. The
490
+ * leading `[AnyTreeChild] extends [C]` arm is the recursion's base case.
494
491
  */
495
- type CondOkBool<Env extends EnvShape, Classes extends SchemaClasses, C> = [AnyTreeChild] extends [C] ? true : C extends Cmp<infer Op, infer L, infer R, unknown> ? Op extends "eq" | "ne" ? EqOk<Env, L, R> : Op extends "lt" | "le" | "gt" | "ge" ? [OrderSideOk<Env, L>, OrderSideOk<Env, R>] extends [true, true] ? true : false : Op extends "pointIn" ? [IntervalSideOk<Env, L>, PointSideOk<Env, R>] extends [true, true] ? true : false : Op extends "allen" ? [IntervalSideOk<Env, L>, IntervalSideOk<Env, R>] extends [true, true] ? true : false : false : C extends Tree<infer Ch extends readonly AnyTreeChild[]> ? false extends CondOkBool<Env, Classes, Ch[number]> ? false : true : C extends NotAtom<infer R extends MatchOwner, infer B> ? NotOk<Env, MatchFields<R>, ClassRecordOf<Classes, R["name"]>, B> : false;
492
+ type CondOkBool<Classes extends SchemaClasses, C> = [AnyTreeChild] extends [C] ? true : C extends Cmp<infer Op, infer L, infer R, unknown> ? Op extends "eq" | "ne" ? EqOk<Classes, L, R> : Op extends "lt" | "le" | "gt" | "ge" ? [OrderSideOk<L>, OrderSideOk<R>] extends [true, true] ? true : false : Op extends "pointIn" ? [IntervalSideOk<L>, PointSideOk<R>] extends [true, true] ? true : false : Op extends "allen" ? [IntervalSideOk<L>, IntervalSideOk<R>] extends [true, true] ? true : false : false : C extends Tree<infer Ch extends readonly AnyTreeChild[]> ? false extends CondOkBool<Classes, Ch[number]> ? false : true : C extends NotIdbAtom<infer T extends RecTarget, infer B> ? NotIdbOk<Classes, RecHeadOf<T>, B> : C extends NotAtom<infer R extends MatchOwner, infer B> ? NotOk<Classes, MatchFields<R>, ClassRecordOf<Classes, R["name"]>, B> : false;
496
493
  /** The validated `.where` argument (intersect with the inferred condition type). */
497
- type CheckCond<Env extends EnvShape, Classes extends SchemaClasses, C> = CondOkBool<Env, Classes, C> extends true ? C : never;
498
- /** The `eq`/`ne` params contribution: the param typed by the left variable's field. */
499
- type EqParams<Env extends EnvShape, L, R> = L extends Var<infer N extends string> ? R extends Param<infer P extends string> ? {
500
- readonly [Q in P]: Infer<Env[N & keyof Env]["field"]>;
494
+ type CheckCond<Classes extends SchemaClasses, C> = CondOkBool<Classes, C> extends true ? C : never;
495
+ /** The `eq`/`ne` params contribution: the param typed by the left variable's own field. */
496
+ type EqParams<L, R> = L extends AnyVar ? R extends Param<infer P extends string> ? {
497
+ readonly [Q in P]: Infer<L["field"]>;
501
498
  } : R extends SetParam<infer P extends string> ? {
502
- readonly [Q in P]: readonly Infer<Env[N & keyof Env]["field"]>[];
499
+ readonly [Q in P]: readonly Infer<L["field"]>[];
503
500
  } : never : never;
504
501
  /** An order side's params contribution (order params are always `bigint`). */
505
502
  type OrderSideParams<T> = T extends Param<infer P extends string> ? {
@@ -516,14 +513,13 @@ type MaskParams<M> = M extends MaskParam<infer P extends string> ? {
516
513
  /**
517
514
  * One condition's params-object fragments (a union; the rule builder folds
518
515
  * them into the inferred `Params` record) — every param typed by its use.
519
- * The leading arm is the same base case as {@link CondOkBool}'s: the
520
- * unresolved constraint contributes nothing.
516
+ * The leading arm is the same base case as {@link CondOkBool}'s.
521
517
  */
522
- type CondParams<Env extends EnvShape, C> = [AnyTreeChild] extends [C] ? never : C extends Cmp<infer Op, infer L, infer R, infer M> ? Op extends "eq" | "ne" ? EqParams<Env, L, R> : Op extends "lt" | "le" | "gt" | "ge" ? OrderSideParams<L> | OrderSideParams<R> : Op extends "pointIn" ? IntervalSideParams<L> | OrderSideParams<R> : Op extends "allen" ? IntervalSideParams<L> | IntervalSideParams<R> | MaskParams<M> : never : C extends Tree<infer Ch extends readonly AnyTreeChild[]> ? CondParams<Env, Ch[number]> : C extends NotAtom<infer R extends MatchOwner, infer B> ? BindParams<MatchFields<R>, B> : never;
518
+ type CondParams<C> = [AnyTreeChild] extends [C] ? never : C extends Cmp<infer Op, infer L, infer R, infer M> ? Op extends "eq" | "ne" ? EqParams<L, R> : Op extends "lt" | "le" | "gt" | "ge" ? OrderSideParams<L> | OrderSideParams<R> : Op extends "pointIn" ? IntervalSideParams<L> | OrderSideParams<R> : Op extends "allen" ? IntervalSideParams<L> | IntervalSideParams<R> | MaskParams<M> : never : C extends Tree<infer Ch extends readonly AnyTreeChild[]> ? CondParams<Ch[number]> : C extends NotIdbAtom<infer T extends RecTarget, unknown> ? RecParamsOf<T> : C extends NotAtom<infer R extends MatchOwner, infer B> ? BindParams<MatchFields<R>, B> : never;
523
519
  /** The flattened params record one bindings record contributes. */
524
520
  type BindParamsShape<F extends FieldsShape, B> = ShapeOf<BindParams<F, B>>;
525
521
  /** The flattened params record one condition contributes. */
526
- type CondParamsShape<Env extends EnvShape, C> = ShapeOf<CondParams<Env, C>>;
527
- export type { AggData, AnyCmp, AnyCond, AnyNotAtom, AnyTreeChild, AtomData, BindEnv, BindingEntry, BindingInput, BindingTermData, BindParams, BindParamsShape, CheckBindings, CheckCond, Cmp, CmpData, CmpKind, CmpTermData, CondData, CondOkBool, CondParams, CondParamsShape, IntervalSide, IntervalVarOk, MaskData, MatchFields, MatchOwner, MatchShape, NotAtom, OrderSide, OrderVarOk, ParamUse, PointSide, RecData, RuleData, RuleItem, SelectColumn, SelectEntryData, Tree, TreeData };
522
+ type CondParamsShape<C> = ShapeOf<CondParams<C>>;
523
+ export type { AggData, AnyCmp, AnyCond, AnyNotAtom, AnyTreeChild, AtomData, BindingEntry, BindingInput, BindingTermData, BindParams, BindParamsShape, CheckBindings, CheckCond, Cmp, CmpData, CmpKind, CmpTermData, CondData, CondOkBool, CondParams, CondParamsShape, FindColumn, FindEntryData, IntervalSide, IntervalVarOk, MaskData, MatchFields, MatchOwner, MatchShape, NotAtom, NotIdbAtom, OrderSide, OrderVarOk, ParamUse, PointSide, RecData, RecTarget, RuleData, RuleItem, SlotAt, Tree, TreeData };
528
524
  export { ALLEN, ALLEN_ALL_BITS, allen, and, comparison, eq, ge, gt, le, lt, ne, not, or, pointIn };
529
525
  //# sourceMappingURL=atom.d.ts.map