@bjornpagen/bumbledb 0.20.2 → 1.0.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.
- package/COOKBOOK.md +283 -1611
- package/README.md +156 -118
- package/dist/capacity.d.ts +16 -12
- package/dist/capacity.d.ts.map +1 -1
- package/dist/capacity.js +16 -48
- package/dist/capacity.js.map +1 -1
- package/dist/changes.d.ts +54 -0
- package/dist/changes.d.ts.map +1 -0
- package/dist/changes.js +245 -0
- package/dist/changes.js.map +1 -0
- package/dist/close.d.ts +24 -0
- package/dist/close.d.ts.map +1 -0
- package/dist/close.js +34 -0
- package/dist/close.js.map +1 -0
- package/dist/closed.d.ts +1 -3
- package/dist/closed.d.ts.map +1 -1
- package/dist/closed.js +24 -12
- package/dist/closed.js.map +1 -1
- package/dist/codec.d.ts +56 -0
- package/dist/codec.d.ts.map +1 -0
- package/dist/codec.js +289 -0
- package/dist/codec.js.map +1 -0
- package/dist/compile.d.ts +68 -0
- package/dist/compile.d.ts.map +1 -0
- package/dist/compile.js +75 -0
- package/dist/compile.js.map +1 -0
- package/dist/db-native.d.ts +170 -0
- package/dist/db-native.d.ts.map +1 -0
- package/dist/db-native.js +5 -0
- package/dist/db-native.js.map +1 -0
- package/dist/db.d.ts +101 -233
- package/dist/db.d.ts.map +1 -1
- package/dist/db.js +232 -1084
- package/dist/db.js.map +1 -1
- package/dist/errors.d.ts +57 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +32 -0
- package/dist/errors.js.map +1 -0
- package/dist/face.d.ts.map +1 -1
- package/dist/face.js +2 -2
- package/dist/face.js.map +1 -1
- package/dist/fields.d.ts +65 -24
- package/dist/fields.d.ts.map +1 -1
- package/dist/fields.js +94 -24
- package/dist/fields.js.map +1 -1
- package/dist/index.d.ts +37 -32
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +17 -21
- package/dist/index.js.map +1 -1
- package/dist/internal/log.d.ts +24 -0
- package/dist/internal/log.d.ts.map +1 -0
- package/dist/internal/log.js +10 -0
- package/dist/internal/log.js.map +1 -0
- package/dist/law.d.ts +8 -13
- package/dist/law.d.ts.map +1 -1
- package/dist/law.js +6 -59
- package/dist/law.js.map +1 -1
- package/dist/lower.d.ts +0 -13
- package/dist/lower.d.ts.map +1 -1
- package/dist/lower.js +9 -17
- package/dist/lower.js.map +1 -1
- package/dist/migration.d.ts +33 -0
- package/dist/migration.d.ts.map +1 -0
- package/dist/migration.js +48 -0
- package/dist/migration.js.map +1 -0
- package/dist/native.d.ts +256 -301
- package/dist/native.d.ts.map +1 -1
- package/dist/native.js +65 -108
- package/dist/native.js.map +1 -1
- package/dist/query/atom.d.ts +24 -13
- package/dist/query/atom.d.ts.map +1 -1
- package/dist/query/atom.js +7 -3
- package/dist/query/atom.js.map +1 -1
- package/dist/query/compute.d.ts +68 -0
- package/dist/query/compute.d.ts.map +1 -0
- package/dist/query/compute.js +141 -0
- package/dist/query/compute.js.map +1 -0
- package/dist/query/find.d.ts +15 -8
- package/dist/query/find.d.ts.map +1 -1
- package/dist/query/find.js +6 -2
- package/dist/query/find.js.map +1 -1
- package/dist/query/lower.d.ts +23 -2
- package/dist/query/lower.d.ts.map +1 -1
- package/dist/query/lower.js +433 -80
- package/dist/query/lower.js.map +1 -1
- package/dist/query/parse-ir.d.ts.map +1 -1
- package/dist/query/parse-ir.js +17 -8
- package/dist/query/parse-ir.js.map +1 -1
- package/dist/query/run.d.ts +12 -2
- package/dist/query/run.d.ts.map +1 -1
- package/dist/query/run.js +26 -9
- package/dist/query/run.js.map +1 -1
- package/dist/query/scope.d.ts +47 -3
- package/dist/query/scope.d.ts.map +1 -1
- package/dist/query/scope.js +83 -19
- package/dist/query/scope.js.map +1 -1
- package/dist/relation.d.ts +3 -8
- package/dist/relation.d.ts.map +1 -1
- package/dist/relation.js +16 -10
- package/dist/relation.js.map +1 -1
- package/dist/result.d.ts +47 -0
- package/dist/result.d.ts.map +1 -0
- package/dist/result.js +50 -0
- package/dist/result.js.map +1 -0
- package/dist/rows.d.ts +69 -0
- package/dist/rows.d.ts.map +1 -0
- package/dist/rows.js +328 -0
- package/dist/rows.js.map +1 -0
- package/dist/runtime-codes.d.ts +2 -0
- package/dist/runtime-codes.d.ts.map +1 -0
- package/dist/runtime-codes.js +19 -0
- package/dist/runtime-codes.js.map +1 -0
- package/dist/runtime-errors.d.ts +106 -0
- package/dist/runtime-errors.d.ts.map +1 -0
- package/dist/runtime-errors.js +62 -0
- package/dist/runtime-errors.js.map +1 -0
- package/dist/runtime-native.d.ts +171 -0
- package/dist/runtime-native.d.ts.map +1 -0
- package/dist/runtime-native.js +5 -0
- package/dist/runtime-native.js.map +1 -0
- package/dist/runtime.d.ts +73 -0
- package/dist/runtime.d.ts.map +1 -0
- package/dist/runtime.js +293 -0
- package/dist/runtime.js.map +1 -0
- package/dist/scalar.d.ts +165 -0
- package/dist/scalar.d.ts.map +1 -0
- package/dist/scalar.js +344 -0
- package/dist/scalar.js.map +1 -0
- package/dist/schema.d.ts +1 -1
- package/dist/schema.d.ts.map +1 -1
- package/dist/schema.js +34 -37
- package/dist/schema.js.map +1 -1
- package/dist/shape.d.ts +28 -0
- package/dist/shape.d.ts.map +1 -0
- package/dist/shape.js +2 -0
- package/dist/shape.js.map +1 -0
- package/dist/spec.d.ts +27 -3
- package/dist/spec.d.ts.map +1 -1
- package/dist/spec.js +22 -1
- package/dist/spec.js.map +1 -1
- package/dist/statements.d.ts +16 -3
- package/dist/statements.d.ts.map +1 -1
- package/dist/statements.js +54 -28
- package/dist/statements.js.map +1 -1
- package/dist/uuid.d.ts +23 -0
- package/dist/uuid.d.ts.map +1 -0
- package/dist/uuid.js +54 -0
- package/dist/uuid.js.map +1 -0
- package/pack-provenance.json +7 -0
- package/package.json +12 -16
- package/src/capacity.ts +34 -54
- package/src/changes.ts +361 -0
- package/src/close.ts +53 -0
- package/src/closed.ts +25 -19
- package/src/codec.ts +379 -0
- package/src/compile.ts +149 -0
- package/src/db-native.ts +247 -0
- package/src/db.ts +461 -1632
- package/src/errors.ts +50 -0
- package/src/face.ts +2 -2
- package/src/fields.ts +182 -55
- package/src/index.ts +62 -126
- package/src/internal/log.ts +51 -0
- package/src/law.ts +13 -28
- package/src/lower.ts +9 -4
- package/src/migration.ts +69 -0
- package/src/native.ts +326 -487
- package/src/query/atom.ts +61 -25
- package/src/query/compute.ts +237 -0
- package/src/query/find.ts +31 -12
- package/src/query/lower.ts +531 -143
- package/src/query/parse-ir.ts +18 -13
- package/src/query/run.ts +32 -16
- package/src/query/scope.ts +140 -8
- package/src/relation.ts +17 -21
- package/src/result.ts +130 -0
- package/src/rows.ts +404 -0
- package/src/runtime-codes.ts +18 -0
- package/src/runtime-errors.ts +69 -0
- package/src/runtime-native.ts +242 -0
- package/src/runtime.ts +440 -0
- package/src/scalar.ts +560 -0
- package/src/schema.ts +35 -37
- package/src/shape.ts +31 -0
- package/src/spec.ts +33 -3
- package/src/statements.ts +75 -68
- package/src/uuid.ts +69 -0
- package/dist/marshal.d.ts +0 -44
- package/dist/marshal.d.ts.map +0 -1
- package/dist/marshal.js +0 -165
- package/dist/marshal.js.map +0 -1
- package/src/marshal.ts +0 -200
package/dist/native.d.ts
CHANGED
|
@@ -1,50 +1,42 @@
|
|
|
1
1
|
import type { SchemaSpec, ValueSpec, ValueTypeSpec } from "./spec.js";
|
|
2
|
-
/**
|
|
2
|
+
/**
|
|
3
|
+
* The opaque managed database capability. The native runtime registry —
|
|
4
|
+
* not this wrapper — owns the LMDB environment, the kernel directory
|
|
5
|
+
* lock and every session; a retained wrapper after a completed close is
|
|
6
|
+
* inert. Minted only by the managed handshake
|
|
7
|
+
* (`runtimeDirectoryDbOpen` → `runtimeDbTake` in #runtime-native.ts).
|
|
8
|
+
*/
|
|
3
9
|
type DbHandle = {
|
|
4
10
|
readonly __brand: "bumbledb.db";
|
|
5
11
|
};
|
|
6
|
-
|
|
7
|
-
readonly __brand: "bumbledb.instance";
|
|
8
|
-
};
|
|
9
|
-
type WitnessHandle = {
|
|
10
|
-
readonly __brand: "bumbledb.witness";
|
|
11
|
-
};
|
|
12
|
-
type BuilderHandle = {
|
|
13
|
-
readonly __brand: "bumbledb.builder";
|
|
14
|
-
};
|
|
15
|
-
type OwnedHandle = {
|
|
16
|
-
readonly __brand: "bumbledb.owned";
|
|
17
|
-
};
|
|
18
|
-
type TxHandle = {
|
|
19
|
-
readonly __brand: "bumbledb.tx";
|
|
20
|
-
};
|
|
21
|
-
type PreparedHandle = {
|
|
22
|
-
readonly __brand: "bumbledb.prepared";
|
|
23
|
-
};
|
|
12
|
+
/** Admitted owned instance attached through directory publish — not a JS builder. */
|
|
24
13
|
/**
|
|
25
|
-
* The sealed per-theory log
|
|
26
|
-
*
|
|
27
|
-
*
|
|
14
|
+
* The sealed per-theory log schema (`crates/bumbledb-log` successor
|
|
15
|
+
* lanes): the validated core schema plus its fingerprint, shared by the
|
|
16
|
+
* command/decision grammar. Immutable plain data; no lifecycle verbs.
|
|
28
17
|
*/
|
|
29
|
-
type
|
|
30
|
-
readonly __brand: "bumbledb.
|
|
31
|
-
};
|
|
32
|
-
interface WireMutationReport {
|
|
33
|
-
readonly submitted: bigint;
|
|
34
|
-
readonly changed: bigint;
|
|
35
|
-
}
|
|
36
|
-
type WireFreshRange = {
|
|
37
|
-
readonly empty: true;
|
|
38
|
-
} | {
|
|
39
|
-
readonly empty: false;
|
|
40
|
-
readonly start: bigint;
|
|
41
|
-
readonly endExclusive: bigint;
|
|
18
|
+
type LogSchemaHandle = {
|
|
19
|
+
readonly __brand: "bumbledb.logSchema";
|
|
42
20
|
};
|
|
21
|
+
/** A discrete half-open interval `[start, end)` over u64/i64. */
|
|
43
22
|
interface IntervalValue {
|
|
44
23
|
readonly start: bigint;
|
|
45
24
|
readonly end: bigint;
|
|
46
25
|
}
|
|
47
|
-
|
|
26
|
+
/**
|
|
27
|
+
* A dense-line half-open interval with canonical binary64 endpoints:
|
|
28
|
+
* NaN-free, strictly ordered; ±Infinity are unbounded endpoints.
|
|
29
|
+
*/
|
|
30
|
+
interface F64IntervalValue {
|
|
31
|
+
readonly start: number;
|
|
32
|
+
readonly end: number;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* One marshalled cell. An application-owned Uuid crosses as its
|
|
36
|
+
* canonical hyphenated UUID string (chapter 32); there is no fresh
|
|
37
|
+
* range, reservation counter or issuance value anywhere on this wire.
|
|
38
|
+
*/
|
|
39
|
+
type FactValue = boolean | bigint | number | string | Uint8Array | IntervalValue | F64IntervalValue;
|
|
48
40
|
type TaggedValue = ValueSpec;
|
|
49
41
|
type QueryParam = TaggedValue | {
|
|
50
42
|
readonly kind: "set";
|
|
@@ -73,11 +65,56 @@ interface RecIr {
|
|
|
73
65
|
}
|
|
74
66
|
type HeadTermIr = {
|
|
75
67
|
readonly kind: "var";
|
|
68
|
+
} | {
|
|
69
|
+
readonly kind: "compute";
|
|
76
70
|
} | {
|
|
77
71
|
readonly kind: "aggregate";
|
|
78
72
|
readonly op: HeadOpIr;
|
|
79
73
|
};
|
|
80
|
-
type HeadOpIr = "sum" | "min" | "max" | "count" | "pack";
|
|
74
|
+
type HeadOpIr = "sum" | "mean" | "min" | "max" | "count" | "pack";
|
|
75
|
+
/**
|
|
76
|
+
* The computed-find scalar expression (C05 `FindTerm::Compute(ScalarExpr)`):
|
|
77
|
+
* exactly the frozen core roster, spelled as the migration plan JSON spells
|
|
78
|
+
* the same expressions (one grammar, no second evaluator). `var` binds a
|
|
79
|
+
* rule variable ordinal on this lane.
|
|
80
|
+
*/
|
|
81
|
+
type NumericCastIr = "toF64" | "toF64Exact" | "toI64Exact" | "toU64Exact";
|
|
82
|
+
type ScalarExprIr = {
|
|
83
|
+
readonly kind: "var";
|
|
84
|
+
readonly var: number;
|
|
85
|
+
} | {
|
|
86
|
+
readonly kind: "literal";
|
|
87
|
+
readonly value: TaggedValue;
|
|
88
|
+
} | {
|
|
89
|
+
readonly kind: "negate";
|
|
90
|
+
readonly expr: ScalarExprIr;
|
|
91
|
+
} | {
|
|
92
|
+
readonly kind: "add";
|
|
93
|
+
readonly left: ScalarExprIr;
|
|
94
|
+
readonly right: ScalarExprIr;
|
|
95
|
+
} | {
|
|
96
|
+
readonly kind: "subtract";
|
|
97
|
+
readonly left: ScalarExprIr;
|
|
98
|
+
readonly right: ScalarExprIr;
|
|
99
|
+
} | {
|
|
100
|
+
readonly kind: "multiply";
|
|
101
|
+
readonly left: ScalarExprIr;
|
|
102
|
+
readonly right: ScalarExprIr;
|
|
103
|
+
} | {
|
|
104
|
+
readonly kind: "divide";
|
|
105
|
+
readonly left: ScalarExprIr;
|
|
106
|
+
readonly right: ScalarExprIr;
|
|
107
|
+
} | {
|
|
108
|
+
readonly kind: "cast";
|
|
109
|
+
readonly cast: NumericCastIr;
|
|
110
|
+
readonly expr: ScalarExprIr;
|
|
111
|
+
} | {
|
|
112
|
+
readonly kind: "isNaN";
|
|
113
|
+
readonly expr: ScalarExprIr;
|
|
114
|
+
} | {
|
|
115
|
+
readonly kind: "isFinite";
|
|
116
|
+
readonly expr: ScalarExprIr;
|
|
117
|
+
};
|
|
81
118
|
interface RuleIr {
|
|
82
119
|
readonly finds: readonly FindTermIr[];
|
|
83
120
|
readonly atoms: readonly AtomIr[];
|
|
@@ -86,6 +123,8 @@ interface RuleIr {
|
|
|
86
123
|
}
|
|
87
124
|
type FoldOpIr = {
|
|
88
125
|
readonly kind: "sum";
|
|
126
|
+
} | {
|
|
127
|
+
readonly kind: "mean";
|
|
89
128
|
} | {
|
|
90
129
|
readonly kind: "min";
|
|
91
130
|
} | {
|
|
@@ -94,6 +133,9 @@ type FoldOpIr = {
|
|
|
94
133
|
type FindTermIr = {
|
|
95
134
|
readonly kind: "var";
|
|
96
135
|
readonly var: number;
|
|
136
|
+
} | {
|
|
137
|
+
readonly kind: "compute";
|
|
138
|
+
readonly expr: ScalarExprIr;
|
|
97
139
|
} | {
|
|
98
140
|
readonly kind: "count";
|
|
99
141
|
} | {
|
|
@@ -110,6 +152,8 @@ type ParsedQuery = QueryIr & {
|
|
|
110
152
|
};
|
|
111
153
|
type AggOpIr = {
|
|
112
154
|
readonly kind: "sum";
|
|
155
|
+
} | {
|
|
156
|
+
readonly kind: "mean";
|
|
113
157
|
} | {
|
|
114
158
|
readonly kind: "min";
|
|
115
159
|
} | {
|
|
@@ -178,9 +222,9 @@ type ConditionTreeIr = {
|
|
|
178
222
|
};
|
|
179
223
|
type StatementKindTag = "functionality" | "containment" | "capacity";
|
|
180
224
|
/**
|
|
181
|
-
* A
|
|
182
|
-
*
|
|
183
|
-
*
|
|
225
|
+
* A grammar lane's domain outcome: the payload, or a refusal row whose
|
|
226
|
+
* `kind` is an identity string spelled exactly as `bumbledb-log`'s
|
|
227
|
+
* identities emitter spells it (`logIdentities()` / log-identities.json).
|
|
184
228
|
*/
|
|
185
229
|
type LogResult<T, K extends string> = {
|
|
186
230
|
readonly ok: true;
|
|
@@ -190,98 +234,155 @@ type LogResult<T, K extends string> = {
|
|
|
190
234
|
readonly kind: K;
|
|
191
235
|
readonly message: string;
|
|
192
236
|
};
|
|
193
|
-
/** `
|
|
194
|
-
type
|
|
195
|
-
/**
|
|
196
|
-
type
|
|
197
|
-
/**
|
|
198
|
-
type
|
|
199
|
-
/**
|
|
200
|
-
type
|
|
201
|
-
/**
|
|
202
|
-
|
|
203
|
-
/**
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
interface LogBatchHeader {
|
|
209
|
-
readonly braid: number;
|
|
210
|
-
readonly braidGen: bigint;
|
|
211
|
-
readonly prev: Uint8Array;
|
|
212
|
-
readonly writer: bigint;
|
|
213
|
-
readonly timestamp: bigint;
|
|
214
|
-
}
|
|
215
|
-
type LogOpKind = "insert" | "delete";
|
|
216
|
-
/**
|
|
217
|
-
* One op inbound to `logEncodeBatch`: rows carry TAGGED values (the
|
|
218
|
-
* query-literal lane's inbound spelling) so the bridge stays layout-blind
|
|
219
|
-
* and the codec core is the one judge of every cell.
|
|
220
|
-
*/
|
|
221
|
-
interface LogOpIn {
|
|
222
|
-
readonly kind: LogOpKind;
|
|
223
|
-
readonly relation: number;
|
|
224
|
-
readonly rows: ReadonlyArray<readonly TaggedValue[]>;
|
|
225
|
-
}
|
|
226
|
-
/** One decoded op: rows cross exactly as the engine's `ValueOut` walk. */
|
|
227
|
-
interface LogOpOut {
|
|
228
|
-
readonly kind: LogOpKind;
|
|
229
|
-
readonly relation: number;
|
|
230
|
-
readonly rows: FactValue[][];
|
|
237
|
+
/** `FrameError` kinds (the `frame` identity family). */
|
|
238
|
+
type LogFrameKind = "limitExceeded" | "lengthOverflow" | "allocation" | "truncated" | "family" | "layout" | "kind" | "tag" | "invalidEpoch" | "stateIdentityMismatch" | "emptyChangeSummary" | "emptyEvidence" | "invalidTerminalStamp" | "invalidPreconditionEvidence" | "invalidPolicy" | "invalidSequence" | "invalidCount" | "trailingBytes";
|
|
239
|
+
/** Receipt-row kinds: the frame family plus the foreign-scope refusal. */
|
|
240
|
+
type LogReceiptKind = LogFrameKind | "foreignRow";
|
|
241
|
+
/** Command-lane kinds: frame family plus the two command-only arms. */
|
|
242
|
+
type LogCommandKind = LogFrameKind | "core" | "schemaMismatch";
|
|
243
|
+
/** Chain-step refusals from the decode-and-verify lane. */
|
|
244
|
+
type LogChainKind = "wrongParent" | "wrongSequence";
|
|
245
|
+
/** The complete database scope of every command/receipt/decision. */
|
|
246
|
+
interface LogIdentity {
|
|
247
|
+
/** Application-owned Uuid, canonical hyphenated UUID. */
|
|
248
|
+
readonly databaseId: string;
|
|
249
|
+
readonly incarnationId: string;
|
|
250
|
+
/** The core schema fingerprint, 64 lowercase hex characters. */
|
|
251
|
+
readonly schemaId: string;
|
|
231
252
|
}
|
|
232
|
-
interface
|
|
233
|
-
readonly
|
|
234
|
-
readonly
|
|
253
|
+
interface LogStateStamp {
|
|
254
|
+
readonly incarnation: string;
|
|
255
|
+
readonly dataRevision: bigint;
|
|
235
256
|
}
|
|
236
|
-
interface
|
|
237
|
-
readonly
|
|
238
|
-
readonly
|
|
257
|
+
interface LogDecisionStamp {
|
|
258
|
+
readonly seq: bigint;
|
|
259
|
+
readonly hash: Uint8Array;
|
|
239
260
|
}
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
readonly
|
|
261
|
+
type LogCondition = {
|
|
262
|
+
readonly kind: "unconditional";
|
|
263
|
+
} | {
|
|
264
|
+
readonly kind: "exactState";
|
|
265
|
+
readonly state: LogStateStamp;
|
|
266
|
+
};
|
|
267
|
+
interface LogCommandId {
|
|
268
|
+
readonly receiptEpoch: bigint;
|
|
269
|
+
readonly requestId: string;
|
|
244
270
|
}
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
readonly
|
|
248
|
-
readonly
|
|
271
|
+
interface LogCommandMetadata {
|
|
272
|
+
readonly identity: LogIdentity;
|
|
273
|
+
readonly id: LogCommandId;
|
|
274
|
+
readonly condition: LogCondition;
|
|
249
275
|
}
|
|
250
|
-
interface
|
|
251
|
-
readonly
|
|
252
|
-
readonly
|
|
253
|
-
readonly
|
|
254
|
-
readonly
|
|
276
|
+
interface LogCommandRef {
|
|
277
|
+
readonly identity: LogIdentity;
|
|
278
|
+
readonly receiptEpoch: bigint;
|
|
279
|
+
readonly requestId: string;
|
|
280
|
+
readonly digest: Uint8Array;
|
|
255
281
|
}
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
readonly
|
|
259
|
-
readonly
|
|
260
|
-
readonly
|
|
261
|
-
|
|
282
|
+
type LogOutcomeWire = {
|
|
283
|
+
readonly kind: "committed";
|
|
284
|
+
readonly added: bigint;
|
|
285
|
+
readonly removed: bigint;
|
|
286
|
+
readonly result?: Uint8Array;
|
|
287
|
+
} | {
|
|
288
|
+
readonly kind: "noChange";
|
|
289
|
+
readonly result?: Uint8Array;
|
|
290
|
+
} | {
|
|
291
|
+
readonly kind: "preconditionFailed";
|
|
292
|
+
readonly expected: LogStateStamp;
|
|
293
|
+
readonly observed: LogStateStamp;
|
|
294
|
+
} | {
|
|
295
|
+
readonly kind: "invariantRejected";
|
|
296
|
+
readonly evidence: Uint8Array;
|
|
297
|
+
};
|
|
298
|
+
interface LogReceipt {
|
|
299
|
+
readonly command: LogCommandRef;
|
|
300
|
+
readonly decisionAt: LogDecisionStamp;
|
|
301
|
+
readonly stateAt: LogStateStamp;
|
|
302
|
+
readonly outcome: LogOutcomeWire;
|
|
262
303
|
}
|
|
263
|
-
interface
|
|
264
|
-
readonly
|
|
265
|
-
readonly
|
|
266
|
-
readonly
|
|
267
|
-
readonly
|
|
304
|
+
interface LogLimits {
|
|
305
|
+
readonly envelopeBytes: bigint;
|
|
306
|
+
readonly changeBytes: bigint;
|
|
307
|
+
readonly evidenceBytes: bigint;
|
|
308
|
+
readonly resultBytes: bigint;
|
|
268
309
|
}
|
|
269
|
-
|
|
270
|
-
readonly
|
|
271
|
-
|
|
272
|
-
readonly
|
|
310
|
+
type LogAccess = {
|
|
311
|
+
readonly kind: "active";
|
|
312
|
+
} | {
|
|
313
|
+
readonly kind: "frozen";
|
|
314
|
+
readonly operation: string;
|
|
315
|
+
readonly intent: {
|
|
316
|
+
readonly kind: "erasure";
|
|
317
|
+
} | {
|
|
318
|
+
readonly kind: "migration";
|
|
319
|
+
readonly planSetDigest: Uint8Array;
|
|
320
|
+
readonly target: string;
|
|
321
|
+
};
|
|
322
|
+
};
|
|
323
|
+
type LogLifecycle = {
|
|
324
|
+
readonly kind: "live";
|
|
325
|
+
readonly access: LogAccess;
|
|
326
|
+
readonly decision: LogDecisionStamp;
|
|
327
|
+
readonly state: LogStateStamp;
|
|
328
|
+
readonly receipts: {
|
|
329
|
+
readonly openEpoch: bigint;
|
|
330
|
+
readonly retiredThrough: bigint;
|
|
331
|
+
};
|
|
332
|
+
} | {
|
|
333
|
+
readonly kind: "deleted";
|
|
334
|
+
readonly operation: string;
|
|
335
|
+
readonly reason: {
|
|
336
|
+
readonly kind: "erasure";
|
|
337
|
+
} | {
|
|
338
|
+
readonly kind: "migrationAborted";
|
|
339
|
+
readonly sourceDatabase: string;
|
|
340
|
+
readonly sourceIncarnation: string;
|
|
341
|
+
readonly planSetDigest: Uint8Array;
|
|
342
|
+
};
|
|
343
|
+
};
|
|
344
|
+
type LogActivation = {
|
|
345
|
+
readonly kind: "notActivated";
|
|
346
|
+
} | {
|
|
347
|
+
readonly kind: "activated";
|
|
348
|
+
readonly operation: string;
|
|
349
|
+
readonly targetGenesis: Uint8Array;
|
|
350
|
+
readonly cause: {
|
|
351
|
+
readonly kind: "create";
|
|
352
|
+
} | {
|
|
353
|
+
readonly kind: "restore";
|
|
354
|
+
} | {
|
|
355
|
+
readonly kind: "migration";
|
|
356
|
+
readonly planSetDigest: Uint8Array;
|
|
357
|
+
};
|
|
358
|
+
};
|
|
359
|
+
interface LogAuthority {
|
|
360
|
+
readonly identity: LogIdentity;
|
|
361
|
+
readonly revision: bigint;
|
|
362
|
+
readonly lifecycle: LogLifecycle;
|
|
363
|
+
readonly activation: LogActivation;
|
|
273
364
|
}
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
readonly
|
|
365
|
+
type LogGenesisProvenance = {
|
|
366
|
+
readonly kind: "create";
|
|
367
|
+
} | {
|
|
368
|
+
readonly kind: "restore";
|
|
369
|
+
readonly sourceEvidence: Uint8Array;
|
|
370
|
+
} | {
|
|
371
|
+
readonly kind: "migration";
|
|
372
|
+
readonly sourceDatabase: string;
|
|
373
|
+
readonly sourceIncarnation: string;
|
|
374
|
+
readonly planSetDigest: Uint8Array;
|
|
375
|
+
};
|
|
376
|
+
interface LogGenesis {
|
|
377
|
+
readonly identity: LogIdentity;
|
|
378
|
+
readonly initialApplicationDigest: Uint8Array;
|
|
379
|
+
readonly initialSystemDigest: Uint8Array;
|
|
380
|
+
readonly provenance: LogGenesisProvenance;
|
|
278
381
|
}
|
|
279
382
|
interface ManifestField {
|
|
280
383
|
readonly name: string;
|
|
281
384
|
readonly id: number;
|
|
282
385
|
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
386
|
/** 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
387
|
readonly newtype?: string;
|
|
287
388
|
}
|
|
@@ -299,15 +400,6 @@ interface ManifestRelation {
|
|
|
299
400
|
readonly fields: readonly ManifestField[];
|
|
300
401
|
readonly extension?: readonly ManifestRow[];
|
|
301
402
|
}
|
|
302
|
-
interface ManifestStatement {
|
|
303
|
-
readonly id: number;
|
|
304
|
-
readonly kind: StatementKindTag;
|
|
305
|
-
readonly spelling: string;
|
|
306
|
-
}
|
|
307
|
-
interface Manifest {
|
|
308
|
-
readonly relations: readonly ManifestRelation[];
|
|
309
|
-
readonly statements: readonly ManifestStatement[];
|
|
310
|
-
}
|
|
311
403
|
interface SealedSide {
|
|
312
404
|
readonly relation: number;
|
|
313
405
|
readonly projection: readonly number[];
|
|
@@ -386,159 +478,48 @@ type Violation = {
|
|
|
386
478
|
readonly measure: bigint;
|
|
387
479
|
readonly facts: readonly ViolationFact[];
|
|
388
480
|
};
|
|
389
|
-
type
|
|
390
|
-
readonly tag: "accepted";
|
|
391
|
-
readonly db: DbHandle;
|
|
392
|
-
} | {
|
|
393
|
-
readonly tag: "rejected";
|
|
394
|
-
readonly violations: readonly Violation[];
|
|
395
|
-
} | {
|
|
396
|
-
readonly tag: "schemaError";
|
|
397
|
-
readonly message: string;
|
|
398
|
-
} | {
|
|
399
|
-
readonly tag: "newtypeMismatch";
|
|
400
|
-
readonly message: string;
|
|
401
|
-
};
|
|
402
|
-
/**
|
|
403
|
-
* `dbOpen`'s domain outcome. `schemaError` spans both spec
|
|
404
|
-
* resolution (unresolvable names, banned spellings — every issue in one
|
|
405
|
-
* message) and schema validation at the declaration boundary;
|
|
406
|
-
* `newtypeMismatch` is the coherence wall's own kind; `fingerprintMismatch`
|
|
407
|
-
* is `dbOpen`'s stored-theory refusal.
|
|
408
|
-
*/
|
|
409
|
-
type DbOpenResult = {
|
|
410
|
-
readonly ok: true;
|
|
411
|
-
readonly db: DbHandle;
|
|
412
|
-
} | {
|
|
413
|
-
readonly ok: false;
|
|
414
|
-
readonly kind: "schemaError" | "newtypeMismatch" | "fingerprintMismatch";
|
|
415
|
-
readonly message: string;
|
|
416
|
-
};
|
|
417
|
-
type NativeWriteOutcome = {
|
|
418
|
-
readonly tag: "accepted";
|
|
419
|
-
readonly generation: bigint;
|
|
420
|
-
} | {
|
|
421
|
-
readonly tag: "rejected";
|
|
422
|
-
readonly violations: readonly Violation[];
|
|
423
|
-
} | {
|
|
424
|
-
readonly tag: "abandoned";
|
|
425
|
-
} | {
|
|
426
|
-
readonly tag: "moved";
|
|
427
|
-
readonly witnessed: bigint;
|
|
428
|
-
readonly current: bigint;
|
|
429
|
-
};
|
|
430
|
-
type AdmitResult = {
|
|
431
|
-
readonly tag: "accepted";
|
|
432
|
-
readonly value: OwnedHandle;
|
|
433
|
-
} | {
|
|
434
|
-
readonly tag: "rejected";
|
|
435
|
-
readonly violations: readonly Violation[];
|
|
436
|
-
};
|
|
437
|
-
type PrepareResult = {
|
|
438
|
-
readonly ok: true;
|
|
439
|
-
readonly prepared: PreparedHandle;
|
|
440
|
-
} | {
|
|
441
|
-
readonly ok: false;
|
|
442
|
-
readonly kind: "irError";
|
|
443
|
-
readonly message: string;
|
|
444
|
-
};
|
|
445
|
-
type ErrorFamilyKind = "formatMismatch" | "schemaMismatch" | "alreadyInitialized" | "destinationExists" | "publishedButUnsynced" | "environmentLocked" | "io" | "lmdb" | "readersFull" | "schema" | "validation" | "factShape" | "freshExhausted" | "closedRelationWrite" | "commitSync" | "transactionPoisoned" | "foreignPrepared" | "foreignWitness" | "param" | "capacityRayMeasure" | "derivedBudgetExceeded" | "overflow" | "resultBytesOverflow" | "corruption";
|
|
481
|
+
type ErrorFamilyKind = "formatMismatch" | "schemaMismatch" | "alreadyInitialized" | "destinationExists" | "publishedButUnsynced" | "environmentLocked" | "io" | "lmdb" | "readersFull" | "schema" | "validation" | "factShape" | "closedRelationWrite" | "commitSync" | "transactionPoisoned" | "foreignPrepared" | "foreignWitness" | "param" | "capacityRayMeasure" | "derivedBudgetExceeded" | "overflow" | "scalar" | "resultBytesOverflow" | "corruption" | "store";
|
|
446
482
|
type AdmissionTag = "accepted" | "rejected";
|
|
447
483
|
type WriteTag = "accepted" | "rejected" | "abandoned" | "moved";
|
|
448
|
-
type OpenKind = "schemaError" | "newtypeMismatch" | "fingerprintMismatch";
|
|
484
|
+
type OpenKind = "schemaError" | "newtypeMismatch" | "fingerprintMismatch" | "destinationExists";
|
|
449
485
|
type PrepareKind = "irError";
|
|
450
486
|
interface Native {
|
|
451
487
|
engineVersion(): string;
|
|
488
|
+
/** Small identity-sized inputs only; bulk hashing rides `runtimeHash`. */
|
|
452
489
|
blake3Hash(data: Uint8Array): Uint8Array;
|
|
453
490
|
descriptor(spec: SchemaSpec): SealedDescriptor;
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
instanceCount(instance: InstanceHandle, relationId: number): bigint;
|
|
475
|
-
instanceContains(instance: InstanceHandle, relationId: number, values: readonly FactValue[]): boolean;
|
|
476
|
-
instanceGet(instance: InstanceHandle, relationId: number, keyStatementId: number, keyValues: readonly FactValue[]): FactValue[] | null;
|
|
477
|
-
instancePrepare(instance: InstanceHandle, query: ParsedQuery): PrepareResult;
|
|
478
|
-
witnessClose(witness: WitnessHandle): void;
|
|
479
|
-
dbWrite(db: DbHandle, callback: (tx: TxHandle) => boolean): NativeWriteOutcome;
|
|
480
|
-
dbWriteFrom(db: DbHandle, witness: WitnessHandle, callback: (tx: TxHandle) => boolean): NativeWriteOutcome;
|
|
481
|
-
/**
|
|
482
|
-
* Records a collection of inserts into the delta; returns the engine
|
|
483
|
-
* `{ submitted, changed }` report. `cells` is ONE flat row-major array
|
|
484
|
-
* (length rows×arity) in sealed field order, and `rows` is the EXPLICIT
|
|
485
|
-
* row count the caller states — the one collection crossing: the JS side
|
|
486
|
-
* alone knows N when the roster is fieldless (N nullary facts project to 0 cells, so no
|
|
487
|
-
* derivation can recover N), and the bridge verifies
|
|
488
|
-
* `cells.length === rows × arity` exactly against its resident sealed
|
|
489
|
-
* roster before building the engine's shape-proved collection in a
|
|
490
|
-
* single pass. Empty (`rows === 0n`, no cells) is lawful and still a
|
|
491
|
-
* mutation. Nothing is judged until commit; shape violations throw
|
|
492
|
-
* typed, naming relation and field.
|
|
493
|
-
*/
|
|
494
|
-
txInsert(tx: TxHandle, relationId: number, rows: bigint, cells: readonly FactValue[]): WireMutationReport;
|
|
495
|
-
txDelete(tx: TxHandle, relationId: number, rows: bigint, cells: readonly FactValue[]): WireMutationReport;
|
|
496
|
-
txContains(tx: TxHandle, relationId: number, values: readonly FactValue[]): boolean;
|
|
497
|
-
txGet(tx: TxHandle, relationId: number, keyStatementId: number, keyValues: readonly FactValue[]): FactValue[] | null;
|
|
498
|
-
txReserve(tx: TxHandle, relationId: number, fieldId: number, count: bigint): WireFreshRange;
|
|
499
|
-
dbPrepare(db: DbHandle, query: ParsedQuery): PrepareResult;
|
|
500
|
-
preparedExecute(prepared: PreparedHandle, instance: InstanceHandle, params: readonly QueryParam[]): FactValue[][];
|
|
501
|
-
preparedClose(prepared: PreparedHandle): void;
|
|
502
|
-
instanceBuilderNew(spec: SchemaSpec): BuilderHandle;
|
|
503
|
-
instanceBuilderLoad(builder: BuilderHandle, relationId: number, rows: bigint, cells: readonly FactValue[]): WireMutationReport;
|
|
504
|
-
instanceBuilderDelete(builder: BuilderHandle, relationId: number, rows: bigint, cells: readonly FactValue[]): WireMutationReport;
|
|
505
|
-
instanceBuilderReserve(builder: BuilderHandle, relationId: number, fieldId: number, count: bigint): WireFreshRange;
|
|
506
|
-
instanceBuilderContains(builder: BuilderHandle, relationId: number, values: readonly FactValue[]): boolean;
|
|
507
|
-
instanceBuilderGet(builder: BuilderHandle, relationId: number, keyStatementId: number, keyValues: readonly FactValue[]): FactValue[] | null;
|
|
508
|
-
instanceBuilderClose(builder: BuilderHandle): void;
|
|
509
|
-
instanceBuilderAdmit(builder: BuilderHandle): Promise<AdmitResult>;
|
|
510
|
-
ownedInstanceClose(instance: OwnedHandle): void;
|
|
511
|
-
ownedScan(instance: OwnedHandle, relationId: number): FactValue[][];
|
|
512
|
-
ownedCount(instance: OwnedHandle, relationId: number): bigint;
|
|
513
|
-
ownedContains(instance: OwnedHandle, relationId: number, values: readonly FactValue[]): boolean;
|
|
514
|
-
ownedGet(instance: OwnedHandle, relationId: number, keyStatementId: number, keyValues: readonly FactValue[]): FactValue[] | null;
|
|
515
|
-
ownedPrepare(instance: OwnedHandle, query: ParsedQuery): PrepareResult;
|
|
516
|
-
ownedExecute(prepared: PreparedHandle, instance: OwnedHandle, params: readonly QueryParam[]): FactValue[][];
|
|
517
|
-
logCodec(descriptor: SealedDescriptor): LogCodecHandle;
|
|
518
|
-
logBraidsOf(descriptor: SealedDescriptor): LogBraids;
|
|
519
|
-
logEncodeBatch(handle: LogCodecHandle, header: LogBatchHeader, ops: readonly LogOpIn[]): LogResult<Uint8Array, LogBatchEncodeKind>;
|
|
520
|
-
logDecodeBatch(handle: LogCodecHandle, bytes: Uint8Array): LogResult<LogBatch, LogBatchDecodeKind>;
|
|
521
|
-
logParseManifest(bytes: Uint8Array): LogResult<LogManifestDoc, LogManifestKind>;
|
|
522
|
-
logRenderManifest(doc: LogManifestDoc): Uint8Array;
|
|
523
|
-
logParseCheckpoint(handle: LogCodecHandle, bytes: Uint8Array): LogResult<LogCheckpointDoc, LogCheckpointKind>;
|
|
524
|
-
logRenderCheckpoint(handle: LogCodecHandle, doc: LogCheckpointDoc): Uint8Array;
|
|
525
|
-
logParseSidecar(handle: LogCodecHandle, bytes: Uint8Array): LogResult<LogChain, LogSidecarKind>;
|
|
526
|
-
logRenderSidecar(handle: LogCodecHandle, chain: LogChain): Uint8Array;
|
|
527
|
-
logParseCkptScratch(bytes: Uint8Array): Uint8Array | null;
|
|
528
|
-
logRenderCkptScratch(digest: Uint8Array): Uint8Array;
|
|
491
|
+
logIdentities(): string;
|
|
492
|
+
logSchema(spec: SchemaSpec): LogSchemaHandle;
|
|
493
|
+
logSchemaFingerprint(schema: LogSchemaHandle): string;
|
|
494
|
+
logReceiptKey(id: LogCommandId): Uint8Array;
|
|
495
|
+
logReceiptEncode(receipt: LogReceipt, limits: LogLimits): LogResult<Uint8Array, LogReceiptKind>;
|
|
496
|
+
logReceiptDecode(expected: {
|
|
497
|
+
readonly identity: LogIdentity;
|
|
498
|
+
readonly receiptEpoch: bigint;
|
|
499
|
+
readonly requestId: string;
|
|
500
|
+
}, bytes: Uint8Array, limits: LogLimits): LogResult<LogReceipt, LogReceiptKind>;
|
|
501
|
+
logReceiptDecodeAt(id: LogCommandId, bytes: Uint8Array, limits: LogLimits): LogResult<LogReceipt, LogReceiptKind>;
|
|
502
|
+
logControlEncode(authority: LogAuthority, cap: bigint): LogResult<Uint8Array, LogFrameKind>;
|
|
503
|
+
logControlDecode(bytes: Uint8Array, cap: bigint): LogResult<LogAuthority, LogFrameKind>;
|
|
504
|
+
logGenesisEncode(record: LogGenesis, cap: bigint): LogResult<Uint8Array, LogFrameKind>;
|
|
505
|
+
logGenesisDecode(bytes: Uint8Array, cap: bigint): LogResult<LogGenesis, LogFrameKind>;
|
|
506
|
+
logGenesisStamp(record: LogGenesis, cap: bigint): LogResult<LogDecisionStamp, LogFrameKind>;
|
|
507
|
+
logBlankDigests(): {
|
|
508
|
+
readonly application: Uint8Array;
|
|
509
|
+
readonly system: Uint8Array;
|
|
510
|
+
};
|
|
529
511
|
}
|
|
530
512
|
declare const SHIPPED_PLATFORMS: readonly ["darwin-arm64", "linux-arm64", "linux-x64"];
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
513
|
+
type NativeBinding = Native;
|
|
514
|
+
/** Lazy singleton: the addon loads on first native access, not module evaluation. */
|
|
515
|
+
declare const native: NativeBinding;
|
|
516
|
+
declare function nativeBindingIsLoaded(): boolean;
|
|
534
517
|
declare function loadNativeBinding(platform: string, arch: string): NativeBinding;
|
|
535
|
-
declare const native: Native;
|
|
536
|
-
declare function dbClose(db: DbHandle): void;
|
|
537
518
|
/**
|
|
538
519
|
* @internal blake3 of the given bytes via the resident native binding —
|
|
539
520
|
* the engine's own hash, lent to the replication driver
|
|
540
521
|
* (`@bjornpagen/bumbledb-log`). Not SDK API; the export is deliberately
|
|
541
|
-
* undocumented in the package surface.
|
|
522
|
+
* undocumented in the package surface. Small identity-sized inputs only.
|
|
542
523
|
*/
|
|
543
524
|
declare function internalBlake3(data: Uint8Array): Uint8Array;
|
|
544
525
|
/**
|
|
@@ -550,44 +531,18 @@ declare function internalBlake3(data: Uint8Array): Uint8Array;
|
|
|
550
531
|
*/
|
|
551
532
|
declare function internalDescriptor(spec: SchemaSpec): SealedDescriptor;
|
|
552
533
|
/**
|
|
553
|
-
* @internal the
|
|
554
|
-
*
|
|
555
|
-
* lent to the replication driver (`@bjornpagen/bumbledb-log`). Not SDK
|
|
556
|
-
* API; the export is deliberately undocumented in the package surface.
|
|
557
|
-
*/
|
|
558
|
-
declare function internalLogCodec(descriptor: SealedDescriptor): LogCodecHandle;
|
|
559
|
-
/**
|
|
560
|
-
* @internal the braid decomposition + serial-at statement ids, riding
|
|
561
|
-
* the same `DescriptorWire`; the driver caches the result per theory
|
|
562
|
-
* beside the codec handle. Not SDK API.
|
|
534
|
+
* @internal the successor identity table emitted by the log core's one
|
|
535
|
+
* speller (`bumbledb_log::identities::emit`). Not SDK API.
|
|
563
536
|
*/
|
|
564
|
-
declare function
|
|
565
|
-
/** @internal batch encode through the sealed codec. Not SDK API. */
|
|
566
|
-
declare function internalLogEncodeBatch(handle: LogCodecHandle, header: LogBatchHeader, ops: readonly LogOpIn[]): LogResult<Uint8Array, LogBatchEncodeKind>;
|
|
567
|
-
/** @internal batch decode through the sealed codec. Not SDK API. */
|
|
568
|
-
declare function internalLogDecodeBatch(handle: LogCodecHandle, bytes: Uint8Array): LogResult<LogBatch, LogBatchDecodeKind>;
|
|
569
|
-
/** @internal manifest document parse — grammar only, no IO. Not SDK API. */
|
|
570
|
-
declare function internalLogParseManifest(bytes: Uint8Array): LogResult<LogManifestDoc, LogManifestKind>;
|
|
571
|
-
/** @internal the manifest's one encoding, byte-exact for CAS bodies. Not SDK API. */
|
|
572
|
-
declare function internalLogRenderManifest(doc: LogManifestDoc): Uint8Array;
|
|
573
|
-
/** @internal checkpoint document parse against the theory's braids. Not SDK API. */
|
|
574
|
-
declare function internalLogParseCheckpoint(handle: LogCodecHandle, bytes: Uint8Array): LogResult<LogCheckpointDoc, LogCheckpointKind>;
|
|
575
|
-
/** @internal checkpoint document render. Not SDK API. */
|
|
576
|
-
declare function internalLogRenderCheckpoint(handle: LogCodecHandle, doc: LogCheckpointDoc): Uint8Array;
|
|
577
|
-
/** @internal chain sidecar parse — the fs half stays in the driver. Not SDK API. */
|
|
578
|
-
declare function internalLogParseSidecar(handle: LogCodecHandle, bytes: Uint8Array): LogResult<LogChain, LogSidecarKind>;
|
|
579
|
-
/** @internal chain sidecar render. Not SDK API. */
|
|
580
|
-
declare function internalLogRenderSidecar(handle: LogCodecHandle, chain: LogChain): Uint8Array;
|
|
537
|
+
declare function internalLogIdentities(): string;
|
|
581
538
|
/**
|
|
582
|
-
* @internal the
|
|
583
|
-
*
|
|
539
|
+
* @internal the sealed per-theory log schema off the same `SchemaSpec`
|
|
540
|
+
* every other lane speaks — one validated core schema, lent to the
|
|
541
|
+
* replication driver (`@bjornpagen/bumbledb-log`). Not SDK API.
|
|
584
542
|
*/
|
|
585
|
-
declare function
|
|
586
|
-
/** @internal the scratch-lease body: version byte + 32-byte digest. Not SDK API. */
|
|
587
|
-
declare function internalLogRenderCkptScratch(digest: Uint8Array): Uint8Array;
|
|
543
|
+
declare function internalLogSchema(spec: SchemaSpec): LogSchemaHandle;
|
|
588
544
|
declare function errorFromThrow(caught: unknown): Error;
|
|
589
545
|
declare function bridged<T>(context: string, run: () => T): T;
|
|
590
|
-
|
|
591
|
-
export
|
|
592
|
-
export { bridged, bridgedAsync, dbClose, errorFromThrow, internalBlake3, internalDescriptor, internalLogBraidsOf, internalLogCodec, internalLogDecodeBatch, internalLogEncodeBatch, internalLogParseCheckpoint, internalLogParseCkptScratch, internalLogParseManifest, internalLogParseSidecar, internalLogRenderCheckpoint, internalLogRenderCkptScratch, internalLogRenderManifest, internalLogRenderSidecar, loadNativeBinding, native, SHIPPED_PLATFORMS };
|
|
546
|
+
export type { AdmissionTag, AggOpIr, AtomIr, AtomSourceIr, CmpOpIr, ComparisonIr, ConditionTreeIr, DbHandle, ErrorFamilyKind, F64IntervalValue, FactValue, FindTermIr, HeadOpIr, HeadTermIr, IntervalValue, LogAccess, LogActivation, LogAuthority, LogChainKind, LogCommandId, LogCommandKind, LogCommandMetadata, LogCommandRef, LogCondition, LogDecisionStamp, LogFrameKind, LogGenesis, LogGenesisProvenance, LogIdentity, LogLifecycle, LogLimits, LogOutcomeWire, LogReceipt, LogReceiptKind, LogResult, LogSchemaHandle, LogStateStamp, NumericCastIr, OpenKind, ParsedQuery, PrepareKind, QueryIr, QueryParam, RuleIr, ScalarExprIr, SealedDescriptor, SealedHi, SealedSide, SealedStatement, SealedWeight, StatementKindTag, TaggedValue, TermIr, Violation, ViolationFact, WriteTag };
|
|
547
|
+
export { bridged, errorFromThrow, internalBlake3, internalDescriptor, internalLogIdentities, internalLogSchema, loadNativeBinding, native, nativeBindingIsLoaded, SHIPPED_PLATFORMS };
|
|
593
548
|
//# sourceMappingURL=native.d.ts.map
|