@chorus-aidlc/chorus 0.16.2 → 0.16.4

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 (348) hide show
  1. package/.next/standalone/.next/BUILD_ID +1 -1
  2. package/.next/standalone/.next/app-build-manifest.json +444 -433
  3. package/.next/standalone/.next/app-path-routes-manifest.json +42 -42
  4. package/.next/standalone/.next/build-manifest.json +5 -5
  5. package/.next/standalone/.next/prerender-manifest.json +36 -36
  6. package/.next/standalone/.next/server/app/(dashboard)/project-groups/[uuid]/page.js +1 -1
  7. package/.next/standalone/.next/server/app/(dashboard)/project-groups/[uuid]/page.js.nft.json +1 -1
  8. package/.next/standalone/.next/server/app/(dashboard)/project-groups/[uuid]/page_client-reference-manifest.js +1 -1
  9. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/activity/page.js +1 -1
  10. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/activity/page.js.nft.json +1 -1
  11. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/activity/page_client-reference-manifest.js +1 -1
  12. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/dashboard/[ideaUuid]/page.js +1 -1
  13. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/dashboard/[ideaUuid]/page.js.nft.json +1 -1
  14. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/dashboard/[ideaUuid]/page_client-reference-manifest.js +1 -1
  15. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/dashboard/page.js +2 -2
  16. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/dashboard/page.js.nft.json +1 -1
  17. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/dashboard/page_client-reference-manifest.js +1 -1
  18. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/documents/[documentUuid]/page.js +1 -1
  19. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/documents/[documentUuid]/page.js.nft.json +1 -1
  20. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/documents/[documentUuid]/page_client-reference-manifest.js +1 -1
  21. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/documents/page.js +1 -1
  22. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/documents/page.js.nft.json +1 -1
  23. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/documents/page_client-reference-manifest.js +1 -1
  24. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/graph/page.js +1 -1
  25. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/graph/page.js.nft.json +1 -1
  26. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/graph/page_client-reference-manifest.js +1 -1
  27. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/proposals/[proposalUuid]/page.js +2 -2
  28. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/proposals/[proposalUuid]/page.js.nft.json +1 -1
  29. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/proposals/[proposalUuid]/page_client-reference-manifest.js +1 -1
  30. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/proposals/new/page.js +1 -1
  31. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/proposals/new/page.js.nft.json +1 -1
  32. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/proposals/new/page_client-reference-manifest.js +1 -1
  33. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/proposals/page.js +2 -2
  34. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/proposals/page.js.nft.json +1 -1
  35. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/proposals/page_client-reference-manifest.js +1 -1
  36. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/tasks/[taskUuid]/page.js +1 -1
  37. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/tasks/[taskUuid]/page.js.nft.json +1 -1
  38. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/tasks/[taskUuid]/page_client-reference-manifest.js +1 -1
  39. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/tasks/page.js +1 -1
  40. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/tasks/page.js.nft.json +1 -1
  41. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/tasks/page_client-reference-manifest.js +1 -1
  42. package/.next/standalone/.next/server/app/(dashboard)/projects/page.js +1 -1
  43. package/.next/standalone/.next/server/app/(dashboard)/projects/page.js.nft.json +1 -1
  44. package/.next/standalone/.next/server/app/(dashboard)/projects/page_client-reference-manifest.js +1 -1
  45. package/.next/standalone/.next/server/app/(dashboard)/settings/page.js +2 -2
  46. package/.next/standalone/.next/server/app/(dashboard)/settings/page.js.nft.json +1 -1
  47. package/.next/standalone/.next/server/app/(dashboard)/settings/page_client-reference-manifest.js +1 -1
  48. package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  49. package/.next/standalone/.next/server/app/_not-found.html +2 -2
  50. package/.next/standalone/.next/server/app/_not-found.rsc +2 -2
  51. package/.next/standalone/.next/server/app/admin/companies/[uuid]/page_client-reference-manifest.js +1 -1
  52. package/.next/standalone/.next/server/app/admin/companies/new/page_client-reference-manifest.js +1 -1
  53. package/.next/standalone/.next/server/app/admin/companies/new.html +2 -2
  54. package/.next/standalone/.next/server/app/admin/companies/new.rsc +2 -2
  55. package/.next/standalone/.next/server/app/admin/companies/page_client-reference-manifest.js +1 -1
  56. package/.next/standalone/.next/server/app/admin/companies.html +2 -2
  57. package/.next/standalone/.next/server/app/admin/companies.rsc +2 -2
  58. package/.next/standalone/.next/server/app/admin/page_client-reference-manifest.js +1 -1
  59. package/.next/standalone/.next/server/app/admin.html +2 -2
  60. package/.next/standalone/.next/server/app/admin.rsc +2 -2
  61. package/.next/standalone/.next/server/app/api/admin/companies/[uuid]/route_client-reference-manifest.js +1 -1
  62. package/.next/standalone/.next/server/app/api/admin/companies/route_client-reference-manifest.js +1 -1
  63. package/.next/standalone/.next/server/app/api/admin/login/route_client-reference-manifest.js +1 -1
  64. package/.next/standalone/.next/server/app/api/admin/session/route_client-reference-manifest.js +1 -1
  65. package/.next/standalone/.next/server/app/api/agent-connections/route_client-reference-manifest.js +1 -1
  66. package/.next/standalone/.next/server/app/api/agents/[uuid]/route_client-reference-manifest.js +1 -1
  67. package/.next/standalone/.next/server/app/api/agents/[uuid]/sessions/route_client-reference-manifest.js +1 -1
  68. package/.next/standalone/.next/server/app/api/agents/route_client-reference-manifest.js +1 -1
  69. package/.next/standalone/.next/server/app/api/api-keys/[uuid]/route_client-reference-manifest.js +1 -1
  70. package/.next/standalone/.next/server/app/api/api-keys/route_client-reference-manifest.js +1 -1
  71. package/.next/standalone/.next/server/app/api/auth/callback/route_client-reference-manifest.js +1 -1
  72. package/.next/standalone/.next/server/app/api/auth/check-default/route_client-reference-manifest.js +1 -1
  73. package/.next/standalone/.next/server/app/api/auth/company-oidc/route_client-reference-manifest.js +1 -1
  74. package/.next/standalone/.next/server/app/api/auth/default-login/route_client-reference-manifest.js +1 -1
  75. package/.next/standalone/.next/server/app/api/auth/identify/route_client-reference-manifest.js +1 -1
  76. package/.next/standalone/.next/server/app/api/auth/logout/route_client-reference-manifest.js +1 -1
  77. package/.next/standalone/.next/server/app/api/auth/me/route_client-reference-manifest.js +1 -1
  78. package/.next/standalone/.next/server/app/api/auth/sync-token/route_client-reference-manifest.js +1 -1
  79. package/.next/standalone/.next/server/app/api/comments/route_client-reference-manifest.js +1 -1
  80. package/.next/standalone/.next/server/app/api/daemon/connection-heartbeat/route_client-reference-manifest.js +1 -1
  81. package/.next/standalone/.next/server/app/api/daemon/control/route_client-reference-manifest.js +1 -1
  82. package/.next/standalone/.next/server/app/api/daemon/directory-request/report/route_client-reference-manifest.js +1 -1
  83. package/.next/standalone/.next/server/app/api/daemon/execution-state/route_client-reference-manifest.js +1 -1
  84. package/.next/standalone/.next/server/app/api/daemon/executions/route_client-reference-manifest.js +1 -1
  85. package/.next/standalone/.next/server/app/api/daemon/pending-turns/route_client-reference-manifest.js +1 -1
  86. package/.next/standalone/.next/server/app/api/daemon/report-interrupt/route_client-reference-manifest.js +1 -1
  87. package/.next/standalone/.next/server/app/api/daemon/resume/route_client-reference-manifest.js +1 -1
  88. package/.next/standalone/.next/server/app/api/daemon/transcript/route_client-reference-manifest.js +1 -1
  89. package/.next/standalone/.next/server/app/api/daemon/turn-advance/route.js +1 -1
  90. package/.next/standalone/.next/server/app/api/daemon/turn-advance/route_client-reference-manifest.js +1 -1
  91. package/.next/standalone/.next/server/app/api/daemon-directory-requests/[uuid]/route_client-reference-manifest.js +1 -1
  92. package/.next/standalone/.next/server/app/api/daemon-directory-requests/route_client-reference-manifest.js +1 -1
  93. package/.next/standalone/.next/server/app/api/daemon-sessions/[sessionUuid]/instruction/route_client-reference-manifest.js +1 -1
  94. package/.next/standalone/.next/server/app/api/daemon-sessions/[sessionUuid]/repoint/route_client-reference-manifest.js +1 -1
  95. package/.next/standalone/.next/server/app/api/daemon-sessions/[sessionUuid]/route_client-reference-manifest.js +1 -1
  96. package/.next/standalone/.next/server/app/api/daemon-sessions/ad-hoc/route_client-reference-manifest.js +1 -1
  97. package/.next/standalone/.next/server/app/api/daemon-sessions/route_client-reference-manifest.js +1 -1
  98. package/.next/standalone/.next/server/app/api/documents/[uuid]/route_client-reference-manifest.js +1 -1
  99. package/.next/standalone/.next/server/app/api/entities/[type]/[uuid]/root-idea/route_client-reference-manifest.js +1 -1
  100. package/.next/standalone/.next/server/app/api/events/notifications/route_client-reference-manifest.js +1 -1
  101. package/.next/standalone/.next/server/app/api/events/route_client-reference-manifest.js +1 -1
  102. package/.next/standalone/.next/server/app/api/health/route_client-reference-manifest.js +1 -1
  103. package/.next/standalone/.next/server/app/api/ideas/[uuid]/claim/route_client-reference-manifest.js +1 -1
  104. package/.next/standalone/.next/server/app/api/ideas/[uuid]/move/preview/route_client-reference-manifest.js +1 -1
  105. package/.next/standalone/.next/server/app/api/ideas/[uuid]/move/route_client-reference-manifest.js +1 -1
  106. package/.next/standalone/.next/server/app/api/ideas/[uuid]/parent/route_client-reference-manifest.js +1 -1
  107. package/.next/standalone/.next/server/app/api/ideas/[uuid]/release/route_client-reference-manifest.js +1 -1
  108. package/.next/standalone/.next/server/app/api/ideas/[uuid]/route_client-reference-manifest.js +1 -1
  109. package/.next/standalone/.next/server/app/api/ideas/[uuid]/wake-preview/route_client-reference-manifest.js +1 -1
  110. package/.next/standalone/.next/server/app/api/ideas/conversational/route_client-reference-manifest.js +1 -1
  111. package/.next/standalone/.next/server/app/api/mcp/route.js +4 -4
  112. package/.next/standalone/.next/server/app/api/mcp/route_client-reference-manifest.js +1 -1
  113. package/.next/standalone/.next/server/app/api/me/assignments/route_client-reference-manifest.js +1 -1
  114. package/.next/standalone/.next/server/app/api/mentionables/route_client-reference-manifest.js +1 -1
  115. package/.next/standalone/.next/server/app/api/notifications/[uuid]/archive/route_client-reference-manifest.js +1 -1
  116. package/.next/standalone/.next/server/app/api/notifications/[uuid]/read/route_client-reference-manifest.js +1 -1
  117. package/.next/standalone/.next/server/app/api/notifications/preferences/route_client-reference-manifest.js +1 -1
  118. package/.next/standalone/.next/server/app/api/notifications/read-all/route_client-reference-manifest.js +1 -1
  119. package/.next/standalone/.next/server/app/api/notifications/route_client-reference-manifest.js +1 -1
  120. package/.next/standalone/.next/server/app/api/notifications/unread-count/route_client-reference-manifest.js +1 -1
  121. package/.next/standalone/.next/server/app/api/project-groups/[uuid]/dashboard/route_client-reference-manifest.js +1 -1
  122. package/.next/standalone/.next/server/app/api/project-groups/[uuid]/route_client-reference-manifest.js +1 -1
  123. package/.next/standalone/.next/server/app/api/project-groups/route_client-reference-manifest.js +1 -1
  124. package/.next/standalone/.next/server/app/api/project-visits/pin/route_client-reference-manifest.js +1 -1
  125. package/.next/standalone/.next/server/app/api/project-visits/route_client-reference-manifest.js +1 -1
  126. package/.next/standalone/.next/server/app/api/project-visits/visit/route_client-reference-manifest.js +1 -1
  127. package/.next/standalone/.next/server/app/api/projects/[uuid]/activity/route_client-reference-manifest.js +1 -1
  128. package/.next/standalone/.next/server/app/api/projects/[uuid]/agent-cwds/route_client-reference-manifest.js +1 -1
  129. package/.next/standalone/.next/server/app/api/projects/[uuid]/available/route_client-reference-manifest.js +1 -1
  130. package/.next/standalone/.next/server/app/api/projects/[uuid]/documents/route_client-reference-manifest.js +1 -1
  131. package/.next/standalone/.next/server/app/api/projects/[uuid]/group/route_client-reference-manifest.js +1 -1
  132. package/.next/standalone/.next/server/app/api/projects/[uuid]/ideas/route_client-reference-manifest.js +1 -1
  133. package/.next/standalone/.next/server/app/api/projects/[uuid]/ideas/tracker/route_client-reference-manifest.js +1 -1
  134. package/.next/standalone/.next/server/app/api/projects/[uuid]/proposals/[proposalUuid]/validate/route_client-reference-manifest.js +1 -1
  135. package/.next/standalone/.next/server/app/api/projects/[uuid]/proposals/route_client-reference-manifest.js +1 -1
  136. package/.next/standalone/.next/server/app/api/projects/[uuid]/proposals/summary/route_client-reference-manifest.js +1 -1
  137. package/.next/standalone/.next/server/app/api/projects/[uuid]/resource-graph/route_client-reference-manifest.js +1 -1
  138. package/.next/standalone/.next/server/app/api/projects/[uuid]/route_client-reference-manifest.js +1 -1
  139. package/.next/standalone/.next/server/app/api/projects/[uuid]/stats/route_client-reference-manifest.js +1 -1
  140. package/.next/standalone/.next/server/app/api/projects/[uuid]/tasks/dependencies/route_client-reference-manifest.js +1 -1
  141. package/.next/standalone/.next/server/app/api/projects/[uuid]/tasks/route_client-reference-manifest.js +1 -1
  142. package/.next/standalone/.next/server/app/api/projects/agent-cwd-options/route_client-reference-manifest.js +1 -1
  143. package/.next/standalone/.next/server/app/api/projects/route_client-reference-manifest.js +1 -1
  144. package/.next/standalone/.next/server/app/api/proposals/[uuid]/approve/route_client-reference-manifest.js +1 -1
  145. package/.next/standalone/.next/server/app/api/proposals/[uuid]/close/route_client-reference-manifest.js +1 -1
  146. package/.next/standalone/.next/server/app/api/proposals/[uuid]/reject/route_client-reference-manifest.js +1 -1
  147. package/.next/standalone/.next/server/app/api/proposals/[uuid]/revoke/route_client-reference-manifest.js +1 -1
  148. package/.next/standalone/.next/server/app/api/proposals/[uuid]/route_client-reference-manifest.js +1 -1
  149. package/.next/standalone/.next/server/app/api/references/[uuid]/route_client-reference-manifest.js +1 -1
  150. package/.next/standalone/.next/server/app/api/references/route_client-reference-manifest.js +1 -1
  151. package/.next/standalone/.next/server/app/api/search/route_client-reference-manifest.js +1 -1
  152. package/.next/standalone/.next/server/app/api/session/route_client-reference-manifest.js +1 -1
  153. package/.next/standalone/.next/server/app/api/sessions/[uuid]/route_client-reference-manifest.js +1 -1
  154. package/.next/standalone/.next/server/app/api/tasks/[uuid]/claim/route_client-reference-manifest.js +1 -1
  155. package/.next/standalone/.next/server/app/api/tasks/[uuid]/dependencies/[dependsOnUuid]/route_client-reference-manifest.js +1 -1
  156. package/.next/standalone/.next/server/app/api/tasks/[uuid]/dependencies/route_client-reference-manifest.js +1 -1
  157. package/.next/standalone/.next/server/app/api/tasks/[uuid]/release/route_client-reference-manifest.js +1 -1
  158. package/.next/standalone/.next/server/app/api/tasks/[uuid]/route_client-reference-manifest.js +1 -1
  159. package/.next/standalone/.next/server/app/api/tasks/[uuid]/sessions/route_client-reference-manifest.js +1 -1
  160. package/.next/standalone/.next/server/app/index.html +2 -2
  161. package/.next/standalone/.next/server/app/index.rsc +2 -2
  162. package/.next/standalone/.next/server/app/login/admin/page_client-reference-manifest.js +1 -1
  163. package/.next/standalone/.next/server/app/login/admin.html +2 -2
  164. package/.next/standalone/.next/server/app/login/admin.rsc +2 -2
  165. package/.next/standalone/.next/server/app/login/callback/page_client-reference-manifest.js +1 -1
  166. package/.next/standalone/.next/server/app/login/callback.html +2 -2
  167. package/.next/standalone/.next/server/app/login/callback.rsc +2 -2
  168. package/.next/standalone/.next/server/app/login/page_client-reference-manifest.js +1 -1
  169. package/.next/standalone/.next/server/app/login/pick-workspace/page_client-reference-manifest.js +1 -1
  170. package/.next/standalone/.next/server/app/login/pick-workspace.html +2 -2
  171. package/.next/standalone/.next/server/app/login/pick-workspace.rsc +2 -2
  172. package/.next/standalone/.next/server/app/login.html +2 -2
  173. package/.next/standalone/.next/server/app/login.rsc +2 -2
  174. package/.next/standalone/.next/server/app/onboarding/page.js +2 -2
  175. package/.next/standalone/.next/server/app/onboarding/page.js.nft.json +1 -1
  176. package/.next/standalone/.next/server/app/onboarding/page_client-reference-manifest.js +1 -1
  177. package/.next/standalone/.next/server/app/onboarding.html +2 -2
  178. package/.next/standalone/.next/server/app/onboarding.rsc +3 -3
  179. package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
  180. package/.next/standalone/.next/server/app/projects.html +2 -2
  181. package/.next/standalone/.next/server/app/projects.rsc +4 -4
  182. package/.next/standalone/.next/server/app/settings.html +2 -2
  183. package/.next/standalone/.next/server/app/settings.rsc +4 -4
  184. package/.next/standalone/.next/server/app-paths-manifest.json +42 -42
  185. package/.next/standalone/.next/server/chunks/1318.js +1 -1
  186. package/.next/standalone/.next/server/chunks/1559.js +2 -2
  187. package/.next/standalone/.next/server/chunks/2572.js +1 -1
  188. package/.next/standalone/.next/server/chunks/2618.js +1 -1
  189. package/.next/standalone/.next/server/chunks/2961.js +1 -1
  190. package/.next/standalone/.next/server/chunks/3594.js +1 -1
  191. package/.next/standalone/.next/server/chunks/4394.js +1 -1
  192. package/.next/standalone/.next/server/chunks/4827.js +1 -1
  193. package/.next/standalone/.next/server/chunks/5205.js +1 -1
  194. package/.next/standalone/.next/server/chunks/5245.js +1 -1
  195. package/.next/standalone/.next/server/chunks/5351.js +4 -3
  196. package/.next/standalone/.next/server/chunks/{4011.js → 5489.js} +4 -4
  197. package/.next/standalone/.next/server/chunks/6113.js +1 -1
  198. package/.next/standalone/.next/server/chunks/6506.js +2 -2
  199. package/.next/standalone/.next/server/chunks/6667.js +1 -1
  200. package/.next/standalone/.next/server/chunks/6995.js +1 -1
  201. package/.next/standalone/.next/server/chunks/7368.js +1 -1
  202. package/.next/standalone/.next/server/chunks/7530.js +1 -1
  203. package/.next/standalone/.next/server/chunks/8044.js +1 -0
  204. package/.next/standalone/.next/server/chunks/920.js +1 -1
  205. package/.next/standalone/.next/server/chunks/9213.js +1 -1
  206. package/.next/standalone/.next/server/chunks/9378.js +1 -1
  207. package/.next/standalone/.next/server/chunks/951.js +1 -1
  208. package/.next/standalone/.next/server/middleware-build-manifest.js +1 -1
  209. package/.next/standalone/.next/server/middleware-manifest.json +1 -1
  210. package/.next/standalone/.next/server/pages/404.html +2 -2
  211. package/.next/standalone/.next/server/pages/500.html +1 -1
  212. package/.next/standalone/.next/server/server-reference-manifest.js +1 -1
  213. package/.next/standalone/.next/server/server-reference-manifest.json +1 -1
  214. package/.next/standalone/.next/static/chunks/11595.a6268c75ca8a2163.js +1 -0
  215. package/.next/standalone/.next/static/chunks/17099-936da9caf4c119b8.js +1 -0
  216. package/.next/standalone/.next/static/chunks/18609-6c859f756d530e94.js +1 -0
  217. package/.next/standalone/.next/static/chunks/19887-b805e1dcee8c367b.js +1 -0
  218. package/.next/standalone/.next/static/chunks/20204-90d655ea14281e10.js +1 -0
  219. package/.next/standalone/.next/static/chunks/{53402-a54163001f3d953a.js → 27370-c056dee2016c9124.js} +1 -1
  220. package/.next/standalone/.next/static/chunks/{29108-b9b232255811ffa8.js → 29108-5a11eea003f4cc11.js} +1 -1
  221. package/.next/standalone/.next/static/chunks/29305-f587e7e81bc0b200.js +10 -0
  222. package/.next/standalone/.next/static/chunks/33456.16ff7edf00137539.js +1 -0
  223. package/.next/standalone/.next/static/chunks/35432-5c245212c7595169.js +1 -0
  224. package/.next/standalone/.next/static/chunks/45024-eb7c062d13d9fe08.js +1 -0
  225. package/.next/standalone/.next/static/chunks/46294-6ae5bd0480b1820f.js +1 -0
  226. package/.next/standalone/.next/static/chunks/4860.9e06848eb531e667.js +1 -0
  227. package/.next/standalone/.next/static/chunks/53073-a7ed20af6538a178.js +1 -0
  228. package/.next/standalone/.next/static/chunks/65096-f756aac39efad7a3.js +1 -0
  229. package/.next/standalone/.next/static/chunks/6603-e70ddeab6ad09c50.js +1 -0
  230. package/.next/standalone/.next/static/chunks/67580-8733964ab2c7fc0e.js +1 -0
  231. package/.next/standalone/.next/static/chunks/7777-8b1b6681256e1534.js +1 -0
  232. package/.next/standalone/.next/static/chunks/78917-1b59cbb806b3ecfc.js +1 -0
  233. package/.next/standalone/.next/static/chunks/82751-3e161e1d8dbda3ac.js +1 -0
  234. package/.next/standalone/.next/static/chunks/94643-ffa140f765c73daf.js +1 -0
  235. package/.next/standalone/.next/static/chunks/99373.81b79c91858f9099.js +1 -0
  236. package/.next/standalone/.next/static/chunks/app/(dashboard)/{layout-cea0bb3e3a295bea.js → layout-b742c51c0a764daf.js} +1 -1
  237. package/.next/standalone/.next/static/chunks/app/(dashboard)/project-groups/[uuid]/page-974781e4886529f8.js +1 -0
  238. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/dashboard/{page-007278623926490f.js → page-f636e00c28f425ea.js} +1 -1
  239. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/documents/[documentUuid]/page-c004f1a194af7fa5.js +1 -0
  240. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/documents/page-425acbe9ade5fa83.js +1 -0
  241. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/graph/{page-f5a351c544ed23d7.js → page-fdd617457730a116.js} +1 -1
  242. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/proposals/[proposalUuid]/page-b9eb4e0692996657.js +1 -0
  243. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/proposals/page-0a6c2d0e1b68e0e4.js +1 -0
  244. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/tasks/[taskUuid]/page-58b48aa0a11603c3.js +1 -0
  245. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/tasks/page-286faced32c6133f.js +1 -0
  246. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/{page-7a5ef281f6819ed4.js → page-9d79e285b6fd2f8d.js} +1 -1
  247. package/.next/standalone/.next/static/chunks/app/(dashboard)/settings/page-1507a761e67c2aa9.js +1 -0
  248. package/.next/standalone/.next/static/chunks/app/onboarding/page-5c82cf3abd856301.js +1 -0
  249. package/.next/standalone/.next/static/chunks/f5a9da1f-6abf712b3f684cf9.js +1 -0
  250. package/.next/standalone/.next/static/chunks/{webpack-b54e0c78eded76be.js → webpack-4d1cc14b13e247b6.js} +1 -1
  251. package/.next/standalone/.next/static/css/5f52bd39b284ccdf.css +1 -0
  252. package/.next/standalone/package.json +3 -1
  253. package/.next/standalone/public/chorus-plugin/.claude-plugin/plugin.json +1 -1
  254. package/.next/standalone/public/chorus-plugin/skills/brainstorm/SKILL.md +1 -1
  255. package/.next/standalone/public/chorus-plugin/skills/chorus/SKILL.md +2 -1
  256. package/.next/standalone/public/chorus-plugin/skills/develop/SKILL.md +1 -1
  257. package/.next/standalone/public/chorus-plugin/skills/docs/SKILL.md +1 -1
  258. package/.next/standalone/public/chorus-plugin/skills/idea/SKILL.md +5 -4
  259. package/.next/standalone/public/chorus-plugin/skills/openspec-aware/SKILL.md +1 -1
  260. package/.next/standalone/public/chorus-plugin/skills/orchestrate/SKILL.md +128 -0
  261. package/.next/standalone/public/chorus-plugin/skills/proposal/SKILL.md +1 -1
  262. package/.next/standalone/public/chorus-plugin/skills/quick-dev/SKILL.md +1 -1
  263. package/.next/standalone/public/chorus-plugin/skills/review/SKILL.md +1 -1
  264. package/.next/standalone/public/chorus-plugin/skills/yolo/SKILL.md +1 -1
  265. package/.next/standalone/public/dsh-credentials.sh +137 -0
  266. package/.next/standalone/public/kiro-plugin/.kiro/skills/chorus-brainstorm/SKILL.md +1 -1
  267. package/.next/standalone/public/kiro-plugin/.kiro/skills/chorus-develop/SKILL.md +1 -1
  268. package/.next/standalone/public/kiro-plugin/.kiro/skills/chorus-docs/SKILL.md +1 -1
  269. package/.next/standalone/public/kiro-plugin/.kiro/skills/chorus-idea/SKILL.md +5 -4
  270. package/.next/standalone/public/kiro-plugin/.kiro/skills/chorus-openspec-aware/SKILL.md +1 -1
  271. package/.next/standalone/public/kiro-plugin/.kiro/skills/chorus-orchestrate/SKILL.md +128 -0
  272. package/.next/standalone/public/kiro-plugin/.kiro/skills/chorus-proposal/SKILL.md +1 -1
  273. package/.next/standalone/public/kiro-plugin/.kiro/skills/chorus-quick-dev/SKILL.md +1 -1
  274. package/.next/standalone/public/kiro-plugin/.kiro/skills/chorus-review/SKILL.md +1 -1
  275. package/.next/standalone/public/kiro-plugin/.kiro/skills/chorus-yolo/SKILL.md +1 -1
  276. package/.next/standalone/public/kiro-plugin/.kiro/steering/chorus.md +2 -1
  277. package/.next/standalone/public/kiro-plugin/bin/chorus-api.sh +1 -1
  278. package/.next/standalone/public/skill/brainstorm-chorus/SKILL.md +1 -1
  279. package/.next/standalone/public/skill/chorus/SKILL.md +2 -1
  280. package/.next/standalone/public/skill/code-reviewer-chorus/SKILL.md +1 -1
  281. package/.next/standalone/public/skill/develop-chorus/SKILL.md +1 -1
  282. package/.next/standalone/public/skill/docs-chorus/SKILL.md +1 -1
  283. package/.next/standalone/public/skill/idea-chorus/SKILL.md +5 -4
  284. package/.next/standalone/public/skill/orchestrate-chorus/SKILL.md +128 -0
  285. package/.next/standalone/public/skill/proposal-chorus/SKILL.md +1 -1
  286. package/.next/standalone/public/skill/proposal-reviewer-chorus/SKILL.md +1 -1
  287. package/.next/standalone/public/skill/quick-dev-chorus/SKILL.md +1 -1
  288. package/.next/standalone/public/skill/review-chorus/SKILL.md +1 -1
  289. package/.next/standalone/public/skill/task-reviewer-chorus/SKILL.md +1 -1
  290. package/.next/standalone/public/skill/yolo-chorus/SKILL.md +1 -1
  291. package/.next/standalone/public/test-dsh-credentials.sh +55 -0
  292. package/README.ja.md +3 -1
  293. package/README.ko.md +3 -1
  294. package/README.md +3 -1
  295. package/README.zh.md +3 -1
  296. package/cli/agent-backend-prompt.mjs +93 -0
  297. package/cli/client-args.mjs +11 -5
  298. package/cli/daemon-agent.mjs +6 -5
  299. package/cli/daemon-banner.mjs +3 -3
  300. package/cli/daemon-config.mjs +1 -1
  301. package/cli/daemon-install-config.mjs +21 -14
  302. package/cli/daemon-rest-client.mjs +31 -8
  303. package/cli/daemon.mjs +47 -6
  304. package/cli/dsh-managed-config.mjs +407 -0
  305. package/cli/dsh-spawner.mjs +438 -0
  306. package/cli/login.mjs +26 -4
  307. package/cli/prompts.mjs +13 -3
  308. package/cli/spawner-select.mjs +10 -1
  309. package/cli/turn-reporter.mjs +5 -2
  310. package/cli/upload-hooks.mjs +31 -1
  311. package/cli/waker.mjs +49 -6
  312. package/package.json +3 -1
  313. package/prisma/migrations/20260818024700_add_turn_backend_session_id/migration.sql +1 -0
  314. package/prisma/schema.prisma +3 -0
  315. package/.next/standalone/.next/server/chunks/2463.js +0 -1
  316. package/.next/standalone/.next/static/chunks/11595.b6f8ad33572b32fe.js +0 -1
  317. package/.next/standalone/.next/static/chunks/19887-9f459ee9e8d0855f.js +0 -1
  318. package/.next/standalone/.next/static/chunks/22987-8fd965ab4ff87546.js +0 -1
  319. package/.next/standalone/.next/static/chunks/33456.e8550ad410031e29.js +0 -1
  320. package/.next/standalone/.next/static/chunks/35432-ee83da56c49ef6f8.js +0 -1
  321. package/.next/standalone/.next/static/chunks/38296-316ba18af72385fb.js +0 -1
  322. package/.next/standalone/.next/static/chunks/4860.b405fc235b36271b.js +0 -1
  323. package/.next/standalone/.next/static/chunks/53073-5fd399cb25a11740.js +0 -1
  324. package/.next/standalone/.next/static/chunks/6603-07faab08560f7ecd.js +0 -1
  325. package/.next/standalone/.next/static/chunks/6698-1c55791b2d0820d5.js +0 -1
  326. package/.next/standalone/.next/static/chunks/66980-652990fcf3212c94.js +0 -10
  327. package/.next/standalone/.next/static/chunks/75137-c9e8422c9d4e1f52.js +0 -1
  328. package/.next/standalone/.next/static/chunks/7777-5dad34f6bdc13482.js +0 -1
  329. package/.next/standalone/.next/static/chunks/78917-7354d3b6908da7d1.js +0 -1
  330. package/.next/standalone/.next/static/chunks/82751-de255af4418d53e4.js +0 -1
  331. package/.next/standalone/.next/static/chunks/83285-db8ae107944eb6df.js +0 -1
  332. package/.next/standalone/.next/static/chunks/86155-c9b7c2c08d3fa80e.js +0 -1
  333. package/.next/standalone/.next/static/chunks/89836-b5ab6a0b32c54f42.js +0 -1
  334. package/.next/standalone/.next/static/chunks/94643-6d31df78aa3074b5.js +0 -1
  335. package/.next/standalone/.next/static/chunks/96170-75da13decdb6f73f.js +0 -1
  336. package/.next/standalone/.next/static/chunks/99373.9dce8f30802824fc.js +0 -1
  337. package/.next/standalone/.next/static/chunks/app/(dashboard)/project-groups/[uuid]/page-7462c5eb92130796.js +0 -1
  338. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/documents/[documentUuid]/page-b6ecaf52f6b81ec7.js +0 -1
  339. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/documents/page-82404154708e48a9.js +0 -1
  340. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/proposals/[proposalUuid]/page-3cd46bec9383b191.js +0 -1
  341. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/proposals/page-6abc7d1785e2b999.js +0 -1
  342. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/tasks/[taskUuid]/page-7f87113e5d8bcf6e.js +0 -1
  343. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/tasks/page-30ab1573c4bd466f.js +0 -1
  344. package/.next/standalone/.next/static/chunks/app/(dashboard)/settings/page-b21d4184d9ca0b25.js +0 -1
  345. package/.next/standalone/.next/static/chunks/app/onboarding/page-3b6c54f887108635.js +0 -1
  346. package/.next/standalone/.next/static/css/893d99a21153c9b0.css +0 -1
  347. /package/.next/standalone/.next/static/{YTZwWTfE0BsJnjCDYCEHi → 6sHDgeKioa0SJR1MAbcYG}/_buildManifest.js +0 -0
  348. /package/.next/standalone/.next/static/{YTZwWTfE0BsJnjCDYCEHi → 6sHDgeKioa0SJR1MAbcYG}/_ssgManifest.js +0 -0
