neural-loom 0.2.41 → 0.2.43

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.
Files changed (139) hide show
  1. package/.next/BUILD_ID +1 -0
  2. package/.next/app-path-routes-manifest.json +20 -0
  3. package/.next/build-manifest.json +3 -3
  4. package/.next/cache/.previewinfo +1 -1
  5. package/.next/cache/.rscinfo +1 -1
  6. package/.next/cache/.tsbuildinfo +1 -1
  7. package/.next/diagnostics/build-diagnostics.json +1 -1
  8. package/.next/diagnostics/route-bundle-stats.json +25 -0
  9. package/.next/export-marker.json +6 -0
  10. package/.next/fallback-build-manifest.json +3 -3
  11. package/.next/images-manifest.json +68 -0
  12. package/.next/prerender-manifest.json +85 -0
  13. package/.next/required-server-files.js +335 -0
  14. package/.next/required-server-files.json +335 -0
  15. package/.next/routes-manifest.json +153 -0
  16. package/.next/server/app/_global-error.html +1 -0
  17. package/.next/server/app/_global-error.meta +15 -0
  18. package/.next/server/app/_global-error.rsc +14 -0
  19. package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +5 -0
  20. package/.next/server/app/_global-error.segments/_full.segment.rsc +14 -0
  21. package/.next/server/app/_global-error.segments/_head.segment.rsc +5 -0
  22. package/.next/server/app/_global-error.segments/_index.segment.rsc +5 -0
  23. package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -0
  24. package/.next/server/app/_not-found.html +1 -0
  25. package/.next/server/app/_not-found.meta +16 -0
  26. package/.next/server/app/_not-found.rsc +16 -0
  27. package/.next/server/app/_not-found.segments/_full.segment.rsc +16 -0
  28. package/.next/server/app/_not-found.segments/_head.segment.rsc +6 -0
  29. package/.next/server/app/_not-found.segments/_index.segment.rsc +5 -0
  30. package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +5 -0
  31. package/.next/server/app/_not-found.segments/_not-found.segment.rsc +5 -0
  32. package/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -0
  33. package/.next/server/app/api/context/aider/route.js +1 -1
  34. package/.next/server/app/api/context/aider/route.js.nft.json +1 -1
  35. package/.next/server/app/api/context/claude/route.js +1 -1
  36. package/.next/server/app/api/context/claude/route.js.nft.json +1 -1
  37. package/.next/server/app/api/context/ssh/route.js +1 -1
  38. package/.next/server/app/api/context/ssh/route.js.nft.json +1 -1
  39. package/.next/server/app/api/recents/route.js +1 -1
  40. package/.next/server/app/api/recents/route.js.nft.json +1 -1
  41. package/.next/server/app/api/sessions/inject/route.js +1 -1
  42. package/.next/server/app/api/sessions/inject/route.js.nft.json +1 -1
  43. package/.next/server/app/api/sessions/input/route.js +1 -1
  44. package/.next/server/app/api/sessions/input/route.js.nft.json +1 -1
  45. package/.next/server/app/api/sessions/launch/route.js +1 -1
  46. package/.next/server/app/api/sessions/launch/route.js.nft.json +1 -1
  47. package/.next/server/app/api/sessions/route.js +1 -1
  48. package/.next/server/app/api/sessions/route.js.nft.json +1 -1
  49. package/.next/server/app/api/sessions/scope/route.js +1 -1
  50. package/.next/server/app/api/sessions/scope/route.js.nft.json +1 -1
  51. package/.next/server/app/api/sessions/start/route.js +1 -1
  52. package/.next/server/app/api/sessions/start/route.js.nft.json +1 -1
  53. package/.next/server/app/api/sessions/stats/route.js +1 -1
  54. package/.next/server/app/api/sessions/stats/route.js.nft.json +1 -1
  55. package/.next/server/app/api/sessions/stop/route.js +1 -1
  56. package/.next/server/app/api/sessions/stop/route.js.nft.json +1 -1
  57. package/.next/server/app/index.html +1 -0
  58. package/.next/server/app/index.meta +14 -0
  59. package/.next/server/app/index.rsc +21 -0
  60. package/.next/server/app/index.segments/__PAGE__.segment.rsc +10 -0
  61. package/.next/server/app/index.segments/_full.segment.rsc +21 -0
  62. package/.next/server/app/index.segments/_head.segment.rsc +6 -0
  63. package/.next/server/app/index.segments/_index.segment.rsc +5 -0
  64. package/.next/server/app/index.segments/_tree.segment.rsc +5 -0
  65. package/.next/server/chunks/[root-of-the-server]__01.zh3b._.js +15 -0
  66. package/.next/server/chunks/[root-of-the-server]__01.zh3b._.js.map +1 -0
  67. package/.next/server/chunks/[root-of-the-server]__07zx04e._.js +15 -0
  68. package/.next/server/chunks/[root-of-the-server]__07zx04e._.js.map +1 -0
  69. package/.next/server/chunks/[root-of-the-server]__0_o7_jj._.js +15 -0
  70. package/.next/server/chunks/[root-of-the-server]__0_o7_jj._.js.map +1 -0
  71. package/.next/server/chunks/[root-of-the-server]__0d0pykb._.js +7 -7
  72. package/.next/server/chunks/[root-of-the-server]__0d0pykb._.js.map +1 -1
  73. package/.next/server/chunks/[root-of-the-server]__0em6a~~._.js +15 -0
  74. package/.next/server/chunks/[root-of-the-server]__0em6a~~._.js.map +1 -0
  75. package/.next/server/chunks/[root-of-the-server]__0gchnwb._.js +3 -0
  76. package/.next/server/chunks/[root-of-the-server]__0gchnwb._.js.map +1 -0
  77. package/.next/server/chunks/[root-of-the-server]__0i~01cv._.js +15 -0
  78. package/.next/server/chunks/[root-of-the-server]__0i~01cv._.js.map +1 -0
  79. package/.next/server/chunks/[root-of-the-server]__0s0is_9._.js +15 -0
  80. package/.next/server/chunks/[root-of-the-server]__0s0is_9._.js.map +1 -0
  81. package/.next/server/chunks/[root-of-the-server]__0t713sv._.js +3 -0
  82. package/.next/server/chunks/[root-of-the-server]__0t713sv._.js.map +1 -0
  83. package/.next/server/chunks/[root-of-the-server]__0thsozo._.js +15 -0
  84. package/.next/server/chunks/[root-of-the-server]__0thsozo._.js.map +1 -0
  85. package/.next/server/chunks/[root-of-the-server]__10wwca8._.js +15 -0
  86. package/.next/server/chunks/[root-of-the-server]__10wwca8._.js.map +1 -0
  87. package/.next/server/chunks/[root-of-the-server]__11h_nxt._.js +3 -0
  88. package/.next/server/chunks/[root-of-the-server]__11h_nxt._.js.map +1 -0
  89. package/.next/server/chunks/[root-of-the-server]__11z12oe._.js +3 -0
  90. package/.next/server/chunks/[root-of-the-server]__11z12oe._.js.map +1 -0
  91. package/.next/server/functions-config-manifest.json +4 -0
  92. package/.next/server/middleware-build-manifest.js +3 -3
  93. package/.next/server/pages/404.html +1 -0
  94. package/.next/server/pages/500.html +1 -0
  95. package/.next/server/pages-manifest.json +4 -1
  96. package/.next/server/prefetch-hints.json +1 -0
  97. package/.next/server/server-reference-manifest.js +1 -1
  98. package/.next/server/server-reference-manifest.json +1 -1
  99. package/.next/static/xqFiJPAmHsNHappCgW2Ov/_ssgManifest.js +1 -0
  100. package/.next/trace +1 -0
  101. package/.next/trace-build +1 -0
  102. package/package.json +1 -1
  103. package/src/app/api/context/aider/route.ts +3 -1
  104. package/src/app/api/context/claude/route.ts +3 -1
  105. package/src/app/api/context/ssh/route.ts +3 -1
  106. package/src/app/api/sessions/scope/route.ts +3 -2
  107. package/src/lib/agents/AiderRunner.ts +2 -1
  108. package/src/lib/agents/ClaudeRunner.ts +3 -2
  109. package/src/lib/agents/DockerRunner.ts +2 -1
  110. package/src/lib/agents/SSHRunner.ts +3 -2
  111. package/src/lib/config.ts +32 -0
  112. package/src/lib/recents.ts +2 -1
  113. package/.next/server/chunks/[root-of-the-server]__005xmeg._.js +0 -15
  114. package/.next/server/chunks/[root-of-the-server]__005xmeg._.js.map +0 -1
  115. package/.next/server/chunks/[root-of-the-server]__0969ozy._.js +0 -3
  116. package/.next/server/chunks/[root-of-the-server]__0969ozy._.js.map +0 -1
  117. package/.next/server/chunks/[root-of-the-server]__0_~zjnf._.js +0 -15
  118. package/.next/server/chunks/[root-of-the-server]__0_~zjnf._.js.map +0 -1
  119. package/.next/server/chunks/[root-of-the-server]__0hl8jxx._.js +0 -15
  120. package/.next/server/chunks/[root-of-the-server]__0hl8jxx._.js.map +0 -1
  121. package/.next/server/chunks/[root-of-the-server]__0ho7s6e._.js +0 -15
  122. package/.next/server/chunks/[root-of-the-server]__0ho7s6e._.js.map +0 -1
  123. package/.next/server/chunks/[root-of-the-server]__0lh_jn-._.js +0 -15
  124. package/.next/server/chunks/[root-of-the-server]__0lh_jn-._.js.map +0 -1
  125. package/.next/server/chunks/[root-of-the-server]__0mq3k0u._.js +0 -15
  126. package/.next/server/chunks/[root-of-the-server]__0mq3k0u._.js.map +0 -1
  127. package/.next/server/chunks/[root-of-the-server]__0n-zban._.js +0 -3
  128. package/.next/server/chunks/[root-of-the-server]__0n-zban._.js.map +0 -1
  129. package/.next/server/chunks/[root-of-the-server]__0rr36fm._.js +0 -15
  130. package/.next/server/chunks/[root-of-the-server]__0rr36fm._.js.map +0 -1
  131. package/.next/server/chunks/[root-of-the-server]__0sa_gpm._.js +0 -3
  132. package/.next/server/chunks/[root-of-the-server]__0sa_gpm._.js.map +0 -1
  133. package/.next/server/chunks/[root-of-the-server]__0vp8-ka._.js +0 -3
  134. package/.next/server/chunks/[root-of-the-server]__0vp8-ka._.js.map +0 -1
  135. package/.next/server/chunks/[root-of-the-server]__0xcrc-1._.js +0 -15
  136. package/.next/server/chunks/[root-of-the-server]__0xcrc-1._.js.map +0 -1
  137. package/.next/static/ZtSBLhTiGqKpNetcymWiC/_ssgManifest.js +0 -1
  138. /package/.next/static/{ZtSBLhTiGqKpNetcymWiC → xqFiJPAmHsNHappCgW2Ov}/_buildManifest.js +0 -0
  139. /package/.next/static/{ZtSBLhTiGqKpNetcymWiC → xqFiJPAmHsNHappCgW2Ov}/_clientMiddlewareManifest.js +0 -0
