@jlongo78/agent-spaces 0.9.7 → 0.9.9

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 (643) hide show
  1. package/.next/standalone/.claude/settings.local.json +17 -4
  2. package/.next/standalone/.next/BUILD_ID +1 -1
  3. package/.next/standalone/.next/app-path-routes-manifest.json +4 -0
  4. package/.next/standalone/.next/build-manifest.json +2 -2
  5. package/.next/standalone/.next/prerender-manifest.json +3 -3
  6. package/.next/standalone/.next/routes-manifest.json +29 -0
  7. package/.next/standalone/.next/server/app/(desktop)/admin/analytics/page.js.nft.json +1 -1
  8. package/.next/standalone/.next/server/app/(desktop)/admin/analytics/page_client-reference-manifest.js +1 -1
  9. package/.next/standalone/.next/server/app/(desktop)/admin/users/page_client-reference-manifest.js +1 -1
  10. package/.next/standalone/.next/server/app/(desktop)/analytics/page_client-reference-manifest.js +1 -1
  11. package/.next/standalone/.next/server/app/(desktop)/cortex/page_client-reference-manifest.js +1 -1
  12. package/.next/standalone/.next/server/app/(desktop)/network/page_client-reference-manifest.js +1 -1
  13. package/.next/standalone/.next/server/app/(desktop)/page_client-reference-manifest.js +1 -1
  14. package/.next/standalone/.next/server/app/(desktop)/projects/page_client-reference-manifest.js +1 -1
  15. package/.next/standalone/.next/server/app/(desktop)/sessions/[id]/page.js.nft.json +1 -1
  16. package/.next/standalone/.next/server/app/(desktop)/sessions/[id]/page_client-reference-manifest.js +1 -1
  17. package/.next/standalone/.next/server/app/(desktop)/sessions/page_client-reference-manifest.js +1 -1
  18. package/.next/standalone/.next/server/app/(desktop)/settings/page_client-reference-manifest.js +1 -1
  19. package/.next/standalone/.next/server/app/(desktop)/terminal/page.js.nft.json +1 -1
  20. package/.next/standalone/.next/server/app/(desktop)/terminal/page_client-reference-manifest.js +1 -1
  21. package/.next/standalone/.next/server/app/(desktop)/terminal/pane/[id]/page_client-reference-manifest.js +1 -1
  22. package/.next/standalone/.next/server/app/(desktop)/terminal/remote/[nodeId]/[workspaceId]/page_client-reference-manifest.js +1 -1
  23. package/.next/standalone/.next/server/app/(desktop)/workspaces/page_client-reference-manifest.js +1 -1
  24. package/.next/standalone/.next/server/app/_global-error.html +2 -2
  25. package/.next/standalone/.next/server/app/_global-error.rsc +1 -1
  26. package/.next/standalone/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  27. package/.next/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  28. package/.next/standalone/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  29. package/.next/standalone/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  30. package/.next/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  31. package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  32. package/.next/standalone/.next/server/app/_not-found.html +1 -1
  33. package/.next/standalone/.next/server/app/_not-found.rsc +2 -2
  34. package/.next/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +2 -2
  35. package/.next/standalone/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
  36. package/.next/standalone/.next/server/app/_not-found.segments/_index.segment.rsc +2 -2
  37. package/.next/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  38. package/.next/standalone/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  39. package/.next/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  40. package/.next/standalone/.next/server/app/admin/analytics.html +1 -1
  41. package/.next/standalone/.next/server/app/admin/analytics.rsc +3 -3
  42. package/.next/standalone/.next/server/app/admin/analytics.segments/!KGRlc2t0b3Ap/admin/analytics/__PAGE__.segment.rsc +2 -2
  43. package/.next/standalone/.next/server/app/admin/analytics.segments/!KGRlc2t0b3Ap/admin/analytics.segment.rsc +1 -1
  44. package/.next/standalone/.next/server/app/admin/analytics.segments/!KGRlc2t0b3Ap/admin.segment.rsc +1 -1
  45. package/.next/standalone/.next/server/app/admin/analytics.segments/!KGRlc2t0b3Ap.segment.rsc +1 -1
  46. package/.next/standalone/.next/server/app/admin/analytics.segments/_full.segment.rsc +3 -3
  47. package/.next/standalone/.next/server/app/admin/analytics.segments/_head.segment.rsc +1 -1
  48. package/.next/standalone/.next/server/app/admin/analytics.segments/_index.segment.rsc +2 -2
  49. package/.next/standalone/.next/server/app/admin/analytics.segments/_tree.segment.rsc +2 -2
  50. package/.next/standalone/.next/server/app/admin/users.html +1 -1
  51. package/.next/standalone/.next/server/app/admin/users.rsc +2 -2
  52. package/.next/standalone/.next/server/app/admin/users.segments/!KGRlc2t0b3Ap/admin/users/__PAGE__.segment.rsc +1 -1
  53. package/.next/standalone/.next/server/app/admin/users.segments/!KGRlc2t0b3Ap/admin/users.segment.rsc +1 -1
  54. package/.next/standalone/.next/server/app/admin/users.segments/!KGRlc2t0b3Ap/admin.segment.rsc +1 -1
  55. package/.next/standalone/.next/server/app/admin/users.segments/!KGRlc2t0b3Ap.segment.rsc +1 -1
  56. package/.next/standalone/.next/server/app/admin/users.segments/_full.segment.rsc +2 -2
  57. package/.next/standalone/.next/server/app/admin/users.segments/_head.segment.rsc +1 -1
  58. package/.next/standalone/.next/server/app/admin/users.segments/_index.segment.rsc +2 -2
  59. package/.next/standalone/.next/server/app/admin/users.segments/_tree.segment.rsc +2 -2
  60. package/.next/standalone/.next/server/app/analytics.html +1 -1
  61. package/.next/standalone/.next/server/app/analytics.rsc +2 -2
  62. package/.next/standalone/.next/server/app/analytics.segments/!KGRlc2t0b3Ap/analytics/__PAGE__.segment.rsc +1 -1
  63. package/.next/standalone/.next/server/app/analytics.segments/!KGRlc2t0b3Ap/analytics.segment.rsc +1 -1
  64. package/.next/standalone/.next/server/app/analytics.segments/!KGRlc2t0b3Ap.segment.rsc +1 -1
  65. package/.next/standalone/.next/server/app/analytics.segments/_full.segment.rsc +2 -2
  66. package/.next/standalone/.next/server/app/analytics.segments/_head.segment.rsc +1 -1
  67. package/.next/standalone/.next/server/app/analytics.segments/_index.segment.rsc +2 -2
  68. package/.next/standalone/.next/server/app/analytics.segments/_tree.segment.rsc +2 -2
  69. package/.next/standalone/.next/server/app/api/analytics/overview/route.js +1 -1
  70. package/.next/standalone/.next/server/app/api/analytics/overview/route.js.nft.json +1 -1
  71. package/.next/standalone/.next/server/app/api/benchmark/lobes/route.js +1 -1
  72. package/.next/standalone/.next/server/app/api/benchmark/lobes/route.js.nft.json +1 -1
  73. package/.next/standalone/.next/server/app/api/benchmark/run/route.js +1 -1
  74. package/.next/standalone/.next/server/app/api/benchmark/run/route.js.nft.json +1 -1
  75. package/.next/standalone/.next/server/app/api/benchmark/runs/[id]/route.js +1 -1
  76. package/.next/standalone/.next/server/app/api/benchmark/runs/[id]/route.js.nft.json +1 -1
  77. package/.next/standalone/.next/server/app/api/benchmark/runs/route.js +1 -1
  78. package/.next/standalone/.next/server/app/api/benchmark/runs/route.js.nft.json +1 -1
  79. package/.next/standalone/.next/server/app/api/benchmark/status/route.js +1 -1
  80. package/.next/standalone/.next/server/app/api/benchmark/status/route.js.nft.json +1 -1
  81. package/.next/standalone/.next/server/app/api/bulk/route.js +1 -1
  82. package/.next/standalone/.next/server/app/api/bulk/route.js.nft.json +1 -1
  83. package/.next/standalone/.next/server/app/api/claude/usage/route/app-paths-manifest.json +3 -0
  84. package/.next/standalone/.next/server/app/api/claude/usage/route/build-manifest.json +11 -0
  85. package/.next/standalone/.next/server/app/api/claude/usage/route/server-reference-manifest.json +4 -0
  86. package/.next/standalone/.next/server/app/api/claude/usage/route.js +8 -0
  87. package/.next/standalone/.next/server/app/api/claude/usage/route.js.map +5 -0
  88. package/.next/standalone/.next/server/app/api/claude/usage/route.js.nft.json +1 -0
  89. package/.next/standalone/.next/server/app/api/claude/usage/route_client-reference-manifest.js +2 -0
  90. package/.next/standalone/.next/server/app/api/config/route.js +1 -1
  91. package/.next/standalone/.next/server/app/api/config/route.js.nft.json +1 -1
  92. package/.next/standalone/.next/server/app/api/cortex/context/route.js +1 -1
  93. package/.next/standalone/.next/server/app/api/cortex/context/route.js.nft.json +1 -1
  94. package/.next/standalone/.next/server/app/api/cortex/curation/assess/route.js +1 -1
  95. package/.next/standalone/.next/server/app/api/cortex/curation/assess/route.js.nft.json +1 -1
  96. package/.next/standalone/.next/server/app/api/cortex/curation/publish/route.js +1 -1
  97. package/.next/standalone/.next/server/app/api/cortex/curation/publish/route.js.nft.json +1 -1
  98. package/.next/standalone/.next/server/app/api/cortex/curation/refine/route.js +1 -1
  99. package/.next/standalone/.next/server/app/api/cortex/curation/refine/route.js.nft.json +1 -1
  100. package/.next/standalone/.next/server/app/api/cortex/curation/review/route.js +1 -1
  101. package/.next/standalone/.next/server/app/api/cortex/curation/review/route.js.nft.json +1 -1
  102. package/.next/standalone/.next/server/app/api/cortex/curation/seed/route.js +1 -1
  103. package/.next/standalone/.next/server/app/api/cortex/curation/seed/route.js.nft.json +1 -1
  104. package/.next/standalone/.next/server/app/api/cortex/export/route.js +1 -1
  105. package/.next/standalone/.next/server/app/api/cortex/export/route.js.nft.json +1 -1
  106. package/.next/standalone/.next/server/app/api/cortex/federation/pending/route.js +1 -1
  107. package/.next/standalone/.next/server/app/api/cortex/federation/pending/route.js.nft.json +1 -1
  108. package/.next/standalone/.next/server/app/api/cortex/federation/resolve/route.js +1 -1
  109. package/.next/standalone/.next/server/app/api/cortex/federation/resolve/route.js.nft.json +1 -1
  110. package/.next/standalone/.next/server/app/api/cortex/federation/search/route.js +1 -1
  111. package/.next/standalone/.next/server/app/api/cortex/federation/search/route.js.nft.json +1 -1
  112. package/.next/standalone/.next/server/app/api/cortex/federation/teach/route.js +1 -1
  113. package/.next/standalone/.next/server/app/api/cortex/federation/teach/route.js.nft.json +1 -1
  114. package/.next/standalone/.next/server/app/api/cortex/graph/edges/route.js +1 -1
  115. package/.next/standalone/.next/server/app/api/cortex/graph/edges/route.js.nft.json +1 -1
  116. package/.next/standalone/.next/server/app/api/cortex/graph/entities/[id]/route.js +1 -1
  117. package/.next/standalone/.next/server/app/api/cortex/graph/entities/[id]/route.js.nft.json +1 -1
  118. package/.next/standalone/.next/server/app/api/cortex/graph/entities/route.js +1 -1
  119. package/.next/standalone/.next/server/app/api/cortex/graph/entities/route.js.nft.json +1 -1
  120. package/.next/standalone/.next/server/app/api/cortex/graph/populate/route.js +1 -1
  121. package/.next/standalone/.next/server/app/api/cortex/graph/populate/route.js.nft.json +1 -1
  122. package/.next/standalone/.next/server/app/api/cortex/import/route.js +1 -1
  123. package/.next/standalone/.next/server/app/api/cortex/import/route.js.nft.json +1 -1
  124. package/.next/standalone/.next/server/app/api/cortex/import/status/route.js +1 -1
  125. package/.next/standalone/.next/server/app/api/cortex/import/status/route.js.nft.json +1 -1
  126. package/.next/standalone/.next/server/app/api/cortex/ingest/bootstrap/route.js +1 -1
  127. package/.next/standalone/.next/server/app/api/cortex/ingest/bootstrap/route.js.nft.json +1 -1
  128. package/.next/standalone/.next/server/app/api/cortex/ingest/status/route.js +1 -1
  129. package/.next/standalone/.next/server/app/api/cortex/ingest/status/route.js.nft.json +1 -1
  130. package/.next/standalone/.next/server/app/api/cortex/knowledge/[id]/route.js +1 -1
  131. package/.next/standalone/.next/server/app/api/cortex/knowledge/[id]/route.js.nft.json +1 -1
  132. package/.next/standalone/.next/server/app/api/cortex/knowledge/route.js +1 -1
  133. package/.next/standalone/.next/server/app/api/cortex/knowledge/route.js.nft.json +1 -1
  134. package/.next/standalone/.next/server/app/api/cortex/lobes/[id]/route.js +1 -1
  135. package/.next/standalone/.next/server/app/api/cortex/lobes/[id]/route.js.nft.json +1 -1
  136. package/.next/standalone/.next/server/app/api/cortex/lobes/route.js +1 -1
  137. package/.next/standalone/.next/server/app/api/cortex/lobes/route.js.nft.json +1 -1
  138. package/.next/standalone/.next/server/app/api/cortex/lobes/share/route.js +1 -1
  139. package/.next/standalone/.next/server/app/api/cortex/lobes/share/route.js.nft.json +1 -1
  140. package/.next/standalone/.next/server/app/api/cortex/marketplace/browse/route.js +1 -1
  141. package/.next/standalone/.next/server/app/api/cortex/marketplace/browse/route.js.nft.json +1 -1
  142. package/.next/standalone/.next/server/app/api/cortex/marketplace/preview/route.js +1 -1
  143. package/.next/standalone/.next/server/app/api/cortex/marketplace/preview/route.js.nft.json +1 -1
  144. package/.next/standalone/.next/server/app/api/cortex/mcp/call/route.js +1 -1
  145. package/.next/standalone/.next/server/app/api/cortex/mcp/call/route.js.nft.json +1 -1
  146. package/.next/standalone/.next/server/app/api/cortex/mcp/tools/route.js +1 -1
  147. package/.next/standalone/.next/server/app/api/cortex/mcp/tools/route.js.nft.json +1 -1
  148. package/.next/standalone/.next/server/app/api/cortex/search/route.js +1 -1
  149. package/.next/standalone/.next/server/app/api/cortex/search/route.js.nft.json +1 -1
  150. package/.next/standalone/.next/server/app/api/cortex/settings/route.js +1 -1
  151. package/.next/standalone/.next/server/app/api/cortex/settings/route.js.nft.json +1 -1
  152. package/.next/standalone/.next/server/app/api/cortex/status/route.js +1 -1
  153. package/.next/standalone/.next/server/app/api/cortex/status/route.js.nft.json +1 -1
  154. package/.next/standalone/.next/server/app/api/cortex/timeline/route.js +1 -1
  155. package/.next/standalone/.next/server/app/api/cortex/timeline/route.js.nft.json +1 -1
  156. package/.next/standalone/.next/server/app/api/cortex/usage/route.js +1 -1
  157. package/.next/standalone/.next/server/app/api/cortex/usage/route.js.nft.json +1 -1
  158. package/.next/standalone/.next/server/app/api/cortex/workspace/[id]/context/route.js +1 -1
  159. package/.next/standalone/.next/server/app/api/cortex/workspace/[id]/context/route.js.nft.json +1 -1
  160. package/.next/standalone/.next/server/app/api/events/route.js +1 -1
  161. package/.next/standalone/.next/server/app/api/events/route.js.nft.json +1 -1
  162. package/.next/standalone/.next/server/app/api/files/route.js +1 -1
  163. package/.next/standalone/.next/server/app/api/files/route.js.nft.json +1 -1
  164. package/.next/standalone/.next/server/app/api/folders/route.js +1 -1
  165. package/.next/standalone/.next/server/app/api/folders/route.js.nft.json +1 -1
  166. package/.next/standalone/.next/server/app/api/network/handshake/route.js +1 -1
  167. package/.next/standalone/.next/server/app/api/network/handshake/route.js.nft.json +1 -1
  168. package/.next/standalone/.next/server/app/api/network/panes/[id]/route.js +1 -1
  169. package/.next/standalone/.next/server/app/api/network/panes/[id]/route.js.nft.json +1 -1
  170. package/.next/standalone/.next/server/app/api/network/panes/route.js +1 -1
  171. package/.next/standalone/.next/server/app/api/network/panes/route.js.nft.json +1 -1
  172. package/.next/standalone/.next/server/app/api/network/projects/route.js +1 -1
  173. package/.next/standalone/.next/server/app/api/network/projects/route.js.nft.json +1 -1
  174. package/.next/standalone/.next/server/app/api/network/search/route.js +1 -1
  175. package/.next/standalone/.next/server/app/api/network/search/route.js.nft.json +1 -1
  176. package/.next/standalone/.next/server/app/api/network/sessions/[id]/messages/route.js +1 -1
  177. package/.next/standalone/.next/server/app/api/network/sessions/[id]/messages/route.js.nft.json +1 -1
  178. package/.next/standalone/.next/server/app/api/network/sessions/[id]/route.js +1 -1
  179. package/.next/standalone/.next/server/app/api/network/sessions/[id]/route.js.nft.json +1 -1
  180. package/.next/standalone/.next/server/app/api/network/sessions/route.js +1 -1
  181. package/.next/standalone/.next/server/app/api/network/sessions/route.js.nft.json +1 -1
  182. package/.next/standalone/.next/server/app/api/network/workspaces/[id]/route.js +1 -1
  183. package/.next/standalone/.next/server/app/api/network/workspaces/[id]/route.js.nft.json +1 -1
  184. package/.next/standalone/.next/server/app/api/network/workspaces/route.js +1 -1
  185. package/.next/standalone/.next/server/app/api/network/workspaces/route.js.nft.json +1 -1
  186. package/.next/standalone/.next/server/app/api/panes/[id]/diff/route.js +1 -1
  187. package/.next/standalone/.next/server/app/api/panes/[id]/diff/route.js.nft.json +1 -1
  188. package/.next/standalone/.next/server/app/api/panes/[id]/route.js +1 -1
  189. package/.next/standalone/.next/server/app/api/panes/[id]/route.js.nft.json +1 -1
  190. package/.next/standalone/.next/server/app/api/panes/route.js +1 -1
  191. package/.next/standalone/.next/server/app/api/panes/route.js.nft.json +1 -1
  192. package/.next/standalone/.next/server/app/api/projects/route.js +1 -1
  193. package/.next/standalone/.next/server/app/api/projects/route.js.nft.json +1 -1
  194. package/.next/standalone/.next/server/app/api/proxy/models/[modelId]/[...path]/route.js +1 -1
  195. package/.next/standalone/.next/server/app/api/proxy/models/[modelId]/[...path]/route.js.nft.json +1 -1
  196. package/.next/standalone/.next/server/app/api/proxy/models/[modelId]/status/route.js +1 -1
  197. package/.next/standalone/.next/server/app/api/proxy/models/[modelId]/status/route.js.nft.json +1 -1
  198. package/.next/standalone/.next/server/app/api/search/route.js +2 -2
  199. package/.next/standalone/.next/server/app/api/search/route.js.nft.json +1 -1
  200. package/.next/standalone/.next/server/app/api/sessions/[id]/chat/route.js +1 -1
  201. package/.next/standalone/.next/server/app/api/sessions/[id]/chat/route.js.nft.json +1 -1
  202. package/.next/standalone/.next/server/app/api/sessions/[id]/messages/route.js +1 -1
  203. package/.next/standalone/.next/server/app/api/sessions/[id]/messages/route.js.nft.json +1 -1
  204. package/.next/standalone/.next/server/app/api/sessions/[id]/route.js +1 -1
  205. package/.next/standalone/.next/server/app/api/sessions/[id]/route.js.nft.json +1 -1
  206. package/.next/standalone/.next/server/app/api/sessions/route.js +2 -2
  207. package/.next/standalone/.next/server/app/api/sessions/route.js.nft.json +1 -1
  208. package/.next/standalone/.next/server/app/api/sync/route.js +1 -1
  209. package/.next/standalone/.next/server/app/api/sync/route.js.nft.json +1 -1
  210. package/.next/standalone/.next/server/app/api/tags/route.js +1 -1
  211. package/.next/standalone/.next/server/app/api/tags/route.js.nft.json +1 -1
  212. package/.next/standalone/.next/server/app/api/tier/route.js +1 -1
  213. package/.next/standalone/.next/server/app/api/tier/route.js.nft.json +1 -1
  214. package/.next/standalone/.next/server/app/api/whisper/config/route.js +1 -1
  215. package/.next/standalone/.next/server/app/api/whisper/config/route.js.nft.json +1 -1
  216. package/.next/standalone/.next/server/app/api/whisper/route.js.nft.json +1 -1
  217. package/.next/standalone/.next/server/app/api/wizard/chart/route/app-paths-manifest.json +3 -0
  218. package/.next/standalone/.next/server/app/api/wizard/chart/route/build-manifest.json +11 -0
  219. package/.next/standalone/.next/server/app/api/wizard/chart/route/server-reference-manifest.json +4 -0
  220. package/.next/standalone/.next/server/app/api/wizard/chart/route.js +7 -0
  221. package/.next/standalone/.next/server/app/api/wizard/chart/route.js.map +5 -0
  222. package/.next/standalone/.next/server/app/api/wizard/chart/route.js.nft.json +1 -0
  223. package/.next/standalone/.next/server/app/api/wizard/chart/route_client-reference-manifest.js +2 -0
  224. package/.next/standalone/.next/server/app/api/wizard/chat/route.js +1 -1
  225. package/.next/standalone/.next/server/app/api/wizard/chat/route.js.nft.json +1 -1
  226. package/.next/standalone/.next/server/app/api/workspaces/[id]/context/[key]/route.js +1 -1
  227. package/.next/standalone/.next/server/app/api/workspaces/[id]/context/[key]/route.js.nft.json +1 -1
  228. package/.next/standalone/.next/server/app/api/workspaces/[id]/context/route.js +1 -1
  229. package/.next/standalone/.next/server/app/api/workspaces/[id]/context/route.js.nft.json +1 -1
  230. package/.next/standalone/.next/server/app/api/workspaces/[id]/messages/[msgId]/route.js +1 -1
  231. package/.next/standalone/.next/server/app/api/workspaces/[id]/messages/[msgId]/route.js.nft.json +1 -1
  232. package/.next/standalone/.next/server/app/api/workspaces/[id]/messages/route.js +1 -1
  233. package/.next/standalone/.next/server/app/api/workspaces/[id]/messages/route.js.nft.json +1 -1
  234. package/.next/standalone/.next/server/app/api/workspaces/[id]/route.js +1 -1
  235. package/.next/standalone/.next/server/app/api/workspaces/[id]/route.js.nft.json +1 -1
  236. package/.next/standalone/.next/server/app/api/workspaces/[id]/sessions/route.js +1 -1
  237. package/.next/standalone/.next/server/app/api/workspaces/[id]/sessions/route.js.nft.json +1 -1
  238. package/.next/standalone/.next/server/app/api/workspaces/[id]/todos/[todoId]/route/app-paths-manifest.json +3 -0
  239. package/.next/standalone/.next/server/app/api/workspaces/[id]/todos/[todoId]/route/build-manifest.json +11 -0
  240. package/.next/standalone/.next/server/app/api/workspaces/[id]/todos/[todoId]/route/server-reference-manifest.json +4 -0
  241. package/.next/standalone/.next/server/app/api/workspaces/[id]/todos/[todoId]/route.js +8 -0
  242. package/.next/standalone/.next/server/app/api/workspaces/[id]/todos/[todoId]/route.js.map +5 -0
  243. package/.next/standalone/.next/server/app/api/workspaces/[id]/todos/[todoId]/route.js.nft.json +1 -0
  244. package/.next/standalone/.next/server/app/api/workspaces/[id]/todos/[todoId]/route_client-reference-manifest.js +2 -0
  245. package/.next/standalone/.next/server/app/api/workspaces/[id]/todos/route/app-paths-manifest.json +3 -0
  246. package/.next/standalone/.next/server/app/api/workspaces/[id]/todos/route/build-manifest.json +11 -0
  247. package/.next/standalone/.next/server/app/api/workspaces/[id]/todos/route/server-reference-manifest.json +4 -0
  248. package/.next/standalone/.next/server/app/api/workspaces/[id]/todos/route.js +8 -0
  249. package/.next/standalone/.next/server/app/api/workspaces/[id]/todos/route.js.map +5 -0
  250. package/.next/standalone/.next/server/app/api/workspaces/[id]/todos/route.js.nft.json +1 -0
  251. package/.next/standalone/.next/server/app/api/workspaces/[id]/todos/route_client-reference-manifest.js +2 -0
  252. package/.next/standalone/.next/server/app/api/workspaces/route.js +2 -2
  253. package/.next/standalone/.next/server/app/api/workspaces/route.js.nft.json +1 -1
  254. package/.next/standalone/.next/server/app/cortex.html +1 -1
  255. package/.next/standalone/.next/server/app/cortex.rsc +3 -3
  256. package/.next/standalone/.next/server/app/cortex.segments/!KGRlc2t0b3Ap/cortex/__PAGE__.segment.rsc +2 -2
  257. package/.next/standalone/.next/server/app/cortex.segments/!KGRlc2t0b3Ap/cortex.segment.rsc +1 -1
  258. package/.next/standalone/.next/server/app/cortex.segments/!KGRlc2t0b3Ap.segment.rsc +1 -1
  259. package/.next/standalone/.next/server/app/cortex.segments/_full.segment.rsc +3 -3
  260. package/.next/standalone/.next/server/app/cortex.segments/_head.segment.rsc +1 -1
  261. package/.next/standalone/.next/server/app/cortex.segments/_index.segment.rsc +2 -2
  262. package/.next/standalone/.next/server/app/cortex.segments/_tree.segment.rsc +2 -2
  263. package/.next/standalone/.next/server/app/login/page_client-reference-manifest.js +1 -1
  264. package/.next/standalone/.next/server/app/login.html +1 -1
  265. package/.next/standalone/.next/server/app/login.rsc +2 -2
  266. package/.next/standalone/.next/server/app/login.segments/_full.segment.rsc +2 -2
  267. package/.next/standalone/.next/server/app/login.segments/_head.segment.rsc +1 -1
  268. package/.next/standalone/.next/server/app/login.segments/_index.segment.rsc +2 -2
  269. package/.next/standalone/.next/server/app/login.segments/_tree.segment.rsc +2 -2
  270. package/.next/standalone/.next/server/app/login.segments/login/__PAGE__.segment.rsc +1 -1
  271. package/.next/standalone/.next/server/app/login.segments/login.segment.rsc +1 -1
  272. package/.next/standalone/.next/server/app/m/page_client-reference-manifest.js +1 -1
  273. package/.next/standalone/.next/server/app/m/projects/page_client-reference-manifest.js +1 -1
  274. package/.next/standalone/.next/server/app/m/projects.html +1 -1
  275. package/.next/standalone/.next/server/app/m/projects.rsc +2 -2
  276. package/.next/standalone/.next/server/app/m/projects.segments/_full.segment.rsc +2 -2
  277. package/.next/standalone/.next/server/app/m/projects.segments/_head.segment.rsc +1 -1
  278. package/.next/standalone/.next/server/app/m/projects.segments/_index.segment.rsc +2 -2
  279. package/.next/standalone/.next/server/app/m/projects.segments/_tree.segment.rsc +2 -2
  280. package/.next/standalone/.next/server/app/m/projects.segments/m/projects/__PAGE__.segment.rsc +1 -1
  281. package/.next/standalone/.next/server/app/m/projects.segments/m/projects.segment.rsc +1 -1
  282. package/.next/standalone/.next/server/app/m/projects.segments/m.segment.rsc +1 -1
  283. package/.next/standalone/.next/server/app/m/sessions/[id]/page.js.nft.json +1 -1
  284. package/.next/standalone/.next/server/app/m/sessions/[id]/page_client-reference-manifest.js +1 -1
  285. package/.next/standalone/.next/server/app/m/sessions/page_client-reference-manifest.js +1 -1
  286. package/.next/standalone/.next/server/app/m/sessions.html +1 -1
  287. package/.next/standalone/.next/server/app/m/sessions.rsc +2 -2
  288. package/.next/standalone/.next/server/app/m/sessions.segments/_full.segment.rsc +2 -2
  289. package/.next/standalone/.next/server/app/m/sessions.segments/_head.segment.rsc +1 -1
  290. package/.next/standalone/.next/server/app/m/sessions.segments/_index.segment.rsc +2 -2
  291. package/.next/standalone/.next/server/app/m/sessions.segments/_tree.segment.rsc +2 -2
  292. package/.next/standalone/.next/server/app/m/sessions.segments/m/sessions/__PAGE__.segment.rsc +1 -1
  293. package/.next/standalone/.next/server/app/m/sessions.segments/m/sessions.segment.rsc +1 -1
  294. package/.next/standalone/.next/server/app/m/sessions.segments/m.segment.rsc +1 -1
  295. package/.next/standalone/.next/server/app/m/settings/page_client-reference-manifest.js +1 -1
  296. package/.next/standalone/.next/server/app/m/settings.html +1 -1
  297. package/.next/standalone/.next/server/app/m/settings.rsc +2 -2
  298. package/.next/standalone/.next/server/app/m/settings.segments/_full.segment.rsc +2 -2
  299. package/.next/standalone/.next/server/app/m/settings.segments/_head.segment.rsc +1 -1
  300. package/.next/standalone/.next/server/app/m/settings.segments/_index.segment.rsc +2 -2
  301. package/.next/standalone/.next/server/app/m/settings.segments/_tree.segment.rsc +2 -2
  302. package/.next/standalone/.next/server/app/m/settings.segments/m/settings/__PAGE__.segment.rsc +1 -1
  303. package/.next/standalone/.next/server/app/m/settings.segments/m/settings.segment.rsc +1 -1
  304. package/.next/standalone/.next/server/app/m/settings.segments/m.segment.rsc +1 -1
  305. package/.next/standalone/.next/server/app/m/terminal/page_client-reference-manifest.js +1 -1
  306. package/.next/standalone/.next/server/app/m/terminal.html +1 -1
  307. package/.next/standalone/.next/server/app/m/terminal.rsc +3 -3
  308. package/.next/standalone/.next/server/app/m/terminal.segments/_full.segment.rsc +3 -3
  309. package/.next/standalone/.next/server/app/m/terminal.segments/_head.segment.rsc +1 -1
  310. package/.next/standalone/.next/server/app/m/terminal.segments/_index.segment.rsc +2 -2
  311. package/.next/standalone/.next/server/app/m/terminal.segments/_tree.segment.rsc +2 -2
  312. package/.next/standalone/.next/server/app/m/terminal.segments/m/terminal/__PAGE__.segment.rsc +2 -2
  313. package/.next/standalone/.next/server/app/m/terminal.segments/m/terminal.segment.rsc +1 -1
  314. package/.next/standalone/.next/server/app/m/terminal.segments/m.segment.rsc +1 -1
  315. package/.next/standalone/.next/server/app/m.html +1 -1
  316. package/.next/standalone/.next/server/app/m.rsc +2 -2
  317. package/.next/standalone/.next/server/app/m.segments/_full.segment.rsc +2 -2
  318. package/.next/standalone/.next/server/app/m.segments/_head.segment.rsc +1 -1
  319. package/.next/standalone/.next/server/app/m.segments/_index.segment.rsc +2 -2
  320. package/.next/standalone/.next/server/app/m.segments/_tree.segment.rsc +2 -2
  321. package/.next/standalone/.next/server/app/m.segments/m/__PAGE__.segment.rsc +1 -1
  322. package/.next/standalone/.next/server/app/m.segments/m.segment.rsc +1 -1
  323. package/.next/standalone/.next/server/app/network.html +1 -1
  324. package/.next/standalone/.next/server/app/network.rsc +2 -2
  325. package/.next/standalone/.next/server/app/network.segments/!KGRlc2t0b3Ap/network/__PAGE__.segment.rsc +1 -1
  326. package/.next/standalone/.next/server/app/network.segments/!KGRlc2t0b3Ap/network.segment.rsc +1 -1
  327. package/.next/standalone/.next/server/app/network.segments/!KGRlc2t0b3Ap.segment.rsc +1 -1
  328. package/.next/standalone/.next/server/app/network.segments/_full.segment.rsc +2 -2
  329. package/.next/standalone/.next/server/app/network.segments/_head.segment.rsc +1 -1
  330. package/.next/standalone/.next/server/app/network.segments/_index.segment.rsc +2 -2
  331. package/.next/standalone/.next/server/app/network.segments/_tree.segment.rsc +2 -2
  332. package/.next/standalone/.next/server/app/projects.html +1 -1
  333. package/.next/standalone/.next/server/app/projects.rsc +2 -2
  334. package/.next/standalone/.next/server/app/projects.segments/!KGRlc2t0b3Ap/projects/__PAGE__.segment.rsc +1 -1
  335. package/.next/standalone/.next/server/app/projects.segments/!KGRlc2t0b3Ap/projects.segment.rsc +1 -1
  336. package/.next/standalone/.next/server/app/projects.segments/!KGRlc2t0b3Ap.segment.rsc +1 -1
  337. package/.next/standalone/.next/server/app/projects.segments/_full.segment.rsc +2 -2
  338. package/.next/standalone/.next/server/app/projects.segments/_head.segment.rsc +1 -1
  339. package/.next/standalone/.next/server/app/projects.segments/_index.segment.rsc +2 -2
  340. package/.next/standalone/.next/server/app/projects.segments/_tree.segment.rsc +2 -2
  341. package/.next/standalone/.next/server/app/sessions.html +1 -1
  342. package/.next/standalone/.next/server/app/sessions.rsc +2 -2
  343. package/.next/standalone/.next/server/app/sessions.segments/!KGRlc2t0b3Ap/sessions/__PAGE__.segment.rsc +1 -1
  344. package/.next/standalone/.next/server/app/sessions.segments/!KGRlc2t0b3Ap/sessions.segment.rsc +1 -1
  345. package/.next/standalone/.next/server/app/sessions.segments/!KGRlc2t0b3Ap.segment.rsc +1 -1
  346. package/.next/standalone/.next/server/app/sessions.segments/_full.segment.rsc +2 -2
  347. package/.next/standalone/.next/server/app/sessions.segments/_head.segment.rsc +1 -1
  348. package/.next/standalone/.next/server/app/sessions.segments/_index.segment.rsc +2 -2
  349. package/.next/standalone/.next/server/app/sessions.segments/_tree.segment.rsc +2 -2
  350. package/.next/standalone/.next/server/app/settings.html +1 -1
  351. package/.next/standalone/.next/server/app/settings.rsc +3 -3
  352. package/.next/standalone/.next/server/app/settings.segments/!KGRlc2t0b3Ap/settings/__PAGE__.segment.rsc +2 -2
  353. package/.next/standalone/.next/server/app/settings.segments/!KGRlc2t0b3Ap/settings.segment.rsc +1 -1
  354. package/.next/standalone/.next/server/app/settings.segments/!KGRlc2t0b3Ap.segment.rsc +1 -1
  355. package/.next/standalone/.next/server/app/settings.segments/_full.segment.rsc +3 -3
  356. package/.next/standalone/.next/server/app/settings.segments/_head.segment.rsc +1 -1
  357. package/.next/standalone/.next/server/app/settings.segments/_index.segment.rsc +2 -2
  358. package/.next/standalone/.next/server/app/settings.segments/_tree.segment.rsc +2 -2
  359. package/.next/standalone/.next/server/app/terminal.html +1 -1
  360. package/.next/standalone/.next/server/app/terminal.rsc +3 -3
  361. package/.next/standalone/.next/server/app/terminal.segments/!KGRlc2t0b3Ap/terminal/__PAGE__.segment.rsc +2 -2
  362. package/.next/standalone/.next/server/app/terminal.segments/!KGRlc2t0b3Ap/terminal.segment.rsc +1 -1
  363. package/.next/standalone/.next/server/app/terminal.segments/!KGRlc2t0b3Ap.segment.rsc +1 -1
  364. package/.next/standalone/.next/server/app/terminal.segments/_full.segment.rsc +3 -3
  365. package/.next/standalone/.next/server/app/terminal.segments/_head.segment.rsc +1 -1
  366. package/.next/standalone/.next/server/app/terminal.segments/_index.segment.rsc +2 -2
  367. package/.next/standalone/.next/server/app/terminal.segments/_tree.segment.rsc +2 -2
  368. package/.next/standalone/.next/server/app/vr/page/react-loadable-manifest.json +1 -1
  369. package/.next/standalone/.next/server/app/vr/page_client-reference-manifest.js +1 -1
  370. package/.next/standalone/.next/server/app/vr.html +1 -1
  371. package/.next/standalone/.next/server/app/vr.rsc +3 -3
  372. package/.next/standalone/.next/server/app/vr.segments/_full.segment.rsc +3 -3
  373. package/.next/standalone/.next/server/app/vr.segments/_head.segment.rsc +1 -1
  374. package/.next/standalone/.next/server/app/vr.segments/_index.segment.rsc +2 -2
  375. package/.next/standalone/.next/server/app/vr.segments/_tree.segment.rsc +2 -2
  376. package/.next/standalone/.next/server/app/vr.segments/vr/__PAGE__.segment.rsc +2 -2
  377. package/.next/standalone/.next/server/app/vr.segments/vr.segment.rsc +1 -1
  378. package/.next/standalone/.next/server/app/workspaces.html +1 -1
  379. package/.next/standalone/.next/server/app/workspaces.rsc +2 -2
  380. package/.next/standalone/.next/server/app/workspaces.segments/!KGRlc2t0b3Ap/workspaces/__PAGE__.segment.rsc +1 -1
  381. package/.next/standalone/.next/server/app/workspaces.segments/!KGRlc2t0b3Ap/workspaces.segment.rsc +1 -1
  382. package/.next/standalone/.next/server/app/workspaces.segments/!KGRlc2t0b3Ap.segment.rsc +1 -1
  383. package/.next/standalone/.next/server/app/workspaces.segments/_full.segment.rsc +2 -2
  384. package/.next/standalone/.next/server/app/workspaces.segments/_head.segment.rsc +1 -1
  385. package/.next/standalone/.next/server/app/workspaces.segments/_index.segment.rsc +2 -2
  386. package/.next/standalone/.next/server/app/workspaces.segments/_tree.segment.rsc +2 -2
  387. package/.next/standalone/.next/server/app-paths-manifest.json +4 -0
  388. package/.next/standalone/.next/server/chunks/[root-of-the-server]__00e90fc6._.js +111 -0
  389. package/.next/standalone/.next/server/chunks/[root-of-the-server]__01ab8675._.js +111 -0
  390. package/.next/standalone/.next/server/chunks/[root-of-the-server]__03974f05._.js +111 -0
  391. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__bb331da9._.js → [root-of-the-server]__046c9b91._.js} +16 -3
  392. package/.next/standalone/.next/server/chunks/[root-of-the-server]__04ae6bf0._.js +111 -0
  393. package/.next/standalone/.next/server/chunks/[root-of-the-server]__056fa416._.js +1 -1
  394. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0ac4ea3f._.js +3 -0
  395. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0b8e64cb._.js +111 -0
  396. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0facd39e._.js +111 -0
  397. package/.next/standalone/.next/server/chunks/[root-of-the-server]__10bc76a3._.js +3 -0
  398. package/.next/standalone/.next/server/chunks/[root-of-the-server]__115f3934._.js +111 -0
  399. package/.next/standalone/.next/server/chunks/[root-of-the-server]__11f155f1._.js +3 -0
  400. package/.next/standalone/.next/server/chunks/[root-of-the-server]__160e7c73._.js +50 -33
  401. package/.next/standalone/.next/server/chunks/[root-of-the-server]__17a3b966._.js +111 -0
  402. package/.next/standalone/.next/server/chunks/[root-of-the-server]__17d3a2b2._.js +111 -0
  403. package/.next/standalone/.next/server/chunks/[root-of-the-server]__1a86c055._.js +111 -0
  404. package/.next/standalone/.next/server/chunks/[root-of-the-server]__20b5e9c4._.js +3 -0
  405. package/.next/standalone/.next/server/chunks/[root-of-the-server]__28d6fbd8._.js +111 -0
  406. package/.next/standalone/.next/server/chunks/[root-of-the-server]__2a3f866b._.js +119 -0
  407. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__a95bb38b._.js → [root-of-the-server]__316617e7._.js} +3 -3
  408. package/.next/standalone/.next/server/chunks/[root-of-the-server]__32ad8f71._.js +111 -0
  409. package/.next/standalone/.next/server/chunks/[root-of-the-server]__35457394._.js +111 -0
  410. package/.next/standalone/.next/server/chunks/[root-of-the-server]__35de78e6._.js +111 -0
  411. package/.next/standalone/.next/server/chunks/[root-of-the-server]__3685ffcb._.js +111 -0
  412. package/.next/standalone/.next/server/chunks/[root-of-the-server]__38954988._.js +111 -0
  413. package/.next/standalone/.next/server/chunks/[root-of-the-server]__3a32b624._.js +111 -0
  414. package/.next/standalone/.next/server/chunks/[root-of-the-server]__426ad936._.js +119 -0
  415. package/.next/standalone/.next/server/chunks/[root-of-the-server]__4985c034._.js +111 -0
  416. package/.next/standalone/.next/server/chunks/[root-of-the-server]__5c6ce9ed._.js +111 -0
  417. package/.next/standalone/.next/server/chunks/[root-of-the-server]__5cebe58a._.js +111 -0
  418. package/.next/standalone/.next/server/chunks/[root-of-the-server]__5d5e4789._.js +111 -0
  419. package/.next/standalone/.next/server/chunks/[root-of-the-server]__65676930._.js +3 -0
  420. package/.next/standalone/.next/server/chunks/[root-of-the-server]__67cab326._.js +58 -0
  421. package/.next/standalone/.next/server/chunks/[root-of-the-server]__698c6f01._.js +111 -0
  422. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__7ebc4280._.js → [root-of-the-server]__6c64af29._.js} +22 -9
  423. package/.next/standalone/.next/server/chunks/[root-of-the-server]__73aed9f5._.js +111 -0
  424. package/.next/standalone/.next/server/chunks/[root-of-the-server]__79b6a9bb._.js +111 -0
  425. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__e56abacf._.js → [root-of-the-server]__7db704c6._.js} +18 -5
  426. package/.next/standalone/.next/server/chunks/[root-of-the-server]__812ca02b._.js +111 -0
  427. package/.next/standalone/.next/server/chunks/[root-of-the-server]__821f50fa._.js +111 -0
  428. package/.next/standalone/.next/server/chunks/[root-of-the-server]__8716b86e._.js +111 -0
  429. package/.next/standalone/.next/server/chunks/[root-of-the-server]__884ef754._.js +111 -0
  430. package/.next/standalone/.next/server/chunks/[root-of-the-server]__88cdbd68._.js +111 -0
  431. package/.next/standalone/.next/server/chunks/[root-of-the-server]__89d9aba9._.js +111 -0
  432. package/.next/standalone/.next/server/chunks/[root-of-the-server]__8c2e1260._.js +111 -0
  433. package/.next/standalone/.next/server/chunks/[root-of-the-server]__8d536cb5._.js +111 -0
  434. package/.next/standalone/.next/server/chunks/[root-of-the-server]__8df8c5d1._.js +111 -0
  435. package/.next/standalone/.next/server/chunks/[root-of-the-server]__8f2ccc41._.js +111 -0
  436. package/.next/standalone/.next/server/chunks/[root-of-the-server]__95c9d682._.js +111 -0
  437. package/.next/standalone/.next/server/chunks/[root-of-the-server]__9e5d7774._.js +111 -0
  438. package/.next/standalone/.next/server/chunks/[root-of-the-server]__9edcff87._.js +111 -0
  439. package/.next/standalone/.next/server/chunks/[root-of-the-server]__a049dfc2._.js +111 -0
  440. package/.next/standalone/.next/server/chunks/[root-of-the-server]__a5b4bb9a._.js +111 -0
  441. package/.next/standalone/.next/server/chunks/[root-of-the-server]__a83262a1._.js +111 -0
  442. package/.next/standalone/.next/server/chunks/[root-of-the-server]__a9cd1240._.js +111 -0
  443. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__efb8251e._.js → [root-of-the-server]__a9d7f822._.js} +16 -3
  444. package/.next/standalone/.next/server/chunks/[root-of-the-server]__ad08c221._.js +111 -0
  445. package/.next/standalone/.next/server/chunks/[root-of-the-server]__ad585f2f._.js +111 -0
  446. package/.next/standalone/.next/server/chunks/[root-of-the-server]__afcb8f7d._.js +111 -0
  447. package/.next/standalone/.next/server/chunks/[root-of-the-server]__bc250d43._.js +111 -0
  448. package/.next/standalone/.next/server/chunks/[root-of-the-server]__bce2a6e7._.js +111 -0
  449. package/.next/standalone/.next/server/chunks/[root-of-the-server]__c011bf91._.js +111 -0
  450. package/.next/standalone/.next/server/chunks/[root-of-the-server]__c0ac2895._.js +3 -0
  451. package/.next/standalone/.next/server/chunks/[root-of-the-server]__c37d6380._.js +3 -0
  452. package/.next/standalone/.next/server/chunks/[root-of-the-server]__cae392eb._.js +111 -0
  453. package/.next/standalone/.next/server/chunks/[root-of-the-server]__cc2616bb._.js +16 -3
  454. package/.next/standalone/.next/server/chunks/[root-of-the-server]__d501fa9b._.js +111 -0
  455. package/.next/standalone/.next/server/chunks/[root-of-the-server]__d59c6c15._.js +111 -0
  456. package/.next/standalone/.next/server/chunks/[root-of-the-server]__d5c1db32._.js +111 -0
  457. package/.next/standalone/.next/server/chunks/[root-of-the-server]__dba60c86._.js +111 -0
  458. package/.next/standalone/.next/server/chunks/[root-of-the-server]__de14b9ae._.js +111 -0
  459. package/.next/standalone/.next/server/chunks/[root-of-the-server]__e10643d1._.js +111 -0
  460. package/.next/standalone/.next/server/chunks/[root-of-the-server]__e2a996e5._.js +127 -0
  461. package/.next/standalone/.next/server/chunks/[root-of-the-server]__e3477417._.js +111 -0
  462. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__32dc5513._.js → [root-of-the-server]__e4db362e._.js} +2 -2
  463. package/.next/standalone/.next/server/chunks/[root-of-the-server]__e4e70b86._.js +111 -0
  464. package/.next/standalone/.next/server/chunks/[root-of-the-server]__e54925af._.js +111 -0
  465. package/.next/standalone/.next/server/chunks/[root-of-the-server]__e8cbeaca._.js +111 -0
  466. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__cabaac2b._.js → [root-of-the-server]__e8edc5b0._.js} +16 -3
  467. package/.next/standalone/.next/server/chunks/[root-of-the-server]__eab4d83b._.js +111 -0
  468. package/.next/standalone/.next/server/chunks/[root-of-the-server]__ead29015._.js +1 -1
  469. package/.next/standalone/.next/server/chunks/[root-of-the-server]__f056fd83._.js +111 -0
  470. package/.next/standalone/.next/server/chunks/[root-of-the-server]__f0e99572._.js +111 -0
  471. package/.next/standalone/.next/server/chunks/[root-of-the-server]__fe1e16d0._.js +111 -0
  472. package/.next/standalone/.next/server/chunks/[root-of-the-server]__ff9cd277._.js +111 -0
  473. package/.next/standalone/.next/server/chunks/[root-of-the-server]__ffaea2ce._.js +111 -0
  474. package/.next/standalone/.next/server/chunks/_next-internal_server_app_api_claude_usage_route_actions_fe002ec1.js +3 -0
  475. package/.next/standalone/.next/server/chunks/_next-internal_server_app_api_wizard_chart_route_actions_888e2ec1.js +3 -0
  476. package/.next/standalone/.next/server/chunks/_next-internal_server_app_api_workspaces_[id]_todos_route_actions_0d4ffac5.js +3 -0
  477. package/.next/standalone/.next/server/chunks/ce889_server_app_api_workspaces_[id]_todos_[todoId]_route_actions_754fe6b9.js +3 -0
  478. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__2cffc362._.js +3 -0
  479. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__f1050870._.js → [root-of-the-server]__47c97637._.js} +2 -2
  480. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__66aca5d4._.js +1 -1
  481. package/.next/standalone/.next/server/chunks/ssr/_20c2cf3a._.js +3 -0
  482. package/.next/standalone/.next/server/chunks/ssr/_2a1d79e7._.js +1 -1
  483. package/.next/standalone/.next/server/chunks/ssr/_5c3c4cfa._.js +7 -5
  484. package/.next/standalone/.next/server/chunks/ssr/_5f55bf8f._.js +3 -0
  485. package/.next/standalone/.next/server/chunks/ssr/_ba432382._.js +7 -5
  486. package/.next/standalone/.next/server/chunks/ssr/src_app_(desktop)_cortex_page_tsx_0f33d8b3._.js +1 -1
  487. package/.next/standalone/.next/server/chunks/ssr/src_app_(desktop)_settings_page_tsx_f74824b3._.js +1 -1
  488. package/.next/standalone/.next/server/chunks/ssr/src_app_(desktop)_terminal_page_tsx_de5e8d85._.js +4 -4
  489. package/.next/standalone/.next/server/edge/chunks/[root-of-the-server]__90eeddae._.js +1 -1
  490. package/.next/standalone/.next/server/middleware-manifest.json +5 -5
  491. package/.next/standalone/.next/server/pages/404.html +1 -1
  492. package/.next/standalone/.next/server/pages/500.html +2 -2
  493. package/.next/standalone/.next/server/server-reference-manifest.js +1 -1
  494. package/.next/standalone/.next/server/server-reference-manifest.json +1 -1
  495. package/.next/standalone/.next/static/chunks/{74d0ac0b1d0a1b79.js → 10b00b4f66102dcf.js} +1 -1
  496. package/.next/standalone/.next/static/chunks/14216197f9dcbe5b.css +3 -0
  497. package/.next/standalone/.next/static/chunks/{16eb77953dee9ea3.js → 19c71a8376c23c58.js} +1 -1
  498. package/.next/standalone/.next/static/chunks/{3e91fc608659c524.js → 350271fe79509caf.js} +1 -1
  499. package/.next/standalone/.next/static/chunks/4c9fb0a38f041a3d.js +85 -0
  500. package/.next/standalone/.next/static/chunks/{70423c7afd8abf5f.js → 597847c22200c212.js} +1 -1
  501. package/.next/standalone/.next/static/chunks/8f6f93ab45a5ff5b.js +1 -0
  502. package/.next/standalone/.next/static/chunks/{7ecd9bbb0ce4d68a.js → b7c8fe9b7275a84f.js} +1 -1
  503. package/.next/standalone/.next/static/chunks/{6245135a7afb8c7b.js → c9b10fc55516d142.js} +8 -6
  504. package/.next/standalone/.next/static/chunks/d0065f48eab94944.js +1 -0
  505. package/.next/standalone/.next/static/chunks/{e62bb488d02db247.js → d2566c2dcf53fef3.js} +1 -1
  506. package/.next/standalone/.next/static/chunks/{180c1b9ff31b979f.js → f7b34c807badf95d.js} +8 -6
  507. package/.next/standalone/.next/static/chunks/{fb0abd1933b2b2e1.js → ff7d85dade44d1f3.js} +1 -1
  508. package/.next/standalone/.spaces/cortex-context.md +35 -129
  509. package/.next/standalone/bin/spaces.js +7 -4
  510. package/.next/standalone/bin/terminal-server.js +48 -10
  511. package/.next/standalone/cortex-hook-debug.log +118 -23
  512. package/.next/standalone/docs/features/claude-usage.md +105 -0
  513. package/.next/standalone/docs/features/workspace-todos.md +127 -0
  514. package/.next/standalone/docs/superpowers/plans/2026-04-21-workspace-todos.md +1097 -0
  515. package/.next/standalone/docs/superpowers/plans/2026-04-22-claude-usage-display.md +749 -0
  516. package/.next/standalone/docs/superpowers/specs/2026-04-21-workspace-todos-design.md +180 -0
  517. package/.next/standalone/docs/superpowers/specs/2026-04-22-claude-usage-display-design.md +183 -0
  518. package/.next/standalone/package-lock.json +2 -2
  519. package/.next/standalone/package.json +1 -1
  520. package/.next/standalone/src/app/(desktop)/settings/page.tsx +40 -1
  521. package/.next/standalone/src/app/(desktop)/terminal/page.tsx +98 -7
  522. package/.next/standalone/src/app/api/benchmark/run/route.ts +24 -3
  523. package/.next/standalone/src/app/api/claude/usage/route.ts +33 -0
  524. package/.next/standalone/src/app/api/config/route.ts +3 -0
  525. package/.next/standalone/src/app/api/cortex/context/route.ts +1 -1
  526. package/.next/standalone/src/app/api/cortex/knowledge/route.ts +1 -1
  527. package/.next/standalone/src/app/api/cortex/search/route.ts +14 -2
  528. package/.next/standalone/src/app/api/folders/route.ts +16 -6
  529. package/.next/standalone/src/app/api/network/panes/[id]/route.ts +27 -11
  530. package/.next/standalone/src/app/api/network/panes/route.ts +25 -14
  531. package/.next/standalone/src/app/api/network/projects/route.ts +11 -4
  532. package/.next/standalone/src/app/api/network/search/route.ts +21 -14
  533. package/.next/standalone/src/app/api/network/sessions/[id]/messages/route.ts +18 -11
  534. package/.next/standalone/src/app/api/network/sessions/[id]/route.ts +16 -9
  535. package/.next/standalone/src/app/api/network/sessions/route.ts +25 -18
  536. package/.next/standalone/src/app/api/network/workspaces/[id]/route.ts +21 -12
  537. package/.next/standalone/src/app/api/network/workspaces/route.ts +16 -14
  538. package/.next/standalone/src/app/api/whisper/config/route.ts +16 -8
  539. package/.next/standalone/src/app/api/wizard/chart/route.ts +129 -0
  540. package/.next/standalone/src/app/api/workspaces/[id]/todos/[todoId]/route.ts +55 -0
  541. package/.next/standalone/src/app/api/workspaces/[id]/todos/route.ts +43 -0
  542. package/.next/standalone/src/components/claude/claude-usage-strip.tsx +175 -0
  543. package/.next/standalone/src/components/cortex/benchmark-tab.tsx +14 -0
  544. package/.next/standalone/src/components/terminal/terminal-pane.tsx +78 -12
  545. package/.next/standalone/src/components/wizard/chart-wizard.tsx +405 -0
  546. package/.next/standalone/src/components/workspace/workspace-todos.tsx +265 -0
  547. package/.next/standalone/src/hooks/use-benchmark.ts +1 -0
  548. package/.next/standalone/src/hooks/use-claude-usage.ts +66 -0
  549. package/.next/standalone/src/hooks/use-speech-recognition.ts +2 -1
  550. package/.next/standalone/src/lib/claude/credentials.ts +36 -0
  551. package/.next/standalone/src/lib/claude/usage.ts +69 -0
  552. package/.next/standalone/src/lib/config.ts +3 -0
  553. package/.next/standalone/src/lib/cortex/benchmark.ts +17 -1
  554. package/.next/standalone/src/lib/cortex/index.ts +54 -1
  555. package/.next/standalone/src/lib/db/queries.ts +105 -90
  556. package/.next/standalone/src/lib/db/schema.ts +18 -0
  557. package/.next/standalone/src/lib/shell-user.ts +101 -0
  558. package/.next/standalone/src/types/claude.ts +39 -0
  559. package/.next/standalone/tests/db/workspace-todos.test.ts +156 -0
  560. package/bin/spaces.js +7 -4
  561. package/bin/terminal-server.js +48 -10
  562. package/package.json +1 -1
  563. package/.next/standalone/.next/server/chunks/[root-of-the-server]__00fdfbda._.js +0 -114
  564. package/.next/standalone/.next/server/chunks/[root-of-the-server]__04f04898._.js +0 -106
  565. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0903a426._.js +0 -98
  566. package/.next/standalone/.next/server/chunks/[root-of-the-server]__09e8ccc9._.js +0 -98
  567. package/.next/standalone/.next/server/chunks/[root-of-the-server]__11c684b1._.js +0 -98
  568. package/.next/standalone/.next/server/chunks/[root-of-the-server]__1572d4ef._.js +0 -98
  569. package/.next/standalone/.next/server/chunks/[root-of-the-server]__186cd0bb._.js +0 -3
  570. package/.next/standalone/.next/server/chunks/[root-of-the-server]__194955d4._.js +0 -98
  571. package/.next/standalone/.next/server/chunks/[root-of-the-server]__1f054c65._.js +0 -98
  572. package/.next/standalone/.next/server/chunks/[root-of-the-server]__212760e6._.js +0 -98
  573. package/.next/standalone/.next/server/chunks/[root-of-the-server]__228595ec._.js +0 -98
  574. package/.next/standalone/.next/server/chunks/[root-of-the-server]__2384f98e._.js +0 -98
  575. package/.next/standalone/.next/server/chunks/[root-of-the-server]__277d9445._.js +0 -98
  576. package/.next/standalone/.next/server/chunks/[root-of-the-server]__283c890f._.js +0 -3
  577. package/.next/standalone/.next/server/chunks/[root-of-the-server]__2a2c5fc5._.js +0 -98
  578. package/.next/standalone/.next/server/chunks/[root-of-the-server]__2d7a454e._.js +0 -98
  579. package/.next/standalone/.next/server/chunks/[root-of-the-server]__2f300a68._.js +0 -98
  580. package/.next/standalone/.next/server/chunks/[root-of-the-server]__2f452778._.js +0 -98
  581. package/.next/standalone/.next/server/chunks/[root-of-the-server]__35f8e77e._.js +0 -98
  582. package/.next/standalone/.next/server/chunks/[root-of-the-server]__379fc2e9._.js +0 -98
  583. package/.next/standalone/.next/server/chunks/[root-of-the-server]__3b40d79f._.js +0 -98
  584. package/.next/standalone/.next/server/chunks/[root-of-the-server]__3d3dca2b._.js +0 -98
  585. package/.next/standalone/.next/server/chunks/[root-of-the-server]__49e42a3a._.js +0 -98
  586. package/.next/standalone/.next/server/chunks/[root-of-the-server]__4d5b78d2._.js +0 -98
  587. package/.next/standalone/.next/server/chunks/[root-of-the-server]__4d903941._.js +0 -98
  588. package/.next/standalone/.next/server/chunks/[root-of-the-server]__54163e52._.js +0 -98
  589. package/.next/standalone/.next/server/chunks/[root-of-the-server]__563c0817._.js +0 -3
  590. package/.next/standalone/.next/server/chunks/[root-of-the-server]__5812f90a._.js +0 -98
  591. package/.next/standalone/.next/server/chunks/[root-of-the-server]__5c5e87f5._.js +0 -98
  592. package/.next/standalone/.next/server/chunks/[root-of-the-server]__60d15b16._.js +0 -98
  593. package/.next/standalone/.next/server/chunks/[root-of-the-server]__614458b7._.js +0 -98
  594. package/.next/standalone/.next/server/chunks/[root-of-the-server]__69d315e5._.js +0 -3
  595. package/.next/standalone/.next/server/chunks/[root-of-the-server]__6fe5e6c8._.js +0 -98
  596. package/.next/standalone/.next/server/chunks/[root-of-the-server]__71f29038._.js +0 -98
  597. package/.next/standalone/.next/server/chunks/[root-of-the-server]__74084e07._.js +0 -3
  598. package/.next/standalone/.next/server/chunks/[root-of-the-server]__7921aa80._.js +0 -98
  599. package/.next/standalone/.next/server/chunks/[root-of-the-server]__7e077dd8._.js +0 -98
  600. package/.next/standalone/.next/server/chunks/[root-of-the-server]__857c60bb._.js +0 -98
  601. package/.next/standalone/.next/server/chunks/[root-of-the-server]__874fe565._.js +0 -98
  602. package/.next/standalone/.next/server/chunks/[root-of-the-server]__8e2171f7._.js +0 -98
  603. package/.next/standalone/.next/server/chunks/[root-of-the-server]__91e23c96._.js +0 -98
  604. package/.next/standalone/.next/server/chunks/[root-of-the-server]__929ea03a._.js +0 -98
  605. package/.next/standalone/.next/server/chunks/[root-of-the-server]__95659b2d._.js +0 -98
  606. package/.next/standalone/.next/server/chunks/[root-of-the-server]__9679b91e._.js +0 -98
  607. package/.next/standalone/.next/server/chunks/[root-of-the-server]__9d68157b._.js +0 -98
  608. package/.next/standalone/.next/server/chunks/[root-of-the-server]__a90729a1._.js +0 -98
  609. package/.next/standalone/.next/server/chunks/[root-of-the-server]__ac39ecc7._.js +0 -98
  610. package/.next/standalone/.next/server/chunks/[root-of-the-server]__ac84b704._.js +0 -98
  611. package/.next/standalone/.next/server/chunks/[root-of-the-server]__ad4346fa._.js +0 -98
  612. package/.next/standalone/.next/server/chunks/[root-of-the-server]__b0862d69._.js +0 -98
  613. package/.next/standalone/.next/server/chunks/[root-of-the-server]__b43306ee._.js +0 -98
  614. package/.next/standalone/.next/server/chunks/[root-of-the-server]__b689ff5e._.js +0 -106
  615. package/.next/standalone/.next/server/chunks/[root-of-the-server]__ba87daaa._.js +0 -98
  616. package/.next/standalone/.next/server/chunks/[root-of-the-server]__c0461005._.js +0 -98
  617. package/.next/standalone/.next/server/chunks/[root-of-the-server]__c1deb5f3._.js +0 -98
  618. package/.next/standalone/.next/server/chunks/[root-of-the-server]__c8a62f42._.js +0 -98
  619. package/.next/standalone/.next/server/chunks/[root-of-the-server]__cb027619._.js +0 -98
  620. package/.next/standalone/.next/server/chunks/[root-of-the-server]__cc6e2885._.js +0 -98
  621. package/.next/standalone/.next/server/chunks/[root-of-the-server]__cf608218._.js +0 -98
  622. package/.next/standalone/.next/server/chunks/[root-of-the-server]__cfc1290d._.js +0 -98
  623. package/.next/standalone/.next/server/chunks/[root-of-the-server]__d0109b9b._.js +0 -98
  624. package/.next/standalone/.next/server/chunks/[root-of-the-server]__d0125483._.js +0 -3
  625. package/.next/standalone/.next/server/chunks/[root-of-the-server]__d048ee6b._.js +0 -98
  626. package/.next/standalone/.next/server/chunks/[root-of-the-server]__d12644e7._.js +0 -98
  627. package/.next/standalone/.next/server/chunks/[root-of-the-server]__d95165f0._.js +0 -98
  628. package/.next/standalone/.next/server/chunks/[root-of-the-server]__e3cc946c._.js +0 -98
  629. package/.next/standalone/.next/server/chunks/[root-of-the-server]__e6fd27f8._.js +0 -98
  630. package/.next/standalone/.next/server/chunks/[root-of-the-server]__eafd040b._.js +0 -98
  631. package/.next/standalone/.next/server/chunks/[root-of-the-server]__f44c6882._.js +0 -98
  632. package/.next/standalone/.next/server/chunks/[root-of-the-server]__f85283de._.js +0 -98
  633. package/.next/standalone/.next/server/chunks/[root-of-the-server]__feceb3e4._.js +0 -98
  634. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__843070a6._.js +0 -3
  635. package/.next/standalone/.next/server/chunks/ssr/_3ba93bdd._.js +0 -3
  636. package/.next/standalone/.next/server/chunks/ssr/_e84a0c06._.js +0 -3
  637. package/.next/standalone/.next/static/chunks/074df89a63b6a854.js +0 -1
  638. package/.next/standalone/.next/static/chunks/9d4164833c2c1fd6.js +0 -85
  639. package/.next/standalone/.next/static/chunks/bffaf378f7745d59.css +0 -3
  640. package/.next/standalone/.next/static/chunks/f091f4bf8d80fd07.js +0 -1
  641. /package/.next/standalone/.next/static/{0KefPNmR9NsrZHWWt9Xr7 → bAQs2gDlFrq3e8w9ni9tr}/_buildManifest.js +0 -0
  642. /package/.next/standalone/.next/static/{0KefPNmR9NsrZHWWt9Xr7 → bAQs2gDlFrq3e8w9ni9tr}/_clientMiddlewareManifest.json +0 -0
  643. /package/.next/standalone/.next/static/{0KefPNmR9NsrZHWWt9Xr7 → bAQs2gDlFrq3e8w9ni9tr}/_ssgManifest.js +0 -0
