fleetlens 0.12.3 → 0.13.1

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 (228) hide show
  1. package/app/apps/web/.next/BUILD_ID +1 -1
  2. package/app/apps/web/.next/build-manifest.json +8 -8
  3. package/app/apps/web/.next/prerender-manifest.json +3 -3
  4. package/app/apps/web/.next/server/app/_global-error/page/build-manifest.json +5 -5
  5. package/app/apps/web/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  6. package/app/apps/web/.next/server/app/_global-error.html +1 -1
  7. package/app/apps/web/.next/server/app/_global-error.rsc +7 -7
  8. package/app/apps/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +2 -2
  9. package/app/apps/web/.next/server/app/_global-error.segments/_full.segment.rsc +7 -7
  10. package/app/apps/web/.next/server/app/_global-error.segments/_head.segment.rsc +3 -3
  11. package/app/apps/web/.next/server/app/_global-error.segments/_index.segment.rsc +3 -3
  12. package/app/apps/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  13. package/app/apps/web/.next/server/app/_not-found/page/build-manifest.json +5 -5
  14. package/app/apps/web/.next/server/app/_not-found/page.js +1 -1
  15. package/app/apps/web/.next/server/app/_not-found/page.js.nft.json +1 -1
  16. package/app/apps/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  17. package/app/apps/web/.next/server/app/api/ask/route.js.nft.json +1 -1
  18. package/app/apps/web/.next/server/app/api/digest/day/[date]/route.js +1 -1
  19. package/app/apps/web/.next/server/app/api/digest/day/[date]/route.js.nft.json +1 -1
  20. package/app/apps/web/.next/server/app/api/digest/month/[yearMonth]/route.js +1 -1
  21. package/app/apps/web/.next/server/app/api/digest/month/[yearMonth]/route.js.nft.json +1 -1
  22. package/app/apps/web/.next/server/app/api/digest/month-index/route.js.nft.json +1 -1
  23. package/app/apps/web/.next/server/app/api/digest/week/[startDate]/route.js +1 -1
  24. package/app/apps/web/.next/server/app/api/digest/week/[startDate]/route.js.nft.json +1 -1
  25. package/app/apps/web/.next/server/app/api/digest/week-index/route.js.nft.json +1 -1
  26. package/app/apps/web/.next/server/app/api/events/route.js +2 -1
  27. package/app/apps/web/.next/server/app/api/events/route.js.nft.json +1 -1
  28. package/app/apps/web/.next/server/app/api/jobs/route.js.nft.json +1 -1
  29. package/app/apps/web/.next/server/app/api/pdf/[key]/route.js.nft.json +1 -1
  30. package/app/apps/web/.next/server/app/api/runs/[runId]/route.js.nft.json +1 -1
  31. package/app/apps/web/.next/server/app/api/runs/[runId]/stream/route.js.nft.json +1 -1
  32. package/app/apps/web/.next/server/app/api/runs/route.js.nft.json +1 -1
  33. package/app/apps/web/.next/server/app/api/settings/route.js.nft.json +1 -1
  34. package/app/apps/web/.next/server/app/api/team-config/route.js.nft.json +1 -1
  35. package/app/apps/web/.next/server/app/api/workflow-agent/route.js.nft.json +1 -1
  36. package/app/apps/web/.next/server/app/changelog/page/build-manifest.json +5 -5
  37. package/app/apps/web/.next/server/app/changelog/page.js +1 -1
  38. package/app/apps/web/.next/server/app/changelog/page.js.nft.json +1 -1
  39. package/app/apps/web/.next/server/app/changelog/page_client-reference-manifest.js +1 -1
  40. package/app/apps/web/.next/server/app/day/[date]/page/build-manifest.json +5 -5
  41. package/app/apps/web/.next/server/app/day/[date]/page.js +1 -1
  42. package/app/apps/web/.next/server/app/day/[date]/page.js.nft.json +1 -1
  43. package/app/apps/web/.next/server/app/day/[date]/page_client-reference-manifest.js +1 -1
  44. package/app/apps/web/.next/server/app/day/page/build-manifest.json +5 -5
  45. package/app/apps/web/.next/server/app/day/page.js +1 -1
  46. package/app/apps/web/.next/server/app/day/page.js.nft.json +1 -1
  47. package/app/apps/web/.next/server/app/day/page_client-reference-manifest.js +1 -1
  48. package/app/apps/web/.next/server/app/digest/[date]/page/build-manifest.json +5 -5
  49. package/app/apps/web/.next/server/app/digest/[date]/page.js +1 -1
  50. package/app/apps/web/.next/server/app/digest/[date]/page.js.nft.json +1 -1
  51. package/app/apps/web/.next/server/app/digest/[date]/page_client-reference-manifest.js +1 -1
  52. package/app/apps/web/.next/server/app/digest/page/build-manifest.json +5 -5
  53. package/app/apps/web/.next/server/app/digest/page.js +1 -1
  54. package/app/apps/web/.next/server/app/digest/page.js.nft.json +1 -1
  55. package/app/apps/web/.next/server/app/digest/page_client-reference-manifest.js +1 -1
  56. package/app/apps/web/.next/server/app/insights/[key]/page/build-manifest.json +5 -5
  57. package/app/apps/web/.next/server/app/insights/[key]/page.js +1 -1
  58. package/app/apps/web/.next/server/app/insights/[key]/page.js.nft.json +1 -1
  59. package/app/apps/web/.next/server/app/insights/[key]/page_client-reference-manifest.js +1 -1
  60. package/app/apps/web/.next/server/app/insights/page/build-manifest.json +5 -5
  61. package/app/apps/web/.next/server/app/insights/page.js +3 -2
  62. package/app/apps/web/.next/server/app/insights/page.js.nft.json +1 -1
  63. package/app/apps/web/.next/server/app/insights/page_client-reference-manifest.js +1 -1
  64. package/app/apps/web/.next/server/app/page/build-manifest.json +5 -5
  65. package/app/apps/web/.next/server/app/page.js +1 -1
  66. package/app/apps/web/.next/server/app/page.js.nft.json +1 -1
  67. package/app/apps/web/.next/server/app/page_client-reference-manifest.js +1 -1
  68. package/app/apps/web/.next/server/app/parallelism/page/build-manifest.json +5 -5
  69. package/app/apps/web/.next/server/app/parallelism/page.js +1 -1
  70. package/app/apps/web/.next/server/app/parallelism/page.js.nft.json +1 -1
  71. package/app/apps/web/.next/server/app/parallelism/page_client-reference-manifest.js +1 -1
  72. package/app/apps/web/.next/server/app/print/[key]/page/build-manifest.json +5 -5
  73. package/app/apps/web/.next/server/app/print/[key]/page.js +1 -1
  74. package/app/apps/web/.next/server/app/print/[key]/page.js.nft.json +1 -1
  75. package/app/apps/web/.next/server/app/print/[key]/page_client-reference-manifest.js +1 -1
  76. package/app/apps/web/.next/server/app/projects/[slug]/page/build-manifest.json +5 -5
  77. package/app/apps/web/.next/server/app/projects/[slug]/page.js +1 -1
  78. package/app/apps/web/.next/server/app/projects/[slug]/page.js.nft.json +1 -1
  79. package/app/apps/web/.next/server/app/projects/[slug]/page_client-reference-manifest.js +1 -1
  80. package/app/apps/web/.next/server/app/projects/page/build-manifest.json +5 -5
  81. package/app/apps/web/.next/server/app/projects/page.js +1 -1
  82. package/app/apps/web/.next/server/app/projects/page.js.nft.json +1 -1
  83. package/app/apps/web/.next/server/app/projects/page_client-reference-manifest.js +1 -1
  84. package/app/apps/web/.next/server/app/runs/page/build-manifest.json +5 -5
  85. package/app/apps/web/.next/server/app/runs/page.js +1 -1
  86. package/app/apps/web/.next/server/app/runs/page.js.nft.json +1 -1
  87. package/app/apps/web/.next/server/app/runs/page_client-reference-manifest.js +1 -1
  88. package/app/apps/web/.next/server/app/sessions/[id]/page/build-manifest.json +5 -5
  89. package/app/apps/web/.next/server/app/sessions/[id]/page.js +1 -1
  90. package/app/apps/web/.next/server/app/sessions/[id]/page.js.nft.json +1 -1
  91. package/app/apps/web/.next/server/app/sessions/[id]/page_client-reference-manifest.js +1 -1
  92. package/app/apps/web/.next/server/app/sessions/page/build-manifest.json +5 -5
  93. package/app/apps/web/.next/server/app/sessions/page.js +1 -1
  94. package/app/apps/web/.next/server/app/sessions/page.js.nft.json +1 -1
  95. package/app/apps/web/.next/server/app/sessions/page_client-reference-manifest.js +1 -1
  96. package/app/apps/web/.next/server/app/settings/page/build-manifest.json +5 -5
  97. package/app/apps/web/.next/server/app/settings/page.js +1 -1
  98. package/app/apps/web/.next/server/app/settings/page.js.nft.json +1 -1
  99. package/app/apps/web/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  100. package/app/apps/web/.next/server/app/team/page/build-manifest.json +5 -5
  101. package/app/apps/web/.next/server/app/team/page.js +1 -1
  102. package/app/apps/web/.next/server/app/team/page.js.nft.json +1 -1
  103. package/app/apps/web/.next/server/app/team/page_client-reference-manifest.js +1 -1
  104. package/app/apps/web/.next/server/app/usage/page/build-manifest.json +5 -5
  105. package/app/apps/web/.next/server/app/usage/page.js +1 -1
  106. package/app/apps/web/.next/server/app/usage/page.js.nft.json +1 -1
  107. package/app/apps/web/.next/server/app/usage/page_client-reference-manifest.js +1 -1
  108. package/app/apps/web/.next/server/chunks/[externals]__0rv9ct5._.js +3 -0
  109. package/app/apps/web/.next/server/chunks/[root-of-the-server]__0gril0u._.js +9 -0
  110. package/app/apps/web/.next/server/chunks/[root-of-the-server]__0n79hpm._.js +9 -0
  111. package/app/apps/web/.next/server/chunks/[root-of-the-server]__0~utv~v._.js +9 -0
  112. package/app/apps/web/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_02bw8.n.js +5 -0
  113. package/app/apps/web/.next/server/chunks/packages_parser_dist_06d9se1._.js +1 -1
  114. package/app/apps/web/.next/server/chunks/packages_parser_dist_10ihc3~._.js +1 -1
  115. package/app/apps/web/.next/server/chunks/ssr/[root-of-the-server]__0exckd4._.js +1 -1
  116. package/app/apps/web/.next/server/chunks/ssr/{[root-of-the-server]__0-1_njm._.js → [root-of-the-server]__0k1x-c9._.js} +2 -2
  117. package/app/apps/web/.next/server/chunks/ssr/[root-of-the-server]__0lhwp-k._.js +8 -0
  118. package/app/apps/web/.next/server/chunks/ssr/[root-of-the-server]__0n-ax-5._.js +1 -1
  119. package/app/apps/web/.next/server/chunks/ssr/[root-of-the-server]__0o03ymy._.js +1 -1
  120. package/app/apps/web/.next/server/chunks/ssr/[root-of-the-server]__0~.f_3z._.js +3 -3
  121. package/app/apps/web/.next/server/chunks/ssr/_0kajk31._.js +1 -1
  122. package/app/apps/web/.next/server/chunks/ssr/_0s3n5mz._.js +8 -0
  123. package/app/apps/web/.next/server/chunks/ssr/_0xu2pvc._.js +1 -1
  124. package/app/apps/web/.next/server/chunks/ssr/{_0jw2sm7._.js → _12mbgs5._.js} +2 -2
  125. package/app/apps/web/.next/server/chunks/ssr/apps_web_0.mu7c7._.js +1 -1
  126. package/app/apps/web/.next/server/chunks/ssr/apps_web_app_day_[date]_day-view_tsx_0wjoe1u._.js +1 -1
  127. package/app/apps/web/.next/server/chunks/ssr/apps_web_app_insights_page_tsx_071kwyw._.js +3 -0
  128. package/app/apps/web/.next/server/chunks/ssr/apps_web_app_sessions_sessions-grid_tsx_0bri5x.._.js +3 -0
  129. package/app/apps/web/.next/server/chunks/ssr/apps_web_components_0b-4-4j._.js +1 -1
  130. package/app/apps/web/.next/server/chunks/ssr/apps_web_components_0c-tpft._.js +1 -1
  131. package/app/apps/web/.next/server/chunks/ssr/apps_web_components_0l6hsch._.js +6 -0
  132. package/app/apps/web/.next/server/chunks/ssr/apps_web_components_0txtsv5._.js +1 -1
  133. package/app/apps/web/.next/server/chunks/ssr/apps_web_lib_changelog_ts_0n7_p1d._.js +1 -1
  134. package/app/apps/web/.next/server/chunks/ssr/apps_web_lib_changelog_ts_0nb5_-s._.js +1 -1
  135. package/app/apps/web/.next/server/chunks/ssr/node_modules_lucide-react_dist_esm_icons_0cepfi8._.js +3 -0
  136. package/app/apps/web/.next/server/chunks/ssr/packages_entries_dist_node_0_271yr.js +1 -1
  137. package/app/apps/web/.next/server/chunks/ssr/packages_parser_dist_0mx_509._.js +1 -1
  138. package/app/apps/web/.next/server/middleware-build-manifest.js +8 -8
  139. package/app/apps/web/.next/server/middleware-manifest.json +5 -5
  140. package/app/apps/web/.next/server/pages/500.html +1 -1
  141. package/app/apps/web/.next/server/server-reference-manifest.js +1 -1
  142. package/app/apps/web/.next/server/server-reference-manifest.json +1 -1
  143. package/app/apps/web/.next/static/chunks/02bv_ejzhhzvp.js +10 -0
  144. package/app/apps/web/.next/static/chunks/{07lbm-sdh9c2j.js → 0389wb_f0j78j.js} +1 -1
  145. package/app/apps/web/.next/static/chunks/03gy1evbn94qu.js +6 -0
  146. package/app/apps/web/.next/static/chunks/03rd.3cc_t~yf.js +4 -0
  147. package/app/apps/web/.next/static/chunks/{12jvvc_w.cb45.css → 083~hzkv577.5.css} +1 -1
  148. package/app/apps/web/.next/static/chunks/{0osdgl2.9cl1q.js → 0d2x-wfu.m0-z.js} +1 -1
  149. package/app/apps/web/.next/static/chunks/{0lziv8y_6yp5w.js → 0e_fzy0n8ij-o.js} +1 -1
  150. package/app/apps/web/.next/static/chunks/{0l4e3as18eexy.js → 0g223u9amib0q.js} +1 -1
  151. package/app/apps/web/.next/static/chunks/{0h3.-_s-k0mj3.js → 0i.hc~2bj0_3d.js} +1 -1
  152. package/app/apps/web/.next/static/chunks/0m7dd-2zd9vl2.js +4 -0
  153. package/app/apps/web/.next/static/chunks/0nqklmbs5s3ax.js +6 -0
  154. package/app/apps/web/.next/static/chunks/{073081qv4uyn8.js → 0p--hzrway8~3.js} +1 -1
  155. package/app/apps/web/.next/static/chunks/0q8dg4txlzno0.js +1 -0
  156. package/app/apps/web/.next/static/chunks/{0gblp_v.kiu-..js → 0qv-gw888_5nu.js} +1 -1
  157. package/app/apps/web/.next/static/chunks/{14bjditmmrn7l.js → 0tirv_vo6q8uc.js} +1 -1
  158. package/app/apps/web/.next/static/chunks/{0qmh5da6gfm56.js → 0vz4~a~~hq399.js} +1 -1
  159. package/app/apps/web/.next/static/chunks/{13po66tt.68f3.js → 0wwcx42ng8i2e.js} +3 -3
  160. package/app/apps/web/.next/static/chunks/{0n0n.0279ot6c.js → 14vx702c32kn6.js} +1 -1
  161. package/app/apps/web/.next/static/chunks/{turbopack-0lb9w090w5ezx.js → turbopack-0mxu3~9vk.brh.js} +1 -1
  162. package/app/apps/web/app/api/digest/_shared/digest-route-helpers.ts +178 -0
  163. package/app/apps/web/app/api/digest/day/[date]/route.ts +34 -128
  164. package/app/apps/web/app/api/digest/month/[yearMonth]/route.ts +36 -121
  165. package/app/apps/web/app/api/digest/week/[startDate]/route.ts +36 -123
  166. package/app/apps/web/app/api/events/route.ts +47 -4
  167. package/app/apps/web/app/globals.css +23 -0
  168. package/app/apps/web/app/insights/page.tsx +20 -5
  169. package/app/apps/web/app/layout.tsx +1 -0
  170. package/app/apps/web/app/page.tsx +1 -1
  171. package/app/apps/web/app/parallelism/burst-detail-modal.tsx +637 -0
  172. package/app/apps/web/app/parallelism/concurrency-info-modal.tsx +228 -0
  173. package/app/apps/web/app/parallelism/gantt-chart-utils.ts +49 -0
  174. package/app/apps/web/app/parallelism/gantt-chart.tsx +16 -902
  175. package/app/apps/web/app/projects/[slug]/page.tsx +1 -1
  176. package/app/apps/web/app/sessions/[id]/session-view/colors.ts +31 -0
  177. package/app/apps/web/app/sessions/[id]/session-view/debug-list.tsx +78 -0
  178. package/app/apps/web/app/sessions/[id]/session-view/drawer.tsx +414 -0
  179. package/app/apps/web/app/sessions/[id]/session-view/entry-day-strip.tsx +124 -0
  180. package/app/apps/web/app/sessions/[id]/session-view/header-stats.tsx +217 -0
  181. package/app/apps/web/app/sessions/[id]/session-view/helpers.ts +135 -0
  182. package/app/apps/web/app/sessions/[id]/session-view/subagent-drawer.tsx +339 -0
  183. package/app/apps/web/app/sessions/[id]/session-view/token-stats.tsx +111 -0
  184. package/app/apps/web/app/sessions/[id]/session-view/tooltip.tsx +63 -0
  185. package/app/apps/web/app/sessions/[id]/session-view/types.ts +46 -0
  186. package/app/apps/web/app/sessions/[id]/session-view/workflows-shared.tsx +104 -0
  187. package/app/apps/web/app/sessions/[id]/session-view.tsx +701 -1577
  188. package/app/apps/web/app/sessions/[id]/team-tab/minimap-hover-card.tsx +201 -0
  189. package/app/apps/web/app/sessions/[id]/team-tab/minimap-idle-band.tsx +53 -0
  190. package/app/apps/web/app/sessions/[id]/team-tab/minimap-shared.ts +20 -0
  191. package/app/apps/web/app/sessions/[id]/team-tab/team-minimap.tsx +10 -265
  192. package/app/apps/web/app/sessions/sessions-grid.tsx +43 -19
  193. package/app/apps/web/components/digest-actions.tsx +103 -0
  194. package/app/apps/web/components/job-queue-widget.tsx +1 -1
  195. package/app/apps/web/components/live-badge.tsx +11 -3
  196. package/app/apps/web/components/live-sessions-widget.tsx +9 -3
  197. package/app/apps/web/components/month-digest-view.tsx +19 -64
  198. package/app/apps/web/components/outcome-pill.tsx +24 -4
  199. package/app/apps/web/components/searchable-select.tsx +215 -0
  200. package/app/apps/web/components/tail-mode.tsx +39 -8
  201. package/app/apps/web/components/week-digest-view.tsx +16 -71
  202. package/app/apps/web/lib/changelog-data.generated.ts +1 -1
  203. package/app/apps/web/lib/entries-index.ts +7 -8
  204. package/app/apps/web/lib/entries.ts +0 -9
  205. package/app/apps/web/lib/format.test.ts +221 -0
  206. package/app/apps/web/lib/utilization-tone.test.ts +56 -0
  207. package/app/apps/web/package.json +1 -1
  208. package/app/apps/web/tsconfig.tsbuildinfo +1 -1
  209. package/dist/daemon-worker.js +83 -45
  210. package/dist/index.js +452 -198
  211. package/package.json +1 -1
  212. package/app/apps/web/.next/server/chunks/[root-of-the-server]__0455vu3._.js +0 -5
  213. package/app/apps/web/.next/server/chunks/[root-of-the-server]__04j3tng._.js +0 -9
  214. package/app/apps/web/.next/server/chunks/[root-of-the-server]__0cnh3k4._.js +0 -9
  215. package/app/apps/web/.next/server/chunks/[root-of-the-server]__132eosx._.js +0 -9
  216. package/app/apps/web/.next/server/chunks/ssr/[root-of-the-server]__136-0me._.js +0 -8
  217. package/app/apps/web/.next/server/chunks/ssr/_0w.cv64._.js +0 -8
  218. package/app/apps/web/.next/server/chunks/ssr/apps_web_components_01d-iwx._.js +0 -6
  219. package/app/apps/web/.next/server/chunks/ssr/node_modules_lucide-react_dist_esm_icons_0-lmm4p._.js +0 -3
  220. package/app/apps/web/.next/static/chunks/00xkqnvk4-d1-.js +0 -10
  221. package/app/apps/web/.next/static/chunks/0htgc_hr1bw67.js +0 -1
  222. package/app/apps/web/.next/static/chunks/0nnjldasalwdu.js +0 -4
  223. package/app/apps/web/.next/static/chunks/0okg13phslr1..js +0 -4
  224. package/app/apps/web/.next/static/chunks/0vf-3rauafbek.js +0 -6
  225. package/app/apps/web/.next/static/chunks/0vl27-vjob2_9.js +0 -6
  226. /package/app/apps/web/.next/static/{7kQ9mNICnVHhf4-LmSGcy → VEfemGVAQ0xCHjj15orZU}/_buildManifest.js +0 -0
  227. /package/app/apps/web/.next/static/{7kQ9mNICnVHhf4-LmSGcy → VEfemGVAQ0xCHjj15orZU}/_clientMiddlewareManifest.js +0 -0
  228. /package/app/apps/web/.next/static/{7kQ9mNICnVHhf4-LmSGcy → VEfemGVAQ0xCHjj15orZU}/_ssgManifest.js +0 -0
