@made-by-moonlight/athene-web 0.9.2
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-build-manifest.json +448 -0
- package/.next/app-path-routes-manifest.json +47 -0
- package/.next/build-manifest.json +33 -0
- package/.next/export-marker.json +6 -0
- package/.next/images-manifest.json +58 -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 +172 -0
- package/.next/react-loadable-manifest.json +61 -0
- package/.next/required-server-files.json +335 -0
- package/.next/routes-manifest.json +234 -0
- package/.next/server/app/_not-found/page.js +2 -0
- package/.next/server/app/_not-found/page.js.nft.json +1 -0
- package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -0
- package/.next/server/app/_not-found.html +1 -0
- package/.next/server/app/_not-found.meta +8 -0
- package/.next/server/app/_not-found.rsc +24 -0
- package/.next/server/app/api/backlog/route.js +1 -0
- package/.next/server/app/api/backlog/route.js.nft.json +1 -0
- package/.next/server/app/api/backlog/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/browse-directory/route.js +1 -0
- package/.next/server/app/api/browse-directory/route.js.nft.json +1 -0
- package/.next/server/app/api/browse-directory/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/filesystem/browse/route.js +1 -0
- package/.next/server/app/api/filesystem/browse/route.js.nft.json +1 -0
- package/.next/server/app/api/filesystem/browse/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/issues/route.js +1 -0
- package/.next/server/app/api/issues/route.js.nft.json +1 -0
- package/.next/server/app/api/issues/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/observability/route.js +1 -0
- package/.next/server/app/api/observability/route.js.nft.json +1 -0
- package/.next/server/app/api/observability/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/orchestrators/route.js +1 -0
- package/.next/server/app/api/orchestrators/route.js.nft.json +1 -0
- package/.next/server/app/api/orchestrators/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/projects/[id]/route.js +5 -0
- package/.next/server/app/api/projects/[id]/route.js.nft.json +1 -0
- package/.next/server/app/api/projects/[id]/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/projects/reload/route.js +1 -0
- package/.next/server/app/api/projects/reload/route.js.nft.json +1 -0
- package/.next/server/app/api/projects/reload/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/projects/route.js +1 -0
- package/.next/server/app/api/projects/route.js.nft.json +1 -0
- package/.next/server/app/api/projects/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/prs/[id]/merge/route.js +1 -0
- package/.next/server/app/api/prs/[id]/merge/route.js.nft.json +1 -0
- package/.next/server/app/api/prs/[id]/merge/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/reviews/execute/route.js +1 -0
- package/.next/server/app/api/reviews/execute/route.js.nft.json +1 -0
- package/.next/server/app/api/reviews/execute/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/reviews/findings/route.js +1 -0
- package/.next/server/app/api/reviews/findings/route.js.nft.json +1 -0
- package/.next/server/app/api/reviews/findings/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/reviews/route.js +1 -0
- package/.next/server/app/api/reviews/route.js.nft.json +1 -0
- package/.next/server/app/api/reviews/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/reviews/send/route.js +1 -0
- package/.next/server/app/api/reviews/send/route.js.nft.json +1 -0
- package/.next/server/app/api/reviews/send/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/runtime/terminal/route.js +1 -0
- package/.next/server/app/api/runtime/terminal/route.js.nft.json +1 -0
- package/.next/server/app/api/runtime/terminal/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/sessions/[id]/kill/route.js +1 -0
- package/.next/server/app/api/sessions/[id]/kill/route.js.nft.json +1 -0
- package/.next/server/app/api/sessions/[id]/kill/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/sessions/[id]/message/route.js +1 -0
- package/.next/server/app/api/sessions/[id]/message/route.js.nft.json +1 -0
- package/.next/server/app/api/sessions/[id]/message/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/sessions/[id]/remap/route.js +1 -0
- package/.next/server/app/api/sessions/[id]/remap/route.js.nft.json +1 -0
- package/.next/server/app/api/sessions/[id]/remap/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/sessions/[id]/restore/route.js +1 -0
- package/.next/server/app/api/sessions/[id]/restore/route.js.nft.json +1 -0
- package/.next/server/app/api/sessions/[id]/restore/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/sessions/[id]/route.js +1 -0
- package/.next/server/app/api/sessions/[id]/route.js.nft.json +1 -0
- package/.next/server/app/api/sessions/[id]/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/sessions/[id]/send/route.js +1 -0
- package/.next/server/app/api/sessions/[id]/send/route.js.nft.json +1 -0
- package/.next/server/app/api/sessions/[id]/send/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/sessions/patches/route.js +1 -0
- package/.next/server/app/api/sessions/patches/route.js.nft.json +1 -0
- package/.next/server/app/api/sessions/patches/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/sessions/route.js +1 -0
- package/.next/server/app/api/sessions/route.js.nft.json +1 -0
- package/.next/server/app/api/sessions/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/setup-labels/route.js +1 -0
- package/.next/server/app/api/setup-labels/route.js.nft.json +1 -0
- package/.next/server/app/api/setup-labels/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/spawn/route.js +1 -0
- package/.next/server/app/api/spawn/route.js.nft.json +1 -0
- package/.next/server/app/api/spawn/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/update/route.js +1 -0
- package/.next/server/app/api/update/route.js.nft.json +1 -0
- package/.next/server/app/api/update/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/verify/route.js +1 -0
- package/.next/server/app/api/verify/route.js.nft.json +1 -0
- package/.next/server/app/api/verify/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/version/route.js +1 -0
- package/.next/server/app/api/version/route.js.nft.json +1 -0
- package/.next/server/app/api/version/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/webhooks/[...slug]/route.js +1 -0
- package/.next/server/app/api/webhooks/[...slug]/route.js.nft.json +1 -0
- package/.next/server/app/api/webhooks/[...slug]/route_client-reference-manifest.js +1 -0
- package/.next/server/app/apple-icon/route.js +1 -0
- package/.next/server/app/apple-icon/route.js.nft.json +1 -0
- package/.next/server/app/apple-icon/route_client-reference-manifest.js +1 -0
- package/.next/server/app/apple-icon.body +0 -0
- package/.next/server/app/apple-icon.meta +1 -0
- package/.next/server/app/dev/terminal-test/page.js +15 -0
- package/.next/server/app/dev/terminal-test/page.js.nft.json +1 -0
- package/.next/server/app/dev/terminal-test/page_client-reference-manifest.js +1 -0
- package/.next/server/app/dev/terminal-test.html +1 -0
- package/.next/server/app/dev/terminal-test.meta +7 -0
- package/.next/server/app/dev/terminal-test.rsc +28 -0
- package/.next/server/app/icon/route.js +1 -0
- package/.next/server/app/icon/route.js.nft.json +1 -0
- package/.next/server/app/icon/route_client-reference-manifest.js +1 -0
- package/.next/server/app/icon-192/route.js +1 -0
- package/.next/server/app/icon-192/route.js.nft.json +1 -0
- package/.next/server/app/icon-192/route_client-reference-manifest.js +1 -0
- package/.next/server/app/icon-512/route.js +1 -0
- package/.next/server/app/icon-512/route.js.nft.json +1 -0
- package/.next/server/app/icon-512/route_client-reference-manifest.js +1 -0
- package/.next/server/app/icon.body +0 -0
- package/.next/server/app/icon.meta +1 -0
- package/.next/server/app/manifest.webmanifest/route.js +16 -0
- package/.next/server/app/manifest.webmanifest/route.js.nft.json +1 -0
- package/.next/server/app/manifest.webmanifest/route_client-reference-manifest.js +1 -0
- package/.next/server/app/manifest.webmanifest.body +1 -0
- package/.next/server/app/manifest.webmanifest.meta +1 -0
- package/.next/server/app/page.js +2 -0
- package/.next/server/app/page.js.nft.json +1 -0
- package/.next/server/app/page_client-reference-manifest.js +1 -0
- package/.next/server/app/projects/[projectId]/page.js +2 -0
- package/.next/server/app/projects/[projectId]/page.js.nft.json +1 -0
- package/.next/server/app/projects/[projectId]/page_client-reference-manifest.js +1 -0
- package/.next/server/app/projects/[projectId]/sessions/[id]/page.js +2 -0
- package/.next/server/app/projects/[projectId]/sessions/[id]/page.js.nft.json +1 -0
- package/.next/server/app/projects/[projectId]/sessions/[id]/page_client-reference-manifest.js +1 -0
- package/.next/server/app/projects/[projectId]/settings/page.js +2 -0
- package/.next/server/app/projects/[projectId]/settings/page.js.nft.json +1 -0
- package/.next/server/app/projects/[projectId]/settings/page_client-reference-manifest.js +1 -0
- package/.next/server/app/prs/page.js +2 -0
- package/.next/server/app/prs/page.js.nft.json +1 -0
- package/.next/server/app/prs/page_client-reference-manifest.js +1 -0
- package/.next/server/app/review/page.js +2 -0
- package/.next/server/app/review/page.js.nft.json +1 -0
- package/.next/server/app/review/page_client-reference-manifest.js +1 -0
- package/.next/server/app/reviews/page.js +2 -0
- package/.next/server/app/reviews/page.js.nft.json +1 -0
- package/.next/server/app/reviews/page_client-reference-manifest.js +1 -0
- package/.next/server/app/sessions/[id]/page.js +2 -0
- package/.next/server/app/sessions/[id]/page.js.nft.json +1 -0
- package/.next/server/app/sessions/[id]/page_client-reference-manifest.js +1 -0
- package/.next/server/app/test-direct/page.js +2 -0
- package/.next/server/app/test-direct/page.js.nft.json +1 -0
- package/.next/server/app/test-direct/page_client-reference-manifest.js +1 -0
- package/.next/server/app/test-direct.html +1 -0
- package/.next/server/app/test-direct.meta +7 -0
- package/.next/server/app/test-direct.rsc +28 -0
- package/.next/server/app-paths-manifest.json +47 -0
- package/.next/server/chunks/1215.js +1 -0
- package/.next/server/chunks/1271.js +1 -0
- package/.next/server/chunks/2106.js +1 -0
- package/.next/server/chunks/2347.js +3 -0
- package/.next/server/chunks/2899.js +1 -0
- package/.next/server/chunks/2914.js +1 -0
- package/.next/server/chunks/4033.js +1 -0
- package/.next/server/chunks/4148.js +942 -0
- package/.next/server/chunks/4422.js +32 -0
- package/.next/server/chunks/5053.js +1 -0
- package/.next/server/chunks/5689.js +1 -0
- package/.next/server/chunks/6148.js +9 -0
- package/.next/server/chunks/6582.js +25 -0
- package/.next/server/chunks/7002.js +1 -0
- package/.next/server/chunks/7486.js +9 -0
- package/.next/server/chunks/8803.js +6 -0
- package/.next/server/chunks/9472.js +847 -0
- package/.next/server/chunks/9493.js +1 -0
- package/.next/server/chunks/9561.js +22 -0
- package/.next/server/chunks/966.js +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 +1 -0
- package/.next/server/middleware-manifest.json +6 -0
- package/.next/server/middleware-react-loadable-manifest.js +1 -0
- package/.next/server/next-font-manifest.js +1 -0
- package/.next/server/next-font-manifest.json +1 -0
- package/.next/server/pages/404.html +1 -0
- package/.next/server/pages/500.html +1 -0
- package/.next/server/pages/_app.js +1 -0
- package/.next/server/pages/_app.js.nft.json +1 -0
- package/.next/server/pages/_document.js +1 -0
- package/.next/server/pages/_document.js.nft.json +1 -0
- package/.next/server/pages/_error.js +19 -0
- package/.next/server/pages/_error.js.nft.json +1 -0
- package/.next/server/pages-manifest.json +6 -0
- package/.next/server/server-reference-manifest.js +1 -0
- package/.next/server/server-reference-manifest.json +1 -0
- package/.next/server/webpack-runtime.js +1 -0
- package/.next/static/chunks/0f200859.359176a445d2791f.js +10 -0
- package/.next/static/chunks/1089-c6d7995c7c19039a.js +1 -0
- package/.next/static/chunks/1461-af7c54935f21d56d.js +1 -0
- package/.next/static/chunks/2073-4192de0bb00cc993.js +1 -0
- package/.next/static/chunks/3764.4c736d9a181489a4.js +1 -0
- package/.next/static/chunks/4115-1a4fa80ec67a29d3.js +1 -0
- package/.next/static/chunks/4751.6c71bfc0c4520627.js +1 -0
- package/.next/static/chunks/503.f7ff284457dd9c40.js +1 -0
- package/.next/static/chunks/5204.7de7e266895bced7.js +1 -0
- package/.next/static/chunks/6835.7a29fa4b665b7c2f.js +1 -0
- package/.next/static/chunks/7008-0d9bee1bf4bfcbea.js +1 -0
- package/.next/static/chunks/7317.685aa5231218e8d3.js +1 -0
- package/.next/static/chunks/8204-7c7837ed694da99c.js +1 -0
- package/.next/static/chunks/8713-d3d663f55dc00e48.js +1 -0
- package/.next/static/chunks/8759-490573536f93f85c.js +1 -0
- package/.next/static/chunks/88a6fc35-f836b4b72df5eafa.js +1 -0
- package/.next/static/chunks/9531-a5175e55fa0db48d.js +1 -0
- package/.next/static/chunks/9876-de0c5a1a319b4e8e.js +1 -0
- package/.next/static/chunks/app/_not-found/page-6add9dacf1870b4b.js +1 -0
- package/.next/static/chunks/app/api/backlog/route-6add9dacf1870b4b.js +1 -0
- package/.next/static/chunks/app/api/browse-directory/route-6add9dacf1870b4b.js +1 -0
- package/.next/static/chunks/app/api/filesystem/browse/route-6add9dacf1870b4b.js +1 -0
- package/.next/static/chunks/app/api/issues/route-6add9dacf1870b4b.js +1 -0
- package/.next/static/chunks/app/api/observability/route-6add9dacf1870b4b.js +1 -0
- package/.next/static/chunks/app/api/orchestrators/route-6add9dacf1870b4b.js +1 -0
- package/.next/static/chunks/app/api/projects/[id]/route-6add9dacf1870b4b.js +1 -0
- package/.next/static/chunks/app/api/projects/reload/route-6add9dacf1870b4b.js +1 -0
- package/.next/static/chunks/app/api/projects/route-6add9dacf1870b4b.js +1 -0
- package/.next/static/chunks/app/api/prs/[id]/merge/route-6add9dacf1870b4b.js +1 -0
- package/.next/static/chunks/app/api/reviews/execute/route-6add9dacf1870b4b.js +1 -0
- package/.next/static/chunks/app/api/reviews/findings/route-6add9dacf1870b4b.js +1 -0
- package/.next/static/chunks/app/api/reviews/route-6add9dacf1870b4b.js +1 -0
- package/.next/static/chunks/app/api/reviews/send/route-6add9dacf1870b4b.js +1 -0
- package/.next/static/chunks/app/api/runtime/terminal/route-6add9dacf1870b4b.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/kill/route-6add9dacf1870b4b.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/message/route-6add9dacf1870b4b.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/remap/route-6add9dacf1870b4b.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/restore/route-6add9dacf1870b4b.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/route-6add9dacf1870b4b.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/send/route-6add9dacf1870b4b.js +1 -0
- package/.next/static/chunks/app/api/sessions/patches/route-6add9dacf1870b4b.js +1 -0
- package/.next/static/chunks/app/api/sessions/route-6add9dacf1870b4b.js +1 -0
- package/.next/static/chunks/app/api/setup-labels/route-6add9dacf1870b4b.js +1 -0
- package/.next/static/chunks/app/api/spawn/route-6add9dacf1870b4b.js +1 -0
- package/.next/static/chunks/app/api/update/route-6add9dacf1870b4b.js +1 -0
- package/.next/static/chunks/app/api/verify/route-6add9dacf1870b4b.js +1 -0
- package/.next/static/chunks/app/api/version/route-6add9dacf1870b4b.js +1 -0
- package/.next/static/chunks/app/api/webhooks/[...slug]/route-6add9dacf1870b4b.js +1 -0
- package/.next/static/chunks/app/apple-icon/route-6add9dacf1870b4b.js +1 -0
- package/.next/static/chunks/app/dev/terminal-test/page-d0132109f9d8524e.js +1 -0
- package/.next/static/chunks/app/error-d632d0714b987864.js +1 -0
- package/.next/static/chunks/app/global-error-f6bef179169bcdae.js +1 -0
- package/.next/static/chunks/app/icon/route-6add9dacf1870b4b.js +1 -0
- package/.next/static/chunks/app/icon-192/route-6add9dacf1870b4b.js +1 -0
- package/.next/static/chunks/app/icon-512/route-6add9dacf1870b4b.js +1 -0
- package/.next/static/chunks/app/layout-5cac6fe817194d7a.js +1 -0
- package/.next/static/chunks/app/loading-6add9dacf1870b4b.js +1 -0
- package/.next/static/chunks/app/manifest.webmanifest/route-6add9dacf1870b4b.js +1 -0
- package/.next/static/chunks/app/not-found-cba3f587e1f98dcb.js +1 -0
- package/.next/static/chunks/app/page-cf7bccb75990950d.js +1 -0
- package/.next/static/chunks/app/projects/[projectId]/layout-6add9dacf1870b4b.js +1 -0
- package/.next/static/chunks/app/projects/[projectId]/loading-6add9dacf1870b4b.js +1 -0
- package/.next/static/chunks/app/projects/[projectId]/page-039a93b16089ed57.js +1 -0
- package/.next/static/chunks/app/projects/[projectId]/sessions/[id]/page-043b525bedb8f0f7.js +1 -0
- package/.next/static/chunks/app/projects/[projectId]/settings/page-63572555892d7a61.js +1 -0
- package/.next/static/chunks/app/projects/layout-d43b2e38d46221bd.js +1 -0
- package/.next/static/chunks/app/prs/page-e447852fbe0c6ee4.js +1 -0
- package/.next/static/chunks/app/review/page-022b2d2c326ff413.js +1 -0
- package/.next/static/chunks/app/reviews/page-6add9dacf1870b4b.js +1 -0
- package/.next/static/chunks/app/sessions/[id]/error-67c0d27f977a1cc1.js +1 -0
- package/.next/static/chunks/app/sessions/[id]/loading-6add9dacf1870b4b.js +1 -0
- package/.next/static/chunks/app/sessions/[id]/not-found-cba3f587e1f98dcb.js +1 -0
- package/.next/static/chunks/app/sessions/[id]/page-863cf8dd2c76d06d.js +1 -0
- package/.next/static/chunks/app/test-direct/page-8b80ed180c0f2f42.js +1 -0
- package/.next/static/chunks/e12b4bb0.8742134e1ac0263f.js +58 -0
- package/.next/static/chunks/framework-7060e2ac4971c604.js +1 -0
- package/.next/static/chunks/main-app-162601c3f1c01b19.js +1 -0
- package/.next/static/chunks/main-ed1610689fbd6f0d.js +1 -0
- package/.next/static/chunks/pages/_app-f4baf4dbe88f6f54.js +1 -0
- package/.next/static/chunks/pages/_error-a7f6723f42093f29.js +1 -0
- package/.next/static/chunks/polyfills-42372ed130431b0a.js +1 -0
- package/.next/static/chunks/webpack-f9566aaa604a1b07.js +1 -0
- package/.next/static/css/0c9b7451c2ce7c02.css +1 -0
- package/.next/static/css/7ca4e3753c1c7833.css +1 -0
- package/.next/static/css/b4a15f23f468892a.css +1 -0
- package/.next/static/css/d06ee45019116677.css +1 -0
- package/.next/static/media/91601dd83defba07-s.p.woff2 +0 -0
- package/.next/static/media/aa8291c31d4e9e54-s.p.woff2 +0 -0
- package/.next/static/pROr0laPuZIdA4NYNygMD/_buildManifest.js +1 -0
- package/.next/static/pROr0laPuZIdA4NYNygMD/_ssgManifest.js +1 -0
- package/LICENSE +22 -0
- package/dist-server/direct-terminal-ws.js +109 -0
- package/dist-server/mux-websocket.js +1162 -0
- package/dist-server/single-port-server.js +305 -0
- package/dist-server/start-all.js +150 -0
- package/dist-server/terminal-observability.js +16 -0
- package/dist-server/tmux-utils.js +301 -0
- package/next.config.js +71 -0
- package/package.json +97 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Composio, Inc.
|
|
4
|
+
Copyright (c) 2026 slievr (Athene fork)
|
|
5
|
+
|
|
6
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
8
|
+
in the Software without restriction, including without limitation the rights
|
|
9
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
11
|
+
furnished to do so, subject to the following conditions:
|
|
12
|
+
|
|
13
|
+
The above copyright notice and this permission notice shall be included in all
|
|
14
|
+
copies or substantial portions of the Software.
|
|
15
|
+
|
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
|
+
SOFTWARE.
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Direct WebSocket terminal server.
|
|
3
|
+
* Hosts the multiplexed /mux WebSocket endpoint for all terminal connections.
|
|
4
|
+
*/
|
|
5
|
+
import { createServer } from "node:http";
|
|
6
|
+
import { findTmux } from "./tmux-utils.js";
|
|
7
|
+
import { createMuxWebSocket } from "./mux-websocket.js";
|
|
8
|
+
/**
|
|
9
|
+
* Create the direct terminal WebSocket server.
|
|
10
|
+
* Separated from listen() so tests can control lifecycle.
|
|
11
|
+
*/
|
|
12
|
+
export function createDirectTerminalServer(tmuxPath) {
|
|
13
|
+
const TMUX = tmuxPath ?? findTmux();
|
|
14
|
+
let muxWss = null;
|
|
15
|
+
const metrics = {
|
|
16
|
+
totalConnections: 0,
|
|
17
|
+
totalDisconnects: 0,
|
|
18
|
+
totalErrors: 0,
|
|
19
|
+
};
|
|
20
|
+
const server = createServer((req, res) => {
|
|
21
|
+
if (req.url === "/health") {
|
|
22
|
+
res.writeHead(200, { "Content-Type": "application/json" });
|
|
23
|
+
res.end(JSON.stringify({
|
|
24
|
+
status: "ok",
|
|
25
|
+
clients: muxWss?.clients.size ?? 0,
|
|
26
|
+
metrics,
|
|
27
|
+
}));
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
res.writeHead(404);
|
|
31
|
+
res.end("Not found");
|
|
32
|
+
});
|
|
33
|
+
muxWss = createMuxWebSocket(TMUX);
|
|
34
|
+
if (muxWss) {
|
|
35
|
+
muxWss.on("connection", (ws) => {
|
|
36
|
+
metrics.totalConnections++;
|
|
37
|
+
ws.on("close", () => {
|
|
38
|
+
metrics.totalDisconnects++;
|
|
39
|
+
});
|
|
40
|
+
ws.on("error", () => {
|
|
41
|
+
metrics.totalErrors++;
|
|
42
|
+
});
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
// Manual upgrade routing — ws library doesn't support multiple WebSocketServer
|
|
46
|
+
// instances with different `path` options on the same HTTP server.
|
|
47
|
+
// `/ao-terminal-mux` is accepted as an alias of `/mux` so deployments fronted
|
|
48
|
+
// by a path-routing reverse proxy (e.g. cloudflared, nginx) can forward the
|
|
49
|
+
// dashboard's path-based mux URL straight at this port without needing a
|
|
50
|
+
// path-rewrite rule. The dashboard's MuxProvider already constructs that
|
|
51
|
+
// path when accessed on a standard HTTPS port; see `packages/web/src/providers/MuxProvider.tsx`.
|
|
52
|
+
server.on("upgrade", (request, socket, head) => {
|
|
53
|
+
const pathname = new URL(request.url ?? "/", "ws://localhost").pathname;
|
|
54
|
+
if ((pathname === "/mux" || pathname === "/ao-terminal-mux") && muxWss) {
|
|
55
|
+
muxWss.handleUpgrade(request, socket, head, (ws) => {
|
|
56
|
+
muxWss.emit("connection", ws, request);
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
else {
|
|
60
|
+
socket.destroy();
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
function shutdown() {
|
|
64
|
+
// Terminate all connected mux clients — this triggers their 'close' events
|
|
65
|
+
// which unsubscribe terminal callbacks and kill PTY processes.
|
|
66
|
+
if (muxWss) {
|
|
67
|
+
for (const client of muxWss.clients) {
|
|
68
|
+
client.terminate();
|
|
69
|
+
}
|
|
70
|
+
muxWss.close();
|
|
71
|
+
}
|
|
72
|
+
server.close();
|
|
73
|
+
}
|
|
74
|
+
return { server, shutdown };
|
|
75
|
+
}
|
|
76
|
+
// --- Run as standalone script ---
|
|
77
|
+
// Only start the server when executed directly (not imported by tests)
|
|
78
|
+
const isMainModule = process.argv[1]?.endsWith("direct-terminal-ws.ts") ||
|
|
79
|
+
process.argv[1]?.endsWith("direct-terminal-ws.js");
|
|
80
|
+
if (isMainModule) {
|
|
81
|
+
const PORT = parseInt(process.env.DIRECT_TERMINAL_PORT ?? "14801", 10);
|
|
82
|
+
// On Windows, findTmux() returns null — mux-websocket.ts handles this by
|
|
83
|
+
// using named pipe relay to PTY hosts instead of tmux attach.
|
|
84
|
+
const TMUX = findTmux();
|
|
85
|
+
if (TMUX) {
|
|
86
|
+
console.log(`[DirectTerminal] Using tmux: ${TMUX}`);
|
|
87
|
+
}
|
|
88
|
+
else if (process.platform === "win32") {
|
|
89
|
+
console.log(`[DirectTerminal] Windows mode — using named pipe relay to PTY hosts`);
|
|
90
|
+
}
|
|
91
|
+
else {
|
|
92
|
+
console.log(`[DirectTerminal] No tmux available — terminal relay may be limited`);
|
|
93
|
+
}
|
|
94
|
+
const { server, shutdown } = createDirectTerminalServer(TMUX);
|
|
95
|
+
server.listen(PORT, () => {
|
|
96
|
+
console.log(`[DirectTerminal] WebSocket server listening on port ${PORT}`);
|
|
97
|
+
});
|
|
98
|
+
function handleShutdown(signal) {
|
|
99
|
+
console.log(`[DirectTerminal] Received ${signal}, shutting down...`);
|
|
100
|
+
shutdown();
|
|
101
|
+
const forceExitTimer = setTimeout(() => {
|
|
102
|
+
console.error("[DirectTerminal] Forced shutdown after timeout");
|
|
103
|
+
process.exit(1);
|
|
104
|
+
}, 5000);
|
|
105
|
+
forceExitTimer.unref();
|
|
106
|
+
}
|
|
107
|
+
process.on("SIGINT", () => handleShutdown("SIGINT"));
|
|
108
|
+
process.on("SIGTERM", () => handleShutdown("SIGTERM"));
|
|
109
|
+
}
|