@chorus-aidlc/chorus 0.17.2 → 0.18.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (446) hide show
  1. package/.next/standalone/.next/BUILD_ID +1 -1
  2. package/.next/standalone/.next/app-build-manifest.json +357 -355
  3. package/.next/standalone/.next/app-path-routes-manifest.json +44 -44
  4. package/.next/standalone/.next/build-manifest.json +5 -5
  5. package/.next/standalone/.next/prerender-manifest.json +18 -18
  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 +2 -2
  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 +2 -2
  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 +2 -2
  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 +2 -2
  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.js.nft.json +1 -1
  66. package/.next/standalone/.next/server/app/api/agent-connections/route_client-reference-manifest.js +1 -1
  67. package/.next/standalone/.next/server/app/api/agents/[uuid]/route_client-reference-manifest.js +1 -1
  68. package/.next/standalone/.next/server/app/api/agents/[uuid]/sessions/route.js +1 -1
  69. package/.next/standalone/.next/server/app/api/agents/[uuid]/sessions/route.js.nft.json +1 -1
  70. package/.next/standalone/.next/server/app/api/agents/[uuid]/sessions/route_client-reference-manifest.js +1 -1
  71. package/.next/standalone/.next/server/app/api/agents/route_client-reference-manifest.js +1 -1
  72. package/.next/standalone/.next/server/app/api/api-keys/[uuid]/route_client-reference-manifest.js +1 -1
  73. package/.next/standalone/.next/server/app/api/api-keys/route_client-reference-manifest.js +1 -1
  74. package/.next/standalone/.next/server/app/api/auth/callback/route_client-reference-manifest.js +1 -1
  75. package/.next/standalone/.next/server/app/api/auth/check-default/route_client-reference-manifest.js +1 -1
  76. package/.next/standalone/.next/server/app/api/auth/company-oidc/route_client-reference-manifest.js +1 -1
  77. package/.next/standalone/.next/server/app/api/auth/default-login/route_client-reference-manifest.js +1 -1
  78. package/.next/standalone/.next/server/app/api/auth/identify/route_client-reference-manifest.js +1 -1
  79. package/.next/standalone/.next/server/app/api/auth/logout/route_client-reference-manifest.js +1 -1
  80. package/.next/standalone/.next/server/app/api/auth/me/route_client-reference-manifest.js +1 -1
  81. package/.next/standalone/.next/server/app/api/auth/sync-token/route_client-reference-manifest.js +1 -1
  82. package/.next/standalone/.next/server/app/api/comments/route.js +1 -1
  83. package/.next/standalone/.next/server/app/api/comments/route.js.nft.json +1 -1
  84. package/.next/standalone/.next/server/app/api/comments/route_client-reference-manifest.js +1 -1
  85. package/.next/standalone/.next/server/app/api/daemon/connection-heartbeat/route.js.nft.json +1 -1
  86. package/.next/standalone/.next/server/app/api/daemon/connection-heartbeat/route_client-reference-manifest.js +1 -1
  87. package/.next/standalone/.next/server/app/api/daemon/control/route_client-reference-manifest.js +1 -1
  88. package/.next/standalone/.next/server/app/api/daemon/directory-request/report/route.js.nft.json +1 -1
  89. package/.next/standalone/.next/server/app/api/daemon/directory-request/report/route_client-reference-manifest.js +1 -1
  90. package/.next/standalone/.next/server/app/api/daemon/execution-state/route.js.nft.json +1 -1
  91. package/.next/standalone/.next/server/app/api/daemon/execution-state/route_client-reference-manifest.js +1 -1
  92. package/.next/standalone/.next/server/app/api/daemon/executions/route.js.nft.json +1 -1
  93. package/.next/standalone/.next/server/app/api/daemon/executions/route_client-reference-manifest.js +1 -1
  94. package/.next/standalone/.next/server/app/api/daemon/pending-turns/route.js +1 -1
  95. package/.next/standalone/.next/server/app/api/daemon/pending-turns/route.js.nft.json +1 -1
  96. package/.next/standalone/.next/server/app/api/daemon/pending-turns/route_client-reference-manifest.js +1 -1
  97. package/.next/standalone/.next/server/app/api/daemon/report-interrupt/route.js.nft.json +1 -1
  98. package/.next/standalone/.next/server/app/api/daemon/report-interrupt/route_client-reference-manifest.js +1 -1
  99. package/.next/standalone/.next/server/app/api/daemon/resume/route.js +1 -1
  100. package/.next/standalone/.next/server/app/api/daemon/resume/route.js.nft.json +1 -1
  101. package/.next/standalone/.next/server/app/api/daemon/resume/route_client-reference-manifest.js +1 -1
  102. package/.next/standalone/.next/server/app/api/daemon/transcript/route.js +1 -1
  103. package/.next/standalone/.next/server/app/api/daemon/transcript/route.js.nft.json +1 -1
  104. package/.next/standalone/.next/server/app/api/daemon/transcript/route_client-reference-manifest.js +1 -1
  105. package/.next/standalone/.next/server/app/api/daemon/turn-advance/route.js +1 -1
  106. package/.next/standalone/.next/server/app/api/daemon/turn-advance/route.js.nft.json +1 -1
  107. package/.next/standalone/.next/server/app/api/daemon/turn-advance/route_client-reference-manifest.js +1 -1
  108. package/.next/standalone/.next/server/app/api/daemon-directory-requests/[uuid]/route.js.nft.json +1 -1
  109. package/.next/standalone/.next/server/app/api/daemon-directory-requests/[uuid]/route_client-reference-manifest.js +1 -1
  110. package/.next/standalone/.next/server/app/api/daemon-directory-requests/route.js.nft.json +1 -1
  111. package/.next/standalone/.next/server/app/api/daemon-directory-requests/route_client-reference-manifest.js +1 -1
  112. package/.next/standalone/.next/server/app/api/daemon-sessions/[sessionUuid]/instruction/route.js +1 -1
  113. package/.next/standalone/.next/server/app/api/daemon-sessions/[sessionUuid]/instruction/route.js.nft.json +1 -1
  114. package/.next/standalone/.next/server/app/api/daemon-sessions/[sessionUuid]/instruction/route_client-reference-manifest.js +1 -1
  115. package/.next/standalone/.next/server/app/api/daemon-sessions/[sessionUuid]/repoint/route.js +1 -1
  116. package/.next/standalone/.next/server/app/api/daemon-sessions/[sessionUuid]/repoint/route.js.nft.json +1 -1
  117. package/.next/standalone/.next/server/app/api/daemon-sessions/[sessionUuid]/repoint/route_client-reference-manifest.js +1 -1
  118. package/.next/standalone/.next/server/app/api/daemon-sessions/[sessionUuid]/route.js +1 -1
  119. package/.next/standalone/.next/server/app/api/daemon-sessions/[sessionUuid]/route.js.nft.json +1 -1
  120. package/.next/standalone/.next/server/app/api/daemon-sessions/[sessionUuid]/route_client-reference-manifest.js +1 -1
  121. package/.next/standalone/.next/server/app/api/daemon-sessions/ad-hoc/route.js +1 -1
  122. package/.next/standalone/.next/server/app/api/daemon-sessions/ad-hoc/route.js.nft.json +1 -1
  123. package/.next/standalone/.next/server/app/api/daemon-sessions/ad-hoc/route_client-reference-manifest.js +1 -1
  124. package/.next/standalone/.next/server/app/api/daemon-sessions/route.js +1 -1
  125. package/.next/standalone/.next/server/app/api/daemon-sessions/route.js.nft.json +1 -1
  126. package/.next/standalone/.next/server/app/api/daemon-sessions/route_client-reference-manifest.js +1 -1
  127. package/.next/standalone/.next/server/app/api/documents/[uuid]/route_client-reference-manifest.js +1 -1
  128. package/.next/standalone/.next/server/app/api/entities/[type]/[uuid]/root-idea/route.js +1 -1
  129. package/.next/standalone/.next/server/app/api/entities/[type]/[uuid]/root-idea/route.js.nft.json +1 -1
  130. package/.next/standalone/.next/server/app/api/entities/[type]/[uuid]/root-idea/route_client-reference-manifest.js +1 -1
  131. package/.next/standalone/.next/server/app/api/events/notifications/route.js +1 -1
  132. package/.next/standalone/.next/server/app/api/events/notifications/route.js.nft.json +1 -1
  133. package/.next/standalone/.next/server/app/api/events/notifications/route_client-reference-manifest.js +1 -1
  134. package/.next/standalone/.next/server/app/api/events/route.js +1 -1
  135. package/.next/standalone/.next/server/app/api/events/route.js.nft.json +1 -1
  136. package/.next/standalone/.next/server/app/api/events/route_client-reference-manifest.js +1 -1
  137. package/.next/standalone/.next/server/app/api/health/route_client-reference-manifest.js +1 -1
  138. package/.next/standalone/.next/server/app/api/ideas/[uuid]/claim/route.js +1 -1
  139. package/.next/standalone/.next/server/app/api/ideas/[uuid]/claim/route.js.nft.json +1 -1
  140. package/.next/standalone/.next/server/app/api/ideas/[uuid]/claim/route_client-reference-manifest.js +1 -1
  141. package/.next/standalone/.next/server/app/api/ideas/[uuid]/move/preview/route.js +1 -1
  142. package/.next/standalone/.next/server/app/api/ideas/[uuid]/move/preview/route.js.nft.json +1 -1
  143. package/.next/standalone/.next/server/app/api/ideas/[uuid]/move/preview/route_client-reference-manifest.js +1 -1
  144. package/.next/standalone/.next/server/app/api/ideas/[uuid]/move/route.js +1 -1
  145. package/.next/standalone/.next/server/app/api/ideas/[uuid]/move/route.js.nft.json +1 -1
  146. package/.next/standalone/.next/server/app/api/ideas/[uuid]/move/route_client-reference-manifest.js +1 -1
  147. package/.next/standalone/.next/server/app/api/ideas/[uuid]/parent/route.js +1 -1
  148. package/.next/standalone/.next/server/app/api/ideas/[uuid]/parent/route.js.nft.json +1 -1
  149. package/.next/standalone/.next/server/app/api/ideas/[uuid]/parent/route_client-reference-manifest.js +1 -1
  150. package/.next/standalone/.next/server/app/api/ideas/[uuid]/release/route.js +1 -1
  151. package/.next/standalone/.next/server/app/api/ideas/[uuid]/release/route.js.nft.json +1 -1
  152. package/.next/standalone/.next/server/app/api/ideas/[uuid]/release/route_client-reference-manifest.js +1 -1
  153. package/.next/standalone/.next/server/app/api/ideas/[uuid]/route.js +1 -1
  154. package/.next/standalone/.next/server/app/api/ideas/[uuid]/route.js.nft.json +1 -1
  155. package/.next/standalone/.next/server/app/api/ideas/[uuid]/route_client-reference-manifest.js +1 -1
  156. package/.next/standalone/.next/server/app/api/ideas/[uuid]/wake-preview/route.js.nft.json +1 -1
  157. package/.next/standalone/.next/server/app/api/ideas/[uuid]/wake-preview/route_client-reference-manifest.js +1 -1
  158. package/.next/standalone/.next/server/app/api/ideas/conversational/route.js +1 -1
  159. package/.next/standalone/.next/server/app/api/ideas/conversational/route.js.nft.json +1 -1
  160. package/.next/standalone/.next/server/app/api/ideas/conversational/route_client-reference-manifest.js +1 -1
  161. package/.next/standalone/.next/server/app/api/mcp/route.js +1 -1
  162. package/.next/standalone/.next/server/app/api/mcp/route.js.nft.json +1 -1
  163. package/.next/standalone/.next/server/app/api/mcp/route_client-reference-manifest.js +1 -1
  164. package/.next/standalone/.next/server/app/api/me/assignments/route.js +1 -1
  165. package/.next/standalone/.next/server/app/api/me/assignments/route.js.nft.json +1 -1
  166. package/.next/standalone/.next/server/app/api/me/assignments/route_client-reference-manifest.js +1 -1
  167. package/.next/standalone/.next/server/app/api/mentionables/route.js +1 -1
  168. package/.next/standalone/.next/server/app/api/mentionables/route.js.nft.json +1 -1
  169. package/.next/standalone/.next/server/app/api/mentionables/route_client-reference-manifest.js +1 -1
  170. package/.next/standalone/.next/server/app/api/notifications/[uuid]/archive/route.js +1 -1
  171. package/.next/standalone/.next/server/app/api/notifications/[uuid]/archive/route.js.nft.json +1 -1
  172. package/.next/standalone/.next/server/app/api/notifications/[uuid]/archive/route_client-reference-manifest.js +1 -1
  173. package/.next/standalone/.next/server/app/api/notifications/[uuid]/read/route.js +1 -1
  174. package/.next/standalone/.next/server/app/api/notifications/[uuid]/read/route.js.nft.json +1 -1
  175. package/.next/standalone/.next/server/app/api/notifications/[uuid]/read/route_client-reference-manifest.js +1 -1
  176. package/.next/standalone/.next/server/app/api/notifications/preferences/route.js +1 -1
  177. package/.next/standalone/.next/server/app/api/notifications/preferences/route.js.nft.json +1 -1
  178. package/.next/standalone/.next/server/app/api/notifications/preferences/route_client-reference-manifest.js +1 -1
  179. package/.next/standalone/.next/server/app/api/notifications/read-all/route.js +1 -1
  180. package/.next/standalone/.next/server/app/api/notifications/read-all/route.js.nft.json +1 -1
  181. package/.next/standalone/.next/server/app/api/notifications/read-all/route_client-reference-manifest.js +1 -1
  182. package/.next/standalone/.next/server/app/api/notifications/route.js +1 -1
  183. package/.next/standalone/.next/server/app/api/notifications/route.js.nft.json +1 -1
  184. package/.next/standalone/.next/server/app/api/notifications/route_client-reference-manifest.js +1 -1
  185. package/.next/standalone/.next/server/app/api/notifications/unread-count/route.js +1 -1
  186. package/.next/standalone/.next/server/app/api/notifications/unread-count/route.js.nft.json +1 -1
  187. package/.next/standalone/.next/server/app/api/notifications/unread-count/route_client-reference-manifest.js +1 -1
  188. package/.next/standalone/.next/server/app/api/project-groups/[uuid]/dashboard/route_client-reference-manifest.js +1 -1
  189. package/.next/standalone/.next/server/app/api/project-groups/[uuid]/route_client-reference-manifest.js +1 -1
  190. package/.next/standalone/.next/server/app/api/project-groups/route_client-reference-manifest.js +1 -1
  191. package/.next/standalone/.next/server/app/api/project-visits/pin/route_client-reference-manifest.js +1 -1
  192. package/.next/standalone/.next/server/app/api/project-visits/route_client-reference-manifest.js +1 -1
  193. package/.next/standalone/.next/server/app/api/project-visits/visit/route_client-reference-manifest.js +1 -1
  194. package/.next/standalone/.next/server/app/api/projects/[uuid]/activity/route_client-reference-manifest.js +1 -1
  195. package/.next/standalone/.next/server/app/api/projects/[uuid]/agent-cwds/route.js.nft.json +1 -1
  196. package/.next/standalone/.next/server/app/api/projects/[uuid]/agent-cwds/route_client-reference-manifest.js +1 -1
  197. package/.next/standalone/.next/server/app/api/projects/[uuid]/available/route.js +1 -1
  198. package/.next/standalone/.next/server/app/api/projects/[uuid]/available/route.js.nft.json +1 -1
  199. package/.next/standalone/.next/server/app/api/projects/[uuid]/available/route_client-reference-manifest.js +1 -1
  200. package/.next/standalone/.next/server/app/api/projects/[uuid]/documents/route_client-reference-manifest.js +1 -1
  201. package/.next/standalone/.next/server/app/api/projects/[uuid]/group/route_client-reference-manifest.js +1 -1
  202. package/.next/standalone/.next/server/app/api/projects/[uuid]/ideas/route.js +1 -1
  203. package/.next/standalone/.next/server/app/api/projects/[uuid]/ideas/route.js.nft.json +1 -1
  204. package/.next/standalone/.next/server/app/api/projects/[uuid]/ideas/route_client-reference-manifest.js +1 -1
  205. package/.next/standalone/.next/server/app/api/projects/[uuid]/ideas/tracker/route.js +1 -1
  206. package/.next/standalone/.next/server/app/api/projects/[uuid]/ideas/tracker/route.js.nft.json +1 -1
  207. package/.next/standalone/.next/server/app/api/projects/[uuid]/ideas/tracker/route_client-reference-manifest.js +1 -1
  208. package/.next/standalone/.next/server/app/api/projects/[uuid]/proposals/[proposalUuid]/validate/route_client-reference-manifest.js +1 -1
  209. package/.next/standalone/.next/server/app/api/projects/[uuid]/proposals/route_client-reference-manifest.js +1 -1
  210. package/.next/standalone/.next/server/app/api/projects/[uuid]/proposals/summary/route_client-reference-manifest.js +1 -1
  211. package/.next/standalone/.next/server/app/api/projects/[uuid]/resource-graph/route.js +1 -1
  212. package/.next/standalone/.next/server/app/api/projects/[uuid]/resource-graph/route.js.nft.json +1 -1
  213. package/.next/standalone/.next/server/app/api/projects/[uuid]/resource-graph/route_client-reference-manifest.js +1 -1
  214. package/.next/standalone/.next/server/app/api/projects/[uuid]/route_client-reference-manifest.js +1 -1
  215. package/.next/standalone/.next/server/app/api/projects/[uuid]/stats/route_client-reference-manifest.js +1 -1
  216. package/.next/standalone/.next/server/app/api/projects/[uuid]/tasks/dependencies/route.js +1 -1
  217. package/.next/standalone/.next/server/app/api/projects/[uuid]/tasks/dependencies/route.js.nft.json +1 -1
  218. package/.next/standalone/.next/server/app/api/projects/[uuid]/tasks/dependencies/route_client-reference-manifest.js +1 -1
  219. package/.next/standalone/.next/server/app/api/projects/[uuid]/tasks/route.js +1 -1
  220. package/.next/standalone/.next/server/app/api/projects/[uuid]/tasks/route.js.nft.json +1 -1
  221. package/.next/standalone/.next/server/app/api/projects/[uuid]/tasks/route_client-reference-manifest.js +1 -1
  222. package/.next/standalone/.next/server/app/api/projects/agent-cwd-options/route.js.nft.json +1 -1
  223. package/.next/standalone/.next/server/app/api/projects/agent-cwd-options/route_client-reference-manifest.js +1 -1
  224. package/.next/standalone/.next/server/app/api/projects/route.js.nft.json +1 -1
  225. package/.next/standalone/.next/server/app/api/projects/route_client-reference-manifest.js +1 -1
  226. package/.next/standalone/.next/server/app/api/proposals/[uuid]/approve/route_client-reference-manifest.js +1 -1
  227. package/.next/standalone/.next/server/app/api/proposals/[uuid]/close/route_client-reference-manifest.js +1 -1
  228. package/.next/standalone/.next/server/app/api/proposals/[uuid]/reject/route_client-reference-manifest.js +1 -1
  229. package/.next/standalone/.next/server/app/api/proposals/[uuid]/revoke/route_client-reference-manifest.js +1 -1
  230. package/.next/standalone/.next/server/app/api/proposals/[uuid]/route_client-reference-manifest.js +1 -1
  231. package/.next/standalone/.next/server/app/api/references/[uuid]/route_client-reference-manifest.js +1 -1
  232. package/.next/standalone/.next/server/app/api/references/route_client-reference-manifest.js +1 -1
  233. package/.next/standalone/.next/server/app/api/search/route_client-reference-manifest.js +1 -1
  234. package/.next/standalone/.next/server/app/api/session/route_client-reference-manifest.js +1 -1
  235. package/.next/standalone/.next/server/app/api/sessions/[uuid]/route.js +1 -1
  236. package/.next/standalone/.next/server/app/api/sessions/[uuid]/route.js.nft.json +1 -1
  237. package/.next/standalone/.next/server/app/api/sessions/[uuid]/route_client-reference-manifest.js +1 -1
  238. package/.next/standalone/.next/server/app/api/tasks/[uuid]/claim/route.js +1 -1
  239. package/.next/standalone/.next/server/app/api/tasks/[uuid]/claim/route.js.nft.json +1 -1
  240. package/.next/standalone/.next/server/app/api/tasks/[uuid]/claim/route_client-reference-manifest.js +1 -1
  241. package/.next/standalone/.next/server/app/api/tasks/[uuid]/dependencies/[dependsOnUuid]/route.js +1 -1
  242. package/.next/standalone/.next/server/app/api/tasks/[uuid]/dependencies/[dependsOnUuid]/route.js.nft.json +1 -1
  243. package/.next/standalone/.next/server/app/api/tasks/[uuid]/dependencies/[dependsOnUuid]/route_client-reference-manifest.js +1 -1
  244. package/.next/standalone/.next/server/app/api/tasks/[uuid]/dependencies/route.js +1 -1
  245. package/.next/standalone/.next/server/app/api/tasks/[uuid]/dependencies/route.js.nft.json +1 -1
  246. package/.next/standalone/.next/server/app/api/tasks/[uuid]/dependencies/route_client-reference-manifest.js +1 -1
  247. package/.next/standalone/.next/server/app/api/tasks/[uuid]/release/route.js +1 -1
  248. package/.next/standalone/.next/server/app/api/tasks/[uuid]/release/route.js.nft.json +1 -1
  249. package/.next/standalone/.next/server/app/api/tasks/[uuid]/release/route_client-reference-manifest.js +1 -1
  250. package/.next/standalone/.next/server/app/api/tasks/[uuid]/route.js +1 -1
  251. package/.next/standalone/.next/server/app/api/tasks/[uuid]/route.js.nft.json +1 -1
  252. package/.next/standalone/.next/server/app/api/tasks/[uuid]/route_client-reference-manifest.js +1 -1
  253. package/.next/standalone/.next/server/app/api/tasks/[uuid]/sessions/route.js +1 -1
  254. package/.next/standalone/.next/server/app/api/tasks/[uuid]/sessions/route.js.nft.json +1 -1
  255. package/.next/standalone/.next/server/app/api/tasks/[uuid]/sessions/route_client-reference-manifest.js +1 -1
  256. package/.next/standalone/.next/server/app/index.html +2 -2
  257. package/.next/standalone/.next/server/app/index.rsc +2 -2
  258. package/.next/standalone/.next/server/app/login/admin/page_client-reference-manifest.js +1 -1
  259. package/.next/standalone/.next/server/app/login/admin.html +2 -2
  260. package/.next/standalone/.next/server/app/login/admin.rsc +2 -2
  261. package/.next/standalone/.next/server/app/login/callback/page_client-reference-manifest.js +1 -1
  262. package/.next/standalone/.next/server/app/login/callback.html +2 -2
  263. package/.next/standalone/.next/server/app/login/callback.rsc +2 -2
  264. package/.next/standalone/.next/server/app/login/page_client-reference-manifest.js +1 -1
  265. package/.next/standalone/.next/server/app/login/pick-workspace/page_client-reference-manifest.js +1 -1
  266. package/.next/standalone/.next/server/app/login/pick-workspace.html +2 -2
  267. package/.next/standalone/.next/server/app/login/pick-workspace.rsc +2 -2
  268. package/.next/standalone/.next/server/app/login.html +2 -2
  269. package/.next/standalone/.next/server/app/login.rsc +2 -2
  270. package/.next/standalone/.next/server/app/onboarding/page.js +2 -2
  271. package/.next/standalone/.next/server/app/onboarding/page.js.nft.json +1 -1
  272. package/.next/standalone/.next/server/app/onboarding/page_client-reference-manifest.js +1 -1
  273. package/.next/standalone/.next/server/app/onboarding.html +2 -2
  274. package/.next/standalone/.next/server/app/onboarding.rsc +3 -3
  275. package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
  276. package/.next/standalone/.next/server/app/projects.html +2 -2
  277. package/.next/standalone/.next/server/app/projects.rsc +3 -3
  278. package/.next/standalone/.next/server/app/settings.html +2 -2
  279. package/.next/standalone/.next/server/app/settings.rsc +4 -4
  280. package/.next/standalone/.next/server/app-paths-manifest.json +44 -44
  281. package/.next/standalone/.next/server/chunks/109.js +1 -0
  282. package/.next/standalone/.next/server/chunks/1318.js +1 -1
  283. package/.next/standalone/.next/server/chunks/1496.js +1 -0
  284. package/.next/standalone/.next/server/chunks/1559.js +2 -2
  285. package/.next/standalone/.next/server/chunks/2572.js +1 -1
  286. package/.next/standalone/.next/server/chunks/2961.js +1 -1
  287. package/.next/standalone/.next/server/chunks/3112.js +1 -1
  288. package/.next/standalone/.next/server/chunks/{2536.js → 3619.js} +3 -3
  289. package/.next/standalone/.next/server/chunks/{6080.js → 4810.js} +1 -1
  290. package/.next/standalone/.next/server/chunks/4827.js +1 -1
  291. package/.next/standalone/.next/server/chunks/5245.js +1 -1
  292. package/.next/standalone/.next/server/chunks/6113.js +1 -1
  293. package/.next/standalone/.next/server/chunks/6506.js +2 -2
  294. package/.next/standalone/.next/server/chunks/6515.js +2 -2
  295. package/.next/standalone/.next/server/chunks/6737.js +1 -0
  296. package/.next/standalone/.next/server/chunks/6753.js +3 -3
  297. package/.next/standalone/.next/server/chunks/679.js +1 -1
  298. package/.next/standalone/.next/server/chunks/731.js +1 -0
  299. package/.next/standalone/.next/server/chunks/7368.js +1 -1
  300. package/.next/standalone/.next/server/chunks/7530.js +1 -1
  301. package/.next/standalone/.next/server/chunks/7857.js +1 -0
  302. package/.next/standalone/.next/server/chunks/920.js +1 -1
  303. package/.next/standalone/.next/server/chunks/9213.js +1 -1
  304. package/.next/standalone/.next/server/chunks/9378.js +1 -1
  305. package/.next/standalone/.next/server/chunks/9931.js +1 -1
  306. package/.next/standalone/.next/server/middleware-build-manifest.js +1 -1
  307. package/.next/standalone/.next/server/middleware-manifest.json +5 -5
  308. package/.next/standalone/.next/server/pages/404.html +2 -2
  309. package/.next/standalone/.next/server/pages/500.html +1 -1
  310. package/.next/standalone/.next/server/server-reference-manifest.js +1 -1
  311. package/.next/standalone/.next/server/server-reference-manifest.json +1 -1
  312. package/.next/standalone/.next/static/chunks/11595.0afa1a540f681fb4.js +1 -0
  313. package/.next/standalone/.next/static/chunks/22705-324a191727ae45b7.js +1 -0
  314. package/.next/standalone/.next/static/chunks/{31308-32614efb88305738.js → 31308-bb4a97b3f39c22dd.js} +1 -1
  315. package/.next/standalone/.next/static/chunks/33456.4a5f4712a7e78d8f.js +1 -0
  316. package/.next/standalone/.next/static/chunks/44216-3876e84f5b02d355.js +1 -0
  317. package/.next/standalone/.next/static/chunks/4860.5719e32b95be2d93.js +1 -0
  318. package/.next/standalone/.next/static/chunks/6528-a8a562ef7d26bb43.js +1 -0
  319. package/.next/standalone/.next/static/chunks/67439-7b339b28ed0ecfc6.js +1 -0
  320. package/.next/standalone/.next/static/chunks/79919-ae8bd8d8ec1e38ce.js +1 -0
  321. package/.next/standalone/.next/static/chunks/82203-4ce5926624df7ed0.js +1 -0
  322. package/.next/standalone/.next/static/chunks/94643-37ac7b8ef8ea5e75.js +1 -0
  323. package/.next/standalone/.next/static/chunks/99373.6c1509bfaf599741.js +1 -0
  324. package/.next/standalone/.next/static/chunks/99775-697e82ee04eac6b1.js +1 -0
  325. package/.next/standalone/.next/static/chunks/app/(dashboard)/layout-2fda722cdace8147.js +1 -0
  326. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/dashboard/{page-eecb38fa4b8eb4e8.js → page-b45c42c536eff64b.js} +1 -1
  327. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/documents/[documentUuid]/page-792aba7fd6b6daa3.js +1 -0
  328. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/documents/{page-cd7ec77596304a07.js → page-800a979f12b73f27.js} +1 -1
  329. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/graph/{page-97a9e6f949002004.js → page-34de35f75aa71f6d.js} +1 -1
  330. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/proposals/[proposalUuid]/page-a16002aa2a911619.js +1 -0
  331. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/proposals/new/{page-cec15f4b835d34fc.js → page-e8030824994edf35.js} +1 -1
  332. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/proposals/page-4f7f1ddbaf79be8f.js +1 -0
  333. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/tasks/[taskUuid]/{page-4ee117e690fda56f.js → page-349b0977f3c6209a.js} +1 -1
  334. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/tasks/{page-7fbc46dfb7b22bd3.js → page-be43cb06112fce12.js} +1 -1
  335. package/.next/standalone/.next/static/chunks/app/(dashboard)/settings/page-6916e1abab42a6e6.js +1 -0
  336. package/.next/standalone/.next/static/chunks/app/onboarding/{page-4fce966dc96d4ff1.js → page-c0090caae202eae5.js} +1 -1
  337. package/.next/standalone/.next/static/chunks/{webpack-1bfc783412a06fc5.js → webpack-cfb63dd1b416c92e.js} +1 -1
  338. package/.next/standalone/.next/static/css/75c761a5428611fa.css +1 -0
  339. package/.next/standalone/package.json +1 -1
  340. package/.next/standalone/public/chorus-plugin/.claude-plugin/plugin.json +2 -2
  341. package/.next/standalone/public/chorus-plugin/agents/code-reviewer.md +1 -0
  342. package/.next/standalone/public/chorus-plugin/agents/proposal-reviewer.md +12 -3
  343. package/.next/standalone/public/chorus-plugin/agents/task-reviewer.md +4 -0
  344. package/.next/standalone/public/chorus-plugin/bin/chorus-api.sh +1 -1
  345. package/.next/standalone/public/chorus-plugin/bin/on-post-submit-for-verify.sh +3 -3
  346. package/.next/standalone/public/chorus-plugin/bin/on-post-submit-proposal.sh +3 -3
  347. package/.next/standalone/public/chorus-plugin/bin/on-post-verify-task.sh +2 -2
  348. package/.next/standalone/public/chorus-plugin/bin/on-session-start.sh +39 -64
  349. package/.next/standalone/public/chorus-plugin/bin/resolve-spec-mode.sh +107 -0
  350. package/.next/standalone/public/chorus-plugin/bin/tests/test-resolver-drift.sh +46 -0
  351. package/.next/standalone/public/chorus-plugin/bin/tests/test-skill-harness-fidelity-negative.sh +328 -0
  352. package/.next/standalone/public/chorus-plugin/bin/tests/test-skill-harness-fidelity.sh +372 -0
  353. package/.next/standalone/public/chorus-plugin/bin/tests/test-spec-mode-resolution.sh +83 -0
  354. package/.next/standalone/public/chorus-plugin/skills/brainstorm/SKILL.md +1 -1
  355. package/.next/standalone/public/chorus-plugin/skills/chorus/SKILL.md +11 -6
  356. package/.next/standalone/public/chorus-plugin/skills/chorus-cli/SKILL.md +1 -1
  357. package/.next/standalone/public/chorus-plugin/skills/develop/SKILL.md +14 -9
  358. package/.next/standalone/public/chorus-plugin/skills/docs/SKILL.md +1 -1
  359. package/.next/standalone/public/chorus-plugin/skills/idea/SKILL.md +1 -1
  360. package/.next/standalone/public/chorus-plugin/skills/openspec-aware/SKILL.md +27 -31
  361. package/.next/standalone/public/chorus-plugin/skills/orchestrate/SKILL.md +11 -1
  362. package/.next/standalone/public/chorus-plugin/skills/proposal/SKILL.md +14 -7
  363. package/.next/standalone/public/chorus-plugin/skills/quick-dev/SKILL.md +6 -4
  364. package/.next/standalone/public/chorus-plugin/skills/review/SKILL.md +10 -8
  365. package/.next/standalone/public/chorus-plugin/skills/spec-lite/SKILL.md +147 -0
  366. package/.next/standalone/public/chorus-plugin/skills/yolo/SKILL.md +49 -34
  367. package/.next/standalone/public/kiro-plugin/.kiro/agents/chorus-code-reviewer.json +1 -1
  368. package/.next/standalone/public/kiro-plugin/.kiro/agents/chorus-proposal-reviewer.json +2 -1
  369. package/.next/standalone/public/kiro-plugin/.kiro/agents/chorus-task-reviewer.json +1 -1
  370. package/.next/standalone/public/kiro-plugin/.kiro/agents/chorus.md +1 -1
  371. package/.next/standalone/public/kiro-plugin/.kiro/skills/chorus-brainstorm/SKILL.md +1 -1
  372. package/.next/standalone/public/kiro-plugin/.kiro/skills/chorus-cli/SKILL.md +1 -1
  373. package/.next/standalone/public/kiro-plugin/.kiro/skills/chorus-develop/SKILL.md +9 -7
  374. package/.next/standalone/public/kiro-plugin/.kiro/skills/chorus-docs/SKILL.md +1 -1
  375. package/.next/standalone/public/kiro-plugin/.kiro/skills/chorus-idea/SKILL.md +1 -1
  376. package/.next/standalone/public/kiro-plugin/.kiro/skills/chorus-openspec-aware/SKILL.md +35 -27
  377. package/.next/standalone/public/kiro-plugin/.kiro/skills/chorus-orchestrate/SKILL.md +9 -1
  378. package/.next/standalone/public/kiro-plugin/.kiro/skills/chorus-proposal/SKILL.md +14 -7
  379. package/.next/standalone/public/kiro-plugin/.kiro/skills/chorus-quick-dev/SKILL.md +2 -2
  380. package/.next/standalone/public/kiro-plugin/.kiro/skills/chorus-review/SKILL.md +8 -8
  381. package/.next/standalone/public/kiro-plugin/.kiro/skills/chorus-spec-lite/SKILL.md +147 -0
  382. package/.next/standalone/public/kiro-plugin/.kiro/skills/chorus-yolo/SKILL.md +39 -25
  383. package/.next/standalone/public/kiro-plugin/.kiro/steering/chorus.md +11 -6
  384. package/.next/standalone/public/kiro-plugin/bin/chorus-api.sh +1 -1
  385. package/.next/standalone/public/kiro-plugin/bin/on-agent-spawn.sh +41 -0
  386. package/.next/standalone/public/kiro-plugin/bin/on-post-submit-for-verify.sh +3 -3
  387. package/.next/standalone/public/kiro-plugin/bin/on-post-submit-proposal.sh +3 -3
  388. package/.next/standalone/public/kiro-plugin/bin/on-post-verify-task.sh +2 -2
  389. package/.next/standalone/public/kiro-plugin/bin/resolve-spec-mode.sh +107 -0
  390. package/.next/standalone/public/kiro-plugin/manifest.txt +2 -0
  391. package/.next/standalone/public/skill/chorus/SKILL.md +11 -1
  392. package/.next/standalone/public/skill/code-reviewer-chorus/SKILL.md +1 -0
  393. package/.next/standalone/public/skill/develop-chorus/SKILL.md +1 -1
  394. package/.next/standalone/public/skill/orchestrate-chorus/SKILL.md +11 -1
  395. package/.next/standalone/public/skill/proposal-reviewer-chorus/SKILL.md +5 -2
  396. package/.next/standalone/public/skill/quick-dev-chorus/SKILL.md +1 -1
  397. package/.next/standalone/public/skill/review-chorus/SKILL.md +5 -3
  398. package/.next/standalone/public/skill/task-reviewer-chorus/SKILL.md +4 -0
  399. package/.next/standalone/public/skill/yolo-chorus/SKILL.md +23 -7
  400. package/README.ja.md +3 -3
  401. package/README.ko.md +3 -3
  402. package/README.md +3 -3
  403. package/README.zh.md +3 -3
  404. package/cli/agent-cli-config.mjs +323 -0
  405. package/cli/agent-launcher.mjs +45 -17
  406. package/cli/claude-spawner.mjs +22 -13
  407. package/cli/codex-spawner.mjs +23 -15
  408. package/cli/credentials.mjs +7 -0
  409. package/cli/daemon-agent.mjs +1 -1
  410. package/cli/daemon-config.mjs +14 -0
  411. package/cli/daemon.mjs +34 -9
  412. package/cli/dsh-managed-config.mjs +219 -293
  413. package/cli/dsh-spawner.mjs +53 -27
  414. package/cli/init/steps/credential-seed.mjs +1 -1
  415. package/cli/kiro-spawner.mjs +22 -15
  416. package/cli/launch-diagnostics.mjs +67 -0
  417. package/cli/login.mjs +17 -1
  418. package/cli/pi-spawner.mjs +19 -12
  419. package/cli/prompts.mjs +52 -2
  420. package/cli/spawner-select.mjs +6 -11
  421. package/package.json +1 -1
  422. package/.next/standalone/.next/server/chunks/1114.js +0 -1
  423. package/.next/standalone/.next/server/chunks/2953.js +0 -1
  424. package/.next/standalone/.next/server/chunks/5162.js +0 -1
  425. package/.next/standalone/.next/server/chunks/6689.js +0 -1
  426. package/.next/standalone/.next/server/chunks/9667.js +0 -1
  427. package/.next/standalone/.next/static/chunks/11595.b81c0bf7732c3b62.js +0 -1
  428. package/.next/standalone/.next/static/chunks/24808-e3d95efc7ec039c5.js +0 -1
  429. package/.next/standalone/.next/static/chunks/33456.cfc9aa607a62e879.js +0 -1
  430. package/.next/standalone/.next/static/chunks/4860.41351a823cf400e4.js +0 -1
  431. package/.next/standalone/.next/static/chunks/51468-194d894e563580dd.js +0 -1
  432. package/.next/standalone/.next/static/chunks/61570-527701d072d00a24.js +0 -1
  433. package/.next/standalone/.next/static/chunks/65066-6da35d5cb080c7f5.js +0 -1
  434. package/.next/standalone/.next/static/chunks/72875-0987d09cd8406614.js +0 -1
  435. package/.next/standalone/.next/static/chunks/75936-79860953212592fd.js +0 -1
  436. package/.next/standalone/.next/static/chunks/79919-e02963faee5cb563.js +0 -1
  437. package/.next/standalone/.next/static/chunks/94643-e8f5fa25e2340cc8.js +0 -1
  438. package/.next/standalone/.next/static/chunks/99373.633f7c25e64bcdac.js +0 -1
  439. package/.next/standalone/.next/static/chunks/app/(dashboard)/layout-bb5ef11586301c72.js +0 -1
  440. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/documents/[documentUuid]/page-725373108da1b08c.js +0 -1
  441. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/proposals/[proposalUuid]/page-7d2f4713697eb0a7.js +0 -1
  442. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/proposals/page-0225f87552b977d9.js +0 -1
  443. package/.next/standalone/.next/static/chunks/app/(dashboard)/settings/page-8b30678a58e7b2ee.js +0 -1
  444. package/.next/standalone/.next/static/css/1d9cf83f50b6db00.css +0 -1
  445. /package/.next/standalone/.next/static/{WSN4XeA1kUCI6CeEHcaT_ → IxKVu5zkFPTjSKAUR99yH}/_buildManifest.js +0 -0
  446. /package/.next/standalone/.next/static/{WSN4XeA1kUCI6CeEHcaT_ → IxKVu5zkFPTjSKAUR99yH}/_ssgManifest.js +0 -0