@@ -0,0 +1,3 @@
1
+ module.exports=[93695,(e,t,r)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},18622,(e,t,r)=>{t.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},56704,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},32319,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},24725,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/after-task-async-storage.external.js",()=>require("next/dist/server/app-render/after-task-async-storage.external.js"))},70406,(e,t,r)=>{t.exports=e.x("next/dist/compiled/@opentelemetry/api",()=>require("next/dist/compiled/@opentelemetry/api"))},14747,(e,t,r)=>{t.exports=e.x("path",()=>require("path"))},46786,(e,t,r)=>{t.exports=e.x("os",()=>require("os"))},98003,e=>{"use strict";var t=e.i(22734),r=e.i(14747),a=e.i(46786);e.s(["getConfigDir",0,function(){let e=r.default.join(process.env.ORIGINAL_CWD||process.cwd(),".ai","neural-loom");try{t.default.existsSync(e)||t.default.mkdirSync(e,{recursive:!0});let a=r.default.join(e,".write-test-"+Math.random().toString(36).substring(7));return t.default.writeFileSync(a,"test"),t.default.unlinkSync(a),e}catch(i){console.warn(`[Config] Primary config dir is not writable (${e}). Falling back to home directory.`,i);let n=r.default.join(a.default.homedir(),".ai","neural-loom");try{return t.default.existsSync(n)||t.default.mkdirSync(n,{recursive:!0}),n}catch(t){return console.error("[Config] Fallback config dir is also not writable!",t),e}}}])},24417,e=>{"use strict";var t=e.i(22734),r=e.i(14747);e.s(["getWorkspaceFileFolders",0,function(e){try{if(!e||!t.default.existsSync(e))return[];let a=r.default.resolve(e).replace(/\\/g,"/"),n=t.default.readdirSync(a).find(e=>e.endsWith(".code-workspace"));if(!n)return[];let i=r.default.join(a,n),s=t.default.readFileSync(i,"utf8"),o=JSON.parse(s);if(!o.folders||!Array.isArray(o.folders))return[];let l=[];for(let e of o.folders)if(e.path){let n=r.default.resolve(a,e.path).replace(/\\/g,"/");n!==a&&t.default.existsSync(n)&&l.push(n)}return l}catch(e){return console.error("[WorkspaceParser] Failed to parse code-workspace file:",e),[]}}])},523,e=>{"use strict";var t=e.i(47909),r=e.i(74017),a=e.i(96250),n=e.i(59756),i=e.i(61916),s=e.i(74677),o=e.i(69741),l=e.i(16795),d=e.i(87718),c=e.i(95169),u=e.i(47587),p=e.i(66012),f=e.i(70101),h=e.i(26937),x=e.i(10372),y=e.i(93695);e.i(52474);var g=e.i(220),v=e.i(89171),R=e.i(22734),m=e.i(14747),w=e.i(98003),A=e.i(24417);let S=(0,w.getConfigDir)(),E=m.default.join(S,"aider.json");function C(e){return e?e.length<=8?"********":`${e.slice(0,6)}...${e.slice(-4)}`:""}async function k(){try{let e="",t="",r="",a="claude-3-5-sonnet",n="",i="",s=[],o=!0;if(R.default.existsSync(E))try{let l=R.default.readFileSync(E,"utf8"),d=JSON.parse(l);e=d.openaiApiKey?C(d.openaiApiKey):"",t=d.anthropicApiKey?C(d.anthropicApiKey):"",r=d.geminiApiKey?C(d.geminiApiKey):"",a=d.model||"claude-3-5-sonnet",n=d.extraFlags||"",i=d.workspaceRoot||"",s=d.scopedDirs||[],o=!1!==d.loadAllFiles}catch(e){console.error("Failed to parse aider.json:",e)}let l=i||process.env.ORIGINAL_CWD||process.cwd(),d=(0,A.getWorkspaceFileFolders)(l),c=Array.from(new Set([...s,...d]));return v.NextResponse.json({success:!0,config:{openaiApiKey:e,anthropicApiKey:t,geminiApiKey:r,model:a,extraFlags:n,workspaceRoot:i,scopedDirs:c,loadAllFiles:o}})}catch(t){let e=t instanceof Error?t.message:"Unknown error";return v.NextResponse.json({success:!1,error:e},{status:500})}}async function b(e){try{let{openaiApiKey:t,anthropicApiKey:r,geminiApiKey:a,model:n,extraFlags:i,workspaceRoot:s,scopedDirs:o,loadAllFiles:l}=await e.json();R.default.existsSync(S)||R.default.mkdirSync(S,{recursive:!0});let d={openaiApiKey:"",anthropicApiKey:"",geminiApiKey:"",model:"claude-3-5-sonnet",extraFlags:"",workspaceRoot:"",scopedDirs:[],loadAllFiles:!0};if(R.default.existsSync(E))try{d=JSON.parse(R.default.readFileSync(E,"utf8"))}catch(e){console.error("Failed to parse existing aider.json:",e)}let c=t&&t.includes("...")?d.openaiApiKey:t||"",u=r&&r.includes("...")?d.anthropicApiKey:r||"",p=a&&a.includes("...")?d.geminiApiKey:a||"";return R.default.writeFileSync(E,JSON.stringify({openaiApiKey:c,anthropicApiKey:u,geminiApiKey:p,model:n||"claude-3-5-sonnet",extraFlags:i||"",workspaceRoot:s||"",scopedDirs:o||[],loadAllFiles:!1!==l},null,2),"utf8"),v.NextResponse.json({success:!0,message:"Aider configuration saved successfully!"})}catch(t){let e=t instanceof Error?t.message:"Unknown error";return v.NextResponse.json({success:!1,error:e},{status:500})}}e.s(["GET",0,k,"POST",0,b],1935);var N=e.i(1935);let j=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/api/context/aider/route",pathname:"/api/context/aider",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/src/app/api/context/aider/route.ts",nextConfigOutput:"",userland:N,...{}}),{workAsyncStorage:F,workUnitAsyncStorage:O,serverHooks:P}=j;async function T(e,t,a){a.requestMeta&&(0,n.setRequestMeta)(e,a.requestMeta),j.isDev&&(0,n.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let v="/api/context/aider/route";v=v.replace(/\/index$/,"")||"/";let R=await j.prepare(e,t,{srcPage:v,multiZoneDraftMode:!1});if(!R)return t.statusCode=400,t.end("Bad Request"),null==a.waitUntil||a.waitUntil.call(a,Promise.resolve()),null;let{buildId:m,deploymentId:w,params:A,nextConfig:S,parsedUrl:E,isDraftMode:C,prerenderManifest:k,routerServerContext:b,isOnDemandRevalidate:N,revalidateOnlyGenerated:F,resolvedPathname:O,clientReferenceManifest:P,serverActionsManifest:T}=R,q=(0,o.normalizeAppPath)(v),_=!!(k.dynamicRoutes[q]||k.routes[O]),K=async()=>((null==b?void 0:b.render404)?await b.render404(e,t,E,!1):t.end("This page could not be found"),null);if(_&&!C){let e=!!k.routes[O],t=k.dynamicRoutes[q];if(t&&!1===t.fallback&&!e){if(S.adapterPath)return await K();throw new y.NoFallbackError}}let D=null;!_||j.isDev||C||(D="/index"===(D=O)?"/":D);let I=!0===j.isDev||!_,U=_&&!I;T&&P&&(0,s.setManifestsSingleton)({page:v,clientReferenceManifest:P,serverActionsManifest:T});let H=e.method||"GET",M=(0,i.getTracer)(),$=M.getActiveScopeSpan(),W=!!(null==b?void 0:b.isWrappedByNextServer),L=!!(0,n.getRequestMeta)(e,"minimalMode"),B=(0,n.getRequestMeta)(e,"incrementalCache")||await j.getIncrementalCache(e,S,k,L);null==B||B.resetRequestCache(),globalThis.__incrementalCache=B;let G={params:A,previewProps:k.preview,renderOpts:{experimental:{authInterrupts:!!S.experimental.authInterrupts},cacheComponents:!!S.cacheComponents,supportsDynamicResponse:I,incrementalCache:B,cacheLifeProfiles:S.cacheLife,waitUntil:a.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,a,n)=>j.onRequestError(e,t,a,n,b)},sharedContext:{buildId:m,deploymentId:w}},J=new l.NodeNextRequest(e),V=new l.NodeNextResponse(t),X=d.NextRequestAdapter.fromNodeNextRequest(J,(0,d.signalFromNodeResponse)(t));try{let n,s=async e=>j.handle(X,G).finally(()=>{if(!e)return;e.setAttributes({"http.status_code":t.statusCode,"next.rsc":!1});let r=M.getRootSpanAttributes();if(!r)return;if(r.get("next.span_type")!==c.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${r.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let a=r.get("next.route");if(a){let t=`${H} ${a}`;e.setAttributes({"next.route":a,"http.route":a,"next.span_name":t}),e.updateName(t),n&&n!==e&&(n.setAttribute("http.route",a),n.updateName(t))}else e.updateName(`${H} ${v}`)}),o=async n=>{var i,o;let l=async({previousCacheEntry:r})=>{try{if(!L&&N&&F&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let i=await s(n);e.fetchMetrics=G.renderOpts.fetchMetrics;let o=G.renderOpts.pendingWaitUntil;o&&a.waitUntil&&(a.waitUntil(o),o=void 0);let l=G.renderOpts.collectedTags;if(!_)return await (0,p.sendResponse)(J,V,i,G.renderOpts.pendingWaitUntil),null;{let e=await i.blob(),t=(0,f.toNodeOutgoingHttpHeaders)(i.headers);l&&(t[x.NEXT_CACHE_TAGS_HEADER]=l),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==G.renderOpts.collectedRevalidate&&!(G.renderOpts.collectedRevalidate>=x.INFINITE_CACHE)&&G.renderOpts.collectedRevalidate,a=void 0===G.renderOpts.collectedExpire||G.renderOpts.collectedExpire>=x.INFINITE_CACHE?void 0:G.renderOpts.collectedExpire;return{value:{kind:g.CachedRouteKind.APP_ROUTE,status:i.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:a}}}}catch(t){throw(null==r?void 0:r.isStale)&&await j.onRequestError(e,t,{routerKind:"App Router",routePath:v,routeType:"route",revalidateReason:(0,u.getRevalidateReason)({isStaticGeneration:U,isOnDemandRevalidate:N})},!1,b),t}},d=await j.handleResponse({req:e,nextConfig:S,cacheKey:D,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:k,isRoutePPREnabled:!1,isOnDemandRevalidate:N,revalidateOnlyGenerated:F,responseGenerator:l,waitUntil:a.waitUntil,isMinimalMode:L});if(!_)return null;if((null==d||null==(i=d.value)?void 0:i.kind)!==g.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==d||null==(o=d.value)?void 0:o.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});L||t.setHeader("x-nextjs-cache",N?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),C&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let c=(0,f.fromNodeOutgoingHttpHeaders)(d.value.headers);return L&&_||c.delete(x.NEXT_CACHE_TAGS_HEADER),!d.cacheControl||t.getHeader("Cache-Control")||c.get("Cache-Control")||c.set("Cache-Control",(0,h.getCacheControlHeader)(d.cacheControl)),await (0,p.sendResponse)(J,V,new Response(d.value.body,{headers:c,status:d.value.status||200})),null};W&&$?await o($):(n=M.getActiveScopeSpan(),await M.withPropagatedContext(e.headers,()=>M.trace(c.BaseServerSpan.handleRequest,{spanName:`${H} ${v}`,kind:i.SpanKind.SERVER,attributes:{"http.method":H,"http.target":e.url}},o),void 0,!W))}catch(t){if(t instanceof y.NoFallbackError||await j.onRequestError(e,t,{routerKind:"App Router",routePath:q,routeType:"route",revalidateReason:(0,u.getRevalidateReason)({isStaticGeneration:U,isOnDemandRevalidate:N})},!1,b),_)throw t;return await (0,p.sendResponse)(J,V,new Response(null,{status:500})),null}}e.s(["handler",0,T,"patchFetch",0,function(){return(0,a.patchFetch)({workAsyncStorage:F,workUnitAsyncStorage:O})},"routeModule",0,j,"serverHooks",0,P,"workAsyncStorage",0,F,"workUnitAsyncStorage",0,O],523)}];
2
+
3
+ //# sourceMappingURL=%5Broot-of-the-server%5D__11h_nxt._.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/lib/config.ts","../../../src/lib/workspaceParser.ts","../../../src/app/api/context/aider/route.ts","../../../node_modules/next/dist/esm/build/templates/app-route.js"],"sourcesContent":["import fs from \"fs\";\nimport path from \"path\";\nimport os from \"os\";\n\nexport function getConfigDir(): string {\n const primaryDir = path.join(process.env.ORIGINAL_CWD || process.cwd(), \".ai\", \"neural-loom\");\n \n try {\n // Check if primary directory exists. If not, try to create it.\n if (!fs.existsSync(primaryDir)) {\n fs.mkdirSync(primaryDir, { recursive: true });\n }\n // Perform a test write to verify write permissions (crucial for read-only directories like C:\\Program Files)\n const testFile = path.join(primaryDir, \".write-test-\" + Math.random().toString(36).substring(7));\n fs.writeFileSync(testFile, \"test\");\n fs.unlinkSync(testFile);\n return primaryDir;\n } catch (err) {\n // If EPERM or any other write error occurs, fall back to the user's home directory\n console.warn(`[Config] Primary config dir is not writable (${primaryDir}). Falling back to home directory.`, err);\n const fallbackDir = path.join(os.homedir(), \".ai\", \"neural-loom\");\n try {\n if (!fs.existsSync(fallbackDir)) {\n fs.mkdirSync(fallbackDir, { recursive: true });\n }\n return fallbackDir;\n } catch (fallbackErr) {\n console.error(\"[Config] Fallback config dir is also not writable!\", fallbackErr);\n return primaryDir;\n }\n }\n}\n","import fs from \"fs\";\nimport path from \"path\";\n\nexport function getWorkspaceFileFolders(workspaceRoot: string): string[] {\n try {\n if (!workspaceRoot || !fs.existsSync(workspaceRoot)) return [];\n \n // Normalize workspaceRoot path\n const normRoot = path.resolve(workspaceRoot).replace(/\\\\/g, \"/\");\n \n const files = fs.readdirSync(normRoot);\n const workspaceFile = files.find(f => f.endsWith(\".code-workspace\"));\n if (!workspaceFile) return [];\n\n const filePath = path.join(normRoot, workspaceFile);\n const content = fs.readFileSync(filePath, \"utf8\");\n const json = JSON.parse(content);\n \n if (!json.folders || !Array.isArray(json.folders)) return [];\n \n const folders: string[] = [];\n for (const folder of json.folders) {\n if (folder.path) {\n // Resolve relative to workspace root (where the workspace file resides)\n const resolved = path.resolve(normRoot, folder.path).replace(/\\\\/g, \"/\");\n \n // Exclude the workspace root folder itself\n if (resolved !== normRoot) {\n if (fs.existsSync(resolved)) {\n folders.push(resolved);\n }\n }\n }\n }\n return folders;\n } catch (err) {\n console.error(\"[WorkspaceParser] Failed to parse code-workspace file:\", err);\n return [];\n }\n}\n","import { NextResponse } from \"next/server\";\nimport fs from \"fs\";\nimport path from \"path\";\n\nimport { getConfigDir } from \"@/lib/config\";\n\nconst configDir = getConfigDir();\nconst configPath = path.join(configDir, \"aider.json\");\n\nfunction ensureDir() {\n if (!fs.existsSync(configDir)) {\n fs.mkdirSync(configDir, { recursive: true });\n }\n}\n\nfunction maskKey(key: string): string {\n if (!key) return \"\";\n if (key.length <= 8) return \"********\";\n return `${key.slice(0, 6)}...${key.slice(-4)}`;\n}\n\nimport { getWorkspaceFileFolders } from \"@/lib/workspaceParser\";\n\nexport async function GET() {\n try {\n let openaiApiKey = \"\";\n let anthropicApiKey = \"\";\n let geminiApiKey = \"\";\n let model = \"claude-3-5-sonnet\";\n let extraFlags = \"\";\n let workspaceRoot = \"\";\n let scopedDirs: string[] = [];\n let loadAllFiles = true;\n\n if (fs.existsSync(configPath)) {\n try {\n const rawData = fs.readFileSync(configPath, \"utf8\");\n const config = JSON.parse(rawData);\n openaiApiKey = config.openaiApiKey ? maskKey(config.openaiApiKey) : \"\";\n anthropicApiKey = config.anthropicApiKey ? maskKey(config.anthropicApiKey) : \"\";\n geminiApiKey = config.geminiApiKey ? maskKey(config.geminiApiKey) : \"\";\n model = config.model || \"claude-3-5-sonnet\";\n extraFlags = config.extraFlags || \"\";\n workspaceRoot = config.workspaceRoot || \"\";\n scopedDirs = config.scopedDirs || [];\n loadAllFiles = config.loadAllFiles !== false;\n } catch (e) {\n console.error(\"Failed to parse aider.json:\", e);\n }\n }\n\n // Resolve workspace folders from the code-workspace file if it exists\n const rootToScan = workspaceRoot || process.env.ORIGINAL_CWD || process.cwd();\n const wsFolders = getWorkspaceFileFolders(rootToScan);\n\n // Merge scopedDirs, filtering out duplicates\n const mergedScopes = Array.from(new Set([...scopedDirs, ...wsFolders]));\n\n return NextResponse.json({\n success: true,\n config: {\n openaiApiKey,\n anthropicApiKey,\n geminiApiKey,\n model,\n extraFlags,\n workspaceRoot,\n scopedDirs: mergedScopes,\n loadAllFiles,\n },\n });\n } catch (error) {\n const errorMessage = error instanceof Error ? error.message : \"Unknown error\";\n return NextResponse.json({ success: false, error: errorMessage }, { status: 500 });\n }\n}\n\nexport async function POST(request: Request) {\n try {\n const body = await request.json();\n const { openaiApiKey, anthropicApiKey, geminiApiKey, model, extraFlags, workspaceRoot, scopedDirs, loadAllFiles } = body;\n\n ensureDir();\n\n let existingConfig = {\n openaiApiKey: \"\",\n anthropicApiKey: \"\",\n geminiApiKey: \"\",\n model: \"claude-3-5-sonnet\",\n extraFlags: \"\",\n workspaceRoot: \"\",\n scopedDirs: [] as string[],\n loadAllFiles: true,\n };\n\n if (fs.existsSync(configPath)) {\n try {\n existingConfig = JSON.parse(fs.readFileSync(configPath, \"utf8\"));\n } catch (e) {\n console.error(\"Failed to parse existing aider.json:\", e);\n }\n }\n\n // Determine whether to use new keys or preserve existing ones if masked sentinels are received\n const finalOpenaiKey = (openaiApiKey && openaiApiKey.includes(\"...\")) \n ? existingConfig.openaiApiKey \n : (openaiApiKey || \"\");\n\n const finalAnthropicKey = (anthropicApiKey && anthropicApiKey.includes(\"...\")) \n ? existingConfig.anthropicApiKey \n : (anthropicApiKey || \"\");\n\n const finalGeminiKey = (geminiApiKey && geminiApiKey.includes(\"...\")) \n ? existingConfig.geminiApiKey \n : (geminiApiKey || \"\");\n\n const newConfig = {\n openaiApiKey: finalOpenaiKey,\n anthropicApiKey: finalAnthropicKey,\n geminiApiKey: finalGeminiKey,\n model: model || \"claude-3-5-sonnet\",\n extraFlags: extraFlags || \"\",\n workspaceRoot: workspaceRoot || \"\",\n scopedDirs: scopedDirs || [],\n loadAllFiles: loadAllFiles !== false,\n };\n\n fs.writeFileSync(configPath, JSON.stringify(newConfig, null, 2), \"utf8\");\n return NextResponse.json({ success: true, message: \"Aider configuration saved successfully!\" });\n\n } catch (error) {\n const errorMessage = error instanceof Error ? error.message : \"Unknown error\";\n return NextResponse.json({ success: false, error: errorMessage }, { status: 500 });\n }\n}\n","import { AppRouteRouteModule } from \"next/dist/esm/server/route-modules/app-route/module.compiled\";\nimport { RouteKind } from \"next/dist/esm/server/route-kind\";\nimport { patchFetch as _patchFetch } from \"next/dist/esm/server/lib/patch-fetch\";\nimport { addRequestMeta, getRequestMeta, setRequestMeta } from \"next/dist/esm/server/request-meta\";\nimport { getTracer, SpanKind } from \"next/dist/esm/server/lib/trace/tracer\";\nimport { setManifestsSingleton } from \"next/dist/esm/server/app-render/manifests-singleton\";\nimport { normalizeAppPath } from \"next/dist/esm/shared/lib/router/utils/app-paths\";\nimport { NodeNextRequest, NodeNextResponse } from \"next/dist/esm/server/base-http/node\";\nimport { NextRequestAdapter, signalFromNodeResponse } from \"next/dist/esm/server/web/spec-extension/adapters/next-request\";\nimport { BaseServerSpan } from \"next/dist/esm/server/lib/trace/constants\";\nimport { getRevalidateReason } from \"next/dist/esm/server/instrumentation/utils\";\nimport { sendResponse } from \"next/dist/esm/server/send-response\";\nimport { fromNodeOutgoingHttpHeaders, toNodeOutgoingHttpHeaders } from \"next/dist/esm/server/web/utils\";\nimport { getCacheControlHeader } from \"next/dist/esm/server/lib/cache-control\";\nimport { INFINITE_CACHE, NEXT_CACHE_TAGS_HEADER } from \"next/dist/esm/lib/constants\";\nimport { NoFallbackError } from \"next/dist/esm/shared/lib/no-fallback-error.external\";\nimport { CachedRouteKind } from \"next/dist/esm/server/response-cache\";\nimport * as userland from \"INNER_APP_ROUTE\";\n// We inject the nextConfigOutput here so that we can use them in the route\n// module.\nconst nextConfigOutput = \"\"\nconst routeModule = new AppRouteRouteModule({\n definition: {\n kind: RouteKind.APP_ROUTE,\n page: \"/api/context/aider/route\",\n pathname: \"/api/context/aider\",\n filename: \"route\",\n bundlePath: \"\"\n },\n distDir: process.env.__NEXT_RELATIVE_DIST_DIR || '',\n relativeProjectDir: process.env.__NEXT_RELATIVE_PROJECT_DIR || '',\n resolvedPagePath: \"[project]/src/app/api/context/aider/route.ts\",\n nextConfigOutput,\n // The static import is used for initialization (methods, dynamic, etc.).\n userland: userland,\n // In Turbopack dev mode, also provide a getter that calls require() on every\n // request. This re-reads from devModuleCache so HMR updates are picked up,\n // and the async wrapper unwraps async-module Promises (ESM-only\n // serverExternalPackages) automatically.\n ...process.env.TURBOPACK && process.env.__NEXT_DEV_SERVER ? {\n getUserland: ()=>import(\"INNER_APP_ROUTE\")\n } : {}\n});\n// Pull out the exports that we need to expose from the module. This should\n// be eliminated when we've moved the other routes to the new format. These\n// are used to hook into the route.\nconst { workAsyncStorage, workUnitAsyncStorage, serverHooks } = routeModule;\nfunction patchFetch() {\n return _patchFetch({\n workAsyncStorage,\n workUnitAsyncStorage\n });\n}\nexport { routeModule, workAsyncStorage, workUnitAsyncStorage, serverHooks, patchFetch, };\nexport async function handler(req, res, ctx) {\n if (ctx.requestMeta) {\n setRequestMeta(req, ctx.requestMeta);\n }\n if (routeModule.isDev) {\n addRequestMeta(req, 'devRequestTimingInternalsEnd', process.hrtime.bigint());\n }\n let srcPage = \"/api/context/aider/route\";\n // turbopack doesn't normalize `/index` in the page name\n // so we need to to process dynamic routes properly\n // TODO: fix turbopack providing differing value from webpack\n if (process.env.TURBOPACK) {\n srcPage = srcPage.replace(/\\/index$/, '') || '/';\n } else if (srcPage === '/index') {\n // we always normalize /index specifically\n srcPage = '/';\n }\n const multiZoneDraftMode = process.env.__NEXT_MULTI_ZONE_DRAFT_MODE;\n const prepareResult = await routeModule.prepare(req, res, {\n srcPage,\n multiZoneDraftMode\n });\n if (!prepareResult) {\n res.statusCode = 400;\n res.end('Bad Request');\n ctx.waitUntil == null ? void 0 : ctx.waitUntil.call(ctx, Promise.resolve());\n return null;\n }\n const { buildId, deploymentId, params, nextConfig, parsedUrl, isDraftMode, prerenderManifest, routerServerContext, isOnDemandRevalidate, revalidateOnlyGenerated, resolvedPathname, clientReferenceManifest, serverActionsManifest } = prepareResult;\n const normalizedSrcPage = normalizeAppPath(srcPage);\n let isIsr = Boolean(prerenderManifest.dynamicRoutes[normalizedSrcPage] || prerenderManifest.routes[resolvedPathname]);\n const render404 = async ()=>{\n // TODO: should route-module itself handle rendering the 404\n if (routerServerContext == null ? void 0 : routerServerContext.render404) {\n await routerServerContext.render404(req, res, parsedUrl, false);\n } else {\n res.end('This page could not be found');\n }\n return null;\n };\n if (isIsr && !isDraftMode) {\n const isPrerendered = Boolean(prerenderManifest.routes[resolvedPathname]);\n const prerenderInfo = prerenderManifest.dynamicRoutes[normalizedSrcPage];\n if (prerenderInfo) {\n if (prerenderInfo.fallback === false && !isPrerendered) {\n if (nextConfig.adapterPath) {\n return await render404();\n }\n throw new NoFallbackError();\n }\n }\n }\n let cacheKey = null;\n if (isIsr && !routeModule.isDev && !isDraftMode) {\n cacheKey = resolvedPathname;\n // ensure /index and / is normalized to one key\n cacheKey = cacheKey === '/index' ? '/' : cacheKey;\n }\n const supportsDynamicResponse = // If we're in development, we always support dynamic HTML\n routeModule.isDev === true || // If this is not SSG or does not have static paths, then it supports\n // dynamic HTML.\n !isIsr;\n // This is a revalidation request if the request is for a static\n // page and it is not being resumed from a postponed render and\n // it is not a dynamic RSC request then it is a revalidation\n // request.\n const isStaticGeneration = isIsr && !supportsDynamicResponse;\n // Before rendering (which initializes component tree modules), we have to\n // set the reference manifests to our global store so Server Action's\n // encryption util can access to them at the top level of the page module.\n if (serverActionsManifest && clientReferenceManifest) {\n setManifestsSingleton({\n page: srcPage,\n clientReferenceManifest,\n serverActionsManifest\n });\n }\n const method = req.method || 'GET';\n const tracer = getTracer();\n const activeSpan = tracer.getActiveScopeSpan();\n const isWrappedByNextServer = Boolean(routerServerContext == null ? void 0 : routerServerContext.isWrappedByNextServer);\n const isMinimalMode = Boolean(getRequestMeta(req, 'minimalMode'));\n const incrementalCache = getRequestMeta(req, 'incrementalCache') || await routeModule.getIncrementalCache(req, nextConfig, prerenderManifest, isMinimalMode);\n incrementalCache == null ? void 0 : incrementalCache.resetRequestCache();\n globalThis.__incrementalCache = incrementalCache;\n const context = {\n params,\n previewProps: prerenderManifest.preview,\n renderOpts: {\n experimental: {\n authInterrupts: Boolean(nextConfig.experimental.authInterrupts)\n },\n cacheComponents: Boolean(nextConfig.cacheComponents),\n supportsDynamicResponse,\n incrementalCache,\n cacheLifeProfiles: nextConfig.cacheLife,\n waitUntil: ctx.waitUntil,\n onClose: (cb)=>{\n res.on('close', cb);\n },\n onAfterTaskError: undefined,\n onInstrumentationRequestError: (error, _request, errorContext, silenceLog)=>routeModule.onRequestError(req, error, errorContext, silenceLog, routerServerContext)\n },\n sharedContext: {\n buildId,\n deploymentId\n }\n };\n const nodeNextReq = new NodeNextRequest(req);\n const nodeNextRes = new NodeNextResponse(res);\n const nextReq = NextRequestAdapter.fromNodeNextRequest(nodeNextReq, signalFromNodeResponse(res));\n try {\n let parentSpan;\n const invokeRouteModule = async (span)=>{\n return routeModule.handle(nextReq, context).finally(()=>{\n if (!span) return;\n span.setAttributes({\n 'http.status_code': res.statusCode,\n 'next.rsc': false\n });\n const rootSpanAttributes = tracer.getRootSpanAttributes();\n // We were unable to get attributes, probably OTEL is not enabled\n if (!rootSpanAttributes) {\n return;\n }\n if (rootSpanAttributes.get('next.span_type') !== BaseServerSpan.handleRequest) {\n console.warn(`Unexpected root span type '${rootSpanAttributes.get('next.span_type')}'. Please report this Next.js issue https://github.com/vercel/next.js`);\n return;\n }\n const route = rootSpanAttributes.get('next.route');\n if (route) {\n const name = `${method} ${route}`;\n span.setAttributes({\n 'next.route': route,\n 'http.route': route,\n 'next.span_name': name\n });\n span.updateName(name);\n // Propagate http.route to the parent span if one exists (e.g.\n // a platform-created HTTP span in adapter deployments).\n if (parentSpan && parentSpan !== span) {\n parentSpan.setAttribute('http.route', route);\n parentSpan.updateName(name);\n }\n } else {\n span.updateName(`${method} ${srcPage}`);\n }\n });\n };\n const handleResponse = async (currentSpan)=>{\n var _cacheEntry_value;\n const responseGenerator = async ({ previousCacheEntry })=>{\n try {\n if (!isMinimalMode && isOnDemandRevalidate && revalidateOnlyGenerated && !previousCacheEntry) {\n res.statusCode = 404;\n // on-demand revalidate always sets this header\n res.setHeader('x-nextjs-cache', 'REVALIDATED');\n res.end('This page could not be found');\n return null;\n }\n const response = await invokeRouteModule(currentSpan);\n req.fetchMetrics = context.renderOpts.fetchMetrics;\n let pendingWaitUntil = context.renderOpts.pendingWaitUntil;\n // Attempt using provided waitUntil if available\n // if it's not we fallback to sendResponse's handling\n if (pendingWaitUntil) {\n if (ctx.waitUntil) {\n ctx.waitUntil(pendingWaitUntil);\n pendingWaitUntil = undefined;\n }\n }\n const cacheTags = context.renderOpts.collectedTags;\n // If the request is for a static response, we can cache it so long\n // as it's not edge.\n if (isIsr) {\n const blob = await response.blob();\n // Copy the headers from the response.\n const headers = toNodeOutgoingHttpHeaders(response.headers);\n if (cacheTags) {\n headers[NEXT_CACHE_TAGS_HEADER] = cacheTags;\n }\n if (!headers['content-type'] && blob.type) {\n headers['content-type'] = blob.type;\n }\n const revalidate = typeof context.renderOpts.collectedRevalidate === 'undefined' || context.renderOpts.collectedRevalidate >= INFINITE_CACHE ? false : context.renderOpts.collectedRevalidate;\n const expire = typeof context.renderOpts.collectedExpire === 'undefined' || context.renderOpts.collectedExpire >= INFINITE_CACHE ? undefined : context.renderOpts.collectedExpire;\n // Create the cache entry for the response.\n const cacheEntry = {\n value: {\n kind: CachedRouteKind.APP_ROUTE,\n status: response.status,\n body: Buffer.from(await blob.arrayBuffer()),\n headers\n },\n cacheControl: {\n revalidate,\n expire\n }\n };\n return cacheEntry;\n } else {\n // send response without caching if not ISR\n await sendResponse(nodeNextReq, nodeNextRes, response, context.renderOpts.pendingWaitUntil);\n return null;\n }\n } catch (err) {\n // if this is a background revalidate we need to report\n // the request error here as it won't be bubbled\n if (previousCacheEntry == null ? void 0 : previousCacheEntry.isStale) {\n const silenceLog = false;\n await routeModule.onRequestError(req, err, {\n routerKind: 'App Router',\n routePath: srcPage,\n routeType: 'route',\n revalidateReason: getRevalidateReason({\n isStaticGeneration,\n isOnDemandRevalidate\n })\n }, silenceLog, routerServerContext);\n }\n throw err;\n }\n };\n const cacheEntry = await routeModule.handleResponse({\n req,\n nextConfig,\n cacheKey,\n routeKind: RouteKind.APP_ROUTE,\n isFallback: false,\n prerenderManifest,\n isRoutePPREnabled: false,\n isOnDemandRevalidate,\n revalidateOnlyGenerated,\n responseGenerator,\n waitUntil: ctx.waitUntil,\n isMinimalMode\n });\n // we don't create a cacheEntry for ISR\n if (!isIsr) {\n return null;\n }\n if ((cacheEntry == null ? void 0 : (_cacheEntry_value = cacheEntry.value) == null ? void 0 : _cacheEntry_value.kind) !== CachedRouteKind.APP_ROUTE) {\n var _cacheEntry_value1;\n throw Object.defineProperty(new Error(`Invariant: app-route received invalid cache entry ${cacheEntry == null ? void 0 : (_cacheEntry_value1 = cacheEntry.value) == null ? void 0 : _cacheEntry_value1.kind}`), \"__NEXT_ERROR_CODE\", {\n value: \"E701\",\n enumerable: false,\n configurable: true\n });\n }\n if (!isMinimalMode) {\n res.setHeader('x-nextjs-cache', isOnDemandRevalidate ? 'REVALIDATED' : cacheEntry.isMiss ? 'MISS' : cacheEntry.isStale ? 'STALE' : 'HIT');\n }\n // Draft mode should never be cached\n if (isDraftMode) {\n res.setHeader('Cache-Control', 'private, no-cache, no-store, max-age=0, must-revalidate');\n }\n const headers = fromNodeOutgoingHttpHeaders(cacheEntry.value.headers);\n if (!(isMinimalMode && isIsr)) {\n headers.delete(NEXT_CACHE_TAGS_HEADER);\n }\n // If cache control is already set on the response we don't\n // override it to allow users to customize it via next.config\n if (cacheEntry.cacheControl && !res.getHeader('Cache-Control') && !headers.get('Cache-Control')) {\n headers.set('Cache-Control', getCacheControlHeader(cacheEntry.cacheControl));\n }\n await sendResponse(nodeNextReq, nodeNextRes, // @ts-expect-error - Argument of type 'Buffer<ArrayBufferLike>' is not assignable to parameter of type 'BodyInit | null | undefined'.\n new Response(cacheEntry.value.body, {\n headers,\n status: cacheEntry.value.status || 200\n }));\n return null;\n };\n // TODO: activeSpan code path is for when wrapped by\n // next-server can be removed when this is no longer used\n if (isWrappedByNextServer && activeSpan) {\n await handleResponse(activeSpan);\n } else {\n parentSpan = tracer.getActiveScopeSpan();\n await tracer.withPropagatedContext(req.headers, ()=>tracer.trace(BaseServerSpan.handleRequest, {\n spanName: `${method} ${srcPage}`,\n kind: SpanKind.SERVER,\n attributes: {\n 'http.method': method,\n 'http.target': req.url\n }\n }, handleResponse), undefined, !isWrappedByNextServer);\n }\n } catch (err) {\n if (!(err instanceof NoFallbackError)) {\n const silenceLog = false;\n await routeModule.onRequestError(req, err, {\n routerKind: 'App Router',\n routePath: normalizedSrcPage,\n routeType: 'route',\n revalidateReason: getRevalidateReason({\n isStaticGeneration,\n isOnDemandRevalidate\n })\n }, silenceLog, routerServerContext);\n }\n // rethrow so that we can handle serving error page\n // If this is during static generation, throw the error again.\n if (isIsr) throw err;\n // Otherwise, send a 500 response.\n await sendResponse(nodeNextReq, nodeNextRes, new Response(null, {\n status: 500\n }));\n return null;\n }\n}\n\n//# sourceMappingURL=app-route.js.map\n"],"names":["getConfigDir","primaryDir","join","process","env","ORIGINAL_CWD","cwd","existsSync","mkdirSync","recursive","testFile","Math","random","toString","substring","writeFileSync","unlinkSync","err","console","warn","fallbackDir","homedir","fallbackErr","error","getWorkspaceFileFolders","workspaceRoot","normRoot","resolve","replace","files","readdirSync","workspaceFile","find","f","endsWith","filePath","content","readFileSync","json","JSON","parse","folders","Array","isArray","folder","path","resolved","push","configDir","configPath","ensureDir","config","maskKey","key","length","slice","GET","openaiApiKey","anthropicApiKey","geminiApiKey","model","extraFlags","scopedDirs","loadAllFiles","rawData","e","rootToScan","wsFolders","mergedScopes","from","Set","success","finalOpenaiKey","existingConfig","errorMessage","Error","message","status","POST","request","body","includes","finalAnthropicKey","finalGeminiKey","newConfig","stringify"],"mappings":"qmCAAA,IAAA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,6BAEO,SAASA,EACd,IAAMC,EAAa,EAAA,OAAI,CAACC,IAAI,CAACC,QAAQC,GAAG,CAACC,YAAY,EAAIF,QAAQG,GAAG,GAAI,MAAO,eAE/E,GAAI,CAEE,AAAC,EAAA,OAAE,CAACC,UAAU,CAACN,IACjB,EAAA,OAD8B,AAC5B,CAACO,SAAS,CAACP,EAAY,CAAEQ,WAAW,CAAK,GAG7C,IAAMC,EAAW,EAAA,OAAI,CAACR,IAAI,CAACD,EAAY,eAAiBU,KAAKC,MAAM,GAAGC,QAAQ,CAAC,IAAIC,SAAS,CAAC,IAG7F,OAFA,EAAA,OAAE,CAACC,aAAa,CAACL,EAAU,QAC3B,EAAA,OAAE,CAACM,UAAU,CAACN,GACPT,CACT,CAAE,MAAOgB,EAAK,CAEZC,QAAQC,IAAI,CAAC,CAAC,6CAA6C,EAAElB,EAAW,kCAAkC,CAAC,CAAEgB,GAC7G,IAAMG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W,QACX,iBAAkB,CAAA,EAAA,EAAA,mBAAA,AAAmB,EAAC,oBAClC,uBACA,CACJ,EACJ,GAAG,AATgB,EASJ,GAIf,EAAO,MAAM,EAKjB,OAHA,MAAM,CAAA,EAAA,EAAA,YAAA,AAAY,EAAC,EAAa,EAAa,IAAI,SAAS,KAAM,CAC5D,OAAQ,GACZ,IACO,IACX,CACJ,mCA5TA,SAAS,EACL,MAAO,CAAA,EAAA,EAAA,UAAW,AAAX,EAAY,kBACf,uBACA,CACJgB,EACJ","ignoreList":[3]}
@@ -0,0 +1,3 @@
1
+ module.exports=[93695,(e,t,r)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},18622,(e,t,r)=>{t.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},56704,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},32319,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},24725,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/after-task-async-storage.external.js",()=>require("next/dist/server/app-render/after-task-async-storage.external.js"))},70406,(e,t,r)=>{t.exports=e.x("next/dist/compiled/@opentelemetry/api",()=>require("next/dist/compiled/@opentelemetry/api"))},14747,(e,t,r)=>{t.exports=e.x("path",()=>require("path"))},46786,(e,t,r)=>{t.exports=e.x("os",()=>require("os"))},98003,e=>{"use strict";var t=e.i(22734),r=e.i(14747),n=e.i(46786);e.s(["getConfigDir",0,function(){let e=r.default.join(process.env.ORIGINAL_CWD||process.cwd(),".ai","neural-loom");try{t.default.existsSync(e)||t.default.mkdirSync(e,{recursive:!0});let n=r.default.join(e,".write-test-"+Math.random().toString(36).substring(7));return t.default.writeFileSync(n,"test"),t.default.unlinkSync(n),e}catch(a){console.warn(`[Config] Primary config dir is not writable (${e}). Falling back to home directory.`,a);let s=r.default.join(n.default.homedir(),".ai","neural-loom");try{return t.default.existsSync(s)||t.default.mkdirSync(s,{recursive:!0}),s}catch(t){return console.error("[Config] Fallback config dir is also not writable!",t),e}}}])},33405,(e,t,r)=>{t.exports=e.x("child_process",()=>require("child_process"))},35545,e=>{"use strict";var t=e.i(47909),r=e.i(74017),n=e.i(96250),s=e.i(59756),a=e.i(61916),o=e.i(74677),i=e.i(69741),l=e.i(16795),u=e.i(87718),c=e.i(95169),d=e.i(47587),p=e.i(66012),h=e.i(70101),x=e.i(26937),f=e.i(10372),g=e.i(93695);e.i(52474);var m=e.i(220),v=e.i(89171),R=e.i(22734),y=e.i(14747),w=e.i(33405);let E=(0,e.i(98003).getConfigDir)(),C=y.default.join(E,"ssh.json");async function S(){try{if(R.default.existsSync(C)){let e=R.default.readFileSync(C,"utf8"),t=JSON.parse(e);return v.NextResponse.json({success:!0,config:t})}return v.NextResponse.json({success:!0,config:{host:"",port:22,username:"",privateKeyPath:""}})}catch(t){let e=t instanceof Error?t.message:"Unknown error";return v.NextResponse.json({success:!1,error:e},{status:500})}}async function N(e){try{let{test:t,host:r,port:n,username:s,privateKeyPath:a}=await e.json();if(!r||!s)return v.NextResponse.json({success:!1,error:"Host and Username are required."},{status:400});let o=n?parseInt(String(n),10):22;if(t){let e=await new Promise(e=>{let t=a?`-i "${a}"`:"",n=`-p ${o}`,i=`ssh -o ConnectTimeout=3 -o BatchMode=yes -o StrictHostKeyChecking=accept-new ${t} ${n} ${s}@${r} "echo CONNECTED"`;(0,w.exec)(i,(t,r,n)=>{t?e({ok:!1,message:n.trim()||t.message}):r.trim().includes("CONNECTED")?e({ok:!0,message:"Successfully connected to remote VM!"}):e({ok:!1,message:n.trim()||"Failed to verify remote host verification print."})})});return v.NextResponse.json({success:e.ok,message:e.message})}return R.default.existsSync(E)||R.default.mkdirSync(E,{recursive:!0}),R.default.writeFileSync(C,JSON.stringify({host:r,port:o,username:s,privateKeyPath:a||""},null,2),"utf8"),v.NextResponse.json({success:!0,message:"SSH configuration saved successfully!"})}catch(t){let e=t instanceof Error?t.message:"Unknown error";return v.NextResponse.json({success:!1,error:e},{status:500})}}e.s(["GET",0,S,"POST",0,N],22571);var b=e.i(22571);let k=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/api/context/ssh/route",pathname:"/api/context/ssh",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/src/app/api/context/ssh/route.ts",nextConfigOutput:"",userland:b,...{}}),{workAsyncStorage:A,workUnitAsyncStorage:j,serverHooks:T}=k;async function P(e,t,n){n.requestMeta&&(0,s.setRequestMeta)(e,n.requestMeta),k.isDev&&(0,s.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let v="/api/context/ssh/route";v=v.replace(/\/index$/,"")||"/";let R=await k.prepare(e,t,{srcPage:v,multiZoneDraftMode:!1});if(!R)return t.statusCode=400,t.end("Bad Request"),null==n.waitUntil||n.waitUntil.call(n,Promise.resolve()),null;let{buildId:y,deploymentId:w,params:E,nextConfig:C,parsedUrl:S,isDraftMode:N,prerenderManifest:b,routerServerContext:A,isOnDemandRevalidate:j,revalidateOnlyGenerated:T,resolvedPathname:P,clientReferenceManifest:q,serverActionsManifest:O}=R,_=(0,i.normalizeAppPath)(v),H=!!(b.dynamicRoutes[_]||b.routes[P]),I=async()=>((null==A?void 0:A.render404)?await A.render404(e,t,S,!1):t.end("This page could not be found"),null);if(H&&!N){let e=!!b.routes[P],t=b.dynamicRoutes[_];if(t&&!1===t.fallback&&!e){if(C.adapterPath)return await I();throw new g.NoFallbackError}}let U=null;!H||k.isDev||N||(U="/index"===(U=P)?"/":U);let D=!0===k.isDev||!H,M=H&&!D;O&&q&&(0,o.setManifestsSingleton)({page:v,clientReferenceManifest:q,serverActionsManifest:O});let $=e.method||"GET",F=(0,a.getTracer)(),K=F.getActiveScopeSpan(),B=!!(null==A?void 0:A.isWrappedByNextServer),L=!!(0,s.getRequestMeta)(e,"minimalMode"),G=(0,s.getRequestMeta)(e,"incrementalCache")||await k.getIncrementalCache(e,C,b,L);null==G||G.resetRequestCache(),globalThis.__incrementalCache=G;let V={params:E,previewProps:b.preview,renderOpts:{experimental:{authInterrupts:!!C.experimental.authInterrupts},cacheComponents:!!C.cacheComponents,supportsDynamicResponse:D,incrementalCache:G,cacheLifeProfiles:C.cacheLife,waitUntil:n.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,n,s)=>k.onRequestError(e,t,n,s,A)},sharedContext:{buildId:y,deploymentId:w}},W=new l.NodeNextRequest(e),X=new l.NodeNextResponse(t),J=u.NextRequestAdapter.fromNodeNextRequest(W,(0,u.signalFromNodeResponse)(t));try{let s,o=async e=>k.handle(J,V).finally(()=>{if(!e)return;e.setAttributes({"http.status_code":t.statusCode,"next.rsc":!1});let r=F.getRootSpanAttributes();if(!r)return;if(r.get("next.span_type")!==c.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${r.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let n=r.get("next.route");if(n){let t=`${$} ${n}`;e.setAttributes({"next.route":n,"http.route":n,"next.span_name":t}),e.updateName(t),s&&s!==e&&(s.setAttribute("http.route",n),s.updateName(t))}else e.updateName(`${$} ${v}`)}),i=async s=>{var a,i;let l=async({previousCacheEntry:r})=>{try{if(!L&&j&&T&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let a=await o(s);e.fetchMetrics=V.renderOpts.fetchMetrics;let i=V.renderOpts.pendingWaitUntil;i&&n.waitUntil&&(n.waitUntil(i),i=void 0);let l=V.renderOpts.collectedTags;if(!H)return await (0,p.sendResponse)(W,X,a,V.renderOpts.pendingWaitUntil),null;{let e=await a.blob(),t=(0,h.toNodeOutgoingHttpHeaders)(a.headers);l&&(t[f.NEXT_CACHE_TAGS_HEADER]=l),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==V.renderOpts.collectedRevalidate&&!(V.renderOpts.collectedRevalidate>=f.INFINITE_CACHE)&&V.renderOpts.collectedRevalidate,n=void 0===V.renderOpts.collectedExpire||V.renderOpts.collectedExpire>=f.INFINITE_CACHE?void 0:V.renderOpts.collectedExpire;return{value:{kind:m.CachedRouteKind.APP_ROUTE,status:a.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:n}}}}catch(t){throw(null==r?void 0:r.isStale)&&await k.onRequestError(e,t,{routerKind:"App Router",routePath:v,routeType:"route",revalidateReason:(0,d.getRevalidateReason)({isStaticGeneration:M,isOnDemandRevalidate:j})},!1,A),t}},u=await k.handleResponse({req:e,nextConfig:C,cacheKey:U,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:b,isRoutePPREnabled:!1,isOnDemandRevalidate:j,revalidateOnlyGenerated:T,responseGenerator:l,waitUntil:n.waitUntil,isMinimalMode:L});if(!H)return null;if((null==u||null==(a=u.value)?void 0:a.kind)!==m.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==u||null==(i=u.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});L||t.setHeader("x-nextjs-cache",j?"REVALIDATED":u.isMiss?"MISS":u.isStale?"STALE":"HIT"),N&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let c=(0,h.fromNodeOutgoingHttpHeaders)(u.value.headers);return L&&H||c.delete(f.NEXT_CACHE_TAGS_HEADER),!u.cacheControl||t.getHeader("Cache-Control")||c.get("Cache-Control")||c.set("Cache-Control",(0,x.getCacheControlHeader)(u.cacheControl)),await (0,p.sendResponse)(W,X,new Response(u.value.body,{headers:c,status:u.value.status||200})),null};B&&K?await i(K):(s=F.getActiveScopeSpan(),await F.withPropagatedContext(e.headers,()=>F.trace(c.BaseServerSpan.handleRequest,{spanName:`${$} ${v}`,kind:a.SpanKind.SERVER,attributes:{"http.method":$,"http.target":e.url}},i),void 0,!B))}catch(t){if(t instanceof g.NoFallbackError||await k.onRequestError(e,t,{routerKind:"App Router",routePath:_,routeType:"route",revalidateReason:(0,d.getRevalidateReason)({isStaticGeneration:M,isOnDemandRevalidate:j})},!1,A),H)throw t;return await (0,p.sendResponse)(W,X,new Response(null,{status:500})),null}}e.s(["handler",0,P,"patchFetch",0,function(){return(0,n.patchFetch)({workAsyncStorage:A,workUnitAsyncStorage:j})},"routeModule",0,k,"serverHooks",0,T,"workAsyncStorage",0,A,"workUnitAsyncStorage",0,j],35545)}];
2
+
3
+ //# sourceMappingURL=%5Broot-of-the-server%5D__11z12oe._.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/lib/config.ts","../../../node_modules/next/dist/esm/build/templates/app-route.js","../../../src/app/api/context/ssh/route.ts"],"sourcesContent":["import fs from \"fs\";\nimport path from \"path\";\nimport os from \"os\";\n\nexport function getConfigDir(): string {\n const primaryDir = path.join(process.env.ORIGINAL_CWD || process.cwd(), \".ai\", \"neural-loom\");\n \n try {\n // Check if primary directory exists. If not, try to create it.\n if (!fs.existsSync(primaryDir)) {\n fs.mkdirSync(primaryDir, { recursive: true });\n }\n // Perform a test write to verify write permissions (crucial for read-only directories like C:\\Program Files)\n const testFile = path.join(primaryDir, \".write-test-\" + Math.random().toString(36).substring(7));\n fs.writeFileSync(testFile, \"test\");\n fs.unlinkSync(testFile);\n return primaryDir;\n } catch (err) {\n // If EPERM or any other write error occurs, fall back to the user's home directory\n console.warn(`[Config] Primary config dir is not writable (${primaryDir}). Falling back to home directory.`, err);\n const fallbackDir = path.join(os.homedir(), \".ai\", \"neural-loom\");\n try {\n if (!fs.existsSync(fallbackDir)) {\n fs.mkdirSync(fallbackDir, { recursive: true });\n }\n return fallbackDir;\n } catch (fallbackErr) {\n console.error(\"[Config] Fallback config dir is also not writable!\", fallbackErr);\n return primaryDir;\n }\n }\n}\n","import { AppRouteRouteModule } from \"next/dist/esm/server/route-modules/app-route/module.compiled\";\nimport { RouteKind } from \"next/dist/esm/server/route-kind\";\nimport { patchFetch as _patchFetch } from \"next/dist/esm/server/lib/patch-fetch\";\nimport { addRequestMeta, getRequestMeta, setRequestMeta } from \"next/dist/esm/server/request-meta\";\nimport { getTracer, SpanKind } from \"next/dist/esm/server/lib/trace/tracer\";\nimport { setManifestsSingleton } from \"next/dist/esm/server/app-render/manifests-singleton\";\nimport { normalizeAppPath } from \"next/dist/esm/shared/lib/router/utils/app-paths\";\nimport { NodeNextRequest, NodeNextResponse } from \"next/dist/esm/server/base-http/node\";\nimport { NextRequestAdapter, signalFromNodeResponse } from \"next/dist/esm/server/web/spec-extension/adapters/next-request\";\nimport { BaseServerSpan } from \"next/dist/esm/server/lib/trace/constants\";\nimport { getRevalidateReason } from \"next/dist/esm/server/instrumentation/utils\";\nimport { sendResponse } from \"next/dist/esm/server/send-response\";\nimport { fromNodeOutgoingHttpHeaders, toNodeOutgoingHttpHeaders } from \"next/dist/esm/server/web/utils\";\nimport { getCacheControlHeader } from \"next/dist/esm/server/lib/cache-control\";\nimport { INFINITE_CACHE, NEXT_CACHE_TAGS_HEADER } from \"next/dist/esm/lib/constants\";\nimport { NoFallbackError } from \"next/dist/esm/shared/lib/no-fallback-error.external\";\nimport { CachedRouteKind } from \"next/dist/esm/server/response-cache\";\nimport * as userland from \"INNER_APP_ROUTE\";\n// We inject the nextConfigOutput here so that we can use them in the route\n// module.\nconst nextConfigOutput = \"\"\nconst routeModule = new AppRouteRouteModule({\n definition: {\n kind: RouteKind.APP_ROUTE,\n page: \"/api/context/ssh/route\",\n pathname: \"/api/context/ssh\",\n filename: \"route\",\n bundlePath: \"\"\n },\n distDir: process.env.__NEXT_RELATIVE_DIST_DIR || '',\n relativeProjectDir: process.env.__NEXT_RELATIVE_PROJECT_DIR || '',\n resolvedPagePath: \"[project]/src/app/api/context/ssh/route.ts\",\n nextConfigOutput,\n // The static import is used for initialization (methods, dynamic, etc.).\n userland: userland,\n // In Turbopack dev mode, also provide a getter that calls require() on every\n // request. This re-reads from devModuleCache so HMR updates are picked up,\n // and the async wrapper unwraps async-module Promises (ESM-only\n // serverExternalPackages) automatically.\n ...process.env.TURBOPACK && process.env.__NEXT_DEV_SERVER ? {\n getUserland: ()=>import(\"INNER_APP_ROUTE\")\n } : {}\n});\n// Pull out the exports that we need to expose from the module. This should\n// be eliminated when we've moved the other routes to the new format. These\n// are used to hook into the route.\nconst { workAsyncStorage, workUnitAsyncStorage, serverHooks } = routeModule;\nfunction patchFetch() {\n return _patchFetch({\n workAsyncStorage,\n workUnitAsyncStorage\n });\n}\nexport { routeModule, workAsyncStorage, workUnitAsyncStorage, serverHooks, patchFetch, };\nexport async function handler(req, res, ctx) {\n if (ctx.requestMeta) {\n setRequestMeta(req, ctx.requestMeta);\n }\n if (routeModule.isDev) {\n addRequestMeta(req, 'devRequestTimingInternalsEnd', process.hrtime.bigint());\n }\n let srcPage = \"/api/context/ssh/route\";\n // turbopack doesn't normalize `/index` in the page name\n // so we need to to process dynamic routes properly\n // TODO: fix turbopack providing differing value from webpack\n if (process.env.TURBOPACK) {\n srcPage = srcPage.replace(/\\/index$/, '') || '/';\n } else if (srcPage === '/index') {\n // we always normalize /index specifically\n srcPage = '/';\n }\n const multiZoneDraftMode = process.env.__NEXT_MULTI_ZONE_DRAFT_MODE;\n const prepareResult = await routeModule.prepare(req, res, {\n srcPage,\n multiZoneDraftMode\n });\n if (!prepareResult) {\n res.statusCode = 400;\n res.end('Bad Request');\n ctx.waitUntil == null ? void 0 : ctx.waitUntil.call(ctx, Promise.resolve());\n return null;\n }\n const { buildId, deploymentId, params, nextConfig, parsedUrl, isDraftMode, prerenderManifest, routerServerContext, isOnDemandRevalidate, revalidateOnlyGenerated, resolvedPathname, clientReferenceManifest, serverActionsManifest } = prepareResult;\n const normalizedSrcPage = normalizeAppPath(srcPage);\n let isIsr = Boolean(prerenderManifest.dynamicRoutes[normalizedSrcPage] || prerenderManifest.routes[resolvedPathname]);\n const render404 = async ()=>{\n // TODO: should route-module itself handle rendering the 404\n if (routerServerContext == null ? void 0 : routerServerContext.render404) {\n await routerServerContext.render404(req, res, parsedUrl, false);\n } else {\n res.end('This page could not be found');\n }\n return null;\n };\n if (isIsr && !isDraftMode) {\n const isPrerendered = Boolean(prerenderManifest.routes[resolvedPathname]);\n const prerenderInfo = prerenderManifest.dynamicRoutes[normalizedSrcPage];\n if (prerenderInfo) {\n if (prerenderInfo.fallback === false && !isPrerendered) {\n if (nextConfig.adapterPath) {\n return await render404();\n }\n throw new NoFallbackError();\n }\n }\n }\n let cacheKey = null;\n if (isIsr && !routeModule.isDev && !isDraftMode) {\n cacheKey = resolvedPathname;\n // ensure /index and / is normalized to one key\n cacheKey = cacheKey === '/index' ? '/' : cacheKey;\n }\n const supportsDynamicResponse = // If we're in development, we always support dynamic HTML\n routeModule.isDev === true || // If this is not SSG or does not have static paths, then it supports\n // dynamic HTML.\n !isIsr;\n // This is a revalidation request if the request is for a static\n // page and it is not being resumed from a postponed render and\n // it is not a dynamic RSC request then it is a revalidation\n // request.\n const isStaticGeneration = isIsr && !supportsDynamicResponse;\n // Before rendering (which initializes component tree modules), we have to\n // set the reference manifests to our global store so Server Action's\n // encryption util can access to them at the top level of the page module.\n if (serverActionsManifest && clientReferenceManifest) {\n setManifestsSingleton({\n page: srcPage,\n clientReferenceManifest,\n serverActionsManifest\n });\n }\n const method = req.method || 'GET';\n const tracer = getTracer();\n const activeSpan = tracer.getActiveScopeSpan();\n const isWrappedByNextServer = Boolean(routerServerContext == null ? void 0 : routerServerContext.isWrappedByNextServer);\n const isMinimalMode = Boolean(getRequestMeta(req, 'minimalMode'));\n const incrementalCache = getRequestMeta(req, 'incrementalCache') || await routeModule.getIncrementalCache(req, nextConfig, prerenderManifest, isMinimalMode);\n incrementalCache == null ? void 0 : incrementalCache.resetRequestCache();\n globalThis.__incrementalCache = incrementalCache;\n const context = {\n params,\n previewProps: prerenderManifest.preview,\n renderOpts: {\n experimental: {\n authInterrupts: Boolean(nextConfig.experimental.authInterrupts)\n },\n cacheComponents: Boolean(nextConfig.cacheComponents),\n supportsDynamicResponse,\n incrementalCache,\n cacheLifeProfiles: nextConfig.cacheLife,\n waitUntil: ctx.waitUntil,\n onClose: (cb)=>{\n res.on('close', cb);\n },\n onAfterTaskError: undefined,\n onInstrumentationRequestError: (error, _request, errorContext, silenceLog)=>routeModule.onRequestError(req, error, errorContext, silenceLog, routerServerContext)\n },\n sharedContext: {\n buildId,\n deploymentId\n }\n };\n const nodeNextReq = new NodeNextRequest(req);\n const nodeNextRes = new NodeNextResponse(res);\n const nextReq = NextRequestAdapter.fromNodeNextRequest(nodeNextReq, signalFromNodeResponse(res));\n try {\n let parentSpan;\n const invokeRouteModule = async (span)=>{\n return routeModule.handle(nextReq, context).finally(()=>{\n if (!span) return;\n span.setAttributes({\n 'http.status_code': res.statusCode,\n 'next.rsc': false\n });\n const rootSpanAttributes = tracer.getRootSpanAttributes();\n // We were unable to get attributes, probably OTEL is not enabled\n if (!rootSpanAttributes) {\n return;\n }\n if (rootSpanAttributes.get('next.span_type') !== BaseServerSpan.handleRequest) {\n console.warn(`Unexpected root span type '${rootSpanAttributes.get('next.span_type')}'. Please report this Next.js issue https://github.com/vercel/next.js`);\n return;\n }\n const route = rootSpanAttributes.get('next.route');\n if (route) {\n const name = `${method} ${route}`;\n span.setAttributes({\n 'next.route': route,\n 'http.route': route,\n 'next.span_name': name\n });\n span.updateName(name);\n // Propagate http.route to the parent span if one exists (e.g.\n // a platform-created HTTP span in adapter deployments).\n if (parentSpan && parentSpan !== span) {\n parentSpan.setAttribute('http.route', route);\n parentSpan.updateName(name);\n }\n } else {\n span.updateName(`${method} ${srcPage}`);\n }\n });\n };\n const handleResponse = async (currentSpan)=>{\n var _cacheEntry_value;\n const responseGenerator = async ({ previousCacheEntry })=>{\n try {\n if (!isMinimalMode && isOnDemandRevalidate && revalidateOnlyGenerated && !previousCacheEntry) {\n res.statusCode = 404;\n // on-demand revalidate always sets this header\n res.setHeader('x-nextjs-cache', 'REVALIDATED');\n res.end('This page could not be found');\n return null;\n }\n const response = await invokeRouteModule(currentSpan);\n req.fetchMetrics = context.renderOpts.fetchMetrics;\n let pendingWaitUntil = context.renderOpts.pendingWaitUntil;\n // Attempt using provided waitUntil if available\n // if it's not we fallback to sendResponse's handling\n if (pendingWaitUntil) {\n if (ctx.waitUntil) {\n ctx.waitUntil(pendingWaitUntil);\n pendingWaitUntil = undefined;\n }\n }\n const cacheTags = context.renderOpts.collectedTags;\n // If the request is for a static response, we can cache it so long\n // as it's not edge.\n if (isIsr) {\n const blob = await response.blob();\n // Copy the headers from the response.\n const headers = toNodeOutgoingHttpHeaders(response.headers);\n if (cacheTags) {\n headers[NEXT_CACHE_TAGS_HEADER] = cacheTags;\n }\n if (!headers['content-type'] && blob.type) {\n headers['content-type'] = blob.type;\n }\n const revalidate = typeof context.renderOpts.collectedRevalidate === 'undefined' || context.renderOpts.collectedRevalidate >= INFINITE_CACHE ? false : context.renderOpts.collectedRevalidate;\n const expire = typeof context.renderOpts.collectedExpire === 'undefined' || context.renderOpts.collectedExpire >= INFINITE_CACHE ? undefined : context.renderOpts.collectedExpire;\n // Create the cache entry for the response.\n const cacheEntry = {\n value: {\n kind: CachedRouteKind.APP_ROUTE,\n status: response.status,\n body: Buffer.from(await blob.arrayBuffer()),\n headers\n },\n cacheControl: {\n revalidate,\n expire\n }\n };\n return cacheEntry;\n } else {\n // send response without caching if not ISR\n await sendResponse(nodeNextReq, nodeNextRes, response, context.renderOpts.pendingWaitUntil);\n return null;\n }\n } catch (err) {\n // if this is a background revalidate we need to report\n // the request error here as it won't be bubbled\n if (previousCacheEntry == null ? void 0 : previousCacheEntry.isStale) {\n const silenceLog = false;\n await routeModule.onRequestError(req, err, {\n routerKind: 'App Router',\n routePath: srcPage,\n routeType: 'route',\n revalidateReason: getRevalidateReason({\n isStaticGeneration,\n isOnDemandRevalidate\n })\n }, silenceLog, routerServerContext);\n }\n throw err;\n }\n };\n const cacheEntry = await routeModule.handleResponse({\n req,\n nextConfig,\n cacheKey,\n routeKind: RouteKind.APP_ROUTE,\n isFallback: false,\n prerenderManifest,\n isRoutePPREnabled: false,\n isOnDemandRevalidate,\n revalidateOnlyGenerated,\n responseGenerator,\n waitUntil: ctx.waitUntil,\n isMinimalMode\n });\n // we don't create a cacheEntry for ISR\n if (!isIsr) {\n return null;\n }\n if ((cacheEntry == null ? void 0 : (_cacheEntry_value = cacheEntry.value) == null ? void 0 : _cacheEntry_value.kind) !== CachedRouteKind.APP_ROUTE) {\n var _cacheEntry_value1;\n throw Object.defineProperty(new Error(`Invariant: app-route received invalid cache entry ${cacheEntry == null ? void 0 : (_cacheEntry_value1 = cacheEntry.value) == null ? void 0 : _cacheEntry_value1.kind}`), \"__NEXT_ERROR_CODE\", {\n value: \"E701\",\n enumerable: false,\n configurable: true\n });\n }\n if (!isMinimalMode) {\n res.setHeader('x-nextjs-cache', isOnDemandRevalidate ? 'REVALIDATED' : cacheEntry.isMiss ? 'MISS' : cacheEntry.isStale ? 'STALE' : 'HIT');\n }\n // Draft mode should never be cached\n if (isDraftMode) {\n res.setHeader('Cache-Control', 'private, no-cache, no-store, max-age=0, must-revalidate');\n }\n const headers = fromNodeOutgoingHttpHeaders(cacheEntry.value.headers);\n if (!(isMinimalMode && isIsr)) {\n headers.delete(NEXT_CACHE_TAGS_HEADER);\n }\n // If cache control is already set on the response we don't\n // override it to allow users to customize it via next.config\n if (cacheEntry.cacheControl && !res.getHeader('Cache-Control') && !headers.get('Cache-Control')) {\n headers.set('Cache-Control', getCacheControlHeader(cacheEntry.cacheControl));\n }\n await sendResponse(nodeNextReq, nodeNextRes, // @ts-expect-error - Argument of type 'Buffer<ArrayBufferLike>' is not assignable to parameter of type 'BodyInit | null | undefined'.\n new Response(cacheEntry.value.body, {\n headers,\n status: cacheEntry.value.status || 200\n }));\n return null;\n };\n // TODO: activeSpan code path is for when wrapped by\n // next-server can be removed when this is no longer used\n if (isWrappedByNextServer && activeSpan) {\n await handleResponse(activeSpan);\n } else {\n parentSpan = tracer.getActiveScopeSpan();\n await tracer.withPropagatedContext(req.headers, ()=>tracer.trace(BaseServerSpan.handleRequest, {\n spanName: `${method} ${srcPage}`,\n kind: SpanKind.SERVER,\n attributes: {\n 'http.method': method,\n 'http.target': req.url\n }\n }, handleResponse), undefined, !isWrappedByNextServer);\n }\n } catch (err) {\n if (!(err instanceof NoFallbackError)) {\n const silenceLog = false;\n await routeModule.onRequestError(req, err, {\n routerKind: 'App Router',\n routePath: normalizedSrcPage,\n routeType: 'route',\n revalidateReason: getRevalidateReason({\n isStaticGeneration,\n isOnDemandRevalidate\n })\n }, silenceLog, routerServerContext);\n }\n // rethrow so that we can handle serving error page\n // If this is during static generation, throw the error again.\n if (isIsr) throw err;\n // Otherwise, send a 500 response.\n await sendResponse(nodeNextReq, nodeNextRes, new Response(null, {\n status: 500\n }));\n return null;\n }\n}\n\n//# sourceMappingURL=app-route.js.map\n","import { NextResponse } from \"next/server\";\nimport fs from \"fs\";\nimport path from \"path\";\nimport { exec } from \"child_process\";\n\nimport { getConfigDir } from \"@/lib/config\";\n\nconst configDir = getConfigDir();\nconst configPath = path.join(configDir, \"ssh.json\");\n\nfunction ensureDir() {\n if (!fs.existsSync(configDir)) {\n fs.mkdirSync(configDir, { recursive: true });\n }\n}\n\nexport async function GET() {\n try {\n if (fs.existsSync(configPath)) {\n const data = fs.readFileSync(configPath, \"utf8\");\n const config = JSON.parse(data);\n return NextResponse.json({ success: true, config });\n }\n return NextResponse.json({\n success: true,\n config: {\n host: \"\",\n port: 22,\n username: \"\",\n privateKeyPath: \"\",\n },\n });\n } catch (error) {\n const errorMessage = error instanceof Error ? error.message : \"Unknown error\";\n return NextResponse.json({ success: false, error: errorMessage }, { status: 500 });\n }\n}\n\nexport async function POST(request: Request) {\n try {\n const body = await request.json();\n const { test, host, port, username, privateKeyPath } = body;\n\n if (!host || !username) {\n return NextResponse.json({ success: false, error: \"Host and Username are required.\" }, { status: 400 });\n }\n\n const numericPort = port ? parseInt(String(port), 10) : 22;\n\n if (test) {\n // Test the SSH connection\n const success = await new Promise<{ ok: boolean; message: string }>((resolve) => {\n const keyOpt = privateKeyPath ? `-i \"${privateKeyPath}\"` : \"\";\n const portOpt = `-p ${numericPort}`;\n \n // StrictHostKeyChecking=accept-new automatically adds host key to known_hosts if it's new\n // BatchMode=yes prevents it from waiting for user password prompt\n const sshCmd = `ssh -o ConnectTimeout=3 -o BatchMode=yes -o StrictHostKeyChecking=accept-new ${keyOpt} ${portOpt} ${username}@${host} \"echo CONNECTED\"`;\n\n exec(sshCmd, (error, stdout, stderr) => {\n if (error) {\n resolve({ ok: false, message: stderr.trim() || error.message });\n } else if (stdout.trim().includes(\"CONNECTED\")) {\n resolve({ ok: true, message: \"Successfully connected to remote VM!\" });\n } else {\n resolve({ ok: false, message: stderr.trim() || \"Failed to verify remote host verification print.\" });\n }\n });\n });\n\n return NextResponse.json({ success: success.ok, message: success.message });\n }\n\n // Save SSH connection configuration\n ensureDir();\n const config = {\n host,\n port: numericPort,\n username,\n privateKeyPath: privateKeyPath || \"\",\n };\n\n fs.writeFileSync(configPath, JSON.stringify(config, null, 2), \"utf8\");\n return NextResponse.json({ success: true, message: \"SSH configuration saved successfully!\" });\n\n } catch (error) {\n const errorMessage = error instanceof Error ? error.message : \"Unknown error\";\n return NextResponse.json({ success: false, error: errorMessage }, { status: 500 });\n }\n}\n"],"names":["getConfigDir","primaryDir","join","process","env","ORIGINAL_CWD","cwd","existsSync","mkdirSync","recursive","testFile","Math","random","toString","substring","writeFileSync","unlinkSync","err","console","warn","fallbackDir","homedir","fallbackErr","error","configDir","configPath","ensureDir","GET","numericPort","data","readFileSync","config","JSON","parse","json","success","host","port","username","privateKeyPath","errorMessage","Error","message","status","POST","request","body","test","parseInt","String","Promise","resolve","keyOpt","portOpt","sshCmd","stdout","stderr","ok","trim","includes","stringify"],"mappings":"qmCA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AC,EAAK,EAAK,CACvC,WAAY,aACZ,UAAW,EACX,UAAW,QACX,iBAAkB,CAAA,EAAA,EAAA,mBAAA,AAAmB,EAAC,oBAClC,uBACA,CACJ,EACJ,GAAG,AATgB,EASJ,GAIf,EAAO,MAAM,EAKjB,OAHA,MAAM,CAAA,EAAA,EAAA,YAAA,AAAY,EAAC,EAAa,EAAa,IAAI,SAAS,KAAM,CAC5D,OAAQ,GACZ,IACO,IACX,CACJ,mCA5TA,SAAS,EACL,MAAO,CAAA,EAAA,EAAA,UAAA,AAAW,EAAC,kBACf,uBACA,CACJ,EACJ","ignoreList":[1]}
@@ -0,0 +1,4 @@
1
+ {
2
+ "version": 1,
3
+ "functions": {}
4
+ }
@@ -7,9 +7,9 @@ globalThis.__BUILD_MANIFEST = {
7
7
  "static/chunks/03~yq9q893hmn.js"
8
8
  ],
