@jlongo78/agent-spaces 0.4.0 → 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.next/standalone/.claude/settings.local.json +11 -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.js +2 -2
- package/.next/standalone/.next/server/app/(desktop)/page.js.nft.json +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/admin/analytics/route.js +1 -1
- package/.next/standalone/.next/server/app/api/admin/analytics/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/admin/users/[id]/route.js +1 -1
- package/.next/standalone/.next/server/app/api/admin/users/[id]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/admin/users/route.js +1 -1
- package/.next/standalone/.next/server/app/api/admin/users/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/analytics/overview/route.js +2 -2
- package/.next/standalone/.next/server/app/api/analytics/overview/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/auth/login/route.js +1 -1
- package/.next/standalone/.next/server/app/api/auth/login/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/auth/logout/route.js +1 -1
- package/.next/standalone/.next/server/app/api/auth/logout/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/auth/me/route.js +1 -1
- package/.next/standalone/.next/server/app/api/auth/me/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/auth/totp/setup/route.js +1 -1
- package/.next/standalone/.next/server/app/api/auth/totp/setup/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/auth/totp/status/route.js +1 -1
- package/.next/standalone/.next/server/app/api/auth/totp/status/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/auth/totp/verify/route.js +1 -1
- package/.next/standalone/.next/server/app/api/auth/totp/verify/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/bulk/route.js +2 -2
- 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 +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 +2 -2
- package/.next/standalone/.next/server/app/api/events/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/folders/route.js +1 -1
- package/.next/standalone/.next/server/app/api/folders/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/network/discovered/route.js +1 -1
- package/.next/standalone/.next/server/app/api/network/discovered/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/health/route.js +1 -1
- package/.next/standalone/.next/server/app/api/network/health/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/network/identity/route.js +1 -1
- package/.next/standalone/.next/server/app/api/network/identity/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/network/keys/[id]/route.js +1 -1
- package/.next/standalone/.next/server/app/api/network/keys/[id]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/network/keys/route.js +1 -1
- package/.next/standalone/.next/server/app/api/network/keys/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/network/nodes/[id]/route.js +1 -1
- package/.next/standalone/.next/server/app/api/network/nodes/[id]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/network/nodes/check/route.js +1 -1
- package/.next/standalone/.next/server/app/api/network/nodes/check/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/network/nodes/route.js +1 -1
- package/.next/standalone/.next/server/app/api/network/nodes/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/network/projects/route.js +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/proxy/[nodeId]/[...path]/route.js +1 -1
- package/.next/standalone/.next/server/app/api/network/proxy/[nodeId]/[...path]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/network/search/route.js +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 +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 +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 +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/terminal/token/route.js +1 -1
- package/.next/standalone/.next/server/app/api/network/terminal/token/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/network/workspaces/[id]/route.js +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 +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 +2 -2
- 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 +2 -2
- package/.next/standalone/.next/server/app/api/panes/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/projects/route.js +2 -2
- package/.next/standalone/.next/server/app/api/projects/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/search/route.js +2 -2
- 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 +2 -2
- 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 +2 -2
- 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 +2 -2
- 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 +2 -2
- package/.next/standalone/.next/server/app/api/sessions/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/sync/route.js +3 -3
- package/.next/standalone/.next/server/app/api/sync/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/tags/route.js +2 -2
- 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 +2 -2
- 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 +2 -2
- 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 +2 -2
- 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 +2 -2
- 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 +2 -2
- 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 +2 -2
- 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 +2 -2
- 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]__086be15a._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0955695e._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0fac388d._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__18a58c5f._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__190b05d8._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__1a211143._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__20353b76._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__2861e096._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__2a7a798c._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__2b6758fc._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__2e9d1d5a._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__31f028ec._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__34c34116._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__3aa57139._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__3ce30e4e._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__41ae8be6._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__41e589ee._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__43112c34._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__464db440._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__466c7e18._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__47a63195._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__4ad64489._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__5bbc73ff._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__60689e2b._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__67c4abf3._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__6b94cc47._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__6c6cfe82._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__776b2fd5._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__7901e2ab._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__83b9bcf3._.js +11 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__89124c96._.js +243 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__8c2eee30._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__8ffcf827._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__95b7f18e._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__9e343d64._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__a2ee9884._.js +13 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__a651ede9._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__a6ce192e._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__b4b692df._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__b4edb4d6._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__b71497ab._.js +243 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__bc97ddc7._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__bef2ed87._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__c525457e._.js +19 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__c546cf71._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__ccc27199._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__ce5edd98._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__d877df12._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__dd2e81be._.js +11 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__de96c005._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__df6bc9e9._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__e2b78951._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__e742ef33._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__63c35e0f._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__66aca5d4._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/_1f12caba._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_3b54193d._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_43e7e611._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_5ac43c5d._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_cd50a174._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/src_app_(desktop)_terminal_page_tsx_de5e8d85._.js +1 -1
- package/.next/standalone/.next/server/edge/chunks/[root-of-the-server]__32a0045c._.js +1 -1
- package/.next/standalone/.next/server/edge/chunks/_d73df637._.js +3 -0
- package/.next/standalone/.next/server/edge/chunks/turbopack-node_modules_next_dist_esm_build_templates_edge-wrapper_a4434a38.js +6 -0
- package/.next/standalone/.next/server/middleware-manifest.json +7 -7
- 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/{31f45c67350373f2.js → 10c6424526b53431.js} +2 -2
- package/.next/standalone/.next/static/chunks/{8cc07e8d950d6962.js → 27649ec994a696fb.js} +1 -1
- package/.next/standalone/.next/static/chunks/{3c4ee171d96760e8.js → 302ce212c690bec4.js} +2 -2
- package/.next/standalone/.next/static/chunks/51dacec57c9714c0.js +1 -0
- package/.next/standalone/.next/static/chunks/{f2b58d718b34646d.js → 53782d1e41fd7f82.js} +1 -1
- package/.next/standalone/.next/static/chunks/{f789a1d0736e1154.js → 58d78765e5140dcb.js} +1 -1
- package/.next/standalone/.next/static/chunks/{7c1e6d7f1d3b4173.js → cb442c50eecb758d.js} +2 -2
- 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 -91
- 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 +101 -101
- package/bin/mdns-service.js +171 -171
- package/bin/postinstall.js +35 -35
- package/bin/setup-admin.js +189 -189
- package/bin/spaces-dev.js +208 -173
- package/bin/spaces-install.js +426 -0
- package/bin/spaces-setup.js +242 -242
- package/bin/spaces.js +465 -317
- package/bin/terminal-server.js +1117 -1051
- package/package.json +89 -91
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__025cd038._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__042ba2bc._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__07cc153d._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__08e411dd._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0add852f._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0c113ed0._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0cf032ab._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__11293532._.js +0 -13
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__1194f2c1._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__19c2d094._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__19c3ad21._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__1ebc634e._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__24197539._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__2891c969._.js +0 -11
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__2c6e6625._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__2fe2b40e._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__318f12c6._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__32df12e4._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__34e7cb21._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__49c92d87._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__52bde30c._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__53090a81._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__57193cf5._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__5c33078d._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__5f8c694a._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__630b9a6a._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__727d05f1._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__75a774f0._.js +0 -233
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__7f0bc701._.js +0 -233
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__8915603e._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__8afe4d5e._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__9d15de27._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__a1fbc199._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__a1fe6070._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__a3f604d6._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__a5504205._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__abf53d11._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__b78eeead._.js +0 -11
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__c1b8f8f6._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__c3c74ca4._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__c79824d9._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__c9db5d8a._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__cbd9cb15._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__ccb4e920._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__d15515e3._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__d490583e._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__d9c106a9._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__de2c3bf8._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__dfbf7bdd._.js +0 -19
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__e1e26f47._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__ee9346bf._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__fea012d6._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__ff1b0769._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__eac7aeff._.js +0 -3
- package/.next/standalone/.next/server/edge/chunks/node_modules_next_dist_esm_build_templates_edge-wrapper_78fa9d6a.js +0 -3
- package/.next/standalone/.next/server/edge/chunks/turbopack-node_modules_next_dist_esm_build_templates_edge-wrapper_a5230bba.js +0 -6
- package/.next/standalone/.next/static/chunks/780381483091d8fb.js +0 -1
- package/.next/standalone/.next/static/chunks/806334ea0f6ca92a.css +0 -3
- 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/{k4gRsS979E-cbl1AWcHhx → U-EFIvMEHFIoGaoj6xBXK}/_buildManifest.js +0 -0
- /package/.next/standalone/.next/static/{k4gRsS979E-cbl1AWcHhx → U-EFIvMEHFIoGaoj6xBXK}/_clientMiddlewareManifest.json +0 -0
- /package/.next/standalone/.next/static/{k4gRsS979E-cbl1AWcHhx → U-EFIvMEHFIoGaoj6xBXK}/_ssgManifest.js +0 -0
- /package/.next/standalone/node_modules/@img/{sharp-libvips-linux-x64 → sharp-win32-x64}/versions.json +0 -0
package/bin/mdns-service.js
CHANGED
|
@@ -1,171 +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 };
|
|
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 };
|
package/bin/postinstall.js
CHANGED
|
@@ -1,35 +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.');
|
|
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.');
|