@the-brain/adapter-sqlite 0.2.0 → 0.2.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.
Files changed (2) hide show
  1. package/README.md +38 -0
  2. package/package.json +1 -1
package/README.md ADDED
@@ -0,0 +1,38 @@
1
+ # @the-brain/adapter-sqlite
2
+
3
+ SQLite storage adapter for [@the-brain/core](https://www.npmjs.com/package/@the-brain/core).
4
+
5
+ Zero-config, single-file database. No server required. Good for local tools, CLI apps, and desktop agents.
6
+
7
+ ## Requirements
8
+
9
+ Node.js >= 22.5.0 (uses built-in `node:sqlite`)
10
+
11
+ ## Install
12
+
13
+ ```bash
14
+ npm install @the-brain/adapter-sqlite
15
+ ```
16
+
17
+ ## Usage
18
+
19
+ ```typescript
20
+ import { Brain, OpenAICompatibleAdapter } from "@the-brain/core";
21
+ import { SQLiteStorageAdapter } from "@the-brain/adapter-sqlite";
22
+
23
+ const brain = new Brain(
24
+ new OpenAICompatibleAdapter(
25
+ "http://localhost:11434/v1/chat/completions",
26
+ "llama3.2"
27
+ ),
28
+ new SQLiteStorageAdapter("./.brain") // path to storage directory
29
+ );
30
+
31
+ await brain.loadActions();
32
+ ```
33
+
34
+ Database is stored at `./.brain/brain.db`. Schema is created automatically on first run.
35
+
36
+ ## License
37
+
38
+ AGPL-3.0 — [github.com/greg00ry/the-brain](https://github.com/greg00ry/the-brain)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@the-brain/adapter-sqlite",
3
- "version": "0.2.0",
3
+ "version": "0.2.2",
4
4
  "description": "SQLite storage adapter for @the-brain/core — zero-config, single-file database",
5
5
  "license": "AGPL-3.0",
6
6
  "publishConfig": {