@jlongo78/agent-spaces 0.10.0-beta.2 → 0.10.0-beta.4

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.
Files changed (721) hide show
  1. package/.next/standalone/.next/BUILD_ID +1 -1
  2. package/.next/standalone/.next/build-manifest.json +2 -2
  3. package/.next/standalone/.next/server/app/(desktop)/admin/analytics/page_client-reference-manifest.js +1 -1
  4. package/.next/standalone/.next/server/app/(desktop)/admin/users/page_client-reference-manifest.js +1 -1
  5. package/.next/standalone/.next/server/app/(desktop)/analytics/page_client-reference-manifest.js +1 -1
  6. package/.next/standalone/.next/server/app/(desktop)/cortex/page_client-reference-manifest.js +1 -1
  7. package/.next/standalone/.next/server/app/(desktop)/network/page_client-reference-manifest.js +1 -1
  8. package/.next/standalone/.next/server/app/(desktop)/page_client-reference-manifest.js +1 -1
  9. package/.next/standalone/.next/server/app/(desktop)/projects/page_client-reference-manifest.js +1 -1
  10. package/.next/standalone/.next/server/app/(desktop)/sessions/[id]/page_client-reference-manifest.js +1 -1
  11. package/.next/standalone/.next/server/app/(desktop)/sessions/page_client-reference-manifest.js +1 -1
  12. package/.next/standalone/.next/server/app/(desktop)/settings/page_client-reference-manifest.js +1 -1
  13. package/.next/standalone/.next/server/app/(desktop)/terminal/page_client-reference-manifest.js +1 -1
  14. package/.next/standalone/.next/server/app/(desktop)/terminal/pane/[id]/page_client-reference-manifest.js +1 -1
  15. package/.next/standalone/.next/server/app/(desktop)/terminal/remote/[nodeId]/[workspaceId]/page_client-reference-manifest.js +1 -1
  16. package/.next/standalone/.next/server/app/(desktop)/workspaces/page_client-reference-manifest.js +1 -1
  17. package/.next/standalone/.next/server/app/_global-error.html +2 -2
  18. package/.next/standalone/.next/server/app/_global-error.rsc +1 -1
  19. package/.next/standalone/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  20. package/.next/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  21. package/.next/standalone/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  22. package/.next/standalone/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  23. package/.next/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  24. package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  25. package/.next/standalone/.next/server/app/_not-found.html +1 -1
  26. package/.next/standalone/.next/server/app/_not-found.rsc +2 -2
  27. package/.next/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +2 -2
  28. package/.next/standalone/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
  29. package/.next/standalone/.next/server/app/_not-found.segments/_index.segment.rsc +2 -2
  30. package/.next/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  31. package/.next/standalone/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  32. package/.next/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  33. package/.next/standalone/.next/server/app/admin/analytics.html +1 -1
  34. package/.next/standalone/.next/server/app/admin/analytics.rsc +2 -2
  35. package/.next/standalone/.next/server/app/admin/analytics.segments/!KGRlc2t0b3Ap/admin/analytics/__PAGE__.segment.rsc +1 -1
  36. package/.next/standalone/.next/server/app/admin/analytics.segments/!KGRlc2t0b3Ap/admin/analytics.segment.rsc +1 -1
  37. package/.next/standalone/.next/server/app/admin/analytics.segments/!KGRlc2t0b3Ap/admin.segment.rsc +1 -1
  38. package/.next/standalone/.next/server/app/admin/analytics.segments/!KGRlc2t0b3Ap.segment.rsc +1 -1
  39. package/.next/standalone/.next/server/app/admin/analytics.segments/_full.segment.rsc +2 -2
  40. package/.next/standalone/.next/server/app/admin/analytics.segments/_head.segment.rsc +1 -1
  41. package/.next/standalone/.next/server/app/admin/analytics.segments/_index.segment.rsc +2 -2
  42. package/.next/standalone/.next/server/app/admin/analytics.segments/_tree.segment.rsc +2 -2
  43. package/.next/standalone/.next/server/app/admin/users.html +1 -1
  44. package/.next/standalone/.next/server/app/admin/users.rsc +2 -2
  45. package/.next/standalone/.next/server/app/admin/users.segments/!KGRlc2t0b3Ap/admin/users/__PAGE__.segment.rsc +1 -1
  46. package/.next/standalone/.next/server/app/admin/users.segments/!KGRlc2t0b3Ap/admin/users.segment.rsc +1 -1
  47. package/.next/standalone/.next/server/app/admin/users.segments/!KGRlc2t0b3Ap/admin.segment.rsc +1 -1
  48. package/.next/standalone/.next/server/app/admin/users.segments/!KGRlc2t0b3Ap.segment.rsc +1 -1
  49. package/.next/standalone/.next/server/app/admin/users.segments/_full.segment.rsc +2 -2
  50. package/.next/standalone/.next/server/app/admin/users.segments/_head.segment.rsc +1 -1
  51. package/.next/standalone/.next/server/app/admin/users.segments/_index.segment.rsc +2 -2
  52. package/.next/standalone/.next/server/app/admin/users.segments/_tree.segment.rsc +2 -2
  53. package/.next/standalone/.next/server/app/analytics.html +1 -1
  54. package/.next/standalone/.next/server/app/analytics.rsc +2 -2
  55. package/.next/standalone/.next/server/app/analytics.segments/!KGRlc2t0b3Ap/analytics/__PAGE__.segment.rsc +1 -1
  56. package/.next/standalone/.next/server/app/analytics.segments/!KGRlc2t0b3Ap/analytics.segment.rsc +1 -1
  57. package/.next/standalone/.next/server/app/analytics.segments/!KGRlc2t0b3Ap.segment.rsc +1 -1
  58. package/.next/standalone/.next/server/app/analytics.segments/_full.segment.rsc +2 -2
  59. package/.next/standalone/.next/server/app/analytics.segments/_head.segment.rsc +1 -1
  60. package/.next/standalone/.next/server/app/analytics.segments/_index.segment.rsc +2 -2
  61. package/.next/standalone/.next/server/app/analytics.segments/_tree.segment.rsc +2 -2
  62. package/.next/standalone/.next/server/app/api/admin/analytics/route.js +4 -2
  63. package/.next/standalone/.next/server/app/api/admin/analytics/route.js.nft.json +1 -1
  64. package/.next/standalone/.next/server/app/api/admin/users/[id]/route.js +4 -2
  65. package/.next/standalone/.next/server/app/api/admin/users/[id]/route.js.nft.json +1 -1
  66. package/.next/standalone/.next/server/app/api/admin/users/route.js +4 -2
  67. package/.next/standalone/.next/server/app/api/admin/users/route.js.nft.json +1 -1
  68. package/.next/standalone/.next/server/app/api/analytics/overview/route.js +5 -4
  69. package/.next/standalone/.next/server/app/api/analytics/overview/route.js.nft.json +1 -1
  70. package/.next/standalone/.next/server/app/api/auth/login/route.js +3 -2
  71. package/.next/standalone/.next/server/app/api/auth/login/route.js.nft.json +1 -1
  72. package/.next/standalone/.next/server/app/api/auth/logout/route.js +2 -2
  73. package/.next/standalone/.next/server/app/api/auth/logout/route.js.nft.json +1 -1
  74. package/.next/standalone/.next/server/app/api/auth/me/route.js +3 -2
  75. package/.next/standalone/.next/server/app/api/auth/me/route.js.nft.json +1 -1
  76. package/.next/standalone/.next/server/app/api/auth/totp/setup/route.js +2 -2
  77. package/.next/standalone/.next/server/app/api/auth/totp/setup/route.js.nft.json +1 -1
  78. package/.next/standalone/.next/server/app/api/auth/totp/status/route.js +2 -2
  79. package/.next/standalone/.next/server/app/api/auth/totp/status/route.js.nft.json +1 -1
  80. package/.next/standalone/.next/server/app/api/auth/totp/verify/route.js +3 -2
  81. package/.next/standalone/.next/server/app/api/auth/totp/verify/route.js.nft.json +1 -1
  82. package/.next/standalone/.next/server/app/api/benchmark/lobes/route.js +4 -3
  83. package/.next/standalone/.next/server/app/api/benchmark/lobes/route.js.nft.json +1 -1
  84. package/.next/standalone/.next/server/app/api/benchmark/run/route.js +4 -3
  85. package/.next/standalone/.next/server/app/api/benchmark/run/route.js.nft.json +1 -1
  86. package/.next/standalone/.next/server/app/api/benchmark/runs/[id]/route.js +4 -3
  87. package/.next/standalone/.next/server/app/api/benchmark/runs/[id]/route.js.nft.json +1 -1
  88. package/.next/standalone/.next/server/app/api/benchmark/runs/route.js +4 -3
  89. package/.next/standalone/.next/server/app/api/benchmark/runs/route.js.nft.json +1 -1
  90. package/.next/standalone/.next/server/app/api/benchmark/status/route.js +4 -3
  91. package/.next/standalone/.next/server/app/api/benchmark/status/route.js.nft.json +1 -1
  92. package/.next/standalone/.next/server/app/api/bulk/route.js +5 -4
  93. package/.next/standalone/.next/server/app/api/bulk/route.js.nft.json +1 -1
  94. package/.next/standalone/.next/server/app/api/chat/route.js +4 -2
  95. package/.next/standalone/.next/server/app/api/chat/route.js.nft.json +1 -1
  96. package/.next/standalone/.next/server/app/api/claude/usage/route.js +5 -4
  97. package/.next/standalone/.next/server/app/api/claude/usage/route.js.nft.json +1 -1
  98. package/.next/standalone/.next/server/app/api/config/route.js +3 -3
  99. package/.next/standalone/.next/server/app/api/config/route.js.nft.json +1 -1
  100. package/.next/standalone/.next/server/app/api/cortex/context/route.js +4 -3
  101. package/.next/standalone/.next/server/app/api/cortex/context/route.js.nft.json +1 -1
  102. package/.next/standalone/.next/server/app/api/cortex/curation/assess/route.js +4 -3
  103. package/.next/standalone/.next/server/app/api/cortex/curation/assess/route.js.nft.json +1 -1
  104. package/.next/standalone/.next/server/app/api/cortex/curation/publish/route.js +4 -3
  105. package/.next/standalone/.next/server/app/api/cortex/curation/publish/route.js.nft.json +1 -1
  106. package/.next/standalone/.next/server/app/api/cortex/curation/refine/route.js +4 -3
  107. package/.next/standalone/.next/server/app/api/cortex/curation/refine/route.js.nft.json +1 -1
  108. package/.next/standalone/.next/server/app/api/cortex/curation/review/route.js +4 -3
  109. package/.next/standalone/.next/server/app/api/cortex/curation/review/route.js.nft.json +1 -1
  110. package/.next/standalone/.next/server/app/api/cortex/curation/seed/route.js +4 -3
  111. package/.next/standalone/.next/server/app/api/cortex/curation/seed/route.js.nft.json +1 -1
  112. package/.next/standalone/.next/server/app/api/cortex/export/route.js +4 -3
  113. package/.next/standalone/.next/server/app/api/cortex/export/route.js.nft.json +1 -1
  114. package/.next/standalone/.next/server/app/api/cortex/federation/pending/route.js +4 -3
  115. package/.next/standalone/.next/server/app/api/cortex/federation/pending/route.js.nft.json +1 -1
  116. package/.next/standalone/.next/server/app/api/cortex/federation/resolve/route.js +4 -3
  117. package/.next/standalone/.next/server/app/api/cortex/federation/resolve/route.js.nft.json +1 -1
  118. package/.next/standalone/.next/server/app/api/cortex/federation/search/route.js +4 -3
  119. package/.next/standalone/.next/server/app/api/cortex/federation/search/route.js.nft.json +1 -1
  120. package/.next/standalone/.next/server/app/api/cortex/federation/teach/route.js +4 -3
  121. package/.next/standalone/.next/server/app/api/cortex/federation/teach/route.js.nft.json +1 -1
  122. package/.next/standalone/.next/server/app/api/cortex/graph/edges/route.js +4 -3
  123. package/.next/standalone/.next/server/app/api/cortex/graph/edges/route.js.nft.json +1 -1
  124. package/.next/standalone/.next/server/app/api/cortex/graph/entities/[id]/route.js +4 -3
  125. package/.next/standalone/.next/server/app/api/cortex/graph/entities/[id]/route.js.nft.json +1 -1
  126. package/.next/standalone/.next/server/app/api/cortex/graph/entities/route.js +4 -3
  127. package/.next/standalone/.next/server/app/api/cortex/graph/entities/route.js.nft.json +1 -1
  128. package/.next/standalone/.next/server/app/api/cortex/graph/populate/route.js +4 -3
  129. package/.next/standalone/.next/server/app/api/cortex/graph/populate/route.js.nft.json +1 -1
  130. package/.next/standalone/.next/server/app/api/cortex/import/route.js +4 -3
  131. package/.next/standalone/.next/server/app/api/cortex/import/route.js.nft.json +1 -1
  132. package/.next/standalone/.next/server/app/api/cortex/import/status/route.js +4 -3
  133. package/.next/standalone/.next/server/app/api/cortex/import/status/route.js.nft.json +1 -1
  134. package/.next/standalone/.next/server/app/api/cortex/ingest/bootstrap/route.js +4 -3
  135. package/.next/standalone/.next/server/app/api/cortex/ingest/bootstrap/route.js.nft.json +1 -1
  136. package/.next/standalone/.next/server/app/api/cortex/ingest/status/route.js +4 -3
  137. package/.next/standalone/.next/server/app/api/cortex/ingest/status/route.js.nft.json +1 -1
  138. package/.next/standalone/.next/server/app/api/cortex/knowledge/[id]/route.js +4 -3
  139. package/.next/standalone/.next/server/app/api/cortex/knowledge/[id]/route.js.nft.json +1 -1
  140. package/.next/standalone/.next/server/app/api/cortex/knowledge/route.js +4 -3
  141. package/.next/standalone/.next/server/app/api/cortex/knowledge/route.js.nft.json +1 -1
  142. package/.next/standalone/.next/server/app/api/cortex/lobes/[id]/route.js +4 -3
  143. package/.next/standalone/.next/server/app/api/cortex/lobes/[id]/route.js.nft.json +1 -1
  144. package/.next/standalone/.next/server/app/api/cortex/lobes/route.js +4 -3
  145. package/.next/standalone/.next/server/app/api/cortex/lobes/route.js.nft.json +1 -1
  146. package/.next/standalone/.next/server/app/api/cortex/lobes/share/route.js +4 -3
  147. package/.next/standalone/.next/server/app/api/cortex/lobes/share/route.js.nft.json +1 -1
  148. package/.next/standalone/.next/server/app/api/cortex/marketplace/browse/route.js +3 -3
  149. package/.next/standalone/.next/server/app/api/cortex/marketplace/browse/route.js.nft.json +1 -1
  150. package/.next/standalone/.next/server/app/api/cortex/marketplace/preview/route.js +3 -3
  151. package/.next/standalone/.next/server/app/api/cortex/marketplace/preview/route.js.nft.json +1 -1
  152. package/.next/standalone/.next/server/app/api/cortex/mcp/call/route.js +4 -3
  153. package/.next/standalone/.next/server/app/api/cortex/mcp/call/route.js.nft.json +1 -1
  154. package/.next/standalone/.next/server/app/api/cortex/mcp/tools/route.js +4 -3
  155. package/.next/standalone/.next/server/app/api/cortex/mcp/tools/route.js.nft.json +1 -1
  156. package/.next/standalone/.next/server/app/api/cortex/search/route.js +4 -3
  157. package/.next/standalone/.next/server/app/api/cortex/search/route.js.nft.json +1 -1
  158. package/.next/standalone/.next/server/app/api/cortex/settings/route.js +4 -3
  159. package/.next/standalone/.next/server/app/api/cortex/settings/route.js.nft.json +1 -1
  160. package/.next/standalone/.next/server/app/api/cortex/status/route.js +4 -3
  161. package/.next/standalone/.next/server/app/api/cortex/status/route.js.nft.json +1 -1
  162. package/.next/standalone/.next/server/app/api/cortex/timeline/route.js +4 -3
  163. package/.next/standalone/.next/server/app/api/cortex/timeline/route.js.nft.json +1 -1
  164. package/.next/standalone/.next/server/app/api/cortex/usage/route.js +4 -3
  165. package/.next/standalone/.next/server/app/api/cortex/usage/route.js.nft.json +1 -1
  166. package/.next/standalone/.next/server/app/api/cortex/workspace/[id]/context/route.js +4 -3
  167. package/.next/standalone/.next/server/app/api/cortex/workspace/[id]/context/route.js.nft.json +1 -1
  168. package/.next/standalone/.next/server/app/api/events/route.js +5 -3
  169. package/.next/standalone/.next/server/app/api/events/route.js.nft.json +1 -1
  170. package/.next/standalone/.next/server/app/api/files/route.js +3 -2
  171. package/.next/standalone/.next/server/app/api/files/route.js.nft.json +1 -1
  172. package/.next/standalone/.next/server/app/api/folders/route.js +3 -3
  173. package/.next/standalone/.next/server/app/api/folders/route.js.nft.json +1 -1
  174. package/.next/standalone/.next/server/app/api/network/connect-callback/route.js +2 -2
  175. package/.next/standalone/.next/server/app/api/network/connect-callback/route.js.nft.json +1 -1
  176. package/.next/standalone/.next/server/app/api/network/connect-request/[id]/route.js +2 -2
  177. package/.next/standalone/.next/server/app/api/network/connect-request/[id]/route.js.nft.json +1 -1
  178. package/.next/standalone/.next/server/app/api/network/connect-request/route.js +2 -2
  179. package/.next/standalone/.next/server/app/api/network/connect-request/route.js.nft.json +1 -1
  180. package/.next/standalone/.next/server/app/api/network/discovered/route.js +2 -2
  181. package/.next/standalone/.next/server/app/api/network/discovered/route.js.nft.json +1 -1
  182. package/.next/standalone/.next/server/app/api/network/handshake/route.js +4 -3
  183. package/.next/standalone/.next/server/app/api/network/handshake/route.js.nft.json +1 -1
  184. package/.next/standalone/.next/server/app/api/network/health/route.js +2 -2
  185. package/.next/standalone/.next/server/app/api/network/health/route.js.nft.json +1 -1
  186. package/.next/standalone/.next/server/app/api/network/identity/route.js +2 -2
  187. package/.next/standalone/.next/server/app/api/network/identity/route.js.nft.json +1 -1
  188. package/.next/standalone/.next/server/app/api/network/keys/[id]/route.js +2 -2
  189. package/.next/standalone/.next/server/app/api/network/keys/[id]/route.js.nft.json +1 -1
  190. package/.next/standalone/.next/server/app/api/network/keys/route.js +2 -2
  191. package/.next/standalone/.next/server/app/api/network/keys/route.js.nft.json +1 -1
  192. package/.next/standalone/.next/server/app/api/network/nodes/[id]/route.js +2 -2
  193. package/.next/standalone/.next/server/app/api/network/nodes/[id]/route.js.nft.json +1 -1
  194. package/.next/standalone/.next/server/app/api/network/nodes/check/route.js +2 -2
  195. package/.next/standalone/.next/server/app/api/network/nodes/check/route.js.nft.json +1 -1
  196. package/.next/standalone/.next/server/app/api/network/nodes/route.js +2 -2
  197. package/.next/standalone/.next/server/app/api/network/nodes/route.js.nft.json +1 -1
  198. package/.next/standalone/.next/server/app/api/network/panes/[id]/route.js +6 -5
  199. package/.next/standalone/.next/server/app/api/network/panes/[id]/route.js.nft.json +1 -1
  200. package/.next/standalone/.next/server/app/api/network/panes/route.js +6 -5
  201. package/.next/standalone/.next/server/app/api/network/panes/route.js.nft.json +1 -1
  202. package/.next/standalone/.next/server/app/api/network/projects/route.js +6 -5
  203. package/.next/standalone/.next/server/app/api/network/projects/route.js.nft.json +1 -1
  204. package/.next/standalone/.next/server/app/api/network/proxy/[nodeId]/[...path]/route.js +2 -2
  205. package/.next/standalone/.next/server/app/api/network/proxy/[nodeId]/[...path]/route.js.nft.json +1 -1
  206. package/.next/standalone/.next/server/app/api/network/search/route.js +6 -5
  207. package/.next/standalone/.next/server/app/api/network/search/route.js.nft.json +1 -1
  208. package/.next/standalone/.next/server/app/api/network/sessions/[id]/messages/route.js +6 -5
  209. package/.next/standalone/.next/server/app/api/network/sessions/[id]/messages/route.js.nft.json +1 -1
  210. package/.next/standalone/.next/server/app/api/network/sessions/[id]/route.js +6 -5
  211. package/.next/standalone/.next/server/app/api/network/sessions/[id]/route.js.nft.json +1 -1
  212. package/.next/standalone/.next/server/app/api/network/sessions/route.js +6 -5
  213. package/.next/standalone/.next/server/app/api/network/sessions/route.js.nft.json +1 -1
  214. package/.next/standalone/.next/server/app/api/network/terminal/token/route.js +2 -2
  215. package/.next/standalone/.next/server/app/api/network/terminal/token/route.js.nft.json +1 -1
  216. package/.next/standalone/.next/server/app/api/network/workspaces/[id]/route.js +6 -5
  217. package/.next/standalone/.next/server/app/api/network/workspaces/[id]/route.js.nft.json +1 -1
  218. package/.next/standalone/.next/server/app/api/network/workspaces/route.js +6 -5
  219. package/.next/standalone/.next/server/app/api/network/workspaces/route.js.nft.json +1 -1
  220. package/.next/standalone/.next/server/app/api/panes/[id]/diff/route.js +5 -4
  221. package/.next/standalone/.next/server/app/api/panes/[id]/diff/route.js.nft.json +1 -1
  222. package/.next/standalone/.next/server/app/api/panes/[id]/route.js +5 -4
  223. package/.next/standalone/.next/server/app/api/panes/[id]/route.js.nft.json +1 -1
  224. package/.next/standalone/.next/server/app/api/panes/route.js +5 -4
  225. package/.next/standalone/.next/server/app/api/panes/route.js.nft.json +1 -1
  226. package/.next/standalone/.next/server/app/api/projects/route.js +5 -4
  227. package/.next/standalone/.next/server/app/api/projects/route.js.nft.json +1 -1
  228. package/.next/standalone/.next/server/app/api/proxy/models/[modelId]/[...path]/route.js +3 -3
  229. package/.next/standalone/.next/server/app/api/proxy/models/[modelId]/[...path]/route.js.nft.json +1 -1
  230. package/.next/standalone/.next/server/app/api/proxy/models/[modelId]/status/route.js +3 -3
  231. package/.next/standalone/.next/server/app/api/proxy/models/[modelId]/status/route.js.nft.json +1 -1
  232. package/.next/standalone/.next/server/app/api/search/route.js +6 -5
  233. package/.next/standalone/.next/server/app/api/search/route.js.nft.json +1 -1
  234. package/.next/standalone/.next/server/app/api/server-config/route.js +2 -2
  235. package/.next/standalone/.next/server/app/api/server-config/route.js.nft.json +1 -1
  236. package/.next/standalone/.next/server/app/api/sessions/[id]/chat/route.js +5 -3
  237. package/.next/standalone/.next/server/app/api/sessions/[id]/chat/route.js.nft.json +1 -1
  238. package/.next/standalone/.next/server/app/api/sessions/[id]/messages/route.js +5 -4
  239. package/.next/standalone/.next/server/app/api/sessions/[id]/messages/route.js.nft.json +1 -1
  240. package/.next/standalone/.next/server/app/api/sessions/[id]/route.js +5 -4
  241. package/.next/standalone/.next/server/app/api/sessions/[id]/route.js.nft.json +1 -1
  242. package/.next/standalone/.next/server/app/api/sessions/route.js +6 -5
  243. package/.next/standalone/.next/server/app/api/sessions/route.js.nft.json +1 -1
  244. package/.next/standalone/.next/server/app/api/sync/route.js +4 -3
  245. package/.next/standalone/.next/server/app/api/sync/route.js.nft.json +1 -1
  246. package/.next/standalone/.next/server/app/api/tags/route.js +5 -4
  247. package/.next/standalone/.next/server/app/api/tags/route.js.nft.json +1 -1
  248. package/.next/standalone/.next/server/app/api/tier/route.js +4 -3
  249. package/.next/standalone/.next/server/app/api/tier/route.js.nft.json +1 -1
  250. package/.next/standalone/.next/server/app/api/updates/route.js +2 -2
  251. package/.next/standalone/.next/server/app/api/updates/route.js.nft.json +1 -1
  252. package/.next/standalone/.next/server/app/api/whisper/config/route.js +2 -2
  253. package/.next/standalone/.next/server/app/api/whisper/config/route.js.nft.json +1 -1
  254. package/.next/standalone/.next/server/app/api/whisper/route.js +2 -2
  255. package/.next/standalone/.next/server/app/api/whisper/route.js.nft.json +1 -1
  256. package/.next/standalone/.next/server/app/api/wizard/chat/route.js +3 -3
  257. package/.next/standalone/.next/server/app/api/wizard/chat/route.js.nft.json +1 -1
  258. package/.next/standalone/.next/server/app/api/workspaces/[id]/context/[key]/route.js +5 -3
  259. package/.next/standalone/.next/server/app/api/workspaces/[id]/context/[key]/route.js.nft.json +1 -1
  260. package/.next/standalone/.next/server/app/api/workspaces/[id]/context/route.js +5 -3
  261. package/.next/standalone/.next/server/app/api/workspaces/[id]/context/route.js.nft.json +1 -1
  262. package/.next/standalone/.next/server/app/api/workspaces/[id]/messages/[msgId]/route.js +5 -3
  263. package/.next/standalone/.next/server/app/api/workspaces/[id]/messages/[msgId]/route.js.nft.json +1 -1
  264. package/.next/standalone/.next/server/app/api/workspaces/[id]/messages/route.js +5 -3
  265. package/.next/standalone/.next/server/app/api/workspaces/[id]/messages/route.js.nft.json +1 -1
  266. package/.next/standalone/.next/server/app/api/workspaces/[id]/route.js +5 -4
  267. package/.next/standalone/.next/server/app/api/workspaces/[id]/route.js.nft.json +1 -1
  268. package/.next/standalone/.next/server/app/api/workspaces/[id]/sessions/route.js +5 -4
  269. package/.next/standalone/.next/server/app/api/workspaces/[id]/sessions/route.js.nft.json +1 -1
  270. package/.next/standalone/.next/server/app/api/workspaces/[id]/todos/[todoId]/route.js +5 -4
  271. package/.next/standalone/.next/server/app/api/workspaces/[id]/todos/[todoId]/route.js.nft.json +1 -1
  272. package/.next/standalone/.next/server/app/api/workspaces/[id]/todos/route.js +5 -4
  273. package/.next/standalone/.next/server/app/api/workspaces/[id]/todos/route.js.nft.json +1 -1
  274. package/.next/standalone/.next/server/app/api/workspaces/route.js +6 -5
  275. package/.next/standalone/.next/server/app/api/workspaces/route.js.nft.json +1 -1
  276. package/.next/standalone/.next/server/app/cortex.html +1 -1
  277. package/.next/standalone/.next/server/app/cortex.rsc +2 -2
  278. package/.next/standalone/.next/server/app/cortex.segments/!KGRlc2t0b3Ap/cortex/__PAGE__.segment.rsc +1 -1
  279. package/.next/standalone/.next/server/app/cortex.segments/!KGRlc2t0b3Ap/cortex.segment.rsc +1 -1
  280. package/.next/standalone/.next/server/app/cortex.segments/!KGRlc2t0b3Ap.segment.rsc +1 -1
  281. package/.next/standalone/.next/server/app/cortex.segments/_full.segment.rsc +2 -2
  282. package/.next/standalone/.next/server/app/cortex.segments/_head.segment.rsc +1 -1
  283. package/.next/standalone/.next/server/app/cortex.segments/_index.segment.rsc +2 -2
  284. package/.next/standalone/.next/server/app/cortex.segments/_tree.segment.rsc +2 -2
  285. package/.next/standalone/.next/server/app/icon.png/route.js +2 -2
  286. package/.next/standalone/.next/server/app/icon.png/route.js.nft.json +1 -1
  287. package/.next/standalone/.next/server/app/login/page_client-reference-manifest.js +1 -1
  288. package/.next/standalone/.next/server/app/login.html +1 -1
  289. package/.next/standalone/.next/server/app/login.rsc +2 -2
  290. package/.next/standalone/.next/server/app/login.segments/_full.segment.rsc +2 -2
  291. package/.next/standalone/.next/server/app/login.segments/_head.segment.rsc +1 -1
  292. package/.next/standalone/.next/server/app/login.segments/_index.segment.rsc +2 -2
  293. package/.next/standalone/.next/server/app/login.segments/_tree.segment.rsc +2 -2
  294. package/.next/standalone/.next/server/app/login.segments/login/__PAGE__.segment.rsc +1 -1
  295. package/.next/standalone/.next/server/app/login.segments/login.segment.rsc +1 -1
  296. package/.next/standalone/.next/server/app/m/page_client-reference-manifest.js +1 -1
  297. package/.next/standalone/.next/server/app/m/projects/page_client-reference-manifest.js +1 -1
  298. package/.next/standalone/.next/server/app/m/projects.html +1 -1
  299. package/.next/standalone/.next/server/app/m/projects.rsc +2 -2
  300. package/.next/standalone/.next/server/app/m/projects.segments/_full.segment.rsc +2 -2
  301. package/.next/standalone/.next/server/app/m/projects.segments/_head.segment.rsc +1 -1
  302. package/.next/standalone/.next/server/app/m/projects.segments/_index.segment.rsc +2 -2
  303. package/.next/standalone/.next/server/app/m/projects.segments/_tree.segment.rsc +2 -2
  304. package/.next/standalone/.next/server/app/m/projects.segments/m/projects/__PAGE__.segment.rsc +1 -1
  305. package/.next/standalone/.next/server/app/m/projects.segments/m/projects.segment.rsc +1 -1
  306. package/.next/standalone/.next/server/app/m/projects.segments/m.segment.rsc +1 -1
  307. package/.next/standalone/.next/server/app/m/sessions/[id]/page_client-reference-manifest.js +1 -1
  308. package/.next/standalone/.next/server/app/m/sessions/page_client-reference-manifest.js +1 -1
  309. package/.next/standalone/.next/server/app/m/sessions.html +1 -1
  310. package/.next/standalone/.next/server/app/m/sessions.rsc +2 -2
  311. package/.next/standalone/.next/server/app/m/sessions.segments/_full.segment.rsc +2 -2
  312. package/.next/standalone/.next/server/app/m/sessions.segments/_head.segment.rsc +1 -1
  313. package/.next/standalone/.next/server/app/m/sessions.segments/_index.segment.rsc +2 -2
  314. package/.next/standalone/.next/server/app/m/sessions.segments/_tree.segment.rsc +2 -2
  315. package/.next/standalone/.next/server/app/m/sessions.segments/m/sessions/__PAGE__.segment.rsc +1 -1
  316. package/.next/standalone/.next/server/app/m/sessions.segments/m/sessions.segment.rsc +1 -1
  317. package/.next/standalone/.next/server/app/m/sessions.segments/m.segment.rsc +1 -1
  318. package/.next/standalone/.next/server/app/m/settings/page_client-reference-manifest.js +1 -1
  319. package/.next/standalone/.next/server/app/m/settings.html +1 -1
  320. package/.next/standalone/.next/server/app/m/settings.rsc +2 -2
  321. package/.next/standalone/.next/server/app/m/settings.segments/_full.segment.rsc +2 -2
  322. package/.next/standalone/.next/server/app/m/settings.segments/_head.segment.rsc +1 -1
  323. package/.next/standalone/.next/server/app/m/settings.segments/_index.segment.rsc +2 -2
  324. package/.next/standalone/.next/server/app/m/settings.segments/_tree.segment.rsc +2 -2
  325. package/.next/standalone/.next/server/app/m/settings.segments/m/settings/__PAGE__.segment.rsc +1 -1
  326. package/.next/standalone/.next/server/app/m/settings.segments/m/settings.segment.rsc +1 -1
  327. package/.next/standalone/.next/server/app/m/settings.segments/m.segment.rsc +1 -1
  328. package/.next/standalone/.next/server/app/m/terminal/page_client-reference-manifest.js +1 -1
  329. package/.next/standalone/.next/server/app/m/terminal.html +1 -1
  330. package/.next/standalone/.next/server/app/m/terminal.rsc +2 -2
  331. package/.next/standalone/.next/server/app/m/terminal.segments/_full.segment.rsc +2 -2
  332. package/.next/standalone/.next/server/app/m/terminal.segments/_head.segment.rsc +1 -1
  333. package/.next/standalone/.next/server/app/m/terminal.segments/_index.segment.rsc +2 -2
  334. package/.next/standalone/.next/server/app/m/terminal.segments/_tree.segment.rsc +2 -2
  335. package/.next/standalone/.next/server/app/m/terminal.segments/m/terminal/__PAGE__.segment.rsc +1 -1
  336. package/.next/standalone/.next/server/app/m/terminal.segments/m/terminal.segment.rsc +1 -1
  337. package/.next/standalone/.next/server/app/m/terminal.segments/m.segment.rsc +1 -1
  338. package/.next/standalone/.next/server/app/m.html +1 -1
  339. package/.next/standalone/.next/server/app/m.rsc +2 -2
  340. package/.next/standalone/.next/server/app/m.segments/_full.segment.rsc +2 -2
  341. package/.next/standalone/.next/server/app/m.segments/_head.segment.rsc +1 -1
  342. package/.next/standalone/.next/server/app/m.segments/_index.segment.rsc +2 -2
  343. package/.next/standalone/.next/server/app/m.segments/_tree.segment.rsc +2 -2
  344. package/.next/standalone/.next/server/app/m.segments/m/__PAGE__.segment.rsc +1 -1
  345. package/.next/standalone/.next/server/app/m.segments/m.segment.rsc +1 -1
  346. package/.next/standalone/.next/server/app/network.html +1 -1
  347. package/.next/standalone/.next/server/app/network.rsc +2 -2
  348. package/.next/standalone/.next/server/app/network.segments/!KGRlc2t0b3Ap/network/__PAGE__.segment.rsc +1 -1
  349. package/.next/standalone/.next/server/app/network.segments/!KGRlc2t0b3Ap/network.segment.rsc +1 -1
  350. package/.next/standalone/.next/server/app/network.segments/!KGRlc2t0b3Ap.segment.rsc +1 -1
  351. package/.next/standalone/.next/server/app/network.segments/_full.segment.rsc +2 -2
  352. package/.next/standalone/.next/server/app/network.segments/_head.segment.rsc +1 -1
  353. package/.next/standalone/.next/server/app/network.segments/_index.segment.rsc +2 -2
  354. package/.next/standalone/.next/server/app/network.segments/_tree.segment.rsc +2 -2
  355. package/.next/standalone/.next/server/app/projects.html +1 -1
  356. package/.next/standalone/.next/server/app/projects.rsc +2 -2
  357. package/.next/standalone/.next/server/app/projects.segments/!KGRlc2t0b3Ap/projects/__PAGE__.segment.rsc +1 -1
  358. package/.next/standalone/.next/server/app/projects.segments/!KGRlc2t0b3Ap/projects.segment.rsc +1 -1
  359. package/.next/standalone/.next/server/app/projects.segments/!KGRlc2t0b3Ap.segment.rsc +1 -1
  360. package/.next/standalone/.next/server/app/projects.segments/_full.segment.rsc +2 -2
  361. package/.next/standalone/.next/server/app/projects.segments/_head.segment.rsc +1 -1
  362. package/.next/standalone/.next/server/app/projects.segments/_index.segment.rsc +2 -2
  363. package/.next/standalone/.next/server/app/projects.segments/_tree.segment.rsc +2 -2
  364. package/.next/standalone/.next/server/app/sessions.html +1 -1
  365. package/.next/standalone/.next/server/app/sessions.rsc +2 -2
  366. package/.next/standalone/.next/server/app/sessions.segments/!KGRlc2t0b3Ap/sessions/__PAGE__.segment.rsc +1 -1
  367. package/.next/standalone/.next/server/app/sessions.segments/!KGRlc2t0b3Ap/sessions.segment.rsc +1 -1
  368. package/.next/standalone/.next/server/app/sessions.segments/!KGRlc2t0b3Ap.segment.rsc +1 -1
  369. package/.next/standalone/.next/server/app/sessions.segments/_full.segment.rsc +2 -2
  370. package/.next/standalone/.next/server/app/sessions.segments/_head.segment.rsc +1 -1
  371. package/.next/standalone/.next/server/app/sessions.segments/_index.segment.rsc +2 -2
  372. package/.next/standalone/.next/server/app/sessions.segments/_tree.segment.rsc +2 -2
  373. package/.next/standalone/.next/server/app/settings.html +1 -1
  374. package/.next/standalone/.next/server/app/settings.rsc +2 -2
  375. package/.next/standalone/.next/server/app/settings.segments/!KGRlc2t0b3Ap/settings/__PAGE__.segment.rsc +1 -1
  376. package/.next/standalone/.next/server/app/settings.segments/!KGRlc2t0b3Ap/settings.segment.rsc +1 -1
  377. package/.next/standalone/.next/server/app/settings.segments/!KGRlc2t0b3Ap.segment.rsc +1 -1
  378. package/.next/standalone/.next/server/app/settings.segments/_full.segment.rsc +2 -2
  379. package/.next/standalone/.next/server/app/settings.segments/_head.segment.rsc +1 -1
  380. package/.next/standalone/.next/server/app/settings.segments/_index.segment.rsc +2 -2
  381. package/.next/standalone/.next/server/app/settings.segments/_tree.segment.rsc +2 -2
  382. package/.next/standalone/.next/server/app/terminal.html +1 -1
  383. package/.next/standalone/.next/server/app/terminal.rsc +3 -3
  384. package/.next/standalone/.next/server/app/terminal.segments/!KGRlc2t0b3Ap/terminal/__PAGE__.segment.rsc +2 -2
  385. package/.next/standalone/.next/server/app/terminal.segments/!KGRlc2t0b3Ap/terminal.segment.rsc +1 -1
  386. package/.next/standalone/.next/server/app/terminal.segments/!KGRlc2t0b3Ap.segment.rsc +1 -1
  387. package/.next/standalone/.next/server/app/terminal.segments/_full.segment.rsc +3 -3
  388. package/.next/standalone/.next/server/app/terminal.segments/_head.segment.rsc +1 -1
  389. package/.next/standalone/.next/server/app/terminal.segments/_index.segment.rsc +2 -2
  390. package/.next/standalone/.next/server/app/terminal.segments/_tree.segment.rsc +2 -2
  391. package/.next/standalone/.next/server/app/vr/page_client-reference-manifest.js +1 -1
  392. package/.next/standalone/.next/server/app/vr.html +1 -1
  393. package/.next/standalone/.next/server/app/vr.rsc +2 -2
  394. package/.next/standalone/.next/server/app/vr.segments/_full.segment.rsc +2 -2
  395. package/.next/standalone/.next/server/app/vr.segments/_head.segment.rsc +1 -1
  396. package/.next/standalone/.next/server/app/vr.segments/_index.segment.rsc +2 -2
  397. package/.next/standalone/.next/server/app/vr.segments/_tree.segment.rsc +2 -2
  398. package/.next/standalone/.next/server/app/vr.segments/vr/__PAGE__.segment.rsc +1 -1
  399. package/.next/standalone/.next/server/app/vr.segments/vr.segment.rsc +1 -1
  400. package/.next/standalone/.next/server/app/workspaces.html +1 -1
  401. package/.next/standalone/.next/server/app/workspaces.rsc +2 -2
  402. package/.next/standalone/.next/server/app/workspaces.segments/!KGRlc2t0b3Ap/workspaces/__PAGE__.segment.rsc +1 -1
  403. package/.next/standalone/.next/server/app/workspaces.segments/!KGRlc2t0b3Ap/workspaces.segment.rsc +1 -1
  404. package/.next/standalone/.next/server/app/workspaces.segments/!KGRlc2t0b3Ap.segment.rsc +1 -1
  405. package/.next/standalone/.next/server/app/workspaces.segments/_full.segment.rsc +2 -2
  406. package/.next/standalone/.next/server/app/workspaces.segments/_head.segment.rsc +1 -1
  407. package/.next/standalone/.next/server/app/workspaces.segments/_index.segment.rsc +2 -2
  408. package/.next/standalone/.next/server/app/workspaces.segments/_tree.segment.rsc +2 -2
  409. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0cf5ebdb._.js +3 -0
  410. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0f15af1e._.js +78 -0
  411. package/.next/standalone/.next/server/chunks/[root-of-the-server]__107eab8a._.js +3 -0
  412. package/.next/standalone/.next/server/chunks/[root-of-the-server]__1094360c._.js +1 -1
  413. package/.next/standalone/.next/server/chunks/[root-of-the-server]__118ea5e0._.js +42 -0
  414. package/.next/standalone/.next/server/chunks/[root-of-the-server]__160e7c73._.js +5 -5
  415. package/.next/standalone/.next/server/chunks/[root-of-the-server]__16d4da21._.js +3 -0
  416. package/.next/standalone/.next/server/chunks/[root-of-the-server]__1c542684._.js +3 -0
  417. package/.next/standalone/.next/server/chunks/[root-of-the-server]__1f23bae4._.js +3 -0
  418. package/.next/standalone/.next/server/chunks/[root-of-the-server]__1faefa3e._.js +19 -0
  419. package/.next/standalone/.next/server/chunks/[root-of-the-server]__2145098e._.js +42 -0
  420. package/.next/standalone/.next/server/chunks/[root-of-the-server]__2748c76c._.js +42 -0
  421. package/.next/standalone/.next/server/chunks/[root-of-the-server]__2c08d908._.js +3 -0
  422. package/.next/standalone/.next/server/chunks/[root-of-the-server]__2e29b4bd._.js +3 -0
  423. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__e3ecfd17._.js → [root-of-the-server]__34fd47d2._.js} +3 -3
  424. package/.next/standalone/.next/server/chunks/[root-of-the-server]__366b6cec._.js +78 -0
  425. package/.next/standalone/.next/server/chunks/[root-of-the-server]__4d51508f._.js +3 -0
  426. package/.next/standalone/.next/server/chunks/[root-of-the-server]__5663673e._.js +3 -0
  427. package/.next/standalone/.next/server/chunks/[root-of-the-server]__57e0cc31._.js +133 -0
  428. package/.next/standalone/.next/server/chunks/[root-of-the-server]__57ebbe63._.js +42 -0
  429. package/.next/standalone/.next/server/chunks/[root-of-the-server]__5d3345e4._.js +3 -0
  430. package/.next/standalone/.next/server/chunks/[root-of-the-server]__5ee7aa9d._.js +11 -0
  431. package/.next/standalone/.next/server/chunks/[root-of-the-server]__60caf825._.js +3 -0
  432. package/.next/standalone/.next/server/chunks/[root-of-the-server]__65c9857f._.js +3 -0
  433. package/.next/standalone/.next/server/chunks/[root-of-the-server]__678f6823._.js +3 -0
  434. package/.next/standalone/.next/server/chunks/[root-of-the-server]__685c95d8._.js +3 -0
  435. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__41d4d426._.js → [root-of-the-server]__69568dc2._.js} +1 -1
  436. package/.next/standalone/.next/server/chunks/[root-of-the-server]__6a0bc4ae._.js +3 -0
  437. package/.next/standalone/.next/server/chunks/[root-of-the-server]__6b876561._.js +3 -0
  438. package/.next/standalone/.next/server/chunks/[root-of-the-server]__6e89713c._.js +42 -0
  439. package/.next/standalone/.next/server/chunks/[root-of-the-server]__6f713737._.js +3 -0
  440. package/.next/standalone/.next/server/chunks/[root-of-the-server]__725f10f4._.js +78 -0
  441. package/.next/standalone/.next/server/chunks/[root-of-the-server]__785b0597._.js +38 -0
  442. package/.next/standalone/.next/server/chunks/[root-of-the-server]__7c728bed._.js +3 -0
  443. package/.next/standalone/.next/server/chunks/[root-of-the-server]__7da958b5._.js +42 -0
  444. package/.next/standalone/.next/server/chunks/[root-of-the-server]__7daed406._.js +3 -0
  445. package/.next/standalone/.next/server/chunks/[root-of-the-server]__7f140e4b._.js +78 -0
  446. package/.next/standalone/.next/server/chunks/[root-of-the-server]__80d826f7._.js +3 -0
  447. package/.next/standalone/.next/server/chunks/[root-of-the-server]__83a3c97b._.js +3 -0
  448. package/.next/standalone/.next/server/chunks/[root-of-the-server]__84c15a0e._.js +3 -0
  449. package/.next/standalone/.next/server/chunks/[root-of-the-server]__85c33341._.js +42 -0
  450. package/.next/standalone/.next/server/chunks/[root-of-the-server]__88f3d920._.js +78 -0
  451. package/.next/standalone/.next/server/chunks/[root-of-the-server]__8c916e85._.js +3 -0
  452. package/.next/standalone/.next/server/chunks/[root-of-the-server]__8deb2ae3._.js +3 -0
  453. package/.next/standalone/.next/server/chunks/[root-of-the-server]__8df5a740._.js +3 -0
  454. package/.next/standalone/.next/server/chunks/[root-of-the-server]__8f238bd9._.js +3 -0
  455. package/.next/standalone/.next/server/chunks/[root-of-the-server]__955ab668._.js +3 -0
  456. package/.next/standalone/.next/server/chunks/[root-of-the-server]__9a061e91._.js +42 -0
  457. package/.next/standalone/.next/server/chunks/[root-of-the-server]__a04a87d5._.js +42 -0
  458. package/.next/standalone/.next/server/chunks/[root-of-the-server]__a803051f._.js +42 -0
  459. package/.next/standalone/.next/server/chunks/[root-of-the-server]__ac0a9b09._.js +3 -0
  460. package/.next/standalone/.next/server/chunks/[root-of-the-server]__ac3e37b6._.js +13 -0
  461. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__96685488._.js → [root-of-the-server]__add9e50d._.js} +1 -1
  462. package/.next/standalone/.next/server/chunks/[root-of-the-server]__b57f4274._.js +3 -0
  463. package/.next/standalone/.next/server/chunks/[root-of-the-server]__b84b3426._.js +3 -0
  464. package/.next/standalone/.next/server/chunks/[root-of-the-server]__ba8224a1._.js +42 -0
  465. package/.next/standalone/.next/server/chunks/[root-of-the-server]__bd1c1d0d._.js +42 -0
  466. package/.next/standalone/.next/server/chunks/[root-of-the-server]__c1442c38._.js +42 -0
  467. package/.next/standalone/.next/server/chunks/[root-of-the-server]__c18bdab2._.js +42 -0
  468. package/.next/standalone/.next/server/chunks/[root-of-the-server]__c1efc6a8._.js +3 -0
  469. package/.next/standalone/.next/server/chunks/[root-of-the-server]__c697b87e._.js +3 -0
  470. package/.next/standalone/.next/server/chunks/[root-of-the-server]__c6dc43c6._.js +3 -0
  471. package/.next/standalone/.next/server/chunks/[root-of-the-server]__ccce7f4f._.js +78 -0
  472. package/.next/standalone/.next/server/chunks/[root-of-the-server]__d92f347c._.js +3 -0
  473. package/.next/standalone/.next/server/chunks/[root-of-the-server]__dac9e21e._.js +3 -0
  474. package/.next/standalone/.next/server/chunks/[root-of-the-server]__e3f9ddbc._.js +78 -0
  475. package/.next/standalone/.next/server/chunks/[root-of-the-server]__e66fc05f._.js +3 -0
  476. package/.next/standalone/.next/server/chunks/[root-of-the-server]__e7add82c._.js +3 -0
  477. package/.next/standalone/.next/server/chunks/[root-of-the-server]__fa9a5ec0._.js +42 -0
  478. package/.next/standalone/.next/server/chunks/[root-of-the-server]__ff9f6af0._.js +42 -0
  479. package/.next/standalone/.next/server/chunks/_0142f96b._.js +3 -0
  480. package/.next/standalone/.next/server/chunks/_0ebd30d3._.js +3 -0
  481. package/.next/standalone/.next/server/chunks/_19a59078._.js +3 -0
  482. package/.next/standalone/.next/server/chunks/_1bc02021._.js +11 -0
  483. package/.next/standalone/.next/server/chunks/_1e381a28._.js +3 -0
  484. package/.next/standalone/.next/server/chunks/_2699eda7._.js +3 -0
  485. package/.next/standalone/.next/server/chunks/_2fd02f70._.js +3 -0
  486. package/.next/standalone/.next/server/chunks/_373d522f._.js +3 -0
  487. package/.next/standalone/.next/server/chunks/_43fc1196._.js +3 -0
  488. package/.next/standalone/.next/server/chunks/_48ec4374._.js +3 -0
  489. package/.next/standalone/.next/server/chunks/_563d9ecc._.js +3 -0
  490. package/.next/standalone/.next/server/chunks/_583f9ae2._.js +3 -0
  491. package/.next/standalone/.next/server/chunks/_5a167705._.js +3 -0
  492. package/.next/standalone/.next/server/chunks/_5a8cc3a5._.js +3 -0
  493. package/.next/standalone/.next/server/chunks/_5d894fb4._.js +3 -0
  494. package/.next/standalone/.next/server/chunks/_6bbf8264._.js +3 -0
  495. package/.next/standalone/.next/server/chunks/_6c4bcec1._.js +3 -0
  496. package/.next/standalone/.next/server/chunks/_7a29d111._.js +3 -0
  497. package/.next/standalone/.next/server/chunks/_7d3bab25._.js +3 -0
  498. package/.next/standalone/.next/server/chunks/_7ed4d1a4._.js +3 -0
  499. package/.next/standalone/.next/server/chunks/_8072d20c._.js +3 -0
  500. package/.next/standalone/.next/server/chunks/_81b87c01._.js +3 -0
  501. package/.next/standalone/.next/server/chunks/_881b7b28._.js +3 -0
  502. package/.next/standalone/.next/server/chunks/_902a1d56._.js +3 -0
  503. package/.next/standalone/.next/server/chunks/_96258f1c._.js +3 -0
  504. package/.next/standalone/.next/server/chunks/_96f79f8f._.js +3 -0
  505. package/.next/standalone/.next/server/chunks/_a0379bc2._.js +3 -0
  506. package/.next/standalone/.next/server/chunks/_a0f604e8._.js +3 -0
  507. package/.next/standalone/.next/server/chunks/_a959b121._.js +3 -0
  508. package/.next/standalone/.next/server/chunks/_a975011f._.js +3 -0
  509. package/.next/standalone/.next/server/chunks/_aa956b66._.js +3 -0
  510. package/.next/standalone/.next/server/chunks/_ad7e7d57._.js +3 -0
  511. package/.next/standalone/.next/server/chunks/_aebf2285._.js +3 -0
  512. package/.next/standalone/.next/server/chunks/_b259dda0._.js +36 -0
  513. package/.next/standalone/.next/server/chunks/_b7c60fdc._.js +3 -0
  514. package/.next/standalone/.next/server/chunks/_bd23ddeb._.js +3 -0
  515. package/.next/standalone/.next/server/chunks/_cd02dfbe._.js +3 -0
  516. package/.next/standalone/.next/server/chunks/_d3ecca80._.js +3 -0
  517. package/.next/standalone/.next/server/chunks/_d48dfa43._.js +11 -0
  518. package/.next/standalone/.next/server/chunks/_dba648d6._.js +3 -0
  519. package/.next/standalone/.next/server/chunks/_df42ac6e._.js +3 -0
  520. package/.next/standalone/.next/server/chunks/_dfe0e460._.js +42 -0
  521. package/.next/standalone/.next/server/chunks/_ead2734e._.js +3 -0
  522. package/.next/standalone/.next/server/chunks/_eb4efd0a._.js +3 -0
  523. package/.next/standalone/.next/server/chunks/_eb66a871._.js +3 -0
  524. package/.next/standalone/.next/server/chunks/_ef715efd._.js +3 -0
  525. package/.next/standalone/.next/server/chunks/_f361a656._.js +3 -0
  526. package/.next/standalone/.next/server/chunks/_f54ddbf4._.js +3 -0
  527. package/.next/standalone/.next/server/chunks/_fe2866f2._.js +3 -0
  528. package/.next/standalone/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_4c408326.js +3 -0
  529. package/.next/standalone/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_5603adbc.js +3 -0
  530. package/.next/standalone/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_7180f8ad.js +3 -0
  531. package/.next/standalone/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_b6be66d9.js +3 -0
  532. package/.next/standalone/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_f7054fd7.js +3 -0
  533. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__66aca5d4._.js +1 -1
  534. package/.next/standalone/.next/server/chunks/ssr/src_app_(desktop)_terminal_page_tsx_de5e8d85._.js +1 -1
  535. package/.next/standalone/.next/server/edge/chunks/[root-of-the-server]__90eeddae._.js +1 -1
  536. package/.next/standalone/.next/server/edge/chunks/[root-of-the-server]__ca3f649e._.js +1 -1
  537. package/.next/standalone/.next/server/middleware-manifest.json +1 -1
  538. package/.next/standalone/.next/server/pages/404.html +1 -1
  539. package/.next/standalone/.next/server/pages/500.html +2 -2
  540. package/.next/standalone/.next/static/chunks/{732b7502f82e7c37.css → 044decb96250e420.css} +1 -1
  541. package/.next/standalone/.next/static/chunks/{23a9627a951672ed.js → 8b53c673e79b82f1.js} +3 -3
  542. package/.next/standalone/bin/scrub-standalone.js +5 -0
  543. package/.next/standalone/bin/spaces-dev.js +13 -3
  544. package/.next/standalone/bin/spaces.js +25 -4
  545. package/.next/standalone/package-lock.json +2 -2
  546. package/.next/standalone/package.json +3 -2
  547. package/.next/standalone/src/app/(desktop)/terminal/page.tsx +22 -1
  548. package/.next/standalone/src/app/api/network/discovered/route.ts +2 -2
  549. package/.next/standalone/src/app/api/network/nodes/check/route.ts +2 -2
  550. package/.next/standalone/src/app/api/network/nodes/route.ts +2 -2
  551. package/.next/standalone/src/app/api/server-config/route.ts +9 -18
  552. package/.next/standalone/src/lib/admin/api/analytics.ts +1 -8
  553. package/.next/standalone/src/lib/admin/api/users.ts +1 -8
  554. package/.next/standalone/src/lib/admin/api/usersById.ts +1 -8
  555. package/.next/standalone/src/lib/auth/guard.ts +46 -0
  556. package/.next/standalone/src/lib/auth/index.ts +1 -0
  557. package/.next/standalone/src/lib/db/queries.ts +11 -1
  558. package/.next/standalone/src/lib/network/api/discovered.ts +4 -1
  559. package/.next/standalone/src/lib/network/api/identity.ts +6 -0
  560. package/.next/standalone/src/lib/network/api/keys.ts +6 -0
  561. package/.next/standalone/src/lib/network/api/keysById.ts +3 -0
  562. package/.next/standalone/src/lib/network/api/nodes.ts +49 -3
  563. package/.next/standalone/src/lib/network/api/nodesById.ts +5 -0
  564. package/.next/standalone/src/lib/network/api/nodesCheck.ts +4 -1
  565. package/.next/standalone/src/lib/network/api/proxy.ts +5 -0
  566. package/.next/standalone/src/middleware.ts +24 -10
  567. package/.next/standalone/tsconfig.tsbuildinfo +1 -1
  568. package/bin/scrub-standalone.js +5 -0
  569. package/bin/spaces-dev.js +13 -3
  570. package/bin/spaces.js +25 -4
  571. package/package.json +3 -2
  572. package/.next/standalone/.next/server/chunks/[externals]_next_dist_b89b5a39._.js +0 -3
  573. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0153ac12._.js +0 -133
  574. package/.next/standalone/.next/server/chunks/[root-of-the-server]__01a4559c._.js +0 -3
  575. package/.next/standalone/.next/server/chunks/[root-of-the-server]__029ab763._.js +0 -133
  576. package/.next/standalone/.next/server/chunks/[root-of-the-server]__037992dc._.js +0 -141
  577. package/.next/standalone/.next/server/chunks/[root-of-the-server]__06bb204a._.js +0 -133
  578. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0fd17dcf._.js +0 -3
  579. package/.next/standalone/.next/server/chunks/[root-of-the-server]__107439ea._.js +0 -133
  580. package/.next/standalone/.next/server/chunks/[root-of-the-server]__12dff461._.js +0 -78
  581. package/.next/standalone/.next/server/chunks/[root-of-the-server]__13eb511a._.js +0 -133
  582. package/.next/standalone/.next/server/chunks/[root-of-the-server]__141c8d34._.js +0 -172
  583. package/.next/standalone/.next/server/chunks/[root-of-the-server]__151efd48._.js +0 -3
  584. package/.next/standalone/.next/server/chunks/[root-of-the-server]__16c141c2._.js +0 -133
  585. package/.next/standalone/.next/server/chunks/[root-of-the-server]__17fee60c._.js +0 -133
  586. package/.next/standalone/.next/server/chunks/[root-of-the-server]__1a525be8._.js +0 -3
  587. package/.next/standalone/.next/server/chunks/[root-of-the-server]__1aea45f5._.js +0 -3
  588. package/.next/standalone/.next/server/chunks/[root-of-the-server]__1cb4ee6b._.js +0 -133
  589. package/.next/standalone/.next/server/chunks/[root-of-the-server]__1e25d3db._.js +0 -133
  590. package/.next/standalone/.next/server/chunks/[root-of-the-server]__1f7566a3._.js +0 -3
  591. package/.next/standalone/.next/server/chunks/[root-of-the-server]__20382bee._.js +0 -133
  592. package/.next/standalone/.next/server/chunks/[root-of-the-server]__2082a624._.js +0 -133
  593. package/.next/standalone/.next/server/chunks/[root-of-the-server]__2091a7ed._.js +0 -42
  594. package/.next/standalone/.next/server/chunks/[root-of-the-server]__24525ae7._.js +0 -133
  595. package/.next/standalone/.next/server/chunks/[root-of-the-server]__284b02fc._.js +0 -42
  596. package/.next/standalone/.next/server/chunks/[root-of-the-server]__2a1a1d0f._.js +0 -42
  597. package/.next/standalone/.next/server/chunks/[root-of-the-server]__2cf17888._.js +0 -42
  598. package/.next/standalone/.next/server/chunks/[root-of-the-server]__323ae5c9._.js +0 -133
  599. package/.next/standalone/.next/server/chunks/[root-of-the-server]__34db98f7._.js +0 -133
  600. package/.next/standalone/.next/server/chunks/[root-of-the-server]__39efba69._.js +0 -3
  601. package/.next/standalone/.next/server/chunks/[root-of-the-server]__3aeedc57._.js +0 -133
  602. package/.next/standalone/.next/server/chunks/[root-of-the-server]__3bbe9d04._.js +0 -78
  603. package/.next/standalone/.next/server/chunks/[root-of-the-server]__3c2324ba._.js +0 -42
  604. package/.next/standalone/.next/server/chunks/[root-of-the-server]__40df3f5d._.js +0 -172
  605. package/.next/standalone/.next/server/chunks/[root-of-the-server]__42a3fe3c._.js +0 -141
  606. package/.next/standalone/.next/server/chunks/[root-of-the-server]__42d5d5be._.js +0 -3
  607. package/.next/standalone/.next/server/chunks/[root-of-the-server]__49821b61._.js +0 -133
  608. package/.next/standalone/.next/server/chunks/[root-of-the-server]__49f58cee._.js +0 -133
  609. package/.next/standalone/.next/server/chunks/[root-of-the-server]__4b9c38dc._.js +0 -141
  610. package/.next/standalone/.next/server/chunks/[root-of-the-server]__4c0ee9c7._.js +0 -133
  611. package/.next/standalone/.next/server/chunks/[root-of-the-server]__530862c6._.js +0 -3
  612. package/.next/standalone/.next/server/chunks/[root-of-the-server]__55504160._.js +0 -133
  613. package/.next/standalone/.next/server/chunks/[root-of-the-server]__599f26fe._.js +0 -42
  614. package/.next/standalone/.next/server/chunks/[root-of-the-server]__5efa69f5._.js +0 -3
  615. package/.next/standalone/.next/server/chunks/[root-of-the-server]__60483ece._.js +0 -3
  616. package/.next/standalone/.next/server/chunks/[root-of-the-server]__61135659._.js +0 -133
  617. package/.next/standalone/.next/server/chunks/[root-of-the-server]__66331034._.js +0 -133
  618. package/.next/standalone/.next/server/chunks/[root-of-the-server]__6887294d._.js +0 -3
  619. package/.next/standalone/.next/server/chunks/[root-of-the-server]__6b9396b4._.js +0 -133
  620. package/.next/standalone/.next/server/chunks/[root-of-the-server]__6cfd7062._.js +0 -166
  621. package/.next/standalone/.next/server/chunks/[root-of-the-server]__6e8d89e2._.js +0 -149
  622. package/.next/standalone/.next/server/chunks/[root-of-the-server]__6f5b3cfe._.js +0 -133
  623. package/.next/standalone/.next/server/chunks/[root-of-the-server]__71d5b087._.js +0 -133
  624. package/.next/standalone/.next/server/chunks/[root-of-the-server]__76434a8e._.js +0 -78
  625. package/.next/standalone/.next/server/chunks/[root-of-the-server]__798bafa7._.js +0 -133
  626. package/.next/standalone/.next/server/chunks/[root-of-the-server]__7b873fdb._.js +0 -78
  627. package/.next/standalone/.next/server/chunks/[root-of-the-server]__7d73f791._.js +0 -133
  628. package/.next/standalone/.next/server/chunks/[root-of-the-server]__7dc76d0e._.js +0 -133
  629. package/.next/standalone/.next/server/chunks/[root-of-the-server]__80a85d1f._.js +0 -133
  630. package/.next/standalone/.next/server/chunks/[root-of-the-server]__81f2a9b7._.js +0 -133
  631. package/.next/standalone/.next/server/chunks/[root-of-the-server]__82f11618._.js +0 -3
  632. package/.next/standalone/.next/server/chunks/[root-of-the-server]__834efefe._.js +0 -42
  633. package/.next/standalone/.next/server/chunks/[root-of-the-server]__853663ea._.js +0 -42
  634. package/.next/standalone/.next/server/chunks/[root-of-the-server]__861f2472._.js +0 -172
  635. package/.next/standalone/.next/server/chunks/[root-of-the-server]__882d0924._.js +0 -133
  636. package/.next/standalone/.next/server/chunks/[root-of-the-server]__88959e7f._.js +0 -133
  637. package/.next/standalone/.next/server/chunks/[root-of-the-server]__8b6c05dc._.js +0 -133
  638. package/.next/standalone/.next/server/chunks/[root-of-the-server]__912a22a4._.js +0 -133
  639. package/.next/standalone/.next/server/chunks/[root-of-the-server]__93d21ad1._.js +0 -42
  640. package/.next/standalone/.next/server/chunks/[root-of-the-server]__94532b09._.js +0 -42
  641. package/.next/standalone/.next/server/chunks/[root-of-the-server]__97e87518._.js +0 -78
  642. package/.next/standalone/.next/server/chunks/[root-of-the-server]__9c13c8d0._.js +0 -78
  643. package/.next/standalone/.next/server/chunks/[root-of-the-server]__9cb13212._.js +0 -133
  644. package/.next/standalone/.next/server/chunks/[root-of-the-server]__9d315363._.js +0 -133
  645. package/.next/standalone/.next/server/chunks/[root-of-the-server]__9ec369db._.js +0 -13
  646. package/.next/standalone/.next/server/chunks/[root-of-the-server]__9f09ade5._.js +0 -133
  647. package/.next/standalone/.next/server/chunks/[root-of-the-server]__9f986ad2._.js +0 -133
  648. package/.next/standalone/.next/server/chunks/[root-of-the-server]__a35913cf._.js +0 -172
  649. package/.next/standalone/.next/server/chunks/[root-of-the-server]__a3641117._.js +0 -78
  650. package/.next/standalone/.next/server/chunks/[root-of-the-server]__a76c75a0._.js +0 -133
  651. package/.next/standalone/.next/server/chunks/[root-of-the-server]__a934c48d._.js +0 -133
  652. package/.next/standalone/.next/server/chunks/[root-of-the-server]__a9431ac6._.js +0 -133
  653. package/.next/standalone/.next/server/chunks/[root-of-the-server]__aa3381a4._.js +0 -133
  654. package/.next/standalone/.next/server/chunks/[root-of-the-server]__ab1cc16c._.js +0 -133
  655. package/.next/standalone/.next/server/chunks/[root-of-the-server]__ab22ca4f._.js +0 -133
  656. package/.next/standalone/.next/server/chunks/[root-of-the-server]__ac20d518._.js +0 -78
  657. package/.next/standalone/.next/server/chunks/[root-of-the-server]__aee3bf91._.js +0 -172
  658. package/.next/standalone/.next/server/chunks/[root-of-the-server]__b1114936._.js +0 -133
  659. package/.next/standalone/.next/server/chunks/[root-of-the-server]__b15ade1f._.js +0 -133
  660. package/.next/standalone/.next/server/chunks/[root-of-the-server]__b2bc7a81._.js +0 -133
  661. package/.next/standalone/.next/server/chunks/[root-of-the-server]__b51446e5._.js +0 -133
  662. package/.next/standalone/.next/server/chunks/[root-of-the-server]__ba344563._.js +0 -133
  663. package/.next/standalone/.next/server/chunks/[root-of-the-server]__c3b2e20c._.js +0 -133
  664. package/.next/standalone/.next/server/chunks/[root-of-the-server]__ca93ae79._.js +0 -42
  665. package/.next/standalone/.next/server/chunks/[root-of-the-server]__cf4a76c0._.js +0 -133
  666. package/.next/standalone/.next/server/chunks/[root-of-the-server]__d20bed9e._.js +0 -78
  667. package/.next/standalone/.next/server/chunks/[root-of-the-server]__d2d59054._.js +0 -133
  668. package/.next/standalone/.next/server/chunks/[root-of-the-server]__d4f1c0c0._.js +0 -38
  669. package/.next/standalone/.next/server/chunks/[root-of-the-server]__d6de7a45._.js +0 -133
  670. package/.next/standalone/.next/server/chunks/[root-of-the-server]__da33b519._.js +0 -133
  671. package/.next/standalone/.next/server/chunks/[root-of-the-server]__dc820e44._.js +0 -133
  672. package/.next/standalone/.next/server/chunks/[root-of-the-server]__e1058e69._.js +0 -133
  673. package/.next/standalone/.next/server/chunks/[root-of-the-server]__e1dfb4d4._.js +0 -3
  674. package/.next/standalone/.next/server/chunks/[root-of-the-server]__e3606cd1._.js +0 -3
  675. package/.next/standalone/.next/server/chunks/[root-of-the-server]__e55b6fc5._.js +0 -133
  676. package/.next/standalone/.next/server/chunks/[root-of-the-server]__e6555dc3._.js +0 -133
  677. package/.next/standalone/.next/server/chunks/[root-of-the-server]__e65c3971._.js +0 -3
  678. package/.next/standalone/.next/server/chunks/[root-of-the-server]__ea9e2d75._.js +0 -133
  679. package/.next/standalone/.next/server/chunks/[root-of-the-server]__ec37cbee._.js +0 -133
  680. package/.next/standalone/.next/server/chunks/[root-of-the-server]__f3c19e4b._.js +0 -42
  681. package/.next/standalone/.next/server/chunks/[root-of-the-server]__f445bd01._.js +0 -3
  682. package/.next/standalone/.next/server/chunks/[root-of-the-server]__f7b0b4da._.js +0 -133
  683. package/.next/standalone/.next/server/chunks/[root-of-the-server]__fb4c016b._.js +0 -133
  684. package/.next/standalone/.next/server/chunks/[root-of-the-server]__fd86530e._.js +0 -78
  685. package/.next/standalone/.next/server/chunks/[root-of-the-server]__fef9b1ec._.js +0 -133
  686. package/.next/standalone/docs/plans/2026-02-24-multi-agent-sessions-design.md +0 -133
  687. package/.next/standalone/docs/plans/2026-02-24-multi-agent-sessions-plan.md +0 -959
  688. package/.next/standalone/docs/plans/2026-03-07-service-command-design.md +0 -146
  689. package/.next/standalone/docs/plans/2026-03-07-service-command-plan.md +0 -254
  690. package/.next/standalone/docs/plans/2026-04-23-consolidate-addons-design.md +0 -212
  691. package/.next/standalone/docs/plans/2026-04-23-consolidate-addons-plan.md +0 -1509
  692. package/.next/standalone/docs/superpowers/plans/2026-03-12-spaces-cortex.md +0 -5270
  693. package/.next/standalone/docs/superpowers/plans/2026-03-13-cortex-wiring.md +0 -1387
  694. package/.next/standalone/docs/superpowers/plans/2026-03-14-cortex-v2-entity-graph.md +0 -1923
  695. package/.next/standalone/docs/superpowers/plans/2026-03-14-cortex-v2-knowledge-evolution.md +0 -1113
  696. package/.next/standalone/docs/superpowers/plans/2026-03-15-cortex-v2-boundary-engine.md +0 -853
  697. package/.next/standalone/docs/superpowers/plans/2026-03-15-cortex-v2-context-engine.md +0 -1274
  698. package/.next/standalone/docs/superpowers/plans/2026-03-15-cortex-v2-signal-ingestion.md +0 -933
  699. package/.next/standalone/docs/superpowers/plans/2026-03-16-cortex-lobes.md +0 -1080
  700. package/.next/standalone/docs/superpowers/plans/2026-03-16-cortex-v2-gravity-system.md +0 -768
  701. package/.next/standalone/docs/superpowers/plans/2026-03-16-cortex-v2-ui.md +0 -1108
  702. package/.next/standalone/docs/superpowers/plans/2026-03-18-cortex-ui-integration.md +0 -1846
  703. package/.next/standalone/docs/superpowers/plans/2026-03-19-vr-phase1-shell.md +0 -1639
  704. package/.next/standalone/docs/superpowers/plans/2026-03-27-dockview-pane-layout.md +0 -98
  705. package/.next/standalone/docs/superpowers/plans/2026-04-21-workspace-todos.md +0 -1097
  706. package/.next/standalone/docs/superpowers/plans/2026-04-22-claude-usage-display.md +0 -749
  707. package/.next/standalone/docs/superpowers/specs/2026-03-11-universe-view-design.md +0 -320
  708. package/.next/standalone/docs/superpowers/specs/2026-03-12-spaces-brain-design.md +0 -720
  709. package/.next/standalone/docs/superpowers/specs/2026-03-13-cortex-wiring-design.md +0 -268
  710. package/.next/standalone/docs/superpowers/specs/2026-03-14-cortex-v2-design.md +0 -623
  711. package/.next/standalone/docs/superpowers/specs/2026-03-16-cortex-lobes-design.md +0 -263
  712. package/.next/standalone/docs/superpowers/specs/2026-03-16-cortex-v2-ui-design.md +0 -240
  713. package/.next/standalone/docs/superpowers/specs/2026-03-16-pane-ux-design.md +0 -77
  714. package/.next/standalone/docs/superpowers/specs/2026-03-18-cortex-ui-integration-design.md +0 -341
  715. package/.next/standalone/docs/superpowers/specs/2026-03-19-vr-phase1-shell-design.md +0 -288
  716. package/.next/standalone/docs/superpowers/specs/2026-03-27-pane-diff-review-and-project-wizard-design.md +0 -322
  717. package/.next/standalone/docs/superpowers/specs/2026-04-21-workspace-todos-design.md +0 -180
  718. package/.next/standalone/docs/superpowers/specs/2026-04-22-claude-usage-display-design.md +0 -183
  719. /package/.next/standalone/.next/static/{Y9EeSGuSi-8qpkLvIBy0a → mimGB6C_ZmJMiVnOe9tqZ}/_buildManifest.js +0 -0
  720. /package/.next/standalone/.next/static/{Y9EeSGuSi-8qpkLvIBy0a → mimGB6C_ZmJMiVnOe9tqZ}/_clientMiddlewareManifest.json +0 -0
  721. /package/.next/standalone/.next/static/{Y9EeSGuSi-8qpkLvIBy0a → mimGB6C_ZmJMiVnOe9tqZ}/_ssgManifest.js +0 -0