@@ -264,23 +264,28 @@ function detectParallelRuns(sessions, minActive = 2) {
264
264
  const points = computeParallelism(sessions);
265
265
  const runs = [];
266
266
  let cur = null;
267
+ let curIds = null;
267
268
  for (const p of points) {
268
269
  if (p.active >= minActive) {
269
270
  if (!cur) {
270
- cur = { startMs: p.atMs, endMs: p.atMs, peak: p.active, sessions: [...p.sessions] };
271
+ curIds = new Set(p.sessions);
272
+ cur = { startMs: p.atMs, endMs: p.atMs, peak: p.active, sessions: Array.from(curIds) };
271
273
  } else {
272
274
  cur.endMs = p.atMs;
273
275
  if (p.active > cur.peak)
274
276
  cur.peak = p.active;
275
277
  for (const sid of p.sessions) {
276
- if (!cur.sessions.includes(sid))
278
+ if (!curIds.has(sid)) {
279
+ curIds.add(sid);
277
280
  cur.sessions.push(sid);
281
+ }
278
282
  }
279
283
  }
280
284
  } else if (cur) {
281
285
  cur.endMs = p.atMs;
282
286
  runs.push(cur);
283
287
  cur = null;
288
+ curIds = null;
284
289
  }
285
290
  }
286
291
  if (cur)
@@ -690,23 +695,6 @@ function eventDollars(ev) {
690
695
  const p = PRICES[ev.family];
691
696
  return (ev.input * p.input + ev.output * p.output + ev.cacheRead * p.cacheRead + ev.cache_1h * p.cache_1h + ev.cache_5m * p.cache_5m) / 1e6;
692
697
  }
693
- function dollarsInWindow(events, startMs, endMs) {
694
- let total = 0;
695
- for (const ev of events) {
696
- const t = Date.parse(ev.ts);
697
- if (t < startMs)
698
- continue;
699
- if (t >= endMs)
700
- break;
701
- total += eventDollars(ev);
702
- }
703
- return total;
704
- }
705
- function predictUtilization(events, startMs, endMs, ratePerPct) {
706
- if (ratePerPct <= 0)
707
- return 0;
708
- return dollarsInWindow(events, startMs, endMs) / ratePerPct;
709
- }
710
698
  function buildSpendIndex(events) {
711
699
  const sorted = events.map((e) => ({ e, t: Date.parse(e.ts) })).filter((x) => !Number.isNaN(x.t)).sort((a, b) => a.t - b.t);
712
700
  const ts = new Float64Array(sorted.length);
@@ -892,7 +880,14 @@ var init_user_input = __esm({
892
880
  "<local-command-stdout>",
893
881
  "<local-command-caveat>",
894
882
  "<task-notification>",
895
- "Base directory for this skill:"
883
+ "Base directory for this skill:",
884
+ // Harness-authored lines that arrive with role:"user" but are not the
885
+ // human typing. The post-compact continuation is Claude Code restating the
886
+ // summarized conversation; the Stop-hook notice is a skill (e.g. /goal)
887
+ // keeping the turn alive. Neither is a real user message, so they must not
888
+ // render as "User" rows or count toward digest "top user instructions".
889
+ "This session is being continued from a previous conversation",
890
+ "A session-scoped Stop hook is now active"
896
891
  ];
897
892
  }
898
893
  });