@@ -0,0 +1,438 @@
1
+ // External DeepSeek Harness SDK runtime bridge. One fresh JSON-RPC runtime and
2
+ // session are created per wake; no dsh session state is persisted by Chorus.
3
+
4
+ import { spawn } from "node:child_process";
5
+ import { randomUUID } from "node:crypto";
6
+ import { statSync } from "node:fs";
7
+ import { win32 as pathWin32, posix as pathPosix } from "node:path";
8
+ import { prepareManagedDshConfig } from "./dsh-managed-config.mjs";
9
+
10
+ const NOOP_LOGGER = { info() {}, warn() {}, error() {} };
11
+ export const DEFAULT_DSH_TIMEOUT_MS = 30 * 60 * 1000;
12
+ export const DEFAULT_DSH_SHUTDOWN_TIMEOUT_MS = 5_000;
13
+
14
+ function nonEmpty(value) {
15
+ return typeof value === "string" && value.trim() ? value.trim() : null;
16
+ }
17
+
18
+ function positiveInt(value, fallback) {
19
+ const parsed = Number(value);
20
+ return Number.isSafeInteger(parsed) && parsed > 0 ? parsed : fallback;
21
+ }
22
+
23
+ function isFile(path) {
24
+ try {
25
+ return statSync(path).isFile();
26
+ } catch {
27
+ return false;
28
+ }
29
+ }
30
+
31
+ /** Resolve the external SDK runtime. CHORUS_DSH_PATH overrides PATH. */
32
+ export function resolveDshPath(deps = {}) {
33
+ const env = deps.env ?? process.env;
34
+ const platform = deps.platform ?? process.platform;
35
+ const fileProbe = deps.isFile ?? isFile;
36
+ const override = nonEmpty(env.CHORUS_DSH_PATH);
37
+ if (override && fileProbe(override)) return override;
38
+
39
+ const windows = platform === "win32";
40
+ const path = windows ? pathWin32 : pathPosix;
41
+ const names = windows
42
+ ? ["dsh-jsonrpc-agent.cmd", "dsh-jsonrpc-agent.exe", "dsh-jsonrpc-agent"]
43
+ : ["dsh-jsonrpc-agent"];
44
+ const dirs = (env.PATH || env.Path || "").split(path.delimiter).filter(Boolean);
45
+ for (const dir of dirs) {
46
+ for (const name of names) {
47
+ const candidate = path.join(dir, name);
48
+ if (fileProbe(candidate)) return candidate;
49
+ }
50
+ }
51
+ return null;
52
+ }
53
+
54
+ /** Resolve the required Cordis composition without placing it in argv. */
55
+ export function resolveDshConfig(env = process.env) {
56
+ return nonEmpty(env.CHORUS_DSH_CONFIG) ?? nonEmpty(env.DSH_CORDIS_CONFIG);
57
+ }
58
+
59
+ /** Windows npm command shims need cmd.exe while retaining argv isolation. */
60
+ export function resolveDshSpawnCommand(dshPath, platform = process.platform, env = process.env) {
61
+ const lower = dshPath.toLowerCase();
62
+ if (platform === "win32" && (lower.endsWith(".cmd") || lower.endsWith(".bat"))) {
63
+ return {
64
+ command: env.ComSpec || env.COMSPEC || "cmd.exe",
65
+ argv: ["/d", "/s", "/c", dshPath],
66
+ };
67
+ }
68
+ return { command: dshPath, argv: [] };
69
+ }
70
+
71
+ function tokenCount(value) {
72
+ return Number.isSafeInteger(value) && value >= 0 ? value : null;
73
+ }
74
+
75
+ /** Add one upstream TokenUsage object into the per-wake disjoint totals. */
76
+ export function addDshUsage(total, usage) {
77
+ if (!usage || typeof usage !== "object") return total;
78
+ for (const [source, target] of [
79
+ ["inputTokens", "inputTokens"],
80
+ ["outputTokens", "outputTokens"],
81
+ ["cacheWriteTokens", "cacheCreationTokens"],
82
+ ["cacheReadTokens", "cacheReadTokens"],
83
+ ]) {
84
+ const count = tokenCount(usage[source]);
85
+ if (count === null) continue;
86
+ total[target] = (total[target] ?? 0) + count;
87
+ }
88
+ return total;
89
+ }
90
+
91
+ function hasVisibleAssistantContent(data) {
92
+ const content = data?.message?.content;
93
+ return Array.isArray(content) && content.length > 0;
94
+ }
95
+
96
+ function containsReceipt(event, messageId) {
97
+ if (event?.type !== "agent/inbox/spliced" || !Array.isArray(event?.data?.inserted)) return false;
98
+ return event.data.inserted.some((message) => message && message.id === messageId);
99
+ }
100
+
101
+ function deferred() {
102
+ let resolve;
103
+ let reject;
104
+ const promise = new Promise((res, rej) => {
105
+ resolve = res;
106
+ reject = rej;
107
+ });
108
+ return { promise, resolve, reject };
109
+ }
110
+
111
+ function errorText(error) {
112
+ return error instanceof Error ? error.message : String(error);
113
+ }
114
+
115
+ function withTimeout(promise, timeoutMs, message) {
116
+ let timer;
117
+ return Promise.race([
118
+ promise,
119
+ new Promise((_, reject) => {
120
+ timer = setTimeout(() => reject(new Error(message)), timeoutMs);
121
+ timer.unref?.();
122
+ }),
123
+ ]).finally(() => clearTimeout(timer));
124
+ }
125
+
126
+ export class DshSpawner {
127
+ constructor(opts = {}) {
128
+ this.sessionDecision = { probeIsAuthoritative: false };
129
+ this.dshPath = opts.dshPath ?? null;
130
+ this.spawnImpl = opts.spawnImpl ?? spawn;
131
+ this.resolveDshPathFn = opts.resolveDshPathFn ?? resolveDshPath;
132
+ this.uuidFn = opts.uuidFn ?? randomUUID;
133
+ this.logger = opts.logger ?? NOOP_LOGGER;
134
+ this.creds = opts.creds ?? null;
135
+ this.platform = opts.platform ?? process.platform;
136
+ this.env = opts.env ?? process.env;
137
+ this.bundleVersion = opts.bundleVersion ?? null;
138
+ this.prepareManagedConfigFn = opts.prepareManagedConfigFn ?? prepareManagedDshConfig;
139
+ this.timeoutMs = opts.timeoutMs ?? positiveInt(this.env.CHORUS_DSH_TIMEOUT_MS, DEFAULT_DSH_TIMEOUT_MS);
140
+ this.shutdownTimeoutMs =
141
+ opts.shutdownTimeoutMs ??
142
+ positiveInt(this.env.CHORUS_DSH_SHUTDOWN_TIMEOUT_MS, DEFAULT_DSH_SHUTDOWN_TIMEOUT_MS);
143
+ }
144
+
145
+ async wake({ prompt, sessionId: anchor, cwd, onMessage, onChild }) {
146
+ let dshPath = this.dshPath ?? this.resolveDshPathFn({ env: this.env, platform: this.platform });
147
+ let config = resolveDshConfig(this.env);
148
+ const result = (backendSessionId, exitCode) => ({
149
+ sessionId: backendSessionId || anchor || "",
150
+ backendSessionId: backendSessionId || null,
151
+ exitCode,
152
+ isNew: true,
153
+ });
154
+
155
+ if (!dshPath) {
156
+ this.logger.error(
157
+ "[Chorus] cannot locate `dsh-jsonrpc-agent`; install it or set CHORUS_DSH_PATH",
158
+ );
159
+ return result(null, null);
160
+ }
161
+ if (!config) {
162
+ try {
163
+ const managed = await this.prepareManagedConfigFn({
164
+ env: this.env,
165
+ bundleVersion: this.bundleVersion,
166
+ dshPath,
167
+ creds: this.creds,
168
+ });
169
+ config = managed.configPath;
170
+ dshPath = managed.runtimePath ?? dshPath;
171
+ } catch (error) {
172
+ this.logger.error(`[Chorus] cannot prepare managed dsh config: ${errorText(error)}`);
173
+ return result(null, null);
174
+ }
175
+ }
176
+
177
+ const dshSessionId = `chorus-${this.uuidFn().replaceAll("-", "")}`;
178
+ const provider =
179
+ nonEmpty(this.env.CHORUS_DSH_PROVIDER) ?? nonEmpty(this.env.DSH_PROVIDER) ?? "deepseek-official";
180
+ const model =
181
+ nonEmpty(this.env.CHORUS_DSH_MODEL) ?? nonEmpty(this.env.DSH_MODEL) ?? "deepseek-v4-flash";
182
+ const childEnv = {
183
+ ...this.env,
184
+ CHORUS_DAEMON_HEADLESS: "1",
185
+ DSH_CORDIS_CONFIG: config,
186
+ DSH_CWD: cwd || process.cwd(),
187
+ };
188
+ if (this.creds?.url) childEnv.CHORUS_URL = this.creds.url;
189
+ if (this.creds?.apiKey) childEnv.CHORUS_API_KEY = this.creds.apiKey;
190
+
191
+ const { command, argv } = resolveDshSpawnCommand(dshPath, this.platform, childEnv);
192
+ let child;
193
+ try {
194
+ child = this.spawnImpl(command, argv, {
195
+ cwd: cwd || undefined,
196
+ env: childEnv,
197
+ stdio: ["pipe", "pipe", "pipe"],
198
+ shell: false,
199
+ detached: this.platform !== "win32",
200
+ windowsHide: true,
201
+ });
202
+ } catch (error) {
203
+ this.logger.error(`[Chorus] failed to start dsh runtime: ${errorText(error)}`);
204
+ return result(dshSessionId, null);
205
+ }
206
+
207
+ try {
208
+ onChild?.(child);
209
+ } catch (error) {
210
+ this.logger.warn(`[Chorus] onChild handler threw: ${errorText(error)}`);
211
+ }
212
+
213
+ child.stdout?.setEncoding?.("utf8");
214
+ child.stderr?.setEncoding?.("utf8");
215
+ child.stdin?.on?.("error", () => {});
216
+
217
+ const closed = deferred();
218
+ const failed = deferred();
219
+ // A rejected failure promise is raced below; attaching this handler prevents
220
+ // a process-exit rejection from becoming unhandled during successful setup.
221
+ failed.promise.catch(() => {});
222
+ let exitCode;
223
+ let closeSeen = false;
224
+ let protocolDone = false;
225
+ let stdoutBuffer = "";
226
+ let stderrBuffer = "";
227
+ let serial = 0;
228
+ const pending = new Map();
229
+ const notifications = [];
230
+ let notificationCursor = 0;
231
+ let messageId = null;
232
+ let receiptSeen = false;
233
+ const idle = deferred();
234
+ idle.promise.catch(() => {});
235
+ const usage = {
236
+ inputTokens: null,
237
+ outputTokens: null,
238
+ cacheCreationTokens: null,
239
+ cacheReadTokens: null,
240
+ };
241
+
242
+ const fail = (message) => {
243
+ if (protocolDone) return;
244
+ protocolDone = true;
245
+ const error = message instanceof Error ? message : new Error(String(message));
246
+ for (const waiter of pending.values()) waiter.reject(error);
247
+ pending.clear();
248
+ idle.reject(error);
249
+ failed.reject(error);
250
+ };
251
+
252
+ const emit = (frame) => {
253
+ try {
254
+ onMessage?.(frame);
255
+ } catch (error) {
256
+ this.logger.warn(`[Chorus] onMessage handler threw: ${errorText(error)}`);
257
+ }
258
+ };
259
+
260
+ const processNotifications = () => {
261
+ if (!messageId || protocolDone) return;
262
+ while (notificationCursor < notifications.length) {
263
+ const notification = notifications[notificationCursor++];
264
+ const params = notification.params;
265
+ if (params?.sessionId !== dshSessionId) continue;
266
+ if (!receiptSeen) {
267
+ if (notification.method === "session.event" && containsReceipt(params.event, messageId)) {
268
+ receiptSeen = true;
269
+ }
270
+ continue;
271
+ }
272
+ if (notification.method === "session.event") {
273
+ const event = params.event;
274
+ if (!event || typeof event !== "object" || typeof event.type !== "string") {
275
+ fail("dsh session.event carried a malformed event envelope");
276
+ return;
277
+ }
278
+ if (event.type === "assistant/message") addDshUsage(usage, event.data?.usage);
279
+ if (event.type === "user/message" || (event.type === "assistant/message" && hasVisibleAssistantContent(event.data))) {
280
+ emit({ type: event.type, session_id: dshSessionId, data: event.data });
281
+ }
282
+ } else if (notification.method === "session.status" && params.status === "idle") {
283
+ idle.resolve();
284
+ return;
285
+ }
286
+ }
287
+ };
288
+
289
+ const handleFrame = (frame) => {
290
+ if (!frame || typeof frame !== "object" || frame.jsonrpc !== "2.0") {
291
+ fail("dsh runtime emitted a malformed JSON-RPC frame");
292
+ return;
293
+ }
294
+ if ((typeof frame.id === "string" || typeof frame.id === "number") && !frame.method) {
295
+ const waiter = pending.get(frame.id);
296
+ if (!waiter) return;
297
+ pending.delete(frame.id);
298
+ if (frame.error && typeof frame.error === "object") {
299
+ waiter.reject(
300
+ new Error(
301
+ `dsh JSON-RPC error ${frame.error.code ?? ""}: ${frame.error.message ?? "unknown error"}`,
302
+ ),
303
+ );
304
+ } else {
305
+ waiter.resolve(frame.result);
306
+ }
307
+ return;
308
+ }
309
+ if (typeof frame.method === "string" && frame.id === undefined) {
310
+ notifications.push({
311
+ method: frame.method,
312
+ params: frame.params && typeof frame.params === "object" && !Array.isArray(frame.params)
313
+ ? frame.params
314
+ : {},
315
+ });
316
+ processNotifications();
317
+ }
318
+ };
319
+
320
+ child.stdout?.on?.("data", (chunk) => {
321
+ stdoutBuffer += String(chunk);
322
+ for (;;) {
323
+ const newline = stdoutBuffer.indexOf("\n");
324
+ if (newline < 0) break;
325
+ const line = stdoutBuffer.slice(0, newline).trim();
326
+ stdoutBuffer = stdoutBuffer.slice(newline + 1);
327
+ if (!line) continue;
328
+ try {
329
+ handleFrame(JSON.parse(line));
330
+ } catch {
331
+ fail("dsh runtime emitted malformed JSON on stdout");
332
+ }
333
+ }
334
+ });
335
+ child.stderr?.on?.("data", (chunk) => {
336
+ stderrBuffer += String(chunk);
337
+ for (;;) {
338
+ const newline = stderrBuffer.indexOf("\n");
339
+ if (newline < 0) break;
340
+ const line = stderrBuffer.slice(0, newline).trim();
341
+ stderrBuffer = stderrBuffer.slice(newline + 1);
342
+ if (line) this.logger.warn(`[dsh] ${line}`);
343
+ }
344
+ });
345
+ child.on?.("error", (error) => fail(`dsh runtime process error: ${errorText(error)}`));
346
+ child.on?.("close", (code) => {
347
+ closeSeen = true;
348
+ exitCode = code;
349
+ if (stderrBuffer.trim()) this.logger.warn(`[dsh] ${stderrBuffer.trim()}`);
350
+ if (!protocolDone) fail(`dsh runtime exited before protocol completion (code ${code})`);
351
+ closed.resolve(code);
352
+ });
353
+
354
+ const request = (method, params = {}) => {
355
+ const id = `chorus_${++serial}`;
356
+ return new Promise((resolve, reject) => {
357
+ pending.set(id, { resolve, reject });
358
+ try {
359
+ child.stdin.write(`${JSON.stringify({ jsonrpc: "2.0", id, method, params })}\n`);
360
+ } catch (error) {
361
+ pending.delete(id);
362
+ reject(error);
363
+ }
364
+ });
365
+ };
366
+
367
+ const stopRuntime = async () => {
368
+ if (closeSeen) return;
369
+ try {
370
+ child.stdin?.end?.();
371
+ } catch {}
372
+ try {
373
+ await withTimeout(closed.promise, this.shutdownTimeoutMs, "dsh runtime did not exit after stdin closed");
374
+ } catch {
375
+ try {
376
+ child.kill?.("SIGTERM");
377
+ } catch {}
378
+ }
379
+ };
380
+
381
+ try {
382
+ const initialize = await withTimeout(
383
+ Promise.race([
384
+ request("initialize", { cwd: cwd || process.cwd(), provider, model }),
385
+ failed.promise,
386
+ ]),
387
+ this.shutdownTimeoutMs,
388
+ "dsh initialize timed out",
389
+ );
390
+ if (initialize?.serverInfo?.name !== "deepseek-harness-sdk-runtime") {
391
+ throw new Error("dsh initialize returned an unexpected server identity");
392
+ }
393
+
394
+ const promptResult = await withTimeout(
395
+ Promise.race([
396
+ request("session/prompt", {
397
+ sessionId: dshSessionId,
398
+ contentBlocks: [{ type: "text", text: String(prompt ?? "") }],
399
+ }),
400
+ failed.promise,
401
+ ]),
402
+ this.shutdownTimeoutMs,
403
+ "dsh session/prompt timed out",
404
+ );
405
+ if (!nonEmpty(promptResult?.messageId)) {
406
+ throw new Error("dsh session/prompt returned no messageId");
407
+ }
408
+ messageId = promptResult.messageId;
409
+ processNotifications();
410
+
411
+ await withTimeout(
412
+ Promise.race([idle.promise, failed.promise]),
413
+ this.timeoutMs,
414
+ `dsh turn timed out after ${this.timeoutMs}ms waiting for root idle`,
415
+ );
416
+ emit({
417
+ type: "dsh.turn.completed",
418
+ session_id: dshSessionId,
419
+ usage: { ...usage, model, source: "dsh" },
420
+ });
421
+
422
+ await withTimeout(
423
+ Promise.race([request("shutdown"), failed.promise]),
424
+ this.shutdownTimeoutMs,
425
+ "dsh shutdown timed out",
426
+ );
427
+ protocolDone = true;
428
+ child.stdin?.end?.();
429
+ await withTimeout(closed.promise, this.shutdownTimeoutMs, "dsh runtime did not exit after shutdown");
430
+ return result(dshSessionId, exitCode);
431
+ } catch (error) {
432
+ this.logger.error(`[Chorus] dsh wake failed: ${errorText(error)}`);
433
+ protocolDone = true;
434
+ await stopRuntime();
435
+ return result(dshSessionId, typeof exitCode === "number" && exitCode !== 0 ? exitCode : null);
436
+ }
437
+ }
438
+ }
package/cli/login.mjs CHANGED
@@ -9,6 +9,7 @@ import { createInterface } from "node:readline";
9
9
 
