@vibesdotdev/localdb 0.0.1 → 1.0.0-rc.2
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 +18 -0
- package/README.md +134 -112
- package/dist/cli/commands/_shared.consumer.d.ts +1 -3
- package/dist/cli/commands/_shared.consumer.d.ts.map +1 -1
- package/dist/cli/commands/_shared.consumer.js +1 -11
- package/dist/cli/commands/_shared.consumer.js.map +1 -1
- package/dist/cli/commands/migrate/dev.localdb.migrate.cli-command.descriptor.js +1 -1
- package/dist/cli/commands/migrate/dev.localdb.migrate.cli-command.descriptor.js.map +1 -1
- package/dist/cli/commands/migrate/dev.localdb.migrate.cli-command.impl.consumer.d.ts +9 -3
- package/dist/cli/commands/migrate/dev.localdb.migrate.cli-command.impl.consumer.d.ts.map +1 -1
- package/dist/cli/commands/migrate/dev.localdb.migrate.cli-command.impl.consumer.js +59 -45
- package/dist/cli/commands/migrate/dev.localdb.migrate.cli-command.impl.consumer.js.map +1 -1
- package/dist/cli/commands/namespaces/dev.localdb.namespaces.cli-command.descriptor.js +1 -1
- package/dist/cli/commands/namespaces/dev.localdb.namespaces.cli-command.descriptor.js.map +1 -1
- package/dist/cli/commands/namespaces/dev.localdb.namespaces.cli-command.impl.d.ts +8 -3
- package/dist/cli/commands/namespaces/dev.localdb.namespaces.cli-command.impl.d.ts.map +1 -1
- package/dist/cli/commands/namespaces/dev.localdb.namespaces.cli-command.impl.js +12 -10
- package/dist/cli/commands/namespaces/dev.localdb.namespaces.cli-command.impl.js.map +1 -1
- package/dist/cli/commands/pools/dev.localdb.pools.cli-command.descriptor.js +1 -1
- package/dist/cli/commands/pools/dev.localdb.pools.cli-command.descriptor.js.map +1 -1
- package/dist/cli/commands/pools/dev.localdb.pools.cli-command.impl.d.ts +6 -3
- package/dist/cli/commands/pools/dev.localdb.pools.cli-command.impl.d.ts.map +1 -1
- package/dist/cli/commands/pools/dev.localdb.pools.cli-command.impl.js +8 -7
- package/dist/cli/commands/pools/dev.localdb.pools.cli-command.impl.js.map +1 -1
- package/dist/cli/commands/query/dev.localdb.query.cli-command.descriptor.js +1 -1
- package/dist/cli/commands/query/dev.localdb.query.cli-command.descriptor.js.map +1 -1
- package/dist/cli/commands/query/dev.localdb.query.cli-command.impl.consumer.d.ts +13 -3
- package/dist/cli/commands/query/dev.localdb.query.cli-command.impl.consumer.d.ts.map +1 -1
- package/dist/cli/commands/query/dev.localdb.query.cli-command.impl.consumer.js +66 -51
- package/dist/cli/commands/query/dev.localdb.query.cli-command.impl.consumer.js.map +1 -1
- package/dist/cli/commands/status/dev.localdb.status.cli-command.descriptor.js +1 -1
- package/dist/cli/commands/status/dev.localdb.status.cli-command.descriptor.js.map +1 -1
- package/dist/cli/commands/status/dev.localdb.status.cli-command.impl.consumer.d.ts +9 -3
- package/dist/cli/commands/status/dev.localdb.status.cli-command.impl.consumer.d.ts.map +1 -1
- package/dist/cli/commands/status/dev.localdb.status.cli-command.impl.consumer.js +41 -29
- package/dist/cli/commands/status/dev.localdb.status.cli-command.impl.consumer.js.map +1 -1
- package/dist/cli/inputs.d.ts +25 -0
- package/dist/cli/inputs.d.ts.map +1 -0
- package/dist/cli/inputs.js +81 -0
- package/dist/cli/inputs.js.map +1 -0
- package/dist/cli/types.d.ts +45 -0
- package/dist/cli/types.d.ts.map +1 -0
- package/dist/cli/types.js +14 -0
- package/dist/cli/types.js.map +1 -0
- package/dist/core/connection-pool.d.ts +204 -46
- package/dist/core/connection-pool.d.ts.map +1 -1
- package/dist/core/connection-pool.js +610 -101
- package/dist/core/connection-pool.js.map +1 -1
- package/dist/core/database.d.ts +243 -63
- package/dist/core/database.d.ts.map +1 -1
- package/dist/core/database.js +937 -203
- package/dist/core/database.js.map +1 -1
- package/dist/core/holders.d.ts +15 -0
- package/dist/core/holders.d.ts.map +1 -0
- package/dist/core/holders.js +4 -0
- package/dist/core/holders.js.map +1 -0
- package/dist/core/host-kinds.d.ts +22 -0
- package/dist/core/host-kinds.d.ts.map +1 -0
- package/dist/core/host-kinds.js +52 -0
- package/dist/core/host-kinds.js.map +1 -0
- package/dist/core/live-runtime.d.ts +17 -0
- package/dist/core/live-runtime.d.ts.map +1 -0
- package/dist/core/live-runtime.js +28 -0
- package/dist/core/live-runtime.js.map +1 -0
- package/dist/core/migration-registry.d.ts +115 -80
- package/dist/core/migration-registry.d.ts.map +1 -1
- package/dist/core/migration-registry.js +340 -199
- package/dist/core/migration-registry.js.map +1 -1
- package/dist/core/open-connection.d.ts +11 -0
- package/dist/core/open-connection.d.ts.map +1 -0
- package/dist/core/open-connection.js +70 -0
- package/dist/core/open-connection.js.map +1 -0
- package/dist/core/outcome.d.ts +21 -0
- package/dist/core/outcome.d.ts.map +1 -0
- package/dist/core/outcome.js +22 -0
- package/dist/core/outcome.js.map +1 -0
- package/dist/core/pool-api.d.ts +19 -0
- package/dist/core/pool-api.d.ts.map +1 -0
- package/dist/core/pool-api.js +59 -0
- package/dist/core/pool-api.js.map +1 -0
- package/dist/core/slow-statement.d.ts +81 -0
- package/dist/core/slow-statement.d.ts.map +1 -0
- package/dist/core/slow-statement.js +149 -0
- package/dist/core/slow-statement.js.map +1 -0
- package/dist/core/wal-policy.d.ts +86 -0
- package/dist/core/wal-policy.d.ts.map +1 -0
- package/dist/core/wal-policy.js +115 -0
- package/dist/core/wal-policy.js.map +1 -0
- package/dist/dev.localdb.cli-group.descriptor.d.ts +1 -1
- package/dist/dev.localdb.cli-group.descriptor.d.ts.map +1 -1
- package/dist/dev.localdb.context.descriptor.d.ts +15 -1
- package/dist/dev.localdb.context.descriptor.d.ts.map +1 -1
- package/dist/dev.localdb.context.descriptor.js +1 -1
- package/dist/dev.localdb.context.descriptor.js.map +1 -1
- package/dist/dev.localdb.context.impl.consumer.d.ts +12 -5
- package/dist/dev.localdb.context.impl.consumer.d.ts.map +1 -1
- package/dist/dev.localdb.context.impl.consumer.js +14 -5
- package/dist/dev.localdb.context.impl.consumer.js.map +1 -1
- package/dist/driver/sqlite-driver.base.d.ts +107 -0
- package/dist/driver/sqlite-driver.base.d.ts.map +1 -0
- package/dist/driver/sqlite-driver.base.js +426 -0
- package/dist/driver/sqlite-driver.base.js.map +1 -0
- package/dist/driver/sqlite-driver.d.ts +154 -0
- package/dist/driver/sqlite-driver.d.ts.map +1 -0
- package/dist/driver/sqlite-driver.js +103 -0
- package/dist/driver/sqlite-driver.js.map +1 -0
- package/dist/index.d.ts +11 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -4
- package/dist/index.js.map +1 -1
- package/dist/localdb.client.descriptor.d.ts +10 -0
- package/dist/localdb.client.descriptor.d.ts.map +1 -0
- package/dist/localdb.client.descriptor.js +13 -0
- package/dist/localdb.client.descriptor.js.map +1 -0
- package/dist/localdb.client.impl.consumer.d.ts +11 -0
- package/dist/localdb.client.impl.consumer.d.ts.map +1 -0
- package/dist/localdb.client.impl.consumer.js +11 -0
- package/dist/localdb.client.impl.consumer.js.map +1 -0
- package/dist/localdb.plugin.d.ts +2 -2
- package/dist/localdb.plugin.d.ts.map +1 -1
- package/dist/localdb.plugin.js +58 -10
- package/dist/localdb.plugin.js.map +1 -1
- package/dist/location.d.ts +6 -0
- package/dist/location.d.ts.map +1 -0
- package/dist/location.js +6 -0
- package/dist/location.js.map +1 -0
- package/dist/migrations/load-sql.d.ts +25 -21
- package/dist/migrations/load-sql.d.ts.map +1 -1
- package/dist/migrations/load-sql.js +91 -76
- package/dist/migrations/load-sql.js.map +1 -1
- package/dist/pool.d.ts +3 -0
- package/dist/pool.d.ts.map +1 -0
- package/dist/pool.js +3 -0
- package/dist/pool.js.map +1 -0
- package/dist/schemas/api.d.ts +133 -59
- package/dist/schemas/api.d.ts.map +1 -1
- package/dist/schemas/api.js +1 -1
- package/dist/schemas/api.js.map +1 -1
- package/dist/schemas/migrations.d.ts +123 -0
- package/dist/schemas/migrations.d.ts.map +1 -0
- package/dist/schemas/migrations.js +55 -0
- package/dist/schemas/migrations.js.map +1 -0
- package/dist/schemas/pool.d.ts +27 -0
- package/dist/schemas/pool.d.ts.map +1 -0
- package/dist/schemas/pool.js +7 -0
- package/dist/schemas/pool.js.map +1 -0
- package/dist/schemas/sqlite-driver-base.d.ts +50 -0
- package/dist/schemas/sqlite-driver-base.d.ts.map +1 -0
- package/dist/schemas/sqlite-driver-base.js +2 -0
- package/dist/schemas/sqlite-driver-base.js.map +1 -0
- package/dist/testing/sqlite-driver-conformance.d.ts +42 -0
- package/dist/testing/sqlite-driver-conformance.d.ts.map +1 -0
- package/dist/testing/sqlite-driver-conformance.js +471 -0
- package/dist/testing/sqlite-driver-conformance.js.map +1 -0
- package/package.json +79 -106
- package/SPEC.md +0 -119
- package/dist/core/error-context.d.ts +0 -2
- package/dist/core/error-context.d.ts.map +0 -1
- package/dist/core/error-context.js +0 -17
- package/dist/core/error-context.js.map +0 -1
- package/dist/core/runtime.d.ts +0 -3
- package/dist/core/runtime.d.ts.map +0 -1
- package/dist/core/runtime.js +0 -17
- package/dist/core/runtime.js.map +0 -1
- package/dist/localdb.cloud.plugin.d.ts +0 -17
- package/dist/localdb.cloud.plugin.d.ts.map +0 -1
- package/dist/localdb.cloud.plugin.js +0 -23
- package/dist/localdb.cloud.plugin.js.map +0 -1
- package/src/cli/commands/_shared.consumer.ts +0 -20
- package/src/cli/commands/migrate/dev.localdb.migrate.cli-command.descriptor.ts +0 -20
- package/src/cli/commands/migrate/dev.localdb.migrate.cli-command.impl.consumer.ts +0 -97
- package/src/cli/commands/namespaces/dev.localdb.namespaces.cli-command.descriptor.ts +0 -17
- package/src/cli/commands/namespaces/dev.localdb.namespaces.cli-command.impl.ts +0 -46
- package/src/cli/commands/pools/dev.localdb.pools.cli-command.descriptor.ts +0 -16
- package/src/cli/commands/pools/dev.localdb.pools.cli-command.impl.ts +0 -37
- package/src/cli/commands/query/dev.localdb.query.cli-command.descriptor.ts +0 -21
- package/src/cli/commands/query/dev.localdb.query.cli-command.impl.consumer.ts +0 -69
- package/src/cli/commands/status/dev.localdb.status.cli-command.descriptor.ts +0 -20
- package/src/cli/commands/status/dev.localdb.status.cli-command.impl.consumer.ts +0 -93
- package/src/core/connection-pool.ts +0 -240
- package/src/core/database.ts +0 -419
- package/src/core/error-context.ts +0 -19
- package/src/core/migration-registry.ts +0 -321
- package/src/core/runtime.ts +0 -17
- package/src/dev.localdb.cli-group.descriptor.ts +0 -20
- package/src/dev.localdb.context.descriptor.ts +0 -13
- package/src/dev.localdb.context.impl.consumer.ts +0 -12
- package/src/index.ts +0 -28
- package/src/localdb.cloud.plugin.ts +0 -24
- package/src/localdb.plugin.ts +0 -43
- package/src/migrations/atlas/001-initial-schema.sql +0 -173
- package/src/migrations/atlas/002-lang-server-fields.sql +0 -12
- package/src/migrations/atlas/003-config-id-dedup.sql +0 -31
- package/src/migrations/atlas/004-fix-on-conflict-constraints.sql +0 -25
- package/src/migrations/atlas/005-diagnostics.sql +0 -66
- package/src/migrations/atlas/006-diagnostic-summaries.sql +0 -65
- package/src/migrations/atlas/007-diagnostic-slice.sql +0 -83
- package/src/migrations/load-sql.ts +0 -133
- package/src/schemas/api.ts +0 -92
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WAL policy for every LocalDB connection (D-WAL).
|
|
3
|
+
*
|
|
4
|
+
* The 2026-08-31 and 2026-09-27 disk incidents were the same defect: a WAL
|
|
5
|
+
* held open by long-lived processes grew without bound (63 GB, then 37.6 GB)
|
|
6
|
+
* because the pool only ever issued `wal_checkpoint(PASSIVE)` on close and set
|
|
7
|
+
* no `journal_size_limit`. Those processes are expected to run, so the bound
|
|
8
|
+
* lives here, not in killing holders:
|
|
9
|
+
*
|
|
10
|
+
* - `journal_size_limit` caps the bytes a WAL is truncated back to whenever it
|
|
11
|
+
* resets. It is enforced only at checkpoint boundaries, so it never ships
|
|
12
|
+
* alone.
|
|
13
|
+
* - The pool makes ONE checkpoint attempt per idle window, never blocking:
|
|
14
|
+
* the attempt runs with a zero busy timeout, so a reader or writer in
|
|
15
|
+
* another process makes it return busy at once instead of parking the
|
|
16
|
+
* event loop. The mode is `TRUNCATE`; after a busy attempt the next window
|
|
17
|
+
* falls back to `RESTART`, then alternates. Busy attempts back off by
|
|
18
|
+
* skipping whole windows (1, 2, 4, 8 …, capped) on the lifecycle-owned
|
|
19
|
+
* tick — no second timer, no retry loop.
|
|
20
|
+
* - Every attempt's `(busy, log, checkpointed)` result is observed and
|
|
21
|
+
* returned, so "the checkpoint ran" and "the checkpoint did anything" are
|
|
22
|
+
* distinguishable.
|
|
23
|
+
*
|
|
24
|
+
* Nothing in this module (or the pool) ever deletes a raw `-wal` or `-shm`
|
|
25
|
+
* file: un-checkpointed rows live only in the WAL.
|
|
26
|
+
*/
|
|
27
|
+
import * as z from 'zod/v4';
|
|
28
|
+
/** Bytes the WAL is truncated back to when it resets. */
|
|
29
|
+
export const WAL_JOURNAL_SIZE_LIMIT_BYTES = 64 * 1024 * 1024;
|
|
30
|
+
/** Busy timeout for a checkpoint attempt: zero, so an attempt never blocks. */
|
|
31
|
+
export const WAL_CHECKPOINT_BUSY_TIMEOUT_MS = 0;
|
|
32
|
+
/** Longest backoff after consecutive busy attempts, in maintenance windows. */
|
|
33
|
+
export const WAL_MAX_BACKOFF_WINDOWS = 8;
|
|
34
|
+
/** Consecutive busy outcomes on one connection before the pool reports starvation. */
|
|
35
|
+
export const WAL_BUSY_STARVATION_THRESHOLD = 3;
|
|
36
|
+
/** Longest a pooled connection may hold an open transaction across maintenance ticks. */
|
|
37
|
+
export const MAX_TRANSACTION_AGE_MS = 60_000;
|
|
38
|
+
/** Period of the pool's lifecycle-owned maintenance tick (idle checkpoint, transaction bound, stale close). */
|
|
39
|
+
export const WAL_MAINTENANCE_INTERVAL_MS = 30_000;
|
|
40
|
+
/** The mode for the attempt after `previous` came back busy: TRUNCATE falls back to RESTART, then alternates. */
|
|
41
|
+
export function nextCheckpointMode(previous, status) {
|
|
42
|
+
if (status !== 'busy')
|
|
43
|
+
return 'TRUNCATE';
|
|
44
|
+
return previous === 'TRUNCATE' ? 'RESTART' : 'TRUNCATE';
|
|
45
|
+
}
|
|
46
|
+
/** Windows to skip after `consecutiveBusy` busy attempts: 1, 2, 4, … capped at {@link WAL_MAX_BACKOFF_WINDOWS}. */
|
|
47
|
+
export function checkpointBackoffWindows(consecutiveBusy) {
|
|
48
|
+
if (consecutiveBusy <= 0)
|
|
49
|
+
return 0;
|
|
50
|
+
return Math.min(WAL_MAX_BACKOFF_WINDOWS, 2 ** (consecutiveBusy - 1));
|
|
51
|
+
}
|
|
52
|
+
/** Returns the pragma statements that every LocalDB connection must run. */
|
|
53
|
+
export function localDatabasePragmaStatements() {
|
|
54
|
+
return [
|
|
55
|
+
// Must run before the first table is created. On an existing file this is
|
|
56
|
+
// a no-op until a full VACUUM; `storage/retention/reclaim.ts` adopts those.
|
|
57
|
+
// Without it, DELETE returns zero disk: freed pages sit on the freelist.
|
|
58
|
+
// `incremental` rather than `full` keeps the per-commit write cost off the
|
|
59
|
+
// hot path; `PRAGMA incremental_vacuum` returns pages on demand.
|
|
60
|
+
'PRAGMA auto_vacuum = INCREMENTAL;',
|
|
61
|
+
// Readers don't block writers, writers don't block readers.
|
|
62
|
+
'PRAGMA journal_mode = WAL;',
|
|
63
|
+
// Bounds the WAL's on-disk bytes whenever it resets (D-WAL).
|
|
64
|
+
`PRAGMA journal_size_limit = ${WAL_JOURNAL_SIZE_LIMIT_BYTES};`,
|
|
65
|
+
'PRAGMA foreign_keys = ON;',
|
|
66
|
+
// NORMAL is safe with WAL and much faster.
|
|
67
|
+
'PRAGMA synchronous = NORMAL;',
|
|
68
|
+
'PRAGMA temp_store = MEMORY;'
|
|
69
|
+
];
|
|
70
|
+
}
|
|
71
|
+
/** Apply the connection pragmas every LocalDB connection carries. */
|
|
72
|
+
export function applyLocalDatabasePragmas(exec) {
|
|
73
|
+
for (const stmt of localDatabasePragmaStatements()) {
|
|
74
|
+
exec(stmt);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
/** `PRAGMA wal_checkpoint(<mode>)`'s one result row. */
|
|
78
|
+
const CheckpointRowSchema = z.object({ busy: z.number(), log: z.number(), checkpointed: z.number() });
|
|
79
|
+
/** `PRAGMA busy_timeout`'s one result row. */
|
|
80
|
+
const BusyTimeoutRowSchema = z.object({ timeout: z.number() });
|
|
81
|
+
function runCheckpoint(db, mode) {
|
|
82
|
+
const row = CheckpointRowSchema.parse(db.prepare(`PRAGMA wal_checkpoint(${mode});`).get());
|
|
83
|
+
return { mode, busy: row.busy, log: row.log, checkpointed: row.checkpointed };
|
|
84
|
+
}
|
|
85
|
+
function classify(attempt) {
|
|
86
|
+
if (attempt.log === -1)
|
|
87
|
+
return 'not-wal';
|
|
88
|
+
// No committed frames: a busy result here only means another holder's
|
|
89
|
+
// write transaction had the lock. There is nothing to checkpoint or bound.
|
|
90
|
+
if (attempt.log === 0)
|
|
91
|
+
return 'complete';
|
|
92
|
+
if (attempt.busy !== 0 || attempt.checkpointed < attempt.log)
|
|
93
|
+
return 'busy';
|
|
94
|
+
return 'complete';
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* One checkpoint attempt in `mode`, never blocking: the connection's busy
|
|
98
|
+
* timeout is zero for the attempt and restored on every exit path.
|
|
99
|
+
*
|
|
100
|
+
* Throws only when SQLite itself raises (a closed handle, or a checkpoint issued
|
|
101
|
+
* inside this connection's own open transaction) or answers no result row; a busy result is returned, not
|
|
102
|
+
* thrown, so the caller can observe, report and back off.
|
|
103
|
+
*/
|
|
104
|
+
export function checkpointWal(db, mode = 'TRUNCATE') {
|
|
105
|
+
const previous = BusyTimeoutRowSchema.parse(db.prepare('PRAGMA busy_timeout;').get());
|
|
106
|
+
db.exec(`PRAGMA busy_timeout = ${WAL_CHECKPOINT_BUSY_TIMEOUT_MS};`);
|
|
107
|
+
try {
|
|
108
|
+
const attempt = runCheckpoint(db, mode);
|
|
109
|
+
return { ...attempt, status: classify(attempt) };
|
|
110
|
+
}
|
|
111
|
+
finally {
|
|
112
|
+
db.exec(`PRAGMA busy_timeout = ${previous.timeout};`);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
//# sourceMappingURL=wal-policy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wal-policy.js","sourceRoot":"","sources":["../../src/core/wal-policy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAG5B,yDAAyD;AACzD,MAAM,CAAC,MAAM,4BAA4B,GAAG,EAAE,GAAG,IAAI,GAAG,IAAI,CAAC;AAE7D,+EAA+E;AAC/E,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAAC,CAAC;AAEhD,+EAA+E;AAC/E,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC;AAEzC,sFAAsF;AACtF,MAAM,CAAC,MAAM,6BAA6B,GAAG,CAAC,CAAC;AAE/C,yFAAyF;AACzF,MAAM,CAAC,MAAM,sBAAsB,GAAG,MAAM,CAAC;AAE7C,+GAA+G;AAC/G,MAAM,CAAC,MAAM,2BAA2B,GAAG,MAAM,CAAC;AAmClD,iHAAiH;AACjH,MAAM,UAAU,kBAAkB,CAAC,QAA2B,EAAE,MAA2B;IAC1F,IAAI,MAAM,KAAK,MAAM;QAAE,OAAO,UAAU,CAAC;IACzC,OAAO,QAAQ,KAAK,UAAU,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,UAAU,CAAC;AACzD,CAAC;AAED,mHAAmH;AACnH,MAAM,UAAU,wBAAwB,CAAC,eAAuB;IAC/D,IAAI,eAAe,IAAI,CAAC;QAAE,OAAO,CAAC,CAAC;IACnC,OAAO,IAAI,CAAC,GAAG,CAAC,uBAAuB,EAAE,CAAC,IAAI,CAAC,eAAe,GAAG,CAAC,CAAC,CAAC,CAAC;AACtE,CAAC;AAED,4EAA4E;AAC5E,MAAM,UAAU,6BAA6B;IAC5C,OAAO;QACN,0EAA0E;QAC1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GAAG,KAAK,CAAC;QAAE,OAAO,UAAU,CAAC;IACzC,IAAI,OAAO,CAAC,IAAI,KAAK,CAAC,IAAI,OAAO,CAAC,YAAY,GAAG,OAAO,CAAC,GAAG;QAAE,OAAO,MAAM,CAAC;IAC5E,OAAO,UAAU,CAAC;AACnB,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,aAAa,CAAC,EAAoB,EAAE,OAA0B,UAAU;IACvF,MAAM,QAAQ,GAAG,oBAAoB,CAAC,KAAK,CAAC,EAAE,CAAC,OAAO,CAAC,sBAAsB,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC;IACtF,EAAE,CAAC,IAAI,CAAC,yBAAyB,8BAA8B,GAAG,CAAC,CAAC;IACpE,IAAI,CAAC;QACJ,MAAM,OAAO,GAAG,aAAa,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC;QACxC,OAAO,EAAE,GAAG,OAAO,EAAE,MAAM,EAAE,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC;IAClD,CAAC;YAAS,CAAC;QACV,EAAE,CAAC,IAAI,CAAC,yBAAyB,QAAQ,CAAC,OAAO,GAAG,CAAC,CAAC;IACvD,CAAC;AACF,CAAC"}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Groups LocalDB development commands under `vibes dev localdb`.
|
|
5
5
|
*/
|
|
6
|
-
import type { CLIGroupAssetDescriptor } from '@vibesdotdev/
|
|
6
|
+
import type { CLIGroupAssetDescriptor } from '@vibesdotdev/kernel/schemas/asset';
|
|
7
7
|
declare const descriptor: CLIGroupAssetDescriptor;
|
|
8
8
|
export default descriptor;
|
|
9
9
|
//# sourceMappingURL=dev.localdb.cli-group.descriptor.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dev.localdb.cli-group.descriptor.d.ts","sourceRoot":"","sources":["../src/dev.localdb.cli-group.descriptor.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"dev.localdb.cli-group.descriptor.d.ts","sourceRoot":"","sources":["../src/dev.localdb.cli-group.descriptor.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,mCAAmC,CAAC;AAEjF,QAAA,MAAM,UAAU,EAAE,uBASjB,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -12,10 +12,24 @@ declare const _default: {
|
|
|
12
12
|
hardware?: string[] | undefined;
|
|
13
13
|
enabled?: boolean | undefined;
|
|
14
14
|
priority?: number | undefined;
|
|
15
|
+
capabilityId?: string | undefined;
|
|
15
16
|
requiredContext?: string[] | undefined;
|
|
16
17
|
optionalContext?: string[] | undefined;
|
|
17
|
-
|
|
18
|
+
retention?: string | {
|
|
19
|
+
reason: string;
|
|
20
|
+
maxAgeDays?: number | undefined;
|
|
21
|
+
maxEntries?: number | undefined;
|
|
22
|
+
maxBytes?: number | undefined;
|
|
23
|
+
cascadeFrom?: string | undefined;
|
|
24
|
+
ageField?: string | undefined;
|
|
25
|
+
enforcedBy?: string | undefined;
|
|
26
|
+
} | undefined;
|
|
27
|
+
valueKind?: "data" | "service" | undefined;
|
|
18
28
|
valueSchema?: unknown;
|
|
29
|
+
config?: {
|
|
30
|
+
sources: ("literal" | "workspace" | "floor")[];
|
|
31
|
+
subset?: true | undefined;
|
|
32
|
+
} | undefined;
|
|
19
33
|
};
|
|
20
34
|
export default _default;
|
|
21
35
|
//# sourceMappingURL=dev.localdb.context.descriptor.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dev.localdb.context.descriptor.d.ts","sourceRoot":"","sources":["../src/dev.localdb.context.descriptor.ts"],"names":[],"mappings":"AAAA;;;;GAIG
|
|
1
|
+
{"version":3,"file":"dev.localdb.context.descriptor.d.ts","sourceRoot":"","sources":["../src/dev.localdb.context.descriptor.ts"],"names":[],"mappings":"AAAA;;;;GAIG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIH,wBAIG"}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Provides LocalDB API for dev commands and workflows.
|
|
5
5
|
*/
|
|
6
|
-
import { createContextDescriptor } from '@vibesdotdev/
|
|
6
|
+
import { createContextDescriptor } from '@vibesdotdev/kernel';
|
|
7
7
|
export default createContextDescriptor({
|
|
8
8
|
id: 'dev/localdb',
|
|
9
9
|
description: 'LocalDB API for managing local SQLite databases.',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dev.localdb.context.descriptor.js","sourceRoot":"","sources":["../src/dev.localdb.context.descriptor.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,uBAAuB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"dev.localdb.context.descriptor.js","sourceRoot":"","sources":["../src/dev.localdb.context.descriptor.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAE9D,eAAe,uBAAuB,CAAC;IACtC,EAAE,EAAE,aAAa;IACjB,WAAW,EAAE,kDAAkD;IAC/D,QAAQ,EAAE,CAAC,UAAU,CAAC;CACtB,CAAC,CAAC"}
|
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Dev LocalDB Context Implementation (Consumer)
|
|
3
|
+
*
|
|
4
|
+
* Resolves to the runtime's owned `localdb` runtime/client — the same
|
|
5
|
+
* semantic owner every other caller on this runtime sees — instead of
|
|
6
|
+
* constructing another manager.
|
|
3
7
|
*/
|
|
4
|
-
import type {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
8
|
+
import type { KindContext, RuntimeDescriptor } from '@vibesdotdev/kernel';
|
|
9
|
+
import type { LocaldbApi } from './schemas/api.ts';
|
|
10
|
+
/** The kernel re-evaluates context values per call; the client stays cached per runtime. */
|
|
11
|
+
export default class LocaldbContext {
|
|
12
|
+
private readonly context;
|
|
13
|
+
constructor(_descriptor: RuntimeDescriptor, context: KindContext);
|
|
14
|
+
provide(): Promise<LocaldbApi>;
|
|
15
|
+
}
|
|
9
16
|
//# sourceMappingURL=dev.localdb.context.impl.consumer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dev.localdb.context.impl.consumer.d.ts","sourceRoot":"","sources":["../src/dev.localdb.context.impl.consumer.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"dev.localdb.context.impl.consumer.d.ts","sourceRoot":"","sources":["../src/dev.localdb.context.impl.consumer.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAE1E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEnD,4FAA4F;AAC5F,MAAM,CAAC,OAAO,OAAO,cAAc;IACU,OAAO,CAAC,QAAQ,CAAC,OAAO;gBAAxD,WAAW,EAAE,iBAAiB,EAAmB,OAAO,EAAE,WAAW;IACjF,OAAO,IAAI,OAAO,CAAC,UAAU,CAAC;CAG9B"}
|
|
@@ -1,10 +1,19 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Dev LocalDB Context Implementation (Consumer)
|
|
3
|
+
*
|
|
4
|
+
* Resolves to the runtime's owned `localdb` runtime/client — the same
|
|
5
|
+
* semantic owner every other caller on this runtime sees — instead of
|
|
6
|
+
* constructing another manager.
|
|
3
7
|
*/
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
+
import { resolveLocaldbClient } from "./core/database.js";
|
|
9
|
+
/** The kernel re-evaluates context values per call; the client stays cached per runtime. */
|
|
10
|
+
export default class LocaldbContext {
|
|
11
|
+
context;
|
|
12
|
+
constructor(_descriptor, context) {
|
|
13
|
+
this.context = context;
|
|
8
14
|
}
|
|
9
|
-
|
|
15
|
+
provide() {
|
|
16
|
+
return resolveLocaldbClient(this.context.runtime);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
10
19
|
//# sourceMappingURL=dev.localdb.context.impl.consumer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dev.localdb.context.impl.consumer.js","sourceRoot":"","sources":["../src/dev.localdb.context.impl.consumer.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"dev.localdb.context.impl.consumer.js","sourceRoot":"","sources":["../src/dev.localdb.context.impl.consumer.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAG1D,4FAA4F;AAC5F,MAAM,CAAC,OAAO,OAAO,cAAc;IAC2B;IAA7D,YAAY,WAA8B,EAAmB,OAAoB;QAApB,YAAO,GAAP,OAAO,CAAa;IAAG,CAAC;IACrF,OAAO;QACN,OAAO,oBAAoB,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;IACnD,CAAC;CACD"}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The shared provider side of LocalDB's SQLite driver kind
|
|
3
|
+
* (`localdb/sqlite-driver`, `./sqlite-driver`): the base each host's driver
|
|
4
|
+
* composes (`./sqlite-driver/base`).
|
|
5
|
+
*
|
|
6
|
+
* Every untrusted input a driver reads (the open request, bound parameters,
|
|
7
|
+
* SQL text) goes through one guard here, and every host failure is classified
|
|
8
|
+
* here into a typed `CapabilityError`, so every host refuses alike. The
|
|
9
|
+
* transaction runner is here too. Nothing here reads a host API: a host lends
|
|
10
|
+
* its path rules and file facts (`SqliteDriverHost`) to the two guards that
|
|
11
|
+
* need them, and each host package keeps its own SQLite binding.
|
|
12
|
+
*/
|
|
13
|
+
import { CapabilityError, type CaughtFailure, type ValueFreeFailure } from '@vibesdotdev/kernel';
|
|
14
|
+
import * as z from 'zod/v4';
|
|
15
|
+
import { type SqliteBinding, type SqliteFailureCondition, type SqliteOpenOptions, type SqliteRow, type SqliteTransactionOptions, type SqliteValue } from './sqlite-driver.ts';
|
|
16
|
+
import type { SqliteDriverHost, SqliteFailureDescription, SqliteHostFailure, SqliteOpenRequest, SqliteTransactionTarget } from '../schemas/sqlite-driver-base.ts';
|
|
17
|
+
export { LOCALDB_SQLITE_DRIVER_KIND, SQLITE_DRIVER_REFUSALS, sqliteDriverKind, type SqliteBinding, type SqliteConnection, type SqliteDriver, type SqliteOpenOptions, type SqliteRow, type SqliteRunResult, type SqliteStatement, type SqliteTransactionOptions, type SqliteValue } from './sqlite-driver.ts';
|
|
18
|
+
export type { SqliteDriverHost, SqliteFailureDescription, SqliteHostFailure, SqliteOpenRequest, SqliteTransactionTarget } from '../schemas/sqlite-driver-base.ts';
|
|
19
|
+
/** The in-memory database name SQLite reserves. */
|
|
20
|
+
export declare const SQLITE_MEMORY_PATH = ":memory:";
|
|
21
|
+
/** Put a redacted failure's bounded facts in public details without retaining the thrown value. */
|
|
22
|
+
export declare function sqliteFailureFacts(prefix: string, failure: ValueFreeFailure): {
|
|
23
|
+
[x: string]: string;
|
|
24
|
+
};
|
|
25
|
+
/** A driver refusal containing only the contract's fixed, bounded facts. */
|
|
26
|
+
export declare class SqliteDriverFailure extends CapabilityError {
|
|
27
|
+
constructor(failure: SqliteFailureDescription);
|
|
28
|
+
}
|
|
29
|
+
/** Construct a cause-free driver refusal from the contract's fixed facts. */
|
|
30
|
+
export declare function sqliteDriverFailure(failure: SqliteFailureDescription): CapabilityError;
|
|
31
|
+
/**
|
|
32
|
+
* Read an open request once. `path` is `:memory:` or a path the host calls
|
|
33
|
+
* absolute (`host.isAbsolutePath`); `options` is absent or an object whose
|
|
34
|
+
* `create`/`readonly` fields are booleans when present. Any other value — a
|
|
35
|
+
* throwing getter, a Proxy (revoked included), a non-string path, or Zod
|
|
36
|
+
* failing while it reads — refuses the fixed `INVALID_INPUT
|
|
37
|
+
* sqlite-open-invalid` without retaining the hostile value or thrown error.
|
|
38
|
+
*/
|
|
39
|
+
export declare function readSqliteOpenRequest(host: SqliteDriverHost, path: string, options?: SqliteOpenOptions): SqliteOpenRequest;
|
|
40
|
+
/**
|
|
41
|
+
* Read positional parameters once. Each is a {@link SqliteBinding} (numbers
|
|
42
|
+
* finite; booleans bind as 1 or 0); bytes are copied (a Proxy over a `Uint8Array` passes `instanceof`
|
|
43
|
+
* but cannot be copied, and refuses). Anything else refuses `INVALID_INPUT
|
|
44
|
+
* sqlite-binding-invalid` naming the position.
|
|
45
|
+
*/
|
|
46
|
+
export declare function readSqliteParams(params: readonly SqliteBinding[]): SqliteValue[];
|
|
47
|
+
/** Read SQL text once: a string, or `INVALID_INPUT sqlite-sql-invalid`. */
|
|
48
|
+
export declare function readSqliteSql(sql: string): string;
|
|
49
|
+
/** The primary result code of an (extended) SQLite result code. */
|
|
50
|
+
export declare function primaryResultCode(errcode: number): number;
|
|
51
|
+
/** The text a host SQLite error carries: bounded, read only to classify it, never repeated. */
|
|
52
|
+
export declare const SqliteHostErrorSchema: z.ZodObject<{
|
|
53
|
+
message: z.ZodString;
|
|
54
|
+
}, z.core.$strip>;
|
|
55
|
+
/**
|
|
56
|
+
* Read a host SQLite error once without trusting its prototype, getters or
|
|
57
|
+
* message. Only an integer result code and bounded text used for fixed
|
|
58
|
+
* classification leave this function; the host error itself never does.
|
|
59
|
+
*/
|
|
60
|
+
export declare function readSqliteHostFailure(failure: CaughtFailure, codeField: 'errcode' | 'errno'): SqliteHostFailure;
|
|
61
|
+
/** Merge any failure encountered while reading host fields into bounded refusal details. */
|
|
62
|
+
export declare function sqliteHostFailureDetails(host: SqliteHostFailure, details?: Readonly<Record<string, number | string>>): Readonly<Record<string, number | string>> | undefined;
|
|
63
|
+
/**
|
|
64
|
+
* The fixed condition a failed statement hit, from SQLite's extended result
|
|
65
|
+
* code and (only to classify it) SQLite's text; the text itself is dropped.
|
|
66
|
+
*/
|
|
67
|
+
export declare function sqliteFailureConditionOf(errcode: number | undefined, sqliteText: string | undefined): SqliteFailureCondition | undefined;
|
|
68
|
+
/**
|
|
69
|
+
* Describe a failed statement by its SQLite result code (`undefined` when the
|
|
70
|
+
* host error carries none) and SQLite's text, read only to classify it into a
|
|
71
|
+
* fixed `details.condition`: `SQLITE_BUSY`/`SQLITE_LOCKED` are `CONFLICT
|
|
72
|
+
* sqlite-busy` (retryable), anything else `INTERNAL sqlite-statement-failed`;
|
|
73
|
+
* `details.errcode` is the primary code.
|
|
74
|
+
*/
|
|
75
|
+
export declare function describeStatementFailure(errcode: number | undefined, sqliteText?: string): SqliteFailureDescription;
|
|
76
|
+
/**
|
|
77
|
+
* Describe a failed host open: busy is `sqlite-busy`; anything else is
|
|
78
|
+
* `UNAVAILABLE sqlite-open-failed`. Only the filesystem preflight below may
|
|
79
|
+
* classify a path as `sqlite-database-missing`.
|
|
80
|
+
*/
|
|
81
|
+
export declare function describeOpenFailure(_request: SqliteOpenRequest, errcode: number | undefined): SqliteFailureDescription;
|
|
82
|
+
/** `NOT_FOUND sqlite-database-missing`: the request did not allow creating a missing file. */
|
|
83
|
+
export declare const DATABASE_MISSING: SqliteFailureDescription;
|
|
84
|
+
/**
|
|
85
|
+
* Prove a non-creating open names an existing filesystem entry, through the
|
|
86
|
+
* host's `statPath`. Only the filesystem's missing-path conditions (ENOENT,
|
|
87
|
+
* ENOTDIR) become `sqlite-database-missing`;
|
|
88
|
+
* denied, malformed and I/O failures remain `sqlite-open-failed`.
|
|
89
|
+
*/
|
|
90
|
+
export declare function requireExistingSqliteFile(host: SqliteDriverHost, request: SqliteOpenRequest): void;
|
|
91
|
+
/** `UNAVAILABLE sqlite-connection-closed`. */
|
|
92
|
+
export declare const CONNECTION_CLOSED: SqliteFailureDescription;
|
|
93
|
+
/** `INTERNAL sqlite-close-failed`. */
|
|
94
|
+
export declare const CLOSE_FAILED: SqliteFailureDescription;
|
|
95
|
+
/** A row the host returned, as a plain object (Node returns null-prototype rows). */
|
|
96
|
+
export declare function plainRow<TRow extends SqliteRow>(row: TRow): TRow;
|
|
97
|
+
/**
|
|
98
|
+
* The one transaction runner every host uses: BEGIN (IMMEDIATE when asked), run, COMMIT; ROLLBACK and
|
|
99
|
+
* rethrow when `run` throws or SQLite refuses the COMMIT. Inside an open
|
|
100
|
+
* transaction it uses a savepoint (`SAVEPOINT`, `RELEASE`; `ROLLBACK TO` then
|
|
101
|
+
* `RELEASE` on a throw). `run` is synchronous: a Promise result is rolled
|
|
102
|
+
* back and refused `INVALID_INPUT sqlite-transaction-async`, because the work
|
|
103
|
+
* it stands for would run after the commit. A rollback that itself fails is
|
|
104
|
+
* reported as one fixed, cause-free refusal; neither host failure escapes.
|
|
105
|
+
*/
|
|
106
|
+
export declare function runSqliteTransaction<T>(target: SqliteTransactionTarget, savepoint: string, run: () => T, options?: SqliteTransactionOptions): T;
|
|
107
|
+
//# sourceMappingURL=sqlite-driver.base.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sqlite-driver.base.d.ts","sourceRoot":"","sources":["../../src/driver/sqlite-driver.base.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,EACN,eAAe,EAGf,KAAK,aAAa,EAClB,KAAK,gBAAgB,EACrB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,OAAO,EAEN,KAAK,aAAa,EAClB,KAAK,sBAAsB,EAC3B,KAAK,iBAAiB,EACtB,KAAK,SAAS,EACd,KAAK,wBAAwB,EAC7B,KAAK,WAAW,EAChB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,KAAK,EACX,gBAAgB,EAChB,wBAAwB,EACxB,iBAAiB,EACjB,iBAAiB,EACjB,uBAAuB,EACvB,MAAM,kCAAkC,CAAC;AAE1C,OAAO,EACN,0BAA0B,EAC1B,sBAAsB,EACtB,gBAAgB,EAChB,KAAK,aAAa,EAClB,KAAK,gBAAgB,EACrB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