@chorus-aidlc/chorus 0.11.1 → 0.12.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 (669) hide show
  1. package/.next/standalone/.next/BUILD_ID +1 -1
  2. package/.next/standalone/.next/app-build-manifest.json +405 -391
  3. package/.next/standalone/.next/app-path-routes-manifest.json +33 -31
  4. package/.next/standalone/.next/build-manifest.json +5 -5
  5. package/.next/standalone/.next/prerender-manifest.json +27 -27
  6. package/.next/standalone/.next/react-loadable-manifest.json +3 -3
  7. package/.next/standalone/.next/routes-manifest.json +8 -0
  8. package/.next/standalone/.next/server/app/(dashboard)/project-groups/[uuid]/page.js +1 -1
  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]/proposals/[proposalUuid]/page.js +2 -2
  27. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/proposals/[proposalUuid]/page.js.nft.json +1 -1
  28. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/proposals/[proposalUuid]/page_client-reference-manifest.js +1 -1
  29. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/proposals/new/page.js +2 -2
  30. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/proposals/new/page.js.nft.json +1 -1
  31. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/proposals/new/page_client-reference-manifest.js +1 -1
  32. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/proposals/page.js +2 -2
  33. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/proposals/page.js.nft.json +1 -1
  34. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/proposals/page_client-reference-manifest.js +1 -1
  35. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/tasks/[taskUuid]/page.js +1 -1
  36. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/tasks/[taskUuid]/page.js.nft.json +1 -1
  37. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/tasks/[taskUuid]/page_client-reference-manifest.js +1 -1
  38. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/tasks/page.js +1 -1
  39. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/tasks/page.js.nft.json +1 -1
  40. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/tasks/page_client-reference-manifest.js +1 -1
  41. package/.next/standalone/.next/server/app/(dashboard)/projects/page.js +2 -2
  42. package/.next/standalone/.next/server/app/(dashboard)/projects/page.js.nft.json +1 -1
  43. package/.next/standalone/.next/server/app/(dashboard)/projects/page_client-reference-manifest.js +1 -1
  44. package/.next/standalone/.next/server/app/(dashboard)/settings/page.js +2 -2
  45. package/.next/standalone/.next/server/app/(dashboard)/settings/page.js.nft.json +1 -1
  46. package/.next/standalone/.next/server/app/(dashboard)/settings/page_client-reference-manifest.js +1 -1
  47. package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  48. package/.next/standalone/.next/server/app/_not-found.html +1 -1
  49. package/.next/standalone/.next/server/app/_not-found.rsc +3 -3
  50. package/.next/standalone/.next/server/app/admin/companies/[uuid]/page_client-reference-manifest.js +1 -1
  51. package/.next/standalone/.next/server/app/admin/companies/new/page_client-reference-manifest.js +1 -1
  52. package/.next/standalone/.next/server/app/admin/companies/new.html +1 -1
  53. package/.next/standalone/.next/server/app/admin/companies/new.rsc +3 -3
  54. package/.next/standalone/.next/server/app/admin/companies/page_client-reference-manifest.js +1 -1
  55. package/.next/standalone/.next/server/app/admin/companies.html +1 -1
  56. package/.next/standalone/.next/server/app/admin/companies.rsc +3 -3
  57. package/.next/standalone/.next/server/app/admin/page_client-reference-manifest.js +1 -1
  58. package/.next/standalone/.next/server/app/admin.html +1 -1
  59. package/.next/standalone/.next/server/app/admin.rsc +3 -3
  60. package/.next/standalone/.next/server/app/api/admin/companies/[uuid]/route.js +1 -1
  61. package/.next/standalone/.next/server/app/api/admin/companies/[uuid]/route.js.nft.json +1 -1
  62. package/.next/standalone/.next/server/app/api/admin/companies/[uuid]/route_client-reference-manifest.js +1 -1
  63. package/.next/standalone/.next/server/app/api/admin/companies/route.js +1 -1
  64. package/.next/standalone/.next/server/app/api/admin/companies/route.js.nft.json +1 -1
  65. package/.next/standalone/.next/server/app/api/admin/companies/route_client-reference-manifest.js +1 -1
  66. package/.next/standalone/.next/server/app/api/admin/login/route.js +1 -1
  67. package/.next/standalone/.next/server/app/api/admin/login/route_client-reference-manifest.js +1 -1
  68. package/.next/standalone/.next/server/app/api/admin/session/route.js +1 -1
  69. package/.next/standalone/.next/server/app/api/admin/session/route_client-reference-manifest.js +1 -1
  70. package/.next/standalone/.next/server/app/api/agent-connections/route.js +1 -1
  71. package/.next/standalone/.next/server/app/api/agent-connections/route.js.nft.json +1 -1
  72. package/.next/standalone/.next/server/app/api/agent-connections/route_client-reference-manifest.js +1 -1
  73. package/.next/standalone/.next/server/app/api/agents/[uuid]/route.js +1 -1
  74. package/.next/standalone/.next/server/app/api/agents/[uuid]/route.js.nft.json +1 -1
  75. package/.next/standalone/.next/server/app/api/agents/[uuid]/route_client-reference-manifest.js +1 -1
  76. package/.next/standalone/.next/server/app/api/agents/[uuid]/sessions/route.js +1 -1
  77. package/.next/standalone/.next/server/app/api/agents/[uuid]/sessions/route.js.nft.json +1 -1
  78. package/.next/standalone/.next/server/app/api/agents/[uuid]/sessions/route_client-reference-manifest.js +1 -1
  79. package/.next/standalone/.next/server/app/api/agents/route.js +1 -1
  80. package/.next/standalone/.next/server/app/api/agents/route.js.nft.json +1 -1
  81. package/.next/standalone/.next/server/app/api/agents/route_client-reference-manifest.js +1 -1
  82. package/.next/standalone/.next/server/app/api/api-keys/[uuid]/route.js +1 -1
  83. package/.next/standalone/.next/server/app/api/api-keys/[uuid]/route.js.nft.json +1 -1
  84. package/.next/standalone/.next/server/app/api/api-keys/[uuid]/route_client-reference-manifest.js +1 -1
  85. package/.next/standalone/.next/server/app/api/api-keys/route.js +1 -1
  86. package/.next/standalone/.next/server/app/api/api-keys/route.js.nft.json +1 -1
  87. package/.next/standalone/.next/server/app/api/api-keys/route_client-reference-manifest.js +1 -1
  88. package/.next/standalone/.next/server/app/api/auth/callback/route.js +1 -1
  89. package/.next/standalone/.next/server/app/api/auth/callback/route_client-reference-manifest.js +1 -1
  90. package/.next/standalone/.next/server/app/api/auth/check-default/route.js +1 -1
  91. package/.next/standalone/.next/server/app/api/auth/check-default/route_client-reference-manifest.js +1 -1
  92. package/.next/standalone/.next/server/app/api/auth/company-oidc/route_client-reference-manifest.js +1 -1
  93. package/.next/standalone/.next/server/app/api/auth/default-login/route.js +1 -1
  94. package/.next/standalone/.next/server/app/api/auth/default-login/route_client-reference-manifest.js +1 -1
  95. package/.next/standalone/.next/server/app/api/auth/identify/route.js +1 -1
  96. package/.next/standalone/.next/server/app/api/auth/identify/route_client-reference-manifest.js +1 -1
  97. package/.next/standalone/.next/server/app/api/auth/logout/route.js +1 -1
  98. package/.next/standalone/.next/server/app/api/auth/logout/route_client-reference-manifest.js +1 -1
  99. package/.next/standalone/.next/server/app/api/auth/me/route_client-reference-manifest.js +1 -1
  100. package/.next/standalone/.next/server/app/api/auth/refresh/route.js +1 -1
  101. package/.next/standalone/.next/server/app/api/auth/refresh/route_client-reference-manifest.js +1 -1
  102. package/.next/standalone/.next/server/app/api/auth/session/route.js +1 -1
  103. package/.next/standalone/.next/server/app/api/auth/session/route.js.nft.json +1 -1
  104. package/.next/standalone/.next/server/app/api/auth/session/route_client-reference-manifest.js +1 -1
  105. package/.next/standalone/.next/server/app/api/auth/sync-token/route.js +1 -1
  106. package/.next/standalone/.next/server/app/api/auth/sync-token/route_client-reference-manifest.js +1 -1
  107. package/.next/standalone/.next/server/app/api/comments/route.js +1 -1
  108. package/.next/standalone/.next/server/app/api/comments/route.js.nft.json +1 -1
  109. package/.next/standalone/.next/server/app/api/comments/route_client-reference-manifest.js +1 -1
  110. package/.next/standalone/.next/server/app/api/daemon/control/route.js +1 -1
  111. package/.next/standalone/.next/server/app/api/daemon/control/route.js.nft.json +1 -1
  112. package/.next/standalone/.next/server/app/api/daemon/control/route_client-reference-manifest.js +1 -1
  113. package/.next/standalone/.next/server/app/api/daemon/execution-state/route.js +1 -1
  114. package/.next/standalone/.next/server/app/api/daemon/execution-state/route.js.nft.json +1 -1
  115. package/.next/standalone/.next/server/app/api/daemon/execution-state/route_client-reference-manifest.js +1 -1
  116. package/.next/standalone/.next/server/app/api/daemon/executions/route.js +1 -1
  117. package/.next/standalone/.next/server/app/api/daemon/executions/route.js.nft.json +1 -1
  118. package/.next/standalone/.next/server/app/api/daemon/executions/route_client-reference-manifest.js +1 -1
  119. package/.next/standalone/.next/server/app/api/daemon/pending-turns/route.js +1 -1
  120. package/.next/standalone/.next/server/app/api/daemon/pending-turns/route.js.nft.json +1 -1
  121. package/.next/standalone/.next/server/app/api/daemon/pending-turns/route_client-reference-manifest.js +1 -1
  122. package/.next/standalone/.next/server/app/api/daemon/report-interrupt/route.js +1 -1
  123. package/.next/standalone/.next/server/app/api/daemon/report-interrupt/route.js.nft.json +1 -1
  124. package/.next/standalone/.next/server/app/api/daemon/report-interrupt/route_client-reference-manifest.js +1 -1
  125. package/.next/standalone/.next/server/app/api/daemon/resume/route.js +1 -1
  126. package/.next/standalone/.next/server/app/api/daemon/resume/route.js.nft.json +1 -1
  127. package/.next/standalone/.next/server/app/api/daemon/resume/route_client-reference-manifest.js +1 -1
  128. package/.next/standalone/.next/server/app/api/daemon/transcript/route.js +1 -1
  129. package/.next/standalone/.next/server/app/api/daemon/transcript/route.js.nft.json +1 -1
  130. package/.next/standalone/.next/server/app/api/daemon/transcript/route_client-reference-manifest.js +1 -1
  131. package/.next/standalone/.next/server/app/api/daemon/turn-advance/route.js +1 -1
  132. package/.next/standalone/.next/server/app/api/daemon/turn-advance/route.js.nft.json +1 -1
  133. package/.next/standalone/.next/server/app/api/daemon/turn-advance/route_client-reference-manifest.js +1 -1
  134. package/.next/standalone/.next/server/app/api/daemon-sessions/[sessionUuid]/instruction/route.js +1 -1
  135. package/.next/standalone/.next/server/app/api/daemon-sessions/[sessionUuid]/instruction/route.js.nft.json +1 -1
  136. package/.next/standalone/.next/server/app/api/daemon-sessions/[sessionUuid]/instruction/route_client-reference-manifest.js +1 -1
  137. package/.next/standalone/.next/server/app/api/daemon-sessions/[sessionUuid]/repoint/route.js +1 -0
  138. package/.next/standalone/.next/server/app/api/daemon-sessions/[sessionUuid]/repoint/route.js.nft.json +1 -0
  139. package/.next/standalone/.next/server/app/api/daemon-sessions/[sessionUuid]/repoint/route_client-reference-manifest.js +1 -0
  140. package/.next/standalone/.next/server/app/api/daemon-sessions/[sessionUuid]/route.js +1 -1
  141. package/.next/standalone/.next/server/app/api/daemon-sessions/[sessionUuid]/route.js.nft.json +1 -1
  142. package/.next/standalone/.next/server/app/api/daemon-sessions/[sessionUuid]/route_client-reference-manifest.js +1 -1
  143. package/.next/standalone/.next/server/app/api/daemon-sessions/ad-hoc/route.js +1 -1
  144. package/.next/standalone/.next/server/app/api/daemon-sessions/ad-hoc/route.js.nft.json +1 -1
  145. package/.next/standalone/.next/server/app/api/daemon-sessions/ad-hoc/route_client-reference-manifest.js +1 -1
  146. package/.next/standalone/.next/server/app/api/daemon-sessions/route.js +1 -1
  147. package/.next/standalone/.next/server/app/api/daemon-sessions/route.js.nft.json +1 -1
  148. package/.next/standalone/.next/server/app/api/daemon-sessions/route_client-reference-manifest.js +1 -1
  149. package/.next/standalone/.next/server/app/api/documents/[uuid]/route.js +1 -1
  150. package/.next/standalone/.next/server/app/api/documents/[uuid]/route.js.nft.json +1 -1
  151. package/.next/standalone/.next/server/app/api/documents/[uuid]/route_client-reference-manifest.js +1 -1
  152. package/.next/standalone/.next/server/app/api/entities/[type]/[uuid]/root-idea/route.js +1 -1
  153. package/.next/standalone/.next/server/app/api/entities/[type]/[uuid]/root-idea/route.js.nft.json +1 -1
  154. package/.next/standalone/.next/server/app/api/entities/[type]/[uuid]/root-idea/route_client-reference-manifest.js +1 -1
  155. package/.next/standalone/.next/server/app/api/events/notifications/route.js +6 -4
  156. package/.next/standalone/.next/server/app/api/events/notifications/route.js.nft.json +1 -1
  157. package/.next/standalone/.next/server/app/api/events/notifications/route_client-reference-manifest.js +1 -1
  158. package/.next/standalone/.next/server/app/api/events/route.js +7 -5
  159. package/.next/standalone/.next/server/app/api/events/route.js.nft.json +1 -1
  160. package/.next/standalone/.next/server/app/api/events/route_client-reference-manifest.js +1 -1
  161. package/.next/standalone/.next/server/app/api/health/route_client-reference-manifest.js +1 -1
  162. package/.next/standalone/.next/server/app/api/ideas/[uuid]/claim/route.js +1 -1
  163. package/.next/standalone/.next/server/app/api/ideas/[uuid]/claim/route.js.nft.json +1 -1
  164. package/.next/standalone/.next/server/app/api/ideas/[uuid]/claim/route_client-reference-manifest.js +1 -1
  165. package/.next/standalone/.next/server/app/api/ideas/[uuid]/move/preview/route.js +1 -1
  166. package/.next/standalone/.next/server/app/api/ideas/[uuid]/move/preview/route.js.nft.json +1 -1
  167. package/.next/standalone/.next/server/app/api/ideas/[uuid]/move/preview/route_client-reference-manifest.js +1 -1
  168. package/.next/standalone/.next/server/app/api/ideas/[uuid]/move/route.js +1 -1
  169. package/.next/standalone/.next/server/app/api/ideas/[uuid]/move/route.js.nft.json +1 -1
  170. package/.next/standalone/.next/server/app/api/ideas/[uuid]/move/route_client-reference-manifest.js +1 -1
  171. package/.next/standalone/.next/server/app/api/ideas/[uuid]/parent/route.js +1 -1
  172. package/.next/standalone/.next/server/app/api/ideas/[uuid]/parent/route.js.nft.json +1 -1
  173. package/.next/standalone/.next/server/app/api/ideas/[uuid]/parent/route_client-reference-manifest.js +1 -1
  174. package/.next/standalone/.next/server/app/api/ideas/[uuid]/release/route.js +1 -1
  175. package/.next/standalone/.next/server/app/api/ideas/[uuid]/release/route.js.nft.json +1 -1
  176. package/.next/standalone/.next/server/app/api/ideas/[uuid]/release/route_client-reference-manifest.js +1 -1
  177. package/.next/standalone/.next/server/app/api/ideas/[uuid]/route.js +1 -1
  178. package/.next/standalone/.next/server/app/api/ideas/[uuid]/route.js.nft.json +1 -1
  179. package/.next/standalone/.next/server/app/api/ideas/[uuid]/route_client-reference-manifest.js +1 -1
  180. package/.next/standalone/.next/server/app/api/keepalive/route.js +1 -0
  181. package/.next/standalone/.next/server/app/api/keepalive/route.js.nft.json +1 -0
  182. package/.next/standalone/.next/server/app/api/keepalive/route_client-reference-manifest.js +1 -0
  183. package/.next/standalone/.next/server/app/api/mcp/route.js +5 -5
  184. package/.next/standalone/.next/server/app/api/mcp/route.js.nft.json +1 -1
  185. package/.next/standalone/.next/server/app/api/mcp/route_client-reference-manifest.js +1 -1
  186. package/.next/standalone/.next/server/app/api/me/assignments/route.js +1 -1
  187. package/.next/standalone/.next/server/app/api/me/assignments/route.js.nft.json +1 -1
  188. package/.next/standalone/.next/server/app/api/me/assignments/route_client-reference-manifest.js +1 -1
  189. package/.next/standalone/.next/server/app/api/mentionables/route.js +1 -1
  190. package/.next/standalone/.next/server/app/api/mentionables/route.js.nft.json +1 -1
  191. package/.next/standalone/.next/server/app/api/mentionables/route_client-reference-manifest.js +1 -1
  192. package/.next/standalone/.next/server/app/api/notifications/[uuid]/archive/route.js +1 -1
  193. package/.next/standalone/.next/server/app/api/notifications/[uuid]/archive/route.js.nft.json +1 -1
  194. package/.next/standalone/.next/server/app/api/notifications/[uuid]/archive/route_client-reference-manifest.js +1 -1
  195. package/.next/standalone/.next/server/app/api/notifications/[uuid]/read/route.js +1 -1
  196. package/.next/standalone/.next/server/app/api/notifications/[uuid]/read/route.js.nft.json +1 -1
  197. package/.next/standalone/.next/server/app/api/notifications/[uuid]/read/route_client-reference-manifest.js +1 -1
  198. package/.next/standalone/.next/server/app/api/notifications/preferences/route.js +1 -1
  199. package/.next/standalone/.next/server/app/api/notifications/preferences/route.js.nft.json +1 -1
  200. package/.next/standalone/.next/server/app/api/notifications/preferences/route_client-reference-manifest.js +1 -1
  201. package/.next/standalone/.next/server/app/api/notifications/read-all/route.js +1 -1
  202. package/.next/standalone/.next/server/app/api/notifications/read-all/route.js.nft.json +1 -1
  203. package/.next/standalone/.next/server/app/api/notifications/read-all/route_client-reference-manifest.js +1 -1
  204. package/.next/standalone/.next/server/app/api/notifications/route.js +1 -1
  205. package/.next/standalone/.next/server/app/api/notifications/route.js.nft.json +1 -1
  206. package/.next/standalone/.next/server/app/api/notifications/route_client-reference-manifest.js +1 -1
  207. package/.next/standalone/.next/server/app/api/notifications/unread-count/route.js +1 -1
  208. package/.next/standalone/.next/server/app/api/notifications/unread-count/route.js.nft.json +1 -1
  209. package/.next/standalone/.next/server/app/api/notifications/unread-count/route_client-reference-manifest.js +1 -1
  210. package/.next/standalone/.next/server/app/api/project-groups/[uuid]/dashboard/route.js +1 -1
  211. package/.next/standalone/.next/server/app/api/project-groups/[uuid]/dashboard/route.js.nft.json +1 -1
  212. package/.next/standalone/.next/server/app/api/project-groups/[uuid]/dashboard/route_client-reference-manifest.js +1 -1
  213. package/.next/standalone/.next/server/app/api/project-groups/[uuid]/route.js +1 -1
  214. package/.next/standalone/.next/server/app/api/project-groups/[uuid]/route.js.nft.json +1 -1
  215. package/.next/standalone/.next/server/app/api/project-groups/[uuid]/route_client-reference-manifest.js +1 -1
  216. package/.next/standalone/.next/server/app/api/project-groups/route.js +1 -1
  217. package/.next/standalone/.next/server/app/api/project-groups/route.js.nft.json +1 -1
  218. package/.next/standalone/.next/server/app/api/project-groups/route_client-reference-manifest.js +1 -1
  219. package/.next/standalone/.next/server/app/api/projects/[uuid]/activity/route.js +1 -1
  220. package/.next/standalone/.next/server/app/api/projects/[uuid]/activity/route.js.nft.json +1 -1
  221. package/.next/standalone/.next/server/app/api/projects/[uuid]/activity/route_client-reference-manifest.js +1 -1
  222. package/.next/standalone/.next/server/app/api/projects/[uuid]/available/route.js +1 -1
  223. package/.next/standalone/.next/server/app/api/projects/[uuid]/available/route.js.nft.json +1 -1
  224. package/.next/standalone/.next/server/app/api/projects/[uuid]/available/route_client-reference-manifest.js +1 -1
  225. package/.next/standalone/.next/server/app/api/projects/[uuid]/documents/route.js +1 -1
  226. package/.next/standalone/.next/server/app/api/projects/[uuid]/documents/route.js.nft.json +1 -1
  227. package/.next/standalone/.next/server/app/api/projects/[uuid]/documents/route_client-reference-manifest.js +1 -1
  228. package/.next/standalone/.next/server/app/api/projects/[uuid]/group/route.js +1 -1
  229. package/.next/standalone/.next/server/app/api/projects/[uuid]/group/route.js.nft.json +1 -1
  230. package/.next/standalone/.next/server/app/api/projects/[uuid]/group/route_client-reference-manifest.js +1 -1
  231. package/.next/standalone/.next/server/app/api/projects/[uuid]/ideas/route.js +1 -1
  232. package/.next/standalone/.next/server/app/api/projects/[uuid]/ideas/route.js.nft.json +1 -1
  233. package/.next/standalone/.next/server/app/api/projects/[uuid]/ideas/route_client-reference-manifest.js +1 -1
  234. package/.next/standalone/.next/server/app/api/projects/[uuid]/ideas/tracker/route.js +1 -1
  235. package/.next/standalone/.next/server/app/api/projects/[uuid]/ideas/tracker/route.js.nft.json +1 -1
  236. package/.next/standalone/.next/server/app/api/projects/[uuid]/ideas/tracker/route_client-reference-manifest.js +1 -1
  237. package/.next/standalone/.next/server/app/api/projects/[uuid]/proposals/[proposalUuid]/validate/route.js +1 -1
  238. package/.next/standalone/.next/server/app/api/projects/[uuid]/proposals/[proposalUuid]/validate/route.js.nft.json +1 -1
  239. package/.next/standalone/.next/server/app/api/projects/[uuid]/proposals/[proposalUuid]/validate/route_client-reference-manifest.js +1 -1
  240. package/.next/standalone/.next/server/app/api/projects/[uuid]/proposals/route.js +1 -1
  241. package/.next/standalone/.next/server/app/api/projects/[uuid]/proposals/route.js.nft.json +1 -1
  242. package/.next/standalone/.next/server/app/api/projects/[uuid]/proposals/route_client-reference-manifest.js +1 -1
  243. package/.next/standalone/.next/server/app/api/projects/[uuid]/proposals/summary/route.js +1 -1
  244. package/.next/standalone/.next/server/app/api/projects/[uuid]/proposals/summary/route.js.nft.json +1 -1
  245. package/.next/standalone/.next/server/app/api/projects/[uuid]/proposals/summary/route_client-reference-manifest.js +1 -1
  246. package/.next/standalone/.next/server/app/api/projects/[uuid]/route.js +1 -1
  247. package/.next/standalone/.next/server/app/api/projects/[uuid]/route.js.nft.json +1 -1
  248. package/.next/standalone/.next/server/app/api/projects/[uuid]/route_client-reference-manifest.js +1 -1
  249. package/.next/standalone/.next/server/app/api/projects/[uuid]/stats/route.js +1 -1
  250. package/.next/standalone/.next/server/app/api/projects/[uuid]/stats/route.js.nft.json +1 -1
  251. package/.next/standalone/.next/server/app/api/projects/[uuid]/stats/route_client-reference-manifest.js +1 -1
  252. package/.next/standalone/.next/server/app/api/projects/[uuid]/tasks/dependencies/route.js +1 -1
  253. package/.next/standalone/.next/server/app/api/projects/[uuid]/tasks/dependencies/route.js.nft.json +1 -1
  254. package/.next/standalone/.next/server/app/api/projects/[uuid]/tasks/dependencies/route_client-reference-manifest.js +1 -1
  255. package/.next/standalone/.next/server/app/api/projects/[uuid]/tasks/route.js +1 -1
  256. package/.next/standalone/.next/server/app/api/projects/[uuid]/tasks/route.js.nft.json +1 -1
  257. package/.next/standalone/.next/server/app/api/projects/[uuid]/tasks/route_client-reference-manifest.js +1 -1
  258. package/.next/standalone/.next/server/app/api/projects/route.js +1 -1
  259. package/.next/standalone/.next/server/app/api/projects/route.js.nft.json +1 -1
  260. package/.next/standalone/.next/server/app/api/projects/route_client-reference-manifest.js +1 -1
  261. package/.next/standalone/.next/server/app/api/proposals/[uuid]/approve/route.js +1 -1
  262. package/.next/standalone/.next/server/app/api/proposals/[uuid]/approve/route.js.nft.json +1 -1
  263. package/.next/standalone/.next/server/app/api/proposals/[uuid]/approve/route_client-reference-manifest.js +1 -1
  264. package/.next/standalone/.next/server/app/api/proposals/[uuid]/close/route.js +1 -1
  265. package/.next/standalone/.next/server/app/api/proposals/[uuid]/close/route.js.nft.json +1 -1
  266. package/.next/standalone/.next/server/app/api/proposals/[uuid]/close/route_client-reference-manifest.js +1 -1
  267. package/.next/standalone/.next/server/app/api/proposals/[uuid]/reject/route.js +1 -1
  268. package/.next/standalone/.next/server/app/api/proposals/[uuid]/reject/route.js.nft.json +1 -1
  269. package/.next/standalone/.next/server/app/api/proposals/[uuid]/reject/route_client-reference-manifest.js +1 -1
  270. package/.next/standalone/.next/server/app/api/proposals/[uuid]/revoke/route.js +1 -1
  271. package/.next/standalone/.next/server/app/api/proposals/[uuid]/revoke/route.js.nft.json +1 -1
  272. package/.next/standalone/.next/server/app/api/proposals/[uuid]/revoke/route_client-reference-manifest.js +1 -1
  273. package/.next/standalone/.next/server/app/api/proposals/[uuid]/route.js +1 -1
  274. package/.next/standalone/.next/server/app/api/proposals/[uuid]/route.js.nft.json +1 -1
  275. package/.next/standalone/.next/server/app/api/proposals/[uuid]/route_client-reference-manifest.js +1 -1
  276. package/.next/standalone/.next/server/app/api/search/route.js +1 -1
  277. package/.next/standalone/.next/server/app/api/search/route.js.nft.json +1 -1
  278. package/.next/standalone/.next/server/app/api/search/route_client-reference-manifest.js +1 -1
  279. package/.next/standalone/.next/server/app/api/sessions/[uuid]/route.js +1 -1
  280. package/.next/standalone/.next/server/app/api/sessions/[uuid]/route.js.nft.json +1 -1
  281. package/.next/standalone/.next/server/app/api/sessions/[uuid]/route_client-reference-manifest.js +1 -1
  282. package/.next/standalone/.next/server/app/api/tasks/[uuid]/claim/route.js +1 -1
  283. package/.next/standalone/.next/server/app/api/tasks/[uuid]/claim/route.js.nft.json +1 -1
  284. package/.next/standalone/.next/server/app/api/tasks/[uuid]/claim/route_client-reference-manifest.js +1 -1
  285. package/.next/standalone/.next/server/app/api/tasks/[uuid]/dependencies/[dependsOnUuid]/route.js +1 -1
  286. package/.next/standalone/.next/server/app/api/tasks/[uuid]/dependencies/[dependsOnUuid]/route.js.nft.json +1 -1
  287. package/.next/standalone/.next/server/app/api/tasks/[uuid]/dependencies/[dependsOnUuid]/route_client-reference-manifest.js +1 -1
  288. package/.next/standalone/.next/server/app/api/tasks/[uuid]/dependencies/route.js +1 -1
  289. package/.next/standalone/.next/server/app/api/tasks/[uuid]/dependencies/route.js.nft.json +1 -1
  290. package/.next/standalone/.next/server/app/api/tasks/[uuid]/dependencies/route_client-reference-manifest.js +1 -1
  291. package/.next/standalone/.next/server/app/api/tasks/[uuid]/release/route.js +1 -1
  292. package/.next/standalone/.next/server/app/api/tasks/[uuid]/release/route.js.nft.json +1 -1
  293. package/.next/standalone/.next/server/app/api/tasks/[uuid]/release/route_client-reference-manifest.js +1 -1
  294. package/.next/standalone/.next/server/app/api/tasks/[uuid]/route.js +1 -1
  295. package/.next/standalone/.next/server/app/api/tasks/[uuid]/route.js.nft.json +1 -1
  296. package/.next/standalone/.next/server/app/api/tasks/[uuid]/route_client-reference-manifest.js +1 -1
  297. package/.next/standalone/.next/server/app/api/tasks/[uuid]/sessions/route.js +1 -1
  298. package/.next/standalone/.next/server/app/api/tasks/[uuid]/sessions/route.js.nft.json +1 -1
  299. package/.next/standalone/.next/server/app/api/tasks/[uuid]/sessions/route_client-reference-manifest.js +1 -1
  300. package/.next/standalone/.next/server/app/index.html +1 -1
  301. package/.next/standalone/.next/server/app/index.rsc +4 -4
  302. package/.next/standalone/.next/server/app/login/admin/page.js +2 -2
  303. package/.next/standalone/.next/server/app/login/admin/page.js.nft.json +1 -1
  304. package/.next/standalone/.next/server/app/login/admin/page_client-reference-manifest.js +1 -1
  305. package/.next/standalone/.next/server/app/login/admin.html +1 -1
  306. package/.next/standalone/.next/server/app/login/admin.rsc +3 -3
  307. package/.next/standalone/.next/server/app/login/callback/page.js +2 -2
  308. package/.next/standalone/.next/server/app/login/callback/page.js.nft.json +1 -1
  309. package/.next/standalone/.next/server/app/login/callback/page_client-reference-manifest.js +1 -1
  310. package/.next/standalone/.next/server/app/login/callback.html +1 -1
  311. package/.next/standalone/.next/server/app/login/callback.rsc +4 -4
  312. package/.next/standalone/.next/server/app/login/page.js +2 -2
  313. package/.next/standalone/.next/server/app/login/page.js.nft.json +1 -1
  314. package/.next/standalone/.next/server/app/login/page_client-reference-manifest.js +1 -1
  315. package/.next/standalone/.next/server/app/login/pick-workspace/page.js +1 -1
  316. package/.next/standalone/.next/server/app/login/pick-workspace/page_client-reference-manifest.js +1 -1
  317. package/.next/standalone/.next/server/app/login/pick-workspace.html +1 -1
  318. package/.next/standalone/.next/server/app/login/pick-workspace.rsc +4 -4
  319. package/.next/standalone/.next/server/app/login/silent-refresh/page.js +1 -1
  320. package/.next/standalone/.next/server/app/login/silent-refresh/page_client-reference-manifest.js +1 -1
  321. package/.next/standalone/.next/server/app/login/silent-refresh.html +1 -1
  322. package/.next/standalone/.next/server/app/login/silent-refresh.rsc +4 -4
  323. package/.next/standalone/.next/server/app/login.html +1 -1
  324. package/.next/standalone/.next/server/app/login.rsc +4 -4
  325. package/.next/standalone/.next/server/app/onboarding/page.js +2 -2
  326. package/.next/standalone/.next/server/app/onboarding/page.js.nft.json +1 -1
  327. package/.next/standalone/.next/server/app/onboarding/page_client-reference-manifest.js +1 -1
  328. package/.next/standalone/.next/server/app/onboarding.html +1 -1
  329. package/.next/standalone/.next/server/app/onboarding.rsc +4 -4
  330. package/.next/standalone/.next/server/app/page.js +2 -2
  331. package/.next/standalone/.next/server/app/page.js.nft.json +1 -1
  332. package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
  333. package/.next/standalone/.next/server/app/projects.html +1 -1
  334. package/.next/standalone/.next/server/app/projects.rsc +5 -5
  335. package/.next/standalone/.next/server/app/settings.html +1 -1
  336. package/.next/standalone/.next/server/app/settings.rsc +5 -5
  337. package/.next/standalone/.next/server/app-paths-manifest.json +33 -31
  338. package/.next/standalone/.next/server/chunks/{5201.js → 1343.js} +2 -2
  339. package/.next/standalone/.next/server/chunks/1463.js +1 -0
  340. package/.next/standalone/.next/server/chunks/1596.js +2 -2
  341. package/.next/standalone/.next/server/chunks/2618.js +1 -1
  342. package/.next/standalone/.next/server/chunks/2622.js +1 -0
  343. package/.next/standalone/.next/server/chunks/2779.js +31 -0
  344. package/.next/standalone/.next/server/chunks/2961.js +1 -1
  345. package/.next/standalone/.next/server/chunks/3219.js +1 -1
  346. package/.next/standalone/.next/server/chunks/3419.js +1 -1
  347. package/.next/standalone/.next/server/chunks/4292.js +1 -0
  348. package/.next/standalone/.next/server/chunks/4872.js +1 -0
  349. package/.next/standalone/.next/server/chunks/5300.js +1 -1
  350. package/.next/standalone/.next/server/chunks/5538.js +1 -0
  351. package/.next/standalone/.next/server/chunks/6113.js +1 -1
  352. package/.next/standalone/.next/server/chunks/6207.js +1 -1
  353. package/.next/standalone/.next/server/chunks/7063.js +2 -2
  354. package/.next/standalone/.next/server/chunks/7064.js +1 -0
  355. package/.next/standalone/.next/server/chunks/7160.js +1 -0
  356. package/.next/standalone/.next/server/chunks/7364.js +1 -0
  357. package/.next/standalone/.next/server/chunks/7368.js +1 -1
  358. package/.next/standalone/.next/server/chunks/7427.js +1 -0
  359. package/.next/standalone/.next/server/chunks/7515.js +1 -0
  360. package/.next/standalone/.next/server/chunks/7578.js +2 -2
  361. package/.next/standalone/.next/server/chunks/{4711.js → 796.js} +6 -6
  362. package/.next/standalone/.next/server/chunks/8732.js +1 -0
  363. package/.next/standalone/.next/server/chunks/9161.js +1 -0
  364. package/.next/standalone/.next/server/chunks/920.js +1 -1
  365. package/.next/standalone/.next/server/chunks/9273.js +1 -0
  366. package/.next/standalone/.next/server/chunks/937.js +3 -3
  367. package/.next/standalone/.next/server/middleware-build-manifest.js +1 -1
  368. package/.next/standalone/.next/server/middleware-manifest.json +5 -5
  369. package/.next/standalone/.next/server/middleware-react-loadable-manifest.js +1 -1
  370. package/.next/standalone/.next/server/pages/404.html +1 -1
  371. package/.next/standalone/.next/server/pages/500.html +1 -1
  372. package/.next/standalone/.next/server/server-reference-manifest.js +1 -1
  373. package/.next/standalone/.next/server/server-reference-manifest.json +1 -1
  374. package/.next/standalone/.next/server/src/middleware.js +1 -1
  375. package/.next/standalone/.next/static/GmBblfxcDziUENBiEap4B/_buildManifest.js +1 -0
  376. package/.next/standalone/.next/static/chunks/10344-2e9a9d767e2e8ed1.js +1 -0
  377. package/.next/standalone/.next/static/chunks/16467-dd4f928e725306c1.js +1 -0
  378. package/.next/standalone/.next/static/chunks/20081-a2bf5c9f24d5d589.js +1 -0
  379. package/.next/standalone/.next/static/chunks/2280-f48bf99ea9d88ece.js +1 -0
  380. package/.next/standalone/.next/static/chunks/26394-4af487a51dd62832.js +1 -0
  381. package/.next/standalone/.next/static/chunks/27378-9328bcc96ae9872e.js +1 -0
  382. package/.next/standalone/.next/static/chunks/{33187.13c12f5c0821ac57.js → 33187.1328c15b9dab78a8.js} +1 -1
  383. package/.next/standalone/.next/static/chunks/37784-95dee37276b1067b.js +1 -0
  384. package/.next/standalone/.next/static/chunks/46983-8bf90f1ffeb55957.js +1 -0
  385. package/.next/standalone/.next/static/chunks/46999-f53da8f53fe1b8a9.js +1 -0
  386. package/.next/standalone/.next/static/chunks/4860.e3d0dd79a4d37626.js +1 -0
  387. package/.next/standalone/.next/static/chunks/54637-71d281d649ea3a17.js +1 -0
  388. package/.next/standalone/.next/static/chunks/64187-cff8a4b5e96fa8f9.js +10 -0
  389. package/.next/standalone/.next/static/chunks/78917-aa5bbff9248799a4.js +1 -0
  390. package/.next/standalone/.next/static/chunks/80904-973284d1fe916c38.js +1 -0
  391. package/.next/standalone/.next/static/chunks/85573-fb4d2cbd67612d47.js +1 -0
  392. package/.next/standalone/.next/static/chunks/88561-0b14e1564419f215.js +1 -0
  393. package/.next/standalone/.next/static/chunks/89035-faf398b7bbc7d2ed.js +1 -0
  394. package/.next/standalone/.next/static/chunks/89644-2fee0373b890e8e3.js +1 -0
  395. package/.next/standalone/.next/static/chunks/{93346-5489d90bc2d57190.js → 93346-b3e1ebe948fc623f.js} +1 -1
  396. package/.next/standalone/.next/static/chunks/{97784-7b90a17294840e32.js → 97784-42081b75f8cc6da8.js} +1 -1
  397. package/.next/standalone/.next/static/chunks/97868-55f18a05fe483d85.js +1 -0
  398. package/.next/standalone/.next/static/chunks/99373.cc6319fa4cf36081.js +1 -0
  399. package/.next/standalone/.next/static/chunks/app/(dashboard)/layout-b3a497ba5eb08036.js +1 -0
  400. package/.next/standalone/.next/static/chunks/app/(dashboard)/project-groups/[uuid]/page-2944c6c9bc48a7d6.js +1 -0
  401. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/dashboard/[ideaUuid]/page-f1b0daea9f947caf.js +1 -0
  402. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/dashboard/page-d786f0c18a9c4f06.js +1 -0
  403. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/documents/[documentUuid]/page-c68f1eda3779b448.js +1 -0
  404. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/documents/page-e0935445535c28cb.js +1 -0
  405. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/proposals/[proposalUuid]/page-f824632ff61a9fa7.js +1 -0
  406. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/proposals/new/page-dbcb6e50fc4816c6.js +1 -0
  407. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/proposals/page-1295bc505e727383.js +1 -0
  408. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/tasks/[taskUuid]/page-ceeec49af0396432.js +1 -0
  409. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/tasks/page-1286afe43c086d6a.js +1 -0
  410. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/{page-583e58d4d689d38b.js → page-fec019d974ef8d4e.js} +1 -1
  411. package/.next/standalone/.next/static/chunks/app/(dashboard)/settings/page-0fb1d51016f6bd56.js +1 -0
  412. package/.next/standalone/.next/static/chunks/app/api/admin/companies/[uuid]/route-f1b0daea9f947caf.js +1 -0
  413. package/.next/standalone/.next/static/chunks/app/api/admin/companies/route-f1b0daea9f947caf.js +1 -0
  414. package/.next/standalone/.next/static/chunks/app/api/admin/login/route-f1b0daea9f947caf.js +1 -0
  415. package/.next/standalone/.next/static/chunks/app/api/admin/session/route-f1b0daea9f947caf.js +1 -0
  416. package/.next/standalone/.next/static/chunks/app/api/agent-connections/route-f1b0daea9f947caf.js +1 -0
  417. package/.next/standalone/.next/static/chunks/app/api/agents/[uuid]/route-f1b0daea9f947caf.js +1 -0
  418. package/.next/standalone/.next/static/chunks/app/api/agents/[uuid]/sessions/route-f1b0daea9f947caf.js +1 -0
  419. package/.next/standalone/.next/static/chunks/app/api/agents/route-f1b0daea9f947caf.js +1 -0
  420. package/.next/standalone/.next/static/chunks/app/api/api-keys/[uuid]/route-f1b0daea9f947caf.js +1 -0
  421. package/.next/standalone/.next/static/chunks/app/api/api-keys/route-f1b0daea9f947caf.js +1 -0
  422. package/.next/standalone/.next/static/chunks/app/api/auth/callback/route-f1b0daea9f947caf.js +1 -0
  423. package/.next/standalone/.next/static/chunks/app/api/auth/check-default/route-f1b0daea9f947caf.js +1 -0
  424. package/.next/standalone/.next/static/chunks/app/api/auth/company-oidc/route-f1b0daea9f947caf.js +1 -0
  425. package/.next/standalone/.next/static/chunks/app/api/auth/default-login/route-f1b0daea9f947caf.js +1 -0
  426. package/.next/standalone/.next/static/chunks/app/api/auth/identify/route-f1b0daea9f947caf.js +1 -0
  427. package/.next/standalone/.next/static/chunks/app/api/auth/logout/route-f1b0daea9f947caf.js +1 -0
  428. package/.next/standalone/.next/static/chunks/app/api/auth/me/route-f1b0daea9f947caf.js +1 -0
  429. package/.next/standalone/.next/static/chunks/app/api/auth/refresh/route-f1b0daea9f947caf.js +1 -0
  430. package/.next/standalone/.next/static/chunks/app/api/auth/session/route-f1b0daea9f947caf.js +1 -0
  431. package/.next/standalone/.next/static/chunks/app/api/auth/sync-token/route-f1b0daea9f947caf.js +1 -0
  432. package/.next/standalone/.next/static/chunks/app/api/comments/route-f1b0daea9f947caf.js +1 -0
  433. package/.next/standalone/.next/static/chunks/app/api/daemon/control/route-f1b0daea9f947caf.js +1 -0
  434. package/.next/standalone/.next/static/chunks/app/api/daemon/execution-state/route-f1b0daea9f947caf.js +1 -0
  435. package/.next/standalone/.next/static/chunks/app/api/daemon/executions/route-f1b0daea9f947caf.js +1 -0
  436. package/.next/standalone/.next/static/chunks/app/api/daemon/pending-turns/route-f1b0daea9f947caf.js +1 -0
  437. package/.next/standalone/.next/static/chunks/app/api/daemon/report-interrupt/route-f1b0daea9f947caf.js +1 -0
  438. package/.next/standalone/.next/static/chunks/app/api/daemon/resume/route-f1b0daea9f947caf.js +1 -0
  439. package/.next/standalone/.next/static/chunks/app/api/daemon/transcript/route-f1b0daea9f947caf.js +1 -0
  440. package/.next/standalone/.next/static/chunks/app/api/daemon/turn-advance/route-f1b0daea9f947caf.js +1 -0
  441. package/.next/standalone/.next/static/chunks/app/api/daemon-sessions/[sessionUuid]/instruction/route-f1b0daea9f947caf.js +1 -0
  442. package/.next/standalone/.next/static/chunks/app/api/daemon-sessions/[sessionUuid]/repoint/route-f1b0daea9f947caf.js +1 -0
  443. package/.next/standalone/.next/static/chunks/app/api/daemon-sessions/[sessionUuid]/route-f1b0daea9f947caf.js +1 -0
  444. package/.next/standalone/.next/static/chunks/app/api/daemon-sessions/ad-hoc/route-f1b0daea9f947caf.js +1 -0
  445. package/.next/standalone/.next/static/chunks/app/api/daemon-sessions/route-f1b0daea9f947caf.js +1 -0
  446. package/.next/standalone/.next/static/chunks/app/api/documents/[uuid]/route-f1b0daea9f947caf.js +1 -0
  447. package/.next/standalone/.next/static/chunks/app/api/entities/[type]/[uuid]/root-idea/route-f1b0daea9f947caf.js +1 -0
  448. package/.next/standalone/.next/static/chunks/app/api/events/notifications/route-f1b0daea9f947caf.js +1 -0
  449. package/.next/standalone/.next/static/chunks/app/api/events/route-f1b0daea9f947caf.js +1 -0
  450. package/.next/standalone/.next/static/chunks/app/api/health/route-f1b0daea9f947caf.js +1 -0
  451. package/.next/standalone/.next/static/chunks/app/api/ideas/[uuid]/claim/route-f1b0daea9f947caf.js +1 -0
  452. package/.next/standalone/.next/static/chunks/app/api/ideas/[uuid]/move/preview/route-f1b0daea9f947caf.js +1 -0
  453. package/.next/standalone/.next/static/chunks/app/api/ideas/[uuid]/move/route-f1b0daea9f947caf.js +1 -0
  454. package/.next/standalone/.next/static/chunks/app/api/ideas/[uuid]/parent/route-f1b0daea9f947caf.js +1 -0
  455. package/.next/standalone/.next/static/chunks/app/api/ideas/[uuid]/release/route-f1b0daea9f947caf.js +1 -0
  456. package/.next/standalone/.next/static/chunks/app/api/ideas/[uuid]/route-f1b0daea9f947caf.js +1 -0
  457. package/.next/standalone/.next/static/chunks/app/api/keepalive/route-f1b0daea9f947caf.js +1 -0
  458. package/.next/standalone/.next/static/chunks/app/api/mcp/route-f1b0daea9f947caf.js +1 -0
  459. package/.next/standalone/.next/static/chunks/app/api/me/assignments/route-f1b0daea9f947caf.js +1 -0
  460. package/.next/standalone/.next/static/chunks/app/api/mentionables/route-f1b0daea9f947caf.js +1 -0
  461. package/.next/standalone/.next/static/chunks/app/api/notifications/[uuid]/archive/route-f1b0daea9f947caf.js +1 -0
  462. package/.next/standalone/.next/static/chunks/app/api/notifications/[uuid]/read/route-f1b0daea9f947caf.js +1 -0
  463. package/.next/standalone/.next/static/chunks/app/api/notifications/preferences/route-f1b0daea9f947caf.js +1 -0
  464. package/.next/standalone/.next/static/chunks/app/api/notifications/read-all/route-f1b0daea9f947caf.js +1 -0
  465. package/.next/standalone/.next/static/chunks/app/api/notifications/route-f1b0daea9f947caf.js +1 -0
  466. package/.next/standalone/.next/static/chunks/app/api/notifications/unread-count/route-f1b0daea9f947caf.js +1 -0
  467. package/.next/standalone/.next/static/chunks/app/api/project-groups/[uuid]/dashboard/route-f1b0daea9f947caf.js +1 -0
  468. package/.next/standalone/.next/static/chunks/app/api/project-groups/[uuid]/route-f1b0daea9f947caf.js +1 -0
  469. package/.next/standalone/.next/static/chunks/app/api/project-groups/route-f1b0daea9f947caf.js +1 -0
  470. package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/activity/route-f1b0daea9f947caf.js +1 -0
  471. package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/available/route-f1b0daea9f947caf.js +1 -0
  472. package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/documents/route-f1b0daea9f947caf.js +1 -0
  473. package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/group/route-f1b0daea9f947caf.js +1 -0
  474. package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/ideas/route-f1b0daea9f947caf.js +1 -0
  475. package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/ideas/tracker/route-f1b0daea9f947caf.js +1 -0
  476. package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/proposals/[proposalUuid]/validate/route-f1b0daea9f947caf.js +1 -0
  477. package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/proposals/route-f1b0daea9f947caf.js +1 -0
  478. package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/proposals/summary/route-f1b0daea9f947caf.js +1 -0
  479. package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/route-f1b0daea9f947caf.js +1 -0
  480. package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/stats/route-f1b0daea9f947caf.js +1 -0
  481. package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/tasks/dependencies/route-f1b0daea9f947caf.js +1 -0
  482. package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/tasks/route-f1b0daea9f947caf.js +1 -0
  483. package/.next/standalone/.next/static/chunks/app/api/projects/route-f1b0daea9f947caf.js +1 -0
  484. package/.next/standalone/.next/static/chunks/app/api/proposals/[uuid]/approve/route-f1b0daea9f947caf.js +1 -0
  485. package/.next/standalone/.next/static/chunks/app/api/proposals/[uuid]/close/route-f1b0daea9f947caf.js +1 -0
  486. package/.next/standalone/.next/static/chunks/app/api/proposals/[uuid]/reject/route-f1b0daea9f947caf.js +1 -0
  487. package/.next/standalone/.next/static/chunks/app/api/proposals/[uuid]/revoke/route-f1b0daea9f947caf.js +1 -0
  488. package/.next/standalone/.next/static/chunks/app/api/proposals/[uuid]/route-f1b0daea9f947caf.js +1 -0
  489. package/.next/standalone/.next/static/chunks/app/api/search/route-f1b0daea9f947caf.js +1 -0
  490. package/.next/standalone/.next/static/chunks/app/api/sessions/[uuid]/route-f1b0daea9f947caf.js +1 -0
  491. package/.next/standalone/.next/static/chunks/app/api/tasks/[uuid]/claim/route-f1b0daea9f947caf.js +1 -0
  492. package/.next/standalone/.next/static/chunks/app/api/tasks/[uuid]/dependencies/[dependsOnUuid]/route-f1b0daea9f947caf.js +1 -0
  493. package/.next/standalone/.next/static/chunks/app/api/tasks/[uuid]/dependencies/route-f1b0daea9f947caf.js +1 -0
  494. package/.next/standalone/.next/static/chunks/app/api/tasks/[uuid]/release/route-f1b0daea9f947caf.js +1 -0
  495. package/.next/standalone/.next/static/chunks/app/api/tasks/[uuid]/route-f1b0daea9f947caf.js +1 -0
  496. package/.next/standalone/.next/static/chunks/app/api/tasks/[uuid]/sessions/route-f1b0daea9f947caf.js +1 -0
  497. package/.next/standalone/.next/static/chunks/app/layout-e3a49e06950a057f.js +1 -0
  498. package/.next/standalone/.next/static/chunks/app/login/callback/{page-0edd93f50cb4f6ea.js → page-6cad93f5c610b047.js} +1 -1
  499. package/.next/standalone/.next/static/chunks/app/login/page-d2513f477211dd6f.js +1 -0
  500. package/.next/standalone/.next/static/chunks/app/login/pick-workspace/{page-e0444ad8b50121f5.js → page-597e0f3377f18d29.js} +1 -1
  501. package/.next/standalone/.next/static/chunks/app/login/silent-refresh/{page-a9960ea858db6752.js → page-a26d1af61578c96e.js} +1 -1
  502. package/.next/standalone/.next/static/chunks/app/onboarding/page-2936274fb252329e.js +1 -0
  503. package/.next/standalone/.next/static/chunks/app/page-075afd218994d377.js +1 -0
  504. package/.next/standalone/.next/static/chunks/{webpack-039590181c63871d.js → webpack-ed3555ea61243391.js} +1 -1
  505. package/.next/standalone/.next/static/css/6e8fd46b062fd4fc.css +1 -0
  506. package/.next/standalone/package.json +1 -1
  507. package/.next/standalone/public/chorus-plugin/skills/proposal/SKILL.md +4 -0
  508. package/.next/standalone/public/skill/proposal-chorus/SKILL.md +4 -0
  509. package/README.md +49 -15
  510. package/README.zh.md +49 -15
  511. package/chorus.mjs +30 -14
  512. package/cli/client-args.mjs +18 -2
  513. package/cli/codex-session-map.mjs +117 -0
  514. package/cli/codex-spawner.mjs +312 -0
  515. package/cli/daemon-agent.mjs +32 -6
  516. package/cli/daemon-banner.mjs +54 -6
  517. package/cli/daemon-config.mjs +118 -0
  518. package/cli/daemon.mjs +348 -167
  519. package/cli/event-router.mjs +273 -12
  520. package/cli/login.mjs +77 -34
  521. package/cli/server-signal-handlers.mjs +41 -0
  522. package/cli/spawner-select.mjs +30 -0
  523. package/cli/sse-listener.mjs +56 -6
  524. package/cli/upload-hooks.mjs +73 -8
  525. package/cli/waker.mjs +36 -8
  526. package/package.json +1 -1
  527. package/prisma/migrations/20260622115159_add_daemon_connection_cwd/migration.sql +9 -0
  528. package/prisma/migrations/20260623020208_task_pinned_target_instance/migration.sql +3 -0
  529. package/prisma/migrations/20260624142248_add_agent_instance/migration.sql +31 -0
  530. package/prisma/migrations/20260624165025_drop_task_target_host_cwd/migration.sql +10 -0
  531. package/prisma/schema.prisma +69 -3
  532. package/.next/standalone/.next/server/chunks/1064.js +0 -1
  533. package/.next/standalone/.next/server/chunks/2213.js +0 -1
  534. package/.next/standalone/.next/server/chunks/3371.js +0 -1
  535. package/.next/standalone/.next/server/chunks/369.js +0 -1
  536. package/.next/standalone/.next/server/chunks/4958.js +0 -1
  537. package/.next/standalone/.next/server/chunks/5039.js +0 -1
  538. package/.next/standalone/.next/server/chunks/5631.js +0 -1
  539. package/.next/standalone/.next/server/chunks/6461.js +0 -1
  540. package/.next/standalone/.next/server/chunks/6712.js +0 -1
  541. package/.next/standalone/.next/server/chunks/7867.js +0 -1
  542. package/.next/standalone/.next/server/chunks/7897.js +0 -1
  543. package/.next/standalone/.next/server/chunks/8012.js +0 -1
  544. package/.next/standalone/.next/server/chunks/8245.js +0 -31
  545. package/.next/standalone/.next/server/chunks/9629.js +0 -1
  546. package/.next/standalone/.next/server/chunks/9725.js +0 -1
  547. package/.next/standalone/.next/static/GQvpOux3M9CaxkMjL9GAI/_buildManifest.js +0 -1
  548. package/.next/standalone/.next/static/chunks/1217-323cc20b73ebfde9.js +0 -1
  549. package/.next/standalone/.next/static/chunks/16984-8ab5580b8e63a200.js +0 -1
  550. package/.next/standalone/.next/static/chunks/1879-7a8b283283218df2.js +0 -1
  551. package/.next/standalone/.next/static/chunks/19276-50b367d7b93d5f34.js +0 -1
  552. package/.next/standalone/.next/static/chunks/23466-e1176a6d814f4897.js +0 -1
  553. package/.next/standalone/.next/static/chunks/38040-a8687f86dd8e9d67.js +0 -1
  554. package/.next/standalone/.next/static/chunks/4860.8bdb37c964f92e48.js +0 -1
  555. package/.next/standalone/.next/static/chunks/59296-783831c43aa0162e.js +0 -1
  556. package/.next/standalone/.next/static/chunks/60648-36ccbee4ce232d52.js +0 -1
  557. package/.next/standalone/.next/static/chunks/60694-68232120903209df.js +0 -1
  558. package/.next/standalone/.next/static/chunks/64648-ece4e2a59672cf63.js +0 -1
  559. package/.next/standalone/.next/static/chunks/66205-8d7eae6a0f0a032d.js +0 -1
  560. package/.next/standalone/.next/static/chunks/66969-12f0b22c51f5a410.js +0 -1
  561. package/.next/standalone/.next/static/chunks/70536-b8bf71098ae11f07.js +0 -1
  562. package/.next/standalone/.next/static/chunks/76803-7ac4024b2ae89843.js +0 -1
  563. package/.next/standalone/.next/static/chunks/78389-b32edc6bd5c570a9.js +0 -1
  564. package/.next/standalone/.next/static/chunks/78584-eb2fa8cf2f266329.js +0 -1
  565. package/.next/standalone/.next/static/chunks/78917-150ed14a99844aab.js +0 -1
  566. package/.next/standalone/.next/static/chunks/84541-1f4c2a40f7722667.js +0 -10
  567. package/.next/standalone/.next/static/chunks/8574-b9739eb8d054c793.js +0 -1
  568. package/.next/standalone/.next/static/chunks/99373.12370329b9ab6beb.js +0 -1
  569. package/.next/standalone/.next/static/chunks/app/(dashboard)/layout-0a28456fea4ce95a.js +0 -1
  570. package/.next/standalone/.next/static/chunks/app/(dashboard)/project-groups/[uuid]/page-a79969c5c9aadacd.js +0 -1
  571. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/dashboard/[ideaUuid]/page-4bc556c2fc8f3d24.js +0 -1
  572. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/dashboard/page-a28f0eaa6f4ac94a.js +0 -1
  573. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/documents/[documentUuid]/page-ef82b871895245ea.js +0 -1
  574. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/documents/page-2c9bcbd11ddb8661.js +0 -1
  575. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/proposals/[proposalUuid]/page-630b168598513ce8.js +0 -1
  576. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/proposals/new/page-99639479cc98965f.js +0 -1
  577. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/proposals/page-335f2450e44a0fba.js +0 -1
  578. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/tasks/[taskUuid]/page-4a191d69b2b6e880.js +0 -1
  579. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/tasks/page-0faebb478be4c85d.js +0 -1
  580. package/.next/standalone/.next/static/chunks/app/(dashboard)/settings/page-2e8fcb72687100df.js +0 -1
  581. package/.next/standalone/.next/static/chunks/app/api/admin/companies/[uuid]/route-4bc556c2fc8f3d24.js +0 -1
  582. package/.next/standalone/.next/static/chunks/app/api/admin/companies/route-4bc556c2fc8f3d24.js +0 -1
  583. package/.next/standalone/.next/static/chunks/app/api/admin/login/route-4bc556c2fc8f3d24.js +0 -1
  584. package/.next/standalone/.next/static/chunks/app/api/admin/session/route-4bc556c2fc8f3d24.js +0 -1
  585. package/.next/standalone/.next/static/chunks/app/api/agent-connections/route-4bc556c2fc8f3d24.js +0 -1
  586. package/.next/standalone/.next/static/chunks/app/api/agents/[uuid]/route-4bc556c2fc8f3d24.js +0 -1
  587. package/.next/standalone/.next/static/chunks/app/api/agents/[uuid]/sessions/route-4bc556c2fc8f3d24.js +0 -1
  588. package/.next/standalone/.next/static/chunks/app/api/agents/route-4bc556c2fc8f3d24.js +0 -1
  589. package/.next/standalone/.next/static/chunks/app/api/api-keys/[uuid]/route-4bc556c2fc8f3d24.js +0 -1
  590. package/.next/standalone/.next/static/chunks/app/api/api-keys/route-4bc556c2fc8f3d24.js +0 -1
  591. package/.next/standalone/.next/static/chunks/app/api/auth/callback/route-4bc556c2fc8f3d24.js +0 -1
  592. package/.next/standalone/.next/static/chunks/app/api/auth/check-default/route-4bc556c2fc8f3d24.js +0 -1
  593. package/.next/standalone/.next/static/chunks/app/api/auth/company-oidc/route-4bc556c2fc8f3d24.js +0 -1
  594. package/.next/standalone/.next/static/chunks/app/api/auth/default-login/route-4bc556c2fc8f3d24.js +0 -1
  595. package/.next/standalone/.next/static/chunks/app/api/auth/identify/route-4bc556c2fc8f3d24.js +0 -1
  596. package/.next/standalone/.next/static/chunks/app/api/auth/logout/route-4bc556c2fc8f3d24.js +0 -1
  597. package/.next/standalone/.next/static/chunks/app/api/auth/me/route-4bc556c2fc8f3d24.js +0 -1
  598. package/.next/standalone/.next/static/chunks/app/api/auth/refresh/route-4bc556c2fc8f3d24.js +0 -1
  599. package/.next/standalone/.next/static/chunks/app/api/auth/session/route-4bc556c2fc8f3d24.js +0 -1
  600. package/.next/standalone/.next/static/chunks/app/api/auth/sync-token/route-4bc556c2fc8f3d24.js +0 -1
  601. package/.next/standalone/.next/static/chunks/app/api/comments/route-4bc556c2fc8f3d24.js +0 -1
  602. package/.next/standalone/.next/static/chunks/app/api/daemon/control/route-4bc556c2fc8f3d24.js +0 -1
  603. package/.next/standalone/.next/static/chunks/app/api/daemon/execution-state/route-4bc556c2fc8f3d24.js +0 -1
  604. package/.next/standalone/.next/static/chunks/app/api/daemon/executions/route-4bc556c2fc8f3d24.js +0 -1
  605. package/.next/standalone/.next/static/chunks/app/api/daemon/pending-turns/route-4bc556c2fc8f3d24.js +0 -1
  606. package/.next/standalone/.next/static/chunks/app/api/daemon/report-interrupt/route-4bc556c2fc8f3d24.js +0 -1
  607. package/.next/standalone/.next/static/chunks/app/api/daemon/resume/route-4bc556c2fc8f3d24.js +0 -1
  608. package/.next/standalone/.next/static/chunks/app/api/daemon/transcript/route-4bc556c2fc8f3d24.js +0 -1
  609. package/.next/standalone/.next/static/chunks/app/api/daemon/turn-advance/route-4bc556c2fc8f3d24.js +0 -1
  610. package/.next/standalone/.next/static/chunks/app/api/daemon-sessions/[sessionUuid]/instruction/route-4bc556c2fc8f3d24.js +0 -1
  611. package/.next/standalone/.next/static/chunks/app/api/daemon-sessions/[sessionUuid]/route-4bc556c2fc8f3d24.js +0 -1
  612. package/.next/standalone/.next/static/chunks/app/api/daemon-sessions/ad-hoc/route-4bc556c2fc8f3d24.js +0 -1
  613. package/.next/standalone/.next/static/chunks/app/api/daemon-sessions/route-4bc556c2fc8f3d24.js +0 -1
  614. package/.next/standalone/.next/static/chunks/app/api/documents/[uuid]/route-4bc556c2fc8f3d24.js +0 -1
  615. package/.next/standalone/.next/static/chunks/app/api/entities/[type]/[uuid]/root-idea/route-4bc556c2fc8f3d24.js +0 -1
  616. package/.next/standalone/.next/static/chunks/app/api/events/notifications/route-4bc556c2fc8f3d24.js +0 -1
  617. package/.next/standalone/.next/static/chunks/app/api/events/route-4bc556c2fc8f3d24.js +0 -1
  618. package/.next/standalone/.next/static/chunks/app/api/health/route-4bc556c2fc8f3d24.js +0 -1
  619. package/.next/standalone/.next/static/chunks/app/api/ideas/[uuid]/claim/route-4bc556c2fc8f3d24.js +0 -1
  620. package/.next/standalone/.next/static/chunks/app/api/ideas/[uuid]/move/preview/route-4bc556c2fc8f3d24.js +0 -1
  621. package/.next/standalone/.next/static/chunks/app/api/ideas/[uuid]/move/route-4bc556c2fc8f3d24.js +0 -1
  622. package/.next/standalone/.next/static/chunks/app/api/ideas/[uuid]/parent/route-4bc556c2fc8f3d24.js +0 -1
  623. package/.next/standalone/.next/static/chunks/app/api/ideas/[uuid]/release/route-4bc556c2fc8f3d24.js +0 -1
  624. package/.next/standalone/.next/static/chunks/app/api/ideas/[uuid]/route-4bc556c2fc8f3d24.js +0 -1
  625. package/.next/standalone/.next/static/chunks/app/api/mcp/route-4bc556c2fc8f3d24.js +0 -1
  626. package/.next/standalone/.next/static/chunks/app/api/me/assignments/route-4bc556c2fc8f3d24.js +0 -1
  627. package/.next/standalone/.next/static/chunks/app/api/mentionables/route-4bc556c2fc8f3d24.js +0 -1
  628. package/.next/standalone/.next/static/chunks/app/api/notifications/[uuid]/archive/route-4bc556c2fc8f3d24.js +0 -1
  629. package/.next/standalone/.next/static/chunks/app/api/notifications/[uuid]/read/route-4bc556c2fc8f3d24.js +0 -1
  630. package/.next/standalone/.next/static/chunks/app/api/notifications/preferences/route-4bc556c2fc8f3d24.js +0 -1
  631. package/.next/standalone/.next/static/chunks/app/api/notifications/read-all/route-4bc556c2fc8f3d24.js +0 -1
  632. package/.next/standalone/.next/static/chunks/app/api/notifications/route-4bc556c2fc8f3d24.js +0 -1
  633. package/.next/standalone/.next/static/chunks/app/api/notifications/unread-count/route-4bc556c2fc8f3d24.js +0 -1
  634. package/.next/standalone/.next/static/chunks/app/api/project-groups/[uuid]/dashboard/route-4bc556c2fc8f3d24.js +0 -1
  635. package/.next/standalone/.next/static/chunks/app/api/project-groups/[uuid]/route-4bc556c2fc8f3d24.js +0 -1
  636. package/.next/standalone/.next/static/chunks/app/api/project-groups/route-4bc556c2fc8f3d24.js +0 -1
  637. package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/activity/route-4bc556c2fc8f3d24.js +0 -1
  638. package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/available/route-4bc556c2fc8f3d24.js +0 -1
  639. package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/documents/route-4bc556c2fc8f3d24.js +0 -1
  640. package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/group/route-4bc556c2fc8f3d24.js +0 -1
  641. package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/ideas/route-4bc556c2fc8f3d24.js +0 -1
  642. package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/ideas/tracker/route-4bc556c2fc8f3d24.js +0 -1
  643. package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/proposals/[proposalUuid]/validate/route-4bc556c2fc8f3d24.js +0 -1
  644. package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/proposals/route-4bc556c2fc8f3d24.js +0 -1
  645. package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/proposals/summary/route-4bc556c2fc8f3d24.js +0 -1
  646. package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/route-4bc556c2fc8f3d24.js +0 -1
  647. package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/stats/route-4bc556c2fc8f3d24.js +0 -1
  648. package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/tasks/dependencies/route-4bc556c2fc8f3d24.js +0 -1
  649. package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/tasks/route-4bc556c2fc8f3d24.js +0 -1
  650. package/.next/standalone/.next/static/chunks/app/api/projects/route-4bc556c2fc8f3d24.js +0 -1
  651. package/.next/standalone/.next/static/chunks/app/api/proposals/[uuid]/approve/route-4bc556c2fc8f3d24.js +0 -1
  652. package/.next/standalone/.next/static/chunks/app/api/proposals/[uuid]/close/route-4bc556c2fc8f3d24.js +0 -1
  653. package/.next/standalone/.next/static/chunks/app/api/proposals/[uuid]/reject/route-4bc556c2fc8f3d24.js +0 -1
  654. package/.next/standalone/.next/static/chunks/app/api/proposals/[uuid]/revoke/route-4bc556c2fc8f3d24.js +0 -1
  655. package/.next/standalone/.next/static/chunks/app/api/proposals/[uuid]/route-4bc556c2fc8f3d24.js +0 -1
  656. package/.next/standalone/.next/static/chunks/app/api/search/route-4bc556c2fc8f3d24.js +0 -1
  657. package/.next/standalone/.next/static/chunks/app/api/sessions/[uuid]/route-4bc556c2fc8f3d24.js +0 -1
  658. package/.next/standalone/.next/static/chunks/app/api/tasks/[uuid]/claim/route-4bc556c2fc8f3d24.js +0 -1
  659. package/.next/standalone/.next/static/chunks/app/api/tasks/[uuid]/dependencies/[dependsOnUuid]/route-4bc556c2fc8f3d24.js +0 -1
  660. package/.next/standalone/.next/static/chunks/app/api/tasks/[uuid]/dependencies/route-4bc556c2fc8f3d24.js +0 -1
  661. package/.next/standalone/.next/static/chunks/app/api/tasks/[uuid]/release/route-4bc556c2fc8f3d24.js +0 -1
  662. package/.next/standalone/.next/static/chunks/app/api/tasks/[uuid]/route-4bc556c2fc8f3d24.js +0 -1
  663. package/.next/standalone/.next/static/chunks/app/api/tasks/[uuid]/sessions/route-4bc556c2fc8f3d24.js +0 -1
  664. package/.next/standalone/.next/static/chunks/app/layout-9963339572e2e64e.js +0 -1
  665. package/.next/standalone/.next/static/chunks/app/login/page-c64b8d40a0781b4c.js +0 -1
  666. package/.next/standalone/.next/static/chunks/app/onboarding/page-e9a69a0c537c704f.js +0 -1
  667. package/.next/standalone/.next/static/chunks/app/page-8b4baa950c78ffe7.js +0 -1
  668. package/.next/standalone/.next/static/css/1d9aaac01758b297.css +0 -1
  669. /package/.next/standalone/.next/static/{GQvpOux3M9CaxkMjL9GAI → GmBblfxcDziUENBiEap4B}/_ssgManifest.js +0 -0
