hex-audit 0.4.0 → 0.4.2
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/dashboard/.next/BUILD_ID +1 -1
- package/dashboard/.next/app-build-manifest.json +12 -12
- package/dashboard/.next/app-path-routes-manifest.json +1 -1
- package/dashboard/.next/build-manifest.json +2 -2
- package/dashboard/.next/next-minimal-server.js.nft.json +1 -1
- package/dashboard/.next/next-server.js.nft.json +1 -1
- package/dashboard/.next/prerender-manifest.js +1 -1
- package/dashboard/.next/prerender-manifest.json +1 -1
- package/dashboard/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/dashboard/.next/server/app/_not-found.html +1 -1
- package/dashboard/.next/server/app/_not-found.rsc +4 -4
- package/dashboard/.next/server/app/access/page_client-reference-manifest.js +1 -1
- package/dashboard/.next/server/app/access.html +1 -1
- package/dashboard/.next/server/app/access.rsc +4 -4
- package/dashboard/.next/server/app/api/github-status/route.js +1 -1
- package/dashboard/.next/server/app/calls/page_client-reference-manifest.js +1 -1
- package/dashboard/.next/server/app/calls.html +1 -1
- package/dashboard/.next/server/app/calls.rsc +4 -4
- package/dashboard/.next/server/app/conformance/page_client-reference-manifest.js +1 -1
- package/dashboard/.next/server/app/conformance.html +1 -1
- package/dashboard/.next/server/app/conformance.rsc +4 -4
- package/dashboard/.next/server/app/diagram/page_client-reference-manifest.js +1 -1
- package/dashboard/.next/server/app/diagram.html +1 -1
- package/dashboard/.next/server/app/diagram.rsc +4 -4
- package/dashboard/.next/server/app/flows/page_client-reference-manifest.js +1 -1
- package/dashboard/.next/server/app/flows.html +1 -1
- package/dashboard/.next/server/app/flows.rsc +4 -4
- package/dashboard/.next/server/app/functions/page_client-reference-manifest.js +1 -1
- package/dashboard/.next/server/app/functions.html +1 -1
- package/dashboard/.next/server/app/functions.rsc +4 -4
- package/dashboard/.next/server/app/index.html +1 -1
- package/dashboard/.next/server/app/index.rsc +4 -4
- package/dashboard/.next/server/app/issues/page_client-reference-manifest.js +1 -1
- package/dashboard/.next/server/app/issues.html +1 -1
- package/dashboard/.next/server/app/issues.rsc +4 -4
- package/dashboard/.next/server/app/page_client-reference-manifest.js +1 -1
- package/dashboard/.next/server/app/progress/page_client-reference-manifest.js +1 -1
- package/dashboard/.next/server/app/progress.html +1 -1
- package/dashboard/.next/server/app/progress.rsc +4 -4
- package/dashboard/.next/server/app/stats/page_client-reference-manifest.js +1 -1
- package/dashboard/.next/server/app/stats.html +1 -1
- package/dashboard/.next/server/app/stats.rsc +4 -4
- package/dashboard/.next/server/app-paths-manifest.json +5 -5
- package/dashboard/.next/server/chunks/431.js +1 -1
- package/dashboard/.next/server/middleware-build-manifest.js +1 -1
- package/dashboard/.next/server/pages/404.html +1 -1
- package/dashboard/.next/server/pages/500.html +1 -1
- package/dashboard/.next/server/server-reference-manifest.js +1 -1
- package/dashboard/.next/server/server-reference-manifest.json +1 -1
- package/dashboard/.next/static/chunks/app/{layout-e7b50543ba216d12.js → layout-c286f959acd62c18.js} +1 -1
- package/dashboard/app/api/github-status/route.ts +4 -4
- package/dashboard/components/DashboardLayout.tsx +1 -1
- package/dist/commands/update.d.ts.map +1 -1
- package/dist/commands/update.js +5 -2
- package/dist/commands/update.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/skills/init-audit.md +20 -4
- package/package.json +3 -1
- package/dashboard/.next/cache/.tsbuildinfo +0 -1
- package/dashboard/.next/cache/webpack/client-production/0.pack +0 -0
- package/dashboard/.next/cache/webpack/client-production/index.pack +0 -0
- package/dashboard/.next/cache/webpack/edge-server-production/0.pack +0 -0
- package/dashboard/.next/cache/webpack/edge-server-production/index.pack +0 -0
- package/dashboard/.next/cache/webpack/server-production/0.pack +0 -0
- package/dashboard/.next/cache/webpack/server-production/1.pack +0 -0
- package/dashboard/.next/cache/webpack/server-production/2.pack +0 -0
- package/dashboard/.next/cache/webpack/server-production/index.pack +0 -0
- package/dashboard/.next/cache/webpack/server-production/index.pack.old +0 -0
- package/dashboard/.next/trace +0 -80
- package/dashboard/.next/types/app/access/page.ts +0 -79
- package/dashboard/.next/types/app/api/code/route.ts +0 -343
- package/dashboard/.next/types/app/api/flows/route.ts +0 -343
- package/dashboard/.next/types/app/api/github-status/route.ts +0 -343
- package/dashboard/.next/types/app/api/issues/[id]/move/route.ts +0 -343
- package/dashboard/.next/types/app/api/issues/[id]/route.ts +0 -343
- package/dashboard/.next/types/app/api/mermaid/route.ts +0 -343
- package/dashboard/.next/types/app/api/progress/route.ts +0 -343
- package/dashboard/.next/types/app/api/watch/route.ts +0 -343
- package/dashboard/.next/types/app/calls/page.ts +0 -79
- package/dashboard/.next/types/app/conformance/page.ts +0 -79
- package/dashboard/.next/types/app/diagram/page.ts +0 -79
- package/dashboard/.next/types/app/flows/page.ts +0 -79
- package/dashboard/.next/types/app/functions/page.ts +0 -79
- package/dashboard/.next/types/app/issues/page.ts +0 -79
- package/dashboard/.next/types/app/page.ts +0 -79
- package/dashboard/.next/types/app/progress/page.ts +0 -79
- package/dashboard/.next/types/app/stats/page.ts +0 -79
- package/dashboard/.next/types/package.json +0 -1
- /package/dashboard/.next/static/{0IZAlhEwk5-v4myUvWKBd → jgVJFQh-gd7snxrHbqeKc}/_buildManifest.js +0 -0
- /package/dashboard/.next/static/{0IZAlhEwk5-v4myUvWKBd → jgVJFQh-gd7snxrHbqeKc}/_ssgManifest.js +0 -0
package/dashboard/.next/static/chunks/app/{layout-e7b50543ba216d12.js → layout-c286f959acd62c18.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3185],{9640:function(e,t,r){Promise.resolve().then(r.t.bind(r,3812,23)),Promise.resolve().then(r.bind(r,2198)),Promise.resolve().then(r.bind(r,1187)),Promise.resolve().then(r.bind(r,4595)),Promise.resolve().then(r.t.bind(r,8414,23)),Promise.resolve().then(r.t.bind(r,5256,23))},2198:function(e,t,r){"use strict";r.d(t,{CommandPalette:function(){return i}});var n=r(7821),a=r(8078),s=r(168);let o=r(1187).p.flatMap(e=>e.items.map(t=>({href:t.href,label:"".concat(e.label," / ").concat(t.label)})));function i(){let[e,t]=(0,a.useState)(!1),[r,i]=(0,a.useState)(""),[l,c]=(0,a.useState)(0),d=(0,a.useRef)(null),u=(0,s.useRouter)(),h=r.trim()?o.filter(e=>e.label.toLowerCase().includes(r.toLowerCase())||e.href.includes(r.toLowerCase())):o;(0,a.useEffect)(()=>{let e=e=>{(e.ctrlKey||e.metaKey)&&"k"===e.key&&(e.preventDefault(),t(e=>!e),i(""),c(0)),"Escape"===e.key&&t(!1)};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[]),(0,a.useEffect)(()=>{e&&setTimeout(()=>{var e;return null===(e=d.current)||void 0===e?void 0:e.focus()},50)},[e]),(0,a.useEffect)(()=>c(0),[r]);let m=e=>{u.push(e),t(!1),i("")};return e?(0,n.jsx)("div",{className:"fixed inset-0 z-[9000] flex items-start justify-center px-4 pt-[12vh]",style:{background:"var(--overlay-bg)"},onClick:()=>t(!1),children:(0,n.jsxs)("div",{role:"dialog","aria-modal":"true","aria-label":"Quick navigation",className:"w-full max-w-lg rounded-lg border border-border-default bg-surface-1 shadow-lg",onClick:e=>e.stopPropagation(),children:[(0,n.jsxs)("div",{className:"flex items-center border-b border-border-default px-4 py-3 gap-2",children:[(0,n.jsx)("span",{className:"text-accent text-body font-medium shrink-0","aria-hidden":"true",children:">"}),(0,n.jsx)("input",{ref:d,type:"text",value:r,onChange:e=>i(e.target.value),placeholder:"search pages...","aria-label":"Search pages",className:"flex-1 bg-transparent text-body text-text-primary placeholder-text-tertiary outline-none",onKeyDown:e=>{"ArrowDown"===e.key?(e.preventDefault(),c(e=>Math.min(e+1,h.length-1))):"ArrowUp"===e.key?(e.preventDefault(),c(e=>Math.max(e-1,0))):"Enter"===e.key&&h[l]?m(h[l].href):"Tab"===e.key&&e.preventDefault()}}),(0,n.jsx)("kbd",{className:"shrink-0 border border-border-default px-1.5 py-0.5 text-caption text-text-tertiary",style:{borderRadius:"var(--radius-sm)"},children:"ESC"})]}),(0,n.jsx)("div",{className:"max-h-72 overflow-y-auto py-1",children:0===h.length?(0,n.jsx)("div",{className:"px-4 py-3 text-body text-text-tertiary",children:"no results"}):h.map((e,t)=>(0,n.jsxs)("button",{type:"button",className:"flex w-full items-center gap-3 px-4 py-2.5 text-left text-body focus-visible:outline focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-accent ".concat(t===l?"bg-accent-subtle text-accent":"text-text-secondary hover:bg-surface-2 hover:text-text-primary"),onClick:()=>m(e.href),onMouseEnter:()=>c(t),children:[(0,n.jsx)("span",{className:"text-text-tertiary text-caption shrink-0",children:t===l?">":" "}),(0,n.jsx)("span",{children:e.label}),(0,n.jsx)("span",{className:"ml-auto text-caption text-text-tertiary shrink-0",children:e.href})]},e.href))})]})}):null}},1187:function(e,t,r){"use strict";r.d(t,{DashboardLayout:function(){return p},p:function(){return f}});var n=r(7821),a=r(7498),s=r.n(a),o=r(168),i=r(4595),l=r(8078);function c(e,t){let r=Math.round((t.getTime()-e.getTime())/1e3);return r<5?"just now":r<60?"".concat(r,"s ago"):r<3600?"".concat(Math.round(r/60),"m ago"):"".concat(Math.round(r/3600),"h ago")}function d(){let e=(0,o.useRouter)(),[t,r]=(0,l.useState)(()=>new Date),[a,s]=(0,l.useState)(!1),[i,d]=(0,l.useState)(()=>new Date),[u,h]=(0,l.useState)(null),m=(0,l.useRef)(null),f=()=>{fetch("/api/github-status",{cache:"no-store"}).then(e=>e.ok?e.json():null).then(e=>{if(e&&"string"==typeof e.last_synced_at){var t;h({repo:null!==(t=e.repo)&&void 0!==t?t:"",last_synced_at:e.last_synced_at})}else h(null)}).catch(()=>h(null))};(0,l.useEffect)(()=>{f();let e=new EventSource("/api/watch");return e.onopen=()=>s(!0),e.onmessage=()=>{r(new Date),f()},e.onerror=()=>s(!1),()=>e.close()},[e]),(0,l.useEffect)(()=>{let e=setInterval(()=>d(new Date),3e4);return()=>clearInterval(e)},[]),(0,l.useEffect)(()=>()=>{m.current&&clearTimeout(m.current)},[]);let x=a?"Updated ".concat(c(t,i)):"Reconnecting…";return(0,n.jsxs)("div",{className:"px-3 py-1 text-caption text-text-tertiary","aria-live":"polite",children:[(0,n.jsxs)("div",{className:"flex items-center gap-2",title:"Last refresh ".concat(t.toLocaleTimeString()).concat(a?"":" — watcher disconnected"),children:[(0,n.jsx)("span",{className:"inline-block h-1.5 w-1.5 rounded-full ".concat(a?"bg-[var(--success)]":"bg-[var(--medium)]"),"aria-hidden":"true"}),(0,n.jsx)("span",{children:x})]}),u&&(0,n.jsxs)("div",{className:"mt-1 flex items-center gap-2",title:"GitHub sync with ".concat(u.repo," at ").concat(new Date(u.last_synced_at).toLocaleTimeString()),children:[(0,n.jsx)("span",{className:"inline-block h-1.5 w-1.5 rounded-full bg-accent","aria-hidden":"true"}),(0,n.jsxs)("span",{children:["GitHub ",c(new Date(u.last_synced_at),i)]})]})]})}function u(e){return(0,n.jsx)("svg",{...e,"aria-hidden":"true",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5"})})}function h(e){return(0,n.jsx)("svg",{...e,"aria-hidden":"true",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 3v2.25m6.364.386-1.591 1.591M21 12h-2.25m-.386 6.364-1.591-1.591M12 18.75V21m-4.773-4.227-1.591 1.591M5.25 12H3m4.227-4.773L5.636 5.636M15.75 12a3.75 3.75 0 1 1-7.5 0 3.75 3.75 0 0 1 7.5 0Z"})})}function m(e){return(0,n.jsx)("svg",{...e,"aria-hidden":"true",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21.752 15.002A9.72 9.72 0 0 1 18 15.75c-5.385 0-9.75-4.365-9.75-9.75 0-1.33.266-2.597.748-3.752A9.753 9.753 0 0 0 3 11.25C3 16.635 7.365 21 12.75 21a9.753 9.753 0 0 0 9.002-5.998Z"})})}let f=[{label:"Recon",items:[{href:"/",label:"Home",icon:function(e){return(0,n.jsx)("svg",{...e,"aria-hidden":"true",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m2.25 12 8.954-8.955a1.126 1.126 0 0 1 1.591 0L21.75 12M4.5 9.75v10.125c0 .621.504 1.125 1.125 1.125H9.75v-4.875c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125V21h4.125c.621 0 1.125-.504 1.125-1.125V9.75M8.25 21h8.25"})})}},{href:"/progress",label:"Progress",icon:function(e){return(0,n.jsx)("svg",{...e,"aria-hidden":"true",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11.35 3.836c-.065.21-.1.433-.1.664 0 .414.336.75.75.75h4.5a.75.75 0 0 0 .75-.75 2.25 2.25 0 0 0-.1-.664m-5.8 0A2.251 2.251 0 0 1 13.5 2.25H15a2.25 2.25 0 0 1 2.15 1.586m-5.8 0c-.376.023-.75.05-1.124.08C9.095 4.01 8.25 4.973 8.25 6.108V8.25m8.9-4.414c.376.023.75.05 1.124.08 1.131.094 1.976 1.057 1.976 2.192V16.5A2.25 2.25 0 0 1 18 18.75h-2.25m-7.5-10.5H4.875c-.621 0-1.125.504-1.125 1.125v11.25c0 .621.504 1.125 1.125 1.125h9.75c.621 0 1.125-.504 1.125-1.125V18.75m-7.5-10.5h6.375c.621 0 1.125.504 1.125 1.125v9.375m-8.25-3 1.5 1.5 3-3.75"})})}},{href:"/stats",label:"Stats",icon:function(e){return(0,n.jsx)("svg",{...e,"aria-hidden":"true",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 13.125C3 12.504 3.504 12 4.125 12h2.25c.621 0 1.125.504 1.125 1.125v6.75C7.5 20.496 6.996 21 6.375 21h-2.25A1.125 1.125 0 0 1 3 19.875v-6.75ZM9.75 8.625c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125v11.25c0 .621-.504 1.125-1.125 1.125h-2.25a1.125 1.125 0 0 1-1.125-1.125V8.625ZM16.5 4.125c0-.621.504-1.125 1.125-1.125h2.25C20.496 3 21 3.504 21 4.125v15.75c0 .621-.504 1.125-1.125 1.125h-2.25a1.125 1.125 0 0 1-1.125-1.125V4.125Z"})})}}]},{label:"Analysis",items:[{href:"/access",label:"Access Control",icon:function(e){return(0,n.jsx)("svg",{...e,"aria-hidden":"true",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.5 10.5V6.75a4.5 4.5 0 1 0-9 0v3.75m-.75 11.25h10.5a2.25 2.25 0 0 0 2.25-2.25v-6.75a2.25 2.25 0 0 0-2.25-2.25H6.75a2.25 2.25 0 0 0-2.25 2.25v6.75a2.25 2.25 0 0 0 2.25 2.25Z"})})}},{href:"/functions",label:"Functions",icon:function(e){return(0,n.jsx)("svg",{...e,"aria-hidden":"true",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M17.25 6.75 22.5 12l-5.25 5.25m-10.5 0L1.5 12l5.25-5.25m7.5-3-4.5 16.5"})})}},{href:"/calls",label:"Ext Calls",icon:function(e){return(0,n.jsx)("svg",{...e,"aria-hidden":"true",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M7.5 21 3 16.5m0 0L7.5 12M3 16.5h13.5m0-13.5L21 7.5m0 0L16.5 12M21 7.5H7.5"})})}}]},{label:"Reasoning",items:[{href:"/conformance",label:"Spec Conformance",icon:function(e){return(0,n.jsx)("svg",{...e,"aria-hidden":"true",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10.125 2.25h-4.5c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125v-9M10.125 2.25h.375a9 9 0 0 1 9 9v.375M10.125 2.25A3.375 3.375 0 0 1 13.5 5.625v1.5c0 .621.504 1.125 1.125 1.125h1.5a3.375 3.375 0 0 1 3.375 3.375"})})}}]},{label:"Visual",items:[{href:"/diagram",label:"Diagram",icon:function(e){return(0,n.jsx)("svg",{...e,"aria-hidden":"true",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M7.5 3.75H6A2.25 2.25 0 0 0 3.75 6v1.5M16.5 3.75H18A2.25 2.25 0 0 1 20.25 6v1.5m0 9V18A2.25 2.25 0 0 1 18 20.25h-1.5m-9 0H6A2.25 2.25 0 0 1 3.75 18v-1.5M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"})})}},{href:"/flows",label:"Flows",icon:function(e){return(0,n.jsx)("svg",{...e,"aria-hidden":"true",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 3v11.25A2.25 2.25 0 0 0 6 16.5h2.25M3.75 3h-1.5m1.5 0h16.5m0 0h1.5m-1.5 0v11.25A2.25 2.25 0 0 1 18 16.5h-2.25m-7.5 0h7.5m-7.5 0-1 3m8.5-3 1 3m0 0 .5 1.5m-.5-1.5h-9.5m0 0-.5 1.5"})})}}]},{label:"Issues",items:[{href:"/issues",label:"Board",icon:function(e){return(0,n.jsx)("svg",{...e,"aria-hidden":"true",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.25 6.75h12M8.25 12h12m-12 5.25h12M3.75 6.75h.007v.008H3.75V6.75Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0ZM3.75 12h.007v.008H3.75V12Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Zm-.375 5.25h.007v.008H3.75v-.008Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Z"})})}}]}];function x(){let{theme:e,setTheme:t}=(0,i.F)(),[r,a]=(0,l.useState)(!1);return((0,l.useEffect)(()=>a(!0),[]),r)?(0,n.jsxs)("button",{type:"button",onClick:()=>t("dark"===e?"light":"dark"),"aria-label":"Switch to ".concat("dark"===e?"light":"dark"," mode"),className:"flex w-full items-center gap-2.5 rounded-md px-3 py-2 text-body text-text-secondary hover:bg-surface-2 hover:text-text-primary",children:[(0,n.jsx)("light"===e?h:m,{className:"h-4 w-4 shrink-0"}),(0,n.jsx)("span",{children:"light"===e?"Light":"Dark"})]}):(0,n.jsx)("div",{className:"h-9"})}function p(e){let{children:t}=e,r=(0,o.usePathname)(),[a,i]=(0,l.useState)(!1);return(0,l.useEffect)(()=>{i(!1)},[r]),(0,n.jsxs)("div",{className:"min-h-screen",children:[(0,n.jsx)("button",{type:"button","aria-label":"Toggle navigation",onClick:()=>i(!a),className:"fixed left-3 top-3 z-[60] flex h-10 w-10 items-center justify-center rounded-md bg-surface-1 border border-border-default text-text-secondary hover:text-text-primary md:hidden",children:(0,n.jsx)(u,{className:"h-5 w-5"})}),a&&(0,n.jsx)("div",{className:"fixed inset-0 z-40 md:hidden",style:{background:"var(--overlay-bg)"},onClick:()=>i(!1)}),(0,n.jsxs)("nav",{"aria-label":"Main navigation",className:"fixed left-0 top-0 z-50 flex h-screen w-[220px] flex-col border-r border-border-subtle bg-surface-1 transition-transform duration-200 ".concat(a?"translate-x-0":"-translate-x-full"," md:translate-x-0"),children:[(0,n.jsx)("div",{className:"px-5 pb-4 pt-6",children:(0,n.jsxs)("div",{className:"flex items-baseline gap-2",children:[(0,n.jsx)("span",{className:"text-title font-semibold text-text-primary",children:"Hex"}),(0,n.jsx)("span",{className:"text-caption text-text-tertiary",children:"v0.4.0"})]})}),(0,n.jsx)("div",{className:"flex-1 overflow-y-auto px-3 pb-4",children:f.map(e=>(0,n.jsxs)("div",{className:"mt-6 first:mt-0",children:[(0,n.jsx)("div",{className:"mb-1.5 px-3 text-caption font-medium text-text-tertiary",children:e.label}),e.items.map(e=>{let t=r===e.href;return(0,n.jsxs)(s(),{href:e.href,"aria-current":t?"page":void 0,className:"group flex items-center gap-2.5 rounded-md px-3 py-2 text-body ".concat(t?"bg-accent-subtle text-accent font-medium":"text-text-secondary hover:bg-surface-2 hover:text-text-primary"),children:[(0,n.jsx)(e.icon,{className:"h-4 w-4 shrink-0"}),(0,n.jsx)("span",{children:e.label})]},e.href)})]},e.label))}),(0,n.jsxs)("div",{className:"border-t border-border-subtle px-3 py-3 space-y-1",children:[(0,n.jsx)(d,{}),(0,n.jsx)(x,{}),(0,n.jsxs)("div",{className:"flex items-center gap-1.5 px-3 py-1 text-caption text-text-tertiary",children:[(0,n.jsx)("kbd",{className:"rounded border border-border-default bg-surface-2 px-1.5 py-0.5 text-[11px]",children:"⌘K"}),(0,n.jsx)("span",{children:"Quick nav"})]})]})]}),(0,n.jsx)("main",{className:"min-h-screen bg-surface-0 p-6 pt-16 md:ml-[220px] md:pt-6",children:(0,n.jsx)("div",{className:"mx-auto max-w-6xl",children:t})})]})}},168:function(e,t,r){"use strict";var n=r(7462);r.o(n,"usePathname")&&r.d(t,{usePathname:function(){return n.usePathname}}),r.o(n,"useRouter")&&r.d(t,{useRouter:function(){return n.useRouter}})},3812:function(){},5256:function(e){e.exports={style:{fontFamily:"'__JetBrains_Mono_3c557b', '__JetBrains_Mono_Fallback_3c557b'",fontStyle:"normal"},className:"__className_3c557b",variable:"__variable_3c557b"}},8414:function(e){e.exports={style:{fontFamily:"'__Manrope_73ee6c', '__Manrope_Fallback_73ee6c'",fontStyle:"normal"},className:"__className_73ee6c",variable:"__variable_73ee6c"}},4595:function(e,t,r){"use strict";r.d(t,{F:function(){return d},ThemeProvider:function(){return u}});var n=r(8078),a=(e,t,r,n,a,s,o,i)=>{let l=document.documentElement,c=["light","dark"];function d(t){(Array.isArray(e)?e:[e]).forEach(e=>{let r="class"===e,n=r&&s?a.map(e=>s[e]||e):a;r?(l.classList.remove(...n),l.classList.add(s&&s[t]?s[t]:t)):l.setAttribute(e,t)}),i&&c.includes(t)&&(l.style.colorScheme=t)}if(n)d(n);else try{let e=localStorage.getItem(t)||r,n=o&&"system"===e?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":e;d(n)}catch(e){}},s=["light","dark"],o="(prefers-color-scheme: dark)",i="undefined"==typeof window,l=n.createContext(void 0),c={setTheme:e=>{},themes:[]},d=()=>{var e;return null!=(e=n.useContext(l))?e:c},u=e=>n.useContext(l)?n.createElement(n.Fragment,null,e.children):n.createElement(m,{...e}),h=["light","dark"],m=e=>{let{forcedTheme:t,disableTransitionOnChange:r=!1,enableSystem:a=!0,enableColorScheme:i=!0,storageKey:c="theme",themes:d=h,defaultTheme:u=a?"system":"light",attribute:m="data-theme",value:b,children:y,nonce:k,scriptProps:g}=e,[j,w]=n.useState(()=>x(c,u)),[L,C]=n.useState(()=>"system"===j?v():j),M=b?Object.values(b):d,N=n.useCallback(e=>{let t=e;if(!t)return;"system"===e&&a&&(t=v());let n=b?b[t]:t,o=r?p(k):null,l=document.documentElement,c=e=>{"class"===e?(l.classList.remove(...M),n&&l.classList.add(n)):e.startsWith("data-")&&(n?l.setAttribute(e,n):l.removeAttribute(e))};if(Array.isArray(m)?m.forEach(c):c(m),i){let e=s.includes(u)?u:null,r=s.includes(t)?t:e;l.style.colorScheme=r}null==o||o()},[k]),_=n.useCallback(e=>{let t="function"==typeof e?e(j):e;w(t);try{localStorage.setItem(c,t)}catch(e){}},[j]),S=n.useCallback(e=>{C(v(e)),"system"===j&&a&&!t&&N("system")},[j,t]);n.useEffect(()=>{let e=window.matchMedia(o);return e.addListener(S),S(e),()=>e.removeListener(S)},[S]),n.useEffect(()=>{let e=e=>{e.key===c&&(e.newValue?w(e.newValue):_(u))};return window.addEventListener("storage",e),()=>window.removeEventListener("storage",e)},[_]),n.useEffect(()=>{N(null!=t?t:j)},[t,j]);let E=n.useMemo(()=>({theme:j,setTheme:_,forcedTheme:t,resolvedTheme:"system"===j?L:j,themes:a?[...d,"system"]:d,systemTheme:a?L:void 0}),[j,_,t,L,a,d]);return n.createElement(l.Provider,{value:E},n.createElement(f,{forcedTheme:t,storageKey:c,attribute:m,enableSystem:a,enableColorScheme:i,defaultTheme:u,value:b,themes:d,nonce:k,scriptProps:g}),y)},f=n.memo(e=>{let{forcedTheme:t,storageKey:r,attribute:s,enableSystem:o,enableColorScheme:i,defaultTheme:l,value:c,themes:d,nonce:u,scriptProps:h}=e,m=JSON.stringify([s,r,l,t,d,c,o,i]).slice(1,-1);return n.createElement("script",{...h,suppressHydrationWarning:!0,nonce:"undefined"==typeof window?u:"",dangerouslySetInnerHTML:{__html:"(".concat(a.toString(),")(").concat(m,")")}})}),x=(e,t)=>{let r;if(!i){try{r=localStorage.getItem(e)||void 0}catch(e){}return r||t}},p=e=>{let t=document.createElement("style");return e&&t.setAttribute("nonce",e),t.appendChild(document.createTextNode("*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(t),()=>{window.getComputedStyle(document.body),setTimeout(()=>{document.head.removeChild(t)},1)}},v=e=>(e||(e=window.matchMedia(o)),e.matches?"dark":"light")}},function(e){e.O(0,[5116,7498,7115,3205,1744],function(){return e(e.s=9640)}),_N_E=e.O()}]);
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3185],{9640:function(e,t,r){Promise.resolve().then(r.t.bind(r,3812,23)),Promise.resolve().then(r.bind(r,2198)),Promise.resolve().then(r.bind(r,1187)),Promise.resolve().then(r.bind(r,4595)),Promise.resolve().then(r.t.bind(r,8414,23)),Promise.resolve().then(r.t.bind(r,5256,23))},2198:function(e,t,r){"use strict";r.d(t,{CommandPalette:function(){return i}});var n=r(7821),a=r(8078),s=r(168);let o=r(1187).p.flatMap(e=>e.items.map(t=>({href:t.href,label:"".concat(e.label," / ").concat(t.label)})));function i(){let[e,t]=(0,a.useState)(!1),[r,i]=(0,a.useState)(""),[l,c]=(0,a.useState)(0),d=(0,a.useRef)(null),u=(0,s.useRouter)(),h=r.trim()?o.filter(e=>e.label.toLowerCase().includes(r.toLowerCase())||e.href.includes(r.toLowerCase())):o;(0,a.useEffect)(()=>{let e=e=>{(e.ctrlKey||e.metaKey)&&"k"===e.key&&(e.preventDefault(),t(e=>!e),i(""),c(0)),"Escape"===e.key&&t(!1)};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[]),(0,a.useEffect)(()=>{e&&setTimeout(()=>{var e;return null===(e=d.current)||void 0===e?void 0:e.focus()},50)},[e]),(0,a.useEffect)(()=>c(0),[r]);let m=e=>{u.push(e),t(!1),i("")};return e?(0,n.jsx)("div",{className:"fixed inset-0 z-[9000] flex items-start justify-center px-4 pt-[12vh]",style:{background:"var(--overlay-bg)"},onClick:()=>t(!1),children:(0,n.jsxs)("div",{role:"dialog","aria-modal":"true","aria-label":"Quick navigation",className:"w-full max-w-lg rounded-lg border border-border-default bg-surface-1 shadow-lg",onClick:e=>e.stopPropagation(),children:[(0,n.jsxs)("div",{className:"flex items-center border-b border-border-default px-4 py-3 gap-2",children:[(0,n.jsx)("span",{className:"text-accent text-body font-medium shrink-0","aria-hidden":"true",children:">"}),(0,n.jsx)("input",{ref:d,type:"text",value:r,onChange:e=>i(e.target.value),placeholder:"search pages...","aria-label":"Search pages",className:"flex-1 bg-transparent text-body text-text-primary placeholder-text-tertiary outline-none",onKeyDown:e=>{"ArrowDown"===e.key?(e.preventDefault(),c(e=>Math.min(e+1,h.length-1))):"ArrowUp"===e.key?(e.preventDefault(),c(e=>Math.max(e-1,0))):"Enter"===e.key&&h[l]?m(h[l].href):"Tab"===e.key&&e.preventDefault()}}),(0,n.jsx)("kbd",{className:"shrink-0 border border-border-default px-1.5 py-0.5 text-caption text-text-tertiary",style:{borderRadius:"var(--radius-sm)"},children:"ESC"})]}),(0,n.jsx)("div",{className:"max-h-72 overflow-y-auto py-1",children:0===h.length?(0,n.jsx)("div",{className:"px-4 py-3 text-body text-text-tertiary",children:"no results"}):h.map((e,t)=>(0,n.jsxs)("button",{type:"button",className:"flex w-full items-center gap-3 px-4 py-2.5 text-left text-body focus-visible:outline focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-accent ".concat(t===l?"bg-accent-subtle text-accent":"text-text-secondary hover:bg-surface-2 hover:text-text-primary"),onClick:()=>m(e.href),onMouseEnter:()=>c(t),children:[(0,n.jsx)("span",{className:"text-text-tertiary text-caption shrink-0",children:t===l?">":" "}),(0,n.jsx)("span",{children:e.label}),(0,n.jsx)("span",{className:"ml-auto text-caption text-text-tertiary shrink-0",children:e.href})]},e.href))})]})}):null}},1187:function(e,t,r){"use strict";r.d(t,{DashboardLayout:function(){return p},p:function(){return f}});var n=r(7821),a=r(7498),s=r.n(a),o=r(168),i=r(4595),l=r(8078);function c(e,t){let r=Math.round((t.getTime()-e.getTime())/1e3);return r<5?"just now":r<60?"".concat(r,"s ago"):r<3600?"".concat(Math.round(r/60),"m ago"):"".concat(Math.round(r/3600),"h ago")}function d(){let e=(0,o.useRouter)(),[t,r]=(0,l.useState)(()=>new Date),[a,s]=(0,l.useState)(!1),[i,d]=(0,l.useState)(()=>new Date),[u,h]=(0,l.useState)(null),m=(0,l.useRef)(null),f=()=>{fetch("/api/github-status",{cache:"no-store"}).then(e=>e.ok?e.json():null).then(e=>{if(e&&"string"==typeof e.last_synced_at){var t;h({repo:null!==(t=e.repo)&&void 0!==t?t:"",last_synced_at:e.last_synced_at})}else h(null)}).catch(()=>h(null))};(0,l.useEffect)(()=>{f();let e=new EventSource("/api/watch");return e.onopen=()=>s(!0),e.onmessage=()=>{r(new Date),f()},e.onerror=()=>s(!1),()=>e.close()},[e]),(0,l.useEffect)(()=>{let e=setInterval(()=>d(new Date),3e4);return()=>clearInterval(e)},[]),(0,l.useEffect)(()=>()=>{m.current&&clearTimeout(m.current)},[]);let x=a?"Updated ".concat(c(t,i)):"Reconnecting…";return(0,n.jsxs)("div",{className:"px-3 py-1 text-caption text-text-tertiary","aria-live":"polite",children:[(0,n.jsxs)("div",{className:"flex items-center gap-2",title:"Last refresh ".concat(t.toLocaleTimeString()).concat(a?"":" — watcher disconnected"),children:[(0,n.jsx)("span",{className:"inline-block h-1.5 w-1.5 rounded-full ".concat(a?"bg-[var(--success)]":"bg-[var(--medium)]"),"aria-hidden":"true"}),(0,n.jsx)("span",{children:x})]}),u&&(0,n.jsxs)("div",{className:"mt-1 flex items-center gap-2",title:"GitHub sync with ".concat(u.repo," at ").concat(new Date(u.last_synced_at).toLocaleTimeString()),children:[(0,n.jsx)("span",{className:"inline-block h-1.5 w-1.5 rounded-full bg-accent","aria-hidden":"true"}),(0,n.jsxs)("span",{children:["GitHub ",c(new Date(u.last_synced_at),i)]})]})]})}function u(e){return(0,n.jsx)("svg",{...e,"aria-hidden":"true",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5"})})}function h(e){return(0,n.jsx)("svg",{...e,"aria-hidden":"true",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 3v2.25m6.364.386-1.591 1.591M21 12h-2.25m-.386 6.364-1.591-1.591M12 18.75V21m-4.773-4.227-1.591 1.591M5.25 12H3m4.227-4.773L5.636 5.636M15.75 12a3.75 3.75 0 1 1-7.5 0 3.75 3.75 0 0 1 7.5 0Z"})})}function m(e){return(0,n.jsx)("svg",{...e,"aria-hidden":"true",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21.752 15.002A9.72 9.72 0 0 1 18 15.75c-5.385 0-9.75-4.365-9.75-9.75 0-1.33.266-2.597.748-3.752A9.753 9.753 0 0 0 3 11.25C3 16.635 7.365 21 12.75 21a9.753 9.753 0 0 0 9.002-5.998Z"})})}let f=[{label:"Recon",items:[{href:"/",label:"Home",icon:function(e){return(0,n.jsx)("svg",{...e,"aria-hidden":"true",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m2.25 12 8.954-8.955a1.126 1.126 0 0 1 1.591 0L21.75 12M4.5 9.75v10.125c0 .621.504 1.125 1.125 1.125H9.75v-4.875c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125V21h4.125c.621 0 1.125-.504 1.125-1.125V9.75M8.25 21h8.25"})})}},{href:"/progress",label:"Progress",icon:function(e){return(0,n.jsx)("svg",{...e,"aria-hidden":"true",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11.35 3.836c-.065.21-.1.433-.1.664 0 .414.336.75.75.75h4.5a.75.75 0 0 0 .75-.75 2.25 2.25 0 0 0-.1-.664m-5.8 0A2.251 2.251 0 0 1 13.5 2.25H15a2.25 2.25 0 0 1 2.15 1.586m-5.8 0c-.376.023-.75.05-1.124.08C9.095 4.01 8.25 4.973 8.25 6.108V8.25m8.9-4.414c.376.023.75.05 1.124.08 1.131.094 1.976 1.057 1.976 2.192V16.5A2.25 2.25 0 0 1 18 18.75h-2.25m-7.5-10.5H4.875c-.621 0-1.125.504-1.125 1.125v11.25c0 .621.504 1.125 1.125 1.125h9.75c.621 0 1.125-.504 1.125-1.125V18.75m-7.5-10.5h6.375c.621 0 1.125.504 1.125 1.125v9.375m-8.25-3 1.5 1.5 3-3.75"})})}},{href:"/stats",label:"Stats",icon:function(e){return(0,n.jsx)("svg",{...e,"aria-hidden":"true",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 13.125C3 12.504 3.504 12 4.125 12h2.25c.621 0 1.125.504 1.125 1.125v6.75C7.5 20.496 6.996 21 6.375 21h-2.25A1.125 1.125 0 0 1 3 19.875v-6.75ZM9.75 8.625c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125v11.25c0 .621-.504 1.125-1.125 1.125h-2.25a1.125 1.125 0 0 1-1.125-1.125V8.625ZM16.5 4.125c0-.621.504-1.125 1.125-1.125h2.25C20.496 3 21 3.504 21 4.125v15.75c0 .621-.504 1.125-1.125 1.125h-2.25a1.125 1.125 0 0 1-1.125-1.125V4.125Z"})})}}]},{label:"Analysis",items:[{href:"/access",label:"Access Control",icon:function(e){return(0,n.jsx)("svg",{...e,"aria-hidden":"true",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.5 10.5V6.75a4.5 4.5 0 1 0-9 0v3.75m-.75 11.25h10.5a2.25 2.25 0 0 0 2.25-2.25v-6.75a2.25 2.25 0 0 0-2.25-2.25H6.75a2.25 2.25 0 0 0-2.25 2.25v6.75a2.25 2.25 0 0 0 2.25 2.25Z"})})}},{href:"/functions",label:"Functions",icon:function(e){return(0,n.jsx)("svg",{...e,"aria-hidden":"true",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M17.25 6.75 22.5 12l-5.25 5.25m-10.5 0L1.5 12l5.25-5.25m7.5-3-4.5 16.5"})})}},{href:"/calls",label:"Ext Calls",icon:function(e){return(0,n.jsx)("svg",{...e,"aria-hidden":"true",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M7.5 21 3 16.5m0 0L7.5 12M3 16.5h13.5m0-13.5L21 7.5m0 0L16.5 12M21 7.5H7.5"})})}}]},{label:"Reasoning",items:[{href:"/conformance",label:"Spec Conformance",icon:function(e){return(0,n.jsx)("svg",{...e,"aria-hidden":"true",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10.125 2.25h-4.5c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125v-9M10.125 2.25h.375a9 9 0 0 1 9 9v.375M10.125 2.25A3.375 3.375 0 0 1 13.5 5.625v1.5c0 .621.504 1.125 1.125 1.125h1.5a3.375 3.375 0 0 1 3.375 3.375"})})}}]},{label:"Visual",items:[{href:"/diagram",label:"Diagram",icon:function(e){return(0,n.jsx)("svg",{...e,"aria-hidden":"true",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M7.5 3.75H6A2.25 2.25 0 0 0 3.75 6v1.5M16.5 3.75H18A2.25 2.25 0 0 1 20.25 6v1.5m0 9V18A2.25 2.25 0 0 1 18 20.25h-1.5m-9 0H6A2.25 2.25 0 0 1 3.75 18v-1.5M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"})})}},{href:"/flows",label:"Flows",icon:function(e){return(0,n.jsx)("svg",{...e,"aria-hidden":"true",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 3v11.25A2.25 2.25 0 0 0 6 16.5h2.25M3.75 3h-1.5m1.5 0h16.5m0 0h1.5m-1.5 0v11.25A2.25 2.25 0 0 1 18 16.5h-2.25m-7.5 0h7.5m-7.5 0-1 3m8.5-3 1 3m0 0 .5 1.5m-.5-1.5h-9.5m0 0-.5 1.5"})})}}]},{label:"Issues",items:[{href:"/issues",label:"Board",icon:function(e){return(0,n.jsx)("svg",{...e,"aria-hidden":"true",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.25 6.75h12M8.25 12h12m-12 5.25h12M3.75 6.75h.007v.008H3.75V6.75Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0ZM3.75 12h.007v.008H3.75V12Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Zm-.375 5.25h.007v.008H3.75v-.008Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Z"})})}}]}];function x(){let{theme:e,setTheme:t}=(0,i.F)(),[r,a]=(0,l.useState)(!1);return((0,l.useEffect)(()=>a(!0),[]),r)?(0,n.jsxs)("button",{type:"button",onClick:()=>t("dark"===e?"light":"dark"),"aria-label":"Switch to ".concat("dark"===e?"light":"dark"," mode"),className:"flex w-full items-center gap-2.5 rounded-md px-3 py-2 text-body text-text-secondary hover:bg-surface-2 hover:text-text-primary",children:[(0,n.jsx)("light"===e?h:m,{className:"h-4 w-4 shrink-0"}),(0,n.jsx)("span",{children:"light"===e?"Light":"Dark"})]}):(0,n.jsx)("div",{className:"h-9"})}function p(e){let{children:t}=e,r=(0,o.usePathname)(),[a,i]=(0,l.useState)(!1);return(0,l.useEffect)(()=>{i(!1)},[r]),(0,n.jsxs)("div",{className:"min-h-screen",children:[(0,n.jsx)("button",{type:"button","aria-label":"Toggle navigation",onClick:()=>i(!a),className:"fixed left-3 top-3 z-[60] flex h-10 w-10 items-center justify-center rounded-md bg-surface-1 border border-border-default text-text-secondary hover:text-text-primary md:hidden",children:(0,n.jsx)(u,{className:"h-5 w-5"})}),a&&(0,n.jsx)("div",{className:"fixed inset-0 z-40 md:hidden",style:{background:"var(--overlay-bg)"},onClick:()=>i(!1)}),(0,n.jsxs)("nav",{"aria-label":"Main navigation",className:"fixed left-0 top-0 z-50 flex h-screen w-[220px] flex-col border-r border-border-subtle bg-surface-1 transition-transform duration-200 ".concat(a?"translate-x-0":"-translate-x-full"," md:translate-x-0"),children:[(0,n.jsx)("div",{className:"px-5 pb-4 pt-6",children:(0,n.jsxs)("div",{className:"flex items-baseline gap-2",children:[(0,n.jsx)("span",{className:"text-title font-semibold text-text-primary",children:"Hex"}),(0,n.jsx)("span",{className:"text-caption text-text-tertiary",children:"v0.4.2"})]})}),(0,n.jsx)("div",{className:"flex-1 overflow-y-auto px-3 pb-4",children:f.map(e=>(0,n.jsxs)("div",{className:"mt-6 first:mt-0",children:[(0,n.jsx)("div",{className:"mb-1.5 px-3 text-caption font-medium text-text-tertiary",children:e.label}),e.items.map(e=>{let t=r===e.href;return(0,n.jsxs)(s(),{href:e.href,"aria-current":t?"page":void 0,className:"group flex items-center gap-2.5 rounded-md px-3 py-2 text-body ".concat(t?"bg-accent-subtle text-accent font-medium":"text-text-secondary hover:bg-surface-2 hover:text-text-primary"),children:[(0,n.jsx)(e.icon,{className:"h-4 w-4 shrink-0"}),(0,n.jsx)("span",{children:e.label})]},e.href)})]},e.label))}),(0,n.jsxs)("div",{className:"border-t border-border-subtle px-3 py-3 space-y-1",children:[(0,n.jsx)(d,{}),(0,n.jsx)(x,{}),(0,n.jsxs)("div",{className:"flex items-center gap-1.5 px-3 py-1 text-caption text-text-tertiary",children:[(0,n.jsx)("kbd",{className:"rounded border border-border-default bg-surface-2 px-1.5 py-0.5 text-[11px]",children:"⌘K"}),(0,n.jsx)("span",{children:"Quick nav"})]})]})]}),(0,n.jsx)("main",{className:"min-h-screen bg-surface-0 p-6 pt-16 md:ml-[220px] md:pt-6",children:(0,n.jsx)("div",{className:"mx-auto max-w-6xl",children:t})})]})}},168:function(e,t,r){"use strict";var n=r(7462);r.o(n,"usePathname")&&r.d(t,{usePathname:function(){return n.usePathname}}),r.o(n,"useRouter")&&r.d(t,{useRouter:function(){return n.useRouter}})},3812:function(){},5256:function(e){e.exports={style:{fontFamily:"'__JetBrains_Mono_3c557b', '__JetBrains_Mono_Fallback_3c557b'",fontStyle:"normal"},className:"__className_3c557b",variable:"__variable_3c557b"}},8414:function(e){e.exports={style:{fontFamily:"'__Manrope_73ee6c', '__Manrope_Fallback_73ee6c'",fontStyle:"normal"},className:"__className_73ee6c",variable:"__variable_73ee6c"}},4595:function(e,t,r){"use strict";r.d(t,{F:function(){return d},ThemeProvider:function(){return u}});var n=r(8078),a=(e,t,r,n,a,s,o,i)=>{let l=document.documentElement,c=["light","dark"];function d(t){(Array.isArray(e)?e:[e]).forEach(e=>{let r="class"===e,n=r&&s?a.map(e=>s[e]||e):a;r?(l.classList.remove(...n),l.classList.add(s&&s[t]?s[t]:t)):l.setAttribute(e,t)}),i&&c.includes(t)&&(l.style.colorScheme=t)}if(n)d(n);else try{let e=localStorage.getItem(t)||r,n=o&&"system"===e?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":e;d(n)}catch(e){}},s=["light","dark"],o="(prefers-color-scheme: dark)",i="undefined"==typeof window,l=n.createContext(void 0),c={setTheme:e=>{},themes:[]},d=()=>{var e;return null!=(e=n.useContext(l))?e:c},u=e=>n.useContext(l)?n.createElement(n.Fragment,null,e.children):n.createElement(m,{...e}),h=["light","dark"],m=e=>{let{forcedTheme:t,disableTransitionOnChange:r=!1,enableSystem:a=!0,enableColorScheme:i=!0,storageKey:c="theme",themes:d=h,defaultTheme:u=a?"system":"light",attribute:m="data-theme",value:b,children:y,nonce:k,scriptProps:g}=e,[j,w]=n.useState(()=>x(c,u)),[L,C]=n.useState(()=>"system"===j?v():j),M=b?Object.values(b):d,N=n.useCallback(e=>{let t=e;if(!t)return;"system"===e&&a&&(t=v());let n=b?b[t]:t,o=r?p(k):null,l=document.documentElement,c=e=>{"class"===e?(l.classList.remove(...M),n&&l.classList.add(n)):e.startsWith("data-")&&(n?l.setAttribute(e,n):l.removeAttribute(e))};if(Array.isArray(m)?m.forEach(c):c(m),i){let e=s.includes(u)?u:null,r=s.includes(t)?t:e;l.style.colorScheme=r}null==o||o()},[k]),_=n.useCallback(e=>{let t="function"==typeof e?e(j):e;w(t);try{localStorage.setItem(c,t)}catch(e){}},[j]),S=n.useCallback(e=>{C(v(e)),"system"===j&&a&&!t&&N("system")},[j,t]);n.useEffect(()=>{let e=window.matchMedia(o);return e.addListener(S),S(e),()=>e.removeListener(S)},[S]),n.useEffect(()=>{let e=e=>{e.key===c&&(e.newValue?w(e.newValue):_(u))};return window.addEventListener("storage",e),()=>window.removeEventListener("storage",e)},[_]),n.useEffect(()=>{N(null!=t?t:j)},[t,j]);let E=n.useMemo(()=>({theme:j,setTheme:_,forcedTheme:t,resolvedTheme:"system"===j?L:j,themes:a?[...d,"system"]:d,systemTheme:a?L:void 0}),[j,_,t,L,a,d]);return n.createElement(l.Provider,{value:E},n.createElement(f,{forcedTheme:t,storageKey:c,attribute:m,enableSystem:a,enableColorScheme:i,defaultTheme:u,value:b,themes:d,nonce:k,scriptProps:g}),y)},f=n.memo(e=>{let{forcedTheme:t,storageKey:r,attribute:s,enableSystem:o,enableColorScheme:i,defaultTheme:l,value:c,themes:d,nonce:u,scriptProps:h}=e,m=JSON.stringify([s,r,l,t,d,c,o,i]).slice(1,-1);return n.createElement("script",{...h,suppressHydrationWarning:!0,nonce:"undefined"==typeof window?u:"",dangerouslySetInnerHTML:{__html:"(".concat(a.toString(),")(").concat(m,")")}})}),x=(e,t)=>{let r;if(!i){try{r=localStorage.getItem(e)||void 0}catch(e){}return r||t}},p=e=>{let t=document.createElement("style");return e&&t.setAttribute("nonce",e),t.appendChild(document.createTextNode("*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(t),()=>{window.getComputedStyle(document.body),setTimeout(()=>{document.head.removeChild(t)},1)}},v=e=>(e||(e=window.matchMedia(o)),e.matches?"dark":"light")}},function(e){e.O(0,[5116,7498,7115,3205,1744],function(){return e(e.s=9640)}),_N_E=e.O()}]);
|
|
@@ -16,8 +16,8 @@ export const dynamic = 'force-dynamic';
|
|
|
16
16
|
|
|
17
17
|
export async function GET() {
|
|
18
18
|
const status = readJsonFile<GithubSyncStatus>('external/github/sync-status.json');
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
return NextResponse.json(status);
|
|
19
|
+
// Returning 200 with a null body so the client can `res.json()` cleanly. A
|
|
20
|
+
// genuine 204 (No Content) is invalid per HTTP spec when paired with any
|
|
21
|
+
// response body, and Node 24's undici throws on the mismatch.
|
|
22
|
+
return NextResponse.json(status ?? null);
|
|
23
23
|
}
|
|
@@ -395,7 +395,7 @@ export function DashboardLayout({ children }: { children: React.ReactNode }) {
|
|
|
395
395
|
<div className="px-5 pb-4 pt-6">
|
|
396
396
|
<div className="flex items-baseline gap-2">
|
|
397
397
|
<span className="text-title font-semibold text-text-primary">Hex</span>
|
|
398
|
-
<span className="text-caption text-text-tertiary">v0.4.
|
|
398
|
+
<span className="text-caption text-text-tertiary">v0.4.2</span>
|
|
399
399
|
</div>
|
|
400
400
|
</div>
|
|
401
401
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update.d.ts","sourceRoot":"","sources":["../../src/commands/update.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAmBpC,eAAO,MAAM,aAAa,
|
|
1
|
+
{"version":3,"file":"update.d.ts","sourceRoot":"","sources":["../../src/commands/update.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAmBpC,eAAO,MAAM,aAAa,SAwDtB,CAAC"}
|
package/dist/commands/update.js
CHANGED
|
@@ -7,7 +7,7 @@ import fs from 'node:fs';
|
|
|
7
7
|
import { logger } from '../core/logger.js';
|
|
8
8
|
import { copySkillsToClaudeFormat, getClaudeSkillsDir } from '../core/skills.js';
|
|
9
9
|
export const updateCommand = new Command('update')
|
|
10
|
-
.description(
|
|
10
|
+
.description('Update hex-audit to the latest version, then re-sync skills in the current project')
|
|
11
11
|
.option('-y, --yes', 'Skip the post-install skill-sync prompt (treat as yes)')
|
|
12
12
|
.option('--check', "Only show current vs latest version, don't install")
|
|
13
13
|
.option('--project <dir>', 'Project directory for the post-install skill sync (default: cwd)')
|
|
@@ -104,7 +104,10 @@ function readCurrentVersion(packageDir) {
|
|
|
104
104
|
}
|
|
105
105
|
function fetchLatestVersion() {
|
|
106
106
|
try {
|
|
107
|
-
return execSync('npm view hex-audit version', {
|
|
107
|
+
return execSync('npm view hex-audit version', {
|
|
108
|
+
encoding: 'utf-8',
|
|
109
|
+
stdio: ['ignore', 'pipe', 'ignore'],
|
|
110
|
+
}).trim();
|
|
108
111
|
}
|
|
109
112
|
catch {
|
|
110
113
|
throw new Error('Could not fetch the latest version from the npm registry. Are you online?');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update.js","sourceRoot":"","sources":["../../src/commands/update.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,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H,CAAC;IAED,MAAM,MAAM,GAAG,wBAAwB,CAAC,EAAE,SAAS,EAAE,eAAe,EAAE,CAAC,CAAC;IACxE,MAAM,KAAK,GAAa,EAAE,CAAC;IAC3B,IAAI,MAAM,CAAC,OAAO,GAAG,CAAC;QAAE,KAAK,CAAC,IAAI,CAAC,YAAY,MAAM,CAAC,OAAO,EAAE,CAAC,CAAC;IACjE,IAAI,MAAM,CAAC,KAAK,GAAG,CAAC;QAAE,KAAK,CAAC,IAAI,CAAC,UAAU,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC;IAC3D,IAAI,MAAM,CAAC,OAAO,GAAG,CAAC;QAAE,KAAK,CAAC,IAAI,CAAC,YAAY,MAAM,CAAC,OAAO,EAAE,CAAC,CAAC;IACjE,MAAM,CAAC,OAAO,CAAC,WAAW,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,YAAY,GAAG,CAAC,CAAC;AACjE,CAAC;AAED,KAAK,UAAU,MAAM,CAAC,QAAgB;IACpC,IAAI,CAAC,KAAK,CAAC,KAAK;QAAE,OAAO,EAAE,CAAC;IAC5B,MAAM,EAAE,GAAG,eAAe,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;IAC7D,IAAI,CAAC;QACH,OAAO,MAAM,EAAE,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;IACrC,CAAC;YAAS,CAAC;QACT,EAAE,CAAC,KAAK,EAAE,CAAC;IACb,CAAC;AACH,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -21,7 +21,7 @@ const program = new Command();
|
|
|
21
21
|
program
|
|
22
22
|
.name('hex')
|
|
23
23
|
.description('CLI toolkit for Solidity smart contract auditors')
|
|
24
|
-
.version('0.4.
|
|
24
|
+
.version('0.4.2');
|
|
25
25
|
program.addCommand(initCommand);
|
|
26
26
|
program.addCommand(statsCommand);
|
|
27
27
|
program.addCommand(depsCommand);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
description:
|
|
2
|
+
description: 'Initialize a Solidity audit project: deterministic analysis + protocol overview + system diagram + flow charts + spec conformance, all in one run'
|
|
3
3
|
---
|
|
4
4
|
|
|
5
5
|
# Skill: Initialize Audit
|
|
@@ -19,6 +19,7 @@ You are setting up a new Solidity audit project with Hex. This single skill repl
|
|
|
19
19
|
### 1.1 Gather information
|
|
20
20
|
|
|
21
21
|
Ask the auditor for:
|
|
22
|
+
|
|
22
23
|
- **Project directory path** — where the client project lives (default: current directory).
|
|
23
24
|
- **Scope** — glob or explicit list of files in audit scope (e.g., `src/core/**/*.sol`).
|
|
24
25
|
- **Commit hash** — the specific commit being audited (default: HEAD).
|
|
@@ -43,6 +44,7 @@ Build scripts and `npm install` hooks are a primary supply-chain attack vector.
|
|
|
43
44
|
**If any build-time threats are found: STOP and warn before compilation.**
|
|
44
45
|
|
|
45
46
|
After build safety passes, evaluate Solidity dependencies:
|
|
47
|
+
|
|
46
48
|
- Identify well-known libs (OpenZeppelin, Solmate, Solady, PRBMath). Flag outdated versions with known advisories (OZ < 4.9.3, Solmate `SafeTransferLib` missing code-size check, etc.).
|
|
47
49
|
- Flag typosquats (`@openzepplin` vs `@openzeppelin`).
|
|
48
50
|
- Flag unused dependencies (in `lib/` or `node_modules/` but not imported by scope files).
|
|
@@ -51,6 +53,7 @@ After build safety passes, evaluate Solidity dependencies:
|
|
|
51
53
|
### 1.3 Initialize and analyze
|
|
52
54
|
|
|
53
55
|
Run:
|
|
56
|
+
|
|
54
57
|
```bash
|
|
55
58
|
npx hex init --project "<path>" --scope "<scope>" --commit <hash> --chain <chain> --docs "<url>"
|
|
56
59
|
npx hex analyze
|
|
@@ -61,6 +64,7 @@ npx hex analyze
|
|
|
61
64
|
## Phase 2 — Protocol overview
|
|
62
65
|
|
|
63
66
|
Read from the output directory (`.hex/`):
|
|
67
|
+
|
|
64
68
|
- `config.json` — project name, scope, chain, docs URL.
|
|
65
69
|
- `stats.json` — contracts, nSLOC, ERCs, dependencies.
|
|
66
70
|
- `deps.json` — contract relationships and clusters.
|
|
@@ -68,6 +72,7 @@ Read from the output directory (`.hex/`):
|
|
|
68
72
|
Run `npx hex context` to load the full codebase. If `config.json.project.docs_url` is set, fetch and read the documentation.
|
|
69
73
|
|
|
70
74
|
Write a 2–3 paragraph overview to `.hex/overview.md` covering:
|
|
75
|
+
|
|
71
76
|
1. **What the protocol does** — purpose, target users, the problem it solves.
|
|
72
77
|
2. **Core mechanism** — deposit/withdraw flows, token economics, governance model.
|
|
73
78
|
3. **Key contracts and their roles** — entry points, state holders, libraries.
|
|
@@ -76,6 +81,7 @@ Write a 2–3 paragraph overview to `.hex/overview.md` covering:
|
|
|
76
81
|
Write for an experienced Solidity auditor. Be precise and technical. Reference specific contract names and functions where relevant.
|
|
77
82
|
|
|
78
83
|
**Do NOT:**
|
|
84
|
+
|
|
79
85
|
- List findings or security concerns (this is purely descriptive).
|
|
80
86
|
- Speculate about vulnerabilities.
|
|
81
87
|
- Include code snippets.
|
|
@@ -91,13 +97,15 @@ Write for an experienced Solidity auditor. Be precise and technical. Reference s
|
|
|
91
97
|
## Key Contracts
|
|
92
98
|
|
|
93
99
|
| Contract | Type | nSLOC | Role |
|
|
94
|
-
|
|
95
|
-
| ...
|
|
100
|
+
| -------- | ---- | ----- | ---- |
|
|
101
|
+
| ... | ... | ... | ... |
|
|
96
102
|
|
|
97
103
|
## External Dependencies
|
|
104
|
+
|
|
98
105
|
- [Package] v[version] — used for [purpose]
|
|
99
106
|
|
|
100
107
|
## Architecture Notes
|
|
108
|
+
|
|
101
109
|
- [Notable design decisions, patterns, or concerns to keep in mind during review]
|
|
102
110
|
```
|
|
103
111
|
|
|
@@ -132,10 +140,12 @@ Write a Mermaid `graph TD` diagram to `.hex/diagrams/diagram.mmd`. Constraints:
|
|
|
132
140
|
Same context as Phase 3, plus `.hex/external-calls.json`.
|
|
133
141
|
|
|
134
142
|
For each archetype, generate at minimum:
|
|
143
|
+
|
|
135
144
|
- **Value Flow** — how tokens/ETH move (deposits, withdrawals, fees, swaps).
|
|
136
145
|
- **Permission Flow** — who can do what; role grant/revoke; admin operations.
|
|
137
146
|
|
|
138
147
|
Archetype-specific flows (only generate when the archetype is detected):
|
|
148
|
+
|
|
139
149
|
- **Vault**: deposit/mint, withdraw/redeem, strategy allocation, fee collection.
|
|
140
150
|
- **Lending**: borrow, repay, liquidation (health check → liquidation → seizure → bad debt).
|
|
141
151
|
- **Governance**: proposal lifecycle (create → vote → queue → execute), delegation.
|
|
@@ -167,26 +177,31 @@ Cross-reference four sources:
|
|
|
167
177
|
**5.1 External documentation.** Fetch `config.json.project.docs_url`. Extract every behavioral claim ("users can deposit X and receive Y", "fees capped at 10%", "only admin can pause"). For each claim, find the implementing code and verify match.
|
|
168
178
|
|
|
169
179
|
**5.2 NatSpec.** For every function with `@notice`/`@dev`/`@param`/`@return`:
|
|
180
|
+
|
|
170
181
|
- Does the function actually do what `@notice` says?
|
|
171
182
|
- Are `@param` constraints accurate?
|
|
172
183
|
- Does it return what `@return` claims?
|
|
173
184
|
- Pay extra attention to conditional NatSpec ("reverts if…", "only when…").
|
|
174
185
|
|
|
175
186
|
**5.3 Interface conformance.** For every interface the contract implements (explicit `is IFoo` or implicit):
|
|
187
|
+
|
|
176
188
|
- All interface functions implemented?
|
|
177
189
|
- Behavioral semantics of each function respected?
|
|
178
190
|
|
|
179
191
|
**5.4 ERC/EIP compliance.** For each ERC/EIP in `stats.json.erc_eip_usage`:
|
|
192
|
+
|
|
180
193
|
- **Fetch the canonical spec** via WebFetch from `https://eips.ethereum.org/EIPS/eip-<number>`. If the fetch fails, note `"spec_fetched": false` and fall back to training knowledge.
|
|
181
194
|
- Extract every MUST/SHOULD/MAY requirement into a checklist; verify each against the implementation.
|
|
182
195
|
|
|
183
196
|
Known gotchas:
|
|
197
|
+
|
|
184
198
|
- **ERC-20**: return values on transfer/approve, zero-amount transfers, approval race.
|
|
185
|
-
- **ERC-4626**: rounding direction per spec, preview vs actual, max
|
|
199
|
+
- **ERC-4626**: rounding direction per spec, preview vs actual, max\* return values.
|
|
186
200
|
- **ERC-721**: safeTransferFrom callbacks.
|
|
187
201
|
- **ERC-2612**: permit deadline, nonce handling, domain separator chain ID.
|
|
188
202
|
|
|
189
203
|
**Weird token compat.** For every contract interacting with ERC-20 tokens (check `attack-surface.json.token_interactions`), classify handling of:
|
|
204
|
+
|
|
190
205
|
- Fee-on-transfer (balance-diff accounting vs trusting transfer amount).
|
|
191
206
|
- Rebasing (shares vs absolute balances; stale balance caches).
|
|
192
207
|
- Blocklist (DoS via blocked recipient in batches/loops; liquidation/withdrawal block).
|
|
@@ -244,6 +259,7 @@ These appear on the dashboard's Issues board as Potential cards immediately. The
|
|
|
244
259
|
## Phase 7 — Report and auto-launch the dashboard
|
|
245
260
|
|
|
246
261
|
Summarize:
|
|
262
|
+
|
|
247
263
|
- Files / contracts in scope, total nSLOC.
|
|
248
264
|
- Number of external/public functions, state variables.
|
|
249
265
|
- Number of conformance DEVIATES/PARTIAL items materialized to the board.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hex-audit",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "CLI toolkit for Solidity smart contract auditors",
|
|
6
6
|
"bin": {
|
|
@@ -13,6 +13,8 @@
|
|
|
13
13
|
"build:cli": "tsc && npm run copy-skills",
|
|
14
14
|
"build:dashboard": "next build dashboard",
|
|
15
15
|
"copy-skills": "node -e \"const fs=require('fs');const p=require('path');fs.cpSync(p.join('src','skills'),p.join('dist','skills'),{recursive:true})\"",
|
|
16
|
+
"clean:next-cache": "node -e \"const fs=require('fs');for (const d of ['dashboard/.next/cache','dashboard/.next/trace','dashboard/.next/types']) fs.rmSync(d,{recursive:true,force:true})\"",
|
|
17
|
+
"prepack": "npm run build && npm run clean:next-cache",
|
|
16
18
|
"dev:cli": "tsc --watch",
|
|
17
19
|
"dev:dashboard": "next dev dashboard",
|
|
18
20
|
"test": "vitest run",
|