@chorus-aidlc/chorus 0.10.0 → 0.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (659) hide show
  1. package/.next/standalone/.next/BUILD_ID +1 -1
  2. package/.next/standalone/.next/app-build-manifest.json +463 -346
  3. package/.next/standalone/.next/app-path-routes-manifest.json +50 -36
  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/routes-manifest.json +25 -0
  7. package/.next/standalone/.next/server/app/(dashboard)/project-groups/[uuid]/page.js +2 -2
  8. package/.next/standalone/.next/server/app/(dashboard)/project-groups/[uuid]/page.js.nft.json +1 -1
  9. package/.next/standalone/.next/server/app/(dashboard)/project-groups/[uuid]/page_client-reference-manifest.js +1 -1
  10. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/activity/page.js +2 -2
  11. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/activity/page.js.nft.json +1 -1
  12. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/activity/page_client-reference-manifest.js +1 -1
  13. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/dashboard/[ideaUuid]/page.js +2 -2
  14. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/dashboard/[ideaUuid]/page.js.nft.json +1 -1
  15. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/dashboard/[ideaUuid]/page_client-reference-manifest.js +1 -1
  16. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/dashboard/page.js +2 -2
  17. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/dashboard/page.js.nft.json +1 -1
  18. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/dashboard/page_client-reference-manifest.js +1 -1
  19. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/documents/[documentUuid]/page.js +2 -2
  20. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/documents/[documentUuid]/page.js.nft.json +1 -1
  21. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/documents/[documentUuid]/page_client-reference-manifest.js +1 -1
  22. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/documents/page.js +2 -2
  23. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/documents/page.js.nft.json +1 -1
  24. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/documents/page_client-reference-manifest.js +1 -1
  25. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/proposals/[proposalUuid]/page.js +2 -3
  26. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/proposals/[proposalUuid]/page.js.nft.json +1 -1
  27. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/proposals/[proposalUuid]/page_client-reference-manifest.js +1 -1
  28. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/proposals/new/page.js +2 -2
  29. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/proposals/new/page.js.nft.json +1 -1
  30. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/proposals/new/page_client-reference-manifest.js +1 -1
  31. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/proposals/page.js +2 -2
  32. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/proposals/page.js.nft.json +1 -1
  33. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/proposals/page_client-reference-manifest.js +1 -1
  34. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/tasks/[taskUuid]/page.js +2 -2
  35. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/tasks/[taskUuid]/page.js.nft.json +1 -1
  36. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/tasks/[taskUuid]/page_client-reference-manifest.js +1 -1
  37. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/tasks/page.js +2 -2
  38. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/tasks/page.js.nft.json +1 -1
  39. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/tasks/page_client-reference-manifest.js +1 -1
  40. package/.next/standalone/.next/server/app/(dashboard)/projects/page.js +3 -3
  41. package/.next/standalone/.next/server/app/(dashboard)/projects/page.js.nft.json +1 -1
  42. package/.next/standalone/.next/server/app/(dashboard)/projects/page_client-reference-manifest.js +1 -1
  43. package/.next/standalone/.next/server/app/(dashboard)/settings/page.js +2 -8
  44. package/.next/standalone/.next/server/app/(dashboard)/settings/page.js.nft.json +1 -1
  45. package/.next/standalone/.next/server/app/(dashboard)/settings/page_client-reference-manifest.js +1 -1
  46. package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  47. package/.next/standalone/.next/server/app/_not-found.html +1 -1
  48. package/.next/standalone/.next/server/app/_not-found.rsc +5 -5
  49. package/.next/standalone/.next/server/app/admin/companies/[uuid]/page_client-reference-manifest.js +1 -1
  50. package/.next/standalone/.next/server/app/admin/companies/new/page_client-reference-manifest.js +1 -1
  51. package/.next/standalone/.next/server/app/admin/companies/new.html +1 -1
  52. package/.next/standalone/.next/server/app/admin/companies/new.rsc +5 -5
  53. package/.next/standalone/.next/server/app/admin/companies/page_client-reference-manifest.js +1 -1
  54. package/.next/standalone/.next/server/app/admin/companies.html +1 -1
  55. package/.next/standalone/.next/server/app/admin/companies.rsc +5 -5
  56. package/.next/standalone/.next/server/app/admin/page_client-reference-manifest.js +1 -1
  57. package/.next/standalone/.next/server/app/admin.html +1 -1
  58. package/.next/standalone/.next/server/app/admin.rsc +5 -5
  59. package/.next/standalone/.next/server/app/api/admin/companies/[uuid]/route.js +1 -1
  60. package/.next/standalone/.next/server/app/api/admin/companies/[uuid]/route_client-reference-manifest.js +1 -1
  61. package/.next/standalone/.next/server/app/api/admin/companies/route.js +1 -1
  62. package/.next/standalone/.next/server/app/api/admin/companies/route_client-reference-manifest.js +1 -1
  63. package/.next/standalone/.next/server/app/api/admin/login/route.js +1 -1
  64. package/.next/standalone/.next/server/app/api/admin/login/route_client-reference-manifest.js +1 -1
  65. package/.next/standalone/.next/server/app/api/admin/session/route.js +1 -1
  66. package/.next/standalone/.next/server/app/api/admin/session/route_client-reference-manifest.js +1 -1
  67. package/.next/standalone/.next/server/app/api/agent-connections/route.js +1 -0
  68. package/.next/standalone/.next/server/app/api/agent-connections/route.js.nft.json +1 -0
  69. package/.next/standalone/.next/server/app/api/agent-connections/route_client-reference-manifest.js +1 -0
  70. package/.next/standalone/.next/server/app/api/agents/[uuid]/route.js +1 -1
  71. package/.next/standalone/.next/server/app/api/agents/[uuid]/route_client-reference-manifest.js +1 -1
  72. package/.next/standalone/.next/server/app/api/agents/[uuid]/sessions/route.js +1 -1
  73. package/.next/standalone/.next/server/app/api/agents/[uuid]/sessions/route.js.nft.json +1 -1
  74. package/.next/standalone/.next/server/app/api/agents/[uuid]/sessions/route_client-reference-manifest.js +1 -1
  75. package/.next/standalone/.next/server/app/api/agents/route.js +1 -1
  76. package/.next/standalone/.next/server/app/api/agents/route_client-reference-manifest.js +1 -1
  77. package/.next/standalone/.next/server/app/api/api-keys/[uuid]/route.js +1 -1
  78. package/.next/standalone/.next/server/app/api/api-keys/[uuid]/route_client-reference-manifest.js +1 -1
  79. package/.next/standalone/.next/server/app/api/api-keys/route.js +1 -1
  80. package/.next/standalone/.next/server/app/api/api-keys/route_client-reference-manifest.js +1 -1
  81. package/.next/standalone/.next/server/app/api/auth/callback/route.js +1 -1
  82. package/.next/standalone/.next/server/app/api/auth/callback/route_client-reference-manifest.js +1 -1
  83. package/.next/standalone/.next/server/app/api/auth/check-default/route.js +1 -1
  84. package/.next/standalone/.next/server/app/api/auth/check-default/route_client-reference-manifest.js +1 -1
  85. package/.next/standalone/.next/server/app/api/auth/company-oidc/route.js +1 -1
  86. package/.next/standalone/.next/server/app/api/auth/company-oidc/route_client-reference-manifest.js +1 -1
  87. package/.next/standalone/.next/server/app/api/auth/default-login/route.js +1 -1
  88. package/.next/standalone/.next/server/app/api/auth/default-login/route_client-reference-manifest.js +1 -1
  89. package/.next/standalone/.next/server/app/api/auth/identify/route.js +1 -1
  90. package/.next/standalone/.next/server/app/api/auth/identify/route_client-reference-manifest.js +1 -1
  91. package/.next/standalone/.next/server/app/api/auth/logout/route_client-reference-manifest.js +1 -1
  92. package/.next/standalone/.next/server/app/api/auth/me/route.js +1 -1
  93. package/.next/standalone/.next/server/app/api/auth/me/route_client-reference-manifest.js +1 -1
  94. package/.next/standalone/.next/server/app/api/auth/refresh/route.js +1 -1
  95. package/.next/standalone/.next/server/app/api/auth/refresh/route_client-reference-manifest.js +1 -1
  96. package/.next/standalone/.next/server/app/api/auth/session/route.js +1 -1
  97. package/.next/standalone/.next/server/app/api/auth/session/route_client-reference-manifest.js +1 -1
  98. package/.next/standalone/.next/server/app/api/auth/sync-token/route.js +1 -1
  99. package/.next/standalone/.next/server/app/api/auth/sync-token/route_client-reference-manifest.js +1 -1
  100. package/.next/standalone/.next/server/app/api/comments/route.js +1 -1
  101. package/.next/standalone/.next/server/app/api/comments/route.js.nft.json +1 -1
  102. package/.next/standalone/.next/server/app/api/comments/route_client-reference-manifest.js +1 -1
  103. package/.next/standalone/.next/server/app/api/daemon/control/route.js +1 -0
  104. package/.next/standalone/.next/server/app/api/daemon/control/route.js.nft.json +1 -0
  105. package/.next/standalone/.next/server/app/api/daemon/control/route_client-reference-manifest.js +1 -0
  106. package/.next/standalone/.next/server/app/api/daemon/execution-state/route.js +1 -0
  107. package/.next/standalone/.next/server/app/api/daemon/execution-state/route.js.nft.json +1 -0
  108. package/.next/standalone/.next/server/app/api/daemon/execution-state/route_client-reference-manifest.js +1 -0
  109. package/.next/standalone/.next/server/app/api/daemon/executions/route.js +1 -0
  110. package/.next/standalone/.next/server/app/api/daemon/executions/route.js.nft.json +1 -0
  111. package/.next/standalone/.next/server/app/api/daemon/executions/route_client-reference-manifest.js +1 -0
  112. package/.next/standalone/.next/server/app/api/daemon/pending-turns/route.js +1 -0
  113. package/.next/standalone/.next/server/app/api/daemon/pending-turns/route.js.nft.json +1 -0
  114. package/.next/standalone/.next/server/app/api/daemon/pending-turns/route_client-reference-manifest.js +1 -0
  115. package/.next/standalone/.next/server/app/api/daemon/report-interrupt/route.js +1 -0
  116. package/.next/standalone/.next/server/app/api/daemon/report-interrupt/route.js.nft.json +1 -0
  117. package/.next/standalone/.next/server/app/api/daemon/report-interrupt/route_client-reference-manifest.js +1 -0
  118. package/.next/standalone/.next/server/app/api/daemon/resume/route.js +1 -0
  119. package/.next/standalone/.next/server/app/api/daemon/resume/route.js.nft.json +1 -0
  120. package/.next/standalone/.next/server/app/api/daemon/resume/route_client-reference-manifest.js +1 -0
  121. package/.next/standalone/.next/server/app/api/daemon/transcript/route.js +1 -0
  122. package/.next/standalone/.next/server/app/api/daemon/transcript/route.js.nft.json +1 -0
  123. package/.next/standalone/.next/server/app/api/daemon/transcript/route_client-reference-manifest.js +1 -0
  124. package/.next/standalone/.next/server/app/api/daemon/turn-advance/route.js +1 -0
  125. package/.next/standalone/.next/server/app/api/daemon/turn-advance/route.js.nft.json +1 -0
  126. package/.next/standalone/.next/server/app/api/daemon/turn-advance/route_client-reference-manifest.js +1 -0
  127. package/.next/standalone/.next/server/app/api/daemon-sessions/[sessionUuid]/instruction/route.js +1 -0
  128. package/.next/standalone/.next/server/app/api/daemon-sessions/[sessionUuid]/instruction/route.js.nft.json +1 -0
  129. package/.next/standalone/.next/server/app/api/daemon-sessions/[sessionUuid]/instruction/route_client-reference-manifest.js +1 -0
  130. package/.next/standalone/.next/server/app/api/daemon-sessions/[sessionUuid]/route.js +1 -0
  131. package/.next/standalone/.next/server/app/api/daemon-sessions/[sessionUuid]/route.js.nft.json +1 -0
  132. package/.next/standalone/.next/server/app/api/daemon-sessions/[sessionUuid]/route_client-reference-manifest.js +1 -0
  133. package/.next/standalone/.next/server/app/api/daemon-sessions/ad-hoc/route.js +1 -0
  134. package/.next/standalone/.next/server/app/api/daemon-sessions/ad-hoc/route.js.nft.json +1 -0
  135. package/.next/standalone/.next/server/app/api/daemon-sessions/ad-hoc/route_client-reference-manifest.js +1 -0
  136. package/.next/standalone/.next/server/app/api/daemon-sessions/route.js +1 -0
  137. package/.next/standalone/.next/server/app/api/daemon-sessions/route.js.nft.json +1 -0
  138. package/.next/standalone/.next/server/app/api/daemon-sessions/route_client-reference-manifest.js +1 -0
  139. package/.next/standalone/.next/server/app/api/documents/[uuid]/route.js +1 -1
  140. package/.next/standalone/.next/server/app/api/documents/[uuid]/route_client-reference-manifest.js +1 -1
  141. package/.next/standalone/.next/server/app/api/entities/[type]/[uuid]/root-idea/route.js +1 -0
  142. package/.next/standalone/.next/server/app/api/entities/[type]/[uuid]/root-idea/route.js.nft.json +1 -0
  143. package/.next/standalone/.next/server/app/api/entities/[type]/[uuid]/root-idea/route_client-reference-manifest.js +1 -0
  144. package/.next/standalone/.next/server/app/api/events/notifications/route.js +6 -2
  145. package/.next/standalone/.next/server/app/api/events/notifications/route.js.nft.json +1 -1
  146. package/.next/standalone/.next/server/app/api/events/notifications/route_client-reference-manifest.js +1 -1
  147. package/.next/standalone/.next/server/app/api/events/route.js +7 -3
  148. package/.next/standalone/.next/server/app/api/events/route.js.nft.json +1 -1
  149. package/.next/standalone/.next/server/app/api/events/route_client-reference-manifest.js +1 -1
  150. package/.next/standalone/.next/server/app/api/health/route.js +1 -1
  151. package/.next/standalone/.next/server/app/api/health/route_client-reference-manifest.js +1 -1
  152. package/.next/standalone/.next/server/app/api/ideas/[uuid]/claim/route.js +1 -1
  153. package/.next/standalone/.next/server/app/api/ideas/[uuid]/claim/route.js.nft.json +1 -1
  154. package/.next/standalone/.next/server/app/api/ideas/[uuid]/claim/route_client-reference-manifest.js +1 -1
  155. package/.next/standalone/.next/server/app/api/ideas/[uuid]/move/preview/route.js +1 -1
  156. package/.next/standalone/.next/server/app/api/ideas/[uuid]/move/preview/route.js.nft.json +1 -1
  157. package/.next/standalone/.next/server/app/api/ideas/[uuid]/move/preview/route_client-reference-manifest.js +1 -1
  158. package/.next/standalone/.next/server/app/api/ideas/[uuid]/move/route.js +1 -1
  159. package/.next/standalone/.next/server/app/api/ideas/[uuid]/move/route.js.nft.json +1 -1
  160. package/.next/standalone/.next/server/app/api/ideas/[uuid]/move/route_client-reference-manifest.js +1 -1
  161. package/.next/standalone/.next/server/app/api/ideas/[uuid]/parent/route.js +1 -1
  162. package/.next/standalone/.next/server/app/api/ideas/[uuid]/parent/route.js.nft.json +1 -1
  163. package/.next/standalone/.next/server/app/api/ideas/[uuid]/parent/route_client-reference-manifest.js +1 -1
  164. package/.next/standalone/.next/server/app/api/ideas/[uuid]/release/route.js +1 -1
  165. package/.next/standalone/.next/server/app/api/ideas/[uuid]/release/route.js.nft.json +1 -1
  166. package/.next/standalone/.next/server/app/api/ideas/[uuid]/release/route_client-reference-manifest.js +1 -1
  167. package/.next/standalone/.next/server/app/api/ideas/[uuid]/route.js +1 -1
  168. package/.next/standalone/.next/server/app/api/ideas/[uuid]/route.js.nft.json +1 -1
  169. package/.next/standalone/.next/server/app/api/ideas/[uuid]/route_client-reference-manifest.js +1 -1
  170. package/.next/standalone/.next/server/app/api/mcp/route.js +5 -41
  171. package/.next/standalone/.next/server/app/api/mcp/route.js.nft.json +1 -1
  172. package/.next/standalone/.next/server/app/api/mcp/route_client-reference-manifest.js +1 -1
  173. package/.next/standalone/.next/server/app/api/me/assignments/route.js +1 -1
  174. package/.next/standalone/.next/server/app/api/me/assignments/route.js.nft.json +1 -1
  175. package/.next/standalone/.next/server/app/api/me/assignments/route_client-reference-manifest.js +1 -1
  176. package/.next/standalone/.next/server/app/api/mentionables/route.js +1 -1
  177. package/.next/standalone/.next/server/app/api/mentionables/route.js.nft.json +1 -1
  178. package/.next/standalone/.next/server/app/api/mentionables/route_client-reference-manifest.js +1 -1
  179. package/.next/standalone/.next/server/app/api/notifications/[uuid]/archive/route.js +1 -1
  180. package/.next/standalone/.next/server/app/api/notifications/[uuid]/archive/route.js.nft.json +1 -1
  181. package/.next/standalone/.next/server/app/api/notifications/[uuid]/archive/route_client-reference-manifest.js +1 -1
  182. package/.next/standalone/.next/server/app/api/notifications/[uuid]/read/route.js +1 -1
  183. package/.next/standalone/.next/server/app/api/notifications/[uuid]/read/route.js.nft.json +1 -1
  184. package/.next/standalone/.next/server/app/api/notifications/[uuid]/read/route_client-reference-manifest.js +1 -1
  185. package/.next/standalone/.next/server/app/api/notifications/preferences/route.js +1 -1
  186. package/.next/standalone/.next/server/app/api/notifications/preferences/route.js.nft.json +1 -1
  187. package/.next/standalone/.next/server/app/api/notifications/preferences/route_client-reference-manifest.js +1 -1
  188. package/.next/standalone/.next/server/app/api/notifications/read-all/route.js +1 -1
  189. package/.next/standalone/.next/server/app/api/notifications/read-all/route.js.nft.json +1 -1
  190. package/.next/standalone/.next/server/app/api/notifications/read-all/route_client-reference-manifest.js +1 -1
  191. package/.next/standalone/.next/server/app/api/notifications/route.js +1 -1
  192. package/.next/standalone/.next/server/app/api/notifications/route.js.nft.json +1 -1
  193. package/.next/standalone/.next/server/app/api/notifications/route_client-reference-manifest.js +1 -1
  194. package/.next/standalone/.next/server/app/api/notifications/unread-count/route.js +1 -1
  195. package/.next/standalone/.next/server/app/api/notifications/unread-count/route.js.nft.json +1 -1
  196. package/.next/standalone/.next/server/app/api/notifications/unread-count/route_client-reference-manifest.js +1 -1
  197. package/.next/standalone/.next/server/app/api/project-groups/[uuid]/dashboard/route.js +1 -1
  198. package/.next/standalone/.next/server/app/api/project-groups/[uuid]/dashboard/route_client-reference-manifest.js +1 -1
  199. package/.next/standalone/.next/server/app/api/project-groups/[uuid]/route.js +1 -1
  200. package/.next/standalone/.next/server/app/api/project-groups/[uuid]/route_client-reference-manifest.js +1 -1
  201. package/.next/standalone/.next/server/app/api/project-groups/route.js +1 -1
  202. package/.next/standalone/.next/server/app/api/project-groups/route_client-reference-manifest.js +1 -1
  203. package/.next/standalone/.next/server/app/api/projects/[uuid]/activity/route.js +1 -1
  204. package/.next/standalone/.next/server/app/api/projects/[uuid]/activity/route_client-reference-manifest.js +1 -1
  205. package/.next/standalone/.next/server/app/api/projects/[uuid]/available/route.js +1 -1
  206. package/.next/standalone/.next/server/app/api/projects/[uuid]/available/route.js.nft.json +1 -1
  207. package/.next/standalone/.next/server/app/api/projects/[uuid]/available/route_client-reference-manifest.js +1 -1
  208. package/.next/standalone/.next/server/app/api/projects/[uuid]/documents/route.js +1 -1
  209. package/.next/standalone/.next/server/app/api/projects/[uuid]/documents/route_client-reference-manifest.js +1 -1
  210. package/.next/standalone/.next/server/app/api/projects/[uuid]/group/route.js +1 -1
  211. package/.next/standalone/.next/server/app/api/projects/[uuid]/group/route_client-reference-manifest.js +1 -1
  212. package/.next/standalone/.next/server/app/api/projects/[uuid]/ideas/route.js +1 -1
  213. package/.next/standalone/.next/server/app/api/projects/[uuid]/ideas/route.js.nft.json +1 -1
  214. package/.next/standalone/.next/server/app/api/projects/[uuid]/ideas/route_client-reference-manifest.js +1 -1
  215. package/.next/standalone/.next/server/app/api/projects/[uuid]/ideas/tracker/route.js +1 -1
  216. package/.next/standalone/.next/server/app/api/projects/[uuid]/ideas/tracker/route.js.nft.json +1 -1
  217. package/.next/standalone/.next/server/app/api/projects/[uuid]/ideas/tracker/route_client-reference-manifest.js +1 -1
  218. package/.next/standalone/.next/server/app/api/projects/[uuid]/proposals/[proposalUuid]/validate/route.js +1 -1
  219. package/.next/standalone/.next/server/app/api/projects/[uuid]/proposals/[proposalUuid]/validate/route_client-reference-manifest.js +1 -1
  220. package/.next/standalone/.next/server/app/api/projects/[uuid]/proposals/route.js +1 -1
  221. package/.next/standalone/.next/server/app/api/projects/[uuid]/proposals/route_client-reference-manifest.js +1 -1
  222. package/.next/standalone/.next/server/app/api/projects/[uuid]/proposals/summary/route.js +1 -1
  223. package/.next/standalone/.next/server/app/api/projects/[uuid]/proposals/summary/route_client-reference-manifest.js +1 -1
  224. package/.next/standalone/.next/server/app/api/projects/[uuid]/route.js +1 -1
  225. package/.next/standalone/.next/server/app/api/projects/[uuid]/route_client-reference-manifest.js +1 -1
  226. package/.next/standalone/.next/server/app/api/projects/[uuid]/stats/route.js +1 -1
  227. package/.next/standalone/.next/server/app/api/projects/[uuid]/stats/route_client-reference-manifest.js +1 -1
  228. package/.next/standalone/.next/server/app/api/projects/[uuid]/tasks/dependencies/route.js +1 -1
  229. package/.next/standalone/.next/server/app/api/projects/[uuid]/tasks/dependencies/route.js.nft.json +1 -1
  230. package/.next/standalone/.next/server/app/api/projects/[uuid]/tasks/dependencies/route_client-reference-manifest.js +1 -1
  231. package/.next/standalone/.next/server/app/api/projects/[uuid]/tasks/route.js +1 -1
  232. package/.next/standalone/.next/server/app/api/projects/[uuid]/tasks/route.js.nft.json +1 -1
  233. package/.next/standalone/.next/server/app/api/projects/[uuid]/tasks/route_client-reference-manifest.js +1 -1
  234. package/.next/standalone/.next/server/app/api/projects/route.js +1 -1
  235. package/.next/standalone/.next/server/app/api/projects/route_client-reference-manifest.js +1 -1
  236. package/.next/standalone/.next/server/app/api/proposals/[uuid]/approve/route.js +1 -1
  237. package/.next/standalone/.next/server/app/api/proposals/[uuid]/approve/route_client-reference-manifest.js +1 -1
  238. package/.next/standalone/.next/server/app/api/proposals/[uuid]/close/route.js +1 -1
  239. package/.next/standalone/.next/server/app/api/proposals/[uuid]/close/route_client-reference-manifest.js +1 -1
  240. package/.next/standalone/.next/server/app/api/proposals/[uuid]/reject/route.js +1 -1
  241. package/.next/standalone/.next/server/app/api/proposals/[uuid]/reject/route_client-reference-manifest.js +1 -1
  242. package/.next/standalone/.next/server/app/api/proposals/[uuid]/revoke/route.js +1 -1
  243. package/.next/standalone/.next/server/app/api/proposals/[uuid]/revoke/route_client-reference-manifest.js +1 -1
  244. package/.next/standalone/.next/server/app/api/proposals/[uuid]/route.js +1 -1
  245. package/.next/standalone/.next/server/app/api/proposals/[uuid]/route_client-reference-manifest.js +1 -1
  246. package/.next/standalone/.next/server/app/api/search/route.js +1 -1
  247. package/.next/standalone/.next/server/app/api/search/route_client-reference-manifest.js +1 -1
  248. package/.next/standalone/.next/server/app/api/sessions/[uuid]/route.js +1 -1
  249. package/.next/standalone/.next/server/app/api/sessions/[uuid]/route.js.nft.json +1 -1
  250. package/.next/standalone/.next/server/app/api/sessions/[uuid]/route_client-reference-manifest.js +1 -1
  251. package/.next/standalone/.next/server/app/api/tasks/[uuid]/claim/route.js +1 -1
  252. package/.next/standalone/.next/server/app/api/tasks/[uuid]/claim/route.js.nft.json +1 -1
  253. package/.next/standalone/.next/server/app/api/tasks/[uuid]/claim/route_client-reference-manifest.js +1 -1
  254. package/.next/standalone/.next/server/app/api/tasks/[uuid]/dependencies/[dependsOnUuid]/route.js +1 -1
  255. package/.next/standalone/.next/server/app/api/tasks/[uuid]/dependencies/[dependsOnUuid]/route.js.nft.json +1 -1
  256. package/.next/standalone/.next/server/app/api/tasks/[uuid]/dependencies/[dependsOnUuid]/route_client-reference-manifest.js +1 -1
  257. package/.next/standalone/.next/server/app/api/tasks/[uuid]/dependencies/route.js +1 -1
  258. package/.next/standalone/.next/server/app/api/tasks/[uuid]/dependencies/route.js.nft.json +1 -1
  259. package/.next/standalone/.next/server/app/api/tasks/[uuid]/dependencies/route_client-reference-manifest.js +1 -1
  260. package/.next/standalone/.next/server/app/api/tasks/[uuid]/release/route.js +1 -1
  261. package/.next/standalone/.next/server/app/api/tasks/[uuid]/release/route.js.nft.json +1 -1
  262. package/.next/standalone/.next/server/app/api/tasks/[uuid]/release/route_client-reference-manifest.js +1 -1
  263. package/.next/standalone/.next/server/app/api/tasks/[uuid]/route.js +1 -1
  264. package/.next/standalone/.next/server/app/api/tasks/[uuid]/route.js.nft.json +1 -1
  265. package/.next/standalone/.next/server/app/api/tasks/[uuid]/route_client-reference-manifest.js +1 -1
  266. package/.next/standalone/.next/server/app/api/tasks/[uuid]/sessions/route.js +1 -1
  267. package/.next/standalone/.next/server/app/api/tasks/[uuid]/sessions/route.js.nft.json +1 -1
  268. package/.next/standalone/.next/server/app/api/tasks/[uuid]/sessions/route_client-reference-manifest.js +1 -1
  269. package/.next/standalone/.next/server/app/index.html +1 -1
  270. package/.next/standalone/.next/server/app/index.rsc +5 -5
  271. package/.next/standalone/.next/server/app/login/admin/page_client-reference-manifest.js +1 -1
  272. package/.next/standalone/.next/server/app/login/admin.html +1 -1
  273. package/.next/standalone/.next/server/app/login/admin.rsc +5 -5
  274. package/.next/standalone/.next/server/app/login/callback/page.js +2 -2
  275. package/.next/standalone/.next/server/app/login/callback/page.js.nft.json +1 -1
  276. package/.next/standalone/.next/server/app/login/callback/page_client-reference-manifest.js +1 -1
  277. package/.next/standalone/.next/server/app/login/callback.html +1 -1
  278. package/.next/standalone/.next/server/app/login/callback.rsc +5 -5
  279. package/.next/standalone/.next/server/app/login/page_client-reference-manifest.js +1 -1
  280. package/.next/standalone/.next/server/app/login/pick-workspace/page_client-reference-manifest.js +1 -1
  281. package/.next/standalone/.next/server/app/login/pick-workspace.html +1 -1
  282. package/.next/standalone/.next/server/app/login/pick-workspace.rsc +5 -5
  283. package/.next/standalone/.next/server/app/login/silent-refresh/page_client-reference-manifest.js +1 -1
  284. package/.next/standalone/.next/server/app/login/silent-refresh.html +1 -1
  285. package/.next/standalone/.next/server/app/login/silent-refresh.rsc +5 -5
  286. package/.next/standalone/.next/server/app/login.html +1 -1
  287. package/.next/standalone/.next/server/app/login.rsc +5 -5
  288. package/.next/standalone/.next/server/app/onboarding/page.js +2 -2
  289. package/.next/standalone/.next/server/app/onboarding/page.js.nft.json +1 -1
  290. package/.next/standalone/.next/server/app/onboarding/page_client-reference-manifest.js +1 -1
  291. package/.next/standalone/.next/server/app/onboarding.html +1 -1
  292. package/.next/standalone/.next/server/app/onboarding.rsc +6 -6
  293. package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
  294. package/.next/standalone/.next/server/app/projects.html +1 -1
  295. package/.next/standalone/.next/server/app/projects.rsc +7 -7
  296. package/.next/standalone/.next/server/app/settings.html +1 -1
  297. package/.next/standalone/.next/server/app/settings.rsc +7 -7
  298. package/.next/standalone/.next/server/app-paths-manifest.json +50 -36
  299. package/.next/standalone/.next/server/chunks/1064.js +1 -0
  300. package/.next/standalone/.next/server/chunks/1596.js +13 -0
  301. package/.next/standalone/.next/server/chunks/2213.js +1 -0
  302. package/.next/standalone/.next/server/chunks/2618.js +1 -1
  303. package/.next/standalone/.next/server/chunks/2961.js +1 -1
  304. package/.next/standalone/.next/server/chunks/3219.js +2 -0
  305. package/.next/standalone/.next/server/chunks/3371.js +1 -0
  306. package/.next/standalone/.next/server/chunks/3419.js +1 -0
  307. package/.next/standalone/.next/server/chunks/369.js +1 -0
  308. package/.next/standalone/.next/server/chunks/4638.js +1 -0
  309. package/.next/standalone/.next/server/chunks/4711.js +530 -0
  310. package/.next/standalone/.next/server/chunks/5039.js +1 -0
  311. package/.next/standalone/.next/server/chunks/5300.js +1 -1
  312. package/.next/standalone/.next/server/chunks/5631.js +1 -0
  313. package/.next/standalone/.next/server/chunks/6044.js +1 -1
  314. package/.next/standalone/.next/server/chunks/6113.js +1 -1
  315. package/.next/standalone/.next/server/chunks/6207.js +1 -1
  316. package/.next/standalone/.next/server/chunks/6461.js +1 -0
  317. package/.next/standalone/.next/server/chunks/6712.js +1 -0
  318. package/.next/standalone/.next/server/chunks/7002.js +1 -1
  319. package/.next/standalone/.next/server/chunks/7063.js +2 -2
  320. package/.next/standalone/.next/server/chunks/7258.js +37 -0
  321. package/.next/standalone/.next/server/chunks/7368.js +1 -1
  322. package/.next/standalone/.next/server/chunks/7578.js +2 -2
  323. package/.next/standalone/.next/server/chunks/7867.js +1 -0
  324. package/.next/standalone/.next/server/chunks/7897.js +1 -0
  325. package/.next/standalone/.next/server/chunks/8012.js +1 -0
  326. package/.next/standalone/.next/server/chunks/8245.js +31 -0
  327. package/.next/standalone/.next/server/chunks/8322.js +1 -1
  328. package/.next/standalone/.next/server/chunks/9015.js +1 -1
  329. package/.next/standalone/.next/server/chunks/920.js +1 -1
  330. package/.next/standalone/.next/server/chunks/937.js +16 -2
  331. package/.next/standalone/.next/server/chunks/9629.js +1 -0
  332. package/.next/standalone/.next/server/chunks/9725.js +1 -0
  333. package/.next/standalone/.next/server/instrumentation.js +1 -1
  334. package/.next/standalone/.next/server/middleware-build-manifest.js +1 -1
  335. package/.next/standalone/.next/server/middleware-manifest.json +5 -5
  336. package/.next/standalone/.next/server/next-font-manifest.js +1 -1
  337. package/.next/standalone/.next/server/next-font-manifest.json +1 -1
  338. package/.next/standalone/.next/server/pages/404.html +1 -1
  339. package/.next/standalone/.next/server/pages/500.html +1 -1
  340. package/.next/standalone/.next/server/server-reference-manifest.js +1 -1
  341. package/.next/standalone/.next/server/server-reference-manifest.json +1 -1
  342. package/.next/standalone/.next/server/src/middleware.js +1 -1
  343. package/.next/standalone/.next/static/519aK55QLHaVN7b1TVDkB/_buildManifest.js +1 -0
  344. package/.next/standalone/.next/static/chunks/1217-323cc20b73ebfde9.js +1 -0
  345. package/.next/standalone/.next/static/chunks/{11207-8f4b154804f5a66f.js → 15183-5734d279b26e9414.js} +2 -2
  346. package/.next/standalone/.next/static/chunks/1879-7a8b283283218df2.js +1 -0
  347. package/.next/standalone/.next/static/chunks/19276-50b367d7b93d5f34.js +1 -0
  348. package/.next/standalone/.next/static/chunks/23466-e1176a6d814f4897.js +1 -0
  349. package/.next/standalone/.next/static/chunks/38040-a8687f86dd8e9d67.js +1 -0
  350. package/.next/standalone/.next/static/chunks/{4860.e071c0b9e32bd75f.js → 4860.43f5ad8a3aaed0e8.js} +1 -1
  351. package/.next/standalone/.next/static/chunks/58245-b2ea112ace9624d2.js +1 -0
  352. package/.next/standalone/.next/static/chunks/59296-783831c43aa0162e.js +1 -0
  353. package/.next/standalone/.next/static/chunks/60648-36ccbee4ce232d52.js +1 -0
  354. package/.next/standalone/.next/static/chunks/60694-68232120903209df.js +1 -0
  355. package/.next/standalone/.next/static/chunks/64648-81f03be6f9793ab9.js +1 -0
  356. package/.next/standalone/.next/static/chunks/{94655-1c75e0590a66215e.js → 66969-12f0b22c51f5a410.js} +1 -1
  357. package/.next/standalone/.next/static/chunks/70536-b8bf71098ae11f07.js +1 -0
  358. package/.next/standalone/.next/static/chunks/71350-88c2649fc693c1e8.js +1 -0
  359. package/.next/standalone/.next/static/chunks/78389-b32edc6bd5c570a9.js +1 -0
  360. package/.next/standalone/.next/static/chunks/78584-eb2fa8cf2f266329.js +1 -0
  361. package/.next/standalone/.next/static/chunks/78917-150ed14a99844aab.js +1 -0
  362. package/.next/standalone/.next/static/chunks/8574-b9739eb8d054c793.js +1 -0
  363. package/.next/standalone/.next/static/chunks/{99373.4c336ea9ad07311e.js → 99373.0768feb3a08c7da3.js} +1 -1
  364. package/.next/standalone/.next/static/chunks/app/(dashboard)/layout-0a28456fea4ce95a.js +1 -0
  365. package/.next/standalone/.next/static/chunks/app/(dashboard)/project-groups/[uuid]/page-a79969c5c9aadacd.js +1 -0
  366. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/dashboard/[ideaUuid]/page-4bc556c2fc8f3d24.js +1 -0
  367. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/dashboard/page-e00752a72c31663f.js +1 -0
  368. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/documents/[documentUuid]/page-ef82b871895245ea.js +1 -0
  369. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/documents/page-2c9bcbd11ddb8661.js +1 -0
  370. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/proposals/[proposalUuid]/page-630b168598513ce8.js +1 -0
  371. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/proposals/new/page-99639479cc98965f.js +1 -0
  372. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/proposals/page-335f2450e44a0fba.js +1 -0
  373. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/tasks/[taskUuid]/page-4a191d69b2b6e880.js +1 -0
  374. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/tasks/page-0faebb478be4c85d.js +1 -0
  375. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/{page-f198303c176c6e02.js → page-583e58d4d689d38b.js} +1 -1
  376. package/.next/standalone/.next/static/chunks/app/(dashboard)/settings/page-2e8fcb72687100df.js +1 -0
  377. package/.next/standalone/.next/static/chunks/app/api/admin/companies/[uuid]/route-4bc556c2fc8f3d24.js +1 -0
  378. package/.next/standalone/.next/static/chunks/app/api/admin/companies/route-4bc556c2fc8f3d24.js +1 -0
  379. package/.next/standalone/.next/static/chunks/app/api/admin/login/route-4bc556c2fc8f3d24.js +1 -0
  380. package/.next/standalone/.next/static/chunks/app/api/admin/session/route-4bc556c2fc8f3d24.js +1 -0
  381. package/.next/standalone/.next/static/chunks/app/api/agent-connections/route-4bc556c2fc8f3d24.js +1 -0
  382. package/.next/standalone/.next/static/chunks/app/api/agents/[uuid]/route-4bc556c2fc8f3d24.js +1 -0
  383. package/.next/standalone/.next/static/chunks/app/api/agents/[uuid]/sessions/route-4bc556c2fc8f3d24.js +1 -0
  384. package/.next/standalone/.next/static/chunks/app/api/agents/route-4bc556c2fc8f3d24.js +1 -0
  385. package/.next/standalone/.next/static/chunks/app/api/api-keys/[uuid]/route-4bc556c2fc8f3d24.js +1 -0
  386. package/.next/standalone/.next/static/chunks/app/api/api-keys/route-4bc556c2fc8f3d24.js +1 -0
  387. package/.next/standalone/.next/static/chunks/app/api/auth/callback/route-4bc556c2fc8f3d24.js +1 -0
  388. package/.next/standalone/.next/static/chunks/app/api/auth/check-default/route-4bc556c2fc8f3d24.js +1 -0
  389. package/.next/standalone/.next/static/chunks/app/api/auth/company-oidc/route-4bc556c2fc8f3d24.js +1 -0
  390. package/.next/standalone/.next/static/chunks/app/api/auth/default-login/route-4bc556c2fc8f3d24.js +1 -0
  391. package/.next/standalone/.next/static/chunks/app/api/auth/identify/route-4bc556c2fc8f3d24.js +1 -0
  392. package/.next/standalone/.next/static/chunks/app/api/auth/logout/route-4bc556c2fc8f3d24.js +1 -0
  393. package/.next/standalone/.next/static/chunks/app/api/auth/me/route-4bc556c2fc8f3d24.js +1 -0
  394. package/.next/standalone/.next/static/chunks/app/api/auth/refresh/route-4bc556c2fc8f3d24.js +1 -0
  395. package/.next/standalone/.next/static/chunks/app/api/auth/session/route-4bc556c2fc8f3d24.js +1 -0
  396. package/.next/standalone/.next/static/chunks/app/api/auth/sync-token/route-4bc556c2fc8f3d24.js +1 -0
  397. package/.next/standalone/.next/static/chunks/app/api/comments/route-4bc556c2fc8f3d24.js +1 -0
  398. package/.next/standalone/.next/static/chunks/app/api/daemon/control/route-4bc556c2fc8f3d24.js +1 -0
  399. package/.next/standalone/.next/static/chunks/app/api/daemon/execution-state/route-4bc556c2fc8f3d24.js +1 -0
  400. package/.next/standalone/.next/static/chunks/app/api/daemon/executions/route-4bc556c2fc8f3d24.js +1 -0
  401. package/.next/standalone/.next/static/chunks/app/api/daemon/pending-turns/route-4bc556c2fc8f3d24.js +1 -0
  402. package/.next/standalone/.next/static/chunks/app/api/daemon/report-interrupt/route-4bc556c2fc8f3d24.js +1 -0
  403. package/.next/standalone/.next/static/chunks/app/api/daemon/resume/route-4bc556c2fc8f3d24.js +1 -0
  404. package/.next/standalone/.next/static/chunks/app/api/daemon/transcript/route-4bc556c2fc8f3d24.js +1 -0
  405. package/.next/standalone/.next/static/chunks/app/api/daemon/turn-advance/route-4bc556c2fc8f3d24.js +1 -0
  406. package/.next/standalone/.next/static/chunks/app/api/daemon-sessions/[sessionUuid]/instruction/route-4bc556c2fc8f3d24.js +1 -0
  407. package/.next/standalone/.next/static/chunks/app/api/daemon-sessions/[sessionUuid]/route-4bc556c2fc8f3d24.js +1 -0
  408. package/.next/standalone/.next/static/chunks/app/api/daemon-sessions/ad-hoc/route-4bc556c2fc8f3d24.js +1 -0
  409. package/.next/standalone/.next/static/chunks/app/api/daemon-sessions/route-4bc556c2fc8f3d24.js +1 -0
  410. package/.next/standalone/.next/static/chunks/app/api/documents/[uuid]/route-4bc556c2fc8f3d24.js +1 -0
  411. package/.next/standalone/.next/static/chunks/app/api/entities/[type]/[uuid]/root-idea/route-4bc556c2fc8f3d24.js +1 -0
  412. package/.next/standalone/.next/static/chunks/app/api/events/notifications/route-4bc556c2fc8f3d24.js +1 -0
  413. package/.next/standalone/.next/static/chunks/app/api/events/route-4bc556c2fc8f3d24.js +1 -0
  414. package/.next/standalone/.next/static/chunks/app/api/health/route-4bc556c2fc8f3d24.js +1 -0
  415. package/.next/standalone/.next/static/chunks/app/api/ideas/[uuid]/claim/route-4bc556c2fc8f3d24.js +1 -0
  416. package/.next/standalone/.next/static/chunks/app/api/ideas/[uuid]/move/preview/route-4bc556c2fc8f3d24.js +1 -0
  417. package/.next/standalone/.next/static/chunks/app/api/ideas/[uuid]/move/route-4bc556c2fc8f3d24.js +1 -0
  418. package/.next/standalone/.next/static/chunks/app/api/ideas/[uuid]/parent/route-4bc556c2fc8f3d24.js +1 -0
  419. package/.next/standalone/.next/static/chunks/app/api/ideas/[uuid]/release/route-4bc556c2fc8f3d24.js +1 -0
  420. package/.next/standalone/.next/static/chunks/app/api/ideas/[uuid]/route-4bc556c2fc8f3d24.js +1 -0
  421. package/.next/standalone/.next/static/chunks/app/api/mcp/route-4bc556c2fc8f3d24.js +1 -0
  422. package/.next/standalone/.next/static/chunks/app/api/me/assignments/route-4bc556c2fc8f3d24.js +1 -0
  423. package/.next/standalone/.next/static/chunks/app/api/mentionables/route-4bc556c2fc8f3d24.js +1 -0
  424. package/.next/standalone/.next/static/chunks/app/api/notifications/[uuid]/archive/route-4bc556c2fc8f3d24.js +1 -0
  425. package/.next/standalone/.next/static/chunks/app/api/notifications/[uuid]/read/route-4bc556c2fc8f3d24.js +1 -0
  426. package/.next/standalone/.next/static/chunks/app/api/notifications/preferences/route-4bc556c2fc8f3d24.js +1 -0
  427. package/.next/standalone/.next/static/chunks/app/api/notifications/read-all/route-4bc556c2fc8f3d24.js +1 -0
  428. package/.next/standalone/.next/static/chunks/app/api/notifications/route-4bc556c2fc8f3d24.js +1 -0
  429. package/.next/standalone/.next/static/chunks/app/api/notifications/unread-count/route-4bc556c2fc8f3d24.js +1 -0
  430. package/.next/standalone/.next/static/chunks/app/api/project-groups/[uuid]/dashboard/route-4bc556c2fc8f3d24.js +1 -0
  431. package/.next/standalone/.next/static/chunks/app/api/project-groups/[uuid]/route-4bc556c2fc8f3d24.js +1 -0
  432. package/.next/standalone/.next/static/chunks/app/api/project-groups/route-4bc556c2fc8f3d24.js +1 -0
  433. package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/activity/route-4bc556c2fc8f3d24.js +1 -0
  434. package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/available/route-4bc556c2fc8f3d24.js +1 -0
  435. package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/documents/route-4bc556c2fc8f3d24.js +1 -0
  436. package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/group/route-4bc556c2fc8f3d24.js +1 -0
  437. package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/ideas/route-4bc556c2fc8f3d24.js +1 -0
  438. package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/ideas/tracker/route-4bc556c2fc8f3d24.js +1 -0
  439. package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/proposals/[proposalUuid]/validate/route-4bc556c2fc8f3d24.js +1 -0
  440. package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/proposals/route-4bc556c2fc8f3d24.js +1 -0
  441. package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/proposals/summary/route-4bc556c2fc8f3d24.js +1 -0
  442. package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/route-4bc556c2fc8f3d24.js +1 -0
  443. package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/stats/route-4bc556c2fc8f3d24.js +1 -0
  444. package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/tasks/dependencies/route-4bc556c2fc8f3d24.js +1 -0
  445. package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/tasks/route-4bc556c2fc8f3d24.js +1 -0
  446. package/.next/standalone/.next/static/chunks/app/api/projects/route-4bc556c2fc8f3d24.js +1 -0
  447. package/.next/standalone/.next/static/chunks/app/api/proposals/[uuid]/approve/route-4bc556c2fc8f3d24.js +1 -0
  448. package/.next/standalone/.next/static/chunks/app/api/proposals/[uuid]/close/route-4bc556c2fc8f3d24.js +1 -0
  449. package/.next/standalone/.next/static/chunks/app/api/proposals/[uuid]/reject/route-4bc556c2fc8f3d24.js +1 -0
  450. package/.next/standalone/.next/static/chunks/app/api/proposals/[uuid]/revoke/route-4bc556c2fc8f3d24.js +1 -0
  451. package/.next/standalone/.next/static/chunks/app/api/proposals/[uuid]/route-4bc556c2fc8f3d24.js +1 -0
  452. package/.next/standalone/.next/static/chunks/app/api/search/route-4bc556c2fc8f3d24.js +1 -0
  453. package/.next/standalone/.next/static/chunks/app/api/sessions/[uuid]/route-4bc556c2fc8f3d24.js +1 -0
  454. package/.next/standalone/.next/static/chunks/app/api/tasks/[uuid]/claim/route-4bc556c2fc8f3d24.js +1 -0
  455. package/.next/standalone/.next/static/chunks/app/api/tasks/[uuid]/dependencies/[dependsOnUuid]/route-4bc556c2fc8f3d24.js +1 -0
  456. package/.next/standalone/.next/static/chunks/app/api/tasks/[uuid]/dependencies/route-4bc556c2fc8f3d24.js +1 -0
  457. package/.next/standalone/.next/static/chunks/app/api/tasks/[uuid]/release/route-4bc556c2fc8f3d24.js +1 -0
  458. package/.next/standalone/.next/static/chunks/app/api/tasks/[uuid]/route-4bc556c2fc8f3d24.js +1 -0
  459. package/.next/standalone/.next/static/chunks/app/api/tasks/[uuid]/sessions/route-4bc556c2fc8f3d24.js +1 -0
  460. package/.next/standalone/.next/static/chunks/app/layout-9963339572e2e64e.js +1 -0
  461. package/.next/standalone/.next/static/chunks/app/onboarding/page-e9a69a0c537c704f.js +1 -0
  462. package/.next/standalone/.next/static/chunks/{webpack-5bb5740df10ed622.js → webpack-87284a4533d77eaf.js} +1 -1
  463. package/.next/standalone/.next/static/css/{84edd78de243cde6.css → b496025c9cd768cc.css} +1 -1
  464. package/.next/standalone/.next/static/css/e78b3c856420a09f.css +1 -0
  465. package/.next/standalone/.next/static/media/013b72fa676f92e0-s.woff2 +0 -0
  466. package/.next/standalone/.next/static/media/2b5b02fc7e511755-s.woff2 +0 -0
  467. package/.next/standalone/.next/static/media/65f03d54ccadf4a8-s.woff2 +0 -0
  468. package/.next/standalone/.next/static/media/7d4881bb7e1bf84d-s.p.woff2 +0 -0
  469. package/.next/standalone/.next/static/media/b9408752a0c24fb9-s.woff2 +0 -0
  470. package/.next/standalone/.next/static/media/e038a29029a234f2-s.woff2 +0 -0
  471. package/.next/standalone/package.json +3 -1
  472. package/.next/standalone/public/chorus-plugin/.claude-plugin/plugin.json +1 -1
  473. package/.next/standalone/public/chorus-plugin/skills/brainstorm/SKILL.md +1 -1
  474. package/.next/standalone/public/chorus-plugin/skills/chorus/SKILL.md +1 -1
  475. package/.next/standalone/public/chorus-plugin/skills/develop/SKILL.md +1 -1
  476. package/.next/standalone/public/chorus-plugin/skills/idea/SKILL.md +2 -1
  477. package/.next/standalone/public/chorus-plugin/skills/openspec-aware/SKILL.md +1 -1
  478. package/.next/standalone/public/chorus-plugin/skills/proposal/SKILL.md +1 -1
  479. package/.next/standalone/public/chorus-plugin/skills/quick-dev/SKILL.md +1 -1
  480. package/.next/standalone/public/chorus-plugin/skills/review/SKILL.md +1 -1
  481. package/.next/standalone/public/chorus-plugin/skills/yolo/SKILL.md +1 -1
  482. package/.next/standalone/public/skill/brainstorm-chorus/SKILL.md +1 -1
  483. package/.next/standalone/public/skill/chorus/SKILL.md +1 -1
  484. package/.next/standalone/public/skill/develop-chorus/SKILL.md +1 -1
  485. package/.next/standalone/public/skill/idea-chorus/SKILL.md +2 -1
  486. package/.next/standalone/public/skill/package.json +1 -1
  487. package/.next/standalone/public/skill/proposal-chorus/SKILL.md +1 -1
  488. package/.next/standalone/public/skill/proposal-reviewer-chorus/SKILL.md +1 -1
  489. package/.next/standalone/public/skill/quick-dev-chorus/SKILL.md +1 -1
  490. package/.next/standalone/public/skill/review-chorus/SKILL.md +1 -1
  491. package/.next/standalone/public/skill/task-reviewer-chorus/SKILL.md +1 -1
  492. package/.next/standalone/public/skill/yolo-chorus/SKILL.md +1 -1
  493. package/README.md +27 -0
  494. package/README.zh.md +27 -0
  495. package/chorus.mjs +120 -16
  496. package/cli/backfill.mjs +190 -0
  497. package/cli/chorus-client.mjs +154 -0
  498. package/cli/claude-spawner.mjs +415 -0
  499. package/cli/client-args.mjs +146 -0
  500. package/cli/control-handler.mjs +180 -0
  501. package/cli/credentials.mjs +155 -0
  502. package/cli/daemon-agent.mjs +38 -0
  503. package/cli/daemon-banner.mjs +80 -0
  504. package/cli/daemon-config.mjs +84 -0
  505. package/cli/daemon-lifecycle.mjs +191 -0
  506. package/cli/daemon-permission-mode.mjs +68 -0
  507. package/cli/daemon-rest-client.mjs +272 -0
  508. package/cli/daemon.mjs +572 -0
  509. package/cli/event-router.mjs +248 -0
  510. package/cli/interrupt-reporter.mjs +87 -0
  511. package/cli/lineage.mjs +155 -0
  512. package/cli/login.mjs +151 -0
  513. package/cli/mcp-config.mjs +58 -0
  514. package/cli/process-killer.mjs +205 -0
  515. package/cli/prompts.mjs +273 -0
  516. package/cli/sse-listener.mjs +258 -0
  517. package/cli/turn-reporter.mjs +75 -0
  518. package/cli/upload-hooks.mjs +400 -0
  519. package/cli/wake-queue.mjs +121 -0
  520. package/cli/waker.mjs +475 -0
  521. package/package.json +3 -1
  522. package/prisma/migrations/20260615082309_add_daemon_connection/migration.sql +37 -0
  523. package/prisma/migrations/20260616152622_add_daemon_task_execution/migration.sql +28 -0
  524. package/prisma/migrations/20260617013334_generalize_daemon_execution_to_any_resource/migration.sql +38 -0
  525. package/prisma/migrations/20260618022828_add_daemon_execution_interrupted/migration.sql +2 -0
  526. package/prisma/migrations/20260619055322_daemon_session_conversation/migration.sql +77 -0
  527. package/prisma/schema.prisma +366 -188
  528. package/.next/standalone/.next/server/chunks/1059.js +0 -1
  529. package/.next/standalone/.next/server/chunks/1165.js +0 -1
  530. package/.next/standalone/.next/server/chunks/1615.js +0 -31
  531. package/.next/standalone/.next/server/chunks/162.js +0 -16
  532. package/.next/standalone/.next/server/chunks/179.js +0 -158
  533. package/.next/standalone/.next/server/chunks/1871.js +0 -1
  534. package/.next/standalone/.next/server/chunks/2909.js +0 -98
  535. package/.next/standalone/.next/server/chunks/324.js +0 -1
  536. package/.next/standalone/.next/server/chunks/3555.js +0 -1
  537. package/.next/standalone/.next/server/chunks/4090.js +0 -13
  538. package/.next/standalone/.next/server/chunks/4343.js +0 -1
  539. package/.next/standalone/.next/server/chunks/4879.js +0 -1
  540. package/.next/standalone/.next/server/chunks/4913.js +0 -1
  541. package/.next/standalone/.next/server/chunks/5541.js +0 -1
  542. package/.next/standalone/.next/server/chunks/5561.js +0 -7
  543. package/.next/standalone/.next/server/chunks/6643.js +0 -1
  544. package/.next/standalone/.next/server/chunks/6767.js +0 -1
  545. package/.next/standalone/.next/server/chunks/7228.js +0 -2
  546. package/.next/standalone/.next/server/chunks/7462.js +0 -255
  547. package/.next/standalone/.next/server/chunks/7859.js +0 -1
  548. package/.next/standalone/.next/server/chunks/8277.js +0 -1
  549. package/.next/standalone/.next/server/chunks/8637.js +0 -1
  550. package/.next/standalone/.next/server/chunks/896.js +0 -1
  551. package/.next/standalone/.next/server/chunks/9269.js +0 -1
  552. package/.next/standalone/.next/server/chunks/9615.js +0 -1
  553. package/.next/standalone/.next/static/AKJHlhCKd44_-khht8nN0/_buildManifest.js +0 -1
  554. package/.next/standalone/.next/static/chunks/20051-c242544dafd3a690.js +0 -1
  555. package/.next/standalone/.next/static/chunks/21932-bce5ba937d1603e1.js +0 -1
  556. package/.next/standalone/.next/static/chunks/23095-5bf481236249fdd8.js +0 -1
  557. package/.next/standalone/.next/static/chunks/23466-842c126491b753bc.js +0 -1
  558. package/.next/standalone/.next/static/chunks/45436-c5427023f3f386a1.js +0 -1
  559. package/.next/standalone/.next/static/chunks/49852-5337f139a2f87c46.js +0 -1
  560. package/.next/standalone/.next/static/chunks/52206-7c1b0c695c8035eb.js +0 -1
  561. package/.next/standalone/.next/static/chunks/55469-ed5ff019ff71ef59.js +0 -1
  562. package/.next/standalone/.next/static/chunks/59296-50e66102d44d9677.js +0 -1
  563. package/.next/standalone/.next/static/chunks/60524-9811b38c62fed16e.js +0 -1
  564. package/.next/standalone/.next/static/chunks/68855-5c15991e7cf8dc8a.js +0 -1
  565. package/.next/standalone/.next/static/chunks/70093-0ff6fd59445b5cb9.js +0 -1
  566. package/.next/standalone/.next/static/chunks/74030-3a6a6b75e47f5b96.js +0 -1
  567. package/.next/standalone/.next/static/chunks/78917-ff0fda86a96cfa60.js +0 -1
  568. package/.next/standalone/.next/static/chunks/95627-8d9f6d2d88f7a641.js +0 -1
  569. package/.next/standalone/.next/static/chunks/app/(dashboard)/layout-5915ccd1a77ebcf8.js +0 -1
  570. package/.next/standalone/.next/static/chunks/app/(dashboard)/project-groups/[uuid]/page-94d102d945410b55.js +0 -1
  571. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/dashboard/[ideaUuid]/page-cd9411c54c8f5b35.js +0 -1
  572. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/dashboard/page-56c45b910f914895.js +0 -1
  573. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/documents/[documentUuid]/page-2e000a7010d1e9ea.js +0 -1
  574. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/documents/page-75e42d130404ca2b.js +0 -1
  575. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/proposals/[proposalUuid]/page-d7747749ae6192d8.js +0 -1
  576. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/proposals/new/page-26488809d26e1daa.js +0 -1
  577. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/proposals/page-8f91ed174c14d5f0.js +0 -1
  578. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/tasks/[taskUuid]/page-fcc9baa42e6de4d4.js +0 -1
  579. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/tasks/page-5233748464280e9d.js +0 -1
  580. package/.next/standalone/.next/static/chunks/app/(dashboard)/settings/page-ab87cbb18d0ee538.js +0 -1
  581. package/.next/standalone/.next/static/chunks/app/api/admin/companies/[uuid]/route-cd9411c54c8f5b35.js +0 -1
  582. package/.next/standalone/.next/static/chunks/app/api/admin/companies/route-cd9411c54c8f5b35.js +0 -1
  583. package/.next/standalone/.next/static/chunks/app/api/admin/login/route-cd9411c54c8f5b35.js +0 -1
  584. package/.next/standalone/.next/static/chunks/app/api/admin/session/route-cd9411c54c8f5b35.js +0 -1
  585. package/.next/standalone/.next/static/chunks/app/api/agents/[uuid]/route-cd9411c54c8f5b35.js +0 -1
  586. package/.next/standalone/.next/static/chunks/app/api/agents/[uuid]/sessions/route-cd9411c54c8f5b35.js +0 -1
  587. package/.next/standalone/.next/static/chunks/app/api/agents/route-cd9411c54c8f5b35.js +0 -1
  588. package/.next/standalone/.next/static/chunks/app/api/api-keys/[uuid]/route-cd9411c54c8f5b35.js +0 -1
  589. package/.next/standalone/.next/static/chunks/app/api/api-keys/route-cd9411c54c8f5b35.js +0 -1
  590. package/.next/standalone/.next/static/chunks/app/api/auth/callback/route-cd9411c54c8f5b35.js +0 -1
  591. package/.next/standalone/.next/static/chunks/app/api/auth/check-default/route-cd9411c54c8f5b35.js +0 -1
  592. package/.next/standalone/.next/static/chunks/app/api/auth/company-oidc/route-cd9411c54c8f5b35.js +0 -1
  593. package/.next/standalone/.next/static/chunks/app/api/auth/default-login/route-cd9411c54c8f5b35.js +0 -1
  594. package/.next/standalone/.next/static/chunks/app/api/auth/identify/route-cd9411c54c8f5b35.js +0 -1
  595. package/.next/standalone/.next/static/chunks/app/api/auth/logout/route-cd9411c54c8f5b35.js +0 -1
  596. package/.next/standalone/.next/static/chunks/app/api/auth/me/route-cd9411c54c8f5b35.js +0 -1
  597. package/.next/standalone/.next/static/chunks/app/api/auth/refresh/route-cd9411c54c8f5b35.js +0 -1
  598. package/.next/standalone/.next/static/chunks/app/api/auth/session/route-cd9411c54c8f5b35.js +0 -1
  599. package/.next/standalone/.next/static/chunks/app/api/auth/sync-token/route-cd9411c54c8f5b35.js +0 -1
  600. package/.next/standalone/.next/static/chunks/app/api/comments/route-cd9411c54c8f5b35.js +0 -1
  601. package/.next/standalone/.next/static/chunks/app/api/documents/[uuid]/route-cd9411c54c8f5b35.js +0 -1
  602. package/.next/standalone/.next/static/chunks/app/api/events/notifications/route-cd9411c54c8f5b35.js +0 -1
  603. package/.next/standalone/.next/static/chunks/app/api/events/route-cd9411c54c8f5b35.js +0 -1
  604. package/.next/standalone/.next/static/chunks/app/api/health/route-cd9411c54c8f5b35.js +0 -1
  605. package/.next/standalone/.next/static/chunks/app/api/ideas/[uuid]/claim/route-cd9411c54c8f5b35.js +0 -1
  606. package/.next/standalone/.next/static/chunks/app/api/ideas/[uuid]/move/preview/route-cd9411c54c8f5b35.js +0 -1
  607. package/.next/standalone/.next/static/chunks/app/api/ideas/[uuid]/move/route-cd9411c54c8f5b35.js +0 -1
  608. package/.next/standalone/.next/static/chunks/app/api/ideas/[uuid]/parent/route-cd9411c54c8f5b35.js +0 -1
  609. package/.next/standalone/.next/static/chunks/app/api/ideas/[uuid]/release/route-cd9411c54c8f5b35.js +0 -1
  610. package/.next/standalone/.next/static/chunks/app/api/ideas/[uuid]/route-cd9411c54c8f5b35.js +0 -1
  611. package/.next/standalone/.next/static/chunks/app/api/mcp/route-cd9411c54c8f5b35.js +0 -1
  612. package/.next/standalone/.next/static/chunks/app/api/me/assignments/route-cd9411c54c8f5b35.js +0 -1
  613. package/.next/standalone/.next/static/chunks/app/api/mentionables/route-cd9411c54c8f5b35.js +0 -1
  614. package/.next/standalone/.next/static/chunks/app/api/notifications/[uuid]/archive/route-cd9411c54c8f5b35.js +0 -1
  615. package/.next/standalone/.next/static/chunks/app/api/notifications/[uuid]/read/route-cd9411c54c8f5b35.js +0 -1
  616. package/.next/standalone/.next/static/chunks/app/api/notifications/preferences/route-cd9411c54c8f5b35.js +0 -1
  617. package/.next/standalone/.next/static/chunks/app/api/notifications/read-all/route-cd9411c54c8f5b35.js +0 -1
  618. package/.next/standalone/.next/static/chunks/app/api/notifications/route-cd9411c54c8f5b35.js +0 -1
  619. package/.next/standalone/.next/static/chunks/app/api/notifications/unread-count/route-cd9411c54c8f5b35.js +0 -1
  620. package/.next/standalone/.next/static/chunks/app/api/project-groups/[uuid]/dashboard/route-cd9411c54c8f5b35.js +0 -1
  621. package/.next/standalone/.next/static/chunks/app/api/project-groups/[uuid]/route-cd9411c54c8f5b35.js +0 -1
  622. package/.next/standalone/.next/static/chunks/app/api/project-groups/route-cd9411c54c8f5b35.js +0 -1
  623. package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/activity/route-cd9411c54c8f5b35.js +0 -1
  624. package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/available/route-cd9411c54c8f5b35.js +0 -1
  625. package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/documents/route-cd9411c54c8f5b35.js +0 -1
  626. package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/group/route-cd9411c54c8f5b35.js +0 -1
  627. package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/ideas/route-cd9411c54c8f5b35.js +0 -1
  628. package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/ideas/tracker/route-cd9411c54c8f5b35.js +0 -1
  629. package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/proposals/[proposalUuid]/validate/route-cd9411c54c8f5b35.js +0 -1
  630. package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/proposals/route-cd9411c54c8f5b35.js +0 -1
  631. package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/proposals/summary/route-cd9411c54c8f5b35.js +0 -1
  632. package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/route-cd9411c54c8f5b35.js +0 -1
  633. package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/stats/route-cd9411c54c8f5b35.js +0 -1
  634. package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/tasks/dependencies/route-cd9411c54c8f5b35.js +0 -1
  635. package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/tasks/route-cd9411c54c8f5b35.js +0 -1
  636. package/.next/standalone/.next/static/chunks/app/api/projects/route-cd9411c54c8f5b35.js +0 -1
  637. package/.next/standalone/.next/static/chunks/app/api/proposals/[uuid]/approve/route-cd9411c54c8f5b35.js +0 -1
  638. package/.next/standalone/.next/static/chunks/app/api/proposals/[uuid]/close/route-cd9411c54c8f5b35.js +0 -1
  639. package/.next/standalone/.next/static/chunks/app/api/proposals/[uuid]/reject/route-cd9411c54c8f5b35.js +0 -1
  640. package/.next/standalone/.next/static/chunks/app/api/proposals/[uuid]/revoke/route-cd9411c54c8f5b35.js +0 -1
  641. package/.next/standalone/.next/static/chunks/app/api/proposals/[uuid]/route-cd9411c54c8f5b35.js +0 -1
  642. package/.next/standalone/.next/static/chunks/app/api/search/route-cd9411c54c8f5b35.js +0 -1
  643. package/.next/standalone/.next/static/chunks/app/api/sessions/[uuid]/route-cd9411c54c8f5b35.js +0 -1
  644. package/.next/standalone/.next/static/chunks/app/api/tasks/[uuid]/claim/route-cd9411c54c8f5b35.js +0 -1
  645. package/.next/standalone/.next/static/chunks/app/api/tasks/[uuid]/dependencies/[dependsOnUuid]/route-cd9411c54c8f5b35.js +0 -1
  646. package/.next/standalone/.next/static/chunks/app/api/tasks/[uuid]/dependencies/route-cd9411c54c8f5b35.js +0 -1
  647. package/.next/standalone/.next/static/chunks/app/api/tasks/[uuid]/release/route-cd9411c54c8f5b35.js +0 -1
  648. package/.next/standalone/.next/static/chunks/app/api/tasks/[uuid]/route-cd9411c54c8f5b35.js +0 -1
  649. package/.next/standalone/.next/static/chunks/app/api/tasks/[uuid]/sessions/route-cd9411c54c8f5b35.js +0 -1
  650. package/.next/standalone/.next/static/chunks/app/layout-482dee7dace72c88.js +0 -1
  651. package/.next/standalone/.next/static/chunks/app/onboarding/page-d9dbd817391b462b.js +0 -1
  652. package/.next/standalone/.next/static/css/4279f38594ac772a.css +0 -1
  653. package/.next/standalone/.next/static/media/0f1bdadaf30e2d5f-s.woff2 +0 -0
  654. package/.next/standalone/.next/static/media/2c34d62a75506231-s.woff2 +0 -0
  655. package/.next/standalone/.next/static/media/601f5c280d60caca-s.woff2 +0 -0
  656. package/.next/standalone/.next/static/media/a115172161b307bb-s.woff2 +0 -0
  657. package/.next/standalone/.next/static/media/d100b2a099e34044-s.woff2 +0 -0
  658. package/.next/standalone/.next/static/media/f5271587012faf78-s.p.woff2 +0 -0
  659. /package/.next/standalone/.next/static/{AKJHlhCKd44_-khht8nN0 → 519aK55QLHaVN7b1TVDkB}/_ssgManifest.js +0 -0
