@henryqw/pi-session-recall 1.0.1 → 1.0.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.
- package/README.md +21 -22
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,14 +1,9 @@
|
|
|
1
1
|
# `@henryqw/pi-session-recall`
|
|
2
2
|
|
|
3
|
-
Find decisions and context in past Pi sessions through a local FTS5 index with no model calls.
|
|
3
|
+
Find decisions and context in past Pi sessions through a local FTS5 index with no model calls. Local search recalls earlier work without carrying every transcript in current context or adding standing prompt cost.
|
|
4
4
|
|
|
5
5
|
The bundled `pi-session-pattern-miner` skill finds repeated work that may deserve automation.
|
|
6
6
|
|
|
7
|
-
## Why
|
|
8
|
-
|
|
9
|
-
- **Created for**: Pi users who need earlier decisions without carrying every transcript in current context.
|
|
10
|
-
- **Advantage**: Search stays local and adds no standing prompt cost.
|
|
11
|
-
|
|
12
7
|
## Install
|
|
13
8
|
|
|
14
9
|
```bash
|
|
@@ -53,14 +48,16 @@ BM25 is a text-ranking method. Hydrated results include messages read from saved
|
|
|
53
48
|
|
|
54
49
|
In the interactive TUI, the collapsed tool block shows the last five visual lines and the earlier-line count. Press `Ctrl+O` to expand the full bounded response. The model always receives the complete tool result.
|
|
55
50
|
|
|
56
|
-
###
|
|
51
|
+
### Skills
|
|
57
52
|
|
|
58
53
|
Run `/skill:pi-session-pattern-miner` to find repeated workflows in past sessions. It requires evidence from two independent sessions and checks for existing automation. It prefers a fixed script when model judgment is not needed.
|
|
59
54
|
|
|
60
|
-
|
|
55
|
+
## Flow
|
|
56
|
+
|
|
57
|
+
### Query and index
|
|
61
58
|
|
|
62
59
|
- Prefer distinctive identifiers, package names, issue numbers, or uncommon terms. Use quoted phrases only when exact wording is known.
|
|
63
|
-
- The FTS5 trigram index uses AND for multiple words by default. Use `OR` for breadth, quoted phrases for exact matches, and `NOT` to exclude. Wildcards help only stems
|
|
60
|
+
- The FTS5 trigram index uses AND for multiple words by default. Use `OR` for breadth, quoted phrases for exact matches, and `NOT` to exclude. Wildcards help only stems at least three characters long.
|
|
64
61
|
- Only user and assistant text is indexed. Thinking blocks and tool output are not searchable.
|
|
65
62
|
- For message text over the 20,000-character indexing budget, only the first and last regions are indexed. The middle is omitted. Phrases and `NEAR` cannot cross those regions, but ordinary AND terms can.
|
|
66
63
|
- `sessionId` must be a `.jsonl` file under the Pi sessions directory.
|
|
@@ -69,26 +66,28 @@ Run `/skill:pi-session-pattern-miner` to find repeated workflows in past session
|
|
|
69
66
|
|
|
70
67
|
Hits inside the current session's live context are suppressed. Compacted-away or inactive-branch history stays discoverable. Forked sessions collapse into their parent when both match.
|
|
71
68
|
|
|
72
|
-
Before browse or discovery,
|
|
73
|
-
|
|
74
|
-
- A partial walk returns top-level `syncWarning`: `{kind:"incomplete-walk"}`. Indexed-but-unseen paths are never purged in that case.
|
|
75
|
-
- A total sync failure returns top-level `syncWarning`: `{kind:"sync-failed", error}` with the capped failure message.
|
|
76
|
-
- The warning is omitted after a completed sync.
|
|
69
|
+
Before browse or discovery, the extension lazily syncs the index from the session tree.
|
|
77
70
|
|
|
78
|
-
## State
|
|
71
|
+
## State and storage
|
|
79
72
|
|
|
80
73
|
The extension maintains the derived SQLite search index at `~/.pi/agent/config/pi-session-recall/index.db`.
|
|
81
74
|
|
|
82
|
-
|
|
75
|
+
This is derived state. Delete it and it rebuilds from your session files.
|
|
83
76
|
|
|
84
|
-
|
|
77
|
+
## Data, cost, and privacy
|
|
85
78
|
|
|
86
|
-
|
|
79
|
+
Everything stays local. Transcripts are read in place, and nothing leaves the machine beyond what tool results already show the model. Search makes no model calls.
|
|
87
80
|
|
|
88
|
-
|
|
81
|
+
## Limits and recovery
|
|
89
82
|
|
|
90
|
-
|
|
83
|
+
Lazy index sync can fail while walking the session tree. Results still come from the current index and can be partly updated or stale. Files found before failure may have new content, while rows for files the walk did not reach stay stale.
|
|
91
84
|
|
|
92
|
-
|
|
85
|
+
- A partial walk returns top-level `syncWarning`: `{kind:"incomplete-walk"}`. Indexed-but-unseen paths are never purged in that case.
|
|
86
|
+
- A total sync failure returns top-level `syncWarning`: `{kind:"sync-failed", error}` with the capped failure message.
|
|
87
|
+
- The warning is omitted after a completed sync.
|
|
93
88
|
|
|
94
|
-
|
|
89
|
+
Session directories whose encoded path starts with `--tmp-` or `--private-tmp-` are never indexed. These sessions run from `/tmp` or `/private/tmp`.
|
|
90
|
+
|
|
91
|
+
Session files over 32 MiB are excluded from indexing and hydration. Discovery cannot newly find them.
|
|
92
|
+
|
|
93
|
+
READ and SCROLL return an explicit size error. A stale discovery hit from before a file grew returns metadata with empty messages and that error.
|
package/package.json
CHANGED