@esparkman/pensieve 0.1.0 → 0.1.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 +9 -9
- package/dist/index.js +59 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -22,7 +22,15 @@ Pensieve provides persistent storage via SQLite that Claude can access through n
|
|
|
22
22
|
|
|
23
23
|
## Installation
|
|
24
24
|
|
|
25
|
-
### Option 1:
|
|
25
|
+
### Option 1: npx (Recommended)
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
claude mcp add pensieve npx @esparkman/pensieve
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
That's it! Restart Claude Code and the tools are available.
|
|
32
|
+
|
|
33
|
+
### Option 2: Clone and Build
|
|
26
34
|
|
|
27
35
|
```bash
|
|
28
36
|
# Clone the repository
|
|
@@ -37,14 +45,6 @@ npm run build
|
|
|
37
45
|
claude mcp add pensieve node ~/Development/pensieve/dist/index.js
|
|
38
46
|
```
|
|
39
47
|
|
|
40
|
-
### Option 2: npx (Coming Soon)
|
|
41
|
-
|
|
42
|
-
Once published to npm:
|
|
43
|
-
|
|
44
|
-
```bash
|
|
45
|
-
claude mcp add pensieve npx @esparkman/pensieve
|
|
46
|
-
```
|
|
47
|
-
|
|
48
48
|
### Option 3: Docker
|
|
49
49
|
|
|
50
50
|
```bash
|
package/dist/index.js
CHANGED
|
@@ -515,10 +515,68 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
515
515
|
};
|
|
516
516
|
}
|
|
517
517
|
});
|
|
518
|
+
// Output prior context on startup
|
|
519
|
+
function outputPriorContext() {
|
|
520
|
+
const lastSession = db.getLastSession();
|
|
521
|
+
const decisions = db.getRecentDecisions(5);
|
|
522
|
+
const prefs = db.getAllPreferences();
|
|
523
|
+
const questions = db.getOpenQuestions();
|
|
524
|
+
const hasContent = lastSession?.summary || decisions.length > 0 || prefs.length > 0 || questions.length > 0;
|
|
525
|
+
if (!hasContent) {
|
|
526
|
+
console.error('🧙 Pensieve ready (no prior context yet)');
|
|
527
|
+
return;
|
|
528
|
+
}
|
|
529
|
+
console.error('');
|
|
530
|
+
console.error('═══════════════════════════════════════════════════════════════');
|
|
531
|
+
console.error('🧙 PENSIEVE — Prior Context Loaded');
|
|
532
|
+
console.error('═══════════════════════════════════════════════════════════════');
|
|
533
|
+
if (lastSession?.ended_at) {
|
|
534
|
+
console.error('');
|
|
535
|
+
console.error('📋 LAST SESSION:');
|
|
536
|
+
if (lastSession.summary)
|
|
537
|
+
console.error(` ${lastSession.summary}`);
|
|
538
|
+
if (lastSession.work_in_progress) {
|
|
539
|
+
console.error('');
|
|
540
|
+
console.error('🚧 WORK IN PROGRESS:');
|
|
541
|
+
console.error(` ${lastSession.work_in_progress}`);
|
|
542
|
+
}
|
|
543
|
+
if (lastSession.next_steps) {
|
|
544
|
+
console.error('');
|
|
545
|
+
console.error('➡️ NEXT STEPS:');
|
|
546
|
+
console.error(` ${lastSession.next_steps}`);
|
|
547
|
+
}
|
|
548
|
+
}
|
|
549
|
+
if (decisions.length > 0) {
|
|
550
|
+
console.error('');
|
|
551
|
+
console.error('🎯 KEY DECISIONS:');
|
|
552
|
+
decisions.forEach(d => {
|
|
553
|
+
console.error(` • [${d.topic}] ${d.decision}`);
|
|
554
|
+
});
|
|
555
|
+
}
|
|
556
|
+
if (prefs.length > 0) {
|
|
557
|
+
console.error('');
|
|
558
|
+
console.error('⚙️ PREFERENCES:');
|
|
559
|
+
prefs.forEach(p => {
|
|
560
|
+
console.error(` • ${p.category}/${p.key}: ${p.value}`);
|
|
561
|
+
});
|
|
562
|
+
}
|
|
563
|
+
if (questions.length > 0) {
|
|
564
|
+
console.error('');
|
|
565
|
+
console.error('❓ OPEN QUESTIONS:');
|
|
566
|
+
questions.forEach(q => {
|
|
567
|
+
console.error(` • [#${q.id}] ${q.question}`);
|
|
568
|
+
});
|
|
569
|
+
}
|
|
570
|
+
console.error('');
|
|
571
|
+
console.error('═══════════════════════════════════════════════════════════════');
|
|
572
|
+
console.error(`Database: ${db.getPath()}`);
|
|
573
|
+
console.error('═══════════════════════════════════════════════════════════════');
|
|
574
|
+
}
|
|
518
575
|
// Start server
|
|
519
576
|
async function main() {
|
|
520
577
|
const transport = new StdioServerTransport();
|
|
521
578
|
await server.connect(transport);
|
|
522
|
-
|
|
579
|
+
// Output prior context so Claude sees it automatically
|
|
580
|
+
outputPriorContext();
|
|
523
581
|
}
|
|
524
582
|
main().catch(console.error);
|
package/package.json
CHANGED