daybrain 0.3.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/bin/daybrain.js +18 -0
- package/dist/aw.d.ts +30 -0
- package/dist/aw.d.ts.map +1 -0
- package/dist/aw.js +145 -0
- package/dist/aw.js.map +1 -0
- package/dist/baseline.d.ts +31 -0
- package/dist/baseline.d.ts.map +1 -0
- package/dist/baseline.js +130 -0
- package/dist/baseline.js.map +1 -0
- package/dist/config.d.ts +36 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +139 -0
- package/dist/config.js.map +1 -0
- package/dist/db.d.ts +72 -0
- package/dist/db.d.ts.map +1 -0
- package/dist/db.js +261 -0
- package/dist/db.js.map +1 -0
- package/dist/http.d.ts +5 -0
- package/dist/http.d.ts.map +1 -0
- package/dist/http.js +411 -0
- package/dist/http.js.map +1 -0
- package/dist/index.d.ts +16 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +908 -0
- package/dist/index.js.map +1 -0
- package/dist/insights.d.ts +68 -0
- package/dist/insights.d.ts.map +1 -0
- package/dist/insights.js +523 -0
- package/dist/insights.js.map +1 -0
- package/dist/onboard.d.ts +2 -0
- package/dist/onboard.d.ts.map +1 -0
- package/dist/onboard.js +121 -0
- package/dist/onboard.js.map +1 -0
- package/dist/scheduler.d.ts +8 -0
- package/dist/scheduler.d.ts.map +1 -0
- package/dist/scheduler.js +214 -0
- package/dist/scheduler.js.map +1 -0
- package/dist/screenpipe.d.ts +25 -0
- package/dist/screenpipe.d.ts.map +1 -0
- package/dist/screenpipe.js +71 -0
- package/dist/screenpipe.js.map +1 -0
- package/dist/transport.d.ts +12 -0
- package/dist/transport.d.ts.map +1 -0
- package/dist/transport.js +152 -0
- package/dist/transport.js.map +1 -0
- package/dist/watcher.d.ts +15 -0
- package/dist/watcher.d.ts.map +1 -0
- package/dist/watcher.js +173 -0
- package/dist/watcher.js.map +1 -0
- package/package.json +58 -0
- package/watcher.py +139 -0
package/dist/insights.js
ADDED
|
@@ -0,0 +1,523 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.InsightEngine = void 0;
|
|
4
|
+
exports.createInsightEngine = createInsightEngine;
|
|
5
|
+
const config_1 = require("./config");
|
|
6
|
+
const COMMITMENT_PATTERNS = [
|
|
7
|
+
{ regex: /\b(will|gonna|going to)\s+(\w+(?:\s+\w+){0,4})\s+(by|before|on|tomorrow|next|soon|friday|monday|tuesday|wednesday|thursday|saturday|sunday)/i, weight: 0.8 },
|
|
8
|
+
{ regex: /\b(I'?ll|i will|let me|i need to)\s+(\w+(?:\s+\w+){0,4})/i, weight: 0.6 },
|
|
9
|
+
{ regex: /\b(promise|promised|committed|pledged)\b/i, weight: 0.9 },
|
|
10
|
+
{ regex: /\b(send|share|forward|deliver)\s+(\w+(?:\s+\w+){0,3})\s+(by|before|on|tomorrow|next|friday|monday|tuesday|wednesday|thursday)/i, weight: 0.85 },
|
|
11
|
+
{ regex: /\b(follow.?up|followup|get back|circle back|check back|touch base)\b/i, weight: 0.7 },
|
|
12
|
+
{ regex: /\b(remind me|remember to|don'?t forget|must not forget)\b/i, weight: 0.75 },
|
|
13
|
+
{ regex: /\b(action item|action: |to.?do:? |task:? |TODO:? )/i, weight: 0.85 },
|
|
14
|
+
{ regex: /\b(by\s+(?:end\s+of\s+)?(?:today|tomorrow|EOD|EOB|COB|this\s+week|next\s+week|friday|monday|tuesday|wednesday|thursday|saturday|sunday))\b/i, weight: 0.75 },
|
|
15
|
+
{ regex: /\b(due\s+(?:on|by|before)|deadline|must\s+(?:be\s+)?done)\b/i, weight: 0.8 },
|
|
16
|
+
];
|
|
17
|
+
const PRODUCTIVE_APPS = new Set([
|
|
18
|
+
'code', 'vscode', 'visual studio code', 'vs code', 'cursor', 'intellij',
|
|
19
|
+
'intellij idea', 'webstorm', 'pycharm', 'android studio', 'xcode',
|
|
20
|
+
'sublime', 'atom', 'terminal', 'iterm', 'iterm2', 'warp', 'hyper',
|
|
21
|
+
'alacritty', 'kitty', 'linear', 'jira', 'asana', 'notion', 'obsidian',
|
|
22
|
+
'logseq', 'roam research', 'figma', 'sketch', 'excel', 'numbers',
|
|
23
|
+
'pages', 'word', 'google docs',
|
|
24
|
+
]);
|
|
25
|
+
const COMMUNICATION_APPS = new Set([
|
|
26
|
+
'slack', 'microsoft teams', 'discord', 'telegram', 'whatsapp',
|
|
27
|
+
'signal', 'zoom', 'google meet', 'facetime', 'messages', 'mail',
|
|
28
|
+
'outlook', 'gmail', 'superhuman', 'spark',
|
|
29
|
+
]);
|
|
30
|
+
const BROWSERS = new Set([
|
|
31
|
+
'google chrome', 'chrome', 'firefox', 'safari', 'edge', 'brave',
|
|
32
|
+
'arc', 'opera', 'vivaldi', 'chromium',
|
|
33
|
+
]);
|
|
34
|
+
const DEV_APPS = new Set([
|
|
35
|
+
'code', 'vscode', 'visual studio code', 'vs code', 'cursor', 'intellij',
|
|
36
|
+
'intellij idea', 'webstorm', 'pycharm', 'android studio', 'xcode',
|
|
37
|
+
'sublime', 'atom', 'terminal', 'iterm', 'iterm2', 'warp', 'hyper',
|
|
38
|
+
'alacritty', 'kitty',
|
|
39
|
+
]);
|
|
40
|
+
class InsightEngine {
|
|
41
|
+
minConfidence;
|
|
42
|
+
constructor(minConfidence) {
|
|
43
|
+
this.minConfidence = minConfidence ?? (0, config_1.getConfig)().insights.minConfidence;
|
|
44
|
+
}
|
|
45
|
+
analyzeWindowEvents(events) {
|
|
46
|
+
if (events.length === 0) {
|
|
47
|
+
return { appSummaries: [], contextSwitches: [], hourlyBreakdown: [], totalActiveTime: 0, uniqueApps: 0 };
|
|
48
|
+
}
|
|
49
|
+
const appDurations = new Map();
|
|
50
|
+
for (const evt of events) {
|
|
51
|
+
const rawApp = evt.data?.app;
|
|
52
|
+
if (!rawApp || typeof rawApp !== 'string' || rawApp === 'undefined')
|
|
53
|
+
continue;
|
|
54
|
+
const app = this.normalizeApp(rawApp);
|
|
55
|
+
if (!app)
|
|
56
|
+
continue;
|
|
57
|
+
const existing = appDurations.get(app) || { duration: 0, count: 0 };
|
|
58
|
+
existing.duration += evt.duration;
|
|
59
|
+
existing.count += 1;
|
|
60
|
+
appDurations.set(app, existing);
|
|
61
|
+
}
|
|
62
|
+
const totalActiveTime = Array.from(appDurations.values()).reduce((sum, v) => sum + v.duration, 0);
|
|
63
|
+
const uniqueApps = appDurations.size;
|
|
64
|
+
const appSummaries = Array.from(appDurations.entries())
|
|
65
|
+
.map(([app, data]) => ({
|
|
66
|
+
app,
|
|
67
|
+
totalDuration: data.duration,
|
|
68
|
+
percentage: totalActiveTime > 0 ? (data.duration / totalActiveTime) * 100 : 0,
|
|
69
|
+
eventCount: data.count,
|
|
70
|
+
category: this.categorizeApp(app),
|
|
71
|
+
}))
|
|
72
|
+
.sort((a, b) => b.totalDuration - a.totalDuration);
|
|
73
|
+
const switchMap = new Map();
|
|
74
|
+
for (let i = 1; i < events.length; i++) {
|
|
75
|
+
const fromApp = this.normalizeApp(String(events[i - 1].data?.app || ''));
|
|
76
|
+
const toApp = this.normalizeApp(String(events[i].data?.app || ''));
|
|
77
|
+
if (!fromApp || !toApp || fromApp === toApp)
|
|
78
|
+
continue;
|
|
79
|
+
const key = `${fromApp} → ${toApp}`;
|
|
80
|
+
switchMap.set(key, (switchMap.get(key) || 0) + 1);
|
|
81
|
+
}
|
|
82
|
+
const contextSwitches = Array.from(switchMap.entries())
|
|
83
|
+
.map(([key, count]) => {
|
|
84
|
+
const [fromApp, toApp] = key.split(' → ');
|
|
85
|
+
return { fromApp, toApp, count };
|
|
86
|
+
})
|
|
87
|
+
.sort((a, b) => b.count - a.count)
|
|
88
|
+
.slice(0, 30);
|
|
89
|
+
const hourlyMap = new Map();
|
|
90
|
+
for (let i = 0; i < events.length; i++) {
|
|
91
|
+
const evt = events[i];
|
|
92
|
+
const hour = new Date(evt.timestamp).toISOString().slice(0, 13) + ':00';
|
|
93
|
+
const rawApp = evt.data?.app;
|
|
94
|
+
if (!rawApp || typeof rawApp !== 'string' || rawApp === 'undefined')
|
|
95
|
+
continue;
|
|
96
|
+
const app = this.normalizeApp(rawApp);
|
|
97
|
+
let h = hourlyMap.get(hour);
|
|
98
|
+
if (!h) {
|
|
99
|
+
h = { apps: new Map(), switches: 0, activeMs: 0 };
|
|
100
|
+
hourlyMap.set(hour, h);
|
|
101
|
+
}
|
|
102
|
+
h.apps.set(app, (h.apps.get(app) || 0) + evt.duration);
|
|
103
|
+
h.activeMs += evt.duration;
|
|
104
|
+
if (i > 0) {
|
|
105
|
+
const prevApp = this.normalizeApp(String(events[i - 1].data?.app || ''));
|
|
106
|
+
if (prevApp && app && prevApp !== app) {
|
|
107
|
+
const prevHour = new Date(events[i - 1].timestamp).toISOString().slice(0, 13) + ':00';
|
|
108
|
+
if (prevHour === hour) {
|
|
109
|
+
h.switches += 1;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
const hourlyBreakdown = Array.from(hourlyMap.entries())
|
|
115
|
+
.map(([hour, data]) => {
|
|
116
|
+
let topApp = 'unknown';
|
|
117
|
+
let topDuration = 0;
|
|
118
|
+
for (const [app, dur] of data.apps) {
|
|
119
|
+
if (dur > topDuration) {
|
|
120
|
+
topDuration = dur;
|
|
121
|
+
topApp = app;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
return {
|
|
125
|
+
hour,
|
|
126
|
+
topApp,
|
|
127
|
+
switchCount: data.switches,
|
|
128
|
+
activeMinutes: Math.round(data.activeMs / 60 * 10) / 10,
|
|
129
|
+
};
|
|
130
|
+
})
|
|
131
|
+
.sort((a, b) => a.hour.localeCompare(b.hour));
|
|
132
|
+
return { appSummaries, contextSwitches, hourlyBreakdown, totalActiveTime, uniqueApps };
|
|
133
|
+
}
|
|
134
|
+
extractCommitments(events) {
|
|
135
|
+
const insights = [];
|
|
136
|
+
const periodStart = events[0]?.timestamp || new Date(0).toISOString();
|
|
137
|
+
const periodEnd = events[events.length - 1]?.timestamp || new Date().toISOString();
|
|
138
|
+
const seenTitles = new Set();
|
|
139
|
+
for (const evt of events) {
|
|
140
|
+
const title = String(evt.data?.title || '');
|
|
141
|
+
const app = String(evt.data?.app || '');
|
|
142
|
+
if (!title || title.length < 5 || title.length > 500)
|
|
143
|
+
continue;
|
|
144
|
+
if (seenTitles.has(title))
|
|
145
|
+
continue;
|
|
146
|
+
seenTitles.add(title);
|
|
147
|
+
for (const pattern of COMMITMENT_PATTERNS) {
|
|
148
|
+
const match = title.match(pattern.regex);
|
|
149
|
+
if (match && pattern.weight >= this.minConfidence) {
|
|
150
|
+
const evidenceTitle = title.length > 200 ? title.slice(0, 197) + '...' : title;
|
|
151
|
+
insights.push({
|
|
152
|
+
type: 'commitment',
|
|
153
|
+
period_start: periodStart,
|
|
154
|
+
period_end: periodEnd,
|
|
155
|
+
title: `Possible commitment: "${evidenceTitle}"`,
|
|
156
|
+
description: `Detected commitment language in ${app}: "${match[0]}". This may need a follow-up or task creation.`,
|
|
157
|
+
confidence: pattern.weight,
|
|
158
|
+
evidence: JSON.stringify([{ timestamp: evt.timestamp, app, title: evidenceTitle, matched: match[0] }]),
|
|
159
|
+
action_text: `Review this conversation and create a task if needed. Consider adding to Linear, Notion, or your preferred task manager.`,
|
|
160
|
+
});
|
|
161
|
+
break;
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
return insights;
|
|
166
|
+
}
|
|
167
|
+
detectAvoidance(events) {
|
|
168
|
+
const insights = [];
|
|
169
|
+
if (events.length < 5)
|
|
170
|
+
return insights;
|
|
171
|
+
const appVisits = new Map();
|
|
172
|
+
for (const evt of events) {
|
|
173
|
+
const rawApp = evt.data?.app;
|
|
174
|
+
if (!rawApp || typeof rawApp !== 'string' || rawApp === 'undefined')
|
|
175
|
+
continue;
|
|
176
|
+
const app = this.normalizeApp(rawApp);
|
|
177
|
+
let visit = appVisits.get(app);
|
|
178
|
+
if (!visit) {
|
|
179
|
+
visit = { visitCount: 0, totalDuration: 0, titles: new Set() };
|
|
180
|
+
appVisits.set(app, visit);
|
|
181
|
+
}
|
|
182
|
+
visit.visitCount += 1;
|
|
183
|
+
visit.totalDuration += evt.duration;
|
|
184
|
+
const title = String(evt.data?.title || '');
|
|
185
|
+
if (title)
|
|
186
|
+
visit.titles.add(title.slice(0, 100));
|
|
187
|
+
}
|
|
188
|
+
for (const [app, visit] of appVisits) {
|
|
189
|
+
if (visit.visitCount < 5)
|
|
190
|
+
continue;
|
|
191
|
+
const avgDurationPerVisit = visit.totalDuration / visit.visitCount;
|
|
192
|
+
const isShortVisits = avgDurationPerVisit < 30;
|
|
193
|
+
const isManyTitles = visit.titles.size >= 3;
|
|
194
|
+
if (isShortVisits || isManyTitles) {
|
|
195
|
+
const totalMinutes = Math.round(visit.totalDuration / 6) / 10;
|
|
196
|
+
const periodStart = events[0]?.timestamp || new Date(0).toISOString();
|
|
197
|
+
const periodEnd = events[events.length - 1]?.timestamp || new Date().toISOString();
|
|
198
|
+
let description = '';
|
|
199
|
+
if (isShortVisits && isManyTitles) {
|
|
200
|
+
description = `You opened ${app} ${visit.visitCount} times today, averaging ${Math.round(avgDurationPerVisit)} seconds per visit across ${visit.titles.size} different contexts. Total time: ${totalMinutes} minutes. This pattern suggests context-switching or avoidance.`;
|
|
201
|
+
}
|
|
202
|
+
else if (isShortVisits) {
|
|
203
|
+
description = `You opened ${app} ${visit.visitCount} times with very short engagement (avg ${Math.round(avgDurationPerVisit)}s). Total time: ${totalMinutes} minutes. This may indicate distraction or task avoidance.`;
|
|
204
|
+
}
|
|
205
|
+
else {
|
|
206
|
+
description = `You switched between ${visit.titles.size} different contexts in ${app} across ${visit.visitCount} visits. Consider batching similar tasks.`;
|
|
207
|
+
}
|
|
208
|
+
const confidence = isShortVisits && isManyTitles ? 0.7 : isShortVisits ? 0.6 : 0.45;
|
|
209
|
+
if (confidence >= this.minConfidence) {
|
|
210
|
+
insights.push({
|
|
211
|
+
type: 'avoidance',
|
|
212
|
+
period_start: periodStart,
|
|
213
|
+
period_end: periodEnd,
|
|
214
|
+
title: `Frequent brief visits to ${app}`,
|
|
215
|
+
description,
|
|
216
|
+
confidence,
|
|
217
|
+
evidence: JSON.stringify({
|
|
218
|
+
app,
|
|
219
|
+
visitCount: visit.visitCount,
|
|
220
|
+
avgDurationPerVisit: Math.round(avgDurationPerVisit),
|
|
221
|
+
totalDuration: visit.totalDuration,
|
|
222
|
+
uniqueTitles: visit.titles.size,
|
|
223
|
+
}),
|
|
224
|
+
action_text: `Consider time-blocking ${app} usage or using focus mode to reduce context switching.`,
|
|
225
|
+
});
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
return insights;
|
|
230
|
+
}
|
|
231
|
+
detectContextSwitchingProblems(events) {
|
|
232
|
+
const insights = [];
|
|
233
|
+
if (events.length < 5)
|
|
234
|
+
return insights;
|
|
235
|
+
const { hourlyBreakdown, contextSwitches } = this.analyzeWindowEvents(events);
|
|
236
|
+
const highSwitchHours = hourlyBreakdown.filter(h => h.switchCount > 20);
|
|
237
|
+
for (const hour of highSwitchHours) {
|
|
238
|
+
const periodStart = events[0]?.timestamp || new Date(0).toISOString();
|
|
239
|
+
const periodEnd = events[events.length - 1]?.timestamp || new Date().toISOString();
|
|
240
|
+
insights.push({
|
|
241
|
+
type: 'context_switch',
|
|
242
|
+
period_start: periodStart,
|
|
243
|
+
period_end: periodEnd,
|
|
244
|
+
title: `High context switching at ${hour.hour}`,
|
|
245
|
+
description: `${hour.switchCount} app switches in one hour while primarily using ${hour.topApp}. Active for ${hour.activeMinutes} minutes. This level of switching typically reduces deep work quality.`,
|
|
246
|
+
confidence: Math.min(0.5 + (hour.switchCount - 20) * 0.01, 0.9),
|
|
247
|
+
evidence: JSON.stringify({ hour: hour.hour, switchCount: hour.switchCount, topApp: hour.topApp }),
|
|
248
|
+
action_text: `Try using focus mode or pomodoro technique during this hour. Block distracting apps with tools like SelfControl or Cold Turkey.`,
|
|
249
|
+
});
|
|
250
|
+
}
|
|
251
|
+
if (contextSwitches.length > 0) {
|
|
252
|
+
const topSwitches = contextSwitches.slice(0, 5);
|
|
253
|
+
const commDevSwitches = topSwitches.filter(s => (COMMUNICATION_APPS.has(s.fromApp.toLowerCase()) && DEV_APPS.has(s.toApp.toLowerCase())) ||
|
|
254
|
+
(DEV_APPS.has(s.fromApp.toLowerCase()) && COMMUNICATION_APPS.has(s.toApp.toLowerCase())));
|
|
255
|
+
if (commDevSwitches.length >= 2) {
|
|
256
|
+
const apps = new Set();
|
|
257
|
+
commDevSwitches.forEach(s => {
|
|
258
|
+
apps.add(s.fromApp);
|
|
259
|
+
apps.add(s.toApp);
|
|
260
|
+
});
|
|
261
|
+
const periodStart = events[0]?.timestamp || new Date(0).toISOString();
|
|
262
|
+
const periodEnd = events[events.length - 1]?.timestamp || new Date().toISOString();
|
|
263
|
+
insights.push({
|
|
264
|
+
type: 'context_switch',
|
|
265
|
+
period_start: periodStart,
|
|
266
|
+
period_end: periodEnd,
|
|
267
|
+
title: `Frequent switching between dev tools and communication apps`,
|
|
268
|
+
description: `You're switching frequently between ${Array.from(apps).join(', ')}. This is a classic deep-work killer.`,
|
|
269
|
+
confidence: 0.75,
|
|
270
|
+
evidence: JSON.stringify(commDevSwitches),
|
|
271
|
+
action_text: `Batch communication to specific times. Check Slack/email only at designated intervals (e.g., every 2 hours).`,
|
|
272
|
+
});
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
return insights;
|
|
276
|
+
}
|
|
277
|
+
detectProjectContext(events, projectKeywords) {
|
|
278
|
+
if (!projectKeywords || projectKeywords.length === 0) {
|
|
279
|
+
projectKeywords = this.extractProjectKeywords(events);
|
|
280
|
+
}
|
|
281
|
+
const projectMap = new Map();
|
|
282
|
+
for (const evt of events) {
|
|
283
|
+
const title = String(evt.data?.title || '').toLowerCase();
|
|
284
|
+
const app = String(evt.data?.app || '');
|
|
285
|
+
for (const keyword of projectKeywords) {
|
|
286
|
+
if (title.includes(keyword.toLowerCase())) {
|
|
287
|
+
let p = projectMap.get(keyword);
|
|
288
|
+
if (!p) {
|
|
289
|
+
p = { duration: 0, apps: new Set(), count: 0, events: [] };
|
|
290
|
+
projectMap.set(keyword, p);
|
|
291
|
+
}
|
|
292
|
+
p.duration += evt.duration;
|
|
293
|
+
p.apps.add(app);
|
|
294
|
+
p.count += 1;
|
|
295
|
+
if (p.events.length < 20) {
|
|
296
|
+
p.events.push({
|
|
297
|
+
timestamp: evt.timestamp,
|
|
298
|
+
app,
|
|
299
|
+
title: title.length > 100 ? title.slice(0, 97) + '...' : title,
|
|
300
|
+
});
|
|
301
|
+
}
|
|
302
|
+
break;
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
return Array.from(projectMap.entries())
|
|
307
|
+
.map(([project, data]) => ({
|
|
308
|
+
project,
|
|
309
|
+
totalDuration: data.duration,
|
|
310
|
+
relatedApps: Array.from(data.apps),
|
|
311
|
+
eventCount: data.count,
|
|
312
|
+
relevantEvents: data.events,
|
|
313
|
+
}))
|
|
314
|
+
.sort((a, b) => b.totalDuration - a.totalDuration);
|
|
315
|
+
}
|
|
316
|
+
detectFocusBlocks(events) {
|
|
317
|
+
const blocks = [];
|
|
318
|
+
if (events.length < 2)
|
|
319
|
+
return blocks;
|
|
320
|
+
let currentBlock = null;
|
|
321
|
+
for (const evt of events) {
|
|
322
|
+
const rawApp = evt.data?.app;
|
|
323
|
+
if (!rawApp || typeof rawApp !== 'string' || rawApp === 'undefined')
|
|
324
|
+
continue;
|
|
325
|
+
const app = this.normalizeApp(rawApp);
|
|
326
|
+
if (!currentBlock || currentBlock.app !== app) {
|
|
327
|
+
if (currentBlock &&
|
|
328
|
+
currentBlock.durationMs >= 10 * 60 * 1000 &&
|
|
329
|
+
DEV_APPS.has(currentBlock.app.toLowerCase())) {
|
|
330
|
+
blocks.push({
|
|
331
|
+
app: currentBlock.app,
|
|
332
|
+
startTime: currentBlock.startTime,
|
|
333
|
+
endTime: currentBlock.endTime,
|
|
334
|
+
durationMinutes: Math.round(currentBlock.durationMs / 6000) / 10,
|
|
335
|
+
});
|
|
336
|
+
}
|
|
337
|
+
currentBlock = {
|
|
338
|
+
app,
|
|
339
|
+
startTime: evt.timestamp,
|
|
340
|
+
endTime: evt.timestamp,
|
|
341
|
+
durationMs: evt.duration * 1000,
|
|
342
|
+
};
|
|
343
|
+
}
|
|
344
|
+
else {
|
|
345
|
+
currentBlock.durationMs += evt.duration * 1000;
|
|
346
|
+
currentBlock.endTime = evt.timestamp;
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
if (currentBlock &&
|
|
350
|
+
currentBlock.durationMs >= 10 * 60 * 1000 &&
|
|
351
|
+
DEV_APPS.has(currentBlock.app.toLowerCase())) {
|
|
352
|
+
blocks.push({
|
|
353
|
+
app: currentBlock.app,
|
|
354
|
+
startTime: currentBlock.startTime,
|
|
355
|
+
endTime: currentBlock.endTime,
|
|
356
|
+
durationMinutes: Math.round(currentBlock.durationMs / 6000) / 10,
|
|
357
|
+
});
|
|
358
|
+
}
|
|
359
|
+
return blocks.sort((a, b) => b.durationMinutes - a.durationMinutes);
|
|
360
|
+
}
|
|
361
|
+
generateDailySummary(events) {
|
|
362
|
+
if (events.length === 0) {
|
|
363
|
+
return 'No activity recorded today. Start ActivityWatch to begin tracking.';
|
|
364
|
+
}
|
|
365
|
+
const { appSummaries, totalActiveTime, uniqueApps } = this.analyzeWindowEvents(events);
|
|
366
|
+
const totalHours = Math.round(totalActiveTime / 360) / 10;
|
|
367
|
+
const totalMinutes = Math.round(totalActiveTime / 6) / 10;
|
|
368
|
+
let summary = `Today's Activity Summary\n`;
|
|
369
|
+
summary += `━━━━━━━━━━━━━━━━━━━━━━\n`;
|
|
370
|
+
summary += `Total active time: `;
|
|
371
|
+
if (totalHours >= 1) {
|
|
372
|
+
summary += `${totalHours} hours (${Math.round(totalMinutes)} minutes)`;
|
|
373
|
+
}
|
|
374
|
+
else {
|
|
375
|
+
summary += `${Math.round(totalMinutes)} minutes`;
|
|
376
|
+
}
|
|
377
|
+
summary += `\n`;
|
|
378
|
+
summary += `Unique applications: ${uniqueApps}\n\n`;
|
|
379
|
+
summary += `Top Applications:\n`;
|
|
380
|
+
for (let i = 0; i < Math.min(appSummaries.length, 10); i++) {
|
|
381
|
+
const a = appSummaries[i];
|
|
382
|
+
const mins = Math.round(a.totalDuration / 6) / 10;
|
|
383
|
+
const bar = '█'.repeat(Math.round(a.percentage / 2));
|
|
384
|
+
summary += ` ${a.app.padEnd(20)} ${String(mins).padStart(6)} min ${bar} ${Math.round(a.percentage)}%\n`;
|
|
385
|
+
}
|
|
386
|
+
const byCategory = {
|
|
387
|
+
productive: appSummaries.filter(a => a.category === 'productive').reduce((s, a) => s + a.totalDuration, 0),
|
|
388
|
+
communication: appSummaries.filter(a => a.category === 'communication').reduce((s, a) => s + a.totalDuration, 0),
|
|
389
|
+
browser: appSummaries.filter(a => a.category === 'browser').reduce((s, a) => s + a.totalDuration, 0),
|
|
390
|
+
other: appSummaries.filter(a => a.category === 'other').reduce((s, a) => s + a.totalDuration, 0),
|
|
391
|
+
};
|
|
392
|
+
summary += `\nCategory Breakdown:\n`;
|
|
393
|
+
for (const [cat, dur] of Object.entries(byCategory)) {
|
|
394
|
+
const pct = totalActiveTime > 0 ? Math.round((dur / totalActiveTime) * 100) : 0;
|
|
395
|
+
if (dur > 0) {
|
|
396
|
+
summary += ` ${cat.padEnd(15)} ${pct}%\n`;
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
const focusBlocks = this.detectFocusBlocks(events);
|
|
400
|
+
if (focusBlocks.length > 0) {
|
|
401
|
+
summary += `\nFocus Blocks:\n`;
|
|
402
|
+
for (const block of focusBlocks.slice(0, 3)) {
|
|
403
|
+
summary += ` ${block.app} — ${block.durationMinutes} min\n`;
|
|
404
|
+
}
|
|
405
|
+
}
|
|
406
|
+
return summary;
|
|
407
|
+
}
|
|
408
|
+
runFullAnalysis(events, projectKeywords) {
|
|
409
|
+
const { appSummaries, contextSwitches, hourlyBreakdown, totalActiveTime } = this.analyzeWindowEvents(events);
|
|
410
|
+
const commitments = this.extractCommitments(events);
|
|
411
|
+
const avoidance = this.detectAvoidance(events);
|
|
412
|
+
const switching = this.detectContextSwitchingProblems(events);
|
|
413
|
+
const projects = this.detectProjectContext(events, projectKeywords);
|
|
414
|
+
const focusBlocks = this.detectFocusBlocks(events);
|
|
415
|
+
const summary = this.generateDailySummary(events);
|
|
416
|
+
const allInsights = [...commitments, ...avoidance, ...switching];
|
|
417
|
+
const maxInsights = (0, config_1.getConfig)().insights.maxInsightsPerRun;
|
|
418
|
+
const filtered = allInsights
|
|
419
|
+
.sort((a, b) => b.confidence - a.confidence)
|
|
420
|
+
.slice(0, maxInsights);
|
|
421
|
+
return {
|
|
422
|
+
insights: filtered,
|
|
423
|
+
summary,
|
|
424
|
+
appSummaries,
|
|
425
|
+
contextSwitches,
|
|
426
|
+
projects,
|
|
427
|
+
focusBlocks,
|
|
428
|
+
hourlyBreakdown,
|
|
429
|
+
totalActiveTime,
|
|
430
|
+
};
|
|
431
|
+
}
|
|
432
|
+
extractProjectKeywords(events) {
|
|
433
|
+
const titleWords = new Map();
|
|
434
|
+
for (const evt of events) {
|
|
435
|
+
const title = String(evt.data?.title || '');
|
|
436
|
+
const words = title
|
|
437
|
+
.toLowerCase()
|
|
438
|
+
.replace(/[^a-z0-9\s\-_.#]/g, ' ')
|
|
439
|
+
.split(/\s+/)
|
|
440
|
+
.filter(w => w.length > 3 && !this.isCommonWord(w));
|
|
441
|
+
for (const word of words) {
|
|
442
|
+
titleWords.set(word, (titleWords.get(word) || 0) + 1);
|
|
443
|
+
}
|
|
444
|
+
}
|
|
445
|
+
return Array.from(titleWords.entries())
|
|
446
|
+
.filter(([, count]) => count >= 5)
|
|
447
|
+
.sort((a, b) => b[1] - a[1])
|
|
448
|
+
.slice(0, 15)
|
|
449
|
+
.map(([word]) => word);
|
|
450
|
+
}
|
|
451
|
+
normalizeApp(app) {
|
|
452
|
+
const cleaned = app.toLowerCase().trim();
|
|
453
|
+
const withoutPath = cleaned.replace(/\.(exe|app)$/i, '').split(/[/\\]/).pop() || cleaned;
|
|
454
|
+
if (withoutPath.includes('chrome'))
|
|
455
|
+
return 'Google Chrome';
|
|
456
|
+
if (withoutPath.includes('firefox'))
|
|
457
|
+
return 'Firefox';
|
|
458
|
+
if (withoutPath.includes('safari'))
|
|
459
|
+
return 'Safari';
|
|
460
|
+
if (withoutPath.includes('edge'))
|
|
461
|
+
return 'Microsoft Edge';
|
|
462
|
+
if (withoutPath.includes('slack'))
|
|
463
|
+
return 'Slack';
|
|
464
|
+
if (withoutPath.includes('discord'))
|
|
465
|
+
return 'Discord';
|
|
466
|
+
if (withoutPath.includes('terminal') || withoutPath.includes('iterm') || withoutPath.includes('warp') || withoutPath.includes('kitty'))
|
|
467
|
+
return 'Terminal';
|
|
468
|
+
if (withoutPath.includes('finder'))
|
|
469
|
+
return 'Finder';
|
|
470
|
+
if (withoutPath.includes('cursor'))
|
|
471
|
+
return 'Cursor';
|
|
472
|
+
if (withoutPath.includes('code') || withoutPath.includes('vscode'))
|
|
473
|
+
return 'VS Code';
|
|
474
|
+
if (withoutPath.includes('intellij') || withoutPath.includes('idea'))
|
|
475
|
+
return 'IntelliJ';
|
|
476
|
+
if (withoutPath.includes('linear'))
|
|
477
|
+
return 'Linear';
|
|
478
|
+
if (withoutPath.includes('notion'))
|
|
479
|
+
return 'Notion';
|
|
480
|
+
if (withoutPath.includes('obsidian'))
|
|
481
|
+
return 'Obsidian';
|
|
482
|
+
if (withoutPath.includes('figma'))
|
|
483
|
+
return 'Figma';
|
|
484
|
+
if (withoutPath.includes('spotify'))
|
|
485
|
+
return 'Spotify';
|
|
486
|
+
if (withoutPath.includes('zoom'))
|
|
487
|
+
return 'Zoom';
|
|
488
|
+
if (withoutPath.includes('outlook') || withoutPath.includes('mail'))
|
|
489
|
+
return 'Mail';
|
|
490
|
+
if (withoutPath.includes('teams'))
|
|
491
|
+
return 'Microsoft Teams';
|
|
492
|
+
if (withoutPath.includes('telegram'))
|
|
493
|
+
return 'Telegram';
|
|
494
|
+
if (withoutPath.includes('whatsapp'))
|
|
495
|
+
return 'WhatsApp';
|
|
496
|
+
return withoutPath.charAt(0).toUpperCase() + withoutPath.slice(1);
|
|
497
|
+
}
|
|
498
|
+
categorizeApp(app) {
|
|
499
|
+
const lower = app.toLowerCase();
|
|
500
|
+
if (PRODUCTIVE_APPS.has(lower) || DEV_APPS.has(lower))
|
|
501
|
+
return 'productive';
|
|
502
|
+
if (COMMUNICATION_APPS.has(lower))
|
|
503
|
+
return 'communication';
|
|
504
|
+
if (BROWSERS.has(lower))
|
|
505
|
+
return 'browser';
|
|
506
|
+
return 'other';
|
|
507
|
+
}
|
|
508
|
+
isCommonWord(word) {
|
|
509
|
+
const common = new Set([
|
|
510
|
+
'this', 'that', 'with', 'from', 'have', 'been', 'were', 'they',
|
|
511
|
+
'what', 'when', 'where', 'which', 'about', 'would', 'could', 'should',
|
|
512
|
+
'there', 'their', 'your', 'like', 'just', 'some', 'also', 'than',
|
|
513
|
+
'then', 'into', 'more', 'over', 'only', 'other', 'after', 'before',
|
|
514
|
+
'between', 'still', 'being', 'very', 'really', 'much',
|
|
515
|
+
]);
|
|
516
|
+
return common.has(word);
|
|
517
|
+
}
|
|
518
|
+
}
|
|
519
|
+
exports.InsightEngine = InsightEngine;
|
|
520
|
+
function createInsightEngine(minConfidence) {
|
|
521
|
+
return new InsightEngine(minConfidence);
|
|
522
|
+
}
|
|
523
|
+
//# sourceMappingURL=insights.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"insights.js","sourceRoot":"","sources":["../src/insights.ts"],"names":[],"mappings":";;;AAwmBA,kDAEC;AAxmBD,qCAAqC;AAErC,MAAM,mBAAmB,GAAG;IAC1B,EAAE,KAAK,EAAE,8IAA8I,EAAE,MAAM,EAAE,GAAG,EAAE;IACtK,EAAE,KAAK,E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