@@ -8,11 +8,19 @@
8
8
  // API key; data lines are `data: <json>\n\n`, heartbeats are `: ...` comments.
9
9
  //
10
10
  // Self-report: the listener appends ?clientType=claude_code&clientVersion=…&
11
- // host=…&startedAt=… to the endpoint so the server's DaemonConnection registry
12
- // (src/services/daemon-connection.service.ts → parseSelfReport) can record which
13
- // client is on the other end. The CLI reports clientType=claude_code (it only
14
- // drives a local Claude Code subprocess — not a generic "daemon"). These params
15
- // are display-only metadata; auth remains the unchanged Bearer header.
11
+ // host=…&cwd=…&startedAt=… to the endpoint so the server's DaemonConnection
12
+ // registry (src/services/daemon-connection.service.ts → parseSelfReport) can
13
+ // record which client is on the other end. The CLI reports clientType=claude_code
14
+ // (it only drives a local Claude Code subprocess — not a generic "daemon"). These
15
+ // params are display-only metadata; auth remains the unchanged Bearer header.
16
+ //
17
+ // `cwd` is the working directory this daemon connection serves. Today the CLI
18
+ // runs single-cwd (the directory it was launched from), so it reports
19
+ // `process.cwd()`. The server keys the connection registry on
20
+ // (agentUuid, clientType, host, cwd) — so the same agent on the same host driving
21
+ // two different working directories registers as two independent connections
22
+ // instead of overwriting each other. An *older* daemon that does not send `cwd`
23
+ // registers as a `cwd=null` row (HARD-1: no error, behaves exactly as before).
16
24
 