@@ -0,0 +1,1097 @@
1
+ # Workspace Todos Implementation Plan
2
+
3
+ > **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking.
4
+
5
+ **Goal:** Add a workspace-scoped todo list to Spaces, rendered inline above the pane grid on `/terminal`, with minimal CRUD (add/edit/toggle/delete) and a "show completed" toggle.
6
+
7
+ **Architecture:** New SQLite table `workspace_todos` (FK to `workspaces` with `ON DELETE CASCADE`), new query helpers in `src/lib/db/queries.ts`, new Next.js API routes under `src/app/api/workspaces/[id]/todos/`, and a new client component `src/components/workspace/workspace-todos.tsx` mounted in `src/app/(desktop)/terminal/page.tsx`. Mutations are optimistic with rollback on failure.
8
+
9
+ **Tech Stack:** Next.js App Router, React 18 client components, better-sqlite3, TypeScript, Tailwind, lucide-react, vitest + better-sqlite3 for tests.
10
+
11
+ **Spec:** `docs/superpowers/specs/2026-04-21-workspace-todos-design.md`
12
+
13
+ **Repo workflow note:** Per user preference, commit directly to `main`. No feature branch, no PR. Each task ends with a commit.
14
+
15
+ ---
16
+
17
+ ## File Structure
18
+
19
+ **Create:**
20
+ - `src/app/api/workspaces/[id]/todos/route.ts` — GET + POST handlers
21
+ - `src/app/api/workspaces/[id]/todos/[todoId]/route.ts` — PATCH + DELETE handlers
22
+ - `src/components/workspace/workspace-todos.tsx` — inline UI component
23
+ - `tests/db/workspace-todos.test.ts` — query-layer tests (in-process better-sqlite3 instance)
24
+ - `docs/features/workspace-todos.md` — feature doc (per `docs/FEATURE_DOC_GUIDE.md`)
25
+
26
+ **Modify:**
27
+ - `src/lib/db/schema.ts` — add `workspace_todos` table + index inside `initSchema()`
28
+ - `src/lib/db/queries.ts` — add `getWorkspaceTodos`, `addWorkspaceTodo`, `updateWorkspaceTodo`, `deleteWorkspaceTodo`
29
+ - `src/types/claude.ts` (or equivalent types file — confirm in Task 2) — add `WorkspaceTodo` type
30
+ - `src/app/(desktop)/terminal/page.tsx` — mount `<WorkspaceTodos>` above the pane grid
31
+
32
+ ---
33
+
34
+ ## Task 1: DB schema — add `workspace_todos` table
35
+
36
+ **Files:**
37
+ - Modify: `src/lib/db/schema.ts`
38
+
39
+ - [ ] **Step 1: Append CREATE TABLE + INDEX DDL inside `initSchema()`**
40
+
41
+ Open `src/lib/db/schema.ts`. Locate the multi-statement SQL block inside `initSchema()` that defines all existing tables (roughly lines 27-116, inside the template-literal string passed to better-sqlite3). At the **end** of that template-literal block (right before the closing `` ` ``), append the following SQL:
42
+
43
+ ```sql
44
+ CREATE TABLE IF NOT EXISTS workspace_todos (
45
+ id INTEGER PRIMARY KEY AUTOINCREMENT,
46
+ workspace_id INTEGER NOT NULL REFERENCES workspaces(id) ON DELETE CASCADE,
47
+ text TEXT NOT NULL,
48
+ completed INTEGER NOT NULL DEFAULT 0,
49
+ sort_order INTEGER NOT NULL DEFAULT 0,
50
+ created TEXT NOT NULL DEFAULT (datetime('now')),
51
+ completed_at TEXT
52
+ );
53
+
54
+ CREATE INDEX IF NOT EXISTS idx_workspace_todos_workspace
55
+ ON workspace_todos(workspace_id);
56
+ ```
57
+
58
+ No `addCol` calls are needed — this is a brand new table, and `IF NOT EXISTS` makes the migration safe on existing DBs.
59
+
60
+ - [ ] **Step 2: Start the app, confirm the table was created**
61
+
62
+ Run:
63
+ ```bash
64
+ npm run build && npm start
65
+ ```
66
+
67
+ In a second terminal, open the user's SQLite DB (adjust path if needed):
68
+ ```bash
69
+ sqlite3 ~/.spaces/*.db ".schema workspace_todos"
70
+ ```
71
+
72
+ Expected output includes the `CREATE TABLE workspace_todos (...)` statement and the `CREATE INDEX` line.
73
+
74
+ Stop the dev server.
75
+
76
+ - [ ] **Step 3: Commit**
77
+
78
+ ```bash
79
+ git add src/lib/db/schema.ts
80
+ git commit -m "feat(db): add workspace_todos table for workspace-scoped todos"
81
+ ```
82
+
83
+ ---
84
+
85
+ ## Task 2: TypeScript type + DB query helpers
86
+
87
+ **Files:**
88
+ - Modify: `src/types/claude.ts` (or whichever types file holds `Workspace`/`PaneData` — grep to confirm)
89
+ - Modify: `src/lib/db/queries.ts`
90
+
91
+ - [ ] **Step 1: Locate the types file**
92
+
93
+ Run:
94
+ ```bash
95
+ grep -rn "export interface Workspace" src/types src/lib
96
+ ```
97
+
98
+ Expected: one or two hits showing where `Workspace` is declared (likely `src/types/claude.ts`). Use that same file for `WorkspaceTodo`.
99
+
100
+ - [ ] **Step 2: Add the `WorkspaceTodo` type**
101
+
102
+ At the bottom of the types file from Step 1, add:
103
+
104
+ ```ts
105
+ export interface WorkspaceTodo {
106
+ id: number;
107
+ workspaceId: number;
108
+ text: string;
109
+ completed: boolean;
110
+ sortOrder: number;
111
+ created: string;
112
+ completedAt: string | null;
113
+ }
114
+ ```
115
+
116
+ - [ ] **Step 3: Add query helpers to `src/lib/db/queries.ts`**
117
+
118
+ At the **end** of `src/lib/db/queries.ts` (after the last existing helper), append:
119
+
120
+ ```ts
121
+ // ─── Workspace Todos ───────────────────────────────────────
122
+
123
+ import type { WorkspaceTodo } from '@/types/claude'; // Adjust path if Step 1 found a different file
124
+
125
+ interface TodoRow {
126
+ id: number;
127
+ workspace_id: number;
128
+ text: string;
129
+ completed: number;
130
+ sort_order: number;
131
+ created: string;
132
+ completed_at: string | null;
133
+ }
134
+
135
+ function rowToTodo(r: TodoRow): WorkspaceTodo {
136
+ return {
137
+ id: r.id,
138
+ workspaceId: r.workspace_id,
139
+ text: r.text,
140
+ completed: !!r.completed,
141
+ sortOrder: r.sort_order,
142
+ created: r.created,
143
+ completedAt: r.completed_at,
144
+ };
145
+ }
146
+
147
+ export function getWorkspaceTodos(workspaceId: number): WorkspaceTodo[] {
148
+ const db = getDb();
149
+ const rows = db.prepare(`
150
+ SELECT id, workspace_id, text, completed, sort_order, created, completed_at
151
+ FROM workspace_todos
152
+ WHERE workspace_id = ?
153
+ ORDER BY completed ASC,
154
+ CASE WHEN completed = 0 THEN sort_order END ASC,
155
+ completed_at DESC
156
+ `).all(workspaceId) as TodoRow[];
157
+ return rows.map(rowToTodo);
158
+ }
159
+
160
+ export function addWorkspaceTodo(workspaceId: number, text: string): WorkspaceTodo {
161
+ const db = getDb();
162
+ const trimmed = text.trim();
163
+ if (!trimmed) throw new Error('todo text is required');
164
+
165
+ const maxRow = db.prepare(`
166
+ SELECT COALESCE(MAX(sort_order), -1) AS max_order
167
+ FROM workspace_todos
168
+ WHERE workspace_id = ? AND completed = 0
169
+ `).get(workspaceId) as { max_order: number };
170
+ const nextOrder = (maxRow?.max_order ?? -1) + 1;
171
+
172
+ const info = db.prepare(`
173
+ INSERT INTO workspace_todos (workspace_id, text, sort_order)
174
+ VALUES (?, ?, ?)
175
+ `).run(workspaceId, trimmed, nextOrder);
176
+
177
+ const row = db.prepare(`
178
+ SELECT id, workspace_id, text, completed, sort_order, created, completed_at
179
+ FROM workspace_todos WHERE id = ?
180
+ `).get(Number(info.lastInsertRowid)) as TodoRow;
181
+ return rowToTodo(row);
182
+ }
183
+
184
+ export function updateWorkspaceTodo(
185
+ todoId: number,
186
+ data: { text?: string; completed?: boolean }
187
+ ): WorkspaceTodo | null {
188
+ const db = getDb();
189
+
190
+ if (data.text !== undefined) {
191
+ const trimmed = data.text.trim();
192
+ if (!trimmed) throw new Error('todo text cannot be empty');
193
+ db.prepare('UPDATE workspace_todos SET text = ? WHERE id = ?').run(trimmed, todoId);
194
+ }
195
+
196
+ if (data.completed !== undefined) {
197
+ if (data.completed) {
198
+ db.prepare(`
199
+ UPDATE workspace_todos
200
+ SET completed = 1, completed_at = datetime('now')
201
+ WHERE id = ?
202
+ `).run(todoId);
203
+ } else {
204
+ db.prepare(`
205
+ UPDATE workspace_todos
206
+ SET completed = 0, completed_at = NULL
207
+ WHERE id = ?
208
+ `).run(todoId);
209
+ }
210
+ }
211
+
212
+ const row = db.prepare(`
213
+ SELECT id, workspace_id, text, completed, sort_order, created, completed_at
214
+ FROM workspace_todos WHERE id = ?
215
+ `).get(todoId) as TodoRow | undefined;
216
+ return row ? rowToTodo(row) : null;
217
+ }
218
+
219
+ export function deleteWorkspaceTodo(todoId: number): void {
220
+ const db = getDb();
221
+ db.prepare('DELETE FROM workspace_todos WHERE id = ?').run(todoId);
222
+ }
223
+ ```
224
+
225
+ **Note:** If the top of `queries.ts` already imports from `@/types/claude`, merge `WorkspaceTodo` into that existing import instead of duplicating.
226
+
227
+ - [ ] **Step 4: Type-check**
228
+
229
+ Run:
230
+ ```bash
231
+ npx tsc --noEmit
232
+ ```
233
+
234
+ Expected: no new errors.
235
+
236
+ - [ ] **Step 5: Commit**
237
+
238
+ ```bash
239
+ git add src/lib/db/queries.ts src/types/claude.ts
240
+ git commit -m "feat(db): add workspace-todo query helpers"
241
+ ```
242
+
243
+ ---
244
+
245
+ ## Task 3: Tests for the DB query helpers
246
+
247
+ **Files:**
248
+ - Create: `tests/db/workspace-todos.test.ts`
249
+ - Modify: `src/lib/db/schema.ts` (export a test-only accessor to the internal connection cache)
250
+
251
+ - [ ] **Step 1: Add a test-only accessor in `schema.ts`**
252
+
253
+ Open `src/lib/db/schema.ts`. At the very bottom of the file (after the `closeDb` function), append:
254
+
255
+ ```ts
256
+ // Test-only export. Do not use outside of tests.
257
+ export const __testing = {
258
+ dbs: _dbs,
259
+ };
260
+ ```
261
+
262
+ This exposes the private per-user connection cache so tests can inject a throwaway DB without touching the user's real `~/.spaces/<user>.db`.
263
+
264
+ - [ ] **Step 2: Write the test file**
265
+
266
+ Create `tests/db/workspace-todos.test.ts` with:
267
+
268
+ ```ts
269
+ import fs from 'fs';
270
+ import os from 'os';
271
+ import path from 'path';
272
+ import { afterEach, beforeEach, describe, expect, it } from 'vitest';
273
+ import Database from 'better-sqlite3';
274
+
275
+ import { __testing } from '@/lib/db/schema';
276
+ import {
277
+ getWorkspaceTodos,
278
+ addWorkspaceTodo,
279
+ updateWorkspaceTodo,
280
+ deleteWorkspaceTodo,
281
+ } from '@/lib/db/queries';
282
+
283
+ const TEST_USER = 'test-user'; // matches tests/setup.ts auth mock
284
+ let db: Database.Database;
285
+ let tempDir: string;
286
+
287
+ beforeEach(() => {
288
+ tempDir = fs.mkdtempSync(path.join(os.tmpdir(), 'spaces-todos-test-'));
289
+ const dbPath = path.join(tempDir, 'test.db');
290
+ db = new Database(dbPath);
291
+ db.pragma('journal_mode = WAL');
292
+ db.pragma('foreign_keys = ON');
293
+
294
+ // Recreate just the tables we need for these tests
295
+ const ddl = `
296
+ CREATE TABLE workspaces (
297
+ id INTEGER PRIMARY KEY AUTOINCREMENT,
298
+ name TEXT NOT NULL,
299
+ color TEXT DEFAULT '#6366f1',
300
+ created TEXT DEFAULT (datetime('now'))
301
+ );
302
+ CREATE TABLE workspace_todos (
303
+ id INTEGER PRIMARY KEY AUTOINCREMENT,
304
+ workspace_id INTEGER NOT NULL REFERENCES workspaces(id) ON DELETE CASCADE,
305
+ text TEXT NOT NULL,
306
+ completed INTEGER NOT NULL DEFAULT 0,
307
+ sort_order INTEGER NOT NULL DEFAULT 0,
308
+ created TEXT NOT NULL DEFAULT (datetime('now')),
309
+ completed_at TEXT
310
+ );
311
+ CREATE INDEX idx_workspace_todos_workspace ON workspace_todos(workspace_id);
312
+ `;
313
+ // Multi-statement DDL goes through the driver's batch API
314
+ (db as any).exec(ddl);
315
+
316
+ // Inject our test DB into the module cache so getDb() returns it
317
+ __testing.dbs.set(TEST_USER, db);
318
+
319
+ // Seed one workspace
320
+ db.prepare("INSERT INTO workspaces (id, name) VALUES (1, 'Test WS')").run();
321
+ });
322
+
323
+ afterEach(() => {
324
+ try { db.close(); } catch {}
325
+ __testing.dbs.delete(TEST_USER);
326
+ fs.rmSync(tempDir, { recursive: true, force: true });
327
+ });
328
+
329
+ describe('workspace todos query helpers', () => {
330
+ it('adds a todo with incrementing sort_order among uncompleted rows', () => {
331
+ const a = addWorkspaceTodo(1, 'first');
332
+ const b = addWorkspaceTodo(1, 'second');
333
+ const c = addWorkspaceTodo(1, 'third');
334
+
335
+ expect(a.sortOrder).toBe(0);
336
+ expect(b.sortOrder).toBe(1);
337
+ expect(c.sortOrder).toBe(2);
338
+ expect(a.completed).toBe(false);
339
+ expect(a.text).toBe('first');
340
+ });
341
+
342
+ it('trims text and rejects empty', () => {
343
+ const t = addWorkspaceTodo(1, ' hello ');
344
+ expect(t.text).toBe('hello');
345
+
346
+ expect(() => addWorkspaceTodo(1, ' ')).toThrow();
347
+ expect(() => addWorkspaceTodo(1, '')).toThrow();
348
+ });
349
+
350
+ it('toggles completed and sets/clears completed_at', () => {
351
+ const t = addWorkspaceTodo(1, 'toggle me');
352
+ expect(t.completedAt).toBeNull();
353
+
354
+ const done = updateWorkspaceTodo(t.id, { completed: true });
355
+ expect(done?.completed).toBe(true);
356
+ expect(done?.completedAt).not.toBeNull();
357
+
358
+ const undone = updateWorkspaceTodo(t.id, { completed: false });
359
+ expect(undone?.completed).toBe(false);
360
+ expect(undone?.completedAt).toBeNull();
361
+ });
362
+
363
+ it('updates text, trims, rejects empty', () => {
364
+ const t = addWorkspaceTodo(1, 'original');
365
+ const upd = updateWorkspaceTodo(t.id, { text: ' edited ' });
366
+ expect(upd?.text).toBe('edited');
367
+
368
+ expect(() => updateWorkspaceTodo(t.id, { text: ' ' })).toThrow();
369
+ });
370
+
371
+ it('lists todos: uncompleted first by sort_order, completed last by completed_at desc', () => {
372
+ const a = addWorkspaceTodo(1, 'a');
373
+ const b = addWorkspaceTodo(1, 'b');
374
+ const c = addWorkspaceTodo(1, 'c');
375
+
376
+ // Complete b first, then a. Expected completed order: a (newest completed) then b.
377
+ updateWorkspaceTodo(b.id, { completed: true });
378
+ updateWorkspaceTodo(a.id, { completed: true });
379
+
380
+ const list = getWorkspaceTodos(1);
381
+ expect(list.map(t => t.text)).toEqual(['c', 'a', 'b']);
382
+ });
383
+
384
+ it('deletes a todo', () => {
385
+ const t = addWorkspaceTodo(1, 'doomed');
386
+ deleteWorkspaceTodo(t.id);
387
+ expect(getWorkspaceTodos(1)).toHaveLength(0);
388
+ });
389
+
390
+ it('cascades when the workspace is deleted', () => {
391
+ addWorkspaceTodo(1, 'x');
392
+ addWorkspaceTodo(1, 'y');
393
+ db.prepare('DELETE FROM workspaces WHERE id = 1').run();
394
+ const rows = db.prepare('SELECT COUNT(*) AS n FROM workspace_todos').get() as { n: number };
395
+ expect(rows.n).toBe(0);
396
+ });
397
+
398
+ it('scopes listing by workspace', () => {
399
+ db.prepare("INSERT INTO workspaces (id, name) VALUES (2, 'Other')").run();
400
+ addWorkspaceTodo(1, 'ws-1-a');
401
+ addWorkspaceTodo(2, 'ws-2-a');
402
+ addWorkspaceTodo(1, 'ws-1-b');
403
+
404
+ const ws1 = getWorkspaceTodos(1);
405
+ const ws2 = getWorkspaceTodos(2);
406
+ expect(ws1.map(t => t.text).sort()).toEqual(['ws-1-a', 'ws-1-b']);
407
+ expect(ws2.map(t => t.text)).toEqual(['ws-2-a']);
408
+ });
409
+ });
410
+ ```
411
+
412
+ - [ ] **Step 3: Run the tests**
413
+
414
+ Run:
415
+ ```bash
416
+ npx vitest run tests/db/workspace-todos.test.ts
417
+ ```
418
+
419
+ Expected: 8 tests pass.
420
+
421
+ If any test fails, re-check that Task 2's queries were added correctly and that the `__testing` accessor from Step 1 exports the same `_dbs` Map used internally by `getDb()`.
422
+
423
+ - [ ] **Step 4: Commit**
424
+
425
+ ```bash
426
+ git add tests/db/workspace-todos.test.ts src/lib/db/schema.ts
427
+ git commit -m "test(db): cover workspace-todo query helpers and ordering invariants"
428
+ ```
429
+
430
+ ---
431
+
432
+ ## Task 4: API route — `GET`/`POST /api/workspaces/:id/todos`
433
+
434
+ **Files:**
435
+ - Create: `src/app/api/workspaces/[id]/todos/route.ts`
436
+
437
+ - [ ] **Step 1: Create the route file**
438
+
439
+ Create `src/app/api/workspaces/[id]/todos/route.ts` with:
440
+
441
+ ```ts
442
+ import { NextRequest, NextResponse } from 'next/server';
443
+ import { getAuthUser, withUser } from '@/lib/auth';
444
+ import { ensureInitialized } from '@/lib/db/init';
445
+ import { getWorkspaceTodos, addWorkspaceTodo } from '@/lib/db/queries';
446
+
447
+ export async function GET(
448
+ request: NextRequest,
449
+ { params }: { params: Promise<{ id: string }> }
450
+ ) {
451
+ const user = getAuthUser(request);
452
+ return withUser(user, async () => {
453
+ await ensureInitialized();
454
+ const { id } = await params;
455
+ const wsId = parseInt(id, 10);
456
+ if (!Number.isFinite(wsId)) {
457
+ return NextResponse.json({ error: 'invalid workspace id' }, { status: 400 });
458
+ }
459
+ const todos = getWorkspaceTodos(wsId);
460
+ return NextResponse.json(todos);
461
+ });
462
+ }
463
+
464
+ export async function POST(
465
+ request: NextRequest,
466
+ { params }: { params: Promise<{ id: string }> }
467
+ ) {
468
+ const user = getAuthUser(request);
469
+ return withUser(user, async () => {
470
+ await ensureInitialized();
471
+ const { id } = await params;
472
+ const wsId = parseInt(id, 10);
473
+ if (!Number.isFinite(wsId)) {
474
+ return NextResponse.json({ error: 'invalid workspace id' }, { status: 400 });
475
+ }
476
+ const body = await request.json().catch(() => null);
477
+ const text = typeof body?.text === 'string' ? body.text : '';
478
+ if (!text.trim()) {
479
+ return NextResponse.json({ error: 'text is required' }, { status: 400 });
480
+ }
481
+ const todo = addWorkspaceTodo(wsId, text);
482
+ return NextResponse.json(todo, { status: 201 });
483
+ });
484
+ }
485
+ ```
486
+
487
+ - [ ] **Step 2: Smoke-test against the running server**
488
+
489
+ In one terminal:
490
+ ```bash
491
+ npm run dev
492
+ ```
493
+
494
+ In another (replace `1` with an existing workspace id from your DB):
495
+ ```bash
496
+ curl -s http://localhost:3457/api/workspaces/1/todos
497
+ curl -s -X POST http://localhost:3457/api/workspaces/1/todos \
498
+ -H 'content-type: application/json' \
499
+ -d '{"text":"wire up API"}'
500
+ curl -s http://localhost:3457/api/workspaces/1/todos
501
+ ```
502
+
503
+ Expected:
504
+ 1. First GET returns `[]`.
505
+ 2. POST returns a JSON todo with `id`, `workspaceId: 1`, `text: "wire up API"`, `completed: false`.
506
+ 3. Second GET returns an array containing that todo.
507
+
508
+ Stop the dev server.
509
+
510
+ - [ ] **Step 3: Commit**
511
+
512
+ ```bash
513
+ git add "src/app/api/workspaces/[id]/todos/route.ts"
514
+ git commit -m "feat(api): add GET/POST /api/workspaces/:id/todos"
515
+ ```
516
+
517
+ ---
518
+
519
+ ## Task 5: API route — `PATCH`/`DELETE /api/workspaces/:id/todos/:todoId`
520
+
521
+ **Files:**
522
+ - Create: `src/app/api/workspaces/[id]/todos/[todoId]/route.ts`
523
+
524
+ - [ ] **Step 1: Create the route file**
525
+
526
+ Create `src/app/api/workspaces/[id]/todos/[todoId]/route.ts` with:
527
+
528
+ ```ts
529
+ import { NextRequest, NextResponse } from 'next/server';
530
+ import { getAuthUser, withUser } from '@/lib/auth';
531
+ import { ensureInitialized } from '@/lib/db/init';
532
+ import { updateWorkspaceTodo, deleteWorkspaceTodo } from '@/lib/db/queries';
533
+
534
+ export async function PATCH(
535
+ request: NextRequest,
536
+ { params }: { params: Promise<{ id: string; todoId: string }> }
537
+ ) {
538
+ const user = getAuthUser(request);
539
+ return withUser(user, async () => {
540
+ await ensureInitialized();
541
+ const { todoId } = await params;
542
+ const tid = parseInt(todoId, 10);
543
+ if (!Number.isFinite(tid)) {
544
+ return NextResponse.json({ error: 'invalid todo id' }, { status: 400 });
545
+ }
546
+ const body = await request.json().catch(() => null);
547
+ if (!body || (body.text === undefined && body.completed === undefined)) {
548
+ return NextResponse.json({ error: 'text or completed required' }, { status: 400 });
549
+ }
550
+ try {
551
+ const updated = updateWorkspaceTodo(tid, {
552
+ text: typeof body.text === 'string' ? body.text : undefined,
553
+ completed: typeof body.completed === 'boolean' ? body.completed : undefined,
554
+ });
555
+ if (!updated) {
556
+ return NextResponse.json({ error: 'not found' }, { status: 404 });
557
+ }
558
+ return NextResponse.json(updated);
559
+ } catch (err: any) {
560
+ return NextResponse.json({ error: err.message || 'update failed' }, { status: 400 });
561
+ }
562
+ });
563
+ }
564
+
565
+ export async function DELETE(
566
+ request: NextRequest,
567
+ { params }: { params: Promise<{ id: string; todoId: string }> }
568
+ ) {
569
+ const user = getAuthUser(request);
570
+ return withUser(user, async () => {
571
+ await ensureInitialized();
572
+ const { todoId } = await params;
573
+ const tid = parseInt(todoId, 10);
574
+ if (!Number.isFinite(tid)) {
575
+ return NextResponse.json({ error: 'invalid todo id' }, { status: 400 });
576
+ }
577
+ deleteWorkspaceTodo(tid);
578
+ return NextResponse.json({ ok: true });
579
+ });
580
+ }
581
+ ```
582
+
583
+ - [ ] **Step 2: Smoke-test**
584
+
585
+ With `npm run dev` running, and assuming you still have the todo from Task 4 (example id=1):
586
+
587
+ ```bash
588
+ # Toggle completed
589
+ curl -s -X PATCH http://localhost:3457/api/workspaces/1/todos/1 \
590
+ -H 'content-type: application/json' \
591
+ -d '{"completed":true}'
592
+
593
+ # Edit text
594
+ curl -s -X PATCH http://localhost:3457/api/workspaces/1/todos/1 \
595
+ -H 'content-type: application/json' \
596
+ -d '{"text":"wire up the API (done)"}'
597
+
598
+ # Delete
599
+ curl -s -X DELETE http://localhost:3457/api/workspaces/1/todos/1
600
+ ```
601
+
602
+ Expected: each call returns the updated todo JSON (or `{"ok":true}` for DELETE); a final GET on the list endpoint returns `[]`.
603
+
604
+ Stop the dev server.
605
+
606
+ - [ ] **Step 3: Commit**
607
+
608
+ ```bash
609
+ git add "src/app/api/workspaces/[id]/todos/[todoId]/route.ts"
610
+ git commit -m "feat(api): add PATCH/DELETE /api/workspaces/:id/todos/:todoId"
611
+ ```
612
+
613
+ ---
614
+
615
+ ## Task 6: UI component — `<WorkspaceTodos />`
616
+
617
+ **Files:**
618
+ - Create: `src/components/workspace/workspace-todos.tsx`
619
+
620
+ - [ ] **Step 1: Write the component**
621
+
622
+ Create `src/components/workspace/workspace-todos.tsx` with:
623
+
624
+ ```tsx
625
+ 'use client';
626
+
627
+ import { useCallback, useEffect, useRef, useState } from 'react';
628
+ import { Check, Plus, X, ListTodo, Eye, EyeOff } from 'lucide-react';
629
+ import { api } from '@/lib/api';
630
+ import type { WorkspaceTodo } from '@/types/claude';
631
+
632
+ export function WorkspaceTodos({ workspaceId }: { workspaceId: number | null }) {
633
+ const [todos, setTodos] = useState<WorkspaceTodo[]>([]);
634
+ const [loading, setLoading] = useState(false);
635
+ const [input, setInput] = useState('');
636
+ const [showCompleted, setShowCompleted] = useState(true);
637
+ const [editingId, setEditingId] = useState<number | null>(null);
638
+ const [editText, setEditText] = useState('');
639
+ const inputRef = useRef<HTMLInputElement>(null);
640
+
641
+ // Load on workspace change
642
+ useEffect(() => {
643
+ if (workspaceId == null) { setTodos([]); return; }
644
+ let cancelled = false;
645
+ setLoading(true);
646
+ fetch(api(`/api/workspaces/${workspaceId}/todos`))
647
+ .then(r => r.json())
648
+ .then((data: WorkspaceTodo[]) => {
649
+ if (!cancelled) setTodos(Array.isArray(data) ? data : []);
650
+ })
651
+ .catch(() => { if (!cancelled) setTodos([]); })
652
+ .finally(() => { if (!cancelled) setLoading(false); });
653
+ return () => { cancelled = true; };
654
+ }, [workspaceId]);
655
+
656
+ const addTodo = useCallback(async () => {
657
+ const text = input.trim();
658
+ if (!text || workspaceId == null) return;
659
+
660
+ // Optimistic: append a temp row with a negative id and max sort order
661
+ const tempId = -Date.now();
662
+ const temp: WorkspaceTodo = {
663
+ id: tempId,
664
+ workspaceId,
665
+ text,
666
+ completed: false,
667
+ sortOrder: Number.MAX_SAFE_INTEGER,
668
+ created: new Date().toISOString(),
669
+ completedAt: null,
670
+ };
671
+ setTodos(prev => [...prev, temp]);
672
+ setInput('');
673
+ inputRef.current?.focus();
674
+
675
+ try {
676
+ const res = await fetch(api(`/api/workspaces/${workspaceId}/todos`), {
677
+ method: 'POST',
678
+ headers: { 'Content-Type': 'application/json' },
679
+ body: JSON.stringify({ text }),
680
+ });
681
+ if (!res.ok) throw new Error(await res.text());
682
+ const real: WorkspaceTodo = await res.json();
683
+ setTodos(prev => prev.map(t => t.id === tempId ? real : t));
684
+ } catch (err) {
685
+ console.error('failed to add todo', err);
686
+ setTodos(prev => prev.filter(t => t.id !== tempId));
687
+ }
688
+ }, [input, workspaceId]);
689
+
690
+ const toggleTodo = useCallback(async (todo: WorkspaceTodo) => {
691
+ if (workspaceId == null) return;
692
+ const next = !todo.completed;
693
+ setTodos(prev => prev.map(t => t.id === todo.id
694
+ ? { ...t, completed: next, completedAt: next ? new Date().toISOString() : null }
695
+ : t
696
+ ));
697
+
698
+ try {
699
+ const res = await fetch(api(`/api/workspaces/${workspaceId}/todos/${todo.id}`), {
700
+ method: 'PATCH',
701
+ headers: { 'Content-Type': 'application/json' },
702
+ body: JSON.stringify({ completed: next }),
703
+ });
704
+ if (!res.ok) throw new Error();
705
+ const real: WorkspaceTodo = await res.json();
706
+ setTodos(prev => prev.map(t => t.id === todo.id ? real : t));
707
+ } catch {
708
+ setTodos(prev => prev.map(t => t.id === todo.id ? todo : t));
709
+ }
710
+ }, [workspaceId]);
711
+
712
+ const deleteTodo = useCallback(async (todo: WorkspaceTodo) => {
713
+ if (workspaceId == null) return;
714
+ const snapshot = todos;
715
+ setTodos(prev => prev.filter(t => t.id !== todo.id));
716
+ try {
717
+ const res = await fetch(api(`/api/workspaces/${workspaceId}/todos/${todo.id}`), {
718
+ method: 'DELETE',
719
+ });
720
+ if (!res.ok) throw new Error();
721
+ } catch {
722
+ setTodos(snapshot);
723
+ }
724
+ }, [workspaceId, todos]);
725
+
726
+ const saveEdit = useCallback(async (todo: WorkspaceTodo) => {
727
+ const text = editText.trim();
728
+ setEditingId(null);
729
+ if (!text || text === todo.text || workspaceId == null) return;
730
+
731
+ const snapshot = todos;
732
+ setTodos(cur => cur.map(t => t.id === todo.id ? { ...t, text } : t));
733
+ try {
734
+ const res = await fetch(api(`/api/workspaces/${workspaceId}/todos/${todo.id}`), {
735
+ method: 'PATCH',
736
+ headers: { 'Content-Type': 'application/json' },
737
+ body: JSON.stringify({ text }),
738
+ });
739
+ if (!res.ok) throw new Error();
740
+ } catch {
741
+ setTodos(snapshot);
742
+ }
743
+ }, [editText, workspaceId, todos]);
744
+
745
+ // Client-side sort — matches server ordering and accommodates optimistic temp rows
746
+ const sorted = [...todos].sort((a, b) => {
747
+ if (a.completed !== b.completed) return a.completed ? 1 : -1;
748
+ if (!a.completed) return a.sortOrder - b.sortOrder;
749
+ const aT = a.completedAt ?? '';
750
+ const bT = b.completedAt ?? '';
751
+ return bT.localeCompare(aT);
752
+ });
753
+
754
+ const visible = showCompleted ? sorted : sorted.filter(t => !t.completed);
755
+ const completedCount = sorted.filter(t => t.completed).length;
756
+
757
+ return (
758
+ <div className="border-b border-zinc-800 bg-zinc-900/40 px-4 py-2 flex-shrink-0">
759
+ <div className="flex items-center gap-2 mb-1.5">
760
+ <ListTodo className="w-3.5 h-3.5 text-zinc-500" />
761
+ <span className="text-[11px] font-medium text-zinc-400 uppercase tracking-wider">Todos</span>
762
+ {completedCount > 0 && (
763
+ <button
764
+ onClick={() => setShowCompleted(s => !s)}
765
+ className="ml-auto flex items-center gap-1 text-[10px] text-zinc-500 hover:text-zinc-300 transition-colors"
766
+ title={showCompleted ? 'Hide completed' : 'Show completed'}
767
+ >
768
+ {showCompleted ? <Eye className="w-3 h-3" /> : <EyeOff className="w-3 h-3" />}
769
+ {completedCount} done
770
+ </button>
771
+ )}
772
+ </div>
773
+
774
+ <div className="flex items-center gap-1.5 mb-1">
775
+ <Plus className="w-3.5 h-3.5 text-zinc-600" />
776
+ <input
777
+ ref={inputRef}
778
+ value={input}
779
+ onChange={e => setInput(e.target.value)}
780
+ onKeyDown={e => { if (e.key === 'Enter') addTodo(); }}
781
+ placeholder={workspaceId == null ? 'Select a workspace to add todos…' : 'Add todo…'}
782
+ disabled={workspaceId == null}
783
+ className="flex-1 bg-transparent text-sm text-white placeholder:text-zinc-600 focus:outline-none disabled:opacity-50"
784
+ />
785
+ </div>
786
+
787
+ {loading && visible.length === 0 ? null : (
788
+ <ul className="space-y-0.5 max-h-[40vh] overflow-y-auto">
789
+ {visible.map(todo => (
790
+ <li
791
+ key={todo.id}
792
+ className="group flex items-center gap-2 px-1.5 py-1 rounded hover:bg-zinc-800/50 transition-colors"
793
+ >
794
+ <button
795
+ onClick={() => toggleTodo(todo)}
796
+ className={`w-3.5 h-3.5 rounded border flex items-center justify-center transition-colors flex-shrink-0 ${
797
+ todo.completed
798
+ ? 'bg-indigo-500 border-indigo-500'
799
+ : 'border-zinc-600 hover:border-zinc-400'
800
+ }`}
801
+ aria-label={todo.completed ? 'Mark incomplete' : 'Mark complete'}
802
+ >
803
+ {todo.completed && <Check className="w-2.5 h-2.5 text-white" />}
804
+ </button>
805
+
806
+ {editingId === todo.id ? (
807
+ <input
808
+ autoFocus
809
+ value={editText}
810
+ onChange={e => setEditText(e.target.value)}
811
+ onBlur={() => saveEdit(todo)}
812
+ onKeyDown={e => {
813
+ if (e.key === 'Enter') saveEdit(todo);
814
+ if (e.key === 'Escape') setEditingId(null);
815
+ }}
816
+ className="flex-1 bg-zinc-800 border border-zinc-700 rounded px-1.5 py-0.5 text-sm text-white focus:outline-none focus:border-indigo-500"
817
+ />
818
+ ) : (
819
+ <button
820
+ onClick={() => { setEditingId(todo.id); setEditText(todo.text); }}
821
+ className={`flex-1 text-left text-sm truncate ${
822
+ todo.completed ? 'text-zinc-500 line-through' : 'text-zinc-200'
823
+ }`}
824
+ >
825
+ {todo.text}
826
+ </button>
827
+ )}
828
+
829
+ <button
830
+ onClick={() => deleteTodo(todo)}
831
+ className="p-0.5 text-zinc-600 hover:text-red-400 opacity-0 group-hover:opacity-100 transition-opacity"
832
+ aria-label="Delete todo"
833
+ >
834
+ <X className="w-3 h-3" />
835
+ </button>
836
+ </li>
837
+ ))}
838
+ </ul>
839
+ )}
840
+ </div>
841
+ );
842
+ }
843
+ ```
844
+
845
+ - [ ] **Step 2: Type-check**
846
+
847
+ Run:
848
+ ```bash
849
+ npx tsc --noEmit
850
+ ```
851
+
852
+ Expected: no new errors.
853
+
854
+ - [ ] **Step 3: Commit**
855
+
856
+ ```bash
857
+ git add src/components/workspace/workspace-todos.tsx
858
+ git commit -m "feat(ui): add WorkspaceTodos component"
859
+ ```
860
+
861
+ ---
862
+
863
+ ## Task 7: Mount `<WorkspaceTodos>` on the terminal page
864
+
865
+ **Files:**
866
+ - Modify: `src/app/(desktop)/terminal/page.tsx`
867
+
868
+ - [ ] **Step 1: Import and place the component**
869
+
870
+ Open `src/app/(desktop)/terminal/page.tsx`. Near the other `import` statements at the top (around line 30, next to the `ProjectWizard` import), add:
871
+
872
+ ```tsx
873
+ import { WorkspaceTodos } from '@/components/workspace/workspace-todos';
874
+ ```
875
+
876
+ Then in the entered-workspace render path, mount it directly **below** the popped-out-panes indicator row and **above** the `{/* File Explorer + Terminal grid + Activity Panel */}` div. Look for this block around lines 1194-1221:
877
+
878
+ ```tsx
879
+ {/* Popped-out pane indicators */}
880
+ {poppedOut.size > 0 && (
881
+ <div className="flex items-center gap-2 px-4 py-1.5 border-b border-zinc-800 bg-zinc-900/50">
882
+ ...
883
+ </div>
884
+ )}
885
+
886
+ {/* File Explorer + Terminal grid + Activity Panel */}
887
+ <div className="flex-1 flex overflow-hidden min-h-0">
888
+ ```
889
+
890
+ Insert between them:
891
+
892
+ ```tsx
893
+ {/* Workspace todos */}
894
+ <WorkspaceTodos workspaceId={activeWorkspace?.id ?? null} />
895
+ ```
896
+
897
+ - [ ] **Step 2: Start the dev server for manual QA**
898
+
899
+ Run:
900
+ ```bash
901
+ npm run dev
902
+ ```
903
+
904
+ Open `http://localhost:3457/terminal`, enter a workspace.
905
+
906
+ - [ ] **Step 3: Walk through the QA checklist**
907
+
908
+ 1. Todos bar renders above the pane grid.
909
+ 2. Type "first todo" + Enter → appears in list. Input clears and stays focused.
910
+ 3. Add "second todo", "third todo". They stack top-to-bottom in creation order.
911
+ 4. Click the checkbox on "second todo" → strikes through, sinks below the uncompleted pair. A "1 done" counter + eye toggle appears in the header.
912
+ 5. Click the eye icon → "second todo" hides. Click again → reappears.
913
+ 6. Click the text of "first todo" → inline edit. Type "first todo (edited)", Enter → text updates. Reload the page → edit persisted.
914
+ 7. Hover any todo → `×` button appears; click → deletes.
915
+ 8. Open the workspace chooser, switch to another workspace → todo list swaps. Switch back → original list intact.
916
+ 9. Delete a workspace that has todos (ensure it's not the active one): its todos should be gone from the DB.
917
+ ```bash
918
+ sqlite3 ~/.spaces/*.db "SELECT COUNT(*) FROM workspace_todos WHERE workspace_id = <deleted-id>;"
919
+ ```
920
+ Expected: `0`.
921
+
922
+ Stop the dev server after QA passes.
923
+
924
+ - [ ] **Step 4: Commit**
925
+
926
+ ```bash
927
+ git add "src/app/(desktop)/terminal/page.tsx"
928
+ git commit -m "feat(terminal): mount WorkspaceTodos above pane grid"
929
+ ```
930
+
931
+ ---
932
+
933
+ ## Task 8: Feature doc
934
+
935
+ **Files:**
936
+ - Create: `docs/features/workspace-todos.md`
937
+
938
+ - [ ] **Step 1: Write the feature doc**
939
+
940
+ Create `docs/features/workspace-todos.md`:
941
+
942
+ ````markdown
943
+ # Workspace Todos
944
+
945
+ **Status:** stable
946
+ **Owner:** jlongo
947
+ **Last updated:** 2026-04-21
948
+
949
+ ## Overview
950
+
951
+ A lightweight todo list attached to each workspace. Renders inline at the top of `/terminal` above the pane grid, always visible. Minimal model: text + checkbox + delete. Scoped per-workspace — switching workspaces swaps the list. Not in scope: agent read/write, drag-reorder, priorities/due dates, cross-workspace views.
952
+
953
+ ## User-facing behavior
954
+
955
+ - Visit `/terminal`, enter any workspace.
956
+ - A "Todos" bar renders above the pane grid with an "Add todo…" input.
957
+ - Enter adds a todo at the bottom of the uncompleted list. Input stays focused.
958
+ - Click the checkbox → strike-through + sink to the completed section.
959
+ - Click text → inline edit. Enter saves, Esc cancels, blur saves.
960
+ - Hover row → `×` delete button.
961
+ - Eye icon in the header toggles visibility of completed todos (ephemeral, resets on reload).
962
+
963
+ ## Architecture
964
+
965
+ UI (`src/components/workspace/workspace-todos.tsx`) → API routes (`src/app/api/workspaces/[id]/todos/*`) → DB helpers (`src/lib/db/queries.ts`) → SQLite (`workspace_todos` table in the per-user DB at `~/.spaces/<user>.db`).
966
+
967
+ Mutations are optimistic client-side with rollback on failure. Workspace switch triggers a fresh refetch keyed on `workspaceId`.
968
+
969
+ ## Key files
970
+
971
+ | Path | Role |
972
+ |---|---|
973
+ | `src/components/workspace/workspace-todos.tsx` | Inline UI component — fetching, optimistic CRUD, rendering |
974
+ | `src/app/api/workspaces/[id]/todos/route.ts` | `GET` list, `POST` create |
975
+ | `src/app/api/workspaces/[id]/todos/[todoId]/route.ts` | `PATCH` update, `DELETE` remove |
976
+ | `src/lib/db/schema.ts` | `workspace_todos` table declaration inside `initSchema()` |
977
+ | `src/lib/db/queries.ts` | `getWorkspaceTodos`, `addWorkspaceTodo`, `updateWorkspaceTodo`, `deleteWorkspaceTodo` |
978
+ | `src/types/claude.ts` (or wherever `Workspace` is defined) | `WorkspaceTodo` type |
979
+ | `src/app/(desktop)/terminal/page.tsx` | Mounts `<WorkspaceTodos>` above the pane grid |
980
+ | `tests/db/workspace-todos.test.ts` | Query-layer tests — ordering, cascade, scoping |
981
+
982
+ ## Data model
983
+
984
+ ### `workspace_todos`
985
+
986
+ | Column | Type | Notes |
987
+ |---|---|---|
988
+ | `id` | INTEGER PK | autoincrement |
989
+ | `workspace_id` | INTEGER NOT NULL | FK → `workspaces(id)` ON DELETE CASCADE |
990
+ | `text` | TEXT NOT NULL | trimmed on insert/update; empty rejected |
991
+ | `completed` | INTEGER NOT NULL DEFAULT 0 | 0 or 1 |
992
+ | `sort_order` | INTEGER NOT NULL DEFAULT 0 | meaningful only among uncompleted rows |
993
+ | `created` | TEXT NOT NULL DEFAULT datetime('now') | |
994
+ | `completed_at` | TEXT | set when completed flips 0→1, cleared on 1→0 |
995
+
996
+ Index: `idx_workspace_todos_workspace` on `workspace_id`.
997
+
998
+ ### TypeScript
999
+
1000
+ ```ts
1001
+ interface WorkspaceTodo {
1002
+ id: number;
1003
+ workspaceId: number;
1004
+ text: string;
1005
+ completed: boolean;
1006
+ sortOrder: number;
1007
+ created: string;
1008
+ completedAt: string | null;
1009
+ }
1010
+ ```
1011
+
1012
+ ### Invariants
1013
+
1014
+ - Listing order: uncompleted first by `sort_order` ASC, then completed by `completed_at` DESC.
1015
+ - New todos get `sort_order = MAX(sort_order WHERE completed=0) + 1`.
1016
+ - `completed_at` is `NULL` iff `completed = 0`.
1017
+ - Deleting a workspace deletes its todos via FK cascade.
1018
+
1019
+ ## APIs / contracts
1020
+
1021
+ ### Internal endpoints
1022
+
1023
+ | Method | Path | Request | Response |
1024
+ |---|---|---|---|
1025
+ | `GET` | `/api/workspaces/:id/todos` | — | `WorkspaceTodo[]` |
1026
+ | `POST` | `/api/workspaces/:id/todos` | `{ text: string }` | `201 WorkspaceTodo` or `400 { error }` |
1027
+ | `PATCH` | `/api/workspaces/:id/todos/:todoId` | `{ text?, completed? }` | `WorkspaceTodo` or `400`/`404` |
1028
+ | `DELETE` | `/api/workspaces/:id/todos/:todoId` | — | `{ ok: true }` |
1029
+
1030
+ Auth via `getAuthUser` + `withUser`, same pattern as sibling workspace routes.
1031
+
1032
+ ### External calls
1033
+ N/A.
1034
+
1035
+ ## Configuration & environment
1036
+ None. Always-on Community-tier feature. No env vars, flags, or tier gates.
1037
+
1038
+ ## How to run / test locally
1039
+
1040
+ ```bash
1041
+ npm install
1042
+ npm run build
1043
+ npm start
1044
+ # visit http://localhost:3457/terminal, enter any workspace
1045
+ ```
1046
+
1047
+ Automated:
1048
+ ```bash
1049
+ npx vitest run tests/db/workspace-todos.test.ts
1050
+ ```
1051
+
1052
+ ## Known quirks & decisions
1053
+
1054
+ - **Schema lives in `initSchema()`, no migration file.** Matches the pattern in `src/lib/db/schema.ts`; the repo has no separate migration system.
1055
+ - **No agent write path in v1.** The coworker's "pi /todos" plugin that inspired this lets agents add todos from inside the session — deferred because it requires an MCP tool or CLI surface.
1056
+ - **Optimistic updates without toasts.** Failures `console.error` and revert local state; this is a local-only app, so silent revert is acceptable for v1.
1057
+ - **`sort_order = Number.MAX_SAFE_INTEGER` for optimistic inserts.** The temp row sorts to the bottom of uncompleted; the server returns the real `sort_order` on response and replaces the temp.
1058
+ - **No confirm on delete.** Minimal ethos. Add undo toast in a follow-up if this proves painful.
1059
+ - **Direct-to-main workflow.** Per repo convention for this codebase; no PR flow.
1060
+
1061
+ ## Open questions / TODOs
1062
+
1063
+ - [ ] Agent write access via MCP tool once UI v1 proves out.
1064
+ - [ ] Optional: persist the "show completed" toggle in localStorage.
1065
+ - [ ] Optional: keyboard shortcut to focus the add-input from anywhere on `/terminal`.
1066
+
1067
+ ## Changelog
1068
+
1069
+ - 2026-04-21 — Initial implementation. v1 ships direct to `main`.
1070
+ ````
1071
+
1072
+ - [ ] **Step 2: Commit**
1073
+
1074
+ ```bash
1075
+ git add docs/features/workspace-todos.md
1076
+ git commit -m "docs(features): add workspace-todos feature doc"
1077
+ ```
1078
+
1079
+ ---
1080
+
1081
+ ## Self-Review Notes (filled in after writing)
1082
+
1083
+ **Spec coverage:** every section in `docs/superpowers/specs/2026-04-21-workspace-todos-design.md` has a task:
1084
+ - Data model → Task 1
1085
+ - Type + query helpers → Task 2
1086
+ - Query tests → Task 3
1087
+ - `GET`/`POST` routes → Task 4
1088
+ - `PATCH`/`DELETE` routes → Task 5
1089
+ - UI component → Task 6
1090
+ - Terminal page integration → Task 7
1091
+ - Feature doc → Task 8
1092
+
1093
+ **Placeholder scan:** no TBD/TODO outside the explicit "Open questions / TODOs" section of the feature doc, which is itself a required section per `FEATURE_DOC_GUIDE.md`.
1094
+
1095
+ **Type consistency:** `WorkspaceTodo` shape is identical across Task 2 (declaration), Task 3 (test assertions), Task 4/5 (route returns), Task 6 (UI import), Task 8 (doc). Function names `getWorkspaceTodos` / `addWorkspaceTodo` / `updateWorkspaceTodo` / `deleteWorkspaceTodo` used consistently.
1096
+
1097
+ **Manual QA gate:** Task 7 Step 3 is the final smoke test — requires a running server and a browser session.