9
9
  "lowPriorityFiles": [
10
- "static/ZtSBLhTiGqKpNetcymWiC/_buildManifest.js",
11
- "static/ZtSBLhTiGqKpNetcymWiC/_ssgManifest.js",
12
- "static/ZtSBLhTiGqKpNetcymWiC/_clientMiddlewareManifest.js"
10
+ "static/xqFiJPAmHsNHappCgW2Ov/_buildManifest.js",
11
+ "static/xqFiJPAmHsNHappCgW2Ov/_ssgManifest.js",
12
+ "static/xqFiJPAmHsNHappCgW2Ov/_clientMiddlewareManifest.js"
13
13
  ],
14
14
  "rootMainFiles": [
15
15
  "static/chunks/0fpki3y6aj230.js",
@@ -0,0 +1 @@
1
+ <!DOCTYPE html><html lang="en" class="geist_a71539c9-module__T19VSG__variable geist_mono_8d43a2aa-module__8Li5zG__variable"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="/_next/static/chunks/139c54uo1w7.4.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/0fpki3y6aj230.js"/><script src="/_next/static/chunks/140ovxvjat1ch.js" async=""></script><script src="/_next/static/chunks/07lhk_q6pmm3r.js" async=""></script><script src="/_next/static/chunks/turbopack-08fpdsd.-ns2y.js" async=""></script><script src="/_next/static/chunks/0dbhjjzl8qfwv.js" async=""></script><meta name="robots" content="noindex"/><meta name="next-size-adjust" content=""/><title>404: This page could not be found.</title><title>NeuralLoom - Unified AI Agent Orchestrator &amp; Context Bridge</title><meta name="description" content="Advanced console dashboard and context staging manager for Claude Code and simulated AI agents."/><link rel="shortcut icon" href="/logo.png"/><link rel="icon" href="/logo.png"/><link rel="apple-touch-icon" href="/logo.png"/><script src="/_next/static/chunks/03~yq9q893hmn.js" noModule=""></script></head><body><div hidden=""><!--$--><!--/$--></div><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>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)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:49px;margin:0">This page could not be found.</h2></div></div></div><!--$--><!--/$--><script src="/_next/static/chunks/0fpki3y6aj230.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[39756,[\"/_next/static/chunks/0dbhjjzl8qfwv.js\"],\"default\"]\n3:I[37457,[\"/_next/static/chunks/0dbhjjzl8qfwv.js\"],\"default\"]\n4:I[97367,[\"/_next/static/chunks/0dbhjjzl8qfwv.js\"],\"OutletBoundary\"]\n5:\"$Sreact.suspense\"\n8:I[97367,[\"/_next/static/chunks/0dbhjjzl8qfwv.js\"],\"ViewportBoundary\"]\na:I[97367,[\"/_next/static/chunks/0dbhjjzl8qfwv.js\"],\"MetadataBoundary\"]\nc:I[68027,[\"/_next/static/chunks/0dbhjjzl8qfwv.js\"],\"default\",1]\n:HL[\"/_next/static/chunks/139c54uo1w7.4.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"c\":[\"\",\"_not-found\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"/_not-found\",{\"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\":[null,[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:props:children:props:notFound:0:1:props:style\",\"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\":\"$0:f:0:1:0:props:children:1:props:children:props:children:props:notFound:0:1:props:children:props:children:1:props:style\",\"children\":404}],[\"$\",\"div\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:props:children:props:notFound:0:1:props:children:props:children:2:props:style\",\"children\":[\"$\",\"h2\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:props:children:props:notFound:0:1:props:children:props:children:2:props:children:props:style\",\"children\":\"This page could not be found.\"}]}]]}]}]],null,[\"$\",\"$L4\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@6\"}]}]]}],{},null,false,null]},null,false,\"$@7\"]},null,false,null],[\"$\",\"$1\",\"h\",{\"children\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],[\"$\",\"$L8\",null,{\"children\":\"$L9\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$La\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.Metadata\",\"children\":\"$Lb\"}]}]}],[\"$\",\"meta\",null,{\"name\":\"next-size-adjust\",\"content\":\"\"}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$c\",[[\"$\",\"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\":\"xqFiJPAmHsNHappCgW2Ov\"}\n"])</script><script>self.__next_f.push([1,"d:[]\n7:\"$Wd\"\n"])</script><script>self.__next_f.push([1,"9:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n"])</script><script>self.__next_f.push([1,"e:I[27201,[\"/_next/static/chunks/0dbhjjzl8qfwv.js\"],\"IconMark\"]\n6:null\nb:[[\"$\",\"title\",\"0\",{\"children\":\"NeuralLoom - Unified AI Agent Orchestrator \u0026 Context Bridge\"}],[\"$\",\"meta\",\"1\",{\"name\":\"description\",\"content\":\"Advanced console dashboard and context staging manager for Claude Code and simulated AI agents.\"}],[\"$\",\"link\",\"2\",{\"rel\":\"shortcut icon\",\"href\":\"/logo.png\"}],[\"$\",\"link\",\"3\",{\"rel\":\"icon\",\"href\":\"/logo.png\"}],[\"$\",\"link\",\"4\",{\"rel\":\"apple-touch-icon\",\"href\":\"/logo.png\"}],[\"$\",\"$Le\",\"5\",{}]]\n"])</script></body></html>
@@ -0,0 +1 @@
1
+ <!DOCTYPE html><html id="__next_error__"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/0fpki3y6aj230.js"/><script src="/_next/static/chunks/140ovxvjat1ch.js" async=""></script><script src="/_next/static/chunks/07lhk_q6pmm3r.js" async=""></script><script src="/_next/static/chunks/turbopack-08fpdsd.-ns2y.js" async=""></script><script src="/_next/static/chunks/0dbhjjzl8qfwv.js" async=""></script><meta name="next-size-adjust" content=""/><title>500: This page couldn’t load</title><style>:root {--next-error-bg: #fff;--next-error-text: #171717;--next-error-title: #171717;--next-error-message: #171717;--next-error-digest: #666666;--next-error-btn-text: #fff;--next-error-btn-bg: #171717;--next-error-btn-border: none;--next-error-btn-secondary-text: #171717;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(0,0,0,0.08);}@media (prefers-color-scheme: dark) {:root {--next-error-bg: #0a0a0a;--next-error-text: #ededed;--next-error-title: #ededed;--next-error-message: #ededed;--next-error-digest: #a0a0a0;--next-error-btn-text: #0a0a0a;--next-error-btn-bg: #ededed;--next-error-btn-border: none;--next-error-btn-secondary-text: #ededed;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(255,255,255,0.14);}}body { margin: 0; color: var(--next-error-text); background: var(--next-error-bg); }</style><script src="/_next/static/chunks/03~yq9q893hmn.js" noModule=""></script></head><body><div hidden=""><!--$--><!--/$--></div><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;display:flex;align-items:center;justify-content:center"><div style="margin-top:-32px;max-width:325px;padding:32px 28px;text-align:left"><svg width="32" height="32" viewBox="-0.2 -1.5 32 32" fill="none" style="margin-bottom:24px"><path d="M16.9328 0C18.0839 0.000116771 19.1334 0.658832 19.634 1.69531L31.4299 26.1309C32.0708 27.4588 31.1036 28.9999 29.6291 29H2.00215C0.527541 29 -0.439628 27.4588 0.201371 26.1309L11.9973 1.69531C12.4979 0.658823 13.5474 7.75066e-05 14.6984 0H16.9328ZM3.59493 26H28.0363L16.9328 3H14.6984L3.59493 26ZM15.8156 19C16.9202 19.0001 17.8156 19.8955 17.8156 21C17.8156 22.1045 16.9202 22.9999 15.8156 23C14.7111 23 13.8156 22.1046 13.8156 21C13.8156 19.8954 14.7111 19 15.8156 19ZM17.3156 16.5H14.3156V8.5H17.3156V16.5Z" fill="var(--next-error-title)"></path></svg><h1 style="font-size:24px;font-weight:500;letter-spacing:-0.02em;line-height:32px;margin:0 0 12px 0;color:var(--next-error-title)">This page couldn’t load</h1><p style="font-size:14px;font-weight:400;line-height:21px;margin:0 0 20px 0;color:var(--next-error-message)">A server error occurred. Reload to try again.</p><form style="margin:0"><button type="submit" style="display:inline-flex;align-items:center;justify-content:center;height:32px;padding:0 12px;font-size:14px;font-weight:500;line-height:20px;border-radius:6px;cursor:pointer;color:var(--next-error-btn-text);background:var(--next-error-btn-bg);border:var(--next-error-btn-border)">Reload</button></form></div></div><!--$--><!--/$--><script src="/_next/static/chunks/0fpki3y6aj230.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[39756,[\"/_next/static/chunks/0dbhjjzl8qfwv.js\"],\"default\"]\n3:I[37457,[\"/_next/static/chunks/0dbhjjzl8qfwv.js\"],\"default\"]\n4:I[97367,[\"/_next/static/chunks/0dbhjjzl8qfwv.js\"],\"OutletBoundary\"]\n5:\"$Sreact.suspense\"\n8:I[97367,[\"/_next/static/chunks/0dbhjjzl8qfwv.js\"],\"ViewportBoundary\"]\na:I[97367,[\"/_next/static/chunks/0dbhjjzl8qfwv.js\"],\"MetadataBoundary\"]\nc:I[68027,[\"/_next/static/chunks/0dbhjjzl8qfwv.js\"],\"default\",1]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"c\":[\"\",\"_global-error\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"__PAGE__\",{}]}],[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[[\"$\",\"html\",null,{\"id\":\"__next_error__\",\"children\":[[\"$\",\"head\",null,{\"children\":[[\"$\",\"title\",null,{\"children\":\"500: This page couldn’t load\"}],[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\":root {--next-error-bg: #fff;--next-error-text: #171717;--next-error-title: #171717;--next-error-message: #171717;--next-error-digest: #666666;--next-error-btn-text: #fff;--next-error-btn-bg: #171717;--next-error-btn-border: none;--next-error-btn-secondary-text: #171717;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(0,0,0,0.08);}@media (prefers-color-scheme: dark) {:root {--next-error-bg: #0a0a0a;--next-error-text: #ededed;--next-error-title: #ededed;--next-error-message: #ededed;--next-error-digest: #a0a0a0;--next-error-btn-text: #0a0a0a;--next-error-btn-bg: #ededed;--next-error-btn-border: none;--next-error-btn-secondary-text: #ededed;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(255,255,255,0.14);}}body { margin: 0; color: var(--next-error-text); background: var(--next-error-bg); }\"}}]]}],[\"$\",\"body\",null,{\"children\":[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"display\":\"flex\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"style\":{\"marginTop\":\"-32px\",\"maxWidth\":\"325px\",\"padding\":\"32px 28px\",\"textAlign\":\"left\"},\"children\":[[\"$\",\"svg\",null,{\"width\":\"32\",\"height\":\"32\",\"viewBox\":\"-0.2 -1.5 32 32\",\"fill\":\"none\",\"style\":{\"marginBottom\":\"24px\"},\"children\":[\"$\",\"path\",null,{\"d\":\"M16.9328 0C18.0839 0.000116771 19.1334 0.658832 19.634 1.69531L31.4299 26.1309C32.0708 27.4588 31.1036 28.9999 29.6291 29H2.00215C0.527541 29 -0.439628 27.4588 0.201371 26.1309L11.9973 1.69531C12.4979 0.658823 13.5474 7.75066e-05 14.6984 0H16.9328ZM3.59493 26H28.0363L16.9328 3H14.6984L3.59493 26ZM15.8156 19C16.9202 19.0001 17.8156 19.8955 17.8156 21C17.8156 22.1045 16.9202 22.9999 15.8156 23C14.7111 23 13.8156 22.1046 13.8156 21C13.8156 19.8954 14.7111 19 15.8156 19ZM17.3156 16.5H14.3156V8.5H17.3156V16.5Z\",\"fill\":\"var(--next-error-title)\"}]}],[\"$\",\"h1\",null,{\"style\":{\"fontSize\":\"24px\",\"fontWeight\":500,\"letterSpacing\":\"-0.02em\",\"lineHeight\":\"32px\",\"margin\":\"0 0 12px 0\",\"color\":\"var(--next-error-title)\"},\"children\":\"This page couldn’t load\"}],[\"$\",\"p\",null,{\"style\":{\"fontSize\":\"14px\",\"fontWeight\":400,\"lineHeight\":\"21px\",\"margin\":\"0 0 20px 0\",\"color\":\"var(--next-error-message)\"},\"children\":\"A server error occurred. Reload to try again.\"}],[\"$\",\"form\",null,{\"style\":{\"margin\":0},\"children\":[\"$\",\"button\",null,{\"type\":\"submit\",\"style\":{\"display\":\"inline-flex\",\"alignItems\":\"center\",\"justifyContent\":\"center\",\"height\":\"32px\",\"padding\":\"0 12px\",\"fontSize\":\"14px\",\"fontWeight\":500,\"lineHeight\":\"20px\",\"borderRadius\":\"6px\",\"cursor\":\"pointer\",\"color\":\"var(--next-error-btn-text)\",\"background\":\"var(--next-error-btn-bg)\",\"border\":\"var(--next-error-btn-border)\"},\"children\":\"Reload\"}]}]]}]}]}]]}],null,[\"$\",\"$L4\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@6\"}]}]]}],{},null,false,null]},null,false,\"$@7\"],[\"$\",\"$1\",\"h\",{\"children\":[null,[\"$\",\"$L8\",null,{\"children\":\"$L9\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$La\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.Metadata\",\"children\":\"$Lb\"}]}]}],[\"$\",\"meta\",null,{\"name\":\"next-size-adjust\",\"content\":\"\"}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$c\",[]],\"S\":true,\"h\":null,\"s\":\"$undefined\",\"l\":\"$undefined\",\"p\":\"$undefined\",\"d\":\"$undefined\",\"b\":\"xqFiJPAmHsNHappCgW2Ov\"}\n"])</script><script>self.__next_f.push([1,"d:[]\n7:\"$Wd\"\n"])</script><script>self.__next_f.push([1,"9:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n"])</script><script>self.__next_f.push([1,"6:null\nb:[]\n"])</script></body></html>
@@ -1 +1,4 @@
1
- {}
1
+ {
2
+ "/404": "pages/404.html",
3
+ "/500": "pages/500.html"
4
+ }
@@ -0,0 +1 @@
1
+ {}
@@ -1 +1 @@
1
- self.__RSC_SERVER_MANIFEST="{\n \"node\": {},\n \"edge\": {},\n \"encryptionKey\": \"CQVRqPUbkC87YUqYKZsoPgW1Q7jyF7gDHZJL5Mtd4n0=\"\n}"
1
+ self.__RSC_SERVER_MANIFEST="{\n \"node\": {},\n \"edge\": {},\n \"encryptionKey\": \"KtQ5rqxAI54xgl3uFGWwBxu0BYWJqqotyunTOpJLQaI=\"\n}"
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "node": {},
3
3
  "edge": {},
