@jlongo78/agent-spaces 0.9.8 → 0.9.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.next/standalone/.next/BUILD_ID +1 -1
- package/.next/standalone/.next/app-path-routes-manifest.json +3 -0
- package/.next/standalone/.next/build-manifest.json +2 -2
- package/.next/standalone/.next/prerender-manifest.json +3 -3
- package/.next/standalone/.next/routes-manifest.json +23 -0
- package/.next/standalone/.next/server/app/(desktop)/admin/analytics/page.js.nft.json +1 -1
- 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_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 +3 -3
- package/.next/standalone/.next/server/app/admin/analytics.segments/!KGRlc2t0b3Ap/admin/analytics/__PAGE__.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/admin/analytics.segments/!KGRlc2t0b3Ap/admin/analytics.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/admin/analytics.segments/!KGRlc2t0b3Ap/admin.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/admin/analytics.segments/!KGRlc2t0b3Ap.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/admin/analytics.segments/_full.segment.rsc +3 -3
- 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/chat/route.js +1 -1
- package/.next/standalone/.next/server/app/api/chat/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/claude/usage/route/app-paths-manifest.json +3 -0
- package/.next/standalone/.next/server/app/api/claude/usage/route/build-manifest.json +11 -0
- package/.next/standalone/.next/server/app/api/claude/usage/route/server-reference-manifest.json +4 -0
- package/.next/standalone/.next/server/app/api/claude/usage/route.js +8 -0
- package/.next/standalone/.next/server/app/api/claude/usage/route.js.map +5 -0
- package/.next/standalone/.next/server/app/api/claude/usage/route.js.nft.json +1 -0
- package/.next/standalone/.next/server/app/api/claude/usage/route_client-reference-manifest.js +2 -0
- package/.next/standalone/.next/server/app/api/cortex/status/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/whisper/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/workspaces/[id]/todos/[todoId]/route/app-paths-manifest.json +3 -0
- package/.next/standalone/.next/server/app/api/workspaces/[id]/todos/[todoId]/route/build-manifest.json +11 -0
- package/.next/standalone/.next/server/app/api/workspaces/[id]/todos/[todoId]/route/server-reference-manifest.json +4 -0
- package/.next/standalone/.next/server/app/api/workspaces/[id]/todos/[todoId]/route.js +8 -0
- package/.next/standalone/.next/server/app/api/workspaces/[id]/todos/[todoId]/route.js.map +5 -0
- package/.next/standalone/.next/server/app/api/workspaces/[id]/todos/[todoId]/route.js.nft.json +1 -0
- package/.next/standalone/.next/server/app/api/workspaces/[id]/todos/[todoId]/route_client-reference-manifest.js +2 -0
- package/.next/standalone/.next/server/app/api/workspaces/[id]/todos/route/app-paths-manifest.json +3 -0
- package/.next/standalone/.next/server/app/api/workspaces/[id]/todos/route/build-manifest.json +11 -0
- package/.next/standalone/.next/server/app/api/workspaces/[id]/todos/route/server-reference-manifest.json +4 -0
- package/.next/standalone/.next/server/app/api/workspaces/[id]/todos/route.js +8 -0
- package/.next/standalone/.next/server/app/api/workspaces/[id]/todos/route.js.map +5 -0
- package/.next/standalone/.next/server/app/api/workspaces/[id]/todos/route.js.nft.json +1 -0
- package/.next/standalone/.next/server/app/api/workspaces/[id]/todos/route_client-reference-manifest.js +2 -0
- package/.next/standalone/.next/server/app/cortex.html +1 -1
- package/.next/standalone/.next/server/app/cortex.rsc +2 -2
- package/.next/standalone/.next/server/app/cortex.segments/!KGRlc2t0b3Ap/cortex/__PAGE__.segment.rsc +1 -1
- 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 +2 -2
- 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_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 +2 -2
- package/.next/standalone/.next/server/app/m/terminal.segments/_full.segment.rsc +2 -2
- 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 +1 -1
- 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 +3 -3
- package/.next/standalone/.next/server/app/settings.segments/!KGRlc2t0b3Ap/settings/__PAGE__.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/settings.segments/!KGRlc2t0b3Ap/settings.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/settings.segments/!KGRlc2t0b3Ap.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/settings.segments/_full.segment.rsc +3 -3
- 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_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/vr.html +1 -1
- package/.next/standalone/.next/server/app/vr.rsc +2 -2
- package/.next/standalone/.next/server/app/vr.segments/_full.segment.rsc +2 -2
- 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 +1 -1
- 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 +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__00e90fc6._.js +15 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__01ab8675._.js +15 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__03974f05._.js +15 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__046c9b91._.js +16 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__04ae6bf0._.js +15 -2
- 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 +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0b8e64cb._.js +15 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0facd39e._.js +15 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__10bc76a3._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__115f3934._.js +15 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__11f155f1._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__160e7c73._.js +52 -24
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__17a3b966._.js +15 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__17d3a2b2._.js +15 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__1a86c055._.js +15 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__1fe0f452._.js +127 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__20b5e9c4._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__28d6fbd8._.js +15 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__2a3f866b._.js +16 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__316617e7._.js +3 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__32ad8f71._.js +15 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__35457394._.js +15 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__35de78e6._.js +15 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__3685ffcb._.js +15 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__38954988._.js +15 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__3a32b624._.js +111 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__426ad936._.js +17 -4
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__4985c034._.js +15 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__5c6ce9ed._.js +16 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__5cebe58a._.js +15 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__5d5e4789._.js +15 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__65676930._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__67cab326._.js +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__698c6f01._.js +16 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__6c64af29._.js +22 -9
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__73aed9f5._.js +15 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__79b6a9bb._.js +15 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__7db704c6._.js +17 -4
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__812ca02b._.js +15 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__821f50fa._.js +15 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__8716b86e._.js +15 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__884ef754._.js +15 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__88cdbd68._.js +15 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__89d9aba9._.js +15 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__8c2e1260._.js +111 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__8d536cb5._.js +15 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__8df8c5d1._.js +15 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__8f2ccc41._.js +15 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__95c9d682._.js +15 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__9e5d7774._.js +15 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__9edcff87._.js +15 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__a049dfc2._.js +15 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__a5b4bb9a._.js +15 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__a83262a1._.js +15 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__a9cd1240._.js +15 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__a9d7f822._.js +15 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__ad08c221._.js +15 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__ad585f2f._.js +15 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__afcb8f7d._.js +15 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__bc250d43._.js +15 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__bce2a6e7._.js +15 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__bfcd7fd4._.js +13 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__c011bf91._.js +15 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__c37d6380._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__cae392eb._.js +15 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__cc2616bb._.js +16 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__d501fa9b._.js +15 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__d59c6c15._.js +15 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__d5c1db32._.js +15 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__dba60c86._.js +15 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__de14b9ae._.js +15 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__e10643d1._.js +15 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__e3477417._.js +15 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__e4db362e._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__e4e70b86._.js +15 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__e54925af._.js +15 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__e8cbeaca._.js +111 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__e8edc5b0._.js +15 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__eab4d83b._.js +15 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__f056fd83._.js +15 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__f0e99572._.js +15 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__fe1e16d0._.js +15 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__ff9cd277._.js +15 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__ffaea2ce._.js +15 -2
- package/.next/standalone/.next/server/chunks/_next-internal_server_app_api_claude_usage_route_actions_fe002ec1.js +3 -0
- package/.next/standalone/.next/server/chunks/_next-internal_server_app_api_workspaces_[id]_todos_route_actions_0d4ffac5.js +3 -0
- package/.next/standalone/.next/server/chunks/ce889_server_app_api_workspaces_[id]_todos_[todoId]_route_actions_754fe6b9.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__66aca5d4._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{_17b946fd._.js → _20c2cf3a._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/_5f55bf8f._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/src_app_(desktop)_settings_page_tsx_f74824b3._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/src_app_(desktop)_terminal_page_tsx_de5e8d85._.js +1 -1
- package/.next/standalone/.next/server/edge/chunks/[root-of-the-server]__90eeddae._.js +1 -1
- package/.next/standalone/.next/server/edge/chunks/[root-of-the-server]__ca3f649e._.js +2 -2
- 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/14216197f9dcbe5b.css +3 -0
- package/.next/standalone/.next/static/chunks/{0852575eb90c1e8d.js → 4c9fb0a38f041a3d.js} +2 -2
- package/.next/standalone/.next/static/chunks/8f6f93ab45a5ff5b.js +1 -0
- package/.next/standalone/.next/static/chunks/{e62bb488d02db247.js → d2566c2dcf53fef3.js} +1 -1
- package/.next/standalone/.next/static/chunks/{7f6a14f1849fa94d.js → ff7d85dade44d1f3.js} +1 -1
- package/.next/standalone/bin/cortex-hook.js +8 -3
- package/.next/standalone/bin/cortex-learn-hook.js +7 -2
- package/.next/standalone/bin/scrub-standalone.js +89 -0
- package/.next/standalone/bin/terminal-server.js +44 -16
- package/.next/standalone/docs/features/claude-usage.md +105 -0
- package/.next/standalone/docs/features/workspace-todos.md +127 -0
- package/.next/standalone/docs/superpowers/plans/2026-04-21-workspace-todos.md +1097 -0
- package/.next/standalone/docs/superpowers/plans/2026-04-22-claude-usage-display.md +749 -0
- package/.next/standalone/docs/superpowers/specs/2026-04-21-workspace-todos-design.md +180 -0
- package/.next/standalone/docs/superpowers/specs/2026-04-22-claude-usage-display-design.md +183 -0
- package/.next/standalone/package-lock.json +2 -2
- package/.next/standalone/package.json +2 -2
- package/.next/standalone/src/app/(desktop)/settings/page.tsx +40 -1
- package/.next/standalone/src/app/(desktop)/terminal/page.tsx +54 -2
- package/.next/standalone/src/app/api/chat/route.ts +56 -53
- package/.next/standalone/src/app/api/claude/usage/route.ts +33 -0
- package/.next/standalone/src/app/api/config/route.ts +3 -0
- package/.next/standalone/src/app/api/sessions/[id]/chat/route.ts +2 -1
- package/.next/standalone/src/app/api/workspaces/[id]/todos/[todoId]/route.ts +55 -0
- package/.next/standalone/src/app/api/workspaces/[id]/todos/route.ts +43 -0
- package/.next/standalone/src/components/claude/claude-usage-strip.tsx +175 -0
- package/.next/standalone/src/components/workspace/workspace-todos.tsx +265 -0
- package/.next/standalone/src/hooks/use-claude-usage.ts +66 -0
- package/.next/standalone/src/lib/claude/credentials.ts +36 -0
- package/.next/standalone/src/lib/claude/usage.ts +69 -0
- package/.next/standalone/src/lib/config.ts +3 -0
- package/.next/standalone/src/lib/db/queries.ts +103 -1
- package/.next/standalone/src/lib/db/schema.ts +18 -0
- package/.next/standalone/src/lib/spawn-env.ts +32 -0
- package/.next/standalone/src/lib/terminal/server.ts +3 -3
- package/.next/standalone/src/middleware.ts +23 -5
- package/.next/standalone/src/types/claude.ts +39 -0
- package/.next/standalone/tests/db/workspace-todos.test.ts +156 -0
- package/bin/cortex-hook.js +8 -3
- package/bin/cortex-learn-hook.js +7 -2
- package/bin/scrub-standalone.js +89 -0
- package/bin/terminal-server.js +44 -16
- package/package.json +2 -2
- package/.next/standalone/.claude/settings.local.json +0 -68
- package/.next/standalone/.claude/spaces-env.json +0 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__e2a996e5._.js +0 -114
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__ead29015._.js +0 -13
- package/.next/standalone/.next/server/chunks/ssr/_3ba93bdd._.js +0 -3
- package/.next/standalone/.next/static/chunks/074df89a63b6a854.js +0 -1
- package/.next/standalone/.next/static/chunks/2b769d1597e4fc1c.css +0 -3
- package/.next/standalone/.spaces/cortex-context.md +0 -51
- package/.next/standalone/cortex-hook-debug.log +0 -57
- package/.next/standalone/docs/plans/2026-03-02-security-audit.md +0 -229
- /package/.next/standalone/.next/static/{u1pHON3drz1mBi7owkbBP → HNrWymrkgOP9Z4WIaYeOj}/_buildManifest.js +0 -0
- /package/.next/standalone/.next/static/{u1pHON3drz1mBi7owkbBP → HNrWymrkgOP9Z4WIaYeOj}/_clientMiddlewareManifest.json +0 -0
- /package/.next/standalone/.next/static/{u1pHON3drz1mBi7owkbBP → HNrWymrkgOP9Z4WIaYeOj}/_ssgManifest.js +0 -0
|
@@ -2,11 +2,16 @@
|
|
|
2
2
|
'use strict';
|
|
3
3
|
const http = require('http');
|
|
4
4
|
const fs = require('fs');
|
|
5
|
+
const os = require('os');
|
|
5
6
|
const path = require('path');
|
|
6
7
|
|
|
7
|
-
const
|
|
8
|
+
const LOG_DIR = path.join(os.homedir(), '.spaces', 'logs');
|
|
9
|
+
const LOG_FILE = path.join(LOG_DIR, 'cortex-hook-debug.log');
|
|
8
10
|
function log(msg) {
|
|
9
|
-
try {
|
|
11
|
+
try {
|
|
12
|
+
fs.mkdirSync(LOG_DIR, { recursive: true });
|
|
13
|
+
fs.appendFileSync(LOG_FILE, "[" + new Date().toISOString() + "] [LEARN] " + msg + "\n");
|
|
14
|
+
} catch(e) {}
|
|
10
15
|
}
|
|
11
16
|
|
|
12
17
|
function readSpacesEnv() {
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
'use strict';
|
|
3
|
+
// Remove runtime-generated files from .next/standalone/ before publishing to npm.
|
|
4
|
+
// Historical incident: cortex-hook-debug.log containing user prompts (and npm tokens)
|
|
5
|
+
// leaked into versions 0.9.6-0.9.9 because the hook wrote to process.cwd() which
|
|
6
|
+
// at runtime was .next/standalone/. Hooks now log to ~/.spaces/logs/, but this
|
|
7
|
+
// belt-and-suspenders scrub runs on every publish to catch any other accidents.
|
|
8
|
+
|
|
9
|
+
const fs = require('fs');
|
|
10
|
+
const path = require('path');
|
|
11
|
+
|
|
12
|
+
const STANDALONE = path.join(process.cwd(), '.next', 'standalone');
|
|
13
|
+
|
|
14
|
+
const DENY_FILES = [
|
|
15
|
+
'cortex-hook-debug.log',
|
|
16
|
+
];
|
|
17
|
+
|
|
18
|
+
const DENY_DIRS = [
|
|
19
|
+
'.spaces',
|
|
20
|
+
'.claude',
|
|
21
|
+
'.codex',
|
|
22
|
+
'.gemini',
|
|
23
|
+
'.pi',
|
|
24
|
+
'logs',
|
|
25
|
+
];
|
|
26
|
+
|
|
27
|
+
const DENY_PATTERNS = [
|
|
28
|
+
/\.log$/i,
|
|
29
|
+
/^\.env(\..+)?$/i,
|
|
30
|
+
/^\.npmrc$/i,
|
|
31
|
+
];
|
|
32
|
+
|
|
33
|
+
function walk(dir, cb) {
|
|
34
|
+
let entries;
|
|
35
|
+
try { entries = fs.readdirSync(dir, { withFileTypes: true }); }
|
|
36
|
+
catch { return; }
|
|
37
|
+
for (const e of entries) {
|
|
38
|
+
const full = path.join(dir, e.name);
|
|
39
|
+
if (e.isDirectory()) {
|
|
40
|
+
if (DENY_DIRS.includes(e.name)) {
|
|
41
|
+
fs.rmSync(full, { recursive: true, force: true });
|
|
42
|
+
console.log('[scrub] removed dir: ' + path.relative(STANDALONE, full));
|
|
43
|
+
continue;
|
|
44
|
+
}
|
|
45
|
+
walk(full, cb);
|
|
46
|
+
} else if (e.isFile()) {
|
|
47
|
+
cb(full, e.name);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
if (!fs.existsSync(STANDALONE)) {
|
|
53
|
+
console.log('[scrub] no .next/standalone to scrub');
|
|
54
|
+
process.exit(0);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
walk(STANDALONE, (full, name) => {
|
|
58
|
+
if (DENY_FILES.includes(name) || DENY_PATTERNS.some(p => p.test(name))) {
|
|
59
|
+
fs.rmSync(full, { force: true });
|
|
60
|
+
console.log('[scrub] removed file: ' + path.relative(STANDALONE, full));
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
// Final scan: refuse to publish if any obvious secrets remain in text files
|
|
65
|
+
const SECRET_PATTERNS = [
|
|
66
|
+
/npm_[A-Za-z0-9]{30,}/,
|
|
67
|
+
/sk-ant-[A-Za-z0-9_-]{20,}/,
|
|
68
|
+
/ghp_[A-Za-z0-9]{30,}/,
|
|
69
|
+
];
|
|
70
|
+
let leaked = false;
|
|
71
|
+
walk(STANDALONE, (full, name) => {
|
|
72
|
+
if (!/\.(js|json|md|txt|log|ts|tsx|mjs|cjs)$/i.test(name)) return;
|
|
73
|
+
let content;
|
|
74
|
+
try { content = fs.readFileSync(full, 'utf-8'); } catch { return; }
|
|
75
|
+
for (const p of SECRET_PATTERNS) {
|
|
76
|
+
const m = content.match(p);
|
|
77
|
+
if (m) {
|
|
78
|
+
console.error('[scrub] SECRET DETECTED in ' + path.relative(STANDALONE, full) + ': ' + m[0].slice(0, 12) + '...');
|
|
79
|
+
leaked = true;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
});
|
|
83
|
+
|
|
84
|
+
if (leaked) {
|
|
85
|
+
console.error('[scrub] aborting publish — secrets found in build output');
|
|
86
|
+
process.exit(1);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
console.log('[scrub] done — standalone clean');
|
|
@@ -1334,8 +1334,11 @@ function handleConnection(wss, ws, req) {
|
|
|
1334
1334
|
const rawAgentSession = url.searchParams.get('agentSession') || '';
|
|
1335
1335
|
const agentSession = (rawAgentSession === 'new' || SESSION_ID_RE.test(rawAgentSession)) ? rawAgentSession : '';
|
|
1336
1336
|
const rawCustomCommand = url.searchParams.get('customCommand') || '';
|
|
1337
|
-
// Sanitize
|
|
1338
|
-
|
|
1337
|
+
// Sanitize via allowlist. Any character outside [A-Za-z0-9 . _ - /] is rejected.
|
|
1338
|
+
// Earlier blocklist (/[;&|`$(){}]/) missed newlines, redirects (<,>), and
|
|
1339
|
+
// backslashes — a payload like "legit\nmalicious" would inject a second command
|
|
1340
|
+
// when the PTY wrote it with a trailing \r.
|
|
1341
|
+
const customCommand = /^[A-Za-z0-9._\-/ ]+$/.test(rawCustomCommand) ? rawCustomCommand : '';
|
|
1339
1342
|
const cols = parseInt(url.searchParams.get('cols') || '120', 10);
|
|
1340
1343
|
const rows = parseInt(url.searchParams.get('rows') || '30', 10);
|
|
1341
1344
|
|
|
@@ -1554,8 +1557,25 @@ function handleConnection(wss, ws, req) {
|
|
|
1554
1557
|
// Detect bash-on-Windows so cd commands use bash syntax, not cmd.exe `cd /d`
|
|
1555
1558
|
const isBashOnWindows = isWindows && shell && (shell.endsWith('bash.exe') || shell.endsWith('bash'));
|
|
1556
1559
|
|
|
1557
|
-
|
|
1558
|
-
|
|
1560
|
+
// Build a minimal env for the user-facing PTY — never inherit the server's
|
|
1561
|
+
// secrets (SPACES_SESSION_SECRET, GH_PAT, NPM_TOKEN, ANTHROPIC_API_KEY, etc).
|
|
1562
|
+
// Only forward identity/shell/locale/terminal basics from the server env.
|
|
1563
|
+
const PTY_ENV_ALLOW = [
|
|
1564
|
+
'HOME', 'USER', 'LOGNAME', 'SHELL', 'PATH', 'PWD', 'OLDPWD', 'HOSTNAME',
|
|
1565
|
+
'LANG', 'LC_ALL', 'LC_CTYPE', 'LC_MESSAGES', 'LC_COLLATE', 'LC_TIME',
|
|
1566
|
+
'LC_NUMERIC', 'LC_MONETARY', 'TZ',
|
|
1567
|
+
'XDG_CONFIG_HOME', 'XDG_DATA_HOME', 'XDG_CACHE_HOME', 'XDG_RUNTIME_DIR',
|
|
1568
|
+
'XDG_STATE_HOME',
|
|
1569
|
+
'TERM', 'TERM_PROGRAM', 'TERM_PROGRAM_VERSION', 'COLORTERM', 'COLUMNS', 'LINES',
|
|
1570
|
+
'NODE_ENV', 'NVM_DIR', 'NVM_BIN',
|
|
1571
|
+
// Windows basics
|
|
1572
|
+
'SYSTEMROOT', 'WINDIR', 'APPDATA', 'LOCALAPPDATA', 'USERPROFILE', 'COMSPEC',
|
|
1573
|
+
'PATHEXT', 'PROGRAMFILES', 'PROGRAMFILES(X86)', 'PROGRAMDATA',
|
|
1574
|
+
];
|
|
1575
|
+
const env = {};
|
|
1576
|
+
for (const k of PTY_ENV_ALLOW) {
|
|
1577
|
+
if (process.env[k] !== undefined) env[k] = process.env[k];
|
|
1578
|
+
}
|
|
1559
1579
|
// Enable prompt suggestions in spawned Claude Code sessions
|
|
1560
1580
|
env.CLAUDE_CODE_ENABLE_PROMPT_SUGGESTION = 'true';
|
|
1561
1581
|
// Tell Claude Code where git-bash is so it doesn't fail the bash detection
|
|
@@ -2208,19 +2228,30 @@ async function handleProxyConnection(clientWs, nodeId, opts) {
|
|
|
2208
2228
|
return;
|
|
2209
2229
|
}
|
|
2210
2230
|
|
|
2211
|
-
// Get the remote WebSocket URL via the terminal token endpoint
|
|
2212
|
-
//
|
|
2231
|
+
// Get the remote WebSocket URL via the terminal token endpoint.
|
|
2232
|
+
// If the user opted into skipping TLS verification (for self-signed federation
|
|
2233
|
+
// certs), scope it to JUST this request via an undici Agent rather than the
|
|
2234
|
+
// process-global NODE_TLS_REJECT_UNAUTHORIZED env var, which would disable
|
|
2235
|
+
// cert verification for every outbound TLS connection in the process and
|
|
2236
|
+
// race with concurrent requests.
|
|
2213
2237
|
const skipTls = process.env.SPACES_SKIP_TLS_VERIFY === '1';
|
|
2214
|
-
|
|
2215
|
-
|
|
2238
|
+
let fetchOptions = {
|
|
2239
|
+
method: 'POST',
|
|
2240
|
+
headers: { 'Authorization': `Bearer ${apiKey}`, 'Content-Type': 'application/json' },
|
|
2241
|
+
signal: AbortSignal.timeout(10000),
|
|
2242
|
+
};
|
|
2243
|
+
if (skipTls) {
|
|
2244
|
+
try {
|
|
2245
|
+
const { Agent } = require('undici');
|
|
2246
|
+
fetchOptions.dispatcher = new Agent({ connect: { rejectUnauthorized: false } });
|
|
2247
|
+
} catch (e) {
|
|
2248
|
+
console.warn('[Proxy] undici unavailable for per-request TLS opt-out; refusing to fall back to global flag');
|
|
2249
|
+
}
|
|
2250
|
+
}
|
|
2216
2251
|
let remoteWsUrl;
|
|
2217
2252
|
try {
|
|
2218
2253
|
const tokenUrl = `${node.url}/api/network/terminal/token/`;
|
|
2219
|
-
const res = await fetch(tokenUrl,
|
|
2220
|
-
method: 'POST',
|
|
2221
|
-
headers: { 'Authorization': `Bearer ${apiKey}`, 'Content-Type': 'application/json' },
|
|
2222
|
-
signal: AbortSignal.timeout(10000),
|
|
2223
|
-
});
|
|
2254
|
+
const res = await fetch(tokenUrl, fetchOptions);
|
|
2224
2255
|
|
|
2225
2256
|
if (!res.ok) {
|
|
2226
2257
|
let detail = '';
|
|
@@ -2236,9 +2267,6 @@ async function handleProxyConnection(clientWs, nodeId, opts) {
|
|
|
2236
2267
|
clientWs.send(JSON.stringify({ type: 'error', data: `Cannot reach remote node: ${err.message}` }));
|
|
2237
2268
|
clientWs.close();
|
|
2238
2269
|
return;
|
|
2239
|
-
} finally {
|
|
2240
|
-
if (prevTls === undefined) delete process.env.NODE_TLS_REJECT_UNAUTHORIZED;
|
|
2241
|
-
else process.env.NODE_TLS_REJECT_UNAUTHORIZED = prevTls;
|
|
2242
2270
|
}
|
|
2243
2271
|
|
|
2244
2272
|
// Connect to remote terminal server using the API key directly.
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
# Claude Plan-Usage Display
|
|
2
|
+
|
|
3
|
+
**Status:** stable
|
|
4
|
+
**Owner:** jlongo
|
|
5
|
+
**Last updated:** 2026-04-22
|
|
6
|
+
|
|
7
|
+
## Overview
|
|
8
|
+
|
|
9
|
+
A compact readout of the user's Anthropic plan-usage rate limits, surfaced in the terminal page header whenever the active workspace has at least one Claude pane. Shows 5-hour, 7-day Opus, and 7-day Sonnet windows at a glance; click expands to all windows plus overage credits. Data matches what `/usage` shows inside Claude Code.
|
|
10
|
+
|
|
11
|
+
## User-facing behavior
|
|
12
|
+
|
|
13
|
+
- Open any workspace on `/terminal` that has a Claude pane.
|
|
14
|
+
- A horizontal strip appears in the header (right side, before Files / Collab / Close / Add Pane).
|
|
15
|
+
- Three thin progress bars: **5h**, **Opus**, **Sonnet** — each with a percent label and a color that escalates green → amber → red.
|
|
16
|
+
- Hover a bar → tooltip `{label}: X% used · resets in 2h 14m`.
|
|
17
|
+
- Click the strip → popover with all five rate-limit windows + an overage-credits block if the account has overage enabled.
|
|
18
|
+
- If the OAuth token is missing or expired, the strip shows `sign in via Claude Code` with a small login icon. No auto-refresh.
|
|
19
|
+
- If the Anthropic endpoint fails or times out, the strip hides silently.
|
|
20
|
+
|
|
21
|
+
## Architecture
|
|
22
|
+
|
|
23
|
+
UI (`src/components/claude/claude-usage-strip.tsx`) → polling hook (`src/hooks/use-claude-usage.ts`) → API route (`src/app/api/claude/usage/route.ts`) → credentials reader (`src/lib/claude/credentials.ts`) + Anthropic fetcher with 30s cache (`src/lib/claude/usage.ts`) → `https://api.anthropic.com/api/oauth/usage`.
|
|
24
|
+
|
|
25
|
+
Polling: hook calls the route on mount and every 60s while the strip is enabled. Server caches the Anthropic response 30s per access-token prefix so rapid re-polls don't hammer Anthropic.
|
|
26
|
+
|
|
27
|
+
## Key files
|
|
28
|
+
|
|
29
|
+
| Path | Role |
|
|
30
|
+
|---|---|
|
|
31
|
+
| `src/lib/claude/credentials.ts` | Reads `~/.claude/.credentials.json`, extracts `claudeAiOauth`, exposes `isTokenExpired()`. |
|
|
32
|
+
| `src/lib/claude/usage.ts` | Calls Anthropic's `/api/oauth/usage`, 5s timeout, 30s in-memory cache. |
|
|
33
|
+
| `src/app/api/claude/usage/route.ts` | `GET` handler; returns one of `ok` / `unauthenticated` / `expired` / `upstream_error`. |
|
|
34
|
+
| `src/hooks/use-claude-usage.ts` | 60s polling hook, toggled by `enabled` arg. |
|
|
35
|
+
| `src/components/claude/claude-usage-strip.tsx` | Compact 3-bar strip + expanded popover. |
|
|
36
|
+
| `src/app/(desktop)/terminal/page.tsx` | Mounts the strip conditionally in the header. |
|
|
37
|
+
| `src/types/claude.ts` | `RateLimit`, `ExtraUsage`, `Utilization`, `UsageResponse`. |
|
|
38
|
+
|
|
39
|
+
## Data model
|
|
40
|
+
|
|
41
|
+
No DB tables. All state is transient:
|
|
42
|
+
- Server-side: in-memory `Map<tokenPrefix, { fetchedAt, data }>` in `src/lib/claude/usage.ts` with 30s TTL. Process-local; resets on server restart.
|
|
43
|
+
- Client-side: React state in the hook.
|
|
44
|
+
|
|
45
|
+
## APIs / contracts
|
|
46
|
+
|
|
47
|
+
### Internal endpoints
|
|
48
|
+
|
|
49
|
+
- `GET /api/claude/usage` — returns `UsageResponse`:
|
|
50
|
+
- `200 { status: "ok", data: Utilization }` — happy path.
|
|
51
|
+
- `200 { status: "unauthenticated" }` — no credentials file or no `claudeAiOauth`.
|
|
52
|
+
- `200 { status: "expired" }` — access token past `expiresAt`.
|
|
53
|
+
- `200 { status: "upstream_error" }` — Anthropic non-2xx or timeout.
|
|
54
|
+
|
|
55
|
+
Auth: same `withUser`/`getAuthUser` wrapping as every other `/api/*` route.
|
|
56
|
+
|
|
57
|
+
### External calls
|
|
58
|
+
|
|
59
|
+
- **Anthropic `GET https://api.anthropic.com/api/oauth/usage`** — uses the user's own OAuth access token read from `~/.claude/.credentials.json`. No secret of our own. User-Agent `claude-code/spaces-integration`.
|
|
60
|
+
|
|
61
|
+
## Configuration & environment
|
|
62
|
+
|
|
63
|
+
- `CLAUDE_CONFIG_DIR` — respected (defaults to `~/.claude`). Same semantics as Claude Code.
|
|
64
|
+
- No env vars, feature flags, or tier gates specific to this feature.
|
|
65
|
+
|
|
66
|
+
## How to run / test locally
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
npm install
|
|
70
|
+
npm run build
|
|
71
|
+
npm start
|
|
72
|
+
# visit http://localhost:3457/terminal, enter a workspace, add a Claude pane
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
Manual QA checklist:
|
|
76
|
+
|
|
77
|
+
1. With a valid OAuth session (logged in via any recent Claude Code run): the strip appears in the header; percents match `/usage` inside Claude Code.
|
|
78
|
+
2. Hover each bar → tooltip shows the reset timing.
|
|
79
|
+
3. Click → popover with all five windows and overage block (if applicable).
|
|
80
|
+
4. Delete the Claude pane from the workspace → strip disappears.
|
|
81
|
+
5. Set `claudeAiOauth.expiresAt` to a past timestamp in `.credentials.json`, reload → strip shows "sign in via Claude Code".
|
|
82
|
+
6. Move `.credentials.json` aside temporarily, reload → same sign-in hint.
|
|
83
|
+
7. Disconnect network → within ~90s the strip silently hides (`upstream_error` → null render).
|
|
84
|
+
|
|
85
|
+
No automated tests for v1.
|
|
86
|
+
|
|
87
|
+
## Known quirks & decisions
|
|
88
|
+
|
|
89
|
+
- **Passive refresh.** We do not refresh the OAuth access token. Claude Code owns the refresh lifecycle and writes `.credentials.json`; racing with it would corrupt the shared file.
|
|
90
|
+
- **Account-wide data, not per-pane.** The Anthropic endpoint returns account-level rate limits. Rendering once in the header (not per-pane) is intentional.
|
|
91
|
+
- **User-Agent and anthropic-beta header.** The Anthropic `/api/oauth/usage` endpoint requires the `anthropic-beta: oauth-2025-04-20` header in addition to the Bearer token — without it the call 4xx-errors out. Both the UA (`claude-code/spaces`) and the beta header are constants in `src/lib/claude/usage.ts`; if upstream ever rotates the beta header, bump it there.
|
|
92
|
+
- **30s cache + 60s poll.** Outer-bound staleness is ~90s; fine for windows that move in hours.
|
|
93
|
+
- **Token-prefix cache key.** First 16 chars of `accessToken`. Collision probability is effectively nil; avoids holding full tokens in the cache structure beyond the single request.
|
|
94
|
+
- **Silent upstream failure.** Errors hide the strip rather than showing a red toast — rate-limit info is nice-to-have, not mission-critical.
|
|
95
|
+
- **Ships direct to `main`.** Per repo convention.
|
|
96
|
+
|
|
97
|
+
## Open questions / TODOs
|
|
98
|
+
|
|
99
|
+
- [ ] Active OAuth refresh — mirror Claude Code's `/oauth/token` dance to keep the widget live past expiry. Deferred for v1.
|
|
100
|
+
- [ ] Session-cost complement using local JSONL token counts (different data source).
|
|
101
|
+
- [ ] Consider surfacing 7-day-overall alongside the current three for users who care.
|
|
102
|
+
|
|
103
|
+
## Changelog
|
|
104
|
+
|
|
105
|
+
- 2026-04-22 — Initial implementation. v1 ships direct to `main`.
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
# Workspace Todos
|
|
2
|
+
|
|
3
|
+
**Status:** stable
|
|
4
|
+
**Owner:** jlongo
|
|
5
|
+
**Last updated:** 2026-04-21
|
|
6
|
+
|
|
7
|
+
## Overview
|
|
8
|
+
|
|
9
|
+
A lightweight todo list attached to each workspace. Renders inline at the top of `/terminal` above the pane grid, always visible. Minimal model: text + checkbox + delete. Scoped per-workspace — switching workspaces swaps the list. Not in scope: agent read/write, drag-reorder, priorities/due dates, cross-workspace views.
|
|
10
|
+
|
|
11
|
+
## User-facing behavior
|
|
12
|
+
|
|
13
|
+
- Visit `/terminal`, enter any workspace.
|
|
14
|
+
- A "Todos" bar renders above the pane grid with an "Add todo…" input.
|
|
15
|
+
- Enter adds a todo at the bottom of the uncompleted list. Input stays focused.
|
|
16
|
+
- Click the checkbox → strike-through + sink to the completed section.
|
|
17
|
+
- Click text → inline edit. Enter saves, Esc cancels, blur saves.
|
|
18
|
+
- Hover row → `×` delete button.
|
|
19
|
+
- Eye icon in the header toggles visibility of completed todos (ephemeral, resets on reload).
|
|
20
|
+
|
|
21
|
+
## Architecture
|
|
22
|
+
|
|
23
|
+
UI (`src/components/workspace/workspace-todos.tsx`) → API routes (`src/app/api/workspaces/[id]/todos/*`) → DB helpers (`src/lib/db/queries.ts`) → SQLite (`workspace_todos` table in the per-user DB at `~/.spaces/<user>.db`).
|
|
24
|
+
|
|
25
|
+
Mutations are optimistic client-side with rollback on failure. Workspace switch triggers a fresh refetch keyed on `workspaceId`.
|
|
26
|
+
|
|
27
|
+
## Key files
|
|
28
|
+
|
|
29
|
+
| Path | Role |
|
|
30
|
+
|---|---|
|
|
31
|
+
| `src/components/workspace/workspace-todos.tsx` | Inline UI component — fetching, optimistic CRUD, rendering |
|
|
32
|
+
| `src/app/api/workspaces/[id]/todos/route.ts` | `GET` list, `POST` create |
|
|
33
|
+
| `src/app/api/workspaces/[id]/todos/[todoId]/route.ts` | `PATCH` update, `DELETE` remove |
|
|
34
|
+
| `src/lib/db/schema.ts` | `workspace_todos` table declaration inside `initSchema()` |
|
|
35
|
+
| `src/lib/db/queries.ts` | `getWorkspaceTodos`, `addWorkspaceTodo`, `updateWorkspaceTodo`, `deleteWorkspaceTodo` |
|
|
36
|
+
| `src/types/claude.ts` | `WorkspaceTodo` type |
|
|
37
|
+
| `src/app/(desktop)/terminal/page.tsx` | Mounts `<WorkspaceTodos>` above the pane grid |
|
|
38
|
+
| `tests/db/workspace-todos.test.ts` | Query-layer tests — ordering, cascade, scoping |
|
|
39
|
+
|
|
40
|
+
## Data model
|
|
41
|
+
|
|
42
|
+
### `workspace_todos`
|
|
43
|
+
|
|
44
|
+
| Column | Type | Notes |
|
|
45
|
+
|---|---|---|
|
|
46
|
+
| `id` | INTEGER PK | autoincrement |
|
|
47
|
+
| `workspace_id` | INTEGER NOT NULL | FK → `workspaces(id)` ON DELETE CASCADE |
|
|
48
|
+
| `text` | TEXT NOT NULL | trimmed on insert/update; empty rejected |
|
|
49
|
+
| `completed` | INTEGER NOT NULL DEFAULT 0 | 0 or 1 |
|
|
50
|
+
| `sort_order` | INTEGER NOT NULL DEFAULT 0 | meaningful only among uncompleted rows |
|
|
51
|
+
| `created` | TEXT NOT NULL DEFAULT datetime('now') | |
|
|
52
|
+
| `completed_at` | TEXT | set when completed flips 0→1, cleared on 1→0 |
|
|
53
|
+
|
|
54
|
+
Index: `idx_workspace_todos_workspace` on `workspace_id`.
|
|
55
|
+
|
|
56
|
+
### TypeScript
|
|
57
|
+
|
|
58
|
+
```ts
|
|
59
|
+
interface WorkspaceTodo {
|
|
60
|
+
id: number;
|
|
61
|
+
workspaceId: number;
|
|
62
|
+
text: string;
|
|
63
|
+
completed: boolean;
|
|
64
|
+
sortOrder: number;
|
|
65
|
+
created: string;
|
|
66
|
+
completedAt: string | null;
|
|
67
|
+
}
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
### Invariants
|
|
71
|
+
|
|
72
|
+
- Listing order: uncompleted first by `sort_order` ASC, then completed by `completed_at` DESC.
|
|
73
|
+
- New todos get `sort_order = MAX(sort_order WHERE completed=0) + 1`.
|
|
74
|
+
- `completed_at` is `NULL` iff `completed = 0`.
|
|
75
|
+
- Deleting a workspace deletes its todos via FK cascade.
|
|
76
|
+
|
|
77
|
+
## APIs / contracts
|
|
78
|
+
|
|
79
|
+
### Internal endpoints
|
|
80
|
+
|
|
81
|
+
| Method | Path | Request | Response |
|
|
82
|
+
|---|---|---|---|
|
|
83
|
+
| `GET` | `/api/workspaces/:id/todos` | — | `WorkspaceTodo[]` |
|
|
84
|
+
| `POST` | `/api/workspaces/:id/todos` | `{ text: string }` | `201 WorkspaceTodo` or `400 { error }` |
|
|
85
|
+
| `PATCH` | `/api/workspaces/:id/todos/:todoId` | `{ text?, completed? }` | `WorkspaceTodo` or `400`/`404` |
|
|
86
|
+
| `DELETE` | `/api/workspaces/:id/todos/:todoId` | — | `{ ok: true }` |
|
|
87
|
+
|
|
88
|
+
Auth via `getAuthUser` + `withUser`, same pattern as sibling workspace routes.
|
|
89
|
+
|
|
90
|
+
### External calls
|
|
91
|
+
N/A.
|
|
92
|
+
|
|
93
|
+
## Configuration & environment
|
|
94
|
+
None. Always-on Community-tier feature. No env vars, flags, or tier gates.
|
|
95
|
+
|
|
96
|
+
## How to run / test locally
|
|
97
|
+
|
|
98
|
+
```bash
|
|
99
|
+
npm install
|
|
100
|
+
npm run build
|
|
101
|
+
npm start
|
|
102
|
+
# visit http://localhost:3457/terminal, enter any workspace
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
Automated:
|
|
106
|
+
```bash
|
|
107
|
+
npx vitest run tests/db/workspace-todos.test.ts
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
## Known quirks & decisions
|
|
111
|
+
|
|
112
|
+
- **Schema lives in `initSchema()`, no migration file.** Matches the pattern in `src/lib/db/schema.ts`; the repo has no separate migration system.
|
|
113
|
+
- **No agent write path in v1.** The coworker's "pi /todos" plugin that inspired this lets agents add todos from inside the session — deferred because it requires an MCP tool or CLI surface.
|
|
114
|
+
- **Optimistic updates without toasts.** Failures `console.error` and revert local state; this is a local-only app, so silent revert is acceptable for v1.
|
|
115
|
+
- **`sort_order = Number.MAX_SAFE_INTEGER` for optimistic inserts.** The temp row sorts to the bottom of uncompleted; the server returns the real `sort_order` on response and replaces the temp.
|
|
116
|
+
- **No confirm on delete.** Minimal ethos. Add undo toast in a follow-up if this proves painful.
|
|
117
|
+
- **Direct-to-main workflow.** Per repo convention for this codebase; no PR flow.
|
|
118
|
+
|
|
119
|
+
## Open questions / TODOs
|
|
120
|
+
|
|
121
|
+
- [ ] Agent write access via MCP tool once UI v1 proves out.
|
|
122
|
+
- [ ] Optional: persist the "show completed" toggle in localStorage.
|
|
123
|
+
- [ ] Optional: keyboard shortcut to focus the add-input from anywhere on `/terminal`.
|
|
124
|
+
|
|
125
|
+
## Changelog
|
|
126
|
+
|
|
127
|
+
- 2026-04-21 — Initial implementation. v1 ships direct to `main`.
|