@mbeato/contextscope 0.1.4 → 0.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. package/.next/standalone/.next/BUILD_ID +1 -1
  2. package/.next/standalone/.next/build-manifest.json +3 -3
  3. package/.next/standalone/.next/server/app/_global-error.html +1 -1
  4. package/.next/standalone/.next/server/app/_global-error.rsc +1 -1
  5. package/.next/standalone/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  6. package/.next/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  7. package/.next/standalone/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  8. package/.next/standalone/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  9. package/.next/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  10. package/.next/standalone/.next/server/app/_not-found.html +1 -1
  11. package/.next/standalone/.next/server/app/_not-found.rsc +1 -1
  12. package/.next/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +1 -1
  13. package/.next/standalone/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
  14. package/.next/standalone/.next/server/app/_not-found.segments/_index.segment.rsc +1 -1
  15. package/.next/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  16. package/.next/standalone/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  17. package/.next/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  18. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0j40w4k._.js +1 -1
  19. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0p2sxww._.js +1 -1
  20. package/.next/standalone/.next/server/chunks/ssr/_0j0avc7._.js +1 -1
  21. package/.next/standalone/.next/server/middleware-build-manifest.js +3 -3
  22. package/.next/standalone/.next/server/pages/404.html +1 -1
  23. package/.next/standalone/.next/server/pages/500.html +1 -1
  24. package/.next/standalone/app/page.tsx +1 -1
  25. package/.next/standalone/lib/transcripts.ts +103 -41
  26. package/.next/standalone/package.json +1 -1
  27. package/.next/standalone/tsconfig.tsbuildinfo +1 -1
  28. package/package.json +1 -1
  29. /package/.next/static/{kaNzMZNco9qjeyEFA-gjr → I-W1iV4XdkTRyjis8Ros1}/_buildManifest.js +0 -0
  30. /package/.next/static/{kaNzMZNco9qjeyEFA-gjr → I-W1iV4XdkTRyjis8Ros1}/_clientMiddlewareManifest.js +0 -0
  31. /package/.next/static/{kaNzMZNco9qjeyEFA-gjr → I-W1iV4XdkTRyjis8Ros1}/_ssgManifest.js +0 -0