@@ -1,4 +1,27 @@
1
+ // Managed dsh profile composition for the daemon's `dsh --profile sdk` backend.
2
+ //
3
+ // dsh 0.1.2-rc.1 replaced the standalone `dsh-jsonrpc-agent` bin + hand-authored
4
+ // `cordis.yml` (DSH_CORDIS_CONFIG) model with a profile launcher: `dsh --profile
5
+ // sdk` boots the `sdk` profile under `$DSH_HOME/profiles/sdk` — an ordered stack
6
+ // of plugin-bundle patch layers (dsh-base + dsh-sdk-app, the latter mounting the
7
+ // `@deepseek-ai/dsh-sdk-jsonrpc-server` runtime that owns stdout). Chorus is a
8
+ // native dsh bundle: `dsh plugin --profile sdk add @chorus-aidlc/chorus-dsh -w`
9
+ // appends it to the profile's `dsh.profile.bundles` list, so its own
10
+ // `cordis.patch.yml` (the chorus-dsh-lifecycle, chorus-mcp, chorus-skill-filesystem
11
+ // and chorus-persona rows) auto-applies as a bundle layer — no `--patch` needed for
12
+ // the Chorus rows, and pnpm auto-installs chorus-dsh's peers (mcp-client, persona,
13
+ // skill-filesystem, tool-skill).
14
+ //
15
+ // The owner chose external_runtime: the `dsh` CLI itself comes from PATH /
16
+ // CHORUS_DSH_PATH and is NEVER installed into the managed home. We only COMPOSE a
17
+ // managed profile home under ~/.chorus/dsh/releases/<fingerprint>-<uuid>/ and hand
18
+ // its path back as the child's DSH_HOME. Credentials reach the chorus-mcp row via
19
+ // the CHORUS_URL / CHORUS_API_KEY the spawner injects into the child env (the
20
+ // chorus-dsh-lifecycle plugin's documented fallback also reads $DSH_HOME/.env).
21
+
1
22
  import { spawnSync } from "node:child_process";
