neural-loom 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (368) hide show
  1. package/.next/BUILD_ID +1 -0
  2. package/.next/app-path-routes-manifest.json +18 -0
  3. package/.next/build-manifest.json +20 -0
  4. package/.next/cache/.previewinfo +1 -0
  5. package/.next/cache/.rscinfo +1 -0
  6. package/.next/cache/.tsbuildinfo +1 -0
  7. package/.next/diagnostics/build-diagnostics.json +6 -0
  8. package/.next/diagnostics/framework.json +1 -0
  9. package/.next/diagnostics/route-bundle-stats.json +25 -0
  10. package/.next/export-marker.json +6 -0
  11. package/.next/fallback-build-manifest.json +13 -0
  12. package/.next/images-manifest.json +68 -0
  13. package/.next/next-minimal-server.js.nft.json +1 -0
  14. package/.next/next-server.js.nft.json +1 -0
  15. package/.next/package.json +1 -0
  16. package/.next/prerender-manifest.json +114 -0
  17. package/.next/required-server-files.js +332 -0
  18. package/.next/required-server-files.json +332 -0
  19. package/.next/routes-manifest.json +141 -0
  20. package/.next/server/app/_global-error/page/app-paths-manifest.json +3 -0
  21. package/.next/server/app/_global-error/page/build-manifest.json +16 -0
  22. package/.next/server/app/_global-error/page/next-font-manifest.json +6 -0
  23. package/.next/server/app/_global-error/page/react-loadable-manifest.json +1 -0
  24. package/.next/server/app/_global-error/page/server-reference-manifest.json +4 -0
  25. package/.next/server/app/_global-error/page.js +10 -0
  26. package/.next/server/app/_global-error/page.js.map +5 -0
  27. package/.next/server/app/_global-error/page.js.nft.json +1 -0
  28. package/.next/server/app/_global-error/page_client-reference-manifest.js +3 -0
  29. package/.next/server/app/_global-error.html +1 -0
  30. package/.next/server/app/_global-error.meta +15 -0
  31. package/.next/server/app/_global-error.rsc +15 -0
  32. package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +5 -0
  33. package/.next/server/app/_global-error.segments/_full.segment.rsc +15 -0
  34. package/.next/server/app/_global-error.segments/_head.segment.rsc +6 -0
  35. package/.next/server/app/_global-error.segments/_index.segment.rsc +5 -0
  36. package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -0
  37. package/.next/server/app/_not-found/page/app-paths-manifest.json +3 -0
  38. package/.next/server/app/_not-found/page/build-manifest.json +16 -0
  39. package/.next/server/app/_not-found/page/next-font-manifest.json +11 -0
  40. package/.next/server/app/_not-found/page/react-loadable-manifest.json +1 -0
  41. package/.next/server/app/_not-found/page/server-reference-manifest.json +4 -0
  42. package/.next/server/app/_not-found/page.js +13 -0
  43. package/.next/server/app/_not-found/page.js.map +5 -0
  44. package/.next/server/app/_not-found/page.js.nft.json +1 -0
  45. package/.next/server/app/_not-found/page_client-reference-manifest.js +3 -0
  46. package/.next/server/app/_not-found.html +1 -0
  47. package/.next/server/app/_not-found.meta +16 -0
  48. package/.next/server/app/_not-found.rsc +16 -0
  49. package/.next/server/app/_not-found.segments/_full.segment.rsc +16 -0
  50. package/.next/server/app/_not-found.segments/_head.segment.rsc +6 -0
  51. package/.next/server/app/_not-found.segments/_index.segment.rsc +5 -0
  52. package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +5 -0
  53. package/.next/server/app/_not-found.segments/_not-found.segment.rsc +5 -0
  54. package/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -0
  55. package/.next/server/app/api/context/aider/route/app-paths-manifest.json +3 -0
  56. package/.next/server/app/api/context/aider/route/build-manifest.json +9 -0
  57. package/.next/server/app/api/context/aider/route/server-reference-manifest.json +4 -0
  58. package/.next/server/app/api/context/aider/route.js +6 -0
  59. package/.next/server/app/api/context/aider/route.js.map +5 -0
  60. package/.next/server/app/api/context/aider/route.js.nft.json +1 -0
  61. package/.next/server/app/api/context/aider/route_client-reference-manifest.js +3 -0
  62. package/.next/server/app/api/context/claude/route/app-paths-manifest.json +3 -0
  63. package/.next/server/app/api/context/claude/route/build-manifest.json +9 -0
  64. package/.next/server/app/api/context/claude/route/server-reference-manifest.json +4 -0
  65. package/.next/server/app/api/context/claude/route.js +6 -0
  66. package/.next/server/app/api/context/claude/route.js.map +5 -0
  67. package/.next/server/app/api/context/claude/route.js.nft.json +1 -0
  68. package/.next/server/app/api/context/claude/route_client-reference-manifest.js +3 -0
  69. package/.next/server/app/api/context/route/app-paths-manifest.json +3 -0
  70. package/.next/server/app/api/context/route/build-manifest.json +9 -0
  71. package/.next/server/app/api/context/route/server-reference-manifest.json +4 -0
  72. package/.next/server/app/api/context/route.js +6 -0
  73. package/.next/server/app/api/context/route.js.map +5 -0
  74. package/.next/server/app/api/context/route.js.nft.json +1 -0
  75. package/.next/server/app/api/context/route_client-reference-manifest.js +3 -0
  76. package/.next/server/app/api/context/ssh/route/app-paths-manifest.json +3 -0
  77. package/.next/server/app/api/context/ssh/route/build-manifest.json +9 -0
  78. package/.next/server/app/api/context/ssh/route/server-reference-manifest.json +4 -0
  79. package/.next/server/app/api/context/ssh/route.js +6 -0
  80. package/.next/server/app/api/context/ssh/route.js.map +5 -0
  81. package/.next/server/app/api/context/ssh/route.js.nft.json +1 -0
  82. package/.next/server/app/api/context/ssh/route_client-reference-manifest.js +3 -0
  83. package/.next/server/app/api/files/route/app-paths-manifest.json +3 -0
  84. package/.next/server/app/api/files/route/build-manifest.json +9 -0
  85. package/.next/server/app/api/files/route/server-reference-manifest.json +4 -0
  86. package/.next/server/app/api/files/route.js +7 -0
  87. package/.next/server/app/api/files/route.js.map +5 -0
  88. package/.next/server/app/api/files/route.js.nft.json +1 -0
  89. package/.next/server/app/api/files/route_client-reference-manifest.js +3 -0
  90. package/.next/server/app/api/git/route/app-paths-manifest.json +3 -0
  91. package/.next/server/app/api/git/route/build-manifest.json +9 -0
  92. package/.next/server/app/api/git/route/server-reference-manifest.json +4 -0
  93. package/.next/server/app/api/git/route.js +6 -0
  94. package/.next/server/app/api/git/route.js.map +5 -0
  95. package/.next/server/app/api/git/route.js.nft.json +1 -0
  96. package/.next/server/app/api/git/route_client-reference-manifest.js +3 -0
  97. package/.next/server/app/api/sessions/inject/route/app-paths-manifest.json +3 -0
  98. package/.next/server/app/api/sessions/inject/route/build-manifest.json +9 -0
  99. package/.next/server/app/api/sessions/inject/route/server-reference-manifest.json +4 -0
  100. package/.next/server/app/api/sessions/inject/route.js +7 -0
  101. package/.next/server/app/api/sessions/inject/route.js.map +5 -0
  102. package/.next/server/app/api/sessions/inject/route.js.nft.json +1 -0
  103. package/.next/server/app/api/sessions/inject/route_client-reference-manifest.js +3 -0
  104. package/.next/server/app/api/sessions/input/route/app-paths-manifest.json +3 -0
  105. package/.next/server/app/api/sessions/input/route/build-manifest.json +9 -0
  106. package/.next/server/app/api/sessions/input/route/server-reference-manifest.json +4 -0
  107. package/.next/server/app/api/sessions/input/route.js +7 -0
  108. package/.next/server/app/api/sessions/input/route.js.map +5 -0
  109. package/.next/server/app/api/sessions/input/route.js.nft.json +1 -0
  110. package/.next/server/app/api/sessions/input/route_client-reference-manifest.js +3 -0
  111. package/.next/server/app/api/sessions/launch/route/app-paths-manifest.json +3 -0
  112. package/.next/server/app/api/sessions/launch/route/build-manifest.json +9 -0
  113. package/.next/server/app/api/sessions/launch/route/server-reference-manifest.json +4 -0
  114. package/.next/server/app/api/sessions/launch/route.js +7 -0
  115. package/.next/server/app/api/sessions/launch/route.js.map +5 -0
  116. package/.next/server/app/api/sessions/launch/route.js.nft.json +1 -0
  117. package/.next/server/app/api/sessions/launch/route_client-reference-manifest.js +3 -0
  118. package/.next/server/app/api/sessions/route/app-paths-manifest.json +3 -0
  119. package/.next/server/app/api/sessions/route/build-manifest.json +9 -0
  120. package/.next/server/app/api/sessions/route/server-reference-manifest.json +4 -0
  121. package/.next/server/app/api/sessions/route.js +7 -0
  122. package/.next/server/app/api/sessions/route.js.map +5 -0
  123. package/.next/server/app/api/sessions/route.js.nft.json +1 -0
  124. package/.next/server/app/api/sessions/route_client-reference-manifest.js +3 -0
  125. package/.next/server/app/api/sessions/stats/route/app-paths-manifest.json +3 -0
  126. package/.next/server/app/api/sessions/stats/route/build-manifest.json +9 -0
  127. package/.next/server/app/api/sessions/stats/route/server-reference-manifest.json +4 -0
  128. package/.next/server/app/api/sessions/stats/route.js +7 -0
  129. package/.next/server/app/api/sessions/stats/route.js.map +5 -0
  130. package/.next/server/app/api/sessions/stats/route.js.nft.json +1 -0
  131. package/.next/server/app/api/sessions/stats/route_client-reference-manifest.js +3 -0
  132. package/.next/server/app/api/sessions/stop/route/app-paths-manifest.json +3 -0
  133. package/.next/server/app/api/sessions/stop/route/build-manifest.json +9 -0
  134. package/.next/server/app/api/sessions/stop/route/server-reference-manifest.json +4 -0
  135. package/.next/server/app/api/sessions/stop/route.js +7 -0
  136. package/.next/server/app/api/sessions/stop/route.js.map +5 -0
  137. package/.next/server/app/api/sessions/stop/route.js.nft.json +1 -0
  138. package/.next/server/app/api/sessions/stop/route_client-reference-manifest.js +3 -0
  139. package/.next/server/app/favicon.ico/route/app-paths-manifest.json +3 -0
  140. package/.next/server/app/favicon.ico/route/build-manifest.json +9 -0
  141. package/.next/server/app/favicon.ico/route.js +7 -0
  142. package/.next/server/app/favicon.ico/route.js.map +5 -0
  143. package/.next/server/app/favicon.ico/route.js.nft.json +1 -0
  144. package/.next/server/app/favicon.ico.body +0 -0
  145. package/.next/server/app/favicon.ico.meta +1 -0
  146. package/.next/server/app/index.html +1 -0
  147. package/.next/server/app/index.meta +14 -0
  148. package/.next/server/app/index.rsc +21 -0
  149. package/.next/server/app/index.segments/__PAGE__.segment.rsc +10 -0
  150. package/.next/server/app/index.segments/_full.segment.rsc +21 -0
  151. package/.next/server/app/index.segments/_head.segment.rsc +6 -0
  152. package/.next/server/app/index.segments/_index.segment.rsc +5 -0
  153. package/.next/server/app/index.segments/_tree.segment.rsc +5 -0
  154. package/.next/server/app/page/app-paths-manifest.json +3 -0
  155. package/.next/server/app/page/build-manifest.json +16 -0
  156. package/.next/server/app/page/next-font-manifest.json +11 -0
  157. package/.next/server/app/page/react-loadable-manifest.json +42 -0
  158. package/.next/server/app/page/server-reference-manifest.json +4 -0
  159. package/.next/server/app/page.js +14 -0
  160. package/.next/server/app/page.js.map +5 -0
  161. package/.next/server/app/page.js.nft.json +1 -0
  162. package/.next/server/app/page_client-reference-manifest.js +3 -0
  163. package/.next/server/app-paths-manifest.json +18 -0
  164. package/.next/server/chunks/[externals]__0shxiss._.js +3 -0
  165. package/.next/server/chunks/[externals]__0shxiss._.js.map +1 -0
  166. package/.next/server/chunks/[externals]_next_dist_0arv.vj._.js +3 -0
  167. package/.next/server/chunks/[externals]_next_dist_0arv.vj._.js.map +1 -0
  168. package/.next/server/chunks/[externals]_node-pty_12c-8pf._.js +3 -0
  169. package/.next/server/chunks/[externals]_node-pty_12c-8pf._.js.map +1 -0
  170. package/.next/server/chunks/[root-of-the-server]__0-k9zyi._.js +15 -0
  171. package/.next/server/chunks/[root-of-the-server]__0-k9zyi._.js.map +1 -0
  172. package/.next/server/chunks/[root-of-the-server]__04kdofw._.js +15 -0
  173. package/.next/server/chunks/[root-of-the-server]__04kdofw._.js.map +1 -0
  174. package/.next/server/chunks/[root-of-the-server]__0c.5qbe._.js +15 -0
  175. package/.next/server/chunks/[root-of-the-server]__0c.5qbe._.js.map +1 -0
  176. package/.next/server/chunks/[root-of-the-server]__0d0pykb._.js +28 -0
  177. package/.next/server/chunks/[root-of-the-server]__0d0pykb._.js.map +1 -0
  178. package/.next/server/chunks/[root-of-the-server]__0e5cwnx._.js +3 -0
  179. package/.next/server/chunks/[root-of-the-server]__0e5cwnx._.js.map +1 -0
  180. package/.next/server/chunks/[root-of-the-server]__0efi5cr._.js +3 -0
  181. package/.next/server/chunks/[root-of-the-server]__0efi5cr._.js.map +1 -0
  182. package/.next/server/chunks/[root-of-the-server]__0j8-xkl._.js +13 -0
  183. package/.next/server/chunks/[root-of-the-server]__0j8-xkl._.js.map +1 -0
  184. package/.next/server/chunks/[root-of-the-server]__0k6w___._.js +15 -0
  185. package/.next/server/chunks/[root-of-the-server]__0k6w___._.js.map +1 -0
  186. package/.next/server/chunks/[root-of-the-server]__0l7c-gn._.js +3 -0
  187. package/.next/server/chunks/[root-of-the-server]__0l7c-gn._.js.map +1 -0
  188. package/.next/server/chunks/[root-of-the-server]__0l_q72g._.js +15 -0
  189. package/.next/server/chunks/[root-of-the-server]__0l_q72g._.js.map +1 -0
  190. package/.next/server/chunks/[root-of-the-server]__0m7-xfc._.js +15 -0
  191. package/.next/server/chunks/[root-of-the-server]__0m7-xfc._.js.map +1 -0
  192. package/.next/server/chunks/[root-of-the-server]__0m_~dan._.js +15 -0
  193. package/.next/server/chunks/[root-of-the-server]__0m_~dan._.js.map +1 -0
  194. package/.next/server/chunks/[root-of-the-server]__0ntt3om._.js +3 -0
  195. package/.next/server/chunks/[root-of-the-server]__0ntt3om._.js.map +1 -0
  196. package/.next/server/chunks/[turbopack]_runtime.js +903 -0
  197. package/.next/server/chunks/[turbopack]_runtime.js.map +11 -0
  198. package/.next/server/chunks/_next-internal_server_app_api_context_aider_route_actions_0dszia..js +3 -0
  199. package/.next/server/chunks/_next-internal_server_app_api_context_aider_route_actions_0dszia..js.map +1 -0
  200. package/.next/server/chunks/_next-internal_server_app_api_context_claude_route_actions_12srkdn.js +3 -0
  201. package/.next/server/chunks/_next-internal_server_app_api_context_claude_route_actions_12srkdn.js.map +1 -0
  202. package/.next/server/chunks/_next-internal_server_app_api_context_route_actions_03ko8ta.js +3 -0
  203. package/.next/server/chunks/_next-internal_server_app_api_context_route_actions_03ko8ta.js.map +1 -0
  204. package/.next/server/chunks/_next-internal_server_app_api_context_ssh_route_actions_0~0~96d.js +3 -0
  205. package/.next/server/chunks/_next-internal_server_app_api_context_ssh_route_actions_0~0~96d.js.map +1 -0
  206. package/.next/server/chunks/_next-internal_server_app_api_files_route_actions_0x8kqqx.js +3 -0
  207. package/.next/server/chunks/_next-internal_server_app_api_files_route_actions_0x8kqqx.js.map +1 -0
  208. package/.next/server/chunks/_next-internal_server_app_api_git_route_actions_0xetuf~.js +3 -0
  209. package/.next/server/chunks/_next-internal_server_app_api_git_route_actions_0xetuf~.js.map +1 -0
  210. package/.next/server/chunks/_next-internal_server_app_api_sessions_inject_route_actions_0y2_m1_.js +3 -0
  211. package/.next/server/chunks/_next-internal_server_app_api_sessions_inject_route_actions_0y2_m1_.js.map +1 -0
  212. package/.next/server/chunks/_next-internal_server_app_api_sessions_input_route_actions_032sdjp.js +3 -0
  213. package/.next/server/chunks/_next-internal_server_app_api_sessions_input_route_actions_032sdjp.js.map +1 -0
  214. package/.next/server/chunks/_next-internal_server_app_api_sessions_launch_route_actions_0_qrmsm.js +3 -0
  215. package/.next/server/chunks/_next-internal_server_app_api_sessions_launch_route_actions_0_qrmsm.js.map +1 -0
  216. package/.next/server/chunks/_next-internal_server_app_api_sessions_route_actions_0y1t9w0.js +3 -0
  217. package/.next/server/chunks/_next-internal_server_app_api_sessions_route_actions_0y1t9w0.js.map +1 -0
  218. package/.next/server/chunks/_next-internal_server_app_api_sessions_stats_route_actions_0gc_vw-.js +3 -0
  219. package/.next/server/chunks/_next-internal_server_app_api_sessions_stats_route_actions_0gc_vw-.js.map +1 -0
  220. package/.next/server/chunks/_next-internal_server_app_api_sessions_stop_route_actions_0xg1t9k.js +3 -0
  221. package/.next/server/chunks/_next-internal_server_app_api_sessions_stop_route_actions_0xg1t9k.js.map +1 -0
  222. package/.next/server/chunks/_next-internal_server_app_favicon_ico_route_actions_095lj93.js +3 -0
  223. package/.next/server/chunks/_next-internal_server_app_favicon_ico_route_actions_095lj93.js.map +1 -0
  224. package/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_0ev3h.z.js +3 -0
  225. package/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_0ev3h.z.js.map +1 -0
  226. package/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_0m.429v.js +3 -0
  227. package/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_0m.429v.js.map +1 -0
  228. package/.next/server/chunks/ssr/[root-of-the-server]__0.kd7dh._.js +33 -0
  229. package/.next/server/chunks/ssr/[root-of-the-server]__0.kd7dh._.js.map +1 -0
  230. package/.next/server/chunks/ssr/[root-of-the-server]__089dc4i._.js +33 -0
  231. package/.next/server/chunks/ssr/[root-of-the-server]__089dc4i._.js.map +1 -0
  232. package/.next/server/chunks/ssr/[root-of-the-server]__0_7i5h0._.js +3 -0
  233. package/.next/server/chunks/ssr/[root-of-the-server]__0_7i5h0._.js.map +1 -0
  234. package/.next/server/chunks/ssr/[root-of-the-server]__0hw~y-4._.js +3 -0
  235. package/.next/server/chunks/ssr/[root-of-the-server]__0hw~y-4._.js.map +1 -0
  236. package/.next/server/chunks/ssr/[root-of-the-server]__0uk0awy._.js +3 -0
  237. package/.next/server/chunks/ssr/[root-of-the-server]__0uk0awy._.js.map +1 -0
  238. package/.next/server/chunks/ssr/[root-of-the-server]__0v73tbn._.js +3 -0
  239. package/.next/server/chunks/ssr/[root-of-the-server]__0v73tbn._.js.map +1 -0
  240. package/.next/server/chunks/ssr/[root-of-the-server]__0~y8ue.._.js +3 -0
  241. package/.next/server/chunks/ssr/[root-of-the-server]__0~y8ue.._.js.map +1 -0
  242. package/.next/server/chunks/ssr/[turbopack]_runtime.js +903 -0
  243. package/.next/server/chunks/ssr/[turbopack]_runtime.js.map +11 -0
  244. package/.next/server/chunks/ssr/_0t7oqy6._.js +3 -0
  245. package/.next/server/chunks/ssr/_0t7oqy6._.js.map +1 -0
  246. package/.next/server/chunks/ssr/_next-internal_server_app__global-error_page_actions_0k77kol.js +3 -0
  247. package/.next/server/chunks/ssr/_next-internal_server_app__global-error_page_actions_0k77kol.js.map +1 -0
  248. package/.next/server/chunks/ssr/_next-internal_server_app__not-found_page_actions_0eq97pa.js +3 -0
  249. package/.next/server/chunks/ssr/_next-internal_server_app__not-found_page_actions_0eq97pa.js.map +1 -0
  250. package/.next/server/chunks/ssr/_next-internal_server_app_page_actions_09-gtaw.js +3 -0
  251. package/.next/server/chunks/ssr/_next-internal_server_app_page_actions_09-gtaw.js.map +1 -0
  252. package/.next/server/chunks/ssr/node_modules_05l396c._.js +3 -0
  253. package/.next/server/chunks/ssr/node_modules_05l396c._.js.map +1 -0
  254. package/.next/server/chunks/ssr/node_modules_09w7yel._.js +33 -0
  255. package/.next/server/chunks/ssr/node_modules_09w7yel._.js.map +1 -0
  256. package/.next/server/chunks/ssr/node_modules_@swc_helpers_cjs__interop_require_default_cjs_11~q6fv._.js +3 -0
  257. package/.next/server/chunks/ssr/node_modules_@swc_helpers_cjs__interop_require_default_cjs_11~q6fv._.js.map +1 -0
  258. package/.next/server/chunks/ssr/node_modules_next_dist_0ppctuh._.js +19 -0
  259. package/.next/server/chunks/ssr/node_modules_next_dist_0ppctuh._.js.map +1 -0
  260. package/.next/server/chunks/ssr/node_modules_next_dist_0qoh8ry._.js +6 -0
  261. package/.next/server/chunks/ssr/node_modules_next_dist_0qoh8ry._.js.map +1 -0
  262. package/.next/server/chunks/ssr/node_modules_next_dist_client_components_0inhx6q._.js +3 -0
  263. package/.next/server/chunks/ssr/node_modules_next_dist_client_components_0inhx6q._.js.map +1 -0
  264. package/.next/server/chunks/ssr/node_modules_next_dist_client_components_builtin_forbidden_0ghu-f7.js +3 -0
  265. package/.next/server/chunks/ssr/node_modules_next_dist_client_components_builtin_forbidden_0ghu-f7.js.map +1 -0
  266. package/.next/server/chunks/ssr/node_modules_next_dist_client_components_builtin_global-error_0lgvd_..js +3 -0
  267. package/.next/server/chunks/ssr/node_modules_next_dist_client_components_builtin_global-error_0lgvd_..js.map +1 -0
  268. package/.next/server/chunks/ssr/node_modules_next_dist_client_components_builtin_unauthorized_0cjv-23.js +3 -0
  269. package/.next/server/chunks/ssr/node_modules_next_dist_client_components_builtin_unauthorized_0cjv-23.js.map +1 -0
  270. package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_03-z2qq.js +4 -0
  271. package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_03-z2qq.js.map +1 -0
  272. package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_07vh7rm.js +4 -0
  273. package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_07vh7rm.js.map +1 -0
  274. package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0qp4u6g.js +4 -0
  275. package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0qp4u6g.js.map +1 -0
  276. package/.next/server/functions-config-manifest.json +4 -0
  277. package/.next/server/interception-route-rewrite-manifest.js +1 -0
  278. package/.next/server/middleware-build-manifest.js +20 -0
  279. package/.next/server/middleware-manifest.json +6 -0
  280. package/.next/server/next-font-manifest.js +1 -0
  281. package/.next/server/next-font-manifest.json +15 -0
  282. package/.next/server/pages/404.html +1 -0
  283. package/.next/server/pages/500.html +1 -0
  284. package/.next/server/pages-manifest.json +4 -0
  285. package/.next/server/prefetch-hints.json +1 -0
  286. package/.next/server/server-reference-manifest.js +1 -0
  287. package/.next/server/server-reference-manifest.json +5 -0
  288. package/.next/static/chunks/03g6xpslyid3~.js +1 -0
  289. package/.next/static/chunks/03~yq9q893hmn.js +1 -0
  290. package/.next/static/chunks/07b7-dl8gh17u.js +5 -0
  291. package/.next/static/chunks/07lhk_q6pmm3r.js +1 -0
  292. package/.next/static/chunks/0dbhjjzl8qfwv.js +1 -0
  293. package/.next/static/chunks/0ewdhgxsa_h.q.js +1 -0
  294. package/.next/static/chunks/0f4at4_v-tkgj.js +1 -0
  295. package/.next/static/chunks/0fpki3y6aj230.js +31 -0
  296. package/.next/static/chunks/0ga14ztvrhau2.css +1 -0
  297. package/.next/static/chunks/0lnobx4eh3~-_.js +1 -0
  298. package/.next/static/chunks/0mej.ad_ddvf1.js +1 -0
  299. package/.next/static/chunks/0q4suv6uexpud.css +1 -0
  300. package/.next/static/chunks/0xq6bhmghl02_.js +1 -0
  301. package/.next/static/chunks/139c54uo1w7.4.css +3 -0
  302. package/.next/static/chunks/140ovxvjat1ch.js +5 -0
  303. package/.next/static/chunks/16w4~t4h7gk13.js +1 -0
  304. package/.next/static/chunks/turbopack-08fpdsd.-ns2y.js +1 -0
  305. package/.next/static/media/4fa387ec64143e14-s.0wkzw~je483f-.woff2 +0 -0
  306. package/.next/static/media/53b9e256198e5412-s.0-wfv7uh4i7h9.woff2 +0 -0
  307. package/.next/static/media/5ce348bf30bf5439-s.0zgw-jeven.3w.woff2 +0 -0
  308. package/.next/static/media/6306c77e7c8268e4-s.0rhz0arwfsn~5.woff2 +0 -0
  309. package/.next/static/media/7178b3e590c64307-s.0nx0ww8fni_q3.woff2 +0 -0
  310. package/.next/static/media/797e433ab948586e-s.p.08e28id.o-okb.woff2 +0 -0
  311. package/.next/static/media/7d817b4c03b0c5f1-s.0l76wvqk9d84w.woff2 +0 -0
  312. package/.next/static/media/8a480f0b521d4e75-s.0jzbimsg8vl84.woff2 +0 -0
  313. package/.next/static/media/bbc41e54d2fcbd21-s.0k4k9394f2q-k.woff2 +0 -0
  314. package/.next/static/media/caa3a2e1cccd8315-s.p.09~u27dqhyhd6.woff2 +0 -0
  315. package/.next/static/media/favicon.0x3dzn~oxb6tn.ico +0 -0
  316. package/.next/static/media/fef07dbb0973bf53-s.12tyk43_3sh9u.woff2 +0 -0
  317. package/.next/static/r-T5V6BKLiZ32Ai9Boe1d/_buildManifest.js +11 -0
  318. package/.next/static/r-T5V6BKLiZ32Ai9Boe1d/_clientMiddlewareManifest.js +1 -0
  319. package/.next/static/r-T5V6BKLiZ32Ai9Boe1d/_ssgManifest.js +1 -0
  320. package/.next/trace +1 -0
  321. package/.next/trace-build +1 -0
  322. package/.next/turbopack +0 -0
  323. package/.next/types/cache-life.d.ts +145 -0
  324. package/.next/types/routes.d.ts +84 -0
  325. package/.next/types/validator.ts +178 -0
  326. package/README.md +125 -0
  327. package/bin/cli.js +36 -0
  328. package/next.config.ts +7 -0
  329. package/package.json +40 -0
  330. package/public/file.svg +1 -0
  331. package/public/globe.svg +1 -0
  332. package/public/next.svg +1 -0
  333. package/public/vercel.svg +1 -0
  334. package/public/window.svg +1 -0
  335. package/src/app/api/context/aider/route.ts +113 -0
  336. package/src/app/api/context/claude/route.ts +64 -0
  337. package/src/app/api/context/route.ts +37 -0
  338. package/src/app/api/context/ssh/route.ts +88 -0
  339. package/src/app/api/files/route.ts +276 -0
  340. package/src/app/api/git/route.ts +81 -0
  341. package/src/app/api/sessions/inject/route.ts +21 -0
  342. package/src/app/api/sessions/input/route.ts +30 -0
  343. package/src/app/api/sessions/launch/route.ts +25 -0
  344. package/src/app/api/sessions/route.ts +27 -0
  345. package/src/app/api/sessions/stats/route.ts +76 -0
  346. package/src/app/api/sessions/stop/route.ts +26 -0
  347. package/src/app/components/AiderWizard.tsx +412 -0
  348. package/src/app/components/ClaudeWizard.tsx +335 -0
  349. package/src/app/components/ContextEditor.tsx +169 -0
  350. package/src/app/components/IdeLayout.tsx +2095 -0
  351. package/src/app/components/SshWizard.tsx +379 -0
  352. package/src/app/components/TerminalConsole.tsx +228 -0
  353. package/src/app/favicon.ico +0 -0
  354. package/src/app/globals.css +81 -0
  355. package/src/app/layout.tsx +30 -0
  356. package/src/app/page.module.css +330 -0
  357. package/src/app/page.tsx +581 -0
  358. package/src/lib/agents/AgentRunner.ts +86 -0
  359. package/src/lib/agents/AiderRunner.ts +261 -0
  360. package/src/lib/agents/ClaudeRunner.ts +148 -0
  361. package/src/lib/agents/ContextManager.ts +142 -0
  362. package/src/lib/agents/DockerRunner.ts +182 -0
  363. package/src/lib/agents/MockRunner.ts +126 -0
  364. package/src/lib/agents/SSHRunner.ts +180 -0
  365. package/src/lib/agents/SessionManager.ts +147 -0
  366. package/src/lib/agents/SessionPersister.ts +85 -0
  367. package/src/lib/agents/WebSocketServer.ts +118 -0
  368. package/tsconfig.json +34 -0
