@jlongo78/agent-spaces 0.9.6 → 0.9.8
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 +68 -0
- package/.next/standalone/.claude/spaces-env.json +1 -0
- package/.next/standalone/.next/BUILD_ID +1 -1
- package/.next/standalone/.next/app-path-routes-manifest.json +1 -0
- package/.next/standalone/.next/build-manifest.json +2 -2
- package/.next/standalone/.next/prerender-manifest.json +3 -3
- package/.next/standalone/.next/required-server-files.json +19 -19
- package/.next/standalone/.next/routes-manifest.json +6 -0
- package/.next/standalone/.next/server/app/(desktop)/admin/analytics/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/(desktop)/admin/users/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/(desktop)/analytics/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/(desktop)/cortex/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/(desktop)/network/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/(desktop)/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/(desktop)/projects/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/(desktop)/sessions/[id]/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/(desktop)/sessions/[id]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/(desktop)/sessions/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/(desktop)/settings/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/(desktop)/terminal/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/(desktop)/terminal/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/(desktop)/terminal/pane/[id]/page_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 +2 -2
- package/.next/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_not-found.segments/_index.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/admin/analytics.html +1 -1
- package/.next/standalone/.next/server/app/admin/analytics.rsc +2 -2
- package/.next/standalone/.next/server/app/admin/analytics.segments/!KGRlc2t0b3Ap/admin/analytics/__PAGE__.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/admin/analytics.segments/!KGRlc2t0b3Ap/admin/analytics.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/admin/analytics.segments/!KGRlc2t0b3Ap/admin.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/admin/analytics.segments/!KGRlc2t0b3Ap.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/admin/analytics.segments/_full.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/admin/analytics.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/admin/analytics.segments/_index.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/admin/analytics.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/admin/users.html +1 -1
- package/.next/standalone/.next/server/app/admin/users.rsc +2 -2
- package/.next/standalone/.next/server/app/admin/users.segments/!KGRlc2t0b3Ap/admin/users/__PAGE__.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/admin/users.segments/!KGRlc2t0b3Ap/admin/users.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/admin/users.segments/!KGRlc2t0b3Ap/admin.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/admin/users.segments/!KGRlc2t0b3Ap.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/admin/users.segments/_full.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/admin/users.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/admin/users.segments/_index.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/admin/users.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/analytics.html +1 -1
- package/.next/standalone/.next/server/app/analytics.rsc +2 -2
- package/.next/standalone/.next/server/app/analytics.segments/!KGRlc2t0b3Ap/analytics/__PAGE__.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/analytics.segments/!KGRlc2t0b3Ap/analytics.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/analytics.segments/!KGRlc2t0b3Ap.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/analytics.segments/_full.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/analytics.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/analytics.segments/_index.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/analytics.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/api/analytics/overview/route.js +1 -1
- package/.next/standalone/.next/server/app/api/analytics/overview/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/benchmark/lobes/route.js +1 -1
- package/.next/standalone/.next/server/app/api/benchmark/lobes/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/benchmark/run/route.js +1 -1
- package/.next/standalone/.next/server/app/api/benchmark/run/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/benchmark/runs/[id]/route.js +1 -1
- package/.next/standalone/.next/server/app/api/benchmark/runs/[id]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/benchmark/runs/route.js +1 -1
- package/.next/standalone/.next/server/app/api/benchmark/runs/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/benchmark/status/route.js +1 -1
- package/.next/standalone/.next/server/app/api/benchmark/status/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/bulk/route.js +1 -1
- package/.next/standalone/.next/server/app/api/bulk/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/cortex/context/route.js +1 -1
- package/.next/standalone/.next/server/app/api/cortex/context/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/cortex/curation/assess/route.js +1 -1
- package/.next/standalone/.next/server/app/api/cortex/curation/assess/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/cortex/curation/publish/route.js +1 -1
- package/.next/standalone/.next/server/app/api/cortex/curation/publish/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/cortex/curation/refine/route.js +1 -1
- package/.next/standalone/.next/server/app/api/cortex/curation/refine/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/cortex/curation/review/route.js +1 -1
- package/.next/standalone/.next/server/app/api/cortex/curation/review/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/cortex/curation/seed/route.js +1 -1
- package/.next/standalone/.next/server/app/api/cortex/curation/seed/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/cortex/export/route.js +1 -1
- package/.next/standalone/.next/server/app/api/cortex/export/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/cortex/federation/pending/route.js +1 -1
- package/.next/standalone/.next/server/app/api/cortex/federation/pending/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/cortex/federation/resolve/route.js +1 -1
- package/.next/standalone/.next/server/app/api/cortex/federation/resolve/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/cortex/federation/search/route.js +1 -1
- package/.next/standalone/.next/server/app/api/cortex/federation/search/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/cortex/federation/teach/route.js +1 -1
- package/.next/standalone/.next/server/app/api/cortex/federation/teach/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/cortex/graph/edges/route.js +1 -1
- package/.next/standalone/.next/server/app/api/cortex/graph/edges/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/cortex/graph/entities/[id]/route.js +1 -1
- package/.next/standalone/.next/server/app/api/cortex/graph/entities/[id]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/cortex/graph/entities/route.js +1 -1
- package/.next/standalone/.next/server/app/api/cortex/graph/entities/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/cortex/graph/populate/route.js +1 -1
- package/.next/standalone/.next/server/app/api/cortex/graph/populate/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/cortex/import/route.js +1 -1
- package/.next/standalone/.next/server/app/api/cortex/import/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/cortex/import/status/route.js +1 -1
- package/.next/standalone/.next/server/app/api/cortex/import/status/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/cortex/ingest/bootstrap/route.js +1 -1
- package/.next/standalone/.next/server/app/api/cortex/ingest/bootstrap/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/cortex/ingest/status/route.js +1 -1
- package/.next/standalone/.next/server/app/api/cortex/ingest/status/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/cortex/knowledge/[id]/route.js +1 -1
- package/.next/standalone/.next/server/app/api/cortex/knowledge/[id]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/cortex/knowledge/route.js +1 -1
- package/.next/standalone/.next/server/app/api/cortex/knowledge/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/cortex/lobes/[id]/route.js +1 -1
- package/.next/standalone/.next/server/app/api/cortex/lobes/[id]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/cortex/lobes/route.js +1 -1
- package/.next/standalone/.next/server/app/api/cortex/lobes/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/cortex/lobes/share/route.js +1 -1
- package/.next/standalone/.next/server/app/api/cortex/lobes/share/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/cortex/marketplace/browse/route.js +1 -1
- package/.next/standalone/.next/server/app/api/cortex/marketplace/browse/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/cortex/marketplace/preview/route.js +1 -1
- package/.next/standalone/.next/server/app/api/cortex/marketplace/preview/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/cortex/mcp/call/route.js +1 -1
- package/.next/standalone/.next/server/app/api/cortex/mcp/call/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/cortex/mcp/tools/route.js +1 -1
- package/.next/standalone/.next/server/app/api/cortex/mcp/tools/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/cortex/search/route.js +1 -1
- package/.next/standalone/.next/server/app/api/cortex/search/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/cortex/settings/route.js +1 -1
- package/.next/standalone/.next/server/app/api/cortex/settings/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/cortex/status/route.js +1 -1
- package/.next/standalone/.next/server/app/api/cortex/status/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/cortex/timeline/route.js +1 -1
- package/.next/standalone/.next/server/app/api/cortex/timeline/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/cortex/usage/route.js +1 -1
- package/.next/standalone/.next/server/app/api/cortex/usage/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/cortex/workspace/[id]/context/route.js +1 -1
- package/.next/standalone/.next/server/app/api/cortex/workspace/[id]/context/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/events/route.js +1 -1
- package/.next/standalone/.next/server/app/api/events/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/files/route.js +1 -1
- package/.next/standalone/.next/server/app/api/files/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/folders/route.js +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/panes/[id]/route.js +1 -1
- package/.next/standalone/.next/server/app/api/network/panes/[id]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/network/panes/route.js +1 -1
- package/.next/standalone/.next/server/app/api/network/panes/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/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/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]/diff/route.js +1 -1
- package/.next/standalone/.next/server/app/api/panes/[id]/diff/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/panes/[id]/route.js +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 +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 +1 -1
- package/.next/standalone/.next/server/app/api/projects/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/proxy/models/[modelId]/[...path]/route.js +1 -1
- package/.next/standalone/.next/server/app/api/proxy/models/[modelId]/[...path]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/proxy/models/[modelId]/status/route.js +1 -1
- package/.next/standalone/.next/server/app/api/proxy/models/[modelId]/status/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 +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 +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 +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 +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 +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 +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/whisper/config/route.js +1 -1
- package/.next/standalone/.next/server/app/api/whisper/config/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/whisper/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/wizard/chart/route/app-paths-manifest.json +3 -0
- package/.next/standalone/.next/server/app/api/wizard/chart/route/build-manifest.json +11 -0
- package/.next/standalone/.next/server/app/api/wizard/chart/route/server-reference-manifest.json +4 -0
- package/.next/standalone/.next/server/app/api/wizard/chart/route.js +7 -0
- package/.next/standalone/.next/server/app/api/wizard/chart/route.js.map +5 -0
- package/.next/standalone/.next/server/app/api/wizard/chart/route.js.nft.json +1 -0
- package/.next/standalone/.next/server/app/api/wizard/chart/route_client-reference-manifest.js +2 -0
- package/.next/standalone/.next/server/app/api/wizard/chat/route.js +1 -1
- package/.next/standalone/.next/server/app/api/wizard/chat/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/workspaces/[id]/context/[key]/route.js +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 +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 +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 +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 +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 +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 +2 -2
- package/.next/standalone/.next/server/app/api/workspaces/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/cortex.html +1 -1
- package/.next/standalone/.next/server/app/cortex.rsc +3 -3
- package/.next/standalone/.next/server/app/cortex.segments/!KGRlc2t0b3Ap/cortex/__PAGE__.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/cortex.segments/!KGRlc2t0b3Ap/cortex.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/cortex.segments/!KGRlc2t0b3Ap.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/cortex.segments/_full.segment.rsc +3 -3
- package/.next/standalone/.next/server/app/cortex.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/cortex.segments/_index.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/cortex.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/login/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/login.html +1 -1
- package/.next/standalone/.next/server/app/login.rsc +2 -2
- package/.next/standalone/.next/server/app/login.segments/_full.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/login.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/login.segments/_index.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/login.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/login.segments/login/__PAGE__.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/login.segments/login.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/m/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/m/projects/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/m/projects.html +1 -1
- package/.next/standalone/.next/server/app/m/projects.rsc +2 -2
- package/.next/standalone/.next/server/app/m/projects.segments/_full.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/m/projects.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/m/projects.segments/_index.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/m/projects.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/m/projects.segments/m/projects/__PAGE__.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/m/projects.segments/m/projects.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/m/projects.segments/m.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/m/sessions/[id]/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/m/sessions/[id]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/m/sessions/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/m/sessions.html +1 -1
- package/.next/standalone/.next/server/app/m/sessions.rsc +2 -2
- package/.next/standalone/.next/server/app/m/sessions.segments/_full.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/m/sessions.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/m/sessions.segments/_index.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/m/sessions.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/m/sessions.segments/m/sessions/__PAGE__.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/m/sessions.segments/m/sessions.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/m/sessions.segments/m.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/m/settings/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/m/settings.html +1 -1
- package/.next/standalone/.next/server/app/m/settings.rsc +2 -2
- package/.next/standalone/.next/server/app/m/settings.segments/_full.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/m/settings.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/m/settings.segments/_index.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/m/settings.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/m/settings.segments/m/settings/__PAGE__.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/m/settings.segments/m/settings.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/m/settings.segments/m.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/m/terminal/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/m/terminal.html +1 -1
- package/.next/standalone/.next/server/app/m/terminal.rsc +3 -3
- package/.next/standalone/.next/server/app/m/terminal.segments/_full.segment.rsc +3 -3
- package/.next/standalone/.next/server/app/m/terminal.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/m/terminal.segments/_index.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/m/terminal.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/m/terminal.segments/m/terminal/__PAGE__.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/m/terminal.segments/m/terminal.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/m/terminal.segments/m.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/m.html +1 -1
- package/.next/standalone/.next/server/app/m.rsc +2 -2
- package/.next/standalone/.next/server/app/m.segments/_full.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/m.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/m.segments/_index.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/m.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/m.segments/m/__PAGE__.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/m.segments/m.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/network.html +1 -1
- package/.next/standalone/.next/server/app/network.rsc +2 -2
- package/.next/standalone/.next/server/app/network.segments/!KGRlc2t0b3Ap/network/__PAGE__.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/network.segments/!KGRlc2t0b3Ap/network.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/network.segments/!KGRlc2t0b3Ap.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/network.segments/_full.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/network.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/network.segments/_index.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/network.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/projects.html +1 -1
- package/.next/standalone/.next/server/app/projects.rsc +2 -2
- package/.next/standalone/.next/server/app/projects.segments/!KGRlc2t0b3Ap/projects/__PAGE__.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/projects.segments/!KGRlc2t0b3Ap/projects.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/projects.segments/!KGRlc2t0b3Ap.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/projects.segments/_full.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/projects.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/projects.segments/_index.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/projects.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/sessions.html +1 -1
- package/.next/standalone/.next/server/app/sessions.rsc +2 -2
- package/.next/standalone/.next/server/app/sessions.segments/!KGRlc2t0b3Ap/sessions/__PAGE__.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/sessions.segments/!KGRlc2t0b3Ap/sessions.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/sessions.segments/!KGRlc2t0b3Ap.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/sessions.segments/_full.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/sessions.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/sessions.segments/_index.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/sessions.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/settings.html +1 -1
- package/.next/standalone/.next/server/app/settings.rsc +2 -2
- package/.next/standalone/.next/server/app/settings.segments/!KGRlc2t0b3Ap/settings/__PAGE__.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/settings.segments/!KGRlc2t0b3Ap/settings.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/settings.segments/!KGRlc2t0b3Ap.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/settings.segments/_full.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/settings.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/settings.segments/_index.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/settings.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/terminal.html +1 -1
- package/.next/standalone/.next/server/app/terminal.rsc +3 -3
- package/.next/standalone/.next/server/app/terminal.segments/!KGRlc2t0b3Ap/terminal/__PAGE__.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/terminal.segments/!KGRlc2t0b3Ap/terminal.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/terminal.segments/!KGRlc2t0b3Ap.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/terminal.segments/_full.segment.rsc +3 -3
- package/.next/standalone/.next/server/app/terminal.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/terminal.segments/_index.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/terminal.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/vr/page/react-loadable-manifest.json +1 -1
- package/.next/standalone/.next/server/app/vr/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/vr.html +1 -1
- package/.next/standalone/.next/server/app/vr.rsc +3 -3
- package/.next/standalone/.next/server/app/vr.segments/_full.segment.rsc +3 -3
- package/.next/standalone/.next/server/app/vr.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/vr.segments/_index.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/vr.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/vr.segments/vr/__PAGE__.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/vr.segments/vr.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/workspaces.html +1 -1
- package/.next/standalone/.next/server/app/workspaces.rsc +2 -2
- package/.next/standalone/.next/server/app/workspaces.segments/!KGRlc2t0b3Ap/workspaces/__PAGE__.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/workspaces.segments/!KGRlc2t0b3Ap/workspaces.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/workspaces.segments/!KGRlc2t0b3Ap.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/workspaces.segments/_full.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/workspaces.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/workspaces.segments/_index.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/workspaces.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/.next/server/app-paths-manifest.json +1 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__00e90fc6._.js +98 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__01ab8675._.js +98 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__03974f05._.js +98 -0
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__bb331da9._.js → [root-of-the-server]__046c9b91._.js} +3 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__04ae6bf0._.js +98 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__056fa416._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0ac4ea3f._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0b8e64cb._.js +98 -0
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__d95165f0._.js → [root-of-the-server]__0facd39e._.js} +3 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__10bc76a3._.js +3 -0
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__9d68157b._.js → [root-of-the-server]__115f3934._.js} +3 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__11f155f1._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__160e7c73._.js +22 -33
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__91e23c96._.js → [root-of-the-server]__17a3b966._.js} +3 -3
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__277d9445._.js → [root-of-the-server]__17d3a2b2._.js} +3 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__1a86c055._.js +98 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__20b5e9c4._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__28d6fbd8._.js +98 -0
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__04f04898._.js → [root-of-the-server]__2a3f866b._.js} +2 -2
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__a95bb38b._.js → [root-of-the-server]__316617e7._.js} +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__32ad8f71._.js +98 -0
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__6fe5e6c8._.js → [root-of-the-server]__35457394._.js} +2 -2
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__1f054c65._.js → [root-of-the-server]__35de78e6._.js} +3 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__3685ffcb._.js +98 -0
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__614458b7._.js → [root-of-the-server]__38954988._.js} +3 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__426ad936._.js +106 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__4985c034._.js +98 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__5c6ce9ed._.js +98 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__5cebe58a._.js +98 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__5d5e4789._.js +98 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__65676930._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__67cab326._.js +58 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__698c6f01._.js +98 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__6c64af29._.js +131 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__73aed9f5._.js +98 -0
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__ac84b704._.js → [root-of-the-server]__79b6a9bb._.js} +3 -3
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__e56abacf._.js → [root-of-the-server]__7db704c6._.js} +4 -4
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__812ca02b._.js +98 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__821f50fa._.js +98 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__8716b86e._.js +98 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__884ef754._.js +98 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__88cdbd68._.js +98 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__89d9aba9._.js +98 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__8d536cb5._.js +98 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__8df8c5d1._.js +98 -0
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__2d7a454e._.js → [root-of-the-server]__8f2ccc41._.js} +3 -3
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__2a2c5fc5._.js → [root-of-the-server]__95c9d682._.js} +4 -4
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__9e5d7774._.js +98 -0
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__cc6e2885._.js → [root-of-the-server]__9edcff87._.js} +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__a049dfc2._.js +98 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__a5b4bb9a._.js +98 -0
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__929ea03a._.js → [root-of-the-server]__a83262a1._.js} +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__a9cd1240._.js +98 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__a9d7f822._.js +98 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__ad08c221._.js +98 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__ad585f2f._.js +98 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__afcb8f7d._.js +98 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__bc250d43._.js +98 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__bce2a6e7._.js +98 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__c011bf91._.js +98 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__c0ac2895._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__c130a00c._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__c37d6380._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__cae392eb._.js +98 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__cc2616bb._.js +3 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__d501fa9b._.js +98 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__d59c6c15._.js +98 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__d5c1db32._.js +98 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__d5d92527._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__dba60c86._.js +98 -0
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__2384f98e._.js → [root-of-the-server]__de14b9ae._.js} +3 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__e10643d1._.js +98 -0
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__00fdfbda._.js → [root-of-the-server]__e2a996e5._.js} +2 -2
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__4d903941._.js → [root-of-the-server]__e3477417._.js} +3 -3
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__32dc5513._.js → [root-of-the-server]__e4db362e._.js} +2 -2
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__49e42a3a._.js → [root-of-the-server]__e4e70b86._.js} +3 -3
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__ac39ecc7._.js → [root-of-the-server]__e54925af._.js} +3 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__e8edc5b0._.js +98 -0
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__eafd040b._.js → [root-of-the-server]__eab4d83b._.js} +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__ead29015._.js +1 -1
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__194955d4._.js → [root-of-the-server]__f056fd83._.js} +3 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__f0e99572._.js +98 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__fe1e16d0._.js +98 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__ff9cd277._.js +98 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__ffaea2ce._.js +98 -0
- package/.next/standalone/.next/server/chunks/_next-internal_server_app_api_wizard_chart_route_actions_888e2ec1.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__2cffc362._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__f1050870._.js → [root-of-the-server]__47c97637._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__66aca5d4._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_17b946fd._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/_2a1d79e7._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_5c3c4cfa._.js +7 -5
- package/.next/standalone/.next/server/chunks/ssr/_ba432382._.js +7 -5
- package/.next/standalone/.next/server/chunks/ssr/src_app_(desktop)_cortex_page_tsx_0f33d8b3._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/src_app_(desktop)_terminal_page_tsx_de5e8d85._.js +4 -4
- package/.next/standalone/.next/server/edge/chunks/[root-of-the-server]__90eeddae._.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/0852575eb90c1e8d.js +85 -0
- package/.next/standalone/.next/static/chunks/{74d0ac0b1d0a1b79.js → 10b00b4f66102dcf.js} +1 -1
- package/.next/standalone/.next/static/chunks/{16eb77953dee9ea3.js → 19c71a8376c23c58.js} +1 -1
- package/.next/standalone/.next/static/chunks/2b769d1597e4fc1c.css +3 -0
- package/.next/standalone/.next/static/chunks/{3e91fc608659c524.js → 350271fe79509caf.js} +1 -1
- package/.next/standalone/.next/static/chunks/{70423c7afd8abf5f.js → 597847c22200c212.js} +1 -1
- package/.next/standalone/.next/static/chunks/{fb0abd1933b2b2e1.js → 7f6a14f1849fa94d.js} +1 -1
- package/.next/standalone/.next/static/chunks/{7ecd9bbb0ce4d68a.js → b7c8fe9b7275a84f.js} +1 -1
- package/.next/standalone/.next/static/chunks/{6245135a7afb8c7b.js → c9b10fc55516d142.js} +8 -6
- package/.next/standalone/.next/static/chunks/d0065f48eab94944.js +1 -0
- package/.next/standalone/.next/static/chunks/{180c1b9ff31b979f.js → f7b34c807badf95d.js} +8 -6
- package/.next/standalone/.spaces/cortex-context.md +50 -144
- package/.next/standalone/LICENSE +661 -661
- package/.next/standalone/NOTICE +5 -5
- package/.next/standalone/README.md +131 -131
- package/.next/standalone/bin/cortex-hook.js +79 -79
- package/.next/standalone/bin/cortex-hook.sh +62 -62
- package/.next/standalone/bin/cortex-learn-hook.js +138 -138
- package/.next/standalone/bin/cortex-mcp.js +60 -60
- package/.next/standalone/bin/cortex-pi-extension.ts +170 -170
- package/.next/standalone/bin/fix-standalone-externals.js +79 -79
- package/.next/standalone/bin/lib/auto-setup.js +110 -110
- package/.next/standalone/bin/mdns-service.js +171 -171
- package/.next/standalone/bin/postinstall.js +35 -35
- package/.next/standalone/bin/setup-admin.js +195 -195
- package/.next/standalone/bin/spaces-dev.js +247 -247
- package/.next/standalone/bin/spaces-install.js +660 -660
- package/.next/standalone/bin/spaces-postinstall.js +50 -50
- package/.next/standalone/bin/spaces-reset-totp.js +50 -50
- package/.next/standalone/bin/spaces-service.js +1046 -1046
- package/.next/standalone/bin/spaces-setup.js +253 -253
- package/.next/standalone/bin/spaces.js +808 -805
- package/.next/standalone/bin/ssh-auth-keys.sh +68 -68
- package/.next/standalone/bin/terminal-server.js +2819 -2781
- package/.next/standalone/cortex-hook-debug.log +57 -23
- package/.next/standalone/docker-compose.yml +28 -28
- package/.next/standalone/docs/architecture.md +387 -387
- package/.next/standalone/docs/cortex-integration-reference.md +268 -268
- package/.next/standalone/docs/cortex.md +293 -293
- package/.next/standalone/docs/getting-started.md +96 -96
- package/.next/standalone/docs/plans/2026-02-24-multi-agent-sessions-design.md +133 -133
- package/.next/standalone/docs/plans/2026-02-24-multi-agent-sessions-plan.md +959 -959
- package/.next/standalone/docs/plans/2026-03-02-security-audit.md +229 -229
- package/.next/standalone/docs/plans/2026-03-07-service-command-design.md +146 -146
- package/.next/standalone/docs/plans/2026-03-07-service-command-plan.md +254 -254
- package/.next/standalone/docs/server-install.md +564 -564
- package/.next/standalone/docs/social-card.html +150 -150
- package/.next/standalone/docs/superpowers/plans/2026-03-12-spaces-cortex.md +5270 -5270
- package/.next/standalone/docs/superpowers/plans/2026-03-13-cortex-wiring.md +1387 -1387
- package/.next/standalone/docs/superpowers/plans/2026-03-14-cortex-v2-entity-graph.md +1923 -1923
- package/.next/standalone/docs/superpowers/plans/2026-03-14-cortex-v2-knowledge-evolution.md +1113 -1113
- package/.next/standalone/docs/superpowers/plans/2026-03-15-cortex-v2-boundary-engine.md +853 -853
- package/.next/standalone/docs/superpowers/plans/2026-03-15-cortex-v2-context-engine.md +1274 -1274
- package/.next/standalone/docs/superpowers/plans/2026-03-15-cortex-v2-signal-ingestion.md +933 -933
- package/.next/standalone/docs/superpowers/plans/2026-03-16-cortex-lobes.md +1080 -1080
- package/.next/standalone/docs/superpowers/plans/2026-03-16-cortex-v2-gravity-system.md +768 -768
- package/.next/standalone/docs/superpowers/plans/2026-03-16-cortex-v2-ui.md +1108 -1108
- package/.next/standalone/docs/superpowers/plans/2026-03-18-cortex-ui-integration.md +1846 -1846
- package/.next/standalone/docs/superpowers/plans/2026-03-19-vr-phase1-shell.md +1639 -1639
- package/.next/standalone/docs/superpowers/plans/2026-03-27-dockview-pane-layout.md +98 -98
- package/.next/standalone/docs/superpowers/specs/2026-03-11-universe-view-design.md +320 -320
- package/.next/standalone/docs/superpowers/specs/2026-03-12-spaces-brain-design.md +720 -720
- package/.next/standalone/docs/superpowers/specs/2026-03-13-cortex-wiring-design.md +268 -268
- package/.next/standalone/docs/superpowers/specs/2026-03-14-cortex-v2-design.md +623 -623
- package/.next/standalone/docs/superpowers/specs/2026-03-16-cortex-lobes-design.md +263 -263
- package/.next/standalone/docs/superpowers/specs/2026-03-16-cortex-v2-ui-design.md +240 -240
- package/.next/standalone/docs/superpowers/specs/2026-03-16-pane-ux-design.md +77 -77
- package/.next/standalone/docs/superpowers/specs/2026-03-18-cortex-ui-integration-design.md +341 -341
- package/.next/standalone/docs/superpowers/specs/2026-03-19-vr-phase1-shell-design.md +288 -288
- package/.next/standalone/docs/superpowers/specs/2026-03-27-pane-diff-review-and-project-wizard-design.md +322 -322
- package/.next/standalone/docs/tiers.md +104 -104
- package/.next/standalone/eslint.config.mjs +18 -18
- package/.next/standalone/next.config.ts +20 -20
- package/.next/standalone/nginx.conf +53 -53
- 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-lock.json +14985 -14986
- package/.next/standalone/package.json +111 -111
- package/.next/standalone/postcss.config.mjs +7 -7
- package/.next/standalone/scripts/rebuild.cmd +65 -65
- package/.next/standalone/scripts/rebuild.sh +59 -59
- package/.next/standalone/server.js +1 -1
- package/.next/standalone/src/app/(desktop)/admin/analytics/page.tsx +266 -266
- package/.next/standalone/src/app/(desktop)/admin/users/page.tsx +399 -399
- package/.next/standalone/src/app/(desktop)/analytics/page.tsx +166 -166
- package/.next/standalone/src/app/(desktop)/cortex/page.tsx +81 -81
- package/.next/standalone/src/app/(desktop)/dashboard-client.tsx +56 -56
- package/.next/standalone/src/app/(desktop)/layout.tsx +18 -18
- package/.next/standalone/src/app/(desktop)/network/page.tsx +137 -137
- package/.next/standalone/src/app/(desktop)/page.tsx +17 -17
- package/.next/standalone/src/app/(desktop)/projects/page.tsx +68 -68
- package/.next/standalone/src/app/(desktop)/sessions/[id]/page.tsx +519 -519
- package/.next/standalone/src/app/(desktop)/sessions/page.tsx +145 -145
- package/.next/standalone/src/app/(desktop)/settings/page.tsx +446 -446
- package/.next/standalone/src/app/(desktop)/terminal/layout.tsx +7 -7
- package/.next/standalone/src/app/(desktop)/terminal/page.tsx +1330 -1291
- package/.next/standalone/src/app/(desktop)/terminal/pane/[id]/page.tsx +211 -211
- package/.next/standalone/src/app/(desktop)/terminal/remote/[nodeId]/[workspaceId]/page.tsx +252 -252
- package/.next/standalone/src/app/(desktop)/workspaces/page.tsx +12 -12
- package/.next/standalone/src/app/api/admin/analytics/route.ts +10 -10
- package/.next/standalone/src/app/api/admin/users/[id]/route.ts +20 -20
- package/.next/standalone/src/app/api/admin/users/route.ts +15 -15
- package/.next/standalone/src/app/api/analytics/overview/route.ts +80 -80
- package/.next/standalone/src/app/api/auth/login/route.ts +10 -10
- package/.next/standalone/src/app/api/auth/logout/route.ts +9 -9
- package/.next/standalone/src/app/api/auth/me/route.ts +22 -22
- package/.next/standalone/src/app/api/auth/totp/setup/route.ts +10 -10
- package/.next/standalone/src/app/api/auth/totp/status/route.ts +10 -10
- package/.next/standalone/src/app/api/auth/totp/verify/route.ts +10 -10
- package/.next/standalone/src/app/api/benchmark/lobes/route.ts +16 -16
- package/.next/standalone/src/app/api/benchmark/run/route.ts +113 -92
- package/.next/standalone/src/app/api/benchmark/runs/[id]/route.ts +26 -26
- package/.next/standalone/src/app/api/benchmark/runs/route.ts +16 -16
- package/.next/standalone/src/app/api/benchmark/status/route.ts +35 -35
- package/.next/standalone/src/app/api/bulk/route.ts +34 -34
- package/.next/standalone/src/app/api/chat/route.ts +85 -85
- package/.next/standalone/src/app/api/config/route.ts +30 -30
- package/.next/standalone/src/app/api/cortex/context/route.ts +78 -78
- package/.next/standalone/src/app/api/cortex/curation/assess/route.ts +27 -27
- package/.next/standalone/src/app/api/cortex/curation/publish/route.ts +23 -23
- package/.next/standalone/src/app/api/cortex/curation/refine/route.ts +23 -23
- package/.next/standalone/src/app/api/cortex/curation/review/route.ts +29 -29
- package/.next/standalone/src/app/api/cortex/curation/seed/route.ts +23 -23
- package/.next/standalone/src/app/api/cortex/export/route.ts +40 -40
- package/.next/standalone/src/app/api/cortex/federation/pending/route.ts +20 -20
- package/.next/standalone/src/app/api/cortex/federation/resolve/route.ts +43 -43
- package/.next/standalone/src/app/api/cortex/federation/search/route.ts +35 -35
- package/.next/standalone/src/app/api/cortex/federation/teach/route.ts +76 -76
- package/.next/standalone/src/app/api/cortex/graph/edges/route.ts +112 -112
- package/.next/standalone/src/app/api/cortex/graph/entities/[id]/route.ts +73 -73
- package/.next/standalone/src/app/api/cortex/graph/entities/route.ts +75 -75
- package/.next/standalone/src/app/api/cortex/graph/populate/route.ts +203 -203
- package/.next/standalone/src/app/api/cortex/import/route.ts +75 -75
- package/.next/standalone/src/app/api/cortex/import/status/route.ts +15 -15
- package/.next/standalone/src/app/api/cortex/ingest/bootstrap/route.ts +39 -39
- package/.next/standalone/src/app/api/cortex/ingest/status/route.ts +15 -15
- package/.next/standalone/src/app/api/cortex/knowledge/[id]/route.ts +91 -91
- package/.next/standalone/src/app/api/cortex/knowledge/route.ts +97 -97
- package/.next/standalone/src/app/api/cortex/lobes/[id]/route.ts +67 -67
- package/.next/standalone/src/app/api/cortex/lobes/route.ts +22 -22
- package/.next/standalone/src/app/api/cortex/lobes/share/route.ts +80 -80
- package/.next/standalone/src/app/api/cortex/marketplace/browse/route.ts +43 -43
- package/.next/standalone/src/app/api/cortex/marketplace/preview/route.ts +46 -46
- package/.next/standalone/src/app/api/cortex/mcp/call/route.ts +11 -11
- package/.next/standalone/src/app/api/cortex/mcp/tools/route.ts +8 -8
- package/.next/standalone/src/app/api/cortex/search/route.ts +57 -45
- package/.next/standalone/src/app/api/cortex/settings/route.ts +35 -35
- package/.next/standalone/src/app/api/cortex/status/route.ts +169 -169
- package/.next/standalone/src/app/api/cortex/timeline/route.ts +42 -42
- package/.next/standalone/src/app/api/cortex/usage/route.ts +31 -31
- package/.next/standalone/src/app/api/cortex/workspace/[id]/context/route.ts +41 -41
- package/.next/standalone/src/app/api/events/route.ts +40 -40
- package/.next/standalone/src/app/api/files/route.ts +187 -187
- package/.next/standalone/src/app/api/folders/route.ts +107 -97
- package/.next/standalone/src/app/api/network/connect-callback/route.ts +11 -11
- package/.next/standalone/src/app/api/network/connect-request/[id]/route.ts +11 -11
- package/.next/standalone/src/app/api/network/connect-request/route.ts +17 -17
- package/.next/standalone/src/app/api/network/discovered/route.ts +9 -9
- package/.next/standalone/src/app/api/network/handshake/route.ts +25 -25
- package/.next/standalone/src/app/api/network/health/route.ts +10 -10
- package/.next/standalone/src/app/api/network/identity/route.ts +15 -15
- package/.next/standalone/src/app/api/network/keys/[id]/route.ts +10 -10
- package/.next/standalone/src/app/api/network/keys/route.ts +15 -15
- package/.next/standalone/src/app/api/network/nodes/[id]/route.ts +15 -15
- package/.next/standalone/src/app/api/network/nodes/check/route.ts +9 -9
- package/.next/standalone/src/app/api/network/nodes/route.ts +15 -15
- package/.next/standalone/src/app/api/network/panes/[id]/route.ts +78 -62
- package/.next/standalone/src/app/api/network/panes/route.ts +61 -50
- package/.next/standalone/src/app/api/network/projects/route.ts +32 -25
- package/.next/standalone/src/app/api/network/proxy/[nodeId]/[...path]/route.ts +25 -25
- package/.next/standalone/src/app/api/network/search/route.ts +45 -38
- package/.next/standalone/src/app/api/network/sessions/[id]/messages/route.ts +43 -36
- package/.next/standalone/src/app/api/network/sessions/[id]/route.ts +41 -34
- package/.next/standalone/src/app/api/network/sessions/route.ts +50 -43
- package/.next/standalone/src/app/api/network/terminal/token/route.ts +10 -10
- package/.next/standalone/src/app/api/network/workspaces/[id]/route.ts +80 -71
- package/.next/standalone/src/app/api/network/workspaces/route.ts +87 -85
- package/.next/standalone/src/app/api/panes/[id]/diff/route.ts +121 -121
- package/.next/standalone/src/app/api/panes/[id]/route.ts +60 -60
- package/.next/standalone/src/app/api/panes/route.ts +39 -39
- package/.next/standalone/src/app/api/projects/route.ts +13 -13
- package/.next/standalone/src/app/api/proxy/models/[modelId]/[...path]/route.ts +80 -80
- package/.next/standalone/src/app/api/proxy/models/[modelId]/status/route.ts +33 -33
- package/.next/standalone/src/app/api/search/route.ts +47 -47
- package/.next/standalone/src/app/api/sessions/[id]/chat/route.ts +120 -120
- package/.next/standalone/src/app/api/sessions/[id]/messages/route.ts +34 -34
- package/.next/standalone/src/app/api/sessions/[id]/route.ts +73 -73
- package/.next/standalone/src/app/api/sessions/route.ts +64 -64
- package/.next/standalone/src/app/api/sync/route.ts +24 -24
- package/.next/standalone/src/app/api/tags/route.ts +35 -35
- package/.next/standalone/src/app/api/tier/route.ts +16 -16
- package/.next/standalone/src/app/api/updates/route.ts +65 -65
- package/.next/standalone/src/app/api/whisper/config/route.ts +50 -42
- package/.next/standalone/src/app/api/whisper/route.ts +91 -91
- package/.next/standalone/src/app/api/wizard/chart/route.ts +129 -0
- package/.next/standalone/src/app/api/wizard/chat/route.ts +113 -113
- package/.next/standalone/src/app/api/workspaces/[id]/context/[key]/route.ts +39 -39
- package/.next/standalone/src/app/api/workspaces/[id]/context/route.ts +28 -28
- package/.next/standalone/src/app/api/workspaces/[id]/messages/[msgId]/route.ts +17 -17
- package/.next/standalone/src/app/api/workspaces/[id]/messages/route.ts +39 -39
- package/.next/standalone/src/app/api/workspaces/[id]/route.ts +47 -47
- package/.next/standalone/src/app/api/workspaces/[id]/sessions/route.ts +62 -62
- package/.next/standalone/src/app/api/workspaces/route.ts +79 -79
- package/.next/standalone/src/app/globals.css +88 -88
- package/.next/standalone/src/app/layout.tsx +33 -33
- package/.next/standalone/src/app/login/layout.tsx +7 -7
- package/.next/standalone/src/app/login/page.tsx +315 -315
- package/.next/standalone/src/app/m/layout.tsx +16 -16
- package/.next/standalone/src/app/m/page.tsx +118 -118
- package/.next/standalone/src/app/m/projects/page.tsx +64 -64
- package/.next/standalone/src/app/m/sessions/[id]/page.tsx +168 -168
- package/.next/standalone/src/app/m/sessions/page.tsx +177 -177
- package/.next/standalone/src/app/m/settings/page.tsx +230 -230
- package/.next/standalone/src/app/m/terminal/page.tsx +413 -413
- package/.next/standalone/src/app/vr/page.tsx +21 -21
- package/.next/standalone/src/app/vr/vr-app.tsx +163 -163
- package/.next/standalone/src/app/vr/vr-controls.tsx +139 -139
- package/.next/standalone/src/app/vr/vr-door.tsx +82 -82
- package/.next/standalone/src/app/vr/vr-environment.tsx +71 -71
- package/.next/standalone/src/app/vr/vr-gaze.tsx +89 -89
- package/.next/standalone/src/app/vr/vr-layout.ts +49 -49
- package/.next/standalone/src/app/vr/vr-lobby.tsx +97 -97
- package/.next/standalone/src/app/vr/vr-pane.tsx +195 -195
- package/.next/standalone/src/app/vr/vr-room.tsx +79 -79
- package/.next/standalone/src/app/vr/vr-terminal.tsx +303 -303
- package/.next/standalone/src/components/auth/totp-gate.tsx +183 -183
- package/.next/standalone/src/components/bus/activity-panel.tsx +261 -261
- package/.next/standalone/src/components/common/color-picker.tsx +35 -35
- package/.next/standalone/src/components/common/dev-directory-picker.tsx +339 -339
- package/.next/standalone/src/components/common/folder-picker.tsx +200 -200
- package/.next/standalone/src/components/common/tag-picker.tsx +190 -190
- package/.next/standalone/src/components/common/workspace-picker.tsx +113 -113
- package/.next/standalone/src/components/cortex/benchmark-tab.tsx +894 -880
- package/.next/standalone/src/components/cortex/constants.ts +29 -29
- package/.next/standalone/src/components/cortex/cortex-dashboard.tsx +304 -304
- package/.next/standalone/src/components/cortex/cortex-indicator.tsx +44 -44
- package/.next/standalone/src/components/cortex/cortex-panel.tsx +140 -140
- package/.next/standalone/src/components/cortex/cortex-settings.tsx +280 -280
- package/.next/standalone/src/components/cortex/curation-tab.tsx +810 -810
- package/.next/standalone/src/components/cortex/entity-detail.tsx +101 -101
- package/.next/standalone/src/components/cortex/entity-graph.tsx +382 -382
- package/.next/standalone/src/components/cortex/import-dialog.tsx +212 -212
- package/.next/standalone/src/components/cortex/injection-badge.tsx +72 -72
- package/.next/standalone/src/components/cortex/knowledge-card.tsx +109 -109
- package/.next/standalone/src/components/cortex/knowledge-tab.tsx +158 -158
- package/.next/standalone/src/components/cortex/lobe-settings.tsx +215 -215
- package/.next/standalone/src/components/cortex/marketplace-card.tsx +126 -126
- package/.next/standalone/src/components/cortex/marketplace-tab.tsx +113 -113
- package/.next/standalone/src/components/dashboard/activity-chart.tsx +41 -41
- package/.next/standalone/src/components/dashboard/model-usage-chart.tsx +61 -61
- package/.next/standalone/src/components/dashboard/recent-sessions.tsx +68 -68
- package/.next/standalone/src/components/dashboard/stats-cards.tsx +36 -36
- package/.next/standalone/src/components/files/file-explorer.tsx +703 -703
- package/.next/standalone/src/components/layout/providers.tsx +38 -38
- package/.next/standalone/src/components/layout/sidebar.tsx +170 -170
- package/.next/standalone/src/components/layout/tier-provider.tsx +53 -53
- package/.next/standalone/src/components/layout/update-banner.tsx +92 -92
- package/.next/standalone/src/components/mobile/bottom-nav.tsx +46 -46
- package/.next/standalone/src/components/mobile/immersive-voice-button.tsx +123 -123
- package/.next/standalone/src/components/mobile/mobile-chat-input.tsx +244 -244
- package/.next/standalone/src/components/mobile/mobile-header.tsx +44 -44
- package/.next/standalone/src/components/mobile/mobile-session-card.tsx +56 -56
- package/.next/standalone/src/components/mobile/mobile-terminal-input.tsx +74 -74
- package/.next/standalone/src/components/mobile/mobile-terminal-pane.tsx +302 -302
- package/.next/standalone/src/components/mobile/mobile-terminal-toolbar.tsx +76 -76
- package/.next/standalone/src/components/mobile/pull-to-refresh.tsx +82 -82
- package/.next/standalone/src/components/mobile/voice-input.tsx +53 -53
- package/.next/standalone/src/components/network/api-key-list.tsx +190 -190
- package/.next/standalone/src/components/network/connection-requests.tsx +94 -94
- package/.next/standalone/src/components/network/node-add-dialog.tsx +131 -131
- package/.next/standalone/src/components/network/node-badge.tsx +26 -26
- package/.next/standalone/src/components/network/node-list.tsx +207 -207
- package/.next/standalone/src/components/network/node-selector.tsx +49 -49
- package/.next/standalone/src/components/sessions/session-filters.tsx +116 -116
- package/.next/standalone/src/components/sessions/session-list.tsx +485 -485
- package/.next/standalone/src/components/terminal/pane-diff-panel.tsx +179 -179
- package/.next/standalone/src/components/terminal/terminal-pane.tsx +1530 -1464
- package/.next/standalone/src/components/viewer/chat-input.tsx +275 -275
- package/.next/standalone/src/components/viewer/message-renderer.tsx +551 -551
- package/.next/standalone/src/components/wizard/chart-wizard.tsx +405 -0
- package/.next/standalone/src/components/wizard/project-wizard.tsx +153 -153
- package/.next/standalone/src/components/wizard/wizard-chat.tsx +99 -99
- package/.next/standalone/src/components/wizard/wizard-plan-summary.tsx +103 -103
- package/.next/standalone/src/components/wizard/wizard-review.tsx +225 -225
- package/.next/standalone/src/components/workspace/universe-cluster.tsx +131 -131
- package/.next/standalone/src/components/workspace/universe-orb.tsx +128 -128
- package/.next/standalone/src/components/workspace/universe-types.ts +22 -22
- package/.next/standalone/src/components/workspace/universe-utils.ts +11 -11
- package/.next/standalone/src/components/workspace/universe-view.tsx +397 -397
- package/.next/standalone/src/components/workspace/workspace-chooser.tsx +634 -634
- package/.next/standalone/src/hooks/use-benchmark.ts +72 -71
- package/.next/standalone/src/hooks/use-bus.ts +147 -147
- package/.next/standalone/src/hooks/use-idle-detection.ts +79 -79
- package/.next/standalone/src/hooks/use-network.ts +229 -229
- package/.next/standalone/src/hooks/use-sessions.ts +437 -437
- package/.next/standalone/src/hooks/use-speech-recognition.ts +114 -113
- package/.next/standalone/src/hooks/use-sse.ts +35 -35
- package/.next/standalone/src/hooks/use-tier.ts +39 -39
- package/.next/standalone/src/lib/agents.ts +97 -97
- package/.next/standalone/src/lib/aider/parser.ts +111 -111
- package/.next/standalone/src/lib/api.ts +19 -19
- package/.next/standalone/src/lib/auth.ts +47 -47
- package/.next/standalone/src/lib/claude/parser.ts +212 -212
- package/.next/standalone/src/lib/claude/stats.ts +204 -204
- package/.next/standalone/src/lib/codex/parser.test.ts +111 -111
- package/.next/standalone/src/lib/codex/parser.ts +287 -287
- package/.next/standalone/src/lib/config.ts +132 -132
- package/.next/standalone/src/lib/cortex/benchmark.ts +83 -67
- package/.next/standalone/src/lib/cortex/config.ts +42 -42
- package/.next/standalone/src/lib/cortex/debug.ts +10 -10
- package/.next/standalone/src/lib/cortex/distillation/usage-store.ts +18 -18
- package/.next/standalone/src/lib/cortex/graph/resolver.ts +10 -10
- package/.next/standalone/src/lib/cortex/graph/types.ts +22 -22
- package/.next/standalone/src/lib/cortex/index.ts +109 -56
- package/.next/standalone/src/lib/cortex/ingestion/bootstrap.ts +14 -14
- package/.next/standalone/src/lib/cortex/knowledge/compat.ts +14 -14
- package/.next/standalone/src/lib/cortex/knowledge/contradiction.ts +10 -10
- package/.next/standalone/src/lib/cortex/knowledge/types.ts +67 -67
- package/.next/standalone/src/lib/cortex/lobes/config.ts +16 -16
- package/.next/standalone/src/lib/cortex/lobes/resolver.ts +8 -8
- package/.next/standalone/src/lib/cortex/lobes/shares.ts +14 -14
- package/.next/standalone/src/lib/cortex/mcp/server.ts +12 -12
- package/.next/standalone/src/lib/cortex/portability/exporter.ts +6 -6
- package/.next/standalone/src/lib/cortex/portability/importer.ts +10 -10
- package/.next/standalone/src/lib/cortex/retrieval/context-engine.ts +10 -10
- package/.next/standalone/src/lib/cortex/types.ts +39 -39
- package/.next/standalone/src/lib/cost-calculator.ts +48 -48
- package/.next/standalone/src/lib/db/init.ts +71 -71
- package/.next/standalone/src/lib/db/queries.ts +740 -827
- package/.next/standalone/src/lib/db/schema.ts +206 -206
- package/.next/standalone/src/lib/events/sse.ts +36 -36
- package/.next/standalone/src/lib/forge/parser.ts +52 -52
- package/.next/standalone/src/lib/gemini/parser.ts +258 -258
- package/.next/standalone/src/lib/license.ts +56 -56
- package/.next/standalone/src/lib/pro.ts +31 -31
- package/.next/standalone/src/lib/shell-user.ts +101 -0
- package/.next/standalone/src/lib/sync/indexer.ts +504 -504
- package/.next/standalone/src/lib/sync/watcher.ts +64 -64
- package/.next/standalone/src/lib/teams.ts +31 -31
- package/.next/standalone/src/lib/telemetry.ts +75 -75
- package/.next/standalone/src/lib/terminal/server.ts +188 -188
- package/.next/standalone/src/lib/tier.ts +38 -38
- package/.next/standalone/src/lib/utils.ts +72 -72
- package/.next/standalone/src/lib/vms/manager.ts +121 -121
- package/.next/standalone/src/middleware.ts +133 -133
- package/.next/standalone/src/types/claude.ts +208 -208
- package/.next/standalone/src/types/network.ts +61 -61
- package/.next/standalone/tests/setup.ts +8 -8
- package/.next/standalone/tsconfig.json +34 -34
- package/.next/standalone/vitest.config.ts +24 -24
- package/LICENSE +661 -661
- package/README.md +131 -131
- package/bin/cortex-hook.js +79 -79
- package/bin/cortex-hook.sh +62 -62
- package/bin/cortex-learn-hook.js +138 -138
- package/bin/cortex-mcp.js +60 -60
- package/bin/cortex-pi-extension.ts +170 -170
- package/bin/fix-standalone-externals.js +79 -79
- package/bin/lib/auto-setup.js +110 -110
- package/bin/mdns-service.js +171 -171
- package/bin/postinstall.js +35 -35
- package/bin/setup-admin.js +195 -195
- package/bin/spaces-dev.js +247 -247
- package/bin/spaces-install.js +660 -660
- package/bin/spaces-postinstall.js +50 -50
- package/bin/spaces-reset-totp.js +50 -50
- package/bin/spaces-service.js +1046 -1046
- package/bin/spaces-setup.js +253 -253
- package/bin/spaces.js +808 -805
- package/bin/ssh-auth-keys.sh +68 -68
- package/bin/terminal-server.js +2819 -2781
- package/package.json +111 -111
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0903a426._.js +0 -98
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__09e8ccc9._.js +0 -98
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__11c684b1._.js +0 -98
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__1572d4ef._.js +0 -98
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__186cd0bb._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__212760e6._.js +0 -98
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__228595ec._.js +0 -98
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__283c890f._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__2f300a68._.js +0 -98
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__2f452778._.js +0 -98
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__35f8e77e._.js +0 -98
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__379fc2e9._.js +0 -98
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__3b40d79f._.js +0 -98
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__3d3dca2b._.js +0 -98
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__4d5b78d2._.js +0 -98
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__54163e52._.js +0 -98
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__563c0817._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__5812f90a._.js +0 -98
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__5c5e87f5._.js +0 -98
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__60d15b16._.js +0 -98
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__69d315e5._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__71f29038._.js +0 -98
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__74084e07._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__7921aa80._.js +0 -98
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__7e077dd8._.js +0 -98
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__7ebc4280._.js +0 -131
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__857c60bb._.js +0 -98
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__874fe565._.js +0 -98
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__8e2171f7._.js +0 -98
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__95659b2d._.js +0 -98
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__9679b91e._.js +0 -98
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__a90729a1._.js +0 -98
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__ad4346fa._.js +0 -98
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__b0862d69._.js +0 -98
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__b43306ee._.js +0 -98
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__b689ff5e._.js +0 -106
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__ba87daaa._.js +0 -98
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__c0461005._.js +0 -98
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__c1deb5f3._.js +0 -98
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__c8a62f42._.js +0 -98
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__cabaac2b._.js +0 -98
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__cb027619._.js +0 -98
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__cf608218._.js +0 -98
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__cfc1290d._.js +0 -98
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__d0109b9b._.js +0 -98
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__d0125483._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__d048ee6b._.js +0 -98
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__d12644e7._.js +0 -98
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__e3cc946c._.js +0 -98
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__e6fd27f8._.js +0 -98
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__efb8251e._.js +0 -98
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__f44c6882._.js +0 -98
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__f85283de._.js +0 -98
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__feceb3e4._.js +0 -98
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__843070a6._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/_e84a0c06._.js +0 -3
- package/.next/standalone/.next/static/chunks/470cade58d4eceeb.css +0 -3
- package/.next/standalone/.next/static/chunks/9d4164833c2c1fd6.js +0 -85
- package/.next/standalone/.next/static/chunks/f091f4bf8d80fd07.js +0 -1
- 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/{5S4TviTCiNiTjf6KjXjBo → u1pHON3drz1mBi7owkbBP}/_buildManifest.js +0 -0
- /package/.next/standalone/.next/static/{5S4TviTCiNiTjf6KjXjBo → u1pHON3drz1mBi7owkbBP}/_clientMiddlewareManifest.json +0 -0
- /package/.next/standalone/.next/static/{5S4TviTCiNiTjf6KjXjBo → u1pHON3drz1mBi7owkbBP}/_ssgManifest.js +0 -0
- /package/.next/standalone/node_modules/@img/{sharp-libvips-linux-x64 → sharp-win32-x64}/versions.json +0 -0
|
@@ -1,827 +1,740 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
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
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
if (
|
|
101
|
-
where.push('s.
|
|
102
|
-
queryParams.push(
|
|
103
|
-
}
|
|
104
|
-
if (
|
|
105
|
-
where.push('s.
|
|
106
|
-
queryParams.push(
|
|
107
|
-
}
|
|
108
|
-
if (
|
|
109
|
-
where.push('s.
|
|
110
|
-
queryParams.push(
|
|
111
|
-
}
|
|
112
|
-
if (
|
|
113
|
-
where.push('
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
queryParams.push(
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
};
|
|
134
|
-
|
|
135
|
-
const
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
s.
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
s.
|
|
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
|
-
db
|
|
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
|
-
db
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
db
|
|
276
|
-
}
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
db
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
db
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
db
|
|
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
|
-
s.
|
|
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
|
-
db
|
|
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
|
-
|
|
456
|
-
|
|
457
|
-
}
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
function
|
|
517
|
-
return
|
|
518
|
-
}
|
|
519
|
-
|
|
520
|
-
function
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
}
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
if (
|
|
619
|
-
|
|
620
|
-
}
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
const
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
db
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
const
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
const db = getDb();
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
if (
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
}
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
const db = getDb();
|
|
742
|
-
db.prepare('UPDATE workspaces SET is_active = 0').run();
|
|
743
|
-
db.prepare('UPDATE workspaces SET is_active = 1 WHERE id = ?').run(workspaceId);
|
|
744
|
-
}
|
|
745
|
-
|
|
746
|
-
export function duplicateWorkspace(sourceId: number, newName: string, newColor?: string): { workspace: Workspace; panes: PaneData[] } {
|
|
747
|
-
const db = getDb();
|
|
748
|
-
|
|
749
|
-
// Create the new workspace
|
|
750
|
-
const src = db.prepare('SELECT * FROM workspaces WHERE id = ?').get(sourceId) as any;
|
|
751
|
-
const result = db.prepare(
|
|
752
|
-
'INSERT INTO workspaces (name, description, color, is_active) VALUES (?, ?, ?, 0)'
|
|
753
|
-
).run(newName, src?.description || '', newColor || src?.color || '#6366f1');
|
|
754
|
-
const newWsId = Number(result.lastInsertRowid);
|
|
755
|
-
|
|
756
|
-
// Clone all panes from source workspace
|
|
757
|
-
const srcPanes = db.prepare('SELECT * FROM panes WHERE workspace_id = ?').all(sourceId) as any[];
|
|
758
|
-
const cloneStmt = db.prepare(`
|
|
759
|
-
INSERT INTO panes (id, title, color, cwd, claude_session_id, agent_type, custom_command, grid_col, grid_row, sort_order, shell, workspace_id, is_popout, win_x, win_y, win_width, win_height)
|
|
760
|
-
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
|
|
761
|
-
`);
|
|
762
|
-
|
|
763
|
-
const cloneMany = db.transaction(() => {
|
|
764
|
-
for (const p of srcPanes) {
|
|
765
|
-
const newId = crypto.randomUUID();
|
|
766
|
-
cloneStmt.run(
|
|
767
|
-
newId, p.title, p.color, p.cwd, p.claude_session_id, p.agent_type || 'shell', p.custom_command || null,
|
|
768
|
-
p.grid_col, p.grid_row, p.sort_order, p.shell,
|
|
769
|
-
newWsId, 0, p.win_x, p.win_y, p.win_width, p.win_height
|
|
770
|
-
);
|
|
771
|
-
}
|
|
772
|
-
});
|
|
773
|
-
cloneMany();
|
|
774
|
-
|
|
775
|
-
const ws: Workspace = { id: newWsId, name: newName, description: src?.description || '', color: newColor || src?.color || '#6366f1', created: new Date().toISOString() };
|
|
776
|
-
const panes = getPanesByWorkspace(newWsId);
|
|
777
|
-
return { workspace: ws, panes };
|
|
778
|
-
}
|
|
779
|
-
|
|
780
|
-
export function deleteWorkspaceFull(workspaceId: number) {
|
|
781
|
-
const db = getDb();
|
|
782
|
-
// Delete all panes belonging to this workspace
|
|
783
|
-
db.prepare('DELETE FROM panes WHERE workspace_id = ?').run(workspaceId);
|
|
784
|
-
db.prepare('DELETE FROM workspaces WHERE id = ?').run(workspaceId);
|
|
785
|
-
|
|
786
|
-
// If deleted the active workspace, activate another
|
|
787
|
-
const anyActive = db.prepare('SELECT id FROM workspaces WHERE is_active = 1').get();
|
|
788
|
-
if (!anyActive) {
|
|
789
|
-
const first = db.prepare('SELECT id FROM workspaces ORDER BY id LIMIT 1').get() as { id: number } | undefined;
|
|
790
|
-
if (first) {
|
|
791
|
-
db.prepare('UPDATE workspaces SET is_active = 1 WHERE id = ?').run(first.id);
|
|
792
|
-
}
|
|
793
|
-
}
|
|
794
|
-
}
|
|
795
|
-
|
|
796
|
-
// ─── Analytics ──────────────────────────────────────────────
|
|
797
|
-
|
|
798
|
-
export function getAnalyticsOverview() {
|
|
799
|
-
const db = getDb();
|
|
800
|
-
const totals = db.prepare(`
|
|
801
|
-
SELECT COUNT(*) as totalSessions, COALESCE(SUM(message_count), 0) as totalMessages
|
|
802
|
-
FROM sessions
|
|
803
|
-
`).get() as { totalSessions: number; totalMessages: number };
|
|
804
|
-
|
|
805
|
-
const projectCount = db.prepare('SELECT COUNT(*) as count FROM projects').get() as { count: number };
|
|
806
|
-
|
|
807
|
-
return {
|
|
808
|
-
totalSessions: totals.totalSessions,
|
|
809
|
-
totalMessages: totals.totalMessages,
|
|
810
|
-
totalProjects: projectCount.count,
|
|
811
|
-
};
|
|
812
|
-
}
|
|
813
|
-
|
|
814
|
-
export function getDailyActivity(days = 30): { date: string; sessionCount: number; messageCount: number; toolCallCount: number }[] {
|
|
815
|
-
const db = getDb();
|
|
816
|
-
return db.prepare(`
|
|
817
|
-
SELECT date(created) as date,
|
|
818
|
-
COUNT(*) as sessionCount,
|
|
819
|
-
COALESCE(SUM(message_count), 0) as messageCount,
|
|
820
|
-
0 as toolCallCount
|
|
821
|
-
FROM sessions
|
|
822
|
-
WHERE created >= date('now', ?)
|
|
823
|
-
GROUP BY date(created)
|
|
824
|
-
ORDER BY date(created)
|
|
825
|
-
`).all(`-${days} days`) as any[];
|
|
826
|
-
}
|
|
827
|
-
|
|
1
|
+
import crypto from 'crypto';
|
|
2
|
+
import { getDb } from './schema';
|
|
3
|
+
import type { SessionWithMeta, Project, Workspace, Tag, SearchResult } from '@/types/claude';
|
|
4
|
+
|
|
5
|
+
// ─── Projects ───────────────────────────────────────────────
|
|
6
|
+
|
|
7
|
+
export function upsertProject(project: { id: string; name: string; path: string; claudePath: string; agentType?: string }) {
|
|
8
|
+
const db = getDb();
|
|
9
|
+
db.prepare(`
|
|
10
|
+
INSERT INTO projects (id, name, path, claude_path, agent_path, agent_type)
|
|
11
|
+
VALUES (?, ?, ?, ?, ?, ?)
|
|
12
|
+
ON CONFLICT(id) DO UPDATE SET name=excluded.name, path=excluded.path, claude_path=excluded.claude_path, agent_path=excluded.agent_path, agent_type=excluded.agent_type
|
|
13
|
+
`).run(project.id, project.name, project.path, project.claudePath, project.claudePath, project.agentType || 'claude');
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export function getAllProjects(): Project[] {
|
|
17
|
+
const db = getDb();
|
|
18
|
+
return db.prepare(`
|
|
19
|
+
SELECT p.id, p.name, p.path, p.claude_path as claudePath,
|
|
20
|
+
p.agent_type as agentType,
|
|
21
|
+
COUNT(s.id) as sessionCount,
|
|
22
|
+
MAX(s.modified) as lastActivity
|
|
23
|
+
FROM projects p
|
|
24
|
+
LEFT JOIN sessions s ON s.project_id = p.id
|
|
25
|
+
GROUP BY p.id
|
|
26
|
+
ORDER BY lastActivity DESC
|
|
27
|
+
`).all() as Project[];
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
// ─── Sessions ───────────────────────────────────────────────
|
|
31
|
+
|
|
32
|
+
export function upsertSession(session: {
|
|
33
|
+
id: string;
|
|
34
|
+
sessionId: string;
|
|
35
|
+
projectId: string;
|
|
36
|
+
firstPrompt: string;
|
|
37
|
+
summary: string;
|
|
38
|
+
messageCount: number;
|
|
39
|
+
created: string;
|
|
40
|
+
modified: string;
|
|
41
|
+
gitBranch: string;
|
|
42
|
+
projectPath: string;
|
|
43
|
+
fullPath: string;
|
|
44
|
+
agentType?: string;
|
|
45
|
+
}) {
|
|
46
|
+
const db = getDb();
|
|
47
|
+
db.prepare(`
|
|
48
|
+
INSERT INTO sessions (id, session_id, project_id, first_prompt, summary, message_count, created, modified, git_branch, project_path, full_path, agent_type)
|
|
49
|
+
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
|
|
50
|
+
ON CONFLICT(id) DO UPDATE SET
|
|
51
|
+
first_prompt = CASE WHEN excluded.first_prompt != '' THEN excluded.first_prompt ELSE sessions.first_prompt END,
|
|
52
|
+
summary = CASE WHEN excluded.summary != '' THEN excluded.summary ELSE sessions.summary END,
|
|
53
|
+
message_count = CASE WHEN excluded.message_count > sessions.message_count THEN excluded.message_count ELSE sessions.message_count END,
|
|
54
|
+
modified = CASE WHEN excluded.modified != '' THEN excluded.modified ELSE sessions.modified END,
|
|
55
|
+
git_branch = CASE WHEN excluded.git_branch != '' THEN excluded.git_branch ELSE sessions.git_branch END,
|
|
56
|
+
full_path = CASE WHEN excluded.full_path != '' THEN excluded.full_path ELSE sessions.full_path END,
|
|
57
|
+
agent_type=excluded.agent_type
|
|
58
|
+
`).run(
|
|
59
|
+
session.id, session.sessionId, session.projectId,
|
|
60
|
+
session.firstPrompt, session.summary, session.messageCount,
|
|
61
|
+
session.created, session.modified, session.gitBranch,
|
|
62
|
+
session.projectPath, session.fullPath, session.agentType || 'claude'
|
|
63
|
+
);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
interface SessionQueryParams {
|
|
67
|
+
projectId?: string;
|
|
68
|
+
projectPath?: string;
|
|
69
|
+
starred?: boolean;
|
|
70
|
+
tagId?: number;
|
|
71
|
+
search?: string;
|
|
72
|
+
agentType?: string;
|
|
73
|
+
sortBy?: string;
|
|
74
|
+
sortDir?: string;
|
|
75
|
+
offset?: number;
|
|
76
|
+
limit?: number;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export function getSessions(params: SessionQueryParams = {}): { sessions: SessionWithMeta[]; total: number } {
|
|
80
|
+
const db = getDb();
|
|
81
|
+
const {
|
|
82
|
+
projectId,
|
|
83
|
+
projectPath,
|
|
84
|
+
starred,
|
|
85
|
+
tagId,
|
|
86
|
+
search,
|
|
87
|
+
sortBy = 'modified',
|
|
88
|
+
sortDir = 'DESC',
|
|
89
|
+
offset = 0,
|
|
90
|
+
limit = 50,
|
|
91
|
+
} = params;
|
|
92
|
+
|
|
93
|
+
const where: string[] = [];
|
|
94
|
+
const queryParams: (string | number)[] = [];
|
|
95
|
+
|
|
96
|
+
if (projectId) {
|
|
97
|
+
where.push('s.project_id = ?');
|
|
98
|
+
queryParams.push(projectId);
|
|
99
|
+
}
|
|
100
|
+
if (projectPath) {
|
|
101
|
+
where.push('s.project_path = ?');
|
|
102
|
+
queryParams.push(projectPath);
|
|
103
|
+
}
|
|
104
|
+
if (starred !== undefined) {
|
|
105
|
+
where.push('s.starred = ?');
|
|
106
|
+
queryParams.push(starred ? 1 : 0);
|
|
107
|
+
}
|
|
108
|
+
if (tagId) {
|
|
109
|
+
where.push('EXISTS (SELECT 1 FROM session_tags st WHERE st.session_id = s.id AND st.tag_id = ?)');
|
|
110
|
+
queryParams.push(tagId);
|
|
111
|
+
}
|
|
112
|
+
if (search) {
|
|
113
|
+
where.push('(s.first_prompt LIKE ? OR s.summary LIKE ? OR s.custom_name LIKE ?)');
|
|
114
|
+
const pattern = `%${search}%`;
|
|
115
|
+
queryParams.push(pattern, pattern, pattern);
|
|
116
|
+
}
|
|
117
|
+
if (params.agentType) {
|
|
118
|
+
where.push('s.agent_type = ?');
|
|
119
|
+
queryParams.push(params.agentType);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
const whereClause = where.length > 0 ? `WHERE ${where.join(' AND ')}` : '';
|
|
123
|
+
|
|
124
|
+
const allowedSorts: Record<string, string> = {
|
|
125
|
+
created: 's.created',
|
|
126
|
+
modified: 's.modified',
|
|
127
|
+
messages: 's.message_count',
|
|
128
|
+
name: "COALESCE(s.custom_name, s.summary, s.first_prompt)",
|
|
129
|
+
};
|
|
130
|
+
const sortColumn = allowedSorts[sortBy] || 's.modified';
|
|
131
|
+
const direction = sortDir === 'ASC' ? 'ASC' : 'DESC';
|
|
132
|
+
|
|
133
|
+
const countRow = db.prepare(`SELECT COUNT(*) as total FROM sessions s ${whereClause}`).get(...queryParams) as { total: number };
|
|
134
|
+
|
|
135
|
+
const rows = db.prepare(`
|
|
136
|
+
SELECT s.id, s.session_id as sessionId, s.project_id as projectId,
|
|
137
|
+
p.name as projectName, s.first_prompt as firstPrompt,
|
|
138
|
+
s.summary, s.message_count as messageCount,
|
|
139
|
+
s.created, s.modified, s.git_branch as gitBranch,
|
|
140
|
+
s.project_path as projectPath, s.full_path as fullPath,
|
|
141
|
+
s.starred, s.custom_name as customName, s.notes,
|
|
142
|
+
s.agent_type as agentType
|
|
143
|
+
FROM sessions s
|
|
144
|
+
LEFT JOIN projects p ON p.id = s.project_id
|
|
145
|
+
${whereClause}
|
|
146
|
+
ORDER BY ${sortColumn} ${direction}
|
|
147
|
+
LIMIT ? OFFSET ?
|
|
148
|
+
`).all(...queryParams, limit, offset) as SessionWithMeta[];
|
|
149
|
+
|
|
150
|
+
// Fetch tags and workspaces for each session
|
|
151
|
+
const tagStmt = db.prepare(`
|
|
152
|
+
SELECT t.name FROM tags t
|
|
153
|
+
JOIN session_tags st ON st.tag_id = t.id
|
|
154
|
+
WHERE st.session_id = ?
|
|
155
|
+
`);
|
|
156
|
+
const wsStmt = db.prepare(`
|
|
157
|
+
SELECT w.id, w.name, w.color FROM workspaces w
|
|
158
|
+
JOIN workspace_sessions ws ON ws.workspace_id = w.id
|
|
159
|
+
WHERE ws.session_id = ?
|
|
160
|
+
`);
|
|
161
|
+
|
|
162
|
+
for (const row of rows) {
|
|
163
|
+
const tags = tagStmt.all(row.id) as { name: string }[];
|
|
164
|
+
row.tags = tags.map(t => t.name);
|
|
165
|
+
row.workspaces = wsStmt.all(row.id) as { id: number; name: string; color: string }[];
|
|
166
|
+
row.starred = !!row.starred;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
return { sessions: rows, total: countRow.total };
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
export function getSessionById(id: string): SessionWithMeta | null {
|
|
173
|
+
const db = getDb();
|
|
174
|
+
const row = db.prepare(`
|
|
175
|
+
SELECT s.id, s.session_id as sessionId, s.project_id as projectId,
|
|
176
|
+
p.name as projectName, s.first_prompt as firstPrompt,
|
|
177
|
+
s.summary, s.message_count as messageCount,
|
|
178
|
+
s.created, s.modified, s.git_branch as gitBranch,
|
|
179
|
+
s.project_path as projectPath, s.full_path as fullPath,
|
|
180
|
+
s.starred, s.custom_name as customName, s.notes,
|
|
181
|
+
s.agent_type as agentType
|
|
182
|
+
FROM sessions s
|
|
183
|
+
LEFT JOIN projects p ON p.id = s.project_id
|
|
184
|
+
WHERE s.id = ? OR s.session_id = ?
|
|
185
|
+
`).get(id, id) as SessionWithMeta | undefined;
|
|
186
|
+
|
|
187
|
+
if (!row) return null;
|
|
188
|
+
|
|
189
|
+
const tags = db.prepare(`
|
|
190
|
+
SELECT t.name FROM tags t
|
|
191
|
+
JOIN session_tags st ON st.tag_id = t.id
|
|
192
|
+
WHERE st.session_id = ?
|
|
193
|
+
`).all(row.id) as { name: string }[];
|
|
194
|
+
|
|
195
|
+
row.tags = tags.map(t => t.name);
|
|
196
|
+
row.starred = !!row.starred;
|
|
197
|
+
|
|
198
|
+
return row;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
export function toggleStar(sessionId: string): boolean {
|
|
202
|
+
const db = getDb();
|
|
203
|
+
const current = db.prepare('SELECT starred FROM sessions WHERE id = ? OR session_id = ?').get(sessionId, sessionId) as { starred: number } | undefined;
|
|
204
|
+
if (!current) return false;
|
|
205
|
+
const newValue = current.starred ? 0 : 1;
|
|
206
|
+
db.prepare('UPDATE sessions SET starred = ? WHERE id = ? OR session_id = ?').run(newValue, sessionId, sessionId);
|
|
207
|
+
return !!newValue;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
export function updateSessionNotes(sessionId: string, notes: string) {
|
|
211
|
+
const db = getDb();
|
|
212
|
+
db.prepare('UPDATE sessions SET notes = ? WHERE id = ? OR session_id = ?').run(notes, sessionId, sessionId);
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
// ─── Workspaces ─────────────────────────────────────────────
|
|
216
|
+
|
|
217
|
+
export function createWorkspace(name: string, description?: string, color?: string): Workspace {
|
|
218
|
+
const db = getDb();
|
|
219
|
+
const result = db.prepare('INSERT INTO workspaces (name, description, color) VALUES (?, ?, ?)').run(
|
|
220
|
+
name, description || '', color || '#6366f1'
|
|
221
|
+
);
|
|
222
|
+
return { id: Number(result.lastInsertRowid), name, description: description || '', color: color || '#6366f1', created: new Date().toISOString() };
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
export function getAllWorkspaces(): Workspace[] {
|
|
226
|
+
const db = getDb();
|
|
227
|
+
return db.prepare(`
|
|
228
|
+
SELECT w.*, COUNT(ws.session_id) as sessionCount
|
|
229
|
+
FROM workspaces w
|
|
230
|
+
LEFT JOIN workspace_sessions ws ON ws.workspace_id = w.id
|
|
231
|
+
GROUP BY w.id
|
|
232
|
+
ORDER BY w.created DESC
|
|
233
|
+
`).all() as Workspace[];
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
export function addSessionToWorkspace(workspaceId: number, sessionId: string) {
|
|
237
|
+
const db = getDb();
|
|
238
|
+
db.prepare('INSERT OR IGNORE INTO workspace_sessions (workspace_id, session_id) VALUES (?, ?)').run(workspaceId, sessionId);
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
export function removeSessionFromWorkspace(workspaceId: number, sessionId: string) {
|
|
242
|
+
const db = getDb();
|
|
243
|
+
db.prepare('DELETE FROM workspace_sessions WHERE workspace_id = ? AND session_id = ?').run(workspaceId, sessionId);
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
// ─── Tags ───────────────────────────────────────────────────
|
|
247
|
+
|
|
248
|
+
export function createTag(name: string, color?: string): Tag {
|
|
249
|
+
const db = getDb();
|
|
250
|
+
const result = db.prepare('INSERT OR IGNORE INTO tags (name, color) VALUES (?, ?)').run(name, color || '#8b5cf6');
|
|
251
|
+
return { id: Number(result.lastInsertRowid), name, color: color || '#8b5cf6' };
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
export function getAllTags(): Tag[] {
|
|
255
|
+
const db = getDb();
|
|
256
|
+
return db.prepare('SELECT * FROM tags ORDER BY name').all() as Tag[];
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
export function addTagToSession(sessionId: string, tagName: string) {
|
|
260
|
+
const db = getDb();
|
|
261
|
+
let tag = db.prepare('SELECT id FROM tags WHERE name = ?').get(tagName) as { id: number } | undefined;
|
|
262
|
+
if (!tag) {
|
|
263
|
+
const result = db.prepare('INSERT INTO tags (name) VALUES (?)').run(tagName);
|
|
264
|
+
tag = { id: Number(result.lastInsertRowid) };
|
|
265
|
+
}
|
|
266
|
+
db.prepare('INSERT OR IGNORE INTO session_tags (session_id, tag_id) VALUES (?, ?)').run(sessionId, tag.id);
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
export function removeTagFromSession(sessionId: string, tagId: number) {
|
|
270
|
+
const db = getDb();
|
|
271
|
+
db.prepare('DELETE FROM session_tags WHERE session_id = ? AND tag_id = ?').run(sessionId, tagId);
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
export function removeTagFromSessionByName(sessionId: string, tagName: string) {
|
|
275
|
+
const db = getDb();
|
|
276
|
+
const tag = db.prepare('SELECT id FROM tags WHERE name = ?').get(tagName) as { id: number } | undefined;
|
|
277
|
+
if (tag) {
|
|
278
|
+
db.prepare('DELETE FROM session_tags WHERE session_id = ? AND tag_id = ?').run(sessionId, tag.id);
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
export function deleteTag(tagId: number) {
|
|
283
|
+
const db = getDb();
|
|
284
|
+
db.prepare('DELETE FROM session_tags WHERE tag_id = ?').run(tagId);
|
|
285
|
+
db.prepare('DELETE FROM tags WHERE id = ?').run(tagId);
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
export function updateTagColor(tagId: number, color: string) {
|
|
289
|
+
const db = getDb();
|
|
290
|
+
db.prepare('UPDATE tags SET color = ? WHERE id = ?').run(color, tagId);
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
export function getSessionTags(sessionId: string): Tag[] {
|
|
294
|
+
const db = getDb();
|
|
295
|
+
return db.prepare(`
|
|
296
|
+
SELECT t.id, t.name, t.color FROM tags t
|
|
297
|
+
JOIN session_tags st ON st.tag_id = t.id
|
|
298
|
+
WHERE st.session_id = ?
|
|
299
|
+
ORDER BY t.name
|
|
300
|
+
`).all(sessionId) as Tag[];
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
export function renameSession(sessionId: string, customName: string) {
|
|
304
|
+
const db = getDb();
|
|
305
|
+
db.prepare('UPDATE sessions SET custom_name = ? WHERE id = ? OR session_id = ?').run(customName || null, sessionId, sessionId);
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
// ─── Workspace Extras ───────────────────────────────────────
|
|
309
|
+
|
|
310
|
+
export function deleteWorkspace(workspaceId: number) {
|
|
311
|
+
const db = getDb();
|
|
312
|
+
db.prepare('DELETE FROM workspace_sessions WHERE workspace_id = ?').run(workspaceId);
|
|
313
|
+
db.prepare('DELETE FROM workspaces WHERE id = ?').run(workspaceId);
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
export function updateWorkspace(workspaceId: number, data: { name?: string; description?: string; color?: string; collaboration?: boolean }) {
|
|
317
|
+
const db = getDb();
|
|
318
|
+
if (data.name !== undefined) db.prepare('UPDATE workspaces SET name = ? WHERE id = ?').run(data.name, workspaceId);
|
|
319
|
+
if (data.description !== undefined) db.prepare('UPDATE workspaces SET description = ? WHERE id = ?').run(data.description, workspaceId);
|
|
320
|
+
if (data.color !== undefined) db.prepare('UPDATE workspaces SET color = ? WHERE id = ?').run(data.color, workspaceId);
|
|
321
|
+
if (data.collaboration !== undefined) db.prepare('UPDATE workspaces SET collaboration = ? WHERE id = ?').run(data.collaboration ? 1 : 0, workspaceId);
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
export function getWorkspacesForSession(sessionId: string): { id: number; name: string; color: string }[] {
|
|
325
|
+
const db = getDb();
|
|
326
|
+
// Check workspace_sessions first (local sessions)
|
|
327
|
+
const fromWs = db.prepare(`
|
|
328
|
+
SELECT w.id, w.name, w.color FROM workspaces w
|
|
329
|
+
JOIN workspace_sessions ws ON ws.workspace_id = w.id
|
|
330
|
+
WHERE ws.session_id = ?
|
|
331
|
+
`).all(sessionId) as { id: number; name: string; color: string }[];
|
|
332
|
+
if (fromWs.length > 0) return fromWs;
|
|
333
|
+
// Fallback: check panes table (remote sessions stored via pane only)
|
|
334
|
+
return db.prepare(`
|
|
335
|
+
SELECT DISTINCT w.id, w.name, w.color FROM workspaces w
|
|
336
|
+
JOIN panes p ON p.workspace_id = w.id
|
|
337
|
+
WHERE p.claude_session_id = ?
|
|
338
|
+
`).all(sessionId) as { id: number; name: string; color: string }[];
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
export function getWorkspaceSessions(workspaceId: number): SessionWithMeta[] {
|
|
342
|
+
const db = getDb();
|
|
343
|
+
const rows = db.prepare(`
|
|
344
|
+
SELECT s.id, s.session_id as sessionId, s.project_id as projectId,
|
|
345
|
+
p.name as projectName, s.first_prompt as firstPrompt,
|
|
346
|
+
s.summary, s.message_count as messageCount,
|
|
347
|
+
s.created, s.modified, s.git_branch as gitBranch,
|
|
348
|
+
s.project_path as projectPath, s.full_path as fullPath,
|
|
349
|
+
s.starred, s.custom_name as customName, s.notes,
|
|
350
|
+
s.agent_type as agentType
|
|
351
|
+
FROM sessions s
|
|
352
|
+
JOIN workspace_sessions ws ON ws.session_id = s.id
|
|
353
|
+
LEFT JOIN projects p ON p.id = s.project_id
|
|
354
|
+
WHERE ws.workspace_id = ?
|
|
355
|
+
ORDER BY s.modified DESC
|
|
356
|
+
`).all(workspaceId) as SessionWithMeta[];
|
|
357
|
+
|
|
358
|
+
const tagStmt = db.prepare('SELECT t.name FROM tags t JOIN session_tags st ON st.tag_id = t.id WHERE st.session_id = ?');
|
|
359
|
+
for (const row of rows) {
|
|
360
|
+
row.tags = (tagStmt.all(row.id) as { name: string }[]).map(t => t.name);
|
|
361
|
+
row.starred = !!row.starred;
|
|
362
|
+
}
|
|
363
|
+
return rows;
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
export function getSessionWorkspaces(sessionId: string): Workspace[] {
|
|
367
|
+
const db = getDb();
|
|
368
|
+
return db.prepare(`
|
|
369
|
+
SELECT w.id, w.name, w.description, w.color, w.created, w.collaboration
|
|
370
|
+
FROM workspaces w
|
|
371
|
+
JOIN workspace_sessions ws ON ws.workspace_id = w.id
|
|
372
|
+
WHERE ws.session_id = ?
|
|
373
|
+
`).all(sessionId) as Workspace[];
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
// ─── Bulk Operations ────────────────────────────────────────
|
|
377
|
+
|
|
378
|
+
export function bulkAddTag(sessionIds: string[], tagName: string) {
|
|
379
|
+
const db = getDb();
|
|
380
|
+
let tag = db.prepare('SELECT id FROM tags WHERE name = ?').get(tagName) as { id: number } | undefined;
|
|
381
|
+
if (!tag) {
|
|
382
|
+
const result = db.prepare('INSERT INTO tags (name) VALUES (?)').run(tagName);
|
|
383
|
+
tag = { id: Number(result.lastInsertRowid) };
|
|
384
|
+
}
|
|
385
|
+
const stmt = db.prepare('INSERT OR IGNORE INTO session_tags (session_id, tag_id) VALUES (?, ?)');
|
|
386
|
+
const run = db.transaction(() => {
|
|
387
|
+
for (const id of sessionIds) stmt.run(id, tag!.id);
|
|
388
|
+
});
|
|
389
|
+
run();
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
export function bulkAddToWorkspace(sessionIds: string[], workspaceId: number) {
|
|
393
|
+
const db = getDb();
|
|
394
|
+
const stmt = db.prepare('INSERT OR IGNORE INTO workspace_sessions (workspace_id, session_id) VALUES (?, ?)');
|
|
395
|
+
const run = db.transaction(() => {
|
|
396
|
+
for (const id of sessionIds) stmt.run(workspaceId, id);
|
|
397
|
+
});
|
|
398
|
+
run();
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
export function bulkStar(sessionIds: string[], starred: boolean) {
|
|
402
|
+
const db = getDb();
|
|
403
|
+
const stmt = db.prepare('UPDATE sessions SET starred = ? WHERE id = ?');
|
|
404
|
+
const run = db.transaction(() => {
|
|
405
|
+
for (const id of sessionIds) stmt.run(starred ? 1 : 0, id);
|
|
406
|
+
});
|
|
407
|
+
run();
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
// ─── FTS Search ─────────────────────────────────────────────
|
|
411
|
+
|
|
412
|
+
export function upsertFtsContent(sessionId: string, content: string) {
|
|
413
|
+
const db = getDb();
|
|
414
|
+
db.prepare('DELETE FROM sessions_fts WHERE session_id = ?').run(sessionId);
|
|
415
|
+
db.prepare('INSERT INTO sessions_fts (session_id, content) VALUES (?, ?)').run(sessionId, content);
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
export function searchSessions(query: string, params: { projectId?: string; limit?: number; offset?: number } = {}): SearchResult[] {
|
|
419
|
+
const db = getDb();
|
|
420
|
+
const { projectId, limit = 20, offset = 0 } = params;
|
|
421
|
+
|
|
422
|
+
let sql = `
|
|
423
|
+
SELECT f.session_id as sessionId, snippet(sessions_fts, 1, '<mark>', '</mark>', '...', 40) as snippet,
|
|
424
|
+
rank, p.name as projectName, s.first_prompt as firstPrompt, s.created
|
|
425
|
+
FROM sessions_fts f
|
|
426
|
+
JOIN sessions s ON s.id = f.session_id OR s.session_id = f.session_id
|
|
427
|
+
LEFT JOIN projects p ON p.id = s.project_id
|
|
428
|
+
WHERE sessions_fts MATCH ?
|
|
429
|
+
`;
|
|
430
|
+
const queryParams: (string | number)[] = [query];
|
|
431
|
+
|
|
432
|
+
if (projectId) {
|
|
433
|
+
sql += ' AND s.project_id = ?';
|
|
434
|
+
queryParams.push(projectId);
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
sql += ' ORDER BY rank LIMIT ? OFFSET ?';
|
|
438
|
+
queryParams.push(limit, offset);
|
|
439
|
+
|
|
440
|
+
try {
|
|
441
|
+
return db.prepare(sql).all(...queryParams) as SearchResult[];
|
|
442
|
+
} catch {
|
|
443
|
+
// Fallback to LIKE search if FTS fails
|
|
444
|
+
return db.prepare(`
|
|
445
|
+
SELECT s.id as sessionId, substr(s.first_prompt, 1, 200) as snippet,
|
|
446
|
+
0 as rank, p.name as projectName, s.first_prompt as firstPrompt, s.created
|
|
447
|
+
FROM sessions s
|
|
448
|
+
LEFT JOIN projects p ON p.id = s.project_id
|
|
449
|
+
WHERE s.first_prompt LIKE ? OR s.summary LIKE ?
|
|
450
|
+
LIMIT ? OFFSET ?
|
|
451
|
+
`).all(`%${query}%`, `%${query}%`, limit, offset) as SearchResult[];
|
|
452
|
+
}
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
// ─── Sync State ─────────────────────────────────────────────
|
|
456
|
+
|
|
457
|
+
export function getSyncState(filePath: string): { mtime: number; byteOffset: number } | null {
|
|
458
|
+
const db = getDb();
|
|
459
|
+
const row = db.prepare('SELECT mtime, byte_offset as byteOffset FROM sync_state WHERE file_path = ?').get(filePath) as { mtime: number; byteOffset: number } | undefined;
|
|
460
|
+
return row || null;
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
export function updateSyncState(filePath: string, mtime: number, byteOffset: number) {
|
|
464
|
+
const db = getDb();
|
|
465
|
+
db.prepare(`
|
|
466
|
+
INSERT INTO sync_state (file_path, mtime, byte_offset, last_synced)
|
|
467
|
+
VALUES (?, ?, ?, datetime('now'))
|
|
468
|
+
ON CONFLICT(file_path) DO UPDATE SET mtime=excluded.mtime, byte_offset=excluded.byte_offset, last_synced=datetime('now')
|
|
469
|
+
`).run(filePath, mtime, byteOffset);
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
// ─── Panes ─────────────────────────────────────────────────
|
|
473
|
+
|
|
474
|
+
export interface PaneData {
|
|
475
|
+
id: string;
|
|
476
|
+
title: string;
|
|
477
|
+
color: string;
|
|
478
|
+
cwd: string;
|
|
479
|
+
claudeSessionId: string | null;
|
|
480
|
+
agentType: string;
|
|
481
|
+
customCommand: string | null;
|
|
482
|
+
gridCol: number;
|
|
483
|
+
gridRow: number;
|
|
484
|
+
sortOrder: number;
|
|
485
|
+
shell: string | null;
|
|
486
|
+
created: string;
|
|
487
|
+
workspaceId: number | null;
|
|
488
|
+
isPopout: boolean;
|
|
489
|
+
winX: number | null;
|
|
490
|
+
winY: number | null;
|
|
491
|
+
winWidth: number | null;
|
|
492
|
+
winHeight: number | null;
|
|
493
|
+
nodeId: string | null;
|
|
494
|
+
isCollaborating: boolean;
|
|
495
|
+
diffBaselineSha: string | null;
|
|
496
|
+
customModelId: string | null;
|
|
497
|
+
}
|
|
498
|
+
|
|
499
|
+
const PANE_SELECT = `
|
|
500
|
+
id, title, color, cwd, claude_session_id as claudeSessionId,
|
|
501
|
+
agent_type as agentType, custom_command as customCommand,
|
|
502
|
+
grid_col as gridCol, grid_row as gridRow, sort_order as sortOrder,
|
|
503
|
+
shell, created, workspace_id as workspaceId,
|
|
504
|
+
is_popout as isPopout, win_x as winX, win_y as winY,
|
|
505
|
+
win_width as winWidth, win_height as winHeight,
|
|
506
|
+
node_id as nodeId,
|
|
507
|
+
is_collaborating as isCollaborating,
|
|
508
|
+
diff_baseline_sha as diffBaselineSha,
|
|
509
|
+
custom_model_id as customModelId
|
|
510
|
+
`;
|
|
511
|
+
|
|
512
|
+
function mapPane(row: any): PaneData {
|
|
513
|
+
return { ...row, isPopout: !!row.isPopout, isCollaborating: !!row.isCollaborating };
|
|
514
|
+
}
|
|
515
|
+
|
|
516
|
+
function normalizePane(row: any): PaneData {
|
|
517
|
+
return mapPane(row);
|
|
518
|
+
}
|
|
519
|
+
|
|
520
|
+
export function getPanesByWorkspace(workspaceId: number): PaneData[] {
|
|
521
|
+
const db = getDb();
|
|
522
|
+
const rows = db.prepare(`SELECT ${PANE_SELECT} FROM panes WHERE workspace_id = ? ORDER BY sort_order, created`).all(workspaceId);
|
|
523
|
+
return rows.map(normalizePane) as PaneData[];
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
export function getAllPanes(): PaneData[] {
|
|
527
|
+
const db = getDb();
|
|
528
|
+
const rows = db.prepare(`SELECT ${PANE_SELECT} FROM panes ORDER BY sort_order, created`).all();
|
|
529
|
+
return rows.map(normalizePane) as PaneData[];
|
|
530
|
+
}
|
|
531
|
+
|
|
532
|
+
export function getActivePanes(): PaneData[] {
|
|
533
|
+
const db = getDb();
|
|
534
|
+
const activeWs = db.prepare('SELECT id FROM workspaces WHERE is_active = 1').get() as { id: number } | undefined;
|
|
535
|
+
if (!activeWs) return [];
|
|
536
|
+
return getPanesByWorkspace(activeWs.id);
|
|
537
|
+
}
|
|
538
|
+
|
|
539
|
+
export function createPane(pane: {
|
|
540
|
+
id: string;
|
|
541
|
+
title: string;
|
|
542
|
+
color: string;
|
|
543
|
+
cwd: string;
|
|
544
|
+
claudeSessionId?: string;
|
|
545
|
+
agentType?: string;
|
|
546
|
+
customCommand?: string;
|
|
547
|
+
sortOrder?: number;
|
|
548
|
+
workspaceId?: number;
|
|
549
|
+
nodeId?: string;
|
|
550
|
+
isCollaborating?: boolean;
|
|
551
|
+
customModelId?: string | null;
|
|
552
|
+
}): PaneData {
|
|
553
|
+
const db = getDb();
|
|
554
|
+
const maxOrder = db.prepare('SELECT MAX(sort_order) as m FROM panes').get() as { m: number | null };
|
|
555
|
+
const order = pane.sortOrder ?? ((maxOrder.m ?? -1) + 1);
|
|
556
|
+
|
|
557
|
+
// Default to active workspace if not specified
|
|
558
|
+
let wsId = pane.workspaceId;
|
|
559
|
+
if (wsId === undefined) {
|
|
560
|
+
const activeWs = db.prepare('SELECT id FROM workspaces WHERE is_active = 1').get() as { id: number } | undefined;
|
|
561
|
+
wsId = activeWs?.id;
|
|
562
|
+
}
|
|
563
|
+
|
|
564
|
+
// Capture git HEAD as diff baseline if cwd is a git repo
|
|
565
|
+
let baselineSha: string | null = null;
|
|
566
|
+
try {
|
|
567
|
+
const { execFileSync } = require('child_process');
|
|
568
|
+
baselineSha = execFileSync('git', ['rev-parse', 'HEAD'], { cwd: pane.cwd, encoding: 'utf-8', timeout: 3000 }).trim();
|
|
569
|
+
} catch { /* not a git repo or git not available */ }
|
|
570
|
+
|
|
571
|
+
const sessId = (pane.claudeSessionId && pane.claudeSessionId !== 'new') ? pane.claudeSessionId : null;
|
|
572
|
+
|
|
573
|
+
db.prepare(`
|
|
574
|
+
INSERT INTO panes (id, title, color, cwd, claude_session_id, agent_type, custom_command, sort_order, workspace_id, node_id, is_collaborating, diff_baseline_sha, custom_model_id)
|
|
575
|
+
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
|
|
576
|
+
`).run(pane.id, pane.title, pane.color, pane.cwd, sessId, pane.agentType || 'shell', pane.customCommand || null, order, wsId || null, pane.nodeId || null, pane.isCollaborating ? 1 : 0, baselineSha, pane.customModelId || null);
|
|
577
|
+
|
|
578
|
+
return getPaneById(pane.id)!;
|
|
579
|
+
}
|
|
580
|
+
|
|
581
|
+
export function getPaneById(id: string): PaneData | null {
|
|
582
|
+
const db = getDb();
|
|
583
|
+
const row = db.prepare(`SELECT ${PANE_SELECT} FROM panes WHERE id = ?`).get(id) as any | null;
|
|
584
|
+
return row ? normalizePane(row) : null;
|
|
585
|
+
}
|
|
586
|
+
|
|
587
|
+
export function updatePane(id: string, data: {
|
|
588
|
+
title?: string;
|
|
589
|
+
color?: string;
|
|
590
|
+
cwd?: string;
|
|
591
|
+
claudeSessionId?: string | null;
|
|
592
|
+
agentType?: string;
|
|
593
|
+
customCommand?: string | null;
|
|
594
|
+
gridCol?: number;
|
|
595
|
+
gridRow?: number;
|
|
596
|
+
sortOrder?: number;
|
|
597
|
+
workspaceId?: number | null;
|
|
598
|
+
isPopout?: boolean;
|
|
599
|
+
winX?: number | null;
|
|
600
|
+
winY?: number | null;
|
|
601
|
+
winWidth?: number | null;
|
|
602
|
+
winHeight?: number | null;
|
|
603
|
+
isCollaborating?: boolean;
|
|
604
|
+
diffBaselineSha?: string | null;
|
|
605
|
+
customModelId?: string | null;
|
|
606
|
+
}) {
|
|
607
|
+
const db = getDb();
|
|
608
|
+
const sets: string[] = [];
|
|
609
|
+
const vals: any[] = [];
|
|
610
|
+
|
|
611
|
+
if (data.title !== undefined) { sets.push('title = ?'); vals.push(data.title); }
|
|
612
|
+
if (data.color !== undefined) { sets.push('color = ?'); vals.push(data.color); }
|
|
613
|
+
if (data.cwd !== undefined) { sets.push('cwd = ?'); vals.push(data.cwd); }
|
|
614
|
+
if (data.claudeSessionId !== undefined) { sets.push('claude_session_id = ?'); vals.push(data.claudeSessionId); }
|
|
615
|
+
if (data.agentType !== undefined) { sets.push('agent_type = ?'); vals.push(data.agentType); }
|
|
616
|
+
if (data.customCommand !== undefined) { sets.push('custom_command = ?'); vals.push(data.customCommand); }
|
|
617
|
+
if (data.gridCol !== undefined) { sets.push('grid_col = ?'); vals.push(data.gridCol); }
|
|
618
|
+
if (data.gridRow !== undefined) { sets.push('grid_row = ?'); vals.push(data.gridRow); }
|
|
619
|
+
if (data.sortOrder !== undefined) { sets.push('sort_order = ?'); vals.push(data.sortOrder); }
|
|
620
|
+
if (data.workspaceId !== undefined) { sets.push('workspace_id = ?'); vals.push(data.workspaceId); }
|
|
621
|
+
if (data.isPopout !== undefined) { sets.push('is_popout = ?'); vals.push(data.isPopout ? 1 : 0); }
|
|
622
|
+
if (data.winX !== undefined) { sets.push('win_x = ?'); vals.push(data.winX); }
|
|
623
|
+
if (data.winY !== undefined) { sets.push('win_y = ?'); vals.push(data.winY); }
|
|
624
|
+
if (data.winWidth !== undefined) { sets.push('win_width = ?'); vals.push(data.winWidth); }
|
|
625
|
+
if (data.winHeight !== undefined) { sets.push('win_height = ?'); vals.push(data.winHeight); }
|
|
626
|
+
if ((data as any).nodeId !== undefined) { sets.push('node_id = ?'); vals.push((data as any).nodeId); }
|
|
627
|
+
if (data.isCollaborating !== undefined) { sets.push('is_collaborating = ?'); vals.push(data.isCollaborating ? 1 : 0); }
|
|
628
|
+
if (data.diffBaselineSha !== undefined) { sets.push('diff_baseline_sha = ?'); vals.push(data.diffBaselineSha); }
|
|
629
|
+
if (data.customModelId !== undefined) { sets.push('custom_model_id = ?'); vals.push(data.customModelId); }
|
|
630
|
+
|
|
631
|
+
if (sets.length === 0) return;
|
|
632
|
+
vals.push(id);
|
|
633
|
+
db.prepare(`UPDATE panes SET ${sets.join(', ')} WHERE id = ?`).run(...vals);
|
|
634
|
+
}
|
|
635
|
+
|
|
636
|
+
export function deletePane(id: string) {
|
|
637
|
+
const db = getDb();
|
|
638
|
+
db.prepare('DELETE FROM panes WHERE id = ?').run(id);
|
|
639
|
+
}
|
|
640
|
+
|
|
641
|
+
export function deletePanesByNodeId(nodeId: string) {
|
|
642
|
+
const db = getDb();
|
|
643
|
+
db.prepare('DELETE FROM panes WHERE node_id = ?').run(nodeId);
|
|
644
|
+
}
|
|
645
|
+
|
|
646
|
+
// ─── Workspace-as-Layout Operations ────────────────────────
|
|
647
|
+
|
|
648
|
+
export function getActiveWorkspace(): Workspace | null {
|
|
649
|
+
const db = getDb();
|
|
650
|
+
return db.prepare('SELECT id, name, description, color, created, is_active as isActive, collaboration FROM workspaces WHERE is_active = 1').get() as Workspace | null;
|
|
651
|
+
}
|
|
652
|
+
|
|
653
|
+
export function switchWorkspace(workspaceId: number) {
|
|
654
|
+
const db = getDb();
|
|
655
|
+
db.prepare('UPDATE workspaces SET is_active = 0').run();
|
|
656
|
+
db.prepare('UPDATE workspaces SET is_active = 1 WHERE id = ?').run(workspaceId);
|
|
657
|
+
}
|
|
658
|
+
|
|
659
|
+
export function duplicateWorkspace(sourceId: number, newName: string, newColor?: string): { workspace: Workspace; panes: PaneData[] } {
|
|
660
|
+
const db = getDb();
|
|
661
|
+
|
|
662
|
+
// Create the new workspace
|
|
663
|
+
const src = db.prepare('SELECT * FROM workspaces WHERE id = ?').get(sourceId) as any;
|
|
664
|
+
const result = db.prepare(
|
|
665
|
+
'INSERT INTO workspaces (name, description, color, is_active) VALUES (?, ?, ?, 0)'
|
|
666
|
+
).run(newName, src?.description || '', newColor || src?.color || '#6366f1');
|
|
667
|
+
const newWsId = Number(result.lastInsertRowid);
|
|
668
|
+
|
|
669
|
+
// Clone all panes from source workspace
|
|
670
|
+
const srcPanes = db.prepare('SELECT * FROM panes WHERE workspace_id = ?').all(sourceId) as any[];
|
|
671
|
+
const cloneStmt = db.prepare(`
|
|
672
|
+
INSERT INTO panes (id, title, color, cwd, claude_session_id, agent_type, custom_command, grid_col, grid_row, sort_order, shell, workspace_id, is_popout, win_x, win_y, win_width, win_height)
|
|
673
|
+
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
|
|
674
|
+
`);
|
|
675
|
+
|
|
676
|
+
const cloneMany = db.transaction(() => {
|
|
677
|
+
for (const p of srcPanes) {
|
|
678
|
+
const newId = crypto.randomUUID();
|
|
679
|
+
cloneStmt.run(
|
|
680
|
+
newId, p.title, p.color, p.cwd, p.claude_session_id, p.agent_type || 'shell', p.custom_command || null,
|
|
681
|
+
p.grid_col, p.grid_row, p.sort_order, p.shell,
|
|
682
|
+
newWsId, 0, p.win_x, p.win_y, p.win_width, p.win_height
|
|
683
|
+
);
|
|
684
|
+
}
|
|
685
|
+
});
|
|
686
|
+
cloneMany();
|
|
687
|
+
|
|
688
|
+
const ws: Workspace = { id: newWsId, name: newName, description: src?.description || '', color: newColor || src?.color || '#6366f1', created: new Date().toISOString() };
|
|
689
|
+
const panes = getPanesByWorkspace(newWsId);
|
|
690
|
+
return { workspace: ws, panes };
|
|
691
|
+
}
|
|
692
|
+
|
|
693
|
+
export function deleteWorkspaceFull(workspaceId: number) {
|
|
694
|
+
const db = getDb();
|
|
695
|
+
// Delete all panes belonging to this workspace
|
|
696
|
+
db.prepare('DELETE FROM panes WHERE workspace_id = ?').run(workspaceId);
|
|
697
|
+
db.prepare('DELETE FROM workspaces WHERE id = ?').run(workspaceId);
|
|
698
|
+
|
|
699
|
+
// If deleted the active workspace, activate another
|
|
700
|
+
const anyActive = db.prepare('SELECT id FROM workspaces WHERE is_active = 1').get();
|
|
701
|
+
if (!anyActive) {
|
|
702
|
+
const first = db.prepare('SELECT id FROM workspaces ORDER BY id LIMIT 1').get() as { id: number } | undefined;
|
|
703
|
+
if (first) {
|
|
704
|
+
db.prepare('UPDATE workspaces SET is_active = 1 WHERE id = ?').run(first.id);
|
|
705
|
+
}
|
|
706
|
+
}
|
|
707
|
+
}
|
|
708
|
+
|
|
709
|
+
// ─── Analytics ──────────────────────────────────────────────
|
|
710
|
+
|
|
711
|
+
export function getAnalyticsOverview() {
|
|
712
|
+
const db = getDb();
|
|
713
|
+
const totals = db.prepare(`
|
|
714
|
+
SELECT COUNT(*) as totalSessions, COALESCE(SUM(message_count), 0) as totalMessages
|
|
715
|
+
FROM sessions
|
|
716
|
+
`).get() as { totalSessions: number; totalMessages: number };
|
|
717
|
+
|
|
718
|
+
const projectCount = db.prepare('SELECT COUNT(*) as count FROM projects').get() as { count: number };
|
|
719
|
+
|
|
720
|
+
return {
|
|
721
|
+
totalSessions: totals.totalSessions,
|
|
722
|
+
totalMessages: totals.totalMessages,
|
|
723
|
+
totalProjects: projectCount.count,
|
|
724
|
+
};
|
|
725
|
+
}
|
|
726
|
+
|
|
727
|
+
export function getDailyActivity(days = 30): { date: string; sessionCount: number; messageCount: number; toolCallCount: number }[] {
|
|
728
|
+
const db = getDb();
|
|
729
|
+
return db.prepare(`
|
|
730
|
+
SELECT date(created) as date,
|
|
731
|
+
COUNT(*) as sessionCount,
|
|
732
|
+
COALESCE(SUM(message_count), 0) as messageCount,
|
|
733
|
+
0 as toolCallCount
|
|
734
|
+
FROM sessions
|
|
735
|
+
WHERE created >= date('now', ?)
|
|
736
|
+
GROUP BY date(created)
|
|
737
|
+
ORDER BY date(created)
|
|
738
|
+
`).all(`-${days} days`) as any[];
|
|
739
|
+
}
|
|
740
|
+
|