hex-audit 0.5.5 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (77) hide show
  1. package/DEMO.md +20 -17
  2. package/README.md +25 -22
  3. package/dashboard/.next/BUILD_ID +1 -1
  4. package/dashboard/.next/app-build-manifest.json +20 -20
  5. package/dashboard/.next/app-path-routes-manifest.json +1 -1
  6. package/dashboard/.next/build-manifest.json +4 -4
  7. package/dashboard/.next/next-server.js.nft.json +1 -1
  8. package/dashboard/.next/prerender-manifest.js +1 -1
  9. package/dashboard/.next/prerender-manifest.json +1 -1
  10. package/dashboard/.next/routes-manifest.json +1 -1
  11. package/dashboard/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  12. package/dashboard/.next/server/app/_not-found.html +1 -1
  13. package/dashboard/.next/server/app/_not-found.rsc +4 -4
  14. package/dashboard/.next/server/app/access/page_client-reference-manifest.js +1 -1
  15. package/dashboard/.next/server/app/calls/page_client-reference-manifest.js +1 -1
  16. package/dashboard/.next/server/app/conformance/page_client-reference-manifest.js +1 -1
  17. package/dashboard/.next/server/app/diagram/page_client-reference-manifest.js +1 -1
  18. package/dashboard/.next/server/app/diagram.html +1 -1
  19. package/dashboard/.next/server/app/diagram.rsc +4 -4
  20. package/dashboard/.next/server/app/flows/page_client-reference-manifest.js +1 -1
  21. package/dashboard/.next/server/app/flows.html +1 -1
  22. package/dashboard/.next/server/app/flows.rsc +4 -4
  23. package/dashboard/.next/server/app/functions/page_client-reference-manifest.js +1 -1
  24. package/dashboard/.next/server/app/issues/page.js +5 -5
  25. package/dashboard/.next/server/app/issues/page_client-reference-manifest.js +1 -1
  26. package/dashboard/.next/server/app/notes/page_client-reference-manifest.js +1 -1
  27. package/dashboard/.next/server/app/page_client-reference-manifest.js +1 -1
  28. package/dashboard/.next/server/app/progress/page_client-reference-manifest.js +1 -1
  29. package/dashboard/.next/server/app/report/page.js +1 -0
  30. package/dashboard/.next/server/app/report/page_client-reference-manifest.js +1 -0
  31. package/dashboard/.next/server/app/stats/page_client-reference-manifest.js +1 -1
  32. package/dashboard/.next/server/app-paths-manifest.json +8 -8
  33. package/dashboard/.next/server/chunks/42.js +1 -1
  34. package/dashboard/.next/server/chunks/530.js +1 -1
  35. package/dashboard/.next/server/functions-config-manifest.json +1 -1
  36. package/dashboard/.next/server/middleware-build-manifest.js +1 -1
  37. package/dashboard/.next/server/pages/404.html +1 -1
  38. package/dashboard/.next/server/pages/500.html +1 -1
  39. package/dashboard/.next/server/server-reference-manifest.js +1 -1
  40. package/dashboard/.next/server/server-reference-manifest.json +1 -1
  41. package/dashboard/.next/static/chunks/app/issues/page-98a298e1c1045c91.js +1 -0
  42. package/dashboard/.next/static/chunks/app/{layout-a95b696089e278c3.js → layout-49f2496c7637d931.js} +1 -1
  43. package/dashboard/.next/static/chunks/app/report/page-796f2f4a8a5ac8f7.js +1 -0
  44. package/dashboard/.next/static/chunks/{main-9a811c95265dbd11.js → main-63ff429eab01f5bf.js} +1 -1
  45. package/dashboard/app/issues/IssuesBoardClient.tsx +19 -3
  46. package/dashboard/app/{overleaf/OverleafClient.tsx → report/ReportClient.tsx} +15 -7
  47. package/dashboard/app/report/page.tsx +35 -0
  48. package/dashboard/components/DashboardLayout.tsx +1 -1
  49. package/dist/commands/init.js +4 -4
  50. package/dist/commands/init.js.map +1 -1
  51. package/dist/commands/issue.js +2 -2
  52. package/dist/commands/issue.js.map +1 -1
  53. package/dist/core/issues.d.ts +1 -1
  54. package/dist/core/issues.d.ts.map +1 -1
  55. package/dist/core/issues.js +2 -1
  56. package/dist/core/issues.js.map +1 -1
  57. package/dist/core/schema.d.ts +14 -0
  58. package/dist/core/schema.d.ts.map +1 -1
  59. package/dist/core/schema.js +2 -0
  60. package/dist/core/schema.js.map +1 -1
  61. package/dist/skills/diane.md +1 -1
  62. package/dist/skills/{generate-overleaf.md → generate-report.md} +186 -32
  63. package/dist/skills/ingest-aa-report.md +2 -2
  64. package/dist/skills/init-audit.md +2 -2
  65. package/dist/skills/sync-issues.md +1 -1
  66. package/dist/skills/validate-all-findings.md +24 -10
  67. package/dist/skills/{validate-issue.md → validate-finding.md} +72 -26
  68. package/dist/skills/write-finding.md +3 -3
  69. package/package.json +2 -2
  70. package/dashboard/.next/server/app/overleaf/page.js +0 -1
  71. package/dashboard/.next/server/app/overleaf/page_client-reference-manifest.js +0 -1
  72. package/dashboard/.next/static/chunks/app/issues/page-72089090c04e96ee.js +0 -1
  73. package/dashboard/.next/static/chunks/app/overleaf/page-bcea12a80c97b92f.js +0 -1
  74. package/dashboard/app/overleaf/page.tsx +0 -32
  75. /package/dashboard/.next/server/app/{overleaf → report}/page.js.nft.json +0 -0
  76. /package/dashboard/.next/static/{ZvCvC4cMbL3GR8kloB9OJ → hU4ffTc1ImuXgNi8GX6_t}/_buildManifest.js +0 -0
  77. /package/dashboard/.next/static/{ZvCvC4cMbL3GR8kloB9OJ → hU4ffTc1ImuXgNi8GX6_t}/_ssgManifest.js +0 -0
@@ -6,7 +6,7 @@ description: "Write a manual issue as a Potential card on the board (pending val
6
6
 
7
7
  **Recommended model:** Sonnet
8
8
 
9
- This skill records a manual issue that the auditor has spotted during review. The issue lands on the dashboard's Issues board as a **Potential** card with `status: "pending_validation"` and `source: "manual"`. The auditor promotes it to Verified later (via drag-drop on the board, or by running `/validate-issue <id>` which produces a validation memo and optional PoC).
9
+ This skill records a manual issue that the auditor has spotted during review. The issue lands on the dashboard's Issues board as a **Potential** card with `status: "pending_validation"` and `source: "manual"`. The auditor promotes it to Verified later (via drag-drop on the board, or by running `/validate-finding <id>` which produces a validation memo and optional PoC).
10
10
 
11
11
  ## Context Assembly
