@chorus-aidlc/chorus 0.13.0 → 0.13.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (641) hide show
  1. package/.next/standalone/.next/BUILD_ID +1 -1
  2. package/.next/standalone/.next/app-build-manifest.json +410 -425
  3. package/.next/standalone/.next/app-path-routes-manifest.json +39 -41
  4. package/.next/standalone/.next/build-manifest.json +5 -5
  5. package/.next/standalone/.next/prerender-manifest.json +33 -57
  6. package/.next/standalone/.next/routes-manifest.json +0 -6
  7. package/.next/standalone/.next/server/app/(dashboard)/project-groups/[uuid]/page.js +1 -1
  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 +1 -1
  23. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/documents/page.js.nft.json +1 -1
  24. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/documents/page_client-reference-manifest.js +1 -1
  25. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/graph/page.js +2 -2
  26. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/graph/page.js.nft.json +1 -1
  27. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/graph/page_client-reference-manifest.js +1 -1
  28. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/proposals/[proposalUuid]/page.js +2 -2
  29. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/proposals/[proposalUuid]/page.js.nft.json +1 -1
  30. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/proposals/[proposalUuid]/page_client-reference-manifest.js +1 -1
  31. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/proposals/new/page.js +1 -1
  32. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/proposals/new/page.js.nft.json +1 -1
  33. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/proposals/new/page_client-reference-manifest.js +1 -1
  34. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/proposals/page.js +2 -2
  35. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/proposals/page.js.nft.json +1 -1
  36. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/proposals/page_client-reference-manifest.js +1 -1
  37. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/tasks/[taskUuid]/page.js +1 -1
  38. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/tasks/[taskUuid]/page.js.nft.json +1 -1
  39. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/tasks/[taskUuid]/page_client-reference-manifest.js +1 -1
  40. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/tasks/page.js +1 -1
  41. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/tasks/page.js.nft.json +1 -1
  42. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/tasks/page_client-reference-manifest.js +1 -1
  43. package/.next/standalone/.next/server/app/(dashboard)/projects/page.js +1 -1
  44. package/.next/standalone/.next/server/app/(dashboard)/projects/page.js.nft.json +1 -1
  45. package/.next/standalone/.next/server/app/(dashboard)/projects/page_client-reference-manifest.js +1 -1
  46. package/.next/standalone/.next/server/app/(dashboard)/settings/page.js +2 -2
  47. package/.next/standalone/.next/server/app/(dashboard)/settings/page.js.nft.json +1 -1
  48. package/.next/standalone/.next/server/app/(dashboard)/settings/page_client-reference-manifest.js +1 -1
  49. package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  50. package/.next/standalone/.next/server/app/_not-found.html +1 -1
  51. package/.next/standalone/.next/server/app/_not-found.rsc +2 -2
  52. package/.next/standalone/.next/server/app/admin/companies/[uuid]/page_client-reference-manifest.js +1 -1
  53. package/.next/standalone/.next/server/app/admin/companies/new/page_client-reference-manifest.js +1 -1
  54. package/.next/standalone/.next/server/app/admin/companies/new.html +1 -1
  55. package/.next/standalone/.next/server/app/admin/companies/new.rsc +2 -2
  56. package/.next/standalone/.next/server/app/admin/companies/page_client-reference-manifest.js +1 -1
  57. package/.next/standalone/.next/server/app/admin/companies.html +1 -1
  58. package/.next/standalone/.next/server/app/admin/companies.rsc +2 -2
  59. package/.next/standalone/.next/server/app/admin/page_client-reference-manifest.js +1 -1
  60. package/.next/standalone/.next/server/app/admin.html +1 -1
  61. package/.next/standalone/.next/server/app/admin.rsc +2 -2
  62. package/.next/standalone/.next/server/app/api/admin/companies/[uuid]/route_client-reference-manifest.js +1 -1
  63. package/.next/standalone/.next/server/app/api/admin/companies/route_client-reference-manifest.js +1 -1
  64. package/.next/standalone/.next/server/app/api/admin/login/route_client-reference-manifest.js +1 -1
  65. package/.next/standalone/.next/server/app/api/admin/session/route_client-reference-manifest.js +1 -1
  66. package/.next/standalone/.next/server/app/api/agent-connections/route.js +1 -1
  67. package/.next/standalone/.next/server/app/api/agent-connections/route.js.nft.json +1 -1
  68. package/.next/standalone/.next/server/app/api/agent-connections/route_client-reference-manifest.js +1 -1
  69. package/.next/standalone/.next/server/app/api/agents/[uuid]/route_client-reference-manifest.js +1 -1
  70. package/.next/standalone/.next/server/app/api/agents/[uuid]/sessions/route.js +1 -1
  71. package/.next/standalone/.next/server/app/api/agents/[uuid]/sessions/route.js.nft.json +1 -1
  72. package/.next/standalone/.next/server/app/api/agents/[uuid]/sessions/route_client-reference-manifest.js +1 -1
  73. package/.next/standalone/.next/server/app/api/agents/route_client-reference-manifest.js +1 -1
  74. package/.next/standalone/.next/server/app/api/api-keys/[uuid]/route_client-reference-manifest.js +1 -1
  75. package/.next/standalone/.next/server/app/api/api-keys/route_client-reference-manifest.js +1 -1
  76. package/.next/standalone/.next/server/app/api/auth/callback/route.js +1 -1
  77. package/.next/standalone/.next/server/app/api/auth/callback/route_client-reference-manifest.js +1 -1
  78. package/.next/standalone/.next/server/app/api/auth/check-default/route_client-reference-manifest.js +1 -1
  79. package/.next/standalone/.next/server/app/api/auth/company-oidc/route_client-reference-manifest.js +1 -1
  80. package/.next/standalone/.next/server/app/api/auth/default-login/route.js +1 -1
  81. package/.next/standalone/.next/server/app/api/auth/default-login/route_client-reference-manifest.js +1 -1
  82. package/.next/standalone/.next/server/app/api/auth/identify/route_client-reference-manifest.js +1 -1
  83. package/.next/standalone/.next/server/app/api/auth/logout/route_client-reference-manifest.js +1 -1
  84. package/.next/standalone/.next/server/app/api/auth/me/route_client-reference-manifest.js +1 -1
  85. package/.next/standalone/.next/server/app/api/auth/sync-token/route.js +1 -1
  86. package/.next/standalone/.next/server/app/api/auth/sync-token/route_client-reference-manifest.js +1 -1
  87. package/.next/standalone/.next/server/app/api/comments/route.js +1 -1
  88. package/.next/standalone/.next/server/app/api/comments/route.js.nft.json +1 -1
  89. package/.next/standalone/.next/server/app/api/comments/route_client-reference-manifest.js +1 -1
  90. package/.next/standalone/.next/server/app/api/daemon/control/route.js +1 -1
  91. package/.next/standalone/.next/server/app/api/daemon/control/route.js.nft.json +1 -1
  92. package/.next/standalone/.next/server/app/api/daemon/control/route_client-reference-manifest.js +1 -1
  93. package/.next/standalone/.next/server/app/api/daemon/execution-state/route.js +1 -1
  94. package/.next/standalone/.next/server/app/api/daemon/execution-state/route.js.nft.json +1 -1
  95. package/.next/standalone/.next/server/app/api/daemon/execution-state/route_client-reference-manifest.js +1 -1
  96. package/.next/standalone/.next/server/app/api/daemon/executions/route.js +1 -1
  97. package/.next/standalone/.next/server/app/api/daemon/executions/route.js.nft.json +1 -1
  98. package/.next/standalone/.next/server/app/api/daemon/executions/route_client-reference-manifest.js +1 -1
  99. package/.next/standalone/.next/server/app/api/daemon/pending-turns/route.js +1 -1
  100. package/.next/standalone/.next/server/app/api/daemon/pending-turns/route.js.nft.json +1 -1
  101. package/.next/standalone/.next/server/app/api/daemon/pending-turns/route_client-reference-manifest.js +1 -1
  102. package/.next/standalone/.next/server/app/api/daemon/report-interrupt/route.js +1 -1
  103. package/.next/standalone/.next/server/app/api/daemon/report-interrupt/route.js.nft.json +1 -1
  104. package/.next/standalone/.next/server/app/api/daemon/report-interrupt/route_client-reference-manifest.js +1 -1
  105. package/.next/standalone/.next/server/app/api/daemon/resume/route.js +1 -1
  106. package/.next/standalone/.next/server/app/api/daemon/resume/route.js.nft.json +1 -1
  107. package/.next/standalone/.next/server/app/api/daemon/resume/route_client-reference-manifest.js +1 -1
  108. package/.next/standalone/.next/server/app/api/daemon/transcript/route.js +1 -1
  109. package/.next/standalone/.next/server/app/api/daemon/transcript/route.js.nft.json +1 -1
  110. package/.next/standalone/.next/server/app/api/daemon/transcript/route_client-reference-manifest.js +1 -1
  111. package/.next/standalone/.next/server/app/api/daemon/turn-advance/route.js +1 -1
  112. package/.next/standalone/.next/server/app/api/daemon/turn-advance/route.js.nft.json +1 -1
  113. package/.next/standalone/.next/server/app/api/daemon/turn-advance/route_client-reference-manifest.js +1 -1
  114. package/.next/standalone/.next/server/app/api/daemon-sessions/[sessionUuid]/instruction/route.js +1 -1
  115. package/.next/standalone/.next/server/app/api/daemon-sessions/[sessionUuid]/instruction/route.js.nft.json +1 -1
  116. package/.next/standalone/.next/server/app/api/daemon-sessions/[sessionUuid]/instruction/route_client-reference-manifest.js +1 -1
  117. package/.next/standalone/.next/server/app/api/daemon-sessions/[sessionUuid]/repoint/route.js +1 -1
  118. package/.next/standalone/.next/server/app/api/daemon-sessions/[sessionUuid]/repoint/route.js.nft.json +1 -1
  119. package/.next/standalone/.next/server/app/api/daemon-sessions/[sessionUuid]/repoint/route_client-reference-manifest.js +1 -1
  120. package/.next/standalone/.next/server/app/api/daemon-sessions/[sessionUuid]/route.js +1 -1
  121. package/.next/standalone/.next/server/app/api/daemon-sessions/[sessionUuid]/route.js.nft.json +1 -1
  122. package/.next/standalone/.next/server/app/api/daemon-sessions/[sessionUuid]/route_client-reference-manifest.js +1 -1
  123. package/.next/standalone/.next/server/app/api/daemon-sessions/ad-hoc/route.js +1 -1
  124. package/.next/standalone/.next/server/app/api/daemon-sessions/ad-hoc/route.js.nft.json +1 -1
  125. package/.next/standalone/.next/server/app/api/daemon-sessions/ad-hoc/route_client-reference-manifest.js +1 -1
  126. package/.next/standalone/.next/server/app/api/daemon-sessions/route.js +1 -1
  127. package/.next/standalone/.next/server/app/api/daemon-sessions/route.js.nft.json +1 -1
  128. package/.next/standalone/.next/server/app/api/daemon-sessions/route_client-reference-manifest.js +1 -1
  129. package/.next/standalone/.next/server/app/api/documents/[uuid]/route.js +1 -1
  130. package/.next/standalone/.next/server/app/api/documents/[uuid]/route.js.nft.json +1 -1
  131. package/.next/standalone/.next/server/app/api/documents/[uuid]/route_client-reference-manifest.js +1 -1
  132. package/.next/standalone/.next/server/app/api/entities/[type]/[uuid]/root-idea/route.js +1 -1
  133. package/.next/standalone/.next/server/app/api/entities/[type]/[uuid]/root-idea/route.js.nft.json +1 -1
  134. package/.next/standalone/.next/server/app/api/entities/[type]/[uuid]/root-idea/route_client-reference-manifest.js +1 -1
  135. package/.next/standalone/.next/server/app/api/events/notifications/route.js +4 -4
  136. package/.next/standalone/.next/server/app/api/events/notifications/route.js.nft.json +1 -1
  137. package/.next/standalone/.next/server/app/api/events/notifications/route_client-reference-manifest.js +1 -1
  138. package/.next/standalone/.next/server/app/api/events/route.js +6 -6
  139. package/.next/standalone/.next/server/app/api/events/route.js.nft.json +1 -1
  140. package/.next/standalone/.next/server/app/api/events/route_client-reference-manifest.js +1 -1
  141. package/.next/standalone/.next/server/app/api/health/route_client-reference-manifest.js +1 -1
  142. package/.next/standalone/.next/server/app/api/ideas/[uuid]/claim/route.js +1 -1
  143. package/.next/standalone/.next/server/app/api/ideas/[uuid]/claim/route.js.nft.json +1 -1
  144. package/.next/standalone/.next/server/app/api/ideas/[uuid]/claim/route_client-reference-manifest.js +1 -1
  145. package/.next/standalone/.next/server/app/api/ideas/[uuid]/move/preview/route.js +1 -1
  146. package/.next/standalone/.next/server/app/api/ideas/[uuid]/move/preview/route.js.nft.json +1 -1
  147. package/.next/standalone/.next/server/app/api/ideas/[uuid]/move/preview/route_client-reference-manifest.js +1 -1
  148. package/.next/standalone/.next/server/app/api/ideas/[uuid]/move/route.js +1 -1
  149. package/.next/standalone/.next/server/app/api/ideas/[uuid]/move/route.js.nft.json +1 -1
  150. package/.next/standalone/.next/server/app/api/ideas/[uuid]/move/route_client-reference-manifest.js +1 -1
  151. package/.next/standalone/.next/server/app/api/ideas/[uuid]/parent/route.js +1 -1
  152. package/.next/standalone/.next/server/app/api/ideas/[uuid]/parent/route.js.nft.json +1 -1
  153. package/.next/standalone/.next/server/app/api/ideas/[uuid]/parent/route_client-reference-manifest.js +1 -1
  154. package/.next/standalone/.next/server/app/api/ideas/[uuid]/release/route.js +1 -1
  155. package/.next/standalone/.next/server/app/api/ideas/[uuid]/release/route.js.nft.json +1 -1
  156. package/.next/standalone/.next/server/app/api/ideas/[uuid]/release/route_client-reference-manifest.js +1 -1
  157. package/.next/standalone/.next/server/app/api/ideas/[uuid]/route.js +1 -1
  158. package/.next/standalone/.next/server/app/api/ideas/[uuid]/route.js.nft.json +1 -1
  159. package/.next/standalone/.next/server/app/api/ideas/[uuid]/route_client-reference-manifest.js +1 -1
  160. package/.next/standalone/.next/server/app/api/ideas/conversational/route.js +1 -0
  161. package/.next/standalone/.next/server/app/api/{auth/refresh → ideas/conversational}/route.js.nft.json +1 -1
  162. package/.next/standalone/.next/server/app/api/ideas/conversational/route_client-reference-manifest.js +1 -0
  163. package/.next/standalone/.next/server/app/api/mcp/route.js +2 -2
  164. package/.next/standalone/.next/server/app/api/mcp/route.js.nft.json +1 -1
  165. package/.next/standalone/.next/server/app/api/mcp/route_client-reference-manifest.js +1 -1
  166. package/.next/standalone/.next/server/app/api/me/assignments/route.js +1 -1
  167. package/.next/standalone/.next/server/app/api/me/assignments/route.js.nft.json +1 -1
  168. package/.next/standalone/.next/server/app/api/me/assignments/route_client-reference-manifest.js +1 -1
  169. package/.next/standalone/.next/server/app/api/mentionables/route.js +1 -1
  170. package/.next/standalone/.next/server/app/api/mentionables/route.js.nft.json +1 -1
  171. package/.next/standalone/.next/server/app/api/mentionables/route_client-reference-manifest.js +1 -1
  172. package/.next/standalone/.next/server/app/api/notifications/[uuid]/archive/route.js +1 -1
  173. package/.next/standalone/.next/server/app/api/notifications/[uuid]/archive/route.js.nft.json +1 -1
  174. package/.next/standalone/.next/server/app/api/notifications/[uuid]/archive/route_client-reference-manifest.js +1 -1
  175. package/.next/standalone/.next/server/app/api/notifications/[uuid]/read/route.js +1 -1
  176. package/.next/standalone/.next/server/app/api/notifications/[uuid]/read/route.js.nft.json +1 -1
  177. package/.next/standalone/.next/server/app/api/notifications/[uuid]/read/route_client-reference-manifest.js +1 -1
  178. package/.next/standalone/.next/server/app/api/notifications/preferences/route.js +1 -1
  179. package/.next/standalone/.next/server/app/api/notifications/preferences/route.js.nft.json +1 -1
  180. package/.next/standalone/.next/server/app/api/notifications/preferences/route_client-reference-manifest.js +1 -1
  181. package/.next/standalone/.next/server/app/api/notifications/read-all/route.js +1 -1
  182. package/.next/standalone/.next/server/app/api/notifications/read-all/route.js.nft.json +1 -1
  183. package/.next/standalone/.next/server/app/api/notifications/read-all/route_client-reference-manifest.js +1 -1
  184. package/.next/standalone/.next/server/app/api/notifications/route.js +1 -1
  185. package/.next/standalone/.next/server/app/api/notifications/route.js.nft.json +1 -1
  186. package/.next/standalone/.next/server/app/api/notifications/route_client-reference-manifest.js +1 -1
  187. package/.next/standalone/.next/server/app/api/notifications/unread-count/route.js +1 -1
  188. package/.next/standalone/.next/server/app/api/notifications/unread-count/route.js.nft.json +1 -1
  189. package/.next/standalone/.next/server/app/api/notifications/unread-count/route_client-reference-manifest.js +1 -1
  190. package/.next/standalone/.next/server/app/api/project-groups/[uuid]/dashboard/route.js +1 -1
  191. package/.next/standalone/.next/server/app/api/project-groups/[uuid]/dashboard/route.js.nft.json +1 -1
  192. package/.next/standalone/.next/server/app/api/project-groups/[uuid]/dashboard/route_client-reference-manifest.js +1 -1
  193. package/.next/standalone/.next/server/app/api/project-groups/[uuid]/route.js +1 -1
  194. package/.next/standalone/.next/server/app/api/project-groups/[uuid]/route.js.nft.json +1 -1
  195. package/.next/standalone/.next/server/app/api/project-groups/[uuid]/route_client-reference-manifest.js +1 -1
  196. package/.next/standalone/.next/server/app/api/project-groups/route.js +1 -1
  197. package/.next/standalone/.next/server/app/api/project-groups/route.js.nft.json +1 -1
  198. package/.next/standalone/.next/server/app/api/project-groups/route_client-reference-manifest.js +1 -1
  199. package/.next/standalone/.next/server/app/api/projects/[uuid]/activity/route_client-reference-manifest.js +1 -1
  200. package/.next/standalone/.next/server/app/api/projects/[uuid]/available/route.js +1 -1
  201. package/.next/standalone/.next/server/app/api/projects/[uuid]/available/route.js.nft.json +1 -1
  202. package/.next/standalone/.next/server/app/api/projects/[uuid]/available/route_client-reference-manifest.js +1 -1
  203. package/.next/standalone/.next/server/app/api/projects/[uuid]/documents/route.js +1 -1
  204. package/.next/standalone/.next/server/app/api/projects/[uuid]/documents/route.js.nft.json +1 -1
  205. package/.next/standalone/.next/server/app/api/projects/[uuid]/documents/route_client-reference-manifest.js +1 -1
  206. package/.next/standalone/.next/server/app/api/projects/[uuid]/group/route.js +1 -1
  207. package/.next/standalone/.next/server/app/api/projects/[uuid]/group/route.js.nft.json +1 -1
  208. package/.next/standalone/.next/server/app/api/projects/[uuid]/group/route_client-reference-manifest.js +1 -1
  209. package/.next/standalone/.next/server/app/api/projects/[uuid]/ideas/route.js +1 -1
  210. package/.next/standalone/.next/server/app/api/projects/[uuid]/ideas/route.js.nft.json +1 -1
  211. package/.next/standalone/.next/server/app/api/projects/[uuid]/ideas/route_client-reference-manifest.js +1 -1
  212. package/.next/standalone/.next/server/app/api/projects/[uuid]/ideas/tracker/route.js +1 -1
  213. package/.next/standalone/.next/server/app/api/projects/[uuid]/ideas/tracker/route.js.nft.json +1 -1
  214. package/.next/standalone/.next/server/app/api/projects/[uuid]/ideas/tracker/route_client-reference-manifest.js +1 -1
  215. package/.next/standalone/.next/server/app/api/projects/[uuid]/proposals/[proposalUuid]/validate/route.js +1 -1
  216. package/.next/standalone/.next/server/app/api/projects/[uuid]/proposals/[proposalUuid]/validate/route.js.nft.json +1 -1
  217. package/.next/standalone/.next/server/app/api/projects/[uuid]/proposals/[proposalUuid]/validate/route_client-reference-manifest.js +1 -1
  218. package/.next/standalone/.next/server/app/api/projects/[uuid]/proposals/route.js +1 -1
  219. package/.next/standalone/.next/server/app/api/projects/[uuid]/proposals/route.js.nft.json +1 -1
  220. package/.next/standalone/.next/server/app/api/projects/[uuid]/proposals/route_client-reference-manifest.js +1 -1
  221. package/.next/standalone/.next/server/app/api/projects/[uuid]/proposals/summary/route.js +1 -1
  222. package/.next/standalone/.next/server/app/api/projects/[uuid]/proposals/summary/route.js.nft.json +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]/resource-graph/route.js +1 -1
  225. package/.next/standalone/.next/server/app/api/projects/[uuid]/resource-graph/route.js.nft.json +1 -1
  226. package/.next/standalone/.next/server/app/api/projects/[uuid]/resource-graph/route_client-reference-manifest.js +1 -1
  227. package/.next/standalone/.next/server/app/api/projects/[uuid]/route.js +1 -1
  228. package/.next/standalone/.next/server/app/api/projects/[uuid]/route.js.nft.json +1 -1
  229. package/.next/standalone/.next/server/app/api/projects/[uuid]/route_client-reference-manifest.js +1 -1
  230. package/.next/standalone/.next/server/app/api/projects/[uuid]/stats/route.js +1 -1
  231. package/.next/standalone/.next/server/app/api/projects/[uuid]/stats/route.js.nft.json +1 -1
  232. package/.next/standalone/.next/server/app/api/projects/[uuid]/stats/route_client-reference-manifest.js +1 -1
  233. package/.next/standalone/.next/server/app/api/projects/[uuid]/tasks/dependencies/route.js +1 -1
  234. package/.next/standalone/.next/server/app/api/projects/[uuid]/tasks/dependencies/route.js.nft.json +1 -1
  235. package/.next/standalone/.next/server/app/api/projects/[uuid]/tasks/dependencies/route_client-reference-manifest.js +1 -1
  236. package/.next/standalone/.next/server/app/api/projects/[uuid]/tasks/route.js +1 -1
  237. package/.next/standalone/.next/server/app/api/projects/[uuid]/tasks/route.js.nft.json +1 -1
  238. package/.next/standalone/.next/server/app/api/projects/[uuid]/tasks/route_client-reference-manifest.js +1 -1
  239. package/.next/standalone/.next/server/app/api/projects/route_client-reference-manifest.js +1 -1
  240. package/.next/standalone/.next/server/app/api/proposals/[uuid]/approve/route.js +1 -1
  241. package/.next/standalone/.next/server/app/api/proposals/[uuid]/approve/route.js.nft.json +1 -1
  242. package/.next/standalone/.next/server/app/api/proposals/[uuid]/approve/route_client-reference-manifest.js +1 -1
  243. package/.next/standalone/.next/server/app/api/proposals/[uuid]/close/route.js +1 -1
  244. package/.next/standalone/.next/server/app/api/proposals/[uuid]/close/route.js.nft.json +1 -1
  245. package/.next/standalone/.next/server/app/api/proposals/[uuid]/close/route_client-reference-manifest.js +1 -1
  246. package/.next/standalone/.next/server/app/api/proposals/[uuid]/reject/route.js +1 -1
  247. package/.next/standalone/.next/server/app/api/proposals/[uuid]/reject/route.js.nft.json +1 -1
  248. package/.next/standalone/.next/server/app/api/proposals/[uuid]/reject/route_client-reference-manifest.js +1 -1
  249. package/.next/standalone/.next/server/app/api/proposals/[uuid]/revoke/route.js +1 -1
  250. package/.next/standalone/.next/server/app/api/proposals/[uuid]/revoke/route.js.nft.json +1 -1
  251. package/.next/standalone/.next/server/app/api/proposals/[uuid]/revoke/route_client-reference-manifest.js +1 -1
  252. package/.next/standalone/.next/server/app/api/proposals/[uuid]/route.js +1 -1
  253. package/.next/standalone/.next/server/app/api/proposals/[uuid]/route.js.nft.json +1 -1
  254. package/.next/standalone/.next/server/app/api/proposals/[uuid]/route_client-reference-manifest.js +1 -1
  255. package/.next/standalone/.next/server/app/api/search/route_client-reference-manifest.js +1 -1
  256. package/.next/standalone/.next/server/app/api/session/route.js +1 -0
  257. package/.next/standalone/.next/server/app/api/session/route.js.nft.json +1 -0
  258. package/.next/standalone/.next/server/app/api/session/route_client-reference-manifest.js +1 -0
  259. package/.next/standalone/.next/server/app/api/sessions/[uuid]/route.js +1 -1
  260. package/.next/standalone/.next/server/app/api/sessions/[uuid]/route.js.nft.json +1 -1
  261. package/.next/standalone/.next/server/app/api/sessions/[uuid]/route_client-reference-manifest.js +1 -1
  262. package/.next/standalone/.next/server/app/api/tasks/[uuid]/claim/route.js +1 -1
  263. package/.next/standalone/.next/server/app/api/tasks/[uuid]/claim/route.js.nft.json +1 -1
  264. package/.next/standalone/.next/server/app/api/tasks/[uuid]/claim/route_client-reference-manifest.js +1 -1
  265. package/.next/standalone/.next/server/app/api/tasks/[uuid]/dependencies/[dependsOnUuid]/route.js +1 -1
  266. package/.next/standalone/.next/server/app/api/tasks/[uuid]/dependencies/[dependsOnUuid]/route.js.nft.json +1 -1
  267. package/.next/standalone/.next/server/app/api/tasks/[uuid]/dependencies/[dependsOnUuid]/route_client-reference-manifest.js +1 -1
  268. package/.next/standalone/.next/server/app/api/tasks/[uuid]/dependencies/route.js +1 -1
  269. package/.next/standalone/.next/server/app/api/tasks/[uuid]/dependencies/route.js.nft.json +1 -1
  270. package/.next/standalone/.next/server/app/api/tasks/[uuid]/dependencies/route_client-reference-manifest.js +1 -1
  271. package/.next/standalone/.next/server/app/api/tasks/[uuid]/release/route.js +1 -1
  272. package/.next/standalone/.next/server/app/api/tasks/[uuid]/release/route.js.nft.json +1 -1
  273. package/.next/standalone/.next/server/app/api/tasks/[uuid]/release/route_client-reference-manifest.js +1 -1
  274. package/.next/standalone/.next/server/app/api/tasks/[uuid]/route.js +1 -1
  275. package/.next/standalone/.next/server/app/api/tasks/[uuid]/route.js.nft.json +1 -1
  276. package/.next/standalone/.next/server/app/api/tasks/[uuid]/route_client-reference-manifest.js +1 -1
  277. package/.next/standalone/.next/server/app/api/tasks/[uuid]/sessions/route.js +1 -1
  278. package/.next/standalone/.next/server/app/api/tasks/[uuid]/sessions/route.js.nft.json +1 -1
  279. package/.next/standalone/.next/server/app/api/tasks/[uuid]/sessions/route_client-reference-manifest.js +1 -1
  280. package/.next/standalone/.next/server/app/index.html +1 -1
  281. package/.next/standalone/.next/server/app/index.rsc +3 -3
  282. package/.next/standalone/.next/server/app/login/admin/page.js +2 -2
  283. package/.next/standalone/.next/server/app/login/admin/page.js.nft.json +1 -1
  284. package/.next/standalone/.next/server/app/login/admin/page_client-reference-manifest.js +1 -1
  285. package/.next/standalone/.next/server/app/login/admin.html +1 -1
  286. package/.next/standalone/.next/server/app/login/admin.rsc +2 -2
  287. package/.next/standalone/.next/server/app/login/callback/page.js +2 -2
  288. package/.next/standalone/.next/server/app/login/callback/page.js.nft.json +1 -1
  289. package/.next/standalone/.next/server/app/login/callback/page_client-reference-manifest.js +1 -1
  290. package/.next/standalone/.next/server/app/login/callback.html +1 -1
  291. package/.next/standalone/.next/server/app/login/callback.rsc +3 -3
  292. package/.next/standalone/.next/server/app/login/page.js +2 -2
  293. package/.next/standalone/.next/server/app/login/page.js.nft.json +1 -1
  294. package/.next/standalone/.next/server/app/login/page_client-reference-manifest.js +1 -1
  295. package/.next/standalone/.next/server/app/login/pick-workspace/page.js +1 -1
  296. package/.next/standalone/.next/server/app/login/pick-workspace/page_client-reference-manifest.js +1 -1
  297. package/.next/standalone/.next/server/app/login/pick-workspace.html +1 -1
  298. package/.next/standalone/.next/server/app/login/pick-workspace.rsc +3 -3
  299. package/.next/standalone/.next/server/app/login.html +1 -1
  300. package/.next/standalone/.next/server/app/login.rsc +3 -3
  301. package/.next/standalone/.next/server/app/onboarding/page.js +2 -2
  302. package/.next/standalone/.next/server/app/onboarding/page.js.nft.json +1 -1
  303. package/.next/standalone/.next/server/app/onboarding/page_client-reference-manifest.js +1 -1
  304. package/.next/standalone/.next/server/app/onboarding.html +1 -1
  305. package/.next/standalone/.next/server/app/onboarding.rsc +3 -3
  306. package/.next/standalone/.next/server/app/page.js +2 -2
  307. package/.next/standalone/.next/server/app/page.js.nft.json +1 -1
  308. package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
  309. package/.next/standalone/.next/server/app/projects.html +1 -1
  310. package/.next/standalone/.next/server/app/projects.rsc +4 -4
  311. package/.next/standalone/.next/server/app/settings.html +1 -1
  312. package/.next/standalone/.next/server/app/settings.rsc +4 -4
  313. package/.next/standalone/.next/server/app-paths-manifest.json +39 -41
  314. package/.next/standalone/.next/server/chunks/1114.js +1 -0
  315. package/.next/standalone/.next/server/chunks/1559.js +2 -2
  316. package/.next/standalone/.next/server/chunks/{7258.js → 2516.js} +1 -1
  317. package/.next/standalone/.next/server/chunks/2618.js +1 -1
  318. package/.next/standalone/.next/server/chunks/2961.js +1 -1
  319. package/.next/standalone/.next/server/chunks/3219.js +1 -1
  320. package/.next/standalone/.next/server/chunks/3371.js +1 -0
  321. package/.next/standalone/.next/server/chunks/3373.js +1 -1
  322. package/.next/standalone/.next/server/chunks/3419.js +1 -1
  323. package/.next/standalone/.next/server/chunks/4827.js +1 -0
  324. package/.next/standalone/.next/server/chunks/4958.js +1 -0
  325. package/.next/standalone/.next/server/chunks/{9855.js → 5095.js} +2 -2
  326. package/.next/standalone/.next/server/chunks/5300.js +1 -1
  327. package/.next/standalone/.next/server/chunks/6113.js +1 -1
  328. package/.next/standalone/.next/server/chunks/6207.js +1 -1
  329. package/.next/standalone/.next/server/chunks/6496.js +1 -0
  330. package/.next/standalone/.next/server/chunks/679.js +1 -1
  331. package/.next/standalone/.next/server/chunks/6817.js +1 -0
  332. package/.next/standalone/.next/server/chunks/{178.js → 704.js} +3 -3
  333. package/.next/standalone/.next/server/chunks/7160.js +1 -1
  334. package/.next/standalone/.next/server/chunks/7364.js +1 -1
  335. package/.next/standalone/.next/server/chunks/7368.js +1 -1
  336. package/.next/standalone/.next/server/chunks/8448.js +1 -0
  337. package/.next/standalone/.next/server/chunks/{8267.js → 8481.js} +1 -1
  338. package/.next/standalone/.next/server/chunks/8497.js +1 -0
  339. package/.next/standalone/.next/server/chunks/8577.js +153 -0
  340. package/.next/standalone/.next/server/chunks/8895.js +1 -0
  341. package/.next/standalone/.next/server/chunks/920.js +1 -1
  342. package/.next/standalone/.next/server/chunks/9726.js +1 -0
  343. package/.next/standalone/.next/server/instrumentation.js +1 -1
  344. package/.next/standalone/.next/server/middleware-build-manifest.js +1 -1
  345. package/.next/standalone/.next/server/middleware-manifest.json +5 -5
  346. package/.next/standalone/.next/server/pages/404.html +1 -1
  347. package/.next/standalone/.next/server/pages/500.html +1 -1
  348. package/.next/standalone/.next/server/server-reference-manifest.js +1 -1
  349. package/.next/standalone/.next/server/server-reference-manifest.json +1 -1
  350. package/.next/standalone/.next/server/src/middleware.js +5 -5
  351. package/.next/standalone/.next/static/chunks/15653-31c406c41bf58048.js +1 -0
  352. package/.next/standalone/.next/static/chunks/1892-9c03d4d3560ff572.js +1 -0
  353. package/.next/standalone/.next/static/chunks/225-8a41a800021f3d11.js +1 -0
  354. package/.next/standalone/.next/static/chunks/24459-3bc9657d71c77b47.js +1 -0
  355. package/.next/standalone/.next/static/chunks/38296-316ba18af72385fb.js +1 -0
  356. package/.next/standalone/.next/static/chunks/46055-f786ace4b994dc40.js +1 -0
  357. package/.next/standalone/.next/static/chunks/{4860.c3c83713d1f163a5.js → 4860.7844c573cb3914f3.js} +1 -1
  358. package/.next/standalone/.next/static/chunks/{49965-fa11628d5ac8fbbe.js → 52064-74d81c8d682deb6b.js} +1 -1
  359. package/.next/standalone/.next/static/chunks/57362-9ece5cc290dab705.js +1 -0
  360. package/.next/standalone/.next/static/chunks/{14655-4f3bc7f3044c42c1.js → 58037-55d7422c6b808356.js} +1 -1
  361. package/.next/standalone/.next/static/chunks/58262-395c00e04f610a32.js +1 -0
  362. package/.next/standalone/.next/static/chunks/68255-05c42a26602c6b37.js +1 -0
  363. package/.next/standalone/.next/static/chunks/75752-cc8fafe132943baa.js +1 -0
  364. package/.next/standalone/.next/static/chunks/80350-8ac8d602965bb4df.js +1 -0
  365. package/.next/standalone/.next/static/chunks/84169-71a87d06871ec9df.js +1 -0
  366. package/.next/standalone/.next/static/chunks/94528-ed3f03485480f5e5.js +1 -0
  367. package/.next/standalone/.next/static/chunks/94743-aff8a51a7f7970a9.js +1 -0
  368. package/.next/standalone/.next/static/chunks/{36493-5326c14a7240edc8.js → 97306-8834e12cdbeed920.js} +1 -1
  369. package/.next/standalone/.next/static/chunks/{99373.2b68fce200cc323e.js → 99373.6f0ec031fb759d88.js} +1 -1
  370. package/.next/standalone/.next/static/chunks/app/(dashboard)/layout-a3747bde1ddaba52.js +1 -0
  371. package/.next/standalone/.next/static/chunks/app/(dashboard)/project-groups/[uuid]/page-87b79c98e46fbd04.js +1 -0
  372. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/dashboard/[ideaUuid]/page-47e1d397c5fcef9e.js +1 -0
  373. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/dashboard/page-f72f17eb58614d2b.js +1 -0
  374. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/documents/[documentUuid]/page-0467d744b84aa2c2.js +1 -0
  375. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/documents/{page-7ebb779f0db4c58b.js → page-7abff55f9bfebab3.js} +1 -1
  376. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/graph/page-3238e0b5474c60f6.js +1 -0
  377. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/proposals/[proposalUuid]/page-9f0ebba7e855b2f9.js +1 -0
  378. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/proposals/new/page-6dbfbe5d97855e42.js +1 -0
  379. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/proposals/page-b8fbcac7224342db.js +1 -0
  380. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/tasks/[taskUuid]/page-0a04a31e1b383094.js +1 -0
  381. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/tasks/page-e2a69b645ec9ae13.js +1 -0
  382. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/{page-0bc22273214e522f.js → page-b760877bfcd12dff.js} +1 -1
  383. package/.next/standalone/.next/static/chunks/app/(dashboard)/settings/page-111aed4d3319d64b.js +1 -0
  384. package/.next/standalone/.next/static/chunks/app/api/admin/companies/[uuid]/route-47e1d397c5fcef9e.js +1 -0
  385. package/.next/standalone/.next/static/chunks/app/api/admin/companies/route-47e1d397c5fcef9e.js +1 -0
  386. package/.next/standalone/.next/static/chunks/app/api/admin/login/route-47e1d397c5fcef9e.js +1 -0
  387. package/.next/standalone/.next/static/chunks/app/api/admin/session/route-47e1d397c5fcef9e.js +1 -0
  388. package/.next/standalone/.next/static/chunks/app/api/agent-connections/route-47e1d397c5fcef9e.js +1 -0
  389. package/.next/standalone/.next/static/chunks/app/api/agents/[uuid]/route-47e1d397c5fcef9e.js +1 -0
  390. package/.next/standalone/.next/static/chunks/app/api/agents/[uuid]/sessions/route-47e1d397c5fcef9e.js +1 -0
  391. package/.next/standalone/.next/static/chunks/app/api/agents/route-47e1d397c5fcef9e.js +1 -0
  392. package/.next/standalone/.next/static/chunks/app/api/api-keys/[uuid]/route-47e1d397c5fcef9e.js +1 -0
  393. package/.next/standalone/.next/static/chunks/app/api/api-keys/route-47e1d397c5fcef9e.js +1 -0
  394. package/.next/standalone/.next/static/chunks/app/api/auth/callback/route-47e1d397c5fcef9e.js +1 -0
  395. package/.next/standalone/.next/static/chunks/app/api/auth/check-default/route-47e1d397c5fcef9e.js +1 -0
  396. package/.next/standalone/.next/static/chunks/app/api/auth/company-oidc/route-47e1d397c5fcef9e.js +1 -0
  397. package/.next/standalone/.next/static/chunks/app/api/auth/default-login/route-47e1d397c5fcef9e.js +1 -0
  398. package/.next/standalone/.next/static/chunks/app/api/auth/identify/route-47e1d397c5fcef9e.js +1 -0
  399. package/.next/standalone/.next/static/chunks/app/api/auth/logout/route-47e1d397c5fcef9e.js +1 -0
  400. package/.next/standalone/.next/static/chunks/app/api/auth/me/route-47e1d397c5fcef9e.js +1 -0
  401. package/.next/standalone/.next/static/chunks/app/api/auth/sync-token/route-47e1d397c5fcef9e.js +1 -0
  402. package/.next/standalone/.next/static/chunks/app/api/comments/route-47e1d397c5fcef9e.js +1 -0
  403. package/.next/standalone/.next/static/chunks/app/api/daemon/control/route-47e1d397c5fcef9e.js +1 -0
  404. package/.next/standalone/.next/static/chunks/app/api/daemon/execution-state/route-47e1d397c5fcef9e.js +1 -0
  405. package/.next/standalone/.next/static/chunks/app/api/daemon/executions/route-47e1d397c5fcef9e.js +1 -0
  406. package/.next/standalone/.next/static/chunks/app/api/daemon/pending-turns/route-47e1d397c5fcef9e.js +1 -0
  407. package/.next/standalone/.next/static/chunks/app/api/daemon/report-interrupt/route-47e1d397c5fcef9e.js +1 -0
  408. package/.next/standalone/.next/static/chunks/app/api/daemon/resume/route-47e1d397c5fcef9e.js +1 -0
  409. package/.next/standalone/.next/static/chunks/app/api/daemon/transcript/route-47e1d397c5fcef9e.js +1 -0
  410. package/.next/standalone/.next/static/chunks/app/api/daemon/turn-advance/route-47e1d397c5fcef9e.js +1 -0
  411. package/.next/standalone/.next/static/chunks/app/api/daemon-sessions/[sessionUuid]/instruction/route-47e1d397c5fcef9e.js +1 -0
  412. package/.next/standalone/.next/static/chunks/app/api/daemon-sessions/[sessionUuid]/repoint/route-47e1d397c5fcef9e.js +1 -0
  413. package/.next/standalone/.next/static/chunks/app/api/daemon-sessions/[sessionUuid]/route-47e1d397c5fcef9e.js +1 -0
  414. package/.next/standalone/.next/static/chunks/app/api/daemon-sessions/ad-hoc/route-47e1d397c5fcef9e.js +1 -0
  415. package/.next/standalone/.next/static/chunks/app/api/daemon-sessions/route-47e1d397c5fcef9e.js +1 -0
  416. package/.next/standalone/.next/static/chunks/app/api/documents/[uuid]/route-47e1d397c5fcef9e.js +1 -0
  417. package/.next/standalone/.next/static/chunks/app/api/entities/[type]/[uuid]/root-idea/route-47e1d397c5fcef9e.js +1 -0
  418. package/.next/standalone/.next/static/chunks/app/api/events/notifications/route-47e1d397c5fcef9e.js +1 -0
  419. package/.next/standalone/.next/static/chunks/app/api/events/route-47e1d397c5fcef9e.js +1 -0
  420. package/.next/standalone/.next/static/chunks/app/api/health/route-47e1d397c5fcef9e.js +1 -0
  421. package/.next/standalone/.next/static/chunks/app/api/ideas/[uuid]/claim/route-47e1d397c5fcef9e.js +1 -0
  422. package/.next/standalone/.next/static/chunks/app/api/ideas/[uuid]/move/preview/route-47e1d397c5fcef9e.js +1 -0
  423. package/.next/standalone/.next/static/chunks/app/api/ideas/[uuid]/move/route-47e1d397c5fcef9e.js +1 -0
  424. package/.next/standalone/.next/static/chunks/app/api/ideas/[uuid]/parent/route-47e1d397c5fcef9e.js +1 -0
  425. package/.next/standalone/.next/static/chunks/app/api/ideas/[uuid]/release/route-47e1d397c5fcef9e.js +1 -0
  426. package/.next/standalone/.next/static/chunks/app/api/ideas/[uuid]/route-47e1d397c5fcef9e.js +1 -0
  427. package/.next/standalone/.next/static/chunks/app/api/ideas/conversational/route-47e1d397c5fcef9e.js +1 -0
  428. package/.next/standalone/.next/static/chunks/app/api/mcp/route-47e1d397c5fcef9e.js +1 -0
  429. package/.next/standalone/.next/static/chunks/app/api/me/assignments/route-47e1d397c5fcef9e.js +1 -0
  430. package/.next/standalone/.next/static/chunks/app/api/mentionables/route-47e1d397c5fcef9e.js +1 -0
  431. package/.next/standalone/.next/static/chunks/app/api/notifications/[uuid]/archive/route-47e1d397c5fcef9e.js +1 -0
  432. package/.next/standalone/.next/static/chunks/app/api/notifications/[uuid]/read/route-47e1d397c5fcef9e.js +1 -0
  433. package/.next/standalone/.next/static/chunks/app/api/notifications/preferences/route-47e1d397c5fcef9e.js +1 -0
  434. package/.next/standalone/.next/static/chunks/app/api/notifications/read-all/route-47e1d397c5fcef9e.js +1 -0
  435. package/.next/standalone/.next/static/chunks/app/api/notifications/route-47e1d397c5fcef9e.js +1 -0
  436. package/.next/standalone/.next/static/chunks/app/api/notifications/unread-count/route-47e1d397c5fcef9e.js +1 -0
  437. package/.next/standalone/.next/static/chunks/app/api/project-groups/[uuid]/dashboard/route-47e1d397c5fcef9e.js +1 -0
  438. package/.next/standalone/.next/static/chunks/app/api/project-groups/[uuid]/route-47e1d397c5fcef9e.js +1 -0
  439. package/.next/standalone/.next/static/chunks/app/api/project-groups/route-47e1d397c5fcef9e.js +1 -0
  440. package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/activity/route-47e1d397c5fcef9e.js +1 -0
  441. package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/available/route-47e1d397c5fcef9e.js +1 -0
  442. package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/documents/route-47e1d397c5fcef9e.js +1 -0
  443. package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/group/route-47e1d397c5fcef9e.js +1 -0
  444. package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/ideas/route-47e1d397c5fcef9e.js +1 -0
  445. package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/ideas/tracker/route-47e1d397c5fcef9e.js +1 -0
  446. package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/proposals/[proposalUuid]/validate/route-47e1d397c5fcef9e.js +1 -0
  447. package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/proposals/route-47e1d397c5fcef9e.js +1 -0
  448. package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/proposals/summary/route-47e1d397c5fcef9e.js +1 -0
  449. package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/resource-graph/route-47e1d397c5fcef9e.js +1 -0
  450. package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/route-47e1d397c5fcef9e.js +1 -0
  451. package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/stats/route-47e1d397c5fcef9e.js +1 -0
  452. package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/tasks/dependencies/route-47e1d397c5fcef9e.js +1 -0
  453. package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/tasks/route-47e1d397c5fcef9e.js +1 -0
  454. package/.next/standalone/.next/static/chunks/app/api/projects/route-47e1d397c5fcef9e.js +1 -0
  455. package/.next/standalone/.next/static/chunks/app/api/proposals/[uuid]/approve/route-47e1d397c5fcef9e.js +1 -0
  456. package/.next/standalone/.next/static/chunks/app/api/proposals/[uuid]/close/route-47e1d397c5fcef9e.js +1 -0
  457. package/.next/standalone/.next/static/chunks/app/api/proposals/[uuid]/reject/route-47e1d397c5fcef9e.js +1 -0
  458. package/.next/standalone/.next/static/chunks/app/api/proposals/[uuid]/revoke/route-47e1d397c5fcef9e.js +1 -0
  459. package/.next/standalone/.next/static/chunks/app/api/proposals/[uuid]/route-47e1d397c5fcef9e.js +1 -0
  460. package/.next/standalone/.next/static/chunks/app/api/search/route-47e1d397c5fcef9e.js +1 -0
  461. package/.next/standalone/.next/static/chunks/app/api/session/route-47e1d397c5fcef9e.js +1 -0
  462. package/.next/standalone/.next/static/chunks/app/api/sessions/[uuid]/route-47e1d397c5fcef9e.js +1 -0
  463. package/.next/standalone/.next/static/chunks/app/api/tasks/[uuid]/claim/route-47e1d397c5fcef9e.js +1 -0
  464. package/.next/standalone/.next/static/chunks/app/api/tasks/[uuid]/dependencies/[dependsOnUuid]/route-47e1d397c5fcef9e.js +1 -0
  465. package/.next/standalone/.next/static/chunks/app/api/tasks/[uuid]/dependencies/route-47e1d397c5fcef9e.js +1 -0
  466. package/.next/standalone/.next/static/chunks/app/api/tasks/[uuid]/release/route-47e1d397c5fcef9e.js +1 -0
  467. package/.next/standalone/.next/static/chunks/app/api/tasks/[uuid]/route-47e1d397c5fcef9e.js +1 -0
  468. package/.next/standalone/.next/static/chunks/app/api/tasks/[uuid]/sessions/route-47e1d397c5fcef9e.js +1 -0
  469. package/.next/standalone/.next/static/chunks/app/login/callback/page-39a43f6d0245f8ca.js +1 -0
  470. package/.next/standalone/.next/static/chunks/app/login/page-acda3a31dc6a8280.js +1 -0
  471. package/.next/standalone/.next/static/chunks/app/login/pick-workspace/page-10683852baf17426.js +1 -0
  472. package/.next/standalone/.next/static/chunks/app/onboarding/{page-500aded75bf11ed6.js → page-8e20c8aa8ff90326.js} +1 -1
  473. package/.next/standalone/.next/static/chunks/app/page-000b1349c8d5b652.js +1 -0
  474. package/.next/standalone/.next/static/chunks/{webpack-7483083a976ed3d7.js → webpack-fe12dfe2e0d0e4f3.js} +1 -1
  475. package/.next/standalone/.next/static/css/3f3ae2bdc9e55259.css +1 -0
  476. package/.next/standalone/.next/static/eORNzMShbzkJbNfQT8MbW/_buildManifest.js +1 -0
  477. package/.next/standalone/package.json +1 -1
  478. package/.next/standalone/public/chorus-plugin/skills/develop/SKILL.md +2 -0
  479. package/.next/standalone/public/chorus-plugin/skills/idea/SKILL.md +2 -0
  480. package/.next/standalone/public/skill/develop-chorus/SKILL.md +2 -0
  481. package/.next/standalone/public/skill/idea-chorus/SKILL.md +2 -0
  482. package/README.md +15 -2
  483. package/README.zh.md +15 -2
  484. package/cli/client-args.mjs +31 -9
  485. package/cli/control-handler.mjs +22 -5
  486. package/cli/daemon-lifecycle.mjs +192 -25
  487. package/cli/daemon-rest-client.mjs +6 -2
  488. package/cli/daemon-service.mjs +422 -0
  489. package/cli/daemon.mjs +181 -13
  490. package/cli/event-router.mjs +29 -10
  491. package/cli/prompts.mjs +61 -0
  492. package/cli/turn-reporter.mjs +26 -5
  493. package/cli/wake-queue.mjs +30 -0
  494. package/cli/waker.mjs +91 -22
  495. package/package.json +1 -1
  496. package/prisma/migrations/20260704023331_add_turn_interrupted_state/migration.sql +2 -0
  497. package/prisma/schema.prisma +9 -2
  498. package/.next/standalone/.next/server/app/api/auth/refresh/route.js +0 -1
  499. package/.next/standalone/.next/server/app/api/auth/refresh/route_client-reference-manifest.js +0 -1
  500. package/.next/standalone/.next/server/app/api/auth/session/route.js +0 -1
  501. package/.next/standalone/.next/server/app/api/auth/session/route.js.nft.json +0 -1
  502. package/.next/standalone/.next/server/app/api/auth/session/route_client-reference-manifest.js +0 -1
  503. package/.next/standalone/.next/server/app/api/keepalive/route.js +0 -1
  504. package/.next/standalone/.next/server/app/api/keepalive/route.js.nft.json +0 -1
  505. package/.next/standalone/.next/server/app/api/keepalive/route_client-reference-manifest.js +0 -1
  506. package/.next/standalone/.next/server/app/login/silent-refresh/page.js +0 -2
  507. package/.next/standalone/.next/server/app/login/silent-refresh/page.js.nft.json +0 -1
  508. package/.next/standalone/.next/server/app/login/silent-refresh/page_client-reference-manifest.js +0 -1
  509. package/.next/standalone/.next/server/app/login/silent-refresh.html +0 -1
  510. package/.next/standalone/.next/server/app/login/silent-refresh.meta +0 -7
  511. package/.next/standalone/.next/server/app/login/silent-refresh.rsc +0 -24
  512. package/.next/standalone/.next/server/chunks/1463.js +0 -1
  513. package/.next/standalone/.next/server/chunks/298.js +0 -1
  514. package/.next/standalone/.next/server/chunks/5011.js +0 -1
  515. package/.next/standalone/.next/server/chunks/6813.js +0 -1
  516. package/.next/standalone/.next/server/chunks/7421.js +0 -1
  517. package/.next/standalone/.next/server/chunks/7515.js +0 -1
  518. package/.next/standalone/.next/server/chunks/7912.js +0 -1
  519. package/.next/standalone/.next/server/chunks/8821.js +0 -1
  520. package/.next/standalone/.next/server/chunks/9273.js +0 -1
  521. package/.next/standalone/.next/server/chunks/937.js +0 -153
  522. package/.next/standalone/.next/static/W3KEB0tOAICVtfAUfR_M9/_buildManifest.js +0 -1
  523. package/.next/standalone/.next/static/chunks/10919-7f63b2801a92b8c6.js +0 -1
  524. package/.next/standalone/.next/static/chunks/1891-d4a9e756fefba3a9.js +0 -1
  525. package/.next/standalone/.next/static/chunks/20081-a2bf5c9f24d5d589.js +0 -1
  526. package/.next/standalone/.next/static/chunks/26394-4af487a51dd62832.js +0 -1
  527. package/.next/standalone/.next/static/chunks/2987-c15f09093b821b24.js +0 -1
  528. package/.next/standalone/.next/static/chunks/37784-95dee37276b1067b.js +0 -1
  529. package/.next/standalone/.next/static/chunks/43741-aeea04ab873ac4e9.js +0 -1
  530. package/.next/standalone/.next/static/chunks/49852-5337f139a2f87c46.js +0 -1
  531. package/.next/standalone/.next/static/chunks/56812-a6fe5225adc0b2ff.js +0 -1
  532. package/.next/standalone/.next/static/chunks/64894-71b047ae8ef2f3d8.js +0 -1
  533. package/.next/standalone/.next/static/chunks/8796-69e708cb8603d8b4.js +0 -1
  534. package/.next/standalone/.next/static/chunks/91666-3fd4f3512a53ff20.js +0 -1
  535. package/.next/standalone/.next/static/chunks/97263-018d631416efa5cd.js +0 -1
  536. package/.next/standalone/.next/static/chunks/97868-55f18a05fe483d85.js +0 -1
  537. package/.next/standalone/.next/static/chunks/app/(dashboard)/layout-6061b60d52262d3c.js +0 -1
  538. package/.next/standalone/.next/static/chunks/app/(dashboard)/project-groups/[uuid]/page-78ab05c72bcd04fd.js +0 -1
  539. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/dashboard/[ideaUuid]/page-31ae6abada6e6a64.js +0 -1
  540. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/dashboard/page-478cce81afbfc145.js +0 -1
  541. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/documents/[documentUuid]/page-494b80e61b485870.js +0 -1
  542. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/graph/page-bfbfc5005de2be13.js +0 -1
  543. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/proposals/[proposalUuid]/page-fbb4dd4124525f97.js +0 -1
  544. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/proposals/new/page-164fe175720b24a1.js +0 -1
  545. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/proposals/page-2742c745a90f843f.js +0 -1
  546. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/tasks/[taskUuid]/page-f2313bf05387b39b.js +0 -1
  547. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/tasks/page-955e8fd8d7b0b7c8.js +0 -1
  548. package/.next/standalone/.next/static/chunks/app/(dashboard)/settings/page-960ab78b5055780c.js +0 -1
  549. package/.next/standalone/.next/static/chunks/app/api/admin/companies/[uuid]/route-31ae6abada6e6a64.js +0 -1
  550. package/.next/standalone/.next/static/chunks/app/api/admin/companies/route-31ae6abada6e6a64.js +0 -1
  551. package/.next/standalone/.next/static/chunks/app/api/admin/login/route-31ae6abada6e6a64.js +0 -1
  552. package/.next/standalone/.next/static/chunks/app/api/admin/session/route-31ae6abada6e6a64.js +0 -1
  553. package/.next/standalone/.next/static/chunks/app/api/agent-connections/route-31ae6abada6e6a64.js +0 -1
  554. package/.next/standalone/.next/static/chunks/app/api/agents/[uuid]/route-31ae6abada6e6a64.js +0 -1
  555. package/.next/standalone/.next/static/chunks/app/api/agents/[uuid]/sessions/route-31ae6abada6e6a64.js +0 -1
  556. package/.next/standalone/.next/static/chunks/app/api/agents/route-31ae6abada6e6a64.js +0 -1
  557. package/.next/standalone/.next/static/chunks/app/api/api-keys/[uuid]/route-31ae6abada6e6a64.js +0 -1
  558. package/.next/standalone/.next/static/chunks/app/api/api-keys/route-31ae6abada6e6a64.js +0 -1
  559. package/.next/standalone/.next/static/chunks/app/api/auth/callback/route-31ae6abada6e6a64.js +0 -1
  560. package/.next/standalone/.next/static/chunks/app/api/auth/check-default/route-31ae6abada6e6a64.js +0 -1
  561. package/.next/standalone/.next/static/chunks/app/api/auth/company-oidc/route-31ae6abada6e6a64.js +0 -1
  562. package/.next/standalone/.next/static/chunks/app/api/auth/default-login/route-31ae6abada6e6a64.js +0 -1
  563. package/.next/standalone/.next/static/chunks/app/api/auth/identify/route-31ae6abada6e6a64.js +0 -1
  564. package/.next/standalone/.next/static/chunks/app/api/auth/logout/route-31ae6abada6e6a64.js +0 -1
  565. package/.next/standalone/.next/static/chunks/app/api/auth/me/route-31ae6abada6e6a64.js +0 -1
  566. package/.next/standalone/.next/static/chunks/app/api/auth/refresh/route-31ae6abada6e6a64.js +0 -1
  567. package/.next/standalone/.next/static/chunks/app/api/auth/session/route-31ae6abada6e6a64.js +0 -1
  568. package/.next/standalone/.next/static/chunks/app/api/auth/sync-token/route-31ae6abada6e6a64.js +0 -1
  569. package/.next/standalone/.next/static/chunks/app/api/comments/route-31ae6abada6e6a64.js +0 -1
  570. package/.next/standalone/.next/static/chunks/app/api/daemon/control/route-31ae6abada6e6a64.js +0 -1
  571. package/.next/standalone/.next/static/chunks/app/api/daemon/execution-state/route-31ae6abada6e6a64.js +0 -1
  572. package/.next/standalone/.next/static/chunks/app/api/daemon/executions/route-31ae6abada6e6a64.js +0 -1
  573. package/.next/standalone/.next/static/chunks/app/api/daemon/pending-turns/route-31ae6abada6e6a64.js +0 -1
  574. package/.next/standalone/.next/static/chunks/app/api/daemon/report-interrupt/route-31ae6abada6e6a64.js +0 -1
  575. package/.next/standalone/.next/static/chunks/app/api/daemon/resume/route-31ae6abada6e6a64.js +0 -1
  576. package/.next/standalone/.next/static/chunks/app/api/daemon/transcript/route-31ae6abada6e6a64.js +0 -1
  577. package/.next/standalone/.next/static/chunks/app/api/daemon/turn-advance/route-31ae6abada6e6a64.js +0 -1
  578. package/.next/standalone/.next/static/chunks/app/api/daemon-sessions/[sessionUuid]/instruction/route-31ae6abada6e6a64.js +0 -1
  579. package/.next/standalone/.next/static/chunks/app/api/daemon-sessions/[sessionUuid]/repoint/route-31ae6abada6e6a64.js +0 -1
  580. package/.next/standalone/.next/static/chunks/app/api/daemon-sessions/[sessionUuid]/route-31ae6abada6e6a64.js +0 -1
  581. package/.next/standalone/.next/static/chunks/app/api/daemon-sessions/ad-hoc/route-31ae6abada6e6a64.js +0 -1
  582. package/.next/standalone/.next/static/chunks/app/api/daemon-sessions/route-31ae6abada6e6a64.js +0 -1
  583. package/.next/standalone/.next/static/chunks/app/api/documents/[uuid]/route-31ae6abada6e6a64.js +0 -1
  584. package/.next/standalone/.next/static/chunks/app/api/entities/[type]/[uuid]/root-idea/route-31ae6abada6e6a64.js +0 -1
  585. package/.next/standalone/.next/static/chunks/app/api/events/notifications/route-31ae6abada6e6a64.js +0 -1
  586. package/.next/standalone/.next/static/chunks/app/api/events/route-31ae6abada6e6a64.js +0 -1
  587. package/.next/standalone/.next/static/chunks/app/api/health/route-31ae6abada6e6a64.js +0 -1
  588. package/.next/standalone/.next/static/chunks/app/api/ideas/[uuid]/claim/route-31ae6abada6e6a64.js +0 -1
  589. package/.next/standalone/.next/static/chunks/app/api/ideas/[uuid]/move/preview/route-31ae6abada6e6a64.js +0 -1
  590. package/.next/standalone/.next/static/chunks/app/api/ideas/[uuid]/move/route-31ae6abada6e6a64.js +0 -1
  591. package/.next/standalone/.next/static/chunks/app/api/ideas/[uuid]/parent/route-31ae6abada6e6a64.js +0 -1
  592. package/.next/standalone/.next/static/chunks/app/api/ideas/[uuid]/release/route-31ae6abada6e6a64.js +0 -1
  593. package/.next/standalone/.next/static/chunks/app/api/ideas/[uuid]/route-31ae6abada6e6a64.js +0 -1
  594. package/.next/standalone/.next/static/chunks/app/api/keepalive/route-31ae6abada6e6a64.js +0 -1
  595. package/.next/standalone/.next/static/chunks/app/api/mcp/route-31ae6abada6e6a64.js +0 -1
  596. package/.next/standalone/.next/static/chunks/app/api/me/assignments/route-31ae6abada6e6a64.js +0 -1
  597. package/.next/standalone/.next/static/chunks/app/api/mentionables/route-31ae6abada6e6a64.js +0 -1
  598. package/.next/standalone/.next/static/chunks/app/api/notifications/[uuid]/archive/route-31ae6abada6e6a64.js +0 -1
  599. package/.next/standalone/.next/static/chunks/app/api/notifications/[uuid]/read/route-31ae6abada6e6a64.js +0 -1
  600. package/.next/standalone/.next/static/chunks/app/api/notifications/preferences/route-31ae6abada6e6a64.js +0 -1
  601. package/.next/standalone/.next/static/chunks/app/api/notifications/read-all/route-31ae6abada6e6a64.js +0 -1
  602. package/.next/standalone/.next/static/chunks/app/api/notifications/route-31ae6abada6e6a64.js +0 -1
  603. package/.next/standalone/.next/static/chunks/app/api/notifications/unread-count/route-31ae6abada6e6a64.js +0 -1
  604. package/.next/standalone/.next/static/chunks/app/api/project-groups/[uuid]/dashboard/route-31ae6abada6e6a64.js +0 -1
  605. package/.next/standalone/.next/static/chunks/app/api/project-groups/[uuid]/route-31ae6abada6e6a64.js +0 -1
  606. package/.next/standalone/.next/static/chunks/app/api/project-groups/route-31ae6abada6e6a64.js +0 -1
  607. package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/activity/route-31ae6abada6e6a64.js +0 -1
  608. package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/available/route-31ae6abada6e6a64.js +0 -1
  609. package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/documents/route-31ae6abada6e6a64.js +0 -1
  610. package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/group/route-31ae6abada6e6a64.js +0 -1
  611. package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/ideas/route-31ae6abada6e6a64.js +0 -1
  612. package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/ideas/tracker/route-31ae6abada6e6a64.js +0 -1
  613. package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/proposals/[proposalUuid]/validate/route-31ae6abada6e6a64.js +0 -1
  614. package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/proposals/route-31ae6abada6e6a64.js +0 -1
  615. package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/proposals/summary/route-31ae6abada6e6a64.js +0 -1
  616. package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/resource-graph/route-31ae6abada6e6a64.js +0 -1
  617. package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/route-31ae6abada6e6a64.js +0 -1
  618. package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/stats/route-31ae6abada6e6a64.js +0 -1
  619. package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/tasks/dependencies/route-31ae6abada6e6a64.js +0 -1
  620. package/.next/standalone/.next/static/chunks/app/api/projects/[uuid]/tasks/route-31ae6abada6e6a64.js +0 -1
  621. package/.next/standalone/.next/static/chunks/app/api/projects/route-31ae6abada6e6a64.js +0 -1
  622. package/.next/standalone/.next/static/chunks/app/api/proposals/[uuid]/approve/route-31ae6abada6e6a64.js +0 -1
  623. package/.next/standalone/.next/static/chunks/app/api/proposals/[uuid]/close/route-31ae6abada6e6a64.js +0 -1
  624. package/.next/standalone/.next/static/chunks/app/api/proposals/[uuid]/reject/route-31ae6abada6e6a64.js +0 -1
  625. package/.next/standalone/.next/static/chunks/app/api/proposals/[uuid]/revoke/route-31ae6abada6e6a64.js +0 -1
  626. package/.next/standalone/.next/static/chunks/app/api/proposals/[uuid]/route-31ae6abada6e6a64.js +0 -1
  627. package/.next/standalone/.next/static/chunks/app/api/search/route-31ae6abada6e6a64.js +0 -1
  628. package/.next/standalone/.next/static/chunks/app/api/sessions/[uuid]/route-31ae6abada6e6a64.js +0 -1
  629. package/.next/standalone/.next/static/chunks/app/api/tasks/[uuid]/claim/route-31ae6abada6e6a64.js +0 -1
  630. package/.next/standalone/.next/static/chunks/app/api/tasks/[uuid]/dependencies/[dependsOnUuid]/route-31ae6abada6e6a64.js +0 -1
  631. package/.next/standalone/.next/static/chunks/app/api/tasks/[uuid]/dependencies/route-31ae6abada6e6a64.js +0 -1
  632. package/.next/standalone/.next/static/chunks/app/api/tasks/[uuid]/release/route-31ae6abada6e6a64.js +0 -1
  633. package/.next/standalone/.next/static/chunks/app/api/tasks/[uuid]/route-31ae6abada6e6a64.js +0 -1
  634. package/.next/standalone/.next/static/chunks/app/api/tasks/[uuid]/sessions/route-31ae6abada6e6a64.js +0 -1
  635. package/.next/standalone/.next/static/chunks/app/login/callback/page-6cad93f5c610b047.js +0 -1
  636. package/.next/standalone/.next/static/chunks/app/login/page-d2513f477211dd6f.js +0 -1
  637. package/.next/standalone/.next/static/chunks/app/login/pick-workspace/page-597e0f3377f18d29.js +0 -1
  638. package/.next/standalone/.next/static/chunks/app/login/silent-refresh/page-a26d1af61578c96e.js +0 -1
  639. package/.next/standalone/.next/static/chunks/app/page-075afd218994d377.js +0 -1
  640. package/.next/standalone/.next/static/css/ed6baccd62b81c4e.css +0 -1
  641. /package/.next/standalone/.next/static/{W3KEB0tOAICVtfAUfR_M9 → eORNzMShbzkJbNfQT8MbW}/_ssgManifest.js +0 -0