17
25
  import { readFileSync } from "node:fs";
18
26
  import { hostname } from "node:os";
@@ -61,8 +69,21 @@ const PROCESS_STARTED_AT = new Date();
61
69
  * wake: the control event is forked here BEFORE `onEvent`, so the router / WakeQueue
62
70
  * never sees it and it can never spawn a new Claude. The handler verifies the target
63
71
  * connection + entity and interrupts the running subprocess (see control-handler.mjs).
72
+ * @property {(event: Record<string, unknown>) => void} [onConflict] Called for a
73
+ * `type:"connection_conflict"` data event (add-daemon-connection-conflict-skip): the
74
+ * server refused to register THIS cwd because a live different-process daemon already
75
+ * holds the same (agent, host, cwd). Like `control`, it is forked BEFORE `onEvent` so
76
+ * it can NEVER reach the router / WakeQueue — a conflict is not a wake. The daemon's
77
+ * handler warns and permanently tears down this cwd's listener (it does not reconnect).
78
+ * The event carries `{ host, cwd }` of the conflicting identity.
64
79
  * @property {() => Promise<void>} [onReconnect] Called after a reconnect so the
65
80
  * caller can back-fill notifications missed during the gap.
81
+ * @property {string} [cwd] The working directory THIS connection serves (T3 — 单
82
+ * daemon 多路径). A multi-path daemon runs one SseListener per declared path, each
83
+ * self-reporting its own cwd so the server registers them as distinct connections
84
+ * (the registry key includes cwd). Omitted ⇒ the daemon's process cwd (single-path
85
+ * / HARD-1 default — identical to today). It is JUST the served path; it carries no
86
+ * project binding (DEC-5: cwd ⟂ project).
66
87
  * @property {{info(m:string):void,warn(m:string):void,error(m:string):void}} [logger]