4
- "encryptionKey": "CQVRqPUbkC87YUqYKZsoPgW1Q7jyF7gDHZJL5Mtd4n0="
4
+ "encryptionKey": "KtQ5rqxAI54xgl3uFGWwBxu0BYWJqqotyunTOpJLQaI="
5
5
  }
@@ -0,0 +1 @@
1
+ self.__SSG_MANIFEST=new Set([]);self.__SSG_MANIFEST_CB&&self.__SSG_MANIFEST_CB()
package/.next/trace ADDED
@@ -0,0 +1 @@
1
+ [{"name":"generate-buildid","duration":214,"timestamp":22820001478,"id":4,"parentId":1,"tags":{},"startTime":1781502204201,"traceId":"7d1815fc2b79153f"},{"name":"load-custom-routes","duration":350,"timestamp":22820001801,"id":5,"parentId":1,"tags":{},"startTime":1781502204201,"traceId":"7d1815fc2b79153f"},{"name":"create-dist-dir","duration":559,"timestamp":22820002181,"id":6,"parentId":1,"tags":{},"startTime":1781502204202,"traceId":"7d1815fc2b79153f"},{"name":"clean","duration":614,"timestamp":22820003716,"id":7,"parentId":1,"tags":{},"startTime":1781502204203,"traceId":"7d1815fc2b79153f"},{"name":"discover-routes","duration":6076,"timestamp":22820026605,"id":8,"parentId":1,"tags":{},"startTime":1781502204226,"traceId":"7d1815fc2b79153f"},{"name":"create-root-mapping","duration":64,"timestamp":22820032727,"id":9,"parentId":1,"tags":{},"startTime":1781502204232,"traceId":"7d1815fc2b79153f"},{"name":"generate-route-types","duration":15700,"timestamp":22820034111,"id":10,"parentId":1,"tags":{},"startTime":1781502204234,"traceId":"7d1815fc2b79153f"},{"name":"public-dir-conflict-check","duration":92,"timestamp":22820049944,"id":11,"parentId":1,"tags":{},"startTime":1781502204250,"traceId":"7d1815fc2b79153f"},{"name":"generate-routes-manifest","duration":2408,"timestamp":22820050139,"id":12,"parentId":1,"tags":{},"startTime":1781502204250,"traceId":"7d1815fc2b79153f"},{"name":"run-turbopack","duration":2282036,"timestamp":22820058942,"id":14,"parentId":1,"tags":{},"startTime":1781502204259,"traceId":"7d1815fc2b79153f"},{"name":"turbopack-build-events","duration":60,"timestamp":22820349318,"id":15,"parentId":1,"tags":{},"startTime":1781502204549,"traceId":"7d1815fc2b79153f"},{"name":"run-typescript","duration":3792870,"timestamp":22822353223,"id":16,"parentId":1,"tags":{},"startTime":1781502206553,"traceId":"7d1815fc2b79153f"},{"name":"generate-required-server-files","duration":1406,"timestamp":22826146958,"id":18,"parentId":1,"tags":{},"startTime":1781502210347,"traceId":"7d1815fc2b79153f"},{"name":"check-static-error-page","duration":9275,"timestamp":22826258649,"id":20,"parentId":19,"tags":{},"startTime":1781502210458,"traceId":"7d1815fc2b79153f"},{"name":"is-page-static","duration":501593,"timestamp":22826274148,"id":40,"parentId":22,"tags":{},"startTime":1781502210474,"traceId":"7d1815fc2b79153f"},{"name":"check-page","duration":513214,"timestamp":22826262644,"id":22,"parentId":19,"tags":{"page":"/_global-error"},"startTime":1781502210462,"traceId":"7d1815fc2b79153f"},{"name":"is-page-static","duration":607792,"timestamp":22826273848,"id":39,"parentId":21,"tags":{},"startTime":1781502210473,"traceId":"7d1815fc2b79153f"},{"name":"check-page","duration":620997,"timestamp":22826260709,"id":21,"parentId":19,"tags":{"page":"/_not-found"},"startTime":1781502210460,"traceId":"7d1815fc2b79153f"},{"name":"is-page-static","duration":613889,"timestamp":22826274403,"id":43,"parentId":25,"tags":{},"startTime":1781502210474,"traceId":"7d1815fc2b79153f"},{"name":"check-page","duration":624706,"timestamp":22826263635,"id":25,"parentId":19,"tags":{"page":"/api/context"},"startTime":1781502210463,"traceId":"7d1815fc2b79153f"},{"name":"is-page-static","duration":633477,"timestamp":22826274332,"id":42,"parentId":24,"tags":{},"startTime":1781502210474,"traceId":"7d1815fc2b79153f"},{"name":"check-page","duration":644464,"timestamp":22826263392,"id":24,"parentId":19,"tags":{"page":"/api/context/claude"},"startTime":1781502210463,"traceId":"7d1815fc2b79153f"},{"name":"is-page-static","duration":635298,"timestamp":22826274257,"id":41,"parentId":23,"tags":{},"startTime":1781502210474,"traceId":"7d1815fc2b79153f"},{"name":"check-page","duration":646512,"timestamp":22826263096,"id":23,"parentId":19,"tags":{"page":"/api/context/aider"},"startTime":1781502210463,"traceId":"7d1815fc2b79153f"},{"name":"is-page-static","duration":634759,"timestamp":22826278805,"id":56,"parentId":38,"tags":{},"startTime":1781502210478,"traceId":"7d1815fc2b79153f"},{"name":"check-page","duration":646120,"timestamp":22826267487,"id":38,"parentId":19,"tags":{"page":"/"},"startTime":1781502210467,"traceId":"7d1815fc2b79153f"},{"name":"is-page-static","duration":639379,"timestamp":22826274801,"id":46,"parentId":28,"tags":{},"startTime":1781502210474,"traceId":"7d1815fc2b79153f"},{"name":"check-page","duration":649827,"timestamp":22826264398,"id":28,"parentId":19,"tags":{"page":"/api/git"},"startTime":1781502210464,"traceId":"7d1815fc2b79153f"},{"name":"is-page-static","duration":642114,"timestamp":22826274471,"id":44,"parentId":26,"tags":{},"startTime":1781502210474,"traceId":"7d1815fc2b79153f"},{"name":"check-page","duration":652775,"timestamp":22826263853,"id":26,"parentId":19,"tags":{"page":"/api/context/ssh"},"startTime":1781502210463,"traceId":"7d1815fc2b79153f"},{"name":"is-page-static","duration":644551,"timestamp":22826275075,"id":48,"parentId":30,"tags":{},"startTime":1781502210475,"traceId":"7d1815fc2b79153f"},{"name":"check-page","duration":654729,"timestamp":22826264939,"id":30,"parentId":19,"tags":{"page":"/api/sessions/inject"},"startTime":1781502210465,"traceId":"7d1815fc2b79153f"},{"name":"is-page-static","duration":645235,"timestamp":22826275343,"id":52,"parentId":34,"tags":{},"startTime":1781502210475,"traceId":"7d1815fc2b79153f"},{"name":"check-page","duration":654667,"timestamp":22826265945,"id":34,"parentId":19,"tags":{"page":"/api/sessions/scope"},"startTime":1781502210466,"traceId":"7d1815fc2b79153f"},{"name":"is-page-static","duration":655957,"timestamp":22826274676,"id":45,"parentId":27,"tags":{},"startTime":1781502210474,"traceId":"7d1815fc2b79153f"},{"name":"check-page","duration":666578,"timestamp":22826264109,"id":27,"parentId":19,"tags":{"page":"/api/files"},"startTime":1781502210464,"traceId":"7d1815fc2b79153f"},{"name":"is-page-static","duration":655409,"timestamp":22826275416,"id":54,"parentId":36,"tags":{},"startTime":1781502210475,"traceId":"7d1815fc2b79153f"},{"name":"check-page","duration":663938,"timestamp":22826266918,"id":36,"parentId":19,"tags":{"page":"/api/sessions/stats"},"startTime":1781502210467,"traceId":"7d1815fc2b79153f"},{"name":"is-page-static","duration":656771,"timestamp":22826275191,"id":49,"parentId":31,"tags":{},"startTime":1781502210475,"traceId":"7d1815fc2b79153f"},{"name":"check-page","duration":666764,"timestamp":22826265237,"id":31,"parentId":19,"tags":{"page":"/api/sessions/input"},"startTime":1781502210465,"traceId":"7d1815fc2b79153f"},{"name":"is-page-static","duration":659117,"timestamp":22826275449,"id":55,"parentId":37,"tags":{},"startTime":1781502210475,"traceId":"7d1815fc2b79153f"},{"name":"check-page","duration":667372,"timestamp":22826267227,"id":37,"parentId":19,"tags":{"page":"/api/sessions/stop"},"startTime":1781502210467,"traceId":"7d1815fc2b79153f"},{"name":"is-page-static","duration":660825,"timestamp":22826275382,"id":53,"parentId":35,"tags":{},"startTime":1781502210475,"traceId":"7d1815fc2b79153f"},{"name":"check-page","duration":669892,"timestamp":22826266347,"id":35,"parentId":19,"tags":{"page":"/api/sessions/start"},"startTime":1781502210466,"traceId":"7d1815fc2b79153f"},{"name":"is-page-static","duration":661760,"timestamp":22826274893,"id":47,"parentId":29,"tags":{},"startTime":1781502210474,"traceId":"7d1815fc2b79153f"},{"name":"check-page","duration":672009,"timestamp":22826264670,"id":29,"parentId":19,"tags":{"page":"/api/recents"},"startTime":1781502210464,"traceId":"7d1815fc2b79153f"},{"name":"is-page-static","duration":661919,"timestamp":22826275248,"id":50,"parentId":32,"tags":{},"startTime":1781502210475,"traceId":"7d1815fc2b79153f"},{"name":"check-page","duration":671717,"timestamp":22826265474,"id":32,"parentId":19,"tags":{"page":"/api/sessions/launch"},"startTime":1781502210465,"traceId":"7d1815fc2b79153f"},{"name":"is-page-static","duration":666260,"timestamp":22826275291,"id":51,"parentId":33,"tags":{},"startTime":1781502210475,"traceId":"7d1815fc2b79153f"},{"name":"check-page","duration":675877,"timestamp":22826265711,"id":33,"parentId":19,"tags":{"page":"/api/sessions"},"startTime":1781502210465,"traceId":"7d1815fc2b79153f"},{"name":"static-check","duration":683464,"timestamp":22826258150,"id":19,"parentId":1,"tags":{},"startTime":1781502210458,"traceId":"7d1815fc2b79153f"},{"name":"write-routes-manifest","duration":797,"timestamp":22826942526,"id":58,"parentId":1,"tags":{},"startTime":1781502211142,"traceId":"7d1815fc2b79153f"},{"name":"load-dotenv","duration":29,"timestamp":22826957364,"id":61,"parentId":60,"tags":{},"startTime":1781502211157,"traceId":"7d1815fc2b79153f"},{"name":"run-export-path-map","duration":408,"timestamp":22826962081,"id":62,"parentId":60,"tags":{},"startTime":1781502211162,"traceId":"7d1815fc2b79153f"},{"name":"next-export","duration":645360,"timestamp":22826956564,"id":60,"parentId":1,"tags":{},"startTime":1781502211156,"traceId":"7d1815fc2b79153f"},{"name":"move-exported-app-not-found-","duration":2328,"timestamp":22827604279,"id":63,"parentId":59,"tags":{},"startTime":1781502211804,"traceId":"7d1815fc2b79153f"},{"name":"move-exported-app-global-error-","duration":1565,"timestamp":22827606732,"id":64,"parentId":59,"tags":{},"startTime":1781502211806,"traceId":"7d1815fc2b79153f"},{"name":"static-generation","duration":663882,"timestamp":22826947701,"id":59,"parentId":1,"tags":{},"startTime":1781502211147,"traceId":"7d1815fc2b79153f"},{"name":"write-routes-manifest","duration":919,"timestamp":22827611700,"id":65,"parentId":1,"tags":{},"startTime":1781502211811,"traceId":"7d1815fc2b79153f"},{"name":"print-tree-view","duration":3124,"timestamp":22827628069,"id":66,"parentId":1,"tags":{},"startTime":1781502211828,"traceId":"7d1815fc2b79153f"},{"name":"write-route-bundle-stats","duration":9348,"timestamp":22827631227,"id":67,"parentId":1,"tags":{},"startTime":1781502211831,"traceId":"7d1815fc2b79153f"},{"name":"telemetry-flush","duration":173480,"timestamp":22827640608,"id":68,"parentId":1,"tags":{},"startTime":1781502211840,"traceId":"7d1815fc2b79153f"},{"name":"next-build","duration":7859010,"timestamp":22819955105,"id":1,"tags":{"buildMode":"default","version":"16.2.6","bundler":"turbopack","has-custom-webpack-config":"false","use-build-worker":"true"},"startTime":1781502204155,"traceId":"7d1815fc2b79153f"}]
@@ -0,0 +1 @@
1
+ [{"name":"run-turbopack","duration":2282036,"timestamp":22820058942,"id":14,"parentId":1,"tags":{},"startTime":1781502204259,"traceId":"7d1815fc2b79153f"},{"name":"turbopack-build-events","duration":60,"timestamp":22820349318,"id":15,"parentId":1,"tags":{},"startTime":1781502204549,"traceId":"7d1815fc2b79153f"},{"name":"run-typescript","duration":3792870,"timestamp":22822353223,"id":16,"parentId":1,"tags":{},"startTime":1781502206553,"traceId":"7d1815fc2b79153f"},{"name":"static-check","duration":683464,"timestamp":22826258150,"id":19,"parentId":1,"tags":{},"startTime":1781502210458,"traceId":"7d1815fc2b79153f"},{"name":"static-generation","duration":663882,"timestamp":22826947701,"id":59,"parentId":1,"tags":{},"startTime":1781502211147,"traceId":"7d1815fc2b79153f"},{"name":"telemetry-flush","duration":173480,"timestamp":22827640608,"id":68,"parentId":1,"tags":{},"startTime":1781502211840,"traceId":"7d1815fc2b79153f"},{"name":"next-build","duration":7859010,"timestamp":22819955105,"id":1,"tags":{"buildMode":"default","version":"16.2.6","bundler":"turbopack","has-custom-webpack-config":"false","use-build-worker":"true"},"startTime":1781502204155,"traceId":"7d1815fc2b79153f"}]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "neural-loom",
3
- "version": "0.2.41",
3
+ "version": "0.2.43",
4
4
  "bin": {
5
5
  "neural-loom": "./bin/cli.js"
6
6
  },