10
10
  import { loginFilePath } from "./credentials.mjs";
11
11
  import { validateAndFetchIdentity } from "./chorus-client.mjs";
12
+ import { promptAgentBackend } from "./agent-backend-prompt.mjs";
12
13
 
13
14
  /**
14
15
  * Prompt for a line of input. When `mask` is true, typed characters are not
@@ -219,12 +220,21 @@ export function appendAgentConfig(agentObj, deps = {}) {
219
220
  * single flat credential — so one daemon can serve several agents. On an invalid
220
221
  * key, or a duplicate, nothing is written.
221
222
  *
223
+ * The agent backend (agent type) is captured too: an explicit `--agent` wins,
224
+ * otherwise an interactive menu is offered on a TTY (skipped on a non-TTY so a
225
+ * scripted login never blocks). No choice → nothing is written for the backend
226
+ * (the `--add` entry omits `agentType`; the single-agent config omits the
227
+ * top-level `agent`), so it inherits the daemon default — never a literal
228
+ * `claude-code`. See {@link promptAgentBackend}.
229
+ *
222
230
  * @param {{ url?: string, apiKey?: string, agent?: string, add?: boolean }} flags
223
231
  * @param {{
224
232
  * validate?: typeof validateAndFetchIdentity,
225
233
  * write?: typeof writeLoginFile,
226
234
  * appendAgent?: typeof appendAgentConfig,
227
235
  * prompt?: typeof prompt,
236
+ * promptBackend?: typeof promptAgentBackend,
237
+ * isTTY?: boolean,
228
238
  * log?: (m: string) => void,
229
239
  * errLog?: (m: string) => void,
230
240
  * }} [deps]
@@ -235,6 +245,8 @@ export async function runLogin(flags = {}, deps = {}) {
235
245
  const write = deps.write ?? writeLoginFile;
236
246
  const appendAgent = deps.appendAgent ?? appendAgentConfig;
237
247
  const ask = deps.prompt ?? prompt;
248
+ const promptBackend = deps.promptBackend ?? promptAgentBackend;
249
+ const isTTY = deps.isTTY ?? Boolean(process.stdin.isTTY);
238
250
  const log = deps.log ?? ((m) => process.stdout.write(m + "\n"));
239
251
  const errLog = deps.errLog ?? ((m) => process.stderr.write(m + "\n"));
240
252
 
@@ -259,10 +271,16 @@ export async function runLogin(flags = {}, deps = {}) {
259
271
  return 1;
260
272
  }
261
273
 
274
+ // Which agent backend should this agent use? Explicit --agent wins; otherwise
275
+ // offer the interactive menu on a TTY. `undefined` = no explicit choice → we
276
+ // write NO backend key so it inherits the daemon default (never claude-code).
277
+ let agentType = nonEmpty(flags.agent);
278
+ if (!agentType) agentType = await promptBackend({ ask, log, isTTY });
279
+
262
280
  // --add: append as an additional agent (multi-agent) instead of overwriting.
263
281
  if (flags.add) {
264
282
  const agentObj = { url, apiKey, agentUuid: identity.uuid, agentName: identity.name };
265
- if (nonEmpty(flags.agent)) agentObj.agentType = nonEmpty(flags.agent);
283
+ if (agentType) agentObj.agentType = agentType;
266
284
  const res = appendAgent(agentObj);
267
285
  if (!res.ok) {
268
286
  errLog(
@@ -270,13 +288,17 @@ export async function runLogin(flags = {}, deps = {}) {
270
288
  );
271
289
  return 1;
272
290
  }
273
- log(`Added agent ${identity.name} (${identity.uuid}) as agents[${res.index}] in ${res.path}.`);
291
+ const backendNote = agentType ? ` — backend: ${agentType}` : "";
292
+ log(`Added agent ${identity.name} (${identity.uuid}) as agents[${res.index}] in ${res.path}${backendNote}.`);
274
293
  log(`This daemon now serves ${res.agents.length} agent(s).`);
275
294
  return 0;
276
295
  }
277
296
 
278
- const path = write({ url, apiKey, agentUuid: identity.uuid, agentName: identity.name });
279
- log(`Logged in as ${identity.name} (${identity.uuid}).`);
297
+ const loginData = { url, apiKey, agentUuid: identity.uuid, agentName: identity.name };
298
+ if (agentType) loginData.agent = agentType;
299
+ const path = write(loginData);
300
+ const backendNote = agentType ? ` — backend: ${agentType}` : "";
301
+ log(`Logged in as ${identity.name} (${identity.uuid})${backendNote}.`);
280
302
  log(`Credentials saved to ${path}.`);
281
303
  return 0;
282
304
  }
package/cli/prompts.mjs CHANGED
@@ -320,10 +320,20 @@ function buildPromptBody(n) {
320
320
  );
321
321
  }
322
322
  case "idea_claimed":
323
+ // The assignment ALREADY set you as the assignee, so there is nothing to claim —
324
+ // chorus_claim_idea would throw (AlreadyClaimedError, and a hard "Cannot claim an
325
+ // elaborated Idea" for the elaborated-backfill case). Do NOT emit a claim
326
+ // instruction here (a prompt test asserts the literal never appears). Instead tell
327
+ // the already-assigned agent to review and advance from the idea's CURRENT stage,
328
+ // stopping at the human proposal/verify gates. Names the assigner via n.actorName /
329
+ // n.actorType (already on the notification — no server change). Mirrored in the
330
+ // OpenClaw twin handleIdeaClaimed (event-router.ts) — KEEP THE TWO WORDINGS IN SYNC.
323
331
  return (
324
- `[Chorus] Idea '${n.entityTitle}' was assigned to you (ideaUuid: ${n.entityUuid}, ` +
325
- `projectUuid: ${n.projectUuid}). Use chorus_get_idea to review it, then claim it ` +
326
- `(chorus_claim_idea) to begin elaboration.\n${mentionGuidance(n, "idea")}`
332
+ `[Chorus] Idea '${n.entityTitle}' was assigned to you by ${n.actorName} (${n.actorType}) ` +
333
+ `(ideaUuid: ${n.entityUuid}, projectUuid: ${n.projectUuid}). You are now the assignee no need ` +
334
+ `to claim it. Use chorus_get_idea to review it, then advance it from its CURRENT stage: if it is ` +
335
+ `still elaborating, run or continue elaboration; if it is already elaborated, author the proposal. ` +
336
+ `Stop at the human proposal/verify gates and never merge automatically.\n${mentionGuidance(n, "idea")}`
327
337
  );
328
338
  case "task_reopened":
329
339
  return (
@@ -11,11 +11,12 @@
11
11
 
12
12
  import { ClaudeSpawner } from "./claude-spawner.mjs";
13
13
  import { CodexSpawner } from "./codex-spawner.mjs";
14
+ import { DshSpawner } from "./dsh-spawner.mjs";
14
15
  import { KiroSpawner } from "./kiro-spawner.mjs";
15
16
 
16
17
  /**
17
18
  * Construct the spawner backend for `agentType`.
18
- * @param {string} agentType "claude-code" | "codex" | "kiro" (already validated upstream).
19
+ * @param {string} agentType "claude-code" | "codex" | "kiro" | "dsh" (already validated upstream).
19
20
  * @param {{ logger?: any, permissionMode?: "chorus"|"yolo", creds?: { url: string, apiKey: string } }} [opts]
20
21
  * @returns {import("./codex-spawner.mjs").Spawner}
21
22
  */
