neural-loom 0.2.51 → 0.2.52
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 +3 -3
- package/.next/cache/.previewinfo +1 -1
- package/.next/cache/.rscinfo +1 -1
- package/.next/cache/.tsbuildinfo +1 -1
- package/.next/fallback-build-manifest.json +3 -3
- package/.next/prerender-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.html +1 -1
- package/.next/server/app/_not-found.rsc +1 -1
- package/.next/server/app/_not-found.segments/_full.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_index.segment.rsc +1 -1
- 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 +1 -1
- package/.next/server/app/index.html +1 -1
- package/.next/server/app/index.rsc +1 -1
- package/.next/server/app/index.segments/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/index.segments/_full.segment.rsc +1 -1
- package/.next/server/app/index.segments/_head.segment.rsc +1 -1
- package/.next/server/app/index.segments/_index.segment.rsc +1 -1
- package/.next/server/app/index.segments/_tree.segment.rsc +1 -1
- package/.next/server/chunks/[root-of-the-server]__0.ptwor._.js +6 -6
- package/.next/server/chunks/[root-of-the-server]__0.ptwor._.js.map +1 -1
- package/.next/server/chunks/[root-of-the-server]__00l5btc._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__00l5btc._.js.map +1 -1
- package/.next/server/chunks/[root-of-the-server]__06men8g._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__06men8g._.js.map +1 -1
- package/.next/server/chunks/[root-of-the-server]__0_o7_jj._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__0_o7_jj._.js.map +1 -1
- package/.next/server/chunks/[root-of-the-server]__0co.g5k._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__0co.g5k._.js.map +1 -1
- package/.next/server/middleware-build-manifest.js +3 -3
- 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/trace +1 -1
- package/.next/trace-build +1 -1
- package/package.json +1 -1
- package/src/lib/sql/ConnectionManager.ts +41 -0
- package/src/lib/sql/McpServer.ts +40 -14
- /package/.next/static/{iopRcvtUwbEGa5VOyZAQh → nL6vq7onX8i2nzr-zxraV}/_buildManifest.js +0 -0
- /package/.next/static/{iopRcvtUwbEGa5VOyZAQh → nL6vq7onX8i2nzr-zxraV}/_clientMiddlewareManifest.js +0 -0
- /package/.next/static/{iopRcvtUwbEGa5VOyZAQh → nL6vq7onX8i2nzr-zxraV}/_ssgManifest.js +0 -0
|
@@ -12,7 +12,7 @@ f:I[68027,["/_next/static/chunks/0dbhjjzl8qfwv.js"],"default",1]
|
|
|
12
12
|
:HL["/_next/static/media/797e433ab948586e-s.p.08e28id.o-okb.woff2","font",{"crossOrigin":"","type":"font/woff2"}]
|
|
13
13
|
:HL["/_next/static/media/caa3a2e1cccd8315-s.p.09~u27dqhyhd6.woff2","font",{"crossOrigin":"","type":"font/woff2"}]
|
|
14
14
|
:HL["/_next/static/chunks/0m-_sw1425nkp.css","style"]
|
|
15
|
-
0:{"P":null,"c":["",""],"q":"","i":false,"f":[[["",{"children":["__PAGE__",{}]},"$undefined","$undefined",16],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/chunks/139c54uo1w7.4.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/_next/static/chunks/0dbhjjzl8qfwv.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","className":"geist_a71539c9-module__T19VSG__variable geist_mono_8d43a2aa-module__8Li5zG__variable","children":["$","body",null,{"children":["$","$L2",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L3",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","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."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]}]}]]}],{"children":[["$","$1","c",{"children":[["$","$L4",null,{"Component":"$5","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@6","$@7"]}}],[["$","link","0",{"rel":"stylesheet","href":"/_next/static/chunks/0m-_sw1425nkp.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/_next/static/chunks/0bb9anc7wd3_e.js","async":true,"nonce":"$undefined"}]],["$","$L8",null,{"children":["$","$9",null,{"name":"Next.MetadataOutlet","children":"$@a"}]}]]}],{},null,false,null]},null,false,null],["$","$1","h",{"children":[null,["$","$Lb",null,{"children":"$Lc"}],["$","div",null,{"hidden":true,"children":["$","$Ld",null,{"children":["$","$9",null,{"name":"Next.Metadata","children":"$Le"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],false]],"m":"$undefined","G":["$f",[["$","link","0",{"rel":"stylesheet","href":"/_next/static/chunks/139c54uo1w7.4.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}]]],"S":true,"h":null,"s":"$undefined","l":"$undefined","p":"$undefined","d":"$undefined","b":"
|
|
15
|
+
0:{"P":null,"c":["",""],"q":"","i":false,"f":[[["",{"children":["__PAGE__",{}]},"$undefined","$undefined",16],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/chunks/139c54uo1w7.4.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/_next/static/chunks/0dbhjjzl8qfwv.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","className":"geist_a71539c9-module__T19VSG__variable geist_mono_8d43a2aa-module__8Li5zG__variable","children":["$","body",null,{"children":["$","$L2",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L3",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","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."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]}]}]]}],{"children":[["$","$1","c",{"children":[["$","$L4",null,{"Component":"$5","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@6","$@7"]}}],[["$","link","0",{"rel":"stylesheet","href":"/_next/static/chunks/0m-_sw1425nkp.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/_next/static/chunks/0bb9anc7wd3_e.js","async":true,"nonce":"$undefined"}]],["$","$L8",null,{"children":["$","$9",null,{"name":"Next.MetadataOutlet","children":"$@a"}]}]]}],{},null,false,null]},null,false,null],["$","$1","h",{"children":[null,["$","$Lb",null,{"children":"$Lc"}],["$","div",null,{"hidden":true,"children":["$","$Ld",null,{"children":["$","$9",null,{"name":"Next.Metadata","children":"$Le"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],false]],"m":"$undefined","G":["$f",[["$","link","0",{"rel":"stylesheet","href":"/_next/static/chunks/139c54uo1w7.4.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}]]],"S":true,"h":null,"s":"$undefined","l":"$undefined","p":"$undefined","d":"$undefined","b":"nL6vq7onX8i2nzr-zxraV"}
|
|
16
16
|
6:{}
|
|
17
17
|
7:"$0:f:0:1:1:children:0:props:children:0:props:serverProvidedParams:params"
|
|
18
18
|
c:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]]
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
6:I[97367,["/_next/static/chunks/0dbhjjzl8qfwv.js"],"OutletBoundary"]
|
|
5
5
|
7:"$Sreact.suspense"
|
|
6
6
|
:HL["/_next/static/chunks/0m-_sw1425nkp.css","style"]
|
|
7
|
-
0:{"rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","link","0",{"rel":"stylesheet","href":"/_next/static/chunks/0m-_sw1425nkp.css","precedence":"next"}],["$","script","script-0",{"src":"/_next/static/chunks/0bb9anc7wd3_e.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"isPartial":false,"staleTime":300,"varyParams":null,"buildId":"
|
|
7
|
+
0:{"rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","link","0",{"rel":"stylesheet","href":"/_next/static/chunks/0m-_sw1425nkp.css","precedence":"next"}],["$","script","script-0",{"src":"/_next/static/chunks/0bb9anc7wd3_e.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"isPartial":false,"staleTime":300,"varyParams":null,"buildId":"nL6vq7onX8i2nzr-zxraV"}
|
|
8
8
|
4:{}
|
|
9
9
|
5:"$0:rsc:props:children:0:props:serverProvidedParams:params"
|
|
10
10
|
8:null
|
|
@@ -12,7 +12,7 @@ f:I[68027,["/_next/static/chunks/0dbhjjzl8qfwv.js"],"default",1]
|
|
|
12
12
|
:HL["/_next/static/media/797e433ab948586e-s.p.08e28id.o-okb.woff2","font",{"crossOrigin":"","type":"font/woff2"}]
|
|
13
13
|
:HL["/_next/static/media/caa3a2e1cccd8315-s.p.09~u27dqhyhd6.woff2","font",{"crossOrigin":"","type":"font/woff2"}]
|
|
14
14
|
:HL["/_next/static/chunks/0m-_sw1425nkp.css","style"]
|
|
15
|
-
0:{"P":null,"c":["",""],"q":"","i":false,"f":[[["",{"children":["__PAGE__",{}]},"$undefined","$undefined",16],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/chunks/139c54uo1w7.4.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/_next/static/chunks/0dbhjjzl8qfwv.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","className":"geist_a71539c9-module__T19VSG__variable geist_mono_8d43a2aa-module__8Li5zG__variable","children":["$","body",null,{"children":["$","$L2",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L3",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","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."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]}]}]]}],{"children":[["$","$1","c",{"children":[["$","$L4",null,{"Component":"$5","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@6","$@7"]}}],[["$","link","0",{"rel":"stylesheet","href":"/_next/static/chunks/0m-_sw1425nkp.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/_next/static/chunks/0bb9anc7wd3_e.js","async":true,"nonce":"$undefined"}]],["$","$L8",null,{"children":["$","$9",null,{"name":"Next.MetadataOutlet","children":"$@a"}]}]]}],{},null,false,null]},null,false,null],["$","$1","h",{"children":[null,["$","$Lb",null,{"children":"$Lc"}],["$","div",null,{"hidden":true,"children":["$","$Ld",null,{"children":["$","$9",null,{"name":"Next.Metadata","children":"$Le"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],false]],"m":"$undefined","G":["$f",[["$","link","0",{"rel":"stylesheet","href":"/_next/static/chunks/139c54uo1w7.4.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}]]],"S":true,"h":null,"s":"$undefined","l":"$undefined","p":"$undefined","d":"$undefined","b":"
|
|
15
|
+
0:{"P":null,"c":["",""],"q":"","i":false,"f":[[["",{"children":["__PAGE__",{}]},"$undefined","$undefined",16],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/chunks/139c54uo1w7.4.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/_next/static/chunks/0dbhjjzl8qfwv.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","className":"geist_a71539c9-module__T19VSG__variable geist_mono_8d43a2aa-module__8Li5zG__variable","children":["$","body",null,{"children":["$","$L2",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L3",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","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."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]}]}]]}],{"children":[["$","$1","c",{"children":[["$","$L4",null,{"Component":"$5","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@6","$@7"]}}],[["$","link","0",{"rel":"stylesheet","href":"/_next/static/chunks/0m-_sw1425nkp.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/_next/static/chunks/0bb9anc7wd3_e.js","async":true,"nonce":"$undefined"}]],["$","$L8",null,{"children":["$","$9",null,{"name":"Next.MetadataOutlet","children":"$@a"}]}]]}],{},null,false,null]},null,false,null],["$","$1","h",{"children":[null,["$","$Lb",null,{"children":"$Lc"}],["$","div",null,{"hidden":true,"children":["$","$Ld",null,{"children":["$","$9",null,{"name":"Next.Metadata","children":"$Le"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],false]],"m":"$undefined","G":["$f",[["$","link","0",{"rel":"stylesheet","href":"/_next/static/chunks/139c54uo1w7.4.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}]]],"S":true,"h":null,"s":"$undefined","l":"$undefined","p":"$undefined","d":"$undefined","b":"nL6vq7onX8i2nzr-zxraV"}
|
|
16
16
|
6:{}
|
|
17
17
|
7:"$0:f:0:1:1:children:0:props:children:0:props:serverProvidedParams:params"
|
|
18
18
|
c:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]]
|
|
@@ -3,4 +3,4 @@
|
|
|
3
3
|
3:I[97367,["/_next/static/chunks/0dbhjjzl8qfwv.js"],"MetadataBoundary"]
|
|
4
4
|
4:"$Sreact.suspense"
|
|
5
5
|
5:I[27201,["/_next/static/chunks/0dbhjjzl8qfwv.js"],"IconMark"]
|
|
6
|
-
0:{"rsc":["$","$1","h",{"children":[null,["$","$L2",null,{"children":[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]]}],["$","div",null,{"hidden":true,"children":["$","$L3",null,{"children":["$","$4",null,{"name":"Next.Metadata","children":[["$","title","0",{"children":"NeuralLoom - Unified AI Agent Orchestrator & Context Bridge"}],["$","meta","1",{"name":"description","content":"Advanced console dashboard and context staging manager for Claude Code and simulated AI agents."}],["$","link","2",{"rel":"manifest","href":"/manifest.json"}],["$","link","3",{"rel":"shortcut icon","href":"/logo.png"}],["$","link","4",{"rel":"icon","href":"/logo.png"}],["$","link","5",{"rel":"apple-touch-icon","href":"/logo.png"}],["$","$L5","6",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"isPartial":false,"staleTime":300,"varyParams":null,"buildId":"
|
|
6
|
+
0:{"rsc":["$","$1","h",{"children":[null,["$","$L2",null,{"children":[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]]}],["$","div",null,{"hidden":true,"children":["$","$L3",null,{"children":["$","$4",null,{"name":"Next.Metadata","children":[["$","title","0",{"children":"NeuralLoom - Unified AI Agent Orchestrator & Context Bridge"}],["$","meta","1",{"name":"description","content":"Advanced console dashboard and context staging manager for Claude Code and simulated AI agents."}],["$","link","2",{"rel":"manifest","href":"/manifest.json"}],["$","link","3",{"rel":"shortcut icon","href":"/logo.png"}],["$","link","4",{"rel":"icon","href":"/logo.png"}],["$","link","5",{"rel":"apple-touch-icon","href":"/logo.png"}],["$","$L5","6",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"isPartial":false,"staleTime":300,"varyParams":null,"buildId":"nL6vq7onX8i2nzr-zxraV"}
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
2:I[39756,["/_next/static/chunks/0dbhjjzl8qfwv.js"],"default"]
|
|
3
3
|
3:I[37457,["/_next/static/chunks/0dbhjjzl8qfwv.js"],"default"]
|
|
4
4
|
:HL["/_next/static/chunks/139c54uo1w7.4.css","style"]
|
|
5
|
-
0:{"rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/chunks/139c54uo1w7.4.css","precedence":"next"}],["$","script","script-0",{"src":"/_next/static/chunks/0dbhjjzl8qfwv.js","async":true}]],["$","html",null,{"lang":"en","className":"geist_a71539c9-module__T19VSG__variable geist_mono_8d43a2aa-module__8Li5zG__variable","children":["$","body",null,{"children":["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",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":"
|
|
5
|
+
0:{"rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/chunks/139c54uo1w7.4.css","precedence":"next"}],["$","script","script-0",{"src":"/_next/static/chunks/0dbhjjzl8qfwv.js","async":true}]],["$","html",null,{"lang":"en","className":"geist_a71539c9-module__T19VSG__variable geist_mono_8d43a2aa-module__8Li5zG__variable","children":["$","body",null,{"children":["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",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":"nL6vq7onX8i2nzr-zxraV"}
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
:HL["/_next/static/media/797e433ab948586e-s.p.08e28id.o-okb.woff2","font",{"crossOrigin":"","type":"font/woff2"}]
|
|
3
3
|
:HL["/_next/static/media/caa3a2e1cccd8315-s.p.09~u27dqhyhd6.woff2","font",{"crossOrigin":"","type":"font/woff2"}]
|
|
4
4
|
:HL["/_next/static/chunks/0m-_sw1425nkp.css","style"]
|
|
5
|
-
0:{"tree":{"name":"","param":null,"prefetchHints":16,"slots":{"children":{"name":"__PAGE__","param":null,"prefetchHints":0,"slots":null}}},"staleTime":300,"buildId":"
|
|
5
|
+
0:{"tree":{"name":"","param":null,"prefetchHints":16,"slots":{"children":{"name":"__PAGE__","param":null,"prefetchHints":0,"slots":null}}},"staleTime":300,"buildId":"nL6vq7onX8i2nzr-zxraV"}
|
|
@@ -109,18 +109,18 @@ module.exports=[93695,(e,t,a)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-
|
|
|
109
109
|
WHERE tc.constraint_type = 'FOREIGN KEY'
|
|
110
110
|
AND tc.table_schema = @schema
|
|
111
111
|
AND tc.table_name = @table
|
|
112
|
-
`,n=await this.query(t,[this.schema,e]),r=await this.query(a,[this.schema,e]);return n.rows.map(e=>{let t=r.rows.find(t=>t.local_column===e.name);return{name:e.name,type:e.type,nullable:"YES"===e.nullable,defaultValue:e.default_value,isPrimaryKey:e.is_pk,isForeignKey:!!t,referencedTable:t?t.foreign_table:null,referencedColumn:t?t.foreign_column:null}})}async disconnect(){this.pool&&(await this.pool.close(),this.pool=null)}}class c{static activeInstances=new Map;static getGlobalConfigPath(){return a.default.join((0,n.getConfigDir)(),"global-sql.json")}static getWorkspaceConfigPath(e){return e?a.default.join(e,".ai","neural-loom","sql-config.json"):null}static loadConfig(e){try{if(t.default.existsSync(e)){let a=t.default.readFileSync(e,"utf8");return JSON.parse(a)}}catch(t){console.error(`[ConnectionManager] Failed to load config from ${e}:`,t)}return{connections:{},activeConnection:null}}static saveConfig(e,n){try{let r=a.default.dirname(e);t.default.existsSync(r)||t.default.mkdirSync(r,{recursive:!0}),t.default.writeFileSync(e,JSON.stringify(n,null,2),"utf8")}catch(t){console.error(`[ConnectionManager] Failed to save config to ${e}:`,t)}}static async getProfiles(e){let t=this.loadConfig(this.getGlobalConfigPath()),a=Object.values(t.connections),n=[],r=t.activeConnection,s=!0;if(e){let t=this.getWorkspaceConfigPath(e);if(t){let e=this.loadConfig(t);n=Object.values(e.connections),e.activeConnection&&(r=e.activeConnection,s=!1)}}return{global:a,workspace:n,activeId:r,isActiveGlobal:s}}static async saveProfile(e,t,a){let n=t?this.getGlobalConfigPath():this.getWorkspaceConfigPath(a);if(!n)throw Error("Invalid workspace root path for saving connection profile.");let r=this.loadConfig(n);r.connections[e.id]=e,this.saveConfig(n,r)}static async deleteProfile(e,t,a){let n=t?this.getGlobalConfigPath():this.getWorkspaceConfigPath(a);if(!n)throw Error("Invalid workspace root path for deleting connection profile.");let r=this.loadConfig(n);r.connections[e]&&(delete r.connections[e],r.activeConnection===e&&(r.activeConnection=null),this.saveConfig(n,r));let s=`${t?"global":"ws"}:${e}`,o=this.activeInstances.get(s);o&&(await o.disconnect().catch(console.error),this.activeInstances.delete(s))}static async setActiveProfile(e,t,a){let n=t?this.getGlobalConfigPath():this.getWorkspaceConfigPath(a);if(!n)throw Error("Invalid workspace root path for setting active profile.");let r=this.loadConfig(n);r.activeConnection=e,this.saveConfig(n,r)}static createAdapter(e,t){switch(e.type){case"sqlite":return new s(e,t);case"postgres":return new o(e);case"mysql":return new i(e);case"mssql":return new l(e);default:throw Error(`Unsupported database type: ${e.type}`)}}static async getActiveAdapter(e){let{global:t,workspace:a,activeId:n,isActiveGlobal:r}=await this.getProfiles(e);if(!n)return null;let s=`${r?"global":"ws"}:${n}`,o=this.activeInstances.get(s);if(o){let e=(r?t:a).find(e=>e.id===n);if(e)return{adapter:o,profile:e}}let i=(r?t:a).find(e=>e.id===n);if(!i)return null;let l=this.createAdapter(i,e);return this.activeInstances.set(s,l),{adapter:l,profile:i}}static async closeAll(){for(let[,e]of this.activeInstances.entries())await e.disconnect().catch(console.error);this.activeInstances.clear()}}e.s(["ConnectionManager",0,c],41230)},19668,(e,t,a)=>{t.exports=e.x("readline",()=>require("readline"))},53869,e=>{"use strict";var t=e.i(47909),a=e.i(74017),n=e.i(96250),r=e.i(59756),s=e.i(61916),o=e.i(74677),i=e.i(69741),l=e.i(16795),c=e.i(87718),u=e.i(95169),d=e.i(47587),
|
|
112
|
+
`,n=await this.query(t,[this.schema,e]),r=await this.query(a,[this.schema,e]);return n.rows.map(e=>{let t=r.rows.find(t=>t.local_column===e.name);return{name:e.name,type:e.type,nullable:"YES"===e.nullable,defaultValue:e.default_value,isPrimaryKey:e.is_pk,isForeignKey:!!t,referencedTable:t?t.foreign_table:null,referencedColumn:t?t.foreign_column:null}})}async disconnect(){this.pool&&(await this.pool.close(),this.pool=null)}}class c{static activeInstances=new Map;static getGlobalConfigPath(){return a.default.join((0,n.getConfigDir)(),"global-sql.json")}static getWorkspaceConfigPath(e){return e?a.default.join(e,".ai","neural-loom","sql-config.json"):null}static loadConfig(e){try{if(t.default.existsSync(e)){let a=t.default.readFileSync(e,"utf8");return JSON.parse(a)}}catch(t){console.error(`[ConnectionManager] Failed to load config from ${e}:`,t)}return{connections:{},activeConnection:null}}static saveConfig(e,n){try{let r=a.default.dirname(e);t.default.existsSync(r)||t.default.mkdirSync(r,{recursive:!0}),t.default.writeFileSync(e,JSON.stringify(n,null,2),"utf8")}catch(t){console.error(`[ConnectionManager] Failed to save config to ${e}:`,t)}}static async getProfiles(e){let t=this.loadConfig(this.getGlobalConfigPath()),a=Object.values(t.connections),n=[],r=t.activeConnection,s=!0;if(e){let t=this.getWorkspaceConfigPath(e);if(t){let e=this.loadConfig(t);n=Object.values(e.connections),e.activeConnection&&(r=e.activeConnection,s=!1)}}return{global:a,workspace:n,activeId:r,isActiveGlobal:s}}static async saveProfile(e,t,a){let n=t?this.getGlobalConfigPath():this.getWorkspaceConfigPath(a);if(!n)throw Error("Invalid workspace root path for saving connection profile.");let r=this.loadConfig(n);r.connections[e.id]=e,this.saveConfig(n,r)}static async deleteProfile(e,t,a){let n=t?this.getGlobalConfigPath():this.getWorkspaceConfigPath(a);if(!n)throw Error("Invalid workspace root path for deleting connection profile.");let r=this.loadConfig(n);r.connections[e]&&(delete r.connections[e],r.activeConnection===e&&(r.activeConnection=null),this.saveConfig(n,r));let s=`${t?"global":"ws"}:${e}`,o=this.activeInstances.get(s);o&&(await o.disconnect().catch(console.error),this.activeInstances.delete(s))}static async setActiveProfile(e,t,a){let n=t?this.getGlobalConfigPath():this.getWorkspaceConfigPath(a);if(!n)throw Error("Invalid workspace root path for setting active profile.");let r=this.loadConfig(n);r.activeConnection=e,this.saveConfig(n,r)}static createAdapter(e,t){switch(e.type){case"sqlite":return new s(e,t);case"postgres":return new o(e);case"mysql":return new i(e);case"mssql":return new l(e);default:throw Error(`Unsupported database type: ${e.type}`)}}static async getActiveAdapter(e){let{global:t,workspace:a,activeId:n,isActiveGlobal:r}=await this.getProfiles(e);if(!n)return null;let s=`${r?"global":"ws"}:${n}`,o=this.activeInstances.get(s);if(o){let e=(r?t:a).find(e=>e.id===n);if(e)return{adapter:o,profile:e}}let i=(r?t:a).find(e=>e.id===n);if(!i)return null;let l=this.createAdapter(i,e);return this.activeInstances.set(s,l),{adapter:l,profile:i}}static async getAdapterById(e,t){let{global:a,workspace:n}=await this.getProfiles(t),r=n.find(t=>t.id===e),s=!1;if(r||(r=a.find(t=>t.id===e),s=!0),r||(r=n.find(t=>t.name.toLowerCase()===e.toLowerCase()),s=!1),r||(r=a.find(t=>t.name.toLowerCase()===e.toLowerCase()),s=!0),!r)return null;let o=`${s?"global":"ws"}:${r.id}`,i=this.activeInstances.get(o);if(i)return{adapter:i,profile:r};let l=this.createAdapter(r,t);return this.activeInstances.set(o,l),{adapter:l,profile:r}}static async closeAll(){for(let[,e]of this.activeInstances.entries())await e.disconnect().catch(console.error);this.activeInstances.clear()}}e.s(["ConnectionManager",0,c],41230)},19668,(e,t,a)=>{t.exports=e.x("readline",()=>require("readline"))},53869,e=>{"use strict";var t=e.i(47909),a=e.i(74017),n=e.i(96250),r=e.i(59756),s=e.i(61916),o=e.i(74677),i=e.i(69741),l=e.i(16795),c=e.i(87718),u=e.i(95169),d=e.i(47587),p=e.i(66012),h=e.i(70101),m=e.i(26937),f=e.i(10372),y=e.i(93695);e.i(52474);var b=e.i(220),g=e.i(89171),_=e.i(19668),w=e.i(41230);class v{workspaceRoot;constructor(e){this.workspaceRoot=e,console.log=(...e)=>{console.error("[LOG]",...e)}}start(){_.default.createInterface({input:process.stdin,output:process.stdout,terminal:!1}).on("line",async e=>{if(e.trim())try{let t=JSON.parse(e);if(t.method){let e=await this.handleMessage(t);e&&process.stdout.write(JSON.stringify(e)+"\n")}}catch(e){this.sendError(null,-32700,"Parse error: "+(e instanceof Error?e.message:String(e)))}}),console.error("[McpServer] SQL Model Context Protocol Server listening on stdio..."),this.workspaceRoot&&console.error(`[McpServer] Workspace Root Context resolved to: ${this.workspaceRoot}`)}async handleMessage(e){let{id:t,method:a,params:n}=e;switch(a){case"initialize":return{jsonrpc:"2.0",id:t,result:{protocolVersion:"2024-11-05",capabilities:{tools:{}},serverInfo:{name:"neural-loom-sql-mcp",version:"1.0.0"}}};case"notifications/initialized":return null;case"tools/list":return{jsonrpc:"2.0",id:t,result:{tools:[{name:"sql_list_connections",description:"Lists all configured global and workspace database connection profiles, and identifies which one is active.",inputSchema:{type:"object",properties:{}}},{name:"sql_list_tables",description:"Lists all tables and views in the database connection.",inputSchema:{type:"object",properties:{connection:{type:"string",description:"Optional connection profile ID or Name. Defaults to active database."}}}},{name:"sql_describe_table",description:"Provides column names, types, primary keys, foreign keys, and nullability information for a specific table.",inputSchema:{type:"object",properties:{table:{type:"string",description:"The name of the table to describe."},connection:{type:"string",description:"Optional connection profile ID or Name. Defaults to active database."}},required:["table"]}},{name:"sql_get_schema_summary",description:"Returns a complete Markdown representation of the database schema, detailing all tables, columns, constraints, and relationships.",inputSchema:{type:"object",properties:{connection:{type:"string",description:"Optional connection profile ID or Name. Defaults to active database."}}}},{name:"sql_query",description:"Executes a SQL query on the database connection. Select queries return matching rows; modifying queries return affected row count. If readOnly is set on the connection, modifying statements will fail.",inputSchema:{type:"object",properties:{sql:{type:"string",description:"The SQL statement to execute."},connection:{type:"string",description:"Optional connection profile ID or Name. Defaults to active database."}},required:["sql"]}}]}};case"tools/call":return await this.handleToolCall(t,n);default:return{jsonrpc:"2.0",id:t,error:{code:-32601,message:`Method not found: ${a}`}}}}async handleRequest(e){let t=await this.handleMessage(e);t&&process.stdout.write(JSON.stringify(t)+"\n")}async handleToolCall(e,t){let a=t.name,n=t.arguments||{};try{let t;if("sql_list_connections"===a){let t=await w.ConnectionManager.getProfiles(this.workspaceRoot),a=t.isActiveGlobal?t.global.find(e=>e.id===t.activeId):t.workspace.find(e=>e.id===t.activeId),n=`Active Connection Profile: ${a?`${a.name} (${a.type})`:"None"}
|
|
113
113
|
|
|
114
114
|
Global Profiles:
|
|
115
115
|
`+(t.global.length>0?t.global.map(e=>`- [${e.id}] ${e.name} (${e.type}) ${t.activeId===e.id&&t.isActiveGlobal?"(Active)":""}`).join("\n"):"None")+"\n\n"+`Workspace Profiles:
|
|
116
|
-
`+(t.workspace.length>0?t.workspace.map(e=>`- [${e.id}] ${e.name} (${e.type}) ${t.activeId===e.id&&!t.isActiveGlobal?"(Active)":""}`).join("\n"):"None");this.sendToolResult(e,n);return}let t=await w.ConnectionManager.
|
|
116
|
+
`+(t.workspace.length>0?t.workspace.map(e=>`- [${e.id}] ${e.name} (${e.type}) ${t.activeId===e.id&&!t.isActiveGlobal?"(Active)":""}`).join("\n"):"None");this.sendToolResult(e,n);return}let r=n.connection;if(r){if(!(t=await w.ConnectionManager.getAdapterById(r,this.workspaceRoot)))return void this.sendToolResult(e,`Error: Connection profile "${r}" was not found. Configure it in the NeuralLoom workspace dashboard UI.`,!0)}else if(!(t=await w.ConnectionManager.getActiveAdapter(this.workspaceRoot)))return void this.sendToolResult(e,"Error: No active database connection is selected. Please configure and activate a database connection in the NeuralLoom workspace dashboard UI.",!0);let{adapter:s,profile:o}=t;switch(a){case"sql_list_tables":{let t=await s.listTables(),a=t.length>0?t.map(e=>`- \`${e.name}\` (${e.type})`).join("\n"):"*No tables found in the active database.*";this.sendToolResult(e,`Active Database: ${o.name} (${o.type})
|
|
117
117
|
|
|
118
118
|
### Tables:
|
|
119
|
-
${a}`);break}case"sql_describe_table":{let t=n.table;if(!t)return void this.sendToolResult(e,"Error: Missing required argument 'table'.",!0);let a=await
|
|
119
|
+
${a}`);break}case"sql_describe_table":{let t=n.table;if(!t)return void this.sendToolResult(e,"Error: Missing required argument 'table'.",!0);let a=await s.describeTable(t),r=`### Table Structure: \`${t}\` (Active Connection: ${o.name})
|
|
120
120
|
|
|
121
|
-
`;for(let e of(
|
|
121
|
+
`;for(let e of(r+=`| Column | Type | Nullable | Key | References |
|
|
122
122
|
|---|---|---|---|---|
|
|
123
|
-
`,a)){let t=e.isPrimaryKey?"PK":e.isForeignKey?"FK":"",a=e.isForeignKey?`\`${e.referencedTable}.${e.referencedColumn}\``:"";
|
|
124
|
-
`}this.sendToolResult(e,
|
|
123
|
+
`,a)){let t=e.isPrimaryKey?"PK":e.isForeignKey?"FK":"",a=e.isForeignKey?`\`${e.referencedTable}.${e.referencedColumn}\``:"";r+=`| \`${e.name}\` | \`${e.type}\` | ${e.nullable?"Yes":"No"} | ${t} | ${a} |
|
|
124
|
+
`}this.sendToolResult(e,r);break}case"sql_get_schema_summary":{let t=await s.getSchemaSummary();this.sendToolResult(e,t);break}case"sql_query":{let t=n.sql;if(!t||!t.trim())return void this.sendToolResult(e,"Error: Missing required argument 'sql'.",!0);let a=t.trim().toLowerCase(),r=a.startsWith("insert")||a.startsWith("update")||a.startsWith("delete")||a.startsWith("drop")||a.startsWith("alter")||a.startsWith("create")||a.startsWith("truncate")||a.startsWith("replace");if(o.readOnly&&r)return void this.sendToolResult(e,"Error: Access Denied. This database connection is configured as Read-Only.",!0);let i=await s.query(t);void 0!==i.affectedRows?this.sendToolResult(e,`Query completed successfully. Affected rows: ${i.affectedRows}`):this.sendToolResult(e,JSON.stringify(i.rows,null,2));break}default:this.sendError(e,-32601,`Tool not implemented: ${a}`)}}catch(t){this.sendToolResult(e,`Exception executing tool: ${t.message||String(t)}`,!0)}}sendResponse(e,t){process.stdout.write(JSON.stringify({jsonrpc:"2.0",id:e,result:t})+"\n")}sendToolResult(e,t,a=!1){process.stdout.write(JSON.stringify({jsonrpc:"2.0",id:e,result:{content:[{type:"text",text:t}],isError:a}})+"\n")}sendError(e,t,a){process.stdout.write(JSON.stringify({jsonrpc:"2.0",id:e,error:{code:t,message:a}})+"\n")}}async function E(e){try{let t=e.headers.get("x-workspace-root")||void 0,a=await e.json(),n=new v(t),r=await n.handleMessage(a);if(null===r)return new Response("",{status:204});return g.NextResponse.json(r)}catch(e){return g.NextResponse.json({jsonrpc:"2.0",id:null,error:{code:-32603,message:"Internal server error: "+(e.message||String(e))}},{status:500})}}e.s(["POST",0,E],37730);var R=e.i(37730);let C=new t.AppRouteRouteModule({definition:{kind:a.RouteKind.APP_ROUTE,page:"/api/sql/mcp/route",pathname:"/api/sql/mcp",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/src/app/api/sql/mcp/route.ts",nextConfigOutput:"",userland:R,...{}}),{workAsyncStorage:A,workUnitAsyncStorage:S,serverHooks:N}=C;async function k(e,t,n){n.requestMeta&&(0,r.setRequestMeta)(e,n.requestMeta),C.isDev&&(0,r.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let g="/api/sql/mcp/route";g=g.replace(/\/index$/,"")||"/";let _=await C.prepare(e,t,{srcPage:g,multiZoneDraftMode:!1});if(!_)return t.statusCode=400,t.end("Bad Request"),null==n.waitUntil||n.waitUntil.call(n,Promise.resolve()),null;let{buildId:w,deploymentId:v,params:E,nextConfig:R,parsedUrl:A,isDraftMode:S,prerenderManifest:N,routerServerContext:k,isOnDemandRevalidate:q,revalidateOnlyGenerated:T,resolvedPathname:x,clientReferenceManifest:O,serverActionsManifest:P}=_,D=(0,i.normalizeAppPath)(g),I=!!(N.dynamicRoutes[D]||N.routes[x]),$=async()=>((null==k?void 0:k.render404)?await k.render404(e,t,A,!1):t.end("This page could not be found"),null);if(I&&!S){let e=!!N.routes[x],t=N.dynamicRoutes[D];if(t&&!1===t.fallback&&!e){if(R.adapterPath)return await $();throw new y.NoFallbackError}}let M=null;!I||C.isDev||S||(M="/index"===(M=x)?"/":M);let j=!0===C.isDev||!I,L=I&&!j;P&&O&&(0,o.setManifestsSingleton)({page:g,clientReferenceManifest:O,serverActionsManifest:P});let F=e.method||"GET",W=(0,s.getTracer)(),K=W.getActiveScopeSpan(),H=!!(null==k?void 0:k.isWrappedByNextServer),U=!!(0,r.getRequestMeta)(e,"minimalMode"),B=(0,r.getRequestMeta)(e,"incrementalCache")||await C.getIncrementalCache(e,R,N,U);null==B||B.resetRequestCache(),globalThis.__incrementalCache=B;let G={params:E,previewProps:N.preview,renderOpts:{experimental:{authInterrupts:!!R.experimental.authInterrupts},cacheComponents:!!R.cacheComponents,supportsDynamicResponse:j,incrementalCache:B,cacheLifeProfiles:R.cacheLife,waitUntil:n.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,a,n,r)=>C.onRequestError(e,t,n,r,k)},sharedContext:{buildId:w,deploymentId:v}},Y=new l.NodeNextRequest(e),J=new l.NodeNextResponse(t),Q=c.NextRequestAdapter.fromNodeNextRequest(Y,(0,c.signalFromNodeResponse)(t));try{let r,o=async e=>C.handle(Q,G).finally(()=>{if(!e)return;e.setAttributes({"http.status_code":t.statusCode,"next.rsc":!1});let a=W.getRootSpanAttributes();if(!a)return;if(a.get("next.span_type")!==u.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${a.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let n=a.get("next.route");if(n){let t=`${F} ${n}`;e.setAttributes({"next.route":n,"http.route":n,"next.span_name":t}),e.updateName(t),r&&r!==e&&(r.setAttribute("http.route",n),r.updateName(t))}else e.updateName(`${F} ${g}`)}),i=async r=>{var s,i;let l=async({previousCacheEntry:a})=>{try{if(!U&&q&&T&&!a)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let s=await o(r);e.fetchMetrics=G.renderOpts.fetchMetrics;let i=G.renderOpts.pendingWaitUntil;i&&n.waitUntil&&(n.waitUntil(i),i=void 0);let l=G.renderOpts.collectedTags;if(!I)return await (0,p.sendResponse)(Y,J,s,G.renderOpts.pendingWaitUntil),null;{let e=await s.blob(),t=(0,h.toNodeOutgoingHttpHeaders)(s.headers);l&&(t[f.NEXT_CACHE_TAGS_HEADER]=l),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let a=void 0!==G.renderOpts.collectedRevalidate&&!(G.renderOpts.collectedRevalidate>=f.INFINITE_CACHE)&&G.renderOpts.collectedRevalidate,n=void 0===G.renderOpts.collectedExpire||G.renderOpts.collectedExpire>=f.INFINITE_CACHE?void 0:G.renderOpts.collectedExpire;return{value:{kind:b.CachedRouteKind.APP_ROUTE,status:s.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:a,expire:n}}}}catch(t){throw(null==a?void 0:a.isStale)&&await C.onRequestError(e,t,{routerKind:"App Router",routePath:g,routeType:"route",revalidateReason:(0,d.getRevalidateReason)({isStaticGeneration:L,isOnDemandRevalidate:q})},!1,k),t}},c=await C.handleResponse({req:e,nextConfig:R,cacheKey:M,routeKind:a.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:N,isRoutePPREnabled:!1,isOnDemandRevalidate:q,revalidateOnlyGenerated:T,responseGenerator:l,waitUntil:n.waitUntil,isMinimalMode:U});if(!I)return null;if((null==c||null==(s=c.value)?void 0:s.kind)!==b.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==c||null==(i=c.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});U||t.setHeader("x-nextjs-cache",q?"REVALIDATED":c.isMiss?"MISS":c.isStale?"STALE":"HIT"),S&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let u=(0,h.fromNodeOutgoingHttpHeaders)(c.value.headers);return U&&I||u.delete(f.NEXT_CACHE_TAGS_HEADER),!c.cacheControl||t.getHeader("Cache-Control")||u.get("Cache-Control")||u.set("Cache-Control",(0,m.getCacheControlHeader)(c.cacheControl)),await (0,p.sendResponse)(Y,J,new Response(c.value.body,{headers:u,status:c.value.status||200})),null};H&&K?await i(K):(r=W.getActiveScopeSpan(),await W.withPropagatedContext(e.headers,()=>W.trace(u.BaseServerSpan.handleRequest,{spanName:`${F} ${g}`,kind:s.SpanKind.SERVER,attributes:{"http.method":F,"http.target":e.url}},i),void 0,!H))}catch(t){if(t instanceof y.NoFallbackError||await C.onRequestError(e,t,{routerKind:"App Router",routePath:D,routeType:"route",revalidateReason:(0,d.getRevalidateReason)({isStaticGeneration:L,isOnDemandRevalidate:q})},!1,k),I)throw t;return await (0,p.sendResponse)(Y,J,new Response(null,{status:500})),null}}e.s(["handler",0,k,"patchFetch",0,function(){return(0,n.patchFetch)({workAsyncStorage:A,workUnitAsyncStorage:S})},"routeModule",0,C,"serverHooks",0,N,"workAsyncStorage",0,A,"workUnitAsyncStorage",0,S],53869)}];
|
|
125
125
|
|
|
126
126
|
//# sourceMappingURL=%5Broot-of-the-server%5D__0.ptwor._.js.map
|