@bjornpagen/bumbledb 0.19.2 → 0.20.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.
@@ -1 +1 @@
1
- {"version":3,"file":"statements.js","sourceRoot":"","sources":["../src/statements.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,uBAAuB,CAAA;AAC/C,OAAO,EAIN,gBAAgB,EAChB,gBAAgB,EAGhB,UAAU,EAEV,MAAM,cAAc,CAAA;AACrB,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,YAAY,CAAA;AAC1D,OAAO,EAA+B,UAAU,EAAmC,MAAM,UAAU,CAAA;AACnG,OAAO,EAAwB,QAAQ,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAEzE,OAAO,EAA2B,oBAAoB,EAAE,YAAY,EAAmB,MAAM,UAAU,CAAA;AA8BvG,MAAM,QAAQ,GAAkB,MAAM,CAAC,6BAA6B,CAAC,CAAA;AAOrE,SAAS,WAAW,CAAC,KAAc;IAClC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,QAAQ,IAAI,KAAK,CAAA;AACxE,CAAC;AAcD,SAAS,gBAAgB,CAAC,MAAmC;IAC5D,OAAO,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,KAAK,MAAM,CAAC,IAAI,YAAY,CAAA;AAC7E,CAAC;AAED;;;;;;;;GAQG;AACH,SAAS,oBAAoB,CAAC,MAAgB,EAAE,MAAgB,EAAE,SAAoB;IACrF,IAAI,MAAM,CAAC,UAAU,CAAC,MAAM,KAAK,MAAM,CAAC,UAAU,CAAC,MAAM,EAAE,CAAC;QAC3D,MAAM,MAAM,CAAC,GAAG,CACf,GAAG,MAAM,CAAC,KAAK,CAAC,IAAI,IAAI,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,MAAM,CAAC,KAAK,C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,IAAI,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAA;IACnI,CAAC;AACF,CAAC;AAYD,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,WAAW,EAAE,GAAG,EAAE,OAAO,EAAE,eAAe,EAAE,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bjornpagen/bumbledb",
3
- "version": "0.19.2",
3
+ "version": "0.20.0",
4
4
  "description": "Embedded relational database for TypeScript with typed schemas, queries, and commit-time constraints",
5
5
  "type": "module",
6
6
  "exports": {
@@ -43,7 +43,7 @@
43
43
  "arkregex": "^0.0.8"
44
44
  },
45
45
  "devDependencies": {
46
- "@biomejs/biome": "^2.0.0-beta.5",
46
+ "@biomejs/biome": "2.5.4",
47
47
  "@types/node": "^26.1.0",
48
48
  "typescript": "^7.0.2"
49
49
  },
@@ -55,8 +55,9 @@
55
55
  },
56
56
  "private": false,
57
57
  "optionalDependencies": {
58
- "@bjornpagen/bumbledb-darwin-arm64": "0.19.2",
59
- "@bjornpagen/bumbledb-linux-arm64": "0.19.2"
58
+ "@bjornpagen/bumbledb-darwin-arm64": "0.20.0",
59
+ "@bjornpagen/bumbledb-linux-arm64": "0.20.0",
60
+ "@bjornpagen/bumbledb-linux-x64": "0.20.0"
60
61
  },
61
62
  "scripts": {
62
63
  "build": "node scripts/build.ts",
package/src/db.ts CHANGED
@@ -367,6 +367,13 @@ interface Db<Rels extends SchemaRelations> {
367
367
  write<R>(fn: (tx: WriteTx<Rels>) => SyncResult<R>): WriteOutcome<Rels, SyncResult<R>>
368
368
 
369
369
  writeFrom<R>(witness: Witness<Rels>, fn: (tx: WriteTx<Rels>) => SyncResult<R>): WriteFromOutcome<Rels, SyncResult<R>>
370
+ /**
371
+ * blake3 over the canonical catalog enumeration — the replication
372
+ * equality oracle: equal digests imply identical judged content
373
+ * regardless of page layout or allocation history. Harness-tier
374
+ * (bounded sequential passes over the store), off any hot path.
375
+ */
376
+ catalogDigest(): Uint8Array
370
377
  /**
371
378
  * Prepares a query value built against THIS schema (identity is the
372
379
  * membership rule): lowers it to the engine IR, pins the plan, and
@@ -1288,6 +1295,12 @@ function openDb<Rels extends SchemaRelations>(handle: DbHandle, theory: Schema<R
1288
1295
  }, fn)
1289
1296
  }
1290
1297
 
1298
+ function catalogDigest(): Uint8Array {
1299
+ return bridged("bumbledb catalog digest", function readCatalogDigest() {
1300
+ return native.dbCatalogDigest(handle)
1301
+ })
1302
+ }
1303
+
1291
1304
  function prepare<Row, Params extends ParamsRecord>(q: Query<Rels, Row, Params>): Prepared<Rels, Row, Params> {
1292
1305
  if (q.schema !== theory) {
1293
1306
  throw errors.new(
@@ -1309,6 +1322,7 @@ function openDb<Rels extends SchemaRelations>(handle: DbHandle, theory: Schema<R
1309
1322
  read,
1310
1323
  write,
1311
1324
  writeFrom,
1325
+ catalogDigest,
1312
1326
  prepare
1313
1327
  })
1314
1328
  }
@@ -1668,6 +1682,7 @@ export type {
1668
1682
  AbandonedArm,
1669
1683
  Admission,
1670
1684
  CapacityViolation,
1685
+ CollectionWrite,
1671
1686
  Committed,
1672
1687
  ContainmentViolation,
1673
1688
  DeclaredKeyFact,
package/src/index.ts CHANGED
@@ -47,6 +47,7 @@ export type {
47
47
  AbandonedArm,
48
48
  Admission,
49
49
  CapacityViolation,
50
+ CollectionWrite,
50
51
  Committed,
51
52
  ContainmentViolation,
52
53
  DeclaredKeyFact,
@@ -122,8 +123,29 @@ export type { Same, SameLen } from "#judgment.ts"
122
123
  export type { ClassesOf, ClassWall, LawfulStatements, RelationClasses, SchemaClasses } from "#law.ts"
123
124
  export { lower } from "#lower.ts"
124
125
  export type { KeyFact } from "#marshal.ts"
126
+ export { factOf, rowOf } from "#marshal.ts"
125
127
  export type {
126
128
  FactValue,
129
+ LogBatch,
130
+ LogBatchDecodeKind,
131
+ LogBatchEncodeKind,
132
+ LogBatchHeader,
133
+ LogBraidComponent,
134
+ LogBraids,
135
+ LogChain,
136
+ LogChainEntry,
137
+ LogCheckpointDoc,
138
+ LogCheckpointHead,
139
+ LogCheckpointKind,
140
+ LogCodecHandle,
141
+ LogManifestDoc,
142
+ LogManifestKind,
143
+ LogOpIn,
144
+ LogOpKind,
145
+ LogOpOut,
146
+ LogPendingBatch,
147
+ LogResult,
148
+ LogSidecarKind,
127
149
  ParsedQuery,
128
150
  QueryIr,
129
151
  SealedDescriptor,
@@ -133,7 +155,22 @@ export type {
133
155
  SealedWeight,
134
156
  StatementKindTag
135
157
  } from "#native.ts"
136
- export { internalBlake3, internalDescriptor } from "#native.ts"
158
+ export {
159
+ internalBlake3,
160
+ internalDescriptor,
161
+ internalLogBraidsOf,
162
+ internalLogCodec,
163
+ internalLogDecodeBatch,
164
+ internalLogEncodeBatch,
165
+ internalLogParseCheckpoint,
166
+ internalLogParseCkptScratch,
167
+ internalLogParseManifest,
168
+ internalLogParseSidecar,
169
+ internalLogRenderCheckpoint,
170
+ internalLogRenderCkptScratch,
171
+ internalLogRenderManifest,
172
+ internalLogRenderSidecar
173
+ } from "#native.ts"
137
174
 
138
175
  export type {
139
176
  AnyCond,
package/src/native.ts CHANGED
@@ -17,6 +17,13 @@ type TxHandle = { readonly __brand: "bumbledb.tx" }
17
17
 
18
18
  type PreparedHandle = { readonly __brand: "bumbledb.prepared" }
19
19
 
20
+ /**
21
+ * The sealed per-theory log codec (`crates/bumbledb-log`): descriptor
22
+ * parsed once — vocabulary + braid map — beside the fingerprint the wire
23
+ * pins. Immutable plain data; no lifecycle verbs.
24
+ */
25
+ type LogCodecHandle = { readonly __brand: "bumbledb.logCodec" }
26
+
20
27
  interface WireMutationReport {
21
28
  readonly submitted: bigint
22
29
  readonly changed: bigint
@@ -131,10 +138,152 @@ type ConditionTreeIr =
131
138
 
132
139
  type StatementKindTag = "functionality" | "containment" | "capacity"
133
140
 
141
+ /**
142
+ * A log grammar lane's domain outcome: the payload, or a refusal row
143
+ * whose `kind` is an identity string spelled exactly as
144
+ * `crates/bumbledb-log` spells it (the `log-identities.json` mint table).
145
+ */
146
+ type LogResult<T, K extends string> =
147
+ | { readonly ok: true; readonly value: T }
148
+ | { readonly ok: false; readonly kind: K; readonly message: string }
149
+
150
+ /** `DecodeError::identity` — the batch decode refusal identities. */
151
+ type LogBatchDecodeKind =
152
+ | "Truncated"
153
+ | "BadMagic"
154
+ | "Version"
155
+ | "Flags"
156
+ | "FingerprintMismatch"
157
+ | "UnknownBraid"
158
+ | "UnknownOpKind"
159
+ | "UnknownRelation"
160
+ | "ClosedRelation"
161
+ | "OpRelationOutsideBraid"
162
+ | "TagMismatch"
163
+ | "BoolByte"
164
+ | "InvalidUtf8"
165
+ | "EmptyInterval"
166
+ | "IntervalOverflow"
167
+ | "TrailingBytes"
168
+
169
+ /** The batch encode refusal identities (`EncodeError`, bridge-spelled). */
170
+ type LogBatchEncodeKind =
171
+ | "FingerprintMismatch"
172
+ | "UnknownBraid"
173
+ | "UnknownRelation"
174
+ | "ClosedRelation"
175
+ | "OpRelationOutsideBraid"
176
+ | "Arity"
177
+ | "Value"
178
+ | "TooManyOps"
179
+ | "TooManyRows"
180
+
181
+ /** `ManifestError::identity`. */
182
+ type LogManifestKind = "Malformed" | "Version"
183
+
184
+ /** `CheckpointError::identity`. */
185
+ type LogCheckpointKind = "Malformed" | "Version" | "Overflow" | "UnknownBraid" | "BraidSet"
186
+
187
+ /** `SidecarError::identity`. */
188
+ type LogSidecarKind = "Malformed" | "Version" | "UnknownBraid" | "Overflow"
189
+
190
+ /**
191
+ * The batch header both directions. The codec handle is the fingerprint
192
+ * authority — the wire never carries one. `braid` is the raw braid id
193
+ * (the smallest relation id in its component).
194
+ */
195
+ interface LogBatchHeader {
196
+ readonly braid: number
197
+ readonly braidGen: bigint
198
+ readonly prev: Uint8Array
199
+ readonly writer: bigint
200
+ readonly timestamp: bigint
201
+ }
202
+
203
+ type LogOpKind = "insert" | "delete"
204
+
205
+ /**
206
+ * One op inbound to `logEncodeBatch`: rows carry TAGGED values (the
207
+ * query-literal lane's inbound spelling) so the bridge stays layout-blind
208
+ * and the codec core is the one judge of every cell.
209
+ */
210
+ interface LogOpIn {
211
+ readonly kind: LogOpKind
212
+ readonly relation: number
213
+ readonly rows: ReadonlyArray<readonly TaggedValue[]>
214
+ }
215
+
216
+ /** One decoded op: rows cross exactly as the engine's `ValueOut` walk. */
217
+ interface LogOpOut {
218
+ readonly kind: LogOpKind
219
+ readonly relation: number
220
+ readonly rows: FactValue[][]
221
+ }
222
+
223
+ interface LogBatch {
224
+ readonly header: LogBatchHeader
225
+ readonly ops: readonly LogOpOut[]
226
+ }
227
+
228
+ interface LogBraidComponent {
229
+ readonly braid: number
230
+ readonly relations: readonly number[]
231
+ }
232
+
233
+ /** The braid decomposition + serial-at statement ids of one theory. */
234
+ interface LogBraids {
235
+ readonly components: readonly LogBraidComponent[]
236
+ readonly serialAt: readonly number[]
237
+ }
238
+
239
+ /** The manifest document: an absent `checkpoint` is the store-birth null arm. */
240
+ interface LogManifestDoc {
241
+ readonly fingerprint: Uint8Array
242
+ readonly checkpoint?: Uint8Array
243
+ }
244
+
245
+ interface LogCheckpointHead {
246
+ readonly braid: number
247
+ readonly g: bigint
248
+ readonly hash: Uint8Array
249
+ readonly ts: bigint
250
+ }
251
+
252
+ /** The `ckpt/{digest}` document. Derived facts (digest, vector sum) stay derived. */
253
+ interface LogCheckpointDoc {
254
+ readonly braids: readonly LogCheckpointHead[]
255
+ readonly catalog: Uint8Array
256
+ readonly writer: bigint
257
+ readonly prev?: Uint8Array
258
+ }
259
+
260
+ interface LogChainEntry {
261
+ readonly braid: number
262
+ readonly g: bigint
263
+ readonly prev: Uint8Array
264
+ readonly ts: bigint
265
+ }
266
+
267
+ interface LogPendingBatch {
268
+ readonly braid: number
269
+ readonly slot: bigint
270
+ readonly bytes: Uint8Array
271
+ }
272
+
273
+ /** The chain sidecar document: an absent `pending` is the `Settled` arm. */
274
+ interface LogChain {
275
+ readonly entries: readonly LogChainEntry[]
276
+ readonly pending?: LogPendingBatch
277
+ }
278
+
134
279
  interface ManifestField {
135
280
  readonly name: string
136
281
  readonly id: number
137
282
  readonly valueType: ValueTypeSpec
283
+ /** The field's fresh attribute, straight off the declared spec; a closed relation's synthetic `id` slot is never fresh. */
284
+ readonly fresh: boolean
285
+ /** The field's host newtype name off the declared spec; a closed relation's synthetic `id` slot carries the handle newtype. Absent on a bare column. */
286
+ readonly newtype?: string
138
287
  }
139
288
 
140
289
  interface ManifestRow {
@@ -317,6 +466,13 @@ interface Native {
317
466
 
318
467
  dbGeneration(db: DbHandle): bigint
319
468
 
469
+ /**
470
+ * blake3 over the canonical catalog enumeration — the replication
471
+ * equality oracle: equal digests imply identical judged content
472
+ * regardless of page layout or allocation history.
473
+ */
474
+ dbCatalogDigest(db: DbHandle): Uint8Array
475
+
320
476
  dbFromInstance(path: string, instance: OwnedHandle): Promise<DbHandle>
321
477
 
322
478
  /**
@@ -408,9 +564,37 @@ interface Native {
408
564
  ): FactValue[] | null
409
565
  ownedPrepare(instance: OwnedHandle, query: ParsedQuery): PrepareResult
410
566
  ownedExecute(prepared: PreparedHandle, instance: OwnedHandle, params: readonly QueryParam[]): FactValue[][]
567
+
568
+ logCodec(descriptor: SealedDescriptor): LogCodecHandle
569
+
570
+ logBraidsOf(descriptor: SealedDescriptor): LogBraids
571
+
572
+ logEncodeBatch(
573
+ handle: LogCodecHandle,
574
+ header: LogBatchHeader,
575
+ ops: readonly LogOpIn[]
576
+ ): LogResult<Uint8Array, LogBatchEncodeKind>
577
+
578
+ logDecodeBatch(handle: LogCodecHandle, bytes: Uint8Array): LogResult<LogBatch, LogBatchDecodeKind>
579
+
580
+ logParseManifest(bytes: Uint8Array): LogResult<LogManifestDoc, LogManifestKind>
581
+
582
+ logRenderManifest(doc: LogManifestDoc): Uint8Array
583
+
584
+ logParseCheckpoint(handle: LogCodecHandle, bytes: Uint8Array): LogResult<LogCheckpointDoc, LogCheckpointKind>
585
+
586
+ logRenderCheckpoint(handle: LogCodecHandle, doc: LogCheckpointDoc): Uint8Array
587
+
588
+ logParseSidecar(handle: LogCodecHandle, bytes: Uint8Array): LogResult<LogChain, LogSidecarKind>
589
+
590
+ logRenderSidecar(handle: LogCodecHandle, chain: LogChain): Uint8Array
591
+
592
+ logParseCkptScratch(bytes: Uint8Array): Uint8Array | null
593
+
594
+ logRenderCkptScratch(digest: Uint8Array): Uint8Array
411
595
  }
412
596
 
413
- const SHIPPED_PLATFORMS = ["darwin-arm64", "linux-arm64"] as const
597
+ const SHIPPED_PLATFORMS = ["darwin-arm64", "linux-arm64", "linux-x64"] as const
414
598
 
415
599
  const requireNative = createRequire(import.meta.url)
416
600
 
@@ -468,6 +652,109 @@ function internalDescriptor(spec: SchemaSpec): SealedDescriptor {
468
652
  })
469
653
  }
470
654
 
655
+ /**
656
+ * @internal the sealed per-theory log codec off the `DescriptorWire` —
657
+ * one implementation of the protocol grammar (`crates/bumbledb-log`),
658
+ * lent to the replication driver (`@bjornpagen/bumbledb-log`). Not SDK
659
+ * API; the export is deliberately undocumented in the package surface.
660
+ */
661
+ function internalLogCodec(descriptor: SealedDescriptor): LogCodecHandle {
662
+ return bridged("bumbledb-log codec", function sealCodec() {
663
+ return binding.logCodec(descriptor)
664
+ })
665
+ }
666
+
667
+ /**
668
+ * @internal the braid decomposition + serial-at statement ids, riding
669
+ * the same `DescriptorWire`; the driver caches the result per theory
670
+ * beside the codec handle. Not SDK API.
671
+ */
672
+ function internalLogBraidsOf(descriptor: SealedDescriptor): LogBraids {
673
+ return bridged("bumbledb-log braids", function deriveBraids() {
674
+ return binding.logBraidsOf(descriptor)
675
+ })
676
+ }
677
+
678
+ /** @internal batch encode through the sealed codec. Not SDK API. */
679
+ function internalLogEncodeBatch(
680
+ handle: LogCodecHandle,
681
+ header: LogBatchHeader,
682
+ ops: readonly LogOpIn[]
683
+ ): LogResult<Uint8Array, LogBatchEncodeKind> {
684
+ return bridged("bumbledb-log encode", function encodeBatch() {
685
+ return binding.logEncodeBatch(handle, header, ops)
686
+ })
687
+ }
688
+
689
+ /** @internal batch decode through the sealed codec. Not SDK API. */
690
+ function internalLogDecodeBatch(handle: LogCodecHandle, bytes: Uint8Array): LogResult<LogBatch, LogBatchDecodeKind> {
691
+ return bridged("bumbledb-log decode", function decodeBatch() {
692
+ return binding.logDecodeBatch(handle, bytes)
693
+ })
694
+ }
695
+
696
+ /** @internal manifest document parse — grammar only, no IO. Not SDK API. */
697
+ function internalLogParseManifest(bytes: Uint8Array): LogResult<LogManifestDoc, LogManifestKind> {
698
+ return bridged("bumbledb-log manifest parse", function parseManifest() {
699
+ return binding.logParseManifest(bytes)
700
+ })
701
+ }
702
+
703
+ /** @internal the manifest's one encoding, byte-exact for CAS bodies. Not SDK API. */
704
+ function internalLogRenderManifest(doc: LogManifestDoc): Uint8Array {
705
+ return bridged("bumbledb-log manifest render", function renderManifest() {
706
+ return binding.logRenderManifest(doc)
707
+ })
708
+ }
709
+
710
+ /** @internal checkpoint document parse against the theory's braids. Not SDK API. */
711
+ function internalLogParseCheckpoint(
712
+ handle: LogCodecHandle,
713
+ bytes: Uint8Array
714
+ ): LogResult<LogCheckpointDoc, LogCheckpointKind> {
715
+ return bridged("bumbledb-log checkpoint parse", function parseCheckpoint() {
716
+ return binding.logParseCheckpoint(handle, bytes)
717
+ })
718
+ }
719
+
720
+ /** @internal checkpoint document render. Not SDK API. */
721
+ function internalLogRenderCheckpoint(handle: LogCodecHandle, doc: LogCheckpointDoc): Uint8Array {
722
+ return bridged("bumbledb-log checkpoint render", function renderCheckpoint() {
723
+ return binding.logRenderCheckpoint(handle, doc)
724
+ })
725
+ }
726
+
727
+ /** @internal chain sidecar parse — the fs half stays in the driver. Not SDK API. */
728
+ function internalLogParseSidecar(handle: LogCodecHandle, bytes: Uint8Array): LogResult<LogChain, LogSidecarKind> {
729
+ return bridged("bumbledb-log sidecar parse", function parseSidecar() {
730
+ return binding.logParseSidecar(handle, bytes)
731
+ })
732
+ }
733
+
734
+ /** @internal chain sidecar render. Not SDK API. */
735
+ function internalLogRenderSidecar(handle: LogCodecHandle, chain: LogChain): Uint8Array {
736
+ return bridged("bumbledb-log sidecar render", function renderSidecar() {
737
+ return binding.logRenderSidecar(handle, chain)
738
+ })
739
+ }
740
+
741
+ /**
742
+ * @internal the digest a scratch-lease body names, or null — the refusal
743
+ * is undifferentiated by law. Not SDK API.
744
+ */
745
+ function internalLogParseCkptScratch(bytes: Uint8Array): Uint8Array | null {
746
+ return bridged("bumbledb-log scratch parse", function parseScratch() {
747
+ return binding.logParseCkptScratch(bytes)
748
+ })
749
+ }
750
+
751
+ /** @internal the scratch-lease body: version byte + 32-byte digest. Not SDK API. */
752
+ function internalLogRenderCkptScratch(digest: Uint8Array): Uint8Array {
753
+ return bridged("bumbledb-log scratch render", function renderScratch() {
754
+ return binding.logRenderCkptScratch(digest)
755
+ })
756
+ }
757
+
471
758
  function isEngineThrow(value: unknown): value is { kind: ErrorFamilyKind; message: string } {
472
759
  if (typeof value !== "object" || value === null) {
473
760
  return false
@@ -516,34 +803,43 @@ export type {
516
803
  CmpOpIr,
517
804
  ComparisonIr,
518
805
  ConditionTreeIr,
519
- CreateResult,
520
806
  DbHandle,
521
- DbOpenResult,
522
807
  ErrorFamilyKind,
523
808
  FactValue,
524
809
  FindTermIr,
525
- FoldOpIr,
526
810
  HeadOpIr,
527
811
  HeadTermIr,
528
812
  InstanceHandle,
529
- InteriorIr,
530
813
  IntervalValue,
814
+ LogBatch,
815
+ LogBatchDecodeKind,
816
+ LogBatchEncodeKind,
817
+ LogBatchHeader,
818
+ LogBraidComponent,
819
+ LogBraids,
820
+ LogChain,
821
+ LogChainEntry,
822
+ LogCheckpointDoc,
823
+ LogCheckpointHead,
824
+ LogCheckpointKind,
825
+ LogCodecHandle,
826
+ LogManifestDoc,
827
+ LogManifestKind,
828
+ LogOpIn,
829
+ LogOpKind,
830
+ LogOpOut,
831
+ LogPendingBatch,
832
+ LogResult,
833
+ LogSidecarKind,
531
834
  Manifest,
532
- ManifestField,
533
- ManifestRelation,
534
- ManifestRow,
535
- ManifestStatement,
536
- Native,
537
835
  NativeWriteOutcome,
538
836
  OpenKind,
539
837
  OwnedHandle,
540
838
  ParsedQuery,
541
839
  PreparedHandle,
542
840
  PrepareKind,
543
- PrepareResult,
544
841
  QueryIr,
545
842
  QueryParam,
546
- RecIr,
547
843
  RuleIr,
548
844
  SealedDescriptor,
549
845
  SealedHi,
@@ -568,6 +864,18 @@ export {
568
864
  errorFromThrow,
569
865
  internalBlake3,
570
866
  internalDescriptor,
867
+ internalLogBraidsOf,
868
+ internalLogCodec,
869
+ internalLogDecodeBatch,
870
+ internalLogEncodeBatch,
871
+ internalLogParseCheckpoint,
872
+ internalLogParseCkptScratch,
873
+ internalLogParseManifest,
874
+ internalLogParseSidecar,
875
+ internalLogRenderCheckpoint,
876
+ internalLogRenderCkptScratch,
877
+ internalLogRenderManifest,
878
+ internalLogRenderSidecar,
571
879
  loadNativeBinding,
572
880
  native,
573
881
  SHIPPED_PLATFORMS
package/src/query/atom.ts CHANGED
@@ -545,15 +545,10 @@ type CondParamsShape<C> = ShapeOf<CondParams<C>>
545
545
 
546
546
  export type {
547
547
  AggData,
548
- AnyCmp,
549
548
  AnyCond,
550
- AnyNotAtom,
551
- AnyTreeChild,
552
549
  AtomData,
553
550
  BindingEntry,
554
551
  BindingInput,
555
- BindingTermData,
556
- BindParams,
557
552
  BindParamsShape,
558
553
  CheckBindings,
559
554
  CheckCond,
@@ -562,31 +557,23 @@ export type {
562
557
  CmpKind,
563
558
  CmpTermData,
564
559
  CondData,
565
- CondOkBool,
566
- CondParams,
567
560
  CondParamsShape,
568
561
  DerivedTable,
569
562
  FindColumn,
570
563
  FindEntryData,
571
564
  InteriorData,
572
- IntervalSide,
573
565
  IntervalVarOk,
574
566
  MatchFields,
575
567
  MatchOwner,
576
568
  MatchShape,
577
569
  NotAtom,
578
- NotInteriorAtom,
579
570
  NumericVarOk,
580
- OrderSide,
581
571
  ParamUse,
582
- PointSide,
583
572
  RecData,
584
573
  RecHandle,
585
574
  RecHead,
586
575
  RuleData,
587
576
  RuleItem,
588
- SlotAt,
589
- Tree,
590
- TreeData
577
+ Tree
591
578
  }
592
- export { ALLEN, ALLEN_ALL_BITS, allen, and, comparison, eq, ge, gt, le, lt, ne, not, or, pointIn }
579
+ export { ALLEN, allen, and, comparison, eq, ge, gt, le, lt, ne, not, or, pointIn }
package/src/query/find.ts CHANGED
@@ -4,7 +4,6 @@ import type { IntervalVarOk, NumericVarOk } from "#query/atom.ts"
4
4
  import type { AnyVar, MintSlotOf } from "#query/scope.ts"
5
5
 
6
6
  type FoldOpName = "sum" | "min" | "max" | "pack"
7
- type AggOpName = "count" | FoldOpName
8
7
 
9
8
  interface CountAgg {
10
9
  readonly agg: "count"
@@ -90,19 +89,5 @@ type HeadRecordOf<Classes extends SchemaClasses, F extends FindShape> = {
90
89
  readonly [K in keyof F]: F[K] extends AnyVar ? MintSlotOf<Classes, F[K]> : never
91
90
  }
92
91
 
93
- export type {
94
- Agg,
95
- AggOpName,
96
- AnyAgg,
97
- CheckFind,
98
- CheckRecFind,
99
- CountAgg,
100
- FindEntry,
101
- FindEntryOk,
102
- FindShape,
103
- FindValue,
104
- FoldOpName,
105
- HeadRecordOf,
106
- RowOfFind
107
- }
92
+ export type { Agg, CheckFind, CheckRecFind, FindEntry, FindShape, HeadRecordOf, RowOfFind }
108
93
  export { count, max, min, pack, sum }