12
12
 
@@ -140,8 +140,8 @@ There is **no source-file annotation** — Hex does not write `@audit-issue` com
140
140
 
141
141
  The finding appears on the dashboard's `/issues` board as a Potential card (`H-NNN`). The auditor can:
142
142
 
143
- - Run `/validate-issue <id>` to write a validation memo and optionally generate a PoC; on success the card moves to Verified.
143
+ - Run `/validate-finding <id>` to write a validation memo and optionally generate a PoC; on success the card moves to Verified.
144
144
  - Drag the card from Potential → Verified on the board if no PoC is needed (e.g., trivial Info-level issues).
145
145
  - Run `/sync-issues` (once findings are Verified and `settings.github.repo` is set) to push them to GitHub.
146
146
 
147
- Do NOT run `/validate-issue` or `/sync-issues` automatically — those are auditor-driven.
147
+ Do NOT run `/validate-finding` or `/sync-issues` automatically — those are auditor-driven.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hex-audit",
3
- "version": "0.5.5",
3
+ "version": "0.6.0",
4
4
  "type": "module",
5
5
  "description": "CLI toolkit for Solidity smart contract auditors",
6
6
  "bin": {
@@ -12,7 +12,7 @@
12
12
  "build": "tsc && npm run copy-skills && npm run build:dashboard",
13
13
  "build:cli": "tsc && npm run copy-skills",
14
14
  "build:dashboard": "next build dashboard",
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})\"",
15
+ "copy-skills": "node -e \"const fs=require('fs');const p=require('path');const d=p.join('dist','skills');fs.rmSync(d,{recursive:true,force:true});fs.cpSync(p.join('src','skills'),d,{recursive:true})\"",
16
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
17
  "prepack": "npm run build && npm run clean:next-cache",
18
18
  "dev:cli": "tsc --watch",
