switchboard-router 0.9.3 → 0.9.6
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/app/.next/static/chunks/{1321-6bd6f91d24e9863e.js → 1321-d31d839184ff87c5.js} +1 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/agent-library/page-40f3ca16440f8e17.js +1 -0
- package/app/{.next-cli-build/static/chunks/app/(dashboard)/dashboard/skills/page-b1e9603ce7be0155.js → .next/static/chunks/app/(dashboard)/dashboard/skills/page-645e7c5ec034fe8c.js} +1 -1
- package/app/.next/static/css/196a6347b9104610.css +1 -0
- package/app/.next-cli-build/BUILD_ID +1 -1
- package/app/.next-cli-build/app-path-routes-manifest.json +12 -12
- package/app/.next-cli-build/build-manifest.json +2 -2
- package/app/.next-cli-build/prerender-manifest.json +3 -3
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/agent-library/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/agent-library/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/routing/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/[id]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/_global-error.html +1 -1
- package/app/.next-cli-build/server/app/_global-error.rsc +1 -1
- package/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/_not-found.html +1 -1
- package/app/.next-cli-build/server/app/_not-found.rsc +4 -4
- package/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/api/agent-library/catalog/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/aider-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js +5 -5
- package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/gemini-cli-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/grok-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/pi-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/models/info/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1beta/models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/version/route.js +1 -1
- package/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/callback.html +1 -1
- package/app/.next-cli-build/server/app/callback.rsc +4 -4
- package/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/index.html +1 -1
- package/app/.next-cli-build/server/app/index.rsc +4 -4
- package/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/landing.html +1 -1
- package/app/.next-cli-build/server/app/landing.rsc +4 -4
- package/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/login.html +1 -1
- package/app/.next-cli-build/server/app/login.rsc +4 -4
- package/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app-paths-manifest.json +12 -12
- package/app/.next-cli-build/server/chunks/1350.js +1 -1
- package/app/.next-cli-build/server/chunks/194.js +1 -1
- package/app/.next-cli-build/server/chunks/369.js +2 -2
- package/app/.next-cli-build/server/chunks/5920.js +2 -2
- package/app/.next-cli-build/server/chunks/6985.js +1 -1
- package/app/.next-cli-build/server/chunks/7454.js +1 -1
- package/app/.next-cli-build/server/chunks/869.js +1 -1
- package/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
- package/app/.next-cli-build/server/pages/404.html +1 -1
- package/app/.next-cli-build/server/pages/500.html +1 -1
- package/app/.next-cli-build/server/server-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/server-reference-manifest.json +1 -1
- package/app/.next-cli-build/static/chunks/{1321-6bd6f91d24e9863e.js → 1321-d31d839184ff87c5.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/agent-library/page-40f3ca16440f8e17.js +1 -0
- package/app/{.next/static/chunks/app/(dashboard)/dashboard/skills/page-b1e9603ce7be0155.js → .next-cli-build/static/chunks/app/(dashboard)/dashboard/skills/page-645e7c5ec034fe8c.js} +1 -1
- package/app/.next-cli-build/static/css/196a6347b9104610.css +1 -0
- package/app/open-sse/identity/tls/bin/darwin/arm64/switchboard-claude-tls +0 -0
- package/app/open-sse/identity/tls/bin/darwin/x64/switchboard-claude-tls +0 -0
- package/app/open-sse/identity/tls/bin/linux/arm64/switchboard-claude-tls +0 -0
- package/app/open-sse/identity/tls/bin/linux/x64/switchboard-claude-tls +0 -0
- package/app/open-sse/identity/tls/bin/win32/arm64/switchboard-claude-tls.exe +0 -0
- package/app/open-sse/identity/tls/bin/win32/x64/switchboard-claude-tls.exe +0 -0
- package/app/package.json +1 -1
- package/package.json +1 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/agent-library/page-cf3bc192f7a27304.js +0 -1
- package/app/.next/static/css/c5928b380ef8a163.css +0 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/agent-library/page-cf3bc192f7a27304.js +0 -1
- package/app/.next-cli-build/static/css/c5928b380ef8a163.css +0 -1
- /package/app/.next/static/{kGdbG3TEpkBeoqsRS2Mre → Dj3B1SY51GKVJr4nnDlac}/_buildManifest.js +0 -0
- /package/app/.next/static/{kGdbG3TEpkBeoqsRS2Mre → Dj3B1SY51GKVJr4nnDlac}/_ssgManifest.js +0 -0
- /package/app/.next-cli-build/static/{kGdbG3TEpkBeoqsRS2Mre → Dj3B1SY51GKVJr4nnDlac}/_buildManifest.js +0 -0
- /package/app/.next-cli-build/static/{kGdbG3TEpkBeoqsRS2Mre → Dj3B1SY51GKVJr4nnDlac}/_ssgManifest.js +0 -0
|
@@ -6,14 +6,14 @@
|
|
|
6
6
|
9:I[86869,[],"IconMark"]
|
|
7
7
|
b:I[57121,[],""]
|
|
8
8
|
c:I[74581,[],""]
|
|
9
|
-
f:I[21110,["3862","static/chunks/1a258343-33aee1e7d9aa500f.js","782","static/chunks/782-3a03a779968fa7a2.js","8500","static/chunks/8500-74c368e06d70378e.js","594","static/chunks/594-5a5c7b405aa92038.js","6430","static/chunks/6430-4c528cfc35666c11.js","1321","static/chunks/1321-
|
|
10
|
-
10:I[94635,["1321","static/chunks/1321-
|
|
9
|
+
f:I[21110,["3862","static/chunks/1a258343-33aee1e7d9aa500f.js","782","static/chunks/782-3a03a779968fa7a2.js","8500","static/chunks/8500-74c368e06d70378e.js","594","static/chunks/594-5a5c7b405aa92038.js","6430","static/chunks/6430-4c528cfc35666c11.js","1321","static/chunks/1321-d31d839184ff87c5.js","4707","static/chunks/4707-1ec0b2edbb07f455.js","1330","static/chunks/1330-56405eca78b12fee.js","9305","static/chunks/app/(dashboard)/layout-59baac68c7aedd25.js"],"ThemeProvider"]
|
|
10
|
+
10:I[94635,["1321","static/chunks/1321-d31d839184ff87c5.js","7177","static/chunks/app/layout-214ea0ad8a3d8323.js"],"RuntimeI18nProvider"]
|
|
11
11
|
:HL["/_next/static/css/a26e7bdf55d5cb27.css","style"]
|
|
12
|
-
:HL["/_next/static/css/
|
|
12
|
+
:HL["/_next/static/css/196a6347b9104610.css","style"]
|
|
13
13
|
6:X
|
|
14
14
|
e:X
|
|
15
15
|
e:C
|
|
16
|
-
0:{"buildId":"
|
|
16
|
+
0:{"buildId":"Dj3B1SY51GKVJr4nnDlac","data":[{"rsc":["$","$1","c",{"children":[[["$","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."}]}]]}]}]],null,["$","$L2",null,{"children":["$","$3",null,{"name":"Next.MetadataOutlet","children":"$@4"}]}]]}],"isPartial":"$@5","staleTime":"$6","varyParams":null},{"rsc":["$","$1","h",{"children":[["$","meta",null,{"name":"robots","content":"noindex"}],["$","$L7",null,{"children":[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}],["$","meta","2",{"name":"theme-color","content":"#16130E"}]]}],["$","div",null,{"hidden":true,"children":["$","$L8",null,{"children":["$","$3",null,{"name":"Next.Metadata","children":[["$","title","0",{"children":"Switchboard — Intelligent Model Routing"}],["$","meta","1",{"name":"description","content":"Route every request to the right model. One OpenAI-compatible endpoint, visible routing decisions, and self-improving combos."}],["$","link","2",{"rel":"manifest","href":"/manifest.webmanifest"}],["$","link","3",{"rel":"icon","href":"/favicon.ico?ff60cffdbfc079d0","type":"image/x-icon","sizes":"16x16"}],["$","link","4",{"rel":"icon","href":"/favicon.svg"}],["$","$L9","5",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"isPartial":"$@a","staleTime":"$6","varyParams":null},{"rsc":["$","$1","c",{"children":[null,["$","$Lb",null,{"parallelRouterKey":"children","template":["$","$Lc",null,{}]}]]}],"isPartial":"$@d","staleTime":"$6","varyParams":"$e"},{"rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/a26e7bdf55d5cb27.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/_next/static/css/196a6347b9104610.css","precedence":"next"}]],["$","html",null,{"lang":"en","className":"dark fonts-loaded","suppressHydrationWarning":true,"children":["$","body",null,{"className":"__variable_c8daab __variable_595324 font-sans antialiased","children":["$","$Lf",null,{"children":["$","$L10",null,{"children":["$","$Lb",null,{"parallelRouterKey":"children","template":["$","$Lc",null,{}]}]}]}]}]}]]}],"isPartial":"$@11","staleTime":"$6","varyParams":null}],"isUpgradeableISRFallback":false,"a":"$@12","rootVaryParams":null,"needsRuntimeRequest":"$@13"}
|
|
17
17
|
4:null
|
|
18
18
|
6:300
|
|
19
19
|
13:true
|
|
@@ -3,5 +3,5 @@
|
|
|
3
3
|
:HL["/_next/static/media/d3ebbfd689654d3a-s.p.woff2","font",{"crossOrigin":"","type":"font/woff2"}]
|
|
4
4
|
:HL["/_next/static/media/db96af6b531dc71f-s.p.woff2","font",{"crossOrigin":"","type":"font/woff2"}]
|
|
5
5
|
:HL["/_next/static/css/a26e7bdf55d5cb27.css","style"]
|
|
6
|
-
:HL["/_next/static/css/
|
|
7
|
-
0:{"tree":{"name":"","param":null,"prefetchHints":4176,"slots":{"children":{"name":"_not-found","param":null,"prefetchHints":4192,"slots":{"children":{"name":"__PAGE__","param":null,"prefetchHints":4256,"slots":null}}}}},"staleTime":300,"buildId":"
|
|
6
|
+
:HL["/_next/static/css/196a6347b9104610.css","style"]
|
|
7
|
+
0:{"tree":{"name":"","param":null,"prefetchHints":4176,"slots":{"children":{"name":"_not-found","param":null,"prefetchHints":4192,"slots":{"children":{"name":"__PAGE__","param":null,"prefetchHints":4256,"slots":null}}}}},"staleTime":300,"buildId":"Dj3B1SY51GKVJr4nnDlac"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(()=>{var a={};a.id=1579,a.ids=[1579],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},8128:a=>{a.exports=require("next/dist/server/runtime-reacts.external.js")},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},19121:a=>{a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},21820:a=>{a.exports=require("os")},22629:(a,b,c)=>{c.r(b),c.d(b,{GET:()=>h,POST:()=>i});var d=c(23211),e=c(6979),f=c(79754);async function g(){let a=await (0,f.M5)();return{root:(0,f.eB)(a),settings:a}}async function h(){return d.NextResponse.json({presets:f.vy})}async function i(a){try{let b=await a.json().catch(()=>({})),{root:c,settings:e}=await g();if("preview"===b.action&&b.url){let a=await (0,f.e6)(b.url);return d.NextResponse.json(a)}if("install"===b.action){let a=b.skillId||b.id,g=b.url;if(!a||!g)return d.NextResponse.json({error:"skillId and url required"},{status:400});let h=await (0,f.bZ)(c,{skillId:a,url:g,confirmed:!!b.confirmed,requireConfirm:!1!==e.requireCatalogConfirm}),i=h.ok?200:(h.error,400);return d.NextResponse.json(h,{status:i})}return d.NextResponse.json({error:"Unknown action"},{status:400})}catch(a){return(0,e.F)(500,(0,e.J)(a))}}},29021:a=>{a.exports=require("fs")},29294:a=>{a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33873:a=>{a.exports=require("path")},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},48161:a=>{a.exports=require("node:os")},51455:a=>{a.exports=require("node:fs/promises")},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},71553:a=>{a.exports=require("node:dns/promises")},73024:a=>{a.exports=require("node:fs")},76760:a=>{a.exports=require("node:path")},77030:a=>{a.exports=require("node:net")},77598:a=>{a.exports=require("node:crypto")},79748:a=>{a.exports=require("fs/promises")},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")},93749:(a,b,c)=>{c.r(b),c.d(b,{handler:()=>z,patchFetch:()=>y,routeModule:()=>u,serverHooks:()=>x,workAsyncStorage:()=>v,workUnitAsyncStorage:()=>w});var d=c(19225),e=c(84006),f=c(8317),g=c(99373),h=c(34775),i=c(24235),j=c(261),k=c(54365),l=c(90771),m=c(73461),n=c(67798),o=c(92280),p=c(62018),q=c(45696),r=c(47929),s=c(86439),t=c(37527);let u=new d.AppRouteRouteModule({definition:{kind:e.RouteKind.APP_ROUTE,page:"/api/agent-library/catalog/route",pathname:"/api/agent-library/catalog",filename:"route",bundlePath:"app/api/agent-library/catalog/route"},distDir:".next-cli-build",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/switchboard-router/switchboard-router/src/app/api/agent-library/catalog/route.js",nextConfigOutput:"standalone",userland:()=>c(22629),...{}}),{workAsyncStorage:v,workUnitAsyncStorage:w,serverHooks:x}=u;function y(){return(0,f.patchFetch)({workAsyncStorage:v,workUnitAsyncStorage:w})}async function z(a,b,c){c.requestMeta&&(0,g.setRequestMeta)(a,c.requestMeta),u.isDev&&(0,g.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/agent-library/catalog/route";"/index"===d&&(d="/");let f=await u.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!f)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:v,deploymentId:w,params:x,nextConfig:y,parsedUrl:z,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=f,I=(0,j.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,z,!1):b.end("This page could not be found"),null);if(J&&!A){let a=!!B.routes[F],b=B.dynamicRoutes[I];if(b&&!1===b.fallback&&!a){if(y.adapterPath)return await K();throw new s.NoFallbackError}}let L=null;!J||u.isDev||A||(L="/index"===(L=F)?"/":L);let M=!0===u.isDev||!J,N=J&&!M;H&&G&&(0,i.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,h.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,g.getRequestMeta)(a,"minimalMode"),T=(0,g.getRequestMeta)(a,"incrementalCache")||await u.getIncrementalCache(a,y,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:x,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!y.experimental.authInterrupts,useCacheTimeout:y.experimental.useCacheTimeout},cacheComponents:!!y.cacheComponents,validationLevel:y.experimental.instantInsights.validationLevel,supportsDynamicResponse:M,incrementalCache:T,hmrRefreshHash:(0,g.getRequestMeta)(a,"hmrRefreshHash"),cacheLifeProfiles:y.cacheLife,staticPageGenerationTimeout:y.staticPageGenerationTimeout,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>u.onRequestError(a,b,d,e,C)},sharedContext:{buildId:v,deploymentId:w}},V=new k.NodeNextRequest(a),W=new k.NodeNextResponse(b),X=l.NextRequestAdapter.fromNodeNextRequest(V,(0,l.signalFromNodeResponse)(b)),Y=async({previousCacheEntry:e})=>{try{if(!S&&D&&E&&!e)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await u.handle(X,U);a.fetchMetrics=U.renderOpts.fetchMetrics;let f=U.renderOpts.pendingWaitUntil;f&&c.waitUntil&&(c.waitUntil(f),f=void 0);let g=U.renderOpts.collectedTags;if(!J)return await (0,o.I)(V,W,d,f),null;{let a=await d.blob(),b=(0,p.toNodeOutgoingHttpHeaders)(d.headers);g&&(b[r.NEXT_CACHE_TAGS_HEADER]=g),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=r.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=r.INFINITE_CACHE?!1!==c&&c>0?y.expireTime:void 0:U.renderOpts.collectedExpire;return{value:{kind:t.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==e?void 0:e.isStale)&&await u.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},Z=async(d,f)=>{try{var g,i;let d=await u.handleResponse({req:a,nextConfig:y,cacheKey:L,routeKind:e.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:Y,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return;if((null==d||null==(g=d.value)?void 0:g.kind)!==t.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==d||null==(i=d.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let f=(0,p.fromNodeOutgoingHttpHeaders)(d.value.headers);S&&J||f.delete(r.NEXT_CACHE_TAGS_HEADER),!d.cacheControl||b.getHeader("Cache-Control")||f.get("Cache-Control")||f.set("Cache-Control",(0,q.getCacheControlHeader)(d.cacheControl)),await (0,o.I)(V,W,new Response(d.value.body,{headers:f,status:d.value.status||200}));return}catch(b){if(b instanceof s.NoFallbackError||await u.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;await (0,o.I)(V,W,new Response(null,{status:500}));return}finally{(()=>{if(!d)return;let a=b.statusCode;d.setAttributes({"http.status_code":a,"next.rsc":!1}),a&&a>=500&&(d.setStatus({code:h.SpanStatusCode.ERROR}),d.setAttribute("error.type",a.toString()));let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==m.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let e=c.get("next.route")||I,g=`${O} ${e}`;d.setAttributes({"next.route":e,"http.route":e,"next.span_name":g}),d.updateName(g),f&&f!==d&&(f.setAttribute("http.route",e),f.updateName(g))})()}};if(R&&Q)await Z(Q,void 0);else{let b=P.getActiveScopeSpan();await P.withPropagatedContext(a.headers,()=>P.trace(m.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:h.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},a=>Z(a,b)),void 0,!R)}}}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813,5920],()=>b(b.s=93749));module.exports=c})();
|
|
1
|
+
"use strict";(()=>{var a={};a.id=1579,a.ids=[1579],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},8128:a=>{a.exports=require("next/dist/server/runtime-reacts.external.js")},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},19121:a=>{a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},21820:a=>{a.exports=require("os")},22629:(a,b,c)=>{c.r(b),c.d(b,{GET:()=>h,POST:()=>i});var d=c(23211),e=c(6979),f=c(79754);async function g(){let a=await (0,f.M5)();return{root:(0,f.eB)(a),settings:a}}async function h(){return d.NextResponse.json({presets:f.vy,mcpPresets:f.eo})}async function i(a){try{let b=await a.json().catch(()=>({})),{root:c,settings:e}=await g();if("resolve"===b.action){let a=b.input||b.url||"";if(!a)return d.NextResponse.json({ok:!1,error:"input_required",message:"Input is required"},{status:400});let c=await (0,f.gP)(a),e=c.ok?200:400;return d.NextResponse.json(c,{status:e})}if("preview"===b.action&&b.url){let a=await (0,f.e6)(b.url);return d.NextResponse.json(a)}if("install"===b.action){let a=b.skillId||b.id,g=b.url;if(!a||!g)return d.NextResponse.json({error:"skillId and url required"},{status:400});let h=await (0,f.bZ)(c,{skillId:a,url:g,confirmed:!!b.confirmed,requireConfirm:!1!==e.requireCatalogConfirm}),i=h.ok?200:(h.error,400);return d.NextResponse.json(h,{status:i})}return d.NextResponse.json({error:"Unknown action"},{status:400})}catch(a){return(0,e.F)(500,(0,e.J)(a))}}},29021:a=>{a.exports=require("fs")},29294:a=>{a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33873:a=>{a.exports=require("path")},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},48161:a=>{a.exports=require("node:os")},51455:a=>{a.exports=require("node:fs/promises")},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},71553:a=>{a.exports=require("node:dns/promises")},73024:a=>{a.exports=require("node:fs")},76760:a=>{a.exports=require("node:path")},77030:a=>{a.exports=require("node:net")},77598:a=>{a.exports=require("node:crypto")},79748:a=>{a.exports=require("fs/promises")},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")},93749:(a,b,c)=>{c.r(b),c.d(b,{handler:()=>z,patchFetch:()=>y,routeModule:()=>u,serverHooks:()=>x,workAsyncStorage:()=>v,workUnitAsyncStorage:()=>w});var d=c(19225),e=c(84006),f=c(8317),g=c(99373),h=c(34775),i=c(24235),j=c(261),k=c(54365),l=c(90771),m=c(73461),n=c(67798),o=c(92280),p=c(62018),q=c(45696),r=c(47929),s=c(86439),t=c(37527);let u=new d.AppRouteRouteModule({definition:{kind:e.RouteKind.APP_ROUTE,page:"/api/agent-library/catalog/route",pathname:"/api/agent-library/catalog",filename:"route",bundlePath:"app/api/agent-library/catalog/route"},distDir:".next-cli-build",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/switchboard-router/switchboard-router/src/app/api/agent-library/catalog/route.js",nextConfigOutput:"standalone",userland:()=>c(22629),...{}}),{workAsyncStorage:v,workUnitAsyncStorage:w,serverHooks:x}=u;function y(){return(0,f.patchFetch)({workAsyncStorage:v,workUnitAsyncStorage:w})}async function z(a,b,c){c.requestMeta&&(0,g.setRequestMeta)(a,c.requestMeta),u.isDev&&(0,g.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/agent-library/catalog/route";"/index"===d&&(d="/");let f=await u.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!f)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:v,deploymentId:w,params:x,nextConfig:y,parsedUrl:z,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=f,I=(0,j.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,z,!1):b.end("This page could not be found"),null);if(J&&!A){let a=!!B.routes[F],b=B.dynamicRoutes[I];if(b&&!1===b.fallback&&!a){if(y.adapterPath)return await K();throw new s.NoFallbackError}}let L=null;!J||u.isDev||A||(L="/index"===(L=F)?"/":L);let M=!0===u.isDev||!J,N=J&&!M;H&&G&&(0,i.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,h.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,g.getRequestMeta)(a,"minimalMode"),T=(0,g.getRequestMeta)(a,"incrementalCache")||await u.getIncrementalCache(a,y,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:x,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!y.experimental.authInterrupts,useCacheTimeout:y.experimental.useCacheTimeout},cacheComponents:!!y.cacheComponents,validationLevel:y.experimental.instantInsights.validationLevel,supportsDynamicResponse:M,incrementalCache:T,hmrRefreshHash:(0,g.getRequestMeta)(a,"hmrRefreshHash"),cacheLifeProfiles:y.cacheLife,staticPageGenerationTimeout:y.staticPageGenerationTimeout,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>u.onRequestError(a,b,d,e,C)},sharedContext:{buildId:v,deploymentId:w}},V=new k.NodeNextRequest(a),W=new k.NodeNextResponse(b),X=l.NextRequestAdapter.fromNodeNextRequest(V,(0,l.signalFromNodeResponse)(b)),Y=async({previousCacheEntry:e})=>{try{if(!S&&D&&E&&!e)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await u.handle(X,U);a.fetchMetrics=U.renderOpts.fetchMetrics;let f=U.renderOpts.pendingWaitUntil;f&&c.waitUntil&&(c.waitUntil(f),f=void 0);let g=U.renderOpts.collectedTags;if(!J)return await (0,o.I)(V,W,d,f),null;{let a=await d.blob(),b=(0,p.toNodeOutgoingHttpHeaders)(d.headers);g&&(b[r.NEXT_CACHE_TAGS_HEADER]=g),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=r.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=r.INFINITE_CACHE?!1!==c&&c>0?y.expireTime:void 0:U.renderOpts.collectedExpire;return{value:{kind:t.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==e?void 0:e.isStale)&&await u.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},Z=async(d,f)=>{try{var g,i;let d=await u.handleResponse({req:a,nextConfig:y,cacheKey:L,routeKind:e.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:Y,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return;if((null==d||null==(g=d.value)?void 0:g.kind)!==t.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==d||null==(i=d.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let f=(0,p.fromNodeOutgoingHttpHeaders)(d.value.headers);S&&J||f.delete(r.NEXT_CACHE_TAGS_HEADER),!d.cacheControl||b.getHeader("Cache-Control")||f.get("Cache-Control")||f.set("Cache-Control",(0,q.getCacheControlHeader)(d.cacheControl)),await (0,o.I)(V,W,new Response(d.value.body,{headers:f,status:d.value.status||200}));return}catch(b){if(b instanceof s.NoFallbackError||await u.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;await (0,o.I)(V,W,new Response(null,{status:500}));return}finally{(()=>{if(!d)return;let a=b.statusCode;d.setAttributes({"http.status_code":a,"next.rsc":!1}),a&&a>=500&&(d.setStatus({code:h.SpanStatusCode.ERROR}),d.setAttribute("error.type",a.toString()));let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==m.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let e=c.get("next.route")||I,g=`${O} ${e}`;d.setAttributes({"next.route":e,"http.route":e,"next.span_name":g}),d.updateName(g),f&&f!==d&&(f.setAttribute("http.route",e),f.updateName(g))})()}};if(R&&Q)await Z(Q,void 0);else{let b=P.getActiveScopeSpan();await P.withPropagatedContext(a.headers,()=>P.trace(m.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:h.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},a=>Z(a,b)),void 0,!R)}}}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813,5920],()=>b(b.s=93749));module.exports=c})();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
(()=>{var a={};a.id=5362,a.ids=[5362],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},4953:(a,b,c)=>{"use strict";c.r(b),c.d(b,{handler:()=>z,patchFetch:()=>y,routeModule:()=>u,serverHooks:()=>x,workAsyncStorage:()=>v,workUnitAsyncStorage:()=>w});var d=c(19225),e=c(84006),f=c(8317),g=c(99373),h=c(34775),i=c(24235),j=c(261),k=c(54365),l=c(90771),m=c(73461),n=c(67798),o=c(92280),p=c(62018),q=c(45696),r=c(47929),s=c(86439),t=c(37527);let u=new d.AppRouteRouteModule({definition:{kind:e.RouteKind.APP_ROUTE,page:"/api/cli-tools/aider-settings/route",pathname:"/api/cli-tools/aider-settings",filename:"route",bundlePath:"app/api/cli-tools/aider-settings/route"},distDir:".next-cli-build",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/switchboard-router/switchboard-router/src/app/api/cli-tools/aider-settings/route.js",nextConfigOutput:"standalone",userland:()=>c(20408),...{}}),{workAsyncStorage:v,workUnitAsyncStorage:w,serverHooks:x}=u;function y(){return(0,f.patchFetch)({workAsyncStorage:v,workUnitAsyncStorage:w})}async function z(a,b,c){c.requestMeta&&(0,g.setRequestMeta)(a,c.requestMeta),u.isDev&&(0,g.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/cli-tools/aider-settings/route";"/index"===d&&(d="/");let f=await u.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!f)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:v,deploymentId:w,params:x,nextConfig:y,parsedUrl:z,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=f,I=(0,j.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,z,!1):b.end("This page could not be found"),null);if(J&&!A){let a=!!B.routes[F],b=B.dynamicRoutes[I];if(b&&!1===b.fallback&&!a){if(y.adapterPath)return await K();throw new s.NoFallbackError}}let L=null;!J||u.isDev||A||(L="/index"===(L=F)?"/":L);let M=!0===u.isDev||!J,N=J&&!M;H&&G&&(0,i.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,h.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,g.getRequestMeta)(a,"minimalMode"),T=(0,g.getRequestMeta)(a,"incrementalCache")||await u.getIncrementalCache(a,y,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:x,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!y.experimental.authInterrupts,useCacheTimeout:y.experimental.useCacheTimeout},cacheComponents:!!y.cacheComponents,validationLevel:y.experimental.instantInsights.validationLevel,supportsDynamicResponse:M,incrementalCache:T,hmrRefreshHash:(0,g.getRequestMeta)(a,"hmrRefreshHash"),cacheLifeProfiles:y.cacheLife,staticPageGenerationTimeout:y.staticPageGenerationTimeout,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>u.onRequestError(a,b,d,e,C)},sharedContext:{buildId:v,deploymentId:w}},V=new k.NodeNextRequest(a),W=new k.NodeNextResponse(b),X=l.NextRequestAdapter.fromNodeNextRequest(V,(0,l.signalFromNodeResponse)(b)),Y=async({previousCacheEntry:e})=>{try{if(!S&&D&&E&&!e)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await u.handle(X,U);a.fetchMetrics=U.renderOpts.fetchMetrics;let f=U.renderOpts.pendingWaitUntil;f&&c.waitUntil&&(c.waitUntil(f),f=void 0);let g=U.renderOpts.collectedTags;if(!J)return await (0,o.I)(V,W,d,f),null;{let a=await d.blob(),b=(0,p.toNodeOutgoingHttpHeaders)(d.headers);g&&(b[r.NEXT_CACHE_TAGS_HEADER]=g),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=r.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=r.INFINITE_CACHE?!1!==c&&c>0?y.expireTime:void 0:U.renderOpts.collectedExpire;return{value:{kind:t.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==e?void 0:e.isStale)&&await u.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},Z=async(d,f)=>{try{var g,i;let d=await u.handleResponse({req:a,nextConfig:y,cacheKey:L,routeKind:e.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:Y,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return;if((null==d||null==(g=d.value)?void 0:g.kind)!==t.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==d||null==(i=d.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let f=(0,p.fromNodeOutgoingHttpHeaders)(d.value.headers);S&&J||f.delete(r.NEXT_CACHE_TAGS_HEADER),!d.cacheControl||b.getHeader("Cache-Control")||f.get("Cache-Control")||f.set("Cache-Control",(0,q.getCacheControlHeader)(d.cacheControl)),await (0,o.I)(V,W,new Response(d.value.body,{headers:f,status:d.value.status||200}));return}catch(b){if(b instanceof s.NoFallbackError||await u.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;await (0,o.I)(V,W,new Response(null,{status:500}));return}finally{(()=>{if(!d)return;let a=b.statusCode;d.setAttributes({"http.status_code":a,"next.rsc":!1}),a&&a>=500&&(d.setStatus({code:h.SpanStatusCode.ERROR}),d.setAttribute("error.type",a.toString()));let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==m.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let e=c.get("next.route")||I,g=`${O} ${e}`;d.setAttributes({"next.route":e,"http.route":e,"next.span_name":g}),d.updateName(g),f&&f!==d&&(f.setAttribute("http.route",e),f.updateName(g))})()}};if(R&&Q)await Z(Q,void 0);else{let b=P.getActiveScopeSpan();await P.withPropagatedContext(a.headers,()=>P.trace(m.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:h.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},a=>Z(a,b)),void 0,!R)}}},8128:a=>{"use strict";a.exports=require("next/dist/server/runtime-reacts.external.js")},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},19121:a=>{"use strict";a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},19771:a=>{"use strict";a.exports=require("process")},20408:(a,b,c)=>{"use strict";c.r(b),c.d(b,{DELETE:()=>w,GET:()=>u,POST:()=>v});var d=c(49796),e=c(23211),f=c(79646),g=c(28354),h=c(79748),i=c.n(h),j=c(33873),k=c.n(j),l=c(21820),m=c.n(l),n=c(23628),o=c(63294),p=c(95510),q=c(24424);let r=(0,g.promisify)(f.exec),s=()=>k().join(m().homedir(),".aider.conf.yml"),t=async()=>{try{let a="win32"===m().platform();return await r(a?"where aider":"which aider",{windowsHide:!0}),!0}catch{try{return await i().access(s()),!0}catch{return!1}}};async function u(){try{if(!await t())return e.NextResponse.json({installed:!1,settings:null,message:"Aider is not installed"});let a="";try{a=await i().readFile(s(),"utf-8")}catch(a){if("ENOENT"!==a.code)throw a}let b={};try{b=(0,o.qg)(a)||{}}catch{b=(a=>{let b={};for(let c of String(a||"").split(/\r?\n/)){let a=c.trim();if(!a||a.startsWith("#"))continue;let d=a.match(/^([\w-]+)\s*:\s*(.*)$/);if(!d)continue;let e=d[2].trim();(e.startsWith('"')&&e.endsWith('"')||e.startsWith("'")&&e.endsWith("'"))&&(e=e.slice(1,-1)),b[d[1]]=e}return b})(a)}let c=b&&"object"==typeof b?b:{},d=c["openai-api-base"]||c.openai_api_base||null,f=c.model?.replace(/^openai\//,"")||null,g=(Array.isArray(c.alias)?c.alias:[]).map(a=>String(a).split(":").slice(1).join(":").replace(/^openai\//,"")).filter(Boolean),h=!!(a.includes("# switchboard-managed-aider:")&&d&&/localhost|127\.0\.0\.1|0\.0\.0\.0/.test(String(d||"")));return e.NextResponse.json({installed:!0,hasSwitchboard:h,settings:{baseUrl:d,model:f,models:g.length?g:f?[f]:[],apiKeySet:!!(c["openai-api-key"]||c.openai_api_key)},configPath:s()})}catch(a){return console.log("Error checking aider settings:",a),e.NextResponse.json({error:"Failed to check aider settings"},{status:500})}}async function v(a){try{let b,c;try{b=await a.json()}catch{return e.NextResponse.json({error:"Invalid JSON body"},{status:400})}let{baseUrl:d,apiKey:f,model:g,models:h,defaultModel:j}=b||{},k=(0,n.rP)(h??g);if(!(0,n.uI)(d)||!(0,n.iU)(f)||0===k.length)return e.NextResponse.json({error:"baseUrl and at least one model are required"},{status:400});let l=(c=String(d||"").replace(/\/+$/,"")).endsWith("/v1")?c:`${c}/v1`,m="";try{m=await i().readFile(s(),"utf-8")}catch{}let o=(0,n.hT)(m,{baseUrl:l,apiKey:f||"sk_switchboard",models:k,defaultModel:j||g});return await (0,p.Yb)(s(),o,{secret:!0}),e.NextResponse.json({success:!0,message:"Aider configured (~/.aider.conf.yml)",configPath:s()})}catch(a){return console.log("Error updating aider settings:",a),e.NextResponse.json({error:"Failed to update aider settings"},{status:500})}}async function w(){try{let a=s(),b="";try{b=await i().readFile(a,"utf-8")}catch(a){if("ENOENT"===a.code)return e.NextResponse.json({success:!0,message:"No config file to reset"});throw a}if(!b.includes("# switchboard-managed-aider:"))return e.NextResponse.json({success:!0,message:"Config was not switchboard-managed; left unchanged"});return await (0,p.Yb)(a,(0,n.TP)(b),{secret:!0}),e.NextResponse.json({success:!0,message:"Switchboard Aider settings removed"})}catch(a){return console.log("Error resetting aider settings:",a),e.NextResponse.json({error:"Failed to reset aider settings"},{status:500})}}(0,q.D)([u,v,w]),(0,d.A)(u,"00799df239bfa3f21df029f53effd40170ae7c6ab6",null),(0,d.A)(v,"405dbab920a6189edf5339e24350ce4e504238e4cc",null),(0,d.A)(w,"00313498421bdc2837fd0c593a9b34b15eae82ecc7",null)},21820:a=>{"use strict";a.exports=require("os")},23628:(a,b,c)=>{"use strict";c.d(b,{Ej:()=>u,F2:()=>j,JW:()=>x,L6:()=>l,TP:()=>s,XI:()=>w,gW:()=>t,hT:()=>r,iU:()=>h,oR:()=>v,rP:()=>i,uI:()=>g,xb:()=>m});var d=c(63294);let e="# switchboard-managed-aider:",f="# switchboard-managed-hermes:";function g(a){return"string"==typeof a&&a.trim().length>0}function h(a){return null==a||"string"==typeof a}function i(a){let b=Array.isArray(a)?a:"string"==typeof a?[a]:[],c=new Set,d=[];for(let a of b){if("string"!=typeof a)continue;let b=a.trim();!b||c.has(b)||(c.add(b),d.push(b))}return d}function j(a,b){let c="string"==typeof a?a.trim():"";return c&&b.includes(c)?c:b[0]||""}function k(a){let b=a.split("/");return b[b.length-1]||a}function l(a,b=[],c={}){let d=new Map(b.filter(a=>a?.id).map(a=>[a.id,a]));return i(a).map(a=>({reasoning:!1,input:["text","image"],contextWindow:2e5,maxTokens:16384,...d.get(a),id:a,name:String(c[a]||"").trim().slice(0,48)||d.get(a)?.name||k(a)}))}function m({baseUrl:a,models:b,defaultModel:c}){let d=i(b);return{type:"openai-compatible",base_url:a,auth:"bearer",api_key_env:"JCODE_SWITCHBOARD_API_KEY",env_file:"provider-switchboard.env",default_model:j(c,d),model_catalog:!0,requires_api_key:!0,models:d.map(a=>({id:a}))}}function n(a){return Buffer.from(JSON.stringify(a),"utf8").toString("base64url")}function o(a,b){let c=a.split(/\r?\n/).find(a=>a.startsWith(b));if(!c)return null;try{return JSON.parse(Buffer.from(c.slice(b.length),"base64url").toString("utf8"))}catch{return null}}function p(a,b){return a.split(/\r?\n/).filter(a=>!a.startsWith(b)).join("\n")}function q(a){return a?.toJSON?a.toJSON():a}function r(a,{baseUrl:b,apiKey:c,models:f,defaultModel:g}){let h,k=o(a,e)?s(a):a,l=(0,d.Tp)(k||"");if(l.errors.length)throw Error(`Invalid Aider YAML: ${l.errors[0].message}`);let m=i(f),p=j(g,m),t=Object.fromEntries(["openai-api-base","openai-api-key","model","alias"].map(a=>[a,{exists:l.hasIn([a]),value:q(l.getIn([a]))}]));return l.setIn(["openai-api-base"],b),l.setIn(["openai-api-key"],c),l.setIn(["model"],`openai/${p}`),l.setIn(["alias"],(h=new Map,m.map(a=>{let b=a.replace(/[^a-zA-Z0-9]+/g,"-").replace(/^-|-$/g,"")||"model",c=(h.get(b)||0)+1;h.set(b,c);let d=1===c?"":`-${c}`;return`switchboard-${b}${d}:openai/${a}`}))),`${l.toString().trimEnd()}
|
|
1
|
+
(()=>{var a={};a.id=5362,a.ids=[5362],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},4953:(a,b,c)=>{"use strict";c.r(b),c.d(b,{handler:()=>z,patchFetch:()=>y,routeModule:()=>u,serverHooks:()=>x,workAsyncStorage:()=>v,workUnitAsyncStorage:()=>w});var d=c(19225),e=c(84006),f=c(8317),g=c(99373),h=c(34775),i=c(24235),j=c(261),k=c(54365),l=c(90771),m=c(73461),n=c(67798),o=c(92280),p=c(62018),q=c(45696),r=c(47929),s=c(86439),t=c(37527);let u=new d.AppRouteRouteModule({definition:{kind:e.RouteKind.APP_ROUTE,page:"/api/cli-tools/aider-settings/route",pathname:"/api/cli-tools/aider-settings",filename:"route",bundlePath:"app/api/cli-tools/aider-settings/route"},distDir:".next-cli-build",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/switchboard-router/switchboard-router/src/app/api/cli-tools/aider-settings/route.js",nextConfigOutput:"standalone",userland:()=>c(20408),...{}}),{workAsyncStorage:v,workUnitAsyncStorage:w,serverHooks:x}=u;function y(){return(0,f.patchFetch)({workAsyncStorage:v,workUnitAsyncStorage:w})}async function z(a,b,c){c.requestMeta&&(0,g.setRequestMeta)(a,c.requestMeta),u.isDev&&(0,g.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/cli-tools/aider-settings/route";"/index"===d&&(d="/");let f=await u.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!f)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:v,deploymentId:w,params:x,nextConfig:y,parsedUrl:z,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=f,I=(0,j.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,z,!1):b.end("This page could not be found"),null);if(J&&!A){let a=!!B.routes[F],b=B.dynamicRoutes[I];if(b&&!1===b.fallback&&!a){if(y.adapterPath)return await K();throw new s.NoFallbackError}}let L=null;!J||u.isDev||A||(L="/index"===(L=F)?"/":L);let M=!0===u.isDev||!J,N=J&&!M;H&&G&&(0,i.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,h.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,g.getRequestMeta)(a,"minimalMode"),T=(0,g.getRequestMeta)(a,"incrementalCache")||await u.getIncrementalCache(a,y,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:x,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!y.experimental.authInterrupts,useCacheTimeout:y.experimental.useCacheTimeout},cacheComponents:!!y.cacheComponents,validationLevel:y.experimental.instantInsights.validationLevel,supportsDynamicResponse:M,incrementalCache:T,hmrRefreshHash:(0,g.getRequestMeta)(a,"hmrRefreshHash"),cacheLifeProfiles:y.cacheLife,staticPageGenerationTimeout:y.staticPageGenerationTimeout,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>u.onRequestError(a,b,d,e,C)},sharedContext:{buildId:v,deploymentId:w}},V=new k.NodeNextRequest(a),W=new k.NodeNextResponse(b),X=l.NextRequestAdapter.fromNodeNextRequest(V,(0,l.signalFromNodeResponse)(b)),Y=async({previousCacheEntry:e})=>{try{if(!S&&D&&E&&!e)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await u.handle(X,U);a.fetchMetrics=U.renderOpts.fetchMetrics;let f=U.renderOpts.pendingWaitUntil;f&&c.waitUntil&&(c.waitUntil(f),f=void 0);let g=U.renderOpts.collectedTags;if(!J)return await (0,o.I)(V,W,d,f),null;{let a=await d.blob(),b=(0,p.toNodeOutgoingHttpHeaders)(d.headers);g&&(b[r.NEXT_CACHE_TAGS_HEADER]=g),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=r.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=r.INFINITE_CACHE?!1!==c&&c>0?y.expireTime:void 0:U.renderOpts.collectedExpire;return{value:{kind:t.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==e?void 0:e.isStale)&&await u.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},Z=async(d,f)=>{try{var g,i;let d=await u.handleResponse({req:a,nextConfig:y,cacheKey:L,routeKind:e.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:Y,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return;if((null==d||null==(g=d.value)?void 0:g.kind)!==t.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==d||null==(i=d.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let f=(0,p.fromNodeOutgoingHttpHeaders)(d.value.headers);S&&J||f.delete(r.NEXT_CACHE_TAGS_HEADER),!d.cacheControl||b.getHeader("Cache-Control")||f.get("Cache-Control")||f.set("Cache-Control",(0,q.getCacheControlHeader)(d.cacheControl)),await (0,o.I)(V,W,new Response(d.value.body,{headers:f,status:d.value.status||200}));return}catch(b){if(b instanceof s.NoFallbackError||await u.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;await (0,o.I)(V,W,new Response(null,{status:500}));return}finally{(()=>{if(!d)return;let a=b.statusCode;d.setAttributes({"http.status_code":a,"next.rsc":!1}),a&&a>=500&&(d.setStatus({code:h.SpanStatusCode.ERROR}),d.setAttribute("error.type",a.toString()));let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==m.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let e=c.get("next.route")||I,g=`${O} ${e}`;d.setAttributes({"next.route":e,"http.route":e,"next.span_name":g}),d.updateName(g),f&&f!==d&&(f.setAttribute("http.route",e),f.updateName(g))})()}};if(R&&Q)await Z(Q,void 0);else{let b=P.getActiveScopeSpan();await P.withPropagatedContext(a.headers,()=>P.trace(m.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:h.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},a=>Z(a,b)),void 0,!R)}}},8128:a=>{"use strict";a.exports=require("next/dist/server/runtime-reacts.external.js")},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},19121:a=>{"use strict";a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},19771:a=>{"use strict";a.exports=require("process")},20408:(a,b,c)=>{"use strict";c.r(b),c.d(b,{DELETE:()=>w,GET:()=>u,POST:()=>v});var d=c(49796),e=c(23211),f=c(79646),g=c(28354),h=c(79748),i=c.n(h),j=c(33873),k=c.n(j),l=c(21820),m=c.n(l),n=c(23628),o=c(63294),p=c(95510),q=c(24424);let r=(0,g.promisify)(f.exec),s=()=>k().join(m().homedir(),".aider.conf.yml"),t=async()=>{try{let a="win32"===m().platform();return await r(a?"where aider":"which aider",{windowsHide:!0}),!0}catch{try{return await i().access(s()),!0}catch{return!1}}};async function u(){try{if(!await t())return e.NextResponse.json({installed:!1,settings:null,message:"Aider is not installed"});let a="";try{a=await i().readFile(s(),"utf-8")}catch(a){if("ENOENT"!==a.code)throw a}let b={};try{b=(0,o.qg)(a)||{}}catch{b=(a=>{let b={};for(let c of String(a||"").split(/\r?\n/)){let a=c.trim();if(!a||a.startsWith("#"))continue;let d=a.match(/^([\w-]+)\s*:\s*(.*)$/);if(!d)continue;let e=d[2].trim();(e.startsWith('"')&&e.endsWith('"')||e.startsWith("'")&&e.endsWith("'"))&&(e=e.slice(1,-1)),b[d[1]]=e}return b})(a)}let c=b&&"object"==typeof b?b:{},d=c["openai-api-base"]||c.openai_api_base||null,f=c.model?.replace(/^openai\//,"")||null,g=(Array.isArray(c.alias)?c.alias:[]).map(a=>String(a).split(":").slice(1).join(":").replace(/^openai\//,"")).filter(Boolean),h=!!(a.includes("# switchboard-managed-aider:")&&d&&/localhost|127\.0\.0\.1|0\.0\.0\.0/.test(String(d||"")));return e.NextResponse.json({installed:!0,hasSwitchboard:h,settings:{baseUrl:d,model:f,models:g.length?g:f?[f]:[],apiKeySet:!!(c["openai-api-key"]||c.openai_api_key)},configPath:s()})}catch(a){return console.log("Error checking aider settings:",a),e.NextResponse.json({error:"Failed to check aider settings"},{status:500})}}async function v(a){try{let b,c;try{b=await a.json()}catch{return e.NextResponse.json({error:"Invalid JSON body"},{status:400})}let{baseUrl:d,apiKey:f,model:g,models:h,defaultModel:j}=b||{},k=(0,n.rP)(h??g);if(!(0,n.uI)(d)||!(0,n.iU)(f)||0===k.length)return e.NextResponse.json({error:"baseUrl and at least one model are required"},{status:400});let l=(c=String(d||"").replace(/\/+$/,"")).endsWith("/v1")?c:`${c}/v1`,m="";try{m=await i().readFile(s(),"utf-8")}catch{}let o=(0,n.hT)(m,{baseUrl:l,apiKey:f||"sk_switchboard",models:k,defaultModel:j||g});return await (0,p.Yb)(s(),o,{secret:!0}),e.NextResponse.json({success:!0,message:"Aider configured (~/.aider.conf.yml)",configPath:s()})}catch(a){return console.log("Error updating aider settings:",a),e.NextResponse.json({error:"Failed to update aider settings"},{status:500})}}async function w(){try{let a=s(),b="";try{b=await i().readFile(a,"utf-8")}catch(a){if("ENOENT"===a.code)return e.NextResponse.json({success:!0,message:"No config file to reset"});throw a}if(!b.includes("# switchboard-managed-aider:"))return e.NextResponse.json({success:!0,message:"Config was not switchboard-managed; left unchanged"});return await (0,p.Yb)(a,(0,n.TP)(b),{secret:!0}),e.NextResponse.json({success:!0,message:"Switchboard Aider settings removed"})}catch(a){return console.log("Error resetting aider settings:",a),e.NextResponse.json({error:"Failed to reset aider settings"},{status:500})}}(0,q.D)([u,v,w]),(0,d.A)(u,"00d0c840f56402d7aa90e60e552a6726890629ce0f",null),(0,d.A)(v,"40ae5c06677f493dca76be4605ecae280c30a179fa",null),(0,d.A)(w,"000426b1b2c5c8adf3083a254dba19baa97fd66632",null)},21820:a=>{"use strict";a.exports=require("os")},23628:(a,b,c)=>{"use strict";c.d(b,{Ej:()=>u,F2:()=>j,JW:()=>x,L6:()=>l,TP:()=>s,XI:()=>w,gW:()=>t,hT:()=>r,iU:()=>h,oR:()=>v,rP:()=>i,uI:()=>g,xb:()=>m});var d=c(63294);let e="# switchboard-managed-aider:",f="# switchboard-managed-hermes:";function g(a){return"string"==typeof a&&a.trim().length>0}function h(a){return null==a||"string"==typeof a}function i(a){let b=Array.isArray(a)?a:"string"==typeof a?[a]:[],c=new Set,d=[];for(let a of b){if("string"!=typeof a)continue;let b=a.trim();!b||c.has(b)||(c.add(b),d.push(b))}return d}function j(a,b){let c="string"==typeof a?a.trim():"";return c&&b.includes(c)?c:b[0]||""}function k(a){let b=a.split("/");return b[b.length-1]||a}function l(a,b=[],c={}){let d=new Map(b.filter(a=>a?.id).map(a=>[a.id,a]));return i(a).map(a=>({reasoning:!1,input:["text","image"],contextWindow:2e5,maxTokens:16384,...d.get(a),id:a,name:String(c[a]||"").trim().slice(0,48)||d.get(a)?.name||k(a)}))}function m({baseUrl:a,models:b,defaultModel:c}){let d=i(b);return{type:"openai-compatible",base_url:a,auth:"bearer",api_key_env:"JCODE_SWITCHBOARD_API_KEY",env_file:"provider-switchboard.env",default_model:j(c,d),model_catalog:!0,requires_api_key:!0,models:d.map(a=>({id:a}))}}function n(a){return Buffer.from(JSON.stringify(a),"utf8").toString("base64url")}function o(a,b){let c=a.split(/\r?\n/).find(a=>a.startsWith(b));if(!c)return null;try{return JSON.parse(Buffer.from(c.slice(b.length),"base64url").toString("utf8"))}catch{return null}}function p(a,b){return a.split(/\r?\n/).filter(a=>!a.startsWith(b)).join("\n")}function q(a){return a?.toJSON?a.toJSON():a}function r(a,{baseUrl:b,apiKey:c,models:f,defaultModel:g}){let h,k=o(a,e)?s(a):a,l=(0,d.Tp)(k||"");if(l.errors.length)throw Error(`Invalid Aider YAML: ${l.errors[0].message}`);let m=i(f),p=j(g,m),t=Object.fromEntries(["openai-api-base","openai-api-key","model","alias"].map(a=>[a,{exists:l.hasIn([a]),value:q(l.getIn([a]))}]));return l.setIn(["openai-api-base"],b),l.setIn(["openai-api-key"],c),l.setIn(["model"],`openai/${p}`),l.setIn(["alias"],(h=new Map,m.map(a=>{let b=a.replace(/[^a-zA-Z0-9]+/g,"-").replace(/^-|-$/g,"")||"model",c=(h.get(b)||0)+1;h.set(b,c);let d=1===c?"":`-${c}`;return`switchboard-${b}${d}:openai/${a}`}))),`${l.toString().trimEnd()}
|
|
2
2
|
${e}${n(t)}
|
|
3
3
|
`}function s(a){let b=o(a,e);if(!b)return a;let c=(0,d.Tp)(p(a,e));if(c.errors.length)throw Error(`Invalid Aider YAML: ${c.errors[0].message}`);for(let a of["openai-api-base","openai-api-key","model","alias"])b[a]?.exists?c.setIn([a],b[a].value):c.deleteIn([a]);return c.toString()}function t(a,{baseUrl:b,models:c,defaultModel:e}){let g=o(a,f)?u(a):a,h=(0,d.Tp)(g||"");if(h.errors.length)throw Error(`Invalid Hermes YAML: ${h.errors[0].message}`);let k=i(c),l=j(e,k),m=q(h.getIn(["custom_providers"])),p=Array.isArray(m)?m:[],r=p.find(a=>a?.name==="switchboard"),s=q(h.getIn(["model"])),v=p.filter(a=>a?.name!=="switchboard"),w=Object.fromEntries(k.map(a=>[a,{}]));return v.push({name:"switchboard",base_url:b,key_env:"SWITCHBOARD_API_KEY",api_mode:"chat_completions",models:w}),h.setIn(["custom_providers"],v),h.setIn(["model"],{...s&&"object"==typeof s?s:{},default:l,provider:"custom:switchboard"}),`${h.toString().trimEnd()}
|
|
4
4
|
${f}${n({previousProvider:r??null,previousModel:s??null})}
|
|
5
|
-
`}function u(a){let b=o(a,f),c=(0,d.Tp)(p(a,f));if(c.errors.length)throw Error(`Invalid Hermes YAML: ${c.errors[0].message}`);let e=q(c.getIn(["custom_providers"]));if(Array.isArray(e)){let a=e.filter(a=>a?.name!=="switchboard");b?.previousProvider&&a.push(b.previousProvider),a.length?c.setIn(["custom_providers"],a):c.deleteIn(["custom_providers"])}return"custom:switchboard"===q(c.getIn(["model","provider"]))&&(b?.previousModel?c.setIn(["model"],b.previousModel):c.deleteIn(["model"])),c.toString()}function v(a,{baseUrl:b,apiKey:c,models:d,defaultModel:e}){let f=i(d),g=j(e,f);return{...a,model:`switchboard/${g}`,provider:{...a.provider||{},switchboard:{npm:"@ai-sdk/openai-compatible",name:"Switchboard",options:{apiKey:c,baseURL:b},models:Object.fromEntries(f.map(a=>[a,{name:k(a)}]))}}}}function w(a,{baseUrl:b,apiKey:c,models:d,defaultModel:e}){let f=i(d),g=j(e,f),h=a.providers||{},l=a.models||{};return{providers:{...h,providers:{...h.providers||{},switchboard:{type:"openai-compatible",name:"Switchboard",baseUrl:b,apiKey:c,defaultModelId:g}}},models:{...l,providers:{...l.providers||{},switchboard:{provider:{name:"Switchboard",baseUrl:b,defaultModelId:g},models:Object.fromEntries(f.map(a=>[a,{id:a,name:k(a)}]))}}}}}function x(a,{models:b,defaultModel:c}){let d=i(b),e=j(c,d),f=Object.fromEntries(Object.entries(a?.modelConfigs?.modelDefinitions&&"object"==typeof a.modelConfigs.modelDefinitions?a.modelConfigs.modelDefinitions:{}).filter(([,a])=>a?.family!=="switchboard"));return{...a,model:{...a.model||{},name:e},experimental:{...a.experimental||{},dynamicModelConfiguration:!0},modelConfigs:{...a.modelConfigs||{},modelDefinitions:{...f,...Object.fromEntries(d.map(a=>[a,{displayName:`Switchboard \xb7 ${k(a)}`,family:"switchboard",tier:"custom",isPreview:!1,isVisible:!0,features:{thinking:!0,multimodalToolUse:!0}}]))}}}}},28354:a=>{"use strict";a.exports=require("util")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33873:a=>{"use strict";a.exports=require("path")},44870:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},51455:a=>{"use strict";a.exports=require("node:fs/promises")},57781:(a,b,c)=>{"use strict";c.d(b,{R:()=>h});var d=c(51455),e=c.n(d),f=c(76760),g=c.n(f);async function h(a,b,c="utf-8"){let d=g().dirname(a);await e().mkdir(d,{recursive:!0});let f=g().join(d,`.${g().basename(a)}.sb-tmp-${process.pid}-${Date.now()}-${Math.random().toString(36).slice(2,8)}`);try{await e().writeFile(f,b,c);try{let a=await e().open(f,"r+");try{await a.sync()}finally{await a.close()}}catch{}await e().rename(f,a)}catch(a){try{await e().unlink(f)}catch{}throw a}}},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},
|
|
5
|
+
`}function u(a){let b=o(a,f),c=(0,d.Tp)(p(a,f));if(c.errors.length)throw Error(`Invalid Hermes YAML: ${c.errors[0].message}`);let e=q(c.getIn(["custom_providers"]));if(Array.isArray(e)){let a=e.filter(a=>a?.name!=="switchboard");b?.previousProvider&&a.push(b.previousProvider),a.length?c.setIn(["custom_providers"],a):c.deleteIn(["custom_providers"])}return"custom:switchboard"===q(c.getIn(["model","provider"]))&&(b?.previousModel?c.setIn(["model"],b.previousModel):c.deleteIn(["model"])),c.toString()}function v(a,{baseUrl:b,apiKey:c,models:d,defaultModel:e}){let f=i(d),g=j(e,f);return{...a,model:`switchboard/${g}`,provider:{...a.provider||{},switchboard:{npm:"@ai-sdk/openai-compatible",name:"Switchboard",options:{apiKey:c,baseURL:b},models:Object.fromEntries(f.map(a=>[a,{name:k(a)}]))}}}}function w(a,{baseUrl:b,apiKey:c,models:d,defaultModel:e}){let f=i(d),g=j(e,f),h=a.providers||{},l=a.models||{};return{providers:{...h,providers:{...h.providers||{},switchboard:{type:"openai-compatible",name:"Switchboard",baseUrl:b,apiKey:c,defaultModelId:g}}},models:{...l,providers:{...l.providers||{},switchboard:{provider:{name:"Switchboard",baseUrl:b,defaultModelId:g},models:Object.fromEntries(f.map(a=>[a,{id:a,name:k(a)}]))}}}}}function x(a,{models:b,defaultModel:c}){let d=i(b),e=j(c,d),f=Object.fromEntries(Object.entries(a?.modelConfigs?.modelDefinitions&&"object"==typeof a.modelConfigs.modelDefinitions?a.modelConfigs.modelDefinitions:{}).filter(([,a])=>a?.family!=="switchboard"));return{...a,model:{...a.model||{},name:e},experimental:{...a.experimental||{},dynamicModelConfiguration:!0},modelConfigs:{...a.modelConfigs||{},modelDefinitions:{...f,...Object.fromEntries(d.map(a=>[a,{displayName:`Switchboard \xb7 ${k(a)}`,family:"switchboard",tier:"custom",isPreview:!1,isVisible:!0,features:{thinking:!0,multimodalToolUse:!0}}]))}}}}},28354:a=>{"use strict";a.exports=require("util")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33873:a=>{"use strict";a.exports=require("path")},44870:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},51455:a=>{"use strict";a.exports=require("node:fs/promises")},57781:(a,b,c)=>{"use strict";c.d(b,{R:()=>h});var d=c(51455),e=c.n(d),f=c(76760),g=c.n(f);async function h(a,b,c="utf-8"){let d=g().dirname(a);await e().mkdir(d,{recursive:!0});let f=g().join(d,`.${g().basename(a)}.sb-tmp-${process.pid}-${Date.now()}-${Math.random().toString(36).slice(2,8)}`);try{await e().writeFile(f,b,c);try{let a=await e().open(f,"r+");try{await a.sync()}finally{await a.close()}}catch{}await e().rename(f,a)}catch(a){try{await e().unlink(f)}catch{}throw a}}},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},76760:a=>{"use strict";a.exports=require("node:path")},78335:()=>{},79428:a=>{"use strict";a.exports=require("buffer")},79646:a=>{"use strict";a.exports=require("child_process")},79748:a=>{"use strict";a.exports=require("fs/promises")},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},92631:(a,b,c)=>{"use strict";c.r(b),c.d(b,{"000426b1b2c5c8adf3083a254dba19baa97fd66632":()=>d.DELETE,"00d0c840f56402d7aa90e60e552a6726890629ce0f":()=>d.GET,"40ae5c06677f493dca76be4605ecae280c30a179fa":()=>d.POST});var d=c(20408)},95510:(a,b,c)=>{"use strict";c.d(b,{EA:()=>i,M_:()=>h,S3:()=>j,Yb:()=>g});var d=c(51455),e=c.n(d),f=c(57781);async function g(a,b,{secret:c=!1}={}){if(await (0,f.R)(a,b,c?{encoding:"utf-8",mode:384}:"utf-8"),c)try{await e().chmod(a,384)}catch{}}async function h(a){let b=await Promise.all(a.map(async({filePath:a})=>{try{return{exists:!0,value:await e().readFile(a)}}catch(a){if(a?.code==="ENOENT")return{exists:!1,value:null};throw a}})),c=async({filePath:a,content:b,secret:c=!1})=>{if(null!==b)return void await g(a,b,{secret:c});try{await e().unlink(a)}catch(a){if(a?.code!=="ENOENT")throw a}};try{for(let b of a)await c(b)}catch(e){let d=(await Promise.allSettled(a.map(({filePath:a,secret:d=!1},e)=>c({filePath:a,content:b[e].exists?b[e].value:null,secret:d})))).filter(a=>"rejected"===a.status);if(d.length>0)throw AggregateError([e,...d.map(a=>a.reason)],"Failed to replace CLI files and roll them back cleanly");throw e}}function i(a,b){return Object.fromEntries(b.map(b=>[b,{exists:Object.hasOwn(a,b),value:a[b]}]))}function j(a,b){for(let[c,d]of Object.entries(b||{}))d?.exists?a[c]=d.value:delete a[c]}},96487:()=>{}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813,440],()=>b(b.s=4953));module.exports=c})();
|