fleetlens 0.9.0 → 0.10.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.
- package/app/apps/web/.next/BUILD_ID +1 -1
- package/app/apps/web/.next/build-manifest.json +3 -3
- package/app/apps/web/.next/prerender-manifest.json +3 -3
- package/app/apps/web/.next/server/app/_global-error.html +1 -1
- package/app/apps/web/.next/server/app/_global-error.rsc +1 -1
- package/app/apps/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/app/apps/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/app/apps/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/app/apps/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- 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.js +2 -2
- 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/ask/route.js +4 -3
- package/app/apps/web/.next/server/app/api/ask/route.js.nft.json +1 -1
- package/app/apps/web/.next/server/app/api/digest/day/[date]/route.js +2 -3
- package/app/apps/web/.next/server/app/api/digest/day/[date]/route.js.nft.json +1 -1
- package/app/apps/web/.next/server/app/api/digest/month/[yearMonth]/route.js +2 -3
- package/app/apps/web/.next/server/app/api/digest/month/[yearMonth]/route.js.nft.json +1 -1
- package/app/apps/web/.next/server/app/api/digest/month-index/route.js +3 -3
- package/app/apps/web/.next/server/app/api/digest/month-index/route.js.nft.json +1 -1
- package/app/apps/web/.next/server/app/api/digest/week/[startDate]/route.js +2 -3
- package/app/apps/web/.next/server/app/api/digest/week/[startDate]/route.js.nft.json +1 -1
- package/app/apps/web/.next/server/app/api/digest/week-index/route.js +3 -3
- package/app/apps/web/.next/server/app/api/digest/week-index/route.js.nft.json +1 -1
- package/app/apps/web/.next/server/app/api/events/route.js +2 -3
- package/app/apps/web/.next/server/app/api/events/route.js.nft.json +1 -1
- package/app/apps/web/.next/server/app/api/jobs/route.js +1 -1
- package/app/apps/web/.next/server/app/api/jobs/route.js.nft.json +1 -1
- package/app/apps/web/.next/server/app/api/runs/[runId]/route.js +1 -1
- package/app/apps/web/.next/server/app/api/runs/[runId]/route.js.nft.json +1 -1
- package/app/apps/web/.next/server/app/api/runs/[runId]/stream/route.js +1 -1
- package/app/apps/web/.next/server/app/api/runs/[runId]/stream/route.js.nft.json +1 -1
- package/app/apps/web/.next/server/app/api/runs/route.js +1 -1
- package/app/apps/web/.next/server/app/api/runs/route.js.nft.json +1 -1
- package/app/apps/web/.next/server/app/api/settings/route.js +3 -4
- package/app/apps/web/.next/server/app/api/settings/route.js.nft.json +1 -1
- package/app/apps/web/.next/server/app/changelog/page.js +2 -2
- package/app/apps/web/.next/server/app/changelog/page.js.nft.json +1 -1
- package/app/apps/web/.next/server/app/changelog/page_client-reference-manifest.js +1 -1
- package/app/apps/web/.next/server/app/day/[date]/page.js +2 -2
- package/app/apps/web/.next/server/app/day/[date]/page.js.nft.json +1 -1
- package/app/apps/web/.next/server/app/day/[date]/page_client-reference-manifest.js +1 -1
- package/app/apps/web/.next/server/app/day/page.js +2 -2
- package/app/apps/web/.next/server/app/day/page.js.nft.json +1 -1
- package/app/apps/web/.next/server/app/day/page_client-reference-manifest.js +1 -1
- package/app/apps/web/.next/server/app/digest/[date]/page.js +2 -2
- package/app/apps/web/.next/server/app/digest/[date]/page.js.nft.json +1 -1
- package/app/apps/web/.next/server/app/digest/[date]/page_client-reference-manifest.js +1 -1
- package/app/apps/web/.next/server/app/digest/page.js +2 -2
- package/app/apps/web/.next/server/app/digest/page.js.nft.json +1 -1
- package/app/apps/web/.next/server/app/digest/page_client-reference-manifest.js +1 -1
- package/app/apps/web/.next/server/app/insights/[key]/page.js +2 -2
- 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.js +2 -2
- 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.js +2 -2
- 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.js +2 -2
- 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.js +2 -2
- 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.js +2 -2
- 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.js +2 -2
- package/app/apps/web/.next/server/app/runs/page.js.nft.json +1 -1
- package/app/apps/web/.next/server/app/runs/page_client-reference-manifest.js +1 -1
- package/app/apps/web/.next/server/app/sessions/[id]/page.js +2 -2
- 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.js +2 -2
- 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.js +2 -2
- package/app/apps/web/.next/server/app/settings/page.js.nft.json +1 -1
- package/app/apps/web/.next/server/app/settings/page_client-reference-manifest.js +1 -1
- package/app/apps/web/.next/server/app/usage/page.js +2 -2
- 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/chunks/[externals]__09v47rg._.js +3 -0
- package/app/apps/web/.next/server/chunks/{[externals]__0fpbr8-._.js → [externals]__0o43ejh._.js} +2 -2
- package/app/apps/web/.next/server/chunks/[root-of-the-server]__00n3f9y._.js +1 -1
- package/app/apps/web/.next/server/chunks/[root-of-the-server]__02px2mk._.js +3 -0
- package/app/apps/web/.next/server/chunks/[root-of-the-server]__02zukjw._.js +1 -1
- package/app/apps/web/.next/server/chunks/[root-of-the-server]__0455vu3._.js +5 -0
- package/app/apps/web/.next/server/chunks/[root-of-the-server]__067~im1._.js +2 -2
- package/app/apps/web/.next/server/chunks/[root-of-the-server]__06b4cj-._.js +1 -1
- package/app/apps/web/.next/server/chunks/{[root-of-the-server]__0e8n_x4._.js → [root-of-the-server]__08agijy._.js} +2 -2
- package/app/apps/web/.next/server/chunks/[root-of-the-server]__0_8zh-i._.js +3 -3
- package/app/apps/web/.next/server/chunks/[root-of-the-server]__0ej_p3s._.js +2 -2
- package/app/apps/web/.next/server/chunks/{[root-of-the-server]__0-vgrh1._.js → [root-of-the-server]__0i06ito._.js} +2 -2
- package/app/apps/web/.next/server/chunks/[root-of-the-server]__0jprdks._.js +2 -2
- package/app/apps/web/.next/server/chunks/[root-of-the-server]__0vm_41a._.js +3 -0
- package/app/apps/web/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_0ck.78s.js +4 -4
- package/app/apps/web/.next/server/chunks/packages_0c-sz9n._.js +3 -0
- package/app/apps/web/.next/server/chunks/packages_0wywuu.._.js +3 -0
- package/app/apps/web/.next/server/chunks/packages_entries_dist_node_0bckr7-.js +27 -13
- package/app/apps/web/.next/server/chunks/ssr/[root-of-the-server]__0d~2~le._.js +1 -1
- package/app/apps/web/.next/server/chunks/ssr/[root-of-the-server]__0r4tks8._.js +1 -1
- package/app/apps/web/.next/server/chunks/ssr/[root-of-the-server]__0s4dg1y._.js +3 -0
- package/app/apps/web/.next/server/chunks/ssr/[root-of-the-server]__0tejjy_._.js +1 -1
- 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]__0yv0m0q._.js +3 -0
- package/app/apps/web/.next/server/chunks/ssr/_0jw2sm7._.js +1 -1
- package/app/apps/web/.next/server/chunks/ssr/_0xu2pvc._.js +1 -1
- package/app/apps/web/.next/server/chunks/ssr/apps_web_components_0ly1xes._.js +1 -1
- package/app/apps/web/.next/server/chunks/ssr/apps_web_components_0txtsv5._.js +2 -2
- 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_0m67-xi._.js +1 -1
- package/app/apps/web/.next/server/chunks/ssr/packages_entries_dist_node_0_271yr.js +1 -1
- package/app/apps/web/.next/server/chunks/ssr/packages_parser_dist_12.endt._.js +3 -0
- package/app/apps/web/.next/server/middleware-build-manifest.js +3 -3
- 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/04a36uhu~p_z-.css +1 -0
- package/app/apps/web/.next/static/chunks/{0q2vd~aj.1hpz.js → 0g8ujtb0lp._9.js} +3 -3
- package/app/apps/web/.next/static/chunks/0l3ck.awv~4t7.js +1 -0
- package/app/apps/web/.next/static/chunks/{171za22fv684..js → 0lxuac2v0_gdl.js} +2 -2
- package/app/apps/web/.next/static/chunks/0n0n.0279ot6c.js +1 -0
- package/app/apps/web/.next/static/chunks/0uev~g~qvbjv9.js +4 -0
- package/app/apps/web/.next/static/chunks/0~n2a9f52wju9.js +14 -0
- package/app/apps/web/app/api/ask/route.ts +124 -111
- package/app/apps/web/app/api/events/route.ts +3 -4
- package/app/apps/web/app/api/runs/[runId]/route.ts +2 -2
- package/app/apps/web/app/api/runs/[runId]/stream/route.ts +3 -2
- package/app/apps/web/app/api/runs/route.ts +8 -4
- package/app/apps/web/app/sessions/[id]/session-view.tsx +31 -0
- package/app/apps/web/components/job-queue-widget.tsx +11 -8
- package/app/apps/web/components/previous-cycles-trend.tsx +26 -11
- package/app/apps/web/components/usage-chart.tsx +35 -37
- package/app/apps/web/components/usage-gauges.tsx +18 -12
- package/app/apps/web/components/usage-sidebar.tsx +23 -12
- package/app/apps/web/lib/calibration-data.ts +2 -4
- package/app/apps/web/lib/changelog-data.generated.ts +1 -1
- package/app/apps/web/lib/entries-index.ts +2 -2
- package/app/apps/web/lib/jobs.ts +3 -5
- package/app/apps/web/lib/usage-data.ts +3 -4
- package/app/apps/web/lib/utilization-tone.ts +74 -0
- package/app/apps/web/package.json +1 -1
- package/app/apps/web/tsconfig.tsbuildinfo +1 -1
- package/dist/daemon-worker.js +609 -110
- package/dist/index.js +5312 -4802
- package/package.json +1 -1
- package/app/apps/web/.next/server/chunks/[root-of-the-server]__0.z48ue._.js +0 -3
- package/app/apps/web/.next/server/chunks/[root-of-the-server]__0dctov1._.js +0 -5
- package/app/apps/web/.next/server/chunks/[root-of-the-server]__0op9af~._.js +0 -3
- package/app/apps/web/.next/server/chunks/packages_09hmrqx._.js +0 -3
- package/app/apps/web/.next/server/chunks/packages_118y1lp._.js +0 -3
- package/app/apps/web/.next/server/chunks/packages_parser_dist_fs_122oe0-.js +0 -3
- package/app/apps/web/.next/server/chunks/ssr/[root-of-the-server]__0sp6.jt._.js +0 -3
- package/app/apps/web/.next/server/chunks/ssr/[root-of-the-server]__0ytdqxt._.js +0 -3
- package/app/apps/web/.next/server/chunks/ssr/packages_parser_dist_10_oegc._.js +0 -3
- package/app/apps/web/.next/static/chunks/05m.oz3kmf1p7.js +0 -1
- package/app/apps/web/.next/static/chunks/07-fq4im3pmjp.js +0 -4
- package/app/apps/web/.next/static/chunks/0cxyt4-24..b7.js +0 -14
- package/app/apps/web/.next/static/chunks/0o9ayt8sknubd.js +0 -1
- package/app/apps/web/.next/static/chunks/0wfbj5zr~az.z.css +0 -1
- /package/app/apps/web/.next/static/{u6-8f8u1tspYCacGAz53R → sxcMbKfZ5XgVXYN4QHOHd}/_buildManifest.js +0 -0
- /package/app/apps/web/.next/static/{u6-8f8u1tspYCacGAz53R → sxcMbKfZ5XgVXYN4QHOHd}/_clientMiddlewareManifest.js +0 -0
- /package/app/apps/web/.next/static/{u6-8f8u1tspYCacGAz53R → sxcMbKfZ5XgVXYN4QHOHd}/_ssgManifest.js +0 -0
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
module.exports=[64240,(a,b,c)=>{"use strict";function d(a){if("function"!=typeof WeakMap)return null;var b=new WeakMap,c=new WeakMap;return(d=function(a){return a?c:b})(a)}c._=function(a,b){if(!b&&a&&a.__esModule)return a;if(null===a||"object"!=typeof a&&"function"!=typeof a)return{default:a};var c=d(b);if(c&&c.has(a))return c.get(a);var e={__proto__:null},f=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var g in a)if("default"!==g&&Object.prototype.hasOwnProperty.call(a,g)){var h=f?Object.getOwnPropertyDescriptor(a,g):null;h&&(h.get||h.set)?Object.defineProperty(e,g,h):e[g]=a[g]}return e.default=a,c&&c.set(a,e),e}},790,(a,b,c)=>{let{createClientModuleProxy:d}=a.r(11857);a.n(d("[project]/node_modules/next/dist/client/app-dir/link.js <module evaluation>"))},84707,(a,b,c)=>{let{createClientModuleProxy:d}=a.r(11857);a.n(d("[project]/node_modules/next/dist/client/app-dir/link.js"))},97647,a=>{"use strict";a.i(790);var b=a.i(84707);a.n(b)},95936,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});var d={default:function(){return i},useLinkStatus:function(){return h.useLinkStatus}};for(var e in d)Object.defineProperty(c,e,{enumerable:!0,get:d[e]});let f=a.r(64240),g=a.r(7997),h=f._(a.r(97647));function i(a){let b=a.legacyBehavior,c="string"==typeof a.children||"number"==typeof a.children||"string"==typeof a.children?.type,d=a.children?.type?.$$typeof===Symbol.for("react.client.reference");return!b||c||d||(a.children?.type?.$$typeof===Symbol.for("react.lazy")?console.error("Using a Lazy Component as a direct child of `<Link legacyBehavior>` from a Server Component is not supported. If you need legacyBehavior, wrap your Lazy Component in a Client Component that renders the Link's `<a>` tag."):console.error("Using a Server Component as a direct child of `<Link legacyBehavior>` is not supported. If you need legacyBehavior, wrap your Server Component in a Client Component that renders the Link's `<a>` tag.")),(0,g.jsx)(h.default,{...a})}("function"==typeof c.default||"object"==typeof c.default&&null!==c.default)&&void 0===c.default.__esModule&&(Object.defineProperty(c.default,"__esModule",{value:!0}),Object.assign(c.default,c),b.exports=c.default)},50227,(a,b,c)=>{b.exports=a.x("node:path",()=>require("node:path"))},2157,(a,b,c)=>{b.exports=a.x("node:fs",()=>require("node:fs"))},60526,(a,b,c)=>{b.exports=a.x("node:os",()=>require("node:os"))},66680,(a,b,c)=>{b.exports=a.x("node:crypto",()=>require("node:crypto"))},44104,72592,47058,a=>{"use strict";var b=a.i(2157);a.i(66680);var c=a.i(50227),d=a.i(23895);function e(a,b){return`${a}__${b}`}function f(a){let b=/^([^_]+(?:_[^_]+)*)__(\d{4}-\d{2}-\d{2})$/.exec(a);return b?{session_id:b[1],local_day:b[2]}:null}a.s(["CURRENT_DAY_DIGEST_SCHEMA_VERSION",0,2,"GOAL_CATEGORIES",0,["build","plan","debug","review","steer","meta","research","refactor","test","release","warmup_minimal"],"PROMPT_FRAME_ORIGIN",0,{teammate:"claude-feature","task-notification":"claude-feature","local-command-caveat":"claude-feature","image-attached":"claude-feature","slash-command":"claude-feature","handoff-prose":"personal-habit"},"entryKey",0,e,"parseEntryKey",0,f],72592);let g=null;function h(){return g||(g=process.env.CCLENS_DIGESTS_DIR??(0,d.cclensPath)("digests"))}a.s(["getCurrentMonthDigestFromCache",0,function(a,b){return null},"getCurrentWeekDigestFromCache",0,function(a,b){return null},"getTodayDigestFromCache",0,function(a,b){return null},"readDayDigest",0,function(a){let d=(0,c.join)(h(),"day",`${a}.json`);if(!(0,b.existsSync)(d))return null;try{return JSON.parse((0,b.readFileSync)(d,"utf8"))}catch{return null}},"readMonthDigest",0,function(a){let d=(0,c.join)(h(),"month",`${a}.json`);if(!(0,b.existsSync)(d))return null;try{return JSON.parse((0,b.readFileSync)(d,"utf8"))}catch{return null}},"readWeekDigest",0,function(a){let d=(0,c.join)(h(),"week",`${a}.json`);if(!(0,b.existsSync)(d))return null;try{return JSON.parse((0,b.readFileSync)(d,"utf8"))}catch{return null}}],47058);let i=null;function j(){return i||(i=process.env.CCLENS_ENTRIES_DIR??(0,d.cclensPath)("entries"))}function k(a,d){let f=(0,c.join)(j(),`${e(a,d)}.json`);return(0,b.existsSync)(f)?JSON.parse((0,b.readFileSync)(f,"utf8")):null}function l(){let a=j();return(0,b.existsSync)(a)?(0,b.readdirSync)(a).filter(a=>a.endsWith(".json")).map(a=>a.slice(0,-5)):[]}a.s(["entriesDir",0,j,"listEntriesForDay",0,function(a){let b=[];for(let c of l()){let d=f(c);if(!d||d.local_day!==a)continue;let e=k(d.session_id,d.local_day);e&&b.push(e)}return b},"listEntriesForSession",0,function(a){let b=[];for(let c of l()){let d=f(c);if(!d||d.session_id!==a)continue;let e=k(d.session_id,d.local_day);e&&b.push(e)}return b},"listEntryKeys",0,l,"readEntry",0,k],44104)},9117,a=>{"use strict";a.i(30375),a.s([])},67116,a=>{"use strict";var b=a.i(717),c=a.i(23895);let d=(0,b.cache)(async()=>(0,c.listAllSessions)({limit:1e3})),e=(0,b.cache)(async a=>(0,c.getAnySession)(a));a.s(["getSession",0,e,"listSessions",0,d])},76597,72931,a=>{"use strict";var b=a.i(2157),c=a.i(44104),d=a.i(47058);a.i(9117);var e=a.i(48024),f=a.i(23895);a.i(7997),a.i(95936);let g={shipped:6,partial:5,blocked:4,exploratory:3,trivial:2,idle:1};function h(a){return a?g[a]:0}a.s(["OUTCOME_STYLES",0,{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:"—"}},"outcomePriority",0,h],72931);let i={bySession:new Map,byDay:new Map,byProject:new Map,sessionOutcome:new Map,dayOutcome:new Map,enrichmentStatusBySession:new Map},j=null;function k(a){let b=null,c=0;for(let d of a){let a=d.enrichment.outcome??null;if(!a)continue;let e=h(a);e>c&&(c=e,b=a)}return b}async function l(){let a,d=(a=(0,c.entriesDir)(),(0,b.existsSync)(a)?(0,b.statSync)(a).mtimeMs:0);if(0===d)return i;if(j&&j.mtimeMs===d)return j.index;let f=new Map,g=new Map,h=new Map,l=new Map;for(let a of(0,c.listEntryKeys)()){let b=a.lastIndexOf("__");if(-1===b)continue;let d=a.slice(0,b),i=a.slice(b+2),j=(0,c.readEntry)(d,i);if(!j)continue;let k=f.get(j.session_id);k?k.push(j):f.set(j.session_id,[j]);let m=g.get(j.local_day);m?m.push(j):g.set(j.local_day,[j]);let n=(0,e.canonicalProjectName)(j.project),o=h.get(n);o?o.push(j):h.set(n,[j]);let p=l.get(j.session_id);p&&"pending"!==p&&"error"!==p||l.set(j.session_id,j.enrichment.status)}for(let a of f.values())a.sort((a,b)=>a.local_day.localeCompare(b.local_day));let m=new Map;for(let[a,b]of f)m.set(a,k(b));let n=new Map;for(let[a,b]of g)n.set(a,k(b));let o={bySession:f,byDay:g,byProject:h,sessionOutcome:m,dayOutcome:n,enrichmentStatusBySession:l};return j={mtimeMs:d,index:o},o}let m=null;function n(){return process.env.CCLENS_DIGESTS_DIR??(0,f.cclensPath)("digests","day")}async function o(){let a,c=(a=n(),(0,b.existsSync)(a)?(0,b.statSync)(a).mtimeMs:0);if(0===c)return new Map;if(m&&m.mtimeMs===c)return m.map;let e=n(),f=new Map;for(let a of(0,b.readdirSync)(e)){if(!a.endsWith(".json"))continue;let b=a.slice(0,-5);if(!/^\d{4}-\d{2}-\d{2}$/.test(b))continue;let c=(0,d.readDayDigest)(b);c&&f.set(b,{date:b,headline:c.headline,outcome_day:c.outcome_day,helpfulness_day:c.helpfulness_day,agent_min:c.agent_min,shipped_count:c.shipped.length})}return m={mtimeMs:c,map:f},f}a.s(["buildEntriesIndex",0,l,"listCachedDayDigests",0,o],76597)}];
|
|
2
|
+
|
|
3
|
+
//# sourceMappingURL=%5Broot-of-the-server%5D__0yv0m0q._.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
module.exports=[68381,a=>{"use strict";var b=a.i(87924);let c={build:"var(--af-accent)",plan:"#9f7aea",debug:"#ed8936",review:"#4299e1",refactor:"#38b2ac",test:"#48bb78",release:"#ed64a6",research:"#a0aec0",steer:"#f6ad55",meta:"#718096",warmup_minimal:"#cbd5e0"};a.s(["GoalBar",0,function({goals:a,total:d,height:e=12}){return 0===d||0===a.length?(0,b.jsx)("p",{style:{fontSize:12,color:"var(--af-text-tertiary)",margin:0},children:"No goal data."}):(0,b.jsxs)("div",{children:[(0,b.jsx)("div",{style:{display:"flex",gap:2,height:e,borderRadius:3,overflow:"hidden"},children:a.map(a=>{let e=a.minutes/d*100;return(0,b.jsx)("div",{style:{width:`${e}%`,background:c[a.category]??"#888"},title:`${a.category}: ${Math.round(a.minutes)}m (${e.toFixed(0)}%)`},a.category)})}),(0,b.jsx)("div",{style:{display:"flex",gap:14,marginTop:8,flexWrap:"wrap",fontSize:11,color:"var(--af-text-tertiary)"},children:a.map(a=>(0,b.jsxs)("span",{style:{display:"inline-flex",alignItems:"center",gap:5},children:[(0,b.jsx)("span",{style:{width:8,height:8,borderRadius:2,background:c[a.category]??"#888"}}),a.category," ",Math.round(a.minutes),"m"]},a.category))})]})}])},50522,a=>{"use strict";let b=(0,a.i(70106).default)("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);a.s(["ChevronRight",0,b],50522)},5784,a=>{"use strict";let b=(0,a.i(70106).default)("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);a.s(["ChevronDown",0,b],5784)},12544,a=>{"use strict";let b=["/.claude/worktrees/","/.worktrees/","/claude/worktrees/"],c=/gh\s+pr\s+create\b/i,
|
|
1
|
+
module.exports=[68381,a=>{"use strict";var b=a.i(87924);let c={build:"var(--af-accent)",plan:"#9f7aea",debug:"#ed8936",review:"#4299e1",refactor:"#38b2ac",test:"#48bb78",release:"#ed64a6",research:"#a0aec0",steer:"#f6ad55",meta:"#718096",warmup_minimal:"#cbd5e0"};a.s(["GoalBar",0,function({goals:a,total:d,height:e=12}){return 0===d||0===a.length?(0,b.jsx)("p",{style:{fontSize:12,color:"var(--af-text-tertiary)",margin:0},children:"No goal data."}):(0,b.jsxs)("div",{children:[(0,b.jsx)("div",{style:{display:"flex",gap:2,height:e,borderRadius:3,overflow:"hidden"},children:a.map(a=>{let e=a.minutes/d*100;return(0,b.jsx)("div",{style:{width:`${e}%`,background:c[a.category]??"#888"},title:`${a.category}: ${Math.round(a.minutes)}m (${e.toFixed(0)}%)`},a.category)})}),(0,b.jsx)("div",{style:{display:"flex",gap:14,marginTop:8,flexWrap:"wrap",fontSize:11,color:"var(--af-text-tertiary)"},children:a.map(a=>(0,b.jsxs)("span",{style:{display:"inline-flex",alignItems:"center",gap:5},children:[(0,b.jsx)("span",{style:{width:8,height:8,borderRadius:2,background:c[a.category]??"#888"}}),a.category," ",Math.round(a.minutes),"m"]},a.category))})]})}])},50522,a=>{"use strict";let b=(0,a.i(70106).default)("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);a.s(["ChevronRight",0,b],50522)},5784,a=>{"use strict";let b=(0,a.i(70106).default)("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);a.s(["ChevronDown",0,b],5784)},12544,a=>{"use strict";let b=["/.claude/worktrees/","/.worktrees/","/claude/worktrees/"],c=/\/conductor\/workspaces\/[^/]+\/([^/]+)(?:\/|$)/,d=/gh\s+pr\s+create\b/i,e=/#(\d+)/,f=/--title\s+["']([^"']+)["']/;a.s(["canonicalProjectName",0,function(a){let d=a.replace(/\/{2,}/g,"/"),e=function(a){for(let c of b){let b=a.lastIndexOf(c);if(b>=0)return{idx:b,marker:c}}return null}(d);if(e)return d.slice(0,e.idx);let f=function(a){let b=c.exec(a);if(!b)return null;let d=b[1],e=+!!b[0].endsWith("/");return{canonicalEndIdx:b.index+b[0].length-d.length-1-e,workspaceName:d}}(d);return f?d.slice(0,f.canonicalEndIdx):d},"detectPrMarkers",0,function(a){let b=[],c=a.durationMs??0;for(let g of a.events){if("tool-call"!==g.role||"Bash"!==g.toolName)continue;let h=g.blocks.find(a=>a&&"type"in a&&"tool_use"===a.type);if(!h||"tool_use"!==h.type)continue;let i=h.input,j="string"==typeof i?.command?i.command:"";if(!d.test(j))continue;let k=j.match(f),l=j.match(e);b.push({sessionId:a.id,timestamp:g.timestamp??a.firstTimestamp??"",tOffsetMs:g.tOffsetMs,positionInSession:c>0&&void 0!==g.tOffsetMs?Math.min(1,Math.max(0,g.tOffsetMs/c)):void 0,command:j.slice(0,300),prNumber:l?Number(l[1]):void 0,title:k?.[1]})}return b}])}];
|
|
2
2
|
|
|
3
3
|
//# sourceMappingURL=_0jw2sm7._.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
module.exports=[63681,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});var d={RequestCookies:function(){return f.RequestCookies},ResponseCookies:function(){return f.ResponseCookies},stringifyCookie:function(){return f.stringifyCookie}};for(var e in d)Object.defineProperty(c,e,{enumerable:!0,get:d[e]});let f=a.r(36226)},51409,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"ReflectAdapter",{enumerable:!0,get:function(){return d}});class d{static get(a,b,c){let d=Reflect.get(a,b,c);return"function"==typeof d?d.bind(a):d}static set(a,b,c,d){return Reflect.set(a,b,c,d)}static has(a,b){return Reflect.has(a,b)}static deleteProperty(a,b){return Reflect.deleteProperty(a,b)}}},4712,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});var d={ActionDidNotRevalidate:function(){return f},ActionDidRevalidateDynamicOnly:function(){return h},ActionDidRevalidateStaticAndDynamic:function(){return g}};for(var e in d)Object.defineProperty(c,e,{enumerable:!0,get:d[e]});let f=0,g=1,h=2},14896,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});var d={MutableRequestCookiesAdapter:function(){return o},ReadonlyRequestCookiesError:function(){return j},RequestCookiesAdapter:function(){return k},appendMutableCookies:function(){return n},areCookiesMutableInCurrentPhase:function(){return q},createCookiesWithMutableAccessCheck:function(){return p},getModifiedCookieValues:function(){return m},responseCookiesToRequestCookies:function(){return s}};for(var e in d)Object.defineProperty(c,e,{enumerable:!0,get:d[e]});let f=a.r(63681),g=a.r(51409),h=a.r(56704),i=a.r(4712);class j extends Error{constructor(){super("Cookies can only be modified in a Server Action or Route Handler. Read more: https://nextjs.org/docs/app/api-reference/functions/cookies#options")}static callable(){throw new j}}class k{static seal(a){return new Proxy(a,{get(a,b,c){switch(b){case"clear":case"delete":case"set":return j.callable;default:return g.ReflectAdapter.get(a,b,c)}}})}}let l=Symbol.for("next.mutated.cookies");function m(a){let b=a[l];return b&&Array.isArray(b)&&0!==b.length?b:[]}function n(a,b){let c=m(b);if(0===c.length)return!1;let d=new f.ResponseCookies(a),e=d.getAll();for(let a of c)d.set(a);for(let a of e)d.set(a);return!0}class o{static wrap(a,b){let c=new f.ResponseCookies(new Headers);for(let b of a.getAll())c.set(b);let d=[],e=new Set,j=()=>{let a=h.workAsyncStorage.getStore();if(a&&(a.pathWasRevalidated=i.ActionDidRevalidateStaticAndDynamic),d=c.getAll().filter(a=>e.has(a.name)),b){let a=[];for(let b of d){let c=new f.ResponseCookies(new Headers);c.set(b),a.push(c.toString())}b(a)}},k=new Proxy(c,{get(a,b,c){switch(b){case l:return d;case"delete":return function(...b){e.add("string"==typeof b[0]?b[0]:b[0].name);try{return a.delete(...b),k}finally{j()}};case"set":return function(...b){e.add("string"==typeof b[0]?b[0]:b[0].name);try{return a.set(...b),k}finally{j()}};default:return g.ReflectAdapter.get(a,b,c)}}});return k}}function p(a){let b=new Proxy(a.mutableCookies,{get(c,d,e){switch(d){case"delete":return function(...d){return r(a,"cookies().delete"),c.delete(...d),b};case"set":return function(...d){return r(a,"cookies().set"),c.set(...d),b};default:return g.ReflectAdapter.get(c,d,e)}}});return b}function q(a){return"action"===a.phase}function r(a,b){if(!q(a))throw new j}function s(a){let b=new f.RequestCookies(new Headers);for(let c of a.getAll())b.set(c);return b}},8018,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"createDedupedByCallsiteServerErrorLoggerDev",{enumerable:!0,get:function(){return i}});let d=function(a){if(a&&a.__esModule)return a;if(null===a||"object"!=typeof a&&"function"!=typeof a)return{default:a};var b=e(void 0);if(b&&b.has(a))return b.get(a);var c={__proto__:null},d=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var f in a)if("default"!==f&&Object.prototype.hasOwnProperty.call(a,f)){var g=d?Object.getOwnPropertyDescriptor(a,f):null;g&&(g.get||g.set)?Object.defineProperty(c,f,g):c[f]=a[f]}return c.default=a,b&&b.set(a,c),c}(a.r(717));function e(a){if("function"!=typeof WeakMap)return null;var b=new WeakMap,c=new WeakMap;return(e=function(a){return a?c:b})(a)}let f={current:null},g="function"==typeof d.cache?d.cache:a=>a,h=console.warn;function i(a){return function(...b){h(a(...b))}}g(a=>{try{h(f.current)}finally{f.current=null}})},86309,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});var d={isRequestAPICallableInsideAfter:function(){return j},throwForSearchParamsAccessInUseCache:function(){return i},throwWithStaticGenerationBailoutErrorWithDynamicError:function(){return h}};for(var e in d)Object.defineProperty(c,e,{enumerable:!0,get:d[e]});let f=a.r(60312),g=a.r(24725);function h(a,b){throw Object.defineProperty(new f.StaticGenBailoutError(`Route ${a} with \`dynamic = "error"\` couldn't be rendered statically because it used ${b}. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`),"__NEXT_ERROR_CODE",{value:"E543",enumerable:!1,configurable:!0})}function i(a,b){let c=Object.defineProperty(Error(`Route ${a.route} used \`searchParams\` inside "use cache". Accessing dynamic request data inside a cache scope is not supported. If you need some search params inside a cached function await \`searchParams\` outside of the cached function and pass only the required search params as arguments to the cached function. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`),"__NEXT_ERROR_CODE",{value:"E842",enumerable:!1,configurable:!0});throw Error.captureStackTrace(c,b),a.invalidDynamicUsageError??=c,c}function j(){let a=g.afterTaskAsyncStorage.getStore();return(null==a?void 0:a.rootTaskSpawnPhase)==="action"}},81740,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"cookies",{enumerable:!0,get:function(){return n}});let d=a.r(14896),e=a.r(63681),f=a.r(56704),g=a.r(32319),h=a.r(60384),i=a.r(60312),j=a.r(13091),k=a.r(8018),l=a.r(86309),m=a.r(50640);function n(){let a="cookies",b=f.workAsyncStorage.getStore(),c=g.workUnitAsyncStorage.getStore();if(b){if(c&&"after"===c.phase&&!(0,l.isRequestAPICallableInsideAfter)())throw Object.defineProperty(Error(`Route ${b.route} used \`cookies()\` inside \`after()\`. This is not supported. If you need this data inside an \`after()\` callback, use \`cookies()\` outside of the callback. See more info here: https://nextjs.org/docs/canary/app/api-reference/functions/after`),"__NEXT_ERROR_CODE",{value:"E843",enumerable:!1,configurable:!0});if(b.forceStatic)return p(d.RequestCookiesAdapter.seal(new e.RequestCookies(new Headers({}))));if(b.dynamicShouldError)throw Object.defineProperty(new i.StaticGenBailoutError(`Route ${b.route} with \`dynamic = "error"\` couldn't be rendered statically because it used \`cookies()\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`),"__NEXT_ERROR_CODE",{value:"E849",enumerable:!1,configurable:!0});if(c)switch(c.type){case"cache":let f=Object.defineProperty(Error(`Route ${b.route} used \`cookies()\` inside "use cache". Accessing Dynamic data sources inside a cache scope is not supported. If you need this data inside a cached function use \`cookies()\` outside of the cached function and pass the required dynamic data in as an argument. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`),"__NEXT_ERROR_CODE",{value:"E831",enumerable:!1,configurable:!0});throw Error.captureStackTrace(f,n),b.invalidDynamicUsageError??=f,f;case"unstable-cache":throw Object.defineProperty(Error(`Route ${b.route} used \`cookies()\` inside a function cached with \`unstable_cache()\`. Accessing Dynamic data sources inside a cache scope is not supported. If you need this data inside a cached function use \`cookies()\` outside of the cached function and pass the required dynamic data in as an argument. See more info here: https://nextjs.org/docs/app/api-reference/functions/unstable_cache`),"__NEXT_ERROR_CODE",{value:"E846",enumerable:!1,configurable:!0});case"generate-static-params":throw Object.defineProperty(Error(`Route ${b.route} used \`cookies()\` inside \`generateStaticParams\`. This is not supported because \`generateStaticParams\` runs at build time without an HTTP request. Read more: https://nextjs.org/docs/messages/next-dynamic-api-wrong-context`),"__NEXT_ERROR_CODE",{value:"E1123",enumerable:!1,configurable:!0});case"prerender":var k=b,q=c;let r=o.get(q);if(r)return r;let s=(0,j.makeHangingPromise)(q.renderSignal,k.route,"`cookies()`");return o.set(q,s),s;case"prerender-client":case"validation-client":let t="`cookies`";throw Object.defineProperty(new m.InvariantError(`${t} must not be used within a Client Component. Next.js should be preventing ${t} from being included in Client Components statically, but did not in this case.`),"__NEXT_ERROR_CODE",{value:"E1037",enumerable:!1,configurable:!0});case"prerender-ppr":return(0,h.postponeWithTracking)(b.route,a,c.dynamicTracking);case"prerender-legacy":return(0,h.throwToInterruptStaticGeneration)(a,b,c);case"prerender-runtime":return(0,j.delayUntilRuntimeStage)(c,p(c.cookies));case"private-cache":return p(c.cookies);case"request":let u;if((0,h.trackDynamicDataInDynamicRender)(c),u=(0,d.areCookiesMutableInCurrentPhase)(c)?c.userspaceMutableCookies:c.cookies,!c.asyncApiPromises)return p(u);{let a=(0,g.isInEarlyRenderStage)(c);if(u===c.mutableCookies)return a?c.asyncApiPromises.earlyMutableCookies:c.asyncApiPromises.mutableCookies;return a?c.asyncApiPromises.earlyCookies:c.asyncApiPromises.cookies}}}(0,g.throwForMissingRequestStore)(a)}a.r(31382);let o=new WeakMap;function p(a){let b=o.get(a);if(b)return b;let c=Promise.resolve(a);return o.set(a,c),c}(0,k.createDedupedByCallsiteServerErrorLoggerDev)(function(a,b){let c=a?`Route "${a}" `:"This route ";return Object.defineProperty(Error(`${c}used ${b}. \`cookies()\` returns a Promise and must be unwrapped with \`await\` or \`React.use()\` before accessing its properties. Learn more: https://nextjs.org/docs/messages/sync-dynamic-apis`),"__NEXT_ERROR_CODE",{value:"E830",enumerable:!1,configurable:!0})})},29927,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});var d={HeadersAdapter:function(){return h},ReadonlyHeadersError:function(){return g}};for(var e in d)Object.defineProperty(c,e,{enumerable:!0,get:d[e]});let f=a.r(51409);class g extends Error{constructor(){super("Headers cannot be modified. Read more: https://nextjs.org/docs/app/api-reference/functions/headers")}static callable(){throw new g}}class h extends Headers{constructor(a){super(),this.headers=new Proxy(a,{get(b,c,d){if("symbol"==typeof c)return f.ReflectAdapter.get(b,c,d);let e=c.toLowerCase(),g=Object.keys(a).find(a=>a.toLowerCase()===e);if(void 0!==g)return f.ReflectAdapter.get(b,g,d)},set(b,c,d,e){if("symbol"==typeof c)return f.ReflectAdapter.set(b,c,d,e);let g=c.toLowerCase(),h=Object.keys(a).find(a=>a.toLowerCase()===g);return f.ReflectAdapter.set(b,h??c,d,e)},has(b,c){if("symbol"==typeof c)return f.ReflectAdapter.has(b,c);let d=c.toLowerCase(),e=Object.keys(a).find(a=>a.toLowerCase()===d);return void 0!==e&&f.ReflectAdapter.has(b,e)},deleteProperty(b,c){if("symbol"==typeof c)return f.ReflectAdapter.deleteProperty(b,c);let d=c.toLowerCase(),e=Object.keys(a).find(a=>a.toLowerCase()===d);return void 0===e||f.ReflectAdapter.deleteProperty(b,e)}})}static seal(a){return new Proxy(a,{get(a,b,c){switch(b){case"append":case"delete":case"set":return g.callable;default:return f.ReflectAdapter.get(a,b,c)}}})}merge(a){return Array.isArray(a)?a.join(", "):a}static from(a){return a instanceof Headers?a:new h(a)}append(a,b){let c=this.headers[a];"string"==typeof c?this.headers[a]=[c,b]:Array.isArray(c)?c.push(b):this.headers[a]=b}delete(a){delete this.headers[a]}get(a){let b=this.headers[a];return void 0!==b?this.merge(b):null}has(a){return void 0!==this.headers[a]}set(a,b){this.headers[a]=b}forEach(a,b){for(let[c,d]of this.entries())a.call(b,d,c,this)}*entries(){for(let a of Object.keys(this.headers)){let b=a.toLowerCase(),c=this.get(b);yield[b,c]}}*keys(){for(let a of Object.keys(this.headers)){let b=a.toLowerCase();yield b}}*values(){for(let a of Object.keys(this.headers)){let b=this.get(a);yield b}}[Symbol.iterator](){return this.entries()}}},35754,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"headers",{enumerable:!0,get:function(){return m}});let d=a.r(29927),e=a.r(56704),f=a.r(32319),g=a.r(60384),h=a.r(60312),i=a.r(13091),j=a.r(8018),k=a.r(86309),l=a.r(50640);function m(){let a="headers",b=e.workAsyncStorage.getStore(),c=f.workUnitAsyncStorage.getStore();if(b){if(c&&"after"===c.phase&&!(0,k.isRequestAPICallableInsideAfter)())throw Object.defineProperty(Error(`Route ${b.route} used \`headers()\` inside \`after()\`. This is not supported. If you need this data inside an \`after()\` callback, use \`headers()\` outside of the callback. See more info here: https://nextjs.org/docs/canary/app/api-reference/functions/after`),"__NEXT_ERROR_CODE",{value:"E839",enumerable:!1,configurable:!0});if(b.forceStatic)return o(d.HeadersAdapter.seal(new Headers({})));if(c)switch(c.type){case"cache":{let a=Object.defineProperty(Error(`Route ${b.route} used \`headers()\` inside "use cache". Accessing Dynamic data sources inside a cache scope is not supported. If you need this data inside a cached function use \`headers()\` outside of the cached function and pass the required dynamic data in as an argument. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`),"__NEXT_ERROR_CODE",{value:"E833",enumerable:!1,configurable:!0});throw Error.captureStackTrace(a,m),b.invalidDynamicUsageError??=a,a}case"unstable-cache":throw Object.defineProperty(Error(`Route ${b.route} used \`headers()\` inside a function cached with \`unstable_cache()\`. Accessing Dynamic data sources inside a cache scope is not supported. If you need this data inside a cached function use \`headers()\` outside of the cached function and pass the required dynamic data in as an argument. See more info here: https://nextjs.org/docs/app/api-reference/functions/unstable_cache`),"__NEXT_ERROR_CODE",{value:"E838",enumerable:!1,configurable:!0});case"generate-static-params":throw Object.defineProperty(Error(`Route ${b.route} used \`headers()\` inside \`generateStaticParams\`. This is not supported because \`generateStaticParams\` runs at build time without an HTTP request. Read more: https://nextjs.org/docs/messages/next-dynamic-api-wrong-context`),"__NEXT_ERROR_CODE",{value:"E1134",enumerable:!1,configurable:!0})}if(b.dynamicShouldError)throw Object.defineProperty(new h.StaticGenBailoutError(`Route ${b.route} with \`dynamic = "error"\` couldn't be rendered statically because it used \`headers()\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`),"__NEXT_ERROR_CODE",{value:"E828",enumerable:!1,configurable:!0});if(c)switch(c.type){case"prerender":var j=b,p=c;let e=n.get(p);if(e)return e;let q=(0,i.makeHangingPromise)(p.renderSignal,j.route,"`headers()`");return n.set(p,q),q;case"prerender-client":case"validation-client":let r="`headers`";throw Object.defineProperty(new l.InvariantError(`${r} must not be used within a client component. Next.js should be preventing ${r} from being included in client components statically, but did not in this case.`),"__NEXT_ERROR_CODE",{value:"E1017",enumerable:!1,configurable:!0});case"prerender-ppr":return(0,g.postponeWithTracking)(b.route,a,c.dynamicTracking);case"prerender-legacy":return(0,g.throwToInterruptStaticGeneration)(a,b,c);case"prerender-runtime":return(0,i.delayUntilRuntimeStage)(c,o(c.headers));case"private-cache":return o(c.headers);case"request":if((0,g.trackDynamicDataInDynamicRender)(c),c.asyncApiPromises)return(0,f.isInEarlyRenderStage)(c)?c.asyncApiPromises.earlyHeaders:c.asyncApiPromises.headers;return o(c.headers)}}(0,f.throwForMissingRequestStore)(a)}a.r(31382);let n=new WeakMap;function o(a){let b=n.get(a);if(b)return b;let c=Promise.resolve(a);return n.set(a,c),c}(0,j.createDedupedByCallsiteServerErrorLoggerDev)(function(a,b){let c=a?`Route "${a}" `:"This route ";return Object.defineProperty(Error(`${c}used ${b}. \`headers()\` returns a Promise and must be unwrapped with \`await\` or \`React.use()\` before accessing its properties. Learn more: https://nextjs.org/docs/messages/sync-dynamic-apis`),"__NEXT_ERROR_CODE",{value:"E836",enumerable:!1,configurable:!0})})},51125,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"draftMode",{enumerable:!0,get:function(){return l}});let d=a.r(32319),e=a.r(56704),f=a.r(60384),g=a.r(8018),h=a.r(60312),i=a.r(96556),j=a.r(50640),k=a.r(13091);function l(){let a="draftMode",b=e.workAsyncStorage.getStore(),c=d.workUnitAsyncStorage.getStore();switch((!b||!c)&&(0,d.throwForMissingRequestStore)(a),c.type){case"prerender-runtime":return(0,k.delayUntilRuntimeStage)(c,m(c.draftMode,b));case"request":return m(c.draftMode,b);case"cache":case"private-cache":case"unstable-cache":let f=(0,d.getDraftModeProviderForCacheScope)(b,c);if(f)return m(f,b);case"prerender":case"prerender-ppr":case"prerender-legacy":return m(null,b);case"prerender-client":case"validation-client":{let a="`draftMode`";throw Object.defineProperty(new j.InvariantError(`${a} must not be used within a Client Component. Next.js should be preventing ${a} from being included in Client Components statically, but did not in this case.`),"__NEXT_ERROR_CODE",{value:"E1046",enumerable:!1,configurable:!0})}case"generate-static-params":throw Object.defineProperty(Error(`Route ${b.route} used \`${a}()\` inside \`generateStaticParams\`. This is not supported because \`generateStaticParams\` runs at build time without an HTTP request. Read more: https://nextjs.org/docs/messages/next-dynamic-api-wrong-context`),"__NEXT_ERROR_CODE",{value:"E1132",enumerable:!1,configurable:!0});default:return c}}function m(a,b){let c=o.get(a??n);return c||Promise.resolve(new p(a))}a.r(51409);let n={},o=new WeakMap;class p{constructor(a){this._provider=a}get isEnabled(){return null!==this._provider&&this._provider.isEnabled}enable(){q("draftMode().enable()",this.enable),null!==this._provider&&this._provider.enable()}disable(){q("draftMode().disable()",this.disable),null!==this._provider&&this._provider.disable()}}function q(a,b){let c=e.workAsyncStorage.getStore(),g=d.workUnitAsyncStorage.getStore();if(c){if((null==g?void 0:g.phase)==="after")throw Object.defineProperty(Error(`Route ${c.route} used "${a}" inside \`after()\`. The enabled status of \`draftMode()\` can be read inside \`after()\` but you cannot enable or disable \`draftMode()\`. See more info here: https://nextjs.org/docs/app/api-reference/functions/after`),"__NEXT_ERROR_CODE",{value:"E845",enumerable:!1,configurable:!0});if(c.dynamicShouldError)throw Object.defineProperty(new h.StaticGenBailoutError(`Route ${c.route} with \`dynamic = "error"\` couldn't be rendered statically because it used \`${a}\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`),"__NEXT_ERROR_CODE",{value:"E553",enumerable:!1,configurable:!0});if(g)switch(g.type){case"cache":case"private-cache":{let d=Object.defineProperty(Error(`Route ${c.route} used "${a}" inside "use cache". The enabled status of \`draftMode()\` can be read in caches but you must not enable or disable \`draftMode()\` inside a cache. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`),"__NEXT_ERROR_CODE",{value:"E829",enumerable:!1,configurable:!0});throw Error.captureStackTrace(d,b),c.invalidDynamicUsageError??=d,d}case"unstable-cache":throw Object.defineProperty(Error(`Route ${c.route} used "${a}" inside a function cached with \`unstable_cache()\`. The enabled status of \`draftMode()\` can be read in caches but you must not enable or disable \`draftMode()\` inside a cache. See more info here: https://nextjs.org/docs/app/api-reference/functions/unstable_cache`),"__NEXT_ERROR_CODE",{value:"E844",enumerable:!1,configurable:!0});case"prerender":case"prerender-runtime":{let b=Object.defineProperty(Error(`Route ${c.route} used ${a} without first calling \`await connection()\`. See more info here: https://nextjs.org/docs/messages/next-prerender-sync-headers`),"__NEXT_ERROR_CODE",{value:"E126",enumerable:!1,configurable:!0});return(0,f.abortAndThrowOnSynchronousRequestDataAccess)(c.route,a,b,g)}case"prerender-client":case"validation-client":let d="`draftMode`";throw Object.defineProperty(new j.InvariantError(`${d} must not be used within a Client Component. Next.js should be preventing ${d} from being included in Client Components statically, but did not in this case.`),"__NEXT_ERROR_CODE",{value:"E1046",enumerable:!1,configurable:!0});case"prerender-ppr":return(0,f.postponeWithTracking)(c.route,a,g.dynamicTracking);case"prerender-legacy":g.revalidate=0;let e=Object.defineProperty(new i.DynamicServerError(`Route ${c.route} couldn't be rendered statically because it used \`${a}\`. See more info here: https://nextjs.org/docs/messages/dynamic-server-error`),"__NEXT_ERROR_CODE",{value:"E558",enumerable:!1,configurable:!0});throw c.dynamicUsageDescription=a,c.dynamicUsageStack=e.stack,e;case"request":(0,f.trackDynamicDataInDynamicRender)(g);break;case"generate-static-params":throw Object.defineProperty(Error(`Route ${c.route} used \`${a}\` inside \`generateStaticParams\`. This is not supported because \`generateStaticParams\` runs at build time without an HTTP request. Read more: https://nextjs.org/docs/messages/next-dynamic-api-wrong-context`),"__NEXT_ERROR_CODE",{value:"E1121",enumerable:!1,configurable:!0})}}}(0,g.createDedupedByCallsiteServerErrorLoggerDev)(function(a,b){let c=a?`Route "${a}" `:"This route ";return Object.defineProperty(Error(`${c}used ${b}. \`draftMode()\` returns a Promise and must be unwrapped with \`await\` or \`React.use()\` before accessing its properties. Learn more: https://nextjs.org/docs/messages/sync-dynamic-apis`),"__NEXT_ERROR_CODE",{value:"E835",enumerable:!1,configurable:!0})})},5246,(a,b,c)=>{b.exports.cookies=a.r(81740).cookies,b.exports.headers=a.r(35754).headers,b.exports.draftMode=a.r(51125).draftMode},45017,a=>{"use strict";a.s(["Sidebar",()=>b]);let b=(0,a.i(11857).registerClientReference)(function(){throw Error("Attempted to call Sidebar() from the server but Sidebar is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/apps/web/components/sidebar.tsx <module evaluation>","Sidebar")},10398,a=>{"use strict";a.s(["Sidebar",()=>b]);let b=(0,a.i(11857).registerClientReference)(function(){throw Error("Attempted to call Sidebar() from the server but Sidebar is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/apps/web/components/sidebar.tsx","Sidebar")},23604,a=>{"use strict";a.i(45017);var b=a.i(10398);a.n(b)},59969,a=>{"use strict";a.s(["LiveRefresher",()=>b]);let b=(0,a.i(11857).registerClientReference)(function(){throw Error("Attempted to call LiveRefresher() from the server but LiveRefresher is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/apps/web/components/live-refresher.tsx <module evaluation>","LiveRefresher")},11272,a=>{"use strict";a.s(["LiveRefresher",()=>b]);let b=(0,a.i(11857).registerClientReference)(function(){throw Error("Attempted to call LiveRefresher() from the server but LiveRefresher is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/apps/web/components/live-refresher.tsx","LiveRefresher")},30642,a=>{"use strict";a.i(59969);var b=a.i(11272);a.n(b)},99153,a=>{"use strict";a.s(["LiveSessionsWidget",()=>b]);let b=(0,a.i(11857).registerClientReference)(function(){throw Error("Attempted to call LiveSessionsWidget() from the server but LiveSessionsWidget is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/apps/web/components/live-sessions-widget.tsx <module evaluation>","LiveSessionsWidget")},62615,a=>{"use strict";a.s(["LiveSessionsWidget",()=>b]);let b=(0,a.i(11857).registerClientReference)(function(){throw Error("Attempted to call LiveSessionsWidget() from the server but LiveSessionsWidget is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/apps/web/components/live-sessions-widget.tsx","LiveSessionsWidget")},9647,a=>{"use strict";a.i(99153);var b=a.i(62615);a.n(b)},14022,a=>{"use strict";a.s(["JobQueueWidget",()=>b]);let b=(0,a.i(11857).registerClientReference)(function(){throw Error("Attempted to call JobQueueWidget() from the server but JobQueueWidget is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/apps/web/components/job-queue-widget.tsx <module evaluation>","JobQueueWidget")},5900,a=>{"use strict";a.s(["JobQueueWidget",()=>b]);let b=(0,a.i(11857).registerClientReference)(function(){throw Error("Attempted to call JobQueueWidget() from the server but JobQueueWidget is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/apps/web/components/job-queue-widget.tsx","JobQueueWidget")},84829,a=>{"use strict";a.i(14022);var b=a.i(5900);a.n(b)},28992,a=>{"use strict";var b=a.i(7997),c=a.i(5246),d=a.i(23604),e=a.i(30642),f=a.i(9647),g=a.i(84829);a.i(23895);var h=a.i(88522),i=a.i(67116),j=a.i(70709),k=a.i(76597),l=a.i(40095);async function m({children:a}){let[n,o,p,q]=await Promise.all([(0,h.listProjects)(),(0,h.walkJsonlFiles)(),(0,i.listSessions)(),(0,k.buildEntriesIndex)()]),r=p.slice(0,20),s=p.length,t=(0,j.latestUsageSnapshot)(),u=r.map(a=>({id:a.id,projectName:a.projectName,firstUserPreview:a.firstUserPreview,lastUserPreview:a.lastUserPreview,lastAgentPreview:a.lastAgentPreview,firstTimestamp:a.firstTimestamp,lastTimestamp:a.lastTimestamp,teamName:a.teamName,agentName:a.agentName,agent:a.agent})),v={};for(let a of r){let b=q.bySession.get(a.id)??[];if(0===b.length)continue;let c=b[b.length-1];v[a.id]={outcome:c.enrichment.outcome??null,enrichmentStatus:c.enrichment.status,localDay:c.local_day}}let w=await (0,c.cookies)(),x=w.get("claude-lens-theme")?.value;return(0,b.jsx)("html",{lang:"en","data-theme":"light"===x||"dark"===x?x:"dark",suppressHydrationWarning:!0,children:(0,b.jsxs)("body",{children:[(0,b.jsx)(e.LiveRefresher,{}),(0,b.jsxs)("div",{style:{display:"flex",height:"100vh"},children:[(0,b.jsx)(d.Sidebar,{projects:n,totalSessions:s,currentUsage:t,version:"0.9.0",latestChangelogVersion:l.LATEST_VERSION}),(0,b.jsx)("main",{style:{flex:1,minWidth:0,minHeight:0,padding:0,overflow:"auto"},children:a})]}),(0,b.jsx)(f.LiveSessionsWidget,{sessions:u,entrySummaries:v}),(0,b.jsx)(g.JobQueueWidget,{})]})})}a.s(["default",0,m,"dynamic",0,"force-dynamic","metadata",0,{title:"Fleetlens",description:"Multi-agent fleet analytics — local-only dashboard for Claude Code, Codex, and other coding-agent sessions."}],28992)},44665,a=>{a.n(a.i(28992))}];
|
|
1
|
+
module.exports=[63681,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});var d={RequestCookies:function(){return f.RequestCookies},ResponseCookies:function(){return f.ResponseCookies},stringifyCookie:function(){return f.stringifyCookie}};for(var e in d)Object.defineProperty(c,e,{enumerable:!0,get:d[e]});let f=a.r(36226)},51409,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"ReflectAdapter",{enumerable:!0,get:function(){return d}});class d{static get(a,b,c){let d=Reflect.get(a,b,c);return"function"==typeof d?d.bind(a):d}static set(a,b,c,d){return Reflect.set(a,b,c,d)}static has(a,b){return Reflect.has(a,b)}static deleteProperty(a,b){return Reflect.deleteProperty(a,b)}}},4712,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});var d={ActionDidNotRevalidate:function(){return f},ActionDidRevalidateDynamicOnly:function(){return h},ActionDidRevalidateStaticAndDynamic:function(){return g}};for(var e in d)Object.defineProperty(c,e,{enumerable:!0,get:d[e]});let f=0,g=1,h=2},14896,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});var d={MutableRequestCookiesAdapter:function(){return o},ReadonlyRequestCookiesError:function(){return j},RequestCookiesAdapter:function(){return k},appendMutableCookies:function(){return n},areCookiesMutableInCurrentPhase:function(){return q},createCookiesWithMutableAccessCheck:function(){return p},getModifiedCookieValues:function(){return m},responseCookiesToRequestCookies:function(){return s}};for(var e in d)Object.defineProperty(c,e,{enumerable:!0,get:d[e]});let f=a.r(63681),g=a.r(51409),h=a.r(56704),i=a.r(4712);class j extends Error{constructor(){super("Cookies can only be modified in a Server Action or Route Handler. Read more: https://nextjs.org/docs/app/api-reference/functions/cookies#options")}static callable(){throw new j}}class k{static seal(a){return new Proxy(a,{get(a,b,c){switch(b){case"clear":case"delete":case"set":return j.callable;default:return g.ReflectAdapter.get(a,b,c)}}})}}let l=Symbol.for("next.mutated.cookies");function m(a){let b=a[l];return b&&Array.isArray(b)&&0!==b.length?b:[]}function n(a,b){let c=m(b);if(0===c.length)return!1;let d=new f.ResponseCookies(a),e=d.getAll();for(let a of c)d.set(a);for(let a of e)d.set(a);return!0}class o{static wrap(a,b){let c=new f.ResponseCookies(new Headers);for(let b of a.getAll())c.set(b);let d=[],e=new Set,j=()=>{let a=h.workAsyncStorage.getStore();if(a&&(a.pathWasRevalidated=i.ActionDidRevalidateStaticAndDynamic),d=c.getAll().filter(a=>e.has(a.name)),b){let a=[];for(let b of d){let c=new f.ResponseCookies(new Headers);c.set(b),a.push(c.toString())}b(a)}},k=new Proxy(c,{get(a,b,c){switch(b){case l:return d;case"delete":return function(...b){e.add("string"==typeof b[0]?b[0]:b[0].name);try{return a.delete(...b),k}finally{j()}};case"set":return function(...b){e.add("string"==typeof b[0]?b[0]:b[0].name);try{return a.set(...b),k}finally{j()}};default:return g.ReflectAdapter.get(a,b,c)}}});return k}}function p(a){let b=new Proxy(a.mutableCookies,{get(c,d,e){switch(d){case"delete":return function(...d){return r(a,"cookies().delete"),c.delete(...d),b};case"set":return function(...d){return r(a,"cookies().set"),c.set(...d),b};default:return g.ReflectAdapter.get(c,d,e)}}});return b}function q(a){return"action"===a.phase}function r(a,b){if(!q(a))throw new j}function s(a){let b=new f.RequestCookies(new Headers);for(let c of a.getAll())b.set(c);return b}},8018,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"createDedupedByCallsiteServerErrorLoggerDev",{enumerable:!0,get:function(){return i}});let d=function(a){if(a&&a.__esModule)return a;if(null===a||"object"!=typeof a&&"function"!=typeof a)return{default:a};var b=e(void 0);if(b&&b.has(a))return b.get(a);var c={__proto__:null},d=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var f in a)if("default"!==f&&Object.prototype.hasOwnProperty.call(a,f)){var g=d?Object.getOwnPropertyDescriptor(a,f):null;g&&(g.get||g.set)?Object.defineProperty(c,f,g):c[f]=a[f]}return c.default=a,b&&b.set(a,c),c}(a.r(717));function e(a){if("function"!=typeof WeakMap)return null;var b=new WeakMap,c=new WeakMap;return(e=function(a){return a?c:b})(a)}let f={current:null},g="function"==typeof d.cache?d.cache:a=>a,h=console.warn;function i(a){return function(...b){h(a(...b))}}g(a=>{try{h(f.current)}finally{f.current=null}})},86309,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});var d={isRequestAPICallableInsideAfter:function(){return j},throwForSearchParamsAccessInUseCache:function(){return i},throwWithStaticGenerationBailoutErrorWithDynamicError:function(){return h}};for(var e in d)Object.defineProperty(c,e,{enumerable:!0,get:d[e]});let f=a.r(60312),g=a.r(24725);function h(a,b){throw Object.defineProperty(new f.StaticGenBailoutError(`Route ${a} with \`dynamic = "error"\` couldn't be rendered statically because it used ${b}. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`),"__NEXT_ERROR_CODE",{value:"E543",enumerable:!1,configurable:!0})}function i(a,b){let c=Object.defineProperty(Error(`Route ${a.route} used \`searchParams\` inside "use cache". Accessing dynamic request data inside a cache scope is not supported. If you need some search params inside a cached function await \`searchParams\` outside of the cached function and pass only the required search params as arguments to the cached function. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`),"__NEXT_ERROR_CODE",{value:"E842",enumerable:!1,configurable:!0});throw Error.captureStackTrace(c,b),a.invalidDynamicUsageError??=c,c}function j(){let a=g.afterTaskAsyncStorage.getStore();return(null==a?void 0:a.rootTaskSpawnPhase)==="action"}},81740,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"cookies",{enumerable:!0,get:function(){return n}});let d=a.r(14896),e=a.r(63681),f=a.r(56704),g=a.r(32319),h=a.r(60384),i=a.r(60312),j=a.r(13091),k=a.r(8018),l=a.r(86309),m=a.r(50640);function n(){let a="cookies",b=f.workAsyncStorage.getStore(),c=g.workUnitAsyncStorage.getStore();if(b){if(c&&"after"===c.phase&&!(0,l.isRequestAPICallableInsideAfter)())throw Object.defineProperty(Error(`Route ${b.route} used \`cookies()\` inside \`after()\`. This is not supported. If you need this data inside an \`after()\` callback, use \`cookies()\` outside of the callback. See more info here: https://nextjs.org/docs/canary/app/api-reference/functions/after`),"__NEXT_ERROR_CODE",{value:"E843",enumerable:!1,configurable:!0});if(b.forceStatic)return p(d.RequestCookiesAdapter.seal(new e.RequestCookies(new Headers({}))));if(b.dynamicShouldError)throw Object.defineProperty(new i.StaticGenBailoutError(`Route ${b.route} with \`dynamic = "error"\` couldn't be rendered statically because it used \`cookies()\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`),"__NEXT_ERROR_CODE",{value:"E849",enumerable:!1,configurable:!0});if(c)switch(c.type){case"cache":let f=Object.defineProperty(Error(`Route ${b.route} used \`cookies()\` inside "use cache". Accessing Dynamic data sources inside a cache scope is not supported. If you need this data inside a cached function use \`cookies()\` outside of the cached function and pass the required dynamic data in as an argument. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`),"__NEXT_ERROR_CODE",{value:"E831",enumerable:!1,configurable:!0});throw Error.captureStackTrace(f,n),b.invalidDynamicUsageError??=f,f;case"unstable-cache":throw Object.defineProperty(Error(`Route ${b.route} used \`cookies()\` inside a function cached with \`unstable_cache()\`. Accessing Dynamic data sources inside a cache scope is not supported. If you need this data inside a cached function use \`cookies()\` outside of the cached function and pass the required dynamic data in as an argument. See more info here: https://nextjs.org/docs/app/api-reference/functions/unstable_cache`),"__NEXT_ERROR_CODE",{value:"E846",enumerable:!1,configurable:!0});case"generate-static-params":throw Object.defineProperty(Error(`Route ${b.route} used \`cookies()\` inside \`generateStaticParams\`. This is not supported because \`generateStaticParams\` runs at build time without an HTTP request. Read more: https://nextjs.org/docs/messages/next-dynamic-api-wrong-context`),"__NEXT_ERROR_CODE",{value:"E1123",enumerable:!1,configurable:!0});case"prerender":var k=b,q=c;let r=o.get(q);if(r)return r;let s=(0,j.makeHangingPromise)(q.renderSignal,k.route,"`cookies()`");return o.set(q,s),s;case"prerender-client":case"validation-client":let t="`cookies`";throw Object.defineProperty(new m.InvariantError(`${t} must not be used within a Client Component. Next.js should be preventing ${t} from being included in Client Components statically, but did not in this case.`),"__NEXT_ERROR_CODE",{value:"E1037",enumerable:!1,configurable:!0});case"prerender-ppr":return(0,h.postponeWithTracking)(b.route,a,c.dynamicTracking);case"prerender-legacy":return(0,h.throwToInterruptStaticGeneration)(a,b,c);case"prerender-runtime":return(0,j.delayUntilRuntimeStage)(c,p(c.cookies));case"private-cache":return p(c.cookies);case"request":let u;if((0,h.trackDynamicDataInDynamicRender)(c),u=(0,d.areCookiesMutableInCurrentPhase)(c)?c.userspaceMutableCookies:c.cookies,!c.asyncApiPromises)return p(u);{let a=(0,g.isInEarlyRenderStage)(c);if(u===c.mutableCookies)return a?c.asyncApiPromises.earlyMutableCookies:c.asyncApiPromises.mutableCookies;return a?c.asyncApiPromises.earlyCookies:c.asyncApiPromises.cookies}}}(0,g.throwForMissingRequestStore)(a)}a.r(31382);let o=new WeakMap;function p(a){let b=o.get(a);if(b)return b;let c=Promise.resolve(a);return o.set(a,c),c}(0,k.createDedupedByCallsiteServerErrorLoggerDev)(function(a,b){let c=a?`Route "${a}" `:"This route ";return Object.defineProperty(Error(`${c}used ${b}. \`cookies()\` returns a Promise and must be unwrapped with \`await\` or \`React.use()\` before accessing its properties. Learn more: https://nextjs.org/docs/messages/sync-dynamic-apis`),"__NEXT_ERROR_CODE",{value:"E830",enumerable:!1,configurable:!0})})},29927,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});var d={HeadersAdapter:function(){return h},ReadonlyHeadersError:function(){return g}};for(var e in d)Object.defineProperty(c,e,{enumerable:!0,get:d[e]});let f=a.r(51409);class g extends Error{constructor(){super("Headers cannot be modified. Read more: https://nextjs.org/docs/app/api-reference/functions/headers")}static callable(){throw new g}}class h extends Headers{constructor(a){super(),this.headers=new Proxy(a,{get(b,c,d){if("symbol"==typeof c)return f.ReflectAdapter.get(b,c,d);let e=c.toLowerCase(),g=Object.keys(a).find(a=>a.toLowerCase()===e);if(void 0!==g)return f.ReflectAdapter.get(b,g,d)},set(b,c,d,e){if("symbol"==typeof c)return f.ReflectAdapter.set(b,c,d,e);let g=c.toLowerCase(),h=Object.keys(a).find(a=>a.toLowerCase()===g);return f.ReflectAdapter.set(b,h??c,d,e)},has(b,c){if("symbol"==typeof c)return f.ReflectAdapter.has(b,c);let d=c.toLowerCase(),e=Object.keys(a).find(a=>a.toLowerCase()===d);return void 0!==e&&f.ReflectAdapter.has(b,e)},deleteProperty(b,c){if("symbol"==typeof c)return f.ReflectAdapter.deleteProperty(b,c);let d=c.toLowerCase(),e=Object.keys(a).find(a=>a.toLowerCase()===d);return void 0===e||f.ReflectAdapter.deleteProperty(b,e)}})}static seal(a){return new Proxy(a,{get(a,b,c){switch(b){case"append":case"delete":case"set":return g.callable;default:return f.ReflectAdapter.get(a,b,c)}}})}merge(a){return Array.isArray(a)?a.join(", "):a}static from(a){return a instanceof Headers?a:new h(a)}append(a,b){let c=this.headers[a];"string"==typeof c?this.headers[a]=[c,b]:Array.isArray(c)?c.push(b):this.headers[a]=b}delete(a){delete this.headers[a]}get(a){let b=this.headers[a];return void 0!==b?this.merge(b):null}has(a){return void 0!==this.headers[a]}set(a,b){this.headers[a]=b}forEach(a,b){for(let[c,d]of this.entries())a.call(b,d,c,this)}*entries(){for(let a of Object.keys(this.headers)){let b=a.toLowerCase(),c=this.get(b);yield[b,c]}}*keys(){for(let a of Object.keys(this.headers)){let b=a.toLowerCase();yield b}}*values(){for(let a of Object.keys(this.headers)){let b=this.get(a);yield b}}[Symbol.iterator](){return this.entries()}}},35754,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"headers",{enumerable:!0,get:function(){return m}});let d=a.r(29927),e=a.r(56704),f=a.r(32319),g=a.r(60384),h=a.r(60312),i=a.r(13091),j=a.r(8018),k=a.r(86309),l=a.r(50640);function m(){let a="headers",b=e.workAsyncStorage.getStore(),c=f.workUnitAsyncStorage.getStore();if(b){if(c&&"after"===c.phase&&!(0,k.isRequestAPICallableInsideAfter)())throw Object.defineProperty(Error(`Route ${b.route} used \`headers()\` inside \`after()\`. This is not supported. If you need this data inside an \`after()\` callback, use \`headers()\` outside of the callback. See more info here: https://nextjs.org/docs/canary/app/api-reference/functions/after`),"__NEXT_ERROR_CODE",{value:"E839",enumerable:!1,configurable:!0});if(b.forceStatic)return o(d.HeadersAdapter.seal(new Headers({})));if(c)switch(c.type){case"cache":{let a=Object.defineProperty(Error(`Route ${b.route} used \`headers()\` inside "use cache". Accessing Dynamic data sources inside a cache scope is not supported. If you need this data inside a cached function use \`headers()\` outside of the cached function and pass the required dynamic data in as an argument. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`),"__NEXT_ERROR_CODE",{value:"E833",enumerable:!1,configurable:!0});throw Error.captureStackTrace(a,m),b.invalidDynamicUsageError??=a,a}case"unstable-cache":throw Object.defineProperty(Error(`Route ${b.route} used \`headers()\` inside a function cached with \`unstable_cache()\`. Accessing Dynamic data sources inside a cache scope is not supported. If you need this data inside a cached function use \`headers()\` outside of the cached function and pass the required dynamic data in as an argument. See more info here: https://nextjs.org/docs/app/api-reference/functions/unstable_cache`),"__NEXT_ERROR_CODE",{value:"E838",enumerable:!1,configurable:!0});case"generate-static-params":throw Object.defineProperty(Error(`Route ${b.route} used \`headers()\` inside \`generateStaticParams\`. This is not supported because \`generateStaticParams\` runs at build time without an HTTP request. Read more: https://nextjs.org/docs/messages/next-dynamic-api-wrong-context`),"__NEXT_ERROR_CODE",{value:"E1134",enumerable:!1,configurable:!0})}if(b.dynamicShouldError)throw Object.defineProperty(new h.StaticGenBailoutError(`Route ${b.route} with \`dynamic = "error"\` couldn't be rendered statically because it used \`headers()\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`),"__NEXT_ERROR_CODE",{value:"E828",enumerable:!1,configurable:!0});if(c)switch(c.type){case"prerender":var j=b,p=c;let e=n.get(p);if(e)return e;let q=(0,i.makeHangingPromise)(p.renderSignal,j.route,"`headers()`");return n.set(p,q),q;case"prerender-client":case"validation-client":let r="`headers`";throw Object.defineProperty(new l.InvariantError(`${r} must not be used within a client component. Next.js should be preventing ${r} from being included in client components statically, but did not in this case.`),"__NEXT_ERROR_CODE",{value:"E1017",enumerable:!1,configurable:!0});case"prerender-ppr":return(0,g.postponeWithTracking)(b.route,a,c.dynamicTracking);case"prerender-legacy":return(0,g.throwToInterruptStaticGeneration)(a,b,c);case"prerender-runtime":return(0,i.delayUntilRuntimeStage)(c,o(c.headers));case"private-cache":return o(c.headers);case"request":if((0,g.trackDynamicDataInDynamicRender)(c),c.asyncApiPromises)return(0,f.isInEarlyRenderStage)(c)?c.asyncApiPromises.earlyHeaders:c.asyncApiPromises.headers;return o(c.headers)}}(0,f.throwForMissingRequestStore)(a)}a.r(31382);let n=new WeakMap;function o(a){let b=n.get(a);if(b)return b;let c=Promise.resolve(a);return n.set(a,c),c}(0,j.createDedupedByCallsiteServerErrorLoggerDev)(function(a,b){let c=a?`Route "${a}" `:"This route ";return Object.defineProperty(Error(`${c}used ${b}. \`headers()\` returns a Promise and must be unwrapped with \`await\` or \`React.use()\` before accessing its properties. Learn more: https://nextjs.org/docs/messages/sync-dynamic-apis`),"__NEXT_ERROR_CODE",{value:"E836",enumerable:!1,configurable:!0})})},51125,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"draftMode",{enumerable:!0,get:function(){return l}});let d=a.r(32319),e=a.r(56704),f=a.r(60384),g=a.r(8018),h=a.r(60312),i=a.r(96556),j=a.r(50640),k=a.r(13091);function l(){let a="draftMode",b=e.workAsyncStorage.getStore(),c=d.workUnitAsyncStorage.getStore();switch((!b||!c)&&(0,d.throwForMissingRequestStore)(a),c.type){case"prerender-runtime":return(0,k.delayUntilRuntimeStage)(c,m(c.draftMode,b));case"request":return m(c.draftMode,b);case"cache":case"private-cache":case"unstable-cache":let f=(0,d.getDraftModeProviderForCacheScope)(b,c);if(f)return m(f,b);case"prerender":case"prerender-ppr":case"prerender-legacy":return m(null,b);case"prerender-client":case"validation-client":{let a="`draftMode`";throw Object.defineProperty(new j.InvariantError(`${a} must not be used within a Client Component. Next.js should be preventing ${a} from being included in Client Components statically, but did not in this case.`),"__NEXT_ERROR_CODE",{value:"E1046",enumerable:!1,configurable:!0})}case"generate-static-params":throw Object.defineProperty(Error(`Route ${b.route} used \`${a}()\` inside \`generateStaticParams\`. This is not supported because \`generateStaticParams\` runs at build time without an HTTP request. Read more: https://nextjs.org/docs/messages/next-dynamic-api-wrong-context`),"__NEXT_ERROR_CODE",{value:"E1132",enumerable:!1,configurable:!0});default:return c}}function m(a,b){let c=o.get(a??n);return c||Promise.resolve(new p(a))}a.r(51409);let n={},o=new WeakMap;class p{constructor(a){this._provider=a}get isEnabled(){return null!==this._provider&&this._provider.isEnabled}enable(){q("draftMode().enable()",this.enable),null!==this._provider&&this._provider.enable()}disable(){q("draftMode().disable()",this.disable),null!==this._provider&&this._provider.disable()}}function q(a,b){let c=e.workAsyncStorage.getStore(),g=d.workUnitAsyncStorage.getStore();if(c){if((null==g?void 0:g.phase)==="after")throw Object.defineProperty(Error(`Route ${c.route} used "${a}" inside \`after()\`. The enabled status of \`draftMode()\` can be read inside \`after()\` but you cannot enable or disable \`draftMode()\`. See more info here: https://nextjs.org/docs/app/api-reference/functions/after`),"__NEXT_ERROR_CODE",{value:"E845",enumerable:!1,configurable:!0});if(c.dynamicShouldError)throw Object.defineProperty(new h.StaticGenBailoutError(`Route ${c.route} with \`dynamic = "error"\` couldn't be rendered statically because it used \`${a}\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`),"__NEXT_ERROR_CODE",{value:"E553",enumerable:!1,configurable:!0});if(g)switch(g.type){case"cache":case"private-cache":{let d=Object.defineProperty(Error(`Route ${c.route} used "${a}" inside "use cache". The enabled status of \`draftMode()\` can be read in caches but you must not enable or disable \`draftMode()\` inside a cache. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`),"__NEXT_ERROR_CODE",{value:"E829",enumerable:!1,configurable:!0});throw Error.captureStackTrace(d,b),c.invalidDynamicUsageError??=d,d}case"unstable-cache":throw Object.defineProperty(Error(`Route ${c.route} used "${a}" inside a function cached with \`unstable_cache()\`. The enabled status of \`draftMode()\` can be read in caches but you must not enable or disable \`draftMode()\` inside a cache. See more info here: https://nextjs.org/docs/app/api-reference/functions/unstable_cache`),"__NEXT_ERROR_CODE",{value:"E844",enumerable:!1,configurable:!0});case"prerender":case"prerender-runtime":{let b=Object.defineProperty(Error(`Route ${c.route} used ${a} without first calling \`await connection()\`. See more info here: https://nextjs.org/docs/messages/next-prerender-sync-headers`),"__NEXT_ERROR_CODE",{value:"E126",enumerable:!1,configurable:!0});return(0,f.abortAndThrowOnSynchronousRequestDataAccess)(c.route,a,b,g)}case"prerender-client":case"validation-client":let d="`draftMode`";throw Object.defineProperty(new j.InvariantError(`${d} must not be used within a Client Component. Next.js should be preventing ${d} from being included in Client Components statically, but did not in this case.`),"__NEXT_ERROR_CODE",{value:"E1046",enumerable:!1,configurable:!0});case"prerender-ppr":return(0,f.postponeWithTracking)(c.route,a,g.dynamicTracking);case"prerender-legacy":g.revalidate=0;let e=Object.defineProperty(new i.DynamicServerError(`Route ${c.route} couldn't be rendered statically because it used \`${a}\`. See more info here: https://nextjs.org/docs/messages/dynamic-server-error`),"__NEXT_ERROR_CODE",{value:"E558",enumerable:!1,configurable:!0});throw c.dynamicUsageDescription=a,c.dynamicUsageStack=e.stack,e;case"request":(0,f.trackDynamicDataInDynamicRender)(g);break;case"generate-static-params":throw Object.defineProperty(Error(`Route ${c.route} used \`${a}\` inside \`generateStaticParams\`. This is not supported because \`generateStaticParams\` runs at build time without an HTTP request. Read more: https://nextjs.org/docs/messages/next-dynamic-api-wrong-context`),"__NEXT_ERROR_CODE",{value:"E1121",enumerable:!1,configurable:!0})}}}(0,g.createDedupedByCallsiteServerErrorLoggerDev)(function(a,b){let c=a?`Route "${a}" `:"This route ";return Object.defineProperty(Error(`${c}used ${b}. \`draftMode()\` returns a Promise and must be unwrapped with \`await\` or \`React.use()\` before accessing its properties. Learn more: https://nextjs.org/docs/messages/sync-dynamic-apis`),"__NEXT_ERROR_CODE",{value:"E835",enumerable:!1,configurable:!0})})},5246,(a,b,c)=>{b.exports.cookies=a.r(81740).cookies,b.exports.headers=a.r(35754).headers,b.exports.draftMode=a.r(51125).draftMode},45017,a=>{"use strict";a.s(["Sidebar",()=>b]);let b=(0,a.i(11857).registerClientReference)(function(){throw Error("Attempted to call Sidebar() from the server but Sidebar is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/apps/web/components/sidebar.tsx <module evaluation>","Sidebar")},10398,a=>{"use strict";a.s(["Sidebar",()=>b]);let b=(0,a.i(11857).registerClientReference)(function(){throw Error("Attempted to call Sidebar() from the server but Sidebar is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/apps/web/components/sidebar.tsx","Sidebar")},23604,a=>{"use strict";a.i(45017);var b=a.i(10398);a.n(b)},59969,a=>{"use strict";a.s(["LiveRefresher",()=>b]);let b=(0,a.i(11857).registerClientReference)(function(){throw Error("Attempted to call LiveRefresher() from the server but LiveRefresher is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/apps/web/components/live-refresher.tsx <module evaluation>","LiveRefresher")},11272,a=>{"use strict";a.s(["LiveRefresher",()=>b]);let b=(0,a.i(11857).registerClientReference)(function(){throw Error("Attempted to call LiveRefresher() from the server but LiveRefresher is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/apps/web/components/live-refresher.tsx","LiveRefresher")},30642,a=>{"use strict";a.i(59969);var b=a.i(11272);a.n(b)},99153,a=>{"use strict";a.s(["LiveSessionsWidget",()=>b]);let b=(0,a.i(11857).registerClientReference)(function(){throw Error("Attempted to call LiveSessionsWidget() from the server but LiveSessionsWidget is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/apps/web/components/live-sessions-widget.tsx <module evaluation>","LiveSessionsWidget")},62615,a=>{"use strict";a.s(["LiveSessionsWidget",()=>b]);let b=(0,a.i(11857).registerClientReference)(function(){throw Error("Attempted to call LiveSessionsWidget() from the server but LiveSessionsWidget is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/apps/web/components/live-sessions-widget.tsx","LiveSessionsWidget")},9647,a=>{"use strict";a.i(99153);var b=a.i(62615);a.n(b)},14022,a=>{"use strict";a.s(["JobQueueWidget",()=>b]);let b=(0,a.i(11857).registerClientReference)(function(){throw Error("Attempted to call JobQueueWidget() from the server but JobQueueWidget is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/apps/web/components/job-queue-widget.tsx <module evaluation>","JobQueueWidget")},5900,a=>{"use strict";a.s(["JobQueueWidget",()=>b]);let b=(0,a.i(11857).registerClientReference)(function(){throw Error("Attempted to call JobQueueWidget() from the server but JobQueueWidget is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/apps/web/components/job-queue-widget.tsx","JobQueueWidget")},84829,a=>{"use strict";a.i(14022);var b=a.i(5900);a.n(b)},28992,a=>{"use strict";var b=a.i(7997),c=a.i(5246),d=a.i(23604),e=a.i(30642),f=a.i(9647),g=a.i(84829);a.i(23895);var h=a.i(88522),i=a.i(67116),j=a.i(70709),k=a.i(76597),l=a.i(40095);async function m({children:a}){let[n,o,p,q]=await Promise.all([(0,h.listProjects)(),(0,h.walkJsonlFiles)(),(0,i.listSessions)(),(0,k.buildEntriesIndex)()]),r=p.slice(0,20),s=p.length,t=(0,j.latestUsageSnapshot)(),u=r.map(a=>({id:a.id,projectName:a.projectName,firstUserPreview:a.firstUserPreview,lastUserPreview:a.lastUserPreview,lastAgentPreview:a.lastAgentPreview,firstTimestamp:a.firstTimestamp,lastTimestamp:a.lastTimestamp,teamName:a.teamName,agentName:a.agentName,agent:a.agent})),v={};for(let a of r){let b=q.bySession.get(a.id)??[];if(0===b.length)continue;let c=b[b.length-1];v[a.id]={outcome:c.enrichment.outcome??null,enrichmentStatus:c.enrichment.status,localDay:c.local_day}}let w=await (0,c.cookies)(),x=w.get("claude-lens-theme")?.value;return(0,b.jsx)("html",{lang:"en","data-theme":"light"===x||"dark"===x?x:"dark",suppressHydrationWarning:!0,children:(0,b.jsxs)("body",{children:[(0,b.jsx)(e.LiveRefresher,{}),(0,b.jsxs)("div",{style:{display:"flex",height:"100vh"},children:[(0,b.jsx)(d.Sidebar,{projects:n,totalSessions:s,currentUsage:t,version:"0.10.1",latestChangelogVersion:l.LATEST_VERSION}),(0,b.jsx)("main",{style:{flex:1,minWidth:0,minHeight:0,padding:0,overflow:"auto"},children:a})]}),(0,b.jsx)(f.LiveSessionsWidget,{sessions:u,entrySummaries:v}),(0,b.jsx)(g.JobQueueWidget,{})]})})}a.s(["default",0,m,"dynamic",0,"force-dynamic","metadata",0,{title:"Fleetlens",description:"Multi-agent fleet analytics — local-only dashboard for Claude Code, Codex, and other coding-agent sessions."}],28992)},44665,a=>{a.n(a.i(28992))}];
|
|
2
2
|
|
|
3
3
|
//# sourceMappingURL=_0xu2pvc._.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
module.exports=[85041,a=>{"use strict";var b=a.i(87924),c=a.i(72131),d=a.i(38246),e=a.i(33441),f=a.i(5151);let g={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"}},h={warn:"#ed8936",info:"#4299e1",ok:"#48bb78"};function i({token:a,count:c}){let d=g[a]??{token:a,label:a.replace(/_/g," "),description:`Internal flag: ${a}.`,tone:"info"},e=h[d.tone];return(0,b.jsxs)("span",{title:`${d.token} — ${d.description}`,style:{display:"inline-flex",alignItems:"center",gap:4,padding:"2px 8px",borderRadius:999,background:`color-mix(in srgb, ${e} 12%, transparent)`,border:`1px solid color-mix(in srgb, ${e} 28%, transparent)`,fontSize:10,fontWeight:600,color:e,fontFamily:"var(--font-mono)",whiteSpace:"nowrap"},children:[d.label,"number"==typeof c&&(0,b.jsxs)("span",{style:{opacity:.7,fontWeight:500},children:["×",c]})]})}function j(a){let c,d=Object.keys(g),e=RegExp(`\\b(${d.join("|")})\\b`,"g"),f=[],h=0;for(;null!==(c=e.exec(a));)c.index>h&&f.push(a.slice(h,c.index)),f.push((0,b.jsx)(i,{token:c[1]},`${c.index}-${c[1]}`)),h=e.lastIndex;return h<a.length&&f.push(a.slice(h)),f.length>0?f:[a]}var k=a.i(68381),l=a.i(99309);let m={essential:"#48bb78",helpful:"#4299e1",neutral:"#a0aec0",unhelpful:"#f56565"},n=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],o={"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"},p={"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"},q={outlier:"Outlier","novel-use":"Novel use","user-built-tool":"User-built tool","cross-week-contrast":"Cross-week contrast"},r={"claude-md":"CLAUDE.md addition",skill:"Skill to build",hook:"Hook to wire",harness:"Harness extension",decision:"Decision to make"};function s({digest:a,aiEnabled:c,actions:e,priorDigest:f}){var g,h;let i,l,m,n,o,p=a.shipped.length,q=Object.values(a.outcome_mix).reduce((a,b)=>a+(b??0),0),r=a.agent_min_total/60,v=r>=1?`${r.toFixed(1)}h`:`${Math.round(a.agent_min_total)}m`,w=f?(g=a,h=f,i=g.shipped.length-h.shipped.length,m=(l=g.agent_min_total-h.agent_min_total)/60,n=`${i>0?"+":""}${i} PR${1===Math.abs(i)?"":"s"}`,o=Math.abs(m)>=1?`${m>0?"+":""}${m.toFixed(1)}h`:`${l>0?"+":""}${Math.round(l)}m`,`${n} \xb7 ${o}`):null;return(0,b.jsxs)("div",{style:{maxWidth:980,margin:"0 auto",padding:"24px 40px"},children:[(0,b.jsxs)("header",{style:{marginBottom:24},children:[(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10,marginBottom:8,fontSize:12,color:"var(--af-text-tertiary)",fontWeight:500,flexWrap:"wrap"},children:[(0,b.jsxs)("span",{style:{fontFamily:"var(--font-mono)",color:"var(--af-text-secondary)"},children:[v," agent time · ",q," active day",1===q?"":"s"," · ",p," PR",1===p?"":"s"]}),w&&(0,b.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: ",w]}),e&&(0,b.jsx)("div",{style:{marginLeft:"auto",display:"inline-flex",alignItems:"center",gap:8},children:e})]}),a.headline?(0,b.jsx)("h1",{style:{fontSize:26,fontWeight:700,lineHeight:1.3,letterSpacing:"-0.02em",margin:"0 0 6px",maxWidth:820,color:"var(--af-text)"},children:j(a.headline)}):(0,b.jsx)("h1",{style:{fontSize:20,color:"var(--af-text-secondary)",margin:"0 0 14px"},children:c?"No narrative yet.":`Worked ${v} across ${a.projects.length} project${1===a.projects.length?"":"s"}.`}),a.key_pattern&&(0,b.jsx)("p",{style:{fontSize:13,fontStyle:"italic",margin:0,lineHeight:1.5,color:"var(--af-text-secondary)",maxWidth:820},children:j(a.key_pattern)})]}),!c&&(0,b.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,b.jsx)(d.default,{href:"/settings",style:{color:"var(--af-accent)"},children:"Settings"})," to see weekly narratives."]}),(0,b.jsx)(u,{digest:a}),(0,b.jsx)(y,{digest:a}),a.top_goal_categories.length>0&&(0,b.jsx)(L,{title:"Goal mix",anchor:"goals",children:(0,b.jsx)(k.GoalBar,{goals:a.top_goal_categories,total:a.agent_min_total})}),(0,b.jsx)(C,{digest:a}),a.top_sessions&&a.top_sessions.length>0&&(0,b.jsx)(P,{sessions:a.top_sessions}),(0,b.jsx)(G,{title:"What worked",anchor:"what-worked",items:a.what_worked??[],tone:"#48bb78",sectionFallbackProse:null}),(0,b.jsx)(G,{title:"What stalled",anchor:"what-stalled",items:a.what_stalled??[],tone:"#ed8936",sectionFallbackProse:"No stalls stuck this week."}),(0,b.jsx)(J,{items:a.what_surprised??[]}),(0,b.jsx)(K,{items:a.where_to_lean??[]}),(0,b.jsx)(F,{shipped:a.shipped}),!a.working_shapes&&(0,b.jsx)(t,{digest:a})]})}function t({digest:a}){let c=a.recurring_themes??[],d=a.outcome_correlations??[],e=a.friction_categories??[],f=a.suggestions,g=a.on_the_horizon,h=a.fun_ending;return c.length>0||d.length>0||e.length>0||(f?.claude_md_additions?.length??0)>0||g||h?(0,b.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,b.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 u({digest:a}){let c=a.agent_min_total/60,e=c>=1?`${c.toFixed(1)}h`:`${Math.round(a.agent_min_total)}m`,f=function(a){let b=a.reduce((a,b)=>a+b,0);if(0===b)return null;for(let c=1;c<=24;c++){let d=0,e=0;for(let b=0;b<=24-c;b++){let f=0;for(let d=0;d<c;d++)f+=a[b+d]??0;f>d&&(d=f,e=b)}if(d/b>=.6)return{start:e,end:e+c,share_pct:d/b*100}}return null}(a.hours_distribution),g=new Map(a.days_active.map(a=>[a.date,a])),h=B(a.window.start),i=h.map(a=>g.get(a)?.agent_min??0),j=Math.max(...i,1),k=a.busiest_day?h.indexOf(a.busiest_day.date):-1,l=a.longest_run&&a.busiest_day?Math.min(1,a.longest_run.active_min/Math.max(1,a.busiest_day.agent_min)):0,m=[];return(m.push({label:"Agent time",primary:e,detail:`across ${a.days_active.length} day${1===a.days_active.length?"":"s"}`,visual:(0,b.jsx)(v,{values:i,max:j,highlight:-1})}),a.busiest_day&&m.push({label:"Busiest day",href:`/digest/${a.busiest_day.date}`,primary:`${M(a.busiest_day.date)} ${a.busiest_day.date.slice(5)}`,detail:`${Math.round(a.busiest_day.agent_min)}m \xb7 ${a.busiest_day.shipped_count} PR${1===a.busiest_day.shipped_count?"":"s"}`,visual:(0,b.jsx)(v,{values:i,max:j,highlight:k})}),a.longest_run&&m.push({label:"Longest single run",href:`/sessions/${a.longest_run.session_id}`,title:`Session ${a.longest_run.session_id.slice(0,8)}`,primary:`${Math.round(a.longest_run.active_min)}m`,detail:`${a.longest_run.project_display} \xb7 ${M(a.longest_run.date)} ${a.longest_run.date.slice(5)}`,visual:(0,b.jsx)(w,{ratio:l,caption:"vs busiest day"})}),f&&m.push({label:"Peak hours",title:`${A(f.start,f.end)} carried ${f.share_pct.toFixed(0)}% of the week's agent time`,primary:A(f.start,f.end),detail:`${f.share_pct.toFixed(0)}% of agent time`,visual:(0,b.jsx)(x,{hours:a.hours_distribution,peakStart:f.start,peakEnd:f.end})}),0===m.length)?null:(0,b.jsx)("section",{style:{display:"grid",gridTemplateColumns:`repeat(${Math.min(m.length,4)}, minmax(0, 1fr))`,gap:10,marginBottom:20},children:m.map((a,c)=>{let e=(0,b.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:a.title,children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("div",{style:{fontSize:9,fontWeight:700,letterSpacing:"0.08em",textTransform:"uppercase",color:"var(--af-text-tertiary)",marginBottom:6},children:a.label}),(0,b.jsx)("div",{style:{fontSize:17,fontWeight:600,color:"var(--af-text)",letterSpacing:"-0.01em",lineHeight:1.2},children:a.primary}),(0,b.jsx)("div",{style:{fontSize:10.5,color:"var(--af-text-tertiary)",fontFamily:"var(--font-mono)",marginTop:3},children:a.detail})]}),a.visual&&(0,b.jsx)("div",{style:{marginTop:10},children:a.visual})]});return a.href?(0,b.jsx)(d.default,{href:a.href,style:{textDecoration:"none"},children:e},c):(0,b.jsx)("div",{children:e},c)})})}function v({values:a,max:c,highlight:d}){return(0,b.jsx)("div",{style:{display:"flex",gap:2,alignItems:"flex-end",height:18},children:a.map((a,e)=>{let f=c>0?Math.max(1,a/c*18):1,g=e===d;return(0,b.jsx)("div",{style:{flex:1,height:f,borderRadius:1,background:g?"var(--af-accent)":a>0?"color-mix(in srgb, var(--af-accent) 30%, transparent)":"var(--af-border-subtle)"}},e)})})}function w({ratio:a,caption:c}){let d=100*Math.max(0,Math.min(1,a));return(0,b.jsxs)("div",{children:[(0,b.jsx)("div",{style:{height:6,borderRadius:99,overflow:"hidden",background:"var(--af-border-subtle)"},children:(0,b.jsx)("div",{style:{width:`${d}%`,height:"100%",background:"var(--af-accent)"}})}),(0,b.jsxs)("div",{style:{fontSize:9,color:"var(--af-text-tertiary)",fontFamily:"var(--font-mono)",marginTop:3},children:[Math.round(d),"% ",c]})]})}function x({hours:a,peakStart:c,peakEnd:d}){let e=Math.max(...a,1);return(0,b.jsx)("div",{style:{display:"flex",gap:1,alignItems:"flex-end",height:18},children:a.map((a,f)=>{let g=f>=c&&f<=d,h=e>0?Math.max(1,a/e*18):1;return(0,b.jsx)("div",{style:{flex:1,height:h,borderRadius:1,background:g?"var(--af-accent)":a>0?"color-mix(in srgb, var(--af-accent) 22%, transparent)":"var(--af-border-subtle)"}},f)})})}function y({digest:a}){if(0===a.days_active.length)return null;let c=Math.max(...a.days_active.map(a=>a.agent_min)),e=new Map(a.days_active.map(a=>[a.date,a])),f=B(a.window.start);return(0,b.jsx)("section",{style:{display:"flex",gap:6,alignItems:"stretch",padding:"12px 0",marginBottom:24},children:f.map((a,f)=>{let g=e.get(a),h=g?.agent_min??0,i=c>0&&h>0?Math.max(8,h/c*100):0,j=g?z[g.outcome_day]:"var(--af-text-tertiary)",k=g?.helpfulness_day?m[g.helpfulness_day]:null;return(0,b.jsxs)(d.default,{href:g?`/digest/${a}`:"#",style:{flex:1,display:"flex",flexDirection:"column",alignItems:"stretch",gap:2,textDecoration:"none",pointerEvents:g?"auto":"none"},title:g?`${a} \xb7 ${Math.round(h)}m \xb7 ${g.outcome_day}${g.shipped_count>0?` \xb7 ${g.shipped_count} PR`:""}${g.helpfulness_day?` \xb7 helpfulness ${g.helpfulness_day}`:""}`:"no activity",children:[(0,b.jsxs)("div",{style:{height:56,borderRadius:4,position:"relative",background:"var(--af-surface)",border:`1px solid ${g?`color-mix(in srgb, ${j} 28%, var(--af-border-subtle))`:"var(--af-border-subtle)"}`,overflow:"hidden"},children:[g&&(0,b.jsx)("div",{style:{position:"absolute",bottom:0,left:0,right:0,height:`${i}%`,background:`color-mix(in srgb, ${j} 28%, transparent)`}}),g?.dominant_shape&&p[g.dominant_shape]&&(0,b.jsx)("div",{title:`${o[g.dominant_shape]??g.dominant_shape}`,style:{position:"absolute",top:0,left:0,right:0,height:3,background:p[g.dominant_shape]}}),k&&(0,b.jsx)("div",{style:{position:"absolute",top:4,right:4,width:6,height:6,borderRadius:999,background:k},title:g?.helpfulness_day??""})]}),(0,b.jsx)("div",{style:{fontSize:9,fontWeight:700,letterSpacing:"0.06em",color:"var(--af-text-tertiary)",textAlign:"center"},children:n[f]}),(0,b.jsx)("div",{style:{fontSize:9,fontFamily:"var(--font-mono)",color:g?"var(--af-text-secondary)":"var(--af-text-tertiary)",textAlign:"center"},children:g?`${Math.round(h)}m`:"—"})]},f)})})}let z={shipped:"#48bb78",partial:"#4299e1",blocked:"#f56565",exploratory:"#a0aec0",trivial:"#cbd5e0",idle:"#cbd5e0"};function A(a,b){let c=a=>`${a%12||12}${a<12||24===a?"am":"pm"}`;return`${c(a)}–${c(b)}`}function B(a){let b=[],c=new Date(a);for(let a=0;a<7;a++){let d=new Date(c);d.setDate(c.getDate()+a);let e=d.getFullYear(),f=String(d.getMonth()+1).padStart(2,"0"),g=String(d.getDate()).padStart(2,"0");b.push(`${e}-${f}-${g}`)}return b}function C({digest:a}){let c=a.trajectory&&a.trajectory.length>0,e=a.standout_days&&a.standout_days.length>0,f=a.projects.filter(a=>a.share_pct>=5||a.shipped_count>0),g=f.length>0;return c||e||g?(0,b.jsxs)(L,{title:"Through the week",anchor:"through-the-week",children:[(c||e)&&(0,b.jsxs)("div",{style:{display:"grid",gridTemplateColumns:c&&e?"minmax(0, 1.4fr) minmax(0, 1fr)":"1fr",gap:28,marginBottom:22*!!g},children:[c&&(0,b.jsxs)("div",{children:[(0,b.jsx)(D,{children:"Trajectory"}),(0,b.jsx)("ol",{style:{listStyle:"none",padding:0,margin:0,display:"flex",flexDirection:"column",gap:6},children:a.trajectory.map(a=>(0,b.jsxs)("li",{style:{display:"flex",gap:12,alignItems:"flex-start"},children:[(0,b.jsxs)(d.default,{href:`/digest/${a.date}`,style:{fontSize:10,fontWeight:600,color:"var(--af-text-tertiary)",fontFamily:"var(--font-mono)",flexShrink:0,width:64,paddingTop:3,textDecoration:"none"},children:[M(a.date)," ",a.date.slice(5)]}),(0,b.jsx)("span",{style:{fontSize:12.5,lineHeight:1.55,color:"var(--af-text-secondary)"},children:j(a.line)})]},a.date))})]}),e&&(0,b.jsxs)("div",{children:[(0,b.jsx)(D,{children:"Standout days"}),(0,b.jsx)("ul",{style:{listStyle:"none",padding:0,margin:0,display:"flex",flexDirection:"column",gap:8},children:a.standout_days.map(a=>(0,b.jsxs)("li",{style:{padding:"10px 12px",borderRadius:8,background:"var(--af-surface)",border:"1px solid var(--af-border-subtle)"},children:[(0,b.jsxs)(d.default,{href:`/digest/${a.date}`,style:{fontSize:11,fontWeight:600,color:"var(--af-accent)",textDecoration:"none",fontFamily:"var(--font-mono)",marginRight:8},children:[M(a.date)," ",a.date.slice(5)]}),(0,b.jsx)("span",{style:{fontSize:12.5,lineHeight:1.55,color:"var(--af-text)"},children:j(a.why)})]},a.date))})]})]}),g&&(0,b.jsxs)("div",{children:[(0,b.jsx)(D,{children:"Project areas"}),(0,b.jsx)("ul",{style:{listStyle:"none",padding:0,margin:0,display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(280px, 1fr))",gap:10},children:f.map(a=>(0,b.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,b.jsxs)("div",{style:{display:"flex",alignItems:"baseline",gap:10,marginBottom:6*!!a.description},children:[(0,b.jsx)(d.default,{href:`/projects/${encodeURIComponent(a.name)}`,style:{fontSize:13,fontWeight:600,color:"var(--af-text)",textDecoration:"none",flex:1,minWidth:0,letterSpacing:"-0.01em"},children:a.display_name}),(0,b.jsxs)("span",{style:{fontFamily:"var(--font-mono)",fontSize:10,color:"var(--af-text-tertiary)"},children:[Math.round(a.agent_min),"m · ",a.share_pct.toFixed(0),"% · ",a.shipped_count," PR"]})]}),a.description&&(0,b.jsx)("p",{style:{fontSize:12,lineHeight:1.5,margin:0,color:"var(--af-text-secondary)"},children:a.description})]},a.name))})]})]}):null}function D({children:a}){return(0,b.jsx)("div",{style:{fontSize:10,color:"var(--af-text-tertiary)",textTransform:"uppercase",letterSpacing:"0.08em",fontWeight:700,marginBottom:10},children:a})}function E({label:a,payload:d}){let[g,h]=(0,c.useState)(!1);return(0,b.jsxs)("div",{style:{position:"relative"},children:[(0,b.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:d}),(0,b.jsx)("button",{type:"button",onClick:async()=>{try{await navigator.clipboard.writeText(d),h(!0),setTimeout(()=>h(!1),1500)}catch{}},style:{position:"absolute",top:8,right:8,display:"inline-flex",alignItems:"center",gap:4,padding:"4px 8px",borderRadius:5,background:g?"color-mix(in srgb, #48bb78 18%, var(--af-surface))":"var(--af-surface)",border:`1px solid ${g?"#48bb78":"var(--af-border-subtle)"}`,color:g?"#48bb78":"var(--af-text-secondary)",fontSize:10,fontWeight:600,cursor:"pointer"},children:g?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(e.Check,{size:10})," Copied"]}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(f.Copy,{size:10})," ",a]})})]})}function F({shipped:a}){let[e,f]=(0,c.useState)(!1);if(0===a.length)return null;let g=a.length>=10,h=g&&!e?a.slice(0,5):a,i=a.length-h.length;return(0,b.jsxs)(L,{title:`Shipped (${a.length})`,anchor:"shipped",children:[(0,b.jsx)("ul",{style:{listStyle:"none",padding:0,margin:0,display:"flex",flexDirection:"column",gap:4},children:h.map((a,c)=>(0,b.jsxs)("li",{style:{display:"flex",gap:10,alignItems:"baseline",padding:"6px 10px",borderRadius:6,fontSize:12,color:"var(--af-text)"},children:[(0,b.jsxs)(d.default,{href:`/digest/${a.date}`,style:{fontFamily:"var(--font-mono)",fontSize:10,color:"var(--af-text-tertiary)",flexShrink:0,width:56,textDecoration:"none"},children:[M(a.date)," ",a.date.slice(5)]}),(0,b.jsx)("span",{style:{flex:1,minWidth:0},children:a.title}),(0,b.jsx)("span",{style:{fontSize:10,color:"var(--af-text-tertiary)",fontFamily:"var(--font-mono)"},children:a.project})]},c))}),g&&i>0&&(0,b.jsxs)("button",{type:"button",onClick:()=>f(!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:["+",i," more"]}),g&&e&&(0,b.jsx)("button",{type:"button",onClick:()=>f(!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 G({title:a,anchor:c,items:d,tone:e,sectionFallbackProse:f}){return d&&0!==d.length?(0,b.jsx)(L,{title:a,anchor:c,children:(0,b.jsx)("ul",{style:{listStyle:"none",padding:0,margin:0,display:"flex",flexDirection:"column",gap:10},children:d.map((a,c)=>(0,b.jsx)(H,{item:a,tone:e},c))})}):null===f?null:(0,b.jsx)(L,{title:a,anchor:c,children:(0,b.jsx)("p",{style:{fontSize:12,fontStyle:"italic",color:"var(--af-text-tertiary)",margin:0,padding:"8px 0"},children:f})})}function H({item:a,tone:c}){let e=I(a.anchor);return(0,b.jsxs)("li",{style:{padding:"12px 14px",borderRadius:10,background:`color-mix(in srgb, ${c} 6%, var(--af-surface))`,border:`1px solid color-mix(in srgb, ${c} 22%, var(--af-border))`},children:[(0,b.jsxs)("div",{style:{display:"flex",alignItems:"baseline",gap:8,marginBottom:4,flexWrap:"wrap"},children:[(0,b.jsx)("span",{style:{fontSize:13,fontWeight:600,color:"var(--af-text)",letterSpacing:"-0.01em",flex:1,minWidth:0},children:a.title}),(0,b.jsx)("span",{style:{fontSize:9,fontWeight:700,letterSpacing:"0.04em",textTransform:"uppercase",color:c,padding:"1px 7px",borderRadius:999,background:`color-mix(in srgb, ${c} 14%, transparent)`,border:`1px solid color-mix(in srgb, ${c} 28%, transparent)`,fontFamily:"var(--font-mono)"},title:`Anchor: ${a.anchor}`,children:e})]}),(0,b.jsx)("p",{style:{fontSize:12,lineHeight:1.6,margin:"0 0 8px",color:"var(--af-text)"},children:a.detail}),(0,b.jsxs)("div",{style:{padding:"6px 10px",borderRadius:6,background:"var(--af-surface-raised)",borderLeft:`2px solid color-mix(in srgb, ${c} 50%, transparent)`,display:"flex",gap:8,alignItems:"flex-start"},children:[(0,b.jsxs)(d.default,{href:`/digest/${a.evidence.date}`,style:{fontSize:10,fontWeight:600,color:c,fontFamily:"var(--font-mono)",flexShrink:0,textDecoration:"none",paddingTop:2},children:[M(a.evidence.date)," ",a.evidence.date.slice(5)]}),(0,b.jsxs)("span",{style:{fontSize:11,lineHeight:1.5,color:"var(--af-text)",fontStyle:"italic"},children:[(0,b.jsx)("span",{style:{color:"var(--af-text-tertiary)"},children:"“"}),a.evidence.quote,(0,b.jsx)("span",{style:{color:"var(--af-text-tertiary)"},children:"”"})]})]})]})}function I(a){return"plan-mode-gap"===a?"Plan-mode gap":a.startsWith("interaction_grammar.")?a.slice(20).replace(/_/g," "):o[a]??a}function J({items:a}){return a&&0!==a.length?(0,b.jsx)(L,{title:"What surprised",anchor:"what-surprised",children:(0,b.jsx)("ul",{style:{listStyle:"none",padding:0,margin:0,display:"flex",flexDirection:"column",gap:10},children:a.map((a,c)=>{let e="#b794f4";return(0,b.jsxs)("li",{style:{padding:"12px 14px",borderRadius:10,background:`color-mix(in srgb, ${e} 6%, var(--af-surface))`,border:`1px solid color-mix(in srgb, ${e} 22%, var(--af-border))`},children:[(0,b.jsxs)("div",{style:{display:"flex",alignItems:"baseline",gap:8,marginBottom:4,flexWrap:"wrap"},children:[(0,b.jsx)("span",{style:{fontSize:13,fontWeight:600,color:"var(--af-text)",letterSpacing:"-0.01em",flex:1,minWidth:0},children:a.title}),(0,b.jsx)("span",{style:{fontSize:9,fontWeight:700,letterSpacing:"0.04em",textTransform:"uppercase",color:e,padding:"1px 7px",borderRadius:999,background:`color-mix(in srgb, ${e} 14%, transparent)`,border:`1px solid color-mix(in srgb, ${e} 28%, transparent)`,fontFamily:"var(--font-mono)"},children:q[a.surprise_kind]??a.surprise_kind})]}),(0,b.jsx)("p",{style:{fontSize:12,lineHeight:1.6,margin:"0 0 8px",color:"var(--af-text)"},children:a.detail}),(0,b.jsxs)("div",{style:{padding:"6px 10px",borderRadius:6,background:"var(--af-surface-raised)",borderLeft:`2px solid color-mix(in srgb, ${e} 50%, transparent)`,display:"flex",gap:8,alignItems:"flex-start"},children:[(0,b.jsxs)(d.default,{href:`/digest/${a.evidence.date}`,style:{fontSize:10,fontWeight:600,color:e,fontFamily:"var(--font-mono)",flexShrink:0,textDecoration:"none",paddingTop:2},children:[M(a.evidence.date)," ",a.evidence.date.slice(5)]}),(0,b.jsxs)("span",{style:{fontSize:11,lineHeight:1.5,color:"var(--af-text)",fontStyle:"italic"},children:[(0,b.jsx)("span",{style:{color:"var(--af-text-tertiary)"},children:"“"}),a.evidence.quote,(0,b.jsx)("span",{style:{color:"var(--af-text-tertiary)"},children:"”"})]})]})]},c)})})}):null}function K({items:a}){return a&&0!==a.length?(0,b.jsx)(L,{title:"Where to lean",anchor:"where-to-lean",children:(0,b.jsx)("ul",{style:{listStyle:"none",padding:0,margin:0,display:"flex",flexDirection:"column",gap:12},children:a.map((a,c)=>{let e="var(--af-accent)",f=I(a.anchor);return(0,b.jsxs)("li",{style:{padding:"14px 16px",borderRadius:10,background:"var(--af-surface)",border:"1px solid var(--af-border-subtle)"},children:[(0,b.jsxs)("div",{style:{display:"flex",alignItems:"baseline",gap:8,marginBottom:6,flexWrap:"wrap"},children:[(0,b.jsx)("span",{style:{fontSize:9,fontWeight:700,letterSpacing:"0.06em",textTransform:"uppercase",color:e,padding:"1px 7px",borderRadius:999,background:`color-mix(in srgb, ${e} 14%, transparent)`,border:`1px solid color-mix(in srgb, ${e} 28%, transparent)`,fontFamily:"var(--font-mono)"},children:r[a.lean_kind]??a.lean_kind}),(0,b.jsx)("span",{style:{fontSize:13,fontWeight:600,color:"var(--af-text)",flex:1,minWidth:0},children:a.title}),(0,b.jsxs)("span",{style:{fontSize:9,fontWeight:700,letterSpacing:"0.04em",textTransform:"uppercase",color:"var(--af-text-tertiary)",fontFamily:"var(--font-mono)"},title:`Anchor: ${a.anchor}`,children:["↳ ",f]})]}),(0,b.jsx)("p",{style:{fontSize:12,lineHeight:1.6,margin:"0 0 10px",color:"var(--af-text)"},children:a.detail}),a.copyable&&(0,b.jsx)(E,{label:`Copy ${"claude-md"===a.lean_kind?"block":"snippet"}`,payload:a.copyable}),(0,b.jsxs)("div",{style:{marginTop:8,fontSize:10,color:"var(--af-text-tertiary)",fontFamily:"var(--font-mono)"},children:["Evidence · ",(0,b.jsxs)(d.default,{href:`/digest/${a.evidence.date}`,style:{color:"var(--af-text-tertiary)",textDecoration:"underline"},children:[M(a.evidence.date)," ",a.evidence.date.slice(5)]})," · “",a.evidence.quote.slice(0,100),a.evidence.quote.length>100?"…":"","”"]})]},c)})})}):null}function L({title:a,anchor:c,children:d}){return(0,b.jsxs)("section",{id:c,style:{marginBottom:28,scrollMarginTop:24},children:[(0,b.jsx)("h2",{style:{fontSize:11,fontWeight:700,letterSpacing:"0.08em",textTransform:"uppercase",color:"var(--af-text-tertiary)",margin:"0 0 12px"},children:a}),d]})}function M(a){return new Date(`${a}T12:00:00`).toLocaleDateString("en-US",{weekday:"short"})}let N={"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"},O={"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 P({sessions:a}){return(0,b.jsxs)(L,{title:`Top ${a.length} session${1===a.length?"":"s"} this week`,anchor:"top-sessions",children:[(0,b.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,b.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:16},children:a.map(a=>(0,b.jsx)(Q,{session:a},a.session_id))})]})}function Q({session:a}){let c=a.working_shape?o[a.working_shape]??a.working_shape:null,e=a.working_shape?p[a.working_shape]??"var(--af-text-tertiary)":"var(--af-text-tertiary)",f=a.wall_min/60,g=a.active_min/60,h=f>=1?`${f.toFixed(1)}h wall`:`${Math.round(a.wall_min)}m wall`,i=g>=1?`${g.toFixed(1)}h active`:`${Math.round(a.active_min)}m active`;return(0,b.jsx)("div",{style:{borderRadius:10,background:"var(--af-surface)",border:"1px solid var(--af-border-subtle)",borderTop:`3px solid ${e}`,overflow:"hidden"},children:(0,b.jsxs)("div",{style:{padding:"16px 18px"},children:[(0,b.jsxs)("div",{style:{display:"flex",alignItems:"baseline",gap:12,flexWrap:"wrap",marginBottom:6},children:[(0,b.jsx)(d.default,{href:`/sessions/${a.session_id}`,style:{fontSize:14,fontWeight:600,color:"var(--af-text)",letterSpacing:"-0.01em",textDecoration:"none"},children:a.project_display}),(0,b.jsx)(l.AgentBadge,{agent:a.agent}),(0,b.jsxs)(d.default,{href:`/digest/${a.date}`,style:{fontSize:11,fontFamily:"var(--font-mono)",color:"var(--af-accent)",textDecoration:"none"},children:[M(a.date)," ",a.date.slice(5)]}),(0,b.jsxs)("span",{style:{fontSize:11,color:"var(--af-text-tertiary)",fontFamily:"var(--font-mono)"},children:[i," · ",h," · ",a.turn_count," turns"]}),c&&(0,b.jsx)("span",{style:{padding:"2px 9px",borderRadius:999,fontSize:11,fontWeight:600,background:`color-mix(in srgb, ${e} 14%, transparent)`,color:e},children:c}),"shipped"===a.outcome&&a.shipped_prs.length>0&&(0,b.jsxs)("span",{style:{padding:"2px 9px",borderRadius:999,fontSize:11,fontWeight:600,background:"color-mix(in srgb, #48bb78 14%, transparent)",color:"#48bb78"},children:["✓ ",a.shipped_prs.length," PR",1===a.shipped_prs.length?"":"s"]})]}),a.day_signature&&(0,b.jsxs)("p",{style:{fontSize:12,fontStyle:"italic",color:"var(--af-text-secondary)",margin:"0 0 14px",lineHeight:1.5,maxWidth:760},children:["“",a.day_signature,"”"]}),(0,b.jsx)(R,{session:a}),a.steering_summary&&(0,b.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,b.jsx)("span",{style:{fontSize:9,fontWeight:700,letterSpacing:"0.06em",textTransform:"uppercase",color:"var(--af-text-tertiary)",marginRight:6},children:"steering"}),a.steering_summary]}),(0,b.jsx)(T,{session:a}),(0,b.jsx)(W,{session:a}),a.pins.length>0&&(0,b.jsx)("ol",{style:{listStyle:"none",padding:0,margin:"12px 0 0",display:"flex",flexDirection:"column",gap:6},children:a.pins.map((a,c)=>(0,b.jsx)(X,{pin:a},c))})]})})}function R({session:a}){return a.why_picked||a.what_worked||a.what_hit_friction?(0,b.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:10,margin:"0 0 6px"},children:[a.why_picked&&(0,b.jsx)(S,{label:"Why this session",tone:"var(--af-text-tertiary)",accent:"var(--af-text-tertiary)",text:a.why_picked}),a.session_summary&&(0,b.jsx)(S,{label:"What happened",tone:"var(--af-text)",accent:"var(--af-text-secondary)",text:a.session_summary,weight:500}),a.what_worked&&(0,b.jsx)(S,{label:"What worked",tone:"var(--af-text)",accent:"#48bb78",text:a.what_worked}),a.what_hit_friction&&(0,b.jsx)(S,{label:"What hit friction",tone:"var(--af-text)",accent:"#ed8936",text:a.what_hit_friction})]}):a.session_summary?(0,b.jsx)("p",{style:{fontSize:13,lineHeight:1.55,margin:"0 0 8px",color:"var(--af-text)",maxWidth:780},children:a.session_summary}):null}function S({label:a,tone:c,accent:d,text:e,weight:f=400}){return(0,b.jsxs)("div",{style:{display:"flex",gap:12,alignItems:"flex-start",maxWidth:800},children:[(0,b.jsx)("span",{style:{flexShrink:0,width:132,paddingTop:2,fontSize:9.5,fontWeight:700,letterSpacing:"0.06em",textTransform:"uppercase",color:d},children:a}),(0,b.jsx)("span",{style:{fontSize:13,lineHeight:1.55,color:c,fontWeight:f},children:e})]})}function T({session:a}){let{user_authored_skills:c,user_authored_subagents:d,stock_skills:e,top_tools:f}=a;return c.length>0||d.length>0||e.length>0||f.length>0?(0,b.jsxs)("div",{style:{marginBottom:4},children:[d.length>0&&(0,b.jsx)(U,{label:"Your subagents",children:d.map(a=>(0,b.jsxs)(V,{tone:"user",children:[a.type,a.count>1?` \xd7${a.count}`:""]},a.type))}),(c.length>0||e.length>0)&&(0,b.jsxs)(U,{label:"Skills loaded",children:[c.map(a=>(0,b.jsx)(V,{tone:"user",children:a},a)),e.slice(0,6).map(a=>(0,b.jsx)(V,{tone:"stock",children:a},a))]}),f.length>0&&(0,b.jsx)(U,{label:"Top tools",children:f.slice(0,4).map((a,c)=>(0,b.jsx)(V,{children:a},c))})]}):null}function U({label:a,children:c}){return(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,flexWrap:"wrap",padding:"3px 0",fontSize:11},children:[(0,b.jsx)("span",{style:{minWidth:96,color:"var(--af-text-tertiary)",fontWeight:500,fontSize:10,textTransform:"uppercase",letterSpacing:"0.04em"},children:a}),(0,b.jsx)("div",{style:{display:"flex",gap:5,flexWrap:"wrap",flex:1},children:c})]})}function V({children:a,tone:c,title:d}){return(0,b.jsx)("span",{title:d,style:{display:"inline-flex",alignItems:"center",padding:"2px 8px",borderRadius:999,fontSize:10,fontFamily:"var(--font-mono)",background:"user"===c?"var(--af-accent-subtle)":"var(--af-border-subtle)",color:"user"===c?"var(--af-accent)":"var(--af-text-secondary)",whiteSpace:"nowrap",maxWidth:280,overflow:"hidden",textOverflow:"ellipsis"},children:a})}function W({session:a}){let c=a.timeline.active_intervals,d=c.length>0?Math.max(...c.map(a=>a.end_min)):0,e=Math.max(1,a.timeline.duration_min,d);return(0,b.jsxs)("div",{style:{marginTop:10,marginBottom:4},children:[(0,b.jsxs)("div",{style:{position:"relative",width:"100%",height:28,background:"var(--af-border-subtle)",borderRadius:4},children:[c.map((a,c)=>{let d=a.start_min/e*100,f=Math.max(.6,(a.end_min-a.start_min)/e*100);return(0,b.jsx)("div",{style:{position:"absolute",top:6,bottom:6,left:`${d}%`,width:`${f}%`,background:"color-mix(in srgb, var(--af-accent) 30%, transparent)",borderRadius:2}},c)}),a.pins.map((a,c)=>{let d=Math.max(0,Math.min(100,a.start_min/e*100)),f=void 0!==a.end_min?Math.max(d+.5,Math.min(100,a.end_min/e*100)):d,g=void 0!==a.end_min&&f>d+.5,h=N[a.kind]??"var(--af-accent)";return(0,b.jsxs)("div",{children:[g&&(0,b.jsx)("div",{style:{position:"absolute",top:4,bottom:4,left:`${d}%`,width:`${f-d}%`,background:`color-mix(in srgb, ${h} 35%, transparent)`,border:`1px solid ${h}`,borderRadius:3},title:`${O[a.kind]}: ${a.label}`}),(0,b.jsx)("div",{style:{position:"absolute",top:-3,bottom:-3,left:`${d}%`,width:3,background:h,borderRadius:1,transform:"translateX(-1.5px)"},title:`${O[a.kind]}: ${a.label}`})]},c)})]}),(0,b.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",fontSize:9,fontFamily:"var(--font-mono)",color:"var(--af-text-tertiary)",marginTop:3},children:[(0,b.jsx)("span",{children:"0m"}),(0,b.jsx)("span",{children:Y(e/2)}),(0,b.jsxs)("span",{children:[Y(e)," wall"]})]})]})}function X({pin:a}){let c=N[a.kind]??"var(--af-accent)",d=void 0!==a.end_min&&a.end_min>a.start_min+.5?`${Y(a.start_min)}–${Y(a.end_min)}`:Y(a.start_min);return(0,b.jsxs)("li",{style:{display:"flex",gap:10,alignItems:"flex-start",fontSize:12,lineHeight:1.5},children:[(0,b.jsx)("span",{style:{flexShrink:0,width:3,height:3,marginTop:7,borderRadius:999,background:c}}),(0,b.jsx)("span",{style:{flexShrink:0,fontFamily:"var(--font-mono)",fontSize:10,color:"var(--af-text-tertiary)",paddingTop:1,minWidth:60},children:d}),(0,b.jsx)("span",{style:{flexShrink:0,padding:"1px 7px",borderRadius:999,fontSize:9,fontWeight:700,letterSpacing:"0.04em",textTransform:"uppercase",background:`color-mix(in srgb, ${c} 15%, transparent)`,color:c,marginTop:1},children:O[a.kind]??a.kind}),(0,b.jsx)("span",{style:{color:"var(--af-text)",maxWidth:640},children:a.label})]})}function Y(a){if(a>=60){let b=Math.round(a),c=Math.floor(b/60),d=b%60;return`${c}h${d>0?` ${d}m`:""}`}return`${Math.round(10*a)/10}m`}function Z({monday:a,isStreaming:c,aiEnabled:d,progress:e,onGenerate:f}){let g=new Date(`${a}T12:00:00`),h=new Date(g);h.setDate(g.getDate()+6);let i=a=>a.toLocaleDateString("en-US",{month:"short",day:"numeric"}),j=`${i(g)} — ${i(h)}`;return(0,b.jsx)("div",{style:{maxWidth:980,margin:"0 auto",padding:"60px 40px"},children:(0,b.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,b.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,b.jsx)("h2",{style:{fontSize:16,fontWeight:600,margin:"0 0 6px",color:"var(--af-text)",letterSpacing:"-0.01em"},children:c?"Generating digest…":"No digest yet for this week"}),(0,b.jsx)("p",{style:{fontSize:12.5,lineHeight:1.55,margin:"0 0 18px",color:"var(--af-text-secondary)"},children:c?`Synthesizing ${j} from this week's day digests. This usually takes 5–10 minutes.`:d?`Once generated, this view shows top sessions, trajectory, findings, and project areas for ${j}.`:`Enable AI features in Settings to synthesize a weekly narrative for ${j}. Deterministic stats are still available below in the live digest as soon as data lands.`}),d&&(0,b.jsx)("button",{onClick:f,disabled:c,style:{padding:"9px 18px",borderRadius:8,background:c?"var(--af-border-subtle)":"var(--af-accent)",color:c?"var(--af-text-tertiary)":"white",border:"none",cursor:c?"default":"pointer",fontSize:13,fontWeight:600,letterSpacing:"-0.005em"},children:c?"Generating…":"Generate digest"}),e&&(0,b.jsx)("div",{style:{marginTop:12,fontSize:10.5,color:"var(--af-text-tertiary)",fontFamily:"var(--font-mono)"},children:e})]})})}a.s(["WeekDigestView",0,function({initial:a,monday:d,aiEnabled:e,autoFire:f=!1,prior:g}){var h,i;let[j,k]=(0,c.useState)(a),[l,m]=(0,c.useState)("idle"),[n,o]=(0,c.useState)(""),p=(0,c.useRef)(!1),q=(0,c.useCallback)(async(a=!1)=>{m("streaming"),o("Starting...");let b=`/api/digest/week/${d}${a?"?force=1":""}`,c=await fetch(b,{method:"POST"});if(!c.ok||!c.body){m("error"),o(`Error ${c.status}`);return}let e=c.body.getReader(),f=new TextDecoder,g="";for(;;){let{done:a,value:b}=await e.read();if(a)break;let c=(g+=f.decode(b,{stream:!0})).split("\n\n");for(let a of(g=c.pop()??"",c)){let b=a.split("\n").find(a=>a.startsWith("data: "));if(b)try{let a=JSON.parse(b.slice(6));if("status"===a.type)o(a.text);else if("dependency"===a.type)o(`${"day"===a.kind?"Day":"Week"} ${a.key} ${a.status}`);else if("entry"===a.type)o(`Enriching ${a.index}/${a.total}...`);else if("progress"===a.type){let b=Math.round(a.elapsed_ms/1e3);o(`Claude composing… ${a.bytes.toLocaleString()} chars (${b}s)`)}else if("digest"===a.type)a.digest&&"week"===a.digest.scope&&k(a.digest),o("Rendering...");else if("saved"===a.type)o("Saved.");else if("error"===a.type){m("error"),o(a.message);return}}catch{}}}m("done"),o("")},[d]);(0,c.useEffect)(()=>{f&&!p.current&&"idle"===l&&(p.current=!0,q(!1))},[f,l,q]);let r="streaming"===l,t=!!j?.headline,u=null;return(!t&&e?u=(0,b.jsx)("button",{onClick:()=>q(!1),disabled:r,style:{padding:"4px 10px",background:"var(--af-accent)",color:"white",border:"none",borderRadius:5,cursor:(h=r)?"default":"pointer",fontSize:11,fontWeight:600,opacity:h?.6:1},children:r?"Generating...":j?"Generate":"Generate digest"}):e&&(u=(0,b.jsxs)("span",{style:{fontSize:10,color:"var(--af-text-tertiary)",display:"inline-flex",gap:6,alignItems:"center"},children:["✓ Up to date",(0,b.jsx)("button",{onClick:()=>q(!0),disabled:r,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:(i=r)?"default":"pointer",opacity:i?.6:1},children:r?"...":"Re-roll"})]})),n&&(u=(0,b.jsxs)(b.Fragment,{children:[u,(0,b.jsx)("span",{style:{fontSize:10,color:"var(--af-text-tertiary)"},children:n})]})),j)?(0,b.jsx)(s,{digest:j,aiEnabled:e,actions:u,priorDigest:g??null}):(0,b.jsx)(Z,{monday:d,isStreaming:r,aiEnabled:e,progress:n,onGenerate:()=>q(!1)})}],85041)},76435,a=>{"use strict";var b=a.i(87924),c=a.i(38246),d=a.i(72131),e=a.i(13749),f=a.i(50522);let g=(0,a.i(70106).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 h=a.i(33508);function i({inDrawer:a=!1}={}){let[c,e]=(0,d.useState)("weeks"),[f,g]=(0,d.useState)(null),[h,p]=(0,d.useState)(null);return(0,d.useEffect)(()=>{fetch("/api/digest/week-index?count=12").then(a=>a.json()).then(a=>g(a.weeks)).catch(()=>g([])),fetch("/api/digest/month-index?count=6").then(a=>a.json()).then(a=>p(a.months)).catch(()=>p([]))},[]),(0,b.jsxs)("div",{style:a?{padding:"0 18px"}:{maxWidth:980,margin:"0 auto",padding:"28px 40px 0"},children:[(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10,marginBottom:a?14:18},children:[!a&&(0,b.jsx)("h2",{style:{fontSize:11,fontWeight:700,letterSpacing:"0.08em",textTransform:"uppercase",color:"var(--af-text-tertiary)",margin:0,marginRight:4},children:"History"}),(0,b.jsx)("div",{style:m,children:["weeks","months"].map(a=>(0,b.jsx)("button",{type:"button",onClick:()=>e(a),style:{...n,background:c===a?"var(--af-accent)":"transparent",color:c===a?"white":"var(--af-text-secondary)"},children:"weeks"===a?"Weeks":"Months"},a))})]}),"weeks"===c?null===f?(0,b.jsx)(l,{children:"Loading weeks…"}):0===f.length?(0,b.jsx)(l,{children:"No history yet."}):(0,b.jsx)("ul",{style:o,children:f.map(a=>(0,b.jsx)(j,{w:a},a.start))}):null===h?(0,b.jsx)(l,{children:"Loading months…"}):0===h.length?(0,b.jsx)(l,{children:"No history yet."}):(0,b.jsx)("ul",{style:o,children:h.map(a=>(0,b.jsx)(k,{m:a},a.start))})]})}function j({w:a}){let d=0===a.active_days&&!a.in_progress&&!a.saved_key,e=a.saved_key?`/insights/${a.saved_key}`:`/insights/week-${a.start}`,f=a.saved_key&&a.headline?a.headline:d?"no data":a.in_progress?"in progress · click to view":`${a.active_days} active day${1===a.active_days?"":"s"} \xb7 click to generate`;return(0,b.jsx)("li",{style:p(!!a.saved_key),children:(0,b.jsxs)(c.default,{href:e,style:{display:"flex",flexDirection:"column",gap:4,textDecoration:"none",flex:1,minWidth:0},children:[(0,b.jsxs)("div",{style:q,children:[(0,b.jsxs)("span",{style:{fontSize:13,fontWeight:600,color:"var(--af-text)",letterSpacing:"-0.01em"},children:["W",String(a.iso_week).padStart(2,"0")," · ",a.label]}),a.in_progress&&(0,b.jsx)("span",{style:s,children:"in progress"}),a.saved_key&&(0,b.jsxs)("span",{style:{fontSize:10,fontWeight:600,color:"var(--af-accent)",marginLeft:"auto"},children:[a.shipped_count," PR · ",a.agent_min,"m"]})]}),(0,b.jsx)("span",{style:r,children:f})]})})}function k({m:a}){let d=0===a.active_days&&!a.in_progress&&!a.saved_key,e=a.saved_key?`/insights/${a.saved_key}`:`/insights/month-${a.start.slice(0,7)}`,f=a.saved_key&&a.headline?a.headline:d?"no data":a.in_progress?"in progress · click to view":`${a.active_days} active day${1===a.active_days?"":"s"} \xb7 click to generate`;return(0,b.jsx)("li",{style:p(!!a.saved_key),children:(0,b.jsxs)(c.default,{href:e,style:{display:"flex",flexDirection:"column",gap:4,textDecoration:"none",flex:1,minWidth:0},children:[(0,b.jsxs)("div",{style:q,children:[(0,b.jsx)("span",{style:{fontSize:13,fontWeight:600,color:"var(--af-text)",letterSpacing:"-0.01em"},children:a.label}),a.in_progress&&(0,b.jsx)("span",{style:s,children:"in progress"}),a.saved_key&&(0,b.jsxs)("span",{style:{fontSize:10,fontWeight:600,color:"var(--af-accent)",marginLeft:"auto"},children:[a.shipped_count," PR · ",a.agent_min,"m"]})]}),(0,b.jsx)("span",{style:r,children:f})]})})}function l({children:a}){return(0,b.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:a})}let m={display:"inline-flex",gap:3,border:"1px solid var(--af-border)",borderRadius:8,padding:2},n={padding:"5px 14px",fontSize:12,fontWeight:600,border:"none",borderRadius:6,cursor:"pointer"},o={listStyle:"none",padding:0,margin:0,display:"flex",flexDirection:"column",gap:4};function p(a){return{display:"flex",alignItems:"stretch",gap:14,padding:"10px 14px",borderRadius:10,border:`1px solid ${a?"color-mix(in srgb, var(--af-accent) 24%, var(--af-border))":"var(--af-border-subtle)"}`,background:a?"color-mix(in srgb, var(--af-accent) 6%, var(--af-surface))":"var(--af-surface)",transition:"border-color 0.15s"}}let q={display:"flex",alignItems:"center",gap:8,minWidth:0},r={fontSize:11,color:"var(--af-text-tertiary)",lineHeight:1.5,fontFamily:"var(--font-mono)"},s={fontSize:10,fontWeight:500,padding:"2px 6px",borderRadius:4,background:"color-mix(in srgb, #f5b445 18%, transparent)",color:"#c08a1f",letterSpacing:"0.02em"};function t({target:a,dir:d}){var g;let h="prev"===d?e.ChevronLeft:f.ChevronRight;return a?(0,b.jsxs)(c.default,{href:`/insights/${a.key}`,style:(g=a.cached,{display:"inline-flex",alignItems:"center",gap:4,padding:"5px 9px",borderRadius:6,border:`1px solid ${g?"color-mix(in srgb, var(--af-accent) 28%, var(--af-border))":"var(--af-border-subtle)"}`,background:g?"color-mix(in srgb, var(--af-accent) 6%, var(--af-surface))":"var(--af-surface)",color:g?"var(--af-accent)":"var(--af-text-secondary)",fontSize:11,fontWeight:500,fontFamily:"var(--font-mono)",textDecoration:"none"}),title:a.cached?`Saved digest \xb7 ${a.label}`:`${a.label} (no saved digest yet — will prompt to Generate)`,children:[(0,b.jsx)(h,{size:14}),(0,b.jsx)("span",{children:a.label})]}):(0,b.jsx)("span",{style:w,title:`No ${"prev"===d?"earlier":"later"} period`,children:(0,b.jsx)(h,{size:14})})}function u({onClose:a}){return(0,b.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,b.jsx)("div",{onClick:a,style:{position:"absolute",inset:0,background:"rgba(0,0,0,0.32)",animation:"fade-in 120ms ease-out"}}),(0,b.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,b.jsxs)("header",{style:{display:"flex",alignItems:"center",gap:10,padding:"14px 18px",borderBottom:"1px solid var(--af-border-subtle)"},children:[(0,b.jsx)("h2",{style:{fontSize:13,fontWeight:600,margin:0,color:"var(--af-text)"},children:"Browse insights history"}),(0,b.jsx)("button",{type:"button",onClick:a,"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,b.jsx)(h.X,{size:14})})]}),(0,b.jsx)("div",{style:{flex:1,overflowY:"auto",padding:"18px 0"},children:(0,b.jsx)(i,{inDrawer:!0})})]}),(0,b.jsx)("style",{children:`
|
|
1
|
+
module.exports=[85041,a=>{"use strict";var b=a.i(87924),c=a.i(72131),d=a.i(38246),e=a.i(33441),f=a.i(5151);a.i(99417);let g={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"}},h={warn:"#ed8936",info:"#4299e1",ok:"#48bb78"};function i({token:a,count:c}){let d=g[a]??{token:a,label:a.replace(/_/g," "),description:`Internal flag: ${a}.`,tone:"info"},e=h[d.tone];return(0,b.jsxs)("span",{title:`${d.token} — ${d.description}`,style:{display:"inline-flex",alignItems:"center",gap:4,padding:"2px 8px",borderRadius:999,background:`color-mix(in srgb, ${e} 12%, transparent)`,border:`1px solid color-mix(in srgb, ${e} 28%, transparent)`,fontSize:10,fontWeight:600,color:e,fontFamily:"var(--font-mono)",whiteSpace:"nowrap"},children:[d.label,"number"==typeof c&&(0,b.jsxs)("span",{style:{opacity:.7,fontWeight:500},children:["×",c]})]})}function j(a){let c,d=Object.keys(g),e=RegExp(`\\b(${d.join("|")})\\b`,"g"),f=[],h=0;for(;null!==(c=e.exec(a));)c.index>h&&f.push(a.slice(h,c.index)),f.push((0,b.jsx)(i,{token:c[1]},`${c.index}-${c[1]}`)),h=e.lastIndex;return h<a.length&&f.push(a.slice(h)),f.length>0?f:[a]}var k=a.i(68381),l=a.i(99309);let m={essential:"#48bb78",helpful:"#4299e1",neutral:"#a0aec0",unhelpful:"#f56565"},n=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],o={"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"},p={"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"},q={outlier:"Outlier","novel-use":"Novel use","user-built-tool":"User-built tool","cross-week-contrast":"Cross-week contrast"},r={"claude-md":"CLAUDE.md addition",skill:"Skill to build",hook:"Hook to wire",harness:"Harness extension",decision:"Decision to make"};function s({digest:a,aiEnabled:c,actions:e,priorDigest:f}){var g,h;let i,l,m,n,o,p=a.shipped.length,q=Object.values(a.outcome_mix).reduce((a,b)=>a+(b??0),0),r=a.agent_min_total/60,v=r>=1?`${r.toFixed(1)}h`:`${Math.round(a.agent_min_total)}m`,w=f?(g=a,h=f,i=g.shipped.length-h.shipped.length,m=(l=g.agent_min_total-h.agent_min_total)/60,n=`${i>0?"+":""}${i} PR${1===Math.abs(i)?"":"s"}`,o=Math.abs(m)>=1?`${m>0?"+":""}${m.toFixed(1)}h`:`${l>0?"+":""}${Math.round(l)}m`,`${n} \xb7 ${o}`):null;return(0,b.jsxs)("div",{style:{maxWidth:980,margin:"0 auto",padding:"24px 40px"},children:[(0,b.jsxs)("header",{style:{marginBottom:24},children:[(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10,marginBottom:8,fontSize:12,color:"var(--af-text-tertiary)",fontWeight:500,flexWrap:"wrap"},children:[(0,b.jsxs)("span",{style:{fontFamily:"var(--font-mono)",color:"var(--af-text-secondary)"},children:[v," agent time · ",q," active day",1===q?"":"s"," · ",p," PR",1===p?"":"s"]}),w&&(0,b.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: ",w]}),e&&(0,b.jsx)("div",{style:{marginLeft:"auto",display:"inline-flex",alignItems:"center",gap:8},children:e})]}),a.headline?(0,b.jsx)("h1",{style:{fontSize:26,fontWeight:700,lineHeight:1.3,letterSpacing:"-0.02em",margin:"0 0 6px",maxWidth:820,color:"var(--af-text)"},children:j(a.headline)}):(0,b.jsx)("h1",{style:{fontSize:20,color:"var(--af-text-secondary)",margin:"0 0 14px"},children:c?"No narrative yet.":`Worked ${v} across ${a.projects.length} project${1===a.projects.length?"":"s"}.`}),a.key_pattern&&(0,b.jsx)("p",{style:{fontSize:13,fontStyle:"italic",margin:0,lineHeight:1.5,color:"var(--af-text-secondary)",maxWidth:820},children:j(a.key_pattern)})]}),!c&&(0,b.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,b.jsx)(d.default,{href:"/settings",style:{color:"var(--af-accent)"},children:"Settings"})," to see weekly narratives."]}),(0,b.jsx)(u,{digest:a}),(0,b.jsx)(y,{digest:a}),a.top_goal_categories.length>0&&(0,b.jsx)(L,{title:"Goal mix",anchor:"goals",children:(0,b.jsx)(k.GoalBar,{goals:a.top_goal_categories,total:a.agent_min_total})}),(0,b.jsx)(C,{digest:a}),a.top_sessions&&a.top_sessions.length>0&&(0,b.jsx)(P,{sessions:a.top_sessions}),(0,b.jsx)(G,{title:"What worked",anchor:"what-worked",items:a.what_worked??[],tone:"#48bb78",sectionFallbackProse:null}),(0,b.jsx)(G,{title:"What stalled",anchor:"what-stalled",items:a.what_stalled??[],tone:"#ed8936",sectionFallbackProse:"No stalls stuck this week."}),(0,b.jsx)(J,{items:a.what_surprised??[]}),(0,b.jsx)(K,{items:a.where_to_lean??[]}),(0,b.jsx)(F,{shipped:a.shipped}),!a.working_shapes&&(0,b.jsx)(t,{digest:a})]})}function t({digest:a}){let c=a.recurring_themes??[],d=a.outcome_correlations??[],e=a.friction_categories??[],f=a.suggestions,g=a.on_the_horizon,h=a.fun_ending;return c.length>0||d.length>0||e.length>0||(f?.claude_md_additions?.length??0)>0||g||h?(0,b.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,b.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 u({digest:a}){let c=a.agent_min_total/60,e=c>=1?`${c.toFixed(1)}h`:`${Math.round(a.agent_min_total)}m`,f=function(a){let b=a.reduce((a,b)=>a+b,0);if(0===b)return null;for(let c=1;c<=24;c++){let d=0,e=0;for(let b=0;b<=24-c;b++){let f=0;for(let d=0;d<c;d++)f+=a[b+d]??0;f>d&&(d=f,e=b)}if(d/b>=.6)return{start:e,end:e+c,share_pct:d/b*100}}return null}(a.hours_distribution),g=new Map(a.days_active.map(a=>[a.date,a])),h=B(a.window.start),i=h.map(a=>g.get(a)?.agent_min??0),j=Math.max(...i,1),k=a.busiest_day?h.indexOf(a.busiest_day.date):-1,l=a.longest_run&&a.busiest_day?Math.min(1,a.longest_run.active_min/Math.max(1,a.busiest_day.agent_min)):0,m=[];return(m.push({label:"Agent time",primary:e,detail:`across ${a.days_active.length} day${1===a.days_active.length?"":"s"}`,visual:(0,b.jsx)(v,{values:i,max:j,highlight:-1})}),a.busiest_day&&m.push({label:"Busiest day",href:`/digest/${a.busiest_day.date}`,primary:`${M(a.busiest_day.date)} ${a.busiest_day.date.slice(5)}`,detail:`${Math.round(a.busiest_day.agent_min)}m \xb7 ${a.busiest_day.shipped_count} PR${1===a.busiest_day.shipped_count?"":"s"}`,visual:(0,b.jsx)(v,{values:i,max:j,highlight:k})}),a.longest_run&&m.push({label:"Longest single run",href:`/sessions/${a.longest_run.session_id}`,title:`Session ${a.longest_run.session_id.slice(0,8)}`,primary:`${Math.round(a.longest_run.active_min)}m`,detail:`${a.longest_run.project_display} \xb7 ${M(a.longest_run.date)} ${a.longest_run.date.slice(5)}`,visual:(0,b.jsx)(w,{ratio:l,caption:"vs busiest day"})}),f&&m.push({label:"Peak hours",title:`${A(f.start,f.end)} carried ${f.share_pct.toFixed(0)}% of the week's agent time`,primary:A(f.start,f.end),detail:`${f.share_pct.toFixed(0)}% of agent time`,visual:(0,b.jsx)(x,{hours:a.hours_distribution,peakStart:f.start,peakEnd:f.end})}),0===m.length)?null:(0,b.jsx)("section",{style:{display:"grid",gridTemplateColumns:`repeat(${Math.min(m.length,4)}, minmax(0, 1fr))`,gap:10,marginBottom:20},children:m.map((a,c)=>{let e=(0,b.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:a.title,children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("div",{style:{fontSize:9,fontWeight:700,letterSpacing:"0.08em",textTransform:"uppercase",color:"var(--af-text-tertiary)",marginBottom:6},children:a.label}),(0,b.jsx)("div",{style:{fontSize:17,fontWeight:600,color:"var(--af-text)",letterSpacing:"-0.01em",lineHeight:1.2},children:a.primary}),(0,b.jsx)("div",{style:{fontSize:10.5,color:"var(--af-text-tertiary)",fontFamily:"var(--font-mono)",marginTop:3},children:a.detail})]}),a.visual&&(0,b.jsx)("div",{style:{marginTop:10},children:a.visual})]});return a.href?(0,b.jsx)(d.default,{href:a.href,style:{textDecoration:"none"},children:e},c):(0,b.jsx)("div",{children:e},c)})})}function v({values:a,max:c,highlight:d}){return(0,b.jsx)("div",{style:{display:"flex",gap:2,alignItems:"flex-end",height:18},children:a.map((a,e)=>{let f=c>0?Math.max(1,a/c*18):1,g=e===d;return(0,b.jsx)("div",{style:{flex:1,height:f,borderRadius:1,background:g?"var(--af-accent)":a>0?"color-mix(in srgb, var(--af-accent) 30%, transparent)":"var(--af-border-subtle)"}},e)})})}function w({ratio:a,caption:c}){let d=100*Math.max(0,Math.min(1,a));return(0,b.jsxs)("div",{children:[(0,b.jsx)("div",{style:{height:6,borderRadius:99,overflow:"hidden",background:"var(--af-border-subtle)"},children:(0,b.jsx)("div",{style:{width:`${d}%`,height:"100%",background:"var(--af-accent)"}})}),(0,b.jsxs)("div",{style:{fontSize:9,color:"var(--af-text-tertiary)",fontFamily:"var(--font-mono)",marginTop:3},children:[Math.round(d),"% ",c]})]})}function x({hours:a,peakStart:c,peakEnd:d}){let e=Math.max(...a,1);return(0,b.jsx)("div",{style:{display:"flex",gap:1,alignItems:"flex-end",height:18},children:a.map((a,f)=>{let g=f>=c&&f<=d,h=e>0?Math.max(1,a/e*18):1;return(0,b.jsx)("div",{style:{flex:1,height:h,borderRadius:1,background:g?"var(--af-accent)":a>0?"color-mix(in srgb, var(--af-accent) 22%, transparent)":"var(--af-border-subtle)"}},f)})})}function y({digest:a}){if(0===a.days_active.length)return null;let c=Math.max(...a.days_active.map(a=>a.agent_min)),e=new Map(a.days_active.map(a=>[a.date,a])),f=B(a.window.start);return(0,b.jsx)("section",{style:{display:"flex",gap:6,alignItems:"stretch",padding:"12px 0",marginBottom:24},children:f.map((a,f)=>{let g=e.get(a),h=g?.agent_min??0,i=c>0&&h>0?Math.max(8,h/c*100):0,j=g?z[g.outcome_day]:"var(--af-text-tertiary)",k=g?.helpfulness_day?m[g.helpfulness_day]:null;return(0,b.jsxs)(d.default,{href:g?`/digest/${a}`:"#",style:{flex:1,display:"flex",flexDirection:"column",alignItems:"stretch",gap:2,textDecoration:"none",pointerEvents:g?"auto":"none"},title:g?`${a} \xb7 ${Math.round(h)}m \xb7 ${g.outcome_day}${g.shipped_count>0?` \xb7 ${g.shipped_count} PR`:""}${g.helpfulness_day?` \xb7 helpfulness ${g.helpfulness_day}`:""}`:"no activity",children:[(0,b.jsxs)("div",{style:{height:56,borderRadius:4,position:"relative",background:"var(--af-surface)",border:`1px solid ${g?`color-mix(in srgb, ${j} 28%, var(--af-border-subtle))`:"var(--af-border-subtle)"}`,overflow:"hidden"},children:[g&&(0,b.jsx)("div",{style:{position:"absolute",bottom:0,left:0,right:0,height:`${i}%`,background:`color-mix(in srgb, ${j} 28%, transparent)`}}),g?.dominant_shape&&p[g.dominant_shape]&&(0,b.jsx)("div",{title:`${o[g.dominant_shape]??g.dominant_shape}`,style:{position:"absolute",top:0,left:0,right:0,height:3,background:p[g.dominant_shape]}}),k&&(0,b.jsx)("div",{style:{position:"absolute",top:4,right:4,width:6,height:6,borderRadius:999,background:k},title:g?.helpfulness_day??""})]}),(0,b.jsx)("div",{style:{fontSize:9,fontWeight:700,letterSpacing:"0.06em",color:"var(--af-text-tertiary)",textAlign:"center"},children:n[f]}),(0,b.jsx)("div",{style:{fontSize:9,fontFamily:"var(--font-mono)",color:g?"var(--af-text-secondary)":"var(--af-text-tertiary)",textAlign:"center"},children:g?`${Math.round(h)}m`:"—"})]},f)})})}let z={shipped:"#48bb78",partial:"#4299e1",blocked:"#f56565",exploratory:"#a0aec0",trivial:"#cbd5e0",idle:"#cbd5e0"};function A(a,b){let c=a=>`${a%12||12}${a<12||24===a?"am":"pm"}`;return`${c(a)}–${c(b)}`}function B(a){let b=[],c=new Date(a);for(let a=0;a<7;a++){let d=new Date(c);d.setDate(c.getDate()+a);let e=d.getFullYear(),f=String(d.getMonth()+1).padStart(2,"0"),g=String(d.getDate()).padStart(2,"0");b.push(`${e}-${f}-${g}`)}return b}function C({digest:a}){let c=a.trajectory&&a.trajectory.length>0,e=a.standout_days&&a.standout_days.length>0,f=a.projects.filter(a=>a.share_pct>=5||a.shipped_count>0),g=f.length>0;return c||e||g?(0,b.jsxs)(L,{title:"Through the week",anchor:"through-the-week",children:[(c||e)&&(0,b.jsxs)("div",{style:{display:"grid",gridTemplateColumns:c&&e?"minmax(0, 1.4fr) minmax(0, 1fr)":"1fr",gap:28,marginBottom:22*!!g},children:[c&&(0,b.jsxs)("div",{children:[(0,b.jsx)(D,{children:"Trajectory"}),(0,b.jsx)("ol",{style:{listStyle:"none",padding:0,margin:0,display:"flex",flexDirection:"column",gap:6},children:a.trajectory.map(a=>(0,b.jsxs)("li",{style:{display:"flex",gap:12,alignItems:"flex-start"},children:[(0,b.jsxs)(d.default,{href:`/digest/${a.date}`,style:{fontSize:10,fontWeight:600,color:"var(--af-text-tertiary)",fontFamily:"var(--font-mono)",flexShrink:0,width:64,paddingTop:3,textDecoration:"none"},children:[M(a.date)," ",a.date.slice(5)]}),(0,b.jsx)("span",{style:{fontSize:12.5,lineHeight:1.55,color:"var(--af-text-secondary)"},children:j(a.line)})]},a.date))})]}),e&&(0,b.jsxs)("div",{children:[(0,b.jsx)(D,{children:"Standout days"}),(0,b.jsx)("ul",{style:{listStyle:"none",padding:0,margin:0,display:"flex",flexDirection:"column",gap:8},children:a.standout_days.map(a=>(0,b.jsxs)("li",{style:{padding:"10px 12px",borderRadius:8,background:"var(--af-surface)",border:"1px solid var(--af-border-subtle)"},children:[(0,b.jsxs)(d.default,{href:`/digest/${a.date}`,style:{fontSize:11,fontWeight:600,color:"var(--af-accent)",textDecoration:"none",fontFamily:"var(--font-mono)",marginRight:8},children:[M(a.date)," ",a.date.slice(5)]}),(0,b.jsx)("span",{style:{fontSize:12.5,lineHeight:1.55,color:"var(--af-text)"},children:j(a.why)})]},a.date))})]})]}),g&&(0,b.jsxs)("div",{children:[(0,b.jsx)(D,{children:"Project areas"}),(0,b.jsx)("ul",{style:{listStyle:"none",padding:0,margin:0,display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(280px, 1fr))",gap:10},children:f.map(a=>(0,b.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,b.jsxs)("div",{style:{display:"flex",alignItems:"baseline",gap:10,marginBottom:6*!!a.description},children:[(0,b.jsx)(d.default,{href:`/projects/${encodeURIComponent(a.name)}`,style:{fontSize:13,fontWeight:600,color:"var(--af-text)",textDecoration:"none",flex:1,minWidth:0,letterSpacing:"-0.01em"},children:a.display_name}),(0,b.jsxs)("span",{style:{fontFamily:"var(--font-mono)",fontSize:10,color:"var(--af-text-tertiary)"},children:[Math.round(a.agent_min),"m · ",a.share_pct.toFixed(0),"% · ",a.shipped_count," PR"]})]}),a.description&&(0,b.jsx)("p",{style:{fontSize:12,lineHeight:1.5,margin:0,color:"var(--af-text-secondary)"},children:a.description})]},a.name))})]})]}):null}function D({children:a}){return(0,b.jsx)("div",{style:{fontSize:10,color:"var(--af-text-tertiary)",textTransform:"uppercase",letterSpacing:"0.08em",fontWeight:700,marginBottom:10},children:a})}function E({label:a,payload:d}){let[g,h]=(0,c.useState)(!1);return(0,b.jsxs)("div",{style:{position:"relative"},children:[(0,b.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:d}),(0,b.jsx)("button",{type:"button",onClick:async()=>{try{await navigator.clipboard.writeText(d),h(!0),setTimeout(()=>h(!1),1500)}catch{}},style:{position:"absolute",top:8,right:8,display:"inline-flex",alignItems:"center",gap:4,padding:"4px 8px",borderRadius:5,background:g?"color-mix(in srgb, #48bb78 18%, var(--af-surface))":"var(--af-surface)",border:`1px solid ${g?"#48bb78":"var(--af-border-subtle)"}`,color:g?"#48bb78":"var(--af-text-secondary)",fontSize:10,fontWeight:600,cursor:"pointer"},children:g?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(e.Check,{size:10})," Copied"]}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(f.Copy,{size:10})," ",a]})})]})}function F({shipped:a}){let[e,f]=(0,c.useState)(!1);if(0===a.length)return null;let g=a.length>=10,h=g&&!e?a.slice(0,5):a,i=a.length-h.length;return(0,b.jsxs)(L,{title:`Shipped (${a.length})`,anchor:"shipped",children:[(0,b.jsx)("ul",{style:{listStyle:"none",padding:0,margin:0,display:"flex",flexDirection:"column",gap:4},children:h.map((a,c)=>(0,b.jsxs)("li",{style:{display:"flex",gap:10,alignItems:"baseline",padding:"6px 10px",borderRadius:6,fontSize:12,color:"var(--af-text)"},children:[(0,b.jsxs)(d.default,{href:`/digest/${a.date}`,style:{fontFamily:"var(--font-mono)",fontSize:10,color:"var(--af-text-tertiary)",flexShrink:0,width:56,textDecoration:"none"},children:[M(a.date)," ",a.date.slice(5)]}),(0,b.jsx)("span",{style:{flex:1,minWidth:0},children:a.title}),(0,b.jsx)("span",{style:{fontSize:10,color:"var(--af-text-tertiary)",fontFamily:"var(--font-mono)"},children:a.project})]},c))}),g&&i>0&&(0,b.jsxs)("button",{type:"button",onClick:()=>f(!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:["+",i," more"]}),g&&e&&(0,b.jsx)("button",{type:"button",onClick:()=>f(!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 G({title:a,anchor:c,items:d,tone:e,sectionFallbackProse:f}){return d&&0!==d.length?(0,b.jsx)(L,{title:a,anchor:c,children:(0,b.jsx)("ul",{style:{listStyle:"none",padding:0,margin:0,display:"flex",flexDirection:"column",gap:10},children:d.map((a,c)=>(0,b.jsx)(H,{item:a,tone:e},c))})}):null===f?null:(0,b.jsx)(L,{title:a,anchor:c,children:(0,b.jsx)("p",{style:{fontSize:12,fontStyle:"italic",color:"var(--af-text-tertiary)",margin:0,padding:"8px 0"},children:f})})}function H({item:a,tone:c}){let e=I(a.anchor);return(0,b.jsxs)("li",{style:{padding:"12px 14px",borderRadius:10,background:`color-mix(in srgb, ${c} 6%, var(--af-surface))`,border:`1px solid color-mix(in srgb, ${c} 22%, var(--af-border))`},children:[(0,b.jsxs)("div",{style:{display:"flex",alignItems:"baseline",gap:8,marginBottom:4,flexWrap:"wrap"},children:[(0,b.jsx)("span",{style:{fontSize:13,fontWeight:600,color:"var(--af-text)",letterSpacing:"-0.01em",flex:1,minWidth:0},children:a.title}),(0,b.jsx)("span",{style:{fontSize:9,fontWeight:700,letterSpacing:"0.04em",textTransform:"uppercase",color:c,padding:"1px 7px",borderRadius:999,background:`color-mix(in srgb, ${c} 14%, transparent)`,border:`1px solid color-mix(in srgb, ${c} 28%, transparent)`,fontFamily:"var(--font-mono)"},title:`Anchor: ${a.anchor}`,children:e})]}),(0,b.jsx)("p",{style:{fontSize:12,lineHeight:1.6,margin:"0 0 8px",color:"var(--af-text)"},children:a.detail}),(0,b.jsxs)("div",{style:{padding:"6px 10px",borderRadius:6,background:"var(--af-surface-raised)",borderLeft:`2px solid color-mix(in srgb, ${c} 50%, transparent)`,display:"flex",gap:8,alignItems:"flex-start"},children:[(0,b.jsxs)(d.default,{href:`/digest/${a.evidence.date}`,style:{fontSize:10,fontWeight:600,color:c,fontFamily:"var(--font-mono)",flexShrink:0,textDecoration:"none",paddingTop:2},children:[M(a.evidence.date)," ",a.evidence.date.slice(5)]}),(0,b.jsxs)("span",{style:{fontSize:11,lineHeight:1.5,color:"var(--af-text)",fontStyle:"italic"},children:[(0,b.jsx)("span",{style:{color:"var(--af-text-tertiary)"},children:"“"}),a.evidence.quote,(0,b.jsx)("span",{style:{color:"var(--af-text-tertiary)"},children:"”"})]})]})]})}function I(a){return"plan-mode-gap"===a?"Plan-mode gap":a.startsWith("interaction_grammar.")?a.slice(20).replace(/_/g," "):o[a]??a}function J({items:a}){return a&&0!==a.length?(0,b.jsx)(L,{title:"What surprised",anchor:"what-surprised",children:(0,b.jsx)("ul",{style:{listStyle:"none",padding:0,margin:0,display:"flex",flexDirection:"column",gap:10},children:a.map((a,c)=>{let e="#b794f4";return(0,b.jsxs)("li",{style:{padding:"12px 14px",borderRadius:10,background:`color-mix(in srgb, ${e} 6%, var(--af-surface))`,border:`1px solid color-mix(in srgb, ${e} 22%, var(--af-border))`},children:[(0,b.jsxs)("div",{style:{display:"flex",alignItems:"baseline",gap:8,marginBottom:4,flexWrap:"wrap"},children:[(0,b.jsx)("span",{style:{fontSize:13,fontWeight:600,color:"var(--af-text)",letterSpacing:"-0.01em",flex:1,minWidth:0},children:a.title}),(0,b.jsx)("span",{style:{fontSize:9,fontWeight:700,letterSpacing:"0.04em",textTransform:"uppercase",color:e,padding:"1px 7px",borderRadius:999,background:`color-mix(in srgb, ${e} 14%, transparent)`,border:`1px solid color-mix(in srgb, ${e} 28%, transparent)`,fontFamily:"var(--font-mono)"},children:q[a.surprise_kind]??a.surprise_kind})]}),(0,b.jsx)("p",{style:{fontSize:12,lineHeight:1.6,margin:"0 0 8px",color:"var(--af-text)"},children:a.detail}),(0,b.jsxs)("div",{style:{padding:"6px 10px",borderRadius:6,background:"var(--af-surface-raised)",borderLeft:`2px solid color-mix(in srgb, ${e} 50%, transparent)`,display:"flex",gap:8,alignItems:"flex-start"},children:[(0,b.jsxs)(d.default,{href:`/digest/${a.evidence.date}`,style:{fontSize:10,fontWeight:600,color:e,fontFamily:"var(--font-mono)",flexShrink:0,textDecoration:"none",paddingTop:2},children:[M(a.evidence.date)," ",a.evidence.date.slice(5)]}),(0,b.jsxs)("span",{style:{fontSize:11,lineHeight:1.5,color:"var(--af-text)",fontStyle:"italic"},children:[(0,b.jsx)("span",{style:{color:"var(--af-text-tertiary)"},children:"“"}),a.evidence.quote,(0,b.jsx)("span",{style:{color:"var(--af-text-tertiary)"},children:"”"})]})]})]},c)})})}):null}function K({items:a}){return a&&0!==a.length?(0,b.jsx)(L,{title:"Where to lean",anchor:"where-to-lean",children:(0,b.jsx)("ul",{style:{listStyle:"none",padding:0,margin:0,display:"flex",flexDirection:"column",gap:12},children:a.map((a,c)=>{let e="var(--af-accent)",f=I(a.anchor);return(0,b.jsxs)("li",{style:{padding:"14px 16px",borderRadius:10,background:"var(--af-surface)",border:"1px solid var(--af-border-subtle)"},children:[(0,b.jsxs)("div",{style:{display:"flex",alignItems:"baseline",gap:8,marginBottom:6,flexWrap:"wrap"},children:[(0,b.jsx)("span",{style:{fontSize:9,fontWeight:700,letterSpacing:"0.06em",textTransform:"uppercase",color:e,padding:"1px 7px",borderRadius:999,background:`color-mix(in srgb, ${e} 14%, transparent)`,border:`1px solid color-mix(in srgb, ${e} 28%, transparent)`,fontFamily:"var(--font-mono)"},children:r[a.lean_kind]??a.lean_kind}),(0,b.jsx)("span",{style:{fontSize:13,fontWeight:600,color:"var(--af-text)",flex:1,minWidth:0},children:a.title}),(0,b.jsxs)("span",{style:{fontSize:9,fontWeight:700,letterSpacing:"0.04em",textTransform:"uppercase",color:"var(--af-text-tertiary)",fontFamily:"var(--font-mono)"},title:`Anchor: ${a.anchor}`,children:["↳ ",f]})]}),(0,b.jsx)("p",{style:{fontSize:12,lineHeight:1.6,margin:"0 0 10px",color:"var(--af-text)"},children:a.detail}),a.copyable&&(0,b.jsx)(E,{label:`Copy ${"claude-md"===a.lean_kind?"block":"snippet"}`,payload:a.copyable}),(0,b.jsxs)("div",{style:{marginTop:8,fontSize:10,color:"var(--af-text-tertiary)",fontFamily:"var(--font-mono)"},children:["Evidence · ",(0,b.jsxs)(d.default,{href:`/digest/${a.evidence.date}`,style:{color:"var(--af-text-tertiary)",textDecoration:"underline"},children:[M(a.evidence.date)," ",a.evidence.date.slice(5)]})," · “",a.evidence.quote.slice(0,100),a.evidence.quote.length>100?"…":"","”"]})]},c)})})}):null}function L({title:a,anchor:c,children:d}){return(0,b.jsxs)("section",{id:c,style:{marginBottom:28,scrollMarginTop:24},children:[(0,b.jsx)("h2",{style:{fontSize:11,fontWeight:700,letterSpacing:"0.08em",textTransform:"uppercase",color:"var(--af-text-tertiary)",margin:"0 0 12px"},children:a}),d]})}function M(a){return new Date(`${a}T12:00:00`).toLocaleDateString("en-US",{weekday:"short"})}let N={"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"},O={"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 P({sessions:a}){return(0,b.jsxs)(L,{title:`Top ${a.length} session${1===a.length?"":"s"} this week`,anchor:"top-sessions",children:[(0,b.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,b.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:16},children:a.map(a=>(0,b.jsx)(Q,{session:a},a.session_id))})]})}function Q({session:a}){let c=a.working_shape?o[a.working_shape]??a.working_shape:null,e=a.working_shape?p[a.working_shape]??"var(--af-text-tertiary)":"var(--af-text-tertiary)",f=a.wall_min/60,g=a.active_min/60,h=f>=1?`${f.toFixed(1)}h wall`:`${Math.round(a.wall_min)}m wall`,i=g>=1?`${g.toFixed(1)}h active`:`${Math.round(a.active_min)}m active`;return(0,b.jsx)("div",{style:{borderRadius:10,background:"var(--af-surface)",border:"1px solid var(--af-border-subtle)",borderTop:`3px solid ${e}`,overflow:"hidden"},children:(0,b.jsxs)("div",{style:{padding:"16px 18px"},children:[(0,b.jsxs)("div",{style:{display:"flex",alignItems:"baseline",gap:12,flexWrap:"wrap",marginBottom:6},children:[(0,b.jsx)(d.default,{href:`/sessions/${a.session_id}`,style:{fontSize:14,fontWeight:600,color:"var(--af-text)",letterSpacing:"-0.01em",textDecoration:"none"},children:a.project_display}),(0,b.jsx)(l.AgentBadge,{agent:a.agent}),(0,b.jsxs)(d.default,{href:`/digest/${a.date}`,style:{fontSize:11,fontFamily:"var(--font-mono)",color:"var(--af-accent)",textDecoration:"none"},children:[M(a.date)," ",a.date.slice(5)]}),(0,b.jsxs)("span",{style:{fontSize:11,color:"var(--af-text-tertiary)",fontFamily:"var(--font-mono)"},children:[i," · ",h," · ",a.turn_count," turns"]}),c&&(0,b.jsx)("span",{style:{padding:"2px 9px",borderRadius:999,fontSize:11,fontWeight:600,background:`color-mix(in srgb, ${e} 14%, transparent)`,color:e},children:c}),"shipped"===a.outcome&&a.shipped_prs.length>0&&(0,b.jsxs)("span",{style:{padding:"2px 9px",borderRadius:999,fontSize:11,fontWeight:600,background:"color-mix(in srgb, #48bb78 14%, transparent)",color:"#48bb78"},children:["✓ ",a.shipped_prs.length," PR",1===a.shipped_prs.length?"":"s"]})]}),a.day_signature&&(0,b.jsxs)("p",{style:{fontSize:12,fontStyle:"italic",color:"var(--af-text-secondary)",margin:"0 0 14px",lineHeight:1.5,maxWidth:760},children:["“",a.day_signature,"”"]}),(0,b.jsx)(R,{session:a}),a.steering_summary&&(0,b.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,b.jsx)("span",{style:{fontSize:9,fontWeight:700,letterSpacing:"0.06em",textTransform:"uppercase",color:"var(--af-text-tertiary)",marginRight:6},children:"steering"}),a.steering_summary]}),(0,b.jsx)(T,{session:a}),(0,b.jsx)(W,{session:a}),a.pins.length>0&&(0,b.jsx)("ol",{style:{listStyle:"none",padding:0,margin:"12px 0 0",display:"flex",flexDirection:"column",gap:6},children:a.pins.map((a,c)=>(0,b.jsx)(X,{pin:a},c))})]})})}function R({session:a}){return a.why_picked||a.what_worked||a.what_hit_friction?(0,b.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:10,margin:"0 0 6px"},children:[a.why_picked&&(0,b.jsx)(S,{label:"Why this session",tone:"var(--af-text-tertiary)",accent:"var(--af-text-tertiary)",text:a.why_picked}),a.session_summary&&(0,b.jsx)(S,{label:"What happened",tone:"var(--af-text)",accent:"var(--af-text-secondary)",text:a.session_summary,weight:500}),a.what_worked&&(0,b.jsx)(S,{label:"What worked",tone:"var(--af-text)",accent:"#48bb78",text:a.what_worked}),a.what_hit_friction&&(0,b.jsx)(S,{label:"What hit friction",tone:"var(--af-text)",accent:"#ed8936",text:a.what_hit_friction})]}):a.session_summary?(0,b.jsx)("p",{style:{fontSize:13,lineHeight:1.55,margin:"0 0 8px",color:"var(--af-text)",maxWidth:780},children:a.session_summary}):null}function S({label:a,tone:c,accent:d,text:e,weight:f=400}){return(0,b.jsxs)("div",{style:{display:"flex",gap:12,alignItems:"flex-start",maxWidth:800},children:[(0,b.jsx)("span",{style:{flexShrink:0,width:132,paddingTop:2,fontSize:9.5,fontWeight:700,letterSpacing:"0.06em",textTransform:"uppercase",color:d},children:a}),(0,b.jsx)("span",{style:{fontSize:13,lineHeight:1.55,color:c,fontWeight:f},children:e})]})}function T({session:a}){let{user_authored_skills:c,user_authored_subagents:d,stock_skills:e,top_tools:f}=a;return c.length>0||d.length>0||e.length>0||f.length>0?(0,b.jsxs)("div",{style:{marginBottom:4},children:[d.length>0&&(0,b.jsx)(U,{label:"Your subagents",children:d.map(a=>(0,b.jsxs)(V,{tone:"user",children:[a.type,a.count>1?` \xd7${a.count}`:""]},a.type))}),(c.length>0||e.length>0)&&(0,b.jsxs)(U,{label:"Skills loaded",children:[c.map(a=>(0,b.jsx)(V,{tone:"user",children:a},a)),e.slice(0,6).map(a=>(0,b.jsx)(V,{tone:"stock",children:a},a))]}),f.length>0&&(0,b.jsx)(U,{label:"Top tools",children:f.slice(0,4).map((a,c)=>(0,b.jsx)(V,{children:a},c))})]}):null}function U({label:a,children:c}){return(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,flexWrap:"wrap",padding:"3px 0",fontSize:11},children:[(0,b.jsx)("span",{style:{minWidth:96,color:"var(--af-text-tertiary)",fontWeight:500,fontSize:10,textTransform:"uppercase",letterSpacing:"0.04em"},children:a}),(0,b.jsx)("div",{style:{display:"flex",gap:5,flexWrap:"wrap",flex:1},children:c})]})}function V({children:a,tone:c,title:d}){return(0,b.jsx)("span",{title:d,style:{display:"inline-flex",alignItems:"center",padding:"2px 8px",borderRadius:999,fontSize:10,fontFamily:"var(--font-mono)",background:"user"===c?"var(--af-accent-subtle)":"var(--af-border-subtle)",color:"user"===c?"var(--af-accent)":"var(--af-text-secondary)",whiteSpace:"nowrap",maxWidth:280,overflow:"hidden",textOverflow:"ellipsis"},children:a})}function W({session:a}){let c=a.timeline.active_intervals,d=c.length>0?Math.max(...c.map(a=>a.end_min)):0,e=Math.max(1,a.timeline.duration_min,d);return(0,b.jsxs)("div",{style:{marginTop:10,marginBottom:4},children:[(0,b.jsxs)("div",{style:{position:"relative",width:"100%",height:28,background:"var(--af-border-subtle)",borderRadius:4},children:[c.map((a,c)=>{let d=a.start_min/e*100,f=Math.max(.6,(a.end_min-a.start_min)/e*100);return(0,b.jsx)("div",{style:{position:"absolute",top:6,bottom:6,left:`${d}%`,width:`${f}%`,background:"color-mix(in srgb, var(--af-accent) 30%, transparent)",borderRadius:2}},c)}),a.pins.map((a,c)=>{let d=Math.max(0,Math.min(100,a.start_min/e*100)),f=void 0!==a.end_min?Math.max(d+.5,Math.min(100,a.end_min/e*100)):d,g=void 0!==a.end_min&&f>d+.5,h=N[a.kind]??"var(--af-accent)";return(0,b.jsxs)("div",{children:[g&&(0,b.jsx)("div",{style:{position:"absolute",top:4,bottom:4,left:`${d}%`,width:`${f-d}%`,background:`color-mix(in srgb, ${h} 35%, transparent)`,border:`1px solid ${h}`,borderRadius:3},title:`${O[a.kind]}: ${a.label}`}),(0,b.jsx)("div",{style:{position:"absolute",top:-3,bottom:-3,left:`${d}%`,width:3,background:h,borderRadius:1,transform:"translateX(-1.5px)"},title:`${O[a.kind]}: ${a.label}`})]},c)})]}),(0,b.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",fontSize:9,fontFamily:"var(--font-mono)",color:"var(--af-text-tertiary)",marginTop:3},children:[(0,b.jsx)("span",{children:"0m"}),(0,b.jsx)("span",{children:Y(e/2)}),(0,b.jsxs)("span",{children:[Y(e)," wall"]})]})]})}function X({pin:a}){let c=N[a.kind]??"var(--af-accent)",d=void 0!==a.end_min&&a.end_min>a.start_min+.5?`${Y(a.start_min)}–${Y(a.end_min)}`:Y(a.start_min);return(0,b.jsxs)("li",{style:{display:"flex",gap:10,alignItems:"flex-start",fontSize:12,lineHeight:1.5},children:[(0,b.jsx)("span",{style:{flexShrink:0,width:3,height:3,marginTop:7,borderRadius:999,background:c}}),(0,b.jsx)("span",{style:{flexShrink:0,fontFamily:"var(--font-mono)",fontSize:10,color:"var(--af-text-tertiary)",paddingTop:1,minWidth:60},children:d}),(0,b.jsx)("span",{style:{flexShrink:0,padding:"1px 7px",borderRadius:999,fontSize:9,fontWeight:700,letterSpacing:"0.04em",textTransform:"uppercase",background:`color-mix(in srgb, ${c} 15%, transparent)`,color:c,marginTop:1},children:O[a.kind]??a.kind}),(0,b.jsx)("span",{style:{color:"var(--af-text)",maxWidth:640},children:a.label})]})}function Y(a){if(a>=60){let b=Math.round(a),c=Math.floor(b/60),d=b%60;return`${c}h${d>0?` ${d}m`:""}`}return`${Math.round(10*a)/10}m`}function Z({monday:a,isStreaming:c,aiEnabled:d,progress:e,onGenerate:f}){let g=new Date(`${a}T12:00:00`),h=new Date(g);h.setDate(g.getDate()+6);let i=a=>a.toLocaleDateString("en-US",{month:"short",day:"numeric"}),j=`${i(g)} — ${i(h)}`;return(0,b.jsx)("div",{style:{maxWidth:980,margin:"0 auto",padding:"60px 40px"},children:(0,b.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,b.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,b.jsx)("h2",{style:{fontSize:16,fontWeight:600,margin:"0 0 6px",color:"var(--af-text)",letterSpacing:"-0.01em"},children:c?"Generating digest…":"No digest yet for this week"}),(0,b.jsx)("p",{style:{fontSize:12.5,lineHeight:1.55,margin:"0 0 18px",color:"var(--af-text-secondary)"},children:c?`Synthesizing ${j} from this week's day digests. This usually takes 5–10 minutes.`:d?`Once generated, this view shows top sessions, trajectory, findings, and project areas for ${j}.`:`Enable AI features in Settings to synthesize a weekly narrative for ${j}. Deterministic stats are still available below in the live digest as soon as data lands.`}),d&&(0,b.jsx)("button",{onClick:f,disabled:c,style:{padding:"9px 18px",borderRadius:8,background:c?"var(--af-border-subtle)":"var(--af-accent)",color:c?"var(--af-text-tertiary)":"white",border:"none",cursor:c?"default":"pointer",fontSize:13,fontWeight:600,letterSpacing:"-0.005em"},children:c?"Generating…":"Generate digest"}),e&&(0,b.jsx)("div",{style:{marginTop:12,fontSize:10.5,color:"var(--af-text-tertiary)",fontFamily:"var(--font-mono)"},children:e})]})})}a.s(["WeekDigestView",0,function({initial:a,monday:d,aiEnabled:e,autoFire:f=!1,prior:g}){var h,i;let[j,k]=(0,c.useState)(a),[l,m]=(0,c.useState)("idle"),[n,o]=(0,c.useState)(""),p=(0,c.useRef)(!1),q=(0,c.useCallback)(async(a=!1)=>{m("streaming"),o("Starting...");let b=`/api/digest/week/${d}${a?"?force=1":""}`,c=await fetch(b,{method:"POST"});if(!c.ok||!c.body){m("error"),o(`Error ${c.status}`);return}let e=c.body.getReader(),f=new TextDecoder,g="";for(;;){let{done:a,value:b}=await e.read();if(a)break;let c=(g+=f.decode(b,{stream:!0})).split("\n\n");for(let a of(g=c.pop()??"",c)){let b=a.split("\n").find(a=>a.startsWith("data: "));if(b)try{let a=JSON.parse(b.slice(6));if("status"===a.type)o(a.text);else if("dependency"===a.type)o(`${"day"===a.kind?"Day":"Week"} ${a.key} ${a.status}`);else if("entry"===a.type)o(`Enriching ${a.index}/${a.total}...`);else if("progress"===a.type){let b=Math.round(a.elapsed_ms/1e3);o(`Claude composing… ${a.bytes.toLocaleString()} chars (${b}s)`)}else if("digest"===a.type)a.digest&&"week"===a.digest.scope&&k(a.digest),o("Rendering...");else if("saved"===a.type)o("Saved.");else if("error"===a.type){m("error"),o(a.message);return}}catch{}}}m("done"),o("")},[d]);(0,c.useEffect)(()=>{f&&!p.current&&"idle"===l&&(p.current=!0,q(!1))},[f,l,q]);let r="streaming"===l,t=!!j?.headline,u=null;return(!t&&e?u=(0,b.jsx)("button",{onClick:()=>q(!1),disabled:r,style:{padding:"4px 10px",background:"var(--af-accent)",color:"white",border:"none",borderRadius:5,cursor:(h=r)?"default":"pointer",fontSize:11,fontWeight:600,opacity:h?.6:1},children:r?"Generating...":j?"Generate":"Generate digest"}):e&&(u=(0,b.jsxs)("span",{style:{fontSize:10,color:"var(--af-text-tertiary)",display:"inline-flex",gap:6,alignItems:"center"},children:["✓ Up to date",(0,b.jsx)("button",{onClick:()=>q(!0),disabled:r,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:(i=r)?"default":"pointer",opacity:i?.6:1},children:r?"...":"Re-roll"})]})),n&&(u=(0,b.jsxs)(b.Fragment,{children:[u,(0,b.jsx)("span",{style:{fontSize:10,color:"var(--af-text-tertiary)"},children:n})]})),j)?(0,b.jsx)(s,{digest:j,aiEnabled:e,actions:u,priorDigest:g??null}):(0,b.jsx)(Z,{monday:d,isStreaming:r,aiEnabled:e,progress:n,onGenerate:()=>q(!1)})}],85041)},76435,a=>{"use strict";var b=a.i(87924),c=a.i(38246),d=a.i(72131),e=a.i(13749),f=a.i(50522);let g=(0,a.i(70106).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 h=a.i(33508);function i({inDrawer:a=!1}={}){let[c,e]=(0,d.useState)("weeks"),[f,g]=(0,d.useState)(null),[h,p]=(0,d.useState)(null);return(0,d.useEffect)(()=>{fetch("/api/digest/week-index?count=12").then(a=>a.json()).then(a=>g(a.weeks)).catch(()=>g([])),fetch("/api/digest/month-index?count=6").then(a=>a.json()).then(a=>p(a.months)).catch(()=>p([]))},[]),(0,b.jsxs)("div",{style:a?{padding:"0 18px"}:{maxWidth:980,margin:"0 auto",padding:"28px 40px 0"},children:[(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10,marginBottom:a?14:18},children:[!a&&(0,b.jsx)("h2",{style:{fontSize:11,fontWeight:700,letterSpacing:"0.08em",textTransform:"uppercase",color:"var(--af-text-tertiary)",margin:0,marginRight:4},children:"History"}),(0,b.jsx)("div",{style:m,children:["weeks","months"].map(a=>(0,b.jsx)("button",{type:"button",onClick:()=>e(a),style:{...n,background:c===a?"var(--af-accent)":"transparent",color:c===a?"white":"var(--af-text-secondary)"},children:"weeks"===a?"Weeks":"Months"},a))})]}),"weeks"===c?null===f?(0,b.jsx)(l,{children:"Loading weeks…"}):0===f.length?(0,b.jsx)(l,{children:"No history yet."}):(0,b.jsx)("ul",{style:o,children:f.map(a=>(0,b.jsx)(j,{w:a},a.start))}):null===h?(0,b.jsx)(l,{children:"Loading months…"}):0===h.length?(0,b.jsx)(l,{children:"No history yet."}):(0,b.jsx)("ul",{style:o,children:h.map(a=>(0,b.jsx)(k,{m:a},a.start))})]})}function j({w:a}){let d=0===a.active_days&&!a.in_progress&&!a.saved_key,e=a.saved_key?`/insights/${a.saved_key}`:`/insights/week-${a.start}`,f=a.saved_key&&a.headline?a.headline:d?"no data":a.in_progress?"in progress · click to view":`${a.active_days} active day${1===a.active_days?"":"s"} \xb7 click to generate`;return(0,b.jsx)("li",{style:p(!!a.saved_key),children:(0,b.jsxs)(c.default,{href:e,style:{display:"flex",flexDirection:"column",gap:4,textDecoration:"none",flex:1,minWidth:0},children:[(0,b.jsxs)("div",{style:q,children:[(0,b.jsxs)("span",{style:{fontSize:13,fontWeight:600,color:"var(--af-text)",letterSpacing:"-0.01em"},children:["W",String(a.iso_week).padStart(2,"0")," · ",a.label]}),a.in_progress&&(0,b.jsx)("span",{style:s,children:"in progress"}),a.saved_key&&(0,b.jsxs)("span",{style:{fontSize:10,fontWeight:600,color:"var(--af-accent)",marginLeft:"auto"},children:[a.shipped_count," PR · ",a.agent_min,"m"]})]}),(0,b.jsx)("span",{style:r,children:f})]})})}function k({m:a}){let d=0===a.active_days&&!a.in_progress&&!a.saved_key,e=a.saved_key?`/insights/${a.saved_key}`:`/insights/month-${a.start.slice(0,7)}`,f=a.saved_key&&a.headline?a.headline:d?"no data":a.in_progress?"in progress · click to view":`${a.active_days} active day${1===a.active_days?"":"s"} \xb7 click to generate`;return(0,b.jsx)("li",{style:p(!!a.saved_key),children:(0,b.jsxs)(c.default,{href:e,style:{display:"flex",flexDirection:"column",gap:4,textDecoration:"none",flex:1,minWidth:0},children:[(0,b.jsxs)("div",{style:q,children:[(0,b.jsx)("span",{style:{fontSize:13,fontWeight:600,color:"var(--af-text)",letterSpacing:"-0.01em"},children:a.label}),a.in_progress&&(0,b.jsx)("span",{style:s,children:"in progress"}),a.saved_key&&(0,b.jsxs)("span",{style:{fontSize:10,fontWeight:600,color:"var(--af-accent)",marginLeft:"auto"},children:[a.shipped_count," PR · ",a.agent_min,"m"]})]}),(0,b.jsx)("span",{style:r,children:f})]})})}function l({children:a}){return(0,b.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:a})}let m={display:"inline-flex",gap:3,border:"1px solid var(--af-border)",borderRadius:8,padding:2},n={padding:"5px 14px",fontSize:12,fontWeight:600,border:"none",borderRadius:6,cursor:"pointer"},o={listStyle:"none",padding:0,margin:0,display:"flex",flexDirection:"column",gap:4};function p(a){return{display:"flex",alignItems:"stretch",gap:14,padding:"10px 14px",borderRadius:10,border:`1px solid ${a?"color-mix(in srgb, var(--af-accent) 24%, var(--af-border))":"var(--af-border-subtle)"}`,background:a?"color-mix(in srgb, var(--af-accent) 6%, var(--af-surface))":"var(--af-surface)",transition:"border-color 0.15s"}}let q={display:"flex",alignItems:"center",gap:8,minWidth:0},r={fontSize:11,color:"var(--af-text-tertiary)",lineHeight:1.5,fontFamily:"var(--font-mono)"},s={fontSize:10,fontWeight:500,padding:"2px 6px",borderRadius:4,background:"color-mix(in srgb, #f5b445 18%, transparent)",color:"#c08a1f",letterSpacing:"0.02em"};function t({target:a,dir:d}){var g;let h="prev"===d?e.ChevronLeft:f.ChevronRight;return a?(0,b.jsxs)(c.default,{href:`/insights/${a.key}`,style:(g=a.cached,{display:"inline-flex",alignItems:"center",gap:4,padding:"5px 9px",borderRadius:6,border:`1px solid ${g?"color-mix(in srgb, var(--af-accent) 28%, var(--af-border))":"var(--af-border-subtle)"}`,background:g?"color-mix(in srgb, var(--af-accent) 6%, var(--af-surface))":"var(--af-surface)",color:g?"var(--af-accent)":"var(--af-text-secondary)",fontSize:11,fontWeight:500,fontFamily:"var(--font-mono)",textDecoration:"none"}),title:a.cached?`Saved digest \xb7 ${a.label}`:`${a.label} (no saved digest yet — will prompt to Generate)`,children:[(0,b.jsx)(h,{size:14}),(0,b.jsx)("span",{children:a.label})]}):(0,b.jsx)("span",{style:w,title:`No ${"prev"===d?"earlier":"later"} period`,children:(0,b.jsx)(h,{size:14})})}function u({onClose:a}){return(0,b.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,b.jsx)("div",{onClick:a,style:{position:"absolute",inset:0,background:"rgba(0,0,0,0.32)",animation:"fade-in 120ms ease-out"}}),(0,b.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,b.jsxs)("header",{style:{display:"flex",alignItems:"center",gap:10,padding:"14px 18px",borderBottom:"1px solid var(--af-border-subtle)"},children:[(0,b.jsx)("h2",{style:{fontSize:13,fontWeight:600,margin:0,color:"var(--af-text)"},children:"Browse insights history"}),(0,b.jsx)("button",{type:"button",onClick:a,"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,b.jsx)(h.X,{size:14})})]}),(0,b.jsx)("div",{style:{flex:1,overflowY:"auto",padding:"18px 0"},children:(0,b.jsx)(i,{inDrawer:!0})})]}),(0,b.jsx)("style",{children:`
|
|
2
2
|
@keyframes slide-in { from { transform: translateX(20px); opacity: 0 } to { transform: translateX(0); opacity: 1 } }
|
|
3
3
|
@keyframes fade-in { from { opacity: 0 } to { opacity: 1 } }
|
|
4
4
|
`})]})}let v={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"},w={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"};a.s(["InsightsTopBar",0,function({scope:a,currentLabel:e,rangeLabel:f,prev:h,next:i}){let[j,k]=(0,d.useState)(!1);return(0,d.useEffect)(()=>{if(!j)return;let a=a=>{"Escape"===a.key&&k(!1)};return window.addEventListener("keydown",a),document.body.style.overflow="hidden",()=>{window.removeEventListener("keydown",a),document.body.style.overflow=""}},[j]),(0,b.jsxs)(b.Fragment,{children:[(0,b.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,b.jsxs)("div",{style:{maxWidth:980,margin:"0 auto",padding:"12px 40px",display:"flex",alignItems:"center",gap:14,minHeight:44},children:[(0,b.jsxs)("div",{style:{display:"flex",alignItems:"baseline",gap:10,minWidth:0},children:[(0,b.jsx)(c.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,b.jsx)("span",{style:{color:"var(--af-text-tertiary)",fontSize:11,flexShrink:0},children:"›"}),(0,b.jsx)("span",{style:{fontSize:14,fontWeight:600,color:"var(--af-text)",letterSpacing:"-0.01em",minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e}),f&&(0,b.jsx)("span",{style:{fontSize:11,fontFamily:"var(--font-mono)",color:"var(--af-text-tertiary)",flexShrink:0},children:f})]}),(0,b.jsxs)("div",{style:{marginLeft:"auto",display:"inline-flex",alignItems:"center",gap:6},children:[(0,b.jsx)(t,{target:h,dir:"prev"}),(0,b.jsx)(t,{target:i,dir:"next"}),(0,b.jsxs)("button",{type:"button",onClick:()=>k(!0),style:v,title:`Browse ${"week"===a?"weekly":"monthly"} history`,children:[(0,b.jsx)(g,{size:13}),(0,b.jsx)("span",{children:"Browse"})]})]})]})}),j&&(0,b.jsx)(u,{onClose:()=>k(!1)})]})}],76435)}];
|