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,182 @@
|
|
|
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 DockerRunner extends AgentRunner {
|
|
23
|
+
id: string;
|
|
24
|
+
name: string;
|
|
25
|
+
type: 'mock' | 'claude' | 'claude-docker' | 'claude-ssh' | 'aider' | 'aider-docker' = 'claude-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, name?: string) {
|
|
34
|
+
super();
|
|
35
|
+
this.id = id;
|
|
36
|
+
this.name = name || `Docker 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
|
+
this.status = 'running';
|
|
54
|
+
this.appendLog("\x1b[1;35m==================================================\x1b[0m\r\n");
|
|
55
|
+
this.appendLog("\x1b[1;36m NEURALLOOM DOCKER SANDBOX RUNTIME BRIDGE \x1b[0m\r\n");
|
|
56
|
+
this.appendLog("\x1b[1;35m==================================================\x1b[0m\r\n");
|
|
57
|
+
this.appendLog("[System] Verifying Docker environment accessibility...\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 bootstrap PTY sandbox.\x1b[0m\r\n");
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
try {
|
|
67
|
+
if (!this.ptyModule) {
|
|
68
|
+
this.ptyModule = await import("node-pty");
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
const targetCwd = (this.workspaceRoot && fs.existsSync(this.workspaceRoot))
|
|
72
|
+
? this.workspaceRoot
|
|
73
|
+
: process.cwd();
|
|
74
|
+
|
|
75
|
+
// Check if docker executable exists by spawning `docker -v`
|
|
76
|
+
const testPty = this.ptyModule.spawn(bashPath, ["-c", "docker --version"], {
|
|
77
|
+
name: "xterm-256color",
|
|
78
|
+
cols: 80,
|
|
79
|
+
rows: 10,
|
|
80
|
+
cwd: targetCwd,
|
|
81
|
+
});
|
|
82
|
+
|
|
83
|
+
let hasDocker = false;
|
|
84
|
+
testPty.onData((data) => {
|
|
85
|
+
if (data.toLowerCase().includes("docker version")) {
|
|
86
|
+
hasDocker = true;
|
|
87
|
+
}
|
|
88
|
+
});
|
|
89
|
+
|
|
90
|
+
// Wait briefly for docker check
|
|
91
|
+
await new Promise(resolve => setTimeout(resolve, 800));
|
|
92
|
+
testPty.kill();
|
|
93
|
+
|
|
94
|
+
if (!hasDocker) {
|
|
95
|
+
this.status = 'stopped';
|
|
96
|
+
this.appendLog("\x1b[1;31m[Dependency Warning] Docker command not recognized in local PATH.\x1b[0m\r\n");
|
|
97
|
+
this.appendLog("\x1b[1;33mPlease install Docker Desktop (https://www.docker.com/products/docker-desktop) and ensure the daemon is running.\x1b[0m\r\n");
|
|
98
|
+
this.appendLog("\x1b[1;31m[System] Sandbox launch aborted.\x1b[0m\r\n");
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
// If docker is available, spawn container with mounted workspace
|
|
103
|
+
this.appendLog("[System] Docker detected. Initializing container mount...\r\n");
|
|
104
|
+
|
|
105
|
+
const mounts: string[] = [`-v "${targetCwd}:/workspace"`];
|
|
106
|
+
if (this.scopedDirs && Array.isArray(this.scopedDirs)) {
|
|
107
|
+
this.scopedDirs.forEach((dir) => {
|
|
108
|
+
if (fs.existsSync(dir)) {
|
|
109
|
+
const folderName = path.basename(dir).replace(/[^a-zA-Z0-9-_]/g, "_");
|
|
110
|
+
mounts.push(`-v "${dir}:/scoped/${folderName}"`);
|
|
111
|
+
}
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
const mountsStr = mounts.join(" ");
|
|
115
|
+
|
|
116
|
+
const dockerCmd = `docker run -it --name neural-loom-session-${this.id} --rm ${mountsStr} -w /workspace node:20-alpine npx -y @anthropic-ai/claude-code --agents-md`;
|
|
117
|
+
|
|
118
|
+
this.ptyProcess = this.ptyModule.spawn(bashPath, ["-c", dockerCmd], {
|
|
119
|
+
name: "xterm-256color",
|
|
120
|
+
cols: 120,
|
|
121
|
+
rows: 30,
|
|
122
|
+
cwd: targetCwd,
|
|
123
|
+
env: {
|
|
124
|
+
...process.env,
|
|
125
|
+
TERM: "xterm-256color",
|
|
126
|
+
COLORTERM: "truecolor",
|
|
127
|
+
},
|
|
128
|
+
});
|
|
129
|
+
|
|
130
|
+
this.ptyProcess.onData((data: string) => {
|
|
131
|
+
this.appendLog(data);
|
|
132
|
+
});
|
|
133
|
+
|
|
134
|
+
this.ptyProcess.onExit(({ exitCode, signal }: { exitCode: number; signal?: number }) => {
|
|
135
|
+
this.status = 'stopped';
|
|
136
|
+
this.appendLog(`\r\n\x1b[1;31m[System] Docker Sandbox exited (code=${exitCode}, signal=${signal}).\x1b[0m\r\n`);
|
|
137
|
+
this.ptyProcess = null;
|
|
138
|
+
});
|
|
139
|
+
|
|
140
|
+
} catch (err) {
|
|
141
|
+
const errorMessage = err instanceof Error ? err.message : "Unknown error";
|
|
142
|
+
this.status = 'stopped';
|
|
143
|
+
this.appendLog(`\x1b[1;31m[System Error] Failed to launch Docker runner: ${errorMessage}\x1b[0m\r\n`);
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
async stop(): Promise<void> {
|
|
148
|
+
this.status = 'stopped';
|
|
149
|
+
if (this.ptyProcess) {
|
|
150
|
+
try {
|
|
151
|
+
this.ptyProcess.kill();
|
|
152
|
+
} catch (err) {
|
|
153
|
+
console.error("Error killing Docker PTY process:", err);
|
|
154
|
+
}
|
|
155
|
+
this.ptyProcess = null;
|
|
156
|
+
}
|
|
157
|
+
this.appendLog("\r\n\x1b[1;31m[System] Docker container stopped and unmounted.\x1b[0m\r\n");
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
async sendInput(text: string, isRaw = false): Promise<void> {
|
|
161
|
+
if (this.status !== 'running' || !this.ptyProcess) {
|
|
162
|
+
this.appendLog(`\r\n\x1b[1;31m[Error] Cannot write: Docker container is ${this.status}.\x1b[0m\r\n`);
|
|
163
|
+
return;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
this.ptyProcess.write(isRaw ? text : text + "\r");
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
getStatus(): RunnerStatus {
|
|
170
|
+
return {
|
|
171
|
+
id: this.id,
|
|
172
|
+
name: this.name,
|
|
173
|
+
type: this.type,
|
|
174
|
+
status: this.status,
|
|
175
|
+
createdAt: this.createdAt,
|
|
176
|
+
logsCount: this.logs.length,
|
|
177
|
+
workspaceRoot: this.workspaceRoot,
|
|
178
|
+
scopedDirs: this.scopedDirs,
|
|
179
|
+
tokenUsage: this.tokenUsage
|
|
180
|
+
};
|
|
181
|
+
}
|
|
182
|
+
}
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import { AgentRunner, RunnerStatus } from "./AgentRunner";
|
|
2
|
+
import { SessionPersister } from "./SessionPersister";
|
|
3
|
+
|
|
4
|
+
export class MockRunner extends AgentRunner {
|
|
5
|
+
id: string;
|
|
6
|
+
name: string;
|
|
7
|
+
type: 'mock' | 'claude' = 'mock';
|
|
8
|
+
status: 'idle' | 'running' | 'stopped' = 'idle';
|
|
9
|
+
createdAt: string;
|
|
10
|
+
logs: string[] = [];
|
|
11
|
+
|
|
12
|
+
private intervalId: NodeJS.Timeout | null = null;
|
|
13
|
+
private mockSteps = [
|
|
14
|
+
"[NeuralLoom] Loading virtual PTY context...",
|
|
15
|
+
"[NeuralLoom] Spawning sandbox mock runtime environment...",
|
|
16
|
+
"[Mock Agent] Model online (v2.0-mock-flash). Dedicated memory allocated.",
|
|
17
|
+
"[Mock Agent] System rules parsed successfully from global context registry.",
|
|
18
|
+
"[Mock Agent] Awaiting developer commands. Type '/help' to list mock skills."
|
|
19
|
+
];
|
|
20
|
+
private stepIndex = 0;
|
|
21
|
+
|
|
22
|
+
constructor(id: string, name?: string) {
|
|
23
|
+
super();
|
|
24
|
+
this.id = id;
|
|
25
|
+
this.name = name || `Mock Session ${id.substring(0, 8)}`;
|
|
26
|
+
this.createdAt = new Date().toISOString();
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
private appendLog(line: string) {
|
|
30
|
+
this.logs.push(line);
|
|
31
|
+
this.parseTokenUsage(line);
|
|
32
|
+
this.emitOutput(line + "\r\n");
|
|
33
|
+
SessionPersister.saveSession(this);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
async start(): Promise<void> {
|
|
37
|
+
if (this.status === 'running') return;
|
|
38
|
+
this.status = 'running';
|
|
39
|
+
|
|
40
|
+
// Add banner
|
|
41
|
+
this.appendLog("\x1b[1;35m==================================================\x1b[0m");
|
|
42
|
+
this.appendLog("\x1b[1;36m NEURALLOOM SIMULATED AGENT ENVIRONMENT \x1b[0m");
|
|
43
|
+
this.appendLog("\x1b[1;35m==================================================\x1b[0m");
|
|
44
|
+
|
|
45
|
+
// Post initial log immediately
|
|
46
|
+
if (this.stepIndex < this.mockSteps.length) {
|
|
47
|
+
this.appendLog(this.mockSteps[this.stepIndex++]);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
// Schedule subsequent logs
|
|
51
|
+
this.intervalId = setInterval(() => {
|
|
52
|
+
this.tokenUsage.input += Math.floor(Math.random() * 50) + 10;
|
|
53
|
+
this.tokenUsage.output += Math.floor(Math.random() * 20) + 5;
|
|
54
|
+
this.tokenUsage.cost = (this.tokenUsage.input * 0.000003) + (this.tokenUsage.output * 0.000015);
|
|
55
|
+
|
|
56
|
+
if (this.stepIndex < this.mockSteps.length) {
|
|
57
|
+
this.appendLog(this.mockSteps[this.stepIndex++]);
|
|
58
|
+
} else {
|
|
59
|
+
// Just general ambient telemetry mock log
|
|
60
|
+
const time = new Date().toLocaleTimeString();
|
|
61
|
+
this.appendLog(`[${time}] [Telemetry] CPU utilization 1.2% | Memory 142MB | Link stable.`);
|
|
62
|
+
}
|
|
63
|
+
}, 4000);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
async stop(): Promise<void> {
|
|
67
|
+
this.status = 'stopped';
|
|
68
|
+
if (this.intervalId) {
|
|
69
|
+
clearInterval(this.intervalId);
|
|
70
|
+
this.intervalId = null;
|
|
71
|
+
}
|
|
72
|
+
this.appendLog("\x1b[1;31m[System] Process terminated. Connection closed.\x1b[0m");
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
76
|
+
async sendInput(text: string, _isRaw?: boolean): Promise<void> {
|
|
77
|
+
if (this.status !== 'running') {
|
|
78
|
+
this.appendLog(`\x1b[1;31m[Error] Cannot write input: process is ${this.status}.\x1b[0m`);
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
// Echo the command back as user prompt
|
|
83
|
+
this.appendLog(`\x1b[1;32m> ${text}\x1b[0m`);
|
|
84
|
+
|
|
85
|
+
// Simulated parser responses
|
|
86
|
+
setTimeout(() => {
|
|
87
|
+
const cleanInput = text.trim().toLowerCase();
|
|
88
|
+
if (cleanInput === '/help') {
|
|
89
|
+
this.appendLog("[Mock Agent] Available commands:");
|
|
90
|
+
this.appendLog(" /help - List available mock commands.");
|
|
91
|
+
this.appendLog(" /status - Fetch current agent diagnostic metrics.");
|
|
92
|
+
this.appendLog(" /context - View loaded staging files.");
|
|
93
|
+
this.appendLog(" /clear - Flush terminal console buffer.");
|
|
94
|
+
} else if (cleanInput === '/status') {
|
|
95
|
+
this.appendLog("[Mock Agent] Diagnostics:");
|
|
96
|
+
this.appendLog(" - Connection Type: WebSocket gateway (mock)");
|
|
97
|
+
this.appendLog(` - Active Runtime: ${this.id}`);
|
|
98
|
+
this.appendLog(" - Sandbox State: Healthy (0 warnings)");
|
|
99
|
+
} else if (cleanInput === '/context') {
|
|
100
|
+
this.appendLog("[Mock Agent] Loaded Workspace Context Files:");
|
|
101
|
+
this.appendLog(" - [Mounted] src/app/globals.css (Modified)");
|
|
102
|
+
this.appendLog(" - [Mounted] src/app/page.tsx");
|
|
103
|
+
} else if (cleanInput === '/clear') {
|
|
104
|
+
this.logs = [];
|
|
105
|
+
this.appendLog("\x1b[1;33m[Console Cleared]\x1b[0m");
|
|
106
|
+
} else {
|
|
107
|
+
this.appendLog(`[Mock Agent] Received command: "${text}". Processing...`);
|
|
108
|
+
setTimeout(() => {
|
|
109
|
+
this.appendLog(`[Mock Agent] Done. Task simulated successfully.`);
|
|
110
|
+
}, 1500);
|
|
111
|
+
}
|
|
112
|
+
}, 400);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
getStatus(): RunnerStatus {
|
|
116
|
+
return {
|
|
117
|
+
id: this.id,
|
|
118
|
+
name: this.name,
|
|
119
|
+
type: this.type,
|
|
120
|
+
status: this.status,
|
|
121
|
+
createdAt: this.createdAt,
|
|
122
|
+
logsCount: this.logs.length,
|
|
123
|
+
tokenUsage: this.tokenUsage
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
}
|
|
@@ -0,0 +1,180 @@
|
|
|
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
|
+
interface SSHConfig {
|
|
23
|
+
host: string;
|
|
24
|
+
username: string;
|
|
25
|
+
privateKeyPath?: string;
|
|
26
|
+
port?: number;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export class SSHRunner extends AgentRunner {
|
|
30
|
+
id: string;
|
|
31
|
+
name: string;
|
|
32
|
+
type: 'mock' | 'claude' | 'claude-docker' | 'claude-ssh' | 'aider' | 'aider-docker' = 'claude-ssh';
|
|
33
|
+
status: 'idle' | 'running' | 'stopped' = 'idle';
|
|
34
|
+
createdAt: string;
|
|
35
|
+
logs: string[] = [];
|
|
36
|
+
|
|
37
|
+
private ptyProcess: IPty | null = null;
|
|
38
|
+
private ptyModule: typeof import("node-pty") | null = null;
|
|
39
|
+
|
|
40
|
+
constructor(id: string, name?: string) {
|
|
41
|
+
super();
|
|
42
|
+
this.id = id;
|
|
43
|
+
this.name = name || `SSH Session ${id.substring(0, 8)}`;
|
|
44
|
+
this.createdAt = new Date().toISOString();
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
private appendLog(line: string) {
|
|
48
|
+
this.logs.push(line);
|
|
49
|
+
if (this.logs.length > 5000) {
|
|
50
|
+
this.logs.shift();
|
|
51
|
+
}
|
|
52
|
+
this.parseTokenUsage(line);
|
|
53
|
+
this.emitOutput(line);
|
|
54
|
+
SessionPersister.saveSession(this);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
async start(): Promise<void> {
|
|
58
|
+
if (this.status === 'running') return;
|
|
59
|
+
|
|
60
|
+
this.status = 'running';
|
|
61
|
+
this.appendLog("\x1b[1;35m==================================================\x1b[0m\r\n");
|
|
62
|
+
this.appendLog("\x1b[1;36m NEURALLOOM REMOTE VM (SSH) ROUTE BRIDGE \x1b[0m\r\n");
|
|
63
|
+
this.appendLog("\x1b[1;35m==================================================\x1b[0m\r\n");
|
|
64
|
+
this.appendLog("[System] Loading SSH configuration...\r\n");
|
|
65
|
+
|
|
66
|
+
const bashPath = findGitBash();
|
|
67
|
+
if (!bashPath) {
|
|
68
|
+
this.status = 'stopped';
|
|
69
|
+
this.appendLog("\x1b[1;31m[System Error] Git Bash not found. Cannot bootstrap SSH terminal.\x1b[0m\r\n");
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
const configPath = path.join(process.cwd(), ".ai", "neural-loom", "ssh.json");
|
|
74
|
+
if (!fs.existsSync(configPath)) {
|
|
75
|
+
this.status = 'stopped';
|
|
76
|
+
this.appendLog("\x1b[1;31m[Configuration Error] ssh.json not found!\x1b[0m\r\n");
|
|
77
|
+
this.appendLog(`\x1b[1;33mPlease create the SSH credentials file at: ${configPath}\x1b[0m\r\n`);
|
|
78
|
+
this.appendLog("\x1b[1;36mTemplate structure:\x1b[0m\r\n");
|
|
79
|
+
this.appendLog(
|
|
80
|
+
JSON.stringify(
|
|
81
|
+
{
|
|
82
|
+
host: "your.remote.host.com",
|
|
83
|
+
username: "dave",
|
|
84
|
+
privateKeyPath: "C:\\\\Users\\\\Dave\\\\.ssh\\\\id_rsa",
|
|
85
|
+
port: 22,
|
|
86
|
+
},
|
|
87
|
+
null,
|
|
88
|
+
2
|
|
89
|
+
).replace(/\n/g, "\r\n") + "\r\n"
|
|
90
|
+
);
|
|
91
|
+
this.appendLog("\x1b[1;31m[System] SSH startup aborted.\x1b[0m\r\n");
|
|
92
|
+
return;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
try {
|
|
96
|
+
const rawConfig = fs.readFileSync(configPath, "utf8");
|
|
97
|
+
const config: SSHConfig = JSON.parse(rawConfig);
|
|
98
|
+
|
|
99
|
+
if (!config.host || !config.username) {
|
|
100
|
+
this.status = 'stopped';
|
|
101
|
+
this.appendLog("\x1b[1;31m[System Error] Invalid ssh.json configuration. 'host' and 'username' are required.\x1b[0m\r\n");
|
|
102
|
+
return;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
if (!this.ptyModule) {
|
|
106
|
+
this.ptyModule = await import("node-pty");
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
this.appendLog(`[System] Connecting to ${config.username}@${config.host}...\r\n`);
|
|
110
|
+
|
|
111
|
+
const portOpt = config.port ? `-p ${config.port}` : "";
|
|
112
|
+
const keyOpt = config.privateKeyPath ? `-i "${config.privateKeyPath}"` : "";
|
|
113
|
+
|
|
114
|
+
const sshCmd = `ssh -t ${keyOpt} ${portOpt} ${config.username}@${config.host} "claude --agents-md"`;
|
|
115
|
+
|
|
116
|
+
this.ptyProcess = this.ptyModule.spawn(bashPath, ["-c", sshCmd], {
|
|
117
|
+
name: "xterm-256color",
|
|
118
|
+
cols: 120,
|
|
119
|
+
rows: 30,
|
|
120
|
+
cwd: process.cwd(),
|
|
121
|
+
env: {
|
|
122
|
+
...process.env,
|
|
123
|
+
TERM: "xterm-256color",
|
|
124
|
+
COLORTERM: "truecolor",
|
|
125
|
+
},
|
|
126
|
+
});
|
|
127
|
+
|
|
128
|
+
this.ptyProcess.onData((data: string) => {
|
|
129
|
+
this.appendLog(data);
|
|
130
|
+
});
|
|
131
|
+
|
|
132
|
+
this.ptyProcess.onExit(({ exitCode, signal }: { exitCode: number; signal?: number }) => {
|
|
133
|
+
this.status = 'stopped';
|
|
134
|
+
this.appendLog(`\r\n\x1b[1;31m[System] SSH Session exited (code=${exitCode}, signal=${signal}).\x1b[0m\r\n`);
|
|
135
|
+
this.ptyProcess = null;
|
|
136
|
+
});
|
|
137
|
+
|
|
138
|
+
} catch (err) {
|
|
139
|
+
const errorMessage = err instanceof Error ? err.message : "Unknown error";
|
|
140
|
+
this.status = 'stopped';
|
|
141
|
+
this.appendLog(`\x1b[1;31m[System Error] SSH connection failed: ${errorMessage}\x1b[0m\r\n`);
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
async stop(): Promise<void> {
|
|
146
|
+
this.status = 'stopped';
|
|
147
|
+
if (this.ptyProcess) {
|
|
148
|
+
try {
|
|
149
|
+
this.ptyProcess.kill();
|
|
150
|
+
} catch (err) {
|
|
151
|
+
console.error("Error killing SSH PTY process:", err);
|
|
152
|
+
}
|
|
153
|
+
this.ptyProcess = null;
|
|
154
|
+
}
|
|
155
|
+
this.appendLog("\r\n\x1b[1;31m[System] SSH Connection terminated.\x1b[0m\r\n");
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
async sendInput(text: string, isRaw = false): Promise<void> {
|
|
159
|
+
if (this.status !== 'running' || !this.ptyProcess) {
|
|
160
|
+
this.appendLog(`\r\n\x1b[1;31m[Error] Cannot write: SSH session is ${this.status}.\x1b[0m\r\n`);
|
|
161
|
+
return;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
this.ptyProcess.write(isRaw ? text : text + "\r");
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
getStatus(): RunnerStatus {
|
|
168
|
+
return {
|
|
169
|
+
id: this.id,
|
|
170
|
+
name: this.name,
|
|
171
|
+
type: this.type,
|
|
172
|
+
status: this.status,
|
|
173
|
+
createdAt: this.createdAt,
|
|
174
|
+
logsCount: this.logs.length,
|
|
175
|
+
workspaceRoot: this.workspaceRoot,
|
|
176
|
+
scopedDirs: this.scopedDirs,
|
|
177
|
+
tokenUsage: this.tokenUsage
|
|
178
|
+
};
|
|
179
|
+
}
|
|
180
|
+
}
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
import crypto from "crypto";
|
|
2
|
+
import { AgentRunner, RunnerStatus } from "./AgentRunner";
|
|
3
|
+
import { MockRunner } from "./MockRunner";
|
|
4
|
+
import { ClaudeRunner } from "./ClaudeRunner";
|
|
5
|
+
import { DockerRunner } from "./DockerRunner";
|
|
6
|
+
import { SSHRunner } from "./SSHRunner";
|
|
7
|
+
import { AiderRunner } from "./AiderRunner";
|
|
8
|
+
import { initWebSocketServer } from "./WebSocketServer";
|
|
9
|
+
import { ContextManager } from "./ContextManager";
|
|
10
|
+
import { SessionPersister } from "./SessionPersister";
|
|
11
|
+
|
|
12
|
+
export class SessionManager {
|
|
13
|
+
private static instance: SessionManager | null = null;
|
|
14
|
+
private sessions = new Map<string, AgentRunner>();
|
|
15
|
+
|
|
16
|
+
private constructor() {
|
|
17
|
+
// Bootstrap staging filesystem and slash commands
|
|
18
|
+
ContextManager.initializeStaging();
|
|
19
|
+
ContextManager.compileGlobalRules();
|
|
20
|
+
|
|
21
|
+
// Reload persisted sessions
|
|
22
|
+
try {
|
|
23
|
+
const saved = SessionPersister.loadAllSessions();
|
|
24
|
+
for (const data of saved) {
|
|
25
|
+
let runner: AgentRunner;
|
|
26
|
+
if (data.type === "mock") {
|
|
27
|
+
runner = new MockRunner(data.id, data.name);
|
|
28
|
+
} else if (data.type === "claude-docker") {
|
|
29
|
+
runner = new DockerRunner(data.id, data.name);
|
|
30
|
+
} else if (data.type === "claude-ssh") {
|
|
31
|
+
runner = new SSHRunner(data.id, data.name);
|
|
32
|
+
} else if (data.type === "aider" || data.type === "aider-docker") {
|
|
33
|
+
runner = new AiderRunner(data.id, data.type as 'aider' | 'aider-docker', data.name);
|
|
34
|
+
} else {
|
|
35
|
+
runner = new ClaudeRunner(data.id, data.name);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
runner.status = data.status;
|
|
39
|
+
runner.createdAt = data.createdAt;
|
|
40
|
+
runner.logs = data.logs;
|
|
41
|
+
runner.workspaceRoot = data.workspaceRoot;
|
|
42
|
+
runner.scopedDirs = data.scopedDirs;
|
|
43
|
+
|
|
44
|
+
// Auto-resume mock runner if running
|
|
45
|
+
if (data.type === "mock" && data.status === "running") {
|
|
46
|
+
runner.start();
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
this.sessions.set(data.id, runner);
|
|
50
|
+
}
|
|
51
|
+
} catch (err) {
|
|
52
|
+
console.error("[SessionManager] Failed to reload saved sessions:", err);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
public static getInstance(): SessionManager {
|
|
57
|
+
if (!SessionManager.instance) {
|
|
58
|
+
SessionManager.instance = new SessionManager();
|
|
59
|
+
// Initialize WebSocket gateway server on port 3001
|
|
60
|
+
initWebSocketServer(3001);
|
|
61
|
+
}
|
|
62
|
+
return SessionManager.instance;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
private generateId(): string {
|
|
66
|
+
return crypto.randomUUID();
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
public async createSession(
|
|
70
|
+
type: 'mock' | 'claude' | 'claude-docker' | 'claude-ssh' | 'aider' | 'aider-docker',
|
|
71
|
+
name?: string,
|
|
72
|
+
workspaceRoot?: string,
|
|
73
|
+
scopedDirs?: string[]
|
|
74
|
+
): Promise<AgentRunner> {
|
|
75
|
+
const id = this.generateId();
|
|
76
|
+
let runner: AgentRunner;
|
|
77
|
+
|
|
78
|
+
if (type === 'mock') {
|
|
79
|
+
runner = new MockRunner(id, name);
|
|
80
|
+
} else if (type === 'claude-docker') {
|
|
81
|
+
runner = new DockerRunner(id, name);
|
|
82
|
+
} else if (type === 'claude-ssh') {
|
|
83
|
+
runner = new SSHRunner(id, name);
|
|
84
|
+
} else if (type === 'aider' || type === 'aider-docker') {
|
|
85
|
+
runner = new AiderRunner(id, type, name);
|
|
86
|
+
} else {
|
|
87
|
+
runner = new ClaudeRunner(id, name);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
runner.workspaceRoot = workspaceRoot;
|
|
91
|
+
runner.scopedDirs = scopedDirs;
|
|
92
|
+
|
|
93
|
+
await runner.start();
|
|
94
|
+
this.sessions.set(id, runner);
|
|
95
|
+
SessionPersister.saveSession(runner);
|
|
96
|
+
return runner;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
public getSession(id: string): AgentRunner | undefined {
|
|
100
|
+
return this.sessions.get(id);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
public listSessions(): RunnerStatus[] {
|
|
104
|
+
return Array.from(this.sessions.values()).map(runner => runner.getStatus());
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
public async stopSession(id: string): Promise<boolean> {
|
|
108
|
+
const runner = this.sessions.get(id);
|
|
109
|
+
if (!runner) return false;
|
|
110
|
+
await runner.stop();
|
|
111
|
+
SessionPersister.saveSession(runner);
|
|
112
|
+
return true;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
public async deleteSession(id: string): Promise<boolean> {
|
|
116
|
+
const runner = this.sessions.get(id);
|
|
117
|
+
if (runner) {
|
|
118
|
+
await runner.stop();
|
|
119
|
+
}
|
|
120
|
+
SessionPersister.deleteSession(id);
|
|
121
|
+
return this.sessions.delete(id);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
public async injectCommand(id: string, command: string): Promise<boolean> {
|
|
125
|
+
const runner = this.sessions.get(id);
|
|
126
|
+
if (!runner || runner.status !== 'running') return false;
|
|
127
|
+
|
|
128
|
+
const root = runner.workspaceRoot || process.cwd();
|
|
129
|
+
|
|
130
|
+
if (command === '/ccc' || command === '/ccp') {
|
|
131
|
+
ContextManager.compileSessionContext(root, runner.scopedDirs);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
let finalCommand = command;
|
|
135
|
+
if (runner.type === 'aider' || runner.type === 'aider-docker') {
|
|
136
|
+
if (command === '/ccc') {
|
|
137
|
+
finalCommand = "/read .ai/neural-loom/ccontext.md";
|
|
138
|
+
} else if (command === '/ccp') {
|
|
139
|
+
finalCommand = "/read .ai/neural-loom/cprompt.md";
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
// Inject Ctrl+U to clear input, then command, then Enter (\r)
|
|
144
|
+
await runner.sendInput("\x15" + finalCommand + "\r", true);
|
|
145
|
+
return true;
|
|
146
|
+
}
|
|
147
|
+
}
|