@@ -1 +0,0 @@
1
- (()=>{var e={};e.id=529,e.ids=[529],e.modules={7849:e=>{"use strict";e.exports=require("next/dist/client/components/action-async-storage.external")},2934:e=>{"use strict";e.exports=require("next/dist/client/components/action-async-storage.external.js")},5403:e=>{"use strict";e.exports=require("next/dist/client/components/request-async-storage.external")},4580:e=>{"use strict";e.exports=require("next/dist/client/components/request-async-storage.external.js")},4749:e=>{"use strict";e.exports=require("next/dist/client/components/static-generation-async-storage.external")},5869:e=>{"use strict";e.exports=require("next/dist/client/components/static-generation-async-storage.external.js")},399:e=>{"use strict";e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},7561:e=>{"use strict";e.exports=require("node:fs")},9411:e=>{"use strict";e.exports=require("node:path")},1017:e=>{"use strict";e.exports=require("path")},7310:e=>{"use strict";e.exports=require("url")},7547:(e,t,r)=>{"use strict";r.r(t),r.d(t,{GlobalError:()=>i.a,__next_app__:()=>x,originalPathname:()=>u,pages:()=>c,routeModule:()=>m,tree:()=>d}),r(4636),r(819),r(2874);var a=r(7105),s=r(5265),n=r(157),i=r.n(n),o=r(4665),l={};for(let e in o)0>["default","tree","pages","GlobalError","originalPathname","__next_app__","routeModule"].indexOf(e)&&(l[e]=()=>o[e]);r.d(t,l);let d=["",{children:["overleaf",{children:["__PAGE__",{},{page:[()=>Promise.resolve().then(r.bind(r,4636)),"/home/dx/Work/hex/dashboard/app/overleaf/page.tsx"]}]},{metadata:{icon:[async e=>(await Promise.resolve().then(r.bind(r,2950))).default(e)],apple:[],openGraph:[],twitter:[],manifest:void 0}}]},{layout:[()=>Promise.resolve().then(r.bind(r,819)),"/home/dx/Work/hex/dashboard/app/layout.tsx"],"not-found":[()=>Promise.resolve().then(r.t.bind(r,2874,23)),"next/dist/client/components/not-found-error"],metadata:{icon:[async e=>(await Promise.resolve().then(r.bind(r,2950))).default(e)],apple:[],openGraph:[],twitter:[],manifest:void 0}}],c=["/home/dx/Work/hex/dashboard/app/overleaf/page.tsx"],u="/overleaf/page",x={require:r,loadChunk:()=>Promise.resolve()},m=new a.AppPageRouteModule({definition:{kind:s.x.APP_PAGE,page:"/overleaf/page",pathname:"/overleaf",bundlePath:"",filename:"",appPaths:[]},userland:{loaderTree:d}})},6178:(e,t,r)=>{Promise.resolve().then(r.bind(r,6131))},6131:(e,t,r)=>{"use strict";r.d(t,{OverleafClient:()=>i});var a=r(9899),s=r(5507);let n=[{key:"executive_summary",label:"Executive Summary",file:"executive_summary.txt"},{key:"audited_files",label:"Audited Files",file:"audited_files.txt"},{key:"summary_of_findings",label:"Summary of Issues",file:"summary_of_findings.txt"},{key:"findings",label:"Issues",file:"findings.txt"}];function i({sections:e}){let[t,r]=(0,s.useState)("executive_summary"),[i,o]=(0,s.useState)(!1),l=e[t],d=async()=>{if(l)try{await navigator.clipboard.writeText(l),o(!0),setTimeout(()=>o(!1),1500)}catch{}};return(0,a.jsxs)("div",{children:[(0,a.jsxs)("header",{className:"mb-6",children:[a.jsx("h1",{className:"text-title font-semibold text-text-primary",children:"Overleaf"}),(0,a.jsxs)("p",{className:"mt-1 text-body text-text-secondary",children:["LaTeX report sections from ",a.jsx("span",{className:"font-mono text-caption",children:".hex/overleaf/"}),". Copy each into the matching slot of the Nethermind Overleaf template."]})]}),a.jsx("div",{className:"mb-4 flex flex-wrap gap-1.5",children:n.map(s=>{let n=s.key===t,i=!!e[s.key];return a.jsx("button",{type:"button",onClick:()=>r(s.key),className:`rounded-md px-3 py-1.5 text-caption font-medium ${n?"bg-accent text-surface-0":"bg-surface-2 text-text-secondary hover:text-text-primary"} ${i?"":"opacity-50"}`,children:s.label},s.key)})}),(0,a.jsxs)("div",{className:"rounded-lg border border-border-subtle bg-surface-1",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between border-b border-border-subtle px-4 py-2.5",children:[a.jsx("span",{className:"font-mono text-caption text-text-tertiary",children:n.find(e=>e.key===t)?.file}),a.jsx("button",{type:"button",onClick:d,disabled:!l,className:"rounded-md border border-border-default px-2.5 py-1 text-caption text-text-secondary hover:bg-surface-2 hover:text-text-primary disabled:opacity-50",children:i?"Copied!":"Copy"})]}),l?a.jsx("pre",{className:"max-h-[70vh] overflow-auto p-4 font-mono text-caption leading-relaxed text-text-secondary whitespace-pre-wrap break-words",children:l}):(0,a.jsxs)("p",{className:"p-4 text-body text-text-tertiary",children:["This section has not been generated yet. Run"," ",a.jsx("span",{className:"font-mono text-caption",children:"/generate-overleaf"}),"."]})]})]})}},4636:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>x,dynamic:()=>u});var a=r(5023),s=r(1720),n=r(446),i=r(2772);let o=(0,i.createProxy)(String.raw`/home/dx/Work/hex/dashboard/app/overleaf/OverleafClient.tsx`),{__esModule:l,$$typeof:d}=o;o.default;let c=(0,i.createProxy)(String.raw`/home/dx/Work/hex/dashboard/app/overleaf/OverleafClient.tsx#OverleafClient`),u="force-dynamic";function x(){let e={executive_summary:(0,s.ws)("overleaf/executive_summary.txt"),audited_files:(0,s.ws)("overleaf/audited_files.txt"),summary_of_findings:(0,s.ws)("overleaf/summary_of_findings.txt"),findings:(0,s.ws)("overleaf/findings.txt")};return Object.values(e).some(Boolean)?a.jsx(c,{sections:e}):(0,a.jsxs)("div",{children:[(0,a.jsxs)("header",{className:"mb-6",children:[a.jsx("h1",{className:"text-title font-semibold text-text-primary",children:"Overleaf"}),a.jsx("p",{className:"mt-1 text-body text-text-secondary",children:"LaTeX report sections, ready to paste into the Nethermind Overleaf template."})]}),a.jsx(n.v,{command:"/generate-overleaf"})]})}},446:(e,t,r)=>{"use strict";r.d(t,{v:()=>s});var a=r(5023);function s({command:e}){return(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center border border-dashed border-border-default bg-surface-1 px-sp-5 py-sp-8 text-center",style:{borderRadius:"var(--radius-sm)"},children:[a.jsx("svg",{className:"mb-4 h-12 w-12 text-text-tertiary",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 14.25v-2.625a3.375 3.375 0 0 0-3.375-3.375h-1.5A1.125 1.125 0 0 1 13.5 7.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H8.25m6.75 12H9.75m3 0H9.75m0 0v3m-3-6h1.5m-1.5 0v3m6-6h.008v.008H15V9.75Z"})}),a.jsx("h3",{className:"mb-2 text-heading font-medium text-text-primary",children:"Data not yet generated"}),a.jsx("p",{className:"mb-4 text-body text-text-secondary",children:"Run the following command to generate this data:"}),a.jsx("code",{className:"border border-border-default bg-surface-0 px-sp-4 py-sp-2 font-mono text-body text-accent",style:{borderRadius:"var(--radius-sm)"},children:e})]})}},1720:(e,t,r)=>{"use strict";r.d(t,{ki:()=>m,ZN:()=>p,J1:()=>f,gn:()=>c,ws:()=>u,V9:()=>h,au:()=>x});var a=r(7561),s=r.n(a),n=r(9411),i=r.n(n);let o=[".hex",".solaudit","solaudit-output"];function l(e){return e.replace(/\\/g,"/")}function d(){try{let e=function(e=process.cwd()){let t=i().resolve(e);for(;;){let e=function(e){for(let t of[...o.map(t=>i().join(e,t,"config.json")),i().join(e,"config.json")])if(s().existsSync(t))return l(t);return null}(t);if(e)return l(i().dirname(e));let r=i().dirname(t);if(r===t)return null;t=r}}(process.cwd());if(e)return e}catch{}return i().join(process.cwd(),".hex")}function c(e){try{let t=i().join(d(),e),r=s().readFileSync(t,"utf-8");return JSON.parse(r)}catch{return null}}function u(e){try{let t=i().join(d(),e);return s().readFileSync(t,"utf-8")}catch{return null}}function x(e,t){let r=i().join(d(),e);s().writeFileSync(r,JSON.stringify(t,null,2),"utf-8")}function m(e){try{let t=i().join(d(),e);return s().existsSync(t)}catch{return!1}}function p(){return d()}function f(e){try{let t=i().join(d(),e);if(!s().existsSync(t))return[];return s().readdirSync(t,{withFileTypes:!0}).filter(e=>e.isDirectory()).map(e=>e.name)}catch{return[]}}function h(e){try{let t=i().join(d(),e),r=s().readFileSync(t,"utf-8");return JSON.parse(r)}catch{return null}}},2950:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>s});var a=r(1645);let s=e=>[{type:"image/svg+xml",sizes:"any",url:(0,a.fillMetadataSegment)(".",e.params,"icon.svg")+"?83fa4bf1ef0d214d"}]}};var t=require("../../webpack-runtime.js");t.C(e);var r=e=>t(t.s=e),a=t.X(0,[916,649,645,530],()=>r(7547));module.exports=a})();
@@ -1 +0,0 @@
1
- globalThis.__RSC_MANIFEST=(globalThis.__RSC_MANIFEST||{});globalThis.__RSC_MANIFEST["/overleaf/page"]={"moduleLoading":{"prefix":"/_next/","crossOrigin":null},"ssrModuleMapping":{"9":{"*":{"id":"6131","name":"*","chunks":[],"async":false}},"1076":{"*":{"id":"9323","name":"*","chunks":[],"async":false}},"1187":{"*":{"id":"7918","name":"*","chunks":[],"async":false}},"1447":{"*":{"id":"5915","name":"*","chunks":[],"async":false}},"2024":{"*":{"id":"2857","name":"*","chunks":[],"async":false}},"2198":{"*":{"id":"9915","name":"*","chunks":[],"async":false}},"3297":{"*":{"id":"1611","name":"*","chunks":[],"async":false}},"3362":{"*":{"id":"5289","name":"*","chunks":[],"async":false}},"3443":{"*":{"id":"7406","name":"*","chunks":[],"async":false}},"3719":{"*":{"id":"526","name":"*","chunks":[],"async":false}},"4595":{"*":{"id":"1388","name":"*","chunks":[],"async":false}},"5268":{"*":{"id":"3817","name":"*","chunks":[],"async":false}},"5276":{"*":{"id":"820","name":"*","chunks":[],"async":false}},"7063":{"*":{"id":"618","name":"*","chunks":[],"async":false}},"7498":{"*":{"id":"696","name":"*","chunks":[],"async":false}},"7542":{"*":{"id":"9555","name":"*","chunks":[],"async":false}},"7701":{"*":{"id":"8530","name":"*","chunks":[],"async":false}},"7780":{"*":{"id":"8664","name":"*","chunks":[],"async":false}},"9487":{"*":{"id":"6844","name":"*","chunks":[],"async":false}},"9690":{"*":{"id":"2204","name":"*","chunks":[],"async":false}},"9745":{"*":{"id":"4136","name":"*","chunks":[],"async":false}},"9922":{"*":{"id":"8033","name":"*","chunks":[],"async":false}}},"edgeSSRModuleMapping":{},"clientModules":{"/home/dx/Work/hex/node_modules/next/dist/client/components/app-router.js":{"id":5268,"name":"*","chunks":[],"async":false},"/home/dx/Work/hex/node_modules/next/dist/esm/client/components/app-router.js":{"id":5268,"name":"*","chunks":[],"async":false},"/home/dx/Work/hex/node_modules/next/dist/client/components/client-page.js":{"id":1076,"name":"*","chunks":[],"async":false},"/home/dx/Work/hex/node_modules/next/dist/esm/client/components/client-page.js":{"id":1076,"name":"*","chunks":[],"async":false},"/home/dx/Work/hex/node_modules/next/dist/client/components/error-boundary.js":{"id":9690,"name":"*","chunks":[],"async":false},"/home/dx/Work/hex/node_modules/next/dist/esm/client/components/error-boundary.js":{"id":9690,"name":"*","chunks":[],"async":false},"/home/dx/Work/hex/node_modules/next/dist/client/components/layout-router.js":{"id":5276,"name":"*","chunks":[],"async":false},"/home/dx/Work/hex/node_modules/next/dist/esm/client/components/layout-router.js":{"id":5276,"name":"*","chunks":[],"async":false},"/home/dx/Work/hex/node_modules/next/dist/client/components/not-found-boundary.js":{"id":1447,"name":"*","chunks":[],"async":false},"/home/dx/Work/hex/node_modules/next/dist/esm/client/components/not-found-boundary.js":{"id":1447,"name":"*","chunks":[],"async":false},"/home/dx/Work/hex/node_modules/next/dist/client/components/render-from-template-context.js":{"id":3297,"name":"*","chunks":[],"async":false},"/home/dx/Work/hex/node_modules/next/dist/esm/client/components/render-from-template-context.js":{"id":3297,"name":"*","chunks":[],"async":false},"/home/dx/Work/hex/dashboard/app/globals.css":{"id":3812,"name":"*","chunks":["7498","static/chunks/7498-ea83cb9e30ec5491.js","3185","static/chunks/app/layout-a95b696089e278c3.js"],"async":false},"/home/dx/Work/hex/dashboard/components/CommandPalette.tsx":{"id":2198,"name":"*","chunks":["7498","static/chunks/7498-ea83cb9e30ec5491.js","3185","static/chunks/app/layout-a95b696089e278c3.js"],"async":false},"/home/dx/Work/hex/dashboard/components/DashboardLayout.tsx":{"id":1187,"name":"*","chunks":["7498","static/chunks/7498-ea83cb9e30ec5491.js","3185","static/chunks/app/layout-a95b696089e278c3.js"],"async":false},"/home/dx/Work/hex/node_modules/next-themes/dist/index.mjs":{"id":4595,"name":"*","chunks":["7498","static/chunks/7498-ea83cb9e30ec5491.js","3185","static/chunks/app/layout-a95b696089e278c3.js"],"async":false},"/home/dx/Work/hex/node_modules/next/font/google/target.css?{\"path\":\"app/layout.tsx\",\"import\":\"Manrope\",\"arguments\":[{\"subsets\":[\"latin\"],\"variable\":\"--font-sans\",\"display\":\"swap\"}],\"variableName\":\"manrope\"}":{"id":8414,"name":"*","chunks":["7498","static/chunks/7498-ea83cb9e30ec5491.js","3185","static/chunks/app/layout-a95b696089e278c3.js"],"async":false},"/home/dx/Work/hex/node_modules/next/font/google/target.css?{\"path\":\"app/layout.tsx\",\"import\":\"JetBrains_Mono\",\"arguments\":[{\"subsets\":[\"latin\"],\"variable\":\"--font-mono\",\"display\":\"swap\"}],\"variableName\":\"jetbrainsMono\"}":{"id":5256,"name":"*","chunks":["7498","static/chunks/7498-ea83cb9e30ec5491.js","3185","static/chunks/app/layout-a95b696089e278c3.js"],"async":false},"/home/dx/Work/hex/dashboard/app/diagram/page.tsx":{"id":3719,"name":"*","chunks":[],"async":false},"/home/dx/Work/hex/dashboard/app/flows/page.tsx":{"id":3443,"name":"*","chunks":[],"async":false},"/home/dx/Work/hex/dashboard/app/access/AccessClient.tsx":{"id":9745,"name":"*","chunks":[],"async":false},"/home/dx/Work/hex/dashboard/app/calls/CallsClient.tsx":{"id":3362,"name":"*","chunks":[],"async":false},"/home/dx/Work/hex/dashboard/app/notes/NotesClient.tsx":{"id":2024,"name":"*","chunks":[],"async":false},"/home/dx/Work/hex/dashboard/app/conformance/ConformanceTable.tsx":{"id":7542,"name":"*","chunks":[],"async":false},"/home/dx/Work/hex/dashboard/app/overleaf/OverleafClient.tsx":{"id":9,"name":"*","chunks":["529","static/chunks/app/overleaf/page-bcea12a80c97b92f.js"],"async":false},"/home/dx/Work/hex/dashboard/app/stats/StatsClient.tsx":{"id":9922,"name":"*","chunks":[],"async":false},"/home/dx/Work/hex/dashboard/app/functions/FunctionsClient.tsx":{"id":7780,"name":"*","chunks":[],"async":false},"/home/dx/Work/hex/dashboard/app/progress/ProgressClient.tsx":{"id":7701,"name":"*","chunks":[],"async":false},"/home/dx/Work/hex/dashboard/components/MarkdownRenderer.tsx":{"id":9487,"name":"*","chunks":["7397","static/chunks/7397-f6f4dddc7a20bfc1.js","7498","static/chunks/7498-ea83cb9e30ec5491.js","1931","static/chunks/app/page-24bac51dfe007c66.js"],"async":false},"/home/dx/Work/hex/node_modules/next/dist/client/link.js":{"id":7498,"name":"*","chunks":["7397","static/chunks/7397-f6f4dddc7a20bfc1.js","7498","static/chunks/7498-ea83cb9e30ec5491.js","1931","static/chunks/app/page-24bac51dfe007c66.js"],"async":false},"/home/dx/Work/hex/node_modules/next/dist/esm/client/link.js":{"id":7498,"name":"*","chunks":["7397","static/chunks/7397-f6f4dddc7a20bfc1.js","7498","static/chunks/7498-ea83cb9e30ec5491.js","1931","static/chunks/app/page-24bac51dfe007c66.js"],"async":false},"/home/dx/Work/hex/dashboard/app/issues/IssuesBoardClient.tsx":{"id":7063,"name":"*","chunks":[],"async":false}},"entryCSSFiles":{"/home/dx/Work/hex/dashboard/":[],"/home/dx/Work/hex/dashboard/app/layout":["static/css/4a38d8f6f6b7a68f.css"],"/home/dx/Work/hex/dashboard/app/page":[],"/home/dx/Work/hex/dashboard/app/overleaf/page":[]}}
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4521],{4260:function(e,t,n){Promise.resolve().then(n.bind(n,7063))},7063:function(e,t,n){"use strict";n.d(t,{IssuesBoardClient:function(){return m}});var r=n(7821),a=n(8078),o=n(3924);let s={Critical:"bg-[var(--critical)]/18 text-[var(--critical)]",High:"bg-[var(--high)]/18 text-[var(--high)]",Medium:"bg-[var(--medium)]/18 text-[var(--medium)]",Low:"bg-[var(--low)]/18 text-[var(--low)]",Info:"bg-[var(--info)]/18 text-[var(--info)]"};function i(e){var t;let{severity:n}=e,a=null!==(t=s[n])&&void 0!==t?t:s.Info;return(0,r.jsx)("span",{className:"inline-flex items-center rounded-md px-2 py-0.5 text-caption font-medium ".concat(a),children:n})}var c=n(9487);function l(e,t){var n;let r=new Set,a=e.code_locations.map(e=>e.file).filter(e=>e&&!r.has(e)&&r.add(e)).map(e=>(function(e,t){if(t.repositoryUrl&&t.commit){let n=t.repositoryUrl.replace(/\/+$/,"");return"[`".concat(e,"`](").concat(n,"/blob/").concat(t.commit,"/").concat(e,")")}return"[`".concat(e,"`]()")})(e,t)).join(", "),o=e.resolution||"Unresolved",s=null!==(n=e.update_from_client)&&void 0!==n?n:"";return["**File(s)**: ".concat(a),"","**Description**: ".concat(function(e){if(!e)return e;let t=!1,n="";return e.split("\n").map(e=>{let r=e.match(/^\s*(```+|~~~+)/);if(r)return t?r[1][0]===n&&(t=!1,n=""):(t=!0,n=r[1][0]),e;if(t)return e;let a=e.match(/^\s*#{1,6}\s+(.*\S)\s*$/);return a?"**".concat(a[1],"**"):/^\s*(-{3,}|\*{3,}|_{3,})\s*$/.test(e)?"":e}).join("\n")}(e.description)),"","**Recommendation(s)**: ".concat(e.recommendation),"","**Status**: ".concat(o),"","**Update from the client**: ".concat(s)].join("\n")}let d=[{id:"potential",label:"Potential",description:"Awaiting validation"},{id:"verified",label:"Verified",description:"Confirmed, ready to push"},{id:"synced",label:"Synced to GitHub",description:"On GitHub — edit there, not here"},{id:"invalid",label:"Invalid",description:"Rejected after review"},{id:"duplicate",label:"Duplicate",description:"Covered by another entry"}],u={Critical:0,High:1,Medium:2,Low:3,Info:4},x=["Critical","High","Medium","Low","Info"],p=["Fixed","Mitigated","Acknowledged","Not Fixed","Unresolved"];function m(e){var t;let{issues:n,formatCtx:s={}}=e,[i,c]=(0,a.useState)(n),[l,x]=(0,a.useState)(null),[p,m]=(0,a.useState)("all");(0,a.useEffect)(()=>{c(n)},[n]);let h=(0,o.Dy)((0,o.VT)(o.we,{activationConstraint:{distance:4}})),y=(0,a.useMemo)(()=>"all"===p?i:i.filter(e=>e.source===p),[i,p]),v=(0,a.useMemo)(()=>{let e={potential:[],verified:[],synced:[],invalid:[],duplicate:[]};for(let t of y)e[t.column].push(t);for(let t of Object.values(e))t.sort((e,t)=>{var n,r;return(null!==(n=u[e.severity])&&void 0!==n?n:5)-(null!==(r=u[t.severity])&&void 0!==r?r:5)||e.id.localeCompare(t.id)});return e},[y]),j=(0,a.useMemo)(()=>{let e={potential:0,verified:0,synced:0,invalid:0,duplicate:0};for(let t of i)e[t.column]++;return e},[i]),N=(0,a.useCallback)(async(e,t)=>{c(n=>n.map(n=>n.id===e?{...n,column:t,status:function(e){switch(e){case"potential":return"pending_validation";case"verified":return"verified";case"synced":return"synced";case"invalid":return"rejected";case"duplicate":return"duplicate"}}(t),duplicate_of:"duplicate"===t?n.duplicate_of:null}:n));try{let n=await fetch("/api/issues/".concat(encodeURIComponent(e),"/move"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({column:t})});if(!n.ok){var r;let e=await n.json().catch(()=>({}));throw Error(null!==(r=e.error)&&void 0!==r?r:"move failed")}}catch(t){console.error(t),c(t=>t.map(t=>{var r;return t.id===e&&null!==(r=n.find(t=>t.id===e))&&void 0!==r?r:t}))}},[n]),w=(0,a.useCallback)(async(e,t)=>{c(n=>n.map(n=>n.id===e?{...n,...t}:n));try{let r=await fetch("/api/issues/".concat(encodeURIComponent(e)),{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(!r.ok){var n;let e=await r.json().catch(()=>({}));throw Error(null!==(n=e.error)&&void 0!==n?n:"update failed")}}catch(e){console.error(e)}},[]),_=null!==(t=i.find(e=>e.id===l))&&void 0!==t?t:null;return(0,r.jsxs)("div",{children:[(0,r.jsxs)("header",{className:"mb-6 flex flex-wrap items-end justify-between gap-3",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("h1",{className:"text-title font-semibold text-text-primary",children:"Issues"}),(0,r.jsxs)("p",{className:"mt-1 text-body text-text-secondary",children:[i.length," total — ",j.potential," potential, ",j.verified," verified,"," ",j.synced," synced, ",j.invalid," invalid, ",j.duplicate," duplicate. Drag a card between columns; click to edit. Synced cards are read-only (edit on GitHub)."]})]}),(0,r.jsx)(f,{value:p,onChange:m})]}),(0,r.jsx)(o.LB,{sensors:h,onDragEnd:e=>{let{active:t,over:n}=e;if(!n)return;let r=n.id,a=t.id,o=i.find(e=>e.id===a);o&&o.column!==r&&"synced"!==r&&"synced"!==o.column&&N(a,r)},children:(0,r.jsx)("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2 xl:grid-cols-5",children:d.map(e=>(0,r.jsx)(b,{column:e,issues:v[e.id],onOpen:x},e.id))})}),_&&(0,r.jsx)(g,{issue:_,formatCtx:s,onClose:()=>x(null),onSave:e=>w(_.id,e)})]})}function f(e){let{value:t,onChange:n}=e;return(0,r.jsx)("div",{className:"flex flex-wrap gap-1.5",children:[{id:"all",label:"All sources"},{id:"manual",label:"Manual"},{id:"auditagent",label:"AuditAgent"},{id:"conformance",label:"Conformance"},{id:"github",label:"GitHub"}].map(e=>{let a=t===e.id;return(0,r.jsx)("button",{type:"button",onClick:()=>n(e.id),className:"rounded-md px-2.5 py-1 text-caption font-medium ".concat(a?"bg-accent text-surface-0":"bg-surface-2 text-text-secondary hover:text-text-primary"),children:e.label},e.id)})})}function b(e){let{column:t,issues:n,onOpen:a}=e,{isOver:s,setNodeRef:i}=(0,o.Zj)({id:t.id,disabled:"synced"===t.id});return(0,r.jsxs)("section",{ref:i,"aria-label":t.label,className:"flex flex-col gap-2 rounded-lg border bg-surface-1 p-3 transition-colors ".concat(s?"border-accent bg-surface-2":"border-border-subtle"),children:[(0,r.jsxs)("header",{className:"flex items-baseline justify-between",children:[(0,r.jsx)("h2",{className:"text-heading font-medium text-text-primary",children:t.label}),(0,r.jsx)("span",{className:"text-caption text-text-tertiary",children:n.length})]}),(0,r.jsx)("p",{className:"text-caption text-text-tertiary",children:t.description}),(0,r.jsxs)("div",{className:"mt-1 flex flex-col gap-2",children:[n.map(e=>(0,r.jsx)(h,{issue:e,onOpen:a},e.id)),0===n.length&&(0,r.jsx)("div",{className:"rounded-md border border-dashed border-border-subtle py-6 text-center text-caption text-text-tertiary",children:"Empty"})]})]})}function h(e){let{issue:t,onOpen:n}=e,a="synced"===t.column,{attributes:s,listeners:c,setNodeRef:l,isDragging:d,transform:u}=(0,o.O1)({id:t.id,disabled:a}),x=u?{transform:"translate3d(".concat(u.x,"px, ").concat(u.y,"px, 0)"),zIndex:30}:{};return(0,r.jsxs)("article",{ref:l,style:x,...a?{}:s,...a?{}:c,onClick:e=>{u||(e.stopPropagation(),n(t.id))},className:"group rounded-md border bg-surface-0 p-3 text-left ".concat(a?"cursor-pointer":"cursor-grab active:cursor-grabbing"," ").concat(d?"border-accent shadow-lg":"border-border-subtle hover:border-border-default"),children:[(0,r.jsxs)("div",{className:"flex items-start justify-between gap-2",children:[(0,r.jsx)("span",{className:"font-mono text-caption text-text-tertiary",children:t.id}),(0,r.jsx)(i,{severity:t.severity})]}),(0,r.jsx)("h3",{title:t.title,className:"mt-1 text-body font-medium text-text-primary line-clamp-3",children:t.title}),(0,r.jsxs)("div",{className:"mt-2 flex flex-wrap items-center gap-1.5 text-caption",children:[(0,r.jsx)(y,{source:t.source}),(0,r.jsx)(v,{issue:t}),t.duplicate_of&&(0,r.jsxs)("span",{className:"rounded-md bg-surface-2 px-1.5 py-0.5 text-text-secondary",children:["dup of ",t.duplicate_of]}),"passing"===t.poc_status&&(0,r.jsx)("span",{className:"rounded-md bg-[var(--low)]/15 px-1.5 py-0.5 text-[var(--low)]",children:"PoC ✓"}),"failing"===t.poc_status&&(0,r.jsx)("span",{className:"rounded-md bg-[var(--critical)]/15 px-1.5 py-0.5 text-[var(--critical)]",children:"PoC ✕"}),t.resolution&&(0,r.jsx)("span",{className:"rounded-md bg-surface-2 px-1.5 py-0.5 text-text-secondary",children:t.resolution})]}),t.match_signals&&(0,r.jsx)("div",{className:"mt-2 text-caption text-text-tertiary",children:(0,r.jsx)("span",{className:"font-mono",children:[t.match_signals.contract?"contract":null,t.match_signals.function?"function":null,"different"!==t.match_signals.root_cause?"rc:".concat(t.match_signals.root_cause):null,"different"!==t.match_signals.attack_vector?"av:".concat(t.match_signals.attack_vector):null].filter(Boolean).join(" \xb7 ")})})]})}function y(e){var t;let{source:n}=e;return(0,r.jsx)("span",{className:"rounded-md bg-surface-2 px-1.5 py-0.5 text-text-tertiary",children:null!==(t=({manual:"Manual",auditagent:"AuditAgent",conformance:"Conformance",github:"GitHub"})[n])&&void 0!==t?t:n})}function v(e){var t,n;let{issue:a}=e,o=null!==(t=a.sync_state)&&void 0!==t?t:"none";if("none"===o)return null;if("unsynced"===o)return(0,r.jsx)("span",{title:"Run /sync-issues to push verified findings to GitHub.",className:"rounded-md border border-dashed border-border-default px-1.5 py-0.5 text-text-tertiary",children:"GH unsynced"});if("conflict"===o)return(0,r.jsx)("span",{title:"Local and remote diverged. Re-run /sync-issues to reconcile.",className:"rounded-md bg-[var(--critical)]/15 px-1.5 py-0.5 text-[var(--critical)]",children:"GH conflict"});let s="synced_closed"===o,i="GH #".concat(null!==(n=a.github_issue_number)&&void 0!==n?n:"?"," ").concat(s?"closed":"open"),c=s?"bg-surface-2 text-text-tertiary":"bg-[var(--low)]/15 text-[var(--low)]";return a.github_issue_url?(0,r.jsx)("a",{href:a.github_issue_url,target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),className:"rounded-md px-1.5 py-0.5 hover:underline ".concat(c),children:i}):(0,r.jsx)("span",{className:"rounded-md px-1.5 py-0.5 ".concat(c),children:i})}function g(e){var t,n,o;let{issue:s,formatCtx:i,onClose:d,onSave:u}=e,[m,f]=(0,a.useState)(s.title),[b,h]=(0,a.useState)(s.severity),[g,N]=(0,a.useState)(s.description),[w,_]=(0,a.useState)(s.recommendation),[C,k]=(0,a.useState)(null!==(t=s.resolution)&&void 0!==t?t:""),[S,H]=(0,a.useState)(null!==(n=s.update_from_client)&&void 0!==n?n:""),[M,G]=(0,a.useState)(!1),[E,I]=(0,a.useState)(!1),[R,P]=(0,a.useState)(!1),T=(0,a.useRef)(null),O="synced"===s.status;(0,a.useEffect)(()=>{var e;null===(e=T.current)||void 0===e||e.focus()},[]);let U=async()=>{let e=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"## [".concat(e.severity,"] ").concat(e.title,"\n\n").concat(l(e,t),"\n\n---\n")}({...s,title:m,severity:b,description:g,recommendation:w,resolution:C||void 0,update_from_client:S||void 0},i);try{await navigator.clipboard.writeText(e),I(!0),setTimeout(()=>I(!1),1500)}catch(e){}},D=async()=>{G(!0),await u({title:m,severity:b,description:g,recommendation:w,resolution:C||void 0,update_from_client:S||void 0}),G(!1),P(!1)};return(0,r.jsx)("div",{ref:T,tabIndex:-1,className:"fixed inset-0 z-50 flex items-center justify-center p-4 outline-none",style:{background:"var(--overlay-bg)"},onClick:d,onKeyDown:e=>{"Escape"===e.key&&d()},children:(0,r.jsxs)("div",{role:"dialog","aria-modal":"true","aria-label":"Issue ".concat(s.id),className:"relative flex h-[85vh] w-full max-w-4xl flex-col overflow-hidden border border-border-emphasis bg-surface-1 shadow-2xl",style:{borderRadius:"var(--radius-md)",boxShadow:"var(--shadow-accent)"},onClick:e=>e.stopPropagation(),children:[(0,r.jsxs)("div",{className:"flex items-center justify-between border-b border-border-default bg-surface-2 px-4 py-3",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2 text-caption",children:[(0,r.jsx)("span",{className:"font-mono text-body text-text-tertiary",children:s.id}),(0,r.jsx)(y,{source:s.source}),(0,r.jsx)(v,{issue:s})]}),(0,r.jsx)("button",{type:"button",onClick:d,"aria-label":"Close",className:"rounded p-1 text-text-tertiary hover:bg-surface-3 hover:text-text-primary",children:(0,r.jsx)("svg",{className:"h-5 w-5","aria-hidden":"true",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})})]}),(0,r.jsxs)("div",{className:"flex-1 overflow-y-auto p-4",children:[O&&(0,r.jsxs)("div",{className:"mb-4 rounded-md border border-border-default bg-surface-2 px-3 py-2 text-caption text-text-secondary",children:["This issue is synced to GitHub and is read-only here. Edit it on GitHub, then run"," ",(0,r.jsx)("span",{className:"font-mono",children:"/sync-issues"})," to pull the changes back."]}),R?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(j,{label:"Title",children:(0,r.jsx)("input",{type:"text",value:m,onChange:e=>f(e.target.value),disabled:O,className:"w-full rounded-md border border-border-default bg-surface-0 px-3 py-2 text-body text-text-primary focus:border-accent focus:outline-none disabled:opacity-60"})}),(0,r.jsxs)("div",{className:"mt-3 grid grid-cols-2 gap-3",children:[(0,r.jsx)(j,{label:"Severity",children:(0,r.jsx)("select",{value:b,onChange:e=>h(e.target.value),disabled:O,className:"w-full rounded-md border border-border-default bg-surface-0 px-3 py-2 text-body text-text-primary focus:border-accent focus:outline-none disabled:opacity-60",children:x.map(e=>(0,r.jsx)("option",{value:e,children:e},e))})}),(0,r.jsx)(j,{label:"Resolution (verified only)",children:(0,r.jsxs)("select",{value:C,onChange:e=>k(e.target.value),disabled:O,className:"w-full rounded-md border border-border-default bg-surface-0 px-3 py-2 text-body text-text-primary focus:border-accent focus:outline-none disabled:opacity-60",children:[(0,r.jsx)("option",{value:"",children:"— none —"}),p.map(e=>(0,r.jsx)("option",{value:e,children:e},e))]})})]}),(0,r.jsx)(j,{label:"Description",className:"mt-3",children:(0,r.jsx)("textarea",{value:g,onChange:e=>N(e.target.value),rows:8,disabled:O,className:"w-full rounded-md border border-border-default bg-surface-0 px-3 py-2 font-mono text-caption text-text-primary focus:border-accent focus:outline-none disabled:opacity-60"})}),(0,r.jsx)(j,{label:"Recommendation",className:"mt-3",children:(0,r.jsx)("textarea",{value:w,onChange:e=>_(e.target.value),rows:4,disabled:O,className:"w-full rounded-md border border-border-default bg-surface-0 px-3 py-2 font-mono text-caption text-text-primary focus:border-accent focus:outline-none disabled:opacity-60"})}),(0,r.jsx)(j,{label:"Update from the client",className:"mt-3",children:(0,r.jsx)("textarea",{value:S,onChange:e=>H(e.target.value),rows:4,disabled:O,placeholder:"How the client responded — used by /generate-overleaf.",className:"w-full rounded-md border border-border-default bg-surface-0 px-3 py-2 font-mono text-caption text-text-primary focus:border-accent focus:outline-none disabled:opacity-60"})})]}):(0,r.jsx)(r.Fragment,{children:(0,r.jsx)(c.MarkdownRenderer,{content:"**Title**: ".concat(s.title,"\n\n**Severity**: ").concat(s.severity,"\n\n").concat(function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return l(e,t)}(s,i))})}),s.code_locations.length>0&&(0,r.jsxs)("div",{className:"mt-4",children:[(0,r.jsx)("div",{className:"mb-1 text-caption font-medium text-text-tertiary",children:"Code locations"}),(0,r.jsx)("ul",{className:"space-y-1 font-mono text-caption text-text-secondary",children:s.code_locations.map((e,t)=>(0,r.jsx)("li",{children:e.file},"".concat(e.file,"-").concat(t)))})]}),s.match_signals&&(0,r.jsxs)("div",{className:"mt-4",children:[(0,r.jsx)("div",{className:"mb-1 text-caption font-medium text-text-tertiary",children:"Duplicate signals"}),(0,r.jsx)("p",{className:"text-caption text-text-secondary",children:null!==(o=s.reasoning)&&void 0!==o?o:"Matched against another entry."}),(0,r.jsxs)("div",{className:"mt-1 flex flex-wrap gap-1.5 font-mono text-caption text-text-tertiary",children:[(0,r.jsxs)("span",{children:["contract: ",s.match_signals.contract?"✓":"—"]}),(0,r.jsxs)("span",{children:["function: ",s.match_signals.function?"✓":"—"]}),(0,r.jsxs)("span",{children:["root_cause: ",s.match_signals.root_cause]}),(0,r.jsxs)("span",{children:["attack_vector: ",s.match_signals.attack_vector]})]})]})]}),(0,r.jsxs)("div",{className:"flex items-center justify-between gap-2 border-t border-border-default bg-surface-2 px-4 py-3",children:[(0,r.jsx)("button",{type:"button",onClick:U,className:"rounded-md border border-border-default px-3 py-1.5 text-body text-text-secondary hover:bg-surface-3 hover:text-text-primary",children:E?"Copied!":"Copy as HackMD"}),(0,r.jsx)("div",{className:"flex items-center gap-2",children:R?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("button",{type:"button",onClick:()=>P(!1),className:"rounded-md px-3 py-1.5 text-body text-text-secondary hover:text-text-primary",children:"Cancel"}),(0,r.jsx)("button",{type:"button",onClick:D,disabled:M,className:"rounded-md bg-accent px-3 py-1.5 text-body font-medium text-surface-0 hover:bg-accent-secondary disabled:opacity-50",children:M?"Saving…":"Save"})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("button",{type:"button",onClick:d,className:"rounded-md px-3 py-1.5 text-body text-text-secondary hover:text-text-primary",children:"Close"}),(0,r.jsx)("button",{type:"button",onClick:()=>P(!0),disabled:O,title:O?"Synced to GitHub — edit it there, then run /sync-issues to pull the changes back.":void 0,className:"rounded-md bg-accent px-3 py-1.5 text-body font-medium text-surface-0 hover:bg-accent-secondary disabled:cursor-not-allowed disabled:opacity-40",children:"Edit"})]})})]})]})})}function j(e){let{label:t,className:n,children:a}=e;return(0,r.jsxs)("label",{className:"block ".concat(null!=n?n:""),children:[(0,r.jsx)("span",{className:"mb-1 block text-caption font-medium text-text-tertiary",children:t}),a]})}},9487:function(e,t,n){"use strict";n.d(t,{MarkdownRenderer:function(){return s},T:function(){return i}});var r=n(7821),a=n(8525),o=n(5592);function s(e){let{content:t,className:n}=e;return(0,r.jsx)("div",{className:"prose max-w-none\n prose-headings:text-text-primary\n prose-p:text-text-secondary\n prose-strong:text-text-primary\n prose-code:text-accent\n prose-code:before:content-none\n prose-code:after:content-none\n prose-pre:bg-surface-0\n prose-pre:border\n prose-pre:border-border-default\n prose-a:text-accent\n prose-a:no-underline\n hover:prose-a:underline\n prose-th:text-text-primary\n prose-td:text-text-secondary\n prose-hr:border-border-default\n prose-blockquote:border-border-emphasis\n prose-blockquote:text-text-secondary\n prose-li:text-text-secondary\n ".concat(null!=n?n:""),children:(0,r.jsx)(a.UG,{remarkPlugins:[o.Z],children:t})})}function i(e){let{children:t}=e;return(0,r.jsx)(a.UG,{remarkPlugins:[o.Z],components:{p:e=>{let{children:t}=e;return(0,r.jsx)(r.Fragment,{children:t})},code:e=>{let{children:t}=e;return(0,r.jsx)("code",{className:"rounded bg-surface-0 px-1 py-0.5 font-mono text-[0.85em] text-accent",children:t})},strong:e=>{let{children:t}=e;return(0,r.jsx)("strong",{className:"font-semibold text-text-primary",children:t})},a:e=>{let{href:t,children:n}=e;return(0,r.jsx)("a",{href:t,target:"_blank",rel:"noreferrer",className:"text-accent hover:underline",children:n})}},children:t})}}},function(e){e.O(0,[7397,3924,7115,3205,1744],function(){return e(e.s=4260)}),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[529],{9531:function(e,t,a){Promise.resolve().then(a.bind(a,9))},9:function(e,t,a){"use strict";a.d(t,{OverleafClient:function(){return i}});var s=a(7821),r=a(8078);let n=[{key:"executive_summary",label:"Executive Summary",file:"executive_summary.txt"},{key:"audited_files",label:"Audited Files",file:"audited_files.txt"},{key:"summary_of_findings",label:"Summary of Issues",file:"summary_of_findings.txt"},{key:"findings",label:"Issues",file:"findings.txt"}];function i(e){var t;let{sections:a}=e,[i,o]=(0,r.useState)("executive_summary"),[l,c]=(0,r.useState)(!1),d=a[i],x=async()=>{if(d)try{await navigator.clipboard.writeText(d),c(!0),setTimeout(()=>c(!1),1500)}catch(e){}};return(0,s.jsxs)("div",{children:[(0,s.jsxs)("header",{className:"mb-6",children:[(0,s.jsx)("h1",{className:"text-title font-semibold text-text-primary",children:"Overleaf"}),(0,s.jsxs)("p",{className:"mt-1 text-body text-text-secondary",children:["LaTeX report sections from ",(0,s.jsx)("span",{className:"font-mono text-caption",children:".hex/overleaf/"}),". Copy each into the matching slot of the Nethermind Overleaf template."]})]}),(0,s.jsx)("div",{className:"mb-4 flex flex-wrap gap-1.5",children:n.map(e=>{let t=e.key===i,r=!!a[e.key];return(0,s.jsx)("button",{type:"button",onClick:()=>o(e.key),className:"rounded-md px-3 py-1.5 text-caption font-medium ".concat(t?"bg-accent text-surface-0":"bg-surface-2 text-text-secondary hover:text-text-primary"," ").concat(r?"":"opacity-50"),children:e.label},e.key)})}),(0,s.jsxs)("div",{className:"rounded-lg border border-border-subtle bg-surface-1",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between border-b border-border-subtle px-4 py-2.5",children:[(0,s.jsx)("span",{className:"font-mono text-caption text-text-tertiary",children:null===(t=n.find(e=>e.key===i))||void 0===t?void 0:t.file}),(0,s.jsx)("button",{type:"button",onClick:x,disabled:!d,className:"rounded-md border border-border-default px-2.5 py-1 text-caption text-text-secondary hover:bg-surface-2 hover:text-text-primary disabled:opacity-50",children:l?"Copied!":"Copy"})]}),d?(0,s.jsx)("pre",{className:"max-h-[70vh] overflow-auto p-4 font-mono text-caption leading-relaxed text-text-secondary whitespace-pre-wrap break-words",children:d}):(0,s.jsxs)("p",{className:"p-4 text-body text-text-tertiary",children:["This section has not been generated yet. Run"," ",(0,s.jsx)("span",{className:"font-mono text-caption",children:"/generate-overleaf"}),"."]})]})]})}}},function(e){e.O(0,[7115,3205,1744],function(){return e(e.s=9531)}),_N_E=e.O()}]);
@@ -1,32 +0,0 @@
1
- import { readMarkdownFile } from '@/lib/data';
2
- import { NotYetGenerated } from '@/components/NotYetGenerated';
3
- import { OverleafClient, type OverleafSections } from './OverleafClient';
4
-
5
- // Read .hex/overleaf/ at request time, not at build time.
6
- export const dynamic = 'force-dynamic';
7
-
8
- export default function OverleafPage() {
9
- const sections: OverleafSections = {
10
- executive_summary: readMarkdownFile('overleaf/executive_summary.txt'),
11
- audited_files: readMarkdownFile('overleaf/audited_files.txt'),
12
- summary_of_findings: readMarkdownFile('overleaf/summary_of_findings.txt'),
13
- findings: readMarkdownFile('overleaf/findings.txt'),
14
- };
15
-
16
- const anyPresent = Object.values(sections).some(Boolean);
17
- if (!anyPresent) {
18
- return (
19
- <div>
20
- <header className="mb-6">
21
- <h1 className="text-title font-semibold text-text-primary">Overleaf</h1>
22
- <p className="mt-1 text-body text-text-secondary">
23
- LaTeX report sections, ready to paste into the Nethermind Overleaf template.
24
- </p>
25
- </header>
26
- <NotYetGenerated command="/generate-overleaf" />
27
- </div>
28
- );
29
- }
30
-
31
- return <OverleafClient sections={sections} />;
32
- }