@jlongo78/agent-spaces 0.5.3 → 0.5.4
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/.claude/settings.local.json +16 -0
- package/.next/standalone/.next/BUILD_ID +1 -1
- 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/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)/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_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_client-reference-manifest.js +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_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 +3 -3
- package/.next/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +3 -3
- 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 +3 -3
- 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 +5 -5
- 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 +2 -2
- package/.next/standalone/.next/server/app/admin/analytics.segments/_full.segment.rsc +5 -5
- 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 +3 -3
- 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 +5 -5
- package/.next/standalone/.next/server/app/admin/users.segments/!KGRlc2t0b3Ap/admin/users/__PAGE__.segment.rsc +2 -2
- 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 +2 -2
- package/.next/standalone/.next/server/app/admin/users.segments/_full.segment.rsc +5 -5
- 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 +3 -3
- 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 +5 -5
- 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 +2 -2
- package/.next/standalone/.next/server/app/analytics.segments/_full.segment.rsc +5 -5
- package/.next/standalone/.next/server/app/analytics.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/analytics.segments/_index.segment.rsc +3 -3
- 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/bulk/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/chat/route.js +1 -1
- package/.next/standalone/.next/server/app/api/chat/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/events/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 +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 +2 -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 +2 -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 +2 -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 +2 -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 +2 -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 +2 -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 +2 -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 +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 +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 +1 -1
- package/.next/standalone/.next/server/app/api/tier/route.js.nft.json +1 -1
- 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 +1 -1
- package/.next/standalone/.next/server/app/api/workspaces/route.js.nft.json +1 -1
- 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 +4 -4
- package/.next/standalone/.next/server/app/login.segments/_full.segment.rsc +4 -4
- package/.next/standalone/.next/server/app/login.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/login.segments/_index.segment.rsc +3 -3
- 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 +2 -2
- 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 +5 -5
- package/.next/standalone/.next/server/app/m/projects.segments/_full.segment.rsc +5 -5
- 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 +3 -3
- 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 +2 -2
- 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 +2 -2
- 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 +5 -5
- package/.next/standalone/.next/server/app/m/sessions.segments/_full.segment.rsc +5 -5
- 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 +3 -3
- 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 +2 -2
- 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 +2 -2
- 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 +5 -5
- package/.next/standalone/.next/server/app/m/settings.segments/_full.segment.rsc +5 -5
- 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 +3 -3
- 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 +2 -2
- 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 +2 -2
- 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 +5 -5
- package/.next/standalone/.next/server/app/m/terminal.segments/_full.segment.rsc +5 -5
- 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 +3 -3
- 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 +2 -2
- package/.next/standalone/.next/server/app/m.html +1 -1
- package/.next/standalone/.next/server/app/m.rsc +5 -5
- package/.next/standalone/.next/server/app/m.segments/_full.segment.rsc +5 -5
- package/.next/standalone/.next/server/app/m.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/m.segments/_index.segment.rsc +3 -3
- 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 +2 -2
- package/.next/standalone/.next/server/app/m.segments/m.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/network.html +1 -1
- package/.next/standalone/.next/server/app/network.rsc +5 -5
- package/.next/standalone/.next/server/app/network.segments/!KGRlc2t0b3Ap/network/__PAGE__.segment.rsc +2 -2
- 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 +2 -2
- package/.next/standalone/.next/server/app/network.segments/_full.segment.rsc +5 -5
- package/.next/standalone/.next/server/app/network.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/network.segments/_index.segment.rsc +3 -3
- 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 +5 -5
- package/.next/standalone/.next/server/app/projects.segments/!KGRlc2t0b3Ap/projects/__PAGE__.segment.rsc +2 -2
- 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 +2 -2
- package/.next/standalone/.next/server/app/projects.segments/_full.segment.rsc +5 -5
- package/.next/standalone/.next/server/app/projects.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/projects.segments/_index.segment.rsc +3 -3
- 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 +5 -5
- package/.next/standalone/.next/server/app/sessions.segments/!KGRlc2t0b3Ap/sessions/__PAGE__.segment.rsc +2 -2
- 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 +2 -2
- package/.next/standalone/.next/server/app/sessions.segments/_full.segment.rsc +5 -5
- package/.next/standalone/.next/server/app/sessions.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/sessions.segments/_index.segment.rsc +3 -3
- 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 +5 -5
- package/.next/standalone/.next/server/app/settings.segments/!KGRlc2t0b3Ap/settings/__PAGE__.segment.rsc +2 -2
- 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 +2 -2
- package/.next/standalone/.next/server/app/settings.segments/_full.segment.rsc +5 -5
- package/.next/standalone/.next/server/app/settings.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/settings.segments/_index.segment.rsc +3 -3
- 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 +5 -5
- 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 +2 -2
- package/.next/standalone/.next/server/app/terminal.segments/_full.segment.rsc +5 -5
- package/.next/standalone/.next/server/app/terminal.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/terminal.segments/_index.segment.rsc +3 -3
- package/.next/standalone/.next/server/app/terminal.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/workspaces.html +1 -1
- package/.next/standalone/.next/server/app/workspaces.rsc +5 -5
- package/.next/standalone/.next/server/app/workspaces.segments/!KGRlc2t0b3Ap/workspaces/__PAGE__.segment.rsc +2 -2
- 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 +2 -2
- package/.next/standalone/.next/server/app/workspaces.segments/_full.segment.rsc +5 -5
- package/.next/standalone/.next/server/app/workspaces.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/workspaces.segments/_index.segment.rsc +3 -3
- package/.next/standalone/.next/server/app/workspaces.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0d038fdf._.js +106 -0
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0e4c2d35._.js → [root-of-the-server]__12673e47._.js} +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__130dee4b._.js +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__142c2f41._.js +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__2861e096._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__2d3d8d52._.js +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__45205e47._.js +98 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__46b7da42._.js +98 -0
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__8765f2fc._.js → [root-of-the-server]__4cf845f6._.js} +3 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__57b966d5._.js +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__5a0020ba._.js +3 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__5bd0f118._.js +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__5bf8f2c0._.js +98 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__69eb20b1._.js +98 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__74c48d65._.js +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__7d6610c4._.js +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__84f3af14._.js +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__a38f7af1._.js +98 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__a6eb742d._.js +3 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__b4c83e91._.js +3 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__b7c8a7dd._.js +98 -0
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__cae0486f._.js → [root-of-the-server]__c1d7faa6._.js} +4 -4
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__c546cf71._.js +1 -1
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__a2ee9884._.js → [root-of-the-server]__c977bf2f._.js} +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__d2f9be33._.js +98 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__d5615808._.js +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__d877df12._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__e9d6e526._.js +98 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__f66ceeb8._.js +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__f893957c._.js +3 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__fcd26315._.js +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__fd505913._.js +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__feff7b91._.js +3 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__66aca5d4._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_1f12caba._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_43e7e611._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/src_app_(desktop)_network_page_tsx_27f035db._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/src_lib_telemetry_ts_d7f80cd0._.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/{10c6424526b53431.js → 483bf086feba6531.js} +1 -1
- package/.next/standalone/.next/static/chunks/{f8d7a4a58f712ecd.js → 56ddb2d75f5beb1a.js} +1 -1
- package/.next/standalone/.next/static/chunks/7c4cfb3160fa8dd4.js +5 -0
- package/.next/standalone/.next/static/chunks/{3434c5b2c9958276.js → ae3a695e671c8d31.js} +1 -1
- package/.next/standalone/.next/static/chunks/e972ec0d23b19896.js +5 -0
- package/.next/standalone/.next/static/chunks/ff5fac1bd7b518dd.css +3 -0
- package/.next/standalone/node_modules/@img/sharp-win32-x64/lib/sharp-win32-x64.node +0 -0
- package/.next/standalone/node_modules/@img/{sharp-linux-x64 → sharp-win32-x64}/package.json +39 -46
- package/.next/standalone/package.json +89 -89
- package/.next/standalone/server.js +1 -1
- package/.next/standalone/tsconfig.json +34 -34
- package/LICENSE +661 -661
- package/README.md +131 -131
- package/bin/fix-standalone-externals.js +79 -79
- package/bin/lib/auto-setup.js +110 -101
- package/bin/mdns-service.js +171 -171
- package/bin/postinstall.js +35 -35
- package/bin/setup-admin.js +195 -189
- package/bin/spaces-dev.js +208 -208
- package/bin/spaces-install.js +572 -483
- package/bin/spaces-service.js +881 -0
- package/bin/spaces-setup.js +253 -247
- package/bin/spaces.js +500 -466
- package/bin/terminal-server.js +1252 -1117
- package/package.json +89 -89
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__18a58c5f._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__41e589ee._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__464db440._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__4ad64489._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__64f5810e._.js +0 -98
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__95b7f18e._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__a6ce192e._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__e2b78951._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__f84e3cf3._.js +0 -98
- package/.next/standalone/.next/static/chunks/302ce212c690bec4.js +0 -5
- package/.next/standalone/.next/static/chunks/67c7bf5024309fca.css +0 -3
- package/.next/standalone/.next/static/chunks/cb442c50eecb758d.js +0 -5
- package/.next/standalone/node_modules/@img/sharp-libvips-linux-x64/README.md +0 -46
- package/.next/standalone/node_modules/@img/sharp-libvips-linux-x64/lib/glib-2.0/include/glibconfig.h +0 -221
- package/.next/standalone/node_modules/@img/sharp-libvips-linux-x64/lib/index.js +0 -1
- 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 +0 -42
- package/.next/standalone/node_modules/@img/sharp-libvips-linuxmusl-x64/README.md +0 -46
- package/.next/standalone/node_modules/@img/sharp-libvips-linuxmusl-x64/lib/glib-2.0/include/glibconfig.h +0 -221
- package/.next/standalone/node_modules/@img/sharp-libvips-linuxmusl-x64/lib/index.js +0 -1
- 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 +0 -42
- package/.next/standalone/node_modules/@img/sharp-libvips-linuxmusl-x64/versions.json +0 -30
- package/.next/standalone/node_modules/@img/sharp-linux-x64/lib/sharp-linux-x64.node +0 -0
- 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 +0 -46
- /package/.next/standalone/.next/static/{nbYSIjUtkSwSvTgyR5p00 → 5J530rtIR_FsG4E9MLLpB}/_buildManifest.js +0 -0
- /package/.next/standalone/.next/static/{nbYSIjUtkSwSvTgyR5p00 → 5J530rtIR_FsG4E9MLLpB}/_clientMiddlewareManifest.json +0 -0
- /package/.next/standalone/.next/static/{nbYSIjUtkSwSvTgyR5p00 → 5J530rtIR_FsG4E9MLLpB}/_ssgManifest.js +0 -0
- /package/.next/standalone/node_modules/@img/{sharp-libvips-linux-x64 → sharp-win32-x64}/versions.json +0 -0
package/bin/spaces-install.js
CHANGED
|
@@ -1,483 +1,572 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
'use strict';
|
|
4
|
-
|
|
5
|
-
const { execFileSync } = require('child_process');
|
|
6
|
-
const path = require('path');
|
|
7
|
-
const os = require('os');
|
|
8
|
-
const fs = require('fs');
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
:
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
//
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
const
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
try {
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
fs.
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
}
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
}
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
console.log('');
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
if (!pkg) {
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
}
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
}
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
}
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
//
|
|
455
|
-
const
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
if (
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
}
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
'use strict';
|
|
4
|
+
|
|
5
|
+
const { execFileSync } = require('child_process');
|
|
6
|
+
const path = require('path');
|
|
7
|
+
const os = require('os');
|
|
8
|
+
const fs = require('fs');
|
|
9
|
+
|
|
10
|
+
// Resolve the target user's home directory.
|
|
11
|
+
// On Windows, if running from a separate admin account, find the user
|
|
12
|
+
// who actually has Claude Code data (.claude/ directory).
|
|
13
|
+
function resolveTargetHome() {
|
|
14
|
+
const currentHome = os.homedir();
|
|
15
|
+
if (process.platform !== 'win32') return currentHome;
|
|
16
|
+
// Check if the current user has .claude — if so, they're the target
|
|
17
|
+
if (fs.existsSync(path.join(currentHome, '.claude'))) return currentHome;
|
|
18
|
+
// Scan for users with .claude
|
|
19
|
+
const usersDir = path.dirname(currentHome);
|
|
20
|
+
const skip = new Set(['Public', 'Default', 'Default User', 'All Users']);
|
|
21
|
+
try {
|
|
22
|
+
const claudeUsers = fs.readdirSync(usersDir)
|
|
23
|
+
.filter(name => !skip.has(name) && !name.startsWith('.'))
|
|
24
|
+
.filter(name => fs.existsSync(path.join(usersDir, name, '.claude')));
|
|
25
|
+
if (claudeUsers.length === 1) return path.join(usersDir, claudeUsers[0]);
|
|
26
|
+
} catch {}
|
|
27
|
+
return currentHome;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
const TARGET_HOME = resolveTargetHome();
|
|
31
|
+
const SPACES_DIR = path.join(TARGET_HOME, '.spaces');
|
|
32
|
+
const PACKAGES_DIR = path.join(SPACES_DIR, 'packages');
|
|
33
|
+
const NODE_MODULES_DIR = path.join(PACKAGES_DIR, 'node_modules', '@spaces');
|
|
34
|
+
|
|
35
|
+
// ─── Package definitions ─────────────────────────────────────
|
|
36
|
+
const PACKAGES = {
|
|
37
|
+
teams: {
|
|
38
|
+
name: '@spaces/teams',
|
|
39
|
+
dir: path.join(PACKAGES_DIR, 'teams'),
|
|
40
|
+
repo: 'jlongo78/spaces-teams',
|
|
41
|
+
private: false,
|
|
42
|
+
verify: (dir) => fs.existsSync(path.join(dir, 'dist', 'index.js')),
|
|
43
|
+
verifyLabel: 'dist/index.js',
|
|
44
|
+
},
|
|
45
|
+
pro: {
|
|
46
|
+
name: '@spaces/pro',
|
|
47
|
+
dir: path.join(PACKAGES_DIR, 'pro'),
|
|
48
|
+
repo: 'jlongo78/spaces-pro',
|
|
49
|
+
private: true,
|
|
50
|
+
verify: (dir) => fs.existsSync(path.join(dir, 'dist', 'index.js')),
|
|
51
|
+
verifyLabel: 'dist/index.js',
|
|
52
|
+
},
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
// ─── Helpers ──────────────────────────────────────────────────
|
|
56
|
+
function log(msg) { console.log(` ${msg}`); }
|
|
57
|
+
function logOk(msg) { console.log(` ✓ ${msg}`); }
|
|
58
|
+
function logErr(msg) { console.error(` ✗ ${msg}`); }
|
|
59
|
+
function logWarn(msg) { console.log(` ! ${msg}`); }
|
|
60
|
+
|
|
61
|
+
// On Windows, ensure Git is in PATH (admin accounts may not inherit user PATH)
|
|
62
|
+
function ensureGitInPath() {
|
|
63
|
+
if (process.platform !== 'win32') return;
|
|
64
|
+
try {
|
|
65
|
+
execFileSync('git', ['--version'], { stdio: 'pipe', shell: true });
|
|
66
|
+
return; // git already available
|
|
67
|
+
} catch {}
|
|
68
|
+
// Try common Git install locations (system-wide and per-user)
|
|
69
|
+
const candidates = [
|
|
70
|
+
path.join(process.env.ProgramFiles || 'C:\\Program Files', 'Git', 'cmd'),
|
|
71
|
+
path.join(process.env['ProgramFiles(x86)'] || 'C:\\Program Files (x86)', 'Git', 'cmd'),
|
|
72
|
+
// Per-user installs (check target user and all profiles)
|
|
73
|
+
path.join(TARGET_HOME, 'AppData', 'Local', 'Programs', 'Git', 'cmd'),
|
|
74
|
+
path.join(TARGET_HOME, 'AppData', 'Local', 'Programs', 'Git', 'mingw64', 'bin'),
|
|
75
|
+
];
|
|
76
|
+
// Also check all user profiles in case Git is installed by a different user
|
|
77
|
+
try {
|
|
78
|
+
const usersDir = path.dirname(os.homedir());
|
|
79
|
+
for (const name of fs.readdirSync(usersDir)) {
|
|
80
|
+
candidates.push(path.join(usersDir, name, 'AppData', 'Local', 'Programs', 'Git', 'cmd'));
|
|
81
|
+
candidates.push(path.join(usersDir, name, 'AppData', 'Local', 'Programs', 'Git', 'mingw64', 'bin'));
|
|
82
|
+
}
|
|
83
|
+
} catch {}
|
|
84
|
+
for (const dir of candidates) {
|
|
85
|
+
if (fs.existsSync(path.join(dir, 'git.exe'))) {
|
|
86
|
+
process.env.PATH = process.env.PATH + ';' + dir;
|
|
87
|
+
return;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
ensureGitInPath();
|
|
92
|
+
|
|
93
|
+
function run(cmd, args, opts = {}) {
|
|
94
|
+
const isWin = process.platform === 'win32';
|
|
95
|
+
const safeArgs = isWin
|
|
96
|
+
? args.map(a => (a.includes(' ') ? '"' + a + '"' : a))
|
|
97
|
+
: args;
|
|
98
|
+
return execFileSync(cmd, safeArgs, {
|
|
99
|
+
encoding: 'utf-8',
|
|
100
|
+
stdio: opts.quiet ? ['pipe', 'pipe', 'pipe'] : 'inherit',
|
|
101
|
+
shell: isWin,
|
|
102
|
+
...opts,
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
// Git args prefix: allow operating on repos owned by a different user
|
|
107
|
+
// (e.g. admin account managing packages in the target user's home)
|
|
108
|
+
const GIT_SAFE = ['-c', 'safe.directory=*'];
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* Clone a repo, trying SSH first then HTTPS (with optional PAT).
|
|
112
|
+
*/
|
|
113
|
+
function gitClone(repo, dest, isPrivate) {
|
|
114
|
+
const sshUrl = `git@github.com:${repo}.git`;
|
|
115
|
+
const httpsUrl = `https://github.com/${repo}.git`;
|
|
116
|
+
|
|
117
|
+
// Try SSH first
|
|
118
|
+
try {
|
|
119
|
+
log(`Cloning ${repo} (SSH)...`);
|
|
120
|
+
run('git', [...GIT_SAFE, 'clone', '--depth', '1', sshUrl, dest]);
|
|
121
|
+
return;
|
|
122
|
+
} catch {
|
|
123
|
+
// SSH failed, try HTTPS
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
// HTTPS — check for PAT if private
|
|
127
|
+
if (isPrivate) {
|
|
128
|
+
const pat = process.env.GH_PAT || process.env.GITHUB_TOKEN || '';
|
|
129
|
+
if (pat) {
|
|
130
|
+
log(`Cloning ${repo} (HTTPS + token)...`);
|
|
131
|
+
const authedUrl = `https://${pat}@github.com/${repo}.git`;
|
|
132
|
+
run('git', [...GIT_SAFE, 'clone', '--depth', '1', authedUrl, dest]);
|
|
133
|
+
return;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
log(`Cloning ${repo} (HTTPS)...`);
|
|
138
|
+
run('git', [...GIT_SAFE, 'clone', '--depth', '1', httpsUrl, dest]);
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* Pull latest changes in a repo directory.
|
|
143
|
+
*/
|
|
144
|
+
function gitPull(dir) {
|
|
145
|
+
log('Pulling latest...');
|
|
146
|
+
run('git', [...GIT_SAFE, 'pull', '--ff-only'], { cwd: dir });
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* Create the symlink from node_modules/@spaces/<name> -> ../../<name>
|
|
151
|
+
*/
|
|
152
|
+
function createSymlink(pkgKey) {
|
|
153
|
+
const linkPath = path.join(NODE_MODULES_DIR, pkgKey);
|
|
154
|
+
const targetPath = path.join('..', '..', pkgKey); // relative symlink
|
|
155
|
+
|
|
156
|
+
fs.mkdirSync(NODE_MODULES_DIR, { recursive: true });
|
|
157
|
+
|
|
158
|
+
// Remove existing link/dir
|
|
159
|
+
try {
|
|
160
|
+
const stat = fs.lstatSync(linkPath);
|
|
161
|
+
if (stat.isSymbolicLink() || stat.isFile()) {
|
|
162
|
+
fs.unlinkSync(linkPath);
|
|
163
|
+
} else if (stat.isDirectory()) {
|
|
164
|
+
fs.rmSync(linkPath, { recursive: true });
|
|
165
|
+
}
|
|
166
|
+
} catch {}
|
|
167
|
+
|
|
168
|
+
fs.symlinkSync(targetPath, linkPath, process.platform === 'win32' ? 'junction' : 'dir');
|
|
169
|
+
logOk(`Symlink: @spaces/${pkgKey} -> packages/${pkgKey}`);
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
/**
|
|
173
|
+
* Check if a native module loads correctly from a package directory.
|
|
174
|
+
*/
|
|
175
|
+
function checkNativeModule(moduleName, searchDir) {
|
|
176
|
+
try {
|
|
177
|
+
const nodePath = path.join(searchDir, 'node_modules');
|
|
178
|
+
// Use execFileSync directly (no shell) so quotes aren't mangled on Windows
|
|
179
|
+
const result = execFileSync(process.execPath, [
|
|
180
|
+
'-e',
|
|
181
|
+
`try { require('${moduleName}'); console.log('ok'); } catch(e) { console.log(e.message); }`,
|
|
182
|
+
], {
|
|
183
|
+
encoding: 'utf-8',
|
|
184
|
+
stdio: ['pipe', 'pipe', 'pipe'],
|
|
185
|
+
cwd: searchDir,
|
|
186
|
+
env: { ...process.env, NODE_PATH: nodePath },
|
|
187
|
+
});
|
|
188
|
+
return result.trim() === 'ok';
|
|
189
|
+
} catch {
|
|
190
|
+
return false;
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
// ─── Install command ──────────────────────────────────────────
|
|
195
|
+
function installPackage(pkgKey) {
|
|
196
|
+
const pkg = PACKAGES[pkgKey];
|
|
197
|
+
if (!pkg) {
|
|
198
|
+
logErr(`Unknown package: ${pkgKey}`);
|
|
199
|
+
log(`Available: ${Object.keys(PACKAGES).join(', ')}`);
|
|
200
|
+
process.exit(1);
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
console.log(`\n Installing ${pkg.name}...\n`);
|
|
204
|
+
|
|
205
|
+
// Pro requires teams as a prerequisite
|
|
206
|
+
if (pkgKey === "pro") {
|
|
207
|
+
const teamsDir = PACKAGES.teams.dir;
|
|
208
|
+
if (!fs.existsSync(path.join(teamsDir, "dist", "index.js"))) {
|
|
209
|
+
log("@spaces/pro requires @spaces/teams -- installing teams first...");
|
|
210
|
+
console.log("");
|
|
211
|
+
installPackage("teams");
|
|
212
|
+
console.log("");
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
// 1. Clone or pull
|
|
217
|
+
if (fs.existsSync(path.join(pkg.dir, '.git'))) {
|
|
218
|
+
gitPull(pkg.dir);
|
|
219
|
+
} else {
|
|
220
|
+
fs.mkdirSync(PACKAGES_DIR, { recursive: true });
|
|
221
|
+
gitClone(pkg.repo, pkg.dir, pkg.private);
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
// 2. Install dependencies
|
|
225
|
+
// Both teams and pro need TypeScript build
|
|
226
|
+
log('Installing dependencies...');
|
|
227
|
+
run('npm', ['install'], { cwd: pkg.dir });
|
|
228
|
+
|
|
229
|
+
// Rebuild native modules for the current platform/ABI
|
|
230
|
+
log('Rebuilding native modules...');
|
|
231
|
+
run('npm', ['rebuild'], { cwd: pkg.dir });
|
|
232
|
+
|
|
233
|
+
log('Building TypeScript...');
|
|
234
|
+
run('npm', ['run', 'build'], { cwd: pkg.dir });
|
|
235
|
+
|
|
236
|
+
log('Pruning dev dependencies...');
|
|
237
|
+
run('npm', ['prune', '--omit=dev'], { cwd: pkg.dir });
|
|
238
|
+
|
|
239
|
+
// 5. Create symlink
|
|
240
|
+
createSymlink(pkgKey);
|
|
241
|
+
|
|
242
|
+
// 6. Verify
|
|
243
|
+
if (pkg.verify(pkg.dir)) {
|
|
244
|
+
logOk(`${pkg.name} installed successfully`);
|
|
245
|
+
} else {
|
|
246
|
+
logErr(`${pkg.name} installed but ${pkg.verifyLabel} not found`);
|
|
247
|
+
process.exit(1);
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
// 7. Verify native modules
|
|
251
|
+
if (!checkNativeModule('better-sqlite3', pkg.dir)) {
|
|
252
|
+
logWarn('better-sqlite3 native module not loading — attempting rebuild...');
|
|
253
|
+
run('npm', ['rebuild', 'better-sqlite3'], { cwd: pkg.dir });
|
|
254
|
+
if (checkNativeModule('better-sqlite3', pkg.dir)) {
|
|
255
|
+
logOk('better-sqlite3 rebuilt successfully');
|
|
256
|
+
} else {
|
|
257
|
+
logErr('better-sqlite3 still failing — you may need to install build tools');
|
|
258
|
+
}
|
|
259
|
+
} else {
|
|
260
|
+
logOk('Native modules OK');
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
// 8. Update tier in server.json
|
|
264
|
+
const configPath = path.join(SPACES_DIR, 'server.json');
|
|
265
|
+
try {
|
|
266
|
+
const config = fs.existsSync(configPath)
|
|
267
|
+
? JSON.parse(fs.readFileSync(configPath, 'utf-8'))
|
|
268
|
+
: { port: 3457, basePath: '' };
|
|
269
|
+
// teams → team tier, pro → federation tier
|
|
270
|
+
// Add-on packages set their tier; base package resets to community
|
|
271
|
+
// only if no add-on package is currently installed
|
|
272
|
+
const tierMap = { teams: 'team', pro: 'federation' };
|
|
273
|
+
if (tierMap[pkgKey]) {
|
|
274
|
+
// Installing an add-on — set its tier
|
|
275
|
+
config.tier = tierMap[pkgKey];
|
|
276
|
+
fs.writeFileSync(configPath, JSON.stringify(config, null, 2));
|
|
277
|
+
logOk(`Tier set to ${tierMap[pkgKey]}`);
|
|
278
|
+
} else if (!config.tier || config.tier === 'community') {
|
|
279
|
+
// Base package install, no add-on tier — ensure community
|
|
280
|
+
config.tier = 'community';
|
|
281
|
+
fs.writeFileSync(configPath, JSON.stringify(config, null, 2));
|
|
282
|
+
logOk(`Tier set to community`);
|
|
283
|
+
} else {
|
|
284
|
+
// Base package install but an add-on tier exists — preserve it
|
|
285
|
+
logOk(`Tier unchanged (${config.tier})`);
|
|
286
|
+
}
|
|
287
|
+
} catch {}
|
|
288
|
+
|
|
289
|
+
// 9. Verify require() works
|
|
290
|
+
try {
|
|
291
|
+
const result = execFileSync(process.execPath, [
|
|
292
|
+
'-e',
|
|
293
|
+
`const p = require.resolve('${pkg.name}'); console.log('resolved: ' + p);`,
|
|
294
|
+
], {
|
|
295
|
+
encoding: 'utf-8',
|
|
296
|
+
stdio: ['pipe', 'pipe', 'pipe'],
|
|
297
|
+
env: { ...process.env, NODE_PATH: path.join(PACKAGES_DIR, 'node_modules') },
|
|
298
|
+
});
|
|
299
|
+
logOk(`require('${pkg.name}') -> ${result.trim().replace('resolved: ', '')}`);
|
|
300
|
+
} catch {
|
|
301
|
+
logWarn(`require('${pkg.name}') failed — this may be OK if peer deps aren't available yet`);
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
console.log('');
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
// ─── Verify command ───────────────────────────────────────────
|
|
308
|
+
function verifyAll() {
|
|
309
|
+
console.log('\n Spaces Package Verification\n');
|
|
310
|
+
|
|
311
|
+
let allOk = true;
|
|
312
|
+
|
|
313
|
+
for (const [key, pkg] of Object.entries(PACKAGES)) {
|
|
314
|
+
log(`─── ${pkg.name} ───`);
|
|
315
|
+
|
|
316
|
+
// Check if installed
|
|
317
|
+
if (!fs.existsSync(pkg.dir)) {
|
|
318
|
+
logWarn('Not installed');
|
|
319
|
+
log('');
|
|
320
|
+
continue;
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
// Check git status
|
|
324
|
+
try {
|
|
325
|
+
const branch = run('git', ['rev-parse', '--abbrev-ref', 'HEAD'], { cwd: pkg.dir, quiet: true }).trim();
|
|
326
|
+
const hash = run('git', ['rev-parse', '--short', 'HEAD'], { cwd: pkg.dir, quiet: true }).trim();
|
|
327
|
+
logOk(`Git: ${branch} @ ${hash}`);
|
|
328
|
+
} catch {
|
|
329
|
+
logErr('Git status check failed');
|
|
330
|
+
allOk = false;
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
// Check entry point
|
|
334
|
+
if (pkg.verify(pkg.dir)) {
|
|
335
|
+
logOk(`Entry: ${pkg.verifyLabel} exists`);
|
|
336
|
+
} else {
|
|
337
|
+
logErr(`Entry: ${pkg.verifyLabel} missing`);
|
|
338
|
+
allOk = false;
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
// Check node_modules
|
|
342
|
+
if (fs.existsSync(path.join(pkg.dir, 'node_modules'))) {
|
|
343
|
+
logOk('Dependencies: node_modules present');
|
|
344
|
+
} else {
|
|
345
|
+
logErr('Dependencies: node_modules missing');
|
|
346
|
+
allOk = false;
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
// Check symlink
|
|
350
|
+
const linkPath = path.join(NODE_MODULES_DIR, key);
|
|
351
|
+
try {
|
|
352
|
+
const stat = fs.lstatSync(linkPath);
|
|
353
|
+
if (stat.isSymbolicLink()) {
|
|
354
|
+
const target = fs.readlinkSync(linkPath);
|
|
355
|
+
logOk(`Symlink: @spaces/${key} -> ${target}`);
|
|
356
|
+
} else {
|
|
357
|
+
logWarn(`@spaces/${key} exists but is not a symlink`);
|
|
358
|
+
}
|
|
359
|
+
} catch {
|
|
360
|
+
logErr(`Symlink: @spaces/${key} missing`);
|
|
361
|
+
allOk = false;
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
// Check native modules
|
|
365
|
+
const nativeOk = checkNativeModule('better-sqlite3', pkg.dir);
|
|
366
|
+
if (nativeOk) {
|
|
367
|
+
logOk('Native: better-sqlite3 loads OK');
|
|
368
|
+
} else {
|
|
369
|
+
logErr('Native: better-sqlite3 failed (ABI mismatch? Run: spaces upgrade)');
|
|
370
|
+
allOk = false;
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
// Check require() resolution
|
|
374
|
+
try {
|
|
375
|
+
execFileSync(process.execPath, [
|
|
376
|
+
'-e',
|
|
377
|
+
`require.resolve('${pkg.name}')`,
|
|
378
|
+
], {
|
|
379
|
+
encoding: 'utf-8',
|
|
380
|
+
stdio: ['pipe', 'pipe', 'pipe'],
|
|
381
|
+
env: { ...process.env, NODE_PATH: path.join(PACKAGES_DIR, 'node_modules') },
|
|
382
|
+
});
|
|
383
|
+
logOk(`require('${pkg.name}') resolves OK`);
|
|
384
|
+
} catch {
|
|
385
|
+
logErr(`require('${pkg.name}') fails`);
|
|
386
|
+
allOk = false;
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
log('');
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
if (allOk) {
|
|
393
|
+
logOk('All checks passed');
|
|
394
|
+
} else {
|
|
395
|
+
logErr('Some checks failed — run "spaces upgrade" to fix');
|
|
396
|
+
}
|
|
397
|
+
console.log('');
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
// ─── Upgrade command ──────────────────────────────────────────
|
|
401
|
+
function upgradePackage(pkgKey) {
|
|
402
|
+
if (pkgKey) {
|
|
403
|
+
// Upgrade specific package
|
|
404
|
+
const pkg = PACKAGES[pkgKey];
|
|
405
|
+
if (!pkg) {
|
|
406
|
+
logErr(`Unknown package: ${pkgKey}`);
|
|
407
|
+
process.exit(1);
|
|
408
|
+
}
|
|
409
|
+
if (!fs.existsSync(pkg.dir)) {
|
|
410
|
+
log(`${pkg.name} not installed — running install instead`);
|
|
411
|
+
installPackage(pkgKey);
|
|
412
|
+
return;
|
|
413
|
+
}
|
|
414
|
+
console.log(`\n Upgrading ${pkg.name}...\n`);
|
|
415
|
+
doUpgrade(pkgKey, pkg);
|
|
416
|
+
} else {
|
|
417
|
+
// Upgrade all installed packages
|
|
418
|
+
console.log('\n Upgrading all installed packages...\n');
|
|
419
|
+
for (const [key, pkg] of Object.entries(PACKAGES)) {
|
|
420
|
+
if (fs.existsSync(pkg.dir)) {
|
|
421
|
+
log(`─── ${pkg.name} ───`);
|
|
422
|
+
doUpgrade(key, pkg);
|
|
423
|
+
log('');
|
|
424
|
+
}
|
|
425
|
+
}
|
|
426
|
+
}
|
|
427
|
+
console.log('');
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
function doUpgrade(pkgKey, pkg) {
|
|
431
|
+
// Pull latest
|
|
432
|
+
gitPull(pkg.dir);
|
|
433
|
+
|
|
434
|
+
run('npm', ['install'], { cwd: pkg.dir });
|
|
435
|
+
run('npm', ['rebuild'], { cwd: pkg.dir });
|
|
436
|
+
log('Building TypeScript...');
|
|
437
|
+
run('npm', ['run', 'build'], { cwd: pkg.dir });
|
|
438
|
+
run('npm', ['prune', '--omit=dev'], { cwd: pkg.dir });
|
|
439
|
+
|
|
440
|
+
// Re-create symlink
|
|
441
|
+
createSymlink(pkgKey);
|
|
442
|
+
|
|
443
|
+
if (pkg.verify(pkg.dir)) {
|
|
444
|
+
logOk(`${pkg.name} upgraded successfully`);
|
|
445
|
+
} else {
|
|
446
|
+
logErr(`${pkg.name} upgrade failed — ${pkg.verifyLabel} not found`);
|
|
447
|
+
}
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
// ─── Uninstall command ────────────────────────────────────────
|
|
451
|
+
function uninstallOne(pkgKey) {
|
|
452
|
+
const pkg = PACKAGES[pkgKey];
|
|
453
|
+
|
|
454
|
+
// Remove symlink
|
|
455
|
+
const linkPath = path.join(NODE_MODULES_DIR, pkgKey);
|
|
456
|
+
try {
|
|
457
|
+
const stat = fs.lstatSync(linkPath);
|
|
458
|
+
if (stat.isSymbolicLink() || stat.isFile()) {
|
|
459
|
+
fs.unlinkSync(linkPath);
|
|
460
|
+
} else if (stat.isDirectory()) {
|
|
461
|
+
fs.rmSync(linkPath, { recursive: true });
|
|
462
|
+
}
|
|
463
|
+
logOk(`Removed symlink @spaces/${pkgKey}`);
|
|
464
|
+
} catch {
|
|
465
|
+
logWarn(`Symlink @spaces/${pkgKey} not found`);
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
// Remove package directory
|
|
469
|
+
if (fs.existsSync(pkg.dir)) {
|
|
470
|
+
fs.rmSync(pkg.dir, { recursive: true });
|
|
471
|
+
logOk(`Removed ${pkg.dir}`);
|
|
472
|
+
} else {
|
|
473
|
+
logWarn(`${pkg.dir} not found`);
|
|
474
|
+
}
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
function uninstallPackage(pkgKey) {
|
|
478
|
+
if (pkgKey) {
|
|
479
|
+
const pkg = PACKAGES[pkgKey];
|
|
480
|
+
if (!pkg) {
|
|
481
|
+
logErr(`Unknown package: ${pkgKey}`);
|
|
482
|
+
log(`Available: ${Object.keys(PACKAGES).join(', ')}`);
|
|
483
|
+
process.exit(1);
|
|
484
|
+
}
|
|
485
|
+
console.log(`\n Uninstalling ${pkg.name}...\n`);
|
|
486
|
+
uninstallOne(pkgKey);
|
|
487
|
+
// Reset tier to community if removing a tier package
|
|
488
|
+
const configPath = path.join(SPACES_DIR, 'server.json');
|
|
489
|
+
try {
|
|
490
|
+
if (fs.existsSync(configPath)) {
|
|
491
|
+
const config = JSON.parse(fs.readFileSync(configPath, 'utf-8'));
|
|
492
|
+
if (config.tier && config.tier !== 'community') {
|
|
493
|
+
config.tier = 'community';
|
|
494
|
+
fs.writeFileSync(configPath, JSON.stringify(config, null, 2));
|
|
495
|
+
logOk('Reset tier to community');
|
|
496
|
+
}
|
|
497
|
+
}
|
|
498
|
+
} catch {}
|
|
499
|
+
logOk(`${pkg.name} uninstalled`);
|
|
500
|
+
} else {
|
|
501
|
+
console.log('\n Uninstalling everything...\n');
|
|
502
|
+
|
|
503
|
+
// Remove tier packages
|
|
504
|
+
for (const [key, pkg] of Object.entries(PACKAGES)) {
|
|
505
|
+
if (fs.existsSync(pkg.dir) || fs.existsSync(path.join(NODE_MODULES_DIR, key))) {
|
|
506
|
+
log(`─── ${pkg.name} ───`);
|
|
507
|
+
uninstallOne(key);
|
|
508
|
+
}
|
|
509
|
+
}
|
|
510
|
+
// Clean up packages dir
|
|
511
|
+
try { fs.rmdirSync(NODE_MODULES_DIR); } catch {}
|
|
512
|
+
try { fs.rmdirSync(path.join(PACKAGES_DIR, 'node_modules')); } catch {}
|
|
513
|
+
try { fs.rmdirSync(PACKAGES_DIR); } catch {}
|
|
514
|
+
|
|
515
|
+
// Remove the global spaces CLI
|
|
516
|
+
log('─── @jlongo78/agent-spaces ───');
|
|
517
|
+
try {
|
|
518
|
+
run('npm', ['uninstall', '-g', '@jlongo78/agent-spaces'], { quiet: true });
|
|
519
|
+
logOk('Removed global spaces CLI');
|
|
520
|
+
} catch {
|
|
521
|
+
logWarn('Global spaces CLI not found or already removed');
|
|
522
|
+
}
|
|
523
|
+
|
|
524
|
+
// Reset tier to community in server.json
|
|
525
|
+
const configPath = path.join(SPACES_DIR, 'server.json');
|
|
526
|
+
try {
|
|
527
|
+
if (fs.existsSync(configPath)) {
|
|
528
|
+
const config = JSON.parse(fs.readFileSync(configPath, 'utf-8'));
|
|
529
|
+
if (config.tier && config.tier !== 'community') {
|
|
530
|
+
config.tier = 'community';
|
|
531
|
+
fs.writeFileSync(configPath, JSON.stringify(config, null, 2));
|
|
532
|
+
logOk('Reset tier to community');
|
|
533
|
+
}
|
|
534
|
+
}
|
|
535
|
+
} catch {}
|
|
536
|
+
|
|
537
|
+
logOk('Spaces fully uninstalled');
|
|
538
|
+
log('User data remains at ~/.spaces/ — remove manually if desired');
|
|
539
|
+
}
|
|
540
|
+
console.log('');
|
|
541
|
+
}
|
|
542
|
+
|
|
543
|
+
// ─── CLI ──────────────────────────────────────────────────────
|
|
544
|
+
const command = process.argv[2];
|
|
545
|
+
const target = process.argv[3];
|
|
546
|
+
|
|
547
|
+
switch (command) {
|
|
548
|
+
case 'install':
|
|
549
|
+
if (!target) {
|
|
550
|
+
logErr('Usage: spaces install <teams|pro>');
|
|
551
|
+
process.exit(1);
|
|
552
|
+
}
|
|
553
|
+
installPackage(target);
|
|
554
|
+
break;
|
|
555
|
+
|
|
556
|
+
case 'uninstall':
|
|
557
|
+
uninstallPackage(target || null);
|
|
558
|
+
break;
|
|
559
|
+
|
|
560
|
+
case 'verify':
|
|
561
|
+
verifyAll();
|
|
562
|
+
break;
|
|
563
|
+
|
|
564
|
+
case 'upgrade':
|
|
565
|
+
upgradePackage(target || null);
|
|
566
|
+
break;
|
|
567
|
+
|
|
568
|
+
default:
|
|
569
|
+
logErr(`Unknown command: ${command}`);
|
|
570
|
+
log('Usage: spaces <install|uninstall|verify|upgrade> [package]');
|
|
571
|
+
process.exit(1);
|
|
572
|
+
}
|