@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
@@ -0,0 +1,323 @@
1
+ // Per-profile literal argv/env. No IO, interpolation, defaults shared across agents,
2
+ // or attempt to sandbox an operator who controls their executable/config files.
3
+ const canonicalType = (type) => type === "claude" ? "claude-code" : type;
4
+
5
+ // Known controls owned by the headless adapters (also protected in persistent
6
+ // foreground config). Short options match attached values and clusters as well.
7
+ const PROTECTED = {
8
+ "claude-code": {
9
+ long: "print output-format input-format verbose session-id resume continue fork-session no-session-persistence mcp-config strict-mcp-config permission-mode permission-prompts permission-prompt-tool dangerously-skip-permissions allow-dangerously-skip-permissions allowedTools allowed-tools disallowedTools disallowed-tools tools add-dir cwd system-prompt system-prompt-file append-system-prompt append-system-prompt-file settings setting-sources agent agents worktree teleport from-pr remote-control remote-control-session-name-prefix background bg cloud environment bare json-schema include-partial-messages replay-user-messages restricted safe-mode system-prompt-snapshot tmux include-hook-events forward-subagent-text prompt-suggestions",
10
+ short: "prcwv",
11
+ },
12
+ codex: {
13
+ long: "json experimental-json output-schema output-last-message color sandbox ask-for-approval full-auto approve-for-me not-so-yolo yolo dangerously-bypass-approvals-and-sandbox dangerously-bypass-hook-trust cd add-dir skip-git-repo-check ephemeral last all session resume fork profile remote remote-auth-token-env thread-source ignore-user-config ignore-rules",
14
+ short: "soaCp",
15
+ },
16
+ kiro: {
17
+ long: "no-interactive resume resume-id resume-picker agent trust-all-tools trust-tools list-sessions delete-session session-source format agent-engine v3 mode cwd tui legacy-ui classic list-models verbose",
18
+ short: "raldfv",
19
+ },
20
+ pi: {
21
+ long: "print mode continue resume session session-id session-dir no-session fork name cwd system-prompt append-system-prompt export list-models",
22
+ short: "pcrn",
23
+ },
24
+ dsh: {
25
+ long: "profile patch dump-config dump-default-config resume session session-id cwd rpc mode prompt",
26
+ short: "",
27
+ },
28
+ opencode: {
29
+ long: "continue session fork prompt agent port hostname mdns mdns-domain cors",
30
+ short: "cs",
31
+ },
32
+ openclaw: {
33
+ long: "session session-key session-id message agent local json gateway port profile dev to",
34
+ short: "mt",
35
+ },
36
+ };
37
+
38
+ // Arity is separate from protection and singleton precedence. This is NOT a
39
+ // generic third-party parser: unknown flags pass through, but we never guess
40
+ // whether their next token is a value. Sources/limitations: docs/DAEMON.md.
41
+ // Each entry is zero, one required value, optional value, or variadic values.
42
+ const ARITIES = {
43
+ "claude-code": {
44
+ zero: "print continue verbose fork-session no-session-persistence strict-mcp-config dangerously-skip-permissions allow-dangerously-skip-permissions bg background bare brief chrome no-chrome disable-slash-commands ide ax-screen-reader exclude-dynamic-system-prompt-sections include-hook-events include-partial-messages forward-subagent-text replay-user-messages restricted safe-mode",
45
+ one: "model effort autocompact debug-file fallback-model max-budget-usd plugin-dir plugin-url name agent agents append-system-prompt append-system-prompt-file system-prompt system-prompt-file input-format output-format json-schema permission-mode permission-prompts permission-prompt-tool session-id settings setting-sources environment remote-control-session-name-prefix system-prompt-snapshot",
46
+ optional: "debug resume worktree cloud from-pr remote-control teleport prompt-suggestions tmux",
47
+ many: "add-dir allowedTools allowed-tools disallowedTools disallowed-tools tools mcp-config betas file",
48
+ aliases: { "-p": "--print", "-c": "--continue", "-d": "--debug", "-n": "--name", "-r": "--resume", "-w": "--worktree" },
49
+ },
50
+ codex: {
51
+ zero: "strict-config oss search no-alt-screen json experimental-json full-auto approve-for-me not-so-yolo yolo dangerously-bypass-approvals-and-sandbox dangerously-bypass-hook-trust skip-git-repo-check ephemeral last all ignore-user-config ignore-rules",
52
+ one: "model config enable disable image local-provider profile sandbox ask-for-approval cd add-dir remote remote-auth-token-env thread-source output-schema output-last-message color",
53
+ aliases: { "-m": "--model", "-c": "--config", "-i": "--image", "-p": "--profile", "-s": "--sandbox", "-a": "--ask-for-approval", "-C": "--cd", "-o": "--output-last-message" },
54
+ },
55
+ kiro: {
56
+ zero: "resume resume-picker trust-all-tools no-interactive list-sessions list-models require-mcp-startup verbose tui legacy-ui classic v3",
57
+ one: "model effort resume-id agent trust-tools format delete-session session-source wrap agent-engine mode",
58
+ aliases: { "-r": "--resume", "-a": "--trust-all-tools", "-l": "--list-sessions", "-f": "--format", "-d": "--delete-session", "-w": "--wrap", "-v": "--verbose" },
59
+ },
60
+ pi: {
61
+ zero: "continue resume no-session no-tools no-builtin-tools no-extensions no-skills no-prompt-templates no-themes no-context-files verbose approve no-approve offline",
62
+ one: "provider model api-key system-prompt append-system-prompt mode session session-id fork session-dir name models tools exclude-tools thinking extension skill prompt-template theme use-theme export tui-mode",
63
+ optional: "print list-models",
64
+ aliases: { "-p": "--print", "-c": "--continue", "-r": "--resume", "-n": "--name", "-nt": "--no-tools", "-nbt": "--no-builtin-tools", "-t": "--tools", "-xt": "--exclude-tools", "-e": "--extension", "-ne": "--no-extensions", "-ns": "--no-skills", "-np": "--no-prompt-templates", "-nc": "--no-context-files", "-a": "--approve", "-na": "--no-approve" },
65
+ },
66
+ dsh: { zero: "dump-config dump-default-config", one: "profile patch" },
67
+ opencode: {
68
+ zero: "print-logs pure continue fork mdns",
69
+ one: "log-level model session prompt agent port hostname mdns-domain",
70
+ many: "cors",
71
+ aliases: { "-m": "--model", "-c": "--continue", "-s": "--session" },
72
+ },
73
+ openclaw: {
74
+ zero: "local json deliver dry-run best-effort-deliver dev no-color",
75
+ one: "model thinking message to session-id agent channel reply-to reply-channel reply-account timeout verbose profile log-level",
76
+ aliases: { "-m": "--message", "-t": "--to" },
77
+ },
78
+ };
79
+ const OPTION_ARITIES = Object.fromEntries(Object.entries(ARITIES).map(([type, spec]) => {
80
+ const flags = { "--help": "zero", "--version": "zero" };
81
+ for (const arity of ["zero", "one", "optional", "many"])
82
+ for (const name of (spec[arity] ?? "").split(" ").filter(Boolean)) flags[`--${name}`] = arity;
83
+ return [type, { flags, aliases: { "-h": "--help", "-V": "--version", "-v": "--version", ...spec.aliases } }];
84
+ }));
85
+
86
+ function optionAt(type, args, i) {
87
+ const spec = OPTION_ARITIES[type];
88
+ const token = args[i];
89
+ let flag = token.split("=", 1)[0];
90
+ let attached = token.includes("=");
91
+ // Pi has exact multi-character aliases (-nt, -xt, ...), not short clusters.
92
+ if (type !== "pi" && /^-[^-].+/.test(token) && !spec?.aliases[flag]) {
93
+ const short = token.slice(0, 2);
94
+ if (spec?.flags[spec.aliases[short]] === "one" || spec?.flags[spec.aliases[short]] === "optional") {
95
+ flag = short;
96
+ attached = true;
97
+ }
98
+ }
99
+ flag = spec?.aliases[flag] ?? flag;
100
+ const arity = spec?.flags[flag];
101
+ if (!arity) return null;
102
+ let size = 1;
103
+ const next = args[i + 1];
104
+ // Clap/yargs keep -- as a boundary; Pi and Commander consume it literally
105
+ // as a required value. Persistent configuration rejects sentinels either way.
106
+ const literalSentinel = ["pi", "claude-code", "dsh", "openclaw"].includes(type);
107
+ const piNonOptionValue = type === "pi" && ["--use-theme", "--tui-mode"].includes(flag);
108
+ const hasNext = next !== undefined && (next !== "--" || literalSentinel) &&
109
+ !(piNonOptionValue && next.startsWith("-"));
110
+ if (!attached && hasNext) {
111
+ if (arity === "one" || arity === "many") size++;
112
+ else if (arity === "optional" && !next.startsWith("-")) size++;
113
+ }
114
+ if (arity === "many") {
115
+ while (i + size < args.length && !args[i + size].startsWith("-")) size++;
116
+ }
117
+ return { flag, arity, size, missing: !attached && ["one", "many"].includes(arity) && size === 1 };
118
+ }
119
+
120
+ function invalid(label, field, reason) {
121
+ // Never include the token, env name, or value: even malformed keys can be secrets.
122
+ throw new Error(`Agent ${label}: ${field} ${reason}.`);
123
+ }
124
+
125
+ export function rejectSharedCliConfig(file) {
126
+ if (Array.isArray(file?.agents) && file.agents.length &&
127
+ (Object.hasOwn(file, "args") || Object.hasOwn(file, "env"))) {
128
+ throw new Error("daemon.json: top-level args/env cannot be shared with agents[]; move them into each agent entry.");
129
+ }
130
+ }
131
+
132
+ // Codex -c is repeatable by TOML key, not a singleton flag. Parse only a simple
133
+ // dotted/quoted key; reject ambiguous keys in persistent config rather than risk
134
+ // allowing quoted protected controls to bypass the guard.
135
+ function codexConfigAt(args, i) {
136
+ const tok = args[i];
137
+ let value;
138
+ let size = 1;
139
+ if (tok === "-c" || tok === "--config") { value = args[i + 1]; size = value === "--" || value === undefined ? 1 : 2; }
140
+ else if (tok.startsWith("--config=")) value = tok.slice(9);
141
+ else if (tok.startsWith("-c") && !tok.startsWith("--")) value = tok.slice(2).replace(/^=/, "");
142
+ else return null;
143
+ const raw = typeof value === "string" ? value.split("=", 1)[0].trim() : "";
144
+ const key = raw.replace(/["']/g, "").replace(/\s*\.\s*/g, ".");
145
+ return { key, size, valid: typeof value === "string" && value.includes("=") && /^[A-Za-z_][A-Za-z0-9_.]*$/.test(key) };
146
+ }
147
+
148
+ export function validateAgentCliConfig(config = {}, type, label = "agent") {
149
+ const args = config.args === undefined ? [] : config.args;
150
+ const env = config.env === undefined ? {} : config.env;
151
+ if (!Array.isArray(args)) invalid(label, "args", "must be an array of strings");
152
+ for (let i = 0; i < args.length; i++) {
153
+ if (typeof args[i] !== "string" || args[i].includes("\0"))
154
+ invalid(label, `args[${i}]`, "must be a string without NUL");
155
+ }
156
+ if (!env || typeof env !== "object" || Array.isArray(env) ||
157
+ ![Object.prototype, null].includes(Object.getPrototypeOf(env)))
158
+ invalid(label, "env", "must be a string-to-string object");
159
+ for (const [i, [key, value]] of Object.entries(env).entries()) {
160
+ if (!/^[A-Za-z_][A-Za-z0-9_]*$/.test(key)) invalid(label, `env entry[${i}]`, "has an invalid variable name");
161
+ if (/^CHORUS_/i.test(key)) invalid(label, `env entry[${i}]`, "cannot override managed CHORUS_* variables");
162
+ if (/^(CLAUDECODE|CLAUDE_CODE_ENTRYPOINT)$/i.test(key))
163
+ invalid(label, `env entry[${i}]`, "cannot override managed nested-Claude context variables");
164
+ if (typeof value !== "string" || value.includes("\0")) invalid(label, `env entry[${i}]`, "must have a string value without NUL");
165
+ }
166
+ const backend = canonicalType(type);
167
+ const controls = PROTECTED[backend];
168
+ const longs = new Set([...(controls?.long.split(" ") ?? []), "help", "version"]);
169
+ for (let i = 0; i < args.length; i++) {
170
+ if (args[i] === "--" || args[i] === "-") invalid(label, `args[${i}]`, "cannot contain an argument terminator or stdin prompt marker");
171
+ }
172
+ for (let i = 0; i < args.length; i++) {
173
+ const tok = args[i];
174
+ const option = optionAt(backend, args, i);
175
+ if (controls && !tok.startsWith("-"))
176
+ invalid(label, `args[${i}]`, "cannot supply a positional prompt or ambiguous value; unknown options require inline --option=value syntax (if supported by the CLI)");
177
+ if ((longs.has((option?.flag ?? tok.split("=", 1)[0]).replace(/^--/, ""))) ||
178
+ (!option && /^-[^-]/.test(tok) && `${controls?.short ?? ""}hVv`.includes(tok[1])))
179
+ invalid(label, `args[${i}]`, "conflicts with managed backend controls; use the dedicated Chorus settings or explicit foreground passthrough");
180
+ if (backend === "codex") {
181
+ const c = codexConfigAt(args, i);
182
+ if (c) {
183
+ if (!c.valid || /^(mcp_servers|sandbox[^.]*|approval_policy|approvals_reviewer|cwd|permissions|developer_instructions|model_instructions_file|experimental_instructions_file|base_instructions)(\.|$)/.test(c.key))
184
+ invalid(label, `args[${i}]`, "has an invalid or managed Codex config key");
185
+ }
186
+ }
187
+ if (option?.missing) invalid(label, `args[${i}]`, "requires a value before managed launch arguments");
188
+ i += (option?.size ?? 1) - 1;
189
+ }
190
+ return { args: [...args], env: { ...env } };
191
+ }
192
+
193
+ // Windows child environments are case-insensitive, unlike an ordinary JS object
194
+ // (including injected test envs). Match Node's sorted-key selection if an inherited
195
+ // object contains duplicates; overlayAgentEnv removes collisions for overrides.
196
+ export function getAgentEnv(env, name, platform = process.platform) {
197
+ if (platform !== "win32") return env[name];
198
+ const key = Object.keys(env).sort().find((key) => key.toUpperCase() === name.toUpperCase());
199
+ return key === undefined ? undefined : env[key];
200
+ }
201
+
202
+ export function overlayAgentEnv(base, overrides = {}, platform = process.platform) {
203
+ const result = { ...base };
204
+ if (platform === "win32") {
205
+ for (const key of Object.keys(result)) {
206
+ if (/^CHORUS_/i.test(key) && key !== key.toUpperCase()) {
207
+ result[key.toUpperCase()] = result[key];
208
+ delete result[key];
209
+ }
210
+ }
211
+ }
212
+ for (const [key, value] of Object.entries(overrides)) {
213
+ if (platform === "win32") {
214
+ for (const old of Object.keys(result)) if (old.toLowerCase() === key.toLowerCase()) delete result[old];
215
+ }
216
+ // Canonical PATH spelling also makes the existing binary resolvers consistent.
217
+ const name = platform === "win32" && key.toUpperCase() === "PATH" ? "PATH" : key;
218
+ Object.defineProperty(result, name, { value, enumerable: true, writable: true, configurable: true });
219
+ }
220
+ return result;
221
+ }
222
+
223
+ // Deliberately small registry. See docs/DAEMON.md for verified CLI sources/forms.
224
+ const SINGLETONS = {
225
+ "claude-code": { "--model": "model", "--effort": "effort" },
226
+ codex: { "--model": "model", "-m": "model" },
227
+ kiro: { "--model": "model", "--effort": "effort" },
228
+ pi: { "--model": "model", "--thinking": "thinking", "--provider": "provider" },
229
+ opencode: { "--model": "model", "-m": "model" },
230
+ openclaw: { "--model": "model", "--thinking": "thinking" },
231
+ };
232
+ function singletonAt(type, args, i) {
233
+ if (type === "codex") {
234
+ const c = codexConfigAt(args, i);
235
+ if (c?.valid && ["model", "model_reasoning_effort"].includes(c.key)) return { key: c.key, size: c.size };
236
+ }
237
+ for (const [flag, key] of Object.entries(SINGLETONS[type] ?? {})) {
238
+ if (args[i] === flag) return { key, size: args[i + 1] === undefined || args[i + 1] === "--" ? 1 : 2 };
239
+ if (args[i].startsWith(`${flag}=`) || flag.length === 2 && args[i].startsWith(flag)) return { key, size: 1 };
240
+ }
241
+ return null;
242
+ }
243
+ // Only these command paths have a supported insertion scope. Walk known option
244
+ // arities, never token-search: a value named "exec"/"resume" is not a command.
245
+ const SUBCOMMANDS = {
246
+ codex: { exec: { resume: {} }, resume: {} },
247
+ kiro: { chat: {} },
248
+ openclaw: { agent: {} },
249
+ };
250
+ function foregroundScope(type, explicit) {
251
+ let commands = SUBCOMMANDS[type];
252
+ let start = 0;
253
+ if (!commands) return start;
254
+ for (let i = 0; i < explicit.length;) {
255
+ const token = explicit[i];
256
+ if (Object.hasOwn(commands, token)) {
257
+ start = ++i;
258
+ commands = commands[token];
259
+ if (!Object.keys(commands).length) break;
260
+ continue;
261
+ }
262
+ const option = optionAt(type, explicit, i);
263
+ if (option) {
264
+ if (option.missing) break;
265
+ i += option.size;
266
+ } else if (token.startsWith("--") && token.includes("=")) {
267
+ i++; // self-contained unknown option; no arity guess
268
+ } else break; // positional prompt/unknown command/ambiguous option
269
+ }
270
+ return start;
271
+ }
272
+
273
+ export function planAgentArgs(type, configured, explicit = []) {
274
+ type = canonicalType(type);
275
+ // Chorus analysis ALWAYS ends at the first bare --, even for backends that
276
+ // might consume it as an option value. Forward the original tokens unchanged.
277
+ const terminator = explicit.indexOf("--");
278
+ const scan = explicit.slice(0, terminator < 0 ? explicit.length : terminator);
279
+ const start = foregroundScope(type, scan);
280
+ const supplied = new Set();
281
+ for (let i = 0; i < scan.length; i++) {
282
+ const boundary = optionAt(type, scan, i);
283
+ // Unknown separated options may consume ANY following token. Do not infer
284
+ // overrides beyond this point; still forward the entire explicit argv.
285
+ if (!boundary && scan[i].startsWith("-") &&
286
+ !(scan[i].startsWith("--") && scan[i].includes("="))) break;
287
+ const option = singletonAt(type, scan, i);
288
+ // Local root/parent options do not override options of the selected child
289
+ // command. Codex --config/-c is global and applies across command scopes.
290
+ const globalConfig = type === "codex" && boundary?.flag === "--config";
291
+ if (option && (i >= start || globalConfig)) supplied.add(option.key);
292
+ i += (boundary?.size ?? 1) - 1;
293
+ }
294
+ const kept = [];
295
+ for (let i = 0; i < configured.length; i++) {
296
+ const boundary = optionAt(type, configured, i);
297
+ const option = singletonAt(type, configured, i);
298
+ const size = boundary?.size ?? 1;
299
+ if (!option || !supplied.has(option.key)) kept.push(...configured.slice(i, i + size));
300
+ i += size - 1;
301
+ }
302
+ return {
303
+ args: [...explicit.slice(0, start), ...kept, ...explicit.slice(start)],
304
+ configuredArgs: kept,
305
+ };
306
+ }
307
+
308
+ export function mergeAgentArgs(type, configured, explicit = []) {
309
+ return planAgentArgs(type, configured, explicit).args;
310
+ }
311
+
312
+ // cmd.exe parses even with shell:false. Until a fully tested cmd encoder exists,
313
+ // only simple configured tokens are supported with .cmd/.bat shims. Native exe
314
+ // and POSIX paths retain ALL literal tokens. Explicit foreground argv is unchanged.
315
+ export function assertConfiguredShimArgs(binPath, args, platform = process.platform, label = "agent") {
316
+ if (platform !== "win32" || !/\.(cmd|bat)$/i.test(binPath)) return;
317
+ if (/["%!^&|<>()\r\n]/.test(binPath))
318
+ invalid(label, "executable path", "cannot be passed literally through a Windows command shim; use a native executable");
319
+ for (let i = 0; i < args.length; i++) {
320
+ if (!args[i] || /[\s"'%!^&|<>()]/.test(args[i]))
321
+ invalid(label, `args[${i}]`, "cannot be passed literally through a Windows command shim; use a native executable");
322
+ }
323
+ }
@@ -15,9 +15,11 @@
15
15
  // name/UUID and the resolved binary, nothing else.
16
16
 
17
17
  import { spawn } from "node:child_process";
18
+ import { safeSpawnError } from "./launch-diagnostics.mjs";
18
19
  import { statSync } from "node:fs";
19
20
  import { win32 as pathWin32, posix as pathPosix } from "node:path";
20
21
  import { resolveLaunchAgent } from "./credentials.mjs";
22
+ import { validateAgentCliConfig, overlayAgentEnv, getAgentEnv, planAgentArgs, assertConfiguredShimArgs } from "./agent-cli-config.mjs";
21
23
 
22
24
  /**
23
25
  * Launch agent-type → executable base name. Launch is a SUPERSET of daemon wake:
@@ -173,7 +175,7 @@ export function resolveBinaryPath(binName, deps = {}) {
173
175
  const isWin = platform === "win32";
174
176
  const p = isWin ? pathWin32 : pathPosix;
175
177
  const names = isWin ? [`${binName}.cmd`, `${binName}.exe`, binName] : [binName];
176
- const pathVar = env.PATH || env.Path || "";
178
+ const pathVar = getAgentEnv(env, "PATH", platform) || env.Path || "";
177
179
  const dirs = pathVar.split(p.delimiter).filter(Boolean);
178
180
  for (const dir of dirs) {
179
181
  for (const name of names) {
@@ -197,7 +199,7 @@ export function resolveSpawnCommand(binPath, args, platform = process.platform,
197
199
  const isWin = platform === "win32";
198
200
  const lower = binPath.toLowerCase();
199
201
  if (isWin && (lower.endsWith(".cmd") || lower.endsWith(".bat"))) {
200
- const comspec = env.ComSpec || env.COMSPEC || "cmd.exe";
202
+ const comspec = getAgentEnv(env, "COMSPEC", platform) || "cmd.exe";
201
203
  return { command: comspec, argv: ["/d", "/s", "/c", binPath, ...args] };
202
204
  }
203
205
  return { command: binPath, argv: args };
@@ -212,13 +214,20 @@ export function resolveSpawnCommand(binPath, args, platform = process.platform,
212
214
  * @param {NodeJS.ProcessEnv} [baseEnv]
213
215
  * @returns {NodeJS.ProcessEnv}
214
216
  */
215
- export function buildChildEnv(agent, baseEnv = process.env) {
216
- const childEnv = { ...baseEnv };
217
+ export function buildChildEnv(agent, baseEnv = process.env, platform = process.platform) {
218
+ const childEnv = overlayAgentEnv(baseEnv, agent.env, platform);
217
219
  if (agent.url) childEnv.CHORUS_URL = agent.url;
218
220
  if (agent.apiKey) childEnv.CHORUS_API_KEY = agent.apiKey;
219
221
  const profile = agent.agentUuid || agent.agentName;
220
222
  if (profile) childEnv.CHORUS_AGENT_PROFILE = profile;
221
- delete childEnv.CHORUS_DAEMON_HEADLESS;
223
+ for (const key of Object.keys(childEnv)) {
224
+ if (key.toUpperCase() === "CHORUS_DAEMON_HEADLESS") delete childEnv[key];
225
+ }
226
+ if (agent.agentType === "claude-code" || agent.agentType === "claude") {
227
+ for (const key of Object.keys(childEnv)) {
228
+ if (["CLAUDECODE", "CLAUDE_CODE_ENTRYPOINT"].includes(key.toUpperCase())) delete childEnv[key];
229
+ }
230
+ }
222
231
  return childEnv;
223
232
  }
224
233
 
@@ -233,8 +242,11 @@ USAGE
233
242
 
234
243
  Launches the agent's binary in the FOREGROUND with this agent's Chorus connection
235
244
  injected into the child (CHORUS_URL / CHORUS_API_KEY / CHORUS_AGENT_PROFILE).
236
- Everything after \`--\` is passed to the agent verbatim the agent's full flag
237
- surface is available and is never inspected by chorus.
245
+ Everything after \`--\` is passed to the agent verbatim. Recognized explicit model/
246
+ reasoning options suppress configured equivalents in the selected command scope.
247
+ Configured args precede explicit options after known commands (Codex exec, exec
248
+ resume, resume; Kiro chat; OpenClaw agent), otherwise they go first. Unknown
249
+ command grammars are not inferred. Analysis stops at the first bare \`--\`.
238
250
 
239
251
  FLAGS
240
252
  --name <name|uuid> Which configured agent to launch (default: the only one).
@@ -295,8 +307,18 @@ export async function runAgentLaunch(argv = [], opts = {}) {
295
307
  return 1;
296
308
  }
297
309
 
298
- // 3. Locate the binary on PATH.
299
- const binPath = resolveBinaryPath(typeRes.binary, { env, platform, isFile: opts.isFile });
310
+ // Validate before binary discovery or spawn, against the effective --type.
311
+ let config;
312
+ try {
313
+ config = validateAgentCliConfig(agent, typeRes.type, agent.label);
314
+ } catch (e) {
315
+ err.write(`error: ${e.message}\n`);
316
+ return 1;
317
+ }
318
+ const childEnv = buildChildEnv({ ...agent, agentType: typeRes.type, env: config.env }, env, platform);
319
+
320
+ // 3. Locate the binary using this profile's effective PATH.
321
+ const binPath = resolveBinaryPath(typeRes.binary, { env: childEnv, platform, isFile: opts.isFile });
300
322
  if (!binPath) {
301
323
  err.write(
302
324
  `error: could not find the \`${typeRes.binary}\` executable on PATH ` +
@@ -305,9 +327,15 @@ export async function runAgentLaunch(argv = [], opts = {}) {
305
327
  return 1;
306
328
  }
307
329
 
308
- // 4. Build the child env and the spawn command.
309
- const childEnv = buildChildEnv(agent, env);
310
- const { command, argv: spawnArgv } = resolveSpawnCommand(binPath, parsed.passthrough, platform, env);
330
+ // 4. Filter only configured recognized duplicates; explicit argv stays untouched.
331
+ const { args, configuredArgs } = planAgentArgs(typeRes.type, config.args, parsed.passthrough);
332
+ try {
333
+ assertConfiguredShimArgs(binPath, configuredArgs, platform, agent.label);
334
+ } catch (e) {
335
+ err.write(`error: ${e.message}\n`);
336
+ return 1;
337
+ }
338
+ const { command, argv: spawnArgv } = resolveSpawnCommand(binPath, args, platform, childEnv);
311
339
 
312
340
  // Diagnostic — agent name/uuid + binary ONLY. Never the key or url userinfo.
313
341
  out.write(`Launching ${agent.label} (${agent.agentUuid ?? "no uuid"}) → ${typeRes.binary}\n`);
@@ -321,13 +349,13 @@ export async function runAgentLaunch(argv = [], opts = {}) {
321
349
  env: childEnv,
322
350
  shell: false,
323
351
  });
324
- } catch (e) {
325
- err.write(`error: failed to launch ${typeRes.binary}: ${e.message}\n`);
352
+ } catch (error) {
353
+ err.write(`error: failed to launch ${typeRes.binary}: ${safeSpawnError(error)}\n`);
326
354
  resolve(1);
327
355
  return;
328
356
  }
329
- child.on("error", (e) => {
330
- err.write(`error: ${typeRes.binary} failed to start: ${e.message}\n`);
357
+ child.on("error", (error) => {
358
+ err.write(`error: ${typeRes.binary} failed to start: ${safeSpawnError(error)}\n`);
331
359
  resolve(1);
332
360
  });
333
361
  child.on("close", (code, signal) => {
@@ -23,6 +23,8 @@
23
23
  // carried per-turn by the wake-prompt preamble in prompts.mjs, not at the system level.
24
24
 
25
25
  import { spawn } from "node:child_process";
26
+ import { safeSpawnError } from "./launch-diagnostics.mjs";
27
+ import { validateAgentCliConfig, overlayAgentEnv, getAgentEnv, assertConfiguredShimArgs } from "./agent-cli-config.mjs";
26
28
  import { existsSync, statSync } from "node:fs";
27
29
  import { homedir } from "node:os";
28
30
  import { win32 as pathWin32, posix as pathPosix, join as pathJoin } from "node:path";
@@ -102,7 +104,7 @@ export function escapeCwd(cwd, platform = process.platform) {
102
104
  export function transcriptPath(sessionId, cwd, deps = {}) {
103
105
  const env = deps.env ?? process.env;
104
106
  const platform = deps.platform ?? process.platform;
105
- const configDir = env.CLAUDE_CONFIG_DIR || pathJoin(deps.home ?? homedir(), ".claude");
107
+ const configDir = getAgentEnv(env, "CLAUDE_CONFIG_DIR", platform) || pathJoin(deps.home ?? getAgentEnv(env, "HOME", platform) ?? getAgentEnv(env, "USERPROFILE", platform) ?? homedir(), ".claude");
106
108
  return pathJoin(configDir, "projects", escapeCwd(cwd, platform), `${sessionId}.jsonl`);
107
109
  }
108
110
 
@@ -146,8 +148,9 @@ export function resolveClaudePath(deps = {}) {
146
148
  });
147
149
 
148
150
  // An explicit override always wins (set by the daemon if the user configured it).
149
- if (env.CHORUS_CLAUDE_PATH && isFile(env.CHORUS_CLAUDE_PATH)) {
150
- return env.CHORUS_CLAUDE_PATH;
151
+ const override = getAgentEnv(env, "CHORUS_CLAUDE_PATH", platform);
152
+ if (override && isFile(override)) {
153
+ return override;
151
154
  }
152
155
 
153
156
  // Use platform-correct path semantics so the resolver is testable for
@@ -155,7 +158,7 @@ export function resolveClaudePath(deps = {}) {
155
158
  const isWin = platform === "win32";
156
159
  const p = isWin ? pathWin32 : pathPosix;
157
160
  const names = isWin ? ["claude.cmd", "claude.exe", "claude"] : ["claude"];
158
- const pathVar = env.PATH || env.Path || "";
161
+ const pathVar = getAgentEnv(env, "PATH", platform) || env.Path || "";
159
162
  const dirs = pathVar.split(p.delimiter).filter(Boolean);
160
163
  for (const dir of dirs) {
161
164
  for (const name of names) {
@@ -228,7 +231,7 @@ export function resolveSpawnCommand(claudePath, args, platform = process.platfor
228
231
  const isWin = platform === "win32";
229
232
  const lower = claudePath.toLowerCase();
230
233
  if (isWin && (lower.endsWith(".cmd") || lower.endsWith(".bat"))) {
231
- const comspec = env.ComSpec || env.COMSPEC || "cmd.exe";
234
+ const comspec = getAgentEnv(env, "COMSPEC", platform) || "cmd.exe";
232
235
  // /d skip AutoRun, /s treat everything after /c literally, /c run then exit.
233
236
  return { command: comspec, argv: ["/d", "/s", "/c", claudePath, ...args] };
234
237
  }
@@ -289,6 +292,8 @@ export class ClaudeSpawner {
289
292
  // can group-kill the tree; Windows does not. Injectable so a POSIX test host
290
293
  // can exercise the Windows branch and vice versa.
291
294
  this.platform = opts.platform ?? process.platform;
295
+ this.cliConfig = validateAgentCliConfig(opts.cliConfig, "claude-code", opts.label);
296
+ this.env = overlayAgentEnv(opts.env ?? process.env, this.cliConfig.env, this.platform);
292
297
  }
293
298
 
294
299
  /**
@@ -330,18 +335,19 @@ export class ClaudeSpawner {
330
335
  return { sessionId: typeof id === "string" ? id : "", backendSessionId: null, exitCode: null, isNew: Boolean(isNew) };
331
336
  }
332
337
 
333
- const claudePath = this.claudePath ?? resolveClaudePath();
338
+ const claudePath = this.claudePath ?? resolveClaudePath({ env: this.env, platform: this.platform });
334
339
  if (!claudePath) {
335
340
  // No crash — surface visibly and resolve with a failure result.
336
341
  this.logger.error("[Chorus] cannot locate the `claude` executable on PATH; skipping wake");
337
342
  return { sessionId: id, backendSessionId: null, exitCode: null, isNew };
338
343
  }
339
344
 
340
- const args = buildArgs({ sessionId: id, isNew, mcpConfigPath, permissionMode: this.permissionMode });
345
+ assertConfiguredShimArgs(claudePath, this.cliConfig.args, this.platform);
346
+ const args = [...buildArgs({ sessionId: id, isNew, mcpConfigPath, permissionMode: this.permissionMode }), ...this.cliConfig.args];
341
347
  // On Windows, a .cmd/.bat shim must be run via cmd.exe /c (CreateProcess
342
348
  // can't exec a script directly). resolveSpawnCommand keeps shell:false and
343
349
  // passes argv as an array — no shell injection surface either way.
344
- const { command, argv } = resolveSpawnCommand(claudePath, args);
350
+ const { command, argv } = resolveSpawnCommand(claudePath, args, this.platform, this.env);
345
351
 
346
352
  // POSIX: spawn `detached: true` so the child becomes a PROCESS GROUP LEADER
347
353
  // (its pgid === its pid). The interrupt path then signals the whole group via
@@ -353,7 +359,10 @@ export class ClaudeSpawner {
353
359
  // stream and observe the exit. On Windows `detached` is NOT used: taskkill /T
354
360
  // walks the tree by pid, and detached there only spawns a new console window.
355
361
  const detached = (this.platform ?? process.platform) !== "win32";
356
- const childEnv = { ...process.env, CHORUS_DAEMON_HEADLESS: "1" };
362
+ const childEnv = { ...this.env, CHORUS_DAEMON_HEADLESS: "1" };
363
+ for (const key of Object.keys(childEnv)) {
364
+ if (["CLAUDECODE", "CLAUDE_CODE_ENTRYPOINT"].includes(key.toUpperCase())) delete childEnv[key];
365
+ }
357
366
  if (this.creds) {
358
367
  if (this.creds.url) childEnv.CHORUS_URL = this.creds.url;
359
368
  if (this.creds.apiKey) childEnv.CHORUS_API_KEY = this.creds.apiKey;
@@ -379,8 +388,8 @@ export class ClaudeSpawner {
379
388
  detached,
380
389
  windowsHide: true,
381
390
  });
382
- } catch (err) {
383
- this.logger.error(`[Chorus] failed to spawn claude: ${err}`);
391
+ } catch (error) {
392
+ this.logger.error(`[Chorus] failed to spawn claude: ${safeSpawnError(error)}`);
384
393
  resolve({ sessionId: id, backendSessionId: null, exitCode: null, isNew });
385
394
  return;
386
395
  }
@@ -429,9 +438,9 @@ export class ClaudeSpawner {
429
438
  if (text) this.logger.warn(`[Chorus] claude stderr: ${text}`);
430
439
  });
431
440
 
432
- child.on("error", (err) => {
441
+ child.on("error", (error) => {
433
442
  // e.g. ENOENT if the resolved path vanished — log, don't throw.
434
- this.logger.error(`[Chorus] claude process error: ${err}`);
443
+ this.logger.error(`[Chorus] claude process error: ${safeSpawnError(error)}`);
435
444
  // backendSessionId is the `--resume` anchor (`id`), NOT observedSessionId:
436
445
  // a fork-on-resume claude can emit a new stream session_id, but the daemon
437
446
  // resumes and files the transcript under `id`, so `id` is the resumable value.