@@ -1 +0,0 @@
1
- "use strict";exports.id=6643,exports.ids=[6643],exports.modules={8777:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{Cs:()=>o,Nn:()=>s,YE:()=>n,lC:()=>l,lU:()=>r,ui:()=>p,yZ:()=>m});var e=c(52618),f=c(76872),g=c(42558),h=c(88437),i=c(65582),j=a([e,f,h]);[e,f,h]=j.then?(await j)():j;let t=i.A.child({module:"document.service"});async function k(a,b=!1){let c=await (0,f.LS)(a.createdByUuid),d={uuid:a.uuid,type:a.type,title:a.title,version:a.version,proposalUuid:a.proposalUuid,createdBy:c,createdAt:a.createdAt.toISOString(),updatedAt:a.updatedAt.toISOString()};return b&&void 0!==a.content&&(d.content=a.content),a.project&&(d.project=a.project),d}async function l({companyUuid:a,projectUuid:b,skip:c,take:d,type:f}){let g={projectUuid:b,companyUuid:a,...f&&{type:f}},[h,i]=await Promise.all([e.z.document.findMany({where:g,skip:c,take:d,orderBy:{updatedAt:"desc"},select:{uuid:!0,type:!0,title:!0,version:!0,proposalUuid:!0,createdByUuid:!0,createdAt:!0,updatedAt:!0}}),e.z.document.count({where:g})]);return{documents:await Promise.all(h.map(a=>k(a))),total:i}}async function m(a,b,c){if(0===b.length)return[];let d={companyUuid:a,proposalUuid:{in:b},...c&&{type:c}},f=await e.z.document.findMany({where:d,orderBy:{createdAt:"desc"},select:{uuid:!0,type:!0,title:!0,content:!0,version:!0,proposalUuid:!0,createdByUuid:!0,createdAt:!0,updatedAt:!0}});return Promise.all(f.map(a=>k(a,!0)))}async function n(a,b){let c=await e.z.document.findFirst({where:{uuid:b,companyUuid:a},include:{project:{select:{uuid:!0,name:!0}}}});return c?k(c,!0):null}async function o(a,b){return e.z.document.findFirst({where:{uuid:b,companyUuid:a}})}async function p(a){let b=await e.z.document.create({data:{companyUuid:a.companyUuid,projectUuid:a.projectUuid,type:a.type,title:a.title,content:a.content,version:1,proposalUuid:a.proposalUuid,createdByUuid:a.createdByUuid},select:{uuid:!0,type:!0,title:!0,content:!0,version:!0,proposalUuid:!0,createdByUuid:!0,createdAt:!0,updatedAt:!0}});return"report"===a.type&&await q(a,b.uuid),k(b,!0)}async function q(a,b){try{g.B.emitChange({companyUuid:a.companyUuid,projectUuid:a.projectUuid,entityType:"document",entityUuid:b,action:"created",actorUuid:a.createdByUuid})}catch(c){t.warn({err:c,reportUuid:b,proposalUuid:a.proposalUuid},"Failed to emit document/created event for report")}if(!a.proposalUuid)return;let c=null;try{let b=await e.z.proposal.findFirst({where:{uuid:a.proposalUuid,companyUuid:a.companyUuid},select:{inputType:!0,inputUuids:!0}});if(b&&"idea"===b.inputType&&Array.isArray(b.inputUuids)){let a=b.inputUuids[0];"string"==typeof a&&a.length>0&&(c=a)}}catch(c){t.warn({err:c,reportUuid:b,proposalUuid:a.proposalUuid},"Failed to resolve parent Idea for report side effects");return}if(c){try{g.B.emitChange({companyUuid:a.companyUuid,projectUuid:a.projectUuid,entityType:"idea",entityUuid:c,action:"updated",actorUuid:a.createdByUuid})}catch(d){t.warn({err:d,reportUuid:b,ideaUuid:c,proposalUuid:a.proposalUuid},"Failed to emit idea/updated event for report")}try{let d=await (0,f.LS)(a.createdByUuid),e=d?.type??"agent";await h.createActivity({companyUuid:a.companyUuid,projectUuid:a.projectUuid,targetType:"idea",targetUuid:c,actorType:e,actorUuid:a.createdByUuid,action:"report_created",value:{reportUuid:b,proposalUuid:a.proposalUuid,reportTitle:a.title}})}catch(d){t.warn({err:d,reportUuid:b,ideaUuid:c,proposalUuid:a.proposalUuid},"Failed to record report_created Activity")}}}async function r(a,{title:b,content:c,incrementVersion:d}){let f={};void 0!==b&&(f.title=b),void 0!==c&&(f.content=c),d&&(f.version={increment:1});let g=await e.z.document.update({where:{uuid:a},data:f,include:{project:{select:{uuid:!0,name:!0}}}});return k(g,!0)}async function s(a){return e.z.document.delete({where:{uuid:a}})}d()}catch(a){d(a)}})},27473:(a,b,c)=>{c.d(b,{hD:()=>h,OG:()=>k,YB:()=>m,mA:()=>l,FB:()=>j});var d=c(70936),e=c(7046),f=c(65582);let g=new(c(16698)).AsyncLocalStorage;class h extends Error{constructor(a,b,c=400,d){super(b),this.code=a,this.status=c,this.details=d,this.name="ApiError"}}let i={P2002:"Unique constraint violation",P2025:"Record not found",P2003:"Foreign key constraint violation"};function j(a){return async(b,c)=>{let j=crypto.randomUUID(),k=(0,f.q)({requestId:j});return g.run({requestId:j,logger:k},async()=>{try{return await a(b,c)}catch(a){if((g.getStore()?.logger??f.A).error({err:a},"API error"),a instanceof h)return d.NextResponse.json({success:!1,error:{code:a.code,message:a.message,details:a.details}},{status:a.status});if(a&&"object"==typeof a&&"code"in a){let b=i[a.code];if(b){if("P2025"===a.code)return e.sO.notFound();if("P2002"===a.code)return e.sO.conflict(b);return e.sO.database(b)}}if(a instanceof Error)return e.sO.internal("Internal server error");return e.sO.internal()}})}}async function k(a){try{return await a.json()}catch{throw new h("BAD_REQUEST","Invalid JSON body",400)}}function l(a){let b=new URL(a.url),c={};return b.searchParams.forEach((a,b)=>{c[b]=a}),c}function m(a){let b=l(a),c=Math.max(1,parseInt(b.page||"1",10)),d=Math.min(100,Math.max(1,parseInt(b.pageSize||"20",10)));return{page:c,pageSize:d,skip:(c-1)*d,take:d}}},66643:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{BB:()=>s,EZ:()=>z,JF:()=>x,MY:()=>v,Nm:()=>D,Q7:()=>u,XB:()=>I,bO:()=>q,bY:()=>E,h_:()=>B,i1:()=>w,jJ:()=>F,w9:()=>A,xo:()=>G});var e=c(52618),f=c(76872),g=c(42558),h=c(48873),i=c(27473),j=c(90494),k=c(88437),l=c(8777),m=c(57578),n=c(65582),o=a([e,f,j,k,l,m]);[e,f,j,k,l,m]=o.then?(await o)():o;let J={open:["elaborating"],elaborating:["elaborated"],elaborated:[]};function p(a){switch(a){case"assigned":case"in_progress":return"elaborating";case"proposal_created":case"completed":case"closed":case"pending_review":return"elaborated";default:return a}}function q(a,b){return(J[p(a)]||[]).includes(b)}async function r(a){let[b,c]=await Promise.all([(0,f.ir)(a.assigneeType,a.assigneeUuid,a.assignedAt,a.assignedByUuid),(0,f.LS)(a.createdByUuid)]);return{uuid:a.uuid,title:a.title,content:a.content,attachments:a.attachments,status:p(a.status),assignee:b,...a.project&&{project:a.project},...null!=a.elaborationStatus&&{elaborationStatus:a.elaborationStatus},...null!=a.elaborationDepth&&{elaborationDepth:a.elaborationDepth},createdBy:c,createdAt:a.createdAt.toISOString(),updatedAt:a.updatedAt.toISOString()}}async function s({companyUuid:a,projectUuid:b,skip:c,take:d,status:f,assignedToMe:g,actorUuid:h,actorType:i}){let j={projectUuid:b,companyUuid:a,...f&&{status:f}};g&&h&&i&&(j.assigneeUuid=h,j.assigneeType=i);let[k,l]=await Promise.all([e.z.idea.findMany({where:j,skip:c,take:d,orderBy:{createdAt:"desc"},select:{uuid:!0,title:!0,content:!0,attachments:!0,status:!0,elaborationStatus:!0,elaborationDepth:!0,assigneeType:!0,assigneeUuid:!0,assignedAt:!0,assignedByUuid:!0,parentUuid:!0,createdByUuid:!0,createdAt:!0,updatedAt:!0}}),e.z.idea.count({where:j})]),m=await Promise.all(k.map(r));if(k.forEach((a,b)=>{m[b].parentUuid=a.parentUuid??null}),m.length>0){let c=await t(a,b,m.map(a=>a.uuid));for(let a of m)a.reportCount=c.get(a.uuid)??0;let d=await e.z.idea.groupBy({by:["parentUuid"],where:{companyUuid:a,projectUuid:b,parentUuid:{not:null}},_count:{_all:!0}})??[],f=new Map;for(let a of d)a.parentUuid&&f.set(a.parentUuid,a._count._all);for(let a of m)a.childCount=f.get(a.uuid)??0}return{ideas:m,total:l}}let K=["approved","closed"];async function t(a,b,c){let d=new Map;if(0===c.length)return d;let f=await e.z.proposal.findMany({where:{projectUuid:b,companyUuid:a,status:{in:[...K]},inputType:"idea"},select:{uuid:!0,inputUuids:!0}});if(0===f.length)return d;let g=new Set(c),h=new Map;for(let a of f){if(!Array.isArray(a.inputUuids))continue;let b=a.inputUuids.filter(a=>g.has(a));b.length>0&&h.set(a.uuid,b)}if(0===h.size)return d;for(let b of(await e.z.document.groupBy({by:["proposalUuid"],where:{companyUuid:a,type:"report",proposalUuid:{in:Array.from(h.keys())}},_count:{_all:!0}}))){if(!b.proposalUuid)continue;let a=h.get(b.proposalUuid);if(a)for(let c of a)d.set(c,(d.get(c)??0)+b._count._all)}return d}async function u(a,b){let c=await e.z.idea.findFirst({where:{uuid:b,companyUuid:a},include:{project:{select:{uuid:!0,name:!0}},parent:{select:{uuid:!0,title:!0,status:!0}},children:{select:{uuid:!0,title:!0,status:!0,elaborationStatus:!0},orderBy:{createdAt:"asc"}}}});if(!c)return null;let d=await r(c);d.parentUuid=c.parentUuid??null,d.parent=c.parent?{uuid:c.parent.uuid,title:c.parent.title,status:p(c.parent.status)}:null;let f=c.children??[];if(f.length>0){let b=await H(a,c.projectUuid),e=new Map(b.map(a=>[a.uuid,a.derivedStatus]));d.children=f.map(a=>({uuid:a.uuid,title:a.title,status:p(a.status),derivedStatus:e.get(a.uuid)??"todo"}))}else d.children=[];d.descendantUuids=await y(b,a);let g=(await m.fS(a,c.projectUuid,b)).filter(a=>K.includes(a.status));return 0===g.length?d.reports=[]:d.reports=await l.yZ(a,g.map(a=>a.uuid),"report"),d}async function v(a,b){return e.z.idea.findFirst({where:{uuid:b,companyUuid:a}})}async function w(a){if(a.parentUuid){let b=await e.z.idea.findFirst({where:{uuid:a.parentUuid,companyUuid:a.companyUuid},select:{projectUuid:!0}});if(!b)throw Error("Parent idea not found");if(b.projectUuid!==a.projectUuid)throw Error("Parent idea must be in the same project")}let b=await e.z.idea.create({data:{companyUuid:a.companyUuid,projectUuid:a.projectUuid,title:a.title,content:a.content,attachments:a.attachments||void 0,status:"open",createdByUuid:a.createdByUuid,parentUuid:a.parentUuid??void 0},select:{uuid:!0,title:!0,content:!0,attachments:!0,status:!0,elaborationStatus:!0,elaborationDepth:!0,assigneeType:!0,assigneeUuid:!0,assignedAt:!0,assignedByUuid:!0,parentUuid:!0,createdByUuid:!0,createdAt:!0,updatedAt:!0}});g.B.emitChange({companyUuid:a.companyUuid,projectUuid:a.projectUuid,entityType:"idea",entityUuid:b.uuid,action:"created"});let c=await r(b);return c.parentUuid=b.parentUuid,c}async function x(a,b,c,d){let f=null;if(void 0!==c.content&&d){let b=await e.z.idea.findUnique({where:{uuid:a},select:{content:!0}});f=b?.content??null}let h=await e.z.idea.update({where:{uuid:a},data:c,include:{project:{select:{uuid:!0,name:!0}}}});if(g.B.emitChange({companyUuid:h.companyUuid,projectUuid:h.project.uuid,entityType:"idea",entityUuid:h.uuid,action:"updated"}),d){let a=["title","content"].filter(a=>void 0!==c[a]);a.length>0&&await k.createActivity({companyUuid:h.companyUuid,projectUuid:h.project.uuid,targetType:"idea",targetUuid:h.uuid,actorType:d.actorType,actorUuid:d.actorUuid,action:"edited",value:{changedFields:a}})}return void 0!==c.content&&d&&c.content&&C(h.companyUuid,h.project.uuid,h.uuid,h.title,f,c.content,d.actorType,d.actorUuid).catch(a=>n.A.error({err:a},"Failed to process idea mentions")),r(h)}async function y(a,b){let c=new Set,d=[a];for(;d.length>0;){let f=await e.z.idea.findMany({where:{companyUuid:b,parentUuid:{in:d}},select:{uuid:!0}})??[],g=[];for(let b of f)b.uuid!==a&&(c.has(b.uuid)||(c.add(b.uuid),g.push(b.uuid)));d=g}return[...c]}async function z(a,b,c,d){let f=await e.z.idea.findFirst({where:{uuid:a,companyUuid:c},select:{uuid:!0,projectUuid:!0,parentUuid:!0}});if(!f)throw Error("Idea not found");let h=f.parentUuid??null;if(b){if(b===a)throw Error("An idea cannot be its own parent");let d=await e.z.idea.findFirst({where:{uuid:b,companyUuid:c},select:{uuid:!0,projectUuid:!0,parentUuid:!0}});if(!d)throw Error("Parent idea not found");if(d.projectUuid!==f.projectUuid)throw Error("Parent idea must be in the same project");let g=new Set,h=d.parentUuid;for(;h;){if(h===a)throw Error("Cannot set parent: would create a cycle");if(g.has(h))break;g.add(h);let b=await e.z.idea.findFirst({where:{uuid:h,companyUuid:c},select:{parentUuid:!0}});h=b?.parentUuid??null}}let i=await e.z.idea.update({where:{uuid:a},data:{parentUuid:b??null},include:{project:{select:{uuid:!0,name:!0}}}});g.B.emitChange({companyUuid:i.companyUuid,projectUuid:i.projectUuid,entityType:"idea",entityUuid:i.uuid,action:"updated"});let j=i.parentUuid??null;d&&j!==h&&await k.createActivity({companyUuid:i.companyUuid,projectUuid:i.projectUuid,targetType:"idea",targetUuid:i.uuid,actorType:d.actorType,actorUuid:d.actorUuid,action:"reparented",value:{fromParentUuid:h,toParentUuid:j}});let l=await r(i);return l.parentUuid=i.parentUuid,l}async function A({ideaUuid:a,companyUuid:b,assigneeType:c,assigneeUuid:d,assignedByUuid:f}){let i=await e.z.idea.findFirst({where:{uuid:a,companyUuid:b}});if(!i||i.assigneeUuid)throw new h.Yy("Idea");let j=p(i.status);if("elaborated"===j)throw Error("Cannot claim an elaborated Idea");let k=await e.z.idea.update({where:{uuid:a},data:{status:"elaborating",assigneeType:c,assigneeUuid:d,assignedAt:new Date,assignedByUuid:f},include:{project:{select:{uuid:!0,name:!0}}}});return g.B.emitChange({companyUuid:k.companyUuid,projectUuid:k.project.uuid,entityType:"idea",entityUuid:k.uuid,action:"updated"}),r(k)}async function B(a){let b=await e.z.idea.findUnique({where:{uuid:a}});if(!b)throw Error("Idea not found");let c=p(b.status);if("elaborated"===c)throw Error("Cannot release an elaborated Idea");let d=await e.z.idea.update({where:{uuid:a},data:{status:"open",assigneeType:null,assigneeUuid:null,assignedAt:null,assignedByUuid:null,elaborationDepth:null,elaborationStatus:null},include:{project:{select:{uuid:!0,name:!0}}}});return g.B.emitChange({companyUuid:d.companyUuid,projectUuid:d.project.uuid,entityType:"idea",entityUuid:d.uuid,action:"updated"}),r(d)}async function C(a,b,c,d,e,f,g,h){let i=e?j.Xs(e):[],l=j.Xs(f),m=new Set(i.map(a=>`${a.type}:${a.uuid}`)),n=l.filter(a=>!m.has(`${a.type}:${a.uuid}`));if(0!==n.length)for(let e of(await j.AM({companyUuid:a,sourceType:"idea",sourceUuid:c,content:f,actorType:g,actorUuid:h,projectUuid:b,entityTitle:d}),n))(e.type!==g||e.uuid!==h)&&await k.createActivity({companyUuid:a,projectUuid:b,targetType:"idea",targetUuid:c,actorType:g,actorUuid:h,action:"mentioned",value:{mentionedType:e.type,mentionedUuid:e.uuid,mentionedName:e.displayName,sourceType:"idea",sourceUuid:c}})}async function D(a){let b=await e.z.idea.findUnique({where:{uuid:a},select:{companyUuid:!0}});b&&await e.z.idea.updateMany({where:{companyUuid:b.companyUuid,parentUuid:a},data:{parentUuid:null}});let c=await e.z.idea.delete({where:{uuid:a}});return g.B.emitChange({companyUuid:c.companyUuid,projectUuid:c.projectUuid,entityType:"idea",entityUuid:c.uuid,action:"deleted"}),c}async function E(a,b,c,d,f="user"){let h=await e.z.idea.findFirst({where:{uuid:b,companyUuid:a},include:{project:{select:{uuid:!0,name:!0}}}});if(!h)throw new i.hD("NOT_FOUND","Idea not found",404);let j=await e.z.project.findFirst({where:{uuid:c,companyUuid:a},select:{uuid:!0,name:!0}});if(!j)throw new i.hD("NOT_FOUND","Target project not found",404);if(h.projectUuid===c)throw new i.hD("BAD_REQUEST","Idea is already in the target project",400);let l=h.projectUuid,m=await y(b,a),n=[b,...m],o=await e.z.$transaction(async d=>{let e=(await d.proposal.findMany({where:{companyUuid:a,inputType:"idea",OR:n.map(a=>({inputUuids:{array_contains:[a]}}))},select:{uuid:!0}})).map(a=>a.uuid),f=(await d.idea.updateMany({where:{companyUuid:a,uuid:{in:n}},data:{projectUuid:c}})).count;h.parentUuid&&await d.idea.update({where:{uuid:b},data:{parentUuid:null}});let g=0,i=0,j=0,k=[],l=[];if(e.length>0){let[b,f]=await Promise.all([d.document.findMany({where:{companyUuid:a,proposalUuid:{in:e}},select:{uuid:!0}}),d.task.findMany({where:{companyUuid:a,proposalUuid:{in:e}},select:{uuid:!0}})]);k=b.map(a=>a.uuid),l=f.map(a=>a.uuid),g=(await d.proposal.updateMany({where:{companyUuid:a,uuid:{in:e}},data:{projectUuid:c}})).count,i=(await d.document.updateMany({where:{companyUuid:a,proposalUuid:{in:e}},data:{projectUuid:c}})).count,j=(await d.task.updateMany({where:{companyUuid:a,proposalUuid:{in:e}},data:{projectUuid:c}})).count}let m=await d.activity.updateMany({where:{companyUuid:a,OR:[{targetType:"idea",targetUuid:{in:n}},{targetType:"proposal",targetUuid:{in:e}},{targetType:"task",targetUuid:{in:l}},{targetType:"document",targetUuid:{in:k}}]},data:{projectUuid:c}});return{ideas:f,proposals:g,documents:i,tasks:j,activities:m.count}});await k.createActivity({companyUuid:a,projectUuid:c,targetType:"idea",targetUuid:b,actorType:f,actorUuid:d,action:"moved",value:{fromProjectUuid:l,fromProjectName:h.project.name,toProjectUuid:c,toProjectName:j.name,moved:o}}),g.B.emitChange({companyUuid:a,projectUuid:l,entityType:"idea",entityUuid:b,action:"updated"}),g.B.emitChange({companyUuid:a,projectUuid:c,entityType:"idea",entityUuid:b,action:"updated"});let p=await e.z.idea.findFirst({where:{uuid:b,companyUuid:a},include:{project:{select:{uuid:!0,name:!0}}}});return{...await r(p),moved:o}}async function F(a,b,c){let d=await e.z.idea.findFirst({where:{uuid:b,companyUuid:a},select:{uuid:!0,projectUuid:!0}});if(!d)throw new i.hD("NOT_FOUND","Idea not found",404);if(!await e.z.project.findFirst({where:{uuid:c,companyUuid:a},select:{uuid:!0}}))throw new i.hD("NOT_FOUND","Target project not found",404);if(d.projectUuid===c)throw new i.hD("BAD_REQUEST","Idea is already in the target project",400);let f=await y(b,a),g=[b,...f],h=(await e.z.proposal.findMany({where:{companyUuid:a,inputType:"idea",OR:g.map(a=>({inputUuids:{array_contains:[a]}}))},select:{uuid:!0}})).map(a=>a.uuid),j=0,k=0,l=[],m=[];if(h.length>0){let[b,c]=await Promise.all([e.z.document.findMany({where:{companyUuid:a,proposalUuid:{in:h}},select:{uuid:!0}}),e.z.task.findMany({where:{companyUuid:a,proposalUuid:{in:h}},select:{uuid:!0}})]);l=b.map(a=>a.uuid),m=c.map(a=>a.uuid),j=l.length,k=m.length}let n=await e.z.activity.count({where:{companyUuid:a,OR:[{targetType:"idea",targetUuid:{in:g}},{targetType:"proposal",targetUuid:{in:h}},{targetType:"task",targetUuid:{in:m}},{targetType:"document",targetUuid:{in:l}}]}});return{moved:{ideas:g.length,proposals:h.length,documents:j,tasks:k,activities:n}}}function G(a){switch(p(a.ideaStatus)){case"open":default:return{derivedStatus:"todo",badgeHint:"open"};case"elaborating":if("pending_answers"===a.elaborationStatus)return{derivedStatus:"human_conduct_required",badgeHint:"answer_questions"};return{derivedStatus:"in_progress",badgeHint:"researching"};case"elaborated":if(a.hasPendingProposal)return{derivedStatus:"human_conduct_required",badgeHint:"review_proposal"};if(a.hasApprovedProposal){if(a.taskStatuses.some(a=>"to_verify"===a))return{derivedStatus:"human_conduct_required",badgeHint:"verify_work"};if(a.taskStatuses.length>0&&a.taskStatuses.every(a=>"done"===a||"closed"===a))return{derivedStatus:"done",badgeHint:"done"};return{derivedStatus:"in_progress",badgeHint:"building"}}return{derivedStatus:"in_progress",badgeHint:"planning"}}}async function H(a,b){let c=await e.z.idea.findMany({where:{companyUuid:a,projectUuid:b},select:{uuid:!0,title:!0,status:!0,elaborationStatus:!0,parentUuid:!0,createdAt:!0,updatedAt:!0},orderBy:{createdAt:"desc"}}),d=await e.z.idea.groupBy({by:["parentUuid"],where:{companyUuid:a,projectUuid:b,parentUuid:{not:null}},_count:{_all:!0}})??[],f=new Map;for(let a of d)a.parentUuid&&f.set(a.parentUuid,a._count._all);let g=await e.z.proposal.findMany({where:{companyUuid:a,projectUuid:b,status:{in:["approved","pending"]}},select:{uuid:!0,status:!0,inputUuids:!0,createdAt:!0},orderBy:{createdAt:"desc"}}),h=new Map,i=new Set,j=new Map;for(let a of g){let b=a.inputUuids;if(Array.isArray(b)){for(let c of b)if(j.set(c,(j.get(c)??0)+1),"pending"===a.status)i.add(c);else if("approved"===a.status){let b=h.get(c);(!b||a.createdAt>b.createdAt)&&h.set(c,{uuid:a.uuid,createdAt:a.createdAt})}}}let k=[...new Set([...h.values()].map(a=>a.uuid))],l=new Map;if(k.length>0)for(let b of(await e.z.task.findMany({where:{companyUuid:a,proposalUuid:{in:k}},select:{proposalUuid:!0,status:!0}}))){if(!b.proposalUuid)continue;let a=l.get(b.proposalUuid)||[];a.push(b.status),l.set(b.proposalUuid,a)}return c.map(a=>{let c=h.get(a.uuid),d=c&&l.get(c.uuid)||[],{derivedStatus:e,badgeHint:g}=G({ideaStatus:a.status,elaborationStatus:a.elaborationStatus,hasPendingProposal:i.has(a.uuid),hasApprovedProposal:!!c,taskStatuses:d});return{uuid:a.uuid,title:a.title,status:a.status,derivedStatus:e,badgeHint:g,createdAt:a.createdAt,updatedAt:a.updatedAt,projectUuid:b,proposalCount:j.get(a.uuid)??0,taskCount:d.length,parentUuid:a.parentUuid??null,childCount:f.get(a.uuid)??0}})}let L=["todo","in_progress","human_conduct_required","done"];async function I(a,b){let c=await H(a,b),d={},e={};for(let a of L)d[a]=[],e[a]=0;for(let a of c){let b=a.derivedStatus,c={uuid:a.uuid,title:a.title,status:a.status,derivedStatus:b,badgeHint:a.badgeHint,createdAt:a.createdAt.toISOString(),parentUuid:a.parentUuid,childCount:a.childCount};d[b]&&(d[b].push(c),e[b]++)}return{groups:d,counts:e}}d()}catch(a){d(a)}})}};
@@ -1 +0,0 @@
1
- "use strict";exports.id=6767,exports.ids=[6767],exports.modules={14638:(a,b,c)=>{c.r(b),c.d(b,{unified:()=>d.l});var d=c(35541)},46939:(a,b,c)=>{function d(a){return a&&"object"==typeof a?"position"in a||"type"in a?f(a.position):"start"in a||"end"in a?f(a):"line"in a||"column"in a?e(a):"":""}function e(a){return g(a&&a.line)+":"+g(a&&a.column)}function f(a){return e(a&&a.start)+"-"+e(a&&a.end)}function g(a){return a&&"number"==typeof a?a:1}c.d(b,{L:()=>d})},60350:(a,b,c)=>{c.d(b,{ok:()=>d});function d(){}}};
@@ -1,2 +0,0 @@
1
- exports.id=7228,exports.ids=[7228],exports.modules={11716:(a,b,c)=>{"use strict";function d(a,b=3600){try{let c=a.split(".");if(3!==c.length)return b;let d=JSON.parse(Buffer.from(c[1],"base64url").toString("utf-8"));if("number"==typeof d.exp){let a=d.exp-Math.floor(Date.now()/1e3);return Math.max(a+60,0)}return b}catch{return b}}function e(a){return{httpOnly:!0,secure:"false"!==process.env.COOKIE_SECURE,sameSite:"lax",path:"/",maxAge:a}}c.d(b,{H:()=>d,f:()=>e})},15264:(a,b,c)=>{"use strict";c.d(b,{$Y:()=>l,Bz:()=>o,En:()=>m,Iu:()=>p,NE:()=>j,VM:()=>n,ev:()=>k,wL:()=>q});var d=c(73365),e=c(3548),f=c(11716);let g="user_session",h="user_refresh";function i(){let a=process.env.NEXTAUTH_SECRET;if(!a)throw Error("NEXTAUTH_SECRET is not set");return new TextEncoder().encode(a)}async function j(a,b="1h"){return new d.P({...a,tokenType:"access"}).setProtectedHeader({alg:"HS256"}).setIssuedAt().setExpirationTime(b).sign(i())}async function k(a){return new d.P({userUuid:a.userUuid,companyUuid:a.companyUuid,tokenType:"refresh"}).setProtectedHeader({alg:"HS256"}).setIssuedAt().setExpirationTime("7d").sign(i())}async function l(a){try{let{payload:b}=await (0,e.V)(a,i());if("user"===b.type&&"access"===b.tokenType)return{type:"user",userUuid:b.userUuid,companyUuid:b.companyUuid,email:b.email,name:b.name,oidcSub:b.oidcSub,oidcAccessToken:b.oidcAccessToken,oidcRefreshToken:b.oidcRefreshToken,oidcExpiresAt:b.oidcExpiresAt};return null}catch{return null}}async function m(a){try{let{payload:b}=await (0,e.V)(a,i());if("refresh"===b.tokenType)return{userUuid:b.userUuid,companyUuid:b.companyUuid};return null}catch{return null}}async function n(a){let b=function(a){if(!a)return null;let b=a.match(/^Bearer\s+(.+)$/i);return b?b[1]:null}(a.headers.get("authorization"));if(b){let a=await l(b);if(a)return{type:"user",companyUuid:a.companyUuid,actorUuid:a.userUuid,email:a.email,name:a.name}}let c=a.cookies.get(g)?.value;if(!c)return null;let d=await l(c);return d?{type:"user",companyUuid:d.companyUuid,actorUuid:d.userUuid,email:d.email,name:d.name}:null}function o(a,b,c,d=3600){a.cookies.set(g,b,(0,f.f)(d)),a.cookies.set(h,c,(0,f.f)(604800))}function p(a){a.cookies.set(g,"",(0,f.f)(0)),a.cookies.set(h,"",(0,f.f)(0))}function q(a){return a.cookies.get(h)?.value||null}},29662:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{d:()=>i});var e=c(50117),f=c(74438),g=c(15264),h=a([f]);async function i(){let a=await (0,e.UL)(),b=a.get("oidc_access_token")?.value;if(b)return(0,f.Q)(b);let c=a.get("user_session")?.value;if(c){let a=await (0,g.$Y)(c);if(a)return{type:"user",companyUuid:a.companyUuid,actorUuid:a.userUuid,email:a.email,name:a.name}}return null}f=(h.then?(await h)():h)[0],d()}catch(a){d(a)}})},35198:(a,b,c)=>{"use strict";c.d(b,{BT:()=>i,Wu:()=>j,ZB:()=>h,Zp:()=>f,aR:()=>g});var d=c(10837);c(21968);var e=c(96307);function f({className:a,...b}){return(0,d.jsx)("div",{"data-slot":"card",className:(0,e.cn)("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",a),...b})}function g({className:a,...b}){return(0,d.jsx)("div",{"data-slot":"card-header",className:(0,e.cn)("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-2 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",a),...b})}function h({className:a,...b}){return(0,d.jsx)("div",{"data-slot":"card-title",className:(0,e.cn)("leading-none font-semibold",a),...b})}function i({className:a,...b}){return(0,d.jsx)("div",{"data-slot":"card-description",className:(0,e.cn)("text-muted-foreground text-sm",a),...b})}function j({className:a,...b}){return(0,d.jsx)("div",{"data-slot":"card-content",className:(0,e.cn)("px-6",a),...b})}},37066:(a,b,c)=>{"use strict";c.d(b,{A:()=>g});var d=c(77592),e=c(50117);let f=["en","zh"],g=(0,d.A)(async()=>{let a=await (0,e.UL)(),b=a.get("chorus-locale")?.value,d=b&&f.includes(b)?b:"en";return{locale:d,messages:(await c(76565)(`./${d}.json`)).default}})},61413:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{LS:()=>p,U$:()=>l,U1:()=>i,Yi:()=>j,gA:()=>m,hF:()=>h,vr:()=>n,xx:()=>o,yx:()=>k});var e=c(52618),f=c(42558),g=a([e]);async function h({companyUuid:a,skip:b,take:c}){let[d,f]=await Promise.all([e.z.project.findMany({where:{companyUuid:a},skip:b,take:c,orderBy:{updatedAt:"desc"},select:{uuid:!0,name:!0,description:!0,groupUuid:!0,createdAt:!0,updatedAt:!0,_count:{select:{ideas:!0,documents:!0,tasks:!0,proposals:!0}}}}),e.z.project.count({where:{companyUuid:a}})]);return{projects:d,total:f}}async function i(a,b){return e.z.project.findFirst({where:{uuid:b,companyUuid:a},select:{uuid:!0,name:!0,description:!0,groupUuid:!0,createdAt:!0,updatedAt:!0,_count:{select:{ideas:!0,documents:!0,tasks:!0,proposals:!0,activities:!0}}}})}async function j(a,b){return!!await e.z.project.findFirst({where:{uuid:b,companyUuid:a},select:{uuid:!0}})}async function k(a,b){return e.z.project.findFirst({where:{uuid:b,companyUuid:a},select:{uuid:!0,name:!0}})}async function l(a,b){return(await e.z.project.findMany({where:{companyUuid:a,groupUuid:b},select:{uuid:!0}})).map(a=>a.uuid)}async function m({companyUuid:a,name:b,description:c,groupUuid:d}){let g=await e.z.project.create({data:{companyUuid:a,name:b,description:c,groupUuid:d??null},select:{uuid:!0,name:!0,description:!0,groupUuid:!0,createdAt:!0,updatedAt:!0}});return f.B.emitChange({companyUuid:a,projectUuid:g.uuid,entityType:"project",entityUuid:g.uuid,action:"created"}),g}async function n(a,b,c){let d=await e.z.project.findFirst({where:{uuid:b,companyUuid:a},select:{uuid:!0}});return d?e.z.project.update({where:{uuid:d.uuid},data:c,select:{uuid:!0,name:!0,description:!0,createdAt:!0,updatedAt:!0}}):null}async function o(a,b){let c=await e.z.project.findFirst({where:{uuid:b,companyUuid:a},select:{uuid:!0}});return!!c&&(await e.z.project.delete({where:{uuid:c.uuid}}),f.B.emitChange({companyUuid:a,projectUuid:b,entityType:"project",entityUuid:b,action:"deleted"}),!0)}async function p(a,b){let[c,d,f,g]=await Promise.all([e.z.idea.groupBy({by:["status"],where:{projectUuid:b,companyUuid:a},_count:!0}),e.z.task.groupBy({by:["status"],where:{projectUuid:b,companyUuid:a},_count:!0}),e.z.proposal.groupBy({by:["status"],where:{projectUuid:b,companyUuid:a},_count:!0}),e.z.document.count({where:{projectUuid:b,companyUuid:a}})]),h=new Map(c.map(a=>[a.status,a._count])),i=c.reduce((a,b)=>a+b._count,0),j=h.get("open")||0,k=new Map(d.map(a=>[a.status,a._count])),l=d.reduce((a,b)=>a+b._count,0),m=k.get("in_progress")||0,n=(k.get("open")||0)+(k.get("assigned")||0),o=k.get("to_verify")||0,p=(k.get("done")||0)+(k.get("closed")||0),q=new Map(f.map(a=>[a.status,a._count])),r=f.reduce((a,b)=>a+b._count,0),s=q.get("pending")||0;return{ideas:{total:i,open:j},tasks:{total:l,inProgress:m,todo:n,toVerify:o,done:p},proposals:{total:r,pending:s},documents:{total:g}}}e=(g.then?(await g)():g)[0],d()}catch(a){d(a)}})},74438:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{Q:()=>j,t:()=>k});var e=c(41195),f=c(3548),g=c(52618),h=c(65582),i=a([g]);g=(i.then?(await i)():i)[0];let l=new Map;async function j(a){try{let b=a.split(".");if(3!==b.length)return null;let c=JSON.parse(Buffer.from(b[1],"base64url").toString("utf-8")).iss;if(!c)return null;let d=function(a){if(!l.has(a)){let b=new URL(`${a.replace(/\/$/,"")}/.well-known/jwks.json`);l.set(a,(0,e.RD)(b))}return l.get(a)}(c),{payload:h}=await (0,f.V)(a,d,{issuer:c});if(h.token_use&&"access"!==h.token_use)return null;let i=await g.z.company.findFirst({where:{oidcEnabled:!0,oidcIssuer:c}});if(!i)return null;let j=await g.z.user.findFirst({where:{companyUuid:i.uuid,oidcSub:h.sub}});if(!j)return null;return{type:"user",companyUuid:i.uuid,actorUuid:j.uuid,email:j.email||h.email,name:j.name||h.name}}catch(a){return h.A.error({err:a},"OIDC token verification failed"),null}}function k(a){if(a.startsWith("cho_"))return!1;let b=a.split(".");if(3!==b.length)return!1;try{let a=JSON.parse(Buffer.from(b[0],"base64url").toString("utf-8"));return a.alg&&(a.alg.startsWith("RS")||a.alg.startsWith("ES"))}catch{return!1}}d()}catch(a){d(a)}})},76565:(a,b,c)=>{var d={"./en.json":[87368,7368],"./zh.json":[72961,2961]};function e(a){if(!c.o(d,a))return Promise.resolve().then(()=>{var b=Error("Cannot find module '"+a+"'");throw b.code="MODULE_NOT_FOUND",b});var b=d[a],e=b[0];return c.e(b[1]).then(()=>c.t(e,19))}e.keys=()=>Object.keys(d),e.id=76565,a.exports=e},97879:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{AU:()=>q,CA:()=>C,Eh:()=>E,FD:()=>A,IV:()=>x,LJ:()=>y,M9:()=>B,MN:()=>z,PK:()=>t,X2:()=>u,e1:()=>p,fS:()=>r,gF:()=>v,gT:()=>D,lh:()=>G,nW:()=>F,tM:()=>w,wV:()=>s});var e=c(55511),f=c(71255),g=c(69996),h=c(92633),i=c(62729),j=c(74432),k=a([f,h]);function l(a){return{...a,uuid:a.uuid||(0,e.randomUUID)()}}function m(a){return{...a,uuid:a.uuid||(0,e.randomUUID)()}}async function n(a){let b="user"===a.createdByType?"user":"agent",[c,d]=await Promise.all([(0,h.LS)(a.createdByUuid,b),(0,h.SJ)(a.reviewedByUuid,a.reviewNote,a.reviewedAt)]),e={uuid:a.uuid,title:a.title,description:a.description,inputType:a.inputType,inputUuids:a.inputUuids,documentDrafts:a.documentDrafts,taskDrafts:a.taskDrafts,status:a.status,createdBy:c,createdByType:a.createdByType,review:d,createdAt:a.createdAt.toISOString(),updatedAt:a.updatedAt.toISOString()};return a.project&&(e.project=a.project),e}async function o(a,b){let c=await f.z.proposal.findFirst({where:{uuid:b,companyUuid:a}});if(!c)throw Error("Proposal not found");let d=[],e=c.documentDrafts||[],g=c.taskDrafts||[],h=c.inputUuids||[];for(let a of(0===e.length&&d.push({id:"E1",level:"error",message:"Proposal must contain at least one document draft"}),e))(!a.content||a.content.length<100)&&d.push({id:"E2",level:"error",message:`Document draft "${a.title}" must have content with at least 100 characters`,field:a.title});if(0===g.length&&d.push({id:"E3",level:"error",message:"Proposal must contain at least one task draft"}),0===h.length&&d.push({id:"E4",level:"error",message:"Proposal must have at least one input (idea or other source)"}),"idea"===c.inputType&&h.length>0)for(let b of(await f.z.idea.findMany({where:{uuid:{in:h},companyUuid:a},select:{uuid:!0,title:!0,elaborationStatus:!0}})))"resolved"!==b.elaborationStatus&&d.push({id:"E5",level:"error",message:`Input idea "${b.title}" has unresolved elaboration (status: ${b.elaborationStatus})`,field:b.title});for(let a of(e.some(a=>"tech_design"===a.type)||d.push({id:"W1",level:"warning",message:"Proposal should contain at least one tech design document draft"}),g))a.description&&0!==a.description.trim().length||d.push({id:"W2",level:"warning",message:`Task draft "${a.title}" is missing a description`,field:a.title});for(let a of g)a.acceptanceCriteriaItems&&0!==a.acceptanceCriteriaItems.length||d.push({id:"E-AC",level:"error",message:`Task draft "${a.title}" is missing acceptance criteria (structured items required)`,field:a.title});for(let a of(g.length>=2&&(g.some(a=>a.dependsOnDraftUuids&&a.dependsOnDraftUuids.length>0)||d.push({id:"W4",level:"warning",message:"When there are multiple tasks, at least one should declare dependencies"})),c.description&&0!==c.description.trim().length||d.push({id:"W5",level:"warning",message:"Proposal description should not be empty"}),g))a.priority||d.push({id:"I1",level:"info",message:`Task draft "${a.title}" does not have a priority set`,field:a.title});for(let a of g)null==a.storyPoints&&d.push({id:"I2",level:"info",message:`Task draft "${a.title}" does not have story points set`,field:a.title});return{valid:!d.some(a=>"error"===a.level),issues:d}}async function p(a,b){let c=await f.z.proposal.findMany({where:{companyUuid:a,inputType:"idea"},select:{uuid:!0,title:!0,inputUuids:!0}}),d=[];for(let a of c){let c=a.inputUuids;for(let e of b)c.includes(e)&&d.push({uuid:e,proposalUuid:a.uuid,proposalTitle:a.title})}return{available:0===d.length,usedIdeas:d}}async function q(a,b,c,d){let e=await f.z.idea.findMany({where:{uuid:{in:b},companyUuid:a},select:{uuid:!0,assigneeType:!0,assigneeUuid:!0}}),g=[];for(let a of e)(a.assigneeType!==d||a.assigneeUuid!==c)&&g.push(a.uuid);return{valid:0===g.length,unassignedIdeas:g}}async function r(a,b,c){let d=(await f.z.proposal.findMany({where:{projectUuid:b,companyUuid:a},orderBy:{createdAt:"desc"},select:{uuid:!0,title:!0,description:!0,inputType:!0,inputUuids:!0,documentDrafts:!0,taskDrafts:!0,status:!0,createdByUuid:!0,createdByType:!0,reviewedByUuid:!0,reviewNote:!0,reviewedAt:!0,createdAt:!0,updatedAt:!0}})).filter(a=>Array.isArray(a.inputUuids)&&a.inputUuids.includes(c));return Promise.all(d.map(a=>n(a)))}async function s({companyUuid:a,projectUuid:b,skip:c,take:d,status:e}){let g={projectUuid:b,companyUuid:a,...e&&{status:e}},[h,i]=await Promise.all([f.z.proposal.findMany({where:g,skip:c,take:d,orderBy:{createdAt:"desc"},select:{uuid:!0,title:!0,description:!0,inputType:!0,inputUuids:!0,documentDrafts:!0,taskDrafts:!0,status:!0,createdByUuid:!0,createdByType:!0,reviewedByUuid:!0,reviewNote:!0,reviewedAt:!0,createdAt:!0,updatedAt:!0}}),f.z.proposal.count({where:g})]);return{proposals:await Promise.all(h.map(a=>n(a))),total:i}}async function t(a,b){return f.z.proposal.findFirst({where:{uuid:b,companyUuid:a}})}async function u(a){let b=a.documentDrafts?.map(l),c=a.taskDrafts?.map(m),d=await f.z.proposal.create({data:{companyUuid:a.companyUuid,projectUuid:a.projectUuid,title:a.title,description:a.description,inputType:a.inputType,inputUuids:a.inputUuids,...b&&{documentDrafts:b},...c&&{taskDrafts:c},status:"draft",createdByUuid:a.createdByUuid,createdByType:a.createdByType||"agent"},select:{uuid:!0,title:!0,description:!0,inputType:!0,inputUuids:!0,documentDrafts:!0,taskDrafts:!0,status:!0,createdByUuid:!0,createdByType:!0,reviewedByUuid:!0,reviewNote:!0,reviewedAt:!0,createdAt:!0,updatedAt:!0}});return i.B.emitChange({companyUuid:a.companyUuid,projectUuid:a.projectUuid,entityType:"proposal",entityUuid:d.uuid,action:"created"}),n(d)}async function v(a,b,c,d){let e=await f.z.proposal.findFirst({where:{uuid:a,companyUuid:b}});if(!e)throw Error("Proposal not found");let{updatedProposal:g,materializedTasks:h,materializedDocuments:k}=await f.z.$transaction(async b=>{let f=await b.proposal.update({where:{uuid:a},data:{status:"approved",reviewedByUuid:c,reviewNote:d||null,reviewedAt:new Date},include:{project:{select:{uuid:!0,name:!0}}}}),g=e.documentDrafts,h=e.taskDrafts,i=[],k=[];if(g&&g.length>0){let a=await b.document.createManyAndReturn({data:g.map(a=>({companyUuid:e.companyUuid,projectUuid:e.projectUuid,type:a.type||"prd",title:a.title,content:a.content||null,version:1,proposalUuid:e.uuid,createdByUuid:e.createdByUuid})),select:{uuid:!0,title:!0}});for(let b=0;b<g.length;b++)k.push({draftUuid:g[b].uuid,documentUuid:a[b].uuid,title:a[b].title})}if(h&&h.length>0){for(let a of h)if(a.acceptanceCriteriaItems&&a.acceptanceCriteriaItems.length>0&&!(0,j.hY)(a.acceptanceCriteriaItems))throw Error(`Task draft "${a.title}": acceptanceCriteriaItems has no non-empty description`);let a=await b.task.createManyAndReturn({data:h.map(a=>({companyUuid:e.companyUuid,projectUuid:e.projectUuid,title:a.title,description:a.description||null,status:"open",priority:a.priority||"medium",storyPoints:a.storyPoints||null,acceptanceCriteria:a.acceptanceCriteria||null,proposalUuid:e.uuid,createdByUuid:e.createdByUuid})),select:{uuid:!0,title:!0}}),c=new Map;for(let b=0;b<h.length;b++)c.set(h[b].uuid,a[b].uuid),i.push({draftUuid:h[b].uuid,taskUuid:a[b].uuid,title:a[b].title});let d=[];for(let a of h)if(a.dependsOnDraftUuids&&a.dependsOnDraftUuids.length>0){let b=c.get(a.uuid);if(!b)continue;for(let e of a.dependsOnDraftUuids){let a=c.get(e);a&&d.push({taskUuid:b,dependsOnUuid:a})}}d.length>0&&await b.taskDependency.createMany({data:d});let f=[];for(let a of h){let b=c.get(a.uuid);b&&(0,j.Ch)(a.acceptanceCriteriaItems).forEach((a,c)=>{f.push({taskUuid:b,description:a.description,required:a.required,sortOrder:c})})}f.length>0&&await b.acceptanceCriterion.createMany({data:f})}return{updatedProposal:f,materializedTasks:i,materializedDocuments:k}},{timeout:15e3});i.B.emitChange({companyUuid:e.companyUuid,projectUuid:e.projectUuid,entityType:"proposal",entityUuid:a,action:"updated"});let l=await n(g);return h.length>0&&(l.materializedTasks=h),k.length>0&&(l.materializedDocuments=k),l}async function w(a,b,c,d){let e=await f.z.proposal.findFirst({where:{uuid:a,companyUuid:b}});if(!e)throw Error("Proposal not found");if("approved"!==e.status)throw Error("Only approved proposals can be revoked");let[g,h]=await Promise.all([f.z.task.findMany({where:{proposalUuid:e.uuid,status:{not:"closed"}},select:{uuid:!0,title:!0}}),f.z.document.findMany({where:{proposalUuid:e.uuid},select:{uuid:!0,title:!0}})]),j=g.map(a=>({uuid:a.uuid,title:a.title})),k=h.map(a=>({uuid:a.uuid,title:a.title}));return await f.z.$transaction(async b=>{let f=j.map(a=>a.uuid),g=k.map(a=>a.uuid);f.length>0&&(await b.sessionTaskCheckin.deleteMany({where:{taskUuid:{in:f}}}),await b.taskDependency.deleteMany({where:{dependsOnUuid:{in:f},taskUuid:{notIn:f}}}),await b.task.updateMany({where:{proposalUuid:e.uuid},data:{status:"closed"}})),g.length>0&&(await b.comment.deleteMany({where:{targetType:"document",targetUuid:{in:g}}}),await b.document.deleteMany({where:{proposalUuid:e.uuid}})),await b.proposal.update({where:{uuid:a},data:{status:"draft",reviewedByUuid:c,reviewedAt:new Date,reviewNote:d||null}})},{timeout:15e3}),i.B.emitChange({companyUuid:e.companyUuid,projectUuid:e.projectUuid,entityType:"proposal",entityUuid:a,action:"updated"}),{proposalUuid:a,closedTasks:j,deletedDocuments:k}}async function x(a,b,c){let d=await f.z.proposal.update({where:{uuid:a},data:{status:"draft",reviewedByUuid:b,reviewNote:c,reviewedAt:new Date},include:{project:{select:{uuid:!0,name:!0}}}});return i.B.emitChange({companyUuid:d.companyUuid,projectUuid:d.projectUuid,entityType:"proposal",entityUuid:d.uuid,action:"updated"}),n(d)}async function y(a,b,c){let d=await f.z.proposal.update({where:{uuid:a},data:{status:"closed",reviewedByUuid:b,reviewNote:c,reviewedAt:new Date},include:{project:{select:{uuid:!0,name:!0}}}});return i.B.emitChange({companyUuid:d.companyUuid,projectUuid:d.projectUuid,entityType:"proposal",entityUuid:d.uuid,action:"updated"}),n(d)}async function z(a,b){let c=await f.z.proposal.findFirst({where:{uuid:a,companyUuid:b}});if(!c)throw Error("Proposal not found");await f.z.proposal.delete({where:{uuid:a}}),i.B.emitChange({companyUuid:c.companyUuid,projectUuid:c.projectUuid,entityType:"proposal",entityUuid:c.uuid,action:"deleted"})}async function A(a,b){let c=await f.z.proposal.findFirst({where:{uuid:a,companyUuid:b}});if(!c)throw Error("Proposal not found");if("draft"!==c.status)throw Error("Only draft proposals can be submitted for review");let d=await o(b,a);if(!d.valid){let a=d.issues.map(a=>`[${a.level}] ${a.message}`);throw Error(`Proposal validation failed:
2
- ${a.join("\n")}`)}let e=await f.z.proposal.update({where:{uuid:a},data:{status:"pending"},include:{project:{select:{uuid:!0,name:!0}}}});return i.B.emitChange({companyUuid:e.companyUuid,projectUuid:e.projectUuid,entityType:"proposal",entityUuid:e.uuid,action:"updated"}),n(e)}async function B(a,b,c){let d=await f.z.proposal.findFirst({where:{uuid:a,companyUuid:b,status:"draft"}});if(!d)throw Error("Proposal not found or not in draft status");let e=d.documentDrafts||[],g=l(c),h=[...e,g],j=await f.z.proposal.update({where:{uuid:a},data:{documentDrafts:h},include:{project:{select:{uuid:!0,name:!0}}}});return i.B.emitChange({companyUuid:b,projectUuid:d.projectUuid,entityType:"proposal",entityUuid:a,action:"updated"}),n(j)}async function C(a,b,c){let d=await f.z.proposal.findFirst({where:{uuid:a,companyUuid:b,status:"draft"}});if(!d)throw Error("Proposal not found or not in draft status");if(!(0,j.hY)(c.acceptanceCriteriaItems))throw Error(j.se);let e=d.taskDrafts||[],g=m({...c,acceptanceCriteriaItems:(0,j.Ch)(c.acceptanceCriteriaItems)}),h=[...e,g],k=await f.z.proposal.update({where:{uuid:a},data:{taskDrafts:h},include:{project:{select:{uuid:!0,name:!0}}}});return i.B.emitChange({companyUuid:b,projectUuid:d.projectUuid,entityType:"proposal",entityUuid:a,action:"updated"}),n(k)}async function D(a,b,c,d){let e=await f.z.proposal.findFirst({where:{uuid:a,companyUuid:b,status:"draft"}});if(!e)throw Error("Proposal not found or not in draft status");let g=e.documentDrafts||[],h=g.findIndex(a=>a.uuid===c);if(-1===h)throw Error("Document draft not found");g[h]={...g[h],...d};let j=await f.z.proposal.update({where:{uuid:a},data:{documentDrafts:g},include:{project:{select:{uuid:!0,name:!0}}}});return i.B.emitChange({companyUuid:b,projectUuid:e.projectUuid,entityType:"proposal",entityUuid:a,action:"updated"}),n(j)}async function E(a,b,c,d){let e=await f.z.proposal.findFirst({where:{uuid:a,companyUuid:b,status:"draft"}});if(!e)throw Error("Proposal not found or not in draft status");let g=e.taskDrafts||[],h=g.findIndex(a=>a.uuid===c);if(-1===h)throw Error("Task draft not found");let k={...d};if("acceptanceCriteriaItems"in d){if(!(0,j.hY)(d.acceptanceCriteriaItems))throw Error(j.se);k.acceptanceCriteriaItems=(0,j.Ch)(d.acceptanceCriteriaItems)}g[h]={...g[h],...k};let l=await f.z.proposal.update({where:{uuid:a},data:{taskDrafts:g},include:{project:{select:{uuid:!0,name:!0}}}});return i.B.emitChange({companyUuid:b,projectUuid:e.projectUuid,entityType:"proposal",entityUuid:a,action:"updated"}),n(l)}async function F(a,b,c){let d=await f.z.proposal.findFirst({where:{uuid:a,companyUuid:b,status:"draft"}});if(!d)throw Error("Proposal not found or not in draft status");let e=(d.documentDrafts||[]).filter(a=>a.uuid!==c),h=await f.z.proposal.update({where:{uuid:a},data:{documentDrafts:e.length>0?e:g.D1.Fj},include:{project:{select:{uuid:!0,name:!0}}}});return i.B.emitChange({companyUuid:b,projectUuid:d.projectUuid,entityType:"proposal",entityUuid:a,action:"updated"}),n(h)}async function G(a,b,c){let d=await f.z.proposal.findFirst({where:{uuid:a,companyUuid:b,status:"draft"}});if(!d)throw Error("Proposal not found or not in draft status");let e=(d.taskDrafts||[]).filter(a=>a.uuid!==c).map(a=>({...a,dependsOnDraftUuids:a.dependsOnDraftUuids?.filter(a=>a!==c)})),h=await f.z.proposal.update({where:{uuid:a},data:{taskDrafts:e.length>0?e:g.D1.Fj},include:{project:{select:{uuid:!0,name:!0}}}});return i.B.emitChange({companyUuid:b,projectUuid:d.projectUuid,entityType:"proposal",entityUuid:a,action:"updated"}),n(h)}[f,h]=k.then?(await k)():k,d()}catch(a){d(a)}})}};