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,214 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { Fragment, useState } from 'react';
|
|
4
|
+
import {
|
|
5
|
+
CONFORMANCE_STATUS_BADGE,
|
|
6
|
+
CONFORMANCE_STATUS_ROW_BG,
|
|
7
|
+
} from '@/lib/conformance-tokens';
|
|
8
|
+
|
|
9
|
+
interface ConformanceCheck {
|
|
10
|
+
id: string;
|
|
11
|
+
requirement: string;
|
|
12
|
+
status: string;
|
|
13
|
+
details: string;
|
|
14
|
+
spec_section: string;
|
|
15
|
+
confidence?: string;
|
|
16
|
+
source?: string;
|
|
17
|
+
severity_hint?: string;
|
|
18
|
+
code_location?: { file: string; line_start: number; line_end: number };
|
|
19
|
+
spec_url?: string;
|
|
20
|
+
spec_anchor?: string;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
interface ConformanceTableProps {
|
|
24
|
+
checks: ConformanceCheck[];
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
const STATUS_BADGE_STYLES = CONFORMANCE_STATUS_BADGE as Record<string, string>;
|
|
28
|
+
const STATUS_ROW_BG = CONFORMANCE_STATUS_ROW_BG as Record<string, string>;
|
|
29
|
+
|
|
30
|
+
const SEVERITY_STYLES: Record<string, string> = {
|
|
31
|
+
Critical: 'bg-[var(--critical)]/18 text-[var(--critical)]',
|
|
32
|
+
High: 'bg-[var(--high)]/18 text-[var(--high)]',
|
|
33
|
+
Medium: 'bg-[var(--medium)]/18 text-[var(--medium)]',
|
|
34
|
+
Low: 'bg-[var(--low)]/18 text-[var(--low)]',
|
|
35
|
+
Info: 'bg-[var(--info)]/18 text-[var(--info)]',
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
const SOURCE_LABELS: Record<string, string> = {
|
|
39
|
+
external_docs: 'Docs',
|
|
40
|
+
natspec: 'NatSpec',
|
|
41
|
+
interface: 'Interface',
|
|
42
|
+
erc_eip: 'ERC/EIP',
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
export function ConformanceTable({ checks }: ConformanceTableProps) {
|
|
46
|
+
const [expandedRows, setExpandedRows] = useState<Set<string>>(new Set());
|
|
47
|
+
const [statusFilter, setStatusFilter] = useState<string | null>(null);
|
|
48
|
+
|
|
49
|
+
function toggleRow(id: string) {
|
|
50
|
+
setExpandedRows((prev) => {
|
|
51
|
+
const next = new Set(prev);
|
|
52
|
+
if (next.has(id)) next.delete(id);
|
|
53
|
+
else next.add(id);
|
|
54
|
+
return next;
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
const filteredChecks = statusFilter
|
|
59
|
+
? checks.filter((c) => c.status === statusFilter)
|
|
60
|
+
: checks;
|
|
61
|
+
|
|
62
|
+
// Filter pills
|
|
63
|
+
const statuses = ['DEVIATES', 'PARTIAL', 'UNVERIFIABLE', 'UNDOCUMENTED', 'CONFORMS'];
|
|
64
|
+
|
|
65
|
+
return (
|
|
66
|
+
<div>
|
|
67
|
+
{/* Status filter pills */}
|
|
68
|
+
<div className="mb-sp-3 flex flex-wrap gap-1">
|
|
69
|
+
<button
|
|
70
|
+
type="button"
|
|
71
|
+
onClick={() => setStatusFilter(null)}
|
|
72
|
+
aria-pressed={!statusFilter}
|
|
73
|
+
className={`rounded-md px-3 py-1.5 text-caption font-medium focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent ${
|
|
74
|
+
!statusFilter ? 'bg-accent text-surface-0' : 'bg-surface-3 text-text-secondary hover:text-text-primary'
|
|
75
|
+
}`}
|
|
76
|
+
>
|
|
77
|
+
All
|
|
78
|
+
</button>
|
|
79
|
+
{statuses.map((status) => {
|
|
80
|
+
const count = checks.filter((c) => c.status === status).length;
|
|
81
|
+
if (count === 0) return null;
|
|
82
|
+
const isActive = statusFilter === status;
|
|
83
|
+
return (
|
|
84
|
+
<button
|
|
85
|
+
key={status}
|
|
86
|
+
type="button"
|
|
87
|
+
onClick={() => setStatusFilter(isActive ? null : status)}
|
|
88
|
+
aria-pressed={isActive}
|
|
89
|
+
className={`rounded-md px-3 py-1.5 text-caption font-medium focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent ${
|
|
90
|
+
isActive ? 'bg-accent text-surface-0' : 'bg-surface-3 text-text-secondary hover:text-text-primary'
|
|
91
|
+
}`}
|
|
92
|
+
>
|
|
93
|
+
{status} <span className="opacity-60">{count}</span>
|
|
94
|
+
</button>
|
|
95
|
+
);
|
|
96
|
+
})}
|
|
97
|
+
</div>
|
|
98
|
+
|
|
99
|
+
{/* Table */}
|
|
100
|
+
<div className="overflow-x-auto rounded-md border border-border-default">
|
|
101
|
+
<table className="w-full text-left text-body">
|
|
102
|
+
<thead className="border-b border-border-default bg-surface-2 text-caption font-medium uppercase tracking-wider text-text-tertiary">
|
|
103
|
+
<tr>
|
|
104
|
+
<th scope="col" className="w-8 px-2 py-sp-2" />
|
|
105
|
+
<th scope="col" className="w-24 px-sp-4 py-sp-2">ID</th>
|
|
106
|
+
<th scope="col" className="px-sp-4 py-sp-2">Requirement</th>
|
|
107
|
+
<th scope="col" className="w-32 px-sp-4 py-sp-2">Status</th>
|
|
108
|
+
<th scope="col" className="w-24 px-sp-4 py-sp-2">Source</th>
|
|
109
|
+
</tr>
|
|
110
|
+
</thead>
|
|
111
|
+
<tbody className="divide-y divide-border-subtle">
|
|
112
|
+
{filteredChecks.map((check) => {
|
|
113
|
+
const isExpanded = expandedRows.has(check.id);
|
|
114
|
+
const badgeStyle = STATUS_BADGE_STYLES[check.status] ?? STATUS_BADGE_STYLES.UNDOCUMENTED;
|
|
115
|
+
const rowBg = STATUS_ROW_BG[check.status] ?? STATUS_ROW_BG.UNDOCUMENTED;
|
|
116
|
+
|
|
117
|
+
return (
|
|
118
|
+
<Fragment key={check.id}>
|
|
119
|
+
<tr
|
|
120
|
+
role="button"
|
|
121
|
+
tabIndex={0}
|
|
122
|
+
aria-expanded={isExpanded}
|
|
123
|
+
onClick={() => toggleRow(check.id)}
|
|
124
|
+
onKeyDown={(e) => { if (e.key === 'Enter' || e.key === ' ') { e.preventDefault(); toggleRow(check.id); } }}
|
|
125
|
+
className={`${rowBg} cursor-pointer hover:bg-surface-3`}
|
|
126
|
+
>
|
|
127
|
+
<td className="w-8 px-2 py-sp-2 text-text-tertiary">
|
|
128
|
+
<svg
|
|
129
|
+
aria-hidden="true"
|
|
130
|
+
className={`h-4 w-4 ${isExpanded ? 'rotate-90' : ''}`}
|
|
131
|
+
fill="none" viewBox="0 0 24 24" stroke="currentColor" strokeWidth={2}
|
|
132
|
+
>
|
|
133
|
+
<path strokeLinecap="round" strokeLinejoin="round" d="m9 5 7 7-7 7" />
|
|
134
|
+
</svg>
|
|
135
|
+
</td>
|
|
136
|
+
<td className="whitespace-nowrap px-sp-4 py-sp-2 font-mono text-caption text-text-secondary">
|
|
137
|
+
{check.id}
|
|
138
|
+
</td>
|
|
139
|
+
<td className="px-sp-4 py-sp-2 text-text-primary">
|
|
140
|
+
{check.requirement}
|
|
141
|
+
</td>
|
|
142
|
+
<td className="px-sp-4 py-sp-2">
|
|
143
|
+
<span className={`inline-flex items-center rounded-sm px-2 py-0.5 text-caption font-medium ${badgeStyle}`}>
|
|
144
|
+
{check.status}
|
|
145
|
+
</span>
|
|
146
|
+
</td>
|
|
147
|
+
<td className="px-sp-4 py-sp-2 text-caption text-text-tertiary">
|
|
148
|
+
{check.source
|
|
149
|
+
? (SOURCE_LABELS[check.source] ?? check.source)
|
|
150
|
+
: (check.spec_section ?? '-')}
|
|
151
|
+
</td>
|
|
152
|
+
</tr>
|
|
153
|
+
|
|
154
|
+
{isExpanded && (
|
|
155
|
+
<tr className={`${rowBg}`}>
|
|
156
|
+
<td colSpan={5} className="bg-surface-0 px-sp-6 py-sp-4">
|
|
157
|
+
<div className="text-body text-text-secondary">
|
|
158
|
+
<h4 className="mb-sp-2 text-caption font-medium uppercase text-text-tertiary">
|
|
159
|
+
Details
|
|
160
|
+
</h4>
|
|
161
|
+
<p className="whitespace-pre-wrap">{check.details}</p>
|
|
162
|
+
</div>
|
|
163
|
+
|
|
164
|
+
<div className="mt-sp-3 flex flex-wrap gap-sp-3">
|
|
165
|
+
{check.confidence && (
|
|
166
|
+
<div>
|
|
167
|
+
<span className="text-caption text-text-tertiary">Confidence: </span>
|
|
168
|
+
<span className="text-caption text-text-secondary">{check.confidence}</span>
|
|
169
|
+
</div>
|
|
170
|
+
)}
|
|
171
|
+
{check.severity_hint && (
|
|
172
|
+
<div>
|
|
173
|
+
<span className="text-caption text-text-tertiary">Severity: </span>
|
|
174
|
+
<span className={`inline-flex items-center rounded-sm px-2 py-0.5 text-caption font-medium ${SEVERITY_STYLES[check.severity_hint] ?? SEVERITY_STYLES.Info}`}>
|
|
175
|
+
{check.severity_hint}
|
|
176
|
+
</span>
|
|
177
|
+
</div>
|
|
178
|
+
)}
|
|
179
|
+
{check.code_location && (
|
|
180
|
+
<div>
|
|
181
|
+
<span className="text-caption text-text-tertiary">Location: </span>
|
|
182
|
+
<code className="rounded-sm bg-surface-3 px-1.5 py-0.5 text-caption text-text-secondary">
|
|
183
|
+
{check.code_location.file}:{check.code_location.line_start}
|
|
184
|
+
{check.code_location.line_end !== check.code_location.line_start &&
|
|
185
|
+
`-${check.code_location.line_end}`}
|
|
186
|
+
</code>
|
|
187
|
+
</div>
|
|
188
|
+
)}
|
|
189
|
+
{check.spec_url && (
|
|
190
|
+
<div>
|
|
191
|
+
<span className="text-caption text-text-tertiary">Spec: </span>
|
|
192
|
+
<a
|
|
193
|
+
href={check.spec_url}
|
|
194
|
+
target="_blank"
|
|
195
|
+
rel="noopener noreferrer"
|
|
196
|
+
className="text-caption text-accent hover:underline focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent rounded-sm"
|
|
197
|
+
>
|
|
198
|
+
{check.spec_anchor ?? check.spec_url.replace(/^https?:\/\//, '')}
|
|
199
|
+
</a>
|
|
200
|
+
</div>
|
|
201
|
+
)}
|
|
202
|
+
</div>
|
|
203
|
+
</td>
|
|
204
|
+
</tr>
|
|
205
|
+
)}
|
|
206
|
+
</Fragment>
|
|
207
|
+
);
|
|
208
|
+
})}
|
|
209
|
+
</tbody>
|
|
210
|
+
</table>
|
|
211
|
+
</div>
|
|
212
|
+
</div>
|
|
213
|
+
);
|
|
214
|
+
}
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
import { readJsonFile } from '@/lib/data';
|
|
2
|
+
import { NotYetGenerated } from '@/components/NotYetGenerated';
|
|
3
|
+
import {
|
|
4
|
+
CONFORMANCE_STATUS_DOT,
|
|
5
|
+
CONFORMANCE_STATUS_TEXT,
|
|
6
|
+
type ConformanceStatus,
|
|
7
|
+
} from '@/lib/conformance-tokens';
|
|
8
|
+
import { ConformanceTable } from './ConformanceTable';
|
|
9
|
+
|
|
10
|
+
// ─── Types matching CLI schema ──────────────────────────────────────
|
|
11
|
+
|
|
12
|
+
interface ConformanceItem {
|
|
13
|
+
id: string;
|
|
14
|
+
source: string;
|
|
15
|
+
spec_text: string;
|
|
16
|
+
spec_location?: Record<string, unknown>;
|
|
17
|
+
status: string;
|
|
18
|
+
finding: string;
|
|
19
|
+
code_location?: { file: string; line_start: number; line_end: number };
|
|
20
|
+
severity_hint?: string;
|
|
21
|
+
confidence?: string;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
interface ConformanceSummary {
|
|
25
|
+
total_checks: number;
|
|
26
|
+
conforms: number;
|
|
27
|
+
deviates: number;
|
|
28
|
+
partial: number;
|
|
29
|
+
unverifiable: number;
|
|
30
|
+
undocumented: number;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
interface ConformanceData {
|
|
34
|
+
checked_at?: string;
|
|
35
|
+
sources_checked?: Record<string, unknown>;
|
|
36
|
+
summary?: ConformanceSummary;
|
|
37
|
+
items?: ConformanceItem[];
|
|
38
|
+
checks?: Array<{
|
|
39
|
+
id: string;
|
|
40
|
+
requirement: string;
|
|
41
|
+
status: string;
|
|
42
|
+
details: string;
|
|
43
|
+
spec_section?: string;
|
|
44
|
+
confidence?: string;
|
|
45
|
+
}>;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export interface ConformanceCheck {
|
|
49
|
+
id: string;
|
|
50
|
+
requirement: string;
|
|
51
|
+
status: string;
|
|
52
|
+
details: string;
|
|
53
|
+
spec_section: string;
|
|
54
|
+
confidence?: string;
|
|
55
|
+
source?: string;
|
|
56
|
+
severity_hint?: string;
|
|
57
|
+
code_location?: { file: string; line_start: number; line_end: number };
|
|
58
|
+
spec_url?: string;
|
|
59
|
+
spec_anchor?: string;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
const STATUS_ORDER: Record<string, number> = {
|
|
63
|
+
DEVIATES: 0,
|
|
64
|
+
PARTIAL: 1,
|
|
65
|
+
UNVERIFIABLE: 2,
|
|
66
|
+
UNDOCUMENTED: 3,
|
|
67
|
+
CONFORMS: 4,
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
export default function ConformancePage() {
|
|
71
|
+
const data = readJsonFile<ConformanceData>('spec-conformance.json');
|
|
72
|
+
|
|
73
|
+
if (!data) {
|
|
74
|
+
return (
|
|
75
|
+
<div>
|
|
76
|
+
<h2 className="mb-sp-5 text-title font-semibold text-text-primary">
|
|
77
|
+
Spec Conformance
|
|
78
|
+
</h2>
|
|
79
|
+
<NotYetGenerated command="Use the check-spec-conformance skill" />
|
|
80
|
+
</div>
|
|
81
|
+
);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
let checks: ConformanceCheck[];
|
|
85
|
+
if (data.items) {
|
|
86
|
+
checks = data.items.map((item) => {
|
|
87
|
+
const loc = (item.spec_location ?? {}) as Record<string, unknown>;
|
|
88
|
+
const url = typeof loc.url === 'string' ? loc.url : undefined;
|
|
89
|
+
const anchor = typeof loc.section === 'string' ? loc.section : undefined;
|
|
90
|
+
return {
|
|
91
|
+
id: item.id,
|
|
92
|
+
requirement: item.spec_text,
|
|
93
|
+
status: item.status,
|
|
94
|
+
details: item.finding,
|
|
95
|
+
spec_section: item.source ?? '-',
|
|
96
|
+
confidence: item.confidence,
|
|
97
|
+
source: item.source,
|
|
98
|
+
severity_hint: item.severity_hint,
|
|
99
|
+
code_location: item.code_location,
|
|
100
|
+
spec_url: url,
|
|
101
|
+
spec_anchor: anchor,
|
|
102
|
+
};
|
|
103
|
+
});
|
|
104
|
+
} else if (data.checks) {
|
|
105
|
+
checks = data.checks.map((c) => ({
|
|
106
|
+
id: c.id,
|
|
107
|
+
requirement: c.requirement,
|
|
108
|
+
status: c.status,
|
|
109
|
+
details: c.details,
|
|
110
|
+
spec_section: c.spec_section ?? '-',
|
|
111
|
+
confidence: c.confidence,
|
|
112
|
+
}));
|
|
113
|
+
} else {
|
|
114
|
+
checks = [];
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
checks.sort((a, b) => {
|
|
118
|
+
const orderA = STATUS_ORDER[a.status] ?? 99;
|
|
119
|
+
const orderB = STATUS_ORDER[b.status] ?? 99;
|
|
120
|
+
return orderA - orderB;
|
|
121
|
+
});
|
|
122
|
+
|
|
123
|
+
const summary = data.summary ?? {
|
|
124
|
+
total_checks: checks.length,
|
|
125
|
+
conforms: checks.filter((c) => c.status === 'CONFORMS').length,
|
|
126
|
+
deviates: checks.filter((c) => c.status === 'DEVIATES').length,
|
|
127
|
+
partial: checks.filter((c) => c.status === 'PARTIAL').length,
|
|
128
|
+
unverifiable: checks.filter((c) => c.status === 'UNVERIFIABLE').length,
|
|
129
|
+
undocumented: checks.filter((c) => c.status === 'UNDOCUMENTED').length,
|
|
130
|
+
};
|
|
131
|
+
|
|
132
|
+
const summaryEntries: Array<{ status: ConformanceStatus; count: number }> = [
|
|
133
|
+
{ status: 'DEVIATES', count: summary.deviates },
|
|
134
|
+
{ status: 'PARTIAL', count: summary.partial },
|
|
135
|
+
{ status: 'UNVERIFIABLE', count: summary.unverifiable },
|
|
136
|
+
{ status: 'UNDOCUMENTED', count: summary.undocumented },
|
|
137
|
+
{ status: 'CONFORMS', count: summary.conforms },
|
|
138
|
+
];
|
|
139
|
+
|
|
140
|
+
return (
|
|
141
|
+
<div>
|
|
142
|
+
<h2 className="mb-sp-5 text-title font-semibold text-text-primary">
|
|
143
|
+
Spec Conformance
|
|
144
|
+
</h2>
|
|
145
|
+
|
|
146
|
+
{/* Summary pills */}
|
|
147
|
+
<div className="mb-sp-5 flex flex-wrap gap-sp-3">
|
|
148
|
+
{summaryEntries.map(({ status, count }) => (
|
|
149
|
+
<div
|
|
150
|
+
key={status}
|
|
151
|
+
className="flex items-center gap-2 rounded-md border border-border-default bg-surface-2 px-sp-4 py-sp-2"
|
|
152
|
+
>
|
|
153
|
+
<span className={`inline-block h-2.5 w-2.5 rounded-full ${CONFORMANCE_STATUS_DOT[status]}`} />
|
|
154
|
+
<span className={`text-caption font-medium ${CONFORMANCE_STATUS_TEXT[status]}`}>
|
|
155
|
+
{status}
|
|
156
|
+
</span>
|
|
157
|
+
<span className="text-heading font-semibold text-text-primary">
|
|
158
|
+
{count}
|
|
159
|
+
</span>
|
|
160
|
+
</div>
|
|
161
|
+
))}
|
|
162
|
+
</div>
|
|
163
|
+
|
|
164
|
+
<p className="mb-sp-3 text-body text-text-secondary">
|
|
165
|
+
{summary.total_checks} conformance check{summary.total_checks !== 1 ? 's' : ''}
|
|
166
|
+
{data.sources_checked && (
|
|
167
|
+
<span className="ml-2 text-text-tertiary">
|
|
168
|
+
(sources: {Object.entries(data.sources_checked)
|
|
169
|
+
.filter(([, v]) => v === true || (Array.isArray(v) && v.length > 0))
|
|
170
|
+
.map(([k]) => k.replace(/_/g, ' '))
|
|
171
|
+
.join(', ')})
|
|
172
|
+
</span>
|
|
173
|
+
)}
|
|
174
|
+
</p>
|
|
175
|
+
|
|
176
|
+
<ConformanceTable checks={checks} />
|
|
177
|
+
</div>
|
|
178
|
+
);
|
|
179
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { useEffect, useState } from 'react';
|
|
4
|
+
import { MermaidViewer, LoadingSpinner } from '@/components/MermaidViewer';
|
|
5
|
+
|
|
6
|
+
export default function DiagramPage() {
|
|
7
|
+
const [syntax, setSyntax] = useState<string | null>(null);
|
|
8
|
+
const [notFound, setNotFound] = useState(false);
|
|
9
|
+
const [loading, setLoading] = useState(true);
|
|
10
|
+
|
|
11
|
+
useEffect(() => {
|
|
12
|
+
fetch('/api/mermaid?file=diagram.mmd')
|
|
13
|
+
.then((res) => {
|
|
14
|
+
if (res.status === 404) {
|
|
15
|
+
setNotFound(true);
|
|
16
|
+
setLoading(false);
|
|
17
|
+
return null;
|
|
18
|
+
}
|
|
19
|
+
if (!res.ok) throw new Error('Failed to load diagram');
|
|
20
|
+
return res.json();
|
|
21
|
+
})
|
|
22
|
+
.then((data) => {
|
|
23
|
+
if (data?.syntax) {
|
|
24
|
+
setSyntax(data.syntax);
|
|
25
|
+
}
|
|
26
|
+
setLoading(false);
|
|
27
|
+
})
|
|
28
|
+
.catch(() => {
|
|
29
|
+
setNotFound(true);
|
|
30
|
+
setLoading(false);
|
|
31
|
+
});
|
|
32
|
+
}, []);
|
|
33
|
+
|
|
34
|
+
if (loading) {
|
|
35
|
+
return (
|
|
36
|
+
<div>
|
|
37
|
+
<h2 className="mb-sp-5 text-title font-semibold text-text-primary">Diagram</h2>
|
|
38
|
+
<div className="flex h-[600px] items-center justify-center rounded-md border border-border-default bg-surface-1">
|
|
39
|
+
<LoadingSpinner label="Loading diagram..." />
|
|
40
|
+
</div>
|
|
41
|
+
</div>
|
|
42
|
+
);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
if (notFound || !syntax) {
|
|
46
|
+
return (
|
|
47
|
+
<div>
|
|
48
|
+
<h2 className="mb-sp-5 text-title font-semibold text-text-primary">Diagram</h2>
|
|
49
|
+
<div className="flex flex-col items-center justify-center rounded-md border border-dashed border-border-emphasis bg-surface-1 py-sp-8">
|
|
50
|
+
<p className="mb-2 text-heading font-medium text-text-primary">Not Yet Generated</p>
|
|
51
|
+
<p className="text-body text-text-tertiary">
|
|
52
|
+
Use the diagram skill to generate diagram.mmd
|
|
53
|
+
</p>
|
|
54
|
+
</div>
|
|
55
|
+
</div>
|
|
56
|
+
);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
return (
|
|
60
|
+
<div>
|
|
61
|
+
<h2 className="mb-sp-5 text-title font-semibold text-text-primary">Diagram</h2>
|
|
62
|
+
<MermaidViewer syntax={syntax} />
|
|
63
|
+
</div>
|
|
64
|
+
);
|
|
65
|
+
}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { useEffect, useState } from 'react';
|
|
4
|
+
import { MermaidViewer, LoadingSpinner } from '@/components/MermaidViewer';
|
|
5
|
+
|
|
6
|
+
interface FlowEntry {
|
|
7
|
+
name: string;
|
|
8
|
+
filename: string;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export default function FlowsPage() {
|
|
12
|
+
const [flows, setFlows] = useState<FlowEntry[]>([]);
|
|
13
|
+
const [activeTab, setActiveTab] = useState(0);
|
|
14
|
+
const [syntax, setSyntax] = useState<string | null>(null);
|
|
15
|
+
const [loading, setLoading] = useState(true);
|
|
16
|
+
|
|
17
|
+
useEffect(() => {
|
|
18
|
+
fetch('/api/flows')
|
|
19
|
+
.then((res) => res.json())
|
|
20
|
+
.then((data) => {
|
|
21
|
+
setFlows(data.flows ?? []);
|
|
22
|
+
setLoading(false);
|
|
23
|
+
})
|
|
24
|
+
.catch(() => setLoading(false));
|
|
25
|
+
}, []);
|
|
26
|
+
|
|
27
|
+
// Load syntax when active tab changes
|
|
28
|
+
useEffect(() => {
|
|
29
|
+
if (flows.length === 0) return;
|
|
30
|
+
const flow = flows[activeTab];
|
|
31
|
+
if (!flow) return;
|
|
32
|
+
|
|
33
|
+
setSyntax(null);
|
|
34
|
+
fetch(`/api/mermaid?file=${encodeURIComponent(flow.filename)}`)
|
|
35
|
+
.then((res) => {
|
|
36
|
+
if (!res.ok) throw new Error('Failed to load flow');
|
|
37
|
+
return res.json();
|
|
38
|
+
})
|
|
39
|
+
.then((data) => setSyntax(data.syntax ?? null))
|
|
40
|
+
.catch(() => setSyntax(null));
|
|
41
|
+
}, [flows, activeTab]);
|
|
42
|
+
|
|
43
|
+
if (loading) {
|
|
44
|
+
return (
|
|
45
|
+
<div>
|
|
46
|
+
<h2 className="mb-sp-5 text-title font-semibold text-text-primary">Flows</h2>
|
|
47
|
+
<div className="flex h-[600px] items-center justify-center rounded-md border border-border-default bg-surface-1">
|
|
48
|
+
<LoadingSpinner label="Loading flows..." />
|
|
49
|
+
</div>
|
|
50
|
+
</div>
|
|
51
|
+
);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
if (flows.length === 0) {
|
|
55
|
+
return (
|
|
56
|
+
<div>
|
|
57
|
+
<h2 className="mb-sp-5 text-title font-semibold text-text-primary">Flows</h2>
|
|
58
|
+
<div className="flex flex-col items-center justify-center rounded-md border border-dashed border-border-emphasis bg-surface-1 py-sp-8">
|
|
59
|
+
<p className="mb-2 text-heading font-medium text-text-primary">Not Yet Generated</p>
|
|
60
|
+
<p className="text-body text-text-tertiary">
|
|
61
|
+
Use the flows skill to generate flow diagrams
|
|
62
|
+
</p>
|
|
63
|
+
</div>
|
|
64
|
+
</div>
|
|
65
|
+
);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
return (
|
|
69
|
+
<div>
|
|
70
|
+
<h2 className="mb-sp-5 text-title font-semibold text-text-primary">Flows</h2>
|
|
71
|
+
|
|
72
|
+
{/* Segmented control (Apple-style tab bar) */}
|
|
73
|
+
{flows.length > 1 && (
|
|
74
|
+
<div className="mb-sp-4 inline-flex overflow-x-auto rounded-md bg-surface-3 p-1">
|
|
75
|
+
{flows.map((flow, idx) => (
|
|
76
|
+
<button
|
|
77
|
+
key={flow.filename}
|
|
78
|
+
type="button"
|
|
79
|
+
onClick={() => setActiveTab(idx)}
|
|
80
|
+
className={`whitespace-nowrap rounded-sm px-sp-3 py-1.5 text-body font-medium ${
|
|
81
|
+
activeTab === idx
|
|
82
|
+
? 'bg-surface-2 text-text-primary shadow-sm'
|
|
83
|
+
: 'text-text-secondary hover:text-text-primary'
|
|
84
|
+
}`}
|
|
85
|
+
>
|
|
86
|
+
{flow.name}
|
|
87
|
+
</button>
|
|
88
|
+
))}
|
|
89
|
+
</div>
|
|
90
|
+
)}
|
|
91
|
+
|
|
92
|
+
{/* Active flow diagram */}
|
|
93
|
+
{syntax ? (
|
|
94
|
+
<MermaidViewer key={flows[activeTab]?.filename} syntax={syntax} />
|
|
95
|
+
) : (
|
|
96
|
+
<div className="flex h-[600px] items-center justify-center rounded-md border border-border-default bg-surface-1">
|
|
97
|
+
<LoadingSpinner label="Loading flow diagram..." />
|
|
98
|
+
</div>
|
|
99
|
+
)}
|
|
100
|
+
</div>
|
|
101
|
+
);
|
|
102
|
+
}
|