67
88
  * @property {typeof fetch} [fetchImpl] Injectable for tests.
68
89
  * @property {number} [initialDelayMs]
@@ -77,6 +98,7 @@ export class SseListener {
77
98
  this.onEvent = opts.onEvent;
78
99
  this.onConnectionId = opts.onConnectionId ?? (() => {});
79
100
  this.onControl = opts.onControl ?? (() => {});
101
+ this.onConflict = opts.onConflict ?? (() => {});
80
102
  this.onReconnect = opts.onReconnect ?? (async () => {});
81
103
  /** @type {string|null} The connection this stream registered as (once reported). */
82
104
  this.connectionUuid = null;
@@ -87,10 +109,24 @@ export class SseListener {
87
109
 
88
110
  // Build the self-reporting endpoint URL once and reuse it across every
89
111
  // (re)connect, so the reconnect path always re-sends the same params.
112
+ // Working directory THIS connection serves. A multi-path daemon (T3) constructs
113
+ // one SseListener per declared path, each with its own `opts.cwd`, so the server's
114
+ // (agentUuid, clientType, host, cwd) registry key lands them as distinct rows —
115
+ // same agent + same host + different cwd no longer overwrite each other. When no
116
+ // cwd is supplied the daemon is single-path: report the process cwd (the directory
117
+ // it was launched from), identical to today / an old daemon (HARD-1).
118
+ this.cwd = opts.cwd ?? process.cwd();
119
+ // The daemon backend driving this connection (daemon-agent-selection): the
120
+ // server registers the row's `clientType` from this self-report, so a
121
+ // `--agent codex` daemon shows as `codex` instead of mislabelling itself
122
+ // `claude_code`. Defaults to claude_code (the default backend / an old
123
+ // single-backend daemon that never sets it).
124
+ this.clientType = opts.clientType ?? "claude_code";
90
125
  const params = new URLSearchParams({
91
- clientType: "claude_code",
126
+ clientType: this.clientType,
92
127
  clientVersion: CLI_VERSION,
93
128
  host: hostname(),
129
+ cwd: this.cwd,
94
130
  startedAt: PROCESS_STARTED_AT.toISOString(),
95
131
  });
96
132
  this.endpoint = `${this.url}/api/events/notifications?${params.toString()}`;
@@ -233,6 +269,20 @@ export class SseListener {
233
269
  }
234
270
  continue;
235
271
  }
272
+ // Connection conflict (add-daemon-connection-conflict-skip): the server refused
273
+ // to register THIS cwd because a live different-process daemon already holds the
274
+ // same (agent, host, cwd). Like `control`, fork it to onConflict and `continue`
275
+ // — it MUST NEVER fall through to onEvent (the router / WakeQueue), or a conflict
276
+ // would be mistaken for a wake and could spawn a subprocess. A conflict is not a
277
+ // wake; the daemon's handler warns and tears down this cwd's listener.
278
+ if (event && event.type === "connection_conflict") {
279
+ try {
280
+ this.onConflict(event);
281
+ } catch (err) {
282
+ this.logger.warn(`[Chorus] onConflict callback error: ${err}`);
283
+ }
284
+ continue;
285
+ }
236
286
  this.onEvent(event);
237
287
  }
