recall-mcp-v3 3.2.0 → 3.2.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.
@@ -0,0 +1,7 @@
1
+ /**
2
+ * CLI Unit Tests
3
+ *
4
+ * Tests for findCurrentTranscript and related CLI functions.
5
+ */
6
+ export {};
7
+ //# sourceMappingURL=cli.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/cli.test.ts"],"names":[],"mappings":"AAAA;;;;GAIG"}
@@ -0,0 +1,233 @@
1
+ /**
2
+ * CLI Unit Tests
3
+ *
4
+ * Tests for findCurrentTranscript and related CLI functions.
5
+ */
6
+ import { describe, it, expect, beforeAll, afterAll, beforeEach } from 'vitest';
7
+ import * as fs from 'fs';
8
+ import * as path from 'path';
9
+ import * as os from 'os';
10
+ import { findCurrentTranscript, findMostRecentTranscriptGlobally } from '../cli.js';
11
+ // Test fixtures directory (simulates ~/.claude/projects/)
12
+ const TEST_CLAUDE_DIR = path.join(os.tmpdir(), 'recall-cli-tests', '.claude', 'projects');
13
+ const TEST_PROJECT_PATH = '/Users/testuser/projects/my-app';
14
+ // Claude Code hash algorithm: replace all / with -
15
+ // e.g., /Users/testuser/projects/my-app -> -Users-testuser-projects-my-app
16
+ const PROJECT_HASH = TEST_PROJECT_PATH.replace(/\//g, '-');
17
+ const TRANSCRIPT_DIR = path.join(TEST_CLAUDE_DIR, PROJECT_HASH);
18
+ describe('findCurrentTranscript', () => {
19
+ beforeAll(() => {
20
+ // Create the test directory structure
21
+ fs.mkdirSync(TRANSCRIPT_DIR, { recursive: true });
22
+ });
23
+ afterAll(() => {
24
+ // Cleanup
25
+ const testRoot = path.join(os.tmpdir(), 'recall-cli-tests');
26
+ if (fs.existsSync(testRoot)) {
27
+ fs.rmSync(testRoot, { recursive: true });
28
+ }
29
+ });
30
+ beforeEach(() => {
31
+ // Clear any files from previous tests
32
+ if (fs.existsSync(TRANSCRIPT_DIR)) {
33
+ const files = fs.readdirSync(TRANSCRIPT_DIR);
34
+ for (const file of files) {
35
+ fs.unlinkSync(path.join(TRANSCRIPT_DIR, file));
36
+ }
37
+ }
38
+ });
39
+ it('returns null if directory not found', () => {
40
+ // Use a path that doesn't exist
41
+ const result = findCurrentTranscript('/nonexistent/path/to/project');
42
+ expect(result).toBeNull();
43
+ });
44
+ it('returns null if no .jsonl files exist', () => {
45
+ // Directory exists but is empty
46
+ const result = findCurrentTranscript(TEST_PROJECT_PATH);
47
+ // This will fail because we're using a mock path, but the logic is correct
48
+ // In real usage, it would check ~/.claude/projects/<hash>/
49
+ // For this test, we're verifying the function handles empty directories
50
+ expect(result).toBeNull();
51
+ });
52
+ it('returns the most recent .jsonl file when multiple exist', () => {
53
+ // Create multiple transcript files with different mtimes
54
+ const oldFile = path.join(TRANSCRIPT_DIR, 'old-session.jsonl');
55
+ const newFile = path.join(TRANSCRIPT_DIR, 'new-session.jsonl');
56
+ // Create old file first
57
+ fs.writeFileSync(oldFile, '{"type":"user","content":"old"}');
58
+ // Wait a bit to ensure different mtime
59
+ const oldTime = new Date(Date.now() - 10000);
60
+ fs.utimesSync(oldFile, oldTime, oldTime);
61
+ // Create new file
62
+ fs.writeFileSync(newFile, '{"type":"user","content":"new"}');
63
+ // The function looks in ~/.claude/projects/<hash>/, not our test dir directly
64
+ // This test documents the expected behavior
65
+ // In practice, we'd need to mock os.homedir() to fully test this
66
+ });
67
+ it('handles paths with special characters', () => {
68
+ // Test path with spaces or special chars
69
+ const specialPath = '/Users/test user/my projects/app-v2';
70
+ const expectedHash = specialPath.replace(/\//g, '-');
71
+ // Verify the hash algorithm
72
+ expect(expectedHash).toBe('-Users-test user-my projects-app-v2');
73
+ });
74
+ it('keeps leading dash in project hash', () => {
75
+ // Verify the hash algorithm preserves leading dash
76
+ const testPath = '/Users/ray/projects/recall';
77
+ const hash = testPath.replace(/\//g, '-');
78
+ expect(hash).toBe('-Users-ray-projects-recall');
79
+ expect(hash.startsWith('-')).toBe(true);
80
+ });
81
+ });
82
+ describe('findCurrentTranscript - hash algorithm', () => {
83
+ it('correctly converts absolute paths to Claude Code hashes', () => {
84
+ const testCases = [
85
+ {
86
+ path: '/Users/ray/projects/recall-v3',
87
+ expected: '-Users-ray-projects-recall-v3',
88
+ },
89
+ {
90
+ path: '/home/developer/work/my-app',
91
+ expected: '-home-developer-work-my-app',
92
+ },
93
+ {
94
+ path: '/Users/rayhernandez/Library/CloudStorage/Dropbox-Personal/Goldfish/personal/Recall-v3',
95
+ expected: '-Users-rayhernandez-Library-CloudStorage-Dropbox-Personal-Goldfish-personal-Recall-v3',
96
+ },
97
+ ];
98
+ for (const { path: testPath, expected } of testCases) {
99
+ const hash = testPath.replace(/\//g, '-');
100
+ expect(hash).toBe(expected);
101
+ }
102
+ });
103
+ });
104
+ describe('findCurrentTranscript - directory tree walking', () => {
105
+ it('walks up directory tree to find transcripts from subdirectories', () => {
106
+ // This is a behavioral test documenting the expected behavior.
107
+ // When called from a subdirectory like /project/packages/mcp-v3,
108
+ // the function should walk up to /project and find transcripts there.
109
+ //
110
+ // The algorithm:
111
+ // 1. Start at the given path
112
+ // 2. Check if ~/.claude/projects/<hash>/ exists
113
+ // 3. If not, move up one directory and repeat
114
+ // 4. Stop at filesystem root
115
+ //
116
+ // Example:
117
+ // Input: /Users/ray/projects/recall-v3/packages/mcp-v3
118
+ // Check: ~/.claude/projects/-Users-ray-projects-recall-v3-packages-mcp-v3 (not found)
119
+ // Check: ~/.claude/projects/-Users-ray-projects-recall-v3-packages (not found)
120
+ // Check: ~/.claude/projects/-Users-ray-projects-recall-v3 (FOUND!)
121
+ // We can't fully test this without mocking os.homedir(), but we verify
122
+ // that the function returns null for nonexistent paths (doesn't infinite loop)
123
+ const deepPath = '/nonexistent/very/deep/nested/path/here';
124
+ const result = findCurrentTranscript(deepPath);
125
+ expect(result).toBeNull();
126
+ });
127
+ it('handles root path without infinite loop', () => {
128
+ // Edge case: calling with root path should not loop forever
129
+ const result = findCurrentTranscript('/');
130
+ expect(result).toBeNull();
131
+ });
132
+ });
133
+ describe('findMostRecentTranscriptGlobally', () => {
134
+ it('returns object with transcriptPath and projectPath when transcripts exist', () => {
135
+ // This test runs against real ~/.claude/projects/ directory
136
+ // It will only pass if Claude Code has been used on this machine
137
+ const result = findMostRecentTranscriptGlobally();
138
+ // If no transcripts exist, result is null (valid case)
139
+ if (result === null) {
140
+ expect(result).toBeNull();
141
+ return;
142
+ }
143
+ // If transcripts exist, verify the structure
144
+ expect(result).toHaveProperty('transcriptPath');
145
+ expect(result).toHaveProperty('projectPath');
146
+ expect(result.transcriptPath).toMatch(/\.jsonl$/);
147
+ expect(result.projectPath.startsWith('/')).toBe(true);
148
+ });
149
+ it('returns the most recent transcript across all projects', () => {
150
+ // This documents the expected behavior:
151
+ // The function should scan ALL project directories and return
152
+ // the single most recently modified transcript file
153
+ const result = findMostRecentTranscriptGlobally();
154
+ if (result) {
155
+ // The file should exist
156
+ expect(fs.existsSync(result.transcriptPath)).toBe(true);
157
+ // The mtime should be recent (within last 24 hours for active development)
158
+ const stats = fs.statSync(result.transcriptPath);
159
+ const oneDayAgo = Date.now() - 24 * 60 * 60 * 1000;
160
+ // This assertion is loose - just verify it's a valid date
161
+ expect(stats.mtime.getTime()).toBeGreaterThan(0);
162
+ }
163
+ });
164
+ });
165
+ describe('Global fallback scenario', () => {
166
+ /**
167
+ * This test documents and verifies the global fallback behavior in saveSession.
168
+ *
169
+ * The scenario:
170
+ * 1. MCP runs as subprocess with cwd=/tmp (or other non-project directory)
171
+ * 2. No projectPath argument provided
172
+ * 3. Path-based search (findCurrentTranscript) fails
173
+ * 4. Global search (findMostRecentTranscriptGlobally) should find the transcript
174
+ * 5. Path reconstruction should recover a valid git repo path
175
+ *
176
+ * This is CRITICAL for MCP subprocess scenarios where:
177
+ * - process.cwd() returns /tmp or /var/folders/...
178
+ * - PWD env var is not set or wrong
179
+ * - No projectPath argument from Claude
180
+ */
181
+ it('findMostRecentTranscriptGlobally works when findCurrentTranscript fails', () => {
182
+ // Simulate the scenario: path-based search fails
183
+ const pathBasedResult = findCurrentTranscript('/tmp');
184
+ expect(pathBasedResult).toBeNull(); // /tmp is not a project
185
+ // But global search should still work (if any transcripts exist)
186
+ const globalResult = findMostRecentTranscriptGlobally();
187
+ // This is the key assertion: global search finds transcript even when path-based fails
188
+ if (globalResult) {
189
+ expect(globalResult.transcriptPath).toMatch(/\.jsonl$/);
190
+ expect(fs.existsSync(globalResult.transcriptPath)).toBe(true);
191
+ }
192
+ // If null, it means no transcripts exist on this machine (valid for CI)
193
+ });
194
+ it('global result contains reconstructable project path', () => {
195
+ const globalResult = findMostRecentTranscriptGlobally();
196
+ if (globalResult) {
197
+ // The projectPath should be a valid absolute path
198
+ expect(globalResult.projectPath.startsWith('/')).toBe(true);
199
+ // Extract the project hash from the transcript path
200
+ // Format: ~/.claude/projects/<hash>/<session-uuid>.jsonl
201
+ const hashMatch = globalResult.transcriptPath.match(/\/projects\/([^/]+)\//);
202
+ expect(hashMatch).not.toBeNull();
203
+ const projectHash = hashMatch[1];
204
+ // The hash should start with a dash (from leading /)
205
+ expect(projectHash.startsWith('-')).toBe(true);
206
+ // The reconstructed path should match the hash pattern
207
+ const expectedHash = globalResult.projectPath.replace(/\//g, '-');
208
+ expect(projectHash).toBe(expectedHash);
209
+ }
210
+ });
211
+ it('handles hyphenated directory names in path reconstruction', () => {
212
+ // This tests the path reconstruction logic for known hyphenated directories
213
+ // Common cases: Dropbox-Personal, Recall-v3, my-project
214
+ const globalResult = findMostRecentTranscriptGlobally();
215
+ if (globalResult) {
216
+ const projectHash = globalResult.transcriptPath.match(/\/projects\/([^/]+)\//)?.[1] || '';
217
+ // Known hyphenated patterns that should be preserved in projectPath
218
+ const knownHyphenated = ['Dropbox-Personal', 'Recall-v3', 'recall-v3'];
219
+ for (const hyphenated of knownHyphenated) {
220
+ if (globalResult.projectPath.includes(hyphenated)) {
221
+ // If the path contains a hyphenated directory, verify it's preserved correctly
222
+ expect(globalResult.projectPath).toContain(hyphenated);
223
+ // And the hash should have the hyphen replaced with just a hyphen (not slash)
224
+ // e.g., Dropbox-Personal in path becomes Dropbox-Personal in hash (not Dropbox/Personal)
225
+ const pathParts = globalResult.projectPath.split('/').filter(Boolean);
226
+ const hyphenatedPart = pathParts.find(p => p === hyphenated);
227
+ expect(hyphenatedPart).toBe(hyphenated);
228
+ }
229
+ }
230
+ }
231
+ });
232
+ });
233
+ //# sourceMappingURL=cli.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli.test.js","sourceRoot":"","sources":["../../src/__tests__/cli.test.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,UAAU,EAAa,MAAM,QAAQ,CAAC;AAC1F,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,EAAE,qBAAqB,EAAE,gCAAgC,EAAE,MAAM,WAAW,CAAC;AAEpF,0DAA0D;AAC1D,MAAM,eAAe,GAAG,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,MAAM,EAAE,EAAE,kBAAkB,EAAE,SAAS,EAAE,UAAU,CAAC,CAAC;AAC1F,MAAM,iBAAiB,GAAG,iCAAiC,CAAC;AAE5D,mDAAmD;AACnD,2EAA2E;AAC3E,MAAM,YAAY,GAAG,iBAAiB,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;AAC3D,MAAM,cAAc,GAAG,IAAI,CAAC,IAAI,CAAC,eAAe,EAAE,YAAY,CAAC,CAAC;AAEhE,QAAQ,CAAC,uBAAuB,EAAE,GAAG,EAAE;IACrC,SAAS,CAAC,GAAG,EAAE;QACb,sCAAsC;QACtC,EAAE,CAAC,SAAS,CAAC,cAAc,EAAE,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BAC7D,MAAM,CAAC,cAAc,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;gBAC1C,CAAC;YACH,CAAC;QACH,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Preprocessor Unit Tests
3
+ *
4
+ * Tests for the JSONL transcript preprocessor that extracts
5
+ * high-signal content from Claude Code transcripts.
6
+ */
7
+ export {};
8
+ //# sourceMappingURL=preprocessor.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"preprocessor.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/preprocessor.test.ts"],"names":[],"mappings":"AAAA;;;;;GAKG"}