pi-session-memory 0.1.2 → 0.1.3
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/README.md +2 -20
- package/package.json +1 -1
- package/spec.md +2 -1
- package/tests/core.test.ts +2 -1
package/README.md
CHANGED
|
@@ -5,8 +5,6 @@
|
|
|
5
5
|
|
|
6
6
|
A local-first Pi extension that saves completed conversations to SQLite and gives the agent a `recall_memory` tool for retrieving relevant discussions from previous Pi, Claude Code, and Codex sessions.
|
|
7
7
|
|
|
8
|
-
> **Paper:** An accompanying arXiv paper is planned. [arXiv:XXXX.XXXXX](https://arxiv.org/abs/XXXX.XXXXX) *(placeholder; not published yet)*
|
|
9
|
-
|
|
10
8
|
## Features
|
|
11
9
|
|
|
12
10
|
- Persists completed Pi conversations in `~/.pi/agent/memory.db`.
|
|
@@ -19,13 +17,13 @@ A local-first Pi extension that saves completed conversations to SQLite and give
|
|
|
19
17
|
## Installation
|
|
20
18
|
|
|
21
19
|
```bash
|
|
22
|
-
pi install npm:pi-session-memory@0.1.
|
|
20
|
+
pi install npm:pi-session-memory@0.1.3
|
|
23
21
|
```
|
|
24
22
|
|
|
25
23
|
To try the package without installing it permanently:
|
|
26
24
|
|
|
27
25
|
```bash
|
|
28
|
-
pi -e npm:pi-session-memory@0.1.
|
|
26
|
+
pi -e npm:pi-session-memory@0.1.3
|
|
29
27
|
```
|
|
30
28
|
|
|
31
29
|
## Usage
|
|
@@ -86,19 +84,3 @@ Conversation data is stored and queried locally. This package does not add a rem
|
|
|
86
84
|
```bash
|
|
87
85
|
npm test
|
|
88
86
|
```
|
|
89
|
-
|
|
90
|
-
## Paper placeholder
|
|
91
|
-
|
|
92
|
-
```bibtex
|
|
93
|
-
@article{pi-session-memory-2026,
|
|
94
|
-
title = {Persistent Local-First Cross-Session Memory for Coding Agents},
|
|
95
|
-
author = {Anonymous},
|
|
96
|
-
year = {2026},
|
|
97
|
-
eprint = {XXXX.XXXXX},
|
|
98
|
-
archivePrefix = {arXiv},
|
|
99
|
-
primaryClass = {cs.AI},
|
|
100
|
-
note = {Placeholder; preprint forthcoming}
|
|
101
|
-
}
|
|
102
|
-
```
|
|
103
|
-
|
|
104
|
-
Replace the title, authors, arXiv identifier, and citation metadata after the preprint is submitted.
|
package/package.json
CHANGED
package/spec.md
CHANGED
|
@@ -149,5 +149,6 @@ pi-session-memory/
|
|
|
149
149
|
|
|
150
150
|
- Zero external dependencies (use `node:sqlite`, `node:fs`, `node:path`, `node:os`)
|
|
151
151
|
- Idempotent writes (INSERT OR IGNORE on turn_id)
|
|
152
|
-
-
|
|
152
|
+
- Cross-platform paths: storage is `join(homedir(), ".pi", "agent", "memory.db")`; source roots are derived with `join(homedir(), ...)`, never hard-coded POSIX paths.
|
|
153
|
+
- Requires a Pi-supported Node.js runtime that exposes `node:sqlite` (`DatabaseSync`).
|
|
153
154
|
- No fallback / silent failure — let errors surface
|
package/tests/core.test.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import assert from "node:assert/strict";
|
|
2
2
|
import { existsSync, rmSync } from "node:fs";
|
|
3
|
+
import { tmpdir } from "node:os";
|
|
3
4
|
import { join } from "node:path";
|
|
4
5
|
|
|
5
|
-
const dbPath = join(
|
|
6
|
+
const dbPath = join(tmpdir(), `pi-session-memory-${process.pid}.db`);
|
|
6
7
|
process.env.MEMORY_DB_PATH = dbPath;
|
|
7
8
|
|
|
8
9
|
const { getDb, insertTurn, upsertSession } = await import("../src/db.ts");
|