238
288
  }
@@ -145,24 +145,84 @@ export function mergeUploadHooks(...args) {
145
145
  // top-level type — otherwise a tool-result-only user message would leak. The server
146
146
  // ingest stores ONLY `user`/`assistant` text (see /api/daemon/transcript), so this
147
147
  // filter mirrors exactly what the server will persist.
148
+ //
149
+ // Harness-injected synthetic content: when the model loads a skill, the skill's full
150
+ // markdown body is delivered as a SYNTHETIC user turn. On the live stream-json stdout
151
+ // (verified against Claude Code CLI 2.1.195 by capturing real `claude -p
152
+ // --output-format stream-json --verbose` output) that envelope is
153
+ // `{ type:"user", isSynthetic:true, message:{ content:[{type:"text", text:"Base
154
+ // directory for this skill: …"}] } }`. Because it's a plain `text` block, the
155
+ // block-level filter alone would KEEP it and leak the whole skill body to Chorus, so
156
+ // we drop `type:"user"` envelopes flagged `isSynthetic:true` outright. ⚠️ FIELD NAME:
157
+ // the live stream marks this `isSynthetic`; the on-disk transcript JSONL
158
+ // (~/.claude/projects/.../*.jsonl, which the daemon does NOT read) marks the SAME
159
+ // message `isMeta` — keying on `isMeta` here would be a silent no-op. Genuine human
160
+ // instructions and the agent's own replies never carry `isSynthetic`, so this is a
161
+ // purely structural match (no size/content heuristic) and cannot drop real content.
162
+ // MCP-server instructions, CLAUDE.md context, and the deferred-tool listing are folded
163
+ // into the dropped `type:"system"` init envelope and never reach this filter. Scope is
164
+ // the Claude Code dialect only — the codex (`item.completed`) path is unaffected.
148
165
 
149
166
  /** Top-level stream-json envelope types that carry a conversation message. */
150
167
  const CONVERSATION_TYPES = new Set(["user", "assistant"]);
151
168
 
152
169
  /**
153
- * Extract the plain user/assistant TEXT from one Claude Code stream-json object,
154
- * dropping everything that is not a conversation text block (system/result
155
- * envelopes, thinking, tool_use, tool_result). Returns null when the object is not a
156
- * keepable conversation message (so the caller can skip it). Never throws a shape
157
- * it doesn't recognize yields null rather than an error (defensive against CLI drift).
170
+ * Remove `<system-reminder>…</system-reminder>` spans from a retained text block
171
+ * (defense-in-depth for harness-injected reminders that ride inside a kept text
172
+ * block). Structural tag match not a size/content heuristic. Non-reminder text is
173
+ * left untouched; a message that is only a reminder collapses to empty and is then
174
+ * dropped by the caller's emptiness check.
175
+ * @param {string} s
176
+ * @returns {string}
177
+ */
178
+ function stripSystemReminders(s) {
179
+ return s.replace(/<system-reminder>[\s\S]*?<\/system-reminder>/g, "");
180
+ }
181
+
182
+ /**
183
+ * Extract the plain user/assistant TEXT from one stream object emitted by EITHER
184
+ * backend's headless stream, dropping everything that is not a conversation text
185
+ * block. Returns null when the object is not a keepable conversation message (so
186
+ * the caller can skip it). Never throws — a shape it doesn't recognize yields null
187
+ * rather than an error (defensive against CLI drift).
188
+ *
189
+ * Two stream dialects are recognized (their top-level shapes are disjoint, so no
190
+ * backend flag is needed):
191
+ * - Claude Code stream-json: `{ type: "user"|"assistant", message: { content … } }`.
192
+ * - codex `codex exec --json`: conversation/tool output rides on `item.completed`
193
+ * events discriminated by `item.type`; assistant text is an `agent_message`
194
+ * item with a top-level `item.text` (verified against codex-cli 0.142.3). codex
195
+ * does NOT echo the user prompt (the chat UI renders that from the turn's
196
+ * promptText), and `reasoning` / `command_execution` / lifecycle envelopes are
197
+ * not conversation text — all dropped.
158
198
  *
159
- * @param {any} obj One parsed stream-json NDJSON object.
199
+ * @param {any} obj One parsed stream NDJSON object.
160
200
  * @returns {{ role: "user"|"assistant", text: string } | null}
161
201
  */
162
202
  export function extractTranscriptText(obj) {
163
203
  if (!obj || typeof obj !== "object") return null;
204
+
205
+ // ── codex `codex exec --json` dialect ──
206
+ // Only `item.completed` carries finished output; an `agent_message` item is the
207
+ // assistant's conversation text. Everything else (reasoning, command_execution,
208
+ // file_change, thread.started/turn.* lifecycle) is not user/assistant text.
209
+ if (obj.type === "item.completed") {
210
+ const item = obj.item;
211
+ if (!item || typeof item !== "object" || item.type !== "agent_message") return null;
212
+ const itemText = typeof item.text === "string" ? item.text : "";
213
+ if (!itemText.trim()) return null;
214
+ return { role: "assistant", text: itemText };
215
+ }
216
+
217
+ // ── Claude Code stream-json dialect ──
164
218
  if (!CONVERSATION_TYPES.has(obj.type)) return null;
165
219
 
220
+ // Drop harness-injected synthetic content (e.g. a loaded skill body). Claude Code
221
+ // marks these user turns `isSynthetic:true` on the live stream (NOT the on-disk
222
+ // `isMeta` field). Gated on `type:"user"` so a synthetic *assistant* envelope, if one
223
+ // ever appears, is still treated as real assistant text. Structural match only.
224
+ if (obj.type === "user" && obj.isSynthetic === true) return null;
225
+
166
226
  const message = obj.message;
167
227
  if (!message || typeof message !== "object") return null;
168
228
  // The persisted role is the message's role; fall back to the envelope type (they
@@ -190,8 +250,13 @@ export function extractTranscriptText(obj) {
190
250
  return null;
191
251
  }
192
252
 
193
- // A message with no text (e.g. a user message that was purely a tool_result, or an
194
- // assistant message that was purely tool_use/thinking) is dropped — nothing to store.
253
+ // Strip any wrapped <system-reminder> spans (defense-in-depth) before deciding
254
+ // emptiness, so a reminder-only message collapses to nothing and is dropped.
255
+ text = stripSystemReminders(text);
256
+
257
+ // A message with no text (e.g. a user message that was purely a tool_result, an
258
+ // assistant message that was purely tool_use/thinking, or text that was only a
259
+ // system-reminder) is dropped — nothing to store.
195
260
  if (!text.trim()) return null;
196
261
  return { role, text };
197
262
  }
package/cli/waker.mjs CHANGED
@@ -28,7 +28,7 @@ export class Waker {
28
28
  * creds: { url: string, apiKey: string },
29
29
  * lineage: { resolve: (event: any) => Promise<{ rootIdeaUuid: string|null, directIdeaUuid: string|null }> },
30
30
  * spawner: { wake: (params: any) => Promise<{ sessionId: string, exitCode: number|null, isNew: boolean }> },
31
- * cwd?: string, Spawn working directory; used BOTH for the transcript probe and the spawn (default process.cwd()).
31
+ * 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).
32
32
  * hooks?: import("./upload-hooks.mjs").UploadHooks,
33
33
  * logger?: { info(m:string):void, warn(m:string):void, error(m:string):void },
34
34
  * writeMcpConfigFn?: typeof writeMcpConfig,
@@ -54,10 +54,14 @@ export class Waker {
54
54
  // line per lifecycle event (arrival / spawn new-vs-resume / completion).
55
55
  // When true, additional detail is emitted alongside those lines.
56
56
  this.verbose = opts.verbose ?? false;
57
- // The daemon spawns in one fixed working directory; the transcript probe must
58
- // use the SAME cwd as the spawn, or it would decide new-vs-resume against the
59
- // wrong directory (claude scopes --resume to cwd).
60
- this.cwd = opts.cwd ?? process.cwd();
57
+ // The connection/session-bound working directory this Waker serves (T3
58
+ // daemon 多路径引擎). A daemon process may run SEVERAL Wakers, one per declared
59
+ // path, each pinned to its own cwd; the daemon process's OWN cwd never changes
60
+ // (NFR-3). `opts.cwd` is that bound path; `undefined` (unspecified / old daemon /
61
+ // single-path default) degrades to the process cwd via resolveCwd(). Stored raw
62
+ // so resolveCwd() is the SINGLE place the process-default fallback is applied
63
+ // (Module Contract 1 — one cwd source of truth, no scattered process.cwd()).
64
+ this.cwd = opts.cwd;
61
65
  this.hooks = opts.hooks;
62
66
  this.logger = opts.logger ?? NOOP_LOGGER;
63
67
  this.writeMcpConfigFn = opts.writeMcpConfigFn ?? writeMcpConfig;
@@ -105,6 +109,25 @@ export class Waker {
105
109
  this.executions = new Map();
106
110
  }
107
111
 
112
+ /**
113
+ * The SINGLE source of truth for this Waker's working directory (Module Contract
114
+ * 1 — 不变式安全 / cwd 事实源统一). transcript probing (new-vs-resume), spawn, and
115
+ * resume ALL resolve cwd through here, so they can never diverge — a divergence
116
+ * would make the on-disk transcript probe decide new-vs-resume against a different
117
+ * directory than the one we spawn in (`claude --resume` is cwd-bound).
118
+ *
119
+ * Returns the connection/session-bound cwd when one was declared, else the daemon
120
+ * process's own cwd. The process-default fallback lives ONLY here: `this.cwd` is
121
+ * stored raw (possibly `undefined`) and `process.cwd()` is read at exactly this one
122
+ * site — Module Contract 2's HARD-1 degrade path (an old daemon / unspecified cwd
123
+ * behaves exactly as today, spawning at the process default). No other code in the
124
+ * wake path reads `process.cwd()`.
125
+ * @returns {string}
126
+ */
127
+ resolveCwd() {
128
+ return this.cwd ?? process.cwd();
129
+ }
130
+
108
131
  /**
109
132
  * Mark a running entity as INTERRUPTING (子3) — called by the control handler the
110
133
  * moment an authorized interrupt is verified, BEFORE the killer signals the child.
@@ -295,7 +318,12 @@ export class Waker {
295
318
  // spawn in. The spawner re-validates the id is a lowercase UUID before
296
319
  // spawning, so a garbage id surfaces visibly rather than misanchoring.
297
320
  const sessionId = directIdeaUuid ?? notification.entityUuid ?? null;
298
- const isNew = sessionId ? this.isNewSessionFn(sessionId, this.cwd) : true;
321
+ // Resolve the connection/session-bound cwd ONCE for this wake (Module Contract
322
+ // 1). The transcript probe and the spawn below BOTH use this same value, so a
323
+ // session's repeated wakes/probes always land the same cwd (NFR-3) — and a
324
+ // multi-path daemon's other Wakers (other cwds) never bleed in.
325
+ const cwd = this.resolveCwd();
326
+ const isNew = sessionId ? this.isNewSessionFn(sessionId, cwd) : true;
299
327
 
300
328
  // Lifecycle line 2 — spawn: new vs resume, plus the (otherwise hidden)
301
329
  // `claude --resume <id>` takeover hint so an operator can attach to the
@@ -305,7 +333,7 @@ export class Waker {
305
333
  (sessionId ? ` — take over with: claude --resume ${sessionId}` : "")
306
334
  );
307
335
  if (this.verbose) {
308
- this.logger.info(`[Chorus] cwd=${this.cwd} action=${notification.action} root=${rootIdeaUuid ?? "(none)"}`);
336
+ this.logger.info(`[Chorus] cwd=${cwd} action=${notification.action} root=${rootIdeaUuid ?? "(none)"}`);
309
337
  }
310
338
 
311
339
  cfg = this.writeMcpConfigFn(this.creds);
@@ -331,7 +359,7 @@ export class Waker {
331
359
  prompt,
332
360
  sessionId,
333
361
  isNew,
334
- cwd: this.cwd,
362
+ cwd,
335
363
  mcpConfigPath: cfg.path,
336
364
  // Capture the live child into the running execution entry the instant it
337
365
  // spawns (子3) so the control handler can interrupt it mid-wake. Guarded so
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chorus-aidlc/chorus",
3
- "version": "0.11.1",
3
+ "version": "0.12.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": {
@@ -0,0 +1,9 @@
1
+ -- DropIndex
2
+ DROP INDEX "DaemonConnection_agentUuid_clientType_host_key";
3
+
4
+ -- AlterTable
5
+ ALTER TABLE "DaemonConnection" ADD COLUMN "cwd" TEXT;
6
+
7
+ -- CreateIndex
8
+ CREATE UNIQUE INDEX "DaemonConnection_agentUuid_clientType_host_cwd_key" ON "DaemonConnection"("agentUuid", "clientType", "host", "cwd");
9
+
@@ -0,0 +1,3 @@
1
+ -- AlterTable
2
+ ALTER TABLE "Task" ADD COLUMN "targetCwd" TEXT,
3
+ ADD COLUMN "targetHost" TEXT;
@@ -0,0 +1,31 @@
1
+ -- AlterTable
2
+ ALTER TABLE "DaemonConnection" ADD COLUMN "agentInstanceUuid" TEXT;
3
+
4
+ -- CreateTable
5
+ CREATE TABLE "AgentInstance" (
6
+ "id" SERIAL NOT NULL,
7
+ "uuid" TEXT NOT NULL,
8
+ "companyUuid" TEXT NOT NULL,
9
+ "agentUuid" TEXT NOT NULL,
10
+ "host" TEXT NOT NULL DEFAULT '',
11
+ "cwd" TEXT,
12
+ "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
13
+ "updatedAt" TIMESTAMP(3) NOT NULL,
14
+
15
+ CONSTRAINT "AgentInstance_pkey" PRIMARY KEY ("id")
16
+ );
17
+
18
+ -- CreateIndex
19
+ CREATE UNIQUE INDEX "AgentInstance_uuid_key" ON "AgentInstance"("uuid");
20
+
21
+ -- CreateIndex
22
+ CREATE INDEX "AgentInstance_companyUuid_idx" ON "AgentInstance"("companyUuid");
23
+
24
+ -- CreateIndex
25
+ CREATE INDEX "AgentInstance_agentUuid_idx" ON "AgentInstance"("agentUuid");
26
+
27
+ -- CreateIndex
28
+ CREATE UNIQUE INDEX "AgentInstance_companyUuid_agentUuid_host_cwd_key" ON "AgentInstance"("companyUuid", "agentUuid", "host", "cwd");
29
+
30
+ -- CreateIndex
31
+ CREATE INDEX "DaemonConnection_agentInstanceUuid_idx" ON "DaemonConnection"("agentInstanceUuid");
@@ -0,0 +1,10 @@
1
+ /*
2
+ Warnings:
3
+
4
+ - You are about to drop the column `targetCwd` on the `Task` table. All the data in the column will be lost.
5
+ - You are about to drop the column `targetHost` on the `Task` table. All the data in the column will be lost.
6
+
7
+ */
8
+ -- AlterTable
9
+ ALTER TABLE "Task" DROP COLUMN "targetCwd",
10
+ DROP COLUMN "targetHost";
@@ -36,6 +36,7 @@ model Company {
36
36
  comments Comment[]
37
37
  sessions AgentSession[]
38
38
  daemonConnections DaemonConnection[]
39
+ agentInstances AgentInstance[]
39
40
  }
40
41
 
41
42
  // User (human, OIDC login)
@@ -78,11 +79,43 @@ model Agent {
78
79
  daemonConnections DaemonConnection[]
79
80
  daemonExecutions DaemonExecution[]
80
81
  daemonSessions DaemonSession[]
82
+ agentInstances AgentInstance[]
81
83
 
82
84
  @@index([companyUuid])
83
85
  @@index([ownerUuid])
84
86
  }
85
87
 
88
+ // AgentInstance — a durable, addressable (agent, host, cwd) actor. Created by
89
+ // upsert when a daemon first reports a (host, cwd); it holds ONLY identity, never
90
+ // liveness. The stable pointer that assignment (assigneeType="agent_instance") and
91
+ // mention markup resolve to: DaemonConnection.uuid churns on every reconnect, but
92
+ // the (agent, host, cwd) triple is stable, so this row's uuid is the durable handle.
93
+ // Liveness for an instance is read through its linked DaemonConnection
94
+ // (effectiveStatus / STALE_THRESHOLD_MS), never stored here — that is a connection
95
+ // property (see add-agent-instance-addressing design §"Data model"). host defaults
96
+ // to "" (unknown host) and cwd is nullable (unknown path), mirroring the
97
+ // DaemonConnection sentinels so a connection's identity maps 1:1 to an instance key.
98
+ model AgentInstance {
99
+ id Int @id @default(autoincrement())
100
+ uuid String @unique @default(uuid())
101
+ companyUuid String
102
+ company Company @relation(fields: [companyUuid], references: [uuid])
103
+ agentUuid String
104
+ agent Agent @relation(fields: [agentUuid], references: [uuid], onDelete: Cascade)
105
+ host String @default("") // "" = unknown-host (matches DaemonConnection.host sentinel)
106
+ cwd String? // null = unknown-path (matches DaemonConnection.cwd sentinel)
107
+ createdAt DateTime @default(now())
108
+ updatedAt DateTime @updatedAt
109
+
110
+ // Connections that have served this instance (current + historical). Liveness is
111
+ // derived from these, never duplicated onto the instance row.
112
+ connections DaemonConnection[]
113
+
114
+ @@unique([companyUuid, agentUuid, host, cwd])
115
+ @@index([companyUuid])
116
+ @@index([agentUuid])
117
+ }
118
+
86
119
  // API Key (independently managed, supports rotation and revocation)
87
120
  model ApiKey {
88
121
  id Int @id @default(autoincrement())
@@ -210,8 +243,15 @@ model Task {
210
243
  priority String @default("medium") // low | medium | high
211
244
  storyPoints Float? // Effort estimate (unit: Agent hours)
212
245
  acceptanceCriteria String? // Acceptance criteria (Markdown)
213
- assigneeType String? // user | agent
214
- assigneeUuid String? // User or Agent UUID (polymorphic)
246
+ // Polymorphic assignee: user | agent | agent_instance. A pinned assignment is
247
+ // assigneeType="agent_instance" with assigneeUuid = AgentInstance.uuid (the
248
+ // durable (agent, host, cwd) actor); an un-pinned agent assignment is
249
+ // assigneeType="agent". The legacy targetHost/targetCwd pin columns were removed
250
+ // by add-agent-instance-addressing — the wake's pinned place now comes from the
251
+ // task's own agent_instance assignment (override) or, for the same agent, the
252
+ // root idea's instance (notification-turn.ts resolvePinnedTarget).
253
+ assigneeType String? // user | agent | agent_instance
254
+ assigneeUuid String? // User / Agent / AgentInstance UUID (polymorphic)
215
255
  assignedAt DateTime? // Assignment timestamp
216
256
  assignedByUuid String? // User UUID (human assignment)
217
257
  proposalUuid String? // Source Proposal UUID (traceable, optional)
@@ -408,8 +448,33 @@ model DaemonConnection {
408
448
  // null as distinct (Prisma docs), which would let reconnects accumulate rows.
409
449
  // Defaulting to "" makes (agentUuid, clientType, host) a deterministic upsert key.
410
450
  host String @default("")
451
+ // Self-reported working directory this connection serves (display + identity).
452
+ // Nullable per the ratified migration decision (DEC/Q6=a): rows that exist at
453
+ // migration time get cwd=NULL as a sentinel and are backfilled on the next
454
+ // handshake — no forced backfill script. NOTE: unlike `host` (which defaults
455
+ // to "" to stay a deterministic dedup key), `cwd` is left nullable here.
456
+ // Postgres treats NULL as distinct in a UNIQUE index, so two
457
+ // (agentUuid, clientType, host, NULL) rows do NOT dedup; that is accepted for
458
+ // the migration era (old daemons are single-cwd, so independent null rows
459
+ // match the HARD-1 "behave exactly as today" requirement). Verified
460
+ // empirically (psql) + against Prisma docs. The real cwd self-report, the
461
+ // cwd-aware dedup, and the "reuse the migrated null row on reconnect"
462
+ // compatibility path all live in T2 — not this task. Because Prisma types a
463
+ // nullable column as non-null inside the compound-unique `where` input (NULL
464
+ // cannot be targeted there), T1's still-untouched registerConnection() upsert
465
+ // pins cwd to the "" sentinel to preserve today's deterministic dedup; T2
466
+ // reconciles the ""-vs-NULL sentinel when it wires real cwd self-report.
467
+ cwd String?
411
468
  startedAt DateTime? // self-reported daemon process start time
412
469
 
470
+ // The durable AgentInstance this connection currently serves (same
471
+ // (agentUuid, host, cwd) identity). Nullable: rows existing at migration time
472
+ // have no instance yet and get linked on the next handshake (the "rebuild on
473
+ // reconnect" path — no backfill). SetNull (app-level, relationMode=prisma) so
474
+ // deleting an instance never deletes its connection history.
475
+ agentInstanceUuid String?
476
+ agentInstance AgentInstance? @relation(fields: [agentInstanceUuid], references: [uuid], onDelete: SetNull)
477
+
413
478
  status String @default("online") // online | offline
414
479
  connectedAt DateTime @default(now())
415
480
  lastSeenAt DateTime @default(now())
@@ -418,11 +483,12 @@ model DaemonConnection {
418
483
  createdAt DateTime @default(now())
419
484
  updatedAt DateTime @updatedAt
420
485
 
421
- @@unique([agentUuid, clientType, host])
486
+ @@unique([agentUuid, clientType, host, cwd])
422
487
  @@index([companyUuid])
423
488
  @@index([agentUuid])
424
489
  @@index([status])
425
490
  @@index([lastSeenAt])
491
+ @@index([agentInstanceUuid])
426
492
  }
427
493
 
428
494
  // Daemon execution state — one row per (connection, resource) the daemon is
@@ -1 +0,0 @@
1
- "use strict";exports.id=1064,exports.ids=[1064],exports.modules={2623:(a,b,c)=>{c.d(b,{h:()=>w});var d=c(10837),e=c(21968),f=c(9222),g=c(1007),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)("00423656837d53af20d1cd96b1368bad35b5a06679",s.callServer,void 0,s.findSourceMapURL,"getProjectsAndGroupsAction");s.callServer,s.findSourceMapURL;let u=(0,s.createServerReference)("605aee24f55397387550bcc6d5f577568c83fff746",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.useRouter)(),[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-[#2C2C2C]",children:x("moveDialog.targetProjectLabel")}),C?(0,d.jsx)("div",{className:"flex items-center justify-center h-10 border border-[#E5E0D8] rounded-md",children:(0,d.jsx)(i.A,{className:"h-4 w-4 animate-spin text-[#9A9A9A]"})}):(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-[#E5E0D8] font-normal",!I&&"text-[#9A9A9A]"),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-[#E5E0D8] bg-[#FAF8F4] p-3 text-[13px] text-[#2C2C2C]",children:L?(0,d.jsxs)("div",{className:"flex items-center gap-2 text-[#6B6B6B]",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-[#9A9A9A]",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-[#E5E0D8]",onClick:()=>b(!1),disabled:P,children:y("cancel")}),(0,d.jsx)(m.$,{className:"bg-[#C67A52] 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")})]})]})})}},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"}]])},10901:(a,b,c)=>{c.d(b,{E:()=>f});var d=c(10837),e=c(96307);function f({className:a,...b}){return(0,d.jsx)("div",{"data-slot":"skeleton",className:(0,e.cn)("bg-accent animate-pulse rounded-md",a),...b})}},14856:(a,b,c)=>{c.d(b,{Z:()=>e});var d=c(42377);let e=(0,d.createServerReference)("6047e5f9e0b0b8ab34e4ec087a5b7c646953446365",d.callServer,void 0,d.findSourceMapURL,"deleteIdeaAction")},21605:(a,b,c)=>{c.d(b,{x:()=>e});var d=c(42377);let e=(0,d.createServerReference)("400cda1396142e823c70236309129832b2bb93f1dd",d.callServer,void 0,d.findSourceMapURL,"getIdeaActivitiesAction")},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,"40ce810a8ca47feb397612ce1c7ecbe14d1af7c174",null),(0,e.A)(n,"70f53da122c27dd0a56d3ad8b1b2e4a6e9c956822c",null),(0,e.A)(o,"4068d7c2e443443c634efddd8eba7ba864eb9a1436",null),(0,e.A)(p,"605495c490084c9c830a5fe1db3cca4e56e5277160",null),d()}catch(a){d(a)}})},23157:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{Ax:()=>o,M$:()=>p,UD:()=>r,ZL:()=>q,qN:()=>n});var e=c(2613);c(50785);var f=c(5562),g=c(9259),h=c(61212),i=c(28774),j=c(67738),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.MY)(b.companyUuid,a);if(!c)return{success:!1,error:"Idea not found"};if("elaborated"===c.status)return{success:!1,error:"Idea is not available for assignment"};return await (0,h.Xo)({ideaUuid:a,companyUuid:b.companyUuid,assigneeType:b.type,assigneeUuid:b.actorUuid,assignedByUuid:b.actorUuid}),await (0,j.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 k.default.error({err:a},"Failed to claim idea"),{success:!1,error:"Failed to claim idea"}}}async function o(a,b){let c=await (0,g.d)();if(!c||"user"!==c.type)return{success:!1,error:"Unauthorized"};try{let d=await (0,h.MY)(c.companyUuid,a);if(!d)return{success:!1,error:"Idea not found"};if("elaborated"===d.status)return{success:!1,error:"Idea is not available for assignment"};return await (0,h.Xo)({ideaUuid:a,companyUuid:c.companyUuid,assigneeType:"agent",assigneeUuid:b,assignedByUuid:c.actorUuid}),await (0,j.createActivity)({companyUuid:c.companyUuid,projectUuid:d.projectUuid,targetType:"idea",targetUuid:a,actorType:"user",actorUuid:c.actorUuid,action:"assigned",value:{assigneeType:"agent",assigneeUuid:b}}),(0,f.revalidatePath)(`/projects/${d.projectUuid}/ideas/${a}`),(0,f.revalidatePath)(`/projects/${d.projectUuid}/ideas`),{success:!0}}catch(a){return k.default.error({err:a},"Failed to claim idea to agent"),{success:!1,error:"Failed to claim idea"}}}async function p(a,b){let c=await (0,g.d)();if(!c||"user"!==c.type)return{success:!1,error:"Unauthorized"};try{let d=await (0,h.MY)(c.companyUuid,a);if(!d)return{success:!1,error:"Idea not found"};if("elaborated"===d.status)return{success:!1,error:"Idea is not available for assignment"};return await (0,h.Xo)({ideaUuid:a,companyUuid:c.companyUuid,assigneeType:"user",assigneeUuid:b,assignedByUuid:c.actorUuid}),(0,f.revalidatePath)(`/projects/${d.projectUuid}/ideas/${a}`),(0,f.revalidatePath)(`/projects/${d.projectUuid}/ideas`),{success:!0}}catch(a){return k.default.error({err:a},"Failed to claim idea to user"),{success:!1,error:"Failed to claim idea"}}}async function q(a){let b=await (0,g.d)();if(!b)return{success:!1,error:"Unauthorized"};try{let c=await (0,h.MY)(b.companyUuid,a);if(!c)return{success:!1,error:"Idea not found"};if("elaborated"===c.status)return{success:!1,error:"Idea cannot be released from current status"};return await (0,h.h_)(c.uuid),(0,f.revalidatePath)(`/projects/${c.projectUuid}/ideas/${a}`),(0,f.revalidatePath)(`/projects/${c.projectUuid}/ideas`),{success:!0}}catch(a){return k.default.error({err:a},"Failed to release idea"),{success:!1,error:"Failed to release idea"}}}async function r(){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 k.default.error({err:a},"Failed to get assignable agents"),{agents:[],users:[]}}}[g,h,i,j]=m.then?(await m)():m,(0,l.D)([n,o,p,q,r]),(0,e.A)(n,"403c9443216a4f1eef9d6101ed01aff7b9140167fd",null),(0,e.A)(o,"6026a06f628dca22015d61b394daf2d85b8b5b923c",null),(0,e.A)(p,"60dab0269ee9248c8f083ea74c0edeb86627c626e5",null),(0,e.A)(q,"408a78aa45415e5b54f4a7437be793a4a713a88c33",null),(0,e.A)(r,"00e25dcfd0973eb848c09d7467227c3a499831fc31",null),d()}catch(a){d(a)}})},23733:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{A7:()=>j,Rm:()=>i,Y_:()=>k,t8:()=>l});var e=c(71255),f=c(62729),g=c(85806),h=a([e,g]);async function i({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 n=(await e.z.elaborationQuestion.findMany({where:{roundUuid:j}})).filter(a=>a.required).every(a=>null!==a.answeredAt),o=await e.z.idea.findFirst({where:{uuid:b,companyUuid:a}});n&&(await e.z.elaborationRound.update({where:{uuid:j},data:{status:"answered"}}),o?.elaborationStatus!=="resolved"&&await e.z.idea.update({where:{uuid:b},data:{elaborationStatus:"validating"}})),await g.f0.createActivity({companyUuid:a,projectUuid:o.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:o.projectUuid,entityType:"idea",entityUuid:b,action:"updated"});let p=await e.z.elaborationRound.findUnique({where:{uuid:j},include:{questions:!0}});return m(p)}async function j({companyUuid:a,ideaUuid:b,actorUuid:c,actorType:d}){let h=await e.z.idea.findFirst({where:{uuid:b,companyUuid:a}});if(!h)throw Error("Idea not found");let i=await e.z.elaborationRound.findMany({where:{ideaUuid:b,companyUuid:a}});if(0===i.length)throw Error("Cannot resolve: the Idea has no elaboration rounds");let j=i.filter(a=>"pending_answers"===a.status);if(j.length>0)throw Error(`Cannot resolve: ${j.length} round(s) still have unanswered questions`);return await e.z.idea.update({where:{uuid:b},data:{status:"elaborated",elaborationStatus:"resolved"}}),await g.f0.createActivity({companyUuid:a,projectUuid:h.projectUuid,targetType:"idea",targetUuid:b,actorType:d,actorUuid:c,action:"elaboration_verified",value:{totalRounds:i.length}}),f.B.emitChange({companyUuid:a,projectUuid:h.projectUuid,entityType:"idea",entityUuid:b,action:"updated"}),l({companyUuid:a,ideaUuid:b})}async function k({companyUuid:a,ideaUuid:b,actorUuid:c,actorType:d,reason:h}){let i=await e.z.idea.findFirst({where:{uuid:b,companyUuid:a}});if(!i)throw Error("Idea not found");if(i.assigneeUuid!==c)throw Error("Only the assigned agent can skip elaboration");if("elaborating"!==i.status)throw Error(`Cannot skip elaboration from status '${i.status}'`);await e.z.idea.update({where:{uuid:b},data:{status:"elaborated",elaborationDepth:"minimal",elaborationStatus:"resolved"}}),await g.f0.createActivity({companyUuid:a,projectUuid:i.projectUuid,targetType:"idea",targetUuid:b,actorType:d,actorUuid:c,action:"elaboration_skipped",value:{reason:h}}),f.B.emitChange({companyUuid:a,projectUuid:i.projectUuid,entityType:"idea",entityUuid:b,action:"updated"})}async function l({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(m),summary:{totalQuestions:f.length,answeredQuestions:g.length,validatedRounds:h.length,pendingRound:i?.roundNumber||null}}}function m(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(n)}}function n(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}}[e,g]=h.then?(await h)():h,d()}catch(a){d(a)}})},24364:(a,b,c)=>{c.d(b,{A:()=>d});let d=(0,c(56556).A)("arrow-right-left",[["path",{d:"m16 3 4 4-4 4",key:"1x1c3m"}],["path",{d:"M20 7H4",key:"zbl0bi"}],["path",{d:"m8 21-4-4 4-4",key:"h9nckh"}],["path",{d:"M4 17h16",key:"g4d7ey"}]])},26402:(a,b,c)=>{c.d(b,{o:()=>d});function d({ideaStatus:a,elaborationStatus:b,elaboration:c}){return!("elaborating"!==a||"resolved"===b||!c||0===c.rounds.length||c.rounds.some(a=>"pending_answers"===a.status))}},30016:(a,b,c)=>{c.d(b,{i:()=>u});var d=c(10837),e=c(21968),f=c(1007),g=c(9222),h=c(10694),i=c(86460),j=c(16235),k=c(97443),l=c(42424),m=c(2852),n=c(11225),o=c(55732),p=c(42377);p.callServer,p.findSourceMapURL;let q=(0,p.createServerReference)("403c9443216a4f1eef9d6101ed01aff7b9140167fd",p.callServer,void 0,p.findSourceMapURL,"claimIdeaAction"),r=(0,p.createServerReference)("6026a06f628dca22015d61b394daf2d85b8b5b923c",p.callServer,void 0,p.findSourceMapURL,"claimIdeaToAgentAction"),s=(0,p.createServerReference)("60dab0269ee9248c8f083ea74c0edeb86627c626e5",p.callServer,void 0,p.findSourceMapURL,"claimIdeaToUserAction"),t=(0,p.createServerReference)("408a78aa45415e5b54f4a7437be793a4a713a88c33",p.callServer,void 0,p.findSourceMapURL,"releaseIdeaAction");function u({idea:a,projectUuid:b,currentUserUuid:c,onClose:p}){let u=(0,g.c)(),v=(0,f.useRouter)(),[w,x]=(0,e.useState)(!1),[y,z]=(0,e.useState)("self"),[A,B]=(0,e.useState)(""),[C,D]=(0,e.useState)(""),[E,F]=(0,e.useState)([]),[G,H]=(0,e.useState)([]),[I,J]=(0,e.useState)(!0),K=!!a.assignee,L=async()=>{let b;if(x(!0),"self"===y)b=await q(a.uuid);else if("agent"===y&&A)b=await r(a.uuid,A);else if("user"===y&&C)b=await s(a.uuid,C);else{if("release"!==y)return void x(!1);b=await t(a.uuid)}x(!1),b?.success&&(v.refresh(),p())},M="self"===y||"agent"===y&&A||"user"===y&&C||"release"===y&&K;return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("div",{className:"fixed inset-0 z-50 bg-black/40",onClick:p}),(0,d.jsxs)("div",{className:"fixed left-1/2 top-1/2 z-50 w-[400px] -translate-x-1/2 -translate-y-1/2 rounded-2xl bg-white shadow-xl border border-[#E5E0D8]",children:[(0,d.jsxs)("div",{className:"flex items-center justify-between border-b border-[#E5E0D8] px-6 py-5",children:[(0,d.jsx)("h2",{className:"text-base font-semibold text-[#2C2C2C]",children:u("ideas.assignIdea")}),(0,d.jsx)("button",{onClick:p,className:"text-[#9A9A9A] hover:text-[#6B6B6B] transition-colors",children:(0,d.jsx)(h.A,{className:"h-5 w-5"})})]}),(0,d.jsxs)("div",{className:"p-6 space-y-4",children:[(0,d.jsxs)("div",{className:"rounded-lg bg-[#FAF8F4] p-3",children:[(0,d.jsx)("p",{className:"text-[13px] font-medium text-[#2C2C2C]",children:a.title}),a.content&&(0,d.jsx)("p",{className:"mt-1 text-[11px] text-[#6B6B6B] line-clamp-2",children:a.content})]}),K&&(0,d.jsx)("div",{className:"rounded-lg bg-[#E3F2FD] p-3",children:(0,d.jsxs)("p",{className:"text-xs text-[#1976D2]",children:[u("common.currentAssignee"),": ",(0,d.jsx)("span",{className:"font-medium",children:a.assignee?.name})]})}),(0,d.jsx)("p",{className:"text-[13px] text-[#6B6B6B]",children:u("ideas.selectIdeaAssignee")}),I?(0,d.jsx)("div",{className:"flex items-center justify-center py-8",children:(0,d.jsx)(i.A,{className:"h-6 w-6 animate-spin text-[#9A9A9A]"})}):(0,d.jsxs)(n.z,{value:y,onValueChange:a=>z(a),className:"space-y-3",children:[(0,d.jsxs)("div",{className:`rounded-[10px] p-4 transition-colors cursor-pointer ${"self"===y?"bg-[#FDF8F6] border-2 border-[#C67A52]":"bg-white border border-[#E5E0D8] hover:border-[#C67A52]/50"}`,onClick:()=>z("self"),children:[(0,d.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,d.jsx)(n.C,{value:"self",id:"idea-self",className:"border-[#C67A52] text-[#C67A52]"}),(0,d.jsx)(m.J,{htmlFor:"idea-self",className:"text-sm font-medium text-[#2C2C2C] cursor-pointer",children:u("assign.assignToMyself")})]}),(0,d.jsx)("p",{className:"mt-2 ml-6 text-xs text-[#6B6B6B] leading-relaxed",children:u("ideas.assignToMyselfIdeaDesc")})]}),(0,d.jsxs)("div",{className:`rounded-[10px] p-4 transition-colors ${"agent"===y?"bg-[#FDF8F6] border-2 border-[#C67A52]":"bg-white border border-[#E5E0D8]"}`,children:[(0,d.jsxs)("div",{className:"flex items-center gap-2.5 cursor-pointer",onClick:()=>z("agent"),children:[(0,d.jsx)(n.C,{value:"agent",id:"idea-agent",className:"border-[#C67A52] text-[#C67A52]"}),(0,d.jsx)(m.J,{htmlFor:"idea-agent",className:"text-sm font-medium text-[#2C2C2C] cursor-pointer",children:u("ideas.orAssignToPmAgent")})]}),(0,d.jsx)("p",{className:"mt-2 ml-6 text-xs text-[#6B6B6B] leading-relaxed",children:u("ideas.onlySelectedPmAgentCanWork")}),"agent"===y&&(0,d.jsx)("div",{className:"mt-3 ml-6",children:(0,d.jsxs)(o.l6,{value:A,onValueChange:B,children:[(0,d.jsx)(o.bq,{className:"w-full border-[#E5E0D8]",children:(0,d.jsx)(o.yv,{placeholder:u("ideas.selectPmAgent")})}),(0,d.jsx)(o.gC,{children:E.length>0?E.map(a=>(0,d.jsx)(o.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-[#C67A52]"}),(0,d.jsx)("span",{children:a.name})]})},a.uuid)):(0,d.jsx)("div",{className:"px-3 py-2 text-xs text-[#9A9A9A]",children:u("ideas.noPmAgentsAvailable")})})]})})]}),(0,d.jsxs)("div",{className:`rounded-[10px] p-4 transition-colors ${"user"===y?"bg-[#FDF8F6] border-2 border-[#C67A52]":"bg-white border border-[#E5E0D8]"}`,children:[(0,d.jsxs)("div",{className:"flex items-center gap-2.5 cursor-pointer",onClick:()=>z("user"),children:[(0,d.jsx)(n.C,{value:"user",id:"idea-user",className:"border-[#C67A52] text-[#C67A52]"}),(0,d.jsx)(m.J,{htmlFor:"idea-user",className:"text-sm font-medium text-[#2C2C2C] cursor-pointer",children:u("assign.orAssignToUser")})]}),"user"===y&&(0,d.jsx)("div",{className:"mt-3 ml-6",children:(0,d.jsxs)(o.l6,{value:C,onValueChange:D,children:[(0,d.jsx)(o.bq,{className:"w-full border-[#E5E0D8]",children:(0,d.jsx)(o.yv,{placeholder:u("tasks.selectUser")})}),(0,d.jsx)(o.gC,{children:G.length>0?G.map(a=>(0,d.jsx)(o.eb,{value:a.uuid,children:(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)(k.A,{className:"h-4 w-4 text-[#6B6B6B]"}),(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:u("tasks.noUsersAvailable")})})]})})]}),K&&(0,d.jsxs)("div",{className:`rounded-[10px] p-4 transition-colors cursor-pointer ${"release"===y?"bg-[#FDF8F6] border-2 border-[#C67A52]":"bg-white border border-[#E5E0D8] hover:border-[#C67A52]/50"}`,onClick:()=>z("release"),children:[(0,d.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,d.jsx)(n.C,{value:"release",id:"idea-release",className:"border-[#C67A52] text-[#C67A52]"}),(0,d.jsx)(m.J,{htmlFor:"idea-release",className:"text-sm font-medium text-[#2C2C2C] cursor-pointer",children:u("assign.releaseAssignee")})]}),(0,d.jsx)("p",{className:"mt-2 ml-6 text-xs text-[#6B6B6B] leading-relaxed",children:u("ideas.releaseIdeaAssigneeDesc")})]})]})]}),(0,d.jsxs)("div",{className:"flex items-center justify-end gap-4 rounded-b-2xl bg-white px-6 py-6 border-t border-[#E5E0D8]",children:[(0,d.jsx)(l.$,{variant:"outline",onClick:p,disabled:w,className:"border-[#E5E0D8]",children:u("common.cancel")}),(0,d.jsx)(l.$,{onClick:L,disabled:w||!M,className:"bg-[#C67A52] hover:bg-[#B56A42] text-white",children:w?(0,d.jsx)(i.A,{className:"h-4 w-4 animate-spin"}):u("release"===y?"common.release":"common.assign")})]})]})]})}},30259:(a,b,c)=>{c.a(a,async(a,b)=>{try{var d=c(71255),e=c(61212),f=a([d,e]);[d,e]=f.then?(await f)():f,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});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},{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,"408c5f84fea2c0ae2f0d83aee87f6e6cfb4197e322",null),(0,e.A)(o,"40790b72c792d2c2fa46044fe0c82e0a49ee9ea155",null),(0,e.A)(p,"6047e5f9e0b0b8ab34e4ec087a5b7c646953446365",null),(0,e.A)(q,"4045c4fc8914df864a4ee17f3f630d9f2403c9a27b",null),d()}catch(a){d(a)}})},33501:(a,b,c)=>{c.d(b,{z:()=>e});var d=c(42377);let e=(0,d.createServerReference)("40ce810a8ca47feb397612ce1c7ecbe14d1af7c174",d.callServer,void 0,d.findSourceMapURL,"getElaborationAction")},34964:(a,b,c)=>{c.d(b,{e:()=>e});var d=c(42377);let e=(0,d.createServerReference)("4068d7c2e443443c634efddd8eba7ba864eb9a1436",d.callServer,void 0,d.findSourceMapURL,"verifyElaborationAction")},49102:(a,b,c)=>{c.d(b,{A:()=>d});let d=(0,c(56556).A)("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]])},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,"4085059a021f513673df0a86e5d2eac0b18866bb1f",null),(0,e.A)(r,"4074583a40eef70f09841db623a0680a154df5c78c",null),(0,e.A)(s,"605aee24f55397387550bcc6d5f577568c83fff746",null),(0,e.A)(t,"60f31de57b050278cc31df8aaff8a7e74ec2299c3f",null),(0,e.A)(u,"605a800c65218e49ee8880902b0205028b5e1fbecc",null),(0,e.A)(v,"60bdb88a48e978bacbfc4c5ff019e2a0f93acc53ca",null),(0,e.A)(w,"6036ce857944dd50df3f06692e1c2f3190c848641e",null),(0,e.A)(x,"00423656837d53af20d1cd96b1368bad35b5a06679",null),(0,e.A)(y,"607fa233df3a6f91be030c198b15022752cc1118be",null),(0,e.A)(z,"40bf3a7c038496a7b83f39c4cdfab08c0354b62923",null),(0,e.A)(A,"405fb7bd8b13cbdaa09691ee3ef4afc1a93a2c49a3",null),d()}catch(a){d(a)}})},73428:(a,b,c)=>{c.d(b,{R:()=>w});var d=c(10837),e=c(21968),f=c(1007),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)("70f53da122c27dd0a56d3ad8b1b2e4a6e9c956822c",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.useRouter)();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-[#9A9A9A]",children:e("title")}),(0,d.jsx)("span",{className:"text-xs font-medium text-[#C67A52]",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-[#E5E0D8] bg-white",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-[#FAF8F4] ${l?"bg-[#F7F6F3] border-b border-[#E5E0D8]":""}`,children:[(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[l?(0,d.jsx)(h.A,{className:"h-4 w-4 text-[#6B6B6B]"}):(0,d.jsx)(i.A,{className:"h-4 w-4 text-[#6B6B6B]"}),(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-[#C67A52]":"bg-[#888780]"}`,children:a.roundNumber}),(0,d.jsx)("span",{className:"text-[13px] font-semibold text-[#2C2C2C]",children:f("roundLabel",{number:a.roundNumber})}),a.isAppended&&(0,d.jsx)("span",{className:"rounded bg-[#EDE7F6] px-2 py-0.5 text-[10px] font-medium text-[#6A4FB6]",children:f("appendedBadge")}),!l&&(0,d.jsxs)("span",{className:"text-xs text-[#9A9A9A]",children:["\xb7 ",f("questionCount",{count:a.questions.length})]})]}),k?(0,d.jsx)("span",{className:"rounded bg-[#E8F5E9] px-2 py-0.5 text-[10px] font-medium text-[#2E7D32]",children:f("statusAnswered")}):(0,d.jsx)("span",{className:"rounded bg-[#FFF3E0] px-2 py-0.5 text-[10px] font-medium text-[#E65100]",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-[#6B6B6B]",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-[#2C2C2C]",children:["A: ",g]}),e<a.questions.length-1&&(0,d.jsx)("div",{className:"mt-4 h-px bg-[#F0EEEA]"})]},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-[#6B6B6B]",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-[#6B6B6B] disabled:opacity-30",children:(0,d.jsx)(j.A,{className:"h-4 w-4"})}),(0,d.jsx)("span",{className:"text-xs text-[#9A9A9A]",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-[#6B6B6B] 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]":"hover:bg-[#FAF8F4]"}`,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-[#E5E0D8] text-xs font-medium text-[#5F5E5A]",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-[#2C2C2A]",children:a.label}),a.description&&(0,d.jsx)("span",{className:"whitespace-normal [overflow-wrap:anywhere] text-[11px] text-[#9A9A9A]",children:a.description})]})]}),c&&(0,d.jsx)(k.A,{className:"mt-1 h-4 w-4 shrink-0 text-[#888780]"})]}),b<G.options.length-1&&(0,d.jsx)("div",{className:"h-px bg-[#F0EEEA]"})]},a.id)}),(0,d.jsx)("div",{className:"h-px bg-[#F0EEEA]"}),(0,d.jsxs)("div",{className:`flex w-full items-center gap-2.5 px-3.5 py-3 transition-colors ${N?"bg-[#F7F6F3]":"hover:bg-[#FAF8F4]"}`,children:[(0,d.jsx)("span",{className:"flex h-7 w-7 shrink-0 cursor-pointer items-center justify-center rounded-md bg-[#E5E0D8]",onClick:()=>I(G.questionId,u),children:(0,d.jsx)(l.A,{className:"h-3.5 w-3.5 text-[#B4B2A9]"})}),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-[#2C2C2A] 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-[#6B6B6B] 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-[#B4B2A9] 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-[#C67A52]"}),f(`category.${H}`)]}),(0,d.jsx)(o.$,{onClick:L,disabled:!K||A,className:"bg-[#C67A52] 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")})]})]})}},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,"400cda1396142e823c70236309129832b2bb93f1dd",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=a([e,f,g,h,i,j,k,l,m,n]);[e,f,g,h,i,j,k,l,m,n]=o.then?(await o)():o,d()}catch(a){d(a)}})},97285:(a,b,c)=>{c.d(b,{J:()=>e});var d=c(42377);let e=(0,d.createServerReference)("40790b72c792d2c2fa46044fe0c82e0a49ee9ea155",d.callServer,void 0,d.findSourceMapURL,"updateIdeaAction")}};