@dreamlake/dreamdb 0.5.1 → 0.5.3
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/LICENSE-APACHE +20 -0
- package/LICENSE-MIT +21 -0
- package/README.md +24 -3
- package/browser/dreamdb.d.ts +185 -2
- package/browser/dreamdb.js +1 -1
- package/browser/dreamdb_bg.js +723 -5
- package/browser/dreamdb_bg.wasm +0 -0
- package/browser/dreamdb_bg.wasm.d.ts +35 -2
- package/browser-extras.mjs +82 -7
- package/browser.mjs +7 -0
- package/index.d.ts +328 -8
- package/node/dreamdb.cjs +858 -9
- package/node/dreamdb.d.cts +250 -6
- package/node/dreamdb_bg.wasm +0 -0
- package/node/dreamdb_bg.wasm.d.ts +42 -3
- package/node.mjs +5 -4
- package/package.json +4 -2
- package/web/dreamdb.d.ts +220 -4
- package/web/dreamdb.js +730 -5
- package/web/dreamdb_bg.wasm +0 -0
- package/web/dreamdb_bg.wasm.d.ts +35 -2
- package/web.mjs +5 -0
package/node/dreamdb.d.cts
CHANGED
|
@@ -8,6 +8,14 @@ export class Authoring {
|
|
|
8
8
|
private constructor();
|
|
9
9
|
free(): void;
|
|
10
10
|
[Symbol.dispose](): void;
|
|
11
|
+
/**
|
|
12
|
+
* Add one fixed-shape typed-array Constant.
|
|
13
|
+
*
|
|
14
|
+
* `field` is the same `{name, kind:'array', ...}` descriptor accepted by
|
|
15
|
+
* `create`, with `trackKind:'constant'` and `objectKind:'constant'`.
|
|
16
|
+
* `payload` is a raw or NPY payload matching that declaration.
|
|
17
|
+
*/
|
|
18
|
+
addArrayConstant(field: any, payload: Uint8Array): Promise<void>;
|
|
11
19
|
/**
|
|
12
20
|
* Add an embedding column whose index artifacts already exist.
|
|
13
21
|
*
|
|
@@ -23,7 +31,7 @@ export class Authoring {
|
|
|
23
31
|
* off, reads decode 1-bit reconstructions and relevance degrades in a way
|
|
24
32
|
* no API-level check can see.
|
|
25
33
|
*/
|
|
26
|
-
addEmbeddingLayer(name: string, parent_field: string, dim: number, algorithm: string, spatial_index: string, compressor: string, rerank: boolean, version: number | null | undefined, samples: Array<any
|
|
34
|
+
addEmbeddingLayer(name: string, parent_field: string, dim: number, algorithm: string, spatial_index: string, compressor: string, rerank: boolean, version: number | null | undefined, samples: Array<any>, bucket_max_bytes?: number | null, embed_spec?: Uint8Array | null): Promise<void>;
|
|
27
35
|
/**
|
|
28
36
|
* Add a field to the schema of an existing dataset.
|
|
29
37
|
*/
|
|
@@ -41,10 +49,20 @@ export class Authoring {
|
|
|
41
49
|
* `int|float|bool|string|categorical|timestamp`.
|
|
42
50
|
*/
|
|
43
51
|
addScalarLayer(name: string, parent_field: string, value_type: string, samples: Array<any>): Promise<void>;
|
|
52
|
+
/**
|
|
53
|
+
* Append `[anchor, vector]` pairs, adopting a raw graph as Fresh Vamana.
|
|
54
|
+
*/
|
|
55
|
+
appendGraphNodes(field: string, samples: Array<any>): Promise<any>;
|
|
44
56
|
/**
|
|
45
57
|
* Fork the current manifest to a new ref name.
|
|
46
58
|
*/
|
|
47
59
|
branch(new_name: string): Promise<Authoring>;
|
|
60
|
+
/**
|
|
61
|
+
* Merge one or more branches into this ref. Returns the new manifest hash.
|
|
62
|
+
* Build a raw Vamana field. Samples are `[anchor, vector]` pairs; anchors
|
|
63
|
+
* use the same lossless representation as addEmbeddingLayer.
|
|
64
|
+
*/
|
|
65
|
+
buildGraphIndex(name: string, parent_field: string, dim: number, samples: Array<any>, r: number, seed: Uint8Array, embed_spec?: Uint8Array | null): Promise<void>;
|
|
48
66
|
/**
|
|
49
67
|
* Collapse per-cell fragments. Returns
|
|
50
68
|
* `{cellsExamined, cellsCompacted, fragmentsCollapsed, manifest?}`.
|
|
@@ -55,6 +73,15 @@ export class Authoring {
|
|
|
55
73
|
* nothing needed compacting — a no-op, not a failure.
|
|
56
74
|
*/
|
|
57
75
|
compact(modality: string | null | undefined, threshold: number, max_cells: number): Promise<any>;
|
|
76
|
+
/**
|
|
77
|
+
* Compress a raw graph with canonical VectorCompressor CBOR. The raw
|
|
78
|
+
* lineage is retained; rerank selects exact scoring of the candidate pool.
|
|
79
|
+
*/
|
|
80
|
+
compressGraphIndex(field: string, compressor: Uint8Array, rerank: boolean): Promise<void>;
|
|
81
|
+
/**
|
|
82
|
+
* Caller-driven region consolidation; does not erase tombstones or ids.
|
|
83
|
+
*/
|
|
84
|
+
consolidateGraph(field: string): Promise<any>;
|
|
58
85
|
/**
|
|
59
86
|
* Create a new dataset and publish `refs/<name>`.
|
|
60
87
|
*
|
|
@@ -78,9 +105,6 @@ export class Authoring {
|
|
|
78
105
|
* Ref names under `refs/`. Requires a backend implementing `list`.
|
|
79
106
|
*/
|
|
80
107
|
listRefs(): Promise<string[]>;
|
|
81
|
-
/**
|
|
82
|
-
* Merge one or more branches into this ref. Returns the new manifest hash.
|
|
83
|
-
*/
|
|
84
108
|
mergeMany(branches: string[]): Promise<string>;
|
|
85
109
|
/**
|
|
86
110
|
* Open an existing ref for authoring.
|
|
@@ -100,6 +124,22 @@ export class Authoring {
|
|
|
100
124
|
readonly refName: string;
|
|
101
125
|
}
|
|
102
126
|
|
|
127
|
+
export class GeometryReader {
|
|
128
|
+
private constructor();
|
|
129
|
+
free(): void;
|
|
130
|
+
[Symbol.dispose](): void;
|
|
131
|
+
/**
|
|
132
|
+
* Returns only the new suffix at this total logical byte budget.
|
|
133
|
+
*/
|
|
134
|
+
extendCellPrefix(key: any, budget: any): Promise<Uint8Array>;
|
|
135
|
+
/**
|
|
136
|
+
* Declaration plus cells/LODs; no payload transfer. u64 values are BigInt.
|
|
137
|
+
*/
|
|
138
|
+
metadata(): any;
|
|
139
|
+
readMeshLod(level: any): Promise<Uint8Array>;
|
|
140
|
+
selectCells(min: any, max: any): Array<any>;
|
|
141
|
+
}
|
|
142
|
+
|
|
103
143
|
/**
|
|
104
144
|
* A `fetch`-backed backend rooted at a base URL.
|
|
105
145
|
*/
|
|
@@ -112,6 +152,15 @@ export class S3Backend {
|
|
|
112
152
|
* content is hash-addressed; refs are read fresh each page load anyway).
|
|
113
153
|
*/
|
|
114
154
|
get(path: string, _opts: any): Promise<Uint8Array>;
|
|
155
|
+
/**
|
|
156
|
+
* Stream `path` without first aggregating the response in wasm memory.
|
|
157
|
+
*
|
|
158
|
+
* Returning the length beside the browser stream satisfies the optional
|
|
159
|
+
* `Backend.getStream` contract. Older injected backends that implement
|
|
160
|
+
* only [`Self::get`] remain compatible, but cannot claim bounded memory
|
|
161
|
+
* for historical oversized inline Track reads.
|
|
162
|
+
*/
|
|
163
|
+
getStream(path: string): Promise<any>;
|
|
115
164
|
/**
|
|
116
165
|
* List object paths under `prefix`. Stub (returns empty); the current
|
|
117
166
|
* consumer read paths don't require listing.
|
|
@@ -127,6 +176,41 @@ export class Space {
|
|
|
127
176
|
private constructor();
|
|
128
177
|
free(): void;
|
|
129
178
|
[Symbol.dispose](): void;
|
|
179
|
+
/**
|
|
180
|
+
* Validate all referenced Items, including tombstoned payloads.
|
|
181
|
+
*/
|
|
182
|
+
auditArrayField(field: string): Promise<bigint>;
|
|
183
|
+
/**
|
|
184
|
+
* Validate all graph pages and, when declared, exact-source correspondence.
|
|
185
|
+
* The returned count is exactly representable (GraphIndex node_count is u32).
|
|
186
|
+
*/
|
|
187
|
+
auditGraphIndex(field: string): Promise<number>;
|
|
188
|
+
/**
|
|
189
|
+
* The Space's human-readable description, or `undefined` when none is set.
|
|
190
|
+
*
|
|
191
|
+
* The read half of `Authoring.setDescription` (#129). It lives here rather
|
|
192
|
+
* than on `Authoring` because that type is `write-full` and so exists only
|
|
193
|
+
* in the Node build — a description is metadata a READER wants, and
|
|
194
|
+
* `Space` is the surface all three build targets share.
|
|
195
|
+
*
|
|
196
|
+
* `async` although `Dataset::description` is not: the value comes from the
|
|
197
|
+
* Dataset this Space opens lazily at the Manifest hash already pinned by
|
|
198
|
+
* this Space, so the first call may perform that open without re-resolving
|
|
199
|
+
* a source Ref.
|
|
200
|
+
*
|
|
201
|
+
* Deliberately routed through `Dataset::description` rather than read out
|
|
202
|
+
* of `self.manifest`'s registry, which would be shorter and would also
|
|
203
|
+
* serve the cached decoded Manifest. `Dataset::recover_meta` is not a prefix
|
|
204
|
+
* filter: it accepts the legacy `vortex.*` namespace as well as
|
|
205
|
+
* `dreamdb.*`, canonicalises, and drops structural keys. Matching
|
|
206
|
+
* `dreamdb.description` here would silently return nothing for a legacy
|
|
207
|
+
* Space whose description is on disk and readable from Rust — the exact
|
|
208
|
+
* defect `recover_meta`'s own comment records.
|
|
209
|
+
*
|
|
210
|
+
* `Option<String>` marshals to `string | undefined`, NOT to `""`. An unset
|
|
211
|
+
* description and an empty one stay distinguishable across the boundary.
|
|
212
|
+
*/
|
|
213
|
+
description(): Promise<string | undefined>;
|
|
130
214
|
/**
|
|
131
215
|
* Open a Space from a `.../refs/<name>` or `.../manifests/<hash>` URI,
|
|
132
216
|
* resolving the ref (if any) and loading the manifest. If `backend` is
|
|
@@ -135,11 +219,21 @@ export class Space {
|
|
|
135
219
|
* no-backend path).
|
|
136
220
|
*/
|
|
137
221
|
static fromUri(uri: string, backend: any): Promise<Space>;
|
|
222
|
+
/**
|
|
223
|
+
* Read at this pinned Manifest. Returns null for never-created keys;
|
|
224
|
+
* deleted keys retain metadata with sample=null. Integer keys and anchors
|
|
225
|
+
* are BigInt; sample values use the Writer's tagged field shapes.
|
|
226
|
+
*/
|
|
227
|
+
getEntity(key: any): Promise<any>;
|
|
138
228
|
/**
|
|
139
229
|
* Walk the manifest DAG from HEAD, up to `max_depth` entries. Each entry:
|
|
140
230
|
* `{ manifestHash, ts, writer, tracks: [{modality, address}] }`.
|
|
141
231
|
*/
|
|
142
232
|
history(max_depth?: number | null): Promise<Array<any>>;
|
|
233
|
+
/**
|
|
234
|
+
* Open one pinned geometry Item. Missing/deleted anchors return undefined.
|
|
235
|
+
*/
|
|
236
|
+
openGeometryItem(field: string, anchor: any): Promise<GeometryReader | undefined>;
|
|
143
237
|
/**
|
|
144
238
|
* Hybrid search fusing a lexical (BM25) sub-query and a dense (vector)
|
|
145
239
|
* sub-query per spec/0015 §5/§6. Returns the fused `[{ anchor, score }]`
|
|
@@ -162,10 +256,17 @@ export class Space {
|
|
|
162
256
|
* ```
|
|
163
257
|
*
|
|
164
258
|
* Delegates to the real (tested) `dreamdb-dataset::Dataset::query_hybrid`.
|
|
165
|
-
*
|
|
166
|
-
* scalar
|
|
259
|
+
* Optional `scalarField` / `scalarOp` / `scalarValue` properties select
|
|
260
|
+
* the same scalar pre/post-filter planner used by the native API.
|
|
167
261
|
*/
|
|
168
262
|
queryHybrid(vector: Float32Array, opts: any): Promise<Array<any>>;
|
|
263
|
+
/**
|
|
264
|
+
* Hybrid query with an observable `{hits, trace}` result. `opts` accepts
|
|
265
|
+
* `maxLatencyMs`, `costModel`, and the optional scalar triple
|
|
266
|
+
* `scalarField`/`scalarOp`/`scalarValue` in addition to `queryHybrid`'s
|
|
267
|
+
* existing properties.
|
|
268
|
+
*/
|
|
269
|
+
queryHybridPlanned(vector: Float32Array, opts: any): Promise<any>;
|
|
169
270
|
/**
|
|
170
271
|
* Scalar-index lookup: every anchor whose `field` satisfies `op value`
|
|
171
272
|
* (spec/0011). Returns a `BigUint64Array`-style `Array` of anchors,
|
|
@@ -206,18 +307,60 @@ export class Space {
|
|
|
206
307
|
* two-pass rerank + HotShard merge + tombstone suppression.
|
|
207
308
|
*/
|
|
208
309
|
queryVector(field: string, query: Float32Array, opts: any): Promise<Array<any>>;
|
|
310
|
+
/**
|
|
311
|
+
* Read an Event/Unbucketed or Continuous/TimeBatch typed-array field as
|
|
312
|
+
* `Map<anchorString, {values, shape, ...}>`.
|
|
313
|
+
*/
|
|
314
|
+
readArrayColumn(field: string): Promise<Map<any, any>>;
|
|
315
|
+
/**
|
|
316
|
+
* Read a typed-array Constant and decode it to a JS TypedArray plus its
|
|
317
|
+
* authoritative shape and semantic metadata.
|
|
318
|
+
*/
|
|
319
|
+
readArrayConstant(field: string): Promise<any>;
|
|
320
|
+
/**
|
|
321
|
+
* Point read; full-u64 BigInt anchors are supported. Returned components
|
|
322
|
+
* are owned typed arrays (one Item's bytes), never unaligned aliases.
|
|
323
|
+
*/
|
|
324
|
+
readArrayItem(field: string, anchor: any): Promise<any>;
|
|
209
325
|
/**
|
|
210
326
|
* Read a scalar track as a `Map<anchorString, value>`. Single-anchor
|
|
211
327
|
* entries resolve from the track index; multi-anchor entries fetch (and
|
|
212
328
|
* de-dupe) their bucket and roaring-decode the anchor set.
|
|
213
329
|
*/
|
|
214
330
|
readScalarColumn(track: any, _opts: any): Promise<Map<any, any>>;
|
|
331
|
+
/**
|
|
332
|
+
* Fetch verified initialization and complete Fragments overlapping one
|
|
333
|
+
* item-relative half-open range. This materializes the selected bytes; it
|
|
334
|
+
* is not a streaming API.
|
|
335
|
+
*/
|
|
336
|
+
readVideoItemRange(field: string, item_key: Uint8Array, relative_start_ns: any, relative_end_ns: any): Promise<any>;
|
|
215
337
|
/**
|
|
216
338
|
* Fetch a track object and return its `object_index` (array of CBOR
|
|
217
339
|
* entries). Inline indexes only — paged indexes are not resolved (matching
|
|
218
340
|
* dreamdb-ts, which also doesn't support them on this path).
|
|
219
341
|
*/
|
|
220
342
|
resolveObjectIndex(track: any): Promise<Array<any>>;
|
|
343
|
+
/**
|
|
344
|
+
* Semantic-cache capacity in bytes (spec/0006 §3.6). Default 1 GiB.
|
|
345
|
+
*/
|
|
346
|
+
semanticCacheCapacity(): Promise<number>;
|
|
347
|
+
/**
|
|
348
|
+
* Semantic-cache occupancy as `{ entries, bytesUsed, maxBytes }`.
|
|
349
|
+
*/
|
|
350
|
+
semanticCacheStats(): Promise<object>;
|
|
351
|
+
/**
|
|
352
|
+
* Set the semantic-cache capacity in bytes, evicting down to it before
|
|
353
|
+
* returning. Returns the bytes evicted. `0` disables the cache.
|
|
354
|
+
*
|
|
355
|
+
* An index whose accounted size exceeds the cap is not cached and is
|
|
356
|
+
* re-fetched on every query, reported honestly as a miss. The default is
|
|
357
|
+
* not raised globally to suit one corpus.
|
|
358
|
+
*
|
|
359
|
+
* Sizing is workload- and architecture-dependent, and figures measured on
|
|
360
|
+
* a 64-bit host do NOT carry over here: `usize` is 32 bits on `wasm32`, so
|
|
361
|
+
* every offset and length inside a decoded index accounts differently.
|
|
362
|
+
*/
|
|
363
|
+
setSemanticCacheCapacity(n_bytes: number): Promise<number>;
|
|
221
364
|
/**
|
|
222
365
|
* Base32 hash of the manifest's first timeline.
|
|
223
366
|
*/
|
|
@@ -230,6 +373,16 @@ export class Space {
|
|
|
230
373
|
* List resolved tracks from this manifest.
|
|
231
374
|
*/
|
|
232
375
|
tracks(): Array<any>;
|
|
376
|
+
/**
|
|
377
|
+
* Look up the logical VideoItem containing one absolute Timeline anchor
|
|
378
|
+
* without fetching media. Exact nanosecond values are returned as bigint.
|
|
379
|
+
*/
|
|
380
|
+
videoItemAt(field: string, anchor_ns: any): Promise<any>;
|
|
381
|
+
/**
|
|
382
|
+
* Look up one logical VideoItem by its stable opaque key without fetching
|
|
383
|
+
* initialization or Fragment bytes.
|
|
384
|
+
*/
|
|
385
|
+
videoItemByKey(field: string, item_key: Uint8Array): Promise<any>;
|
|
233
386
|
/**
|
|
234
387
|
* The base URL objects are fetched relative to (consumers build their own
|
|
235
388
|
* object URLs from this — e.g. `dreamdb-demo`'s track readers).
|
|
@@ -248,6 +401,11 @@ export class Writer {
|
|
|
248
401
|
private constructor();
|
|
249
402
|
free(): void;
|
|
250
403
|
[Symbol.dispose](): void;
|
|
404
|
+
/**
|
|
405
|
+
* Atomically hot-append a complete Sample batch. Embeddings retain v1;
|
|
406
|
+
* scalar/text values use v2. Identified embeddings require embeddingSpecs.
|
|
407
|
+
*/
|
|
408
|
+
appendHot(samples: Array<any>, embedding_specs?: object | null): Promise<number>;
|
|
251
409
|
/**
|
|
252
410
|
* Append records and commit in one call.
|
|
253
411
|
*
|
|
@@ -261,6 +419,11 @@ export class Writer {
|
|
|
261
419
|
* lifetime is under the caller's control.
|
|
262
420
|
*/
|
|
263
421
|
appendMany(samples: Array<any>): Promise<number>;
|
|
422
|
+
/**
|
|
423
|
+
* Append records with a field-to-`spec_id` map for identified embeddings.
|
|
424
|
+
* Values are full canonical base32 multihashes.
|
|
425
|
+
*/
|
|
426
|
+
appendManyWithSpecs(samples: Array<any>, embedding_specs: object): Promise<number>;
|
|
264
427
|
/**
|
|
265
428
|
* Flush staged entries and publish a new manifest.
|
|
266
429
|
*
|
|
@@ -270,10 +433,67 @@ export class Writer {
|
|
|
270
433
|
* its records on top of the new head is correct.
|
|
271
434
|
*/
|
|
272
435
|
commit(): Promise<string>;
|
|
436
|
+
/**
|
|
437
|
+
* Producer policy only: TTL is evaluated on append, not by a timer.
|
|
438
|
+
*/
|
|
439
|
+
configureHotShard(flush_threshold: number, ttl_seconds: number): void;
|
|
440
|
+
/**
|
|
441
|
+
* Create a never-used key. Sample uses appendMany's tagged fields, no anchor.
|
|
442
|
+
*/
|
|
443
|
+
createEntity(key: any, sample: object, embedding_specs?: object | null): Promise<object>;
|
|
444
|
+
/**
|
|
445
|
+
* Delete exactly a live revision, retaining its key and stable identity.
|
|
446
|
+
*/
|
|
447
|
+
deleteEntity(key: any, expected: Uint8Array): Promise<object>;
|
|
273
448
|
/**
|
|
274
449
|
* Tombstone records by anchor. Returns the new manifest hash.
|
|
275
450
|
*/
|
|
276
451
|
deleteRecords(anchors: BigUint64Array, reason?: string | null): Promise<string>;
|
|
452
|
+
/**
|
|
453
|
+
* Enable one exact typed entity namespace: string, bytes or int.
|
|
454
|
+
*/
|
|
455
|
+
enableEntityKeys(key_kind: string): Promise<void>;
|
|
456
|
+
/**
|
|
457
|
+
* Explicitly fold every pending hot field into cold Tracks in one publish.
|
|
458
|
+
*/
|
|
459
|
+
flushHot(): Promise<void>;
|
|
460
|
+
/**
|
|
461
|
+
* Ingest a pre-fragmented CMAF (fragmented-MP4) video into a Video field
|
|
462
|
+
* as a `spec/0007` §5 media Track — the thing that makes a video Track
|
|
463
|
+
* time-seekable and MSE-playable rather than one opaque blob.
|
|
464
|
+
*
|
|
465
|
+
* ```js
|
|
466
|
+
* const out = await writer.ingestCmaf('video', initBytes, [
|
|
467
|
+
* [frag0, 0n, 2_000_000_000n],
|
|
468
|
+
* [frag1, 2_000_000_000n, 4_000_000_000n],
|
|
469
|
+
* ])
|
|
470
|
+
* ```
|
|
471
|
+
*
|
|
472
|
+
* - `init` is the initialization segment (`ftyp`+`moov`).
|
|
473
|
+
* - each fragment is `[Uint8Array, tStartNs, tEndNs]`, half-open, already
|
|
474
|
+
* offset to the timeline anchor the caller wants. Pass `bigint`s:
|
|
475
|
+
* wall-clock nanosecond anchors are far past `Number.MAX_SAFE_INTEGER`
|
|
476
|
+
* and a rounded `tStart` writes the fragment into a 60 s bucket that
|
|
477
|
+
* does not match the address it is indexed at.
|
|
478
|
+
*
|
|
479
|
+
* Calling it again on the SAME field APPENDS (one episode per call on a
|
|
480
|
+
* shared timeline) and reuses the track's existing init segment; a clip
|
|
481
|
+
* whose init differs — different codec, resolution, fps or audio config —
|
|
482
|
+
* is refused, because a Track carries exactly one init segment and the
|
|
483
|
+
* mismatch would produce fragments that decode against the wrong one.
|
|
484
|
+
*
|
|
485
|
+
* Returns `{field, modality, initHash, fragmentCount, coverage: [bigint,
|
|
486
|
+
* bigint], trackHash, manifestHash}`. `coverage` is `bigint` for the
|
|
487
|
+
* reason above; `fragmentCount` is the track's total after the append,
|
|
488
|
+
* not the number passed in.
|
|
489
|
+
*
|
|
490
|
+
* **Node only** (`write-full`). This takes every fragment's bytes as an
|
|
491
|
+
* argument, so peak memory is the whole clip; the native path form streams
|
|
492
|
+
* fragment-by-fragment off disk, which wasm32 cannot do because it has no
|
|
493
|
+
* filesystem. Fragmenting a multi-GB source inside a browser tab's 32-bit
|
|
494
|
+
* address space is not a workflow worth pretending to support.
|
|
495
|
+
*/
|
|
496
|
+
ingestCmaf(field: string, init: Uint8Array, fragments: Array<any>): Promise<any>;
|
|
277
497
|
/**
|
|
278
498
|
* Open a ref for writing.
|
|
279
499
|
*
|
|
@@ -288,10 +508,27 @@ export class Writer {
|
|
|
288
508
|
* until it calls it.
|
|
289
509
|
*/
|
|
290
510
|
static open(uri: string, backend: any): Promise<Writer>;
|
|
511
|
+
/**
|
|
512
|
+
* Publish prequantized fixed-stride records. Coordinates is
|
|
513
|
+
* {origin:[x,y,z],step:[x,y,z],units:string}; depth is 0..16.
|
|
514
|
+
*/
|
|
515
|
+
publishGeometryCells(field: string, anchor: any, coordinates: any, depth: any, records: Uint8Array): Promise<string>;
|
|
516
|
+
/**
|
|
517
|
+
* Each level is {errorGrid,vertices,triangles,bytes:Uint8Array}.
|
|
518
|
+
*/
|
|
519
|
+
publishGeometryMesh(field: string, anchor: any, coordinates: any, levels: Array<any>): Promise<string>;
|
|
291
520
|
/**
|
|
292
521
|
* Tag the current manifest with an immutable label (`refs/<ref>@<label>`).
|
|
293
522
|
*/
|
|
294
523
|
snapshot(label: string): Promise<string>;
|
|
524
|
+
/**
|
|
525
|
+
* Replace only a live revision, atomically hiding its old physical row.
|
|
526
|
+
*/
|
|
527
|
+
supersedeEntity(key: any, sample: object, expected: Uint8Array, embedding_specs?: object | null): Promise<object>;
|
|
528
|
+
/**
|
|
529
|
+
* Create with no expected token, or replace/restore exactly that revision.
|
|
530
|
+
*/
|
|
531
|
+
upsertEntity(key: any, sample: object, expected?: Uint8Array | null, embedding_specs?: object | null): Promise<object>;
|
|
295
532
|
/**
|
|
296
533
|
* Current manifest hash, base32.
|
|
297
534
|
*/
|
|
@@ -413,6 +650,13 @@ export function timeAnchorHex(value: bigint): string;
|
|
|
413
650
|
*/
|
|
414
651
|
export function timeBucket(t_start: bigint, duration: string): bigint;
|
|
415
652
|
|
|
653
|
+
/**
|
|
654
|
+
* Decode one spec/0025 item using the same declaration and payload path as
|
|
655
|
+
* `Space.readArrayColumn`, without requiring storage IO. This is the SDK's
|
|
656
|
+
* pure conformance entry point for language-neutral vectors.
|
|
657
|
+
*/
|
|
658
|
+
export function typedArrayDecode(item_type: any, payload: Uint8Array): any;
|
|
659
|
+
|
|
416
660
|
/**
|
|
417
661
|
* Package version — useful for consumers to confirm which build is loaded.
|
|
418
662
|
*/
|
package/node/dreamdb_bg.wasm
CHANGED
|
Binary file
|
|
@@ -2,16 +2,22 @@
|
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
export const memory: WebAssembly.Memory;
|
|
4
4
|
export const __wbg_authoring_free: (a: number, b: number) => void;
|
|
5
|
+
export const __wbg_geometryreader_free: (a: number, b: number) => void;
|
|
5
6
|
export const __wbg_s3backend_free: (a: number, b: number) => void;
|
|
6
7
|
export const __wbg_space_free: (a: number, b: number) => void;
|
|
7
8
|
export const addressRoundTrip: (a: number, b: number) => [number, number, number, number];
|
|
8
9
|
export const addressVariant: (a: number, b: number) => [number, number, number, number];
|
|
9
|
-
export const
|
|
10
|
+
export const authoring_addArrayConstant: (a: number, b: any, c: any) => any;
|
|
11
|
+
export const authoring_addEmbeddingLayer: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number, o: any, p: number, q: number, r: number) => any;
|
|
10
12
|
export const authoring_addField: (a: number, b: any) => any;
|
|
11
13
|
export const authoring_addImageLayer: (a: number, b: number, c: number, d: number, e: number, f: any, g: number, h: number) => any;
|
|
12
14
|
export const authoring_addScalarLayer: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: any) => any;
|
|
15
|
+
export const authoring_appendGraphNodes: (a: number, b: number, c: number, d: any) => any;
|
|
13
16
|
export const authoring_branch: (a: number, b: number, c: number) => any;
|
|
17
|
+
export const authoring_buildGraphIndex: (a: number, b: number, c: number, d: number, e: number, f: number, g: any, h: number, i: number, j: number, k: number, l: number) => any;
|
|
14
18
|
export const authoring_compact: (a: number, b: number, c: number, d: number, e: number) => any;
|
|
19
|
+
export const authoring_compressGraphIndex: (a: number, b: number, c: number, d: number, e: number, f: number) => any;
|
|
20
|
+
export const authoring_consolidateGraph: (a: number, b: number, c: number) => any;
|
|
15
21
|
export const authoring_create: (a: number, b: number, c: any, d: number, e: number, f: any) => any;
|
|
16
22
|
export const authoring_deleteRef: (a: number, b: number, c: number) => any;
|
|
17
23
|
export const authoring_listRefs: (a: number) => any;
|
|
@@ -23,37 +29,70 @@ export const authoring_writer: (a: number) => number;
|
|
|
23
29
|
export const bytesToBase32: (a: number, b: number) => [number, number];
|
|
24
30
|
export const decodeCbor: (a: number, b: number) => [number, number, number];
|
|
25
31
|
export const encodeCbor: (a: any) => [number, number, number, number];
|
|
32
|
+
export const geometryreader_extendCellPrefix: (a: number, b: any, c: any) => any;
|
|
33
|
+
export const geometryreader_metadata: (a: number) => [number, number, number];
|
|
34
|
+
export const geometryreader_readMeshLod: (a: number, b: any) => any;
|
|
35
|
+
export const geometryreader_selectCells: (a: number, b: any, c: any) => [number, number, number];
|
|
26
36
|
export const modalityParse: (a: number, b: number) => [number, number, number];
|
|
27
37
|
export const multihashBase32: (a: number, b: number) => [number, number];
|
|
28
38
|
export const multihashHex: (a: number, b: number) => [number, number];
|
|
29
39
|
export const rangeHeader: (a: bigint, b: bigint) => [number, number, number, number];
|
|
30
40
|
export const s3backend_get: (a: number, b: number, c: number, d: any) => any;
|
|
41
|
+
export const s3backend_getStream: (a: number, b: number, c: number) => any;
|
|
31
42
|
export const s3backend_list: (a: number, b: number, c: number) => any;
|
|
32
43
|
export const s3backend_new: (a: number, b: number) => number;
|
|
44
|
+
export const space_auditArrayField: (a: number, b: number, c: number) => any;
|
|
45
|
+
export const space_auditGraphIndex: (a: number, b: number, c: number) => any;
|
|
33
46
|
export const space_connectorBase: (a: number) => [number, number];
|
|
47
|
+
export const space_description: (a: number) => any;
|
|
34
48
|
export const space_fromUri: (a: number, b: number, c: any) => any;
|
|
49
|
+
export const space_getEntity: (a: number, b: any) => any;
|
|
35
50
|
export const space_history: (a: number, b: number) => any;
|
|
36
51
|
export const space_manifestHash: (a: number) => [number, number];
|
|
52
|
+
export const space_openGeometryItem: (a: number, b: number, c: number, d: any) => any;
|
|
37
53
|
export const space_queryHybrid: (a: number, b: number, c: number, d: any) => any;
|
|
54
|
+
export const space_queryHybridPlanned: (a: number, b: number, c: number, d: any) => any;
|
|
38
55
|
export const space_queryScalar: (a: number, b: number, c: number, d: number, e: number, f: any) => any;
|
|
39
56
|
export const space_queryText: (a: number, b: number, c: number, d: number, e: number, f: number) => any;
|
|
40
57
|
export const space_queryVector: (a: number, b: number, c: number, d: number, e: number, f: any) => any;
|
|
58
|
+
export const space_readArrayColumn: (a: number, b: number, c: number) => any;
|
|
59
|
+
export const space_readArrayConstant: (a: number, b: number, c: number) => any;
|
|
60
|
+
export const space_readArrayItem: (a: number, b: number, c: number, d: any) => any;
|
|
41
61
|
export const space_readScalarColumn: (a: number, b: any, c: any) => any;
|
|
62
|
+
export const space_readVideoItemRange: (a: number, b: number, c: number, d: any, e: any, f: any) => any;
|
|
42
63
|
export const space_resolveObjectIndex: (a: number, b: any) => any;
|
|
64
|
+
export const space_semanticCacheCapacity: (a: number) => any;
|
|
65
|
+
export const space_semanticCacheStats: (a: number) => any;
|
|
66
|
+
export const space_setSemanticCacheCapacity: (a: number, b: number) => any;
|
|
43
67
|
export const space_timelineId: (a: number) => [number, number, number, number];
|
|
44
|
-
export const space_trackFor: (a: number, b: number, c: number) =>
|
|
45
|
-
export const space_tracks: (a: number) =>
|
|
68
|
+
export const space_trackFor: (a: number, b: number, c: number) => [number, number, number];
|
|
69
|
+
export const space_tracks: (a: number) => [number, number, number];
|
|
70
|
+
export const space_videoItemAt: (a: number, b: number, c: number, d: any) => any;
|
|
71
|
+
export const space_videoItemByKey: (a: number, b: number, c: number, d: any) => any;
|
|
46
72
|
export const spatialKeyRoundTrip: (a: number, b: number) => [number, number, number, number];
|
|
47
73
|
export const timeAnchorFromHex: (a: number, b: number) => [bigint, number, number];
|
|
48
74
|
export const timeAnchorHex: (a: bigint) => [number, number];
|
|
49
75
|
export const timeBucket: (a: bigint, b: number, c: number) => [bigint, number, number];
|
|
76
|
+
export const typedArrayDecode: (a: any, b: number, c: number) => [number, number, number];
|
|
50
77
|
export const version: () => [number, number];
|
|
78
|
+
export const writer_appendHot: (a: number, b: any, c: number) => any;
|
|
51
79
|
export const writer_appendMany: (a: number, b: any) => any;
|
|
80
|
+
export const writer_appendManyWithSpecs: (a: number, b: any, c: any) => any;
|
|
52
81
|
export const writer_commit: (a: number) => any;
|
|
82
|
+
export const writer_configureHotShard: (a: number, b: number, c: number) => [number, number];
|
|
83
|
+
export const writer_createEntity: (a: number, b: any, c: any, d: number) => any;
|
|
84
|
+
export const writer_deleteEntity: (a: number, b: any, c: any) => any;
|
|
53
85
|
export const writer_deleteRecords: (a: number, b: number, c: number, d: number, e: number) => any;
|
|
86
|
+
export const writer_enableEntityKeys: (a: number, b: number, c: number) => any;
|
|
87
|
+
export const writer_flushHot: (a: number) => any;
|
|
88
|
+
export const writer_ingestCmaf: (a: number, b: number, c: number, d: number, e: number, f: any) => any;
|
|
54
89
|
export const writer_manifestHash: (a: number) => [number, number, number, number];
|
|
55
90
|
export const writer_open: (a: number, b: number, c: any) => any;
|
|
91
|
+
export const writer_publishGeometryCells: (a: number, b: number, c: number, d: any, e: any, f: any, g: any) => any;
|
|
92
|
+
export const writer_publishGeometryMesh: (a: number, b: number, c: number, d: any, e: any, f: any) => any;
|
|
56
93
|
export const writer_snapshot: (a: number, b: number, c: number) => any;
|
|
94
|
+
export const writer_supersedeEntity: (a: number, b: any, c: any, d: any, e: number) => any;
|
|
95
|
+
export const writer_upsertEntity: (a: number, b: any, c: any, d: number, e: number) => any;
|
|
57
96
|
export const zeroSpatialKey: () => [number, number];
|
|
58
97
|
export const __wasm_init: () => void;
|
|
59
98
|
export const __wbg_writer_free: (a: number, b: number) => void;
|
package/node.mjs
CHANGED
|
@@ -8,10 +8,11 @@
|
|
|
8
8
|
import mod from './node/dreamdb.cjs'
|
|
9
9
|
|
|
10
10
|
export const {
|
|
11
|
-
Authoring, S3Backend, Space, Writer,
|
|
12
|
-
addressVariant, bytesToBase32, decodeCbor, encodeCbor,
|
|
13
|
-
multihashBase32, multihashHex, rangeHeader, spatialKeyRoundTrip,
|
|
14
|
-
timeAnchorHex, timeBucket,
|
|
11
|
+
Authoring, GeometryReader, S3Backend, Space, Writer,
|
|
12
|
+
addressRoundTrip, addressVariant, bytesToBase32, decodeCbor, encodeCbor,
|
|
13
|
+
modalityParse, multihashBase32, multihashHex, rangeHeader, spatialKeyRoundTrip,
|
|
14
|
+
timeAnchorFromHex, timeAnchorHex, timeBucket, typedArrayDecode, version,
|
|
15
|
+
zeroSpatialKey,
|
|
15
16
|
} = mod
|
|
16
17
|
|
|
17
18
|
/** Zero spatial-key path segment for non-spatial (fragment) object addresses. */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dreamlake/dreamdb",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.3",
|
|
4
4
|
"description": "DreamDB SDK — isomorphic (browser + Node) read and write, compiled from the Rust core",
|
|
5
5
|
"license": "MIT OR Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
@@ -36,7 +36,9 @@
|
|
|
36
36
|
"node.cjs",
|
|
37
37
|
"browser-extras.mjs",
|
|
38
38
|
"index.d.ts",
|
|
39
|
-
"README.md"
|
|
39
|
+
"README.md",
|
|
40
|
+
"LICENSE-MIT",
|
|
41
|
+
"LICENSE-APACHE"
|
|
40
42
|
],
|
|
41
43
|
"sideEffects": [
|
|
42
44
|
"./browser/dreamdb.js",
|