@@ -1106,9 +1101,19 @@ function parseTranscript(rawLines) {
1106
1101
  if (ev)
1107
1102
  events.push(ev);
1108
1103
  }
1109
- const timestamped = events.map((e) => e.timestamp ? Date.parse(e.timestamp) : void 0).filter((n) => typeof n === "number" && !Number.isNaN(n));
1110
- const startMs = timestamped.length ? Math.min(...timestamped) : void 0;
1111
- const endMs = timestamped.length ? Math.max(...timestamped) : void 0;
1104
+ let startMs;
1105
+ let endMs;
1106
+ for (const e of events) {
1107
+ if (!e.timestamp)
1108
+ continue;
1109
+ const ms = Date.parse(e.timestamp);
1110
+ if (Number.isNaN(ms))
1111
+ continue;
1112
+ if (startMs === void 0 || ms < startMs)
1113
+ startMs = ms;
1114
+ if (endMs === void 0 || ms > endMs)
1115
+ endMs = ms;
1116
+ }
1112
1117
  const firstTs = startMs !== void 0 ? new Date(startMs).toISOString() : void 0;
1113
1118
  const lastTs = endMs !== void 0 ? new Date(endMs).toISOString() : void 0;
1114
1119
  for (const ev of events) {
@@ -1342,12 +1347,10 @@ function parseTranscript(rawLines) {
1342
1347
  if (typeof m.model === "string" && !model)
1343
1348
  model = m.model;
1344
1349
  const mid = typeof m.id === "string" ? m.id : void 0;
1345
- const rid = typeof o.requestId === "string" ? o.requestId : void 0;
1346
- const dedupKey = mid != null ? `${mid}:${rid ?? ""}` : void 0;
1347
- if (dedupKey && seenMessageIds.has(dedupKey))
1350
+ if (mid && seenMessageIds.has(mid))
1348
1351
  continue;
1349
- if (dedupKey)
1350
- seenMessageIds.add(dedupKey);
1352
+ if (mid)
1353
+ seenMessageIds.add(mid);
1351
1354
  const u = extractUsage(m.usage);
1352
1355
  if (u) {
1353
1356
  totalUsage.input += u.input;
@@ -1806,6 +1809,40 @@ async function scanWorkflowAggregate(projectDirPath, sessionId) {
1806
1809
  }));
1807
1810
  return { workflowCount: parsed.filter(Boolean).length, spawnedAgentCount, spans };
1808
1811
  }
