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