@@ -0,0 +1 @@
1
+ <svg fill="none" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M14.5 13.5V5.41a1 1 0 0 0-.3-.7L9.8.29A1 1 0 0 0 9.08 0H1.5v13.5A2.5 2.5 0 0 0 4 16h8a2.5 2.5 0 0 0 2.5-2.5m-1.5 0v-7H8v-5H3v12a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1M9.5 5V2.12L12.38 5zM5.13 5h-.62v1.25h2.12V5zm-.62 3h7.12v1.25H4.5zm.62 3h-.62v1.25h7.12V11z" clip-rule="evenodd" fill="#666" fill-rule="evenodd"/></svg>
@@ -0,0 +1 @@
1
+ <svg fill="none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><g clip-path="url(#a)"><path fill-rule="evenodd" clip-rule="evenodd" d="M10.27 14.1a6.5 6.5 0 0 0 3.67-3.45q-1.24.21-2.7.34-.31 1.83-.97 3.1M8 16A8 8 0 1 0 8 0a8 8 0 0 0 0 16m.48-1.52a7 7 0 0 1-.96 0H7.5a4 4 0 0 1-.84-1.32q-.38-.89-.63-2.08a40 40 0 0 0 3.92 0q-.25 1.2-.63 2.08a4 4 0 0 1-.84 1.31zm2.94-4.76q1.66-.15 2.95-.43a7 7 0 0 0 0-2.58q-1.3-.27-2.95-.43a18 18 0 0 1 0 3.44m-1.27-3.54a17 17 0 0 1 0 3.64 39 39 0 0 1-4.3 0 17 17 0 0 1 0-3.64 39 39 0 0 1 4.3 0m1.1-1.17q1.45.13 2.69.34a6.5 6.5 0 0 0-3.67-3.44q.65 1.26.98 3.1M8.48 1.5l.01.02q.41.37.84 1.31.38.89.63 2.08a40 40 0 0 0-3.92 0q.25-1.2.63-2.08a4 4 0 0 1 .85-1.32 7 7 0 0 1 .96 0m-2.75.4a6.5 6.5 0 0 0-3.67 3.44 29 29 0 0 1 2.7-.34q.31-1.83.97-3.1M4.58 6.28q-1.66.16-2.95.43a7 7 0 0 0 0 2.58q1.3.27 2.95.43a18 18 0 0 1 0-3.44m.17 4.71q-1.45-.12-2.69-.34a6.5 6.5 0 0 0 3.67 3.44q-.65-1.27-.98-3.1" fill="#666"/></g><defs><clipPath id="a"><path fill="#fff" d="M0 0h16v16H0z"/></clipPath></defs></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 394 80"><path fill="#000" d="M262 0h68.5v12.7h-27.2v66.6h-13.6V12.7H262V0ZM149 0v12.7H94v20.4h44.3v12.6H94v21h55v12.6H80.5V0h68.7zm34.3 0h-17.8l63.8 79.4h17.9l-32-39.7 32-39.6h-17.9l-23 28.6-23-28.6zm18.3 56.7-9-11-27.1 33.7h17.8l18.3-22.7z"/><path fill="#000" d="M81 79.3 17 0H0v79.3h13.6V17l50.2 62.3H81Zm252.6-.4c-1 0-1.8-.4-2.5-1s-1.1-1.6-1.1-2.6.3-1.8 1-2.5 1.6-1 2.6-1 1.8.3 2.5 1a3.4 3.4 0 0 1 .6 4.3 3.7 3.7 0 0 1-3 1.8zm23.2-33.5h6v23.3c0 2.1-.4 4-1.3 5.5a9.1 9.1 0 0 1-3.8 3.5c-1.6.8-3.5 1.3-5.7 1.3-2 0-3.7-.4-5.3-1s-2.8-1.8-3.7-3.2c-.9-1.3-1.4-3-1.4-5h6c.1.8.3 1.6.7 2.2s1 1.2 1.6 1.5c.7.4 1.5.5 2.4.5 1 0 1.8-.2 2.4-.6a4 4 0 0 0 1.6-1.8c.3-.8.5-1.8.5-3V45.5zm30.9 9.1a4.4 4.4 0 0 0-2-3.3 7.5 7.5 0 0 0-4.3-1.1c-1.3 0-2.4.2-3.3.5-.9.4-1.6 1-2 1.6a3.5 3.5 0 0 0-.3 4c.3.5.7.9 1.3 1.2l1.8 1 2 .5 3.2.8c1.3.3 2.5.7 3.7 1.2a13 13 0 0 1 3.2 1.8 8.1 8.1 0 0 1 3 6.5c0 2-.5 3.7-1.5 5.1a10 10 0 0 1-4.4 3.5c-1.8.8-4.1 1.2-6.8 1.2-2.6 0-4.9-.4-6.8-1.2-2-.8-3.4-2-4.5-3.5a10 10 0 0 1-1.7-5.6h6a5 5 0 0 0 3.5 4.6c1 .4 2.2.6 3.4.6 1.3 0 2.5-.2 3.5-.6 1-.4 1.8-1 2.4-1.7a4 4 0 0 0 .8-2.4c0-.9-.2-1.6-.7-2.2a11 11 0 0 0-2.1-1.4l-3.2-1-3.8-1c-2.8-.7-5-1.7-6.6-3.2a7.2 7.2 0 0 1-2.4-5.7 8 8 0 0 1 1.7-5 10 10 0 0 1 4.3-3.5c2-.8 4-1.2 6.4-1.2 2.3 0 4.4.4 6.2 1.2 1.8.8 3.2 2 4.3 3.4 1 1.4 1.5 3 1.5 5h-5.8z"/></svg>
@@ -0,0 +1 @@
1
+ <svg fill="none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1155 1000"><path d="m577.3 0 577.4 1000H0z" fill="#fff"/></svg>
@@ -0,0 +1 @@
1
+ <svg fill="none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill-rule="evenodd" clip-rule="evenodd" d="M1.5 2.5h13v10a1 1 0 0 1-1 1h-11a1 1 0 0 1-1-1zM0 1h16v11.5a2.5 2.5 0 0 1-2.5 2.5h-11A2.5 2.5 0 0 1 0 12.5zm3.75 4.5a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5M7 4.75a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0m1.75.75a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5" fill="#666"/></svg>
@@ -0,0 +1,113 @@
1
+ import { NextResponse } from "next/server";
2
+ import fs from "fs";
3
+ import path from "path";
4
+
5
+ const configDir = path.join(process.cwd(), ".ai", "neural-loom");
6
+ const configPath = path.join(configDir, "aider.json");
7
+
8
+ function ensureDir() {
9
+ if (!fs.existsSync(configDir)) {
10
+ fs.mkdirSync(configDir, { recursive: true });
11
+ }
12
+ }
13
+
14
+ function maskKey(key: string): string {
15
+ if (!key) return "";
16
+ if (key.length <= 8) return "********";
17
+ return `${key.slice(0, 6)}...${key.slice(-4)}`;
18
+ }
19
+
20
+ export async function GET() {
21
+ try {
22
+ if (fs.existsSync(configPath)) {
23
+ const rawData = fs.readFileSync(configPath, "utf8");
24
+ const config = JSON.parse(rawData);
25
+
26
+ return NextResponse.json({
27
+ success: true,
28
+ config: {
29
+ openaiApiKey: config.openaiApiKey ? maskKey(config.openaiApiKey) : "",
30
+ anthropicApiKey: config.anthropicApiKey ? maskKey(config.anthropicApiKey) : "",
31
+ geminiApiKey: config.geminiApiKey ? maskKey(config.geminiApiKey) : "",
32
+ model: config.model || "claude-3-5-sonnet",
33
+ extraFlags: config.extraFlags || "",
34
+ workspaceRoot: config.workspaceRoot || "",
35
+ scopedDirs: config.scopedDirs || [],
36
+ },
37
+ });
38
+ }
39
+
40
+ return NextResponse.json({
41
+ success: true,
42
+ config: {
43
+ openaiApiKey: "",
44
+ anthropicApiKey: "",
45
+ geminiApiKey: "",
46
+ model: "claude-3-5-sonnet",
47
+ extraFlags: "",
48
+ workspaceRoot: "",
49
+ scopedDirs: [],
50
+ },
51
+ });
52
+ } catch (error) {
53
+ const errorMessage = error instanceof Error ? error.message : "Unknown error";
54
+ return NextResponse.json({ success: false, error: errorMessage }, { status: 500 });
55
+ }
56
+ }
57
+
58
+ export async function POST(request: Request) {
59
+ try {
60
+ const body = await request.json();
61
+ const { openaiApiKey, anthropicApiKey, geminiApiKey, model, extraFlags, workspaceRoot, scopedDirs } = body;
62
+
63
+ ensureDir();
64
+
65
+ let existingConfig = {
66
+ openaiApiKey: "",
67
+ anthropicApiKey: "",
68
+ geminiApiKey: "",
69
+ model: "claude-3-5-sonnet",
70
+ extraFlags: "",
71
+ workspaceRoot: "",
72
+ scopedDirs: [] as string[],
73
+ };
74
+
75
+ if (fs.existsSync(configPath)) {
76
+ try {
77
+ existingConfig = JSON.parse(fs.readFileSync(configPath, "utf8"));
78
+ } catch (e) {
79
+ console.error("Failed to parse existing aider.json:", e);
80
+ }
81
+ }
82
+
83
+ // Determine whether to use new keys or preserve existing ones if masked sentinels are received
84
+ const finalOpenaiKey = (openaiApiKey && openaiApiKey.includes("..."))
85
+ ? existingConfig.openaiApiKey
86
+ : (openaiApiKey || "");
87
+
88
+ const finalAnthropicKey = (anthropicApiKey && anthropicApiKey.includes("..."))
89
+ ? existingConfig.anthropicApiKey
90
+ : (anthropicApiKey || "");
91
+
92
+ const finalGeminiKey = (geminiApiKey && geminiApiKey.includes("..."))
93
+ ? existingConfig.geminiApiKey
94
+ : (geminiApiKey || "");
95
+
96
+ const newConfig = {
97
+ openaiApiKey: finalOpenaiKey,
98
+ anthropicApiKey: finalAnthropicKey,
99
+ geminiApiKey: finalGeminiKey,
100
+ model: model || "claude-3-5-sonnet",
101
+ extraFlags: extraFlags || "",
102
+ workspaceRoot: workspaceRoot || "",
103
+ scopedDirs: scopedDirs || [],
104
+ };
105
+
106
+ fs.writeFileSync(configPath, JSON.stringify(newConfig, null, 2), "utf8");
107
+ return NextResponse.json({ success: true, message: "Aider configuration saved successfully!" });
108
+
109
+ } catch (error) {
110
+ const errorMessage = error instanceof Error ? error.message : "Unknown error";
111
+ return NextResponse.json({ success: false, error: errorMessage }, { status: 500 });
112
+ }
113
+ }
@@ -0,0 +1,64 @@
1
+ import { NextResponse } from "next/server";
2
+ import fs from "fs";
3
+ import path from "path";
4
+
5
+ const configDir = path.join(process.cwd(), ".ai", "neural-loom");
6
+ const configPath = path.join(configDir, "claude.json");
7
+
8
+ function ensureDir() {
9
+ if (!fs.existsSync(configDir)) {
10
+ fs.mkdirSync(configDir, { recursive: true });
11
+ }
12
+ }
13
+
14
+ export async function GET() {
15
+ try {
16
+ if (fs.existsSync(configPath)) {
17
+ const rawData = fs.readFileSync(configPath, "utf8");
18
+ const config = JSON.parse(rawData);
19
+
20
+ return NextResponse.json({
21
+ success: true,
22
+ config: {
23
+ name: config.name || "Claude Local",
24
+ workspaceRoot: config.workspaceRoot || "",
25
+ scopedDirs: config.scopedDirs || [],
26
+ },
27
+ });
28
+ }
29
+
30
+ return NextResponse.json({
31
+ success: true,
32
+ config: {
33
+ name: "Claude Local",
34
+ workspaceRoot: "",
35
+ scopedDirs: [],
36
+ },
37
+ });
38
+ } catch (error) {
39
+ const errorMessage = error instanceof Error ? error.message : "Unknown error";
40
+ return NextResponse.json({ success: false, error: errorMessage }, { status: 500 });
41
+ }
42
+ }
43
+
44
+ export async function POST(request: Request) {
45
+ try {
46
+ const body = await request.json();
47
+ const { name, workspaceRoot, scopedDirs } = body;
48
+
49
+ ensureDir();
50
+
51
+ const newConfig = {
52
+ name: name || "Claude Local",
53
+ workspaceRoot: workspaceRoot || "",
54
+ scopedDirs: scopedDirs || [],
55
+ };
56
+
57
+ fs.writeFileSync(configPath, JSON.stringify(newConfig, null, 2), "utf8");
58
+ return NextResponse.json({ success: true, message: "Claude configuration saved successfully!" });
59
+
60
+ } catch (error) {
61
+ const errorMessage = error instanceof Error ? error.message : "Unknown error";
62
+ return NextResponse.json({ success: false, error: errorMessage }, { status: 500 });
63
+ }
64
+ }
@@ -0,0 +1,37 @@
1
+ import { NextResponse } from "next/server";
2
+ import { ContextManager } from "@/lib/agents/ContextManager";
3
+
4
+ export async function GET() {
5
+ try {
6
+ const prompt = ContextManager.loadPrompt();
7
+ const rules = ContextManager.loadRules();
8
+
9
+ return NextResponse.json({ prompt, rules });
10
+ } catch (error) {
11
+ const errorMessage = error instanceof Error ? error.message : "Unknown error";
12
+ return NextResponse.json({ error: errorMessage }, { status: 500 });
13
+ }
14
+ }
15
+
16
+ export async function POST(request: Request) {
17
+ try {
18
+ const body = await request.json();
19
+ const { promptText, rulesText } = body;
20
+
21
+ if (promptText !== undefined) {
22
+ ContextManager.updatePrompt(promptText);
23
+ }
24
+
25
+ if (rulesText !== undefined) {
26
+ ContextManager.updateRules(rulesText);
27
+ }
28
+
29
+ // Compile global rules context map
30
+ ContextManager.compileGlobalRules();
31
+
32
+ return NextResponse.json({ success: true });
33
+ } catch (error) {
34
+ const errorMessage = error instanceof Error ? error.message : "Unknown error";
35
+ return NextResponse.json({ error: errorMessage }, { status: 500 });
36
+ }
37
+ }
@@ -0,0 +1,88 @@
1
+ import { NextResponse } from "next/server";
2
+ import fs from "fs";
3
+ import path from "path";
4
+ import { exec } from "child_process";
5
+
6
+ const configDir = path.join(process.cwd(), ".ai", "neural-loom");
7
+ const configPath = path.join(configDir, "ssh.json");
8
+
9
+ function ensureDir() {
10
+ if (!fs.existsSync(configDir)) {
11
+ fs.mkdirSync(configDir, { recursive: true });
12
+ }
13
+ }
14
+
15
+ export async function GET() {
16
+ try {
17
+ if (fs.existsSync(configPath)) {
18
+ const data = fs.readFileSync(configPath, "utf8");
19
+ const config = JSON.parse(data);
20
+ return NextResponse.json({ success: true, config });
21
+ }
22
+ return NextResponse.json({
23
+ success: true,
24
+ config: {
25
+ host: "",
26
+ port: 22,
27
+ username: "",
28
+ privateKeyPath: "",
29
+ },
30
+ });
31
+ } catch (error) {
32
+ const errorMessage = error instanceof Error ? error.message : "Unknown error";
33
+ return NextResponse.json({ success: false, error: errorMessage }, { status: 500 });
34
+ }
35
+ }
36
+
37
+ export async function POST(request: Request) {
38
+ try {
39
+ const body = await request.json();
40
+ const { test, host, port, username, privateKeyPath } = body;
41
+
42
+ if (!host || !username) {
43
+ return NextResponse.json({ success: false, error: "Host and Username are required." }, { status: 400 });
44
+ }
45
+
46
+ const numericPort = port ? parseInt(String(port), 10) : 22;
47
+
48
+ if (test) {
49
+ // Test the SSH connection
50
+ const success = await new Promise<{ ok: boolean; message: string }>((resolve) => {
51
+ const keyOpt = privateKeyPath ? `-i "${privateKeyPath}"` : "";
52
+ const portOpt = `-p ${numericPort}`;
53
+
54
+ // StrictHostKeyChecking=accept-new automatically adds host key to known_hosts if it's new
55
+ // BatchMode=yes prevents it from waiting for user password prompt
56
+ const sshCmd = `ssh -o ConnectTimeout=3 -o BatchMode=yes -o StrictHostKeyChecking=accept-new ${keyOpt} ${portOpt} ${username}@${host} "echo CONNECTED"`;
57
+
58
+ exec(sshCmd, (error, stdout, stderr) => {
59
+ if (error) {
60
+ resolve({ ok: false, message: stderr.trim() || error.message });
61
+ } else if (stdout.trim().includes("CONNECTED")) {
62
+ resolve({ ok: true, message: "Successfully connected to remote VM!" });
63
+ } else {
64
+ resolve({ ok: false, message: stderr.trim() || "Failed to verify remote host verification print." });
65
+ }
66
+ });
67
+ });
68
+
69
+ return NextResponse.json({ success: success.ok, message: success.message });
70
+ }
71
+
72
+ // Save SSH connection configuration
73
+ ensureDir();
74
+ const config = {
75
+ host,
76
+ port: numericPort,
77
+ username,
78
+ privateKeyPath: privateKeyPath || "",
79
+ };
80
+
81
+ fs.writeFileSync(configPath, JSON.stringify(config, null, 2), "utf8");
82
+ return NextResponse.json({ success: true, message: "SSH configuration saved successfully!" });
83
+
84
+ } catch (error) {
85
+ const errorMessage = error instanceof Error ? error.message : "Unknown error";
86
+ return NextResponse.json({ success: false, error: errorMessage }, { status: 500 });
87
+ }
88
+ }
@@ -0,0 +1,276 @@
1
+ import { NextResponse } from "next/server";
2
+ import fs from "fs";
3
+ import path from "path";
4
+
5
+ // Helper to recursively generate a tree nodes list for UI representation
6
+ interface TreeNode {
7
+ name: string;
8
+ path: string;
9
+ type: "file" | "directory";
10
+ children?: TreeNode[];
11
+ }
12
+
13
+ function getDirectoryTree(dirPath: string, depth = 0, maxDepth = 3): TreeNode[] {
14
+ const normDirPath = dirPath.replace(/\\/g, "/");
15
+ if (depth > maxDepth) return [];
16
+ try {
17
+ const items = fs.readdirSync(normDirPath, { withFileTypes: true });
18
+ const nodes: TreeNode[] = [];
19
+
20
+ for (const item of items) {
21
+ // Skip hidden folders and build folders to keep explorer performant
22
+ if (
23
+ item.name.startsWith(".") ||
24
+ item.name === "node_modules" ||
25
+ item.name === "out" ||
26
+ item.name === ".next" ||
27
+ item.name === "dist"
28
+ ) {
29
+ continue;
30
+ }
31
+
32
+ const itemPath = path.join(normDirPath, item.name).replace(/\\/g, "/");
33
+ if (item.isDirectory()) {
34
+ nodes.push({
35
+ name: item.name,
36
+ path: itemPath,
37
+ type: "directory",
38
+ children: getDirectoryTree(itemPath, depth + 1, maxDepth),
39
+ });
40
+ } else {
41
+ nodes.push({
42
+ name: item.name,
43
+ path: itemPath,
44
+ type: "file",
45
+ });
46
+ }
47
+ }
48
+
49
+ // Sort: directories first, then files alphabetically
50
+ return nodes.sort((a, b) => {
51
+ if (a.type !== b.type) {
52
+ return a.type === "directory" ? -1 : 1;
53
+ }
54
+ return a.name.localeCompare(b.name);
55
+ });
56
+ } catch (err) {
57
+ console.error(`Failed to read directory tree for ${normDirPath}:`, err);
58
+ return [];
59
+ }
60
+ }
61
+
62
+ interface FlatFileItem {
63
+ name: string;
64
+ path: string;
65
+ relativePath: string;
66
+ }
67
+
68
+ function getFlatFileList(dirPath: string, rootDir: string, list: FlatFileItem[] = [], maxFiles = 1500): FlatFileItem[] {
69
+ const normDirPath = dirPath.replace(/\\/g, "/");
70
+ const normRootDir = rootDir.replace(/\\/g, "/");
71
+ if (list.length >= maxFiles) return list;
72
+ try {
73
+ const items = fs.readdirSync(normDirPath, { withFileTypes: true });
74
+ for (const item of items) {
75
+ if (list.length >= maxFiles) break;
76
+
77
+ // Skip hidden folders and build folders
78
+ if (
79
+ item.name.startsWith(".") ||
80
+ item.name === "node_modules" ||
81
+ item.name === "out" ||
82
+ item.name === ".next" ||
83
+ item.name === "dist"
84
+ ) {
85
+ continue;
86
+ }
87
+
88
+ const itemPath = path.join(normDirPath, item.name).replace(/\\/g, "/");
89
+ if (item.isDirectory()) {
90
+ getFlatFileList(itemPath, normRootDir, list, maxFiles);
91
+ } else {
92
+ const relativePath = path.relative(normRootDir, itemPath).replace(/\\/g, "/");
93
+ list.push({
94
+ name: item.name,
95
+ path: itemPath,
96
+ relativePath: relativePath,
97
+ });
98
+ }
99
+ }
100
+ } catch (err) {
101
+ console.error(`Failed to read flat file list for ${normDirPath}:`, err);
102
+ }
103
+ return list;
104
+ }
105
+
106
+ export async function GET(request: Request) {
107
+ try {
108
+ const { searchParams } = new URL(request.url);
109
+ const action = searchParams.get("action");
110
+
111
+ if (action === "list") {
112
+ const rootPath = searchParams.get("root");
113
+ const scopedStr = searchParams.get("scoped");
114
+
115
+ const targetRoot = ((rootPath && fs.existsSync(rootPath)) ? rootPath : process.cwd()).replace(/\\/g, "/");
116
+ const workspaceTree = getDirectoryTree(targetRoot);
117
+ const scopedTrees: { name: string; path: string; tree: TreeNode[] }[] = [];
118
+
119
+ if (scopedStr) {
120
+ const scopedPaths = scopedStr.split(",");
121
+ for (const p of scopedPaths) {
122
+ const trimmed = p.trim().replace(/\\/g, "/");
123
+ if (trimmed && fs.existsSync(trimmed)) {
124
+ scopedTrees.push({
125
+ name: path.basename(trimmed),
126
+ path: trimmed,
127
+ tree: getDirectoryTree(trimmed),
128
+ });
129
+ }
130
+ }
131
+ }
132
+
133
+ return NextResponse.json({
134
+ success: true,
135
+ workspace: {
136
+ name: path.basename(targetRoot) || "Workspace",
137
+ path: targetRoot,
138
+ tree: workspaceTree,
139
+ },
140
+ scoped: scopedTrees,
141
+ });
142
+ }
143
+
144
+ if (action === "flat_list") {
145
+ const rootPath = searchParams.get("root");
146
+ const scopedStr = searchParams.get("scoped");
147
+
148
+ const targetRoot = ((rootPath && fs.existsSync(rootPath)) ? rootPath : process.cwd()).replace(/\\/g, "/");
149
+ const files: FlatFileItem[] = [];
150
+
151
+ getFlatFileList(targetRoot, targetRoot, files);
152
+
153
+ if (scopedStr) {
154
+ const scopedPaths = scopedStr.split(",");
155
+ for (const p of scopedPaths) {
156
+ const trimmed = p.trim().replace(/\\/g, "/");
157
+ if (trimmed && fs.existsSync(trimmed)) {
158
+ getFlatFileList(trimmed, path.dirname(trimmed).replace(/\\/g, "/"), files);
159
+ }
160
+ }
161
+ }
162
+
163
+ return NextResponse.json({
164
+ success: true,
165
+ files: files,
166
+ });
167
+ }
168
+
169
+ if (action === "read") {
170
+ const filePathRaw = searchParams.get("path");
171
+ if (!filePathRaw) {
172
+ return NextResponse.json({ error: "Missing required parameter 'path'" }, { status: 400 });
173
+ }
174
+
175
+ const filePath = filePathRaw.replace(/\\/g, "/");
176
+ if (!fs.existsSync(filePath)) {
177
+ return NextResponse.json({ error: "File does not exist" }, { status: 404 });
178
+ }
179
+
180
+ const content = fs.readFileSync(filePath, "utf8");
181
+ return NextResponse.json({ success: true, content });
182
+ }
183
+
184
+ return NextResponse.json({ error: "Invalid action. Must be 'list', 'flat_list' or 'read'" }, { status: 400 });
185
+ } catch (error) {
186
+ const errorMessage = error instanceof Error ? error.message : "Unknown error";
187
+ return NextResponse.json({ error: errorMessage }, { status: 500 });
188
+ }
189
+ }
190
+
191
+ export async function POST(request: Request) {
192
+ try {
193
+ const body = await request.json();
194
+ const { action, path: rawPath, content, type, oldPath: rawOldPath, newPath: rawNewPath } = body;
195
+ const filePath = rawPath ? rawPath.replace(/\\/g, "/") : undefined;
196
+ const oldPath = rawOldPath ? rawOldPath.replace(/\\/g, "/") : undefined;
197
+ const newPath = rawNewPath ? rawNewPath.replace(/\\/g, "/") : undefined;
198
+
199
+ if (action === "write") {
200
+ if (!filePath || content === undefined) {
201
+ return NextResponse.json({ error: "Missing 'path' or 'content' in body" }, { status: 400 });
202
+ }
203
+
204
+ // Ensure target directory exists
205
+ const parentDir = path.dirname(filePath).replace(/\\/g, "/");
206
+ if (!fs.existsSync(parentDir)) {
207
+ fs.mkdirSync(parentDir, { recursive: true });
208
+ }
209
+
210
+ fs.writeFileSync(filePath, content, "utf8");
211
+ return NextResponse.json({ success: true, message: "File saved successfully" });
212
+ }
213
+
214
+ if (action === "create") {
215
+ if (!filePath || !type) {
216
+ return NextResponse.json({ error: "Missing 'path' or 'type' in request body" }, { status: 400 });
217
+ }
218
+
219
+ if (fs.existsSync(filePath)) {
220
+ return NextResponse.json({ error: "Path already exists" }, { status: 400 });
221
+ }
222
+
223
+ if (type === "directory") {
224
+ fs.mkdirSync(filePath, { recursive: true });
225
+ return NextResponse.json({ success: true, message: "Directory created successfully" });
226
+ } else {
227
+ const parentDir = path.dirname(filePath).replace(/\\/g, "/");
228
+ if (!fs.existsSync(parentDir)) {
229
+ fs.mkdirSync(parentDir, { recursive: true });
230
+ }
231
+ fs.writeFileSync(filePath, "", "utf8");
232
+ return NextResponse.json({ success: true, message: "File created successfully" });
233
+ }
234
+ }
235
+
236
+ if (action === "rename") {
237
+ if (!oldPath || !newPath) {
238
+ return NextResponse.json({ error: "Missing 'oldPath' or 'newPath' in request body" }, { status: 400 });
239
+ }
240
+
241
+ if (!fs.existsSync(oldPath)) {
242
+ return NextResponse.json({ error: "Source path does not exist" }, { status: 404 });
243
+ }
244
+
245
+ if (fs.existsSync(newPath)) {
246
+ return NextResponse.json({ error: "Target path already exists" }, { status: 400 });
247
+ }
248
+
249
+ const parentDir = path.dirname(newPath).replace(/\\/g, "/");
250
+ if (!fs.existsSync(parentDir)) {
251
+ fs.mkdirSync(parentDir, { recursive: true });
252
+ }
253
+
254
+ fs.renameSync(oldPath, newPath);
255
+ return NextResponse.json({ success: true, message: "Renamed successfully" });
256
+ }
257
+
258
+ if (action === "delete") {
259
+ if (!filePath) {
260
+ return NextResponse.json({ error: "Missing 'path' in request body" }, { status: 400 });
261
+ }
262
+
263
+ if (!fs.existsSync(filePath)) {
264
+ return NextResponse.json({ error: "Path does not exist" }, { status: 404 });
265
+ }
266
+
267
+ fs.rmSync(filePath, { recursive: true, force: true });
268
+ return NextResponse.json({ success: true, message: "Deleted successfully" });
269
+ }
270
+
271
+ return NextResponse.json({ error: "Invalid action." }, { status: 400 });
272
+ } catch (error) {
273
+ const errorMessage = error instanceof Error ? error.message : "Unknown error";
274
+ return NextResponse.json({ error: errorMessage }, { status: 500 });
275
+ }
276
+ }
@@ -0,0 +1,81 @@
1
+ import { NextResponse } from "next/server";
2
+ import { promisify } from "util";
3
+ import { exec } from "child_process";
4
+ import fs from "fs";
5
+ import path from "path";
6
+
7
+ const execPromise = promisify(exec);
8
+
9
+ export async function GET(request: Request) {
10
+ try {
11
+ const { searchParams } = new URL(request.url);
12
+ const action = searchParams.get("action");
13
+ const rootPath = searchParams.get("root");
14
+ const file = searchParams.get("file");
15
+
16
+ const targetRoot = ((rootPath && fs.existsSync(rootPath)) ? rootPath : process.cwd()).replace(/\\/g, "/");
17
+
18
+ // Check if it's a git repo
19
+ try {
20
+ await execPromise("git rev-parse --is-inside-work-tree", { cwd: targetRoot });
21
+ } catch {
22
+ return NextResponse.json({ success: true, isGit: false, files: [] });
23
+ }
24
+
25
+ if (action === "status") {
26
+ const { stdout } = await execPromise("git status --porcelain", { cwd: targetRoot });
27
+ const lines = stdout.split(/\r?\n/).filter(Boolean);
28
+ const files = lines.map(line => {
29
+ // porcelain format: XY path or XY "path"
30
+ const status = line.substring(0, 2);
31
+ let relativePath = line.substring(3).trim();
32
+ // Remove quotes if git quoted the path
33
+ if (relativePath.startsWith('"') && relativePath.endsWith('"')) {
34
+ relativePath = relativePath.slice(1, -1);
35
+ }
36
+ const absolutePath = path.join(targetRoot, relativePath).replace(/\\/g, "/");
37
+ return {
38
+ status: status.trim(),
39
+ relativePath,
40
+ absolutePath,
41
+ name: path.basename(relativePath)
42
+ };
43
+ });
44
+
45
+ return NextResponse.json({ success: true, isGit: true, files });
46
+ }
47
+
48
+ if (action === "diff") {
49
+ if (!file) {
50
+ return NextResponse.json({ error: "Missing file parameter" }, { status: 400 });
51
+ }
52
+
53
+ const absolutePath = path.resolve(targetRoot, file).replace(/\\/g, "/");
54
+ if (!fs.existsSync(absolutePath)) {
55
+ return NextResponse.json({ error: "File not found" }, { status: 404 });
56
+ }
57
+
58
+ // Check status to see if it is untracked
59
+ const { stdout: statusOut } = await execPromise("git status --porcelain -- " + JSON.stringify(file), { cwd: targetRoot });
60
+ const isUntracked = statusOut.startsWith("??");
61
+
62
+ if (isUntracked) {
63
+ const fileContent = fs.readFileSync(absolutePath, "utf8");
64
+ const diffLines = fileContent.split(/\r?\n/).map(l => "+" + l).join("\n");
65
+ return NextResponse.json({ success: true, diff: diffLines });
66
+ } else {
67
+ try {
68
+ const { stdout: diffOut } = await execPromise(`git diff --no-color -- ${JSON.stringify(file)}`, { cwd: targetRoot });
69
+ return NextResponse.json({ success: true, diff: diffOut });
70
+ } catch {
71
+ return NextResponse.json({ success: true, diff: `Binary file or diff unavailable.` });
72
+ }
73
+ }
74
+ }
75
+
76
+ return NextResponse.json({ error: "Invalid action" }, { status: 400 });
77
+ } catch (error) {
78
+ const errorMessage = error instanceof Error ? error.message : "Unknown error";
79
+ return NextResponse.json({ error: errorMessage }, { status: 500 });
80
+ }
81
+ }