@jlongo78/agent-spaces 0.9.9 → 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/build-manifest.json +2 -2
- 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.html +1 -1
- package/.next/standalone/.next/server/app/_not-found.rsc +1 -1
- package/.next/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +1 -1
- 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 +1 -1
- 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 +1 -1
- package/.next/standalone/.next/server/app/admin/analytics.html +1 -1
- package/.next/standalone/.next/server/app/admin/analytics.rsc +1 -1
- package/.next/standalone/.next/server/app/admin/analytics.segments/!KGRlc2t0b3Ap/admin/analytics/__PAGE__.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/admin/analytics.segments/!KGRlc2t0b3Ap/admin/analytics.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/admin/analytics.segments/!KGRlc2t0b3Ap/admin.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/admin/analytics.segments/!KGRlc2t0b3Ap.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/admin/analytics.segments/_full.segment.rsc +1 -1
- 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 +1 -1
- package/.next/standalone/.next/server/app/admin/analytics.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/admin/users.html +1 -1
- package/.next/standalone/.next/server/app/admin/users.rsc +1 -1
- 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 +1 -1
- 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 +1 -1
- package/.next/standalone/.next/server/app/admin/users.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/analytics.html +1 -1
- package/.next/standalone/.next/server/app/analytics.rsc +1 -1
- 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 +1 -1
- package/.next/standalone/.next/server/app/analytics.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/analytics.segments/_index.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/analytics.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/api/chat/route.js +1 -1
- package/.next/standalone/.next/server/app/api/chat/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/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/cortex.html +1 -1
- package/.next/standalone/.next/server/app/cortex.rsc +1 -1
- 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 +1 -1
- package/.next/standalone/.next/server/app/cortex.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/cortex.segments/_index.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/cortex.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/login.html +1 -1
- package/.next/standalone/.next/server/app/login.rsc +1 -1
- package/.next/standalone/.next/server/app/login.segments/_full.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/login.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/login.segments/_index.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/login.segments/_tree.segment.rsc +1 -1
- 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/projects.html +1 -1
- package/.next/standalone/.next/server/app/m/projects.rsc +1 -1
- package/.next/standalone/.next/server/app/m/projects.segments/_full.segment.rsc +1 -1
- 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 +1 -1
- package/.next/standalone/.next/server/app/m/projects.segments/_tree.segment.rsc +1 -1
- 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.html +1 -1
- package/.next/standalone/.next/server/app/m/sessions.rsc +1 -1
- package/.next/standalone/.next/server/app/m/sessions.segments/_full.segment.rsc +1 -1
- 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 +1 -1
- package/.next/standalone/.next/server/app/m/sessions.segments/_tree.segment.rsc +1 -1
- 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.html +1 -1
- package/.next/standalone/.next/server/app/m/settings.rsc +1 -1
- package/.next/standalone/.next/server/app/m/settings.segments/_full.segment.rsc +1 -1
- 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 +1 -1
- package/.next/standalone/.next/server/app/m/settings.segments/_tree.segment.rsc +1 -1
- 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.html +1 -1
- package/.next/standalone/.next/server/app/m/terminal.rsc +1 -1
- package/.next/standalone/.next/server/app/m/terminal.segments/_full.segment.rsc +1 -1
- 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 +1 -1
- package/.next/standalone/.next/server/app/m/terminal.segments/_tree.segment.rsc +1 -1
- 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 +1 -1
- package/.next/standalone/.next/server/app/m.segments/_full.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/m.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/m.segments/_index.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/m.segments/_tree.segment.rsc +1 -1
- 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 +1 -1
- 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 +1 -1
- package/.next/standalone/.next/server/app/network.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/network.segments/_index.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/network.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/projects.html +1 -1
- package/.next/standalone/.next/server/app/projects.rsc +1 -1
- 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 +1 -1
- package/.next/standalone/.next/server/app/projects.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/projects.segments/_index.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/projects.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/sessions.html +1 -1
- package/.next/standalone/.next/server/app/sessions.rsc +1 -1
- 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 +1 -1
- package/.next/standalone/.next/server/app/sessions.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/sessions.segments/_index.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/sessions.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/settings.html +1 -1
- package/.next/standalone/.next/server/app/settings.rsc +1 -1
- package/.next/standalone/.next/server/app/settings.segments/!KGRlc2t0b3Ap/settings/__PAGE__.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/settings.segments/!KGRlc2t0b3Ap/settings.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/settings.segments/!KGRlc2t0b3Ap.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/settings.segments/_full.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/settings.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/settings.segments/_index.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/settings.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/terminal.html +1 -1
- package/.next/standalone/.next/server/app/terminal.rsc +1 -1
- package/.next/standalone/.next/server/app/terminal.segments/!KGRlc2t0b3Ap/terminal/__PAGE__.segment.rsc +1 -1
- 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 +1 -1
- package/.next/standalone/.next/server/app/terminal.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/terminal.segments/_index.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/terminal.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/vr.html +1 -1
- package/.next/standalone/.next/server/app/vr.rsc +1 -1
- package/.next/standalone/.next/server/app/vr.segments/_full.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/vr.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/vr.segments/_index.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/vr.segments/_tree.segment.rsc +1 -1
- 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 +1 -1
- 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 +1 -1
- package/.next/standalone/.next/server/app/workspaces.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/workspaces.segments/_index.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/workspaces.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__00e90fc6._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__01ab8675._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__03974f05._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__046c9b91._.js +3 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__04ae6bf0._.js +1 -1
- 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 +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0facd39e._.js +1 -1
- 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 +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__11f155f1._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__17a3b966._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__17d3a2b2._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__1a86c055._.js +2 -2
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__e2a996e5._.js → [root-of-the-server]__1fe0f452._.js} +4 -4
- 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 +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__2a3f866b._.js +1 -1
- 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 +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__35457394._.js +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__35de78e6._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__3685ffcb._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__38954988._.js +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__3a32b624._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__426ad936._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__4985c034._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__5c6ce9ed._.js +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__5cebe58a._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__5d5e4789._.js +1 -1
- 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 +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__698c6f01._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__6c64af29._.js +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__73aed9f5._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__79b6a9bb._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__7db704c6._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__812ca02b._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__821f50fa._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__8716b86e._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__884ef754._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__88cdbd68._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__89d9aba9._.js +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__8c2e1260._.js +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__8d536cb5._.js +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__8df8c5d1._.js +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__8f2ccc41._.js +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__95c9d682._.js +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__9e5d7774._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__9edcff87._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__a049dfc2._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__a5b4bb9a._.js +3 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__a83262a1._.js +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__a9cd1240._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__a9d7f822._.js +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__ad08c221._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__ad585f2f._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__afcb8f7d._.js +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__bc250d43._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__bce2a6e7._.js +1 -1
- 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 +1 -1
- 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 +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__d501fa9b._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__d59c6c15._.js +3 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__d5c1db32._.js +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__dba60c86._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__de14b9ae._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__e10643d1._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__e3477417._.js +1 -1
- 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 +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__e54925af._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__e8cbeaca._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__e8edc5b0._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__eab4d83b._.js +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__f056fd83._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__f0e99572._.js +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__fe1e16d0._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__ff9cd277._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__ffaea2ce._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__66aca5d4._.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 +1 -1
- package/.next/standalone/.next/server/pages/404.html +1 -1
- package/.next/standalone/.next/server/pages/500.html +2 -2
- 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/package-lock.json +2 -2
- package/.next/standalone/package.json +2 -2
- package/.next/standalone/src/app/api/chat/route.ts +56 -53
- package/.next/standalone/src/app/api/sessions/[id]/chat/route.ts +2 -1
- 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/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]__ead29015._.js +0 -13
- package/.next/standalone/.spaces/cortex-context.md +0 -51
- package/.next/standalone/cortex-hook-debug.log +0 -118
- package/.next/standalone/docs/plans/2026-03-02-security-audit.md +0 -229
- /package/.next/standalone/.next/static/{bAQs2gDlFrq3e8w9ni9tr → HNrWymrkgOP9Z4WIaYeOj}/_buildManifest.js +0 -0
- /package/.next/standalone/.next/static/{bAQs2gDlFrq3e8w9ni9tr → HNrWymrkgOP9Z4WIaYeOj}/_clientMiddlewareManifest.json +0 -0
- /package/.next/standalone/.next/static/{bAQs2gDlFrq3e8w9ni9tr → HNrWymrkgOP9Z4WIaYeOj}/_ssgManifest.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><!--
|
|
1
|
+
<!DOCTYPE html><!--HNrWymrkgOP9Z4WIaYeOj--><html lang="en" class="dark"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/><link rel="stylesheet" href="/_next/static/chunks/14216197f9dcbe5b.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/d2947a224b80c689.js"/><script src="/_next/static/chunks/7e363d6c9f74e9fb.js" async=""></script><script src="/_next/static/chunks/4fa395d360c87cc3.js" async=""></script><script src="/_next/static/chunks/645382108aacab6b.js" async=""></script><script src="/_next/static/chunks/797fcb0710da3be2.js" async=""></script><script src="/_next/static/chunks/turbopack-ac12088c22eb6593.js" async=""></script><script src="/_next/static/chunks/3698497a4057fe15.js" async=""></script><script src="/_next/static/chunks/54e9611ab9745d00.js" async=""></script><script src="/_next/static/chunks/d96012bcfc98706a.js" async=""></script><script src="/_next/static/chunks/73e3194f06db260e.js" async=""></script><meta name="robots" content="noindex"/><meta name="next-size-adjust" content=""/><title>404: This page could not be found.</title><title>Spaces</title><meta name="description" content="Agent workspace manager for Claude, Codex, Gemini, and more"/><link rel="icon" href="/icon.png"/><script src="/_next/static/chunks/a6dad97d9634a72d.js" noModule=""></script></head><body class="geistsans_d5a4f12f-module__Ur3q_a__variable geistmono_157ca88a-module__iaM1Ya__variable antialiased bg-zinc-950 text-zinc-100"><div hidden=""><!--$--><!--/$--></div><div style="font-family:system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:49px;margin:0">This page could not be found.</h2></div></div></div><!--$--><!--/$--><script src="/_next/static/chunks/d2947a224b80c689.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[112524,[\"/_next/static/chunks/3698497a4057fe15.js\",\"/_next/static/chunks/54e9611ab9745d00.js\"],\"Providers\"]\n3:I[339756,[\"/_next/static/chunks/d96012bcfc98706a.js\",\"/_next/static/chunks/73e3194f06db260e.js\"],\"default\"]\n4:I[837457,[\"/_next/static/chunks/d96012bcfc98706a.js\",\"/_next/static/chunks/73e3194f06db260e.js\"],\"default\"]\n5:I[897367,[\"/_next/static/chunks/d96012bcfc98706a.js\",\"/_next/static/chunks/73e3194f06db260e.js\"],\"OutletBoundary\"]\n6:\"$Sreact.suspense\"\n8:I[897367,[\"/_next/static/chunks/d96012bcfc98706a.js\",\"/_next/static/chunks/73e3194f06db260e.js\"],\"ViewportBoundary\"]\na:I[897367,[\"/_next/static/chunks/d96012bcfc98706a.js\",\"/_next/static/chunks/73e3194f06db260e.js\"],\"MetadataBoundary\"]\nc:I[168027,[\"/_next/static/chunks/d96012bcfc98706a.js\",\"/_next/static/chunks/73e3194f06db260e.js\"],\"default\"]\n:HL[\"/_next/static/chunks/14216197f9dcbe5b.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"b\":\"HNrWymrkgOP9Z4WIaYeOj\",\"c\":[\"\",\"_not-found\",\"\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",true],[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/chunks/14216197f9dcbe5b.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-0\",{\"src\":\"/_next/static/chunks/3698497a4057fe15.js\",\"async\":true,\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-1\",{\"src\":\"/_next/static/chunks/54e9611ab9745d00.js\",\"async\":true,\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"className\":\"dark\",\"suppressHydrationWarning\":true,\"children\":[\"$\",\"body\",null,{\"className\":\"geistsans_d5a4f12f-module__Ur3q_a__variable geistmono_157ca88a-module__iaM1Ya__variable antialiased bg-zinc-950 text-zinc-100\",\"suppressHydrationWarning\":true,\"children\":[\"$\",\"$L2\",null,{\"children\":[\"$\",\"$L3\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L4\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":404}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],[]],\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]}]}]}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L3\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L4\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:props:children:props:children:props:notFound:0:1:props:style\",\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":\"$0:f:0:1:0:props:children:1:props:children:props:children:props:children:props:notFound:0:1:props:children:props:children:1:props:style\",\"children\":404}],[\"$\",\"div\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:props:children:props:children:props:notFound:0:1:props:children:props:children:2:props:style\",\"children\":[\"$\",\"h2\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:props:children:props:children:props:notFound:0:1:props:children:props:children:2:props:children:props:style\",\"children\":\"This page could not be found.\"}]}]]}]}]],null,[\"$\",\"$L5\",null,{\"children\":[\"$\",\"$6\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@7\"}]}]]}],{},null,false,false]},null,false,false]},null,false,false],[\"$\",\"$1\",\"h\",{\"children\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],[\"$\",\"$L8\",null,{\"children\":\"$L9\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$La\",null,{\"children\":[\"$\",\"$6\",null,{\"name\":\"Next.Metadata\",\"children\":\"$Lb\"}]}]}],[\"$\",\"meta\",null,{\"name\":\"next-size-adjust\",\"content\":\"\"}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$c\",\"$undefined\"],\"S\":true}\n"])</script><script>self.__next_f.push([1,"9:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1, maximum-scale=1\"}]]\n"])</script><script>self.__next_f.push([1,"d:I[27201,[\"/_next/static/chunks/d96012bcfc98706a.js\",\"/_next/static/chunks/73e3194f06db260e.js\"],\"IconMark\"]\n7:null\nb:[[\"$\",\"title\",\"0\",{\"children\":\"Spaces\"}],[\"$\",\"meta\",\"1\",{\"name\":\"description\",\"content\":\"Agent workspace manager for Claude, Codex, Gemini, and more\"}],[\"$\",\"link\",\"2\",{\"rel\":\"icon\",\"href\":\"/icon.png\"}],[\"$\",\"$Ld\",\"3\",{}]]\n"])</script></body></html>
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
<!DOCTYPE html><!--
|
|
2
|
-
@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding-right:23px;font-size:24px;font-weight:500;vertical-align:top">500</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:28px">Internal Server Error.</h2></div></div></div><!--$--><!--/$--><script src="/_next/static/chunks/d2947a224b80c689.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[339756,[\"/_next/static/chunks/d96012bcfc98706a.js\",\"/_next/static/chunks/73e3194f06db260e.js\"],\"default\"]\n3:I[837457,[\"/_next/static/chunks/d96012bcfc98706a.js\",\"/_next/static/chunks/73e3194f06db260e.js\"],\"default\"]\n4:I[897367,[\"/_next/static/chunks/d96012bcfc98706a.js\",\"/_next/static/chunks/73e3194f06db260e.js\"],\"OutletBoundary\"]\n5:\"$Sreact.suspense\"\n7:I[897367,[\"/_next/static/chunks/d96012bcfc98706a.js\",\"/_next/static/chunks/73e3194f06db260e.js\"],\"ViewportBoundary\"]\n9:I[897367,[\"/_next/static/chunks/d96012bcfc98706a.js\",\"/_next/static/chunks/73e3194f06db260e.js\"],\"MetadataBoundary\"]\nb:I[168027,[\"/_next/static/chunks/d96012bcfc98706a.js\",\"/_next/static/chunks/73e3194f06db260e.js\"],\"default\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"b\":\"
|
|
1
|
+
<!DOCTYPE html><!--HNrWymrkgOP9Z4WIaYeOj--><html id="__next_error__"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/d2947a224b80c689.js"/><script src="/_next/static/chunks/7e363d6c9f74e9fb.js" async=""></script><script src="/_next/static/chunks/4fa395d360c87cc3.js" async=""></script><script src="/_next/static/chunks/645382108aacab6b.js" async=""></script><script src="/_next/static/chunks/797fcb0710da3be2.js" async=""></script><script src="/_next/static/chunks/turbopack-ac12088c22eb6593.js" async=""></script><script src="/_next/static/chunks/d96012bcfc98706a.js" async=""></script><script src="/_next/static/chunks/73e3194f06db260e.js" async=""></script><meta name="next-size-adjust" content=""/><title>500: Internal Server Error.</title><script src="/_next/static/chunks/a6dad97d9634a72d.js" noModule=""></script></head><body><div hidden=""><!--$--><!--/$--></div><div style="font-family:system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div style="line-height:48px"><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}
|
|
2
|
+
@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding-right:23px;font-size:24px;font-weight:500;vertical-align:top">500</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:28px">Internal Server Error.</h2></div></div></div><!--$--><!--/$--><script src="/_next/static/chunks/d2947a224b80c689.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[339756,[\"/_next/static/chunks/d96012bcfc98706a.js\",\"/_next/static/chunks/73e3194f06db260e.js\"],\"default\"]\n3:I[837457,[\"/_next/static/chunks/d96012bcfc98706a.js\",\"/_next/static/chunks/73e3194f06db260e.js\"],\"default\"]\n4:I[897367,[\"/_next/static/chunks/d96012bcfc98706a.js\",\"/_next/static/chunks/73e3194f06db260e.js\"],\"OutletBoundary\"]\n5:\"$Sreact.suspense\"\n7:I[897367,[\"/_next/static/chunks/d96012bcfc98706a.js\",\"/_next/static/chunks/73e3194f06db260e.js\"],\"ViewportBoundary\"]\n9:I[897367,[\"/_next/static/chunks/d96012bcfc98706a.js\",\"/_next/static/chunks/73e3194f06db260e.js\"],\"MetadataBoundary\"]\nb:I[168027,[\"/_next/static/chunks/d96012bcfc98706a.js\",\"/_next/static/chunks/73e3194f06db260e.js\"],\"default\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"b\":\"HNrWymrkgOP9Z4WIaYeOj\",\"c\":[\"\",\"_global-error\",\"\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"__PAGE__\",{}]}],[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[[\"$\",\"html\",null,{\"id\":\"__next_error__\",\"children\":[[\"$\",\"head\",null,{\"children\":[\"$\",\"title\",null,{\"children\":\"500: Internal Server Error.\"}]}],[\"$\",\"body\",null,{\"children\":[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"style\":{\"lineHeight\":\"48px\"},\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}\\n@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"paddingRight\":23,\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\"},\"children\":\"500\"}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"28px\"},\"children\":\"Internal Server Error.\"}]}]]}]}]}]]}],[[\"$\",\"script\",\"script-0\",{\"src\":\"/_next/static/chunks/d96012bcfc98706a.js\",\"async\":true,\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-1\",{\"src\":\"/_next/static/chunks/73e3194f06db260e.js\",\"async\":true,\"nonce\":\"$undefined\"}]],[\"$\",\"$L4\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@6\"}]}]]}],{},null,false,false]},null,false,false],[\"$\",\"$1\",\"h\",{\"children\":[null,[\"$\",\"$L7\",null,{\"children\":\"$L8\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$L9\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.Metadata\",\"children\":\"$La\"}]}]}],[\"$\",\"meta\",null,{\"name\":\"next-size-adjust\",\"content\":\"\"}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$b\",\"$undefined\"],\"S\":true}\n"])</script><script>self.__next_f.push([1,"8:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n"])</script><script>self.__next_f.push([1,"6:null\na:[]\n"])</script></body></html>
|
|
@@ -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() + "] " + msg + "\n");
|
|
14
|
+
} catch(e) {}
|
|
10
15
|
}
|
|
11
16
|
|
|
12
17
|
function readSpacesEnv() {
|
|
@@ -49,7 +54,7 @@ async function main() {
|
|
|
49
54
|
|
|
50
55
|
const query = encodeURIComponent(prompt);
|
|
51
56
|
const url = "http://localhost:" + port + "/api/cortex/context/?q=" + query + "&limit=5" + (wsId ? "&workspace_id=" + wsId : "");
|
|
52
|
-
log('Querying: ' +
|
|
57
|
+
log('Querying cortex (prompt length: ' + prompt.length + ', event: ' + eventName + ')');
|
|
53
58
|
|
|
54
59
|
try {
|
|
55
60
|
const body = await new Promise((resolve, reject) => {
|
|
@@ -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.
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jlongo78/agent-spaces",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.10",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@jlongo78/agent-spaces",
|
|
9
|
-
"version": "0.9.
|
|
9
|
+
"version": "0.9.10",
|
|
10
10
|
"license": "AGPL-3.0-only",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@dnd-kit/core": "^6.3.1",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jlongo78/agent-spaces",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.10",
|
|
4
4
|
"description": "Agent workspace manager for Claude, Codex, Gemini, and more",
|
|
5
5
|
"bin": {
|
|
6
6
|
"spaces": "./bin/spaces.js"
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"dev": "node bin/spaces-dev.js",
|
|
33
33
|
"build": "cross-env STANDALONE=1 next build && node -e \"const fs=require('fs');fs.cpSync('.next/static','.next/standalone/.next/static',{recursive:true});fs.cpSync('public','.next/standalone/public',{recursive:true})\" && node bin/fix-standalone-externals.js",
|
|
34
34
|
"postinstall": "node bin/spaces-postinstall.js || true",
|
|
35
|
-
"prepublishOnly": "npm run build",
|
|
35
|
+
"prepublishOnly": "npm run build && node bin/scrub-standalone.js",
|
|
36
36
|
"setup": "node bin/spaces-setup.js",
|
|
37
37
|
"setup-admin": "node bin/setup-admin.js",
|
|
38
38
|
"server:build": "next build",
|
|
@@ -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
|
}
|
|
@@ -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,32 @@
|
|
|
1
|
+
// Build a minimal, safe environment for child processes that execute user-controlled
|
|
2
|
+
// code (PTY shells, `claude` CLI, etc). The server's own env contains secrets —
|
|
3
|
+
// SPACES_SESSION_SECRET, GH_PAT, NPM_TOKEN, ANTHROPIC_API_KEY — and any of those
|
|
4
|
+
// leaking into a user PTY would let the user forge sessions or impersonate the
|
|
5
|
+
// server against upstream services.
|
|
6
|
+
|
|
7
|
+
const ALLOWED_ENV_VARS = new Set([
|
|
8
|
+
// Identity / shell basics
|
|
9
|
+
'HOME', 'USER', 'LOGNAME', 'SHELL', 'PATH', 'PWD', 'OLDPWD', 'HOSTNAME',
|
|
10
|
+
// Locale / time
|
|
11
|
+
'LANG', 'LC_ALL', 'LC_CTYPE', 'LC_MESSAGES', 'LC_COLLATE', 'LC_TIME',
|
|
12
|
+
'LC_NUMERIC', 'LC_MONETARY', 'TZ',
|
|
13
|
+
// XDG base dirs
|
|
14
|
+
'XDG_CONFIG_HOME', 'XDG_DATA_HOME', 'XDG_CACHE_HOME', 'XDG_RUNTIME_DIR',
|
|
15
|
+
'XDG_STATE_HOME',
|
|
16
|
+
// Terminal / display
|
|
17
|
+
'TERM', 'TERM_PROGRAM', 'TERM_PROGRAM_VERSION', 'COLORTERM', 'COLUMNS', 'LINES',
|
|
18
|
+
// Node / package manager tooling child tools may need
|
|
19
|
+
'NODE_ENV', 'NVM_DIR', 'NVM_BIN',
|
|
20
|
+
]);
|
|
21
|
+
|
|
22
|
+
export function buildSpawnEnv(extras: Record<string, string | undefined> = {}): NodeJS.ProcessEnv {
|
|
23
|
+
const env: Record<string, string> = {};
|
|
24
|
+
for (const key of ALLOWED_ENV_VARS) {
|
|
25
|
+
const v = process.env[key];
|
|
26
|
+
if (v !== undefined) env[key] = v;
|
|
27
|
+
}
|
|
28
|
+
for (const [k, v] of Object.entries(extras)) {
|
|
29
|
+
if (v !== undefined) env[k] = v;
|
|
30
|
+
}
|
|
31
|
+
return env as unknown as NodeJS.ProcessEnv;
|
|
32
|
+
}
|
|
@@ -3,6 +3,7 @@ import * as pty from 'node-pty';
|
|
|
3
3
|
import { IncomingMessage } from 'http';
|
|
4
4
|
import crypto from 'crypto';
|
|
5
5
|
import { AGENT_TYPES } from '../agents';
|
|
6
|
+
import { buildSpawnEnv } from '../spawn-env';
|
|
6
7
|
|
|
7
8
|
interface TermSession {
|
|
8
9
|
pty: pty.IPty;
|
|
@@ -83,9 +84,8 @@ export function startTerminalServer(port = 3458) {
|
|
|
83
84
|
const shell = isWindows ? 'cmd.exe' : (process.env.SHELL || '/bin/bash');
|
|
84
85
|
const agent = AGENT_TYPES[agentType];
|
|
85
86
|
|
|
86
|
-
//
|
|
87
|
-
const env =
|
|
88
|
-
delete env.CLAUDECODE;
|
|
87
|
+
// Build a minimal, non-secret-bearing env for the user-facing PTY.
|
|
88
|
+
const env = buildSpawnEnv() as Record<string, string>;
|
|
89
89
|
|
|
90
90
|
if (customModelId) {
|
|
91
91
|
const port = process.env.SPACES_PORT || '3457';
|
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
import { NextRequest, NextResponse } from 'next/server';
|
|
2
2
|
import { HAS_AUTH } from '@/lib/tier';
|
|
3
3
|
|
|
4
|
+
function timingSafeEqualStr(a: string, b: string): boolean {
|
|
5
|
+
const aBytes = new TextEncoder().encode(a);
|
|
6
|
+
const bBytes = new TextEncoder().encode(b);
|
|
7
|
+
if (aBytes.length !== bBytes.length) return false;
|
|
8
|
+
let result = 0;
|
|
9
|
+
for (let i = 0; i < aBytes.length; i++) result |= aBytes[i] ^ bBytes[i];
|
|
10
|
+
return result === 0;
|
|
11
|
+
}
|
|
12
|
+
|
|
4
13
|
async function verifyToken(token: string, secretHex: string): Promise<{ sub: string; role: string } | null> {
|
|
5
14
|
if (!token) return null;
|
|
6
15
|
const parts = token.split('.');
|
|
@@ -20,7 +29,7 @@ async function verifyToken(token: string, secretHex: string): Promise<{ sub: str
|
|
|
20
29
|
const expectedSig = btoa(String.fromCharCode(...new Uint8Array(sigBytes)))
|
|
21
30
|
.replace(/\+/g, '-').replace(/\//g, '_').replace(/=+$/, '');
|
|
22
31
|
|
|
23
|
-
if (expectedSig
|
|
32
|
+
if (!timingSafeEqualStr(expectedSig, sig)) return null;
|
|
24
33
|
|
|
25
34
|
try {
|
|
26
35
|
const payloadStr = atob(payloadB64.replace(/-/g, '+').replace(/_/g, '/'));
|
|
@@ -58,9 +67,17 @@ export async function middleware(request: NextRequest) {
|
|
|
58
67
|
return NextResponse.next();
|
|
59
68
|
}
|
|
60
69
|
|
|
61
|
-
// Federation API routes authenticate via Bearer token
|
|
62
|
-
|
|
63
|
-
|
|
70
|
+
// Federation API routes authenticate via Bearer token. Middleware can't validate
|
|
71
|
+
// the token against network.db in Edge runtime, so we only let through requests
|
|
72
|
+
// that carry a well-formed API-key bearer (shape: "spk_" + base36-ish). The route
|
|
73
|
+
// handler is still responsible for calling requireNetworkAuth() — this bypass is
|
|
74
|
+
// purely a shape check to reject arbitrary strings like "Bearer anything".
|
|
75
|
+
const authHeader = request.headers.get('authorization');
|
|
76
|
+
if (pathname.startsWith('/api/network/') && authHeader?.startsWith('Bearer ')) {
|
|
77
|
+
const bearer = authHeader.slice(7);
|
|
78
|
+
if (/^spk_[A-Za-z0-9_-]{8,}$/.test(bearer)) {
|
|
79
|
+
return NextResponse.next();
|
|
80
|
+
}
|
|
64
81
|
}
|
|
65
82
|
|
|
66
83
|
// Connection request/callback endpoints are unauthenticated (verified by token in body)
|
|
@@ -73,7 +90,8 @@ export async function middleware(request: NextRequest) {
|
|
|
73
90
|
|
|
74
91
|
// Internal API requests from MCP servers / agent processes / VR client (local network)
|
|
75
92
|
const internalToken = request.headers.get('x-spaces-internal') || request.nextUrl.searchParams.get('_internal');
|
|
76
|
-
|
|
93
|
+
const expectedInternalToken = (process.env.SPACES_SESSION_SECRET || '').slice(0, 16);
|
|
94
|
+
if (internalToken && expectedInternalToken && timingSafeEqualStr(internalToken, expectedInternalToken) &&
|
|
77
95
|
(request.headers.get('host')?.startsWith('localhost') || request.headers.get('host')?.startsWith('127.0.0.1') || request.headers.get('host')?.startsWith('192.168.'))) {
|
|
78
96
|
return NextResponse.next();
|
|
79
97
|
}
|