hex-audit 0.4.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.
- package/CLAUDE.md +105 -0
- package/DEMO.md +141 -0
- package/README.md +378 -0
- package/dashboard/.next/BUILD_ID +1 -0
- package/dashboard/.next/app-build-manifest.json +99 -0
- package/dashboard/.next/app-path-routes-manifest.json +1 -0
- package/dashboard/.next/build-manifest.json +32 -0
- package/dashboard/.next/cache/.tsbuildinfo +1 -0
- 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/export-marker.json +1 -0
- package/dashboard/.next/images-manifest.json +1 -0
- package/dashboard/.next/next-minimal-server.js.nft.json +1 -0
- package/dashboard/.next/next-server.js.nft.json +1 -0
- package/dashboard/.next/package.json +1 -0
- package/dashboard/.next/prerender-manifest.js +1 -0
- package/dashboard/.next/prerender-manifest.json +1 -0
- package/dashboard/.next/react-loadable-manifest.json +300 -0
- package/dashboard/.next/required-server-files.json +1 -0
- package/dashboard/.next/routes-manifest.json +1 -0
- package/dashboard/.next/server/app/_not-found/page.js +1 -0
- package/dashboard/.next/server/app/_not-found/page.js.nft.json +1 -0
- package/dashboard/.next/server/app/_not-found/page_client-reference-manifest.js +1 -0
- package/dashboard/.next/server/app/_not-found.html +1 -0
- package/dashboard/.next/server/app/_not-found.meta +6 -0
- package/dashboard/.next/server/app/_not-found.rsc +12 -0
- package/dashboard/.next/server/app/access/page.js +1 -0
- package/dashboard/.next/server/app/access/page.js.nft.json +1 -0
- package/dashboard/.next/server/app/access/page_client-reference-manifest.js +1 -0
- package/dashboard/.next/server/app/access.html +1 -0
- package/dashboard/.next/server/app/access.meta +5 -0
- package/dashboard/.next/server/app/access.rsc +8 -0
- package/dashboard/.next/server/app/api/code/route.js +1 -0
- package/dashboard/.next/server/app/api/code/route.js.nft.json +1 -0
- package/dashboard/.next/server/app/api/flows/route.js +1 -0
- package/dashboard/.next/server/app/api/flows/route.js.nft.json +1 -0
- package/dashboard/.next/server/app/api/flows.body +1 -0
- package/dashboard/.next/server/app/api/flows.meta +1 -0
- package/dashboard/.next/server/app/api/github-status/route.js +1 -0
- package/dashboard/.next/server/app/api/github-status/route.js.nft.json +1 -0
- package/dashboard/.next/server/app/api/issues/[id]/move/route.js +1 -0
- package/dashboard/.next/server/app/api/issues/[id]/move/route.js.nft.json +1 -0
- package/dashboard/.next/server/app/api/issues/[id]/route.js +1 -0
- package/dashboard/.next/server/app/api/issues/[id]/route.js.nft.json +1 -0
- package/dashboard/.next/server/app/api/mermaid/route.js +1 -0
- package/dashboard/.next/server/app/api/mermaid/route.js.nft.json +1 -0
- package/dashboard/.next/server/app/api/progress/route.js +1 -0
- package/dashboard/.next/server/app/api/progress/route.js.nft.json +1 -0
- package/dashboard/.next/server/app/api/watch/route.js +3 -0
- package/dashboard/.next/server/app/api/watch/route.js.nft.json +1 -0
- package/dashboard/.next/server/app/calls/page.js +1 -0
- package/dashboard/.next/server/app/calls/page.js.nft.json +1 -0
- package/dashboard/.next/server/app/calls/page_client-reference-manifest.js +1 -0
- package/dashboard/.next/server/app/calls.html +1 -0
- package/dashboard/.next/server/app/calls.meta +5 -0
- package/dashboard/.next/server/app/calls.rsc +8 -0
- package/dashboard/.next/server/app/conformance/page.js +1 -0
- package/dashboard/.next/server/app/conformance/page.js.nft.json +1 -0
- package/dashboard/.next/server/app/conformance/page_client-reference-manifest.js +1 -0
- package/dashboard/.next/server/app/conformance.html +1 -0
- package/dashboard/.next/server/app/conformance.meta +5 -0
- package/dashboard/.next/server/app/conformance.rsc +8 -0
- package/dashboard/.next/server/app/diagram/page.js +1 -0
- package/dashboard/.next/server/app/diagram/page.js.nft.json +1 -0
- package/dashboard/.next/server/app/diagram/page_client-reference-manifest.js +1 -0
- package/dashboard/.next/server/app/diagram.html +1 -0
- package/dashboard/.next/server/app/diagram.meta +5 -0
- package/dashboard/.next/server/app/diagram.rsc +10 -0
- package/dashboard/.next/server/app/flows/page.js +1 -0
- package/dashboard/.next/server/app/flows/page.js.nft.json +1 -0
- package/dashboard/.next/server/app/flows/page_client-reference-manifest.js +1 -0
- package/dashboard/.next/server/app/flows.html +1 -0
- package/dashboard/.next/server/app/flows.meta +5 -0
- package/dashboard/.next/server/app/flows.rsc +10 -0
- package/dashboard/.next/server/app/functions/page.js +1 -0
- package/dashboard/.next/server/app/functions/page.js.nft.json +1 -0
- package/dashboard/.next/server/app/functions/page_client-reference-manifest.js +1 -0
- package/dashboard/.next/server/app/functions.html +1 -0
- package/dashboard/.next/server/app/functions.meta +5 -0
- package/dashboard/.next/server/app/functions.rsc +8 -0
- package/dashboard/.next/server/app/icon.svg/route.js +12 -0
- package/dashboard/.next/server/app/icon.svg/route.js.nft.json +1 -0
- package/dashboard/.next/server/app/icon.svg.body +18 -0
- package/dashboard/.next/server/app/icon.svg.meta +1 -0
- package/dashboard/.next/server/app/index.html +1 -0
- package/dashboard/.next/server/app/index.meta +5 -0
- package/dashboard/.next/server/app/index.rsc +9 -0
- package/dashboard/.next/server/app/issues/page.js +1 -0
- package/dashboard/.next/server/app/issues/page.js.nft.json +1 -0
- package/dashboard/.next/server/app/issues/page_client-reference-manifest.js +1 -0
- package/dashboard/.next/server/app/issues.html +1 -0
- package/dashboard/.next/server/app/issues.meta +5 -0
- package/dashboard/.next/server/app/issues.rsc +8 -0
- package/dashboard/.next/server/app/page.js +20 -0
- package/dashboard/.next/server/app/page.js.nft.json +1 -0
- package/dashboard/.next/server/app/page_client-reference-manifest.js +1 -0
- package/dashboard/.next/server/app/progress/page.js +1 -0
- package/dashboard/.next/server/app/progress/page.js.nft.json +1 -0
- package/dashboard/.next/server/app/progress/page_client-reference-manifest.js +1 -0
- package/dashboard/.next/server/app/progress.html +1 -0
- package/dashboard/.next/server/app/progress.meta +5 -0
- package/dashboard/.next/server/app/progress.rsc +8 -0
- package/dashboard/.next/server/app/stats/page.js +1 -0
- package/dashboard/.next/server/app/stats/page.js.nft.json +1 -0
- package/dashboard/.next/server/app/stats/page_client-reference-manifest.js +1 -0
- package/dashboard/.next/server/app/stats.html +1 -0
- package/dashboard/.next/server/app/stats.meta +5 -0
- package/dashboard/.next/server/app/stats.rsc +8 -0
- package/dashboard/.next/server/app-paths-manifest.json +22 -0
- package/dashboard/.next/server/chunks/431.js +1 -0
- package/dashboard/.next/server/chunks/557.js +1 -0
- package/dashboard/.next/server/chunks/645.js +6 -0
- package/dashboard/.next/server/chunks/649.js +2 -0
- package/dashboard/.next/server/chunks/665.js +13 -0
- package/dashboard/.next/server/chunks/786.js +12 -0
- package/dashboard/.next/server/chunks/818.js +6 -0
- package/dashboard/.next/server/chunks/916.js +2 -0
- package/dashboard/.next/server/chunks/font-manifest.json +1 -0
- package/dashboard/.next/server/font-manifest.json +1 -0
- package/dashboard/.next/server/functions-config-manifest.json +1 -0
- package/dashboard/.next/server/interception-route-rewrite-manifest.js +1 -0
- package/dashboard/.next/server/middleware-build-manifest.js +1 -0
- package/dashboard/.next/server/middleware-manifest.json +6 -0
- package/dashboard/.next/server/middleware-react-loadable-manifest.js +1 -0
- package/dashboard/.next/server/next-font-manifest.js +1 -0
- package/dashboard/.next/server/next-font-manifest.json +1 -0
- package/dashboard/.next/server/pages/404.html +1 -0
- package/dashboard/.next/server/pages/500.html +1 -0
- package/dashboard/.next/server/pages/_app.js +1 -0
- package/dashboard/.next/server/pages/_app.js.nft.json +1 -0
- package/dashboard/.next/server/pages/_document.js +1 -0
- package/dashboard/.next/server/pages/_document.js.nft.json +1 -0
- package/dashboard/.next/server/pages/_error.js +1 -0
- package/dashboard/.next/server/pages/_error.js.nft.json +1 -0
- package/dashboard/.next/server/pages-manifest.json +1 -0
- package/dashboard/.next/server/server-reference-manifest.js +1 -0
- package/dashboard/.next/server/server-reference-manifest.json +1 -0
- package/dashboard/.next/server/webpack-runtime.js +1 -0
- package/dashboard/.next/static/0IZAlhEwk5-v4myUvWKBd/_buildManifest.js +1 -0
- package/dashboard/.next/static/0IZAlhEwk5-v4myUvWKBd/_ssgManifest.js +1 -0
- package/dashboard/.next/static/chunks/1.8868c4d131111be7.js +36 -0
- package/dashboard/.next/static/chunks/1015.3ab89142e5f44120.js +226 -0
- package/dashboard/.next/static/chunks/1151.b6ef5c786e587ed7.js +1 -0
- package/dashboard/.next/static/chunks/1199.a072929dbec89965.js +148 -0
- package/dashboard/.next/static/chunks/1375.d4d2f7fc9c9c2ff1.js +43 -0
- package/dashboard/.next/static/chunks/1799.83206776abbbf1fc.js +9 -0
- package/dashboard/.next/static/chunks/20154aaa.ccc347c04ab5ad4a.js +1 -0
- package/dashboard/.next/static/chunks/2077.7011a570c87aa7b1.js +1 -0
- package/dashboard/.next/static/chunks/2166.cc0fabeb2e89b840.js +215 -0
- package/dashboard/.next/static/chunks/2291.85a70cb0c228157b.js +29 -0
- package/dashboard/.next/static/chunks/2325.2c55cb9a6282ae3f.js +24 -0
- package/dashboard/.next/static/chunks/2383.62c035a052272594.js +1 -0
- package/dashboard/.next/static/chunks/2694.92bbe252063e4786.js +1 -0
- package/dashboard/.next/static/chunks/275.0d761aa0e5b030b8.js +34 -0
- package/dashboard/.next/static/chunks/2781.8536b644a480aede.js +93 -0
- package/dashboard/.next/static/chunks/2805.a8d71d2f92bb6ba9.js +1 -0
- package/dashboard/.next/static/chunks/2879.51436986f93981d9.js +1 -0
- package/dashboard/.next/static/chunks/3017.e55781da9dd32d37.js +1 -0
- package/dashboard/.next/static/chunks/3205-728c260fbb4f89c6.js +2 -0
- package/dashboard/.next/static/chunks/3236.dff44fa7961d9d5e.js +1 -0
- package/dashboard/.next/static/chunks/3480.9451396ad7ee7613.js +1 -0
- package/dashboard/.next/static/chunks/3626.ba1cf848a9f2e93d.js +64 -0
- package/dashboard/.next/static/chunks/3865.a432a7910a2f5281.js +90 -0
- package/dashboard/.next/static/chunks/3887.c22cbfa3f095826c.js +1 -0
- package/dashboard/.next/static/chunks/3924-4a05057b5450abe1.js +1 -0
- package/dashboard/.next/static/chunks/3948.fe3c7d758568d98b.js +287 -0
- package/dashboard/.next/static/chunks/4728.07d87640a3e7dd0d.js +24 -0
- package/dashboard/.next/static/chunks/4787.4e5f6a0e0e40a583.js +23 -0
- package/dashboard/.next/static/chunks/5060.baca226af35ed016.js +1 -0
- package/dashboard/.next/static/chunks/5284.f949ac90c95ff143.js +1 -0
- package/dashboard/.next/static/chunks/5715.1524bcc9591e180b.js +115 -0
- package/dashboard/.next/static/chunks/6014.700ae4969b64d728.js +104 -0
- package/dashboard/.next/static/chunks/6024.4d23707c65514679.js +79 -0
- package/dashboard/.next/static/chunks/6052.033a6f1013c666eb.js +141 -0
- package/dashboard/.next/static/chunks/6177.e5c84cfc4c0dea51.js +1 -0
- package/dashboard/.next/static/chunks/618f8807-547c5614e1318888.js +1 -0
- package/dashboard/.next/static/chunks/6434.9481771c33195d29.js +1 -0
- package/dashboard/.next/static/chunks/6468.f4a3e8fa6accc6da.js +77 -0
- package/dashboard/.next/static/chunks/6540.86f367d7390738d4.js +1 -0
- package/dashboard/.next/static/chunks/6549.4d0d472df96429a5.js +1 -0
- package/dashboard/.next/static/chunks/690f35d0.3e40ca0930e4bbdb.js +119 -0
- package/dashboard/.next/static/chunks/7020.831e16e26d91abc1.js +166 -0
- package/dashboard/.next/static/chunks/7397-f6f4dddc7a20bfc1.js +1 -0
- package/dashboard/.next/static/chunks/7498-ea83cb9e30ec5491.js +1 -0
- package/dashboard/.next/static/chunks/7802.89aec9ee11680850.js +80 -0
- package/dashboard/.next/static/chunks/7973.8b526f589aca5d84.js +79 -0
- package/dashboard/.next/static/chunks/7a04ac15.1c6cea694301806c.js +62 -0
- package/dashboard/.next/static/chunks/8216.1bead812eb126c35.js +5 -0
- package/dashboard/.next/static/chunks/8233babc.780b8e272eda298f.js +92 -0
- package/dashboard/.next/static/chunks/8452-e616b5f43bceb95f.js +13 -0
- package/dashboard/.next/static/chunks/8645.a5ca76f11edc9633.js +1 -0
- package/dashboard/.next/static/chunks/8928-60c623ee89d2e6ad.js +1 -0
- package/dashboard/.next/static/chunks/9173.2486ffca31131ec5.js +1 -0
- package/dashboard/.next/static/chunks/9178.469341860bf8caec.js +1 -0
- package/dashboard/.next/static/chunks/9466.e904660d38c03eea.js +1 -0
- package/dashboard/.next/static/chunks/9660.84a85811380c5f33.js +1 -0
- package/dashboard/.next/static/chunks/9717.6cf5c8c89403b651.js +1 -0
- package/dashboard/.next/static/chunks/9720.67d4d0d15a96d691.js +1 -0
- package/dashboard/.next/static/chunks/9811.65e1d080c2d256af.js +1 -0
- package/dashboard/.next/static/chunks/app/_not-found/page-548ab392d0e890d1.js +1 -0
- package/dashboard/.next/static/chunks/app/access/page-3668562e7464eb5d.js +1 -0
- package/dashboard/.next/static/chunks/app/calls/page-d07f5b8664cc8303.js +1 -0
- package/dashboard/.next/static/chunks/app/conformance/page-2fede1d7b5f9265d.js +1 -0
- package/dashboard/.next/static/chunks/app/diagram/page-b228444265546495.js +1 -0
- package/dashboard/.next/static/chunks/app/flows/page-fa67783d8cd79cab.js +1 -0
- package/dashboard/.next/static/chunks/app/functions/page-686f0296639133a3.js +1 -0
- package/dashboard/.next/static/chunks/app/issues/page-dc110d4cc0a5c398.js +1 -0
- package/dashboard/.next/static/chunks/app/layout-e7b50543ba216d12.js +1 -0
- package/dashboard/.next/static/chunks/app/page-a0f25953d4457935.js +1 -0
- package/dashboard/.next/static/chunks/app/progress/page-f07ac39d1d27b480.js +1 -0
- package/dashboard/.next/static/chunks/app/stats/page-db81f600a086f252.js +1 -0
- package/dashboard/.next/static/chunks/b7167ec1.7afbab6f609e3326.js +153 -0
- package/dashboard/.next/static/chunks/c7ea4e13.5effeeba6618bdb7.js +1 -0
- package/dashboard/.next/static/chunks/framework-cf6f5bdca6ba0184.js +33 -0
- package/dashboard/.next/static/chunks/main-70c6d841ad572657.js +1 -0
- package/dashboard/.next/static/chunks/main-app-9d2f6b8a47133e9b.js +1 -0
- package/dashboard/.next/static/chunks/pages/_app-6ad2b50514c24ab4.js +1 -0
- package/dashboard/.next/static/chunks/pages/_error-d5eb11c5c4626811.js +1 -0
- package/dashboard/.next/static/chunks/polyfills-78c92fac7aa8fdd8.js +1 -0
- package/dashboard/.next/static/chunks/webpack-08869f2b18792e51.js +1 -0
- package/dashboard/.next/static/css/e6cb67f77f13ae8e.css +3 -0
- package/dashboard/.next/static/media/0aa834ed78bf6d07-s.woff2 +0 -0
- package/dashboard/.next/static/media/438aa629764e75f3-s.woff2 +0 -0
- package/dashboard/.next/static/media/4c9affa5bc8f420e-s.p.woff2 +0 -0
- package/dashboard/.next/static/media/51251f8b9793cdb3-s.woff2 +0 -0
- package/dashboard/.next/static/media/67957d42bae0796d-s.woff2 +0 -0
- package/dashboard/.next/static/media/875ae681bfde4580-s.woff2 +0 -0
- package/dashboard/.next/static/media/886030b0b59bc5a7-s.woff2 +0 -0
- package/dashboard/.next/static/media/939c4f875ee75fbb-s.woff2 +0 -0
- package/dashboard/.next/static/media/bb3ef058b751a6ad-s.p.woff2 +0 -0
- package/dashboard/.next/static/media/cc978ac5ee68c2b6-s.woff2 +0 -0
- package/dashboard/.next/static/media/e857b654a2caa584-s.woff2 +0 -0
- package/dashboard/.next/static/media/f911b923c6adde36-s.woff2 +0 -0
- package/dashboard/.next/trace +80 -0
- package/dashboard/.next/types/app/access/page.ts +79 -0
- package/dashboard/.next/types/app/api/code/route.ts +343 -0
- package/dashboard/.next/types/app/api/flows/route.ts +343 -0
- package/dashboard/.next/types/app/api/github-status/route.ts +343 -0
- package/dashboard/.next/types/app/api/issues/[id]/move/route.ts +343 -0
- package/dashboard/.next/types/app/api/issues/[id]/route.ts +343 -0
- package/dashboard/.next/types/app/api/mermaid/route.ts +343 -0
- package/dashboard/.next/types/app/api/progress/route.ts +343 -0
- package/dashboard/.next/types/app/api/watch/route.ts +343 -0
- package/dashboard/.next/types/app/calls/page.ts +79 -0
- package/dashboard/.next/types/app/conformance/page.ts +79 -0
- package/dashboard/.next/types/app/diagram/page.ts +79 -0
- package/dashboard/.next/types/app/flows/page.ts +79 -0
- package/dashboard/.next/types/app/functions/page.ts +79 -0
- package/dashboard/.next/types/app/issues/page.ts +79 -0
- package/dashboard/.next/types/app/page.ts +79 -0
- package/dashboard/.next/types/app/progress/page.ts +79 -0
- package/dashboard/.next/types/app/stats/page.ts +79 -0
- package/dashboard/.next/types/package.json +1 -0
- package/dashboard/app/access/AccessClient.tsx +402 -0
- package/dashboard/app/access/ReadOnlyFunctions.tsx +114 -0
- package/dashboard/app/access/page.tsx +118 -0
- package/dashboard/app/api/code/route.ts +35 -0
- package/dashboard/app/api/flows/route.ts +28 -0
- package/dashboard/app/api/github-status/route.ts +23 -0
- package/dashboard/app/api/issues/[id]/move/route.ts +74 -0
- package/dashboard/app/api/issues/[id]/route.ts +109 -0
- package/dashboard/app/api/mermaid/route.ts +25 -0
- package/dashboard/app/api/progress/route.ts +36 -0
- package/dashboard/app/api/watch/route.ts +52 -0
- package/dashboard/app/calls/CallsClient.tsx +170 -0
- package/dashboard/app/calls/page.tsx +50 -0
- package/dashboard/app/conformance/ConformanceTable.tsx +214 -0
- package/dashboard/app/conformance/page.tsx +179 -0
- package/dashboard/app/diagram/page.tsx +65 -0
- package/dashboard/app/flows/page.tsx +102 -0
- package/dashboard/app/functions/FunctionsClient.tsx +167 -0
- package/dashboard/app/functions/page.tsx +171 -0
- package/dashboard/app/globals.css +157 -0
- package/dashboard/app/icon.svg +18 -0
- package/dashboard/app/issues/IssuesBoardClient.tsx +636 -0
- package/dashboard/app/issues/page.tsx +239 -0
- package/dashboard/app/layout.tsx +40 -0
- package/dashboard/app/page.tsx +259 -0
- package/dashboard/app/progress/ProgressClient.tsx +333 -0
- package/dashboard/app/progress/page.tsx +118 -0
- package/dashboard/app/stats/StatsClient.tsx +452 -0
- package/dashboard/app/stats/page.tsx +43 -0
- package/dashboard/components/AutoRefresh.tsx +37 -0
- package/dashboard/components/CodeReference.tsx +129 -0
- package/dashboard/components/CommandPalette.tsx +135 -0
- package/dashboard/components/ConfidenceBadge.tsx +53 -0
- package/dashboard/components/DashboardLayout.tsx +450 -0
- package/dashboard/components/FilterableTable.tsx +293 -0
- package/dashboard/components/LiveStatus.tsx +99 -0
- package/dashboard/components/MarkdownRenderer.tsx +40 -0
- package/dashboard/components/MermaidViewer.tsx +267 -0
- package/dashboard/components/NotYetGenerated.tsx +32 -0
- package/dashboard/components/SeverityBadge.tsx +28 -0
- package/dashboard/components/SignalBars.tsx +27 -0
- package/dashboard/components/SortableTable.tsx +122 -0
- package/dashboard/lib/conformance-tokens.ts +49 -0
- package/dashboard/lib/data.ts +102 -0
- package/dashboard/lib/watcher.ts +45 -0
- package/dashboard/next-env.d.ts +5 -0
- package/dashboard/next.config.mjs +9 -0
- package/dashboard/postcss.config.cjs +6 -0
- package/dashboard/tailwind.config.ts +79 -0
- package/dashboard/tsconfig.json +21 -0
- package/dist/analysis/access-control.d.ts +24 -0
- package/dist/analysis/access-control.d.ts.map +1 -0
- package/dist/analysis/access-control.js +378 -0
- package/dist/analysis/access-control.js.map +1 -0
- package/dist/analysis/attack-surface.d.ts +51 -0
- package/dist/analysis/attack-surface.d.ts.map +1 -0
- package/dist/analysis/attack-surface.js +206 -0
- package/dist/analysis/attack-surface.js.map +1 -0
- package/dist/analysis/constraint-extraction.d.ts +25 -0
- package/dist/analysis/constraint-extraction.d.ts.map +1 -0
- package/dist/analysis/constraint-extraction.js +398 -0
- package/dist/analysis/constraint-extraction.js.map +1 -0
- package/dist/analysis/context-assembler.d.ts +16 -0
- package/dist/analysis/context-assembler.d.ts.map +1 -0
- package/dist/analysis/context-assembler.js +88 -0
- package/dist/analysis/context-assembler.js.map +1 -0
- package/dist/analysis/dependency-graph.d.ts +31 -0
- package/dist/analysis/dependency-graph.d.ts.map +1 -0
- package/dist/analysis/dependency-graph.js +223 -0
- package/dist/analysis/dependency-graph.js.map +1 -0
- package/dist/analysis/erc-detection.d.ts +16 -0
- package/dist/analysis/erc-detection.d.ts.map +1 -0
- package/dist/analysis/erc-detection.js +81 -0
- package/dist/analysis/erc-detection.js.map +1 -0
- package/dist/analysis/external-calls.d.ts +8 -0
- package/dist/analysis/external-calls.d.ts.map +1 -0
- package/dist/analysis/external-calls.js +124 -0
- package/dist/analysis/external-calls.js.map +1 -0
- package/dist/analysis/nsloc.d.ts +46 -0
- package/dist/analysis/nsloc.d.ts.map +1 -0
- package/dist/analysis/nsloc.js +106 -0
- package/dist/analysis/nsloc.js.map +1 -0
- package/dist/analysis/pattern-detection.d.ts +20 -0
- package/dist/analysis/pattern-detection.d.ts.map +1 -0
- package/dist/analysis/pattern-detection.js +236 -0
- package/dist/analysis/pattern-detection.js.map +1 -0
- package/dist/analysis/state-variables.d.ts +33 -0
- package/dist/analysis/state-variables.d.ts.map +1 -0
- package/dist/analysis/state-variables.js +179 -0
- package/dist/analysis/state-variables.js.map +1 -0
- package/dist/commands/access.d.ts +3 -0
- package/dist/commands/access.d.ts.map +1 -0
- package/dist/commands/access.js +99 -0
- package/dist/commands/access.js.map +1 -0
- package/dist/commands/ai-status.d.ts +3 -0
- package/dist/commands/ai-status.d.ts.map +1 -0
- package/dist/commands/ai-status.js +172 -0
- package/dist/commands/ai-status.js.map +1 -0
- package/dist/commands/analyze.d.ts +3 -0
- package/dist/commands/analyze.d.ts.map +1 -0
- package/dist/commands/analyze.js +101 -0
- package/dist/commands/analyze.js.map +1 -0
- package/dist/commands/calls.d.ts +3 -0
- package/dist/commands/calls.d.ts.map +1 -0
- package/dist/commands/calls.js +92 -0
- package/dist/commands/calls.js.map +1 -0
- package/dist/commands/claude.d.ts +3 -0
- package/dist/commands/claude.d.ts.map +1 -0
- package/dist/commands/claude.js +42 -0
- package/dist/commands/claude.js.map +1 -0
- package/dist/commands/constraints.d.ts +3 -0
- package/dist/commands/constraints.d.ts.map +1 -0
- package/dist/commands/constraints.js +32 -0
- package/dist/commands/constraints.js.map +1 -0
- package/dist/commands/context.d.ts +3 -0
- package/dist/commands/context.d.ts.map +1 -0
- package/dist/commands/context.js +57 -0
- package/dist/commands/context.js.map +1 -0
- package/dist/commands/dashboard.d.ts +3 -0
- package/dist/commands/dashboard.d.ts.map +1 -0
- package/dist/commands/dashboard.js +95 -0
- package/dist/commands/dashboard.js.map +1 -0
- package/dist/commands/deps.d.ts +3 -0
- package/dist/commands/deps.d.ts.map +1 -0
- package/dist/commands/deps.js +67 -0
- package/dist/commands/deps.js.map +1 -0
- package/dist/commands/doctor.d.ts +17 -0
- package/dist/commands/doctor.d.ts.map +1 -0
- package/dist/commands/doctor.js +154 -0
- package/dist/commands/doctor.js.map +1 -0
- package/dist/commands/init.d.ts +3 -0
- package/dist/commands/init.d.ts.map +1 -0
- package/dist/commands/init.js +330 -0
- package/dist/commands/init.js.map +1 -0
- package/dist/commands/patterns.d.ts +3 -0
- package/dist/commands/patterns.d.ts.map +1 -0
- package/dist/commands/patterns.js +40 -0
- package/dist/commands/patterns.js.map +1 -0
- package/dist/commands/state.d.ts +3 -0
- package/dist/commands/state.d.ts.map +1 -0
- package/dist/commands/state.js +92 -0
- package/dist/commands/state.js.map +1 -0
- package/dist/commands/stats.d.ts +3 -0
- package/dist/commands/stats.d.ts.map +1 -0
- package/dist/commands/stats.js +347 -0
- package/dist/commands/stats.js.map +1 -0
- package/dist/commands/surface.d.ts +3 -0
- package/dist/commands/surface.d.ts.map +1 -0
- package/dist/commands/surface.js +45 -0
- package/dist/commands/surface.js.map +1 -0
- package/dist/commands/update-skills.d.ts +3 -0
- package/dist/commands/update-skills.d.ts.map +1 -0
- package/dist/commands/update-skills.js +40 -0
- package/dist/commands/update-skills.js.map +1 -0
- package/dist/commands/update.d.ts +3 -0
- package/dist/commands/update.d.ts.map +1 -0
- package/dist/commands/update.js +157 -0
- package/dist/commands/update.js.map +1 -0
- package/dist/core/config.d.ts +24 -0
- package/dist/core/config.d.ts.map +1 -0
- package/dist/core/config.js +70 -0
- package/dist/core/config.js.map +1 -0
- package/dist/core/errors.d.ts +17 -0
- package/dist/core/errors.d.ts.map +1 -0
- package/dist/core/errors.js +113 -0
- package/dist/core/errors.js.map +1 -0
- package/dist/core/external-tools.d.ts +39 -0
- package/dist/core/external-tools.d.ts.map +1 -0
- package/dist/core/external-tools.js +151 -0
- package/dist/core/external-tools.js.map +1 -0
- package/dist/core/logger.d.ts +16 -0
- package/dist/core/logger.d.ts.map +1 -0
- package/dist/core/logger.js +22 -0
- package/dist/core/logger.js.map +1 -0
- package/dist/core/output.d.ts +13 -0
- package/dist/core/output.d.ts.map +1 -0
- package/dist/core/output.js +45 -0
- package/dist/core/output.js.map +1 -0
- package/dist/core/paths.d.ts +21 -0
- package/dist/core/paths.d.ts.map +1 -0
- package/dist/core/paths.js +32 -0
- package/dist/core/paths.js.map +1 -0
- package/dist/core/progress.d.ts +34 -0
- package/dist/core/progress.d.ts.map +1 -0
- package/dist/core/progress.js +119 -0
- package/dist/core/progress.js.map +1 -0
- package/dist/core/schema.d.ts +3197 -0
- package/dist/core/schema.d.ts.map +1 -0
- package/dist/core/schema.js +420 -0
- package/dist/core/schema.js.map +1 -0
- package/dist/core/skills.d.ts +28 -0
- package/dist/core/skills.d.ts.map +1 -0
- package/dist/core/skills.js +82 -0
- package/dist/core/skills.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +43 -0
- package/dist/index.js.map +1 -0
- package/dist/parsers/lcov.d.ts +27 -0
- package/dist/parsers/lcov.d.ts.map +1 -0
- package/dist/parsers/lcov.js +68 -0
- package/dist/parsers/lcov.js.map +1 -0
- package/dist/parsers/slither.d.ts +63 -0
- package/dist/parsers/slither.d.ts.map +1 -0
- package/dist/parsers/slither.js +160 -0
- package/dist/parsers/slither.js.map +1 -0
- package/dist/parsers/solc.d.ts +19 -0
- package/dist/parsers/solc.d.ts.map +1 -0
- package/dist/parsers/solc.js +43 -0
- package/dist/parsers/solc.js.map +1 -0
- package/dist/parsers/solidity-parser.d.ts +77 -0
- package/dist/parsers/solidity-parser.d.ts.map +1 -0
- package/dist/parsers/solidity-parser.js +357 -0
- package/dist/parsers/solidity-parser.js.map +1 -0
- package/dist/skills/generate-overleaf.md +326 -0
- package/dist/skills/generate-poc.md +186 -0
- package/dist/skills/ingest-aa-report.md +172 -0
- package/dist/skills/init-audit.md +271 -0
- package/dist/skills/sync-issues.md +266 -0
- package/dist/skills/validate-issue.md +149 -0
- package/dist/skills/write-finding.md +142 -0
- package/dist/types/index.d.ts +30 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +2 -0
- package/dist/types/index.js.map +1 -0
- package/package.json +81 -0
|
@@ -0,0 +1,333 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { useState, useMemo } from 'react';
|
|
4
|
+
|
|
5
|
+
// ─── Types ──────────────────────────────────────────────────────────
|
|
6
|
+
|
|
7
|
+
interface ContractInfo {
|
|
8
|
+
file: string;
|
|
9
|
+
contract: string;
|
|
10
|
+
type: string;
|
|
11
|
+
nsloc: number;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export interface ProgressClientProps {
|
|
15
|
+
contracts: ContractInfo[];
|
|
16
|
+
totalsNsloc: number;
|
|
17
|
+
reviewedContracts: Record<string, boolean>;
|
|
18
|
+
auditSteps: { label: string; completed: boolean }[];
|
|
19
|
+
findingsTotal: number;
|
|
20
|
+
findingsBySeverity: Record<string, number>;
|
|
21
|
+
findingsTracked: number;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
// ─── Helpers ────────────────────────────────────────────────────────
|
|
25
|
+
|
|
26
|
+
function contractKey(c: ContractInfo): string {
|
|
27
|
+
return `${c.file}::${c.contract}`;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
function pctBarColor(pct: number): string {
|
|
31
|
+
if (pct >= 67) return 'bg-[var(--success)]';
|
|
32
|
+
if (pct >= 34) return 'bg-[var(--medium)]';
|
|
33
|
+
return 'bg-[var(--critical)]';
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
function pctTextColor(pct: number): string {
|
|
37
|
+
if (pct >= 67) return 'text-[var(--success)]';
|
|
38
|
+
if (pct >= 34) return 'text-[var(--medium)]';
|
|
39
|
+
return 'text-[var(--critical)]';
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
const TYPE_ORDER: Record<string, number> = {
|
|
43
|
+
contract: 0,
|
|
44
|
+
abstract: 1,
|
|
45
|
+
library: 2,
|
|
46
|
+
interface: 3,
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
const TYPE_STYLES: Record<string, string> = {
|
|
50
|
+
contract: 'bg-[var(--low)]/15 text-[var(--low)]',
|
|
51
|
+
interface: 'bg-[var(--info)]/15 text-[var(--info)]',
|
|
52
|
+
library: 'bg-[var(--info)]/15 text-[var(--info)]',
|
|
53
|
+
abstract: 'bg-[var(--high)]/15 text-[var(--high)]',
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
const SEVERITY_ORDER: string[] = ['Critical', 'High', 'Medium', 'Low', 'Info', 'Gas'];
|
|
57
|
+
|
|
58
|
+
const SEVERITY_COLORS: Record<string, string> = {
|
|
59
|
+
Critical: 'bg-[var(--critical)]/15 text-[var(--critical)]',
|
|
60
|
+
High: 'bg-[var(--high)]/15 text-[var(--high)]',
|
|
61
|
+
Medium: 'bg-[var(--medium)]/15 text-[var(--medium)]',
|
|
62
|
+
Low: 'bg-[var(--low)]/15 text-[var(--low)]',
|
|
63
|
+
Info: 'bg-[var(--info)]/15 text-[var(--info)]',
|
|
64
|
+
Gas: 'bg-surface-3 text-text-secondary',
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
// ─── Component ──────────────────────────────────────────────────────
|
|
68
|
+
|
|
69
|
+
type CheckFilter = 'all' | 'checked' | 'unchecked';
|
|
70
|
+
|
|
71
|
+
export function ProgressClient({
|
|
72
|
+
contracts,
|
|
73
|
+
totalsNsloc,
|
|
74
|
+
reviewedContracts: initialReviewed,
|
|
75
|
+
auditSteps,
|
|
76
|
+
findingsTotal,
|
|
77
|
+
findingsBySeverity,
|
|
78
|
+
findingsTracked,
|
|
79
|
+
}: ProgressClientProps) {
|
|
80
|
+
const [reviewed, setReviewed] = useState<Record<string, boolean>>(initialReviewed);
|
|
81
|
+
const [checkFilter, setCheckFilter] = useState<CheckFilter>('all');
|
|
82
|
+
|
|
83
|
+
// ── Calculations ──
|
|
84
|
+
|
|
85
|
+
const reviewedNsloc = useMemo(
|
|
86
|
+
() => contracts.filter((c) => reviewed[contractKey(c)]).reduce((s, c) => s + c.nsloc, 0),
|
|
87
|
+
[contracts, reviewed],
|
|
88
|
+
);
|
|
89
|
+
|
|
90
|
+
const reviewedCount = useMemo(
|
|
91
|
+
() => contracts.filter((c) => reviewed[contractKey(c)]).length,
|
|
92
|
+
[contracts, reviewed],
|
|
93
|
+
);
|
|
94
|
+
|
|
95
|
+
const contractPct = totalsNsloc > 0 ? (reviewedNsloc / totalsNsloc) * 100 : 0;
|
|
96
|
+
const stepsCompleted = auditSteps.filter((s) => s.completed).length;
|
|
97
|
+
const stepsPct = (stepsCompleted / auditSteps.length) * 100;
|
|
98
|
+
const triagePct = findingsTotal > 0 ? (findingsTracked / findingsTotal) * 100 : 100;
|
|
99
|
+
const overallPct = 0.7 * contractPct + 0.2 * stepsPct + 0.1 * triagePct;
|
|
100
|
+
|
|
101
|
+
// ── Sorted & filtered contracts ──
|
|
102
|
+
|
|
103
|
+
const sortedContracts = useMemo(() => {
|
|
104
|
+
const sorted = [...contracts].sort((a, b) => {
|
|
105
|
+
const typeA = TYPE_ORDER[a.type] ?? 99;
|
|
106
|
+
const typeB = TYPE_ORDER[b.type] ?? 99;
|
|
107
|
+
if (typeA !== typeB) return typeA - typeB;
|
|
108
|
+
return b.nsloc - a.nsloc;
|
|
109
|
+
});
|
|
110
|
+
if (checkFilter === 'all') return sorted;
|
|
111
|
+
return sorted.filter((c) => {
|
|
112
|
+
const isChecked = !!reviewed[contractKey(c)];
|
|
113
|
+
return checkFilter === 'checked' ? isChecked : !isChecked;
|
|
114
|
+
});
|
|
115
|
+
}, [contracts, checkFilter, reviewed]);
|
|
116
|
+
|
|
117
|
+
const maxNsloc = useMemo(
|
|
118
|
+
() => Math.max(...contracts.map((c) => c.nsloc), 1),
|
|
119
|
+
[contracts],
|
|
120
|
+
);
|
|
121
|
+
|
|
122
|
+
// ── Toggle handler ──
|
|
123
|
+
|
|
124
|
+
function toggleContract(c: ContractInfo) {
|
|
125
|
+
const key = contractKey(c);
|
|
126
|
+
const next = !reviewed[key];
|
|
127
|
+
setReviewed((prev) => ({ ...prev, [key]: next }));
|
|
128
|
+
|
|
129
|
+
// Fire-and-forget persist
|
|
130
|
+
fetch('/api/progress', {
|
|
131
|
+
method: 'POST',
|
|
132
|
+
headers: { 'Content-Type': 'application/json' },
|
|
133
|
+
body: JSON.stringify({ reviewed_contracts: { [key]: next } }),
|
|
134
|
+
}).catch(() => {/* silent */});
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
// ── Render ──
|
|
138
|
+
|
|
139
|
+
return (
|
|
140
|
+
<>
|
|
141
|
+
{/* A. Overall Progress Bar */}
|
|
142
|
+
<div className="mb-sp-5 rounded-md border border-border-default bg-surface-2 p-sp-4">
|
|
143
|
+
<div className="mb-2 flex items-baseline justify-between gap-sp-2">
|
|
144
|
+
<span className={`text-display font-semibold ${pctTextColor(overallPct)}`}>
|
|
145
|
+
{overallPct.toFixed(0)}%
|
|
146
|
+
</span>
|
|
147
|
+
<span
|
|
148
|
+
className="text-caption text-text-tertiary inline-flex items-center gap-1.5"
|
|
149
|
+
title="Overall progress is a weighted average: 70% nSLOC reviewed (contract review), 20% audit-step completion, 10% findings triage."
|
|
150
|
+
aria-label="Overall progress formula: 70% contract review by nSLOC, 20% step completion, 10% findings triage"
|
|
151
|
+
>
|
|
152
|
+
Contract Review {contractPct.toFixed(0)}% · Steps {stepsPct.toFixed(0)}% · Triage {triagePct.toFixed(0)}%
|
|
153
|
+
<svg className="h-3.5 w-3.5 text-text-tertiary" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor">
|
|
154
|
+
<path d="M8 1.5a6.5 6.5 0 1 0 0 13 6.5 6.5 0 0 0 0-13zM7.25 7.25a.75.75 0 0 1 1.5 0v3.5a.75.75 0 0 1-1.5 0v-3.5zM8 4.5a.875.875 0 1 1 0 1.75A.875.875 0 0 1 8 4.5z" />
|
|
155
|
+
</svg>
|
|
156
|
+
</span>
|
|
157
|
+
</div>
|
|
158
|
+
<div className="h-3 w-full overflow-hidden rounded-full bg-surface-3">
|
|
159
|
+
<div
|
|
160
|
+
className={`h-full rounded-full transition-all duration-300 ${pctBarColor(overallPct)}`}
|
|
161
|
+
style={{ width: `${Math.min(overallPct, 100)}%` }}
|
|
162
|
+
role="progressbar"
|
|
163
|
+
aria-valuenow={Math.round(overallPct)}
|
|
164
|
+
aria-valuemin={0}
|
|
165
|
+
aria-valuemax={100}
|
|
166
|
+
aria-label="Overall audit progress"
|
|
167
|
+
/>
|
|
168
|
+
</div>
|
|
169
|
+
<p className="mt-2 text-caption text-text-tertiary">
|
|
170
|
+
Weighted: 70% nSLOC reviewed · 20% audit steps · 10% findings triage. Hover the breakdown for details.
|
|
171
|
+
</p>
|
|
172
|
+
</div>
|
|
173
|
+
|
|
174
|
+
{/* B. KPI Cards */}
|
|
175
|
+
<div className="mb-sp-5 grid grid-cols-2 gap-sp-3 lg:grid-cols-4">
|
|
176
|
+
<div className="rounded-md border border-border-default bg-surface-2 p-sp-4">
|
|
177
|
+
<div className={`text-display ${pctTextColor(overallPct)}`}>{overallPct.toFixed(0)}%</div>
|
|
178
|
+
<div className="mt-1 text-caption text-text-secondary">Overall Progress</div>
|
|
179
|
+
</div>
|
|
180
|
+
<div className="rounded-md border border-border-default bg-surface-2 p-sp-4">
|
|
181
|
+
<div className="text-display text-text-primary">
|
|
182
|
+
{reviewedCount} / {contracts.length}
|
|
183
|
+
</div>
|
|
184
|
+
<div className="mt-1 text-caption text-text-secondary">Contracts Reviewed</div>
|
|
185
|
+
</div>
|
|
186
|
+
<div className="rounded-md border border-border-default bg-surface-2 p-sp-4">
|
|
187
|
+
<div className="text-display text-text-primary">
|
|
188
|
+
{reviewedNsloc.toLocaleString()} / {totalsNsloc.toLocaleString()}
|
|
189
|
+
</div>
|
|
190
|
+
<div className="mt-1 text-caption text-text-secondary">nSLOC Reviewed</div>
|
|
191
|
+
</div>
|
|
192
|
+
<div className="rounded-md border border-border-default bg-surface-2 p-sp-4">
|
|
193
|
+
<div className="text-display text-text-primary">{findingsTotal}</div>
|
|
194
|
+
<div className="mt-1 text-caption text-text-secondary">Findings</div>
|
|
195
|
+
{Object.keys(findingsBySeverity).length > 0 && (
|
|
196
|
+
<div className="mt-2 flex flex-wrap gap-1.5">
|
|
197
|
+
{SEVERITY_ORDER.filter((sev) => findingsBySeverity[sev]).map((sev) => (
|
|
198
|
+
<span
|
|
199
|
+
key={sev}
|
|
200
|
+
className={`inline-flex items-center rounded-md px-2 py-0.5 text-caption font-medium ${SEVERITY_COLORS[sev] ?? 'bg-surface-3 text-text-secondary'}`}
|
|
201
|
+
>
|
|
202
|
+
{findingsBySeverity[sev]} {sev}
|
|
203
|
+
</span>
|
|
204
|
+
))}
|
|
205
|
+
</div>
|
|
206
|
+
)}
|
|
207
|
+
</div>
|
|
208
|
+
</div>
|
|
209
|
+
|
|
210
|
+
{/* C. Audit Steps */}
|
|
211
|
+
<div className="mb-sp-5">
|
|
212
|
+
<h3 className="mb-sp-2 text-heading font-medium text-text-primary">Audit Steps</h3>
|
|
213
|
+
<div className="flex flex-wrap gap-2">
|
|
214
|
+
{auditSteps.map((step) => (
|
|
215
|
+
<span
|
|
216
|
+
key={step.label}
|
|
217
|
+
className={`inline-flex items-center gap-1.5 rounded-full px-3 py-1 text-caption font-medium ${
|
|
218
|
+
step.completed
|
|
219
|
+
? 'bg-[var(--success)]/15 text-[var(--success)]'
|
|
220
|
+
: 'bg-surface-3 text-text-tertiary'
|
|
221
|
+
}`}
|
|
222
|
+
>
|
|
223
|
+
{step.completed ? (
|
|
224
|
+
<svg className="h-3.5 w-3.5" viewBox="0 0 20 20" fill="currentColor">
|
|
225
|
+
<path fillRule="evenodd" d="M16.704 4.153a.75.75 0 0 1 .143 1.052l-8 10.5a.75.75 0 0 1-1.127.075l-4.5-4.5a.75.75 0 0 1 1.06-1.06l3.894 3.893 7.48-9.817a.75.75 0 0 1 1.05-.143Z" clipRule="evenodd" />
|
|
226
|
+
</svg>
|
|
227
|
+
) : (
|
|
228
|
+
<svg className="h-3.5 w-3.5" viewBox="0 0 20 20" fill="currentColor">
|
|
229
|
+
<path fillRule="evenodd" d="M10 18a8 8 0 1 0 0-16 8 8 0 0 0 0 16Zm.75-11.25a.75.75 0 0 0-1.5 0v2.5h-2.5a.75.75 0 0 0 0 1.5h2.5v2.5a.75.75 0 0 0 1.5 0v-2.5h2.5a.75.75 0 0 0 0-1.5h-2.5v-2.5Z" clipRule="evenodd" />
|
|
230
|
+
</svg>
|
|
231
|
+
)}
|
|
232
|
+
{step.label}
|
|
233
|
+
</span>
|
|
234
|
+
))}
|
|
235
|
+
</div>
|
|
236
|
+
</div>
|
|
237
|
+
|
|
238
|
+
{/* D. Contract Checklist */}
|
|
239
|
+
<div>
|
|
240
|
+
<div className="mb-sp-2 flex items-center justify-between">
|
|
241
|
+
<h3 className="text-heading font-medium text-text-primary">Contract Checklist</h3>
|
|
242
|
+
<div className="inline-flex rounded-md bg-surface-3 p-0.5">
|
|
243
|
+
{(['all', 'unchecked', 'checked'] as const).map((f) => (
|
|
244
|
+
<button
|
|
245
|
+
key={f}
|
|
246
|
+
type="button"
|
|
247
|
+
onClick={() => setCheckFilter(f)}
|
|
248
|
+
className={`rounded-sm px-2.5 py-1 text-caption font-medium ${
|
|
249
|
+
checkFilter === f
|
|
250
|
+
? 'bg-surface-2 text-text-primary shadow-sm'
|
|
251
|
+
: 'text-text-secondary hover:text-text-primary'
|
|
252
|
+
}`}
|
|
253
|
+
>
|
|
254
|
+
{f === 'all' ? `All (${contracts.length})` : f === 'checked' ? `Reviewed (${reviewedCount})` : `Remaining (${contracts.length - reviewedCount})`}
|
|
255
|
+
</button>
|
|
256
|
+
))}
|
|
257
|
+
</div>
|
|
258
|
+
</div>
|
|
259
|
+
<div className="overflow-x-auto rounded-md border border-border-default">
|
|
260
|
+
<table className="w-full text-left text-body">
|
|
261
|
+
<thead className="border-b border-border-default bg-surface-2 text-caption font-medium uppercase tracking-wider text-text-tertiary">
|
|
262
|
+
<tr>
|
|
263
|
+
<th className="w-10 px-sp-3 py-sp-2" />
|
|
264
|
+
<th className="px-sp-4 py-sp-2">Contract</th>
|
|
265
|
+
<th className="px-sp-4 py-sp-2">File</th>
|
|
266
|
+
<th className="px-sp-4 py-sp-2">Type</th>
|
|
267
|
+
<th className="px-sp-4 py-sp-2 text-right">nSLOC</th>
|
|
268
|
+
<th className="w-32 px-sp-4 py-sp-2">Weight</th>
|
|
269
|
+
</tr>
|
|
270
|
+
</thead>
|
|
271
|
+
<tbody className="divide-y divide-border-subtle">
|
|
272
|
+
{sortedContracts.map((c) => {
|
|
273
|
+
const key = contractKey(c);
|
|
274
|
+
const isChecked = !!reviewed[key];
|
|
275
|
+
const barWidth = (c.nsloc / maxNsloc) * 100;
|
|
276
|
+
return (
|
|
277
|
+
<tr
|
|
278
|
+
key={key}
|
|
279
|
+
className={`h-9 transition-colors ${
|
|
280
|
+
isChecked ? 'bg-[var(--success)]/5' : 'bg-surface-1'
|
|
281
|
+
} hover:bg-surface-3`}
|
|
282
|
+
>
|
|
283
|
+
<td className="px-sp-3 py-sp-2">
|
|
284
|
+
<button
|
|
285
|
+
type="button"
|
|
286
|
+
onClick={() => toggleContract(c)}
|
|
287
|
+
className={`flex h-5 w-5 items-center justify-center rounded border transition-colors ${
|
|
288
|
+
isChecked
|
|
289
|
+
? 'border-[var(--accent)] bg-[var(--accent)] text-surface-0'
|
|
290
|
+
: 'border-border-emphasis bg-surface-1 hover:border-[var(--accent)]'
|
|
291
|
+
}`}
|
|
292
|
+
>
|
|
293
|
+
{isChecked && (
|
|
294
|
+
<svg className="h-3 w-3" viewBox="0 0 12 12" fill="none" stroke="currentColor" strokeWidth={2}>
|
|
295
|
+
<path strokeLinecap="round" strokeLinejoin="round" d="M2.5 6l2.5 2.5 4.5-5" />
|
|
296
|
+
</svg>
|
|
297
|
+
)}
|
|
298
|
+
</button>
|
|
299
|
+
</td>
|
|
300
|
+
<td className="px-sp-4 py-sp-2 font-medium text-text-primary">{c.contract}</td>
|
|
301
|
+
<td className="max-w-[200px] truncate px-sp-4 py-sp-2 font-mono text-caption text-text-tertiary">
|
|
302
|
+
{c.file}
|
|
303
|
+
</td>
|
|
304
|
+
<td className="px-sp-4 py-sp-2">
|
|
305
|
+
<span
|
|
306
|
+
className={`inline-flex items-center rounded-sm px-2 py-0.5 text-caption font-medium ${
|
|
307
|
+
TYPE_STYLES[c.type] ?? 'bg-surface-3 text-text-secondary'
|
|
308
|
+
}`}
|
|
309
|
+
>
|
|
310
|
+
{c.type}
|
|
311
|
+
</span>
|
|
312
|
+
</td>
|
|
313
|
+
<td className="px-sp-4 py-sp-2 text-right font-mono tabular-nums text-text-secondary">
|
|
314
|
+
{c.nsloc}
|
|
315
|
+
</td>
|
|
316
|
+
<td className="px-sp-4 py-sp-2">
|
|
317
|
+
<div className="h-1.5 w-full overflow-hidden rounded-full bg-surface-3">
|
|
318
|
+
<div
|
|
319
|
+
className="h-full rounded-full bg-[var(--accent)]"
|
|
320
|
+
style={{ width: `${barWidth}%` }}
|
|
321
|
+
/>
|
|
322
|
+
</div>
|
|
323
|
+
</td>
|
|
324
|
+
</tr>
|
|
325
|
+
);
|
|
326
|
+
})}
|
|
327
|
+
</tbody>
|
|
328
|
+
</table>
|
|
329
|
+
</div>
|
|
330
|
+
</div>
|
|
331
|
+
</>
|
|
332
|
+
);
|
|
333
|
+
}
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import { readJsonFile, fileExists } from '@/lib/data';
|
|
2
|
+
import { NotYetGenerated } from '@/components/NotYetGenerated';
|
|
3
|
+
import { ProgressClient, type ProgressClientProps } from './ProgressClient';
|
|
4
|
+
|
|
5
|
+
// ─── Types ──────────────────────────────────────────────────────────
|
|
6
|
+
|
|
7
|
+
interface PerContractStats {
|
|
8
|
+
file: string;
|
|
9
|
+
contract: string;
|
|
10
|
+
type: string;
|
|
11
|
+
nsloc: number;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
interface Stats {
|
|
15
|
+
totals: { nsloc: number };
|
|
16
|
+
per_contract: PerContractStats[];
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
interface ProgressData {
|
|
20
|
+
updated_at: string;
|
|
21
|
+
reviewed_contracts: Record<string, boolean>;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
interface Finding {
|
|
25
|
+
id: string;
|
|
26
|
+
severity: string;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
interface TrackingEntry {
|
|
30
|
+
id: string;
|
|
31
|
+
finding_id?: string | null;
|
|
32
|
+
severity: string;
|
|
33
|
+
status: string;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
// ─── Audit Steps ────────────────────────────────────────────────────
|
|
37
|
+
|
|
38
|
+
const AUDIT_STEPS: { label: string; file: string }[] = [
|
|
39
|
+
{ label: 'Stats', file: 'stats.json' },
|
|
40
|
+
{ label: 'Dependencies', file: 'deps.json' },
|
|
41
|
+
{ label: 'Access Control', file: 'access-control.json' },
|
|
42
|
+
{ label: 'State Analysis', file: 'state-vars.json' },
|
|
43
|
+
{ label: 'External Calls', file: 'external-calls.json' },
|
|
44
|
+
{ label: 'Overview', file: 'overview.md' },
|
|
45
|
+
{ label: 'Diagram', file: 'diagrams/diagram.mmd' },
|
|
46
|
+
{ label: 'Spec Conformance', file: 'spec-conformance.json' },
|
|
47
|
+
{ label: 'Findings', file: 'findings.json' },
|
|
48
|
+
];
|
|
49
|
+
|
|
50
|
+
// ─── Component ──────────────────────────────────────────────────────
|
|
51
|
+
|
|
52
|
+
export default function ProgressPage() {
|
|
53
|
+
const stats = readJsonFile<Stats>('stats.json');
|
|
54
|
+
|
|
55
|
+
if (!stats) {
|
|
56
|
+
return (
|
|
57
|
+
<div>
|
|
58
|
+
<h2 className="mb-sp-5 text-title font-semibold text-text-primary">Progress</h2>
|
|
59
|
+
<NotYetGenerated command="hex stats" />
|
|
60
|
+
</div>
|
|
61
|
+
);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
const progress = readJsonFile<ProgressData>('progress.json');
|
|
65
|
+
const findingsData = readJsonFile<{ findings: Finding[] }>('findings.json');
|
|
66
|
+
const trackingRaw = readJsonFile<{ findings?: TrackingEntry[]; issues?: TrackingEntry[] }>(
|
|
67
|
+
'tracking.json',
|
|
68
|
+
);
|
|
69
|
+
|
|
70
|
+
// Derive audit step completion
|
|
71
|
+
const auditSteps: ProgressClientProps['auditSteps'] = AUDIT_STEPS.map((step) => ({
|
|
72
|
+
label: step.label,
|
|
73
|
+
completed: fileExists(step.file),
|
|
74
|
+
}));
|
|
75
|
+
|
|
76
|
+
// Merge findings from both sources
|
|
77
|
+
const allFindingIds = new Set<string>();
|
|
78
|
+
const trackedFindingIds = new Set<string>();
|
|
79
|
+
const findingsBySeverity: Record<string, number> = {};
|
|
80
|
+
|
|
81
|
+
for (const f of findingsData?.findings ?? []) {
|
|
82
|
+
allFindingIds.add(f.id);
|
|
83
|
+
findingsBySeverity[f.severity] = (findingsBySeverity[f.severity] ?? 0) + 1;
|
|
84
|
+
}
|
|
85
|
+
const trackingEntries = trackingRaw?.issues ?? trackingRaw?.findings ?? [];
|
|
86
|
+
for (const t of trackingEntries) {
|
|
87
|
+
const dedupeId = t.finding_id ?? t.id;
|
|
88
|
+
if (
|
|
89
|
+
t.status !== 'rejected' &&
|
|
90
|
+
t.status !== 'duplicate' &&
|
|
91
|
+
!allFindingIds.has(dedupeId) &&
|
|
92
|
+
!allFindingIds.has(t.id)
|
|
93
|
+
) {
|
|
94
|
+
allFindingIds.add(dedupeId);
|
|
95
|
+
if (t.severity) {
|
|
96
|
+
findingsBySeverity[t.severity] = (findingsBySeverity[t.severity] ?? 0) + 1;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
if (t.status === 'verified') {
|
|
100
|
+
trackedFindingIds.add(dedupeId);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
return (
|
|
105
|
+
<div>
|
|
106
|
+
<h2 className="mb-sp-5 text-title font-semibold text-text-primary">Progress</h2>
|
|
107
|
+
<ProgressClient
|
|
108
|
+
contracts={stats.per_contract}
|
|
109
|
+
totalsNsloc={stats.per_contract.reduce((s, c) => s + c.nsloc, 0)}
|
|
110
|
+
reviewedContracts={progress?.reviewed_contracts ?? {}}
|
|
111
|
+
auditSteps={auditSteps}
|
|
112
|
+
findingsTotal={allFindingIds.size}
|
|
113
|
+
findingsBySeverity={findingsBySeverity}
|
|
114
|
+
findingsTracked={trackedFindingIds.size}
|
|
115
|
+
/>
|
|
116
|
+
</div>
|
|
117
|
+
);
|
|
118
|
+
}
|