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.
- package/.next/BUILD_ID +1 -0
- package/.next/app-path-routes-manifest.json +18 -0
- package/.next/build-manifest.json +20 -0
- package/.next/cache/.previewinfo +1 -0
- package/.next/cache/.rscinfo +1 -0
- package/.next/cache/.tsbuildinfo +1 -0
- package/.next/diagnostics/build-diagnostics.json +6 -0
- package/.next/diagnostics/framework.json +1 -0
- package/.next/diagnostics/route-bundle-stats.json +25 -0
- package/.next/export-marker.json +6 -0
- package/.next/fallback-build-manifest.json +13 -0
- package/.next/images-manifest.json +68 -0
- package/.next/next-minimal-server.js.nft.json +1 -0
- package/.next/next-server.js.nft.json +1 -0
- package/.next/package.json +1 -0
- package/.next/prerender-manifest.json +114 -0
- package/.next/required-server-files.js +332 -0
- package/.next/required-server-files.json +332 -0
- package/.next/routes-manifest.json +141 -0
- package/.next/server/app/_global-error/page/app-paths-manifest.json +3 -0
- package/.next/server/app/_global-error/page/build-manifest.json +16 -0
- package/.next/server/app/_global-error/page/next-font-manifest.json +6 -0
- package/.next/server/app/_global-error/page/react-loadable-manifest.json +1 -0
- package/.next/server/app/_global-error/page/server-reference-manifest.json +4 -0
- package/.next/server/app/_global-error/page.js +10 -0
- package/.next/server/app/_global-error/page.js.map +5 -0
- package/.next/server/app/_global-error/page.js.nft.json +1 -0
- package/.next/server/app/_global-error/page_client-reference-manifest.js +3 -0
- package/.next/server/app/_global-error.html +1 -0
- package/.next/server/app/_global-error.meta +15 -0
- package/.next/server/app/_global-error.rsc +15 -0
- package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +5 -0
- package/.next/server/app/_global-error.segments/_full.segment.rsc +15 -0
- package/.next/server/app/_global-error.segments/_head.segment.rsc +6 -0
- package/.next/server/app/_global-error.segments/_index.segment.rsc +5 -0
- package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -0
- package/.next/server/app/_not-found/page/app-paths-manifest.json +3 -0
- package/.next/server/app/_not-found/page/build-manifest.json +16 -0
- package/.next/server/app/_not-found/page/next-font-manifest.json +11 -0
- package/.next/server/app/_not-found/page/react-loadable-manifest.json +1 -0
- package/.next/server/app/_not-found/page/server-reference-manifest.json +4 -0
- package/.next/server/app/_not-found/page.js +13 -0
- package/.next/server/app/_not-found/page.js.map +5 -0
- package/.next/server/app/_not-found/page.js.nft.json +1 -0
- package/.next/server/app/_not-found/page_client-reference-manifest.js +3 -0
- package/.next/server/app/_not-found.html +1 -0
- package/.next/server/app/_not-found.meta +16 -0
- package/.next/server/app/_not-found.rsc +16 -0
- package/.next/server/app/_not-found.segments/_full.segment.rsc +16 -0
- package/.next/server/app/_not-found.segments/_head.segment.rsc +6 -0
- package/.next/server/app/_not-found.segments/_index.segment.rsc +5 -0
- package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +5 -0
- package/.next/server/app/_not-found.segments/_not-found.segment.rsc +5 -0
- package/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -0
- package/.next/server/app/api/context/aider/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/context/aider/route/build-manifest.json +9 -0
- package/.next/server/app/api/context/aider/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/context/aider/route.js +6 -0
- package/.next/server/app/api/context/aider/route.js.map +5 -0
- package/.next/server/app/api/context/aider/route.js.nft.json +1 -0
- package/.next/server/app/api/context/aider/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/context/claude/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/context/claude/route/build-manifest.json +9 -0
- package/.next/server/app/api/context/claude/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/context/claude/route.js +6 -0
- package/.next/server/app/api/context/claude/route.js.map +5 -0
- package/.next/server/app/api/context/claude/route.js.nft.json +1 -0
- package/.next/server/app/api/context/claude/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/context/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/context/route/build-manifest.json +9 -0
- package/.next/server/app/api/context/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/context/route.js +6 -0
- package/.next/server/app/api/context/route.js.map +5 -0
- package/.next/server/app/api/context/route.js.nft.json +1 -0
- package/.next/server/app/api/context/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/context/ssh/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/context/ssh/route/build-manifest.json +9 -0
- package/.next/server/app/api/context/ssh/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/context/ssh/route.js +6 -0
- package/.next/server/app/api/context/ssh/route.js.map +5 -0
- package/.next/server/app/api/context/ssh/route.js.nft.json +1 -0
- package/.next/server/app/api/context/ssh/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/files/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/files/route/build-manifest.json +9 -0
- package/.next/server/app/api/files/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/files/route.js +7 -0
- package/.next/server/app/api/files/route.js.map +5 -0
- package/.next/server/app/api/files/route.js.nft.json +1 -0
- package/.next/server/app/api/files/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/git/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/git/route/build-manifest.json +9 -0
- package/.next/server/app/api/git/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/git/route.js +6 -0
- package/.next/server/app/api/git/route.js.map +5 -0
- package/.next/server/app/api/git/route.js.nft.json +1 -0
- package/.next/server/app/api/git/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/sessions/inject/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/sessions/inject/route/build-manifest.json +9 -0
- package/.next/server/app/api/sessions/inject/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/sessions/inject/route.js +7 -0
- package/.next/server/app/api/sessions/inject/route.js.map +5 -0
- package/.next/server/app/api/sessions/inject/route.js.nft.json +1 -0
- package/.next/server/app/api/sessions/inject/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/sessions/input/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/sessions/input/route/build-manifest.json +9 -0
- package/.next/server/app/api/sessions/input/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/sessions/input/route.js +7 -0
- package/.next/server/app/api/sessions/input/route.js.map +5 -0
- package/.next/server/app/api/sessions/input/route.js.nft.json +1 -0
- package/.next/server/app/api/sessions/input/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/sessions/launch/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/sessions/launch/route/build-manifest.json +9 -0
- package/.next/server/app/api/sessions/launch/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/sessions/launch/route.js +7 -0
- package/.next/server/app/api/sessions/launch/route.js.map +5 -0
- package/.next/server/app/api/sessions/launch/route.js.nft.json +1 -0
- package/.next/server/app/api/sessions/launch/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/sessions/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/sessions/route/build-manifest.json +9 -0
- package/.next/server/app/api/sessions/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/sessions/route.js +7 -0
- package/.next/server/app/api/sessions/route.js.map +5 -0
- package/.next/server/app/api/sessions/route.js.nft.json +1 -0
- package/.next/server/app/api/sessions/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/sessions/stats/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/sessions/stats/route/build-manifest.json +9 -0
- package/.next/server/app/api/sessions/stats/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/sessions/stats/route.js +7 -0
- package/.next/server/app/api/sessions/stats/route.js.map +5 -0
- package/.next/server/app/api/sessions/stats/route.js.nft.json +1 -0
- package/.next/server/app/api/sessions/stats/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/sessions/stop/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/sessions/stop/route/build-manifest.json +9 -0
- package/.next/server/app/api/sessions/stop/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/sessions/stop/route.js +7 -0
- package/.next/server/app/api/sessions/stop/route.js.map +5 -0
- package/.next/server/app/api/sessions/stop/route.js.nft.json +1 -0
- package/.next/server/app/api/sessions/stop/route_client-reference-manifest.js +3 -0
- package/.next/server/app/favicon.ico/route/app-paths-manifest.json +3 -0
- package/.next/server/app/favicon.ico/route/build-manifest.json +9 -0
- package/.next/server/app/favicon.ico/route.js +7 -0
- package/.next/server/app/favicon.ico/route.js.map +5 -0
- package/.next/server/app/favicon.ico/route.js.nft.json +1 -0
- package/.next/server/app/favicon.ico.body +0 -0
- package/.next/server/app/favicon.ico.meta +1 -0
- package/.next/server/app/index.html +1 -0
- package/.next/server/app/index.meta +14 -0
- package/.next/server/app/index.rsc +21 -0
- package/.next/server/app/index.segments/__PAGE__.segment.rsc +10 -0
- package/.next/server/app/index.segments/_full.segment.rsc +21 -0
- package/.next/server/app/index.segments/_head.segment.rsc +6 -0
- package/.next/server/app/index.segments/_index.segment.rsc +5 -0
- package/.next/server/app/index.segments/_tree.segment.rsc +5 -0
- package/.next/server/app/page/app-paths-manifest.json +3 -0
- package/.next/server/app/page/build-manifest.json +16 -0
- package/.next/server/app/page/next-font-manifest.json +11 -0
- package/.next/server/app/page/react-loadable-manifest.json +42 -0
- package/.next/server/app/page/server-reference-manifest.json +4 -0
- package/.next/server/app/page.js +14 -0
- package/.next/server/app/page.js.map +5 -0
- package/.next/server/app/page.js.nft.json +1 -0
- package/.next/server/app/page_client-reference-manifest.js +3 -0
- package/.next/server/app-paths-manifest.json +18 -0
- package/.next/server/chunks/[externals]__0shxiss._.js +3 -0
- package/.next/server/chunks/[externals]__0shxiss._.js.map +1 -0
- package/.next/server/chunks/[externals]_next_dist_0arv.vj._.js +3 -0
- package/.next/server/chunks/[externals]_next_dist_0arv.vj._.js.map +1 -0
- package/.next/server/chunks/[externals]_node-pty_12c-8pf._.js +3 -0
- package/.next/server/chunks/[externals]_node-pty_12c-8pf._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__0-k9zyi._.js +15 -0
- package/.next/server/chunks/[root-of-the-server]__0-k9zyi._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__04kdofw._.js +15 -0
- package/.next/server/chunks/[root-of-the-server]__04kdofw._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__0c.5qbe._.js +15 -0
- package/.next/server/chunks/[root-of-the-server]__0c.5qbe._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__0d0pykb._.js +28 -0
- package/.next/server/chunks/[root-of-the-server]__0d0pykb._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__0e5cwnx._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0e5cwnx._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__0efi5cr._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0efi5cr._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__0j8-xkl._.js +13 -0
- package/.next/server/chunks/[root-of-the-server]__0j8-xkl._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__0k6w___._.js +15 -0
- package/.next/server/chunks/[root-of-the-server]__0k6w___._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__0l7c-gn._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0l7c-gn._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__0l_q72g._.js +15 -0
- package/.next/server/chunks/[root-of-the-server]__0l_q72g._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__0m7-xfc._.js +15 -0
- package/.next/server/chunks/[root-of-the-server]__0m7-xfc._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__0m_~dan._.js +15 -0
- package/.next/server/chunks/[root-of-the-server]__0m_~dan._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__0ntt3om._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0ntt3om._.js.map +1 -0
- package/.next/server/chunks/[turbopack]_runtime.js +903 -0
- package/.next/server/chunks/[turbopack]_runtime.js.map +11 -0
- package/.next/server/chunks/_next-internal_server_app_api_context_aider_route_actions_0dszia..js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_context_aider_route_actions_0dszia..js.map +1 -0
- package/.next/server/chunks/_next-internal_server_app_api_context_claude_route_actions_12srkdn.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_context_claude_route_actions_12srkdn.js.map +1 -0
- package/.next/server/chunks/_next-internal_server_app_api_context_route_actions_03ko8ta.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_context_route_actions_03ko8ta.js.map +1 -0
- package/.next/server/chunks/_next-internal_server_app_api_context_ssh_route_actions_0~0~96d.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_context_ssh_route_actions_0~0~96d.js.map +1 -0
- package/.next/server/chunks/_next-internal_server_app_api_files_route_actions_0x8kqqx.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_files_route_actions_0x8kqqx.js.map +1 -0
- package/.next/server/chunks/_next-internal_server_app_api_git_route_actions_0xetuf~.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_git_route_actions_0xetuf~.js.map +1 -0
- package/.next/server/chunks/_next-internal_server_app_api_sessions_inject_route_actions_0y2_m1_.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_sessions_inject_route_actions_0y2_m1_.js.map +1 -0
- package/.next/server/chunks/_next-internal_server_app_api_sessions_input_route_actions_032sdjp.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_sessions_input_route_actions_032sdjp.js.map +1 -0
- package/.next/server/chunks/_next-internal_server_app_api_sessions_launch_route_actions_0_qrmsm.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_sessions_launch_route_actions_0_qrmsm.js.map +1 -0
- package/.next/server/chunks/_next-internal_server_app_api_sessions_route_actions_0y1t9w0.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_sessions_route_actions_0y1t9w0.js.map +1 -0
- package/.next/server/chunks/_next-internal_server_app_api_sessions_stats_route_actions_0gc_vw-.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_sessions_stats_route_actions_0gc_vw-.js.map +1 -0
- package/.next/server/chunks/_next-internal_server_app_api_sessions_stop_route_actions_0xg1t9k.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_sessions_stop_route_actions_0xg1t9k.js.map +1 -0
- package/.next/server/chunks/_next-internal_server_app_favicon_ico_route_actions_095lj93.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_favicon_ico_route_actions_095lj93.js.map +1 -0
- package/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_0ev3h.z.js +3 -0
- package/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_0ev3h.z.js.map +1 -0
- package/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_0m.429v.js +3 -0
- package/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_0m.429v.js.map +1 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0.kd7dh._.js +33 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0.kd7dh._.js.map +1 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__089dc4i._.js +33 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__089dc4i._.js.map +1 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0_7i5h0._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0_7i5h0._.js.map +1 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0hw~y-4._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0hw~y-4._.js.map +1 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0uk0awy._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0uk0awy._.js.map +1 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0v73tbn._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0v73tbn._.js.map +1 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0~y8ue.._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0~y8ue.._.js.map +1 -0
- package/.next/server/chunks/ssr/[turbopack]_runtime.js +903 -0
- package/.next/server/chunks/ssr/[turbopack]_runtime.js.map +11 -0
- package/.next/server/chunks/ssr/_0t7oqy6._.js +3 -0
- package/.next/server/chunks/ssr/_0t7oqy6._.js.map +1 -0
- package/.next/server/chunks/ssr/_next-internal_server_app__global-error_page_actions_0k77kol.js +3 -0
- package/.next/server/chunks/ssr/_next-internal_server_app__global-error_page_actions_0k77kol.js.map +1 -0
- package/.next/server/chunks/ssr/_next-internal_server_app__not-found_page_actions_0eq97pa.js +3 -0
- package/.next/server/chunks/ssr/_next-internal_server_app__not-found_page_actions_0eq97pa.js.map +1 -0
- package/.next/server/chunks/ssr/_next-internal_server_app_page_actions_09-gtaw.js +3 -0
- package/.next/server/chunks/ssr/_next-internal_server_app_page_actions_09-gtaw.js.map +1 -0
- package/.next/server/chunks/ssr/node_modules_05l396c._.js +3 -0
- package/.next/server/chunks/ssr/node_modules_05l396c._.js.map +1 -0
- package/.next/server/chunks/ssr/node_modules_09w7yel._.js +33 -0
- package/.next/server/chunks/ssr/node_modules_09w7yel._.js.map +1 -0
- package/.next/server/chunks/ssr/node_modules_@swc_helpers_cjs__interop_require_default_cjs_11~q6fv._.js +3 -0
- package/.next/server/chunks/ssr/node_modules_@swc_helpers_cjs__interop_require_default_cjs_11~q6fv._.js.map +1 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_0ppctuh._.js +19 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_0ppctuh._.js.map +1 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_0qoh8ry._.js +6 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_0qoh8ry._.js.map +1 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_client_components_0inhx6q._.js +3 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_client_components_0inhx6q._.js.map +1 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_client_components_builtin_forbidden_0ghu-f7.js +3 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_client_components_builtin_forbidden_0ghu-f7.js.map +1 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_client_components_builtin_global-error_0lgvd_..js +3 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_client_components_builtin_global-error_0lgvd_..js.map +1 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_client_components_builtin_unauthorized_0cjv-23.js +3 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_client_components_builtin_unauthorized_0cjv-23.js.map +1 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_03-z2qq.js +4 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_03-z2qq.js.map +1 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_07vh7rm.js +4 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_07vh7rm.js.map +1 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0qp4u6g.js +4 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0qp4u6g.js.map +1 -0
- package/.next/server/functions-config-manifest.json +4 -0
- package/.next/server/interception-route-rewrite-manifest.js +1 -0
- package/.next/server/middleware-build-manifest.js +20 -0
- package/.next/server/middleware-manifest.json +6 -0
- package/.next/server/next-font-manifest.js +1 -0
- package/.next/server/next-font-manifest.json +15 -0
- package/.next/server/pages/404.html +1 -0
- package/.next/server/pages/500.html +1 -0
- package/.next/server/pages-manifest.json +4 -0
- package/.next/server/prefetch-hints.json +1 -0
- package/.next/server/server-reference-manifest.js +1 -0
- package/.next/server/server-reference-manifest.json +5 -0
- package/.next/static/chunks/03g6xpslyid3~.js +1 -0
- package/.next/static/chunks/03~yq9q893hmn.js +1 -0
- package/.next/static/chunks/07b7-dl8gh17u.js +5 -0
- package/.next/static/chunks/07lhk_q6pmm3r.js +1 -0
- package/.next/static/chunks/0dbhjjzl8qfwv.js +1 -0
- package/.next/static/chunks/0ewdhgxsa_h.q.js +1 -0
- package/.next/static/chunks/0f4at4_v-tkgj.js +1 -0
- package/.next/static/chunks/0fpki3y6aj230.js +31 -0
- package/.next/static/chunks/0ga14ztvrhau2.css +1 -0
- package/.next/static/chunks/0lnobx4eh3~-_.js +1 -0
- package/.next/static/chunks/0mej.ad_ddvf1.js +1 -0
- package/.next/static/chunks/0q4suv6uexpud.css +1 -0
- package/.next/static/chunks/0xq6bhmghl02_.js +1 -0
- package/.next/static/chunks/139c54uo1w7.4.css +3 -0
- package/.next/static/chunks/140ovxvjat1ch.js +5 -0
- package/.next/static/chunks/16w4~t4h7gk13.js +1 -0
- package/.next/static/chunks/turbopack-08fpdsd.-ns2y.js +1 -0
- package/.next/static/media/4fa387ec64143e14-s.0wkzw~je483f-.woff2 +0 -0
- package/.next/static/media/53b9e256198e5412-s.0-wfv7uh4i7h9.woff2 +0 -0
- package/.next/static/media/5ce348bf30bf5439-s.0zgw-jeven.3w.woff2 +0 -0
- package/.next/static/media/6306c77e7c8268e4-s.0rhz0arwfsn~5.woff2 +0 -0
- package/.next/static/media/7178b3e590c64307-s.0nx0ww8fni_q3.woff2 +0 -0
- package/.next/static/media/797e433ab948586e-s.p.08e28id.o-okb.woff2 +0 -0
- package/.next/static/media/7d817b4c03b0c5f1-s.0l76wvqk9d84w.woff2 +0 -0
- package/.next/static/media/8a480f0b521d4e75-s.0jzbimsg8vl84.woff2 +0 -0
- package/.next/static/media/bbc41e54d2fcbd21-s.0k4k9394f2q-k.woff2 +0 -0
- package/.next/static/media/caa3a2e1cccd8315-s.p.09~u27dqhyhd6.woff2 +0 -0
- package/.next/static/media/favicon.0x3dzn~oxb6tn.ico +0 -0
- package/.next/static/media/fef07dbb0973bf53-s.12tyk43_3sh9u.woff2 +0 -0
- package/.next/static/r-T5V6BKLiZ32Ai9Boe1d/_buildManifest.js +11 -0
- package/.next/static/r-T5V6BKLiZ32Ai9Boe1d/_clientMiddlewareManifest.js +1 -0
- package/.next/static/r-T5V6BKLiZ32Ai9Boe1d/_ssgManifest.js +1 -0
- package/.next/trace +1 -0
- package/.next/trace-build +1 -0
- package/.next/turbopack +0 -0
- package/.next/types/cache-life.d.ts +145 -0
- package/.next/types/routes.d.ts +84 -0
- package/.next/types/validator.ts +178 -0
- package/README.md +125 -0
- package/bin/cli.js +36 -0
- package/next.config.ts +7 -0
- package/package.json +40 -0
- package/public/file.svg +1 -0
- package/public/globe.svg +1 -0
- package/public/next.svg +1 -0
- package/public/vercel.svg +1 -0
- package/public/window.svg +1 -0
- package/src/app/api/context/aider/route.ts +113 -0
- package/src/app/api/context/claude/route.ts +64 -0
- package/src/app/api/context/route.ts +37 -0
- package/src/app/api/context/ssh/route.ts +88 -0
- package/src/app/api/files/route.ts +276 -0
- package/src/app/api/git/route.ts +81 -0
- package/src/app/api/sessions/inject/route.ts +21 -0
- package/src/app/api/sessions/input/route.ts +30 -0
- package/src/app/api/sessions/launch/route.ts +25 -0
- package/src/app/api/sessions/route.ts +27 -0
- package/src/app/api/sessions/stats/route.ts +76 -0
- package/src/app/api/sessions/stop/route.ts +26 -0
- package/src/app/components/AiderWizard.tsx +412 -0
- package/src/app/components/ClaudeWizard.tsx +335 -0
- package/src/app/components/ContextEditor.tsx +169 -0
- package/src/app/components/IdeLayout.tsx +2095 -0
- package/src/app/components/SshWizard.tsx +379 -0
- package/src/app/components/TerminalConsole.tsx +228 -0
- package/src/app/favicon.ico +0 -0
- package/src/app/globals.css +81 -0
- package/src/app/layout.tsx +30 -0
- package/src/app/page.module.css +330 -0
- package/src/app/page.tsx +581 -0
- package/src/lib/agents/AgentRunner.ts +86 -0
- package/src/lib/agents/AiderRunner.ts +261 -0
- package/src/lib/agents/ClaudeRunner.ts +148 -0
- package/src/lib/agents/ContextManager.ts +142 -0
- package/src/lib/agents/DockerRunner.ts +182 -0
- package/src/lib/agents/MockRunner.ts +126 -0
- package/src/lib/agents/SSHRunner.ts +180 -0
- package/src/lib/agents/SessionManager.ts +147 -0
- package/src/lib/agents/SessionPersister.ts +85 -0
- package/src/lib/agents/WebSocketServer.ts +118 -0
- package/tsconfig.json +34 -0
|
@@ -0,0 +1,261 @@
|
|
|
1
|
+
import fs from "fs";
|
|
2
|
+
import path from "path";
|
|
3
|
+
import type { IPty } from "node-pty";
|
|
4
|
+
import { AgentRunner, RunnerStatus } from "./AgentRunner";
|
|
5
|
+
import { SessionPersister } from "./SessionPersister";
|
|
6
|
+
|
|
7
|
+
function findGitBash(): string | null {
|
|
8
|
+
const pf = process.env.PROGRAMFILES || "C:\\Program Files";
|
|
9
|
+
const pf86 = process.env["PROGRAMFILES(X86)"] || "C:\\Program Files (x86)";
|
|
10
|
+
const local = process.env.LOCALAPPDATA || "";
|
|
11
|
+
|
|
12
|
+
const candidates: string[] = [
|
|
13
|
+
process.env.WINGMAN_BASH_PATH,
|
|
14
|
+
path.join(pf, "Git", "bin", "bash.exe"),
|
|
15
|
+
path.join(pf86, "Git", "bin", "bash.exe"),
|
|
16
|
+
local ? path.join(local, "Programs", "Git", "bin", "bash.exe") : "",
|
|
17
|
+
].filter((p): p is string => typeof p === "string" && p !== "");
|
|
18
|
+
|
|
19
|
+
return candidates.find(p => fs.existsSync(p)) || null;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export class AiderRunner extends AgentRunner {
|
|
23
|
+
id: string;
|
|
24
|
+
name: string;
|
|
25
|
+
type: 'aider' | 'aider-docker';
|
|
26
|
+
status: 'idle' | 'running' | 'stopped' = 'idle';
|
|
27
|
+
createdAt: string;
|
|
28
|
+
logs: string[] = [];
|
|
29
|
+
|
|
30
|
+
private ptyProcess: IPty | null = null;
|
|
31
|
+
private ptyModule: typeof import("node-pty") | null = null;
|
|
32
|
+
|
|
33
|
+
constructor(id: string, type: 'aider' | 'aider-docker', name?: string) {
|
|
34
|
+
super();
|
|
35
|
+
this.id = id;
|
|
36
|
+
this.type = type;
|
|
37
|
+
this.name = name || (type === 'aider-docker' ? `Aider Docker ${id.substring(0, 8)}` : `Aider Session ${id.substring(0, 8)}`);
|
|
38
|
+
this.createdAt = new Date().toISOString();
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
private appendLog(line: string) {
|
|
42
|
+
this.logs.push(line);
|
|
43
|
+
if (this.logs.length > 5000) {
|
|
44
|
+
this.logs.shift();
|
|
45
|
+
}
|
|
46
|
+
this.parseTokenUsage(line);
|
|
47
|
+
this.emitOutput(line);
|
|
48
|
+
SessionPersister.saveSession(this);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
async start(): Promise<void> {
|
|
52
|
+
if (this.status === 'running') return;
|
|
53
|
+
|
|
54
|
+
this.status = 'running';
|
|
55
|
+
this.appendLog("\x1b[1;35m==================================================\x1b[0m\r\n");
|
|
56
|
+
this.appendLog(`\x1b[1;36m NEURALLOOM AIDER AGENT ROUTE (${this.type.toUpperCase()}) \x1b[0m\r\n`);
|
|
57
|
+
this.appendLog("\x1b[1;35m==================================================\x1b[0m\r\n");
|
|
58
|
+
|
|
59
|
+
const bashPath = findGitBash();
|
|
60
|
+
if (!bashPath) {
|
|
61
|
+
this.status = 'stopped';
|
|
62
|
+
this.appendLog("\x1b[1;31m[System Error] Git Bash not found. Cannot spawn terminal.\x1b[0m\r\n");
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
try {
|
|
67
|
+
if (!this.ptyModule) {
|
|
68
|
+
this.ptyModule = await import("node-pty");
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
// Load Aider configuration
|
|
72
|
+
let aiderConfig = {
|
|
73
|
+
openaiApiKey: "",
|
|
74
|
+
anthropicApiKey: "",
|
|
75
|
+
geminiApiKey: "",
|
|
76
|
+
model: "claude-3-5-sonnet",
|
|
77
|
+
extraFlags: "",
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
const aiderConfigPath = path.join(process.cwd(), ".ai", "neural-loom", "aider.json");
|
|
81
|
+
if (fs.existsSync(aiderConfigPath)) {
|
|
82
|
+
try {
|
|
83
|
+
aiderConfig = JSON.parse(fs.readFileSync(aiderConfigPath, "utf8"));
|
|
84
|
+
} catch (err) {
|
|
85
|
+
console.error("Failed to parse Aider configuration:", err);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
// Setup process environment with injected keys
|
|
90
|
+
const customEnv = {
|
|
91
|
+
...process.env,
|
|
92
|
+
TERM: "xterm-256color",
|
|
93
|
+
COLORTERM: "truecolor",
|
|
94
|
+
} as Record<string, string>;
|
|
95
|
+
|
|
96
|
+
if (aiderConfig.openaiApiKey) {
|
|
97
|
+
customEnv.OPENAI_API_KEY = aiderConfig.openaiApiKey;
|
|
98
|
+
}
|
|
99
|
+
if (aiderConfig.anthropicApiKey) {
|
|
100
|
+
customEnv.ANTHROPIC_API_KEY = aiderConfig.anthropicApiKey;
|
|
101
|
+
}
|
|
102
|
+
if (aiderConfig.geminiApiKey) {
|
|
103
|
+
customEnv.GEMINI_API_KEY = aiderConfig.geminiApiKey;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
const modelFlag = aiderConfig.model ? `--model ${aiderConfig.model}` : "";
|
|
107
|
+
const extraFlags = aiderConfig.extraFlags || "";
|
|
108
|
+
|
|
109
|
+
const targetCwd = (this.workspaceRoot && fs.existsSync(this.workspaceRoot))
|
|
110
|
+
? this.workspaceRoot
|
|
111
|
+
: process.cwd();
|
|
112
|
+
|
|
113
|
+
if (this.type === "aider-docker") {
|
|
114
|
+
this.appendLog("[System] Verifying Docker environment accessibility...\r\n");
|
|
115
|
+
|
|
116
|
+
// Check if docker executable exists by spawning `docker -v`
|
|
117
|
+
const testPty = this.ptyModule.spawn(bashPath, ["-c", "docker --version"], {
|
|
118
|
+
name: "xterm-256color",
|
|
119
|
+
cols: 80,
|
|
120
|
+
rows: 10,
|
|
121
|
+
cwd: targetCwd,
|
|
122
|
+
});
|
|
123
|
+
|
|
124
|
+
let hasDocker = false;
|
|
125
|
+
testPty.onData((data) => {
|
|
126
|
+
if (data.toLowerCase().includes("docker version")) {
|
|
127
|
+
hasDocker = true;
|
|
128
|
+
}
|
|
129
|
+
});
|
|
130
|
+
|
|
131
|
+
await new Promise(resolve => setTimeout(resolve, 800));
|
|
132
|
+
testPty.kill();
|
|
133
|
+
|
|
134
|
+
if (!hasDocker) {
|
|
135
|
+
this.status = 'stopped';
|
|
136
|
+
this.appendLog("\x1b[1;31m[Dependency Warning] Docker command not recognized in local PATH.\x1b[0m\r\n");
|
|
137
|
+
this.appendLog("\x1b[1;33mPlease install Docker Desktop and ensure the daemon is running.\x1b[0m\r\n");
|
|
138
|
+
return;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
this.appendLog("[System] Spawning Aider container environment...\r\n");
|
|
142
|
+
const envFlags: string[] = [];
|
|
143
|
+
if (aiderConfig.openaiApiKey) envFlags.push("-e OPENAI_API_KEY");
|
|
144
|
+
if (aiderConfig.anthropicApiKey) envFlags.push("-e ANTHROPIC_API_KEY");
|
|
145
|
+
if (aiderConfig.geminiApiKey) envFlags.push("-e GEMINI_API_KEY");
|
|
146
|
+
const envFlagsStr = envFlags.join(" ");
|
|
147
|
+
|
|
148
|
+
// Volume mounts for primary workspace and each scoped directory
|
|
149
|
+
const mounts: string[] = [`-v "${targetCwd}:/workspace"`];
|
|
150
|
+
if (this.scopedDirs && Array.isArray(this.scopedDirs)) {
|
|
151
|
+
this.scopedDirs.forEach((dir) => {
|
|
152
|
+
if (fs.existsSync(dir)) {
|
|
153
|
+
const folderName = path.basename(dir).replace(/[^a-zA-Z0-9-_]/g, "_");
|
|
154
|
+
mounts.push(`-v "${dir}:/scoped/${folderName}"`);
|
|
155
|
+
}
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
const mountsStr = mounts.join(" ");
|
|
159
|
+
|
|
160
|
+
const dockerCmd = `docker run -it --name neural-loom-session-${this.id} --rm ${mountsStr} -w /workspace ${envFlagsStr} paulgauthier/aider ${modelFlag} ${extraFlags}`.trim();
|
|
161
|
+
|
|
162
|
+
this.ptyProcess = this.ptyModule.spawn(bashPath, ["-c", dockerCmd], {
|
|
163
|
+
name: "xterm-256color",
|
|
164
|
+
cols: 120,
|
|
165
|
+
rows: 30,
|
|
166
|
+
cwd: targetCwd,
|
|
167
|
+
env: customEnv,
|
|
168
|
+
});
|
|
169
|
+
} else {
|
|
170
|
+
this.appendLog("[System] Verifying 'aider' command availability in local PATH...\r\n");
|
|
171
|
+
|
|
172
|
+
// Check if aider executable exists by running `aider --version`
|
|
173
|
+
const testPty = this.ptyModule.spawn(bashPath, ["-c", "aider --version"], {
|
|
174
|
+
name: "xterm-256color",
|
|
175
|
+
cols: 80,
|
|
176
|
+
rows: 10,
|
|
177
|
+
cwd: targetCwd,
|
|
178
|
+
});
|
|
179
|
+
|
|
180
|
+
let hasAider = false;
|
|
181
|
+
testPty.onData((data) => {
|
|
182
|
+
if (data.toLowerCase().includes("aider")) {
|
|
183
|
+
hasAider = true;
|
|
184
|
+
}
|
|
185
|
+
});
|
|
186
|
+
|
|
187
|
+
await new Promise(resolve => setTimeout(resolve, 800));
|
|
188
|
+
testPty.kill();
|
|
189
|
+
|
|
190
|
+
if (!hasAider) {
|
|
191
|
+
this.status = 'stopped';
|
|
192
|
+
this.appendLog("\x1b[1;31m[Dependency Warning] 'aider' executable not found on local PATH.\x1b[0m\r\n");
|
|
193
|
+
this.appendLog("\x1b[1;33mPlease install Aider globally via pip:\r\n pip install aider-chat\x1b[0m\r\n");
|
|
194
|
+
return;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
this.appendLog("[System] Spawning local Aider CLI...\r\n");
|
|
198
|
+
const localCmd = `aider ${modelFlag} ${extraFlags}`.trim();
|
|
199
|
+
|
|
200
|
+
this.ptyProcess = this.ptyModule.spawn(bashPath, ["-c", localCmd], {
|
|
201
|
+
name: "xterm-256color",
|
|
202
|
+
cols: 120,
|
|
203
|
+
rows: 30,
|
|
204
|
+
cwd: targetCwd,
|
|
205
|
+
env: customEnv,
|
|
206
|
+
});
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
this.ptyProcess.onData((data: string) => {
|
|
210
|
+
this.appendLog(data);
|
|
211
|
+
});
|
|
212
|
+
|
|
213
|
+
this.ptyProcess.onExit(({ exitCode, signal }: { exitCode: number; signal?: number }) => {
|
|
214
|
+
this.status = 'stopped';
|
|
215
|
+
this.appendLog(`\r\n\x1b[1;31m[System] Aider process exited (code=${exitCode}, signal=${signal}).\x1b[0m\r\n`);
|
|
216
|
+
this.ptyProcess = null;
|
|
217
|
+
});
|
|
218
|
+
|
|
219
|
+
} catch (err) {
|
|
220
|
+
const errorMessage = err instanceof Error ? err.message : "Unknown error";
|
|
221
|
+
this.status = 'stopped';
|
|
222
|
+
this.appendLog(`\x1b[1;31m[System Error] Failed to launch Aider: ${errorMessage}\x1b[0m\r\n`);
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
async stop(): Promise<void> {
|
|
227
|
+
this.status = 'stopped';
|
|
228
|
+
if (this.ptyProcess) {
|
|
229
|
+
try {
|
|
230
|
+
this.ptyProcess.kill();
|
|
231
|
+
} catch (err) {
|
|
232
|
+
console.error("Error killing Aider PTY process:", err);
|
|
233
|
+
}
|
|
234
|
+
this.ptyProcess = null;
|
|
235
|
+
}
|
|
236
|
+
this.appendLog("\r\n\x1b[1;31m[System] Aider session terminated.\x1b[0m\r\n");
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
async sendInput(text: string, isRaw = false): Promise<void> {
|
|
240
|
+
if (this.status !== 'running' || !this.ptyProcess) {
|
|
241
|
+
this.appendLog(`\r\n\x1b[1;31m[Error] Cannot write: Aider process is ${this.status}.\x1b[0m\r\n`);
|
|
242
|
+
return;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
this.ptyProcess.write(isRaw ? text : text + "\r");
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
getStatus(): RunnerStatus {
|
|
249
|
+
return {
|
|
250
|
+
id: this.id,
|
|
251
|
+
name: this.name,
|
|
252
|
+
type: this.type,
|
|
253
|
+
status: this.status,
|
|
254
|
+
createdAt: this.createdAt,
|
|
255
|
+
logsCount: this.logs.length,
|
|
256
|
+
workspaceRoot: this.workspaceRoot,
|
|
257
|
+
scopedDirs: this.scopedDirs,
|
|
258
|
+
tokenUsage: this.tokenUsage
|
|
259
|
+
};
|
|
260
|
+
}
|
|
261
|
+
}
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
import fs from "fs";
|
|
2
|
+
import path from "path";
|
|
3
|
+
import type { IPty } from "node-pty";
|
|
4
|
+
import { AgentRunner, RunnerStatus } from "./AgentRunner";
|
|
5
|
+
import { SessionPersister } from "./SessionPersister";
|
|
6
|
+
|
|
7
|
+
function findGitBash(): string | null {
|
|
8
|
+
const pf = process.env.PROGRAMFILES || "C:\\Program Files";
|
|
9
|
+
const pf86 = process.env["PROGRAMFILES(X86)"] || "C:\\Program Files (x86)";
|
|
10
|
+
const local = process.env.LOCALAPPDATA || "";
|
|
11
|
+
|
|
12
|
+
const candidates: string[] = [
|
|
13
|
+
process.env.WINGMAN_BASH_PATH,
|
|
14
|
+
path.join(pf, "Git", "bin", "bash.exe"),
|
|
15
|
+
path.join(pf86, "Git", "bin", "bash.exe"),
|
|
16
|
+
local ? path.join(local, "Programs", "Git", "bin", "bash.exe") : "",
|
|
17
|
+
].filter((p): p is string => typeof p === "string" && p !== "");
|
|
18
|
+
|
|
19
|
+
return candidates.find(p => fs.existsSync(p)) || null;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export class ClaudeRunner extends AgentRunner {
|
|
23
|
+
id: string;
|
|
24
|
+
name: string;
|
|
25
|
+
type: 'mock' | 'claude' = 'claude';
|
|
26
|
+
status: 'idle' | 'running' | 'stopped' = 'idle';
|
|
27
|
+
createdAt: string;
|
|
28
|
+
logs: string[] = [];
|
|
29
|
+
|
|
30
|
+
private ptyProcess: IPty | null = null;
|
|
31
|
+
private ptyModule: typeof import("node-pty") | null = null;
|
|
32
|
+
|
|
33
|
+
constructor(id: string, name?: string) {
|
|
34
|
+
super();
|
|
35
|
+
this.id = id;
|
|
36
|
+
this.name = name || `Claude Session ${id.substring(0, 8)}`;
|
|
37
|
+
this.createdAt = new Date().toISOString();
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
private appendLog(line: string) {
|
|
41
|
+
this.logs.push(line);
|
|
42
|
+
if (this.logs.length > 5000) {
|
|
43
|
+
this.logs.shift();
|
|
44
|
+
}
|
|
45
|
+
this.parseTokenUsage(line);
|
|
46
|
+
this.emitOutput(line);
|
|
47
|
+
SessionPersister.saveSession(this);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
async start(): Promise<void> {
|
|
51
|
+
if (this.status === 'running') return;
|
|
52
|
+
|
|
53
|
+
// Detect Git Bash on Windows
|
|
54
|
+
const bashPath = findGitBash();
|
|
55
|
+
if (!bashPath) {
|
|
56
|
+
this.status = 'stopped';
|
|
57
|
+
this.appendLog("\x1b[1;31m[System Error] Git Bash not found. Please install Git for Windows.\x1b[0m\r\n");
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
try {
|
|
62
|
+
// Dynamic import to prevent bundler SSR/Turbopack errors on server start
|
|
63
|
+
if (!this.ptyModule) {
|
|
64
|
+
this.ptyModule = await import("node-pty");
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
this.status = 'running';
|
|
68
|
+
this.appendLog("\x1b[1;35m==================================================\x1b[0m\r\n");
|
|
69
|
+
this.appendLog("\x1b[1;36m NEURALLOOM ACTIVE CLAUDE TERMINAL ROUTE \x1b[0m\r\n");
|
|
70
|
+
this.appendLog("\x1b[1;35m==================================================\x1b[0m\r\n");
|
|
71
|
+
this.appendLog(`[System] Spawning Claude Code CLI process using Git Bash...\r\n`);
|
|
72
|
+
|
|
73
|
+
const targetCwd = (this.workspaceRoot && fs.existsSync(this.workspaceRoot))
|
|
74
|
+
? this.workspaceRoot
|
|
75
|
+
: process.cwd();
|
|
76
|
+
|
|
77
|
+
// Spawn bash and run 'claude' command
|
|
78
|
+
this.ptyProcess = this.ptyModule.spawn(bashPath, ["-c", "claude --agents-md"], {
|
|
79
|
+
name: "xterm-256color",
|
|
80
|
+
cols: 120,
|
|
81
|
+
rows: 30,
|
|
82
|
+
cwd: targetCwd,
|
|
83
|
+
env: {
|
|
84
|
+
...process.env,
|
|
85
|
+
TERM: "xterm-256color",
|
|
86
|
+
COLORTERM: "truecolor",
|
|
87
|
+
// Inject custom path just in case child processes need Visual Studio Node
|
|
88
|
+
PATH: "C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\MSBuild\\Microsoft\\VisualStudio\\NodeJs;" + process.env.PATH
|
|
89
|
+
},
|
|
90
|
+
});
|
|
91
|
+
|
|
92
|
+
// Capture output
|
|
93
|
+
this.ptyProcess.onData((data: string) => {
|
|
94
|
+
this.appendLog(data);
|
|
95
|
+
});
|
|
96
|
+
|
|
97
|
+
// Capture process exit
|
|
98
|
+
this.ptyProcess.onExit(({ exitCode, signal }: { exitCode: number; signal?: number }) => {
|
|
99
|
+
this.status = 'stopped';
|
|
100
|
+
this.appendLog(`\r\n\x1b[1;31m[System] Claude Code PTY process exited (code=${exitCode}, signal=${signal}).\x1b[0m\r\n`);
|
|
101
|
+
this.ptyProcess = null;
|
|
102
|
+
});
|
|
103
|
+
|
|
104
|
+
} catch (err) {
|
|
105
|
+
const errorMessage = err instanceof Error ? err.message : "Unknown error";
|
|
106
|
+
this.status = 'stopped';
|
|
107
|
+
this.appendLog(`\x1b[1;31m[System Error] Failed to initialize node-pty runner: ${errorMessage}\x1b[0m\r\n`);
|
|
108
|
+
console.error("Failed to start Claude PTY runner:", err);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
async stop(): Promise<void> {
|
|
113
|
+
this.status = 'stopped';
|
|
114
|
+
if (this.ptyProcess) {
|
|
115
|
+
try {
|
|
116
|
+
this.ptyProcess.kill();
|
|
117
|
+
} catch (err) {
|
|
118
|
+
console.error("Error killing PTY process:", err);
|
|
119
|
+
}
|
|
120
|
+
this.ptyProcess = null;
|
|
121
|
+
}
|
|
122
|
+
this.appendLog("\r\n\x1b[1;31m[System] Terminal bridge terminated.\x1b[0m\r\n");
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
async sendInput(text: string, isRaw = false): Promise<void> {
|
|
126
|
+
if (this.status !== 'running' || !this.ptyProcess) {
|
|
127
|
+
this.appendLog(`\r\n\x1b[1;31m[Error] Cannot write: session process is ${this.status}.\x1b[0m\r\n`);
|
|
128
|
+
return;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
// PTY processes require carriage return (\r) to execute the command line
|
|
132
|
+
this.ptyProcess.write(isRaw ? text : text + "\r");
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
getStatus(): RunnerStatus {
|
|
136
|
+
return {
|
|
137
|
+
id: this.id,
|
|
138
|
+
name: this.name,
|
|
139
|
+
type: this.type,
|
|
140
|
+
status: this.status,
|
|
141
|
+
createdAt: this.createdAt,
|
|
142
|
+
logsCount: this.logs.length,
|
|
143
|
+
workspaceRoot: this.workspaceRoot,
|
|
144
|
+
scopedDirs: this.scopedDirs,
|
|
145
|
+
tokenUsage: this.tokenUsage
|
|
146
|
+
};
|
|
147
|
+
}
|
|
148
|
+
}
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
import fs from "fs";
|
|
2
|
+
import path from "path";
|
|
3
|
+
|
|
4
|
+
export class ContextManager {
|
|
5
|
+
private static workspaceRoot = process.cwd();
|
|
6
|
+
|
|
7
|
+
private static ensureDirs(root: string) {
|
|
8
|
+
const aiDir = path.join(root, ".ai", "neural-loom");
|
|
9
|
+
if (!fs.existsSync(aiDir)) {
|
|
10
|
+
fs.mkdirSync(aiDir, { recursive: true });
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
const commandDir = path.join(root, ".claude", "commands");
|
|
14
|
+
if (!fs.existsSync(commandDir)) {
|
|
15
|
+
fs.mkdirSync(commandDir, { recursive: true });
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
public static initializeStaging(root: string = process.cwd()) {
|
|
20
|
+
this.ensureDirs(root);
|
|
21
|
+
|
|
22
|
+
// Create /ccp.md custom slash command file
|
|
23
|
+
const ccpPath = path.join(root, ".claude", "commands", "ccp.md");
|
|
24
|
+
if (!fs.existsSync(ccpPath)) {
|
|
25
|
+
fs.writeFileSync(
|
|
26
|
+
ccpPath,
|
|
27
|
+
"Read the prompt from .ai/neural-loom/cprompt.md and execute it. This is a staged prompt from the NeuralLoom UI. Treat the contents as user instructions.\n"
|
|
28
|
+
);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
// Create /ccc.md custom slash command file
|
|
32
|
+
const cccPath = path.join(root, ".claude", "commands", "ccc.md");
|
|
33
|
+
if (!fs.existsSync(cccPath)) {
|
|
34
|
+
fs.writeFileSync(
|
|
35
|
+
cccPath,
|
|
36
|
+
"Read the context from .ai/neural-loom/ccontext.md. This is persistent context from the NeuralLoom UI. Absorb it as background information for this session. Acknowledge briefly what you received.\n"
|
|
37
|
+
);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
public static updatePrompt(promptText: string, root: string = process.cwd()) {
|
|
42
|
+
this.ensureDirs(root);
|
|
43
|
+
const promptFile = path.join(root, ".ai", "neural-loom", "cprompt.md");
|
|
44
|
+
fs.writeFileSync(promptFile, promptText);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
public static updateContext(contextText: string, root: string = process.cwd()) {
|
|
48
|
+
this.ensureDirs(root);
|
|
49
|
+
const contextFile = path.join(root, ".ai", "neural-loom", "ccontext.md");
|
|
50
|
+
fs.writeFileSync(contextFile, contextText);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
public static updateRules(rulesText: string, root: string = process.cwd()) {
|
|
54
|
+
this.ensureDirs(root);
|
|
55
|
+
const agentsMdPath = path.join(root, "AGENTS.md");
|
|
56
|
+
fs.writeFileSync(agentsMdPath, rulesText, "utf8");
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
public static loadPrompt(root: string = process.cwd()): string {
|
|
60
|
+
const promptFile = path.join(root, ".ai", "neural-loom", "cprompt.md");
|
|
61
|
+
return fs.existsSync(promptFile) ? fs.readFileSync(promptFile, "utf8") : "";
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
public static loadRules(root: string = process.cwd()): string {
|
|
65
|
+
const agentsMdPath = path.join(root, "AGENTS.md");
|
|
66
|
+
return fs.existsSync(agentsMdPath) ? fs.readFileSync(agentsMdPath, "utf8") : "";
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
public static compileGlobalRules() {
|
|
70
|
+
this.compileSessionContext();
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
public static compileSessionContext(root: string = process.cwd(), scopedDirs?: string[]) {
|
|
74
|
+
this.ensureDirs(root);
|
|
75
|
+
this.initializeStaging(root);
|
|
76
|
+
|
|
77
|
+
// Check if AGENTS.md rules template exists
|
|
78
|
+
const agentsMdPath = path.join(root, "AGENTS.md");
|
|
79
|
+
let agentsRules = "";
|
|
80
|
+
if (fs.existsSync(agentsMdPath)) {
|
|
81
|
+
agentsRules = fs.readFileSync(agentsMdPath, "utf8");
|
|
82
|
+
} else {
|
|
83
|
+
// Try fallback from global
|
|
84
|
+
const fallbackPath = path.join(this.workspaceRoot, "AGENTS.md");
|
|
85
|
+
if (fs.existsSync(fallbackPath)) {
|
|
86
|
+
agentsRules = fs.readFileSync(fallbackPath, "utf8");
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
// Generate maps
|
|
91
|
+
let maps = `## Workspace Root Map (${root}):\n${this.generateProjectMapFor(root)}`;
|
|
92
|
+
|
|
93
|
+
if (scopedDirs && Array.isArray(scopedDirs)) {
|
|
94
|
+
scopedDirs.forEach((dir) => {
|
|
95
|
+
if (fs.existsSync(dir)) {
|
|
96
|
+
maps += `\n\n## Scoped Directory Map (${dir}):\n${this.generateProjectMapFor(dir)}`;
|
|
97
|
+
}
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
// Combine rules and folder map
|
|
102
|
+
const compiledContext = `# System Rules & Guidelines\n\n${agentsRules}\n\n# Project File Hierarchy Map\n\n${maps}`;
|
|
103
|
+
this.updateContext(compiledContext, root);
|
|
104
|
+
|
|
105
|
+
// Write a default empty prompt staging file if missing
|
|
106
|
+
const promptFile = path.join(root, ".ai", "neural-loom", "cprompt.md");
|
|
107
|
+
if (!fs.existsSync(promptFile)) {
|
|
108
|
+
fs.writeFileSync(promptFile, "Hello! Please review the project context (/ccc) and check for any tasks to execute.");
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
private static generateProjectMapFor(targetDir: string): string {
|
|
113
|
+
try {
|
|
114
|
+
const walk = (dir: string, depth = 0): string => {
|
|
115
|
+
if (depth > 2) return ""; // Keep map depth concise to fit tokens
|
|
116
|
+
let result = "";
|
|
117
|
+
const files = fs.readdirSync(dir, { withFileTypes: true });
|
|
118
|
+
for (const file of files) {
|
|
119
|
+
if (
|
|
120
|
+
file.name.startsWith(".") ||
|
|
121
|
+
file.name === "node_modules" ||
|
|
122
|
+
file.name === "out" ||
|
|
123
|
+
file.name === ".next"
|
|
124
|
+
) {
|
|
125
|
+
continue;
|
|
126
|
+
}
|
|
127
|
+
const indent = " ".repeat(depth);
|
|
128
|
+
if (file.isDirectory()) {
|
|
129
|
+
result += `${indent}- [Dir] ${file.name}/\n`;
|
|
130
|
+
result += walk(path.join(dir, file.name), depth + 1);
|
|
131
|
+
} else {
|
|
132
|
+
result += `${indent}- [File] ${file.name}\n`;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
return result;
|
|
136
|
+
};
|
|
137
|
+
return walk(targetDir);
|
|
138
|
+
} catch (err) {
|
|
139
|
+
return "Error generating project map: " + (err instanceof Error ? err.message : String(err));
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
}
|