@chorus-aidlc/chorus 0.14.6 → 0.15.0

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 (613) hide show
  1. package/.next/standalone/.next/BUILD_ID +1 -1
  2. package/.next/standalone/.next/app-build-manifest.json +448 -402
  3. package/.next/standalone/.next/app-path-routes-manifest.json +46 -41
  4. package/.next/standalone/.next/build-manifest.json +5 -5
  5. package/.next/standalone/.next/prerender-manifest.json +15 -15
  6. package/.next/standalone/.next/routes-manifest.json +16 -0
  7. package/.next/standalone/.next/server/app/(dashboard)/project-groups/[uuid]/page.js +2 -2
  8. package/.next/standalone/.next/server/app/(dashboard)/project-groups/[uuid]/page.js.nft.json +1 -1
  9. package/.next/standalone/.next/server/app/(dashboard)/project-groups/[uuid]/page_client-reference-manifest.js +1 -1
  10. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/activity/page.js +1 -1
  11. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/activity/page.js.nft.json +1 -1
  12. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/activity/page_client-reference-manifest.js +1 -1
  13. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/dashboard/[ideaUuid]/page.js +1 -1
  14. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/dashboard/[ideaUuid]/page.js.nft.json +1 -1
  15. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/dashboard/[ideaUuid]/page_client-reference-manifest.js +1 -1
  16. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/dashboard/page.js +2 -2
  17. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/dashboard/page.js.nft.json +1 -1
  18. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/dashboard/page_client-reference-manifest.js +1 -1
  19. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/documents/[documentUuid]/page.js +2 -2
  20. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/documents/[documentUuid]/page.js.nft.json +1 -1
  21. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/documents/[documentUuid]/page_client-reference-manifest.js +1 -1
  22. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/documents/page.js +1 -1
  23. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/documents/page.js.nft.json +1 -1
  24. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/documents/page_client-reference-manifest.js +1 -1
  25. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/graph/page.js +2 -2
  26. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/graph/page.js.nft.json +1 -1
  27. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/graph/page_client-reference-manifest.js +1 -1
  28. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/proposals/[proposalUuid]/page.js +2 -2
  29. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/proposals/[proposalUuid]/page.js.nft.json +1 -1
  30. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/proposals/[proposalUuid]/page_client-reference-manifest.js +1 -1
  31. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/proposals/new/page.js +1 -1
  32. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/proposals/new/page.js.nft.json +1 -1
  33. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/proposals/new/page_client-reference-manifest.js +1 -1
  34. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/proposals/page.js +2 -2
  35. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/proposals/page.js.nft.json +1 -1
  36. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/proposals/page_client-reference-manifest.js +1 -1
  37. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/tasks/[taskUuid]/page.js +1 -1
  38. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/tasks/[taskUuid]/page.js.nft.json +1 -1
  39. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/tasks/[taskUuid]/page_client-reference-manifest.js +1 -1
  40. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/tasks/page.js +1 -1
  41. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/tasks/page.js.nft.json +1 -1
  42. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/tasks/page_client-reference-manifest.js +1 -1
  43. package/.next/standalone/.next/server/app/(dashboard)/projects/page.js +3 -3
  44. package/.next/standalone/.next/server/app/(dashboard)/projects/page.js.nft.json +1 -1
  45. package/.next/standalone/.next/server/app/(dashboard)/projects/page_client-reference-manifest.js +1 -1
  46. package/.next/standalone/.next/server/app/(dashboard)/settings/page.js +1 -1
  47. package/.next/standalone/.next/server/app/(dashboard)/settings/page.js.nft.json +1 -1
  48. package/.next/standalone/.next/server/app/(dashboard)/settings/page_client-reference-manifest.js +1 -1
  49. package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  50. package/.next/standalone/.next/server/app/_not-found.html +2 -2
  51. package/.next/standalone/.next/server/app/_not-found.rsc +2 -2
  52. package/.next/standalone/.next/server/app/admin/companies/[uuid]/page_client-reference-manifest.js +1 -1
  53. package/.next/standalone/.next/server/app/admin/companies/new/page_client-reference-manifest.js +1 -1
  54. package/.next/standalone/.next/server/app/admin/companies/new.html +2 -2
  55. package/.next/standalone/.next/server/app/admin/companies/new.rsc +2 -2
  56. package/.next/standalone/.next/server/app/admin/companies/page_client-reference-manifest.js +1 -1
  57. package/.next/standalone/.next/server/app/admin/companies.html +2 -2
  58. package/.next/standalone/.next/server/app/admin/companies.rsc +2 -2
  59. package/.next/standalone/.next/server/app/admin/page_client-reference-manifest.js +1 -1
  60. package/.next/standalone/.next/server/app/admin.html +2 -2
  61. package/.next/standalone/.next/server/app/admin.rsc +2 -2
  62. package/.next/standalone/.next/server/app/api/admin/companies/[uuid]/route_client-reference-manifest.js +1 -1
  63. package/.next/standalone/.next/server/app/api/admin/companies/route_client-reference-manifest.js +1 -1
  64. package/.next/standalone/.next/server/app/api/admin/login/route_client-reference-manifest.js +1 -1
  65. package/.next/standalone/.next/server/app/api/admin/session/route_client-reference-manifest.js +1 -1
  66. package/.next/standalone/.next/server/app/api/agent-connections/route.js.nft.json +1 -1
  67. package/.next/standalone/.next/server/app/api/agent-connections/route_client-reference-manifest.js +1 -1
  68. package/.next/standalone/.next/server/app/api/agents/[uuid]/route_client-reference-manifest.js +1 -1
  69. package/.next/standalone/.next/server/app/api/agents/[uuid]/sessions/route.js +1 -1
  70. package/.next/standalone/.next/server/app/api/agents/[uuid]/sessions/route.js.nft.json +1 -1
  71. package/.next/standalone/.next/server/app/api/agents/[uuid]/sessions/route_client-reference-manifest.js +1 -1
  72. package/.next/standalone/.next/server/app/api/agents/route_client-reference-manifest.js +1 -1
  73. package/.next/standalone/.next/server/app/api/api-keys/[uuid]/route_client-reference-manifest.js +1 -1
  74. package/.next/standalone/.next/server/app/api/api-keys/route_client-reference-manifest.js +1 -1
  75. package/.next/standalone/.next/server/app/api/auth/callback/route_client-reference-manifest.js +1 -1
  76. package/.next/standalone/.next/server/app/api/auth/check-default/route_client-reference-manifest.js +1 -1
  77. package/.next/standalone/.next/server/app/api/auth/company-oidc/route_client-reference-manifest.js +1 -1
  78. package/.next/standalone/.next/server/app/api/auth/default-login/route_client-reference-manifest.js +1 -1
  79. package/.next/standalone/.next/server/app/api/auth/identify/route_client-reference-manifest.js +1 -1
  80. package/.next/standalone/.next/server/app/api/auth/logout/route_client-reference-manifest.js +1 -1
  81. package/.next/standalone/.next/server/app/api/auth/me/route_client-reference-manifest.js +1 -1
  82. package/.next/standalone/.next/server/app/api/auth/sync-token/route_client-reference-manifest.js +1 -1
  83. package/.next/standalone/.next/server/app/api/comments/route.js +1 -1
  84. package/.next/standalone/.next/server/app/api/comments/route.js.nft.json +1 -1
  85. package/.next/standalone/.next/server/app/api/comments/route_client-reference-manifest.js +1 -1
  86. package/.next/standalone/.next/server/app/api/daemon/connection-heartbeat/route.js.nft.json +1 -1
  87. package/.next/standalone/.next/server/app/api/daemon/connection-heartbeat/route_client-reference-manifest.js +1 -1
  88. package/.next/standalone/.next/server/app/api/daemon/control/route.js +1 -1
  89. package/.next/standalone/.next/server/app/api/daemon/control/route_client-reference-manifest.js +1 -1
  90. package/.next/standalone/.next/server/app/api/daemon/directory-request/report/route.js +1 -0
  91. package/.next/standalone/.next/server/app/api/daemon/directory-request/report/route.js.nft.json +1 -0
  92. package/.next/standalone/.next/server/app/api/daemon/directory-request/report/route_client-reference-manifest.js +1 -0
  93. package/.next/standalone/.next/server/app/api/daemon/execution-state/route.js.nft.json +1 -1
  94. package/.next/standalone/.next/server/app/api/daemon/execution-state/route_client-reference-manifest.js +1 -1
  95. package/.next/standalone/.next/server/app/api/daemon/executions/route.js.nft.json +1 -1
  96. package/.next/standalone/.next/server/app/api/daemon/executions/route_client-reference-manifest.js +1 -1
  97. package/.next/standalone/.next/server/app/api/daemon/pending-turns/route.js +1 -1
  98. package/.next/standalone/.next/server/app/api/daemon/pending-turns/route.js.nft.json +1 -1
  99. package/.next/standalone/.next/server/app/api/daemon/pending-turns/route_client-reference-manifest.js +1 -1
  100. package/.next/standalone/.next/server/app/api/daemon/report-interrupt/route.js +1 -1
  101. package/.next/standalone/.next/server/app/api/daemon/report-interrupt/route.js.nft.json +1 -1
  102. package/.next/standalone/.next/server/app/api/daemon/report-interrupt/route_client-reference-manifest.js +1 -1
  103. package/.next/standalone/.next/server/app/api/daemon/resume/route.js +1 -1
  104. package/.next/standalone/.next/server/app/api/daemon/resume/route.js.nft.json +1 -1
  105. package/.next/standalone/.next/server/app/api/daemon/resume/route_client-reference-manifest.js +1 -1
  106. package/.next/standalone/.next/server/app/api/daemon/transcript/route.js +1 -1
  107. package/.next/standalone/.next/server/app/api/daemon/transcript/route.js.nft.json +1 -1
  108. package/.next/standalone/.next/server/app/api/daemon/transcript/route_client-reference-manifest.js +1 -1
  109. package/.next/standalone/.next/server/app/api/daemon/turn-advance/route.js +1 -1
  110. package/.next/standalone/.next/server/app/api/daemon/turn-advance/route.js.nft.json +1 -1
  111. package/.next/standalone/.next/server/app/api/daemon/turn-advance/route_client-reference-manifest.js +1 -1
  112. package/.next/standalone/.next/server/app/api/daemon-directory-requests/[uuid]/route.js +1 -0
  113. package/.next/standalone/.next/server/app/api/daemon-directory-requests/[uuid]/route.js.nft.json +1 -0
  114. package/.next/standalone/.next/server/app/api/daemon-directory-requests/[uuid]/route_client-reference-manifest.js +1 -0
  115. package/.next/standalone/.next/server/app/api/daemon-directory-requests/route.js +1 -0
  116. package/.next/standalone/.next/server/app/api/daemon-directory-requests/route.js.nft.json +1 -0
  117. package/.next/standalone/.next/server/app/api/daemon-directory-requests/route_client-reference-manifest.js +1 -0
  118. package/.next/standalone/.next/server/app/api/daemon-sessions/[sessionUuid]/instruction/route.js +1 -1
  119. package/.next/standalone/.next/server/app/api/daemon-sessions/[sessionUuid]/instruction/route.js.nft.json +1 -1
  120. package/.next/standalone/.next/server/app/api/daemon-sessions/[sessionUuid]/instruction/route_client-reference-manifest.js +1 -1
  121. package/.next/standalone/.next/server/app/api/daemon-sessions/[sessionUuid]/repoint/route.js +1 -1
  122. package/.next/standalone/.next/server/app/api/daemon-sessions/[sessionUuid]/repoint/route.js.nft.json +1 -1
  123. package/.next/standalone/.next/server/app/api/daemon-sessions/[sessionUuid]/repoint/route_client-reference-manifest.js +1 -1
  124. package/.next/standalone/.next/server/app/api/daemon-sessions/[sessionUuid]/route.js +1 -1
  125. package/.next/standalone/.next/server/app/api/daemon-sessions/[sessionUuid]/route.js.nft.json +1 -1
  126. package/.next/standalone/.next/server/app/api/daemon-sessions/[sessionUuid]/route_client-reference-manifest.js +1 -1
  127. package/.next/standalone/.next/server/app/api/daemon-sessions/ad-hoc/route.js +1 -1
  128. package/.next/standalone/.next/server/app/api/daemon-sessions/ad-hoc/route.js.nft.json +1 -1
  129. package/.next/standalone/.next/server/app/api/daemon-sessions/ad-hoc/route_client-reference-manifest.js +1 -1
  130. package/.next/standalone/.next/server/app/api/daemon-sessions/route.js +1 -1
  131. package/.next/standalone/.next/server/app/api/daemon-sessions/route.js.nft.json +1 -1
  132. package/.next/standalone/.next/server/app/api/daemon-sessions/route_client-reference-manifest.js +1 -1
  133. package/.next/standalone/.next/server/app/api/documents/[uuid]/route_client-reference-manifest.js +1 -1
  134. package/.next/standalone/.next/server/app/api/entities/[type]/[uuid]/root-idea/route.js +1 -1
  135. package/.next/standalone/.next/server/app/api/entities/[type]/[uuid]/root-idea/route.js.nft.json +1 -1
  136. package/.next/standalone/.next/server/app/api/entities/[type]/[uuid]/root-idea/route_client-reference-manifest.js +1 -1
  137. package/.next/standalone/.next/server/app/api/events/notifications/route.js +1 -1
  138. package/.next/standalone/.next/server/app/api/events/notifications/route.js.nft.json +1 -1
  139. package/.next/standalone/.next/server/app/api/events/notifications/route_client-reference-manifest.js +1 -1
  140. package/.next/standalone/.next/server/app/api/events/route.js +1 -1
  141. package/.next/standalone/.next/server/app/api/events/route.js.nft.json +1 -1
  142. package/.next/standalone/.next/server/app/api/events/route_client-reference-manifest.js +1 -1
  143. package/.next/standalone/.next/server/app/api/health/route_client-reference-manifest.js +1 -1
  144. package/.next/standalone/.next/server/app/api/ideas/[uuid]/claim/route.js +1 -1
  145. package/.next/standalone/.next/server/app/api/ideas/[uuid]/claim/route.js.nft.json +1 -1
  146. package/.next/standalone/.next/server/app/api/ideas/[uuid]/claim/route_client-reference-manifest.js +1 -1
  147. package/.next/standalone/.next/server/app/api/ideas/[uuid]/move/preview/route.js +1 -1
  148. package/.next/standalone/.next/server/app/api/ideas/[uuid]/move/preview/route.js.nft.json +1 -1
  149. package/.next/standalone/.next/server/app/api/ideas/[uuid]/move/preview/route_client-reference-manifest.js +1 -1
  150. package/.next/standalone/.next/server/app/api/ideas/[uuid]/move/route.js +1 -1
  151. package/.next/standalone/.next/server/app/api/ideas/[uuid]/move/route.js.nft.json +1 -1
  152. package/.next/standalone/.next/server/app/api/ideas/[uuid]/move/route_client-reference-manifest.js +1 -1
  153. package/.next/standalone/.next/server/app/api/ideas/[uuid]/parent/route.js +1 -1
  154. package/.next/standalone/.next/server/app/api/ideas/[uuid]/parent/route.js.nft.json +1 -1
  155. package/.next/standalone/.next/server/app/api/ideas/[uuid]/parent/route_client-reference-manifest.js +1 -1
  156. package/.next/standalone/.next/server/app/api/ideas/[uuid]/release/route.js +1 -1
  157. package/.next/standalone/.next/server/app/api/ideas/[uuid]/release/route.js.nft.json +1 -1
  158. package/.next/standalone/.next/server/app/api/ideas/[uuid]/release/route_client-reference-manifest.js +1 -1
  159. package/.next/standalone/.next/server/app/api/ideas/[uuid]/route.js +1 -1
  160. package/.next/standalone/.next/server/app/api/ideas/[uuid]/route.js.nft.json +1 -1
  161. package/.next/standalone/.next/server/app/api/ideas/[uuid]/route_client-reference-manifest.js +1 -1
  162. package/.next/standalone/.next/server/app/api/ideas/[uuid]/wake-preview/route.js +1 -1
  163. package/.next/standalone/.next/server/app/api/ideas/[uuid]/wake-preview/route.js.nft.json +1 -1
  164. package/.next/standalone/.next/server/app/api/ideas/[uuid]/wake-preview/route_client-reference-manifest.js +1 -1
  165. package/.next/standalone/.next/server/app/api/ideas/conversational/route.js +1 -1
  166. package/.next/standalone/.next/server/app/api/ideas/conversational/route.js.nft.json +1 -1
  167. package/.next/standalone/.next/server/app/api/ideas/conversational/route_client-reference-manifest.js +1 -1
  168. package/.next/standalone/.next/server/app/api/mcp/route.js +2 -2
  169. package/.next/standalone/.next/server/app/api/mcp/route.js.nft.json +1 -1
  170. package/.next/standalone/.next/server/app/api/mcp/route_client-reference-manifest.js +1 -1
  171. package/.next/standalone/.next/server/app/api/me/assignments/route.js +1 -1
  172. package/.next/standalone/.next/server/app/api/me/assignments/route.js.nft.json +1 -1
  173. package/.next/standalone/.next/server/app/api/me/assignments/route_client-reference-manifest.js +1 -1
  174. package/.next/standalone/.next/server/app/api/mentionables/route.js +1 -1
  175. package/.next/standalone/.next/server/app/api/mentionables/route.js.nft.json +1 -1
  176. package/.next/standalone/.next/server/app/api/mentionables/route_client-reference-manifest.js +1 -1
  177. package/.next/standalone/.next/server/app/api/notifications/[uuid]/archive/route.js +1 -1
  178. package/.next/standalone/.next/server/app/api/notifications/[uuid]/archive/route.js.nft.json +1 -1
  179. package/.next/standalone/.next/server/app/api/notifications/[uuid]/archive/route_client-reference-manifest.js +1 -1
  180. package/.next/standalone/.next/server/app/api/notifications/[uuid]/read/route.js +1 -1
  181. package/.next/standalone/.next/server/app/api/notifications/[uuid]/read/route.js.nft.json +1 -1
  182. package/.next/standalone/.next/server/app/api/notifications/[uuid]/read/route_client-reference-manifest.js +1 -1
  183. package/.next/standalone/.next/server/app/api/notifications/preferences/route.js +1 -1
  184. package/.next/standalone/.next/server/app/api/notifications/preferences/route.js.nft.json +1 -1
  185. package/.next/standalone/.next/server/app/api/notifications/preferences/route_client-reference-manifest.js +1 -1
  186. package/.next/standalone/.next/server/app/api/notifications/read-all/route.js +1 -1
  187. package/.next/standalone/.next/server/app/api/notifications/read-all/route.js.nft.json +1 -1
  188. package/.next/standalone/.next/server/app/api/notifications/read-all/route_client-reference-manifest.js +1 -1
  189. package/.next/standalone/.next/server/app/api/notifications/route.js +1 -1
  190. package/.next/standalone/.next/server/app/api/notifications/route.js.nft.json +1 -1
  191. package/.next/standalone/.next/server/app/api/notifications/route_client-reference-manifest.js +1 -1
  192. package/.next/standalone/.next/server/app/api/notifications/unread-count/route.js +1 -1
  193. package/.next/standalone/.next/server/app/api/notifications/unread-count/route.js.nft.json +1 -1
  194. package/.next/standalone/.next/server/app/api/notifications/unread-count/route_client-reference-manifest.js +1 -1
  195. package/.next/standalone/.next/server/app/api/project-groups/[uuid]/dashboard/route_client-reference-manifest.js +1 -1
  196. package/.next/standalone/.next/server/app/api/project-groups/[uuid]/route_client-reference-manifest.js +1 -1
  197. package/.next/standalone/.next/server/app/api/project-groups/route_client-reference-manifest.js +1 -1
  198. package/.next/standalone/.next/server/app/api/project-visits/pin/route_client-reference-manifest.js +1 -1
  199. package/.next/standalone/.next/server/app/api/project-visits/route_client-reference-manifest.js +1 -1
  200. package/.next/standalone/.next/server/app/api/project-visits/visit/route_client-reference-manifest.js +1 -1
  201. package/.next/standalone/.next/server/app/api/projects/[uuid]/activity/route_client-reference-manifest.js +1 -1
  202. package/.next/standalone/.next/server/app/api/projects/[uuid]/agent-cwds/route.js +1 -0
  203. package/.next/standalone/.next/server/app/api/projects/[uuid]/agent-cwds/route.js.nft.json +1 -0
  204. package/.next/standalone/.next/server/app/api/projects/[uuid]/agent-cwds/route_client-reference-manifest.js +1 -0
  205. package/.next/standalone/.next/server/app/api/projects/[uuid]/available/route.js +1 -1
  206. package/.next/standalone/.next/server/app/api/projects/[uuid]/available/route.js.nft.json +1 -1
  207. package/.next/standalone/.next/server/app/api/projects/[uuid]/available/route_client-reference-manifest.js +1 -1
  208. package/.next/standalone/.next/server/app/api/projects/[uuid]/documents/route_client-reference-manifest.js +1 -1
  209. package/.next/standalone/.next/server/app/api/projects/[uuid]/group/route_client-reference-manifest.js +1 -1
  210. package/.next/standalone/.next/server/app/api/projects/[uuid]/ideas/route.js +1 -1
  211. package/.next/standalone/.next/server/app/api/projects/[uuid]/ideas/route.js.nft.json +1 -1
  212. package/.next/standalone/.next/server/app/api/projects/[uuid]/ideas/route_client-reference-manifest.js +1 -1
  213. package/.next/standalone/.next/server/app/api/projects/[uuid]/ideas/tracker/route.js +1 -1
  214. package/.next/standalone/.next/server/app/api/projects/[uuid]/ideas/tracker/route.js.nft.json +1 -1
  215. package/.next/standalone/.next/server/app/api/projects/[uuid]/ideas/tracker/route_client-reference-manifest.js +1 -1
  216. package/.next/standalone/.next/server/app/api/projects/[uuid]/proposals/[proposalUuid]/validate/route_client-reference-manifest.js +1 -1
  217. package/.next/standalone/.next/server/app/api/projects/[uuid]/proposals/route_client-reference-manifest.js +1 -1
  218. package/.next/standalone/.next/server/app/api/projects/[uuid]/proposals/summary/route_client-reference-manifest.js +1 -1
  219. package/.next/standalone/.next/server/app/api/projects/[uuid]/resource-graph/route.js +1 -1
  220. package/.next/standalone/.next/server/app/api/projects/[uuid]/resource-graph/route.js.nft.json +1 -1
  221. package/.next/standalone/.next/server/app/api/projects/[uuid]/resource-graph/route_client-reference-manifest.js +1 -1
  222. package/.next/standalone/.next/server/app/api/projects/[uuid]/route_client-reference-manifest.js +1 -1
  223. package/.next/standalone/.next/server/app/api/projects/[uuid]/stats/route_client-reference-manifest.js +1 -1
  224. package/.next/standalone/.next/server/app/api/projects/[uuid]/tasks/dependencies/route.js +1 -1
  225. package/.next/standalone/.next/server/app/api/projects/[uuid]/tasks/dependencies/route.js.nft.json +1 -1
  226. package/.next/standalone/.next/server/app/api/projects/[uuid]/tasks/dependencies/route_client-reference-manifest.js +1 -1
  227. package/.next/standalone/.next/server/app/api/projects/[uuid]/tasks/route.js +1 -1
  228. package/.next/standalone/.next/server/app/api/projects/[uuid]/tasks/route.js.nft.json +1 -1
  229. package/.next/standalone/.next/server/app/api/projects/[uuid]/tasks/route_client-reference-manifest.js +1 -1
  230. package/.next/standalone/.next/server/app/api/projects/agent-cwd-options/route.js +1 -0
  231. package/.next/standalone/.next/server/app/api/projects/agent-cwd-options/route.js.nft.json +1 -0
  232. package/.next/standalone/.next/server/app/api/projects/agent-cwd-options/route_client-reference-manifest.js +1 -0
  233. package/.next/standalone/.next/server/app/api/projects/route.js +1 -1
  234. package/.next/standalone/.next/server/app/api/projects/route.js.nft.json +1 -1
  235. package/.next/standalone/.next/server/app/api/projects/route_client-reference-manifest.js +1 -1
  236. package/.next/standalone/.next/server/app/api/proposals/[uuid]/approve/route_client-reference-manifest.js +1 -1
  237. package/.next/standalone/.next/server/app/api/proposals/[uuid]/close/route_client-reference-manifest.js +1 -1
  238. package/.next/standalone/.next/server/app/api/proposals/[uuid]/reject/route_client-reference-manifest.js +1 -1
  239. package/.next/standalone/.next/server/app/api/proposals/[uuid]/revoke/route_client-reference-manifest.js +1 -1
  240. package/.next/standalone/.next/server/app/api/proposals/[uuid]/route_client-reference-manifest.js +1 -1
  241. package/.next/standalone/.next/server/app/api/references/[uuid]/route_client-reference-manifest.js +1 -1
  242. package/.next/standalone/.next/server/app/api/references/route_client-reference-manifest.js +1 -1
  243. package/.next/standalone/.next/server/app/api/search/route_client-reference-manifest.js +1 -1
  244. package/.next/standalone/.next/server/app/api/session/route_client-reference-manifest.js +1 -1
  245. package/.next/standalone/.next/server/app/api/sessions/[uuid]/route.js +1 -1
  246. package/.next/standalone/.next/server/app/api/sessions/[uuid]/route.js.nft.json +1 -1
  247. package/.next/standalone/.next/server/app/api/sessions/[uuid]/route_client-reference-manifest.js +1 -1
  248. package/.next/standalone/.next/server/app/api/tasks/[uuid]/claim/route.js +1 -1
  249. package/.next/standalone/.next/server/app/api/tasks/[uuid]/claim/route.js.nft.json +1 -1
  250. package/.next/standalone/.next/server/app/api/tasks/[uuid]/claim/route_client-reference-manifest.js +1 -1
  251. package/.next/standalone/.next/server/app/api/tasks/[uuid]/dependencies/[dependsOnUuid]/route.js +1 -1
  252. package/.next/standalone/.next/server/app/api/tasks/[uuid]/dependencies/[dependsOnUuid]/route.js.nft.json +1 -1
  253. package/.next/standalone/.next/server/app/api/tasks/[uuid]/dependencies/[dependsOnUuid]/route_client-reference-manifest.js +1 -1
  254. package/.next/standalone/.next/server/app/api/tasks/[uuid]/dependencies/route.js +1 -1
  255. package/.next/standalone/.next/server/app/api/tasks/[uuid]/dependencies/route.js.nft.json +1 -1
  256. package/.next/standalone/.next/server/app/api/tasks/[uuid]/dependencies/route_client-reference-manifest.js +1 -1
  257. package/.next/standalone/.next/server/app/api/tasks/[uuid]/release/route.js +1 -1
  258. package/.next/standalone/.next/server/app/api/tasks/[uuid]/release/route.js.nft.json +1 -1
  259. package/.next/standalone/.next/server/app/api/tasks/[uuid]/release/route_client-reference-manifest.js +1 -1
  260. package/.next/standalone/.next/server/app/api/tasks/[uuid]/route.js +1 -1
  261. package/.next/standalone/.next/server/app/api/tasks/[uuid]/route.js.nft.json +1 -1
  262. package/.next/standalone/.next/server/app/api/tasks/[uuid]/route_client-reference-manifest.js +1 -1
  263. package/.next/standalone/.next/server/app/api/tasks/[uuid]/sessions/route.js +1 -1
  264. package/.next/standalone/.next/server/app/api/tasks/[uuid]/sessions/route.js.nft.json +1 -1
  265. package/.next/standalone/.next/server/app/api/tasks/[uuid]/sessions/route_client-reference-manifest.js +1 -1
  266. package/.next/standalone/.next/server/app/index.html +2 -2
  267. package/.next/standalone/.next/server/app/index.rsc +2 -2
  268. package/.next/standalone/.next/server/app/login/admin/page_client-reference-manifest.js +1 -1
  269. package/.next/standalone/.next/server/app/login/admin.html +2 -2
  270. package/.next/standalone/.next/server/app/login/admin.rsc +2 -2
  271. package/.next/standalone/.next/server/app/login/callback/page_client-reference-manifest.js +1 -1
  272. package/.next/standalone/.next/server/app/login/callback.html +2 -2
  273. package/.next/standalone/.next/server/app/login/callback.rsc +2 -2
  274. package/.next/standalone/.next/server/app/login/page_client-reference-manifest.js +1 -1
  275. package/.next/standalone/.next/server/app/login/pick-workspace/page_client-reference-manifest.js +1 -1
  276. package/.next/standalone/.next/server/app/login/pick-workspace.html +2 -2
  277. package/.next/standalone/.next/server/app/login/pick-workspace.rsc +2 -2
  278. package/.next/standalone/.next/server/app/login.html +2 -2
  279. package/.next/standalone/.next/server/app/login.rsc +2 -2
  280. package/.next/standalone/.next/server/app/onboarding/page.js +1 -1
  281. package/.next/standalone/.next/server/app/onboarding/page.js.nft.json +1 -1
  282. package/.next/standalone/.next/server/app/onboarding/page_client-reference-manifest.js +1 -1
  283. package/.next/standalone/.next/server/app/onboarding.html +2 -2
  284. package/.next/standalone/.next/server/app/onboarding.rsc +3 -3
  285. package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
  286. package/.next/standalone/.next/server/app/projects.html +2 -2
  287. package/.next/standalone/.next/server/app/projects.rsc +4 -4
  288. package/.next/standalone/.next/server/app/settings.html +2 -2
  289. package/.next/standalone/.next/server/app/settings.rsc +4 -4
  290. package/.next/standalone/.next/server/app-paths-manifest.json +46 -41
  291. package/.next/standalone/.next/server/chunks/1114.js +1 -1
  292. package/.next/standalone/.next/server/chunks/1318.js +1 -1
  293. package/.next/standalone/.next/server/chunks/1524.js +1 -0
  294. package/.next/standalone/.next/server/chunks/1559.js +2 -2
  295. package/.next/standalone/.next/server/chunks/1722.js +1 -0
  296. package/.next/standalone/.next/server/chunks/{2789.js → 2547.js} +3 -3
  297. package/.next/standalone/.next/server/chunks/2572.js +2 -0
  298. package/.next/standalone/.next/server/chunks/2618.js +1 -1
  299. package/.next/standalone/.next/server/chunks/2961.js +1 -1
  300. package/.next/standalone/.next/server/chunks/330.js +1 -0
  301. package/.next/standalone/.next/server/chunks/3525.js +1 -0
  302. package/.next/standalone/.next/server/chunks/4827.js +1 -1
  303. package/.next/standalone/.next/server/chunks/5245.js +1 -1
  304. package/.next/standalone/.next/server/chunks/6113.js +1 -1
  305. package/.next/standalone/.next/server/chunks/6506.js +4 -4
  306. package/.next/standalone/.next/server/chunks/6515.js +2 -2
  307. package/.next/standalone/.next/server/chunks/7368.js +1 -1
  308. package/.next/standalone/.next/server/chunks/7530.js +1 -1
  309. package/.next/standalone/.next/server/chunks/8454.js +1 -1
  310. package/.next/standalone/.next/server/chunks/8540.js +1 -1
  311. package/.next/standalone/.next/server/chunks/920.js +1 -1
  312. package/.next/standalone/.next/server/chunks/9213.js +1 -1
  313. package/.next/standalone/.next/server/chunks/9378.js +1 -1
  314. package/.next/standalone/.next/server/middleware-build-manifest.js +1 -1
  315. package/.next/standalone/.next/server/middleware-manifest.json +1 -1
  316. package/.next/standalone/.next/server/pages/404.html +2 -2
  317. package/.next/standalone/.next/server/pages/500.html +1 -1
  318. package/.next/standalone/.next/server/server-reference-manifest.js +1 -1
  319. package/.next/standalone/.next/server/server-reference-manifest.json +1 -1
  320. package/.next/standalone/.next/static/chunks/11595.f1e55e827d67f2bc.js +1 -0
  321. package/.next/standalone/.next/static/chunks/18351-12dc856208d79e10.js +1 -0
  322. package/.next/standalone/.next/static/chunks/22987-8fd965ab4ff87546.js +1 -0
  323. package/.next/standalone/.next/static/chunks/{33456.c48dc366aa90b234.js → 33456.4817cdce41593c7e.js} +1 -1
  324. package/.next/standalone/.next/static/chunks/37938-0b9a2b891c04b166.js +1 -0
  325. package/.next/standalone/.next/static/chunks/4340-a33120fb742af57e.js +1 -0
  326. package/.next/standalone/.next/static/chunks/4860.bb2749ebaf8eb15f.js +1 -0
  327. package/.next/standalone/.next/static/chunks/53402-be6989c3f3968e7b.js +1 -0
  328. package/.next/standalone/.next/static/chunks/6698-1c55791b2d0820d5.js +1 -0
  329. package/.next/standalone/.next/static/chunks/68326-61feeb2f6cddd338.js +1 -0
  330. package/.next/standalone/.next/static/chunks/72974-714dcca796895c40.js +1 -0
  331. package/.next/standalone/.next/static/chunks/75137-c9e8422c9d4e1f52.js +1 -0
  332. package/.next/standalone/.next/static/chunks/7777-13466138aa42bd5f.js +1 -0
  333. package/.next/standalone/.next/static/chunks/78917-f91904c6c2d12dab.js +1 -0
  334. package/.next/standalone/.next/static/chunks/80748-e971c5a5d6ef967d.js +1 -0
  335. package/.next/standalone/.next/static/chunks/94426-39b6da238425f9b7.js +10 -0
  336. package/.next/standalone/.next/static/chunks/94470-0c74a933d5a2902f.js +1 -0
  337. package/.next/standalone/.next/static/chunks/94643-ba1ebff5769d2b50.js +1 -0
  338. package/.next/standalone/.next/static/chunks/99373.ae03246bdf49c700.js +1 -0
  339. package/.next/standalone/.next/static/chunks/app/(dashboard)/layout-177a3fa88be94b4a.js +1 -0
  340. package/.next/standalone/.next/static/chunks/app/(dashboard)/project-groups/[uuid]/page-7462c5eb92130796.js +1 -0
  341. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/dashboard/[ideaUuid]/page-559ec0f534a12956.js +1 -0
  342. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/dashboard/page-03b8510273520572.js +1 -0
  343. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/documents/[documentUuid]/{page-d6c226fd56b5ebb5.js → page-4a8ac49308a4e23b.js} +1 -1
  344. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/graph/page-03408be00dc4822b.js +1 -0
  345. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/proposals/[proposalUuid]/page-be353989e67e7b55.js +1 -0
  346. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/tasks/[taskUuid]/{page-ebf4c28014025b7b.js → page-c70af8cac7bdc483.js} +1 -1
  347. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/tasks/{page-bbde7e85e3388813.js → page-715b000c156a080c.js} +1 -1
  348. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/{page-6df01fa989cca27b.js → page-7a5ef281f6819ed4.js} +1 -1
  349. package/.next/standalone/.next/static/chunks/app/(dashboard)/settings/page-e786a59c24eb5bda.js +1 -0
  350. package/.next/standalone/.next/static/chunks/app/api/admin/companies/[uuid]/route-559ec0f534a12956.js +1 -0
  351. package/.next/standalone/.next/static/chunks/app/api/admin/companies/route-559ec0f534a12956.js +1 -0
  352. package/.next/standalone/.next/static/chunks/app/api/admin/login/route-559ec0f534a12956.js +1 -0
  353. package/.next/standalone/.next/static/chunks/app/api/admin/session/route-559ec0f534a12956.js +1 -0
  354. package/.next/standalone/.next/static/chunks/app/api/agent-connections/route-559ec0f534a12956.js +1 -0
  355. package/.next/standalone/.next/static/chunks/app/api/agents/[uuid]/route-559ec0f534a12956.js +1 -0
  356. package/.next/standalone/.next/static/chunks/app/api/agents/[uuid]/sessions/route-559ec0f534a12956.js +1 -0
  357. package/.next/standalone/.next/static/chunks/app/api/agents/route-559ec0f534a12956.js +1 -0
  358. package/.next/standalone/.next/static/chunks/app/api/api-keys/[uuid]/route-559ec0f534a12956.js +1 -0
  359. package/.next/standalone/.next/static/chunks/app/api/api-keys/route-559ec0f534a12956.js +1 -0
  360. package/.next/standalone/.next/static/chunks/app/api/auth/callback/route-559ec0f534a12956.js +1 -0
  361. package/.next/standalone/.next/static/chunks/app/api/auth/check-default/route-559ec0f534a12956.js +1 -0
  362. package/.next/standalone/.next/static/chunks/app/api/auth/company-oidc/route-559ec0f534a12956.js +1 -0
  363. package/.next/standalone/.next/static/chunks/app/api/auth/default-login/route-559ec0f534a12956.js +1 -0
  364. package/.next/standalone/.next/static/chunks/app/api/auth/identify/route-559ec0f534a12956.js +1 -0
  365. package/.next/standalone/.next/static/chunks/app/api/auth/logout/route-559ec0f534a12956.js +1 -0
  366. package/.next/standalone/.next/static/chunks/app/api/auth/me/route-559ec0f534a12956.js +1 -0
  367. package/.next/standalone/.next/static/chunks/app/api/auth/sync-token/route-559ec0f534a12956.js +1 -0
  368. package/.next/standalone/.next/static/chunks/app/api/comments/route-559ec0f534a12956.js +1 -0
  369. package/.next/standalone/.next/static/chunks/app/api/daemon/connection-heartbeat/route-559ec0f534a12956.js +1 -0
  370. package/.next/standalone/.next/static/chunks/app/api/daemon/control/route-559ec0f534a12956.js +1 -0
  371. package/.next/standalone/.next/static/chunks/app/api/daemon/directory-request/report/route-559ec0f534a12956.js +1 -0
  372. package/.next/standalone/.next/static/chunks/app/api/daemon/execution-state/route-559ec0f534a12956.js +1 -0
  373. package/.next/standalone/.next/static/chunks/app/api/daemon/executions/route-559ec0f534a12956.js +1 -0
  374. package/.next/standalone/.next/static/chunks/app/api/daemon/pending-turns/route-559ec0f534a12956.js +1 -0
  375. package/.next/standalone/.next/static/chunks/app/api/daemon/report-interrupt/route-559ec0f534a12956.js +1 -0
  376. package/.next/standalone/.next/static/chunks/app/api/daemon/resume/route-559ec0f534a12956.js +1 -0
  377. package/.next/standalone/.next/static/chunks/app/api/daemon/transcript/route-559ec0f534a12956.js +1 -0
  378. package/.next/standalone/.next/static/chunks/app/api/daemon/turn-advance/route-559ec0f534a12956.js +1 -0
  379. package/.next/standalone/.next/static/chunks/app/api/daemon-directory-requests/[uuid]/route-559ec0f534a12956.js +1 -0
  380. package/.next/standalone/.next/static/chunks/app/api/daemon-directory-requests/route-559ec0f534a12956.js +1 -0
  381. package/.next/standalone/.next/static/chunks/app/api/daemon-sessions/[sessionUuid]/instruction/route-559ec0f534a12956.js +1 -0
  382. package/.next/standalone/.next/static/chunks/app/api/daemon-sessions/[sessionUuid]/repoint/route-559ec0f534a12956.js +1 -0
  383. package/.next/standalone/.next/static/chunks/app/api/daemon-sessions/[sessionUuid]/route-559ec0f534a12956.js +1 -0
  384. package/.next/standalone/.next/static/chunks/app/api/daemon-sessions/ad-hoc/route-559ec0f534a12956.js +1 -0
  385. package/.next/standalone/.next/static/chunks/app/api/daemon-sessions/route-559ec0f534a12956.js +1 -0
  386. package/.next/standalone/.next/static/chunks/app/api/documents/[uuid]/route-559ec0f534a12956.js +1 -0
  387. package/.next/standalone/.next/static/chunks/app/api/entities/[type]/[uuid]/root-idea/route-559ec0f534a12956.js +1 -0
  388. package/.next/standalone/.next/static/chunks/app/api/events/notifications/route-559ec0f534a12956.js +1 -0
  389. package/.next/standalone/.next/static/chunks/app/api/events/route-559ec0f534a12956.js +1 -0
  390. package/.next/standalone/.next/static/chunks/app/api/health/route-559ec0f534a12956.js +1 -0
  391. package/.next/standalone/.next/static/chunks/app/api/ideas/[uuid]/claim/route-559ec0f534a12956.js +1 -0
  392. package/.next/standalone/.next/static/chunks/app/api/ideas/[uuid]/move/preview/route-559ec0f534a12956.js +1 -0
  393. package/.next/standalone/.next/static/chunks/app/api/ideas/[uuid]/move/route-559ec0f534a12956.js +1 -0
  394. package/.next/standalone/.next/static/chunks/app/api/ideas/[uuid]/parent/route-559ec0f534a12956.js +1 -0
  395. package/.next/standalone/.next/static/chunks/app/api/ideas/[uuid]/release/route-559ec0f534a12956.js +1 -0
  396. package/.next/standalone/.next/static/chunks/app/api/ideas/[uuid]/route-559ec0f534a12956.js +1 -0
  397. package/.next/standalone/.next/static/chunks/app/api/ideas/[uuid]/wake-preview/route-559ec0f534a12956.js +1 -0
  398. package/.next/standalone/.next/static/chunks/app/api/ideas/conversational/route-559ec0f534a12956.js +1 -0
  399. package/.next/standalone/.next/static/chunks/app/api/mcp/route-559ec0f534a12956.js +1 -0
  400. package/.next/standalone/.next/static/chunks/app/api/me/assignments/route-559ec0f534a12956.js +1 -0
  401. package/.next/standalone/.next/static/chunks/app/api/mentionables/route-559ec0f534a12956.js +1 -0
  402. package/.next/standalone/.next/static/chunks/app/api/notifications/[uuid]/archive/route-559ec0f534a12956.js +1 -0
  403. package/.next/standalone/.next/static/chunks/app/api/notifications/[uuid]/read/route-559ec0f534a12956.js +1 -0
  404. package/.next/standalone/.next/static/chunks/app/api/notifications/preferences/route-559ec0f534a12956.js +1 -0
  405. package/.next/standalone/.next/static/chunks/app/api/notifications/read-all/route-559ec0f534a12956.js +1 -0
  406. package/.next/standalone/.next/static/chunks/app/api/notifications/route-559ec0f534a12956.js +1 -0
  407. package/.next/standalone/.next/static/chunks/app/api/notifications/unread-count/route-559ec0f534a12956.js +1 -0
  408. package/.next/standalone/.next/static/chunks/app/api/project-groups/[uuid]/dashboard/route-559ec0f534a12956.js +1 -0
  409. package/.next/standalone/.next/static/chunks/app/api/project-groups/[uuid]/route-559ec0f534a12956.js +1 -0
  410. package/.next/standalone/.next/static/chunks/app/api/project-groups/route-559ec0f534a12956.js +1 -0
  411. package/.next/standalone/.next/static/chunks/app/api/project-visits/pin/route-559ec0f534a12956.js +1 -0
  412. package/.next/standalone/.next/static/chunks/app/api/project-visits/route-559ec0f534a12956.js +1 -0
  413. package/.next/standalone/.next/static/chunks/app/api/project-visits/visit/route-559ec0f534a12956.js +1 -0
  414. package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/activity/route-559ec0f534a12956.js +1 -0
  415. package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/agent-cwds/route-559ec0f534a12956.js +1 -0
  416. package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/available/route-559ec0f534a12956.js +1 -0
  417. package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/documents/route-559ec0f534a12956.js +1 -0
  418. package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/group/route-559ec0f534a12956.js +1 -0
  419. package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/ideas/route-559ec0f534a12956.js +1 -0
  420. package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/ideas/tracker/route-559ec0f534a12956.js +1 -0
  421. package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/proposals/[proposalUuid]/validate/route-559ec0f534a12956.js +1 -0
  422. package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/proposals/route-559ec0f534a12956.js +1 -0
  423. package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/proposals/summary/route-559ec0f534a12956.js +1 -0
  424. package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/resource-graph/route-559ec0f534a12956.js +1 -0
  425. package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/route-559ec0f534a12956.js +1 -0
  426. package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/stats/route-559ec0f534a12956.js +1 -0
  427. package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/tasks/dependencies/route-559ec0f534a12956.js +1 -0
  428. package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/tasks/route-559ec0f534a12956.js +1 -0
  429. package/.next/standalone/.next/static/chunks/app/api/projects/agent-cwd-options/route-559ec0f534a12956.js +1 -0
  430. package/.next/standalone/.next/static/chunks/app/api/projects/route-559ec0f534a12956.js +1 -0
  431. package/.next/standalone/.next/static/chunks/app/api/proposals/[uuid]/approve/route-559ec0f534a12956.js +1 -0
  432. package/.next/standalone/.next/static/chunks/app/api/proposals/[uuid]/close/route-559ec0f534a12956.js +1 -0
  433. package/.next/standalone/.next/static/chunks/app/api/proposals/[uuid]/reject/route-559ec0f534a12956.js +1 -0
  434. package/.next/standalone/.next/static/chunks/app/api/proposals/[uuid]/revoke/route-559ec0f534a12956.js +1 -0
  435. package/.next/standalone/.next/static/chunks/app/api/proposals/[uuid]/route-559ec0f534a12956.js +1 -0
  436. package/.next/standalone/.next/static/chunks/app/api/references/[uuid]/route-559ec0f534a12956.js +1 -0
  437. package/.next/standalone/.next/static/chunks/app/api/references/route-559ec0f534a12956.js +1 -0
  438. package/.next/standalone/.next/static/chunks/app/api/search/route-559ec0f534a12956.js +1 -0
  439. package/.next/standalone/.next/static/chunks/app/api/session/route-559ec0f534a12956.js +1 -0
  440. package/.next/standalone/.next/static/chunks/app/api/sessions/[uuid]/route-559ec0f534a12956.js +1 -0
  441. package/.next/standalone/.next/static/chunks/app/api/tasks/[uuid]/claim/route-559ec0f534a12956.js +1 -0
  442. package/.next/standalone/.next/static/chunks/app/api/tasks/[uuid]/dependencies/[dependsOnUuid]/route-559ec0f534a12956.js +1 -0
  443. package/.next/standalone/.next/static/chunks/app/api/tasks/[uuid]/dependencies/route-559ec0f534a12956.js +1 -0
  444. package/.next/standalone/.next/static/chunks/app/api/tasks/[uuid]/release/route-559ec0f534a12956.js +1 -0
  445. package/.next/standalone/.next/static/chunks/app/api/tasks/[uuid]/route-559ec0f534a12956.js +1 -0
  446. package/.next/standalone/.next/static/chunks/app/api/tasks/[uuid]/sessions/route-559ec0f534a12956.js +1 -0
  447. package/.next/standalone/.next/static/chunks/app/onboarding/page-df7c97cefb508201.js +1 -0
  448. package/.next/standalone/.next/static/chunks/{webpack-af2cb28ef7bbd7c2.js → webpack-84e2db1b2418c974.js} +1 -1
  449. package/.next/standalone/.next/static/css/ef995b001437e3ef.css +1 -0
  450. package/.next/standalone/.next/static/oHZy43Le4b2I7pg7_cQ0Z/_buildManifest.js +1 -0
  451. package/.next/standalone/package.json +1 -1
  452. package/.next/standalone/public/chorus-plugin/.claude-plugin/plugin.json +1 -1
  453. package/.next/standalone/public/chorus-plugin/skills/brainstorm/SKILL.md +1 -1
  454. package/.next/standalone/public/chorus-plugin/skills/chorus/SKILL.md +1 -1
  455. package/.next/standalone/public/chorus-plugin/skills/develop/SKILL.md +1 -1
  456. package/.next/standalone/public/chorus-plugin/skills/idea/SKILL.md +1 -1
  457. package/.next/standalone/public/chorus-plugin/skills/openspec-aware/SKILL.md +1 -1
  458. package/.next/standalone/public/chorus-plugin/skills/proposal/SKILL.md +1 -1
  459. package/.next/standalone/public/chorus-plugin/skills/quick-dev/SKILL.md +1 -1
  460. package/.next/standalone/public/chorus-plugin/skills/review/SKILL.md +1 -1
  461. package/.next/standalone/public/chorus-plugin/skills/yolo/SKILL.md +1 -1
  462. package/.next/standalone/public/kiro-plugin/.kiro/skills/chorus-brainstorm/SKILL.md +1 -1
  463. package/.next/standalone/public/kiro-plugin/.kiro/skills/chorus-develop/SKILL.md +1 -1
  464. package/.next/standalone/public/kiro-plugin/.kiro/skills/chorus-idea/SKILL.md +1 -1
  465. package/.next/standalone/public/kiro-plugin/.kiro/skills/chorus-openspec-aware/SKILL.md +1 -1
  466. package/.next/standalone/public/kiro-plugin/.kiro/skills/chorus-proposal/SKILL.md +1 -1
  467. package/.next/standalone/public/kiro-plugin/.kiro/skills/chorus-quick-dev/SKILL.md +1 -1
  468. package/.next/standalone/public/kiro-plugin/.kiro/skills/chorus-review/SKILL.md +1 -1
  469. package/.next/standalone/public/kiro-plugin/.kiro/skills/chorus-yolo/SKILL.md +1 -1
  470. package/.next/standalone/public/kiro-plugin/bin/chorus-api.sh +1 -1
  471. package/README.ja.md +2 -0
  472. package/README.ko.md +2 -0
  473. package/README.md +3 -0
  474. package/README.zh.md +2 -0
  475. package/cli/client-args.mjs +8 -0
  476. package/cli/codex-spawner.mjs +5 -5
  477. package/cli/control-handler.mjs +31 -2
  478. package/cli/daemon-config.mjs +35 -0
  479. package/cli/daemon-install-config.mjs +26 -0
  480. package/cli/daemon-rest-client.mjs +27 -2
  481. package/cli/daemon.mjs +110 -20
  482. package/cli/directory-discovery.mjs +184 -0
  483. package/cli/event-router.mjs +12 -4
  484. package/cli/turn-reporter.mjs +11 -3
  485. package/cli/waker.mjs +35 -8
  486. package/package.json +1 -1
  487. package/prisma/migrations/20260731093000_add_daemon_backend_session_id/migration.sql +1 -0
  488. package/prisma/migrations/20260801113000_add_project_agent_cwd_discovery/migration.sql +50 -0
  489. package/prisma/migrations/20260802140000_add_assignment_runtime_cwd_snapshot/migration.sql +7 -0
  490. package/prisma/schema.prisma +134 -60
  491. package/.next/standalone/.next/server/chunks/2004.js +0 -1
  492. package/.next/standalone/.next/server/chunks/2112.js +0 -1
  493. package/.next/standalone/.next/server/chunks/3219.js +0 -2
  494. package/.next/standalone/.next/static/chunks/11595.c580c5690d176cce.js +0 -1
  495. package/.next/standalone/.next/static/chunks/14160-7bcee6e9e8bc5233.js +0 -1
  496. package/.next/standalone/.next/static/chunks/15653-31c406c41bf58048.js +0 -1
  497. package/.next/standalone/.next/static/chunks/18351-2a408c4f57ddb3a7.js +0 -1
  498. package/.next/standalone/.next/static/chunks/24870-5b0be64361f5ef70.js +0 -1
  499. package/.next/standalone/.next/static/chunks/26232-110019cebde19691.js +0 -1
  500. package/.next/standalone/.next/static/chunks/33806-cb339e86820a87c4.js +0 -1
  501. package/.next/standalone/.next/static/chunks/37035-514bbb31cd13bda1.js +0 -1
  502. package/.next/standalone/.next/static/chunks/37938-c09acf52d7f85cb4.js +0 -1
  503. package/.next/standalone/.next/static/chunks/39479-5af3460208d8cc56.js +0 -1
  504. package/.next/standalone/.next/static/chunks/4860.baf6a285246198af.js +0 -1
  505. package/.next/standalone/.next/static/chunks/60178-d6276df1c07d7735.js +0 -10
  506. package/.next/standalone/.next/static/chunks/68326-924445654ed47e6f.js +0 -1
  507. package/.next/standalone/.next/static/chunks/78917-1498676a1ffe5ded.js +0 -1
  508. package/.next/standalone/.next/static/chunks/94470-1076452151689267.js +0 -1
  509. package/.next/standalone/.next/static/chunks/94643-7c7f2efab0640658.js +0 -1
  510. package/.next/standalone/.next/static/chunks/99373.ad871bd0bbfc5eb7.js +0 -1
  511. package/.next/standalone/.next/static/chunks/app/(dashboard)/layout-78259279cf6c6919.js +0 -1
  512. package/.next/standalone/.next/static/chunks/app/(dashboard)/project-groups/[uuid]/page-2af5f2f159c8e32b.js +0 -1
  513. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/dashboard/[ideaUuid]/page-8cf720e8efb6ac7d.js +0 -1
  514. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/dashboard/page-59dcf0ba7ce877ec.js +0 -1
  515. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/graph/page-af35d50848f01875.js +0 -1
  516. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/proposals/[proposalUuid]/page-cb6fdf592863833c.js +0 -1
  517. package/.next/standalone/.next/static/chunks/app/(dashboard)/settings/page-e60bc39bf2957f77.js +0 -1
  518. package/.next/standalone/.next/static/chunks/app/api/admin/companies/[uuid]/route-8cf720e8efb6ac7d.js +0 -1
  519. package/.next/standalone/.next/static/chunks/app/api/admin/companies/route-8cf720e8efb6ac7d.js +0 -1
  520. package/.next/standalone/.next/static/chunks/app/api/admin/login/route-8cf720e8efb6ac7d.js +0 -1
  521. package/.next/standalone/.next/static/chunks/app/api/admin/session/route-8cf720e8efb6ac7d.js +0 -1
  522. package/.next/standalone/.next/static/chunks/app/api/agent-connections/route-8cf720e8efb6ac7d.js +0 -1
  523. package/.next/standalone/.next/static/chunks/app/api/agents/[uuid]/route-8cf720e8efb6ac7d.js +0 -1
  524. package/.next/standalone/.next/static/chunks/app/api/agents/[uuid]/sessions/route-8cf720e8efb6ac7d.js +0 -1
  525. package/.next/standalone/.next/static/chunks/app/api/agents/route-8cf720e8efb6ac7d.js +0 -1
  526. package/.next/standalone/.next/static/chunks/app/api/api-keys/[uuid]/route-8cf720e8efb6ac7d.js +0 -1
  527. package/.next/standalone/.next/static/chunks/app/api/api-keys/route-8cf720e8efb6ac7d.js +0 -1
  528. package/.next/standalone/.next/static/chunks/app/api/auth/callback/route-8cf720e8efb6ac7d.js +0 -1
  529. package/.next/standalone/.next/static/chunks/app/api/auth/check-default/route-8cf720e8efb6ac7d.js +0 -1
  530. package/.next/standalone/.next/static/chunks/app/api/auth/company-oidc/route-8cf720e8efb6ac7d.js +0 -1
  531. package/.next/standalone/.next/static/chunks/app/api/auth/default-login/route-8cf720e8efb6ac7d.js +0 -1
  532. package/.next/standalone/.next/static/chunks/app/api/auth/identify/route-8cf720e8efb6ac7d.js +0 -1
  533. package/.next/standalone/.next/static/chunks/app/api/auth/logout/route-8cf720e8efb6ac7d.js +0 -1
  534. package/.next/standalone/.next/static/chunks/app/api/auth/me/route-8cf720e8efb6ac7d.js +0 -1
  535. package/.next/standalone/.next/static/chunks/app/api/auth/sync-token/route-8cf720e8efb6ac7d.js +0 -1
  536. package/.next/standalone/.next/static/chunks/app/api/comments/route-8cf720e8efb6ac7d.js +0 -1
  537. package/.next/standalone/.next/static/chunks/app/api/daemon/connection-heartbeat/route-8cf720e8efb6ac7d.js +0 -1
  538. package/.next/standalone/.next/static/chunks/app/api/daemon/control/route-8cf720e8efb6ac7d.js +0 -1
  539. package/.next/standalone/.next/static/chunks/app/api/daemon/execution-state/route-8cf720e8efb6ac7d.js +0 -1
  540. package/.next/standalone/.next/static/chunks/app/api/daemon/executions/route-8cf720e8efb6ac7d.js +0 -1
  541. package/.next/standalone/.next/static/chunks/app/api/daemon/pending-turns/route-8cf720e8efb6ac7d.js +0 -1
  542. package/.next/standalone/.next/static/chunks/app/api/daemon/report-interrupt/route-8cf720e8efb6ac7d.js +0 -1
  543. package/.next/standalone/.next/static/chunks/app/api/daemon/resume/route-8cf720e8efb6ac7d.js +0 -1
  544. package/.next/standalone/.next/static/chunks/app/api/daemon/transcript/route-8cf720e8efb6ac7d.js +0 -1
  545. package/.next/standalone/.next/static/chunks/app/api/daemon/turn-advance/route-8cf720e8efb6ac7d.js +0 -1
  546. package/.next/standalone/.next/static/chunks/app/api/daemon-sessions/[sessionUuid]/instruction/route-8cf720e8efb6ac7d.js +0 -1
  547. package/.next/standalone/.next/static/chunks/app/api/daemon-sessions/[sessionUuid]/repoint/route-8cf720e8efb6ac7d.js +0 -1
  548. package/.next/standalone/.next/static/chunks/app/api/daemon-sessions/[sessionUuid]/route-8cf720e8efb6ac7d.js +0 -1
  549. package/.next/standalone/.next/static/chunks/app/api/daemon-sessions/ad-hoc/route-8cf720e8efb6ac7d.js +0 -1
  550. package/.next/standalone/.next/static/chunks/app/api/daemon-sessions/route-8cf720e8efb6ac7d.js +0 -1
  551. package/.next/standalone/.next/static/chunks/app/api/documents/[uuid]/route-8cf720e8efb6ac7d.js +0 -1
  552. package/.next/standalone/.next/static/chunks/app/api/entities/[type]/[uuid]/root-idea/route-8cf720e8efb6ac7d.js +0 -1
  553. package/.next/standalone/.next/static/chunks/app/api/events/notifications/route-8cf720e8efb6ac7d.js +0 -1
  554. package/.next/standalone/.next/static/chunks/app/api/events/route-8cf720e8efb6ac7d.js +0 -1
  555. package/.next/standalone/.next/static/chunks/app/api/health/route-8cf720e8efb6ac7d.js +0 -1
  556. package/.next/standalone/.next/static/chunks/app/api/ideas/[uuid]/claim/route-8cf720e8efb6ac7d.js +0 -1
  557. package/.next/standalone/.next/static/chunks/app/api/ideas/[uuid]/move/preview/route-8cf720e8efb6ac7d.js +0 -1
  558. package/.next/standalone/.next/static/chunks/app/api/ideas/[uuid]/move/route-8cf720e8efb6ac7d.js +0 -1
  559. package/.next/standalone/.next/static/chunks/app/api/ideas/[uuid]/parent/route-8cf720e8efb6ac7d.js +0 -1
  560. package/.next/standalone/.next/static/chunks/app/api/ideas/[uuid]/release/route-8cf720e8efb6ac7d.js +0 -1
  561. package/.next/standalone/.next/static/chunks/app/api/ideas/[uuid]/route-8cf720e8efb6ac7d.js +0 -1
  562. package/.next/standalone/.next/static/chunks/app/api/ideas/[uuid]/wake-preview/route-8cf720e8efb6ac7d.js +0 -1
  563. package/.next/standalone/.next/static/chunks/app/api/ideas/conversational/route-8cf720e8efb6ac7d.js +0 -1
  564. package/.next/standalone/.next/static/chunks/app/api/mcp/route-8cf720e8efb6ac7d.js +0 -1
  565. package/.next/standalone/.next/static/chunks/app/api/me/assignments/route-8cf720e8efb6ac7d.js +0 -1
  566. package/.next/standalone/.next/static/chunks/app/api/mentionables/route-8cf720e8efb6ac7d.js +0 -1
  567. package/.next/standalone/.next/static/chunks/app/api/notifications/[uuid]/archive/route-8cf720e8efb6ac7d.js +0 -1
  568. package/.next/standalone/.next/static/chunks/app/api/notifications/[uuid]/read/route-8cf720e8efb6ac7d.js +0 -1
  569. package/.next/standalone/.next/static/chunks/app/api/notifications/preferences/route-8cf720e8efb6ac7d.js +0 -1
  570. package/.next/standalone/.next/static/chunks/app/api/notifications/read-all/route-8cf720e8efb6ac7d.js +0 -1
  571. package/.next/standalone/.next/static/chunks/app/api/notifications/route-8cf720e8efb6ac7d.js +0 -1
  572. package/.next/standalone/.next/static/chunks/app/api/notifications/unread-count/route-8cf720e8efb6ac7d.js +0 -1
  573. package/.next/standalone/.next/static/chunks/app/api/project-groups/[uuid]/dashboard/route-8cf720e8efb6ac7d.js +0 -1
  574. package/.next/standalone/.next/static/chunks/app/api/project-groups/[uuid]/route-8cf720e8efb6ac7d.js +0 -1
  575. package/.next/standalone/.next/static/chunks/app/api/project-groups/route-8cf720e8efb6ac7d.js +0 -1
  576. package/.next/standalone/.next/static/chunks/app/api/project-visits/pin/route-8cf720e8efb6ac7d.js +0 -1
  577. package/.next/standalone/.next/static/chunks/app/api/project-visits/route-8cf720e8efb6ac7d.js +0 -1
  578. package/.next/standalone/.next/static/chunks/app/api/project-visits/visit/route-8cf720e8efb6ac7d.js +0 -1
  579. package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/activity/route-8cf720e8efb6ac7d.js +0 -1
  580. package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/available/route-8cf720e8efb6ac7d.js +0 -1
  581. package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/documents/route-8cf720e8efb6ac7d.js +0 -1
  582. package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/group/route-8cf720e8efb6ac7d.js +0 -1
  583. package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/ideas/route-8cf720e8efb6ac7d.js +0 -1
  584. package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/ideas/tracker/route-8cf720e8efb6ac7d.js +0 -1
  585. package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/proposals/[proposalUuid]/validate/route-8cf720e8efb6ac7d.js +0 -1
  586. package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/proposals/route-8cf720e8efb6ac7d.js +0 -1
  587. package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/proposals/summary/route-8cf720e8efb6ac7d.js +0 -1
  588. package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/resource-graph/route-8cf720e8efb6ac7d.js +0 -1
  589. package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/route-8cf720e8efb6ac7d.js +0 -1
  590. package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/stats/route-8cf720e8efb6ac7d.js +0 -1
  591. package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/tasks/dependencies/route-8cf720e8efb6ac7d.js +0 -1
  592. package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/tasks/route-8cf720e8efb6ac7d.js +0 -1
  593. package/.next/standalone/.next/static/chunks/app/api/projects/route-8cf720e8efb6ac7d.js +0 -1
  594. package/.next/standalone/.next/static/chunks/app/api/proposals/[uuid]/approve/route-8cf720e8efb6ac7d.js +0 -1
  595. package/.next/standalone/.next/static/chunks/app/api/proposals/[uuid]/close/route-8cf720e8efb6ac7d.js +0 -1
  596. package/.next/standalone/.next/static/chunks/app/api/proposals/[uuid]/reject/route-8cf720e8efb6ac7d.js +0 -1
  597. package/.next/standalone/.next/static/chunks/app/api/proposals/[uuid]/revoke/route-8cf720e8efb6ac7d.js +0 -1
  598. package/.next/standalone/.next/static/chunks/app/api/proposals/[uuid]/route-8cf720e8efb6ac7d.js +0 -1
  599. package/.next/standalone/.next/static/chunks/app/api/references/[uuid]/route-8cf720e8efb6ac7d.js +0 -1
  600. package/.next/standalone/.next/static/chunks/app/api/references/route-8cf720e8efb6ac7d.js +0 -1
  601. package/.next/standalone/.next/static/chunks/app/api/search/route-8cf720e8efb6ac7d.js +0 -1
  602. package/.next/standalone/.next/static/chunks/app/api/session/route-8cf720e8efb6ac7d.js +0 -1
  603. package/.next/standalone/.next/static/chunks/app/api/sessions/[uuid]/route-8cf720e8efb6ac7d.js +0 -1
  604. package/.next/standalone/.next/static/chunks/app/api/tasks/[uuid]/claim/route-8cf720e8efb6ac7d.js +0 -1
  605. package/.next/standalone/.next/static/chunks/app/api/tasks/[uuid]/dependencies/[dependsOnUuid]/route-8cf720e8efb6ac7d.js +0 -1
  606. package/.next/standalone/.next/static/chunks/app/api/tasks/[uuid]/dependencies/route-8cf720e8efb6ac7d.js +0 -1
  607. package/.next/standalone/.next/static/chunks/app/api/tasks/[uuid]/release/route-8cf720e8efb6ac7d.js +0 -1
  608. package/.next/standalone/.next/static/chunks/app/api/tasks/[uuid]/route-8cf720e8efb6ac7d.js +0 -1
  609. package/.next/standalone/.next/static/chunks/app/api/tasks/[uuid]/sessions/route-8cf720e8efb6ac7d.js +0 -1
  610. package/.next/standalone/.next/static/chunks/app/onboarding/page-006bf9e9d6a991f1.js +0 -1
  611. package/.next/standalone/.next/static/css/f46eab37c942ff33.css +0 -1
  612. package/.next/standalone/.next/static/t-ZaS6bNyv62NUlewVISp/_buildManifest.js +0 -1
  613. /package/.next/standalone/.next/static/{t-ZaS6bNyv62NUlewVISp → oHZy43Le4b2I7pg7_cQ0Z}/_ssgManifest.js +0 -0
