@sleep2agi/agent-network-dashboard 0.6.3-preview.36 → 0.6.3-preview.38
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_COMMIT +1 -1
- package/.next/BUILD_ID +1 -1
- package/.next/build-manifest.json +3 -3
- package/.next/diagnostics/route-bundle-stats.json +17 -17
- package/.next/fallback-build-manifest.json +3 -3
- 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/_head.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/server/app/_not-found.html +2 -2
- 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/_head.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_index.segment.rsc +2 -2
- package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/admin/page_client-reference-manifest.js +1 -1
- package/.next/server/app/admin.html +2 -2
- package/.next/server/app/admin.rsc +2 -2
- package/.next/server/app/admin.segments/_full.segment.rsc +2 -2
- package/.next/server/app/admin.segments/_head.segment.rsc +1 -1
- package/.next/server/app/admin.segments/_index.segment.rsc +2 -2
- package/.next/server/app/admin.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/admin.segments/admin/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/admin.segments/admin.segment.rsc +1 -1
- package/.next/server/app/index.html +2 -2
- package/.next/server/app/index.rsc +3 -3
- package/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/index.segments/_full.segment.rsc +3 -3
- package/.next/server/app/index.segments/_head.segment.rsc +1 -1
- package/.next/server/app/index.segments/_index.segment.rsc +2 -2
- package/.next/server/app/index.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/login/page_client-reference-manifest.js +1 -1
- package/.next/server/app/login.html +2 -2
- package/.next/server/app/login.rsc +3 -3
- package/.next/server/app/login.segments/_full.segment.rsc +3 -3
- package/.next/server/app/login.segments/_head.segment.rsc +1 -1
- package/.next/server/app/login.segments/_index.segment.rsc +2 -2
- package/.next/server/app/login.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/login.segments/login/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/login.segments/login.segment.rsc +1 -1
- package/.next/server/app/logs/page_client-reference-manifest.js +1 -1
- package/.next/server/app/logs.html +2 -2
- package/.next/server/app/logs.rsc +2 -2
- package/.next/server/app/logs.segments/_full.segment.rsc +2 -2
- package/.next/server/app/logs.segments/_head.segment.rsc +1 -1
- package/.next/server/app/logs.segments/_index.segment.rsc +2 -2
- package/.next/server/app/logs.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/logs.segments/logs/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/logs.segments/logs.segment.rsc +1 -1
- package/.next/server/app/messages/page.js.nft.json +1 -1
- package/.next/server/app/messages/page_client-reference-manifest.js +1 -1
- package/.next/server/app/messages.html +2 -2
- package/.next/server/app/messages.rsc +3 -3
- package/.next/server/app/messages.segments/_full.segment.rsc +3 -3
- package/.next/server/app/messages.segments/_head.segment.rsc +1 -1
- package/.next/server/app/messages.segments/_index.segment.rsc +2 -2
- package/.next/server/app/messages.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/messages.segments/messages/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/messages.segments/messages.segment.rsc +1 -1
- package/.next/server/app/node/page.js.nft.json +1 -1
- package/.next/server/app/node/page_client-reference-manifest.js +1 -1
- package/.next/server/app/node.html +2 -2
- package/.next/server/app/node.rsc +3 -3
- package/.next/server/app/node.segments/_full.segment.rsc +3 -3
- package/.next/server/app/node.segments/_head.segment.rsc +1 -1
- package/.next/server/app/node.segments/_index.segment.rsc +2 -2
- package/.next/server/app/node.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/node.segments/node/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/node.segments/node.segment.rsc +1 -1
- package/.next/server/app/nodes/page.js.nft.json +1 -1
- package/.next/server/app/nodes/page_client-reference-manifest.js +1 -1
- package/.next/server/app/nodes.html +2 -2
- package/.next/server/app/nodes.rsc +3 -3
- package/.next/server/app/nodes.segments/_full.segment.rsc +3 -3
- package/.next/server/app/nodes.segments/_head.segment.rsc +1 -1
- package/.next/server/app/nodes.segments/_index.segment.rsc +2 -2
- package/.next/server/app/nodes.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/nodes.segments/nodes/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/nodes.segments/nodes.segment.rsc +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/providers/page_client-reference-manifest.js +1 -1
- package/.next/server/app/providers.html +2 -2
- package/.next/server/app/providers.rsc +2 -2
- package/.next/server/app/providers.segments/_full.segment.rsc +2 -2
- package/.next/server/app/providers.segments/_head.segment.rsc +1 -1
- package/.next/server/app/providers.segments/_index.segment.rsc +2 -2
- package/.next/server/app/providers.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/providers.segments/providers/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/providers.segments/providers.segment.rsc +1 -1
- package/.next/server/app/server-logs/page_client-reference-manifest.js +1 -1
- package/.next/server/app/server-logs.html +2 -2
- package/.next/server/app/server-logs.rsc +2 -2
- package/.next/server/app/server-logs.segments/_full.segment.rsc +2 -2
- package/.next/server/app/server-logs.segments/_head.segment.rsc +1 -1
- package/.next/server/app/server-logs.segments/_index.segment.rsc +2 -2
- package/.next/server/app/server-logs.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/server-logs.segments/server-logs/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/server-logs.segments/server-logs.segment.rsc +1 -1
- package/.next/server/app/servers/page_client-reference-manifest.js +1 -1
- package/.next/server/app/servers.html +2 -2
- package/.next/server/app/servers.rsc +2 -2
- package/.next/server/app/servers.segments/_full.segment.rsc +2 -2
- package/.next/server/app/servers.segments/_head.segment.rsc +1 -1
- package/.next/server/app/servers.segments/_index.segment.rsc +2 -2
- package/.next/server/app/servers.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/servers.segments/servers/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/servers.segments/servers.segment.rsc +1 -1
- package/.next/server/app/settings/networks/page_client-reference-manifest.js +1 -1
- package/.next/server/app/settings/networks.html +2 -2
- package/.next/server/app/settings/networks.rsc +2 -2
- package/.next/server/app/settings/networks.segments/_full.segment.rsc +2 -2
- package/.next/server/app/settings/networks.segments/_head.segment.rsc +1 -1
- package/.next/server/app/settings/networks.segments/_index.segment.rsc +2 -2
- package/.next/server/app/settings/networks.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/settings/networks.segments/settings/networks/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/settings/networks.segments/settings/networks.segment.rsc +1 -1
- package/.next/server/app/settings/networks.segments/settings.segment.rsc +1 -1
- package/.next/server/app/settings/page_client-reference-manifest.js +1 -1
- package/.next/server/app/settings/tokens/page_client-reference-manifest.js +1 -1
- package/.next/server/app/settings/tokens.html +2 -2
- package/.next/server/app/settings/tokens.rsc +2 -2
- package/.next/server/app/settings/tokens.segments/_full.segment.rsc +2 -2
- package/.next/server/app/settings/tokens.segments/_head.segment.rsc +1 -1
- package/.next/server/app/settings/tokens.segments/_index.segment.rsc +2 -2
- package/.next/server/app/settings/tokens.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/settings/tokens.segments/settings/tokens/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/settings/tokens.segments/settings/tokens.segment.rsc +1 -1
- package/.next/server/app/settings/tokens.segments/settings.segment.rsc +1 -1
- package/.next/server/app/settings.html +2 -2
- package/.next/server/app/settings.rsc +3 -3
- package/.next/server/app/settings.segments/_full.segment.rsc +3 -3
- package/.next/server/app/settings.segments/_head.segment.rsc +1 -1
- package/.next/server/app/settings.segments/_index.segment.rsc +2 -2
- package/.next/server/app/settings.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/settings.segments/settings/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/settings.segments/settings.segment.rsc +1 -1
- package/.next/server/app/tasks/[id]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/tasks/page_client-reference-manifest.js +1 -1
- package/.next/server/app/tasks.html +2 -2
- package/.next/server/app/tasks.rsc +2 -2
- package/.next/server/app/tasks.segments/_full.segment.rsc +2 -2
- package/.next/server/app/tasks.segments/_head.segment.rsc +1 -1
- package/.next/server/app/tasks.segments/_index.segment.rsc +2 -2
- package/.next/server/app/tasks.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/tasks.segments/tasks/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/tasks.segments/tasks.segment.rsc +1 -1
- package/.next/server/chunks/[root-of-the-server]__0nhjt1j._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__0nhjt1j._.js.map +1 -1
- package/.next/server/chunks/ssr/0s9s_fef0eb55-b39c-4abc-b7ff-48440b9ad805_scratchpad_dashrel_0-q_i4z._.js +1 -1
- package/.next/server/chunks/ssr/0s9s_fef0eb55-b39c-4abc-b7ff-48440b9ad805_scratchpad_dashrel_0-q_i4z._.js.map +1 -1
- package/.next/server/chunks/ssr/0s9s_fef0eb55-b39c-4abc-b7ff-48440b9ad805_scratchpad_dashrel_app_01~-ebd._.js +3 -0
- package/.next/server/chunks/ssr/0s9s_fef0eb55-b39c-4abc-b7ff-48440b9ad805_scratchpad_dashrel_app_01~-ebd._.js.map +1 -0
- package/.next/server/chunks/ssr/{0s9s_fef0eb55-b39c-4abc-b7ff-48440b9ad805_scratchpad_dashrel_app_0~af09u._.js → 0s9s_fef0eb55-b39c-4abc-b7ff-48440b9ad805_scratchpad_dashrel_app_0ei5728._.js} +2 -2
- package/.next/server/chunks/ssr/0s9s_fef0eb55-b39c-4abc-b7ff-48440b9ad805_scratchpad_dashrel_app_0ei5728._.js.map +1 -0
- package/.next/server/chunks/ssr/0s9s_fef0eb55-b39c-4abc-b7ff-48440b9ad805_scratchpad_dashrel_app_0lzn~cs._.js +3 -0
- package/.next/server/chunks/ssr/0s9s_fef0eb55-b39c-4abc-b7ff-48440b9ad805_scratchpad_dashrel_app_0lzn~cs._.js.map +1 -0
- package/.next/server/chunks/ssr/0s9s_fef0eb55-b39c-4abc-b7ff-48440b9ad805_scratchpad_dashrel_app_0mek_e~._.js +1 -1
- package/.next/server/chunks/ssr/0s9s_fef0eb55-b39c-4abc-b7ff-48440b9ad805_scratchpad_dashrel_app_0mek_e~._.js.map +1 -1
- package/.next/server/chunks/ssr/0s9s_fef0eb55-b39c-4abc-b7ff-48440b9ad805_scratchpad_dashrel_app_0wz8z_e._.js +3 -0
- package/.next/server/chunks/ssr/0s9s_fef0eb55-b39c-4abc-b7ff-48440b9ad805_scratchpad_dashrel_app_0wz8z_e._.js.map +1 -0
- package/.next/server/chunks/ssr/0s9s_fef0eb55-b39c-4abc-b7ff-48440b9ad805_scratchpad_dashrel_app_0~ejwde._.js +1 -1
- package/.next/server/chunks/ssr/0s9s_fef0eb55-b39c-4abc-b7ff-48440b9ad805_scratchpad_dashrel_app_0~ejwde._.js.map +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__04fj5h4._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__04fj5h4._.js.map +1 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__05plnr_._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__05plnr_._.js.map +1 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0l~vdgn._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0l~vdgn._.js.map +1 -0
- package/.next/server/middleware-build-manifest.js +3 -3
- package/.next/server/pages/404.html +2 -2
- package/.next/server/pages/500.html +1 -1
- package/.next/static/chunks/0.9a87jy~7oy7.js +1 -0
- package/.next/static/chunks/{17xziuvljtbgu.js → 04y_am25nk4g..js} +2 -2
- package/.next/static/chunks/04~ypes~t4khh.js +1 -0
- package/.next/static/chunks/07v6jb88z-i_e.js +1 -0
- package/.next/static/chunks/{0oeec5pqx225a.js → 09i6ca.w747vu.js} +1 -1
- package/.next/static/chunks/0fd~3xz~5b60s.js +1 -0
- package/.next/static/chunks/0xy6sa.x2zvar.css +1 -0
- package/.next/static/chunks/{05q4-tajm2ro0.js → 14xnrhzhmv37o.js} +2 -2
- package/.next/trace +2 -2
- package/.next/trace-build +1 -1
- package/app/api/hub/files/[fileId]/route.ts +122 -11
- package/app/components/AttachmentBlock.tsx +316 -19
- package/app/components/StatsBar.tsx +1 -1
- package/app/globals.css +39 -0
- package/app/login/page.tsx +6 -3
- package/app/settings/page.tsx +11 -2
- package/package.json +1 -1
- package/tests/e2e-492-inline-preview/verify-summary.md +41 -0
- package/tests/e2e-492-inline-preview/verify.sh +227 -0
- package/.next/server/chunks/ssr/0s9s_fef0eb55-b39c-4abc-b7ff-48440b9ad805_scratchpad_dashrel_app_0~af09u._.js.map +0 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__00kmdl9._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__00kmdl9._.js.map +0 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__0lazm_f._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__0lazm_f._.js.map +0 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__0na-tid._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__0na-tid._.js.map +0 -1
- package/.next/static/chunks/0674olziwpn0_.js +0 -1
- package/.next/static/chunks/0e_8y0eqxx5-f.js +0 -1
- package/.next/static/chunks/0hz543f47.wfq.js +0 -1
- package/.next/static/chunks/0r8.yg06i-7k7.css +0 -1
- package/.next/static/chunks/13glckdatkyjp.js +0 -1
- /package/.next/static/{OGSBENKwMZrIs7sgSz8um → Z3OXIK1qxOxTQv7WJWgfC}/_buildManifest.js +0 -0
- /package/.next/static/{OGSBENKwMZrIs7sgSz8um → Z3OXIK1qxOxTQv7WJWgfC}/_clientMiddlewareManifest.js +0 -0
- /package/.next/static/{OGSBENKwMZrIs7sgSz8um → Z3OXIK1qxOxTQv7WJWgfC}/_ssgManifest.js +0 -0
|
@@ -6,5 +6,5 @@
|
|
|
6
6
|
6:I[21637,["/_next/static/chunks/08zoo9fiegm~i.js","/_next/static/chunks/0f9t_qujwbffz.js","/_next/static/chunks/0pks~2shyhhw9.js","/_next/static/chunks/0qddp9ub8gzk7.js"],"default"]
|
|
7
7
|
7:I[83679,["/_next/static/chunks/08zoo9fiegm~i.js","/_next/static/chunks/0f9t_qujwbffz.js","/_next/static/chunks/0pks~2shyhhw9.js","/_next/static/chunks/0qddp9ub8gzk7.js"],"default"]
|
|
8
8
|
:HL["/_next/static/chunks/066jf0nk75nic.css","style"]
|
|
9
|
-
:HL["/_next/static/chunks/
|
|
10
|
-
0:{"rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/chunks/066jf0nk75nic.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/_next/static/chunks/
|
|
9
|
+
:HL["/_next/static/chunks/0xy6sa.x2zvar.css","style"]
|
|
10
|
+
0:{"rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/chunks/066jf0nk75nic.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/_next/static/chunks/0xy6sa.x2zvar.css","precedence":"next"}],["$","script","script-0",{"src":"/_next/static/chunks/08zoo9fiegm~i.js","async":true}],["$","script","script-1",{"src":"/_next/static/chunks/0f9t_qujwbffz.js","async":true}],["$","script","script-2",{"src":"/_next/static/chunks/0pks~2shyhhw9.js","async":true}],["$","script","script-3",{"src":"/_next/static/chunks/0qddp9ub8gzk7.js","async":true}]],["$","html",null,{"lang":"en","data-theme":"cyber","className":"geist_a71539c9-module__T19VSG__variable geist_mono_8d43a2aa-module__8Li5zG__variable h-full antialiased","children":[["$","head",null,{"children":["$","script",null,{"dangerouslySetInnerHTML":{"__html":"\ntry {\n var t = localStorage.getItem('anet-theme') || 'cyber';\n document.documentElement.setAttribute('data-theme', t);\n} catch (e) {}\n"}}]}],["$","body",null,{"className":"min-h-full","style":{"background":"var(--bg)","color":"var(--fg)"},"children":["$","$L2",null,{"children":["$","$L3",null,{"children":[["$","$L4",null,{}],["$","$L5",null,{"children":["$","$L6",null,{"parallelRouterKey":"children","template":["$","$L7",null,{}],"notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]]}]}]]}]}]}]]}]]}],"isPartial":false,"staleTime":300,"varyParams":null,"buildId":"Z3OXIK1qxOxTQv7WJWgfC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
:HL["/_next/static/chunks/066jf0nk75nic.css","style"]
|
|
2
|
-
:HL["/_next/static/chunks/
|
|
2
|
+
:HL["/_next/static/chunks/0xy6sa.x2zvar.css","style"]
|
|
3
3
|
:HL["/_next/static/media/797e433ab948586e-s.p.08e28id.o-okb.woff2","font",{"crossOrigin":"","type":"font/woff2"}]
|
|
4
4
|
:HL["/_next/static/media/caa3a2e1cccd8315-s.p.09~u27dqhyhd6.woff2","font",{"crossOrigin":"","type":"font/woff2"}]
|
|
5
|
-
0:{"tree":{"name":"","param":null,"prefetchHints":16,"slots":{"children":{"name":"tasks","param":null,"prefetchHints":0,"slots":{"children":{"name":"__PAGE__","param":null,"prefetchHints":0,"slots":null}}}}},"staleTime":300,"buildId":"
|
|
5
|
+
0:{"tree":{"name":"","param":null,"prefetchHints":16,"slots":{"children":{"name":"tasks","param":null,"prefetchHints":0,"slots":{"children":{"name":"__PAGE__","param":null,"prefetchHints":0,"slots":null}}}}},"staleTime":300,"buildId":"Z3OXIK1qxOxTQv7WJWgfC"}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
3:I[71522,["/_next/static/chunks/08zoo9fiegm~i.js","/_next/static/chunks/0f9t_qujwbffz.js","/_next/static/chunks/0pks~2shyhhw9.js","/_next/static/chunks/0qddp9ub8gzk7.js","/_next/static/chunks/147qv0tn7w~6..js"],"default"]
|
|
4
4
|
6:I[11466,["/_next/static/chunks/08zoo9fiegm~i.js","/_next/static/chunks/0f9t_qujwbffz.js","/_next/static/chunks/0pks~2shyhhw9.js","/_next/static/chunks/0qddp9ub8gzk7.js"],"OutletBoundary"]
|
|
5
5
|
7:"$Sreact.suspense"
|
|
6
|
-
0:{"rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/_next/static/chunks/147qv0tn7w~6..js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"isPartial":false,"staleTime":300,"varyParams":null,"buildId":"
|
|
6
|
+
0:{"rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/_next/static/chunks/147qv0tn7w~6..js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"isPartial":false,"staleTime":300,"varyParams":null,"buildId":"Z3OXIK1qxOxTQv7WJWgfC"}
|
|
7
7
|
4:{}
|
|
8
8
|
5:"$0:rsc:props:children:0:props:serverProvidedParams:params"
|
|
9
9
|
8:null
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
2:I[21637,["/_next/static/chunks/08zoo9fiegm~i.js","/_next/static/chunks/0f9t_qujwbffz.js","/_next/static/chunks/0pks~2shyhhw9.js","/_next/static/chunks/0qddp9ub8gzk7.js"],"default"]
|
|
3
3
|
3:I[83679,["/_next/static/chunks/08zoo9fiegm~i.js","/_next/static/chunks/0f9t_qujwbffz.js","/_next/static/chunks/0pks~2shyhhw9.js","/_next/static/chunks/0qddp9ub8gzk7.js"],"default"]
|
|
4
4
|
4:[]
|
|
5
|
-
0:{"rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"isPartial":false,"staleTime":300,"varyParams":"$W4","buildId":"
|
|
5
|
+
0:{"rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"isPartial":false,"staleTime":300,"varyParams":"$W4","buildId":"Z3OXIK1qxOxTQv7WJWgfC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
module.exports=[50227,(e,t,r)=>{t.exports=e.x("node:path",()=>require("node:path"))},18622,(e,t,r)=>{t.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},56704,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},32319,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},24725,(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"))},70406,(e,t,r)=>{t.exports=e.x("next/dist/compiled/@opentelemetry/api",()=>require("next/dist/compiled/@opentelemetry/api"))},93695,(e,t,r)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},22809,e=>{"use strict";var t=e.i(47376),r=e.i(87350),a=e.i(98420),n=e.i(93236),s=e.i(7818),
|
|
1
|
+
module.exports=[50227,(e,t,r)=>{t.exports=e.x("node:path",()=>require("node:path"))},18622,(e,t,r)=>{t.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},56704,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},32319,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},24725,(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"))},70406,(e,t,r)=>{t.exports=e.x("next/dist/compiled/@opentelemetry/api",()=>require("next/dist/compiled/@opentelemetry/api"))},93695,(e,t,r)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},22809,e=>{"use strict";var t=e.i(47376),r=e.i(87350),a=e.i(98420),n=e.i(93236),s=e.i(7818),i=e.i(99799),o=e.i(28658),l=e.i(26414),d=e.i(11638),u=e.i(72978),p=e.i(94886),c=e.i(69576),h=e.i(45058),f=e.i(40142),g=e.i(53170),x=e.i(93695);e.i(38610);var R=e.i(39243),v=e.i(33555);let w=process.env.COMMHUB_URL||"http://127.0.0.1:9200",m=/^[A-Za-z0-9_-]{8,64}$/,y=["content-type","content-length","content-disposition","x-content-type-options"];async function b(e,{params:t}){var r;let a,n=await (0,v.requireDashboardAuth)();if(n)return n;let{fileId:s}=await t;if(!s||!m.test(s))return Response.json({error:"invalid file_id"},{status:400});let i=await (0,v.getV3UserToken)();if(!i)return Response.json({error:"no session token"},{status:401});let o=`${w}/api/files/${encodeURIComponent(s)}`;try{a=await fetch(o,{method:"GET",headers:{Authorization:`Bearer ${i}`},cache:"no-store"})}catch(e){return Response.json({error:"hub unreachable",detail:e instanceof Error?e.message:String(e)},{status:502})}if(!a.ok){if((a.headers.get("content-type")||"").includes("json"))try{let e=await a.json();return Response.json(e,{status:a.status})}catch{}return new Response(null,{status:a.status})}let l=new Uint8Array(await a.arrayBuffer()),d=(r=l.subarray(0,32)).length<4?null:r.length>=8&&137===r[0]&&80===r[1]&&78===r[2]&&71===r[3]&&13===r[4]&&10===r[5]&&26===r[6]&&10===r[7]?"image/png":255===r[0]&&216===r[1]&&255===r[2]?"image/jpeg":r.length>=6&&71===r[0]&&73===r[1]&&70===r[2]&&56===r[3]&&(55===r[4]||57===r[4])&&97===r[5]?"image/gif":r.length>=12&&82===r[0]&&73===r[1]&&70===r[2]&&70===r[3]&&87===r[8]&&69===r[9]&&66===r[10]&&80===r[11]?"image/webp":26===r[0]&&69===r[1]&&223===r[2]&&163===r[3]?"video/webm":r.length>=8&&102===r[4]&&116===r[5]&&121===r[6]&&112===r[7]?"video/mp4":null,u=new Headers;for(let e of y){let t=a.headers.get(e);null!==t&&u.set(e,t)}return u.set("content-length",String(l.length)),u.set("x-content-type-options","nosniff"),d&&u.set("x-verified-type",d),new Response(l,{status:200,headers:u})}e.s(["GET",0,b],37083);var E=e.i(37083);let C=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/api/hub/files/[fileId]/route",pathname:"/api/hub/files/[fileId]",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/claude-1000/-home-vansin-agent-orchestra/fef0eb55-b39c-4abc-b7ff-48440b9ad805/scratchpad/dashrel/app/api/hub/files/[fileId]/route.ts",nextConfigOutput:"",userland:E,...{}}),{workAsyncStorage:A,workUnitAsyncStorage:T,serverHooks:q}=C;async function N(e,t,a){a.requestMeta&&(0,n.setRequestMeta)(e,a.requestMeta),C.isDev&&(0,n.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let v="/api/hub/files/[fileId]/route";v=v.replace(/\/index$/,"")||"/";let w=await C.prepare(e,t,{srcPage:v,multiZoneDraftMode:!1});if(!w)return t.statusCode=400,t.end("Bad Request"),null==a.waitUntil||a.waitUntil.call(a,Promise.resolve()),null;let{buildId:m,params:y,nextConfig:b,parsedUrl:E,isDraftMode:A,prerenderManifest:T,routerServerContext:q,isOnDemandRevalidate:N,revalidateOnlyGenerated:_,resolvedPathname:j,clientReferenceManifest:k,serverActionsManifest:P}=w,S=(0,o.normalizeAppPath)(v),O=!!(T.dynamicRoutes[S]||T.routes[j]),I=async()=>((null==q?void 0:q.render404)?await q.render404(e,t,E,!1):t.end("This page could not be found"),null);if(O&&!A){let e=!!T.routes[j],t=T.dynamicRoutes[S];if(t&&!1===t.fallback&&!e){if(b.adapterPath)return await I();throw new x.NoFallbackError}}let U=null;!O||C.isDev||A||(U="/index"===(U=j)?"/":U);let H=!0===C.isDev||!O,M=O&&!H;P&&k&&(0,i.setManifestsSingleton)({page:v,clientReferenceManifest:k,serverActionsManifest:P});let D=e.method||"GET",$=(0,s.getTracer)(),B=$.getActiveScopeSpan(),F=!!(null==q?void 0:q.isWrappedByNextServer),K=!!(0,n.getRequestMeta)(e,"minimalMode"),L=(0,n.getRequestMeta)(e,"incrementalCache")||await C.getIncrementalCache(e,b,T,K);null==L||L.resetRequestCache(),globalThis.__incrementalCache=L;let G={params:y,previewProps:T.preview,renderOpts:{experimental:{authInterrupts:!!b.experimental.authInterrupts},cacheComponents:!!b.cacheComponents,supportsDynamicResponse:H,incrementalCache:L,cacheLifeProfiles:b.cacheLife,waitUntil:a.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,a,n)=>C.onRequestError(e,t,a,n,q)},sharedContext:{buildId:m}},V=new l.NodeNextRequest(e),z=new l.NodeNextResponse(t),W=d.NextRequestAdapter.fromNodeNextRequest(V,(0,d.signalFromNodeResponse)(t));try{let n,i=async e=>C.handle(W,G).finally(()=>{if(!e)return;e.setAttributes({"http.status_code":t.statusCode,"next.rsc":!1});let r=$.getRootSpanAttributes();if(!r)return;if(r.get("next.span_type")!==u.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${r.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let a=r.get("next.route");if(a){let t=`${D} ${a}`;e.setAttributes({"next.route":a,"http.route":a,"next.span_name":t}),e.updateName(t),n&&n!==e&&(n.setAttribute("http.route",a),n.updateName(t))}else e.updateName(`${D} ${v}`)}),o=async n=>{var s,o;let l=async({previousCacheEntry:r})=>{try{if(!K&&N&&_&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let s=await i(n);e.fetchMetrics=G.renderOpts.fetchMetrics;let o=G.renderOpts.pendingWaitUntil;o&&a.waitUntil&&(a.waitUntil(o),o=void 0);let l=G.renderOpts.collectedTags;if(!O)return await (0,c.sendResponse)(V,z,s,G.renderOpts.pendingWaitUntil),null;{let e=await s.blob(),t=(0,h.toNodeOutgoingHttpHeaders)(s.headers);l&&(t[g.NEXT_CACHE_TAGS_HEADER]=l),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==G.renderOpts.collectedRevalidate&&!(G.renderOpts.collectedRevalidate>=g.INFINITE_CACHE)&&G.renderOpts.collectedRevalidate,a=void 0===G.renderOpts.collectedExpire||G.renderOpts.collectedExpire>=g.INFINITE_CACHE?void 0:G.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 C.onRequestError(e,t,{routerKind:"App Router",routePath:v,routeType:"route",revalidateReason:(0,p.getRevalidateReason)({isStaticGeneration:M,isOnDemandRevalidate:N})},!1,q),t}},d=await C.handleResponse({req:e,nextConfig:b,cacheKey:U,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:T,isRoutePPREnabled:!1,isOnDemandRevalidate:N,revalidateOnlyGenerated:_,responseGenerator:l,waitUntil:a.waitUntil,isMinimalMode:K});if(!O)return null;if((null==d||null==(s=d.value)?void 0:s.kind)!==R.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==d||null==(o=d.value)?void 0:o.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});K||t.setHeader("x-nextjs-cache",N?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),A&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let u=(0,h.fromNodeOutgoingHttpHeaders)(d.value.headers);return K&&O||u.delete(g.NEXT_CACHE_TAGS_HEADER),!d.cacheControl||t.getHeader("Cache-Control")||u.get("Cache-Control")||u.set("Cache-Control",(0,f.getCacheControlHeader)(d.cacheControl)),await (0,c.sendResponse)(V,z,new Response(d.value.body,{headers:u,status:d.value.status||200})),null};F&&B?await o(B):(n=$.getActiveScopeSpan(),await $.withPropagatedContext(e.headers,()=>$.trace(u.BaseServerSpan.handleRequest,{spanName:`${D} ${v}`,kind:s.SpanKind.SERVER,attributes:{"http.method":D,"http.target":e.url}},o),void 0,!F))}catch(t){if(t instanceof x.NoFallbackError||await C.onRequestError(e,t,{routerKind:"App Router",routePath:S,routeType:"route",revalidateReason:(0,p.getRevalidateReason)({isStaticGeneration:M,isOnDemandRevalidate:N})},!1,q),O)throw t;return await (0,c.sendResponse)(V,z,new Response(null,{status:500})),null}}e.s(["handler",0,N,"patchFetch",0,function(){return(0,a.patchFetch)({workAsyncStorage:A,workUnitAsyncStorage:T})},"routeModule",0,C,"serverHooks",0,q,"workAsyncStorage",0,A,"workUnitAsyncStorage",0,T],22809)}];
|
|
2
2
|
|
|
3
3
|
//# sourceMappingURL=%5Broot-of-the-server%5D__0nhjt1j._.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../../../claude-1000/-home-vansin-agent-orchestra/fef0eb55-b39c-4abc-b7ff-48440b9ad805/scratchpad/dashrel/app/api/hub/files/%5BfileId%5D/route.ts","../../../../../../../../claude-1000/-home-vansin-agent-orchestra/fef0eb55-b39c-4abc-b7ff-48440b9ad805/scratchpad/dashrel/node_modules/next/dist/esm/build/templates/app-route.js"],"sourcesContent":["import { requireDashboardAuth, getV3UserToken } from '@/app/lib/dashboard-auth';\n\nconst HUB_URL = process.env.COMMHUB_URL || 'http://127.0.0.1:9200';\n\n/**\n * File ID shape: mirrors server/src/uploads.ts FILE_ID_REGEX exactly.\n * Token-exact check before any URL composition — refuse\n * `../../etc/passwd` before it can reach the hub.\n */\nconst FILE_ID_REGEX = /^[A-Za-z0-9_-]{8,64}$/;\n\n/**\n * Header allowlist for the pass-through. We deliberately do NOT forward\n * everything from the hub response — the browser must NOT see anything\n * that could leak the internal request path or the Bearer token.\n * Only the four headers the browser genuinely needs for a safe download.\n */\nconst HEADER_PASSTHROUGH = [\n 'content-type',\n 'content-length',\n 'content-disposition',\n 'x-content-type-options',\n] as const;\n\n/**\n * #492 — file download proxy: browser fetches `/api/hub/files/<file_id>`,\n * this proxy attaches the browser session's V3 user token as\n * `Authorization: Bearer <utok>` and streams the response through.\n *\n * Why proxy vs direct-browser-fetch to `/api/files/<id>`:\n *\n * - Hub `/api/files/<id>` requires `Authorization: Bearer <token>`.\n * If the client tried to fetch it directly, the browser would need\n * the token in-page. Putting the token in a URL query string\n * leaks it into browser history + server access logs + Referer\n * headers on any follow-up navigation. Attaching it as an\n * `Authorization` header from the client requires the client to\n * hold the token, which we already refused to do (dashboard V3\n * tokens are HttpOnly-cookie-only per `dashboard-auth.ts`).\n * - By proxying, the token stays server-side. The client sends\n * nothing but its own session cookie; the server adds the Bearer.\n *\n * Streaming — we forward `res.body` (a ReadableStream) directly rather\n * than buffering `await res.arrayBuffer()`. A 44 KB pptx (Vincent's\n * demo case) buffers fine, but users can upload up to the hub's\n * 12 MiB cap and bundle-loading that into node memory 100x per\n * concurrent request is a memory footgun. Streaming keeps the proxy\n * O(1) memory regardless of file size.\n *\n * Content-Disposition + X-Content-Type-Options come from the hub\n * response and are passed through verbatim — the hub already stamps\n * `attachment` disposition + `nosniff` on downloads (issue #221),\n * meaning the browser will download-not-render even if the file\n * happens to be text/html. Do not add or alter those headers here.\n */\nexport async function GET(\n _req: Request,\n { params }: { params: Promise<{ fileId: string }> },\n) {\n const authFailure = await requireDashboardAuth();\n if (authFailure) return authFailure;\n\n const { fileId } = await params;\n if (!fileId || !FILE_ID_REGEX.test(fileId)) {\n return Response.json({ error: 'invalid file_id' }, { status: 400 });\n }\n\n const userToken = await getV3UserToken();\n if (!userToken) {\n return Response.json({ error: 'no session token' }, { status: 401 });\n }\n\n const url = `${HUB_URL}/api/files/${encodeURIComponent(fileId)}`;\n let hubRes: Response;\n try {\n hubRes = await fetch(url, {\n method: 'GET',\n headers: { Authorization: `Bearer ${userToken}` },\n // Streaming: avoid Next.js caching of the file bytes.\n cache: 'no-store',\n });\n } catch (e: unknown) {\n return Response.json(\n { error: 'hub unreachable', detail: e instanceof Error ? e.message : String(e) },\n { status: 502 },\n );\n }\n\n // Forward hub's status verbatim so a 404 (unknown file_id) surfaces\n // as a 404 the client can distinguish from a proxy error.\n if (!hubRes.ok) {\n // Try to keep JSON error shape when the hub gave one; otherwise\n // return a generic status-only response.\n const ct = hubRes.headers.get('content-type') || '';\n if (ct.includes('json')) {\n try {\n const errBody = await hubRes.json();\n return Response.json(errBody, { status: hubRes.status });\n } catch {\n // fall through to generic\n }\n }\n return new Response(null, { status: hubRes.status });\n }\n\n // Build the response header set — only the allowlisted ones. This\n // strips anything the hub might leak (Set-Cookie, X-Hub-*, etc.).\n const outHeaders = new Headers();\n for (const key of HEADER_PASSTHROUGH) {\n const value = hubRes.headers.get(key);\n if (value !== null) outHeaders.set(key, value);\n }\n // Defense-in-depth: always stamp nosniff on downloads even if the\n // hub didn't (it does today per #221, but pinning here means a hub\n // regression can't retroactively make the browser sniff-execute).\n outHeaders.set('x-content-type-options', 'nosniff');\n\n return new Response(hubRes.body, {\n status: 200,\n headers: outHeaders,\n });\n}\n","import { AppRouteRouteModule } from \"next/dist/esm/server/route-modules/app-route/module.compiled\";\nimport { RouteKind } from \"next/dist/esm/server/route-kind\";\nimport { patchFetch as _patchFetch } from \"next/dist/esm/server/lib/patch-fetch\";\nimport { addRequestMeta, getRequestMeta, setRequestMeta } from \"next/dist/esm/server/request-meta\";\nimport { getTracer, SpanKind } from \"next/dist/esm/server/lib/trace/tracer\";\nimport { setManifestsSingleton } from \"next/dist/esm/server/app-render/manifests-singleton\";\nimport { normalizeAppPath } from \"next/dist/esm/shared/lib/router/utils/app-paths\";\nimport { NodeNextRequest, NodeNextResponse } from \"next/dist/esm/server/base-http/node\";\nimport { NextRequestAdapter, signalFromNodeResponse } from \"next/dist/esm/server/web/spec-extension/adapters/next-request\";\nimport { BaseServerSpan } from \"next/dist/esm/server/lib/trace/constants\";\nimport { getRevalidateReason } from \"next/dist/esm/server/instrumentation/utils\";\nimport { sendResponse } from \"next/dist/esm/server/send-response\";\nimport { fromNodeOutgoingHttpHeaders, toNodeOutgoingHttpHeaders } from \"next/dist/esm/server/web/utils\";\nimport { getCacheControlHeader } from \"next/dist/esm/server/lib/cache-control\";\nimport { INFINITE_CACHE, NEXT_CACHE_TAGS_HEADER } from \"next/dist/esm/lib/constants\";\nimport { NoFallbackError } from \"next/dist/esm/shared/lib/no-fallback-error.external\";\nimport { CachedRouteKind } from \"next/dist/esm/server/response-cache\";\nimport * as userland from \"INNER_APP_ROUTE\";\n// We inject the nextConfigOutput here so that we can use them in the route\n// module.\nconst nextConfigOutput = \"\"\nconst routeModule = new AppRouteRouteModule({\n definition: {\n kind: RouteKind.APP_ROUTE,\n page: \"/api/hub/files/[fileId]/route\",\n pathname: \"/api/hub/files/[fileId]\",\n filename: \"route\",\n bundlePath: \"\"\n },\n distDir: process.env.__NEXT_RELATIVE_DIST_DIR || '',\n relativeProjectDir: process.env.__NEXT_RELATIVE_PROJECT_DIR || '',\n resolvedPagePath: \"[project]/claude-1000/-home-vansin-agent-orchestra/fef0eb55-b39c-4abc-b7ff-48440b9ad805/scratchpad/dashrel/app/api/hub/files/[fileId]/route.ts\",\n nextConfigOutput,\n // The static import is used for initialization (methods, dynamic, etc.).\n userland: userland,\n // In Turbopack dev mode, also provide a getter that calls require() on every\n // request. This re-reads from devModuleCache so HMR updates are picked up,\n // and the async wrapper unwraps async-module Promises (ESM-only\n // serverExternalPackages) automatically.\n ...process.env.TURBOPACK && process.env.__NEXT_DEV_SERVER ? {\n getUserland: ()=>import(\"INNER_APP_ROUTE\")\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;\nfunction patchFetch() {\n return _patchFetch({\n workAsyncStorage,\n workUnitAsyncStorage\n });\n}\nexport { routeModule, workAsyncStorage, workUnitAsyncStorage, serverHooks, patchFetch, };\nexport async function handler(req, res, ctx) {\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 = \"/api/hub/files/[fileId]/route\";\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.__NEXT_MULTI_ZONE_DRAFT_MODE;\n const prepareResult = await routeModule.prepare(req, res, {\n srcPage,\n multiZoneDraftMode\n });\n if (!prepareResult) {\n res.statusCode = 400;\n res.end('Bad Request');\n ctx.waitUntil == null ? void 0 : ctx.waitUntil.call(ctx, Promise.resolve());\n return null;\n }\n const { buildId, params, nextConfig, parsedUrl, isDraftMode, prerenderManifest, routerServerContext, isOnDemandRevalidate, revalidateOnlyGenerated, resolvedPathname, clientReferenceManifest, serverActionsManifest } = prepareResult;\n const normalizedSrcPage = normalizeAppPath(srcPage);\n let isIsr = Boolean(prerenderManifest.dynamicRoutes[normalizedSrcPage] || prerenderManifest.routes[resolvedPathname]);\n const render404 = async ()=>{\n // TODO: should route-module itself handle rendering the 404\n if (routerServerContext == null ? void 0 : 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 if (isIsr && !isDraftMode) {\n const isPrerendered = Boolean(prerenderManifest.routes[resolvedPathname]);\n const prerenderInfo = prerenderManifest.dynamicRoutes[normalizedSrcPage];\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 let cacheKey = null;\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 const supportsDynamicResponse = // If we're in development, we always support dynamic HTML\n routeModule.isDev === true || // If this is not SSG or does not have static paths, then it supports\n // dynamic HTML.\n !isIsr;\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 // 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 const method = req.method || 'GET';\n const tracer = getTracer();\n const activeSpan = tracer.getActiveScopeSpan();\n const isWrappedByNextServer = Boolean(routerServerContext == null ? void 0 : routerServerContext.isWrappedByNextServer);\n const isMinimalMode = Boolean(getRequestMeta(req, 'minimalMode'));\n const incrementalCache = getRequestMeta(req, 'incrementalCache') || await routeModule.getIncrementalCache(req, nextConfig, prerenderManifest, isMinimalMode);\n incrementalCache == null ? void 0 : incrementalCache.resetRequestCache();\n globalThis.__incrementalCache = incrementalCache;\n const context = {\n params,\n previewProps: prerenderManifest.preview,\n renderOpts: {\n experimental: {\n authInterrupts: Boolean(nextConfig.experimental.authInterrupts)\n },\n cacheComponents: Boolean(nextConfig.cacheComponents),\n supportsDynamicResponse,\n incrementalCache,\n cacheLifeProfiles: nextConfig.cacheLife,\n waitUntil: ctx.waitUntil,\n onClose: (cb)=>{\n res.on('close', cb);\n },\n onAfterTaskError: undefined,\n onInstrumentationRequestError: (error, _request, errorContext, silenceLog)=>routeModule.onRequestError(req, error, errorContext, silenceLog, routerServerContext)\n },\n sharedContext: {\n buildId\n }\n };\n const nodeNextReq = new NodeNextRequest(req);\n const nodeNextRes = new NodeNextResponse(res);\n const nextReq = NextRequestAdapter.fromNodeNextRequest(nodeNextReq, signalFromNodeResponse(res));\n try {\n let parentSpan;\n const invokeRouteModule = async (span)=>{\n return routeModule.handle(nextReq, context).finally(()=>{\n if (!span) return;\n span.setAttributes({\n 'http.status_code': res.statusCode,\n 'next.rsc': false\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 if (rootSpanAttributes.get('next.span_type') !== BaseServerSpan.handleRequest) {\n console.warn(`Unexpected root span type '${rootSpanAttributes.get('next.span_type')}'. Please report this Next.js issue https://github.com/vercel/next.js`);\n return;\n }\n const route = rootSpanAttributes.get('next.route');\n if (route) {\n const name = `${method} ${route}`;\n span.setAttributes({\n 'next.route': route,\n 'http.route': route,\n 'next.span_name': name\n });\n span.updateName(name);\n // Propagate http.route to the parent span if one exists (e.g.\n // a platform-created HTTP span in adapter deployments).\n if (parentSpan && parentSpan !== span) {\n parentSpan.setAttribute('http.route', route);\n parentSpan.updateName(name);\n }\n } else {\n span.updateName(`${method} ${srcPage}`);\n }\n });\n };\n const handleResponse = async (currentSpan)=>{\n var _cacheEntry_value;\n const responseGenerator = async ({ previousCacheEntry })=>{\n try {\n if (!isMinimalMode && isOnDemandRevalidate && revalidateOnlyGenerated && !previousCacheEntry) {\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 const response = await invokeRouteModule(currentSpan);\n req.fetchMetrics = context.renderOpts.fetchMetrics;\n let pendingWaitUntil = context.renderOpts.pendingWaitUntil;\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 // 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 // Copy the headers from the response.\n const headers = toNodeOutgoingHttpHeaders(response.headers);\n if (cacheTags) {\n headers[NEXT_CACHE_TAGS_HEADER] = cacheTags;\n }\n if (!headers['content-type'] && blob.type) {\n headers['content-type'] = blob.type;\n }\n const revalidate = typeof context.renderOpts.collectedRevalidate === 'undefined' || context.renderOpts.collectedRevalidate >= INFINITE_CACHE ? false : context.renderOpts.collectedRevalidate;\n const expire = typeof context.renderOpts.collectedExpire === 'undefined' || context.renderOpts.collectedExpire >= INFINITE_CACHE ? undefined : context.renderOpts.collectedExpire;\n // Create the cache entry for the response.\n const cacheEntry = {\n value: {\n kind: CachedRouteKind.APP_ROUTE,\n status: response.status,\n body: Buffer.from(await blob.arrayBuffer()),\n headers\n },\n cacheControl: {\n revalidate,\n expire\n }\n };\n return cacheEntry;\n } else {\n // send response without caching if not ISR\n await sendResponse(nodeNextReq, nodeNextRes, response, context.renderOpts.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 == null ? void 0 : previousCacheEntry.isStale) {\n const silenceLog = false;\n await routeModule.onRequestError(req, err, {\n routerKind: 'App Router',\n routePath: srcPage,\n routeType: 'route',\n revalidateReason: getRevalidateReason({\n isStaticGeneration,\n isOnDemandRevalidate\n })\n }, silenceLog, routerServerContext);\n }\n throw err;\n }\n };\n const cacheEntry = await routeModule.handleResponse({\n req,\n nextConfig,\n cacheKey,\n routeKind: RouteKind.APP_ROUTE,\n isFallback: false,\n prerenderManifest,\n isRoutePPREnabled: false,\n isOnDemandRevalidate,\n revalidateOnlyGenerated,\n responseGenerator,\n waitUntil: ctx.waitUntil,\n isMinimalMode\n });\n // we don't create a cacheEntry for ISR\n if (!isIsr) {\n return null;\n }\n if ((cacheEntry == null ? void 0 : (_cacheEntry_value = cacheEntry.value) == null ? void 0 : _cacheEntry_value.kind) !== CachedRouteKind.APP_ROUTE) {\n var _cacheEntry_value1;\n throw Object.defineProperty(new Error(`Invariant: app-route received invalid cache entry ${cacheEntry == null ? void 0 : (_cacheEntry_value1 = cacheEntry.value) == null ? void 0 : _cacheEntry_value1.kind}`), \"__NEXT_ERROR_CODE\", {\n value: \"E701\",\n enumerable: false,\n configurable: true\n });\n }\n if (!isMinimalMode) {\n res.setHeader('x-nextjs-cache', isOnDemandRevalidate ? 'REVALIDATED' : cacheEntry.isMiss ? 'MISS' : cacheEntry.isStale ? 'STALE' : 'HIT');\n }\n // Draft mode should never be cached\n if (isDraftMode) {\n res.setHeader('Cache-Control', 'private, no-cache, no-store, max-age=0, must-revalidate');\n }\n const headers = fromNodeOutgoingHttpHeaders(cacheEntry.value.headers);\n if (!(isMinimalMode && isIsr)) {\n headers.delete(NEXT_CACHE_TAGS_HEADER);\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 (cacheEntry.cacheControl && !res.getHeader('Cache-Control') && !headers.get('Cache-Control')) {\n headers.set('Cache-Control', getCacheControlHeader(cacheEntry.cacheControl));\n }\n await sendResponse(nodeNextReq, nodeNextRes, // @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 return null;\n };\n // TODO: activeSpan code path is for when wrapped by\n // next-server can be removed when this is no longer used\n if (isWrappedByNextServer && activeSpan) {\n await handleResponse(activeSpan);\n } else {\n parentSpan = tracer.getActiveScopeSpan();\n await tracer.withPropagatedContext(req.headers, ()=>tracer.trace(BaseServerSpan.handleRequest, {\n spanName: `${method} ${srcPage}`,\n kind: SpanKind.SERVER,\n attributes: {\n 'http.method': method,\n 'http.target': req.url\n }\n }, handleResponse), undefined, !isWrappedByNextServer);\n }\n } catch (err) {\n if (!(err instanceof NoFallbackError)) {\n const silenceLog = false;\n await routeModule.onRequestError(req, err, {\n routerKind: 'App Router',\n routePath: normalizedSrcPage,\n routeType: 'route',\n revalidateReason: getRevalidateReason({\n isStaticGeneration,\n isOnDemandRevalidate\n })\n }, silenceLog, routerServerContext);\n }\n // rethrow so that we can handle serving error page\n // If this is during static generation, throw the error again.\n if (isIsr) throw err;\n // Otherwise, send a 500 response.\n await sendResponse(nodeNextReq, nodeNextRes, new Response(null, {\n status: 500\n }));\n return null;\n }\n}\n\n//# sourceMappingURL=app-route.js.map\n"],"names":["HUB_URL","process","env","COMMHUB_URL","FILE_ID_REGEX","HEADER_PASSTHROUGH","GET","_req","params","authFailure","json","e","fileId","test","Response","error","status","userToken","ct","url","encodeURIComponent","hubRes","fetch","method","headers","Authorization","cache","key","detail","Error","message","String","ok","get","includes","errBody","outHeaders","Headers","value","set","body"],"mappings":"wjCCAA,IAAA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,MACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,CAAA,CAAA,OAAA,IAAA,EAAA,EAAA,CAAA,CAAA,ODhBA,EAAA,EAAA,CAAA,CAAA,OAEA,IAAMA,EAAUC,QAAQC,GAAG,CAACC,WAAW,EAAI,wBAOrCC,EAAgB,wBAQhBC,EAAqB,CACzB,eACA,iBACA,sBACA,yBACD,CAiCM,eAAeC,EACpBC,CAAa,CACb,QAAEC,CAAM,CAA2C,EAEnD,IAcIa,EAdEZ,EAAc,MAAM,CAAA,EAAA,EAAA,oBAAA,AAAoB,IAC9C,GAAIA,EAAa,OAAOA,EAExB,GAAM,QAAEG,CAAM,CAAE,CAAG,MAAMJ,EACzB,GAAI,CAACI,GAAU,CAACR,EAAcS,IAAI,CAACD,GACjC,MAD0C,CACnCE,SAASJ,IAAI,CAAC,CAAEK,MAAO,iBAAkB,EAAG,C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CAAA,EAAA,EAAA,UAAW,AAAX,EAAY,kBACf,uBACA,CACJ,EACJ","ignoreList":[1]}
|
|
1
|
+
{"version":3,"sources":["../../../../../../../../claude-1000/-home-vansin-agent-orchestra/fef0eb55-b39c-4abc-b7ff-48440b9ad805/scratchpad/dashrel/app/api/hub/files/%5BfileId%5D/route.ts","../../../../../../../../claude-1000/-home-vansin-agent-orchestra/fef0eb55-b39c-4abc-b7ff-48440b9ad805/scratchpad/dashrel/node_modules/next/dist/esm/build/templates/app-route.js"],"sourcesContent":["import { requireDashboardAuth, getV3UserToken } from '@/app/lib/dashboard-auth';\n\nconst HUB_URL = process.env.COMMHUB_URL || 'http://127.0.0.1:9200';\n\n/**\n * File ID shape: mirrors server/src/uploads.ts FILE_ID_REGEX exactly.\n * Token-exact check before any URL composition — refuse\n * `../../etc/passwd` before it can reach the hub.\n */\nconst FILE_ID_REGEX = /^[A-Za-z0-9_-]{8,64}$/;\n\n/**\n * Header allowlist for the pass-through. We deliberately do NOT forward\n * everything from the hub response — the browser must NOT see anything\n * that could leak the internal request path or the Bearer token.\n * Only the four headers the browser genuinely needs for a safe download.\n */\nconst HEADER_PASSTHROUGH = [\n 'content-type',\n 'content-length',\n 'content-disposition',\n 'x-content-type-options',\n] as const;\n\n// ── #492 preview half: safe-inline-type detection ──────────────\n//\n// 🔴 STRUCTURAL SAFETY (通信龙 #46 review of the inline design):\n// This proxy NEVER returns an inline response, regardless of the\n// file's real type. `Content-Disposition: attachment` + `nosniff`\n// stay stamped on every download, so no dashboard-origin URL can\n// ever serve user-uploaded content as a rendered page — that entire\n// XSS class is structurally impossible, not defended-by-whitelist.\n//\n// What we DO expose: a `X-Verified-Type` header carrying the true MIME\n// as detected by magic bytes. The client uses this header to decide:\n// 1. Fetch the bytes (browser downloads — no navigation)\n// 2. `new Blob([bytes], {type: xVerifiedType})`\n// 3. `URL.createObjectURL(blob)` → `<img>` / `<video>` src\n//\n// The blob URL is same-origin *to the browser's blob: scheme*, isolated\n// from the dashboard origin — a bug in whitelist can degrade UX (image\n// won't render) but can never become a cross-origin script vector.\n//\n// Detection rule: EXACT MIME match by per-format magic bytes at each\n// format's actual offset. No prefix matching (`image/*` would let SVG\n// in). No trust of upload-time mime/filename (both untrusted).\ntype SafeMime =\n | 'image/png'\n | 'image/jpeg'\n | 'image/gif'\n | 'image/webp'\n | 'video/mp4'\n | 'video/webm';\n\n/**\n * Peek magic bytes and return the safe MIME if the file matches one\n * of our whitelisted formats.\n *\n * Per-format offset rules (not naive first-N compare — 通信龙 review):\n * - PNG: offset 0, `89 50 4E 47 0D 0A 1A 0A`\n * - JPEG: offset 0, `FF D8 FF`\n * - GIF: offset 0, `47 49 46 38 (37|39) 61` (\"GIF87a\" / \"GIF89a\")\n * - WebP: offset 0 `52 49 46 46` (\"RIFF\") + offset 8 `57 45 42 50` (\"WEBP\")\n * - MP4: offset 4 `66 74 79 70` (\"ftyp\") — MP4/M4V/QT ISO BMFF box\n * - WebM: offset 0 `1A 45 DF A3` (EBML)\n *\n * Returns null for anything else (SVG, HTML, empty, corrupted, unknown).\n */\nfunction detectSafeMime(head: Uint8Array): SafeMime | null {\n const b = head;\n if (b.length < 4) return null;\n\n // PNG\n if (\n b.length >= 8 &&\n b[0] === 0x89 && b[1] === 0x50 && b[2] === 0x4E && b[3] === 0x47 &&\n b[4] === 0x0D && b[5] === 0x0A && b[6] === 0x1A && b[7] === 0x0A\n ) return 'image/png';\n\n // JPEG (FF D8 FF — final byte is FF E0 / FF E1 / FF DB variants; the FF prefix\n // is enough to distinguish. Reject if not exactly the three-byte JPEG marker.)\n if (b[0] === 0xFF && b[1] === 0xD8 && b[2] === 0xFF) return 'image/jpeg';\n\n // GIF — \"GIF87a\" or \"GIF89a\"\n if (\n b.length >= 6 &&\n b[0] === 0x47 && b[1] === 0x49 && b[2] === 0x46 && b[3] === 0x38 &&\n (b[4] === 0x37 || b[4] === 0x39) && b[5] === 0x61\n ) return 'image/gif';\n\n // WebP — \"RIFF????WEBP\"\n if (\n b.length >= 12 &&\n b[0] === 0x52 && b[1] === 0x49 && b[2] === 0x46 && b[3] === 0x46 &&\n b[8] === 0x57 && b[9] === 0x45 && b[10] === 0x42 && b[11] === 0x50\n ) return 'image/webp';\n\n // WebM (EBML header) — 1A 45 DF A3\n if (b[0] === 0x1A && b[1] === 0x45 && b[2] === 0xDF && b[3] === 0xA3) {\n return 'video/webm';\n }\n\n // MP4 (ISO BMFF `ftyp` box at offset 4) — the first 4 bytes are a\n // big-endian box size we don't need to validate; the \"ftyp\" marker\n // is what we key on.\n if (\n b.length >= 8 &&\n b[4] === 0x66 && b[5] === 0x74 && b[6] === 0x79 && b[7] === 0x70\n ) return 'video/mp4';\n\n return null;\n}\n\n/**\n * #492 — file download proxy: browser fetches `/api/hub/files/<file_id>`,\n * this proxy attaches the browser session's V3 user token as\n * `Authorization: Bearer <utok>` and forwards the response.\n *\n * Why proxy vs direct-browser-fetch to `/api/files/<id>`:\n *\n * - Hub `/api/files/<id>` requires `Authorization: Bearer <token>`.\n * If the client tried to fetch it directly, the browser would need\n * the token in-page. Putting the token in a URL query string\n * leaks it into browser history + server access logs + Referer\n * headers on any follow-up navigation. Attaching it as an\n * `Authorization` header from the client requires the client to\n * hold the token, which we already refused to do (dashboard V3\n * tokens are HttpOnly-cookie-only per `dashboard-auth.ts`).\n * - By proxying, the token stays server-side. The client sends\n * nothing but its own session cookie; the server adds the Bearer.\n *\n * Buffering vs streaming: this half of the proxy USED to stream (O(1)\n * memory). The preview half needs to detect magic bytes before\n * headers can be sent, so we now buffer the full body. Acceptable\n * because hub caps uploads at 12 MiB; worst case is 12 MiB *\n * concurrent-preview-requests per node process. If that becomes\n * memory pressure the fix is to tee the ReadableStream and inspect\n * the first chunk without buffering the rest — deferred until\n * evidence shows it's worth the complexity.\n *\n * Content-Disposition + X-Content-Type-Options come from the hub\n * response and are passed through verbatim — the hub already stamps\n * `attachment` disposition + `nosniff` on downloads (issue #221),\n * meaning the browser will download-not-render even if the file\n * happens to be text/html. Do not add or alter those headers here.\n *\n * The response ALWAYS carries `attachment` disposition — the client\n * reads `X-Verified-Type` and constructs a blob URL if it wants to\n * inline the content. See `detectSafeMime` above for the security\n * reasoning.\n */\nexport async function GET(\n _req: Request,\n { params }: { params: Promise<{ fileId: string }> },\n) {\n const authFailure = await requireDashboardAuth();\n if (authFailure) return authFailure;\n\n const { fileId } = await params;\n if (!fileId || !FILE_ID_REGEX.test(fileId)) {\n return Response.json({ error: 'invalid file_id' }, { status: 400 });\n }\n\n const userToken = await getV3UserToken();\n if (!userToken) {\n return Response.json({ error: 'no session token' }, { status: 401 });\n }\n\n const url = `${HUB_URL}/api/files/${encodeURIComponent(fileId)}`;\n let hubRes: Response;\n try {\n hubRes = await fetch(url, {\n method: 'GET',\n headers: { Authorization: `Bearer ${userToken}` },\n cache: 'no-store',\n });\n } catch (e: unknown) {\n return Response.json(\n { error: 'hub unreachable', detail: e instanceof Error ? e.message : String(e) },\n { status: 502 },\n );\n }\n\n // Forward hub's status verbatim so a 404 (unknown file_id) surfaces\n // as a 404 the client can distinguish from a proxy error.\n if (!hubRes.ok) {\n const ct = hubRes.headers.get('content-type') || '';\n if (ct.includes('json')) {\n try {\n const errBody = await hubRes.json();\n return Response.json(errBody, { status: hubRes.status });\n } catch {\n // fall through to generic\n }\n }\n return new Response(null, { status: hubRes.status });\n }\n\n // Buffer full body — see JSDoc for the memory rationale.\n const bytes = new Uint8Array(await hubRes.arrayBuffer());\n const verifiedType = detectSafeMime(bytes.subarray(0, 32));\n\n // Build the response header set — only the allowlisted ones. This\n // strips anything the hub might leak (Set-Cookie, X-Hub-*, etc.).\n const outHeaders = new Headers();\n for (const key of HEADER_PASSTHROUGH) {\n const value = hubRes.headers.get(key);\n if (value !== null) outHeaders.set(key, value);\n }\n // Content-Length may not survive if we re-emit the body; set from\n // our own buffer length to be authoritative.\n outHeaders.set('content-length', String(bytes.length));\n\n // Defense-in-depth: always stamp nosniff on downloads even if the\n // hub didn't (it does today per #221, but pinning here means a hub\n // regression can't retroactively make the browser sniff-execute).\n // The polyglot-PNG-HTML adversarial sample in verify.sh depends on\n // this exact header being present.\n outHeaders.set('x-content-type-options', 'nosniff');\n\n // 🔴 Structural invariant: we do NOT modify Content-Disposition\n // based on `verifiedType`. Even if the file IS a safe PNG, the\n // hub-served disposition (`attachment`) stays. Client uses the\n // header below to decide whether to blob+inline.\n if (verifiedType) {\n outHeaders.set('x-verified-type', verifiedType);\n }\n\n return new Response(bytes, {\n status: 200,\n headers: outHeaders,\n });\n}\n","import { AppRouteRouteModule } from \"next/dist/esm/server/route-modules/app-route/module.compiled\";\nimport { RouteKind } from \"next/dist/esm/server/route-kind\";\nimport { patchFetch as _patchFetch } from \"next/dist/esm/server/lib/patch-fetch\";\nimport { addRequestMeta, getRequestMeta, setRequestMeta } from \"next/dist/esm/server/request-meta\";\nimport { getTracer, SpanKind } from \"next/dist/esm/server/lib/trace/tracer\";\nimport { setManifestsSingleton } from \"next/dist/esm/server/app-render/manifests-singleton\";\nimport { normalizeAppPath } from \"next/dist/esm/shared/lib/router/utils/app-paths\";\nimport { NodeNextRequest, NodeNextResponse } from \"next/dist/esm/server/base-http/node\";\nimport { NextRequestAdapter, signalFromNodeResponse } from \"next/dist/esm/server/web/spec-extension/adapters/next-request\";\nimport { BaseServerSpan } from \"next/dist/esm/server/lib/trace/constants\";\nimport { getRevalidateReason } from \"next/dist/esm/server/instrumentation/utils\";\nimport { sendResponse } from \"next/dist/esm/server/send-response\";\nimport { fromNodeOutgoingHttpHeaders, toNodeOutgoingHttpHeaders } from \"next/dist/esm/server/web/utils\";\nimport { getCacheControlHeader } from \"next/dist/esm/server/lib/cache-control\";\nimport { INFINITE_CACHE, NEXT_CACHE_TAGS_HEADER } from \"next/dist/esm/lib/constants\";\nimport { NoFallbackError } from \"next/dist/esm/shared/lib/no-fallback-error.external\";\nimport { CachedRouteKind } from \"next/dist/esm/server/response-cache\";\nimport * as userland from \"INNER_APP_ROUTE\";\n// We inject the nextConfigOutput here so that we can use them in the route\n// module.\nconst nextConfigOutput = \"\"\nconst routeModule = new AppRouteRouteModule({\n definition: {\n kind: RouteKind.APP_ROUTE,\n page: \"/api/hub/files/[fileId]/route\",\n pathname: \"/api/hub/files/[fileId]\",\n filename: \"route\",\n bundlePath: \"\"\n },\n distDir: process.env.__NEXT_RELATIVE_DIST_DIR || '',\n relativeProjectDir: process.env.__NEXT_RELATIVE_PROJECT_DIR || '',\n resolvedPagePath: \"[project]/claude-1000/-home-vansin-agent-orchestra/fef0eb55-b39c-4abc-b7ff-48440b9ad805/scratchpad/dashrel/app/api/hub/files/[fileId]/route.ts\",\n nextConfigOutput,\n // The static import is used for initialization (methods, dynamic, etc.).\n userland: userland,\n // In Turbopack dev mode, also provide a getter that calls require() on every\n // request. This re-reads from devModuleCache so HMR updates are picked up,\n // and the async wrapper unwraps async-module Promises (ESM-only\n // serverExternalPackages) automatically.\n ...process.env.TURBOPACK && process.env.__NEXT_DEV_SERVER ? {\n getUserland: ()=>import(\"INNER_APP_ROUTE\")\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;\nfunction patchFetch() {\n return _patchFetch({\n workAsyncStorage,\n workUnitAsyncStorage\n });\n}\nexport { routeModule, workAsyncStorage, workUnitAsyncStorage, serverHooks, patchFetch, };\nexport async function handler(req, res, ctx) {\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 = \"/api/hub/files/[fileId]/route\";\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.__NEXT_MULTI_ZONE_DRAFT_MODE;\n const prepareResult = await routeModule.prepare(req, res, {\n srcPage,\n multiZoneDraftMode\n });\n if (!prepareResult) {\n res.statusCode = 400;\n res.end('Bad Request');\n ctx.waitUntil == null ? void 0 : ctx.waitUntil.call(ctx, Promise.resolve());\n return null;\n }\n const { buildId, params, nextConfig, parsedUrl, isDraftMode, prerenderManifest, routerServerContext, isOnDemandRevalidate, revalidateOnlyGenerated, resolvedPathname, clientReferenceManifest, serverActionsManifest } = prepareResult;\n const normalizedSrcPage = normalizeAppPath(srcPage);\n let isIsr = Boolean(prerenderManifest.dynamicRoutes[normalizedSrcPage] || prerenderManifest.routes[resolvedPathname]);\n const render404 = async ()=>{\n // TODO: should route-module itself handle rendering the 404\n if (routerServerContext == null ? void 0 : 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 if (isIsr && !isDraftMode) {\n const isPrerendered = Boolean(prerenderManifest.routes[resolvedPathname]);\n const prerenderInfo = prerenderManifest.dynamicRoutes[normalizedSrcPage];\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 let cacheKey = null;\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 const supportsDynamicResponse = // If we're in development, we always support dynamic HTML\n routeModule.isDev === true || // If this is not SSG or does not have static paths, then it supports\n // dynamic HTML.\n !isIsr;\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 // 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 const method = req.method || 'GET';\n const tracer = getTracer();\n const activeSpan = tracer.getActiveScopeSpan();\n const isWrappedByNextServer = Boolean(routerServerContext == null ? void 0 : routerServerContext.isWrappedByNextServer);\n const isMinimalMode = Boolean(getRequestMeta(req, 'minimalMode'));\n const incrementalCache = getRequestMeta(req, 'incrementalCache') || await routeModule.getIncrementalCache(req, nextConfig, prerenderManifest, isMinimalMode);\n incrementalCache == null ? void 0 : incrementalCache.resetRequestCache();\n globalThis.__incrementalCache = incrementalCache;\n const context = {\n params,\n previewProps: prerenderManifest.preview,\n renderOpts: {\n experimental: {\n authInterrupts: Boolean(nextConfig.experimental.authInterrupts)\n },\n cacheComponents: Boolean(nextConfig.cacheComponents),\n supportsDynamicResponse,\n incrementalCache,\n cacheLifeProfiles: nextConfig.cacheLife,\n waitUntil: ctx.waitUntil,\n onClose: (cb)=>{\n res.on('close', cb);\n },\n onAfterTaskError: undefined,\n onInstrumentationRequestError: (error, _request, errorContext, silenceLog)=>routeModule.onRequestError(req, error, errorContext, silenceLog, routerServerContext)\n },\n sharedContext: {\n buildId\n }\n };\n const nodeNextReq = new NodeNextRequest(req);\n const nodeNextRes = new NodeNextResponse(res);\n const nextReq = NextRequestAdapter.fromNodeNextRequest(nodeNextReq, signalFromNodeResponse(res));\n try {\n let parentSpan;\n const invokeRouteModule = async (span)=>{\n return routeModule.handle(nextReq, context).finally(()=>{\n if (!span) return;\n span.setAttributes({\n 'http.status_code': res.statusCode,\n 'next.rsc': false\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 if (rootSpanAttributes.get('next.span_type') !== BaseServerSpan.handleRequest) {\n console.warn(`Unexpected root span type '${rootSpanAttributes.get('next.span_type')}'. Please report this Next.js issue https://github.com/vercel/next.js`);\n return;\n }\n const route = rootSpanAttributes.get('next.route');\n if (route) {\n const name = `${method} ${route}`;\n span.setAttributes({\n 'next.route': route,\n 'http.route': route,\n 'next.span_name': name\n });\n span.updateName(name);\n // Propagate http.route to the parent span if one exists (e.g.\n // a platform-created HTTP span in adapter deployments).\n if (parentSpan && parentSpan !== span) {\n parentSpan.setAttribute('http.route', route);\n parentSpan.updateName(name);\n }\n } else {\n span.updateName(`${method} ${srcPage}`);\n }\n });\n };\n const handleResponse = async (currentSpan)=>{\n var _cacheEntry_value;\n const responseGenerator = async ({ previousCacheEntry })=>{\n try {\n if (!isMinimalMode && isOnDemandRevalidate && revalidateOnlyGenerated && !previousCacheEntry) {\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 const response = await invokeRouteModule(currentSpan);\n req.fetchMetrics = context.renderOpts.fetchMetrics;\n let pendingWaitUntil = context.renderOpts.pendingWaitUntil;\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 // 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 // Copy the headers from the response.\n const headers = toNodeOutgoingHttpHeaders(response.headers);\n if (cacheTags) {\n headers[NEXT_CACHE_TAGS_HEADER] = cacheTags;\n }\n if (!headers['content-type'] && blob.type) {\n headers['content-type'] = blob.type;\n }\n const revalidate = typeof context.renderOpts.collectedRevalidate === 'undefined' || context.renderOpts.collectedRevalidate >= INFINITE_CACHE ? false : context.renderOpts.collectedRevalidate;\n const expire = typeof context.renderOpts.collectedExpire === 'undefined' || context.renderOpts.collectedExpire >= INFINITE_CACHE ? undefined : context.renderOpts.collectedExpire;\n // Create the cache entry for the response.\n const cacheEntry = {\n value: {\n kind: CachedRouteKind.APP_ROUTE,\n status: response.status,\n body: Buffer.from(await blob.arrayBuffer()),\n headers\n },\n cacheControl: {\n revalidate,\n expire\n }\n };\n return cacheEntry;\n } else {\n // send response without caching if not ISR\n await sendResponse(nodeNextReq, nodeNextRes, response, context.renderOpts.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 == null ? void 0 : previousCacheEntry.isStale) {\n const silenceLog = false;\n await routeModule.onRequestError(req, err, {\n routerKind: 'App Router',\n routePath: srcPage,\n routeType: 'route',\n revalidateReason: getRevalidateReason({\n isStaticGeneration,\n isOnDemandRevalidate\n })\n }, silenceLog, routerServerContext);\n }\n throw err;\n }\n };\n const cacheEntry = await routeModule.handleResponse({\n req,\n nextConfig,\n cacheKey,\n routeKind: RouteKind.APP_ROUTE,\n isFallback: false,\n prerenderManifest,\n isRoutePPREnabled: false,\n isOnDemandRevalidate,\n revalidateOnlyGenerated,\n responseGenerator,\n waitUntil: ctx.waitUntil,\n isMinimalMode\n });\n // we don't create a cacheEntry for ISR\n if (!isIsr) {\n return null;\n }\n if ((cacheEntry == null ? void 0 : (_cacheEntry_value = cacheEntry.value) == null ? void 0 : _cacheEntry_value.kind) !== CachedRouteKind.APP_ROUTE) {\n var _cacheEntry_value1;\n throw Object.defineProperty(new Error(`Invariant: app-route received invalid cache entry ${cacheEntry == null ? void 0 : (_cacheEntry_value1 = cacheEntry.value) == null ? void 0 : _cacheEntry_value1.kind}`), \"__NEXT_ERROR_CODE\", {\n value: \"E701\",\n enumerable: false,\n configurable: true\n });\n }\n if (!isMinimalMode) {\n res.setHeader('x-nextjs-cache', isOnDemandRevalidate ? 'REVALIDATED' : cacheEntry.isMiss ? 'MISS' : cacheEntry.isStale ? 'STALE' : 'HIT');\n }\n // Draft mode should never be cached\n if (isDraftMode) {\n res.setHeader('Cache-Control', 'private, no-cache, no-store, max-age=0, must-revalidate');\n }\n const headers = fromNodeOutgoingHttpHeaders(cacheEntry.value.headers);\n if (!(isMinimalMode && isIsr)) {\n headers.delete(NEXT_CACHE_TAGS_HEADER);\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 (cacheEntry.cacheControl && !res.getHeader('Cache-Control') && !headers.get('Cache-Control')) {\n headers.set('Cache-Control', getCacheControlHeader(cacheEntry.cacheControl));\n }\n await sendResponse(nodeNextReq, nodeNextRes, // @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 return null;\n };\n // TODO: activeSpan code path is for when wrapped by\n // next-server can be removed when this is no longer used\n if (isWrappedByNextServer && activeSpan) {\n await handleResponse(activeSpan);\n } else {\n parentSpan = tracer.getActiveScopeSpan();\n await tracer.withPropagatedContext(req.headers, ()=>tracer.trace(BaseServerSpan.handleRequest, {\n spanName: `${method} ${srcPage}`,\n kind: SpanKind.SERVER,\n attributes: {\n 'http.method': method,\n 'http.target': req.url\n }\n }, handleResponse), undefined, !isWrappedByNextServer);\n }\n } catch (err) {\n if (!(err instanceof NoFallbackError)) {\n const silenceLog = false;\n await routeModule.onRequestError(req, err, {\n routerKind: 'App Router',\n routePath: normalizedSrcPage,\n routeType: 'route',\n revalidateReason: getRevalidateReason({\n isStaticGeneration,\n isOnDemandRevalidate\n })\n }, silenceLog, routerServerContext);\n }\n // rethrow so that we can handle serving error page\n // If this is during static generation, throw the error again.\n if (isIsr) throw err;\n // Otherwise, send a 500 response.\n await sendResponse(nodeNextReq, nodeNextRes, new Response(null, {\n status: 500\n }));\n return null;\n }\n}\n\n//# sourceMappingURL=app-route.js.map\n"],"names":["HUB_URL","process","env","COMMHUB_URL","FILE_ID_REGEX","HEADER_PASSTHROUGH","head","length","detectSafeMime","b","params","e","Response","GET","_req","authFailure","fileId","test","json","error","status","userToken","String","url","encodeURIComponent","hubRes","fetch","method","headers","Authorization","cache","detail","Error","message","set","bytes","ok","ct","get","includes","errBody","Uint8Array","arrayBuffer","verifiedType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