@@ -3,9 +3,9 @@
3
3
  3:I[77999,[],""]
4
4
  4:I[29459,[],""]
5
5
  5:I[38366,[],"ClientSegmentRoot"]
6
- 6:I[81706,["93151","static/chunks/f3524bc3-5c48b74c49ddeca0.js","41752","static/chunks/fcc64ffe-2c36a6b45f81782c.js","12079","static/chunks/12079-0574108f1e035a69.js","18944","static/chunks/18944-f9c482517327f06b.js","12790","static/chunks/12790-d3547c5d0ba40341.js","26885","static/chunks/26885-00665cb87b9da098.js","14655","static/chunks/14655-4f3bc7f3044c42c1.js","71350","static/chunks/71350-88c2649fc693c1e8.js","30724","static/chunks/30724-627b849ed09f9cc5.js","16544","static/chunks/16544-7e090007c7445fa7.js","27201","static/chunks/27201-0228042991534905.js","16551","static/chunks/16551-d129ae0de4a04d69.js","97784","static/chunks/97784-7b90a17294840e32.js","14753","static/chunks/14753-d911e24624c88fbc.js","89644","static/chunks/89644-2fee0373b890e8e3.js","45532","static/chunks/45532-12ed13c096e2a88e.js","70552","static/chunks/70552-0ea3c887937b5b51.js","15183","static/chunks/15183-5734d279b26e9414.js","26394","static/chunks/26394-4af487a51dd62832.js","27378","static/chunks/27378-9328bcc96ae9872e.js","36493","static/chunks/36493-5326c14a7240edc8.js","49965","static/chunks/49965-fa11628d5ac8fbbe.js","97868","static/chunks/97868-55f18a05fe483d85.js","69305","static/chunks/app/(dashboard)/layout-6061b60d52262d3c.js"],"default",1]
6
+ 6:I[19874,["93151","static/chunks/f3524bc3-5c48b74c49ddeca0.js","41752","static/chunks/fcc64ffe-2c36a6b45f81782c.js","12079","static/chunks/12079-0574108f1e035a69.js","18944","static/chunks/18944-f9c482517327f06b.js","12790","static/chunks/12790-d3547c5d0ba40341.js","26885","static/chunks/26885-00665cb87b9da098.js","58037","static/chunks/58037-55d7422c6b808356.js","71350","static/chunks/71350-88c2649fc693c1e8.js","30724","static/chunks/30724-627b849ed09f9cc5.js","16544","static/chunks/16544-7e090007c7445fa7.js","27201","static/chunks/27201-0228042991534905.js","16551","static/chunks/16551-d129ae0de4a04d69.js","97784","static/chunks/97784-7b90a17294840e32.js","14753","static/chunks/14753-d911e24624c88fbc.js","89644","static/chunks/89644-2fee0373b890e8e3.js","45532","static/chunks/45532-12ed13c096e2a88e.js","70552","static/chunks/70552-0ea3c887937b5b51.js","15183","static/chunks/15183-5734d279b26e9414.js","38296","static/chunks/38296-316ba18af72385fb.js","27378","static/chunks/27378-9328bcc96ae9872e.js","97306","static/chunks/97306-8834e12cdbeed920.js","52064","static/chunks/52064-74d81c8d682deb6b.js","84169","static/chunks/84169-71a87d06871ec9df.js","69305","static/chunks/app/(dashboard)/layout-a3747bde1ddaba52.js"],"default",1]
7
7
  8:I[18730,[],"ClientPageRoot"]
