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.
Files changed (177) hide show
  1. package/README.md +45 -0
  2. package/dist/config.js +10 -1
  3. package/dist/db.js +1 -2
  4. package/dist/export.js +40 -25
  5. package/dist/format-utils.js +5 -0
  6. package/dist/index.js +168 -0
  7. package/dist/mount.js +300 -102
  8. package/dist/parsers/claude.js +2 -28
  9. package/dist/parsers/codex.js +2 -26
  10. package/dist/parsers/cursor.js +2 -26
  11. package/dist/parsers/duration.js +35 -0
  12. package/dist/parsers/gemini.js +2 -20
  13. package/dist/parsers/types.js +0 -1
  14. package/dist/public/assets/index-BZ65TU_Y.js +40 -0
  15. package/dist/public/assets/index-CqCaW2cb.css +1 -0
  16. package/dist/public/index.html +2 -2
  17. package/dist/redact.js +4 -104
  18. package/dist/render/build-render-data.js +9 -2
  19. package/dist/render/index.js +32 -5
  20. package/dist/render/liquid.js +147 -7
  21. package/dist/render/mock-data.js +303 -0
  22. package/dist/render/templates/aurora/portfolio.liquid +204 -0
  23. package/dist/render/templates/aurora/project.liquid +260 -0
  24. package/dist/render/templates/aurora/session.liquid +223 -0
  25. package/dist/render/templates/aurora/styles.css +1178 -0
  26. package/dist/render/templates/bauhaus/portfolio.liquid +179 -0
  27. package/dist/render/templates/bauhaus/project.liquid +300 -0
  28. package/dist/render/templates/bauhaus/session.liquid +333 -0
  29. package/dist/render/templates/bauhaus/styles.css +1641 -0
  30. package/dist/render/templates/blueprint/portfolio.liquid +167 -0
  31. package/dist/render/templates/blueprint/project.liquid +286 -0
  32. package/dist/render/templates/blueprint/session.liquid +248 -0
  33. package/dist/render/templates/blueprint/styles.css +1285 -0
  34. package/dist/render/templates/canvas/portfolio.liquid +215 -0
  35. package/dist/render/templates/canvas/project.liquid +235 -0
  36. package/dist/render/templates/canvas/session.liquid +223 -0
  37. package/dist/render/templates/canvas/styles.css +1436 -0
  38. package/dist/render/templates/carbon/portfolio.liquid +170 -0
  39. package/dist/render/templates/carbon/project.liquid +249 -0
  40. package/dist/render/templates/carbon/session.liquid +190 -0
  41. package/dist/render/templates/carbon/styles.css +1091 -0
  42. package/dist/render/templates/chalk/portfolio.liquid +199 -0
  43. package/dist/render/templates/chalk/project.liquid +245 -0
  44. package/dist/render/templates/chalk/session.liquid +215 -0
  45. package/dist/render/templates/chalk/styles.css +1157 -0
  46. package/dist/render/templates/circuit/portfolio.liquid +162 -0
  47. package/dist/render/templates/circuit/project.liquid +247 -0
  48. package/dist/render/templates/circuit/session.liquid +205 -0
  49. package/dist/render/templates/circuit/styles.css +1403 -0
  50. package/dist/render/templates/cosmos/portfolio.liquid +232 -0
  51. package/dist/render/templates/cosmos/project.liquid +327 -0
  52. package/dist/render/templates/cosmos/session.liquid +239 -0
  53. package/dist/render/templates/cosmos/styles.css +1151 -0
  54. package/dist/render/templates/daylight/portfolio.liquid +217 -0
  55. package/dist/render/templates/daylight/project.liquid +229 -0
  56. package/dist/render/templates/daylight/session.liquid +219 -0
  57. package/dist/render/templates/daylight/styles.css +1311 -0
  58. package/dist/render/templates/editorial/portfolio.liquid +126 -0
  59. package/dist/render/templates/editorial/project.liquid +202 -0
  60. package/dist/render/templates/editorial/session.liquid +171 -0
  61. package/dist/render/templates/editorial/styles.css +822 -0
  62. package/dist/render/templates/ember/portfolio.liquid +318 -0
  63. package/dist/render/templates/ember/project.liquid +232 -0
  64. package/dist/render/templates/ember/session.liquid +202 -0
  65. package/dist/render/templates/ember/styles.css +1283 -0
  66. package/dist/render/templates/glacier/portfolio.liquid +271 -0
  67. package/dist/render/templates/glacier/project.liquid +288 -0
  68. package/dist/render/templates/glacier/session.liquid +217 -0
  69. package/dist/render/templates/glacier/styles.css +1200 -0
  70. package/dist/render/templates/grid/portfolio.liquid +265 -0
  71. package/dist/render/templates/grid/project.liquid +306 -0
  72. package/dist/render/templates/grid/session.liquid +260 -0
  73. package/dist/render/templates/grid/styles.css +1441 -0
  74. package/dist/render/templates/kinetic/portfolio.liquid +170 -0
  75. package/dist/render/templates/kinetic/project.liquid +242 -0
  76. package/dist/render/templates/kinetic/session.liquid +228 -0
  77. package/dist/render/templates/kinetic/styles.css +944 -0
  78. package/dist/render/templates/meridian/portfolio.liquid +255 -0
  79. package/dist/render/templates/meridian/project.liquid +376 -0
  80. package/dist/render/templates/meridian/session.liquid +298 -0
  81. package/dist/render/templates/meridian/styles.css +1369 -0
  82. package/dist/render/templates/minimal/portfolio.liquid +71 -0
  83. package/dist/render/templates/minimal/project.liquid +154 -0
  84. package/dist/render/templates/minimal/session.liquid +140 -0
  85. package/dist/render/templates/minimal/styles.css +525 -0
  86. package/dist/render/templates/mono/portfolio.liquid +291 -0
  87. package/dist/render/templates/mono/project.liquid +275 -0
  88. package/dist/render/templates/mono/session.liquid +276 -0
  89. package/dist/render/templates/mono/styles.css +1016 -0
  90. package/dist/render/templates/neon/portfolio.liquid +217 -0
  91. package/dist/render/templates/neon/project.liquid +225 -0
  92. package/dist/render/templates/neon/session.liquid +195 -0
  93. package/dist/render/templates/neon/styles.css +1265 -0
  94. package/dist/render/templates/noir/portfolio.liquid +137 -0
  95. package/dist/render/templates/noir/project.liquid +220 -0
  96. package/dist/render/templates/noir/session.liquid +241 -0
  97. package/dist/render/templates/noir/styles.css +1223 -0
  98. package/dist/render/templates/obsidian/portfolio.liquid +257 -0
  99. package/dist/render/templates/obsidian/project.liquid +280 -0
  100. package/dist/render/templates/obsidian/session.liquid +241 -0
  101. package/dist/render/templates/obsidian/styles.css +1401 -0
  102. package/dist/render/templates/paper/portfolio.liquid +267 -0
  103. package/dist/render/templates/paper/project.liquid +235 -0
  104. package/dist/render/templates/paper/session.liquid +271 -0
  105. package/dist/render/templates/paper/styles.css +1509 -0
  106. package/dist/render/templates/parallax/portfolio.liquid +305 -0
  107. package/dist/render/templates/parallax/project.liquid +275 -0
  108. package/dist/render/templates/parallax/session.liquid +295 -0
  109. package/dist/render/templates/parallax/styles.css +1874 -0
  110. package/dist/render/templates/parchment/portfolio.liquid +290 -0
  111. package/dist/render/templates/parchment/project.liquid +289 -0
  112. package/dist/render/templates/parchment/session.liquid +346 -0
  113. package/dist/render/templates/parchment/styles.css +1397 -0
  114. package/dist/render/templates/partials/_beats.liquid +16 -0
  115. package/dist/render/templates/partials/_breadcrumb.liquid +9 -0
  116. package/dist/render/templates/partials/_footer.liquid +7 -0
  117. package/dist/render/templates/partials/_growth-chart.liquid +7 -0
  118. package/dist/render/templates/partials/_key-decisions.liquid +20 -0
  119. package/dist/render/templates/partials/_links.liquid +16 -0
  120. package/dist/render/templates/partials/_narrative.liquid +8 -0
  121. package/dist/render/templates/partials/_phases.liquid +20 -0
  122. package/dist/render/templates/partials/_portfolio-header.liquid +20 -0
  123. package/dist/render/templates/partials/_portfolio-projects.liquid +16 -0
  124. package/dist/render/templates/partials/_portfolio-stats.liquid +19 -0
  125. package/dist/render/templates/partials/_qa.liquid +13 -0
  126. package/dist/render/templates/partials/_screenshot.liquid +15 -0
  127. package/dist/render/templates/partials/_session-cards.liquid +30 -0
  128. package/dist/render/templates/partials/_session-header.liquid +39 -0
  129. package/dist/render/templates/partials/_session-sidebar.liquid +30 -0
  130. package/dist/render/templates/partials/_skills.liquid +12 -0
  131. package/dist/render/templates/partials/_source-breakdown.liquid +22 -0
  132. package/dist/render/templates/partials/_stats.liquid +38 -0
  133. package/dist/render/templates/partials/_work-timeline.liquid +7 -0
  134. package/dist/render/templates/project.liquid +7 -4
  135. package/dist/render/templates/radar/portfolio.liquid +233 -0
  136. package/dist/render/templates/radar/project.liquid +278 -0
  137. package/dist/render/templates/radar/session.liquid +300 -0
  138. package/dist/render/templates/radar/styles.css +1049 -0
  139. package/dist/render/templates/showcase/portfolio.liquid +231 -0
  140. package/dist/render/templates/showcase/project.liquid +237 -0
  141. package/dist/render/templates/showcase/session.liquid +210 -0
  142. package/dist/render/templates/showcase/styles.css +1279 -0
  143. package/dist/render/templates/signal/portfolio.liquid +227 -0
  144. package/dist/render/templates/signal/project.liquid +278 -0
  145. package/dist/render/templates/signal/session.liquid +282 -0
  146. package/dist/render/templates/signal/styles.css +1395 -0
  147. package/dist/render/templates/strata/portfolio.liquid +192 -0
  148. package/dist/render/templates/strata/project.liquid +282 -0
  149. package/dist/render/templates/strata/session.liquid +261 -0
  150. package/dist/render/templates/strata/styles.css +1350 -0
  151. package/dist/render/templates/styles.css +1190 -0
  152. package/dist/render/templates/terminal/portfolio.liquid +118 -0
  153. package/dist/render/templates/terminal/project.liquid +161 -0
  154. package/dist/render/templates/terminal/session.liquid +145 -0
  155. package/dist/render/templates/terminal/styles.css +492 -0
  156. package/dist/render/templates/verdant/portfolio.liquid +333 -0
  157. package/dist/render/templates/verdant/project.liquid +309 -0
  158. package/dist/render/templates/verdant/session.liquid +237 -0
  159. package/dist/render/templates/verdant/styles.css +1257 -0
  160. package/dist/render/templates/zen/portfolio.liquid +136 -0
  161. package/dist/render/templates/zen/project.liquid +187 -0
  162. package/dist/render/templates/zen/session.liquid +203 -0
  163. package/dist/render/templates/zen/styles.css +1207 -0
  164. package/dist/render/templates.js +90 -0
  165. package/dist/routes/context.js +15 -10
  166. package/dist/routes/enhance.js +17 -40
  167. package/dist/routes/export.js +14 -4
  168. package/dist/routes/preview.js +480 -108
  169. package/dist/routes/projects.js +11 -19
  170. package/dist/routes/publish.js +15 -17
  171. package/dist/routes/settings.js +94 -1
  172. package/dist/routes/sse.js +9 -0
  173. package/dist/server.js +8 -2
  174. package/dist/settings.js +17 -9
  175. package/package.json +2 -4
  176. package/dist/public/assets/index-CC9G8EF1.js +0 -21
  177. package/dist/public/assets/index-Dalqz2mC.css +0 -1