@@ -24,20 +24,22 @@ model Company {
24
24
  createdAt DateTime @default(now())
25
25
  updatedAt DateTime @updatedAt
26
26
 
27
- users User[]
28
- agents Agent[]
29
- apiKeys ApiKey[]
30
- projects Project[]
31
- ideas Idea[]
32
- documents Document[]
33
- tasks Task[]
34
- proposals Proposal[]
35
- activities Activity[]
36
- comments Comment[]
37
- sessions AgentSession[]
38
- daemonConnections DaemonConnection[]
39
- agentInstances AgentInstance[]
40
- referenceArtifacts ReferenceArtifact[]
27
+ users User[]
28
+ agents Agent[]
29
+ apiKeys ApiKey[]
30
+ projects Project[]
31
+ ideas Idea[]
32
+ documents Document[]
33
+ tasks Task[]
34
+ proposals Proposal[]
35
+ activities Activity[]
36
+ comments Comment[]
37
+ sessions AgentSession[]
38
+ daemonConnections DaemonConnection[]
39
+ agentInstances AgentInstance[]
40
+ referenceArtifacts ReferenceArtifact[]
41
+ projectAgentCwdPreferences ProjectAgentCwdPreference[]
42
+ daemonDirectoryRequests DaemonDirectoryRequest[]
41
43
  }
