vibedoc 1.5.0 → 1.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.next/BUILD_ID +1 -1
- package/.next/build-manifest.json +4 -4
- package/.next/prerender-manifest.json +11 -11
- package/.next/required-server-files.json +0 -4
- package/.next/server/app/(app)/activity/page/build-manifest.json +1 -1
- package/.next/server/app/(app)/activity/page.js.nft.json +1 -1
- package/.next/server/app/(app)/activity/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(app)/board/page/build-manifest.json +1 -1
- package/.next/server/app/(app)/board/page.js.nft.json +1 -1
- package/.next/server/app/(app)/board/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(app)/docs/page/build-manifest.json +1 -1
- package/.next/server/app/(app)/docs/page.js.nft.json +1 -1
- package/.next/server/app/(app)/docs/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(app)/explorer/page/build-manifest.json +1 -1
- package/.next/server/app/(app)/explorer/page.js.nft.json +1 -1
- package/.next/server/app/(app)/explorer/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(app)/memory/page/build-manifest.json +1 -1
- package/.next/server/app/(app)/memory/page.js.nft.json +1 -1
- package/.next/server/app/(app)/memory/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(app)/roadmap/page/build-manifest.json +1 -1
- package/.next/server/app/(app)/roadmap/page.js.nft.json +1 -1
- package/.next/server/app/(app)/roadmap/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(app)/settings/page/build-manifest.json +1 -1
- package/.next/server/app/(app)/settings/page.js.nft.json +1 -1
- package/.next/server/app/(app)/settings/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(app)/setup/page/build-manifest.json +1 -1
- package/.next/server/app/(app)/setup/page.js.nft.json +1 -1
- package/.next/server/app/(app)/setup/page_client-reference-manifest.js +1 -1
- package/.next/server/app/_global-error/page/build-manifest.json +1 -1
- package/.next/server/app/_global-error/page.js.nft.json +1 -1
- package/.next/server/app/_global-error.html +1 -1
- package/.next/server/app/_global-error.rsc +1 -1
- package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/_not-found/page/build-manifest.json +1 -1
- package/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/server/app/_not-found.html +1 -1
- package/.next/server/app/_not-found.rsc +2 -2
- package/.next/server/app/_not-found.segments/_full.segment.rsc +2 -2
- package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/activity.html +1 -1
- package/.next/server/app/activity.rsc +23 -22
- package/.next/server/app/activity.segments/!KGFwcCk/activity/__PAGE__.segment.rsc +5 -5
- package/.next/server/app/activity.segments/_full.segment.rsc +23 -22
- package/.next/server/app/activity.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/api/activity/route.js +3 -3
- package/.next/server/app/api/activity/route.js.nft.json +1 -1
- package/.next/server/app/api/backlinks/route.js +3 -3
- package/.next/server/app/api/backlinks/route.js.nft.json +1 -1
- package/.next/server/app/api/chat/route.js +3 -3
- package/.next/server/app/api/chat/route.js.nft.json +1 -1
- package/.next/server/app/api/context/route.js +3 -3
- package/.next/server/app/api/context/route.js.nft.json +1 -1
- package/.next/server/app/api/decisions/route.js +3 -3
- package/.next/server/app/api/decisions/route.js.nft.json +1 -1
- package/.next/server/app/api/docs/route.js +3 -3
- package/.next/server/app/api/docs/route.js.nft.json +1 -1
- package/.next/server/app/api/events/route.js.nft.json +1 -1
- package/.next/server/app/api/explorer/route.js +4 -3
- package/.next/server/app/api/explorer/route.js.nft.json +1 -1
- package/.next/server/app/api/mcp/route.js +4 -4
- package/.next/server/app/api/mcp/route.js.nft.json +1 -1
- package/.next/server/app/api/memory/route.js +3 -3
- package/.next/server/app/api/memory/route.js.nft.json +1 -1
- package/.next/server/app/api/plan/apply/route.js +4 -4
- package/.next/server/app/api/plan/apply/route.js.nft.json +1 -1
- package/.next/server/app/api/projects/route.js +3 -3
- package/.next/server/app/api/projects/route.js.nft.json +1 -1
- package/.next/server/app/api/registry/route.js +3 -3
- package/.next/server/app/api/registry/route.js.nft.json +1 -1
- package/.next/server/app/api/roadmap/create/route.js +4 -4
- package/.next/server/app/api/roadmap/create/route.js.nft.json +1 -1
- package/.next/server/app/api/roadmap/delete/route.js +4 -4
- package/.next/server/app/api/roadmap/delete/route.js.nft.json +1 -1
- package/.next/server/app/api/roadmap/generate/route.js +4 -4
- package/.next/server/app/api/roadmap/generate/route.js.nft.json +1 -1
- package/.next/server/app/api/roadmap/layout/route.js +4 -4
- package/.next/server/app/api/roadmap/layout/route.js.nft.json +1 -1
- package/.next/server/app/api/roadmap/route.js +3 -3
- package/.next/server/app/api/roadmap/route.js.nft.json +1 -1
- package/.next/server/app/api/roadmap/update/route.js +4 -4
- package/.next/server/app/api/roadmap/update/route.js.nft.json +1 -1
- package/.next/server/app/api/sessions/route.js +3 -3
- package/.next/server/app/api/sessions/route.js.nft.json +1 -1
- package/.next/server/app/api/settings/route.js +4 -4
- package/.next/server/app/api/settings/route.js.nft.json +1 -1
- package/.next/server/app/api/setup/generate/route.js +2 -2
- package/.next/server/app/api/setup/generate/route.js.nft.json +1 -1
- package/.next/server/app/api/setup/write/route.js +3 -3
- package/.next/server/app/api/setup/write/route.js.nft.json +1 -1
- package/.next/server/app/api/summary/route.js +3 -3
- package/.next/server/app/api/summary/route.js.nft.json +1 -1
- package/.next/server/app/api/tasks/create/route.js +3 -3
- package/.next/server/app/api/tasks/create/route.js.nft.json +1 -1
- package/.next/server/app/api/tasks/route.js +3 -3
- package/.next/server/app/api/tasks/route.js.nft.json +1 -1
- package/.next/server/app/board.html +1 -1
- package/.next/server/app/board.rsc +23 -21
- package/.next/server/app/board.segments/!KGFwcCk/board/__PAGE__.segment.rsc +5 -5
- package/.next/server/app/board.segments/_full.segment.rsc +23 -21
- package/.next/server/app/board.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/docs.html +1 -1
- package/.next/server/app/docs.rsc +27 -25
- package/.next/server/app/docs.segments/!KGFwcCk/docs/__PAGE__.segment.rsc +9 -10
- package/.next/server/app/docs.segments/_full.segment.rsc +27 -25
- package/.next/server/app/docs.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/explorer.html +1 -1
- package/.next/server/app/explorer.rsc +23 -22
- package/.next/server/app/explorer.segments/!KGFwcCk/explorer/__PAGE__.segment.rsc +5 -5
- package/.next/server/app/explorer.segments/_full.segment.rsc +23 -22
- package/.next/server/app/explorer.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/index.html +1 -1
- package/.next/server/app/index.rsc +2 -2
- package/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/index.segments/_full.segment.rsc +2 -2
- package/.next/server/app/index.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/memory.html +1 -1
- package/.next/server/app/memory.rsc +23 -22
- package/.next/server/app/memory.segments/!KGFwcCk/memory/__PAGE__.segment.rsc +5 -5
- package/.next/server/app/memory.segments/_full.segment.rsc +23 -22
- package/.next/server/app/memory.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/page/build-manifest.json +1 -1
- package/.next/server/app/page.js.nft.json +1 -1
- package/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/server/app/roadmap.html +1 -1
- package/.next/server/app/roadmap.rsc +26 -25
- package/.next/server/app/roadmap.segments/!KGFwcCk/roadmap/__PAGE__.segment.rsc +11 -9
- package/.next/server/app/roadmap.segments/_full.segment.rsc +26 -25
- package/.next/server/app/roadmap.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/settings.html +1 -1
- package/.next/server/app/settings.rsc +23 -22
- package/.next/server/app/settings.segments/!KGFwcCk/settings/__PAGE__.segment.rsc +5 -5
- package/.next/server/app/settings.segments/_full.segment.rsc +23 -22
- package/.next/server/app/settings.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/setup.html +1 -1
- package/.next/server/app/setup.rsc +23 -21
- package/.next/server/app/setup.segments/!KGFwcCk/setup/__PAGE__.segment.rsc +5 -5
- package/.next/server/app/setup.segments/_full.segment.rsc +23 -21
- package/.next/server/app/setup.segments/_tree.segment.rsc +2 -2
- package/.next/server/chunks/{11mp_@anthropic-ai_sdk_0-q4v32._.js → 11mp_@anthropic-ai_sdk_0-5bkpj._.js} +2 -2
- package/.next/server/chunks/{11mp_@anthropic-ai_sdk_05hfnhc._.js → 11mp_@anthropic-ai_sdk_00psb_y._.js} +2 -2
- package/.next/server/chunks/{11mp_@anthropic-ai_sdk_05dmim9._.js → 11mp_@anthropic-ai_sdk_01l5h3i._.js} +2 -2
- package/.next/server/chunks/{11mp_@anthropic-ai_sdk_07xtb0h._.js → 11mp_@anthropic-ai_sdk_072r2bd._.js} +2 -2
- package/.next/server/chunks/11mp_@anthropic-ai_sdk_0am8bw2._.js +3 -0
- package/.next/server/chunks/11mp_@anthropic-ai_sdk_0enefn6._.js +3 -0
- package/.next/server/chunks/11mp_@anthropic-ai_sdk_0k3n_5f._.js +3 -0
- package/.next/server/chunks/11mp_@anthropic-ai_sdk_0lcfjm4._.js +3 -0
- package/.next/server/chunks/11mp_@anthropic-ai_sdk_0lfx9av._.js +3 -0
- package/.next/server/chunks/11mp_@anthropic-ai_sdk_0qau3qw._.js +3 -0
- package/.next/server/chunks/11mp_@anthropic-ai_sdk_0r1pmvm._.js +3 -0
- package/.next/server/chunks/11mp_@anthropic-ai_sdk_11t-z2t._.js +3 -0
- package/.next/server/chunks/11mp_@anthropic-ai_sdk_15hyn79._.js +3 -0
- package/.next/server/chunks/11mp_@anthropic-ai_sdk_1_qk07x._.js +3 -0
- package/.next/server/chunks/11mp_@anthropic-ai_sdk_1b2929e._.js +3 -0
- package/.next/server/chunks/11mp_@anthropic-ai_sdk_1e72c89._.js +3 -0
- package/.next/server/chunks/11mp_@anthropic-ai_sdk_1eq7asn._.js +3 -0
- package/.next/server/chunks/11mp_@anthropic-ai_sdk_1fhdojs._.js +3 -0
- package/.next/server/chunks/11mp_@anthropic-ai_sdk_1lh_vwq._.js +3 -0
- package/.next/server/chunks/11mp_@anthropic-ai_sdk_1ludf-o._.js +3 -0
- package/.next/server/chunks/11mp_@anthropic-ai_sdk_1m3luz3._.js +3 -0
- package/.next/server/chunks/11mp_@anthropic-ai_sdk_1x1iz3d._.js +3 -0
- package/.next/server/chunks/11mp_@anthropic-ai_sdk_1xsmwlh._.js +3 -0
- package/.next/server/chunks/11mp_@anthropic-ai_sdk_202spah._.js +3 -0
- package/.next/server/chunks/11mp_@anthropic-ai_sdk_215hw9u._.js +3 -0
- package/.next/server/chunks/11mp_@anthropic-ai_sdk_index_mjs_0n-i0pd._.js +3 -0
- package/.next/server/chunks/11mp_@anthropic-ai_sdk_index_mjs_13pos4j._.js +3 -0
- package/.next/server/chunks/11mp_@anthropic-ai_sdk_index_mjs_17b4pqr._.js +3 -0
- package/.next/server/chunks/11mp_@anthropic-ai_sdk_index_mjs_1bkcmom._.js +3 -0
- package/.next/server/chunks/11mp_@anthropic-ai_sdk_index_mjs_1hlj_3l._.js +3 -0
- package/.next/server/chunks/11mp_@anthropic-ai_sdk_index_mjs_1ip-sor._.js +3 -0
- package/.next/server/chunks/11mp_@anthropic-ai_sdk_index_mjs_1pex5o1._.js +3 -0
- package/.next/server/chunks/11mp_@anthropic-ai_sdk_index_mjs_1s8lc8_._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__03upgv8._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__03upgv8._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__05l6129._.js +3 -0
- package/.next/server/chunks/{[root-of-the-server]__0u2rl0m._.js.map → [root-of-the-server]__05l6129._.js.map} +1 -1
- package/.next/server/chunks/[root-of-the-server]__06zf_sh._.js +3 -0
- package/.next/server/chunks/{[root-of-the-server]__01yk8oi._.js.map → [root-of-the-server]__06zf_sh._.js.map} +1 -1
- package/.next/server/chunks/[root-of-the-server]__093hlkh._.js +3 -0
- package/.next/server/chunks/{[root-of-the-server]__1337jpl._.js.map → [root-of-the-server]__093hlkh._.js.map} +1 -1
- package/.next/server/chunks/[root-of-the-server]__0aynzrb._.js +3 -0
- package/.next/server/chunks/{[root-of-the-server]__0b49g9i._.js.map → [root-of-the-server]__0aynzrb._.js.map} +1 -1
- package/.next/server/chunks/[root-of-the-server]__0e59y5j._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0eqd-tw._.js +3 -0
- package/.next/server/chunks/{[root-of-the-server]__0yd6wlm._.js.map → [root-of-the-server]__0eqd-tw._.js.map} +1 -1
- package/.next/server/chunks/[root-of-the-server]__0nfvvy9._.js +3 -0
- package/.next/server/chunks/{[root-of-the-server]__0j-xjbf._.js.map → [root-of-the-server]__0nfvvy9._.js.map} +1 -1
- package/.next/server/chunks/{[root-of-the-server]__03t5uqz._.js → [root-of-the-server]__0qac4k0._.js} +2 -2
- package/.next/server/chunks/{[root-of-the-server]__03t5uqz._.js.map → [root-of-the-server]__0qac4k0._.js.map} +1 -1
- package/.next/server/chunks/[root-of-the-server]__106gpvh._.js +3 -0
- package/.next/server/chunks/{[root-of-the-server]__0kaegk7._.js.map → [root-of-the-server]__106gpvh._.js.map} +1 -1
- package/.next/server/chunks/[root-of-the-server]__11s-8eg._.js +3 -0
- package/.next/server/chunks/{[root-of-the-server]__02k1gkk._.js.map → [root-of-the-server]__11s-8eg._.js.map} +1 -1
- package/.next/server/chunks/[root-of-the-server]__11s76m8._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__142icjb._.js +3 -0
- package/.next/server/chunks/{[root-of-the-server]__1yow6hw._.js.map → [root-of-the-server]__142icjb._.js.map} +1 -1
- package/.next/server/chunks/[root-of-the-server]__14aeqoi._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__14aeqoi._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__1613hjb._.js +88 -0
- package/.next/server/chunks/[root-of-the-server]__1613hjb._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__169hmq_._.js +10 -0
- package/.next/server/chunks/{[root-of-the-server]__0d4jkve._.js.map → [root-of-the-server]__169hmq_._.js.map} +1 -1
- package/.next/server/chunks/[root-of-the-server]__17p0rkn._.js +3 -0
- package/.next/server/chunks/{[root-of-the-server]__0v8x64y._.js.map → [root-of-the-server]__17p0rkn._.js.map} +1 -1
- package/.next/server/chunks/[root-of-the-server]__17xb02p._.js +3 -0
- package/.next/server/chunks/{[root-of-the-server]__0zybyuh._.js.map → [root-of-the-server]__17xb02p._.js.map} +1 -1
- package/.next/server/chunks/[root-of-the-server]__18kxo4a._.js +3 -0
- package/.next/server/chunks/{[root-of-the-server]__1znbm9i._.js.map → [root-of-the-server]__18kxo4a._.js.map} +1 -1
- package/.next/server/chunks/[root-of-the-server]__1c55c2q._.js +3 -0
- package/.next/server/chunks/{[root-of-the-server]__0l3voov._.js.map → [root-of-the-server]__1c55c2q._.js.map} +1 -1
- package/.next/server/chunks/[root-of-the-server]__1j0rrps._.js +3 -0
- package/.next/server/chunks/{[root-of-the-server]__0635d15._.js.map → [root-of-the-server]__1j0rrps._.js.map} +1 -1
- package/.next/server/chunks/[root-of-the-server]__1lj_2cv._.js +3 -0
- package/.next/server/chunks/{[root-of-the-server]__0qsx33x._.js.map → [root-of-the-server]__1lj_2cv._.js.map} +1 -1
- package/.next/server/chunks/[root-of-the-server]__1o4a-4j._.js +3 -0
- package/.next/server/chunks/{[root-of-the-server]__1vaownn._.js.map → [root-of-the-server]__1o4a-4j._.js.map} +1 -1
- package/.next/server/chunks/[root-of-the-server]__1q4ahvz._.js +3 -0
- package/.next/server/chunks/{[root-of-the-server]__1hsybai._.js.map → [root-of-the-server]__1q4ahvz._.js.map} +1 -1
- package/.next/server/chunks/{[root-of-the-server]__1337jpl._.js → [root-of-the-server]__1u_q61h._.js} +2 -2
- package/.next/server/chunks/{[root-of-the-server]__0kkefbq._.js.map → [root-of-the-server]__1u_q61h._.js.map} +1 -1
- package/.next/server/chunks/[root-of-the-server]__1wr0m-s._.js +3 -0
- package/.next/server/chunks/{[root-of-the-server]__0-rjzmv._.js.map → [root-of-the-server]__1wr0m-s._.js.map} +1 -1
- package/.next/server/chunks/[root-of-the-server]__1xb0fmp._.js +3 -0
- package/.next/server/chunks/{[root-of-the-server]__15suc44._.js.map → [root-of-the-server]__1xb0fmp._.js.map} +1 -1
- package/.next/server/chunks/{[root-of-the-server]__1hsybai._.js → [root-of-the-server]__1y-tt29._.js} +2 -2
- package/.next/server/chunks/{[root-of-the-server]__0af0ma6._.js.map → [root-of-the-server]__1y-tt29._.js.map} +1 -1
- package/.next/server/chunks/[root-of-the-server]__1y3u5ud._.js +3 -0
- package/.next/server/chunks/{[root-of-the-server]__0xqsv4h._.js.map → [root-of-the-server]__1y3u5ud._.js.map} +1 -1
- package/.next/server/chunks/[turbopack]_runtime.js +0 -132
- package/.next/server/chunks/[turbopack]_runtime.js.map +4 -5
- package/.next/server/chunks/_04byth9._.js +34 -0
- package/.next/server/chunks/_04byth9._.js.map +1 -0
- package/.next/server/chunks/_1au4syj._.js +1 -1
- package/.next/server/chunks/_1au4syj._.js.map +1 -1
- package/.next/server/chunks/_1b5fqxy._.js +3 -0
- package/.next/server/chunks/_1b5fqxy._.js.map +1 -0
- package/.next/server/chunks/_1si7nb_._.js +8 -8
- package/.next/server/chunks/_1si7nb_._.js.map +1 -1
- package/.next/server/chunks/ssr/{0_nd_mermaid_dist_mermaid_core_mjs_10jvzv6._.js → 0_nd_mermaid_dist_mermaid_core_mjs_1vulg1x._.js} +2 -2
- package/.next/server/chunks/ssr/{1u84_katex_dist_katex_mjs_05prlqa._.js → 1u84_katex_dist_katex_mjs_0mwkb-i._.js} +1 -1
- package/.next/server/chunks/ssr/1x05_lucide-react_dist_esm_icons_08ca0b4._.js +3 -0
- package/.next/server/chunks/ssr/1x05_lucide-react_dist_esm_icons_08ca0b4._.js.map +1 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0xt_0w2._.js.map +1 -1
- package/.next/server/chunks/ssr/[turbopack]_runtime.js +0 -132
- package/.next/server/chunks/ssr/[turbopack]_runtime.js.map +4 -5
- package/.next/server/chunks/ssr/_04xff_2._.js +1 -1
- package/.next/server/chunks/ssr/_04xff_2._.js.map +1 -1
- package/.next/server/chunks/ssr/_0qyglif._.js +2 -2
- package/.next/server/chunks/ssr/_0qyglif._.js.map +1 -1
- package/.next/server/chunks/ssr/_0skuoxv._.js +3 -1
- package/.next/server/chunks/ssr/_0skuoxv._.js.map +1 -1
- package/.next/server/chunks/ssr/{_1alz6n5._.js → _14i_6yb._.js} +2 -2
- package/.next/server/chunks/ssr/_14i_6yb._.js.map +1 -0
- package/.next/server/chunks/ssr/_1c95ems._.js +1 -1
- package/.next/server/chunks/ssr/_1c95ems._.js.map +1 -1
- package/.next/server/chunks/ssr/{_1s08bv8._.js → _1cbhuz4._.js} +2 -2
- package/.next/server/chunks/ssr/_1cbhuz4._.js.map +1 -0
- package/.next/server/chunks/ssr/_1ewk_mn._.js +3 -0
- package/.next/server/chunks/ssr/_1ewk_mn._.js.map +1 -0
- package/.next/server/chunks/ssr/_1y-ofyw._.js +3 -0
- package/.next/server/chunks/ssr/_1y-ofyw._.js.map +1 -0
- package/.next/server/chunks/ssr/{node_modules__pnpm_08em703._.js → node_modules__pnpm_0--x5-5._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules__pnpm_1gqkoe3._.js → node_modules__pnpm_00i3mh2._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules__pnpm_1kngagu._.js → node_modules__pnpm_00wjhj4._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules__pnpm_12s6q4d._.js → node_modules__pnpm_042y3e-._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules__pnpm_0wnlgm-._.js → node_modules__pnpm_04xoqd9._.js} +2 -2
- package/.next/server/chunks/ssr/{node_modules__pnpm_1hw4h9e._.js → node_modules__pnpm_07j8gcu._.js} +1 -1
- package/.next/server/chunks/ssr/node_modules__pnpm_0bmkw6o._.js +3 -0
- package/.next/server/chunks/ssr/node_modules__pnpm_0bmkw6o._.js.map +1 -0
- package/.next/server/chunks/ssr/{node_modules__pnpm_1jfqun_._.js → node_modules__pnpm_0cj37c-._.js} +1 -1
- package/.next/server/chunks/ssr/node_modules__pnpm_0cj37c-._.js.map +1 -0
- package/.next/server/chunks/ssr/{node_modules__pnpm_0_z3_bl._.js → node_modules__pnpm_0fk-8nl._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules__pnpm_20tdqv_._.js → node_modules__pnpm_0kna82c._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules__pnpm_0e15nhj._.js → node_modules__pnpm_0ma8hho._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules__pnpm_0rd-a9g._.js → node_modules__pnpm_0nbxdp_._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules__pnpm_0baie09._.js → node_modules__pnpm_0p10j87._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules__pnpm_1ad2q27._.js → node_modules__pnpm_0w9uewb._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules__pnpm_0e3u5g-._.js → node_modules__pnpm_0yixxj2._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules__pnpm_1ly58kw._.js → node_modules__pnpm_1-poetj._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules__pnpm_1u8p2h3._.js → node_modules__pnpm_11lluiq._.js} +2 -2
- package/.next/server/chunks/ssr/{node_modules__pnpm_1f3lm9p._.js → node_modules__pnpm_17o8zbz._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules__pnpm_1moe8b6._.js → node_modules__pnpm_18pu1wl._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules__pnpm_1h890n6._.js → node_modules__pnpm_19ejwjv._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules__pnpm_1o3_0-n._.js → node_modules__pnpm_19ys1iv._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules__pnpm_0i0uccx._.js → node_modules__pnpm_1_34wt2._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules__pnpm_0jhh7p5._.js → node_modules__pnpm_1a3fo7j._.js} +2 -2
- package/.next/server/chunks/ssr/{node_modules__pnpm_1gtgu48._.js → node_modules__pnpm_1l-posw._.js} +2 -2
- package/.next/server/chunks/ssr/{node_modules__pnpm_07_kgbe._.js → node_modules__pnpm_1o30a9w._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules__pnpm_1_o0jyk._.js → node_modules__pnpm_1r4w_7k._.js} +2 -2
- package/.next/server/chunks/ssr/{node_modules__pnpm_1zu-9we._.js → node_modules__pnpm_1xolwvc._.js} +2 -2
- package/.next/server/chunks/ssr/{node_modules__pnpm_0ns_6dd._.js → node_modules__pnpm_1zsbfem._.js} +1 -1
- package/.next/server/chunks/ssr/src_app_(app)_settings_page_tsx_0zevtee._.js +2 -2
- package/.next/server/chunks/ssr/src_app_(app)_settings_page_tsx_0zevtee._.js.map +1 -1
- package/.next/server/chunks/ssr/src_components_008q3v8._.js +3 -0
- package/.next/server/chunks/ssr/src_components_008q3v8._.js.map +1 -0
- package/.next/server/middleware-build-manifest.js +4 -4
- package/.next/server/pages/404.html +1 -1
- package/.next/server/pages/500.html +1 -1
- package/.next/server/server-reference-manifest.js +1 -1
- package/.next/server/server-reference-manifest.json +1 -1
- package/.next/static/chunks/0-vk2d2nnzav2.js +3 -0
- package/.next/static/chunks/0eggcu0ovk8sd.js +68 -0
- package/.next/static/chunks/{145g20k60txhc.js → 0iva6rdtfqpbz.js} +1 -1
- package/.next/static/chunks/0qm101bdsxdyh.css +10 -0
- package/.next/static/chunks/0wg9n5zb8mo2p.js +1 -0
- package/.next/static/chunks/0z_y7el6m76yk.js +1 -0
- package/.next/static/chunks/1-ekntoveuxzd.js +4 -0
- package/.next/static/chunks/10neasnz6hhq1.js +1 -0
- package/.next/static/chunks/1r7z33e9jk3vp.js +1 -0
- package/.next/static/chunks/{2f7yju8yks2m9.js → 1xyepk9227yej.js} +6 -73
- package/.next/static/chunks/22dw7r8x0h2sx.js +1 -0
- package/.next/static/chunks/26ee8jsbellqk.js +21 -0
- package/.next/static/chunks/{0aiy7o5bsiixt.js → 3kkg030rcpz7l.js} +1 -1
- package/.next/static/chunks/3pf_4ye6ju8gt.js +1 -0
- package/.next/static/chunks/turbopack-2qsbj8zx38t0j.js +1 -0
- package/README.md +2 -0
- package/next.config.js +4 -7
- package/package.json +1 -1
- package/skills/epic-breakdown/SKILL.md +11 -1
- package/.next/server/chunks/11mp_@anthropic-ai_sdk_0fw_tls._.js +0 -3
- package/.next/server/chunks/11mp_@anthropic-ai_sdk_0q6tm_c._.js +0 -3
- package/.next/server/chunks/11mp_@anthropic-ai_sdk_0qyh79u._.js +0 -3
- package/.next/server/chunks/11mp_@anthropic-ai_sdk_0rfkb6q._.js +0 -3
- package/.next/server/chunks/11mp_@anthropic-ai_sdk_0x1yqfb._.js +0 -3
- package/.next/server/chunks/11mp_@anthropic-ai_sdk_0yt3ewg._.js +0 -3
- package/.next/server/chunks/11mp_@anthropic-ai_sdk_1-kttjy._.js +0 -3
- package/.next/server/chunks/11mp_@anthropic-ai_sdk_12h8gza._.js +0 -3
- package/.next/server/chunks/11mp_@anthropic-ai_sdk_18c2w1i._.js +0 -3
- package/.next/server/chunks/11mp_@anthropic-ai_sdk_18fnlqa._.js +0 -3
- package/.next/server/chunks/11mp_@anthropic-ai_sdk_19on0yg._.js +0 -3
- package/.next/server/chunks/11mp_@anthropic-ai_sdk_1alh48t._.js +0 -3
- package/.next/server/chunks/11mp_@anthropic-ai_sdk_1ck56ir._.js +0 -3
- package/.next/server/chunks/11mp_@anthropic-ai_sdk_1daia98._.js +0 -3
- package/.next/server/chunks/11mp_@anthropic-ai_sdk_1f6snvo._.js +0 -3
- package/.next/server/chunks/11mp_@anthropic-ai_sdk_1p6s626._.js +0 -3
- package/.next/server/chunks/11mp_@anthropic-ai_sdk_1ps921l._.js +0 -3
- package/.next/server/chunks/11mp_@anthropic-ai_sdk_1rqxfdf._.js +0 -3
- package/.next/server/chunks/11mp_@anthropic-ai_sdk_1s7maye._.js +0 -3
- package/.next/server/chunks/11mp_@anthropic-ai_sdk_1vuy6_x._.js +0 -3
- package/.next/server/chunks/11mp_@anthropic-ai_sdk_1xv39eu._.js +0 -3
- package/.next/server/chunks/11mp_@anthropic-ai_sdk_index_mjs_078qkb6._.js +0 -3
- package/.next/server/chunks/11mp_@anthropic-ai_sdk_index_mjs_0q7-hjh._.js +0 -3
- package/.next/server/chunks/11mp_@anthropic-ai_sdk_index_mjs_165bzk6._.js +0 -3
- package/.next/server/chunks/11mp_@anthropic-ai_sdk_index_mjs_1hfbfb5._.js +0 -3
- package/.next/server/chunks/11mp_@anthropic-ai_sdk_index_mjs_1sa-8tw._.js +0 -3
- package/.next/server/chunks/11mp_@anthropic-ai_sdk_index_mjs_1xq_gof._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0-rjzmv._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__01yk8oi._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__02k1gkk._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0635d15._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0af0ma6._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0b49g9i._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0d4jkve._.js +0 -10
- package/.next/server/chunks/[root-of-the-server]__0j-xjbf._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0kaegk7._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0kkefbq._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0l3voov._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0qsx33x._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0sc44r6._.js +0 -86
- package/.next/server/chunks/[root-of-the-server]__0sc44r6._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__0u2rl0m._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0uk0tga._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0v8x64y._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0xqsv4h._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0yd6wlm._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0zybyuh._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__134sb3d._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__134sb3d._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__15suc44._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1jeqjz6._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1kfohrq._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1mz21a2._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1mz21a2._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__1vaownn._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1yow6hw._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1znbm9i._.js +0 -3
- package/.next/server/chunks/_0csymdc._.js +0 -34
- package/.next/server/chunks/_0csymdc._.js.map +0 -1
- package/.next/server/chunks/_1f1rssd._.js +0 -3
- package/.next/server/chunks/_1f1rssd._.js.map +0 -1
- package/.next/server/chunks/ssr/1x05_lucide-react_dist_esm_icons_1v0h3_3._.js +0 -3
- package/.next/server/chunks/ssr/1x05_lucide-react_dist_esm_icons_1v0h3_3._.js.map +0 -1
- package/.next/server/chunks/ssr/_0v7muti._.js +0 -3
- package/.next/server/chunks/ssr/_0v7muti._.js.map +0 -1
- package/.next/server/chunks/ssr/_1a9mqm1._.js +0 -3
- package/.next/server/chunks/ssr/_1a9mqm1._.js.map +0 -1
- package/.next/server/chunks/ssr/_1alz6n5._.js.map +0 -1
- package/.next/server/chunks/ssr/_1s08bv8._.js.map +0 -1
- package/.next/server/chunks/ssr/node_modules__pnpm_051nq8c._.js +0 -3
- package/.next/server/chunks/ssr/node_modules__pnpm_051nq8c._.js.map +0 -1
- package/.next/server/chunks/ssr/src_components_0wg3bi2._.js +0 -3
- package/.next/server/chunks/ssr/src_components_0wg3bi2._.js.map +0 -1
- package/.next/static/chunks/05qw7-fs1exlt.js +0 -1
- package/.next/static/chunks/0_vu3y1bvg843.js +0 -1
- package/.next/static/chunks/0fvzbdfwiu4a2.js +0 -1
- package/.next/static/chunks/14ewdzt8piprq.js +0 -1
- package/.next/static/chunks/1g6fxjtlpv6p5.js +0 -1
- package/.next/static/chunks/1lfr973ckp6by.js +0 -3
- package/.next/static/chunks/2-faknwci76np.js +0 -21
- package/.next/static/chunks/2g08tblvdp0t_.js +0 -2
- package/.next/static/chunks/2gdlf-xhbpc75.css +0 -10
- package/.next/static/chunks/2xu8bb_0152j-.js +0 -1
- package/.next/static/chunks/turbopack-181pehyg9iyaw.js +0 -1
- /package/.next/server/chunks/{11mp_@anthropic-ai_sdk_0-q4v32._.js.map → 11mp_@anthropic-ai_sdk_0-5bkpj._.js.map} +0 -0
- /package/.next/server/chunks/{11mp_@anthropic-ai_sdk_05dmim9._.js.map → 11mp_@anthropic-ai_sdk_00psb_y._.js.map} +0 -0
- /package/.next/server/chunks/{11mp_@anthropic-ai_sdk_05hfnhc._.js.map → 11mp_@anthropic-ai_sdk_01l5h3i._.js.map} +0 -0
- /package/.next/server/chunks/{11mp_@anthropic-ai_sdk_07xtb0h._.js.map → 11mp_@anthropic-ai_sdk_072r2bd._.js.map} +0 -0
- /package/.next/server/chunks/{11mp_@anthropic-ai_sdk_0fw_tls._.js.map → 11mp_@anthropic-ai_sdk_0am8bw2._.js.map} +0 -0
- /package/.next/server/chunks/{11mp_@anthropic-ai_sdk_0q6tm_c._.js.map → 11mp_@anthropic-ai_sdk_0enefn6._.js.map} +0 -0
- /package/.next/server/chunks/{11mp_@anthropic-ai_sdk_0qyh79u._.js.map → 11mp_@anthropic-ai_sdk_0k3n_5f._.js.map} +0 -0
- /package/.next/server/chunks/{11mp_@anthropic-ai_sdk_0rfkb6q._.js.map → 11mp_@anthropic-ai_sdk_0lcfjm4._.js.map} +0 -0
- /package/.next/server/chunks/{11mp_@anthropic-ai_sdk_0x1yqfb._.js.map → 11mp_@anthropic-ai_sdk_0lfx9av._.js.map} +0 -0
- /package/.next/server/chunks/{11mp_@anthropic-ai_sdk_0yt3ewg._.js.map → 11mp_@anthropic-ai_sdk_0qau3qw._.js.map} +0 -0
- /package/.next/server/chunks/{11mp_@anthropic-ai_sdk_1-kttjy._.js.map → 11mp_@anthropic-ai_sdk_0r1pmvm._.js.map} +0 -0
- /package/.next/server/chunks/{11mp_@anthropic-ai_sdk_12h8gza._.js.map → 11mp_@anthropic-ai_sdk_11t-z2t._.js.map} +0 -0
- /package/.next/server/chunks/{11mp_@anthropic-ai_sdk_18c2w1i._.js.map → 11mp_@anthropic-ai_sdk_15hyn79._.js.map} +0 -0
- /package/.next/server/chunks/{11mp_@anthropic-ai_sdk_18fnlqa._.js.map → 11mp_@anthropic-ai_sdk_1_qk07x._.js.map} +0 -0
- /package/.next/server/chunks/{11mp_@anthropic-ai_sdk_19on0yg._.js.map → 11mp_@anthropic-ai_sdk_1b2929e._.js.map} +0 -0
- /package/.next/server/chunks/{11mp_@anthropic-ai_sdk_1alh48t._.js.map → 11mp_@anthropic-ai_sdk_1e72c89._.js.map} +0 -0
- /package/.next/server/chunks/{11mp_@anthropic-ai_sdk_1ck56ir._.js.map → 11mp_@anthropic-ai_sdk_1eq7asn._.js.map} +0 -0
- /package/.next/server/chunks/{11mp_@anthropic-ai_sdk_1daia98._.js.map → 11mp_@anthropic-ai_sdk_1fhdojs._.js.map} +0 -0
- /package/.next/server/chunks/{11mp_@anthropic-ai_sdk_1f6snvo._.js.map → 11mp_@anthropic-ai_sdk_1lh_vwq._.js.map} +0 -0
- /package/.next/server/chunks/{11mp_@anthropic-ai_sdk_1p6s626._.js.map → 11mp_@anthropic-ai_sdk_1ludf-o._.js.map} +0 -0
- /package/.next/server/chunks/{11mp_@anthropic-ai_sdk_1ps921l._.js.map → 11mp_@anthropic-ai_sdk_1m3luz3._.js.map} +0 -0
- /package/.next/server/chunks/{11mp_@anthropic-ai_sdk_1rqxfdf._.js.map → 11mp_@anthropic-ai_sdk_1x1iz3d._.js.map} +0 -0
- /package/.next/server/chunks/{11mp_@anthropic-ai_sdk_1s7maye._.js.map → 11mp_@anthropic-ai_sdk_1xsmwlh._.js.map} +0 -0
- /package/.next/server/chunks/{11mp_@anthropic-ai_sdk_1vuy6_x._.js.map → 11mp_@anthropic-ai_sdk_202spah._.js.map} +0 -0
- /package/.next/server/chunks/{11mp_@anthropic-ai_sdk_1xv39eu._.js.map → 11mp_@anthropic-ai_sdk_215hw9u._.js.map} +0 -0
- /package/.next/server/chunks/{11mp_@anthropic-ai_sdk_index_mjs_078qkb6._.js.map → 11mp_@anthropic-ai_sdk_index_mjs_0n-i0pd._.js.map} +0 -0
- /package/.next/server/chunks/{11mp_@anthropic-ai_sdk_index_mjs_0q7-hjh._.js.map → 11mp_@anthropic-ai_sdk_index_mjs_13pos4j._.js.map} +0 -0
- /package/.next/server/chunks/{11mp_@anthropic-ai_sdk_index_mjs_165bzk6._.js.map → 11mp_@anthropic-ai_sdk_index_mjs_17b4pqr._.js.map} +0 -0
- /package/.next/server/chunks/{11mp_@anthropic-ai_sdk_index_mjs_1hfbfb5._.js.map → 11mp_@anthropic-ai_sdk_index_mjs_1bkcmom._.js.map} +0 -0
- /package/.next/server/chunks/{11mp_@anthropic-ai_sdk_index_mjs_1sa-8tw._.js.map → 11mp_@anthropic-ai_sdk_index_mjs_1hlj_3l._.js.map} +0 -0
- /package/.next/server/chunks/{11mp_@anthropic-ai_sdk_index_mjs_1xq_gof._.js.map → 11mp_@anthropic-ai_sdk_index_mjs_1ip-sor._.js.map} +0 -0
- /package/.next/server/chunks/{[root-of-the-server]__0uk0tga._.js.map → 11mp_@anthropic-ai_sdk_index_mjs_1pex5o1._.js.map} +0 -0
- /package/.next/server/chunks/{[root-of-the-server]__1jeqjz6._.js.map → 11mp_@anthropic-ai_sdk_index_mjs_1s8lc8_._.js.map} +0 -0
- /package/.next/server/chunks/{[root-of-the-server]__1kfohrq._.js.map → [root-of-the-server]__0e59y5j._.js.map} +0 -0
- /package/.next/server/chunks/{ssr/0_nd_mermaid_dist_mermaid_core_mjs_10jvzv6._.js.map → [root-of-the-server]__11s76m8._.js.map} +0 -0
- /package/.next/server/chunks/ssr/{1u84_katex_dist_katex_mjs_05prlqa._.js.map → 0_nd_mermaid_dist_mermaid_core_mjs_1vulg1x._.js.map} +0 -0
- /package/.next/server/chunks/ssr/{node_modules__pnpm_08em703._.js.map → 1u84_katex_dist_katex_mjs_0mwkb-i._.js.map} +0 -0
- /package/.next/server/chunks/ssr/{node_modules__pnpm_0wnlgm-._.js.map → node_modules__pnpm_0--x5-5._.js.map} +0 -0
- /package/.next/server/chunks/ssr/{node_modules__pnpm_1gqkoe3._.js.map → node_modules__pnpm_00i3mh2._.js.map} +0 -0
- /package/.next/server/chunks/ssr/{node_modules__pnpm_1kngagu._.js.map → node_modules__pnpm_00wjhj4._.js.map} +0 -0
- /package/.next/server/chunks/ssr/{node_modules__pnpm_12s6q4d._.js.map → node_modules__pnpm_042y3e-._.js.map} +0 -0
- /package/.next/server/chunks/ssr/{node_modules__pnpm_1jfqun_._.js.map → node_modules__pnpm_04xoqd9._.js.map} +0 -0
- /package/.next/server/chunks/ssr/{node_modules__pnpm_1hw4h9e._.js.map → node_modules__pnpm_07j8gcu._.js.map} +0 -0
- /package/.next/server/chunks/ssr/{node_modules__pnpm_0_z3_bl._.js.map → node_modules__pnpm_0fk-8nl._.js.map} +0 -0
- /package/.next/server/chunks/ssr/{node_modules__pnpm_20tdqv_._.js.map → node_modules__pnpm_0kna82c._.js.map} +0 -0
- /package/.next/server/chunks/ssr/{node_modules__pnpm_0e15nhj._.js.map → node_modules__pnpm_0ma8hho._.js.map} +0 -0
- /package/.next/server/chunks/ssr/{node_modules__pnpm_0rd-a9g._.js.map → node_modules__pnpm_0nbxdp_._.js.map} +0 -0
- /package/.next/server/chunks/ssr/{node_modules__pnpm_0baie09._.js.map → node_modules__pnpm_0p10j87._.js.map} +0 -0
- /package/.next/server/chunks/ssr/{node_modules__pnpm_1ad2q27._.js.map → node_modules__pnpm_0w9uewb._.js.map} +0 -0
- /package/.next/server/chunks/ssr/{node_modules__pnpm_0e3u5g-._.js.map → node_modules__pnpm_0yixxj2._.js.map} +0 -0
- /package/.next/server/chunks/ssr/{node_modules__pnpm_1ly58kw._.js.map → node_modules__pnpm_1-poetj._.js.map} +0 -0
- /package/.next/server/chunks/ssr/{node_modules__pnpm_1u8p2h3._.js.map → node_modules__pnpm_11lluiq._.js.map} +0 -0
- /package/.next/server/chunks/ssr/{node_modules__pnpm_1f3lm9p._.js.map → node_modules__pnpm_17o8zbz._.js.map} +0 -0
- /package/.next/server/chunks/ssr/{node_modules__pnpm_1moe8b6._.js.map → node_modules__pnpm_18pu1wl._.js.map} +0 -0
- /package/.next/server/chunks/ssr/{node_modules__pnpm_1h890n6._.js.map → node_modules__pnpm_19ejwjv._.js.map} +0 -0
- /package/.next/server/chunks/ssr/{node_modules__pnpm_1o3_0-n._.js.map → node_modules__pnpm_19ys1iv._.js.map} +0 -0
- /package/.next/server/chunks/ssr/{node_modules__pnpm_0i0uccx._.js.map → node_modules__pnpm_1_34wt2._.js.map} +0 -0
- /package/.next/server/chunks/ssr/{node_modules__pnpm_0jhh7p5._.js.map → node_modules__pnpm_1a3fo7j._.js.map} +0 -0
- /package/.next/server/chunks/ssr/{node_modules__pnpm_1gtgu48._.js.map → node_modules__pnpm_1l-posw._.js.map} +0 -0
- /package/.next/server/chunks/ssr/{node_modules__pnpm_07_kgbe._.js.map → node_modules__pnpm_1o30a9w._.js.map} +0 -0
- /package/.next/server/chunks/ssr/{node_modules__pnpm_1_o0jyk._.js.map → node_modules__pnpm_1r4w_7k._.js.map} +0 -0
- /package/.next/server/chunks/ssr/{node_modules__pnpm_1zu-9we._.js.map → node_modules__pnpm_1xolwvc._.js.map} +0 -0
- /package/.next/server/chunks/ssr/{node_modules__pnpm_0ns_6dd._.js.map → node_modules__pnpm_1zsbfem._.js.map} +0 -0
- /package/.next/static/{cmDLf8WOU5PVmUOcSPh2H → gJtrYenzL6_deB-6pdvIL}/_buildManifest.js +0 -0
- /package/.next/static/{cmDLf8WOU5PVmUOcSPh2H → gJtrYenzL6_deB-6pdvIL}/_clientMiddlewareManifest.js +0 -0
- /package/.next/static/{cmDLf8WOU5PVmUOcSPh2H → gJtrYenzL6_deB-6pdvIL}/_ssgManifest.js +0 -0
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
module.exports=[233405,(e,t,r)=>{t.exports=e.x("child_process",()=>require("child_process"))},270406,(e,t,r)=>{t.exports=e.x("next/dist/compiled/@opentelemetry/api",()=>require("next/dist/compiled/@opentelemetry/api"))},918622,(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"))},556704,(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"))},832319,(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"))},559043,(e,t,r)=>{t.exports=e.x("next/dist/server/runtime-reacts.external.js",()=>require("next/dist/server/runtime-reacts.external.js"))},193695,(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"))},902157,(e,t,r)=>{t.exports=e.x("node:fs",()=>require("node:fs"))},912714,(e,t,r)=>{t.exports=e.x("node:fs/promises",()=>require("node:fs/promises"))},750227,(e,t,r)=>{t.exports=e.x("node:path",()=>require("node:path"))},81111,(e,t,r)=>{t.exports=e.x("node:stream",()=>require("node:stream"))},814747,(e,t,r)=>{t.exports=e.x("path",()=>require("path"))},1351,e=>{"use strict";var t=e.i(233405),r=e.i(799501);let a=`You are the VibeDoc assistant, embedded in a docs/kanban web UI.
|
|
2
|
+
You can only act through the vibedoc_* MCP tools. To edit a doc: read it with vibedoc_read_doc,
|
|
3
|
+
then call vibedoc_propose_edit with only the spans that change (old_string → new_string), never the
|
|
4
|
+
whole file. The user reviews a diff and accepts or rejects it, so never claim an edit is applied until they say so.
|
|
5
|
+
For requests to plan a roadmap or break an epic into tasks, first call vibedoc_get_planning_guide and follow it.
|
|
6
|
+
Paths are relative to the project root. Keep replies short and answer in the user's language.`;async function n(e){let n=e.nextUrl.searchParams.get("root")||(0,r.getConfiguredRoot)(),{message:o,sessionId:s,docPath:i}=await e.json();if("string"!=typeof o||!o.trim())return Response.json({error:"message is required"},{status:400});let l=["-p",i?`[Currently open doc: ${i}]
|
|
7
|
+
|
|
8
|
+
${o}`:o,"--output-format","stream-json","--verbose","--include-partial-messages","--mcp-config",JSON.stringify({mcpServers:{vibedoc:{type:"http",url:`${e.nextUrl.origin}/api/mcp?root=${encodeURIComponent(n)}`}}}),"--strict-mcp-config","--tools","","--allowedTools","mcp__vibedoc__*","--disallowedTools","mcp__vibedoc__vibedoc_write_doc","mcp__vibedoc__vibedoc_append_doc","mcp__vibedoc__vibedoc_delete_doc","mcp__vibedoc__vibedoc_create_roadmap_item","--setting-sources","","--disable-slash-commands","--append-system-prompt",a];"string"==typeof s&&s&&l.push("--resume",s);let d={...process.env};delete d.ANTHROPIC_API_KEY;let p=new TextEncoder;return new Response(new ReadableStream({start(r){let a=(0,t.spawn)("claude",l,{cwd:n,env:d,stdio:["ignore","pipe","pipe"]}),o="",s=!1,i=e=>{s||r.enqueue(p.encode(e))},c=()=>{s||(s=!0,r.close())},u=e=>i(JSON.stringify({type:"error",message:e})+"\n");a.stdout.on("data",e=>i(e.toString("utf8"))),a.stderr.on("data",e=>{o+=e.toString("utf8")}),a.on("error",e=>{u("ENOENT"===e.code?"Claude Code CLI not found on PATH. Install it and run `claude` once to log in.":e.message),c()}),a.on("close",e=>{0!==e&&null!==e&&u(o.trim()||`claude exited with code ${e}`),c()}),e.signal.addEventListener("abort",()=>{a.kill("SIGTERM"),c()})}}),{headers:{"Content-Type":"application/x-ndjson","Cache-Control":"no-cache, no-transform"}})}e.s(["POST",0,n,"dynamic",0,"force-dynamic","runtime",0,"nodejs"])},756173,e=>{"use strict";var t=e.i(440807),r=e.i(381144),a=e.i(522639),n=e.i(165892),o=e.i(781831),s=e.i(740095),i=e.i(931106),l=e.i(253258),d=e.i(488026),p=e.i(571998),c=e.i(666314),u=e.i(598783),h=e.i(759703),m=e.i(163677),v=e.i(450859),x=e.i(193695);e.i(582432);var g=e.i(274687);let R=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/api/chat/route",pathname:"/api/chat",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/src/app/api/chat/route.ts",nextConfigOutput:"",userland:()=>e.r(1351),...{}}),{workAsyncStorage:f,workUnitAsyncStorage:_,serverHooks:w}=R;async function b(e,t,a){a.requestMeta&&(0,n.setRequestMeta)(e,a.requestMeta),R.isDev&&(0,n.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let f="/api/chat/route";f=f.replace(/\/index$/,"")||"/";let _=await R.prepare(e,t,{srcPage:f,multiZoneDraftMode:!1});if(!_)return t.statusCode=400,t.end("Bad Request"),null==a.waitUntil||a.waitUntil.call(a,Promise.resolve()),null;let{buildId:w,deploymentId:b,params:C,nextConfig:y,parsedUrl:E,isDraftMode:T,prerenderManifest:A,routerServerContext:q,isOnDemandRevalidate:S,revalidateOnlyGenerated:P,resolvedPathname:N,clientReferenceManifest:O,serverActionsManifest:j}=_,I=(0,i.normalizeAppPath)(f),k=!!(A.dynamicRoutes[I]||A.routes[N]),H=async()=>((null==q?void 0:q.render404)?await q.render404(e,t,E,!1):t.end("This page could not be found"),null);if(k&&!T){let e=!!A.routes[N],t=A.dynamicRoutes[I];if(t&&!1===t.fallback&&!e){if(y.adapterPath)return await H();throw new x.NoFallbackError}}let U=null;!k||R.isDev||T||(U="/index"===(U=N)?"/":U);let M=!0===R.isDev||!k,D=k&&!M;j&&O&&(0,s.setManifestsSingleton)({page:f,clientReferenceManifest:O,serverActionsManifest:j});let $=e.method||"GET",K=(0,o.getTracer)(),F=K.getActiveScopeSpan(),L=!!(null==q?void 0:q.isWrappedByNextServer),B=!!(0,n.getRequestMeta)(e,"minimalMode"),G=(0,n.getRequestMeta)(e,"incrementalCache")||await R.getIncrementalCache(e,y,A,B);null==G||G.resetRequestCache(),globalThis.__incrementalCache=G;let V={params:C,previewProps:A.preview,renderOpts:{experimental:{authInterrupts:!!y.experimental.authInterrupts,useCacheTimeout:y.experimental.useCacheTimeout},cacheComponents:!!y.cacheComponents,validationLevel:y.experimental.instantInsights.validationLevel,supportsDynamicResponse:M,incrementalCache:G,hmrRefreshHash:(0,n.getRequestMeta)(e,"hmrRefreshHash"),cacheLifeProfiles:y.cacheLife,staticPageGenerationTimeout:y.staticPageGenerationTimeout,waitUntil:a.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,a,n)=>R.onRequestError(e,t,a,n,q)},sharedContext:{buildId:w,deploymentId:b}},X=new l.NodeNextRequest(e),Y=new l.NodeNextResponse(t),J=d.NextRequestAdapter.fromNodeNextRequest(X,(0,d.signalFromNodeResponse)(t)),W=async({previousCacheEntry:r})=>{try{if(!B&&S&&P&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let n=await R.handle(J,V);e.fetchMetrics=V.renderOpts.fetchMetrics;let o=V.renderOpts.pendingWaitUntil;o&&a.waitUntil&&(a.waitUntil(o),o=void 0);let s=V.renderOpts.collectedTags;if(!k)return await (0,u.sendResponse)(X,Y,n,o),null;{let e=await n.blob(),t=(0,h.toNodeOutgoingHttpHeaders)(n.headers);s&&(t[v.NEXT_CACHE_TAGS_HEADER]=s),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==V.renderOpts.collectedRevalidate&&!(V.renderOpts.collectedRevalidate>=v.INFINITE_CACHE)&&V.renderOpts.collectedRevalidate,a=void 0===V.renderOpts.collectedExpire||V.renderOpts.collectedExpire>=v.INFINITE_CACHE?!1!==r&&r>0?y.expireTime:void 0:V.renderOpts.collectedExpire;return{value:{kind:g.CachedRouteKind.APP_ROUTE,status:n.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:a}}}}catch(t){throw(null==r?void 0:r.isStale)&&await R.onRequestError(e,t,{routerKind:"App Router",routePath:f,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:D,isOnDemandRevalidate:S})},!1,q),t}},z=async(n,s)=>{try{var i,l;let n=await R.handleResponse({req:e,nextConfig:y,cacheKey:U,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:A,isRoutePPREnabled:!1,isOnDemandRevalidate:S,revalidateOnlyGenerated:P,responseGenerator:W,waitUntil:a.waitUntil,isMinimalMode:B});if(!k)return;if((null==n||null==(i=n.value)?void 0:i.kind)!==g.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==n||null==(l=n.value)?void 0:l.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});B||t.setHeader("x-nextjs-cache",S?"REVALIDATED":n.isMiss?"MISS":n.isStale?"STALE":"HIT"),T&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let o=(0,h.fromNodeOutgoingHttpHeaders)(n.value.headers);B&&k||o.delete(v.NEXT_CACHE_TAGS_HEADER),!n.cacheControl||t.getHeader("Cache-Control")||o.get("Cache-Control")||o.set("Cache-Control",(0,m.getCacheControlHeader)(n.cacheControl)),await (0,u.sendResponse)(X,Y,new Response(n.value.body,{headers:o,status:n.value.status||200}));return}catch(t){if(t instanceof x.NoFallbackError||await R.onRequestError(e,t,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:D,isOnDemandRevalidate:S})},!1,q),k)throw t;await (0,u.sendResponse)(X,Y,new Response(null,{status:500}));return}finally{(()=>{if(!n)return;let e=t.statusCode;n.setAttributes({"http.status_code":e,"next.rsc":!1}),e&&e>=500&&(n.setStatus({code:o.SpanStatusCode.ERROR}),n.setAttribute("error.type",e.toString()));let r=K.getRootSpanAttributes();if(!r)return;if(r.get("next.span_type")!==p.BaseServerSpan.handleRequest)return 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")||I,i=`${$} ${a}`;n.setAttributes({"next.route":a,"http.route":a,"next.span_name":i}),n.updateName(i),s&&s!==n&&(s.setAttribute("http.route",a),s.updateName(i))})()}};if(L&&F)await z(F,void 0);else{let t=K.getActiveScopeSpan();await K.withPropagatedContext(e.headers,()=>K.trace(p.BaseServerSpan.handleRequest,{spanName:`${$} ${f}`,kind:o.SpanKind.SERVER,attributes:{"http.method":$,"http.target":e.url}},e=>z(e,t)),void 0,!L)}}e.s(["handler",0,b,"patchFetch",0,function(){return(0,a.patchFetch)({workAsyncStorage:f,workUnitAsyncStorage:_})},"routeModule",0,R,"serverHooks",0,w,"workAsyncStorage",0,f,"workUnitAsyncStorage",0,_])}];
|
|
9
|
+
|
|
10
|
+
//# sourceMappingURL=%5Broot-of-the-server%5D__169hmq_._.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/app/api/chat/route.ts","../../../node_modules/.pnpm/next%4016.3.6_%40babel%2Bcore%407.29.7_%40types%2Bnode%4022.20.4_react-dom%4019.3.0_react%4019.3.0__react%4019.3.0/node_modules/next/src/build/templates/app-route.ts"],"sourcesContent":["/**\n * /api/chat\n *\n * Chat with an agent from the UI, billed to the local Claude Code login (OpenClaw-style).\n * Spawns `claude -p` per turn and pipes its stream-json (NDJSON) output to the browser.\n * Native tools are disabled: the agent can only use VibeDoc's own MCP tools, so every\n * write goes through core.ts and emits SSE updates like any other MCP client.\n */\n\nimport { NextRequest } from 'next/server'\nimport { spawn } from 'child_process'\nimport { getConfiguredRoot } from '@/lib/core'\n\nexport const dynamic = 'force-dynamic'\nexport const runtime = 'nodejs'\n\nconst SYSTEM_PROMPT = `You are the VibeDoc assistant, embedded in a docs/kanban web UI.\nYou can only act through the vibedoc_* MCP tools. To edit a doc: read it with vibedoc_read_doc,\nthen call vibedoc_propose_edit with only the spans that change (old_string → new_string), never the\nwhole file. The user reviews a diff and accepts or rejects it, so never claim an edit is applied until they say so.\nFor requests to plan a roadmap or break an epic into tasks, first call vibedoc_get_planning_guide and follow it.\nPaths are relative to the project root. Keep replies short and answer in the user's language.`\n\nexport async function POST(req: NextRequest) {\n const root = req.nextUrl.searchParams.get('root') || getConfiguredRoot()\n const { message, sessionId, docPath } = await req.json()\n if (typeof message !== 'string' || !message.trim()) {\n return Response.json({ error: 'message is required' }, { status: 400 })\n }\n\n // Doc context goes in the user turn, not the system prompt: resumed sessions reuse the first system prompt.\n const prompt = docPath ? `[Currently open doc: ${docPath}]\\n\\n${message}` : message\n const mcpUrl = `${req.nextUrl.origin}/api/mcp?root=${encodeURIComponent(root)}`\n\n const args = [\n '-p', prompt,\n '--output-format', 'stream-json', '--verbose', '--include-partial-messages',\n '--mcp-config', JSON.stringify({ mcpServers: { vibedoc: { type: 'http', url: mcpUrl } } }),\n '--strict-mcp-config',\n '--tools', '',\n '--allowedTools', 'mcp__vibedoc__*',\n // Content edits must go through vibedoc_propose_edit so the user reviews a diff first; -p can't prompt for deletes.\n // Roadmap items go through vibedoc_propose_plan for the same reason (the planning skill otherwise creates them directly).\n '--disallowedTools', 'mcp__vibedoc__vibedoc_write_doc', 'mcp__vibedoc__vibedoc_append_doc', 'mcp__vibedoc__vibedoc_delete_doc',\n 'mcp__vibedoc__vibedoc_create_roadmap_item',\n '--setting-sources', '',\n '--disable-slash-commands',\n '--append-system-prompt', SYSTEM_PROMPT,\n ]\n if (typeof sessionId === 'string' && sessionId) args.push('--resume', sessionId)\n\n // Without an API key in env, the CLI falls back to the user's claude.ai login (subscription).\n const env = { ...process.env }\n delete env.ANTHROPIC_API_KEY\n\n const encoder = new TextEncoder()\n const stream = new ReadableStream({\n start(controller) {\n const child = spawn('claude', args, { cwd: root, env, stdio: ['ignore', 'pipe', 'pipe'] })\n let stderr = ''\n let closed = false\n const send = (line: string) => { if (!closed) controller.enqueue(encoder.encode(line)) }\n const close = () => { if (!closed) { closed = true; controller.close() } }\n const fail = (message: string) => send(JSON.stringify({ type: 'error', message }) + '\\n')\n\n child.stdout.on('data', (chunk: Buffer) => send(chunk.toString('utf8')))\n child.stderr.on('data', (chunk: Buffer) => { stderr += chunk.toString('utf8') })\n child.on('error', (e: NodeJS.ErrnoException) => {\n fail(e.code === 'ENOENT' ? 'Claude Code CLI not found on PATH. Install it and run `claude` once to log in.' : e.message)\n close()\n })\n child.on('close', (code) => {\n if (code !== 0 && code !== null) fail(stderr.trim() || `claude exited with code ${code}`)\n close()\n })\n req.signal.addEventListener('abort', () => { child.kill('SIGTERM'); close() })\n },\n })\n\n return new Response(stream, {\n headers: { 'Content-Type': 'application/x-ndjson', 'Cache-Control': 'no-cache, no-transform' },\n })\n}\n","import {\n AppRouteRouteModule,\n type AppRouteRouteHandlerContext,\n type AppRouteRouteModuleOptions,\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 {\n getTracer,\n type Span,\n SpanKind,\n SpanStatusCode,\n} 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'\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 lazy require factory ensures that:\n // - In dev: devRequestTimingInternalsEnd is set before userland executes,\n // correctly attributing module load time to application-code rather than\n // framework internals.\n // - In all modes: async modules (route files with top-level await) are\n // handled correctly — require() returns a Promise for such modules, which\n // ensureUserland() awaits before the first request is handled.\n userland: () => require('VAR_USERLAND') as typeof import('VAR_USERLAND'),\n // In Turbopack dev mode, also provide a synchronous per-request getter so\n // server HMR updates are picked up without re-executing the entry chunk.\n // Using require() (synchronous) avoids adding async overhead that would be\n // incorrectly attributed to application-code time in devRequestTiming.\n ...(process.env.TURBOPACK && process.env.__NEXT_DEV_SERVER\n ? {\n getUserland: () =>\n require('VAR_USERLAND') as typeof 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 useCacheTimeout: nextConfig.experimental.useCacheTimeout,\n },\n cacheComponents: Boolean(nextConfig.cacheComponents),\n validationLevel: nextConfig.experimental.instantInsights.validationLevel,\n supportsDynamicResponse,\n incrementalCache,\n hmrRefreshHash: getRequestMeta(req, 'hmrRefreshHash'),\n cacheLifeProfiles: nextConfig.cacheLife,\n staticPageGenerationTimeout: nextConfig.staticPageGenerationTimeout,\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 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 routeModule.handle(nextReq, context)\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 ? // Fall back to the global `expireTime` config when the\n // route has a numeric `revalidate` but didn't declare an\n // explicit `expire` (e.g. via `cacheLife`). This mirrors the\n // build-time fallback in `build/index.ts` so cache entries\n // and the response Cache-Control header agree on the route's\n // effective expire. Routes that opt out of revalidation\n // (`revalidate: false`) or that are dynamic (`revalidate: 0`)\n // keep `expire: undefined`.\n revalidate !== false && revalidate > 0\n ? nextConfig.expireTime\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(nodeNextReq, nodeNextRes, response, pendingWaitUntil)\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 handleResponse = async (\n currentSpan: Span | undefined,\n parentSpan: Span | undefined\n ) => {\n try {\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\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\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\n } finally {\n ;(() => {\n if (!currentSpan) {\n return\n }\n\n let statusCode = res.statusCode\n\n currentSpan.setAttributes({\n 'http.status_code': statusCode,\n 'next.rsc': false,\n })\n\n if (statusCode && statusCode >= 500) {\n // For 5xx status codes: SHOULD be set to 'Error' span status.\n // x-ref: https://opentelemetry.io/docs/specs/semconv/http/http-spans/#status\n currentSpan.setStatus({\n code: SpanStatusCode.ERROR,\n })\n // For span status 'Error', SHOULD set 'error.type' attribute.\n currentSpan.setAttribute('error.type', statusCode.toString())\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') || normalizedSrcPage\n const name = `${method} ${route}`\n\n currentSpan.setAttributes({\n 'next.route': route,\n 'http.route': route,\n 'next.span_name': name,\n })\n currentSpan.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 !== currentSpan) {\n parentSpan.setAttribute('http.route', route)\n parentSpan.updateName(name)\n }\n })()\n }\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, undefined)\n } else {\n let 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 (span) => handleResponse(span, parentSpan)\n ),\n undefined,\n !isWrappedByNextServer\n )\n }\n}\n"],"names":["dynamic","runtime","SYSTEM_PROMPT","POST","req","root","nextUrl","searchParams","get","message","sessionId","docPath","json","trim","Response","error","status","prompt","mcpUrl","origin","encodeURIComponent","args","JSON","stringify","mcpServers","vibedoc","type","url","push","env","process","ANTHROPIC_API_KEY","encoder","TextEncoder","stream","ReadableStream","start","controller","child","cwd","stdio","stderr","closed","send","line","enqueue","encode","close","fail","stdout","on","chunk","toString","e","code","signal","addEventListener","kill","headers","AppRouteRouteModule","RouteKind","patchFetch","_patchFetch","addRequestMeta","getRequestMeta","setRequestMeta","getTracer","SpanKind","SpanStatusCode","setManifestsSingleton","normalizeAppPath","NodeNextRequest","NodeNextResponse","NextRequestAdapter","signalFromNodeResponse","BaseServerSpan","getRevalidateReason","sendResponse","fromNodeOutgoingHttpHeaders","toNodeOutgoingHttpHeaders","getCacheControlHeader","INFINITE_CACHE","NEXT_CACHE_TAGS_HEADER","NoFallbackError","CachedRouteKind","routeModule","definition","kind","APP_ROUTE","page","pathname","filename","bundlePath","distDir","__NEXT_RELATIVE_DIST_DIR","relativeProjectDir","__NEXT_RELATIVE_PROJECT_DIR","resolvedPagePath","nextConfigOutput","userland","require","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","useCacheTimeout","cacheComponents","validationLevel","instantInsights","hmrRefreshHash","cacheLifeProfiles","cacheLife","staticPageGenerationTimeout","onClose","cb","onAfterTaskError","undefined","onInstrumentationRequestError","_request","errorContext","silenceLog","onRequestError","sharedContext","nodeNextReq","nodeNextRes","nextReq","fromNodeNextRequest","responseGenerator","previousCacheEntry","setHeader","response","handle","fetchMetrics","pendingWaitUntil","cacheTags","collectedTags","blob","revalidate","collectedRevalidate","expire","collectedExpire","expireTime","cacheEntry","value","body","Buffer","from","arrayBuffer","cacheControl","err","isStale","routerKind","routePath","routeType","revalidateReason","handleResponse","currentSpan","parentSpan","routeKind","isFallback","isRoutePPREnabled","Error","isMiss","delete","getHeader","set","setAttributes","setStatus","ERROR","setAttribute","rootSpanAttributes","getRootSpanAttributes","handleRequest","console","warn","route","name","updateName","withPropagatedContext","trace","spanName","SERVER","attributes","span"],"mappings":"2HAUA,IAAA,EAAA,EAAA,CAAA,CAAA,QACA,EAAA,EAAA,CAAA,CAAA,0CAKA,IAAME,EAAgB,CAAC;;;;;6FAKsE,CAAC,CAEvF,eAAeC,EAAKC,CAAgB,EACzC,IAAMC,EAAOD,EAAIE,OAAO,CAACC,YAAY,CAACC,GAAG,CAAC,SAAW,CAAA,EAAA,EAAA,iBAAA,AAAiB,IAChE,CAAEC,SAAO,WAAEC,CAAS,SAAEC,CAAO,CAAE,CAAG,MAAMP,EAAIQ,IAAI,GACtD,GAAuB,UAAnB,OAAOH,GAAwB,CAACA,EAAQI,IAAI,GAC9C,CADkD,MAC3CC,SAASF,IAAI,CAAC,CAAEG,MA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,UAAU,CAACD,GAInBnB,GAAcA,IAAeD,IAC/BC,EAAWY,OADiC,KACrB,CAAC,aAAcM,GACtClB,EAAWoB,UAAU,CAACD,IAE1B,CAAA,EACF,CACF,EAIA,GAAIpF,GAAyBF,EAC3B,MAAMiE,EAAejE,EADkB,KACN0B,OAC5B,CACL,IAAIyC,EAAapE,EAAOE,kBAAkB,EAC1C,OAAMF,EAAOyF,qBAAqB,CAChC7O,EAAIsD,OAAO,CACX,IACE8F,EAAO0F,KAAK,CACVvK,EAAAA,cAAAA,CAAegK,aAAa,CAC5B,CACEQ,SAAU,CAAA,EAAG5F,EAAO,CAAC,EAAErC,EAAAA,CAAS,CAChC3B,KAAMpB,EAAAA,QAAAA,CAASiL,MAAM,CACrBC,WAAY,CACV,cAAe9F,EACf,cAAenJ,EAAIuB,GAAG,AACxB,CACF,EACA,AAAC2N,GAAS5B,EAAe4B,EAAM1B,SAEnCzC,EACA,CAACxB,EAEL,CACF,mCAhgBA,SAAS9F,EACP,MAAA,CAAA,EAAOC,EAAAA,UAAAA,EAAY,kBACjB0C,uBACAC,CACF,EACF","ignoreList":[1]}
|
|
1
|
+
{"version":3,"sources":["../../../src/app/api/chat/route.ts","../../../node_modules/.pnpm/next%4016.3.6_%40babel%2Bcore%407.29.7_%40types%2Bnode%4022.20.4_react-dom%4019.3.0_react%4019.3.0__react%4019.3.0/node_modules/next/src/build/templates/app-route.ts"],"sourcesContent":["/**\n * /api/chat\n *\n * Chat with an agent from the UI, billed to the local Claude Code login (OpenClaw-style).\n * Spawns `claude -p` per turn and pipes its stream-json (NDJSON) output to the browser.\n * Native tools are disabled: the agent can only use VibeDoc's own MCP tools, so every\n * write goes through core.ts and emits SSE updates like any other MCP client.\n */\n\nimport { NextRequest } from 'next/server'\nimport { spawn } from 'child_process'\nimport { getConfiguredRoot } from '@/lib/core'\n\nexport const dynamic = 'force-dynamic'\nexport const runtime = 'nodejs'\n\nconst SYSTEM_PROMPT = `You are the VibeDoc assistant, embedded in a docs/kanban web UI.\nYou can only act through the vibedoc_* MCP tools. To edit a doc: read it with vibedoc_read_doc,\nthen call vibedoc_propose_edit with only the spans that change (old_string → new_string), never the\nwhole file. The user reviews a diff and accepts or rejects it, so never claim an edit is applied until they say so.\nFor requests to plan a roadmap or break an epic into tasks, first call vibedoc_get_planning_guide and follow it.\nPaths are relative to the project root. Keep replies short and answer in the user's language.`\n\nexport async function POST(req: NextRequest) {\n const root = req.nextUrl.searchParams.get('root') || getConfiguredRoot()\n const { message, sessionId, docPath } = await req.json()\n if (typeof message !== 'string' || !message.trim()) {\n return Response.json({ error: 'message is required' }, { status: 400 })\n }\n\n // Doc context goes in the user turn, not the system prompt: resumed sessions reuse the first system prompt.\n const prompt = docPath ? `[Currently open doc: ${docPath}]\\n\\n${message}` : message\n const mcpUrl = `${req.nextUrl.origin}/api/mcp?root=${encodeURIComponent(root)}`\n\n const args = [\n '-p', prompt,\n '--output-format', 'stream-json', '--verbose', '--include-partial-messages',\n '--mcp-config', JSON.stringify({ mcpServers: { vibedoc: { type: 'http', url: mcpUrl } } }),\n '--strict-mcp-config',\n '--tools', '',\n '--allowedTools', 'mcp__vibedoc__*',\n // Content edits must go through vibedoc_propose_edit so the user reviews a diff first; -p can't prompt for deletes.\n // Roadmap items go through vibedoc_propose_plan for the same reason (the planning skill otherwise creates them directly).\n '--disallowedTools', 'mcp__vibedoc__vibedoc_write_doc', 'mcp__vibedoc__vibedoc_append_doc', 'mcp__vibedoc__vibedoc_delete_doc',\n 'mcp__vibedoc__vibedoc_create_roadmap_item',\n '--setting-sources', '',\n '--disable-slash-commands',\n '--append-system-prompt', SYSTEM_PROMPT,\n ]\n if (typeof sessionId === 'string' && sessionId) args.push('--resume', sessionId)\n\n // Without an API key in env, the CLI falls back to the user's claude.ai login (subscription).\n const env = { ...process.env }\n delete env.ANTHROPIC_API_KEY\n\n const encoder = new TextEncoder()\n const stream = new ReadableStream({\n start(controller) {\n const child = spawn('claude', args, { cwd: root, env, stdio: ['ignore', 'pipe', 'pipe'] })\n let stderr = ''\n let closed = false\n const send = (line: string) => { if (!closed) controller.enqueue(encoder.encode(line)) }\n const close = () => { if (!closed) { closed = true; controller.close() } }\n const fail = (message: string) => send(JSON.stringify({ type: 'error', message }) + '\\n')\n\n child.stdout.on('data', (chunk: Buffer) => send(chunk.toString('utf8')))\n child.stderr.on('data', (chunk: Buffer) => { stderr += chunk.toString('utf8') })\n child.on('error', (e: NodeJS.ErrnoException) => {\n fail(e.code === 'ENOENT' ? 'Claude Code CLI not found on PATH. Install it and run `claude` once to log in.' : e.message)\n close()\n })\n child.on('close', (code) => {\n if (code !== 0 && code !== null) fail(stderr.trim() || `claude exited with code ${code}`)\n close()\n })\n req.signal.addEventListener('abort', () => { child.kill('SIGTERM'); close() })\n },\n })\n\n return new Response(stream, {\n headers: { 'Content-Type': 'application/x-ndjson', 'Cache-Control': 'no-cache, no-transform' },\n })\n}\n","import {\n AppRouteRouteModule,\n type AppRouteRouteHandlerContext,\n type AppRouteRouteModuleOptions,\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 {\n getTracer,\n type Span,\n SpanKind,\n SpanStatusCode,\n} 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'\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 lazy require factory ensures that:\n // - In dev: devRequestTimingInternalsEnd is set before userland executes,\n // correctly attributing module load time to application-code rather than\n // framework internals.\n // - In all modes: async modules (route files with top-level await) are\n // handled correctly — require() returns a Promise for such modules, which\n // ensureUserland() awaits before the first request is handled.\n userland: () => require('VAR_USERLAND') as typeof import('VAR_USERLAND'),\n // In Turbopack dev mode, also provide a synchronous per-request getter so\n // server HMR updates are picked up without re-executing the entry chunk.\n // Using require() (synchronous) avoids adding async overhead that would be\n // incorrectly attributed to application-code time in devRequestTiming.\n ...(process.env.TURBOPACK && process.env.__NEXT_DEV_SERVER\n ? {\n getUserland: () =>\n require('VAR_USERLAND') as typeof 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 useCacheTimeout: nextConfig.experimental.useCacheTimeout,\n },\n cacheComponents: Boolean(nextConfig.cacheComponents),\n validationLevel: nextConfig.experimental.instantInsights.validationLevel,\n supportsDynamicResponse,\n incrementalCache,\n hmrRefreshHash: getRequestMeta(req, 'hmrRefreshHash'),\n cacheLifeProfiles: nextConfig.cacheLife,\n staticPageGenerationTimeout: nextConfig.staticPageGenerationTimeout,\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 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 routeModule.handle(nextReq, context)\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 ? // Fall back to the global `expireTime` config when the\n // route has a numeric `revalidate` but didn't declare an\n // explicit `expire` (e.g. via `cacheLife`). This mirrors the\n // build-time fallback in `build/index.ts` so cache entries\n // and the response Cache-Control header agree on the route's\n // effective expire. Routes that opt out of revalidation\n // (`revalidate: false`) or that are dynamic (`revalidate: 0`)\n // keep `expire: undefined`.\n revalidate !== false && revalidate > 0\n ? nextConfig.expireTime\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(nodeNextReq, nodeNextRes, response, pendingWaitUntil)\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 handleResponse = async (\n currentSpan: Span | undefined,\n parentSpan: Span | undefined\n ) => {\n try {\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\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\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\n } finally {\n ;(() => {\n if (!currentSpan) {\n return\n }\n\n let statusCode = res.statusCode\n\n currentSpan.setAttributes({\n 'http.status_code': statusCode,\n 'next.rsc': false,\n })\n\n if (statusCode && statusCode >= 500) {\n // For 5xx status codes: SHOULD be set to 'Error' span status.\n // x-ref: https://opentelemetry.io/docs/specs/semconv/http/http-spans/#status\n currentSpan.setStatus({\n code: SpanStatusCode.ERROR,\n })\n // For span status 'Error', SHOULD set 'error.type' attribute.\n currentSpan.setAttribute('error.type', statusCode.toString())\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') || normalizedSrcPage\n const name = `${method} ${route}`\n\n currentSpan.setAttributes({\n 'next.route': route,\n 'http.route': route,\n 'next.span_name': name,\n })\n currentSpan.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 !== currentSpan) {\n parentSpan.setAttribute('http.route', route)\n parentSpan.updateName(name)\n }\n })()\n }\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, undefined)\n } else {\n let 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 (span) => handleResponse(span, parentSpan)\n ),\n undefined,\n !isWrappedByNextServer\n )\n }\n}\n"],"names":["dynamic","runtime","SYSTEM_PROMPT","POST","req","root","nextUrl","searchParams","get","message","sessionId","docPath","json","trim","Response","error","status","prompt","mcpUrl","origin","encodeURIComponent","args","JSON","stringify","mcpServers","vibedoc","type","url","push","env","process","ANTHROPIC_API_KEY","encoder","TextEncoder","stream","ReadableStream","start","controller","child","cwd","stdio","stderr","closed","send","line","enqueue","encode","close","fail","stdout","on","chunk","toString","e","code","signal","addEventListener","kill","headers","AppRouteRouteModule","RouteKind","patchFetch","_patchFetch","addRequestMeta","getRequestMeta","setRequestMeta","getTracer","SpanKind","SpanStatusCode","setManifestsSingleton","normalizeAppPath","NodeNextRequest","NodeNextResponse","NextRequestAdapter","signalFromNodeResponse","BaseServerSpan","getRevalidateReason","sendResponse","fromNodeOutgoingHttpHeaders","toNodeOutgoingHttpHeaders","getCacheControlHeader","INFINITE_CACHE","NEXT_CACHE_TAGS_HEADER","NoFallbackError","CachedRouteKind","routeModule","definition","kind","APP_ROUTE","page","pathname","filename","bundlePath","distDir","__NEXT_RELATIVE_DIST_DIR","relativeProjectDir","__NEXT_RELATIVE_PROJECT_DIR","resolvedPagePath","nextConfigOutput","userland","require","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","useCacheTimeout","cacheComponents","validationLevel","instantInsights","hmrRefreshHash","cacheLifeProfiles","cacheLife","staticPageGenerationTimeout","onClose","cb","onAfterTaskError","undefined","onInstrumentationRequestError","_request","errorContext","silenceLog","onRequestError","sharedContext","nodeNextReq","nodeNextRes","nextReq","fromNodeNextRequest","responseGenerator","previousCacheEntry","setHeader","response","handle","fetchMetrics","pendingWaitUntil","cacheTags","collectedTags","blob","revalidate","collectedRevalidate","expire","collectedExpire","expireTime","cacheEntry","value","body","Buffer","from","arrayBuffer","cacheControl","err","isStale","routerKind","routePath","routeType","revalidateReason","handleResponse","currentSpan","parentSpan","routeKind","isFallback","isRoutePPREnabled","Error","isMiss","delete","getHeader","set","setAttributes","setStatus","ERROR","setAttribute","rootSpanAttributes","getRootSpanAttributes","handleRequest","console","warn","route","name","updateName","withPropagatedContext","trace","spanName","SERVER","attributes","span"],"mappings":"63CAUA,IAAA,EAAA,EAAA,CAAA,CAAA,QACA,EAAA,EAAA,CAAA,CAAA,QAKA,IAAME,EAAgB,CAAC;;;;;6FAKsE,CAAC,CAEvF,eAAeC,EAAKC,CAAgB,EACzC,IAAMC,EAAOD,EAAIE,OAAO,CAACC,YAAY,CAACC,GAAG,CAAC,SAAW,CAAA,EAAA,EAAA,iBAAiB,AAAjB,IAC/C,SAAEC,CAAO,WAAEC,CAAS,SAAEC,CAAO,CAAE,CAAG,MAAMP,EAAIQ,IAAI,GACtD,GAAuB,UAAnB,OAAOH,GAAwB,CAACA,EAAQI,IAAI,GAC9C,CADkD,MAC3CC,SAASF,IAAI,CAAC,CAAEG,MAAO,qBAAsB,EAAG,CAAEC,OAAQ,GAAI,GAOvE,IAAMK,EAAO,CACX,KAJaV,EAAU,CAAC,qBAAqB,EAAEA,EAAQ;AAAA;AAAK,EAAEF,EAAAA,CAAS,CAAGA,EAK1E,kBAAmB,cAAe,YAAa,6BAC/C,eAAgBa,KAAKC,SAAS,CAAC,CAAEC,WAAY,CAAEC,QAAS,CAAEC,KAAM,OAAQC,IAL3D,CAKgET,AALhE,EA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0F,KAAK,CACVvK,EAAAA,cAAAA,CAAegK,aAAa,CAC5B,CACEQ,SAAU,CAAA,EAAG5F,EAAO,CAAC,EAAErC,EAAAA,CAAS,CAChC3B,KAAMpB,EAAAA,QAAAA,CAASiL,MAAM,CACrBC,WAAY,CACV,cAAe9F,EACf,cAAenJ,EAAIuB,GAAG,AACxB,CACF,EACA,AAAC2N,GAAS5B,EAAe4B,EAAM1B,IAEnCzC,OACA,CAACxB,EAEL,CACF,mCAhgBA,SAAS9F,EACP,MAAA,CAAA,EAAOC,EAAAA,UAAAA,EAAY,kBACjB0C,uBACAC,CACF,EACF","ignoreList":[1]}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
module.exports=[270406,(e,r,s)=>{r.exports=e.x("next/dist/compiled/@opentelemetry/api",()=>require("next/dist/compiled/@opentelemetry/api"))},918622,(e,r,s)=>{r.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"))},120635,(e,r,s)=>{r.exports=e.x("next/dist/server/app-render/action-async-storage.external.js",()=>require("next/dist/server/app-render/action-async-storage.external.js"))},324725,(e,r,s)=>{r.exports=e.x("next/dist/server/app-render/after-task-async-storage.external.js",()=>require("next/dist/server/app-render/after-task-async-storage.external.js"))},556704,(e,r,s)=>{r.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},832319,(e,r,s)=>{r.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"))},559043,(e,r,s)=>{r.exports=e.x("next/dist/server/runtime-reacts.external.js",()=>require("next/dist/server/runtime-reacts.external.js"))},193695,(e,r,s)=>{r.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},902157,(e,r,s)=>{r.exports=e.x("node:fs",()=>require("node:fs"))},912714,(e,r,s)=>{r.exports=e.x("node:fs/promises",()=>require("node:fs/promises"))},750227,(e,r,s)=>{r.exports=e.x("node:path",()=>require("node:path"))},81111,(e,r,s)=>{r.exports=e.x("node:stream",()=>require("node:stream"))},814747,(e,r,s)=>{r.exports=e.x("path",()=>require("path"))},400829,e=>{e.v(r=>Promise.all(["server/chunks/11mp_@anthropic-ai_sdk_1ludf-o._.js","server/chunks/node_modules__pnpm_01mvudn._.js"].map(r=>e.l(r))).then(()=>r(292987)))},498768,e=>{"use strict";class r{listeners=new Set;subscribe(e){return this.listeners.add(e),()=>this.listeners.delete(e)}emit(e){this.listeners.forEach(r=>{try{r(e)}catch{}})}}let s=globalThis,t=s.vibedocBus??(s.vibedocBus=new r);e.s(["bus",0,t,"emitUpdate",0,function(e,r){t.emit({type:e,payload:r,ts:new Date().toISOString()})}])}];
|
|
2
|
+
|
|
3
|
+
//# sourceMappingURL=%5Broot-of-the-server%5D__17p0rkn._.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/lib/events.ts"],"sourcesContent":["/**\r\n * src/lib/events.ts\r\n * In-process SSE event bus.\r\n * API routes push events here; /api/events streams them to the browser.\r\n */\r\n\r\ntype Listener = (data: unknown) => void\r\n\r\nclass EventBus {\r\n private listeners = new Set<Listener>()\r\n\r\n subscribe(fn: Listener) {\r\n this.listeners.add(fn)\r\n return () => this.listeners.delete(fn)\r\n }\r\n\r\n emit(event: unknown) {\r\n this.listeners.forEach(fn => {\r\n try { fn(event) } catch {}\r\n })\r\n }\r\n}\r\n\r\n// Singleton — shared across all API routes in the same process\r\nconst globalForBus = globalThis as unknown as { vibedocBus?: EventBus }\r\nexport const bus = globalForBus.vibedocBus ?? (globalForBus.vibedocBus = new EventBus())\r\n\r\nexport function emitUpdate(type: string, payload: unknown) {\r\n bus.emit({ type, payload, ts: new Date().toISOString() })\r\n}\r\n"],"names":["EventBus","listeners","Set","subscribe","fn","add","delete","emit","event","forEach","globalForBus","globalThis","bus","vibedocBus","emitUpdate","type","payload","ts","Date","toISOString"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../../src/lib/events.ts"],"sourcesContent":["/**\r\n * src/lib/events.ts\r\n * In-process SSE event bus.\r\n * API routes push events here; /api/events streams them to the browser.\r\n */\r\n\r\ntype Listener = (data: unknown) => void\r\n\r\nclass EventBus {\r\n private listeners = new Set<Listener>()\r\n\r\n subscribe(fn: Listener) {\r\n this.listeners.add(fn)\r\n return () => this.listeners.delete(fn)\r\n }\r\n\r\n emit(event: unknown) {\r\n this.listeners.forEach(fn => {\r\n try { fn(event) } catch {}\r\n })\r\n }\r\n}\r\n\r\n// Singleton — shared across all API routes in the same process\r\nconst globalForBus = globalThis as unknown as { vibedocBus?: EventBus }\r\nexport const bus = globalForBus.vibedocBus ?? (globalForBus.vibedocBus = new EventBus())\r\n\r\nexport function emitUpdate(type: string, payload: unknown) {\r\n bus.emit({ type, payload, ts: new Date().toISOString() })\r\n}\r\n"],"names":["EventBus","listeners","Set","subscribe","fn","add","delete","emit","event","forEach","globalForBus","globalThis","bus","vibedocBus","emitUpdate","type","payload","ts","Date","toISOString"],"mappings":"0zDAQA,OAAMA,EACIC,UAAY,IAAIC,GAAe,CAEvCC,UAAUC,CAAY,CAAE,CAEtB,OADA,IAAI,CAACH,SAAS,CAACI,GAAG,CAACD,GACZ,IAAM,IAAI,CAACH,SAAS,CAACK,MAAM,CAACF,EACrC,CAEAG,KAAKC,CAAc,CAAE,CACnB,IAAI,CAACP,SAAS,CAACQ,OAAO,CAACL,IACrB,GAAI,CAAEA,EAAGI,EAAO,CAAE,KAAM,CAAC,CAC3B,EACF,CACF,CAGA,IAAME,EAAeC,WACRC,EAAMF,EAAaG,UAAU,GAAKH,CAAD,CAAcG,UAAU,CAAG,IAAIb,CAAAA,CAAU,+BAEhF,SAASc,AAAWC,CAAY,CAAEC,CAAgB,EACvDJ,EAAIL,IAAI,CAAC,MAAEQ,UAAMC,EAASC,GAAI,IAAIC,OAAOC,WAAW,EAAG,EACzD"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
module.exports=[270406,(e,t,r)=>{t.exports=e.x("next/dist/compiled/@opentelemetry/api",()=>require("next/dist/compiled/@opentelemetry/api"))},918622,(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"))},120635,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/action-async-storage.external.js",()=>require("next/dist/server/app-render/action-async-storage.external.js"))},324725,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/after-task-async-storage.external.js",()=>require("next/dist/server/app-render/after-task-async-storage.external.js"))},556704,(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"))},832319,(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"))},559043,(e,t,r)=>{t.exports=e.x("next/dist/server/runtime-reacts.external.js",()=>require("next/dist/server/runtime-reacts.external.js"))},193695,(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"))},902157,(e,t,r)=>{t.exports=e.x("node:fs",()=>require("node:fs"))},912714,(e,t,r)=>{t.exports=e.x("node:fs/promises",()=>require("node:fs/promises"))},750227,(e,t,r)=>{t.exports=e.x("node:path",()=>require("node:path"))},81111,(e,t,r)=>{t.exports=e.x("node:stream",()=>require("node:stream"))},814747,(e,t,r)=>{t.exports=e.x("path",()=>require("path"))},400829,e=>{e.v(t=>Promise.all(["server/chunks/11mp_@anthropic-ai_sdk_15hyn79._.js","server/chunks/node_modules__pnpm_01mvudn._.js"].map(t=>e.l(t))).then(()=>t(292987)))},509318,e=>{"use strict";var t=e.i(192258),r=e.i(799501),a=e.i(498768);async function s(e){try{let s=e.nextUrl.searchParams.get("root")||(0,r.getConfiguredRoot)(),{files:n}=await e.json(),i=[];for(let e of n)if(!e.skipped)try{await (0,r.createDoc)(e.path,e.content,s),(0,a.emitUpdate)("doc_created",{path:e.path}),i.push({path:e.path,success:!0})}catch(t){"EEXIST"===t.code?i.push({path:e.path,success:!1,error:"already exists"}):i.push({path:e.path,success:!1,error:t.message})}return t.NextResponse.json({results:i})}catch(e){return t.NextResponse.json({error:e.message},{status:500})}}e.s(["POST",0,s])},683651,e=>{"use strict";var t=e.i(440807),r=e.i(381144),a=e.i(522639),s=e.i(165892),n=e.i(781831),i=e.i(740095),o=e.i(931106),l=e.i(253258),u=e.i(488026),d=e.i(571998),p=e.i(666314),c=e.i(598783),h=e.i(759703),x=e.i(163677),v=e.i(450859),m=e.i(193695);e.i(582432);var R=e.i(274687);let g=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/api/setup/write/route",pathname:"/api/setup/write",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/src/app/api/setup/write/route.ts",nextConfigOutput:"",userland:()=>e.r(509318),...{}}),{workAsyncStorage:f,workUnitAsyncStorage:w,serverHooks:E}=g;async function y(e,t,a){a.requestMeta&&(0,s.setRequestMeta)(e,a.requestMeta),g.isDev&&(0,s.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let f="/api/setup/write/route";f=f.replace(/\/index$/,"")||"/";let w=await g.prepare(e,t,{srcPage:f,multiZoneDraftMode:!1});if(!w)return t.statusCode=400,t.end("Bad Request"),null==a.waitUntil||a.waitUntil.call(a,Promise.resolve()),null;let{buildId:E,deploymentId:y,params:C,nextConfig:b,parsedUrl:T,isDraftMode:q,prerenderManifest:A,routerServerContext:_,isOnDemandRevalidate:S,revalidateOnlyGenerated:P,resolvedPathname:j,clientReferenceManifest:N,serverActionsManifest:k}=w,O=(0,o.normalizeAppPath)(f),H=!!(A.dynamicRoutes[O]||A.routes[j]),I=async()=>((null==_?void 0:_.render404)?await _.render404(e,t,T,!1):t.end("This page could not be found"),null);if(H&&!q){let e=!!A.routes[j],t=A.dynamicRoutes[O];if(t&&!1===t.fallback&&!e){if(b.adapterPath)return await I();throw new m.NoFallbackError}}let U=null;!H||g.isDev||q||(U="/index"===(U=j)?"/":U);let M=!0===g.isDev||!H,D=H&&!M;k&&N&&(0,i.setManifestsSingleton)({page:f,clientReferenceManifest:N,serverActionsManifest:k});let B=e.method||"GET",F=(0,n.getTracer)(),K=F.getActiveScopeSpan(),L=!!(null==_?void 0:_.isWrappedByNextServer),$=!!(0,s.getRequestMeta)(e,"minimalMode"),G=(0,s.getRequestMeta)(e,"incrementalCache")||await g.getIncrementalCache(e,b,A,$);null==G||G.resetRequestCache(),globalThis.__incrementalCache=G;let X={params:C,previewProps:A.preview,renderOpts:{experimental:{authInterrupts:!!b.experimental.authInterrupts,useCacheTimeout:b.experimental.useCacheTimeout},cacheComponents:!!b.cacheComponents,validationLevel:b.experimental.instantInsights.validationLevel,supportsDynamicResponse:M,incrementalCache:G,hmrRefreshHash:(0,s.getRequestMeta)(e,"hmrRefreshHash"),cacheLifeProfiles:b.cacheLife,staticPageGenerationTimeout:b.staticPageGenerationTimeout,waitUntil:a.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,a,s)=>g.onRequestError(e,t,a,s,_)},sharedContext:{buildId:E,deploymentId:y}},V=new l.NodeNextRequest(e),W=new l.NodeNextResponse(t),z=u.NextRequestAdapter.fromNodeNextRequest(V,(0,u.signalFromNodeResponse)(t)),Z=async({previousCacheEntry:r})=>{try{if(!$&&S&&P&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let s=await g.handle(z,X);e.fetchMetrics=X.renderOpts.fetchMetrics;let n=X.renderOpts.pendingWaitUntil;n&&a.waitUntil&&(a.waitUntil(n),n=void 0);let i=X.renderOpts.collectedTags;if(!H)return await (0,c.sendResponse)(V,W,s,n),null;{let e=await s.blob(),t=(0,h.toNodeOutgoingHttpHeaders)(s.headers);i&&(t[v.NEXT_CACHE_TAGS_HEADER]=i),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==X.renderOpts.collectedRevalidate&&!(X.renderOpts.collectedRevalidate>=v.INFINITE_CACHE)&&X.renderOpts.collectedRevalidate,a=void 0===X.renderOpts.collectedExpire||X.renderOpts.collectedExpire>=v.INFINITE_CACHE?!1!==r&&r>0?b.expireTime:void 0:X.renderOpts.collectedExpire;return{value:{kind:R.CachedRouteKind.APP_ROUTE,status:s.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:a}}}}catch(t){throw(null==r?void 0:r.isStale)&&await g.onRequestError(e,t,{routerKind:"App Router",routePath:f,routeType:"route",revalidateReason:(0,p.getRevalidateReason)({isStaticGeneration:D,isOnDemandRevalidate:S})},!1,_),t}},J=async(s,i)=>{try{var o,l;let s=await g.handleResponse({req:e,nextConfig:b,cacheKey:U,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:A,isRoutePPREnabled:!1,isOnDemandRevalidate:S,revalidateOnlyGenerated:P,responseGenerator:Z,waitUntil:a.waitUntil,isMinimalMode:$});if(!H)return;if((null==s||null==(o=s.value)?void 0:o.kind)!==R.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==s||null==(l=s.value)?void 0:l.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});$||t.setHeader("x-nextjs-cache",S?"REVALIDATED":s.isMiss?"MISS":s.isStale?"STALE":"HIT"),q&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let n=(0,h.fromNodeOutgoingHttpHeaders)(s.value.headers);$&&H||n.delete(v.NEXT_CACHE_TAGS_HEADER),!s.cacheControl||t.getHeader("Cache-Control")||n.get("Cache-Control")||n.set("Cache-Control",(0,x.getCacheControlHeader)(s.cacheControl)),await (0,c.sendResponse)(V,W,new Response(s.value.body,{headers:n,status:s.value.status||200}));return}catch(t){if(t instanceof m.NoFallbackError||await g.onRequestError(e,t,{routerKind:"App Router",routePath:O,routeType:"route",revalidateReason:(0,p.getRevalidateReason)({isStaticGeneration:D,isOnDemandRevalidate:S})},!1,_),H)throw t;await (0,c.sendResponse)(V,W,new Response(null,{status:500}));return}finally{(()=>{if(!s)return;let e=t.statusCode;s.setAttributes({"http.status_code":e,"next.rsc":!1}),e&&e>=500&&(s.setStatus({code:n.SpanStatusCode.ERROR}),s.setAttribute("error.type",e.toString()));let r=F.getRootSpanAttributes();if(!r)return;if(r.get("next.span_type")!==d.BaseServerSpan.handleRequest)return 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")||O,o=`${B} ${a}`;s.setAttributes({"next.route":a,"http.route":a,"next.span_name":o}),s.updateName(o),i&&i!==s&&(i.setAttribute("http.route",a),i.updateName(o))})()}};if(L&&K)await J(K,void 0);else{let t=F.getActiveScopeSpan();await F.withPropagatedContext(e.headers,()=>F.trace(d.BaseServerSpan.handleRequest,{spanName:`${B} ${f}`,kind:n.SpanKind.SERVER,attributes:{"http.method":B,"http.target":e.url}},e=>J(e,t)),void 0,!L)}}e.s(["handler",0,y,"patchFetch",0,function(){return(0,a.patchFetch)({workAsyncStorage:f,workUnitAsyncStorage:w})},"routeModule",0,g,"serverHooks",0,E,"workAsyncStorage",0,f,"workUnitAsyncStorage",0,w])},498768,e=>{"use strict";class t{listeners=new Set;subscribe(e){return this.listeners.add(e),()=>this.listeners.delete(e)}emit(e){this.listeners.forEach(t=>{try{t(e)}catch{}})}}let r=globalThis,a=r.vibedocBus??(r.vibedocBus=new t);e.s(["bus",0,a,"emitUpdate",0,function(e,t){a.emit({type:e,payload:t,ts:new Date().toISOString()})}])}];
|
|
2
|
+
|
|
3
|
+
//# sourceMappingURL=%5Broot-of-the-server%5D__17xb02p._.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/app/api/setup/write/route.ts","../../../node_modules/.pnpm/next%4016.3.6_%40babel%2Bcore%407.29.7_%40types%2Bnode%4022.20.4_react-dom%4019.3.0_react%4019.3.0__react%4019.3.0/node_modules/next/src/build/templates/app-route.ts","../../../src/lib/events.ts"],"sourcesContent":["import { NextRequest, NextResponse } from 'next/server'\r\nimport { createDoc, getConfiguredRoot } from '@/lib/core'\r\nimport { emitUpdate } from '@/lib/events'\r\n\r\ninterface FileToWrite {\r\n path: string\r\n content: string\r\n skipped?: boolean\r\n}\r\n\r\nexport async function POST(req: NextRequest) {\r\n try {\r\n const root = req.nextUrl.searchParams.get('root') || getConfiguredRoot()\r\n const { files } = await req.json() as { files: FileToWrite[] }\r\n\r\n const results: { path: string; success: boolean; error?: string }[] = []\r\n\r\n for (const file of files) {\r\n if (file.skipped) continue\r\n\r\n try {\r\n await createDoc(file.path, file.content, root)\r\n emitUpdate('doc_created', { path: file.path })\r\n results.push({ path: file.path, success: true })\r\n } catch (e) {\r\n const err = e as NodeJS.ErrnoException\r\n if (err.code === 'EEXIST') {\r\n results.push({ path: file.path, success: false, error: 'already exists' })\r\n } else {\r\n results.push({ path: file.path, success: false, error: (e as Error).message })\r\n }\r\n }\r\n }\r\n\r\n return NextResponse.json({ results })\r\n } catch (e) {\r\n return NextResponse.json({ error: (e as Error).message }, { status: 500 })\r\n }\r\n}\r\n","import {\n AppRouteRouteModule,\n type AppRouteRouteHandlerContext,\n type AppRouteRouteModuleOptions,\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 {\n getTracer,\n type Span,\n SpanKind,\n SpanStatusCode,\n} 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'\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 lazy require factory ensures that:\n // - In dev: devRequestTimingInternalsEnd is set before userland executes,\n // correctly attributing module load time to application-code rather than\n // framework internals.\n // - In all modes: async modules (route files with top-level await) are\n // handled correctly — require() returns a Promise for such modules, which\n // ensureUserland() awaits before the first request is handled.\n userland: () => require('VAR_USERLAND') as typeof import('VAR_USERLAND'),\n // In Turbopack dev mode, also provide a synchronous per-request getter so\n // server HMR updates are picked up without re-executing the entry chunk.\n // Using require() (synchronous) avoids adding async overhead that would be\n // incorrectly attributed to application-code time in devRequestTiming.\n ...(process.env.TURBOPACK && process.env.__NEXT_DEV_SERVER\n ? {\n getUserland: () =>\n require('VAR_USERLAND') as typeof 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 useCacheTimeout: nextConfig.experimental.useCacheTimeout,\n },\n cacheComponents: Boolean(nextConfig.cacheComponents),\n validationLevel: nextConfig.experimental.instantInsights.validationLevel,\n supportsDynamicResponse,\n incrementalCache,\n hmrRefreshHash: getRequestMeta(req, 'hmrRefreshHash'),\n cacheLifeProfiles: nextConfig.cacheLife,\n staticPageGenerationTimeout: nextConfig.staticPageGenerationTimeout,\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 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 routeModule.handle(nextReq, context)\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 ? // Fall back to the global `expireTime` config when the\n // route has a numeric `revalidate` but didn't declare an\n // explicit `expire` (e.g. via `cacheLife`). This mirrors the\n // build-time fallback in `build/index.ts` so cache entries\n // and the response Cache-Control header agree on the route's\n // effective expire. Routes that opt out of revalidation\n // (`revalidate: false`) or that are dynamic (`revalidate: 0`)\n // keep `expire: undefined`.\n revalidate !== false && revalidate > 0\n ? nextConfig.expireTime\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(nodeNextReq, nodeNextRes, response, pendingWaitUntil)\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 handleResponse = async (\n currentSpan: Span | undefined,\n parentSpan: Span | undefined\n ) => {\n try {\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\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\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\n } finally {\n ;(() => {\n if (!currentSpan) {\n return\n }\n\n let statusCode = res.statusCode\n\n currentSpan.setAttributes({\n 'http.status_code': statusCode,\n 'next.rsc': false,\n })\n\n if (statusCode && statusCode >= 500) {\n // For 5xx status codes: SHOULD be set to 'Error' span status.\n // x-ref: https://opentelemetry.io/docs/specs/semconv/http/http-spans/#status\n currentSpan.setStatus({\n code: SpanStatusCode.ERROR,\n })\n // For span status 'Error', SHOULD set 'error.type' attribute.\n currentSpan.setAttribute('error.type', statusCode.toString())\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') || normalizedSrcPage\n const name = `${method} ${route}`\n\n currentSpan.setAttributes({\n 'next.route': route,\n 'http.route': route,\n 'next.span_name': name,\n })\n currentSpan.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 !== currentSpan) {\n parentSpan.setAttribute('http.route', route)\n parentSpan.updateName(name)\n }\n })()\n }\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, undefined)\n } else {\n let 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 (span) => handleResponse(span, parentSpan)\n ),\n undefined,\n !isWrappedByNextServer\n )\n }\n}\n","/**\r\n * src/lib/events.ts\r\n * In-process SSE event bus.\r\n * API routes push events here; /api/events streams them to the browser.\r\n */\r\n\r\ntype Listener = (data: unknown) => void\r\n\r\nclass EventBus {\r\n private listeners = new Set<Listener>()\r\n\r\n subscribe(fn: Listener) {\r\n this.listeners.add(fn)\r\n return () => this.listeners.delete(fn)\r\n }\r\n\r\n emit(event: unknown) {\r\n this.listeners.forEach(fn => {\r\n try { fn(event) } catch {}\r\n })\r\n }\r\n}\r\n\r\n// Singleton — shared across all API routes in the same process\r\nconst globalForBus = globalThis as unknown as { vibedocBus?: EventBus }\r\nexport const bus = globalForBus.vibedocBus ?? (globalForBus.vibedocBus = new EventBus())\r\n\r\nexport function emitUpdate(type: string, payload: unknown) {\r\n bus.emit({ type, payload, ts: new Date().toISOString() })\r\n}\r\n"],"names":["POST","req","root","nextUrl","searchParams","get","files","json","results","file","skipped","path","content","push","success","e","err","code","error","message","status","AppRouteRouteModule","RouteKind","patchFetch","_patchFetch","addRequestMeta","getRequestMeta","setRequestMeta","getTracer","SpanKind","SpanStatusCode","setManifestsSingleton","normalizeAppPath","NodeNextRequest","NodeNextResponse","NextRequestAdapter","signalFromNodeResponse","BaseServerSpan","getRevalidateReason","sendResponse","fromNodeOutgoingHttpHeaders","toNodeOutgoingHttpHeaders","getCacheControlHeader","INFINITE_CACHE","NEXT_CACHE_TAGS_HEADER","NoFallbackError","CachedRouteKind","routeModule","definition","kind","APP_ROUTE","page","pathname","filename","bundlePath","distDir","process","env","__NEXT_RELATIVE_DIST_DIR","relativeProjectDir","__NEXT_RELATIVE_PROJECT_DIR","resolvedPagePath","nextConfigOutput","userland","require","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","useCacheTimeout","cacheComponents","validationLevel","instantInsights","hmrRefreshHash","cacheLifeProfiles","cacheLife","staticPageGenerationTimeout","onClose","cb","on","onAfterTaskError","undefined","onInstrumentationRequestError","_request","errorContext","silenceLog","onRequestError","sharedContext","nodeNextReq","nodeNextRes","nextReq","fromNodeNextRequest","responseGenerator","previousCacheEntry","setHeader","response","handle","fetchMetrics","pendingWaitUntil","cacheTags","collectedTags","blob","headers","type","revalidate","collectedRevalidate","expire","collectedExpire","expireTime","cacheEntry","value","body","Buffer","from","arrayBuffer","cacheControl","isStale","routerKind","routePath","routeType","revalidateReason","handleResponse","currentSpan","parentSpan","routeKind","isFallback","isRoutePPREnabled","Error","isMiss","delete","getHeader","set","Response","setAttributes","setStatus","ERROR","setAttribute","toString","rootSpanAttributes","getRootSpanAttributes","handleRequest","console","warn","route","name","updateName","withPropagatedContext","trace","spanName","SERVER","attributes","url","span","EventBus","listeners","Set","subscribe","fn","add","emit","event","forEach","globalForBus","bus","vibedocBus","emitUpdate","payload","ts","Date","toISOString"],"mappings":"smDAAA,IAAA,EAAA,EAAA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AS,CAACI,GAAG,CAACD,GACZ,IAAM,IAAI,CAACH,SAAS,CAACzB,MAAM,CAAC4B,EACrC,CAEAE,KAAKC,CAAc,CAAE,CACnB,IAAI,CAACN,SAAS,CAACO,OAAO,CAACJ,IACrB,GAAI,CAAEA,EAAGG,EAAO,CAAE,KAAM,CAAC,CAC3B,EACF,CACF,CAGA,IAAME,EAAerG,WACRsG,EAAMD,EAAaE,UAAU,GAAKF,CAAD,CAAcE,UAAU,CAAG,IAAIX,CAAAA,CAAU,+BAEhF,SAASY,AAAW9D,CAAY,CAAE+D,CAAgB,EACvDH,EAAIJ,IAAI,CAAC,MAAExD,UAAM+D,EAASC,GAAI,IAAIC,OAAOC,WAAW,EAAG,EACzD","ignoreList":[1]}
|
|
1
|
+
{"version":3,"sources":["../../../src/app/api/setup/write/route.ts","../../../node_modules/.pnpm/next%4016.3.6_%40babel%2Bcore%407.29.7_%40types%2Bnode%4022.20.4_react-dom%4019.3.0_react%4019.3.0__react%4019.3.0/node_modules/next/src/build/templates/app-route.ts","../../../src/lib/events.ts"],"sourcesContent":["import { NextRequest, NextResponse } from 'next/server'\r\nimport { createDoc, getConfiguredRoot } from '@/lib/core'\r\nimport { emitUpdate } from '@/lib/events'\r\n\r\ninterface FileToWrite {\r\n path: string\r\n content: string\r\n skipped?: boolean\r\n}\r\n\r\nexport async function POST(req: NextRequest) {\r\n try {\r\n const root = req.nextUrl.searchParams.get('root') || getConfiguredRoot()\r\n const { files } = await req.json() as { files: FileToWrite[] }\r\n\r\n const results: { path: string; success: boolean; error?: string }[] = []\r\n\r\n for (const file of files) {\r\n if (file.skipped) continue\r\n\r\n try {\r\n await createDoc(file.path, file.content, root)\r\n emitUpdate('doc_created', { path: file.path })\r\n results.push({ path: file.path, success: true })\r\n } catch (e) {\r\n const err = e as NodeJS.ErrnoException\r\n if (err.code === 'EEXIST') {\r\n results.push({ path: file.path, success: false, error: 'already exists' })\r\n } else {\r\n results.push({ path: file.path, success: false, error: (e as Error).message })\r\n }\r\n }\r\n }\r\n\r\n return NextResponse.json({ results })\r\n } catch (e) {\r\n return NextResponse.json({ error: (e as Error).message }, { status: 500 })\r\n }\r\n}\r\n","import {\n AppRouteRouteModule,\n type AppRouteRouteHandlerContext,\n type AppRouteRouteModuleOptions,\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 {\n getTracer,\n type Span,\n SpanKind,\n SpanStatusCode,\n} 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'\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 lazy require factory ensures that:\n // - In dev: devRequestTimingInternalsEnd is set before userland executes,\n // correctly attributing module load time to application-code rather than\n // framework internals.\n // - In all modes: async modules (route files with top-level await) are\n // handled correctly — require() returns a Promise for such modules, which\n // ensureUserland() awaits before the first request is handled.\n userland: () => require('VAR_USERLAND') as typeof import('VAR_USERLAND'),\n // In Turbopack dev mode, also provide a synchronous per-request getter so\n // server HMR updates are picked up without re-executing the entry chunk.\n // Using require() (synchronous) avoids adding async overhead that would be\n // incorrectly attributed to application-code time in devRequestTiming.\n ...(process.env.TURBOPACK && process.env.__NEXT_DEV_SERVER\n ? {\n getUserland: () =>\n require('VAR_USERLAND') as typeof 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 useCacheTimeout: nextConfig.experimental.useCacheTimeout,\n },\n cacheComponents: Boolean(nextConfig.cacheComponents),\n validationLevel: nextConfig.experimental.instantInsights.validationLevel,\n supportsDynamicResponse,\n incrementalCache,\n hmrRefreshHash: getRequestMeta(req, 'hmrRefreshHash'),\n cacheLifeProfiles: nextConfig.cacheLife,\n staticPageGenerationTimeout: nextConfig.staticPageGenerationTimeout,\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 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 routeModule.handle(nextReq, context)\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 ? // Fall back to the global `expireTime` config when the\n // route has a numeric `revalidate` but didn't declare an\n // explicit `expire` (e.g. via `cacheLife`). This mirrors the\n // build-time fallback in `build/index.ts` so cache entries\n // and the response Cache-Control header agree on the route's\n // effective expire. Routes that opt out of revalidation\n // (`revalidate: false`) or that are dynamic (`revalidate: 0`)\n // keep `expire: undefined`.\n revalidate !== false && revalidate > 0\n ? nextConfig.expireTime\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(nodeNextReq, nodeNextRes, response, pendingWaitUntil)\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 handleResponse = async (\n currentSpan: Span | undefined,\n parentSpan: Span | undefined\n ) => {\n try {\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\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\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\n } finally {\n ;(() => {\n if (!currentSpan) {\n return\n }\n\n let statusCode = res.statusCode\n\n currentSpan.setAttributes({\n 'http.status_code': statusCode,\n 'next.rsc': false,\n })\n\n if (statusCode && statusCode >= 500) {\n // For 5xx status codes: SHOULD be set to 'Error' span status.\n // x-ref: https://opentelemetry.io/docs/specs/semconv/http/http-spans/#status\n currentSpan.setStatus({\n code: SpanStatusCode.ERROR,\n })\n // For span status 'Error', SHOULD set 'error.type' attribute.\n currentSpan.setAttribute('error.type', statusCode.toString())\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') || normalizedSrcPage\n const name = `${method} ${route}`\n\n currentSpan.setAttributes({\n 'next.route': route,\n 'http.route': route,\n 'next.span_name': name,\n })\n currentSpan.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 !== currentSpan) {\n parentSpan.setAttribute('http.route', route)\n parentSpan.updateName(name)\n }\n })()\n }\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, undefined)\n } else {\n let 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 (span) => handleResponse(span, parentSpan)\n ),\n undefined,\n !isWrappedByNextServer\n )\n }\n}\n","/**\r\n * src/lib/events.ts\r\n * In-process SSE event bus.\r\n * API routes push events here; /api/events streams them to the browser.\r\n */\r\n\r\ntype Listener = (data: unknown) => void\r\n\r\nclass EventBus {\r\n private listeners = new Set<Listener>()\r\n\r\n subscribe(fn: Listener) {\r\n this.listeners.add(fn)\r\n return () => this.listeners.delete(fn)\r\n }\r\n\r\n emit(event: unknown) {\r\n this.listeners.forEach(fn => {\r\n try { fn(event) } catch {}\r\n })\r\n }\r\n}\r\n\r\n// Singleton — shared across all API routes in the same process\r\nconst globalForBus = globalThis as unknown as { vibedocBus?: EventBus }\r\nexport const bus = globalForBus.vibedocBus ?? (globalForBus.vibedocBus = new EventBus())\r\n\r\nexport function emitUpdate(type: string, payload: unknown) {\r\n bus.emit({ type, payload, ts: new Date().toISOString() })\r\n}\r\n"],"names":["POST","req","root","nextUrl","searchParams","get","files","json","results","file","skipped","path","content","push","success","e","err","code","error","message","status","AppRouteRouteModule","RouteKind","patchFetch","_patchFetch","addRequestMeta","getRequestMeta","setRequestMeta","getTracer","SpanKind","SpanStatusCode","setManifestsSingleton","normalizeAppPath","NodeNextRequest","NodeNextResponse","NextRequestAdapter","signalFromNodeResponse","BaseServerSpan","getRevalidateReason","sendResponse","fromNodeOutgoingHttpHeaders","toNodeOutgoingHttpHeaders","getCacheControlHeader","INFINITE_CACHE","NEXT_CACHE_TAGS_HEADER","NoFallbackError","CachedRouteKind","routeModule","definition","kind","APP_ROUTE","page","pathname","filename","bundlePath","distDir","process","env","__NEXT_RELATIVE_DIST_DIR","relativeProjectDir","__NEXT_RELATIVE_PROJECT_DIR","resolvedPagePath","nextConfigOutput","userland","require","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","useCacheTimeout","cacheComponents","validationLevel","instantInsights","hmrRefreshHash","cacheLifeProfiles","cacheLife","staticPageGenerationTimeout","onClose","cb","on","onAfterTaskError","undefined","onInstrumentationRequestError","_request","errorContext","silenceLog","onRequestError","sharedContext","nodeNextReq","nodeNextRes","nextReq","fromNodeNextRequest","responseGenerator","previousCacheEntry","setHeader","response","handle","fetchMetrics","pendingWaitUntil","cacheTags","collectedTags","blob","headers","type","revalidate","collectedRevalidate","expire","collectedExpire","expireTime","cacheEntry","value","body","Buffer","from","arrayBuffer","cacheControl","isStale","routerKind","routePath","routeType","revalidateReason","handleResponse","currentSpan","parentSpan","routeKind","isFallback","isRoutePPREnabled","Error","isMiss","delete","getHeader","set","Response","setAttributes","setStatus","ERROR","setAttribute","toString","rootSpanAttributes","getRootSpanAttributes","handleRequest","console","warn","route","name","updateName","withPropagatedContext","trace","spanName","SERVER","attributes","url","span","EventBus","listeners","Set","subscribe","fn","add","emit","event","forEach","globalForBus","bus","vibedocBus","emitUpdate","payload","ts","Date","toISOString"],"mappings":"2zDAAA,IAAA,EAAA,EAAA,CAAA,CAAA,QACA,EAAA,EAAA,CAAA,CAAA,QACA,EAAA,EAAA,CAAA,CAAA,QAQO,eAAeA,EAAKC,CAAgB,EACzC,GAAI,CACF,IAAMC,EAAOD,EAAIE,OAAO,CAACC,YAAY,CAACC,GAAG,CAAC,SAAW,CAAA,EAAA,EAAA,iBAAA,AAAiB,IAChE,OAAEC,CAAK,CAAE,CAAG,MAAML,EAAIM,IAAI,GAE1BC,EAAgE,EAAE,CAExE,IAAK,IAAMC,KAAQH,EACjB,IADwB,AACpBG,EAAKC,OAAO,CAEhB,CAFkB,EAEd,CACF,MAAM,CAAA,EAAA,EAAA,SAAA,AAAS,EAACD,EAAKE,IAAI,CAAEF,EAAKG,OAAO,CAAEV,GACzC,CAAA,EAAA,EAAA,UAAA,AAAU,EAAC,cAAe,CAAES,KAAMF,EAAKE,IAAI,AAAC,GAC5CH,EAAQK,IAAI,CAAC,CAAEF,KAAMF,EAAKE,IAAI,CAAEG,SAAS,CAAK,EAChD,CAAE,MAAOC,EAAG,CAEO,UAAU,CADfA,AACRC,EAAIC,IAAI,CACVT,EAAQK,IAAI,CAAC,CAAEF,KAAMF,EAAKE,IAAI,CAAEG,SAAS,EAAOI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AAK,CACV7K,EAAAA,cAAAA,CAAesK,aAAa,CAC5B,CACEQ,SAAU,CAAA,EAAGhG,EAAO,CAAC,EAAErC,EAAAA,CAAS,CAChC7B,KAAMpB,EAAAA,QAAAA,CAASuL,MAAM,CACrBC,WAAY,CACV,cAAelG,EACf,cAAelH,EAAIqN,GACrB,AADwB,CAE1B,EACA,AAACC,GAAS/B,EAAe+B,EAAM7B,SAEnC1C,EACA,CAACzB,EAEL,CACF,mCAhgBA,SAAShG,EACP,MAAA,CAAA,EAAOC,EAAAA,UAAAA,EAAY,kBACjB4C,uBACAC,CACF,EACF,kHCtFA,OAAMmJ,EACIC,UAAY,IAAIC,GAAe,CAEvCC,UAAUC,CAAY,CAAE,CAEtB,OADA,IAAI,CAACH,SAAS,CAACI,GAAG,CAACD,GACZ,IAAM,IAAI,CAACH,SAAS,CAACzB,MAAM,CAAC4B,EACrC,CAEAE,KAAKC,CAAc,CAAE,CACnB,IAAI,CAACN,SAAS,CAACO,OAAO,CAACJ,IACrB,GAAI,CAAEA,EAAGG,EAAO,CAAE,KAAM,CAAC,CAC3B,EACF,CACF,CAGA,IAAME,EAAerG,WACRsG,EAAMD,EAAaE,UAAU,GAAKF,CAAD,CAAcE,UAAU,CAAG,IAAIX,CAAAA,CAAU,+BAEhF,SAASY,AAAW9D,CAAY,CAAE+D,CAAgB,EACvDH,EAAIJ,IAAI,CAAC,MAAExD,UAAM+D,EAASC,GAAI,IAAIC,OAAOC,WAAW,EAAG,EACzD","ignoreList":[1]}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
module.exports=[270406,(e,t,r)=>{t.exports=e.x("next/dist/compiled/@opentelemetry/api",()=>require("next/dist/compiled/@opentelemetry/api"))},918622,(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"))},120635,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/action-async-storage.external.js",()=>require("next/dist/server/app-render/action-async-storage.external.js"))},324725,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/after-task-async-storage.external.js",()=>require("next/dist/server/app-render/after-task-async-storage.external.js"))},556704,(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"))},832319,(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"))},559043,(e,t,r)=>{t.exports=e.x("next/dist/server/runtime-reacts.external.js",()=>require("next/dist/server/runtime-reacts.external.js"))},193695,(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"))},902157,(e,t,r)=>{t.exports=e.x("node:fs",()=>require("node:fs"))},912714,(e,t,r)=>{t.exports=e.x("node:fs/promises",()=>require("node:fs/promises"))},750227,(e,t,r)=>{t.exports=e.x("node:path",()=>require("node:path"))},81111,(e,t,r)=>{t.exports=e.x("node:stream",()=>require("node:stream"))},814747,(e,t,r)=>{t.exports=e.x("path",()=>require("path"))},525200,e=>{"use strict";var t=e.i(192258),r=e.i(799501),a=e.i(498768);async function s(e){try{let a=e.nextUrl.searchParams.get("root")||(0,r.getConfiguredRoot)(),s=await (0,r.listExplorerFiles)(a);return t.NextResponse.json(s)}catch(e){return t.NextResponse.json({error:e.message},{status:500})}}async function n(e){if(!process.env.ANTHROPIC_API_KEY)return t.NextResponse.json({error:"ANTHROPIC_API_KEY not configured"},{status:501});try{let s=await e.json(),n=s.root||(0,r.getConfiguredRoot)(),o=s.path;if(!o)return t.NextResponse.json({error:"path is required"},{status:400});let i=await (0,r.enrichDescription)(o,n);return(0,a.emitUpdate)("description_enriched",{path:o}),t.NextResponse.json({description:i,source:"ai"})}catch(e){return t.NextResponse.json({error:e.message},{status:500})}}e.s(["GET",0,s,"POST",0,n])},846994,e=>{"use strict";var t=e.i(440807),r=e.i(381144),a=e.i(522639),s=e.i(165892),n=e.i(781831),o=e.i(740095),i=e.i(931106),l=e.i(253258),u=e.i(488026),d=e.i(571998),p=e.i(666314),c=e.i(598783),x=e.i(759703),h=e.i(163677),R=e.i(450859),v=e.i(193695);e.i(582432);var g=e.i(274687);let m=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/api/explorer/route",pathname:"/api/explorer",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/src/app/api/explorer/route.ts",nextConfigOutput:"",userland:()=>e.r(525200),...{}}),{workAsyncStorage:f,workUnitAsyncStorage:w,serverHooks:E}=m;async function C(e,t,a){a.requestMeta&&(0,s.setRequestMeta)(e,a.requestMeta),m.isDev&&(0,s.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let f="/api/explorer/route";f=f.replace(/\/index$/,"")||"/";let w=await m.prepare(e,t,{srcPage:f,multiZoneDraftMode:!1});if(!w)return t.statusCode=400,t.end("Bad Request"),null==a.waitUntil||a.waitUntil.call(a,Promise.resolve()),null;let{buildId:E,deploymentId:C,params:y,nextConfig:b,parsedUrl:A,isDraftMode:T,prerenderManifest:q,routerServerContext:N,isOnDemandRevalidate:P,revalidateOnlyGenerated:S,resolvedPathname:j,clientReferenceManifest:_,serverActionsManifest:O}=w,I=(0,i.normalizeAppPath)(f),k=!!(q.dynamicRoutes[I]||q.routes[j]),H=async()=>((null==N?void 0:N.render404)?await N.render404(e,t,A,!1):t.end("This page could not be found"),null);if(k&&!T){let e=!!q.routes[j],t=q.dynamicRoutes[I];if(t&&!1===t.fallback&&!e){if(b.adapterPath)return await H();throw new v.NoFallbackError}}let U=null;!k||m.isDev||T||(U="/index"===(U=j)?"/":U);let M=!0===m.isDev||!k,D=k&&!M;O&&_&&(0,o.setManifestsSingleton)({page:f,clientReferenceManifest:_,serverActionsManifest:O});let K=e.method||"GET",F=(0,n.getTracer)(),B=F.getActiveScopeSpan(),L=!!(null==N?void 0:N.isWrappedByNextServer),$=!!(0,s.getRequestMeta)(e,"minimalMode"),G=(0,s.getRequestMeta)(e,"incrementalCache")||await m.getIncrementalCache(e,b,q,$);null==G||G.resetRequestCache(),globalThis.__incrementalCache=G;let V={params:y,previewProps:q.preview,renderOpts:{experimental:{authInterrupts:!!b.experimental.authInterrupts,useCacheTimeout:b.experimental.useCacheTimeout},cacheComponents:!!b.cacheComponents,validationLevel:b.experimental.instantInsights.validationLevel,supportsDynamicResponse:M,incrementalCache:G,hmrRefreshHash:(0,s.getRequestMeta)(e,"hmrRefreshHash"),cacheLifeProfiles:b.cacheLife,staticPageGenerationTimeout:b.staticPageGenerationTimeout,waitUntil:a.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,a,s)=>m.onRequestError(e,t,a,s,N)},sharedContext:{buildId:E,deploymentId:C}},X=new l.NodeNextRequest(e),W=new l.NodeNextResponse(t),Y=u.NextRequestAdapter.fromNodeNextRequest(X,(0,u.signalFromNodeResponse)(t)),z=async({previousCacheEntry:r})=>{try{if(!$&&P&&S&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let s=await m.handle(Y,V);e.fetchMetrics=V.renderOpts.fetchMetrics;let n=V.renderOpts.pendingWaitUntil;n&&a.waitUntil&&(a.waitUntil(n),n=void 0);let o=V.renderOpts.collectedTags;if(!k)return await (0,c.sendResponse)(X,W,s,n),null;{let e=await s.blob(),t=(0,x.toNodeOutgoingHttpHeaders)(s.headers);o&&(t[R.NEXT_CACHE_TAGS_HEADER]=o),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==V.renderOpts.collectedRevalidate&&!(V.renderOpts.collectedRevalidate>=R.INFINITE_CACHE)&&V.renderOpts.collectedRevalidate,a=void 0===V.renderOpts.collectedExpire||V.renderOpts.collectedExpire>=R.INFINITE_CACHE?!1!==r&&r>0?b.expireTime:void 0:V.renderOpts.collectedExpire;return{value:{kind:g.CachedRouteKind.APP_ROUTE,status:s.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:a}}}}catch(t){throw(null==r?void 0:r.isStale)&&await m.onRequestError(e,t,{routerKind:"App Router",routePath:f,routeType:"route",revalidateReason:(0,p.getRevalidateReason)({isStaticGeneration:D,isOnDemandRevalidate:P})},!1,N),t}},Z=async(s,o)=>{try{var i,l;let s=await m.handleResponse({req:e,nextConfig:b,cacheKey:U,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:q,isRoutePPREnabled:!1,isOnDemandRevalidate:P,revalidateOnlyGenerated:S,responseGenerator:z,waitUntil:a.waitUntil,isMinimalMode:$});if(!k)return;if((null==s||null==(i=s.value)?void 0:i.kind)!==g.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==s||null==(l=s.value)?void 0:l.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});$||t.setHeader("x-nextjs-cache",P?"REVALIDATED":s.isMiss?"MISS":s.isStale?"STALE":"HIT"),T&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let n=(0,x.fromNodeOutgoingHttpHeaders)(s.value.headers);$&&k||n.delete(R.NEXT_CACHE_TAGS_HEADER),!s.cacheControl||t.getHeader("Cache-Control")||n.get("Cache-Control")||n.set("Cache-Control",(0,h.getCacheControlHeader)(s.cacheControl)),await (0,c.sendResponse)(X,W,new Response(s.value.body,{headers:n,status:s.value.status||200}));return}catch(t){if(t instanceof v.NoFallbackError||await m.onRequestError(e,t,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,p.getRevalidateReason)({isStaticGeneration:D,isOnDemandRevalidate:P})},!1,N),k)throw t;await (0,c.sendResponse)(X,W,new Response(null,{status:500}));return}finally{(()=>{if(!s)return;let e=t.statusCode;s.setAttributes({"http.status_code":e,"next.rsc":!1}),e&&e>=500&&(s.setStatus({code:n.SpanStatusCode.ERROR}),s.setAttribute("error.type",e.toString()));let r=F.getRootSpanAttributes();if(!r)return;if(r.get("next.span_type")!==d.BaseServerSpan.handleRequest)return 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")||I,i=`${K} ${a}`;s.setAttributes({"next.route":a,"http.route":a,"next.span_name":i}),s.updateName(i),o&&o!==s&&(o.setAttribute("http.route",a),o.updateName(i))})()}};if(L&&B)await Z(B,void 0);else{let t=F.getActiveScopeSpan();await F.withPropagatedContext(e.headers,()=>F.trace(d.BaseServerSpan.handleRequest,{spanName:`${K} ${f}`,kind:n.SpanKind.SERVER,attributes:{"http.method":K,"http.target":e.url}},e=>Z(e,t)),void 0,!L)}}e.s(["handler",0,C,"patchFetch",0,function(){return(0,a.patchFetch)({workAsyncStorage:f,workUnitAsyncStorage:w})},"routeModule",0,m,"serverHooks",0,E,"workAsyncStorage",0,f,"workUnitAsyncStorage",0,w])},498768,e=>{"use strict";class t{listeners=new Set;subscribe(e){return this.listeners.add(e),()=>this.listeners.delete(e)}emit(e){this.listeners.forEach(t=>{try{t(e)}catch{}})}}let r=globalThis,a=r.vibedocBus??(r.vibedocBus=new t);e.s(["bus",0,a,"emitUpdate",0,function(e,t){a.emit({type:e,payload:t,ts:new Date().toISOString()})}])}];
|
|
2
|
+
|
|
3
|
+
//# sourceMappingURL=%5Broot-of-the-server%5D__18kxo4a._.js.map
|