@mcoda/db 0.1.7 → 0.1.8
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/CHANGELOG.md +1 -1
- package/README.md +22 -3
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -1,9 +1,28 @@
|
|
|
1
1
|
# @mcoda/db
|
|
2
2
|
|
|
3
|
-
SQLite-backed storage
|
|
3
|
+
SQLite-backed storage for mcoda global and workspace state.
|
|
4
4
|
|
|
5
|
-
##
|
|
6
|
-
|
|
5
|
+
## Install
|
|
6
|
+
- Requires Node.js >= 20.
|
|
7
|
+
- Install: `npm i @mcoda/db`
|
|
8
|
+
|
|
9
|
+
## What it provides
|
|
10
|
+
- Connection helpers for global/workspace databases.
|
|
11
|
+
- Migrations for global agent registry and workspace task data.
|
|
12
|
+
- Repositories for common queries (GlobalRepository, WorkspaceRepository).
|
|
13
|
+
|
|
14
|
+
## Example
|
|
15
|
+
```ts
|
|
16
|
+
import { Connection, WorkspaceMigrations } from "@mcoda/db";
|
|
17
|
+
|
|
18
|
+
const conn = await Connection.openWorkspace();
|
|
19
|
+
await WorkspaceMigrations.run(conn.db);
|
|
20
|
+
await conn.close();
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Notes
|
|
24
|
+
- Uses sqlite3 native bindings.
|
|
25
|
+
- Primarily used by the mcoda CLI; APIs may evolve.
|
|
7
26
|
|
|
8
27
|
## License
|
|
9
28
|
MIT - see `LICENSE`.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mcoda/db",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.8",
|
|
4
4
|
"description": "SQLite-backed storage layer for mcoda.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"sqlite": "^5.1.1",
|
|
34
34
|
"sqlite3": "^5.1.7",
|
|
35
|
-
"@mcoda/shared": "0.1.
|
|
35
|
+
"@mcoda/shared": "0.1.8"
|
|
36
36
|
},
|
|
37
37
|
"scripts": {
|
|
38
38
|
"build": "tsc -p tsconfig.json",
|