@libredb/libredb 0.0.1 → 0.0.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/README.md CHANGED
@@ -249,6 +249,73 @@ users.join(orders, "id", "userId").select("users.name", "orders.total").toArray(
249
249
 
250
250
  `where` is O(n) in the table size and `join` is O(n*m) — nested-loop, no indexes (the same deliberate v1 omission as the document lens). Unmatched rows on either side are dropped (inner join), and a left key matching several right rows fans out to several result rows.
251
251
 
252
+ ## The catalog — what a database holds
253
+
254
+ Open a LibreDB file cold and the bytes alone don't say which lens each namespace belongs to. The catalog records that as you write: a `table` registers `{ kind: "relational", schema }` when its handle is built, and a `doc` collection registers `{ kind: "document" }` on its first write. `catalog(db)` reads the whole registry — a `Map` from namespace name to its entry — so a tool can render faithful per-kind views without guessing:
255
+
256
+ ```ts
257
+ import { open, table, doc, catalog } from "libredb";
258
+
259
+ const db = open();
260
+
261
+ table(db, "users", { primaryKey: "id", columns: { id: "string", age: "number" } });
262
+ doc(db, "logs").put("l1", { message: "hello" });
263
+
264
+ const registry = catalog(db);
265
+ registry.get("users");
266
+ // { kind: "relational", schema: { primaryKey: "id", columns: { id: "string", age: "number" } } }
267
+ registry.get("logs");
268
+ // { kind: "document" }
269
+ [...registry.keys()].sort();
270
+ // ["logs", "users"]
271
+ ```
272
+
273
+ The catalog lives under a reserved key prefix that sorts below all user data, so its entries never appear in a `kv`, `doc`, or `table` scan — and no user row leaks into the registry. `kv` namespaces are deliberately not cataloged: `kv` is the raw layer with full keyspace access.
274
+
275
+ A tool that renders the raw `kv` layer (so it sees everything, including the catalog) should hide those engine-internal keys. Rather than hardcode the byte layout, import the contract: `isReservedKey(key)` is true for any key in the reserved namespace, and `RESERVED_MARKER` / `CATALOG_PREFIX` are the underlying constants if you need to build a range.
276
+
277
+ ```ts
278
+ import { open, kv, isReservedKey } from "libredb";
279
+
280
+ const db = open();
281
+ // ... user writes through doc/table, which also write catalog entries ...
282
+
283
+ const visible = kv(db).range("", "￿").toArray().filter((e) => !isReservedKey(e.key));
284
+ // only user keys; catalog entries (under the reserved marker) are filtered out
285
+ ```
286
+
287
+ ## Reliability — deterministic simulation testing
288
+
289
+ Durability is the trust-critical promise: a transaction that returns has been fsync'd, and a crash can only ever damage the last, un-fsync'd record. LibreDB proves this with **deterministic simulation testing (DST)** — the WAL's crash/recovery path is tortured under a seeded, in-memory simulated filesystem. The kernel reaches the disk only through an injectable FS seam (`open({ path, fs })`), so a test can run the real engine on a `SimFS` that crashes on command, tears the un-fsync'd tail at a seeded point, and injects CRC corruption or short reads.
290
+
291
+ Every run is driven by one integer seed and a seeded workload of `set`/`delete`/`transact` operations. After the crash and reopen, recovery must reproduce **a valid committed prefix** of the workload — every transaction that returned successfully, and never a torn or un-committed one. An independent committed-map model (sharing no code with the engine) is the oracle the recovered state is compared against.
292
+
293
+ The DST suite runs as part of the normal gate:
294
+
295
+ ```sh
296
+ bun run test # runs a bounded 50 seeds (fast, CI-friendly)
297
+ ```
298
+
299
+ Run a longer soak by raising the seed count (and optionally the base seed):
300
+
301
+ ```sh
302
+ LIBREDB_DST_SEEDS=5000 bun test src/sim/dst.test.ts
303
+ LIBREDB_DST_BASE=1000000 LIBREDB_DST_SEEDS=5000 bun test src/sim/dst.test.ts
304
+ ```
305
+
306
+ When a seed fails, the suite prints the exact replay hint — `Replay with runSeed(<seed>)`. Because everything is seed-driven, one seed reproduces the whole run byte-for-byte:
307
+
308
+ ```ts
309
+ import { runSeed } from "./src/sim/dst.ts";
310
+
311
+ const result = runSeed(42);
312
+ result.passed; // true — recovered state is a valid committed prefix
313
+ result.recovered; // Map of the recovered committed key-value state
314
+ result.expected; // the model oracle's committed state
315
+ ```
316
+
317
+ The DST harness lives in `src/sim/` and is excluded from the published package — it is test machinery, not shipped code.
318
+
252
319
  ## Read first
253
320
 
254
321
  - [`MANIFESTO.md`](./MANIFESTO.md) — what LibreDB is and what it refuses to be.
@@ -29,4 +29,3 @@ import type { Transaction } from "../core.ts";
29
29
  export interface Store {
30
30
  transact<T>(run: (tx: Transaction) => T): T;
31
31
  }
32
- //# sourceMappingURL=store.d.ts.map
@@ -1,2 +1 @@
1
1
  export {};
2
- //# sourceMappingURL=store.js.map
package/dist/core.d.ts CHANGED
@@ -20,7 +20,7 @@
20
20
  * and discards any record a crash left half-written.
21
21
  */
22
22
  /** The LibreDB package version. Kept in sync with package.json. */
23
- export declare const version = "0.0.1";
23
+ export declare const version = "0.0.3";
24
24
  /**
25
25
  * A key in the kernel: an immutable sequence of bytes.
26
26
  *
@@ -87,6 +87,42 @@ export interface Database {
87
87
  /** Flush pending state and release resources. Safe to call once. */
88
88
  close(): void;
89
89
  }