8
- 9:I[8521,["93151","static/chunks/f3524bc3-5c48b74c49ddeca0.js","41752","static/chunks/fcc64ffe-2c36a6b45f81782c.js","12079","static/chunks/12079-0574108f1e035a69.js","18944","static/chunks/18944-f9c482517327f06b.js","12790","static/chunks/12790-d3547c5d0ba40341.js","26885","static/chunks/26885-00665cb87b9da098.js","71350","static/chunks/71350-88c2649fc693c1e8.js","30724","static/chunks/30724-627b849ed09f9cc5.js","27201","static/chunks/27201-0228042991534905.js","16551","static/chunks/16551-d129ae0de4a04d69.js","97784","static/chunks/97784-7b90a17294840e32.js","14753","static/chunks/14753-d911e24624c88fbc.js","89644","static/chunks/89644-2fee0373b890e8e3.js","45532","static/chunks/45532-12ed13c096e2a88e.js","70552","static/chunks/70552-0ea3c887937b5b51.js","15183","static/chunks/15183-5734d279b26e9414.js","80904","static/chunks/80904-973284d1fe916c38.js","91666","static/chunks/91666-3fd4f3512a53ff20.js","51670","static/chunks/app/(dashboard)/settings/page-960ab78b5055780c.js"],"default",1]
8
+ 9:I[98625,["93151","static/chunks/f3524bc3-5c48b74c49ddeca0.js","41752","static/chunks/fcc64ffe-2c36a6b45f81782c.js","12079","static/chunks/12079-0574108f1e035a69.js","18944","static/chunks/18944-f9c482517327f06b.js","12790","static/chunks/12790-d3547c5d0ba40341.js","26885","static/chunks/26885-00665cb87b9da098.js","71350","static/chunks/71350-88c2649fc693c1e8.js","30724","static/chunks/30724-627b849ed09f9cc5.js","27201","static/chunks/27201-0228042991534905.js","16551","static/chunks/16551-d129ae0de4a04d69.js","97784","static/chunks/97784-7b90a17294840e32.js","14753","static/chunks/14753-d911e24624c88fbc.js","89644","static/chunks/89644-2fee0373b890e8e3.js","45532","static/chunks/45532-12ed13c096e2a88e.js","70552","static/chunks/70552-0ea3c887937b5b51.js","15183","static/chunks/15183-5734d279b26e9414.js","80904","static/chunks/80904-973284d1fe916c38.js","75752","static/chunks/75752-cc8fafe132943baa.js","51670","static/chunks/app/(dashboard)/settings/page-111aed4d3319d64b.js"],"default",1]
9
9
  c:I[12870,[],"OutletBoundary"]
