mirror of
https://github.com/badlogic/pi-mono.git
synced 2026-08-17 04:33:45 +00:00
15 lines
641 B
Markdown
15 lines
641 B
Markdown
# @earendil-works/pi-storage-sqlite-node
|
|
|
|
Node sqlite storage backend for `@earendil-works/pi-agent-core` sessions. Provides the
|
|
`node:sqlite` adapter (`SqliteDatabase` implementation), SQLite session repository,
|
|
migrations, materialized views, and optional FTS search.
|
|
|
|
```ts
|
|
await using repository = new SqliteSessionRepository(options);
|
|
const search = createSqliteSessionSearch(options);
|
|
const session = await repository.create({ cwd });
|
|
const hits = await search.search({ text: "needle" });
|
|
```
|
|
|
|
The repository lazily owns one shared database connection. Search is an independent,
|
|
query-only projection over the same canonical database.
|