heyiam 0.2.29 → 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/README.md +45 -0
- package/dist/config.js +10 -1
- package/dist/db.js +1 -2
- package/dist/export.js +40 -25
- package/dist/format-utils.js +5 -0
- package/dist/index.js +168 -0
- package/dist/mount.js +300 -102
- package/dist/parsers/claude.js +2 -28
- package/dist/parsers/codex.js +2 -26
- package/dist/parsers/cursor.js +2 -26
- package/dist/parsers/duration.js +35 -0
- package/dist/parsers/gemini.js +2 -20
- package/dist/parsers/types.js +0 -1
- package/dist/public/assets/index-BZ65TU_Y.js +40 -0
- package/dist/public/assets/index-CqCaW2cb.css +1 -0
- package/dist/public/index.html +2 -2
- package/dist/redact.js +4 -104
- package/dist/render/build-render-data.js +9 -2
- package/dist/render/index.js +32 -5
- package/dist/render/liquid.js +147 -7
- package/dist/render/mock-data.js +303 -0
- package/dist/render/templates/aurora/portfolio.liquid +204 -0
- package/dist/render/templates/aurora/project.liquid +260 -0
- package/dist/render/templates/aurora/session.liquid +223 -0
- package/dist/render/templates/aurora/styles.css +1178 -0
- package/dist/render/templates/bauhaus/portfolio.liquid +179 -0
- package/dist/render/templates/bauhaus/project.liquid +300 -0
- package/dist/render/templates/bauhaus/session.liquid +333 -0
- package/dist/render/templates/bauhaus/styles.css +1641 -0
- package/dist/render/templates/blueprint/portfolio.liquid +167 -0
- package/dist/render/templates/blueprint/project.liquid +286 -0
- package/dist/render/templates/blueprint/session.liquid +248 -0
- package/dist/render/templates/blueprint/styles.css +1285 -0
- package/dist/render/templates/canvas/portfolio.liquid +215 -0
- package/dist/render/templates/canvas/project.liquid +235 -0
- package/dist/render/templates/canvas/session.liquid +223 -0
- package/dist/render/templates/canvas/styles.css +1436 -0
- package/dist/render/templates/carbon/portfolio.liquid +170 -0
- package/dist/render/templates/carbon/project.liquid +249 -0
- package/dist/render/templates/carbon/session.liquid +190 -0
- package/dist/render/templates/carbon/styles.css +1091 -0
- package/dist/render/templates/chalk/portfolio.liquid +199 -0
- package/dist/render/templates/chalk/project.liquid +245 -0
- package/dist/render/templates/chalk/session.liquid +215 -0
- package/dist/render/templates/chalk/styles.css +1157 -0
- package/dist/render/templates/circuit/portfolio.liquid +162 -0
- package/dist/render/templates/circuit/project.liquid +247 -0
- package/dist/render/templates/circuit/session.liquid +205 -0
- package/dist/render/templates/circuit/styles.css +1403 -0
- package/dist/render/templates/cosmos/portfolio.liquid +232 -0
- package/dist/render/templates/cosmos/project.liquid +327 -0
- package/dist/render/templates/cosmos/session.liquid +239 -0
- package/dist/render/templates/cosmos/styles.css +1151 -0
- package/dist/render/templates/daylight/portfolio.liquid +217 -0
- package/dist/render/templates/daylight/project.liquid +229 -0
- package/dist/render/templates/daylight/session.liquid +219 -0
- package/dist/render/templates/daylight/styles.css +1311 -0
- package/dist/render/templates/editorial/portfolio.liquid +126 -0
- package/dist/render/templates/editorial/project.liquid +202 -0
- package/dist/render/templates/editorial/session.liquid +171 -0
- package/dist/render/templates/editorial/styles.css +822 -0
- package/dist/render/templates/ember/portfolio.liquid +318 -0
- package/dist/render/templates/ember/project.liquid +232 -0
- package/dist/render/templates/ember/session.liquid +202 -0
- package/dist/render/templates/ember/styles.css +1283 -0
- package/dist/render/templates/glacier/portfolio.liquid +271 -0
- package/dist/render/templates/glacier/project.liquid +288 -0
- package/dist/render/templates/glacier/session.liquid +217 -0
- package/dist/render/templates/glacier/styles.css +1200 -0
- package/dist/render/templates/grid/portfolio.liquid +265 -0
- package/dist/render/templates/grid/project.liquid +306 -0
- package/dist/render/templates/grid/session.liquid +260 -0
- package/dist/render/templates/grid/styles.css +1441 -0
- package/dist/render/templates/kinetic/portfolio.liquid +170 -0
- package/dist/render/templates/kinetic/project.liquid +242 -0
- package/dist/render/templates/kinetic/session.liquid +228 -0
- package/dist/render/templates/kinetic/styles.css +944 -0
- package/dist/render/templates/meridian/portfolio.liquid +255 -0
- package/dist/render/templates/meridian/project.liquid +376 -0
- package/dist/render/templates/meridian/session.liquid +298 -0
- package/dist/render/templates/meridian/styles.css +1369 -0
- package/dist/render/templates/minimal/portfolio.liquid +71 -0
- package/dist/render/templates/minimal/project.liquid +154 -0
- package/dist/render/templates/minimal/session.liquid +140 -0
- package/dist/render/templates/minimal/styles.css +525 -0
- package/dist/render/templates/mono/portfolio.liquid +291 -0
- package/dist/render/templates/mono/project.liquid +275 -0
- package/dist/render/templates/mono/session.liquid +276 -0
- package/dist/render/templates/mono/styles.css +1016 -0
- package/dist/render/templates/neon/portfolio.liquid +217 -0
- package/dist/render/templates/neon/project.liquid +225 -0
- package/dist/render/templates/neon/session.liquid +195 -0
- package/dist/render/templates/neon/styles.css +1265 -0
- package/dist/render/templates/noir/portfolio.liquid +137 -0
- package/dist/render/templates/noir/project.liquid +220 -0
- package/dist/render/templates/noir/session.liquid +241 -0
- package/dist/render/templates/noir/styles.css +1223 -0
- package/dist/render/templates/obsidian/portfolio.liquid +257 -0
- package/dist/render/templates/obsidian/project.liquid +280 -0
- package/dist/render/templates/obsidian/session.liquid +241 -0
- package/dist/render/templates/obsidian/styles.css +1401 -0
- package/dist/render/templates/paper/portfolio.liquid +267 -0
- package/dist/render/templates/paper/project.liquid +235 -0
- package/dist/render/templates/paper/session.liquid +271 -0
- package/dist/render/templates/paper/styles.css +1509 -0
- package/dist/render/templates/parallax/portfolio.liquid +305 -0
- package/dist/render/templates/parallax/project.liquid +275 -0
- package/dist/render/templates/parallax/session.liquid +295 -0
- package/dist/render/templates/parallax/styles.css +1874 -0
- package/dist/render/templates/parchment/portfolio.liquid +290 -0
- package/dist/render/templates/parchment/project.liquid +289 -0
- package/dist/render/templates/parchment/session.liquid +346 -0
- package/dist/render/templates/parchment/styles.css +1397 -0
- package/dist/render/templates/partials/_beats.liquid +16 -0
- package/dist/render/templates/partials/_breadcrumb.liquid +9 -0
- package/dist/render/templates/partials/_footer.liquid +7 -0
- package/dist/render/templates/partials/_growth-chart.liquid +7 -0
- package/dist/render/templates/partials/_key-decisions.liquid +20 -0
- package/dist/render/templates/partials/_links.liquid +16 -0
- package/dist/render/templates/partials/_narrative.liquid +8 -0
- package/dist/render/templates/partials/_phases.liquid +20 -0
- package/dist/render/templates/partials/_portfolio-header.liquid +20 -0
- package/dist/render/templates/partials/_portfolio-projects.liquid +16 -0
- package/dist/render/templates/partials/_portfolio-stats.liquid +19 -0
- package/dist/render/templates/partials/_qa.liquid +13 -0
- package/dist/render/templates/partials/_screenshot.liquid +15 -0
- package/dist/render/templates/partials/_session-cards.liquid +30 -0
- package/dist/render/templates/partials/_session-header.liquid +39 -0
- package/dist/render/templates/partials/_session-sidebar.liquid +30 -0
- package/dist/render/templates/partials/_skills.liquid +12 -0
- package/dist/render/templates/partials/_source-breakdown.liquid +22 -0
- package/dist/render/templates/partials/_stats.liquid +38 -0
- package/dist/render/templates/partials/_work-timeline.liquid +7 -0
- package/dist/render/templates/project.liquid +7 -4
- package/dist/render/templates/radar/portfolio.liquid +233 -0
- package/dist/render/templates/radar/project.liquid +278 -0
- package/dist/render/templates/radar/session.liquid +300 -0
- package/dist/render/templates/radar/styles.css +1049 -0
- package/dist/render/templates/showcase/portfolio.liquid +231 -0
- package/dist/render/templates/showcase/project.liquid +237 -0
- package/dist/render/templates/showcase/session.liquid +210 -0
- package/dist/render/templates/showcase/styles.css +1279 -0
- package/dist/render/templates/signal/portfolio.liquid +227 -0
- package/dist/render/templates/signal/project.liquid +278 -0
- package/dist/render/templates/signal/session.liquid +282 -0
- package/dist/render/templates/signal/styles.css +1395 -0
- package/dist/render/templates/strata/portfolio.liquid +192 -0
- package/dist/render/templates/strata/project.liquid +282 -0
- package/dist/render/templates/strata/session.liquid +261 -0
- package/dist/render/templates/strata/styles.css +1350 -0
- package/dist/render/templates/styles.css +1190 -0
- package/dist/render/templates/terminal/portfolio.liquid +118 -0
- package/dist/render/templates/terminal/project.liquid +161 -0
- package/dist/render/templates/terminal/session.liquid +145 -0
- package/dist/render/templates/terminal/styles.css +492 -0
- package/dist/render/templates/verdant/portfolio.liquid +333 -0
- package/dist/render/templates/verdant/project.liquid +309 -0
- package/dist/render/templates/verdant/session.liquid +237 -0
- package/dist/render/templates/verdant/styles.css +1257 -0
- package/dist/render/templates/zen/portfolio.liquid +136 -0
- package/dist/render/templates/zen/project.liquid +187 -0
- package/dist/render/templates/zen/session.liquid +203 -0
- package/dist/render/templates/zen/styles.css +1207 -0
- package/dist/render/templates.js +90 -0
- package/dist/routes/context.js +15 -10
- package/dist/routes/enhance.js +17 -40
- package/dist/routes/export.js +14 -4
- package/dist/routes/preview.js +480 -108
- package/dist/routes/projects.js +11 -19
- package/dist/routes/publish.js +15 -17
- package/dist/routes/settings.js +94 -1
- package/dist/routes/sse.js +9 -0
- package/dist/server.js +8 -2
- package/dist/settings.js +17 -9
- package/package.json +2 -4
- package/dist/public/assets/index-CC9G8EF1.js +0 -21
- package/dist/public/assets/index-Dalqz2mC.css +0 -1
package/dist/parsers/claude.js
CHANGED
|
@@ -90,8 +90,7 @@ function countTurns(entries) {
|
|
|
90
90
|
}
|
|
91
91
|
return turns;
|
|
92
92
|
}
|
|
93
|
-
|
|
94
|
-
const IDLE_THRESHOLD_MS = 5 * 60 * 1000;
|
|
93
|
+
import { computeActiveDuration } from './duration.js';
|
|
95
94
|
function computeDuration(entries) {
|
|
96
95
|
const timestamps = [];
|
|
97
96
|
let startStr = null;
|
|
@@ -104,32 +103,7 @@ function computeDuration(entries) {
|
|
|
104
103
|
endStr = entry.timestamp;
|
|
105
104
|
timestamps.push(new Date(entry.timestamp).getTime());
|
|
106
105
|
}
|
|
107
|
-
|
|
108
|
-
return { duration_ms: 0, wall_clock_ms: 0, start_time: startStr, end_time: endStr, active_intervals: [] };
|
|
109
|
-
}
|
|
110
|
-
const wallClock = timestamps[timestamps.length - 1] - timestamps[0];
|
|
111
|
-
// Sum only active segments (gaps under threshold) and track intervals
|
|
112
|
-
let activeMs = 0;
|
|
113
|
-
const active_intervals = [];
|
|
114
|
-
let intervalStart = timestamps[0];
|
|
115
|
-
for (let i = 1; i < timestamps.length; i++) {
|
|
116
|
-
const gap = timestamps[i] - timestamps[i - 1];
|
|
117
|
-
if (gap < IDLE_THRESHOLD_MS) {
|
|
118
|
-
activeMs += gap;
|
|
119
|
-
}
|
|
120
|
-
else {
|
|
121
|
-
active_intervals.push([intervalStart, timestamps[i - 1]]);
|
|
122
|
-
intervalStart = timestamps[i];
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
active_intervals.push([intervalStart, timestamps[timestamps.length - 1]]);
|
|
126
|
-
return {
|
|
127
|
-
duration_ms: Math.max(activeMs, 0),
|
|
128
|
-
wall_clock_ms: Math.max(wallClock, 0),
|
|
129
|
-
start_time: startStr,
|
|
130
|
-
end_time: endStr,
|
|
131
|
-
active_intervals,
|
|
132
|
-
};
|
|
106
|
+
return computeActiveDuration(timestamps, startStr, endStr);
|
|
133
107
|
}
|
|
134
108
|
export function computeLocStats(entries) {
|
|
135
109
|
const toolCalls = extractToolCalls(entries);
|
package/dist/parsers/codex.js
CHANGED
|
@@ -99,7 +99,7 @@ function countTurns(lines) {
|
|
|
99
99
|
}
|
|
100
100
|
return turns;
|
|
101
101
|
}
|
|
102
|
-
|
|
102
|
+
import { computeActiveDuration } from './duration.js';
|
|
103
103
|
function computeDuration(lines) {
|
|
104
104
|
const timestamps = [];
|
|
105
105
|
let startStr = null;
|
|
@@ -112,31 +112,7 @@ function computeDuration(lines) {
|
|
|
112
112
|
endStr = line.timestamp;
|
|
113
113
|
timestamps.push(new Date(line.timestamp).getTime());
|
|
114
114
|
}
|
|
115
|
-
|
|
116
|
-
return { duration_ms: 0, wall_clock_ms: 0, start_time: startStr, end_time: endStr, active_intervals: [] };
|
|
117
|
-
}
|
|
118
|
-
const wallClock = timestamps[timestamps.length - 1] - timestamps[0];
|
|
119
|
-
let activeMs = 0;
|
|
120
|
-
const active_intervals = [];
|
|
121
|
-
let intervalStart = timestamps[0];
|
|
122
|
-
for (let i = 1; i < timestamps.length; i++) {
|
|
123
|
-
const gap = timestamps[i] - timestamps[i - 1];
|
|
124
|
-
if (gap < IDLE_THRESHOLD_MS) {
|
|
125
|
-
activeMs += gap;
|
|
126
|
-
}
|
|
127
|
-
else {
|
|
128
|
-
active_intervals.push([intervalStart, timestamps[i - 1]]);
|
|
129
|
-
intervalStart = timestamps[i];
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
active_intervals.push([intervalStart, timestamps[timestamps.length - 1]]);
|
|
133
|
-
return {
|
|
134
|
-
duration_ms: Math.max(activeMs, 0),
|
|
135
|
-
wall_clock_ms: Math.max(wallClock, 0),
|
|
136
|
-
start_time: startStr,
|
|
137
|
-
end_time: endStr,
|
|
138
|
-
active_intervals,
|
|
139
|
-
};
|
|
115
|
+
return computeActiveDuration(timestamps, startStr, endStr);
|
|
140
116
|
}
|
|
141
117
|
function computeLocStats(toolCalls) {
|
|
142
118
|
let totalAdded = 0;
|
package/dist/parsers/cursor.js
CHANGED
|
@@ -261,7 +261,7 @@ function countTurnsFromBubbles(bubbles) {
|
|
|
261
261
|
}
|
|
262
262
|
return turns;
|
|
263
263
|
}
|
|
264
|
-
|
|
264
|
+
import { computeActiveDuration } from './duration.js';
|
|
265
265
|
function computeDurationFromBubbles(bubbles) {
|
|
266
266
|
const timestamps = [];
|
|
267
267
|
let startStr = null;
|
|
@@ -275,31 +275,7 @@ function computeDurationFromBubbles(bubbles) {
|
|
|
275
275
|
endStr = bubble.createdAt;
|
|
276
276
|
timestamps.push(new Date(bubble.createdAt).getTime());
|
|
277
277
|
}
|
|
278
|
-
|
|
279
|
-
return { duration_ms: 0, wall_clock_ms: 0, start_time: startStr, end_time: endStr, active_intervals: [] };
|
|
280
|
-
}
|
|
281
|
-
const wallClock = timestamps[timestamps.length - 1] - timestamps[0];
|
|
282
|
-
let activeMs = 0;
|
|
283
|
-
const active_intervals = [];
|
|
284
|
-
let intervalStart = timestamps[0];
|
|
285
|
-
for (let i = 1; i < timestamps.length; i++) {
|
|
286
|
-
const gap = timestamps[i] - timestamps[i - 1];
|
|
287
|
-
if (gap < IDLE_THRESHOLD_MS) {
|
|
288
|
-
activeMs += gap;
|
|
289
|
-
}
|
|
290
|
-
else {
|
|
291
|
-
active_intervals.push([intervalStart, timestamps[i - 1]]);
|
|
292
|
-
intervalStart = timestamps[i];
|
|
293
|
-
}
|
|
294
|
-
}
|
|
295
|
-
active_intervals.push([intervalStart, timestamps[timestamps.length - 1]]);
|
|
296
|
-
return {
|
|
297
|
-
duration_ms: Math.max(activeMs, 0),
|
|
298
|
-
wall_clock_ms: Math.max(wallClock, 0),
|
|
299
|
-
start_time: startStr,
|
|
300
|
-
end_time: endStr,
|
|
301
|
-
active_intervals,
|
|
302
|
-
};
|
|
278
|
+
return computeActiveDuration(timestamps, startStr, endStr);
|
|
303
279
|
}
|
|
304
280
|
/** Normalize a file path to a consistent absolute form for use as a map/set key. */
|
|
305
281
|
function normalizePath(p) {
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/** Shared active-duration computation used by all parsers. */
|
|
2
|
+
/** Max gap between consecutive entries before it's considered a break (5 min). */
|
|
3
|
+
const IDLE_THRESHOLD_MS = 5 * 60 * 1000;
|
|
4
|
+
/**
|
|
5
|
+
* Compute active duration from pre-extracted timestamps.
|
|
6
|
+
* Each parser extracts timestamps its own way, then delegates here
|
|
7
|
+
* for the interval-merge algorithm.
|
|
8
|
+
*/
|
|
9
|
+
export function computeActiveDuration(timestamps, startStr, endStr) {
|
|
10
|
+
if (timestamps.length < 2 || !startStr || !endStr) {
|
|
11
|
+
return { duration_ms: 0, wall_clock_ms: 0, start_time: startStr, end_time: endStr, active_intervals: [] };
|
|
12
|
+
}
|
|
13
|
+
const wallClock = timestamps[timestamps.length - 1] - timestamps[0];
|
|
14
|
+
let activeMs = 0;
|
|
15
|
+
const active_intervals = [];
|
|
16
|
+
let intervalStart = timestamps[0];
|
|
17
|
+
for (let i = 1; i < timestamps.length; i++) {
|
|
18
|
+
const gap = timestamps[i] - timestamps[i - 1];
|
|
19
|
+
if (gap < IDLE_THRESHOLD_MS) {
|
|
20
|
+
activeMs += gap;
|
|
21
|
+
}
|
|
22
|
+
else {
|
|
23
|
+
active_intervals.push([intervalStart, timestamps[i - 1]]);
|
|
24
|
+
intervalStart = timestamps[i];
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
active_intervals.push([intervalStart, timestamps[timestamps.length - 1]]);
|
|
28
|
+
return {
|
|
29
|
+
duration_ms: Math.max(activeMs, 0),
|
|
30
|
+
wall_clock_ms: Math.max(wallClock, 0),
|
|
31
|
+
start_time: startStr,
|
|
32
|
+
end_time: endStr,
|
|
33
|
+
active_intervals,
|
|
34
|
+
};
|
|
35
|
+
}
|
package/dist/parsers/gemini.js
CHANGED
|
@@ -2,7 +2,7 @@ import { readFile, readdir } from "node:fs/promises";
|
|
|
2
2
|
import { createHash } from "node:crypto";
|
|
3
3
|
import { join } from "node:path";
|
|
4
4
|
import { homedir } from "node:os";
|
|
5
|
-
|
|
5
|
+
import { computeActiveDuration } from './duration.js';
|
|
6
6
|
const GEMINI_BASE = () => join(homedir(), ".gemini", "tmp");
|
|
7
7
|
// --- File path extraction from message text ---
|
|
8
8
|
const ABS_PATH_RE = /(?:^|\s)(\/[\w./-]+\.\w+)/g;
|
|
@@ -109,25 +109,7 @@ function computeDuration(entries) {
|
|
|
109
109
|
const timestamps = entries.map((e) => new Date(e.timestamp).getTime());
|
|
110
110
|
const start_time = entries[0].timestamp;
|
|
111
111
|
const end_time = entries[entries.length - 1].timestamp;
|
|
112
|
-
|
|
113
|
-
return { duration_ms: 0, wall_clock_ms: 0, start_time, end_time, active_intervals: [] };
|
|
114
|
-
}
|
|
115
|
-
const wall_clock_ms = timestamps[timestamps.length - 1] - timestamps[0];
|
|
116
|
-
let activeMs = 0;
|
|
117
|
-
const active_intervals = [];
|
|
118
|
-
let intervalStart = timestamps[0];
|
|
119
|
-
for (let i = 1; i < timestamps.length; i++) {
|
|
120
|
-
const gap = timestamps[i] - timestamps[i - 1];
|
|
121
|
-
if (gap < IDLE_THRESHOLD_MS) {
|
|
122
|
-
activeMs += gap;
|
|
123
|
-
}
|
|
124
|
-
else {
|
|
125
|
-
active_intervals.push([intervalStart, timestamps[i - 1]]);
|
|
126
|
-
intervalStart = timestamps[i];
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
active_intervals.push([intervalStart, timestamps[timestamps.length - 1]]);
|
|
130
|
-
return { duration_ms: Math.max(activeMs, 0), wall_clock_ms: Math.max(wall_clock_ms, 0), start_time, end_time, active_intervals };
|
|
112
|
+
return computeActiveDuration(timestamps, start_time, end_time);
|
|
131
113
|
}
|
|
132
114
|
// --- Turns ---
|
|
133
115
|
function countTurns(entries) {
|