@mbeato/contextscope 0.1.1 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.next/standalone/.next/BUILD_ID +1 -1
- package/.next/standalone/.next/build-manifest.json +3 -3
- package/.next/standalone/.next/server/app/_global-error.html +1 -1
- package/.next/standalone/.next/server/app/_global-error.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/_not-found.html +1 -1
- package/.next/standalone/.next/server/app/_not-found.rsc +3 -3
- package/.next/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +3 -3
- package/.next/standalone/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_not-found.segments/_index.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/context/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/items/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/page.js +3 -2
- package/.next/standalone/.next/server/app/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/sessions/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__08jw6yr._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__093.c8l._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0duau-w._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0el6bvo._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0ta~v~j._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0ubqc9u._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_0j0avc7._.js +3 -0
- package/.next/standalone/.next/server/middleware-build-manifest.js +3 -3
- package/.next/standalone/.next/server/pages/404.html +1 -1
- package/.next/standalone/.next/server/pages/500.html +1 -1
- package/.next/standalone/app/actions.ts +37 -30
- package/.next/standalone/app/sessions/page.tsx +8 -2
- package/.next/standalone/bin/cli.js +4 -0
- package/.next/standalone/lib/files.ts +8 -2
- package/.next/standalone/lib/hooks.ts +27 -6
- package/.next/standalone/lib/inventory.ts +18 -4
- package/.next/standalone/lib/transcripts.ts +9 -0
- package/.next/standalone/package.json +1 -1
- package/.next/standalone/tsconfig.tsbuildinfo +1 -1
- package/.next/static/chunks/13525lf.7uo9s.css +1 -0
- package/bin/cli.js +4 -0
- package/package.json +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0xin6g6._.js +0 -3
- package/.next/static/chunks/13twdc6z5jomc.css +0 -1
- /package/.next/static/{th1MKWNqUvonxGrsp9Ee6 → BT6H4g8OlEYi9snYU0PI-}/_buildManifest.js +0 -0
- /package/.next/static/{th1MKWNqUvonxGrsp9Ee6 → BT6H4g8OlEYi9snYU0PI-}/_clientMiddlewareManifest.js +0 -0
- /package/.next/static/{th1MKWNqUvonxGrsp9Ee6 → BT6H4g8OlEYi9snYU0PI-}/_ssgManifest.js +0 -0
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
module.exports=[93695,(a,b,c)=>{b.exports=a.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},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"))},21249,32110,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,invocations:[],toolCalls:{},toolErrors:0,sidechainTurns:0},i=new Set;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,j="string"==typeof g?Date.parse(g):NaN,k=!0===b.isSidechain,l=f?.usage;if(l&&(h.inputTokens+=Number(l.input_tokens)||0,h.cacheReadTokens+=Number(l.cache_read_input_tokens)||0,h.cacheCreationTokens+=Number(l.cache_creation_input_tokens)||0,h.outputTokens+=Number(l.output_tokens)||0,h.turnCount+=1,k&&(h.sidechainTurns+=1),f?.model&&i.add(f.model),Number.isFinite(j)&&((!h.startTime||j<h.startTime)&&(h.startTime=j),j>h.endTime&&(h.endTime=j))),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(j)?j:0}):"Agent"===b&&"string"==typeof c.subagent_type&&h.invocations.push({kind:"agent",name:c.subagent_type,ts:Number.isFinite(j)?j:0}))}else"tool_result"===a.type&&!0===a.is_error&&(h.toolErrors+=1)}}),e.on("close",()=>{h.models=[...i],b(h)}),e.on("error",()=>{h.models=[...i],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);return h.set(a,d),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=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=>{let c;if(!a.isDirectory())return;let h=(0,f.join)(g,String(a.name));try{c=await (0,b.readdir)(h,{withFileTypes:!0})}catch{return}for(let a of c){if(!a.isFile()||!a.name.endsWith(".jsonl"))continue;let c=(0,f.join)(h,a.name);try{let a=await (0,b.stat)(c);a.mtimeMs>=d&&e.push({filePath:c,mtimeMs:a.mtimeMs})}catch{}}})),k(e,16,a=>j(a.filePath,a.mtimeMs))}function m(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,toolCalls:a.toolCalls,toolErrors:a.toolErrors,sidechainTurns:a.sidechainTurns}}async function n(a=30){return(await l(a)).filter(a=>a.turnCount>0).map(m).sort((a,b)=>b.totalTokens-a.totalTokens)}a.s(["getAllTranscripts",0,l],32110),a.s(["getSessions",0,n,"summarizeSessions",0,function(a){if(0===a.length)return{count:0,totalTokens:0,totalOutputTokens:0,totalInputPlusCache: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")}`;n.set(d,(n.get(d)??0)+b.totalTokens)}let o=[...n.entries()].map(([a,b])=>({date:a,tokens:b})).sort((a,b)=>a.date.localeCompare(b.date)),p=new Map;for(let b of a){let a=p.get(b.project)??{project:b.project,projectPath:b.projectPath,count:0,tokens:0,turns:0};a.count+=1,a.tokens+=b.totalTokens,a.turns+=b.turnCount,p.set(b.project,a)}let q=[...p.values()].sort((a,b)=>b.tokens-a.tokens),r={},s=0,t=0,u=0;for(let b of a){for(let[a,c]of Object.entries(b.toolCalls))r[a]=(r[a]??0)+c;s+=b.toolErrors,t+=b.sidechainTurns,u+=b.turnCount}return{count:a.length,totalTokens:c,totalOutputTokens:i,totalInputPlusCache:j,cacheHitRatio:k,outputInputRatio:l,averageSessionTokens:Math.round(c/a.length),medianSessionTokens:d,p95SessionTokens:e,longSessions:m,dailyBurn:o,byProject:q,totalToolCalls:r,totalToolErrors:s,totalSidechainTurns:t,totalTurns:u}}],21249)},26758,a=>{a.v("/_next/static/media/favicon.0x3dzn~oxb6tn.ico"+(globalThis.NEXT_CLIENT_ASSET_SUFFIX||""))},38872,a=>{"use strict";let b={src:a.i(26758).default,width:256,height:256};a.s(["default",0,b])},39276,a=>{"use strict";var b=a.i(7997),c=a.i(21249),d=a.i(84434);let e=new Intl.NumberFormat("en-US");function f(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)}async function g(){let a=await (0,c.getSessions)(30),g=(0,c.summarizeSessions)(a),h=Math.max(1,...g.dailyBurn.map(a=>a.tokens)),i=Object.entries(g.totalToolCalls).sort((a,b)=>b[1]-a[1]),j=Math.max(1,...i.map(([,a])=>a)),k=i.reduce((a,[,b])=>a+b,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:"sessions"}),(0,b.jsxs)("p",{className:"text-[10px] uppercase tracking-widest text-zinc-500 mt-1",children:["~/.claude/projects · ",30,"-day window"]})]}),(0,b.jsxs)("span",{className:"text-[10px] uppercase tracking-widest text-zinc-500",children:[30,"-day window"]})]}),0===g.count?(0,b.jsx)(d.Receipt,{label:"no data",children:(0,b.jsxs)("p",{className:"text-sm text-zinc-500",children:["No transcripts found in ",(0,b.jsx)("code",{children:"~/.claude/projects/"})," within the last ",30," days."]})}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("section",{className:"grid grid-cols-2 md:grid-cols-4 gap-3 mb-6",children:[(0,b.jsx)(d.Receipt,{pad:"default",children:(0,b.jsx)(d.Stat,{label:"sessions",value:e.format(g.count),hint:`avg ${f(g.averageSessionTokens)}`})}),(0,b.jsx)(d.Receipt,{pad:"default",children:(0,b.jsx)(d.Stat,{label:"30d total",value:f(g.totalTokens),hint:"all tokens"})}),(0,b.jsx)(d.Receipt,{pad:"default",children:(0,b.jsx)(d.Stat,{label:"median",value:f(g.medianSessionTokens),hint:"per session"})}),(0,b.jsx)(d.Receipt,{pad:"default",children:(0,b.jsx)(d.Stat,{label:"p95",value:f(g.p95SessionTokens),hint:"per session"})}),(0,b.jsx)(d.Receipt,{pad:"default",children:(0,b.jsx)(d.Stat,{label:"cache hit",value:`${(100*g.cacheHitRatio).toFixed(1)}%`,hint:"of input + cache"})}),(0,b.jsx)(d.Receipt,{pad:"default",children:(0,b.jsx)(d.Stat,{label:"output : input",value:`${(100*g.outputInputRatio).toFixed(2)}%`,hint:"thinking vs re-feed"})}),(0,b.jsx)(d.Receipt,{pad:"default",children:(0,b.jsx)(d.Stat,{label:"turns",value:e.format(g.totalTurns),hint:`avg ${Math.round(g.totalTurns/Math.max(1,g.count))}/session`})}),(0,b.jsx)(d.Receipt,{pad:"default",children:(0,b.jsx)(d.Stat,{label:"subagent share",value:`${(g.totalSidechainTurns/Math.max(1,g.totalTurns)*100).toFixed(0)}%`,hint:`${e.format(g.totalSidechainTurns)} turns`})})]}),(0,b.jsx)("section",{className:"mb-6",children:(0,b.jsx)(d.Receipt,{label:`daily burn \xb7 ${g.dailyBurn.length} active days`,children:(0,b.jsx)("div",{className:"space-y-1",children:g.dailyBurn.map(a=>{let c=a.tokens/h*100;return(0,b.jsxs)("div",{className:"flex items-center gap-3 text-xs",children:[(0,b.jsx)("div",{className:"w-24 text-zinc-500 tabular-nums",children:a.date}),(0,b.jsx)("div",{className:"flex-1 h-2 bg-zinc-100 dark:bg-zinc-800/60",children:(0,b.jsx)("div",{className:"h-full bg-zinc-700 dark:bg-zinc-300",style:{width:`${c}%`}})}),(0,b.jsx)("div",{className:"w-20 text-right tabular-nums text-zinc-700 dark:text-zinc-300",children:f(a.tokens)})]},a.date)})})})}),(0,b.jsx)("section",{className:"mb-6",children:(0,b.jsx)(d.Receipt,{label:"top sessions · heaviest 10 in 30d",pad:"none",children:(0,b.jsxs)("table",{className:"w-full text-sm",children:[(0,b.jsx)("thead",{className:"text-left text-[10px] uppercase tracking-widest text-zinc-500 border-b border-zinc-200 dark:border-zinc-800",children:(0,b.jsxs)("tr",{children:[(0,b.jsx)("th",{className:"px-5 py-3 font-normal",children:"date"}),(0,b.jsx)("th",{className:"px-5 py-3 font-normal",children:"project"}),(0,b.jsx)("th",{className:"px-5 py-3 font-normal",children:"models"}),(0,b.jsx)("th",{className:"px-5 py-3 font-normal text-right",children:"turns"}),(0,b.jsx)("th",{className:"px-5 py-3 font-normal text-right",children:"tokens"}),(0,b.jsx)("th",{className:"px-5 py-3 font-normal text-right",children:"cache hit"})]})}),(0,b.jsx)("tbody",{children:a.slice(0,10).map(a=>{let c=a.inputTokens+a.cacheReadTokens+a.cacheCreationTokens,d=c>0?a.cacheReadTokens/c*100:0;return(0,b.jsxs)("tr",{className:"border-b border-zinc-200/60 dark:border-zinc-800/60 last:border-b-0 hover:bg-zinc-50 dark:hover:bg-zinc-950/40 transition-colors",children:[(0,b.jsx)("td",{className:"px-5 py-3 text-zinc-500 tabular-nums text-xs whitespace-nowrap",children:a.endTime?new Date(a.endTime).toISOString().slice(0,10):"—"}),(0,b.jsx)("td",{className:"px-5 py-3 text-zinc-700 dark:text-zinc-300 truncate max-w-[280px]",children:(0,b.jsx)("code",{className:"text-xs",children:a.projectPath})}),(0,b.jsx)("td",{className:"px-5 py-3 text-zinc-500 text-xs",children:a.models.map(a=>a.replace("claude-","")).join(", ")}),(0,b.jsx)("td",{className:"px-5 py-3 text-right tabular-nums",children:a.turnCount}),(0,b.jsx)("td",{className:"px-5 py-3 text-right tabular-nums",children:f(a.totalTokens)}),(0,b.jsxs)("td",{className:"px-5 py-3 text-right tabular-nums text-zinc-500",children:[d.toFixed(1),"%"]})]},a.filePath)})})]})})}),(0,b.jsx)("section",{className:"mb-6",children:(0,b.jsx)(d.Receipt,{label:`burn by project \xb7 top ${Math.min(15,g.byProject.length)} of ${g.byProject.length}`,pad:"none",children:(0,b.jsxs)("table",{className:"w-full text-sm",children:[(0,b.jsx)("thead",{className:"text-left text-[10px] uppercase tracking-widest text-zinc-500 border-b border-zinc-200 dark:border-zinc-800",children:(0,b.jsxs)("tr",{children:[(0,b.jsx)("th",{className:"px-5 py-3 font-normal",children:"project"}),(0,b.jsx)("th",{className:"px-5 py-3 font-normal text-right",children:"sessions"}),(0,b.jsx)("th",{className:"px-5 py-3 font-normal text-right",children:"turns"}),(0,b.jsx)("th",{className:"px-5 py-3 font-normal text-right",children:"total"}),(0,b.jsx)("th",{className:"px-5 py-3 font-normal text-right",children:"share"})]})}),(0,b.jsx)("tbody",{children:g.byProject.slice(0,15).map(a=>{let c=g.totalTokens>0?a.tokens/g.totalTokens*100:0;return(0,b.jsxs)("tr",{className:"border-b border-zinc-200/60 dark:border-zinc-800/60 last:border-b-0 hover:bg-zinc-50 dark:hover:bg-zinc-950/40 transition-colors",children:[(0,b.jsx)("td",{className:"px-5 py-3 truncate max-w-[420px]",children:(0,b.jsx)("code",{className:"text-xs",children:a.projectPath})}),(0,b.jsx)("td",{className:"px-5 py-3 text-right tabular-nums text-zinc-500",children:a.count}),(0,b.jsx)("td",{className:"px-5 py-3 text-right tabular-nums",children:e.format(a.turns)}),(0,b.jsx)("td",{className:"px-5 py-3 text-right tabular-nums",children:f(a.tokens)}),(0,b.jsxs)("td",{className:"px-5 py-3 text-right tabular-nums text-zinc-500",children:[c.toFixed(1),"%"]})]},a.project)})})]})})}),i.length>0&&(0,b.jsx)("section",{className:"mb-6",children:(0,b.jsx)(d.Receipt,{label:`tool calls \xb7 ${e.format(k)} total \xb7 ${e.format(g.totalToolErrors)} errors (${(g.totalToolErrors/Math.max(1,k)*100).toFixed(1)}%)`,children:(0,b.jsx)("div",{className:"space-y-1",children:i.map(([a,c])=>{let d=c/j*100;return(0,b.jsxs)("div",{className:"flex items-center gap-3 text-xs",children:[(0,b.jsx)("div",{className:"w-32 text-zinc-700 dark:text-zinc-300 truncate",title:a,children:a}),(0,b.jsx)("div",{className:"flex-1 h-2 bg-zinc-100 dark:bg-zinc-800/60",children:(0,b.jsx)("div",{className:"h-full bg-sky-600 dark:bg-sky-500",style:{width:`${d}%`}})}),(0,b.jsx)("div",{className:"w-20 text-right tabular-nums text-zinc-700 dark:text-zinc-300",children:e.format(c)})]},a)})})})})]})]})})}a.s(["default",0,g,"dynamic",0,"force-dynamic"])},59901,a=>{a.n(a.i(39276))}];
|
|
1
|
+
module.exports=[93695,(a,b,c)=>{b.exports=a.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},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"))},21249,32110,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,invocations:[],toolCalls:{},toolErrors:0,sidechainTurns:0},i=new Set;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,j="string"==typeof g?Date.parse(g):NaN,k=!0===b.isSidechain,l=f?.usage;if(l&&(h.inputTokens+=Number(l.input_tokens)||0,h.cacheReadTokens+=Number(l.cache_read_input_tokens)||0,h.cacheCreationTokens+=Number(l.cache_creation_input_tokens)||0,h.outputTokens+=Number(l.output_tokens)||0,h.turnCount+=1,k&&(h.sidechainTurns+=1),f?.model&&i.add(f.model),Number.isFinite(j)&&((!h.startTime||j<h.startTime)&&(h.startTime=j),j>h.endTime&&(h.endTime=j))),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(j)?j:0}):"Agent"===b&&"string"==typeof c.subagent_type&&h.invocations.push({kind:"agent",name:c.subagent_type,ts:Number.isFinite(j)?j:0}))}else"tool_result"===a.type&&!0===a.is_error&&(h.toolErrors+=1)}}),e.on("close",()=>{h.models=[...i],b(h)}),e.on("error",()=>{h.models=[...i],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=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=>{let c;if(!a.isDirectory())return;let h=(0,f.join)(g,String(a.name));try{c=await (0,b.readdir)(h,{withFileTypes:!0})}catch{return}for(let a of c){if(!a.isFile()||!a.name.endsWith(".jsonl"))continue;let c=(0,f.join)(h,a.name);try{let a=await (0,b.stat)(c);a.mtimeMs>=d&&e.push({filePath:c,mtimeMs:a.mtimeMs})}catch{}}})),k(e,16,a=>j(a.filePath,a.mtimeMs))}function m(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,toolCalls:a.toolCalls,toolErrors:a.toolErrors,sidechainTurns:a.sidechainTurns}}async function n(a=30){return(await l(a)).filter(a=>a.turnCount>0).map(m).sort((a,b)=>b.totalTokens-a.totalTokens)}a.s(["getAllTranscripts",0,l],32110),a.s(["getSessions",0,n,"summarizeSessions",0,function(a){if(0===a.length)return{count:0,totalTokens:0,totalOutputTokens:0,totalInputPlusCache: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")}`;n.set(d,(n.get(d)??0)+b.totalTokens)}let o=[...n.entries()].map(([a,b])=>({date:a,tokens:b})).sort((a,b)=>a.date.localeCompare(b.date)),p=new Map;for(let b of a){let a=p.get(b.project)??{project:b.project,projectPath:b.projectPath,count:0,tokens:0,turns:0};a.count+=1,a.tokens+=b.totalTokens,a.turns+=b.turnCount,p.set(b.project,a)}let q=[...p.values()].sort((a,b)=>b.tokens-a.tokens),r={},s=0,t=0,u=0;for(let b of a){for(let[a,c]of Object.entries(b.toolCalls))r[a]=(r[a]??0)+c;s+=b.toolErrors,t+=b.sidechainTurns,u+=b.turnCount}return{count:a.length,totalTokens:c,totalOutputTokens:i,totalInputPlusCache:j,cacheHitRatio:k,outputInputRatio:l,averageSessionTokens:Math.round(c/a.length),medianSessionTokens:d,p95SessionTokens:e,longSessions:m,dailyBurn:o,byProject:q,totalToolCalls:r,totalToolErrors:s,totalSidechainTurns:t,totalTurns:u}}],21249)},26758,a=>{a.v("/_next/static/media/favicon.0x3dzn~oxb6tn.ico"+(globalThis.NEXT_CLIENT_ASSET_SUFFIX||""))},38872,a=>{"use strict";let b={src:a.i(26758).default,width:256,height:256};a.s(["default",0,b])},39276,a=>{"use strict";var b=a.i(7997),c=a.i(60526),d=a.i(21249),e=a.i(84434);let f=new Intl.NumberFormat("en-US"),g=(0,c.homedir)();function h(a){return a.startsWith(g)?"~"+a.slice(g.length):a}function i(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)}async function j(){let a=await (0,d.getSessions)(30),c=(0,d.summarizeSessions)(a),g=Math.max(1,...c.dailyBurn.map(a=>a.tokens)),j=Object.entries(c.totalToolCalls).sort((a,b)=>b[1]-a[1]),k=Math.max(1,...j.map(([,a])=>a)),l=j.reduce((a,[,b])=>a+b,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:"sessions"}),(0,b.jsxs)("p",{className:"text-[10px] uppercase tracking-widest text-zinc-500 mt-1",children:["~/.claude/projects · ",30,"-day window"]})]}),(0,b.jsxs)("span",{className:"text-[10px] uppercase tracking-widest text-zinc-500",children:[30,"-day window"]})]}),0===c.count?(0,b.jsx)(e.Receipt,{label:"no data",children:(0,b.jsxs)("p",{className:"text-sm text-zinc-500",children:["No transcripts found in ",(0,b.jsx)("code",{children:"~/.claude/projects/"})," within the last ",30," days."]})}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("section",{className:"grid grid-cols-2 md:grid-cols-4 gap-3 mb-6",children:[(0,b.jsx)(e.Receipt,{pad:"default",children:(0,b.jsx)(e.Stat,{label:"sessions",value:f.format(c.count),hint:`avg ${i(c.averageSessionTokens)}`})}),(0,b.jsx)(e.Receipt,{pad:"default",children:(0,b.jsx)(e.Stat,{label:"30d total",value:i(c.totalTokens),hint:"all tokens"})}),(0,b.jsx)(e.Receipt,{pad:"default",children:(0,b.jsx)(e.Stat,{label:"median",value:i(c.medianSessionTokens),hint:"per session"})}),(0,b.jsx)(e.Receipt,{pad:"default",children:(0,b.jsx)(e.Stat,{label:"p95",value:i(c.p95SessionTokens),hint:"per session"})}),(0,b.jsx)(e.Receipt,{pad:"default",children:(0,b.jsx)(e.Stat,{label:"cache hit",value:`${(100*c.cacheHitRatio).toFixed(1)}%`,hint:"of input + cache"})}),(0,b.jsx)(e.Receipt,{pad:"default",children:(0,b.jsx)(e.Stat,{label:"output : input",value:`${(100*c.outputInputRatio).toFixed(2)}%`,hint:"thinking vs re-feed"})}),(0,b.jsx)(e.Receipt,{pad:"default",children:(0,b.jsx)(e.Stat,{label:"turns",value:f.format(c.totalTurns),hint:`avg ${Math.round(c.totalTurns/Math.max(1,c.count))}/session`})}),(0,b.jsx)(e.Receipt,{pad:"default",children:(0,b.jsx)(e.Stat,{label:"subagent share",value:`${(c.totalSidechainTurns/Math.max(1,c.totalTurns)*100).toFixed(0)}%`,hint:`${f.format(c.totalSidechainTurns)} turns`})})]}),(0,b.jsx)("section",{className:"mb-6",children:(0,b.jsx)(e.Receipt,{label:`daily burn \xb7 ${c.dailyBurn.length} active days`,children:(0,b.jsx)("div",{className:"space-y-1",children:c.dailyBurn.map(a=>{let c=a.tokens/g*100;return(0,b.jsxs)("div",{className:"flex items-center gap-3 text-xs",children:[(0,b.jsx)("div",{className:"w-24 text-zinc-500 tabular-nums",children:a.date}),(0,b.jsx)("div",{className:"flex-1 h-2 bg-zinc-100 dark:bg-zinc-800/60",children:(0,b.jsx)("div",{className:"h-full bg-zinc-700 dark:bg-zinc-300",style:{width:`${c}%`}})}),(0,b.jsx)("div",{className:"w-20 text-right tabular-nums text-zinc-700 dark:text-zinc-300",children:i(a.tokens)})]},a.date)})})})}),(0,b.jsx)("section",{className:"mb-6",children:(0,b.jsx)(e.Receipt,{label:"top sessions · heaviest 10 in 30d",pad:"none",children:(0,b.jsxs)("table",{className:"w-full text-sm",children:[(0,b.jsx)("thead",{className:"text-left text-[10px] uppercase tracking-widest text-zinc-500 border-b border-zinc-200 dark:border-zinc-800",children:(0,b.jsxs)("tr",{children:[(0,b.jsx)("th",{className:"px-5 py-3 font-normal",children:"date"}),(0,b.jsx)("th",{className:"px-5 py-3 font-normal",children:"project"}),(0,b.jsx)("th",{className:"px-5 py-3 font-normal",children:"models"}),(0,b.jsx)("th",{className:"px-5 py-3 font-normal text-right",children:"turns"}),(0,b.jsx)("th",{className:"px-5 py-3 font-normal text-right",children:"tokens"}),(0,b.jsx)("th",{className:"px-5 py-3 font-normal text-right",children:"cache hit"})]})}),(0,b.jsx)("tbody",{children:a.slice(0,10).map(a=>{let c=a.inputTokens+a.cacheReadTokens+a.cacheCreationTokens,d=c>0?a.cacheReadTokens/c*100:0;return(0,b.jsxs)("tr",{className:"border-b border-zinc-200/60 dark:border-zinc-800/60 last:border-b-0 hover:bg-zinc-50 dark:hover:bg-zinc-950/40 transition-colors",children:[(0,b.jsx)("td",{className:"px-5 py-3 text-zinc-500 tabular-nums text-xs whitespace-nowrap",children:a.endTime?new Date(a.endTime).toISOString().slice(0,10):"—"}),(0,b.jsx)("td",{className:"px-5 py-3 text-zinc-700 dark:text-zinc-300 truncate max-w-[280px]",children:(0,b.jsx)("code",{className:"text-xs",children:h(a.projectPath)})}),(0,b.jsx)("td",{className:"px-5 py-3 text-zinc-500 text-xs",children:a.models.map(a=>a.replace("claude-","")).join(", ")}),(0,b.jsx)("td",{className:"px-5 py-3 text-right tabular-nums",children:a.turnCount}),(0,b.jsx)("td",{className:"px-5 py-3 text-right tabular-nums",children:i(a.totalTokens)}),(0,b.jsxs)("td",{className:"px-5 py-3 text-right tabular-nums text-zinc-500",children:[d.toFixed(1),"%"]})]},a.filePath)})})]})})}),(0,b.jsx)("section",{className:"mb-6",children:(0,b.jsx)(e.Receipt,{label:`burn by project \xb7 top ${Math.min(15,c.byProject.length)} of ${c.byProject.length}`,pad:"none",children:(0,b.jsxs)("table",{className:"w-full text-sm",children:[(0,b.jsx)("thead",{className:"text-left text-[10px] uppercase tracking-widest text-zinc-500 border-b border-zinc-200 dark:border-zinc-800",children:(0,b.jsxs)("tr",{children:[(0,b.jsx)("th",{className:"px-5 py-3 font-normal",children:"project"}),(0,b.jsx)("th",{className:"px-5 py-3 font-normal text-right",children:"sessions"}),(0,b.jsx)("th",{className:"px-5 py-3 font-normal text-right",children:"turns"}),(0,b.jsx)("th",{className:"px-5 py-3 font-normal text-right",children:"total"}),(0,b.jsx)("th",{className:"px-5 py-3 font-normal text-right",children:"share"})]})}),(0,b.jsx)("tbody",{children:c.byProject.slice(0,15).map(a=>{let d=c.totalTokens>0?a.tokens/c.totalTokens*100:0;return(0,b.jsxs)("tr",{className:"border-b border-zinc-200/60 dark:border-zinc-800/60 last:border-b-0 hover:bg-zinc-50 dark:hover:bg-zinc-950/40 transition-colors",children:[(0,b.jsx)("td",{className:"px-5 py-3 truncate max-w-[420px]",children:(0,b.jsx)("code",{className:"text-xs",children:h(a.projectPath)})}),(0,b.jsx)("td",{className:"px-5 py-3 text-right tabular-nums text-zinc-500",children:a.count}),(0,b.jsx)("td",{className:"px-5 py-3 text-right tabular-nums",children:f.format(a.turns)}),(0,b.jsx)("td",{className:"px-5 py-3 text-right tabular-nums",children:i(a.tokens)}),(0,b.jsxs)("td",{className:"px-5 py-3 text-right tabular-nums text-zinc-500",children:[d.toFixed(1),"%"]})]},a.project)})})]})})}),j.length>0&&(0,b.jsx)("section",{className:"mb-6",children:(0,b.jsx)(e.Receipt,{label:`tool calls \xb7 ${f.format(l)} total \xb7 ${f.format(c.totalToolErrors)} errors (${(c.totalToolErrors/Math.max(1,l)*100).toFixed(1)}%)`,children:(0,b.jsx)("div",{className:"space-y-1",children:j.map(([a,c])=>{let d=c/k*100;return(0,b.jsxs)("div",{className:"flex items-center gap-3 text-xs",children:[(0,b.jsx)("div",{className:"w-32 text-zinc-700 dark:text-zinc-300 truncate",title:a,children:a}),(0,b.jsx)("div",{className:"flex-1 h-2 bg-zinc-100 dark:bg-zinc-800/60",children:(0,b.jsx)("div",{className:"h-full bg-sky-600 dark:bg-sky-500",style:{width:`${d}%`}})}),(0,b.jsx)("div",{className:"w-20 text-right tabular-nums text-zinc-700 dark:text-zinc-300",children:f.format(c)})]},a)})})})})]})]})})}a.s(["default",0,j,"dynamic",0,"force-dynamic"])},59901,a=>{a.n(a.i(39276))}];
|
|
2
2
|
|
|
3
3
|
//# sourceMappingURL=%5Broot-of-the-server%5D__0ubqc9u._.js.map
|
|
@@ -0,0 +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(84434),l=a.i(56004);let m=new Intl.NumberFormat("en-US");function n(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 o=async function(a){var[b]=await (0,d.decryptActionBoundArgs)("40b82ab2b5a2575d5c2beb515f28609f42c434a44f",a);await (0,l.toggleUserItem)(b)};async function p(){let[a,c,l,p,q]=await Promise.all([(0,f.getInventory)(),(0,g.getUsage)(30),(0,h.getSessions)(30),(0,i.getContextFiles)(),(0,j.getHooks)()]),r=(0,f.summarize)(a),s=(0,h.summarizeSessions)(l),t=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),u=t.reduce((a,b)=>a+b.perTurnTokens,0),v=p.find(a=>"claude-md-global"===a.category),w=p.filter(a=>"memory-md"===a.category).sort((a,b)=>b.tokens-a.tokens)[0],x=q.filter(a=>"SessionStart"===a.event&&"measured"===a.status).reduce((a,b)=>a+b.perTurnTokens,0),y=Math.max(1,...s.dailyBurn.map(a=>a.tokens)),z=(v?.tokens??0)+(w?.tokens??0)+x,A=+!!v+ +!!w+ +(x>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:[m.format(r.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)(k.MiniStat,{label:"items",value:m.format(r.totalItems)}),(0,b.jsx)(k.MiniStat,{label:"skills",value:m.format(r.byKind.skill.count)}),(0,b.jsx)(k.MiniStat,{label:"agents",value:m.format(r.byKind.agent.count)}),(0,b.jsx)(k.MiniStat,{label:"commands",value:m.format(r.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:[n(s.totalTokens),(0,b.jsx)("span",{className:"ml-1 text-xs text-zinc-500 font-normal",children:"tok"})]}),s.dailyBurn.length>0&&(0,b.jsxs)("div",{className:"mt-3",children:[(0,b.jsx)("div",{className:"flex items-end gap-px h-8",children:s.dailyBurn.map(a=>{let c=Math.max(2,a.tokens/y*100);return(0,b.jsx)("div",{className:"flex-1 bg-zinc-300 dark:bg-zinc-700",style:{height:`${c}%`},title:`${a.date}: ${n(a.tokens)}`},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:s.dailyBurn[0].date.slice(5)}),(0,b.jsxs)("span",{children:[s.dailyBurn.length," active days"]}),(0,b.jsx)("span",{children:s.dailyBurn[s.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:m.format(s.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:n(s.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:n(s.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:[m.format(u),(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:t.length>0?`top ${t.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===t.length?(0,b.jsxs)("li",{className:"text-zinc-500",children:["every loaded user item invoked in ",30,"d."]}):t.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:m.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:o.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:[m.format(z),(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 ",A," sticky"," ",1===A?"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:[v&&(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:m.format(v.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"})]}),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:m.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:w.name})}),(0,b.jsx)("span",{className:"text-[10px] uppercase tracking-widest text-zinc-500",children:"mem"})]}),x>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:m.format(x)}),(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 · re-scanned every load · 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)(o,"40b82ab2b5a2575d5c2beb515f28609f42c434a44f",null),a.s(["$$RSC_SERVER_ACTION_0",0,o,"default",0,p,"dynamic",0,"force-dynamic"])}];
|
|
2
|
+
|
|
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/
|
|
11
|
-
"static/
|
|
12
|
-
"static/
|
|
10
|
+
"static/BT6H4g8OlEYi9snYU0PI-/_buildManifest.js",
|
|
11
|
+
"static/BT6H4g8OlEYi9snYU0PI-/_ssgManifest.js",
|
|
12
|
+
"static/BT6H4g8OlEYi9snYU0PI-/_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/13twdc6z5jomc.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'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,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";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/13twdc6z5jomc.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/13twdc6z5jomc.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\":\"th1MKWNqUvonxGrsp9Ee6\"}\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/13twdc6z5jomc.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/13525lf.7uo9s.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'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,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";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/13525lf.7uo9s.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/13525lf.7uo9s.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\":\"BT6H4g8OlEYi9snYU0PI-\"}\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/13525lf.7uo9s.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,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";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\":\"
|
|
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,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";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\":\"BT6H4g8OlEYi9snYU0PI-\"}\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>
|
|
@@ -35,26 +35,24 @@ async function realpathOrLexical(p: string): Promise<string> {
|
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
/**
|
|
38
|
-
* Strict allowlist check.
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
*
|
|
38
|
+
* Strict allowlist check. Returns the canonical real path if it lives under one
|
|
39
|
+
* of the allowed dirs, else null. Returning the resolved path (not just a
|
|
40
|
+
* boolean) lets callers operate on it directly — closing the TOCTOU window
|
|
41
|
+
* where an attacker could swap a symlink between the check and the fs op.
|
|
42
42
|
*/
|
|
43
|
-
async function
|
|
44
|
-
if (typeof p !== "string" || p.length === 0) return
|
|
43
|
+
async function resolveSafeUserPath(p: string): Promise<string | null> {
|
|
44
|
+
if (typeof p !== "string" || p.length === 0) return null;
|
|
45
45
|
const real = await realpathOrLexical(resolve(p));
|
|
46
|
-
// Realpath the allowed-dir prefixes too — if the user has symlinked
|
|
47
|
-
// ~/.claude/skills itself, both sides need to canonicalize the same way.
|
|
48
46
|
for (const allowed of ALLOWED_DIRS) {
|
|
49
47
|
let realAllowed: string;
|
|
50
48
|
try {
|
|
51
49
|
realAllowed = await realpath(allowed);
|
|
52
50
|
} catch {
|
|
53
|
-
realAllowed = allowed;
|
|
51
|
+
realAllowed = allowed;
|
|
54
52
|
}
|
|
55
|
-
if (real === realAllowed || real.startsWith(realAllowed + sep)) return
|
|
53
|
+
if (real === realAllowed || real.startsWith(realAllowed + sep)) return real;
|
|
56
54
|
}
|
|
57
|
-
return
|
|
55
|
+
return null;
|
|
58
56
|
}
|
|
59
57
|
|
|
60
58
|
async function backupSettings(): Promise<void> {
|
|
@@ -62,7 +60,9 @@ async function backupSettings(): Promise<void> {
|
|
|
62
60
|
const raw = await readFile(SETTINGS_PATH, "utf8");
|
|
63
61
|
const stamp = new Date().toISOString().replace(/[:.]/g, "-");
|
|
64
62
|
const bakPath = join(CLAUDE_DIR, `settings.json.usage-bak-${stamp}`);
|
|
65
|
-
|
|
63
|
+
// 0o600 — settings.json may contain MCP tokens or hook commands with secrets;
|
|
64
|
+
// backups must not be world-readable.
|
|
65
|
+
await writeFile(bakPath, raw, { encoding: "utf8", mode: 0o600 });
|
|
66
66
|
// Garbage-collect older backups beyond MAX_BACKUPS
|
|
67
67
|
const entries = await readdir(CLAUDE_DIR, { withFileTypes: true });
|
|
68
68
|
const baks = entries
|
|
@@ -82,22 +82,36 @@ async function backupSettings(): Promise<void> {
|
|
|
82
82
|
}
|
|
83
83
|
}
|
|
84
84
|
|
|
85
|
+
// Plugin keys in ~/.claude/settings.json have the shape `<plugin>@<marketplace>`.
|
|
86
|
+
// Restrict to filename-safe chars to keep arbitrary user input out of settings.json.
|
|
87
|
+
const PLUGIN_KEY_RE = /^[a-zA-Z0-9_.-]+@[a-zA-Z0-9_.-]+$/;
|
|
88
|
+
|
|
89
|
+
async function atomicWriteJson(path: string, data: string, mode = 0o600): Promise<void> {
|
|
90
|
+
const tmp = `${path}.tmp-${process.pid}-${Date.now()}-${Math.random().toString(36).slice(2, 8)}`;
|
|
91
|
+
await writeFile(tmp, data, { encoding: "utf8", mode });
|
|
92
|
+
await rename(tmp, path);
|
|
93
|
+
}
|
|
94
|
+
|
|
85
95
|
export async function toggleUserItem(filePath: string): Promise<void> {
|
|
86
|
-
|
|
96
|
+
const realSrc = await resolveSafeUserPath(filePath);
|
|
97
|
+
if (!realSrc) {
|
|
87
98
|
throw new Error(
|
|
88
99
|
`Refusing to toggle file outside ~/.claude/skills, /agents, or /commands: ${filePath}`
|
|
89
100
|
);
|
|
90
101
|
}
|
|
91
|
-
const
|
|
92
|
-
?
|
|
93
|
-
: `${
|
|
94
|
-
|
|
95
|
-
//
|
|
96
|
-
|
|
102
|
+
const realDst = realSrc.endsWith(".disabled")
|
|
103
|
+
? realSrc.slice(0, -".disabled".length)
|
|
104
|
+
: `${realSrc}.disabled`;
|
|
105
|
+
// Operate on the canonical resolved path, not the caller-supplied string —
|
|
106
|
+
// closes the TOCTOU window where a symlink could be swapped after the check.
|
|
107
|
+
await rename(realSrc, realDst);
|
|
97
108
|
revalidatePath("/", "layout");
|
|
98
109
|
}
|
|
99
110
|
|
|
100
111
|
export async function togglePlugin(pluginKey: string): Promise<void> {
|
|
112
|
+
if (!PLUGIN_KEY_RE.test(pluginKey)) {
|
|
113
|
+
throw new Error(`Refusing to toggle plugin with invalid key: ${pluginKey}`);
|
|
114
|
+
}
|
|
101
115
|
await backupSettings();
|
|
102
116
|
const raw = await readFile(SETTINGS_PATH, "utf8");
|
|
103
117
|
const parsed = JSON.parse(raw) as Record<string, unknown>;
|
|
@@ -105,9 +119,7 @@ export async function togglePlugin(pluginKey: string): Promise<void> {
|
|
|
105
119
|
const current = ep[pluginKey] !== false;
|
|
106
120
|
ep[pluginKey] = !current;
|
|
107
121
|
parsed.enabledPlugins = ep;
|
|
108
|
-
await
|
|
109
|
-
// Invalidate every route below the root layout so toggles from /items,
|
|
110
|
-
// /sessions, /context, and / all see fresh state on next navigation.
|
|
122
|
+
await atomicWriteJson(SETTINGS_PATH, JSON.stringify(parsed, null, 2) + "\n");
|
|
111
123
|
revalidatePath("/", "layout");
|
|
112
124
|
}
|
|
113
125
|
|
|
@@ -119,23 +131,18 @@ export async function disableUserItems(filePaths: string[]): Promise<{ moved: nu
|
|
|
119
131
|
let moved = 0;
|
|
120
132
|
let skipped = 0;
|
|
121
133
|
for (const fp of filePaths) {
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
continue;
|
|
125
|
-
}
|
|
126
|
-
if (fp.endsWith(".disabled")) {
|
|
134
|
+
const realSrc = await resolveSafeUserPath(fp);
|
|
135
|
+
if (!realSrc || realSrc.endsWith(".disabled")) {
|
|
127
136
|
skipped++;
|
|
128
137
|
continue;
|
|
129
138
|
}
|
|
130
139
|
try {
|
|
131
|
-
await rename(
|
|
140
|
+
await rename(realSrc, `${realSrc}.disabled`);
|
|
132
141
|
moved++;
|
|
133
142
|
} catch {
|
|
134
143
|
skipped++;
|
|
135
144
|
}
|
|
136
145
|
}
|
|
137
|
-
// Invalidate every route below the root layout so toggles from /items,
|
|
138
|
-
// /sessions, /context, and / all see fresh state on next navigation.
|
|
139
146
|
revalidatePath("/", "layout");
|
|
140
147
|
return { moved, skipped };
|
|
141
148
|
}
|
|
@@ -1,8 +1,14 @@
|
|
|
1
|
+
import { homedir } from "node:os";
|
|
1
2
|
import { getSessions, summarizeSessions } from "@/lib/sessions";
|
|
2
3
|
import { Receipt, Stat } from "../components/Receipt";
|
|
3
4
|
|
|
4
5
|
const fmt = new Intl.NumberFormat("en-US");
|
|
5
6
|
const DAYS = 30;
|
|
7
|
+
const HOME = homedir();
|
|
8
|
+
|
|
9
|
+
function tildify(p: string): string {
|
|
10
|
+
return p.startsWith(HOME) ? "~" + p.slice(HOME.length) : p;
|
|
11
|
+
}
|
|
6
12
|
|
|
7
13
|
export const dynamic = "force-dynamic";
|
|
8
14
|
|
|
@@ -118,7 +124,7 @@ export default async function SessionsPage() {
|
|
|
118
124
|
{session.endTime ? new Date(session.endTime).toISOString().slice(0, 10) : "—"}
|
|
119
125
|
</td>
|
|
120
126
|
<td className="px-5 py-3 text-zinc-700 dark:text-zinc-300 truncate max-w-[280px]">
|
|
121
|
-
<code className="text-xs">{session.projectPath}</code>
|
|
127
|
+
<code className="text-xs">{tildify(session.projectPath)}</code>
|
|
122
128
|
</td>
|
|
123
129
|
<td className="px-5 py-3 text-zinc-500 text-xs">
|
|
124
130
|
{session.models.map((m) => m.replace("claude-", "")).join(", ")}
|
|
@@ -153,7 +159,7 @@ export default async function SessionsPage() {
|
|
|
153
159
|
return (
|
|
154
160
|
<tr key={p.project} className="border-b border-zinc-200/60 dark:border-zinc-800/60 last:border-b-0 hover:bg-zinc-50 dark:hover:bg-zinc-950/40 transition-colors">
|
|
155
161
|
<td className="px-5 py-3 truncate max-w-[420px]">
|
|
156
|
-
<code className="text-xs">{p.projectPath}</code>
|
|
162
|
+
<code className="text-xs">{tildify(p.projectPath)}</code>
|
|
157
163
|
</td>
|
|
158
164
|
<td className="px-5 py-3 text-right tabular-nums text-zinc-500">{p.count}</td>
|
|
159
165
|
<td className="px-5 py-3 text-right tabular-nums">{fmt.format(p.turns)}</td>
|
|
@@ -139,6 +139,10 @@ async function main() {
|
|
|
139
139
|
const port = await findPort();
|
|
140
140
|
const url = `http://localhost:${port}`;
|
|
141
141
|
|
|
142
|
+
// IMPORTANT: HOSTNAME must override anything inherited from process.env.
|
|
143
|
+
// Keep `...process.env` FIRST and `HOSTNAME: "127.0.0.1"` LAST so a stray
|
|
144
|
+
// HOSTNAME=0.0.0.0 in the user's shell can't open the dashboard to the LAN.
|
|
145
|
+
// Same for PORT.
|
|
142
146
|
const child = fork(STANDALONE_SERVER, [], {
|
|
143
147
|
env: { ...process.env, PORT: String(port), HOSTNAME: "127.0.0.1" },
|
|
144
148
|
stdio: "inherit",
|
|
@@ -132,8 +132,14 @@ export async function getContextFiles(): Promise<ContextFile[]> {
|
|
|
132
132
|
const dirName = String(d.name);
|
|
133
133
|
const memPath = join(PROJECTS_DIR, dirName, "memory", "MEMORY.md");
|
|
134
134
|
if (!(await exists(memPath))) continue;
|
|
135
|
-
// Project dir name encodes cwd, e.g. "-Users-vtx-VTX" => /Users/vtx/VTX
|
|
136
|
-
|
|
135
|
+
// Project dir name encodes cwd, e.g. "-Users-vtx-VTX" => /Users/vtx/VTX.
|
|
136
|
+
// Strip control chars before display — POSIX filenames technically allow
|
|
137
|
+
// them and a crafted dir name shouldn't smuggle escape sequences into the UI.
|
|
138
|
+
const inferredCwd = dirName
|
|
139
|
+
.replace(/^-/, "/")
|
|
140
|
+
.replaceAll("-", "/")
|
|
141
|
+
// eslint-disable-next-line no-control-regex
|
|
142
|
+
.replace(/[\x00-\x1f\x7f]/g, "");
|
|
137
143
|
out.push({
|
|
138
144
|
category: "memory-md",
|
|
139
145
|
name: `${dirName}/memory/MEMORY.md`,
|
|
@@ -9,6 +9,7 @@ const enc = getEncoding("cl100k_base");
|
|
|
9
9
|
|
|
10
10
|
const DRY_RUN_EVENTS = new Set(["SessionStart", "UserPromptSubmit"]);
|
|
11
11
|
const DRY_RUN_TIMEOUT_MS = 5000;
|
|
12
|
+
const MAX_STDOUT_BYTES = 512 * 1024;
|
|
12
13
|
|
|
13
14
|
export type HookEntry = {
|
|
14
15
|
event: string;
|
|
@@ -27,22 +28,42 @@ function countTokens(s: string): number {
|
|
|
27
28
|
|
|
28
29
|
async function runHook(command: string, sampleInput: object): Promise<{ stdout: string; error?: string; timeout?: boolean }> {
|
|
29
30
|
return new Promise((resolve) => {
|
|
30
|
-
const child = spawn("bash", ["-
|
|
31
|
+
const child = spawn("bash", ["-c", command], { stdio: ["pipe", "pipe", "pipe"] });
|
|
31
32
|
let stdout = "";
|
|
32
33
|
let stderr = "";
|
|
33
34
|
let done = false;
|
|
34
|
-
const
|
|
35
|
-
if (done) return;
|
|
36
|
-
done = true;
|
|
35
|
+
const kill = () => {
|
|
37
36
|
try {
|
|
38
37
|
child.kill("SIGKILL");
|
|
39
38
|
} catch {
|
|
40
39
|
// ignore
|
|
41
40
|
}
|
|
41
|
+
};
|
|
42
|
+
const timer = setTimeout(() => {
|
|
43
|
+
if (done) return;
|
|
44
|
+
done = true;
|
|
45
|
+
kill();
|
|
42
46
|
resolve({ stdout, timeout: true });
|
|
43
47
|
}, DRY_RUN_TIMEOUT_MS);
|
|
44
|
-
child.stdout?.on("data", (d) =>
|
|
45
|
-
|
|
48
|
+
child.stdout?.on("data", (d) => {
|
|
49
|
+
if (done) return;
|
|
50
|
+
const remaining = MAX_STDOUT_BYTES - stdout.length;
|
|
51
|
+
if (remaining <= 0) {
|
|
52
|
+
done = true;
|
|
53
|
+
clearTimeout(timer);
|
|
54
|
+
kill();
|
|
55
|
+
resolve({ stdout });
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
const chunk = d.toString();
|
|
59
|
+
stdout += chunk.length > remaining ? chunk.slice(0, remaining) : chunk;
|
|
60
|
+
});
|
|
61
|
+
child.stderr?.on("data", (d) => {
|
|
62
|
+
const remaining = MAX_STDOUT_BYTES - stderr.length;
|
|
63
|
+
if (remaining <= 0) return;
|
|
64
|
+
const chunk = d.toString();
|
|
65
|
+
stderr += chunk.length > remaining ? chunk.slice(0, remaining) : chunk;
|
|
66
|
+
});
|
|
46
67
|
child.on("error", (err) => {
|
|
47
68
|
if (done) return;
|
|
48
69
|
done = true;
|
|
@@ -144,11 +144,13 @@ async function scanUserAgents(): Promise<InventoryItem[]> {
|
|
|
144
144
|
return out;
|
|
145
145
|
}
|
|
146
146
|
|
|
147
|
+
const MAX_COMMAND_DEPTH = 8;
|
|
148
|
+
|
|
147
149
|
async function scanUserCommands(): Promise<InventoryItem[]> {
|
|
148
150
|
const dir = join(CLAUDE_DIR, "commands");
|
|
149
151
|
if (!(await exists(dir))) return [];
|
|
150
152
|
const out: InventoryItem[] = [];
|
|
151
|
-
await walkCommandDir(dir, "", out, "user");
|
|
153
|
+
await walkCommandDir(dir, "", out, "user", undefined, undefined, false, 0, new Set());
|
|
152
154
|
return out;
|
|
153
155
|
}
|
|
154
156
|
|
|
@@ -159,14 +161,26 @@ async function walkCommandDir(
|
|
|
159
161
|
source: Source,
|
|
160
162
|
plugin?: string,
|
|
161
163
|
pluginKey?: string,
|
|
162
|
-
pluginDisabled = false
|
|
164
|
+
pluginDisabled = false,
|
|
165
|
+
depth = 0,
|
|
166
|
+
visited: Set<string> = new Set()
|
|
163
167
|
): Promise<void> {
|
|
168
|
+
if (depth > MAX_COMMAND_DEPTH) return;
|
|
169
|
+
// Guard against symlink loops by tracking visited inodes.
|
|
170
|
+
try {
|
|
171
|
+
const st = await stat(dir);
|
|
172
|
+
const key = `${st.dev}:${st.ino}`;
|
|
173
|
+
if (visited.has(key)) return;
|
|
174
|
+
visited.add(key);
|
|
175
|
+
} catch {
|
|
176
|
+
return;
|
|
177
|
+
}
|
|
164
178
|
const entries = await readdir(dir, { withFileTypes: true });
|
|
165
179
|
for (const e of entries) {
|
|
166
180
|
const p = join(dir, e.name);
|
|
167
181
|
if (e.isDirectory()) {
|
|
168
182
|
const ns = prefix ? `${prefix}:${e.name}` : e.name;
|
|
169
|
-
await walkCommandDir(p, ns, out, source, plugin, pluginKey, pluginDisabled);
|
|
183
|
+
await walkCommandDir(p, ns, out, source, plugin, pluginKey, pluginDisabled, depth + 1, visited);
|
|
170
184
|
continue;
|
|
171
185
|
}
|
|
172
186
|
if (!e.isFile()) continue;
|
|
@@ -270,7 +284,7 @@ async function scanPluginCache(enabledPlugins: Record<string, boolean>): Promise
|
|
|
270
284
|
// commands/<name>.md (plugin slash commands, may be nested)
|
|
271
285
|
const commandsDir = join(vDir, "commands");
|
|
272
286
|
if (await exists(commandsDir)) {
|
|
273
|
-
await walkCommandDir(commandsDir, "", out, "plugin", pluginLabel, pluginKey, pluginDisabled);
|
|
287
|
+
await walkCommandDir(commandsDir, "", out, "plugin", pluginLabel, pluginKey, pluginDisabled, 0, new Set());
|
|
274
288
|
}
|
|
275
289
|
}
|
|
276
290
|
}
|