@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
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { NextRequest } from 'next/server';
|
|
2
2
|
import { spawn } from 'child_process';
|
|
3
|
-
import { getAuthUser } from '@/lib/auth';
|
|
3
|
+
import { getAuthUser, withUser } from '@/lib/auth';
|
|
4
|
+
import { buildSpawnEnv } from '@/lib/spawn-env';
|
|
4
5
|
|
|
5
6
|
export const dynamic = 'force-dynamic';
|
|
6
7
|
|
|
@@ -17,69 +18,71 @@ export async function POST(request: NextRequest) {
|
|
|
17
18
|
});
|
|
18
19
|
}
|
|
19
20
|
|
|
20
|
-
|
|
21
|
-
|
|
21
|
+
return withUser(user, () => {
|
|
22
|
+
const workDir = cwd || require('os').homedir();
|
|
23
|
+
const encoder = new TextEncoder();
|
|
22
24
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
25
|
+
const stream = new ReadableStream({
|
|
26
|
+
start(controller) {
|
|
27
|
+
const args = [
|
|
28
|
+
'-p', message,
|
|
29
|
+
'--output-format', 'stream-json',
|
|
30
|
+
'--verbose',
|
|
31
|
+
];
|
|
30
32
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
+
const env = buildSpawnEnv();
|
|
34
|
+
delete env.CLAUDECODE;
|
|
33
35
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
36
|
+
const child = spawn('claude', args, {
|
|
37
|
+
cwd: workDir,
|
|
38
|
+
env,
|
|
39
|
+
});
|
|
38
40
|
|
|
39
|
-
|
|
41
|
+
let buffer = '';
|
|
40
42
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
43
|
+
child.stdout.on('data', (chunk: Buffer) => {
|
|
44
|
+
buffer += chunk.toString();
|
|
45
|
+
const lines = buffer.split('\n');
|
|
46
|
+
buffer = lines.pop() || '';
|
|
45
47
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
48
|
+
for (const line of lines) {
|
|
49
|
+
if (!line.trim()) continue;
|
|
50
|
+
try {
|
|
51
|
+
const event = JSON.parse(line);
|
|
52
|
+
controller.enqueue(encoder.encode(`data: ${JSON.stringify(event)}\n\n`));
|
|
53
|
+
} catch {
|
|
54
|
+
controller.enqueue(encoder.encode(`data: ${JSON.stringify({ type: 'text', text: line })}\n\n`));
|
|
55
|
+
}
|
|
53
56
|
}
|
|
54
|
-
}
|
|
55
|
-
});
|
|
57
|
+
});
|
|
56
58
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
59
|
+
child.stderr.on('data', (chunk: Buffer) => {
|
|
60
|
+
const text = chunk.toString();
|
|
61
|
+
controller.enqueue(encoder.encode(`data: ${JSON.stringify({ type: 'error', text })}\n\n`));
|
|
62
|
+
});
|
|
61
63
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
64
|
+
child.on('close', (code) => {
|
|
65
|
+
controller.enqueue(encoder.encode(`data: ${JSON.stringify({ type: 'done', exitCode: code })}\n\n`));
|
|
66
|
+
controller.close();
|
|
67
|
+
});
|
|
66
68
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
69
|
+
child.on('error', (err) => {
|
|
70
|
+
controller.enqueue(encoder.encode(`data: ${JSON.stringify({ type: 'error', text: err.message })}\n\n`));
|
|
71
|
+
controller.close();
|
|
72
|
+
});
|
|
71
73
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
74
|
+
request.signal.addEventListener('abort', () => {
|
|
75
|
+
child.kill('SIGTERM');
|
|
76
|
+
});
|
|
77
|
+
},
|
|
78
|
+
});
|
|
77
79
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
80
|
+
return new Response(stream, {
|
|
81
|
+
headers: {
|
|
82
|
+
'Content-Type': 'text/event-stream',
|
|
83
|
+
'Cache-Control': 'no-cache',
|
|
84
|
+
'Connection': 'keep-alive',
|
|
85
|
+
},
|
|
86
|
+
});
|
|
84
87
|
});
|
|
85
88
|
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { NextRequest, NextResponse } from 'next/server';
|
|
2
|
+
import { getAuthUser, withUser } from '@/lib/auth';
|
|
3
|
+
import { ensureInitialized } from '@/lib/db/init';
|
|
4
|
+
import { readClaudeAiOauthTokens, isTokenExpired } from '@/lib/claude/credentials';
|
|
5
|
+
import { fetchUtilization } from '@/lib/claude/usage';
|
|
6
|
+
import type { UsageResponse } from '@/types/claude';
|
|
7
|
+
|
|
8
|
+
export async function GET(request: NextRequest) {
|
|
9
|
+
const user = getAuthUser(request);
|
|
10
|
+
return withUser(user, async () => {
|
|
11
|
+
await ensureInitialized();
|
|
12
|
+
|
|
13
|
+
const tokens = await readClaudeAiOauthTokens();
|
|
14
|
+
if (!tokens) {
|
|
15
|
+
const body: UsageResponse = { status: 'unauthenticated' };
|
|
16
|
+
return NextResponse.json(body);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
if (isTokenExpired(tokens)) {
|
|
20
|
+
const body: UsageResponse = { status: 'expired' };
|
|
21
|
+
return NextResponse.json(body);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
const outcome = await fetchUtilization(tokens.accessToken);
|
|
25
|
+
if (!outcome.ok) {
|
|
26
|
+
const body: UsageResponse = { status: 'upstream_error' };
|
|
27
|
+
return NextResponse.json(body);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
const body: UsageResponse = { status: 'ok', data: outcome.data };
|
|
31
|
+
return NextResponse.json(body);
|
|
32
|
+
});
|
|
33
|
+
}
|
|
@@ -24,6 +24,9 @@ export async function PUT(request: NextRequest) {
|
|
|
24
24
|
.filter((d: unknown) => typeof d === 'string' && isAbsolute(d))
|
|
25
25
|
.map((d: string) => resolve(d));
|
|
26
26
|
}
|
|
27
|
+
if (typeof body.todosEnabled === 'boolean') {
|
|
28
|
+
updates.todosEnabled = body.todosEnabled;
|
|
29
|
+
}
|
|
27
30
|
const config = writeConfig(user, updates);
|
|
28
31
|
return NextResponse.json(config);
|
|
29
32
|
});
|
|
@@ -3,6 +3,7 @@ import { spawn } from 'child_process';
|
|
|
3
3
|
import { getAuthUser, withUser } from '@/lib/auth';
|
|
4
4
|
import { ensureInitialized } from '@/lib/db/init';
|
|
5
5
|
import { getSessionById } from '@/lib/db/queries';
|
|
6
|
+
import { buildSpawnEnv } from '@/lib/spawn-env';
|
|
6
7
|
|
|
7
8
|
export const dynamic = 'force-dynamic';
|
|
8
9
|
|
|
@@ -39,7 +40,7 @@ export async function POST(
|
|
|
39
40
|
];
|
|
40
41
|
|
|
41
42
|
// Strip CLAUDECODE so claude doesn't think it's nested
|
|
42
|
-
const env =
|
|
43
|
+
const env = buildSpawnEnv();
|
|
43
44
|
delete env.CLAUDECODE;
|
|
44
45
|
|
|
45
46
|
const child = spawn('claude', args, {
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { NextRequest, NextResponse } from 'next/server';
|
|
2
|
+
import { getAuthUser, withUser } from '@/lib/auth';
|
|
3
|
+
import { ensureInitialized } from '@/lib/db/init';
|
|
4
|
+
import { updateWorkspaceTodo, deleteWorkspaceTodo } from '@/lib/db/queries';
|
|
5
|
+
|
|
6
|
+
export async function PATCH(
|
|
7
|
+
request: NextRequest,
|
|
8
|
+
{ params }: { params: Promise<{ id: string; todoId: string }> }
|
|
9
|
+
) {
|
|
10
|
+
const user = getAuthUser(request);
|
|
11
|
+
return withUser(user, async () => {
|
|
12
|
+
await ensureInitialized();
|
|
13
|
+
const { id, todoId } = await params;
|
|
14
|
+
const wsId = parseInt(id, 10);
|
|
15
|
+
const tid = parseInt(todoId, 10);
|
|
16
|
+
if (!Number.isFinite(wsId) || !Number.isFinite(tid)) {
|
|
17
|
+
return NextResponse.json({ error: 'invalid workspace or todo id' }, { status: 400 });
|
|
18
|
+
}
|
|
19
|
+
const body = await request.json().catch(() => null);
|
|
20
|
+
if (!body || (body.text === undefined && body.completed === undefined)) {
|
|
21
|
+
return NextResponse.json({ error: 'text or completed required' }, { status: 400 });
|
|
22
|
+
}
|
|
23
|
+
try {
|
|
24
|
+
const updated = updateWorkspaceTodo(wsId, tid, {
|
|
25
|
+
text: typeof body.text === 'string' ? body.text : undefined,
|
|
26
|
+
completed: typeof body.completed === 'boolean' ? body.completed : undefined,
|
|
27
|
+
});
|
|
28
|
+
if (!updated) {
|
|
29
|
+
return NextResponse.json({ error: 'not found' }, { status: 404 });
|
|
30
|
+
}
|
|
31
|
+
return NextResponse.json(updated);
|
|
32
|
+
} catch (err) {
|
|
33
|
+
const message = err instanceof Error ? err.message : 'update failed';
|
|
34
|
+
return NextResponse.json({ error: message }, { status: 400 });
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export async function DELETE(
|
|
40
|
+
request: NextRequest,
|
|
41
|
+
{ params }: { params: Promise<{ id: string; todoId: string }> }
|
|
42
|
+
) {
|
|
43
|
+
const user = getAuthUser(request);
|
|
44
|
+
return withUser(user, async () => {
|
|
45
|
+
await ensureInitialized();
|
|
46
|
+
const { id, todoId } = await params;
|
|
47
|
+
const wsId = parseInt(id, 10);
|
|
48
|
+
const tid = parseInt(todoId, 10);
|
|
49
|
+
if (!Number.isFinite(wsId) || !Number.isFinite(tid)) {
|
|
50
|
+
return NextResponse.json({ error: 'invalid workspace or todo id' }, { status: 400 });
|
|
51
|
+
}
|
|
52
|
+
deleteWorkspaceTodo(wsId, tid);
|
|
53
|
+
return NextResponse.json({ ok: true });
|
|
54
|
+
});
|
|
55
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { NextRequest, NextResponse } from 'next/server';
|
|
2
|
+
import { getAuthUser, withUser } from '@/lib/auth';
|
|
3
|
+
import { ensureInitialized } from '@/lib/db/init';
|
|
4
|
+
import { getWorkspaceTodos, addWorkspaceTodo } from '@/lib/db/queries';
|
|
5
|
+
|
|
6
|
+
export async function GET(
|
|
7
|
+
request: NextRequest,
|
|
8
|
+
{ params }: { params: Promise<{ id: string }> }
|
|
9
|
+
) {
|
|
10
|
+
const user = getAuthUser(request);
|
|
11
|
+
return withUser(user, async () => {
|
|
12
|
+
await ensureInitialized();
|
|
13
|
+
const { id } = await params;
|
|
14
|
+
const wsId = parseInt(id, 10);
|
|
15
|
+
if (!Number.isFinite(wsId)) {
|
|
16
|
+
return NextResponse.json({ error: 'invalid workspace id' }, { status: 400 });
|
|
17
|
+
}
|
|
18
|
+
const todos = getWorkspaceTodos(wsId);
|
|
19
|
+
return NextResponse.json(todos);
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export async function POST(
|
|
24
|
+
request: NextRequest,
|
|
25
|
+
{ params }: { params: Promise<{ id: string }> }
|
|
26
|
+
) {
|
|
27
|
+
const user = getAuthUser(request);
|
|
28
|
+
return withUser(user, async () => {
|
|
29
|
+
await ensureInitialized();
|
|
30
|
+
const { id } = await params;
|
|
31
|
+
const wsId = parseInt(id, 10);
|
|
32
|
+
if (!Number.isFinite(wsId)) {
|
|
33
|
+
return NextResponse.json({ error: 'invalid workspace id' }, { status: 400 });
|
|
34
|
+
}
|
|
35
|
+
const body = await request.json().catch(() => null);
|
|
36
|
+
const text = typeof body?.text === 'string' ? body.text : '';
|
|
37
|
+
if (!text.trim()) {
|
|
38
|
+
return NextResponse.json({ error: 'text is required' }, { status: 400 });
|
|
39
|
+
}
|
|
40
|
+
const todo = addWorkspaceTodo(wsId, text);
|
|
41
|
+
return NextResponse.json(todo, { status: 201 });
|
|
42
|
+
});
|
|
43
|
+
}
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { useEffect, useRef, useState } from 'react';
|
|
4
|
+
import { Zap, LogIn } from 'lucide-react';
|
|
5
|
+
import { useClaudeUsage } from '@/hooks/use-claude-usage';
|
|
6
|
+
import type { RateLimit } from '@/types/claude';
|
|
7
|
+
|
|
8
|
+
interface Props {
|
|
9
|
+
enabled: boolean;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
function utilizationColor(pct: number | null): string {
|
|
13
|
+
if (pct == null) return '#52525b'; // zinc-600 — unknown
|
|
14
|
+
if (pct <= 70) return '#22c55e'; // green-500
|
|
15
|
+
if (pct <= 90) return '#f59e0b'; // amber-500
|
|
16
|
+
return '#ef4444'; // red-500
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
function formatReset(resetsAt: string | null): string {
|
|
20
|
+
if (!resetsAt) return '';
|
|
21
|
+
const ms = new Date(resetsAt).getTime() - Date.now();
|
|
22
|
+
if (ms <= 0) return 'now';
|
|
23
|
+
const h = Math.floor(ms / 3_600_000);
|
|
24
|
+
const m = Math.floor((ms % 3_600_000) / 60_000);
|
|
25
|
+
if (h >= 24) {
|
|
26
|
+
const d = Math.floor(h / 24);
|
|
27
|
+
const rh = h - d * 24;
|
|
28
|
+
return `${d}d ${rh}h`;
|
|
29
|
+
}
|
|
30
|
+
if (h > 0) return `${h}h ${m}m`;
|
|
31
|
+
return `${m}m`;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
function Bar({ label, limit }: { label: string; limit: RateLimit | null | undefined }) {
|
|
35
|
+
if (!limit || limit.utilization == null) return null;
|
|
36
|
+
const pct = Math.min(100, Math.max(0, limit.utilization));
|
|
37
|
+
const color = utilizationColor(pct);
|
|
38
|
+
const reset = formatReset(limit.resets_at);
|
|
39
|
+
return (
|
|
40
|
+
<div
|
|
41
|
+
className="flex items-center gap-1.5 text-[10px]"
|
|
42
|
+
title={reset ? `${label}: ${Math.floor(pct)}% used · resets in ${reset}` : `${label}: ${Math.floor(pct)}% used`}
|
|
43
|
+
>
|
|
44
|
+
<span className="text-zinc-400 font-medium">{label}</span>
|
|
45
|
+
<div className="w-12 h-1 bg-zinc-800 rounded-full overflow-hidden">
|
|
46
|
+
<div
|
|
47
|
+
className="h-full transition-all"
|
|
48
|
+
style={{ width: `${pct}%`, backgroundColor: color }}
|
|
49
|
+
/>
|
|
50
|
+
</div>
|
|
51
|
+
<span className="text-zinc-500 tabular-nums w-7 text-right">{Math.floor(pct)}%</span>
|
|
52
|
+
</div>
|
|
53
|
+
);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export function ClaudeUsageStrip({ enabled }: Props) {
|
|
57
|
+
const response = useClaudeUsage(enabled);
|
|
58
|
+
const [expanded, setExpanded] = useState(false);
|
|
59
|
+
const popoverRef = useRef<HTMLDivElement>(null);
|
|
60
|
+
|
|
61
|
+
useEffect(() => {
|
|
62
|
+
if (!expanded) return;
|
|
63
|
+
function handleClick(e: MouseEvent) {
|
|
64
|
+
if (popoverRef.current && !popoverRef.current.contains(e.target as Node)) {
|
|
65
|
+
setExpanded(false);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
document.addEventListener('mousedown', handleClick);
|
|
69
|
+
return () => document.removeEventListener('mousedown', handleClick);
|
|
70
|
+
}, [expanded]);
|
|
71
|
+
|
|
72
|
+
if (!enabled || !response) return null;
|
|
73
|
+
|
|
74
|
+
if (response.status === 'unauthenticated' || response.status === 'expired') {
|
|
75
|
+
return (
|
|
76
|
+
<div
|
|
77
|
+
className="flex items-center gap-1.5 px-2 py-1 text-[10px] text-zinc-500 border border-zinc-800 rounded-md"
|
|
78
|
+
title={response.status === 'expired' ? 'OAuth token expired — run any Claude Code command to refresh' : 'No Claude.ai credentials found'}
|
|
79
|
+
>
|
|
80
|
+
<LogIn className="w-3 h-3" />
|
|
81
|
+
sign in via Claude Code
|
|
82
|
+
</div>
|
|
83
|
+
);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
if (response.status === 'upstream_error') {
|
|
87
|
+
return null; // Silent — per spec.
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
const { data } = response;
|
|
91
|
+
const extra = data.extra_usage;
|
|
92
|
+
const hasOverage = !!(extra?.is_enabled && extra?.used_credits && extra.used_credits > 0);
|
|
93
|
+
|
|
94
|
+
return (
|
|
95
|
+
<div className="relative">
|
|
96
|
+
<button
|
|
97
|
+
onClick={() => setExpanded(v => !v)}
|
|
98
|
+
className="flex items-center gap-2.5 px-2.5 py-1 border border-zinc-800 rounded-md hover:border-zinc-700 transition-colors"
|
|
99
|
+
title="Click for full usage detail"
|
|
100
|
+
>
|
|
101
|
+
<Zap className="w-3 h-3 text-amber-400" />
|
|
102
|
+
<Bar label="5h" limit={data.five_hour} />
|
|
103
|
+
<Bar label="7d" limit={data.seven_day} />
|
|
104
|
+
<Bar label="Opus" limit={data.seven_day_opus} />
|
|
105
|
+
<Bar label="Sonnet" limit={data.seven_day_sonnet} />
|
|
106
|
+
{hasOverage && extra?.used_credits != null && (
|
|
107
|
+
<span className="text-[10px] text-amber-400 border-l border-zinc-800 pl-2">
|
|
108
|
+
+${extra.used_credits.toFixed(2)} overage
|
|
109
|
+
</span>
|
|
110
|
+
)}
|
|
111
|
+
</button>
|
|
112
|
+
|
|
113
|
+
{expanded && (
|
|
114
|
+
<div
|
|
115
|
+
ref={popoverRef}
|
|
116
|
+
className="absolute top-full right-0 mt-1.5 z-50 w-80 p-3 bg-zinc-900 border border-zinc-700 rounded-md shadow-xl"
|
|
117
|
+
>
|
|
118
|
+
<div className="text-[10px] uppercase tracking-wider text-zinc-500 font-medium mb-2">
|
|
119
|
+
Plan Usage
|
|
120
|
+
</div>
|
|
121
|
+
<div className="space-y-2">
|
|
122
|
+
<ExpandedRow label="5-hour window" limit={data.five_hour} />
|
|
123
|
+
<ExpandedRow label="7-day (overall)" limit={data.seven_day} />
|
|
124
|
+
<ExpandedRow label="7-day · Opus" limit={data.seven_day_opus} />
|
|
125
|
+
<ExpandedRow label="7-day · Sonnet" limit={data.seven_day_sonnet} />
|
|
126
|
+
<ExpandedRow label="7-day · OAuth apps" limit={data.seven_day_oauth_apps} />
|
|
127
|
+
</div>
|
|
128
|
+
{extra?.is_enabled && (
|
|
129
|
+
<div className="mt-3 pt-3 border-t border-zinc-800">
|
|
130
|
+
<div className="text-[10px] uppercase tracking-wider text-zinc-500 font-medium mb-1.5">
|
|
131
|
+
Overage credits
|
|
132
|
+
</div>
|
|
133
|
+
<div className="text-xs text-zinc-300">
|
|
134
|
+
{extra.used_credits != null ? `$${extra.used_credits.toFixed(2)}` : '—'}
|
|
135
|
+
{extra.monthly_limit != null && (
|
|
136
|
+
<span className="text-zinc-500"> / ${extra.monthly_limit.toFixed(2)} monthly</span>
|
|
137
|
+
)}
|
|
138
|
+
</div>
|
|
139
|
+
</div>
|
|
140
|
+
)}
|
|
141
|
+
</div>
|
|
142
|
+
)}
|
|
143
|
+
</div>
|
|
144
|
+
);
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
function ExpandedRow({ label, limit }: { label: string; limit: RateLimit | null | undefined }) {
|
|
148
|
+
if (!limit || limit.utilization == null) {
|
|
149
|
+
return (
|
|
150
|
+
<div className="flex items-center justify-between text-xs">
|
|
151
|
+
<span className="text-zinc-400">{label}</span>
|
|
152
|
+
<span className="text-zinc-600">—</span>
|
|
153
|
+
</div>
|
|
154
|
+
);
|
|
155
|
+
}
|
|
156
|
+
const pct = Math.min(100, Math.max(0, limit.utilization));
|
|
157
|
+
const color = utilizationColor(pct);
|
|
158
|
+
const reset = formatReset(limit.resets_at);
|
|
159
|
+
return (
|
|
160
|
+
<div>
|
|
161
|
+
<div className="flex items-center justify-between text-xs mb-1">
|
|
162
|
+
<span className="text-zinc-300">{label}</span>
|
|
163
|
+
<span className="text-zinc-500 tabular-nums">
|
|
164
|
+
{Math.floor(pct)}%{reset && <span className="ml-1.5 text-zinc-600">· {reset}</span>}
|
|
165
|
+
</span>
|
|
166
|
+
</div>
|
|
167
|
+
<div className="h-1.5 bg-zinc-800 rounded-full overflow-hidden">
|
|
168
|
+
<div
|
|
169
|
+
className="h-full transition-all"
|
|
170
|
+
style={{ width: `${pct}%`, backgroundColor: color }}
|
|
171
|
+
/>
|
|
172
|
+
</div>
|
|
173
|
+
</div>
|
|
174
|
+
);
|
|
175
|
+
}
|