@henryqw/pi-session-recall 1.0.1 → 1.0.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.
Files changed (2) hide show
  1. package/README.md +21 -22
  2. 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. 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,18 @@ 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
- ### Find work worth automating
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
- ### Query syntax and indexed text
55
+ ## Flow
56
+
57
+ Search makes no model calls.
58
+
59
+ ### Query and index
61
60
 
62
61
  - 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 ≥3 characters.
62
+ - 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
63
  - Only user and assistant text is indexed. Thinking blocks and tool output are not searchable.
65
64
  - 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
65
  - `sessionId` must be a `.jsonl` file under the Pi sessions directory.
@@ -69,26 +68,26 @@ Run `/skill:pi-session-pattern-miner` to find repeated workflows in past session
69
68
 
70
69
  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
70
 
72
- Before browse or discovery, 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.
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.
71
+ Before browse or discovery, the extension lazily syncs the index from the session tree.
77
72
 
78
- ## State
73
+ ## State and storage
79
74
 
80
75
  The extension maintains the derived SQLite search index at `~/.pi/agent/config/pi-session-recall/index.db`.
81
76
 
82
- ## Deliberate exclusions
77
+ This is derived state. Delete it and it rebuilds from your session files.
83
78
 
84
- Session directories whose encoded path starts with `--tmp-` or `--private-tmp-` are never indexed. These sessions run from `/tmp` or `/private/tmp`.
79
+ Everything stays local. Transcripts are read in place. Nothing leaves the machine beyond what tool results already show the model.
85
80
 
86
- Session files over 32 MiB are excluded from indexing and hydration. Discovery cannot newly find them.
81
+ ## Limits and recovery
87
82
 
88
- 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.
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.
84
+
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.
89
88
 
90
- ## Storage & privacy
89
+ Session directories whose encoded path starts with `--tmp-` or `--private-tmp-` are never indexed. These sessions run from `/tmp` or `/private/tmp`.
91
90
 
92
- This is derived state. Delete it and it rebuilds from your session files.
91
+ Session files over 32 MiB are excluded from indexing and hydration. Discovery cannot newly find them.
93
92
 
94
- Everything stays local. Transcripts are read in place, and nothing leaves the machine beyond what tool results already show the model.
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@henryqw/pi-session-recall",
3
- "version": "1.0.1",
3
+ "version": "1.0.3",
4
4
  "description": "Local FTS5 search over past Pi sessions plus a skill for turning recurring work into deterministic automation.",
5
5
  "keywords": [
6
6
  "pi-package",