@@ -27,5 +28,13 @@ export function selectSpawner(agentType, opts = {}) {
27
28
  if (agentType === "kiro") {
28
29
  return new KiroSpawner({ logger, permissionMode, creds });
29
30
  }
31
+ if (agentType === "dsh") {
32
+ return new DshSpawner({
33
+ logger,
34
+ creds,
35
+ bundleVersion: opts.bundleVersion,
36
+ prepareManagedConfigFn: opts.prepareManagedConfigFn,
37
+ });
38
+ }
30
39
  return new ClaudeSpawner({ logger, permissionMode, creds });
31
40
  }
@@ -52,7 +52,7 @@ export const TURN_INTERRUPT_REASONS = new Set([
52
52
  * logger?: { info(m:string):void, warn(m:string):void, error(m:string):void },
53
53
  * fetchImpl?: typeof fetch, Injectable for tests.
54
54
  * }} opts
55
- * @returns {(params: { sessionId: string, status: "running"|"ended"|"interrupted", entityType?: string|null, entityUuid?: string|null, interruptedReason?: "user"|"crash"|"shutdown"|"invalid_path"|null, transcriptRelayError?: string|null, usage?: import("./upload-hooks.mjs").TokenUsage|null, coalescedCount?: number }) => Promise<void>}
55
+ * @returns {(params: { sessionId: string, turnUuid?: string|null, status: "running"|"ended"|"interrupted", entityType?: string|null, entityUuid?: string|null, interruptedReason?: "user"|"crash"|"shutdown"|"invalid_path"|null, transcriptRelayError?: string|null, usage?: import("./upload-hooks.mjs").TokenUsage|null, coalescedCount?: number }) => Promise<import("./daemon-rest-client.mjs").DaemonRestResult|undefined>}
56
56
  */