1812
+ async function dirNewestMtimeMs(dir, depth) {
1813
+ let entries;
1814
+ try {
1815
+ entries = await fs.readdir(dir, { withFileTypes: true });
1816
+ } catch {
1817
+ return 0;
1818
+ }
1819
+ const vals = await Promise.all(entries.map(async (e) => {
1820
+ const p = path.join(dir, e.name);
1821
+ try {
1822
+ if (e.isDirectory())
1823
+ return depth > 0 ? await dirNewestMtimeMs(p, depth - 1) : 0;
1824
+ return (await fs.stat(p)).mtimeMs;
1825
+ } catch {
1826
+ return 0;
1827
+ }
1828
+ }));
1829
+ return vals.reduce((a, b) => Math.max(a, b), 0);
1830
+ }
1831
+ async function newestNestedActivityMs(projectDirPath, sessionId) {
1832
+ const base = path.join(projectDirPath, sessionId);
1833
+ const [subM, wfM] = await Promise.all([
1834
+ dirNewestMtimeMs(path.join(base, "subagents"), 2),
1835
+ dirNewestMtimeMs(path.join(base, "workflows"), 0)
1836
+ ]);
1837
+ const newest = Math.max(subM, wfM);
1838
+ return newest > 0 ? newest : void 0;
1839
+ }
1840
+ async function withLastActivity(meta, f) {
1841
+ const nested = await newestNestedActivityMs(path.dirname(f.fullPath), meta.id);
1842
+ const baseMs = meta.lastTimestamp ? Date.parse(meta.lastTimestamp) : 0;
1843
+ const lastActivityMs = Math.max(Number.isFinite(baseMs) ? baseMs : 0, nested ?? 0);
1844
+ return lastActivityMs > 0 ? { ...meta, lastActivityMs } : meta;
1845
+ }
1809
1846
  function foldWorkflowAgentTime(activeSegments, spans) {
1810
1847
  if (spans.length === 0)
1811
1848
  return {};
@@ -1896,7 +1933,10 @@ async function listSessions(opts = {}) {
1896
1933
  files = files.filter((f) => f.projectDir === projectDir);
1897
1934
  files.sort((a, b) => b.mtimeMs - a.mtimeMs);
1898
1935
  const sliced = files.slice(0, limit);
1899
- const metas = await Promise.all(sliced.map((f) => getCachedMeta(f)));
1936
+ const metas = await Promise.all(sliced.map(async (f) => {
1937
+ const m = await getCachedMeta(f);
1938
+ return m ? withLastActivity(m, f) : null;
1939
+ }));
1900
1940
  return metas.filter((m) => m !== null);
1901
1941
  }
1902
1942
  async function getSession(id, opts = {}) {
@@ -1916,12 +1956,13 @@ async function getSession(id, opts = {}) {
1916
1956
  loadWorkflows(workflowsDir, sessionStartMs, detail.events)
1917
1957
  ]);
1918
1958
  const spawnedAgentCount = workflows.reduce((n, w) => n + w.agentCount, 0);
1919
- return {
1959
+ const result = {
1920
1960
  ...detail,
1921
1961
  subagents,
1922
1962
  workflows,
1923
1963
  ...workflows.length > 0 ? { workflowCount: workflows.length, spawnedAgentCount } : {}
1924
1964
  };
1965
+ return withLastActivity(result, hit);
1925
1966
  }
1926
1967
  function summarizeSubagentLines(lines) {
1927
1968
  let startMs;
@@ -3531,7 +3572,8 @@ async function parseSession2(file) {
3531
3572
  } catch {
3532
3573
  }
3533
3574
  }
3534
- for (const eventObj of parsedObjects) {
3575
+ for (const rawObj of parsedObjects) {
3576
+ const eventObj = rawObj;
3535
3577
  const ts = eventObj.created_at || eventObj.timestamp;
3536
3578
  if (eventObj.type === "USER_INPUT") {
3537
3579
  if (typeof eventObj.content === "string") {
@@ -4010,12 +4052,6 @@ async function getCoworkSession(id, opts = {}) {
4010
4052
  detailCache5.set(file.auditPath, { detail, key });
4011
4053
  return detail;
4012
4054
  }
4013
- function coworkSessionLocalDay(meta) {
4014
- if (!meta.firstTimestamp)
4015
- return void 0;
4016
- const ms = Date.parse(meta.firstTimestamp);
4017
- return Number.isFinite(ms) ? toLocalDay(ms) : void 0;
4018
- }
4019
4055
  var DEFAULT_COWORK_ROOT, SESSION_ID_RE, spacesCache, metaCache5, detailCache5;
4020
4056
  var init_cowork = __esm({
4021
4057
  "../parser/dist/cowork.js"() {
@@ -4089,7 +4125,6 @@ __export(fs_exports, {
4089
4125
  clearCaches: () => clearCaches,
4090
4126
  clearTeamConfig: () => clearTeamConfig,
4091
4127
  codexSessionLocalDay: () => codexSessionLocalDay,
4092
- coworkSessionLocalDay: () => coworkSessionLocalDay,
4093
4128
  decodeProjectName: () => decodeProjectName,
4094
4129
  findTeamLead: () => findTeamLead,
4095
4130
  geminiSessionLocalDay: () => geminiSessionLocalDay,
@@ -4194,7 +4229,7 @@ async function loadUsageByDay(start, end) {
4194
4229
  if (ms < startMs)
4195
4230
  continue;
4196
4231
  if (ms > endMs)
4197
- break;
4232
+ continue;
4198
4233
  const key = toLocalDay(ms);
4199
4234
  const util2 = snap.five_hour?.utilization ?? 0;
4200
4235
  const cur2 = byDay.get(key) ?? 0;
@@ -4890,7 +4925,6 @@ __export(dist_exports, {
4890
4925
  detectParallelRuns: () => detectParallelRuns,
4891
4926
  detectPrMarkers: () => detectPrMarkers,
4892
4927
  dollarsInRange: () => dollarsInRange,
4893
- dollarsInWindow: () => dollarsInWindow,
4894
4928
  eventDollars: () => eventDollars,
4895
4929
  getAgentMetadata: () => getAgentMetadata,
4896
4930
  groupByProject: () => groupByProject,
@@ -4903,7 +4937,6 @@ __export(dist_exports, {
4903
4937
  modelFamily: () => modelFamily,
4904
4938
  parseTranscript: () => parseTranscript,
4905
4939
  predictAnchored: () => predictAnchored,
4906
- predictUtilization: () => predictUtilization,
4907
4940
  priorCalendarMonth: () => priorCalendarMonth,
4908
4941
  priorCalendarWeek: () => priorCalendarWeek,
4909
4942
  projectRepoName: () => projectRepoName,
@@ -5758,6 +5791,7 @@ function buildIngestPayload(inputs) {
5758
5791
  return {
5759
5792
  ingestId: randomUUID(),
5760
5793
  observedAt: (/* @__PURE__ */ new Date()).toISOString(),
5794
+ cliVersion: "0.13.1",
5761
5795
  ...richRollup || inputs.enrichedExtras || inputs.artifactSignals ? { schemaVersion: RICH_ROLLUP_SCHEMA_VERSION } : {},
5762
5796
  ...inputs.rollup ? { dailyRollup: inputs.rollup } : {},
5763
5797
  ...richRollup ? { richRollup } : {},
@@ -6500,6 +6534,7 @@ var INSTRUCTION_RE = /\b(?:can you|please|let's|let us|i need|could you|would yo
6500
6534
  function extractUserInstructions(text) {
6501
6535
  if (!text)
6502
6536
  return [];
6537
+ INSTRUCTION_RE.lastIndex = 0;
6503
6538
  const out = [];
6504
6539
  const seen = /* @__PURE__ */ new Set();
6505
6540
  let m;
@@ -15158,14 +15193,14 @@ async function getUpdateAvailability() {
15158
15193
  if (isDevMode()) return null;
15159
15194
  const latest = await fetchLatestVersion();
15160
15195
  if (latest === null) return {
15161
- current: "0.12.3",
15196
+ current: "0.13.1",
15162
15197
  latest: null,
15163
15198
  updateAvailable: false
15164
15199
  };
15165
15200
  return {
15166
- current: "0.12.3",
15201
+ current: "0.13.1",
15167
15202
  latest,
15168
- updateAvailable: shouldUpdate("0.12.3", latest)
15203
+ updateAvailable: shouldUpdate("0.13.1", latest)
15169
15204
  };
15170
15205
  }
15171
15206
 
@@ -15244,7 +15279,10 @@ async function runDaemonUpdateCheck() {
15244
15279
  nextUpdateCheckAtMs = Date.now() + AUTO_UPDATE_INTERVAL_MS;
15245
15280
  return;
15246
15281
  }
15247
- if (updateCheckInFlight) return;
15282
+ if (updateCheckInFlight) {
15283
+ nextUpdateCheckAtMs = Date.now() + AUTO_UPDATE_INTERVAL_MS;
15284
+ return;
15285
+ }
15248
15286
  updateCheckInFlight = true;
15249
15287
  const checkedAt = (/* @__PURE__ */ new Date()).toISOString();
15250
15288
  try {