10
10
  e:I[52955,[],"AsyncMetadataOutlet"]
11
11
  10:I[12870,[],"ViewportBoundary"]
@@ -15,8 +15,8 @@ e:I[52955,[],"AsyncMetadataOutlet"]
15
15
  :HL["/_next/static/media/22a5144ee8d83bca-s.p.woff2","font",{"crossOrigin":"","type":"font/woff2"}]
16
16
  :HL["/_next/static/media/7d4881bb7e1bf84d-s.p.woff2","font",{"crossOrigin":"","type":"font/woff2"}]
17
17
  :HL["/_next/static/css/b496025c9cd768cc.css","style"]
18
- :HL["/_next/static/css/ed6baccd62b81c4e.css","style"]
19
- 0:{"P":null,"b":"W3KEB0tOAICVtfAUfR_M9","p":"","c":["","settings"],"i":false,"f":[[["",{"children":["(dashboard)",{"children":["settings",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],["",["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/b496025c9cd768cc.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/_next/static/css/ed6baccd62b81c4e.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__variable_246ccd __variable_c29908 antialiased","children":["$","$L2",null,{"children":["$","$L3",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]}]}]}]]}],{"children":["(dashboard)",["$","$1","c",{"children":[null,["$","$L5",null,{"Component":"$6","slots":{"children":["$","$L3",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":"$0:f:0:1:1:props:children:1:props:children:props:children:props:children:props:notFound:0:1:props:style","children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":"$0:f:0:1:1:props:children:1:props:children:props:children:props:children:props:notFound:0:1:props:children:props:children:1:props:style","children":404}],["$","div",null,{"style":"$0:f:0:1:1:props:children:1:props:children:props:children:props:children:props:notFound:0:1:props:children:props:children:2:props:style","children":["$","h2",null,{"style":"$0:f:0:1:1:props:children:1:props:children:props:children:props:children:props:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"params":{},"promise":"$@7"}]]}],{"children":["settings",["$","$1","c",{"children":[null,["$","$L3",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["__PAGE__",["$","$1","c",{"children":[["$","$L8",null,{"Component":"$9","searchParams":{},"params":"$0:f:0:1:2:children:1:props:children:1:props:params","promises":["$@a","$@b"]}],null,["$","$Lc",null,{"children":["$Ld",["$","$Le",null,{"promise":"$@f"}]]}]]}],{},null,false]},null,false]},null,false]},null,false],["$","$1","h",{"children":[null,[["$","$L10",null,{"children":"$L11"}],["$","meta",null,{"name":"next-size-adjust","content":""}]],["$","$L12",null,{"children":["$","div",null,{"hidden":true,"children":["$","$13",null,{"fallback":null,"children":"$L14"}]}]}]]}],false]],"m":"$undefined","G":["$15",[]],"s":false,"S":true}
18
+ :HL["/_next/static/css/3f3ae2bdc9e55259.css","style"]
19
+ 0:{"P":null,"b":"eORNzMShbzkJbNfQT8MbW","p":"","c":["","settings"],"i":false,"f":[[["",{"children":["(dashboard)",{"children":["settings",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],["",["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/b496025c9cd768cc.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/_next/static/css/3f3ae2bdc9e55259.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__variable_246ccd __variable_c29908 antialiased","children":["$","$L2",null,{"children":["$","$L3",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]}]}]}]]}],{"children":["(dashboard)",["$","$1","c",{"children":[null,["$","$L5",null,{"Component":"$6","slots":{"children":["$","$L3",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":"$0:f:0:1:1:props:children:1:props:children:props:children:props:children:props:notFound:0:1:props:style","children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":"$0:f:0:1:1:props:children:1:props:children:props:children:props:children:props:notFound:0:1:props:children:props:children:1:props:style","children":404}],["$","div",null,{"style":"$0:f:0:1:1:props:children:1:props:children:props:children:props:children:props:notFound:0:1:props:children:props:children:2:props:style","children":["$","h2",null,{"style":"$0:f:0:1:1:props:children:1:props:children:props:children:props:children:props:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"params":{},"promise":"$@7"}]]}],{"children":["settings",["$","$1","c",{"children":[null,["$","$L3",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["__PAGE__",["$","$1","c",{"children":[["$","$L8",null,{"Component":"$9","searchParams":{},"params":"$0:f:0:1:2:children:1:props:children:1:props:params","promises":["$@a","$@b"]}],null,["$","$Lc",null,{"children":["$Ld",["$","$Le",null,{"promise":"$@f"}]]}]]}],{},null,false]},null,false]},null,false]},null,false],["$","$1","h",{"children":[null,[["$","$L10",null,{"children":"$L11"}],["$","meta",null,{"name":"next-size-adjust","content":""}]],["$","$L12",null,{"children":["$","div",null,{"hidden":true,"children":["$","$13",null,{"fallback":null,"children":"$L14"}]}]}]]}],false]],"m":"$undefined","G":["$15",[]],"s":false,"S":true}
20
20
  7:"$0:f:0:1:2:children:1:props:children:1:props:params"
21
21
  a:{}
22
22
  b:"$0:f:0:1:2:children:1:props:children:1:props:params"
@@ -3,113 +3,111 @@
3
3
  "/api/auth/callback/route": "app/api/auth/callback/route.js",
4
4
  "/api/auth/logout/route": "app/api/auth/logout/route.js",
5
5
  "/api/auth/me/route": "app/api/auth/me/route.js",
6
- "/api/auth/refresh/route": "app/api/auth/refresh/route.js",
7
- "/api/auth/session/route": "app/api/auth/session/route.js",
8
6
  "/api/auth/sync-token/route": "app/api/auth/sync-token/route.js",
9
7
  "/api/health/route": "app/api/health/route.js",
10
8
  "/api/mcp/route": "app/api/mcp/route.js",
9
+ "/api/session/route": "app/api/session/route.js",
11
10
  "/favicon.ico/route": "app/favicon.ico/route.js",
12
- "/api/admin/session/route": "app/api/admin/session/route.js",
13
11
  "/api/admin/login/route": "app/api/admin/login/route.js",
14
- "/api/agent-connections/route": "app/api/agent-connections/route.js",
12
+ "/api/admin/session/route": "app/api/admin/session/route.js",
15
13
  "/api/admin/companies/route": "app/api/admin/companies/route.js",
16
- "/api/agents/[uuid]/sessions/route": "app/api/agents/[uuid]/sessions/route.js",
14
+ "/api/agent-connections/route": "app/api/agent-connections/route.js",
17
15
  "/api/admin/companies/[uuid]/route": "app/api/admin/companies/[uuid]/route.js",
18
16
  "/api/api-keys/[uuid]/route": "app/api/api-keys/[uuid]/route.js",
19
- "/api/agents/[uuid]/route": "app/api/agents/[uuid]/route.js",
20
- "/api/agents/route": "app/api/agents/route.js",
17
+ "/api/agents/[uuid]/sessions/route": "app/api/agents/[uuid]/sessions/route.js",
21
18
  "/api/auth/check-default/route": "app/api/auth/check-default/route.js",
22
- "/api/auth/company-oidc/route": "app/api/auth/company-oidc/route.js",
23
19
  "/api/api-keys/route": "app/api/api-keys/route.js",
20
+ "/api/auth/company-oidc/route": "app/api/auth/company-oidc/route.js",
21
+ "/api/agents/route": "app/api/agents/route.js",
22
+ "/api/agents/[uuid]/route": "app/api/agents/[uuid]/route.js",
24
23
  "/api/auth/default-login/route": "app/api/auth/default-login/route.js",
25
24
  "/api/auth/identify/route": "app/api/auth/identify/route.js",
26
- "/api/daemon-sessions/[sessionUuid]/route": "app/api/daemon-sessions/[sessionUuid]/route.js",
27
25
  "/api/daemon-sessions/[sessionUuid]/instruction/route": "app/api/daemon-sessions/[sessionUuid]/instruction/route.js",
28
26
  "/api/daemon-sessions/[sessionUuid]/repoint/route": "app/api/daemon-sessions/[sessionUuid]/repoint/route.js",
29
- "/api/daemon-sessions/ad-hoc/route": "app/api/daemon-sessions/ad-hoc/route.js",
30
27
  "/api/daemon-sessions/route": "app/api/daemon-sessions/route.js",
31
28
  "/api/comments/route": "app/api/comments/route.js",
29
+ "/api/daemon-sessions/[sessionUuid]/route": "app/api/daemon-sessions/[sessionUuid]/route.js",
32
30
  "/api/daemon/executions/route": "app/api/daemon/executions/route.js",
31
+ "/api/daemon-sessions/ad-hoc/route": "app/api/daemon-sessions/ad-hoc/route.js",
33
32
  "/api/daemon/pending-turns/route": "app/api/daemon/pending-turns/route.js",
34
33
  "/api/daemon/control/route": "app/api/daemon/control/route.js",
35
34
  "/api/daemon/execution-state/route": "app/api/daemon/execution-state/route.js",
36
- "/api/daemon/report-interrupt/route": "app/api/daemon/report-interrupt/route.js",
37
- "/api/daemon/turn-advance/route": "app/api/daemon/turn-advance/route.js",
38
35
  "/api/daemon/transcript/route": "app/api/daemon/transcript/route.js",
39
36
  "/api/daemon/resume/route": "app/api/daemon/resume/route.js",
37
+ "/api/daemon/report-interrupt/route": "app/api/daemon/report-interrupt/route.js",
38
+ "/api/daemon/turn-advance/route": "app/api/daemon/turn-advance/route.js",
40
39
  "/api/entities/[type]/[uuid]/root-idea/route": "app/api/entities/[type]/[uuid]/root-idea/route.js",
41
- "/api/events/notifications/route": "app/api/events/notifications/route.js",
42
40
  "/api/documents/[uuid]/route": "app/api/documents/[uuid]/route.js",
41
+ "/api/events/notifications/route": "app/api/events/notifications/route.js",
43
42
  "/api/ideas/[uuid]/claim/route": "app/api/ideas/[uuid]/claim/route.js",
43
+ "/api/ideas/[uuid]/move/route": "app/api/ideas/[uuid]/move/route.js",
44
44
  "/api/events/route": "app/api/events/route.js",
45
45
  "/api/ideas/[uuid]/move/preview/route": "app/api/ideas/[uuid]/move/preview/route.js",
46
- "/api/ideas/[uuid]/move/route": "app/api/ideas/[uuid]/move/route.js",
47
- "/api/ideas/[uuid]/parent/route": "app/api/ideas/[uuid]/parent/route.js",
48
- "/api/keepalive/route": "app/api/keepalive/route.js",
49
46
  "/api/ideas/[uuid]/release/route": "app/api/ideas/[uuid]/release/route.js",
47
+ "/api/ideas/[uuid]/parent/route": "app/api/ideas/[uuid]/parent/route.js",
50
48
  "/api/me/assignments/route": "app/api/me/assignments/route.js",
51
- "/api/notifications/[uuid]/read/route": "app/api/notifications/[uuid]/read/route.js",
52
49
  "/api/mentionables/route": "app/api/mentionables/route.js",
53
50
  "/api/notifications/[uuid]/archive/route": "app/api/notifications/[uuid]/archive/route.js",
51
+ "/api/ideas/conversational/route": "app/api/ideas/conversational/route.js",
52
+ "/api/notifications/[uuid]/read/route": "app/api/notifications/[uuid]/read/route.js",
54
53
  "/api/notifications/preferences/route": "app/api/notifications/preferences/route.js",
55
- "/api/ideas/[uuid]/route": "app/api/ideas/[uuid]/route.js",
56
54
  "/api/notifications/unread-count/route": "app/api/notifications/unread-count/route.js",
57
55
  "/api/notifications/read-all/route": "app/api/notifications/read-all/route.js",
58
56
  "/api/notifications/route": "app/api/notifications/route.js",
59
57
  "/api/project-groups/[uuid]/dashboard/route": "app/api/project-groups/[uuid]/dashboard/route.js",
58
+ "/api/ideas/[uuid]/route": "app/api/ideas/[uuid]/route.js",
60
59
  "/api/project-groups/route": "app/api/project-groups/route.js",
61
- "/api/project-groups/[uuid]/route": "app/api/project-groups/[uuid]/route.js",
62
- "/api/projects/[uuid]/available/route": "app/api/projects/[uuid]/available/route.js",
63
60
  "/api/projects/[uuid]/activity/route": "app/api/projects/[uuid]/activity/route.js",
61
+ "/api/projects/[uuid]/available/route": "app/api/projects/[uuid]/available/route.js",
64
62
  "/api/projects/[uuid]/group/route": "app/api/projects/[uuid]/group/route.js",
65
- "/api/projects/[uuid]/proposals/[proposalUuid]/validate/route": "app/api/projects/[uuid]/proposals/[proposalUuid]/validate/route.js",
63
+ "/api/project-groups/[uuid]/route": "app/api/project-groups/[uuid]/route.js",
66
64
  "/api/projects/[uuid]/ideas/tracker/route": "app/api/projects/[uuid]/ideas/tracker/route.js",
67
- "/api/projects/[uuid]/resource-graph/route": "app/api/projects/[uuid]/resource-graph/route.js",
68
65
  "/api/projects/[uuid]/documents/route": "app/api/projects/[uuid]/documents/route.js",
69
66
  "/api/projects/[uuid]/proposals/summary/route": "app/api/projects/[uuid]/proposals/summary/route.js",
70
- "/api/projects/[uuid]/ideas/route": "app/api/projects/[uuid]/ideas/route.js",
67
+ "/api/projects/[uuid]/proposals/[proposalUuid]/validate/route": "app/api/projects/[uuid]/proposals/[proposalUuid]/validate/route.js",
68
+ "/api/projects/[uuid]/resource-graph/route": "app/api/projects/[uuid]/resource-graph/route.js",
69
+ "/api/projects/[uuid]/stats/route": "app/api/projects/[uuid]/stats/route.js",
71
70
  "/api/projects/[uuid]/proposals/route": "app/api/projects/[uuid]/proposals/route.js",
71
+ "/api/projects/[uuid]/ideas/route": "app/api/projects/[uuid]/ideas/route.js",
72
72
  "/api/projects/[uuid]/tasks/dependencies/route": "app/api/projects/[uuid]/tasks/dependencies/route.js",
73
- "/api/projects/[uuid]/stats/route": "app/api/projects/[uuid]/stats/route.js",
74
- "/api/proposals/[uuid]/revoke/route": "app/api/proposals/[uuid]/revoke/route.js",
73
+ "/api/proposals/[uuid]/approve/route": "app/api/proposals/[uuid]/approve/route.js",
75
74
  "/api/projects/[uuid]/route": "app/api/projects/[uuid]/route.js",
75
+ "/api/projects/route": "app/api/projects/route.js",
76
+ "/api/projects/[uuid]/tasks/route": "app/api/projects/[uuid]/tasks/route.js",
76
77
  "/api/proposals/[uuid]/close/route": "app/api/proposals/[uuid]/close/route.js",
77
78
  "/api/proposals/[uuid]/route": "app/api/proposals/[uuid]/route.js",
78
- "/api/projects/[uuid]/tasks/route": "app/api/projects/[uuid]/tasks/route.js",
79
- "/api/projects/route": "app/api/projects/route.js",
80
- "/api/search/route": "app/api/search/route.js",
81
- "/api/sessions/[uuid]/route": "app/api/sessions/[uuid]/route.js",
79
+ "/api/proposals/[uuid]/revoke/route": "app/api/proposals/[uuid]/revoke/route.js",
82
80
  "/api/tasks/[uuid]/dependencies/[dependsOnUuid]/route": "app/api/tasks/[uuid]/dependencies/[dependsOnUuid]/route.js",
81
+ "/api/proposals/[uuid]/reject/route": "app/api/proposals/[uuid]/reject/route.js",
83
82
  "/api/tasks/[uuid]/release/route": "app/api/tasks/[uuid]/release/route.js",
84
83
  "/api/tasks/[uuid]/dependencies/route": "app/api/tasks/[uuid]/dependencies/route.js",
85
84
  "/api/tasks/[uuid]/sessions/route": "app/api/tasks/[uuid]/sessions/route.js",
86
- "/api/tasks/[uuid]/claim/route": "app/api/tasks/[uuid]/claim/route.js",
87
85
  "/api/tasks/[uuid]/route": "app/api/tasks/[uuid]/route.js",
88
- "/api/proposals/[uuid]/reject/route": "app/api/proposals/[uuid]/reject/route.js",
89
- "/api/proposals/[uuid]/approve/route": "app/api/proposals/[uuid]/approve/route.js",
90
- "/login/page": "app/login/page.js",
91
- "/login/silent-refresh/page": "app/login/silent-refresh/page.js",
92
- "/login/pick-workspace/page": "app/login/pick-workspace/page.js",
93
- "/onboarding/page": "app/onboarding/page.js",
86
+ "/api/sessions/[uuid]/route": "app/api/sessions/[uuid]/route.js",
87
+ "/api/search/route": "app/api/search/route.js",
88
+ "/api/tasks/[uuid]/claim/route": "app/api/tasks/[uuid]/claim/route.js",
94
89
  "/login/admin/page": "app/login/admin/page.js",
95
90
  "/login/callback/page": "app/login/callback/page.js",
91
+ "/login/page": "app/login/page.js",
92
+ "/login/pick-workspace/page": "app/login/pick-workspace/page.js",
96
93
  "/page": "app/page.js",
94
+ "/onboarding/page": "app/onboarding/page.js",
95
+ "/(dashboard)/projects/[uuid]/activity/page": "app/(dashboard)/projects/[uuid]/activity/page.js",
97
96
  "/(dashboard)/project-groups/[uuid]/page": "app/(dashboard)/project-groups/[uuid]/page.js",
97
+ "/(dashboard)/projects/[uuid]/dashboard/page": "app/(dashboard)/projects/[uuid]/dashboard/page.js",
98
98
  "/(dashboard)/projects/[uuid]/dashboard/[ideaUuid]/page": "app/(dashboard)/projects/[uuid]/dashboard/[ideaUuid]/page.js",
99
- "/(dashboard)/projects/[uuid]/activity/page": "app/(dashboard)/projects/[uuid]/activity/page.js",
100
99
  "/(dashboard)/projects/[uuid]/documents/[documentUuid]/page": "app/(dashboard)/projects/[uuid]/documents/[documentUuid]/page.js",
101
- "/(dashboard)/projects/[uuid]/dashboard/page": "app/(dashboard)/projects/[uuid]/dashboard/page.js",
102
100
  "/(dashboard)/projects/[uuid]/documents/page": "app/(dashboard)/projects/[uuid]/documents/page.js",
103
101
  "/(dashboard)/projects/[uuid]/graph/page": "app/(dashboard)/projects/[uuid]/graph/page.js",
104
- "/(dashboard)/projects/[uuid]/proposals/[proposalUuid]/page": "app/(dashboard)/projects/[uuid]/proposals/[proposalUuid]/page.js",
105
102
  "/(dashboard)/projects/[uuid]/proposals/new/page": "app/(dashboard)/projects/[uuid]/proposals/new/page.js",
103
+ "/(dashboard)/projects/[uuid]/proposals/[proposalUuid]/page": "app/(dashboard)/projects/[uuid]/proposals/[proposalUuid]/page.js",
106
104
  "/(dashboard)/projects/[uuid]/proposals/page": "app/(dashboard)/projects/[uuid]/proposals/page.js",
107
105
  "/(dashboard)/projects/[uuid]/tasks/[taskUuid]/page": "app/(dashboard)/projects/[uuid]/tasks/[taskUuid]/page.js",
108
106
  "/(dashboard)/projects/[uuid]/tasks/page": "app/(dashboard)/projects/[uuid]/tasks/page.js",
109
107
  "/(dashboard)/projects/page": "app/(dashboard)/projects/page.js",
110
- "/(dashboard)/settings/page": "app/(dashboard)/settings/page.js",
111
108
  "/admin/companies/[uuid]/page": "app/admin/companies/[uuid]/page.js",
112
- "/admin/page": "app/admin/page.js",
113
109
  "/admin/companies/new/page": "app/admin/companies/new/page.js",
110
+ "/(dashboard)/settings/page": "app/(dashboard)/settings/page.js",
111
+ "/admin/page": "app/admin/page.js",
114
112
  "/admin/companies/page": "app/admin/companies/page.js"
115
113
  }
@@ -0,0 +1 @@
1
+ "use strict";exports.id=1114,exports.ids=[1114],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.default.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)}})},14120:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{Wy:()=>r});var e=c(65582),f=c(52618),g=c(34853),h=c(97515),i=c(70369),j=c(35205),k=a([f,g,h,i,j]);[f,g,h,i,j]=k.then?(await k)():k;let s=e.default.child({module:"notification-turn"}),t={mentioned:"mentioned",elaboration_requested:"elaboration",elaboration_answered:"elaboration",elaboration_verified:"elaboration_verified",start_development:"start_development",yolo_requested:"yolo_requested",human_instruction:"human_instruction",task_assigned:"task_assigned",task_reopened:"task_assigned",task_verified:"task_assigned",idea_claimed:"task_assigned",proposal_approved:"task_assigned",proposal_rejected:"task_assigned"},u=new Set(["task","document","proposal","idea"]),v=new Set(["task_assigned","elaboration","elaboration_verified","start_development","yolo_requested"]);async function l(a,b){return await f.z.agentInstance.findFirst({where:{uuid:b,companyUuid:a},select:{host:!0,cwd:!0,agentUuid:!0}})??null}function m(a,b,c){return(null==a||""===a)&&(null==b||""===b)?null:{host:a??"",cwd:null!=b&&""!==b?b:null,soft:c}}async function n(a,b){if("mentioned"===b)return m(a.pinnedHost,a.pinnedCwd,!1);if(!u.has(a.entityType))return null;if("task"===a.entityType){let b=await f.z.task.findFirst({where:{uuid:a.entityUuid,companyUuid:a.companyUuid},select:{assigneeType:!0,assigneeUuid:!0}});if(b?.assigneeType==="agent_instance"&&b.assigneeUuid){let c=await l(a.companyUuid,b.assigneeUuid);if(c){let a=m(c.host,c.cwd,!0);if(a)return a}}}if("idea"===a.entityType){let b=await (0,g.resolveDirectIdeaUuid)(a.companyUuid,a.entityType,a.entityUuid),c=await o(a,b);if(c)return c}let c=await p(a);return o(a,c)}async function o(a,b){if(!b)return null;let c=await f.z.idea.findFirst({where:{uuid:b,companyUuid:a.companyUuid},select:{assigneeType:!0,assigneeUuid:!0}});if(c?.assigneeType==="agent_instance"&&c.assigneeUuid){let b=await l(a.companyUuid,c.assigneeUuid);if(b&&b.agentUuid===a.recipientUuid)return m(b.host,b.cwd,!0)}return null}async function p(a){return(await (0,j.K)(a.companyUuid,a.entityType,a.entityUuid)).rootIdeaUuid}async function q(a,b,c,d){if(!c)return null;let e=await f.z.daemonSession.findFirst({where:{companyUuid:a,agentUuid:b,sessionId:c},select:{originConnectionUuid:!0}});return e?d.find(a=>a.uuid===e.originConnectionUuid&&"online"===a.effectiveStatus)??null:null}async function r(a){let b={turn:null,targetConnectionUuid:null,suppressWake:!1},c=t[a.action]??null;if(!c||"agent"!==a.recipientType)return b;try{let d=await (0,h._R)(a.companyUuid,a.recipientUuid),e=await n(a,c),j=function(a,b){if(b){let c=a.find(a=>a.host===b.host&&a.cwd===b.cwd&&"online"===a.effectiveStatus);if(c)return{kind:"directed",connection:c};if(!b.soft)return{kind:"offline_pin"}}let c=a.find(a=>"online"===a.effectiveStatus);return c?{kind:"online_first",connection:c}:{kind:"none"}}(d,e),k=null;if(u.has(a.entityType)&&(k=await (0,g.resolveDirectIdeaUuid)(a.companyUuid,a.entityType,a.entityUuid)),v.has(c)&&"online_first"===j.kind){let b=await q(a.companyUuid,a.recipientUuid,k,d);b&&(j={kind:"directed",connection:b})}if("offline_pin"===j.kind)return{turn:null,targetConnectionUuid:null,suppressWake:!0};if("none"===j.kind)return b;let l=j.connection,m="directed"===j.kind,o=k??a.entityUuid,p=k;if(m&&k){let b=await f.z.daemonSession.findFirst({where:{companyUuid:a.companyUuid,agentUuid:a.recipientUuid,sessionId:k},select:{originConnectionUuid:!0}});b&&b.originConnectionUuid!==l.uuid&&(o=`${k}::${l.uuid}`,p=null)}let r=await (0,g.resolveOrCreateSession)({companyUuid:a.companyUuid,agentUuid:a.recipientUuid,sessionId:o,directIdeaUuid:p,originConnectionUuid:l.uuid}),s="human_instruction"===c?a.instructionText??null:null,t=await (0,g.createPendingTurn)({sessionUuid:r.uuid,trigger:c,promptText:s});if(m)return(0,i.N_)({companyUuid:a.companyUuid,originConnectionUuid:l.uuid,turnUuid:t.uuid}),{turn:t,targetConnectionUuid:l.uuid,suppressWake:!1};return{turn:t,targetConnectionUuid:null,suppressWake:!1}}catch(c){return s.error({err:c,companyUuid:a.companyUuid,agentUuid:a.recipientUuid,action:a.action,entityType:a.entityType,entityUuid:a.entityUuid},"Failed to create DaemonSessionTurn for wake notification (notification was still created)"),b}}d()}catch(a){d(a)}})},25736:(a,b,c)=>{c.d(b,{vE:()=>d});function d(a){if(!a)return{pinnedHost:null,pinnedCwd:null};let b=new URLSearchParams(a),c=b.has("cwd"),d=b.has("host");if(!c&&!d)return{pinnedHost:null,pinnedCwd:null};let e=b.get("cwd")??"",f=b.get("host");return{pinnedCwd:c&&""!==e?e:null,pinnedHost:d?f??"":null}}},28792:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{K1:()=>k,Ll:()=>i,U_:()=>h,s7:()=>j});var e=c(52618),f=c(42558),g=a([e]);e=(g.then?(await g)():g)[0];let k=["task","idea","proposal","document","daemon_session"];async function h(a,b){let c=await e.z.daemonConnection.findFirst({where:{uuid:b,companyUuid:a},select:{agentUuid:!0,agent:{select:{ownerUuid:!0}}}});return c?{agentUuid:c.agentUuid,ownerUuid:c.agent?.ownerUuid??null}:null}async function i(a){let b=await h(a.companyUuid,a.connectionUuid);return b?null!=b.ownerUuid&&a.actorUuid===b.ownerUuid||a.hasTaskAdmin?{ok:!0,target:b}:{ok:!1,reason:"forbidden"}:{ok:!1,reason:"not_found"}}function j(a){let b="deliver_turn"===a.command?{type:"control",command:"deliver_turn",targetConnectionUuid:a.targetConnectionUuid,turnUuid:a.turnUuid}:{type:"control",command:a.command,targetConnectionUuid:a.targetConnectionUuid,entityType:a.entityType,entityUuid:a.entityUuid,...a.resumeReason?{resumeReason:a.resumeReason}:{}};f.B.emit((0,f.T)(a.targetConnectionUuid),b)}d()}catch(a){d(a)}})},34853:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{CONVERSATION_NAME_MAX:()=>i.VM,DAEMON_REPORTABLE_INTERRUPT_REASONS:()=>I,DEFAULT_TRANSCRIPT_MESSAGE_PAGE:()=>N,MAX_TRANSCRIPT_MESSAGES_PER_SESSION:()=>L,SESSION_STATUSES:()=>J,STALE_THRESHOLD_MS:()=>h.BP,SessionReadOnlyError:()=>O,TRANSCRIPT_ROLES:()=>K,TURN_INTERRUPT_REASONS:()=>H,TURN_STATUSES:()=>G,TURN_TRIGGERS:()=>F,advanceTurn:()=>s,advanceTurnForWake:()=>D,appendTranscriptMessages:()=>B,assertContinuable:()=>z,conversationNameFromInstruction:()=>i.Ff,createPendingTurn:()=>r,getFirstInstructionBySessionUuid:()=>i.L0,getPendingTurnsForConnection:()=>E,getSessionDetail:()=>y,getSessionTurns:()=>w,getVisibleSessions:()=>v,isSessionVisibleToCaller:()=>x,publishTranscriptEvent:()=>o,reconcileOrphanTurns:()=>t,resolveDirectIdeaUuid:()=>q,resolveOrCreateSession:()=>p,transcriptEventName:()=>n});var e=c(52618),f=c(42558),g=c(35205),h=c(97515),i=c(22137),j=a([e,g,h,i]);[e,g,h,i]=j.then?(await j)():j;let F=["task_assigned","mentioned","elaboration","elaboration_verified","start_development","yolo_requested","resume","human_instruction"],G=["pending","running","ended","interrupted"],H=["user","crash","shutdown","offline"],I=["user","crash","shutdown"],J=["active","ended"],K=["user","assistant"],L=200;function k(a){return{uuid:a.uuid,agentUuid:a.agentUuid,sessionId:a.sessionId,directIdeaUuid:a.directIdeaUuid,originConnectionUuid:a.originConnectionUuid,status:a.status,title:a.title,lastTurnAt:a.lastTurnAt.toISOString(),createdAt:a.createdAt.toISOString(),updatedAt:a.updatedAt.toISOString()}}function l(a){return{uuid:a.uuid,sessionUuid:a.sessionUuid,seq:a.seq,trigger:a.trigger,promptText:a.promptText,status:a.status,interruptedReason:a.interruptedReason,executionUuid:a.executionUuid,startedAt:a.startedAt?a.startedAt.toISOString():null,endedAt:a.endedAt?a.endedAt.toISOString():null,createdAt:a.createdAt.toISOString()}}function m(a){return"agent"===a.type?{agentUuid:a.actorUuid}:{agent:{ownerUuid:a.actorUuid}}}function n(a){return`transcript:${a}`}function o(a){f.B.emit(n(a.sessionUuid),a)}async function p(a){let b=await e.z.daemonSession.upsert({where:{agentUuid_sessionId:{agentUuid:a.agentUuid,sessionId:a.sessionId}},create:{companyUuid:a.companyUuid,agentUuid:a.agentUuid,sessionId:a.sessionId,directIdeaUuid:a.directIdeaUuid??null,originConnectionUuid:a.originConnectionUuid,status:"active"},update:{companyUuid:a.companyUuid}});return k(b)}async function q(a,b,c){return(await (0,g.K)(a,b,c)).directIdeaUuid}async function r(a){let b=await e.z.daemonSession.findUnique({where:{uuid:a.sessionUuid},select:{uuid:!0,companyUuid:!0}});if(!b)throw Error(`DaemonSession ${a.sessionUuid} not found`);let c=null;for(let b=0;b<5;b++){let d=await e.z.daemonSessionTurn.findFirst({where:{sessionUuid:a.sessionUuid},orderBy:{seq:"desc"},select:{seq:!0}}),f=(d?.seq??0)+1;try{c=await e.z.daemonSessionTurn.create({data:{sessionUuid:a.sessionUuid,seq:f,trigger:a.trigger,promptText:a.promptText??null,status:"pending",executionUuid:a.executionUuid??null}});break}catch(a){if("object"==typeof a&&null!==a&&"code"in a&&"P2002"===a.code&&b<4)continue;throw a}}if(!c)throw Error(`createPendingTurn: could not allocate a unique seq for session ${a.sessionUuid} after 5 attempts`);await e.z.daemonSession.update({where:{uuid:a.sessionUuid},data:{lastTurnAt:new Date}});let d=l(c);return o({companyUuid:b.companyUuid,sessionUuid:a.sessionUuid,trigger:"turn_created",turn:d,messages:[]}),d}let M={pending:["running"],running:["ended","interrupted"],ended:[],interrupted:[]};async function s(a,b,c={}){let d=await e.z.daemonSessionTurn.findUnique({where:{uuid:a},select:{uuid:!0,sessionUuid:!0,status:!0}});if(!d)return{ok:!1,reason:"not_found"};if(!(M[d.status]??[]).includes(b))return{ok:!1,reason:"invalid_transition",from:d.status,to:b};let f={status:b};void 0!==c.startedAt&&(f.startedAt=c.startedAt),void 0!==c.endedAt&&(f.endedAt=c.endedAt),void 0!==c.executionUuid&&(f.executionUuid=c.executionUuid),"interrupted"===b&&void 0!==c.interruptedReason&&(f.interruptedReason=c.interruptedReason);let g=await e.z.daemonSessionTurn.update({where:{uuid:a},data:f}),h=await e.z.daemonSession.findUnique({where:{uuid:d.sessionUuid},select:{companyUuid:!0}});if(!h)throw Error(`advanceTurn: session ${d.sessionUuid} missing for just-updated turn ${a}`);let i=l(g);return o({companyUuid:h.companyUuid,sessionUuid:d.sessionUuid,trigger:"turn_status_changed",turn:i,messages:[]}),{ok:!0,turn:i}}async function t(a,b,d={}){try{let f=await e.z.daemonSessionTurn.findMany({where:{status:"running",session:{companyUuid:a,originConnectionUuid:b}},select:{uuid:!0}});if(0===f.length)return 0;if(!d.force){let c=await e.z.daemonConnection.findFirst({where:{companyUuid:a,uuid:b},select:{lastSeenAt:!0}});if(!function(a,b=Date.now()){return!a||b-a.lastSeenAt.getTime()>h.BP}(c))return 0}let g=new Date,i=0;for(let a of f){let b=await s(a.uuid,"interrupted",{interruptedReason:"offline",endedAt:g});if(b.ok)i+=1;else if("invalid_transition"===b.reason){let{default:d}=await Promise.resolve().then(c.bind(c,65582));d.info({turnUuid:a.uuid,from:b.from,to:b.to},"Orphan-turn reconcile lost the race to a concurrent terminal transition")}}return i}catch(e){let{default:d}=await Promise.resolve().then(c.bind(c,65582));return d.error({err:e,companyUuid:a,connectionUuid:b},"Failed to reconcile orphaned running turns"),0}}async function u(a,b){if(0===b.length)return 0;try{let c=await e.z.daemonSessionTurn.findMany({where:{status:"running",sessionUuid:{in:b.map(a=>a.uuid)}},select:{sessionUuid:!0}});if(0===c.length)return 0;let d=new Set(c.map(a=>a.sessionUuid)),f=[...new Set(b.filter(a=>d.has(a.uuid)).map(a=>a.originConnectionUuid))],g=0;for(let b of f)g+=await t(a,b);return g}catch(d){let{default:b}=await Promise.resolve().then(c.bind(c,65582));return b.error({err:d,companyUuid:a},"Read-time orphan-turn fallback failed (read continues unconverged)"),0}}async function v(a){let b=await e.z.daemonSession.findMany({where:{companyUuid:a.companyUuid,...m(a)},orderBy:{lastTurnAt:"desc"}});return await u(a.companyUuid,b),b.map(k)}async function w(a,b){return await e.z.daemonSession.findFirst({where:{uuid:b,companyUuid:a.companyUuid,...m(a)},select:{uuid:!0}})?(await e.z.daemonSessionTurn.findMany({where:{sessionUuid:b},orderBy:{seq:"asc"}})).map(l):null}async function x(a,b){let c=await e.z.daemonSession.findFirst({where:{uuid:b,companyUuid:a.companyUuid,...m(a)},select:{uuid:!0}});return null!=c}let N=20;async function y(a,b,c={}){let d=await e.z.daemonSession.findFirst({where:{uuid:b,companyUuid:a.companyUuid,...m(a)}});if(!d)return null;await u(a.companyUuid,[d]);let f=Math.min(Math.max(1,Math.floor(c.limit??N)),200),g="number"==typeof c.beforeTurnSeq&&Number.isFinite(c.beforeTurnSeq)?c.beforeTurnSeq:null,h="number"==typeof c.beforeMsgSeq&&Number.isFinite(c.beforeMsgSeq)?c.beforeMsgSeq:null,i=await e.z.daemonSessionTurn.findMany({where:{sessionUuid:b,...null!==g?{seq:{lte:g}}:{}},orderBy:{seq:"desc"}}),j=i.map(a=>a.uuid),n=j.length>0?await e.z.daemonTranscriptMessage.findMany({where:{turnUuid:{in:j}},orderBy:[{turnUuid:"asc"},{seq:"asc"}]}):[],o=new Map;for(let a of n){let b=A(a),c=o.get(b.turnUuid);c?c.push(b):o.set(b.turnUuid,[b])}let p=[];for(let a of i){let b=o.get(a.uuid)??[];for(let c=b.length-1;c>=0;c--)p.push({turnSeq:a.seq,msgSeq:b[c].seq,rendered:b[c]});let c=a.promptText,d="string"==typeof c&&c.length>0;p.push({turnSeq:a.seq,msgSeq:0,rendered:d?{uuid:`synthetic:${a.uuid}`,turnUuid:a.uuid,role:"user",text:c,seq:0,createdAt:a.createdAt.toISOString()}:null})}let q=null!==g?p.filter(a=>a.turnSeq<g||a.turnSeq===g&&a.msgSeq<(h??0)):p,r=q.length>f,s=r?q.slice(0,f):q,t=[...s].reverse(),v=s.length>0?s[s.length-1]:null,w=new Map;for(let a of i)w.set(a.uuid,a);let x=new Map;for(let a of i)x.set(a.seq,a.uuid);let z=new Map,B=[];for(let a of t)z.has(a.turnSeq)||(z.set(a.turnSeq,[]),B.push(a.turnSeq)),a.rendered&&z.get(a.turnSeq).push(a.rendered);let C=B.map(a=>{let b=x.get(a);return{...l(w.get(b)),messages:z.get(a)??[]}});return{session:k(d),turns:C,hasMore:r,oldestTurnSeq:v?v.turnSeq:null,oldestMsgSeq:v?v.msgSeq:null}}class O extends Error{constructor(a){super("This session is read-only: its origin connection is offline. A daemon session can only be continued on the connection that holds its on-disk transcript (claude --resume is cwd/machine-bound), so it is never routed to another connection."),this.code="session_read_only",this.name="SessionReadOnlyError",this.originConnectionUuid=a}}async function z(a,b){let c=await e.z.daemonSession.findFirst({where:{uuid:b,companyUuid:a},select:{originConnectionUuid:!0}});if(!c)throw Error(`DaemonSession ${b} not found`);let d=await e.z.daemonConnection.findFirst({where:{uuid:c.originConnectionUuid,companyUuid:a},select:{status:!0,lastSeenAt:!0,cwd:!0}});if(!(null!=d&&"online"===d.status&&Date.now()-d.lastSeenAt.getTime()<=h.BP))throw new O(c.originConnectionUuid);return c.originConnectionUuid}function A(a){return{uuid:a.uuid,turnUuid:a.turnUuid,role:a.role,text:a.text,seq:a.seq,createdAt:a.createdAt.toISOString()}}async function B(a){let b=null;if(a.turnUuid)b=await e.z.daemonSessionTurn.findFirst({where:{uuid:a.turnUuid,session:{agentUuid:a.agentUuid,companyUuid:a.companyUuid}},select:{uuid:!0,sessionUuid:!0}});else if(a.sessionId){let c=await e.z.daemonSession.findFirst({where:{agentUuid:a.agentUuid,companyUuid:a.companyUuid,sessionId:a.sessionId},select:{uuid:!0}});c&&(b=await e.z.daemonSessionTurn.findFirst({where:{sessionUuid:c.uuid,status:"running"},orderBy:{seq:"asc"},select:{uuid:!0,sessionUuid:!0}})??await e.z.daemonSessionTurn.findFirst({where:{sessionUuid:c.uuid},orderBy:{seq:"desc"},select:{uuid:!0,sessionUuid:!0}}))}if(!b)return{ok:!1,reason:"not_found"};let c=b.sessionUuid,d=a.messages.filter(a=>K.includes(a.role)&&"string"==typeof a.text&&a.text.trim().length>0),f=[];if(d.length>0){let a=await e.z.daemonTranscriptMessage.findFirst({where:{turnUuid:b.uuid},orderBy:{seq:"desc"},select:{seq:!0}}),g=(a?.seq??0)+1,h=[];for(let a of d){let c=await e.z.daemonTranscriptMessage.create({data:{turnUuid:b.uuid,role:a.role,text:a.text,seq:g}});h.push(c),g+=1}f=h.map(A),await C(c)}let g=await e.z.daemonTranscriptMessage.count({where:{turn:{sessionUuid:c}}});if(f.length>0){let d=await e.z.daemonSessionTurn.findUnique({where:{uuid:b.uuid}}),g=await e.z.daemonSession.findUnique({where:{uuid:c},select:{companyUuid:!0}});d&&o({companyUuid:g?.companyUuid??a.companyUuid,sessionUuid:c,trigger:"transcript_appended",turn:l(d),messages:f})}return{ok:!0,appended:f.length,stored:g,messages:f}}async function C(a){let b=await e.z.daemonTranscriptMessage.count({where:{turn:{sessionUuid:a}}})-L;if(b<=0)return;let c=await e.z.daemonTranscriptMessage.findMany({where:{turn:{sessionUuid:a}},orderBy:[{createdAt:"asc"},{id:"asc"}],take:b,select:{uuid:!0}});0!==c.length&&await e.z.daemonTranscriptMessage.deleteMany({where:{uuid:{in:c.map(a=>a.uuid)}}})}async function D(a){let b,c=await e.z.daemonSession.findFirst({where:{agentUuid:a.agentUuid,companyUuid:a.companyUuid,sessionId:a.sessionId},select:{uuid:!0}});if(!c)return{ok:!1,reason:"not_found"};let d="running"===a.status?"pending":"ended"===a.status||"interrupted"===a.status?"running":null,f=await e.z.daemonSessionTurn.findFirst({where:{sessionUuid:c.uuid,...d?{status:d}:{}},orderBy:{seq:"asc"},select:{uuid:!0}});if(!f)return{ok:!1,reason:"not_found"};if(a.entityType&&a.entityUuid){let c=await e.z.daemonExecution.findFirst({where:{companyUuid:a.companyUuid,connectionUuid:a.connectionUuid,entityType:a.entityType,entityUuid:a.entityUuid},select:{uuid:!0}});b=c?.uuid??null}let g=new Date,h=void 0!==a.startedAt?a.startedAt:"running"===a.status?g:void 0,i=void 0!==a.endedAt?a.endedAt:"ended"===a.status||"interrupted"===a.status?g:void 0,j=await s(f.uuid,a.status,{...void 0!==h?{startedAt:h}:{},...void 0!==i?{endedAt:i}:{},...void 0!==b?{executionUuid:b}:{},...void 0!==a.interruptedReason?{interruptedReason:a.interruptedReason}:{}});return j.ok?{ok:!0,turn:j.turn}:"not_found"===j.reason?{ok:!1,reason:"not_found"}:{ok:!1,reason:"invalid_transition",from:j.from,to:j.to}}async function E(a){return(await e.z.daemonSessionTurn.findMany({where:{status:"pending",session:{companyUuid:a.companyUuid,agentUuid:a.agentUuid,originConnectionUuid:a.connectionUuid}},orderBy:[{session:{createdAt:"asc"}},{seq:"asc"}],select:{uuid:!0,sessionUuid:!0,seq:!0,trigger:!0,promptText:!0,session:{select:{sessionId:!0,directIdeaUuid:!0}}}})).map(a=>({turnUuid:a.uuid,sessionUuid:a.sessionUuid,sessionId:a.session.sessionId,directIdeaUuid:a.session.directIdeaUuid,seq:a.seq,trigger:a.trigger,promptText:a.promptText}))}d()}catch(a){d(a)}})},35205:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{K:()=>j});var e=c(71165),f=c(57578),g=c(8777),h=c(66643),i=a([e,f,g,h]);async function j(a,b,c){let d=await k(a,b,c),e=d.lineage.find(a=>"idea"===a.type)?.uuid??null;return{...d,directIdeaUuid:e}}async function k(a,b,c){switch(b){case"idea":return l(a,c);case"proposal":return o(a,c,"proposal");case"task":return m(a,c);case"document":return n(a,c);default:return{rootIdeaUuid:null,lineage:[],resolvedVia:"not_found"}}}async function l(a,b){let c=[],d=await p(a,b,c);return null===d?{rootIdeaUuid:null,lineage:[],resolvedVia:"not_found"}:{rootIdeaUuid:d,lineage:c,resolvedVia:"root_idea"}}async function m(a,b){let c=await (0,e.K4)(a,b);if(!c)return{rootIdeaUuid:null,lineage:[],resolvedVia:"not_found"};let d={type:"task",uuid:c.uuid,title:c.title};return c.proposalUuid?o(a,c.proposalUuid,"via_proposal",d):{rootIdeaUuid:null,lineage:[d],resolvedVia:"no_proposal"}}async function n(a,b){let c=await (0,g.Cs)(a,b);if(!c)return{rootIdeaUuid:null,lineage:[],resolvedVia:"not_found"};let d={type:"document",uuid:c.uuid,title:c.title};return c.proposalUuid?o(a,c.proposalUuid,"via_document_proposal",d):{rootIdeaUuid:null,lineage:[d],resolvedVia:"standalone_document"}}async function o(a,b,c,d){var e;let g=d?[d]:[],h=await (0,f.PK)(a,b);if(!h)return{rootIdeaUuid:null,lineage:g,resolvedVia:"not_found"};if(g.push({type:"proposal",uuid:h.uuid,title:h.title}),"idea"!==h.inputType)return{rootIdeaUuid:null,lineage:g,resolvedVia:"proposal_input_not_idea"};let i=(e=h.inputUuids,Array.isArray(e)?e.filter(a=>"string"==typeof a):[]);if(0===i.length)return{rootIdeaUuid:null,lineage:g,resolvedVia:"proposal_input_not_idea"};let j=await p(a,i[0],g);if(null===j)return{rootIdeaUuid:null,lineage:g,resolvedVia:"not_found"};let k="via_document_proposal"===c?"via_document_proposal":"via_proposal"===c?"via_proposal":"root_idea";if(1===i.length)return{rootIdeaUuid:j,lineage:g,resolvedVia:k};let l=[j];for(let b of i.slice(1)){let c=await p(a,b);null!==c&&l.push(c)}return{rootIdeaUuid:j,lineage:g,resolvedVia:k,ambiguous:!0,candidates:l}}async function p(a,b,c){let d=await (0,h.MY)(a,b);if(!d)return null;c?.push({type:"idea",uuid:d.uuid,title:d.title});let e=new Set([d.uuid]);for(let b=0;b<50;b++){let b=d.parentUuid;if(!b||e.has(b))break;e.add(b);let f=await (0,h.MY)(a,b);if(!f)break;c?.push({type:"idea",uuid:f.uuid,title:f.title}),d=f}return d.uuid}[e,f,g,h]=i.then?(await i)():i,d()}catch(a){d(a)}})},37943:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{$M:()=>m,Ip:()=>n,NL:()=>o,Ug:()=>s,Xm:()=>k,aF:()=>j,lX:()=>r,p_:()=>l,rD:()=>p,y1:()=>q});var e=c(52618),f=c(42558),g=c(14120),h=a([e,g]);function i(a){return{uuid:a.uuid,projectUuid:a.projectUuid,projectName:a.projectName,recipientType:a.recipientType,recipientUuid:a.recipientUuid,entityType:a.entityType,entityUuid:a.entityUuid,entityTitle:a.entityTitle,action:a.action,message:a.message,actorType:a.actorType,actorUuid:a.actorUuid,actorName:a.actorName,readAt:a.readAt?.toISOString()??null,archivedAt:a.archivedAt?.toISOString()??null,createdAt:a.createdAt.toISOString(),instructionText:a.instructionText??null}}async function j(a){let b=await e.z.notification.create({data:{companyUuid:a.companyUuid,projectUuid:a.projectUuid,recipientType:a.recipientType,recipientUuid:a.recipientUuid,entityType:a.entityType,entityUuid:a.entityUuid,entityTitle:a.entityTitle,projectName:a.projectName,action:a.action,message:a.message,actorType:a.actorType,actorUuid:a.actorUuid,actorName:a.actorName,instructionText:a.instructionText??null}}),c=await m(a.companyUuid,a.recipientType,a.recipientUuid),{turn:d,targetConnectionUuid:h,suppressWake:j}=await (0,g.Wy)(a);return f.B.emit(`notification:${a.recipientType}:${a.recipientUuid}`,{type:"new_notification",notificationUuid:b.uuid,unreadCount:c,action:a.action,actorName:a.actorName,entityTitle:a.entityTitle,entityType:a.entityType,entityUuid:a.entityUuid,projectUuid:a.projectUuid,targetConnectionUuid:h,suppressWake:j}),{notification:i(b),turn:d}}async function k(a){let b=await Promise.all(a.map(a=>e.z.notification.create({data:{companyUuid:a.companyUuid,projectUuid:a.projectUuid,recipientType:a.recipientType,recipientUuid:a.recipientUuid,entityType:a.entityType,entityUuid:a.entityUuid,entityTitle:a.entityTitle,projectName:a.projectName,action:a.action,message:a.message,actorType:a.actorType,actorUuid:a.actorUuid,actorName:a.actorName,instructionText:a.instructionText??null}}))),c=new Map;for(let b of a){let{targetConnectionUuid:a,suppressWake:d}=await (0,g.Wy)(b);c.set(b,{targetConnectionUuid:a,suppressWake:d})}let d=new Set;for(let b of a)d.add(`${b.recipientType}:${b.recipientUuid}:${b.companyUuid}`);for(let e of d){let[d,g,h]=e.split(":"),i=await m(h,d,g),j=b.find(a=>a.recipientType===d&&a.recipientUuid===g),k=a.find(a=>a.recipientType===d&&a.recipientUuid===g);f.B.emit(`notification:${d}:${g}`,{type:"new_notification",notificationUuid:j?.uuid,unreadCount:i,action:k?.action,actorName:k?.actorName,entityTitle:k?.entityTitle,entityType:k?.entityType,entityUuid:k?.entityUuid,projectUuid:k?.projectUuid,targetConnectionUuid:k?c.get(k)?.targetConnectionUuid??null:null,suppressWake:!!k&&(c.get(k)?.suppressWake??!1)})}return b.map(i)}async function l(a){let{companyUuid:b,recipientType:c,recipientUuid:d,projectUuid:f,readFilter:g,archived:h}=a,j=a.skip??0,k=a.take??20,l={companyUuid:b,recipientType:c,recipientUuid:d,...f&&{projectUuid:f},..."unread"===g&&{readAt:null},..."read"===g&&{readAt:{not:null}},...!1===h&&{archivedAt:null},...!0===h&&{archivedAt:{not:null}}},[n,o,p]=await Promise.all([e.z.notification.findMany({where:l,skip:j,take:k,orderBy:{createdAt:"desc"}}),e.z.notification.count({where:l}),m(b,c,d)]);return{notifications:n.map(i),total:o,unreadCount:p}}async function m(a,b,c){return e.z.notification.count({where:{companyUuid:a,recipientType:b,recipientUuid:c,readAt:null,archivedAt:null}})}async function n(a,b,c,d){await e.z.notification.updateMany({where:{uuid:a,companyUuid:b,recipientType:c,recipientUuid:d,readAt:null},data:{readAt:new Date}});let g=await e.z.notification.findFirst({where:{uuid:a,companyUuid:b}});if(!g)throw Error("Notification not found");let h=await m(b,c,d);return f.B.emit(`notification:${c}:${d}`,{type:"count_update",unreadCount:h}),i(g)}async function o(a,b,c,d){let g=await e.z.notification.updateMany({where:{companyUuid:a,recipientType:b,recipientUuid:c,readAt:null,...d&&{projectUuid:d}},data:{readAt:new Date}}),h=await m(a,b,c);return f.B.emit(`notification:${b}:${c}`,{type:"count_update",unreadCount:h}),{count:g.count}}async function p(a,b,c,d){await e.z.notification.updateMany({where:{uuid:a,companyUuid:b,recipientType:c,recipientUuid:d,archivedAt:null},data:{archivedAt:new Date}});let g=await e.z.notification.findFirst({where:{uuid:a,companyUuid:b}});if(!g)throw Error("Notification not found");let h=await m(b,c,d);return f.B.emit(`notification:${c}:${d}`,{type:"count_update",unreadCount:h}),i(g)}function q(a){f.B.emit(`notification:user:${a.ownerUuid}`,{type:"new_notification",action:"agent_checkin",entityType:"agent",entityUuid:a.agentUuid,entityTitle:a.agentName,actorName:a.agentName})}async function r(a,b,c){let d=await e.z.notificationPreference.findUnique({where:{ownerType_ownerUuid:{ownerType:b,ownerUuid:c}}});return d||(d=await e.z.notificationPreference.create({data:{companyUuid:a,ownerType:b,ownerUuid:c}})),{uuid:d.uuid,ownerType:d.ownerType,ownerUuid:d.ownerUuid,taskAssigned:d.taskAssigned,taskStatusChanged:d.taskStatusChanged,taskVerified:d.taskVerified,taskReopened:d.taskReopened,proposalSubmitted:d.proposalSubmitted,proposalApproved:d.proposalApproved,proposalRejected:d.proposalRejected,ideaClaimed:d.ideaClaimed,commentAdded:d.commentAdded,elaborationRequested:d.elaborationRequested,elaborationAnswered:d.elaborationAnswered,mentioned:d.mentioned}}async function s(a,b,c,d){let f=await e.z.notificationPreference.upsert({where:{ownerType_ownerUuid:{ownerType:b,ownerUuid:c}},create:{companyUuid:a,ownerType:b,ownerUuid:c,...d},update:d});return{uuid:f.uuid,ownerType:f.ownerType,ownerUuid:f.ownerUuid,taskAssigned:f.taskAssigned,taskStatusChanged:f.taskStatusChanged,taskVerified:f.taskVerified,taskReopened:f.taskReopened,proposalSubmitted:f.proposalSubmitted,proposalApproved:f.proposalApproved,proposalRejected:f.proposalRejected,ideaClaimed:f.ideaClaimed,commentAdded:f.commentAdded,elaborationRequested:f.elaborationRequested,elaborationAnswered:f.elaborationAnswered,mentioned:f.mentioned}}[e,g]=h.then?(await h)():h,d()}catch(a){d(a)}})},48873:(a,b,c)=>{c.d(b,{Ik:()=>f,Yy:()=>d,nm:()=>e});class d extends Error{constructor(a){super(`${a} is already claimed`),this.name="AlreadyClaimedError"}}class e extends Error{constructor(a){super(`${a} is not currently claimed`),this.name="NotClaimedError"}}function f(a){return"object"==typeof a&&null!==a&&"code"in a&&"P2025"===a.code}},54349:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{Hu:()=>p,eT:()=>o,fg:()=>m,uA:()=>s});var e=c(52618),f=c(76872),g=c(90494),h=c(88437),i=c(42558),j=c(65582),k=a([e,f,g,h]);[e,f,g,h]=k.then?(await k)():k;let t={uuid:!0,targetType:!0,targetUuid:!0,content:!0,authorType:!0,authorUuid:!0,createdAt:!0,updatedAt:!0};async function l(a){return Promise.all(a.map(async a=>{let b=await (0,f.lR)(a.authorType,a.authorUuid);return{uuid:a.uuid,targetType:a.targetType,targetUuid:a.targetUuid,content:a.content,author:{type:a.authorType,uuid:a.authorUuid,name:b??"Unknown"},createdAt:a.createdAt.toISOString(),updatedAt:a.updatedAt.toISOString()}}))}async function m(a){let{companyUuid:b,targetType:c,targetUuid:d,limit:g}=a;if(!await (0,f._9)(c,d,b))return void 0!==g?{comments:[],total:0,nextCursor:null,hasMore:!1}:{comments:[],total:0};if(void 0!==g)return n(a,g);let{skip:h,take:i}=a,j={companyUuid:b,targetType:c,targetUuid:d},[k,m]=await Promise.all([e.z.comment.findMany({where:j,skip:h,take:i,orderBy:{createdAt:"asc"},select:t}),e.z.comment.count({where:j})]);return{comments:await l(k),total:m}}async function n(a,b){let{companyUuid:c,targetType:d,targetUuid:f,cursor:g}=a,h={companyUuid:c,targetType:d,targetUuid:f},i=!1;if(g){let a=await e.z.comment.findFirst({where:{...h,uuid:g},select:{uuid:!0}});i=null!==a}let[j,k]=await Promise.all([e.z.comment.findMany({where:h,orderBy:[{createdAt:"desc"},{id:"desc"}],take:b+1,...i?{cursor:{uuid:g},skip:1}:{},select:t}),e.z.comment.count({where:h})]),m=j.length>b,n=m?j.slice(0,b):j,o=m?n[n.length-1].uuid:null;return{comments:await l(n),total:k,nextCursor:o,hasMore:m}}async function o({companyUuid:a,targetType:b,targetUuid:c,content:d,authorType:g,authorUuid:h}){if(!await (0,f._9)(b,c,a))throw Error(`Target ${b} with UUID ${c} not found`);let k=await e.z.comment.create({data:{companyUuid:a,targetType:b,targetUuid:c,content:d,authorType:g,authorUuid:h},select:{uuid:!0,targetType:!0,targetUuid:!0,content:!0,authorType:!0,authorUuid:!0,createdAt:!0,updatedAt:!0}}),l=await (0,f.lR)(k.authorType,k.authorUuid);return p(b,c).then(d=>{d&&i.B.emitChange({companyUuid:a,projectUuid:d,entityType:b,entityUuid:c,action:"updated",actorUuid:h})}).catch(()=>{}),r(a,b,c,k.uuid,d,g,h).catch(a=>j.default.error({err:a},"Failed to process comment mentions")),{uuid:k.uuid,targetType:k.targetType,targetUuid:k.targetUuid,content:k.content,author:{type:k.authorType,uuid:k.authorUuid,name:l??"Unknown"},createdAt:k.createdAt.toISOString(),updatedAt:k.updatedAt.toISOString()}}async function p(a,b,c){let d=c?{companyUuid:c}:{};switch(a){case"task":{let a=await e.z.task.findFirst({where:{uuid:b,...d},select:{projectUuid:!0}});return a?.projectUuid??null}case"idea":{let a=await e.z.idea.findFirst({where:{uuid:b,...d},select:{projectUuid:!0}});return a?.projectUuid??null}case"proposal":{let a=await e.z.proposal.findFirst({where:{uuid:b,...d},select:{projectUuid:!0}});return a?.projectUuid??null}case"document":{let a=await e.z.document.findFirst({where:{uuid:b,...d},select:{projectUuid:!0}});return a?.projectUuid??null}default:return null}}async function q(a,b){switch(a){case"task":{let a=await e.z.task.findUnique({where:{uuid:b},select:{title:!0}});return a?.title??"Unknown Task"}case"idea":{let a=await e.z.idea.findUnique({where:{uuid:b},select:{title:!0}});return a?.title??"Unknown Idea"}case"proposal":{let a=await e.z.proposal.findUnique({where:{uuid:b},select:{title:!0}});return a?.title??"Unknown Proposal"}case"document":{let a=await e.z.document.findUnique({where:{uuid:b},select:{title:!0}});return a?.title??"Unknown Document"}default:return"Unknown"}}async function r(a,b,c,d,e,f,i){let j=g.Xs(e);if(0===j.length)return;let k=await p(b,c);if(!k)return;let l=await q(b,c);for(let m of(await g.AM({companyUuid:a,sourceType:"comment",sourceUuid:d,content:e,actorType:f,actorUuid:i,projectUuid:k,entityTitle:l}),j))(m.type!==f||m.uuid!==i)&&await h.createActivity({companyUuid:a,projectUuid:k,targetType:b,targetUuid:c,actorType:f,actorUuid:i,action:"mentioned",value:{mentionedType:m.type,mentionedUuid:m.uuid,mentionedName:m.displayName,sourceType:"comment",sourceUuid:d}})}async function s(a,b,c){if(0===c.length)return{};let d=await e.z.comment.groupBy({by:["targetUuid"],where:{companyUuid:a,targetType:b,targetUuid:{in:c}},_count:{targetUuid:!0}}),f={};for(let a of c)f[a]=0;for(let a of d)f[a.targetUuid]=a._count.targetUuid;return f}d()}catch(a){d(a)}})},66643:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{BB:()=>t,EZ:()=>A,JF:()=>y,MY:()=>w,Nm:()=>E,Q7:()=>v,XB:()=>J,bO:()=>q,bY:()=>F,h_:()=>C,i1:()=>x,jJ:()=>G,w9:()=>B,xo:()=>H});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 K={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(K[p(a)]||[]).includes(b)}async function r(a,b,c,d){if(!d)return{assigneeType:b,assigneeUuid:c};let f=await e.z.agentInstance.findFirst({where:{uuid:d,companyUuid:a},select:{uuid:!0}});if(!f)throw Error("Agent instance not found");return{assigneeType:"agent_instance",assigneeUuid:f.uuid}}async function s(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 t({companyUuid:a,projectUuid:b,skip:c,take:d,status:g,assignedToMe:h,actorUuid:i,actorType:j,ownerUuid:k}){let l={projectUuid:b,companyUuid:a,...g&&{status:g}};h&&i&&j&&(l.OR=await (0,f.zl)({type:"agent"===j?"agent":"user",companyUuid:a,actorUuid:i,ownerUuid:k}));let[m,n]=await Promise.all([e.z.idea.findMany({where:l,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:l})]),o=await Promise.all(m.map(s));if(m.forEach((a,b)=>{o[b].parentUuid=a.parentUuid??null}),o.length>0){let c=await u(a,b,o.map(a=>a.uuid));for(let a of o)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 o)a.childCount=f.get(a.uuid)??0}return{ideas:o,total:n}}let L=["approved","closed"];async function u(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:[...L]},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 v(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 s(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 I(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 z(b,a);let g=(await m.fS(a,c.projectUuid,b)).filter(a=>L.includes(a.status));return 0===g.length?d.reports=[]:d.reports=await l.yZ(a,g.map(a=>a.uuid),"report"),d}async function w(a,b){return e.z.idea.findFirst({where:{uuid:b,companyUuid:a}})}async function x(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 s(b);return c.parentUuid=b.parentUuid,c}async function y(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&&D(h.companyUuid,h.project.uuid,h.uuid,h.title,f,c.content,d.actorType,d.actorUuid).catch(a=>n.default.error({err:a},"Failed to process idea mentions")),s(h)}async function z(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 A(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 s(i);return l.parentUuid=i.parentUuid,l}async function B({ideaUuid:a,companyUuid:b,assigneeType:c,assigneeUuid:d,assignedByUuid:f,instanceUuid:i}){let j=await e.z.idea.findFirst({where:{uuid:a,companyUuid:b}});if(!j||j.assigneeUuid)throw new h.Yy("Idea");let k=p(j.status);if("elaborated"===k)throw Error("Cannot claim an elaborated Idea");let l=await r(b,c,d,i),m=await e.z.idea.update({where:{uuid:a},data:{status:"elaborating",assigneeType:l.assigneeType,assigneeUuid:l.assigneeUuid,assignedAt:new Date,assignedByUuid:f},include:{project:{select:{uuid:!0,name:!0}}}});return g.B.emitChange({companyUuid:m.companyUuid,projectUuid:m.project.uuid,entityType:"idea",entityUuid:m.uuid,action:"updated"}),s(m)}async function C(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"}),s(d)}async function D(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 E(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 F(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 z(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 s(p),moved:o}}async function G(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 z(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 H(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 I(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}=H({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 M=["todo","in_progress","human_conduct_required","done"];async function J(a,b){let c=await I(a,b),d={},e={};for(let a of M)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)}})},70369:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{Bp:()=>u,N_:()=>q,OQ:()=>y,Oi:()=>w,Rk:()=>r,Uc:()=>C,Vn:()=>D,i2:()=>B,k3:()=>E,mX:()=>z,sB:()=>t,ub:()=>s,y9:()=>A});var e=c(55511),f=c(52618),g=c(65582),h=c(42558),i=c(37943),j=c(28792),k=c(34853),l=c(93419),m=a([f,i,j,k,l]);[f,i,j,k,l]=m.then?(await m)():m;let x=g.default.child({module:"daemon-instruction.service"});class y extends Error{constructor(){super("Daemon session not found"),this.code="session_not_visible",this.name="SessionNotVisibleError"}}class z extends Error{constructor(){super("Connection not found"),this.code="connection_not_visible",this.name="ConnectionNotVisibleError"}}class A extends Error{constructor(a){super("The chosen connection is offline. An instruction can only run on an online daemon connection (claude --resume is cwd/machine-bound)."),this.code="connection_offline",this.name="ConnectionOfflineError",this.connectionUuid=a}}class B extends Error{constructor(a){super("This conversation's origin is still online, so it cannot be re-pointed. Re-pointing only rescues a read-only conversation whose origin went offline; send to the live origin instead."),this.code="repoint_origin_live",this.name="RepointOriginLiveError",this.originConnectionUuid=a}}class C extends Error{constructor(a){super("empty"===a?"Instruction text must not be empty.":"Instruction text exceeds the maximum of 4000 characters."),this.code="invalid_instruction_text",this.name="InstructionTextError",this.reason=a}}function n(a){let b=(a??"").trim();if(0===b.length)throw new C("empty");if(b.length>4e3)throw new C("too_long");return b}async function o(a,b){let c="agent"===a.type?{agentUuid:a.actorUuid}:{agent:{ownerUuid:a.actorUuid}};return await f.z.daemonSession.findFirst({where:{uuid:b,companyUuid:a.companyUuid,...c},select:{agentUuid:!0,sessionId:!0,directIdeaUuid:!0,originConnectionUuid:!0}})}async function p(a){let{auth:b,agentUuid:c,sessionUuid:d,sessionId:e,directIdeaUuid:f,instructionText:g}=a,{turn:h}=await i.aF({companyUuid:b.companyUuid,projectUuid:"",projectName:"",recipientType:"agent",recipientUuid:c,entityType:null!=f?"idea":"daemon_session",entityUuid:null!=f?f:e,entityTitle:"",action:"human_instruction",message:"Human instruction",actorType:"agent"===b.type?"agent":"user",actorUuid:b.actorUuid,actorName:"",instructionText:g});if(!h)throw Error(`Instruction turn was not created on session ${d} (no online origin at chokepoint).`);return h}function q(a){try{(0,j.s7)({companyUuid:a.companyUuid,targetConnectionUuid:a.originConnectionUuid,command:"deliver_turn",turnUuid:a.turnUuid})}catch(b){x.warn({err:b,originConnectionUuid:a.originConnectionUuid,turnUuid:a.turnUuid},"deliver_turn live ping failed; the turn is persisted and will be recovered by the daemon's reconnect-backfill")}}async function r(a,b){let c=n(b.instructionText),d=await o(a,b.sessionUuid);if(!d)throw new y;await (0,k.assertContinuable)(a.companyUuid,b.sessionUuid);let e=await p({auth:a,agentUuid:d.agentUuid,sessionUuid:b.sessionUuid,sessionId:d.sessionId,directIdeaUuid:d.directIdeaUuid,instructionText:c});return q({companyUuid:a.companyUuid,originConnectionUuid:d.originConnectionUuid,turnUuid:e.uuid}),{turn:e}}async function s(a,b){let c=n(b.instructionText),d=await v(a,b.agentUuid),f=await (0,l.HC)(a.companyUuid,b.agentUuid,b.connectionUuid);if(!d||!f)throw new z;if(!await (0,l.j8)(a.companyUuid,b.connectionUuid))throw new A(b.connectionUuid);let g=(0,e.randomUUID)(),h=await (0,k.resolveOrCreateSession)({companyUuid:a.companyUuid,agentUuid:b.agentUuid,sessionId:g,directIdeaUuid:null,originConnectionUuid:b.connectionUuid}),i=await p({auth:a,agentUuid:b.agentUuid,sessionUuid:h.uuid,sessionId:g,directIdeaUuid:null,instructionText:c});return q({companyUuid:a.companyUuid,originConnectionUuid:b.connectionUuid,turnUuid:i.uuid}),{session:h,turn:i}}class D extends Error{constructor(){super("Project not found"),this.code="project_not_visible",this.name="ProjectNotVisibleError"}}class E extends Error{constructor(a){super("The chosen connection has no registered agent instance yet. Wait for the daemon to finish its handshake and retry."),this.code="connection_instance_missing",this.name="ConnectionInstanceMissingError",this.connectionUuid=a}}async function t(a,b){let c=await v(a,b.agentUuid),d=await (0,l.HC)(a.companyUuid,b.agentUuid,b.connectionUuid);if(!c||!d)throw new z;if(!await (0,l.j8)(a.companyUuid,b.connectionUuid))throw new A(b.connectionUuid);let g=await f.z.project.findFirst({where:{uuid:b.projectUuid,companyUuid:a.companyUuid},select:{uuid:!0,name:!0}});if(!g)throw new D;let i=await f.z.daemonConnection.findFirst({where:{uuid:b.connectionUuid,companyUuid:a.companyUuid},select:{agentInstanceUuid:!0}});if(!i?.agentInstanceUuid)throw new E(b.connectionUuid);let j=i.agentInstanceUuid,m=b.descriptionText?.trim()??"";if(0===m.length)throw new C("empty");let o=(0,e.randomUUID)(),p=n(function(a){let b=a.projectName?.trim()?`"${a.projectName.trim()}" (projectUuid: ${a.projectUuid})`:`projectUuid: ${a.projectUuid}`;return[`[Chorus conversational idea entry] A new idea has been PRE-CREATED for project ${b} from the user's description below, and it is already assigned to you (status: elaborating).`,` ideaUuid: ${a.ideaUuid}`,"",`This conversation IS that idea's root session — its elaboration and lifecycle wakes will continue here. Do the following, in order:`,"1. Edit the idea via chorus_edit_idea: derive a concise title from the description and polish the content (keep the user's meaning; you may restructure). The current title is a placeholder.",`2. Immediately start elaboration on the idea (chorus_pm_start_elaboration), following the idea skill — do NOT wait for another wake. Post a short summary of your questions in this conversation and direct the user to answer in the idea's elaboration panel.`,"3. End the turn. The user's panel answers will wake this same conversation.\n\n--- User's idea description ---",a.descriptionText].join("\n")}({ideaUuid:o,projectUuid:g.uuid,projectName:g.name,descriptionText:m})),{ideaRow:r,sessionRow:s,turnRow:t}=await f.z.$transaction(async c=>{let d=await c.idea.create({data:{uuid:o,companyUuid:a.companyUuid,projectUuid:g.uuid,title:function(a){let b=(a??"").split("\n").map(a=>a.trim()).find(a=>a.length>0)??"";return 0===b.length?"-":b.length<=60?b:`${b.slice(0,59)}…`}(m),content:m,status:"elaborating",assigneeType:"agent_instance",assigneeUuid:j,assignedAt:new Date,assignedByUuid:a.actorUuid,createdByUuid:a.actorUuid},select:{uuid:!0,title:!0,content:!0,status:!0,projectUuid:!0,createdAt:!0}}),e=await c.daemonSession.create({data:{companyUuid:a.companyUuid,agentUuid:b.agentUuid,sessionId:o,directIdeaUuid:o,originConnectionUuid:b.connectionUuid,status:"active"}}),f=await c.daemonSessionTurn.create({data:{sessionUuid:e.uuid,seq:1,trigger:"human_instruction",promptText:p,status:"pending"}});return{ideaRow:d,sessionRow:e,turnRow:f}}),u={uuid:s.uuid,agentUuid:s.agentUuid,sessionId:s.sessionId,directIdeaUuid:s.directIdeaUuid,originConnectionUuid:s.originConnectionUuid,status:s.status,title:s.title,lastTurnAt:s.lastTurnAt.toISOString(),createdAt:s.createdAt.toISOString(),updatedAt:s.updatedAt.toISOString()},w={uuid:t.uuid,sessionUuid:t.sessionUuid,seq:t.seq,trigger:t.trigger,promptText:t.promptText,status:t.status,interruptedReason:t.interruptedReason,executionUuid:t.executionUuid,startedAt:t.startedAt?t.startedAt.toISOString():null,endedAt:t.endedAt?t.endedAt.toISOString():null,createdAt:t.createdAt.toISOString()},x={uuid:r.uuid,title:r.title,content:r.content,status:r.status,projectUuid:r.projectUuid,createdAt:r.createdAt.toISOString()};return(0,k.publishTranscriptEvent)({companyUuid:a.companyUuid,sessionUuid:u.uuid,trigger:"turn_created",turn:w,messages:[]}),h.B.emitChange({companyUuid:a.companyUuid,projectUuid:g.uuid,entityType:"idea",entityUuid:x.uuid,action:"created"}),q({companyUuid:a.companyUuid,originConnectionUuid:b.connectionUuid,turnUuid:w.uuid}),{idea:x,session:u,turn:w}}async function u(a,b){let c=n(b.instructionText),d=await o(a,b.sessionUuid);if(!d)throw new y;if(await (0,l.j8)(a.companyUuid,d.originConnectionUuid))throw new B(d.originConnectionUuid);if(!await (0,l.HC)(a.companyUuid,d.agentUuid,b.connectionUuid))throw new z;if(!await (0,l.j8)(a.companyUuid,b.connectionUuid))throw new A(b.connectionUuid);await f.z.daemonSession.update({where:{uuid:b.sessionUuid,companyUuid:a.companyUuid},data:{originConnectionUuid:b.connectionUuid}});let e=await p({auth:a,agentUuid:d.agentUuid,sessionUuid:b.sessionUuid,sessionId:d.sessionId,directIdeaUuid:d.directIdeaUuid,instructionText:c});q({companyUuid:a.companyUuid,originConnectionUuid:b.connectionUuid,turnUuid:e.uuid});let g=await f.z.daemonSession.findUnique({where:{uuid:b.sessionUuid}});if(!g)throw Error(`repointSessionOriginAndSend: session ${b.sessionUuid} missing after re-point`);return{session:{uuid:g.uuid,agentUuid:g.agentUuid,sessionId:g.sessionId,directIdeaUuid:g.directIdeaUuid,originConnectionUuid:g.originConnectionUuid,status:g.status,title:g.title,lastTurnAt:g.lastTurnAt.toISOString(),createdAt:g.createdAt.toISOString(),updatedAt:g.updatedAt.toISOString()},turn:e}}async function v(a,b){return"agent"===a.type?b===a.actorUuid:await f.z.agent.count({where:{uuid:b,companyUuid:a.companyUuid,ownerUuid:a.actorUuid}})>0}async function w(a){let b=await (0,k.getVisibleSessions)(a);if(0===b.length)return[];let c=[...new Set(b.map(a=>a.originConnectionUuid))],d=await f.z.daemonConnection.findMany({where:{companyUuid:a.companyUuid,uuid:{in:c}},select:{uuid:!0,status:!0,lastSeenAt:!0}}),e=Date.now(),g=new Set(d.filter(a=>"online"===a.status&&e-a.lastSeenAt.getTime()<=k.STALE_THRESHOLD_MS).map(a=>a.uuid)),h=[...new Set(b.map(a=>a.directIdeaUuid).filter(a=>!!a))],i=(0,k.getFirstInstructionBySessionUuid)(b.map(a=>a.uuid)),j=h.length>0?f.z.idea.findMany({where:{companyUuid:a.companyUuid,uuid:{in:h}},select:{uuid:!0,title:!0}}):Promise.resolve([]),l=await i,m=await j,n=new Map(m.map(a=>[a.uuid,a.title]));return b.map(a=>({...a,originOnline:g.has(a.originConnectionUuid),firstInstruction:l.get(a.uuid)??null,ideaTitle:a.directIdeaUuid?n.get(a.directIdeaUuid)??null:null}))}d()}catch(a){d(a)}})},71165:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{AY:()=>N,Cm:()=>P,Ew:()=>H,Fp:()=>A,IM:()=>O,K4:()=>w,LQ:()=>C,Pf:()=>D,QK:()=>z,QL:()=>K,UT:()=>x,Vk:()=>u,_T:()=>E,cn:()=>F,gg:()=>v,j9:()=>L,lC:()=>y,vQ:()=>M,vq:()=>B,xI:()=>o});var e=c(52618),f=c(76872),g=c(42558),h=c(48873),i=c(54349),j=c(90494),k=c(88437),l=c(65582),m=c(68775),n=a([e,f,i,j,k]);[e,f,i,j,k]=n.then?(await n)():n;let Q={open:["assigned","closed"],assigned:["open","in_progress","closed"],in_progress:["to_verify","closed"],to_verify:["done","in_progress","closed"],done:["closed"],closed:[]};function o(a,b){return(Q[a]||[]).includes(b)}let R={total:0,required:0,passed:0,failed:0,pending:0,requiredPassed:0,requiredFailed:0,requiredPending:0};function p(a){if(0===a.length)return{status:"not_started",summary:{...R}};let b={...R,total:a.length};for(let c of a)c.required&&b.required++,"passed"===c.status?(b.passed++,c.required&&b.requiredPassed++):"failed"===c.status?(b.failed++,c.required&&b.requiredFailed++):(b.pending++,c.required&&b.requiredPending++);return b.requiredFailed>0?{status:"failed",summary:b}:b.requiredPassed===b.required&&b.required>0?{status:"passed",summary:b}:b.passed>0||b.failed>0?{status:"in_progress",summary:b}:{status:"not_started",summary:b}}function q(a){return{uuid:a.uuid,description:a.description,required:a.required,devStatus:a.devStatus,devEvidence:a.devEvidence,devMarkedByType:a.devMarkedByType,devMarkedBy:a.devMarkedBy,devMarkedAt:a.devMarkedAt?.toISOString()??null,status:a.status,evidence:a.evidence,markedByType:a.markedByType,markedBy:a.markedBy,markedAt:a.markedAt?.toISOString()??null,sortOrder:a.sortOrder}}async function r(a,b,c,d){if(!d)return{assigneeType:b,assigneeUuid:c};let f=await e.z.agentInstance.findFirst({where:{uuid:d,companyUuid:a},select:{uuid:!0}});if(!f)throw Error("Agent instance not found");return{assigneeType:"agent_instance",assigneeUuid:f.uuid}}async function s(a,b=0){let[c,d]=await Promise.all([(0,f.ir)(a.assigneeType,a.assigneeUuid,a.assignedAt,a.assignedByUuid),(0,f.LS)(a.createdByUuid)]),e=(a.dependsOn||[]).map(a=>({uuid:a.dependsOn.uuid,title:a.dependsOn.title,status:a.dependsOn.status})),g=(a.dependedBy||[]).map(a=>({uuid:a.task.uuid,title:a.task.title,status:a.task.status})),h=(a.acceptanceCriteriaItems||[]).map(q),{status:i,summary:j}=p(a.acceptanceCriteriaItems||[]);return{uuid:a.uuid,title:a.title,description:a.description,status:a.status,priority:a.priority,storyPoints:a.storyPoints,acceptanceCriteria:a.acceptanceCriteria,acceptanceCriteriaItems:h,acceptanceStatus:i,acceptanceSummary:j,assignee:c,proposalUuid:a.proposalUuid,...a.project&&{project:a.project},createdBy:d,dependsOn:e,dependedBy:g,commentCount:b,createdAt:a.createdAt.toISOString(),updatedAt:a.updatedAt.toISOString()}}async function t(a,b){if(0===a.length)return[];let c=[],d=[],e=[];for(let b of a)b.assigneeType&&b.assigneeUuid&&(c.push({type:b.assigneeType,uuid:b.assigneeUuid}),"agent_instance"===b.assigneeType&&e.push(b.assigneeUuid)),b.assignedByUuid&&c.push({type:"user",uuid:b.assignedByUuid}),d.push(b.createdByUuid);let[g,h,i]=await Promise.all([(0,f.Uo)(c),(0,f.Xx)(d),(0,f.dI)(e)]);return a.map(a=>{let c=null;if(a.assigneeType&&a.assigneeUuid){let b=g.get(a.assigneeUuid);if(b){let d=null;if(a.assignedByUuid){let b=g.get(a.assignedByUuid);b&&(d={type:"user",uuid:a.assignedByUuid,name:b})}let e="agent_instance"===a.assigneeType?i.get(a.assigneeUuid):void 0;c={type:a.assigneeType,uuid:a.assigneeUuid,name:b,assignedAt:a.assignedAt?.toISOString()??null,assignedBy:d,...e?{instance:e}:{}}}}let d=h.get(a.createdByUuid)??null,e=(a.dependsOn||[]).map(a=>({uuid:a.dependsOn.uuid,title:a.dependsOn.title,status:a.dependsOn.status})),f=(a.dependedBy||[]).map(a=>({uuid:a.task.uuid,title:a.task.title,status:a.task.status})),j=(a.acceptanceCriteriaItems||[]).map(q),{status:k,summary:l}=p(a.acceptanceCriteriaItems||[]);return{uuid:a.uuid,title:a.title,description:a.description,status:a.status,priority:a.priority,storyPoints:a.storyPoints,acceptanceCriteria:a.acceptanceCriteria,acceptanceCriteriaItems:j,acceptanceStatus:k,acceptanceSummary:l,assignee:c,proposalUuid:a.proposalUuid,...a.project&&{project:a.project},createdBy:d,dependsOn:e,dependedBy:f,commentCount:b[a.uuid]??0,createdAt:a.createdAt.toISOString(),updatedAt:a.updatedAt.toISOString()}})}let S={dependsOn:{select:{dependsOn:{select:{uuid:!0,title:!0,status:!0}}}},dependedBy:{select:{task:{select:{uuid:!0,title:!0,status:!0}}}},acceptanceCriteriaItems:{orderBy:{sortOrder:"asc"}}};async function u({companyUuid:a,projectUuid:b,skip:c,take:d,status:f,priority:g,proposalUuids:h}){let j={projectUuid:b,companyUuid:a,...f&&{status:f},...g&&{priority:g},...h&&h.length>0&&{proposalUuid:{in:h}}},[k,l]=await Promise.all([e.z.task.findMany({where:j,skip:c,take:d,orderBy:[{priority:"desc"},{createdAt:"desc"}],select:{uuid:!0,title:!0,description:!0,status:!0,priority:!0,storyPoints:!0,acceptanceCriteria:!0,assigneeType:!0,assigneeUuid:!0,assignedAt:!0,assignedByUuid:!0,proposalUuid:!0,createdByUuid:!0,createdAt:!0,updatedAt:!0,...S}}),e.z.task.count({where:j})]),m=await (0,i.uA)(a,"task",k.map(a=>a.uuid));return{tasks:await t(k,m),total:l}}async function v(a,b){let c=await e.z.task.findFirst({where:{uuid:b,companyUuid:a},include:{project:{select:{uuid:!0,name:!0}},...S}});if(!c)return null;let d=await e.z.comment.count({where:{companyUuid:a,targetType:"task",targetUuid:b}});return s(c,d)}async function w(a,b){return e.z.task.findFirst({where:{uuid:b,companyUuid:a}})}async function x(a){let b=await e.z.task.create({data:{companyUuid:a.companyUuid,projectUuid:a.projectUuid,title:a.title,description:a.description,status:"open",priority:a.priority||"medium",storyPoints:a.storyPoints,acceptanceCriteria:a.acceptanceCriteria,proposalUuid:a.proposalUuid,createdByUuid:a.createdByUuid},select:{uuid:!0,title:!0,description:!0,status:!0,priority:!0,storyPoints:!0,acceptanceCriteria:!0,assigneeType:!0,assigneeUuid:!0,assignedAt:!0,assignedByUuid:!0,proposalUuid:!0,createdByUuid:!0,createdAt:!0,updatedAt:!0}});return g.B.emitChange({companyUuid:a.companyUuid,projectUuid:a.projectUuid,entityType:"task",entityUuid:b.uuid,action:"created"}),s(b)}async function y(a,b,c){let d=null;if(void 0!==b.description&&c){let b=await e.z.task.findUnique({where:{uuid:a},select:{description:!0}});d=b?.description??null}let f=await e.z.$transaction(async c=>{if(b.status&&"done"!==b.status){let b=await c.task.findUnique({where:{uuid:a},select:{status:!0}});b?.status==="to_verify"&&await c.acceptanceCriterion.updateMany({where:{taskUuid:a},data:{status:"pending",evidence:null,markedByType:null,markedBy:null,markedAt:null,devStatus:"pending",devEvidence:null,devMarkedByType:null,devMarkedBy:null,devMarkedAt:null}})}return c.task.update({where:{uuid:a},data:b,include:{project:{select:{uuid:!0,name:!0}}}})});return g.B.emitChange({companyUuid:f.companyUuid,projectUuid:f.project.uuid,entityType:"task",entityUuid:f.uuid,action:"updated"}),void 0!==b.description&&c&&b.description&&I(f.companyUuid,f.project.uuid,"task",f.uuid,f.title,d,b.description,c.actorType,c.actorUuid).catch(a=>l.default.error({err:a},"Failed to process task mentions")),s(f)}async function z({taskUuid:a,companyUuid:b,assigneeType:c,assigneeUuid:d,assignedByUuid:f,instanceUuid:i}){try{let h=await r(b,c,d,i),j=await e.z.task.update({where:{uuid:a,status:{in:["open","assigned"]}},data:{status:"assigned",assigneeType:h.assigneeType,assigneeUuid:h.assigneeUuid,assignedAt:new Date,assignedByUuid:f},include:{project:{select:{uuid:!0,name:!0}}}});return g.B.emitChange({companyUuid:j.companyUuid,projectUuid:j.project.uuid,entityType:"task",entityUuid:j.uuid,action:"updated"}),s(j)}catch(a){if((0,h.Ik)(a))throw new h.Yy("Task");throw a}}async function A(a){try{let b=await e.z.task.update({where:{uuid:a,status:"assigned"},data:{status:"open",assigneeType:null,assigneeUuid:null,assignedAt:null,assignedByUuid:null},include:{project:{select:{uuid:!0,name:!0}}}});return g.B.emitChange({companyUuid:b.companyUuid,projectUuid:b.project.uuid,entityType:"task",entityUuid:b.uuid,action:"updated"}),s(b)}catch(a){if((0,h.Ik)(a))throw new h.nm("Task");throw a}}async function B(a){let b=await e.z.task.delete({where:{uuid:a}});return g.B.emitChange({companyUuid:b.companyUuid,projectUuid:b.projectUuid,entityType:"task",entityUuid:b.uuid,action:"deleted"}),b}async function C(a,b){if(0===b.length)return[];let c=b.map((b,c)=>e.z.acceptanceCriterion.create({data:{taskUuid:a,description:b.description,required:b.required??!0,sortOrder:b.sortOrder??c}}));return(await Promise.all(c)).map(q)}async function D(a,b,c){let d=await e.z.task.findFirst({where:{uuid:b,companyUuid:a}});if(!d)throw Error("Task not found");if(!(0,m.hY)(c))throw Error(m.se);let f=(0,m.Ch)(c),h=await e.z.$transaction(async a=>(await a.acceptanceCriterion.deleteMany({where:{taskUuid:b}}),f.length>0&&await a.acceptanceCriterion.createMany({data:f.map((a,c)=>({taskUuid:b,description:a.description,required:a.required,sortOrder:c}))}),a.acceptanceCriterion.findMany({where:{taskUuid:b},orderBy:{sortOrder:"asc"}})));return g.B.emitChange({companyUuid:a,projectUuid:d.projectUuid,entityType:"task",entityUuid:b,action:"updated"}),h.map(q)}async function E(a,b,c,d){let f=await e.z.task.findFirst({where:{uuid:b,companyUuid:a}});if(!f)throw Error("Task not found");let h=new Set((await e.z.acceptanceCriterion.findMany({where:{taskUuid:b},select:{uuid:!0}})).map(a=>a.uuid));for(let a of c)if(!h.has(a.uuid))throw Error(`Criterion ${a.uuid} does not belong to task ${b}`);for(let a of c)await e.z.acceptanceCriterion.update({where:{uuid:a.uuid},data:{status:a.status,evidence:a.evidence??null,markedByType:d.type,markedBy:d.actorUuid,markedAt:new Date}});return g.B.emitChange({companyUuid:a,projectUuid:f.projectUuid,entityType:"task",entityUuid:b,action:"updated"}),G(a,b)}async function F(a,b,c,d){let f=await e.z.task.findFirst({where:{uuid:b,companyUuid:a}});if(!f)throw Error("Task not found");let h=new Set((await e.z.acceptanceCriterion.findMany({where:{taskUuid:b},select:{uuid:!0}})).map(a=>a.uuid));for(let a of c)if(!h.has(a.uuid))throw Error(`Criterion ${a.uuid} does not belong to task ${b}`);for(let a of c)await e.z.acceptanceCriterion.update({where:{uuid:a.uuid},data:{devStatus:a.devStatus,devEvidence:a.devEvidence??null,devMarkedByType:d.type,devMarkedBy:d.actorUuid,devMarkedAt:new Date}});return g.B.emitChange({companyUuid:a,projectUuid:f.projectUuid,entityType:"task",entityUuid:b,action:"updated"}),G(a,b)}async function G(a,b){if(!await e.z.task.findFirst({where:{uuid:b,companyUuid:a}}))throw Error("Task not found");let c=await e.z.acceptanceCriterion.findMany({where:{taskUuid:b},orderBy:{sortOrder:"asc"}}),d=c.map(q),{status:f,summary:g}=p(c);return{items:d,status:f,summary:g}}async function H(a){let b=await e.z.acceptanceCriterion.findMany({where:{taskUuid:a},orderBy:{sortOrder:"asc"}});if(0===b.length||b.filter(a=>a.required).every(a=>"passed"===a.status))return{allowed:!0};let{summary:c}=p(b),d=b.filter(a=>a.required&&"passed"!==a.status).map(q);return{allowed:!1,reason:`Not all required acceptance criteria are passed. Required: ${c.required}, Passed: ${c.requiredPassed}, Failed: ${c.requiredFailed}, Pending: ${c.requiredPending}`,summary:c,unresolvedCriteria:d}}async function I(a,b,c,d,e,f,g,h,i){let l=f?j.Xs(f):[],m=j.Xs(g),n=new Set(l.map(a=>`${a.type}:${a.uuid}`)),o=m.filter(a=>!n.has(`${a.type}:${a.uuid}`));if(0!==o.length)for(let f of(await j.AM({companyUuid:a,sourceType:c,sourceUuid:d,content:g,actorType:h,actorUuid:i,projectUuid:b,entityTitle:e}),o))(f.type!==h||f.uuid!==i)&&await k.createActivity({companyUuid:a,projectUuid:b,targetType:c,targetUuid:d,actorType:h,actorUuid:i,action:"mentioned",value:{mentionedType:f.type,mentionedUuid:f.uuid,mentionedName:f.displayName,sourceType:c,sourceUuid:d}})}async function J(a,b){let c=await e.z.taskDependency.findMany({select:{taskUuid:!0,dependsOnUuid:!0}}),d=new Map;for(let a of c)d.has(a.taskUuid)||d.set(a.taskUuid,[]),d.get(a.taskUuid).push(a.dependsOnUuid);let f=new Set,g=[a];for(;g.length>0;){let a=g.pop();if(a===b)return!0;if(!f.has(a))for(let b of(f.add(a),d.get(a)||[]))f.has(b)||g.push(b)}return!1}async function K(a,b,c){if(b===c)throw Error("A task cannot depend on itself");let[d,f]=await Promise.all([e.z.task.findFirst({where:{uuid:b,companyUuid:a}}),e.z.task.findFirst({where:{uuid:c,companyUuid:a}})]);if(!d)throw Error("Task not found");if(!f)throw Error("Dependency task not found");if(d.projectUuid!==f.projectUuid)throw Error("Tasks must belong to the same project");if(await J(c,b))throw Error("Adding this dependency would create a cycle");let h=await e.z.taskDependency.create({data:{taskUuid:b,dependsOnUuid:c}});return g.B.emitChange({companyUuid:d.companyUuid,projectUuid:d.projectUuid,entityType:"task",entityUuid:b,action:"updated"}),g.B.emitChange({companyUuid:f.companyUuid,projectUuid:f.projectUuid,entityType:"task",entityUuid:c,action:"updated"}),{taskUuid:h.taskUuid,dependsOnUuid:h.dependsOnUuid,createdAt:h.createdAt}}async function L(a,b,c){let d=await e.z.task.findFirst({where:{uuid:b,companyUuid:a}});if(!d)throw Error("Task not found");let f=await e.z.task.findFirst({where:{uuid:c,companyUuid:a}});await e.z.taskDependency.deleteMany({where:{taskUuid:b,dependsOnUuid:c}}),g.B.emitChange({companyUuid:d.companyUuid,projectUuid:d.projectUuid,entityType:"task",entityUuid:b,action:"updated"}),f&&g.B.emitChange({companyUuid:f.companyUuid,projectUuid:f.projectUuid,entityType:"task",entityUuid:c,action:"updated"})}async function M(a,b){let c=await e.z.task.findFirst({where:{uuid:b,companyUuid:a},include:S});if(!c)throw Error("Task not found");return{dependsOn:c.dependsOn.map(a=>({uuid:a.dependsOn.uuid,title:a.dependsOn.title,status:a.dependsOn.status})),dependedBy:c.dependedBy.map(a=>({uuid:a.task.uuid,title:a.task.title,status:a.task.status}))}}async function N({companyUuid:a,projectUuid:b,proposalUuids:c}){let d={projectUuid:b,companyUuid:a,status:{in:["open","assigned"]},...c&&c.length>0&&{proposalUuid:{in:c}},NOT:{dependsOn:{some:{dependsOn:{status:{notIn:["done","closed"]}}}}}},[f,g]=await Promise.all([e.z.task.findMany({where:d,orderBy:[{priority:"desc"},{createdAt:"desc"}],select:{uuid:!0,title:!0,description:!0,status:!0,priority:!0,storyPoints:!0,acceptanceCriteria:!0,assigneeType:!0,assigneeUuid:!0,assignedAt:!0,assignedByUuid:!0,proposalUuid:!0,createdByUuid:!0,createdAt:!0,updatedAt:!0,...S}}),e.z.task.count({where:d})]),h=await (0,i.uA)(a,"task",f.map(a=>a.uuid));return{tasks:await t(f,h),total:g}}async function O(a){let b=await e.z.taskDependency.findMany({where:{taskUuid:a},select:{dependsOn:{select:{uuid:!0,title:!0,status:!0,assigneeType:!0,assigneeUuid:!0}}}});if(0===b.length)return{resolved:!0,blockers:[]};let c=b.filter(a=>"done"!==a.dependsOn.status&&"closed"!==a.dependsOn.status);if(0===c.length)return{resolved:!0,blockers:[]};let d=c.map(a=>a.dependsOn.uuid),[g,h]=await Promise.all([e.z.sessionTaskCheckin.findMany({where:{taskUuid:{in:d},checkoutAt:null},select:{taskUuid:!0,sessionUuid:!0,session:{select:{name:!0}}}}),(0,f.Uo)(c.filter(a=>a.dependsOn.assigneeType&&a.dependsOn.assigneeUuid).map(a=>({type:a.dependsOn.assigneeType,uuid:a.dependsOn.assigneeUuid})))]),i=new Map;for(let a of g)i.set(a.taskUuid,{sessionUuid:a.sessionUuid,sessionName:a.session.name});let j=c.map(a=>{let b=a.dependsOn,c=null;if(b.assigneeType&&b.assigneeUuid){let a=h.get(b.assigneeUuid);a&&(c={type:b.assigneeType,uuid:b.assigneeUuid,name:a})}return{uuid:b.uuid,title:b.title,status:b.status,assignee:c,sessionCheckin:i.get(b.uuid)??null}});return{resolved:!1,blockers:j}}async function P(a,b){let[c,d]=await Promise.all([e.z.task.findMany({where:{companyUuid:a,projectUuid:b},select:{uuid:!0,title:!0,status:!0,priority:!0,proposalUuid:!0}}),e.z.taskDependency.findMany({where:{task:{companyUuid:a,projectUuid:b}},select:{taskUuid:!0,dependsOnUuid:!0}})]);return{nodes:c.map(a=>({uuid:a.uuid,title:a.title,status:a.status,priority:a.priority,proposalUuid:a.proposalUuid??null})),edges:d.map(a=>({from:a.taskUuid,to:a.dependsOnUuid}))}}d()}catch(a){d(a)}})},88437:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{createActivity:()=>k,listActivities:()=>i,listActivitiesWithActorNames:()=>j});var e=c(52618),f=c(42558),g=c(76872),h=a([e,g]);async function i({companyUuid:a,projectUuid:b,skip:c,take:d,targetType:f,targetUuid:g}){let h={projectUuid:b,companyUuid:a,...f&&{targetType:f},...g&&{targetUuid:g}},[i,j]=await Promise.all([e.z.activity.findMany({where:h,skip:c,take:d,orderBy:{createdAt:"desc"},select:{uuid:!0,targetType:!0,targetUuid:!0,actorType:!0,actorUuid:!0,action:!0,value:!0,sessionUuid:!0,sessionName:!0,createdAt:!0}}),e.z.activity.count({where:h})]);return{activities:i,total:j}}async function j(a){let{activities:b,total:c}=await i(a);return{activities:await Promise.all(b.map(async a=>{let b=await (0,g.lR)(a.actorType,a.actorUuid);return{uuid:a.uuid,targetType:a.targetType,targetUuid:a.targetUuid,action:a.action,actorType:a.actorType,actorName:b||"Unknown",value:a.value,sessionUuid:a.sessionUuid,sessionName:a.sessionName,createdAt:a.createdAt.toISOString()}})),total:c}}async function k({companyUuid:a,projectUuid:b,targetType:c,targetUuid:d,actorType:g,actorUuid:h,action:i,value:j,sessionUuid:k,sessionName:l}){let m=await e.z.activity.create({data:{companyUuid:a,projectUuid:b,targetType:c,targetUuid:d,actorType:g,actorUuid:h,action:i,value:j||void 0,sessionUuid:k||void 0,sessionName:l||void 0}});return f.B.emit("activity",{companyUuid:a,projectUuid:b,targetType:c,targetUuid:d,actorType:g,actorUuid:h,action:i,value:j,sessionUuid:k,sessionName:l,uuid:m.uuid}),m}[e,g]=h.then?(await h)():h,d()}catch(a){d(a)}})},90494:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{AM:()=>m,Xs:()=>l,_L:()=>r});var e=c(52618),f=c(76872),g=c(37943),h=c(25736),i=c(97515),j=c(93419),k=a([e,f,g,i,j]);[e,f,g,i,j]=k.then?(await k)():k;let t=/@\[([^\]]+)\]\((user|agent):([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})(?:\?([^)]*))?\)/gi;function l(a){let b,c=[],d=new Set;for(t.lastIndex=0;null!==(b=t.exec(a))&&!(c.length>=10);){let a=b[1],e=b[2].toLowerCase(),f=b[3].toLowerCase(),{pinnedHost:g,pinnedCwd:i}=(0,h.vE)(b[4]),j=`${e}:${f}`;if(!d.has(j)){d.add(j);let b={type:e,uuid:f,displayName:a};(null!==g||null!==i)&&(b.pinnedHost=g,b.pinnedCwd=i),c.push(b)}}return c}async function m(a){let{companyUuid:b,sourceType:c,sourceUuid:d,content:h,actorType:i,actorUuid:j,projectUuid:k,entityTitle:m}=a,n=l(h);if(0===n.length)return;let o=n.filter(a=>a.type!==i||a.uuid!==j);if(0===o.length)return;let p=[];for(let a of o)await s(b,a.type,a.uuid)&&p.push(a);if(0===p.length)return;await e.z.mention.createMany({data:p.map(a=>({companyUuid:b,sourceType:c,sourceUuid:d,mentionedType:a.type,mentionedUuid:a.uuid,actorType:i,actorUuid:j}))});let q=await (0,f.lR)(i,j)??"Someone",r=await e.z.project.findUnique({where:{uuid:k},select:{name:!0}}),u=r?.name??"Unknown Project",v=function(a){let b=a.replace(t,"@$1");return b.length<=120?b:b.substring(0,117)+"..."}(h),w=c,x=d;if("comment"===c){let a=await e.z.comment.findUnique({where:{uuid:d},select:{targetType:!0,targetUuid:!0}});a&&(w=a.targetType,x=a.targetUuid)}let y=[];for(let a of p){if(!(await g.lX(b,a.type,a.uuid)).mentioned)continue;let c=`${q} mentioned you: "${v}"`;y.push({companyUuid:b,projectUuid:k,recipientType:a.type,recipientUuid:a.uuid,entityType:w,entityUuid:x,entityTitle:m,projectName:u,action:"mentioned",message:c,actorType:i,actorUuid:j,actorName:q,pinnedHost:a.pinnedHost,pinnedCwd:a.pinnedCwd})}y.length>0&&await g.Xm(y)}function n(a){return"agent"===a.type?+!a.online:2}function o(a,b){let c=n(a),d=n(b);if(c!==d)return c-d;if(0===c){let c=a.activeCount??0,d=b.activeCount??0;return c!==d?c-d:a.name.localeCompare(b.name)}return 0}async function p(a,b){let c=b.filter(a=>"agent"===a.type).map(a=>a.uuid);if(0===c.length)return;let d=Date.now(),f=await e.z.daemonConnection.findMany({where:{companyUuid:a,agentUuid:{in:c}},select:{agentUuid:!0,status:!0,lastSeenAt:!0}}),g=new Set;for(let a of f){let b=d-a.lastSeenAt.getTime()<=i.BP;"online"===a.status&&b&&g.add(a.agentUuid)}let h=await e.z.daemonExecution.groupBy({by:["agentUuid"],where:{companyUuid:a,agentUuid:{in:c},status:{in:[...j.PF]}},_count:{_all:!0}}),k=new Map;for(let a of h)k.set(a.agentUuid,a._count._all);for(let a of b){if("agent"!==a.type)continue;let b=g.has(a.uuid);a.online=b,a.activeCount=b?k.get(a.uuid)??0:0}}async function q(a,b){let c=b.filter(a=>"agent"===a.type);if(0===c.length)return;let d=await Promise.all(c.map(async b=>{let c=(await (0,i._R)(a,b.uuid)).map(a=>({connectionUuid:a.uuid,host:a.host,cwd:a.cwd,effectiveStatus:a.effectiveStatus}));return{uuid:b.uuid,instances:c}})),e=new Map;for(let{uuid:a,instances:b}of d)e.set(a,b);for(let a of b)"agent"===a.type&&(a.instances=e.get(a.uuid)??[])}async function r(a){let b,{companyUuid:c,query:d,actorType:f,actorUuid:g,ownerUuid:h,limit:i=10,withInstances:j=!1}=a,k=Math.min(i,50),l=[];if("user"===f?b=g:"agent"===f&&h&&(b=h),!d){if(b)for(let a of(await e.z.agent.findMany({where:{companyUuid:c,ownerUuid:b},select:{uuid:!0,name:!0,roles:!0},orderBy:{createdAt:"desc"},take:k})))l.push({type:"agent",uuid:a.uuid,name:a.name,roles:a.roles});await p(c,l),l.sort(o);let a=l.slice(0,Math.min(5,k));return j&&await q(c,a),a}for(let a of(await e.z.user.findMany({where:{companyUuid:c,OR:[{name:{contains:d,mode:"insensitive"}},{email:{contains:d,mode:"insensitive"}}]},select:{uuid:!0,name:!0,email:!0,avatarUrl:!0},take:k})))l.push({type:"user",uuid:a.uuid,name:a.name??a.email??"Unknown",email:a.email,avatarUrl:a.avatarUrl});let m={companyUuid:c,name:{contains:d,mode:"insensitive"}};for(let a of(b&&(m.ownerUuid=b),await e.z.agent.findMany({where:m,select:{uuid:!0,name:!0,roles:!0},take:k})))l.push({type:"agent",uuid:a.uuid,name:a.name,roles:a.roles});await p(c,l),l.sort(o);let n=l.slice(0,k);return j&&await q(c,n),n}async function s(a,b,c){return"user"===b?!!await e.z.user.findFirst({where:{uuid:c,companyUuid:a},select:{uuid:!0}}):!!await e.z.agent.findFirst({where:{uuid:c,companyUuid:a},select:{uuid:!0}})}d()}catch(a){d(a)}})}};