screenpipe-mcp 0.12.0 → 0.14.0
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/dist/index.js +25 -6
- package/manifest.json +1 -1
- package/package.json +1 -1
- package/src/index.ts +40 -8
package/dist/index.js
CHANGED
|
@@ -53,10 +53,13 @@ for (let i = 0; i < args.length; i++) {
|
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
55
|
const SCREENPIPE_API = `http://localhost:${port}`;
|
|
56
|
+
// Read version from package.json (single source of truth)
|
|
57
|
+
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
58
|
+
const PKG_VERSION = require("../package.json").version;
|
|
56
59
|
// Initialize server
|
|
57
60
|
const server = new index_js_1.Server({
|
|
58
61
|
name: "screenpipe",
|
|
59
|
-
version:
|
|
62
|
+
version: PKG_VERSION,
|
|
60
63
|
}, {
|
|
61
64
|
capabilities: {
|
|
62
65
|
tools: {},
|
|
@@ -133,9 +136,10 @@ const TOOLS = [
|
|
|
133
136
|
},
|
|
134
137
|
{
|
|
135
138
|
name: "activity-summary",
|
|
136
|
-
description: "
|
|
139
|
+
description: "Rich activity overview: app usage, window/tab titles with URLs and time spent, key text per context, audio transcriptions. " +
|
|
137
140
|
"USE THIS FIRST for broad questions: 'what was I doing?', 'how long on X?', 'which apps?'. " +
|
|
138
|
-
"
|
|
141
|
+
"The 'windows' field shows exactly what the user worked on (e.g. 'Debug crash issue — 20 min', 'Stripe pricing page — 5 min'). " +
|
|
142
|
+
"Usually sufficient without further searches.",
|
|
139
143
|
annotations: { title: "Activity Summary", readOnlyHint: true, openWorldHint: false, idempotentHint: true },
|
|
140
144
|
inputSchema: {
|
|
141
145
|
type: "object",
|
|
@@ -658,8 +662,19 @@ server.setRequestHandler(types_js_1.CallToolRequestSchema, async (request) => {
|
|
|
658
662
|
: "";
|
|
659
663
|
return ` ${a.name}: ${a.minutes} min (${a.frame_count} frames${timeSpan})`;
|
|
660
664
|
});
|
|
665
|
+
// Window/tab activity — what pages/documents were open
|
|
666
|
+
const windowLines = (data.windows || []).map((w) => {
|
|
667
|
+
const url = w.browser_url ? ` (${w.browser_url})` : "";
|
|
668
|
+
return ` [${w.app_name}] ${w.window_name}${url} — ${w.minutes} min`;
|
|
669
|
+
});
|
|
661
670
|
const speakerLines = (data.audio_summary?.speakers || []).map((s) => ` ${s.name}: ${s.segment_count} segments`);
|
|
662
|
-
|
|
671
|
+
// Actual audio transcriptions (not just counts)
|
|
672
|
+
const transcriptLines = (data.audio_summary?.top_transcriptions || []).map((t) => ` [${t.speaker}, ${t.timestamp.slice(11, 19)}] ${t.transcription}`);
|
|
673
|
+
// Key text content sampled across the time range
|
|
674
|
+
const textLines = (data.key_texts || data.recent_texts || []).map((t) => {
|
|
675
|
+
const win = t.window_name ? ` | ${t.window_name}` : "";
|
|
676
|
+
return ` [${t.app_name}${win}, ${t.timestamp.slice(11, 19)}] ${t.text}`;
|
|
677
|
+
});
|
|
663
678
|
const summary = [
|
|
664
679
|
`Activity Summary (${data.time_range?.start} → ${data.time_range?.end})`,
|
|
665
680
|
`Total frames: ${data.total_frames}`,
|
|
@@ -667,11 +682,15 @@ server.setRequestHandler(types_js_1.CallToolRequestSchema, async (request) => {
|
|
|
667
682
|
"Apps:",
|
|
668
683
|
...(appsLines.length ? appsLines : [" (none)"]),
|
|
669
684
|
"",
|
|
685
|
+
"Windows & Tabs:",
|
|
686
|
+
...(windowLines.length ? windowLines.slice(0, 20) : [" (none)"]),
|
|
687
|
+
"",
|
|
670
688
|
`Audio: ${data.audio_summary?.segment_count || 0} segments`,
|
|
671
689
|
...(speakerLines.length ? speakerLines : []),
|
|
690
|
+
...(transcriptLines.length ? ["", "Audio transcriptions:", ...transcriptLines.slice(0, 15)] : []),
|
|
672
691
|
"",
|
|
673
|
-
"
|
|
674
|
-
...(textLines.length ? textLines.slice(0,
|
|
692
|
+
"Key content (sampled across time range):",
|
|
693
|
+
...(textLines.length ? textLines.slice(0, 20) : [" (none)"]),
|
|
675
694
|
].join("\n");
|
|
676
695
|
return { content: [{ type: "text", text: summary }] };
|
|
677
696
|
}
|
package/manifest.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"manifest_version": "0.3",
|
|
3
3
|
"name": "screenpipe",
|
|
4
4
|
"display_name": "Screenpipe",
|
|
5
|
-
"version": "0.
|
|
5
|
+
"version": "0.0.0-injected-from-package-json",
|
|
6
6
|
"description": "Search your screen recordings and audio transcriptions with AI",
|
|
7
7
|
"long_description": "Screenpipe is a 24/7 screen and audio recorder that lets you search everything you've seen or heard. This extension connects Claude to your local screenpipe instance, enabling AI-powered search through your digital memory.",
|
|
8
8
|
"author": {
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -28,11 +28,15 @@ for (let i = 0; i < args.length; i++) {
|
|
|
28
28
|
|
|
29
29
|
const SCREENPIPE_API = `http://localhost:${port}`;
|
|
30
30
|
|
|
31
|
+
// Read version from package.json (single source of truth)
|
|
32
|
+
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
33
|
+
const PKG_VERSION: string = require("../package.json").version;
|
|
34
|
+
|
|
31
35
|
// Initialize server
|
|
32
36
|
const server = new Server(
|
|
33
37
|
{
|
|
34
38
|
name: "screenpipe",
|
|
35
|
-
version:
|
|
39
|
+
version: PKG_VERSION,
|
|
36
40
|
},
|
|
37
41
|
{
|
|
38
42
|
capabilities: {
|
|
@@ -115,9 +119,10 @@ const TOOLS: Tool[] = [
|
|
|
115
119
|
{
|
|
116
120
|
name: "activity-summary",
|
|
117
121
|
description:
|
|
118
|
-
"
|
|
122
|
+
"Rich activity overview: app usage, window/tab titles with URLs and time spent, key text per context, audio transcriptions. " +
|
|
119
123
|
"USE THIS FIRST for broad questions: 'what was I doing?', 'how long on X?', 'which apps?'. " +
|
|
120
|
-
"
|
|
124
|
+
"The 'windows' field shows exactly what the user worked on (e.g. 'Debug crash issue — 20 min', 'Stripe pricing page — 5 min'). " +
|
|
125
|
+
"Usually sufficient without further searches.",
|
|
121
126
|
annotations: { title: "Activity Summary", readOnlyHint: true, openWorldHint: false, idempotentHint: true },
|
|
122
127
|
inputSchema: {
|
|
123
128
|
type: "object",
|
|
@@ -705,14 +710,37 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
705
710
|
}
|
|
706
711
|
);
|
|
707
712
|
|
|
713
|
+
// Window/tab activity — what pages/documents were open
|
|
714
|
+
const windowLines = (data.windows || []).map(
|
|
715
|
+
(w: {
|
|
716
|
+
app_name: string;
|
|
717
|
+
window_name: string;
|
|
718
|
+
browser_url: string;
|
|
719
|
+
minutes: number;
|
|
720
|
+
frame_count: number;
|
|
721
|
+
}) => {
|
|
722
|
+
const url = w.browser_url ? ` (${w.browser_url})` : "";
|
|
723
|
+
return ` [${w.app_name}] ${w.window_name}${url} — ${w.minutes} min`;
|
|
724
|
+
}
|
|
725
|
+
);
|
|
726
|
+
|
|
708
727
|
const speakerLines = (data.audio_summary?.speakers || []).map(
|
|
709
728
|
(s: { name: string; segment_count: number }) =>
|
|
710
729
|
` ${s.name}: ${s.segment_count} segments`
|
|
711
730
|
);
|
|
712
731
|
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
732
|
+
// Actual audio transcriptions (not just counts)
|
|
733
|
+
const transcriptLines = (data.audio_summary?.top_transcriptions || []).map(
|
|
734
|
+
(t: { transcription: string; speaker: string; device: string; timestamp: string }) =>
|
|
735
|
+
` [${t.speaker}, ${t.timestamp.slice(11, 19)}] ${t.transcription}`
|
|
736
|
+
);
|
|
737
|
+
|
|
738
|
+
// Key text content sampled across the time range
|
|
739
|
+
const textLines = (data.key_texts || data.recent_texts || []).map(
|
|
740
|
+
(t: { text: string; app_name: string; window_name?: string; timestamp: string }) => {
|
|
741
|
+
const win = t.window_name ? ` | ${t.window_name}` : "";
|
|
742
|
+
return ` [${t.app_name}${win}, ${t.timestamp.slice(11, 19)}] ${t.text}`;
|
|
743
|
+
}
|
|
716
744
|
);
|
|
717
745
|
|
|
718
746
|
const summary = [
|
|
@@ -722,11 +750,15 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
722
750
|
"Apps:",
|
|
723
751
|
...(appsLines.length ? appsLines : [" (none)"]),
|
|
724
752
|
"",
|
|
753
|
+
"Windows & Tabs:",
|
|
754
|
+
...(windowLines.length ? windowLines.slice(0, 20) : [" (none)"]),
|
|
755
|
+
"",
|
|
725
756
|
`Audio: ${data.audio_summary?.segment_count || 0} segments`,
|
|
726
757
|
...(speakerLines.length ? speakerLines : []),
|
|
758
|
+
...(transcriptLines.length ? ["", "Audio transcriptions:", ...transcriptLines.slice(0, 15)] : []),
|
|
727
759
|
"",
|
|
728
|
-
"
|
|
729
|
-
...(textLines.length ? textLines.slice(0,
|
|
760
|
+
"Key content (sampled across time range):",
|
|
761
|
+
...(textLines.length ? textLines.slice(0, 20) : [" (none)"]),
|
|
730
762
|
].join("\n");
|
|
731
763
|
|
|
732
764
|
return { content: [{ type: "text", text: summary }] };
|