@aiplumber/session-recall 1.5.0 → 1.5.1

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 +226 -0
  2. package/package.json +1 -1
package/README.md ADDED
@@ -0,0 +1,226 @@
1
+ # @aiplumber/session-recall
2
+
3
+ Pull context from previous Claude Code sessions. Sessions end, context resets - this tool lets you continue where you left off.
4
+
5
+ ## The Problem
6
+
7
+ Every Claude Code session starts fresh. Yesterday's breakthroughs, decisions, and momentum - gone. You're left explaining context again, losing the thread of what you were building.
8
+
9
+ ## The Solution
10
+
11
+ `session-recall` extracts the **signal** from your session logs, filtering out the noise. Import previous context without blowing your token budget.
12
+
13
+ ## Installation
14
+
15
+ ```bash
16
+ npm install -g @aiplumber/session-recall
17
+ ```
18
+
19
+ Requires Node.js 16+.
20
+
21
+ ## Quick Start
22
+
23
+ ```bash
24
+ # Check what sessions exist (CWD project)
25
+ session-recall last 3 -d
26
+
27
+ # Pull last session context
28
+ session-recall last 1 -f text
29
+
30
+ # List tool calls from last session
31
+ session-recall tools
32
+
33
+ # Get specific tool result
34
+ session-recall tools --show 014opBVN
35
+ ```
36
+
37
+ ## What Gets Filtered (Noise)
38
+
39
+ Session-recall strips out the bloat that eats tokens without adding value:
40
+
41
+ **Tool Artifacts:**
42
+ - File contents you read (they exist in files, don't duplicate)
43
+ - Code you generated (it's in the codebase now)
44
+ - Command outputs (already processed, outcome captured)
45
+ - Error logs user pasted (dealt with, moved on)
46
+
47
+ **Operational Chatter:**
48
+ - "Let me read that file" (just read it)
49
+ - "I'll run this command" (just the result matters)
50
+ - Shell commands without context (`ls`, `cd`, `npm install`)
51
+ - System reminders and progress updates
52
+
53
+ **Message Types Filtered:**
54
+ - `type: progress` - tool execution noise
55
+ - `type: system` - system messages
56
+ - `type: file-history-snapshot` - file state snapshots
57
+ - Tool results (unless `--logistics` mode)
58
+ - User messages > 200 chars (usually pasted logs)
59
+
60
+ ## What's Kept (Signal)
61
+
62
+ The discourse that matters:
63
+
64
+ **Short user messages:**
65
+ - "nooooo" (3 words, massive redirection)
66
+ - "for real?" (pushback, led to honesty)
67
+ - "A, B, C" (decisions locked in)
68
+
69
+ **Questions that shaped direction:**
70
+ - "how do you think we will get clarity?"
71
+ - "what is the workproduct?"
72
+
73
+ **Aha moments:**
74
+ - "did we just discover..."
75
+ - "YES. Now I see..."
76
+
77
+ **The rule: Short = signal. Long = usually noise.**
78
+
79
+ User's 3-word redirection carries more weight than assistant's 500-word explanation.
80
+
81
+ ## Commands
82
+
83
+ ### last - Pull Recent Sessions
84
+
85
+ ```bash
86
+ # Check what's available (dry run)
87
+ session-recall last 3 -d
88
+
89
+ # Pull last session from current project
90
+ session-recall last 1 -f text
91
+
92
+ # Pull last 2 sessions
93
+ session-recall last 2 -f text
94
+
95
+ # Scan all projects (not just CWD)
96
+ session-recall last 5 --all -d
97
+ ```
98
+
99
+ ### tools - Inspect Tool Calls
100
+
101
+ ```bash
102
+ # List all tool calls from last session
103
+ session-recall tools
104
+
105
+ # Get specific tool result by ID
106
+ session-recall tools --show 014opBVN
107
+ ```
108
+
109
+ ### checkpoints - Mark Progress Points
110
+
111
+ ```bash
112
+ # Create a checkpoint (marker that gets logged)
113
+ session-recall --checkpoint "finished research"
114
+ session-recall --checkpoint "starting implementation"
115
+
116
+ # List all checkpoints
117
+ session-recall checkpoints
118
+
119
+ # Recall only messages AFTER a checkpoint
120
+ session-recall last 1 --after "finished research"
121
+ ```
122
+
123
+ ### rinse - Compress Session Data
124
+
125
+ ```bash
126
+ # Compress with tool calls collapsed (action mode)
127
+ session-recall rinse session.jsonl --gotime
128
+
129
+ # Keep tool results truncated (see what was done)
130
+ session-recall rinse session.jsonl --logistics
131
+
132
+ # Check token cost first
133
+ session-recall rinse session.jsonl --gotime -d
134
+ ```
135
+
136
+ ### Other Commands
137
+
138
+ ```bash
139
+ # Show session stats
140
+ session-recall state session.jsonl
141
+
142
+ # Compare import costs
143
+ session-recall cost session.jsonl
144
+
145
+ # Extract last N exchanges
146
+ session-recall hot session.jsonl --last 30
147
+
148
+ # Parse to filtered jsonl
149
+ session-recall parse session.jsonl -f text
150
+ ```
151
+
152
+ ## Use Cases
153
+
154
+ ### 1. Continue Yesterday's Work
155
+
156
+ ```bash
157
+ # See what you worked on
158
+ session-recall last 1 -d
159
+
160
+ # Pull the context
161
+ session-recall last 1 -f text
162
+ ```
163
+
164
+ ### 2. Long-Running Implementation
165
+
166
+ ```bash
167
+ # Mark milestones as you go
168
+ session-recall --checkpoint "research complete"
169
+ session-recall --checkpoint "design approved"
170
+ session-recall --checkpoint "implementation started"
171
+
172
+ # Tomorrow, resume from any point
173
+ session-recall last 1 --after "design approved"
174
+ ```
175
+
176
+ ### 3. Debug a Tool Result
177
+
178
+ ```bash
179
+ # What did that command output?
180
+ session-recall tools
181
+ session-recall tools --show 014opBVN
182
+ ```
183
+
184
+ ### 4. Multi-Session Project Context
185
+
186
+ ```bash
187
+ # Combine multiple sessions
188
+ session-recall last 3 -f text > context.txt
189
+ ```
190
+
191
+ ## Output Modes
192
+
193
+ | Flag | Tool Results | Use Case |
194
+ |------|--------------|----------|
195
+ | `--gotime` | `[Ran: ls -la]` | Action mode - let's move |
196
+ | `--logistics` | `drwxr-xr-x...` (truncated) | Planning - show me the receipts |
197
+
198
+ ## Token Economics
199
+
200
+ Session-recall helps you fit more context in less tokens:
201
+
202
+ | Raw Session | After Rinse | Savings |
203
+ |-------------|-------------|---------|
204
+ | 750 messages | ~250 messages | 67% |
205
+ | ~50k tokens | ~7k tokens | 86% |
206
+
207
+ The filtering isn't lossy - it's removing redundancy. The signal-to-noise ratio goes up dramatically.
208
+
209
+ ## How It Works
210
+
211
+ Claude Code stores conversations in `~/.claude/projects/<project>/` as JSONL files. Each line is a message with metadata.
212
+
213
+ Session-recall:
214
+ 1. Maps your CWD to the project folder
215
+ 2. Reads the JSONL conversation logs
216
+ 3. Filters out noise (tool results, system messages, long pastes)
217
+ 4. Collapses tool calls to summaries
218
+ 5. Outputs clean discourse
219
+
220
+ ## License
221
+
222
+ MIT
223
+
224
+ ## Author
225
+
226
+ Hung Nguyen (@aiplumber)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aiplumber/session-recall",
3
- "version": "1.5.0",
3
+ "version": "1.5.1",
4
4
  "description": "Pull context from previous Claude Code sessions. Sessions end, context resets - this tool lets you continue where you left off.",
5
5
  "bin": {
6
6
  "session-recall": "./session-recall"