@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 CHANGED
@@ -3,5 +3,5 @@
3
3
  ## Unreleased
4
4
  - Initial public packaging for @mcoda/db.
5
5
 
6
- ## 0.1.7
6
+ ## 0.1.8
7
7
  - Initial release.
package/README.md CHANGED
@@ -1,9 +1,28 @@
1
1
  # @mcoda/db
2
2
 
3
- SQLite-backed storage layer for mcoda.
3
+ SQLite-backed storage for mcoda global and workspace state.
4
4
 
5
- ## Usage
6
- This package is primarily an internal dependency of `mcoda`.
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.7",
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.7"
35
+ "@mcoda/shared": "0.1.8"
36
36
  },
37
37
  "scripts": {
38
38
  "build": "tsc -p tsconfig.json",