@bjornpagen/bumbledb 0.2.0 → 0.4.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 (94) hide show
  1. package/COOKBOOK.md +503 -427
  2. package/README.md +84 -36
  3. package/dist/closed.d.ts +111 -38
  4. package/dist/closed.d.ts.map +1 -1
  5. package/dist/closed.js +94 -99
  6. package/dist/closed.js.map +1 -1
  7. package/dist/db.d.ts +16 -2
  8. package/dist/db.d.ts.map +1 -1
  9. package/dist/db.js +46 -8
  10. package/dist/db.js.map +1 -1
  11. package/dist/face.d.ts +114 -69
  12. package/dist/face.d.ts.map +1 -1
  13. package/dist/face.js +38 -21
  14. package/dist/face.js.map +1 -1
  15. package/dist/fields.d.ts +72 -87
  16. package/dist/fields.d.ts.map +1 -1
  17. package/dist/fields.js +35 -67
  18. package/dist/fields.js.map +1 -1
  19. package/dist/index.d.ts +18 -13
  20. package/dist/index.d.ts.map +1 -1
  21. package/dist/index.js +11 -7
  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/marshal.d.ts +33 -6
  32. package/dist/marshal.d.ts.map +1 -1
  33. package/dist/marshal.js +67 -6
  34. package/dist/marshal.js.map +1 -1
  35. package/dist/native.d.ts +6 -2
  36. package/dist/native.d.ts.map +1 -1
  37. package/dist/native.js.map +1 -1
  38. package/dist/query/atom.d.ts +139 -56
  39. package/dist/query/atom.d.ts.map +1 -1
  40. package/dist/query/atom.js +7 -1
  41. package/dist/query/atom.js.map +1 -1
  42. package/dist/query/lower.d.ts +71 -56
  43. package/dist/query/lower.d.ts.map +1 -1
  44. package/dist/query/lower.js +341 -69
  45. package/dist/query/lower.js.map +1 -1
  46. package/dist/query/predicate.d.ts +10 -9
  47. package/dist/query/predicate.d.ts.map +1 -1
  48. package/dist/query/predicate.js +2 -2
  49. package/dist/query/predicate.js.map +1 -1
  50. package/dist/query/run.d.ts +15 -5
  51. package/dist/query/run.d.ts.map +1 -1
  52. package/dist/query/run.js +26 -6
  53. package/dist/query/run.js.map +1 -1
  54. package/dist/query/scope.d.ts +100 -43
  55. package/dist/query/scope.d.ts.map +1 -1
  56. package/dist/query/scope.js +89 -30
  57. package/dist/query/scope.js.map +1 -1
  58. package/dist/query/select.d.ts +5 -5
  59. package/dist/query/select.d.ts.map +1 -1
  60. package/dist/relation.d.ts +29 -15
  61. package/dist/relation.d.ts.map +1 -1
  62. package/dist/relation.js +45 -17
  63. package/dist/relation.js.map +1 -1
  64. package/dist/schema.d.ts +41 -3
  65. package/dist/schema.d.ts.map +1 -1
  66. package/dist/schema.js +16 -2
  67. package/dist/schema.js.map +1 -1
  68. package/dist/spec.d.ts +10 -8
  69. package/dist/spec.d.ts.map +1 -1
  70. package/dist/spec.js.map +1 -1
  71. package/dist/statements.d.ts +67 -31
  72. package/dist/statements.d.ts.map +1 -1
  73. package/dist/statements.js +97 -20
  74. package/dist/statements.js.map +1 -1
  75. package/package.json +2 -2
  76. package/src/closed.ts +214 -146
  77. package/src/db.ts +65 -10
  78. package/src/face.ts +169 -102
  79. package/src/fields.ts +97 -164
  80. package/src/index.ts +43 -18
  81. package/src/law.ts +519 -0
  82. package/src/lower.ts +36 -23
  83. package/src/marshal.ts +74 -7
  84. package/src/native.ts +6 -2
  85. package/src/query/atom.ts +155 -65
  86. package/src/query/lower.ts +572 -167
  87. package/src/query/predicate.ts +43 -33
  88. package/src/query/run.ts +26 -6
  89. package/src/query/scope.ts +161 -51
  90. package/src/query/select.ts +5 -5
  91. package/src/relation.ts +60 -26
  92. package/src/schema.ts +48 -7
  93. package/src/spec.ts +10 -8
  94. package/src/statements.ts +165 -46