90
+ /**
91
+ * The filesystem the write-ahead log runs on — the kernel's one IO seam.
92
+ *
93
+ * The kernel never calls `node:fs` directly; every byte that reaches the disk
94
+ * goes through this interface. That keeps the IO boundary explicit and in one
95
+ * place (a readability gain), and it lets a test inject a simulated filesystem
96
+ * to torture crash recovery without a real disk (DESIGN.md section 6.4). The
97
+ * default is a thin real-`node:fs` adapter, so production behaviour is
98
+ * unchanged. The interface is deliberately the SMALLEST set of operations the
99
+ * WAL performs and nothing more.
100
+ */
101
+ export interface FileSystem {
102
+ /** Open the log file at `path` for reading and appending, creating it if it
103
+ * is absent, and return a handle to it. */
104
+ open(path: string): WalFile;
105
+ }
106
+ /**
107
+ * An open handle to a write-ahead log file: exactly the operations the WAL
108
+ * performs on it. Writes are append-only; recovery reads the file and may
109
+ * truncate a torn tail.
110
+ */
111
+ export interface WalFile {
112
+ /** The number of bytes currently in the file. */
113
+ size(): number;
114
+ /** Read `length` bytes starting at `offset`. */
115
+ read(offset: number, length: number): Uint8Array;
116
+ /** Append `bytes` to the end of the file. */
117
+ append(bytes: Uint8Array): void;
118
+ /** Flush appended bytes to durable storage. After this returns the bytes
119
+ * survive a crash — the durability point of a commit. */
120
+ fsync(): void;
121
+ /** Shrink the file to `length` bytes, dropping anything after it. */
122
+ truncate(length: number): void;
123
+ /** Release the handle. */
124
+ close(): void;
125
+ }
90
126
  /**
91
127
  * How to open a kernel instance.
92
128
  *
@@ -96,6 +132,13 @@ export interface Database {
96
132
  */
97
133
  export interface OpenOptions {
98
134
  readonly path?: string;
135
+ /**
136
+ * The filesystem the write-ahead log runs on. Defaults to a thin real
137
+ * `node:fs` adapter. Injecting one lets tests simulate crashes and IO faults
138
+ * deterministically (DESIGN.md section 6.4). Ignored when there is no `path`
139
+ * (an in-memory database never touches a filesystem).
140
+ */
141
+ readonly fs?: FileSystem;
99
142
  }
100
143
  /** The signature of the kernel's entry point (see {@link open} for the
101
144
  * implementation). Naming the contract separately lets lenses depend on it. */
@@ -108,4 +151,3 @@ export type Open = (options?: OpenOptions) => Database;
108
151
  * in-memory.
109
152
  */
110
153
  export declare const open: Open;
111
- //# sourceMappingURL=core.d.ts.map
package/dist/core.js CHANGED
@@ -19,9 +19,9 @@
19
19
  * transactions, and a write-ahead log for durability. Recovery replays that log
20
20
  * and discards any record a crash left half-written.
21
21
  */
22
- import { closeSync, existsSync, fsyncSync, openSync, readFileSync, truncateSync, writeSync, } from "node:fs";
22
+ import { closeSync, fsyncSync, openSync, readFileSync, statSync, truncateSync, writeSync, } from "node:fs";
23
23
  /** The LibreDB package version. Kept in sync with package.json. */
24
- export const version = "0.0.1";
24
+ export const version = "0.0.3";
25
25
  /**
26
26
  * Compare two keys by unsigned byte-lexicographic order: the first differing
27
27
  * byte decides, and if one key is a prefix of the other the shorter sorts
@@ -219,18 +219,14 @@ function replayPayload(entries, payload) {
219
219
  }
220
220
  }
221
221
  /**
222
- * Rebuild the committed store from the log at `path`, returning its entries.
222
+ * Rebuild the committed store from the log behind `file`, returning its entries.
223
223
  * Replays every intact record and stops at the first record a crash left torn
224
224
  * (header promises bytes that are not there) or corrupt (checksum mismatch),
225
225
  * truncating that tail away so the next append starts from a clean boundary.
226
226
  */