@@ -1,3 +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}},12714,(a,b,c)=>{b.exports=a.x("node:fs/promises",()=>require("node:fs/promises"))},60526,(a,b,c)=>{b.exports=a.x("node:os",()=>require("node:os"))},50227,(a,b,c)=>{b.exports=a.x("node:path",()=>require("node:path"))},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)},84434,a=>{"use strict";var b=a.i(7997),c=a.i(95936);a.s(["MiniStat",0,function({label:a,value:c}){return(0,b.jsxs)("div",{className:"px-2 py-3 text-center",children:[(0,b.jsx)("div",{className:"text-sm font-semibold tabular-nums tracking-tight text-zinc-900 dark:text-zinc-50",children:c}),(0,b.jsx)("div",{className:"text-[10px] uppercase tracking-widest text-zinc-500 mt-0.5",children:a})]})},"Receipt",0,function({label:a,action:d,pad:e="default",className:f="",children:g}){let h=!!(a||d);return(0,b.jsxs)("div",{className:`rounded-lg border border-zinc-200 dark:border-zinc-800 bg-white dark:bg-zinc-900 ${f}`,children:[h&&(0,b.jsxs)("div",{className:"flex items-baseline justify-between gap-3 px-4 pt-3 pb-2 border-b border-zinc-200 dark:border-zinc-800",children:[(0,b.jsx)("div",{className:"text-[10px] uppercase tracking-widest text-zinc-500",children:a}),d&&(0,b.jsxs)(c.default,{href:d.href,className:"text-[10px] uppercase tracking-widest text-zinc-500 hover:text-zinc-900 dark:hover:text-zinc-100 transition-colors",children:[d.label," →"]})]}),(0,b.jsx)("div",{className:`${"none"===e?"":"tight"===e?"px-4 py-3":"loose"===e?"px-6 py-6 md:px-8 md:py-7":"px-4 py-4 md:px-6 md:py-5"} ${"none"===e?"overflow-x-auto":""}`,children:g})]})},"Stat",0,function({label:a,value:c,hint:d,align:e="left",size:f="lg"}){return(0,b.jsxs)("div",{className:"center"===e?"text-center":"right"===e?"text-right":"text-left",children:[(0,b.jsx)("div",{className:"text-[10px] uppercase tracking-widest text-zinc-500",children:a}),(0,b.jsx)("div",{className:`${"xl"===f?"text-3xl":"lg"===f?"text-2xl":"text-xl"} font-semibold tabular-nums tracking-tight text-zinc-900 dark:text-zinc-50 mt-1`,children:c}),d&&(0,b.jsx)("div",{className:"text-[10px] uppercase tracking-widest text-zinc-500 mt-0.5",children:d})]})}])},2157,(a,b,c)=>{b.exports=a.x("node:fs",()=>require("node:fs"))},1457,(a,b,c)=>{b.exports=a.x("node:readline",()=>require("node:readline"))},28886,(a,b,c)=>{b.exports={_source:"https://raw.githubusercontent.com/BerriAI/litellm/main/model_prices_and_context_window.json",_refreshedAt:"2026-05-27T17:24:45.345Z",_description:"Anthropic model prices in USD per token (input, output, cache_read, cache_creation 5min default). Refresh with `npm run refresh-prices`.",models:{"claude-3-7-sonnet-20250219":{input:3e-6,output:15e-6,cache_read:3e-7,cache_creation_5m:375e-8,cache_creation_1h:6e-6},"claude-3-haiku-20240307":{input:25e-8,output:125e-8,cache_read:3e-8,cache_creation_5m:3e-7,cache_creation_1h:6e-6},"claude-3-opus-20240229":{input:15e-6,output:75e-6,cache_read:15e-7,cache_creation_5m:1875e-8,cache_creation_1h:6e-6},"claude-4-opus-20250514":{input:15e-6,output:75e-6,cache_read:15e-7,cache_creation_5m:1875e-8,cache_creation_1h:375e-7},"claude-4-sonnet-20250514":{input:3e-6,output:15e-6,cache_read:3e-7,cache_creation_5m:375e-8,cache_creation_1h:75e-7},"claude-haiku-4-5":{input:1e-6,output:5e-6,cache_read:1e-7,cache_creation_5m:125e-8,cache_creation_1h:2e-6},"claude-haiku-4-5-20251001":{input:1e-6,output:5e-6,cache_read:1e-7,cache_creation_5m:125e-8,cache_creation_1h:2e-6},"claude-opus-4-1":{input:15e-6,output:75e-6,cache_read:15e-7,cache_creation_5m:1875e-8,cache_creation_1h:3e-5},"claude-opus-4-1-20250805":{input:15e-6,output:75e-6,cache_read:15e-7,cache_creation_5m:1875e-8,cache_creation_1h:3e-5},"claude-opus-4-20250514":{input:15e-6,output:75e-6,cache_read:15e-7,cache_creation_5m:1875e-8,cache_creation_1h:3e-5},"claude-opus-4-5":{input:5e-6,output:25e-6,cache_read:5e-7,cache_creation_5m:625e-8,cache_creation_1h:1e-5},"claude-opus-4-5-20251101":{input:5e-6,output:25e-6,cache_read:5e-7,cache_creation_5m:625e-8,cache_creation_1h:1e-5},"claude-opus-4-6":{input:5e-6,output:25e-6,cache_read:5e-7,cache_creation_5m:625e-8,cache_creation_1h:1e-5},"claude-opus-4-6-20260205":{input:5e-6,output:25e-6,cache_read:5e-7,cache_creation_5m:625e-8,cache_creation_1h:1e-5},"claude-opus-4-7":{input:5e-6,output:25e-6,cache_read:5e-7,cache_creation_5m:625e-8,cache_creation_1h:1e-5},"claude-opus-4-7-20260416":{input:5e-6,output:25e-6,cache_read:5e-7,cache_creation_5m:625e-8,cache_creation_1h:1e-5},"claude-sonnet-4-20250514":{input:3e-6,output:15e-6,cache_read:3e-7,cache_creation_5m:375e-8,cache_creation_1h:6e-6},"claude-sonnet-4-5":{input:3e-6,output:15e-6,cache_read:3e-7,cache_creation_5m:375e-8,cache_creation_1h:75e-7},"claude-sonnet-4-5-20250929":{input:3e-6,output:15e-6,cache_read:3e-7,cache_creation_5m:375e-8,cache_creation_1h:75e-7},"claude-sonnet-4-6":{input:3e-6,output:15e-6,cache_read:3e-7,cache_creation_5m:375e-8,cache_creation_1h:75e-7}}}},21249,32110,78110,a=>{"use strict";var b=a.i(12714),c=a.i(2157),d=a.i(1457),e=a.i(60526),f=a.i(50227);let g=(0,f.join)((0,e.homedir)(),".claude","projects"),h=new Map;async function i(a,b){let e=a.split("/"),f=e[e.length-1].replace(/\.jsonl$/,""),g=e[e.length-2]??"",h={filePath:a,mtimeMs:b,sessionId:f,project:g,projectPath:g.replace(/^-/,"/").replaceAll("-","/"),startTime:0,endTime:0,turnCount:0,models:[],inputTokens:0,cacheReadTokens:0,cacheCreationTokens:0,outputTokens:0,byModel:{},usageRecords:[],invocations:[],toolCalls:{},toolErrors:0,sidechainTurns:0};return new Promise(b=>{let e=(0,d.createInterface)({input:(0,c.createReadStream)(a,{encoding:"utf8"}),crlfDelay:1/0});e.on("line",a=>{let b;if(!a||"{"!==a[0])return;let c=a.includes('"usage"'),d=a.includes('"tool_use"'),e=a.includes('"tool_result"');if(!c&&!d&&!e)return;try{b=JSON.parse(a)}catch{return}let f=b.message,g=b.timestamp,i="string"==typeof g?Date.parse(g):NaN,j=!0===b.isSidechain,k=f?.usage;if(k){let a="string"==typeof f?.id?f.id:"",c="string"==typeof b.requestId?b.requestId:"",d=a?`${a}:${c}`:"",e=Number(k.cache_creation_input_tokens)||0,g=k.cache_creation??null,l=0,m=0;if(g&&"object"==typeof g){let a=e-((l=Number(g.ephemeral_5m_input_tokens)||0)+(m=Number(g.ephemeral_1h_input_tokens)||0));a>0&&(l+=a)}else l=e;h.usageRecords.push({dedupKey:d,model:f?.model||"<synthetic>",ts:Number.isFinite(i)?i:0,input:Number(k.input_tokens)||0,cacheRead:Number(k.cache_read_input_tokens)||0,cacheCreation5m:l,cacheCreation1h:m,output:Number(k.output_tokens)||0,isSidechain:j})}if(Array.isArray(f?.content)){for(let a of f.content)if(a&&"object"==typeof a)if("tool_use"===a.type){let b="string"==typeof a.name?a.name:"(unknown)";h.toolCalls[b]=(h.toolCalls[b]??0)+1;let c=a.input;c&&("Skill"===b&&"string"==typeof c.skill?h.invocations.push({kind:"skill",name:c.skill,ts:Number.isFinite(i)?i:0}):"Agent"===b&&"string"==typeof c.subagent_type&&h.invocations.push({kind:"agent",name:c.subagent_type,ts:Number.isFinite(i)?i:0}))}else"tool_result"===a.type&&!0===a.is_error&&(h.toolErrors+=1)}}),e.on("close",()=>b(h)),e.on("error",()=>b(h))})}async function j(a,b){let c=h.get(a);if(c&&c.mtimeMs===b)return c;let d=await i(a,b);for(c&&h.delete(a),h.set(a,d);h.size>5e3;){let a=h.keys().next().value;if(void 0===a)break;h.delete(a)}return d}async function k(a,b,c){let d=Array(a.length),e=0,f=Array.from({length:Math.min(b,a.length)},async()=>{for(;;){let b=e++;if(b>=a.length)return;d[b]=await c(a[b])}});return await Promise.all(f),d}async function l(a=30){let c,d,e,h=Date.now()-24*a*36e5;try{c=await (0,b.readdir)(g,{withFileTypes:!0})}catch{return[]}let i=[];return await Promise.all(c.map(async a=>{let c;if(!a.isDirectory())return;let d=(0,f.join)(g,String(a.name));try{c=await (0,b.readdir)(d,{withFileTypes:!0})}catch{return}for(let a of c){if(!a.isFile()||!a.name.endsWith(".jsonl"))continue;let c=(0,f.join)(d,a.name);try{let a=await (0,b.stat)(c);a.mtimeMs>=h&&i.push({filePath:c,mtimeMs:a.mtimeMs})}catch{}}})),d=[...await k(i,16,a=>j(a.filePath,a.mtimeMs))].sort((a,b)=>a.mtimeMs-b.mtimeMs),e=new Set,d.map(a=>{let b={...a,startTime:0,endTime:0,turnCount:0,inputTokens:0,cacheReadTokens:0,cacheCreationTokens:0,outputTokens:0,byModel:{},models:[],sidechainTurns:0},c=new Set;for(let d of a.usageRecords){if(d.dedupKey){if(e.has(d.dedupKey))continue;e.add(d.dedupKey)}b.inputTokens+=d.input,b.cacheReadTokens+=d.cacheRead,b.cacheCreationTokens+=d.cacheCreation5m+d.cacheCreation1h,b.outputTokens+=d.output,b.turnCount+=1,d.isSidechain&&(b.sidechainTurns+=1),c.add(d.model);let a=b.byModel[d.model]??{inputTokens:0,cacheReadTokens:0,cacheCreation5mTokens:0,cacheCreation1hTokens:0,outputTokens:0};a.inputTokens+=d.input,a.cacheReadTokens+=d.cacheRead,a.cacheCreation5mTokens+=d.cacheCreation5m,a.cacheCreation1hTokens+=d.cacheCreation1h,a.outputTokens+=d.output,b.byModel[d.model]=a,d.ts>0&&((!b.startTime||d.ts<b.startTime)&&(b.startTime=d.ts),d.ts>b.endTime&&(b.endTime=d.ts))}return b.models=[...c],b})}a.s(["getAllTranscripts",0,l],32110);let m=a.i(28886).default.models,n={opus:"claude-opus-4-7",sonnet:"claude-sonnet-4-6",haiku:"claude-haiku-4-5"},o=new Set;function p(a,b){let c=function(a){if(!a||"<synthetic>"===a)return null;if(m[a])return m[a];if(n[a]&&m[n[a]])return m[n[a]];let b=a.replace(/\[[^\]]+\]$/,"");if(b!==a&&m[b])return m[b];let c=b.replace(/-\d{8}$/,"");return m[c]?m[c]:(o.has(a)||(o.add(a),console.warn(`[contextscope] no price found for model "${a}" — treating as $0. Add to lib/model-prices.json or alias.`)),null)}(a);return c?b.input*c.input+b.output*c.output+b.cacheRead*c.cache_read+b.cacheCreation5m*c.cache_creation_5m+b.cacheCreation1h*c.cache_creation_1h:0}function q(a){let b=a.inputTokens+a.cacheReadTokens+a.cacheCreationTokens+a.outputTokens;return{sessionId:a.sessionId,project:a.project,projectPath:a.projectPath,filePath:a.filePath,startTime:a.startTime,endTime:a.endTime,turnCount:a.turnCount,models:a.models,inputTokens:a.inputTokens,cacheReadTokens:a.cacheReadTokens,cacheCreationTokens:a.cacheCreationTokens,outputTokens:a.outputTokens,totalTokens:b,costUsd:function(a){let b=0;for(let[c,d]of Object.entries(a.byModel))b+=p(c,{input:d.inputTokens,output:d.outputTokens,cacheRead:d.cacheReadTokens,cacheCreation5m:d.cacheCreation5mTokens,cacheCreation1h:d.cacheCreation1hTokens});return b}(a),toolCalls:a.toolCalls,toolErrors:a.toolErrors,sidechainTurns:a.sidechainTurns}}async function r(a=30){return(await l(a)).filter(a=>a.turnCount>0).map(q).sort((a,b)=>b.totalTokens-a.totalTokens)}a.s(["costForUsage",0,p,"formatUsd",0,function(a){return a>=100?`$${a.toFixed(0)}`:a>=10?`$${a.toFixed(1)}`:a>=1||a>=.01?`$${a.toFixed(2)}`:a>0?"<$0.01":"$0"}],78110),a.s(["getSessions",0,r,"summarizeSessions",0,function(a){if(0===a.length)return{count:0,totalTokens:0,totalOutputTokens:0,totalInputPlusCache:0,totalCostUsd:0,cacheHitRatio:0,outputInputRatio:0,averageSessionTokens:0,medianSessionTokens:0,p95SessionTokens:0,longSessions:[],dailyBurn:[],byProject:[],totalToolCalls:{},totalToolErrors:0,totalSidechainTurns:0,totalTurns:0};let b=[...a].map(a=>a.totalTokens).sort((a,b)=>a-b),c=b.reduce((a,b)=>a+b,0),d=b[Math.floor(b.length/2)],e=b[Math.min(b.length-1,Math.floor(.95*b.length))],f=0,g=0,h=0,i=0;for(let b of a)f+=b.inputTokens,g+=b.cacheReadTokens,h+=b.cacheCreationTokens,i+=b.outputTokens;let j=f+g+h,k=j>0?g/j:0,l=j>0?i/j:0,m=a.filter(a=>a.totalTokens>=5e5),n=new Map;for(let b of a){let a=b.endTime||b.startTime;if(!a)continue;let c=new Date(a),d=`${c.getUTCFullYear()}-${String(c.getUTCMonth()+1).padStart(2,"0")}-${String(c.getUTCDate()).padStart(2,"0")}`,e=n.get(d)??{tokens:0,cost:0};e.tokens+=b.totalTokens,e.cost+=b.costUsd,n.set(d,e)}let o=[...n.entries()].map(([a,b])=>({date:a,tokens:b.tokens,cost:b.cost})).sort((a,b)=>a.date.localeCompare(b.date)),p=new Map,q=0;for(let b of a){q+=b.costUsd;let a=p.get(b.project)??{project:b.project,projectPath:b.projectPath,count:0,tokens:0,cost:0,turns:0};a.count+=1,a.tokens+=b.totalTokens,a.cost+=b.costUsd,a.turns+=b.turnCount,p.set(b.project,a)}let r=[...p.values()].sort((a,b)=>b.tokens-a.tokens),s={},t=0,u=0,v=0;for(let b of a){for(let[a,c]of Object.entries(b.toolCalls))s[a]=(s[a]??0)+c;t+=b.toolErrors,u+=b.sidechainTurns,v+=b.turnCount}return{count:a.length,totalTokens:c,totalOutputTokens:i,totalInputPlusCache:j,totalCostUsd:q,cacheHitRatio:k,outputInputRatio:l,averageSessionTokens:Math.round(c/a.length),medianSessionTokens:d,p95SessionTokens:e,longSessions:m,dailyBurn:o,byProject:r,totalToolCalls:s,totalToolErrors:t,totalSidechainTurns:u,totalTurns:v}}],21249)}];
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}},12714,(a,b,c)=>{b.exports=a.x("node:fs/promises",()=>require("node:fs/promises"))},60526,(a,b,c)=>{b.exports=a.x("node:os",()=>require("node:os"))},50227,(a,b,c)=>{b.exports=a.x("node:path",()=>require("node:path"))},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)},84434,a=>{"use strict";var b=a.i(7997),c=a.i(95936);a.s(["MiniStat",0,function({label:a,value:c}){return(0,b.jsxs)("div",{className:"px-2 py-3 text-center",children:[(0,b.jsx)("div",{className:"text-sm font-semibold tabular-nums tracking-tight text-zinc-900 dark:text-zinc-50",children:c}),(0,b.jsx)("div",{className:"text-[10px] uppercase tracking-widest text-zinc-500 mt-0.5",children:a})]})},"Receipt",0,function({label:a,action:d,pad:e="default",className:f="",children:g}){let h=!!(a||d);return(0,b.jsxs)("div",{className:`rounded-lg border border-zinc-200 dark:border-zinc-800 bg-white dark:bg-zinc-900 ${f}`,children:[h&&(0,b.jsxs)("div",{className:"flex items-baseline justify-between gap-3 px-4 pt-3 pb-2 border-b border-zinc-200 dark:border-zinc-800",children:[(0,b.jsx)("div",{className:"text-[10px] uppercase tracking-widest text-zinc-500",children:a}),d&&(0,b.jsxs)(c.default,{href:d.href,className:"text-[10px] uppercase tracking-widest text-zinc-500 hover:text-zinc-900 dark:hover:text-zinc-100 transition-colors",children:[d.label," →"]})]}),(0,b.jsx)("div",{className:`${"none"===e?"":"tight"===e?"px-4 py-3":"loose"===e?"px-6 py-6 md:px-8 md:py-7":"px-4 py-4 md:px-6 md:py-5"} ${"none"===e?"overflow-x-auto":""}`,children:g})]})},"Stat",0,function({label:a,value:c,hint:d,align:e="left",size:f="lg"}){return(0,b.jsxs)("div",{className:"center"===e?"text-center":"right"===e?"text-right":"text-left",children:[(0,b.jsx)("div",{className:"text-[10px] uppercase tracking-widest text-zinc-500",children:a}),(0,b.jsx)("div",{className:`${"xl"===f?"text-3xl":"lg"===f?"text-2xl":"text-xl"} font-semibold tabular-nums tracking-tight text-zinc-900 dark:text-zinc-50 mt-1`,children:c}),d&&(0,b.jsx)("div",{className:"text-[10px] uppercase tracking-widest text-zinc-500 mt-0.5",children:d})]})}])},2157,(a,b,c)=>{b.exports=a.x("node:fs",()=>require("node:fs"))},1457,(a,b,c)=>{b.exports=a.x("node:readline",()=>require("node:readline"))},28886,(a,b,c)=>{b.exports={_source:"https://raw.githubusercontent.com/BerriAI/litellm/main/model_prices_and_context_window.json",_refreshedAt:"2026-05-27T17:24:45.345Z",_description:"Anthropic model prices in USD per token (input, output, cache_read, cache_creation 5min default). Refresh with `npm run refresh-prices`.",models:{"claude-3-7-sonnet-20250219":{input:3e-6,output:15e-6,cache_read:3e-7,cache_creation_5m:375e-8,cache_creation_1h:6e-6},"claude-3-haiku-20240307":{input:25e-8,output:125e-8,cache_read:3e-8,cache_creation_5m:3e-7,cache_creation_1h:6e-6},"claude-3-opus-20240229":{input:15e-6,output:75e-6,cache_read:15e-7,cache_creation_5m:1875e-8,cache_creation_1h:6e-6},"claude-4-opus-20250514":{input:15e-6,output:75e-6,cache_read:15e-7,cache_creation_5m:1875e-8,cache_creation_1h:375e-7},"claude-4-sonnet-20250514":{input:3e-6,output:15e-6,cache_read:3e-7,cache_creation_5m:375e-8,cache_creation_1h:75e-7},"claude-haiku-4-5":{input:1e-6,output:5e-6,cache_read:1e-7,cache_creation_5m:125e-8,cache_creation_1h:2e-6},"claude-haiku-4-5-20251001":{input:1e-6,output:5e-6,cache_read:1e-7,cache_creation_5m:125e-8,cache_creation_1h:2e-6},"claude-opus-4-1":{input:15e-6,output:75e-6,cache_read:15e-7,cache_creation_5m:1875e-8,cache_creation_1h:3e-5},"claude-opus-4-1-20250805":{input:15e-6,output:75e-6,cache_read:15e-7,cache_creation_5m:1875e-8,cache_creation_1h:3e-5},"claude-opus-4-20250514":{input:15e-6,output:75e-6,cache_read:15e-7,cache_creation_5m:1875e-8,cache_creation_1h:3e-5},"claude-opus-4-5":{input:5e-6,output:25e-6,cache_read:5e-7,cache_creation_5m:625e-8,cache_creation_1h:1e-5},"claude-opus-4-5-20251101":{input:5e-6,output:25e-6,cache_read:5e-7,cache_creation_5m:625e-8,cache_creation_1h:1e-5},"claude-opus-4-6":{input:5e-6,output:25e-6,cache_read:5e-7,cache_creation_5m:625e-8,cache_creation_1h:1e-5},"claude-opus-4-6-20260205":{input:5e-6,output:25e-6,cache_read:5e-7,cache_creation_5m:625e-8,cache_creation_1h:1e-5},"claude-opus-4-7":{input:5e-6,output:25e-6,cache_read:5e-7,cache_creation_5m:625e-8,cache_creation_1h:1e-5},"claude-opus-4-7-20260416":{input:5e-6,output:25e-6,cache_read:5e-7,cache_creation_5m:625e-8,cache_creation_1h:1e-5},"claude-sonnet-4-20250514":{input:3e-6,output:15e-6,cache_read:3e-7,cache_creation_5m:375e-8,cache_creation_1h:6e-6},"claude-sonnet-4-5":{input:3e-6,output:15e-6,cache_read:3e-7,cache_creation_5m:375e-8,cache_creation_1h:75e-7},"claude-sonnet-4-5-20250929":{input:3e-6,output:15e-6,cache_read:3e-7,cache_creation_5m:375e-8,cache_creation_1h:75e-7},"claude-sonnet-4-6":{input:3e-6,output:15e-6,cache_read:3e-7,cache_creation_5m:375e-8,cache_creation_1h:75e-7}}}},21249,32110,78110,a=>{"use strict";var b=a.i(12714),c=a.i(2157),d=a.i(1457),e=a.i(60526),f=a.i(50227);let g=(0,f.join)((0,e.homedir)(),".claude","projects"),h=new Map;async function i(a,b){let e=a.split("/"),f="subagents"===e[e.length-2],g=f?e[e.length-3]??"":e[e.length-1].replace(/\.jsonl$/,""),h=f?e[e.length-4]??"":e[e.length-2]??"",i={filePath:a,mtimeMs:b,sessionId:g,project:h,projectPath:h.replace(/^-/,"/").replaceAll("-","/"),startTime:0,endTime:0,turnCount:0,models:[],inputTokens:0,cacheReadTokens:0,cacheCreationTokens:0,outputTokens:0,byModel:{},usageRecords:[],invocations:[],toolCalls:{},toolErrors:0,sidechainTurns:0};return new Promise(b=>{let e=(0,d.createInterface)({input:(0,c.createReadStream)(a,{encoding:"utf8"}),crlfDelay:1/0});e.on("line",a=>{let b;if(!a||"{"!==a[0])return;let c=a.includes('"usage"'),d=a.includes('"tool_use"'),e=a.includes('"tool_result"');if(!c&&!d&&!e)return;try{b=JSON.parse(a)}catch{return}let f=b.message,g=b.timestamp,h="string"==typeof g?Date.parse(g):NaN,j=!0===b.isSidechain,k=f?.usage;if(k){let a="string"==typeof f?.id?f.id:"",c="string"==typeof b.requestId?b.requestId:"",d=a?`${a}:${c}`:"",e=Number(k.cache_creation_input_tokens)||0,g=k.cache_creation??null,l=0,m=0;if(g&&"object"==typeof g){let a=e-((l=Number(g.ephemeral_5m_input_tokens)||0)+(m=Number(g.ephemeral_1h_input_tokens)||0));a>0&&(l+=a)}else l=e;i.usageRecords.push({dedupKey:d,model:f?.model||"<synthetic>",ts:Number.isFinite(h)?h:0,input:Number(k.input_tokens)||0,cacheRead:Number(k.cache_read_input_tokens)||0,cacheCreation5m:l,cacheCreation1h:m,output:Number(k.output_tokens)||0,isSidechain:j})}if(Array.isArray(f?.content)){for(let a of f.content)if(a&&"object"==typeof a)if("tool_use"===a.type){let b="string"==typeof a.name?a.name:"(unknown)";i.toolCalls[b]=(i.toolCalls[b]??0)+1;let c=a.input;c&&("Skill"===b&&"string"==typeof c.skill?i.invocations.push({kind:"skill",name:c.skill,ts:Number.isFinite(h)?h:0}):"Agent"===b&&"string"==typeof c.subagent_type&&i.invocations.push({kind:"agent",name:c.subagent_type,ts:Number.isFinite(h)?h:0}))}else"tool_result"===a.type&&!0===a.is_error&&(i.toolErrors+=1)}}),e.on("close",()=>b(i)),e.on("error",()=>b(i))})}async function j(a,b){let c=h.get(a);if(c&&c.mtimeMs===b)return c;let d=await i(a,b);for(c&&h.delete(a),h.set(a,d);h.size>5e3;){let a=h.keys().next().value;if(void 0===a)break;h.delete(a)}return d}async function k(a,b,c){let d=Array(a.length),e=0,f=Array.from({length:Math.min(b,a.length)},async()=>{for(;;){let b=e++;if(b>=a.length)return;d[b]=await c(a[b])}});return await Promise.all(f),d}async function l(a,c,d,e=0){let g;if(!(e>3)){try{g=await (0,b.readdir)(a,{withFileTypes:!0})}catch{return}for(let h of g){let g=(0,f.join)(a,h.name);if(h.isDirectory()){await l(g,c,d,e+1);continue}if(h.isFile()&&h.name.endsWith(".jsonl"))try{let a=await (0,b.stat)(g);a.mtimeMs>=c&&d.push({filePath:g,mtimeMs:a.mtimeMs})}catch{}}}}async function m(a=30){let c,d=Date.now()-24*a*36e5;try{c=await (0,b.readdir)(g,{withFileTypes:!0})}catch{return[]}let e=[];return await Promise.all(c.map(async a=>{a.isDirectory()&&await l((0,f.join)(g,String(a.name)),d,e)})),function(a){let b=[...a].sort((a,b)=>a.mtimeMs-b.mtimeMs),c=new Set,d=new Map;for(let a of b){let b=`${a.project}\0${a.sessionId}`,e=d.get(b);for(let c of(e?a.filePath.includes("/subagents/")||(e.filePath=a.filePath,e.mtimeMs=Math.max(e.mtimeMs,a.mtimeMs)):(e={filePath:a.filePath,mtimeMs:a.mtimeMs,sessionId:a.sessionId,project:a.project,projectPath:a.projectPath,startTime:0,endTime:0,turnCount:0,models:[],inputTokens:0,cacheReadTokens:0,cacheCreationTokens:0,outputTokens:0,byModel:{},usageRecords:[],invocations:[],toolCalls:{},toolErrors:0,sidechainTurns:0},d.set(b,e)),a.invocations))e.invocations.push(c);for(let[b,c]of Object.entries(a.toolCalls))e.toolCalls[b]=(e.toolCalls[b]??0)+c;e.toolErrors+=a.toolErrors;let f=new Set(e.models);for(let b of a.usageRecords){if(b.dedupKey){if(c.has(b.dedupKey))continue;c.add(b.dedupKey)}e.inputTokens+=b.input,e.cacheReadTokens+=b.cacheRead,e.cacheCreationTokens+=b.cacheCreation5m+b.cacheCreation1h,e.outputTokens+=b.output,e.turnCount+=1,b.isSidechain&&(e.sidechainTurns+=1),f.add(b.model);let a=e.byModel[b.model]??{inputTokens:0,cacheReadTokens:0,cacheCreation5mTokens:0,cacheCreation1hTokens:0,outputTokens:0};a.inputTokens+=b.input,a.cacheReadTokens+=b.cacheRead,a.cacheCreation5mTokens+=b.cacheCreation5m,a.cacheCreation1hTokens+=b.cacheCreation1h,a.outputTokens+=b.output,e.byModel[b.model]=a,b.ts>0&&((!e.startTime||b.ts<e.startTime)&&(e.startTime=b.ts),b.ts>e.endTime&&(e.endTime=b.ts))}e.models=[...f]}return[...d.values()]}(await k(e,16,a=>j(a.filePath,a.mtimeMs)))}a.s(["getAllTranscripts",0,m],32110);let n=a.i(28886).default.models,o={opus:"claude-opus-4-7",sonnet:"claude-sonnet-4-6",haiku:"claude-haiku-4-5"},p=new Set;function q(a,b){let c=function(a){if(!a||"<synthetic>"===a)return null;if(n[a])return n[a];if(o[a]&&n[o[a]])return n[o[a]];let b=a.replace(/\[[^\]]+\]$/,"");if(b!==a&&n[b])return n[b];let c=b.replace(/-\d{8}$/,"");return n[c]?n[c]:(p.has(a)||(p.add(a),console.warn(`[contextscope] no price found for model "${a}" — treating as $0. Add to lib/model-prices.json or alias.`)),null)}(a);return c?b.input*c.input+b.output*c.output+b.cacheRead*c.cache_read+b.cacheCreation5m*c.cache_creation_5m+b.cacheCreation1h*c.cache_creation_1h:0}function r(a){let b=a.inputTokens+a.cacheReadTokens+a.cacheCreationTokens+a.outputTokens;return{sessionId:a.sessionId,project:a.project,projectPath:a.projectPath,filePath:a.filePath,startTime:a.startTime,endTime:a.endTime,turnCount:a.turnCount,models:a.models,inputTokens:a.inputTokens,cacheReadTokens:a.cacheReadTokens,cacheCreationTokens:a.cacheCreationTokens,outputTokens:a.outputTokens,totalTokens:b,costUsd:function(a){let b=0;for(let[c,d]of Object.entries(a.byModel))b+=q(c,{input:d.inputTokens,output:d.outputTokens,cacheRead:d.cacheReadTokens,cacheCreation5m:d.cacheCreation5mTokens,cacheCreation1h:d.cacheCreation1hTokens});return b}(a),toolCalls:a.toolCalls,toolErrors:a.toolErrors,sidechainTurns:a.sidechainTurns}}async function s(a=30){return(await m(a)).filter(a=>a.turnCount>0).map(r).sort((a,b)=>b.totalTokens-a.totalTokens)}a.s(["costForUsage",0,q,"formatUsd",0,function(a){return a>=100?`$${a.toFixed(0)}`:a>=10?`$${a.toFixed(1)}`:a>=1||a>=.01?`$${a.toFixed(2)}`:a>0?"<$0.01":"$0"}],78110),a.s(["getSessions",0,s,"summarizeSessions",0,function(a){if(0===a.length)return{count:0,totalTokens:0,totalOutputTokens:0,totalInputPlusCache:0,totalCostUsd:0,cacheHitRatio:0,outputInputRatio:0,averageSessionTokens:0,medianSessionTokens:0,p95SessionTokens:0,longSessions:[],dailyBurn:[],byProject:[],totalToolCalls:{},totalToolErrors:0,totalSidechainTurns:0,totalTurns:0};let b=[...a].map(a=>a.totalTokens).sort((a,b)=>a-b),c=b.reduce((a,b)=>a+b,0),d=b[Math.floor(b.length/2)],e=b[Math.min(b.length-1,Math.floor(.95*b.length))],f=0,g=0,h=0,i=0;for(let b of a)f+=b.inputTokens,g+=b.cacheReadTokens,h+=b.cacheCreationTokens,i+=b.outputTokens;let j=f+g+h,k=j>0?g/j:0,l=j>0?i/j:0,m=a.filter(a=>a.totalTokens>=5e5),n=new Map;for(let b of a){let a=b.endTime||b.startTime;if(!a)continue;let c=new Date(a),d=`${c.getUTCFullYear()}-${String(c.getUTCMonth()+1).padStart(2,"0")}-${String(c.getUTCDate()).padStart(2,"0")}`,e=n.get(d)??{tokens:0,cost:0};e.tokens+=b.totalTokens,e.cost+=b.costUsd,n.set(d,e)}let o=[...n.entries()].map(([a,b])=>({date:a,tokens:b.tokens,cost:b.cost})).sort((a,b)=>a.date.localeCompare(b.date)),p=new Map,q=0;for(let b of a){q+=b.costUsd;let a=p.get(b.project)??{project:b.project,projectPath:b.projectPath,count:0,tokens:0,cost:0,turns:0};a.count+=1,a.tokens+=b.totalTokens,a.cost+=b.costUsd,a.turns+=b.turnCount,p.set(b.project,a)}let r=[...p.values()].sort((a,b)=>b.tokens-a.tokens),s={},t=0,u=0,v=0;for(let b of a){for(let[a,c]of Object.entries(b.toolCalls))s[a]=(s[a]??0)+c;t+=b.toolErrors,u+=b.sidechainTurns,v+=b.turnCount}return{count:a.length,totalTokens:c,totalOutputTokens:i,totalInputPlusCache:j,totalCostUsd:q,cacheHitRatio:k,outputInputRatio:l,averageSessionTokens:Math.round(c/a.length),medianSessionTokens:d,p95SessionTokens:e,longSessions:m,dailyBurn:o,byProject:r,totalToolCalls:s,totalToolErrors:t,totalSidechainTurns:u,totalTurns:v}}],21249)}];
2
2
 