package/dist/face.d.ts CHANGED
@@ -4,37 +4,45 @@
4
4
  * position, `on(Booking, ["room", "during"])` the composite/pointwise
5
5
  * position (one spelling, arity-generic), `on(Account.where({ kind:
6
6
  * Kind.Savings }), "id")` the σ-carrying source, `on(Kind, "id")` a closed
7
- * relation's sealed shape opened through its synthetic `id`. Projection is
7
+ * relation's sealed shape opened through its synthetic `id`,
8
+ * `on(Kind.where({ mastered: true }), "id")` the ψ-selected closed source
9
+ * (the selection lowered as-is — the ENGINE folds it against the sealed
10
+ * extension at validate, never the SDK). Projection is
8
11
  * positional: tuple order is preserved in the type, and the statement
9
12
  * constructors pair the two sides' tuples by arity ({@link SameArity}) AND
10
- * by domain ({@link SameDomains}) — the domain wall of the structural
11
- * design: every projected field's domain LABEL is read off the schema type
12
- * (`F["domain"]`, the S1 kernel) and compared positionwise by
13
- * string-literal equality, never by any value brand.
13
+ * by structural shape ({@link SameShapes}) — every projected field's
14
+ * kind/width/element/roster quadruple is read off the schema type (the
15
+ * minimal kernel: descriptors are pure structure, and a closed reference's
16
+ * roster IS part of that structure) and compared positionwise. There is no
17
+ * domain to compare at construction — domains are LAW-BORN: the statements
18
+ * themselves define the equivalence classes, and `schema()` is where they
19
+ * aggregate and get judged (the one-generator-per-class wall).
14
20
  */
15
- import type { AnyClosed, PayloadField } from "#closed.ts";
21
+ import type { AnyClosed, AnySelectedClosed, PayloadField } from "#closed.ts";
22
+ import type { AnyField } from "#fields.ts";
16
23
  import type { AnyRelation, AnySelected, FieldsShape, RelationFields, SelectionBinding } from "#relation.ts";
17
24
  /**
18
- * A disjunctive literal set for a selection binding`field == {A, B}`.
19
- * The signature of {@link oneOf} demands two leading literals, so the
20
- * one-element set (banned: it is the bare literal) and the empty set
21
- * (banned: it selects nothing) are unwritable.
25
+ * The OWNER a face source resolves to: a selected relationordinary σ or
26
+ * closed ψ, one shape projects from its underlying relation; a bare
27
+ * relation or closed relation is its own owner. The type-level twin of
28
+ * {@link faceParts}'s split, and what a statement's face `data` carries at
29
+ * its EXACT type — `schema()`'s law-typing reads the owner's literal name
30
+ * (and the projection tuple) straight off the statement type.
22
31
  */
23
- interface OneOf<V> {
24
- readonly literals: readonly [V, V, ...V[]];
25
- }
26
- /**
27
- * Constructs a literal set (read disjunctively) for a `where()` binding.
28
- * Two leading arguments by signature: the degenerate sets have no spelling
29
- * (the canonical-utterance law, `docs/architecture/70-api.md`).
30
- */
31
- declare function oneOf<V>(first: V, second: V, ...rest: V[]): OneOf<V>;
32
+ type OwnerOf<S extends FaceSource> = S extends AnySelected | AnySelectedClosed ? S["relation"] : S;
32
33
  /** The relation a face projects from — ordinary or closed. */
33
34
  type FaceOwner = AnyRelation | AnyClosed;
