fleetlens 0.4.0 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/app/apps/web/.next/BUILD_ID +1 -1
- package/app/apps/web/.next/app-path-routes-manifest.json +16 -7
- package/app/apps/web/.next/build-manifest.json +7 -7
- package/app/apps/web/.next/prerender-manifest.json +3 -3
- package/app/apps/web/.next/required-server-files.json +2 -1
- package/app/apps/web/.next/routes-manifest.json +86 -24
- package/app/apps/web/.next/server/app/_global-error/page/build-manifest.json +4 -4
- package/app/apps/web/.next/server/app/_global-error/page.js +1 -1
- package/app/apps/web/.next/server/app/_global-error/page.js.nft.json +1 -1
- package/app/apps/web/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/app/apps/web/.next/server/app/_global-error.html +1 -1
- package/app/apps/web/.next/server/app/_global-error.rsc +7 -7
- package/app/apps/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +2 -2
- package/app/apps/web/.next/server/app/_global-error.segments/_full.segment.rsc +7 -7
- package/app/apps/web/.next/server/app/_global-error.segments/_head.segment.rsc +3 -3
- package/app/apps/web/.next/server/app/_global-error.segments/_index.segment.rsc +3 -3
- package/app/apps/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/app/apps/web/.next/server/app/_not-found/page/build-manifest.json +4 -4
- package/app/apps/web/.next/server/app/_not-found/page.js +5 -4
- package/app/apps/web/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/app/apps/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/app/apps/web/.next/server/app/api/digest/day/[date]/route/app-paths-manifest.json +3 -0
- package/app/apps/web/.next/server/app/api/digest/day/[date]/route.js +9 -0
- package/app/apps/web/.next/server/app/api/{insights/saved/[key] → digest/day/[date]}/route.js.nft.json +1 -1
- package/app/apps/web/.next/server/app/api/digest/day/[date]/route_client-reference-manifest.js +3 -0
- package/app/apps/web/.next/server/app/api/digest/month/[yearMonth]/route/app-paths-manifest.json +3 -0
- package/app/apps/web/.next/server/app/api/digest/month/[yearMonth]/route.js +9 -0
- package/app/apps/web/.next/server/app/api/digest/month/[yearMonth]/route.js.nft.json +1 -0
- package/app/apps/web/.next/server/app/api/digest/month/[yearMonth]/route_client-reference-manifest.js +3 -0
- package/app/apps/web/.next/server/app/api/digest/month-index/route/app-paths-manifest.json +3 -0
- package/app/apps/web/.next/server/app/api/digest/month-index/route.js +7 -0
- package/app/apps/web/.next/server/app/api/{insights/months-index → digest/month-index}/route.js.nft.json +1 -1
- package/app/apps/web/.next/server/app/api/{insights/pdf/[key] → digest/month-index}/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next/server/app/api/digest/week/[startDate]/route/app-paths-manifest.json +3 -0
- package/app/apps/web/.next/server/app/api/digest/week/[startDate]/route.js +9 -0
- package/app/apps/web/.next/server/app/api/digest/week/[startDate]/route.js.nft.json +1 -0
- package/app/apps/web/.next/server/app/api/digest/week/[startDate]/route_client-reference-manifest.js +3 -0
- package/app/apps/web/.next/server/app/api/digest/week-index/route/app-paths-manifest.json +3 -0
- package/app/apps/web/.next/server/app/api/digest/week-index/route.js +7 -0
- package/app/apps/web/.next/server/app/api/{insights/weeks-index → digest/week-index}/route.js.nft.json +1 -1
- package/app/apps/web/.next/server/app/api/digest/week-index/route_client-reference-manifest.js +3 -0
- package/app/apps/web/.next/server/app/api/jobs/route/app-paths-manifest.json +3 -0
- package/app/apps/web/.next/server/app/api/jobs/route.js +6 -0
- package/app/apps/web/.next/server/app/api/jobs/route.js.nft.json +1 -0
- package/app/apps/web/.next/server/app/api/jobs/route_client-reference-manifest.js +3 -0
- package/app/apps/web/.next/server/app/api/runs/[runId]/route/app-paths-manifest.json +3 -0
- package/app/apps/web/.next/server/app/api/runs/[runId]/route/build-manifest.json +9 -0
- package/app/apps/web/.next/server/app/api/runs/[runId]/route.js +6 -0
- package/app/apps/web/.next/server/app/api/{insights/saved → runs/[runId]}/route.js.nft.json +1 -1
- package/app/apps/web/.next/server/app/api/runs/[runId]/route_client-reference-manifest.js +3 -0
- package/app/apps/web/.next/server/app/api/runs/[runId]/stream/route/app-paths-manifest.json +3 -0
- package/app/apps/web/.next/server/app/api/runs/[runId]/stream/route/build-manifest.json +9 -0
- package/app/apps/web/.next/server/app/api/runs/[runId]/stream/route/server-reference-manifest.json +4 -0
- package/app/apps/web/.next/server/app/api/runs/[runId]/stream/route.js +6 -0
- package/app/apps/web/.next/server/app/api/runs/[runId]/stream/route.js.map +5 -0
- package/app/apps/web/.next/server/app/api/{insights/pdf/[key] → runs/[runId]/stream}/route.js.nft.json +1 -1
- package/app/apps/web/.next/server/app/api/runs/[runId]/stream/route_client-reference-manifest.js +3 -0
- package/app/apps/web/.next/server/app/api/runs/route/app-paths-manifest.json +3 -0
- package/app/apps/web/.next/server/app/api/runs/route/build-manifest.json +9 -0
- package/app/apps/web/.next/server/app/api/runs/route/server-reference-manifest.json +4 -0
- package/app/apps/web/.next/server/app/api/runs/route.js +6 -0
- package/app/apps/web/.next/server/app/api/runs/route.js.map +5 -0
- package/app/apps/web/.next/server/app/api/{insights → runs}/route.js.nft.json +1 -1
- package/app/apps/web/.next/server/app/api/runs/route_client-reference-manifest.js +3 -0
- package/app/apps/web/.next/server/app/api/settings/route/app-paths-manifest.json +3 -0
- package/app/apps/web/.next/server/app/api/settings/route/build-manifest.json +9 -0
- package/app/apps/web/.next/server/app/api/settings/route/server-reference-manifest.json +4 -0
- package/app/apps/web/.next/server/app/api/settings/route.js +10 -0
- package/app/apps/web/.next/server/app/api/settings/route.js.map +5 -0
- package/app/apps/web/.next/server/app/api/settings/route.js.nft.json +1 -0
- package/app/apps/web/.next/server/app/api/{insights → settings}/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next/server/app/day/[date]/page/app-paths-manifest.json +3 -0
- package/app/apps/web/.next/server/app/{insights/print/[key] → day/[date]}/page/build-manifest.json +4 -4
- package/app/apps/web/.next/server/app/day/[date]/page/server-reference-manifest.json +4 -0
- package/app/apps/web/.next/server/app/day/[date]/page.js +18 -0
- package/app/apps/web/.next/server/app/day/[date]/page.js.map +5 -0
- package/app/apps/web/.next/server/app/day/[date]/page.js.nft.json +1 -0
- package/app/apps/web/.next/server/app/day/[date]/page_client-reference-manifest.js +3 -0
- package/app/apps/web/.next/server/app/day/page/app-paths-manifest.json +3 -0
- package/app/apps/web/.next/server/app/day/page/build-manifest.json +17 -0
- package/app/apps/web/.next/server/app/day/page/next-font-manifest.json +6 -0
- package/app/apps/web/.next/server/app/day/page/react-loadable-manifest.json +1 -0
- package/app/apps/web/.next/server/app/day/page/server-reference-manifest.json +4 -0
- package/app/apps/web/.next/server/app/{insights/print/[key] → day}/page.js +11 -10
- package/app/apps/web/.next/server/app/day/page.js.map +5 -0
- package/app/apps/web/.next/server/app/day/page.js.nft.json +1 -0
- package/app/apps/web/.next/server/app/day/page_client-reference-manifest.js +3 -0
- package/app/apps/web/.next/server/app/digest/[date]/page/app-paths-manifest.json +3 -0
- package/app/apps/web/.next/server/app/digest/[date]/page/build-manifest.json +17 -0
- package/app/apps/web/.next/server/app/digest/[date]/page/next-font-manifest.json +6 -0
- package/app/apps/web/.next/server/app/digest/[date]/page/react-loadable-manifest.json +1 -0
- package/app/apps/web/.next/server/app/digest/[date]/page/server-reference-manifest.json +4 -0
- package/app/apps/web/.next/server/app/digest/[date]/page.js +17 -0
- package/app/apps/web/.next/server/app/digest/[date]/page.js.map +5 -0
- package/app/apps/web/.next/server/app/digest/[date]/page.js.nft.json +1 -0
- package/app/apps/web/.next/server/app/digest/[date]/page_client-reference-manifest.js +3 -0
- package/app/apps/web/.next/server/app/digest/page/app-paths-manifest.json +3 -0
- package/app/apps/web/.next/server/app/digest/page/build-manifest.json +17 -0
- package/app/apps/web/.next/server/app/digest/page/next-font-manifest.json +6 -0
- package/app/apps/web/.next/server/app/digest/page/react-loadable-manifest.json +1 -0
- package/app/apps/web/.next/server/app/digest/page/server-reference-manifest.json +4 -0
- package/app/apps/web/.next/server/app/digest/page.js +17 -0
- package/app/apps/web/.next/server/app/digest/page.js.map +5 -0
- package/app/apps/web/.next/server/app/digest/page.js.nft.json +1 -0
- package/app/apps/web/.next/server/app/digest/page_client-reference-manifest.js +3 -0
- package/app/apps/web/.next/server/app/insights/[key]/page/build-manifest.json +4 -4
- package/app/apps/web/.next/server/app/insights/[key]/page.js +7 -5
- package/app/apps/web/.next/server/app/insights/[key]/page.js.nft.json +1 -1
- package/app/apps/web/.next/server/app/insights/[key]/page_client-reference-manifest.js +1 -1
- package/app/apps/web/.next/server/app/insights/page/build-manifest.json +4 -4
- package/app/apps/web/.next/server/app/insights/page.js +7 -5
- package/app/apps/web/.next/server/app/insights/page.js.nft.json +1 -1
- package/app/apps/web/.next/server/app/insights/page_client-reference-manifest.js +1 -1
- package/app/apps/web/.next/server/app/page/build-manifest.json +4 -4
- package/app/apps/web/.next/server/app/page.js +7 -6
- package/app/apps/web/.next/server/app/page.js.nft.json +1 -1
- package/app/apps/web/.next/server/app/page_client-reference-manifest.js +1 -1
- package/app/apps/web/.next/server/app/parallelism/page/build-manifest.json +4 -4
- package/app/apps/web/.next/server/app/parallelism/page.js +6 -5
- package/app/apps/web/.next/server/app/parallelism/page.js.nft.json +1 -1
- package/app/apps/web/.next/server/app/parallelism/page_client-reference-manifest.js +1 -1
- package/app/apps/web/.next/server/app/projects/[slug]/page/build-manifest.json +4 -4
- package/app/apps/web/.next/server/app/projects/[slug]/page.js +6 -5
- package/app/apps/web/.next/server/app/projects/[slug]/page.js.nft.json +1 -1
- package/app/apps/web/.next/server/app/projects/[slug]/page_client-reference-manifest.js +1 -1
- package/app/apps/web/.next/server/app/projects/page/build-manifest.json +4 -4
- package/app/apps/web/.next/server/app/projects/page.js +5 -4
- package/app/apps/web/.next/server/app/projects/page.js.nft.json +1 -1
- package/app/apps/web/.next/server/app/projects/page_client-reference-manifest.js +1 -1
- package/app/apps/web/.next/server/app/runs/page/app-paths-manifest.json +3 -0
- package/app/apps/web/.next/server/app/runs/page/build-manifest.json +17 -0
- package/app/apps/web/.next/server/app/runs/page/next-font-manifest.json +6 -0
- package/app/apps/web/.next/server/app/runs/page/react-loadable-manifest.json +1 -0
- package/app/apps/web/.next/server/app/runs/page/server-reference-manifest.json +4 -0
- package/app/apps/web/.next/server/app/runs/page.js +17 -0
- package/app/apps/web/.next/server/app/runs/page.js.map +5 -0
- package/app/apps/web/.next/server/app/runs/page.js.nft.json +1 -0
- package/app/apps/web/.next/server/app/runs/page_client-reference-manifest.js +3 -0
- package/app/apps/web/.next/server/app/sessions/[id]/page/build-manifest.json +4 -4
- package/app/apps/web/.next/server/app/sessions/[id]/page.js +5 -4
- package/app/apps/web/.next/server/app/sessions/[id]/page.js.nft.json +1 -1
- package/app/apps/web/.next/server/app/sessions/[id]/page_client-reference-manifest.js +1 -1
- package/app/apps/web/.next/server/app/sessions/page/build-manifest.json +4 -4
- package/app/apps/web/.next/server/app/sessions/page.js +5 -4
- package/app/apps/web/.next/server/app/sessions/page.js.nft.json +1 -1
- package/app/apps/web/.next/server/app/sessions/page_client-reference-manifest.js +1 -1
- package/app/apps/web/.next/server/app/settings/page/app-paths-manifest.json +3 -0
- package/app/apps/web/.next/server/app/settings/page/build-manifest.json +17 -0
- package/app/apps/web/.next/server/app/settings/page/next-font-manifest.json +6 -0
- package/app/apps/web/.next/server/app/settings/page/react-loadable-manifest.json +1 -0
- package/app/apps/web/.next/server/app/settings/page/server-reference-manifest.json +4 -0
- package/app/apps/web/.next/server/app/settings/page.js +18 -0
- package/app/apps/web/.next/server/app/settings/page.js.map +5 -0
- package/app/apps/web/.next/server/app/settings/page.js.nft.json +1 -0
- package/app/apps/web/.next/server/app/settings/page_client-reference-manifest.js +3 -0
- package/app/apps/web/.next/server/app/usage/page/build-manifest.json +4 -4
- package/app/apps/web/.next/server/app/usage/page.js +6 -5
- package/app/apps/web/.next/server/app/usage/page.js.nft.json +1 -1
- package/app/apps/web/.next/server/app/usage/page_client-reference-manifest.js +1 -1
- package/app/apps/web/.next/server/app-paths-manifest.json +16 -7
- package/app/apps/web/.next/server/chunks/02dz_web__next-internal_server_app_api_digest_week_[startDate]_route_actions_0klqqsh.js +3 -0
- package/app/apps/web/.next/server/chunks/09og__next-internal_server_app_api_digest_month_[yearMonth]_route_actions_0i4ielu.js +3 -0
- package/app/apps/web/.next/server/chunks/[externals]__0o43ejh._.js +3 -0
- package/app/apps/web/.next/server/chunks/[root-of-the-server]__0-vgrh1._.js +3 -0
- package/app/apps/web/.next/server/chunks/[root-of-the-server]__00n3f9y._.js +3 -0
- package/app/apps/web/.next/server/chunks/[root-of-the-server]__02zukjw._.js +3 -0
- package/app/apps/web/.next/server/chunks/[root-of-the-server]__067~im1._.js +6 -0
- package/app/apps/web/.next/server/chunks/[root-of-the-server]__06b4cj-._.js +3 -0
- package/app/apps/web/.next/server/chunks/[root-of-the-server]__0_8zh-i._.js +9 -0
- package/app/apps/web/.next/server/chunks/[root-of-the-server]__0e8n_x4._.js +3 -0
- package/app/apps/web/.next/server/chunks/[root-of-the-server]__0ej_p3s._.js +9 -0
- package/app/apps/web/.next/server/chunks/[root-of-the-server]__0jprdks._.js +9 -0
- package/app/apps/web/.next/server/chunks/apps_web__next-internal_server_app_api_digest_day_[date]_route_actions_09sxie5.js +3 -0
- package/app/apps/web/.next/server/chunks/apps_web__next-internal_server_app_api_digest_month-index_route_actions_0wldpbu.js +3 -0
- package/app/apps/web/.next/server/chunks/apps_web__next-internal_server_app_api_digest_week-index_route_actions_12c2wj2.js +3 -0
- package/app/apps/web/.next/server/chunks/apps_web__next-internal_server_app_api_jobs_route_actions_08kx~8-.js +3 -0
- package/app/apps/web/.next/server/chunks/apps_web__next-internal_server_app_api_runs_[runId]_route_actions_0dfcghc.js +3 -0
- package/app/apps/web/.next/server/chunks/apps_web__next-internal_server_app_api_runs_[runId]_stream_route_actions_0.8e8-k.js +3 -0
- package/app/apps/web/.next/server/chunks/apps_web__next-internal_server_app_api_runs_route_actions_0xyx82f.js +3 -0
- package/app/apps/web/.next/server/chunks/apps_web__next-internal_server_app_api_settings_route_actions_0.xv7sx.js +3 -0
- package/app/apps/web/.next/server/chunks/node_modules_next_036my~r._.js +49 -0
- package/app/apps/web/.next/server/chunks/packages_0e7q9u_._.js +3 -0
- package/app/apps/web/.next/server/chunks/packages_0n6p2ot._.js +3 -0
- package/app/apps/web/.next/server/chunks/packages_entries_dist_node_0bckr7-.js +379 -0
- package/app/apps/web/.next/server/chunks/packages_parser_dist_fs_0bc7ptm.js +1 -1
- package/app/apps/web/.next/server/chunks/ssr/[root-of-the-server]__0-1_njm._.js +3 -0
- package/app/apps/web/.next/server/chunks/ssr/[root-of-the-server]__0-94ji~._.js +3 -0
- package/app/apps/web/.next/server/chunks/ssr/{[root-of-the-server]__13xpdx0._.js → [root-of-the-server]__03uoeiw._.js} +2 -2
- package/app/apps/web/.next/server/chunks/ssr/[root-of-the-server]__0_6.inc._.js +1 -1
- package/app/apps/web/.next/server/chunks/ssr/[root-of-the-server]__0d~2~le._.js +8 -0
- package/app/apps/web/.next/server/chunks/ssr/[root-of-the-server]__0gio_ck._.js +1 -1
- package/app/apps/web/.next/server/chunks/ssr/{[root-of-the-server]__08.d5ia._.js → [root-of-the-server]__0jdyefm._.js} +10 -10
- package/app/apps/web/.next/server/chunks/ssr/[root-of-the-server]__0ln9jsw._.js +3 -0
- package/app/apps/web/.next/server/chunks/ssr/{[root-of-the-server]__0z45d0g._.js → [root-of-the-server]__0lz4a~g._.js} +2 -48
- package/app/apps/web/.next/server/chunks/ssr/[root-of-the-server]__0o1_g.~._.js +3 -0
- package/app/apps/web/.next/server/chunks/ssr/[root-of-the-server]__0r4tks8._.js +3 -0
- package/app/apps/web/.next/server/chunks/ssr/[root-of-the-server]__0rvzdnx._.js +3 -0
- package/app/apps/web/.next/server/chunks/ssr/{[root-of-the-server]__0euu8sa._.js → [root-of-the-server]__0u39afl._.js} +2 -2
- package/app/apps/web/.next/server/chunks/ssr/[root-of-the-server]__0u5d7de._.js +12 -0
- package/app/apps/web/.next/server/chunks/ssr/[root-of-the-server]__0w52fbc._.js +3 -3
- package/app/apps/web/.next/server/chunks/ssr/[root-of-the-server]__0wwa6gh._.js +3 -0
- package/app/apps/web/.next/server/chunks/ssr/[root-of-the-server]__0xy1qim._.js +3 -0
- package/app/apps/web/.next/server/chunks/ssr/[root-of-the-server]__0~_8vff._.js +3 -0
- package/app/apps/web/.next/server/chunks/ssr/[root-of-the-server]__10srpu0._.js +3 -0
- package/app/apps/web/.next/server/chunks/ssr/[root-of-the-server]__11v.eqw._.js +1 -1
- package/app/apps/web/.next/server/chunks/ssr/_02s1n-x._.js +8 -0
- package/app/apps/web/.next/server/chunks/ssr/_0fjbf--._.js +3 -0
- package/app/apps/web/.next/server/chunks/ssr/_0jw2sm7._.js +3 -0
- package/app/apps/web/.next/server/chunks/ssr/_0wj750k._.js +3 -0
- package/app/apps/web/.next/server/chunks/ssr/_0woap-3._.js +1 -1
- package/app/apps/web/.next/server/chunks/ssr/{_0xies90._.js → _0xu2pvc._.js} +2 -2
- package/app/apps/web/.next/server/chunks/ssr/apps_web__next-internal_server_app_day_[date]_page_actions_0u2kxb..js +3 -0
- package/app/apps/web/.next/server/chunks/ssr/apps_web__next-internal_server_app_day_page_actions_1042maj.js +3 -0
- package/app/apps/web/.next/server/chunks/ssr/apps_web__next-internal_server_app_digest_[date]_page_actions_0olu967.js +3 -0
- package/app/apps/web/.next/server/chunks/ssr/apps_web__next-internal_server_app_digest_page_actions_0bl.eil.js +3 -0
- package/app/apps/web/.next/server/chunks/ssr/apps_web__next-internal_server_app_runs_page_actions_0485qy7.js +3 -0
- package/app/apps/web/.next/server/chunks/ssr/apps_web__next-internal_server_app_settings_page_actions_0f6epye.js +3 -0
- package/app/apps/web/.next/server/chunks/ssr/apps_web_app_day_[date]_day-view_tsx_0wjoe1u._.js +3 -0
- package/app/apps/web/.next/server/chunks/ssr/apps_web_app_settings_ai-features-form_tsx_01p699p._.js +3 -0
- package/app/apps/web/.next/server/chunks/ssr/apps_web_components_0b-4-4j._.js +1 -1
- package/app/apps/web/.next/server/chunks/ssr/apps_web_components_0ly1xes._.js +6 -0
- package/app/apps/web/.next/server/chunks/ssr/apps_web_components_0txtsv5._.js +16 -0
- package/app/apps/web/.next/server/chunks/ssr/apps_web_components_0xs658s._.js +10 -0
- package/app/apps/web/.next/server/chunks/ssr/apps_web_components_runs-live-board_tsx_0r6dkdq._.js +3 -0
- package/app/apps/web/.next/server/chunks/ssr/apps_web_components_usage-charts-dashboard_tsx_0bgr_uv._.js +1 -1
- package/app/apps/web/.next/server/chunks/ssr/apps_web_lib_usage-data_ts_0xtv99n._.js +3 -0
- package/app/apps/web/.next/server/chunks/ssr/node_modules_0i2xw~e._.js +3 -0
- package/app/apps/web/.next/server/chunks/ssr/node_modules_next_dist_0e1izl_._.js +1 -1
- package/app/apps/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0d3d4wn.js +4 -0
- package/app/apps/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0edz1ko.js +4 -0
- package/app/apps/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0eq.n-n.js +4 -0
- package/app/apps/web/.next/server/chunks/ssr/{node_modules_next_dist_esm_build_templates_app-page_0vz7_px.js → node_modules_next_dist_esm_build_templates_app-page_0hcvt-s.js} +3 -3
- package/app/apps/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0nd5zu0.js +4 -0
- package/app/apps/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_11j1qy0.js +4 -0
- package/app/apps/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_12n1lw_.js +1 -1
- package/app/apps/web/.next/server/chunks/ssr/packages_entries_dist_node_0_271yr.js +3 -0
- package/app/apps/web/.next/server/chunks/ssr/packages_parser_dist_0-jvt~a._.js +1 -1
- package/app/apps/web/.next/server/functions-config-manifest.json +11 -6
- package/app/apps/web/.next/server/middleware-build-manifest.js +7 -7
- package/app/apps/web/.next/server/pages/500.html +1 -1
- package/app/apps/web/.next/server/server-reference-manifest.js +1 -1
- package/app/apps/web/.next/server/server-reference-manifest.json +1 -1
- package/app/apps/web/.next/static/chunks/0-yc2_pjxwwuq.js +1 -0
- package/app/apps/web/.next/static/chunks/0257pdz1-imal.js +2 -0
- package/app/apps/web/.next/static/chunks/05m.oz3kmf1p7.js +1 -0
- package/app/apps/web/.next/static/chunks/{0pqt~8bl3ukh4.js → 073081qv4uyn8.js} +1 -1
- package/app/apps/web/.next/static/chunks/{0018dy-m-kusj.js → 07lbm-sdh9c2j.js} +1 -1
- package/app/apps/web/.next/static/chunks/0858bgw2i4vob.js +1 -0
- package/app/apps/web/.next/static/chunks/0_7303jr0sf0w.js +10 -0
- package/app/apps/web/.next/static/chunks/0byz8fqw.exef.js +1 -0
- package/app/apps/web/.next/static/chunks/0coa1800xqgfj.js +1 -0
- package/app/apps/web/.next/static/chunks/0fs3gxea5h0s3.css +1 -0
- package/app/apps/web/.next/static/chunks/0k1psab.bybh9.js +14 -0
- package/app/apps/web/.next/static/chunks/0k9pksi_i.odf.js +1 -0
- package/app/apps/web/.next/static/chunks/0m62vx92~0_0d.js +1 -0
- package/app/apps/web/.next/static/chunks/0mc8aa8z.0-5l.js +8 -0
- package/app/apps/web/.next/static/chunks/0mykrrv810ra-.js +31 -0
- package/app/apps/web/.next/static/chunks/0o9ayt8sknubd.js +1 -0
- package/app/apps/web/.next/static/chunks/0osdgl2.9cl1q.js +6 -0
- package/app/apps/web/.next/static/chunks/0xfu09fn_358k.js +4 -0
- package/app/apps/web/.next/static/chunks/171za22fv684..js +6 -0
- package/app/apps/web/.next/static/chunks/17u2ww8ya5dv1.js +6 -0
- package/app/apps/web/.next/static/chunks/{turbopack-169w-1._23ra_.js → turbopack-0_p36yduv.waj.js} +1 -1
- package/app/apps/web/app/api/digest/day/[date]/route.ts +152 -0
- package/app/apps/web/app/api/digest/month/[yearMonth]/route.ts +147 -0
- package/app/apps/web/app/api/digest/month-index/route.ts +103 -0
- package/app/apps/web/app/api/digest/week/[startDate]/route.ts +149 -0
- package/app/apps/web/app/api/{insights/weeks-index → digest/week-index}/route.ts +45 -33
- package/app/apps/web/app/api/jobs/route.ts +8 -0
- package/app/apps/web/app/api/runs/[runId]/route.ts +64 -0
- package/app/apps/web/app/api/runs/[runId]/stream/route.ts +154 -0
- package/app/apps/web/app/api/runs/route.ts +266 -0
- package/app/apps/web/app/api/settings/route.ts +35 -0
- package/app/apps/web/app/day/[date]/day-view.tsx +193 -0
- package/app/apps/web/app/day/[date]/page.tsx +175 -0
- package/app/apps/web/app/day/page.tsx +8 -0
- package/app/apps/web/app/digest/[date]/page.tsx +15 -0
- package/app/apps/web/app/digest/page.tsx +7 -0
- package/app/apps/web/app/insights/[key]/page.tsx +106 -48
- package/app/apps/web/app/insights/page.tsx +133 -3
- package/app/apps/web/app/layout.tsx +23 -3
- package/app/apps/web/app/page.tsx +33 -4
- package/app/apps/web/app/parallelism/gantt-chart.tsx +67 -1
- package/app/apps/web/app/parallelism/page.tsx +8 -278
- package/app/apps/web/app/projects/[slug]/page.tsx +153 -0
- package/app/apps/web/app/projects/page.tsx +49 -4
- package/app/apps/web/app/projects/projects-view.tsx +79 -68
- package/app/apps/web/app/runs/page.tsx +21 -0
- package/app/apps/web/app/sessions/[id]/page.tsx +12 -1
- package/app/apps/web/app/sessions/[id]/session-view.tsx +569 -21
- package/app/apps/web/app/sessions/page.tsx +19 -3
- package/app/apps/web/app/sessions/sessions-grid.tsx +172 -131
- package/app/apps/web/app/settings/ai-features-form.tsx +45 -0
- package/app/apps/web/app/settings/page.tsx +20 -0
- package/app/apps/web/app/usage/page.tsx +45 -3
- package/app/apps/web/components/auto-generate-yesterday.tsx +96 -0
- package/app/apps/web/components/backfill-drawer.tsx +309 -0
- package/app/apps/web/components/dashboard-view.tsx +4 -2
- package/app/apps/web/components/date-nav.tsx +385 -0
- package/app/apps/web/components/day-digest-view.tsx +180 -0
- package/app/apps/web/components/day-digest.tsx +489 -0
- package/app/apps/web/components/flag-chip.tsx +54 -0
- package/app/apps/web/components/goal-bar.tsx +63 -0
- package/app/apps/web/components/heatmap.tsx +78 -1
- package/app/apps/web/components/helpfulness-sparkline.tsx +82 -0
- package/app/apps/web/components/insights-history.tsx +211 -0
- package/app/apps/web/components/insights-top-bar.tsx +216 -0
- package/app/apps/web/components/job-queue-widget.tsx +274 -0
- package/app/apps/web/components/live-sessions-widget.tsx +38 -3
- package/app/apps/web/components/month-digest-view.tsx +138 -0
- package/app/apps/web/components/month-digest.tsx +216 -0
- package/app/apps/web/components/outcome-mix-row.tsx +37 -0
- package/app/apps/web/components/outcome-pill.tsx +101 -0
- package/app/apps/web/components/previous-cycles-trend.tsx +155 -0
- package/app/apps/web/components/recent-days-panel.tsx +83 -0
- package/app/apps/web/components/runs-live-board.tsx +513 -0
- package/app/apps/web/components/sidebar.tsx +38 -4
- package/app/apps/web/components/usage-chart-range.tsx +58 -6
- package/app/apps/web/components/usage-chart.tsx +94 -7
- package/app/apps/web/components/usage-charts-dashboard.tsx +20 -1
- package/app/apps/web/components/week-digest-view.tsx +226 -0
- package/app/apps/web/components/week-digest.tsx +2128 -0
- package/app/apps/web/components/yesterday-hero.tsx +110 -0
- package/app/apps/web/lib/auto-week-fire.ts +37 -0
- package/app/apps/web/lib/calibration-data.ts +171 -0
- package/app/apps/web/lib/entries-index.ts +174 -0
- package/app/apps/web/lib/entries.ts +72 -0
- package/app/apps/web/lib/inflight-coalesce.test.ts +43 -0
- package/app/apps/web/lib/inflight-coalesce.ts +19 -0
- package/app/apps/web/lib/jobs.ts +170 -0
- package/app/apps/web/lib/usage-data.ts +37 -0
- package/app/apps/web/lib/validate-settings.test.ts +25 -0
- package/app/apps/web/lib/validate-settings.ts +9 -0
- package/app/apps/web/next.config.ts +1 -1
- package/app/apps/web/package.json +4 -2
- package/app/apps/web/server.js +1 -1
- package/app/apps/web/tsconfig.tsbuildinfo +1 -1
- package/app/apps/web/vitest.config.ts +9 -0
- package/dist/daemon-worker.js +1758 -713
- package/dist/index.js +11308 -1888
- package/package.json +4 -1
- package/app/apps/web/.next/server/app/api/insights/months-index/route/app-paths-manifest.json +0 -3
- package/app/apps/web/.next/server/app/api/insights/months-index/route.js +0 -7
- package/app/apps/web/.next/server/app/api/insights/months-index/route_client-reference-manifest.js +0 -3
- package/app/apps/web/.next/server/app/api/insights/pdf/[key]/route/app-paths-manifest.json +0 -3
- package/app/apps/web/.next/server/app/api/insights/pdf/[key]/route.js +0 -6
- package/app/apps/web/.next/server/app/api/insights/route/app-paths-manifest.json +0 -3
- package/app/apps/web/.next/server/app/api/insights/route.js +0 -8
- package/app/apps/web/.next/server/app/api/insights/saved/[key]/route/app-paths-manifest.json +0 -3
- package/app/apps/web/.next/server/app/api/insights/saved/[key]/route.js +0 -6
- package/app/apps/web/.next/server/app/api/insights/saved/[key]/route_client-reference-manifest.js +0 -3
- package/app/apps/web/.next/server/app/api/insights/saved/route/app-paths-manifest.json +0 -3
- package/app/apps/web/.next/server/app/api/insights/saved/route.js +0 -6
- package/app/apps/web/.next/server/app/api/insights/saved/route_client-reference-manifest.js +0 -3
- package/app/apps/web/.next/server/app/api/insights/weeks-index/route/app-paths-manifest.json +0 -3
- package/app/apps/web/.next/server/app/api/insights/weeks-index/route.js +0 -7
- package/app/apps/web/.next/server/app/api/insights/weeks-index/route_client-reference-manifest.js +0 -3
- package/app/apps/web/.next/server/app/insights/print/[key]/page/app-paths-manifest.json +0 -3
- package/app/apps/web/.next/server/app/insights/print/[key]/page.js.nft.json +0 -1
- package/app/apps/web/.next/server/app/insights/print/[key]/page_client-reference-manifest.js +0 -3
- package/app/apps/web/.next/server/chunks/02dz_web__next-internal_server_app_api_insights_months-index_route_actions_0~h~zci.js +0 -3
- package/app/apps/web/.next/server/chunks/02dz_web__next-internal_server_app_api_insights_saved_[key]_route_actions_0a5j9yw.js +0 -3
- package/app/apps/web/.next/server/chunks/02dz_web__next-internal_server_app_api_insights_weeks-index_route_actions_0hh-1c7.js +0 -3
- package/app/apps/web/.next/server/chunks/[root-of-the-server]__0.hmj0z._.js +0 -3
- package/app/apps/web/.next/server/chunks/[root-of-the-server]__01h_g-p._.js +0 -3
- package/app/apps/web/.next/server/chunks/[root-of-the-server]__0nh-z10._.js +0 -3
- package/app/apps/web/.next/server/chunks/[root-of-the-server]__0ri7q~r._.js +0 -3
- package/app/apps/web/.next/server/chunks/[root-of-the-server]__0rr1~~x._.js +0 -3
- package/app/apps/web/.next/server/chunks/[root-of-the-server]__0s0gv.0._.js +0 -3
- package/app/apps/web/.next/server/chunks/apps_web__next-internal_server_app_api_insights_pdf_[key]_route_actions_0lu-lnx.js +0 -3
- package/app/apps/web/.next/server/chunks/apps_web__next-internal_server_app_api_insights_route_actions_0h8l5lz.js +0 -3
- package/app/apps/web/.next/server/chunks/apps_web__next-internal_server_app_api_insights_saved_route_actions_13rlblw.js +0 -3
- package/app/apps/web/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_00t2xj6.js +0 -68
- package/app/apps/web/.next/server/chunks/ssr/[root-of-the-server]__0.tsxpj._.js +0 -3
- package/app/apps/web/.next/server/chunks/ssr/[root-of-the-server]__00z7zlm._.js +0 -3
- package/app/apps/web/.next/server/chunks/ssr/[root-of-the-server]__08pen0k._.js +0 -3
- package/app/apps/web/.next/server/chunks/ssr/[root-of-the-server]__0b323~k._.js +0 -8
- package/app/apps/web/.next/server/chunks/ssr/[root-of-the-server]__0gx-4qa._.js +0 -3
- package/app/apps/web/.next/server/chunks/ssr/[root-of-the-server]__0wv27wt._.js +0 -3
- package/app/apps/web/.next/server/chunks/ssr/[root-of-the-server]__13itnvx._.js +0 -3
- package/app/apps/web/.next/server/chunks/ssr/_09n75_5._.js +0 -8
- package/app/apps/web/.next/server/chunks/ssr/_0r~__0v._.js +0 -12
- package/app/apps/web/.next/server/chunks/ssr/apps_web__next-internal_server_app_insights_print_[key]_page_actions_0a853fw.js +0 -3
- package/app/apps/web/.next/server/chunks/ssr/apps_web_app_parallelism_08vub.0._.js +0 -3
- package/app/apps/web/.next/server/chunks/ssr/apps_web_components_06j3c.0._.js +0 -8
- package/app/apps/web/.next/server/chunks/ssr/apps_web_components_0bbo_pd._.js +0 -8
- package/app/apps/web/.next/server/chunks/ssr/apps_web_components_insight-report_tsx_13q2a-c._.js +0 -12
- package/app/apps/web/.next/server/chunks/ssr/apps_web_components_insights-view_tsx_11730ta._.js +0 -6
- package/app/apps/web/.next/server/chunks/ssr/node_modules_lucide-react_dist_esm_icons_0nqz8dw._.js +0 -3
- package/app/apps/web/.next/server/chunks/ssr/node_modules_next_dist_0t-hj0x._.js +0 -3
- package/app/apps/web/.next/server/chunks/ssr/packages_parser_dist_analytics_0k4dgst.js +0 -3
- package/app/apps/web/.next/static/chunks/028_pmk40b69_.js +0 -6
- package/app/apps/web/.next/static/chunks/03.mv4y4.w-vb.js +0 -6
- package/app/apps/web/.next/static/chunks/03_7xtpi9sv4g.js +0 -4
- package/app/apps/web/.next/static/chunks/03g5dw5eskotd.js +0 -6
- package/app/apps/web/.next/static/chunks/063oimt30jeo9.js +0 -10
- package/app/apps/web/.next/static/chunks/08c1pcrocqq5s.js +0 -6
- package/app/apps/web/.next/static/chunks/0e-wrhqh4h3r5.js +0 -2
- package/app/apps/web/.next/static/chunks/0fc6dk2qtokwh.js +0 -1
- package/app/apps/web/.next/static/chunks/0i7er7_bfab36.js +0 -10
- package/app/apps/web/.next/static/chunks/0ipytyi01h0ta.js +0 -1
- package/app/apps/web/.next/static/chunks/0lsznd4_avzhv.js +0 -6
- package/app/apps/web/.next/static/chunks/0lty3v_i9mde7.js +0 -1
- package/app/apps/web/.next/static/chunks/0vekjjj4pidlz.css +0 -1
- package/app/apps/web/.next/static/chunks/137uw2-qbro07.js +0 -31
- package/app/apps/web/app/api/insights/months-index/route.ts +0 -80
- package/app/apps/web/app/api/insights/pdf/[key]/route.ts +0 -45
- package/app/apps/web/app/api/insights/route.ts +0 -508
- package/app/apps/web/app/api/insights/saved/[key]/route.ts +0 -11
- package/app/apps/web/app/api/insights/saved/route.ts +0 -9
- package/app/apps/web/app/insights/print/[key]/page.tsx +0 -73
- package/app/apps/web/components/insight-report.tsx +0 -1031
- package/app/apps/web/components/insights-view.tsx +0 -647
- package/app/apps/web/lib/ai/insights-prompt.ts +0 -71
- package/app/apps/web/lib/ai/saved-reports.ts +0 -83
- /package/app/apps/web/.next/server/app/api/{insights/months-index → digest/day/[date]}/route/build-manifest.json +0 -0
- /package/app/apps/web/.next/server/app/api/{insights/months-index → digest/day/[date]}/route/server-reference-manifest.json +0 -0
- /package/app/apps/web/.next/server/app/api/{insights/months-index → digest/day/[date]}/route.js.map +0 -0
- /package/app/apps/web/.next/server/app/api/{insights → digest/month/[yearMonth]}/route/build-manifest.json +0 -0
- /package/app/apps/web/.next/server/app/api/{insights → digest/month/[yearMonth]}/route/server-reference-manifest.json +0 -0
- /package/app/apps/web/.next/server/app/api/{insights → digest/month/[yearMonth]}/route.js.map +0 -0
- /package/app/apps/web/.next/server/app/api/{insights/pdf/[key] → digest/month-index}/route/build-manifest.json +0 -0
- /package/app/apps/web/.next/server/app/api/{insights/pdf/[key] → digest/month-index}/route/server-reference-manifest.json +0 -0
- /package/app/apps/web/.next/server/app/api/{insights/pdf/[key] → digest/month-index}/route.js.map +0 -0
- /package/app/apps/web/.next/server/app/api/{insights/saved → digest/week/[startDate]}/route/build-manifest.json +0 -0
- /package/app/apps/web/.next/server/app/api/{insights/saved → digest/week/[startDate]}/route/server-reference-manifest.json +0 -0
- /package/app/apps/web/.next/server/app/api/{insights/saved → digest/week/[startDate]}/route.js.map +0 -0
- /package/app/apps/web/.next/server/app/api/{insights/saved/[key] → digest/week-index}/route/build-manifest.json +0 -0
- /package/app/apps/web/.next/server/app/api/{insights/saved/[key] → digest/week-index}/route/server-reference-manifest.json +0 -0
- /package/app/apps/web/.next/server/app/api/{insights/saved/[key] → digest/week-index}/route.js.map +0 -0
- /package/app/apps/web/.next/server/app/api/{insights/weeks-index → jobs}/route/build-manifest.json +0 -0
- /package/app/apps/web/.next/server/app/api/{insights/weeks-index → jobs}/route/server-reference-manifest.json +0 -0
- /package/app/apps/web/.next/server/app/api/{insights/weeks-index → jobs}/route.js.map +0 -0
- /package/app/apps/web/.next/server/app/{insights/print/[key]/page → api/runs/[runId]/route}/server-reference-manifest.json +0 -0
- /package/app/apps/web/.next/server/app/{insights/print/[key]/page.js.map → api/runs/[runId]/route.js.map} +0 -0
- /package/app/apps/web/.next/server/app/{insights/print/[key] → day/[date]}/page/next-font-manifest.json +0 -0
- /package/app/apps/web/.next/server/app/{insights/print/[key] → day/[date]}/page/react-loadable-manifest.json +0 -0
- /package/app/apps/web/.next/static/{G_4ofKI9v9ARC_lb9JILZ → 8tTWPvUhtatZEoocIhamh}/_buildManifest.js +0 -0
- /package/app/apps/web/.next/static/{G_4ofKI9v9ARC_lb9JILZ → 8tTWPvUhtatZEoocIhamh}/_clientMiddlewareManifest.js +0 -0
- /package/app/apps/web/.next/static/{G_4ofKI9v9ARC_lb9JILZ → 8tTWPvUhtatZEoocIhamh}/_ssgManifest.js +0 -0
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { calendarMonth, priorCalendarMonth } from "@claude-lens/parser";
|
|
2
|
+
import { listEntryKeys, listMonthDigestKeys, readMonthDigest } from "@claude-lens/entries/fs";
|
|
3
|
+
import { parseEntryKey } from "@claude-lens/entries";
|
|
4
|
+
|
|
5
|
+
export const dynamic = "force-dynamic";
|
|
6
|
+
export const runtime = "nodejs";
|
|
7
|
+
|
|
8
|
+
type MonthRow = {
|
|
9
|
+
year: number;
|
|
10
|
+
month: number;
|
|
11
|
+
start: string;
|
|
12
|
+
end: string;
|
|
13
|
+
label: string;
|
|
14
|
+
active_days: number;
|
|
15
|
+
in_progress: boolean;
|
|
16
|
+
saved_key: string | null;
|
|
17
|
+
headline: string | null;
|
|
18
|
+
shipped_count: number;
|
|
19
|
+
agent_min: number;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
function isoDay(d: Date): string {
|
|
23
|
+
const y = d.getFullYear();
|
|
24
|
+
const m = String(d.getMonth() + 1).padStart(2, "0");
|
|
25
|
+
const day = String(d.getDate()).padStart(2, "0");
|
|
26
|
+
return `${y}-${m}-${day}`;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
function yearMonthKey(start: Date): string {
|
|
30
|
+
const y = start.getFullYear();
|
|
31
|
+
const m = String(start.getMonth() + 1).padStart(2, "0");
|
|
32
|
+
return `${y}-${m}`;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
function label(start: Date): string {
|
|
36
|
+
return start.toLocaleDateString("en-US", { month: "long", year: "numeric" });
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export async function GET(req: Request) {
|
|
40
|
+
const url = new URL(req.url);
|
|
41
|
+
const count = Math.min(12, Math.max(1, parseInt(url.searchParams.get("count") ?? "6", 10)));
|
|
42
|
+
|
|
43
|
+
const cachedKeys = new Set(listMonthDigestKeys());
|
|
44
|
+
|
|
45
|
+
const entryDays = new Set<string>();
|
|
46
|
+
for (const key of listEntryKeys()) {
|
|
47
|
+
const parsed = parseEntryKey(key);
|
|
48
|
+
if (parsed) entryDays.add(parsed.local_day);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
const current = calendarMonth();
|
|
52
|
+
const prior = priorCalendarMonth();
|
|
53
|
+
|
|
54
|
+
const months: MonthRow[] = [];
|
|
55
|
+
for (let i = 0; i < count; i++) {
|
|
56
|
+
let start: Date, end: Date, in_progress: boolean;
|
|
57
|
+
if (i === 0) {
|
|
58
|
+
start = current.start; end = current.end; in_progress = true;
|
|
59
|
+
} else {
|
|
60
|
+
const refMonth = new Date(prior.start);
|
|
61
|
+
refMonth.setMonth(refMonth.getMonth() - (i - 1));
|
|
62
|
+
start = new Date(refMonth.getFullYear(), refMonth.getMonth(), 1);
|
|
63
|
+
end = new Date(refMonth.getFullYear(), refMonth.getMonth() + 1, 0);
|
|
64
|
+
in_progress = false;
|
|
65
|
+
}
|
|
66
|
+
let active_days = 0;
|
|
67
|
+
const cursor = new Date(start);
|
|
68
|
+
while (cursor.getTime() <= end.getTime()) {
|
|
69
|
+
if (entryDays.has(isoDay(cursor))) active_days++;
|
|
70
|
+
cursor.setDate(cursor.getDate() + 1);
|
|
71
|
+
}
|
|
72
|
+
const ymKey = yearMonthKey(start);
|
|
73
|
+
const savedKey = cachedKeys.has(ymKey) ? `month-${ymKey}` : null;
|
|
74
|
+
|
|
75
|
+
let headline: string | null = null;
|
|
76
|
+
let shipped_count = 0;
|
|
77
|
+
let agent_min = 0;
|
|
78
|
+
if (savedKey) {
|
|
79
|
+
const digest = readMonthDigest(ymKey);
|
|
80
|
+
if (digest) {
|
|
81
|
+
headline = digest.headline;
|
|
82
|
+
shipped_count = digest.shipped.length;
|
|
83
|
+
agent_min = Math.round(digest.agent_min_total);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
months.push({
|
|
88
|
+
year: start.getFullYear(),
|
|
89
|
+
month: start.getMonth() + 1,
|
|
90
|
+
start: isoDay(start),
|
|
91
|
+
end: isoDay(end),
|
|
92
|
+
label: label(start),
|
|
93
|
+
active_days,
|
|
94
|
+
in_progress,
|
|
95
|
+
saved_key: savedKey,
|
|
96
|
+
headline,
|
|
97
|
+
shipped_count,
|
|
98
|
+
agent_min,
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
return Response.json({ months });
|
|
103
|
+
}
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
import {
|
|
2
|
+
runWeekDigestPipeline, readSettings,
|
|
3
|
+
readWeekDigest, getCurrentWeekDigestFromCache,
|
|
4
|
+
} from "@claude-lens/entries/node";
|
|
5
|
+
import type { PipelineEvent } from "@claude-lens/entries/node";
|
|
6
|
+
import { InflightCoalescer } from "@/lib/inflight-coalesce";
|
|
7
|
+
import { asMonday, currentWeekMonday, todayLocal } from "@/lib/entries";
|
|
8
|
+
import { registerJob, updateJob, completeJob, failJob } from "@/lib/jobs";
|
|
9
|
+
|
|
10
|
+
export const runtime = "nodejs";
|
|
11
|
+
export const dynamic = "force-dynamic";
|
|
12
|
+
|
|
13
|
+
type Params = { params: Promise<{ startDate: string }> };
|
|
14
|
+
|
|
15
|
+
const coalescer = new InflightCoalescer<string, void>();
|
|
16
|
+
|
|
17
|
+
function updateJobFromEvent(jobId: string, ev: PipelineEvent): void {
|
|
18
|
+
if (ev.type === "status") {
|
|
19
|
+
updateJob(jobId, { progress: { phase: ev.phase, text: ev.text } });
|
|
20
|
+
} else if (ev.type === "entry") {
|
|
21
|
+
updateJob(jobId, { progress: { phase: "enrich", index: ev.index, total: ev.total } });
|
|
22
|
+
} else if (ev.type === "progress") {
|
|
23
|
+
updateJob(jobId, { progress: { phase: ev.phase, bytes: ev.bytes } });
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export async function GET(_req: Request, ctx: Params) {
|
|
28
|
+
const { startDate } = await ctx.params;
|
|
29
|
+
const monday = asMonday(startDate);
|
|
30
|
+
if (!monday) {
|
|
31
|
+
return new Response(JSON.stringify({ error: "invalid Monday date" }), {
|
|
32
|
+
status: 400, headers: { "content-type": "application/json" },
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
const today = todayLocal();
|
|
36
|
+
if (monday > today) {
|
|
37
|
+
return new Response(JSON.stringify({ error: "future date" }), { status: 400 });
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
const isCurrent = monday === currentWeekMonday();
|
|
41
|
+
if (isCurrent) {
|
|
42
|
+
const cached = getCurrentWeekDigestFromCache(monday, Date.now());
|
|
43
|
+
if (cached) {
|
|
44
|
+
return new Response(JSON.stringify(cached), {
|
|
45
|
+
status: 200, headers: { "content-type": "application/json" },
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
return new Response(JSON.stringify({ pending: true, current: true }), {
|
|
49
|
+
status: 200, headers: { "content-type": "application/json" },
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
const cached = readWeekDigest(monday);
|
|
54
|
+
if (cached) {
|
|
55
|
+
return new Response(JSON.stringify(cached), {
|
|
56
|
+
status: 200, headers: { "content-type": "application/json" },
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
return new Response(JSON.stringify({ pending: true }), {
|
|
60
|
+
status: 200, headers: { "content-type": "application/json" },
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export async function POST(req: Request, ctx: Params) {
|
|
65
|
+
const { startDate } = await ctx.params;
|
|
66
|
+
const monday = asMonday(startDate);
|
|
67
|
+
if (!monday) {
|
|
68
|
+
return new Response(JSON.stringify({ error: "invalid Monday date" }), { status: 400 });
|
|
69
|
+
}
|
|
70
|
+
if (monday > todayLocal()) {
|
|
71
|
+
return new Response(JSON.stringify({ error: "future date" }), { status: 400 });
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
const url = new URL(req.url);
|
|
75
|
+
const force = url.searchParams.get("force") === "1";
|
|
76
|
+
const key = `week|${monday}|${force ? 1 : 0}`;
|
|
77
|
+
|
|
78
|
+
const encoder = new TextEncoder();
|
|
79
|
+
const settings = readSettings();
|
|
80
|
+
|
|
81
|
+
const stream = new ReadableStream({
|
|
82
|
+
async start(controller) {
|
|
83
|
+
let closed = false;
|
|
84
|
+
function send(event: PipelineEvent) {
|
|
85
|
+
if (closed) return;
|
|
86
|
+
try {
|
|
87
|
+
controller.enqueue(
|
|
88
|
+
encoder.encode(`event: ${event.type}\ndata: ${JSON.stringify(event)}\n\n`),
|
|
89
|
+
);
|
|
90
|
+
} catch {
|
|
91
|
+
closed = true;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
function finish() {
|
|
95
|
+
if (!closed) {
|
|
96
|
+
try { controller.close(); } catch { /* ignore */ }
|
|
97
|
+
closed = true;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
const alreadyInflight = coalescer.inflight(key);
|
|
102
|
+
let jobId: string | null = null;
|
|
103
|
+
|
|
104
|
+
try {
|
|
105
|
+
await coalescer.run(key, async () => {
|
|
106
|
+
if (alreadyInflight) return;
|
|
107
|
+
jobId = registerJob({
|
|
108
|
+
kind: "weekly.synth",
|
|
109
|
+
label: `Week digest · ${monday}`,
|
|
110
|
+
target: monday,
|
|
111
|
+
caller: "user",
|
|
112
|
+
});
|
|
113
|
+
updateJob(jobId, { status: "running" });
|
|
114
|
+
for await (const ev of runWeekDigestPipeline(monday, {
|
|
115
|
+
settings: settings.ai_features,
|
|
116
|
+
force,
|
|
117
|
+
currentWeekMonday: currentWeekMonday(),
|
|
118
|
+
todayLocalDay: todayLocal(),
|
|
119
|
+
})) {
|
|
120
|
+
send(ev);
|
|
121
|
+
if (jobId) updateJobFromEvent(jobId, ev);
|
|
122
|
+
}
|
|
123
|
+
if (jobId) completeJob(jobId, `/insights/week-${monday}`);
|
|
124
|
+
});
|
|
125
|
+
|
|
126
|
+
if (alreadyInflight) {
|
|
127
|
+
const d = readWeekDigest(monday) ?? getCurrentWeekDigestFromCache(monday, Date.now());
|
|
128
|
+
if (d) send({ type: "digest", digest: d });
|
|
129
|
+
send({ type: "status", phase: "persist", text: "coalesced with in-flight request" });
|
|
130
|
+
}
|
|
131
|
+
} catch (err) {
|
|
132
|
+
send({ type: "error", message: (err as Error).message });
|
|
133
|
+
if (jobId) failJob(jobId, (err as Error).message);
|
|
134
|
+
} finally {
|
|
135
|
+
try { controller.enqueue(encoder.encode(`event: done\ndata: {}\n\n`)); } catch { /* ignore */ }
|
|
136
|
+
finish();
|
|
137
|
+
}
|
|
138
|
+
},
|
|
139
|
+
});
|
|
140
|
+
|
|
141
|
+
return new Response(stream, {
|
|
142
|
+
headers: {
|
|
143
|
+
"Content-Type": "text/event-stream",
|
|
144
|
+
"Cache-Control": "no-cache, no-transform",
|
|
145
|
+
Connection: "keep-alive",
|
|
146
|
+
"X-Accel-Buffering": "no",
|
|
147
|
+
},
|
|
148
|
+
});
|
|
149
|
+
}
|
|
@@ -1,31 +1,24 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Weeks index — drives the week picker in /insights.
|
|
3
|
-
*
|
|
4
|
-
* Returns the last N calendar weeks (Mon-Sun, newest first) with:
|
|
5
|
-
* - isoweek + period label
|
|
6
|
-
* - session count observed in that window (raw SessionMeta filter)
|
|
7
|
-
* - in_progress flag for this week
|
|
8
|
-
* - saved_key when a report exists on disk
|
|
9
|
-
* - archetype_label + sessions_used from the saved report, for display
|
|
10
|
-
*/
|
|
11
|
-
import { listSessions } from "@claude-lens/parser/fs";
|
|
12
1
|
import { calendarWeek, priorCalendarWeek } from "@claude-lens/parser";
|
|
13
|
-
import {
|
|
2
|
+
import { listEntryKeys, listWeekDigestKeys, readWeekDigest } from "@claude-lens/entries/fs";
|
|
3
|
+
import { parseEntryKey } from "@claude-lens/entries";
|
|
14
4
|
|
|
15
5
|
export const dynamic = "force-dynamic";
|
|
16
6
|
export const runtime = "nodejs";
|
|
17
7
|
|
|
18
8
|
type WeekRow = {
|
|
19
9
|
iso_week: number;
|
|
20
|
-
start: string;
|
|
10
|
+
start: string;
|
|
21
11
|
end: string;
|
|
22
|
-
label: string;
|
|
23
|
-
|
|
12
|
+
label: string;
|
|
13
|
+
/** Distinct local-days with at least one entry in this window.
|
|
14
|
+
* More accurate than session-firstTimestamp counts: a session that crosses
|
|
15
|
+
* midnight produces entries on both sides and counts in both periods. */
|
|
16
|
+
active_days: number;
|
|
24
17
|
in_progress: boolean;
|
|
25
18
|
saved_key: string | null;
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
19
|
+
headline: string | null;
|
|
20
|
+
shipped_count: number;
|
|
21
|
+
agent_min: number;
|
|
29
22
|
};
|
|
30
23
|
|
|
31
24
|
function isoDay(d: Date): string {
|
|
@@ -51,8 +44,15 @@ export async function GET(req: Request) {
|
|
|
51
44
|
const url = new URL(req.url);
|
|
52
45
|
const count = Math.min(26, Math.max(1, parseInt(url.searchParams.get("count") ?? "12", 10)));
|
|
53
46
|
|
|
54
|
-
const
|
|
55
|
-
|
|
47
|
+
const cachedKeys = new Set(listWeekDigestKeys());
|
|
48
|
+
|
|
49
|
+
// Bucket entry keys by local_day once so each window can sum in O(window_days)
|
|
50
|
+
// rather than re-scanning all entries.
|
|
51
|
+
const entryDays = new Set<string>();
|
|
52
|
+
for (const key of listEntryKeys()) {
|
|
53
|
+
const parsed = parseEntryKey(key);
|
|
54
|
+
if (parsed) entryDays.add(parsed.local_day);
|
|
55
|
+
}
|
|
56
56
|
|
|
57
57
|
const current = calendarWeek();
|
|
58
58
|
const prior = priorCalendarWeek();
|
|
@@ -68,26 +68,38 @@ export async function GET(req: Request) {
|
|
|
68
68
|
end = new Date(prior.end); end.setDate(prior.end.getDate() - offset);
|
|
69
69
|
in_progress = false;
|
|
70
70
|
}
|
|
71
|
-
|
|
72
|
-
const
|
|
73
|
-
|
|
74
|
-
if (
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
}).length;
|
|
71
|
+
let active_days = 0;
|
|
72
|
+
const cursor = new Date(start);
|
|
73
|
+
while (cursor.getTime() <= end.getTime()) {
|
|
74
|
+
if (entryDays.has(isoDay(cursor))) active_days++;
|
|
75
|
+
cursor.setDate(cursor.getDate() + 1);
|
|
76
|
+
}
|
|
78
77
|
const startKey = isoDay(start);
|
|
79
|
-
const
|
|
78
|
+
const savedKey = cachedKeys.has(startKey) ? `week-${startKey}` : null;
|
|
79
|
+
|
|
80
|
+
let headline: string | null = null;
|
|
81
|
+
let shipped_count = 0;
|
|
82
|
+
let agent_min = 0;
|
|
83
|
+
if (savedKey) {
|
|
84
|
+
const digest = readWeekDigest(startKey);
|
|
85
|
+
if (digest) {
|
|
86
|
+
headline = digest.headline;
|
|
87
|
+
shipped_count = digest.shipped.length;
|
|
88
|
+
agent_min = Math.round(digest.agent_min_total);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
80
92
|
weeks.push({
|
|
81
93
|
iso_week: isoWeekNo(start),
|
|
82
94
|
start: startKey,
|
|
83
95
|
end: isoDay(end),
|
|
84
96
|
label: label(start, end),
|
|
85
|
-
|
|
97
|
+
active_days,
|
|
86
98
|
in_progress,
|
|
87
|
-
saved_key:
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
99
|
+
saved_key: savedKey,
|
|
100
|
+
headline,
|
|
101
|
+
shipped_count,
|
|
102
|
+
agent_min,
|
|
91
103
|
});
|
|
92
104
|
}
|
|
93
105
|
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { existsSync, readFileSync, readdirSync, statSync } from "node:fs";
|
|
2
|
+
import { homedir } from "node:os";
|
|
3
|
+
import { join } from "node:path";
|
|
4
|
+
|
|
5
|
+
export const runtime = "nodejs";
|
|
6
|
+
export const dynamic = "force-dynamic";
|
|
7
|
+
|
|
8
|
+
const RUNS_DIR = join(homedir(), ".cclens", "llm-runs");
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* GET /api/runs/<runId> dump the full event trace
|
|
12
|
+
* GET /api/runs/latest shorthand: most recent trace
|
|
13
|
+
* GET /api/runs/<prefix> unique-prefix match if no exact runId match
|
|
14
|
+
*/
|
|
15
|
+
export async function GET(_req: Request, ctx: { params: Promise<{ runId: string }> }): Promise<Response> {
|
|
16
|
+
const { runId } = await ctx.params;
|
|
17
|
+
if (!existsSync(RUNS_DIR)) {
|
|
18
|
+
return new Response(JSON.stringify({ error: "no traces" }), { status: 404, headers: { "content-type": "application/json" } });
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
let path: string | null = null;
|
|
22
|
+
let resolvedId = runId;
|
|
23
|
+
|
|
24
|
+
if (runId === "latest") {
|
|
25
|
+
const all = readdirSync(RUNS_DIR)
|
|
26
|
+
.filter(f => f.endsWith(".jsonl"))
|
|
27
|
+
.map(f => ({ id: f.replace(/\.jsonl$/, ""), path: join(RUNS_DIR, f), mtime: statSync(join(RUNS_DIR, f)).mtimeMs }))
|
|
28
|
+
.sort((a, b) => b.mtime - a.mtime);
|
|
29
|
+
if (all.length === 0) {
|
|
30
|
+
return new Response(JSON.stringify({ error: "no traces" }), { status: 404, headers: { "content-type": "application/json" } });
|
|
31
|
+
}
|
|
32
|
+
path = all[0]!.path;
|
|
33
|
+
resolvedId = all[0]!.id;
|
|
34
|
+
} else {
|
|
35
|
+
const exact = join(RUNS_DIR, `${runId}.jsonl`);
|
|
36
|
+
if (existsSync(exact)) {
|
|
37
|
+
path = exact;
|
|
38
|
+
} else {
|
|
39
|
+
const matches = readdirSync(RUNS_DIR)
|
|
40
|
+
.filter(f => f.endsWith(".jsonl") && f.includes(runId))
|
|
41
|
+
.map(f => f.replace(/\.jsonl$/, ""));
|
|
42
|
+
if (matches.length === 1) {
|
|
43
|
+
path = join(RUNS_DIR, `${matches[0]}.jsonl`);
|
|
44
|
+
resolvedId = matches[0]!;
|
|
45
|
+
} else if (matches.length > 1) {
|
|
46
|
+
return new Response(JSON.stringify({ error: "ambiguous", matches }), { status: 400, headers: { "content-type": "application/json" } });
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
if (!path) {
|
|
52
|
+
return new Response(JSON.stringify({ error: "not found", runId }), { status: 404, headers: { "content-type": "application/json" } });
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
const lines = readFileSync(path, "utf-8").split("\n").filter(l => l.trim());
|
|
56
|
+
const events: unknown[] = lines.map(l => {
|
|
57
|
+
try { return JSON.parse(l); } catch { return { _raw: l }; }
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
return new Response(JSON.stringify({ run_id: resolvedId, events }, null, 2), {
|
|
61
|
+
status: 200,
|
|
62
|
+
headers: { "content-type": "application/json" },
|
|
63
|
+
});
|
|
64
|
+
}
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
import { existsSync, readdirSync, statSync, watch, openSync, readSync, closeSync } from "node:fs";
|
|
2
|
+
import { homedir } from "node:os";
|
|
3
|
+
import { join } from "node:path";
|
|
4
|
+
|
|
5
|
+
export const runtime = "nodejs";
|
|
6
|
+
export const dynamic = "force-dynamic";
|
|
7
|
+
|
|
8
|
+
const RUNS_DIR = join(homedir(), ".cclens", "llm-runs");
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* GET /api/runs/<runId>/stream → SSE tail of a per-run trace file
|
|
12
|
+
* GET /api/runs/latest/stream
|
|
13
|
+
* GET /api/runs/<prefix>/stream
|
|
14
|
+
*
|
|
15
|
+
* Emits one SSE message per JSONL line as the file grows, then closes when
|
|
16
|
+
* an end record (`_meta.type === "end"`) appears. Falls back to closing on
|
|
17
|
+
* 30s of inactivity if the writer dies.
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
function resolvePath(runId: string): { path: string; resolvedId: string } | { error: string; status: number; matches?: string[] } {
|
|
21
|
+
if (!existsSync(RUNS_DIR)) return { error: "no traces", status: 404 };
|
|
22
|
+
|
|
23
|
+
if (runId === "latest") {
|
|
24
|
+
const all = readdirSync(RUNS_DIR)
|
|
25
|
+
.filter(f => f.endsWith(".jsonl"))
|
|
26
|
+
.map(f => ({ id: f.replace(/\.jsonl$/, ""), path: join(RUNS_DIR, f), mtime: statSync(join(RUNS_DIR, f)).mtimeMs }))
|
|
27
|
+
.sort((a, b) => b.mtime - a.mtime);
|
|
28
|
+
if (all.length === 0) return { error: "no traces", status: 404 };
|
|
29
|
+
return { path: all[0]!.path, resolvedId: all[0]!.id };
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
const exact = join(RUNS_DIR, `${runId}.jsonl`);
|
|
33
|
+
if (existsSync(exact)) return { path: exact, resolvedId: runId };
|
|
34
|
+
|
|
35
|
+
const matches = readdirSync(RUNS_DIR)
|
|
36
|
+
.filter(f => f.endsWith(".jsonl") && f.includes(runId))
|
|
37
|
+
.map(f => f.replace(/\.jsonl$/, ""));
|
|
38
|
+
if (matches.length === 1) {
|
|
39
|
+
return { path: join(RUNS_DIR, `${matches[0]}.jsonl`), resolvedId: matches[0]! };
|
|
40
|
+
}
|
|
41
|
+
if (matches.length > 1) return { error: "ambiguous", status: 400, matches };
|
|
42
|
+
return { error: "not found", status: 404 };
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export async function GET(_req: Request, ctx: { params: Promise<{ runId: string }> }): Promise<Response> {
|
|
46
|
+
const { runId } = await ctx.params;
|
|
47
|
+
const r = resolvePath(runId);
|
|
48
|
+
if ("error" in r) {
|
|
49
|
+
return new Response(JSON.stringify({ error: r.error, ...("matches" in r ? { matches: r.matches } : {}) }), {
|
|
50
|
+
status: r.status, headers: { "content-type": "application/json" },
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
const { path, resolvedId } = r;
|
|
54
|
+
const encoder = new TextEncoder();
|
|
55
|
+
|
|
56
|
+
const stream = new ReadableStream({
|
|
57
|
+
start(controller) {
|
|
58
|
+
let closed = false;
|
|
59
|
+
let buf = "";
|
|
60
|
+
let pos = 0;
|
|
61
|
+
let watcher: ReturnType<typeof watch> | null = null;
|
|
62
|
+
let idleTimer: NodeJS.Timeout | null = null;
|
|
63
|
+
|
|
64
|
+
const send = (event: string, data: unknown) => {
|
|
65
|
+
if (closed) return;
|
|
66
|
+
try {
|
|
67
|
+
controller.enqueue(encoder.encode(`event: ${event}\ndata: ${JSON.stringify(data)}\n\n`));
|
|
68
|
+
} catch {
|
|
69
|
+
closed = true;
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
const close = (reason: string) => {
|
|
74
|
+
if (closed) return;
|
|
75
|
+
send("done", { reason });
|
|
76
|
+
if (watcher) try { watcher.close(); } catch { /* ignore */ }
|
|
77
|
+
if (idleTimer) clearTimeout(idleTimer);
|
|
78
|
+
try { controller.close(); } catch { /* ignore */ }
|
|
79
|
+
closed = true;
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
const resetIdle = () => {
|
|
83
|
+
if (idleTimer) clearTimeout(idleTimer);
|
|
84
|
+
idleTimer = setTimeout(() => close("idle-30s"), 30_000);
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
// Drain any new bytes from `pos` to current EOF, parsing complete lines and
|
|
88
|
+
// streaming each as either a `meta` (for `_meta.*` records) or `event` SSE
|
|
89
|
+
// message. Anything past the last newline goes back into `buf`.
|
|
90
|
+
const drain = () => {
|
|
91
|
+
if (closed || !existsSync(path)) return;
|
|
92
|
+
const fd = openSync(path, "r");
|
|
93
|
+
try {
|
|
94
|
+
const stat = statSync(path);
|
|
95
|
+
const end = stat.size;
|
|
96
|
+
if (end <= pos) return;
|
|
97
|
+
const chunk = Buffer.alloc(end - pos);
|
|
98
|
+
readSync(fd, chunk, 0, chunk.length, pos);
|
|
99
|
+
pos = end;
|
|
100
|
+
buf += chunk.toString("utf-8");
|
|
101
|
+
let nl: number;
|
|
102
|
+
while ((nl = buf.indexOf("\n")) !== -1) {
|
|
103
|
+
const line = buf.slice(0, nl).trim();
|
|
104
|
+
buf = buf.slice(nl + 1);
|
|
105
|
+
if (!line) continue;
|
|
106
|
+
let parsed: unknown;
|
|
107
|
+
try { parsed = JSON.parse(line); } catch { send("raw", { line }); continue; }
|
|
108
|
+
const obj = parsed as { _meta?: { type?: string } };
|
|
109
|
+
if (obj._meta && obj._meta.type) {
|
|
110
|
+
send("meta", obj);
|
|
111
|
+
if (obj._meta.type === "end" || obj._meta.type === "spawn_error") {
|
|
112
|
+
close(obj._meta.type);
|
|
113
|
+
return;
|
|
114
|
+
}
|
|
115
|
+
} else {
|
|
116
|
+
send("event", obj);
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
resetIdle();
|
|
120
|
+
} finally {
|
|
121
|
+
closeSync(fd);
|
|
122
|
+
}
|
|
123
|
+
};
|
|
124
|
+
|
|
125
|
+
// Avoid SSE event names that collide with EventSource's built-in DOM
|
|
126
|
+
// events (`open`, `error`). The DOM event fires with no `data`, which
|
|
127
|
+
// crashes any client `JSON.parse(e.data)` listener.
|
|
128
|
+
send("connected", { run_id: resolvedId, path: path.replace(homedir(), "~") });
|
|
129
|
+
drain();
|
|
130
|
+
if (closed) return;
|
|
131
|
+
|
|
132
|
+
try {
|
|
133
|
+
watcher = watch(path, () => drain());
|
|
134
|
+
} catch (e) {
|
|
135
|
+
send("stream_error", { message: `watch failed: ${(e as Error).message}` });
|
|
136
|
+
close("watch-error");
|
|
137
|
+
return;
|
|
138
|
+
}
|
|
139
|
+
resetIdle();
|
|
140
|
+
},
|
|
141
|
+
cancel() {
|
|
142
|
+
// client disconnected; nothing to clean up on our side beyond the watcher
|
|
143
|
+
},
|
|
144
|
+
});
|
|
145
|
+
|
|
146
|
+
return new Response(stream, {
|
|
147
|
+
headers: {
|
|
148
|
+
"Content-Type": "text/event-stream",
|
|
149
|
+
"Cache-Control": "no-cache, no-transform",
|
|
150
|
+
Connection: "keep-alive",
|
|
151
|
+
"X-Accel-Buffering": "no",
|
|
152
|
+
},
|
|
153
|
+
});
|
|
154
|
+
}
|