@chorus-aidlc/chorus 0.16.4 → 0.17.1

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 (568) hide show
  1. package/.next/standalone/.next/BUILD_ID +1 -1
  2. package/.next/standalone/.next/app-build-manifest.json +511 -511
  3. package/.next/standalone/.next/app-path-routes-manifest.json +47 -47
  4. package/.next/standalone/.next/build-manifest.json +6 -6
  5. package/.next/standalone/.next/prerender-manifest.json +42 -42
  6. package/.next/standalone/.next/react-loadable-manifest.json +1 -1
  7. package/.next/standalone/.next/required-server-files.json +4 -4
  8. package/.next/standalone/.next/server/app/(dashboard)/project-groups/[uuid]/page.js +2 -2
  9. package/.next/standalone/.next/server/app/(dashboard)/project-groups/[uuid]/page.js.nft.json +1 -1
  10. package/.next/standalone/.next/server/app/(dashboard)/project-groups/[uuid]/page_client-reference-manifest.js +1 -1
  11. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/activity/page.js +2 -2
  12. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/activity/page.js.nft.json +1 -1
  13. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/activity/page_client-reference-manifest.js +1 -1
  14. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/dashboard/[ideaUuid]/page.js +2 -2
  15. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/dashboard/[ideaUuid]/page.js.nft.json +1 -1
  16. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/dashboard/[ideaUuid]/page_client-reference-manifest.js +1 -1
  17. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/dashboard/page.js +2 -2
  18. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/dashboard/page.js.nft.json +1 -1
  19. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/dashboard/page_client-reference-manifest.js +1 -1
  20. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/documents/[documentUuid]/page.js +2 -2
  21. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/documents/[documentUuid]/page.js.nft.json +1 -1
  22. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/documents/[documentUuid]/page_client-reference-manifest.js +1 -1
  23. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/documents/page.js +2 -2
  24. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/documents/page.js.nft.json +1 -1
  25. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/documents/page_client-reference-manifest.js +1 -1
  26. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/graph/page.js +2 -2
  27. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/graph/page.js.nft.json +1 -1
  28. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/graph/page_client-reference-manifest.js +1 -1
  29. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/proposals/[proposalUuid]/page.js +2 -2
  30. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/proposals/[proposalUuid]/page.js.nft.json +1 -1
  31. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/proposals/[proposalUuid]/page_client-reference-manifest.js +1 -1
  32. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/proposals/new/page.js +2 -2
  33. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/proposals/new/page.js.nft.json +1 -1
  34. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/proposals/new/page_client-reference-manifest.js +1 -1
  35. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/proposals/page.js +2 -2
  36. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/proposals/page.js.nft.json +1 -1
  37. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/proposals/page_client-reference-manifest.js +1 -1
  38. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/tasks/[taskUuid]/page.js +2 -2
  39. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/tasks/[taskUuid]/page.js.nft.json +1 -1
  40. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/tasks/[taskUuid]/page_client-reference-manifest.js +1 -1
  41. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/tasks/page.js +2 -2
  42. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/tasks/page.js.nft.json +1 -1
  43. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/tasks/page_client-reference-manifest.js +1 -1
  44. package/.next/standalone/.next/server/app/(dashboard)/projects/page.js +3 -3
  45. package/.next/standalone/.next/server/app/(dashboard)/projects/page.js.nft.json +1 -1
  46. package/.next/standalone/.next/server/app/(dashboard)/projects/page_client-reference-manifest.js +1 -1
  47. package/.next/standalone/.next/server/app/(dashboard)/settings/page.js +2 -2
  48. package/.next/standalone/.next/server/app/(dashboard)/settings/page.js.nft.json +1 -1
  49. package/.next/standalone/.next/server/app/(dashboard)/settings/page_client-reference-manifest.js +1 -1
  50. package/.next/standalone/.next/server/app/_not-found/page.js +2 -2
  51. package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  52. package/.next/standalone/.next/server/app/_not-found.html +2 -2
  53. package/.next/standalone/.next/server/app/_not-found.rsc +5 -5
  54. package/.next/standalone/.next/server/app/admin/companies/[uuid]/page.js +2 -2
  55. package/.next/standalone/.next/server/app/admin/companies/[uuid]/page.js.nft.json +1 -1
  56. package/.next/standalone/.next/server/app/admin/companies/[uuid]/page_client-reference-manifest.js +1 -1
  57. package/.next/standalone/.next/server/app/admin/companies/new/page.js +2 -2
  58. package/.next/standalone/.next/server/app/admin/companies/new/page.js.nft.json +1 -1
  59. package/.next/standalone/.next/server/app/admin/companies/new/page_client-reference-manifest.js +1 -1
  60. package/.next/standalone/.next/server/app/admin/companies/new.html +2 -2
  61. package/.next/standalone/.next/server/app/admin/companies/new.rsc +7 -7
  62. package/.next/standalone/.next/server/app/admin/companies/page.js +2 -2
  63. package/.next/standalone/.next/server/app/admin/companies/page.js.nft.json +1 -1
  64. package/.next/standalone/.next/server/app/admin/companies/page_client-reference-manifest.js +1 -1
  65. package/.next/standalone/.next/server/app/admin/companies.html +2 -2
  66. package/.next/standalone/.next/server/app/admin/companies.rsc +7 -7
  67. package/.next/standalone/.next/server/app/admin/page.js +2 -2
  68. package/.next/standalone/.next/server/app/admin/page.js.nft.json +1 -1
  69. package/.next/standalone/.next/server/app/admin/page_client-reference-manifest.js +1 -1
  70. package/.next/standalone/.next/server/app/admin.html +2 -2
  71. package/.next/standalone/.next/server/app/admin.rsc +7 -7
  72. package/.next/standalone/.next/server/app/api/admin/companies/[uuid]/route.js +1 -1
  73. package/.next/standalone/.next/server/app/api/admin/companies/[uuid]/route_client-reference-manifest.js +1 -1
  74. package/.next/standalone/.next/server/app/api/admin/companies/route.js +1 -1
  75. package/.next/standalone/.next/server/app/api/admin/companies/route_client-reference-manifest.js +1 -1
  76. package/.next/standalone/.next/server/app/api/admin/login/route.js +1 -1
  77. package/.next/standalone/.next/server/app/api/admin/login/route_client-reference-manifest.js +1 -1
  78. package/.next/standalone/.next/server/app/api/admin/session/route.js +1 -1
  79. package/.next/standalone/.next/server/app/api/admin/session/route_client-reference-manifest.js +1 -1
  80. package/.next/standalone/.next/server/app/api/agent-connections/route.js +1 -1
  81. package/.next/standalone/.next/server/app/api/agent-connections/route.js.nft.json +1 -1
  82. package/.next/standalone/.next/server/app/api/agent-connections/route_client-reference-manifest.js +1 -1
  83. package/.next/standalone/.next/server/app/api/agents/[uuid]/route.js +1 -1
  84. package/.next/standalone/.next/server/app/api/agents/[uuid]/route_client-reference-manifest.js +1 -1
  85. package/.next/standalone/.next/server/app/api/agents/[uuid]/sessions/route.js +1 -1
  86. package/.next/standalone/.next/server/app/api/agents/[uuid]/sessions/route.js.nft.json +1 -1
  87. package/.next/standalone/.next/server/app/api/agents/[uuid]/sessions/route_client-reference-manifest.js +1 -1
  88. package/.next/standalone/.next/server/app/api/agents/route.js +1 -1
  89. package/.next/standalone/.next/server/app/api/agents/route_client-reference-manifest.js +1 -1
  90. package/.next/standalone/.next/server/app/api/api-keys/[uuid]/route.js +1 -1
  91. package/.next/standalone/.next/server/app/api/api-keys/[uuid]/route_client-reference-manifest.js +1 -1
  92. package/.next/standalone/.next/server/app/api/api-keys/route.js +1 -1
  93. package/.next/standalone/.next/server/app/api/api-keys/route_client-reference-manifest.js +1 -1
  94. package/.next/standalone/.next/server/app/api/auth/callback/route.js +1 -1
  95. package/.next/standalone/.next/server/app/api/auth/callback/route_client-reference-manifest.js +1 -1
  96. package/.next/standalone/.next/server/app/api/auth/check-default/route.js +1 -1
  97. package/.next/standalone/.next/server/app/api/auth/check-default/route_client-reference-manifest.js +1 -1
  98. package/.next/standalone/.next/server/app/api/auth/company-oidc/route.js +1 -1
  99. package/.next/standalone/.next/server/app/api/auth/company-oidc/route_client-reference-manifest.js +1 -1
  100. package/.next/standalone/.next/server/app/api/auth/default-login/route.js +1 -1
  101. package/.next/standalone/.next/server/app/api/auth/default-login/route_client-reference-manifest.js +1 -1
  102. package/.next/standalone/.next/server/app/api/auth/identify/route.js +1 -1
  103. package/.next/standalone/.next/server/app/api/auth/identify/route_client-reference-manifest.js +1 -1
  104. package/.next/standalone/.next/server/app/api/auth/logout/route.js +1 -1
  105. package/.next/standalone/.next/server/app/api/auth/logout/route_client-reference-manifest.js +1 -1
  106. package/.next/standalone/.next/server/app/api/auth/me/route.js +1 -1
  107. package/.next/standalone/.next/server/app/api/auth/me/route_client-reference-manifest.js +1 -1
  108. package/.next/standalone/.next/server/app/api/auth/sync-token/route.js +1 -1
  109. package/.next/standalone/.next/server/app/api/auth/sync-token/route_client-reference-manifest.js +1 -1
  110. package/.next/standalone/.next/server/app/api/comments/route.js +1 -1
  111. package/.next/standalone/.next/server/app/api/comments/route.js.nft.json +1 -1
  112. package/.next/standalone/.next/server/app/api/comments/route_client-reference-manifest.js +1 -1
  113. package/.next/standalone/.next/server/app/api/daemon/connection-heartbeat/route.js +1 -1
  114. package/.next/standalone/.next/server/app/api/daemon/connection-heartbeat/route.js.nft.json +1 -1
  115. package/.next/standalone/.next/server/app/api/daemon/connection-heartbeat/route_client-reference-manifest.js +1 -1
  116. package/.next/standalone/.next/server/app/api/daemon/control/route.js +1 -1
  117. package/.next/standalone/.next/server/app/api/daemon/control/route_client-reference-manifest.js +1 -1
  118. package/.next/standalone/.next/server/app/api/daemon/directory-request/report/route.js +1 -1
  119. package/.next/standalone/.next/server/app/api/daemon/directory-request/report/route.js.nft.json +1 -1
  120. package/.next/standalone/.next/server/app/api/daemon/directory-request/report/route_client-reference-manifest.js +1 -1
  121. package/.next/standalone/.next/server/app/api/daemon/execution-state/route.js +1 -1
  122. package/.next/standalone/.next/server/app/api/daemon/execution-state/route.js.nft.json +1 -1
  123. package/.next/standalone/.next/server/app/api/daemon/execution-state/route_client-reference-manifest.js +1 -1
  124. package/.next/standalone/.next/server/app/api/daemon/executions/route.js +1 -1
  125. package/.next/standalone/.next/server/app/api/daemon/executions/route.js.nft.json +1 -1
  126. package/.next/standalone/.next/server/app/api/daemon/executions/route_client-reference-manifest.js +1 -1
  127. package/.next/standalone/.next/server/app/api/daemon/pending-turns/route.js +1 -1
  128. package/.next/standalone/.next/server/app/api/daemon/pending-turns/route.js.nft.json +1 -1
  129. package/.next/standalone/.next/server/app/api/daemon/pending-turns/route_client-reference-manifest.js +1 -1
  130. package/.next/standalone/.next/server/app/api/daemon/report-interrupt/route.js +1 -1
  131. package/.next/standalone/.next/server/app/api/daemon/report-interrupt/route.js.nft.json +1 -1
  132. package/.next/standalone/.next/server/app/api/daemon/report-interrupt/route_client-reference-manifest.js +1 -1
  133. package/.next/standalone/.next/server/app/api/daemon/resume/route.js +1 -1
  134. package/.next/standalone/.next/server/app/api/daemon/resume/route.js.nft.json +1 -1
  135. package/.next/standalone/.next/server/app/api/daemon/resume/route_client-reference-manifest.js +1 -1
  136. package/.next/standalone/.next/server/app/api/daemon/transcript/route.js +1 -1
  137. package/.next/standalone/.next/server/app/api/daemon/transcript/route.js.nft.json +1 -1
  138. package/.next/standalone/.next/server/app/api/daemon/transcript/route_client-reference-manifest.js +1 -1
  139. package/.next/standalone/.next/server/app/api/daemon/turn-advance/route.js +1 -1
  140. package/.next/standalone/.next/server/app/api/daemon/turn-advance/route.js.nft.json +1 -1
  141. package/.next/standalone/.next/server/app/api/daemon/turn-advance/route_client-reference-manifest.js +1 -1
  142. package/.next/standalone/.next/server/app/api/daemon-directory-requests/[uuid]/route.js +1 -1
  143. package/.next/standalone/.next/server/app/api/daemon-directory-requests/[uuid]/route.js.nft.json +1 -1
  144. package/.next/standalone/.next/server/app/api/daemon-directory-requests/[uuid]/route_client-reference-manifest.js +1 -1
  145. package/.next/standalone/.next/server/app/api/daemon-directory-requests/route.js +1 -1
  146. package/.next/standalone/.next/server/app/api/daemon-directory-requests/route.js.nft.json +1 -1
  147. package/.next/standalone/.next/server/app/api/daemon-directory-requests/route_client-reference-manifest.js +1 -1
  148. package/.next/standalone/.next/server/app/api/daemon-sessions/[sessionUuid]/instruction/route.js +1 -1
  149. package/.next/standalone/.next/server/app/api/daemon-sessions/[sessionUuid]/instruction/route.js.nft.json +1 -1
  150. package/.next/standalone/.next/server/app/api/daemon-sessions/[sessionUuid]/instruction/route_client-reference-manifest.js +1 -1
  151. package/.next/standalone/.next/server/app/api/daemon-sessions/[sessionUuid]/repoint/route.js +1 -1
  152. package/.next/standalone/.next/server/app/api/daemon-sessions/[sessionUuid]/repoint/route.js.nft.json +1 -1
  153. package/.next/standalone/.next/server/app/api/daemon-sessions/[sessionUuid]/repoint/route_client-reference-manifest.js +1 -1
  154. package/.next/standalone/.next/server/app/api/daemon-sessions/[sessionUuid]/route.js +1 -1
  155. package/.next/standalone/.next/server/app/api/daemon-sessions/[sessionUuid]/route.js.nft.json +1 -1
  156. package/.next/standalone/.next/server/app/api/daemon-sessions/[sessionUuid]/route_client-reference-manifest.js +1 -1
  157. package/.next/standalone/.next/server/app/api/daemon-sessions/ad-hoc/route.js +1 -1
  158. package/.next/standalone/.next/server/app/api/daemon-sessions/ad-hoc/route.js.nft.json +1 -1
  159. package/.next/standalone/.next/server/app/api/daemon-sessions/ad-hoc/route_client-reference-manifest.js +1 -1
  160. package/.next/standalone/.next/server/app/api/daemon-sessions/route.js +1 -1
  161. package/.next/standalone/.next/server/app/api/daemon-sessions/route.js.nft.json +1 -1
  162. package/.next/standalone/.next/server/app/api/daemon-sessions/route_client-reference-manifest.js +1 -1
  163. package/.next/standalone/.next/server/app/api/documents/[uuid]/route.js +1 -1
  164. package/.next/standalone/.next/server/app/api/documents/[uuid]/route_client-reference-manifest.js +1 -1
  165. package/.next/standalone/.next/server/app/api/entities/[type]/[uuid]/root-idea/route.js +1 -1
  166. package/.next/standalone/.next/server/app/api/entities/[type]/[uuid]/root-idea/route.js.nft.json +1 -1
  167. package/.next/standalone/.next/server/app/api/entities/[type]/[uuid]/root-idea/route_client-reference-manifest.js +1 -1
  168. package/.next/standalone/.next/server/app/api/events/notifications/route.js +1 -1
  169. package/.next/standalone/.next/server/app/api/events/notifications/route.js.nft.json +1 -1
  170. package/.next/standalone/.next/server/app/api/events/notifications/route_client-reference-manifest.js +1 -1
  171. package/.next/standalone/.next/server/app/api/events/route.js +9 -3
  172. package/.next/standalone/.next/server/app/api/events/route.js.nft.json +1 -1
  173. package/.next/standalone/.next/server/app/api/events/route_client-reference-manifest.js +1 -1
  174. package/.next/standalone/.next/server/app/api/health/route.js +1 -1
  175. package/.next/standalone/.next/server/app/api/health/route_client-reference-manifest.js +1 -1
  176. package/.next/standalone/.next/server/app/api/ideas/[uuid]/claim/route.js +1 -1
  177. package/.next/standalone/.next/server/app/api/ideas/[uuid]/claim/route.js.nft.json +1 -1
  178. package/.next/standalone/.next/server/app/api/ideas/[uuid]/claim/route_client-reference-manifest.js +1 -1
  179. package/.next/standalone/.next/server/app/api/ideas/[uuid]/move/preview/route.js +1 -1
  180. package/.next/standalone/.next/server/app/api/ideas/[uuid]/move/preview/route.js.nft.json +1 -1
  181. package/.next/standalone/.next/server/app/api/ideas/[uuid]/move/preview/route_client-reference-manifest.js +1 -1
  182. package/.next/standalone/.next/server/app/api/ideas/[uuid]/move/route.js +1 -1
  183. package/.next/standalone/.next/server/app/api/ideas/[uuid]/move/route.js.nft.json +1 -1
  184. package/.next/standalone/.next/server/app/api/ideas/[uuid]/move/route_client-reference-manifest.js +1 -1
  185. package/.next/standalone/.next/server/app/api/ideas/[uuid]/parent/route.js +1 -1
  186. package/.next/standalone/.next/server/app/api/ideas/[uuid]/parent/route.js.nft.json +1 -1
  187. package/.next/standalone/.next/server/app/api/ideas/[uuid]/parent/route_client-reference-manifest.js +1 -1
  188. package/.next/standalone/.next/server/app/api/ideas/[uuid]/release/route.js +1 -1
  189. package/.next/standalone/.next/server/app/api/ideas/[uuid]/release/route.js.nft.json +1 -1
  190. package/.next/standalone/.next/server/app/api/ideas/[uuid]/release/route_client-reference-manifest.js +1 -1
  191. package/.next/standalone/.next/server/app/api/ideas/[uuid]/route.js +1 -1
  192. package/.next/standalone/.next/server/app/api/ideas/[uuid]/route.js.nft.json +1 -1
  193. package/.next/standalone/.next/server/app/api/ideas/[uuid]/route_client-reference-manifest.js +1 -1
  194. package/.next/standalone/.next/server/app/api/ideas/[uuid]/wake-preview/route.js +1 -1
  195. package/.next/standalone/.next/server/app/api/ideas/[uuid]/wake-preview/route.js.nft.json +1 -1
  196. package/.next/standalone/.next/server/app/api/ideas/[uuid]/wake-preview/route_client-reference-manifest.js +1 -1
  197. package/.next/standalone/.next/server/app/api/ideas/conversational/route.js +1 -1
  198. package/.next/standalone/.next/server/app/api/ideas/conversational/route.js.nft.json +1 -1
  199. package/.next/standalone/.next/server/app/api/ideas/conversational/route_client-reference-manifest.js +1 -1
  200. package/.next/standalone/.next/server/app/api/mcp/route.js +5 -5
  201. package/.next/standalone/.next/server/app/api/mcp/route.js.nft.json +1 -1
  202. package/.next/standalone/.next/server/app/api/mcp/route_client-reference-manifest.js +1 -1
  203. package/.next/standalone/.next/server/app/api/me/assignments/route.js +1 -1
  204. package/.next/standalone/.next/server/app/api/me/assignments/route.js.nft.json +1 -1
  205. package/.next/standalone/.next/server/app/api/me/assignments/route_client-reference-manifest.js +1 -1
  206. package/.next/standalone/.next/server/app/api/mentionables/route.js +1 -1
  207. package/.next/standalone/.next/server/app/api/mentionables/route.js.nft.json +1 -1
  208. package/.next/standalone/.next/server/app/api/mentionables/route_client-reference-manifest.js +1 -1
  209. package/.next/standalone/.next/server/app/api/notifications/[uuid]/archive/route.js +1 -1
  210. package/.next/standalone/.next/server/app/api/notifications/[uuid]/archive/route.js.nft.json +1 -1
  211. package/.next/standalone/.next/server/app/api/notifications/[uuid]/archive/route_client-reference-manifest.js +1 -1
  212. package/.next/standalone/.next/server/app/api/notifications/[uuid]/read/route.js +1 -1
  213. package/.next/standalone/.next/server/app/api/notifications/[uuid]/read/route.js.nft.json +1 -1
  214. package/.next/standalone/.next/server/app/api/notifications/[uuid]/read/route_client-reference-manifest.js +1 -1
  215. package/.next/standalone/.next/server/app/api/notifications/preferences/route.js +1 -1
  216. package/.next/standalone/.next/server/app/api/notifications/preferences/route.js.nft.json +1 -1
  217. package/.next/standalone/.next/server/app/api/notifications/preferences/route_client-reference-manifest.js +1 -1
  218. package/.next/standalone/.next/server/app/api/notifications/read-all/route.js +1 -1
  219. package/.next/standalone/.next/server/app/api/notifications/read-all/route.js.nft.json +1 -1
  220. package/.next/standalone/.next/server/app/api/notifications/read-all/route_client-reference-manifest.js +1 -1
  221. package/.next/standalone/.next/server/app/api/notifications/route.js +1 -1
  222. package/.next/standalone/.next/server/app/api/notifications/route.js.nft.json +1 -1
  223. package/.next/standalone/.next/server/app/api/notifications/route_client-reference-manifest.js +1 -1
  224. package/.next/standalone/.next/server/app/api/notifications/unread-count/route.js +1 -1
  225. package/.next/standalone/.next/server/app/api/notifications/unread-count/route.js.nft.json +1 -1
  226. package/.next/standalone/.next/server/app/api/notifications/unread-count/route_client-reference-manifest.js +1 -1
  227. package/.next/standalone/.next/server/app/api/project-groups/[uuid]/dashboard/route.js +1 -1
  228. package/.next/standalone/.next/server/app/api/project-groups/[uuid]/dashboard/route_client-reference-manifest.js +1 -1
  229. package/.next/standalone/.next/server/app/api/project-groups/[uuid]/route.js +1 -1
  230. package/.next/standalone/.next/server/app/api/project-groups/[uuid]/route_client-reference-manifest.js +1 -1
  231. package/.next/standalone/.next/server/app/api/project-groups/route.js +1 -1
  232. package/.next/standalone/.next/server/app/api/project-groups/route_client-reference-manifest.js +1 -1
  233. package/.next/standalone/.next/server/app/api/project-visits/pin/route.js +1 -1
  234. package/.next/standalone/.next/server/app/api/project-visits/pin/route_client-reference-manifest.js +1 -1
  235. package/.next/standalone/.next/server/app/api/project-visits/route.js +1 -1
  236. package/.next/standalone/.next/server/app/api/project-visits/route_client-reference-manifest.js +1 -1
  237. package/.next/standalone/.next/server/app/api/project-visits/visit/route.js +1 -1
  238. package/.next/standalone/.next/server/app/api/project-visits/visit/route_client-reference-manifest.js +1 -1
  239. package/.next/standalone/.next/server/app/api/projects/[uuid]/activity/route.js +1 -1
  240. package/.next/standalone/.next/server/app/api/projects/[uuid]/activity/route_client-reference-manifest.js +1 -1
  241. package/.next/standalone/.next/server/app/api/projects/[uuid]/agent-cwds/route.js +1 -1
  242. package/.next/standalone/.next/server/app/api/projects/[uuid]/agent-cwds/route.js.nft.json +1 -1
  243. package/.next/standalone/.next/server/app/api/projects/[uuid]/agent-cwds/route_client-reference-manifest.js +1 -1
  244. package/.next/standalone/.next/server/app/api/projects/[uuid]/available/route.js +1 -1
  245. package/.next/standalone/.next/server/app/api/projects/[uuid]/available/route.js.nft.json +1 -1
  246. package/.next/standalone/.next/server/app/api/projects/[uuid]/available/route_client-reference-manifest.js +1 -1
  247. package/.next/standalone/.next/server/app/api/projects/[uuid]/documents/route.js +1 -1
  248. package/.next/standalone/.next/server/app/api/projects/[uuid]/documents/route_client-reference-manifest.js +1 -1
  249. package/.next/standalone/.next/server/app/api/projects/[uuid]/group/route.js +1 -1
  250. package/.next/standalone/.next/server/app/api/projects/[uuid]/group/route_client-reference-manifest.js +1 -1
  251. package/.next/standalone/.next/server/app/api/projects/[uuid]/ideas/route.js +1 -1
  252. package/.next/standalone/.next/server/app/api/projects/[uuid]/ideas/route.js.nft.json +1 -1
  253. package/.next/standalone/.next/server/app/api/projects/[uuid]/ideas/route_client-reference-manifest.js +1 -1
  254. package/.next/standalone/.next/server/app/api/projects/[uuid]/ideas/tracker/route.js +1 -1
  255. package/.next/standalone/.next/server/app/api/projects/[uuid]/ideas/tracker/route.js.nft.json +1 -1
  256. package/.next/standalone/.next/server/app/api/projects/[uuid]/ideas/tracker/route_client-reference-manifest.js +1 -1
  257. package/.next/standalone/.next/server/app/api/projects/[uuid]/proposals/[proposalUuid]/validate/route.js +1 -1
  258. package/.next/standalone/.next/server/app/api/projects/[uuid]/proposals/[proposalUuid]/validate/route_client-reference-manifest.js +1 -1
  259. package/.next/standalone/.next/server/app/api/projects/[uuid]/proposals/route.js +1 -1
  260. package/.next/standalone/.next/server/app/api/projects/[uuid]/proposals/route_client-reference-manifest.js +1 -1
  261. package/.next/standalone/.next/server/app/api/projects/[uuid]/proposals/summary/route.js +1 -1
  262. package/.next/standalone/.next/server/app/api/projects/[uuid]/proposals/summary/route_client-reference-manifest.js +1 -1
  263. package/.next/standalone/.next/server/app/api/projects/[uuid]/resource-graph/route.js +1 -1
  264. package/.next/standalone/.next/server/app/api/projects/[uuid]/resource-graph/route.js.nft.json +1 -1
  265. package/.next/standalone/.next/server/app/api/projects/[uuid]/resource-graph/route_client-reference-manifest.js +1 -1
  266. package/.next/standalone/.next/server/app/api/projects/[uuid]/route.js +1 -1
  267. package/.next/standalone/.next/server/app/api/projects/[uuid]/route_client-reference-manifest.js +1 -1
  268. package/.next/standalone/.next/server/app/api/projects/[uuid]/stats/route.js +1 -1
  269. package/.next/standalone/.next/server/app/api/projects/[uuid]/stats/route_client-reference-manifest.js +1 -1
  270. package/.next/standalone/.next/server/app/api/projects/[uuid]/tasks/dependencies/route.js +1 -1
  271. package/.next/standalone/.next/server/app/api/projects/[uuid]/tasks/dependencies/route.js.nft.json +1 -1
  272. package/.next/standalone/.next/server/app/api/projects/[uuid]/tasks/dependencies/route_client-reference-manifest.js +1 -1
  273. package/.next/standalone/.next/server/app/api/projects/[uuid]/tasks/route.js +1 -1
  274. package/.next/standalone/.next/server/app/api/projects/[uuid]/tasks/route.js.nft.json +1 -1
  275. package/.next/standalone/.next/server/app/api/projects/[uuid]/tasks/route_client-reference-manifest.js +1 -1
  276. package/.next/standalone/.next/server/app/api/projects/agent-cwd-options/route.js +1 -1
  277. package/.next/standalone/.next/server/app/api/projects/agent-cwd-options/route.js.nft.json +1 -1
  278. package/.next/standalone/.next/server/app/api/projects/agent-cwd-options/route_client-reference-manifest.js +1 -1
  279. package/.next/standalone/.next/server/app/api/projects/route.js +1 -1
  280. package/.next/standalone/.next/server/app/api/projects/route.js.nft.json +1 -1
  281. package/.next/standalone/.next/server/app/api/projects/route_client-reference-manifest.js +1 -1
  282. package/.next/standalone/.next/server/app/api/proposals/[uuid]/approve/route.js +1 -1
  283. package/.next/standalone/.next/server/app/api/proposals/[uuid]/approve/route_client-reference-manifest.js +1 -1
  284. package/.next/standalone/.next/server/app/api/proposals/[uuid]/close/route.js +1 -1
  285. package/.next/standalone/.next/server/app/api/proposals/[uuid]/close/route_client-reference-manifest.js +1 -1
  286. package/.next/standalone/.next/server/app/api/proposals/[uuid]/reject/route.js +1 -1
  287. package/.next/standalone/.next/server/app/api/proposals/[uuid]/reject/route_client-reference-manifest.js +1 -1
  288. package/.next/standalone/.next/server/app/api/proposals/[uuid]/revoke/route.js +1 -1
  289. package/.next/standalone/.next/server/app/api/proposals/[uuid]/revoke/route_client-reference-manifest.js +1 -1
  290. package/.next/standalone/.next/server/app/api/proposals/[uuid]/route.js +1 -1
  291. package/.next/standalone/.next/server/app/api/proposals/[uuid]/route_client-reference-manifest.js +1 -1
  292. package/.next/standalone/.next/server/app/api/references/[uuid]/route.js +1 -1
  293. package/.next/standalone/.next/server/app/api/references/[uuid]/route_client-reference-manifest.js +1 -1
  294. package/.next/standalone/.next/server/app/api/references/route.js +1 -1
  295. package/.next/standalone/.next/server/app/api/references/route_client-reference-manifest.js +1 -1
  296. package/.next/standalone/.next/server/app/api/search/route.js +1 -1
  297. package/.next/standalone/.next/server/app/api/search/route_client-reference-manifest.js +1 -1
  298. package/.next/standalone/.next/server/app/api/session/route.js +1 -1
  299. package/.next/standalone/.next/server/app/api/session/route_client-reference-manifest.js +1 -1
  300. package/.next/standalone/.next/server/app/api/sessions/[uuid]/route.js +1 -1
  301. package/.next/standalone/.next/server/app/api/sessions/[uuid]/route.js.nft.json +1 -1
  302. package/.next/standalone/.next/server/app/api/sessions/[uuid]/route_client-reference-manifest.js +1 -1
  303. package/.next/standalone/.next/server/app/api/tasks/[uuid]/claim/route.js +1 -1
  304. package/.next/standalone/.next/server/app/api/tasks/[uuid]/claim/route.js.nft.json +1 -1
  305. package/.next/standalone/.next/server/app/api/tasks/[uuid]/claim/route_client-reference-manifest.js +1 -1
  306. package/.next/standalone/.next/server/app/api/tasks/[uuid]/dependencies/[dependsOnUuid]/route.js +1 -1
  307. package/.next/standalone/.next/server/app/api/tasks/[uuid]/dependencies/[dependsOnUuid]/route.js.nft.json +1 -1
  308. package/.next/standalone/.next/server/app/api/tasks/[uuid]/dependencies/[dependsOnUuid]/route_client-reference-manifest.js +1 -1
  309. package/.next/standalone/.next/server/app/api/tasks/[uuid]/dependencies/route.js +1 -1
  310. package/.next/standalone/.next/server/app/api/tasks/[uuid]/dependencies/route.js.nft.json +1 -1
  311. package/.next/standalone/.next/server/app/api/tasks/[uuid]/dependencies/route_client-reference-manifest.js +1 -1
  312. package/.next/standalone/.next/server/app/api/tasks/[uuid]/release/route.js +1 -1
  313. package/.next/standalone/.next/server/app/api/tasks/[uuid]/release/route.js.nft.json +1 -1
  314. package/.next/standalone/.next/server/app/api/tasks/[uuid]/release/route_client-reference-manifest.js +1 -1
  315. package/.next/standalone/.next/server/app/api/tasks/[uuid]/route.js +1 -1
  316. package/.next/standalone/.next/server/app/api/tasks/[uuid]/route.js.nft.json +1 -1
  317. package/.next/standalone/.next/server/app/api/tasks/[uuid]/route_client-reference-manifest.js +1 -1
  318. package/.next/standalone/.next/server/app/api/tasks/[uuid]/sessions/route.js +1 -1
  319. package/.next/standalone/.next/server/app/api/tasks/[uuid]/sessions/route.js.nft.json +1 -1
  320. package/.next/standalone/.next/server/app/api/tasks/[uuid]/sessions/route_client-reference-manifest.js +1 -1
  321. package/.next/standalone/.next/server/app/favicon.ico/route.js +1 -1
  322. package/.next/standalone/.next/server/app/index.html +2 -2
  323. package/.next/standalone/.next/server/app/index.rsc +6 -6
  324. package/.next/standalone/.next/server/app/login/admin/page.js +2 -2
  325. package/.next/standalone/.next/server/app/login/admin/page.js.nft.json +1 -1
  326. package/.next/standalone/.next/server/app/login/admin/page_client-reference-manifest.js +1 -1
  327. package/.next/standalone/.next/server/app/login/admin.html +2 -2
  328. package/.next/standalone/.next/server/app/login/admin.rsc +6 -6
  329. package/.next/standalone/.next/server/app/login/callback/page.js +2 -2
  330. package/.next/standalone/.next/server/app/login/callback/page.js.nft.json +1 -1
  331. package/.next/standalone/.next/server/app/login/callback/page_client-reference-manifest.js +1 -1
  332. package/.next/standalone/.next/server/app/login/callback.html +2 -2
  333. package/.next/standalone/.next/server/app/login/callback.rsc +6 -6
  334. package/.next/standalone/.next/server/app/login/page.js +2 -2
  335. package/.next/standalone/.next/server/app/login/page.js.nft.json +1 -1
  336. package/.next/standalone/.next/server/app/login/page_client-reference-manifest.js +1 -1
  337. package/.next/standalone/.next/server/app/login/pick-workspace/page.js +2 -2
  338. package/.next/standalone/.next/server/app/login/pick-workspace/page.js.nft.json +1 -1
  339. package/.next/standalone/.next/server/app/login/pick-workspace/page_client-reference-manifest.js +1 -1
  340. package/.next/standalone/.next/server/app/login/pick-workspace.html +2 -2
  341. package/.next/standalone/.next/server/app/login/pick-workspace.rsc +6 -6
  342. package/.next/standalone/.next/server/app/login.html +2 -2
  343. package/.next/standalone/.next/server/app/login.rsc +6 -6
  344. package/.next/standalone/.next/server/app/onboarding/page.js +2 -2
  345. package/.next/standalone/.next/server/app/onboarding/page.js.nft.json +1 -1
  346. package/.next/standalone/.next/server/app/onboarding/page_client-reference-manifest.js +1 -1
  347. package/.next/standalone/.next/server/app/onboarding.html +2 -2
  348. package/.next/standalone/.next/server/app/onboarding.rsc +6 -6
  349. package/.next/standalone/.next/server/app/page.js +2 -2
  350. package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
  351. package/.next/standalone/.next/server/app/projects.html +2 -2
  352. package/.next/standalone/.next/server/app/projects.rsc +7 -7
  353. package/.next/standalone/.next/server/app/settings.html +2 -2
  354. package/.next/standalone/.next/server/app/settings.rsc +7 -7
  355. package/.next/standalone/.next/server/app-paths-manifest.json +47 -47
  356. package/.next/standalone/.next/server/chunks/1073.js +1 -0
  357. package/.next/standalone/.next/server/chunks/1114.js +1 -0
  358. package/.next/standalone/.next/server/chunks/1267.js +1 -0
  359. package/.next/standalone/.next/server/chunks/1318.js +1 -1
  360. package/.next/standalone/.next/server/chunks/1559.js +2 -2
  361. package/.next/standalone/.next/server/chunks/2570.js +2 -2
  362. package/.next/standalone/.next/server/chunks/2572.js +1 -1
  363. package/.next/standalone/.next/server/chunks/2940.js +1 -1
  364. package/.next/standalone/.next/server/chunks/2961.js +1 -1
  365. package/.next/standalone/.next/server/chunks/3197.js +1 -1
  366. package/.next/standalone/.next/server/chunks/378.js +4 -4
  367. package/.next/standalone/.next/server/chunks/4827.js +1 -1
  368. package/.next/standalone/.next/server/chunks/5245.js +1 -1
  369. package/.next/standalone/.next/server/chunks/{5351.js → 5737.js} +13 -9
  370. package/.next/standalone/.next/server/chunks/6113.js +1 -1
  371. package/.next/standalone/.next/server/chunks/6145.js +1 -0
  372. package/.next/standalone/.next/server/chunks/6487.js +1 -0
  373. package/.next/standalone/.next/server/chunks/6506.js +1 -1
  374. package/.next/standalone/.next/server/chunks/6515.js +2 -2
  375. package/.next/standalone/.next/server/chunks/6753.js +3 -3
  376. package/.next/standalone/.next/server/chunks/679.js +1 -1
  377. package/.next/standalone/.next/server/chunks/7368.js +1 -1
  378. package/.next/standalone/.next/server/chunks/7530.js +1 -1
  379. package/.next/standalone/.next/server/chunks/7770.js +1 -0
  380. package/.next/standalone/.next/server/chunks/{4394.js → 7822.js} +1 -1
  381. package/.next/standalone/.next/server/chunks/8454.js +1 -1
  382. package/.next/standalone/.next/server/chunks/8586.js +1 -0
  383. package/.next/standalone/.next/server/chunks/920.js +1 -1
  384. package/.next/standalone/.next/server/chunks/9213.js +1 -1
  385. package/.next/standalone/.next/server/chunks/9378.js +1 -1
  386. package/.next/standalone/.next/server/chunks/9931.js +1 -0
  387. package/.next/standalone/.next/server/middleware-build-manifest.js +1 -1
  388. package/.next/standalone/.next/server/middleware-manifest.json +5 -5
  389. package/.next/standalone/.next/server/middleware-react-loadable-manifest.js +1 -1
  390. package/.next/standalone/.next/server/next-font-manifest.js +1 -1
  391. package/.next/standalone/.next/server/next-font-manifest.json +1 -1
  392. package/.next/standalone/.next/server/pages/404.html +2 -2
  393. package/.next/standalone/.next/server/pages/500.html +1 -1
  394. package/.next/standalone/.next/server/server-reference-manifest.js +1 -1
  395. package/.next/standalone/.next/server/server-reference-manifest.json +1 -1
  396. package/.next/standalone/.next/server/src/middleware.js +2 -2
  397. package/.next/standalone/.next/static/chunks/{11595.a6268c75ca8a2163.js → 11595.32f7dedc4fd7e3e1.js} +1 -1
  398. package/.next/standalone/.next/static/chunks/11998-27dcf858173fc015.js +1 -0
  399. package/.next/standalone/.next/static/chunks/12070-426bb88f5179812b.js +1 -0
  400. package/.next/standalone/.next/static/chunks/17409-67dbc0a3f4cbc207.js +1 -0
  401. package/.next/standalone/.next/static/chunks/26494-5a04e150431b0233.js +1 -0
  402. package/.next/standalone/.next/static/chunks/{31308-fda6febfb2882a28.js → 31308-bb4a97b3f39c22dd.js} +1 -1
  403. package/.next/standalone/.next/static/chunks/{33456.16ff7edf00137539.js → 33456.87f86ce6041405e0.js} +1 -1
  404. package/.next/standalone/.next/static/chunks/38366.fb931fab9c756890.js +1 -0
  405. package/.next/standalone/.next/static/chunks/4166-85352630c29e2c2b.js +1 -0
  406. package/.next/standalone/.next/static/chunks/{4860.9e06848eb531e667.js → 4860.9457e021394e9399.js} +1 -1
  407. package/.next/standalone/.next/static/chunks/{65096-f756aac39efad7a3.js → 65096-8295f53f97c40d47.js} +1 -1
  408. package/.next/standalone/.next/static/chunks/65807-086d83649f593a5a.js +1 -0
  409. package/.next/standalone/.next/static/chunks/79919-56796c262f51fa82.js +1 -0
  410. package/.next/standalone/.next/static/chunks/94643-87ee1ede6d955937.js +1 -0
  411. package/.next/standalone/.next/static/chunks/{99373.81b79c91858f9099.js → 99373.aed267aa48c5bdd0.js} +1 -1
  412. package/.next/standalone/.next/static/chunks/app/(dashboard)/layout-9219c4de1012f0fb.js +1 -0
  413. package/.next/standalone/.next/static/chunks/app/(dashboard)/project-groups/[uuid]/{page-974781e4886529f8.js → page-82e90e222d6bc547.js} +1 -1
  414. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/activity/page-f1eccb50d38d8982.js +1 -0
  415. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/dashboard/page-f4810f1b9f39d1ae.js +1 -0
  416. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/documents/[documentUuid]/page-721d2152f1a28c88.js +1 -0
  417. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/documents/page-9bcff40805f39b25.js +1 -0
  418. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/graph/{page-fdd617457730a116.js → page-f31ad2eebe257628.js} +1 -1
  419. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/proposals/[proposalUuid]/page-a4fb04068539c4ce.js +1 -0
  420. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/proposals/new/page-b1d2af10e9bc7e09.js +1 -0
  421. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/proposals/page-2cb245b0602a3c85.js +1 -0
  422. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/tasks/[taskUuid]/{page-58b48aa0a11603c3.js → page-53ce4468844cc84f.js} +1 -1
  423. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/tasks/{page-286faced32c6133f.js → page-1c374d19e8046d9a.js} +1 -1
  424. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/page-31d6f8e82c7f5366.js +1 -0
  425. package/.next/standalone/.next/static/chunks/app/(dashboard)/settings/page-32bff791b19a0a58.js +1 -0
  426. package/.next/standalone/.next/static/chunks/app/_not-found/{page-166b410da84336d4.js → page-b9d672df79b35e87.js} +1 -1
  427. package/.next/standalone/.next/static/chunks/app/admin/companies/[uuid]/{page-b2458ed001dc8177.js → page-56118c51122ad639.js} +1 -1
  428. package/.next/standalone/.next/static/chunks/app/admin/companies/new/page-4e20deb41357171c.js +1 -0
  429. package/.next/standalone/.next/static/chunks/app/admin/companies/page-0632f245bf9c1c27.js +1 -0
  430. package/.next/standalone/.next/static/chunks/app/admin/layout-725ab2331c642f36.js +1 -0
  431. package/.next/standalone/.next/static/chunks/app/admin/{page-0cc8cf246db43e5d.js → page-5a0271dd2b8b36fd.js} +1 -1
  432. package/.next/standalone/.next/static/chunks/app/{layout-985054e973f66999.js → layout-098288cec4490c5d.js} +1 -1
  433. package/.next/standalone/.next/static/chunks/app/login/admin/page-c8e40259e5d3d9e0.js +1 -0
  434. package/.next/standalone/.next/static/chunks/app/login/callback/page-527652f6c1a39274.js +1 -0
  435. package/.next/standalone/.next/static/chunks/app/login/{page-9b34375d1b5579d7.js → page-0a16a64855b771ef.js} +1 -1
  436. package/.next/standalone/.next/static/chunks/app/login/pick-workspace/page-47375a86e2375202.js +1 -0
  437. package/.next/standalone/.next/static/chunks/app/onboarding/{page-5c82cf3abd856301.js → page-d082f9b60ad03057.js} +1 -1
  438. package/.next/standalone/.next/static/chunks/app/{page-79e2d32e69788bd2.js → page-91dbf7dfd85f805f.js} +1 -1
  439. package/.next/standalone/.next/static/chunks/main-app-1a7cacecc8900a4d.js +1 -0
  440. package/.next/standalone/.next/static/chunks/{webpack-4d1cc14b13e247b6.js → webpack-e2e0ef50652d5791.js} +1 -1
  441. package/.next/standalone/.next/static/css/1d9cf83f50b6db00.css +1 -0
  442. package/.next/standalone/package.json +2 -1
  443. package/.next/standalone/public/chorus-plugin/.claude-plugin/plugin.json +1 -1
  444. package/.next/standalone/public/chorus-plugin/bin/chorus-api.sh +44 -1
  445. package/.next/standalone/public/chorus-plugin/bin/on-session-start.sh +4 -3
  446. package/.next/standalone/public/chorus-plugin/bin/tests/test-mcp-cli-delegation.sh +244 -0
  447. package/.next/standalone/public/chorus-plugin/skills/brainstorm/SKILL.md +1 -1
  448. package/.next/standalone/public/chorus-plugin/skills/chorus/SKILL.md +19 -1
  449. package/.next/standalone/public/chorus-plugin/skills/chorus-cli/SKILL.md +57 -0
  450. package/.next/standalone/public/chorus-plugin/skills/develop/SKILL.md +2 -2
  451. package/.next/standalone/public/chorus-plugin/skills/docs/SKILL.md +1 -1
  452. package/.next/standalone/public/chorus-plugin/skills/idea/SKILL.md +2 -2
  453. package/.next/standalone/public/chorus-plugin/skills/openspec-aware/SKILL.md +85 -42
  454. package/.next/standalone/public/chorus-plugin/skills/orchestrate/SKILL.md +1 -1
  455. package/.next/standalone/public/chorus-plugin/skills/proposal/SKILL.md +2 -2
  456. package/.next/standalone/public/chorus-plugin/skills/quick-dev/SKILL.md +1 -1
  457. package/.next/standalone/public/chorus-plugin/skills/review/SKILL.md +1 -1
  458. package/.next/standalone/public/chorus-plugin/skills/yolo/SKILL.md +3 -3
  459. package/.next/standalone/public/dsh-credentials.sh +20 -127
  460. package/.next/standalone/public/install-codex.sh +21 -406
  461. package/.next/standalone/public/install-kiro.sh +20 -344
  462. package/.next/standalone/public/install-opencode.sh +20 -275
  463. package/.next/standalone/public/kiro-plugin/.kiro/skills/chorus-brainstorm/SKILL.md +1 -1
  464. package/.next/standalone/public/kiro-plugin/.kiro/skills/chorus-cli/SKILL.md +57 -0
  465. package/.next/standalone/public/kiro-plugin/.kiro/skills/chorus-develop/SKILL.md +2 -2
  466. package/.next/standalone/public/kiro-plugin/.kiro/skills/chorus-docs/SKILL.md +1 -1
  467. package/.next/standalone/public/kiro-plugin/.kiro/skills/chorus-idea/SKILL.md +2 -2
  468. package/.next/standalone/public/kiro-plugin/.kiro/skills/chorus-openspec-aware/SKILL.md +85 -42
  469. package/.next/standalone/public/kiro-plugin/.kiro/skills/chorus-orchestrate/SKILL.md +1 -1
  470. package/.next/standalone/public/kiro-plugin/.kiro/skills/chorus-proposal/SKILL.md +2 -2
  471. package/.next/standalone/public/kiro-plugin/.kiro/skills/chorus-quick-dev/SKILL.md +1 -1
  472. package/.next/standalone/public/kiro-plugin/.kiro/skills/chorus-review/SKILL.md +1 -1
  473. package/.next/standalone/public/kiro-plugin/.kiro/skills/chorus-yolo/SKILL.md +3 -3
  474. package/.next/standalone/public/kiro-plugin/bin/chorus-api.sh +44 -1
  475. package/.next/standalone/public/kiro-plugin/bin/on-agent-spawn.sh +6 -4
  476. package/.next/standalone/public/kiro-plugin/manifest.txt +42 -0
  477. package/.next/standalone/public/skill/brainstorm-chorus/SKILL.md +1 -1
  478. package/.next/standalone/public/skill/chorus/SKILL.md +19 -1
  479. package/.next/standalone/public/skill/code-reviewer-chorus/SKILL.md +1 -1
  480. package/.next/standalone/public/skill/develop-chorus/SKILL.md +1 -1
  481. package/.next/standalone/public/skill/docs-chorus/SKILL.md +1 -1
  482. package/.next/standalone/public/skill/idea-chorus/SKILL.md +2 -2
  483. package/.next/standalone/public/skill/orchestrate-chorus/SKILL.md +1 -1
  484. package/.next/standalone/public/skill/proposal-chorus/SKILL.md +1 -1
  485. package/.next/standalone/public/skill/proposal-reviewer-chorus/SKILL.md +1 -1
  486. package/.next/standalone/public/skill/quick-dev-chorus/SKILL.md +1 -1
  487. package/.next/standalone/public/skill/review-chorus/SKILL.md +1 -1
  488. package/.next/standalone/public/skill/task-reviewer-chorus/SKILL.md +1 -1
  489. package/.next/standalone/public/skill/yolo-chorus/SKILL.md +1 -1
  490. package/.next/standalone/public/test-dsh-credentials.sh +22 -38
  491. package/.next/standalone/public/test-install-codex.sh +31 -79
  492. package/.next/standalone/server.js +1 -1
  493. package/README.ja.md +4 -2
  494. package/README.ko.md +4 -2
  495. package/README.md +4 -2
  496. package/README.zh.md +4 -2
  497. package/chorus.mjs +35 -1
  498. package/cli/agent-backend-prompt.mjs +3 -2
  499. package/cli/agents.mjs +329 -0
  500. package/cli/chorus-client.mjs +69 -0
  501. package/cli/claude-spawner.mjs +56 -15
  502. package/cli/codex-spawner.mjs +11 -6
  503. package/cli/credentials.mjs +190 -4
  504. package/cli/daemon-agent.mjs +26 -2
  505. package/cli/daemon-config.mjs +27 -2
  506. package/cli/daemon-service.mjs +120 -33
  507. package/cli/daemon.mjs +128 -22
  508. package/cli/dsh-spawner.mjs +7 -0
  509. package/cli/init/adapters.mjs +137 -0
  510. package/cli/init/agent-type-map.mjs +60 -0
  511. package/cli/init/chorus-plugin-consts.mjs +16 -0
  512. package/cli/init/codex-mcp-config.mjs +183 -0
  513. package/cli/init/contracts.mjs +122 -0
  514. package/cli/init/detect.mjs +97 -0
  515. package/cli/init/file-template.mjs +248 -0
  516. package/cli/init/install-methods.mjs +569 -0
  517. package/cli/init/registry.mjs +74 -0
  518. package/cli/init/run-command.mjs +30 -0
  519. package/cli/init/select.mjs +111 -0
  520. package/cli/init/steps/credential-seed.mjs +751 -0
  521. package/cli/init/steps/daemon-setup.mjs +246 -0
  522. package/cli/init/steps/plugin-install.mjs +37 -0
  523. package/cli/init-args.mjs +140 -0
  524. package/cli/init.mjs +243 -0
  525. package/cli/kiro-spawner.mjs +5 -0
  526. package/cli/mcp-args.mjs +280 -0
  527. package/cli/mcp.mjs +164 -0
  528. package/cli/spawner-select.mjs +45 -2
  529. package/cli/waker.mjs +89 -38
  530. package/package.json +2 -1
  531. package/.next/standalone/.env +0 -18
  532. package/.next/standalone/.next/server/chunks/3594.js +0 -1
  533. package/.next/standalone/.next/server/chunks/4545.js +0 -1
  534. package/.next/standalone/.next/server/chunks/5205.js +0 -1
  535. package/.next/standalone/.next/server/chunks/6207.js +0 -1
  536. package/.next/standalone/.next/server/chunks/6667.js +0 -1
  537. package/.next/standalone/.next/server/chunks/6995.js +0 -1
  538. package/.next/standalone/.next/server/chunks/7091.js +0 -1
  539. package/.next/standalone/.next/server/chunks/9793.js +0 -1
  540. package/.next/standalone/.next/static/chunks/19887-b805e1dcee8c367b.js +0 -1
  541. package/.next/standalone/.next/static/chunks/29108-5a11eea003f4cc11.js +0 -1
  542. package/.next/standalone/.next/static/chunks/38366.e6e0132b8ba873d6.js +0 -1
  543. package/.next/standalone/.next/static/chunks/53073-a7ed20af6538a178.js +0 -1
  544. package/.next/standalone/.next/static/chunks/6603-e70ddeab6ad09c50.js +0 -1
  545. package/.next/standalone/.next/static/chunks/78917-1b59cbb806b3ecfc.js +0 -1
  546. package/.next/standalone/.next/static/chunks/82751-3e161e1d8dbda3ac.js +0 -1
  547. package/.next/standalone/.next/static/chunks/94643-ffa140f765c73daf.js +0 -1
  548. package/.next/standalone/.next/static/chunks/99366-425e9ef22e60e3e2.js +0 -1
  549. package/.next/standalone/.next/static/chunks/app/(dashboard)/layout-b742c51c0a764daf.js +0 -1
  550. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/activity/page-20632dbec5a6dbc0.js +0 -1
  551. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/dashboard/page-f636e00c28f425ea.js +0 -1
  552. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/documents/[documentUuid]/page-c004f1a194af7fa5.js +0 -1
  553. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/documents/page-425acbe9ade5fa83.js +0 -1
  554. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/proposals/[proposalUuid]/page-b9eb4e0692996657.js +0 -1
  555. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/proposals/new/page-d5b222f379b2e8ca.js +0 -1
  556. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/proposals/page-0a6c2d0e1b68e0e4.js +0 -1
  557. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/page-9d79e285b6fd2f8d.js +0 -1
  558. package/.next/standalone/.next/static/chunks/app/(dashboard)/settings/page-1507a761e67c2aa9.js +0 -1
  559. package/.next/standalone/.next/static/chunks/app/admin/companies/new/page-e35dce890d6dfd8d.js +0 -1
  560. package/.next/standalone/.next/static/chunks/app/admin/companies/page-ef720c2b0856166c.js +0 -1
  561. package/.next/standalone/.next/static/chunks/app/admin/layout-c66ce38cbd88982a.js +0 -1
  562. package/.next/standalone/.next/static/chunks/app/login/admin/page-f032b6db3bd20a2c.js +0 -1
  563. package/.next/standalone/.next/static/chunks/app/login/callback/page-ec23211506e688ee.js +0 -1
  564. package/.next/standalone/.next/static/chunks/app/login/pick-workspace/page-7e4664af2c787d08.js +0 -1
  565. package/.next/standalone/.next/static/chunks/main-app-ec87f2c9ef083ff1.js +0 -1
  566. package/.next/standalone/.next/static/css/5f52bd39b284ccdf.css +0 -1
  567. /package/.next/standalone/.next/static/{6sHDgeKioa0SJR1MAbcYG → _s4RZW3efB1g0lrKgLiZ7}/_buildManifest.js +0 -0
  568. /package/.next/standalone/.next/static/{6sHDgeKioa0SJR1MAbcYG → _s4RZW3efB1g0lrKgLiZ7}/_ssgManifest.js +0 -0
