fleetlens 0.11.2 → 0.12.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 (214) hide show
  1. package/app/apps/web/.next/BUILD_ID +1 -1
  2. package/app/apps/web/.next/app-path-routes-manifest.json +3 -0
  3. package/app/apps/web/.next/build-manifest.json +3 -3
  4. package/app/apps/web/.next/prerender-manifest.json +3 -3
  5. package/app/apps/web/.next/routes-manifest.json +22 -0
  6. package/app/apps/web/.next/server/app/_global-error.html +1 -1
  7. package/app/apps/web/.next/server/app/_global-error.rsc +1 -1
  8. package/app/apps/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  9. package/app/apps/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  10. package/app/apps/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  11. package/app/apps/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  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.js +2 -1
  14. package/app/apps/web/.next/server/app/_not-found/page.js.nft.json +1 -1
  15. package/app/apps/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  16. package/app/apps/web/.next/server/app/api/ask/route.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 +2 -2
  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 +2 -2
  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 +1 -1
  23. package/app/apps/web/.next/server/app/api/digest/month-index/route.js.nft.json +1 -1
  24. package/app/apps/web/.next/server/app/api/digest/week/[startDate]/route.js +2 -2
  25. package/app/apps/web/.next/server/app/api/digest/week/[startDate]/route.js.nft.json +1 -1
  26. package/app/apps/web/.next/server/app/api/digest/week-index/route.js +1 -1
  27. package/app/apps/web/.next/server/app/api/digest/week-index/route.js.nft.json +1 -1
  28. package/app/apps/web/.next/server/app/api/events/route.js +1 -1
  29. package/app/apps/web/.next/server/app/api/events/route.js.nft.json +1 -1
  30. package/app/apps/web/.next/server/app/api/jobs/route.js +1 -1
  31. package/app/apps/web/.next/server/app/api/jobs/route.js.nft.json +1 -1
  32. package/app/apps/web/.next/server/app/api/pdf/[key]/route/app-paths-manifest.json +3 -0
  33. package/app/apps/web/.next/server/app/api/pdf/[key]/route/build-manifest.json +9 -0
  34. package/app/apps/web/.next/server/app/api/pdf/[key]/route/server-reference-manifest.json +4 -0
  35. package/app/apps/web/.next/server/app/api/pdf/[key]/route.js +10 -0
  36. package/app/apps/web/.next/server/app/api/pdf/[key]/route.js.map +5 -0
  37. package/app/apps/web/.next/server/app/api/pdf/[key]/route.js.nft.json +1 -0
  38. package/app/apps/web/.next/server/app/api/pdf/[key]/route_client-reference-manifest.js +3 -0
  39. package/app/apps/web/.next/server/app/api/runs/[runId]/route.js +1 -1
  40. package/app/apps/web/.next/server/app/api/runs/[runId]/route.js.nft.json +1 -1
  41. package/app/apps/web/.next/server/app/api/runs/[runId]/stream/route.js +1 -1
  42. package/app/apps/web/.next/server/app/api/runs/[runId]/stream/route.js.nft.json +1 -1
  43. package/app/apps/web/.next/server/app/api/runs/route.js +1 -1
  44. package/app/apps/web/.next/server/app/api/runs/route.js.nft.json +1 -1
  45. package/app/apps/web/.next/server/app/api/settings/route.js +1 -1
  46. package/app/apps/web/.next/server/app/api/settings/route.js.nft.json +1 -1
  47. package/app/apps/web/.next/server/app/api/team-config/route.js +1 -1
  48. package/app/apps/web/.next/server/app/api/team-config/route.js.nft.json +1 -1
  49. package/app/apps/web/.next/server/app/api/workflow-agent/route/app-paths-manifest.json +3 -0
  50. package/app/apps/web/.next/server/app/api/workflow-agent/route/build-manifest.json +9 -0
  51. package/app/apps/web/.next/server/app/api/workflow-agent/route/server-reference-manifest.json +4 -0
  52. package/app/apps/web/.next/server/app/api/workflow-agent/route.js +7 -0
  53. package/app/apps/web/.next/server/app/api/workflow-agent/route.js.map +5 -0
  54. package/app/apps/web/.next/server/app/api/workflow-agent/route.js.nft.json +1 -0
  55. package/app/apps/web/.next/server/app/api/workflow-agent/route_client-reference-manifest.js +3 -0
  56. package/app/apps/web/.next/server/app/changelog/page.js +2 -1
  57. package/app/apps/web/.next/server/app/changelog/page.js.nft.json +1 -1
  58. package/app/apps/web/.next/server/app/changelog/page_client-reference-manifest.js +1 -1
  59. package/app/apps/web/.next/server/app/day/[date]/page.js +2 -1
  60. package/app/apps/web/.next/server/app/day/[date]/page.js.nft.json +1 -1
  61. package/app/apps/web/.next/server/app/day/[date]/page_client-reference-manifest.js +1 -1
  62. package/app/apps/web/.next/server/app/day/page.js +2 -1
  63. package/app/apps/web/.next/server/app/day/page.js.nft.json +1 -1
  64. package/app/apps/web/.next/server/app/day/page_client-reference-manifest.js +1 -1
  65. package/app/apps/web/.next/server/app/digest/[date]/page.js +2 -1
  66. package/app/apps/web/.next/server/app/digest/[date]/page.js.nft.json +1 -1
  67. package/app/apps/web/.next/server/app/digest/[date]/page_client-reference-manifest.js +1 -1
  68. package/app/apps/web/.next/server/app/digest/page.js +2 -1
  69. package/app/apps/web/.next/server/app/digest/page.js.nft.json +1 -1
  70. package/app/apps/web/.next/server/app/digest/page_client-reference-manifest.js +1 -1
  71. package/app/apps/web/.next/server/app/insights/[key]/page.js +2 -1
  72. package/app/apps/web/.next/server/app/insights/[key]/page.js.nft.json +1 -1
  73. package/app/apps/web/.next/server/app/insights/[key]/page_client-reference-manifest.js +1 -1
  74. package/app/apps/web/.next/server/app/insights/page.js +2 -1
  75. package/app/apps/web/.next/server/app/insights/page.js.nft.json +1 -1
  76. package/app/apps/web/.next/server/app/insights/page_client-reference-manifest.js +1 -1
  77. package/app/apps/web/.next/server/app/page.js +2 -1
  78. package/app/apps/web/.next/server/app/page.js.nft.json +1 -1
  79. package/app/apps/web/.next/server/app/page_client-reference-manifest.js +1 -1
  80. package/app/apps/web/.next/server/app/parallelism/page.js +2 -1
  81. package/app/apps/web/.next/server/app/parallelism/page.js.nft.json +1 -1
  82. package/app/apps/web/.next/server/app/parallelism/page_client-reference-manifest.js +1 -1
  83. package/app/apps/web/.next/server/app/print/[key]/page/app-paths-manifest.json +3 -0
  84. package/app/apps/web/.next/server/app/print/[key]/page/build-manifest.json +17 -0
  85. package/app/apps/web/.next/server/app/print/[key]/page/next-font-manifest.json +6 -0
  86. package/app/apps/web/.next/server/app/print/[key]/page/react-loadable-manifest.json +1 -0
  87. package/app/apps/web/.next/server/app/print/[key]/page/server-reference-manifest.json +4 -0
  88. package/app/apps/web/.next/server/app/print/[key]/page.js +19 -0
  89. package/app/apps/web/.next/server/app/print/[key]/page.js.map +5 -0
  90. package/app/apps/web/.next/server/app/print/[key]/page.js.nft.json +1 -0
  91. package/app/apps/web/.next/server/app/print/[key]/page_client-reference-manifest.js +3 -0
  92. package/app/apps/web/.next/server/app/projects/[slug]/page.js +2 -1
  93. package/app/apps/web/.next/server/app/projects/[slug]/page.js.nft.json +1 -1
  94. package/app/apps/web/.next/server/app/projects/[slug]/page_client-reference-manifest.js +1 -1
  95. package/app/apps/web/.next/server/app/projects/page.js +2 -1
  96. package/app/apps/web/.next/server/app/projects/page.js.nft.json +1 -1
  97. package/app/apps/web/.next/server/app/projects/page_client-reference-manifest.js +1 -1
  98. package/app/apps/web/.next/server/app/runs/page.js +2 -1
  99. package/app/apps/web/.next/server/app/runs/page.js.nft.json +1 -1
  100. package/app/apps/web/.next/server/app/runs/page_client-reference-manifest.js +1 -1
  101. package/app/apps/web/.next/server/app/sessions/[id]/page.js +2 -1
  102. package/app/apps/web/.next/server/app/sessions/[id]/page.js.nft.json +1 -1
  103. package/app/apps/web/.next/server/app/sessions/[id]/page_client-reference-manifest.js +1 -1
  104. package/app/apps/web/.next/server/app/sessions/page.js +2 -1
  105. package/app/apps/web/.next/server/app/sessions/page.js.nft.json +1 -1
  106. package/app/apps/web/.next/server/app/sessions/page_client-reference-manifest.js +1 -1
  107. package/app/apps/web/.next/server/app/settings/page.js +2 -1
  108. package/app/apps/web/.next/server/app/settings/page.js.nft.json +1 -1
  109. package/app/apps/web/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  110. package/app/apps/web/.next/server/app/team/page.js +2 -1
  111. package/app/apps/web/.next/server/app/team/page.js.nft.json +1 -1
  112. package/app/apps/web/.next/server/app/team/page_client-reference-manifest.js +1 -1
  113. package/app/apps/web/.next/server/app/usage/page.js +2 -1
  114. package/app/apps/web/.next/server/app/usage/page.js.nft.json +1 -1
  115. package/app/apps/web/.next/server/app/usage/page_client-reference-manifest.js +1 -1
  116. package/app/apps/web/.next/server/app-paths-manifest.json +3 -0
  117. package/app/apps/web/.next/server/chunks/[root-of-the-server]__0455vu3._.js +2 -2
  118. package/app/apps/web/.next/server/chunks/{[root-of-the-server]__0_8zh-i._.js → [root-of-the-server]__04j3tng._.js} +2 -2
  119. package/app/apps/web/.next/server/chunks/{[root-of-the-server]__0jprdks._.js → [root-of-the-server]__0cnh3k4._.js} +2 -2
  120. package/app/apps/web/.next/server/chunks/[root-of-the-server]__0e.f-t.._.js +3 -0
  121. package/app/apps/web/.next/server/chunks/[root-of-the-server]__0kc9e1n._.js +3 -0
  122. package/app/apps/web/.next/server/chunks/[root-of-the-server]__0y5p73y._.js +3 -0
  123. package/app/apps/web/.next/server/chunks/{[root-of-the-server]__0ej_p3s._.js → [root-of-the-server]__132eosx._.js} +2 -2
  124. package/app/apps/web/.next/server/chunks/apps_web__next-internal_server_app_api_pdf_[key]_route_actions_0intcw9.js +3 -0
  125. package/app/apps/web/.next/server/chunks/apps_web__next-internal_server_app_api_workflow-agent_route_actions_0gxw9tv.js +3 -0
  126. package/app/apps/web/.next/server/chunks/packages_entries_dist_node_0bckr7-.js +1 -1
  127. package/app/apps/web/.next/server/chunks/packages_parser_dist_06d9se1._.js +3 -0
  128. package/app/apps/web/.next/server/chunks/packages_parser_dist_10ihc3~._.js +3 -0
  129. package/app/apps/web/.next/server/chunks/ssr/[root-of-the-server]__04eq6z2._.js +1 -1
  130. package/app/apps/web/.next/server/chunks/ssr/[root-of-the-server]__04il6m2._.js +11 -0
  131. package/app/apps/web/.next/server/chunks/ssr/[root-of-the-server]__0exckd4._.js +1 -1
  132. package/app/apps/web/.next/server/chunks/ssr/[root-of-the-server]__0n-ax-5._.js +3 -0
  133. package/app/apps/web/.next/server/chunks/ssr/[root-of-the-server]__0o03ymy._.js +2 -2
  134. package/app/apps/web/.next/server/chunks/ssr/[root-of-the-server]__0rvzdnx._.js +1 -1
  135. package/app/apps/web/.next/server/chunks/ssr/[root-of-the-server]__0z7mg0b._.js +1 -1
  136. package/app/apps/web/.next/server/chunks/ssr/[root-of-the-server]__0~.f_3z._.js +12 -0
  137. package/app/apps/web/.next/server/chunks/ssr/[root-of-the-server]__136-0me._.js +8 -0
  138. package/app/apps/web/.next/server/chunks/ssr/_0cgg5zi._.js +3 -0
  139. package/app/apps/web/.next/server/chunks/ssr/_0jw2sm7._.js +1 -1
  140. package/app/apps/web/.next/server/chunks/ssr/_0kajk31._.js +3 -0
  141. package/app/apps/web/.next/server/chunks/ssr/_0w.cv64._.js +8 -0
  142. package/app/apps/web/.next/server/chunks/ssr/_0xu2pvc._.js +1 -1
  143. package/app/apps/web/.next/server/chunks/ssr/apps_web_0.mu7c7._.js +1 -1
  144. package/app/apps/web/.next/server/chunks/ssr/apps_web__next-internal_server_app_print_[key]_page_actions_0_ygul-.js +3 -0
  145. package/app/apps/web/.next/server/chunks/ssr/apps_web_components_01d-iwx._.js +6 -0
  146. package/app/apps/web/.next/server/chunks/ssr/apps_web_components_week-digest_tsx_0c9ha31._.js +3 -0
  147. package/app/apps/web/.next/server/chunks/ssr/apps_web_lib_0k0tl52._.js +3 -0
  148. package/app/apps/web/.next/server/chunks/ssr/apps_web_lib_changelog_ts_0n7_p1d._.js +3 -0
  149. package/app/apps/web/.next/server/chunks/ssr/apps_web_lib_changelog_ts_0nb5_-s._.js +3 -0
  150. package/app/apps/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_07orc4m.js +4 -0
  151. package/app/apps/web/.next/server/chunks/ssr/packages_parser_dist_12.endt._.js +1 -1
  152. package/app/apps/web/.next/server/edge/chunks/[root-of-the-server]__0.sx~id._.js +11 -0
  153. package/app/apps/web/.next/server/edge/chunks/node_modules_next_dist_esm_build_templates_edge-wrapper_0p1t1z8.js +3 -0
  154. package/app/apps/web/.next/server/edge/chunks/turbopack-node_modules_next_dist_esm_build_templates_edge-wrapper_0mw-sqe.js +3 -0
  155. package/app/apps/web/.next/server/functions-config-manifest.json +4 -1
  156. package/app/apps/web/.next/server/middleware-build-manifest.js +3 -3
  157. package/app/apps/web/.next/server/middleware-manifest.json +30 -2
  158. package/app/apps/web/.next/server/pages/500.html +1 -1
  159. package/app/apps/web/.next/server/server-reference-manifest.js +1 -1
  160. package/app/apps/web/.next/server/server-reference-manifest.json +1 -1
  161. package/app/apps/web/.next/static/chunks/00xkqnvk4-d1-.js +10 -0
  162. package/app/apps/web/.next/static/chunks/03_7wmpodz36t.js +1 -0
  163. package/app/apps/web/.next/static/chunks/0716x58e1_2c5.js +1 -0
  164. package/app/apps/web/.next/static/chunks/0nnjldasalwdu.js +4 -0
  165. package/app/apps/web/.next/static/chunks/0okg13phslr1..js +4 -0
  166. package/app/apps/web/.next/static/chunks/0vf-3rauafbek.js +6 -0
  167. package/app/apps/web/.next/static/chunks/0vl27-vjob2_9.js +6 -0
  168. package/app/apps/web/.next/static/chunks/0yo458-7577lr.js +1 -0
  169. package/app/apps/web/.next/static/chunks/14bjditmmrn7l.js +1 -0
  170. package/app/apps/web/.next/static/rrY-ephAArv8tjJOXD622/_clientMiddlewareManifest.js +6 -0
  171. package/app/apps/web/app/api/events/route.ts +50 -2
  172. package/app/apps/web/app/api/pdf/[key]/route.ts +199 -0
  173. package/app/apps/web/app/api/workflow-agent/route.ts +27 -0
  174. package/app/apps/web/app/insights/[key]/page.tsx +4 -1
  175. package/app/apps/web/app/layout.tsx +23 -1
  176. package/app/apps/web/app/page.tsx +24 -1
  177. package/app/apps/web/app/print/[key]/page.tsx +91 -0
  178. package/app/apps/web/app/projects/[slug]/page.tsx +6 -7
  179. package/app/apps/web/app/projects/page.tsx +2 -3
  180. package/app/apps/web/app/sessions/[id]/session-view.tsx +1297 -19
  181. package/app/apps/web/app/sessions/sessions-grid.tsx +10 -1
  182. package/app/apps/web/components/dashboard-view.tsx +2 -1
  183. package/app/apps/web/components/export-pdf-button.tsx +76 -0
  184. package/app/apps/web/components/month-digest-view.tsx +10 -0
  185. package/app/apps/web/components/week-digest-view.tsx +10 -0
  186. package/app/apps/web/lib/changelog-data.generated.ts +1 -1
  187. package/app/apps/web/lib/entries-index.ts +5 -4
  188. package/app/apps/web/lib/find-chrome.ts +71 -0
  189. package/app/apps/web/middleware.ts +22 -0
  190. package/app/apps/web/package.json +1 -1
  191. package/app/apps/web/tsconfig.tsbuildinfo +1 -1
  192. package/dist/daemon-worker.js +1716 -281
  193. package/dist/index.js +1617 -195
  194. package/package.json +1 -1
  195. package/app/apps/web/.next/server/chunks/packages_parser_dist_04rh1zd._.js +0 -3
  196. package/app/apps/web/.next/server/chunks/packages_parser_dist_0ndsxe6._.js +0 -3
  197. package/app/apps/web/.next/server/chunks/ssr/[root-of-the-server]__0_xpuh7._.js +0 -3
  198. package/app/apps/web/.next/server/chunks/ssr/[root-of-the-server]__0d~2~le._.js +0 -8
  199. package/app/apps/web/.next/server/chunks/ssr/[root-of-the-server]__0w52fbc._.js +0 -12
  200. package/app/apps/web/.next/server/chunks/ssr/_02s1n-x._.js +0 -8
  201. package/app/apps/web/.next/server/chunks/ssr/_0fjbf--._.js +0 -3
  202. package/app/apps/web/.next/server/chunks/ssr/apps_web_components_0ly1xes._.js +0 -6
  203. package/app/apps/web/.next/server/chunks/ssr/apps_web_lib_0af94gl._.js +0 -3
  204. package/app/apps/web/.next/static/chunks/0.3mqbj24kwtc.js +0 -6
  205. package/app/apps/web/.next/static/chunks/0byz8fqw.exef.js +0 -1
  206. package/app/apps/web/.next/static/chunks/0l3ck.awv~4t7.js +0 -1
  207. package/app/apps/web/.next/static/chunks/0lxuac2v0_gdl.js +0 -6
  208. package/app/apps/web/.next/static/chunks/0m62vx92~0_0d.js +0 -1
  209. package/app/apps/web/.next/static/chunks/0rtba0saz74e1.js +0 -10
  210. package/app/apps/web/.next/static/chunks/0s4eyofh28l~u.js +0 -1
  211. package/app/apps/web/.next/static/chunks/0uev~g~qvbjv9.js +0 -4
  212. package/app/apps/web/.next/static/m6ibRSdAu8jD10VBA2OFH/_clientMiddlewareManifest.js +0 -1
  213. /package/app/apps/web/.next/static/{m6ibRSdAu8jD10VBA2OFH → rrY-ephAArv8tjJOXD622}/_buildManifest.js +0 -0
  214. /package/app/apps/web/.next/static/{m6ibRSdAu8jD10VBA2OFH → rrY-ephAArv8tjJOXD622}/_ssgManifest.js +0 -0
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,69198,e=>{"use strict";var t=e.i(18050);e.i(74472);var n=e.i(33815);e.s(["AgentBadge",0,function({agent:e}){if(!e||"claude-code"===e)return null;let a=(0,n.getAgentMetadata)(e);return a?(0,t.jsx)("span",{style:{display:"inline-flex",alignItems:"center",borderRadius:4,padding:"2px 6px",fontSize:10,letterSpacing:"0.04em",textTransform:"uppercase",whiteSpace:"nowrap",fontWeight:600,color:a.accentColor,background:`color-mix(in srgb, ${a.accentColor} 12%, transparent)`,border:`1px solid color-mix(in srgb, ${a.accentColor} 30%, transparent)`},title:`Source: ${a.displayName}`,children:a.shortLabel}):null}])},43531,e=>{"use strict";let t=(0,e.i(75254).default)("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);e.s(["Check",0,t],43531)},88137,e=>{"use strict";function t(e){return e<-15?{tone:"danger",label:"may exhaust early"}:e>15?{tone:"warning",label:"below pace"}:{tone:"success",label:"on pace"}}e.s(["paceLabel",0,t,"paceToneForCycle",0,function(e,n,a,r=Date.now()){return t(100*Math.max(0,Math.min(1,(r-(n-a))/a))-e).tone},"toneVar",0,function(e){switch(e){case"success":return"var(--af-success)";case"warning":return"#b58400";case"danger":return"var(--af-danger)"}}])},3116,e=>{"use strict";let t=(0,e.i(75254).default)("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);e.s(["Clock",0,t],3116)},41240,63639,e=>{"use strict";var t=e.i(75254);let n=(0,t.default)("Lightbulb",[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]]);e.s(["Lightbulb",0,n],41240);let a=(0,t.default)("Radio",[["path",{d:"M4.9 19.1C1 15.2 1 8.8 4.9 4.9",key:"1vaf9d"}],["path",{d:"M7.8 16.2c-2.3-2.3-2.3-6.1 0-8.5",key:"u1ii0m"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}],["path",{d:"M16.2 7.8c2.3 2.3 2.3 6.1 0 8.5",key:"1j5fej"}],["path",{d:"M19.1 4.9C23 8.8 23 15.1 19.1 19",key:"10b0cb"}]]);e.s(["Radio",0,a],63639)},31278,e=>{"use strict";let t=(0,e.i(75254).default)("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);e.s(["Loader2",0,t],31278)},54611,e=>{"use strict";let t=/^##\s+\[([^\]]+)\](?:\s+[—\-–]\s+(\S+))?\s*$/,n=/^###\s+(.+?)\s*$/,a=/^[-*]\s+(.+?)\s*$/,r=function(e){let r=e.split(/\r?\n/),s=[],o=null,i=null,l=[];function d(){i&&l.length>0&&(i.bullets.push(l.join(" ").trim()),l=[])}for(let e of r){let r=t.exec(e);if(r){d(),i=null,o={version:r[1].trim(),date:r[2]?.trim()??null,sections:[]},s.push(o);continue}if(!o)continue;let c=n.exec(e);if(c){d(),i={kind:c[1].trim(),bullets:[]},o.sections.push(i);continue}let u=a.exec(e);if(u){d(),l=[u[1]];continue}l.length>0&&e.trim().length>0&&l.push(e.trim())}return d(),s}('# Changelog\n\nAll notable user-facing changes to the Fleetlens CLI (`fleetlens` on npm) are\nrecorded here. Format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).\nThe team-server has its own log at `packages/team-server/CHANGELOG.md`.\n\n## [0.11.2] — 2026-05-27\n\n### Changed\n- **`fleetlens start` and `fleetlens web` no longer auto-launch the browser.** The dashboard URL is printed so you can click it (every modern terminal makes `http://localhost:…` clickable), but no browser tab opens unless you pass the new `--open` flag. Auto-launch was surprising users whose default browser had moved to a different desktop, was a corp-managed profile they didn\'t want spawned, or was simply already in flow on another window. The previous `--no-open` flag is still accepted as a no-op — existing scripts and aliases keep working without changes.\n\n## [0.11.1] — 2026-05-21\n\n### Added\n- **Team workspace seeding script.** Added `scripts/seed-team-workspace.mjs` for local end-to-end telemetry testing.\n\n### Changed\n- **Plan page layout grid consistency.** Enhanced the Team Edition Plan page layout grid consistency and renamed the \'Latest cycle\' column to \'Current cycle\'.\n- **Completed cycles alignment.** Modified the completed cycles strip to show a maximum of 4 historical cycles, padded on the left with empty placeholders for visual right-alignment and grid uniformity.\n\n### Fixed\n- **Mini-burndown SVG typings and filtering.** Resolved mini-burndown SVG typings and parameterized cycle strip filtering.\n- **Active cycle query performance.** Batched active cycle loads in a single query to eliminate N+1 DB lookups.\n\n## [0.11.0] — 2026-05-21\n\n### Added\n- **Team-issued commands to the daemon.** When you\'ve paired with a Team Edition server, a team admin can now queue a 30-day activity backfill against your daemon from the team dashboard. The daemon picks the command up on its next 5-minute sync and re-pushes the last 30 days of daily activity rollups (server upserts, fully idempotent). No member-side UI changes — the existing "last sync N ago" tick on `/settings → Team connection` is the only feedback signal. Commands ride piggyback on the existing `/api/ingest/metrics` response; no new connections, no new polling. The privacy boundary holds: the dispatcher\'s switch has a single case (`backfill-activity`) and only calls existing aggregate-push helpers, so commands can widen the time window but never change the data shape. No transcripts, prompts, or project content can leak through a command. Always-on when paired (pairing implies consent); no opt-out env var. Requires `team-server v0.9.0+` to actually receive any commands; older servers simply don\'t issue any (the additive `commandResults` field is ignored, no harm).\n\n## [0.10.6] — 2026-05-21\n\n### Added\n- **Team-pairing visibility in the Personal Edition dashboard.** When you\'ve paired with a Team Edition server (`fleetlens team join …`), the dashboard now surfaces what\'s syncing without you having to open a terminal. A sidebar chip with a health dot (green / amber / red — re-derived client-side every 30 s so it ages correctly even when the daemon stops) and a live-aging "synced N ago" label. A `/settings → Team connection` panel showing team metadata, a labeled last-push preview (Agent time / Session count / Tool call count / Turn count / Token total / Plan tier), an explicit "What does NOT leave your machine" block, and a "Sync now" button that spawns `fleetlens team sync` as a subprocess and renders its output inline. A first-run welcome banner on the overview after pairing, dismissable per pairing. The preview also includes a "Show raw JSON payload" disclosure that displays the literal `IngestPayload` from disk — verify byte-for-byte that no transcripts, prompts, or project content leave your machine. Solo users see no change.\n\n### Changed\n- **Wire-format types now live in `@claude-lens/parser`.** `IngestPayload`, `DailyRollup`, `LastPushRecord`, and the rest of the daemon→server wire shape moved out of `packages/cli/src/team/push.ts` so the CLI and the dashboard share a single canonical definition — no drift risk on future schema changes. The CLI\'s `team-config` module also moved to the parser (`@claude-lens/parser/fs`) for the same reason.\n\n## [0.10.5] — 2026-05-21\n\n### Changed\n- **Team backfill now rides the consolidated `/api/ingest/metrics` path.** Same endpoint as the daemon\'s regular 5-min push, just with the optional `snapshotHistory` field set. Removes the need for a separate path-allowlist entry on deployments fronted by a proxy (IAP, WAF, Cloud Run / GLB path matcher), and as a side-effect the old `/api/ingest/usage-history` route is now a thin deprecation shim. Requires `team-server v0.8.4+` — older servers will return 200 without a `snapshotHistory` result block, and the CLI aborts the backfill loudly rather than silently advancing the high-water mark.\n\n### Fixed\n- **Backfill no longer silently advances the high-water mark on an older team-server.** Previously, a server that didn\'t recognize `snapshotHistory` would return 200 (zod `passthrough()` swallows unknown fields), `runTeamSync` would persist `lastSyncedUsageSnapshotAt` as if all rows landed, and the dropped rows would never be retried after the server upgraded. Backfill now requires an explicit `snapshotHistory` result block in the response.\n\n## [0.10.4] — 2026-05-21\n\n### Fixed\n- **Fleetlens\'s own LLM runs no longer show up in the dashboard.** The tmux-driven runner records its enrichment / digest / `/ask` calls as real Claude Code transcripts under `~/.claude/projects/` (cwd `~/.cclens/runtime`), since tailing that transcript is how it reads the model\'s reply. Those self-generated sessions were surfacing as a `.cclens/runtime` project and inflating session, project, and token-calibration rollups. The tmux runner now deletes each transcript once the response is captured (kill-session before unlink so claude can\'t rewrite it, gated by `FLEETLENS_TMUX_KEEP_WRAPPER`), and the parser excludes the runtime project dir at the scan chokepoint as a safety net for any transcript that outlives cleanup.\n\n## [0.10.3] — 2026-05-16\n\n### Added\n- **Daemon auto-update every 6 hours.** The local daemon now hourly-checks `registry.npmjs.org/fleetlens/latest` and spawns a detached `fleetlens update` child when a newer version exists. Timestamp persisted in `~/.cclens/daemon-update.json` so closing the laptop lid for days and reopening triggers an immediate catch-up check instead of waiting out the interval. Opt-out via `FLEETLENS_DAEMON_AUTO_UPDATE=0`.\n\n### Changed\n- **Unified team sync.** `runTeamSync` now drives history backfill, daily activity, live utilization, queue drain, and tier propagation through a single path. `team join` and the daemon\'s 5-min tick both call the same function — so a user disconnected from the team server for days will autonomously catch up on next sync, no manual `team backfill` needed.\n- New `lastSyncedUsageSnapshotAt` high-water mark in `~/.cclens/team.json` means incremental syncs only ship eligible new snapshots. Cold-start full backfill is bypass-able via `fleetlens team backfill --force` (and still runs unconditionally on first pair).\n- Team sync cadence is now independent of Claude OAuth polling, so an expired Claude token can no longer turn team sync into a 5-second retry storm.\n\n### Fixed\n- `lastSyncedDay` no longer advances past a failed day on partial outage — previously a transient mid-stream 5xx left a permanent hole in the team-server\'s daily-activity coverage.\n- Both `/api/ingest/metrics` and `/api/ingest/usage-history` POSTs now have a 15-second `AbortSignal.timeout` to bound hangs on network stalls.\n\n## [0.10.2] — 2026-05-15\n\n### Fixed\n- **Session-detail minimap no longer paints subagent runtime as idle.** Long agent runs that dispatched many subagents were reading as wall-to-wall "Session idle" stripes because the parent\'s tool_use → tool_result gap (the subagent\'s actual runtime) was classified as in-turn idle. `rawIdleBands` now carves subagent run spans out of every candidate gap; for in-turn gaps that overlap any subagent run the entire gap is dropped, and between-turn gaps with background subagent activity keep only the genuinely-unwatched residue.\n- **First-response thinking stops registering as idle.** Anchors now include every timestamped event (agent-thinking, meta, etc.), and the loop tracks an "awaiting first response" phase across intermediate thinking anchors. A `user → thinking → thinking → agent` sequence where the model takes a while to compose its first reply is now treated as response latency rather than painted as a stripe.\n- **Turn duration no longer shows `0ms` for single-row turns.** `buildMegaRows` now anchors a turn\'s `tOffsetMs` and `durationMs` at the originating user message rather than at the first agent row. Single-row turns show the actual user → agent latency, and the visual span of the turn rectangle on the minimap covers the whole arc.\n- **Single `Session idle` divider per band.** A user row and the turn-collapsed row that follows it now share a `tOffsetMs`, so the body\'s `IdleDivider` emitter dedupes per band to stop two consecutive identical idle markers around the same boundary.\n\n### Changed\n- Minimap idle threshold raised from 10s to 30s. Ordinary tool latency (slow Bash, big-file Read, between-anchor model thinking) no longer registers as idle.\n\n## [0.10.1] — 2026-05-14\n\n### Added\n- **Alternative claude runtime via tmux.** When `tmux` is on PATH, both the LLM pipeline (digest synth, entry enrichment, top-session perception) and the `/ask` feature now drive `claude` through a detached tmux session instead of `claude -p`. Sessions produced this way carry `entrypoint: cli` in their JSONL, which is also extracted by the parser and surfaced as a small badge on `/sessions/<id>` next to the model chip — green for `cli` / `claude-desktop`, amber for `sdk-*`. The path falls back to `claude -p` whenever tmux is unavailable or the run errors; set `FLEETLENS_FORCE_PRINT_MODE=1` to disable the tmux path entirely.\n- **`CCLENS_HOME` env override.** All `~/.cclens/` state (pid file, daemon log, perception state, usage snapshot log, llm-runs traces) is now reached through a shared `cclensHome()` helper that honors `CCLENS_HOME`. Lets multiple installs / workspaces run side-by-side without stomping on each other\'s state.\n\n### Fixed\n- `/api/runs` rendered every successful tmux-driven run as `status=error`. Tmux runs have no subprocess exit code (the session is killed by cleanup), and the runs viewer was treating a missing code as failure. End records now stamp `exit_code: 0` on success and the active-process filter no longer requires the literal `claude -p` flag, so tmux-driven processes also show up in the "active" panel while they\'re running.\n- `JobQueueWidget`\'s `/api/jobs` polling effect listed `jobs` in its deps, so each tick re-armed the effect on the freshly-set state ref — effective cadence collapsed to a 1–4 ms refetch loop. Now tracks `hasActive` in a closure-local var and runs the effect once on mount.\n\n### Conductor\n- New `conductor.json` + `scripts/conductor-{setup,run,archive}.sh` so each Conductor workspace allocates its own 3-port band (web / team-server / postgres) and boots its own `fleetlens-<workspace>` Compose stack against `.harness/cclens-state`. Replaces ~30 hard-coded `join(homedir(), ".cclens", …)` call sites with the shared `cclensHome()/cclensPath()` helper so a second workspace can boot without colliding with the user\'s primary install.\n\n## [0.10.0] — 2026-05-08\n\n### Changed\n- **Plan utilization reframed.** High utilization is now "getting plan value" (green); low utilization is "paying for unused headroom" (red). Mirrors how an operator actually looks at the dashboard: the wasteful outcome is paying for a plan and barely touching it, not running near the cap. Applied across `/usage` burndown, gauges, sidebar, and previous-cycles strip.\n- **In-progress cycles colored by pace, not peak.** A 50% peak halfway through a 7-day cycle reads on-pace green, not amber — the chart no longer cries wolf on a fresh cycle that just hasn\'t burnt yet. Completed cycles still use peak tone.\n- **Pace label ±15pp band.** "On pace" now covers a ±15pp window around ideal; outside that, label is "below pace" (under-burning) or "may exhaust early" (over-burning). The previous +5/-50 thresholds flipped amber every time the user took a night off.\n- **Pace label collapses to three states.** "May exhaust early" / "below pace" / "on pace" — same color tones, one fewer qualifier to read.\n- **Wording softened across the utilization views** to describe the pattern rather than judge the user. "Behind schedule" → "below pace"; "on track (+x%)" → "on pace (+xpp vs ideal)".\n\n### Added\n- **Conductor multi-agent workspace support.** Sessions inside Conductor\'s worktree-style agent workspaces (`~/conductor/workspaces/<repo>/<agent>/...`) now group correctly under their parent project, with each agent shown as a separate worktree. Mirrors the existing `.worktrees/` handling.\n\n### Fixed\n- Hydration mismatch on `/usage` when pace labels rendered before client mount.\n\n### Notes for operators\n- The CLI\'s team push now ships **only Claude Code usage snapshots** to the team server. Codex snapshots stay local until `plan_utilization` gets a per-agent partition — without one, the team-server\'s "latest snapshot" pick flips between agents and miscolors the in-progress cycle. Existing rows in `plan_utilization` stay; new pushes are claude-code only.\n\n## [0.9.0] — 2026-05-07\n\n### Added\n- **Gemini CLI** as the third agent source. Sessions written to `~/.gemini/tmp/<slug>/chats/session-*.jsonl` are now read, parsed, and rendered alongside Claude Code and Codex. Tool calls (`read_file`, `list_directory`, `glob`, `run_shell_command`, `update_topic`, …) and their results show in the session timeline; thinking blocks, multi-write status replay, `$set` / `$rewindTo` semantics, and the legacy single-JSON file shape all handled. Slug → cwd inversion via `~/.gemini/projects.json`. `✺` glyph + purple accent in the UI.\n\n### Changed\n- Session detail timeline drops in-turn idle hatching. Within a turn, every wait — model loading, tool execution, network — is the agent\'s active time. Only between-turn idle (user reading + composing the next message) renders as hatched.\n- Gemini parser anchors `firstTimestamp`, `lastTimestamp`, and `activeSegments` on conversational events only. Login/OAuth `info` records and `metadata.startTime` (file-creation moment) no longer stretch the session bar back to before the first user message.\n\n## [0.7.1] — 2026-05-07\n\n### Fixed\n- Cycle-peaks trend no longer renders two bars labeled the same day. When Anthropic\'s rolling 7-day window slid its anchor between consecutive polls, the daemon\'s bucketer (hour-rounded) recorded both reset boundaries as distinct cycles. They\'re now merged within a 12 h tolerance — same fix in `apps/web/lib/cycle-peaks.ts` (used by `/usage`) and in `packages/cli/src/team/sync.ts` (the daemon\'s team-server push), so both the personal `/usage` chart and the team-server\'s plan-utilization view stay consistent. 5-hour cycles keep no merge tolerance (their anchor is stable; merging would collapse legitimate distinct cycles).\n\n## [0.7.0] — 2026-05-06\n\n### Added\n- **Multi-agent observability — Codex as the first non-Claude adapter.** The parser now defines an `AgentSource` registry; new agents land as a single file plus one registry entry. Codex CLI rollouts at `~/.codex/sessions/` flow through the same pipeline as Claude Code: their sessions appear in the dashboard, timeline, calendar, and per-project rollups alongside Claude sessions, with `agent: "codex"` carried through every event so consumers can split or aggregate.\n- **Per-agent representation in the UI.** Each session row carries an agent badge; top-sessions guarantees a multi-agent representation when both agents are active; the Gantt rail uses a per-agent glyph and outcome pills.\n- **Usage page is now agent-tabbed.** Switch between Claude and Codex views; cross-agent comparisons stay readable rather than smashed onto a single chart.\n- **Codex sessions blend into the day + week digest narratives** so the insights pipeline summarises across agents instead of treating Codex as a footnote.\n- **`fleetlens` → "Ask"** (agent-neutral). Previously labelled "Ask Claude"; the underlying prompt-routing stays Claude-backed, but the surface name no longer implies single-agent.\n\n### Changed\n- Dashboard default time range moved to **90 d** to match how multi-agent fleets actually use the tool — week-only views were truncating Codex activity that lands in week-old session files.\n- `AgentSource` interface opened up so future agents (OpenCode, Gemini CLI, …) are pure additive plug-ins; no parser core changes required.\n- Daemon auto-backfills *yesterday\'s* day digest on boot when `ai_features.auto_backfill_yesterday` is on, so `--no-daemon` users still get a yesterday digest on first homepage visit.\n\n### Fixed\n- **Codex calibration math no longer pollutes the Claude window.** Non-Claude snapshots are excluded from the Claude-side cycle-peaks calibration that drives plan-fit advice — previously a Codex-heavy run skewed the projected exhaustion line.\n- **Minimap idle bands** are now derived from raw event timestamps (not row kind) and coalesced per turn, so Codex sessions with sub-minute back-and-forth no longer paint as wall-to-wall idle.\n- Sessions filter state preserved in the URL so refresh / share doesn\'t lose the active filter.\n- `/insights` persists forced current-week digests so the page actually shows them on next load.\n\n## [0.6.4] — 2026-05-04\n\n### Fixed\n- Cached calibration events per-file so `/usage` warm renders complete in well under a second on large session histories.\n\n## [0.6.3] — 2026-05-04\n\n### Fixed\n- Dropped poisoned auto-week locks left behind by interrupted runs; backfill now gates on the live pipeline lock instead.\n\n## [0.6.2] — 2026-05-04\n\n### Added\n- Last week\'s digest auto-generates on launch when AI features are on. Disable in Settings → AI features.\n\n## [0.6.1] — 2026-05-04\n\n### Changed\n- Smaller install size — published bundle no longer drags in unused workspace metadata.\n\n## [0.6.0] — 2026-04-30\n\n### Added\n- V2 perception layer. Daily, weekly, and monthly digests synthesized from per-session entries via a strict hierarchical pipeline (entry → day → week → month). Past-period digests are immutable on disk; current-period digests use a 10-min in-memory TTL.\n- `/insights` route with on-demand week and month digest generation, picker history, and force-regen.\n- `fleetlens digest day | week | month [--json]` — CLI surface that reproduces the same digests served at `/insights`.\n- `fleetlens entries [--day | --session | --all] [--json]` — inspect the per-session entry primitive.\n\n### Changed\n- Renamed "active time" to "agent time" across the dashboard and CLI for clarity.\n\n## [0.4.1] — 2026-04-23\n\n### Added\n- Concurrency view on `/parallelism` page. Bursts colored teal for same-project and purple for cross-project (the genuinely interesting fleet-work signal).\n- Plan utilization sparkline on the sidebar, fed by the usage daemon\'s 5-min snapshots.\n\n### Fixed\n- Auto-update no longer leaves a zombie web server on the old binary; both server and daemon are torn down before re-exec.\n\n## [0.4.0] — 2026-04-18\n\n### Added\n- Usage daemon (`fleetlens daemon …`) polls `/api/oauth/usage` every 5 min and appends snapshots to `~/.cclens/usage.jsonl`. `fleetlens start` and `fleetlens stop` manage server + daemon together.\n- `fleetlens usage --history` for inspecting past plan utilization.\n\n## [0.3.0] — 2026-04-10\n\n### Added\n- Project rollups with worktree aggregation. Sessions inside `<project>/.worktrees/<name>` roll up under their parent canonical project with a `+N wt` badge.\n- Pinned projects in the sidebar (per-browser via localStorage).\n\n## [0.2.0] — 2026-04-01\n\n### Changed\n- Active-segment computation now uses all timestamped events (system + summary + sidechain + conversational) instead of conversational-only. Earlier filter undercounted by up to 100x on tool-heavy sessions.\n\n## [0.1.0] — 2026-03-15\n\n### Added\n- Initial release. Local-only dashboard for Claude Code sessions: timeline, projects, daily activity bucketing, parallelism detection, per-model cost estimation. Reads JSONL transcripts from `~/.claude/projects/`.\n');r[0]?.version,e.s(["STORAGE_KEY",0,"cclens:changelog-last-seen"],54611)},86619,e=>{"use strict";var t=e.i(71645);e.s(["usePersistentBoolean",0,function(e,n){let[a,r]=(0,t.useState)(n),[s,o]=(0,t.useState)(!1);return(0,t.useEffect)(()=>{try{let t=window.localStorage.getItem(e);"1"===t?r(!0):"0"===t&&r(!1)}catch{}o(!0)},[e]),(0,t.useEffect)(()=>{let t=t=>{let n=t.detail;n?.key===e&&"boolean"==typeof n.value&&r(n.value)},n=t=>{t.key===e&&("1"===t.newValue?r(!0):"0"===t.newValue&&r(!1))};return window.addEventListener("cclens:persistent-boolean",t),window.addEventListener("storage",n),()=>{window.removeEventListener("cclens:persistent-boolean",t),window.removeEventListener("storage",n)}},[e]),[a,(0,t.useCallback)(t=>{r(t);try{window.localStorage.setItem(e,t?"1":"0")}catch{}window.dispatchEvent(new CustomEvent("cclens:persistent-boolean",{detail:{key:e,value:t}}))},[e]),s]}])},18566,(e,t,n)=>{t.exports=e.r(76562)},98183,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});var a={assign:function(){return l},searchParamsToUrlQuery:function(){return s},urlQueryToSearchParams:function(){return i}};for(var r in a)Object.defineProperty(n,r,{enumerable:!0,get:a[r]});function s(e){let t={};for(let[n,a]of e.entries()){let e=t[n];void 0===e?t[n]=a:Array.isArray(e)?e.push(a):t[n]=[e,a]}return t}function o(e){return"string"==typeof e?e:("number"!=typeof e||isNaN(e))&&"boolean"!=typeof e?"":String(e)}function i(e){let t=new URLSearchParams;for(let[n,a]of Object.entries(e))if(Array.isArray(a))for(let e of a)t.append(n,o(e));else t.set(n,o(a));return t}function l(e,...t){for(let n of t){for(let t of n.keys())e.delete(t);for(let[t,a]of n.entries())e.append(t,a)}return e}},18967,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});var a={DecodeError:function(){return y},MiddlewareNotFoundError:function(){return k},MissingStaticPage:function(){return v},NormalizeError:function(){return b},PageNotFoundError:function(){return w},SP:function(){return f},ST:function(){return m},WEB_VITALS:function(){return s},execOnce:function(){return o},getDisplayName:function(){return u},getLocationOrigin:function(){return d},getURL:function(){return c},isAbsoluteUrl:function(){return l},isResSent:function(){return h},loadGetInitialProps:function(){return g},normalizeRepeatedSlashes:function(){return p},stringifyError:function(){return x}};for(var r in a)Object.defineProperty(n,r,{enumerable:!0,get:a[r]});let s=["CLS","FCP","FID","INP","LCP","TTFB"];function o(e){let t,n=!1;return(...a)=>(n||(n=!0,t=e(...a)),t)}let i=/^[a-zA-Z][a-zA-Z\d+\-.]*?:/,l=e=>i.test(e);function d(){let{protocol:e,hostname:t,port:n}=window.location;return`${e}//${t}${n?":"+n:""}`}function c(){let{href:e}=window.location,t=d();return e.substring(t.length)}function u(e){return"string"==typeof e?e:e.displayName||e.name||"Unknown"}function h(e){return e.finished||e.headersSent}function p(e){let t=e.split("?");return t[0].replace(/\\/g,"/").replace(/\/\/+/g,"/")+(t[1]?`?${t.slice(1).join("?")}`:"")}async function g(e,t){let n=t.res||t.ctx&&t.ctx.res;if(!e.getInitialProps)return t.ctx&&t.Component?{pageProps:await g(t.Component,t.ctx)}:{};let a=await e.getInitialProps(t);if(n&&h(n))return a;if(!a)throw Object.defineProperty(Error(`"${u(e)}.getInitialProps()" should resolve to an object. But found "${a}" instead.`),"__NEXT_ERROR_CODE",{value:"E1025",enumerable:!1,configurable:!0});return a}let f="u">typeof performance,m=f&&["mark","measure","getEntriesByName"].every(e=>"function"==typeof performance[e]);class y extends Error{}class b extends Error{}class w extends Error{constructor(e){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message=`Cannot find module for page: ${e}`}}class v extends Error{constructor(e,t){super(),this.message=`Failed to load static file for page: ${e} ${t}`}}class k extends Error{constructor(){super(),this.code="ENOENT",this.message="Cannot find the middleware module"}}function x(e){return JSON.stringify({message:e.message,stack:e.stack})}},33525,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"warnOnce",{enumerable:!0,get:function(){return a}});let a=e=>{}},95057,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});var a={formatUrl:function(){return i},formatWithValidation:function(){return d},urlObjectKeys:function(){return l}};for(var r in a)Object.defineProperty(n,r,{enumerable:!0,get:a[r]});let s=e.r(90809)._(e.r(98183)),o=/https?|ftp|gopher|file/;function i(e){let{auth:t,hostname:n}=e,a=e.protocol||"",r=e.pathname||"",i=e.hash||"",l=e.query||"",d=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?d=t+e.host:n&&(d=t+(~n.indexOf(":")?`[${n}]`:n),e.port&&(d+=":"+e.port)),l&&"object"==typeof l&&(l=String(s.urlQueryToSearchParams(l)));let c=e.search||l&&`?${l}`||"";return a&&!a.endsWith(":")&&(a+=":"),e.slashes||(!a||o.test(a))&&!1!==d?(d="//"+(d||""),r&&"/"!==r[0]&&(r="/"+r)):d||(d=""),i&&"#"!==i[0]&&(i="#"+i),c&&"?"!==c[0]&&(c="?"+c),r=r.replace(/[?#]/g,encodeURIComponent),c=c.replace("#","%23"),`${a}${d}${r}${c}${i}`}let l=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function d(e){return i(e)}},18581,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"useMergedRef",{enumerable:!0,get:function(){return r}});let a=e.r(71645);function r(e,t){let n=(0,a.useRef)(null),r=(0,a.useRef)(null);return(0,a.useCallback)(a=>{if(null===a){let e=n.current;e&&(n.current=null,e());let t=r.current;t&&(r.current=null,t())}else e&&(n.current=s(e,a)),t&&(r.current=s(t,a))},[e,t])}function s(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let n=e(t);return"function"==typeof n?n:()=>e(null)}}("function"==typeof n.default||"object"==typeof n.default&&null!==n.default)&&void 0===n.default.__esModule&&(Object.defineProperty(n.default,"__esModule",{value:!0}),Object.assign(n.default,n),t.exports=n.default)},73668,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"isLocalURL",{enumerable:!0,get:function(){return s}});let a=e.r(18967),r=e.r(52817);function s(e){if(!(0,a.isAbsoluteUrl)(e))return!0;try{let t=(0,a.getLocationOrigin)(),n=new URL(e,t);return n.origin===t&&(0,r.hasBasePath)(n.pathname)}catch(e){return!1}}},84508,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"errorOnce",{enumerable:!0,get:function(){return a}});let a=e=>{}},22016,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});var a={default:function(){return y},useLinkStatus:function(){return w}};for(var r in a)Object.defineProperty(n,r,{enumerable:!0,get:a[r]});let s=e.r(90809),o=e.r(18050),i=s._(e.r(71645)),l=e.r(95057),d=e.r(8372),c=e.r(18581),u=e.r(18967),h=e.r(5550);e.r(33525);let p=e.r(88540),g=e.r(91949),f=e.r(73668),m=e.r(9396);function y(t){var n,a;let r,s,y,[w,v]=(0,i.useOptimistic)(g.IDLE_LINK_STATUS),k=(0,i.useRef)(null),{href:x,as:C,children:S,prefetch:T=null,passHref:j,replace:A,shallow:E,scroll:L,onClick:P,onMouseEnter:$,onTouchStart:M,legacyBehavior:O=!1,onNavigate:N,transitionTypes:_,ref:R,unstable_dynamicOnHover:I,...F}=t;r=S,O&&("string"==typeof r||"number"==typeof r)&&(r=(0,o.jsx)("a",{children:r}));let z=i.default.useContext(d.AppRouterContext),D=!1!==T,U=!1!==T?null===(a=T)||"auto"===a?m.FetchStrategy.PPR:m.FetchStrategy.Full:m.FetchStrategy.PPR,B="string"==typeof(n=C||x)?n:(0,l.formatUrl)(n);if(O){if(r?.$$typeof===Symbol.for("react.lazy"))throw Object.defineProperty(Error("`<Link legacyBehavior>` received a direct child that is either a Server Component, or JSX that was loaded with React.lazy(). This is not supported. Either remove legacyBehavior, or make the direct child a Client Component that renders the Link's `<a>` tag."),"__NEXT_ERROR_CODE",{value:"E863",enumerable:!1,configurable:!0});s=i.default.Children.only(r)}let W=O?s&&"object"==typeof s&&s.ref:R,G=i.default.useCallback(e=>(null!==z&&(k.current=(0,g.mountLinkInstance)(e,B,z,U,D,v)),()=>{k.current&&((0,g.unmountLinkForCurrentNavigation)(k.current),k.current=null),(0,g.unmountPrefetchableInstance)(e)}),[D,B,z,U,v]),q={ref:(0,c.useMergedRef)(G,W),onClick(t){O||"function"!=typeof P||P(t),O&&s.props&&"function"==typeof s.props.onClick&&s.props.onClick(t),!z||t.defaultPrevented||function(t,n,a,r,s,o,l){if("u">typeof window){let d,{nodeName:c}=t.currentTarget;if("A"===c.toUpperCase()&&((d=t.currentTarget.getAttribute("target"))&&"_self"!==d||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.nativeEvent&&2===t.nativeEvent.which)||t.currentTarget.hasAttribute("download"))return;if(!(0,f.isLocalURL)(n)){r&&(t.preventDefault(),location.replace(n));return}if(t.preventDefault(),o){let e=!1;if(o({preventDefault:()=>{e=!0}}),e)return}let{dispatchNavigateAction:u}=e.r(99781);i.default.startTransition(()=>{u(n,r?"replace":"push",!1===s?p.ScrollBehavior.NoScroll:p.ScrollBehavior.Default,a.current,l)})}}(t,B,k,A,L,N,_)},onMouseEnter(e){O||"function"!=typeof $||$(e),O&&s.props&&"function"==typeof s.props.onMouseEnter&&s.props.onMouseEnter(e),z&&D&&(0,g.onNavigationIntent)(e.currentTarget,!0===I)},onTouchStart:function(e){O||"function"!=typeof M||M(e),O&&s.props&&"function"==typeof s.props.onTouchStart&&s.props.onTouchStart(e),z&&D&&(0,g.onNavigationIntent)(e.currentTarget,!0===I)}};return(0,u.isAbsoluteUrl)(B)?q.href=B:O&&!j&&("a"!==s.type||"href"in s.props)||(q.href=(0,h.addBasePath)(B)),y=O?i.default.cloneElement(s,q):(0,o.jsx)("a",{...F,...q,children:r}),(0,o.jsx)(b.Provider,{value:w,children:y})}e.r(84508);let b=(0,i.createContext)(g.IDLE_LINK_STATUS),w=()=>(0,i.useContext)(b);("function"==typeof n.default||"object"==typeof n.default&&null!==n.default)&&void 0===n.default.__esModule&&(Object.defineProperty(n.default,"__esModule",{value:!0}),Object.assign(n.default,n),t.exports=n.default)},75254,e=>{"use strict";var t=e.i(71645);let n=(...e)=>e.filter((e,t,n)=>!!e&&""!==e.trim()&&n.indexOf(e)===t).join(" ").trim();var a={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let r=(0,t.forwardRef)(({color:e="currentColor",size:r=24,strokeWidth:s=2,absoluteStrokeWidth:o,className:i="",children:l,iconNode:d,...c},u)=>(0,t.createElement)("svg",{ref:u,...a,width:r,height:r,stroke:e,strokeWidth:o?24*Number(s)/Number(r):s,className:n("lucide",i),...c},[...d.map(([e,n])=>(0,t.createElement)(e,n)),...Array.isArray(l)?l:[l]]));e.s(["default",0,(e,a)=>{let s=(0,t.forwardRef)(({className:s,...o},i)=>(0,t.createElement)(r,{ref:i,iconNode:a,className:n(`lucide-${e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,s),...o}));return s.displayName=`${e}`,s}],75254)},74472,33815,e=>{"use strict";let t=[{kind:"claude-code",displayName:"Claude Code",shortLabel:"Claude",accentColor:"var(--af-accent)",iconChar:"✦"},{kind:"codex",displayName:"Codex (OpenAI)",shortLabel:"Codex",accentColor:"rgb(16, 163, 127)",iconChar:"◆"},{kind:"gemini",displayName:"Gemini CLI",shortLabel:"Gemini",accentColor:"rgb(124, 92, 246)",iconChar:"✺"}],n=new Set(t.map(e=>e.kind));e.s(["getAgentMetadata",0,function(e){return t.find(t=>t.kind===e)},"isAgentKind",0,function(e){return"string"==typeof e&&n.has(e)}],33815),e.s([],74472)},23614,41783,e=>{"use strict";var t=e.i(18050),n=e.i(22016);e.i(74472);var a=e.i(33815);function r({agent:e,size:n=11,title:s}){if(!e)return null;let o=(0,a.getAgentMetadata)(e);return o?(0,t.jsx)("span",{"aria-hidden":!0,title:s??o.displayName,style:{display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0,width:n+2,height:n+2,fontSize:n,lineHeight:1,color:o.accentColor},children:o.iconChar}):null}e.s(["AgentIcon",0,r],41783);let s={shipped:{bg:"rgba(72, 187, 120, 0.12)",fg:"#48bb78",label:"Shipped",icon:"🚀"},partial:{bg:"rgba(66, 153, 225, 0.12)",fg:"#4299e1",label:"Partial",icon:"🔨"},blocked:{bg:"rgba(245, 101, 101, 0.12)",fg:"#f56565",label:"Blocked",icon:"🚧"},exploratory:{bg:"rgba(160, 174, 192, 0.12)",fg:"#a0aec0",label:"Exploratory",icon:"🧭"},trivial:{bg:"rgba(203, 213, 224, 0.12)",fg:"#a0aec0",label:"Warmup",icon:"💤"},idle:{bg:"rgba(203, 213, 224, 0.12)",fg:"#a0aec0",label:"Idle",icon:"—"}},o={sm:{fontSize:9,padding:"1px 6px",iconGap:3,borderRadius:99},md:{fontSize:10,padding:"2px 8px",iconGap:4,borderRadius:99},lg:{fontSize:11,padding:"3px 10px",iconGap:5,borderRadius:99}},i={shipped:6,partial:5,blocked:4,exploratory:3,trivial:2,idle:1};e.s(["OUTCOME_STYLES",0,s,"OutcomePill",0,function(e){let a=o[e.size??"md"],i=a.fontSize+1;if("pending"in e&&e.pending){let s={display:"inline-flex",alignItems:"center",gap:a.iconGap,padding:a.padding,borderRadius:a.borderRadius,fontSize:a.fontSize,fontWeight:600,background:"rgba(160, 174, 192, 0.08)",color:"var(--af-text-tertiary)",border:"1px dashed var(--af-border-subtle)",textDecoration:"none",whiteSpace:"nowrap"};return(0,t.jsxs)(n.default,{href:`/digest/${e.localDay}`,style:s,title:`Generate ${e.localDay} digest →`,children:[e.agent&&(0,t.jsx)(r,{agent:e.agent,size:i}),(0,t.jsx)("span",{"aria-hidden":!0,style:{lineHeight:1},children:"⋯"}),(0,t.jsx)("span",{children:"pending"})]})}let l=s[e.outcome],d=e.label??"both",c={display:"inline-flex",alignItems:"center",gap:a.iconGap,padding:a.padding,borderRadius:a.borderRadius,fontSize:a.fontSize,fontWeight:600,background:l.bg,color:l.fg,whiteSpace:"nowrap"};return(0,t.jsxs)("span",{style:c,title:l.label,children:[e.agent&&(0,t.jsx)(r,{agent:e.agent,size:i}),("icon"===d||"both"===d)&&(0,t.jsx)("span",{"aria-hidden":!0,style:{lineHeight:1},children:l.icon}),("text"===d||"both"===d)&&(0,t.jsx)("span",{children:l.label})]})},"outcomePriority",0,function(e){return e?i[e]:0}],23614)},56324,e=>{"use strict";let t={input:1,output:5,cacheRead:.1,cacheWrite:1.25},n={input:3,output:15,cacheRead:.3,cacheWrite:3.75},a={input:5,output:25,cacheRead:.5,cacheWrite:6.25};e.s(["estimateCost",0,function(e,r){let s=function(e){if(!e)return a;let r=e.toLowerCase();return r.includes("haiku")?t:r.includes("sonnet")?n:a}(r);return e.input/1e6*s.input+e.output/1e6*s.output+e.cacheRead/1e6*s.cacheRead+e.cacheWrite/1e6*s.cacheWrite},"formatCost",0,function(e){return e<.01?"<$0.01":e<1||e<100?`$${e.toFixed(2)}`:e<1e3?`$${e.toFixed(1)}`:`$${e.toLocaleString(void 0,{maximumFractionDigits:0})}`},"formatDuration",0,function(e){if(void 0===e)return"—";if(e<1e3)return`${e}ms`;let t=Math.round(e/1e3);if(t<60)return`${t}s`;let n=Math.floor(t/60),a=t%60;if(n<60)return a?`${n}m ${a}s`:`${n}m`;let r=Math.floor(n/60),s=n%60;return s?`${r}h ${s}m`:`${r}h`},"formatGap",0,function(e){if(e<1e3)return`${e}ms`;let t=e/1e3;if(t<60)return`${t.toFixed(1)}s`;let n=Math.floor(t/60);if(n<60){let e=Math.round(t%60);return`${n}m ${e}s`}let a=Math.floor(n/60),r=n%60;if(a<24)return r?`${a}h ${r}m`:`${a}h`;let s=Math.floor(a/24),o=a%24;return o?`${s}d ${o}h`:`${s}d`},"formatOffset",0,function(e){if(void 0===e||e<0)return"—";let t=Math.floor(e/1e3),n=Math.floor(t/3600),a=String(Math.floor(t%3600/60)).padStart(2,"0"),r=String(t%60).padStart(2,"0");return`${n}:${a}:${r}`},"formatRelative",0,function(e){let t=Date.parse(e);if(Number.isNaN(t))return e;let n=Math.round((Date.now()-t)/1e3);if(n<60)return`${n}s ago`;let a=Math.round(n/60);if(a<60)return`${a}m ago`;let r=Math.round(a/60);if(r<24)return`${r}h ago`;let s=Math.round(r/24);return`${s}d ago`},"formatTokens",0,function(e){return e<1e3?String(e):e<1e4?(e/1e3).toFixed(1)+"k":e<1e6?Math.round(e/1e3)+"k":e<1e7?(e/1e6).toFixed(2)+"M":(e/1e6).toFixed(1)+"M"},"prettyProjectName",0,function(e,t=35){let n=e.split("/").filter(Boolean),a=n.lastIndexOf(".worktrees");if(a>0&&a<n.length-1){let e=n[a-1],r=n[a+1],s=`${e}/${r}`;return s.length<=t?s:"…"+s.slice(s.length-t+1)}let r=n.length>=2?`${n[n.length-2]}/${n[n.length-1]}`:n[n.length-1]??e;return r.length<=t?r:"…"+r.slice(r.length-t+1)},"shortId",0,function(e){return e.length<=10?e:e.slice(0,6)+"…"+e.slice(-4)}])},55436,e=>{"use strict";let t=(0,e.i(75254).default)("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);e.s(["Search",0,t],55436)},56004,e=>{"use strict";var t=e.i(18050),n=e.i(22016);let a={display:"inline-flex",alignItems:"center",borderRadius:4,padding:"2px 6px",fontSize:10,letterSpacing:"0.04em",textTransform:"uppercase",whiteSpace:"nowrap"};e.s(["TeamBadge",0,function({session:e,linkable:r=!0}){if(!e.teamName)return null;let s=!0===e.isTeamLead,o=void 0!==e.agentName;return s||o?s&&r?(0,t.jsx)(n.default,{href:`/sessions/${e.id}`,style:{...a,fontWeight:600,background:"var(--af-warning-subtle)",color:"var(--af-warning)",border:"1px solid var(--af-warning-subtle)",textDecoration:"none"},title:`Team lead — ${e.teamName}`,children:"Team Lead"}):s?(0,t.jsx)("span",{style:{...a,fontWeight:600,background:"var(--af-warning-subtle)",color:"var(--af-warning)",border:"1px solid var(--af-warning-subtle)"},title:`Team lead — ${e.teamName}`,children:"Team Lead"}):(0,t.jsx)("span",{style:{...a,fontWeight:500,background:"var(--af-surface-hover)",color:"var(--af-text-tertiary)",border:"1px solid var(--af-border-subtle)"},title:`Team member — ${e.teamName} \xb7 ${e.agentName}`,children:"Team Member"}):null}])}]);
@@ -1,4 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,1033,e=>{"use strict";var t=e.i(18050),r=e.i(71645),n=e.i(22016),i=e.i(43531),a=e.i(74886);e.i(74472);let s={loop_suspected:{token:"loop_suspected",label:"consecutive-tool run",description:"The same tool was called 8 or more times in a row without interleaving — heuristic for a possible tool loop, but legitimate Read/Grep marathons also trigger it.",tone:"warn"},long_autonomous:{token:"long_autonomous",label:"long autonomous turn",description:"A single turn ran 20 minutes or longer without any user interruption.",tone:"info"},orchestrated:{token:"orchestrated",label:"subagent-orchestrated",description:"3 or more turns dispatched a subagent via the Task tool.",tone:"info"},fast_ship:{token:"fast_ship",label:"fast ship",description:"A PR shipped in under 5 minutes of agent time.",tone:"ok"},plan_used:{token:"plan_used",label:"plan mode",description:"Plan mode was entered at least once during this slice.",tone:"info"},interrupt_heavy:{token:"interrupt_heavy",label:"frequent interrupts",description:"You hit Esc or cancelled 3 or more times.",tone:"warn"},high_errors:{token:"high_errors",label:"high tool-error rate",description:"20 or more tool calls returned errors.",tone:"warn"}},o={warn:"#ed8936",info:"#4299e1",ok:"#48bb78"};function l({token:e,count:r}){let n=s[e]??{token:e,label:e.replace(/_/g," "),description:`Internal flag: ${e}.`,tone:"info"},i=o[n.tone];return(0,t.jsxs)("span",{title:`${n.token} — ${n.description}`,style:{display:"inline-flex",alignItems:"center",gap:4,padding:"2px 8px",borderRadius:999,background:`color-mix(in srgb, ${i} 12%, transparent)`,border:`1px solid color-mix(in srgb, ${i} 28%, transparent)`,fontSize:10,fontWeight:600,color:i,fontFamily:"var(--font-mono)",whiteSpace:"nowrap"},children:[n.label,"number"==typeof r&&(0,t.jsxs)("span",{style:{opacity:.7,fontWeight:500},children:["×",r]})]})}function d(e){let r,n=Object.keys(s),i=RegExp(`\\b(${n.join("|")})\\b`,"g"),a=[],o=0;for(;null!==(r=i.exec(e));)r.index>o&&a.push(e.slice(o,r.index)),a.push((0,t.jsx)(l,{token:r[1]},`${r.index}-${r[1]}`)),o=i.lastIndex;return o<e.length&&a.push(e.slice(o)),a.length>0?a:[e]}var c=e.i(40484),p=e.i(69198);let h={essential:"#48bb78",helpful:"#4299e1",neutral:"#a0aec0",unhelpful:"#f56565"},x=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],f={"spec-review-loop":"Spec-review loop","chunk-implementation":"Chunk implementation","research-then-build":"Research-then-build","reviewer-triad":"Reviewer triad","background-coordinated":"Background-coordinated","solo-continuation":"Solo continuation","solo-design":"Solo design","solo-build":"Solo build",mixed:"Mixed"},g={"spec-review-loop":"#9f7aea","chunk-implementation":"#4299e1","research-then-build":"#38b2ac","reviewer-triad":"#ed64a6","background-coordinated":"#ecc94b","solo-continuation":"#a0aec0","solo-design":"#48bb78","solo-build":"#ed8936",mixed:"#a0aec0"},u={outlier:"Outlier","novel-use":"Novel use","user-built-tool":"User-built tool","cross-week-contrast":"Cross-week contrast"},m={"claude-md":"CLAUDE.md addition",skill:"Skill to build",hook:"Hook to wire",harness:"Harness extension",decision:"Decision to make"};function y({digest:e,aiEnabled:r,actions:i,priorDigest:a}){var s,o;let l,p,h,x,f,g=e.shipped.length,u=Object.values(e.outcome_mix).reduce((e,t)=>e+(t??0),0),m=e.agent_min_total/60,j=m>=1?`${m.toFixed(1)}h`:`${Math.round(e.agent_min_total)}m`,k=a?(s=e,o=a,l=s.shipped.length-o.shipped.length,h=(p=s.agent_min_total-o.agent_min_total)/60,x=`${l>0?"+":""}${l} PR${1===Math.abs(l)?"":"s"}`,f=Math.abs(h)>=1?`${h>0?"+":""}${h.toFixed(1)}h`:`${p>0?"+":""}${Math.round(p)}m`,`${x} \xb7 ${f}`):null;return(0,t.jsxs)("div",{style:{maxWidth:980,margin:"0 auto",padding:"24px 40px"},children:[(0,t.jsxs)("header",{style:{marginBottom:24},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10,marginBottom:8,fontSize:12,color:"var(--af-text-tertiary)",fontWeight:500,flexWrap:"wrap"},children:[(0,t.jsxs)("span",{style:{fontFamily:"var(--font-mono)",color:"var(--af-text-secondary)"},children:[j," agent time · ",u," active day",1===u?"":"s"," · ",g," PR",1===g?"":"s"]}),k&&(0,t.jsxs)("span",{style:{fontFamily:"var(--font-mono)",fontSize:11,color:"var(--af-text-tertiary)",padding:"1px 7px",borderRadius:999,border:"1px solid var(--af-border-subtle)"},title:"vs the prior calendar week",children:["vs last week: ",k]}),i&&(0,t.jsx)("div",{style:{marginLeft:"auto",display:"inline-flex",alignItems:"center",gap:8},children:i})]}),e.headline?(0,t.jsx)("h1",{style:{fontSize:26,fontWeight:700,lineHeight:1.3,letterSpacing:"-0.02em",margin:"0 0 6px",maxWidth:820,color:"var(--af-text)"},children:d(e.headline)}):(0,t.jsx)("h1",{style:{fontSize:20,color:"var(--af-text-secondary)",margin:"0 0 14px"},children:r?"No narrative yet.":`Worked ${j} across ${e.projects.length} project${1===e.projects.length?"":"s"}.`}),e.key_pattern&&(0,t.jsx)("p",{style:{fontSize:13,fontStyle:"italic",margin:0,lineHeight:1.5,color:"var(--af-text-secondary)",maxWidth:820},children:d(e.key_pattern)})]}),!r&&(0,t.jsxs)("div",{style:{padding:14,marginBottom:24,background:"var(--af-accent-subtle)",borderRadius:8,fontSize:13,color:"var(--af-text)"},children:["Enable AI features in ",(0,t.jsx)(n.default,{href:"/settings",style:{color:"var(--af-accent)"},children:"Settings"})," to see weekly narratives."]}),(0,t.jsx)(v,{digest:e}),(0,t.jsx)(S,{digest:e}),e.top_goal_categories.length>0&&(0,t.jsx)(H,{title:"Goal mix",anchor:"goals",children:(0,t.jsx)(c.GoalBar,{goals:e.top_goal_categories,total:e.agent_min_total})}),(0,t.jsx)(W,{digest:e}),e.top_sessions&&e.top_sessions.length>0&&(0,t.jsx)(A,{sessions:e.top_sessions}),(0,t.jsx)(F,{title:"What worked",anchor:"what-worked",items:e.what_worked??[],tone:"#48bb78",sectionFallbackProse:null}),(0,t.jsx)(F,{title:"What stalled",anchor:"what-stalled",items:e.what_stalled??[],tone:"#ed8936",sectionFallbackProse:"No stalls stuck this week."}),(0,t.jsx)(C,{items:e.what_surprised??[]}),(0,t.jsx)(B,{items:e.where_to_lean??[]}),(0,t.jsx)(D,{shipped:e.shipped}),!e.working_shapes&&(0,t.jsx)(b,{digest:e})]})}function b({digest:e}){let r=e.recurring_themes??[],n=e.outcome_correlations??[],i=e.friction_categories??[],a=e.suggestions,s=e.on_the_horizon,o=e.fun_ending;return r.length>0||n.length>0||i.length>0||(a?.claude_md_additions?.length??0)>0||s||o?(0,t.jsxs)("div",{style:{padding:"14px 16px",marginTop:18,borderRadius:8,background:"color-mix(in srgb, var(--af-text-tertiary) 5%, var(--af-surface))",border:"1px dashed var(--af-border-subtle)",fontSize:12,color:"var(--af-text-secondary)",lineHeight:1.55},children:[(0,t.jsx)("strong",{style:{color:"var(--af-text)"},children:"Legacy digest:"})," this week was generated under a previous prompt. Re-roll the digest to refresh it under the new working-shapes narrative."]}):null}function v({digest:e}){let r=e.agent_min_total/60,i=r>=1?`${r.toFixed(1)}h`:`${Math.round(e.agent_min_total)}m`,a=function(e){let t=e.reduce((e,t)=>e+t,0);if(0===t)return null;for(let r=1;r<=24;r++){let n=0,i=0;for(let t=0;t<=24-r;t++){let a=0;for(let n=0;n<r;n++)a+=e[t+n]??0;a>n&&(n=a,i=t)}if(n/t>=.6)return{start:i,end:i+r,share_pct:n/t*100}}return null}(e.hours_distribution),s=new Map(e.days_active.map(e=>[e.date,e])),o=z(e.window.start),l=o.map(e=>s.get(e)?.agent_min??0),d=Math.max(...l,1),c=e.busiest_day?o.indexOf(e.busiest_day.date):-1,p=e.longest_run&&e.busiest_day?Math.min(1,e.longest_run.active_min/Math.max(1,e.busiest_day.agent_min)):0,h=[];return(h.push({label:"Agent time",primary:i,detail:`across ${e.days_active.length} day${1===e.days_active.length?"":"s"}`,visual:(0,t.jsx)(j,{values:l,max:d,highlight:-1})}),e.busiest_day&&h.push({label:"Busiest day",href:`/digest/${e.busiest_day.date}`,primary:`${L(e.busiest_day.date)} ${e.busiest_day.date.slice(5)}`,detail:`${Math.round(e.busiest_day.agent_min)}m \xb7 ${e.busiest_day.shipped_count} PR${1===e.busiest_day.shipped_count?"":"s"}`,visual:(0,t.jsx)(j,{values:l,max:d,highlight:c})}),e.longest_run&&h.push({label:"Longest single run",href:`/sessions/${e.longest_run.session_id}`,title:`Session ${e.longest_run.session_id.slice(0,8)}`,primary:`${Math.round(e.longest_run.active_min)}m`,detail:`${e.longest_run.project_display} \xb7 ${L(e.longest_run.date)} ${e.longest_run.date.slice(5)}`,visual:(0,t.jsx)(k,{ratio:p,caption:"vs busiest day"})}),a&&h.push({label:"Peak hours",title:`${$(a.start,a.end)} carried ${a.share_pct.toFixed(0)}% of the week's agent time`,primary:$(a.start,a.end),detail:`${a.share_pct.toFixed(0)}% of agent time`,visual:(0,t.jsx)(_,{hours:e.hours_distribution,peakStart:a.start,peakEnd:a.end})}),0===h.length)?null:(0,t.jsx)("section",{style:{display:"grid",gridTemplateColumns:`repeat(${Math.min(h.length,4)}, minmax(0, 1fr))`,gap:10,marginBottom:20},children:h.map((e,r)=>{let i=(0,t.jsxs)("div",{style:{padding:"12px 14px",borderRadius:10,background:"var(--af-surface)",border:"1px solid var(--af-border-subtle)",height:"100%",display:"flex",flexDirection:"column",justifyContent:"space-between",minHeight:90},title:e.title,children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{style:{fontSize:9,fontWeight:700,letterSpacing:"0.08em",textTransform:"uppercase",color:"var(--af-text-tertiary)",marginBottom:6},children:e.label}),(0,t.jsx)("div",{style:{fontSize:17,fontWeight:600,color:"var(--af-text)",letterSpacing:"-0.01em",lineHeight:1.2},children:e.primary}),(0,t.jsx)("div",{style:{fontSize:10.5,color:"var(--af-text-tertiary)",fontFamily:"var(--font-mono)",marginTop:3},children:e.detail})]}),e.visual&&(0,t.jsx)("div",{style:{marginTop:10},children:e.visual})]});return e.href?(0,t.jsx)(n.default,{href:e.href,style:{textDecoration:"none"},children:i},r):(0,t.jsx)("div",{children:i},r)})})}function j({values:e,max:r,highlight:n}){return(0,t.jsx)("div",{style:{display:"flex",gap:2,alignItems:"flex-end",height:18},children:e.map((e,i)=>{let a=r>0?Math.max(1,e/r*18):1,s=i===n;return(0,t.jsx)("div",{style:{flex:1,height:a,borderRadius:1,background:s?"var(--af-accent)":e>0?"color-mix(in srgb, var(--af-accent) 30%, transparent)":"var(--af-border-subtle)"}},i)})})}function k({ratio:e,caption:r}){let n=100*Math.max(0,Math.min(1,e));return(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{style:{height:6,borderRadius:99,overflow:"hidden",background:"var(--af-border-subtle)"},children:(0,t.jsx)("div",{style:{width:`${n}%`,height:"100%",background:"var(--af-accent)"}})}),(0,t.jsxs)("div",{style:{fontSize:9,color:"var(--af-text-tertiary)",fontFamily:"var(--font-mono)",marginTop:3},children:[Math.round(n),"% ",r]})]})}function _({hours:e,peakStart:r,peakEnd:n}){let i=Math.max(...e,1);return(0,t.jsx)("div",{style:{display:"flex",gap:1,alignItems:"flex-end",height:18},children:e.map((e,a)=>{let s=a>=r&&a<=n,o=i>0?Math.max(1,e/i*18):1;return(0,t.jsx)("div",{style:{flex:1,height:o,borderRadius:1,background:s?"var(--af-accent)":e>0?"color-mix(in srgb, var(--af-accent) 22%, transparent)":"var(--af-border-subtle)"}},a)})})}function S({digest:e}){if(0===e.days_active.length)return null;let r=Math.max(...e.days_active.map(e=>e.agent_min)),i=new Map(e.days_active.map(e=>[e.date,e])),a=z(e.window.start);return(0,t.jsx)("section",{style:{display:"flex",gap:6,alignItems:"stretch",padding:"12px 0",marginBottom:24},children:a.map((e,a)=>{let s=i.get(e),o=s?.agent_min??0,l=r>0&&o>0?Math.max(8,o/r*100):0,d=s?w[s.outcome_day]:"var(--af-text-tertiary)",c=s?.helpfulness_day?h[s.helpfulness_day]:null;return(0,t.jsxs)(n.default,{href:s?`/digest/${e}`:"#",style:{flex:1,display:"flex",flexDirection:"column",alignItems:"stretch",gap:2,textDecoration:"none",pointerEvents:s?"auto":"none"},title:s?`${e} \xb7 ${Math.round(o)}m \xb7 ${s.outcome_day}${s.shipped_count>0?` \xb7 ${s.shipped_count} PR`:""}${s.helpfulness_day?` \xb7 helpfulness ${s.helpfulness_day}`:""}`:"no activity",children:[(0,t.jsxs)("div",{style:{height:56,borderRadius:4,position:"relative",background:"var(--af-surface)",border:`1px solid ${s?`color-mix(in srgb, ${d} 28%, var(--af-border-subtle))`:"var(--af-border-subtle)"}`,overflow:"hidden"},children:[s&&(0,t.jsx)("div",{style:{position:"absolute",bottom:0,left:0,right:0,height:`${l}%`,background:`color-mix(in srgb, ${d} 28%, transparent)`}}),s?.dominant_shape&&g[s.dominant_shape]&&(0,t.jsx)("div",{title:`${f[s.dominant_shape]??s.dominant_shape}`,style:{position:"absolute",top:0,left:0,right:0,height:3,background:g[s.dominant_shape]}}),c&&(0,t.jsx)("div",{style:{position:"absolute",top:4,right:4,width:6,height:6,borderRadius:999,background:c},title:s?.helpfulness_day??""})]}),(0,t.jsx)("div",{style:{fontSize:9,fontWeight:700,letterSpacing:"0.06em",color:"var(--af-text-tertiary)",textAlign:"center"},children:x[a]}),(0,t.jsx)("div",{style:{fontSize:9,fontFamily:"var(--font-mono)",color:s?"var(--af-text-secondary)":"var(--af-text-tertiary)",textAlign:"center"},children:s?`${Math.round(o)}m`:"—"})]},a)})})}let w={shipped:"#48bb78",partial:"#4299e1",blocked:"#f56565",exploratory:"#a0aec0",trivial:"#cbd5e0",idle:"#cbd5e0"};function $(e,t){let r=e=>`${e%12||12}${e<12||24===e?"am":"pm"}`;return`${r(e)}–${r(t)}`}function z(e){let t=[],r=new Date(e);for(let e=0;e<7;e++){let n=new Date(r);n.setDate(r.getDate()+e);let i=n.getFullYear(),a=String(n.getMonth()+1).padStart(2,"0"),s=String(n.getDate()).padStart(2,"0");t.push(`${i}-${a}-${s}`)}return t}function W({digest:e}){let r=e.trajectory&&e.trajectory.length>0,i=e.standout_days&&e.standout_days.length>0,a=e.projects.filter(e=>e.share_pct>=5||e.shipped_count>0),s=a.length>0;return r||i||s?(0,t.jsxs)(H,{title:"Through the week",anchor:"through-the-week",children:[(r||i)&&(0,t.jsxs)("div",{style:{display:"grid",gridTemplateColumns:r&&i?"minmax(0, 1.4fr) minmax(0, 1fr)":"1fr",gap:28,marginBottom:22*!!s},children:[r&&(0,t.jsxs)("div",{children:[(0,t.jsx)(R,{children:"Trajectory"}),(0,t.jsx)("ol",{style:{listStyle:"none",padding:0,margin:0,display:"flex",flexDirection:"column",gap:6},children:e.trajectory.map(e=>(0,t.jsxs)("li",{style:{display:"flex",gap:12,alignItems:"flex-start"},children:[(0,t.jsxs)(n.default,{href:`/digest/${e.date}`,style:{fontSize:10,fontWeight:600,color:"var(--af-text-tertiary)",fontFamily:"var(--font-mono)",flexShrink:0,width:64,paddingTop:3,textDecoration:"none"},children:[L(e.date)," ",e.date.slice(5)]}),(0,t.jsx)("span",{style:{fontSize:12.5,lineHeight:1.55,color:"var(--af-text-secondary)"},children:d(e.line)})]},e.date))})]}),i&&(0,t.jsxs)("div",{children:[(0,t.jsx)(R,{children:"Standout days"}),(0,t.jsx)("ul",{style:{listStyle:"none",padding:0,margin:0,display:"flex",flexDirection:"column",gap:8},children:e.standout_days.map(e=>(0,t.jsxs)("li",{style:{padding:"10px 12px",borderRadius:8,background:"var(--af-surface)",border:"1px solid var(--af-border-subtle)"},children:[(0,t.jsxs)(n.default,{href:`/digest/${e.date}`,style:{fontSize:11,fontWeight:600,color:"var(--af-accent)",textDecoration:"none",fontFamily:"var(--font-mono)",marginRight:8},children:[L(e.date)," ",e.date.slice(5)]}),(0,t.jsx)("span",{style:{fontSize:12.5,lineHeight:1.55,color:"var(--af-text)"},children:d(e.why)})]},e.date))})]})]}),s&&(0,t.jsxs)("div",{children:[(0,t.jsx)(R,{children:"Project areas"}),(0,t.jsx)("ul",{style:{listStyle:"none",padding:0,margin:0,display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(280px, 1fr))",gap:10},children:a.map(e=>(0,t.jsxs)("li",{style:{padding:"11px 13px",borderRadius:8,background:"var(--af-surface)",border:"1px solid var(--af-border-subtle)",display:"flex",flexDirection:"column"},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"baseline",gap:10,marginBottom:6*!!e.description},children:[(0,t.jsx)(n.default,{href:`/projects/${encodeURIComponent(e.name)}`,style:{fontSize:13,fontWeight:600,color:"var(--af-text)",textDecoration:"none",flex:1,minWidth:0,letterSpacing:"-0.01em"},children:e.display_name}),(0,t.jsxs)("span",{style:{fontFamily:"var(--font-mono)",fontSize:10,color:"var(--af-text-tertiary)"},children:[Math.round(e.agent_min),"m · ",e.share_pct.toFixed(0),"% · ",e.shipped_count," PR"]})]}),e.description&&(0,t.jsx)("p",{style:{fontSize:12,lineHeight:1.5,margin:0,color:"var(--af-text-secondary)"},children:e.description})]},e.name))})]})]}):null}function R({children:e}){return(0,t.jsx)("div",{style:{fontSize:10,color:"var(--af-text-tertiary)",textTransform:"uppercase",letterSpacing:"0.08em",fontWeight:700,marginBottom:10},children:e})}function T({label:e,payload:n}){let[s,o]=(0,r.useState)(!1);return(0,t.jsxs)("div",{style:{position:"relative"},children:[(0,t.jsx)("pre",{style:{margin:0,padding:"10px 12px",paddingRight:96,borderRadius:6,background:"var(--af-surface-raised)",border:"1px solid var(--af-border-subtle)",fontSize:11,fontFamily:"var(--font-mono)",color:"var(--af-text)",whiteSpace:"pre-wrap",wordBreak:"break-word",lineHeight:1.55,overflowX:"auto",maxHeight:280,overflowY:"auto"},children:n}),(0,t.jsx)("button",{type:"button",onClick:async()=>{try{await navigator.clipboard.writeText(n),o(!0),setTimeout(()=>o(!1),1500)}catch{}},style:{position:"absolute",top:8,right:8,display:"inline-flex",alignItems:"center",gap:4,padding:"4px 8px",borderRadius:5,background:s?"color-mix(in srgb, #48bb78 18%, var(--af-surface))":"var(--af-surface)",border:`1px solid ${s?"#48bb78":"var(--af-border-subtle)"}`,color:s?"#48bb78":"var(--af-text-secondary)",fontSize:10,fontWeight:600,cursor:"pointer"},children:s?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(i.Check,{size:10})," Copied"]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(a.Copy,{size:10})," ",e]})})]})}function D({shipped:e}){let[i,a]=(0,r.useState)(!1);if(0===e.length)return null;let s=e.length>=10,o=s&&!i?e.slice(0,5):e,l=e.length-o.length;return(0,t.jsxs)(H,{title:`Shipped (${e.length})`,anchor:"shipped",children:[(0,t.jsx)("ul",{style:{listStyle:"none",padding:0,margin:0,display:"flex",flexDirection:"column",gap:4},children:o.map((e,r)=>(0,t.jsxs)("li",{style:{display:"flex",gap:10,alignItems:"baseline",padding:"6px 10px",borderRadius:6,fontSize:12,color:"var(--af-text)"},children:[(0,t.jsxs)(n.default,{href:`/digest/${e.date}`,style:{fontFamily:"var(--font-mono)",fontSize:10,color:"var(--af-text-tertiary)",flexShrink:0,width:56,textDecoration:"none"},children:[L(e.date)," ",e.date.slice(5)]}),(0,t.jsx)("span",{style:{flex:1,minWidth:0},children:e.title}),(0,t.jsx)("span",{style:{fontSize:10,color:"var(--af-text-tertiary)",fontFamily:"var(--font-mono)"},children:e.project})]},r))}),s&&l>0&&(0,t.jsxs)("button",{type:"button",onClick:()=>a(!0),style:{marginTop:6,padding:"4px 10px",borderRadius:5,background:"transparent",border:"1px solid var(--af-border-subtle)",fontSize:10,color:"var(--af-text-secondary)",cursor:"pointer",fontFamily:"var(--font-mono)"},children:["+",l," more"]}),s&&i&&(0,t.jsx)("button",{type:"button",onClick:()=>a(!1),style:{marginTop:6,padding:"4px 10px",borderRadius:5,background:"transparent",border:"1px solid var(--af-border-subtle)",fontSize:10,color:"var(--af-text-secondary)",cursor:"pointer",fontFamily:"var(--font-mono)"},children:"show less"})]})}function F({title:e,anchor:r,items:n,tone:i,sectionFallbackProse:a}){return n&&0!==n.length?(0,t.jsx)(H,{title:e,anchor:r,children:(0,t.jsx)("ul",{style:{listStyle:"none",padding:0,margin:0,display:"flex",flexDirection:"column",gap:10},children:n.map((e,r)=>(0,t.jsx)(I,{item:e,tone:i},r))})}):null===a?null:(0,t.jsx)(H,{title:e,anchor:r,children:(0,t.jsx)("p",{style:{fontSize:12,fontStyle:"italic",color:"var(--af-text-tertiary)",margin:0,padding:"8px 0"},children:a})})}function I({item:e,tone:r}){let i=M(e.anchor);return(0,t.jsxs)("li",{style:{padding:"12px 14px",borderRadius:10,background:`color-mix(in srgb, ${r} 6%, var(--af-surface))`,border:`1px solid color-mix(in srgb, ${r} 22%, var(--af-border))`},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"baseline",gap:8,marginBottom:4,flexWrap:"wrap"},children:[(0,t.jsx)("span",{style:{fontSize:13,fontWeight:600,color:"var(--af-text)",letterSpacing:"-0.01em",flex:1,minWidth:0},children:e.title}),(0,t.jsx)("span",{style:{fontSize:9,fontWeight:700,letterSpacing:"0.04em",textTransform:"uppercase",color:r,padding:"1px 7px",borderRadius:999,background:`color-mix(in srgb, ${r} 14%, transparent)`,border:`1px solid color-mix(in srgb, ${r} 28%, transparent)`,fontFamily:"var(--font-mono)"},title:`Anchor: ${e.anchor}`,children:i})]}),(0,t.jsx)("p",{style:{fontSize:12,lineHeight:1.6,margin:"0 0 8px",color:"var(--af-text)"},children:e.detail}),(0,t.jsxs)("div",{style:{padding:"6px 10px",borderRadius:6,background:"var(--af-surface-raised)",borderLeft:`2px solid color-mix(in srgb, ${r} 50%, transparent)`,display:"flex",gap:8,alignItems:"flex-start"},children:[(0,t.jsxs)(n.default,{href:`/digest/${e.evidence.date}`,style:{fontSize:10,fontWeight:600,color:r,fontFamily:"var(--font-mono)",flexShrink:0,textDecoration:"none",paddingTop:2},children:[L(e.evidence.date)," ",e.evidence.date.slice(5)]}),(0,t.jsxs)("span",{style:{fontSize:11,lineHeight:1.5,color:"var(--af-text)",fontStyle:"italic"},children:[(0,t.jsx)("span",{style:{color:"var(--af-text-tertiary)"},children:"“"}),e.evidence.quote,(0,t.jsx)("span",{style:{color:"var(--af-text-tertiary)"},children:"”"})]})]})]})}function M(e){return"plan-mode-gap"===e?"Plan-mode gap":e.startsWith("interaction_grammar.")?e.slice(20).replace(/_/g," "):f[e]??e}function C({items:e}){return e&&0!==e.length?(0,t.jsx)(H,{title:"What surprised",anchor:"what-surprised",children:(0,t.jsx)("ul",{style:{listStyle:"none",padding:0,margin:0,display:"flex",flexDirection:"column",gap:10},children:e.map((e,r)=>{let i="#b794f4";return(0,t.jsxs)("li",{style:{padding:"12px 14px",borderRadius:10,background:`color-mix(in srgb, ${i} 6%, var(--af-surface))`,border:`1px solid color-mix(in srgb, ${i} 22%, var(--af-border))`},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"baseline",gap:8,marginBottom:4,flexWrap:"wrap"},children:[(0,t.jsx)("span",{style:{fontSize:13,fontWeight:600,color:"var(--af-text)",letterSpacing:"-0.01em",flex:1,minWidth:0},children:e.title}),(0,t.jsx)("span",{style:{fontSize:9,fontWeight:700,letterSpacing:"0.04em",textTransform:"uppercase",color:i,padding:"1px 7px",borderRadius:999,background:`color-mix(in srgb, ${i} 14%, transparent)`,border:`1px solid color-mix(in srgb, ${i} 28%, transparent)`,fontFamily:"var(--font-mono)"},children:u[e.surprise_kind]??e.surprise_kind})]}),(0,t.jsx)("p",{style:{fontSize:12,lineHeight:1.6,margin:"0 0 8px",color:"var(--af-text)"},children:e.detail}),(0,t.jsxs)("div",{style:{padding:"6px 10px",borderRadius:6,background:"var(--af-surface-raised)",borderLeft:`2px solid color-mix(in srgb, ${i} 50%, transparent)`,display:"flex",gap:8,alignItems:"flex-start"},children:[(0,t.jsxs)(n.default,{href:`/digest/${e.evidence.date}`,style:{fontSize:10,fontWeight:600,color:i,fontFamily:"var(--font-mono)",flexShrink:0,textDecoration:"none",paddingTop:2},children:[L(e.evidence.date)," ",e.evidence.date.slice(5)]}),(0,t.jsxs)("span",{style:{fontSize:11,lineHeight:1.5,color:"var(--af-text)",fontStyle:"italic"},children:[(0,t.jsx)("span",{style:{color:"var(--af-text-tertiary)"},children:"“"}),e.evidence.quote,(0,t.jsx)("span",{style:{color:"var(--af-text-tertiary)"},children:"”"})]})]})]},r)})})}):null}function B({items:e}){return e&&0!==e.length?(0,t.jsx)(H,{title:"Where to lean",anchor:"where-to-lean",children:(0,t.jsx)("ul",{style:{listStyle:"none",padding:0,margin:0,display:"flex",flexDirection:"column",gap:12},children:e.map((e,r)=>{let i="var(--af-accent)",a=M(e.anchor);return(0,t.jsxs)("li",{style:{padding:"14px 16px",borderRadius:10,background:"var(--af-surface)",border:"1px solid var(--af-border-subtle)"},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"baseline",gap:8,marginBottom:6,flexWrap:"wrap"},children:[(0,t.jsx)("span",{style:{fontSize:9,fontWeight:700,letterSpacing:"0.06em",textTransform:"uppercase",color:i,padding:"1px 7px",borderRadius:999,background:`color-mix(in srgb, ${i} 14%, transparent)`,border:`1px solid color-mix(in srgb, ${i} 28%, transparent)`,fontFamily:"var(--font-mono)"},children:m[e.lean_kind]??e.lean_kind}),(0,t.jsx)("span",{style:{fontSize:13,fontWeight:600,color:"var(--af-text)",flex:1,minWidth:0},children:e.title}),(0,t.jsxs)("span",{style:{fontSize:9,fontWeight:700,letterSpacing:"0.04em",textTransform:"uppercase",color:"var(--af-text-tertiary)",fontFamily:"var(--font-mono)"},title:`Anchor: ${e.anchor}`,children:["↳ ",a]})]}),(0,t.jsx)("p",{style:{fontSize:12,lineHeight:1.6,margin:"0 0 10px",color:"var(--af-text)"},children:e.detail}),e.copyable&&(0,t.jsx)(T,{label:`Copy ${"claude-md"===e.lean_kind?"block":"snippet"}`,payload:e.copyable}),(0,t.jsxs)("div",{style:{marginTop:8,fontSize:10,color:"var(--af-text-tertiary)",fontFamily:"var(--font-mono)"},children:["Evidence · ",(0,t.jsxs)(n.default,{href:`/digest/${e.evidence.date}`,style:{color:"var(--af-text-tertiary)",textDecoration:"underline"},children:[L(e.evidence.date)," ",e.evidence.date.slice(5)]})," · “",e.evidence.quote.slice(0,100),e.evidence.quote.length>100?"…":"","”"]})]},r)})})}):null}function H({title:e,anchor:r,children:n}){return(0,t.jsxs)("section",{id:r,style:{marginBottom:28,scrollMarginTop:24},children:[(0,t.jsx)("h2",{style:{fontSize:11,fontWeight:700,letterSpacing:"0.08em",textTransform:"uppercase",color:"var(--af-text-tertiary)",margin:"0 0 12px"},children:e}),n]})}function L(e){return new Date(`${e}T12:00:00`).toLocaleDateString("en-US",{weekday:"short"})}let P={"user-steering":"#ed8936","subagent-burst":"#9f7aea","long-autonomous":"#4299e1","plan-mode":"#38b2ac","pr-ship":"#48bb78","harness-chain":"#ed64a6",interrupt:"#f56565","brainstorm-loop":"#9f7aea","agent-loop":"#f56565"},E={"user-steering":"Steering","subagent-burst":"Subagents","long-autonomous":"Autonomous","plan-mode":"Plan","pr-ship":"Shipped","harness-chain":"Harness",interrupt:"Interrupt","brainstorm-loop":"Brainstorm","agent-loop":"Loop"};function A({sessions:e}){return(0,t.jsxs)(H,{title:`Top ${e.length} session${1===e.length?"":"s"} this week`,anchor:"top-sessions",children:[(0,t.jsx)("p",{style:{fontSize:12,color:"var(--af-text-tertiary)",marginTop:-4,marginBottom:14,fontStyle:"italic",lineHeight:1.5,maxWidth:720},children:"Picked by significance — active time × subagents × ships, capped to one per project. Each card walks the timeline with annotated moments to surface the texture of how you drove the agent."}),(0,t.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:16},children:e.map(e=>(0,t.jsx)(G,{session:e},e.session_id))})]})}function G({session:e}){let r=e.working_shape?f[e.working_shape]??e.working_shape:null,i=e.working_shape?g[e.working_shape]??"var(--af-text-tertiary)":"var(--af-text-tertiary)",a=e.wall_min/60,s=e.active_min/60,o=a>=1?`${a.toFixed(1)}h wall`:`${Math.round(e.wall_min)}m wall`,l=s>=1?`${s.toFixed(1)}h active`:`${Math.round(e.active_min)}m active`;return(0,t.jsx)("div",{style:{borderRadius:10,background:"var(--af-surface)",border:"1px solid var(--af-border-subtle)",borderTop:`3px solid ${i}`,overflow:"hidden"},children:(0,t.jsxs)("div",{style:{padding:"16px 18px"},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"baseline",gap:12,flexWrap:"wrap",marginBottom:6},children:[(0,t.jsx)(n.default,{href:`/sessions/${e.session_id}`,style:{fontSize:14,fontWeight:600,color:"var(--af-text)",letterSpacing:"-0.01em",textDecoration:"none"},children:e.project_display}),(0,t.jsx)(p.AgentBadge,{agent:e.agent}),(0,t.jsxs)(n.default,{href:`/digest/${e.date}`,style:{fontSize:11,fontFamily:"var(--font-mono)",color:"var(--af-accent)",textDecoration:"none"},children:[L(e.date)," ",e.date.slice(5)]}),(0,t.jsxs)("span",{style:{fontSize:11,color:"var(--af-text-tertiary)",fontFamily:"var(--font-mono)"},children:[l," · ",o," · ",e.turn_count," turns"]}),r&&(0,t.jsx)("span",{style:{padding:"2px 9px",borderRadius:999,fontSize:11,fontWeight:600,background:`color-mix(in srgb, ${i} 14%, transparent)`,color:i},children:r}),"shipped"===e.outcome&&e.shipped_prs.length>0&&(0,t.jsxs)("span",{style:{padding:"2px 9px",borderRadius:999,fontSize:11,fontWeight:600,background:"color-mix(in srgb, #48bb78 14%, transparent)",color:"#48bb78"},children:["✓ ",e.shipped_prs.length," PR",1===e.shipped_prs.length?"":"s"]})]}),e.day_signature&&(0,t.jsxs)("p",{style:{fontSize:12,fontStyle:"italic",color:"var(--af-text-secondary)",margin:"0 0 14px",lineHeight:1.5,maxWidth:760},children:["“",e.day_signature,"”"]}),(0,t.jsx)(O,{session:e}),e.steering_summary&&(0,t.jsxs)("p",{style:{fontSize:12,lineHeight:1.55,margin:"10px 0 12px",color:"var(--af-text-secondary)",maxWidth:780,paddingLeft:10,borderLeft:"2px solid var(--af-border-subtle)"},children:[(0,t.jsx)("span",{style:{fontSize:9,fontWeight:700,letterSpacing:"0.06em",textTransform:"uppercase",color:"var(--af-text-tertiary)",marginRight:6},children:"steering"}),e.steering_summary]}),(0,t.jsx)(U,{session:e}),(0,t.jsx)(Y,{session:e}),e.pins.length>0&&(0,t.jsx)("ol",{style:{listStyle:"none",padding:0,margin:"12px 0 0",display:"flex",flexDirection:"column",gap:6},children:e.pins.map((e,r)=>(0,t.jsx)(K,{pin:e},r))})]})})}function O({session:e}){return e.why_picked||e.what_worked||e.what_hit_friction?(0,t.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:10,margin:"0 0 6px"},children:[e.why_picked&&(0,t.jsx)(N,{label:"Why this session",tone:"var(--af-text-tertiary)",accent:"var(--af-text-tertiary)",text:e.why_picked}),e.session_summary&&(0,t.jsx)(N,{label:"What happened",tone:"var(--af-text)",accent:"var(--af-text-secondary)",text:e.session_summary,weight:500}),e.what_worked&&(0,t.jsx)(N,{label:"What worked",tone:"var(--af-text)",accent:"#48bb78",text:e.what_worked}),e.what_hit_friction&&(0,t.jsx)(N,{label:"What hit friction",tone:"var(--af-text)",accent:"#ed8936",text:e.what_hit_friction})]}):e.session_summary?(0,t.jsx)("p",{style:{fontSize:13,lineHeight:1.55,margin:"0 0 8px",color:"var(--af-text)",maxWidth:780},children:e.session_summary}):null}function N({label:e,tone:r,accent:n,text:i,weight:a=400}){return(0,t.jsxs)("div",{style:{display:"flex",gap:12,alignItems:"flex-start",maxWidth:800},children:[(0,t.jsx)("span",{style:{flexShrink:0,width:132,paddingTop:2,fontSize:9.5,fontWeight:700,letterSpacing:"0.06em",textTransform:"uppercase",color:n},children:e}),(0,t.jsx)("span",{style:{fontSize:13,lineHeight:1.55,color:r,fontWeight:a},children:i})]})}function U({session:e}){let{user_authored_skills:r,user_authored_subagents:n,stock_skills:i,top_tools:a}=e;return r.length>0||n.length>0||i.length>0||a.length>0?(0,t.jsxs)("div",{style:{marginBottom:4},children:[n.length>0&&(0,t.jsx)(q,{label:"Your subagents",children:n.map(e=>(0,t.jsxs)(X,{tone:"user",children:[e.type,e.count>1?` \xd7${e.count}`:""]},e.type))}),(r.length>0||i.length>0)&&(0,t.jsxs)(q,{label:"Skills loaded",children:[r.map(e=>(0,t.jsx)(X,{tone:"user",children:e},e)),i.slice(0,6).map(e=>(0,t.jsx)(X,{tone:"stock",children:e},e))]}),a.length>0&&(0,t.jsx)(q,{label:"Top tools",children:a.slice(0,4).map((e,r)=>(0,t.jsx)(X,{children:e},r))})]}):null}function q({label:e,children:r}){return(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,flexWrap:"wrap",padding:"3px 0",fontSize:11},children:[(0,t.jsx)("span",{style:{minWidth:96,color:"var(--af-text-tertiary)",fontWeight:500,fontSize:10,textTransform:"uppercase",letterSpacing:"0.04em"},children:e}),(0,t.jsx)("div",{style:{display:"flex",gap:5,flexWrap:"wrap",flex:1},children:r})]})}function X({children:e,tone:r,title:n}){return(0,t.jsx)("span",{title:n,style:{display:"inline-flex",alignItems:"center",padding:"2px 8px",borderRadius:999,fontSize:10,fontFamily:"var(--font-mono)",background:"user"===r?"var(--af-accent-subtle)":"var(--af-border-subtle)",color:"user"===r?"var(--af-accent)":"var(--af-text-secondary)",whiteSpace:"nowrap",maxWidth:280,overflow:"hidden",textOverflow:"ellipsis"},children:e})}function Y({session:e}){let r=e.timeline.active_intervals,n=r.length>0?Math.max(...r.map(e=>e.end_min)):0,i=Math.max(1,e.timeline.duration_min,n);return(0,t.jsxs)("div",{style:{marginTop:10,marginBottom:4},children:[(0,t.jsxs)("div",{style:{position:"relative",width:"100%",height:28,background:"var(--af-border-subtle)",borderRadius:4},children:[r.map((e,r)=>{let n=e.start_min/i*100,a=Math.max(.6,(e.end_min-e.start_min)/i*100);return(0,t.jsx)("div",{style:{position:"absolute",top:6,bottom:6,left:`${n}%`,width:`${a}%`,background:"color-mix(in srgb, var(--af-accent) 30%, transparent)",borderRadius:2}},r)}),e.pins.map((e,r)=>{let n=Math.max(0,Math.min(100,e.start_min/i*100)),a=void 0!==e.end_min?Math.max(n+.5,Math.min(100,e.end_min/i*100)):n,s=void 0!==e.end_min&&a>n+.5,o=P[e.kind]??"var(--af-accent)";return(0,t.jsxs)("div",{children:[s&&(0,t.jsx)("div",{style:{position:"absolute",top:4,bottom:4,left:`${n}%`,width:`${a-n}%`,background:`color-mix(in srgb, ${o} 35%, transparent)`,border:`1px solid ${o}`,borderRadius:3},title:`${E[e.kind]}: ${e.label}`}),(0,t.jsx)("div",{style:{position:"absolute",top:-3,bottom:-3,left:`${n}%`,width:3,background:o,borderRadius:1,transform:"translateX(-1.5px)"},title:`${E[e.kind]}: ${e.label}`})]},r)})]}),(0,t.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",fontSize:9,fontFamily:"var(--font-mono)",color:"var(--af-text-tertiary)",marginTop:3},children:[(0,t.jsx)("span",{children:"0m"}),(0,t.jsx)("span",{children:J(i/2)}),(0,t.jsxs)("span",{children:[J(i)," wall"]})]})]})}function K({pin:e}){let r=P[e.kind]??"var(--af-accent)",n=void 0!==e.end_min&&e.end_min>e.start_min+.5?`${J(e.start_min)}–${J(e.end_min)}`:J(e.start_min);return(0,t.jsxs)("li",{style:{display:"flex",gap:10,alignItems:"flex-start",fontSize:12,lineHeight:1.5},children:[(0,t.jsx)("span",{style:{flexShrink:0,width:3,height:3,marginTop:7,borderRadius:999,background:r}}),(0,t.jsx)("span",{style:{flexShrink:0,fontFamily:"var(--font-mono)",fontSize:10,color:"var(--af-text-tertiary)",paddingTop:1,minWidth:60},children:n}),(0,t.jsx)("span",{style:{flexShrink:0,padding:"1px 7px",borderRadius:999,fontSize:9,fontWeight:700,letterSpacing:"0.04em",textTransform:"uppercase",background:`color-mix(in srgb, ${r} 15%, transparent)`,color:r,marginTop:1},children:E[e.kind]??e.kind}),(0,t.jsx)("span",{style:{color:"var(--af-text)",maxWidth:640},children:e.label})]})}function J(e){if(e>=60){let t=Math.round(e),r=Math.floor(t/60),n=t%60;return`${r}h${n>0?` ${n}m`:""}`}return`${Math.round(10*e)/10}m`}function V({monday:e,isStreaming:r,aiEnabled:n,progress:i,onGenerate:a}){let s=new Date(`${e}T12:00:00`),o=new Date(s);o.setDate(s.getDate()+6);let l=e=>e.toLocaleDateString("en-US",{month:"short",day:"numeric"}),d=`${l(s)} — ${l(o)}`;return(0,t.jsx)("div",{style:{maxWidth:980,margin:"0 auto",padding:"60px 40px"},children:(0,t.jsxs)("div",{style:{margin:"0 auto",maxWidth:480,padding:"32px 28px",borderRadius:14,background:"var(--af-surface)",border:"1px dashed var(--af-border-subtle)",textAlign:"center"},children:[(0,t.jsx)("div",{style:{width:44,height:44,borderRadius:12,margin:"0 auto 16px",background:"var(--af-accent-subtle)",display:"flex",alignItems:"center",justifyContent:"center",color:"var(--af-accent)",fontSize:20},children:"✦"}),(0,t.jsx)("h2",{style:{fontSize:16,fontWeight:600,margin:"0 0 6px",color:"var(--af-text)",letterSpacing:"-0.01em"},children:r?"Generating digest…":"No digest yet for this week"}),(0,t.jsx)("p",{style:{fontSize:12.5,lineHeight:1.55,margin:"0 0 18px",color:"var(--af-text-secondary)"},children:r?`Synthesizing ${d} from this week's day digests. This usually takes 5–10 minutes.`:n?`Once generated, this view shows top sessions, trajectory, findings, and project areas for ${d}.`:`Enable AI features in Settings to synthesize a weekly narrative for ${d}. Deterministic stats are still available below in the live digest as soon as data lands.`}),n&&(0,t.jsx)("button",{onClick:a,disabled:r,style:{padding:"9px 18px",borderRadius:8,background:r?"var(--af-border-subtle)":"var(--af-accent)",color:r?"var(--af-text-tertiary)":"white",border:"none",cursor:r?"default":"pointer",fontSize:13,fontWeight:600,letterSpacing:"-0.005em"},children:r?"Generating…":"Generate digest"}),i&&(0,t.jsx)("div",{style:{marginTop:12,fontSize:10.5,color:"var(--af-text-tertiary)",fontFamily:"var(--font-mono)"},children:i})]})})}e.s(["WeekDigestView",0,function({initial:e,monday:n,aiEnabled:i,autoFire:a=!1,prior:s}){var o,l;let[d,c]=(0,r.useState)(e),[p,h]=(0,r.useState)("idle"),[x,f]=(0,r.useState)(""),g=(0,r.useRef)(!1),u=(0,r.useCallback)(async(e=!1)=>{h("streaming"),f("Starting...");let t=`/api/digest/week/${n}${e?"?force=1":""}`,r=await fetch(t,{method:"POST"});if(!r.ok||!r.body){h("error"),f(`Error ${r.status}`);return}let i=r.body.getReader(),a=new TextDecoder,s="";for(;;){let{done:e,value:t}=await i.read();if(e)break;let r=(s+=a.decode(t,{stream:!0})).split("\n\n");for(let e of(s=r.pop()??"",r)){let t=e.split("\n").find(e=>e.startsWith("data: "));if(t)try{let e=JSON.parse(t.slice(6));if("status"===e.type)f(e.text);else if("dependency"===e.type)f(`${"day"===e.kind?"Day":"Week"} ${e.key} ${e.status}`);else if("entry"===e.type)f(`Enriching ${e.index}/${e.total}...`);else if("progress"===e.type){let t=Math.round(e.elapsed_ms/1e3);f(`Claude composing… ${e.bytes.toLocaleString()} chars (${t}s)`)}else if("digest"===e.type)e.digest&&"week"===e.digest.scope&&c(e.digest),f("Rendering...");else if("saved"===e.type)f("Saved.");else if("error"===e.type){h("error"),f(e.message);return}}catch{}}}h("done"),f("")},[n]);(0,r.useEffect)(()=>{a&&!g.current&&"idle"===p&&(g.current=!0,u(!1))},[a,p,u]);let m="streaming"===p,b=!!d?.headline,v=null;return(!b&&i?v=(0,t.jsx)("button",{onClick:()=>u(!1),disabled:m,style:{padding:"4px 10px",background:"var(--af-accent)",color:"white",border:"none",borderRadius:5,cursor:(o=m)?"default":"pointer",fontSize:11,fontWeight:600,opacity:o?.6:1},children:m?"Generating...":d?"Generate":"Generate digest"}):i&&(v=(0,t.jsxs)("span",{style:{fontSize:10,color:"var(--af-text-tertiary)",display:"inline-flex",gap:6,alignItems:"center"},children:["✓ Up to date",(0,t.jsx)("button",{onClick:()=>u(!0),disabled:m,title:"Re-roll the narrative for this week",style:{padding:"2px 7px",background:"transparent",border:"1px solid var(--af-border-subtle)",borderRadius:4,fontSize:10,color:"var(--af-text-secondary)",cursor:(l=m)?"default":"pointer",opacity:l?.6:1},children:m?"...":"Re-roll"})]})),x&&(v=(0,t.jsxs)(t.Fragment,{children:[v,(0,t.jsx)("span",{style:{fontSize:10,color:"var(--af-text-tertiary)"},children:x})]})),d)?(0,t.jsx)(y,{digest:d,aiEnabled:i,actions:v,priorDigest:s??null}):(0,t.jsx)(V,{monday:n,isStreaming:m,aiEnabled:i,progress:x,onGenerate:()=>u(!1)})}],1033)},57143,e=>{"use strict";var t=e.i(18050),r=e.i(22016),n=e.i(71645),i=e.i(73375),a=e.i(63059);let s=(0,e.i(75254).default)("History",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]]);var o=e.i(37727);function l({inDrawer:e=!1}={}){let[r,i]=(0,n.useState)("weeks"),[a,s]=(0,n.useState)(null),[o,g]=(0,n.useState)(null);return(0,n.useEffect)(()=>{fetch("/api/digest/week-index?count=12").then(e=>e.json()).then(e=>s(e.weeks)).catch(()=>s([])),fetch("/api/digest/month-index?count=6").then(e=>e.json()).then(e=>g(e.months)).catch(()=>g([]))},[]),(0,t.jsxs)("div",{style:e?{padding:"0 18px"}:{maxWidth:980,margin:"0 auto",padding:"28px 40px 0"},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10,marginBottom:e?14:18},children:[!e&&(0,t.jsx)("h2",{style:{fontSize:11,fontWeight:700,letterSpacing:"0.08em",textTransform:"uppercase",color:"var(--af-text-tertiary)",margin:0,marginRight:4},children:"History"}),(0,t.jsx)("div",{style:h,children:["weeks","months"].map(e=>(0,t.jsx)("button",{type:"button",onClick:()=>i(e),style:{...x,background:r===e?"var(--af-accent)":"transparent",color:r===e?"white":"var(--af-text-secondary)"},children:"weeks"===e?"Weeks":"Months"},e))})]}),"weeks"===r?null===a?(0,t.jsx)(p,{children:"Loading weeks…"}):0===a.length?(0,t.jsx)(p,{children:"No history yet."}):(0,t.jsx)("ul",{style:f,children:a.map(e=>(0,t.jsx)(d,{w:e},e.start))}):null===o?(0,t.jsx)(p,{children:"Loading months…"}):0===o.length?(0,t.jsx)(p,{children:"No history yet."}):(0,t.jsx)("ul",{style:f,children:o.map(e=>(0,t.jsx)(c,{m:e},e.start))})]})}function d({w:e}){let n=0===e.active_days&&!e.in_progress&&!e.saved_key,i=e.saved_key?`/insights/${e.saved_key}`:`/insights/week-${e.start}`,a=e.saved_key&&e.headline?e.headline:n?"no data":e.in_progress?"in progress · click to view":`${e.active_days} active day${1===e.active_days?"":"s"} \xb7 click to generate`;return(0,t.jsx)("li",{style:g(!!e.saved_key),children:(0,t.jsxs)(r.default,{href:i,style:{display:"flex",flexDirection:"column",gap:4,textDecoration:"none",flex:1,minWidth:0},children:[(0,t.jsxs)("div",{style:u,children:[(0,t.jsxs)("span",{style:{fontSize:13,fontWeight:600,color:"var(--af-text)",letterSpacing:"-0.01em"},children:["W",String(e.iso_week).padStart(2,"0")," · ",e.label]}),e.in_progress&&(0,t.jsx)("span",{style:y,children:"in progress"}),e.saved_key&&(0,t.jsxs)("span",{style:{fontSize:10,fontWeight:600,color:"var(--af-accent)",marginLeft:"auto"},children:[e.shipped_count," PR · ",e.agent_min,"m"]})]}),(0,t.jsx)("span",{style:m,children:a})]})})}function c({m:e}){let n=0===e.active_days&&!e.in_progress&&!e.saved_key,i=e.saved_key?`/insights/${e.saved_key}`:`/insights/month-${e.start.slice(0,7)}`,a=e.saved_key&&e.headline?e.headline:n?"no data":e.in_progress?"in progress · click to view":`${e.active_days} active day${1===e.active_days?"":"s"} \xb7 click to generate`;return(0,t.jsx)("li",{style:g(!!e.saved_key),children:(0,t.jsxs)(r.default,{href:i,style:{display:"flex",flexDirection:"column",gap:4,textDecoration:"none",flex:1,minWidth:0},children:[(0,t.jsxs)("div",{style:u,children:[(0,t.jsx)("span",{style:{fontSize:13,fontWeight:600,color:"var(--af-text)",letterSpacing:"-0.01em"},children:e.label}),e.in_progress&&(0,t.jsx)("span",{style:y,children:"in progress"}),e.saved_key&&(0,t.jsxs)("span",{style:{fontSize:10,fontWeight:600,color:"var(--af-accent)",marginLeft:"auto"},children:[e.shipped_count," PR · ",e.agent_min,"m"]})]}),(0,t.jsx)("span",{style:m,children:a})]})})}function p({children:e}){return(0,t.jsx)("div",{style:{padding:"20px 18px",borderRadius:10,border:"1px dashed var(--af-border)",background:"var(--af-surface)",fontSize:13,color:"var(--af-text-tertiary)",lineHeight:1.55},children:e})}let h={display:"inline-flex",gap:3,border:"1px solid var(--af-border)",borderRadius:8,padding:2},x={padding:"5px 14px",fontSize:12,fontWeight:600,border:"none",borderRadius:6,cursor:"pointer"},f={listStyle:"none",padding:0,margin:0,display:"flex",flexDirection:"column",gap:4};function g(e){return{display:"flex",alignItems:"stretch",gap:14,padding:"10px 14px",borderRadius:10,border:`1px solid ${e?"color-mix(in srgb, var(--af-accent) 24%, var(--af-border))":"var(--af-border-subtle)"}`,background:e?"color-mix(in srgb, var(--af-accent) 6%, var(--af-surface))":"var(--af-surface)",transition:"border-color 0.15s"}}let u={display:"flex",alignItems:"center",gap:8,minWidth:0},m={fontSize:11,color:"var(--af-text-tertiary)",lineHeight:1.5,fontFamily:"var(--font-mono)"},y={fontSize:10,fontWeight:500,padding:"2px 6px",borderRadius:4,background:"color-mix(in srgb, #f5b445 18%, transparent)",color:"#c08a1f",letterSpacing:"0.02em"};function b({target:e,dir:n}){var s;let o="prev"===n?i.ChevronLeft:a.ChevronRight;return e?(0,t.jsxs)(r.default,{href:`/insights/${e.key}`,style:(s=e.cached,{display:"inline-flex",alignItems:"center",gap:4,padding:"5px 9px",borderRadius:6,border:`1px solid ${s?"color-mix(in srgb, var(--af-accent) 28%, var(--af-border))":"var(--af-border-subtle)"}`,background:s?"color-mix(in srgb, var(--af-accent) 6%, var(--af-surface))":"var(--af-surface)",color:s?"var(--af-accent)":"var(--af-text-secondary)",fontSize:11,fontWeight:500,fontFamily:"var(--font-mono)",textDecoration:"none"}),title:e.cached?`Saved digest \xb7 ${e.label}`:`${e.label} (no saved digest yet — will prompt to Generate)`,children:[(0,t.jsx)(o,{size:14}),(0,t.jsx)("span",{children:e.label})]}):(0,t.jsx)("span",{style:k,title:`No ${"prev"===n?"earlier":"later"} period`,children:(0,t.jsx)(o,{size:14})})}function v({onClose:e}){return(0,t.jsxs)("div",{role:"dialog","aria-modal":"true","aria-label":"Insights history",style:{position:"fixed",inset:0,zIndex:200,display:"flex",justifyContent:"flex-end"},children:[(0,t.jsx)("div",{onClick:e,style:{position:"absolute",inset:0,background:"rgba(0,0,0,0.32)",animation:"fade-in 120ms ease-out"}}),(0,t.jsxs)("aside",{style:{position:"relative",width:"min(440px, 92vw)",height:"100vh",background:"var(--background)",borderLeft:"1px solid var(--af-border-subtle)",boxShadow:"-12px 0 40px rgba(0,0,0,0.32)",display:"flex",flexDirection:"column",animation:"slide-in 160ms cubic-bezier(0.2, 0.9, 0.3, 1)"},children:[(0,t.jsxs)("header",{style:{display:"flex",alignItems:"center",gap:10,padding:"14px 18px",borderBottom:"1px solid var(--af-border-subtle)"},children:[(0,t.jsx)("h2",{style:{fontSize:13,fontWeight:600,margin:0,color:"var(--af-text)"},children:"Browse insights history"}),(0,t.jsx)("button",{type:"button",onClick:e,"aria-label":"Close history",style:{marginLeft:"auto",width:26,height:26,display:"inline-flex",alignItems:"center",justifyContent:"center",border:"1px solid var(--af-border-subtle)",borderRadius:6,background:"transparent",color:"var(--af-text-secondary)",cursor:"pointer"},children:(0,t.jsx)(o.X,{size:14})})]}),(0,t.jsx)("div",{style:{flex:1,overflowY:"auto",padding:"18px 0"},children:(0,t.jsx)(l,{inDrawer:!0})})]}),(0,t.jsx)("style",{children:`
2
- @keyframes slide-in { from { transform: translateX(20px); opacity: 0 } to { transform: translateX(0); opacity: 1 } }
3
- @keyframes fade-in { from { opacity: 0 } to { opacity: 1 } }
4
- `})]})}let j={display:"inline-flex",alignItems:"center",gap:6,padding:"5px 11px",borderRadius:6,border:"1px solid var(--af-border-subtle)",background:"var(--af-surface)",color:"var(--af-text)",fontSize:11,fontWeight:500,cursor:"pointer",fontFamily:"inherit"},k={display:"inline-flex",alignItems:"center",gap:4,padding:"5px 9px",borderRadius:6,border:"1px solid var(--af-border-subtle)",background:"var(--af-surface)",color:"var(--af-text-tertiary)",fontSize:11,fontWeight:500,fontFamily:"var(--font-mono)",opacity:.45,cursor:"default"};e.s(["InsightsTopBar",0,function({scope:e,currentLabel:i,rangeLabel:a,prev:o,next:l}){let[d,c]=(0,n.useState)(!1);return(0,n.useEffect)(()=>{if(!d)return;let e=e=>{"Escape"===e.key&&c(!1)};return window.addEventListener("keydown",e),document.body.style.overflow="hidden",()=>{window.removeEventListener("keydown",e),document.body.style.overflow=""}},[d]),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("header",{style:{position:"sticky",top:0,zIndex:50,background:"color-mix(in srgb, var(--background) 90%, transparent)",backdropFilter:"blur(10px)",WebkitBackdropFilter:"blur(10px)",borderBottom:"1px solid var(--af-border-subtle)"},className:"no-print",children:(0,t.jsxs)("div",{style:{maxWidth:980,margin:"0 auto",padding:"12px 40px",display:"flex",alignItems:"center",gap:14,minHeight:44},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"baseline",gap:10,minWidth:0},children:[(0,t.jsx)(r.default,{href:"/insights",style:{fontSize:10,fontWeight:700,color:"var(--af-text-tertiary)",textDecoration:"none",textTransform:"uppercase",letterSpacing:"0.08em",flexShrink:0},title:"Latest week digest",children:"Insights"}),(0,t.jsx)("span",{style:{color:"var(--af-text-tertiary)",fontSize:11,flexShrink:0},children:"›"}),(0,t.jsx)("span",{style:{fontSize:14,fontWeight:600,color:"var(--af-text)",letterSpacing:"-0.01em",minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:i}),a&&(0,t.jsx)("span",{style:{fontSize:11,fontFamily:"var(--font-mono)",color:"var(--af-text-tertiary)",flexShrink:0},children:a})]}),(0,t.jsxs)("div",{style:{marginLeft:"auto",display:"inline-flex",alignItems:"center",gap:6},children:[(0,t.jsx)(b,{target:o,dir:"prev"}),(0,t.jsx)(b,{target:l,dir:"next"}),(0,t.jsxs)("button",{type:"button",onClick:()=>c(!0),style:j,title:`Browse ${"week"===e?"weekly":"monthly"} history`,children:[(0,t.jsx)(s,{size:13}),(0,t.jsx)("span",{children:"Browse"})]})]})]})}),d&&(0,t.jsx)(v,{onClose:()=>c(!1)})]})}],57143)}]);
@@ -1 +0,0 @@
1
- self.__MIDDLEWARE_MATCHERS = [];self.__MIDDLEWARE_MATCHERS_CB && self.__MIDDLEWARE_MATCHERS_CB()