34
- /** A face's runtime description: owner, π (written order), σ (resolved bindings). */
35
- interface FaceData {
36
- readonly owner: FaceOwner;
37
- readonly projection: readonly string[];
35
+ /**
36
+ * A face's runtime description: owner, π (written order), σ (resolved
37
+ * bindings). Generic over the owner and projection so a STATEMENT value
38
+ * carries its paired coordinates at their exact types — the honest runtime
39
+ * properties (`owner.name`, `projection`) ARE the type-level carrier
40
+ * `schema()`'s law-typing reads; the defaults are the wide shape every
41
+ * renderer and lowering walk consumes.
42
+ */
43
+ interface FaceData<O extends FaceOwner = FaceOwner, P extends readonly string[] = readonly string[]> {
44
+ readonly owner: O;
45
+ readonly projection: P;
38
46
  readonly selection: readonly SelectionBinding[];
39
47
  }
40
48
  /**
@@ -42,53 +50,84 @@ interface FaceData {
42
50
  * selected relation, or closed relation `on()` was handed — the statement
43
51
  * constructors resolve each projected field's DOMAIN through it), and `P`
44
52
  * is the projection tuple as written (its length is the positional-pairing
45
- * arity). Both are honest runtime properties, not phantoms.
53
+ * arity). Both are honest runtime properties, not phantoms — and `data`
54
+ * carries the resolved owner at its exact type, which is what a statement
55
+ * value hands to `schema()`'s law-typing.
46
56
  */
47
57
  interface Face<S extends FaceSource, P extends readonly string[]> {
48
58
  readonly source: S;
49
59
  readonly projection: P;
50
- readonly data: FaceData;
60
+ readonly data: FaceData<OwnerOf<S>, P>;
51
61
  }
52
62
  /** Any face value, whatever its source and projection. */
53
63
  type AnyFace = Face<FaceSource, readonly string[]>;
54
- /** What `on()` accepts: a relation, a selected relation, or a closed relation. */
55
- type FaceSource = AnyRelation | AnyClosed | AnySelected;
64
+ /** What `on()` accepts: a relation, a closed relation, or either with a selection applied. */
65
+ type FaceSource = AnyRelation | AnyClosed | AnySelected | AnySelectedClosed;
56
66
  /**
57
67
  * The field names a face over `S` may project: a relation's declared
58
68
  * fields; a selected relation's underlying fields; a closed relation's
59
- * SEALED shape — the synthetic `id` plus its declared payload columns
60
- * (`docs/architecture/70-api.md`: statement field names address the sealed
61
- * shape).
69
+ * SEALED shape — the synthetic `id` plus its declared payload columns,
70
+ * bare or ψ-selected alike (`docs/architecture/70-api.md`: statement field
71
+ * names address the sealed shape).
62
72
  */
63
- type FaceFields<S extends FaceSource> = S extends AnySelected ? keyof S["relation"]["fields"] & string : S extends AnyRelation ? keyof S["fields"] & string : S extends {
73
+ type FaceFields<S extends FaceSource> = S extends AnySelected ? keyof S["relation"]["fields"] & string : S extends AnySelectedClosed ? "id" | (keyof S["relation"]["columns"] & string) : S extends AnyRelation ? keyof S["fields"] & string : S extends {
64
74
  readonly axioms: Readonly<Record<string, infer Row>>;
65
75
  } ? "id" | (keyof Row & string) : never;
66
- /** One field's domain label within a declared field block (`undefined` when the name is foreign). */
67
- type DomainIn<Fields extends FieldsShape, K extends string> = K extends keyof Fields ? Fields[K]["domain"] : undefined;
68
76
  /**
69
- * The domain LABEL of one projected field, read structurally off the
70
- * source's schema type an ordinary or selected relation's field carries
71
- * its S1 descriptor's `domain`; a closed relation's synthetic `id` carries
72
- * the handle domain (`"KindId"`), and its payload columns carry their own
73
- * declared descriptors' labels through the closed value's typed `columns`
74
- * carrier (whose runtime twin is the frozen `columns` record the mint
75
- * carries), so a same-label closed-payload relation-field pairing
76
- * compiles and a mismatched one refuses the identical wall every other
77
- * face position gets. The lowering carries the same label to the engine,
78
- * which stays the final authority.
77
+ * One descriptor's structural comparand: the kind/width/element/roster
78
+ * quadruple exactly the structure the minimal kernel carries. The first
79
+ * three slots compare exactly as the engine's Q1 law pairs positions
80
+ * (`schema/validate.rs`): a `bytes` width is bound (bytes<16> vs bytes<32>
81
+ * mismatch), while an INTERVAL width is FREE the pointwise judgments
82
+ * quantify over points, which carry an element domain and not a width, so
83
+ * `interval(u64)` pairs with `interval(u64, 1n)` (recipe 9's extent/slot
84
+ * mirrors, recipe 29's mixed-width zones) and the width slot reads
85
+ * `undefined` for every interval. Elements stay bound: u64-vs-i64 interval
86
+ * pairs still mismatch. The ROSTER slot is SDK-only structure (the engine's
87
+ * wire carries plain u64s): a closed reference contributes its handle
88
+ * union, every other kind `undefined`, so a plain u64 face cannot pair with
89
+ * a closed `[id]` face — the vocabulary's own descriptor (`Kind.id`) is the
90
+ * ONE spelling of a closed reference at this surface, and a bare column
91
+ * cannot alias a vocabulary through a declared law. The runtime twin is the
92
+ * statement constructors' roster-identity walk (`statements.ts`).
79
93
  */
80
- type ProjectedDomain<S extends FaceSource, K extends string> = S extends AnySelected ? DomainIn<RelationFields<S["relation"]>, K> : S extends AnyRelation ? DomainIn<RelationFields<S>, K> : S extends {
81
- readonly id: {
82
- readonly domain: infer D extends string;
83
- };
94
+ type ShapeOf<F extends AnyField> = readonly [
95
+ F["kind"],
96
+ F extends {
97
+ readonly element: unknown;
98
+ } ? undefined : F extends {
99
+ readonly width: infer W;
100
+ } ? W : undefined,
101
+ F extends {
102
+ readonly element: infer E;
103
+ } ? E : undefined,
104
+ F extends {
105
+ readonly closed: {
106
+ readonly handles: readonly (infer H extends string)[];
107
+ };
108
+ } ? H : undefined
109
+ ];
110
+ /** One field's structural shape within a declared field block (`undefined` when the name is foreign). */
111
+ type ShapeIn<Fields extends FieldsShape, K extends string> = K extends keyof Fields ? ShapeOf<Fields[K]> : undefined;
112
+ /**
113
+ * The structural SHAPE of one projected field, read off the source's
114
+ * schema type — an ordinary or selected relation's field contributes its
115
+ * descriptor's triple; a closed relation (bare or ψ-selected) contributes
116
+ * its synthetic `id` as a u64 and its payload columns' declared
117
+ * descriptors' triples through the closed value's typed `columns` carrier
118
+ * (whose runtime twin is the frozen `columns` record the mint carries).
119
+ * The engine stays the final authority at `Db.create`/`Db.open`.
120
+ */
121
+ type ProjectedShape<S extends FaceSource, K extends string> = S extends AnySelected ? ShapeIn<RelationFields<S["relation"]>, K> : S extends AnySelectedClosed ? K extends "id" ? ShapeOf<S["relation"]["id"]> : ShapeIn<S["relation"]["columns"], K> : S extends AnyRelation ? ShapeIn<RelationFields<S>, K> : S extends {
122
+ readonly id: infer Id extends AnyField;
84
123
  readonly columns: infer Cols extends Record<string, PayloadField>;
85
- } ? K extends "id" ? D : DomainIn<Cols, K> : undefined;
86
- /** The positionwise domain-label tuple of a projection over `S`. */
87
- type DomainsOf<S extends FaceSource, P extends readonly string[]> = {
88
- readonly [I in keyof P]: ProjectedDomain<S, P[I] & string>;
124
+ } ? K extends "id" ? ShapeOf<Id> : ShapeIn<Cols, K> : undefined;
125
+ /** The positionwise structural-shape tuple of a projection over `S`. */
126
+ type ShapesOf<S extends FaceSource, P extends readonly string[]> = {
127
+ readonly [I in keyof P]: ProjectedShape<S, P[I] & string>;
89
128
  };
90
- /** The domain-label tuple a face projects, positionwise — the comparand of {@link SameDomains}. */
91
- type FaceDomains<F extends AnyFace> = F extends Face<infer S, infer P> ? DomainsOf<S, P> : never;
129
+ /** The shape tuple a face projects, positionwise — the comparand of {@link SameShapes}. */
130
+ type FaceShapes<F extends AnyFace> = F extends Face<infer S, infer P> ? ShapesOf<S, P> : never;
92
131
  /** The projection arity of a face. */
93
132
  type Arity<F extends AnyFace> = F["projection"]["length"];
94
133
  /**
@@ -109,25 +148,31 @@ interface FaceArityMismatch<Left, Right> {
109
148
  */
110
149
  type SameArity<A extends AnyFace, B extends AnyFace> = Arity<A> extends Arity<B> ? Arity<B> extends Arity<A> ? unknown : FaceArityMismatch<Arity<A>, Arity<B>> : FaceArityMismatch<Arity<A>, Arity<B>>;
111
150
  /**
112
- * The legible domain-mismatch verdict: when the two faces of a containment,
113
- * bijection, or window project different domain labels at any position,
114
- * this type is intersected into the second face's parameter and names both
115
- * label tuples — a cross-domain pair is a COMPILE error, achieved by
116
- * string-literal comparison of descriptor shapes (the structural design's
117
- * ratified check), never by a value brand.
151
+ * The legible shape-mismatch verdict: when the two faces of a containment,
152
+ * bijection, or window project structurally incompatible fields at any
153
+ * position, this type is intersected into the second face's parameter and
154
+ * names both shape tuples — a u64 face against a str face, a bytes width
155
+ * mismatch, an interval element mismatch, or a bare column against a
156
+ * closed reference (the roster slot) is a COMPILE error.
118
157
  */
119
- interface FaceDomainMismatch<Left, Right> {
120
- readonly "face domain mismatch — positionwise domain labels must be equal on both sides": readonly [Left, Right];
158
+ interface FaceShapeMismatch<Left, Right> {
159
+ readonly "face shape mismatch — positionwise kind, width, element, and closed roster must be equal on both sides": readonly [
160
+ Left,
161
+ Right
162
+ ];
121
163
  }
122
164
  /**
123
165
  * Resolves to `unknown` (a no-op intersection) when the two faces project
124
- * positionwise-equal domain labels, and to {@link FaceDomainMismatch}
125
- * otherwise. Equality is mutual tuple assignability over string-literal
126
- * labels (`undefined` pairs only with `undefined` — an unlabeled field
127
- * links only unlabeled fields, mirroring Rust where `u64` and `u64 as
128
- * HolderId` are different host types).
166
+ * positionwise-equal structural shapes, and to {@link FaceShapeMismatch}
167
+ * otherwise. Equality is mutual tuple assignability over the
168
+ * kind/width/element/roster quadruples. This is the whole
169
+ * construction-time wall deliberately: there is no domain to compare
170
+ * here (the roster is descriptor STRUCTURE, not a domain). The domain wall
171
+ * lives where domains are BORN: `schema()` computes every field's class
172
+ * from the statement list and holds the one-generator-per-class law, and
173
+ * query joins compare class names off the schema type.
129
174
  */
130
- type SameDomains<A extends AnyFace, B extends AnyFace> = FaceDomains<A> extends FaceDomains<B> ? FaceDomains<B> extends FaceDomains<A> ? unknown : FaceDomainMismatch<FaceDomains<A>, FaceDomains<B>> : FaceDomainMismatch<FaceDomains<A>, FaceDomains<B>>;
175
+ type SameShapes<A extends AnyFace, B extends AnyFace> = FaceShapes<A> extends FaceShapes<B> ? FaceShapes<B> extends FaceShapes<A> ? unknown : FaceShapeMismatch<FaceShapes<A>, FaceShapes<B>> : FaceShapeMismatch<FaceShapes<A>, FaceShapes<B>>;
131
176
  /**
132
177
  * Projects a face — one spelling, arity-generic: `on(Account, "holder")`
133
178
  * for the common single-field position, `on(Booking, ["room", "during"])`
@@ -146,6 +191,6 @@ declare function on<S extends FaceSource, const P extends readonly [FaceFields<S
146
191
  * renderer's own shape, `schema/render.rs`).
147
192
  */
148
193
  declare function renderFace(face: FaceData): string;
149
- export type { AnyFace, Arity, Face, FaceArityMismatch, FaceData, FaceDomainMismatch, FaceDomains, FaceFields, FaceOwner, FaceSource, OneOf, SameArity, SameDomains };
150
- export { on, oneOf, renderFace };
194
+ export type { AnyFace, Arity, Face, FaceArityMismatch, FaceData, FaceFields, FaceOwner, FaceShapeMismatch, FaceShapes, FaceSource, OwnerOf, SameArity, SameShapes };
195
+ export { on, renderFace };
151
196
  //# sourceMappingURL=face.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"face.d.ts","sourceRoot":"","sources":["../src/face.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AACzD,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,WAAW,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAA;AAsB3G;;;;;GAKG;AACH,UAAU,KAAK,CAAC,CAAC;IAChB,QAAQ,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC,EAAE,CAAC,EAAE,GAAG,CAAC,EAAE,CAAC,CAAA;CAC1C;AAED;;;;GAIG;AACH,iBAAS,KAAK,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,GAAG,IAAI,EAAE,CAAC,EAAE,GAAG,KAAK,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B,UAAU,EACV,UAAU,EACV,OAAO,EACP,SAAS,EACT,UAAU,EACV,CAAA;AACD,OAAO,EAAE,EAAE,EAAE,UAAU,EAAE,CAAA"}
package/dist/face.js CHANGED
@@ -4,22 +4,30 @@
4
4
  * position, `on(Booking, ["room", "during"])` the composite/pointwise
5
5
  * position (one spelling, arity-generic), `on(Account.where({ kind:
6
6
  * Kind.Savings }), "id")` the σ-carrying source, `on(Kind, "id")` a closed
7
- * relation's sealed shape opened through its synthetic `id`. Projection is
7
+ * relation's sealed shape opened through its synthetic `id`,
8
+ * `on(Kind.where({ mastered: true }), "id")` the ψ-selected closed source
9
+ * (the selection lowered as-is — the ENGINE folds it against the sealed
10
+ * extension at validate, never the SDK). Projection is
8
11
  * positional: tuple order is preserved in the type, and the statement
9
12
  * constructors pair the two sides' tuples by arity ({@link SameArity}) AND
10
- * by domain ({@link SameDomains}) — the domain wall of the structural
11
- * design: every projected field's domain LABEL is read off the schema type
12
- * (`F["domain"]`, the S1 kernel) and compared positionwise by
13
- * string-literal equality, never by any value brand.
13
+ * by structural shape ({@link SameShapes}) — every projected field's
14
+ * kind/width/element/roster quadruple is read off the schema type (the
15
+ * minimal kernel: descriptors are pure structure, and a closed reference's
16
+ * roster IS part of that structure) and compared positionwise. There is no
17
+ * domain to compare at construction — domains are LAW-BORN: the statements
18
+ * themselves define the equivalence classes, and `schema()` is where they
19
+ * aggregate and get judged (the one-generator-per-class wall).
14
20
  */
21
+ import * as errors from "@superbuilders/errors";
15
22
  import { renderLiteralSet } from "#spec.ts";
16
23
  /** The empty σ of a selection-free face, shared by every bare projection. */
17
24
  const emptySelection = Object.freeze([]);
18
25
  /**
19
- * Splits a face source into its owner and σ: a selected relation carries
20
- * its own bindings (`relation` is the discriminant — the property exists on
21
- * no relation or closed value, and `closed()` reserves the name against
22
- * handle collisions); a bare relation or closed relation carries none.
26
+ * Splits a face source into its owner and σ: a selected relation — ordinary
27
+ * σ or closed ψ, one shape — carries its own bindings (`relation` is the
28
+ * discriminant — the property exists on no relation or closed value, and
29
+ * `closed()` reserves the name against handle collisions); a bare relation
30
+ * or closed relation carries none.
23
31
  */
24
32
  function faceParts(source) {
25
33
  if ("relation" in source) {
@@ -27,16 +35,6 @@ function faceParts(source) {
27
35
  }
28
36
  return { owner: source, selection: emptySelection };
29
37
  }
30
- /**
31
- * Constructs a literal set (read disjunctively) for a `where()` binding.
32
- * Two leading arguments by signature: the degenerate sets have no spelling
33
- * (the canonical-utterance law, `docs/architecture/70-api.md`).
34
- */
35
- function oneOf(first, second, ...rest) {
36
- const literals = [first, second, ...rest];
37
- Object.freeze(literals);
38
- return Object.freeze({ literals });
39
- }
40
38
  function on(source, fields) {
41
39
  const projection = Object.freeze(typeof fields === "string" ? [fields] : [...fields]);
42
40
  const parts = faceParts(source);
@@ -45,7 +43,26 @@ function on(source, fields) {
45
43
  projection,
46
44
  selection: parts.selection
47
45
  });
48
- return Object.freeze({ source, projection, data });
46
+ const value = Object.freeze({ source, projection, data });
47
+ if (!faceMinted(value, source, projection)) {
48
+ throw errors.new(`face over ${parts.owner.name}: face construction incomplete`);
49
+ }
50
+ return value;
51
+ }
52
+ /**
53
+ * The trusted seam of the face mint (the `refsComplete` pattern): the
54
+ * checkable facts — the value carries exactly the source and projection it
55
+ * was built from, and `data.owner` is exactly the owner {@link faceParts}
56
+ * resolves for that source — are verified before the wide construction is
57
+ * admitted at the exact {@link Face} type (whose `data` claims the owner at
58
+ * its precise type, the carrier the schema-level law-typing reads).
59
+ */
60
+ function faceMinted(value, source, projection) {
61
+ const owner = "relation" in source ? source.relation : source;
62
+ return (value.source === source &&
63
+ value.projection === projection &&
64
+ value.data.owner === owner &&
65
+ value.data.projection === projection);
49
66
  }
50
67
  /**
51
68
  * Renders one face in the exact macro notation — `Name(p1, p2 | f == lit,
@@ -64,5 +81,5 @@ function renderFace(face) {
64
81
  .join(", ");
65
82
  return `${face.owner.name}(${projection} | ${bindings})`;
66
83
  }
67
- export { on, oneOf, renderFace };
84
+ export { on, ren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