@@ -1,1509 +0,0 @@
1
- # Consolidate Addons Implementation Plan
2
-
3
- > **For Claude:** Use `superpowers:executing-plans` to implement this plan task-by-task. Repo convention: commit directly to `main` after each task; no PR (see `~/.claude/projects/-home-jlongo-development-spaces/memory/feedback_spaces_branch_workflow.md`).
4
-
5
- **Goal:** Fold `@spaces/pro` and `@spaces/teams` source into the `spaces` repo, delete the runtime addon loader, simplify the tier concept to a single `IS_MULTIUSER` flag, and keep `@spaces/cortex` as the only remaining external optional addon.
6
-
7
- **Architecture:** See `docs/plans/2026-04-23-consolidate-addons-design.md`.
8
-
9
- **Tech stack:** Next.js 16, TypeScript 5, Node ≥ 20.9, `better-sqlite3`, `@modelcontextprotocol/sdk`, `otpauth`, `qrcode`. No new frameworks introduced.
10
-
11
- **Estimated size:** ~40 files created, ~30 route files rewritten, ~150 LOC deleted from `bin/spaces.js`, ~100 LOC added to deps.
12
-
13
- ---
14
-
15
- ## Phase A — Fold in `@spaces/pro` (network)
16
-
17
- ### Task A1: Baseline — verify current state and build
18
-
19
- **Files:** none (sanity check)
20
-
21
- **Step 1: Confirm clean working tree**
22
-
23
- Run: `git status`
24
- Expected: only the known untracked files (`docs/FEATURE_DOC_GUIDE.md`, `docs/features/project-wizard.md`) plus the two new plan docs.
25
-
26
- **Step 2: Confirm current build succeeds**
27
-
28
- Run: `npm run build 2>&1 | tail -20`
29
- Expected: Next.js build completes. Note any pre-existing warnings — they are **not** fold-in regressions.
30
-
31
- **Step 3: Confirm existing `@spaces/pro` symlink**
32
-
33
- Run: `ls -la node_modules/@spaces/pro 2>&1 | head -3`
34
- Expected: shows the symlink target, or "No such file or directory" — either is fine. Record which for later cleanup.
35
-
36
- **Step 4: Commit baseline plan docs**
37
-
38
- ```bash
39
- git add docs/plans/2026-04-23-consolidate-addons-design.md docs/plans/2026-04-23-consolidate-addons-plan.md
40
- git commit -m "docs(plans): add addon consolidation design + plan"
41
- ```
42
-
43
- ---
44
-
45
- ### Task A2: Copy `spaces-pro/src/network/` → `src/lib/network/`
46
-
47
- **Files:**
48
- - Create: `src/lib/network/` (whole tree, copied from `/home/jlongo/development/spaces-pro/src/network/`)
49
- - Create: `src/types/network.ts` (copied from `/home/jlongo/development/spaces-pro/src/types/network.ts`)
50
-
51
- **Step 1: Copy the tree**
52
-
53
- ```bash
54
- cp -r /home/jlongo/development/spaces-pro/src/network src/lib/network
55
- cp /home/jlongo/development/spaces-pro/src/types/network.ts src/types/network.ts
56
- ```
57
-
58
- **Step 2: Fix relative import in `src/lib/network/auth.ts`**
59
-
60
- The file imports `type { ApiKeyRecord } from '../types/network'`. That worked in the old layout (`spaces-pro/src/network/auth.ts` → `spaces-pro/src/types/network.ts`). In the new layout (`spaces/src/lib/network/auth.ts` → `spaces/src/types/network.ts`) the relative path is `../../types/network`.
61
-
62
- Edit `src/lib/network/auth.ts` line `import type { ApiKeyRecord } from '../types/network';` to:
63
-
64
- ```ts
65
- import type { ApiKeyRecord } from '../../types/network';
66
- ```
67
-
68
- **Step 3: Fix the same relative import in any other copied file**
69
-
70
- Run: `grep -rn "from '../types/network'" src/lib/network/`
71
- Expected: matches in `db.ts`, `client.ts`, `aggregator.ts`, `identity.ts`. Change each to `'../../types/network'`.
72
-
73
- Run: `grep -rn "from '../types/network'" src/lib/network/` again.
74
- Expected: no matches.
75
-
76
- **Step 4: Verify TypeScript sees the tree**
77
-
78
- Run: `npx tsc --noEmit --project tsconfig.json 2>&1 | grep -E "src/lib/network|src/types/network" | head -20`
79
- Expected: no type errors pointing at the new files. (Other type errors may exist from the still-present stub — ignore them until Task A3.)
80
-
81
- **Step 5: Commit**
82
-
83
- ```bash
84
- git add src/lib/network src/types/network.ts
85
- git commit -m "feat(network): copy @spaces/pro network source into src/lib/network"
86
- ```
87
-
88
- ---
89
-
90
- ### Task A3: Rewrite `/api/network/*` route handlers to call local modules
91
-
92
- **Files:**
93
- - Modify (20 files): every `src/app/api/network/**/route.ts`
94
-
95
- Each route currently looks like:
96
-
97
- ```ts
98
- import { NextRequest } from 'next/server';
99
- import { getPro } from '@/lib/pro';
100
-
101
- const notAvailable = () =>
102
- Response.json({ error: 'Requires @spaces/pro' }, { status: 404 });
103
-
104
- export async function POST(req: NextRequest) {
105
- const pro = getPro();
106
- return pro?.network.api.terminalToken.POST(req) ?? notAvailable();
107
- }
108
- ```
109
-
110
- Replace with direct call to the local module.
111
-
112
- **Step 1: List the route files**
113
-
114
- Run: `grep -rl "from '@/lib/pro'" src/app/api/network/ | sort`
115
- Expected output (20 files):
116
-
117
- ```
118
- src/app/api/network/connect-callback/route.ts
119
- src/app/api/network/connect-request/[id]/route.ts
120
- src/app/api/network/connect-request/route.ts
121
- src/app/api/network/discovered/route.ts
122
- src/app/api/network/handshake/route.ts
123
- src/app/api/network/health/route.ts
124
- src/app/api/network/identity/route.ts
125
- src/app/api/network/keys/[id]/route.ts
126
- src/app/api/network/keys/route.ts
127
- src/app/api/network/nodes/[id]/route.ts
128
- src/app/api/network/nodes/check/route.ts
129
- src/app/api/network/nodes/route.ts
130
- src/app/api/network/panes/[id]/route.ts
131
- src/app/api/network/panes/route.ts
132
- src/app/api/network/projects/route.ts
133
- src/app/api/network/proxy/[nodeId]/[...path]/route.ts
134
- src/app/api/network/search/route.ts
135
- src/app/api/network/sessions/[id]/messages/route.ts
136
- src/app/api/network/sessions/[id]/route.ts
137
- src/app/api/network/sessions/route.ts
138
- src/app/api/network/terminal/token/route.ts
139
- src/app/api/network/workspaces/[id]/route.ts
140
- src/app/api/network/workspaces/route.ts
141
- ```
142
-
143
- (Count may be 20-23 depending on routes added since the plan was written.)
144
-
145
- **Step 2: Rewrite `src/app/api/network/terminal/token/route.ts` as the first example**
146
-
147
- Replace entire file contents with:
148
-
149
- ```ts
150
- import { NextRequest } from 'next/server';
151
- import * as terminalToken from '@/lib/network/api/terminalToken';
152
-
153
- export async function POST(req: NextRequest) {
154
- return terminalToken.POST(req);
155
- }
156
- ```
157
-
158
- The module at `src/lib/network/api/terminalToken.ts` already exports `POST`.
159
-
160
- **Step 3: Rewrite each remaining route by the same pattern**
161
-
162
- For each file, the mapping is mechanical. The `pro.network.api.X.Y(req)` call becomes `X.Y(req)` after `import * as X from '@/lib/network/api/X'`. Handler names (`GET`, `POST`, `PUT`, `DELETE`, `PATCH`) stay identical.
163
-
164
- Example — `src/app/api/network/workspaces/[id]/route.ts`:
165
-
166
- ```ts
167
- import { NextRequest } from 'next/server';
168
- import * as workspacesById from '@/lib/network/api/workspacesById';
169
-
170
- export async function GET(req: NextRequest, ctx: { params: Promise<{ id: string }> }) {
171
- return workspacesById.GET(req, ctx);
172
- }
173
- ```
174
-
175
- (Confirm each file matches what `spaces-pro/src/network/api/workspacesById.ts` exports — some expose `GET` only, others expose `GET` + `DELETE`, etc. Copy the signature from the source module.)
176
-
177
- **Step 4: Verify no route still imports `@/lib/pro`**
178
-
179
- Run: `grep -rn "from '@/lib/pro'" src/`
180
- Expected: no matches.
181
-
182
- **Step 5: Verify TypeScript build**
183
-
184
- Run: `npx tsc --noEmit --project tsconfig.json 2>&1 | grep "src/app/api/network" | head -20`
185
- Expected: no errors in network routes.
186
-
187
- **Step 6: Commit**
188
-
189
- ```bash
190
- git add src/app/api/network
191
- git commit -m "feat(network): rewrite /api/network/* to call local modules"
192
- ```
193
-
194
- ---
195
-
196
- ### Task A4: Delete `src/lib/pro.ts` and remaining references
197
-
198
- **Files:**
199
- - Delete: `src/lib/pro.ts`
200
- - Modify: any remaining file that imports from it (sessions, workspaces list routes — they call `hasPro()` for feature flags, not proxy calls)
201
-
202
- **Step 1: Find remaining consumers**
203
-
204
- Run: `grep -rn "from '@/lib/pro'" src/`
205
- Expected: should be empty after Task A3. If it isn't, list files.
206
-
207
- Run: `grep -rn "getPro\|hasPro" src/`
208
- Expected: matches in `src/app/api/sessions/route.ts`, `src/app/api/workspaces/route.ts`, `src/app/api/search/route.ts`, `src/app/api/cortex/federation/search/route.ts`.
209
-
210
- **Step 2: Replace each `hasPro()` guard with a direct check on `IS_FEDERATION`**
211
-
212
- For each match, the code looks like:
213
-
214
- ```ts
215
- import { getPro } from '@/lib/pro';
216
- // ...
217
- if (hasPro()) { /* aggregate across federation */ }
218
- ```
219
-
220
- Replace with:
221
-
222
- ```ts
223
- import { IS_FEDERATION } from '@/lib/tier';
224
- // ...
225
- if (IS_FEDERATION) { /* aggregate across federation */ }
226
- ```
227
-
228
- And for any code that actually called a pro method (e.g., `getPro().network.aggregateSessions(...)`), import the aggregator directly:
229
-
230
- ```ts
231
- import { aggregateSessions } from '@/lib/network';
232
- // ...
233
- if (IS_FEDERATION) {
234
- const extra = await aggregateSessions(/* ... */);
235
- // ...
236
- }
237
- ```
238
-
239
- `src/lib/network/index.ts` already exports `aggregateSessions`, `aggregateSearch`, `aggregateWorkspaces`.
240
-
241
- **Step 3: Delete the stub**
242
-
243
- ```bash
244
- rm src/lib/pro.ts
245
- ```
246
-
247
- **Step 4: Verify**
248
-
249
- Run: `grep -rn "from '@/lib/pro'\|getPro\|hasPro" src/`
250
- Expected: no matches.
251
-
252
- Run: `npm run build 2>&1 | tail -30`
253
- Expected: Next.js build succeeds.
254
-
255
- **Step 5: Commit**
256
-
257
- ```bash
258
- git add -u
259
- git commit -m "refactor(network): drop @spaces/pro stub; use local network modules"
260
- ```
261
-
262
- ---
263
-
264
- ## Phase B — Fold in `@spaces/teams` (auth, admin, collab)
265
-
266
- ### Task B1: Convert `src/lib/auth.ts` to `src/lib/auth/` folder
267
-
268
- **Files:**
269
- - Delete: `src/lib/auth.ts`
270
- - Create: `src/lib/auth/context.ts` (current auth.ts content)
271
- - Create: `src/lib/auth/index.ts` (re-export)
272
-
273
- **Step 1: Move the file**
274
-
275
- ```bash
276
- mkdir -p src/lib/auth
277
- git mv src/lib/auth.ts src/lib/auth/context.ts
278
- ```
279
-
280
- **Step 2: Create `src/lib/auth/index.ts`**
281
-
282
- Contents:
283
-
284
- ```ts
285
- export { getAuthUser, withUser } from './context';
286
- ```
287
-
288
- **Step 3: Verify existing imports still resolve**
289
-
290
- Run: `grep -rn "from '@/lib/auth'" src/ | head -5`
291
- Expected: still resolves (TypeScript `paths` + Next.js resolve `@/lib/auth` → `src/lib/auth/index.ts`).
292
-
293
- Run: `npx tsc --noEmit 2>&1 | grep "lib/auth" | head -10`
294
- Expected: no errors.
295
-
296
- **Step 4: Commit**
297
-
298
- ```bash
299
- git add src/lib/auth
300
- git commit -m "refactor(auth): convert src/lib/auth.ts to folder module"
301
- ```
302
-
303
- ---
304
-
305
- ### Task B2: Copy teams auth into `src/lib/auth/`
306
-
307
- **Files:**
308
- - Create: `src/lib/auth/session.ts` (from `spaces-teams/src/auth/session.ts`)
309
- - Create: `src/lib/auth/totp.ts` (from `spaces-teams/src/auth/totp.ts`)
310
- - Modify: `src/lib/auth/index.ts`
311
-
312
- **Step 1: Copy files**
313
-
314
- ```bash
315
- cp /home/jlongo/development/spaces-teams/src/auth/session.ts src/lib/auth/session.ts
316
- cp /home/jlongo/development/spaces-teams/src/auth/totp.ts src/lib/auth/totp.ts
317
- ```
318
-
319
- **Step 2: Update `src/lib/auth/index.ts` to re-export**
320
-
321
- ```ts
322
- export { getAuthUser, withUser } from './context';
323
- export {
324
- issueSessionToken,
325
- verifySessionToken,
326
- setSessionCookie,
327
- clearSessionCookie,
328
- getSessionSecretHex,
329
- } from './session';
330
- export * as totp from './totp';
331
- ```
332
-
333
- **Step 3: Verify no import rot**
334
-
335
- Run: `npx tsc --noEmit 2>&1 | grep "lib/auth" | head -10`
336
- Expected: no errors. (`totp.ts` depends on `otpauth` and `qrcode` — these aren't installed yet; Task D1 adds them. If tsc complains, defer the verification here to after Task D1.)
337
-
338
- **Step 4: Commit**
339
-
340
- ```bash
341
- git add src/lib/auth
342
- git commit -m "feat(auth): fold @spaces/teams auth (session, totp) into src/lib/auth"
343
- ```
344
-
345
- ---
346
-
347
- ### Task B3: Copy admin modules into `src/lib/admin/`
348
-
349
- **Files:**
350
- - Create: `src/lib/admin/db.ts` (from `spaces-teams/src/admin/db.ts`)
351
- - Create: `src/lib/admin/index.ts` (from `spaces-teams/src/admin/index.ts`)
352
-
353
- **Step 1: Copy**
354
-
355
- ```bash
356
- mkdir -p src/lib/admin
357
- cp /home/jlongo/development/spaces-teams/src/admin/db.ts src/lib/admin/db.ts
358
- cp /home/jlongo/development/spaces-teams/src/admin/index.ts src/lib/admin/index.ts
359
- ```
360
-
361
- **Step 2: Verify exports**
362
-
363
- Run: `grep -E "^export" src/lib/admin/index.ts`
364
- Expected: re-exports from `./db` (createUser, getUser, listUsers, updateUser, deleteUser, resolveShellUser, recordLogin, recordSessionStart/End, getLoginEvents, getTerminalSessions, getActiveSessionCount, getDailyLoginCounts, getDailySessionMinutes, getUserSessionSummary, hashPassword, verifyPassword).
365
-
366
- **Step 3: Commit**
367
-
368
- ```bash
369
- git add src/lib/admin
370
- git commit -m "feat(admin): fold @spaces/teams admin modules into src/lib/admin"
371
- ```
372
-
373
- ---
374
-
375
- ### Task B4: Copy collab bus + queries into `src/lib/collab/`
376
-
377
- **Files:**
378
- - Create: `src/lib/collab/broker.js` (from `spaces-teams/src/bus/broker.js`)
379
- - Create: `src/lib/collab/queries.js` (from `spaces-teams/src/db/queries.js`)
380
- - Create: `src/lib/collab/migrations.js` (from `spaces-teams/src/db/migrations.js`)
381
-
382
- **Step 1: Copy**
383
-
384
- ```bash
385
- mkdir -p src/lib/collab
386
- cp /home/jlongo/development/spaces-teams/src/bus/broker.js src/lib/collab/broker.js
387
- cp /home/jlongo/development/spaces-teams/src/db/queries.js src/lib/collab/queries.js
388
- cp /home/jlongo/development/spaces-teams/src/db/migrations.js src/lib/collab/migrations.js
389
- ```
390
-
391
- **Step 2: Fix relative requires inside the copied files**
392
-
393
- The copied `.js` files use `require('./...')` for sibling files. Since the directory layout changed (`bus/broker.js` used to require from `../db/queries`, for example), update requires:
394
-
395
- Run: `grep -n "require('\\.\\./" src/lib/collab/*.js`
396
-
397
- For each hit, replace `require('../db/queries')` → `require('./queries')`, `require('../db/migrations')` → `require('./migrations')`. Inside the new folder everything is a sibling.
398
-
399
- Verify: `grep -n "require('\\.\\./" src/lib/collab/*.js`
400
- Expected: no matches.
401
-
402
- **Step 3: Commit**
403
-
404
- ```bash
405
- git add src/lib/collab
406
- git commit -m "feat(collab): fold @spaces/teams bus + queries into src/lib/collab"
407
- ```
408
-
409
- ---
410
-
411
- ### Task B5: Copy terminal-collaboration module
412
-
413
- **Files:**
414
- - Create: `src/lib/terminal/collaboration.js` (from `spaces-teams/src/terminal/collaboration.js`)
415
-
416
- **Step 1: Verify the destination dir exists**
417
-
418
- Run: `ls src/lib/terminal/ 2>&1`
419
- Expected: already exists (spaces has its own terminal modules).
420
-
421
- **Step 2: Copy**
422
-
423
- ```bash
424
- cp /home/jlongo/development/spaces-teams/src/terminal/collaboration.js src/lib/terminal/collaboration.js
425
- ```
426
-
427
- **Step 3: Fix requires**
428
-
429
- Run: `grep -n "require('" src/lib/terminal/collaboration.js`
430
- For any `require('../bus/broker')` → `require('../collab/broker')`, `require('../db/queries')` → `require('../collab/queries')`.
431
-
432
- **Step 4: Commit**
433
-
434
- ```bash
435
- git add src/lib/terminal/collaboration.js
436
- git commit -m "feat(terminal): fold @spaces/teams terminal collaboration into src/lib/terminal"
437
- ```
438
-
439
- ---
440
-
441
- ### Task B6: Rewrite `/api/auth/*` routes
442
-
443
- **Files (7 routes):**
444
- - Modify: `src/app/api/auth/login/route.ts`
445
- - Modify: `src/app/api/auth/logout/route.ts`
446
- - Modify: `src/app/api/auth/me/route.ts`
447
- - Modify: `src/app/api/auth/totp/setup/route.ts`
448
- - Modify: `src/app/api/auth/totp/status/route.ts`
449
- - Modify: `src/app/api/auth/totp/verify/route.ts`
450
-
451
- **Step 1: Inspect the proxy pattern**
452
-
453
- Run: `cat src/app/api/auth/login/route.ts`
454
-
455
- Expected shape (approximate):
456
-
457
- ```ts
458
- import { NextRequest } from 'next/server';
459
- import { getTeams } from '@/lib/teams';
460
- const na = () => Response.json({ error: 'Requires @spaces/teams' }, { status: 404 });
461
- export async function POST(req: NextRequest) {
462
- return getTeams()?.auth.api.login.POST(req) ?? na();
463
- }
464
- ```
465
-
466
- **Step 2: Rewrite each route**
467
-
468
- For `src/app/api/auth/login/route.ts`:
469
-
470
- ```ts
471
- import { NextRequest } from 'next/server';
472
- import * as login from '@/lib/auth/api/login';
473
-
474
- export async function POST(req: NextRequest) {
475
- return login.POST(req);
476
- }
477
- ```
478
-
479
- Wait — we haven't copied the auth API handlers yet. That's this task's true first step.
480
-
481
- **Step 2a (correction): Copy `spaces-teams/src/auth/api/` into `src/lib/auth/api/`**
482
-
483
- ```bash
484
- mkdir -p src/lib/auth/api
485
- cp -r /home/jlongo/development/spaces-teams/src/auth/api/*.ts src/lib/auth/api/
486
- ```
487
-
488
- **Step 2b: Fix relative imports in the handlers**
489
-
490
- Run: `grep -rn "from '\\.\\./" src/lib/auth/api/`
491
- Expected matches: `from '../session'`, `from '../totp'` — these become `from '../session'` still works (handlers in `api/` sibling to `session.ts`). Verify each handler's imports resolve from the new path.
492
-
493
- If a handler imports `from '../../admin/db'`, it still works (now `src/lib/auth/api/*.ts` → `../../admin/db.ts` = `src/lib/admin/db.ts`).
494
-
495
- **Step 2c: Rewrite each of the 7 `/api/auth/*` route files**
496
-
497
- Pattern for each:
498
-
499
- ```ts
500
- import { NextRequest } from 'next/server';
501
- import * as login from '@/lib/auth/api/login';
502
- export async function POST(req: NextRequest) { return login.POST(req); }
503
- ```
504
-
505
- Copy the exported HTTP verbs from each handler (some are `GET`, some `POST`).
506
-
507
- **Step 3: Verify**
508
-
509
- Run: `grep -rn "from '@/lib/teams'" src/app/api/auth/`
510
- Expected: no matches.
511
-
512
- Run: `npx tsc --noEmit 2>&1 | grep "app/api/auth" | head -10`
513
- Expected: no errors.
514
-
515
- **Step 4: Commit**
516
-
517
- ```bash
518
- git add src/lib/auth/api src/app/api/auth
519
- git commit -m "feat(auth): rewrite /api/auth/* to call local modules"
520
- ```
521
-
522
- ---
523
-
524
- ### Task B7: Rewrite `/api/admin/*` routes
525
-
526
- **Files (3 routes):**
527
- - Modify: `src/app/api/admin/users/route.ts`
528
- - Modify: `src/app/api/admin/users/[id]/route.ts`
529
- - Modify: `src/app/api/admin/analytics/route.ts`
530
-
531
- **Step 1: Copy admin API handlers**
532
-
533
- ```bash
534
- mkdir -p src/lib/admin/api
535
- cp -r /home/jlongo/development/spaces-teams/src/admin/api/*.ts src/lib/admin/api/
536
- ```
537
-
538
- **Step 2: Fix relative imports**
539
-
540
- Run: `grep -rn "from '" src/lib/admin/api/` and repair any `../../` paths that point outside the old teams package.
541
-
542
- **Step 3: Rewrite the 3 routes**
543
-
544
- `src/app/api/admin/users/route.ts`:
545
-
546
- ```ts
547
- import { NextRequest } from 'next/server';
548
- import * as users from '@/lib/admin/api/users';
549
-
550
- export async function GET(req: NextRequest) { return users.GET(req); }
551
- export async function POST(req: NextRequest) { return users.POST(req); }
552
- ```
553
-
554
- `src/app/api/admin/users/[id]/route.ts`:
555
-
556
- ```ts
557
- import { NextRequest } from 'next/server';
558
- import * as usersById from '@/lib/admin/api/usersById';
559
-
560
- type Ctx = { params: Promise<{ id: string }> };
561
- export async function GET(req: NextRequest, ctx: Ctx) { return usersById.GET(req, ctx); }
562
- export async function PATCH(req: NextRequest, ctx: Ctx) { return usersById.PATCH(req, ctx); }
563
- export async function DELETE(req: NextRequest, ctx: Ctx) { return usersById.DELETE(req, ctx); }
564
- ```
565
-
566
- (Confirm handler exports match what `spaces-teams/src/admin/api/usersById.ts` actually exports.)
567
-
568
- `src/app/api/admin/analytics/route.ts`:
569
-
570
- ```ts
571
- import { NextRequest } from 'next/server';
572
- import * as analytics from '@/lib/admin/api/analytics';
573
-
574
- export async function GET(req: NextRequest) { return analytics.GET(req); }
575
- ```
576
-
577
- **Step 4: Verify + commit**
578
-
579
- Run: `grep -rn "from '@/lib/teams'" src/app/api/admin/`
580
- Expected: no matches.
581
-
582
- ```bash
583
- git add src/lib/admin/api src/app/api/admin
584
- git commit -m "feat(admin): rewrite /api/admin/* to call local modules"
585
- ```
586
-
587
- ---
588
-
589
- ### Task B8: Rewrite workspace messages + context routes
590
-
591
- **Files (4 routes):**
592
- - Modify: `src/app/api/workspaces/[id]/messages/route.ts`
593
- - Modify: `src/app/api/workspaces/[id]/messages/[msgId]/route.ts`
594
- - Modify: `src/app/api/workspaces/[id]/context/route.ts`
595
- - Modify: `src/app/api/workspaces/[id]/context/[key]/route.ts`
596
-
597
- **Step 1: Copy collab API handlers**
598
-
599
- ```bash
600
- mkdir -p src/lib/collab/api
601
- cp /home/jlongo/development/spaces-teams/src/api/messages.js src/lib/collab/api/messages.js
602
- cp /home/jlongo/development/spaces-teams/src/api/messageById.js src/lib/collab/api/messageById.js
603
- cp /home/jlongo/development/spaces-teams/src/api/context.js src/lib/collab/api/context.js
604
- cp /home/jlongo/development/spaces-teams/src/api/contextByKey.js src/lib/collab/api/contextByKey.js
605
- ```
606
-
607
- **Step 2: Fix relative requires in the copied handlers**
608
-
609
- Run: `grep -n "require('" src/lib/collab/api/*.js`
610
-
611
- Replace paths so they resolve inside the new location:
612
- - `require('../bus/broker')` → `require('../broker')`
613
- - `require('../db/queries')` → `require('../queries')`
614
- - `require('../db/migrations')` → `require('../migrations')`
615
-
616
- Verify: `grep -n "require('\\.\\./" src/lib/collab/api/*.js`
617
-
618
- **Step 3: Rewrite the 4 routes**
619
-
620
- Current shape (from `src/app/api/workspaces/[id]/messages/route.ts`):
621
-
622
- ```ts
623
- import { NextRequest } from 'next/server';
624
- import { getAuthUser, withUser } from '@/lib/auth';
625
- import { ensureInitialized } from '@/lib/db/init';
626
- import { getTeams } from '@/lib/teams';
627
-
628
- const na = () => Response.json({ error: 'Requires @spaces/teams' }, { status: 404 });
629
-
630
- export async function GET(request: NextRequest, ctx: { params: Promise<{ id: string }> }) {
631
- const user = getAuthUser(request);
632
- return withUser(user, async () => {
633
- await ensureInitialized();
634
- return getTeams()?.api.messages.GET(request, ctx) ?? na();
635
- });
636
- }
637
- // ... POST, DELETE similar
638
- ```
639
-
640
- Rewrite to:
641
-
642
- ```ts
643
- import { NextRequest } from 'next/server';
644
- import { getAuthUser, withUser } from '@/lib/auth';
645
- import { ensureInitialized } from '@/lib/db/init';
646
- // Note: .js module; Next/tsc resolve this via allowJs + resolveJsonModule settings in tsconfig.json.
647
- // If tsconfig doesn't have allowJs, either enable it or add a local .d.ts shim (see Step 4).
648
- import * as messages from '@/lib/collab/api/messages';
649
-
650
- export async function GET(request: NextRequest, ctx: { params: Promise<{ id: string }> }) {
651
- const user = getAuthUser(request);
652
- return withUser(user, async () => {
653
- await ensureInitialized();
654
- return messages.GET(request, ctx);
655
- });
656
- }
657
-
658
- export async function POST(request: NextRequest, ctx: { params: Promise<{ id: string }> }) {
659
- const user = getAuthUser(request);
660
- return withUser(user, async () => {
661
- await ensureInitialized();
662
- return messages.POST(request, ctx);
663
- });
664
- }
665
-
666
- export async function DELETE(request: NextRequest, ctx: { params: Promise<{ id: string }> }) {
667
- const user = getAuthUser(request);
668
- return withUser(user, async () => {
669
- await ensureInitialized();
670
- return messages.DELETE(request, ctx);
671
- });
672
- }
673
- ```
674
-
675
- Apply the same transform to the three remaining routes (`messages/[msgId]`, `context`, `context/[key]`), substituting the appropriate module name (`messageById`, `context`, `contextByKey`) and handler verbs.
676
-
677
- **Step 4: If TS complains about `.js` imports**
678
-
679
- Check `tsconfig.json` for `"allowJs"`. If absent:
680
-
681
- ```bash
682
- grep -n "allowJs" tsconfig.json
683
- ```
684
-
685
- If not set, either add `"allowJs": true` under `compilerOptions` (simplest), or create local `.d.ts` shims in `src/types/collab-api.d.ts`:
686
-
687
- ```ts
688
- declare module '@/lib/collab/api/messages' {
689
- import type { NextRequest } from 'next/server';
690
- type Ctx = { params: Promise<{ id: string }> };
691
- export function GET(req: NextRequest, ctx: Ctx): Promise<Response>;
692
- export function POST(req: NextRequest, ctx: Ctx): Promise<Response>;
693
- export function DELETE(req: NextRequest, ctx: Ctx): Promise<Response>;
694
- }
695
- // …similar blocks for messageById, context, contextByKey
696
- ```
697
-
698
- Prefer `allowJs: true` — less boilerplate, same type safety (handlers are JS so there's no extra type checking to gain).
699
-
700
- **Step 5: Verify + commit**
701
-
702
- Run: `grep -rn "from '@/lib/teams'" src/app/api/workspaces/`
703
- Expected: no matches.
704
-
705
- Run: `npm run build 2>&1 | tail -30`
706
- Expected: success.
707
-
708
- ```bash
709
- git add -u src/app/api/workspaces src/lib/collab tsconfig.json
710
- git commit -m "feat(collab): rewrite workspace messages/context routes to call local modules"
711
- ```
712
-
713
- ---
714
-
715
- ### Task B9: Update `src/lib/config.ts`
716
-
717
- **Files:**
718
- - Modify: `src/lib/config.ts:5-7,22-32`
719
-
720
- **Step 1: Replace imports**
721
-
722
- Current:
723
-
724
- ```ts
725
- import { HAS_MULTIUSER } from '@/lib/tier';
726
- import { getTeams } from '@/lib/teams';
727
- ```
728
-
729
- Replace with:
730
-
731
- ```ts
732
- import { IS_MULTIUSER } from '@/lib/flags'; // Phase C renames tier → flags
733
- import { resolveShellUser } from '@/lib/admin';
734
- ```
735
-
736
- **Step 2: Replace the `getTeams()?.admin.resolveShellUser(...)` block**
737
-
738
- Current (lines 22-32):
739
-
740
- ```ts
741
- export function getUserPaths(username: string) {
742
- let resolvedUser = username;
743
- if (HAS_MULTIUSER) {
744
- try {
745
- const teams = getTeams();
746
- if (teams) resolvedUser = teams.admin.resolveShellUser(username);
747
- } catch {}
748
- }
749
- // ...
750
- ```
751
-
752
- Replace with:
753
-
754
- ```ts
755
- export function getUserPaths(username: string) {
756
- let resolvedUser = username;
757
- if (IS_MULTIUSER) {
758
- try {
759
- resolvedUser = resolveShellUser(username);
760
- } catch {}
761
- }
762
- // ...
763
- ```
764
-
765
- **Step 3: Verify**
766
-
767
- Run: `grep -n "getTeams\|HAS_MULTIUSER" src/lib/config.ts`
768
- Expected: no matches.
769
-
770
- **Step 4: Note — the `IS_MULTIUSER` import won't resolve yet**
771
-
772
- `@/lib/flags` doesn't exist until Phase C. This is deliberate — keep the edit in this task so the config change lands with the teams fold-in, and let Phase C introduce the flags module that this now depends on. Leave the file in a broken import state; `npm run build` will fail on this file only. The next task fixes it.
773
-
774
- ---
775
-
776
- ### Task B10: Delete `src/lib/teams.ts`
777
-
778
- **Files:**
779
- - Delete: `src/lib/teams.ts`
780
-
781
- **Step 1: Confirm no remaining imports**
782
-
783
- Run: `grep -rn "from '@/lib/teams'\|getTeams\|hasTeams" src/`
784
- Expected: only matches inside `src/lib/teams.ts` itself.
785
-
786
- **Step 2: Delete**
787
-
788
- ```bash
789
- rm src/lib/teams.ts
790
- ```
791
-
792
- **Step 3: Commit (partial — build still broken on flags.ts)**
793
-
794
- ```bash
795
- git add -u
796
- git commit -m "refactor(teams): drop @spaces/teams stub; use local modules"
797
- ```
798
-
799
- ---
800
-
801
- ## Phase C — Replace `tier.ts` with `flags.ts`
802
-
803
- ### Task C1: Create `src/lib/flags.ts`
804
-
805
- **Files:**
806
- - Create: `src/lib/flags.ts`
807
-
808
- **Step 1: Write the module**
809
-
810
- ```ts
811
- /**
812
- * Runtime flags for the consolidated Spaces app.
813
- *
814
- * IS_MULTIUSER — when true, middleware enforces login, admin routes are live,
815
- * and config.ts resolves shell users via the admin DB. When false (default),
816
- * the app runs as a solo desktop workspace manager with no login.
817
- *
818
- * Federation is always on. The /api/network/* routes are live regardless of
819
- * mode; list endpoints return empty arrays when no peer nodes are configured.
820
- */
821
- export const IS_MULTIUSER: boolean =
822
- process.env.SPACES_MULTIUSER === '1' ||
823
- process.env.NEXT_PUBLIC_MULTIUSER === '1';
824
-
825
- export const IS_DESKTOP: boolean = !IS_MULTIUSER;
826
-
827
- /** Returned from /api/tier (name kept for route compatibility). */
828
- export function getTierFlags() {
829
- let version = '0.0.0';
830
- try { version = require('../../package.json').version; } catch {}
831
- return {
832
- tier: IS_MULTIUSER ? 'team' : 'community',
833
- version,
834
- hasAuth: IS_MULTIUSER,
835
- hasAdmin: IS_MULTIUSER,
836
- hasCollaboration: IS_MULTIUSER,
837
- hasNetwork: true,
838
- hasMultiuser: IS_MULTIUSER,
839
- hasCortex: process.env.SPACES_HAS_CORTEX === '1',
840
- isDesktop: IS_DESKTOP,
841
- basePath: process.env.SPACES_BASE_PATH || '',
842
- };
843
- }
844
- ```
845
-
846
- **Step 2: Commit**
847
-
848
- ```bash
849
- git add src/lib/flags.ts
850
- git commit -m "feat(flags): add IS_MULTIUSER runtime flag (federation always on)"
851
- ```
852
-
853
- ---
854
-
855
- ### Task C2: Point existing tier imports at `flags.ts`
856
-
857
- **Files:**
858
- - Modify: `src/middleware.ts:2`
859
- - Modify: `src/lib/auth/context.ts:4` (formerly `src/lib/auth.ts`)
860
- - Modify: `src/app/api/tier/route.ts`
861
- - Modify: `src/app/api/cortex/federation/search/route.ts`
862
- - Modify: any other file with `from '@/lib/tier'`
863
-
864
- **Step 1: Enumerate consumers**
865
-
866
- Run: `grep -rln "from '@/lib/tier'" src/`
867
-
868
- Expected matches (approx):
869
- - `src/middleware.ts` — uses `HAS_AUTH`
870
- - `src/lib/auth/context.ts` — uses `HAS_AUTH`
871
- - `src/lib/config.ts` — already changed in Task B9 to `IS_MULTIUSER` from flags
872
- - `src/app/api/tier/route.ts` — uses `getTierFlags`
873
- - `src/app/api/cortex/federation/search/route.ts` — uses `IS_FEDERATION`
874
-
875
- **Step 2: For each file, swap the import path and flag names**
876
-
877
- | Old import | New import | Old flag | New flag |
878
- |---|---|---|---|
879
- | `from '@/lib/tier'` | `from '@/lib/flags'` | `HAS_AUTH` | `IS_MULTIUSER` |
880
- | `from '@/lib/tier'` | `from '@/lib/flags'` | `HAS_MULTIUSER` | `IS_MULTIUSER` |
881
- | `from '@/lib/tier'` | *(remove import)* | `HAS_NETWORK` | *(federation always-on; delete the guard)* |
882
- | `from '@/lib/tier'` | *(remove import)* | `IS_FEDERATION` | *(federation always-on; delete the guard)* |
883
- | `from '@/lib/tier'` | `from '@/lib/flags'` | `getTierFlags` | `getTierFlags` (same) |
884
- | `from '@/lib/tier'` | `from '@/lib/flags'` | `IS_DESKTOP` | `IS_DESKTOP` (same) |
885
-
886
- For the one `IS_FEDERATION` consumer (`src/app/api/cortex/federation/search/route.ts`), delete the guard block entirely:
887
-
888
- ```ts
889
- // before
890
- import { IS_FEDERATION } from '@/lib/tier';
891
- // ...
892
- if (!IS_FEDERATION) {
893
- return NextResponse.json({ error: 'Federation not available' }, { status: 403 });
894
- }
895
-
896
- // after — drop the import and the block; federation is always on
897
- ```
898
-
899
- Example — `src/middleware.ts`:
900
-
901
- ```ts
902
- // before
903
- import { HAS_AUTH } from '@/lib/tier';
904
- if (!HAS_AUTH) return NextResponse.next();
905
-
906
- // after
907
- import { IS_MULTIUSER } from '@/lib/flags';
908
- if (!IS_MULTIUSER) return NextResponse.next();
909
- ```
910
-
911
- `src/lib/auth/context.ts` (same pattern — just rename the import).
912
-
913
- **Step 3: Verify**
914
-
915
- Run: `grep -rn "from '@/lib/tier'" src/`
916
- Expected: no matches.
917
-
918
- Run: `grep -rn "HAS_AUTH\|HAS_MULTIUSER\|HAS_NETWORK" src/`
919
- Expected: no matches.
920
-
921
- Run: `npm run build 2>&1 | tail -30`
922
- Expected: success.
923
-
924
- **Step 4: Commit**
925
-
926
- ```bash
927
- git add -u
928
- git commit -m "refactor(flags): swap @/lib/tier imports to @/lib/flags"
929
- ```
930
-
931
- ---
932
-
933
- ### Task C3: Delete `src/lib/tier.ts`
934
-
935
- **Files:**
936
- - Delete: `src/lib/tier.ts`
937
-
938
- **Step 1: Delete**
939
-
940
- ```bash
941
- rm src/lib/tier.ts
942
- ```
943
-
944
- **Step 2: Verify + commit**
945
-
946
- ```bash
947
- npm run build 2>&1 | tail -20
948
- git add -u
949
- git commit -m "refactor(flags): drop src/lib/tier.ts"
950
- ```
951
-
952
- ---
953
-
954
- ## Phase D — Launcher simplification + binaries + deps
955
-
956
- ### Task D1: Add npm deps
957
-
958
- **Files:**
959
- - Modify: `package.json`
960
-
961
- **Step 1: Add runtime deps**
962
-
963
- In `package.json` under `"dependencies"`, add (alphabetical order):
964
-
965
- ```json
966
- "otpauth": "^9.0.0",
967
- "qrcode": "^1.5.0",
968
- ```
969
-
970
- `@modelcontextprotocol/sdk` and `better-sqlite3` are already listed.
971
-
972
- **Step 2: Add dev type deps**
973
-
974
- Under `"devDependencies"`, verify `@types/qrcode` is present (it is). No change needed.
975
-
976
- **Step 3: Install**
977
-
978
- ```bash
979
- npm install
980
- ```
981
-
982
- Expected: lockfile updates, no errors.
983
-
984
- **Step 4: Verify the now-complete TS build**
985
-
986
- Run: `npm run build 2>&1 | tail -30`
987
- Expected: success. If `src/lib/auth/totp.ts` flagged `otpauth`/`qrcode` unresolved earlier, it now resolves.
988
-
989
- **Step 5: Commit**
990
-
991
- ```bash
992
- git add package.json package-lock.json
993
- git commit -m "feat(deps): add otpauth + qrcode for local TOTP/admin"
994
- ```
995
-
996
- ---
997
-
998
- ### Task D2: Copy teams binaries into `bin/`
999
-
1000
- **Files:**
1001
- - Create: `bin/spaces-msg.js` (from `spaces-teams/bin/spaces-msg.js`)
1002
- - Create: `bin/spaces-mcp.js` (from `spaces-teams/bin/mcp-server.js`)
1003
- - Create: `bin/spaces-hook.js` (from `spaces-teams/bin/spaces-hook.js`)
1004
- - Modify: `package.json` (add `spaces-msg` bin entry)
1005
-
1006
- **Step 1: Copy**
1007
-
1008
- ```bash
1009
- cp /home/jlongo/development/spaces-teams/bin/spaces-msg.js bin/spaces-msg.js
1010
- cp /home/jlongo/development/spaces-teams/bin/mcp-server.js bin/spaces-mcp.js
1011
- cp /home/jlongo/development/spaces-teams/bin/spaces-hook.js bin/spaces-hook.js
1012
- chmod +x bin/spaces-msg.js bin/spaces-mcp.js bin/spaces-hook.js
1013
- ```
1014
-
1015
- **Step 2: Update requires inside each bin file**
1016
-
1017
- Run: `grep -n "require('" bin/spaces-msg.js bin/spaces-mcp.js bin/spaces-hook.js`
1018
-
1019
- Any `require('@spaces/teams')` or `require('../src/...')` needs to point at the new location. Most likely these scripts import local modules under `spaces-teams/src/`; update to `../src/lib/collab/...` or `../src/lib/admin/...` as appropriate.
1020
-
1021
- Specifically:
1022
- - `bin/spaces-msg.js` makes HTTP calls to the running server, no internal requires — likely no changes.
1023
- - `bin/spaces-mcp.js` (MCP server) probably requires broker/queries — update to `../src/lib/collab/broker` etc.
1024
- - `bin/spaces-hook.js` likely similar.
1025
-
1026
- **Step 3: Add `spaces-msg` to `package.json#bin`**
1027
-
1028
- Current:
1029
-
1030
- ```json
1031
- "bin": {
1032
- "spaces": "./bin/spaces.js"
1033
- },
1034
- ```
1035
-
1036
- Change to:
1037
-
1038
- ```json
1039
- "bin": {
1040
- "spaces": "./bin/spaces.js",
1041
- "spaces-msg": "./bin/spaces-msg.js"
1042
- },
1043
- ```
1044
-
1045
- (`spaces-mcp` and `spaces-hook` are invoked via absolute path from config files — no bin entry.)
1046
-
1047
- **Step 4: Commit**
1048
-
1049
- ```bash
1050
- git add bin/spaces-msg.js bin/spaces-mcp.js bin/spaces-hook.js package.json
1051
- git commit -m "feat(bin): fold @spaces/teams binaries into spaces/bin"
1052
- ```
1053
-
1054
- ---
1055
-
1056
- ### Task D3: Strip tier detection from `bin/spaces.js`
1057
-
1058
- **Files:**
1059
- - Modify: `bin/spaces.js` (delete lines ~242-360 tier/NODE_PATH block; simplify auto-setup trigger)
1060
-
1061
- **Step 1: Identify the block**
1062
-
1063
- Run: `sed -n '240,360p' bin/spaces.js`
1064
-
1065
- The block covers:
1066
- - Tier resolution (CLI → env → config → auto-detect)
1067
- - "Server tier prerequisites" check (requires `@spaces/teams` for team, `@spaces/pro` for federation)
1068
- - Session secret lookup + `autoSetup` call (gated on `tier !== 'community'`)
1069
- - NODE_PATH munging for pro/teams/cortex
1070
- - Smoke-test load of `@spaces/teams`
1071
-
1072
- **Step 2: Replace with a simpler block**
1073
-
1074
- Replace lines 242-360 with:
1075
-
1076
- ```js
1077
- // ─── Multiuser flag ────────────────────────────────────────
1078
- // Launcher stays in "desktop" mode unless the operator opts in via env or CLI.
1079
- // Multiuser enables login, admin UI, and the admin.db / session_secret bootstrap.
1080
- // Federation is always on — the /api/network/* routes exist regardless of mode.
1081
- const isMultiuser = cliFlags.multiuser === true
1082
- || process.env.SPACES_MULTIUSER === '1'
1083
- || savedConfig.multiuser === true;
1084
-
1085
- console.log('');
1086
- console.log(' Spaces - Agent Workspace Manager');
1087
- console.log(' =================================');
1088
- console.log('');
1089
- console.log(` Mode: ${isMultiuser ? 'multiuser' : 'desktop'}`);
1090
-
1091
- const childEnv = { ...process.env };
1092
-
1093
- if (isMultiuser) {
1094
- // Ensure session secret + admin DB exist. The auto-setup helper handles both.
1095
- let sessionSecret = process.env.SPACES_SESSION_SECRET || '';
1096
- if (!sessionSecret && fs.existsSync(SESSION_SECRET_PATH)) {
1097
- sessionSecret = fs.readFileSync(SESSION_SECRET_PATH, 'utf-8').trim();
1098
- }
1099
- const adminDbPath = path.join(SPACES_DIR, 'admin.db');
1100
- if (!fs.existsSync(adminDbPath) || !sessionSecret) {
1101
- const { autoSetup } = require('./lib/auto-setup');
1102
- const result = autoSetup({ SPACES_DIR, SESSION_SECRET_PATH, ADMIN_DB_PATH: adminDbPath, CONFIG_PATH, port: PORT, basePath });
1103
- sessionSecret = result.sessionSecret;
1104
- }
1105
- childEnv.SPACES_SESSION_SECRET = sessionSecret;
1106
- process.env.SPACES_SESSION_SECRET = sessionSecret;
1107
- childEnv.SPACES_MULTIUSER = '1';
1108
- process.env.SPACES_MULTIUSER = '1';
1109
- console.log(` Admin DB: ${adminDbPath}`);
1110
- }
1111
-
1112
- if (basePath) {
1113
- childEnv.SPACES_BASE_PATH = basePath;
1114
- console.log(` Base path: ${basePath}`);
1115
- }
1116
- if (allowedOrigins) {
1117
- childEnv.SPACES_ALLOWED_ORIGINS = allowedOrigins;
1118
- process.env.SPACES_ALLOWED_ORIGINS = allowedOrigins;
1119
- console.log(` Allowed origins: ${allowedOrigins}`);
1120
- }
1121
- ```
1122
-
1123
- **Step 3: Remove the `require('@spaces/pro')` / `require('@spaces/teams')` resolution helpers**
1124
-
1125
- Run: `grep -n "@spaces/\\(pro\\|teams\\)" bin/spaces.js`
1126
-
1127
- Delete the functions around lines 749-780 (`resolveProPath`, `resolveTeamsPath`, probe logic). Replace any remaining references to `proPath`/`teamsPath`/`teamsPath` with literal `false` or delete the referencing code.
1128
-
1129
- **Step 4: Update help text**
1130
-
1131
- Replace CLI flag documentation for `--tier` with `--multiuser` and `--federation` flags. Remove the `install teams|pro` references.
1132
-
1133
- Replace (around lines 80-95):
1134
-
1135
- ```js
1136
- spaces install <teams|pro> Install a tier package
1137
- ```
1138
-
1139
- With: *(delete the line)*
1140
-
1141
- Replace:
1142
-
1143
- ```js
1144
- spaces --tier team Override tier (community|team|federation)
1145
- ```
1146
-
1147
- With:
1148
-
1149
- ```js
1150
- spaces --multiuser Enable multiuser mode (login, admin UI)
1151
- ```
1152
-
1153
- *(no `--federation` flag — federation is always on)*
1154
-
1155
- **Step 5: Update CLI flag parsing**
1156
-
1157
- Around lines 70-74, replace:
1158
-
1159
- ```js
1160
- else if (args[i] === '--tier' && args[i + 1]) { cliFlags.tier = args[++i]; }
1161
- ```
1162
-
1163
- With:
1164
-
1165
- ```js
1166
- else if (args[i] === '--multiuser') { cliFlags.multiuser = true; }
1167
- ```
1168
-
1169
- **Step 6: Verify the launcher boots**
1170
-
1171
- Run: `node bin/spaces.js --help | head -30`
1172
- Expected: help text shows `--multiuser` (no `--tier`), no `install teams|pro`.
1173
-
1174
- Run: `SPACES_DESKTOP=1 node bin/spaces-dev.js &` then `curl http://localhost:3457/api/tier | head`
1175
- Expected: JSON with `"tier": "community"`, `"hasAuth": false`.
1176
-
1177
- Kill the dev server: `pkill -f spaces-dev`.
1178
-
1179
- **Step 7: Commit**
1180
-
1181
- ```bash
1182
- git add bin/spaces.js
1183
- git commit -m "refactor(launcher): drop tier detection + NODE_PATH munging"
1184
- ```
1185
-
1186
- ---
1187
-
1188
- ### Task D4: Strip tier workflow from `bin/spaces-install.js`
1189
-
1190
- **Files:**
1191
- - Modify: `bin/spaces-install.js`
1192
-
1193
- **Step 1: Identify tier-only code**
1194
-
1195
- Run: `grep -n "@spaces/\\(pro\\|teams\\)\\|tierMap\\|tier =" bin/spaces-install.js`
1196
-
1197
- The file currently supports `spaces install <teams|pro|cortex>`. After fold-in, `teams` and `pro` are internal — only `cortex` remains installable.
1198
-
1199
- **Step 2: Delete `teams` and `pro` entries from the `PACKAGES` table**
1200
-
1201
- Around lines 36-50:
1202
-
1203
- ```js
1204
- const PACKAGES = {
1205
- teams: { name: '@spaces/teams', ... },
1206
- pro: { name: '@spaces/pro', ... },
1207
- cortex: { name: '@spaces/cortex', ... },
1208
- };
1209
- ```
1210
-
1211
- Delete the `teams` and `pro` keys; keep `cortex`.
1212
-
1213
- **Step 3: Delete tier-setting logic**
1214
-
1215
- Around lines 304-326 (the `tierMap = { teams: 'team', pro: 'federation' }` block and surrounding if/else), delete. Cortex install should no longer touch the tier field.
1216
-
1217
- Around lines 575-625 (uninstall path that resets tier to community), delete — cortex uninstall doesn't affect tier.
1218
-
1219
- **Step 4: Update help text**
1220
-
1221
- Replace `spaces install <teams|pro|cortex>` mentions with `spaces install cortex`.
1222
-
1223
- **Step 5: Verify**
1224
-
1225
- Run: `node bin/spaces-install.js --help 2>&1 | head -10`
1226
- Expected: only mentions cortex as an installable.
1227
-
1228
- Run: `node bin/spaces-install.js teams 2>&1 | head -5`
1229
- Expected: error "Unknown package: teams" (or similar), not a successful install attempt.
1230
-
1231
- **Step 6: Commit**
1232
-
1233
- ```bash
1234
- git add bin/spaces-install.js
1235
- git commit -m "refactor(install): remove teams+pro install workflow; cortex only"
1236
- ```
1237
-
1238
- ---
1239
-
1240
- ### Task D5: Update `bin/lib/auto-setup.js`
1241
-
1242
- **Files:**
1243
- - Modify: `bin/lib/auto-setup.js`
1244
-
1245
- **Step 1: Inspect current signature**
1246
-
1247
- Run: `head -40 bin/lib/auto-setup.js`
1248
-
1249
- The function receives `tier` in its args bag. After fold-in, `tier` is meaningless — auto-setup either runs (multiuser enabled) or doesn't (launcher never calls it in desktop mode).
1250
-
1251
- **Step 2: Remove `tier` from the function signature and body**
1252
-
1253
- Delete any reference to `args.tier` or the variable `tier` inside the function. The function's only job is: ensure `SPACES_DIR` exists, write a session secret if missing, create the admin DB from the teams' migrations module.
1254
-
1255
- **Step 3: Update the migrations import**
1256
-
1257
- The function currently does `require('@spaces/teams/bus/broker')` or similar to run migrations. Update to:
1258
-
1259
- ```js
1260
- const collabMigrations = require('../../src/lib/collab/migrations');
1261
- const adminDb = require('../../src/lib/admin/db');
1262
- // ... call collabMigrations.runMigrations(...) and adminDb.getAdminDb() ...
1263
- ```
1264
-
1265
- (Verify the actual APIs of the copied modules — the existing auto-setup.js should have the call pattern; just retarget the paths.)
1266
-
1267
- **Step 4: Verify**
1268
-
1269
- Run: `rm -f /tmp/test-setup/admin.db /tmp/test-setup/session_secret && SPACES_DIR=/tmp/test-setup node -e "require('./bin/lib/auto-setup').autoSetup({ SPACES_DIR: '/tmp/test-setup', SESSION_SECRET_PATH: '/tmp/test-setup/session_secret', ADMIN_DB_PATH: '/tmp/test-setup/admin.db', CONFIG_PATH: '/tmp/test-setup/config.json', port: 3457, basePath: '' })"`
1270
-
1271
- Expected: creates admin.db + session_secret, prints success.
1272
-
1273
- Clean up: `rm -rf /tmp/test-setup`.
1274
-
1275
- **Step 5: Commit**
1276
-
1277
- ```bash
1278
- git add bin/lib/auto-setup.js
1279
- git commit -m "refactor(auto-setup): drop tier arg; target local migrations"
1280
- ```
1281
-
1282
- ---
1283
-
1284
- ## Phase E — Smoke, docs, archive
1285
-
1286
- ### Task E1: Smoke-test desktop mode
1287
-
1288
- **Step 1: Fresh dev boot in desktop mode**
1289
-
1290
- ```bash
1291
- pkill -f spaces-dev 2>/dev/null; sleep 1
1292
- npm run dev > /tmp/spaces-dev.log 2>&1 &
1293
- sleep 10
1294
- ```
1295
-
1296
- **Step 2: Verify `/api/tier` reflects desktop**
1297
-
1298
- ```bash
1299
- curl -s http://localhost:3457/api/tier | head
1300
- ```
1301
-
1302
- Expected: `"tier":"community"`, `"hasAuth":false`, `"hasMultiuser":false`.
1303
-
1304
- **Step 3: Verify root page loads without redirect to /login**
1305
-
1306
- ```bash
1307
- curl -sI http://localhost:3457/ | head -5
1308
- ```
1309
-
1310
- Expected: `HTTP/1.1 200` (or 307 to `/m/` on mobile UA, but not to `/login`).
1311
-
1312
- **Step 4: Verify `/api/workspaces` responds (no auth required)**
1313
-
1314
- ```bash
1315
- curl -s http://localhost:3457/api/workspaces | head
1316
- ```
1317
-
1318
- Expected: JSON array (possibly empty), no 401.
1319
-
1320
- **Step 5: Verify `/api/network/health` responds (federation is always on)**
1321
-
1322
- ```bash
1323
- curl -s http://localhost:3457/api/network/health | head
1324
- ```
1325
-
1326
- Expected: 200 with health payload. No "Requires @spaces/pro" 404 — federation is now always available.
1327
-
1328
- **Step 6: Shut down**
1329
-
1330
- ```bash
1331
- pkill -f spaces-dev
1332
- ```
1333
-
1334
- ---
1335
-
1336
- ### Task E2: Smoke-test multiuser mode
1337
-
1338
- **Step 1: Provision secret + admin DB**
1339
-
1340
- ```bash
1341
- rm -rf ~/.spaces/admin.db ~/.spaces/session_secret 2>/dev/null
1342
- SPACES_MULTIUSER=1 node bin/spaces.js setup-admin # creates initial admin
1343
- ```
1344
-
1345
- If `setup-admin` prompts for credentials, enter a test user (e.g., `admin` / `admin-test-pw`).
1346
-
1347
- **Step 2: Boot in multiuser mode**
1348
-
1349
- ```bash
1350
- SPACES_MULTIUSER=1 npm run dev > /tmp/spaces-dev.log 2>&1 &
1351
- sleep 10
1352
- ```
1353
-
1354
- **Step 3: Verify redirect to /login for root**
1355
-
1356
- ```bash
1357
- curl -sI http://localhost:3457/ | head -5
1358
- ```
1359
-
1360
- Expected: `HTTP/1.1 307` → `Location: /login?...`.
1361
-
1362
- **Step 4: Verify `/api/auth/login` accepts the admin credentials**
1363
-
1364
- ```bash
1365
- curl -s -X POST http://localhost:3457/api/auth/login \
1366
- -H 'Content-Type: application/json' \
1367
- -d '{"username":"admin","password":"admin-test-pw"}' \
1368
- -c /tmp/spaces-cookies.txt | head
1369
- ```
1370
-
1371
- Expected: JSON with `{"ok":true,...}` and a `spaces-session` cookie set.
1372
-
1373
- **Step 5: Verify `/api/admin/users` with the session returns the user list**
1374
-
1375
- ```bash
1376
- curl -s http://localhost:3457/api/admin/users -b /tmp/spaces-cookies.txt | head
1377
- ```
1378
-
1379
- Expected: JSON array containing the admin user.
1380
-
1381
- **Step 6: Shut down**
1382
-
1383
- ```bash
1384
- pkill -f spaces-dev
1385
- rm -f /tmp/spaces-cookies.txt
1386
- ```
1387
-
1388
- ---
1389
-
1390
- ### Task E3: Run the existing test suite
1391
-
1392
- ```bash
1393
- npm test 2>&1 | tail -40
1394
- ```
1395
-
1396
- Expected: green. If a test references `@spaces/pro` / `@spaces/teams` / `@/lib/pro` / `@/lib/teams`, fix it (replace with the new module path) before committing.
1397
-
1398
- ---
1399
-
1400
- ### Task E4: Archive the retired repos
1401
-
1402
- **Files:**
1403
- - Move: `/home/jlongo/development/spaces-pro/` → `~/archive/spaces-pro/`
1404
- - Move: `/home/jlongo/development/spaces-teams/` → `~/archive/spaces-teams/`
1405
-
1406
- **Step 1: Create archive dir**
1407
-
1408
- ```bash
1409
- mkdir -p ~/archive
1410
- ```
1411
-
1412
- **Step 2: Confirm the GitHub remotes are up to date before moving (safety)**
1413
-
1414
- ```bash
1415
- cd /home/jlongo/development/spaces-pro && git status && git log -1 --oneline
1416
- cd /home/jlongo/development/spaces-teams && git status && git log -1 --oneline
1417
- cd /home/jlongo/development/spaces
1418
- ```
1419
-
1420
- Expected: each shows a clean tree (or known uncommitted state that was intentional). If dirty, commit + push the remaining work on each repo before archiving. **Do not archive over uncommitted work.**
1421
-
1422
- **Step 3: Move**
1423
-
1424
- ```bash
1425
- mv /home/jlongo/development/spaces-pro ~/archive/
1426
- mv /home/jlongo/development/spaces-teams ~/archive/
1427
- ```
1428
-
1429
- **Step 4: Confirm no leftover reference from spaces**
1430
-
1431
- ```bash
1432
- cd /home/jlongo/development/spaces
1433
- grep -rn "spaces-pro\|spaces-teams" docs/ README.md package.json 2>/dev/null | grep -v "2026-04-23-consolidate-addons" | head -10
1434
- ```
1435
-
1436
- Expected: no matches outside the plan docs. If there are stale doc references, update them (or delete).
1437
-
1438
- ---
1439
-
1440
- ### Task E5: Update README + docs
1441
-
1442
- **Files:**
1443
- - Modify: `README.md`
1444
- - Modify: `docs/architecture.md` (if it mentions tiers/addons)
1445
-
1446
- **Step 1: Sweep the README for tier mentions**
1447
-
1448
- Run: `grep -n "tier\|@spaces/teams\|@spaces/pro\|install teams\|install pro" README.md`
1449
-
1450
- For each hit, update:
1451
- - Drop any mention of `spaces install teams` / `spaces install pro`.
1452
- - Replace "community / team / federation tier" language with "desktop (default) / multiuser (`--multiuser`)". Federation is always on and needs no flag.
1453
- - Keep cortex mentions intact — it's still an addon.
1454
-
1455
- **Step 2: Bump version**
1456
-
1457
- `package.json`: `"version": "0.9.10"` → `"version": "0.10.0"`.
1458
-
1459
- **Step 3: Commit**
1460
-
1461
- ```bash
1462
- git add README.md docs/ package.json package-lock.json
1463
- git commit -m "docs: document multiuser/federation flags; drop tier terminology"
1464
- ```
1465
-
1466
- ---
1467
-
1468
- ### Task E6: Final verification
1469
-
1470
- **Step 1: Clean install test**
1471
-
1472
- ```bash
1473
- rm -rf node_modules .next
1474
- npm ci
1475
- npm run build 2>&1 | tail -20
1476
- ```
1477
-
1478
- Expected: green build from scratch.
1479
-
1480
- **Step 2: Grep for dead references**
1481
-
1482
- ```bash
1483
- grep -rn "@spaces/pro\|@spaces/teams\|from '@/lib/pro'\|from '@/lib/teams'\|from '@/lib/tier'\|getPro\|hasPro\|getTeams\|hasTeams\|HAS_AUTH\|HAS_MULTIUSER\|HAS_NETWORK\|IS_FEDERATION\|SPACES_TIER\|SPACES_FEDERATION" src/ bin/ scripts/ 2>/dev/null | head -20
1484
- ```
1485
-
1486
- Expected: no matches (outside the plan/design docs — grep excludes `docs/` above).
1487
-
1488
- **Step 3: Final commit + tag**
1489
-
1490
- ```bash
1491
- git tag v0.10.0
1492
- git log --oneline -20
1493
- ```
1494
-
1495
- Expected: clean history of phase commits.
1496
-
1497
- ---
1498
-
1499
- ## Self-review checklist
1500
-
1501
- Run through this before marking the plan done:
1502
-
1503
- - [ ] **Phase coverage:** pro → teams → flags → launcher → deps → binaries → smoke. Any phase missing?
1504
- - [ ] **Route coverage:** 20 network routes, 7 auth routes, 3 admin routes, 4 collab routes rewritten. All accounted for in Tasks A3, B6, B7, B8.
1505
- - [ ] **Placeholder scan:** search this file for "TBD", "TODO", "implement later" — should be zero matches.
1506
- - [ ] **Type consistency:** `IS_MULTIUSER` / `IS_FEDERATION` / `IS_DESKTOP` spelled identically across plan + design + code samples.
1507
- - [ ] **Cortex untouched:** no task modifies `src/lib/cortex/*`, the cortex stub, or `@spaces/cortex` resolution.
1508
- - [ ] **Desktop default preserved:** middleware's early-return behavior on `!IS_MULTIUSER` matches the old `!HAS_AUTH` — same UX for solo users.
1509
- - [ ] **Commit per task:** every task ends with a `git commit` step — no drift between tasks.