@@ -2,7 +2,9 @@ import { NextResponse } from "next/server";
2
2
  import fs from "fs";
3
3
  import path from "path";
4
4
 
5
- const configDir = path.join(process.env.ORIGINAL_CWD || process.cwd(), ".ai", "neural-loom");
5
+ import { getConfigDir } from "@/lib/config";
6
+
7
+ const configDir = getConfigDir();
6
8
  const configPath = path.join(configDir, "aider.json");
7
9
 
8
10
  function ensureDir() {
@@ -2,7 +2,9 @@ import { NextResponse } from "next/server";
2
2
  import fs from "fs";
3
3
  import path from "path";
4
4
 
5
- const configDir = path.join(process.env.ORIGINAL_CWD || process.cwd(), ".ai", "neural-loom");
5
+ import { getConfigDir } from "@/lib/config";
6
+
7
+ const configDir = getConfigDir();
6
8
  const configPath = path.join(configDir, "claude.json");
7
9
 
8
10
  function ensureDir() {
@@ -3,7 +3,9 @@ import fs from "fs";
3
3
  import path from "path";
4
4
  import { exec } from "child_process";
5
5
 
6
- const configDir = path.join(process.env.ORIGINAL_CWD || process.cwd(), ".ai", "neural-loom");
6
+ import { getConfigDir } from "@/lib/config";
7
+
8
+ const configDir = getConfigDir();
7
9
  const configPath = path.join(configDir, "ssh.json");
8
10
 
9
11
  function ensureDir() {
@@ -3,6 +3,7 @@ import { SessionManager } from "@/lib/agents/SessionManager";
3
3
  import { SessionPersister } from "@/lib/agents/SessionPersister";
4
4
  import { ContextManager } from "@/lib/agents/ContextManager";
5
5
  import { addRecent } from "@/lib/recents";
6
+ import { getConfigDir } from "@/lib/config";
6
7
  import fs from "fs";
7
8
  import path from "path";
8
9
 
@@ -40,7 +41,7 @@ export async function POST(request: Request) {
40
41
  }
41
42
 
42
43
  // 2. Carry over to global configurations for next Launch
43
- const configDir = path.join(process.env.ORIGINAL_CWD || process.cwd(), ".ai", "neural-loom");
44
+ const configDir = getConfigDir();
44
45
 
45
46
  if (session.type === "claude" || session.type === "claude-docker") {
46
47
  const claudeConfigPath = path.join(configDir, "claude.json");
@@ -89,7 +90,7 @@ export async function POST(request: Request) {
89
90
  }
90
91
 
91
92
  // 2. Remove from global configuration so it doesn't carry over
92
- const configDir = path.join(process.env.ORIGINAL_CWD || process.cwd(), ".ai", "neural-loom");
93
+ const configDir = getConfigDir();
93
94
 
94
95
  if (session.type === "claude" || session.type === "claude-docker") {
95
96
  const claudeConfigPath = path.join(configDir, "claude.json");
@@ -1,6 +1,7 @@
1
1
  import fs from "fs";
2
2
  import path from "path";
3
3
  import { exec } from "child_process";
4
+ import { getConfigDir } from "../config";
4
5
  import type { IPty } from "node-pty";
5
6
  import { AgentRunner, RunnerStatus } from "./AgentRunner";
6
7
  import { SessionPersister } from "./SessionPersister";
@@ -128,7 +129,7 @@ export class AiderRunner extends AgentRunner {
128
129
  loadAllFiles: true,
129
130
  };
130
131
 
131
- const aiderConfigPath = path.join(process.env.ORIGINAL_CWD || process.cwd(), ".ai", "neural-loom", "aider.json");
132
+ const aiderConfigPath = path.join(getConfigDir(), "aider.json");
132
133
  if (fs.existsSync(aiderConfigPath)) {
133
134
  try {
134
135
  aiderConfig = JSON.parse(fs.readFileSync(aiderConfigPath, "utf8"));
@@ -2,6 +2,7 @@ import fs from "fs";
2
2
  import path from "path";
3
3
  import os from "os";
4
4
  import { execSync } from "child_process";
5
+ import { getConfigDir } from "../config";
5
6
  import type { IPty } from "node-pty";
6
7
  import { AgentRunner, RunnerStatus } from "./AgentRunner";
7
8
  import { SessionPersister } from "./SessionPersister";
@@ -86,7 +87,7 @@ export class ClaudeRunner extends AgentRunner {
86
87
 
87
88
  // Load Claude configuration to check for extraFlags (like --resume)
88
89
  let extraFlags = "";
89
- const claudeConfigPath = path.join(process.env.ORIGINAL_CWD || process.cwd(), ".ai", "neural-loom", "claude.json");
90
+ const claudeConfigPath = path.join(getConfigDir(), "claude.json");
90
91
  if (fs.existsSync(claudeConfigPath)) {
91
92
  try {
92
93
  const config = JSON.parse(fs.readFileSync(claudeConfigPath, "utf8"));
@@ -103,7 +104,7 @@ export class ClaudeRunner extends AgentRunner {
103
104
  ...process.env,
104
105
  TERM: "xterm-256color",
105
106
  COLORTERM: "truecolor",
106
- } as Record<string, string>;
107
+ } as NodeJS.ProcessEnv;
107
108
 
108
109
  if (isWindows()) {
109
110
  const vsNode = "C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\MSBuild\\Microsoft\\VisualStudio\\NodeJs";
@@ -1,5 +1,6 @@
1
1
  import fs from "fs";
2
2
  import path from "path";
3
+ import { getConfigDir } from "../config";
3
4
  import type { IPty } from "node-pty";
4
5
  import { AgentRunner, RunnerStatus } from "./AgentRunner";
5
6
  import { SessionPersister } from "./SessionPersister";
@@ -122,7 +123,7 @@ export class DockerRunner extends AgentRunner {
122
123
 
123
124
  // Load Claude configuration to check for extraFlags (like --resume)
124
125
  let extraFlags = "";
125
- const claudeConfigPath = path.join(process.env.ORIGINAL_CWD || process.cwd(), ".ai", "neural-loom", "claude.json");
126
+ const claudeConfigPath = path.join(getConfigDir(), "claude.json");
126
127
  if (fs.existsSync(claudeConfigPath)) {
127
128
  try {
128
129
  const config = JSON.parse(fs.readFileSync(claudeConfigPath, "utf8"));
@@ -1,5 +1,6 @@
1
1
  import fs from "fs";
2
2
  import path from "path";
3
+ import { getConfigDir } from "../config";
3
4
  import type { IPty } from "node-pty";
4
5
  import { AgentRunner, RunnerStatus } from "./AgentRunner";
5
6
  import { SessionPersister } from "./SessionPersister";
@@ -77,7 +78,7 @@ export class SSHRunner extends AgentRunner {
77
78
  return;
78
79
  }
79
80
 
80
- const configPath = path.join(process.env.ORIGINAL_CWD || process.cwd(), ".ai", "neural-loom", "ssh.json");
81
+ const configPath = path.join(getConfigDir(), "ssh.json");
81
82
  if (!fs.existsSync(configPath)) {
82
83
  this.status = 'stopped';
83
84
  this.appendLog("\x1b[1;31m[Configuration Error] ssh.json not found!\x1b[0m\r\n");
@@ -120,7 +121,7 @@ export class SSHRunner extends AgentRunner {
120
121
 
121
122
  // Load Claude configuration to check for extraFlags (like --resume)
122
123
  let extraFlags = "";
123
- const claudeConfigPath = path.join(process.env.ORIGINAL_CWD || process.cwd(), ".ai", "neural-loom", "claude.json");
124
+ const claudeConfigPath = path.join(getConfigDir(), "claude.json");
124
125
  if (fs.existsSync(claudeConfigPath)) {
125
126
  try {
126
127
  const config = JSON.parse(fs.readFileSync(claudeConfigPath, "utf8"));
@@ -0,0 +1,32 @@
1
+ import fs from "fs";
2
+ import path from "path";
3
+ import os from "os";
4
+
5
+ export function getConfigDir(): string {
6
+ const primaryDir = path.join(process.env.ORIGINAL_CWD || process.cwd(), ".ai", "neural-loom");
7
+
8
+ try {
9
+ // Check if primary directory exists. If not, try to create it.
10
+ if (!fs.existsSync(primaryDir)) {
11
+ fs.mkdirSync(primaryDir, { recursive: true });
12
+ }
13
+ // Perform a test write to verify write permissions (crucial for read-only directories like C:\Program Files)
14
+ const testFile = path.join(primaryDir, ".write-test-" + Math.random().toString(36).substring(7));
15
+ fs.writeFileSync(testFile, "test");
16
+ fs.unlinkSync(testFile);
17
+ return primaryDir;
18
+ } catch (err) {
19
+ // If EPERM or any other write error occurs, fall back to the user's home directory
20
+ console.warn(`[Config] Primary config dir is not writable (${primaryDir}). Falling back to home directory.`, err);
21
+ const fallbackDir = path.join(os.homedir(), ".ai", "neural-loom");
22
+ try {
23
+ if (!fs.existsSync(fallbackDir)) {
24
+ fs.mkdirSync(fallbackDir, { recursive: true });
25
+ }
26
+ return fallbackDir;
27
+ } catch (fallbackErr) {
28
+ console.error("[Config] Fallback config dir is also not writable!", fallbackErr);
29
+ return primaryDir;
30
+ }
31
+ }
32
+ }