@jlongo78/agent-spaces 0.7.2 → 0.7.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 (605) hide show
  1. package/.next/standalone/.next/BUILD_ID +1 -1
  2. package/.next/standalone/.next/app-path-routes-manifest.json +8 -0
  3. package/.next/standalone/.next/build-manifest.json +2 -2
  4. package/.next/standalone/.next/routes-manifest.json +48 -0
  5. package/.next/standalone/.next/server/app/(desktop)/admin/analytics/page.js +1 -1
  6. package/.next/standalone/.next/server/app/(desktop)/admin/analytics/page.js.nft.json +1 -1
  7. package/.next/standalone/.next/server/app/(desktop)/admin/analytics/page_client-reference-manifest.js +1 -1
  8. package/.next/standalone/.next/server/app/(desktop)/admin/users/page.js +1 -1
  9. package/.next/standalone/.next/server/app/(desktop)/admin/users/page.js.nft.json +1 -1
  10. package/.next/standalone/.next/server/app/(desktop)/admin/users/page_client-reference-manifest.js +1 -1
  11. package/.next/standalone/.next/server/app/(desktop)/analytics/page.js +1 -1
  12. package/.next/standalone/.next/server/app/(desktop)/analytics/page.js.nft.json +1 -1
  13. package/.next/standalone/.next/server/app/(desktop)/analytics/page_client-reference-manifest.js +1 -1
  14. package/.next/standalone/.next/server/app/(desktop)/cortex/page.js +1 -1
  15. package/.next/standalone/.next/server/app/(desktop)/cortex/page.js.nft.json +1 -1
  16. package/.next/standalone/.next/server/app/(desktop)/cortex/page_client-reference-manifest.js +1 -1
  17. package/.next/standalone/.next/server/app/(desktop)/network/page.js +1 -1
  18. package/.next/standalone/.next/server/app/(desktop)/network/page.js.nft.json +1 -1
  19. package/.next/standalone/.next/server/app/(desktop)/network/page_client-reference-manifest.js +1 -1
  20. package/.next/standalone/.next/server/app/(desktop)/page.js +1 -1
  21. package/.next/standalone/.next/server/app/(desktop)/page.js.nft.json +1 -1
  22. package/.next/standalone/.next/server/app/(desktop)/page_client-reference-manifest.js +1 -1
  23. package/.next/standalone/.next/server/app/(desktop)/projects/page.js +1 -1
  24. package/.next/standalone/.next/server/app/(desktop)/projects/page.js.nft.json +1 -1
  25. package/.next/standalone/.next/server/app/(desktop)/projects/page_client-reference-manifest.js +1 -1
  26. package/.next/standalone/.next/server/app/(desktop)/sessions/[id]/page.js +1 -1
  27. package/.next/standalone/.next/server/app/(desktop)/sessions/[id]/page.js.nft.json +1 -1
  28. package/.next/standalone/.next/server/app/(desktop)/sessions/[id]/page_client-reference-manifest.js +1 -1
  29. package/.next/standalone/.next/server/app/(desktop)/sessions/page.js +1 -1
  30. package/.next/standalone/.next/server/app/(desktop)/sessions/page.js.nft.json +1 -1
  31. package/.next/standalone/.next/server/app/(desktop)/sessions/page_client-reference-manifest.js +1 -1
  32. package/.next/standalone/.next/server/app/(desktop)/settings/page.js +1 -1
  33. package/.next/standalone/.next/server/app/(desktop)/settings/page.js.nft.json +1 -1
  34. package/.next/standalone/.next/server/app/(desktop)/settings/page_client-reference-manifest.js +1 -1
  35. package/.next/standalone/.next/server/app/(desktop)/terminal/page.js +1 -1
  36. package/.next/standalone/.next/server/app/(desktop)/terminal/page.js.nft.json +1 -1
  37. package/.next/standalone/.next/server/app/(desktop)/terminal/page_client-reference-manifest.js +1 -1
  38. package/.next/standalone/.next/server/app/(desktop)/terminal/pane/[id]/page.js +1 -1
  39. package/.next/standalone/.next/server/app/(desktop)/terminal/pane/[id]/page.js.nft.json +1 -1
  40. package/.next/standalone/.next/server/app/(desktop)/terminal/pane/[id]/page_client-reference-manifest.js +1 -1
  41. package/.next/standalone/.next/server/app/(desktop)/terminal/remote/[nodeId]/[workspaceId]/page.js +1 -1
  42. package/.next/standalone/.next/server/app/(desktop)/terminal/remote/[nodeId]/[workspaceId]/page.js.nft.json +1 -1
  43. package/.next/standalone/.next/server/app/(desktop)/terminal/remote/[nodeId]/[workspaceId]/page_client-reference-manifest.js +1 -1
  44. package/.next/standalone/.next/server/app/(desktop)/workspaces/page.js +1 -1
  45. package/.next/standalone/.next/server/app/(desktop)/workspaces/page.js.nft.json +1 -1
  46. package/.next/standalone/.next/server/app/(desktop)/workspaces/page_client-reference-manifest.js +1 -1
  47. package/.next/standalone/.next/server/app/_global-error.html +2 -2
  48. package/.next/standalone/.next/server/app/_global-error.rsc +1 -1
  49. package/.next/standalone/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  50. package/.next/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  51. package/.next/standalone/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  52. package/.next/standalone/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  53. package/.next/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  54. package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  55. package/.next/standalone/.next/server/app/_not-found.html +1 -1
  56. package/.next/standalone/.next/server/app/_not-found.rsc +2 -2
  57. package/.next/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +2 -2
  58. package/.next/standalone/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
  59. package/.next/standalone/.next/server/app/_not-found.segments/_index.segment.rsc +2 -2
  60. package/.next/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  61. package/.next/standalone/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  62. package/.next/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  63. package/.next/standalone/.next/server/app/admin/analytics.html +1 -1
  64. package/.next/standalone/.next/server/app/admin/analytics.rsc +17 -16
  65. package/.next/standalone/.next/server/app/admin/analytics.segments/!KGRlc2t0b3Ap/admin/analytics/__PAGE__.segment.rsc +2 -2
  66. package/.next/standalone/.next/server/app/admin/analytics.segments/!KGRlc2t0b3Ap/admin/analytics.segment.rsc +1 -1
  67. package/.next/standalone/.next/server/app/admin/analytics.segments/!KGRlc2t0b3Ap/admin.segment.rsc +1 -1
  68. package/.next/standalone/.next/server/app/admin/analytics.segments/!KGRlc2t0b3Ap.segment.rsc +5 -4
  69. package/.next/standalone/.next/server/app/admin/analytics.segments/_full.segment.rsc +17 -16
  70. package/.next/standalone/.next/server/app/admin/analytics.segments/_head.segment.rsc +1 -1
  71. package/.next/standalone/.next/server/app/admin/analytics.segments/_index.segment.rsc +2 -2
  72. package/.next/standalone/.next/server/app/admin/analytics.segments/_tree.segment.rsc +2 -2
  73. package/.next/standalone/.next/server/app/admin/users.html +1 -1
  74. package/.next/standalone/.next/server/app/admin/users.rsc +17 -16
  75. package/.next/standalone/.next/server/app/admin/users.segments/!KGRlc2t0b3Ap/admin/users/__PAGE__.segment.rsc +2 -2
  76. package/.next/standalone/.next/server/app/admin/users.segments/!KGRlc2t0b3Ap/admin/users.segment.rsc +1 -1
  77. package/.next/standalone/.next/server/app/admin/users.segments/!KGRlc2t0b3Ap/admin.segment.rsc +1 -1
  78. package/.next/standalone/.next/server/app/admin/users.segments/!KGRlc2t0b3Ap.segment.rsc +5 -4
  79. package/.next/standalone/.next/server/app/admin/users.segments/_full.segment.rsc +17 -16
  80. package/.next/standalone/.next/server/app/admin/users.segments/_head.segment.rsc +1 -1
  81. package/.next/standalone/.next/server/app/admin/users.segments/_index.segment.rsc +2 -2
  82. package/.next/standalone/.next/server/app/admin/users.segments/_tree.segment.rsc +2 -2
  83. package/.next/standalone/.next/server/app/analytics.html +1 -1
  84. package/.next/standalone/.next/server/app/analytics.rsc +17 -16
  85. package/.next/standalone/.next/server/app/analytics.segments/!KGRlc2t0b3Ap/analytics/__PAGE__.segment.rsc +2 -2
  86. package/.next/standalone/.next/server/app/analytics.segments/!KGRlc2t0b3Ap/analytics.segment.rsc +1 -1
  87. package/.next/standalone/.next/server/app/analytics.segments/!KGRlc2t0b3Ap.segment.rsc +5 -4
  88. package/.next/standalone/.next/server/app/analytics.segments/_full.segment.rsc +17 -16
  89. package/.next/standalone/.next/server/app/analytics.segments/_head.segment.rsc +1 -1
  90. package/.next/standalone/.next/server/app/analytics.segments/_index.segment.rsc +2 -2
  91. package/.next/standalone/.next/server/app/analytics.segments/_tree.segment.rsc +2 -2
  92. package/.next/standalone/.next/server/app/api/admin/analytics/route.js +1 -1
  93. package/.next/standalone/.next/server/app/api/admin/analytics/route.js.nft.json +1 -1
  94. package/.next/standalone/.next/server/app/api/admin/users/[id]/route.js +1 -1
  95. package/.next/standalone/.next/server/app/api/admin/users/[id]/route.js.nft.json +1 -1
  96. package/.next/standalone/.next/server/app/api/admin/users/route.js +1 -1
  97. package/.next/standalone/.next/server/app/api/admin/users/route.js.nft.json +1 -1
  98. package/.next/standalone/.next/server/app/api/analytics/overview/route.js +3 -3
  99. package/.next/standalone/.next/server/app/api/analytics/overview/route.js.nft.json +1 -1
  100. package/.next/standalone/.next/server/app/api/auth/login/route.js +1 -1
  101. package/.next/standalone/.next/server/app/api/auth/login/route.js.nft.json +1 -1
  102. package/.next/standalone/.next/server/app/api/auth/logout/route.js +1 -1
  103. package/.next/standalone/.next/server/app/api/auth/logout/route.js.nft.json +1 -1
  104. package/.next/standalone/.next/server/app/api/auth/me/route.js +1 -1
  105. package/.next/standalone/.next/server/app/api/auth/me/route.js.nft.json +1 -1
  106. package/.next/standalone/.next/server/app/api/auth/totp/setup/route.js +1 -1
  107. package/.next/standalone/.next/server/app/api/auth/totp/setup/route.js.nft.json +1 -1
  108. package/.next/standalone/.next/server/app/api/auth/totp/status/route.js +1 -1
  109. package/.next/standalone/.next/server/app/api/auth/totp/status/route.js.nft.json +1 -1
  110. package/.next/standalone/.next/server/app/api/auth/totp/verify/route.js +1 -1
  111. package/.next/standalone/.next/server/app/api/auth/totp/verify/route.js.nft.json +1 -1
  112. package/.next/standalone/.next/server/app/api/bulk/route.js +2 -2
  113. package/.next/standalone/.next/server/app/api/bulk/route.js.nft.json +1 -1
  114. package/.next/standalone/.next/server/app/api/chat/route.js +1 -1
  115. package/.next/standalone/.next/server/app/api/chat/route.js.nft.json +1 -1
  116. package/.next/standalone/.next/server/app/api/config/route.js +1 -1
  117. package/.next/standalone/.next/server/app/api/config/route.js.nft.json +1 -1
  118. package/.next/standalone/.next/server/app/api/cortex/context/route.js +1 -1
  119. package/.next/standalone/.next/server/app/api/cortex/context/route.js.nft.json +1 -1
  120. package/.next/standalone/.next/server/app/api/cortex/curation/assess/route/app-paths-manifest.json +3 -0
  121. package/.next/standalone/.next/server/app/api/cortex/curation/assess/route/build-manifest.json +11 -0
  122. package/.next/standalone/.next/server/app/api/cortex/curation/assess/route/server-reference-manifest.json +4 -0
  123. package/.next/standalone/.next/server/app/api/cortex/curation/assess/route.js +7 -0
  124. package/.next/standalone/.next/server/app/api/cortex/curation/assess/route.js.map +5 -0
  125. package/.next/standalone/.next/server/app/api/cortex/curation/assess/route.js.nft.json +1 -0
  126. package/.next/standalone/.next/server/app/api/cortex/curation/assess/route_client-reference-manifest.js +2 -0
  127. package/.next/standalone/.next/server/app/api/cortex/curation/publish/route/app-paths-manifest.json +3 -0
  128. package/.next/standalone/.next/server/app/api/cortex/curation/publish/route/build-manifest.json +11 -0
  129. package/.next/standalone/.next/server/app/api/cortex/curation/publish/route/server-reference-manifest.json +4 -0
  130. package/.next/standalone/.next/server/app/api/cortex/curation/publish/route.js +7 -0
  131. package/.next/standalone/.next/server/app/api/cortex/curation/publish/route.js.map +5 -0
  132. package/.next/standalone/.next/server/app/api/cortex/curation/publish/route.js.nft.json +1 -0
  133. package/.next/standalone/.next/server/app/api/cortex/curation/publish/route_client-reference-manifest.js +2 -0
  134. package/.next/standalone/.next/server/app/api/cortex/curation/refine/route/app-paths-manifest.json +3 -0
  135. package/.next/standalone/.next/server/app/api/cortex/curation/refine/route/build-manifest.json +11 -0
  136. package/.next/standalone/.next/server/app/api/cortex/curation/refine/route/server-reference-manifest.json +4 -0
  137. package/.next/standalone/.next/server/app/api/cortex/curation/refine/route.js +7 -0
  138. package/.next/standalone/.next/server/app/api/cortex/curation/refine/route.js.map +5 -0
  139. package/.next/standalone/.next/server/app/api/cortex/curation/refine/route.js.nft.json +1 -0
  140. package/.next/standalone/.next/server/app/api/cortex/curation/refine/route_client-reference-manifest.js +2 -0
  141. package/.next/standalone/.next/server/app/api/cortex/curation/review/route/app-paths-manifest.json +3 -0
  142. package/.next/standalone/.next/server/app/api/cortex/curation/review/route/build-manifest.json +11 -0
  143. package/.next/standalone/.next/server/app/api/cortex/curation/review/route/server-reference-manifest.json +4 -0
  144. package/.next/standalone/.next/server/app/api/cortex/curation/review/route.js +7 -0
  145. package/.next/standalone/.next/server/app/api/cortex/curation/review/route.js.map +5 -0
  146. package/.next/standalone/.next/server/app/api/cortex/curation/review/route.js.nft.json +1 -0
  147. package/.next/standalone/.next/server/app/api/cortex/curation/review/route_client-reference-manifest.js +2 -0
  148. package/.next/standalone/.next/server/app/api/cortex/curation/seed/route/app-paths-manifest.json +3 -0
  149. package/.next/standalone/.next/server/app/api/cortex/curation/seed/route/build-manifest.json +11 -0
  150. package/.next/standalone/.next/server/app/api/cortex/curation/seed/route/server-reference-manifest.json +4 -0
  151. package/.next/standalone/.next/server/app/api/cortex/curation/seed/route.js +7 -0
  152. package/.next/standalone/.next/server/app/api/cortex/curation/seed/route.js.map +5 -0
  153. package/.next/standalone/.next/server/app/api/cortex/curation/seed/route.js.nft.json +1 -0
  154. package/.next/standalone/.next/server/app/api/cortex/curation/seed/route_client-reference-manifest.js +2 -0
  155. package/.next/standalone/.next/server/app/api/cortex/export/route.js +1 -1
  156. package/.next/standalone/.next/server/app/api/cortex/export/route.js.nft.json +1 -1
  157. package/.next/standalone/.next/server/app/api/cortex/federation/pending/route.js +1 -1
  158. package/.next/standalone/.next/server/app/api/cortex/federation/pending/route.js.nft.json +1 -1
  159. package/.next/standalone/.next/server/app/api/cortex/federation/resolve/route.js +1 -1
  160. package/.next/standalone/.next/server/app/api/cortex/federation/resolve/route.js.nft.json +1 -1
  161. package/.next/standalone/.next/server/app/api/cortex/federation/search/route.js +1 -1
  162. package/.next/standalone/.next/server/app/api/cortex/federation/search/route.js.nft.json +1 -1
  163. package/.next/standalone/.next/server/app/api/cortex/federation/teach/route.js +1 -1
  164. package/.next/standalone/.next/server/app/api/cortex/federation/teach/route.js.nft.json +1 -1
  165. package/.next/standalone/.next/server/app/api/cortex/graph/edges/route.js +1 -1
  166. package/.next/standalone/.next/server/app/api/cortex/graph/edges/route.js.nft.json +1 -1
  167. package/.next/standalone/.next/server/app/api/cortex/graph/entities/[id]/route.js +1 -1
  168. package/.next/standalone/.next/server/app/api/cortex/graph/entities/[id]/route.js.nft.json +1 -1
  169. package/.next/standalone/.next/server/app/api/cortex/graph/entities/route.js +1 -1
  170. package/.next/standalone/.next/server/app/api/cortex/graph/entities/route.js.nft.json +1 -1
  171. package/.next/standalone/.next/server/app/api/cortex/graph/populate/route.js +1 -1
  172. package/.next/standalone/.next/server/app/api/cortex/graph/populate/route.js.nft.json +1 -1
  173. package/.next/standalone/.next/server/app/api/cortex/import/route.js +1 -1
  174. package/.next/standalone/.next/server/app/api/cortex/import/route.js.nft.json +1 -1
  175. package/.next/standalone/.next/server/app/api/cortex/import/status/route.js +1 -1
  176. package/.next/standalone/.next/server/app/api/cortex/import/status/route.js.nft.json +1 -1
  177. package/.next/standalone/.next/server/app/api/cortex/ingest/bootstrap/route.js +1 -1
  178. package/.next/standalone/.next/server/app/api/cortex/ingest/bootstrap/route.js.nft.json +1 -1
  179. package/.next/standalone/.next/server/app/api/cortex/ingest/status/route.js +1 -1
  180. package/.next/standalone/.next/server/app/api/cortex/ingest/status/route.js.nft.json +1 -1
  181. package/.next/standalone/.next/server/app/api/cortex/knowledge/[id]/route.js +1 -1
  182. package/.next/standalone/.next/server/app/api/cortex/knowledge/[id]/route.js.nft.json +1 -1
  183. package/.next/standalone/.next/server/app/api/cortex/knowledge/route.js +1 -1
  184. package/.next/standalone/.next/server/app/api/cortex/knowledge/route.js.nft.json +1 -1
  185. package/.next/standalone/.next/server/app/api/cortex/lobes/[id]/route.js +1 -1
  186. package/.next/standalone/.next/server/app/api/cortex/lobes/[id]/route.js.nft.json +1 -1
  187. package/.next/standalone/.next/server/app/api/cortex/lobes/route.js +1 -1
  188. package/.next/standalone/.next/server/app/api/cortex/lobes/route.js.nft.json +1 -1
  189. package/.next/standalone/.next/server/app/api/cortex/lobes/share/route.js +1 -1
  190. package/.next/standalone/.next/server/app/api/cortex/lobes/share/route.js.nft.json +1 -1
  191. package/.next/standalone/.next/server/app/api/cortex/marketplace/browse/route/app-paths-manifest.json +3 -0
  192. package/.next/standalone/.next/server/app/api/cortex/marketplace/browse/route/build-manifest.json +11 -0
  193. package/.next/standalone/.next/server/app/api/cortex/marketplace/browse/route/server-reference-manifest.json +4 -0
  194. package/.next/standalone/.next/server/app/api/cortex/marketplace/browse/route.js +7 -0
  195. package/.next/standalone/.next/server/app/api/cortex/marketplace/browse/route.js.map +5 -0
  196. package/.next/standalone/.next/server/app/api/cortex/marketplace/browse/route.js.nft.json +1 -0
  197. package/.next/standalone/.next/server/app/api/cortex/marketplace/browse/route_client-reference-manifest.js +2 -0
  198. package/.next/standalone/.next/server/app/api/cortex/marketplace/preview/route/app-paths-manifest.json +3 -0
  199. package/.next/standalone/.next/server/app/api/cortex/marketplace/preview/route/build-manifest.json +11 -0
  200. package/.next/standalone/.next/server/app/api/cortex/marketplace/preview/route/server-reference-manifest.json +4 -0
  201. package/.next/standalone/.next/server/app/api/cortex/marketplace/preview/route.js +7 -0
  202. package/.next/standalone/.next/server/app/api/cortex/marketplace/preview/route.js.map +5 -0
  203. package/.next/standalone/.next/server/app/api/cortex/marketplace/preview/route.js.nft.json +1 -0
  204. package/.next/standalone/.next/server/app/api/cortex/marketplace/preview/route_client-reference-manifest.js +2 -0
  205. package/.next/standalone/.next/server/app/api/cortex/mcp/call/route.js +1 -1
  206. package/.next/standalone/.next/server/app/api/cortex/mcp/call/route.js.nft.json +1 -1
  207. package/.next/standalone/.next/server/app/api/cortex/mcp/tools/route.js +1 -1
  208. package/.next/standalone/.next/server/app/api/cortex/mcp/tools/route.js.nft.json +1 -1
  209. package/.next/standalone/.next/server/app/api/cortex/search/route.js +1 -1
  210. package/.next/standalone/.next/server/app/api/cortex/search/route.js.nft.json +1 -1
  211. package/.next/standalone/.next/server/app/api/cortex/settings/route.js +1 -1
  212. package/.next/standalone/.next/server/app/api/cortex/settings/route.js.nft.json +1 -1
  213. package/.next/standalone/.next/server/app/api/cortex/status/route.js +1 -1
  214. package/.next/standalone/.next/server/app/api/cortex/status/route.js.nft.json +1 -1
  215. package/.next/standalone/.next/server/app/api/cortex/timeline/route.js +1 -1
  216. package/.next/standalone/.next/server/app/api/cortex/timeline/route.js.nft.json +1 -1
  217. package/.next/standalone/.next/server/app/api/cortex/usage/route.js +1 -1
  218. package/.next/standalone/.next/server/app/api/cortex/usage/route.js.nft.json +1 -1
  219. package/.next/standalone/.next/server/app/api/cortex/workspace/[id]/context/route.js +1 -1
  220. package/.next/standalone/.next/server/app/api/cortex/workspace/[id]/context/route.js.nft.json +1 -1
  221. package/.next/standalone/.next/server/app/api/events/route.js +1 -1
  222. package/.next/standalone/.next/server/app/api/events/route.js.nft.json +1 -1
  223. package/.next/standalone/.next/server/app/api/files/route.js +1 -1
  224. package/.next/standalone/.next/server/app/api/files/route.js.nft.json +1 -1
  225. package/.next/standalone/.next/server/app/api/folders/route.js +1 -1
  226. package/.next/standalone/.next/server/app/api/folders/route.js.nft.json +1 -1
  227. package/.next/standalone/.next/server/app/api/network/connect-callback/route.js +1 -1
  228. package/.next/standalone/.next/server/app/api/network/connect-callback/route.js.nft.json +1 -1
  229. package/.next/standalone/.next/server/app/api/network/connect-request/[id]/route.js +1 -1
  230. package/.next/standalone/.next/server/app/api/network/connect-request/[id]/route.js.nft.json +1 -1
  231. package/.next/standalone/.next/server/app/api/network/connect-request/route.js +1 -1
  232. package/.next/standalone/.next/server/app/api/network/connect-request/route.js.nft.json +1 -1
  233. package/.next/standalone/.next/server/app/api/network/discovered/route.js +1 -1
  234. package/.next/standalone/.next/server/app/api/network/discovered/route.js.nft.json +1 -1
  235. package/.next/standalone/.next/server/app/api/network/handshake/route.js +1 -1
  236. package/.next/standalone/.next/server/app/api/network/handshake/route.js.nft.json +1 -1
  237. package/.next/standalone/.next/server/app/api/network/health/route.js +1 -1
  238. package/.next/standalone/.next/server/app/api/network/health/route.js.nft.json +1 -1
  239. package/.next/standalone/.next/server/app/api/network/identity/route.js +1 -1
  240. package/.next/standalone/.next/server/app/api/network/identity/route.js.nft.json +1 -1
  241. package/.next/standalone/.next/server/app/api/network/keys/[id]/route.js +1 -1
  242. package/.next/standalone/.next/server/app/api/network/keys/[id]/route.js.nft.json +1 -1
  243. package/.next/standalone/.next/server/app/api/network/keys/route.js +1 -1
  244. package/.next/standalone/.next/server/app/api/network/keys/route.js.nft.json +1 -1
  245. package/.next/standalone/.next/server/app/api/network/nodes/[id]/route.js +1 -1
  246. package/.next/standalone/.next/server/app/api/network/nodes/[id]/route.js.nft.json +1 -1
  247. package/.next/standalone/.next/server/app/api/network/nodes/check/route.js +1 -1
  248. package/.next/standalone/.next/server/app/api/network/nodes/check/route.js.nft.json +1 -1
  249. package/.next/standalone/.next/server/app/api/network/nodes/route.js +1 -1
  250. package/.next/standalone/.next/server/app/api/network/nodes/route.js.nft.json +1 -1
  251. package/.next/standalone/.next/server/app/api/network/projects/route.js +1 -1
  252. package/.next/standalone/.next/server/app/api/network/projects/route.js.nft.json +1 -1
  253. package/.next/standalone/.next/server/app/api/network/proxy/[nodeId]/[...path]/route.js +1 -1
  254. package/.next/standalone/.next/server/app/api/network/proxy/[nodeId]/[...path]/route.js.nft.json +1 -1
  255. package/.next/standalone/.next/server/app/api/network/search/route.js +1 -1
  256. package/.next/standalone/.next/server/app/api/network/search/route.js.nft.json +1 -1
  257. package/.next/standalone/.next/server/app/api/network/sessions/[id]/messages/route.js +1 -1
  258. package/.next/standalone/.next/server/app/api/network/sessions/[id]/messages/route.js.nft.json +1 -1
  259. package/.next/standalone/.next/server/app/api/network/sessions/[id]/route.js +1 -1
  260. package/.next/standalone/.next/server/app/api/network/sessions/[id]/route.js.nft.json +1 -1
  261. package/.next/standalone/.next/server/app/api/network/sessions/route.js +1 -1
  262. package/.next/standalone/.next/server/app/api/network/sessions/route.js.nft.json +1 -1
  263. package/.next/standalone/.next/server/app/api/network/terminal/token/route.js +1 -1
  264. package/.next/standalone/.next/server/app/api/network/terminal/token/route.js.nft.json +1 -1
  265. package/.next/standalone/.next/server/app/api/network/workspaces/[id]/route.js +1 -1
  266. package/.next/standalone/.next/server/app/api/network/workspaces/[id]/route.js.nft.json +1 -1
  267. package/.next/standalone/.next/server/app/api/network/workspaces/route.js +1 -1
  268. package/.next/standalone/.next/server/app/api/network/workspaces/route.js.nft.json +1 -1
  269. package/.next/standalone/.next/server/app/api/panes/[id]/route.js +2 -2
  270. package/.next/standalone/.next/server/app/api/panes/[id]/route.js.nft.json +1 -1
  271. package/.next/standalone/.next/server/app/api/panes/route.js +2 -2
  272. package/.next/standalone/.next/server/app/api/panes/route.js.nft.json +1 -1
  273. package/.next/standalone/.next/server/app/api/projects/route.js +2 -2
  274. package/.next/standalone/.next/server/app/api/projects/route.js.nft.json +1 -1
  275. package/.next/standalone/.next/server/app/api/search/route.js +2 -2
  276. package/.next/standalone/.next/server/app/api/search/route.js.nft.json +1 -1
  277. package/.next/standalone/.next/server/app/api/sessions/[id]/chat/route.js +1 -1
  278. package/.next/standalone/.next/server/app/api/sessions/[id]/chat/route.js.nft.json +1 -1
  279. package/.next/standalone/.next/server/app/api/sessions/[id]/messages/route.js +2 -2
  280. package/.next/standalone/.next/server/app/api/sessions/[id]/messages/route.js.nft.json +1 -1
  281. package/.next/standalone/.next/server/app/api/sessions/[id]/route.js +2 -2
  282. package/.next/standalone/.next/server/app/api/sessions/[id]/route.js.nft.json +1 -1
  283. package/.next/standalone/.next/server/app/api/sessions/route.js +2 -2
  284. package/.next/standalone/.next/server/app/api/sessions/route.js.nft.json +1 -1
  285. package/.next/standalone/.next/server/app/api/sync/route.js +1 -1
  286. package/.next/standalone/.next/server/app/api/sync/route.js.nft.json +1 -1
  287. package/.next/standalone/.next/server/app/api/tags/route.js +2 -2
  288. package/.next/standalone/.next/server/app/api/tags/route.js.nft.json +1 -1
  289. package/.next/standalone/.next/server/app/api/tier/route.js +1 -1
  290. package/.next/standalone/.next/server/app/api/tier/route.js.nft.json +1 -1
  291. package/.next/standalone/.next/server/app/api/updates/route/app-paths-manifest.json +3 -0
  292. package/.next/standalone/.next/server/app/api/updates/route/build-manifest.json +11 -0
  293. package/.next/standalone/.next/server/app/api/updates/route/server-reference-manifest.json +4 -0
  294. package/.next/standalone/.next/server/app/api/updates/route.js +7 -0
  295. package/.next/standalone/.next/server/app/api/updates/route.js.map +5 -0
  296. package/.next/standalone/.next/server/app/api/updates/route.js.nft.json +1 -0
  297. package/.next/standalone/.next/server/app/api/updates/route_client-reference-manifest.js +2 -0
  298. package/.next/standalone/.next/server/app/api/workspaces/[id]/context/[key]/route.js +1 -1
  299. package/.next/standalone/.next/server/app/api/workspaces/[id]/context/[key]/route.js.nft.json +1 -1
  300. package/.next/standalone/.next/server/app/api/workspaces/[id]/context/route.js +1 -1
  301. package/.next/standalone/.next/server/app/api/workspaces/[id]/context/route.js.nft.json +1 -1
  302. package/.next/standalone/.next/server/app/api/workspaces/[id]/messages/[msgId]/route.js +1 -1
  303. package/.next/standalone/.next/server/app/api/workspaces/[id]/messages/[msgId]/route.js.nft.json +1 -1
  304. package/.next/standalone/.next/server/app/api/workspaces/[id]/messages/route.js +1 -1
  305. package/.next/standalone/.next/server/app/api/workspaces/[id]/messages/route.js.nft.json +1 -1
  306. package/.next/standalone/.next/server/app/api/workspaces/[id]/route.js +2 -2
  307. package/.next/standalone/.next/server/app/api/workspaces/[id]/route.js.nft.json +1 -1
  308. package/.next/standalone/.next/server/app/api/workspaces/[id]/sessions/route.js +2 -2
  309. package/.next/standalone/.next/server/app/api/workspaces/[id]/sessions/route.js.nft.json +1 -1
  310. package/.next/standalone/.next/server/app/api/workspaces/route.js +2 -2
  311. package/.next/standalone/.next/server/app/api/workspaces/route.js.nft.json +1 -1
  312. package/.next/standalone/.next/server/app/cortex.html +1 -1
  313. package/.next/standalone/.next/server/app/cortex.rsc +17 -16
  314. package/.next/standalone/.next/server/app/cortex.segments/!KGRlc2t0b3Ap/cortex/__PAGE__.segment.rsc +2 -2
  315. package/.next/standalone/.next/server/app/cortex.segments/!KGRlc2t0b3Ap/cortex.segment.rsc +1 -1
  316. package/.next/standalone/.next/server/app/cortex.segments/!KGRlc2t0b3Ap.segment.rsc +5 -4
  317. package/.next/standalone/.next/server/app/cortex.segments/_full.segment.rsc +17 -16
  318. package/.next/standalone/.next/server/app/cortex.segments/_head.segment.rsc +1 -1
  319. package/.next/standalone/.next/server/app/cortex.segments/_index.segment.rsc +2 -2
  320. package/.next/standalone/.next/server/app/cortex.segments/_tree.segment.rsc +2 -2
  321. package/.next/standalone/.next/server/app/login/page_client-reference-manifest.js +1 -1
  322. package/.next/standalone/.next/server/app/login.html +1 -1
  323. package/.next/standalone/.next/server/app/login.rsc +2 -2
  324. package/.next/standalone/.next/server/app/login.segments/_full.segment.rsc +2 -2
  325. package/.next/standalone/.next/server/app/login.segments/_head.segment.rsc +1 -1
  326. package/.next/standalone/.next/server/app/login.segments/_index.segment.rsc +2 -2
  327. package/.next/standalone/.next/server/app/login.segments/_tree.segment.rsc +2 -2
  328. package/.next/standalone/.next/server/app/login.segments/login/__PAGE__.segment.rsc +1 -1
  329. package/.next/standalone/.next/server/app/login.segments/login.segment.rsc +1 -1
  330. package/.next/standalone/.next/server/app/m/page.js.nft.json +1 -1
  331. package/.next/standalone/.next/server/app/m/page_client-reference-manifest.js +1 -1
  332. package/.next/standalone/.next/server/app/m/projects/page.js.nft.json +1 -1
  333. package/.next/standalone/.next/server/app/m/projects/page_client-reference-manifest.js +1 -1
  334. package/.next/standalone/.next/server/app/m/projects.html +1 -1
  335. package/.next/standalone/.next/server/app/m/projects.rsc +4 -4
  336. package/.next/standalone/.next/server/app/m/projects.segments/_full.segment.rsc +4 -4
  337. package/.next/standalone/.next/server/app/m/projects.segments/_head.segment.rsc +1 -1
  338. package/.next/standalone/.next/server/app/m/projects.segments/_index.segment.rsc +2 -2
  339. package/.next/standalone/.next/server/app/m/projects.segments/_tree.segment.rsc +2 -2
  340. package/.next/standalone/.next/server/app/m/projects.segments/m/projects/__PAGE__.segment.rsc +2 -2
  341. package/.next/standalone/.next/server/app/m/projects.segments/m/projects.segment.rsc +1 -1
  342. package/.next/standalone/.next/server/app/m/projects.segments/m.segment.rsc +2 -2
  343. package/.next/standalone/.next/server/app/m/sessions/[id]/page.js.nft.json +1 -1
  344. package/.next/standalone/.next/server/app/m/sessions/[id]/page_client-reference-manifest.js +1 -1
  345. package/.next/standalone/.next/server/app/m/sessions/page.js.nft.json +1 -1
  346. package/.next/standalone/.next/server/app/m/sessions/page_client-reference-manifest.js +1 -1
  347. package/.next/standalone/.next/server/app/m/sessions.html +1 -1
  348. package/.next/standalone/.next/server/app/m/sessions.rsc +4 -4
  349. package/.next/standalone/.next/server/app/m/sessions.segments/_full.segment.rsc +4 -4
  350. package/.next/standalone/.next/server/app/m/sessions.segments/_head.segment.rsc +1 -1
  351. package/.next/standalone/.next/server/app/m/sessions.segments/_index.segment.rsc +2 -2
  352. package/.next/standalone/.next/server/app/m/sessions.segments/_tree.segment.rsc +2 -2
  353. package/.next/standalone/.next/server/app/m/sessions.segments/m/sessions/__PAGE__.segment.rsc +2 -2
  354. package/.next/standalone/.next/server/app/m/sessions.segments/m/sessions.segment.rsc +1 -1
  355. package/.next/standalone/.next/server/app/m/sessions.segments/m.segment.rsc +2 -2
  356. package/.next/standalone/.next/server/app/m/settings/page.js.nft.json +1 -1
  357. package/.next/standalone/.next/server/app/m/settings/page_client-reference-manifest.js +1 -1
  358. package/.next/standalone/.next/server/app/m/settings.html +1 -1
  359. package/.next/standalone/.next/server/app/m/settings.rsc +4 -4
  360. package/.next/standalone/.next/server/app/m/settings.segments/_full.segment.rsc +4 -4
  361. package/.next/standalone/.next/server/app/m/settings.segments/_head.segment.rsc +1 -1
  362. package/.next/standalone/.next/server/app/m/settings.segments/_index.segment.rsc +2 -2
  363. package/.next/standalone/.next/server/app/m/settings.segments/_tree.segment.rsc +2 -2
  364. package/.next/standalone/.next/server/app/m/settings.segments/m/settings/__PAGE__.segment.rsc +2 -2
  365. package/.next/standalone/.next/server/app/m/settings.segments/m/settings.segment.rsc +1 -1
  366. package/.next/standalone/.next/server/app/m/settings.segments/m.segment.rsc +2 -2
  367. package/.next/standalone/.next/server/app/m/terminal/page.js.nft.json +1 -1
  368. package/.next/standalone/.next/server/app/m/terminal/page_client-reference-manifest.js +1 -1
  369. package/.next/standalone/.next/server/app/m/terminal.html +1 -1
  370. package/.next/standalone/.next/server/app/m/terminal.rsc +4 -4
  371. package/.next/standalone/.next/server/app/m/terminal.segments/_full.segment.rsc +4 -4
  372. package/.next/standalone/.next/server/app/m/terminal.segments/_head.segment.rsc +1 -1
  373. package/.next/standalone/.next/server/app/m/terminal.segments/_index.segment.rsc +2 -2
  374. package/.next/standalone/.next/server/app/m/terminal.segments/_tree.segment.rsc +2 -2
  375. package/.next/standalone/.next/server/app/m/terminal.segments/m/terminal/__PAGE__.segment.rsc +2 -2
  376. package/.next/standalone/.next/server/app/m/terminal.segments/m/terminal.segment.rsc +1 -1
  377. package/.next/standalone/.next/server/app/m/terminal.segments/m.segment.rsc +2 -2
  378. package/.next/standalone/.next/server/app/m.html +1 -1
  379. package/.next/standalone/.next/server/app/m.rsc +4 -4
  380. package/.next/standalone/.next/server/app/m.segments/_full.segment.rsc +4 -4
  381. package/.next/standalone/.next/server/app/m.segments/_head.segment.rsc +1 -1
  382. package/.next/standalone/.next/server/app/m.segments/_index.segment.rsc +2 -2
  383. package/.next/standalone/.next/server/app/m.segments/_tree.segment.rsc +2 -2
  384. package/.next/standalone/.next/server/app/m.segments/m/__PAGE__.segment.rsc +2 -2
  385. package/.next/standalone/.next/server/app/m.segments/m.segment.rsc +2 -2
  386. package/.next/standalone/.next/server/app/network.html +1 -1
  387. package/.next/standalone/.next/server/app/network.rsc +17 -16
  388. package/.next/standalone/.next/server/app/network.segments/!KGRlc2t0b3Ap/network/__PAGE__.segment.rsc +2 -2
  389. package/.next/standalone/.next/server/app/network.segments/!KGRlc2t0b3Ap/network.segment.rsc +1 -1
  390. package/.next/standalone/.next/server/app/network.segments/!KGRlc2t0b3Ap.segment.rsc +5 -4
  391. package/.next/standalone/.next/server/app/network.segments/_full.segment.rsc +17 -16
  392. package/.next/standalone/.next/server/app/network.segments/_head.segment.rsc +1 -1
  393. package/.next/standalone/.next/server/app/network.segments/_index.segment.rsc +2 -2
  394. package/.next/standalone/.next/server/app/network.segments/_tree.segment.rsc +2 -2
  395. package/.next/standalone/.next/server/app/projects.html +1 -1
  396. package/.next/standalone/.next/server/app/projects.rsc +17 -16
  397. package/.next/standalone/.next/server/app/projects.segments/!KGRlc2t0b3Ap/projects/__PAGE__.segment.rsc +2 -2
  398. package/.next/standalone/.next/server/app/projects.segments/!KGRlc2t0b3Ap/projects.segment.rsc +1 -1
  399. package/.next/standalone/.next/server/app/projects.segments/!KGRlc2t0b3Ap.segment.rsc +5 -4
  400. package/.next/standalone/.next/server/app/projects.segments/_full.segment.rsc +17 -16
  401. package/.next/standalone/.next/server/app/projects.segments/_head.segment.rsc +1 -1
  402. package/.next/standalone/.next/server/app/projects.segments/_index.segment.rsc +2 -2
  403. package/.next/standalone/.next/server/app/projects.segments/_tree.segment.rsc +2 -2
  404. package/.next/standalone/.next/server/app/sessions.html +1 -1
  405. package/.next/standalone/.next/server/app/sessions.rsc +17 -16
  406. package/.next/standalone/.next/server/app/sessions.segments/!KGRlc2t0b3Ap/sessions/__PAGE__.segment.rsc +2 -2
  407. package/.next/standalone/.next/server/app/sessions.segments/!KGRlc2t0b3Ap/sessions.segment.rsc +1 -1
  408. package/.next/standalone/.next/server/app/sessions.segments/!KGRlc2t0b3Ap.segment.rsc +5 -4
  409. package/.next/standalone/.next/server/app/sessions.segments/_full.segment.rsc +17 -16
  410. package/.next/standalone/.next/server/app/sessions.segments/_head.segment.rsc +1 -1
  411. package/.next/standalone/.next/server/app/sessions.segments/_index.segment.rsc +2 -2
  412. package/.next/standalone/.next/server/app/sessions.segments/_tree.segment.rsc +2 -2
  413. package/.next/standalone/.next/server/app/settings.html +1 -1
  414. package/.next/standalone/.next/server/app/settings.rsc +17 -16
  415. package/.next/standalone/.next/server/app/settings.segments/!KGRlc2t0b3Ap/settings/__PAGE__.segment.rsc +2 -2
  416. package/.next/standalone/.next/server/app/settings.segments/!KGRlc2t0b3Ap/settings.segment.rsc +1 -1
  417. package/.next/standalone/.next/server/app/settings.segments/!KGRlc2t0b3Ap.segment.rsc +5 -4
  418. package/.next/standalone/.next/server/app/settings.segments/_full.segment.rsc +17 -16
  419. package/.next/standalone/.next/server/app/settings.segments/_head.segment.rsc +1 -1
  420. package/.next/standalone/.next/server/app/settings.segments/_index.segment.rsc +2 -2
  421. package/.next/standalone/.next/server/app/settings.segments/_tree.segment.rsc +2 -2
  422. package/.next/standalone/.next/server/app/terminal.html +1 -1
  423. package/.next/standalone/.next/server/app/terminal.rsc +17 -16
  424. package/.next/standalone/.next/server/app/terminal.segments/!KGRlc2t0b3Ap/terminal/__PAGE__.segment.rsc +2 -2
  425. package/.next/standalone/.next/server/app/terminal.segments/!KGRlc2t0b3Ap/terminal.segment.rsc +1 -1
  426. package/.next/standalone/.next/server/app/terminal.segments/!KGRlc2t0b3Ap.segment.rsc +5 -4
  427. package/.next/standalone/.next/server/app/terminal.segments/_full.segment.rsc +17 -16
  428. package/.next/standalone/.next/server/app/terminal.segments/_head.segment.rsc +1 -1
  429. package/.next/standalone/.next/server/app/terminal.segments/_index.segment.rsc +2 -2
  430. package/.next/standalone/.next/server/app/terminal.segments/_tree.segment.rsc +2 -2
  431. package/.next/standalone/.next/server/app/workspaces.html +1 -1
  432. package/.next/standalone/.next/server/app/workspaces.rsc +17 -16
  433. package/.next/standalone/.next/server/app/workspaces.segments/!KGRlc2t0b3Ap/workspaces/__PAGE__.segment.rsc +2 -2
  434. package/.next/standalone/.next/server/app/workspaces.segments/!KGRlc2t0b3Ap/workspaces.segment.rsc +1 -1
  435. package/.next/standalone/.next/server/app/workspaces.segments/!KGRlc2t0b3Ap.segment.rsc +5 -4
  436. package/.next/standalone/.next/server/app/workspaces.segments/_full.segment.rsc +17 -16
  437. package/.next/standalone/.next/server/app/workspaces.segments/_head.segment.rsc +1 -1
  438. package/.next/standalone/.next/server/app/workspaces.segments/_index.segment.rsc +2 -2
  439. package/.next/standalone/.next/server/app/workspaces.segments/_tree.segment.rsc +2 -2
  440. package/.next/standalone/.next/server/app-paths-manifest.json +8 -0
  441. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0041efe4._.js +98 -0
  442. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__4d5f802e._.js → [root-of-the-server]__00bf0ace._.js} +2 -2
  443. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0fac388d._.js → [root-of-the-server]__08a68343._.js} +2 -2
  444. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0955695e._.js → [root-of-the-server]__0add852f._.js} +2 -2
  445. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__2a7a798c._.js → [root-of-the-server]__0c113ed0._.js} +2 -2
  446. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__776b2fd5._.js → [root-of-the-server]__0e1a27e0._.js} +2 -2
  447. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__805ab6d4._.js → [root-of-the-server]__0e71d908._.js} +2 -2
  448. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__fcfb3d9b._.js → [root-of-the-server]__0e9142f3._.js} +2 -2
  449. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0b622fbb._.js → [root-of-the-server]__10e47926._.js} +2 -2
  450. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__6b94cc47._.js → [root-of-the-server]__1194f2c1._.js} +2 -2
  451. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__65015776._.js → [root-of-the-server]__1665dc78._.js} +2 -2
  452. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__a1c90b00._.js → [root-of-the-server]__175cbabf._.js} +2 -2
  453. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__6c6cfe82._.js → [root-of-the-server]__19c2d094._.js} +2 -2
  454. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__efefd88d._.js → [root-of-the-server]__1adae357._.js} +2 -2
  455. package/.next/standalone/.next/server/chunks/[root-of-the-server]__1d359752._.js +98 -0
  456. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__d2bbb75a._.js → [root-of-the-server]__1e8fabeb._.js} +2 -2
  457. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__c13f151f._.js → [root-of-the-server]__1f8deca0._.js} +2 -2
  458. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__3331633d._.js → [root-of-the-server]__253fdda1._.js} +2 -2
  459. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__d0439252._.js → [root-of-the-server]__28e6434f._.js} +2 -2
  460. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__3ba575ca._.js → [root-of-the-server]__2a386564._.js} +13 -13
  461. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__7901e2ab._.js → [root-of-the-server]__2acbd703._.js} +2 -2
  462. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__466c7e18._.js → [root-of-the-server]__2acefabb._.js} +2 -2
  463. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__8cddfa2d._.js → [root-of-the-server]__2c20fb38._.js} +2 -2
  464. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__4837b8c0._.js → [root-of-the-server]__309132cd._.js} +2 -2
  465. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__6d211342._.js → [root-of-the-server]__3786d8ae._.js} +2 -2
  466. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__f3e94a15._.js → [root-of-the-server]__3ae92407._.js} +2 -2
  467. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__7799fe3c._.js → [root-of-the-server]__3beda9fe._.js} +2 -2
  468. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__25d1fc87._.js → [root-of-the-server]__3e3f25a1._.js} +2 -2
  469. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0c59850c._.js → [root-of-the-server]__4619e9bd._.js} +2 -2
  470. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__3beca461._.js → [root-of-the-server]__4a051043._.js} +2 -2
  471. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__bc97ddc7._.js → [root-of-the-server]__50208a5f._.js} +2 -2
  472. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__7b4dd49b._.js → [root-of-the-server]__508002e4._.js} +2 -2
  473. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__57b959fd._.js → [root-of-the-server]__5086c373._.js} +2 -2
  474. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__ce1f6530._.js → [root-of-the-server]__5913e097._.js} +2 -2
  475. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__a4823fef._.js → [root-of-the-server]__5b5f68d2._.js} +2 -2
  476. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__b9761ef0._.js → [root-of-the-server]__5c1f2459._.js} +3 -3
  477. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__aeb7413c._.js → [root-of-the-server]__5ec8c977._.js} +2 -2
  478. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__df6bc9e9._.js → [root-of-the-server]__5f8c694a._.js} +2 -2
  479. package/.next/standalone/.next/server/chunks/[root-of-the-server]__63cebc6c._.js +98 -0
  480. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__e85d0854._.js → [root-of-the-server]__64d30d4d._.js} +2 -2
  481. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__ce0bdfd8._.js → [root-of-the-server]__6c54fc2e._.js} +2 -2
  482. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__bc0ee8ae._.js → [root-of-the-server]__6dc1fb7e._.js} +2 -2
  483. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__91eb478b._.js → [root-of-the-server]__6e568102._.js} +2 -2
  484. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__c476045d._.js → [root-of-the-server]__6faa04c0._.js} +2 -2
  485. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__3aa57139._.js → [root-of-the-server]__727d05f1._.js} +2 -2
  486. package/.next/standalone/.next/server/chunks/[root-of-the-server]__74a34dc3._.js +98 -0
  487. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__8ca5cdb4._.js → [root-of-the-server]__75d12b32._.js} +2 -2
  488. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__05885ab1._.js → [root-of-the-server]__7e7250a4._.js} +2 -2
  489. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__9952246f._.js → [root-of-the-server]__8309e0a4._.js} +2 -2
  490. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__5e1e3386._.js → [root-of-the-server]__86cc0e2b._.js} +2 -2
  491. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__1a211143._.js → [root-of-the-server]__8915603e._.js} +2 -2
  492. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__db7825cc._.js → [root-of-the-server]__89c2565a._.js} +2 -2
  493. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__b000379d._.js → [root-of-the-server]__8d178ad9._.js} +2 -2
  494. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__3ae85e7a._.js → [root-of-the-server]__93ee06f3._.js} +2 -2
  495. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__6a2926b6._.js → [root-of-the-server]__9e4c154a._.js} +2 -2
  496. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__31f028ec._.js → [root-of-the-server]__a1fbc199._.js} +2 -2
  497. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__aa7644c6._.js → [root-of-the-server]__a9d2e1d3._.js} +2 -2
  498. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__b60a5497._.js → [root-of-the-server]__ae53d343._.js} +2 -2
  499. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__f5f82d4b._.js → [root-of-the-server]__b3a04cef._.js} +2 -2
  500. package/.next/standalone/.next/server/chunks/[root-of-the-server]__b4270b77._.js +3 -0
  501. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__dd9f454c._.js → [root-of-the-server]__b6b6ce60._.js} +2 -2
  502. package/.next/standalone/.next/server/chunks/[root-of-the-server]__b9545dd9._.js +3 -0
  503. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__41ae8be6._.js → [root-of-the-server]__c200e21a._.js} +2 -2
  504. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__190b05d8._.js → [root-of-the-server]__c3c74ca4._.js} +2 -2
  505. package/.next/standalone/.next/server/chunks/[root-of-the-server]__c88b63f7._.js +98 -0
  506. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__6c674ff1._.js → [root-of-the-server]__cbf4ceb0._.js} +2 -2
  507. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__8d28317b._.js → [root-of-the-server]__cefdba2f._.js} +2 -2
  508. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0dd51116._.js → [root-of-the-server]__cf3c60c2._.js} +2 -2
  509. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__dae7832b._.js → [root-of-the-server]__cf9e82bb._.js} +2 -2
  510. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__de96c005._.js → [root-of-the-server]__d15515e3._.js} +2 -2
  511. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__2367f5a6._.js → [root-of-the-server]__d2897392._.js} +2 -2
  512. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__7b4e92a1._.js → [root-of-the-server]__d3b2d856._.js} +2 -2
  513. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__81ece563._.js → [root-of-the-server]__d73273ca._.js} +2 -2
  514. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__a5b5007a._.js → [root-of-the-server]__d8417eb6._.js} +2 -2
  515. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__73409f3d._.js → [root-of-the-server]__db4726bc._.js} +2 -2
  516. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__17e04588._.js → [root-of-the-server]__dc2a55de._.js} +2 -2
  517. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__67c4abf3._.js → [root-of-the-server]__dc6e2e5f._.js} +2 -2
  518. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__4d225634._.js → [root-of-the-server]__e0d4690b._.js} +2 -2
  519. package/.next/standalone/.next/server/chunks/[root-of-the-server]__e678dd53._.js +3 -0
  520. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__a3b0b968._.js → [root-of-the-server]__e9223f55._.js} +2 -2
  521. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__91522ce2._.js → [root-of-the-server]__ea630076._.js} +2 -2
  522. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0644670b._.js → [root-of-the-server]__eb8acb65._.js} +2 -2
  523. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__bbdbb0e1._.js → [root-of-the-server]__eee4c5e8._.js} +2 -2
  524. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__2a21471b._.js → [root-of-the-server]__f26ca49d._.js} +2 -2
  525. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__6c15c973._.js → [root-of-the-server]__f33e1101._.js} +2 -2
  526. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__5bbc73ff._.js → [root-of-the-server]__f3a4c668._.js} +2 -2
  527. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__2bfbbec2._.js → [root-of-the-server]__f515f865._.js} +2 -2
  528. package/.next/standalone/.next/server/chunks/[root-of-the-server]__fceb5d60._.js +98 -0
  529. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__d9c653fc._.js → [root-of-the-server]__fed41403._.js} +2 -2
  530. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__c09d4b86._.js → [root-of-the-server]__ff2e98c2._.js} +2 -2
  531. package/.next/standalone/.next/server/chunks/_next-internal_server_app_api_cortex_curation_assess_route_actions_3e8ef2a6.js +3 -0
  532. package/.next/standalone/.next/server/chunks/_next-internal_server_app_api_cortex_curation_publish_route_actions_49238be3.js +3 -0
  533. package/.next/standalone/.next/server/chunks/_next-internal_server_app_api_cortex_curation_refine_route_actions_05675688.js +3 -0
  534. package/.next/standalone/.next/server/chunks/_next-internal_server_app_api_cortex_curation_review_route_actions_5cbb5f6b.js +3 -0
  535. package/.next/standalone/.next/server/chunks/_next-internal_server_app_api_cortex_curation_seed_route_actions_21084bdb.js +3 -0
  536. package/.next/standalone/.next/server/chunks/_next-internal_server_app_api_cortex_marketplace_browse_route_actions_7ed0768c.js +3 -0
  537. package/.next/standalone/.next/server/chunks/_next-internal_server_app_api_cortex_marketplace_preview_route_actions_38d4cc17.js +3 -0
  538. package/.next/standalone/.next/server/chunks/_next-internal_server_app_api_updates_route_actions_91efaab5.js +3 -0
  539. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__23f374a2._.js +3 -0
  540. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__66aca5d4._.js +1 -1
  541. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__efef0a06._.js → [root-of-the-server]__ca5beb09._.js} +2 -2
  542. package/.next/standalone/.next/server/chunks/ssr/{_b4db3983._.js → _01842037._.js} +2 -2
  543. package/.next/standalone/.next/server/chunks/ssr/{_7dd2ac82._.js → _036cbaa2._.js} +1 -1
  544. package/.next/standalone/.next/server/chunks/ssr/_10c0d382._.js +3 -0
  545. package/.next/standalone/.next/server/chunks/ssr/_163d0838._.js +3 -0
  546. package/.next/standalone/.next/server/chunks/ssr/{_9303a965._.js → _43455582._.js} +1 -1
  547. package/.next/standalone/.next/server/chunks/ssr/{_7e63066a._.js → _67887e33._.js} +2 -2
  548. package/.next/standalone/.next/server/chunks/ssr/_950142a4._.js +1 -1
  549. package/.next/standalone/.next/server/chunks/ssr/src_02bae6e5._.js +3 -0
  550. package/.next/standalone/.next/server/chunks/ssr/src_app_(desktop)_terminal_page_tsx_de5e8d85._.js +2 -2
  551. package/.next/standalone/.next/server/edge/chunks/_d73df637._.js +1 -1
  552. package/.next/standalone/.next/server/middleware-manifest.json +1 -1
  553. package/.next/standalone/.next/server/pages/404.html +1 -1
  554. package/.next/standalone/.next/server/pages/500.html +2 -2
  555. package/.next/standalone/.next/static/chunks/{a7b2795949a6c63e.js → 224aab5107987011.js} +2 -2
  556. package/.next/standalone/.next/static/chunks/415827af44b8c374.js +1 -0
  557. package/.next/standalone/.next/static/chunks/8a7f58872c123a53.css +3 -0
  558. package/.next/standalone/.next/static/chunks/b0484608571d975a.js +1 -0
  559. package/.next/standalone/.next/static/chunks/{e35e863c09511a51.js → b42a38df3e418ff0.js} +1 -1
  560. package/.next/standalone/.next/static/chunks/{0e61e67b7b8fc3f3.js → c418112e102673ce.js} +1 -1
  561. package/.next/standalone/.next/static/chunks/d6474f65a17c483e.js +1 -0
  562. package/.next/standalone/.next/static/chunks/e2f0a2330dedff4b.js +85 -0
  563. package/.next/standalone/.next/static/chunks/f0c8b3f8cc1939ec.js +1 -0
  564. package/.next/standalone/docs/superpowers/plans/2026-03-18-cortex-ui-integration.md +1846 -0
  565. package/.next/standalone/docs/superpowers/specs/2026-03-18-cortex-ui-integration-design.md +341 -0
  566. package/.next/standalone/package.json +1 -1
  567. package/.next/standalone/src/app/(desktop)/cortex/page.tsx +7 -4
  568. package/.next/standalone/src/app/api/cortex/curation/assess/route.ts +27 -0
  569. package/.next/standalone/src/app/api/cortex/curation/publish/route.ts +23 -0
  570. package/.next/standalone/src/app/api/cortex/curation/refine/route.ts +23 -0
  571. package/.next/standalone/src/app/api/cortex/curation/review/route.ts +29 -0
  572. package/.next/standalone/src/app/api/cortex/curation/seed/route.ts +23 -0
  573. package/.next/standalone/src/app/api/cortex/graph/populate/route.ts +3 -3
  574. package/.next/standalone/src/app/api/cortex/import/route.ts +51 -19
  575. package/.next/standalone/src/app/api/cortex/marketplace/browse/route.ts +43 -0
  576. package/.next/standalone/src/app/api/cortex/marketplace/preview/route.ts +46 -0
  577. package/.next/standalone/src/app/api/cortex/status/route.ts +40 -0
  578. package/.next/standalone/src/components/cortex/constants.ts +29 -0
  579. package/.next/standalone/src/components/cortex/cortex-dashboard.tsx +80 -4
  580. package/.next/standalone/src/components/cortex/curation-tab.tsx +810 -0
  581. package/.next/standalone/src/components/cortex/import-dialog.tsx +212 -0
  582. package/.next/standalone/src/components/cortex/knowledge-card.tsx +1 -19
  583. package/.next/standalone/src/components/cortex/knowledge-tab.tsx +103 -1
  584. package/.next/standalone/src/components/cortex/lobe-settings.tsx +16 -0
  585. package/.next/standalone/src/components/cortex/marketplace-card.tsx +126 -0
  586. package/.next/standalone/src/components/cortex/marketplace-tab.tsx +113 -0
  587. package/.next/standalone/src/lib/cortex/types.ts +1 -0
  588. package/bin/spaces-service.js +21 -9
  589. package/bin/spaces.js +85 -12
  590. package/bin/terminal-server.js +13 -2
  591. package/package.json +1 -1
  592. package/.next/standalone/.next/server/chunks/[root-of-the-server]__d85c4a8b._.js +0 -98
  593. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0ecce08b._.js +0 -3
  594. package/.next/standalone/.next/server/chunks/ssr/_cd50a174._.js +0 -3
  595. package/.next/standalone/.next/server/chunks/ssr/_e7a9e2b0._.js +0 -3
  596. package/.next/standalone/.next/server/chunks/ssr/src_133a7c8a._.js +0 -3
  597. package/.next/standalone/.next/static/chunks/441b03060c26dfd8.css +0 -3
  598. package/.next/standalone/.next/static/chunks/58d78765e5140dcb.js +0 -1
  599. package/.next/standalone/.next/static/chunks/78dd908e70bf8c4b.js +0 -85
  600. package/.next/standalone/.next/static/chunks/9196173f0d081f2c.js +0 -1
  601. package/.next/standalone/.next/static/chunks/9bd8a119aaeafc9e.js +0 -1
  602. package/.next/standalone/src/components/cortex/context-tab.tsx +0 -171
  603. /package/.next/standalone/.next/static/{L3G_bc6BtAETwbN4_gS1c → Ku7_sP1T1UuqtRhUTiJZw}/_buildManifest.js +0 -0
  604. /package/.next/standalone/.next/static/{L3G_bc6BtAETwbN4_gS1c → Ku7_sP1T1UuqtRhUTiJZw}/_clientMiddlewareManifest.json +0 -0
  605. /package/.next/standalone/.next/static/{L3G_bc6BtAETwbN4_gS1c → Ku7_sP1T1UuqtRhUTiJZw}/_ssgManifest.js +0 -0
