trybeacon 0.1.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/.next/BUILD_ID +1 -0
- package/.next/app-path-routes-manifest.json +59 -0
- package/.next/build/56416d4ae4ce586f.js +6 -0
- package/.next/build/56416d4ae4ce586f.js.map +5 -0
- package/.next/build/chunks/[root-of-the-server]__0oj80bi._.js +206 -0
- package/.next/build/chunks/[root-of-the-server]__0oj80bi._.js.map +8 -0
- package/.next/build/chunks/[root-of-the-server]__1f933tp._.js +500 -0
- package/.next/build/chunks/[root-of-the-server]__1f933tp._.js.map +11 -0
- package/.next/build/chunks/[turbopack-node]_transforms_postcss_ts_0b7xl6g._.js +13 -0
- package/.next/build/chunks/[turbopack-node]_transforms_postcss_ts_0b7xl6g._.js.map +5 -0
- package/.next/build/chunks/[turbopack]_runtime.js +890 -0
- package/.next/build/chunks/[turbopack]_runtime.js.map +11 -0
- package/.next/build/chunks/node_modules_20v-8wl._.js +6824 -0
- package/.next/build/chunks/node_modules_20v-8wl._.js.map +47 -0
- package/.next/build/package.json +1 -0
- package/.next/build-manifest.json +21 -0
- package/.next/diagnostics/build-diagnostics.json +6 -0
- package/.next/diagnostics/framework.json +1 -0
- package/.next/diagnostics/route-bundle-stats.json +100 -0
- package/.next/export-marker.json +6 -0
- package/.next/fallback-build-manifest.json +13 -0
- package/.next/images-manifest.json +68 -0
- package/.next/next-minimal-server.js.nft.json +1 -0
- package/.next/next-server.js.nft.json +1 -0
- package/.next/package.json +1 -0
- package/.next/prerender-manifest.json +167 -0
- package/.next/required-server-files.js +338 -0
- package/.next/required-server-files.json +338 -0
- package/.next/routes-manifest.json +402 -0
- package/.next/server/app/_global-error/page/app-paths-manifest.json +3 -0
- package/.next/server/app/_global-error/page/build-manifest.json +17 -0
- package/.next/server/app/_global-error/page/next-font-manifest.json +6 -0
- package/.next/server/app/_global-error/page/react-loadable-manifest.json +1 -0
- package/.next/server/app/_global-error/page/server-reference-manifest.json +4 -0
- package/.next/server/app/_global-error/page.js +10 -0
- package/.next/server/app/_global-error/page.js.map +5 -0
- package/.next/server/app/_global-error/page.js.nft.json +1 -0
- package/.next/server/app/_global-error/page_client-reference-manifest.js +3 -0
- package/.next/server/app/_global-error.html +1 -0
- package/.next/server/app/_global-error.meta +15 -0
- package/.next/server/app/_global-error.rsc +14 -0
- package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +5 -0
- package/.next/server/app/_global-error.segments/_full.segment.rsc +14 -0
- package/.next/server/app/_global-error.segments/_head.segment.rsc +5 -0
- package/.next/server/app/_global-error.segments/_index.segment.rsc +5 -0
- package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -0
- package/.next/server/app/_not-found/page/app-paths-manifest.json +3 -0
- package/.next/server/app/_not-found/page/build-manifest.json +17 -0
- package/.next/server/app/_not-found/page/next-font-manifest.json +11 -0
- package/.next/server/app/_not-found/page/react-loadable-manifest.json +1 -0
- package/.next/server/app/_not-found/page/server-reference-manifest.json +4 -0
- package/.next/server/app/_not-found/page.js +15 -0
- package/.next/server/app/_not-found/page.js.map +5 -0
- package/.next/server/app/_not-found/page.js.nft.json +1 -0
- package/.next/server/app/_not-found/page_client-reference-manifest.js +3 -0
- package/.next/server/app/_not-found.html +1 -0
- package/.next/server/app/_not-found.meta +16 -0
- package/.next/server/app/_not-found.rsc +24 -0
- package/.next/server/app/_not-found.segments/_full.segment.rsc +24 -0
- package/.next/server/app/_not-found.segments/_head.segment.rsc +6 -0
- package/.next/server/app/_not-found.segments/_index.segment.rsc +13 -0
- package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +5 -0
- package/.next/server/app/_not-found.segments/_not-found.segment.rsc +5 -0
- package/.next/server/app/_not-found.segments/_tree.segment.rsc +3 -0
- package/.next/server/app/api/code-graph/position/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/code-graph/position/route/build-manifest.json +9 -0
- package/.next/server/app/api/code-graph/position/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/code-graph/position/route.js +12 -0
- package/.next/server/app/api/code-graph/position/route.js.map +5 -0
- package/.next/server/app/api/code-graph/position/route.js.nft.json +1 -0
- package/.next/server/app/api/code-graph/position/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/code-graph/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/code-graph/route/build-manifest.json +9 -0
- package/.next/server/app/api/code-graph/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/code-graph/route.js +12 -0
- package/.next/server/app/api/code-graph/route.js.map +5 -0
- package/.next/server/app/api/code-graph/route.js.nft.json +1 -0
- package/.next/server/app/api/code-graph/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/context/embed-backfill/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/context/embed-backfill/route/build-manifest.json +9 -0
- package/.next/server/app/api/context/embed-backfill/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/context/embed-backfill/route.js +11 -0
- package/.next/server/app/api/context/embed-backfill/route.js.map +5 -0
- package/.next/server/app/api/context/embed-backfill/route.js.nft.json +1 -0
- package/.next/server/app/api/context/embed-backfill/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/context/feature/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/context/feature/route/build-manifest.json +9 -0
- package/.next/server/app/api/context/feature/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/context/feature/route.js +15 -0
- package/.next/server/app/api/context/feature/route.js.map +5 -0
- package/.next/server/app/api/context/feature/route.js.nft.json +1 -0
- package/.next/server/app/api/context/feature/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/context/file/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/context/file/route/build-manifest.json +9 -0
- package/.next/server/app/api/context/file/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/context/file/route.js +13 -0
- package/.next/server/app/api/context/file/route.js.map +5 -0
- package/.next/server/app/api/context/file/route.js.nft.json +1 -0
- package/.next/server/app/api/context/file/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/context/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/context/route/build-manifest.json +9 -0
- package/.next/server/app/api/context/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/context/route.js +11 -0
- package/.next/server/app/api/context/route.js.map +5 -0
- package/.next/server/app/api/context/route.js.nft.json +1 -0
- package/.next/server/app/api/context/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/db/backfill-access/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/db/backfill-access/route/build-manifest.json +9 -0
- package/.next/server/app/api/db/backfill-access/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/db/backfill-access/route.js +13 -0
- package/.next/server/app/api/db/backfill-access/route.js.map +5 -0
- package/.next/server/app/api/db/backfill-access/route.js.nft.json +1 -0
- package/.next/server/app/api/db/backfill-access/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/db/position/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/db/position/route/build-manifest.json +9 -0
- package/.next/server/app/api/db/position/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/db/position/route.js +15 -0
- package/.next/server/app/api/db/position/route.js.map +5 -0
- package/.next/server/app/api/db/position/route.js.nft.json +1 -0
- package/.next/server/app/api/db/position/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/db/reconcile-endpoints/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/db/reconcile-endpoints/route/build-manifest.json +9 -0
- package/.next/server/app/api/db/reconcile-endpoints/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/db/reconcile-endpoints/route.js +12 -0
- package/.next/server/app/api/db/reconcile-endpoints/route.js.map +5 -0
- package/.next/server/app/api/db/reconcile-endpoints/route.js.nft.json +1 -0
- package/.next/server/app/api/db/reconcile-endpoints/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/db/relations/[id]/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/db/relations/[id]/route/build-manifest.json +9 -0
- package/.next/server/app/api/db/relations/[id]/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/db/relations/[id]/route.js +12 -0
- package/.next/server/app/api/db/relations/[id]/route.js.map +5 -0
- package/.next/server/app/api/db/relations/[id]/route.js.nft.json +1 -0
- package/.next/server/app/api/db/relations/[id]/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/db/tables/[id]/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/db/tables/[id]/route/build-manifest.json +9 -0
- package/.next/server/app/api/db/tables/[id]/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/db/tables/[id]/route.js +12 -0
- package/.next/server/app/api/db/tables/[id]/route.js.map +5 -0
- package/.next/server/app/api/db/tables/[id]/route.js.nft.json +1 -0
- package/.next/server/app/api/db/tables/[id]/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/draft/approve/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/draft/approve/route/build-manifest.json +9 -0
- package/.next/server/app/api/draft/approve/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/draft/approve/route.js +16 -0
- package/.next/server/app/api/draft/approve/route.js.map +5 -0
- package/.next/server/app/api/draft/approve/route.js.nft.json +1 -0
- package/.next/server/app/api/draft/approve/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/draft/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/draft/route/build-manifest.json +9 -0
- package/.next/server/app/api/draft/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/draft/route.js +16 -0
- package/.next/server/app/api/draft/route.js.map +5 -0
- package/.next/server/app/api/draft/route.js.nft.json +1 -0
- package/.next/server/app/api/draft/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/draft/status/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/draft/status/route/build-manifest.json +9 -0
- package/.next/server/app/api/draft/status/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/draft/status/route.js +13 -0
- package/.next/server/app/api/draft/status/route.js.map +5 -0
- package/.next/server/app/api/draft/status/route.js.nft.json +1 -0
- package/.next/server/app/api/draft/status/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/edges/[id]/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/edges/[id]/route/build-manifest.json +9 -0
- package/.next/server/app/api/edges/[id]/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/edges/[id]/route.js +11 -0
- package/.next/server/app/api/edges/[id]/route.js.map +5 -0
- package/.next/server/app/api/edges/[id]/route.js.nft.json +1 -0
- package/.next/server/app/api/edges/[id]/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/edges/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/edges/route/build-manifest.json +9 -0
- package/.next/server/app/api/edges/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/edges/route.js +15 -0
- package/.next/server/app/api/edges/route.js.map +5 -0
- package/.next/server/app/api/edges/route.js.nft.json +1 -0
- package/.next/server/app/api/edges/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/endpoints/[id]/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/endpoints/[id]/route/build-manifest.json +9 -0
- package/.next/server/app/api/endpoints/[id]/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/endpoints/[id]/route.js +12 -0
- package/.next/server/app/api/endpoints/[id]/route.js.map +5 -0
- package/.next/server/app/api/endpoints/[id]/route.js.nft.json +1 -0
- package/.next/server/app/api/endpoints/[id]/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/entities/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/entities/route/build-manifest.json +9 -0
- package/.next/server/app/api/entities/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/entities/route.js +11 -0
- package/.next/server/app/api/entities/route.js.map +5 -0
- package/.next/server/app/api/entities/route.js.nft.json +1 -0
- package/.next/server/app/api/entities/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/ingest/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/ingest/route/build-manifest.json +9 -0
- package/.next/server/app/api/ingest/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/ingest/route.js +12 -0
- package/.next/server/app/api/ingest/route.js.map +5 -0
- package/.next/server/app/api/ingest/route.js.nft.json +1 -0
- package/.next/server/app/api/ingest/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/init/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/init/route/build-manifest.json +9 -0
- package/.next/server/app/api/init/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/init/route.js +15 -0
- package/.next/server/app/api/init/route.js.map +5 -0
- package/.next/server/app/api/init/route.js.nft.json +1 -0
- package/.next/server/app/api/init/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/map/describe/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/map/describe/route/build-manifest.json +9 -0
- package/.next/server/app/api/map/describe/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/map/describe/route.js +15 -0
- package/.next/server/app/api/map/describe/route.js.map +5 -0
- package/.next/server/app/api/map/describe/route.js.nft.json +1 -0
- package/.next/server/app/api/map/describe/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/map/files/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/map/files/route/build-manifest.json +9 -0
- package/.next/server/app/api/map/files/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/map/files/route.js +15 -0
- package/.next/server/app/api/map/files/route.js.map +5 -0
- package/.next/server/app/api/map/files/route.js.nft.json +1 -0
- package/.next/server/app/api/map/files/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/map/finish/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/map/finish/route/build-manifest.json +9 -0
- package/.next/server/app/api/map/finish/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/map/finish/route.js +15 -0
- package/.next/server/app/api/map/finish/route.js.map +5 -0
- package/.next/server/app/api/map/finish/route.js.nft.json +1 -0
- package/.next/server/app/api/map/finish/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/map/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/map/route/build-manifest.json +9 -0
- package/.next/server/app/api/map/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/map/route.js +15 -0
- package/.next/server/app/api/map/route.js.map +5 -0
- package/.next/server/app/api/map/route.js.nft.json +1 -0
- package/.next/server/app/api/map/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/map/start/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/map/start/route/build-manifest.json +9 -0
- package/.next/server/app/api/map/start/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/map/start/route.js +15 -0
- package/.next/server/app/api/map/start/route.js.map +5 -0
- package/.next/server/app/api/map/start/route.js.nft.json +1 -0
- package/.next/server/app/api/map/start/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/map/touch-active/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/map/touch-active/route/build-manifest.json +9 -0
- package/.next/server/app/api/map/touch-active/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/map/touch-active/route.js +15 -0
- package/.next/server/app/api/map/touch-active/route.js.map +5 -0
- package/.next/server/app/api/map/touch-active/route.js.nft.json +1 -0
- package/.next/server/app/api/map/touch-active/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/nodes/[id]/position/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/nodes/[id]/position/route/build-manifest.json +9 -0
- package/.next/server/app/api/nodes/[id]/position/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/nodes/[id]/position/route.js +15 -0
- package/.next/server/app/api/nodes/[id]/position/route.js.map +5 -0
- package/.next/server/app/api/nodes/[id]/position/route.js.nft.json +1 -0
- package/.next/server/app/api/nodes/[id]/position/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/nodes/[id]/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/nodes/[id]/route/build-manifest.json +9 -0
- package/.next/server/app/api/nodes/[id]/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/nodes/[id]/route.js +15 -0
- package/.next/server/app/api/nodes/[id]/route.js.map +5 -0
- package/.next/server/app/api/nodes/[id]/route.js.nft.json +1 -0
- package/.next/server/app/api/nodes/[id]/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/nodes/positions/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/nodes/positions/route/build-manifest.json +9 -0
- package/.next/server/app/api/nodes/positions/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/nodes/positions/route.js +15 -0
- package/.next/server/app/api/nodes/positions/route.js.map +5 -0
- package/.next/server/app/api/nodes/positions/route.js.nft.json +1 -0
- package/.next/server/app/api/nodes/positions/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/nodes/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/nodes/route/build-manifest.json +9 -0
- package/.next/server/app/api/nodes/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/nodes/route.js +15 -0
- package/.next/server/app/api/nodes/route.js.map +5 -0
- package/.next/server/app/api/nodes/route.js.nft.json +1 -0
- package/.next/server/app/api/nodes/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/nodes/subtasks/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/nodes/subtasks/route/build-manifest.json +9 -0
- package/.next/server/app/api/nodes/subtasks/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/nodes/subtasks/route.js +15 -0
- package/.next/server/app/api/nodes/subtasks/route.js.map +5 -0
- package/.next/server/app/api/nodes/subtasks/route.js.nft.json +1 -0
- package/.next/server/app/api/nodes/subtasks/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/notes/[id]/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/notes/[id]/route/build-manifest.json +9 -0
- package/.next/server/app/api/notes/[id]/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/notes/[id]/route.js +12 -0
- package/.next/server/app/api/notes/[id]/route.js.map +5 -0
- package/.next/server/app/api/notes/[id]/route.js.nft.json +1 -0
- package/.next/server/app/api/notes/[id]/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/notes/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/notes/route/build-manifest.json +9 -0
- package/.next/server/app/api/notes/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/notes/route.js +12 -0
- package/.next/server/app/api/notes/route.js.map +5 -0
- package/.next/server/app/api/notes/route.js.nft.json +1 -0
- package/.next/server/app/api/notes/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/open/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/open/route/build-manifest.json +9 -0
- package/.next/server/app/api/open/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/open/route.js +11 -0
- package/.next/server/app/api/open/route.js.map +5 -0
- package/.next/server/app/api/open/route.js.nft.json +1 -0
- package/.next/server/app/api/open/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/plan/annotations/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/plan/annotations/route/build-manifest.json +9 -0
- package/.next/server/app/api/plan/annotations/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/plan/annotations/route.js +15 -0
- package/.next/server/app/api/plan/annotations/route.js.map +5 -0
- package/.next/server/app/api/plan/annotations/route.js.nft.json +1 -0
- package/.next/server/app/api/plan/annotations/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/plan/approve/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/plan/approve/route/build-manifest.json +9 -0
- package/.next/server/app/api/plan/approve/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/plan/approve/route.js +16 -0
- package/.next/server/app/api/plan/approve/route.js.map +5 -0
- package/.next/server/app/api/plan/approve/route.js.nft.json +1 -0
- package/.next/server/app/api/plan/approve/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/plan/history/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/plan/history/route/build-manifest.json +9 -0
- package/.next/server/app/api/plan/history/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/plan/history/route.js +11 -0
- package/.next/server/app/api/plan/history/route.js.map +5 -0
- package/.next/server/app/api/plan/history/route.js.nft.json +1 -0
- package/.next/server/app/api/plan/history/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/plan/markdown/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/plan/markdown/route/build-manifest.json +9 -0
- package/.next/server/app/api/plan/markdown/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/plan/markdown/route.js +16 -0
- package/.next/server/app/api/plan/markdown/route.js.map +5 -0
- package/.next/server/app/api/plan/markdown/route.js.nft.json +1 -0
- package/.next/server/app/api/plan/markdown/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/plan/presence/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/plan/presence/route/build-manifest.json +9 -0
- package/.next/server/app/api/plan/presence/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/plan/presence/route.js +11 -0
- package/.next/server/app/api/plan/presence/route.js.map +5 -0
- package/.next/server/app/api/plan/presence/route.js.nft.json +1 -0
- package/.next/server/app/api/plan/presence/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/plan/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/plan/route/build-manifest.json +9 -0
- package/.next/server/app/api/plan/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/plan/route.js +16 -0
- package/.next/server/app/api/plan/route.js.map +5 -0
- package/.next/server/app/api/plan/route.js.nft.json +1 -0
- package/.next/server/app/api/plan/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/plan/verdict/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/plan/verdict/route/build-manifest.json +9 -0
- package/.next/server/app/api/plan/verdict/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/plan/verdict/route.js +16 -0
- package/.next/server/app/api/plan/verdict/route.js.map +5 -0
- package/.next/server/app/api/plan/verdict/route.js.nft.json +1 -0
- package/.next/server/app/api/plan/verdict/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/preferences/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/preferences/route/build-manifest.json +9 -0
- package/.next/server/app/api/preferences/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/preferences/route.js +7 -0
- package/.next/server/app/api/preferences/route.js.map +5 -0
- package/.next/server/app/api/preferences/route.js.nft.json +1 -0
- package/.next/server/app/api/preferences/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/reset/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/reset/route/build-manifest.json +9 -0
- package/.next/server/app/api/reset/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/reset/route.js +13 -0
- package/.next/server/app/api/reset/route.js.map +5 -0
- package/.next/server/app/api/reset/route.js.nft.json +1 -0
- package/.next/server/app/api/reset/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/settings/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/settings/route/build-manifest.json +9 -0
- package/.next/server/app/api/settings/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/settings/route.js +11 -0
- package/.next/server/app/api/settings/route.js.map +5 -0
- package/.next/server/app/api/settings/route.js.nft.json +1 -0
- package/.next/server/app/api/settings/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/stream/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/stream/route/build-manifest.json +9 -0
- package/.next/server/app/api/stream/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/stream/route.js +12 -0
- package/.next/server/app/api/stream/route.js.map +5 -0
- package/.next/server/app/api/stream/route.js.nft.json +1 -0
- package/.next/server/app/api/stream/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/version/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/version/route/build-manifest.json +9 -0
- package/.next/server/app/api/version/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/version/route.js +12 -0
- package/.next/server/app/api/version/route.js.map +5 -0
- package/.next/server/app/api/version/route.js.nft.json +1 -0
- package/.next/server/app/api/version/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/workspace/activate/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/workspace/activate/route/build-manifest.json +9 -0
- package/.next/server/app/api/workspace/activate/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/workspace/activate/route.js +14 -0
- package/.next/server/app/api/workspace/activate/route.js.map +5 -0
- package/.next/server/app/api/workspace/activate/route.js.nft.json +1 -0
- package/.next/server/app/api/workspace/activate/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/workspace/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/workspace/route/build-manifest.json +9 -0
- package/.next/server/app/api/workspace/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/workspace/route.js +11 -0
- package/.next/server/app/api/workspace/route.js.map +5 -0
- package/.next/server/app/api/workspace/route.js.nft.json +1 -0
- package/.next/server/app/api/workspace/route_client-reference-manifest.js +3 -0
- package/.next/server/app/apple-icon.png/route/app-paths-manifest.json +3 -0
- package/.next/server/app/apple-icon.png/route/build-manifest.json +9 -0
- package/.next/server/app/apple-icon.png/route.js +8 -0
- package/.next/server/app/apple-icon.png/route.js.map +5 -0
- package/.next/server/app/apple-icon.png/route.js.nft.json +1 -0
- package/.next/server/app/apple-icon.png.body +0 -0
- package/.next/server/app/apple-icon.png.meta +1 -0
- package/.next/server/app/help/page/app-paths-manifest.json +3 -0
- package/.next/server/app/help/page/build-manifest.json +17 -0
- package/.next/server/app/help/page/next-font-manifest.json +11 -0
- package/.next/server/app/help/page/react-loadable-manifest.json +1 -0
- package/.next/server/app/help/page/server-reference-manifest.json +4 -0
- package/.next/server/app/help/page.js +16 -0
- package/.next/server/app/help/page.js.map +5 -0
- package/.next/server/app/help/page.js.nft.json +1 -0
- package/.next/server/app/help/page_client-reference-manifest.js +3 -0
- package/.next/server/app/help.html +1 -0
- package/.next/server/app/help.meta +15 -0
- package/.next/server/app/help.rsc +36 -0
- package/.next/server/app/help.segments/_full.segment.rsc +36 -0
- package/.next/server/app/help.segments/_head.segment.rsc +6 -0
- package/.next/server/app/help.segments/_index.segment.rsc +13 -0
- package/.next/server/app/help.segments/_tree.segment.rsc +5 -0
- package/.next/server/app/help.segments/help/__PAGE__.segment.rsc +17 -0
- package/.next/server/app/help.segments/help.segment.rsc +5 -0
- package/.next/server/app/icon.svg/route/app-paths-manifest.json +3 -0
- package/.next/server/app/icon.svg/route/build-manifest.json +9 -0
- package/.next/server/app/icon.svg/route.js +7 -0
- package/.next/server/app/icon.svg/route.js.map +5 -0
- package/.next/server/app/icon.svg/route.js.nft.json +1 -0
- package/.next/server/app/icon.svg.body +4 -0
- package/.next/server/app/icon.svg.meta +1 -0
- package/.next/server/app/index.html +1 -0
- package/.next/server/app/index.meta +14 -0
- package/.next/server/app/index.rsc +26 -0
- package/.next/server/app/index.segments/__PAGE__.segment.rsc +7 -0
- package/.next/server/app/index.segments/_full.segment.rsc +26 -0
- package/.next/server/app/index.segments/_head.segment.rsc +6 -0
- package/.next/server/app/index.segments/_index.segment.rsc +13 -0
- package/.next/server/app/index.segments/_tree.segment.rsc +6 -0
- package/.next/server/app/map/page/app-paths-manifest.json +3 -0
- package/.next/server/app/map/page/build-manifest.json +17 -0
- package/.next/server/app/map/page/next-font-manifest.json +11 -0
- package/.next/server/app/map/page/react-loadable-manifest.json +1 -0
- package/.next/server/app/map/page/server-reference-manifest.json +89 -0
- package/.next/server/app/map/page.js +25 -0
- package/.next/server/app/map/page.js.map +5 -0
- package/.next/server/app/map/page.js.nft.json +1 -0
- package/.next/server/app/map/page_client-reference-manifest.js +3 -0
- package/.next/server/app/page/app-paths-manifest.json +3 -0
- package/.next/server/app/page/build-manifest.json +17 -0
- package/.next/server/app/page/next-font-manifest.json +11 -0
- package/.next/server/app/page/react-loadable-manifest.json +1 -0
- package/.next/server/app/page/server-reference-manifest.json +4 -0
- package/.next/server/app/page.js +16 -0
- package/.next/server/app/page.js.map +5 -0
- package/.next/server/app/page.js.nft.json +1 -0
- package/.next/server/app/page_client-reference-manifest.js +3 -0
- package/.next/server/app/plan/page/app-paths-manifest.json +3 -0
- package/.next/server/app/plan/page/build-manifest.json +17 -0
- package/.next/server/app/plan/page/next-font-manifest.json +11 -0
- package/.next/server/app/plan/page/react-loadable-manifest.json +1 -0
- package/.next/server/app/plan/page/server-reference-manifest.json +89 -0
- package/.next/server/app/plan/page.js +26 -0
- package/.next/server/app/plan/page.js.map +5 -0
- package/.next/server/app/plan/page.js.nft.json +1 -0
- package/.next/server/app/plan/page_client-reference-manifest.js +3 -0
- package/.next/server/app/settings/page/app-paths-manifest.json +3 -0
- package/.next/server/app/settings/page/build-manifest.json +17 -0
- package/.next/server/app/settings/page/next-font-manifest.json +11 -0
- package/.next/server/app/settings/page/react-loadable-manifest.json +1 -0
- package/.next/server/app/settings/page/server-reference-manifest.json +4 -0
- package/.next/server/app/settings/page.js +17 -0
- package/.next/server/app/settings/page.js.map +5 -0
- package/.next/server/app/settings/page.js.nft.json +1 -0
- package/.next/server/app/settings/page_client-reference-manifest.js +3 -0
- package/.next/server/app-paths-manifest.json +59 -0
- package/.next/server/chunks/[externals]_@huggingface_transformers_05bd-zz._.js +3 -0
- package/.next/server/chunks/[externals]_@huggingface_transformers_05bd-zz._.js.map +1 -0
- package/.next/server/chunks/[externals]__1m_jh08._.js +3 -0
- package/.next/server/chunks/[externals]__1m_jh08._.js.map +1 -0
- package/.next/server/chunks/[externals]_next_dist_1081pat._.js +3 -0
- package/.next/server/chunks/[externals]_next_dist_1081pat._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__0--8e0y._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0--8e0y._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__0-68r22._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0-68r22._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__008acf8._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__008acf8._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__00rostp._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__00rostp._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__04deymo._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__04deymo._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__05_ckr9._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__05_ckr9._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__08b769e._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__08b769e._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__0935gge._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0935gge._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__0b04f4n._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0b04f4n._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__0bule95._.js +11 -0
- package/.next/server/chunks/[root-of-the-server]__0bule95._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__0dgnobj._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0dgnobj._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__0fnoun8._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0fnoun8._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__0gcvcx_._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0gcvcx_._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__0gnu9c5._.js +11 -0
- package/.next/server/chunks/[root-of-the-server]__0gnu9c5._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__0imrhoi._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0imrhoi._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__0iq9oau._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0iq9oau._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__0k_e0ex._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0k_e0ex._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__0kj4pte._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0kj4pte._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__0muvnnv._.js +11 -0
- package/.next/server/chunks/[root-of-the-server]__0muvnnv._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__0olqs85._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0olqs85._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__0r4ba8s._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0r4ba8s._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__0sb_5m8._.js +20 -0
- package/.next/server/chunks/[root-of-the-server]__0sb_5m8._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__0y6kb2t._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0y6kb2t._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__0zfwiuh._.js +11 -0
- package/.next/server/chunks/[root-of-the-server]__0zfwiuh._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__11037f1._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__11037f1._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__1197yfd._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1197yfd._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__138pbmp._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__138pbmp._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__166th-t._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__166th-t._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__190_wb7._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__190_wb7._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__190zu98._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__190zu98._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__1_7ntsu._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1_7ntsu._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__1bwqb44._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1bwqb44._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__1d6w22k._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1d6w22k._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__1d9wmd_._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1d9wmd_._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__1j25n4-._.js +5 -0
- package/.next/server/chunks/[root-of-the-server]__1j25n4-._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__1jtw_i1._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1jtw_i1._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__1lv6sqm._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1lv6sqm._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__1m2v05v._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1m2v05v._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__1n-kcwj._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1n-kcwj._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__1nn9crd._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1nn9crd._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__1rimo-u._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1rimo-u._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__1sb7b9b._.js +9 -0
- package/.next/server/chunks/[root-of-the-server]__1sb7b9b._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__1t2egm-._.js +9 -0
- package/.next/server/chunks/[root-of-the-server]__1t2egm-._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__1t3s3-y._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1t3s3-y._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__1tab6-_._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1tab6-_._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__1v3_x0a._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1v3_x0a._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__1vq6_bb._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1vq6_bb._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__1xfg6n4._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1xfg6n4._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__1y_g68p._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1y_g68p._.js.map +1 -0
- package/.next/server/chunks/[turbopack]_runtime.js +903 -0
- package/.next/server/chunks/[turbopack]_runtime.js.map +11 -0
- package/.next/server/chunks/_0-k8r4o._.js +3 -0
- package/.next/server/chunks/_0-k8r4o._.js.map +1 -0
- package/.next/server/chunks/_00drqg3._.js +3 -0
- package/.next/server/chunks/_00drqg3._.js.map +1 -0
- package/.next/server/chunks/_04_hx58._.js +3 -0
- package/.next/server/chunks/_04_hx58._.js.map +1 -0
- package/.next/server/chunks/_0bj_zep._.js +3 -0
- package/.next/server/chunks/_0bj_zep._.js.map +1 -0
- package/.next/server/chunks/_0d9p87n._.js +3 -0
- package/.next/server/chunks/_0d9p87n._.js.map +1 -0
- package/.next/server/chunks/_0uzzk4s._.js +3 -0
- package/.next/server/chunks/_0uzzk4s._.js.map +1 -0
- package/.next/server/chunks/_0x--pb9._.js +3 -0
- package/.next/server/chunks/_0x--pb9._.js.map +1 -0
- package/.next/server/chunks/_1-006gs._.js +11 -0
- package/.next/server/chunks/_1-006gs._.js.map +1 -0
- package/.next/server/chunks/_1gmut2r._.js +3 -0
- package/.next/server/chunks/_1gmut2r._.js.map +1 -0
- package/.next/server/chunks/_1h7jba5._.js +3 -0
- package/.next/server/chunks/_1h7jba5._.js.map +1 -0
- package/.next/server/chunks/_1p13_nj._.js +3 -0
- package/.next/server/chunks/_1p13_nj._.js.map +1 -0
- package/.next/server/chunks/_1v92m46._.js +11 -0
- package/.next/server/chunks/_1v92m46._.js.map +1 -0
- package/.next/server/chunks/_next-internal_server_app_api_code-graph_position_route_actions_0ddmfq8.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_code-graph_position_route_actions_0ddmfq8.js.map +1 -0
- package/.next/server/chunks/_next-internal_server_app_api_code-graph_route_actions_107oiy1.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_code-graph_route_actions_107oiy1.js.map +1 -0
- package/.next/server/chunks/_next-internal_server_app_api_context_embed-backfill_route_actions_0fddf11.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_context_embed-backfill_route_actions_0fddf11.js.map +1 -0
- package/.next/server/chunks/_next-internal_server_app_api_context_feature_route_actions_0g4_r0t.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_context_feature_route_actions_0g4_r0t.js.map +1 -0
- package/.next/server/chunks/_next-internal_server_app_api_context_file_route_actions_1v15k33.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_context_file_route_actions_1v15k33.js.map +1 -0
- package/.next/server/chunks/_next-internal_server_app_api_context_route_actions_066vuc0.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_context_route_actions_066vuc0.js.map +1 -0
- package/.next/server/chunks/_next-internal_server_app_api_db_backfill-access_route_actions_0krkam5.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_db_backfill-access_route_actions_0krkam5.js.map +1 -0
- package/.next/server/chunks/_next-internal_server_app_api_db_position_route_actions_0y81s5h.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_db_position_route_actions_0y81s5h.js.map +1 -0
- package/.next/server/chunks/_next-internal_server_app_api_db_reconcile-endpoints_route_actions_11wjo3_.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_db_reconcile-endpoints_route_actions_11wjo3_.js.map +1 -0
- package/.next/server/chunks/_next-internal_server_app_api_db_relations_[id]_route_actions_0ok7b-c.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_db_relations_[id]_route_actions_0ok7b-c.js.map +1 -0
- package/.next/server/chunks/_next-internal_server_app_api_db_tables_[id]_route_actions_17b6_8p.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_db_tables_[id]_route_actions_17b6_8p.js.map +1 -0
- package/.next/server/chunks/_next-internal_server_app_api_draft_approve_route_actions_12l1gql.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_draft_approve_route_actions_12l1gql.js.map +1 -0
- package/.next/server/chunks/_next-internal_server_app_api_draft_route_actions_1y2euqt.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_draft_route_actions_1y2euqt.js.map +1 -0
- package/.next/server/chunks/_next-internal_server_app_api_draft_status_route_actions_0imc7yr.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_draft_status_route_actions_0imc7yr.js.map +1 -0
- package/.next/server/chunks/_next-internal_server_app_api_edges_[id]_route_actions_1rx28dy.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_edges_[id]_route_actions_1rx28dy.js.map +1 -0
- package/.next/server/chunks/_next-internal_server_app_api_edges_route_actions_1i6-f0p.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_edges_route_actions_1i6-f0p.js.map +1 -0
- package/.next/server/chunks/_next-internal_server_app_api_endpoints_[id]_route_actions_1hynl36.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_endpoints_[id]_route_actions_1hynl36.js.map +1 -0
- package/.next/server/chunks/_next-internal_server_app_api_entities_route_actions_1jx0-vm.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_entities_route_actions_1jx0-vm.js.map +1 -0
- package/.next/server/chunks/_next-internal_server_app_api_ingest_route_actions_1oz_9xc.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_ingest_route_actions_1oz_9xc.js.map +1 -0
- package/.next/server/chunks/_next-internal_server_app_api_init_route_actions_00i08o0.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_init_route_actions_00i08o0.js.map +1 -0
- package/.next/server/chunks/_next-internal_server_app_api_map_describe_route_actions_04m22-e.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_map_describe_route_actions_04m22-e.js.map +1 -0
- package/.next/server/chunks/_next-internal_server_app_api_map_files_route_actions_1gsvfd9.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_map_files_route_actions_1gsvfd9.js.map +1 -0
- package/.next/server/chunks/_next-internal_server_app_api_map_finish_route_actions_130bs5b.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_map_finish_route_actions_130bs5b.js.map +1 -0
- package/.next/server/chunks/_next-internal_server_app_api_map_route_actions_1ylt-yg.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_map_route_actions_1ylt-yg.js.map +1 -0
- package/.next/server/chunks/_next-internal_server_app_api_map_start_route_actions_1n4zdon.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_map_start_route_actions_1n4zdon.js.map +1 -0
- package/.next/server/chunks/_next-internal_server_app_api_map_touch-active_route_actions_0wvoq-h.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_map_touch-active_route_actions_0wvoq-h.js.map +1 -0
- package/.next/server/chunks/_next-internal_server_app_api_nodes_[id]_position_route_actions_0_695u2.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_nodes_[id]_position_route_actions_0_695u2.js.map +1 -0
- package/.next/server/chunks/_next-internal_server_app_api_nodes_[id]_route_actions_017e_f3.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_nodes_[id]_route_actions_017e_f3.js.map +1 -0
- package/.next/server/chunks/_next-internal_server_app_api_nodes_positions_route_actions_1pz3o9o.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_nodes_positions_route_actions_1pz3o9o.js.map +1 -0
- package/.next/server/chunks/_next-internal_server_app_api_nodes_route_actions_0iuxxdu.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_nodes_route_actions_0iuxxdu.js.map +1 -0
- package/.next/server/chunks/_next-internal_server_app_api_nodes_subtasks_route_actions_0uw715o.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_nodes_subtasks_route_actions_0uw715o.js.map +1 -0
- package/.next/server/chunks/_next-internal_server_app_api_notes_[id]_route_actions_1kpl381.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_notes_[id]_route_actions_1kpl381.js.map +1 -0
- package/.next/server/chunks/_next-internal_server_app_api_notes_route_actions_0mm_p_3.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_notes_route_actions_0mm_p_3.js.map +1 -0
- package/.next/server/chunks/_next-internal_server_app_api_open_route_actions_1x77eq1.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_open_route_actions_1x77eq1.js.map +1 -0
- package/.next/server/chunks/_next-internal_server_app_api_plan_annotations_route_actions_11aui44.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_plan_annotations_route_actions_11aui44.js.map +1 -0
- package/.next/server/chunks/_next-internal_server_app_api_plan_approve_route_actions_06jkmnf.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_plan_approve_route_actions_06jkmnf.js.map +1 -0
- package/.next/server/chunks/_next-internal_server_app_api_plan_history_route_actions_17hqx0m.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_plan_history_route_actions_17hqx0m.js.map +1 -0
- package/.next/server/chunks/_next-internal_server_app_api_plan_markdown_route_actions_1qb1-9r.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_plan_markdown_route_actions_1qb1-9r.js.map +1 -0
- package/.next/server/chunks/_next-internal_server_app_api_plan_presence_route_actions_1r91k5c.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_plan_presence_route_actions_1r91k5c.js.map +1 -0
- package/.next/server/chunks/_next-internal_server_app_api_plan_route_actions_1_nzr8r.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_plan_route_actions_1_nzr8r.js.map +1 -0
- package/.next/server/chunks/_next-internal_server_app_api_plan_verdict_route_actions_10xm0j8.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_plan_verdict_route_actions_10xm0j8.js.map +1 -0
- package/.next/server/chunks/_next-internal_server_app_api_preferences_route_actions_14__a0r.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_preferences_route_actions_14__a0r.js.map +1 -0
- package/.next/server/chunks/_next-internal_server_app_api_reset_route_actions_1tcp2ms.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_reset_route_actions_1tcp2ms.js.map +1 -0
- package/.next/server/chunks/_next-internal_server_app_api_settings_route_actions_1bpm9ac.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_settings_route_actions_1bpm9ac.js.map +1 -0
- package/.next/server/chunks/_next-internal_server_app_api_stream_route_actions_0oy6g75.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_stream_route_actions_0oy6g75.js.map +1 -0
- package/.next/server/chunks/_next-internal_server_app_api_version_route_actions_0kbx30h.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_version_route_actions_0kbx30h.js.map +1 -0
- package/.next/server/chunks/_next-internal_server_app_api_workspace_activate_route_actions_1hv2y82.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_workspace_activate_route_actions_1hv2y82.js.map +1 -0
- package/.next/server/chunks/_next-internal_server_app_api_workspace_route_actions_19-xkal.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_workspace_route_actions_19-xkal.js.map +1 -0
- package/.next/server/chunks/_next-internal_server_app_apple-icon_png_route_actions_0jcl8au.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_apple-icon_png_route_actions_0jcl8au.js.map +1 -0
- package/.next/server/chunks/_next-internal_server_app_icon_svg_route_actions_1r2h_ub.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_icon_svg_route_actions_1r2h_ub.js.map +1 -0
- package/.next/server/chunks/instrumentation_ts_1oq3o45._.js +3 -0
- package/.next/server/chunks/instrumentation_ts_1oq3o45._.js.map +1 -0
- package/.next/server/chunks/lib_04zrdtl._.js +3 -0
- package/.next/server/chunks/lib_04zrdtl._.js.map +1 -0
- package/.next/server/chunks/lib_0rad2y6._.js +3 -0
- package/.next/server/chunks/lib_0rad2y6._.js.map +1 -0
- package/.next/server/chunks/lib_10tibe8._.js +7 -0
- package/.next/server/chunks/lib_10tibe8._.js.map +1 -0
- package/.next/server/chunks/lib_1upr0dj._.js +3 -0
- package/.next/server/chunks/lib_1upr0dj._.js.map +1 -0
- package/.next/server/chunks/lib_1wz-3od._.js +3 -0
- package/.next/server/chunks/lib_1wz-3od._.js.map +1 -0
- package/.next/server/chunks/lib_1xzwro7._.js +3 -0
- package/.next/server/chunks/lib_1xzwro7._.js.map +1 -0
- package/.next/server/chunks/lib_db_ts_0h_yn5m._.js +3 -0
- package/.next/server/chunks/lib_db_ts_0h_yn5m._.js.map +1 -0
- package/.next/server/chunks/lib_drizzle_provision_ts_1po9dyo._.js +3 -0
- package/.next/server/chunks/lib_drizzle_provision_ts_1po9dyo._.js.map +1 -0
- package/.next/server/chunks/lib_drizzle_schema_ts_0ixydnz._.js +3 -0
- package/.next/server/chunks/lib_drizzle_schema_ts_0ixydnz._.js.map +1 -0
- package/.next/server/chunks/lib_roadmap-force-layout_ts_0e5r3g2._.js +3 -0
- package/.next/server/chunks/lib_roadmap-force-layout_ts_0e5r3g2._.js.map +1 -0
- package/.next/server/chunks/node_modules_drizzle-orm_05n3ooz._.js +3 -0
- package/.next/server/chunks/node_modules_drizzle-orm_05n3ooz._.js.map +1 -0
- package/.next/server/chunks/node_modules_drizzle-orm_0cht0an._.js +3 -0
- package/.next/server/chunks/node_modules_drizzle-orm_0cht0an._.js.map +1 -0
- package/.next/server/chunks/node_modules_drizzle-orm_0ma7f2e._.js +4 -0
- package/.next/server/chunks/node_modules_drizzle-orm_0ma7f2e._.js.map +1 -0
- package/.next/server/chunks/node_modules_drizzle-orm_0q0hg2u._.js +4 -0
- package/.next/server/chunks/node_modules_drizzle-orm_0q0hg2u._.js.map +1 -0
- package/.next/server/chunks/node_modules_drizzle-orm_0rs3wbv._.js +3 -0
- package/.next/server/chunks/node_modules_drizzle-orm_0rs3wbv._.js.map +1 -0
- package/.next/server/chunks/node_modules_drizzle-orm_index_1qnscv7.js +3 -0
- package/.next/server/chunks/node_modules_drizzle-orm_index_1qnscv7.js.map +1 -0
- package/.next/server/chunks/node_modules_drizzle-orm_libsql_0yabams._.js +15 -0
- package/.next/server/chunks/node_modules_drizzle-orm_libsql_0yabams._.js.map +1 -0
- package/.next/server/chunks/node_modules_next_08s853w._.js +13 -0
- package/.next/server/chunks/node_modules_next_08s853w._.js.map +1 -0
- package/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_0qz67ql.js +3 -0
- package/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_0qz67ql.js.map +1 -0
- package/.next/server/chunks/node_modules_zod_v4_classic_external_1-pw2v2.js +64 -0
- package/.next/server/chunks/node_modules_zod_v4_classic_external_1-pw2v2.js.map +1 -0
- package/.next/server/chunks/ssr/[externals]_@huggingface_transformers_05bd-zz._.js +3 -0
- package/.next/server/chunks/ssr/[externals]_@huggingface_transformers_05bd-zz._.js.map +1 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__00vz2sw._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__00vz2sw._.js.map +1 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__07b655z._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__07b655z._.js.map +1 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0dr0a32._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0dr0a32._.js.map +1 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0jx25ik._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0jx25ik._.js.map +1 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0nqskgw._.js +19 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0nqskgw._.js.map +1 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0pkeb0m._.js +9 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0pkeb0m._.js.map +1 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0s74gvr._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0s74gvr._.js.map +1 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0v7a-e-._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0v7a-e-._.js.map +1 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0x4-71n._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0x4-71n._.js.map +1 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0xqf488._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0xqf488._.js.map +1 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0y_88xg._.js +33 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0y_88xg._.js.map +1 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__1-yyv5l._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__1-yyv5l._.js.map +1 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__1366qju._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__1366qju._.js.map +1 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__1_ustu7._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__1_ustu7._.js.map +1 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__1dky4g0._.js +33 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__1dky4g0._.js.map +1 -0
- package/.next/server/chunks/ssr/[turbopack]_runtime.js +903 -0
- package/.next/server/chunks/ssr/[turbopack]_runtime.js.map +11 -0
- package/.next/server/chunks/ssr/_0eabx1f._.js +3 -0
- package/.next/server/chunks/ssr/_0eabx1f._.js.map +1 -0
- package/.next/server/chunks/ssr/_0ni84yi._.js +3 -0
- package/.next/server/chunks/ssr/_0ni84yi._.js.map +1 -0
- package/.next/server/chunks/ssr/_0pgw716._.js +67 -0
- package/.next/server/chunks/ssr/_0pgw716._.js.map +1 -0
- package/.next/server/chunks/ssr/_0r84jcg._.js +6 -0
- package/.next/server/chunks/ssr/_0r84jcg._.js.map +1 -0
- package/.next/server/chunks/ssr/_15if8ma._.js +3 -0
- package/.next/server/chunks/ssr/_15if8ma._.js.map +1 -0
- package/.next/server/chunks/ssr/_176djsq._.js +4 -0
- package/.next/server/chunks/ssr/_176djsq._.js.map +1 -0
- package/.next/server/chunks/ssr/_179xsho._.js +3 -0
- package/.next/server/chunks/ssr/_179xsho._.js.map +1 -0
- package/.next/server/chunks/ssr/_1_n8arv._.js +3 -0
- package/.next/server/chunks/ssr/_1_n8arv._.js.map +1 -0
- package/.next/server/chunks/ssr/_1suxp_q._.js +3 -0
- package/.next/server/chunks/ssr/_1suxp_q._.js.map +1 -0
- package/.next/server/chunks/ssr/_1vt70iy._.js +18 -0
- package/.next/server/chunks/ssr/_1vt70iy._.js.map +1 -0
- package/.next/server/chunks/ssr/_1w2komx._.js +3 -0
- package/.next/server/chunks/ssr/_1w2komx._.js.map +1 -0
- package/.next/server/chunks/ssr/_1w73gpg._.js +4 -0
- package/.next/server/chunks/ssr/_1w73gpg._.js.map +1 -0
- package/.next/server/chunks/ssr/_next-internal_server_app__global-error_page_actions_0zi5s8-.js +3 -0
- package/.next/server/chunks/ssr/_next-internal_server_app__global-error_page_actions_0zi5s8-.js.map +1 -0
- package/.next/server/chunks/ssr/_next-internal_server_app__not-found_page_actions_0pt47yr.js +3 -0
- package/.next/server/chunks/ssr/_next-internal_server_app__not-found_page_actions_0pt47yr.js.map +1 -0
- package/.next/server/chunks/ssr/_next-internal_server_app_help_page_actions_04daq_g.js +3 -0
- package/.next/server/chunks/ssr/_next-internal_server_app_help_page_actions_04daq_g.js.map +1 -0
- package/.next/server/chunks/ssr/_next-internal_server_app_page_actions_0hhsz1j.js +3 -0
- package/.next/server/chunks/ssr/_next-internal_server_app_page_actions_0hhsz1j.js.map +1 -0
- package/.next/server/chunks/ssr/_next-internal_server_app_settings_page_actions_11x4dq5.js +3 -0
- package/.next/server/chunks/ssr/_next-internal_server_app_settings_page_actions_11x4dq5.js.map +1 -0
- package/.next/server/chunks/ssr/components_1wolv70._.js +157 -0
- package/.next/server/chunks/ssr/components_1wolv70._.js.map +1 -0
- package/.next/server/chunks/ssr/components_graph_files-map-client_tsx_10bha9z._.js +3 -0
- package/.next/server/chunks/ssr/components_graph_files-map-client_tsx_10bha9z._.js.map +1 -0
- package/.next/server/chunks/ssr/components_landing_landing_tsx_1_9k5z7._.js +3 -0
- package/.next/server/chunks/ssr/components_landing_landing_tsx_1_9k5z7._.js.map +1 -0
- package/.next/server/chunks/ssr/components_plan_plan-workspace_tsx_0t1topu._.js +3 -0
- package/.next/server/chunks/ssr/components_plan_plan-workspace_tsx_0t1topu._.js.map +1 -0
- package/.next/server/chunks/ssr/lib_13g58ln._.js +3 -0
- package/.next/server/chunks/ssr/lib_13g58ln._.js.map +1 -0
- package/.next/server/chunks/ssr/lib_db_ts_0bo045t._.js +3 -0
- package/.next/server/chunks/ssr/lib_db_ts_0bo045t._.js.map +1 -0
- package/.next/server/chunks/ssr/lib_drizzle_schema_ts_0oz5uob._.js +3 -0
- package/.next/server/chunks/ssr/lib_drizzle_schema_ts_0oz5uob._.js.map +1 -0
- package/.next/server/chunks/ssr/node_modules_0h91jdk._.js +33 -0
- package/.next/server/chunks/ssr/node_modules_0h91jdk._.js.map +1 -0
- package/.next/server/chunks/ssr/node_modules_0vtauab._.js +3 -0
- package/.next/server/chunks/ssr/node_modules_0vtauab._.js.map +1 -0
- package/.next/server/chunks/ssr/node_modules_drizzle-orm_0txo559._.js +4 -0
- package/.next/server/chunks/ssr/node_modules_drizzle-orm_0txo559._.js.map +1 -0
- package/.next/server/chunks/ssr/node_modules_drizzle-orm_1d7zgzr._.js +4 -0
- package/.next/server/chunks/ssr/node_modules_drizzle-orm_1d7zgzr._.js.map +1 -0
- package/.next/server/chunks/ssr/node_modules_drizzle-orm_1zqkwdy._.js +3 -0
- package/.next/server/chunks/ssr/node_modules_drizzle-orm_1zqkwdy._.js.map +1 -0
- package/.next/server/chunks/ssr/node_modules_drizzle-orm_202ujxv._.js +3 -0
- package/.next/server/chunks/ssr/node_modules_drizzle-orm_202ujxv._.js.map +1 -0
- package/.next/server/chunks/ssr/node_modules_drizzle-orm_index_0ji3_g8.js +3 -0
- package/.next/server/chunks/ssr/node_modules_drizzle-orm_index_0ji3_g8.js.map +1 -0
- package/.next/server/chunks/ssr/node_modules_drizzle-orm_libsql_06opikx._.js +15 -0
- package/.next/server/chunks/ssr/node_modules_drizzle-orm_libsql_06opikx._.js.map +1 -0
- package/.next/server/chunks/ssr/node_modules_lucide-react_dist_esm_icons_shield-check_mjs_1cccgdy._.js +3 -0
- package/.next/server/chunks/ssr/node_modules_lucide-react_dist_esm_icons_shield-check_mjs_1cccgdy._.js.map +1 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_0890nbp._.js +3 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_0890nbp._.js.map +1 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_0airgni._.js +3 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_0airgni._.js.map +1 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_0alesp5._.js +3 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_0alesp5._.js.map +1 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_0uboya6._.js +6 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_0uboya6._.js.map +1 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_client_components_0wpq8j3._.js +3 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_client_components_0wpq8j3._.js.map +1 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_client_components_builtin_forbidden_0symwr9.js +3 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_client_components_builtin_forbidden_0symwr9.js.map +1 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_client_components_builtin_global-error_0-o-goa.js +3 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_client_components_builtin_global-error_0-o-goa.js.map +1 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_client_components_builtin_unauthorized_0l_sp0x.js +3 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_client_components_builtin_unauthorized_0l_sp0x.js.map +1 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_compiled_@opentelemetry_api_index_1oy1nwh.js +3 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_compiled_@opentelemetry_api_index_1oy1nwh.js.map +1 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0d7qbqa.js +4 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0d7qbqa.js.map +1 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0s87tpk.js +4 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0s87tpk.js.map +1 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_114qdo2.js +4 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_114qdo2.js.map +1 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_19--w_z.js +4 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_19--w_z.js.map +1 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_19_kztz.js +4 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_19_kztz.js.map +1 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_19qzf81.js +4 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_19qzf81.js.map +1 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_1wge0av.js +4 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_1wge0av.js.map +1 -0
- package/.next/server/edge/chunks/_0o_tvsk._.js +3 -0
- package/.next/server/edge/chunks/_0o_tvsk._.js.map +1 -0
- package/.next/server/edge/chunks/node_modules_next_dist_esm_build_templates_edge-wrapper_1ipl-lx.js.map +1 -0
- package/.next/server/edge/chunks/turbopack-node_modules_next_dist_esm_build_templates_edge-wrapper_1ipl-lx.js +3 -0
- package/.next/server/functions-config-manifest.json +14 -0
- package/.next/server/instrumentation/middleware-manifest.json +12 -0
- package/.next/server/instrumentation.js +4 -0
- package/.next/server/instrumentation.js.map +5 -0
- package/.next/server/instrumentation.js.nft.json +1 -0
- package/.next/server/interception-route-rewrite-manifest.js +1 -0
- package/.next/server/middleware/middleware-manifest.json +6 -0
- package/.next/server/middleware-build-manifest.js +21 -0
- package/.next/server/middleware-manifest.json +6 -0
- package/.next/server/middleware.js +5 -0
- package/.next/server/middleware.js.map +5 -0
- package/.next/server/middleware.js.nft.json +1 -0
- package/.next/server/next-font-manifest.js +1 -0
- package/.next/server/next-font-manifest.json +31 -0
- package/.next/server/pages/404.html +1 -0
- package/.next/server/pages/500.html +1 -0
- package/.next/server/pages-manifest.json +4 -0
- package/.next/server/prefetch-hints.json +1 -0
- package/.next/server/server-reference-manifest.js +1 -0
- package/.next/server/server-reference-manifest.json +132 -0
- package/.next/static/_wmO3ZSrpuwty88NNlnrH/_buildManifest.js +11 -0
- package/.next/static/_wmO3ZSrpuwty88NNlnrH/_clientMiddlewareManifest.js +6 -0
- package/.next/static/_wmO3ZSrpuwty88NNlnrH/_ssgManifest.js +1 -0
- package/.next/static/chunks/01dkdyukbdpqq.js +31 -0
- package/.next/static/chunks/05-c3ty_6dwfk.js +1 -0
- package/.next/static/chunks/07u_h6i539_wj.js +2 -0
- package/.next/static/chunks/09wlenlnsbkl7.js +2 -0
- package/.next/static/chunks/0_9p121-4am0a.js +1 -0
- package/.next/static/chunks/0cz1d0mv5g_q7.js +1 -0
- package/.next/static/chunks/19cl65vz3pos0.js +1 -0
- package/.next/static/chunks/19hoowcssv0w1.css +1 -0
- package/.next/static/chunks/1bk_i_akra521.css +2 -0
- package/.next/static/chunks/1pp98vred9isg.js +1 -0
- package/.next/static/chunks/2-t6-hz_de2nr.js +155 -0
- package/.next/static/chunks/203o948823s96.css +1 -0
- package/.next/static/chunks/245vq4i7_x7tm.js +1 -0
- package/.next/static/chunks/27jktro2p5rq9.js +4 -0
- package/.next/static/chunks/2hpdskhtooxl4.js +1 -0
- package/.next/static/chunks/368etk_9oovhj.js +1 -0
- package/.next/static/chunks/3n7dm2ojtyzwn.js +1 -0
- package/.next/static/chunks/3oc95d6bep78a.css +1 -0
- package/.next/static/chunks/3qp8f4catg9zw.js +2 -0
- package/.next/static/chunks/3ywpldblg905c.js +1 -0
- package/.next/static/chunks/4397avi9yar6d.js +1 -0
- package/.next/static/chunks/44_nvrzzjs0pv.js +1 -0
- package/.next/static/chunks/turbopack-0rldyqi2kcq2j.js +1 -0
- package/.next/static/media/4fa387ec64143e14-s.2tuy5pz7dlieh.woff2 +0 -0
- package/.next/static/media/53b9e256198e5412-s.390ncx5urfkfu.woff2 +0 -0
- package/.next/static/media/5ce348bf30bf5439-s.31988l_ccedte.woff2 +0 -0
- package/.next/static/media/6306c77e7c8268e4-s.2dbetqa9o8jxf.woff2 +0 -0
- package/.next/static/media/7178b3e590c64307-s.21jp631_3pja2.woff2 +0 -0
- package/.next/static/media/797e433ab948586e-s.p.0r6juujl39pe6.woff2 +0 -0
- package/.next/static/media/7d817b4c03b0c5f1-s.1uyisp29ctx0d.woff2 +0 -0
- package/.next/static/media/8a480f0b521d4e75-s.1qq4vpdcun5oj.woff2 +0 -0
- package/.next/static/media/apple-icon.0qbqv4vpdxdo0.png +0 -0
- package/.next/static/media/bbc41e54d2fcbd21-s.1rgnod-3esatf.woff2 +0 -0
- package/.next/static/media/caa3a2e1cccd8315-s.p.0wgildi0cnwt9.woff2 +0 -0
- package/.next/static/media/fef07dbb0973bf53-s.3p2_lha1f2xer.woff2 +0 -0
- package/.next/static/media/icon.23_qbw6oy1xqy.svg +4 -0
- package/.next/trace +2 -0
- package/.next/trace-build +1 -0
- package/.next/turbopack +0 -0
- package/.next/types/cache-life.d.ts +145 -0
- package/.next/types/routes.d.ts +124 -0
- package/.next/types/validator.ts +538 -0
- package/README.md +94 -0
- package/dist/bin/beacon.js +10 -0
- package/dist/bin/doctor.js +227 -0
- package/dist/bin/hook.js +225 -0
- package/dist/bin/mcp.js +247 -0
- package/dist/bin/plan.js +228 -0
- package/dist/bin/prompt.js +4 -0
- package/dist/bin/stop-hook.js +5 -0
- package/dist/bin/uninstall.js +228 -0
- package/dist/lib/assets.js +192 -0
- package/dist/lib/global-install.js +224 -0
- package/dist/lib/workspaces.js +2 -0
- package/drizzle/0000_bitter_network.sql +230 -0
- package/drizzle/meta/0000_snapshot.json +1589 -0
- package/drizzle/meta/_journal.json +13 -0
- package/next.config.ts +15 -0
- package/package.json +90 -0
- package/public/brand/beacon-apple.svg +30 -0
- package/public/brand/beacon-glyph-128.png +0 -0
- package/public/brand/beacon-glyph-512.png +0 -0
- package/public/brand/beacon-glyph-mono-128.png +0 -0
- package/public/brand/beacon-glyph-mono-512.png +0 -0
- package/public/brand/beacon-glyph-mono.svg +4 -0
- package/public/brand/beacon-glyph.svg +21 -0
- package/public/brand/beacon-icon-1024.png +0 -0
- package/public/brand/beacon-icon-192.png +0 -0
- package/public/brand/beacon-icon-256.png +0 -0
- package/public/brand/beacon-icon-32.png +0 -0
- package/public/brand/beacon-icon-512.png +0 -0
- package/public/brand/beacon-icon-64.png +0 -0
- package/public/brand/beacon-icon-light-192.png +0 -0
- package/public/brand/beacon-icon-light-512.png +0 -0
- package/public/brand/beacon-icon-light.svg +31 -0
- package/public/brand/beacon-icon.svg +33 -0
- package/public/brand/beacon-wordmark-1200.png +0 -0
- package/public/brand/beacon-wordmark.svg +38 -0
- package/public/brand/favicon-16.png +0 -0
- package/public/brand/favicon-32.png +0 -0
- package/public/file.svg +1 -0
- package/public/globe.svg +1 -0
- package/public/install.sh +55 -0
- package/public/next.svg +1 -0
- package/public/vercel.svg +1 -0
- package/public/window.svg +1 -0
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
module.exports=[86970,e=>e.a(async(t,r)=>{try{var a=e.i(69719),n=e.i(75225),i=e.i(91426),o=e.i(34700),l=e.i(6659),s=t([i,l]);[i,l]=s.then?(await s)():s;let c=a.z.object({files:a.z.array(a.z.object({path:a.z.string().trim().min(1),root:a.z.string().nullish(),lang:a.z.string().nullish(),mtimeMs:a.z.number().nullish(),size:a.z.number().nullish()})).default([]),edges:a.z.array(a.z.object({from:a.z.string().trim().min(1),to:a.z.string().trim().min(1)})).default([])});async function h(e,t=i.db){let r=c.parse(e),a=r.files.map(e=>e.path),s=new Set(a),d=r.edges.filter(e=>s.has(e.from)&&s.has(e.to)&&e.from!==e.to),u=function(e,t){let r=new Map;for(let t of e)r.set(t,[]);for(let e of t)r.get(e.from)?.push(e.to);let a=new Map,n=new Map,i=new Set,o=[],l=new Map,s=[],h=0,d=0;for(let t of e){if(a.has(t))continue;let e=[{v:t,iter:0}];for(a.set(t,h),n.set(t,h),h++,o.push(t),i.add(t);e.length;){let t=e[e.length-1],u=r.get(t.v)??[];if(t.iter<u.length){let r=u[t.iter++];a.has(r)?i.has(r)&&n.set(t.v,Math.min(n.get(t.v),a.get(r))):(a.set(r,h),n.set(r,h),h++,o.push(r),i.add(r),e.push({v:r,iter:0}))}else{if(n.get(t.v)===a.get(t.v)){let e,r=0;do e=o.pop(),i.delete(e),l.set(e,d),r++;while(e!==t.v)s.push(r),d++}e.pop();let r=e[e.length-1];r&&n.set(r.v,Math.min(n.get(r.v),n.get(t.v)))}}}let u=new Set;for(let e of t){let t=l.get(e.from);void 0!==t&&t===l.get(e.to)&&s[t]>1&&u.add(`${e.from}|${e.to}`)}return u}(a,d),m=new Map,g=new Map;for(let e of d)g.set(e.from,(g.get(e.from)??0)+1),m.set(e.to,(m.get(e.to)??0)+1);for(let e of(await t.delete(o.codeFile).where((0,n.notInArray)(o.codeFile.path,a)),r.files)){let r={root:e.root??null,lang:e.lang??null,mtimeMs:e.mtimeMs??null,size:e.size??null,inDegree:m.get(e.path)??0,outDegree:g.get(e.path)??0};await t.insert(o.codeFile).values({path:e.path,...r}).onConflictDoUpdate({target:o.codeFile.path,set:r})}await t.delete(o.codeFileEdge);let p=0;d.length&&await t.insert(o.codeFileEdge).values(d.map(e=>{let t=u.has(`${e.from}|${e.to}`);return t&&p++,{fromPath:e.from,toPath:e.to,circular:t}}));let f=await (0,l.bumpVersion)(t);return await t.update(o.syncState).set({codeGraphSyncedAt:new Date}).where((0,n.eq)(o.syncState.id,"singleton")),{files:r.files.length,edges:d.length,circular:p,version:f}}async function d(e,t,r,a){let n=new Set([t]),i=[],o=[t],l=!1;for(let t=1;t<=r&&o.length;t++){let r="down"===a?(await e.query.codeFileEdge.findMany({where:(e,{inArray:t})=>t(e.toPath,o),columns:{fromPath:!0}})).map(e=>e.fromPath):(await e.query.codeFileEdge.findMany({where:(e,{inArray:t})=>t(e.fromPath,o),columns:{toPath:!0}})).map(e=>e.toPath),s=[];for(let e of r)if(!n.has(e)&&(n.add(e),i.push({path:e,depth:t}),s.push(e),i.length>=200)){l=!0;break}if(l)break;o=s}return{order:i,truncated:l}}async function u(e,t,r={}){let a=await e.query.codeFile.findFirst({where:(e,{eq:r})=>r(e.path,t),columns:{inDegree:!0,outDegree:!0}});if(!a)return{path:t,exists:!1,hub:{inDegree:0,outDegree:0,isHub:!1},imports:[],importedBy:[],transitive:{upstream:[],downstream:[],truncated:!1}};let n=Math.min(Math.max(Math.floor(r.depth??2),1),5),[i,o,l,s,h]=await Promise.all([e.query.codeFileEdge.findMany({where:(e,{eq:r})=>r(e.fromPath,t),columns:{toPath:!0,circular:!0}}),e.query.codeFileEdge.findMany({where:(e,{eq:r})=>r(e.toPath,t),columns:{fromPath:!0,circular:!0}}),d(e,t,n,"down"),d(e,t,n,"up"),e.query.codeFile.findMany({columns:{inDegree:!0}})]),c=[...new Set([...l.order,...s.order].map(e=>e.path))],m=c.length?await e.query.codeFile.findMany({where:(e,{inArray:t})=>t(e.path,c),columns:{path:!0,lang:!0}}):[],g=new Map(m.map(e=>[e.path,e.lang])),p=e=>({path:e.path,depth:e.depth,lang:g.get(e.path)??null}),f=h.map(e=>e.inDegree).filter(e=>e>0).sort((e,t)=>e-t),w=f.length?f[Math.min(f.length-1,Math.floor(.9*f.length))]:0,y=a.inDegree>0&&a.inDegree>=Math.max(3,w);return{path:t,exists:!0,hub:{inDegree:a.inDegree,outDegree:a.outDegree,isHub:y},imports:i.map(e=>({to:e.toPath,circular:e.circular})),importedBy:o.map(e=>({from:e.fromPath,circular:e.circular})),transitive:{upstream:s.order.map(p),downstream:l.order.map(p),truncated:s.truncated||l.truncated}}}e.s(["blastRadius",0,u,"ingestCodeGraph",0,h]),r()}catch(e){r(e)}},!1),69723,e=>e.a(async(t,r)=>{try{var a=e.i(91426),n=e.i(14859),i=e.i(29243),o=t([a,i]);async function l(e){let t=(0,n.workspaceIdFromRequest)(e)??(0,n.getActiveId)();t&&(0,i.ensureWatcher)(t);let r=await a.db.query.syncState.findFirst({where:(e,{eq:t})=>t(e.id,"singleton"),columns:{codeGraphSyncedAt:!0}});return{syncedAt:r?.codeGraphSyncedAt?r.codeGraphSyncedAt.toISOString():null,watching:!!t&&(0,i.isWatching)(t)}}[a,i]=o.then?(await o)():o,e.s(["codeGraphFreshness",0,l]),r()}catch(e){r(e)}},!1),58502,e=>{e.v(t=>Promise.all(["server/chunks/[root-of-the-server]__1t2egm-._.js"].map(t=>e.l(t))).then(()=>t(51514)))},46128,e=>{e.v(t=>Promise.all(["server/chunks/[externals]_@huggingface_transformers_05bd-zz._.js"].map(t=>e.l(t))).then(()=>t(99732)))},35914,e=>{e.v(t=>Promise.all(["server/chunks/lib_db_ts_0h_yn5m._.js"].map(t=>e.l(t))).then(()=>t(62294)))},29363,e=>{e.v(e=>Promise.resolve().then(()=>e(34700)))},96359,e=>{e.v(t=>Promise.all(["server/chunks/node_modules_drizzle-orm_index_1qnscv7.js"].map(t=>e.l(t))).then(()=>t(32628)))}];
|
|
2
|
+
|
|
3
|
+
//# sourceMappingURL=%5Broot-of-the-server%5D__0y6kb2t._.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../lib/code-graph.ts","../../../lib/code-graph-freshness.ts"],"sourcesContent":["import { z } from \"zod\";\nimport { eq, notInArray } from \"drizzle-orm\";\nimport { db, type DB } from \"@/lib/db-drizzle\";\nimport { codeFile, codeFileEdge, syncState } from \"@/lib/drizzle/schema\";\nimport { bumpVersion } from \"@/lib/ingest\";\n\n// Persistence for the file-import graph the watcher rebuilds each tick. Every\n// row is introspection-derived (there is no manual code-file editing), so the\n// shape is simpler than ingestSnapshot: full-replace files, full-replace edges,\n// preserve x/y across re-scans. Circular-edge flagging runs here (not in the\n// extractor) because it's a property of the global graph, not of any single file.\n\nexport const codeGraphSchema = z.object({\n files: z\n .array(\n z.object({\n path: z.string().trim().min(1),\n root: z.string().nullish(),\n lang: z.string().nullish(),\n mtimeMs: z.number().nullish(),\n size: z.number().nullish(),\n }),\n )\n .default([]),\n edges: z\n .array(\n z.object({\n from: z.string().trim().min(1),\n to: z.string().trim().min(1),\n }),\n )\n .default([]),\n});\nexport type CodeGraphInput = z.input<typeof codeGraphSchema>;\n\n/**\n * Tarjan's SCC, iterative (avoids recursion depth on deep import chains).\n * Returns a Set of \"from→to\" keys for edges that sit inside a non-trivial SCC\n * — i.e. edges that participate in some import cycle.\n */\nexport function findCircularEdges(\n nodes: string[],\n edges: { from: string; to: string }[],\n): Set<string> {\n const adj = new Map<string, string[]>();\n for (const n of nodes) adj.set(n, []);\n for (const e of edges) adj.get(e.from)?.push(e.to);\n\n const indexOf = new Map<string, number>();\n const lowlink = new Map<string, number>();\n const onStack = new Set<string>();\n const tarStack: string[] = [];\n const sccOf = new Map<string, number>();\n const sccSizes: number[] = [];\n let index = 0;\n let sccCount = 0;\n\n type Frame = { v: string; iter: number };\n for (const start of nodes) {\n if (indexOf.has(start)) continue;\n const callStack: Frame[] = [{ v: start, iter: 0 }];\n indexOf.set(start, index);\n lowlink.set(start, index);\n index++;\n tarStack.push(start);\n onStack.add(start);\n\n while (callStack.length) {\n const top = callStack[callStack.length - 1];\n const succ = adj.get(top.v) ?? [];\n if (top.iter < succ.length) {\n const w = succ[top.iter++];\n if (!indexOf.has(w)) {\n indexOf.set(w, index);\n lowlink.set(w, index);\n index++;\n tarStack.push(w);\n onStack.add(w);\n callStack.push({ v: w, iter: 0 });\n } else if (onStack.has(w)) {\n lowlink.set(top.v, Math.min(lowlink.get(top.v)!, indexOf.get(w)!));\n }\n } else {\n if (lowlink.get(top.v) === indexOf.get(top.v)) {\n let size = 0;\n let w: string;\n do {\n w = tarStack.pop()!;\n onStack.delete(w);\n sccOf.set(w, sccCount);\n size++;\n } while (w !== top.v);\n sccSizes.push(size);\n sccCount++;\n }\n callStack.pop();\n // Propagate lowlink back to caller (the recursive \"return\" step).\n const caller = callStack[callStack.length - 1];\n if (caller) {\n lowlink.set(\n caller.v,\n Math.min(lowlink.get(caller.v)!, lowlink.get(top.v)!),\n );\n }\n }\n }\n }\n\n const out = new Set<string>();\n for (const e of edges) {\n const si = sccOf.get(e.from);\n if (si !== undefined && si === sccOf.get(e.to) && sccSizes[si] > 1) {\n out.add(`${e.from}|${e.to}`);\n }\n }\n return out;\n}\n\n/**\n * Upsert a code-graph snapshot. Idempotent. Preserves CodeFile.x/y across runs.\n * Edges are full-replaced (the table is small and the PK is (from,to) so a\n * blanket deleteMany + createMany is cheaper than diffing).\n */\nexport async function ingestCodeGraph(input: unknown, prisma: DB = db) {\n const snap = codeGraphSchema.parse(input);\n const keep = snap.files.map((f) => f.path);\n const keepSet = new Set(keep);\n\n // Valid edges (drop danglers + self-loops), cycle flags, and per-file degrees —\n // computed once up front so the file upserts below can cache inDegree/outDegree.\n const valid = snap.edges.filter(\n (e) => keepSet.has(e.from) && keepSet.has(e.to) && e.from !== e.to,\n );\n const circular = findCircularEdges(keep, valid);\n const inDeg = new Map<string, number>();\n const outDeg = new Map<string, number>();\n for (const e of valid) {\n outDeg.set(e.from, (outDeg.get(e.from) ?? 0) + 1);\n inDeg.set(e.to, (inDeg.get(e.to) ?? 0) + 1);\n }\n\n // Drop files that vanished from this scan. Cascade drops their edges too.\n await prisma.delete(codeFile).where(notInArray(codeFile.path, keep));\n\n // Upsert present files with metadata + cached degrees. `updatedAt` is @updatedAt,\n // so a no-op update still bumps it — that's how we tell the UI the row was touched.\n for (const f of snap.files) {\n const data = {\n root: f.root ?? null,\n lang: f.lang ?? null,\n mtimeMs: f.mtimeMs ?? null,\n size: f.size ?? null,\n inDegree: inDeg.get(f.path) ?? 0,\n outDegree: outDeg.get(f.path) ?? 0,\n };\n await prisma\n .insert(codeFile)\n .values({ path: f.path, ...data })\n .onConflictDoUpdate({ target: codeFile.path, set: data });\n }\n\n // Edges: full-replace (small table, PK (from,to) → blanket delete + createMany).\n await prisma.delete(codeFileEdge);\n let circularCount = 0;\n if (valid.length) {\n await prisma.insert(codeFileEdge).values(\n valid.map((e) => {\n const isCircular = circular.has(`${e.from}|${e.to}`);\n if (isCircular) circularCount++;\n return { fromPath: e.from, toPath: e.to, circular: isCircular };\n }),\n );\n }\n\n const version = await bumpVersion(prisma);\n // Staleness signal: stamp WHEN the code graph last fully synced. bumpVersion just\n // upserted the row, so the update is safe. (Only the code-graph sync sets this — the\n // schema/endpoint ingest in lib/ingest.ts bumps the version but not this field.)\n await prisma.update(syncState).set({ codeGraphSyncedAt: new Date() }).where(eq(syncState.id, \"singleton\"));\n return {\n files: snap.files.length,\n edges: valid.length,\n circular: circularCount,\n version,\n };\n}\n\n// ── Blast radius ───────────────────────────────────────────────────────────\n\nconst NODE_CAP = 200; // max transitive nodes returned before we flag `truncated`\nconst HUB_FLOOR = 3; // a file needs at least this many importers to be a hub at all\n\nexport interface BlastNode {\n path: string;\n depth: number;\n lang: string | null;\n}\n\nexport interface BlastRadiusResult {\n path: string;\n exists: boolean;\n hub: { inDegree: number; outDegree: number; isHub: boolean };\n imports: { to: string; circular: boolean }[]; // 1-hop out\n importedBy: { from: string; circular: boolean }[]; // 1-hop in\n transitive: { upstream: BlastNode[]; downstream: BlastNode[]; truncated: boolean };\n}\n\n/**\n * BFS over the import graph from `start`, one direction:\n * \"down\" follows INCOMING edges (importers) — \"who depends on me\", the blast radius.\n * \"up\" follows OUTGOING edges (imports) — \"what I depend on\".\n * Stops at `maxDepth` or once NODE_CAP nodes are collected (then `truncated`).\n */\nasync function bfs(\n prisma: DB,\n start: string,\n maxDepth: number,\n dir: \"down\" | \"up\",\n): Promise<{ order: { path: string; depth: number }[]; truncated: boolean }> {\n const visited = new Set([start]);\n const order: { path: string; depth: number }[] = [];\n let frontier = [start];\n let truncated = false;\n for (let depth = 1; depth <= maxDepth && frontier.length; depth++) {\n const neighbors =\n dir === \"down\"\n ? (\n await prisma.query.codeFileEdge.findMany({\n where: (t, { inArray: inA }) => inA(t.toPath, frontier),\n columns: { fromPath: true },\n })\n ).map((r) => r.fromPath)\n : (\n await prisma.query.codeFileEdge.findMany({\n where: (t, { inArray: inA }) => inA(t.fromPath, frontier),\n columns: { toPath: true },\n })\n ).map((r) => r.toPath);\n const next: string[] = [];\n for (const p of neighbors) {\n if (visited.has(p)) continue;\n visited.add(p);\n order.push({ path: p, depth });\n next.push(p);\n if (order.length >= NODE_CAP) {\n truncated = true;\n break;\n }\n }\n if (truncated) break;\n frontier = next;\n }\n return { order, truncated };\n}\n\n/**\n * Rich, deterministic blast radius for a file: 1-hop imports/importedBy (unchanged),\n * transitive depth-N reachability both directions, and hub/centrality scoring from the\n * cached degrees. Reuses the existing CodeFileEdge rows — no new tables, no AI.\n */\nexport async function blastRadius(\n prisma: DB,\n path: string,\n opts: { depth?: number } = {},\n): Promise<BlastRadiusResult> {\n const file = await prisma.query.codeFile.findFirst({\n where: (t, { eq }) => eq(t.path, path),\n columns: { inDegree: true, outDegree: true },\n });\n if (!file) {\n return {\n path,\n exists: false,\n hub: { inDegree: 0, outDegree: 0, isHub: false },\n imports: [],\n importedBy: [],\n transitive: { upstream: [], downstream: [], truncated: false },\n };\n }\n const depth = Math.min(Math.max(Math.floor(opts.depth ?? 2), 1), 5);\n\n const [out1, in1, downBfs, upBfs, allDeg] = await Promise.all([\n prisma.query.codeFileEdge.findMany({\n where: (t, { eq }) => eq(t.fromPath, path),\n columns: { toPath: true, circular: true },\n }),\n prisma.query.codeFileEdge.findMany({\n where: (t, { eq }) => eq(t.toPath, path),\n columns: { fromPath: true, circular: true },\n }),\n bfs(prisma, path, depth, \"down\"),\n bfs(prisma, path, depth, \"up\"),\n prisma.query.codeFile.findMany({ columns: { inDegree: true } }),\n ]);\n\n // Batch-fetch lang for every transitive node.\n const nodePaths = [...new Set([...downBfs.order, ...upBfs.order].map((n) => n.path))];\n const langRows = nodePaths.length\n ? await prisma.query.codeFile.findMany({\n where: (t, { inArray: inA }) => inA(t.path, nodePaths),\n columns: { path: true, lang: true },\n })\n : [];\n const langByPath = new Map(langRows.map((r) => [r.path, r.lang]));\n const withLang = (n: { path: string; depth: number }): BlastNode => ({\n path: n.path,\n depth: n.depth,\n lang: langByPath.get(n.path) ?? null,\n });\n\n // Hub: inDegree at or above max(floor, 90th-percentile of nonzero inDegrees).\n const nonzero = allDeg.map((f) => f.inDegree).filter((n) => n > 0).sort((a, b) => a - b);\n const p90 = nonzero.length ? nonzero[Math.min(nonzero.length - 1, Math.floor(nonzero.length * 0.9))] : 0;\n const isHub = file.inDegree > 0 && file.inDegree >= Math.max(HUB_FLOOR, p90);\n\n return {\n path,\n exists: true,\n hub: { inDegree: file.inDegree, outDegree: file.outDegree, isHub },\n imports: out1.map((e) => ({ to: e.toPath, circular: e.circular })),\n importedBy: in1.map((e) => ({ from: e.fromPath, circular: e.circular })),\n transitive: {\n upstream: upBfs.order.map(withLang),\n downstream: downBfs.order.map(withLang),\n truncated: upBfs.truncated || downBfs.truncated,\n },\n };\n}\n","import { db } from \"@/lib/db-drizzle\";\nimport { getActiveId, workspaceIdFromRequest } from \"@/lib/workspaces\";\nimport { ensureWatcher, isWatching } from \"@/intel/watch-manager\";\n\n// Staleness signal for the code graph, attached to blast-radius / context responses so\n// the agent knows whether the data it's reading is current. Also LAZILY warms a watcher\n// for the queried repo (the recently-opened-subset boot may not cover it) — so the first\n// query \"wakes up\" the repo and subsequent ones are live.\n//\n// Server-only: pulls in intel/watch-manager (→ chokidar). Never import from lib/code-graph\n// (which the test suite loads) — keep this out of that import graph.\nexport async function codeGraphFreshness(\n req: Request,\n): Promise<{ syncedAt: string | null; watching: boolean }> {\n const wsId = workspaceIdFromRequest(req) ?? getActiveId();\n if (wsId) ensureWatcher(wsId);\n const s = await db.query.syncState.findFirst({\n where: (t, { eq }) => eq(t.id, \"singleton\"),\n columns: { codeGraphSyncedAt: true },\n });\n return {\n syncedAt: s?.codeGraphSyncedAt ? s.codeGraphSyncedAt.toISOString() : null,\n watching: wsId ? isWatching(wsId) : false,\n };\n}\n"],"names":["codeGraphSchema","object","files","array","path","string","trim","min","root","nullish","lang","mtimeMs","number","size","default","edges","from","to","findCircularEdges","nodes","adj","Map","n","set","e","get","push","indexOf","lowlink","onStack","Set","tarStack","sccOf","sccSizes","index","sccCount","start","has","callStack","v","iter","add","length","top","succ","w","Math","pop","delete","caller","out","si","undefined","ingestCodeGraph","input","prisma","snap","parse","keep","map","f","keepSet","valid","filter","circular","inDeg","outDeg","where","data","inDegree","outDegree","insert","values","onConflictDoUpdate","target","circularCount","isCircular","fromPath","toPath","version","update","codeGraphSyncedAt","Date","id","NODE_CAP","HUB_FLOOR","bfs","maxDepth","dir","visited","order","frontier","truncated","depth","neighbors","query","codeFileEdge","findMany","t","inArray","inA","columns","r","next","p","blastRadius","opts","file","codeFile","findFirst","eq","exists","hub","isHub","imports","importedBy","transitive","upstream","downstream","max","floor","out1","in1","downBfs","upBfs","allDeg","Promise","all","nodePaths","langRows","langByPath","withLang","nonzero","sort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B,kBAAmB,EAAK,CACrC,GACA,MAAO,CACL6D,SAAUF,GAAG3D,kBAAoB2D,EAAE3D,iBAAiB,CAAC8D,WAAW,GAAK,KACrEC,WAAUL,GAAO,CAAA,EAAA,EAAA,UAAA,AAAU,EAACA,EAC9B,CACF,KAFwC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
module.exports=[23092,e=>e.a(async(t,n)=>{try{var i=e.i(91426),r=e.i(34700),s=t([i]);async function o(e=i.db){let[t]=await e.insert(r.projectMeta).values({id:"singleton"}).onConflictDoUpdate({target:r.projectMeta.id,set:{id:"singleton"}}).returning();return t}async function a(e,t=i.db){let n={};null!=e.overview&&(n.overview=e.overview),e.conventions&&(n.conventions=JSON.stringify(e.conventions)),0===Object.keys(n).length&&(n.id="singleton");let[s]=await t.insert(r.projectMeta).values({id:"singleton",overview:e.overview??null,conventions:JSON.stringify(e.conventions??[])}).onConflictDoUpdate({target:r.projectMeta.id,set:n}).returning();return s}[i]=s.then?(await s)():s,e.s(["getProjectMeta",0,o,"setProjectMeta",0,a]),n()}catch(e){n(e)}},!1),81494,e=>e.a(async(t,n)=>{try{var i=e.i(2157),r=e.i(50227),s=e.i(91426),o=e.i(38752),a=e.i(23092),l=t([s,a]);[s,a]=l.then?(await l)():l;let h="<!-- beacon:start -->",p="<!-- beacon:end -->";async function c(){let e=await (0,a.getProjectMeta)(),t=[];try{t=JSON.parse(e.conventions)}catch{t=[]}let n=await s.db.query.node.findMany({where:(e,{eq:t})=>t(e.view,"ARCHITECTURE"),with:{files:{columns:{path:!0}}},orderBy:(e,{asc:t})=>t(e.cluster)}),l=await s.db.query.dbTable.findMany({with:{columns:{orderBy:(e,{asc:t})=>t(e.ord)}},orderBy:(e,{asc:t})=>t(e.name)}),c=await s.db.query.endpoint.findMany({orderBy:(e,{asc:t})=>[t(e.domain),t(e.path)]}),u=function(e){let t={};try{let n=JSON.parse((0,i.readFileSync)((0,r.join)(e,"package.json"),"utf8"));for(let e of["dev","build","test","lint","start"])n.scripts?.[e]&&(t[e]=`npm run ${e}`)}catch{}try{let n=(0,i.readFileSync)((0,r.join)(e,"Makefile"),"utf8");for(let e of["dev","up","build","test","lint"])RegExp(`^${e}:`,"m").test(n)&&(t[e]=`make ${e}`)}catch{}return!t.test&&((0,i.existsSync)((0,r.join)(e,"pyproject.toml"))||(0,i.existsSync)((0,r.join)(e,"requirements.txt")))&&(t.test="pytest"),t}((0,o.repoRoot)()),d=[`## Project: ${(0,o.repoName)()}`];if(e.overview&&d.push("",e.overview),Object.keys(u).length)for(let[e,t]of(d.push("","### Commands"),Object.entries(u)))d.push(`- ${e}: \`${t}\``);if(n.length){d.push("","### Architecture");let e=new Map;for(let t of n){let n=t.cluster??"MISC";e.has(n)||e.set(n,[]),e.get(n).push(t)}for(let[t,n]of e)for(let e of(d.push(`- **${t}**`),n)){let t=e.files.map(e=>e.path).slice(0,6).join(", ");d.push(` - ${e.title}${e.role?` — ${e.role}`:""}${t?` (${t})`:""}`)}}if(l.length)for(let e of(d.push("","### Database"),l))d.push(`- \`${e.name}\`: ${e.columns.map(e=>e.name).slice(0,12).join(", ")}`);if(c.length)for(let e of(d.push("","### Endpoints"),c.slice(0,40)))d.push(`- ${e.method} ${e.path}`);if(t.length)for(let e of(d.push("","### Conventions & gotchas"),t))d.push(`- ${e}`);return d.push("","_Maintained by Beacon — edit outside the markers; this block is regenerated._"),d.join("\n")}function u(e,t,n){let r=`${h}
|
|
2
|
+
${t}
|
|
3
|
+
${p}`,s=(0,i.existsSync)(e)?(0,i.readFileSync)(e,"utf8"):"";s=s.includes(h)&&s.includes(p)?s.replace(RegExp(`${h}[\\s\\S]*?${p}`),r):s.trim()?`${s.trim()}
|
|
4
|
+
|
|
5
|
+
${r}
|
|
6
|
+
`:`${n}
|
|
7
|
+
|
|
8
|
+
${r}
|
|
9
|
+
`,(0,i.writeFileSync)(e,s)}async function d(e={}){let t=(0,o.repoRoot)(),n=(0,r.join)(t,"AGENTS.md"),s=(0,r.join)(t,"CLAUDE.md");if(e.onlyIfManaged&&!((0,i.existsSync)(n)&&(0,i.readFileSync)(n,"utf8").includes(h)))return[];let a=[];u(n,await c(),"# AGENTS.md"),a.push(n);let l=(0,i.existsSync)(s)?(0,i.readFileSync)(s,"utf8"):"";return/@?AGENTS\.md/.test(l)||(u(s,"@AGENTS.md","# CLAUDE.md"),a.push(s)),a}e.s(["writeContextFiles",0,d]),n()}catch(e){n(e)}},!1),58502,e=>{e.v(t=>Promise.all(["server/chunks/[root-of-the-server]__1t2egm-._.js"].map(t=>e.l(t))).then(()=>t(51514)))},46128,e=>{e.v(t=>Promise.all(["server/chunks/[externals]_@huggingface_transformers_05bd-zz._.js"].map(t=>e.l(t))).then(()=>t(99732)))},35914,e=>{e.v(t=>Promise.all(["server/chunks/lib_db_ts_0h_yn5m._.js"].map(t=>e.l(t))).then(()=>t(62294)))},29363,e=>{e.v(e=>Promise.resolve().then(()=>e(34700)))},96359,e=>{e.v(t=>Promise.all(["server/chunks/node_modules_drizzle-orm_index_1qnscv7.js"].map(t=>e.l(t))).then(()=>t(32628)))}];
|
|
10
|
+
|
|
11
|
+
//# sourceMappingURL=%5Broot-of-the-server%5D__0zfwiuh._.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../lib/project-meta.ts","../../../lib/context-files.ts"],"sourcesContent":["import { db, type DB } from \"@/lib/db-drizzle\";\nimport { projectMeta } from \"@/lib/drizzle/schema\";\n\nexport async function getProjectMeta(prisma: DB = db) {\n const [row] = await prisma\n .insert(projectMeta)\n .values({ id: \"singleton\" })\n .onConflictDoUpdate({ target: projectMeta.id, set: { id: \"singleton\" } })\n .returning();\n return row;\n}\n\nexport async function setProjectMeta(\n data: { overview?: string | null; conventions?: string[] },\n prisma: DB = db,\n) {\n // Only the explicitly-provided fields are updated (Prisma `update` with `undefined` =\n // leave unchanged). Drizzle drops `undefined` set-values, but rejects a fully-empty set,\n // so fall back to a PK no-op when nothing was provided.\n const set: { overview?: string | null; conventions?: string; id?: string } = {};\n if (data.overview != null) set.overview = data.overview; // matches Prisma `?? undefined`: null/undefined → unchanged\n if (data.conventions) set.conventions = JSON.stringify(data.conventions);\n if (Object.keys(set).length === 0) set.id = \"singleton\";\n const [row] = await prisma\n .insert(projectMeta)\n .values({\n id: \"singleton\",\n overview: data.overview ?? null,\n conventions: JSON.stringify(data.conventions ?? []),\n })\n .onConflictDoUpdate({ target: projectMeta.id, set })\n .returning();\n return row;\n}\n","import { existsSync, readFileSync, writeFileSync } from \"node:fs\";\nimport { join } from \"node:path\";\nimport { db } from \"@/lib/db-drizzle\";\nimport { repoName, repoRoot } from \"@/lib/project\";\nimport { getProjectMeta } from \"@/lib/project-meta\";\n\n// Generates a Beacon-managed project context block. Writes it to AGENTS.md (the\n// cross-tool standard — read natively by Cursor, Codex, Aider…) and ensures CLAUDE.md\n// @imports AGENTS.md so Claude Code reads it too. Both writes are marker-delimited so\n// they never clobber content you wrote yourself.\n\nconst START = \"<!-- beacon:start -->\";\nconst END = \"<!-- beacon:end -->\";\n\nfunction deriveCommands(root: string): Record<string, string> {\n const cmds: Record<string, string> = {};\n try {\n const pkg = JSON.parse(readFileSync(join(root, \"package.json\"), \"utf8\"));\n for (const k of [\"dev\", \"build\", \"test\", \"lint\", \"start\"]) {\n if (pkg.scripts?.[k]) cmds[k] = `npm run ${k}`;\n }\n } catch {\n /* no package.json */\n }\n try {\n const mk = readFileSync(join(root, \"Makefile\"), \"utf8\");\n for (const k of [\"dev\", \"up\", \"build\", \"test\", \"lint\"]) {\n if (new RegExp(`^${k}:`, \"m\").test(mk)) cmds[k] = `make ${k}`;\n }\n } catch {\n /* no Makefile */\n }\n if (!cmds.test && (existsSync(join(root, \"pyproject.toml\")) || existsSync(join(root, \"requirements.txt\")))) {\n cmds.test = \"pytest\";\n }\n return cmds;\n}\n\n/** The Beacon-managed markdown body (architecture + db + commands + conventions). */\nexport async function buildContext(): Promise<string> {\n const meta = await getProjectMeta();\n let conventions: string[] = [];\n try {\n conventions = JSON.parse(meta.conventions);\n } catch {\n conventions = [];\n }\n\n const arch = await db.query.node.findMany({\n where: (t, { eq }) => eq(t.view, \"ARCHITECTURE\"),\n with: { files: { columns: { path: true } } },\n orderBy: (t, { asc }) => asc(t.cluster),\n });\n const tables = await db.query.dbTable.findMany({\n with: { columns: { orderBy: (c, { asc }) => asc(c.ord) } },\n orderBy: (t, { asc }) => asc(t.name),\n });\n const endpoints = await db.query.endpoint.findMany({\n orderBy: (t, { asc }) => [asc(t.domain), asc(t.path)],\n });\n const cmds = deriveCommands(repoRoot());\n\n const lines: string[] = [`## Project: ${repoName()}`];\n if (meta.overview) lines.push(\"\", meta.overview);\n\n if (Object.keys(cmds).length) {\n lines.push(\"\", \"### Commands\");\n for (const [k, v] of Object.entries(cmds)) lines.push(`- ${k}: \\`${v}\\``);\n }\n\n if (arch.length) {\n lines.push(\"\", \"### Architecture\");\n const byDomain = new Map<string, typeof arch>();\n for (const n of arch) {\n const d = n.cluster ?? \"MISC\";\n if (!byDomain.has(d)) byDomain.set(d, []);\n byDomain.get(d)!.push(n);\n }\n for (const [domain, comps] of byDomain) {\n lines.push(`- **${domain}**`);\n for (const c of comps) {\n const files = c.files.map((f) => f.path).slice(0, 6).join(\", \");\n lines.push(` - ${c.title}${c.role ? ` — ${c.role}` : \"\"}${files ? ` (${files})` : \"\"}`);\n }\n }\n }\n\n if (tables.length) {\n lines.push(\"\", \"### Database\");\n for (const t of tables) {\n lines.push(`- \\`${t.name}\\`: ${t.columns.map((c) => c.name).slice(0, 12).join(\", \")}`);\n }\n }\n\n if (endpoints.length) {\n lines.push(\"\", \"### Endpoints\");\n for (const e of endpoints.slice(0, 40)) lines.push(`- ${e.method} ${e.path}`);\n }\n\n if (conventions.length) {\n lines.push(\"\", \"### Conventions & gotchas\");\n for (const c of conventions) lines.push(`- ${c}`);\n }\n\n lines.push(\"\", \"_Maintained by Beacon — edit outside the markers; this block is regenerated._\");\n return lines.join(\"\\n\");\n}\n\nfunction upsertBlock(file: string, block: string, headerIfNew: string) {\n const section = `${START}\\n${block}\\n${END}`;\n let content = existsSync(file) ? readFileSync(file, \"utf8\") : \"\";\n if (content.includes(START) && content.includes(END)) {\n content = content.replace(new RegExp(`${START}[\\\\s\\\\S]*?${END}`), section);\n } else {\n content = content.trim() ? `${content.trim()}\\n\\n${section}\\n` : `${headerIfNew}\\n\\n${section}\\n`;\n }\n writeFileSync(file, content);\n}\n\n/** Write AGENTS.md (body) + ensure CLAUDE.md @imports it. Returns the files written. */\nexport async function writeContextFiles(opts: { onlyIfManaged?: boolean } = {}): Promise<string[]> {\n const root = repoRoot();\n const agents = join(root, \"AGENTS.md\");\n const claude = join(root, \"CLAUDE.md\");\n\n // In auto/keep-fresh mode, only touch files Beacon already manages.\n if (opts.onlyIfManaged) {\n const managed =\n existsSync(agents) && readFileSync(agents, \"utf8\").includes(START);\n if (!managed) return [];\n }\n\n const written: string[] = [];\n upsertBlock(agents, await buildContext(), \"# AGENTS.md\");\n written.push(agents);\n\n // Ensure Claude Code reads it: CLAUDE.md must @import AGENTS.md.\n const claudeContent = existsSync(claude) ? readFileSync(claude, \"utf8\") : \"\";\n if (!/@?AGENTS\\.md/.test(claudeContent)) {\n upsertBlock(claude, \"@AGENTS.md\", \"# CLAUDE.md\");\n written.push(claude);\n }\n return written;\n}\n"],"names":["getProjectMeta","prisma","row","insert","values","id","onConflictDoUpdate","target","set","returning","setProjectMeta","data","overview","conventions","JSON","stringify","Object","keys","length","START","END","deriveCommands","root","cmds","pkg","parse","k","scripts","mk","RegExp","test","buildContext","meta","arch","query","node","findMany","where","t","eq","view","with","files","columns","path","orderBy","asc","cluster","tables","dbTable","c","ord","name","endpoints","endpoint","domain","lines","push","v","entries","byDomain","Map","n","d","has","get","comps","map","f","slice","join","title","role","e","method","upsertBlock","file","block","headerIfNew","section","content","includes","replace","trim","writeContextFiles","opts","agents","claude","onlyIfManaged","managed","written","claudeContent"],"mappings":"8CAAA,IAAA,EAAA,EAAA,CAAA,CAAA,OACA,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,CAAC9D,EAAAA,EAChD,MAAO,EAAE,CAGzB,IAAMuE,EAAoB,EAAE,CAC5Bf,EAAYW,EAAQ,MAAMvD,IAAgB,eAC1C2D,EAAQjC,IAAI,CAAC6B,GAGb,IAAMK,EAAgB,CAAA,EAAA,EAAA,UAAA,AAAU,EAACJ,GAAU,CAAA,EAAA,EAAA,YAAA,AAAY,EAACA,EAAQ,QAAU,GAK1E,MAJK,eAAezD,IAAI,CAAC6D,KACvBhB,EAAYY,EAAQ,OADmB,MACL,eAClCG,EAAQjC,IAAI,CAAC8B,IAERG,CACT"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
module.exports=[18622,(e,t,r)=>{t.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},56704,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},32319,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},70406,(e,t,r)=>{t.exports=e.x("next/dist/compiled/@opentelemetry/api",()=>require("next/dist/compiled/@opentelemetry/api"))},93695,(e,t,r)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},38752,e=>{"use strict";var t=e.i(74533),r=e.i(66680),n=e.i(60526),a=e.i(50227),i=e.i(14859);let o=null;function s(){if(process.env.BEACON_REPO)return process.env.BEACON_REPO;let e=(0,i.getPinnedWorkspaceId)();if(e){let t=(0,i.getWorkspace)(e);if(t)return t.path}let r=(0,i.activeWorkspace)();if(r)return r.path;if(o)return o;try{let e=(0,t.execSync)("git rev-parse --show-toplevel",{cwd:process.cwd(),stdio:["ignore","pipe","ignore"]}).toString().trim();if(e)return o=e}catch{}return o=(0,a.resolve)(process.cwd(),"../..")}e.s(["dataDir",0,function(){if(process.env.BEACON_DATA_DIR)return process.env.BEACON_DATA_DIR;let e=(0,i.getPinnedWorkspaceId)();if(e&&(0,i.getWorkspace)(e))return(0,i.dataDirFor)(e);let t=(0,i.activeWorkspace)();return t?(0,i.dataDirFor)(t.id):(0,a.join)((0,n.homedir)(),".beacon",(0,r.createHash)("sha256").update(s()).digest("hex").slice(0,12))},"repoName",0,function(){return(0,a.basename)(s())},"repoRoot",0,s])},94930,e=>{"use strict";var t=e.i(2157),r=e.i(50227);e.s(["writeJsonAtomic",0,function(e,n,a=!1){var i=JSON.stringify(n,null,a?2:void 0);(0,t.mkdirSync)((0,r.dirname)(e),{recursive:!0});let o=`${e}.tmp`;try{(0,t.writeFileSync)(o,i),(0,t.renameSync)(o,e)}catch(e){throw(0,t.rmSync)(o,{force:!0}),e}}])},53870,e=>{"use strict";var t=e.i(2157),r=e.i(50227),n=e.i(66680),a=e.i(38752),i=e.i(94930);function o(){let e=(0,r.join)((0,a.dataDir)(),"plans","history");return(0,t.mkdirSync)(e,{recursive:!0}),e}e.s(["archivePlan",0,function(e){let t={...e,id:(0,n.randomUUID)().slice(0,8),archivedAt:Date.now()};return(0,i.writeJsonAtomic)((0,r.join)(o(),`${t.id}.json`),t,!0),t},"listHistory",0,function(){let e;try{e=(0,t.readdirSync)(o())}catch{return[]}let n=[];for(let a of e)if(a.endsWith(".json"))try{let e=(0,r.join)(o(),a),i=(0,t.readFileSync)(e,"utf8"),s=JSON.parse(i);n.push(s)}catch{}return n.sort((e,t)=>t.archivedAt-e.archivedAt)},"readArchivedPlan",0,function(e){try{let n=(0,t.readFileSync)((0,r.join)(o(),`${e}.json`),"utf8");return JSON.parse(n)}catch{return null}}])},81377,e=>e.a(async(t,r)=>{try{var n=e.i(53870),a=e.i(91426),i=e.i(14859),o=t([a]);async function s(e){return(0,i.runWithWorkspace)((0,i.workspaceIdFromRequest)(e),()=>{let t=new URL(e.url).searchParams.get("id");if(t){let e=(0,n.readArchivedPlan)(t);return e?Response.json(e):new Response("not found",{status:404})}let r=(0,n.listHistory)().map(e=>({id:e.id,description:e.description,verdict:e.verdict,archivedAt:e.archivedAt}));return Response.json({items:r})})}[a]=o.then?(await o)():o,e.s(["GET",0,s,"dynamic",0,"force-dynamic"]),r()}catch(e){r(e)}},!1),25401,e=>e.a(async(t,r)=>{try{var n=e.i(47909),a=e.i(74017),i=e.i(96250),o=e.i(59756),s=e.i(61916),l=e.i(74677),d=e.i(69741),c=e.i(16795),u=e.i(87718),p=e.i(95169),h=e.i(47587),v=e.i(66012),f=e.i(70101),R=e.i(26937),m=e.i(10372),y=e.i(93695);e.i(20232);var x=e.i(220),g=e.i(81377),w=t([g]);[g]=w.then?(await w)():w;let E=new n.AppRouteRouteModule({definition:{kind:a.RouteKind.APP_ROUTE,page:"/api/plan/history/route",pathname:"/api/plan/history",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/app/api/plan/history/route.ts",nextConfigOutput:"",userland:g,...{}}),{workAsyncStorage:C,workUnitAsyncStorage:S,serverHooks:N}=E;async function A(e,t,r){r.requestMeta&&(0,o.setRequestMeta)(e,r.requestMeta),E.isDev&&(0,o.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let n="/api/plan/history/route";n=n.replace(/\/index$/,"")||"/";let i=await E.prepare(e,t,{srcPage:n,multiZoneDraftMode:!1});if(!i)return t.statusCode=400,t.end("Bad Request"),null==r.waitUntil||r.waitUntil.call(r,Promise.resolve()),null;let{buildId:g,deploymentId:w,params:A,nextConfig:C,parsedUrl:S,isDraftMode:N,prerenderManifest:P,routerServerContext:b,isOnDemandRevalidate:_,revalidateOnlyGenerated:k,resolvedPathname:O,clientReferenceManifest:T,serverActionsManifest:j}=i,q=(0,d.normalizeAppPath)(n),D=!!(P.dynamicRoutes[q]||P.routes[O]),I=async()=>((null==b?void 0:b.render404)?await b.render404(e,t,S,!1):t.end("This page could not be found"),null);if(D&&!N){let e=!!P.routes[O],t=P.dynamicRoutes[q];if(t&&!1===t.fallback&&!e){if(C.adapterPath)return await I();throw new y.NoFallbackError}}let H=null;!D||E.isDev||N||(H=O,H="/index"===H?"/":H);let U=!0===E.isDev||!D,M=D&&!U;j&&T&&(0,l.setManifestsSingleton)({page:n,clientReferenceManifest:T,serverActionsManifest:j});let F=e.method||"GET",W=(0,s.getTracer)(),$=W.getActiveScopeSpan(),B=!!(null==b?void 0:b.isWrappedByNextServer),K=!!(0,o.getRequestMeta)(e,"minimalMode"),L=(0,o.getRequestMeta)(e,"incrementalCache")||await E.getIncrementalCache(e,C,P,K);null==L||L.resetRequestCache(),globalThis.__incrementalCache=L;let J={params:A,previewProps:P.preview,renderOpts:{experimental:{authInterrupts:!!C.experimental.authInterrupts},cacheComponents:!!C.cacheComponents,supportsDynamicResponse:U,incrementalCache:L,cacheLifeProfiles:C.cacheLife,waitUntil:r.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,n,a)=>E.onRequestError(e,t,n,a,b)},sharedContext:{buildId:g,deploymentId:w}},G=new c.NodeNextRequest(e),V=new c.NodeNextResponse(t),X=u.NextRequestAdapter.fromNodeNextRequest(G,(0,u.signalFromNodeResponse)(t));try{let i,o=async e=>E.handle(X,J).finally(()=>{if(!e)return;e.setAttributes({"http.status_code":t.statusCode,"next.rsc":!1});let r=W.getRootSpanAttributes();if(!r)return;if(r.get("next.span_type")!==p.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${r.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let a=r.get("next.route");if(a){let t=`${F} ${a}`;e.setAttributes({"next.route":a,"http.route":a,"next.span_name":t}),e.updateName(t),i&&i!==e&&(i.setAttribute("http.route",a),i.updateName(t))}else e.updateName(`${F} ${n}`)}),l=async i=>{var s,l;let d=async({previousCacheEntry:a})=>{try{if(!K&&_&&k&&!a)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let n=await o(i);e.fetchMetrics=J.renderOpts.fetchMetrics;let s=J.renderOpts.pendingWaitUntil;s&&r.waitUntil&&(r.waitUntil(s),s=void 0);let l=J.renderOpts.collectedTags;if(!D)return await (0,v.sendResponse)(G,V,n,J.renderOpts.pendingWaitUntil),null;{let e=await n.blob(),t=(0,f.toNodeOutgoingHttpHeaders)(n.headers);l&&(t[m.NEXT_CACHE_TAGS_HEADER]=l),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==J.renderOpts.collectedRevalidate&&!(J.renderOpts.collectedRevalidate>=m.INFINITE_CACHE)&&J.renderOpts.collectedRevalidate,a=void 0===J.renderOpts.collectedExpire||J.renderOpts.collectedExpire>=m.INFINITE_CACHE?void 0:J.renderOpts.collectedExpire;return{value:{kind:x.CachedRouteKind.APP_ROUTE,status:n.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:a}}}}catch(t){throw(null==a?void 0:a.isStale)&&await E.onRequestError(e,t,{routerKind:"App Router",routePath:n,routeType:"route",revalidateReason:(0,h.getRevalidateReason)({isStaticGeneration:M,isOnDemandRevalidate:_})},!1,b),t}},c=await E.handleResponse({req:e,nextConfig:C,cacheKey:H,routeKind:a.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:P,isRoutePPREnabled:!1,isOnDemandRevalidate:_,revalidateOnlyGenerated:k,responseGenerator:d,waitUntil:r.waitUntil,isMinimalMode:K});if(!D)return null;if((null==c||null==(s=c.value)?void 0:s.kind)!==x.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==c||null==(l=c.value)?void 0:l.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});K||t.setHeader("x-nextjs-cache",_?"REVALIDATED":c.isMiss?"MISS":c.isStale?"STALE":"HIT"),N&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let u=(0,f.fromNodeOutgoingHttpHeaders)(c.value.headers);return K&&D||u.delete(m.NEXT_CACHE_TAGS_HEADER),!c.cacheControl||t.getHeader("Cache-Control")||u.get("Cache-Control")||u.set("Cache-Control",(0,R.getCacheControlHeader)(c.cacheControl)),await (0,v.sendResponse)(G,V,new Response(c.value.body,{headers:u,status:c.value.status||200})),null};B&&$?await l($):(i=W.getActiveScopeSpan(),await W.withPropagatedContext(e.headers,()=>W.trace(p.BaseServerSpan.handleRequest,{spanName:`${F} ${n}`,kind:s.SpanKind.SERVER,attributes:{"http.method":F,"http.target":e.url}},l),void 0,!B))}catch(t){if(t instanceof y.NoFallbackError||await E.onRequestError(e,t,{routerKind:"App Router",routePath:q,routeType:"route",revalidateReason:(0,h.getRevalidateReason)({isStaticGeneration:M,isOnDemandRevalidate:_})},!1,b),D)throw t;return await (0,v.sendResponse)(G,V,new Response(null,{status:500})),null}}e.s(["handler",0,A,"patchFetch",0,function(){return(0,i.patchFetch)({workAsyncStorage:C,workUnitAsyncStorage:S})},"routeModule",0,E,"serverHooks",0,N,"workAsyncStorage",0,C,"workUnitAsyncStorage",0,S]),r()}catch(e){r(e)}},!1),58502,e=>{e.v(t=>Promise.all(["server/chunks/[root-of-the-server]__1t2egm-._.js"].map(t=>e.l(t))).then(()=>t(51514)))}];
|
|
2
|
+
|
|
3
|
+
//# sourceMappingURL=%5Broot-of-the-server%5D__11037f1._.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../lib/project.ts","../../../lib/atomic-write.ts","../../../lib/plan-history.ts","../../../app/api/plan/history/route.ts","../../../node_modules/next/src/build/templates/app-route.ts"],"sourcesContent":["import { execSync } from \"node:child_process\";\nimport { createHash } from \"node:crypto\";\nimport { homedir } from \"node:os\";\nimport { basename, join, resolve } from \"node:path\";\nimport { activeWorkspace, dataDirFor, getPinnedWorkspaceId, getWorkspace } from \"@/lib/workspaces\";\n\n// Beacon targets whatever repo the CLI was launched in. The CLI passes BEACON_REPO\n// (the repo root) and BEACON_DATA_DIR (the per-repo store). In dev (running the app\n// directly) we fall back to the surrounding git repo / parent dir. When the server has\n// an active workspace selected, that wins (multi-workspace server).\n\nlet cachedRoot: string | null = null;\n\nexport function repoRoot(): string {\n // A pinned process (CLI / watcher / init) targets its own repo, ignoring the server's\n // active workspace. The unpinned daemon follows the active workspace.\n if (process.env.BEACON_REPO) return process.env.BEACON_REPO;\n // A per-request pin (runWithWorkspace, set by MCP routes) wins over the active\n // workspace so AGENTS.md is written into the agent's repo, not the dropdown's.\n const pinnedId = getPinnedWorkspaceId();\n if (pinnedId) {\n const pinned = getWorkspace(pinnedId);\n if (pinned) return pinned.path;\n }\n const ws = activeWorkspace();\n if (ws) return ws.path;\n if (cachedRoot) return cachedRoot;\n try {\n const top = execSync(\"git rev-parse --show-toplevel\", {\n cwd: process.cwd(),\n stdio: [\"ignore\", \"pipe\", \"ignore\"],\n })\n .toString()\n .trim();\n if (top) return (cachedRoot = top);\n } catch {\n /* not a git repo */\n }\n return (cachedRoot = resolve(process.cwd(), \"../..\"));\n}\n\nexport function repoName(): string {\n return basename(repoRoot());\n}\n\nexport function repoId(): string {\n return createHash(\"sha256\").update(repoRoot()).digest(\"hex\").slice(0, 12);\n}\n\nexport function dataDir(): string {\n if (process.env.BEACON_DATA_DIR) return process.env.BEACON_DATA_DIR;\n // Honor a per-request pin (MCP routes) so the disk-backed draft/plan store lands in\n // the agent's repo dir, not the browser's active one.\n const pinnedId = getPinnedWorkspaceId();\n if (pinnedId && getWorkspace(pinnedId)) return dataDirFor(pinnedId);\n const ws = activeWorkspace();\n if (ws) return dataDirFor(ws.id);\n return join(homedir(), \".beacon\", repoId());\n}\n","import { mkdirSync, renameSync, rmSync, writeFileSync } from \"node:fs\";\nimport { dirname } from \"node:path\";\n\n// Crash-safe writes for the plan-loop's disk state. We write to a temp sibling and then\n// rename(2) it over the target — atomic within one directory on POSIX — so a reader never\n// observes a half-written file and a crash mid-write leaves the previous file intact. The\n// verdict/meta/annotation files this protects are the single source of truth for the\n// blocking pollers, so a torn write there would desync the loop.\n\nexport function writeFileAtomic(path: string, content: string): void {\n mkdirSync(dirname(path), { recursive: true });\n const tmp = `${path}.tmp`;\n try {\n writeFileSync(tmp, content);\n renameSync(tmp, path);\n } catch (e) {\n rmSync(tmp, { force: true });\n throw e;\n }\n}\n\nexport function writeJsonAtomic(path: string, value: unknown, pretty = false): void {\n writeFileAtomic(path, JSON.stringify(value, null, pretty ? 2 : undefined));\n}\n","import { mkdirSync, readFileSync, readdirSync, statSync } from \"node:fs\";\nimport { join } from \"node:path\";\nimport { randomUUID } from \"node:crypto\";\nimport { dataDir } from \"@/lib/project\";\nimport { writeJsonAtomic } from \"@/lib/atomic-write\";\n\n// Plan history: every time a plan resolves (approve/discard), Beacon archives a snapshot\n// of the markdown + annotations + verdict so the user can browse past proposals later.\n// Files live under dataDir()/plans/history as plain JSON, ordered by mtime.\n\nexport interface ArchivedPlan {\n id: string;\n description: string;\n markdown: string;\n verdict: \"approved\" | \"discarded\";\n archivedAt: number;\n annotations?: unknown;\n globalComment?: string;\n // Snapshots of the canvas at archive time so the history view can re-render the board\n // even if the live DB has moved on (or, for discarded plans, never had the draft).\n draftDoc?: unknown; // DraftDoc — tables/relations/endpoints\n featureGraph?: unknown; // FeatureGraph — proposed features\n}\n\nfunction dir(): string {\n const d = join(dataDir(), \"plans\", \"history\");\n mkdirSync(d, { recursive: true });\n return d;\n}\n\nexport function archivePlan(p: Omit<ArchivedPlan, \"id\" | \"archivedAt\">): ArchivedPlan {\n const archived: ArchivedPlan = {\n ...p,\n id: randomUUID().slice(0, 8),\n archivedAt: Date.now(),\n };\n writeJsonAtomic(join(dir(), `${archived.id}.json`), archived, true);\n return archived;\n}\n\nexport function listHistory(): ArchivedPlan[] {\n let entries: string[];\n try {\n entries = readdirSync(dir());\n } catch {\n return [];\n }\n const items: ArchivedPlan[] = [];\n for (const name of entries) {\n if (!name.endsWith(\".json\")) continue;\n try {\n const p = join(dir(), name);\n const raw = readFileSync(p, \"utf8\");\n const parsed = JSON.parse(raw) as ArchivedPlan;\n items.push(parsed);\n } catch {\n /* skip corrupt */\n }\n }\n return items.sort((a, b) => b.archivedAt - a.archivedAt);\n}\n\nexport function readArchivedPlan(id: string): ArchivedPlan | null {\n try {\n const raw = readFileSync(join(dir(), `${id}.json`), \"utf8\");\n return JSON.parse(raw) as ArchivedPlan;\n } catch {\n return null;\n }\n}\n\n// Hook fixture for tests — exposes mtime of a path safely.\nexport function archivedMtime(id: string): number | null {\n try {\n return statSync(join(dir(), `${id}.json`)).mtimeMs;\n } catch {\n return null;\n }\n}\n","import { listHistory, readArchivedPlan } from \"@/lib/plan-history\";\nimport { runWithWorkspace } from \"@/lib/db-drizzle\";\nimport { workspaceIdFromRequest } from \"@/lib/workspaces\";\n\nexport const dynamic = \"force-dynamic\";\n\n// List + read past plans (the user browses these when no plan is currently pending). Pin to\n// the request's workspace (browser cookie / agent header) so history scopes to the dropdown\n// selection, not the global active workspace.\nexport async function GET(req: Request) {\n return runWithWorkspace(workspaceIdFromRequest(req), () => {\n const url = new URL(req.url);\n const id = url.searchParams.get(\"id\");\n if (id) {\n const p = readArchivedPlan(id);\n if (!p) return new Response(\"not found\", { status: 404 });\n return Response.json(p);\n }\n const items = listHistory().map((p) => ({\n id: p.id,\n description: p.description,\n verdict: p.verdict,\n archivedAt: p.archivedAt,\n }));\n return Response.json({ items });\n });\n}\n","import {\n AppRouteRouteModule,\n type AppRouteRouteHandlerContext,\n type AppRouteRouteModuleOptions,\n type AppRouteUserlandModule,\n} from '../../server/route-modules/app-route/module.compiled'\nimport { RouteKind } from '../../server/route-kind'\nimport { patchFetch as _patchFetch } from '../../server/lib/patch-fetch'\nimport type { IncomingMessage, ServerResponse } from 'node:http'\nimport {\n addRequestMeta,\n getRequestMeta,\n setRequestMeta,\n type RequestMeta,\n} from '../../server/request-meta'\nimport { getTracer, type Span, SpanKind } from '../../server/lib/trace/tracer'\nimport { setManifestsSingleton } from '../../server/app-render/manifests-singleton'\nimport { normalizeAppPath } from '../../shared/lib/router/utils/app-paths'\nimport { NodeNextRequest, NodeNextResponse } from '../../server/base-http/node'\nimport {\n NextRequestAdapter,\n signalFromNodeResponse,\n} from '../../server/web/spec-extension/adapters/next-request'\nimport { BaseServerSpan } from '../../server/lib/trace/constants'\nimport { getRevalidateReason } from '../../server/instrumentation/utils'\nimport { sendResponse } from '../../server/send-response'\nimport {\n fromNodeOutgoingHttpHeaders,\n toNodeOutgoingHttpHeaders,\n} from '../../server/web/utils'\nimport { getCacheControlHeader } from '../../server/lib/cache-control'\nimport { INFINITE_CACHE, NEXT_CACHE_TAGS_HEADER } from '../../lib/constants'\nimport { NoFallbackError } from '../../shared/lib/no-fallback-error.external'\nimport {\n CachedRouteKind,\n type ResponseCacheEntry,\n type ResponseGenerator,\n} from '../../server/response-cache'\nimport * as userland from 'VAR_USERLAND'\n\n// These are injected by the loader afterwards. This is injected as a variable\n// instead of a replacement because this could also be `undefined` instead of\n// an empty string.\ndeclare const nextConfigOutput: AppRouteRouteModuleOptions['nextConfigOutput']\n\n// We inject the nextConfigOutput here so that we can use them in the route\n// module.\n// INJECT:nextConfigOutput\n\nconst routeModule = new AppRouteRouteModule({\n definition: {\n kind: RouteKind.APP_ROUTE,\n page: 'VAR_DEFINITION_PAGE',\n pathname: 'VAR_DEFINITION_PATHNAME',\n filename: 'VAR_DEFINITION_FILENAME',\n bundlePath: 'VAR_DEFINITION_BUNDLE_PATH',\n },\n distDir: process.env.__NEXT_RELATIVE_DIST_DIR || '',\n relativeProjectDir: process.env.__NEXT_RELATIVE_PROJECT_DIR || '',\n resolvedPagePath: 'VAR_RESOLVED_PAGE_PATH',\n nextConfigOutput,\n // The static import is used for initialization (methods, dynamic, etc.).\n userland: userland as AppRouteUserlandModule,\n // In Turbopack dev mode, also provide a getter that calls require() on every\n // request. This re-reads from devModuleCache so HMR updates are picked up,\n // and the async wrapper unwraps async-module Promises (ESM-only\n // serverExternalPackages) automatically.\n ...(process.env.TURBOPACK && process.env.__NEXT_DEV_SERVER\n ? {\n getUserland: () => import('VAR_USERLAND'),\n }\n : {}),\n})\n\n// Pull out the exports that we need to expose from the module. This should\n// be eliminated when we've moved the other routes to the new format. These\n// are used to hook into the route.\nconst { workAsyncStorage, workUnitAsyncStorage, serverHooks } = routeModule\n\nfunction patchFetch() {\n return _patchFetch({\n workAsyncStorage,\n workUnitAsyncStorage,\n })\n}\n\nexport {\n routeModule,\n workAsyncStorage,\n workUnitAsyncStorage,\n serverHooks,\n patchFetch,\n}\n\nexport async function handler(\n req: IncomingMessage,\n res: ServerResponse,\n ctx: {\n waitUntil?: (prom: Promise<void>) => void\n requestMeta?: RequestMeta\n }\n) {\n if (ctx.requestMeta) {\n setRequestMeta(req, ctx.requestMeta)\n }\n if (routeModule.isDev) {\n addRequestMeta(req, 'devRequestTimingInternalsEnd', process.hrtime.bigint())\n }\n let srcPage = 'VAR_DEFINITION_PAGE'\n\n // turbopack doesn't normalize `/index` in the page name\n // so we need to to process dynamic routes properly\n // TODO: fix turbopack providing differing value from webpack\n if (process.env.TURBOPACK) {\n srcPage = srcPage.replace(/\\/index$/, '') || '/'\n } else if (srcPage === '/index') {\n // we always normalize /index specifically\n srcPage = '/'\n }\n const multiZoneDraftMode = process.env\n .__NEXT_MULTI_ZONE_DRAFT_MODE as any as boolean\n\n const prepareResult = await routeModule.prepare(req, res, {\n srcPage,\n multiZoneDraftMode,\n })\n\n if (!prepareResult) {\n res.statusCode = 400\n res.end('Bad Request')\n ctx.waitUntil?.(Promise.resolve())\n return null\n }\n\n const {\n buildId,\n deploymentId,\n params,\n nextConfig,\n parsedUrl,\n isDraftMode,\n prerenderManifest,\n routerServerContext,\n isOnDemandRevalidate,\n revalidateOnlyGenerated,\n resolvedPathname,\n clientReferenceManifest,\n serverActionsManifest,\n } = prepareResult\n\n const normalizedSrcPage = normalizeAppPath(srcPage)\n\n let isIsr = Boolean(\n prerenderManifest.dynamicRoutes[normalizedSrcPage] ||\n prerenderManifest.routes[resolvedPathname]\n )\n\n const render404 = async () => {\n // TODO: should route-module itself handle rendering the 404\n if (routerServerContext?.render404) {\n await routerServerContext.render404(req, res, parsedUrl, false)\n } else {\n res.end('This page could not be found')\n }\n return null\n }\n\n if (isIsr && !isDraftMode) {\n const isPrerendered = Boolean(prerenderManifest.routes[resolvedPathname])\n const prerenderInfo = prerenderManifest.dynamicRoutes[normalizedSrcPage]\n\n if (prerenderInfo) {\n if (prerenderInfo.fallback === false && !isPrerendered) {\n if (nextConfig.adapterPath) {\n return await render404()\n }\n throw new NoFallbackError()\n }\n }\n }\n\n let cacheKey: string | null = null\n\n if (isIsr && !routeModule.isDev && !isDraftMode) {\n cacheKey = resolvedPathname\n // ensure /index and / is normalized to one key\n cacheKey = cacheKey === '/index' ? '/' : cacheKey\n }\n\n const supportsDynamicResponse: boolean =\n // If we're in development, we always support dynamic HTML\n routeModule.isDev === true ||\n // If this is not SSG or does not have static paths, then it supports\n // dynamic HTML.\n !isIsr\n\n // This is a revalidation request if the request is for a static\n // page and it is not being resumed from a postponed render and\n // it is not a dynamic RSC request then it is a revalidation\n // request.\n const isStaticGeneration = isIsr && !supportsDynamicResponse\n\n // Before rendering (which initializes component tree modules), we have to\n // set the reference manifests to our global store so Server Action's\n // encryption util can access to them at the top level of the page module.\n if (serverActionsManifest && clientReferenceManifest) {\n setManifestsSingleton({\n page: srcPage,\n clientReferenceManifest,\n serverActionsManifest,\n })\n }\n\n const method = req.method || 'GET'\n const tracer = getTracer()\n const activeSpan = tracer.getActiveScopeSpan()\n const isWrappedByNextServer = Boolean(\n routerServerContext?.isWrappedByNextServer\n )\n const isMinimalMode = Boolean(getRequestMeta(req, 'minimalMode'))\n\n const incrementalCache =\n getRequestMeta(req, 'incrementalCache') ||\n (await routeModule.getIncrementalCache(\n req,\n nextConfig,\n prerenderManifest,\n isMinimalMode\n ))\n\n incrementalCache?.resetRequestCache()\n ;(globalThis as any).__incrementalCache = incrementalCache\n\n const context: AppRouteRouteHandlerContext = {\n params,\n previewProps: prerenderManifest.preview,\n renderOpts: {\n experimental: {\n authInterrupts: Boolean(nextConfig.experimental.authInterrupts),\n },\n cacheComponents: Boolean(nextConfig.cacheComponents),\n supportsDynamicResponse,\n incrementalCache,\n cacheLifeProfiles: nextConfig.cacheLife,\n waitUntil: ctx.waitUntil,\n onClose: (cb) => {\n res.on('close', cb)\n },\n onAfterTaskError: undefined,\n onInstrumentationRequestError: (\n error,\n _request,\n errorContext,\n silenceLog\n ) =>\n routeModule.onRequestError(\n req,\n error,\n errorContext,\n silenceLog,\n routerServerContext\n ),\n },\n sharedContext: {\n buildId,\n deploymentId,\n },\n }\n const nodeNextReq = new NodeNextRequest(req)\n const nodeNextRes = new NodeNextResponse(res)\n\n const nextReq = NextRequestAdapter.fromNodeNextRequest(\n nodeNextReq,\n signalFromNodeResponse(res)\n )\n\n try {\n let parentSpan: Span | undefined\n const invokeRouteModule = async (span?: Span) => {\n return routeModule.handle(nextReq, context).finally(() => {\n if (!span) return\n\n span.setAttributes({\n 'http.status_code': res.statusCode,\n 'next.rsc': false,\n })\n\n const rootSpanAttributes = tracer.getRootSpanAttributes()\n // We were unable to get attributes, probably OTEL is not enabled\n if (!rootSpanAttributes) {\n return\n }\n\n if (\n rootSpanAttributes.get('next.span_type') !==\n BaseServerSpan.handleRequest\n ) {\n console.warn(\n `Unexpected root span type '${rootSpanAttributes.get(\n 'next.span_type'\n )}'. Please report this Next.js issue https://github.com/vercel/next.js`\n )\n return\n }\n\n const route = rootSpanAttributes.get('next.route')\n if (route) {\n const name = `${method} ${route}`\n\n span.setAttributes({\n 'next.route': route,\n 'http.route': route,\n 'next.span_name': name,\n })\n span.updateName(name)\n\n // Propagate http.route to the parent span if one exists (e.g.\n // a platform-created HTTP span in adapter deployments).\n if (parentSpan && parentSpan !== span) {\n parentSpan.setAttribute('http.route', route)\n parentSpan.updateName(name)\n }\n } else {\n span.updateName(`${method} ${srcPage}`)\n }\n })\n }\n\n const handleResponse = async (currentSpan?: Span) => {\n const responseGenerator: ResponseGenerator = async ({\n previousCacheEntry,\n }) => {\n try {\n if (\n !isMinimalMode &&\n isOnDemandRevalidate &&\n revalidateOnlyGenerated &&\n !previousCacheEntry\n ) {\n res.statusCode = 404\n // on-demand revalidate always sets this header\n res.setHeader('x-nextjs-cache', 'REVALIDATED')\n res.end('This page could not be found')\n return null\n }\n\n const response = await invokeRouteModule(currentSpan)\n\n ;(req as any).fetchMetrics = (context.renderOpts as any).fetchMetrics\n let pendingWaitUntil = context.renderOpts.pendingWaitUntil\n\n // Attempt using provided waitUntil if available\n // if it's not we fallback to sendResponse's handling\n if (pendingWaitUntil) {\n if (ctx.waitUntil) {\n ctx.waitUntil(pendingWaitUntil)\n pendingWaitUntil = undefined\n }\n }\n const cacheTags = context.renderOpts.collectedTags\n\n // If the request is for a static response, we can cache it so long\n // as it's not edge.\n if (isIsr) {\n const blob = await response.blob()\n\n // Copy the headers from the response.\n const headers = toNodeOutgoingHttpHeaders(response.headers)\n\n if (cacheTags) {\n headers[NEXT_CACHE_TAGS_HEADER] = cacheTags\n }\n\n if (!headers['content-type'] && blob.type) {\n headers['content-type'] = blob.type\n }\n\n const revalidate =\n typeof context.renderOpts.collectedRevalidate === 'undefined' ||\n context.renderOpts.collectedRevalidate >= INFINITE_CACHE\n ? false\n : context.renderOpts.collectedRevalidate\n\n const expire =\n typeof context.renderOpts.collectedExpire === 'undefined' ||\n context.renderOpts.collectedExpire >= INFINITE_CACHE\n ? undefined\n : context.renderOpts.collectedExpire\n\n // Create the cache entry for the response.\n const cacheEntry: ResponseCacheEntry = {\n value: {\n kind: CachedRouteKind.APP_ROUTE,\n status: response.status,\n body: Buffer.from(await blob.arrayBuffer()),\n headers,\n },\n cacheControl: { revalidate, expire },\n }\n\n return cacheEntry\n } else {\n // send response without caching if not ISR\n await sendResponse(\n nodeNextReq,\n nodeNextRes,\n response,\n context.renderOpts.pendingWaitUntil\n )\n return null\n }\n } catch (err) {\n // if this is a background revalidate we need to report\n // the request error here as it won't be bubbled\n if (previousCacheEntry?.isStale) {\n const silenceLog = false\n await routeModule.onRequestError(\n req,\n err,\n {\n routerKind: 'App Router',\n routePath: srcPage,\n routeType: 'route',\n revalidateReason: getRevalidateReason({\n isStaticGeneration,\n isOnDemandRevalidate,\n }),\n },\n silenceLog,\n routerServerContext\n )\n }\n throw err\n }\n }\n\n const cacheEntry = await routeModule.handleResponse({\n req,\n nextConfig,\n cacheKey,\n routeKind: RouteKind.APP_ROUTE,\n isFallback: false,\n prerenderManifest,\n isRoutePPREnabled: false,\n isOnDemandRevalidate,\n revalidateOnlyGenerated,\n responseGenerator,\n waitUntil: ctx.waitUntil,\n isMinimalMode,\n })\n\n // we don't create a cacheEntry for ISR\n if (!isIsr) {\n return null\n }\n\n if (cacheEntry?.value?.kind !== CachedRouteKind.APP_ROUTE) {\n throw new Error(\n `Invariant: app-route received invalid cache entry ${cacheEntry?.value?.kind}`\n )\n }\n\n if (!isMinimalMode) {\n res.setHeader(\n 'x-nextjs-cache',\n isOnDemandRevalidate\n ? 'REVALIDATED'\n : cacheEntry.isMiss\n ? 'MISS'\n : cacheEntry.isStale\n ? 'STALE'\n : 'HIT'\n )\n }\n\n // Draft mode should never be cached\n if (isDraftMode) {\n res.setHeader(\n 'Cache-Control',\n 'private, no-cache, no-store, max-age=0, must-revalidate'\n )\n }\n\n const headers = fromNodeOutgoingHttpHeaders(cacheEntry.value.headers)\n\n if (!(isMinimalMode && isIsr)) {\n headers.delete(NEXT_CACHE_TAGS_HEADER)\n }\n\n // If cache control is already set on the response we don't\n // override it to allow users to customize it via next.config\n if (\n cacheEntry.cacheControl &&\n !res.getHeader('Cache-Control') &&\n !headers.get('Cache-Control')\n ) {\n headers.set(\n 'Cache-Control',\n getCacheControlHeader(cacheEntry.cacheControl)\n )\n }\n\n await sendResponse(\n nodeNextReq,\n nodeNextRes,\n // @ts-expect-error - Argument of type 'Buffer<ArrayBufferLike>' is not assignable to parameter of type 'BodyInit | null | undefined'.\n new Response(cacheEntry.value.body, {\n headers,\n status: cacheEntry.value.status || 200,\n })\n )\n return null\n }\n\n // TODO: activeSpan code path is for when wrapped by\n // next-server can be removed when this is no longer used\n if (isWrappedByNextServer && activeSpan) {\n await handleResponse(activeSpan)\n } else {\n parentSpan = tracer.getActiveScopeSpan()\n await tracer.withPropagatedContext(\n req.headers,\n () =>\n tracer.trace(\n BaseServerSpan.handleRequest,\n {\n spanName: `${method} ${srcPage}`,\n kind: SpanKind.SERVER,\n attributes: {\n 'http.method': method,\n 'http.target': req.url,\n },\n },\n handleResponse\n ),\n undefined,\n !isWrappedByNextServer\n )\n }\n } catch (err) {\n if (!(err instanceof NoFallbackError)) {\n const silenceLog = false\n await routeModule.onRequestError(\n req,\n err,\n {\n routerKind: 'App Router',\n routePath: normalizedSrcPage,\n routeType: 'route',\n revalidateReason: getRevalidateReason({\n isStaticGeneration,\n isOnDemandRevalidate,\n }),\n },\n silenceLog,\n routerServerContext\n )\n }\n\n // rethrow so that we can handle serving error page\n\n // If this is during static generation, throw the error again.\n if (isIsr) throw err\n\n // Otherwise, send a 500 response.\n await sendResponse(\n nodeNextReq,\n nodeNextRes,\n new Response(null, { status: 500 })\n )\n return null\n }\n}\n"],"names":["cachedRoot","repoRoot","process","env","BEACON_REPO","pinnedId","pinned","path","ws","top","cwd","stdio","toString","trim","repoName","repoId","update","digest","slice","dataDir","BEACON_DATA_DIR","id","writeFileAtomic","content","recursive","tmp","e","force","writeJsonAtomic","value","pretty","JSON","stringify","undefined","dir","d","archivePlan","p","archived","archivedAt","Date","now","listHistory","entries","items","name","endsWith","raw","parsed","parse","push","sort","a","b","readArchivedPlan","archivedMtime","mtimeMs","dynamic","GET","req","url","URL","searchParams","get","Response","status","json","map","description","verdict","AppRouteRouteModule","RouteKind","patchFetch","_patchFetch","addRequestMeta","getRequestMeta","setRequestMeta","getTracer","SpanKind","setManifestsSingleton","normalizeAppPath","NodeNextRequest","NodeNextResponse","NextRequestAdapter","signalFromNodeResponse","BaseServerSpan","getRevalidateReason","sendResponse","fromNodeOutgoingHttpHeaders","toNodeOutgoingHttpHeaders","getCacheControlHeader","INFINITE_CACHE","NEXT_CACHE_TAGS_HEADER","NoFallbackError","CachedRouteKind","userland","routeModule","definition","kind","APP_ROUTE","page","pathname","filename","bundlePath","distDir","__NEXT_RELATIVE_DIST_DIR","relativeProjectDir","__NEXT_RELATIVE_PROJECT_DIR","resolvedPagePath","nextConfigOutput","TURBOPACK","__NEXT_DEV_SERVER","getUserland","workAsyncStorage","workUnitAsyncStorage","serverHooks","handler","res","ctx","requestMeta","isDev","hrtime","bigint","srcPage","replace","multiZoneDraftMode","__NEXT_MULTI_ZONE_DRAFT_MODE","prepareResult","prepare","statusCode","end","waitUntil","Promise","resolve","buildId","deploymentId","params","nextConfig","parsedUrl","isDraftMode","prerenderManifest","routerServerContext","isOnDemandRevalidate","revalidateOnlyGenerated","resolvedPathname","clientReferenceManifest","serverActionsManifest","normalizedSrcPage","isIsr","Boolean","dynamicRoutes","routes","render404","isPrerendered","prerenderInfo","fallback","adapterPath","cacheKey","supportsDynamicResponse","isStaticGeneration","method","tracer","activeSpan","getActiveScopeSpan","isWrappedByNextServer","isMinimalMode","incrementalCache","getIncrementalCache","resetRequestCache","globalThis","__incrementalCache","context","previewProps","preview","renderOpts","experimental","authInterrupts","cacheComponents","cacheLifeProfiles","cacheLife","onClose","cb","on","onAfterTaskError","onInstrumentationRequestError","error","_request","errorContext","silenceLog","onRequestError","sharedContext","nodeNextReq","nodeNextRes","nextReq","fromNodeNextRequest","parentSpan","invokeRouteModule","span","handle","finally","setAttributes","rootSpanAttributes","getRootSpanAttributes","handleRequest","console","warn","route","updateName","setAttribute","handleResponse","currentSpan","cacheEntry","responseGenerator","previousCacheEntry","setHeader","response","fetchMetrics","pendingWaitUntil","cacheTags","collectedTags","blob","headers","type","revalidate","collectedRevalidate","expire","collectedExpire","body","Buffer","from","arrayBuffer","cacheControl","err","isStale","routerKind","routePath","routeType","revalidateReason","routeKind","isFallback","isRoutePPREnabled","Error","isMiss","delete","getHeader","set","withPropagatedContext","trace","spanName","SERVER","attributes"],"mapp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EAEjC,CAFqC,KAE/BG,EAAY6F,cAAc,CAC9BlI,EACA6K,EACA,CACEE,WAAY,aACZC,UAAWxF,EACXyF,UAAW,QACXC,iBAAAA,CAAAA,EAAkBvJ,EAAAA,mBAAAA,EAAoB,oBACpCyE,uBACAjB,CACF,EACF,GAZiB,AAajB8C,EACA/C,GAOAO,EAAO,MAAMoF,EAQjB,OALA,MAAA,CAAA,EAAMjJ,EAAAA,YAAAA,EACJwG,EACAC,EACA,IAAIhI,SAAS,KAAM,CAAEC,OAAQ,GAAI,IAE5B,IACT,CACF,mCA7eA,SAASO,EACP,MAAA,CAAA,EAAOC,EAAAA,UAAAA,EAAY,kBACjBwC,uBACAC,CACF,EACF","ignoreList":[4]}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
module.exports=[89122,e=>{"use strict";var t=e.i(14859);e.s(["pinned",0,function(e){return async(r,...n)=>{let a=await (0,t.resolveRequestWorkspaceId)(r);return a&&await (0,t.ensureWorkspaceDb)(a),(0,t.runWithWorkspace)(a,async()=>e(r,...n))}}])},58708,e=>{"use strict";let t=null;async function r(){return t||(t=(async()=>{let{pipeline:t}=await e.A(46128);return await t("feature-extraction","Xenova/all-MiniLM-L6-v2")})().catch(e=>{throw t=null,e})),t}async function n(e){let t=e.trim();if(!t)return null;try{let e=await r(),n=await e(t,{pooling:"mean",normalize:!0});return Array.from(n.data)}catch(e){return console.error("[embeddings] failed:",e instanceof Error?e.message:e),null}}function a(e){return[e.title,e.role,e.plain,e.cluster].filter(Boolean).join(". ")}function i(e){return JSON.stringify(e)}async function s(t){try{let{db:r}=await e.A(35914),{node:s}=await e.A(29363),{eq:o}=await e.A(96359),l=await r.query.node.findFirst({where:(e,{eq:r})=>r(e.id,t),columns:{title:!0,role:!0,plain:!0,cluster:!0}});if(!l)return;let u=await n(a(l));if(!u)return;await r.update(s).set({embedding:i(u)}).where(o(s.id,t))}catch(e){console.error("[embeddings] reembed failed:",t,e instanceof Error?e.message:e)}}async function o(e,t){let r=await n(e);if(!r)return null;let a=[];for(let e of t){let t=function(e){if(!e)return null;try{let t=JSON.parse(e);if(!Array.isArray(t)||t.some(e=>"number"!=typeof e||!Number.isFinite(e)))return null;return t}catch{return null}}(e.embedding);t&&a.push({item:e,score:function(e,t){if(e.length!==t.length)return 0;let r=0,n=0,a=0;for(let i=0;i<e.length;i++)r+=e[i]*t[i],n+=e[i]*e[i],a+=t[i]*t[i];return 0===n||0===a?0:r/(Math.sqrt(n)*Math.sqrt(a))}(r,t)})}return a.sort((e,t)=>t.score-e.score),a}e.s(["embedText",0,n,"encodeVector",0,i,"nodeEmbeddingInput",0,a,"rankByQuery",0,o,"reembedNode",0,s])},53828,e=>e.a(async(t,r)=>{try{var n=e.i(91426),a=e.i(34700),i=t([n]);async function s(e=n.db){let[t]=await e.insert(a.appSetting).values({id:"singleton"}).onConflictDoUpdate({target:a.appSetting.id,set:{id:"singleton"}}).returning();return t}async function o(e,t=n.db){let[r]=await t.insert(a.appSetting).values({id:"singleton",...e}).onConflictDoUpdate({target:a.appSetting.id,set:e}).returning();return r}[n]=i.then?(await i)():i,e.s(["getAppSettings",0,s,"setAppSettings",0,o]),r()}catch(e){r(e)}},!1),91153,e=>{"use strict";let t=new Set(["a","an","the","of","for","to","and","or","in","on","with","via","by","using","use","add","adds","support","implement","implementation","feature","new","build","create","o","os","as","um","uma","de","da","do","das","dos","para","por","com","e","ou","no","na","nos","nas","ao","aos","adicionar","implementar","suporte","suportar","nova","novo","funcionalidade","usar","usando","criar"]);function r(e){return e.normalize("NFD").replace(/[̀-ͯ]/g,"").toLowerCase().replace(/[^a-z0-9]+/g," ").trim().replace(/\s+/g," ")}function n(e){return r(e).split(" ").filter(e=>e&&!t.has(e))}function a(e,t){if(!e.size||!t.size)return 0;let r=0;for(let n of e)t.has(n)&&r++;return 2*r/(e.size+t.size)}function i(e){let t=r(e).replace(/ /g,""),n=new Set;for(let e=0;e<t.length-1;e++)n.add(t.slice(e,e+2));return n}e.s(["matchFeature",0,function(e,t,s={}){let o=s.confident??.72,l=s.consider??.5,u=s.margin??.1,d=t.map(t=>{var s,o;let l,u;return{...t,score:Math.round(100*(s=e,o=t.title,l=r(s),u=r(o),l&&u?l===u?1:Math.min(1,.7*a(new Set(n(s)),new Set(n(o)))+.4*a(i(s),i(o))):0))/100}}).sort((e,t)=>t.score-e.score),c=d[0];if(!c||c.score<l)return{best:null,candidates:[]};let p=d[1]?.score??0,h=1===d.length||c.score-p>=u;return c.score>=o&&h?{best:c,candidates:[]}:{best:null,candidates:d.filter(e=>e.score>=l).slice(0,4)}}])},32665,e=>{"use strict";var t=e.i(91153);e.s(["validateFeatureCreation",0,function(e){let r=(e.title??"").trim();if(!r)return"⛔ A feature needs a non-empty title.";if(!(e.category??"").trim()){let t=function(e){let t=new Set;for(let r of e){let e=(r.cluster??"").trim();e&&t.add(e)}return[...t].sort()}(e.existing),n=t.length?` Reuse an existing category where it fits: ${t.join(", ")}.`:"";return`⛔ Feature "${r}" has no category. Every roadmap feature needs one — it drives grouping and color on the board.${n} Pass it as \`category\` (e.g. AUTH, SEARCH, DATA, INTEL, BILLING, INFRA …); don't rely on a default.`}let n=(0,t.matchFeature)(r,e.existing.map(e=>({id:e.id,title:e.title})));if(n.best){let t=e.existing.find(e=>e.id===n.best.id),a=t?.status?` (${t.status})`:"";return`⛔ "${r}" already exists as the feature "${t?.title??n.best.title}"${a}. Don't create a duplicate — mark progress on it with \`beacon_start_feature({ id })\`, add sub-tasks with \`beacon_add_subtasks\`, or finish it with \`beacon_describe_feature\`.`}return null},"validateFront",0,function(e,r){let n=(e??"").trim();if(!n)return null;let a=(0,t.matchFeature)(n,r);if(a.best)return null;let i=a.candidates.length?` Did you mean: ${a.candidates.map(e=>`"${e.title}"`).join(", ")}?`:"";return`⛔ front "${n}" doesn't match an existing feature.${i} \`front\` nests a feature UNDER an existing parent feature — it is NOT a domain tag. If "${n}" is a domain, pass it as \`category\` instead. If it's a real umbrella feature, create it first via beacon_propose_plan.`},"validateNoDuplicateFeatures",0,function(e,r){let n=r.map(e=>({id:e.id,title:e.title})),a=e.map(e=>{let a=(0,t.matchFeature)(e.title??"",n);return a.best?{title:e.title,hit:r.find(e=>e.id===a.best.id)}:null}).filter(e=>null!==e);return a.length?"⛔ These proposed features already exist on the roadmap — reuse them instead of creating duplicates:\n"+a.map(e=>` • "${e.title}" → existing "${e.hit.title}"${e.hit.status?` (${e.hit.status})`:""}`).join("\n")+"\n\nDrop the duplicate(s) from the plan; to add work to an existing feature, ship sub-tasks or update it via beacon_describe_feature. Keep only genuinely new features in the proposal.":null},"validateProposedFeatures",0,function(e){let t=e.map(e=>{let t=[],r=e.cluster??e.category??e.domain??null;return r&&r.trim()||t.push("category"),null==e.priority&&t.push("priority"),t.length?` • "${e.title?.trim()||"(untitled)"}" — missing ${t.join(" + ")}`:null}).filter(e=>null!==e);return 0===t.length?null:"⛔ Every roadmap feature needs a category AND a priority — they drive grouping and ordering on the board, and the user shouldn't have to add them by hand. Missing:\n"+t.join("\n")+"\n\nRe-present with each feature carrying its category as `category` (or `cluster` — both work; e.g. AUTH, SEARCH, DATA, INTEL, BILLING …) and `priority` (0 = P0 critical, 1 = P1 high, 2 = P2 medium, 3 = P3 low). Set BOTH on EVERY feature; don't rely on defaults."}])},3802,e=>e.a(async(t,r)=>{try{var n=e.i(85336),a=e.i(18383),i=e.i(89122),s=t([n]);[n]=s.then?(await s)():s;let o=(0,i.pinned)(async e=>{try{let t=await (0,n.createNode)(a.createNodeSchema.parse(await e.json()));return Response.json(t)}catch(e){return new Response(`Invalid node: ${e instanceof Error?e.message:"error"}`,{status:400})}});e.s(["POST",0,o]),r()}catch(e){r(e)}},!1),99614,e=>e.a(async(t,r)=>{try{var n=e.i(47909),a=e.i(74017),i=e.i(96250),s=e.i(59756),o=e.i(61916),l=e.i(74677),u=e.i(69741),d=e.i(16795),c=e.i(87718),p=e.i(95169),h=e.i(47587),f=e.i(66012),g=e.i(70101),m=e.i(26937),v=e.i(10372),y=e.i(93695);e.i(20232);var w=e.i(220),R=e.i(3802),b=t([R]);[R]=b.then?(await b)():b;let A=new n.AppRouteRouteModule({definition:{kind:a.RouteKind.APP_ROUTE,page:"/api/nodes/route",pathname:"/api/nodes",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/app/api/nodes/route.ts",nextConfigOutput:"",userland:R,...{}}),{workAsyncStorage:_,workUnitAsyncStorage:x,serverHooks:C}=A;async function E(e,t,r){r.requestMeta&&(0,s.setRequestMeta)(e,r.requestMeta),A.isDev&&(0,s.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let n="/api/nodes/route";n=n.replace(/\/index$/,"")||"/";let i=await A.prepare(e,t,{srcPage:n,multiZoneDraftMode:!1});if(!i)return t.statusCode=400,t.end("Bad Request"),null==r.waitUntil||r.waitUntil.call(r,Promise.resolve()),null;let{buildId:R,deploymentId:b,params:E,nextConfig:_,parsedUrl:x,isDraftMode:C,prerenderManifest:N,routerServerContext:S,isOnDemandRevalidate:P,revalidateOnlyGenerated:T,resolvedPathname:I,clientReferenceManifest:$,serverActionsManifest:k}=i,O=(0,u.normalizeAppPath)(n),D=!!(N.dynamicRoutes[O]||N.routes[I]),q=async()=>((null==S?void 0:S.render404)?await S.render404(e,t,x,!1):t.end("This page could not be found"),null);if(D&&!C){let e=!!N.routes[I],t=N.dynamicRoutes[O];if(t&&!1===t.fallback&&!e){if(_.adapterPath)return await q();throw new y.NoFallbackError}}let H=null;!D||A.isDev||C||(H=I,H="/index"===H?"/":H);let M=!0===A.isDev||!D,F=D&&!M;k&&$&&(0,l.setManifestsSingleton)({page:n,clientReferenceManifest:$,serverActionsManifest:k});let U=e.method||"GET",j=(0,o.getTracer)(),L=j.getActiveScopeSpan(),z=!!(null==S?void 0:S.isWrappedByNextServer),B=!!(0,s.getRequestMeta)(e,"minimalMode"),K=(0,s.getRequestMeta)(e,"incrementalCache")||await A.getIncrementalCache(e,_,N,B);null==K||K.resetRequestCache(),globalThis.__incrementalCache=K;let W={params:E,previewProps:N.preview,renderOpts:{experimental:{authInterrupts:!!_.experimental.authInterrupts},cacheComponents:!!_.cacheComponents,supportsDynamicResponse:M,incrementalCache:K,cacheLifeProfiles:_.cacheLife,waitUntil:r.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,n,a)=>A.onRequestError(e,t,n,a,S)},sharedContext:{buildId:R,deploymentId:b}},G=new d.NodeNextRequest(e),V=new d.NodeNextResponse(t),X=c.NextRequestAdapter.fromNodeNextRequest(G,(0,c.signalFromNodeResponse)(t));try{let i,s=async e=>A.handle(X,W).finally(()=>{if(!e)return;e.setAttributes({"http.status_code":t.statusCode,"next.rsc":!1});let r=j.getRootSpanAttributes();if(!r)return;if(r.get("next.span_type")!==p.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${r.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let a=r.get("next.route");if(a){let t=`${U} ${a}`;e.setAttributes({"next.route":a,"http.route":a,"next.span_name":t}),e.updateName(t),i&&i!==e&&(i.setAttribute("http.route",a),i.updateName(t))}else e.updateName(`${U} ${n}`)}),l=async i=>{var o,l;let u=async({previousCacheEntry:a})=>{try{if(!B&&P&&T&&!a)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let n=await s(i);e.fetchMetrics=W.renderOpts.fetchMetrics;let o=W.renderOpts.pendingWaitUntil;o&&r.waitUntil&&(r.waitUntil(o),o=void 0);let l=W.renderOpts.collectedTags;if(!D)return await (0,f.sendResponse)(G,V,n,W.renderOpts.pendingWaitUntil),null;{let e=await n.blob(),t=(0,g.toNodeOutgoingHttpHeaders)(n.headers);l&&(t[v.NEXT_CACHE_TAGS_HEADER]=l),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==W.renderOpts.collectedRevalidate&&!(W.renderOpts.collectedRevalidate>=v.INFINITE_CACHE)&&W.renderOpts.collectedRevalidate,a=void 0===W.renderOpts.collectedExpire||W.renderOpts.collectedExpire>=v.INFINITE_CACHE?void 0:W.renderOpts.collectedExpire;return{value:{kind:w.CachedRouteKind.APP_ROUTE,status:n.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:a}}}}catch(t){throw(null==a?void 0:a.isStale)&&await A.onRequestError(e,t,{routerKind:"App Router",routePath:n,routeType:"route",revalidateReason:(0,h.getRevalidateReason)({isStaticGeneration:F,isOnDemandRevalidate:P})},!1,S),t}},d=await A.handleResponse({req:e,nextConfig:_,cacheKey:H,routeKind:a.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:N,isRoutePPREnabled:!1,isOnDemandRevalidate:P,revalidateOnlyGenerated:T,responseGenerator:u,waitUntil:r.waitUntil,isMinimalMode:B});if(!D)return null;if((null==d||null==(o=d.value)?void 0:o.kind)!==w.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==d||null==(l=d.value)?void 0:l.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});B||t.setHeader("x-nextjs-cache",P?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),C&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let c=(0,g.fromNodeOutgoingHttpHeaders)(d.value.headers);return B&&D||c.delete(v.NEXT_CACHE_TAGS_HEADER),!d.cacheControl||t.getHeader("Cache-Control")||c.get("Cache-Control")||c.set("Cache-Control",(0,m.getCacheControlHeader)(d.cacheControl)),await (0,f.sendResponse)(G,V,new Response(d.value.body,{headers:c,status:d.value.status||200})),null};z&&L?await l(L):(i=j.getActiveScopeSpan(),await j.withPropagatedContext(e.headers,()=>j.trace(p.BaseServerSpan.handleRequest,{spanName:`${U} ${n}`,kind:o.SpanKind.SERVER,attributes:{"http.method":U,"http.target":e.url}},l),void 0,!z))}catch(t){if(t instanceof y.NoFallbackError||await A.onRequestError(e,t,{routerKind:"App Router",routePath:O,routeType:"route",revalidateReason:(0,h.getRevalidateReason)({isStaticGeneration:F,isOnDemandRevalidate:P})},!1,S),D)throw t;return await (0,f.sendResponse)(G,V,new Response(null,{status:500})),null}}e.s(["handler",0,E,"patchFetch",0,function(){return(0,i.patchFetch)({workAsyncStorage:_,workUnitAsyncStorage:x})},"routeModule",0,A,"serverHooks",0,C,"workAsyncStorage",0,_,"workUnitAsyncStorage",0,x]),r()}catch(e){r(e)}},!1),58502,e=>{e.v(t=>Promise.all(["server/chunks/[root-of-the-server]__1t2egm-._.js"].map(t=>e.l(t))).then(()=>t(51514)))},46128,e=>{e.v(t=>Promise.all(["server/chunks/[externals]_@huggingface_transformers_05bd-zz._.js"].map(t=>e.l(t))).then(()=>t(99732)))},35914,e=>{e.v(t=>Promise.all(["server/chunks/lib_db_ts_0h_yn5m._.js"].map(t=>e.l(t))).then(()=>t(62294)))},29363,e=>{e.v(e=>Promise.resolve().then(()=>e(34700)))},96359,e=>{e.v(t=>Promise.all(["server/chunks/node_modules_drizzle-orm_index_1qnscv7.js"].map(t=>e.l(t))).then(()=>t(32628)))}];
|
|
2
|
+
|
|
3
|
+
//# sourceMappingURL=%5Broot-of-the-server%5D__1197yfd._.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../lib/api-workspace.ts","../../../lib/embeddings.ts","../../../lib/settings.ts","../../../lib/match.ts","../../../lib/feature-rules.ts","../../../app/api/nodes/route.ts","../../../node_modules/next/src/build/templates/app-route.ts"],"sourcesContent":["import { ensureWorkspaceDb, resolveRequestWorkspaceId, runWithWorkspace } from \"@/lib/workspaces\";\n\n// Wrap a route handler so its whole execution is pinned to the request's workspace —\n// the `x-beacon-workspace` header (agent) or the `beacon_ws` cookie (browser selection),\n// falling back to the global active when neither is present. Use on every browser-facing\n// data route (canvas reads/writes) so an edit lands in the workspace the user is VIEWING,\n// not the global active one a background agent may have flipped.\n//\n// `db` / `dataDir()` / `repoRoot()` all consult the pin first, so wrapping the handler is\n// enough — nothing inside needs to know about workspaces.\n//\n// We `await ensureWorkspaceDb` BEFORE running the handler: the sync `db` Proxy getter no longer\n// self-heals (the libSQL migrator is async), so this request boundary is where a missing/behind\n// db gets provisioned + migrated. It short-circuits once the file is known-current this process,\n// so it's cheap on the hot path.\nexport function pinned<A extends unknown[]>(\n handler: (req: Request, ...rest: A) => Response | Promise<Response>,\n): (req: Request, ...rest: A) => Promise<Response> {\n return async (req, ...rest) => {\n const id = await resolveRequestWorkspaceId(req);\n if (id) await ensureWorkspaceDb(id);\n return runWithWorkspace(id, async () => handler(req, ...rest));\n };\n}\n","// Local semantic-search embedder. Loads Xenova/all-MiniLM-L6-v2 in-process\n// (~22MB cached on first use, ~50-100ms per text after that). Stays local so\n// the Beacon panel has no API-key dependency and no per-query network hop.\n// Vectors live in `Node.embedding` as JSON strings; cosine is computed in JS\n// at query time — at hundreds of nodes per workspace, sqlite-vec is overkill.\n\ntype FeatureExtractionPipeline = (\n text: string | string[],\n opts?: { pooling?: \"mean\" | \"cls\"; normalize?: boolean },\n) => Promise<{ data: Float32Array | number[] }>;\n\nlet pipelinePromise: Promise<FeatureExtractionPipeline> | null = null;\n\nasync function getEmbedder(): Promise<FeatureExtractionPipeline> {\n if (!pipelinePromise) {\n pipelinePromise = (async () => {\n const { pipeline } = await import(\"@huggingface/transformers\");\n // 384-dim sentence embeddings. The \"feature-extraction\" task with\n // mean-pooled + normalized output is the canonical sentence-encoder shape.\n return (await pipeline(\n \"feature-extraction\",\n \"Xenova/all-MiniLM-L6-v2\",\n )) as unknown as FeatureExtractionPipeline;\n })().catch((e) => {\n pipelinePromise = null; // let the next call retry on transient failure\n throw e;\n });\n }\n return pipelinePromise;\n}\n\n/** Compute a 384-dim sentence embedding. Returns null on failure (caller falls back to lexical). */\nexport async function embedText(text: string): Promise<number[] | null> {\n const trimmed = text.trim();\n if (!trimmed) return null;\n try {\n const embedder = await getEmbedder();\n const out = await embedder(trimmed, { pooling: \"mean\", normalize: true });\n return Array.from(out.data);\n } catch (e) {\n console.error(\"[embeddings] failed:\", e instanceof Error ? e.message : e);\n return null;\n }\n}\n\n/** Build the embedding input text from a node's queryable fields. */\nexport function nodeEmbeddingInput(node: {\n title: string;\n role?: string | null;\n plain?: string | null;\n cluster?: string | null;\n}): string {\n return [node.title, node.role, node.plain, node.cluster].filter(Boolean).join(\". \");\n}\n\n/** Cosine similarity, defensive against zero vectors and dimension mismatch. */\nexport function cosineSimilarity(a: number[], b: number[]): number {\n if (a.length !== b.length) return 0;\n let dot = 0;\n let normA = 0;\n let normB = 0;\n for (let i = 0; i < a.length; i++) {\n dot += a[i] * b[i];\n normA += a[i] * a[i];\n normB += b[i] * b[i];\n }\n if (normA === 0 || normB === 0) return 0;\n return dot / (Math.sqrt(normA) * Math.sqrt(normB));\n}\n\nexport function encodeVector(v: number[]): string {\n return JSON.stringify(v);\n}\n\nexport function decodeVector(raw: string | null | undefined): number[] | null {\n if (!raw) return null;\n try {\n const parsed = JSON.parse(raw);\n if (!Array.isArray(parsed)) return null;\n if (parsed.some((x) => typeof x !== \"number\" || !Number.isFinite(x))) return null;\n return parsed as number[];\n } catch {\n return null;\n }\n}\n\n/**\n * Re-embed a Node from its current title/plain/role/cluster. Idempotent; swallows\n * errors so a failed embed never breaks the write that triggered it.\n */\nexport async function reembedNode(id: string): Promise<void> {\n try {\n const { db } = await import(\"@/lib/db\");\n const { node } = await import(\"@/lib/drizzle/schema\");\n const { eq } = await import(\"drizzle-orm\");\n const row = await db.query.node.findFirst({\n where: (t, { eq: eqf }) => eqf(t.id, id),\n columns: { title: true, role: true, plain: true, cluster: true },\n });\n if (!row) return;\n const vec = await embedText(nodeEmbeddingInput(row));\n if (!vec) return;\n await db.update(node).set({ embedding: encodeVector(vec) }).where(eq(node.id, id));\n } catch (e) {\n console.error(\"[embeddings] reembed failed:\", id, e instanceof Error ? e.message : e);\n }\n}\n\n/** Rank candidates by cosine. Returns null when the query embedding fails. */\nexport async function rankByQuery<T extends { embedding: string | null }>(\n query: string,\n candidates: T[],\n): Promise<Array<{ item: T; score: number }> | null> {\n const queryVec = await embedText(query);\n if (!queryVec) return null;\n const scored: Array<{ item: T; score: number }> = [];\n for (const item of candidates) {\n const v = decodeVector(item.embedding);\n if (!v) continue;\n scored.push({ item, score: cosineSimilarity(queryVec, v) });\n }\n scored.sort((a, b) => b.score - a.score);\n return scored;\n}\n","import { db, type DB } from \"@/lib/db-drizzle\";\nimport { appSetting } from \"@/lib/drizzle/schema\";\n\nexport async function getAppSettings(prisma: DB = db) {\n const [row] = await prisma\n .insert(appSetting)\n .values({ id: \"singleton\" })\n .onConflictDoUpdate({ target: appSetting.id, set: { id: \"singleton\" } })\n .returning();\n return row;\n}\n\nexport async function setAppSettings(\n data: {\n intelModel?: string;\n intelProvider?: string;\n editor?: string;\n currentFeatureId?: string | null;\n },\n prisma: DB = db,\n) {\n const [row] = await prisma\n .insert(appSetting)\n .values({ id: \"singleton\", ...data })\n .onConflictDoUpdate({ target: appSetting.id, set: data })\n .returning();\n return row;\n}\n","// Reliable feature matching for the map. Combines accent-folding, content-token\n// overlap (handles word reordering + filler words) and character-bigram similarity\n// (handles stems/typos/substrings), with confidence tiers so we only auto-flag on a\n// high-confidence unambiguous match and otherwise return candidates to disambiguate.\n\n// Filler words stripped before matching. The Portuguese set is intentional and functional —\n// it lets the matcher line up feature titles written in Portuguese (e.g. juriscan), NOT leftover\n// UI cruft, so don't \"clean it up\" as part of an English-only pass.\nconst STOP = new Set([\n // English filler\n \"a\", \"an\", \"the\", \"of\", \"for\", \"to\", \"and\", \"or\", \"in\", \"on\", \"with\", \"via\", \"by\",\n \"using\", \"use\", \"add\", \"adds\", \"support\", \"implement\", \"implementation\", \"feature\",\n \"new\", \"build\", \"create\",\n // Portuguese filler\n \"o\", \"os\", \"as\", \"um\", \"uma\", \"de\", \"da\", \"do\", \"das\", \"dos\", \"para\", \"por\", \"com\",\n \"e\", \"ou\", \"no\", \"na\", \"nos\", \"nas\", \"ao\", \"aos\", \"adicionar\", \"implementar\",\n \"suporte\", \"suportar\", \"nova\", \"novo\", \"funcionalidade\", \"usar\", \"usando\", \"criar\",\n]);\n\nfunction fold(s: string): string {\n return s.normalize(\"NFD\").replace(/[̀-ͯ]/g, \"\");\n}\n\nfunction normExact(s: string): string {\n return fold(s)\n .toLowerCase()\n .replace(/[^a-z0-9]+/g, \" \")\n .trim()\n .replace(/\\s+/g, \" \");\n}\n\nexport function contentTokens(s: string): string[] {\n return normExact(s)\n .split(\" \")\n .filter((t) => t && !STOP.has(t));\n}\n\nfunction diceSets(a: Set<string>, b: Set<string>): number {\n if (!a.size || !b.size) return 0;\n let inter = 0;\n for (const t of a) if (b.has(t)) inter++;\n return (2 * inter) / (a.size + b.size);\n}\n\nfunction charBigrams(s: string): Set<string> {\n const x = normExact(s).replace(/ /g, \"\");\n const set = new Set<string>();\n for (let i = 0; i < x.length - 1; i++) set.add(x.slice(i, i + 2));\n return set;\n}\n\n/** 0..1 similarity between two feature titles. */\nexport function similarity(a: string, b: string): number {\n const na = normExact(a);\n const nb = normExact(b);\n if (!na || !nb) return 0;\n if (na === nb) return 1;\n const tokenDice = diceSets(new Set(contentTokens(a)), new Set(contentTokens(b)));\n const bigramDice = diceSets(charBigrams(a), charBigrams(b));\n return Math.min(1, 0.7 * tokenDice + 0.4 * bigramDice);\n}\n\nexport interface Candidate {\n id: string;\n title: string;\n}\nexport interface Scored extends Candidate {\n score: number;\n}\n\nexport function rankMatches(query: string, candidates: Candidate[]): Scored[] {\n return candidates\n .map((c) => ({ ...c, score: Math.round(similarity(query, c.title) * 100) / 100 }))\n .sort((a, b) => b.score - a.score);\n}\n\nexport interface MatchOutcome {\n /** A confident, unambiguous match — safe to act on automatically. */\n best: Scored | null;\n /** Plausible candidates to disambiguate (caller should pick one by id). */\n candidates: Scored[];\n}\n\nexport function matchFeature(\n query: string,\n candidates: Candidate[],\n opts: { confident?: number; consider?: number; margin?: number } = {},\n): MatchOutcome {\n const confident = opts.confident ?? 0.72;\n const consider = opts.consider ?? 0.5;\n const margin = opts.margin ?? 0.1;\n\n const ranked = rankMatches(query, candidates);\n const top = ranked[0];\n if (!top || top.score < consider) return { best: null, candidates: [] };\n\n const runnerUp = ranked[1]?.score ?? 0;\n const unambiguous = ranked.length === 1 || top.score - runnerUp >= margin;\n\n if (top.score >= confident && unambiguous) return { best: top, candidates: [] };\n return { best: null, candidates: ranked.filter((r) => r.score >= consider).slice(0, 4) };\n}\n","// Shared rule for proposed roadmap features: a feature node is only useful on the board if it\n// carries a category (cluster) and a priority — they drive grouping + ordering, and the user\n// shouldn't have to add them by hand every time. The propose-plan flow therefore REQUIRES both\n// and rejects a plan missing either, the same gate idea as \"a DB plan must ship structured\n// tables\". Pure (no db / no fs import) so BOTH the MCP server process and the /api/plan route\n// can call it.\n\nimport { matchFeature, type Candidate } from \"@/lib/match\";\n\nexport interface FeatureLike {\n title: string;\n cluster?: string | null;\n // The agent + UI both call this \"category\", and \"domain\" is the adjacent word it reaches for.\n // Accept all three as the same thing so a plan written with `category` isn't falsely rejected.\n category?: string | null;\n domain?: string | null;\n priority?: number | null;\n}\n\n// The feature's category, accepting the `cluster` / `category` / `domain` aliases.\nexport function featureCategory(f: FeatureLike): string | null {\n return f.cluster ?? f.category ?? f.domain ?? null;\n}\n\n// Returns an agent-facing rejection message when any feature is missing its category/priority,\n// or null when every feature is complete.\nexport function validateProposedFeatures(features: FeatureLike[]): string | null {\n const gaps = features\n .map((f) => {\n const missing: string[] = [];\n const category = featureCategory(f);\n if (!category || !category.trim()) missing.push(\"category\");\n if (f.priority == null) missing.push(\"priority\");\n return missing.length\n ? ` • \"${f.title?.trim() || \"(untitled)\"}\" — missing ${missing.join(\" + \")}`\n : null;\n })\n .filter((x): x is string => x !== null);\n if (gaps.length === 0) return null;\n return (\n \"⛔ Every roadmap feature needs a category AND a priority — they drive grouping and ordering \" +\n \"on the board, and the user shouldn't have to add them by hand. Missing:\\n\" +\n gaps.join(\"\\n\") +\n \"\\n\\nRe-present with each feature carrying its category as `category` (or `cluster` — both \" +\n \"work; e.g. AUTH, SEARCH, DATA, INTEL, BILLING …) and `priority` (0 = P0 critical, 1 = P1 \" +\n \"high, 2 = P2 medium, 3 = P3 low). Set BOTH on EVERY feature; don't rely on defaults.\"\n );\n}\n\nexport interface ExistingFeature {\n id: string;\n title: string;\n cluster?: string | null;\n status?: string | null;\n}\n\n/** Sorted, unique, non-empty category (cluster) names already on the roadmap — surfaced to the\n * agent so it reuses an existing category instead of inventing a near-synonym. */\nexport function existingCategories(features: ExistingFeature[]): string[] {\n const set = new Set<string>();\n for (const f of features) {\n const c = (f.cluster ?? \"\").trim();\n if (c) set.add(c);\n }\n return [...set].sort();\n}\n\n/** Guard for creating a SINGLE roadmap feature on the loose paths (start_feature / add_subtasks),\n * mirroring the propose_plan gate: a feature must carry a category and must not duplicate an\n * existing one. Returns an agent-facing rejection message, or null when it's safe to create.\n * Pure (no db) so the route + the MCP process share one rule. */\nexport function validateFeatureCreation(input: {\n title: string;\n category?: string | null;\n existing: ExistingFeature[];\n}): string | null {\n const title = (input.title ?? \"\").trim();\n if (!title) return \"⛔ A feature needs a non-empty title.\";\n\n const category = (input.category ?? \"\").trim();\n if (!category) {\n const cats = existingCategories(input.existing);\n const reuse = cats.length\n ? ` Reuse an existing category where it fits: ${cats.join(\", \")}.`\n : \"\";\n return (\n `⛔ Feature \"${title}\" has no category. Every roadmap feature needs one — it drives grouping ` +\n `and color on the board.${reuse} Pass it as \\`category\\` (e.g. AUTH, SEARCH, DATA, INTEL, ` +\n `BILLING, INFRA …); don't rely on a default.`\n );\n }\n\n const dup = matchFeature(\n title,\n input.existing.map((f) => ({ id: f.id, title: f.title })),\n );\n if (dup.best) {\n const f = input.existing.find((e) => e.id === dup.best!.id);\n const status = f?.status ? ` (${f.status})` : \"\";\n return (\n `⛔ \"${title}\" already exists as the feature \"${f?.title ?? dup.best.title}\"${status}. Don't ` +\n `create a duplicate — mark progress on it with \\`beacon_start_feature({ id })\\`, add sub-tasks ` +\n `with \\`beacon_add_subtasks\\`, or finish it with \\`beacon_describe_feature\\`.`\n );\n }\n return null;\n}\n\n/** Dedup guard for a multi-feature plan (propose_plan / ExitPlanMode block): flags any proposed\n * feature whose title confidently matches an EXISTING (non-draft) roadmap feature, so the agent\n * reuses it instead of shadowing it. Returns a rejection message, or null when all are new. */\nexport function validateNoDuplicateFeatures(\n features: { title: string }[],\n existing: ExistingFeature[],\n): string | null {\n const cands = existing.map((e) => ({ id: e.id, title: e.title }));\n const dups = features\n .map((f) => {\n const m = matchFeature(f.title ?? \"\", cands);\n return m.best ? { title: f.title, hit: existing.find((e) => e.id === m.best!.id)! } : null;\n })\n .filter((x): x is { title: string; hit: ExistingFeature } => x !== null);\n if (!dups.length) return null;\n return (\n \"⛔ These proposed features already exist on the roadmap — reuse them instead of creating \" +\n \"duplicates:\\n\" +\n dups\n .map((d) => ` • \"${d.title}\" → existing \"${d.hit.title}\"${d.hit.status ? ` (${d.hit.status})` : \"\"}`)\n .join(\"\\n\") +\n \"\\n\\nDrop the duplicate(s) from the plan; to add work to an existing feature, ship sub-tasks \" +\n \"or update it via beacon_describe_feature. Keep only genuinely new features in the proposal.\"\n );\n}\n\n/** Guard for the `front` param of beacon_start_feature: it must reference an EXISTING parent\n * feature, NOT a domain label. Returns a rejection message, or null when front matches (or is\n * empty — no front means the feature lands top-level, which is fine). */\nexport function validateFront(front: string, existingFronts: Candidate[]): string | null {\n const f = (front ?? \"\").trim();\n if (!f) return null;\n const m = matchFeature(f, existingFronts);\n if (m.best) return null;\n const hint = m.candidates.length\n ? ` Did you mean: ${m.candidates.map((c) => `\"${c.title}\"`).join(\", \")}?`\n : \"\";\n return (\n `⛔ front \"${f}\" doesn't match an existing feature.${hint} \\`front\\` nests a feature UNDER an ` +\n `existing parent feature — it is NOT a domain tag. If \"${f}\" is a domain, pass it as \\`category\\` ` +\n `instead. If it's a real umbrella feature, create it first via beacon_propose_plan.`\n );\n}\n","import { createNode } from \"@/lib/mutations\";\nimport { createNodeSchema } from \"@/lib/schemas\";\nimport { pinned } from \"@/lib/api-workspace\";\n\n// Create a node and return it. No cache revalidation — the map adds it to local React\n// Flow state optimistically so creating never re-renders / reflows the canvas. Pinned so\n// the node lands in the workspace the browser is viewing (beacon_ws cookie), not the active.\nexport const POST = pinned(async (req: Request) => {\n try {\n const node = await createNode(createNodeSchema.parse(await req.json()));\n return Response.json(node);\n } catch (e) {\n return new Response(`Invalid node: ${e instanceof Error ? e.message : \"error\"}`, {\n status: 400,\n });\n }\n});\n","import {\n AppRouteRouteModule,\n type AppRouteRouteHandlerContext,\n type AppRouteRouteModuleOptions,\n type AppRouteUserlandModule,\n} from '../../server/route-modules/app-route/module.compiled'\nimport { RouteKind } from '../../server/route-kind'\nimport { patchFetch as _patchFetch } from '../../server/lib/patch-fetch'\nimport type { IncomingMessage, ServerResponse } from 'node:http'\nimport {\n addRequestMeta,\n getRequestMeta,\n setRequestMeta,\n type RequestMeta,\n} from '../../server/request-meta'\nimport { getTracer, type Span, SpanKind } from '../../server/lib/trace/tracer'\nimport { setManifestsSingleton } from '../../server/app-render/manifests-singleton'\nimport { normalizeAppPath } from '../../shared/lib/router/utils/app-paths'\nimport { NodeNextRequest, NodeNextResponse } from '../../server/base-http/node'\nimport {\n NextRequestAdapter,\n signalFromNodeResponse,\n} from '../../server/web/spec-extension/adapters/next-request'\nimport { BaseServerSpan } from '../../server/lib/trace/constants'\nimport { getRevalidateReason } from '../../server/instrumentation/utils'\nimport { sendResponse } from '../../server/send-response'\nimport {\n fromNodeOutgoingHttpHeaders,\n toNodeOutgoingHttpHeaders,\n} from '../../server/web/utils'\nimport { getCacheControlHeader } from '../../server/lib/cache-control'\nimport { INFINITE_CACHE, NEXT_CACHE_TAGS_HEADER } from '../../lib/constants'\nimport { NoFallbackError } from '../../shared/lib/no-fallback-error.external'\nimport {\n CachedRouteKind,\n type ResponseCacheEntry,\n type ResponseGenerator,\n} from '../../server/response-cache'\nimport * as userland from 'VAR_USERLAND'\n\n// These are injected by the loader afterwards. This is injected as a variable\n// instead of a replacement because this could also be `undefined` instead of\n// an empty string.\ndeclare const nextConfigOutput: AppRouteRouteModuleOptions['nextConfigOutput']\n\n// We inject the nextConfigOutput here so that we can use them in the route\n// module.\n// INJECT:nextConfigOutput\n\nconst routeModule = new AppRouteRouteModule({\n definition: {\n kind: RouteKind.APP_ROUTE,\n page: 'VAR_DEFINITION_PAGE',\n pathname: 'VAR_DEFINITION_PATHNAME',\n filename: 'VAR_DEFINITION_FILENAME',\n bundlePath: 'VAR_DEFINITION_BUNDLE_PATH',\n },\n distDir: process.env.__NEXT_RELATIVE_DIST_DIR || '',\n relativeProjectDir: process.env.__NEXT_RELATIVE_PROJECT_DIR || '',\n resolvedPagePath: 'VAR_RESOLVED_PAGE_PATH',\n nextConfigOutput,\n // The static import is used for initialization (methods, dynamic, etc.).\n userland: userland as AppRouteUserlandModule,\n // In Turbopack dev mode, also provide a getter that calls require() on every\n // request. This re-reads from devModuleCache so HMR updates are picked up,\n // and the async wrapper unwraps async-module Promises (ESM-only\n // serverExternalPackages) automatically.\n ...(process.env.TURBOPACK && process.env.__NEXT_DEV_SERVER\n ? {\n getUserland: () => import('VAR_USERLAND'),\n }\n : {}),\n})\n\n// Pull out the exports that we need to expose from the module. This should\n// be eliminated when we've moved the other routes to the new format. These\n// are used to hook into the route.\nconst { workAsyncStorage, workUnitAsyncStorage, serverHooks } = routeModule\n\nfunction patchFetch() {\n return _patchFetch({\n workAsyncStorage,\n workUnitAsyncStorage,\n })\n}\n\nexport {\n routeModule,\n workAsyncStorage,\n workUnitAsyncStorage,\n serverHooks,\n patchFetch,\n}\n\nexport async function handler(\n req: IncomingMessage,\n res: ServerResponse,\n ctx: {\n waitUntil?: (prom: Promise<void>) => void\n requestMeta?: RequestMeta\n }\n) {\n if (ctx.requestMeta) {\n setRequestMeta(req, ctx.requestMeta)\n }\n if (routeModule.isDev) {\n addRequestMeta(req, 'devRequestTimingInternalsEnd', process.hrtime.bigint())\n }\n let srcPage = 'VAR_DEFINITION_PAGE'\n\n // turbopack doesn't normalize `/index` in the page name\n // so we need to to process dynamic routes properly\n // TODO: fix turbopack providing differing value from webpack\n if (process.env.TURBOPACK) {\n srcPage = srcPage.replace(/\\/index$/, '') || '/'\n } else if (srcPage === '/index') {\n // we always normalize /index specifically\n srcPage = '/'\n }\n const multiZoneDraftMode = process.env\n .__NEXT_MULTI_ZONE_DRAFT_MODE as any as boolean\n\n const prepareResult = await routeModule.prepare(req, res, {\n srcPage,\n multiZoneDraftMode,\n })\n\n if (!prepareResult) {\n res.statusCode = 400\n res.end('Bad Request')\n ctx.waitUntil?.(Promise.resolve())\n return null\n }\n\n const {\n buildId,\n deploymentId,\n params,\n nextConfig,\n parsedUrl,\n isDraftMode,\n prerenderManifest,\n routerServerContext,\n isOnDemandRevalidate,\n revalidateOnlyGenerated,\n resolvedPathname,\n clientReferenceManifest,\n serverActionsManifest,\n } = prepareResult\n\n const normalizedSrcPage = normalizeAppPath(srcPage)\n\n let isIsr = Boolean(\n prerenderManifest.dynamicRoutes[normalizedSrcPage] ||\n prerenderManifest.routes[resolvedPathname]\n )\n\n const render404 = async () => {\n // TODO: should route-module itself handle rendering the 404\n if (routerServerContext?.render404) {\n await routerServerContext.render404(req, res, parsedUrl, false)\n } else {\n res.end('This page could not be found')\n }\n return null\n }\n\n if (isIsr && !isDraftMode) {\n const isPrerendered = Boolean(prerenderManifest.routes[resolvedPathname])\n const prerenderInfo = prerenderManifest.dynamicRoutes[normalizedSrcPage]\n\n if (prerenderInfo) {\n if (prerenderInfo.fallback === false && !isPrerendered) {\n if (nextConfig.adapterPath) {\n return await render404()\n }\n throw new NoFallbackError()\n }\n }\n }\n\n let cacheKey: string | null = null\n\n if (isIsr && !routeModule.isDev && !isDraftMode) {\n cacheKey = resolvedPathname\n // ensure /index and / is normalized to one key\n cacheKey = cacheKey === '/index' ? '/' : cacheKey\n }\n\n const supportsDynamicResponse: boolean =\n // If we're in development, we always support dynamic HTML\n routeModule.isDev === true ||\n // If this is not SSG or does not have static paths, then it supports\n // dynamic HTML.\n !isIsr\n\n // This is a revalidation request if the request is for a static\n // page and it is not being resumed from a postponed render and\n // it is not a dynamic RSC request then it is a revalidation\n // request.\n const isStaticGeneration = isIsr && !supportsDynamicResponse\n\n // Before rendering (which initializes component tree modules), we have to\n // set the reference manifests to our global store so Server Action's\n // encryption util can access to them at the top level of the page module.\n if (serverActionsManifest && clientReferenceManifest) {\n setManifestsSingleton({\n page: srcPage,\n clientReferenceManifest,\n serverActionsManifest,\n })\n }\n\n const method = req.method || 'GET'\n const tracer = getTracer()\n const activeSpan = tracer.getActiveScopeSpan()\n const isWrappedByNextServer = Boolean(\n routerServerContext?.isWrappedByNextServer\n )\n const isMinimalMode = Boolean(getRequestMeta(req, 'minimalMode'))\n\n const incrementalCache =\n getRequestMeta(req, 'incrementalCache') ||\n (await routeModule.getIncrementalCache(\n req,\n nextConfig,\n prerenderManifest,\n isMinimalMode\n ))\n\n incrementalCache?.resetRequestCache()\n ;(globalThis as any).__incrementalCache = incrementalCache\n\n const context: AppRouteRouteHandlerContext = {\n params,\n previewProps: prerenderManifest.preview,\n renderOpts: {\n experimental: {\n authInterrupts: Boolean(nextConfig.experimental.authInterrupts),\n },\n cacheComponents: Boolean(nextConfig.cacheComponents),\n supportsDynamicResponse,\n incrementalCache,\n cacheLifeProfiles: nextConfig.cacheLife,\n waitUntil: ctx.waitUntil,\n onClose: (cb) => {\n res.on('close', cb)\n },\n onAfterTaskError: undefined,\n onInstrumentationRequestError: (\n error,\n _request,\n errorContext,\n silenceLog\n ) =>\n routeModule.onRequestError(\n req,\n error,\n errorContext,\n silenceLog,\n routerServerContext\n ),\n },\n sharedContext: {\n buildId,\n deploymentId,\n },\n }\n const nodeNextReq = new NodeNextRequest(req)\n const nodeNextRes = new NodeNextResponse(res)\n\n const nextReq = NextRequestAdapter.fromNodeNextRequest(\n nodeNextReq,\n signalFromNodeResponse(res)\n )\n\n try {\n let parentSpan: Span | undefined\n const invokeRouteModule = async (span?: Span) => {\n return routeModule.handle(nextReq, context).finally(() => {\n if (!span) return\n\n span.setAttributes({\n 'http.status_code': res.statusCode,\n 'next.rsc': false,\n })\n\n const rootSpanAttributes = tracer.getRootSpanAttributes()\n // We were unable to get attributes, probably OTEL is not enabled\n if (!rootSpanAttributes) {\n return\n }\n\n if (\n rootSpanAttributes.get('next.span_type') !==\n BaseServerSpan.handleRequest\n ) {\n console.warn(\n `Unexpected root span type '${rootSpanAttributes.get(\n 'next.span_type'\n )}'. Please report this Next.js issue https://github.com/vercel/next.js`\n )\n return\n }\n\n const route = rootSpanAttributes.get('next.route')\n if (route) {\n const name = `${method} ${route}`\n\n span.setAttributes({\n 'next.route': route,\n 'http.route': route,\n 'next.span_name': name,\n })\n span.updateName(name)\n\n // Propagate http.route to the parent span if one exists (e.g.\n // a platform-created HTTP span in adapter deployments).\n if (parentSpan && parentSpan !== span) {\n parentSpan.setAttribute('http.route', route)\n parentSpan.updateName(name)\n }\n } else {\n span.updateName(`${method} ${srcPage}`)\n }\n })\n }\n\n const handleResponse = async (currentSpan?: Span) => {\n const responseGenerator: ResponseGenerator = async ({\n previousCacheEntry,\n }) => {\n try {\n if (\n !isMinimalMode &&\n isOnDemandRevalidate &&\n revalidateOnlyGenerated &&\n !previousCacheEntry\n ) {\n res.statusCode = 404\n // on-demand revalidate always sets this header\n res.setHeader('x-nextjs-cache', 'REVALIDATED')\n res.end('This page could not be found')\n return null\n }\n\n const response = await invokeRouteModule(currentSpan)\n\n ;(req as any).fetchMetrics = (context.renderOpts as any).fetchMetrics\n let pendingWaitUntil = context.renderOpts.pendingWaitUntil\n\n // Attempt using provided waitUntil if available\n // if it's not we fallback to sendResponse's handling\n if (pendingWaitUntil) {\n if (ctx.waitUntil) {\n ctx.waitUntil(pendingWaitUntil)\n pendingWaitUntil = undefined\n }\n }\n const cacheTags = context.renderOpts.collectedTags\n\n // If the request is for a static response, we can cache it so long\n // as it's not edge.\n if (isIsr) {\n const blob = await response.blob()\n\n // Copy the headers from the response.\n const headers = toNodeOutgoingHttpHeaders(response.headers)\n\n if (cacheTags) {\n headers[NEXT_CACHE_TAGS_HEADER] = cacheTags\n }\n\n if (!headers['content-type'] && blob.type) {\n headers['content-type'] = blob.type\n }\n\n const revalidate =\n typeof context.renderOpts.collectedRevalidate === 'undefined' ||\n context.renderOpts.collectedRevalidate >= INFINITE_CACHE\n ? false\n : context.renderOpts.collectedRevalidate\n\n const expire =\n typeof context.renderOpts.collectedExpire === 'undefined' ||\n context.renderOpts.collectedExpire >= INFINITE_CACHE\n ? undefined\n : context.renderOpts.collectedExpire\n\n // Create the cache entry for the response.\n const cacheEntry: ResponseCacheEntry = {\n value: {\n kind: CachedRouteKind.APP_ROUTE,\n status: response.status,\n body: Buffer.from(await blob.arrayBuffer()),\n headers,\n },\n cacheControl: { revalidate, expire },\n }\n\n return cacheEntry\n } else {\n // send response without caching if not ISR\n await sendResponse(\n nodeNextReq,\n nodeNextRes,\n response,\n context.renderOpts.pendingWaitUntil\n )\n return null\n }\n } catch (err) {\n // if this is a background revalidate we need to report\n // the request error here as it won't be bubbled\n if (previousCacheEntry?.isStale) {\n const silenceLog = false\n await routeModule.onRequestError(\n req,\n err,\n {\n routerKind: 'App Router',\n routePath: srcPage,\n routeType: 'route',\n revalidateReason: getRevalidateReason({\n isStaticGeneration,\n isOnDemandRevalidate,\n }),\n },\n silenceLog,\n routerServerContext\n )\n }\n throw err\n }\n }\n\n const cacheEntry = await routeModule.handleResponse({\n req,\n nextConfig,\n cacheKey,\n routeKind: RouteKind.APP_ROUTE,\n isFallback: false,\n prerenderManifest,\n isRoutePPREnabled: false,\n isOnDemandRevalidate,\n revalidateOnlyGenerated,\n responseGenerator,\n waitUntil: ctx.waitUntil,\n isMinimalMode,\n })\n\n // we don't create a cacheEntry for ISR\n if (!isIsr) {\n return null\n }\n\n if (cacheEntry?.value?.kind !== CachedRouteKind.APP_ROUTE) {\n throw new Error(\n `Invariant: app-route received invalid cache entry ${cacheEntry?.value?.kind}`\n )\n }\n\n if (!isMinimalMode) {\n res.setHeader(\n 'x-nextjs-cache',\n isOnDemandRevalidate\n ? 'REVALIDATED'\n : cacheEntry.isMiss\n ? 'MISS'\n : cacheEntry.isStale\n ? 'STALE'\n : 'HIT'\n )\n }\n\n // Draft mode should never be cached\n if (isDraftMode) {\n res.setHeader(\n 'Cache-Control',\n 'private, no-cache, no-store, max-age=0, must-revalidate'\n )\n }\n\n const headers = fromNodeOutgoingHttpHeaders(cacheEntry.value.headers)\n\n if (!(isMinimalMode && isIsr)) {\n headers.delete(NEXT_CACHE_TAGS_HEADER)\n }\n\n // If cache control is already set on the response we don't\n // override it to allow users to customize it via next.config\n if (\n cacheEntry.cacheControl &&\n !res.getHeader('Cache-Control') &&\n !headers.get('Cache-Control')\n ) {\n headers.set(\n 'Cache-Control',\n getCacheControlHeader(cacheEntry.cacheControl)\n )\n }\n\n await sendResponse(\n nodeNextReq,\n nodeNextRes,\n // @ts-expect-error - Argument of type 'Buffer<ArrayBufferLike>' is not assignable to parameter of type 'BodyInit | null | undefined'.\n new Response(cacheEntry.value.body, {\n headers,\n status: cacheEntry.value.status || 200,\n })\n )\n return null\n }\n\n // TODO: activeSpan code path is for when wrapped by\n // next-server can be removed when this is no longer used\n if (isWrappedByNextServer && activeSpan) {\n await handleResponse(activeSpan)\n } else {\n parentSpan = tracer.getActiveScopeSpan()\n await tracer.withPropagatedContext(\n req.headers,\n () =>\n tracer.trace(\n BaseServerSpan.handleRequest,\n {\n spanName: `${method} ${srcPage}`,\n kind: SpanKind.SERVER,\n attributes: {\n 'http.method': method,\n 'http.target': req.url,\n },\n },\n handleResponse\n ),\n undefined,\n !isWrappedByNextServer\n )\n }\n } catch (err) {\n if (!(err instanceof NoFallbackError)) {\n const silenceLog = false\n await routeModule.onRequestError(\n req,\n err,\n {\n routerKind: 'App Router',\n routePath: normalizedSrcPage,\n routeType: 'route',\n revalidateReason: getRevalidateReason({\n isStaticGeneration,\n isOnDemandRevalidate,\n }),\n },\n silenceLog,\n routerServerContext\n )\n }\n\n // rethrow so that we can handle serving error page\n\n // If this is during static generation, throw the error again.\n if (isIsr) throw err\n\n // Otherwise, send a 500 response.\n await sendResponse(\n nodeNextReq,\n nodeNextRes,\n new Response(null, { status: 500 })\n )\n return null\n }\n}\n"],"names":["pinned","handler","req","rest","id","pipelinePromise","getEmbedder","pipeline","catch","e","embedText","text","trimmed","trim","embedder","out","pooling","normalize","Array","from","data","console","error","Error","message","nodeEmbeddingInput","node","title","role","plain","cluster","filter","Boolean","join","cosineSimilarity","a","b","length","dot","normA","normB","i","Math","sqrt","encodeVector","v","JSON","stringify","decodeVector","raw","parsed","parse","isArray","some","x","Number","isFinite","reembedNode","db","eq","row","query","findFirst","where","t","eqf","columns","vec","update","set","embedding","rankByQuery","candidates","queryVec","scored","item","push","score","sort","getAppSettings","prisma","insert","values","onConflictDoUpdate","target","returning","setAppSettings","STOP","Set","fold","s","replace","normExact","toLowerCase","contentTokens","split","has","diceSets","size","inter","charBigrams","add","slice","similarity","na","nb","tokenDice","bigramDice","min","rankMatches","map","c","round","matchFeature","opts","confident","consider","margin","ranked","top","best","runnerUp","unambiguous","r","featureCategory","f","category","domain","validateProposedFeatures","features","gaps","missing","priority","existingCategories","validateFeatureCreation","input","cats","existing","reuse","dup","find","status","validateNoDuplicateFeatures","cands","dups","m","hit","d","validateFront","front","existingFronts","hint","POST","json","Response","AppRouteRouteModule","RouteKind","patchFetch","_patchFetch","addRequestMeta","getRequestMeta","setRequestMeta","getTracer","SpanKind","setManifestsSingleton","normalizeAppPath","NodeNextRequest","NodeNextResponse","NextRequestAdapter","signalFromNodeResponse","BaseServerSpan","getRevalidateReason","sendResponse","fromNodeOutgoingHttpHeaders","toNodeOutgoingHttpHeaders","getCacheControlHeader","INFINITE_CACHE","NEXT_CACHE_TAGS_HEADER","NoFallbackError","CachedRouteKind","userland","routeModule","definition","kind","APP_ROUTE","page","pathname","filename","bundlePath","distDir","process","env","__NEXT_RELATIVE_DIST_DIR","relativeProjectDir","__NEXT_RELATIVE_PROJECT_DIR","resolvedPagePath","nextConfigOutput","TURBOPACK","__NEXT_DEV_SERVER","getUserland","workAsyncStorage","workUnitAsyncStorage","serverHooks","res","ctx","requestMeta","isDev","hrtime","bigint","srcPage","multiZoneDraftMode","__NEXT_MULTI_ZONE_DRAFT_MODE","prepareResult","prepare","statusCode","end","waitUntil","Promise","resolve","buildId","deploymentId","params","nextConfig","parsedUrl","isDraftMode","prerenderManifest","routerServerContext","isOnDemandRevalidate","revalidateOnlyGenerated","resolvedPathname","clientReferenceManifest","serverActionsManifest","normalizedSrcPage","isIsr","dynamicRoutes","routes","render404","isPrerendered","prerenderInfo","fallback","adapterPath","cacheKey","supportsDynamicResponse","isStaticGeneration","method","tracer","activeSpan","getActiveScopeSpan","isWrappedByNextServer","isMinimalMode","incrementalCache","getIncrementalCache","resetRequestCache","globalThis","__incrementalCache","context","previewProps","preview","renderOpts","experimental","authInterrupts","cacheComponents","cacheLifeProfiles","cacheLife","onClose","cb","on","onAfterTaskError","undefined","onInstrumentationRequestError","_request","errorContext","silenceLog","onRequestError","sharedContext","nodeNextReq","nodeNextRes","nextReq","fromNodeNextRequest","parentSpan","invokeRouteModule","span","handle","finally","setAttributes","rootSpanAttributes","getRootSpanAttributes","get","handleRequest","warn","route","name","updateName","setAttribute","handleResponse","currentSpan","cacheEntry","responseGenerator","previousCacheEntry","setHeader","response","fetchMetrics","pendingWaitUntil","cacheTags","collectedTags","blob","headers","type","revalidate","collectedRevalidate","expire","collectedExpire","value","body","Buffer","arrayBuffer","cacheControl","err","isStale","routerKind","routePath","routeType","revalidateReason","routeKind","isFallback","isRoutePPREnabled","isMiss","delete","getHeader","withPropagatedContext","trace","spanName","SERVER","attributes","url"],"mappings":"uCAAA,IAAA,EAAA,EAAA,CAAA,CAAA,uBAeO,SACLC,AADcD,CACqD,EAEnE,OAAO,MAAOE,EAAK,GAAGC,KACpB,IAAMC,EAAK,MAAM,CAAA,EAAA,EAAA,yBAAA,AAAyB,EAACF,GAE3C,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A,MAAA,CAAA,EAAMjJ,EAAAA,YAAAA,EACJuG,EACAC,EACA,IAAI1H,SAAS,KAAM,CAAEb,OAAQ,GAAI,IAE5B,IACT,CACF,mCA7eA,SAASgB,EACP,MAAA,CAAA,EAAOC,EAAAA,UAAAA,EAAY,kBACjB0C,uBACAC,CACF,EACF","ignoreList":[6]}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
module.exports=[18622,(e,t,n)=>{t.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},56704,(e,t,n)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},32319,(e,t,n)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},70406,(e,t,n)=>{t.exports=e.x("next/dist/compiled/@opentelemetry/api",()=>require("next/dist/compiled/@opentelemetry/api"))},93695,(e,t,n)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},60338,e=>{"use strict";var t=e.i(56325),n=e.i(44988),a=e.i(18899);e.s(["avg",0,function(e){return a.sql`avg(${e})`.mapWith(String)},"avgDistinct",0,function(e){return a.sql`avg(distinct ${e})`.mapWith(String)},"count",0,function(e){return a.sql`count(${e||a.sql.raw("*")})`.mapWith(Number)},"countDistinct",0,function(e){return a.sql`count(distinct ${e})`.mapWith(Number)},"max",0,function(e){return a.sql`max(${e})`.mapWith((0,n.is)(e,t.Column)?e:String)},"min",0,function(e){return a.sql`min(${e})`.mapWith((0,n.is)(e,t.Column)?e:String)},"sum",0,function(e){return a.sql`sum(${e})`.mapWith(String)},"sumDistinct",0,function(e){return a.sql`sum(distinct ${e})`.mapWith(String)}])},46409,e=>e.a(async(t,n)=>{try{var a=e.i(75225),r=e.i(91426),i=e.i(34700),o=t([r]);async function l(e=r.db){let[t,n]=await Promise.all([e.query.endpoint.findMany({where:(e,{ne:t})=>t(e.source,"INTROSPECTION")}),e.query.endpoint.findMany({where:(e,{eq:t})=>t(e.source,"INTROSPECTION")})]),o={collapsed:0,mappings:[]};for(let r of t){let t=n.find(e=>(function(e,t){if(e.method.toUpperCase()!==t.method.toUpperCase())return!1;let n=e.path.replace(/\{[^}]*\}/g,"{}"),a=t.path.replace(/\{[^}]*\}/g,"{}");return a===n||a.endsWith(n)})(r,e));t&&(await e.delete(i.endpoint).where((0,a.eq)(i.endpoint.id,r.id)),o.collapsed++,o.mappings.push({planned:`${r.method} ${r.path}`,code:`${t.method} ${t.path}`}))}return o}[r]=o.then?(await o)():o,e.s(["reconcilePlannedEndpoints",0,l]),n()}catch(e){n(e)}},!1),3723,e=>e.a(async(t,n)=>{try{var a=e.i(75225),r=e.i(91426),i=e.i(34700),o=t([r]);function l(e){let t=Math.floor(e/12);return{x:-300-280*t,y:e%12*60}}async function s(e=r.db){let t=await e.query.endpoint.findMany({orderBy:(e,{asc:t,desc:n})=>[t(e.y),n(e.x),t(e.id)]});if(0===t.length)return 0;let n=0;for(let r=0;r<t.length;r++){let{x:o,y:s}=l(r),d=t[r];(d.x!==o||d.y!==s)&&(await e.update(i.endpoint).set({x:o,y:s}).where((0,a.eq)(i.endpoint.id,d.id)),n++)}return n}async function d(e=r.db){let[t,n]=await Promise.all([e.query.dbTable.findFirst({orderBy:(e,{desc:t})=>t(e.y)}),e.query.endpoint.findFirst({orderBy:(e,{desc:t})=>t(e.y)})]),a=Math.max(t?.y??0,n?.y??0);return a>0?a+280:0}[r]=o.then?(await o)():o,e.s(["computeDraftOriginY",0,d,"endpointsOverlap",0,function(e){for(let t=0;t<e.length;t++)for(let n=t+1;n<e.length;n++){let a=e[t],r=e[n];if(a.x<r.x+240&&a.x+240>r.x&&a.y<r.y+50&&a.y+50>r.y)return!0}return!1},"gridPositionForEndpoint",0,l,"relayoutEndpoints",0,s]),n()}catch(e){n(e)}},!1),96902,e=>e.a(async(t,n)=>{try{var a=e.i(75225),r=e.i(91426),i=e.i(34700),o=t([r]);function l(e){return 36+30*Math.max(0,e)+16}function s(e,t=[]){let n=[,,,,].fill(0);for(let e of t){let t=Math.max(0,Math.min(3,Math.round(e.x/320))),a=e.y+l(e.columnCount)+50;a>n[t]&&(n[t]=a)}let a=new Map;for(let t of e){let e=0;for(let t=1;t<4;t++)n[t]<n[e]&&(e=t);let r=320*e,i=n[e];a.set(t.key,{x:r,y:i}),n[e]=i+l(t.columnCount)+50}return a}async function d(e=r.db){let t=await e.query.dbTable.findMany({where:(e,{eq:t})=>t(e.source,"INTROSPECTION"),with:{columns:{columns:{id:!0}}},orderBy:(e,{asc:t})=>t(e.name)});if(0===t.length)return 0;let n=s(t.map(e=>({key:e.id,columnCount:e.columns.length}))),o=0;for(let r of t){let t=n.get(r.id);t&&(Math.round(t.x)!==Math.round(r.x)||Math.round(t.y)!==Math.round(r.y))&&(await e.update(i.dbTable).set({x:t.x,y:t.y}).where((0,a.eq)(i.dbTable.id,r.id)),o++)}return o}[r]=o.then?(await o)():o,e.s(["estimateTableHeight",0,l,"packTablesMasonry",0,s,"relayoutTables",0,d,"tablesOverlap",0,function(e){for(let t=0;t<e.length;t++)for(let n=t+1;n<e.length;n++){let a=e[t],r=e[n],i=l(a.columnCount),o=l(r.columnCount);if(a.x<r.x+300&&a.x+300>r.x&&a.y<r.y+o&&a.y+i>r.y)return!0}return!1}]),n()}catch(e){n(e)}},!1),6659,e=>e.a(async(t,n)=>{try{var a=e.i(69719),r=e.i(75225),i=e.i(60338),o=e.i(18899),l=e.i(91426),s=e.i(34700),d=e.i(3723),u=e.i(46409),c=e.i(96902),p=t([l,d,u,c]);[l,d,u,c]=p.then?(await p)():p;let f=a.z.object({tables:a.z.array(a.z.object({name:a.z.string().trim().min(1),domain:a.z.string().nullish(),description:a.z.string().nullish(),columns:a.z.array(a.z.object({name:a.z.string().trim().min(1),type:a.z.string().trim().min(1),isPk:a.z.boolean().optional(),isFk:a.z.boolean().optional(),nullable:a.z.boolean().optional(),note:a.z.string().nullish()})).default([])})).default([]),relations:a.z.array(a.z.object({fromTable:a.z.string(),fromColumn:a.z.string(),toTable:a.z.string(),toColumn:a.z.string(),label:a.z.string().nullish()})).default([]),endpoints:a.z.array(a.z.object({method:a.z.string().trim().min(1),path:a.z.string().trim().min(1),domain:a.z.string().nullish(),description:a.z.string().nullish(),uses:a.z.array(a.z.object({table:a.z.string(),access:a.z.string().default("read")})).default([])})).default([])});async function m(e=l.db){let t=await e.query.syncState.findFirst({where:(e,{eq:t})=>t(e.id,"singleton")});return t?.version??0}async function h(e=l.db){let[t]=await e.insert(s.syncState).values({id:"singleton",version:1}).onConflictDoUpdate({target:s.syncState.id,set:{version:o.sql`${s.syncState.version} + 1`}}).returning();return t.version}async function y(e,t=l.db){let n=f.parse(e),a=n.tables.map(e=>e.name);await t.delete(s.dbTable).where(a.length?(0,r.and)((0,r.eq)(s.dbTable.source,"INTROSPECTION"),(0,r.notInArray)(s.dbTable.name,a)):(0,r.eq)(s.dbTable.source,"INTROSPECTION"));let o=await t.query.dbTable.findMany({columns:{name:!0,x:!0,y:!0},with:{columns:{columns:{id:!0}}}}),p=new Map(o.map(e=>[e.name,e])),m=(0,c.packTablesMasonry)(n.tables.filter(e=>!p.has(e.name)).map(e=>({key:e.name,columnCount:e.columns.length})),o.map(e=>({x:e.x,y:e.y,columnCount:e.columns.length}))),b=new Map;for(let e of n.tables){let n=p.get(e.name),a=m.get(e.name),i=n?.x??a?.x??0,o=n?.y??a?.y??0,[l]=await t.insert(s.dbTable).values({name:e.name,domain:e.domain??null,description:e.description??null,source:"INTROSPECTION",x:i,y:o}).onConflictDoUpdate({target:s.dbTable.name,set:{domain:e.domain??null,description:e.description??null,source:"INTROSPECTION"}}).returning();b.set(e.name,l.id),await t.delete(s.dbColumn).where((0,r.eq)(s.dbColumn.tableId,l.id)),e.columns.length&&await t.insert(s.dbColumn).values(e.columns.map((e,t)=>({tableId:l.id,name:e.name,type:e.type,isPk:e.isPk??!1,isFk:e.isFk??!1,nullable:e.nullable??!0,note:e.note??null,ord:t})))}let g=[...b.values()];for(let e of(g.length&&await t.delete(s.dbRelation).where((0,r.or)((0,r.inArray)(s.dbRelation.fromTableId,g),(0,r.inArray)(s.dbRelation.toTableId,g))),n.relations)){let n=b.get(e.fromTable),a=b.get(e.toTable);n&&a&&await t.insert(s.dbRelation).values({fromTableId:n,toTableId:a,fromColumn:e.fromColumn,toColumn:e.toColumn,label:e.label??`${e.fromColumn} → ${e.toTable}.${e.toColumn}`})}let w=new Set(n.endpoints.map(e=>`${e.method} ${e.path}`)),x=(await t.query.endpoint.findMany({where:(e,{eq:t})=>t(e.source,"INTROSPECTION")})).filter(e=>!w.has(`${e.method} ${e.path}`)).map(e=>e.id);x.length&&await t.delete(s.endpoint).where((0,r.inArray)(s.endpoint.id,x));let v=(await t.select({n:(0,i.count)()}).from(s.endpoint))[0].n;for(let e of n.endpoints){let n,a,i=await t.query.endpoint.findFirst({where:(t,{and:n,eq:a})=>n(a(t.method,e.method),a(t.path,e.path))});if(i)n=i.x,a=i.y;else{let e=(0,d.gridPositionForEndpoint)(v);n=e.x,a=e.y,v++}let[o]=await t.insert(s.endpoint).values({method:e.method,path:e.path,domain:e.domain??null,description:e.description??null,source:"INTROSPECTION",x:n,y:a}).onConflictDoUpdate({target:[s.endpoint.method,s.endpoint.path],set:{domain:e.domain??null,description:e.description??null,source:"INTROSPECTION"}}).returning();for(let n of(await t.delete(s.endpointTable).where((0,r.eq)(s.endpointTable.endpointId,o.id)),e.uses)){let e=b.get(n.table)??(await t.query.dbTable.findFirst({where:(e,{eq:t})=>t(e.name,n.table)}))?.id;e&&await t.insert(s.endpointTable).values({endpointId:o.id,tableId:e,access:n.access})}}await (0,u.reconcilePlannedEndpoints)(t);let T=await t.query.dbTable.findMany({where:(e,{eq:t})=>t(e.source,"INTROSPECTION"),columns:{x:!0,y:!0},with:{columns:{columns:{id:!0}}}});(0,c.tablesOverlap)(T.map(e=>({x:e.x,y:e.y,columnCount:e.columns.length})))&&await (0,c.relayoutTables)(t);let R=await t.select({x:s.endpoint.x,y:s.endpoint.y}).from(s.endpoint);(0,d.endpointsOverlap)(R)&&await (0,d.relayoutEndpoints)(t);let C=await h(t);return{tables:n.tables.length,relations:n.relations.length,endpoints:n.endpoints.length,version:C}}e.s(["bumpVersion",0,h,"getVersion",0,m,"ingestSnapshot",0,y,"snapshotSchema",0,f]),n()}catch(e){n(e)}},!1),89122,e=>{"use strict";var t=e.i(14859);e.s(["pinned",0,function(e){return async(n,...a)=>{let r=await (0,t.resolveRequestWorkspaceId)(n);return r&&await (0,t.ensureWorkspaceDb)(r),(0,t.runWithWorkspace)(r,async()=>e(n,...a))}}])},78295,e=>e.a(async(t,n)=>{try{var a=e.i(89122),r=e.i(46409),i=e.i(6659),o=t([r,i]);[r,i]=o.then?(await o)():o;let l=(0,a.pinned)(async()=>{let e=await (0,r.reconcilePlannedEndpoints)();return e.collapsed&&await (0,i.bumpVersion)(),Response.json({ok:!0,...e})});e.s(["POST",0,l,"dynamic",0,"force-dynamic"]),n()}catch(e){n(e)}},!1),29640,e=>e.a(async(t,n)=>{try{var a=e.i(47909),r=e.i(74017),i=e.i(96250),o=e.i(59756),l=e.i(61916),s=e.i(74677),d=e.i(69741),u=e.i(16795),c=e.i(87718),p=e.i(95169),m=e.i(47587),h=e.i(66012),y=e.i(70101),f=e.i(26937),b=e.i(10372),g=e.i(93695);e.i(20232);var w=e.i(220),x=e.i(78295),v=t([x]);[x]=v.then?(await v)():v;let R=new a.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/api/db/reconcile-endpoints/route",pathname:"/api/db/reconcile-endpoints",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/app/api/db/reconcile-endpoints/route.ts",nextConfigOutput:"",userland:x,...{}}),{workAsyncStorage:C,workUnitAsyncStorage:E,serverHooks:q}=R;async function T(e,t,n){n.requestMeta&&(0,o.setRequestMeta)(e,n.requestMeta),R.isDev&&(0,o.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let a="/api/db/reconcile-endpoints/route";a=a.replace(/\/index$/,"")||"/";let i=await R.prepare(e,t,{srcPage:a,multiZoneDraftMode:!1});if(!i)return t.statusCode=400,t.end("Bad Request"),null==n.waitUntil||n.waitUntil.call(n,Promise.resolve()),null;let{buildId:x,deploymentId:v,params:T,nextConfig:C,parsedUrl:E,isDraftMode:q,prerenderManifest:I,routerServerContext:N,isOnDemandRevalidate:O,revalidateOnlyGenerated:P,resolvedPathname:S,clientReferenceManifest:M,serverActionsManifest:k}=i,A=(0,d.normalizeAppPath)(a),z=!!(I.dynamicRoutes[A]||I.routes[S]),$=async()=>((null==N?void 0:N.render404)?await N.render404(e,t,E,!1):t.end("This page could not be found"),null);if(z&&!q){let e=!!I.routes[S],t=I.dynamicRoutes[A];if(t&&!1===t.fallback&&!e){if(C.adapterPath)return await $();throw new g.NoFallbackError}}let _=null;!z||R.isDev||q||(_=S,_="/index"===_?"/":_);let j=!0===R.isDev||!z,D=z&&!j;k&&M&&(0,s.setManifestsSingleton)({page:a,clientReferenceManifest:M,serverActionsManifest:k});let U=e.method||"GET",F=(0,l.getTracer)(),H=F.getActiveScopeSpan(),W=!!(null==N?void 0:N.isWrappedByNextServer),B=!!(0,o.getRequestMeta)(e,"minimalMode"),K=(0,o.getRequestMeta)(e,"incrementalCache")||await R.getIncrementalCache(e,C,I,B);null==K||K.resetRequestCache(),globalThis.__incrementalCache=K;let V={params:T,previewProps:I.preview,renderOpts:{experimental:{authInterrupts:!!C.experimental.authInterrupts},cacheComponents:!!C.cacheComponents,supportsDynamicResponse:j,incrementalCache:K,cacheLifeProfiles:C.cacheLife,waitUntil:n.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,n,a,r)=>R.onRequestError(e,t,a,r,N)},sharedContext:{buildId:x,deploymentId:v}},L=new u.NodeNextRequest(e),G=new u.NodeNextResponse(t),X=c.NextRequestAdapter.fromNodeNextRequest(L,(0,c.signalFromNodeResponse)(t));try{let i,o=async e=>R.handle(X,V).finally(()=>{if(!e)return;e.setAttributes({"http.status_code":t.statusCode,"next.rsc":!1});let n=F.getRootSpanAttributes();if(!n)return;if(n.get("next.span_type")!==p.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${n.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let r=n.get("next.route");if(r){let t=`${U} ${r}`;e.setAttributes({"next.route":r,"http.route":r,"next.span_name":t}),e.updateName(t),i&&i!==e&&(i.setAttribute("http.route",r),i.updateName(t))}else e.updateName(`${U} ${a}`)}),s=async i=>{var l,s;let d=async({previousCacheEntry:r})=>{try{if(!B&&O&&P&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let a=await o(i);e.fetchMetrics=V.renderOpts.fetchMetrics;let l=V.renderOpts.pendingWaitUntil;l&&n.waitUntil&&(n.waitUntil(l),l=void 0);let s=V.renderOpts.collectedTags;if(!z)return await (0,h.sendResponse)(L,G,a,V.renderOpts.pendingWaitUntil),null;{let e=await a.blob(),t=(0,y.toNodeOutgoingHttpHeaders)(a.headers);s&&(t[b.NEXT_CACHE_TAGS_HEADER]=s),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let n=void 0!==V.renderOpts.collectedRevalidate&&!(V.renderOpts.collectedRevalidate>=b.INFINITE_CACHE)&&V.renderOpts.collectedRevalidate,r=void 0===V.renderOpts.collectedExpire||V.renderOpts.collectedExpire>=b.INFINITE_CACHE?void 0:V.renderOpts.collectedExpire;return{value:{kind:w.CachedRouteKind.APP_ROUTE,status:a.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:n,expire:r}}}}catch(t){throw(null==r?void 0:r.isStale)&&await R.onRequestError(e,t,{routerKind:"App Router",routePath:a,routeType:"route",revalidateReason:(0,m.getRevalidateReason)({isStaticGeneration:D,isOnDemandRevalidate:O})},!1,N),t}},u=await R.handleResponse({req:e,nextConfig:C,cacheKey:_,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:I,isRoutePPREnabled:!1,isOnDemandRevalidate:O,revalidateOnlyGenerated:P,responseGenerator:d,waitUntil:n.waitUntil,isMinimalMode:B});if(!z)return null;if((null==u||null==(l=u.value)?void 0:l.kind)!==w.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==u||null==(s=u.value)?void 0:s.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});B||t.setHeader("x-nextjs-cache",O?"REVALIDATED":u.isMiss?"MISS":u.isStale?"STALE":"HIT"),q&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let c=(0,y.fromNodeOutgoingHttpHeaders)(u.value.headers);return B&&z||c.delete(b.NEXT_CACHE_TAGS_HEADER),!u.cacheControl||t.getHeader("Cache-Control")||c.get("Cache-Control")||c.set("Cache-Control",(0,f.getCacheControlHeader)(u.cacheControl)),await (0,h.sendResponse)(L,G,new Response(u.value.body,{headers:c,status:u.value.status||200})),null};W&&H?await s(H):(i=F.getActiveScopeSpan(),await F.withPropagatedContext(e.headers,()=>F.trace(p.BaseServerSpan.handleRequest,{spanName:`${U} ${a}`,kind:l.SpanKind.SERVER,attributes:{"http.method":U,"http.target":e.url}},s),void 0,!W))}catch(t){if(t instanceof g.NoFallbackError||await R.onRequestError(e,t,{routerKind:"App Router",routePath:A,routeType:"route",revalidateReason:(0,m.getRevalidateReason)({isStaticGeneration:D,isOnDemandRevalidate:O})},!1,N),z)throw t;return await (0,h.sendResponse)(L,G,new Response(null,{status:500})),null}}e.s(["handler",0,T,"patchFetch",0,function(){return(0,i.patchFetch)({workAsyncStorage:C,workUnitAsyncStorage:E})},"routeModule",0,R,"serverHooks",0,q,"workAsyncStorage",0,C,"workUnitAsyncStorage",0,E]),n()}catch(e){n(e)}},!1),58502,e=>{e.v(t=>Promise.all(["server/chunks/[root-of-the-server]__1t2egm-._.js"].map(t=>e.l(t))).then(()=>t(51514)))}];
|
|
2
|
+
|
|
3
|
+
//# sourceMappingURL=%5Broot-of-the-server%5D__138pbmp._.js.map
|