42
44
 
43
45
  // User (human, OIDC login)
@@ -52,7 +54,9 @@ model User {
52
54
  avatarUrl String?
53
55
  createdAt DateTime @default(now())
54
56
 
55
- ownedAgents Agent[]
57
+ ownedAgents Agent[]
58
+ projectAgentCwdPreferences ProjectAgentCwdPreference[]
59
+ daemonDirectoryRequests DaemonDirectoryRequest[]
56
60
 
57
61
  @@unique([companyUuid, oidcSub])
58
62
  @@index([companyUuid])
@@ -75,12 +79,14 @@ model Agent {
75
79
  lastActiveAt DateTime?
76
80
  createdAt DateTime @default(now())
77
81
 
78
- apiKeys ApiKey[]
79
- sessions AgentSession[]
80
- daemonConnections DaemonConnection[]
81
- daemonExecutions DaemonExecution[]
82
- daemonSessions DaemonSession[]
83
- agentInstances AgentInstance[]
82
+ apiKeys ApiKey[]
83
+ sessions AgentSession[]
84
+ daemonConnections DaemonConnection[]
85
+ daemonExecutions DaemonExecution[]
86
+ daemonSessions DaemonSession[]
87
+ agentInstances AgentInstance[]
88
+ projectAgentCwdPreferences ProjectAgentCwdPreference[]
89
+ daemonDirectoryRequests DaemonDirectoryRequest[]
84
90
 
85
91
  @@index([companyUuid])
86
92
  @@index([ownerUuid])
@@ -110,7 +116,8 @@ model AgentInstance {
110
116
 
111
117
  // Connections that have served this instance (current + historical). Liveness is
112
118
  // derived from these, never duplicated onto the instance row.
113
- connections DaemonConnection[]
119
+ connections DaemonConnection[]
120
+ cwdPreferences ProjectAgentCwdPreference[]
114
121
 
115
122
  @@unique([companyUuid, agentUuid, host, cwd])
116
123
  @@index([companyUuid])
@@ -162,11 +169,12 @@ model Project {
162
169
  createdAt DateTime @default(now())
163
170
  updatedAt DateTime @updatedAt
164
171
 
165
- ideas Idea[]
166
- documents Document[]
167
- tasks Task[]
168
- proposals Proposal[]
169
- activities Activity[]
172
+ ideas Idea[]
173
+ documents Document[]
174
+ tasks Task[]
175
+ proposals Proposal[]
176
+ activities Activity[]
177
+ agentCwdPreferences ProjectAgentCwdPreference[]
170
178
 
171
179
  @@index([companyUuid])
172
180
  @@index([groupUuid])
@@ -187,6 +195,9 @@ model Idea {
187
195
  status String @default("open") // open | elaborating | elaborated (3-state model; post-elaboration status derived from Proposal+Task)
188
196
  assigneeType String? // user | agent
189
197
  assigneeUuid String? // User or Agent UUID (polymorphic)
198
+ cwdSource String? // project_fixed when this anchor originated from a fixed preference
199
+ cwdHost String? // Host anchor for a discovered runtime cwd assignment
200
+ runtimeCwd String? // Runtime cwd executed through any online connection on cwdHost
190
201
  assignedAt DateTime? // Assignment timestamp
191
202
  assignedByUuid String? // User UUID (human assignment)
192
203
  // Elaboration (AI-DLC Stage 3 — structured requirements clarification)
@@ -254,6 +265,9 @@ model Task {
254
265
  // root idea's instance (notification-turn.ts resolvePinnedTarget).
255
266
  assigneeType String? // user | agent | agent_instance
256
267
  assigneeUuid String? // User / Agent / AgentInstance UUID (polymorphic)
268
+ cwdSource String? // project_fixed when this anchor originated from a fixed preference
269
+ cwdHost String? // Host anchor for a discovered runtime cwd assignment
270
+ runtimeCwd String? // Runtime cwd executed through any online connection on cwdHost
257
271
  assignedAt DateTime? // Assignment timestamp
258
272
  assignedByUuid String? // User UUID (human assignment)
259
273
  proposalUuid String? // Source Proposal UUID (traceable, optional)
@@ -517,6 +531,61 @@ model DaemonConnection {
517
531
  @@index([agentInstanceUuid])
518
532
  }
519
533
 
534
+ model ProjectAgentCwdPreference {
535
+ id Int @id @default(autoincrement())
536
+ uuid String @unique @default(uuid())
537
+ companyUuid String
538
+ company Company @relation(fields: [companyUuid], references: [uuid], onDelete: Cascade)
539
+ userUuid String
540
+ user User @relation(fields: [userUuid], references: [uuid], onDelete: Cascade)
541
+ projectUuid String
542
+ project Project @relation(fields: [projectUuid], references: [uuid], onDelete: Cascade)
543
+ agentUuid String
544
+ agent Agent @relation(fields: [agentUuid], references: [uuid], onDelete: Cascade)
545
+ host String
546
+ cwd String
547
+ anchorAgentInstanceUuid String?
548
+ anchorAgentInstance AgentInstance? @relation(fields: [anchorAgentInstanceUuid], references: [uuid], onDelete: SetNull)
549
+ createdAt DateTime @default(now())
550
+ updatedAt DateTime @updatedAt
551
+
552
+ @@unique([userUuid, projectUuid, agentUuid])
553
+ @@index([companyUuid, projectUuid])
554
+ @@index([projectUuid])
555
+ @@index([agentUuid])
556
+ @@index([anchorAgentInstanceUuid])
557
+ }
558
+
559
+ model DaemonDirectoryRequest {
560
+ id Int @id @default(autoincrement())
561
+ uuid String @unique @default(uuid())
562
+ companyUuid String
563
+ company Company @relation(fields: [companyUuid], references: [uuid], onDelete: Cascade)
564
+ callerUserUuid String
565
+ callerUser User @relation(fields: [callerUserUuid], references: [uuid], onDelete: Cascade)
566
+ agentUuid String
567
+ agent Agent @relation(fields: [agentUuid], references: [uuid], onDelete: Cascade)
568
+ targetConnectionUuid String
569
+ operation String
570
+ prefix String?
571
+ cwd String?
572
+ cursor String?
573
+ limit Int
574
+ status String @default("pending")
575
+ result Json?
576
+ errorCode String?
577
+ deadlineAt DateTime
578
+ completedAt DateTime?
579
+ createdAt DateTime @default(now())
580
+ updatedAt DateTime @updatedAt
581
+
582
+ @@index([companyUuid, callerUserUuid, createdAt])
583
+ @@index([callerUserUuid])
584
+ @@index([agentUuid])
585
+ @@index([targetConnectionUuid, status])
586
+ @@index([deadlineAt])
587
+ }
588
+
520
589
  // Daemon execution state — one row per (connection, resource) the daemon is
521
590
  // running or has queued. The "resource" is whatever entity the wake-triggering
522
591
  // notification pointed at: a task, an idea (e.g. an @-mention or elaboration
@@ -592,38 +661,43 @@ model DaemonExecution {
592
661
  // Only the `agent` relation is modeled with a DB-level back-relation so the
593
662
  // cascade convention matches DaemonConnection/DaemonExecution/ApiKey.
594
663
  model DaemonSession {
595
- id Int @id @default(autoincrement())
596
- uuid String @unique @default(uuid())
597
- companyUuid String
598
- agentUuid String
599
- agent Agent @relation(fields: [agentUuid], references: [uuid], onDelete: Cascade)
664
+ id Int @id @default(autoincrement())
665
+ uuid String @unique @default(uuid())
666
+ companyUuid String
667
+ agentUuid String
668
+ agent Agent @relation(fields: [agentUuid], references: [uuid], onDelete: Cascade)
600
669
  // Stable business key: the directIdeaUuid for an idea-anchored session, or a
601
670
  // server-generated uuid for an ad-hoc session. Unique per agent.
602
- sessionId String
603
- directIdeaUuid String? // null ad-hoc (no idea lineage)
671
+ sessionId String
672
+ // Backend-owned resume identity, distinct from Chorus's routing key above.
673
+ backendSessionId String?
674
+ directIdeaUuid String? // null ⇒ ad-hoc (no idea lineage)
604
675
  // → DaemonConnection.uuid (weak ref, no DB FK). The connection/cwd that owns
605
676
  // the on-disk Claude transcript. Fixed at creation; continuation is only ever
606
677
  // routed here, because `claude --resume <sessionId>` is cwd/machine-bound.
607
- originConnectionUuid String
608
- status String @default("active") // active | ended
609
- title String?
610
- lastTurnAt DateTime @default(now())
678
+ originConnectionUuid String
679
+ // Directed discovered cwd. Null keeps the legacy connection-bound cwd behavior.
680
+ // Once set, every continuation uses this value rather than the anchor connection cwd.
681
+ runtimeCwd String?
682
+ status String @default("active") // active | ended
683
+ title String?
684
+ lastTurnAt DateTime @default(now())
611
685
  // Running conversation token rollup (daemon-token-usage): headline input+output totals
612
686
  // across all turns that reported usage. SCALAR Int (not JSON) on purpose — maintained
613
687
  // with Prisma's atomic `increment` on the terminal edge, which cannot operate inside a
614
688
  // Json column. Cache totals are NOT rolled up here (the header derives its conditional
615
689
  // cache line from the per-turn `usage` of loaded turns). Default 0 so an existing session
616
690
  // reads a valid zero total with no backfill.
617
- totalInputTokens Int @default(0)
618
- totalOutputTokens Int @default(0)
691
+ totalInputTokens Int @default(0)
692
+ totalOutputTokens Int @default(0)
619
693
  // Whole-session cache rollup (daemon-token-usage): so the header badge's tooltip can show
620
694
  // cache read/write at the SAME whole-session scope as its in+out face (not loaded-turns
621
695
  // scope). Scalar Int for the same atomic-increment reason as the in/out rollup.
622
- totalCacheReadTokens Int @default(0)
623
- totalCacheCreationTokens Int @default(0)
624
- createdAt DateTime @default(now())
625
- updatedAt DateTime @updatedAt
626
- turns DaemonSessionTurn[]
696
+ totalCacheReadTokens Int @default(0)
697
+ totalCacheCreationTokens Int @default(0)
698
+ createdAt DateTime @default(now())
699
+ updatedAt DateTime @updatedAt
700
+ turns DaemonSessionTurn[]
627
701
 
628
702
  @@unique([agentUuid, sessionId])
629
703
  @@index([companyUuid, agentUuid])
@@ -635,14 +709,14 @@ model DaemonSession {
635
709
  // turn, distinguished only by `trigger`. Turn creation + status transitions are
636
710
  // the SSE chokepoint for the conversation's live updates.
637
711
  model DaemonSessionTurn {
638
- id Int @id @default(autoincrement())
639
- uuid String @unique @default(uuid())
640
- sessionUuid String
641
- session DaemonSession @relation(fields: [sessionUuid], references: [uuid], onDelete: Cascade)
642
- seq Int // monotonic per session
643
- trigger String // task_assigned | mentioned | elaboration | elaboration_verified | start_development | yolo_requested | resume | human_instruction
644
- promptText String? // free-text body for human_instruction; null otherwise (canonical source)
645
- status String @default("pending") // pending | running | ended | interrupted
712
+ id Int @id @default(autoincrement())
713
+ uuid String @unique @default(uuid())
714
+ sessionUuid String
715
+ session DaemonSession @relation(fields: [sessionUuid], references: [uuid], onDelete: Cascade)
716
+ seq Int // monotonic per session
717
+ trigger String // task_assigned | mentioned | elaboration | elaboration_verified | start_development | yolo_requested | resume | human_instruction
718
+ promptText String? // free-text body for human_instruction; null otherwise (canonical source)
719
+ status String @default("pending") // pending | running | ended | interrupted
646
720
  // Discriminator for the `interrupted` status: `user` = user-requested interrupt,
647
721
  // `crash` = subprocess exited dirty, `shutdown` = daemon graceful shutdown killed
648
722
  // the wake, `offline` = server-side reconcile of a turn whose origin connection
@@ -656,21 +730,21 @@ model DaemonSessionTurn {
656
730
  // Chorus. Orthogonal to `status`: the turn is still a clean `ended`; this only records
657
731
  // WHY its transcript is missing so the UI can say "reply couldn't be uploaded (reason)"
658
732
  // instead of the misleading "no reply received". Null on a successful/skipped upload.
659
- relayError String?
733
+ relayError String?
660
734
  // Per-turn token usage (daemon-token-usage) — the whole normalized TokenUsage object
661
735
  // ({ inputTokens, outputTokens, cacheCreationTokens, cacheReadTokens, model, source },
662
736
  // all nullable except source) stored as ONE JSON blob (human instruction: one JSON, not a
663
737
  // field per number). Null when the backend reported none (pre-feature turns, silent turns,
664
738
  // or backends that can't report). Written on the terminal edge only, verbatim from the
665
739
  // authoritative Claude Code `result` envelope. Cost is intentionally NOT included this slice.
666
- usage Json?
740
+ usage Json?
667
741
  // Weak ref to the live DaemonExecution row this turn corresponds to (no DB FK;
668
742
  // execution rows are reconciled/transient).
669
- executionUuid String?
670
- startedAt DateTime?
671
- endedAt DateTime?
672
- createdAt DateTime @default(now())
673
- messages DaemonTranscriptMessage[]
743
+ executionUuid String?
744
+ startedAt DateTime?
745
+ endedAt DateTime?
746
+ createdAt DateTime @default(now())
747
+ messages DaemonTranscriptMessage[]
674
748
 
675
749
  @@unique([sessionUuid, seq])
676
750
  @@index([sessionUuid, status])
@@ -1 +0,0 @@
1
- exports.id=2004,exports.ids=[2004],exports.modules={5505:(a,b,c)=>{"use strict";c.d(b,{H:()=>e});var d=c(42377);let e=(0,d.createServerReference)("601bf5749455c3b51b1af9a86f223ad1358db3bcc5",d.callServer,void 0,d.findSourceMapURL,"forceMoveTaskToColumnAction")},5514:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{y:()=>C});var e=c(10837),f=c(21968),g=c(9222),h=c(44787),i=c(22727),j=c(24383),k=c(55775),l=c(27936),m=c(68797),n=c(24879),o=c(31009),p=c(45148),q=c(35198),r=c(49599),s=c(42424),t=c(11568),u=c(75030),v=c(44387),w=c(5505),x=c(54722),y=c(86104),z=c(73759),A=c(76172),B=a([m,y]);[m,y]=B.then?(await B)():B;let D={open:"bg-[#FFF3E0] dark:bg-[#3a2a12] text-[#E65100] dark:text-[#F0A050]",assigned:"bg-[#E3F2FD] dark:bg-[#13253a] text-[#1976D2] dark:text-[#5AA9F0]",in_progress:"bg-[#E8F5E9] dark:bg-[#14281a] text-[#5A9E6F] dark:text-[#6FD19A]",to_verify:"bg-[#F3E5F5] dark:bg-[#281630] text-[#7B1FA2] dark:text-[#C98FE0]",done:"bg-[#E0F2F1] dark:bg-[#12292a] text-[#00796B] dark:text-[#4FD1C0]",closed:"bg-[#F5F5F5] dark:bg-[#1e1e20] text-[#9A9A9A]"},E={open:"open",assigned:"assigned",in_progress:"inProgress",to_verify:"toVerify",done:"done",closed:"closed"},F={in_progress:"bg-[#FFF3E0] dark:bg-[#3a2a12] text-[#E65100] dark:text-[#F0A050]",assigned:"bg-[#E8F5E9] dark:bg-[#14281a] text-[#2E7D32] dark:text-[#5FD07E]",open:"bg-[#F5F5F5] dark:bg-[#1e1e20] text-muted-foreground",to_verify:"bg-[#E3F2FD] dark:bg-[#13253a] text-[#1565C0] dark:text-[#5AA9F0]"},G=[{id:"todo",labelKey:"todo",statuses:["open","assigned"]},{id:"in_progress",labelKey:"inProgress",statuses:["in_progress"]},{id:"to_verify",labelKey:"toVerify",statuses:["to_verify"]},{id:"done",labelKey:"done",statuses:["done","closed"]}];function C({projectUuid:a,initialTasks:b,currentUserUuid:c,selectedTaskUuid:d,onTaskSelect:B,onPanelClose:C,proposalUuidFilter:H}){let I=(0,g.c)(),[J,K]=(0,f.useState)(b),[L,M]=(0,f.useState)({}),[N,O]=(0,f.useState)(!1),[P,Q]=(0,f.useState)(null),[R,S]=(0,f.useState)([]),[T,U]=(0,f.useState)(!1),[V,W]=(0,f.useState)([]),[X,Y]=(0,f.useState)(!1),[Z,$]=(0,f.useState)(!1),_=(0,f.useCallback)(async()=>{let b=await (0,u.p)(a);if(b.success){let a=H?b.data.filter(a=>a.proposalUuid&&H.has(a.proposalUuid)):b.data;K(a);let c=await (0,z.h)(a.map(a=>a.uuid));c.success&&c.data&&M(c.data)}},[a,H]);(0,A.eV)("task",_),(0,f.useRef)(H);let aa=(0,f.useMemo)(()=>d?J.find(a=>a.uuid===d)??null:null,[d,J]),ab=a=>J.filter(b=>a.includes(b.status)),ac=a=>ab(a).reduce((a,b)=>a+(b.storyPoints||0),0),ad=async b=>{let c;$(!1);let{destination:d,source:e,draggableId:f}=b;if(!d||d.droppableId===e.droppableId&&d.index===e.index)return;let g=d.droppableId;e.droppableId;let h=J.find(a=>a.uuid===f);if(!h)return;if(G.find(a=>a.id===g),"todo"===g)c="assigned"===h.status?"assigned":"open";else if("in_progress"===g)c="in_progress";else if("to_verify"===g)c="to_verify";else{if("done"!==g)return;c="to_verify"===h.status?"done":"to_verify"}K(a=>a.map(a=>a.uuid===f?{...a,status:c}:a));let i=await (0,v.y)(f,g,a);if(i.success)_();else{if("blocked"in i&&i.blocked&&"blockers"in i){K(a=>a.map(a=>a.uuid===f?{...a,status:h.status}:a)),Q(h),S(i.blockers),O(!0);return}if(K(a=>a.map(a=>a.uuid===f?{...a,status:h.status}:a)),"gateBlocked"in i&&i.gateBlocked){let a="unresolvedCriteria"in i&&Array.isArray(i.unresolvedCriteria)?i.unresolvedCriteria:[];W(a),U(!0)}}},ae=async()=>{if(P){Y(!0);try{let a=await (0,w.H)(P.uuid,"in_progress");a.success?(O(!1),Q(null),S([]),_()):x.q.error("Failed to force move task:",a.error)}finally{Y(!1)}}},af=()=>{O(!1),Q(null),S([])};return(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(h.JY,{onDragStart:()=>{$(!0)},onDragEnd:ad,children:(0,e.jsx)(n.o,{children:(0,e.jsx)("div",{className:"flex flex-1 gap-4 overflow-x-auto pb-4",children:G.map(a=>{let b=ab(a.statuses);return(0,e.jsxs)("div",{className:"flex w-[300px] flex-shrink-0 flex-col rounded-xl bg-secondary p-4",children:[(0,e.jsxs)("div",{className:"mb-4 flex items-center justify-between",children:[(0,e.jsxs)("div",{className:"flex items-center gap-2",children:[(0,e.jsx)("h3",{className:"font-medium text-foreground",children:I(`status.${a.labelKey}`)}),(0,e.jsx)("span",{className:"rounded-full bg-card px-2 py-0.5 text-xs font-medium text-muted-foreground",children:b.length})]}),ac(a.statuses)>0&&(0,e.jsxs)("span",{className:"flex items-center gap-1 text-xs text-[#9A9A9A]",children:[(0,e.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"h-3 w-3",children:[(0,e.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,e.jsx)("polyline",{points:"12 6 12 12 16 14"})]}),ac(a.statuses),"h"]})]}),(0,e.jsx)(h.gL,{droppableId:a.id,children:(a,c)=>(0,e.jsxs)("div",{ref:a.innerRef,...a.droppableProps,className:`flex-1 space-y-3 overflow-y-auto min-h-[100px] rounded-lg pt-3 pr-3 transition-colors ${c.isDraggingOver?"bg-border":""}`,children:[0!==b.length||c.isDraggingOver?b.map((a,b)=>{let c=!!a.dependsOn&&0!==a.dependsOn.length&&a.dependsOn.some(a=>"done"!==a.status&&"closed"!==a.status),d=(c?!a.dependsOn?[]:a.dependsOn.filter(a=>"done"!==a.status&&"closed"!==a.status):[]).map(a=>a.title).join(", ");return(0,e.jsx)(h.sx,{draggableId:a.uuid,index:b,children:(b,f)=>(0,e.jsx)("div",{ref:b.innerRef,...b.draggableProps,...b.dragHandleProps,onClick:()=>{f.isDragging||B(a.uuid)},style:b.draggableProps.style,children:(0,e.jsxs)(o.P.div,{className:"relative",layoutId:Z?void 0:`task-card-${a.uuid}`,transition:p.Yv.spring,children:[L[a.uuid]>0&&(0,e.jsx)("div",{className:"absolute -top-3 -right-3 z-10 flex h-11 w-11 items-center justify-center rounded-full border-2 border-green-400 bg-card shadow-sm",children:(0,e.jsx)("img",{src:"/typing-animation.gif",alt:"",className:"h-8 w-8"})}),(0,e.jsx)(i.D,{entityType:"task",entityUuid:a.uuid,children:(0,e.jsxs)(q.Zp,{className:`cursor-pointer p-4 transition-all ${c?"border-dashed border-[#D1D1D1] dark:border-[#3a3a40] opacity-60":"border-border hover:border-primary"} bg-card hover:shadow-sm ${f.isDragging?"shadow-lg rotate-2":""}`,children:[(0,e.jsxs)("div",{className:"mb-2 flex items-start justify-between",children:[(0,e.jsx)(r.E,{className:D[a.status]||"",children:I(`status.${E[a.status]||a.status}`)}),(0,e.jsx)("div",{className:"flex items-center gap-1.5",children:a.storyPoints&&(0,e.jsxs)("span",{className:"flex items-center gap-1 rounded bg-[#FFF3E0] dark:bg-[#3a2a12] px-2 py-0.5 text-xs font-medium text-[#E65100] dark:text-[#F0A050]",children:[(0,e.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"h-3 w-3",children:[(0,e.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,e.jsx)("polyline",{points:"12 6 12 12 16 14"})]}),a.storyPoints,"h"]})})]}),(0,e.jsx)("h4",{className:"mb-1 font-medium text-foreground",children:a.title}),a.description&&(0,e.jsx)("p",{className:"mb-2 line-clamp-2 text-sm text-muted-foreground",children:a.description}),c&&(0,e.jsxs)("div",{className:"mb-2 flex items-center gap-1.5 rounded-md bg-[#FFF3E0] dark:bg-[#3a2a12] px-2 py-1",children:[(0,e.jsx)(j.A,{className:"h-3 w-3 shrink-0 text-[#E65100] dark:text-[#F0A050]"}),(0,e.jsx)("span",{className:"text-[9px] font-medium leading-tight text-[#E65100] dark:text-[#F0A050] line-clamp-1",children:I("tasks.blockedBy",{tasks:d})})]}),(0,e.jsxs)("div",{className:"flex items-start justify-between gap-2 text-xs text-[#9A9A9A]",children:[a.assignee?(0,e.jsxs)("span",{className:"flex min-w-0 flex-col gap-0.5",children:[(0,e.jsxs)("span",{className:"flex items-center gap-1",children:[(0,e.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"h-3 w-3 shrink-0",children:[(0,e.jsx)("path",{d:"M12 8V4H8"}),(0,e.jsx)("rect",{width:"16",height:"12",x:"4",y:"8",rx:"2"})]}),(0,e.jsx)("span",{className:"truncate",children:a.assignee.name})]}),"agent_instance"===a.assignee.type&&a.assignee.instance&&(0,e.jsx)(m.jQ,{cwd:a.assignee.instance.cwd,host:a.assignee.instance.host,showHost:!1,className:"pl-4"})]}):"open"===a.status?(0,e.jsx)("span",{className:"text-primary",children:I("common.assign")}):(0,e.jsx)("span",{children:I("common.unassigned")}),(0,e.jsxs)("span",{className:"flex items-center gap-1",children:[L[a.uuid]>0&&(0,e.jsxs)(r.E,{variant:"outline",className:"h-4 gap-1 border-green-300 dark:border-[#2a4a34] px-1.5 text-[10px] text-green-700 dark:text-[#6FD19A]",children:[(0,e.jsx)("span",{className:"inline-block h-1.5 w-1.5 rounded-full bg-green-500"}),I("sessions.workerCount",{count:L[a.uuid]})]}),a.acceptanceSummary&&a.acceptanceSummary.total>0&&(()=>{let b=a.acceptanceSummary,c="to_verify"===a.status,d=b.requiredPassed===b.required&&b.required>0,f=b.requiredFailed>0,g="bg-secondary text-muted-foreground";return c&&(g=d?"bg-green-50 text-green-700 dark:bg-[#14281a] dark:text-[#6FD19A]":f?"bg-red-50 text-[#C4574C] dark:bg-[#331619] dark:text-[#F0897E]":"bg-amber-50 text-[#D97706] dark:bg-[#332a12] dark:text-[#E0B44E]"),(0,e.jsxs)(r.E,{className:`h-4 gap-1 border-0 px-1.5 text-[9px] ${g}`,children:[(0,e.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"h-2.5 w-2.5",children:[(0,e.jsx)("path",{d:"M9 11l3 3L22 4"}),(0,e.jsx)("path",{d:"M21 12v7a2 2 0 01-2 2H5a2 2 0 01-2-2V5a2 2 0 012-2h11"})]}),b.passed,"/",b.total]})})()]})]})]})})]})})},a.uuid)}):(0,e.jsx)("div",{className:"flex h-24 items-center justify-center rounded-lg border-2 border-dashed border-border text-sm text-[#9A9A9A]",children:I("tasks.noTasks")}),a.placeholder]})})]},a.id)})})})}),aa&&(0,e.jsx)(y.v,{task:aa,projectUuid:a,currentUserUuid:c,onClose:C}),(0,e.jsx)(t.lG,{open:N,onOpenChange:a=>{a||af()},children:(0,e.jsxs)(t.Cf,{className:"max-w-md rounded-2xl",children:[(0,e.jsxs)(t.c7,{children:[(0,e.jsxs)(t.L3,{className:"flex items-center gap-2",children:[(0,e.jsx)(k.A,{className:"h-5 w-5 text-[#E65100] dark:text-[#F0A050]"}),I("tasks.dependencyBlocked")]}),(0,e.jsx)(t.rr,{children:I("tasks.dependencyBlockedDescription")})]}),(0,e.jsxs)("div",{className:"rounded-lg bg-background p-3",children:[(0,e.jsx)("p",{className:"mb-2 text-xs font-medium text-muted-foreground",children:I("tasks.blockerList")}),(0,e.jsx)("div",{className:"space-y-2",children:R.map(a=>(0,e.jsxs)("div",{className:"flex items-center justify-between rounded-lg border border-border bg-card p-3",children:[(0,e.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,e.jsx)("p",{className:"truncate text-sm font-medium text-foreground",children:a.title}),(0,e.jsxs)("div",{className:"mt-1 flex items-center gap-2",children:[a.assignee&&(0,e.jsx)("span",{className:"text-xs text-muted-foreground",children:a.assignee.name}),a.sessionCheckin&&(0,e.jsxs)("span",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[(0,e.jsx)(l.A,{className:"h-3 w-3"}),a.sessionCheckin.sessionName]})]})]}),(0,e.jsx)(r.E,{className:`shrink-0 ${F[a.status]||"bg-[#F5F5F5] dark:bg-[#1e1e20] text-muted-foreground"}`,children:I(`status.${E[a.status]||a.status}`)})]},a.uuid))})]}),(0,e.jsxs)(t.Es,{className:"gap-2 sm:gap-0",children:[(0,e.jsx)(s.$,{variant:"outline",onClick:af,children:I("common.cancel")}),(0,e.jsx)(s.$,{className:"bg-[#E65100] hover:bg-[#BF4400] text-white",onClick:ae,disabled:X,children:X?I("common.processing"):I("tasks.forceMove")})]})]})}),(0,e.jsx)(t.lG,{open:T,onOpenChange:U,children:(0,e.jsxs)(t.Cf,{className:"max-w-[520px] rounded-2xl p-0 gap-0",children:[(0,e.jsxs)(t.c7,{className:"px-6 pt-6 pb-4",children:[(0,e.jsxs)(t.L3,{className:"flex items-center gap-2.5",children:[(0,e.jsx)(k.A,{className:"h-5 w-5 text-[#C4574C] dark:text-[#F0897E]"}),I("acceptanceCriteria.title")]}),(0,e.jsx)(t.rr,{className:"text-[13px] leading-relaxed text-muted-foreground",children:I("acceptanceCriteria.gateBlocked",{count:V.filter(a=>a.required&&"passed"!==a.status).length})})]}),(0,e.jsxs)("div",{className:"px-6 pb-4 space-y-3",children:[(0,e.jsx)("p",{className:"text-[11px] font-semibold text-[#9A9A9A] uppercase tracking-wide",children:I("acceptanceCriteria.title")}),V.map(a=>(0,e.jsxs)("div",{className:`rounded-lg border p-3 space-y-2 ${"failed"===a.status?"border-red-200 dark:border-[#5a2a2e] bg-card":"border-border bg-card"}`,children:[(0,e.jsxs)("div",{className:"flex items-center gap-2",children:[(0,e.jsx)("div",{className:`h-2 w-2 rounded-full shrink-0 ${"failed"===a.status?"bg-[#C4574C]":"bg-[#F59E0B]"}`}),(0,e.jsx)("span",{className:"text-xs font-semibold text-foreground",children:a.description})]}),(0,e.jsxs)("div",{className:"flex items-center gap-2 pl-4",children:[(0,e.jsx)(r.E,{className:`text-[10px] border-0 ${"failed"===a.status?"bg-red-50 text-[#C4574C] dark:bg-[#331619] dark:text-[#F0897E]":"bg-amber-50 text-[#D97706] dark:bg-[#332a12] dark:text-[#E0B44E]"}`,children:I(`acceptanceCriteria.status.${a.status}`)}),(0,e.jsx)(r.E,{className:"text-[10px] border-0 bg-background text-muted-foreground",children:a.required?I("acceptanceCriteria.required"):I("acceptanceCriteria.optional")}),!a.evidence&&(0,e.jsx)("span",{className:"text-[10px] italic text-muted-foreground",children:I("acceptanceCriteria.noEvidence")})]}),a.evidence&&(0,e.jsxs)("div",{className:"rounded-md bg-red-50 dark:bg-[#331619] p-2 ml-4",children:[(0,e.jsx)("span",{className:"text-[10px] font-medium text-muted-foreground",children:I("acceptanceCriteria.verifyEvidence")}),(0,e.jsx)("p",{className:"text-[11px] text-foreground mt-0.5",children:a.evidence})]})]},a.uuid))]}),(0,e.jsx)(t.Es,{className:"border-t border-[#E5E2DC] dark:border-[#2a2a2e] px-6 py-4",children:(0,e.jsx)(s.$,{className:"rounded-lg bg-[#C4574C] hover:bg-[#A3433A] text-white",onClick:()=>U(!1),children:I("acceptanceCriteria.dismiss")})})]})})]})}d()}catch(a){d(a)}})},7046:(a,b,c)=>{"use strict";c.d(b,{O4:()=>g,kX:()=>e,od:()=>f,sO:()=>j,z3:()=>i});var d=c(70936);function e(a,b){return d.NextResponse.json({success:!0,data:a,meta:b})}function f(a,b,c,e){return d.NextResponse.json({success:!0,data:a,meta:{page:b,pageSize:c,total:e}})}let g={BAD_REQUEST:"BAD_REQUEST",UNAUTHORIZED:"UNAUTHORIZED",FORBIDDEN:"FORBIDDEN",NOT_FOUND:"NOT_FOUND",CONFLICT:"CONFLICT",VALIDATION_ERROR:"VALIDATION_ERROR",ALREADY_CLAIMED:"ALREADY_CLAIMED",NOT_CLAIMED:"NOT_CLAIMED",INVALID_STATUS_TRANSITION:"INVALID_STATUS_TRANSITION",PERMISSION_DENIED:"PERMISSION_DENIED",INTERNAL_ERROR:"INTERNAL_ERROR",DATABASE_ERROR:"DATABASE_ERROR"},h={[g.BAD_REQUEST]:400,[g.UNAUTHORIZED]:401,[g.FORBIDDEN]:403,[g.NOT_FOUND]:404,[g.CONFLICT]:409,[g.VALIDATION_ERROR]:422,[g.ALREADY_CLAIMED]:409,[g.NOT_CLAIMED]:400,[g.INVALID_STATUS_TRANSITION]:400,[g.PERMISSION_DENIED]:403,[g.INTERNAL_ERROR]:500,[g.DATABASE_ERROR]:500};function i(a,b,c){let e=h[a]||500;return d.NextResponse.json({success:!1,error:{code:a,message:b,details:c}},{status:e})}let j={badRequest:(a,b)=>i(g.BAD_REQUEST,a,b),unauthorized:(a="Authentication required")=>i(g.UNAUTHORIZED,a),forbidden:(a="Access denied")=>i(g.FORBIDDEN,a),notFound:(a="Resource")=>i(g.NOT_FOUND,`${a} not found`),conflict:a=>i(g.CONFLICT,a),validationError:a=>i(g.VALIDATION_ERROR,"Validation failed",a),alreadyClaimed:()=>i(g.ALREADY_CLAIMED,"Resource is already claimed"),notClaimed:()=>i(g.NOT_CLAIMED,"Resource is not claimed"),invalidStatusTransition:(a,b)=>i(g.INVALID_STATUS_TRANSITION,`Invalid status transition from ${a} to ${b}`),permissionDenied:a=>i(g.PERMISSION_DENIED,`Permission denied: ${a}`),internal:(a="Internal server error")=>i(g.INTERNAL_ERROR,a),database:(a="Database error")=>i(g.DATABASE_ERROR,a)}},15107:(a,b,c)=>{Promise.resolve().then(c.bind(c,29334))},19520:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{Hd:()=>n,nk:()=>p,pw:()=>o,yq:()=>m});var e=c(2613);c(50785);var f=c(5562),g=c(9259),h=c(50530),i=c(67738),j=c(97307),k=c(12217),l=a([g,h,i]);[g,h,i]=l.then?(await l)():l;let q={todo:"open",in_progress:"in_progress",to_verify:"to_verify",done:"done"};async function m(a,b,c){let d=await (0,g.d)();if(!d)return{success:!1,error:"Unauthorized"};try{let e=await (0,h.K4)(d.companyUuid,a);if(!e)return{success:!1,error:"Task not found"};let g=q[b];if(!g)return{success:!1,error:"Invalid column"};if("in_progress"===g){let b=await (0,h.IM)(a);if(!b.resolved)return{success:!1,error:"Dependencies not resolved",blocked:!0,blockers:b.blockers}}if("done"===g&&"to_verify"!==e.status)await (0,h.lC)(a,{status:"to_verify"});else if("done"===g&&"to_verify"===e.status){let b=await (0,h.Ew)(a);if(!b.allowed)return{success:!1,error:b.reason||"Not all required acceptance criteria are passed",gateBlocked:!0,unresolvedCriteria:b.unresolvedCriteria||[]};await (0,h.lC)(a,{status:"done"})}else await (0,h.lC)(a,{status:g});return(0,f.revalidatePath)(`/projects/${c}/tasks`),{success:!0}}catch(a){return j.default.error({err:a},"Failed to move task"),{success:!1,error:"Failed to move task"}}}async function n(a,b){let c=await (0,g.d)();if(!c)return{success:!1,error:"Unauthorized"};try{let d=await (0,h.K4)(c.companyUuid,a);if(!d)return{success:!1,error:"Task not found"};return await (0,h.lC)(a,{status:b}),await (0,i.createActivity)({companyUuid:c.companyUuid,projectUuid:d.projectUuid,targetType:"task",targetUuid:d.uuid,actorType:c.type,actorUuid:c.actorUuid,action:"force_status_change",value:JSON.stringify({from:d.status,to:b})}),{success:!0}}catch(a){return j.default.error({err:a},"Failed to force move task"),{success:!1,error:"Failed to force move task"}}}async function o(a){let b=await (0,g.d)();if(!b)return{success:!1,error:"Unauthorized"};try{let{tasks:c}=await (0,h.Vk)({companyUuid:b.companyUuid,projectUuid:a,skip:0,take:1e3});return{success:!0,data:c}}catch(a){return j.default.error({err:a},"Failed to fetch tasks"),{success:!1,error:"Failed to fetch tasks"}}}async function p(a){let b=await (0,g.d)();if(!b)return{nodes:[],edges:[]};try{return await (0,h.Cm)(b.companyUuid,a)}catch(a){return j.default.error({err:a},"Failed to get project dependencies"),{nodes:[],edges:[]}}}(0,k.D)([m,n,o,p]),(0,e.A)(m,"709cec1eced3a1d9d9ab04066f15e282fa930204fc",null),(0,e.A)(n,"601bf5749455c3b51b1af9a86f223ad1358db3bcc5",null),(0,e.A)(o,"40b45286fdb27b23ed3cf1592b3dada6dd73f0705d",null),(0,e.A)(p,"40b666fb722ac06a2c18c05ec78c31d613f5d4a51e",null),d()}catch(a){d(a)}})},24879:(a,b,c)=>{"use strict";c.d(b,{o:()=>k});var d=c(10837),e=c(21968),f=c(46005);let g=(0,e.createContext)(null);var h=c(46801),i=c(72443);let j=a=>!a.isLayoutDirty&&a.willUpdate(!1),k=({children:a,id:b,inherit:c=!0})=>{let k=(0,e.useContext)(f.L),l=(0,e.useContext)(g),[m,n]=function(){let a=function(){let a=(0,e.useRef)(!1);return(0,i.E)(()=>(a.current=!0,()=>{a.current=!1}),[]),a}(),[b,c]=(0,e.useState)(0),d=(0,e.useCallback)(()=>{a.current&&c(b+1)},[b]);return[(0,e.useCallback)(()=>h.Gt.postRender(d),[d]),b]}(),o=(0,e.useRef)(null),p=k.id||l;null===o.current&&((a=>!0==(!0===a)||"id"===a)(c)&&p&&(b=b?p+"-"+b:p),o.current={id:b,group:!0===c&&k.group||function(){let a=new Set,b=new WeakMap,c=()=>a.forEach(j);return{add:d=>{a.add(d),b.set(d,d.addEventListener("willUpdate",c))},remove:d=>{a.delete(d);let e=b.get(d);e&&(e(),b.delete(d)),c()},dirty:c}}()});let q=(0,e.useMemo)(()=>({...o.current,forceRender:m}),[n]);return(0,d.jsx)(f.L.Provider,{value:q,children:a})}},25060:(a,b,c)=>{"use strict";c.d(b,{i:()=>q});var d=c(10837),e=c(21968),f=c(47797);c(63410);var g=c(9222),h=c(1007),i=c(86460),j=c(10694),k=c(42424),l=c(74798),m=c(60265),n=c(42377);let o=(0,n.createServerReference)("40b666fb722ac06a2c18c05ec78c31d613f5d4a51e",n.callServer,void 0,n.findSourceMapURL,"getProjectDependenciesAction");var p=c(9453);function q({projectUuid:a,onTaskSelect:b,refreshKey:c}){let n=(0,g.c)(),q=(0,l.W)(),r=(0,h.useSearchParams)(),[s,t,u]=(0,f.ck)([]),[v,w,x]=(0,f.fM)([]),[y,z]=(0,e.useState)(!0),[A,B]=(0,e.useState)(null),C=(0,e.useMemo)(()=>{let a=r.get("proposalUuids");if(!a)return null;let b=a.split(",").filter(Boolean);return b.length>0?new Set(b):null},[r]),D=(0,e.useCallback)(async()=>{z(!0);let b=await o(a),c=b.nodes,d=b.edges;if(C){let a=new Set((c=b.nodes.filter(a=>null!==a.proposalUuid&&C.has(a.proposalUuid))).map(a=>a.uuid));d=b.edges.filter(b=>a.has(b.from)&&a.has(b.to))}let e=c.map(a=>({id:a.uuid,type:"taskNode",position:{x:0,y:0},data:{title:a.title,status:a.status,priority:a.priority,proposalUuid:a.proposalUuid}})),f=d.map((a,b)=>({id:`e-${b}`,source:a.to,target:a.from,...m.qK})),{nodes:g,edges:h}=(0,m.nF)(e,f);t(g),w(h),z(!1)},[a,C,t,w]),E=(0,e.useCallback)(async a=>{if(!a.source||!a.target)return;B(null);let b=a.target,c=a.source,d=await (0,p.w)(b,c);if(!d.success)return void B(d.error||n("tasks.failedToAddDep"));await D()},[D]),F=(0,e.useCallback)((a,c)=>{b(c.id)},[b]);return y?(0,d.jsx)("div",{className:"flex flex-1 items-center justify-center",children:(0,d.jsx)(i.A,{className:"h-6 w-6 animate-spin text-muted-foreground"})}):0===s.length?(0,d.jsx)("div",{className:"flex flex-1 items-center justify-center text-sm text-muted-foreground",children:n("tasks.noTasksToDisplay")}):(0,d.jsxs)("div",{className:"flex-1 rounded-xl border border-border bg-[#FAFAF8] dark:bg-[#1e1e1c] relative",children:[A&&(0,d.jsxs)("div",{className:"absolute top-3 left-1/2 -translate-x-1/2 z-10 rounded-lg bg-red-50 dark:bg-[#331619] border border-red-200 dark:border-[#5a2a2e] px-4 py-2 text-xs text-red-700 dark:text-[#F08078] shadow-sm",children:[A,(0,d.jsx)(k.$,{variant:"ghost",size:"icon",className:"ml-2 h-5 w-5 font-medium hover:text-red-900 dark:hover:text-[#F0A0A0]",onClick:()=>B(null),children:(0,d.jsx)(j.A,{className:"h-3 w-3"})})]}),(0,d.jsxs)(f.Gc,{colorMode:q?"dark":"light",nodes:s,edges:v,onNodesChange:u,onEdgesChange:x,onConnect:E,onNodeClick:F,nodeTypes:m.c_,fitView:!0,fitViewOptions:{padding:.2},minZoom:.3,maxZoom:1.5,proOptions:{hideAttribution:!0},zoomOnScroll:!0,zoomOnPinch:!0,panOnDrag:!0,children:[(0,d.jsx)(f.VS,{color:q?"#40392f":"#E5E0D8",gap:20}),(0,d.jsx)(f.H2,{className:"[&>button]:border-border [&>button]:bg-card [&>button]:text-foreground [&>button:hover]:bg-background"})]})]})}},29179:(a,b,c)=>{Promise.resolve().then(c.bind(c,90436))},29334:(a,b,c)=>{"use strict";c.d(b,{TaskViewToggle:()=>d});let d=(0,c(37143).registerClientReference)(function(){throw Error("Attempted to call TaskViewToggle() from the server but TaskViewToggle is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/home/ubuntu/dev/ai-pm/src/app/(dashboard)/projects/[uuid]/tasks/task-view-toggle.tsx","TaskViewToggle")},37066:(a,b,c)=>{"use strict";c.d(b,{A:()=>g});var d=c(77592),e=c(50117);let f=["en","zh","ko","ja"],g=(0,d.A)(async()=>{let a=await (0,e.UL)(),b=a.get("chorus-locale")?.value,d=b&&f.includes(b)?b:"en";return{locale:d,messages:(await c(76565)(`./${d}.json`)).default}})},39268:(a,b,c)=>{"use strict";c.d(b,{T:()=>r});var d=c(10837),e=c(21968),f=c(1007),g=c(68884),h=c(9222),i=c(65956),j=c(56149),k=c(9810),l=c(10694),m=c(96307),n=c(42424),o=c(49599),p=c(74113),q=c(10297);function r({projectUuid:a}){let b=(0,h.c)("tasks"),c=(0,g.r)(),r=(0,f.usePathname)(),s=(0,f.useSearchParams)(),[t,u]=(0,e.useState)(!1),[v,w]=(0,e.useState)([]),[x,y]=(0,e.useState)(new Set),z=(0,e.useCallback)(a=>{let b=new URLSearchParams(s.toString());a.size>0?b.set("proposalUuids",Array.from(a).join(",")):b.delete("proposalUuids");let d=b.toString();c.replace(`${r}${d?`?${d}`:""}`,{scroll:!1})},[c,r,s]),A=(0,e.useCallback)(a=>{y(b=>{let c=new Set(b);return c.has(a)?c.delete(a):c.add(a),z(c),c})},[z]),B=(0,e.useCallback)(()=>{y(new Set),z(new Set)},[z]),C=x.size>0;return(0,d.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,d.jsxs)("div",{className:"flex items-center gap-1.5 text-sm text-muted-foreground shrink-0",children:[(0,d.jsx)(i.A,{className:"size-4"}),(0,d.jsxs)("span",{children:[b("proposalFilter.label"),":"]})]}),(0,d.jsxs)(p.AM,{open:t,onOpenChange:u,children:[(0,d.jsx)(p.Wv,{asChild:!0,children:(0,d.jsxs)(n.$,{variant:"outline",size:"sm",role:"combobox","aria-expanded":t,className:(0,m.cn)("justify-between gap-1 min-w-[120px] max-w-[200px] md:min-w-[160px] md:max-w-none",C&&"border-primary bg-[#FFF8F4] dark:bg-[#2a2016]"),children:[(0,d.jsx)("span",{className:"truncate",children:C?b("proposalFilter.filtered",{filtered:x.size,total:v.length}):b("proposalFilter.allProposals")}),(0,d.jsx)(j.A,{className:"size-4 shrink-0 opacity-50"})]})}),(0,d.jsx)(p.hl,{className:"w-[300px] p-0",align:"start",children:(0,d.jsxs)(q.uB,{children:[(0,d.jsx)(q.G7,{placeholder:b("proposalFilter.search")}),(0,d.jsxs)(q.oI,{children:[(0,d.jsx)(q.xL,{children:b("proposalFilter.noResults")}),(0,d.jsx)(q.L$,{children:v.map(a=>{let c=x.has(a.uuid);return(0,d.jsxs)(q.h_,{value:a.title,onSelect:()=>A(a.uuid),className:"flex items-center justify-between",children:[(0,d.jsxs)("div",{className:"flex items-center gap-2 min-w-0",children:[(0,d.jsx)("div",{className:(0,m.cn)("flex size-4 shrink-0 items-center justify-center rounded-sm border",c?"border-primary bg-primary text-white":"border-muted-foreground/30"),children:c&&(0,d.jsx)(k.A,{className:"size-3"})}),(0,d.jsx)("span",{className:"truncate",children:a.title})]}),(0,d.jsx)(o.E,{variant:"secondary",className:"ml-2 shrink-0",children:b("proposalFilter.taskCount",{count:a.taskCount})})]},a.uuid)})})]})]})})]}),C&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("div",{className:"flex flex-wrap gap-1 max-w-full",children:v.filter(a=>x.has(a.uuid)).map(a=>(0,d.jsxs)(o.E,{variant:"outline",className:"gap-1 border-primary bg-[#FFF8F4] dark:bg-[#2a2016] text-primary",children:[a.title,(0,d.jsx)("button",{type:"button",className:"ml-0.5 rounded-full hover:bg-primary/20",onClick:()=>A(a.uuid),children:(0,d.jsx)(l.A,{className:"size-3"})})]},a.uuid))}),(0,d.jsx)(n.$,{variant:"ghost",size:"xs",onClick:B,className:"text-muted-foreground",children:b("proposalFilter.clear")})]})]})}},44387:(a,b,c)=>{"use strict";c.d(b,{y:()=>e});var d=c(42377);let e=(0,d.createServerReference)("709cec1eced3a1d9d9ab04066f15e282fa930204fc",d.callServer,void 0,d.findSourceMapURL,"moveTaskToColumnAction")},63748:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{X:()=>n});var e=c(10023),f=c(66530),g=c(26555),h=c(82858),i=c(29662),j=c(71165),k=c(61413),l=c(29334),m=a([i,j,k]);async function n({projectUuid:a,initialSelectedTaskUuid:b}){let c=await (0,i.d)();c||(0,f.redirect)("/login");let d=await (0,g.A)();await (0,k.Yi)(c.companyUuid,a)||(0,f.redirect)("/projects");let{tasks:m}=await (0,j.Vk)({companyUuid:c.companyUuid,projectUuid:a,skip:0,take:1e3}),n=m.reduce((a,b)=>a+(b.storyPoints||0),0);return(0,e.jsxs)("div",{className:"flex h-full flex-col p-4 md:p-8",children:[(0,e.jsx)("div",{className:"mb-6 flex items-center justify-between",children:(0,e.jsxs)("div",{children:[(0,e.jsx)("h1",{className:"text-2xl font-semibold text-foreground",children:d("tasks.title")}),(0,e.jsxs)("div",{className:"mt-1 flex items-center gap-4",children:[(0,e.jsx)("p",{className:"text-sm text-muted-foreground",children:d("tasks.subtitle")}),n>0&&(0,e.jsxs)("div",{className:"flex items-center gap-1.5 rounded-full bg-secondary px-3 py-1",children:[(0,e.jsx)(h.A,{className:"h-3.5 w-3.5 text-primary"}),(0,e.jsxs)("span",{className:"text-xs font-medium text-muted-foreground",children:[(0,e.jsx)("span",{className:"text-foreground",children:n.toFixed(1)})," ",d("tasks.agentHours")]})]})]})]})}),(0,e.jsx)(l.TaskViewToggle,{projectUuid:a,initialTasks:m,currentUserUuid:c.actorUuid,initialSelectedTaskUuid:b})]})}[i,j,k]=m.then?(await m)():m,d()}catch(a){d(a)}})},75030:(a,b,c)=>{"use strict";c.d(b,{p:()=>e});var d=c(42377);let e=(0,d.createServerReference)("40b45286fdb27b23ed3cf1592b3dada6dd73f0705d",d.callServer,void 0,d.findSourceMapURL,"fetchTasksAction")},76565:(a,b,c)=>{var d={"./en.json":[87368,7368],"./ja.json":[49378,9378],"./ko.json":[35245,5245],"./zh.json":[72961,2961]};function e(a){if(!c.o(d,a))return Promise.resolve().then(()=>{var b=Error("Cannot find module '"+a+"'");throw b.code="MODULE_NOT_FOUND",b});var b=d[a],e=b[0];return c.e(b[1]).then(()=>c.t(e,19))}e.keys=()=>Object.keys(d),e.id=76565,a.exports=e},78097:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{"005a6cd2af4085329202b98d4c1a6f7b0ce860dc4a":()=>g.vq,"400c8a8fb87a64e0be6bacee77c2ab7ee607bbf05b":()=>n.h,"400cc62b6c46f78e4b4ad58257347f1626a9fd5f8f":()=>m.xo,"4028350dccdbc421c3404cf0a1d0d03db984e3c1e6":()=>g.G3,"403f5a598f7439db44a3ad10983d666bf3b4bb6e9a":()=>e.Dv,"4053fbf9cd773cf00605c209ba2023ddd325a6d1b8":()=>j.Y9,"405979c3ae177391f575bd1f0f4fe3cbaa52fbe5ee":()=>l.F,"4077a6dafcbfee1b6cb14e5edf104e57b672d7e3a6":()=>g.hR,"4098a57be07c8fb3bd4f9ba727459f25e312467b32":()=>k.f,"40a2cb756321aa0763b67248286ce61a28bafb3b9b":()=>j.bv,"40b45286fdb27b23ed3cf1592b3dada6dd73f0705d":()=>f.pw,"40b666fb722ac06a2c18c05ec78c31d613f5d4a51e":()=>f.nk,"40bb1c410c8fc7ccdcdc8ae8304d92fb7f4ab516bd":()=>m.kq,"40c285dddab983b8aafd86aa235ac1b3557516397d":()=>g.iY,"40c498eef6ddbeb8b0f15859c1b13f791b068f0737":()=>n.J,"40cd33ae38e5fbe446ff77b214f6bfd7bc8404121e":()=>j.t1,"40e86d050039a5b4bcf337033323019ea0a057684c":()=>e.v5,"40eae947251fddaac1dff6acd11c0e5135b3748272":()=>g.p2,"40ed9eaa9d2c8a4a4ad837ddbe31ad3ccc481f6645":()=>g.Yw,"40eee340c584dbcd63c6e5b8c4293d0a6ec6dd6df1":()=>g.A0,"601bf5749455c3b51b1af9a86f223ad1358db3bcc5":()=>f.Hd,"601c5500efa447616f6c6e879e348c88f7ab7696c8":()=>m.wG,"6041ff29c92c5de3d6f75f69aa18ca472a5a147410":()=>g.bd,"606bacd9753c7fd59bb31dfe9dceb01afda160b770":()=>e.Tg,"607980552165f22dd376abb749600b9d6bb57bc339":()=>h.Nq,"6082a654eef56b1738c603740f4b7acfdcf9547d27":()=>j.jD,"609765f615ddd1619edf52f59f867a16c6eccd7921":()=>g.TV,"60b334e65c1e9a8b16c16a6a667690f40c7e563a83":()=>m.TK,"60b35bae63f84e834e8c516b3cc8a55b06f338a954":()=>h.hD,"60b96ef196663a3868fc704f143658445f0b497fa0":()=>g.y9,"60f26c0a3b4c2f53ee94eb6d82529a6e8a96a27f57":()=>h.IY,"703a8cb74f8937722979e93a1389f0a094605b7cd2":()=>i.s,"709cec1eced3a1d9d9ab04066f15e282fa930204fc":()=>f.yq,"70a52329b7ca0e7885bbe7b08d26305380135ea5a4":()=>i.d,"70b85f35c59f81a9c9cc702f8730dd81381d644470":()=>g.M0,"70f1041962850aaa2521d4a17de41d62c87bd2b6b9":()=>g.qb});var e=c(22299),f=c(19520),g=c(73393),h=c(71353),i=c(98581),j=c(52178),k=c(64029),l=c(72189),m=c(22293),n=c(81751),o=a([e,f,g,h,i,j,k,l,m,n]);[e,f,g,h,i,j,k,l,m,n]=o.then?(await o)():o,d()}catch(a){d(a)}})},82858:(a,b,c)=>{"use strict";c.d(b,{A:()=>d});let d=(0,c(91533).A)("clock",[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]])},90436:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{TaskViewToggle:()=>x});var e=c(10837),f=c(21968),g=c(1007),h=c(9222),i=c(32552),j=c(45519),k=c(33407),l=c(92900),m=c(42424),n=c(49599),o=c(35198),p=c(96013),q=c(98625),r=c(39268),s=c(5514),t=c(25060),u=c(86104),v=c(31009),w=a([s,u]);[s,u]=w.then?(await w)():w;let y={open:"bg-[#FFF3E0] dark:bg-[#3a2a12] text-[#E65100] dark:text-[#F0A050]",assigned:"bg-[#E3F2FD] dark:bg-[#13253a] text-[#1976D2] dark:text-[#5AA9F0]",in_progress:"bg-[#E8F5E9] dark:bg-[#14281a] text-[#5A9E6F] dark:text-[#6FD19A]",to_verify:"bg-[#F3E5F5] dark:bg-[#281630] text-[#7B1FA2] dark:text-[#C98FE0]",done:"bg-[#E0F2F1] dark:bg-[#12292a] text-[#00796B] dark:text-[#4FD1C0]",closed:"bg-[#F5F5F5] dark:bg-[#1e1e20] text-[#9A9A9A]"},z={open:"open",assigned:"assigned",in_progress:"inProgress",to_verify:"toVerify",done:"done",closed:"closed"},A=[{id:"all",labelKey:"allStatuses",statuses:[]},{id:"todo",labelKey:"todo",statuses:["open","assigned"]},{id:"in_progress",labelKey:"inProgress",statuses:["in_progress"]},{id:"to_verify",labelKey:"toVerify",statuses:["to_verify"]},{id:"done",labelKey:"done",statuses:["done","closed"]}],B={high:"bg-red-100 text-red-700",medium:"bg-yellow-100 text-yellow-700",low:"bg-blue-100 text-blue-700"};function x({projectUuid:a,initialTasks:b,currentUserUuid:c,initialSelectedTaskUuid:d}){let w=(0,h.c)(),x=(0,p.a)(),C=(0,g.useSearchParams)(),[D,E]=(0,f.useState)("kanban"),F=`/projects/${a}/tasks`,{selectedId:G,openPanel:H,closePanel:I}=(0,q.T)(F,d),J=(0,f.useMemo)(()=>{let a=C.get("proposalUuids");if(!a)return null;let b=a.split(",").filter(Boolean);return b.length>0?new Set(b):null},[C]),[K,L]=(0,f.useState)(!1),[M,N]=(0,f.useState)(0),[O,P]=(0,f.useState)("all"),Q=(0,f.useMemo)(()=>G?b.find(a=>a.uuid===G)??null:null,[G,b]),R=(0,f.useCallback)(()=>{N(a=>a+1)},[]),S=(0,f.useMemo)(()=>J?b.filter(a=>a.proposalUuid&&J.has(a.proposalUuid)):b,[b,J]),T=(0,f.useMemo)(()=>{let a=A.find(a=>a.id===O);return a&&0!==a.statuses.length?S.filter(b=>a.statuses.includes(b.status)):S},[S,O]);return(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("div",{className:"mb-4 overflow-x-auto",children:(0,e.jsx)(r.T,{projectUuid:a})}),(0,e.jsxs)("div",{className:"mb-4 flex items-center justify-between",children:[(0,e.jsxs)("div",{className:"flex items-center gap-1 rounded-lg bg-secondary p-1 w-fit",children:[x&&(0,e.jsxs)(m.$,{variant:"ghost",size:"sm",className:`h-8 gap-1.5 rounded-md px-3 text-xs ${"list"===D?"bg-card text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"}`,onClick:()=>E("list"),children:[(0,e.jsx)(i.A,{className:"h-3.5 w-3.5"}),w("tasks.listView")]}),!x&&(0,e.jsxs)(m.$,{variant:"ghost",size:"sm",className:`h-8 gap-1.5 rounded-md px-3 text-xs ${"kanban"===D?"bg-card text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"}`,onClick:()=>E("kanban"),children:[(0,e.jsx)(j.A,{className:"h-3.5 w-3.5"}),w("tasks.kanbanView")]}),(0,e.jsxs)(m.$,{variant:"ghost",size:"sm",className:`h-8 gap-1.5 rounded-md px-3 text-xs ${"dag"===D?"bg-card text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"}`,onClick:()=>E("dag"),children:[(0,e.jsx)(k.A,{className:"h-3.5 w-3.5"}),w("tasks.dagView")]})]}),(0,e.jsxs)(m.$,{className:"bg-primary hover:bg-[#B56A42] text-white",onClick:()=>{I(),L(!0)},children:[(0,e.jsx)(l.A,{className:"mr-2 h-4 w-4"}),w("tasks.newTask")]})]}),"list"===D?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("div",{className:"mb-4 flex gap-1 overflow-x-auto border-b border-border pb-2",children:A.map(a=>{let b=0===a.statuses.length?S.length:S.filter(b=>a.statuses.includes(b.status)).length;return(0,e.jsxs)(m.$,{variant:"ghost",size:"sm",className:`h-8 shrink-0 rounded-md px-3 text-xs ${O===a.id?"bg-secondary text-foreground font-medium":"text-muted-foreground hover:text-foreground"}`,onClick:()=>P(a.id),children:["all"===a.id?w(`tasks.${a.labelKey}`):w(`status.${a.labelKey}`),(0,e.jsx)("span",{className:"ml-1.5 rounded-full bg-card px-1.5 py-0.5 text-[10px] font-medium text-muted-foreground",children:b})]},a.id)})}),(0,e.jsx)("div",{className:"flex-1 space-y-2 overflow-y-auto",children:0===T.length?(0,e.jsx)(v.P.div,{initial:{opacity:0,scale:.98},animate:{opacity:1,scale:1},transition:{duration:.2,ease:[0,0,.2,1]},className:"flex h-24 items-center justify-center rounded-lg border-2 border-dashed border-border text-sm text-[#9A9A9A]",children:w("tasks.noTasks")}):T.map(a=>(0,e.jsxs)(o.Zp,{className:"cursor-pointer border-border bg-card p-4 transition-all hover:border-primary hover:shadow-sm",onClick:()=>H(a.uuid),children:[(0,e.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,e.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,e.jsx)("h4",{className:"font-medium text-foreground truncate",children:a.title}),a.description&&(0,e.jsx)("p",{className:"mt-1 line-clamp-1 text-sm text-muted-foreground",children:a.description})]}),(0,e.jsxs)("div",{className:"flex shrink-0 items-center gap-2",children:[null!=a.storyPoints&&a.storyPoints>0&&(0,e.jsxs)("span",{className:"rounded bg-[#FFF3E0] dark:bg-[#3a2a12] px-2 py-0.5 text-xs font-medium text-[#E65100] dark:text-[#F0A050]",children:[a.storyPoints,"h"]}),(0,e.jsx)(n.E,{className:B[a.priority]||"",children:w(`priority.${a.priority}`)}),(0,e.jsx)(n.E,{className:y[a.status]||"",children:w(`status.${z[a.status]||a.status}`)})]})]}),a.assignee&&(0,e.jsx)("div",{className:"mt-2 flex items-center gap-1.5 text-xs text-[#9A9A9A]",children:(0,e.jsx)("span",{className:"truncate",children:a.assignee.name})})]},a.uuid))}),Q&&(0,e.jsx)(u.v,{task:Q,projectUuid:a,currentUserUuid:c,onClose:I,onDependencyChange:R})]}):"kanban"===D?(0,e.jsx)(s.y,{projectUuid:a,initialTasks:S,currentUserUuid:c,selectedTaskUuid:G,onTaskSelect:H,onPanelClose:I,proposalUuidFilter:J}):(0,e.jsxs)("div",{className:"flex flex-1 flex-col",children:[(0,e.jsx)(t.i,{projectUuid:a,onTaskSelect:a=>H(a),refreshKey:M}),Q&&(0,e.jsx)(u.v,{task:Q,projectUuid:a,currentUserUuid:c,onClose:I,onDependencyChange:R})]}),K&&!Q&&(0,e.jsx)(u.v,{task:null,projectUuid:a,currentUserUuid:c,onClose:()=>L(!1),onCreated:()=>L(!1)})]})}d()}catch(a){d(a)}})},91533:(a,b,c)=>{"use strict";c.d(b,{A:()=>i});var d=c(73426);let e=(...a)=>a.filter((a,b,c)=>!!a&&""!==a.trim()&&c.indexOf(a)===b).join(" ").trim(),f=a=>{let b=a.replace(/^([A-Z])|[\s-_]+(\w)/g,(a,b,c)=>c?c.toUpperCase():b.toLowerCase());return b.charAt(0).toUpperCase()+b.slice(1)};var g={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let h=(0,d.forwardRef)(({color:a="currentColor",size:b=24,strokeWidth:c=2,absoluteStrokeWidth:f,className:h="",children:i,iconNode:j,...k},l)=>(0,d.createElement)("svg",{ref:l,...g,width:b,height:b,stroke:a,strokeWidth:f?24*Number(c)/Number(b):c,className:e("lucide",h),...!i&&!(a=>{for(let b in a)if(b.startsWith("aria-")||"role"===b||"title"===b)return!0;return!1})(k)&&{"aria-hidden":"true"},...k},[...j.map(([a,b])=>(0,d.createElement)(a,b)),...Array.isArray(i)?i:[i]])),i=(a,b)=>{let c=(0,d.forwardRef)(({className:c,...g},i)=>(0,d.createElement)(h,{ref:i,iconNode:b,className:e(`lucide-${f(a).replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,`lucide-${a}`,c),...g}));return c.displayName=f(a),c}},96013:(a,b,c)=>{"use strict";c.d(b,{a:()=>e});var d=c(21968);function e(){let[a,b]=(0,d.useState)(!1);return a}}};
@@ -1 +0,0 @@
1
- "use strict";exports.id=2112,exports.ids=[2112],exports.modules={4284:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{a1:()=>g});var e=c(71255);c(62729);var f=a([e]);async function g(a){let b=await e.z.projectGroup.findMany({where:{companyUuid:a},orderBy:{createdAt:"asc"}}),c=b.map(a=>a.uuid),d=c.length>0?await e.z.project.groupBy({by:["groupUuid"],where:{companyUuid:a,groupUuid:{in:c}},_count:{_all:!0}}):[],f=new Map(d.map(a=>[a.groupUuid,a._count._all])),g=b.map(a=>({uuid:a.uuid,name:a.name,description:a.description,projectCount:f.get(a.uuid)??0,createdAt:a.createdAt.toISOString(),updatedAt:a.updatedAt.toISOString()})),h=await e.z.project.count({where:{companyUuid:a,groupUuid:null}});return{groups:g,total:b.length,ungroupedCount:h}}e=(f.then?(await f)():f)[0],d()}catch(a){d(a)}})},5797:(a,b,c)=>{c.d(b,{A:()=>d});let d=(0,c(56556).A)("lightbulb",[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]])},11166:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{p:()=>g});var e=c(89998),f=a([e]);e=(f.then?(await f)():f)[0];let h={action:"yolo_requested",precondition:async({idea:a})=>{if("agent"!==a.assigneeType&&"agent_instance"!==a.assigneeType)throw new e.$("ASSIGNEE_NOT_AGENT","The Idea's assignee is not an agent — there is no daemon to wake");return{}},offlinePolicy:"require_online"};async function g({companyUuid:a,ideaUuid:b,actorUuid:c,actorType:d}){await (0,e.u)(h,{companyUuid:a,ideaUuid:b,actorUuid:c,actorType:d})}d()}catch(a){d(a)}})},11882:(a,b,c)=>{c.d(b,{w:()=>u});var d=c(10837),e=c(21968),f=c(9222),g=c(76549),h=c(86460),i=c(58270),j=c(42424),k=c(99127),l=c(70028);let m=new Set(["done","closed"]);function n({assignee:a,proposals:b,tasks:c}){return!!a&&("agent"===a.type||"agent_instance"===a.type)&&!!b&&!!b.some(a=>"approved"===a.status)&&!!c&&!!c.some(a=>!m.has(a.status))&&!0}var o=c(42377);let p=(0,o.createServerReference)("40fc05360046257fb71d722bd23527974a2e77d817",o.callServer,void 0,o.findSourceMapURL,"startDevelopmentAction");var q=c(58653),r=c(76799),s=c(77078);let t={unauthorized:"errorGeneric",not_human:"errorGeneric",idea_not_found:"errorGeneric",assignee_not_agent:"errorAssigneeNotAgent",no_approved_proposal:"errorNoApprovedProposal",no_unfinished_tasks:"errorNoUnfinishedTasks",agent_offline:"errorAgentOffline",instance_offline:"errorInstanceOffline",unknown:"errorGeneric"};function u({ideaUuid:a,assignee:b,assigneeName:c,proposals:m,tasks:o,onStarted:u}){var v;let w=(0,f.c)("startDevelopment"),x=(0,l.kz)()?.connections??[],[y,z]=(0,e.useState)(!1),[A,B]=(0,e.useState)(!1),{start:C,pickerState:D,confirmPick:E,cancelPick:F,isResolving:G}=(0,r.E)({reassignNoWake:q.U}),H=b?"agent"===b.type?b.uuid:"agent_instance"===b.type?b.instance?.agentUuid??null:null:null,I=null!==H&&x.some(a=>a.agentUuid===H&&"online"===a.effectiveStatus),J=n({assignee:b,proposals:m,tasks:o}),K=n(v={assignee:b,proposals:m,tasks:o,agentOnline:I})&&v.agentOnline;if(!J||A)return A?(0,d.jsx)("span",{className:"text-[11px] text-[#00796B] dark:text-[#4FD1C0]",children:w("startedHint")}):null;let L=async()=>{z(!0);let b=await p(a);z(!1),b.success?(B(!0),g.oR.success(w("startedHint")),u?.()):g.oR.error(w(t[b.errorCode??"unknown"]))},M=(0,d.jsx)(j.$,{className:"bg-primary hover:bg-[#B56A42] text-white",onClick:()=>{C({ideaUuid:a,wake:L})},disabled:!K||y||G,children:y?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(h.A,{className:"mr-2 h-4 w-4 animate-spin"}),w("starting")]}):(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(i.A,{className:"mr-2 h-4 w-4"}),w("button")]})});return I?(0,d.jsxs)(d.Fragment,{children:[M,(0,d.jsx)(s.V,{open:null!==D,agentName:c??"",instances:D?.instances??[],onConfirm:E,onCancel:F})]}):(0,d.jsx)(k.Bc,{delayDuration:300,children:(0,d.jsxs)(k.m_,{children:[(0,d.jsx)(k.k$,{asChild:!0,children:(0,d.jsx)("span",{tabIndex:0,className:"inline-flex",children:M})}),(0,d.jsx)(k.ZI,{children:w("offlineHint")})]})})}},22110:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{e1:()=>o,em:()=>n,yu:()=>p,zS:()=>m});var e=c(2613);c(50785);var f=c(5562),g=c(9259),h=c(23733),i=c(71255),j=c(97307),k=c(12217),l=a([g,h,i]);async function m(a){let b=await (0,g.d)();if(!b)return{success:!1,error:"Unauthorized"};try{let c=await (0,h.t8)({companyUuid:b.companyUuid,ideaUuid:a});return{success:!0,data:c}}catch(a){return j.default.error({err:a},"Failed to get elaboration"),{success:!1,error:a instanceof Error?a.message:"Failed to get elaboration"}}}async function n(a,b,c){let d=await (0,g.d)();if(!d)return{success:!1,error:"Unauthorized"};try{let e=await (0,h.Rm)({companyUuid:d.companyUuid,ideaUuid:a,roundUuid:b,actorUuid:d.actorUuid,actorType:d.type,answers:c}),g=await i.z.idea.findFirst({where:{uuid:a,companyUuid:d.companyUuid}});return g&&((0,f.revalidatePath)(`/projects/${g.projectUuid}/ideas/${a}`),(0,f.revalidatePath)(`/projects/${g.projectUuid}/ideas`)),{success:!0,data:e}}catch(a){return j.default.error({err:a},"Failed to submit elaboration answers"),{success:!1,error:a instanceof Error?a.message:"Failed to submit answers"}}}async function o(a){let b=await (0,g.d)();if(!b)return{success:!1,error:"Unauthorized"};if("user"!==b.type&&"super_admin"!==b.type)return{success:!1,error:"Only users can verify elaboration"};try{let c=await (0,h.A7)({companyUuid:b.companyUuid,ideaUuid:a,actorUuid:b.actorUuid,actorType:b.type}),d=await i.z.idea.findFirst({where:{uuid:a,companyUuid:b.companyUuid}});return d&&((0,f.revalidatePath)(`/projects/${d.projectUuid}/ideas/${a}`),(0,f.revalidatePath)(`/projects/${d.projectUuid}/ideas`)),{success:!0,data:c}}catch(a){return j.default.error({err:a},"Failed to verify elaboration"),{success:!1,error:a instanceof Error?a.message:"Failed to verify elaboration"}}}async function p(a,b){let c=await (0,g.d)();if(!c)return{success:!1,error:"Unauthorized"};try{await (0,h.Y_)({companyUuid:c.companyUuid,ideaUuid:a,actorUuid:c.actorUuid,actorType:c.type,reason:b});let d=await i.z.idea.findFirst({where:{uuid:a,companyUuid:c.companyUuid}});return d&&((0,f.revalidatePath)(`/projects/${d.projectUuid}/ideas/${a}`),(0,f.revalidatePath)(`/projects/${d.projectUuid}/ideas`)),{success:!0}}catch(a){return j.default.error({err:a},"Failed to skip elaboration"),{success:!1,error:a instanceof Error?a.message:"Failed to skip elaboration"}}}[g,h,i]=l.then?(await l)():l,(0,k.D)([m,n,o,p]),(0,e.A)(m,"4007b48e3b837335975b30de60c071ca7466c33bee",null),(0,e.A)(n,"70f675d4e11730d294f429a214b4e3361504ba691b",null),(0,e.A)(o,"40f3712be5d58ae98a7f02101c499dd531a400f6b0",null),(0,e.A)(p,"60939e95a8faa1db86c44f57ffe03adefffdc52884",null),d()}catch(a){d(a)}})},23157:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{Ax:()=>p,G3:()=>u,M$:()=>r,UD:()=>t,UP:()=>q,ZL:()=>s,qN:()=>o});var e=c(2613);c(50785);var f=c(5562),g=c(9259),h=c(61212),i=c(28774),j=c(61076),k=c(67738),l=c(97307),m=c(12217),n=a([g,h,i,j,k]);async function o(a){let b=await (0,g.d)();if(!b)return{success:!1,error:"Unauthorized"};try{let c=await (0,h.MY)(b.companyUuid,a);if(!c)return{success:!1,error:"Idea not found"};if("elaborated"===c.status)return{success:!1,error:"Idea is not available for assignment"};return await (0,h.Xo)({ideaUuid:a,companyUuid:b.companyUuid,assigneeType:b.type,assigneeUuid:b.actorUuid,assignedByUuid:b.actorUuid}),await (0,k.createActivity)({companyUuid:b.companyUuid,projectUuid:c.projectUuid,targetType:"idea",targetUuid:a,actorType:b.type,actorUuid:b.actorUuid,action:"assigned",value:{assigneeType:b.type,assigneeUuid:b.actorUuid}}),(0,f.revalidatePath)(`/projects/${c.projectUuid}/ideas/${a}`),(0,f.revalidatePath)(`/projects/${c.projectUuid}/ideas`),{success:!0}}catch(a){return l.default.error({err:a},"Failed to claim idea"),{success:!1,error:"Failed to claim idea"}}}async function p(a,b,c){let d=await (0,g.d)();if(!d||"user"!==d.type)return{success:!1,error:"Unauthorized"};try{let e=await (0,h.MY)(d.companyUuid,a);if(!e)return{success:!1,error:"Idea not found"};if("elaborated"===e.status)return{success:!1,error:"Idea is not available for assignment"};return await (0,h.Xo)({ideaUuid:a,companyUuid:d.companyUuid,assigneeType:"agent",assigneeUuid:b,assignedByUuid:d.actorUuid,instanceUuid:c??void 0}),await (0,k.createActivity)({companyUuid:d.companyUuid,projectUuid:e.projectUuid,targetType:"idea",targetUuid:a,actorType:"user",actorUuid:d.actorUuid,action:"assigned",value:{assigneeType:"agent",assigneeUuid:b,...c?{instanceUuid:c}:{}}}),(0,f.revalidatePath)(`/projects/${e.projectUuid}/ideas/${a}`),(0,f.revalidatePath)(`/projects/${e.projectUuid}/ideas`),{success:!0}}catch(a){return l.default.error({err:a},"Failed to claim idea to agent"),{success:!1,error:"Failed to claim idea"}}}async function q(a,b,c){let d=await (0,g.d)();if(!d||"user"!==d.type)return{success:!1,error:"Unauthorized"};try{let e=await (0,h.MY)(d.companyUuid,a);if(!e)return{success:!1,error:"Idea not found"};return await (0,h.Xo)({ideaUuid:a,companyUuid:d.companyUuid,assigneeType:"agent",assigneeUuid:b,assignedByUuid:d.actorUuid,instanceUuid:c,allowElaboratedInstanceRepin:!0}),(0,f.revalidatePath)(`/projects/${e.projectUuid}/ideas/${a}`),(0,f.revalidatePath)(`/projects/${e.projectUuid}/ideas`),{success:!0}}catch(a){return l.default.error({err:a},"Failed to reassign idea instance (no wake)"),{success:!1,error:"Failed to reassign idea"}}}async function r(a,b){let c=await (0,g.d)();if(!c||"user"!==c.type)return{success:!1,error:"Unauthorized"};try{let d=await (0,h.MY)(c.companyUuid,a);if(!d)return{success:!1,error:"Idea not found"};if("elaborated"===d.status)return{success:!1,error:"Idea is not available for assignment"};return await (0,h.Xo)({ideaUuid:a,companyUuid:c.companyUuid,assigneeType:"user",assigneeUuid:b,assignedByUuid:c.actorUuid}),(0,f.revalidatePath)(`/projects/${d.projectUuid}/ideas/${a}`),(0,f.revalidatePath)(`/projects/${d.projectUuid}/ideas`),{success:!0}}catch(a){return l.default.error({err:a},"Failed to claim idea to user"),{success:!1,error:"Failed to claim idea"}}}async function s(a){let b=await (0,g.d)();if(!b)return{success:!1,error:"Unauthorized"};try{let c=await (0,h.MY)(b.companyUuid,a);if(!c)return{success:!1,error:"Idea not found"};if("elaborated"===c.status)return{success:!1,error:"Idea cannot be released from current status"};return await (0,h.h_)(c.uuid),(0,f.revalidatePath)(`/projects/${c.projectUuid}/ideas/${a}`),(0,f.revalidatePath)(`/projects/${c.projectUuid}/ideas`),{success:!0}}catch(a){return l.default.error({err:a},"Failed to release idea"),{success:!1,error:"Failed to release idea"}}}async function t(){let a=await (0,g.d)();if(!a||"user"!==a.type)return{agents:[],users:[]};try{let[b,c]=await Promise.all([(0,i.ic)(a.companyUuid,"idea:write",a.actorUuid),(0,i.A8)(a.companyUuid)]);return{agents:b,users:c}}catch(a){return l.default.error({err:a},"Failed to get assignable agents"),{agents:[],users:[]}}}async function u(a){let b=await (0,g.d)();if(!b||"user"!==b.type)return{instances:[]};try{return{instances:(await (0,j._R)(b.companyUuid,a)).map(a=>({connectionUuid:a.uuid,agentInstanceUuid:a.agentInstanceUuid,host:a.host,cwd:a.cwd,effectiveStatus:a.effectiveStatus}))}}catch(a){return l.default.error({err:a},"Failed to get agent instances"),{instances:[]}}}[g,h,i,j,k]=n.then?(await n)():n,(0,m.D)([o,p,q,r,s,t,u]),(0,e.A)(o,"40965ba7a25f92bd5be3008c3451c1964520a9ff6a",null),(0,e.A)(p,"70e4d3b9ae4f81a9e35589c83befa5d4feec3fe5e7",null),(0,e.A)(q,"7081e82b13cd847bc50d8be9c582077417de620ca6",null),(0,e.A)(r,"60032c5d80dd7193aa504c12b68e99a863f343de0e",null),(0,e.A)(s,"40858e27e8a24d2dd55d3b43603d8216b69ecbae26",null),(0,e.A)(t,"007f9c026bd5884efe398583bcb395db297dabd155",null),(0,e.A)(u,"40cefd4c146dd6559b4fb4fb54d808f780fe5f1972",null),d()}catch(a){d(a)}})},23733:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{A7:()=>m,Rm:()=>l,Y_:()=>n,t8:()=>o});var e=c(71255),f=c(62729),g=c(85806),h=c(92633),i=c(89998),j=a([e,g,h,i]);async function k(a,b,c){if(b.assigneeUuid===c)return!0;if("agent_instance"===b.assigneeType){let d=await (0,h.wo)(a,b.assigneeType,b.assigneeUuid);return null!==d&&d===c}return!1}async function l({companyUuid:a,ideaUuid:b,roundUuid:c,actorUuid:d,actorType:h,answers:i}){let j=c;if(!j){let c=await e.z.elaborationRound.findMany({where:{ideaUuid:b,companyUuid:a,status:"pending_answers"},select:{uuid:!0}});if(0===c.length)throw Error("no active round to answer");if(c.length>1)throw Error("multiple active rounds; specify roundUuid");j=c[0].uuid}let k=await e.z.elaborationRound.findFirst({where:{uuid:j,ideaUuid:b,companyUuid:a},include:{questions:!0}});if(!k)throw Error("Elaboration round not found");if("pending_answers"!==k.status)throw Error(`Round is '${k.status}', expected 'pending_answers'`);let l=new Date;for(let a of i){let b=k.questions.find(b=>b.questionId===a.questionId);if(!b)throw Error(`Question '${a.questionId}' not found in round`);if(null!==a.selectedOptionId){if(!b.options.find(b=>b.id===a.selectedOptionId))throw Error(`Invalid option '${a.selectedOptionId}' for question '${a.questionId}'`)}else if(!a.customText?.trim())throw Error(`Question '${a.questionId}': custom text is required when no option is selected`);await e.z.elaborationQuestion.update({where:{uuid:b.uuid},data:{selectedOptionId:a.selectedOptionId,customText:a.customText,answeredAt:l,answeredByType:h,answeredByUuid:d}})}let m=(await e.z.elaborationQuestion.findMany({where:{roundUuid:j}})).filter(a=>a.required).every(a=>null!==a.answeredAt),n=await e.z.idea.findFirst({where:{uuid:b,companyUuid:a}});m&&(await e.z.elaborationRound.update({where:{uuid:j},data:{status:"answered"}}),n?.elaborationStatus!=="resolved"&&await e.z.idea.update({where:{uuid:b},data:{elaborationStatus:"validating"}})),await g.f0.createActivity({companyUuid:a,projectUuid:n.projectUuid,targetType:"idea",targetUuid:b,actorType:h,actorUuid:d,action:"elaboration_answered",value:{roundNumber:k.roundNumber,answeredCount:i.length}}),f.B.emitChange({companyUuid:a,projectUuid:n.projectUuid,entityType:"idea",entityUuid:b,action:"updated"});let o=await e.z.elaborationRound.findUnique({where:{uuid:j},include:{questions:!0}});return p(o)}[e,g,h,i]=j.then?(await j)():j;let r={action:"elaboration_verified",precondition:async({companyUuid:a,ideaUuid:b})=>{let c=await e.z.elaborationRound.findMany({where:{ideaUuid:b,companyUuid:a}});if(0===c.length)throw new i.$("PRECONDITION_FAILED","Cannot resolve: the Idea has no elaboration rounds","no_rounds");let d=c.filter(a=>"pending_answers"===a.status);if(d.length>0)throw new i.$("PRECONDITION_FAILED",`Cannot resolve: ${d.length} round(s) still have unanswered questions`,"pending_answers");return{totalRounds:c.length}},transition:async({ideaUuid:a})=>{await e.z.idea.update({where:{uuid:a},data:{status:"elaborated",elaborationStatus:"resolved"}})},offlinePolicy:"queue"};async function m({companyUuid:a,ideaUuid:b,actorUuid:c,actorType:d}){return await (0,i.u)(r,{companyUuid:a,ideaUuid:b,actorUuid:c,actorType:d}),o({companyUuid:a,ideaUuid:b})}async function n({companyUuid:a,ideaUuid:b,actorUuid:c,actorType:d,reason:h}){let i=await e.z.idea.findFirst({where:{uuid:b,companyUuid:a}});if(!i)throw Error("Idea not found");if(!await k(a,i,c))throw Error("Only the assigned agent can skip elaboration");if("elaborating"!==i.status)throw Error(`Cannot skip elaboration from status '${i.status}'`);await e.z.idea.update({where:{uuid:b},data:{status:"elaborated",elaborationDepth:"minimal",elaborationStatus:"resolved"}}),await g.f0.createActivity({companyUuid:a,projectUuid:i.projectUuid,targetType:"idea",targetUuid:b,actorType:d,actorUuid:c,action:"elaboration_skipped",value:{reason:h}}),f.B.emitChange({companyUuid:a,projectUuid:i.projectUuid,entityType:"idea",entityUuid:b,action:"updated"})}async function o({companyUuid:a,ideaUuid:b}){let c=await e.z.idea.findFirst({where:{uuid:b,companyUuid:a}});if(!c)throw Error("Idea not found");let d=await e.z.elaborationRound.findMany({where:{ideaUuid:b,companyUuid:a},include:{questions:!0},orderBy:{roundNumber:"asc"}}),f=d.flatMap(a=>a.questions),g=f.filter(a=>null!==a.answeredAt),h=d.filter(a=>"pending_answers"!==a.status),i=d.find(a=>"pending_answers"===a.status);return{ideaUuid:b,depth:c.elaborationDepth,status:c.elaborationStatus,rounds:d.map(p),summary:{totalQuestions:f.length,answeredQuestions:g.length,validatedRounds:h.length,pendingRound:i?.roundNumber||null}}}function p(a){return{uuid:a.uuid,roundNumber:a.roundNumber,status:a.status,isAppended:a.isAppended,createdBy:{type:a.createdByType,uuid:a.createdByUuid},validatedAt:a.validatedAt?.toISOString()||null,createdAt:a.createdAt.toISOString(),questions:a.questions.map(q)}}function q(a){return{uuid:a.uuid,questionId:a.questionId,text:a.text,category:a.category,options:a.options,required:a.required,answer:a.answeredAt?{selectedOptionId:a.selectedOptionId,customText:a.customText,answeredAt:a.answeredAt.toISOString(),answeredBy:{type:a.answeredByType,uuid:a.answeredByUuid}}:null,issue:a.issueType?{type:a.issueType,description:a.issueDescription||""}:null}}d()}catch(a){d(a)}})},24364:(a,b,c)=>{c.d(b,{A:()=>d});let d=(0,c(56556).A)("arrow-right-left",[["path",{d:"m16 3 4 4-4 4",key:"1x1c3m"}],["path",{d:"M20 7H4",key:"zbl0bi"}],["path",{d:"m8 21-4-4 4-4",key:"h9nckh"}],["path",{d:"M4 17h16",key:"g4d7ey"}]])},26402:(a,b,c)=>{c.d(b,{o:()=>d});function d({ideaStatus:a,elaborationStatus:b,elaboration:c}){return!("elaborating"!==a||"resolved"===b||!c||0===c.rounds.length||c.rounds.some(a=>"pending_answers"===a.status))}},30259:(a,b,c)=>{c.a(a,async(a,b)=>{try{var d=c(71255),e=c(92633),f=c(61212),g=a([d,e,f]);[d,e,f]=g.then?(await g)():g,b()}catch(a){b(a)}})},31138:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{JQ:()=>o,Z$:()=>p,w$:()=>n,zK:()=>q});var e=c(2613);c(50785);var f=c(5562),g=c(9259),h=c(61212),i=c(97879),j=c(466),k=c(97307),l=c(12217),m=a([g,h,i,j]);async function n(a){let b=await (0,g.d)();if(!b)return{success:!1,error:"Unauthorized"};try{let c=await (0,h.i1)({companyUuid:b.companyUuid,projectUuid:a.projectUuid,title:a.title,content:a.content||null,attachments:a.attachments||null,createdByUuid:b.actorUuid,isContainer:a.isContainer});return(0,f.revalidatePath)(`/projects/${a.projectUuid}/ideas`),{success:!0,ideaUuid:c.uuid}}catch(a){return k.default.error({err:a},"Failed to create idea"),{success:!1,error:"Failed to create idea"}}}async function o(a){let b=await (0,g.d)();if(!b)return{success:!1,error:"Unauthorized"};try{let c=await (0,h.JF)(a.ideaUuid,b.companyUuid,{title:a.title,content:a.content,...void 0!==a.isContainer?{isContainer:a.isContainer}:{}},{actorType:b.type,actorUuid:b.actorUuid});return(0,f.revalidatePath)(`/projects/${a.projectUuid}/ideas`),{success:!0,idea:c}}catch(a){return k.default.error({err:a},"Failed to update idea"),{success:!1,error:"Failed to update idea"}}}async function p(a,b){if(!await (0,g.d)())return{success:!1,error:"Unauthorized"};try{return await (0,h.Nm)(a),(0,f.revalidatePath)(`/projects/${b}/ideas`),{success:!0}}catch(a){return k.default.error({err:a},"Failed to delete idea"),{success:!1,error:"Failed to delete idea"}}}async function q(a){let b=await (0,g.d)();if(!b)return{success:!1,error:"Unauthorized"};try{let{ideas:c}=await (0,h.BB)({companyUuid:b.companyUuid,projectUuid:a,skip:0,take:1e3}),d=c.map(a=>a.uuid),[e,f]=await Promise.all([d.length>0?(0,i.e1)(b.companyUuid,d):Promise.resolve({usedIdeas:[]}),d.length>0?(0,j.uA)(b.companyUuid,"idea",d):Promise.resolve({})]),g=e.usedIdeas.map(a=>a.uuid),k={};for(let a of e.usedIdeas)k[a.uuid]=a.proposalUuid;let l=c.map(a=>({...a,commentCount:f[a.uuid]||0}));return{success:!0,data:{ideas:l,usedIdeaUuids:g,ideaProposalMap:k}}}catch(a){return k.default.error({err:a},"Failed to fetch ideas"),{success:!1,error:"Failed to fetch ideas"}}}[g,h,i,j]=m.then?(await m)():m,(0,l.D)([n,o,p,q]),(0,e.A)(n,"409738dc783161384996425ace00e6771bcc572099",null),(0,e.A)(o,"40e38433cde1dcb8df8a66b464be3204206d8b92dd",null),(0,e.A)(p,"600a43e0d4652a32be8b460f5b5c4df300a01a0c6a",null),(0,e.A)(q,"40606c28d692fec7fbfa616490bdebd74129f99a9d",null),d()}catch(a){d(a)}})},45133:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{X:()=>i,y:()=>h});var e=c(71255),f=c(89998),g=a([e,f]);[e,f]=g.then?(await g)():g;let i={NO_APPROVED_PROPOSAL:"no_approved_proposal",NO_UNFINISHED_TASKS:"no_unfinished_tasks"},j=["done","closed"],k={action:"start_development",precondition:async({companyUuid:a,ideaUuid:b,idea:c})=>{if("agent"!==c.assigneeType&&"agent_instance"!==c.assigneeType)throw new f.$("ASSIGNEE_NOT_AGENT","The Idea's assignee is not an agent — there is no daemon to wake");let d=await e.z.proposal.findFirst({where:{companyUuid:a,projectUuid:c.projectUuid,status:"approved",inputUuids:{array_contains:[b]}},select:{uuid:!0},orderBy:{createdAt:"desc"}});if(!d)throw new f.$("PRECONDITION_FAILED","The Idea has no approved proposal",i.NO_APPROVED_PROPOSAL);let g=await e.z.task.count({where:{companyUuid:a,proposalUuid:d.uuid,status:{notIn:j}}});if(0===g)throw new f.$("PRECONDITION_FAILED","All tasks of the approved proposal are finished",i.NO_UNFINISHED_TASKS);return{proposalUuid:d.uuid,remainingTasks:g}},offlinePolicy:"require_online"};async function h({companyUuid:a,ideaUuid:b,actorUuid:c,actorType:d}){await (0,f.u)(k,{companyUuid:a,ideaUuid:b,actorUuid:c,actorType:d})}d()}catch(a){d(a)}})},45985:(a,b,c)=>{c.d(b,{e:()=>e});var d=c(42377);let e=(0,d.createServerReference)("40f3712be5d58ae98a7f02101c499dd531a400f6b0",d.callServer,void 0,d.findSourceMapURL,"verifyElaborationAction")},55665:(a,b,c)=>{c.d(b,{R:()=>w});var d=c(10837),e=c(21968),f=c(68884),g=c(9222),h=c(21790),i=c(49102),j=c(20447),k=c(67832),l=c(87461),m=c(9810),n=c(86460),o=c(42424),p=c(9994),q=c(82658),r=c(42377);let s=(0,r.createServerReference)("70f675d4e11730d294f429a214b4e3361504ba691b",r.callServer,void 0,r.findSourceMapURL,"submitElaborationAnswersAction");var t=c(42087);let u="__other__",v={functional:"functional",non_functional:"nonFunctional",business_context:"businessContext",technical_context:"technicalContext",user_scenario:"userScenario",scope:"scope"};function w({ideaUuid:a,elaboration:b,onRefresh:c}){let e=(0,g.c)("elaboration"),h=(0,f.r)();if(!b||0===b.rounds.length)return null;let{summary:i,rounds:j}=b;return(0,d.jsxs)("div",{className:"space-y-3",children:[(0,d.jsxs)("div",{className:"flex items-center justify-between",children:[(0,d.jsx)("label",{className:"text-[11px] font-medium uppercase tracking-wide text-muted-foreground",children:e("title")}),(0,d.jsx)("span",{className:"text-xs font-medium text-primary",children:e("answeredCounter",{answered:i.answeredQuestions,total:i.totalQuestions})})]}),(0,d.jsx)("div",{className:"space-y-2.5",children:j.map(b=>(0,d.jsx)(x,{round:b,ideaUuid:a,onAnswered:async()=>{await c?.(),h.refresh()}},b.uuid))})]})}function x({round:a,ideaUuid:b,onAnswered:c}){let f=(0,g.c)("elaboration"),j="pending_answers"===a.status,k="answered"===a.status||"validated"===a.status||"needs_followup"===a.status,[l,m]=(0,e.useState)(j);return(0,d.jsx)(q.Nt,{open:l,onOpenChange:m,children:(0,d.jsxs)("div",{className:"overflow-hidden rounded-xl border border-border bg-card",children:[(0,d.jsx)(q.R6,{asChild:!0,children:(0,d.jsxs)("button",{type:"button",className:`flex w-full items-center justify-between px-4 py-3 text-left transition-colors cursor-pointer hover:bg-background ${l?"bg-[#F7F6F3] dark:bg-[#1e1d1b] border-b border-border":""}`,children:[(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[l?(0,d.jsx)(h.A,{className:"h-4 w-4 text-muted-foreground"}):(0,d.jsx)(i.A,{className:"h-4 w-4 text-muted-foreground"}),(0,d.jsx)("span",{className:`flex h-[22px] w-[22px] shrink-0 items-center justify-center rounded-full text-[11px] font-semibold text-white ${j?"bg-primary":"bg-[#888780]"}`,children:a.roundNumber}),(0,d.jsx)("span",{className:"text-[13px] font-semibold text-foreground",children:f("roundLabel",{number:a.roundNumber})}),a.isAppended&&(0,d.jsx)("span",{className:"rounded bg-[#EDE7F6] dark:bg-[#221833] px-2 py-0.5 text-[10px] font-medium text-[#6A4FB6] dark:text-[#A99FF0]",children:f("appendedBadge")}),!l&&(0,d.jsxs)("span",{className:"text-xs text-muted-foreground",children:["\xb7 ",f("questionCount",{count:a.questions.length})]})]}),k?(0,d.jsx)("span",{className:"rounded bg-[#E8F5E9] dark:bg-[#14281a] px-2 py-0.5 text-[10px] font-medium text-[#2E7D32] dark:text-[#5FD07E]",children:f("statusAnswered")}):(0,d.jsx)("span",{className:"rounded bg-[#FFF3E0] dark:bg-[#3a2a12] px-2 py-0.5 text-[10px] font-medium text-[#E65100] dark:text-[#F0A050]",children:f("pendingAnswers")})]})}),(0,d.jsx)(q.Ke,{children:j?(0,d.jsx)(z,{round:a,ideaUuid:b,onAnswered:c}):(0,d.jsx)(y,{round:a})})]})})}function y({round:a}){let b=(0,g.c)("elaboration");return(0,d.jsx)("div",{className:"space-y-4 px-4 py-4",children:a.questions.map((c,e)=>{let f=c.answer?.selectedOptionId?c.options.find(a=>a.id===c.answer?.selectedOptionId):null,g=c.answer?.customText||f?.label||b("noAnswer"),h=v[c.category]||c.category;return(0,d.jsxs)("div",{children:[(0,d.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,d.jsxs)("span",{className:"text-xs leading-relaxed text-muted-foreground",children:["Q: ",c.text]}),(0,d.jsx)("span",{className:"shrink-0 text-[11px] italic text-[#B0B0B0]",children:b(`category.${h}`)})]}),(0,d.jsxs)("p",{className:"mt-1 text-xs font-medium leading-relaxed text-foreground",children:["A: ",g]}),e<a.questions.length-1&&(0,d.jsx)("div",{className:"mt-4 h-px bg-[#F0EEEA] dark:bg-[#1f1e1c]"})]},c.uuid)})})}function z({round:a,ideaUuid:b,onAnswered:c}){let f=(0,g.c)("elaboration"),[h,q]=(0,e.useState)(0),r=(0,e.useRef)(h),[w,x]=(0,e.useState)("right"),[y,z]=(0,e.useState)({}),[A,B]=(0,e.useState)(!1),[C,D]=(0,e.useState)(null),E=(0,e.useCallback)((a,b)=>{x("left"===b?"right":"left"),q(a)},[]),F=a.questions,G=F[h],H=v[G.category]||G.category,I=(0,e.useCallback)((a,b)=>{if(z(c=>({...c,[a]:{questionId:a,selectedOptionId:b===u?null:b,customText:b===u?c[a]?.customText||"":null}})),b!==u){let a=Math.min(F.length-1,r.current+1);a!==r.current&&setTimeout(()=>E(a,"left"),200)}},[F.length,E]),J=(0,e.useCallback)((a,b)=>{z(c=>({...c,[a]:{...c[a],questionId:a,selectedOptionId:null,customText:b}}))},[]),K=F.filter(a=>a.required).every(a=>{let b=y[a.questionId];return!!b&&!!(b.selectedOptionId||b.customText&&b.customText.trim())}),L=async()=>{B(!0),D(null);let d=Object.values(y),e=await s(b,a.uuid,d);e.success?(await c(),B(!1)):(B(!1),D(e.error||f("submitFailed")))},M=(a=>{let b=y[a];return b?null===b.selectedOptionId&&null!==b.customText&&void 0!==b.customText?u:b.selectedOptionId||null:null})(G.questionId),N=M===u,O=h===F.length-1,P=!!(y[G.questionId]?.customText??"").trim();return(0,d.jsxs)("div",{className:"overflow-hidden p-3.5",children:[(0,d.jsxs)("div",{className:"right"===w?"animate-in slide-in-from-right-4 duration-200":"animate-in slide-in-from-left-4 duration-200",children:[(0,d.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,d.jsx)("div",{className:"flex-1 text-sm text-muted-foreground",children:G.text}),(0,d.jsxs)("div",{className:"flex shrink-0 items-center gap-1",children:[(0,d.jsx)(o.$,{variant:"ghost",size:"icon",onClick:()=>E(h-1,"right"),disabled:0===h,className:"h-7 w-7 text-muted-foreground disabled:opacity-30",children:(0,d.jsx)(j.A,{className:"h-4 w-4"})}),(0,d.jsx)("span",{className:"text-xs text-muted-foreground",children:f("navCounter",{current:h+1,total:F.length})}),(0,d.jsx)(o.$,{variant:"ghost",size:"icon",onClick:()=>E(h+1,"left"),disabled:h===F.length-1,className:"h-7 w-7 text-muted-foreground disabled:opacity-30",children:(0,d.jsx)(i.A,{className:"h-4 w-4"})})]})]}),(0,d.jsxs)("div",{className:"mt-3",children:[G.options.map((a,b)=>{let c=M===a.id;return(0,d.jsxs)("div",{children:[(0,d.jsxs)(o.$,{variant:"ghost",onClick:()=>I(G.questionId,a.id),className:`flex w-full items-start justify-between gap-2.5 px-3.5 py-3 h-auto text-left transition-colors rounded-none ${c?"bg-[#F7F6F3] dark:bg-[#1e1d1b]":"hover:bg-background"}`,children:[(0,d.jsxs)("span",{className:"flex flex-1 min-w-0 items-start gap-2.5",children:[(0,d.jsx)("span",{className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-md bg-border text-xs font-medium text-foreground/80",children:b+1}),(0,d.jsxs)("span",{className:"flex min-w-0 flex-1 flex-col items-start",children:[(0,d.jsx)("span",{className:"whitespace-normal [overflow-wrap:anywhere] text-[13px] text-foreground",children:a.label}),a.description&&(0,d.jsx)("span",{className:"whitespace-normal [overflow-wrap:anywhere] text-[11px] text-muted-foreground",children:a.description})]})]}),c&&(0,d.jsx)(k.A,{className:"mt-1 h-4 w-4 shrink-0 text-muted-foreground"})]}),b<G.options.length-1&&(0,d.jsx)("div",{className:"h-px bg-[#F0EEEA] dark:bg-[#1f1e1c]"})]},a.id)}),(0,d.jsx)("div",{className:"h-px bg-[#F0EEEA] dark:bg-[#1f1e1c]"}),(0,d.jsxs)("div",{className:`flex w-full items-center gap-2.5 px-3.5 py-3 transition-colors ${N?"bg-[#F7F6F3] dark:bg-[#1e1d1b]":"hover:bg-background"}`,children:[(0,d.jsx)("span",{className:"flex h-7 w-7 shrink-0 cursor-pointer items-center justify-center rounded-md bg-border",onClick:()=>I(G.questionId,u),children:(0,d.jsx)(l.A,{className:"h-3.5 w-3.5 text-muted-foreground"})}),N?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(p.p,{type:"text",value:y[G.questionId]?.customText||"",onChange:a=>J(G.questionId,a.target.value),onKeyDown:a=>{if((0,t.P)(a)||"Enter"!==a.key||a.shiftKey||a.ctrlKey||a.metaKey||(a.preventDefault(),O||!P))return;let b=r.current+1;setTimeout(()=>E(b,"left"),200)},placeholder:f("somethingElse"),className:"flex-1 border-none bg-transparent text-[13px] text-foreground placeholder:italic placeholder:text-[#B4B2A9] shadow-none focus-visible:ring-0",autoFocus:!0}),!O&&(0,d.jsx)(o.$,{type:"button",variant:"ghost",size:"icon",onClick:()=>{if(O||!P)return;let a=r.current+1;setTimeout(()=>E(a,"left"),200)},disabled:!P,"aria-label":f("confirmAnswerAria"),className:"h-7 w-7 text-muted-foreground disabled:opacity-30",children:(0,d.jsx)(m.A,{className:"h-4 w-4"})})]}):(0,d.jsx)(o.$,{variant:"ghost",onClick:()=>I(G.questionId,u),className:"flex-1 justify-start text-left text-[13px] italic text-muted-foreground h-auto p-0 hover:bg-transparent",children:f("somethingElse")})]})]})]},h),C&&(0,d.jsx)("div",{className:"mt-3 rounded-lg bg-destructive/10 p-2.5 text-[12px] text-destructive",children:C}),(0,d.jsxs)("div",{className:"mt-3 flex items-center justify-between",children:[(0,d.jsxs)("span",{className:"flex items-center gap-1.5 text-[11px] text-[#B0B0B0]",children:[(0,d.jsx)("span",{className:"inline-block h-1.5 w-1.5 rounded-full bg-primary"}),f(`category.${H}`)]}),(0,d.jsx)(o.$,{onClick:L,disabled:!K||A,className:"bg-primary hover:bg-[#B56A42] text-white text-[13px]",children:A?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(n.A,{className:"mr-2 h-3.5 w-3.5 animate-spin"}),f("submitting")]}):f("submitAnswers")})]})]})}},56481:(a,b,c)=>{c.d(b,{x:()=>e});var d=c(42377);let e=(0,d.createServerReference)("40b8625b762e80ded31270d8ca5137f20376bad24a",d.callServer,void 0,d.findSourceMapURL,"getIdeaActivitiesAction")},57644:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{Qd:()=>r,U$:()=>w,UN:()=>u,WD:()=>y,co:()=>v,cq:()=>q,d1:()=>z,nR:()=>s,s$:()=>x,wm:()=>t,zS:()=>A});var e=c(2613);c(50785);var f=c(9259),g=c(61212),h=c(97879),i=c(53870),j=c(50530),k=c(33994),l=c(4284),m=c(23733),n=c(97307),o=c(12217),p=a([f,g,h,i,j,k,l,m]);async function q(a){let b=await (0,f.d)();if(!b)return{success:!1,error:"Unauthorized"};let c=await (0,g.Zl)(b.companyUuid,a);return c?{success:!0,data:c}:{success:!1,error:"Not found"}}async function r(a){let b=await (0,f.d)();if(!b)return{success:!1,error:"Unauthorized"};let c=await (0,j.gg)(b.companyUuid,a);return c?{success:!0,data:c}:{success:!1,error:"Not found"}}async function s(a,b){let c=await (0,f.d)();if(!c)return{success:!1,error:"Unauthorized"};try{let d=await (0,g.bY)(c.companyUuid,a,b,c.actorUuid,c.type);return{success:!0,moved:d.moved}}catch(a){return{success:!1,error:a instanceof Error?a.message:"Failed to move idea"}}}async function t(a,b){let c=await (0,f.d)();if(!c)return{success:!1,error:"Unauthorized"};try{let d=await (0,g.MY)(c.companyUuid,a);if(!d)return{success:!1,error:"Idea not found"};if(d.projectUuid===b)return{success:!1,error:"Idea is already in the target project"};let e=await (0,g.jJ)(c.companyUuid,a,b);return{success:!0,moved:e.moved}}catch(a){return n.default.error({err:a},"Failed to preview idea move"),{success:!1,error:a instanceof Error?a.message:"Failed to preview move"}}}async function u(a,b){let c=await (0,f.d)();if(!c)return{success:!1,error:"Unauthorized"};let d=await (0,h.fS)(c.companyUuid,a,b);return{success:!0,data:d}}async function v(a,b){let c=await (0,f.d)();if(!c)return{success:!1,error:"Unauthorized"};let{tasks:d}=await (0,j.Vk)({companyUuid:c.companyUuid,projectUuid:a,proposalUuids:[b],skip:0,take:100});return{success:!0,data:d}}async function w(a,b){let c=await (0,f.d)();if(!c)return{success:!1,error:"Unauthorized"};let d=(await (0,h.fS)(c.companyUuid,a,b)).filter(a=>"approved"===a.status).map(a=>a.uuid),e=await (0,i.yZ)(c.companyUuid,d,"report");return e.sort((a,b)=>new Date(b.createdAt).getTime()-new Date(a.createdAt).getTime()),{success:!0,data:e}}async function x(){let a=await (0,f.d)();if(!a)return{success:!1,error:"Unauthorized"};let[{projects:b},{groups:c}]=await Promise.all([(0,k.hF)({companyUuid:a.companyUuid,skip:0,take:100}),(0,l.a1)(a.companyUuid)]);return{success:!0,data:{projects:b,groups:c}}}async function y(a,b){let c=await (0,f.d)();if(!c)return{success:!1,error:"Unauthorized"};try{let d=await (0,g.EZ)(a,b,c.companyUuid,{actorType:c.type,actorUuid:c.actorUuid});return{success:!0,data:d}}catch(a){return{success:!1,error:a instanceof Error?a.message:"Failed to set parent"}}}async function z(a){let b=await (0,f.d)();if(!b)return{success:!1,error:"Unauthorized"};let{ideas:c,total:d}=await (0,g.BB)({companyUuid:b.companyUuid,projectUuid:a,skip:0,take:200});return{success:!0,data:c.map(a=>({uuid:a.uuid,title:a.title})),total:d,hasMore:d>c.length}}async function A(a){let b=await (0,f.d)();if(!b)return{success:!1,error:"Unauthorized"};try{let c=await (0,m.t8)({companyUuid:b.companyUuid,ideaUuid:a});return{success:!0,data:c}}catch(a){return n.default.error({err:a},"Failed to get elaboration"),{success:!1,error:a instanceof Error?a.message:"Failed to get elaboration"}}}[f,g,h,i,j,k,l,m]=p.then?(await p)():p,(0,o.D)([q,r,s,t,u,v,w,x,y,z,A]),(0,e.A)(q,"4073bea1815ec1c539b55d2d2dc5faab41a0e23cd0",null),(0,e.A)(r,"4030a3bbb4bc2de0d895737212ce66860c119a4b92",null),(0,e.A)(s,"60712e1056df20cbaa3226710490204911e3aa5737",null),(0,e.A)(t,"60c51385e30a1a2cf4e952e9a02883ea4d9637f0ba",null),(0,e.A)(u,"6056130d6ceed668a97fae21be3d6aeb924d59fe96",null),(0,e.A)(v,"60cee7db282b91cedacc7cb66d67ca06da5aab723f",null),(0,e.A)(w,"602d21bcd625795ba1f9e5862edad22b65a5b23536",null),(0,e.A)(x,"000582682b95747c59f4bbe5f98e8d7c124c25c20a",null),(0,e.A)(y,"60f3576c45315bff922023e407713a081300ba875b",null),(0,e.A)(z,"40223ebabd6ab6a5f697f3cf6e4d39974291395f34",null),(0,e.A)(A,"4069c4f02eea6ededf4db4a350419ce244c1458bb6",null),d()}catch(a){d(a)}})},58653:(a,b,c)=>{c.d(b,{U:()=>e});var d=c(42377);let e=(0,d.createServerReference)("7081e82b13cd847bc50d8be9c582077417de620ca6",d.callServer,void 0,d.findSourceMapURL,"reassignIdeaInstanceNoWakeAction")},60368:(a,b,c)=>{c.d(b,{h:()=>w});var d=c(10837),e=c(21968),f=c(9222),g=c(68884),h=c(76549),i=c(86460),j=c(56149),k=c(9810),l=c(55775),m=c(42424),n=c(2852),o=c(11568),p=c(10297),q=c(74113),r=c(96307),s=c(42377);let t=(0,s.createServerReference)("000582682b95747c59f4bbe5f98e8d7c124c25c20a",s.callServer,void 0,s.findSourceMapURL,"getProjectsAndGroupsAction");s.callServer,s.findSourceMapURL;let u=(0,s.createServerReference)("60712e1056df20cbaa3226710490204911e3aa5737",s.callServer,void 0,s.findSourceMapURL,"moveIdeaAction");var v=c(54722);function w({open:a,onOpenChange:b,ideaUuid:c,projectUuid:s,onMoved:w}){let x=(0,f.c)("ideas"),y=(0,f.c)("common"),z=(0,g.r)(),[A,B]=(0,e.useState)([]),[C,D]=(0,e.useState)(!1),[E,F]=(0,e.useState)(null),[G,H]=(0,e.useState)(!1),I=(()=>{if(!E)return null;for(let a of A){let b=a.projects.find(a=>a.uuid===E);if(b)return b.name}return null})(),[J,K]=(0,e.useState)(null),[L,M]=(0,e.useState)(!1),[N,O]=(0,e.useState)(null),[P,Q]=(0,e.useState)(!1),[R,S]=(0,e.useState)(null);(0,e.useRef)(0);let T=(0,e.useCallback)(a=>{a&&a.addEventListener("wheel",a=>a.stopPropagation(),{passive:!0})},[]);(0,e.useCallback)(async()=>{F(null),K(null),O(null),S(null),D(!0);try{let a=await t();if(a.success){let{projects:b,groups:c}=a.data,d=b.filter(a=>a.uuid!==s).map(a=>({uuid:a.uuid,name:a.name,groupUuid:a.groupUuid})),e=new Map;for(let a of c)e.set(a.uuid,a.name);let f=new Map,g=[];for(let a of d)a.groupUuid&&e.has(a.groupUuid)?(f.has(a.groupUuid)||f.set(a.groupUuid,{uuid:a.groupUuid,name:e.get(a.groupUuid),projects:[]}),f.get(a.groupUuid).projects.push({uuid:a.uuid,name:a.name})):g.push({uuid:a.uuid,name:a.name});let h=[...f.values()];g.length>0&&h.push({uuid:"ungrouped",name:x("ungrouped"),projects:g}),B(h)}}catch(a){v.q.error("Failed to load projects for move dialog:",a),B([])}D(!1)},[s,x]);let U=async()=>{if(E&&J&&!P){Q(!0),S(null);try{let a=await u(c,E);if(a.success){let d=a.moved;h.oR.success(x("moveDialog.successToast",{...d}),{action:{label:x("moveDialog.viewMovedIdea"),onClick:()=>{z.push(`/projects/${E}/dashboard?panel=${c}&tab=overview`)}}}),b(!1),z.refresh(),w(d)}else S(x("moveDialog.error",{message:a.error||x("moveFailed")}))}catch(a){S(x("moveDialog.error",{message:a instanceof Error?a.message:x("moveFailed")}))}Q(!1)}};return(0,d.jsx)(o.lG,{open:a,onOpenChange:b,children:(0,d.jsxs)(o.Cf,{children:[(0,d.jsxs)(o.c7,{children:[(0,d.jsx)(o.L3,{children:x("moveDialog.title")}),(0,d.jsx)(o.rr,{children:x("moveDialog.description")})]}),(0,d.jsxs)("div",{className:"space-y-3 pt-1",children:[(0,d.jsx)(n.J,{htmlFor:"move-target-project",className:"text-[13px] font-medium text-foreground",children:x("moveDialog.targetProjectLabel")}),C?(0,d.jsx)("div",{className:"flex items-center justify-center h-10 border border-border rounded-md",children:(0,d.jsx)(i.A,{className:"h-4 w-4 animate-spin text-muted-foreground"})}):(0,d.jsxs)(q.AM,{open:G,onOpenChange:H,children:[(0,d.jsx)(q.Wv,{asChild:!0,children:(0,d.jsxs)(m.$,{id:"move-target-project",variant:"outline",role:"combobox","aria-expanded":G,className:(0,r.cn)("w-full justify-between border-border font-normal",!I&&"text-muted-foreground"),children:[I??x("moveDialog.targetProjectPlaceholder"),(0,d.jsx)(j.A,{className:"ml-2 h-4 w-4 shrink-0 opacity-50"})]})}),(0,d.jsx)(q.hl,{ref:T,className:"w-[--radix-popover-trigger-width] p-0 pointer-events-auto",align:"start",children:(0,d.jsxs)(p.uB,{children:[(0,d.jsx)(p.G7,{placeholder:x("moveDialog.searchProjects")}),(0,d.jsxs)(p.oI,{children:[(0,d.jsx)(p.xL,{children:x("noProjectsFound")}),A.map(a=>(0,d.jsx)(p.L$,{heading:a.name,children:a.projects.map(b=>(0,d.jsxs)(p.h_,{value:`${b.name} ${a.name}`,onSelect:()=>{F(b.uuid),H(!1)},children:[(0,d.jsx)(k.A,{className:(0,r.cn)("mr-2 h-4 w-4",E===b.uuid?"opacity-100":"opacity-0")}),b.name]},b.uuid))},a.uuid))]})]})})]}),E&&(0,d.jsx)("div",{role:"status","aria-live":"polite",className:"rounded-lg border border-border bg-background p-3 text-[13px] text-foreground",children:L?(0,d.jsxs)("div",{className:"flex items-center gap-2 text-muted-foreground",children:[(0,d.jsx)(i.A,{className:"h-3.5 w-3.5 animate-spin"}),(0,d.jsx)("span",{children:x("moveDialog.previewLoading")})]}):N?(0,d.jsxs)("div",{className:"flex items-start gap-2 text-destructive",children:[(0,d.jsx)(l.A,{className:"mt-0.5 h-3.5 w-3.5 shrink-0"}),(0,d.jsx)("span",{children:N})]}):J?(0,d.jsxs)("div",{className:"space-y-1",children:[(0,d.jsx)("p",{children:x("moveDialog.previewSummary",{...J})}),(0,d.jsx)("p",{className:"text-[12px] text-muted-foreground",children:x("moveDialog.previewWarning")})]}):null}),R&&(0,d.jsx)("p",{className:"text-xs text-destructive",role:"alert",children:R})]}),(0,d.jsxs)("div",{className:"flex justify-end gap-3 pt-2",children:[(0,d.jsx)(m.$,{variant:"outline",className:"border-border",onClick:()=>b(!1),disabled:P,children:y("cancel")}),(0,d.jsx)(m.$,{className:"bg-primary hover:bg-[#B56A42] text-white",onClick:U,disabled:!E||!J||P||L,children:P?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(i.A,{className:"mr-2 h-4 w-4 animate-spin"}),x("moving")]}):x("moveDialog.confirm")})]})]})})}},63534:(a,b,c)=>{c.d(b,{J:()=>e});var d=c(42377);let e=(0,d.createServerReference)("40e38433cde1dcb8df8a66b464be3204206d8b92dd",d.callServer,void 0,d.findSourceMapURL,"updateIdeaAction")},70672:(a,b,c)=>{c.d(b,{s:()=>w});var d=c(10837),e=c(21968),f=c(9222),g=c(76549),h=c(77840),i=c(86460),j=c(42424),k=c(6019),l=c(99127),m=c(70028);let n=new Set(["done","closed"]);function o({assignee:a,proposals:b,tasks:c}){return!!a&&("agent"===a.type||"agent_instance"===a.type)&&!(b&&b.some(a=>"approved"===a.status)&&c&&0!==c.length&&c.every(a=>n.has(a.status)))}var p=c(42377);let q=(0,p.createServerReference)("406e93fba2afac7a36110b7e7e263c77bba201447d",p.callServer,void 0,p.findSourceMapURL,"yoloRequestedAction");var r=c(58653),s=c(76799),t=c(77078);let u={unauthorized:"errorGeneric",not_human:"errorGeneric",idea_not_found:"errorGeneric",assignee_not_agent:"errorAssigneeNotAgent",agent_offline:"errorAgentOffline",instance_offline:"errorInstanceOffline",unknown:"errorGeneric"},v="bg-[#7F5AF0] hover:bg-[#6D48DE] dark:bg-[#6E56C8] dark:hover:bg-[#7C63D8] text-white";function w({ideaUuid:a,assignee:b,assigneeName:c,proposals:n,tasks:p,onStarted:w}){var x;let y=(0,f.c)("yolo"),z=(0,m.kz)()?.connections??[],[A,B]=(0,e.useState)(!1),[C,D]=(0,e.useState)(!1),[E,F]=(0,e.useState)(!1),{start:G,pickerState:H,confirmPick:I,cancelPick:J,isResolving:K}=(0,s.E)({reassignNoWake:r.U}),L=b?"agent"===b.type?b.uuid:"agent_instance"===b.type?b.instance?.agentUuid??null:null:null,M=null!==L&&z.some(a=>a.agentUuid===L&&"online"===a.effectiveStatus),N=o({assignee:b,proposals:n,tasks:p}),O=o(x={assignee:b,proposals:n,tasks:p,agentOnline:M})&&x.agentOnline;if(!N||C)return C?(0,d.jsx)("span",{className:"text-[11px] text-[#00796B] dark:text-[#4FD1C0]",children:y("startedHint")}):null;let P=async()=>{B(!0);let b=await q(a);B(!1),b.success?(D(!0),g.oR.success(y("startedHint")),w?.()):g.oR.error(y(u[b.errorCode??"unknown"]))};return M?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)(k.Lt,{open:E,onOpenChange:F,children:[(0,d.jsx)(k.tv,{asChild:!0,children:(0,d.jsxs)(j.$,{className:v,disabled:!O,children:[(0,d.jsx)(h.A,{className:"mr-2 h-4 w-4"}),y("button")]})}),(0,d.jsxs)(k.EO,{children:[(0,d.jsxs)(k.wd,{children:[(0,d.jsx)(k.r7,{children:y("confirmTitle")}),(0,d.jsx)(k.$v,{children:y("confirmDescription")})]}),(0,d.jsxs)(k.ck,{children:[(0,d.jsx)(k.Zr,{disabled:A,children:y("cancel")}),(0,d.jsx)(j.$,{className:v,onClick:()=>{F(!1),G({ideaUuid:a,wake:P})},disabled:A||K,children:A?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(i.A,{className:"mr-2 h-4 w-4 animate-spin"}),y("starting")]}):y("confirmCta")})]})]})]}),(0,d.jsx)(t.V,{open:null!==H,agentName:c??"",instances:H?.instances??[],onConfirm:I,onCancel:J})]}):(0,d.jsx)(l.Bc,{delayDuration:300,children:(0,d.jsxs)(l.m_,{children:[(0,d.jsx)(l.k$,{asChild:!0,children:(0,d.jsx)("span",{tabIndex:0,className:"inline-flex",children:(0,d.jsxs)(j.$,{className:v,disabled:!0,children:[(0,d.jsx)(h.A,{className:"mr-2 h-4 w-4"}),y("button")]})})}),(0,d.jsx)(l.ZI,{children:y("offlineHint")})]})})}},70730:(a,b,c)=>{c.d(b,{z:()=>e});var d=c(42377);let e=(0,d.createServerReference)("4007b48e3b837335975b30de60c071ca7466c33bee",d.callServer,void 0,d.findSourceMapURL,"getElaborationAction")},76799:(a,b,c)=>{c.d(b,{E:()=>h});var d=c(21968),e=c(54722),f=c(23871);async function g(a){try{let b=await fetch(`/api/ideas/${encodeURIComponent(a)}/wake-preview`,{headers:{Accept:"application/json"}});if(!b.ok)return null;let c=await b.json();if(!c.success||!c.data)return null;return c.data}catch(a){return e.q.error("wake-target preview fetch failed",a),null}}function h({fetchPreview:a=g,reassignNoWake:b}){let[c,h]=(0,d.useState)(null),[i,j]=(0,d.useState)(!1),[k,l]=(0,d.useState)(null),m=(0,d.useCallback)(async(a,c,d)=>{try{let f=await b(a,c,d);f.success||e.q.debug("pin-then-wake reassign did not persist (continuing to wake)",f.error)}catch(a){e.q.error("pin-then-wake reassign threw (continuing to wake)",a)}},[b]),n=(0,d.useCallback)(async({ideaUuid:b,wake:c})=>{j(!0);let d=null;try{d=await a(b)}finally{j(!1)}if(!d||!d.assigneeAgentUuid||"direct"===d.outcome)return void await c();let e=d.assigneeAgentUuid,g=(0,f.C)(d.onlineInstances);if("pick"===d.outcome)return 0===g.length?void await c():(l({run:c}),void h({ideaUuid:b,agentUuid:e,instances:g}));if("auto_pin"===d.outcome){let a=g[0];a?.agentInstanceUuid&&await m(b,e,a.agentInstanceUuid),await c();return}},[a,m]),o=(0,d.useCallback)(async a=>{h(null),l(null),c&&k&&(a.agentInstanceUuid&&await m(c.ideaUuid,c.agentUuid,a.agentInstanceUuid),await k.run())},[c,k,m]);return{start:n,pickerState:c,confirmPick:o,cancelPick:(0,d.useCallback)(()=>{h(null),l(null)},[]),isResolving:i}}},77840:(a,b,c)=>{c.d(b,{A:()=>d});let d=(0,c(56556).A)("rocket",[["path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z",key:"m3kijz"}],["path",{d:"m12 15-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z",key:"1fmvmk"}],["path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0",key:"1f8sc4"}],["path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5",key:"qeys4"}]])},78144:(a,b,c)=>{c.d(b,{i:()=>x});var d=c(10837),e=c(21968),f=c(68884),g=c(9222),h=c(86460),i=c(16235),j=c(21692),k=c(97443),l=c(42424),m=c(94214),n=c(2852),o=c(11225),p=c(55732),q=c(23871),r=c(27696),s=c(42377);s.callServer,s.findSourceMapURL,s.callServer,s.findSourceMapURL;let t=(0,s.createServerReference)("40965ba7a25f92bd5be3008c3451c1964520a9ff6a",s.callServer,void 0,s.findSourceMapURL,"claimIdeaAction"),u=(0,s.createServerReference)("70e4d3b9ae4f81a9e35589c83befa5d4feec3fe5e7",s.callServer,void 0,s.findSourceMapURL,"claimIdeaToAgentAction"),v=(0,s.createServerReference)("60032c5d80dd7193aa504c12b68e99a863f343de0e",s.callServer,void 0,s.findSourceMapURL,"claimIdeaToUserAction"),w=(0,s.createServerReference)("40858e27e8a24d2dd55d3b43603d8216b69ecbae26",s.callServer,void 0,s.findSourceMapURL,"releaseIdeaAction");function x({idea:a,projectUuid:b,currentUserUuid:c,onClose:s}){let x=(0,g.c)(),y=(0,f.r)(),[z,A]=(0,e.useState)(!1),[B,C]=(0,e.useState)("self"),[D,E]=(0,e.useState)(""),[F,G]=(0,e.useState)(""),[H,I]=(0,e.useState)([]),[J,K]=(0,e.useState)([]),[L,M]=(0,e.useState)(!0),[N,O]=(0,e.useState)(null),[P,Q]=(0,e.useState)([]),[R,S]=(0,e.useState)(!1),[T,U]=(0,e.useState)(null),V=!!a.assignee,W=P.find(a=>a.connectionUuid===T)??null,X=new Set(P.map(a=>a.host)).size>1,Y=async()=>{let b;if(A(!0),O(null),"self"===B)b=await t(a.uuid);else if("agent"===B&&D)b=await u(a.uuid,D,W?.agentInstanceUuid??void 0);else if("user"===B&&F)b=await v(a.uuid,F);else{if("release"!==B)return void A(!1);b=await w(a.uuid)}A(!1),b?.success?(y.refresh(),s()):b?.error&&O(b.error)},Z="self"===B||"agent"===B&&D||"user"===B&&F||"release"===B&&V;return(0,d.jsxs)(m._8,{open:!0,onOpenChange:a=>{a||s()},className:"bg-card sm:max-w-[400px]",header:(0,d.jsx)(m.AI,{className:"text-base font-semibold text-foreground",children:x("ideas.assignIdea")}),footer:(0,d.jsxs)("div",{className:"flex w-full items-center justify-end gap-4",children:[(0,d.jsx)(l.$,{variant:"outline",onClick:s,disabled:z,className:"border-border",children:x("common.cancel")}),(0,d.jsx)(l.$,{onClick:Y,disabled:z||!Z,className:"bg-primary hover:bg-[#B56A42] text-white",children:z?(0,d.jsx)(h.A,{className:"h-4 w-4 animate-spin"}):"release"===B?x("common.release"):function(){if("agent"!==B||!W)return x("common.assign");let a=(0,r.kn)(W.cwd),b=a.isUnknown?x(a.label):a.label,c=(0,r.g9)(W.host),d=c.isUnknown?x(c.label):c.label;return X?x("assignInstance.assignToWithHost",{path:b,host:d}):x("assignInstance.assignTo",{path:b})}()})]}),bodyClassName:"space-y-4",children:[(0,d.jsxs)("div",{className:"rounded-lg bg-background p-3",children:[(0,d.jsx)("p",{className:"text-[13px] font-medium text-foreground",children:a.title}),a.content&&(0,d.jsx)("p",{className:"mt-1 text-[11px] text-muted-foreground line-clamp-2",children:a.content})]}),V&&(0,d.jsx)("div",{className:"rounded-lg bg-[#E3F2FD] dark:bg-[#13253a] p-3",children:(0,d.jsxs)("p",{className:"text-xs text-[#1976D2] dark:text-[#5AA9F0]",children:[x("common.currentAssignee"),": ",(0,d.jsx)("span",{className:"font-medium",children:a.assignee?.name})]})}),N&&(0,d.jsx)("div",{className:"rounded-lg bg-[#FEE2E2] dark:bg-[#331619] p-3",children:(0,d.jsx)("p",{className:"text-xs text-[#D32F2F] dark:text-[#F08078]",children:N})}),(0,d.jsx)("p",{className:"text-[13px] text-muted-foreground",children:x("ideas.selectIdeaAssignee")}),L?(0,d.jsx)("div",{className:"flex items-center justify-center py-8",children:(0,d.jsx)(h.A,{className:"h-6 w-6 animate-spin text-[#9A9A9A]"})}):(0,d.jsxs)(o.z,{value:B,onValueChange:a=>C(a),className:"space-y-3",children:[(0,d.jsxs)("div",{className:`rounded-[10px] p-4 transition-colors cursor-pointer ${"self"===B?"bg-[#FDF8F6] dark:bg-[#201d1b] border-2 border-primary":"bg-card border border-border hover:border-primary/50"}`,onClick:()=>C("self"),children:[(0,d.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,d.jsx)(o.C,{value:"self",id:"idea-self",className:"border-primary text-primary"}),(0,d.jsx)(n.J,{htmlFor:"idea-self",className:"text-sm font-medium text-foreground cursor-pointer",children:x("assign.assignToMyself")})]}),(0,d.jsx)("p",{className:"mt-2 ml-6 text-xs text-muted-foreground leading-relaxed",children:x("ideas.assignToMyselfIdeaDesc")})]}),(0,d.jsxs)("div",{className:`rounded-[10px] p-4 transition-colors ${"agent"===B?"bg-[#FDF8F6] dark:bg-[#201d1b] border-2 border-primary":"bg-card border border-border"}`,children:[(0,d.jsxs)("div",{className:"flex items-center gap-2.5 cursor-pointer",onClick:()=>C("agent"),children:[(0,d.jsx)(o.C,{value:"agent",id:"idea-agent",className:"border-primary text-primary"}),(0,d.jsx)(n.J,{htmlFor:"idea-agent",className:"text-sm font-medium text-foreground cursor-pointer",children:x("ideas.orAssignToPmAgent")})]}),(0,d.jsx)("p",{className:"mt-2 ml-6 text-xs text-muted-foreground leading-relaxed",children:x("ideas.onlySelectedPmAgentCanWork")}),"agent"===B&&(0,d.jsxs)("div",{className:"mt-3 ml-6 space-y-3",children:[(0,d.jsxs)(p.l6,{value:D,onValueChange:E,children:[(0,d.jsx)(p.bq,{className:"w-full border-border",children:(0,d.jsx)(p.yv,{placeholder:x("ideas.selectPmAgent")})}),(0,d.jsx)(p.gC,{className:"z-[120]",children:H.length>0?H.map(a=>(0,d.jsx)(p.eb,{value:a.uuid,children:(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)(i.A,{className:"h-4 w-4 text-primary"}),(0,d.jsx)("span",{children:a.name})]})},a.uuid)):(0,d.jsx)("div",{className:"px-3 py-2 text-xs text-[#9A9A9A]",children:x("ideas.noPmAgentsAvailable")})})]}),D&&(0,d.jsxs)("div",{className:"space-y-2",children:[(0,d.jsx)("span",{className:"text-[11px] font-medium uppercase tracking-wide text-[#9A9A9A]",children:x("assignInstance.workingDirectory")}),R?(0,d.jsxs)("div",{className:"flex items-center gap-2 py-2 text-xs text-[#9A9A9A]",children:[(0,d.jsx)(h.A,{className:"h-3.5 w-3.5 animate-spin"}),x("assignInstance.loadingInstances")]}):0===P.length?(0,d.jsx)("p",{className:"rounded-lg bg-background p-2.5 text-[11px] leading-relaxed text-muted-foreground",children:x("assignInstance.noInstances")}):(0,d.jsx)(q.O,{instances:P,selectedConnectionUuid:T,onSelect:a=>U(a.connectionUuid),ariaLabel:x("assignInstance.workingDirectory")}),(0,d.jsxs)("div",{className:"flex items-start gap-1.5 text-[11px] leading-relaxed text-[#9A8C7E]",children:[(0,d.jsx)(j.A,{className:"mt-0.5 h-3.5 w-3.5 shrink-0","aria-hidden":!0}),(0,d.jsx)("span",{children:x("assignInstance.ideaPinNote")})]})]})]})]}),(0,d.jsxs)("div",{className:`rounded-[10px] p-4 transition-colors ${"user"===B?"bg-[#FDF8F6] dark:bg-[#201d1b] border-2 border-primary":"bg-card border border-border"}`,children:[(0,d.jsxs)("div",{className:"flex items-center gap-2.5 cursor-pointer",onClick:()=>C("user"),children:[(0,d.jsx)(o.C,{value:"user",id:"idea-user",className:"border-primary text-primary"}),(0,d.jsx)(n.J,{htmlFor:"idea-user",className:"text-sm font-medium text-foreground cursor-pointer",children:x("assign.orAssignToUser")})]}),"user"===B&&(0,d.jsx)("div",{className:"mt-3 ml-6",children:(0,d.jsxs)(p.l6,{value:F,onValueChange:G,children:[(0,d.jsx)(p.bq,{className:"w-full border-border",children:(0,d.jsx)(p.yv,{placeholder:x("tasks.selectUser")})}),(0,d.jsx)(p.gC,{className:"z-[120]",children:J.length>0?J.map(a=>(0,d.jsx)(p.eb,{value:a.uuid,children:(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)(k.A,{className:"h-4 w-4 text-muted-foreground"}),(0,d.jsx)("span",{children:a.name||a.email})]})},a.uuid)):(0,d.jsx)("div",{className:"px-3 py-2 text-xs text-[#9A9A9A]",children:x("tasks.noUsersAvailable")})})]})})]}),V&&(0,d.jsxs)("div",{className:`rounded-[10px] p-4 transition-colors cursor-pointer ${"release"===B?"bg-[#FDF8F6] dark:bg-[#201d1b] border-2 border-primary":"bg-card border border-border hover:border-primary/50"}`,onClick:()=>C("release"),children:[(0,d.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,d.jsx)(o.C,{value:"release",id:"idea-release",className:"border-primary text-primary"}),(0,d.jsx)(n.J,{htmlFor:"idea-release",className:"text-sm font-medium text-foreground cursor-pointer",children:x("assign.releaseAssignee")})]}),(0,d.jsx)("p",{className:"mt-2 ml-6 text-xs text-muted-foreground leading-relaxed",children:x("ideas.releaseIdeaAssigneeDesc")})]})]})]})}},78231:(a,b,c)=>{c.d(b,{c:()=>e});var d=c(42377);let e=(0,d.createServerReference)("60cee7db282b91cedacc7cb66d67ca06da5aab723f",d.callServer,void 0,d.findSourceMapURL,"getTasksForProposalAction")},80041:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{x:()=>l});var e=c(2613);c(50785);var f=c(9259),g=c(67738),h=c(61212),i=c(97307),j=c(12217),k=a([f,g,h]);async function l(a){let b=await (0,f.d)();if(!b)return{activities:[],total:0};try{let c=await (0,h.MY)(b.companyUuid,a);if(!c)return{activities:[],total:0};return await (0,g.listActivitiesWithActorNames)({companyUuid:b.companyUuid,projectUuid:c.projectUuid,targetType:"idea",targetUuid:a,skip:0,take:50})}catch(a){return i.default.error({err:a},"Failed to get idea activities"),{activities:[],total:0}}}[f,g,h]=k.then?(await k)():k,(0,j.D)([l]),(0,e.A)(l,"40b8625b762e80ded31270d8ca5137f20376bad24a",null),d()}catch(a){d(a)}})},81606:(a,b,c)=>{c.d(b,{U:()=>e});var d=c(42377);let e=(0,d.createServerReference)("6056130d6ceed668a97fae21be3d6aeb924d59fe96",d.callServer,void 0,d.findSourceMapURL,"getProposalsForIdeaAction")},82870:(a,b,c)=>{c.a(a,async(a,b)=>{try{var d=c(71255),e=c(92633),f=c(30259),g=a([d,e,f]);[d,e,f]=g.then?(await g)():g,b()}catch(a){b(a)}})},84819:(a,b,c)=>{c.d(b,{Separator:()=>g});var d=c(10837);c(21968);var e=c(72229),f=c(96307);function g({className:a,orientation:b="horizontal",decorative:c=!0,...g}){return(0,d.jsx)(e.b,{"data-slot":"separator",decorative:c,orientation:b,className:(0,f.cn)("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",a),...g})}},85806:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{f0:()=>l});var e=c(33994),f=c(61212),g=c(50530),h=c(53870),i=c(97879),j=c(28774),k=c(466),l=c(67738),m=c(82870),n=c(23733),o=c(52768),p=a([e,f,g,h,i,j,k,l,m,n,o]);[e,f,g,h,i,j,k,l,m,n,o]=p.then?(await p)():p,d()}catch(a){d(a)}})},88124:(a,b,c)=>{c.d(b,{Z:()=>e});var d=c(42377);let e=(0,d.createServerReference)("600a43e0d4652a32be8b460f5b5c4df300a01a0c6a",d.callServer,void 0,d.findSourceMapURL,"deleteIdeaAction")},89998:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{$:()=>n,u:()=>m});var e=c(71255),f=c(62729),g=c(85806),h=c(92633),i=c(61076),j=a([e,g,h,i]);[e,g,h,i]=j.then?(await j)():j;class n extends Error{constructor(a,b,c){super(b),this.name="StageAdvanceError",this.code=a,this.reason=c}}async function k(a){let b=new Date(Date.now()-i.BP),c=await e.z.daemonConnection.findFirst({where:{agentUuid:a,status:"online",lastSeenAt:{gte:b}},select:{uuid:!0}});return null!==c}async function l(a,b){let c=await e.z.agentInstance.findFirst({where:{uuid:b,companyUuid:a},select:{agentUuid:!0,host:!0,cwd:!0}});if(!c)return!1;let d=new Date(Date.now()-i.BP),f=await e.z.daemonConnection.findFirst({where:{agentUuid:c.agentUuid,host:c.host,cwd:c.cwd,status:"online",lastSeenAt:{gte:d}},select:{uuid:!0}});return null!==f}async function m(a,{companyUuid:b,ideaUuid:c,actorUuid:d,actorType:i}){if("user"!==i&&"super_admin"!==i)throw new n("NOT_HUMAN","Only users can perform a stage-advance action");let j=await e.z.idea.findFirst({where:{uuid:c,companyUuid:b}});if(!j)throw new n("IDEA_NOT_FOUND","Idea not found");let m={companyUuid:b,ideaUuid:c,actorUuid:d,actorType:i,idea:{uuid:j.uuid,companyUuid:j.companyUuid,projectUuid:j.projectUuid,status:j.status,elaborationStatus:j.elaborationStatus,assigneeType:j.assigneeType,assigneeUuid:j.assigneeUuid}},o=await a.precondition(m);if("require_online"===a.offlinePolicy)if("agent_instance"===m.idea.assigneeType&&m.idea.assigneeUuid){if(!await l(b,m.idea.assigneeUuid))throw new n("INSTANCE_OFFLINE","The Idea is pinned to a daemon instance that has no online connection")}else{let a=await (0,h.wo)(b,m.idea.assigneeType,m.idea.assigneeUuid);if(!a)throw new n("ASSIGNEE_NOT_AGENT","The Idea's assignee is not an agent — there is no daemon to wake");if(!await k(a))throw new n("AGENT_OFFLINE","The assigned agent has no online daemon connection")}a.transition&&await a.transition(m),await g.f0.createActivity({companyUuid:b,projectUuid:m.idea.projectUuid,targetType:"idea",targetUuid:c,actorType:i,actorUuid:d,action:a.action,value:o}),f.B.emitChange({companyUuid:b,projectUuid:m.idea.projectUuid,entityType:"idea",entityUuid:c,action:"updated"})}d()}catch(a){d(a)}})},91117:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{E:()=>p,g:()=>o});var e=c(2613);c(50785);var f=c(5562),g=c(9259),h=c(45133),i=c(11166),j=c(89998),k=c(71255),l=c(97307),m=c(12217),n=a([g,h,i,j,k]);async function o(a){let b=await (0,g.d)();if(!b)return{success:!1,errorCode:"unauthorized"};if("user"!==b.type&&"super_admin"!==b.type)return{success:!1,errorCode:"not_human"};try{await (0,h.y)({companyUuid:b.companyUuid,ideaUuid:a,actorUuid:b.actorUuid,actorType:b.type});let c=await k.z.idea.findFirst({where:{uuid:a,companyUuid:b.companyUuid}});return c&&((0,f.revalidatePath)(`/projects/${c.projectUuid}/ideas/${a}`),(0,f.revalidatePath)(`/projects/${c.projectUuid}/ideas`)),{success:!0}}catch(b){return b instanceof j.$?l.default.info({code:b.code,reason:b.reason,ideaUuid:a},"Start development rejected"):l.default.error({err:b,ideaUuid:a},"Failed to start development"),{success:!1,errorCode:function(a){if(a instanceof j.$)switch(a.code){case"NOT_HUMAN":return"not_human";case"IDEA_NOT_FOUND":return"idea_not_found";case"ASSIGNEE_NOT_AGENT":return"assignee_not_agent";case"AGENT_OFFLINE":return"agent_offline";case"INSTANCE_OFFLINE":return"instance_offline";case"PRECONDITION_FAILED":if(a.reason===h.X.NO_APPROVED_PROPOSAL)return"no_approved_proposal";if(a.reason===h.X.NO_UNFINISHED_TASKS)return"no_unfinished_tasks"}return"unknown"}(b)}}}async function p(a){let b=await (0,g.d)();if(!b)return{success:!1,errorCode:"unauthorized"};if("user"!==b.type&&"super_admin"!==b.type)return{success:!1,errorCode:"not_human"};try{await (0,i.p)({companyUuid:b.companyUuid,ideaUuid:a,actorUuid:b.actorUuid,actorType:b.type});let c=await k.z.idea.findFirst({where:{uuid:a,companyUuid:b.companyUuid}});return c&&((0,f.revalidatePath)(`/projects/${c.projectUuid}/ideas/${a}`),(0,f.revalidatePath)(`/projects/${c.projectUuid}/ideas`)),{success:!0}}catch(b){return b instanceof j.$?l.default.info({code:b.code,reason:b.reason,ideaUuid:a},"Yolo request rejected"):l.default.error({err:b,ideaUuid:a},"Failed to request yolo"),{success:!1,errorCode:function(a){if(a instanceof j.$)switch(a.code){case"NOT_HUMAN":return"not_human";case"IDEA_NOT_FOUND":return"idea_not_found";case"ASSIGNEE_NOT_AGENT":return"assignee_not_agent";case"AGENT_OFFLINE":return"agent_offline";case"INSTANCE_OFFLINE":return"instance_offline"}return"unknown"}(b)}}}[g,h,i,j,k]=n.then?(await n)():n,(0,m.D)([o,p]),(0,e.A)(o,"40fc05360046257fb71d722bd23527974a2e77d817",null),(0,e.A)(p,"406e93fba2afac7a36110b7e7e263c77bba201447d",null),d()}catch(a){d(a)}})}};