@@ -0,0 +1,341 @@
1
+ # Cortex UI Integration — Design Spec
2
+
3
+ > Integrate new `@spaces/cortex` engine features into the Spaces UI.
4
+ > Covers: curation workflow, marketplace, quality dashboard, domain context, sensitivity display.
5
+
6
+ ---
7
+
8
+ ## Decisions
9
+
10
+ - **Tab structure**: 6 tabs — Dashboard (enhanced), Graph (unchanged), Knowledge (merged with Context), Curation (new), Marketplace (new), Settings (enhanced)
11
+ - **Curation UX**: Horizontal pipeline bar (Seed → Assess → Review → Refine → Publish) with focused content area below
12
+ - **Marketplace UX**: Browse-first card grid scanning `~/.spaces/cortex/marketplace/` for `.cortexpack` files
13
+ - **Workspace scoping**: Curation tab has a workspace selector dropdown at the top (no "current workspace" dependency)
14
+ - **Marketplace source**: Directory scan for now; structure supports future remote registry
15
+
16
+ ---
17
+
18
+ ## 1. Tab Reorganization
19
+
20
+ ### Current (5 tabs)
21
+ Dashboard | Graph | Knowledge | Context | Settings
22
+
23
+ ### New (6 tabs)
24
+ Dashboard | Graph | Knowledge | Curation | Marketplace | Settings
25
+
26
+ **Knowledge tab** absorbs the old Context tab's query analyzer as a section below the knowledge browser. The standalone Context tab is removed.
27
+
28
+ ### File: `src/app/(desktop)/cortex/page.tsx`
29
+
30
+ - Remove `ContextTab` import and tab entry
31
+ - Add `CurationTab` and `MarketplaceTab` imports
32
+ - Merge context functionality into `KnowledgeTab` (add a "Query Analyzer" collapsible section at the bottom)
33
+ - Update `Tab` type to `'dashboard' | 'graph' | 'knowledge' | 'curation' | 'marketplace' | 'settings'`
34
+
35
+ ---
36
+
37
+ ## 2. Dashboard Enhancements
38
+
39
+ ### File: `src/components/cortex/cortex-dashboard.tsx`
40
+
41
+ Add two new sections between the existing stat cards and lobe breakdown:
42
+
43
+ **Coverage Score stat card** (replaces Graph stat card in top row — graph stats move to Graph tab):
44
+ - Calls `GET /api/cortex/status` which already returns lobe data
45
+ - New API: workspace-scoped assess endpoint (or aggregate from status)
46
+ - Shows coverage score (0–1) with color coding: <0.3 red, 0.3–0.7 amber, >0.7 green
47
+ - Sub-label: "X% distilled"
48
+ - Top row stays 4 cards: Knowledge Units | Coverage Score | Distillation | Storage
49
+
50
+ **Prerequisite**: Extract `TYPE_COLORS` and `SENSITIVITY_COLORS` from `knowledge-card.tsx` into a shared `src/components/cortex/constants.ts` file. Both `knowledge-card.tsx` and `context-tab.tsx` currently define their own copies. The dashboard and curation tab will also need them.
51
+
52
+ **Type Distribution chart** (new panel, left side of 2-col grid):
53
+ - Bar chart using existing `BarChart` component
54
+ - Shows count per knowledge type: decision, pattern, preference, error_fix, conversation, etc.
55
+ - Color-coded per type (import `TYPE_COLORS` from `constants.ts`)
56
+
57
+ **Lobe Health panel** (new panel, right side of 2-col grid):
58
+ - Stale count (units with stale_score > 0.5)
59
+ - Average confidence
60
+ - Top accessed unit (text preview)
61
+ - Sensitivity breakdown: counts per level (public/internal/restricted/confidential) as inline badges
62
+
63
+ ### API changes needed
64
+
65
+ `GET /api/cortex/status` — extend response to include:
66
+ ```typescript
67
+ {
68
+ // existing fields...
69
+ quality?: {
70
+ coverage_score: number;
71
+ type_distribution: Record<string, number>;
72
+ avg_confidence: number;
73
+ stale_count: number;
74
+ sensitivity_counts: Record<string, number>;
75
+ top_accessed: Array<{ text: string; type: string; access_count: number }>;
76
+ };
77
+ }
78
+ ```
79
+
80
+ This calls `assessLobe()` from the addon for the aggregate view. The status route already gathers lobe stats — extend it to run the assess pass when the addon supports it.
81
+
82
+ ---
83
+
84
+ ## 3. Knowledge Tab (Merged)
85
+
86
+ ### File: `src/components/cortex/knowledge-tab.tsx`
87
+
88
+ Add a collapsible "Query Analyzer" section at the bottom of the existing knowledge browser. This section contains the content that was previously in `context-tab.tsx`:
89
+
90
+ - Text input for query
91
+ - Results display showing matched knowledge with relevance scores
92
+ - Intent detection display (if context engine is available)
93
+ - Entity extraction display
94
+
95
+ The existing knowledge browser (search, filter by type/layer, delete) remains the primary content.
96
+
97
+ ### File changes
98
+ - `context-tab.tsx` — delete after merging its query analyzer content into `knowledge-tab.tsx`. No reason to keep an orphaned file.
99
+
100
+ ---
101
+
102
+ ## 4. Curation Tab (New)
103
+
104
+ ### File: `src/components/cortex/curation-tab.tsx`
105
+
106
+ **Layout:**
107
+ - Top: Workspace selector dropdown (fetches workspace list from `GET /api/workspaces` — returns flat array of `{ id, name, color, ... }`)
108
+ - Below: Horizontal pipeline step bar
109
+ - Below: Content area for active step
110
+
111
+ **Loading/error states**: Each step shows a spinner overlay while its API call is in progress. Errors display in a red banner below the step content with the error message. The Refine step specifically checks for LLM API key availability before enabling the button (shows a warning with link to Settings if missing). The Seed and Refine steps can be long-running — the button disables and shows "Processing..." until the POST returns.
112
+
113
+ **Pipeline steps:**
114
+
115
+ #### Step 1: Seed
116
+ - Textarea for pasting document content (or file upload area)
117
+ - Format selector: markdown / plaintext / csv / auto
118
+ - Source reference input (filename/URL for provenance)
119
+ - "Distill after seeding" checkbox (default: true)
120
+ - "Seed" button → calls `POST /api/cortex/curation/seed`
121
+ - Result display: chunks created, chunks skipped, errors
122
+
123
+ #### Step 2: Assess
124
+ - "Run Assessment" button → calls `GET /api/cortex/curation/assess?workspace_id=X`
125
+ - Results display:
126
+ - Coverage score with color-coded gauge
127
+ - Type distribution bar chart
128
+ - Stale count
129
+ - Average confidence
130
+ - Top accessed units list
131
+
132
+ #### Step 3: Review
133
+ - Topic input field + "Review" button
134
+ - Results grouped by knowledge type (accordion sections)
135
+ - Each result shows: text, confidence, similarity score
136
+ - Limit selector (10/25/50)
137
+ - Calls `GET /api/cortex/curation/review?workspace_id=X&topic=Y`
138
+
139
+ #### Step 4: Refine
140
+ - Domain context textarea (pre-populated from workspace's LobeConfig if available)
141
+ - Checkboxes for which distillation passes to run (decisions/patterns/preferences/error_fixes)
142
+ - "Refine" button → calls `POST /api/cortex/curation/refine`
143
+ - Result display: source units found, old distilled purged, new units created, errors
144
+ - Warning if no LLM API key configured
145
+
146
+ #### Step 5: Publish
147
+ - Form fields: name, author, description, tags (chip input), version (semver), license selector
148
+ - Preview count slider (1–10, default 3)
149
+ - "Publish" button → calls `POST /api/cortex/curation/publish`
150
+ - Result display:
151
+ - Output file path
152
+ - Units before/after PII scrubbing
153
+ - Quality assessment summary
154
+ - Warning banner if coverage_score < 0.3
155
+
156
+ ### New API routes needed
157
+
158
+ These proxy to the addon's MCP tool handlers:
159
+
160
+ | Route | Method | Maps to |
161
+ |-------|--------|---------|
162
+ | `/api/cortex/curation/seed` | POST | `cortex_seed` |
163
+ | `/api/cortex/curation/assess` | GET | `cortex_assess` |
164
+ | `/api/cortex/curation/review` | GET | `cortex_review` |
165
+ | `/api/cortex/curation/refine` | POST | `cortex_refine` |
166
+ | `/api/cortex/curation/publish` | POST | `cortex_publish` |
167
+
168
+ Each route follows the existing pattern: auth check → get cortex instance → call handler → return JSON.
169
+
170
+ ---
171
+
172
+ ## 5. Marketplace Tab (New)
173
+
174
+ ### File: `src/components/cortex/marketplace-tab.tsx`
175
+
176
+ **Layout:**
177
+ - Top: "Import .cortexpack" button (file picker) + directory path display
178
+ - Below: Card grid of available packs
179
+
180
+ **Pack card:**
181
+ - Name (large), author, version
182
+ - Description (2-line clamp)
183
+ - Tags as chips
184
+ - Quality score badge (coverage_score with color)
185
+ - Unit count
186
+ - Preview samples (expandable — show 2-3 sample knowledge units)
187
+ - "Import" button → opens import dialog
188
+
189
+ **Import dialog (modal):**
190
+ - Target layer selector (personal/workspace/team)
191
+ - If workspace: workspace selector dropdown
192
+ - Merge strategy: append / merge / replace (radio buttons)
193
+ - Re-embed checkbox (default: false, with note about cost)
194
+ - If pack has `domain_context`: checkbox "Apply domain context to target workspace"
195
+ - Import button → calls `POST /api/cortex/import`
196
+ - Progress display during import
197
+
198
+ **Pack source:**
199
+ - Scan `~/.spaces/cortex/marketplace/` directory
200
+ - Read each `.cortexpack` file's manifest (tar header extraction without full unpack)
201
+ - Cache manifests for display
202
+
203
+ ### New API routes needed
204
+
205
+ | Route | Method | Description |
206
+ |-------|--------|-------------|
207
+ | `/api/cortex/marketplace/browse` | GET | Scan marketplace dir, return manifests |
208
+ | `/api/cortex/marketplace/preview?file=NAME` | GET | Extract preview samples from a named pack |
209
+
210
+ **Browse response contract:**
211
+ ```typescript
212
+ interface BrowseResponse {
213
+ packs: Array<{
214
+ filename: string; // e.g. "cfb-power-plants-v1.0.0.cortexpack"
215
+ manifest: {
216
+ version: string;
217
+ exportDate: string;
218
+ unitCount: number;
219
+ marketplace?: {
220
+ name: string;
221
+ author: string;
222
+ description: string;
223
+ tags: string[];
224
+ packageVersion: string;
225
+ license: string;
226
+ domain_context?: string;
227
+ quality: {
228
+ coverage_score: number;
229
+ avg_confidence: number;
230
+ type_distribution: Record<string, number>;
231
+ total_units: number;
232
+ };
233
+ preview: Array<{ text: string; type: string }>;
234
+ };
235
+ };
236
+ }>;
237
+ directory: string; // the scanned path
238
+ }
239
+ ```
240
+
241
+ If `~/.spaces/cortex/marketplace/` does not exist, the browse API creates it and returns `{ packs: [], directory }`. Packs without marketplace metadata (legacy v1 format) are still listed but show filename, unit count, and export date only.
242
+
243
+ **Import route changes**: The existing `POST /api/cortex/import` needs updating to accept `workspace_id` and `re_embed` as form fields (currently hardcodes `reEmbed: true`).
244
+
245
+ **Publish output**: `cortex_publish` writes the `.cortexpack` to `~/.spaces/cortex/marketplace/` so it appears immediately in the browse tab.
246
+
247
+ ---
248
+
249
+ ## 6. Settings Enhancements
250
+
251
+ ### File: `src/components/cortex/lobe-settings.tsx`
252
+
253
+ Add a "Domain Context" textarea below the tags section:
254
+
255
+ ```
256
+ Domain Context
257
+ [textarea — 4 rows, placeholder: "Describe the domain expertise this lobe should focus on..."]
258
+ (hint text: "Injected into distillation prompts for better extraction. E.g. 'This workspace covers CFB power plant engineering.'")
259
+ ```
260
+
261
+ Save via the existing `PUT /api/cortex/lobes/{workspaceId}` endpoint, adding `domain_context` to the `LobeConfig` payload.
262
+
263
+ **Type change required**: Add `domain_context?: string` to the `LobeConfig` interface in `src/lib/cortex/types.ts`. The addon already supports this field — the host-side type just needs to match. The `serializeLobeConfig` function uses spread, so the new field passes through without logic changes. No database migration needed — lobe config is stored as JSON in the workspaces table's `lobe_config` column.
264
+
265
+ ### File: `src/components/cortex/cortex-settings.tsx`
266
+
267
+ No structural changes. The existing settings (enable/disable, API keys, embedding, injection budget, distillation, federation, bootstrap) remain as-is.
268
+
269
+ ---
270
+
271
+ ## 7. Component Summary
272
+
273
+ ### New files
274
+ | File | Type | Description |
275
+ |------|------|-------------|
276
+ | `src/components/cortex/curation-tab.tsx` | Component | Curation pipeline with 5 steps |
277
+ | `src/components/cortex/marketplace-tab.tsx` | Component | Browse/import cortexpack cards |
278
+ | `src/components/cortex/marketplace-card.tsx` | Component | Individual pack card display |
279
+ | `src/components/cortex/import-dialog.tsx` | Component | Import options modal |
280
+ | `src/app/api/cortex/curation/seed/route.ts` | API | Proxy to cortex_seed |
281
+ | `src/app/api/cortex/curation/assess/route.ts` | API | Proxy to cortex_assess |
282
+ | `src/app/api/cortex/curation/review/route.ts` | API | Proxy to cortex_review |
283
+ | `src/app/api/cortex/curation/refine/route.ts` | API | Proxy to cortex_refine |
284
+ | `src/app/api/cortex/curation/publish/route.ts` | API | Proxy to cortex_publish |
285
+ | `src/app/api/cortex/marketplace/browse/route.ts` | API | Scan marketplace dir |
286
+ | `src/app/api/cortex/marketplace/preview/route.ts` | API | Extract pack preview |
287
+
288
+ ### New shared files
289
+ | File | Type | Description |
290
+ |------|------|-------------|
291
+ | `src/components/cortex/constants.ts` | Constants | Shared `TYPE_COLORS`, `SENSITIVITY_COLORS` extracted from knowledge-card |
292
+
293
+ ### Modified files
294
+ | File | Change |
295
+ |------|--------|
296
+ | `src/app/(desktop)/cortex/page.tsx` | 6-tab layout, remove Context tab, add Curation + Marketplace |
297
+ | `src/components/cortex/cortex-dashboard.tsx` | Add coverage score, type distribution, lobe health panels |
298
+ | `src/components/cortex/knowledge-tab.tsx` | Add query analyzer section (from context-tab) |
299
+ | `src/components/cortex/knowledge-card.tsx` | Import `TYPE_COLORS` from constants.ts instead of local definition |
300
+ | `src/components/cortex/lobe-settings.tsx` | Add domain_context textarea |
301
+ | `src/lib/cortex/types.ts` | Add `domain_context?: string` to `LobeConfig` interface |
302
+ | `src/app/api/cortex/status/route.ts` | Extend response with quality assessment data |
303
+ | `src/app/api/cortex/import/route.ts` | Accept `workspace_id` and `re_embed` form fields |
304
+
305
+ ### Deleted files
306
+ | File | Reason |
307
+ |------|--------|
308
+ | `src/components/cortex/context-tab.tsx` | Merged into knowledge-tab.tsx |
309
+
310
+ ### Unchanged files
311
+ | File | Reason |
312
+ |------|--------|
313
+ | `cortex-indicator.tsx` | Already shows status badge — no changes needed |
314
+ | `cortex-settings.tsx` | Existing settings cover all config — no changes needed |
315
+ | `injection-badge.tsx` | Already shows injection count — no changes needed |
316
+ | `knowledge-card.tsx` | Already has sensitivity, evidence, contradiction badges — no changes needed |
317
+ | `cortex-panel.tsx` | Sidebar search panel — no changes needed |
318
+ | `entity-graph.tsx` | Graph visualization — no changes needed |
319
+
320
+ ---
321
+
322
+ ## 8. Design Patterns
323
+
324
+ All new components follow existing patterns:
325
+ - `'use client'` directive
326
+ - `api()` helper for URL construction
327
+ - `fetch()` for API calls (no axios/swr)
328
+ - Tailwind classes matching existing dark theme (bg-white/[0.02], border-white/[0.06], text-gray-400, etc.)
329
+ - `lucide-react` for icons
330
+ - No external UI libraries
331
+ - Optimistic updates where appropriate
332
+ - Loading/error states with consistent styling
333
+
334
+ ---
335
+
336
+ ## 9. Future Considerations (Not in Scope)
337
+
338
+ - **Remote marketplace registry** — cloud-hosted pack discovery/download. Current design scans local directory; the card grid + manifest structure supports swapping in a remote source later.
339
+ - **Pack ratings/reviews** — would require a central registry.
340
+ - **Automatic curation suggestions** — "your coverage is low, try seeding X" — could be added to the assess step later.
341
+ - **Real-time distillation progress** — WebSocket/SSE for long-running refine operations. Current design polls or waits.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jlongo78/agent-spaces",
3
- "version": "0.7.2",
3
+ "version": "0.7.4",
4
4
  "description": "Agent workspace manager for Claude, Codex, Gemini, and more",
5
5
  "bin": {
6
6
  "spaces": "./bin/spaces.js"
@@ -4,16 +4,17 @@ import { useState, useEffect } from 'react';
4
4
  import dynamic from 'next/dynamic';
5
5
  import { api } from '@/lib/api';
6
6
  import { KnowledgeTab } from '@/components/cortex/knowledge-tab';
7
- import { ContextTab } from '@/components/cortex/context-tab';
8
7
  import { CortexSettings } from '@/components/cortex/cortex-settings';
9
8
  import { CortexDashboard } from '@/components/cortex/cortex-dashboard';
9
+ import { CurationTab } from '@/components/cortex/curation-tab';
10
+ import { MarketplaceTab } from '@/components/cortex/marketplace-tab';
10
11
 
11
12
  const EntityGraphView = dynamic(
12
13
  () => import('@/components/cortex/entity-graph').then(m => ({ default: m.EntityGraphView })),
13
14
  { ssr: false, loading: () => <div className="flex-1 flex items-center justify-center text-gray-500 text-sm">Loading graph...</div> }
14
15
  );
15
16
 
16
- type Tab = 'dashboard' | 'graph' | 'knowledge' | 'context' | 'settings';
17
+ type Tab = 'dashboard' | 'graph' | 'knowledge' | 'curation' | 'marketplace' | 'settings';
17
18
 
18
19
  export default function CortexPage() {
19
20
  const [tab, setTab] = useState<Tab>('dashboard');
@@ -29,7 +30,8 @@ export default function CortexPage() {
29
30
  { key: 'dashboard', label: 'Dashboard' },
30
31
  { key: 'graph', label: 'Graph' },
31
32
  { key: 'knowledge', label: 'Knowledge' },
32
- { key: 'context', label: 'Context' },
33
+ { key: 'curation', label: 'Curation' },
34
+ { key: 'marketplace', label: 'Marketplace' },
33
35
  { key: 'settings', label: 'Settings' },
34
36
  ];
35
37
 
@@ -63,7 +65,8 @@ export default function CortexPage() {
63
65
  {tab === 'dashboard' && <CortexDashboard />}
64
66
  {tab === 'graph' && <EntityGraphView />}
65
67
  {tab === 'knowledge' && <KnowledgeTab />}
66
- {tab === 'context' && <ContextTab />}
68
+ {tab === 'curation' && <CurationTab />}
69
+ {tab === 'marketplace' && <MarketplaceTab />}
67
70
  {tab === 'settings' && (
68
71
  <div className="p-6 max-w-2xl space-y-8">
69
72
  <CortexSettings />
@@ -0,0 +1,27 @@
1
+ import { NextResponse } from 'next/server';
2
+ import type { NextRequest } from 'next/server';
3
+ import { getAuthUser, withUser } from '@/lib/auth';
4
+ import { isCortexAvailable, getCortex } from '@/lib/cortex';
5
+ import { handleToolCall } from '@/lib/cortex/mcp/server';
6
+
7
+ export async function GET(request: NextRequest) {
8
+ const user = getAuthUser(request);
9
+ return withUser(user, async () => {
10
+ if (!isCortexAvailable()) {
11
+ return NextResponse.json({ error: 'Cortex unavailable' }, { status: 403 });
12
+ }
13
+ const cortex = await getCortex();
14
+ if (!cortex) return NextResponse.json({ error: 'Cortex disabled' }, { status: 503 });
15
+
16
+ const url = new URL(request.url);
17
+ const workspace_id = parseInt(url.searchParams.get('workspace_id') || '0', 10);
18
+ if (!workspace_id) {
19
+ return NextResponse.json({ error: 'workspace_id is required' }, { status: 400 });
20
+ }
21
+ const result = await handleToolCall('cortex_assess', { workspace_id }, cortex);
22
+ if (result.isError) {
23
+ return NextResponse.json({ error: JSON.parse(result.content[0].text) }, { status: 400 });
24
+ }
25
+ return NextResponse.json(JSON.parse(result.content[0].text));
26
+ });
27
+ }
@@ -0,0 +1,23 @@
1
+ import { NextResponse } from 'next/server';
2
+ import type { NextRequest } from 'next/server';
3
+ import { getAuthUser, withUser } from '@/lib/auth';
4
+ import { isCortexAvailable, getCortex } from '@/lib/cortex';
5
+ import { handleToolCall } from '@/lib/cortex/mcp/server';
6
+
7
+ export async function POST(request: NextRequest) {
8
+ const user = getAuthUser(request);
9
+ return withUser(user, async () => {
10
+ if (!isCortexAvailable()) {
11
+ return NextResponse.json({ error: 'Cortex unavailable' }, { status: 403 });
12
+ }
13
+ const cortex = await getCortex();
14
+ if (!cortex) return NextResponse.json({ error: 'Cortex disabled' }, { status: 503 });
15
+
16
+ const body = await request.json();
17
+ const result = await handleToolCall('cortex_publish', body, cortex);
18
+ if (result.isError) {
19
+ return NextResponse.json({ error: JSON.parse(result.content[0].text) }, { status: 400 });
20
+ }
21
+ return NextResponse.json(JSON.parse(result.content[0].text));
22
+ });
23
+ }
@@ -0,0 +1,23 @@
1
+ import { NextResponse } from 'next/server';
2
+ import type { NextRequest } from 'next/server';
3
+ import { getAuthUser, withUser } from '@/lib/auth';
4
+ import { isCortexAvailable, getCortex } from '@/lib/cortex';
5
+ import { handleToolCall } from '@/lib/cortex/mcp/server';
6
+
7
+ export async function POST(request: NextRequest) {
8
+ const user = getAuthUser(request);
9
+ return withUser(user, async () => {
10
+ if (!isCortexAvailable()) {
11
+ return NextResponse.json({ error: 'Cortex unavailable' }, { status: 403 });
12
+ }
13
+ const cortex = await getCortex();
14
+ if (!cortex) return NextResponse.json({ error: 'Cortex disabled' }, { status: 503 });
15
+
16
+ const body = await request.json();
17
+ const result = await handleToolCall('cortex_refine', body, cortex);
18
+ if (result.isError) {
19
+ return NextResponse.json({ error: JSON.parse(result.content[0].text) }, { status: 400 });
20
+ }
21
+ return NextResponse.json(JSON.parse(result.content[0].text));
22
+ });
23
+ }
@@ -0,0 +1,29 @@
1
+ import { NextResponse } from 'next/server';
2
+ import type { NextRequest } from 'next/server';
3
+ import { getAuthUser, withUser } from '@/lib/auth';
4
+ import { isCortexAvailable, getCortex } from '@/lib/cortex';
5
+ import { handleToolCall } from '@/lib/cortex/mcp/server';
6
+
7
+ export async function GET(request: NextRequest) {
8
+ const user = getAuthUser(request);
9
+ return withUser(user, async () => {
10
+ if (!isCortexAvailable()) {
11
+ return NextResponse.json({ error: 'Cortex unavailable' }, { status: 403 });
12
+ }
13
+ const cortex = await getCortex();
14
+ if (!cortex) return NextResponse.json({ error: 'Cortex disabled' }, { status: 503 });
15
+
16
+ const url = new URL(request.url);
17
+ const workspace_id = parseInt(url.searchParams.get('workspace_id') || '0', 10);
18
+ const topic = url.searchParams.get('topic') || '';
19
+ const limit = parseInt(url.searchParams.get('limit') || '10', 10);
20
+ if (!workspace_id || !topic) {
21
+ return NextResponse.json({ error: 'workspace_id and topic are required' }, { status: 400 });
22
+ }
23
+ const result = await handleToolCall('cortex_review', { workspace_id, topic, limit }, cortex);
24
+ if (result.isError) {
25
+ return NextResponse.json({ error: JSON.parse(result.content[0].text) }, { status: 400 });
26
+ }
27
+ return NextResponse.json(JSON.parse(result.content[0].text));
28
+ });
29
+ }
@@ -0,0 +1,23 @@
1
+ import { NextResponse } from 'next/server';
2
+ import type { NextRequest } from 'next/server';
3
+ import { getAuthUser, withUser } from '@/lib/auth';
4
+ import { isCortexAvailable, getCortex } from '@/lib/cortex';
5
+ import { handleToolCall } from '@/lib/cortex/mcp/server';
6
+
7
+ export async function POST(request: NextRequest) {
8
+ const user = getAuthUser(request);
9
+ return withUser(user, async () => {
10
+ if (!isCortexAvailable()) {
11
+ return NextResponse.json({ error: 'Cortex unavailable' }, { status: 403 });
12
+ }
13
+ const cortex = await getCortex();
14
+ if (!cortex) return NextResponse.json({ error: 'Cortex disabled' }, { status: 503 });
15
+
16
+ const body = await request.json();
17
+ const result = await handleToolCall('cortex_seed', body, cortex);
18
+ if (result.isError) {
19
+ return NextResponse.json({ error: JSON.parse(result.content[0].text) }, { status: 400 });
20
+ }
21
+ return NextResponse.json(JSON.parse(result.content[0].text));
22
+ });
23
+ }
@@ -156,10 +156,10 @@ export async function POST(request: NextRequest) {
156
156
 
157
157
  // ── 7. Cross-link projects to workspaces via sessions ────
158
158
  const wsProjectLinks = db.prepare(`
159
- SELECT DISTINCT pa.workspace_id, s.project_id
159
+ SELECT DISTINCT ws.workspace_id, s.project_id
160
160
  FROM sessions s
161
- JOIN panes pa ON pa.id = s.pane_id
162
- WHERE pa.workspace_id IS NOT NULL AND s.project_id IS NOT NULL
161
+ JOIN workspace_sessions ws ON ws.session_id = s.id
162
+ WHERE ws.workspace_id IS NOT NULL AND s.project_id IS NOT NULL
163
163
  `).all() as { workspace_id: number; project_id: string }[];
164
164
 
165
165
  for (const wpl of wsProjectLinks) {
@@ -6,6 +6,7 @@ import os from 'os';
6
6
  import { getAuthUser, withUser } from '@/lib/auth';
7
7
  import { isCortexAvailable, getCortex } from '@/lib/cortex';
8
8
  import { importCortexpack } from '@/lib/cortex/portability/importer';
9
+ import { getUserPaths } from '@/lib/config';
9
10
 
10
11
  export async function POST(request: NextRequest) {
11
12
  const user = getAuthUser(request);
@@ -13,31 +14,62 @@ export async function POST(request: NextRequest) {
13
14
  if (!isCortexAvailable()) {
14
15
  return NextResponse.json({ error: 'Cortex unavailable' }, { status: 403 });
15
16
  }
16
-
17
17
  const cortex = await getCortex();
18
18
  if (!cortex) return NextResponse.json({ error: 'Cortex disabled' }, { status: 503 });
19
19
 
20
- const formData = await request.formData();
21
- const file = formData.get('file') as File;
22
- if (!file) {
23
- return NextResponse.json({ error: 'No file uploaded' }, { status: 400 });
24
- }
20
+ const contentType = request.headers.get('content-type') || '';
21
+
22
+ if (contentType.includes('application/json')) {
23
+ const body = await request.json();
24
+ const filename = body.marketplace_file;
25
+ if (!filename) {
26
+ return NextResponse.json({ error: 'marketplace_file is required' }, { status: 400 });
27
+ }
28
+ const safe = path.basename(filename);
29
+ const { spacesDir } = getUserPaths(user);
30
+ const packPath = path.join(spacesDir, 'cortex', 'marketplace', safe);
31
+ if (!fs.existsSync(packPath)) {
32
+ return NextResponse.json({ error: 'Pack not found' }, { status: 404 });
33
+ }
25
34
 
26
- const tmpPath = path.join(os.tmpdir(), `cortex-import-${Date.now()}.cortexpack`);
27
- const bytes = await file.arrayBuffer();
28
- fs.writeFileSync(tmpPath, Buffer.from(bytes));
35
+ const targetLayer = body.target_layer || 'workspace';
36
+ const workspaceId = body.workspace_id;
37
+ const effectiveLayer = targetLayer === 'workspace' && workspaceId
38
+ ? `workspace/${workspaceId}` : targetLayer;
29
39
 
30
- const targetLayer = (formData.get('target_layer') as string) || 'workspace';
31
- const mergeStrategy = (formData.get('merge_strategy') as string) || 'merge';
40
+ importCortexpack(packPath, cortex.store, cortex.embedding, {
41
+ targetLayer: effectiveLayer,
42
+ mergeStrategy: (body.merge_strategy || 'merge') as any,
43
+ reEmbed: body.re_embed ?? false,
44
+ });
45
+ return NextResponse.json({ status: 'started' });
32
46
 
33
- importCortexpack(tmpPath, cortex.store, cortex.embedding, {
34
- targetLayer,
35
- mergeStrategy: mergeStrategy as any,
36
- reEmbed: true,
37
- }).finally(() => {
38
- try { fs.unlinkSync(tmpPath); } catch { /* ignore */ }
39
- });
47
+ } else {
48
+ const formData = await request.formData();
49
+ const file = formData.get('file') as File;
50
+ if (!file) {
51
+ return NextResponse.json({ error: 'No file uploaded' }, { status: 400 });
52
+ }
40
53
 
41
- return NextResponse.json({ status: 'started' });
54
+ const tmpPath = path.join(os.tmpdir(), `cortex-import-${Date.now()}.cortexpack`);
55
+ const bytes = await file.arrayBuffer();
56
+ fs.writeFileSync(tmpPath, Buffer.from(bytes));
57
+
58
+ const targetLayer = (formData.get('target_layer') as string) || 'workspace';
59
+ const mergeStrategy = (formData.get('merge_strategy') as string) || 'merge';
60
+ const reEmbed = formData.get('re_embed') === 'true';
61
+ const workspaceId = formData.get('workspace_id') as string | null;
62
+ const effectiveLayer = targetLayer === 'workspace' && workspaceId
63
+ ? `workspace/${workspaceId}` : targetLayer;
64
+
65
+ importCortexpack(tmpPath, cortex.store, cortex.embedding, {
66
+ targetLayer: effectiveLayer,
67
+ mergeStrategy: mergeStrategy as any,
68
+ reEmbed,
69
+ }).finally(() => {
70
+ try { fs.unlinkSync(tmpPath); } catch { /* ignore */ }
71
+ });
72
+ return NextResponse.json({ status: 'started' });
73
+ }
42
74
  });
43
75
  }
@@ -0,0 +1,43 @@
1
+ import { NextResponse } from 'next/server';
2
+ import type { NextRequest } from 'next/server';
3
+ import { getAuthUser, withUser } from '@/lib/auth';
4
+ import { getUserPaths } from '@/lib/config';
5
+ import fs from 'fs';
6
+ import path from 'path';
7
+ import { execSync } from 'child_process';
8
+
9
+ export async function GET(request: NextRequest) {
10
+ const user = getAuthUser(request);
11
+ return withUser(user, async () => {
12
+ const { spacesDir } = getUserPaths(user);
13
+ const marketDir = path.join(spacesDir, 'cortex', 'marketplace');
14
+
15
+ if (!fs.existsSync(marketDir)) {
16
+ fs.mkdirSync(marketDir, { recursive: true });
17
+ return NextResponse.json({ packs: [], directory: marketDir });
18
+ }
19
+
20
+ const files = fs.readdirSync(marketDir).filter(f => f.endsWith('.cortexpack'));
21
+ const packs: any[] = [];
22
+
23
+ for (const filename of files) {
24
+ try {
25
+ const filePath = path.join(marketDir, filename);
26
+ const stdout = execSync(
27
+ `tar -xzf "${filePath}" -O manifest.json 2>/dev/null`,
28
+ { encoding: 'utf-8', timeout: 5000 }
29
+ );
30
+ const manifest = JSON.parse(stdout);
31
+ packs.push({ filename, manifest });
32
+ } catch {
33
+ const stat = fs.statSync(path.join(marketDir, filename));
34
+ packs.push({
35
+ filename,
36
+ manifest: { version: 'unknown', exportDate: stat.mtime.toISOString(), unitCount: 0 },
37
+ });
38
+ }
39
+ }
40
+
41
+ return NextResponse.json({ packs, directory: marketDir });
42
+ });
43
+ }