@tyroneross/navgator 0.2.0 → 0.2.1
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/dist/cli/index.js +1 -1
- package/package.json +1 -1
- package/web/.next/standalone/web/.next/BUILD_ID +1 -0
- package/web/.next/standalone/web/.next/app-path-routes-manifest.json +13 -0
- package/web/.next/standalone/web/.next/build-manifest.json +20 -0
- package/web/.next/standalone/web/.next/package.json +1 -0
- package/web/.next/standalone/web/.next/prerender-manifest.json +88 -0
- package/web/.next/standalone/web/.next/required-server-files.json +317 -0
- package/web/.next/standalone/web/.next/routes-manifest.json +110 -0
- package/web/.next/standalone/web/.next/server/app/_global-error/page/app-paths-manifest.json +3 -0
- package/web/.next/standalone/web/.next/server/app/_global-error/page/build-manifest.json +17 -0
- package/web/.next/standalone/web/.next/server/app/_global-error/page/next-font-manifest.json +6 -0
- package/web/.next/standalone/web/.next/server/app/_global-error/page/react-loadable-manifest.json +1 -0
- package/web/.next/standalone/web/.next/server/app/_global-error/page/server-reference-manifest.json +4 -0
- package/web/.next/standalone/web/.next/server/app/_global-error/page.js +10 -0
- package/web/.next/standalone/web/.next/server/app/_global-error/page.js.map +5 -0
- package/web/.next/standalone/web/.next/server/app/_global-error/page.js.nft.json +1 -0
- package/web/.next/standalone/web/.next/server/app/_global-error/page_client-reference-manifest.js +2 -0
- package/web/.next/standalone/web/.next/server/app/_global-error.html +2 -0
- package/web/.next/standalone/web/.next/server/app/_global-error.meta +15 -0
- package/web/.next/standalone/web/.next/server/app/_global-error.rsc +12 -0
- package/web/.next/standalone/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +5 -0
- package/web/.next/standalone/web/.next/server/app/_global-error.segments/_full.segment.rsc +12 -0
- package/web/.next/standalone/web/.next/server/app/_global-error.segments/_head.segment.rsc +7 -0
- package/web/.next/standalone/web/.next/server/app/_global-error.segments/_index.segment.rsc +4 -0
- package/web/.next/standalone/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -0
- package/web/.next/standalone/web/.next/server/app/_not-found/page/app-paths-manifest.json +3 -0
- package/web/.next/standalone/web/.next/server/app/_not-found/page/build-manifest.json +17 -0
- package/web/.next/standalone/web/.next/server/app/_not-found/page/next-font-manifest.json +11 -0
- package/web/.next/standalone/web/.next/server/app/_not-found/page/react-loadable-manifest.json +1 -0
- package/web/.next/standalone/web/.next/server/app/_not-found/page/server-reference-manifest.json +4 -0
- package/web/.next/standalone/web/.next/server/app/_not-found/page.js +13 -0
- package/web/.next/standalone/web/.next/server/app/_not-found/page.js.map +5 -0
- package/web/.next/standalone/web/.next/server/app/_not-found/page.js.nft.json +1 -0
- package/web/.next/standalone/web/.next/server/app/_not-found/page_client-reference-manifest.js +2 -0
- package/web/.next/standalone/web/.next/server/app/_not-found.html +1 -0
- package/web/.next/standalone/web/.next/server/app/_not-found.meta +16 -0
- package/web/.next/standalone/web/.next/server/app/_not-found.rsc +17 -0
- package/web/.next/standalone/web/.next/server/app/_not-found.segments/_full.segment.rsc +17 -0
- package/web/.next/standalone/web/.next/server/app/_not-found.segments/_head.segment.rsc +8 -0
- package/web/.next/standalone/web/.next/server/app/_not-found.segments/_index.segment.rsc +8 -0
- package/web/.next/standalone/web/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +5 -0
- package/web/.next/standalone/web/.next/server/app/_not-found.segments/_not-found.segment.rsc +4 -0
- package/web/.next/standalone/web/.next/server/app/_not-found.segments/_tree.segment.rsc +3 -0
- package/web/.next/standalone/web/.next/server/app/api/components/route/app-paths-manifest.json +3 -0
- package/web/.next/standalone/web/.next/server/app/api/components/route/build-manifest.json +11 -0
- package/web/.next/standalone/web/.next/server/app/api/components/route/server-reference-manifest.json +4 -0
- package/web/.next/standalone/web/.next/server/app/api/components/route.js +6 -0
- package/web/.next/standalone/web/.next/server/app/api/components/route.js.map +5 -0
- package/web/.next/standalone/web/.next/server/app/api/components/route.js.nft.json +1 -0
- package/web/.next/standalone/web/.next/server/app/api/components/route_client-reference-manifest.js +2 -0
- package/web/.next/standalone/web/.next/server/app/api/connections/route/app-paths-manifest.json +3 -0
- package/web/.next/standalone/web/.next/server/app/api/connections/route/build-manifest.json +11 -0
- package/web/.next/standalone/web/.next/server/app/api/connections/route/server-reference-manifest.json +4 -0
- package/web/.next/standalone/web/.next/server/app/api/connections/route.js +6 -0
- package/web/.next/standalone/web/.next/server/app/api/connections/route.js.map +5 -0
- package/web/.next/standalone/web/.next/server/app/api/connections/route.js.nft.json +1 -0
- package/web/.next/standalone/web/.next/server/app/api/connections/route_client-reference-manifest.js +2 -0
- package/web/.next/standalone/web/.next/server/app/api/graph/route/app-paths-manifest.json +3 -0
- package/web/.next/standalone/web/.next/server/app/api/graph/route/build-manifest.json +11 -0
- package/web/.next/standalone/web/.next/server/app/api/graph/route/server-reference-manifest.json +4 -0
- package/web/.next/standalone/web/.next/server/app/api/graph/route.js +6 -0
- package/web/.next/standalone/web/.next/server/app/api/graph/route.js.map +5 -0
- package/web/.next/standalone/web/.next/server/app/api/graph/route.js.nft.json +1 -0
- package/web/.next/standalone/web/.next/server/app/api/graph/route_client-reference-manifest.js +2 -0
- package/web/.next/standalone/web/.next/server/app/api/projects/route/app-paths-manifest.json +3 -0
- package/web/.next/standalone/web/.next/server/app/api/projects/route/build-manifest.json +11 -0
- package/web/.next/standalone/web/.next/server/app/api/projects/route/server-reference-manifest.json +4 -0
- package/web/.next/standalone/web/.next/server/app/api/projects/route.js +6 -0
- package/web/.next/standalone/web/.next/server/app/api/projects/route.js.map +5 -0
- package/web/.next/standalone/web/.next/server/app/api/projects/route.js.nft.json +1 -0
- package/web/.next/standalone/web/.next/server/app/api/projects/route_client-reference-manifest.js +2 -0
- package/web/.next/standalone/web/.next/server/app/api/prompts/route/app-paths-manifest.json +3 -0
- package/web/.next/standalone/web/.next/server/app/api/prompts/route/build-manifest.json +11 -0
- package/web/.next/standalone/web/.next/server/app/api/prompts/route/server-reference-manifest.json +4 -0
- package/web/.next/standalone/web/.next/server/app/api/prompts/route.js +7 -0
- package/web/.next/standalone/web/.next/server/app/api/prompts/route.js.map +5 -0
- package/web/.next/standalone/web/.next/server/app/api/prompts/route.js.nft.json +1 -0
- package/web/.next/standalone/web/.next/server/app/api/prompts/route_client-reference-manifest.js +2 -0
- package/web/.next/standalone/web/.next/server/app/api/scan/route/app-paths-manifest.json +3 -0
- package/web/.next/standalone/web/.next/server/app/api/scan/route/build-manifest.json +11 -0
- package/web/.next/standalone/web/.next/server/app/api/scan/route/server-reference-manifest.json +4 -0
- package/web/.next/standalone/web/.next/server/app/api/scan/route.js +6 -0
- package/web/.next/standalone/web/.next/server/app/api/scan/route.js.map +5 -0
- package/web/.next/standalone/web/.next/server/app/api/scan/route.js.nft.json +1 -0
- package/web/.next/standalone/web/.next/server/app/api/scan/route_client-reference-manifest.js +2 -0
- package/web/.next/standalone/web/.next/server/app/api/settings/route/app-paths-manifest.json +3 -0
- package/web/.next/standalone/web/.next/server/app/api/settings/route/build-manifest.json +11 -0
- package/web/.next/standalone/web/.next/server/app/api/settings/route/server-reference-manifest.json +4 -0
- package/web/.next/standalone/web/.next/server/app/api/settings/route.js +6 -0
- package/web/.next/standalone/web/.next/server/app/api/settings/route.js.map +5 -0
- package/web/.next/standalone/web/.next/server/app/api/settings/route.js.nft.json +1 -0
- package/web/.next/standalone/web/.next/server/app/api/settings/route_client-reference-manifest.js +2 -0
- package/web/.next/standalone/web/.next/server/app/api/status/route/app-paths-manifest.json +3 -0
- package/web/.next/standalone/web/.next/server/app/api/status/route/build-manifest.json +11 -0
- package/web/.next/standalone/web/.next/server/app/api/status/route/server-reference-manifest.json +4 -0
- package/web/.next/standalone/web/.next/server/app/api/status/route.js +6 -0
- package/web/.next/standalone/web/.next/server/app/api/status/route.js.map +5 -0
- package/web/.next/standalone/web/.next/server/app/api/status/route.js.nft.json +1 -0
- package/web/.next/standalone/web/.next/server/app/api/status/route_client-reference-manifest.js +2 -0
- package/web/.next/standalone/web/.next/server/app/index.html +1 -0
- package/web/.next/standalone/web/.next/server/app/index.meta +14 -0
- package/web/.next/standalone/web/.next/server/app/index.rsc +23 -0
- package/web/.next/standalone/web/.next/server/app/index.segments/__PAGE__.segment.rsc +9 -0
- package/web/.next/standalone/web/.next/server/app/index.segments/_full.segment.rsc +23 -0
- package/web/.next/standalone/web/.next/server/app/index.segments/_head.segment.rsc +8 -0
- package/web/.next/standalone/web/.next/server/app/index.segments/_index.segment.rsc +8 -0
- package/web/.next/standalone/web/.next/server/app/index.segments/_tree.segment.rsc +5 -0
- package/web/.next/standalone/web/.next/server/app/page/app-paths-manifest.json +3 -0
- package/web/.next/standalone/web/.next/server/app/page/build-manifest.json +17 -0
- package/web/.next/standalone/web/.next/server/app/page/next-font-manifest.json +11 -0
- package/web/.next/standalone/web/.next/server/app/page/react-loadable-manifest.json +1 -0
- package/web/.next/standalone/web/.next/server/app/page/server-reference-manifest.json +4 -0
- package/web/.next/standalone/web/.next/server/app/page.js +15 -0
- package/web/.next/standalone/web/.next/server/app/page.js.map +5 -0
- package/web/.next/standalone/web/.next/server/app/page.js.nft.json +1 -0
- package/web/.next/standalone/web/.next/server/app/page_client-reference-manifest.js +2 -0
- package/web/.next/standalone/web/.next/server/app-paths-manifest.json +13 -0
- package/web/.next/standalone/web/.next/server/chunks/2374f_next_dist_esm_build_templates_app-route_0bb4e66a.js +19 -0
- package/web/.next/standalone/web/.next/server/chunks/[root-of-the-server]__006b837d._.js +3 -0
- package/web/.next/standalone/web/.next/server/chunks/[root-of-the-server]__1ab91221._.js +3 -0
- package/web/.next/standalone/web/.next/server/chunks/[root-of-the-server]__2e09fec9._.js +3 -0
- package/web/.next/standalone/web/.next/server/chunks/[root-of-the-server]__38d0390f._.js +3 -0
- package/web/.next/standalone/web/.next/server/chunks/[root-of-the-server]__539ef30d._.js +3 -0
- package/web/.next/standalone/web/.next/server/chunks/[root-of-the-server]__594bcf20._.js +3 -0
- package/web/.next/standalone/web/.next/server/chunks/[root-of-the-server]__b888fadf._.js +3 -0
- package/web/.next/standalone/web/.next/server/chunks/[root-of-the-server]__f3450c22._.js +21 -0
- package/web/.next/standalone/web/.next/server/chunks/[root-of-the-server]__fa2ec862._.js +3 -0
- package/web/.next/standalone/web/.next/server/chunks/[turbopack]_runtime.js +770 -0
- package/web/.next/standalone/web/.next/server/chunks/ssr/2374f_e6039567._.js +6 -0
- package/web/.next/standalone/web/.next/server/chunks/ssr/2374f_next_dist_09351209._.js +6 -0
- package/web/.next/standalone/web/.next/server/chunks/ssr/2374f_next_dist_222be7ae._.js +6 -0
- package/web/.next/standalone/web/.next/server/chunks/ssr/2374f_next_dist_2346e1b3._.js +3 -0
- package/web/.next/standalone/web/.next/server/chunks/ssr/2374f_next_dist_cec86455._.js +4 -0
- package/web/.next/standalone/web/.next/server/chunks/ssr/2374f_next_dist_client_components_9c5d1a14._.js +3 -0
- package/web/.next/standalone/web/.next/server/chunks/ssr/2374f_next_dist_client_components_builtin_forbidden_8eae0c85.js +3 -0
- package/web/.next/standalone/web/.next/server/chunks/ssr/2374f_next_dist_client_components_builtin_global-error_81159d60.js +3 -0
- package/web/.next/standalone/web/.next/server/chunks/ssr/2374f_next_dist_client_components_builtin_unauthorized_7d34a31c.js +3 -0
- package/web/.next/standalone/web/.next/server/chunks/ssr/2374f_next_dist_e03afa0e._.js +3 -0
- package/web/.next/standalone/web/.next/server/chunks/ssr/2374f_next_dist_esm_build_templates_app-page_2c8d71b9.js +4 -0
- package/web/.next/standalone/web/.next/server/chunks/ssr/2374f_next_dist_server_route-modules_app-page_vendored_ssr_react-dom_8910f04c.js +3 -0
- package/web/.next/standalone/web/.next/server/chunks/ssr/[root-of-the-server]__1a0663e6._.js +3 -0
- package/web/.next/standalone/web/.next/server/chunks/ssr/[root-of-the-server]__4306eafc._.js +3 -0
- package/web/.next/standalone/web/.next/server/chunks/ssr/[root-of-the-server]__44903626._.js +3 -0
- package/web/.next/standalone/web/.next/server/chunks/ssr/[root-of-the-server]__60278e3f._.js +3 -0
- package/web/.next/standalone/web/.next/server/chunks/ssr/[root-of-the-server]__61942f24._.js +4 -0
- package/web/.next/standalone/web/.next/server/chunks/ssr/[root-of-the-server]__8c45c3c9._.js +3 -0
- package/web/.next/standalone/web/.next/server/chunks/ssr/[root-of-the-server]__9a2f110d._.js +3 -0
- package/web/.next/standalone/web/.next/server/chunks/ssr/[root-of-the-server]__ed07bd88._.js +3 -0
- package/web/.next/standalone/web/.next/server/chunks/ssr/[root-of-the-server]__f2db61af._.js +3 -0
- package/web/.next/standalone/web/.next/server/chunks/ssr/[turbopack]_runtime.js +770 -0
- package/web/.next/standalone/web/.next/server/chunks/ssr/web_0103e631._.js +4 -0
- package/web/.next/standalone/web/.next/server/chunks/ssr/web_171de0df._.js +14 -0
- package/web/.next/standalone/web/.next/server/chunks/ssr/web__next-internal_server_app__global-error_page_actions_2a1e94d4.js +3 -0
- package/web/.next/standalone/web/.next/server/chunks/ssr/web__next-internal_server_app__not-found_page_actions_9eaa9845.js +3 -0
- package/web/.next/standalone/web/.next/server/chunks/ssr/web__next-internal_server_app_page_actions_ec26bf28.js +3 -0
- package/web/.next/standalone/web/.next/server/chunks/web__next-internal_server_app_api_components_route_actions_c88bf2a6.js +3 -0
- package/web/.next/standalone/web/.next/server/chunks/web__next-internal_server_app_api_connections_route_actions_b1d5e95a.js +3 -0
- package/web/.next/standalone/web/.next/server/chunks/web__next-internal_server_app_api_graph_route_actions_e2dd052c.js +3 -0
- package/web/.next/standalone/web/.next/server/chunks/web__next-internal_server_app_api_projects_route_actions_3f671cbb.js +3 -0
- package/web/.next/standalone/web/.next/server/chunks/web__next-internal_server_app_api_prompts_route_actions_85b56166.js +3 -0
- package/web/.next/standalone/web/.next/server/chunks/web__next-internal_server_app_api_scan_route_actions_861cde8d.js +3 -0
- package/web/.next/standalone/web/.next/server/chunks/web__next-internal_server_app_api_settings_route_actions_e19026ae.js +3 -0
- package/web/.next/standalone/web/.next/server/chunks/web__next-internal_server_app_api_status_route_actions_8b8c6c89.js +3 -0
- package/web/.next/standalone/web/.next/server/functions-config-manifest.json +4 -0
- package/web/.next/standalone/web/.next/server/middleware-build-manifest.js +21 -0
- package/web/.next/standalone/web/.next/server/middleware-manifest.json +6 -0
- package/web/.next/standalone/web/.next/server/next-font-manifest.js +1 -0
- package/web/.next/standalone/web/.next/server/next-font-manifest.json +15 -0
- package/web/.next/standalone/web/.next/server/pages/404.html +1 -0
- package/web/.next/standalone/web/.next/server/pages/500.html +2 -0
- package/web/.next/standalone/web/.next/server/pages-manifest.json +4 -0
- package/web/.next/standalone/web/.next/server/server-reference-manifest.js +1 -0
- package/web/.next/standalone/web/.next/server/server-reference-manifest.json +5 -0
- package/web/.next/standalone/web/.next/static/WH0NvTGUEDs9QVUjcPJKx/_buildManifest.js +11 -0
- package/web/.next/standalone/web/.next/static/WH0NvTGUEDs9QVUjcPJKx/_clientMiddlewareManifest.json +1 -0
- package/web/.next/standalone/web/.next/static/WH0NvTGUEDs9QVUjcPJKx/_ssgManifest.js +1 -0
- package/web/.next/standalone/web/.next/static/chunks/062ae79751df2759.js +1 -0
- package/web/.next/standalone/web/.next/static/chunks/159889e17b2cf1f8.js +2 -0
- package/web/.next/standalone/web/.next/static/chunks/458d6f37339fc069.js +1 -0
- package/web/.next/standalone/web/.next/static/chunks/6d3d39425a878d7f.js +1 -0
- package/web/.next/standalone/web/.next/static/chunks/8a80e7184ad3a13f.css +2 -0
- package/web/.next/standalone/web/.next/static/chunks/a6dad97d9634a72d.js +1 -0
- package/web/.next/standalone/web/.next/static/chunks/c056475f5f4424b6.css +1 -0
- package/web/.next/standalone/web/.next/static/chunks/c57fee8cce8d7cb9.js +1 -0
- package/web/.next/standalone/web/.next/static/chunks/cb3513192b63e480.js +12 -0
- package/web/.next/standalone/web/.next/static/chunks/dd22b5f2beb2cc31.js +1 -0
- package/web/.next/standalone/web/.next/static/chunks/e0affeef0ddb9a97.js +4 -0
- package/web/.next/standalone/web/.next/static/chunks/f74a6859e1c4d5e3.js +1 -0
- package/web/.next/standalone/web/.next/static/chunks/turbopack-c0c89f9e6f0a38c4.js +3 -0
- package/web/.next/standalone/web/.next/static/media/4fa387ec64143e14-s.c1fdd6c2.woff2 +0 -0
- package/web/.next/standalone/web/.next/static/media/7178b3e590c64307-s.b97b3418.woff2 +0 -0
- package/web/.next/standalone/web/.next/static/media/797e433ab948586e-s.p.dbea232f.woff2 +0 -0
- package/web/.next/standalone/web/.next/static/media/8a480f0b521d4e75-s.8e0177b5.woff2 +0 -0
- package/web/.next/standalone/web/.next/static/media/bbc41e54d2fcbd21-s.799d8ef8.woff2 +0 -0
- package/web/.next/standalone/web/.next/static/media/caa3a2e1cccd8315-s.p.853070df.woff2 +0 -0
- package/web/.next/standalone/web/app/api/components/route.ts +252 -0
- package/web/.next/standalone/web/app/api/connections/route.ts +319 -0
- package/web/.next/standalone/web/app/api/graph/route.ts +235 -0
- package/web/.next/standalone/web/app/api/projects/route.ts +221 -0
- package/web/.next/standalone/web/app/api/prompts/route.ts +328 -0
- package/web/.next/standalone/web/app/api/scan/route.ts +108 -0
- package/web/.next/standalone/web/app/api/settings/route.ts +198 -0
- package/web/.next/standalone/web/app/api/status/route.ts +169 -0
- package/web/.next/standalone/web/app/globals.css +99 -0
- package/web/.next/standalone/web/app/layout.tsx +49 -0
- package/web/.next/standalone/web/app/page.tsx +94 -0
- package/web/.next/standalone/web/components/components-panel.tsx +240 -0
- package/web/.next/standalone/web/components/connections-panel.tsx +220 -0
- package/web/.next/standalone/web/components/diagram-view.tsx +735 -0
- package/web/.next/standalone/web/components/header.tsx +225 -0
- package/web/.next/standalone/web/components/impact-analysis.tsx +358 -0
- package/web/.next/standalone/web/components/llm-tracking-panel.tsx +1483 -0
- package/web/.next/standalone/web/components/settings-panel.tsx +671 -0
- package/web/.next/standalone/web/components/sidebar.tsx +74 -0
- package/web/.next/standalone/web/components/status-overview.tsx +326 -0
- package/web/.next/standalone/web/components/theme-provider.tsx +11 -0
- package/web/.next/standalone/web/components/ui/accordion.tsx +66 -0
- package/web/.next/standalone/web/components/ui/alert-dialog.tsx +157 -0
- package/web/.next/standalone/web/components/ui/alert.tsx +66 -0
- package/web/.next/standalone/web/components/ui/aspect-ratio.tsx +11 -0
- package/web/.next/standalone/web/components/ui/avatar.tsx +53 -0
- package/web/.next/standalone/web/components/ui/badge.tsx +46 -0
- package/web/.next/standalone/web/components/ui/breadcrumb.tsx +109 -0
- package/web/.next/standalone/web/components/ui/button-group.tsx +83 -0
- package/web/.next/standalone/web/components/ui/button.tsx +60 -0
- package/web/.next/standalone/web/components/ui/calendar.tsx +213 -0
- package/web/.next/standalone/web/components/ui/card.tsx +92 -0
- package/web/.next/standalone/web/components/ui/carousel.tsx +241 -0
- package/web/.next/standalone/web/components/ui/chart.tsx +353 -0
- package/web/.next/standalone/web/components/ui/checkbox.tsx +32 -0
- package/web/.next/standalone/web/components/ui/collapsible.tsx +33 -0
- package/web/.next/standalone/web/components/ui/command.tsx +184 -0
- package/web/.next/standalone/web/components/ui/context-menu.tsx +252 -0
- package/web/.next/standalone/web/components/ui/dialog.tsx +143 -0
- package/web/.next/standalone/web/components/ui/drawer.tsx +135 -0
- package/web/.next/standalone/web/components/ui/dropdown-menu.tsx +257 -0
- package/web/.next/standalone/web/components/ui/empty.tsx +104 -0
- package/web/.next/standalone/web/components/ui/field.tsx +244 -0
- package/web/.next/standalone/web/components/ui/form.tsx +167 -0
- package/web/.next/standalone/web/components/ui/hover-card.tsx +44 -0
- package/web/.next/standalone/web/components/ui/input-group.tsx +169 -0
- package/web/.next/standalone/web/components/ui/input-otp.tsx +77 -0
- package/web/.next/standalone/web/components/ui/input.tsx +21 -0
- package/web/.next/standalone/web/components/ui/item.tsx +193 -0
- package/web/.next/standalone/web/components/ui/kbd.tsx +28 -0
- package/web/.next/standalone/web/components/ui/label.tsx +24 -0
- package/web/.next/standalone/web/components/ui/menubar.tsx +276 -0
- package/web/.next/standalone/web/components/ui/navigation-menu.tsx +166 -0
- package/web/.next/standalone/web/components/ui/pagination.tsx +127 -0
- package/web/.next/standalone/web/components/ui/popover.tsx +48 -0
- package/web/.next/standalone/web/components/ui/progress.tsx +31 -0
- package/web/.next/standalone/web/components/ui/radio-group.tsx +45 -0
- package/web/.next/standalone/web/components/ui/resizable.tsx +56 -0
- package/web/.next/standalone/web/components/ui/scroll-area.tsx +58 -0
- package/web/.next/standalone/web/components/ui/select.tsx +185 -0
- package/web/.next/standalone/web/components/ui/separator.tsx +28 -0
- package/web/.next/standalone/web/components/ui/sheet.tsx +139 -0
- package/web/.next/standalone/web/components/ui/sidebar.tsx +726 -0
- package/web/.next/standalone/web/components/ui/skeleton.tsx +13 -0
- package/web/.next/standalone/web/components/ui/slider.tsx +63 -0
- package/web/.next/standalone/web/components/ui/sonner.tsx +25 -0
- package/web/.next/standalone/web/components/ui/spinner.tsx +16 -0
- package/web/.next/standalone/web/components/ui/switch.tsx +31 -0
- package/web/.next/standalone/web/components/ui/table.tsx +116 -0
- package/web/.next/standalone/web/components/ui/tabs.tsx +66 -0
- package/web/.next/standalone/web/components/ui/textarea.tsx +18 -0
- package/web/.next/standalone/web/components/ui/toast.tsx +129 -0
- package/web/.next/standalone/web/components/ui/toaster.tsx +35 -0
- package/web/.next/standalone/web/components/ui/toggle-group.tsx +73 -0
- package/web/.next/standalone/web/components/ui/toggle.tsx +47 -0
- package/web/.next/standalone/web/components/ui/tooltip.tsx +61 -0
- package/web/.next/standalone/web/components/ui/use-mobile.tsx +19 -0
- package/web/.next/standalone/web/components/ui/use-toast.ts +191 -0
- package/web/.next/standalone/web/components.json +21 -0
- package/web/.next/standalone/web/hooks/use-mobile.ts +19 -0
- package/web/.next/standalone/web/hooks/use-toast.ts +191 -0
- package/web/.next/standalone/web/lib/hooks/index.ts +8 -0
- package/web/.next/standalone/web/lib/hooks/use-components.ts +83 -0
- package/web/.next/standalone/web/lib/hooks/use-connections.ts +83 -0
- package/web/.next/standalone/web/lib/hooks/use-projects.ts +116 -0
- package/web/.next/standalone/web/lib/hooks/use-prompts.ts +122 -0
- package/web/.next/standalone/web/lib/hooks/use-settings.ts +135 -0
- package/web/.next/standalone/web/lib/hooks/use-status.ts +80 -0
- package/web/.next/standalone/web/lib/project-context.tsx +46 -0
- package/web/.next/standalone/web/lib/transform.ts +625 -0
- package/web/.next/standalone/web/lib/types.ts +198 -0
- package/web/.next/standalone/web/lib/utils.ts +6 -0
- package/web/.next/standalone/web/next.config.mjs +12 -0
- package/web/.next/standalone/web/package-lock.json +3987 -0
- package/web/.next/standalone/web/package.json +73 -0
- package/web/.next/standalone/web/pnpm-lock.yaml +5 -0
- package/web/.next/standalone/web/postcss.config.mjs +8 -0
- package/web/.next/standalone/web/public/apple-icon.png +0 -0
- package/web/.next/standalone/web/public/icon-dark-32x32.png +0 -0
- package/web/.next/standalone/web/public/icon-light-32x32.png +0 -0
- package/web/.next/standalone/web/public/icon.svg +26 -0
- package/web/.next/standalone/web/public/navgator-logo.png +0 -0
- package/web/.next/standalone/web/public/placeholder-logo.png +0 -0
- package/web/.next/standalone/web/public/placeholder-logo.svg +1 -0
- package/web/.next/standalone/web/public/placeholder-user.jpg +0 -0
- package/web/.next/standalone/web/public/placeholder.jpg +0 -0
- package/web/.next/standalone/web/public/placeholder.svg +1 -0
- package/web/.next/standalone/web/public/public/apple-icon.png +0 -0
- package/web/.next/standalone/web/public/public/icon-dark-32x32.png +0 -0
- package/web/.next/standalone/web/public/public/icon-light-32x32.png +0 -0
- package/web/.next/standalone/web/public/public/icon.svg +26 -0
- package/web/.next/standalone/web/public/public/navgator-logo.png +0 -0
- package/web/.next/standalone/web/public/public/placeholder-logo.png +0 -0
- package/web/.next/standalone/web/public/public/placeholder-logo.svg +1 -0
- package/web/.next/standalone/web/public/public/placeholder-user.jpg +0 -0
- package/web/.next/standalone/web/public/public/placeholder.jpg +0 -0
- package/web/.next/standalone/web/public/public/placeholder.svg +1 -0
- package/web/.next/standalone/web/server.js +38 -0
- package/web/.next/standalone/web/styles/globals.css +125 -0
- package/web/.next/standalone/web/tsconfig.json +41 -0
- package/web/.next/static/WH0NvTGUEDs9QVUjcPJKx/_buildManifest.js +11 -0
- package/web/.next/static/WH0NvTGUEDs9QVUjcPJKx/_clientMiddlewareManifest.json +1 -0
- package/web/.next/static/WH0NvTGUEDs9QVUjcPJKx/_ssgManifest.js +1 -0
- package/web/.next/static/chunks/062ae79751df2759.js +1 -0
- package/web/.next/static/chunks/159889e17b2cf1f8.js +2 -0
- package/web/.next/static/chunks/458d6f37339fc069.js +1 -0
- package/web/.next/static/chunks/6d3d39425a878d7f.js +1 -0
- package/web/.next/static/chunks/8a80e7184ad3a13f.css +2 -0
- package/web/.next/static/chunks/a6dad97d9634a72d.js +1 -0
- package/web/.next/static/chunks/c056475f5f4424b6.css +1 -0
- package/web/.next/static/chunks/c57fee8cce8d7cb9.js +1 -0
- package/web/.next/static/chunks/cb3513192b63e480.js +12 -0
- package/web/.next/static/chunks/dd22b5f2beb2cc31.js +1 -0
- package/web/.next/static/chunks/e0affeef0ddb9a97.js +4 -0
- package/web/.next/static/chunks/f74a6859e1c4d5e3.js +1 -0
- package/web/.next/static/chunks/turbopack-c0c89f9e6f0a38c4.js +3 -0
- package/web/.next/static/media/4fa387ec64143e14-s.c1fdd6c2.woff2 +0 -0
- package/web/.next/static/media/7178b3e590c64307-s.b97b3418.woff2 +0 -0
- package/web/.next/static/media/797e433ab948586e-s.p.dbea232f.woff2 +0 -0
- package/web/.next/static/media/8a480f0b521d4e75-s.8e0177b5.woff2 +0 -0
- package/web/.next/static/media/bbc41e54d2fcbd21-s.799d8ef8.woff2 +0 -0
- package/web/.next/static/media/caa3a2e1cccd8315-s.p.853070df.woff2 +0 -0
|
@@ -0,0 +1,625 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Transform NavGator CLI scan data to UI-friendly formats
|
|
3
|
+
*
|
|
4
|
+
* LLMCall items come from the anchor-based tracer (TracedLLMCall[]).
|
|
5
|
+
* Prompt items come from the regex prompt detector (DetectedPrompt[]).
|
|
6
|
+
*
|
|
7
|
+
* This module does NOT fabricate runtime metrics — NavGator is a static
|
|
8
|
+
* code analysis tool, not a runtime monitor.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
import type { LLMCall, Prompt, LLMTrackingSummary } from "./types";
|
|
12
|
+
|
|
13
|
+
// =============================================================================
|
|
14
|
+
// CLI TYPES (matching src/scanners/prompts/types.ts)
|
|
15
|
+
// =============================================================================
|
|
16
|
+
|
|
17
|
+
interface PromptMessage {
|
|
18
|
+
role: "system" | "user" | "assistant" | "function" | "tool";
|
|
19
|
+
content: string;
|
|
20
|
+
name?: string;
|
|
21
|
+
truncated?: boolean;
|
|
22
|
+
originalLength?: number;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
interface PromptVariable {
|
|
26
|
+
name: string;
|
|
27
|
+
pattern: string;
|
|
28
|
+
type?: "string" | "array" | "object" | "unknown";
|
|
29
|
+
required?: boolean;
|
|
30
|
+
defaultValue?: string;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
interface PromptProviderConfig {
|
|
34
|
+
provider: "anthropic" | "openai" | "azure" | "google" | "cohere" | "unknown";
|
|
35
|
+
model?: string;
|
|
36
|
+
temperature?: number;
|
|
37
|
+
maxTokens?: number;
|
|
38
|
+
topP?: number;
|
|
39
|
+
stopSequences?: string[];
|
|
40
|
+
tools?: string[];
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
interface PromptUsage {
|
|
44
|
+
file: string;
|
|
45
|
+
line: number;
|
|
46
|
+
functionName?: string;
|
|
47
|
+
callPattern: string;
|
|
48
|
+
isAsync: boolean;
|
|
49
|
+
hasStreaming: boolean;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
type PromptCategory =
|
|
53
|
+
| "chat"
|
|
54
|
+
| "completion"
|
|
55
|
+
| "extraction"
|
|
56
|
+
| "classification"
|
|
57
|
+
| "summarization"
|
|
58
|
+
| "translation"
|
|
59
|
+
| "code-generation"
|
|
60
|
+
| "code-review"
|
|
61
|
+
| "agent"
|
|
62
|
+
| "embedding"
|
|
63
|
+
| "unknown";
|
|
64
|
+
|
|
65
|
+
export interface DetectedPrompt {
|
|
66
|
+
id: string;
|
|
67
|
+
name: string;
|
|
68
|
+
location: {
|
|
69
|
+
file: string;
|
|
70
|
+
lineStart: number;
|
|
71
|
+
lineEnd: number;
|
|
72
|
+
functionName?: string;
|
|
73
|
+
className?: string;
|
|
74
|
+
exportName?: string;
|
|
75
|
+
};
|
|
76
|
+
messages: PromptMessage[];
|
|
77
|
+
rawContent?: string;
|
|
78
|
+
isTemplate: boolean;
|
|
79
|
+
variables: PromptVariable[];
|
|
80
|
+
templateSyntax?:
|
|
81
|
+
| "jinja2"
|
|
82
|
+
| "fstring"
|
|
83
|
+
| "mustache"
|
|
84
|
+
| "template-literal"
|
|
85
|
+
| "unknown";
|
|
86
|
+
provider?: PromptProviderConfig;
|
|
87
|
+
usedBy: PromptUsage[];
|
|
88
|
+
purpose?: string;
|
|
89
|
+
tags: string[];
|
|
90
|
+
category?: PromptCategory;
|
|
91
|
+
confidence: number;
|
|
92
|
+
detectionMethod: "ast" | "regex" | "heuristic";
|
|
93
|
+
timestamp: number;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
// =============================================================================
|
|
97
|
+
// TRACED LLM CALL (from llm-call-tracer.ts)
|
|
98
|
+
// =============================================================================
|
|
99
|
+
|
|
100
|
+
interface TracedLLMCall {
|
|
101
|
+
id: string;
|
|
102
|
+
name: string;
|
|
103
|
+
anchor: {
|
|
104
|
+
file: string;
|
|
105
|
+
line: number;
|
|
106
|
+
code: string;
|
|
107
|
+
method: string;
|
|
108
|
+
};
|
|
109
|
+
provider: {
|
|
110
|
+
name: string;
|
|
111
|
+
sdk: string;
|
|
112
|
+
importLine: number;
|
|
113
|
+
clientVariable: string;
|
|
114
|
+
};
|
|
115
|
+
model: {
|
|
116
|
+
value: string | null;
|
|
117
|
+
isDynamic: boolean;
|
|
118
|
+
variableName?: string;
|
|
119
|
+
line: number;
|
|
120
|
+
};
|
|
121
|
+
prompt: {
|
|
122
|
+
type: "messages-array" | "string-prompt" | "template" | "variable-ref";
|
|
123
|
+
content?: string;
|
|
124
|
+
systemPrompt?: string;
|
|
125
|
+
hasUserTemplate: boolean;
|
|
126
|
+
variables: string[];
|
|
127
|
+
definitionFile?: string;
|
|
128
|
+
definitionLine?: number;
|
|
129
|
+
};
|
|
130
|
+
config: {
|
|
131
|
+
temperature?: number;
|
|
132
|
+
maxTokens?: number;
|
|
133
|
+
stream?: boolean;
|
|
134
|
+
tools?: string[];
|
|
135
|
+
};
|
|
136
|
+
callType: "chat" | "completion" | "embedding" | "image" | "audio" | "function-call";
|
|
137
|
+
confidence: number;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
export interface PromptScanResult {
|
|
141
|
+
prompts: DetectedPrompt[];
|
|
142
|
+
summary: {
|
|
143
|
+
totalPrompts: number;
|
|
144
|
+
byProvider: Record<string, number>;
|
|
145
|
+
byCategory: Record<string, number>;
|
|
146
|
+
templatesCount: number;
|
|
147
|
+
withToolsCount: number;
|
|
148
|
+
tracedCallSites?: number;
|
|
149
|
+
};
|
|
150
|
+
warnings: Array<{
|
|
151
|
+
type: "parse_error" | "truncated" | "ambiguous" | "deprecated_pattern";
|
|
152
|
+
message: string;
|
|
153
|
+
file?: string;
|
|
154
|
+
line?: number;
|
|
155
|
+
}>;
|
|
156
|
+
/** Anchor-based traced LLM calls (present when tracer ran) */
|
|
157
|
+
tracedCalls?: TracedLLMCall[];
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
// =============================================================================
|
|
161
|
+
// CATEGORY MAPPING
|
|
162
|
+
// =============================================================================
|
|
163
|
+
|
|
164
|
+
function mapCallType(
|
|
165
|
+
callType: TracedLLMCall["callType"]
|
|
166
|
+
): LLMCall["category"] {
|
|
167
|
+
switch (callType) {
|
|
168
|
+
case "chat":
|
|
169
|
+
return "chat";
|
|
170
|
+
case "completion":
|
|
171
|
+
return "completion";
|
|
172
|
+
case "embedding":
|
|
173
|
+
return "embedding";
|
|
174
|
+
case "image":
|
|
175
|
+
return "image";
|
|
176
|
+
case "audio":
|
|
177
|
+
return "audio";
|
|
178
|
+
case "function-call":
|
|
179
|
+
return "function";
|
|
180
|
+
default:
|
|
181
|
+
return "completion";
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
function mapPromptCategory(
|
|
186
|
+
category?: PromptCategory
|
|
187
|
+
): LLMCall["category"] {
|
|
188
|
+
switch (category) {
|
|
189
|
+
case "chat":
|
|
190
|
+
return "chat";
|
|
191
|
+
case "completion":
|
|
192
|
+
case "summarization":
|
|
193
|
+
case "translation":
|
|
194
|
+
return "completion";
|
|
195
|
+
case "embedding":
|
|
196
|
+
return "embedding";
|
|
197
|
+
case "extraction":
|
|
198
|
+
case "classification":
|
|
199
|
+
case "code-review":
|
|
200
|
+
return "function";
|
|
201
|
+
case "agent":
|
|
202
|
+
case "code-generation":
|
|
203
|
+
return "agent";
|
|
204
|
+
default:
|
|
205
|
+
return "completion";
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
function mapPromptType(
|
|
210
|
+
role: PromptMessage["role"]
|
|
211
|
+
): "system" | "user" | "assistant" | "function" {
|
|
212
|
+
switch (role) {
|
|
213
|
+
case "system":
|
|
214
|
+
return "system";
|
|
215
|
+
case "user":
|
|
216
|
+
return "user";
|
|
217
|
+
case "assistant":
|
|
218
|
+
return "assistant";
|
|
219
|
+
case "function":
|
|
220
|
+
case "tool":
|
|
221
|
+
return "function";
|
|
222
|
+
default:
|
|
223
|
+
return "user";
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
// =============================================================================
|
|
228
|
+
// TOKEN ESTIMATION
|
|
229
|
+
// =============================================================================
|
|
230
|
+
|
|
231
|
+
function estimateTokens(text: string): number {
|
|
232
|
+
return Math.ceil(text.length / 4);
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
// =============================================================================
|
|
236
|
+
// TRANSFORM: TracedLLMCall → LLMCall (for "LLM Calls" tab)
|
|
237
|
+
// =============================================================================
|
|
238
|
+
|
|
239
|
+
function transformTracedCall(traced: TracedLLMCall): LLMCall {
|
|
240
|
+
const promptContent =
|
|
241
|
+
traced.prompt.content ||
|
|
242
|
+
traced.prompt.systemPrompt ||
|
|
243
|
+
traced.anchor.code ||
|
|
244
|
+
"(prompt content not extracted)";
|
|
245
|
+
|
|
246
|
+
return {
|
|
247
|
+
id: traced.id,
|
|
248
|
+
name: traced.name,
|
|
249
|
+
model: traced.model.value || (traced.model.isDynamic ? `dynamic (${traced.model.variableName || "variable"})` : "unknown"),
|
|
250
|
+
provider: traced.provider.name,
|
|
251
|
+
file: traced.anchor.file,
|
|
252
|
+
line: traced.anchor.line,
|
|
253
|
+
promptTemplate: promptContent,
|
|
254
|
+
promptVariables: traced.prompt.variables,
|
|
255
|
+
systemPrompt: traced.prompt.systemPrompt,
|
|
256
|
+
method: traced.anchor.method,
|
|
257
|
+
sdk: traced.provider.sdk,
|
|
258
|
+
configExtracted: Object.keys(traced.config).length > 0 ? traced.config : undefined,
|
|
259
|
+
category: mapCallType(traced.callType),
|
|
260
|
+
purpose: undefined,
|
|
261
|
+
confidence: traced.confidence,
|
|
262
|
+
tags: buildTracedCallTags(traced),
|
|
263
|
+
};
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
function buildTracedCallTags(traced: TracedLLMCall): string[] {
|
|
267
|
+
const tags: string[] = [traced.provider.name];
|
|
268
|
+
|
|
269
|
+
if (traced.config.stream) tags.push("streaming");
|
|
270
|
+
if (traced.config.tools && traced.config.tools.length > 0) tags.push("tool-use");
|
|
271
|
+
if (traced.prompt.hasUserTemplate) tags.push("templated");
|
|
272
|
+
if (traced.prompt.type === "messages-array") tags.push("messages-array");
|
|
273
|
+
if (traced.model.isDynamic) tags.push("dynamic-model");
|
|
274
|
+
|
|
275
|
+
return tags;
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
// =============================================================================
|
|
279
|
+
// TRANSFORM: DetectedPrompt → LLMCall (fallback when no tracer data)
|
|
280
|
+
// =============================================================================
|
|
281
|
+
|
|
282
|
+
function transformPromptToLLMCall(prompt: DetectedPrompt, index: number): LLMCall {
|
|
283
|
+
const systemMsg = prompt.messages.find((m) => m.role === "system");
|
|
284
|
+
const userMsg = prompt.messages.find((m) => m.role === "user");
|
|
285
|
+
|
|
286
|
+
const promptTemplate =
|
|
287
|
+
userMsg?.content ||
|
|
288
|
+
prompt.rawContent ||
|
|
289
|
+
prompt.messages.map((m) => `[${m.role}]\n${m.content}`).join("\n\n") ||
|
|
290
|
+
"(No template content detected)";
|
|
291
|
+
|
|
292
|
+
return {
|
|
293
|
+
id: prompt.id || `prompt-${index}`,
|
|
294
|
+
name: prompt.name || prompt.location.functionName || `Prompt_${index}`,
|
|
295
|
+
model: prompt.provider?.model || "unknown",
|
|
296
|
+
provider: prompt.provider?.provider || "unknown",
|
|
297
|
+
file: prompt.location.file,
|
|
298
|
+
line: prompt.location.lineStart,
|
|
299
|
+
lineEnd: prompt.location.lineEnd,
|
|
300
|
+
promptTemplate,
|
|
301
|
+
promptVariables: prompt.variables.map((v) => v.name),
|
|
302
|
+
systemPrompt: systemMsg?.content,
|
|
303
|
+
category: mapPromptCategory(prompt.category),
|
|
304
|
+
purpose: prompt.purpose,
|
|
305
|
+
confidence: prompt.confidence,
|
|
306
|
+
tags: prompt.tags.length > 0 ? prompt.tags : inferTags(prompt),
|
|
307
|
+
};
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
// =============================================================================
|
|
311
|
+
// TRANSFORM: DetectedPrompt → Prompt (for "Prompts" tab)
|
|
312
|
+
// =============================================================================
|
|
313
|
+
|
|
314
|
+
function transformToPrompt(prompt: DetectedPrompt, index: number): Prompt {
|
|
315
|
+
const systemMsg = prompt.messages.find((m) => m.role === "system");
|
|
316
|
+
const userMsg = prompt.messages.find((m) => m.role === "user");
|
|
317
|
+
const primaryMsg = systemMsg || userMsg || prompt.messages[0];
|
|
318
|
+
|
|
319
|
+
const content =
|
|
320
|
+
prompt.rawContent ||
|
|
321
|
+
primaryMsg?.content ||
|
|
322
|
+
prompt.messages.map((m) => `[${m.role}]\n${m.content}`).join("\n\n") ||
|
|
323
|
+
"(No content detected)";
|
|
324
|
+
|
|
325
|
+
return {
|
|
326
|
+
id: prompt.id || `prompt-${index}`,
|
|
327
|
+
name: prompt.name || prompt.location.functionName || `Prompt_${index}`,
|
|
328
|
+
content,
|
|
329
|
+
file: prompt.location.file,
|
|
330
|
+
line: prompt.location.lineStart,
|
|
331
|
+
lineEnd: prompt.location.lineEnd,
|
|
332
|
+
usedBy:
|
|
333
|
+
prompt.usedBy.length > 0
|
|
334
|
+
? prompt.usedBy.map((u) => u.functionName || `${u.file}:${u.line}`)
|
|
335
|
+
: [prompt.location.functionName || "unknown"],
|
|
336
|
+
variables: prompt.variables.map((v) => v.name),
|
|
337
|
+
tokenCount: estimateTokens(content) || 50,
|
|
338
|
+
type: primaryMsg ? mapPromptType(primaryMsg.role) : "user",
|
|
339
|
+
version: "1.0.0",
|
|
340
|
+
lastModified: formatTimestamp(prompt.timestamp),
|
|
341
|
+
provider: prompt.provider?.provider,
|
|
342
|
+
model: prompt.provider?.model,
|
|
343
|
+
category: prompt.category,
|
|
344
|
+
purpose: prompt.purpose,
|
|
345
|
+
};
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
// =============================================================================
|
|
349
|
+
// MAIN TRANSFORM (public API)
|
|
350
|
+
// =============================================================================
|
|
351
|
+
|
|
352
|
+
/**
|
|
353
|
+
* Transform scan result to UI format.
|
|
354
|
+
*
|
|
355
|
+
* - If tracedCalls are present (from the anchor-based tracer), LLMCall items
|
|
356
|
+
* come from those. This gives accurate provider/model attribution.
|
|
357
|
+
* - Prompt items always come from DetectedPrompt[].
|
|
358
|
+
* - No runtime metrics are fabricated.
|
|
359
|
+
*/
|
|
360
|
+
export function transformScanResultWithDefaults(result: PromptScanResult): {
|
|
361
|
+
calls: LLMCall[];
|
|
362
|
+
prompts: Prompt[];
|
|
363
|
+
summary: LLMTrackingSummary;
|
|
364
|
+
} {
|
|
365
|
+
const hasTracerData = result.tracedCalls && result.tracedCalls.length > 0;
|
|
366
|
+
|
|
367
|
+
// LLM Calls: prefer tracer data; fall back to prompt-based
|
|
368
|
+
let calls: LLMCall[];
|
|
369
|
+
if (hasTracerData) {
|
|
370
|
+
calls = result.tracedCalls!.map(transformTracedCall);
|
|
371
|
+
} else if (result.prompts && result.prompts.length > 0) {
|
|
372
|
+
calls = result.prompts.map((p, i) => transformPromptToLLMCall(p, i));
|
|
373
|
+
} else {
|
|
374
|
+
calls = [];
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
// Prompts: always from detected prompts
|
|
378
|
+
const prompts = (result.prompts || []).map((p, i) => transformToPrompt(p, i));
|
|
379
|
+
|
|
380
|
+
// Build summary from actual data
|
|
381
|
+
const byProvider: Record<string, number> = {};
|
|
382
|
+
const byModel: Record<string, number> = {};
|
|
383
|
+
const byCategory: Record<string, number> = {};
|
|
384
|
+
const filesWithAI = new Set<string>();
|
|
385
|
+
|
|
386
|
+
for (const call of calls) {
|
|
387
|
+
const provider = call.provider || "unknown";
|
|
388
|
+
byProvider[provider] = (byProvider[provider] || 0) + 1;
|
|
389
|
+
|
|
390
|
+
if (call.model && call.model !== "unknown" && !call.model.startsWith("dynamic")) {
|
|
391
|
+
byModel[call.model] = (byModel[call.model] || 0) + 1;
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
byCategory[call.category] = (byCategory[call.category] || 0) + 1;
|
|
395
|
+
filesWithAI.add(call.file);
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
const summary: LLMTrackingSummary = {
|
|
399
|
+
totalCalls: calls.length,
|
|
400
|
+
totalPrompts: prompts.length,
|
|
401
|
+
byProvider,
|
|
402
|
+
byModel,
|
|
403
|
+
byCategory,
|
|
404
|
+
templatesCount: result.summary?.templatesCount || calls.filter((c) => c.promptVariables.length > 0).length,
|
|
405
|
+
withToolsCount: result.summary?.withToolsCount || calls.filter((c) => c.tags.includes("tool-use")).length,
|
|
406
|
+
filesWithAI: filesWithAI.size,
|
|
407
|
+
lastScanned: new Date().toISOString(),
|
|
408
|
+
};
|
|
409
|
+
|
|
410
|
+
return { calls, prompts, summary };
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
/**
|
|
414
|
+
* Simple transform without fallbacks (used by POST endpoint)
|
|
415
|
+
*/
|
|
416
|
+
export function transformScanResult(result: PromptScanResult): {
|
|
417
|
+
calls: LLMCall[];
|
|
418
|
+
prompts: Prompt[];
|
|
419
|
+
summary: LLMTrackingSummary;
|
|
420
|
+
} {
|
|
421
|
+
return transformScanResultWithDefaults(result);
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
// =============================================================================
|
|
425
|
+
// HELPERS
|
|
426
|
+
// =============================================================================
|
|
427
|
+
|
|
428
|
+
function formatTimestamp(timestamp: number): string {
|
|
429
|
+
const now = Date.now();
|
|
430
|
+
const diff = now - timestamp;
|
|
431
|
+
|
|
432
|
+
if (diff < 60000) return "Just now";
|
|
433
|
+
if (diff < 3600000) return `${Math.floor(diff / 60000)} min ago`;
|
|
434
|
+
if (diff < 86400000) return `${Math.floor(diff / 3600000)} hours ago`;
|
|
435
|
+
return new Date(timestamp).toLocaleDateString();
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
function inferTags(prompt: DetectedPrompt): string[] {
|
|
439
|
+
const tags: string[] = [];
|
|
440
|
+
const content = prompt.messages.map((m) => m.content.toLowerCase()).join(" ");
|
|
441
|
+
|
|
442
|
+
if (prompt.category) tags.push(prompt.category);
|
|
443
|
+
if (prompt.provider?.provider) tags.push(prompt.provider.provider);
|
|
444
|
+
if (prompt.isTemplate) tags.push("template");
|
|
445
|
+
if (prompt.variables.length > 0) tags.push("parameterized");
|
|
446
|
+
if (content.includes("json")) tags.push("structured-output");
|
|
447
|
+
if (content.includes("tool") || content.includes("function")) tags.push("tool-use");
|
|
448
|
+
|
|
449
|
+
return tags.length > 0 ? tags : ["detected"];
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
// =============================================================================
|
|
453
|
+
// DEMO DATA
|
|
454
|
+
// =============================================================================
|
|
455
|
+
|
|
456
|
+
/**
|
|
457
|
+
* Generate demo data that reflects what a real scan looks like.
|
|
458
|
+
* Clearly marked as demo — no fabricated runtime metrics.
|
|
459
|
+
*/
|
|
460
|
+
export function generateDemoData(): {
|
|
461
|
+
calls: LLMCall[];
|
|
462
|
+
prompts: Prompt[];
|
|
463
|
+
summary: LLMTrackingSummary;
|
|
464
|
+
} {
|
|
465
|
+
const demoCalls: LLMCall[] = [
|
|
466
|
+
{
|
|
467
|
+
id: "demo-llm-1",
|
|
468
|
+
name: "generateProductDescription",
|
|
469
|
+
model: "gpt-4-turbo",
|
|
470
|
+
provider: "openai",
|
|
471
|
+
file: "lib/ai/product-ai.ts",
|
|
472
|
+
line: 45,
|
|
473
|
+
promptTemplate: "Generate a compelling product description for: {{productName}}...",
|
|
474
|
+
promptVariables: ["productName", "features", "targetAudience"],
|
|
475
|
+
systemPrompt: "You are a professional copywriter specializing in e-commerce...",
|
|
476
|
+
method: "chat.completions.create",
|
|
477
|
+
sdk: "openai",
|
|
478
|
+
configExtracted: { temperature: 0.7, maxTokens: 500 },
|
|
479
|
+
category: "completion",
|
|
480
|
+
purpose: "Generate product descriptions for e-commerce",
|
|
481
|
+
confidence: 0.95,
|
|
482
|
+
tags: ["openai", "templated"],
|
|
483
|
+
},
|
|
484
|
+
{
|
|
485
|
+
id: "demo-llm-2",
|
|
486
|
+
name: "chatWithSupport",
|
|
487
|
+
model: "claude-3-sonnet",
|
|
488
|
+
provider: "anthropic",
|
|
489
|
+
file: "lib/ai/support-chat.ts",
|
|
490
|
+
line: 23,
|
|
491
|
+
promptTemplate: "{{conversationHistory}}\n\nUser: {{userMessage}}",
|
|
492
|
+
promptVariables: ["conversationHistory", "userMessage", "userContext"],
|
|
493
|
+
systemPrompt: "You are a helpful customer support assistant for TechCorp...",
|
|
494
|
+
method: "messages.create",
|
|
495
|
+
sdk: "@anthropic-ai/sdk",
|
|
496
|
+
configExtracted: { maxTokens: 1024 },
|
|
497
|
+
category: "chat",
|
|
498
|
+
purpose: "Customer support chatbot",
|
|
499
|
+
confidence: 0.98,
|
|
500
|
+
tags: ["anthropic", "streaming"],
|
|
501
|
+
},
|
|
502
|
+
{
|
|
503
|
+
id: "demo-llm-3",
|
|
504
|
+
name: "embedDocument",
|
|
505
|
+
model: "text-embedding-3-small",
|
|
506
|
+
provider: "openai",
|
|
507
|
+
file: "lib/ai/embeddings.ts",
|
|
508
|
+
line: 12,
|
|
509
|
+
promptTemplate: "{{documentContent}}",
|
|
510
|
+
promptVariables: ["documentContent"],
|
|
511
|
+
method: "embeddings.create",
|
|
512
|
+
sdk: "openai",
|
|
513
|
+
category: "embedding",
|
|
514
|
+
purpose: "Generate document embeddings for search",
|
|
515
|
+
confidence: 0.99,
|
|
516
|
+
tags: ["openai", "embedding"],
|
|
517
|
+
},
|
|
518
|
+
{
|
|
519
|
+
id: "demo-llm-4",
|
|
520
|
+
name: "analyzeUserIntent",
|
|
521
|
+
model: "gpt-4o-mini",
|
|
522
|
+
provider: "openai",
|
|
523
|
+
file: "lib/ai/intent-classifier.ts",
|
|
524
|
+
line: 67,
|
|
525
|
+
promptTemplate: "Classify the following user message into one of these categories...",
|
|
526
|
+
promptVariables: ["userMessage", "availableCategories"],
|
|
527
|
+
systemPrompt: "You are an intent classification system. Respond with JSON only.",
|
|
528
|
+
method: "chat.completions.create",
|
|
529
|
+
sdk: "openai",
|
|
530
|
+
configExtracted: { temperature: 0 },
|
|
531
|
+
category: "function",
|
|
532
|
+
purpose: "Classify user intent for routing",
|
|
533
|
+
confidence: 0.92,
|
|
534
|
+
tags: ["openai", "structured-output"],
|
|
535
|
+
},
|
|
536
|
+
{
|
|
537
|
+
id: "demo-llm-5",
|
|
538
|
+
name: "researchAgent",
|
|
539
|
+
model: "gpt-4-turbo",
|
|
540
|
+
provider: "openai",
|
|
541
|
+
file: "lib/ai/agents/research.ts",
|
|
542
|
+
line: 89,
|
|
543
|
+
promptTemplate: "Research the following topic and provide comprehensive findings...",
|
|
544
|
+
promptVariables: ["topic", "depth", "sources"],
|
|
545
|
+
systemPrompt: "You are a research agent with access to web search and document analysis tools...",
|
|
546
|
+
method: "chat.completions.create",
|
|
547
|
+
sdk: "openai",
|
|
548
|
+
configExtracted: { temperature: 0.3, tools: ["web_search", "read_document"] },
|
|
549
|
+
category: "agent",
|
|
550
|
+
purpose: "Research assistant with tool access",
|
|
551
|
+
confidence: 0.88,
|
|
552
|
+
tags: ["openai", "tool-use"],
|
|
553
|
+
},
|
|
554
|
+
];
|
|
555
|
+
|
|
556
|
+
const demoPrompts: Prompt[] = [
|
|
557
|
+
{
|
|
558
|
+
id: "demo-prompt-1",
|
|
559
|
+
name: "PRODUCT_COPYWRITER_SYSTEM",
|
|
560
|
+
content: `You are a professional copywriter specializing in e-commerce product descriptions.\n\nYour writing style should be:\n- Compelling and benefit-focused\n- Clear and concise\n- SEO-optimized with natural keyword placement`,
|
|
561
|
+
file: "lib/ai/prompts/product.ts",
|
|
562
|
+
line: 5,
|
|
563
|
+
usedBy: ["generateProductDescription"],
|
|
564
|
+
variables: [],
|
|
565
|
+
tokenCount: 89,
|
|
566
|
+
type: "system",
|
|
567
|
+
version: "2.1.0",
|
|
568
|
+
lastModified: "3 days ago",
|
|
569
|
+
provider: "openai",
|
|
570
|
+
category: "completion",
|
|
571
|
+
purpose: "System prompt for product copywriting",
|
|
572
|
+
},
|
|
573
|
+
{
|
|
574
|
+
id: "demo-prompt-2",
|
|
575
|
+
name: "SUPPORT_AGENT_SYSTEM",
|
|
576
|
+
content: `You are a helpful customer support assistant for TechCorp.\n\nGuidelines:\n1. Be friendly, professional, and empathetic\n2. If you don't know something, say so honestly\n3. Escalate to human support for: refunds > $100, legal issues, security concerns`,
|
|
577
|
+
file: "lib/ai/prompts/support.ts",
|
|
578
|
+
line: 12,
|
|
579
|
+
usedBy: ["chatWithSupport"],
|
|
580
|
+
variables: [],
|
|
581
|
+
tokenCount: 112,
|
|
582
|
+
type: "system",
|
|
583
|
+
version: "3.0.2",
|
|
584
|
+
lastModified: "1 week ago",
|
|
585
|
+
provider: "anthropic",
|
|
586
|
+
category: "chat",
|
|
587
|
+
purpose: "System prompt for customer support",
|
|
588
|
+
},
|
|
589
|
+
{
|
|
590
|
+
id: "demo-prompt-3",
|
|
591
|
+
name: "INTENT_CLASSIFIER_PROMPT",
|
|
592
|
+
content: `Classify the following user message into one of these categories: {{availableCategories}}\n\nUser message: "{{userMessage}}"\n\nRespond with JSON.`,
|
|
593
|
+
file: "lib/ai/prompts/classifier.ts",
|
|
594
|
+
line: 28,
|
|
595
|
+
usedBy: ["analyzeUserIntent"],
|
|
596
|
+
variables: ["availableCategories", "userMessage"],
|
|
597
|
+
tokenCount: 67,
|
|
598
|
+
type: "user",
|
|
599
|
+
version: "1.5.0",
|
|
600
|
+
lastModified: "2 weeks ago",
|
|
601
|
+
provider: "openai",
|
|
602
|
+
category: "classification",
|
|
603
|
+
purpose: "Intent classification prompt",
|
|
604
|
+
},
|
|
605
|
+
];
|
|
606
|
+
|
|
607
|
+
const summary: LLMTrackingSummary = {
|
|
608
|
+
totalCalls: demoCalls.length,
|
|
609
|
+
totalPrompts: demoPrompts.length,
|
|
610
|
+
byProvider: { openai: 4, anthropic: 1 },
|
|
611
|
+
byModel: {
|
|
612
|
+
"gpt-4-turbo": 2,
|
|
613
|
+
"gpt-4o-mini": 1,
|
|
614
|
+
"text-embedding-3-small": 1,
|
|
615
|
+
"claude-3-sonnet": 1,
|
|
616
|
+
},
|
|
617
|
+
byCategory: { completion: 1, chat: 1, embedding: 1, function: 1, agent: 1 },
|
|
618
|
+
templatesCount: 3,
|
|
619
|
+
withToolsCount: 1,
|
|
620
|
+
filesWithAI: 5,
|
|
621
|
+
lastScanned: new Date().toISOString(),
|
|
622
|
+
};
|
|
623
|
+
|
|
624
|
+
return { calls: demoCalls, prompts: demoPrompts, summary };
|
|
625
|
+
}
|