@chorus-aidlc/chorus 0.17.3 → 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 (443) hide show
  1. package/.next/standalone/.next/BUILD_ID +1 -1
  2. package/.next/standalone/.next/app-build-manifest.json +327 -325
  3. package/.next/standalone/.next/app-path-routes-manifest.json +37 -37
  4. package/.next/standalone/.next/build-manifest.json +5 -5
  5. package/.next/standalone/.next/prerender-manifest.json +27 -27
  6. package/.next/standalone/.next/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 +1 -1
  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 +37 -37
  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/{1201.js → 3619.js} +2 -2
  289. package/.next/standalone/.next/server/chunks/{3630.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/6737.js +1 -0
  295. package/.next/standalone/.next/server/chunks/6753.js +3 -3
  296. package/.next/standalone/.next/server/chunks/679.js +1 -1
  297. package/.next/standalone/.next/server/chunks/731.js +1 -0
  298. package/.next/standalone/.next/server/chunks/7368.js +1 -1
  299. package/.next/standalone/.next/server/chunks/7530.js +1 -1
  300. package/.next/standalone/.next/server/chunks/7857.js +1 -0
  301. package/.next/standalone/.next/server/chunks/920.js +1 -1
  302. package/.next/standalone/.next/server/chunks/9213.js +1 -1
  303. package/.next/standalone/.next/server/chunks/9378.js +1 -1
  304. package/.next/standalone/.next/server/chunks/9931.js +1 -1
  305. package/.next/standalone/.next/server/middleware-build-manifest.js +1 -1
  306. package/.next/standalone/.next/server/middleware-manifest.json +5 -5
  307. package/.next/standalone/.next/server/pages/404.html +2 -2
  308. package/.next/standalone/.next/server/pages/500.html +1 -1
  309. package/.next/standalone/.next/server/server-reference-manifest.js +1 -1
  310. package/.next/standalone/.next/server/server-reference-manifest.json +1 -1
  311. package/.next/standalone/.next/static/chunks/11595.0afa1a540f681fb4.js +1 -0
  312. package/.next/standalone/.next/static/chunks/22705-324a191727ae45b7.js +1 -0
  313. package/.next/standalone/.next/static/chunks/33456.4a5f4712a7e78d8f.js +1 -0
  314. package/.next/standalone/.next/static/chunks/44216-3876e84f5b02d355.js +1 -0
  315. package/.next/standalone/.next/static/chunks/4860.5719e32b95be2d93.js +1 -0
  316. package/.next/standalone/.next/static/chunks/6528-a8a562ef7d26bb43.js +1 -0
  317. package/.next/standalone/.next/static/chunks/67439-7b339b28ed0ecfc6.js +1 -0
  318. package/.next/standalone/.next/static/chunks/79919-ae8bd8d8ec1e38ce.js +1 -0
  319. package/.next/standalone/.next/static/chunks/{46021-f5d072b0cbcb7fac.js → 82203-4ce5926624df7ed0.js} +1 -1
  320. package/.next/standalone/.next/static/chunks/94643-37ac7b8ef8ea5e75.js +1 -0
  321. package/.next/standalone/.next/static/chunks/99373.6c1509bfaf599741.js +1 -0
  322. package/.next/standalone/.next/static/chunks/99775-697e82ee04eac6b1.js +1 -0
  323. package/.next/standalone/.next/static/chunks/app/(dashboard)/layout-2fda722cdace8147.js +1 -0
  324. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/dashboard/{page-77b175e52a85f3cb.js → page-b45c42c536eff64b.js} +1 -1
  325. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/documents/[documentUuid]/page-792aba7fd6b6daa3.js +1 -0
  326. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/documents/page-800a979f12b73f27.js +1 -0
  327. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/graph/{page-69d3162667f85677.js → page-34de35f75aa71f6d.js} +1 -1
  328. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/proposals/[proposalUuid]/page-a16002aa2a911619.js +1 -0
  329. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/proposals/new/{page-a3f83031dfbafc81.js → page-e8030824994edf35.js} +1 -1
  330. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/proposals/page-4f7f1ddbaf79be8f.js +1 -0
  331. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/tasks/[taskUuid]/{page-3c7ff3a40a4615ac.js → page-349b0977f3c6209a.js} +1 -1
  332. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/tasks/{page-7b8e11fdc5b596d0.js → page-be43cb06112fce12.js} +1 -1
  333. package/.next/standalone/.next/static/chunks/app/(dashboard)/settings/page-6916e1abab42a6e6.js +1 -0
  334. package/.next/standalone/.next/static/chunks/app/onboarding/{page-0ce33b9327fe3d8c.js → page-c0090caae202eae5.js} +1 -1
  335. package/.next/standalone/.next/static/chunks/{webpack-dffb97a4feb8faba.js → webpack-cfb63dd1b416c92e.js} +1 -1
  336. package/.next/standalone/.next/static/css/75c761a5428611fa.css +1 -0
  337. package/.next/standalone/package.json +1 -1
  338. package/.next/standalone/public/chorus-plugin/.claude-plugin/plugin.json +2 -2
  339. package/.next/standalone/public/chorus-plugin/agents/code-reviewer.md +1 -0
  340. package/.next/standalone/public/chorus-plugin/agents/proposal-reviewer.md +12 -3
  341. package/.next/standalone/public/chorus-plugin/agents/task-reviewer.md +4 -0
  342. package/.next/standalone/public/chorus-plugin/bin/chorus-api.sh +1 -1
  343. package/.next/standalone/public/chorus-plugin/bin/on-post-submit-for-verify.sh +3 -3
  344. package/.next/standalone/public/chorus-plugin/bin/on-post-submit-proposal.sh +3 -3
  345. package/.next/standalone/public/chorus-plugin/bin/on-post-verify-task.sh +2 -2
  346. package/.next/standalone/public/chorus-plugin/bin/on-session-start.sh +39 -64
  347. package/.next/standalone/public/chorus-plugin/bin/resolve-spec-mode.sh +107 -0
  348. package/.next/standalone/public/chorus-plugin/bin/tests/test-resolver-drift.sh +46 -0
  349. package/.next/standalone/public/chorus-plugin/bin/tests/test-skill-harness-fidelity-negative.sh +328 -0
  350. package/.next/standalone/public/chorus-plugin/bin/tests/test-skill-harness-fidelity.sh +372 -0
  351. package/.next/standalone/public/chorus-plugin/bin/tests/test-spec-mode-resolution.sh +83 -0
  352. package/.next/standalone/public/chorus-plugin/skills/brainstorm/SKILL.md +1 -1
  353. package/.next/standalone/public/chorus-plugin/skills/chorus/SKILL.md +11 -6
  354. package/.next/standalone/public/chorus-plugin/skills/chorus-cli/SKILL.md +1 -1
  355. package/.next/standalone/public/chorus-plugin/skills/develop/SKILL.md +14 -9
  356. package/.next/standalone/public/chorus-plugin/skills/docs/SKILL.md +1 -1
  357. package/.next/standalone/public/chorus-plugin/skills/idea/SKILL.md +1 -1
  358. package/.next/standalone/public/chorus-plugin/skills/openspec-aware/SKILL.md +27 -31
  359. package/.next/standalone/public/chorus-plugin/skills/orchestrate/SKILL.md +11 -1
  360. package/.next/standalone/public/chorus-plugin/skills/proposal/SKILL.md +14 -7
  361. package/.next/standalone/public/chorus-plugin/skills/quick-dev/SKILL.md +6 -4
  362. package/.next/standalone/public/chorus-plugin/skills/review/SKILL.md +10 -8
  363. package/.next/standalone/public/chorus-plugin/skills/spec-lite/SKILL.md +147 -0
  364. package/.next/standalone/public/chorus-plugin/skills/yolo/SKILL.md +49 -34
  365. package/.next/standalone/public/kiro-plugin/.kiro/agents/chorus-code-reviewer.json +1 -1
  366. package/.next/standalone/public/kiro-plugin/.kiro/agents/chorus-proposal-reviewer.json +2 -1
  367. package/.next/standalone/public/kiro-plugin/.kiro/agents/chorus-task-reviewer.json +1 -1
  368. package/.next/standalone/public/kiro-plugin/.kiro/agents/chorus.md +1 -1
  369. package/.next/standalone/public/kiro-plugin/.kiro/skills/chorus-brainstorm/SKILL.md +1 -1
  370. package/.next/standalone/public/kiro-plugin/.kiro/skills/chorus-cli/SKILL.md +1 -1
  371. package/.next/standalone/public/kiro-plugin/.kiro/skills/chorus-develop/SKILL.md +9 -7
  372. package/.next/standalone/public/kiro-plugin/.kiro/skills/chorus-docs/SKILL.md +1 -1
  373. package/.next/standalone/public/kiro-plugin/.kiro/skills/chorus-idea/SKILL.md +1 -1
  374. package/.next/standalone/public/kiro-plugin/.kiro/skills/chorus-openspec-aware/SKILL.md +35 -27
  375. package/.next/standalone/public/kiro-plugin/.kiro/skills/chorus-orchestrate/SKILL.md +9 -1
  376. package/.next/standalone/public/kiro-plugin/.kiro/skills/chorus-proposal/SKILL.md +14 -7
  377. package/.next/standalone/public/kiro-plugin/.kiro/skills/chorus-quick-dev/SKILL.md +2 -2
  378. package/.next/standalone/public/kiro-plugin/.kiro/skills/chorus-review/SKILL.md +8 -8
  379. package/.next/standalone/public/kiro-plugin/.kiro/skills/chorus-spec-lite/SKILL.md +147 -0
  380. package/.next/standalone/public/kiro-plugin/.kiro/skills/chorus-yolo/SKILL.md +39 -25
  381. package/.next/standalone/public/kiro-plugin/.kiro/steering/chorus.md +11 -6
  382. package/.next/standalone/public/kiro-plugin/bin/chorus-api.sh +1 -1
  383. package/.next/standalone/public/kiro-plugin/bin/on-agent-spawn.sh +41 -0
  384. package/.next/standalone/public/kiro-plugin/bin/on-post-submit-for-verify.sh +3 -3
  385. package/.next/standalone/public/kiro-plugin/bin/on-post-submit-proposal.sh +3 -3
  386. package/.next/standalone/public/kiro-plugin/bin/on-post-verify-task.sh +2 -2
  387. package/.next/standalone/public/kiro-plugin/bin/resolve-spec-mode.sh +107 -0
  388. package/.next/standalone/public/kiro-plugin/manifest.txt +2 -0
  389. package/.next/standalone/public/skill/chorus/SKILL.md +11 -1
  390. package/.next/standalone/public/skill/code-reviewer-chorus/SKILL.md +1 -0
  391. package/.next/standalone/public/skill/develop-chorus/SKILL.md +1 -1
  392. package/.next/standalone/public/skill/orchestrate-chorus/SKILL.md +11 -1
  393. package/.next/standalone/public/skill/proposal-reviewer-chorus/SKILL.md +5 -2
  394. package/.next/standalone/public/skill/quick-dev-chorus/SKILL.md +1 -1
  395. package/.next/standalone/public/skill/review-chorus/SKILL.md +5 -3
  396. package/.next/standalone/public/skill/task-reviewer-chorus/SKILL.md +4 -0
  397. package/.next/standalone/public/skill/yolo-chorus/SKILL.md +23 -7
  398. package/README.ja.md +3 -3
  399. package/README.ko.md +3 -3
  400. package/README.md +3 -3
  401. package/README.zh.md +3 -3
  402. package/cli/agent-cli-config.mjs +323 -0
  403. package/cli/agent-launcher.mjs +44 -16
  404. package/cli/claude-spawner.mjs +22 -13
  405. package/cli/codex-spawner.mjs +23 -15
  406. package/cli/credentials.mjs +7 -0
  407. package/cli/daemon-config.mjs +14 -0
  408. package/cli/daemon.mjs +32 -6
  409. package/cli/dsh-managed-config.mjs +26 -28
  410. package/cli/dsh-spawner.mjs +23 -15
  411. package/cli/init/steps/credential-seed.mjs +1 -1
  412. package/cli/kiro-spawner.mjs +22 -15
  413. package/cli/launch-diagnostics.mjs +67 -0
  414. package/cli/login.mjs +17 -1
  415. package/cli/pi-spawner.mjs +19 -12
  416. package/cli/prompts.mjs +52 -2
  417. package/cli/spawner-select.mjs +6 -11
  418. package/package.json +1 -1
  419. package/.next/standalone/.next/server/chunks/1114.js +0 -1
  420. package/.next/standalone/.next/server/chunks/1155.js +0 -1
  421. package/.next/standalone/.next/server/chunks/6465.js +0 -1
  422. package/.next/standalone/.next/server/chunks/8105.js +0 -1
  423. package/.next/standalone/.next/server/chunks/8232.js +0 -1
  424. package/.next/standalone/.next/static/chunks/11595.f7c3ef5cd7fc8feb.js +0 -1
  425. package/.next/standalone/.next/static/chunks/33456.c81079032acc2966.js +0 -1
  426. package/.next/standalone/.next/static/chunks/45262-38b332523f00a223.js +0 -1
  427. package/.next/standalone/.next/static/chunks/4860.f0cfb1201191ae88.js +0 -1
  428. package/.next/standalone/.next/static/chunks/66609-64a01d5cb415465b.js +0 -1
  429. package/.next/standalone/.next/static/chunks/79919-c5a2a3fd8f5f9204.js +0 -1
  430. package/.next/standalone/.next/static/chunks/94394-38194b81b489275c.js +0 -1
  431. package/.next/standalone/.next/static/chunks/94643-f1bdf37fb3bb6adb.js +0 -1
  432. package/.next/standalone/.next/static/chunks/95225-96b44da3ebd6ddad.js +0 -1
  433. package/.next/standalone/.next/static/chunks/96482-2b3bdb2544d72e5a.js +0 -1
  434. package/.next/standalone/.next/static/chunks/99373.3c23ac2efbd4db02.js +0 -1
  435. package/.next/standalone/.next/static/chunks/app/(dashboard)/layout-66328332f62c7371.js +0 -1
  436. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/documents/[documentUuid]/page-87ceae13c4950fc9.js +0 -1
  437. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/documents/page-45e95154e546460e.js +0 -1
  438. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/proposals/[proposalUuid]/page-b7b2017e5be69564.js +0 -1
  439. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/proposals/page-8b06834ca0f663bb.js +0 -1
  440. package/.next/standalone/.next/static/chunks/app/(dashboard)/settings/page-efe5326c47aca9ca.js +0 -1
  441. package/.next/standalone/.next/static/css/1d9cf83f50b6db00.css +0 -1
  442. /package/.next/standalone/.next/static/{wuqYN129vOIGymh_NEdZe → IxKVu5zkFPTjSKAUR99yH}/_buildManifest.js +0 -0
  443. /package/.next/standalone/.next/static/{wuqYN129vOIGymh_NEdZe → IxKVu5zkFPTjSKAUR99yH}/_ssgManifest.js +0 -0
@@ -27,6 +27,8 @@
27
27
  // stream parse) and the PATH-walk shape of resolveClaudePath.
28
28
 
29
29
  import { spawn } from "node:child_process";
30
+ import { safeSpawnError } from "./launch-diagnostics.mjs";
31
+ import { validateAgentCliConfig, overlayAgentEnv, getAgentEnv, assertConfiguredShimArgs } from "./agent-cli-config.mjs";
30
32
  import { readFileSync, statSync } from "node:fs";
31
33
  import { homedir } from "node:os";
32
34
  import { join, win32 as pathWin32, posix as pathPosix } from "node:path";
@@ -49,8 +51,9 @@ const NOOP_LOGGER = { info() {}, warn() {}, error() {} };
49
51
  export function hasChorusMcpServer(deps = {}) {
50
52
  const env = deps.env ?? process.env;
51
53
  const readFile = deps.readFile ?? readFileSync;
52
- const home = deps.home ?? homedir();
53
- const configPath = join(env.CODEX_HOME || join(home, ".codex"), "config.toml");
54
+ const platform = deps.platform ?? process.platform;
55
+ const home = deps.home ?? getAgentEnv(env, "HOME", platform) ?? getAgentEnv(env, "USERPROFILE", platform) ?? homedir();
56
+ const configPath = join(getAgentEnv(env, "CODEX_HOME", platform) || join(home, ".codex"), "config.toml");
54
57
  try {
55
58
  const config = readFile(configPath, "utf8");
56
59
  return /^\s*\[mcp_servers\.chorus\]\s*(?:#.*)?$/m.test(config);
@@ -148,14 +151,15 @@ export function resolveCodexPath(deps = {}) {
148
151
  }
149
152
  });
150
153
 
151
- if (env.CHORUS_CODEX_PATH && isFile(env.CHORUS_CODEX_PATH)) {
152
- return env.CHORUS_CODEX_PATH;
154
+ const override = getAgentEnv(env, "CHORUS_CODEX_PATH", platform);
155
+ if (override && isFile(override)) {
156
+ return override;
153
157
  }
154
158
 
155
159
  const isWin = platform === "win32";
156
160
  const p = isWin ? pathWin32 : pathPosix;
157
161
  const names = isWin ? ["codex.cmd", "codex.exe", "codex"] : ["codex"];
158
- const pathVar = env.PATH || env.Path || "";
162
+ const pathVar = getAgentEnv(env, "PATH", platform) || env.Path || "";
159
163
  const dirs = pathVar.split(p.delimiter).filter(Boolean);
160
164
  for (const dir of dirs) {
161
165
  for (const name of names) {
@@ -178,7 +182,7 @@ export function resolveSpawnCommand(codexPath, args, platform = process.platform
178
182
  const isWin = platform === "win32";
179
183
  const lower = codexPath.toLowerCase();
180
184
  if (isWin && (lower.endsWith(".cmd") || lower.endsWith(".bat"))) {
181
- const comspec = env.ComSpec || env.COMSPEC || "cmd.exe";
185
+ const comspec = getAgentEnv(env, "COMSPEC", platform) || "cmd.exe";
182
186
  return { command: comspec, argv: ["/d", "/s", "/c", codexPath, ...args] };
183
187
  }
184
188
  return { command: codexPath, argv: args };
@@ -210,6 +214,8 @@ export class CodexSpawner {
210
214
  this.permissionMode = opts.permissionMode ?? "chorus";
211
215
  this.creds = opts.creds ?? null;
212
216
  this.platform = opts.platform ?? process.platform;
217
+ this.cliConfig = validateAgentCliConfig(opts.cliConfig, "codex", opts.label);
218
+ this.env = overlayAgentEnv(opts.env ?? process.env, this.cliConfig.env, this.platform);
213
219
  this.getThreadIdFn = opts.getThreadIdFn ?? defaultGetThreadId;
214
220
  this.setThreadIdFn = opts.setThreadIdFn ?? defaultSetThreadId;
215
221
  this.getUsageSnapshotFn = opts.getUsageSnapshotFn ?? defaultGetUsageSnapshot;
@@ -246,7 +252,7 @@ export class CodexSpawner {
246
252
  // instead of publishing the entire historical cumulative total.
247
253
  let needsUsageSeed = Boolean(knownThreadId && !previousUsage);
248
254
 
249
- const codexPath = this.codexPath ?? this.resolveCodexPathFn();
255
+ const codexPath = this.codexPath ?? this.resolveCodexPathFn({ env: this.env, platform: this.platform });
250
256
  if (!codexPath) {
251
257
  // No crash — surface visibly and resolve with a failure result.
252
258
  this.logger.error("[Chorus] cannot locate the `codex` executable on PATH; skipping wake");
@@ -255,15 +261,17 @@ export class CodexSpawner {
255
261
 
256
262
  if (!this.mcpConfigChecked) {
257
263
  this.mcpConfigChecked = true;
258
- if (!this.hasChorusMcpServerFn()) {
264
+ if (!this.hasChorusMcpServerFn({ env: this.env, platform: this.platform })) {
259
265
  this.logger.warn(
260
266
  "[Chorus] Codex config has no [mcp_servers.chorus] entry; wake will continue without Chorus MCP tools",
261
267
  );
262
268
  }
263
269
  }
264
270
 
265
- const args = buildCodexArgs({ isNew, threadId: knownThreadId, permissionMode: this.permissionMode });
266
- const { command, argv } = resolveSpawnCommand(codexPath, args, this.platform);
271
+ assertConfiguredShimArgs(codexPath, this.cliConfig.args, this.platform);
272
+ const args = [...buildCodexArgs({ isNew, threadId: knownThreadId, permissionMode: this.permissionMode }), ...this.cliConfig.args,
273
+ ...(this.cliConfig.args.length ? ["-"] : [])];
274
+ const { command, argv } = resolveSpawnCommand(codexPath, args, this.platform, this.env);
267
275
 
268
276
  // POSIX: detached process group so the interrupt path can group-kill the tree
269
277
  // (codex exec forks child shells for tools). Windows uses taskkill /T. stdio
@@ -273,7 +281,7 @@ export class CodexSpawner {
273
281
  // Export the daemon's resolved connection pair for both Codex MCP auth and
274
282
  // SessionStart hooks. Explicitly overwrite inherited values so the hook and
275
283
  // daemon cannot disagree about which Chorus instance this wake belongs to.
276
- const childEnv = { ...process.env, CHORUS_DAEMON_HEADLESS: "1" };
284
+ const childEnv = { ...this.env, CHORUS_DAEMON_HEADLESS: "1" };
277
285
  if (this.creds) {
278
286
  if (this.creds.url) childEnv.CHORUS_URL = this.creds.url;
279
287
  if (this.creds.apiKey) childEnv.CHORUS_API_KEY = this.creds.apiKey;
@@ -294,8 +302,8 @@ export class CodexSpawner {
294
302
  detached,
295
303
  windowsHide: true,
296
304
  });
297
- } catch (err) {
298
- this.logger.error(`[Chorus] failed to spawn codex: ${err}`);
305
+ } catch (error) {
306
+ this.logger.error(`[Chorus] failed to spawn codex: ${safeSpawnError(error)}`);
299
307
  resolve({ sessionId: anchor, backendSessionId: knownThreadId, exitCode: null, isNew });
300
308
  return;
301
309
  }
@@ -357,8 +365,8 @@ export class CodexSpawner {
357
365
  if (text) this.logger.warn(`[Chorus] codex stderr: ${text}`);
358
366
  });
359
367
 
360
- child.on("error", (err) => {
361
- this.logger.error(`[Chorus] codex process error: ${err}`);
368
+ child.on("error", (error) => {
369
+ this.logger.error(`[Chorus] codex process error: ${safeSpawnError(error)}`);
362
370
  resolve({ sessionId: anchor, backendSessionId: observedThreadId, exitCode: null, isNew });
363
371
  });
364
372
 
@@ -19,6 +19,7 @@
19
19
  import { readFileSync } from "node:fs";
20
20
  import { homedir } from "node:os";
21
21
  import { join, resolve } from "node:path";
22
+ import { rejectSharedCliConfig } from "./agent-cli-config.mjs";
22
23
 
23
24
  /** Absolute path to the login file written by `chorus login`. */
24
25
  export function loginFilePath() {
@@ -425,6 +426,7 @@ export function resolveLaunchAgent(flags = {}, deps = {}) {
425
426
  const wanted = nonEmpty(flags.name) ?? nonEmpty(flags.agent) ?? nonEmpty(env.CHORUS_AGENT_PROFILE);
426
427
 
427
428
  const file = readJson(loginPath);
429
+ rejectSharedCliConfig(file);
428
430
  const agentEntries =
429
431
  file && Array.isArray(file.agents)
430
432
  ? file.agents.filter((a) => a && typeof a === "object")
@@ -448,6 +450,8 @@ export function resolveLaunchAgent(flags = {}, deps = {}) {
448
450
  agentUuid: nonEmpty(entry.agentUuid),
449
451
  agentName: nonEmpty(entry.agentName) ?? nonEmpty(entry.name),
450
452
  agentType: nonEmpty(entry.agentType),
453
+ args: entry.args,
454
+ env: entry.env,
451
455
  }));
452
456
  const labels = resolved.map((a) => a.label).join(", ");
453
457
 
@@ -479,6 +483,9 @@ export function resolveLaunchAgent(flags = {}, deps = {}) {
479
483
  agentUuid: selected.agentUuid,
480
484
  agentName: selected.agentName,
481
485
  agentType: selected.agentType,
486
+ // Validation uses the launcher's effective --type, not the stored classification.
487
+ args: selected.args,
488
+ env: selected.env,
482
489
  label: selected.label,
483
490
  };
484
491
  }
@@ -18,6 +18,14 @@ import { isAbsolute, resolve as resolvePath } from "node:path";
18
18
  import { loginFilePath, resolveCredentials, resolveCredentialDefaults } from "./credentials.mjs";
19
19
  import { resolveAgentType, KNOWN_AGENTS } from "./daemon-agent.mjs";
20
20
  import { resolvePermissionMode } from "./daemon-permission-mode.mjs";
21
+ import { rejectSharedCliConfig, validateAgentCliConfig } from "./agent-cli-config.mjs";
22
+
23
+ /** Read only the flat profile customization; also used by the legacy startup path. */
24
+ export function resolveFlatAgentCliConfig(type, deps = {}) {
25
+ const file = (deps.readJson ?? readJsonSafe)(deps.loginPath ?? loginFilePath());
26
+ rejectSharedCliConfig(file);
27
+ return validateAgentCliConfig(file ?? {}, type, "agent");
28
+ }
21
29
 
22
30
  /** Built-in default escalation window (ms) — matches the spec's 10 seconds. */
23
31
  export const DEFAULT_SIGINT_TIMEOUT_MS = 10_000;
@@ -307,6 +315,8 @@ function positiveInt(value) {
307
315
  * @property {string} url Chorus server URL for this agent.
308
316
  * @property {string} apiKey This agent's `cho_` API key.
309
317
  * @property {string} agentType Backend: claude-code | codex | kiro | dsh | offline.
318
+ * @property {string[]} args Literal extra backend arguments (per-agent only).
319
+ * @property {Record<string,string>} env Literal child environment overrides (per-agent only).
310
320
  * @property {boolean} [daemonWake] Wake opt-in for a wakeable backend; only
311
321
  * `false` disables (absent/true ⇒ woken).
312
322
  * @property {Array<string|undefined>} cwds Served paths (`undefined` ⇒ process cwd).
@@ -344,6 +354,8 @@ export function resolveAgentConfigs(flags = {}, deps = {}) {
344
354
  const home = deps.home ?? homedir();
345
355
  const file = readJson(loginPath);
346
356
 
357
+ rejectSharedCliConfig(file);
358
+
347
359
  // Global default permission posture; a per-agent `permissionMode` overrides it.
348
360
  // needConfirm/hasAck is vestigial, so isTTY/hasAck do not affect the resolved mode.
349
361
  const defaultPermissionMode =
@@ -365,6 +377,7 @@ export function resolveAgentConfigs(flags = {}, deps = {}) {
365
377
  url: creds.url,
366
378
  apiKey: creds.apiKey,
367
379
  agentType: at.agent,
380
+ ...validateAgentCliConfig(file ?? {}, at.agent, "agent"),
368
381
  cwds: resolveDaemonCwds(flags, deps),
369
382
  permissionMode: defaultPermissionMode,
370
383
  maxConcurrency: positiveInt(file?.maxConcurrency) ?? DEFAULT_MAX_CONCURRENCY,
@@ -449,6 +462,7 @@ export function resolveAgentConfigs(flags = {}, deps = {}) {
449
462
  url,
450
463
  apiKey,
451
464
  agentType,
465
+ ...validateAgentCliConfig(entry, agentType, label),
452
466
  cwds,
453
467
  permissionMode,
454
468
  maxConcurrency,
package/cli/daemon.mjs CHANGED
@@ -40,12 +40,13 @@ import { EventRouter } from "./event-router.mjs";
40
40
  import { WakeQueue } from "./wake-queue.mjs";
41
41
  import { Waker } from "./waker.mjs";
42
42
  import { LineageResolver } from "./lineage.mjs";
43
- import { resolveClaudePath } from "./claude-spawner.mjs";
43
+ import { resolveClaudePath, isNewSession } from "./claude-spawner.mjs";
44
44
  import { resolveCodexPath } from "./codex-spawner.mjs";
45
45
  import { resolveDshPath } from "./dsh-spawner.mjs";
46
46
  import { prepareManagedDshConfig } from "./dsh-managed-config.mjs";
47
47
  import { resolveKiroPath } from "./kiro-spawner.mjs";
48
48
  import { selectSpawner } from "./spawner-select.mjs";
49
+ import { overlayAgentEnv } from "./agent-cli-config.mjs";
49
50
  import {
50
51
  createExecutionUploadHooks,
51
52
  createTranscriptUploadHooks,
@@ -61,6 +62,7 @@ import {
61
62
  resolveDaemonCwds,
62
63
  resolveBrowseRoots,
63
64
  resolveAgentConfigs,
65
+ resolveFlatAgentCliConfig,
64
66
  hasConfiguredAgents,
65
67
  } from "./daemon-config.mjs";
66
68
  import { discoverDirectories, validateDirectory } from "./directory-discovery.mjs";
@@ -157,6 +159,10 @@ export function buildDaemon(creds, deps = {}) {
157
159
  // passed through so the Codex backend can export the daemon key into the woken
158
160
  // process env (the Claude backend ignores creds — it gets its key via --mcp-config).
159
161
  const spawner = deps.spawner ?? selectSpawner(agentType, {
162
+ ...deps.spawnerOptions,
163
+ cliConfig: deps.cliConfig,
164
+ env: deps.env,
165
+ label: deps.label,
160
166
  logger,
161
167
  permissionMode,
162
168
  creds,
@@ -306,6 +312,7 @@ export function buildDaemon(creds, deps = {}) {
306
312
  creds,
307
313
  lineage,
308
314
  spawner,
315
+ isNewSessionFn: (sessionId, runCwd) => isNewSession(sessionId, runCwd, { env: spawner.env, platform: spawner.platform }),
309
316
  cwd: boundCwd,
310
317
  hooks,
311
318
  logger,
@@ -664,6 +671,8 @@ export function buildMultiAgentDaemon(agentConfigs, deps = {}) {
664
671
  logger,
665
672
  permissionMode: cfg.permissionMode,
666
673
  agentType: cfg.agentType,
674
+ cliConfig: { args: cfg.args, env: cfg.env },
675
+ label: cfg.label,
667
676
  cwds: cfg.cwds,
668
677
  cwd: undefined,
669
678
  maxConcurrency: cfg.maxConcurrency,
@@ -862,6 +871,19 @@ export async function runDaemon(flags = {}, deps = {}) {
862
871
  return handleLifecycleAction(action, { log, errLog, lifecycle, service, pfDeps });
863
872
  }
864
873
 
874
+ // Validate flat customization before credential/network preflight, including
875
+ // the detach path. Lifecycle-only actions above do not launch an agent.
876
+ const multiAgent = hasConfiguredAgents({ readJson: deps.readJson, loginPath: deps.loginPath });
877
+ let cliConfig;
878
+ if (!multiAgent) {
879
+ try {
880
+ cliConfig = resolveFlatAgentCliConfig(agentType, { readJson: deps.readJson, loginPath: deps.loginPath });
881
+ } catch (error) {
882
+ errLog(`[Chorus] ${error.message}`);
883
+ return 1;
884
+ }
885
+ }
886
+
865
887
  // `-d` / --detach: complete any interactive preflight in THIS foreground process
866
888
  // (which holds the TTY), then spawn the daemon detached and return. The detached
867
889
  // child re-enters runDaemon with the DETACHED_ENV marker set, so it skips the
@@ -889,7 +911,7 @@ export async function runDaemon(flags = {}, deps = {}) {
889
911
  // credential preflight (interactive credential completion is a single-agent
890
912
  // affordance). Each agent authenticates on its own key; a failure is isolated
891
913
  // (logged + that agent skipped) so the rest still serve.
892
- if (hasConfiguredAgents({ readJson: deps.readJson, loginPath: deps.loginPath })) {
914
+ if (multiAgent) {
893
915
  const buildMulti = deps.buildMulti ?? buildMultiAgentDaemon;
894
916
  let agentConfigs;
895
917
  try {
@@ -950,6 +972,7 @@ export async function runDaemon(flags = {}, deps = {}) {
950
972
  const multiDaemon = buildMulti(okConfigs, {
951
973
  logger: { info: log, warn: errLog, error: errLog },
952
974
  verbose,
975
+ env,
953
976
  fetchImpl: deps.fetchImpl,
954
977
  killer: deps.killer,
955
978
  sseListener: deps.sseListener,
@@ -1002,14 +1025,15 @@ export async function runDaemon(flags = {}, deps = {}) {
1002
1025
  // arrives. The resolved path (or absence) is shown in the banner below. Each
1003
1026
  // backend probes its own binary, including the `dsh` CLI for dsh, so the
1004
1027
  // startup banner and warning report the selected runtime rather than Claude.
1028
+ const discoveryEnv = overlayAgentEnv(env, cliConfig.env);
1005
1029
  const cliPath =
1006
1030
  agentType === "codex"
1007
- ? findCodex()
1031
+ ? findCodex({ env: discoveryEnv })
1008
1032
  : agentType === "kiro"
1009
- ? findKiro()
1033
+ ? findKiro({ env: discoveryEnv })
1010
1034
  : agentType === "dsh"
1011
- ? findDsh()
1012
- : findClaude();
1035
+ ? findDsh({ env: discoveryEnv })
1036
+ : findClaude({ env: discoveryEnv });
1013
1037
 
1014
1038
  // The daemon.json the layered config readers (credentials, sigint timeout, cwds)
1015
1039
  // consult. Surfacing its absolute path + presence in the banner makes it obvious
@@ -1068,6 +1092,8 @@ export async function runDaemon(flags = {}, deps = {}) {
1068
1092
  logger: { info: log, warn: errLog, error: errLog },
1069
1093
  permissionMode,
1070
1094
  agentType,
1095
+ cliConfig,
1096
+ env,
1071
1097
  verbose,
1072
1098
  sigintTimeoutMs,
1073
1099
  cwds,
@@ -20,6 +20,8 @@
20
20
  // chorus-dsh-lifecycle plugin's documented fallback also reads $DSH_HOME/.env).
21
21
 
22
22
  import { spawnSync } from "node:child_process";
23
+ import { safeSpawnError, redactedSetupError } from "./launch-diagnostics.mjs";
24
+ import { getAgentEnv, overlayAgentEnv } from "./agent-cli-config.mjs";
23
25
  import { createHash, randomUUID } from "node:crypto";
24
26
  import {
25
27
  existsSync,
@@ -46,22 +48,10 @@ export const DEFAULT_DSH_PROVIDER = "deepseek-official";
46
48
  // check in activeState() and is transparently re-prepared.
47
49
  const STATE_VERSION = 2;
48
50
 
49
- function errorText(error) {
50
- return error instanceof Error ? error.message : String(error);
51
- }
52
-
53
51
  function nonEmpty(value) {
54
52
  return typeof value === "string" && value.trim() ? value.trim() : null;
55
53
  }
56
54
 
57
- function redactedErrorText(error, values = []) {
58
- let text = errorText(error);
59
- for (const value of values) {
60
- if (typeof value === "string" && value) text = text.replaceAll(value, "[REDACTED]");
61
- }
62
- return text;
63
- }
64
-
65
55
  function readJson(path) {
66
56
  try {
67
57
  return JSON.parse(readFileSync(path, "utf8"));
@@ -70,8 +60,8 @@ function readJson(path) {
70
60
  }
71
61
  }
72
62
 
73
- export function managedDshRoot(env = process.env) {
74
- 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();
75
65
  return join(home, ".chorus", "dsh");
76
66
  }
77
67
 
@@ -103,7 +93,7 @@ export function buildProviderPatch(provider) {
103
93
  function runCommand(command, argv, opts) {
104
94
  const platform = opts.platform ?? process.platform;
105
95
  const isCmd = platform === "win32" && /\.(cmd|bat)$/i.test(command);
106
- 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;
107
97
  const commandArgs = isCmd ? ["/d", "/s", "/c", command, ...argv] : argv;
108
98
  const result = spawnSync(executable, commandArgs, {
109
99
  cwd: opts.cwd,
@@ -115,7 +105,7 @@ function runCommand(command, argv, opts) {
115
105
  windowsHide: true,
116
106
  });
117
107
  if (result.error || result.status !== 0) {
118
- 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}`;
119
109
  throw new Error(detail);
120
110
  }
121
111
  return result;
@@ -179,14 +169,13 @@ export function validateManagedDshProfile(home, opts = {}) {
179
169
  export function validateManagedDshComposition(home, opts = {}) {
180
170
  const dshPath = opts.dshPath;
181
171
  if (!dshPath) throw new Error("cannot validate dsh composition: the dsh CLI was not found");
182
- const env = {
183
- ...(opts.env ?? process.env),
172
+ const env = overlayAgentEnv(opts.env ?? process.env, {
184
173
  CHORUS_DAEMON_HEADLESS: "1",
185
174
  CHORUS_URL: opts.creds?.url ?? "http://127.0.0.1",
186
175
  CHORUS_API_KEY: opts.creds?.apiKey ?? "cho_validation",
187
176
  DSH_HOME: home,
188
177
  DSH_CWD: home,
189
- };
178
+ }, opts.platform);
190
179
  const argv = ["--profile", DSH_PROFILE, ...(opts.patchPath ? ["--patch", opts.patchPath] : [])];
191
180
  const request = `${JSON.stringify({
192
181
  jsonrpc: "2.0",
@@ -231,8 +220,19 @@ function activeState(root, pathExists = existsSync) {
231
220
  * patchPath:(string|null), validatedAt:string, reused:boolean }>}
232
221
  */
233
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) {
234
233
  const env = opts.env ?? process.env;
235
- const root = opts.root ?? managedDshRoot(env);
234
+ const platform = opts.platform ?? process.platform;
235
+ const root = opts.root ?? managedDshRoot(env, platform);
236
236
  const bundleVersion = opts.bundleVersion;
237
237
  if (!bundleVersion) throw new Error("dsh managed preparation requires a Chorus bundle version");
238
238
  const dshPath = opts.dshPath;
@@ -246,8 +246,8 @@ export async function prepareManagedDshConfig(opts = {}) {
246
246
  // and tested end-to-end against a real dsh runtime without publishing first.
247
247
  // Unset in production. `opts.bundleSpec` (tests) still wins over the env.
248
248
  const bundleSpec =
249
- opts.bundleSpec ?? nonEmpty(env.CHORUS_DSH_BUNDLE_SPEC) ?? `${DSH_BUNDLE}@${bundleVersion}`;
250
- const provider = nonEmpty(env.CHORUS_DSH_PROVIDER) ?? nonEmpty(env.DSH_PROVIDER) ?? DEFAULT_DSH_PROVIDER;
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
251
  const providerPatch = buildProviderPatch(provider);
252
252
  // Bind the fingerprint to the ACTUAL external dsh runtime version: peers are a
253
253
  // lenient range now, so a managed profile composed against an older `dsh` must
@@ -278,14 +278,13 @@ export async function prepareManagedDshConfig(opts = {}) {
278
278
  const install = opts.install ?? ((home) => runner(
279
279
  dshPath,
280
280
  ["plugin", "--profile", DSH_PROFILE, "add", bundleSpec, "-w"],
281
- { cwd: home, env: { ...env, DSH_HOME: home }, timeout: opts.installTimeoutMs ?? 300_000, platform: opts.platform },
281
+ { cwd: home, env: overlayAgentEnv(env, { DSH_HOME: home }, platform), timeout: opts.installTimeoutMs ?? 300_000, platform: opts.platform },
282
282
  ));
283
283
  try {
284
284
  install(releaseDir);
285
285
  } catch (error) {
286
286
  throw new Error(
287
- `dsh managed profile installation failed: ` +
288
- redactedErrorText(error, [env.CHORUS_API_KEY, opts.creds?.apiKey]),
287
+ `dsh managed profile installation failed: ` + redactedSetupError(error),
289
288
  );
290
289
  }
291
290
 
@@ -307,11 +306,10 @@ export async function prepareManagedDshConfig(opts = {}) {
307
306
  } catch (error) {
308
307
  const hint =
309
308
  provider !== DEFAULT_DSH_PROVIDER
310
- ? ` (provider "${provider}" is non-default — 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)`
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)`
311
310
  : "";
312
311
  throw new Error(
313
- `dsh managed composition validation failed${hint}: ` +
314
- redactedErrorText(error, [env.CHORUS_API_KEY, opts.creds?.apiKey]),
312
+ `dsh managed composition validation failed${hint}: ` + redactedSetupError(error),
315
313
  );
316
314
  }
317
315
 
@@ -2,6 +2,8 @@
2
2
  // session are created per wake; no dsh session state is persisted by Chorus.
3
3
 
4
4
  import { spawn } from "node:child_process";
5
+ import { safeSpawnError, redactedSetupError } from "./launch-diagnostics.mjs";
6
+ import { validateAgentCliConfig, overlayAgentEnv, getAgentEnv, assertConfiguredShimArgs } from "./agent-cli-config.mjs";
5
7
  import { randomUUID } from "node:crypto";
6
8
  import { statSync } from "node:fs";
7
9
  import { win32 as pathWin32, posix as pathPosix } from "node:path";
@@ -36,13 +38,13 @@ export function resolveDshPath(deps = {}) {
36
38
  const env = deps.env ?? process.env;
37
39
  const platform = deps.platform ?? process.platform;
38
40
  const fileProbe = deps.isFile ?? isFile;
39
- const override = nonEmpty(env.CHORUS_DSH_PATH);
41
+ const override = nonEmpty(getAgentEnv(env, "CHORUS_DSH_PATH", platform));
40
42
  if (override && fileProbe(override)) return override;
41
43
 
42
44
  const windows = platform === "win32";
43
45
  const path = windows ? pathWin32 : pathPosix;
44
46
  const names = windows ? ["dsh.cmd", "dsh.exe", "dsh"] : ["dsh"];
45
- const dirs = (env.PATH || env.Path || "").split(path.delimiter).filter(Boolean);
47
+ const dirs = (getAgentEnv(env, "PATH", platform) || env.Path || "").split(path.delimiter).filter(Boolean);
46
48
  for (const dir of dirs) {
47
49
  for (const name of names) {
48
50
  const candidate = path.join(dir, name);
@@ -58,8 +60,8 @@ export function resolveDshPath(deps = {}) {
58
60
  * profile preparation entirely (the escape hatch replacing the old
59
61
  * DSH_CORDIS_CONFIG override — which is gone with the removed cordis.yml model).
60
62
  */
61
- export function resolveDshHome(env = process.env) {
62
- return nonEmpty(env.CHORUS_DSH_HOME);
63
+ export function resolveDshHome(env = process.env, platform = process.platform) {
64
+ return nonEmpty(getAgentEnv(env, "CHORUS_DSH_HOME", platform)) ?? nonEmpty(getAgentEnv(env, "DSH_HOME", platform));
63
65
  }
64
66
 
65
67
  /** Windows npm command shims need cmd.exe while retaining argv isolation. */
@@ -67,7 +69,7 @@ export function resolveDshSpawnCommand(dshPath, platform = process.platform, env
67
69
  const lower = dshPath.toLowerCase();
68
70
  if (platform === "win32" && (lower.endsWith(".cmd") || lower.endsWith(".bat"))) {
69
71
  return {
70
- command: env.ComSpec || env.COMSPEC || "cmd.exe",
72
+ command: getAgentEnv(env, "COMSPEC", platform) || "cmd.exe",
71
73
  argv: ["/d", "/s", "/c", dshPath],
72
74
  };
73
75
  }
@@ -139,7 +141,8 @@ export class DshSpawner {
139
141
  this.logger = opts.logger ?? NOOP_LOGGER;
140
142
  this.creds = opts.creds ?? null;
141
143
  this.platform = opts.platform ?? process.platform;
142
- this.env = opts.env ?? process.env;
144
+ this.cliConfig = validateAgentCliConfig(opts.cliConfig, "dsh", opts.label);
145
+ this.env = overlayAgentEnv(opts.env ?? process.env, this.cliConfig.env, this.platform);
143
146
  this.bundleVersion = opts.bundleVersion ?? null;
144
147
  this.prepareManagedConfigFn = opts.prepareManagedConfigFn ?? prepareManagedDshConfig;
145
148
  this.timeoutMs = opts.timeoutMs ?? positiveInt(this.env.CHORUS_DSH_TIMEOUT_MS, DEFAULT_DSH_TIMEOUT_MS);
@@ -150,7 +153,7 @@ export class DshSpawner {
150
153
 
151
154
  async wake({ prompt, sessionId: anchor, cwd, onMessage, onChild }) {
152
155
  const dshPath = this.dshPath ?? this.resolveDshPathFn({ env: this.env, platform: this.platform });
153
- let dshHome = resolveDshHome(this.env);
156
+ let dshHome = resolveDshHome(this.env, this.platform);
154
157
  let patchPath = null;
155
158
  const result = (backendSessionId, exitCode) => ({
156
159
  sessionId: backendSessionId || anchor || "",
@@ -165,10 +168,12 @@ export class DshSpawner {
165
168
  );
166
169
  return result(null, null);
167
170
  }
171
+ assertConfiguredShimArgs(dshPath, this.cliConfig.args, this.platform);
168
172
  if (!dshHome) {
169
173
  try {
170
174
  const managed = await this.prepareManagedConfigFn({
171
175
  env: this.env,
176
+ platform: this.platform,
172
177
  bundleVersion: this.bundleVersion,
173
178
  dshPath,
174
179
  creds: this.creds,
@@ -176,22 +181,24 @@ export class DshSpawner {
176
181
  dshHome = managed.home;
177
182
  patchPath = managed.patchPath ?? null;
178
183
  } catch (error) {
179
- this.logger.error(`[Chorus] cannot prepare managed dsh profile: ${errorText(error)}`);
184
+ const detail = redactedSetupError(error);
185
+ this.logger.error(`[Chorus] cannot prepare managed dsh profile: ${detail}`);
180
186
  return result(null, null);
181
187
  }
188
+ } else {
189
+ this.logger.info("[Chorus] using existing DSH_HOME profile, skipping managed preparation");
182
190
  }
183
191
 
184
192
  const dshSessionId = `chorus-${this.uuidFn().replaceAll("-", "")}`;
185
193
  const provider =
186
- nonEmpty(this.env.CHORUS_DSH_PROVIDER) ?? nonEmpty(this.env.DSH_PROVIDER) ?? "deepseek-official";
194
+ nonEmpty(getAgentEnv(this.env, "CHORUS_DSH_PROVIDER", this.platform)) ?? nonEmpty(getAgentEnv(this.env, "DSH_PROVIDER", this.platform)) ?? "deepseek-official";
187
195
  const model =
188
- nonEmpty(this.env.CHORUS_DSH_MODEL) ?? nonEmpty(this.env.DSH_MODEL) ?? "deepseek-v4-flash";
189
- const childEnv = {
190
- ...this.env,
196
+ nonEmpty(getAgentEnv(this.env, "CHORUS_DSH_MODEL", this.platform)) ?? nonEmpty(getAgentEnv(this.env, "DSH_MODEL", this.platform)) ?? "deepseek-v4-flash";
197
+ const childEnv = overlayAgentEnv(this.env, {
191
198
  CHORUS_DAEMON_HEADLESS: "1",
192
199
  DSH_HOME: dshHome,
193
200
  DSH_CWD: cwd || process.cwd(),
194
- };
201
+ }, this.platform);
195
202
  if (this.creds?.url) childEnv.CHORUS_URL = this.creds.url;
196
203
  if (this.creds?.apiKey) childEnv.CHORUS_API_KEY = this.creds.apiKey;
197
204
  // Identity profile — the dsh doc-mirror wrapper passes this to `chorus mcp
@@ -213,6 +220,7 @@ export class DshSpawner {
213
220
  "--profile",
214
221
  "sdk",
215
222
  ...(patchPath ? ["--patch", patchPath] : []),
223
+ ...this.cliConfig.args,
216
224
  ];
217
225
  let child;
218
226
  try {
@@ -225,7 +233,7 @@ export class DshSpawner {
225
233
  windowsHide: true,
226
234
  });
227
235
  } catch (error) {
228
- this.logger.error(`[Chorus] failed to start dsh runtime: ${errorText(error)}`);
236
+ this.logger.error(`[Chorus] failed to start dsh runtime: ${safeSpawnError(error)}`);
229
237
  return result(dshSessionId, null);
230
238
  }
231
239
 
@@ -367,7 +375,7 @@ export class DshSpawner {
367
375
  if (line) this.logger.warn(`[dsh] ${line}`);
368
376
  }
369
377
  });
370
- child.on?.("error", (error) => fail(`dsh runtime process error: ${errorText(error)}`));
378
+ child.on?.("error", (error) => fail(`dsh runtime process error: ${safeSpawnError(error)}`));
371
379
  child.on?.("close", (code) => {
372
380
  closeSeen = true;
373
381
  exitCode = code;
@@ -68,7 +68,7 @@ function nonEmpty(value) {
68
68
  * Whether an init selection id is the DeepSeek Harness (dsh). dsh needs a SECOND
69
69
  * credential sink beyond ~/.chorus/daemon.json — see {@link writeDshCredentialsEnv}.
70
70
  * We gate on the selection id, NOT the daemon agentType: dsh maps to the shared
71
- * "offline" agentType (agent-type-map.mjs) alongside opencode/openclaw/pi, so the
71
+ * "offline" agentType (agent-type-map.mjs) alongside opencode/openclaw, so the
72
72
  * agentType cannot single dsh out. The id can.
73
73
  * @param {string} id
74
74
  */