@@ -90,8 +90,7 @@ function countTurns(entries) {
90
90
  }
91
91
  return turns;
92
92
  }
93
- /** Max gap between consecutive entries before it's considered a break (5 min). */
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
- if (timestamps.length < 2 || !startStr || !endStr) {
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);
@@ -99,7 +99,7 @@ function countTurns(lines) {
99
99
  }
100
100
  return turns;
101
101
  }
102
- const IDLE_THRESHOLD_MS = 5 * 60 * 1000;
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
- if (timestamps.length < 2 || !startStr || !endStr) {
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;
@@ -261,7 +261,7 @@ function countTurnsFromBubbles(bubbles) {
261
261
  }
262
262
  return turns;
263
263
  }
264
- const IDLE_THRESHOLD_MS = 5 * 60 * 1000;
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
- if (timestamps.length < 2 || !startStr || !endStr) {
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
+ }
@@ -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
- const IDLE_THRESHOLD_MS = 5 * 60 * 1000;
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
- if (timestamps.length < 2) {
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) {
@@ -5,7 +5,6 @@ export const SOURCE_DISPLAY_NAMES = {
5
5
  cursor: "Cursor",
6
6
  codex: "Codex",
7
7
  gemini: "Gemini CLI",
8
- antigravity: "Antigravity",
9
8
  };
10
9
  /**
11
10
  * Read only the first line of a file without loading the entire file into memory.