package/cli/waker.mjs CHANGED
@@ -21,7 +21,7 @@
21
21
 
22
22
  import { buildBatchPrompt } from "./prompts.mjs";
23
23
  import { writeMcpConfig } from "./mcp-config.mjs";
24
- import { isNewSession } from "./claude-spawner.mjs";
24
+ import { isNewSession, SESSION_CONFLICT_FAILURE } from "./claude-spawner.mjs";
25
25
  import { killProcessTree, DEFAULT_SIGINT_TIMEOUT_MS } from "./process-killer.mjs";
26
26
 
27
27
  const NOOP_LOGGER = { info() {}, warn() {}, error() {} };
@@ -31,7 +31,7 @@ export class Waker {
31
31
  * @param {{
32
32
  * creds: { url: string, apiKey: string },
33
33
  * lineage: { resolve: (event: any) => Promise<{ rootIdeaUuid: string|null, directIdeaUuid: string|null }> },
34
- * spawner: { wake: (params: any) => Promise<{ sessionId: string, exitCode: number|null, isNew: boolean }> },
34
+ * spawner: { wake: (params: any) => Promise<{ sessionId: string, backendSessionId?: string|null, exitCode: number|null, isNew: boolean, failureClassification?: string }> },
35
35
  * cwd?: string, The connection/session-bound working directory this Waker serves; resolveCwd() is the single source the probe + spawn + resume use. `undefined` ⇒ the process default cwd (HARD-1 / single-path).
36
36
  * validateRuntimeCwd?: (cwd: string) => Promise<{normalizedPath?: string}>,
37
37
  * hooks?: import("./upload-hooks.mjs").UploadHooks,
@@ -101,6 +101,13 @@ export class Waker {
101
101
  // wake's exit path reads + clears it to decide reason=user vs reason=crash.
102
102
  /** @type {Set<string>} */
103
103
  this.interrupting = new Set();
104
+ // Session/entity lanes whose deterministic Claude conflict survived the one-shot
105
+ // resume fallback. Only a synthetic crash resume for the same lane is suppressed;
106
+ // unrelated wakes continue, and a fresh human instruction clears the lane so one
107
+ // new bounded recovery cycle is allowed. Daemon-local by design: construction
108
+ // (including daemon restart) starts with an empty guard.
109
+ /** @type {Set<string>} */
110
+ this.deterministicConflictGuards = new Set();
104
111
  // Daemon graceful-shutdown flag (fix-daemon-exit-orphan-running-turn). Set once
105
112
  // by interruptAll() and never cleared — a shutting-down Waker is on its way out.
106
113
  // The wake exit path reads it to report the TURN as interrupted(shutdown), and to
@@ -359,7 +366,28 @@ export class Waker {
359
366
  */
360
367
  async wakeBatch(notifications, key, attribution) {
361
368
  let cfg;
362
- const list = Array.isArray(notifications) ? notifications : [];
369
+ const receivedList = Array.isArray(notifications) ? notifications : [];
370
+ const hasFreshHumanInstruction = receivedList.some(
371
+ (n) => n?.action === "human_instruction",
372
+ );
373
+ if (hasFreshHumanInstruction && this.deterministicConflictGuards.delete(key)) {
374
+ this.logger.info(
375
+ `[Chorus] cleared deterministic session-conflict guard for ${key} on fresh human instruction`,
376
+ );
377
+ }
378
+ const list =
379
+ !hasFreshHumanInstruction && this.deterministicConflictGuards.has(key)
380
+ ? receivedList.filter((n) => {
381
+ const suppress =
382
+ n?.action === "resource_resumed" && n?.resumedFrom === "crash";
383
+ if (suppress) {
384
+ this.logger.warn(
385
+ `[Chorus] suppressed automatic crash resume for ${key}: deterministic session conflict fallback already exhausted`,
386
+ );
387
+ }
388
+ return !suppress;
389
+ })
390
+ : receivedList;
363
391
  // Physical batch size — how many wakes were coalesced into this one turn. Drives the
364
392
  // session-anchor synthesis (a coalesced batch shows ONE synthesized idea row) and the
365
393
  // arrival log label. Independent of the wire count below.
@@ -390,7 +418,7 @@ export class Waker {
390
418
  // all leave the executions map when the batch settles so the server reconcile ends the
391
419
  // queued rows the batch coalesced away (a coalesced batch shows only ONE running row).
392
420
  const drainedExecKeys = [];
393
- for (const n of list) {
421
+ for (const n of receivedList) {
394
422
  const e = this.#entityOf(n);
395
423
  if (e) drainedExecKeys.push(this.#execKey(e.entityType, e.entityUuid));
396
424
  }
@@ -515,7 +543,39 @@ export class Waker {
515
543
  // it even before spawner.wake() returns. (Do NOT reference the awaited
516
544
  // `result` inside onMessage — it's in the temporal dead zone there.)
517
545
  let observedSessionId = sessionId ?? "";
518
- const result = await this.spawner.wake({
546
+ const onChild = (child) => {
547
+ const entry = execKey ? this.executions.get(execKey) : null;
548
+ if (entry && entry.status === "running") entry.child = child;
549
+ if (sessionId && !turnAdvancedToRunning) {
550
+ turnAdvancedToRunning = true;
551
+ // Fire-and-forget; #advanceTurn swallows + logs its own failures so a
552
+ // turn-report error never crashes the spawn callback (no-silent-errors).
553
+ // The coalescedCount rides this → running edge so the server settles the
554
+ // (count − 1) same-session pending turns coalesced into this one (a single
555
+ // wake reports 1, which the client omits from the wire).
556
+ runningTurnUuidPromise = this.#advanceTurn(
557
+ sessionId,
558
+ "running",
559
+ entity,
560
+ null,
561
+ null,
562
+ null,
563
+ null,
564
+ coalescedCount,
565
+ );
566
+ }
567
+ };
568
+ const onMessage = (message) => {
569
+ if (message && typeof message.session_id === "string") observedSessionId = message.session_id;
570
+ // Fire-and-forget transcript hook (子1): keeps only user/assistant text and
571
+ // batch-POSTs to /api/daemon/transcript for the current turn. Warn-not-throw
572
+ // inside the hook; the trailing .catch is belt-and-braces so a rejected hook
573
+ // promise can never surface as an unhandled rejection in the wake path.
574
+ this.hooks
575
+ ?.onTranscriptMessage?.({ rootIdeaKey: key, sessionId: observedSessionId, message })
576
+ .catch(() => {});
577
+ };
578
+ const wakeParams = {
519
579
  prompt,
520
580
  sessionId,
521
581
  isNew,
@@ -526,39 +586,30 @@ export class Waker {
526
586
  // a re-keyed/dropped entry never throws here. ALSO advance the server turn
527
587
  // pending→running here (子1) — same hook keying, no parallel registry — since
528
588
  // this is the precise moment the subprocess actually started.
529
- onChild: (child) => {
530
- const entry = execKey ? this.executions.get(execKey) : null;
531
- if (entry && entry.status === "running") entry.child = child;
532
- if (sessionId) {
533
- turnAdvancedToRunning = true;
534
- // Fire-and-forget; #advanceTurn swallows + logs its own failures so a
535
- // turn-report error never crashes the spawn callback (no-silent-errors).
536
- // The coalescedCount rides this running edge so the server settles the
537
- // (count 1) same-session pending turns coalesced into this one (a single
538
- // wake reports 1, which the client omits from the wire).
539
- runningTurnUuidPromise = this.#advanceTurn(
540
- sessionId,
541
- "running",
542
- entity,
543
- null,
544
- null,
545
- null,
546
- null,
547
- coalescedCount,
548
- );
549
- }
550
- },
551
- onMessage: (message) => {
552
- if (message && typeof message.session_id === "string") observedSessionId = message.session_id;
553
- // Fire-and-forget transcript hook (子1): keeps only user/assistant text and
554
- // batch-POSTs to /api/daemon/transcript for the current turn. Warn-not-throw
555
- // inside the hook; the trailing .catch is belt-and-braces so a rejected hook
556
- // promise can never surface as an unhandled rejection in the wake path.
557
- this.hooks
558
- ?.onTranscriptMessage?.({ rootIdeaKey: key, sessionId: observedSessionId, message })
559
- .catch(() => {});
560
- },
561
- });
589
+ onChild,
590
+ onMessage,
591
+ };
592
+ let result = await this.spawner.wake(wakeParams);
593
+
594
+ // Claude can still reject a new-session launch when its durable session exists
595
+ // but the transcript probe missed it. Retry that classified conflict exactly once
596
+ // as a resume. The shared callbacks preserve transcript flow and replace the live
597
+ // child for interrupt handling; onChild's gate keeps pending→running exactly once.
598
+ if (
599
+ isNew &&
600
+ result?.failureClassification === SESSION_CONFLICT_FAILURE
601
+ ) {
602
+ this.logger.warn(
603
+ `[Chorus] new-session conflict for ${key}; retrying once with resume`,
604
+ );
605
+ result = await this.spawner.wake({ ...wakeParams, isNew: false });
606
+ if (result?.failureClassification === SESSION_CONFLICT_FAILURE) {
607
+ this.deterministicConflictGuards.add(key);
608
+ this.logger.warn(
609
+ `[Chorus] deterministic session conflict fallback exhausted for ${key}; future automatic crash resumes will be suppressed`,
610
+ );
611
+ }
612
+ }
562
613
 
563
614
  if (result && !probeIsAuthoritative) {
564
615
  this.logger.info(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chorus-aidlc/chorus",
3
- "version": "0.16.4",
3
+ "version": "0.17.1",
4
4
  "description": "The Agent Harness for AI-Human Collaboration — session lifecycle, task state, sub-agent orchestration, observability, and failure recovery",
5
5
  "homepage": "https://github.com/Chorus-AIDLC/Chorus",
6
6
  "repository": {
@@ -58,6 +58,7 @@
58
58
  "landing:build": "pnpm --filter chorus-landing run build",
59
59
  "landing:preview": "pnpm --filter chorus-landing run preview",
60
60
  "test": "vitest run",
61
+ "test:release-contract": "node --test scripts/coordinated-npm-release/__tests__/coordinated-npm-release.test.mjs",
61
62
  "test:watch": "vitest",
62
63
  "test:coverage": "vitest run --coverage",
63
64
  "prepack": "pnpm build && node scripts/prepack-pglite.mjs"
@@ -1,18 +0,0 @@
1
- # Database
2
- DATABASE_URL="postgresql://chorus:chorus@localhost:5433/chorus"
3
-
4
- # NextAuth
5
- NEXTAUTH_URL="http://localhost:8637"
6
- NEXTAUTH_SECRET="development-secret-change-in-production"
7
-
8
- # Super Admin
9
- SUPER_ADMIN_EMAIL="admin@chorus.dev"
10
- # admin123
11
- SUPER_ADMIN_PASSWORD_HASH="$2a$10$.q1sLxRvEIh3Dvqkkbp2KeMs49QEtZW.2vtUYlbIOfckP.tBXe25S"
12
-
13
- # Redis (optional — falls back to in-memory EventBus when unset)
14
- REDIS_URLx="redis://default:chorus-redis@localhost:6379"
15
-
16
- # Default User Auth (simple login without OIDC)
17
- DEFAULT_USER="admin@chorus.local"
18
- DEFAULT_PASSWORD="chorus"
@@ -1 +0,0 @@
1
- "use strict";exports.id=3594,exports.ids=[3594],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,temporaryCwd:f}){await (0,e.u)(h,{companyUuid:a,ideaUuid:b,actorUuid:c,actorType:d,temporaryCwd:f})}d()}catch(a){d(a)}})},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,"40233a2c9cac69a7ed93f1e9b6339831b71407d58d",null),(0,e.A)(n,"70b7bd8a23cd8ff14ae94b33a0bc6d07c77b975899",null),(0,e.A)(o,"401c56a8f181549ad595ec886f4497c383dbaeac6b",null),(0,e.A)(p,"605a3deb07beae652b933b1d4f713649ff7d110d65",null),d()}catch(a){d(a)}})},23157:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{Ax:()=>q,G3:()=>v,M$:()=>s,UD:()=>u,UP:()=>r,ZL:()=>t,qN:()=>p});var e=c(2613);c(50785);var f=c(5562),g=c(9259),h=c(61212),i=c(28774),j=c(61076),k=c(25383),l=c(67738),m=c(97307),n=c(12217),o=a([g,h,i,j,k,l]);async function p(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"};return await (0,h.Xo)({ideaUuid:a,companyUuid:b.companyUuid,assigneeType:b.type,assigneeUuid:b.actorUuid,assignedByType:"user",assignedByUuid:b.actorUuid}),await (0,l.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 m.default.error({err:a},"Failed to claim idea"),{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"};let g=await (0,k.gt)({companyUuid:d.companyUuid,actorUserUuid:d.actorUuid,projectUuid:e.projectUuid,agentUuid:b}),i="project_fixed"===g.source?g.agentInstanceUuid:c;return await (0,h.Xo)({ideaUuid:a,companyUuid:d.companyUuid,assigneeType:"agent",assigneeUuid:b,assignedByType:"user",assignedByUuid:d.actorUuid,instanceUuid:i??void 0,cwdSource:"project_fixed"===g.source?g.source:null,cwdHost:"project_fixed"===g.source?g.host:null,runtimeCwd:"project_fixed"===g.source?g.cwd:null}),await (0,l.createActivity)({companyUuid:d.companyUuid,projectUuid:e.projectUuid,targetType:"idea",targetUuid:a,actorType:"user",actorUuid:d.actorUuid,action:"assigned",value:{assigneeType:"agent",assigneeUuid:b,...i?{instanceUuid:i}:{},..."project_fixed"===g.source?{resolvedCwdSource:g.source,resolvedCwdHost:g.host,resolvedRuntimeCwd:g.cwd}:{}}}),(0,f.revalidatePath)(`/projects/${e.projectUuid}/ideas/${a}`),(0,f.revalidatePath)(`/projects/${e.projectUuid}/ideas`),{success:!0}}catch(a){return m.default.error({err:a},"Failed to claim idea to agent"),{success:!1,error:"Failed to claim idea"}}}async function r(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,assignedByType:"user",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 m.default.error({err:a},"Failed to reassign idea instance (no wake)"),{success:!1,error:"Failed to reassign idea"}}}async function s(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"};return await (0,h.Xo)({ideaUuid:a,companyUuid:c.companyUuid,assigneeType:"user",assigneeUuid:b,assignedByType:"user",assignedByUuid:c.actorUuid}),(0,f.revalidatePath)(`/projects/${d.projectUuid}/ideas/${a}`),(0,f.revalidatePath)(`/projects/${d.projectUuid}/ideas`),{success:!0}}catch(a){return m.default.error({err:a},"Failed to claim idea to user"),{success:!1,error:"Failed to claim idea"}}}async function t(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"};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 m.default.error({err:a},"Failed to release idea"),{success:!1,error:"Failed to release idea"}}}async function u(){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 m.default.error({err:a},"Failed to get assignable agents"),{agents:[],users:[]}}}async function v(a,b){let c=await (0,g.d)();if(!c||"user"!==c.type)return{instances:[],resolvedTarget:null};try{let[d,e]=await Promise.all([(0,j._R)(c.companyUuid,a),b?(0,k.gt)({companyUuid:c.companyUuid,actorUserUuid:c.actorUuid,projectUuid:b,agentUuid:a}):null]);return{instances:d.map(a=>({connectionUuid:a.uuid,agentInstanceUuid:a.agentInstanceUuid,host:a.host,cwd:a.cwd,effectiveStatus:a.effectiveStatus})),resolvedTarget:e}}catch(a){return m.default.error({err:a},"Failed to get agent instances"),{instances:[],resolvedTarget:null}}}[g,h,i,j,k,l]=o.then?(await o)():o,(0,n.D)([p,q,r,s,t,u,v]),(0,e.A)(p,"4040785428382bc6df0b2aca473c9e048f3f83203f",null),(0,e.A)(q,"701c3e5a634d5a14e2b70d7bfcdfe38f05ce97b0c2",null),(0,e.A)(r,"70cec58cf3ee78e47658f593a642878ab62f8f826a",null),(0,e.A)(s,"6049412ecadb641edc247405003a973cc0069f87b1",null),(0,e.A)(t,"40b7cfc1a2755b1c1f006d2b1233c95a1ee568ba25",null),(0,e.A)(u,"001ce2eb46f49e07ac0ca62dfbb45d757bc843f26f",null),(0,e.A)(v,"607f68646ff7093aa935d4059031bb606a55019cf1",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,actorIsIdeaAdmin:i=!1}){let j=await e.z.idea.findFirst({where:{uuid:b,companyUuid:a}});if(!j)throw Error("Idea not found");let l=await k(a,j,c);if(!l&&!i)throw Error("Only the assigned agent or an idea:admin gateway can skip elaboration");if("elaborating"!==j.status)throw Error(`Cannot skip elaboration from status '${j.status}'`);await e.z.idea.update({where:{uuid:b},data:{status:"elaborated",elaborationDepth:"minimal",elaborationStatus:"resolved"}}),await g.f0.createActivity({companyUuid:a,projectUuid:j.projectUuid,targetType:"idea",targetUuid:b,actorType:d,actorUuid:c,action:l?"elaboration_skipped":"elaboration_verified",value:l?{reason:h}:{reason:h,viaSkip:!0}}),f.B.emitChange({companyUuid:a,projectUuid:j.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"}]])},25580:(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)("70b7bd8a23cd8ff14ae94b33a0bc6d07c77b975899",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")})]})]})}},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,"40e66e36c7167961297cad969d71e2ae2de6ec6c4d",null),(0,e.A)(o,"409723e8a9089a1dc8a310b68c0bad85961fd6e797",null),(0,e.A)(p,"600d800e23e0e0c2809cc17d70b07c9f52829e3f8e",null),(0,e.A)(q,"40436bf405186b267b13793938e8490d9e917dbab3",null),d()}catch(a){d(a)}})},42494:(a,b,c)=>{c.d(b,{e:()=>e});var d=c(42377);let e=(0,d.createServerReference)("401c56a8f181549ad595ec886f4497c383dbaeac6b",d.callServer,void 0,d.findSourceMapURL,"verifyElaborationAction")},43227:(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)("600b19d4f44aaa7a619c0df2b95a8c949a88d74d14",p.callServer,void 0,p.findSourceMapURL,"yoloRequestedAction");var r=c(87902),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",fixed_cwd_host_offline:"errorFixedCwdHostOffline",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,confirmTemporary:J,cancelPick:K,isResolving:L}=(0,s.E)({reassignNoWake:r.U,previewIdeaUuid:a}),M=b?"agent"===b.type?b.uuid:"agent_instance"===b.type?b.instance?.agentUuid??null:null:null,N=null!==M&&z.some(a=>a.agentUuid===M&&"online"===a.effectiveStatus),O=o({assignee:b,proposals:n,tasks:p}),P=o(x={assignee:b,proposals:n,tasks:p,agentOnline:N})&&x.agentOnline;if(!O||C)return C?(0,d.jsx)("span",{className:"text-[11px] text-[#00796B] dark:text-[#4FD1C0]",children:y("startedHint")}):null;let Q=async b=>{B(!0);let c=b?await q(a,b):await q(a);B(!1),c.success?(D(!0),g.oR.success(y("startedHint")),w?.()):g.oR.error(y(u[c.errorCode??"unknown"]))};return N?(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:!P,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:Q})},disabled:A||L,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??[],agentUuid:H?.agentUuid,onConfirm:I,onTemporaryConfirm:J,onCancel:K})]}):(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")})]})})}},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,temporaryCwd:e}){await (0,f.u)(k,{companyUuid:a,ideaUuid:b,actorUuid:c,actorType:d,temporaryCwd:e})}d()}catch(a){d(a)}})},47424:(a,b,c)=>{c.d(b,{c:()=>e});var d=c(42377);let e=(0,d.createServerReference)("60077c1e41fefc364a41ddb56f92c30ef87dfa862a",d.callServer,void 0,d.findSourceMapURL,"getTasksForProposalAction")},53581:(a,b,c)=>{c.d(b,{Z:()=>e});var d=c(42377);let e=(0,d.createServerReference)("600d800e23e0e0c2809cc17d70b07c9f52829e3f8e",d.callServer,void 0,d.findSourceMapURL,"deleteIdeaAction")},54758:(a,b,c)=>{c.d(b,{U:()=>e});var d=c(42377);let e=(0,d.createServerReference)("6066eceb3e85a10d2c993aebfd344667542cccb7ea",d.callServer,void 0,d.findSourceMapURL,"getProposalsForIdeaAction")},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,"40105aaae35dd17e0115cd8b12393c5a55a0c22ec3",null),(0,e.A)(r,"40bbd1b0376808960fb33e7569ba6eb1f6588104ae",null),(0,e.A)(s,"60769391d743acf35c3a7a271c3c36dfb2a492ba37",null),(0,e.A)(t,"609db9e948fed0aa34bc631da019fa0361983768ed",null),(0,e.A)(u,"6066eceb3e85a10d2c993aebfd344667542cccb7ea",null),(0,e.A)(v,"60077c1e41fefc364a41ddb56f92c30ef87dfa862a",null),(0,e.A)(w,"603964df7ea6e899b7f77fb2fb1c2814093c4be728",null),(0,e.A)(x,"00488e8ee3f35df3e0e3d04c7bdf0a507a452ea6e0",null),(0,e.A)(y,"60c60e6d3d8ab3e1c7a1feeb6a5f95223a80a10bf9",null),(0,e.A)(z,"40961fd2c514e009922e207a11cabfc30983a4ba2e",null),(0,e.A)(A,"406a1ea166eba751771eb7dd0f2a56499e77ed49a4",null),d()}catch(a){d(a)}})},60881:(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)("00488e8ee3f35df3e0e3d04c7bdf0a507a452ea6e0",s.callServer,void 0,s.findSourceMapURL,"getProjectsAndGroupsAction");s.callServer,s.findSourceMapURL;let u=(0,s.createServerReference)("60769391d743acf35c3a7a271c3c36dfb2a492ba37",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")})]})]})})}},62460:(a,b,c)=>{c.d(b,{z:()=>e});var d=c(42377);let e=(0,d.createServerReference)("40233a2c9cac69a7ed93f1e9b6339831b71407d58d",d.callServer,void 0,d.findSourceMapURL,"getElaborationAction")},68141:(a,b,c)=>{c.d(b,{x:()=>e});var d=c(42377);let e=(0,d.createServerReference)("40901c9f8641e5032e8ba3023be3eb6563320244e4",d.callServer,void 0,d.findSourceMapURL,"getIdeaActivitiesAction")},73577:(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)("602d1b293d7b95d80deb4a6f53b8db6ad78cc590c2",o.callServer,void 0,o.findSourceMapURL,"startDevelopmentAction");var q=c(87902),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",fixed_cwd_host_offline:"errorFixedCwdHostOffline",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,confirmTemporary:F,cancelPick:G,isResolving:H}=(0,r.E)({reassignNoWake:q.U,previewIdeaUuid:a}),I=b?"agent"===b.type?b.uuid:"agent_instance"===b.type?b.instance?.agentUuid??null:null:null,J=null!==I&&x.some(a=>a.agentUuid===I&&"online"===a.effectiveStatus),K=n({assignee:b,proposals:m,tasks:o}),L=n(v={assignee:b,proposals:m,tasks:o,agentOnline:J})&&v.agentOnline;if(!K||A)return A?(0,d.jsx)("span",{className:"text-[11px] text-[#00796B] dark:text-[#4FD1C0]",children:w("startedHint")}):null;let M=async b=>{z(!0);let c=b?await p(a,b):await p(a);z(!1),c.success?(B(!0),g.oR.success(w("startedHint")),u?.()):g.oR.error(w(t[c.errorCode??"unknown"]))},N=(0,d.jsx)(j.$,{className:"bg-primary hover:bg-[#B56A42] text-white",onClick:()=>{C({ideaUuid:a,wake:M})},disabled:!L||y||H,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 J?(0,d.jsxs)(d.Fragment,{children:[N,(0,d.jsx)(s.V,{open:null!==D,agentName:c??"",instances:D?.instances??[],agentUuid:D?.agentUuid,onConfirm:E,onTemporaryConfirm:F,onCancel:G})]}):(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:N})}),(0,d.jsx)(k.ZI,{children:w("offlineHint")})]})})}},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,previewIdeaUuid:c}){let[h,i]=(0,d.useState)(null),[j,k]=(0,d.useState)(!1),[l,m]=(0,d.useState)(null),[n,o]=(0,d.useState)(null),p=(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]),q=(0,d.useCallback)(async({ideaUuid:b,wake:c})=>{k(!0);let d=null;try{d=await a(b),m(d?.resolvedTarget?.source==="project_fixed"?d.resolvedTarget:null)}finally{k(!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():(o({run:c}),void i({ideaUuid:b,agentUuid:e,instances:g}));if("auto_pin"===d.outcome){let a=g[0];a?.agentInstanceUuid&&await p(b,e,a.agentInstanceUuid),await c();return}},[a,p]),r=(0,d.useCallback)(async a=>{i(null),o(null),h&&n&&(a.agentInstanceUuid&&await p(h.ideaUuid,h.agentUuid,a.agentInstanceUuid),await n.run())},[h,n,p]),s=(0,d.useCallback)(()=>{i(null),o(null)},[]);return{start:q,pickerState:h,confirmPick:r,confirmTemporary:(0,d.useCallback)(async a=>{i(null),o(null),n&&await n.run(a)},[n]),cancelPick:s,isResolving:j,fixedTarget:l}}},77439:(a,b,c)=>{c.d(b,{i:()=>y});var d=c(10837),e=c(21968),f=c(68884),g=c(9222),h=c(86460),i=c(21692),j=c(97443),k=c(42424),l=c(6871),m=c(94214),n=c(2852),o=c(11225),p=c(55732),q=c(23871),r=c(27696),s=c(27876),t=c(42377);t.callServer,t.findSourceMapURL,t.callServer,t.findSourceMapURL;let u=(0,t.createServerReference)("4040785428382bc6df0b2aca473c9e048f3f83203f",t.callServer,void 0,t.findSourceMapURL,"claimIdeaAction"),v=(0,t.createServerReference)("701c3e5a634d5a14e2b70d7bfcdfe38f05ce97b0c2",t.callServer,void 0,t.findSourceMapURL,"claimIdeaToAgentAction"),w=(0,t.createServerReference)("6049412ecadb641edc247405003a973cc0069f87b1",t.callServer,void 0,t.findSourceMapURL,"claimIdeaToUserAction"),x=(0,t.createServerReference)("40b7cfc1a2755b1c1f006d2b1233c95a1ee568ba25",t.callServer,void 0,t.findSourceMapURL,"releaseIdeaAction");function y({idea:a,projectUuid:b,currentUserUuid:c,onClose:t}){let y=(0,g.c)(),z=(0,f.r)(),[A,B]=(0,e.useState)(!1),[C,D]=(0,e.useState)("self"),[E,F]=(0,e.useState)(""),[G,H]=(0,e.useState)(""),[I,J]=(0,e.useState)([]),[K,L]=(0,e.useState)([]),[M,N]=(0,e.useState)(!0),[O,P]=(0,e.useState)(null),[Q,R]=(0,e.useState)([]),[S,T]=(0,e.useState)(!1),[U,V]=(0,e.useState)(null),[W,X]=(0,e.useState)(null),Y=!!a.assignee,Z=Q.find(a=>a.connectionUuid===W)??null,$=new Set(Q.map(a=>a.host)).size>1,_=async()=>{let b;if(B(!0),P(null),"self"===C)b=await u(a.uuid);else if("agent"===C&&E)b=await v(a.uuid,E,Z?.agentInstanceUuid??void 0);else if("user"===C&&G)b=await w(a.uuid,G);else{if("release"!==C)return void B(!1);b=await x(a.uuid)}B(!1),b?.success?(z.refresh(),t()):b?.error&&P(b.error)},aa="self"===C||"agent"===C&&E||"user"===C&&G||"release"===C&&Y;return(0,d.jsxs)(m._8,{open:!0,onOpenChange:a=>{a||t()},className:"bg-card sm:max-w-[400px]",header:(0,d.jsx)(m.AI,{className:"text-base font-semibold text-foreground",children:y("ideas.assignIdea")}),footer:(0,d.jsxs)("div",{className:"flex w-full items-center justify-end gap-4",children:[(0,d.jsx)(k.$,{variant:"outline",onClick:t,disabled:A,className:"border-border",children:y("common.cancel")}),(0,d.jsx)(k.$,{onClick:_,disabled:A||!aa,className:"bg-primary hover:bg-[#B56A42] text-white",children:A?(0,d.jsx)(h.A,{className:"h-4 w-4 animate-spin"}):"release"===C?y("common.release"):function(){if("agent"!==C||!Z)return y("common.assign");let a=(0,r.kn)(Z.cwd),b=a.isUnknown?y(a.label):a.label,c=(0,r.g9)(Z.host),d=c.isUnknown?y(c.label):c.label;return $?y("assignInstance.assignToWithHost",{path:b,host:d}):y("assignInstance.assignTo",{path:b})}()})]}),bodyClassName:"space-y-4",children:[Y&&(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:[y("common.currentAssignee"),": ",(0,d.jsx)("span",{className:"font-medium",children:a.assignee?.name})]})}),O&&(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:O})}),(0,d.jsx)("p",{className:"text-[13px] text-muted-foreground",children:y("ideas.selectIdeaAssignee")}),M?(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:C,onValueChange:a=>D(a),className:"space-y-3",children:[(0,d.jsxs)("div",{className:`rounded-[10px] p-4 transition-colors cursor-pointer ${"self"===C?"bg-[#FDF8F6] dark:bg-[#201d1b] border-2 border-primary":"bg-card border border-border hover:border-primary/50"}`,onClick:()=>D("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:y("assign.assignToMyself")})]}),(0,d.jsx)("p",{className:"mt-2 ml-6 text-xs text-muted-foreground leading-relaxed",children:y("ideas.assignToMyselfIdeaDesc")})]}),(0,d.jsxs)("div",{className:`rounded-[10px] p-4 transition-colors ${"agent"===C?"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:()=>D("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:y("ideas.orAssignToPmAgent")})]}),(0,d.jsx)("p",{className:"mt-2 ml-6 text-xs text-muted-foreground leading-relaxed",children:y("ideas.onlySelectedPmAgentCanWork")}),"agent"===C&&(0,d.jsxs)("div",{className:"mt-3 ml-6 space-y-3",children:[(0,d.jsxs)(p.l6,{value:E,onValueChange:F,children:[(0,d.jsx)(p.bq,{className:"w-full border-border",children:(0,d.jsx)(p.yv,{placeholder:y("ideas.selectPmAgent")})}),(0,d.jsx)(p.gC,{className:"z-[120]",children:I.length>0?I.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)(l.AgentAvatar,{name:a.name,size:16,className:"rounded-full"}),(0,d.jsx)("span",{children:a.name})]})},a.uuid)):(0,d.jsx)("div",{className:"px-3 py-2 text-xs text-[#9A9A9A]",children:y("ideas.noPmAgentsAvailable")})})]}),E&&(0,d.jsxs)("div",{className:"space-y-2",children:[(0,d.jsx)("span",{className:"text-[11px] font-medium uppercase tracking-wide text-[#9A9A9A]",children:y("assignInstance.workingDirectory")}),S?(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"}),y("assignInstance.loadingInstances")]}):U?.source==="project_fixed"?(0,d.jsx)(s.Y,{target:U}):0===Q.length?(0,d.jsx)("p",{className:"rounded-lg bg-background p-2.5 text-[11px] leading-relaxed text-muted-foreground",children:y("assignInstance.noInstances")}):(0,d.jsx)(q.O,{instances:Q,selectedConnectionUuid:W,onSelect:a=>X(a.connectionUuid),ariaLabel:y("assignInstance.workingDirectory")}),U?.source!=="project_fixed"&&(0,d.jsxs)("div",{className:"flex items-start gap-1.5 text-[11px] leading-relaxed text-[#9A8C7E]",children:[(0,d.jsx)(i.A,{className:"mt-0.5 h-3.5 w-3.5 shrink-0","aria-hidden":!0}),(0,d.jsx)("span",{children:y("assignInstance.ideaPinNote")})]})]})]})]}),(0,d.jsxs)("div",{className:`rounded-[10px] p-4 transition-colors ${"user"===C?"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:()=>D("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:y("assign.orAssignToUser")})]}),"user"===C&&(0,d.jsx)("div",{className:"mt-3 ml-6",children:(0,d.jsxs)(p.l6,{value:G,onValueChange:H,children:[(0,d.jsx)(p.bq,{className:"w-full border-border",children:(0,d.jsx)(p.yv,{placeholder:y("tasks.selectUser")})}),(0,d.jsx)(p.gC,{className:"z-[120]",children:K.length>0?K.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)(j.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:y("tasks.noUsersAvailable")})})]})})]}),Y&&(0,d.jsxs)("div",{className:`rounded-[10px] p-4 transition-colors cursor-pointer ${"release"===C?"bg-[#FDF8F6] dark:bg-[#201d1b] border-2 border-primary":"bg-card border border-border hover:border-primary/50"}`,onClick:()=>D("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:y("assign.releaseAssignee")})]}),(0,d.jsx)("p",{className:"mt-2 ml-6 text-xs text-muted-foreground leading-relaxed",children:y("ideas.releaseIdeaAssigneeDesc")})]})]})]})}},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,"40901c9f8641e5032e8ba3023be3eb6563320244e4",null),d()}catch(a){d(a)}})},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)}})},87902:(a,b,c)=>{c.d(b,{U:()=>e});var d=c(42377);let e=(0,d.createServerReference)("70cec58cf3ee78e47658f593a642878ab62f8f826a",d.callServer,void 0,d.findSourceMapURL,"reassignIdeaInstanceNoWakeAction")},89998:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{$:()=>l,u:()=>k});var e=c(71255),f=c(62729),g=c(85806),h=c(92633),i=c(25383),j=a([e,g,h,i]);[e,g,h,i]=j.then?(await j)():j;class l extends Error{constructor(a,b,c){super(b),this.name="StageAdvanceError",this.code=a,this.reason=c}}async function k(a,{companyUuid:b,ideaUuid:c,actorUuid:d,actorType:j,temporaryCwd:k}){if("user"!==j&&"super_admin"!==j)throw new l("NOT_HUMAN","Only users can perform a stage-advance action");let m=await e.z.idea.findFirst({where:{uuid:c,companyUuid:b}});if(!m)throw new l("IDEA_NOT_FOUND","Idea not found");let n={companyUuid:b,ideaUuid:c,actorUuid:d,actorType:j,idea:{uuid:m.uuid,companyUuid:m.companyUuid,projectUuid:m.projectUuid,status:m.status,elaborationStatus:m.elaborationStatus,assigneeType:m.assigneeType,assigneeUuid:m.assigneeUuid,cwdSource:m.cwdSource,cwdHost:m.cwdHost,runtimeCwd:m.runtimeCwd}},o=await a.precondition(n),p=await (0,h.wo)(b,n.idea.assigneeType,n.idea.assigneeUuid),q=null;p&&(q=await (0,i.gt)({companyUuid:b,actorUserUuid:d,projectUuid:n.idea.projectUuid,agentUuid:p,temporaryTarget:k,registeredInstanceUuid:"agent_instance"===n.idea.assigneeType?n.idea.assigneeUuid:null,registeredSource:"project_fixed"===n.idea.cwdSource?"project_fixed":null,registeredHost:n.idea.cwdHost,registeredRuntimeCwd:n.idea.runtimeCwd}));let r={...o,...q?{resolvedCwdActorUserUuid:q.actorUserUuid,resolvedCwdSource:q.source,resolvedCwdHost:q.host,resolvedRuntimeCwd:q.cwd,resolvedCwdAvailability:q.availability,resolvedCwdPromptPolicy:q.promptPolicy,resolvedCwdAgentInstanceUuid:q.agentInstanceUuid}:{}};if("require_online"===a.offlinePolicy){if(!p){if("agent_instance"===n.idea.assigneeType)throw new l("INSTANCE_OFFLINE","The Idea is pinned to a daemon instance that no longer exists");throw new l("ASSIGNEE_NOT_AGENT","The Idea's assignee is not an agent — there is no daemon to wake")}if(q?.source==="project_fixed"&&"ready"!==q.availability)throw new l("FIXED_CWD_HOST_OFFLINE","The project's fixed cwd target is unavailable");if(q?.source==="registered_instance"&&"ready"!==q.availability)throw new l("INSTANCE_OFFLINE","The Idea is pinned to a daemon instance that has no online connection");if(q?.source==="unconfigured"&&!q.connectionUuid)throw new l("AGENT_OFFLINE","The assigned agent has no online daemon connection")}a.transition&&await a.transition(n),await g.f0.createActivity({companyUuid:b,projectUuid:n.idea.projectUuid,targetType:"idea",targetUuid:c,actorType:j,actorUuid:d,action:a.action,value:r}),f.B.emitChange({companyUuid:b,projectUuid:n.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:()=>q,g:()=>p});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(25383),n=c(12217),o=a([g,h,i,j,k,m]);async function p(a,b){let c=await (0,g.d)();if(!c)return{success:!1,errorCode:"unauthorized"};if("user"!==c.type&&"super_admin"!==c.type)return{success:!1,errorCode:"not_human"};try{let d=b?await (0,m.e2)({companyUuid:c.companyUuid,userUuid:c.actorUuid,...b}):null;await (0,h.y)({companyUuid:c.companyUuid,ideaUuid:a,actorUuid:c.actorUuid,actorType:c.type,temporaryCwd:d});let e=await k.z.idea.findFirst({where:{uuid:a,companyUuid:c.companyUuid}});return e&&((0,f.revalidatePath)(`/projects/${e.projectUuid}/ideas/${a}`),(0,f.revalidatePath)(`/projects/${e.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"FIXED_CWD_HOST_OFFLINE":return"fixed_cwd_host_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 q(a,b){let c=await (0,g.d)();if(!c)return{success:!1,errorCode:"unauthorized"};if("user"!==c.type&&"super_admin"!==c.type)return{success:!1,errorCode:"not_human"};try{let d=b?await (0,m.e2)({companyUuid:c.companyUuid,userUuid:c.actorUuid,...b}):null;await (0,i.p)({companyUuid:c.companyUuid,ideaUuid:a,actorUuid:c.actorUuid,actorType:c.type,temporaryCwd:d});let e=await k.z.idea.findFirst({where:{uuid:a,companyUuid:c.companyUuid}});return e&&((0,f.revalidatePath)(`/projects/${e.projectUuid}/ideas/${a}`),(0,f.revalidatePath)(`/projects/${e.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";case"FIXED_CWD_HOST_OFFLINE":return"fixed_cwd_host_offline"}return"unknown"}(b)}}}[g,h,i,j,k,m]=o.then?(await o)():o,(0,n.D)([p,q]),(0,e.A)(p,"602d1b293d7b95d80deb4a6f53b8db6ad78cc590c2",null),(0,e.A)(q,"600b19d4f44aaa7a619c0df2b95a8c949a88d74d14",null),d()}catch(a){d(a)}})},98028:(a,b,c)=>{c.d(b,{J:()=>e});var d=c(42377);let e=(0,d.createServerReference)("409723e8a9089a1dc8a310b68c0bad85961fd6e797",d.callServer,void 0,d.findSourceMapURL,"updateIdeaAction")}};
@@ -1 +0,0 @@
1
- exports.id=4545,exports.ids=[4545],exports.modules={12807:(a,b,c)=>{Promise.resolve().then(c.bind(c,87352))},18167:(a,b,c)=>{"use strict";c.d(b,{A:()=>d});let d=(0,c(56556).A)("building-2",[["path",{d:"M10 12h4",key:"a56b0p"}],["path",{d:"M10 8h4",key:"1sr2af"}],["path",{d:"M14 21v-3a2 2 0 0 0-4 0v3",key:"1rgiei"}],["path",{d:"M6 10H4a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-2",key:"secmi2"}],["path",{d:"M6 21V5a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v16",key:"16ra0t"}]])},31482:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>r});var d=c(10837),e=c(21968),f=c(1007),g=c(68884),h=c(81512),i=c.n(h),j=c(9222),k=c(42424),l=c(70668),m=c(76723),n=c(18167),o=c(71197),p=c(71833),q=c(54722);function r({children:a}){let b=(0,j.c)(),c=(0,g.r)(),h=(0,f.usePathname)(),[r,s]=(0,e.useState)(null),[t,u]=(0,e.useState)(!0),v=async()=>{try{await fetch("/api/admin/session",{method:"DELETE"}),c.push("/login")}catch{q.q.error("Logout failed")}};if(t)return(0,d.jsx)("div",{className:"flex min-h-screen items-center justify-center bg-background",children:(0,d.jsx)("div",{className:"text-muted-foreground",children:b("common.loading")})});if(!r)return null;let w=[{href:"/admin",label:b("admin.dashboard"),icon:m.A},{href:"/admin/companies",label:b("admin.companies"),icon:n.A}];return(0,d.jsxs)("div",{className:"flex min-h-screen bg-background",children:[(0,d.jsxs)("aside",{className:"flex w-56 flex-col border-r bg-card",children:[(0,d.jsxs)("div",{className:"flex h-16 items-center gap-2 border-b px-4",children:[(0,d.jsx)("div",{className:"flex h-8 w-8 items-center justify-center rounded bg-destructive",children:(0,d.jsx)(o.A,{className:"h-4 w-4 text-destructive-foreground"})}),(0,d.jsx)("span",{className:"font-semibold",children:b("admin.title")})]}),(0,d.jsx)("nav",{className:"flex-1 space-y-1 p-4",children:w.map(a=>{let b=h===a.href||"/admin"!==a.href&&h.startsWith(a.href),c=a.icon;return(0,d.jsx)(i(),{href:a.href,children:(0,d.jsxs)(k.$,{variant:b?"secondary":"ghost",className:"w-full justify-start",children:[(0,d.jsx)(c,{className:"mr-3 h-5 w-5"}),a.label]})},a.href)})}),(0,d.jsxs)("div",{className:"border-t p-4",children:[(0,d.jsx)("div",{className:"mb-2 truncate text-sm text-muted-foreground",children:r.email}),(0,d.jsx)("div",{className:"mb-1 -ml-2",children:(0,d.jsx)(l.H,{})}),(0,d.jsxs)(k.$,{variant:"ghost",className:"w-full justify-start",onClick:v,children:[(0,d.jsx)(p.A,{className:"mr-2 h-4 w-4"}),b("common.signOut")]})]})]}),(0,d.jsx)("main",{className:"flex-1 overflow-auto",children:a})]})}},33863:(a,b,c)=>{"use strict";c.d(b,{Hr:()=>o,Ht:()=>l,SQ:()=>j,_2:()=>k,lp:()=>m,mB:()=>n,rI:()=>h,ty:()=>i});var d=c(10837);c(21968);var e=c(90856),f=c(5989),g=c(96307);function h({...a}){return(0,d.jsx)(f.Root,{"data-slot":"dropdown-menu",...a})}function i({...a}){return(0,d.jsx)(f.Trigger,{"data-slot":"dropdown-menu-trigger",...a})}function j({className:a,sideOffset:b=4,...c}){return(0,d.jsx)(f.Portal,{children:(0,d.jsx)(f.Content,{"data-slot":"dropdown-menu-content",sideOffset:b,className:(0,g.cn)("bg-popover text-popover-foreground z-50 min-w-[8rem] overflow-hidden rounded-md border p-1 shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",a),...c})})}function k({className:a,inset:b,variant:c="default",...e}){return(0,d.jsx)(f.Item,{"data-slot":"dropdown-menu-item","data-inset":b,"data-variant":c,className:(0,g.cn)("focus:bg-accent focus:text-accent-foreground relative flex cursor-pointer items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0","data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive","data-[inset]:pl-8 [&_svg]:size-4",a),...e})}function l({className:a,children:b,...c}){return(0,d.jsxs)(f.RadioItem,{"data-slot":"dropdown-menu-radio-item",className:(0,g.cn)("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg]:size-4",a),...c,children:[(0,d.jsx)("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:(0,d.jsx)(f.ItemIndicator,{children:(0,d.jsx)(e.A,{className:"size-2 fill-current"})})}),b]})}function m({className:a,inset:b,...c}){return(0,d.jsx)(f.Label,{"data-slot":"dropdown-menu-label","data-inset":b,className:(0,g.cn)("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",a),...c})}function n({className:a,...b}){return(0,d.jsx)(f.Separator,{"data-slot":"dropdown-menu-separator",className:(0,g.cn)("bg-border -mx-1 my-1 h-px",a),...b})}function o({...a}){return(0,d.jsx)(f.RadioGroup,{"data-slot":"dropdown-menu-radio-group",...a})}},52127:(a,b,c)=>{Promise.resolve().then(c.bind(c,31482))},70668:(a,b,c)=>{"use strict";c.d(b,{H:()=>p});var d=c(10837),e=c(21968),f=c(25065),g=c(9222),h=c(48152),i=c(49301),j=c(27936),k=c(59923),l=c(42424),m=c(33863),n=c(58857),o=c(97553);function p({mobile:a=!1}){let b=(0,g.c)(),{theme:c,setTheme:p}=(0,f.D)(),{locale:q,setLocale:r}=(0,n.Y)(),[s,t]=(0,e.useState)(!1),u=s?c:void 0,v="light"===u?h.A:"dark"===u?i.A:j.A,w=b("light"===u?"theme.light":"dark"===u?"theme.dark":"theme.system"),x=a?"h-8 min-w-8 px-2":"h-7 min-w-7 px-1.5",y=a?"h-4 w-4":"h-3.5 w-3.5";return(0,d.jsxs)("div",{className:"flex items-center gap-1 px-2 pt-0.5",children:[(0,d.jsxs)(m.rI,{children:[(0,d.jsx)(m.ty,{asChild:!0,children:(0,d.jsxs)(l.$,{variant:"ghost",size:"sm",className:`${x} justify-center gap-1.5 text-muted-foreground hover:text-foreground`,"aria-label":b("theme.toggleLabel"),title:b("theme.toggleLabel"),children:[(0,d.jsx)(v,{className:y}),(0,d.jsx)("span",{className:"text-[12px] font-medium",suppressHydrationWarning:!0,children:s?w:b("theme.system")})]})}),(0,d.jsxs)(m.SQ,{align:"start",side:"top",className:"w-40",children:[(0,d.jsx)(m.lp,{className:"text-[11px] font-medium uppercase tracking-wide text-muted-foreground",children:b("theme.toggleLabel")}),(0,d.jsxs)(m.Hr,{value:u??"system",onValueChange:a=>p(a),children:[(0,d.jsxs)(m.Ht,{value:"light",children:[(0,d.jsx)(h.A,{className:"mr-2 h-4 w-4"}),b("theme.light")]}),(0,d.jsxs)(m.Ht,{value:"dark",children:[(0,d.jsx)(i.A,{className:"mr-2 h-4 w-4"}),b("theme.dark")]}),(0,d.jsxs)(m.Ht,{value:"system",children:[(0,d.jsx)(j.A,{className:"mr-2 h-4 w-4"}),b("theme.system")]})]})]})]}),(0,d.jsx)("span",{className:"h-4 w-px bg-border","aria-hidden":!0}),(0,d.jsxs)(m.rI,{children:[(0,d.jsx)(m.ty,{asChild:!0,children:(0,d.jsxs)(l.$,{variant:"ghost",size:"sm",className:`${x} justify-center gap-1.5 text-muted-foreground hover:text-foreground`,"aria-label":b("settings.language"),title:b("settings.language"),children:[(0,d.jsx)(k.A,{className:y}),(0,d.jsx)("span",{className:"text-[12px] font-medium leading-none",children:o.L$[q]})]})}),(0,d.jsxs)(m.SQ,{align:"start",side:"top",className:"w-40",children:[(0,d.jsx)(m.lp,{className:"text-[11px] font-medium uppercase tracking-wide text-muted-foreground",children:b("settings.language")}),(0,d.jsx)(m.Hr,{value:q,onValueChange:a=>r(a),children:o.IB.map(a=>(0,d.jsx)(m.Ht,{value:a,children:o.L$[a]},a))})]})]})]})}},71197:(a,b,c)=>{"use strict";c.d(b,{A:()=>d});let d=(0,c(56556).A)("shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]])},87352:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>d});let d=(0,c(37143).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/home/ubuntu/dev/ai-pm/src/app/admin/layout.tsx\" from the server, but it's 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/admin/layout.tsx","default")}};