@jlongo78/agent-spaces 0.7.7 → 0.8.0
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/standalone/.next/BUILD_ID +1 -1
- package/.next/standalone/.next/app-path-routes-manifest.json +6 -0
- package/.next/standalone/.next/build-manifest.json +2 -2
- package/.next/standalone/.next/prerender-manifest.json +3 -3
- package/.next/standalone/.next/required-server-files.json +19 -19
- package/.next/standalone/.next/routes-manifest.json +38 -0
- package/.next/standalone/.next/server/app/(desktop)/admin/analytics/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/(desktop)/admin/users/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/(desktop)/analytics/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/(desktop)/cortex/page/react-loadable-manifest.json +1 -1
- package/.next/standalone/.next/server/app/(desktop)/cortex/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/(desktop)/cortex/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/(desktop)/network/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/(desktop)/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/(desktop)/projects/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/(desktop)/sessions/[id]/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/(desktop)/sessions/[id]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/(desktop)/sessions/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/(desktop)/settings/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/(desktop)/terminal/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/(desktop)/terminal/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/(desktop)/terminal/pane/[id]/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/(desktop)/terminal/pane/[id]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/(desktop)/terminal/remote/[nodeId]/[workspaceId]/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/(desktop)/terminal/remote/[nodeId]/[workspaceId]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/(desktop)/workspaces/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/_global-error.html +2 -2
- package/.next/standalone/.next/server/app/_global-error.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/_not-found.html +1 -1
- package/.next/standalone/.next/server/app/_not-found.rsc +2 -2
- package/.next/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_not-found.segments/_index.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/admin/analytics.html +1 -1
- package/.next/standalone/.next/server/app/admin/analytics.rsc +6 -7
- package/.next/standalone/.next/server/app/admin/analytics.segments/!KGRlc2t0b3Ap/admin/analytics/__PAGE__.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/admin/analytics.segments/!KGRlc2t0b3Ap/admin/analytics.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/admin/analytics.segments/!KGRlc2t0b3Ap/admin.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/admin/analytics.segments/!KGRlc2t0b3Ap.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/admin/analytics.segments/_full.segment.rsc +6 -7
- package/.next/standalone/.next/server/app/admin/analytics.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/admin/analytics.segments/_index.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/admin/analytics.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/admin/users.html +1 -1
- package/.next/standalone/.next/server/app/admin/users.rsc +2 -2
- package/.next/standalone/.next/server/app/admin/users.segments/!KGRlc2t0b3Ap/admin/users/__PAGE__.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/admin/users.segments/!KGRlc2t0b3Ap/admin/users.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/admin/users.segments/!KGRlc2t0b3Ap/admin.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/admin/users.segments/!KGRlc2t0b3Ap.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/admin/users.segments/_full.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/admin/users.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/admin/users.segments/_index.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/admin/users.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/analytics.html +1 -1
- package/.next/standalone/.next/server/app/analytics.rsc +3 -3
- package/.next/standalone/.next/server/app/analytics.segments/!KGRlc2t0b3Ap/analytics/__PAGE__.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/analytics.segments/!KGRlc2t0b3Ap/analytics.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/analytics.segments/!KGRlc2t0b3Ap.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/analytics.segments/_full.segment.rsc +3 -3
- package/.next/standalone/.next/server/app/analytics.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/analytics.segments/_index.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/analytics.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/api/analytics/overview/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/benchmark/lobes/route/app-paths-manifest.json +3 -0
- package/.next/standalone/.next/server/app/api/benchmark/lobes/route/build-manifest.json +11 -0
- package/.next/standalone/.next/server/app/api/benchmark/lobes/route/server-reference-manifest.json +4 -0
- package/.next/standalone/.next/server/app/api/benchmark/lobes/route.js +7 -0
- package/.next/standalone/.next/server/app/api/benchmark/lobes/route.js.map +5 -0
- package/.next/standalone/.next/server/app/api/benchmark/lobes/route.js.nft.json +1 -0
- package/.next/standalone/.next/server/app/api/benchmark/lobes/route_client-reference-manifest.js +2 -0
- package/.next/standalone/.next/server/app/api/benchmark/run/route/app-paths-manifest.json +3 -0
- package/.next/standalone/.next/server/app/api/benchmark/run/route/build-manifest.json +11 -0
- package/.next/standalone/.next/server/app/api/benchmark/run/route/server-reference-manifest.json +4 -0
- package/.next/standalone/.next/server/app/api/benchmark/run/route.js +7 -0
- package/.next/standalone/.next/server/app/api/benchmark/run/route.js.map +5 -0
- package/.next/standalone/.next/server/app/api/benchmark/run/route.js.nft.json +1 -0
- package/.next/standalone/.next/server/app/api/benchmark/run/route_client-reference-manifest.js +2 -0
- package/.next/standalone/.next/server/app/api/benchmark/runs/[id]/route/app-paths-manifest.json +3 -0
- package/.next/standalone/.next/server/app/api/benchmark/runs/[id]/route/build-manifest.json +11 -0
- package/.next/standalone/.next/server/app/api/benchmark/runs/[id]/route/server-reference-manifest.json +4 -0
- package/.next/standalone/.next/server/app/api/benchmark/runs/[id]/route.js +7 -0
- package/.next/standalone/.next/server/app/api/benchmark/runs/[id]/route.js.map +5 -0
- package/.next/standalone/.next/server/app/api/benchmark/runs/[id]/route.js.nft.json +1 -0
- package/.next/standalone/.next/server/app/api/benchmark/runs/[id]/route_client-reference-manifest.js +2 -0
- package/.next/standalone/.next/server/app/api/benchmark/runs/route/app-paths-manifest.json +3 -0
- package/.next/standalone/.next/server/app/api/benchmark/runs/route/build-manifest.json +11 -0
- package/.next/standalone/.next/server/app/api/benchmark/runs/route/server-reference-manifest.json +4 -0
- package/.next/standalone/.next/server/app/api/benchmark/runs/route.js +7 -0
- package/.next/standalone/.next/server/app/api/benchmark/runs/route.js.map +5 -0
- package/.next/standalone/.next/server/app/api/benchmark/runs/route.js.nft.json +1 -0
- package/.next/standalone/.next/server/app/api/benchmark/runs/route_client-reference-manifest.js +2 -0
- package/.next/standalone/.next/server/app/api/benchmark/status/route/app-paths-manifest.json +3 -0
- package/.next/standalone/.next/server/app/api/benchmark/status/route/build-manifest.json +11 -0
- package/.next/standalone/.next/server/app/api/benchmark/status/route/server-reference-manifest.json +4 -0
- package/.next/standalone/.next/server/app/api/benchmark/status/route.js +7 -0
- package/.next/standalone/.next/server/app/api/benchmark/status/route.js.map +5 -0
- package/.next/standalone/.next/server/app/api/benchmark/status/route.js.nft.json +1 -0
- package/.next/standalone/.next/server/app/api/benchmark/status/route_client-reference-manifest.js +2 -0
- package/.next/standalone/.next/server/app/api/bulk/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/config/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/cortex/context/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/cortex/curation/assess/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/cortex/curation/publish/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/cortex/curation/refine/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/cortex/curation/review/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/cortex/curation/seed/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/cortex/export/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/cortex/federation/pending/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/cortex/federation/resolve/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/cortex/federation/search/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/cortex/federation/teach/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/cortex/graph/edges/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/cortex/graph/entities/[id]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/cortex/graph/entities/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/cortex/graph/populate/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/cortex/import/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/cortex/import/status/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/cortex/ingest/bootstrap/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/cortex/ingest/status/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/cortex/knowledge/[id]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/cortex/knowledge/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/cortex/lobes/[id]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/cortex/lobes/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/cortex/lobes/share/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/cortex/marketplace/browse/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/cortex/marketplace/preview/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/cortex/mcp/call/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/cortex/mcp/tools/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/cortex/search/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/cortex/settings/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/cortex/status/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/cortex/timeline/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/cortex/usage/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/cortex/workspace/[id]/context/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/events/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/files/route.js +1 -1
- package/.next/standalone/.next/server/app/api/files/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/folders/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/network/handshake/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/network/projects/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/network/search/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/network/sessions/[id]/messages/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/network/sessions/[id]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/network/sessions/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/network/workspaces/[id]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/network/workspaces/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/panes/[id]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/panes/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/projects/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/search/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/sessions/[id]/chat/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/sessions/[id]/messages/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/sessions/[id]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/sessions/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/sync/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/tags/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/tier/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/whisper/route/app-paths-manifest.json +3 -0
- package/.next/standalone/.next/server/app/api/whisper/route/build-manifest.json +11 -0
- package/.next/standalone/.next/server/app/api/whisper/route/server-reference-manifest.json +4 -0
- package/.next/standalone/.next/server/app/api/whisper/route.js +7 -0
- package/.next/standalone/.next/server/app/api/whisper/route.js.map +5 -0
- package/.next/standalone/.next/server/app/api/whisper/route.js.nft.json +1 -0
- package/.next/standalone/.next/server/app/api/whisper/route_client-reference-manifest.js +2 -0
- package/.next/standalone/.next/server/app/api/workspaces/[id]/context/[key]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/workspaces/[id]/context/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/workspaces/[id]/messages/[msgId]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/workspaces/[id]/messages/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/workspaces/[id]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/workspaces/[id]/sessions/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/workspaces/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/cortex.html +1 -1
- package/.next/standalone/.next/server/app/cortex.rsc +3 -3
- package/.next/standalone/.next/server/app/cortex.segments/!KGRlc2t0b3Ap/cortex/__PAGE__.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/cortex.segments/!KGRlc2t0b3Ap/cortex.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/cortex.segments/!KGRlc2t0b3Ap.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/cortex.segments/_full.segment.rsc +3 -3
- package/.next/standalone/.next/server/app/cortex.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/cortex.segments/_index.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/cortex.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/login/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/login.html +1 -1
- package/.next/standalone/.next/server/app/login.rsc +2 -2
- package/.next/standalone/.next/server/app/login.segments/_full.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/login.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/login.segments/_index.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/login.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/login.segments/login/__PAGE__.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/login.segments/login.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/m/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/m/projects/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/m/projects.html +1 -1
- package/.next/standalone/.next/server/app/m/projects.rsc +2 -2
- package/.next/standalone/.next/server/app/m/projects.segments/_full.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/m/projects.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/m/projects.segments/_index.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/m/projects.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/m/projects.segments/m/projects/__PAGE__.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/m/projects.segments/m/projects.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/m/projects.segments/m.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/m/sessions/[id]/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/m/sessions/[id]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/m/sessions/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/m/sessions.html +1 -1
- package/.next/standalone/.next/server/app/m/sessions.rsc +2 -2
- package/.next/standalone/.next/server/app/m/sessions.segments/_full.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/m/sessions.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/m/sessions.segments/_index.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/m/sessions.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/m/sessions.segments/m/sessions/__PAGE__.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/m/sessions.segments/m/sessions.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/m/sessions.segments/m.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/m/settings/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/m/settings.html +1 -1
- package/.next/standalone/.next/server/app/m/settings.rsc +2 -2
- package/.next/standalone/.next/server/app/m/settings.segments/_full.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/m/settings.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/m/settings.segments/_index.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/m/settings.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/m/settings.segments/m/settings/__PAGE__.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/m/settings.segments/m/settings.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/m/settings.segments/m.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/m/terminal/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/m/terminal/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/m/terminal.html +1 -1
- package/.next/standalone/.next/server/app/m/terminal.rsc +3 -3
- package/.next/standalone/.next/server/app/m/terminal.segments/_full.segment.rsc +3 -3
- package/.next/standalone/.next/server/app/m/terminal.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/m/terminal.segments/_index.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/m/terminal.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/m/terminal.segments/m/terminal/__PAGE__.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/m/terminal.segments/m/terminal.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/m/terminal.segments/m.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/m.html +1 -1
- package/.next/standalone/.next/server/app/m.rsc +2 -2
- package/.next/standalone/.next/server/app/m.segments/_full.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/m.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/m.segments/_index.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/m.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/m.segments/m/__PAGE__.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/m.segments/m.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/network.html +1 -1
- package/.next/standalone/.next/server/app/network.rsc +2 -2
- package/.next/standalone/.next/server/app/network.segments/!KGRlc2t0b3Ap/network/__PAGE__.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/network.segments/!KGRlc2t0b3Ap/network.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/network.segments/!KGRlc2t0b3Ap.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/network.segments/_full.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/network.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/network.segments/_index.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/network.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/projects.html +1 -1
- package/.next/standalone/.next/server/app/projects.rsc +2 -2
- package/.next/standalone/.next/server/app/projects.segments/!KGRlc2t0b3Ap/projects/__PAGE__.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/projects.segments/!KGRlc2t0b3Ap/projects.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/projects.segments/!KGRlc2t0b3Ap.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/projects.segments/_full.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/projects.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/projects.segments/_index.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/projects.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/sessions.html +1 -1
- package/.next/standalone/.next/server/app/sessions.rsc +2 -2
- package/.next/standalone/.next/server/app/sessions.segments/!KGRlc2t0b3Ap/sessions/__PAGE__.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/sessions.segments/!KGRlc2t0b3Ap/sessions.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/sessions.segments/!KGRlc2t0b3Ap.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/sessions.segments/_full.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/sessions.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/sessions.segments/_index.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/sessions.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/settings.html +1 -1
- package/.next/standalone/.next/server/app/settings.rsc +2 -2
- package/.next/standalone/.next/server/app/settings.segments/!KGRlc2t0b3Ap/settings/__PAGE__.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/settings.segments/!KGRlc2t0b3Ap/settings.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/settings.segments/!KGRlc2t0b3Ap.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/settings.segments/_full.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/settings.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/settings.segments/_index.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/settings.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/terminal.html +1 -1
- package/.next/standalone/.next/server/app/terminal.rsc +3 -3
- package/.next/standalone/.next/server/app/terminal.segments/!KGRlc2t0b3Ap/terminal/__PAGE__.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/terminal.segments/!KGRlc2t0b3Ap/terminal.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/terminal.segments/!KGRlc2t0b3Ap.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/terminal.segments/_full.segment.rsc +3 -3
- package/.next/standalone/.next/server/app/terminal.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/terminal.segments/_index.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/terminal.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/vr/page/react-loadable-manifest.json +1 -1
- package/.next/standalone/.next/server/app/vr/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/vr.html +1 -1
- package/.next/standalone/.next/server/app/vr.rsc +3 -3
- package/.next/standalone/.next/server/app/vr.segments/_full.segment.rsc +3 -3
- package/.next/standalone/.next/server/app/vr.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/vr.segments/_index.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/vr.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/vr.segments/vr/__PAGE__.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/vr.segments/vr.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/workspaces.html +1 -1
- package/.next/standalone/.next/server/app/workspaces.rsc +2 -2
- package/.next/standalone/.next/server/app/workspaces.segments/!KGRlc2t0b3Ap/workspaces/__PAGE__.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/workspaces.segments/!KGRlc2t0b3Ap/workspaces.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/workspaces.segments/!KGRlc2t0b3Ap.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/workspaces.segments/_full.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/workspaces.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/workspaces.segments/_index.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/workspaces.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/.next/server/app-paths-manifest.json +6 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0041efe4._.js +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__00bf0ace._.js +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0a837dd9._.js +98 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0e71d908._.js +3 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0e9142f3._.js +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__10e47926._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__1665dc78._.js +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__175cbabf._.js +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__1adae357._.js +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__1d359752._.js +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__1e8fabeb._.js +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__1f8deca0._.js +8 -8
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__253fdda1._.js +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__28e6434f._.js +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__2a386564._.js +3 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__2c20fb38._.js +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__309132cd._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__33fec964._.js +3 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__3786d8ae._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__3ae92407._.js +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__3beda9fe._.js +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__4619e9bd._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__4a051043._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__508002e4._.js +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__5086c373._.js +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__5913e097._.js +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__5b5f68d2._.js +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__5c1f2459._.js +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__5ec8c977._.js +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__63cebc6c._.js +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__64d30d4d._.js +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__6c54fc2e._.js +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__6dc1fb7e._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__6e568102._.js +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__6faa04c0._.js +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__74a34dc3._.js +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__7819e4cf._.js +98 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__7e7250a4._.js +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__8309e0a4._.js +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__86cc0e2b._.js +6 -6
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__89c2565a._.js +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__8d178ad9._.js +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__93ee06f3._.js +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__9e1f0137._.js +98 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__9e4c154a._.js +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__a9d2e1d3._.js +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__ae53d343._.js +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__b3a04cef._.js +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__b4270b77._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__b6b6ce60._.js +3 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__c0757773._.js +98 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__c24cfa91._.js +3 -0
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__eb8acb65._.js → [root-of-the-server]__c7c47529._.js} +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__c88b63f7._.js +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__cba5f007._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__cbf4ceb0._.js +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__cefdba2f._.js +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__cf9e82bb._.js +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__d2897392._.js +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__d3b2d856._.js +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__d73273ca._.js +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__d8417eb6._.js +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__dc2a55de._.js +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__e0d4690b._.js +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__e3ea8547._.js +98 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__e678dd53._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__e9223f55._.js +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__ea630076._.js +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__f26ca49d._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__f33e1101._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__f515f865._.js +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__fceb5d60._.js +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__fed41403._.js +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__ff2e98c2._.js +2 -2
- package/.next/standalone/.next/server/chunks/_next-internal_server_app_api_benchmark_lobes_route_actions_ea7beadb.js +3 -0
- package/.next/standalone/.next/server/chunks/_next-internal_server_app_api_benchmark_run_route_actions_9ed0ba41.js +3 -0
- package/.next/standalone/.next/server/chunks/_next-internal_server_app_api_benchmark_runs_[id]_route_actions_39f90307.js +3 -0
- package/.next/standalone/.next/server/chunks/_next-internal_server_app_api_benchmark_runs_route_actions_37cf958b.js +3 -0
- package/.next/standalone/.next/server/chunks/_next-internal_server_app_api_benchmark_status_route_actions_009e2cba.js +3 -0
- package/.next/standalone/.next/server/chunks/_next-internal_server_app_api_whisper_route_actions_be9a633d.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/{_c1cfdd09._.js → [root-of-the-server]__16621ac5._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__66aca5d4._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__9c81bd86._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__e3bf6054._.js +5 -0
- package/.next/standalone/.next/server/chunks/ssr/{_81abf587._.js → _31ada310._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/_648a8a2d._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/_999dae61._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/_c48c91e5._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/_f8959434._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/src_app_(desktop)_cortex_page_tsx_0f33d8b3._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/src_components_terminal_terminal-pane_tsx_803c5e2c._.js +9 -0
- package/.next/standalone/.next/server/edge/chunks/[root-of-the-server]__32a0045c._.js +1 -1
- package/.next/standalone/.next/server/edge/chunks/_d73df637._.js +1 -1
- package/.next/standalone/.next/server/middleware-manifest.json +5 -5
- package/.next/standalone/.next/server/pages/404.html +1 -1
- package/.next/standalone/.next/server/pages/500.html +2 -2
- package/.next/standalone/.next/server/server-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/server-reference-manifest.json +1 -1
- package/.next/standalone/.next/static/chunks/157826a3253f8ccf.js +7 -0
- package/.next/standalone/.next/static/chunks/{69606d281c39f9b2.js → 2f9f09924ff9d447.js} +1 -1
- package/.next/standalone/.next/static/chunks/{84fe8d44deeeb74f.js → 4ced66ef12d91b38.js} +35 -12
- package/.next/standalone/.next/static/chunks/57d04d161b8a01b3.js +7 -0
- package/.next/standalone/.next/static/chunks/709c4608e5b935e8.js +1 -0
- package/.next/standalone/.next/static/chunks/{9cfa0291d55d8d2a.js → 7b14d4e609b55b9b.js} +1 -1
- package/.next/standalone/.next/static/chunks/7be37f4a56b8f575.js +1 -0
- package/.next/standalone/.next/static/chunks/8021d5a2269ff113.js +1 -0
- package/.next/standalone/.next/static/chunks/a3fd93a9dde3cacc.js +1 -0
- package/.next/standalone/.next/static/chunks/{412140a02893327a.js → afee31c7399daf2a.js} +1 -1
- package/.next/standalone/.next/static/chunks/b92fdbf858aeb0b3.js +1 -0
- package/.next/standalone/.next/static/chunks/c17274c2f95d4ba2.js +5 -0
- package/.next/standalone/.next/static/chunks/e82f4414650587cf.js +7 -0
- package/.next/standalone/.next/static/chunks/f6464729e7aa0da0.css +3 -0
- package/.next/standalone/LICENSE +661 -0
- package/.next/standalone/NOTICE +5 -0
- package/.next/standalone/README.md +131 -0
- package/.next/standalone/bin/cortex-hook.sh +62 -62
- package/.next/standalone/bin/cortex-mcp.js +60 -60
- package/.next/standalone/bin/fix-standalone-externals.js +79 -0
- package/.next/standalone/bin/lib/auto-setup.js +110 -0
- package/.next/standalone/bin/mdns-service.js +171 -0
- package/.next/standalone/bin/postinstall.js +35 -0
- package/.next/standalone/bin/setup-admin.js +195 -0
- package/.next/standalone/bin/spaces-dev.js +247 -0
- package/.next/standalone/bin/spaces-install.js +638 -0
- package/.next/standalone/bin/spaces-reset-totp.js +50 -0
- package/.next/standalone/bin/spaces-service.js +1020 -0
- package/.next/standalone/bin/spaces-setup.js +253 -0
- package/.next/standalone/bin/spaces.js +788 -0
- package/.next/standalone/bin/ssh-auth-keys.sh +68 -0
- package/.next/standalone/bin/terminal-server.js +1807 -0
- package/.next/standalone/docker-compose.yml +28 -0
- package/.next/standalone/docs/architecture.md +387 -0
- package/.next/standalone/docs/cortex.md +293 -0
- package/.next/standalone/docs/getting-started.md +96 -0
- package/.next/standalone/docs/plans/2026-02-24-multi-agent-sessions-design.md +133 -0
- package/.next/standalone/docs/plans/2026-02-24-multi-agent-sessions-plan.md +959 -0
- package/.next/standalone/docs/plans/2026-03-07-service-command-design.md +146 -0
- package/.next/standalone/docs/plans/2026-03-07-service-command-plan.md +254 -0
- package/.next/standalone/docs/server-install.md +564 -0
- package/.next/standalone/docs/social-card.html +150 -0
- package/.next/standalone/docs/superpowers/plans/2026-03-12-spaces-cortex.md +5270 -0
- package/.next/standalone/docs/superpowers/plans/2026-03-13-cortex-wiring.md +1387 -1387
- package/.next/standalone/docs/superpowers/plans/2026-03-14-cortex-v2-entity-graph.md +1923 -1923
- package/.next/standalone/docs/superpowers/plans/2026-03-14-cortex-v2-knowledge-evolution.md +1113 -1113
- package/.next/standalone/docs/superpowers/plans/2026-03-15-cortex-v2-boundary-engine.md +853 -853
- package/.next/standalone/docs/superpowers/plans/2026-03-15-cortex-v2-context-engine.md +1274 -1274
- package/.next/standalone/docs/superpowers/plans/2026-03-15-cortex-v2-signal-ingestion.md +933 -933
- package/.next/standalone/docs/superpowers/plans/2026-03-16-cortex-lobes.md +1080 -1080
- package/.next/standalone/docs/superpowers/plans/2026-03-16-cortex-v2-gravity-system.md +768 -768
- package/.next/standalone/docs/superpowers/plans/2026-03-16-cortex-v2-ui.md +1108 -1108
- package/.next/standalone/docs/superpowers/plans/2026-03-18-cortex-ui-integration.md +1846 -1846
- package/.next/standalone/docs/superpowers/plans/2026-03-19-vr-phase1-shell.md +1639 -0
- package/.next/standalone/docs/superpowers/specs/2026-03-11-universe-view-design.md +320 -0
- package/.next/standalone/docs/superpowers/specs/2026-03-12-spaces-brain-design.md +720 -0
- package/.next/standalone/docs/superpowers/specs/2026-03-13-cortex-wiring-design.md +268 -268
- package/.next/standalone/docs/superpowers/specs/2026-03-14-cortex-v2-design.md +623 -623
- package/.next/standalone/docs/superpowers/specs/2026-03-16-cortex-lobes-design.md +263 -263
- package/.next/standalone/docs/superpowers/specs/2026-03-16-cortex-v2-ui-design.md +240 -240
- package/.next/standalone/docs/superpowers/specs/2026-03-16-pane-ux-design.md +77 -0
- package/.next/standalone/docs/superpowers/specs/2026-03-18-cortex-ui-integration-design.md +341 -341
- package/.next/standalone/docs/superpowers/specs/2026-03-19-vr-phase1-shell-design.md +288 -0
- package/.next/standalone/docs/tiers.md +104 -0
- package/.next/standalone/eslint.config.mjs +18 -0
- package/.next/standalone/next.config.ts +20 -0
- package/.next/standalone/nginx.conf +53 -0
- package/.next/standalone/node_modules/@img/sharp-libvips-linux-x64/README.md +46 -0
- package/.next/standalone/node_modules/@img/sharp-libvips-linux-x64/lib/glib-2.0/include/glibconfig.h +221 -0
- package/.next/standalone/node_modules/@img/sharp-libvips-linux-x64/lib/index.js +1 -0
- package/.next/standalone/node_modules/@img/sharp-libvips-linux-x64/lib/libvips-cpp.so.8.17.3 +0 -0
- package/.next/standalone/node_modules/@img/sharp-libvips-linux-x64/package.json +42 -0
- package/.next/standalone/node_modules/@img/sharp-libvips-linuxmusl-x64/README.md +46 -0
- package/.next/standalone/node_modules/@img/sharp-libvips-linuxmusl-x64/lib/glib-2.0/include/glibconfig.h +221 -0
- package/.next/standalone/node_modules/@img/sharp-libvips-linuxmusl-x64/lib/index.js +1 -0
- package/.next/standalone/node_modules/@img/sharp-libvips-linuxmusl-x64/lib/libvips-cpp.so.8.17.3 +0 -0
- package/.next/standalone/node_modules/@img/sharp-libvips-linuxmusl-x64/package.json +42 -0
- package/.next/standalone/node_modules/@img/sharp-libvips-linuxmusl-x64/versions.json +30 -0
- package/.next/standalone/node_modules/@img/sharp-linux-x64/lib/sharp-linux-x64.node +0 -0
- package/.next/standalone/node_modules/@img/{sharp-win32-x64 → sharp-linux-x64}/package.json +46 -39
- package/.next/standalone/node_modules/@img/sharp-linuxmusl-x64/lib/sharp-linuxmusl-x64.node +0 -0
- package/.next/standalone/node_modules/@img/sharp-linuxmusl-x64/package.json +46 -0
- package/.next/standalone/package-lock.json +14154 -0
- package/.next/standalone/package.json +104 -104
- package/.next/standalone/postcss.config.mjs +7 -0
- package/.next/standalone/scripts/rebuild.cmd +65 -0
- package/.next/standalone/scripts/rebuild.sh +59 -0
- package/.next/standalone/server.js +1 -1
- package/.next/standalone/src/app/(desktop)/admin/analytics/page.tsx +266 -0
- package/.next/standalone/src/app/(desktop)/admin/users/page.tsx +399 -0
- package/.next/standalone/src/app/(desktop)/analytics/page.tsx +166 -0
- package/.next/standalone/src/app/(desktop)/cortex/page.tsx +81 -78
- package/.next/standalone/src/app/(desktop)/dashboard-client.tsx +56 -0
- package/.next/standalone/src/app/(desktop)/layout.tsx +18 -0
- package/.next/standalone/src/app/(desktop)/network/page.tsx +137 -0
- package/.next/standalone/src/app/(desktop)/page.tsx +17 -0
- package/.next/standalone/src/app/(desktop)/projects/page.tsx +68 -0
- package/.next/standalone/src/app/(desktop)/sessions/[id]/page.tsx +519 -0
- package/.next/standalone/src/app/(desktop)/sessions/page.tsx +145 -0
- package/.next/standalone/src/app/(desktop)/settings/page.tsx +446 -0
- package/.next/standalone/src/app/(desktop)/terminal/layout.tsx +7 -0
- package/.next/standalone/src/app/(desktop)/terminal/page.tsx +1151 -0
- package/.next/standalone/src/app/(desktop)/terminal/pane/[id]/page.tsx +211 -0
- package/.next/standalone/src/app/(desktop)/terminal/remote/[nodeId]/[workspaceId]/page.tsx +192 -0
- package/.next/standalone/src/app/(desktop)/workspaces/page.tsx +12 -0
- package/.next/standalone/src/app/api/admin/analytics/route.ts +10 -0
- package/.next/standalone/src/app/api/admin/users/[id]/route.ts +20 -0
- package/.next/standalone/src/app/api/admin/users/route.ts +15 -0
- package/.next/standalone/src/app/api/analytics/overview/route.ts +80 -0
- package/.next/standalone/src/app/api/auth/login/route.ts +10 -0
- package/.next/standalone/src/app/api/auth/logout/route.ts +9 -0
- package/.next/standalone/src/app/api/auth/me/route.ts +22 -0
- package/.next/standalone/src/app/api/auth/totp/setup/route.ts +10 -0
- package/.next/standalone/src/app/api/auth/totp/status/route.ts +10 -0
- package/.next/standalone/src/app/api/auth/totp/verify/route.ts +10 -0
- package/.next/standalone/src/app/api/benchmark/lobes/route.ts +16 -0
- package/.next/standalone/src/app/api/benchmark/run/route.ts +92 -0
- package/.next/standalone/src/app/api/benchmark/runs/[id]/route.ts +26 -0
- package/.next/standalone/src/app/api/benchmark/runs/route.ts +16 -0
- package/.next/standalone/src/app/api/benchmark/status/route.ts +35 -0
- package/.next/standalone/src/app/api/bulk/route.ts +34 -0
- package/.next/standalone/src/app/api/chat/route.ts +85 -0
- package/.next/standalone/src/app/api/config/route.ts +30 -0
- package/.next/standalone/src/app/api/cortex/context/route.ts +78 -78
- package/.next/standalone/src/app/api/cortex/curation/assess/route.ts +27 -27
- package/.next/standalone/src/app/api/cortex/curation/publish/route.ts +23 -23
- package/.next/standalone/src/app/api/cortex/curation/refine/route.ts +23 -23
- package/.next/standalone/src/app/api/cortex/curation/review/route.ts +29 -29
- package/.next/standalone/src/app/api/cortex/curation/seed/route.ts +23 -23
- package/.next/standalone/src/app/api/cortex/export/route.ts +40 -40
- package/.next/standalone/src/app/api/cortex/federation/pending/route.ts +20 -20
- package/.next/standalone/src/app/api/cortex/federation/resolve/route.ts +43 -43
- package/.next/standalone/src/app/api/cortex/federation/search/route.ts +35 -35
- package/.next/standalone/src/app/api/cortex/federation/teach/route.ts +76 -76
- package/.next/standalone/src/app/api/cortex/graph/edges/route.ts +112 -112
- package/.next/standalone/src/app/api/cortex/graph/entities/[id]/route.ts +73 -73
- package/.next/standalone/src/app/api/cortex/graph/entities/route.ts +75 -75
- package/.next/standalone/src/app/api/cortex/graph/populate/route.ts +203 -203
- package/.next/standalone/src/app/api/cortex/import/route.ts +75 -75
- package/.next/standalone/src/app/api/cortex/import/status/route.ts +15 -15
- package/.next/standalone/src/app/api/cortex/ingest/bootstrap/route.ts +29 -29
- package/.next/standalone/src/app/api/cortex/ingest/status/route.ts +15 -15
- package/.next/standalone/src/app/api/cortex/knowledge/[id]/route.ts +91 -91
- package/.next/standalone/src/app/api/cortex/knowledge/route.ts +93 -93
- package/.next/standalone/src/app/api/cortex/lobes/[id]/route.ts +67 -67
- package/.next/standalone/src/app/api/cortex/lobes/route.ts +22 -22
- package/.next/standalone/src/app/api/cortex/lobes/share/route.ts +80 -80
- package/.next/standalone/src/app/api/cortex/marketplace/browse/route.ts +43 -43
- package/.next/standalone/src/app/api/cortex/marketplace/preview/route.ts +46 -46
- package/.next/standalone/src/app/api/cortex/mcp/call/route.ts +11 -11
- package/.next/standalone/src/app/api/cortex/mcp/tools/route.ts +6 -6
- package/.next/standalone/src/app/api/cortex/search/route.ts +43 -43
- package/.next/standalone/src/app/api/cortex/settings/route.ts +33 -33
- package/.next/standalone/src/app/api/cortex/status/route.ts +169 -169
- package/.next/standalone/src/app/api/cortex/timeline/route.ts +42 -42
- package/.next/standalone/src/app/api/cortex/usage/route.ts +31 -31
- package/.next/standalone/src/app/api/cortex/workspace/[id]/context/route.ts +41 -41
- package/.next/standalone/src/app/api/events/route.ts +40 -0
- package/.next/standalone/src/app/api/files/route.ts +187 -0
- package/.next/standalone/src/app/api/folders/route.ts +97 -0
- package/.next/standalone/src/app/api/network/connect-callback/route.ts +11 -0
- package/.next/standalone/src/app/api/network/connect-request/[id]/route.ts +11 -0
- package/.next/standalone/src/app/api/network/connect-request/route.ts +17 -0
- package/.next/standalone/src/app/api/network/discovered/route.ts +9 -0
- package/.next/standalone/src/app/api/network/handshake/route.ts +25 -0
- package/.next/standalone/src/app/api/network/health/route.ts +10 -0
- package/.next/standalone/src/app/api/network/identity/route.ts +15 -0
- package/.next/standalone/src/app/api/network/keys/[id]/route.ts +10 -0
- package/.next/standalone/src/app/api/network/keys/route.ts +15 -0
- package/.next/standalone/src/app/api/network/nodes/[id]/route.ts +15 -0
- package/.next/standalone/src/app/api/network/nodes/check/route.ts +9 -0
- package/.next/standalone/src/app/api/network/nodes/route.ts +15 -0
- package/.next/standalone/src/app/api/network/projects/route.ts +25 -0
- package/.next/standalone/src/app/api/network/proxy/[nodeId]/[...path]/route.ts +15 -0
- package/.next/standalone/src/app/api/network/search/route.ts +38 -0
- package/.next/standalone/src/app/api/network/sessions/[id]/messages/route.ts +36 -0
- package/.next/standalone/src/app/api/network/sessions/[id]/route.ts +34 -0
- package/.next/standalone/src/app/api/network/sessions/route.ts +43 -0
- package/.next/standalone/src/app/api/network/terminal/token/route.ts +10 -0
- package/.next/standalone/src/app/api/network/workspaces/[id]/route.ts +34 -0
- package/.next/standalone/src/app/api/network/workspaces/route.ts +61 -0
- package/.next/standalone/src/app/api/panes/[id]/route.ts +60 -0
- package/.next/standalone/src/app/api/panes/route.ts +39 -0
- package/.next/standalone/src/app/api/projects/route.ts +13 -0
- package/.next/standalone/src/app/api/search/route.ts +47 -0
- package/.next/standalone/src/app/api/sessions/[id]/chat/route.ts +120 -0
- package/.next/standalone/src/app/api/sessions/[id]/messages/route.ts +28 -0
- package/.next/standalone/src/app/api/sessions/[id]/route.ts +73 -0
- package/.next/standalone/src/app/api/sessions/route.ts +64 -0
- package/.next/standalone/src/app/api/sync/route.ts +24 -0
- package/.next/standalone/src/app/api/tags/route.ts +35 -0
- package/.next/standalone/src/app/api/tier/route.ts +16 -0
- package/.next/standalone/src/app/api/updates/route.ts +53 -0
- package/.next/standalone/src/app/api/whisper/route.ts +90 -0
- package/.next/standalone/src/app/api/workspaces/[id]/context/[key]/route.ts +39 -0
- package/.next/standalone/src/app/api/workspaces/[id]/context/route.ts +28 -0
- package/.next/standalone/src/app/api/workspaces/[id]/messages/[msgId]/route.ts +17 -0
- package/.next/standalone/src/app/api/workspaces/[id]/messages/route.ts +39 -0
- package/.next/standalone/src/app/api/workspaces/[id]/route.ts +47 -0
- package/.next/standalone/src/app/api/workspaces/[id]/sessions/route.ts +62 -0
- package/.next/standalone/src/app/api/workspaces/route.ts +79 -0
- package/.next/standalone/src/app/globals.css +85 -0
- package/.next/standalone/src/app/icon.png +0 -0
- package/.next/standalone/src/app/layout.tsx +33 -0
- package/.next/standalone/src/app/login/layout.tsx +7 -0
- package/.next/standalone/src/app/login/page.tsx +315 -0
- package/.next/standalone/src/app/m/layout.tsx +16 -0
- package/.next/standalone/src/app/m/page.tsx +118 -0
- package/.next/standalone/src/app/m/projects/page.tsx +64 -0
- package/.next/standalone/src/app/m/sessions/[id]/page.tsx +168 -0
- package/.next/standalone/src/app/m/sessions/page.tsx +177 -0
- package/.next/standalone/src/app/m/settings/page.tsx +230 -0
- package/.next/standalone/src/app/m/terminal/page.tsx +413 -0
- package/.next/standalone/src/app/vr/page.tsx +21 -0
- package/.next/standalone/src/app/vr/vr-app.tsx +163 -0
- package/.next/standalone/src/app/vr/vr-controls.tsx +139 -0
- package/.next/standalone/src/app/vr/vr-door.tsx +82 -0
- package/.next/standalone/src/app/vr/vr-environment.tsx +71 -0
- package/.next/standalone/src/app/vr/vr-gaze.tsx +89 -0
- package/.next/standalone/src/app/vr/vr-layout.ts +49 -0
- package/.next/standalone/src/app/vr/vr-lobby.tsx +97 -0
- package/.next/standalone/src/app/vr/vr-pane.tsx +195 -0
- package/.next/standalone/src/app/vr/vr-room.tsx +79 -0
- package/.next/standalone/src/app/vr/vr-terminal.tsx +303 -0
- package/.next/standalone/src/components/auth/totp-gate.tsx +183 -0
- package/.next/standalone/src/components/bus/activity-panel.tsx +261 -0
- package/.next/standalone/src/components/common/color-picker.tsx +35 -0
- package/.next/standalone/src/components/common/dev-directory-picker.tsx +339 -0
- package/.next/standalone/src/components/common/folder-picker.tsx +200 -0
- package/.next/standalone/src/components/common/tag-picker.tsx +190 -0
- package/.next/standalone/src/components/common/workspace-picker.tsx +113 -0
- package/.next/standalone/src/components/cortex/benchmark-tab.tsx +880 -0
- package/.next/standalone/src/components/cortex/constants.ts +29 -29
- package/.next/standalone/src/components/cortex/cortex-dashboard.tsx +304 -304
- package/.next/standalone/src/components/cortex/cortex-indicator.tsx +44 -44
- package/.next/standalone/src/components/cortex/cortex-panel.tsx +140 -140
- package/.next/standalone/src/components/cortex/cortex-settings.tsx +221 -221
- package/.next/standalone/src/components/cortex/curation-tab.tsx +810 -810
- package/.next/standalone/src/components/cortex/entity-detail.tsx +101 -101
- package/.next/standalone/src/components/cortex/entity-graph.tsx +382 -382
- package/.next/standalone/src/components/cortex/import-dialog.tsx +212 -212
- package/.next/standalone/src/components/cortex/injection-badge.tsx +72 -72
- package/.next/standalone/src/components/cortex/knowledge-card.tsx +109 -109
- package/.next/standalone/src/components/cortex/knowledge-tab.tsx +158 -158
- package/.next/standalone/src/components/cortex/lobe-settings.tsx +215 -215
- package/.next/standalone/src/components/cortex/marketplace-card.tsx +126 -126
- package/.next/standalone/src/components/cortex/marketplace-tab.tsx +113 -113
- package/.next/standalone/src/components/dashboard/activity-chart.tsx +41 -0
- package/.next/standalone/src/components/dashboard/model-usage-chart.tsx +61 -0
- package/.next/standalone/src/components/dashboard/recent-sessions.tsx +68 -0
- package/.next/standalone/src/components/dashboard/stats-cards.tsx +36 -0
- package/.next/standalone/src/components/files/file-explorer.tsx +703 -0
- package/.next/standalone/src/components/layout/providers.tsx +38 -0
- package/.next/standalone/src/components/layout/sidebar.tsx +170 -0
- package/.next/standalone/src/components/layout/tier-provider.tsx +53 -0
- package/.next/standalone/src/components/layout/update-banner.tsx +92 -0
- package/.next/standalone/src/components/mobile/bottom-nav.tsx +46 -0
- package/.next/standalone/src/components/mobile/mobile-chat-input.tsx +244 -0
- package/.next/standalone/src/components/mobile/mobile-header.tsx +44 -0
- package/.next/standalone/src/components/mobile/mobile-session-card.tsx +56 -0
- package/.next/standalone/src/components/mobile/mobile-terminal-input.tsx +71 -0
- package/.next/standalone/src/components/mobile/mobile-terminal-pane.tsx +300 -0
- package/.next/standalone/src/components/mobile/mobile-terminal-toolbar.tsx +53 -0
- package/.next/standalone/src/components/mobile/pull-to-refresh.tsx +82 -0
- package/.next/standalone/src/components/mobile/voice-input.tsx +53 -0
- package/.next/standalone/src/components/network/api-key-list.tsx +190 -0
- package/.next/standalone/src/components/network/connection-requests.tsx +94 -0
- package/.next/standalone/src/components/network/node-add-dialog.tsx +131 -0
- package/.next/standalone/src/components/network/node-badge.tsx +26 -0
- package/.next/standalone/src/components/network/node-list.tsx +207 -0
- package/.next/standalone/src/components/network/node-selector.tsx +49 -0
- package/.next/standalone/src/components/sessions/session-filters.tsx +116 -0
- package/.next/standalone/src/components/sessions/session-list.tsx +485 -0
- package/.next/standalone/src/components/terminal/terminal-pane.tsx +874 -0
- package/.next/standalone/src/components/viewer/chat-input.tsx +275 -0
- package/.next/standalone/src/components/viewer/message-renderer.tsx +551 -0
- package/.next/standalone/src/components/workspace/universe-cluster.tsx +131 -0
- package/.next/standalone/src/components/workspace/universe-orb.tsx +128 -0
- package/.next/standalone/src/components/workspace/universe-types.ts +22 -0
- package/.next/standalone/src/components/workspace/universe-utils.ts +11 -0
- package/.next/standalone/src/components/workspace/universe-view.tsx +397 -0
- package/.next/standalone/src/components/workspace/workspace-chooser.tsx +616 -0
- package/.next/standalone/src/hooks/use-benchmark.ts +71 -0
- package/.next/standalone/src/hooks/use-bus.ts +147 -0
- package/.next/standalone/src/hooks/use-idle-detection.ts +79 -0
- package/.next/standalone/src/hooks/use-network.ts +229 -0
- package/.next/standalone/src/hooks/use-sessions.ts +437 -0
- package/.next/standalone/src/hooks/use-speech-recognition.ts +113 -0
- package/.next/standalone/src/hooks/use-sse.ts +35 -0
- package/.next/standalone/src/hooks/use-tier.ts +39 -0
- package/.next/standalone/src/lib/agents.ts +70 -0
- package/.next/standalone/src/lib/aider/parser.ts +111 -0
- package/.next/standalone/src/lib/api.ts +19 -0
- package/.next/standalone/src/lib/auth.ts +47 -0
- package/.next/standalone/src/lib/claude/parser.ts +212 -0
- package/.next/standalone/src/lib/claude/stats.ts +204 -0
- package/.next/standalone/src/lib/codex/parser.ts +265 -0
- package/.next/standalone/src/lib/config.ts +115 -0
- package/.next/standalone/src/lib/cortex/benchmark.ts +67 -0
- package/.next/standalone/src/lib/cortex/config.ts +40 -40
- package/.next/standalone/src/lib/cortex/debug.ts +10 -10
- package/.next/standalone/src/lib/cortex/distillation/usage-store.ts +18 -18
- package/.next/standalone/src/lib/cortex/graph/resolver.ts +10 -10
- package/.next/standalone/src/lib/cortex/graph/types.ts +22 -22
- package/.next/standalone/src/lib/cortex/index.ts +56 -56
- package/.next/standalone/src/lib/cortex/ingestion/bootstrap.ts +14 -14
- package/.next/standalone/src/lib/cortex/knowledge/compat.ts +14 -14
- package/.next/standalone/src/lib/cortex/knowledge/contradiction.ts +10 -10
- package/.next/standalone/src/lib/cortex/knowledge/types.ts +67 -67
- package/.next/standalone/src/lib/cortex/lobes/config.ts +16 -16
- package/.next/standalone/src/lib/cortex/lobes/resolver.ts +8 -8
- package/.next/standalone/src/lib/cortex/lobes/shares.ts +14 -14
- package/.next/standalone/src/lib/cortex/mcp/server.ts +8 -8
- package/.next/standalone/src/lib/cortex/portability/exporter.ts +6 -6
- package/.next/standalone/src/lib/cortex/portability/importer.ts +10 -10
- package/.next/standalone/src/lib/cortex/retrieval/context-engine.ts +10 -10
- package/.next/standalone/src/lib/cortex/types.ts +39 -39
- package/.next/standalone/src/lib/cost-calculator.ts +48 -0
- package/.next/standalone/src/lib/db/init.ts +71 -0
- package/.next/standalone/src/lib/db/queries.ts +718 -0
- package/.next/standalone/src/lib/db/schema.ts +202 -0
- package/.next/standalone/src/lib/events/sse.ts +36 -0
- package/.next/standalone/src/lib/gemini/parser.ts +216 -0
- package/.next/standalone/src/lib/license.ts +56 -0
- package/.next/standalone/src/lib/pro.ts +31 -0
- package/.next/standalone/src/lib/sync/indexer.ts +429 -0
- package/.next/standalone/src/lib/sync/watcher.ts +64 -0
- package/.next/standalone/src/lib/teams.ts +31 -0
- package/.next/standalone/src/lib/telemetry.ts +75 -0
- package/.next/standalone/src/lib/terminal/server.ts +128 -0
- package/.next/standalone/src/lib/tier.ts +38 -0
- package/.next/standalone/src/lib/utils.ts +72 -0
- package/.next/standalone/src/middleware.ts +133 -0
- package/.next/standalone/src/types/claude.ts +208 -0
- package/.next/standalone/src/types/network.ts +61 -0
- package/.next/standalone/tests/setup.ts +8 -0
- package/.next/standalone/tsconfig.json +34 -34
- package/.next/standalone/vitest.config.ts +24 -0
- package/LICENSE +661 -661
- package/README.md +131 -131
- package/bin/cortex-hook.sh +62 -62
- package/bin/cortex-mcp.js +60 -60
- package/bin/fix-standalone-externals.js +79 -79
- package/bin/lib/auto-setup.js +110 -110
- package/bin/mdns-service.js +171 -171
- package/bin/postinstall.js +35 -35
- package/bin/setup-admin.js +195 -195
- package/bin/spaces-dev.js +247 -208
- package/bin/spaces-install.js +638 -599
- package/bin/spaces-reset-totp.js +50 -50
- package/bin/spaces-service.js +1020 -1020
- package/bin/spaces-setup.js +253 -253
- package/bin/spaces.js +788 -776
- package/bin/ssh-auth-keys.sh +68 -68
- package/bin/terminal-server.js +1807 -1683
- package/package.json +104 -104
- package/.next/standalone/.claude/settings.local.json +0 -55
- package/.next/standalone/.claude/spaces-env.json +0 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__e921fdfc._.js +0 -5
- package/.next/standalone/.next/server/chunks/ssr/_2230ad2d._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/_5cf334fd._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/_db0abd0a._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/_db2fec84._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/_f4e57187._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/src_40fa36ce._.js +0 -7
- package/.next/standalone/.next/static/chunks/003e7aa1adfe577d.js +0 -1
- package/.next/standalone/.next/static/chunks/158b52b84e647ac1.js +0 -5
- package/.next/standalone/.next/static/chunks/232d8aae4fefab70.js +0 -1
- package/.next/standalone/.next/static/chunks/5325351ef49cb65f.js +0 -1
- package/.next/standalone/.next/static/chunks/559735e598ca3cbb.js +0 -1
- package/.next/standalone/.next/static/chunks/5d5d7b0095dd52ae.js +0 -1
- package/.next/standalone/.next/static/chunks/898f380eba90427a.js +0 -1
- package/.next/standalone/.next/static/chunks/95339e55722bb4ca.js +0 -5
- package/.next/standalone/.next/static/chunks/9cd594813c539df9.js +0 -1
- package/.next/standalone/.next/static/chunks/c1a95aebf6725f64.css +0 -3
- package/.next/standalone/.next/static/chunks/c515eb77d9410aa0.js +0 -5
- package/.next/standalone/.next/static/chunks/d9ae203a7f123546.js +0 -5
- package/.next/standalone/.next/static/chunks/f9f2628207848ac2.js +0 -1
- package/.next/standalone/.spaces/cortex-context.md +0 -70
- package/.next/standalone/node_modules/@img/sharp-win32-x64/lib/sharp-win32-x64.node +0 -0
- /package/.next/standalone/.next/static/{BEY-sql3lQLouidpurSQf → PcpzUspSK8QDdwzAJz8br}/_buildManifest.js +0 -0
- /package/.next/standalone/.next/static/{BEY-sql3lQLouidpurSQf → PcpzUspSK8QDdwzAJz8br}/_clientMiddlewareManifest.json +0 -0
- /package/.next/standalone/.next/static/{BEY-sql3lQLouidpurSQf → PcpzUspSK8QDdwzAJz8br}/_ssgManifest.js +0 -0
- /package/.next/standalone/node_modules/@img/{sharp-win32-x64 → sharp-libvips-linux-x64}/versions.json +0 -0
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* mDNS service: advertises this Spaces node on the LAN and discovers peers.
|
|
3
|
+
* Required by terminal-server.js.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
const fs = require('fs');
|
|
7
|
+
const path = require('path');
|
|
8
|
+
const os = require('os');
|
|
9
|
+
|
|
10
|
+
const NODE_JSON_PATH = path.join(os.homedir(), '.spaces', 'node.json');
|
|
11
|
+
const NETWORK_DB_PATH = path.join(os.homedir(), '.spaces', 'network.db');
|
|
12
|
+
|
|
13
|
+
function getNodeIdentity() {
|
|
14
|
+
try {
|
|
15
|
+
if (fs.existsSync(NODE_JSON_PATH)) {
|
|
16
|
+
return JSON.parse(fs.readFileSync(NODE_JSON_PATH, 'utf-8'));
|
|
17
|
+
}
|
|
18
|
+
} catch { /* ignore */ }
|
|
19
|
+
|
|
20
|
+
// Create lazily
|
|
21
|
+
const crypto = require('crypto');
|
|
22
|
+
const identity = {
|
|
23
|
+
nodeId: crypto.randomUUID(),
|
|
24
|
+
nodeName: os.hostname(),
|
|
25
|
+
createdAt: new Date().toISOString(),
|
|
26
|
+
};
|
|
27
|
+
const dir = path.dirname(NODE_JSON_PATH);
|
|
28
|
+
if (!fs.existsSync(dir)) {
|
|
29
|
+
fs.mkdirSync(dir, { recursive: true });
|
|
30
|
+
}
|
|
31
|
+
fs.writeFileSync(NODE_JSON_PATH, JSON.stringify(identity, null, 2), { mode: 0o600 });
|
|
32
|
+
return identity;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
function getVersion() {
|
|
36
|
+
try {
|
|
37
|
+
const pkgPath = path.join(__dirname, '..', 'package.json');
|
|
38
|
+
const pkg = JSON.parse(fs.readFileSync(pkgPath, 'utf-8'));
|
|
39
|
+
return pkg.version || '0.0.0';
|
|
40
|
+
} catch {
|
|
41
|
+
return '0.0.0';
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
let _networkDbRW = null;
|
|
46
|
+
|
|
47
|
+
function getNetworkDbRW() {
|
|
48
|
+
if (_networkDbRW) return _networkDbRW;
|
|
49
|
+
try {
|
|
50
|
+
const Database = require('better-sqlite3');
|
|
51
|
+
const dir = path.dirname(NETWORK_DB_PATH);
|
|
52
|
+
if (!fs.existsSync(dir)) fs.mkdirSync(dir, { recursive: true });
|
|
53
|
+
const db = new Database(NETWORK_DB_PATH);
|
|
54
|
+
db.pragma('journal_mode = WAL');
|
|
55
|
+
db.pragma('busy_timeout = 5000');
|
|
56
|
+
db.exec(`
|
|
57
|
+
CREATE TABLE IF NOT EXISTS nodes (
|
|
58
|
+
id TEXT PRIMARY KEY,
|
|
59
|
+
name TEXT NOT NULL,
|
|
60
|
+
url TEXT NOT NULL,
|
|
61
|
+
api_key_encrypted TEXT NOT NULL DEFAULT '',
|
|
62
|
+
api_key_hint TEXT NOT NULL DEFAULT '',
|
|
63
|
+
status TEXT NOT NULL DEFAULT 'unknown',
|
|
64
|
+
last_seen TEXT,
|
|
65
|
+
last_error TEXT,
|
|
66
|
+
session_count INTEGER DEFAULT 0,
|
|
67
|
+
version TEXT,
|
|
68
|
+
discovered_via TEXT DEFAULT 'manual',
|
|
69
|
+
created TEXT DEFAULT (datetime('now')),
|
|
70
|
+
updated TEXT DEFAULT (datetime('now'))
|
|
71
|
+
);
|
|
72
|
+
`);
|
|
73
|
+
_networkDbRW = db;
|
|
74
|
+
return db;
|
|
75
|
+
} catch (err) {
|
|
76
|
+
console.error('[mDNS] Failed to open network DB:', err.message);
|
|
77
|
+
return null;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
function upsertDiscoveredNode(info) {
|
|
82
|
+
const db = getNetworkDbRW();
|
|
83
|
+
if (!db) return;
|
|
84
|
+
try {
|
|
85
|
+
db.prepare(`
|
|
86
|
+
INSERT INTO nodes (id, name, url, api_key_encrypted, api_key_hint, status, version, discovered_via, last_seen)
|
|
87
|
+
VALUES (?, ?, ?, '', '', 'online', ?, 'mdns', datetime('now'))
|
|
88
|
+
ON CONFLICT(id) DO UPDATE SET
|
|
89
|
+
name = excluded.name,
|
|
90
|
+
url = excluded.url,
|
|
91
|
+
version = excluded.version,
|
|
92
|
+
status = 'online',
|
|
93
|
+
last_seen = datetime('now'),
|
|
94
|
+
updated = datetime('now')
|
|
95
|
+
`).run(info.nodeId, info.nodeName, info.url, info.version);
|
|
96
|
+
console.log(`[mDNS] Discovered: ${info.nodeName} at ${info.url}`);
|
|
97
|
+
} catch (err) {
|
|
98
|
+
console.error('[mDNS] DB upsert error:', err.message);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
function markNodeOffline(nodeId) {
|
|
103
|
+
const db = getNetworkDbRW();
|
|
104
|
+
if (!db) return;
|
|
105
|
+
try {
|
|
106
|
+
db.prepare(`
|
|
107
|
+
UPDATE nodes SET status = 'offline', updated = datetime('now')
|
|
108
|
+
WHERE id = ? AND discovered_via = 'mdns'
|
|
109
|
+
`).run(nodeId);
|
|
110
|
+
} catch { /* ignore */ }
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
function startMdns(port) {
|
|
114
|
+
let Bonjour;
|
|
115
|
+
try {
|
|
116
|
+
Bonjour = require('bonjour-service').Bonjour;
|
|
117
|
+
} catch (err) {
|
|
118
|
+
console.log('[mDNS] bonjour-service not available, skipping discovery:', err.message);
|
|
119
|
+
return;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
const identity = getNodeIdentity();
|
|
123
|
+
const version = getVersion();
|
|
124
|
+
const bonjour = new Bonjour();
|
|
125
|
+
|
|
126
|
+
// Advertise this node
|
|
127
|
+
const service = bonjour.publish({
|
|
128
|
+
name: identity.nodeName,
|
|
129
|
+
type: 'spaces-agent',
|
|
130
|
+
port: port,
|
|
131
|
+
txt: {
|
|
132
|
+
nodeId: identity.nodeId,
|
|
133
|
+
version: version,
|
|
134
|
+
protocol: 'http',
|
|
135
|
+
},
|
|
136
|
+
});
|
|
137
|
+
|
|
138
|
+
console.log(`[mDNS] Advertising as "${identity.nodeName}" (${identity.nodeId.slice(0, 8)}) on port ${port}`);
|
|
139
|
+
|
|
140
|
+
// Browse for peers
|
|
141
|
+
const browser = bonjour.find({ type: 'spaces-agent' });
|
|
142
|
+
|
|
143
|
+
browser.on('up', (svc) => {
|
|
144
|
+
const remoteNodeId = svc.txt?.nodeId;
|
|
145
|
+
if (!remoteNodeId || remoteNodeId === identity.nodeId) return; // Skip self
|
|
146
|
+
|
|
147
|
+
const protocol = svc.txt?.protocol || 'http';
|
|
148
|
+
const host = svc.host || svc.referer?.address;
|
|
149
|
+
if (!host) return;
|
|
150
|
+
|
|
151
|
+
const url = `${protocol}://${host}:${svc.port}`;
|
|
152
|
+
upsertDiscoveredNode({
|
|
153
|
+
nodeId: remoteNodeId,
|
|
154
|
+
nodeName: svc.name || host,
|
|
155
|
+
url,
|
|
156
|
+
version: svc.txt?.version || '',
|
|
157
|
+
});
|
|
158
|
+
});
|
|
159
|
+
|
|
160
|
+
browser.on('down', (svc) => {
|
|
161
|
+
const remoteNodeId = svc.txt?.nodeId;
|
|
162
|
+
if (remoteNodeId && remoteNodeId !== identity.nodeId) {
|
|
163
|
+
markNodeOffline(remoteNodeId);
|
|
164
|
+
console.log(`[mDNS] Node went down: ${svc.name}`);
|
|
165
|
+
}
|
|
166
|
+
});
|
|
167
|
+
|
|
168
|
+
return { bonjour, service, browser };
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
module.exports = { startMdns };
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
// Postinstall script for @jlongo78/agent-spaces
|
|
4
|
+
//
|
|
5
|
+
// 1. Rebuilds better-sqlite3 native addon for the current Node.js version
|
|
6
|
+
// 2. Removes any pre-compiled native modules from the standalone bundle
|
|
7
|
+
// so they resolve from the parent node_modules/ (where they were just rebuilt)
|
|
8
|
+
|
|
9
|
+
const { execSync } = require('child_process');
|
|
10
|
+
const path = require('path');
|
|
11
|
+
const fs = require('fs');
|
|
12
|
+
|
|
13
|
+
// Step 1: Rebuild native modules for this Node version
|
|
14
|
+
console.log('[postinstall] Rebuilding better-sqlite3 for Node', process.version, '...');
|
|
15
|
+
try {
|
|
16
|
+
execSync('npm rebuild better-sqlite3', { stdio: 'inherit' });
|
|
17
|
+
} catch (e) {
|
|
18
|
+
console.error('[postinstall] Warning: failed to rebuild better-sqlite3:', e.message);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
// Step 2: Remove stale native binaries from standalone bundle
|
|
22
|
+
// Next.js standalone mode copies native modules built on the CI Node version.
|
|
23
|
+
// These will crash at runtime if the user's Node version differs.
|
|
24
|
+
const standaloneModules = path.join(__dirname, '..', '.next', 'standalone', 'node_modules');
|
|
25
|
+
const nativeModules = ['better-sqlite3', 'node-pty', 'bindings', 'file-uri-to-path', 'detect-libc'];
|
|
26
|
+
|
|
27
|
+
for (const mod of nativeModules) {
|
|
28
|
+
const modDir = path.join(standaloneModules, mod);
|
|
29
|
+
if (fs.existsSync(modDir)) {
|
|
30
|
+
fs.rmSync(modDir, { recursive: true, force: true });
|
|
31
|
+
console.log(`[postinstall] Removed stale native module from standalone: ${mod}`);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
console.log('[postinstall] Done.');
|
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const Database = require('better-sqlite3');
|
|
4
|
+
const crypto = require('crypto');
|
|
5
|
+
const readline = require('readline');
|
|
6
|
+
const path = require('path');
|
|
7
|
+
const fs = require('fs');
|
|
8
|
+
const os = require('os');
|
|
9
|
+
|
|
10
|
+
const SPACES_DIR = path.join(os.homedir(), '.spaces');
|
|
11
|
+
const ADMIN_DB_PATH = path.join(SPACES_DIR, 'admin.db');
|
|
12
|
+
const SESSION_SECRET_PATH = path.join(SPACES_DIR, 'session_secret');
|
|
13
|
+
|
|
14
|
+
function prompt(rl, question) {
|
|
15
|
+
return new Promise((resolve) => rl.question(question, resolve));
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
function promptHidden(rl, question) {
|
|
19
|
+
return new Promise((resolve) => {
|
|
20
|
+
const stdin = process.stdin;
|
|
21
|
+
const stdout = process.stdout;
|
|
22
|
+
stdout.write(question);
|
|
23
|
+
stdin.setRawMode(true);
|
|
24
|
+
stdin.resume();
|
|
25
|
+
stdin.setEncoding('utf8');
|
|
26
|
+
|
|
27
|
+
let password = '';
|
|
28
|
+
const onData = (ch) => {
|
|
29
|
+
if (ch === '\n' || ch === '\r' || ch === '\u0004') {
|
|
30
|
+
stdin.setRawMode(false);
|
|
31
|
+
stdin.pause();
|
|
32
|
+
stdin.removeListener('data', onData);
|
|
33
|
+
stdout.write('\n');
|
|
34
|
+
resolve(password);
|
|
35
|
+
} else if (ch === '\u0003') {
|
|
36
|
+
// Ctrl+C
|
|
37
|
+
process.exit(1);
|
|
38
|
+
} else if (ch === '\u007F' || ch === '\b') {
|
|
39
|
+
// Backspace
|
|
40
|
+
if (password.length > 0) {
|
|
41
|
+
password = password.slice(0, -1);
|
|
42
|
+
stdout.write('\b \b');
|
|
43
|
+
}
|
|
44
|
+
} else {
|
|
45
|
+
password += ch;
|
|
46
|
+
stdout.write('*');
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
stdin.on('data', onData);
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
function hashPassword(password) {
|
|
54
|
+
const salt = crypto.randomBytes(16).toString('hex');
|
|
55
|
+
const hash = crypto.scryptSync(password, salt, 64).toString('hex');
|
|
56
|
+
return `${salt}:${hash}`;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
async function main() {
|
|
60
|
+
console.log('\n Spaces — Admin Setup\n');
|
|
61
|
+
|
|
62
|
+
// Ensure ~/.spaces directory exists
|
|
63
|
+
if (!fs.existsSync(SPACES_DIR)) {
|
|
64
|
+
fs.mkdirSync(SPACES_DIR, { recursive: true });
|
|
65
|
+
console.log(` Created ${SPACES_DIR}`);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
// Generate session secret if missing
|
|
69
|
+
let sessionSecretHex;
|
|
70
|
+
if (fs.existsSync(SESSION_SECRET_PATH)) {
|
|
71
|
+
sessionSecretHex = fs.readFileSync(SESSION_SECRET_PATH, 'utf-8').trim();
|
|
72
|
+
console.log(` Session secret already exists at ${SESSION_SECRET_PATH}`);
|
|
73
|
+
} else {
|
|
74
|
+
const secret = crypto.randomBytes(32);
|
|
75
|
+
sessionSecretHex = secret.toString('hex');
|
|
76
|
+
fs.writeFileSync(SESSION_SECRET_PATH, sessionSecretHex, { mode: 0o600 });
|
|
77
|
+
console.log(` Generated session secret at ${SESSION_SECRET_PATH}`);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
// Open/create admin database
|
|
81
|
+
const db = new Database(ADMIN_DB_PATH);
|
|
82
|
+
db.pragma('journal_mode = WAL');
|
|
83
|
+
db.pragma('synchronous = NORMAL');
|
|
84
|
+
db.pragma('foreign_keys = ON');
|
|
85
|
+
|
|
86
|
+
db.exec(`
|
|
87
|
+
CREATE TABLE IF NOT EXISTS users (
|
|
88
|
+
id TEXT PRIMARY KEY,
|
|
89
|
+
username TEXT NOT NULL UNIQUE,
|
|
90
|
+
password_hash TEXT NOT NULL,
|
|
91
|
+
display_name TEXT NOT NULL DEFAULT '',
|
|
92
|
+
shell_user TEXT NOT NULL,
|
|
93
|
+
role TEXT NOT NULL DEFAULT 'user',
|
|
94
|
+
totp_secret TEXT,
|
|
95
|
+
totp_enabled INTEGER DEFAULT 0,
|
|
96
|
+
created TEXT DEFAULT (datetime('now'))
|
|
97
|
+
);
|
|
98
|
+
`);
|
|
99
|
+
|
|
100
|
+
console.log(` Admin database at ${ADMIN_DB_PATH}\n`);
|
|
101
|
+
|
|
102
|
+
// Check if admin already exists
|
|
103
|
+
const existingAdmin = db.prepare("SELECT username FROM users WHERE role = 'admin' LIMIT 1").get();
|
|
104
|
+
if (existingAdmin) {
|
|
105
|
+
console.log(` An admin user already exists: ${existingAdmin.username}`);
|
|
106
|
+
console.log(` To create another admin, use the admin panel in the web UI.\n`);
|
|
107
|
+
db.close();
|
|
108
|
+
|
|
109
|
+
console.log(' ─────────────────────────────────────────');
|
|
110
|
+
console.log(` SPACES_SESSION_SECRET=${sessionSecretHex}`);
|
|
111
|
+
console.log(' ─────────────────────────────────────────');
|
|
112
|
+
console.log('\n Set this as an environment variable before starting the server.\n');
|
|
113
|
+
return;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
const rl = readline.createInterface({
|
|
117
|
+
input: process.stdin,
|
|
118
|
+
output: process.stdout,
|
|
119
|
+
});
|
|
120
|
+
|
|
121
|
+
try {
|
|
122
|
+
const username = (await prompt(rl, ' Username: ')).trim();
|
|
123
|
+
if (!username) {
|
|
124
|
+
console.error(' Error: username cannot be empty');
|
|
125
|
+
process.exit(1);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
// Check uniqueness
|
|
129
|
+
const existing = db.prepare('SELECT id FROM users WHERE username = ?').get(username);
|
|
130
|
+
if (existing) {
|
|
131
|
+
console.error(` Error: user "${username}" already exists`);
|
|
132
|
+
process.exit(1);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
rl.close();
|
|
136
|
+
|
|
137
|
+
const password = await promptHidden(null, ' Password: ');
|
|
138
|
+
if (password.length < 8) {
|
|
139
|
+
console.error(' Error: password must be at least 8 characters');
|
|
140
|
+
process.exit(1);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
const confirm = await promptHidden(null, ' Confirm password: ');
|
|
144
|
+
if (password !== confirm) {
|
|
145
|
+
console.error(' Error: passwords do not match');
|
|
146
|
+
process.exit(1);
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
const rl2 = readline.createInterface({
|
|
150
|
+
input: process.stdin,
|
|
151
|
+
output: process.stdout,
|
|
152
|
+
});
|
|
153
|
+
|
|
154
|
+
const displayName = (await prompt(rl2, ` Display name [${username}]: `)).trim() || username;
|
|
155
|
+
let shellUser = os.userInfo().username;
|
|
156
|
+
if (process.platform === 'win32' && shellUser.toUpperCase() === 'SYSTEM' && process.env.USERPROFILE) {
|
|
157
|
+
const candidate = path.basename(process.env.USERPROFILE);
|
|
158
|
+
if (/^[a-zA-Z0-9][a-zA-Z0-9 ._-]{0,63}$/.test(candidate)) {
|
|
159
|
+
shellUser = candidate;
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
rl2.close();
|
|
164
|
+
|
|
165
|
+
// Create admin user
|
|
166
|
+
const id = crypto.randomUUID();
|
|
167
|
+
const passwordHash = hashPassword(password);
|
|
168
|
+
|
|
169
|
+
db.prepare(`
|
|
170
|
+
INSERT INTO users (id, username, password_hash, display_name, shell_user, role)
|
|
171
|
+
VALUES (?, ?, ?, ?, ?, 'admin')
|
|
172
|
+
`).run(id, username, passwordHash, displayName, shellUser);
|
|
173
|
+
|
|
174
|
+
console.log(`\n Admin user "${username}" created successfully.`);
|
|
175
|
+
console.log(` Shell user: ${shellUser}`);
|
|
176
|
+
|
|
177
|
+
} catch (err) {
|
|
178
|
+
console.error(`\n Error: ${err.message}`);
|
|
179
|
+
process.exit(1);
|
|
180
|
+
} finally {
|
|
181
|
+
db.close();
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
console.log('\n ─────────────────────────────────────────');
|
|
185
|
+
console.log(` SPACES_SESSION_SECRET=${sessionSecretHex}`);
|
|
186
|
+
console.log(' ─────────────────────────────────────────');
|
|
187
|
+
console.log('\n Set this as an environment variable before starting the server.');
|
|
188
|
+
console.log(' Example: export SPACES_SESSION_SECRET=' + sessionSecretHex);
|
|
189
|
+
console.log(' Or add it to your docker-compose.yml environment section.\n');
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
main().catch((err) => {
|
|
193
|
+
console.error(err);
|
|
194
|
+
process.exit(1);
|
|
195
|
+
});
|
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const http = require('http');
|
|
4
|
+
const fs = require('fs');
|
|
5
|
+
const { spawn } = require('child_process');
|
|
6
|
+
const path = require('path');
|
|
7
|
+
const os = require('os');
|
|
8
|
+
const SPACES_DIR = path.join(os.homedir(), '.spaces');
|
|
9
|
+
const CONFIG_PATH = path.join(SPACES_DIR, 'server.json');
|
|
10
|
+
const SESSION_SECRET_PATH = path.join(SPACES_DIR, 'session_secret');
|
|
11
|
+
|
|
12
|
+
// ─── Load saved config ────────────────────────────────────
|
|
13
|
+
let savedConfig = {};
|
|
14
|
+
if (fs.existsSync(CONFIG_PATH)) {
|
|
15
|
+
try { savedConfig = JSON.parse(fs.readFileSync(CONFIG_PATH, 'utf-8')); } catch {}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
// ─── Resolve settings (env > config > defaults) ──────────
|
|
19
|
+
const NEXT_INTERNAL_PORT = parseInt(process.env.SPACES_NEXT_PORT || '3400', 10);
|
|
20
|
+
const PORT = parseInt(process.env.SPACES_PORT || '', 10) || savedConfig.port || 3457;
|
|
21
|
+
|
|
22
|
+
const basePath = process.env.SPACES_BASE_PATH || savedConfig.basePath || '';
|
|
23
|
+
if (basePath) {
|
|
24
|
+
process.env.SPACES_BASE_PATH = basePath;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
const allowedOrigins = process.env.SPACES_ALLOWED_ORIGINS || savedConfig.allowedOrigins || '';
|
|
28
|
+
if (allowedOrigins) {
|
|
29
|
+
process.env.SPACES_ALLOWED_ORIGINS = allowedOrigins;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
// ─── Managed packages directory ──────────────────────────────
|
|
33
|
+
const MANAGED_PACKAGES = path.join(SPACES_DIR, 'packages');
|
|
34
|
+
const MANAGED_NODE_MODULES = path.join(MANAGED_PACKAGES, 'node_modules');
|
|
35
|
+
|
|
36
|
+
// ─── Auto-detect tier (check managed packages first) ─────────
|
|
37
|
+
function hasManagedPro() {
|
|
38
|
+
return fs.existsSync(path.join(MANAGED_NODE_MODULES, '@spaces', 'pro', 'dist', 'index.js'));
|
|
39
|
+
}
|
|
40
|
+
function hasManagedTeams() {
|
|
41
|
+
return fs.existsSync(path.join(MANAGED_NODE_MODULES, '@spaces', 'teams', 'index.js'));
|
|
42
|
+
}
|
|
43
|
+
function hasRequirePro() {
|
|
44
|
+
try { require.resolve('@spaces/pro'); return true; } catch { return false; }
|
|
45
|
+
}
|
|
46
|
+
function hasRequireTeams() {
|
|
47
|
+
try { require.resolve('@spaces/teams'); return true; } catch { return false; }
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
const hasSpacesPro = hasManagedPro() || hasRequirePro();
|
|
51
|
+
const hasSpacesTeams = hasManagedTeams() || hasRequireTeams();
|
|
52
|
+
|
|
53
|
+
let tier = process.env.SPACES_TIER || savedConfig.tier || '';
|
|
54
|
+
if (!tier) {
|
|
55
|
+
if (hasSpacesPro) tier = 'federation';
|
|
56
|
+
else if (hasSpacesTeams) tier = 'team';
|
|
57
|
+
else tier = 'community';
|
|
58
|
+
}
|
|
59
|
+
process.env.SPACES_TIER = tier;
|
|
60
|
+
|
|
61
|
+
// ─── Resolve NODE_PATH for managed packages ──────────────────
|
|
62
|
+
const nodePaths = [MANAGED_NODE_MODULES];
|
|
63
|
+
// Add each managed package's own node_modules for bundled deps
|
|
64
|
+
for (const pkgName of ['pro', 'teams']) {
|
|
65
|
+
const pkgDir = path.join(MANAGED_PACKAGES, pkgName, 'node_modules');
|
|
66
|
+
if (fs.existsSync(pkgDir)) nodePaths.push(pkgDir);
|
|
67
|
+
}
|
|
68
|
+
for (const dir of nodePaths) {
|
|
69
|
+
const existing = process.env.NODE_PATH || '';
|
|
70
|
+
if (!existing.includes(dir)) {
|
|
71
|
+
process.env.NODE_PATH = existing ? `${dir}${path.delimiter}${existing}` : dir;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
require('module').Module._initPaths();
|
|
75
|
+
|
|
76
|
+
// Require terminal-server AFTER tier is set so it reads the correct SPACES_TIER
|
|
77
|
+
const { createTerminalServer } = require('./terminal-server');
|
|
78
|
+
|
|
79
|
+
// ─── Federation prerequisites — auto-setup if needed ──────
|
|
80
|
+
if (tier !== 'community') {
|
|
81
|
+
let sessionSecret = process.env.SPACES_SESSION_SECRET || '';
|
|
82
|
+
if (!sessionSecret && fs.existsSync(SESSION_SECRET_PATH)) {
|
|
83
|
+
sessionSecret = fs.readFileSync(SESSION_SECRET_PATH, 'utf-8').trim();
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
const adminDbPath = path.join(SPACES_DIR, 'admin.db');
|
|
87
|
+
if (!fs.existsSync(adminDbPath) || !sessionSecret) {
|
|
88
|
+
const { autoSetup } = require('./lib/auto-setup');
|
|
89
|
+
const result = autoSetup({ SPACES_DIR, SESSION_SECRET_PATH, ADMIN_DB_PATH: adminDbPath, CONFIG_PATH, tier, port: PORT, basePath });
|
|
90
|
+
sessionSecret = result.sessionSecret;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
process.env.SPACES_SESSION_SECRET = sessionSecret;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
// Spawn Next.js dev server on an internal port
|
|
97
|
+
const childEnv = { ...process.env, PORT: String(NEXT_INTERNAL_PORT) };
|
|
98
|
+
const next = spawn('npx', ['next', 'dev', '--hostname', '0.0.0.0', '--port', String(NEXT_INTERNAL_PORT)], {
|
|
99
|
+
cwd: path.join(__dirname, '..'),
|
|
100
|
+
stdio: ['ignore', 'pipe', 'pipe'],
|
|
101
|
+
env: childEnv,
|
|
102
|
+
shell: true,
|
|
103
|
+
});
|
|
104
|
+
|
|
105
|
+
let nextReady = false;
|
|
106
|
+
|
|
107
|
+
next.stdout.on('data', (data) => {
|
|
108
|
+
const msg = data.toString();
|
|
109
|
+
process.stdout.write(msg);
|
|
110
|
+
if (msg.includes('Ready') || msg.includes('started server') || msg.includes('Listening') || msg.includes('localhost')) {
|
|
111
|
+
nextReady = true;
|
|
112
|
+
}
|
|
113
|
+
});
|
|
114
|
+
|
|
115
|
+
next.stderr.on('data', (data) => {
|
|
116
|
+
process.stderr.write(data);
|
|
117
|
+
});
|
|
118
|
+
|
|
119
|
+
next.on('exit', (code) => {
|
|
120
|
+
console.error(`[spaces-dev] Next.js exited with code ${code}`);
|
|
121
|
+
process.exit(code || 1);
|
|
122
|
+
});
|
|
123
|
+
|
|
124
|
+
// Create unified HTTP server
|
|
125
|
+
const server = http.createServer((req, res) => {
|
|
126
|
+
const proxyReq = http.request(
|
|
127
|
+
{
|
|
128
|
+
hostname: '127.0.0.1',
|
|
129
|
+
port: NEXT_INTERNAL_PORT,
|
|
130
|
+
path: req.url,
|
|
131
|
+
method: req.method,
|
|
132
|
+
headers: req.headers,
|
|
133
|
+
},
|
|
134
|
+
(proxyRes) => {
|
|
135
|
+
res.writeHead(proxyRes.statusCode, proxyRes.headers);
|
|
136
|
+
proxyRes.pipe(res);
|
|
137
|
+
}
|
|
138
|
+
);
|
|
139
|
+
proxyReq.on('error', (err) => {
|
|
140
|
+
// Next.js not ready yet
|
|
141
|
+
if (!res.headersSent) {
|
|
142
|
+
res.writeHead(502);
|
|
143
|
+
res.end('Next.js dev server not ready yet. Refresh in a moment.');
|
|
144
|
+
}
|
|
145
|
+
});
|
|
146
|
+
req.pipe(proxyReq);
|
|
147
|
+
});
|
|
148
|
+
|
|
149
|
+
// Attach terminal WebSocket server for /ws upgrades
|
|
150
|
+
createTerminalServer(server);
|
|
151
|
+
|
|
152
|
+
// Proxy non-/ws upgrades (Next.js HMR WebSocket) to Next.js dev
|
|
153
|
+
server.on('upgrade', (req, socket, head) => {
|
|
154
|
+
const url = new URL(req.url, 'http://localhost');
|
|
155
|
+
if (url.pathname !== '/ws' && !url.pathname.endsWith('/ws')) {
|
|
156
|
+
const proxyReq = http.request({
|
|
157
|
+
hostname: '127.0.0.1',
|
|
158
|
+
port: NEXT_INTERNAL_PORT,
|
|
159
|
+
path: req.url,
|
|
160
|
+
method: req.method,
|
|
161
|
+
headers: req.headers,
|
|
162
|
+
});
|
|
163
|
+
proxyReq.on('upgrade', (proxyRes, proxySocket, proxyHead) => {
|
|
164
|
+
socket.write(
|
|
165
|
+
'HTTP/1.1 101 Switching Protocols\r\n' +
|
|
166
|
+
Object.entries(proxyRes.headers).map(([k, v]) => `${k}: ${v}`).join('\r\n') +
|
|
167
|
+
'\r\n\r\n'
|
|
168
|
+
);
|
|
169
|
+
if (proxyHead.length > 0) proxySocket.unshift(proxyHead);
|
|
170
|
+
proxySocket.on('error', () => socket.destroy());
|
|
171
|
+
socket.on('error', () => proxySocket.destroy());
|
|
172
|
+
proxySocket.on('close', () => {
|
|
173
|
+
console.log(`[HMR proxy] upstream closed (${url.pathname})`);
|
|
174
|
+
});
|
|
175
|
+
socket.on('close', () => {
|
|
176
|
+
console.log(`[HMR proxy] browser closed (${url.pathname})`);
|
|
177
|
+
});
|
|
178
|
+
proxySocket.pipe(socket);
|
|
179
|
+
socket.pipe(proxySocket);
|
|
180
|
+
});
|
|
181
|
+
proxyReq.on('response', (res) => {
|
|
182
|
+
// Upgrade was rejected — log and clean up
|
|
183
|
+
console.log(`[HMR proxy] upgrade rejected: ${res.statusCode} for ${url.pathname}`);
|
|
184
|
+
socket.destroy();
|
|
185
|
+
});
|
|
186
|
+
proxyReq.on('error', (err) => {
|
|
187
|
+
console.log(`[HMR proxy] error: ${err.message}`);
|
|
188
|
+
socket.destroy();
|
|
189
|
+
});
|
|
190
|
+
socket.on('error', () => {});
|
|
191
|
+
if (head.length > 0) proxyReq.write(head);
|
|
192
|
+
proxyReq.end();
|
|
193
|
+
}
|
|
194
|
+
});
|
|
195
|
+
|
|
196
|
+
server.listen(PORT, () => {
|
|
197
|
+
console.log(`\n Spaces dev server on http://localhost:${PORT}\n`);
|
|
198
|
+
});
|
|
199
|
+
|
|
200
|
+
// ─── HTTPS server for WebXR (Quest requires secure context) ──
|
|
201
|
+
const HTTPS_PORT = parseInt(process.env.SPACES_HTTPS_PORT || '', 10) || PORT + 1;
|
|
202
|
+
const certsDir = path.join(__dirname, '..', 'certs');
|
|
203
|
+
if (fs.existsSync(path.join(certsDir, 'cert.crt')) && fs.existsSync(path.join(certsDir, 'cert.key'))) {
|
|
204
|
+
const https = require('https');
|
|
205
|
+
const httpsOptions = {
|
|
206
|
+
key: fs.readFileSync(path.join(certsDir, 'cert.key')),
|
|
207
|
+
cert: fs.readFileSync(path.join(certsDir, 'cert.crt')),
|
|
208
|
+
};
|
|
209
|
+
const httpsServer = https.createServer(httpsOptions, (req, res) => {
|
|
210
|
+
const proxyReq = http.request(
|
|
211
|
+
{ hostname: '127.0.0.1', port: NEXT_INTERNAL_PORT, path: req.url, method: req.method, headers: req.headers },
|
|
212
|
+
(proxyRes) => { res.writeHead(proxyRes.statusCode, proxyRes.headers); proxyRes.pipe(res); }
|
|
213
|
+
);
|
|
214
|
+
proxyReq.on('error', () => { if (!res.headersSent) { res.writeHead(502); res.end('Not ready'); } });
|
|
215
|
+
req.pipe(proxyReq);
|
|
216
|
+
});
|
|
217
|
+
createTerminalServer(httpsServer);
|
|
218
|
+
httpsServer.on('upgrade', (req, socket, head) => {
|
|
219
|
+
const url = new URL(req.url, 'https://localhost');
|
|
220
|
+
if (url.pathname !== '/ws' && !url.pathname.endsWith('/ws')) {
|
|
221
|
+
const proxyReq = http.request({ hostname: '127.0.0.1', port: NEXT_INTERNAL_PORT, path: req.url, method: req.method, headers: req.headers });
|
|
222
|
+
proxyReq.on('upgrade', (proxyRes, proxySocket, proxyHead) => {
|
|
223
|
+
socket.write('HTTP/1.1 101 Switching Protocols\r\n' + Object.entries(proxyRes.headers).map(([k, v]) => `${k}: ${v}`).join('\r\n') + '\r\n\r\n');
|
|
224
|
+
if (proxyHead.length > 0) proxySocket.unshift(proxyHead);
|
|
225
|
+
proxySocket.pipe(socket); socket.pipe(proxySocket);
|
|
226
|
+
proxySocket.on('error', () => socket.destroy()); socket.on('error', () => proxySocket.destroy());
|
|
227
|
+
});
|
|
228
|
+
proxyReq.on('error', () => socket.destroy());
|
|
229
|
+
socket.on('error', () => {});
|
|
230
|
+
if (head.length > 0) proxyReq.write(head);
|
|
231
|
+
proxyReq.end();
|
|
232
|
+
}
|
|
233
|
+
});
|
|
234
|
+
httpsServer.listen(HTTPS_PORT, () => {
|
|
235
|
+
console.log(` Spaces HTTPS (VR) on https://192.168.1.16:${HTTPS_PORT}/vr\n`);
|
|
236
|
+
});
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
// Cleanup
|
|
240
|
+
function cleanup() {
|
|
241
|
+
next.kill();
|
|
242
|
+
server.close();
|
|
243
|
+
process.exit(0);
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
process.on('SIGINT', cleanup);
|
|
247
|
+
process.on('SIGTERM', cleanup);
|