227
- function recover(path) {
227
+ function recover(file) {
228
228
  const entries = [];
229
- if (!existsSync(path))
230
- return entries;
231
- // Copy into a plain Uint8Array so slices are independent copies, not views
232
- // aliasing a shared Buffer pool.
233
- const log = new Uint8Array(readFileSync(path));
229
+ const log = file.read(0, file.size());
234
230
  let offset = 0;
235
231
  while (offset + RECORD_HEADER <= log.length) {
236
232
  const size = readU32(log, offset);
@@ -246,26 +242,62 @@ function recover(path) {
246
242
  offset = end;
247
243
  }
248
244
  if (offset < log.length)
249
- truncateSync(path, offset);
245
+ file.truncate(offset);
250
246
  return entries;
251
247
  }
252
- /** Recover the store at `path` and return it together with a {@link Log} that
253
- * appends future commits to the same file. */
254
- function openLog(path) {
255
- const entries = recover(path);
256
- const fd = openSync(path, "a"); // append-only; creates the file if missing
248
+ /**
249
+ * The default {@link FileSystem}: a thin adapter over `node:fs`. Each method is
250
+ * the obvious synchronous syscall, so the seam adds an interface, not behaviour.
251
+ * Appends go through one append-mode descriptor (creating the file if missing);
252
+ * reads, size and truncate work by path, matching how the WAL has always
253
+ * reached the disk.
254
+ */
255
+ function nodeFileSystem() {
256
+ return {
257
+ open(path) {
258
+ const fd = openSync(path, "a"); // append-only; creates the file if missing
259
+ return {
260
+ size() {
261
+ return statSync(path).size;
262
+ },
263
+ read(offset, length) {
264
+ // A fresh Uint8Array so the returned slice is an independent copy, not
265
+ // a view aliasing a shared Buffer pool.
266
+ return new Uint8Array(readFileSync(path)).subarray(offset, offset + length);
267
+ },
268
+ append(bytes) {
269
+ for (let written = 0; written < bytes.length;) {
270
+ written += writeSync(fd, bytes, written);
271
+ }
272
+ },
273
+ fsync() {
274
+ fsyncSync(fd);
275
+ },
276
+ truncate(length) {
277
+ truncateSync(path, length);
278
+ },
279
+ close() {
280
+ closeSync(fd);
281
+ },
282
+ };
283
+ },
284
+ };
285
+ }
286
+ /** Open the log file at `path` on `fs`, recover the store from it, and return
287
+ * the recovered entries together with a {@link Log} that appends future commits
288
+ * to the same file. */
289
+ function openLog(path, fs) {
290
+ const file = fs.open(path);
291
+ const entries = recover(file);
257
292
  return {
258
293
  entries,
259
294
  log: {
260
295
  append(ops) {
261
- const record = encodeRecord(ops);
262
- for (let written = 0; written < record.length;) {
263
- written += writeSync(fd, record, written);
264
- }
265
- fsyncSync(fd); // the durability point: bytes are on disk before we return
296
+ file.append(encodeRecord(ops));
297
+ file.fsync(); // the durability point: bytes are on disk before we return
266
298
  },
267
299
  close() {
268
- closeSync(fd);
300
+ file.close();
269
301
  },
270
302
  },
271
303
  };
@@ -285,7 +317,7 @@ export const open = (options) => {
285
317
  let committed;
286
318
  let log;
287
319
  if (options?.path !== undefined) {
288
- const opened = openLog(options.path);
320
+ const opened = openLog(options.path, options.fs ?? nodeFileSystem());
289
321
  committed = opened.entries;
290
322
  log = opened.log;
291
323
  }
@@ -340,4 +372,3 @@ export const open = (options) => {
340
372
  },
341
373
  };
342
374
  };
343
- //# sourceMappingURL=core.js.map
package/dist/index.d.ts CHANGED
@@ -5,7 +5,10 @@
5
5
  * database and put a lens over it — {@link kv} (strings) or {@link doc} (JSON
6
6
  * documents). The kernel's byte-level internals (and each lens's private codec)
7
7
  * stay unexported on purpose — the lens is the usable face. The relational lens
8
- * ({@link table}) completes the trio.
8
+ * ({@link table}) completes the trio. {@link catalog} reads the registry of
9
+ * namespaces a database holds, so a tool can render faithful per-kind views;
10
+ * {@link isReservedKey} (with {@link RESERVED_MARKER} / {@link CATALOG_PREFIX})
11
+ * lets a raw-KV tool hide engine-internal keys instead of hardcoding the layout.
9
12
  */
10
13
  export { version, open } from "./core.ts";
11
14
  export type { Database, OpenOptions } from "./core.ts";
@@ -15,5 +18,6 @@ export { doc } from "./lens/document.ts";
15
18
  export type { DocCollection, Doc, DocEntry, JsonValue } from "./lens/document.ts";
16
19
  export { table } from "./lens/relational.ts";
17
20
  export type { Table, TableSchema, Row, ColumnType, Query } from "./lens/relational.ts";
21
+ export { catalog, isReservedKey, CATALOG_PREFIX, RESERVED_MARKER } from "./lens/catalog.ts";
22
+ export type { CatalogEntry, CatalogRegistry } from "./lens/catalog.ts";
18
23
  export type { Result, WriteResult } from "./lens/types.ts";
19
- //# sourceMappingURL=index.d.ts.map
package/dist/index.js CHANGED
@@ -5,10 +5,13 @@
5
5
  * database and put a lens over it — {@link kv} (strings) or {@link doc} (JSON
6
6
  * documents). The kernel's byte-level internals (and each lens's private codec)
7
7
  * stay unexported on purpose — the lens is the usable face. The relational lens
8
- * ({@link table}) completes the trio.
8
+ * ({@link table}) completes the trio. {@link catalog} reads the registry of
9
+ * namespaces a database holds, so a tool can render faithful per-kind views;
10
+ * {@link isReservedKey} (with {@link RESERVED_MARKER} / {@link CATALOG_PREFIX})
11
+ * lets a raw-KV tool hide engine-internal keys instead of hardcoding the layout.
9
12
  */
10
13
  export { version, open } from "./core.js";
11
14
  export { kv } from "./lens/kv.js";
12
15
  export { doc } from "./lens/document.js";
13
16
  export { table } from "./lens/relational.js";
14
- //# sourceMappingURL=index.js.map
17
+ export { catalog, isReservedKey, CATALOG_PREFIX, RESERVED_MARKER } from "./lens/catalog.js";
@@ -0,0 +1,112 @@
1
+ import type { Store } from "../adapter/store.ts";
2
+ import type { Transaction } from "../core.ts";
3
+ import type { TableSchema } from "./relational.ts";
4
+ /**
5
+ * The reserved marker. It is U+0000, encoded as the single byte 0x00 — the
6
+ * lowest byte, so it sorts before every byte a non-reserved UTF-8 name can begin
7
+ * with. A user collection or table name may not start with it (see
8
+ * {@link assertUserName}); that one rule keeps all user keys strictly above, and
9
+ * therefore disjoint from, the catalog namespace below.
10
+ */
11
+ export declare const RESERVED_MARKER = "\0";
12
+ /**
13
+ * The catalog key prefix: every catalog entry's key begins with this string. It
14
+ * opens with the reserved marker, so the whole catalog namespace sorts before
15
+ * any user-data key (which can never start with the marker). The readable
16
+ * `libredb:catalog:` tail keeps the namespace self-describing if a raw-KV tool
17
+ * dumps the file before it understands the catalog.
18
+ */
19
+ export declare const CATALOG_PREFIX = "\0libredb:catalog:";
20
+ /**
21
+ * Reject a user namespace name that begins with the reserved marker — a loud
22
+ * error, the same class of correctness rule as the prefix-soundness checks the
23
+ * lenses already enforce. Such a name could place a user key inside the catalog
24
+ * namespace and break the isolation the catalog relies on, so it is forbidden
25
+ * outright rather than silently remapped. Called by `doc` and `table` when a
26
+ * handle is built; the raw kv lens is deliberately not guarded — it is the raw
27
+ * layer with full keyspace access (DESIGN.md section 6.3).
28
+ */
29
+ export declare function assertUserName(name: string): void;
30
+ /**
31
+ * Whether `key` lies in LibreDB's reserved internal namespace — that is, whether
32
+ * it begins with the {@link RESERVED_MARKER}. This is the public contract a tool
33
+ * that renders RAW key-value data (e.g. the LibreDB Studio provider) uses to HIDE
34
+ * engine-internal keys: the catalog today, and any further reserved sub-namespace
35
+ * added under the marker later. Testing the marker rather than the specific
36
+ * {@link CATALOG_PREFIX} is deliberate — a tool that depends on this stays correct
37
+ * if the reserved namespace grows, so it never has to track the byte layout.
38
+ *
39
+ * {@link assertUserName} guarantees no user namespace name begins with the marker,
40
+ * so this predicate partitions reserved keys from user keys with no overlap.
41
+ */
42
+ export declare function isReservedKey(key: string): boolean;
43
+ /**
44
+ * The lens a cataloged namespace belongs to, plus (for a relational table) its
45
+ * schema — the otherwise-unrecoverable interpretation a cold-opening tool needs
46
+ * (DESIGN.md section 6.3). `kv` namespaces are never cataloged (kv is the raw
47
+ * layer); a `document` entry carries only `kind` (documents are schemaless).
48
+ */
49
+ export interface CatalogEntry {
50
+ readonly kind: "kv" | "document" | "relational";
51
+ readonly schema?: TableSchema;
52
+ }
53
+ /**
54
+ * The whole catalog as a snapshot, keyed by namespace name (the `<collection>`
55
+ * or `<table>`, with the reserved prefix stripped). It is the registry a tool
56
+ * that opens a LibreDB file cold reads to render faithful per-kind views
57
+ * (DESIGN.md section 6.3): for each namespace, which lens it belongs to and, for
58
+ * a relational table, its schema.
59
+ */
60
+ export type CatalogRegistry = ReadonlyMap<string, CatalogEntry>;
61
+ /**
62
+ * Record a relational table's schema in the catalog on first creation, or — if
63
+ * the namespace is already cataloged — validate that the passed schema equals
64
+ * the persisted one, throwing on mismatch (DESIGN.md section 6.3: no schema
65
+ * migration in v1). Called by {@link table} when a handle is built.
66
+ *
67
+ * The read and the conditional write run in ONE kernel transaction, so the
68
+ * check-then-record is atomic and, on a file-backed database, the entry is
69
+ * fsync'd through the WAL before `table()` returns (it survives a reopen). The
70
+ * value is JSON of a {@link CatalogEntry} — an ordinary KV value under the
71
+ * reserved key, so the kv lens (the raw layer) can also read it.
72
+ */
73
+ export declare function recordRelational(store: Store, name: string, schema: TableSchema): void;
74
+ /**
75
+ * Register a document collection in the catalog on its first write, recording
76
+ * only `{ kind: "document" }` — documents are schemaless, so existence and kind
77
+ * are all there is to record (DESIGN.md section 6.3). Idempotent: it writes the
78
+ * entry only when the namespace is not already cataloged, so repeated writes
79
+ * neither duplicate nor error.
80
+ *
81
+ * Unlike {@link recordRelational}, this takes the caller's {@link Transaction}
82
+ * rather than a {@link Store}: a document collection registers lazily on its
83
+ * first `put`, which is already inside a transaction, and the kernel forbids
84
+ * nested `transact`. Riding the write's own transaction also makes the
85
+ * registration and the first document durable together (one fsync, atomic).
86
+ *
87
+ * Write-if-absent is the crux that keeps a relational table's catalog entry
88
+ * intact: `table()` routes its inserts through an internal document `put`, but
89
+ * the `{ kind: "relational", schema }` entry was already recorded at table
90
+ * construction (see {@link recordRelational}), so this no-ops there and never
91
+ * downgrades it to a bare `document` kind.
92
+ */
93
+ export declare function recordDocument(tx: Transaction, name: string): void;
94
+ /**
95
+ * Read the whole catalog as a {@link CatalogRegistry} snapshot — the public
96
+ * read API a tool uses to enumerate a database's namespaces and their kinds
97
+ * (DESIGN.md section 6.3). Each entry's key has the reserved prefix stripped, so
98
+ * callers see plain namespace names (`users`, not `\x00libredb:catalog:users`).
99
+ *
100
+ * It scans only `[CATALOG_PREFIX, upperBound)` — the same byte-level prefix
101
+ * range the lenses use, computed by {@link prefixRange}. Because the prefix
102
+ * opens with the reserved low byte and {@link assertUserName} keeps user keys
103
+ * above it, that range is disjoint from all user data: catalog entries never
104
+ * leak into a `doc`/`table`/user-`kv` scan, and no user row leaks into the
105
+ * registry.
106
+ *
107
+ * The result is an EAGER snapshot, not a lazy {@link import("./types.ts").Result}
108
+ * like a lens read: the catalog is small metadata (one entry per namespace), and
109
+ * a `Map` gives a tool direct lookup and enumeration. The single read
110
+ * transaction sees one consistent committed state.
111
+ */
112
+ export declare function catalog(store: Store): CatalogRegistry;
@@ -0,0 +1,172 @@
1
+ /**
2
+ * lens/catalog.ts — the reserved catalog namespace and the user-name policy.
3
+ *
4
+ * The catalog (DESIGN.md section 6.3) lets a tool that opens a LibreDB file cold
5
+ * — e.g. the LibreDB Studio provider — show faithful per-kind views: which lens
6
+ * a namespace belongs to, and a relational table's schema. That interpretation
7
+ * lives in application code, not on disk, so the lenses persist it as ordinary
8
+ * KV entries under a reserved key prefix. It is a lens-level CONVENTION, not a
9
+ * kernel feature: core.ts stays pure ordered-KV and unchanged (honesty
10
+ * discipline — do not grow the core for this).
11
+ *
12
+ * This file establishes the namespace, the one correctness rule it depends on,
13
+ * and the registry write/validate mechanics. The `catalog` read API for tools is
14
+ * added in a later phase; here a `table` records its schema and a reopen
15
+ * validates against it.
16
+ *
17
+ * The codec and comparison here are the catalog's OWN — it deliberately does not
18
+ * import a lens. The dependency arrow points lenses -> catalog (the lenses call
19
+ * {@link recordRelational}); the catalog never points back at a lens, so it stays
20
+ * a leaf the lenses build on. The only lens reference is the type-level
21
+ * {@link TableSchema} import, which is erased at runtime (`import type`), so it
22
+ * adds no runtime coupling or import cycle.
23
+ */
24
+ import { prefixRange } from "../query/range.js";
25
+ /**
26
+ * The reserved marker. It is U+0000, encoded as the single byte 0x00 — the
27
+ * lowest byte, so it sorts before every byte a non-reserved UTF-8 name can begin
28
+ * with. A user collection or table name may not start with it (see
29
+ * {@link assertUserName}); that one rule keeps all user keys strictly above, and
30
+ * therefore disjoint from, the catalog namespace below.
31
+ */
32
+ export const RESERVED_MARKER = "\x00";
33
+ /**
34
+ * The catalog key prefix: every catalog entry's key begins with this string. It
35
+ * opens with the reserved marker, so the whole catalog namespace sorts before
36
+ * any user-data key (which can never start with the marker). The readable
37
+ * `libredb:catalog:` tail keeps the namespace self-describing if a raw-KV tool
38
+ * dumps the file before it understands the catalog.
39
+ */
40
+ export const CATALOG_PREFIX = `${RESERVED_MARKER}libredb:catalog:`;
41
+ /**
42
+ * Reject a user namespace name that begins with the reserved marker — a loud
43
+ * error, the same class of correctness rule as the prefix-soundness checks the
44
+ * lenses already enforce. Such a name could place a user key inside the catalog
45
+ * namespace and break the isolation the catalog relies on, so it is forbidden
46
+ * outright rather than silently remapped. Called by `doc` and `table` when a
47
+ * handle is built; the raw kv lens is deliberately not guarded — it is the raw
48
+ * layer with full keyspace access (DESIGN.md section 6.3).
49
+ */
50
+ export function assertUserName(name) {
51
+ if (name.startsWith(RESERVED_MARKER)) {
52
+ throw new Error(`libredb: namespace name ${JSON.stringify(name)} may not start with the reserved catalog marker (U+0000)`);
53
+ }
54
+ }
55
+ /**
56
+ * Whether `key` lies in LibreDB's reserved internal namespace — that is, whether
57
+ * it begins with the {@link RESERVED_MARKER}. This is the public contract a tool
58
+ * that renders RAW key-value data (e.g. the LibreDB Studio provider) uses to HIDE
59
+ * engine-internal keys: the catalog today, and any further reserved sub-namespace
60
+ * added under the marker later. Testing the marker rather than the specific
61
+ * {@link CATALOG_PREFIX} is deliberate — a tool that depends on this stays correct
62
+ * if the reserved namespace grows, so it never has to track the byte layout.
63
+ *
64
+ * {@link assertUserName} guarantees no user namespace name begins with the marker,
65
+ * so this predicate partitions reserved keys from user keys with no overlap.
66
+ */
67
+ export function isReservedKey(key) {
68
+ return key.startsWith(RESERVED_MARKER);
69
+ }
70
+ const utf8 = new TextEncoder();
71
+ const fromUtf8 = new TextDecoder();
72
+ /** The kernel key for one namespace's catalog entry: the reserved prefix plus
73
+ * the namespace name, UTF-8 encoded. Because the prefix opens with the reserved
74
+ * low byte, this key always sorts outside every user-data range. */
75
+ function catalogKey(name) {
76
+ return utf8.encode(CATALOG_PREFIX + name);
77
+ }
78
+ /** Whether two table schemas are equal by structure: same primary key and the
79
+ * same columns mapped to the same types. Declared column ORDER is irrelevant
80
+ * (the comparison is over the key set), so reopening with the same schema
81
+ * written differently still validates. Specialized to the schema shape on
82
+ * purpose — the catalog has no arbitrary-JSON entries to compare. */
83
+ function schemasEqual(a, b) {
84
+ const aColumns = Object.keys(a.columns);
85
+ const bColumns = Object.keys(b.columns);
86
+ return (a.primaryKey === b.primaryKey &&
87
+ aColumns.length === bColumns.length &&
88
+ aColumns.every((column) => a.columns[column] === b.columns[column]));
89
+ }
90
+ /**
91
+ * Record a relational table's schema in the catalog on first creation, or — if
92
+ * the namespace is already cataloged — validate that the passed schema equals
93
+ * the persisted one, throwing on mismatch (DESIGN.md section 6.3: no schema
94
+ * migration in v1). Called by {@link table} when a handle is built.
95
+ *
96
+ * The read and the conditional write run in ONE kernel transaction, so the
97
+ * check-then-record is atomic and, on a file-backed database, the entry is
98
+ * fsync'd through the WAL before `table()` returns (it survives a reopen). The
99
+ * value is JSON of a {@link CatalogEntry} — an ordinary KV value under the
100
+ * reserved key, so the kv lens (the raw layer) can also read it.
101
+ */
102
+ export function recordRelational(store, name, schema) {
103
+ store.transact((tx) => {
104
+ const key = catalogKey(name);
105
+ const existing = tx.get(key);
106
+ if (existing === undefined) {
107
+ const entry = { kind: "relational", schema };
108
+ tx.set(key, utf8.encode(JSON.stringify(entry)));
109
+ return;
110
+ }
111
+ const persisted = JSON.parse(fromUtf8.decode(existing));
112
+ if (persisted.schema === undefined || !schemasEqual(persisted.schema, schema)) {
113
+ throw new Error(`libredb: table ${JSON.stringify(name)} was reopened with a schema that does not match ` +
114
+ `the persisted catalog entry; v1 does not support schema migration`);
115
+ }
116
+ });
117
+ }
118
+ /**
119
+ * Register a document collection in the catalog on its first write, recording
120
+ * only `{ kind: "document" }` — documents are schemaless, so existence and kind
121
+ * are all there is to record (DESIGN.md section 6.3). Idempotent: it writes the
122
+ * entry only when the namespace is not already cataloged, so repeated writes
123
+ * neither duplicate nor error.
124
+ *
125
+ * Unlike {@link recordRelational}, this takes the caller's {@link Transaction}
126
+ * rather than a {@link Store}: a document collection registers lazily on its
127
+ * first `put`, which is already inside a transaction, and the kernel forbids
128
+ * nested `transact`. Riding the write's own transaction also makes the
129
+ * registration and the first document durable together (one fsync, atomic).
130
+ *
131
+ * Write-if-absent is the crux that keeps a relational table's catalog entry
132
+ * intact: `table()` routes its inserts through an internal document `put`, but
133
+ * the `{ kind: "relational", schema }` entry was already recorded at table
134
+ * construction (see {@link recordRelational}), so this no-ops there and never
135
+ * downgrades it to a bare `document` kind.
136
+ */
137
+ export function recordDocument(tx, name) {
138
+ const key = catalogKey(name);
139
+ if (tx.get(key) !== undefined)
140
+ return;
141
+ const entry = { kind: "document" };
142
+ tx.set(key, utf8.encode(JSON.stringify(entry)));
143
+ }
144
+ /**
145
+ * Read the whole catalog as a {@link CatalogRegistry} snapshot — the public
146
+ * read API a tool uses to enumerate a database's namespaces and their kinds
147
+ * (DESIGN.md section 6.3). Each entry's key has the reserved prefix stripped, so
148
+ * callers see plain namespace names (`users`, not `\x00libredb:catalog:users`).
149
+ *
150
+ * It scans only `[CATALOG_PREFIX, upperBound)` — the same byte-level prefix
151
+ * range the lenses use, computed by {@link prefixRange}. Because the prefix
152
+ * opens with the reserved low byte and {@link assertUserName} keeps user keys
153
+ * above it, that range is disjoint from all user data: catalog entries never
154
+ * leak into a `doc`/`table`/user-`kv` scan, and no user row leaks into the
155
+ * registry.
156
+ *
157
+ * The result is an EAGER snapshot, not a lazy {@link import("./types.ts").Result}
158
+ * like a lens read: the catalog is small metadata (one entry per namespace), and
159
+ * a `Map` gives a tool direct lookup and enumeration. The single read
160
+ * transaction sees one consistent committed state.
161
+ */
162
+ export function catalog(store) {
163
+ const { start, end } = prefixRange(utf8.encode(CATALOG_PREFIX));
164
+ return store.transact((tx) => {
165
+ const registry = new Map();
166
+ for (const entry of tx.getRange(start, end)) {
167
+ const name = fromUtf8.decode(entry.key).slice(CATALOG_PREFIX.length);
168
+ registry.set(name, JSON.parse(fromUtf8.decode(entry.value)));
169
+ }
170
+ return registry;
171
+ });
172
+ }
@@ -101,4 +101,3 @@ export interface DocCollection {
101
101
  * can run a transaction).
102
102
  */
103
103
  export declare function doc(store: Store, collection: string): DocCollection;
104
- //# sourceMappingURL=document.d.ts.map
@@ -13,6 +13,7 @@
13
13
  */
14
14
  import { result } from "./types.js";
15
15
  import { prefixRange } from "../query/range.js";
16
+ import { assertUserName, recordDocument } from "./catalog.js";
16
17
  const utf8 = new TextEncoder();
17
18
  const fromUtf8 = new TextDecoder();
18
19
  /** Serialize a document to UTF-8 JSON bytes — the form the kernel stores. */
@@ -95,6 +96,9 @@ function keyOf(collection, id) {
95
96
  * can run a transaction).
96
97
  */
97
98
  export function doc(store, collection) {
99
+ // A collection name may not intrude on the reserved catalog namespace
100
+ // (DESIGN.md section 6.3) — reject it loudly before any key is derived.
101
+ assertUserName(collection);
98
102
  // The byte range covering every `<collection>:` key. prefixRange computes the
99
103
  // [start, end) bound on raw bytes so it agrees with the kernel's order, which
100
104
  // is what makes the colon a sound collection boundary (a sibling like "users2"
@@ -120,6 +124,12 @@ export function doc(store, collection) {
120
124
  return {
121
125
  put(id, document) {
122
126
  store.transact((tx) => {
127
+ // Register this collection in the catalog on its first write (DESIGN.md
128
+ // section 6.3). Idempotent and inside the write's own transaction, so the
129
+ // registration and the document are durable together. A table's inserts
130
+ // also reach here, but recordDocument is write-if-absent and the
131
+ // relational entry already exists, so it never downgrades that entry.
132
+ recordDocument(tx, collection);
123
133
  tx.set(keyOf(collection, id), encodeDoc(document));
124
134
  });
125
135
  return { changed: 1 };
@@ -149,4 +159,3 @@ export function doc(store, collection) {
149
159
  },
150
160
  };
151
161
  }
152
- //# sourceMappingURL=document.js.map
package/dist/lens/kv.d.ts CHANGED
@@ -56,4 +56,3 @@ export interface Kv {
56
56
  /** Build a {@link Kv} lens over a {@link Store} (the kernel's `Database`
57
57
  * satisfies it, as does any object that can run a transaction). */
58
58
  export declare function kv(store: Store): Kv;
59
- //# sourceMappingURL=kv.d.ts.map
package/dist/lens/kv.js CHANGED
@@ -84,4 +84,3 @@ function scan(store, start, end) {
84
84
  return rows;
85
85
  }));
86
86
  }
87
- //# sourceMappingURL=kv.js.map
@@ -116,4 +116,3 @@ export interface Table {
116
116
  * the primary key becomes the string kernel key.
117
117
  */
118
118
  export declare function table(store: Store, name: string, schema: TableSchema): Table;
119
- //# sourceMappingURL=relational.d.ts.map
@@ -24,6 +24,7 @@
24
24
  * `table.column`). The kernel is unchanged.
25
25
  */
26
26
  import { doc, matches } from "./document.js";
27
+ import { assertUserName, recordRelational } from "./catalog.js";
27
28
  import { result } from "./types.js";
28
29
  /** Whether `value` matches the declared `type`. `"object"` is a plain JSON
29
30
  * object — `null` (typeof `"object"`) and arrays are rejected, since v1 has
@@ -162,6 +163,9 @@ function query(name, source) {
162
163
  * the primary key becomes the string kernel key.
163
164
  */
164
165
  export function table(store, name, schema) {
166
+ // A table name may not intrude on the reserved catalog namespace (DESIGN.md
167
+ // section 6.3) — reject it before validating the schema or deriving any key.
168
+ assertUserName(name);
165
169
  const pkType = schema.columns[schema.primaryKey];
166
170
  if (pkType === undefined) {
167
171
  throw new Error(`primaryKey "${schema.primaryKey}" is not a declared column`);
@@ -169,6 +173,13 @@ export function table(store, name, schema) {
169
173
  if (pkType !== "string") {
170
174
  throw new Error(`primaryKey "${schema.primaryKey}" must be a string column, but is ${pkType}`);
171
175
  }
176
+ // Record this table's schema in the catalog (DESIGN.md section 6.3) so a tool
177
+ // opening the file cold can show a faithful relational view, or — if the name
178
+ // is already cataloged — validate the schema matches the persisted one (no
179
+ // migration in v1). Runs after the schema is structurally valid, so a broken
180
+ // schema never reaches the catalog. The kernel stays unchanged: this is just a
181
+ // KV write under the reserved prefix.
182
+ recordRelational(store, name, schema);
172
183
  // A table is a schema-validated document collection: rows are stored, read,
173
184
  // deleted, and scanned through the document lens at `<table>:<pk>`. This is
174
185
  // what reuses the document codec and the collection-isolation-safe prefix scan;
@@ -210,4 +221,3 @@ export function table(store, name, schema) {
210
221
  },
211
222
  };
212
223
  }
213
- //# sourceMappingURL=relational.js.map
@@ -55,4 +55,3 @@ export interface WriteResult {
55
55
  * helper so "what a Result is" has a single definition.
56
56
  */
57
57
  export declare function result<Row>(source: () => Iterable<Row>): Result<Row>;
58
- //# sourceMappingURL=types.d.ts.map
@@ -32,4 +32,3 @@ export function result(source) {
32
32
  },
33
33
  };
34
34
  }
35
- //# sourceMappingURL=types.js.map
@@ -41,4 +41,3 @@ export interface KeyRange {
41
41
  * (DESIGN.md principle 2) where silently scanning the wrong range would not be.
42
42
  */
43
43
  export declare function prefixRange(prefix: Uint8Array): KeyRange;
44
- //# sourceMappingURL=range.d.ts.map
@@ -57,4 +57,3 @@ function upperBound(prefix) {
57
57
  bound[length - 1] = bound[length - 1] + 1;
58
58
  return bound;
59
59
  }
60
- //# sourceMappingURL=range.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@libredb/libredb",
3
- "version": "0.0.1",
3
+ "version": "0.0.3",
4
4
  "description": "A small, readable, embeddable, multi-model database. One ordered key-value core, thin model lenses on top.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -1 +0,0 @@
1
- {"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../../src/adapter/store.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAE9C;;;;GAIG;AACH,MAAM,WAAW,KAAK;IACpB,QAAQ,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,EAAE,WAAW,KAAK,CAAC,GAAG,CAAC,CAAC;CAC7C"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"store.js","sourceRoot":"","sources":["../../src/adapter/store.ts"],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"core.d.ts","sourceRoot":"","sources":["../src/core.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;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AE,UAAU,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAEvF,YAAY,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC"}
package/dist/index.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAG1C,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAGlC,OAAO,EAAE,GAAG,EAAE,MAAM,oBAAoB,CAAC;AAGzC,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"document.d.ts","sourceRoot":"","sources":["../../src/lens/document.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,EAAU,KAAK,MAAM,EAAE,KAAK,WAAW,EAAE,MAAM,YAAY,CAAC;AAEnE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAEjD;;;;;GAKG;AACH,MAAM,MAAM,SAAS,GACjB,MAAM,GACN,MAAM,GACN,OAAO,GACP,IAAI,GACJ,SAAS,EAAE,GACX;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,CAAC;AAEjC;;;;GAIG;AACH,MAAM,MAAM,GAAG,GAAG;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,CAAC;AAE/C;;;;GAIG;AACH,MAAM,WAAW,QAAQ;IACvB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,GAAG,EAAE,GAAG,CAAC;CACnB;AAKD,6EAA6E;AAC7E,wBAAgB,SAAS,CAAC,GAAG,EAAE,GAAG,GAAG,UAAU,CAE9C;AAED;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,UAAU,GA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AAC,GAAG,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,CASpE"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/lens/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAoCH;;;;;;;GAOG;AACH,MAAM,UAAU,MAAM,CAAM,MAA2B;IACrD,OAAO;QACL,CAAC,MAAM,CAAC,QAAQ,CAAC;YACf,OAAO,MAAM,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC;QACrC,CAAC;QACD,OAAO;YACL,OAAO,CAAC,GAAG,MAAM,EAAE,CAAC,CAAC;QACvB,CAAC;KACF,CAAC;AACJ,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"range.d.ts","sourceRoot":"","sources":["../../src/query/range.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH;;;;;GAKG;AACH,MAAM,WAAW,QAAQ;IACvB,QAAQ,CAAC,KAAK,EAAE,UAAU,CAAC;IAC3B,QAAQ,CAAC,GAAG,EAAE,UAAU,CAAC;CAC1B;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,UAAU,GAAG,QAAQ,CAMxD"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"range.js","sourceRoot":"","sources":["../../src/query/range.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAaH;;;;;;;;;;GAUG;AACH,MAAM,UAAU,WAAW,CAAC,MAAkB;IAC5C,MAAM,GAAG,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC;IAC/B,IAAI,GAAG,KAAK,SAAS,EAAE,CAAC;QACtB,MAAM,IAAI,KAAK,CAAC,+DAA+D,CAAC,CAAC;IACnF,CAAC;IACD,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC;AAChC,CAAC;AAED;;;;;;;;;GASG;AACH,SAAS,UAAU,CAAC,MAAkB;IACpC,IAAI,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;IAC3B,OAAO,MAAM,GAAG,CAAC,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,KAAK,IAAI;QAAE,MAAM,EAAE,CAAC;IAC3D,IAAI,MAAM,KAAK,CAAC;QAAE,OAAO,SAAS,CAAC;IACnC,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC;IACtC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,GAAI,KAAK,CAAC,MAAM,GAAG,CAAC,CAAY,GAAG,CAAC,CAAC;IACtD,OAAO,KAAK,CAAC;AACf,CAAC"}