23
+ import { safeSpawnError, redactedSetupError } from "./launch-diagnostics.mjs";
24
+ import { getAgentEnv, overlayAgentEnv } from "./agent-cli-config.mjs";
2
25
  import { createHash, randomUUID } from "node:crypto";
3
26
  import {
4
27
  existsSync,
@@ -9,172 +32,24 @@ import {
9
32
  writeFileSync,
10
33
  } from "node:fs";
11
34
  import { homedir } from "node:os";
12
- import { dirname, join, resolve } from "node:path";
13
- import { createRequire } from "node:module";
14
- import { pathToFileURL } from "node:url";
35
+ import { join } from "node:path";
15
36
 
16
37
  export const DSH_BUNDLE = "@chorus-aidlc/chorus-dsh";
17
- export const DSH_PEERS = Object.freeze([
18
- "@deepseek-ai/dsh-mcp-client",
19
- "@deepseek-ai/dsh-skill-filesystem",
20
- "@deepseek-ai/dsh-tool-skill",
21
- "@deepseek-ai/dsh-persona",
22
- ]);
23
- export const DSH_RC_VERSION = "0.1.0-rc.7";
24
- export const MANAGED_CONFIG_FILE = "cordis.yml";
25
-
26
- // dsh-base supplies the core plugins used by the external JSON-RPC composition.
27
- // Hoisted linking makes those transitive plugins visible from the config anchor.
28
- const RUNTIME_PACKAGES = Object.freeze({
29
- "@deepseek-ai/dsh-base": DSH_RC_VERSION,
30
- "@deepseek-ai/dsh-agent-spine-demo": DSH_RC_VERSION,
31
- "@deepseek-ai/dsh-sdk-jsonrpc-server": DSH_RC_VERSION,
32
- "@deepseek-ai/dsh-sdk-jsonrpc-demo": DSH_RC_VERSION,
33
- "@deepseek-ai/dsh-invariants": DSH_RC_VERSION,
34
- "@deepseek-ai/cordis": "4.0.1",
35
- });
36
- const REQUIRED_IMPORTS = Object.freeze([DSH_BUNDLE, ...DSH_PEERS]);
37
- const STATE_VERSION = 1;
38
-
39
- const CONFIG_HEAD = `# Generated by Chorus. Secrets are read from the child environment.
40
- # This file is managed; use CHORUS_DSH_CONFIG or DSH_CORDIS_CONFIG to override it.
41
-
42
- - id: sdk-jsonrpc-server
43
- name: '@deepseek-ai/dsh-sdk-jsonrpc-server'
44
- config:
45
- maxTokensAsSuccess: true
46
-
47
- - id: llm-deepseek
48
- name: '@deepseek-ai/dsh-llm-deepseek'
49
- config:
50
- thinking: enabled
51
- reasoningEffort: max
52
-
53
- - id: subprocess
54
- name: '@deepseek-ai/dsh-subprocess-local'
55
-
56
- - id: bash
57
- name: '@deepseek-ai/dsh-bash-local'
58
- config:
59
- cwd: !!js process.env.DSH_CWD ?? process.cwd()
60
- timeoutMs: 60000
61
-
62
- - id: agent-spine
63
- name: '@deepseek-ai/dsh-agent-spine-demo'
64
- config:
65
- persona: !!js process.env.DSH_SYSTEM_PROMPT ?? 'You are a coding agent.'
66
- workspaceContext: false
67
- skills:
68
- enabled: false
69
- toolBash:
70
- enableRunInBackground: false
71
- toolJobs: false
72
-
73
- - id: sessions
74
- name: '@deepseek-ai/dsh-session-persistence-jsonl'
75
- config:
76
- root: !!js process.env.DSH_SESSION_ROOT ?? './.sessions'
77
- compression: zstd
78
-
79
- - id: session-checkpoints
80
- name: '@deepseek-ai/dsh-session-checkpoint-policy'
81
-
82
- - id: subagent
83
- name: '@deepseek-ai/dsh-subagent'
84
-
85
- - id: subagent-spawn-in-process
86
- name: '@deepseek-ai/dsh-subagent-spawn-in-process'
87
- config:
88
- providerName: spawn
89
-
90
- - id: tool-subagent
91
- name: '@deepseek-ai/dsh-tool-subagent'
92
- config:
93
- provider: spawn
94
- toolName: subagent
95
- enableRunInBackground: false
96
-
97
- - id: tool-todo
98
- name: '@deepseek-ai/dsh-tool-todo'
99
- config:
100
- allowParallelInProgress: true
101
-
102
- - id: fs-local
103
- name: '@deepseek-ai/dsh-fs-local'
104
- config:
105
- cwd: !!js process.env.DSH_CWD ?? process.cwd()
106
-
107
- - id: fs-observation-policy
108
- name: '@deepseek-ai/dsh-fs-observation-policy'
109
-
110
- - id: tool-fs
111
- name: '@deepseek-ai/dsh-tool-fs'
112
-
113
- - id: token-meter
114
- name: '@deepseek-ai/dsh-token-meter'
115
-
116
- - id: compaction-basic
117
- name: '@deepseek-ai/dsh-compaction-basic'
118
- config:
119
- thresholdRatio: 0.8
120
- retainRatio: 0.16
121
- maxTokens: 8192
122
- compactionRetries: 1
123
-
124
- - id: chorus-dsh-lifecycle
125
- name: __CHORUS_BUNDLE__
126
-
127
- - id: chorus-mcp
128
- name: '@deepseek-ai/dsh-mcp-client'
129
- inject: [chorusDshConfig]
130
- config:
131
- serverName: chorus
132
- transport: streamable-http
133
- url: !!js '\`\${chorusDshConfig.url}/api/mcp\`'
134
- headers:
135
- Authorization: !!js '\`Bearer \${chorusDshConfig.apiKey}\`'
136
- failOnStartupError: false
137
- reconnect:
138
- enabled: true
139
-
140
- - id: skill
141
- name: '@deepseek-ai/dsh-skill'
142
-
143
- - id: chorus-skill-filesystem
144
- name: '@deepseek-ai/dsh-skill-filesystem'
145
- config:
146
- providerName: chorus
147
- includeDefaultRoots: false
148
- customSkillDirs:
149
- - !!js "process.getBuiltinModule('node:path').join(process.getBuiltinModule('node:path').dirname(process.getBuiltinModule('node:module').createRequire(baseUrl).resolve('@chorus-aidlc/chorus-dsh/package.json')), 'skills')"
150
-
151
- - id: chorus-persona
152
- name: __CHORUS_PERSONA__
153
- config:
154
- plugin: '@deepseek-ai/dsh-persona'
155
- text: |-
156
- You are a Chorus PM and developer agent powered by {{model}}. Work from {{cwd}}.
157
- Use the Chorus AI-DLC lifecycle and load the relevant Chorus skill before operating
158
- a Chorus resource. Keep decisions, progress, acceptance evidence, and review verdicts
159
- on the assigned resource. In a headless daemon turn, never wait for terminal input:
160
- persist human decisions through Chorus, mention the requester, and end the turn.
161
- Do not push, merge, publish, approve, verify, or cross a human-owned gate unless the
162
- wake explicitly grants that authority.
163
-
164
- - id: tool-skill
165
- name: '@deepseek-ai/dsh-tool-skill'
166
- `;
167
-
168
- function errorText(error) {
169
- return error instanceof Error ? error.message : String(error);
170
- }
171
-
172
- function redactedErrorText(error, values = []) {
173
- let text = errorText(error);
174
- for (const value of values) {
175
- if (typeof value === "string" && value) text = text.replaceAll(value, "[REDACTED]");
176
- }
177
- return text;
38
+ /** The shipped profile template the daemon boots: dsh-base + dsh-sdk-app. */
39
+ export const DSH_PROFILE = "sdk";
40
+ export const DSH_RC_VERSION = "0.1.2-rc.1";
41
+ /** The JSON-RPC runtime identity the SDK profile reports on `initialize`. */
42
+ export const RUNTIME_IDENTITY = "deepseek-harness-sdk-runtime";
43
+ /** The provider served out-of-the-box by the base profile (no overlay needed). */
44
+ export const DEFAULT_DSH_PROVIDER = "deepseek-official";
45
+
46
+ // Bumped from 1: active.json now records a managed DSH_HOME (+ optional --patch
47
+ // path) instead of a configPath/runtimePath pair. An old marker fails the shape
48
+ // check in activeState() and is transparently re-prepared.
49
+ const STATE_VERSION = 2;
50
+
51
+ function nonEmpty(value) {
52
+ return typeof value === "string" && value.trim() ? value.trim() : null;
178
53
  }
179
54
 
180
55
  function readJson(path) {
@@ -185,86 +60,40 @@ function readJson(path) {
185
60
  }
186
61
  }
187
62
 
188
- function packageSpecs({ bundleVersion, bundleSpec }) {
189
- return {
190
- [DSH_BUNDLE]: bundleSpec ?? bundleVersion,
191
- ...Object.fromEntries(DSH_PEERS.map((name) => [name, DSH_RC_VERSION])),
192
- ...RUNTIME_PACKAGES,
193
- };
194
- }
195
-
196
- export function managedDshRoot(env = process.env) {
197
- const home = env.HOME || env.USERPROFILE || homedir();
63
+ export function managedDshRoot(env = process.env, platform = process.platform) {
64
+ const home = getAgentEnv(env, "HOME", platform) || getAgentEnv(env, "USERPROFILE", platform) || homedir();
198
65
  return join(home, ".chorus", "dsh");
199
66
  }
200
67
 
201
- export function renderManagedDshConfig(bundleEntry = DSH_BUNDLE) {
202
- const quote = (value) => `'${String(value).replaceAll("'", "''")}'`;
203
- const personaEntry =
204
- bundleEntry === DSH_BUNDLE ? `${DSH_BUNDLE}/persona` : join(dirname(bundleEntry), "persona.mjs");
205
- const skillDir =
206
- bundleEntry === DSH_BUNDLE
207
- ? `"process.getBuiltinModule('node:path').join(process.getBuiltinModule('node:path').dirname(process.getBuiltinModule('node:module').createRequire(baseUrl).resolve('@chorus-aidlc/chorus-dsh/package.json')), 'skills')"`
208
- : quote(resolve(dirname(bundleEntry), "..", "skills"));
209
- return CONFIG_HEAD
210
- .replace("__CHORUS_BUNDLE__", quote(bundleEntry))
211
- .replace("__CHORUS_PERSONA__", quote(personaEntry))
212
- .replace(
213
- `"process.getBuiltinModule('node:path').join(process.getBuiltinModule('node:path').dirname(process.getBuiltinModule('node:module').createRequire(baseUrl).resolve('@chorus-aidlc/chorus-dsh/package.json')), 'skills')"`,
214
- skillDir,
215
- );
216
- }
217
-
218
- function resolveInstalledBundleEntry(projectDir) {
219
- const pkgPath = join(projectDir, "node_modules", "@chorus-aidlc", "chorus-dsh", "package.json");
220
- const pkg = readJson(pkgPath);
221
- if (!pkg) return null;
222
- const exported = pkg.exports?.["."]?.default ?? pkg.main;
223
- return typeof exported === "string" ? resolve(dirname(pkgPath), exported) : null;
224
- }
225
-
226
- export async function validateManagedDshImports(projectDir, opts = {}) {
227
- const requireFromConfig = createRequire(join(projectDir, MANAGED_CONFIG_FILE));
228
- const resolveImport = opts.resolveImport ?? ((name) => requireFromConfig.resolve(name));
229
- const importModule = opts.importModule ?? ((entry) => import(pathToFileURL(entry).href));
230
- const resolved = {};
231
- let usedBundleFallback = false;
232
-
233
- for (const name of REQUIRED_IMPORTS) {
234
- try {
235
- resolved[name] = resolveImport(name);
236
- } catch (error) {
237
- if (name !== DSH_BUNDLE) {
238
- throw new Error(`dsh managed import resolution failed for ${name}: ${errorText(error)}`);
239
- }
240
- const fallback =
241
- opts.resolveBundleEntry?.(projectDir) ?? resolveInstalledBundleEntry(projectDir);
242
- if (!fallback || !existsSync(fallback)) {
243
- throw new Error(`dsh managed bundle resolution failed: ${errorText(error)}`);
244
- }
245
- resolved[name] = fallback;
246
- usedBundleFallback = true;
247
- }
248
- }
249
-
250
- for (const [name, entry] of Object.entries(resolved)) {
251
- try {
252
- await importModule(entry);
253
- } catch (error) {
254
- throw new Error(`dsh managed import load failed for ${name}: ${errorText(error)}`);
255
- }
256
- }
257
- return {
258
- resolved,
259
- bundleEntry: resolved[DSH_BUNDLE],
260
- usedBundleFallback,
261
- };
68
+ /**
69
+ * Build the optional `--patch` overlay for a non-default provider. The base
70
+ * profile serves `deepseek-official` unchanged, so that (and an empty value)
71
+ * yields `null` no overlay, no `--patch`. For any other provider we emit a
72
+ * minimal overlay selecting it as the profile's default-model provider by
73
+ * targeting the base `agent-default-model` row (always present, so the tree
74
+ * still composes and the structural `initialize` probe still passes). Provider
75
+ * routing + credentials are exercised only on a live turn — a guarded extension
76
+ * point, not a verified path. Keep this small.
77
+ * @param {string} provider
78
+ * @returns {{ fileName: string, yaml: string } | null}
79
+ */
80
+ export function buildProviderPatch(provider) {
81
+ const value = typeof provider === "string" ? provider.trim() : "";
82
+ if (!value || value === DEFAULT_DSH_PROVIDER) return null;
83
+ const yaml =
84
+ `# Chorus-generated provider overlay (CHORUS_DSH_PROVIDER=${value}).\n` +
85
+ `# Applied after the profile layer via \`dsh --profile ${DSH_PROFILE} --patch\`.\n` +
86
+ `- id: agent-default-model\n` +
87
+ ` config:\n` +
88
+ ` provider: ${JSON.stringify(value)}\n`;
89
+ return { fileName: "chorus-provider.patch.yml", yaml };
262
90
  }
263
91
 
92
+ /** Windows npm/cmd shims need cmd.exe while retaining argv isolation. */
264
93
  function runCommand(command, argv, opts) {
265
94
  const platform = opts.platform ?? process.platform;
266
95
  const isCmd = platform === "win32" && /\.(cmd|bat)$/i.test(command);
267
- const executable = isCmd ? opts.env?.ComSpec || opts.env?.COMSPEC || "cmd.exe" : command;
96
+ const executable = isCmd ? getAgentEnv(opts.env ?? process.env, "COMSPEC", platform) || "cmd.exe" : command;
268
97
  const commandArgs = isCmd ? ["/d", "/s", "/c", command, ...argv] : argv;
269
98
  const result = spawnSync(executable, commandArgs, {
270
99
  cwd: opts.cwd,
@@ -276,63 +105,163 @@ function runCommand(command, argv, opts) {
276
105
  windowsHide: true,
277
106
  });
278
107
  if (result.error || result.status !== 0) {
279
- const detail = result.error?.message || result.stderr?.trim() || `exit ${result.status}`;
108
+ const detail = result.error ? safeSpawnError(result.error) : result.stderr?.trim() || `exit ${result.status}`;
280
109
  throw new Error(detail);
281
110
  }
282
111
  return result;
283
112
  }
284
113
 
285
- export function validateManagedDshComposition(configPath, opts = {}) {
114
+ /**
115
+ * Probe the external dsh runtime version (`dsh --version`) so the managed-profile
116
+ * fingerprint invalidates when the operator upgrades the dsh CLI — a stale profile
117
+ * composed against an older runtime must not be silently reused (reuse alone never
118
+ * re-runs compose). Fail-soft: an unreadable version yields "unknown" (stable per
119
+ * install) and never blocks preparation. Injectable via opts.runtimeVersion.
120
+ * @returns {string}
121
+ */
122
+ function resolveRuntimeVersion(dshPath, opts = {}) {
123
+ if (typeof opts.runtimeVersion === "string") return opts.runtimeVersion;
124
+ try {
125
+ const runner = opts.runCommand ?? runCommand;
126
+ const r = runner(dshPath, ["--version"], {
127
+ env: opts.env ?? process.env,
128
+ timeout: opts.versionTimeoutMs ?? 10_000,
129
+ platform: opts.platform,
130
+ });
131
+ return String(r.stdout ?? "").trim() || "unknown";
132
+ } catch {
133
+ return "unknown";
134
+ }
135
+ }
136
+
137
+ /**
138
+ * Cheap structural check that a prepared home actually carries the composed
139
+ * profile: its manifest lists the Chorus bundle and the package is installed.
140
+ * Runs on both a fresh prepare and every reuse (fast — no dsh spawn).
141
+ * @param {string} home managed DSH_HOME
142
+ */
143
+ export function validateManagedDshProfile(home, opts = {}) {
144
+ const pathExists = opts.profileExists ?? existsSync;
145
+ const readManifest = opts.readJson ?? readJson;
146
+ const profileDir = join(home, "profiles", DSH_PROFILE);
147
+ const manifest = readManifest(join(profileDir, "package.json"));
148
+ const bundles = manifest?.dsh?.profile?.bundles;
149
+ if (!Array.isArray(bundles) || !bundles.includes(DSH_BUNDLE)) {
150
+ throw new Error(`dsh managed profile is missing the ${DSH_BUNDLE} bundle layer`);
151
+ }
152
+ const bundlePkg = join(profileDir, "node_modules", ...DSH_BUNDLE.split("/"), "package.json");
153
+ if (!pathExists(bundlePkg)) {
154
+ throw new Error(`dsh managed profile did not install ${DSH_BUNDLE}`);
155
+ }
156
+ return { profileDir, bundles };
157
+ }
158
+
159
+ /**
160
+ * Drive one JSON-RPC `initialize` over stdin against `dsh --profile sdk` (with
161
+ * any provider `--patch`) and assert the SDK runtime answers with the expected
162
+ * identity. `initialize` makes no LLM/network call, so this needs no real
163
+ * credentials or provider routing — it structurally confirms the composed tree
164
+ * loads and the JSON-RPC server owns stdout. Probes with the CONFIGURED provider
165
+ * (+ its `--patch`) so a non-default provider whose LLM adapter is not mounted
166
+ * fails HERE at prepare (fail-fast) instead of silently at the first real wake.
167
+ * @param {string} home managed DSH_HOME
168
+ */
169
+ export function validateManagedDshComposition(home, opts = {}) {
286
170
  const dshPath = opts.dshPath;
287
- if (!dshPath) throw new Error("cannot validate dsh composition: dsh-jsonrpc-agent was not found");
288
- const env = {
289
- ...(opts.env ?? process.env),
171
+ if (!dshPath) throw new Error("cannot validate dsh composition: the dsh CLI was not found");
172
+ const env = overlayAgentEnv(opts.env ?? process.env, {
290
173
  CHORUS_DAEMON_HEADLESS: "1",
291
174
  CHORUS_URL: opts.creds?.url ?? "http://127.0.0.1",
292
175
  CHORUS_API_KEY: opts.creds?.apiKey ?? "cho_validation",
293
- DSH_CORDIS_CONFIG: configPath,
294
- DSH_CWD: dirname(configPath),
295
- };
296
- const request =
297
- `${JSON.stringify({ jsonrpc: "2.0", id: 1, method: "initialize", params: { cwd: dirname(configPath), provider: "deepseek-official", model: "deepseek-v4-flash" } })}\n`;
176
+ DSH_HOME: home,
177
+ DSH_CWD: home,
178
+ }, opts.platform);
179
+ const argv = ["--profile", DSH_PROFILE, ...(opts.patchPath ? ["--patch", opts.patchPath] : [])];
180
+ const request = `${JSON.stringify({
181
+ jsonrpc: "2.0",
182
+ id: 1,
183
+ method: "initialize",
184
+ params: { cwd: home, provider: opts.provider ?? DEFAULT_DSH_PROVIDER, model: "deepseek-v4-flash" },
185
+ })}\n`;
298
186
  const runner = opts.runCommand ?? runCommand;
299
- const result = runner(dshPath, [], {
300
- cwd: dirname(configPath),
187
+ const result = runner(dshPath, argv, {
188
+ cwd: home,
301
189
  env,
302
190
  input: request,
303
- timeout: opts.timeoutMs ?? 20_000,
191
+ timeout: opts.timeoutMs ?? 30_000,
304
192
  platform: opts.platform,
305
193
  });
306
- if (!String(result.stdout ?? "").includes('"id":1')) {
194
+ const stdout = String(result.stdout ?? "");
195
+ if (!stdout.includes('"id":1')) {
307
196
  throw new Error("dsh composition validation did not complete JSON-RPC initialization");
308
197
  }
198
+ if (!stdout.includes(RUNTIME_IDENTITY)) {
199
+ throw new Error("dsh composition validation returned an unexpected server identity");
200
+ }
309
201
  }
310
202
 
311
203
  function activeState(root, pathExists = existsSync) {
312
204
  const state = readJson(join(root, "active.json"));
313
- if (
314
- !state ||
315
- state.version !== STATE_VERSION ||
316
- typeof state.configPath !== "string" ||
317
- typeof state.runtimePath !== "string"
318
- ) return null;
319
- return pathExists(state.configPath) && pathExists(state.runtimePath) ? state : null;
205
+ if (!state || state.version !== STATE_VERSION || typeof state.home !== "string") return null;
206
+ if (!pathExists(state.home)) return null;
207
+ if (state.patchPath && !pathExists(state.patchPath)) return null;
208
+ return state;
320
209
  }
321
210
 
211
+ /**
212
+ * Ensure a validated managed dsh profile home exists and return where it lives.
213
+ * Reuses the last-known-good release when the fingerprint (profile + Chorus
214
+ * bundle spec + dsh RC + external dsh runtime version + provider) is unchanged;
215
+ * otherwise composes a fresh
216
+ * release in an isolated dir, validates it, and atomically flips active.json.
217
+ * A failed fresh prepare rolls back and leaves the prior marker intact.
218
+ *
219
+ * @returns {Promise<{ version:number, fingerprint:string, home:string,
220
+ * patchPath:(string|null), validatedAt:string, reused:boolean }>}
221
+ */
322
222
  export async function prepareManagedDshConfig(opts = {}) {
223
+ try {
224
+ return await prepareManagedDshConfigInternal(opts);
225
+ } catch (error) {
226
+ // Cover every failure path, including reuse validation and filesystem errors.
227
+ // Only fixed classifications/hints cross this boundary, never raw stderr.
228
+ throw new Error(redactedSetupError(error));
229
+ }
230
+ }
231
+
232
+ async function prepareManagedDshConfigInternal(opts) {
323
233
  const env = opts.env ?? process.env;
324
- const root = opts.root ?? managedDshRoot(env);
234
+ const platform = opts.platform ?? process.platform;
235
+ const root = opts.root ?? managedDshRoot(env, platform);
325
236
  const bundleVersion = opts.bundleVersion;
326
237
  if (!bundleVersion) throw new Error("dsh managed preparation requires a Chorus bundle version");
327
- const specs = packageSpecs({ bundleVersion, bundleSpec: opts.bundleSpec });
238
+ const dshPath = opts.dshPath;
239
+ if (!dshPath) {
240
+ throw new Error("dsh managed preparation requires the dsh CLI (install dsh or set CHORUS_DSH_PATH)");
241
+ }
242
+ // Bundle spec passed to `dsh plugin --profile sdk add`. Defaults to the
243
+ // published `@chorus-aidlc/chorus-dsh@<appVersion>`. `CHORUS_DSH_BUNDLE_SPEC`
244
+ // overrides it with any pnpm-installable spec — a local package dir, a packed
245
+ // tarball, or a pinned version — so a pre-publish local build can be composed
246
+ // and tested end-to-end against a real dsh runtime without publishing first.
247
+ // Unset in production. `opts.bundleSpec` (tests) still wins over the env.
248
+ const bundleSpec =
249
+ opts.bundleSpec ?? nonEmpty(getAgentEnv(env, "CHORUS_DSH_BUNDLE_SPEC", platform)) ?? `${DSH_BUNDLE}@${bundleVersion}`;
250
+ const provider = nonEmpty(getAgentEnv(env, "CHORUS_DSH_PROVIDER", platform)) ?? nonEmpty(getAgentEnv(env, "DSH_PROVIDER", platform)) ?? DEFAULT_DSH_PROVIDER;
251
+ const providerPatch = buildProviderPatch(provider);
252
+ // Bind the fingerprint to the ACTUAL external dsh runtime version: peers are a
253
+ // lenient range now, so a managed profile composed against an older `dsh` must
254
+ // be rebuilt when the operator upgrades the CLI — the reuse path never re-runs
255
+ // compose, so without this a runtime upgrade would silently reuse a stale tree.
256
+ const runtimeVersion = resolveRuntimeVersion(dshPath, opts);
328
257
  const fingerprint = createHash("sha256")
329
- .update(JSON.stringify({ version: STATE_VERSION, specs }))
258
+ .update(JSON.stringify({ version: STATE_VERSION, profile: DSH_PROFILE, bundleSpec, dshRc: DSH_RC_VERSION, runtimeVersion, provider }))
330
259
  .digest("hex")
331
260
  .slice(0, 16);
332
261
  const current = activeState(root, opts.statePathExists ?? existsSync);
333
262
 
334
263
  if (current?.fingerprint === fingerprint) {
335
- await (opts.validateImports ?? validateManagedDshImports)(dirname(current.configPath), opts);
264
+ await (opts.validateProfile ?? validateManagedDshProfile)(current.home, opts);
336
265
  return { ...current, reused: true };
337
266
  }
338
267
 
@@ -340,59 +269,56 @@ export async function prepareManagedDshConfig(opts = {}) {
340
269
  const markerTmp = join(root, `.active-${randomUUID()}.json`);
341
270
  mkdirSync(releaseDir, { recursive: true });
342
271
  try {
343
- writeFileSync(
344
- join(releaseDir, "package.json"),
345
- `${JSON.stringify({ private: true, type: "module", dependencies: specs }, null, 2)}\n`,
346
- { mode: 0o600 },
347
- );
348
- writeFileSync(join(releaseDir, ".npmrc"), "node-linker=hoisted\n", { mode: 0o600 });
349
-
350
- const install = opts.install ?? ((cwd) => runCommand(
351
- opts.packageManager ?? (opts.platform === "win32" ? "pnpm.cmd" : "pnpm"),
352
- ["install", "--prod", "--ignore-scripts", "--frozen-lockfile=false"],
353
- { cwd, env, timeout: opts.installTimeoutMs ?? 120_000, platform: opts.platform },
272
+ // Compose the managed profile with the EXTERNAL dsh CLI: `dsh plugin
273
+ // --profile sdk add <bundle> -w`. `-w` is required — the profile dir is a
274
+ // pnpm workspace root, so pnpm refuses a bare `add` (ERR_PNPM_ADDING_TO_ROOT).
275
+ // This initializes profiles/sdk (base + sdk-app), appends the Chorus bundle
276
+ // to its bundle list, and installs it plus its peers.
277
+ const runner = opts.runCommand ?? runCommand;
278
+ const install = opts.install ?? ((home) => runner(
279
+ dshPath,
280
+ ["plugin", "--profile", DSH_PROFILE, "add", bundleSpec, "-w"],
281
+ { cwd: home, env: overlayAgentEnv(env, { DSH_HOME: home }, platform), timeout: opts.installTimeoutMs ?? 300_000, platform: opts.platform },
354
282
  ));
355
283
  try {
356
284
  install(releaseDir);
357
285
  } catch (error) {
358
286
  throw new Error(
359
- `dsh managed package installation failed: ` +
360
- redactedErrorText(error, [env.CHORUS_API_KEY, opts.creds?.apiKey]),
287
+ `dsh managed profile installation failed: ` + redactedSetupError(error),
361
288
  );
362
289
  }
363
290
 
364
- const importResult = await (opts.validateImports ?? validateManagedDshImports)(releaseDir, opts);
365
- const bundleEntry = importResult.usedBundleFallback ? importResult.bundleEntry : DSH_BUNDLE;
366
- const configPath = join(releaseDir, MANAGED_CONFIG_FILE);
367
- const runtimePath = join(
368
- releaseDir,
369
- "node_modules",
370
- ".bin",
371
- opts.platform === "win32" ? "dsh-jsonrpc-agent.cmd" : "dsh-jsonrpc-agent",
372
- );
373
- if (!(opts.runtimeExists ?? existsSync)(runtimePath)) {
374
- throw new Error(`dsh managed runtime was not installed at ${runtimePath}`);
291
+ await (opts.validateProfile ?? validateManagedDshProfile)(releaseDir, opts);
292
+
293
+ let patchPath = null;
294
+ if (providerPatch) {
295
+ patchPath = join(releaseDir, providerPatch.fileName);
296
+ writeFileSync(patchPath, providerPatch.yaml, { mode: 0o600 });
375
297
  }
376
- writeFileSync(configPath, renderManagedDshConfig(bundleEntry), { mode: 0o600 });
377
298
 
378
299
  try {
379
- (opts.validateComposition ?? validateManagedDshComposition)(configPath, {
300
+ (opts.validateComposition ?? validateManagedDshComposition)(releaseDir, {
380
301
  ...opts,
381
- dshPath: runtimePath,
302
+ dshPath,
303
+ provider,
304
+ patchPath,
382
305
  });
383
306
  } catch (error) {
307
+ const hint =
308
+ provider !== DEFAULT_DSH_PROVIDER
309
+ ? ` (a non-default provider is configured — the managed sdk profile mounts only the ${DEFAULT_DSH_PROVIDER} adapter; a custom provider needs its adapter pre-composed, e.g. point CHORUS_DSH_HOME at your own sdk profile)`
310
+ : "";
384
311
  throw new Error(
385
- `dsh managed composition validation failed: ` +
386
- redactedErrorText(error, [env.CHORUS_API_KEY, opts.creds?.apiKey]),
312
+ `dsh managed composition validation failed${hint}: ` + redactedSetupError(error),
387
313
  );
388
314
  }
389
315
 
390
316
  const state = {
391
317
  version: STATE_VERSION,
392
318
  fingerprint,
393
- configPath,
394
- bundleEntry,
395
- runtimePath,
319
+ home: releaseDir,
320
+ patchPath,
321
+ runtimeVersion,
396
322
  validatedAt: new Date().toISOString(),
397
323
  };
398
324
  mkdirSync(root, { recursive: true });