57
57
  export function createTurnReporter(opts) {
58
58
  const logger = opts.logger ?? NOOP_LOGGER;
@@ -69,6 +69,7 @@ export function createTurnReporter(opts) {
69
69
 
70
70
  return async function advanceTurn({
71
71
  sessionId,
72
+ turnUuid,
72
73
  status,
73
74
  entityType,
74
75
  entityUuid,
@@ -101,8 +102,9 @@ export function createTurnReporter(opts) {
101
102
  // entityType/entityUuid only when both are present, and transcriptRelayError only when
102
103
  // truthy (fix #444 follow-up) — and logs the failure cause on a network error / non-2xx.
103
104
  // We swallow the structured result so a failed report can never crash the wake path.
104
- await client.turnAdvance({
105
+ const result = await client.turnAdvance({
105
106
  sessionId,
107
+ turnUuid,
106
108
  status,
107
109
  entityType,
108
110
  entityUuid,
@@ -116,5 +118,6 @@ export function createTurnReporter(opts) {
116
118
  // client sends it only on the → running edge and only when > 1 (a single wake omits it).
117
119
  coalescedCount,
118
120
  });
121
+ return result;
119
122
  };
120
123
  }
@@ -235,6 +235,7 @@ export const CLAUDE_CODE_USAGE_SOURCE = "claude_code";
235
235
  * daemon's Codex client type (`"codex"`, per cli/daemon-agent.mjs `backendClientType`)
236
236
  * so persisted usage is attributable to the right backend / connection. */
237
237
  export const CODEX_USAGE_SOURCE = "codex";
238
+ export const DSH_USAGE_SOURCE = "dsh";
238
239
 
239
240
  /**
240
241
  * Coerce a value to a non-negative integer token count, or null. Guards against a
@@ -363,6 +364,21 @@ export function extractCodexTurnUsage(obj) {
363
364
  };
364
365
  }
365
366
 
367
+ /** Extract the normalized terminal usage frame emitted by DshSpawner. */
368
+ export function extractDshTurnUsage(obj) {
369
+ if (!obj || typeof obj !== "object" || obj.type !== "dsh.turn.completed") return null;
370
+ const usage = obj.usage;
371
+ if (!usage || typeof usage !== "object") return null;
372
+ return {
373
+ inputTokens: toTokenInt(usage.inputTokens),
374
+ outputTokens: toTokenInt(usage.outputTokens),
375
+ cacheCreationTokens: toTokenInt(usage.cacheCreationTokens),
376
+ cacheReadTokens: toTokenInt(usage.cacheReadTokens),
377
+ model: typeof usage.model === "string" && usage.model.trim() ? usage.model : null,
378
+ source: DSH_USAGE_SOURCE,
379
+ };
380
+ }
381
+
366
382
  /**
367
383
  * Remove `<system-reminder>…</system-reminder>` spans from a retained text block
368
384
  * (defense-in-depth for harness-injected reminders that ride inside a kept text
@@ -399,6 +415,17 @@ function stripSystemReminders(s) {
399
415
  export function extractTranscriptText(obj) {
400
416
  if (!obj || typeof obj !== "object") return null;
401
417
 
418
+ // ── DeepSeek Harness committed session-event dialect ──
419
+ if (obj.type === "user/message" || obj.type === "assistant/message") {
420
+ const data = obj.data;
421
+ const message = data && typeof data === "object" ? data.message : null;
422
+ if (!message || typeof message !== "object") return null;
423
+ return extractTranscriptText({
424
+ type: obj.type === "user/message" ? "user" : "assistant",
425
+ message,
426
+ });
427
+ }
428
+
402
429
  // ── codex `codex exec --json` dialect ──
403
430
  // Only `item.completed` carries finished output; an `agent_message` item is the
404
431
  // assistant's conversation text. Everything else (reasoning, command_execution,
@@ -659,7 +686,10 @@ export function createTranscriptUploadHooks(opts) {
659
686
  // no-op on the vast majority of lines and never touches the transcript path. Guarded
660
687
  // so a malformed frame can never break transcript relay (no-silent: warn).
661
688
  try {
662
- const usage = extractTurnUsage(message) ?? extractCodexTurnUsage(message);
689
+ const usage =
690
+ extractTurnUsage(message) ??
691
+ extractCodexTurnUsage(message) ??
692
+ extractDshTurnUsage(message);
663
693
  if (usage) lastUsage = usage;
664
694
  } catch (err) {
665
695
  logger.warn(`[Chorus] token usage extract failed: ${err}`);