3
3
  //# sourceMappingURL=%5Broot-of-the-server%5D__0p2sxww._.js.map
@@ -1,3 +1,3 @@
1
- module.exports=[13952,a=>{"use strict";var b=a.i(12714),c=a.i(60526),d=a.i(50227),e=a.i(23789);let f=(0,c.homedir)(),g=(0,d.join)(f,".claude"),h=(0,d.join)(g,"projects"),i=(0,e.getEncoding)("cl100k_base"),j=[f],k=new Set(["node_modules",".git",".next","dist","build",".turbo",".vercel",".cache",".pnpm-store",".vscode",".antigravity",".bun",".cursor",".windsurf","worktrees"]);async function l(a){try{return await (0,b.stat)(a),!0}catch{return!1}}async function m(a){try{var c;return c=await (0,b.readFile)(a,"utf8"),i.encode(c).length}catch{return 0}}async function n(a,c,e){let f;if(!(c>4)){try{f=await (0,b.readdir)(a,{withFileTypes:!0})}catch{return}for(let b of f){if(b.name.startsWith(".")&&".claude"!==b.name&&(k.has(b.name)||c>0)||k.has(b.name))continue;let f=(0,d.join)(a,b.name);b.isDirectory()?await n(f,c+1,e):b.isFile()&&"CLAUDE.md"===b.name&&e.push(f)}}}async function o(){let a=[],c=(0,d.join)(g,"CLAUDE.md");await l(c)&&a.push({category:"claude-md-global",name:"~/.claude/CLAUDE.md",filePath:c,tokens:await m(c),loadedWhen:"every session"});let e=[];for(let a of j)await n(a,0,e);for(let b of e){if(b===c)continue;let d=await m(b),e=b.replace(f,"~"),g=e.replace(/\/CLAUDE\.md$/,"");a.push({category:"claude-md-project",name:e,filePath:b,tokens:d,loadedWhen:`when cwd is ${g} (or below)`})}if(await l(h)){let c=[];try{c=await (0,b.readdir)(h,{withFileTypes:!0})}catch{c=[]}for(let b of c){if(!b.isDirectory())continue;let c=String(b.name),e=(0,d.join)(h,c,"memory","MEMORY.md");if(!await l(e))continue;let f=c.replace(/^-/,"/").replaceAll("-","/").replace(/[\x00-\x1f\x7f]/g,"");a.push({category:"memory-md",name:`${c}/memory/MEMORY.md`,filePath:e,tokens:await m(e),loadedWhen:`in project ${f}`})}}return a.sort((a,b)=>b.tokens-a.tokens)}a.s(["getContextFiles",0,o])},50708,a=>{"use strict";var b=a.i(7997),c=a.i(37936),d=a.i(44721),e=a.i(95936),f=a.i(55574),g=a.i(62367),h=a.i(21249),i=a.i(13952),j=a.i(71120),k=a.i(78110),l=a.i(84434),m=a.i(56004);let n=new Intl.NumberFormat("en-US");function o(a){return a>=1e9?`${(a/1e9).toFixed(2)}B`:a>=1e6?`${(a/1e6).toFixed(1)}M`:a>=1e3?`${(a/1e3).toFixed(1)}k`:String(a)}let p=async function(a){var[b]=await (0,d.decryptActionBoundArgs)("40b82ab2b5a2575d5c2beb515f28609f42c434a44f",a);await (0,m.toggleUserItem)(b)};async function q(){let[a,c,m,q,r]=await Promise.all([(0,f.getInventory)(),(0,g.getUsage)(30),(0,h.getSessions)(30),(0,i.getContextFiles)(),(0,j.getHooks)()]),s=(0,f.summarize)(a),t=(0,h.summarizeSessions)(m),u=a.map(a=>({...a,...(0,g.lookupUsage)(a,c)})).filter(a=>!a.disabled&&0===a.invocations&&"user"===a.source).sort((a,b)=>b.perTurnTokens-a.perTurnTokens).slice(0,5),v=u.reduce((a,b)=>a+b.perTurnTokens,0),w=q.find(a=>"claude-md-global"===a.category),x=q.filter(a=>"memory-md"===a.category).sort((a,b)=>b.tokens-a.tokens)[0],y=r.filter(a=>"SessionStart"===a.event&&"measured"===a.status).reduce((a,b)=>a+b.perTurnTokens,0),z=Math.max(1,...t.dailyBurn.map(a=>a.tokens)),A=(w?.tokens??0)+(x?.tokens??0)+y,B=+!!w+ +!!x+ +(y>0);return(0,b.jsx)("main",{className:"flex-1 font-mono bg-zinc-50 dark:bg-zinc-950",children:(0,b.jsxs)("div",{className:"max-w-6xl mx-auto px-6 py-10",children:[(0,b.jsxs)("header",{className:"mb-8 flex flex-col sm:flex-row sm:items-baseline sm:justify-between gap-2",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("h1",{className:"text-xl font-semibold tracking-tight",children:"contextscope"}),(0,b.jsx)("p",{className:"text-[10px] uppercase tracking-widest text-zinc-500 mt-1",children:"audit · trim · ship"})]}),(0,b.jsx)("code",{className:"text-[10px] uppercase tracking-widest text-zinc-500",children:"~/.claude/projects/"})]}),(0,b.jsx)("section",{className:"flex justify-center mb-6",children:(0,b.jsxs)("div",{className:"w-full max-w-md rounded-lg border border-zinc-200 dark:border-zinc-800 bg-white dark:bg-zinc-900",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between px-4 pt-3 pb-2 border-b border-zinc-200 dark:border-zinc-800",children:[(0,b.jsxs)("span",{className:"text-[10px] uppercase tracking-widest text-zinc-500",children:[30,"-day window"]}),(0,b.jsx)(e.default,{href:"/items",className:"text-[10px] uppercase tracking-widest text-zinc-500 hover:text-zinc-900 dark:hover:text-zinc-100 transition-colors",children:"items →"})]}),(0,b.jsxs)("div",{className:"px-8 py-6 text-center",children:[(0,b.jsx)("div",{className:"text-[10px] uppercase tracking-widest text-zinc-500",children:"per-turn baseline"}),(0,b.jsxs)("div",{className:"mt-2 text-4xl font-semibold tabular-nums tracking-tight text-zinc-900 dark:text-zinc-50",children:[n.format(s.totalPerTurnTokens),(0,b.jsx)("span",{className:"ml-1.5 text-sm text-zinc-500 font-normal",children:"tok"})]}),(0,b.jsx)("div",{className:"text-[10px] uppercase tracking-widest text-zinc-500 mt-1",children:"loaded into every system prompt"})]}),(0,b.jsxs)("div",{className:"grid grid-cols-4 border-t border-zinc-200 dark:border-zinc-800 divide-x divide-zinc-200 dark:divide-zinc-800",children:[(0,b.jsx)(l.MiniStat,{label:"items",value:n.format(s.totalItems)}),(0,b.jsx)(l.MiniStat,{label:"skills",value:n.format(s.byKind.skill.count)}),(0,b.jsx)(l.MiniStat,{label:"agents",value:n.format(s.byKind.agent.count)}),(0,b.jsx)(l.MiniStat,{label:"commands",value:n.format(s.byKind.command.count)})]})]})}),(0,b.jsxs)("section",{className:"grid grid-cols-1 md:grid-cols-3 gap-3",children:[(0,b.jsxs)("div",{className:"rounded-lg border border-zinc-200 dark:border-zinc-800 bg-white dark:bg-zinc-900 px-4 py-4 flex flex-col",children:[(0,b.jsxs)("div",{className:"flex items-baseline justify-between",children:[(0,b.jsxs)("div",{className:"text-[10px] uppercase tracking-widest text-zinc-500",children:[30,"-day burn"]}),(0,b.jsx)(e.default,{href:"/sessions",className:"text-[10px] uppercase tracking-widest text-zinc-500 hover:text-zinc-900 dark:hover:text-zinc-100 transition-colors",children:"sessions →"})]}),(0,b.jsxs)("div",{className:"mt-1.5 text-2xl font-semibold tabular-nums tracking-tight text-zinc-900 dark:text-zinc-50",children:[o(t.totalTokens),(0,b.jsx)("span",{className:"ml-1 text-xs text-zinc-500 font-normal",children:"tok"}),(0,b.jsx)("span",{className:"ml-2 text-xs text-zinc-500 font-normal",children:"·"}),(0,b.jsx)("span",{className:"ml-2 text-base font-semibold tabular-nums text-zinc-900 dark:text-zinc-50",children:(0,k.formatUsd)(t.totalCostUsd)}),(0,b.jsx)("span",{className:"ml-1 text-xs text-zinc-500 font-normal",children:"api"})]}),t.dailyBurn.length>0&&(0,b.jsxs)("div",{className:"mt-3",children:[(0,b.jsx)("div",{className:"flex items-end gap-px h-8",children:t.dailyBurn.map(a=>{let c=Math.max(2,a.tokens/z*100);return(0,b.jsx)("div",{className:"flex-1 bg-zinc-300 dark:bg-zinc-700",style:{height:`${c}%`},title:`${a.date}: ${o(a.tokens)} \xb7 ${(0,k.formatUsd)(a.cost)}`},a.date)})}),(0,b.jsxs)("div",{className:"flex items-center justify-between mt-1 text-[10px] uppercase tracking-widest text-zinc-500 tabular-nums",children:[(0,b.jsx)("span",{children:t.dailyBurn[0].date.slice(5)}),(0,b.jsxs)("span",{children:[t.dailyBurn.length," active days"]}),(0,b.jsx)("span",{children:t.dailyBurn[t.dailyBurn.length-1].date.slice(5)})]})]}),(0,b.jsxs)("div",{className:"mt-3 pt-3 border-t border-zinc-200 dark:border-zinc-800 grid grid-cols-3 text-center",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("div",{className:"text-[10px] uppercase tracking-widest text-zinc-500",children:"sess"}),(0,b.jsx)("div",{className:"text-xs font-semibold tabular-nums mt-0.5",children:n.format(t.count)})]}),(0,b.jsxs)("div",{children:[(0,b.jsx)("div",{className:"text-[10px] uppercase tracking-widest text-zinc-500",children:"median"}),(0,b.jsx)("div",{className:"text-xs font-semibold tabular-nums mt-0.5",children:o(t.medianSessionTokens)})]}),(0,b.jsxs)("div",{children:[(0,b.jsx)("div",{className:"text-[10px] uppercase tracking-widest text-zinc-500",children:"p95"}),(0,b.jsx)("div",{className:"text-xs font-semibold tabular-nums mt-0.5",children:o(t.p95SessionTokens)})]})]})]}),(0,b.jsxs)("div",{className:"rounded-lg border border-zinc-200 dark:border-zinc-800 bg-white dark:bg-zinc-900 px-4 py-4 flex flex-col",children:[(0,b.jsxs)("div",{className:"flex items-baseline justify-between",children:[(0,b.jsx)("div",{className:"text-[10px] uppercase tracking-widest text-zinc-500",children:"disable candidates"}),(0,b.jsx)(e.default,{href:"/items",className:"text-[10px] uppercase tracking-widest text-zinc-500 hover:text-zinc-900 dark:hover:text-zinc-100 transition-colors",children:"all →"})]}),(0,b.jsxs)("div",{className:"mt-1.5 text-2xl font-semibold tabular-nums tracking-tight text-zinc-900 dark:text-zinc-50",children:[n.format(v),(0,b.jsx)("span",{className:"ml-1 text-xs text-zinc-500 font-normal",children:"tok/turn"})]}),(0,b.jsx)("div",{className:"text-[10px] uppercase tracking-widest text-zinc-500",children:u.length>0?`top ${u.length} unused`:"none in window"}),(0,b.jsx)("ul",{className:"mt-3 pt-3 border-t border-zinc-200 dark:border-zinc-800 text-xs space-y-1 flex-1",children:0===u.length?(0,b.jsxs)("li",{className:"text-zinc-500",children:["every loaded user item invoked in ",30,"d."]}):u.map(a=>(0,b.jsxs)("li",{className:"flex items-center gap-2",children:[(0,b.jsx)("span",{className:"w-10 text-right tabular-nums text-zinc-500",children:n.format(a.perTurnTokens)}),(0,b.jsx)("span",{className:"flex-1 truncate text-zinc-700 dark:text-zinc-300",children:a.name}),(0,b.jsx)("span",{className:"text-[10px] uppercase tracking-widest text-zinc-500 w-12",children:a.kind}),(0,b.jsx)("form",{action:p.bind(null,(0,d.encryptActionBoundArgs)("40b82ab2b5a2575d5c2beb515f28609f42c434a44f",a.filePath)),children:(0,b.jsx)("button",{type:"submit",className:"text-[10px] uppercase tracking-widest text-zinc-600 dark:text-zinc-400 border border-zinc-300 dark:border-zinc-700 hover:text-red-700 dark:hover:text-red-400 hover:border-red-300 dark:hover:border-red-800 hover:bg-red-50 dark:hover:bg-red-950/40 rounded px-1.5 py-0.5 transition-colors cursor-pointer",title:`Disable ${a.name}`,children:"off"})})]},a.filePath))})]}),(0,b.jsxs)("div",{className:"rounded-lg border border-zinc-200 dark:border-zinc-800 bg-white dark:bg-zinc-900 px-4 py-4 flex flex-col",children:[(0,b.jsxs)("div",{className:"flex items-baseline justify-between",children:[(0,b.jsx)("div",{className:"text-[10px] uppercase tracking-widest text-zinc-500",children:"context overhead"}),(0,b.jsx)(e.default,{href:"/context",className:"text-[10px] uppercase tracking-widest text-zinc-500 hover:text-zinc-900 dark:hover:text-zinc-100 transition-colors",children:"context →"})]}),(0,b.jsxs)("div",{className:"mt-1.5 text-2xl font-semibold tabular-nums tracking-tight text-zinc-900 dark:text-zinc-50",children:[n.format(A),(0,b.jsx)("span",{className:"ml-1 text-xs text-zinc-500 font-normal",children:"tok"})]}),(0,b.jsxs)("div",{className:"text-[10px] uppercase tracking-widest text-zinc-500",children:["top ",B," sticky"," ",1===B?"source":"sources"]}),(0,b.jsxs)("ul",{className:"mt-3 pt-3 border-t border-zinc-200 dark:border-zinc-800 text-xs space-y-1 flex-1",children:[w&&(0,b.jsxs)("li",{className:"flex items-center gap-2",children:[(0,b.jsx)("span",{className:"w-10 text-right tabular-nums text-zinc-500",children:n.format(w.tokens)}),(0,b.jsx)("span",{className:"flex-1 truncate text-zinc-700 dark:text-zinc-300",children:(0,b.jsx)("code",{className:"text-[11px]",children:"~/.claude/CLAUDE.md"})}),(0,b.jsx)("span",{className:"text-[10px] uppercase tracking-widest text-zinc-500",children:"every"})]}),x&&(0,b.jsxs)("li",{className:"flex items-center gap-2",children:[(0,b.jsx)("span",{className:"w-10 text-right tabular-nums text-zinc-500",children:n.format(x.tokens)}),(0,b.jsx)("span",{className:"flex-1 truncate text-zinc-700 dark:text-zinc-300",children:(0,b.jsx)("code",{className:"text-[11px]",children:x.name})}),(0,b.jsx)("span",{className:"text-[10px] uppercase tracking-widest text-zinc-500",children:"mem"})]}),y>0&&(0,b.jsxs)("li",{className:"flex items-center gap-2",children:[(0,b.jsx)("span",{className:"w-10 text-right tabular-nums text-zinc-500",children:n.format(y)}),(0,b.jsx)("span",{className:"flex-1 truncate text-zinc-700 dark:text-zinc-300",children:"SessionStart hooks"}),(0,b.jsx)("span",{className:"text-[10px] uppercase tracking-widest text-zinc-500",children:"sticky"})]})]})]})]}),(0,b.jsxs)("footer",{className:"mt-8 pt-4 border-t border-zinc-200 dark:border-zinc-800 text-[10px] uppercase tracking-widest text-zinc-500 flex items-center justify-between",children:[(0,b.jsx)("span",{children:"cl100k_base · cost deduped per msg.id (cc splits one msg across lines · ccusage daily sums dupes) · toggles apply on next cc restart"}),(0,b.jsx)("a",{href:"https://github.com/mbeato/contextscope",className:"text-zinc-500 hover:text-zinc-900 dark:hover:text-zinc-100 transition-colors",children:"github →"})]})]})})}(0,c.registerServerReference)(p,"40b82ab2b5a2575d5c2beb515f28609f42c434a44f",null),a.s(["$$RSC_SERVER_ACTION_0",0,p,"default",0,q,"dynamic",0,"force-dynamic"])}];
1
+ module.exports=[13952,a=>{"use strict";var b=a.i(12714),c=a.i(60526),d=a.i(50227),e=a.i(23789);let f=(0,c.homedir)(),g=(0,d.join)(f,".claude"),h=(0,d.join)(g,"projects"),i=(0,e.getEncoding)("cl100k_base"),j=[f],k=new Set(["node_modules",".git",".next","dist","build",".turbo",".vercel",".cache",".pnpm-store",".vscode",".antigravity",".bun",".cursor",".windsurf","worktrees"]);async function l(a){try{return await (0,b.stat)(a),!0}catch{return!1}}async function m(a){try{var c;return c=await (0,b.readFile)(a,"utf8"),i.encode(c).length}catch{return 0}}async function n(a,c,e){let f;if(!(c>4)){try{f=await (0,b.readdir)(a,{withFileTypes:!0})}catch{return}for(let b of f){if(b.name.startsWith(".")&&".claude"!==b.name&&(k.has(b.name)||c>0)||k.has(b.name))continue;let f=(0,d.join)(a,b.name);b.isDirectory()?await n(f,c+1,e):b.isFile()&&"CLAUDE.md"===b.name&&e.push(f)}}}async function o(){let a=[],c=(0,d.join)(g,"CLAUDE.md");await l(c)&&a.push({category:"claude-md-global",name:"~/.claude/CLAUDE.md",filePath:c,tokens:await m(c),loadedWhen:"every session"});let e=[];for(let a of j)await n(a,0,e);for(let b of e){if(b===c)continue;let d=await m(b),e=b.replace(f,"~"),g=e.replace(/\/CLAUDE\.md$/,"");a.push({category:"claude-md-project",name:e,filePath:b,tokens:d,loadedWhen:`when cwd is ${g} (or below)`})}if(await l(h)){let c=[];try{c=await (0,b.readdir)(h,{withFileTypes:!0})}catch{c=[]}for(let b of c){if(!b.isDirectory())continue;let c=String(b.name),e=(0,d.join)(h,c,"memory","MEMORY.md");if(!await l(e))continue;let f=c.replace(/^-/,"/").replaceAll("-","/").replace(/[\x00-\x1f\x7f]/g,"");a.push({category:"memory-md",name:`${c}/memory/MEMORY.md`,filePath:e,tokens:await m(e),loadedWhen:`in project ${f}`})}}return a.sort((a,b)=>b.tokens-a.tokens)}a.s(["getContextFiles",0,o])},50708,a=>{"use strict";var b=a.i(7997),c=a.i(37936),d=a.i(44721),e=a.i(95936),f=a.i(55574),g=a.i(62367),h=a.i(21249),i=a.i(13952),j=a.i(71120),k=a.i(78110),l=a.i(84434),m=a.i(56004);let n=new Intl.NumberFormat("en-US");function o(a){return a>=1e9?`${(a/1e9).toFixed(2)}B`:a>=1e6?`${(a/1e6).toFixed(1)}M`:a>=1e3?`${(a/1e3).toFixed(1)}k`:String(a)}let p=async function(a){var[b]=await (0,d.decryptActionBoundArgs)("40b82ab2b5a2575d5c2beb515f28609f42c434a44f",a);await (0,m.toggleUserItem)(b)};async function q(){let[a,c,m,q,r]=await Promise.all([(0,f.getInventory)(),(0,g.getUsage)(30),(0,h.getSessions)(30),(0,i.getContextFiles)(),(0,j.getHooks)()]),s=(0,f.summarize)(a),t=(0,h.summarizeSessions)(m),u=a.map(a=>({...a,...(0,g.lookupUsage)(a,c)})).filter(a=>!a.disabled&&0===a.invocations&&"user"===a.source).sort((a,b)=>b.perTurnTokens-a.perTurnTokens).slice(0,5),v=u.reduce((a,b)=>a+b.perTurnTokens,0),w=q.find(a=>"claude-md-global"===a.category),x=q.filter(a=>"memory-md"===a.category).sort((a,b)=>b.tokens-a.tokens)[0],y=r.filter(a=>"SessionStart"===a.event&&"measured"===a.status).reduce((a,b)=>a+b.perTurnTokens,0),z=Math.max(1,...t.dailyBurn.map(a=>a.tokens)),A=(w?.tokens??0)+(x?.tokens??0)+y,B=+!!w+ +!!x+ +(y>0);return(0,b.jsx)("main",{className:"flex-1 font-mono bg-zinc-50 dark:bg-zinc-950",children:(0,b.jsxs)("div",{className:"max-w-6xl mx-auto px-6 py-10",children:[(0,b.jsxs)("header",{className:"mb-8 flex flex-col sm:flex-row sm:items-baseline sm:justify-between gap-2",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("h1",{className:"text-xl font-semibold tracking-tight",children:"contextscope"}),(0,b.jsx)("p",{className:"text-[10px] uppercase tracking-widest text-zinc-500 mt-1",children:"audit · trim · ship"})]}),(0,b.jsx)("code",{className:"text-[10px] uppercase tracking-widest text-zinc-500",children:"~/.claude/projects/"})]}),(0,b.jsx)("section",{className:"flex justify-center mb-6",children:(0,b.jsxs)("div",{className:"w-full max-w-md rounded-lg border border-zinc-200 dark:border-zinc-800 bg-white dark:bg-zinc-900",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between px-4 pt-3 pb-2 border-b border-zinc-200 dark:border-zinc-800",children:[(0,b.jsxs)("span",{className:"text-[10px] uppercase tracking-widest text-zinc-500",children:[30,"-day window"]}),(0,b.jsx)(e.default,{href:"/items",className:"text-[10px] uppercase tracking-widest text-zinc-500 hover:text-zinc-900 dark:hover:text-zinc-100 transition-colors",children:"items →"})]}),(0,b.jsxs)("div",{className:"px-8 py-6 text-center",children:[(0,b.jsx)("div",{className:"text-[10px] uppercase tracking-widest text-zinc-500",children:"per-turn baseline"}),(0,b.jsxs)("div",{className:"mt-2 text-4xl font-semibold tabular-nums tracking-tight text-zinc-900 dark:text-zinc-50",children:[n.format(s.totalPerTurnTokens),(0,b.jsx)("span",{className:"ml-1.5 text-sm text-zinc-500 font-normal",children:"tok"})]}),(0,b.jsx)("div",{className:"text-[10px] uppercase tracking-widest text-zinc-500 mt-1",children:"loaded into every system prompt"})]}),(0,b.jsxs)("div",{className:"grid grid-cols-4 border-t border-zinc-200 dark:border-zinc-800 divide-x divide-zinc-200 dark:divide-zinc-800",children:[(0,b.jsx)(l.MiniStat,{label:"items",value:n.format(s.totalItems)}),(0,b.jsx)(l.MiniStat,{label:"skills",value:n.format(s.byKind.skill.count)}),(0,b.jsx)(l.MiniStat,{label:"agents",value:n.format(s.byKind.agent.count)}),(0,b.jsx)(l.MiniStat,{label:"commands",value:n.format(s.byKind.command.count)})]})]})}),(0,b.jsxs)("section",{className:"grid grid-cols-1 md:grid-cols-3 gap-3",children:[(0,b.jsxs)("div",{className:"rounded-lg border border-zinc-200 dark:border-zinc-800 bg-white dark:bg-zinc-900 px-4 py-4 flex flex-col",children:[(0,b.jsxs)("div",{className:"flex items-baseline justify-between",children:[(0,b.jsxs)("div",{className:"text-[10px] uppercase tracking-widest text-zinc-500",children:[30,"-day burn"]}),(0,b.jsx)(e.default,{href:"/sessions",className:"text-[10px] uppercase tracking-widest text-zinc-500 hover:text-zinc-900 dark:hover:text-zinc-100 transition-colors",children:"sessions →"})]}),(0,b.jsxs)("div",{className:"mt-1.5 text-2xl font-semibold tabular-nums tracking-tight text-zinc-900 dark:text-zinc-50",children:[o(t.totalTokens),(0,b.jsx)("span",{className:"ml-1 text-xs text-zinc-500 font-normal",children:"tok"}),(0,b.jsx)("span",{className:"ml-2 text-xs text-zinc-500 font-normal",children:"·"}),(0,b.jsx)("span",{className:"ml-2 text-base font-semibold tabular-nums text-zinc-900 dark:text-zinc-50",children:(0,k.formatUsd)(t.totalCostUsd)}),(0,b.jsx)("span",{className:"ml-1 text-xs text-zinc-500 font-normal",children:"api"})]}),t.dailyBurn.length>0&&(0,b.jsxs)("div",{className:"mt-3",children:[(0,b.jsx)("div",{className:"flex items-end gap-px h-8",children:t.dailyBurn.map(a=>{let c=Math.max(2,a.tokens/z*100);return(0,b.jsx)("div",{className:"flex-1 bg-zinc-300 dark:bg-zinc-700",style:{height:`${c}%`},title:`${a.date}: ${o(a.tokens)} \xb7 ${(0,k.formatUsd)(a.cost)}`},a.date)})}),(0,b.jsxs)("div",{className:"flex items-center justify-between mt-1 text-[10px] uppercase tracking-widest text-zinc-500 tabular-nums",children:[(0,b.jsx)("span",{children:t.dailyBurn[0].date.slice(5)}),(0,b.jsxs)("span",{children:[t.dailyBurn.length," active days"]}),(0,b.jsx)("span",{children:t.dailyBurn[t.dailyBurn.length-1].date.slice(5)})]})]}),(0,b.jsxs)("div",{className:"mt-3 pt-3 border-t border-zinc-200 dark:border-zinc-800 grid grid-cols-3 text-center",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("div",{className:"text-[10px] uppercase tracking-widest text-zinc-500",children:"sess"}),(0,b.jsx)("div",{className:"text-xs font-semibold tabular-nums mt-0.5",children:n.format(t.count)})]}),(0,b.jsxs)("div",{children:[(0,b.jsx)("div",{className:"text-[10px] uppercase tracking-widest text-zinc-500",children:"median"}),(0,b.jsx)("div",{className:"text-xs font-semibold tabular-nums mt-0.5",children:o(t.medianSessionTokens)})]}),(0,b.jsxs)("div",{children:[(0,b.jsx)("div",{className:"text-[10px] uppercase tracking-widest text-zinc-500",children:"p95"}),(0,b.jsx)("div",{className:"text-xs font-semibold tabular-nums mt-0.5",children:o(t.p95SessionTokens)})]})]})]}),(0,b.jsxs)("div",{className:"rounded-lg border border-zinc-200 dark:border-zinc-800 bg-white dark:bg-zinc-900 px-4 py-4 flex flex-col",children:[(0,b.jsxs)("div",{className:"flex items-baseline justify-between",children:[(0,b.jsx)("div",{className:"text-[10px] uppercase tracking-widest text-zinc-500",children:"disable candidates"}),(0,b.jsx)(e.default,{href:"/items",className:"text-[10px] uppercase tracking-widest text-zinc-500 hover:text-zinc-900 dark:hover:text-zinc-100 transition-colors",children:"all →"})]}),(0,b.jsxs)("div",{className:"mt-1.5 text-2xl font-semibold tabular-nums tracking-tight text-zinc-900 dark:text-zinc-50",children:[n.format(v),(0,b.jsx)("span",{className:"ml-1 text-xs text-zinc-500 font-normal",children:"tok/turn"})]}),(0,b.jsx)("div",{className:"text-[10px] uppercase tracking-widest text-zinc-500",children:u.length>0?`top ${u.length} unused`:"none in window"}),(0,b.jsx)("ul",{className:"mt-3 pt-3 border-t border-zinc-200 dark:border-zinc-800 text-xs space-y-1 flex-1",children:0===u.length?(0,b.jsxs)("li",{className:"text-zinc-500",children:["every loaded user item invoked in ",30,"d."]}):u.map(a=>(0,b.jsxs)("li",{className:"flex items-center gap-2",children:[(0,b.jsx)("span",{className:"w-10 text-right tabular-nums text-zinc-500",children:n.format(a.perTurnTokens)}),(0,b.jsx)("span",{className:"flex-1 truncate text-zinc-700 dark:text-zinc-300",children:a.name}),(0,b.jsx)("span",{className:"text-[10px] uppercase tracking-widest text-zinc-500 w-12",children:a.kind}),(0,b.jsx)("form",{action:p.bind(null,(0,d.encryptActionBoundArgs)("40b82ab2b5a2575d5c2beb515f28609f42c434a44f",a.filePath)),children:(0,b.jsx)("button",{type:"submit",className:"text-[10px] uppercase tracking-widest text-zinc-600 dark:text-zinc-400 border border-zinc-300 dark:border-zinc-700 hover:text-red-700 dark:hover:text-red-400 hover:border-red-300 dark:hover:border-red-800 hover:bg-red-50 dark:hover:bg-red-950/40 rounded px-1.5 py-0.5 transition-colors cursor-pointer",title:`Disable ${a.name}`,children:"off"})})]},a.filePath))})]}),(0,b.jsxs)("div",{className:"rounded-lg border border-zinc-200 dark:border-zinc-800 bg-white dark:bg-zinc-900 px-4 py-4 flex flex-col",children:[(0,b.jsxs)("div",{className:"flex items-baseline justify-between",children:[(0,b.jsx)("div",{className:"text-[10px] uppercase tracking-widest text-zinc-500",children:"context overhead"}),(0,b.jsx)(e.default,{href:"/context",className:"text-[10px] uppercase tracking-widest text-zinc-500 hover:text-zinc-900 dark:hover:text-zinc-100 transition-colors",children:"context →"})]}),(0,b.jsxs)("div",{className:"mt-1.5 text-2xl font-semibold tabular-nums tracking-tight text-zinc-900 dark:text-zinc-50",children:[n.format(A),(0,b.jsx)("span",{className:"ml-1 text-xs text-zinc-500 font-normal",children:"tok"})]}),(0,b.jsxs)("div",{className:"text-[10px] uppercase tracking-widest text-zinc-500",children:["top ",B," sticky"," ",1===B?"source":"sources"]}),(0,b.jsxs)("ul",{className:"mt-3 pt-3 border-t border-zinc-200 dark:border-zinc-800 text-xs space-y-1 flex-1",children:[w&&(0,b.jsxs)("li",{className:"flex items-center gap-2",children:[(0,b.jsx)("span",{className:"w-10 text-right tabular-nums text-zinc-500",children:n.format(w.tokens)}),(0,b.jsx)("span",{className:"flex-1 truncate text-zinc-700 dark:text-zinc-300",children:(0,b.jsx)("code",{className:"text-[11px]",children:"~/.claude/CLAUDE.md"})}),(0,b.jsx)("span",{className:"text-[10px] uppercase tracking-widest text-zinc-500",children:"every"})]}),x&&(0,b.jsxs)("li",{className:"flex items-center gap-2",children:[(0,b.jsx)("span",{className:"w-10 text-right tabular-nums text-zinc-500",children:n.format(x.tokens)}),(0,b.jsx)("span",{className:"flex-1 truncate text-zinc-700 dark:text-zinc-300",children:(0,b.jsx)("code",{className:"text-[11px]",children:x.name})}),(0,b.jsx)("span",{className:"text-[10px] uppercase tracking-widest text-zinc-500",children:"mem"})]}),y>0&&(0,b.jsxs)("li",{className:"flex items-center gap-2",children:[(0,b.jsx)("span",{className:"w-10 text-right tabular-nums text-zinc-500",children:n.format(y)}),(0,b.jsx)("span",{className:"flex-1 truncate text-zinc-700 dark:text-zinc-300",children:"SessionStart hooks"}),(0,b.jsx)("span",{className:"text-[10px] uppercase tracking-widest text-zinc-500",children:"sticky"})]})]})]})]}),(0,b.jsxs)("footer",{className:"mt-8 pt-4 border-t border-zinc-200 dark:border-zinc-800 text-[10px] uppercase tracking-widest text-zinc-500 flex items-center justify-between",children:[(0,b.jsx)("span",{children:"cl100k_base · scans main + subagent jsonls · deduped per (msg.id, requestid) · 1hr cache priced separately at 2x 5min rate · toggles apply on next cc restart"}),(0,b.jsx)("a",{href:"https://github.com/mbeato/contextscope",className:"text-zinc-500 hover:text-zinc-900 dark:hover:text-zinc-100 transition-colors",children:"github →"})]})]})})}(0,c.registerServerReference)(p,"40b82ab2b5a2575d5c2beb515f28609f42c434a44f",null),a.s(["$$RSC_SERVER_ACTION_0",0,p,"default",0,q,"dynamic",0,"force-dynamic"])}];
2
2
 
3
3
  //# sourceMappingURL=_0j0avc7._.js.map
@@ -7,9 +7,9 @@ globalThis.__BUILD_MANIFEST = {
7
7
  "static/chunks/03~yq9q893hmn.js"
8
8
  ],
9
9
  "lowPriorityFiles": [
10
- "static/kaNzMZNco9qjeyEFA-gjr/_buildManifest.js",
11
- "static/kaNzMZNco9qjeyEFA-gjr/_ssgManifest.js",
12
- "static/kaNzMZNco9qjeyEFA-gjr/_clientMiddlewareManifest.js"
10
+ "static/I-W1iV4XdkTRyjis8Ros1/_buildManifest.js",
11
+ "static/I-W1iV4XdkTRyjis8Ros1/_ssgManifest.js",
12
+ "static/I-W1iV4XdkTRyjis8Ros1/_clientMiddlewareManifest.js"
13
13
  ],
14
14
  "rootMainFiles": [
15
15
  "static/chunks/00gq-v0e07i1q.js",
@@ -1 +1 @@
1
- <!DOCTYPE html><html lang="en" class="h-full antialiased"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="/_next/static/chunks/118uk9v3812u1.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/00gq-v0e07i1q.js"/><script src="/_next/static/chunks/14hcmzto5g-b7.js" async=""></script><script src="/_next/static/chunks/0nxgnfb4qc8my.js" async=""></script><script src="/_next/static/chunks/07lhk_q6pmm3r.js" async=""></script><script src="/_next/static/chunks/turbopack-0wzfw6l~krt~8.js" async=""></script><script src="/_next/static/chunks/17hugzvnj-r7p.js" async=""></script><script src="/_next/static/chunks/0d3shmwh5_nmn.js" async=""></script><title>404: This page could not be found.</title><meta name="robots" content="noindex"/><title>contextscope</title><meta name="description" content="Local dashboard auditing Claude Code&#x27;s per-turn token context — skills, agents, commands, CLAUDE.md, MEMORY.md, hooks, MCP, and session analytics."/><link rel="icon" href="/favicon.ico?favicon.0x3dzn~oxb6tn.ico" sizes="256x256" type="image/x-icon"/><script src="/_next/static/chunks/03~yq9q893hmn.js" noModule=""></script></head><body class="min-h-full flex flex-col font-mono bg-zinc-50 dark:bg-zinc-950 text-zinc-900 dark:text-zinc-100"><div hidden=""><!--$--><!--/$--></div><nav class="border-b border-zinc-200 dark:border-zinc-800 bg-zinc-50 dark:bg-zinc-950 sticky top-0 z-10"><div class="max-w-6xl mx-auto px-6 h-12 flex items-center gap-8 text-sm"><a class="font-semibold tracking-tight text-zinc-500 hover:text-zinc-900 dark:hover:text-zinc-100 transition-colors" href="/">contextscope</a><div class="flex items-center gap-5"><a class="text-zinc-500 hover:text-zinc-900 dark:hover:text-zinc-100 transition-colors" href="/items">items</a><a class="text-zinc-500 hover:text-zinc-900 dark:hover:text-zinc-100 transition-colors" href="/sessions">sessions</a><a class="text-zinc-500 hover:text-zinc-900 dark:hover:text-zinc-100 transition-colors" href="/context">context</a></div></div></nav><!--$--><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:49px;margin:0">This page could not be found.</h2></div></div></div><!--$--><!--/$--><!--/$--><script src="/_next/static/chunks/00gq-v0e07i1q.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:I[39756,[\"/_next/static/chunks/17hugzvnj-r7p.js\",\"/_next/static/chunks/0d3shmwh5_nmn.js\"],\"LoadingBoundaryProvider\"]\n2:\"$Sreact.fragment\"\n3:I[54858,[\"/_next/static/chunks/17hugzvnj-r7p.js\",\"/_next/static/chunks/0d3shmwh5_nmn.js\"],\"Nav\"]\n4:I[39756,[\"/_next/static/chunks/17hugzvnj-r7p.js\",\"/_next/static/chunks/0d3shmwh5_nmn.js\"],\"default\"]\n5:I[37457,[\"/_next/static/chunks/17hugzvnj-r7p.js\",\"/_next/static/chunks/0d3shmwh5_nmn.js\"],\"default\"]\na:I[68027,[\"/_next/static/chunks/17hugzvnj-r7p.js\",\"/_next/static/chunks/0d3shmwh5_nmn.js\"],\"default\",1]\n:HL[\"/_next/static/chunks/118uk9v3812u1.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"c\":[\"\",\"_not-found\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",20],[[\"$\",\"$L1\",null,{\"loading\":[[\"$\",\"main\",\"l\",{\"className\":\"flex-1 font-mono bg-zinc-50 dark:bg-zinc-950\",\"children\":[\"$\",\"div\",null,{\"className\":\"max-w-6xl mx-auto px-6 py-10\",\"children\":[[\"$\",\"header\",null,{\"className\":\"mb-8 flex items-baseline justify-between\",\"children\":[[\"$\",\"div\",null,{\"children\":[[\"$\",\"div\",null,{\"className\":\"h-6 w-40 bg-zinc-200 dark:bg-zinc-800 rounded animate-pulse\"}],[\"$\",\"div\",null,{\"className\":\"h-3 w-36 bg-zinc-200/60 dark:bg-zinc-800/60 rounded animate-pulse mt-2\"}]]}],[\"$\",\"div\",null,{\"className\":\"h-3 w-48 bg-zinc-200/60 dark:bg-zinc-800/60 rounded animate-pulse\"}]]}],[\"$\",\"section\",null,{\"className\":\"flex justify-center mb-6\",\"children\":[\"$\",\"div\",null,{\"className\":\"w-full max-w-md h-64 rounded-lg border border-zinc-200 dark:border-zinc-800 bg-white dark:bg-zinc-900 animate-pulse\"}]}],[\"$\",\"section\",null,{\"className\":\"grid grid-cols-1 md:grid-cols-3 gap-3\",\"children\":[[\"$\",\"div\",\"0\",{\"className\":\"h-72 rounded-lg border border-zinc-200 dark:border-zinc-800 bg-white dark:bg-zinc-900 animate-pulse\"}],[\"$\",\"div\",\"1\",{\"className\":\"h-72 rounded-lg border border-zinc-200 dark:border-zinc-800 bg-white dark:bg-zinc-900 animate-pulse\"}],[\"$\",\"div\",\"2\",{\"className\":\"h-72 rounded-lg border border-zinc-200 dark:border-zinc-800 bg-white dark:bg-zinc-900 animate-pulse\"}]]}],[\"$\",\"p\",null,{\"className\":\"text-[10px] uppercase tracking-widest text-zinc-500 mt-6\",\"children\":\"scanning ~/.claude · first load cold; subsequent cached by file mtime\"}]]}]}],[],[]],\"children\":[\"$\",\"$2\",\"c\",{\"children\":[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/chunks/118uk9v3812u1.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-0\",{\"src\":\"/_next/static/chunks/17hugzvnj-r7p.js\",\"async\":true,\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-1\",{\"src\":\"/_next/static/chunks/0d3shmwh5_nmn.js\",\"async\":true,\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"className\":\"h-full antialiased\",\"children\":[\"$\",\"body\",null,{\"className\":\"min-h-full flex flex-col font-mono bg-zinc-50 dark:bg-zinc-950 text-zinc-900 dark:text-zinc-100\",\"children\":[[\"$\",\"$L3\",null,{}],[\"$\",\"$L4\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L5\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":404}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],[]],\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}]}]]}]}],{\"children\":[[\"$\",\"$2\",\"c\",{\"children\":[null,[\"$\",\"$L4\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L5\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$2\",\"c\",{\"children\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":\"$0:f:0:1:0:props:children:props:children:1:props:children:props:children:1:props:notFound:0:1:props:style\",\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":\"$0:f:0:1:0:props:children:props:children:1:props:children:props:children:1:props:notFound:0:1:props:children:props:children:1:props:style\",\"children\":404}],\"$L6\"]}]}]],null,\"$L7\"]}],{},null,false,null]},null,false,\"$@8\"]},null,false,null],\"$L9\",false]],\"m\":\"$undefined\",\"G\":[\"$a\",[\"$Lb\"]],\"S\":true,\"h\":null,\"s\":\"$undefined\",\"l\":\"$undefined\",\"p\":\"$undefined\",\"d\":\"$undefined\",\"b\":\"kaNzMZNco9qjeyEFA-gjr\"}\n"])</script><script>self.__next_f.push([1,"c:I[97367,[\"/_next/static/chunks/17hugzvnj-r7p.js\",\"/_next/static/chunks/0d3shmwh5_nmn.js\"],\"OutletBoundary\"]\nd:\"$Sreact.suspense\"\n10:I[97367,[\"/_next/static/chunks/17hugzvnj-r7p.js\",\"/_next/static/chunks/0d3shmwh5_nmn.js\"],\"ViewportBoundary\"]\n12:I[97367,[\"/_next/static/chunks/17hugzvnj-r7p.js\",\"/_next/static/chunks/0d3shmwh5_nmn.js\"],\"MetadataBoundary\"]\n6:[\"$\",\"div\",null,{\"style\":\"$0:f:0:1:0:props:children:props:children:1:props:children:props:children:1:props:notFound:0:1:props:children:props:children:2:props:style\",\"children\":[\"$\",\"h2\",null,{\"style\":\"$0:f:0:1:0:props:children:props:children:1:props:children:props:children:1:props:notFound:0:1:props:children:props:children:2:props:children:props:style\",\"children\":\"This page could not be found.\"}]}]\n7:[\"$\",\"$Lc\",null,{\"children\":[\"$\",\"$d\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@e\"}]}]\nf:[]\n8:\"$Wf\"\n9:[\"$\",\"$2\",\"h\",{\"children\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],[\"$\",\"$L10\",null,{\"children\":\"$L11\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$L12\",null,{\"children\":[\"$\",\"$d\",null,{\"name\":\"Next.Metadata\",\"children\":\"$L13\"}]}]}],null]}]\nb:[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/chunks/118uk9v3812u1.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}]\n"])</script><script>self.__next_f.push([1,"11:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n"])</script><script>self.__next_f.push([1,"14:I[27201,[\"/_next/static/chunks/17hugzvnj-r7p.js\",\"/_next/static/chunks/0d3shmwh5_nmn.js\"],\"IconMark\"]\ne:null\n13:[[\"$\",\"title\",\"0\",{\"children\":\"contextscope\"}],[\"$\",\"meta\",\"1\",{\"name\":\"description\",\"content\":\"Local dashboard auditing Claude Code's per-turn token context — skills, agents, commands, CLAUDE.md, MEMORY.md, hooks, MCP, and session analytics.\"}],[\"$\",\"link\",\"2\",{\"rel\":\"icon\",\"href\":\"/favicon.ico?favicon.0x3dzn~oxb6tn.ico\",\"sizes\":\"256x256\",\"type\":\"image/x-icon\"}],[\"$\",\"$L14\",\"3\",{}]]\n"])</script></body></html>
1
+ <!DOCTYPE html><html lang="en" class="h-full antialiased"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="/_next/static/chunks/118uk9v3812u1.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/00gq-v0e07i1q.js"/><script src="/_next/static/chunks/14hcmzto5g-b7.js" async=""></script><script src="/_next/static/chunks/0nxgnfb4qc8my.js" async=""></script><script src="/_next/static/chunks/07lhk_q6pmm3r.js" async=""></script><script src="/_next/static/chunks/turbopack-0wzfw6l~krt~8.js" async=""></script><script src="/_next/static/chunks/17hugzvnj-r7p.js" async=""></script><script src="/_next/static/chunks/0d3shmwh5_nmn.js" async=""></script><title>404: This page could not be found.</title><meta name="robots" content="noindex"/><title>contextscope</title><meta name="description" content="Local dashboard auditing Claude Code&#x27;s per-turn token context — skills, agents, commands, CLAUDE.md, MEMORY.md, hooks, MCP, and session analytics."/><link rel="icon" href="/favicon.ico?favicon.0x3dzn~oxb6tn.ico" sizes="256x256" type="image/x-icon"/><script src="/_next/static/chunks/03~yq9q893hmn.js" noModule=""></script></head><body class="min-h-full flex flex-col font-mono bg-zinc-50 dark:bg-zinc-950 text-zinc-900 dark:text-zinc-100"><div hidden=""><!--$--><!--/$--></div><nav class="border-b border-zinc-200 dark:border-zinc-800 bg-zinc-50 dark:bg-zinc-950 sticky top-0 z-10"><div class="max-w-6xl mx-auto px-6 h-12 flex items-center gap-8 text-sm"><a class="font-semibold tracking-tight text-zinc-500 hover:text-zinc-900 dark:hover:text-zinc-100 transition-colors" href="/">contextscope</a><div class="flex items-center gap-5"><a class="text-zinc-500 hover:text-zinc-900 dark:hover:text-zinc-100 transition-colors" href="/items">items</a><a class="text-zinc-500 hover:text-zinc-900 dark:hover:text-zinc-100 transition-colors" href="/sessions">sessions</a><a class="text-zinc-500 hover:text-zinc-900 dark:hover:text-zinc-100 transition-colors" href="/context">context</a></div></div></nav><!--$--><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:49px;margin:0">This page could not be found.</h2></div></div></div><!--$--><!--/$--><!--/$--><script src="/_next/static/chunks/00gq-v0e07i1q.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:I[39756,[\"/_next/static/chunks/17hugzvnj-r7p.js\",\"/_next/static/chunks/0d3shmwh5_nmn.js\"],\"LoadingBoundaryProvider\"]\n2:\"$Sreact.fragment\"\n3:I[54858,[\"/_next/static/chunks/17hugzvnj-r7p.js\",\"/_next/static/chunks/0d3shmwh5_nmn.js\"],\"Nav\"]\n4:I[39756,[\"/_next/static/chunks/17hugzvnj-r7p.js\",\"/_next/static/chunks/0d3shmwh5_nmn.js\"],\"default\"]\n5:I[37457,[\"/_next/static/chunks/17hugzvnj-r7p.js\",\"/_next/static/chunks/0d3shmwh5_nmn.js\"],\"default\"]\na:I[68027,[\"/_next/static/chunks/17hugzvnj-r7p.js\",\"/_next/static/chunks/0d3shmwh5_nmn.js\"],\"default\",1]\n:HL[\"/_next/static/chunks/118uk9v3812u1.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"c\":[\"\",\"_not-found\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",20],[[\"$\",\"$L1\",null,{\"loading\":[[\"$\",\"main\",\"l\",{\"className\":\"flex-1 font-mono bg-zinc-50 dark:bg-zinc-950\",\"children\":[\"$\",\"div\",null,{\"className\":\"max-w-6xl mx-auto px-6 py-10\",\"children\":[[\"$\",\"header\",null,{\"className\":\"mb-8 flex items-baseline justify-between\",\"children\":[[\"$\",\"div\",null,{\"children\":[[\"$\",\"div\",null,{\"className\":\"h-6 w-40 bg-zinc-200 dark:bg-zinc-800 rounded animate-pulse\"}],[\"$\",\"div\",null,{\"className\":\"h-3 w-36 bg-zinc-200/60 dark:bg-zinc-800/60 rounded animate-pulse mt-2\"}]]}],[\"$\",\"div\",null,{\"className\":\"h-3 w-48 bg-zinc-200/60 dark:bg-zinc-800/60 rounded animate-pulse\"}]]}],[\"$\",\"section\",null,{\"className\":\"flex justify-center mb-6\",\"children\":[\"$\",\"div\",null,{\"className\":\"w-full max-w-md h-64 rounded-lg border border-zinc-200 dark:border-zinc-800 bg-white dark:bg-zinc-900 animate-pulse\"}]}],[\"$\",\"section\",null,{\"className\":\"grid grid-cols-1 md:grid-cols-3 gap-3\",\"children\":[[\"$\",\"div\",\"0\",{\"className\":\"h-72 rounded-lg border border-zinc-200 dark:border-zinc-800 bg-white dark:bg-zinc-900 animate-pulse\"}],[\"$\",\"div\",\"1\",{\"className\":\"h-72 rounded-lg border border-zinc-200 dark:border-zinc-800 bg-white dark:bg-zinc-900 animate-pulse\"}],[\"$\",\"div\",\"2\",{\"className\":\"h-72 rounded-lg border border-zinc-200 dark:border-zinc-800 bg-white dark:bg-zinc-900 animate-pulse\"}]]}],[\"$\",\"p\",null,{\"className\":\"text-[10px] uppercase tracking-widest text-zinc-500 mt-6\",\"children\":\"scanning ~/.claude · first load cold; subsequent cached by file mtime\"}]]}]}],[],[]],\"children\":[\"$\",\"$2\",\"c\",{\"children\":[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/chunks/118uk9v3812u1.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-0\",{\"src\":\"/_next/static/chunks/17hugzvnj-r7p.js\",\"async\":true,\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-1\",{\"src\":\"/_next/static/chunks/0d3shmwh5_nmn.js\",\"async\":true,\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"className\":\"h-full antialiased\",\"children\":[\"$\",\"body\",null,{\"className\":\"min-h-full flex flex-col font-mono bg-zinc-50 dark:bg-zinc-950 text-zinc-900 dark:text-zinc-100\",\"children\":[[\"$\",\"$L3\",null,{}],[\"$\",\"$L4\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L5\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":404}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],[]],\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}]}]]}]}],{\"children\":[[\"$\",\"$2\",\"c\",{\"children\":[null,[\"$\",\"$L4\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L5\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$2\",\"c\",{\"children\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":\"$0:f:0:1:0:props:children:props:children:1:props:children:props:children:1:props:notFound:0:1:props:style\",\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":\"$0:f:0:1:0:props:children:props:children:1:props:children:props:children:1:props:notFound:0:1:props:children:props:children:1:props:style\",\"children\":404}],\"$L6\"]}]}]],null,\"$L7\"]}],{},null,false,null]},null,false,\"$@8\"]},null,false,null],\"$L9\",false]],\"m\":\"$undefined\",\"G\":[\"$a\",[\"$Lb\"]],\"S\":true,\"h\":null,\"s\":\"$undefined\",\"l\":\"$undefined\",\"p\":\"$undefined\",\"d\":\"$undefined\",\"b\":\"I-W1iV4XdkTRyjis8Ros1\"}\n"])</script><script>self.__next_f.push([1,"c:I[97367,[\"/_next/static/chunks/17hugzvnj-r7p.js\",\"/_next/static/chunks/0d3shmwh5_nmn.js\"],\"OutletBoundary\"]\nd:\"$Sreact.suspense\"\n10:I[97367,[\"/_next/static/chunks/17hugzvnj-r7p.js\",\"/_next/static/chunks/0d3shmwh5_nmn.js\"],\"ViewportBoundary\"]\n12:I[97367,[\"/_next/static/chunks/17hugzvnj-r7p.js\",\"/_next/static/chunks/0d3shmwh5_nmn.js\"],\"MetadataBoundary\"]\n6:[\"$\",\"div\",null,{\"style\":\"$0:f:0:1:0:props:children:props:children:1:props:children:props:children:1:props:notFound:0:1:props:children:props:children:2:props:style\",\"children\":[\"$\",\"h2\",null,{\"style\":\"$0:f:0:1:0:props:children:props:children:1:props:children:props:children:1:props:notFound:0:1:props:children:props:children:2:props:children:props:style\",\"children\":\"This page could not be found.\"}]}]\n7:[\"$\",\"$Lc\",null,{\"children\":[\"$\",\"$d\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@e\"}]}]\nf:[]\n8:\"$Wf\"\n9:[\"$\",\"$2\",\"h\",{\"children\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],[\"$\",\"$L10\",null,{\"children\":\"$L11\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$L12\",null,{\"children\":[\"$\",\"$d\",null,{\"name\":\"Next.Metadata\",\"children\":\"$L13\"}]}]}],null]}]\nb:[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/chunks/118uk9v3812u1.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}]\n"])</script><script>self.__next_f.push([1,"11:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n"])</script><script>self.__next_f.push([1,"14:I[27201,[\"/_next/static/chunks/17hugzvnj-r7p.js\",\"/_next/static/chunks/0d3shmwh5_nmn.js\"],\"IconMark\"]\ne:null\n13:[[\"$\",\"title\",\"0\",{\"children\":\"contextscope\"}],[\"$\",\"meta\",\"1\",{\"name\":\"description\",\"content\":\"Local dashboard auditing Claude Code's per-turn token context — skills, agents, commands, CLAUDE.md, MEMORY.md, hooks, MCP, and session analytics.\"}],[\"$\",\"link\",\"2\",{\"rel\":\"icon\",\"href\":\"/favicon.ico?favicon.0x3dzn~oxb6tn.ico\",\"sizes\":\"256x256\",\"type\":\"image/x-icon\"}],[\"$\",\"$L14\",\"3\",{}]]\n"])</script></body></html>
@@ -1 +1 @@
1
- <!DOCTYPE html><html id="__next_error__"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/00gq-v0e07i1q.js"/><script src="/_next/static/chunks/14hcmzto5g-b7.js" async=""></script><script src="/_next/static/chunks/0nxgnfb4qc8my.js" async=""></script><script src="/_next/static/chunks/07lhk_q6pmm3r.js" async=""></script><script src="/_next/static/chunks/turbopack-0wzfw6l~krt~8.js" async=""></script><script src="/_next/static/chunks/01xlw8hd842-c.js" async=""></script><script src="/_next/static/chunks/0d3shmwh5_nmn.js" async=""></script><title>500: This page couldn’t load</title><link rel="icon" href="/favicon.ico?favicon.0x3dzn~oxb6tn.ico" sizes="256x256" type="image/x-icon"/><style>:root {--next-error-bg: #fff;--next-error-text: #171717;--next-error-title: #171717;--next-error-message: #171717;--next-error-digest: #666666;--next-error-btn-text: #fff;--next-error-btn-bg: #171717;--next-error-btn-border: none;--next-error-btn-secondary-text: #171717;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(0,0,0,0.08);}@media (prefers-color-scheme: dark) {:root {--next-error-bg: #0a0a0a;--next-error-text: #ededed;--next-error-title: #ededed;--next-error-message: #ededed;--next-error-digest: #a0a0a0;--next-error-btn-text: #0a0a0a;--next-error-btn-bg: #ededed;--next-error-btn-border: none;--next-error-btn-secondary-text: #ededed;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(255,255,255,0.14);}}body { margin: 0; color: var(--next-error-text); background: var(--next-error-bg); }</style><script src="/_next/static/chunks/03~yq9q893hmn.js" noModule=""></script></head><body><div hidden=""><!--$--><!--/$--></div><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;display:flex;align-items:center;justify-content:center"><div style="margin-top:-32px;max-width:325px;padding:32px 28px;text-align:left"><svg width="32" height="32" viewBox="-0.2 -1.5 32 32" fill="none" style="margin-bottom:24px"><path d="M16.9328 0C18.0839 0.000116771 19.1334 0.658832 19.634 1.69531L31.4299 26.1309C32.0708 27.4588 31.1036 28.9999 29.6291 29H2.00215C0.527541 29 -0.439628 27.4588 0.201371 26.1309L11.9973 1.69531C12.4979 0.658823 13.5474 7.75066e-05 14.6984 0H16.9328ZM3.59493 26H28.0363L16.9328 3H14.6984L3.59493 26ZM15.8156 19C16.9202 19.0001 17.8156 19.8955 17.8156 21C17.8156 22.1045 16.9202 22.9999 15.8156 23C14.7111 23 13.8156 22.1046 13.8156 21C13.8156 19.8954 14.7111 19 15.8156 19ZM17.3156 16.5H14.3156V8.5H17.3156V16.5Z" fill="var(--next-error-title)"></path></svg><h1 style="font-size:24px;font-weight:500;letter-spacing:-0.02em;line-height:32px;margin:0 0 12px 0;color:var(--next-error-title)">This page couldn’t load</h1><p style="font-size:14px;font-weight:400;line-height:21px;margin:0 0 20px 0;color:var(--next-error-message)">A server error occurred. Reload to try again.</p><form style="margin:0"><button type="submit" style="display:inline-flex;align-items:center;justify-content:center;height:32px;padding:0 12px;font-size:14px;font-weight:500;line-height:20px;border-radius:6px;cursor:pointer;color:var(--next-error-btn-text);background:var(--next-error-btn-bg);border:var(--next-error-btn-border)">Reload</button></form></div></div><!--$--><!--/$--><script src="/_next/static/chunks/00gq-v0e07i1q.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[39756,[\"/_next/static/chunks/01xlw8hd842-c.js\",\"/_next/static/chunks/0d3shmwh5_nmn.js\"],\"default\"]\n3:I[37457,[\"/_next/static/chunks/01xlw8hd842-c.js\",\"/_next/static/chunks/0d3shmwh5_nmn.js\"],\"default\"]\n4:I[97367,[\"/_next/static/chunks/01xlw8hd842-c.js\",\"/_next/static/chunks/0d3shmwh5_nmn.js\"],\"OutletBoundary\"]\n5:\"$Sreact.suspense\"\n8:I[97367,[\"/_next/static/chunks/01xlw8hd842-c.js\",\"/_next/static/chunks/0d3shmwh5_nmn.js\"],\"ViewportBoundary\"]\na:I[97367,[\"/_next/static/chunks/01xlw8hd842-c.js\",\"/_next/static/chunks/0d3shmwh5_nmn.js\"],\"MetadataBoundary\"]\nc:I[68027,[\"/_next/static/chunks/01xlw8hd842-c.js\",\"/_next/static/chunks/0d3shmwh5_nmn.js\"],\"default\",1]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"c\":[\"\",\"_global-error\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"__PAGE__\",{}]}],[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[[\"$\",\"html\",null,{\"id\":\"__next_error__\",\"children\":[[\"$\",\"head\",null,{\"children\":[[\"$\",\"title\",null,{\"children\":\"500: This page couldn’t load\"}],[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\":root {--next-error-bg: #fff;--next-error-text: #171717;--next-error-title: #171717;--next-error-message: #171717;--next-error-digest: #666666;--next-error-btn-text: #fff;--next-error-btn-bg: #171717;--next-error-btn-border: none;--next-error-btn-secondary-text: #171717;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(0,0,0,0.08);}@media (prefers-color-scheme: dark) {:root {--next-error-bg: #0a0a0a;--next-error-text: #ededed;--next-error-title: #ededed;--next-error-message: #ededed;--next-error-digest: #a0a0a0;--next-error-btn-text: #0a0a0a;--next-error-btn-bg: #ededed;--next-error-btn-border: none;--next-error-btn-secondary-text: #ededed;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(255,255,255,0.14);}}body { margin: 0; color: var(--next-error-text); background: var(--next-error-bg); }\"}}]]}],[\"$\",\"body\",null,{\"children\":[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"display\":\"flex\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"style\":{\"marginTop\":\"-32px\",\"maxWidth\":\"325px\",\"padding\":\"32px 28px\",\"textAlign\":\"left\"},\"children\":[[\"$\",\"svg\",null,{\"width\":\"32\",\"height\":\"32\",\"viewBox\":\"-0.2 -1.5 32 32\",\"fill\":\"none\",\"style\":{\"marginBottom\":\"24px\"},\"children\":[\"$\",\"path\",null,{\"d\":\"M16.9328 0C18.0839 0.000116771 19.1334 0.658832 19.634 1.69531L31.4299 26.1309C32.0708 27.4588 31.1036 28.9999 29.6291 29H2.00215C0.527541 29 -0.439628 27.4588 0.201371 26.1309L11.9973 1.69531C12.4979 0.658823 13.5474 7.75066e-05 14.6984 0H16.9328ZM3.59493 26H28.0363L16.9328 3H14.6984L3.59493 26ZM15.8156 19C16.9202 19.0001 17.8156 19.8955 17.8156 21C17.8156 22.1045 16.9202 22.9999 15.8156 23C14.7111 23 13.8156 22.1046 13.8156 21C13.8156 19.8954 14.7111 19 15.8156 19ZM17.3156 16.5H14.3156V8.5H17.3156V16.5Z\",\"fill\":\"var(--next-error-title)\"}]}],[\"$\",\"h1\",null,{\"style\":{\"fontSize\":\"24px\",\"fontWeight\":500,\"letterSpacing\":\"-0.02em\",\"lineHeight\":\"32px\",\"margin\":\"0 0 12px 0\",\"color\":\"var(--next-error-title)\"},\"children\":\"This page couldn’t load\"}],[\"$\",\"p\",null,{\"style\":{\"fontSize\":\"14px\",\"fontWeight\":400,\"lineHeight\":\"21px\",\"margin\":\"0 0 20px 0\",\"color\":\"var(--next-error-message)\"},\"children\":\"A server error occurred. Reload to try again.\"}],[\"$\",\"form\",null,{\"style\":{\"margin\":0},\"children\":[\"$\",\"button\",null,{\"type\":\"submit\",\"style\":{\"display\":\"inline-flex\",\"alignItems\":\"center\",\"justifyContent\":\"center\",\"height\":\"32px\",\"padding\":\"0 12px\",\"fontSize\":\"14px\",\"fontWeight\":500,\"lineHeight\":\"20px\",\"borderRadius\":\"6px\",\"cursor\":\"pointer\",\"color\":\"var(--next-error-btn-text)\",\"background\":\"var(--next-error-btn-bg)\",\"border\":\"var(--next-error-btn-border)\"},\"children\":\"Reload\"}]}]]}]}]}]]}],null,[\"$\",\"$L4\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@6\"}]}]]}],{},null,false,null]},null,false,\"$@7\"],[\"$\",\"$1\",\"h\",{\"children\":[null,[\"$\",\"$L8\",null,{\"children\":\"$L9\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$La\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.Metadata\",\"children\":\"$Lb\"}]}]}],null]}],false]],\"m\":\"$undefined\",\"G\":[\"$c\",[]],\"S\":true,\"h\":null,\"s\":\"$undefined\",\"l\":\"$undefined\",\"p\":\"$undefined\",\"d\":\"$undefined\",\"b\":\"kaNzMZNco9qjeyEFA-gjr\"}\n"])</script><script>self.__next_f.push([1,"d:[]\n7:\"$Wd\"\n"])</script><script>self.__next_f.push([1,"9:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n"])</script><script>self.__next_f.push([1,"e:I[27201,[\"/_next/static/chunks/01xlw8hd842-c.js\",\"/_next/static/chunks/0d3shmwh5_nmn.js\"],\"IconMark\"]\n6:null\nb:[[\"$\",\"link\",\"0\",{\"rel\":\"icon\",\"href\":\"/favicon.ico?favicon.0x3dzn~oxb6tn.ico\",\"sizes\":\"256x256\",\"type\":\"image/x-icon\"}],[\"$\",\"$Le\",\"1\",{}]]\n"])</script></body></html>
1
+ <!DOCTYPE html><html id="__next_error__"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/00gq-v0e07i1q.js"/><script src="/_next/static/chunks/14hcmzto5g-b7.js" async=""></script><script src="/_next/static/chunks/0nxgnfb4qc8my.js" async=""></script><script src="/_next/static/chunks/07lhk_q6pmm3r.js" async=""></script><script src="/_next/static/chunks/turbopack-0wzfw6l~krt~8.js" async=""></script><script src="/_next/static/chunks/01xlw8hd842-c.js" async=""></script><script src="/_next/static/chunks/0d3shmwh5_nmn.js" async=""></script><title>500: This page couldn’t load</title><link rel="icon" href="/favicon.ico?favicon.0x3dzn~oxb6tn.ico" sizes="256x256" type="image/x-icon"/><style>:root {--next-error-bg: #fff;--next-error-text: #171717;--next-error-title: #171717;--next-error-message: #171717;--next-error-digest: #666666;--next-error-btn-text: #fff;--next-error-btn-bg: #171717;--next-error-btn-border: none;--next-error-btn-secondary-text: #171717;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(0,0,0,0.08);}@media (prefers-color-scheme: dark) {:root {--next-error-bg: #0a0a0a;--next-error-text: #ededed;--next-error-title: #ededed;--next-error-message: #ededed;--next-error-digest: #a0a0a0;--next-error-btn-text: #0a0a0a;--next-error-btn-bg: #ededed;--next-error-btn-border: none;--next-error-btn-secondary-text: #ededed;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(255,255,255,0.14);}}body { margin: 0; color: var(--next-error-text); background: var(--next-error-bg); }</style><script src="/_next/static/chunks/03~yq9q893hmn.js" noModule=""></script></head><body><div hidden=""><!--$--><!--/$--></div><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;display:flex;align-items:center;justify-content:center"><div style="margin-top:-32px;max-width:325px;padding:32px 28px;text-align:left"><svg width="32" height="32" viewBox="-0.2 -1.5 32 32" fill="none" style="margin-bottom:24px"><path d="M16.9328 0C18.0839 0.000116771 19.1334 0.658832 19.634 1.69531L31.4299 26.1309C32.0708 27.4588 31.1036 28.9999 29.6291 29H2.00215C0.527541 29 -0.439628 27.4588 0.201371 26.1309L11.9973 1.69531C12.4979 0.658823 13.5474 7.75066e-05 14.6984 0H16.9328ZM3.59493 26H28.0363L16.9328 3H14.6984L3.59493 26ZM15.8156 19C16.9202 19.0001 17.8156 19.8955 17.8156 21C17.8156 22.1045 16.9202 22.9999 15.8156 23C14.7111 23 13.8156 22.1046 13.8156 21C13.8156 19.8954 14.7111 19 15.8156 19ZM17.3156 16.5H14.3156V8.5H17.3156V16.5Z" fill="var(--next-error-title)"></path></svg><h1 style="font-size:24px;font-weight:500;letter-spacing:-0.02em;line-height:32px;margin:0 0 12px 0;color:var(--next-error-title)">This page couldn’t load</h1><p style="font-size:14px;font-weight:400;line-height:21px;margin:0 0 20px 0;color:var(--next-error-message)">A server error occurred. Reload to try again.</p><form style="margin:0"><button type="submit" style="display:inline-flex;align-items:center;justify-content:center;height:32px;padding:0 12px;font-size:14px;font-weight:500;line-height:20px;border-radius:6px;cursor:pointer;color:var(--next-error-btn-text);background:var(--next-error-btn-bg);border:var(--next-error-btn-border)">Reload</button></form></div></div><!--$--><!--/$--><script src="/_next/static/chunks/00gq-v0e07i1q.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[39756,[\"/_next/static/chunks/01xlw8hd842-c.js\",\"/_next/static/chunks/0d3shmwh5_nmn.js\"],\"default\"]\n3:I[37457,[\"/_next/static/chunks/01xlw8hd842-c.js\",\"/_next/static/chunks/0d3shmwh5_nmn.js\"],\"default\"]\n4:I[97367,[\"/_next/static/chunks/01xlw8hd842-c.js\",\"/_next/static/chunks/0d3shmwh5_nmn.js\"],\"OutletBoundary\"]\n5:\"$Sreact.suspense\"\n8:I[97367,[\"/_next/static/chunks/01xlw8hd842-c.js\",\"/_next/static/chunks/0d3shmwh5_nmn.js\"],\"ViewportBoundary\"]\na:I[97367,[\"/_next/static/chunks/01xlw8hd842-c.js\",\"/_next/static/chunks/0d3shmwh5_nmn.js\"],\"MetadataBoundary\"]\nc:I[68027,[\"/_next/static/chunks/01xlw8hd842-c.js\",\"/_next/static/chunks/0d3shmwh5_nmn.js\"],\"default\",1]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"c\":[\"\",\"_global-error\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"__PAGE__\",{}]}],[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[[\"$\",\"html\",null,{\"id\":\"__next_error__\",\"children\":[[\"$\",\"head\",null,{\"children\":[[\"$\",\"title\",null,{\"children\":\"500: This page couldn’t load\"}],[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\":root {--next-error-bg: #fff;--next-error-text: #171717;--next-error-title: #171717;--next-error-message: #171717;--next-error-digest: #666666;--next-error-btn-text: #fff;--next-error-btn-bg: #171717;--next-error-btn-border: none;--next-error-btn-secondary-text: #171717;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(0,0,0,0.08);}@media (prefers-color-scheme: dark) {:root {--next-error-bg: #0a0a0a;--next-error-text: #ededed;--next-error-title: #ededed;--next-error-message: #ededed;--next-error-digest: #a0a0a0;--next-error-btn-text: #0a0a0a;--next-error-btn-bg: #ededed;--next-error-btn-border: none;--next-error-btn-secondary-text: #ededed;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(255,255,255,0.14);}}body { margin: 0; color: var(--next-error-text); background: var(--next-error-bg); }\"}}]]}],[\"$\",\"body\",null,{\"children\":[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"display\":\"flex\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"style\":{\"marginTop\":\"-32px\",\"maxWidth\":\"325px\",\"padding\":\"32px 28px\",\"textAlign\":\"left\"},\"children\":[[\"$\",\"svg\",null,{\"width\":\"32\",\"height\":\"32\",\"viewBox\":\"-0.2 -1.5 32 32\",\"fill\":\"none\",\"style\":{\"marginBottom\":\"24px\"},\"children\":[\"$\",\"path\",null,{\"d\":\"M16.9328 0C18.0839 0.000116771 19.1334 0.658832 19.634 1.69531L31.4299 26.1309C32.0708 27.4588 31.1036 28.9999 29.6291 29H2.00215C0.527541 29 -0.439628 27.4588 0.201371 26.1309L11.9973 1.69531C12.4979 0.658823 13.5474 7.75066e-05 14.6984 0H16.9328ZM3.59493 26H28.0363L16.9328 3H14.6984L3.59493 26ZM15.8156 19C16.9202 19.0001 17.8156 19.8955 17.8156 21C17.8156 22.1045 16.9202 22.9999 15.8156 23C14.7111 23 13.8156 22.1046 13.8156 21C13.8156 19.8954 14.7111 19 15.8156 19ZM17.3156 16.5H14.3156V8.5H17.3156V16.5Z\",\"fill\":\"var(--next-error-title)\"}]}],[\"$\",\"h1\",null,{\"style\":{\"fontSize\":\"24px\",\"fontWeight\":500,\"letterSpacing\":\"-0.02em\",\"lineHeight\":\"32px\",\"margin\":\"0 0 12px 0\",\"color\":\"var(--next-error-title)\"},\"children\":\"This page couldn’t load\"}],[\"$\",\"p\",null,{\"style\":{\"fontSize\":\"14px\",\"fontWeight\":400,\"lineHeight\":\"21px\",\"margin\":\"0 0 20px 0\",\"color\":\"var(--next-error-message)\"},\"children\":\"A server error occurred. Reload to try again.\"}],[\"$\",\"form\",null,{\"style\":{\"margin\":0},\"children\":[\"$\",\"button\",null,{\"type\":\"submit\",\"style\":{\"display\":\"inline-flex\",\"alignItems\":\"center\",\"justifyContent\":\"center\",\"height\":\"32px\",\"padding\":\"0 12px\",\"fontSize\":\"14px\",\"fontWeight\":500,\"lineHeight\":\"20px\",\"borderRadius\":\"6px\",\"cursor\":\"pointer\",\"color\":\"var(--next-error-btn-text)\",\"background\":\"var(--next-error-btn-bg)\",\"border\":\"var(--next-error-btn-border)\"},\"children\":\"Reload\"}]}]]}]}]}]]}],null,[\"$\",\"$L4\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@6\"}]}]]}],{},null,false,null]},null,false,\"$@7\"],[\"$\",\"$1\",\"h\",{\"children\":[null,[\"$\",\"$L8\",null,{\"children\":\"$L9\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$La\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.Metadata\",\"children\":\"$Lb\"}]}]}],null]}],false]],\"m\":\"$undefined\",\"G\":[\"$c\",[]],\"S\":true,\"h\":null,\"s\":\"$undefined\",\"l\":\"$undefined\",\"p\":\"$undefined\",\"d\":\"$undefined\",\"b\":\"I-W1iV4XdkTRyjis8Ros1\"}\n"])</script><script>self.__next_f.push([1,"d:[]\n7:\"$Wd\"\n"])</script><script>self.__next_f.push([1,"9:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n"])</script><script>self.__next_f.push([1,"e:I[27201,[\"/_next/static/chunks/01xlw8hd842-c.js\",\"/_next/static/chunks/0d3shmwh5_nmn.js\"],\"IconMark\"]\n6:null\nb:[[\"$\",\"link\",\"0\",{\"rel\":\"icon\",\"href\":\"/favicon.ico?favicon.0x3dzn~oxb6tn.ico\",\"sizes\":\"256x256\",\"type\":\"image/x-icon\"}],[\"$\",\"$Le\",\"1\",{}]]\n"])</script></body></html>
@@ -330,7 +330,7 @@ export default async function Cockpit() {
330
330
 
331
331
  <footer className="mt-8 pt-4 border-t border-zinc-200 dark:border-zinc-800 text-[10px] uppercase tracking-widest text-zinc-500 flex items-center justify-between">
332
332
  <span>
333
- cl100k_base · cost deduped per msg.id (cc splits one msg across lines · ccusage daily sums dupes) · toggles apply on next cc restart
333
+ cl100k_base · scans main + subagent jsonls · deduped per (msg.id, requestid) · 1hr cache priced separately at 2x 5min rate · toggles apply on next cc restart
334
334
  </span>
335
335
  <a
336
336
  href="https://github.com/mbeato/contextscope"
@@ -78,8 +78,18 @@ function inferProjectPath(dirName: string): string {
78
78
 
79
79
  async function parseFile(filePath: string, mtimeMs: number): Promise<TranscriptResult> {
80
80
  const parts = filePath.split("/");
81
- const sessionId = parts[parts.length - 1].replace(/\.jsonl$/, "");
82
- const project = parts[parts.length - 2] ?? "";
81
+ // Two shapes:
82
+ // <project>/<session-uuid>.jsonl → main session file
83
+ // <project>/<session-uuid>/subagents/agent-<id>.jsonl → subagent file
84
+ // For subagents we want the parent session UUID + parent project, so the
85
+ // tokens roll up to the same Session as the main file.
86
+ const isSubagent = parts[parts.length - 2] === "subagents";
87
+ const sessionId = isSubagent
88
+ ? (parts[parts.length - 3] ?? "")
89
+ : parts[parts.length - 1].replace(/\.jsonl$/, "");
90
+ const project = isSubagent
91
+ ? (parts[parts.length - 4] ?? "")
92
+ : (parts[parts.length - 2] ?? "");
83
93
  const result: TranscriptResult = {
84
94
  filePath,
85
95
  mtimeMs,
@@ -227,30 +237,62 @@ async function pMapLimit<T, R>(items: T[], limit: number, fn: (x: T) => Promise<
227
237
  }
228
238
 
229
239
  /**
230
- * Walk raw per-file results oldest first; attribute each unique message UUID
231
- * to the earliest file that mentions it. Returns new TranscriptResult objects
232
- * with totals/byModel/timestamps recomputed from the surviving records.
240
+ * Walk raw per-file results oldest first, dedup messages globally by
241
+ * (msg.id, requestId), and merge multiple files belonging to the same logical
242
+ * session (main + subagents/*) into one TranscriptResult per session.
233
243
  *
234
- * Important: do NOT mutate the cached `raws` objects — clone fields we rewrite.
244
+ * Important: do NOT mutate the cached `raws` objects — they're shared across
245
+ * calls.
235
246
  */
236
247
  function dedupAndSum(raws: TranscriptResult[]): TranscriptResult[] {
237
248
  const sorted = [...raws].sort((a, b) => a.mtimeMs - b.mtimeMs);
238
249
  const seen = new Set<string>();
239
- return sorted.map((r) => {
240
- const t: TranscriptResult = {
241
- ...r,
242
- startTime: 0,
243
- endTime: 0,
244
- turnCount: 0,
245
- inputTokens: 0,
246
- cacheReadTokens: 0,
247
- cacheCreationTokens: 0,
248
- outputTokens: 0,
249
- byModel: {},
250
- models: [],
251
- sidechainTurns: 0,
252
- };
253
- const modelSet = new Set<string>();
250
+ const merged = new Map<string, TranscriptResult>();
251
+
252
+ for (const r of sorted) {
253
+ const key = `${r.project}\x00${r.sessionId}`;
254
+ let t = merged.get(key);
255
+ if (!t) {
256
+ t = {
257
+ filePath: r.filePath,
258
+ mtimeMs: r.mtimeMs,
259
+ sessionId: r.sessionId,
260
+ project: r.project,
261
+ projectPath: r.projectPath,
262
+ startTime: 0,
263
+ endTime: 0,
264
+ turnCount: 0,
265
+ models: [],
266
+ inputTokens: 0,
267
+ cacheReadTokens: 0,
268
+ cacheCreationTokens: 0,
269
+ outputTokens: 0,
270
+ byModel: {},
271
+ usageRecords: [],
272
+ invocations: [],
273
+ toolCalls: {},
274
+ toolErrors: 0,
275
+ sidechainTurns: 0,
276
+ };
277
+ merged.set(key, t);
278
+ } else {
279
+ // Prefer the main session file's path/mtime as the canonical reference;
280
+ // a subagent file landed first only if no main yet, which is rare.
281
+ const incomingIsMain = !r.filePath.includes("/subagents/");
282
+ if (incomingIsMain) {
283
+ t.filePath = r.filePath;
284
+ t.mtimeMs = Math.max(t.mtimeMs, r.mtimeMs);
285
+ }
286
+ }
287
+
288
+ // Accumulate ancillary fields
289
+ for (const inv of r.invocations) t.invocations.push(inv);
290
+ for (const [name, n] of Object.entries(r.toolCalls)) {
291
+ t.toolCalls[name] = (t.toolCalls[name] ?? 0) + n;
292
+ }
293
+ t.toolErrors += r.toolErrors;
294
+
295
+ const modelSet = new Set<string>(t.models);
254
296
  for (const u of r.usageRecords) {
255
297
  if (u.dedupKey) {
256
298
  if (seen.has(u.dedupKey)) continue;
@@ -282,11 +324,47 @@ function dedupAndSum(raws: TranscriptResult[]): TranscriptResult[] {
282
324
  }
283
325
  }
284
326
  t.models = [...modelSet];
285
- return t;
286
- });
327
+ }
328
+
329
+ return [...merged.values()];
287
330
  }
288
331
 
289
- /** Scan all transcripts modified in the last N days. Deduped across resumed sessions. */
332
+ async function collectJsonlFiles(
333
+ dir: string,
334
+ cutoff: number,
335
+ out: { filePath: string; mtimeMs: number }[],
336
+ depth: number = 0
337
+ ): Promise<void> {
338
+ if (depth > 3) return; // <project>/<session>/subagents/<file> is the deepest expected shape
339
+ let entries;
340
+ try {
341
+ entries = await readdir(dir, { withFileTypes: true });
342
+ } catch {
343
+ return;
344
+ }
345
+ for (const e of entries) {
346
+ const fp = join(dir, e.name);
347
+ if (e.isDirectory()) {
348
+ await collectJsonlFiles(fp, cutoff, out, depth + 1);
349
+ continue;
350
+ }
351
+ if (!e.isFile() || !e.name.endsWith(".jsonl")) continue;
352
+ try {
353
+ const st = await stat(fp);
354
+ if (st.mtimeMs >= cutoff) out.push({ filePath: fp, mtimeMs: st.mtimeMs });
355
+ } catch {
356
+ // skip
357
+ }
358
+ }
359
+ }
360
+
361
+ /**
362
+ * Scan all transcripts modified in the last N days. Scans both main session
363
+ * files (<project>/<session>.jsonl) and subagent files
364
+ * (<project>/<session>/subagents/agent-*.jsonl), then attributes subagent
365
+ * tokens to their parent session via shared sessionId. Deduped globally by
366
+ * (msg.id, requestId).
367
+ */
290
368
  export async function getAllTranscripts(daysBack: number = 30): Promise<TranscriptResult[]> {
291
369
  const cutoff = Date.now() - daysBack * 24 * 60 * 60 * 1000;
292
370
  let projDirs: import("node:fs").Dirent[];
@@ -299,23 +377,7 @@ export async function getAllTranscripts(daysBack: number = 30): Promise<Transcri
299
377
  await Promise.all(
300
378
  projDirs.map(async (d) => {
301
379
  if (!d.isDirectory()) return;
302
- const dir = join(PROJECTS_DIR, String(d.name));
303
- let entries;
304
- try {
305
- entries = await readdir(dir, { withFileTypes: true });
306
- } catch {
307
- return;
308
- }
309
- for (const e of entries) {
310
- if (!e.isFile() || !e.name.endsWith(".jsonl")) continue;
311
- const fp = join(dir, e.name);
312
- try {
313
- const st = await stat(fp);
314
- if (st.mtimeMs >= cutoff) candidates.push({ filePath: fp, mtimeMs: st.mtimeMs });
315
- } catch {
316
- // skip
317
- }
318
- }
380
+ await collectJsonlFiles(join(PROJECTS_DIR, String(d.name)), cutoff, candidates);
319
381
  })
320
382
  );
321
383
  const raws = await pMapLimit(candidates, 16, (c) => getFileResult(c.filePath, c.mtimeMs));
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mbeato/contextscope",
3
- "version": "0.1.4",
3
+ "version": "0.1.5",
4
4
  "description": "Local dashboard auditing Claude Code's per-turn token context (skills, agents, commands, CLAUDE.md, MEMORY.md, hooks, MCP) with toggle-based disable and session analytics.",
5
5
  "type": "module",
6
6
  "bin": {