@chorus-aidlc/chorus 0.17.1 → 0.17.2

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 (299) hide show
  1. package/.next/standalone/.next/BUILD_ID +1 -1
  2. package/.next/standalone/.next/app-build-manifest.json +351 -351
  3. package/.next/standalone/.next/app-path-routes-manifest.json +36 -36
  4. package/.next/standalone/.next/build-manifest.json +5 -5
  5. package/.next/standalone/.next/prerender-manifest.json +36 -36
  6. package/.next/standalone/.next/server/app/(dashboard)/project-groups/[uuid]/page.js +1 -1
  7. package/.next/standalone/.next/server/app/(dashboard)/project-groups/[uuid]/page.js.nft.json +1 -1
  8. package/.next/standalone/.next/server/app/(dashboard)/project-groups/[uuid]/page_client-reference-manifest.js +1 -1
  9. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/activity/page.js +1 -1
  10. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/activity/page_client-reference-manifest.js +1 -1
  11. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/dashboard/[ideaUuid]/page.js +1 -1
  12. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/dashboard/[ideaUuid]/page_client-reference-manifest.js +1 -1
  13. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/dashboard/page.js +2 -2
  14. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/dashboard/page.js.nft.json +1 -1
  15. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/dashboard/page_client-reference-manifest.js +1 -1
  16. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/documents/[documentUuid]/page.js +2 -2
  17. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/documents/[documentUuid]/page_client-reference-manifest.js +1 -1
  18. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/documents/page.js +2 -2
  19. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/documents/page_client-reference-manifest.js +1 -1
  20. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/graph/page.js +2 -2
  21. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/graph/page.js.nft.json +1 -1
  22. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/graph/page_client-reference-manifest.js +1 -1
  23. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/proposals/[proposalUuid]/page.js +2 -2
  24. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/proposals/[proposalUuid]/page.js.nft.json +1 -1
  25. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/proposals/[proposalUuid]/page_client-reference-manifest.js +1 -1
  26. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/proposals/new/page.js +2 -2
  27. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/proposals/new/page_client-reference-manifest.js +1 -1
  28. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/proposals/page.js +2 -2
  29. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/proposals/page_client-reference-manifest.js +1 -1
  30. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/tasks/[taskUuid]/page.js +1 -1
  31. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/tasks/[taskUuid]/page.js.nft.json +1 -1
  32. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/tasks/[taskUuid]/page_client-reference-manifest.js +1 -1
  33. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/tasks/page.js +1 -1
  34. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/tasks/page.js.nft.json +1 -1
  35. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/tasks/page_client-reference-manifest.js +1 -1
  36. package/.next/standalone/.next/server/app/(dashboard)/projects/page.js +1 -1
  37. package/.next/standalone/.next/server/app/(dashboard)/projects/page.js.nft.json +1 -1
  38. package/.next/standalone/.next/server/app/(dashboard)/projects/page_client-reference-manifest.js +1 -1
  39. package/.next/standalone/.next/server/app/(dashboard)/settings/page.js +2 -2
  40. package/.next/standalone/.next/server/app/(dashboard)/settings/page.js.nft.json +1 -1
  41. package/.next/standalone/.next/server/app/(dashboard)/settings/page_client-reference-manifest.js +1 -1
  42. package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  43. package/.next/standalone/.next/server/app/_not-found.html +2 -2
  44. package/.next/standalone/.next/server/app/_not-found.rsc +1 -1
  45. package/.next/standalone/.next/server/app/admin/companies/[uuid]/page_client-reference-manifest.js +1 -1
  46. package/.next/standalone/.next/server/app/admin/companies/new/page_client-reference-manifest.js +1 -1
  47. package/.next/standalone/.next/server/app/admin/companies/new.html +2 -2
  48. package/.next/standalone/.next/server/app/admin/companies/new.rsc +1 -1
  49. package/.next/standalone/.next/server/app/admin/companies/page_client-reference-manifest.js +1 -1
  50. package/.next/standalone/.next/server/app/admin/companies.html +2 -2
  51. package/.next/standalone/.next/server/app/admin/companies.rsc +1 -1
  52. package/.next/standalone/.next/server/app/admin/page_client-reference-manifest.js +1 -1
  53. package/.next/standalone/.next/server/app/admin.html +2 -2
  54. package/.next/standalone/.next/server/app/admin.rsc +1 -1
  55. package/.next/standalone/.next/server/app/api/admin/companies/[uuid]/route_client-reference-manifest.js +1 -1
  56. package/.next/standalone/.next/server/app/api/admin/companies/route_client-reference-manifest.js +1 -1
  57. package/.next/standalone/.next/server/app/api/admin/login/route_client-reference-manifest.js +1 -1
  58. package/.next/standalone/.next/server/app/api/admin/session/route_client-reference-manifest.js +1 -1
  59. package/.next/standalone/.next/server/app/api/agent-connections/route_client-reference-manifest.js +1 -1
  60. package/.next/standalone/.next/server/app/api/agents/[uuid]/route_client-reference-manifest.js +1 -1
  61. package/.next/standalone/.next/server/app/api/agents/[uuid]/sessions/route_client-reference-manifest.js +1 -1
  62. package/.next/standalone/.next/server/app/api/agents/route_client-reference-manifest.js +1 -1
  63. package/.next/standalone/.next/server/app/api/api-keys/[uuid]/route_client-reference-manifest.js +1 -1
  64. package/.next/standalone/.next/server/app/api/api-keys/route_client-reference-manifest.js +1 -1
  65. package/.next/standalone/.next/server/app/api/auth/callback/route_client-reference-manifest.js +1 -1
  66. package/.next/standalone/.next/server/app/api/auth/check-default/route_client-reference-manifest.js +1 -1
  67. package/.next/standalone/.next/server/app/api/auth/company-oidc/route_client-reference-manifest.js +1 -1
  68. package/.next/standalone/.next/server/app/api/auth/default-login/route_client-reference-manifest.js +1 -1
  69. package/.next/standalone/.next/server/app/api/auth/identify/route_client-reference-manifest.js +1 -1
  70. package/.next/standalone/.next/server/app/api/auth/logout/route_client-reference-manifest.js +1 -1
  71. package/.next/standalone/.next/server/app/api/auth/me/route_client-reference-manifest.js +1 -1
  72. package/.next/standalone/.next/server/app/api/auth/sync-token/route_client-reference-manifest.js +1 -1
  73. package/.next/standalone/.next/server/app/api/comments/route_client-reference-manifest.js +1 -1
  74. package/.next/standalone/.next/server/app/api/daemon/connection-heartbeat/route_client-reference-manifest.js +1 -1
  75. package/.next/standalone/.next/server/app/api/daemon/control/route_client-reference-manifest.js +1 -1
  76. package/.next/standalone/.next/server/app/api/daemon/directory-request/report/route_client-reference-manifest.js +1 -1
  77. package/.next/standalone/.next/server/app/api/daemon/execution-state/route_client-reference-manifest.js +1 -1
  78. package/.next/standalone/.next/server/app/api/daemon/executions/route_client-reference-manifest.js +1 -1
  79. package/.next/standalone/.next/server/app/api/daemon/pending-turns/route_client-reference-manifest.js +1 -1
  80. package/.next/standalone/.next/server/app/api/daemon/report-interrupt/route_client-reference-manifest.js +1 -1
  81. package/.next/standalone/.next/server/app/api/daemon/resume/route_client-reference-manifest.js +1 -1
  82. package/.next/standalone/.next/server/app/api/daemon/transcript/route_client-reference-manifest.js +1 -1
  83. package/.next/standalone/.next/server/app/api/daemon/turn-advance/route_client-reference-manifest.js +1 -1
  84. package/.next/standalone/.next/server/app/api/daemon-directory-requests/[uuid]/route_client-reference-manifest.js +1 -1
  85. package/.next/standalone/.next/server/app/api/daemon-directory-requests/route_client-reference-manifest.js +1 -1
  86. package/.next/standalone/.next/server/app/api/daemon-sessions/[sessionUuid]/instruction/route_client-reference-manifest.js +1 -1
  87. package/.next/standalone/.next/server/app/api/daemon-sessions/[sessionUuid]/repoint/route_client-reference-manifest.js +1 -1
  88. package/.next/standalone/.next/server/app/api/daemon-sessions/[sessionUuid]/route_client-reference-manifest.js +1 -1
  89. package/.next/standalone/.next/server/app/api/daemon-sessions/ad-hoc/route_client-reference-manifest.js +1 -1
  90. package/.next/standalone/.next/server/app/api/daemon-sessions/route_client-reference-manifest.js +1 -1
  91. package/.next/standalone/.next/server/app/api/documents/[uuid]/route_client-reference-manifest.js +1 -1
  92. package/.next/standalone/.next/server/app/api/entities/[type]/[uuid]/root-idea/route_client-reference-manifest.js +1 -1
  93. package/.next/standalone/.next/server/app/api/events/notifications/route_client-reference-manifest.js +1 -1
  94. package/.next/standalone/.next/server/app/api/events/route.js +11 -9
  95. package/.next/standalone/.next/server/app/api/events/route_client-reference-manifest.js +1 -1
  96. package/.next/standalone/.next/server/app/api/health/route_client-reference-manifest.js +1 -1
  97. package/.next/standalone/.next/server/app/api/ideas/[uuid]/claim/route_client-reference-manifest.js +1 -1
  98. package/.next/standalone/.next/server/app/api/ideas/[uuid]/move/preview/route_client-reference-manifest.js +1 -1
  99. package/.next/standalone/.next/server/app/api/ideas/[uuid]/move/route_client-reference-manifest.js +1 -1
  100. package/.next/standalone/.next/server/app/api/ideas/[uuid]/parent/route_client-reference-manifest.js +1 -1
  101. package/.next/standalone/.next/server/app/api/ideas/[uuid]/release/route_client-reference-manifest.js +1 -1
  102. package/.next/standalone/.next/server/app/api/ideas/[uuid]/route_client-reference-manifest.js +1 -1
  103. package/.next/standalone/.next/server/app/api/ideas/[uuid]/wake-preview/route_client-reference-manifest.js +1 -1
  104. package/.next/standalone/.next/server/app/api/ideas/conversational/route_client-reference-manifest.js +1 -1
  105. package/.next/standalone/.next/server/app/api/mcp/route_client-reference-manifest.js +1 -1
  106. package/.next/standalone/.next/server/app/api/me/assignments/route_client-reference-manifest.js +1 -1
  107. package/.next/standalone/.next/server/app/api/mentionables/route_client-reference-manifest.js +1 -1
  108. package/.next/standalone/.next/server/app/api/notifications/[uuid]/archive/route_client-reference-manifest.js +1 -1
  109. package/.next/standalone/.next/server/app/api/notifications/[uuid]/read/route_client-reference-manifest.js +1 -1
  110. package/.next/standalone/.next/server/app/api/notifications/preferences/route_client-reference-manifest.js +1 -1
  111. package/.next/standalone/.next/server/app/api/notifications/read-all/route_client-reference-manifest.js +1 -1
  112. package/.next/standalone/.next/server/app/api/notifications/route_client-reference-manifest.js +1 -1
  113. package/.next/standalone/.next/server/app/api/notifications/unread-count/route_client-reference-manifest.js +1 -1
  114. package/.next/standalone/.next/server/app/api/project-groups/[uuid]/dashboard/route_client-reference-manifest.js +1 -1
  115. package/.next/standalone/.next/server/app/api/project-groups/[uuid]/route_client-reference-manifest.js +1 -1
  116. package/.next/standalone/.next/server/app/api/project-groups/route_client-reference-manifest.js +1 -1
  117. package/.next/standalone/.next/server/app/api/project-visits/pin/route_client-reference-manifest.js +1 -1
  118. package/.next/standalone/.next/server/app/api/project-visits/route_client-reference-manifest.js +1 -1
  119. package/.next/standalone/.next/server/app/api/project-visits/visit/route_client-reference-manifest.js +1 -1
  120. package/.next/standalone/.next/server/app/api/projects/[uuid]/activity/route_client-reference-manifest.js +1 -1
  121. package/.next/standalone/.next/server/app/api/projects/[uuid]/agent-cwds/route_client-reference-manifest.js +1 -1
  122. package/.next/standalone/.next/server/app/api/projects/[uuid]/available/route_client-reference-manifest.js +1 -1
  123. package/.next/standalone/.next/server/app/api/projects/[uuid]/documents/route_client-reference-manifest.js +1 -1
  124. package/.next/standalone/.next/server/app/api/projects/[uuid]/group/route_client-reference-manifest.js +1 -1
  125. package/.next/standalone/.next/server/app/api/projects/[uuid]/ideas/route_client-reference-manifest.js +1 -1
  126. package/.next/standalone/.next/server/app/api/projects/[uuid]/ideas/tracker/route_client-reference-manifest.js +1 -1
  127. package/.next/standalone/.next/server/app/api/projects/[uuid]/proposals/[proposalUuid]/validate/route_client-reference-manifest.js +1 -1
  128. package/.next/standalone/.next/server/app/api/projects/[uuid]/proposals/route_client-reference-manifest.js +1 -1
  129. package/.next/standalone/.next/server/app/api/projects/[uuid]/proposals/summary/route_client-reference-manifest.js +1 -1
  130. package/.next/standalone/.next/server/app/api/projects/[uuid]/resource-graph/route_client-reference-manifest.js +1 -1
  131. package/.next/standalone/.next/server/app/api/projects/[uuid]/route_client-reference-manifest.js +1 -1
  132. package/.next/standalone/.next/server/app/api/projects/[uuid]/stats/route_client-reference-manifest.js +1 -1
  133. package/.next/standalone/.next/server/app/api/projects/[uuid]/tasks/dependencies/route_client-reference-manifest.js +1 -1
  134. package/.next/standalone/.next/server/app/api/projects/[uuid]/tasks/route_client-reference-manifest.js +1 -1
  135. package/.next/standalone/.next/server/app/api/projects/agent-cwd-options/route_client-reference-manifest.js +1 -1
  136. package/.next/standalone/.next/server/app/api/projects/route_client-reference-manifest.js +1 -1
  137. package/.next/standalone/.next/server/app/api/proposals/[uuid]/approve/route_client-reference-manifest.js +1 -1
  138. package/.next/standalone/.next/server/app/api/proposals/[uuid]/close/route_client-reference-manifest.js +1 -1
  139. package/.next/standalone/.next/server/app/api/proposals/[uuid]/reject/route_client-reference-manifest.js +1 -1
  140. package/.next/standalone/.next/server/app/api/proposals/[uuid]/revoke/route_client-reference-manifest.js +1 -1
  141. package/.next/standalone/.next/server/app/api/proposals/[uuid]/route_client-reference-manifest.js +1 -1
  142. package/.next/standalone/.next/server/app/api/references/[uuid]/route_client-reference-manifest.js +1 -1
  143. package/.next/standalone/.next/server/app/api/references/route_client-reference-manifest.js +1 -1
  144. package/.next/standalone/.next/server/app/api/search/route_client-reference-manifest.js +1 -1
  145. package/.next/standalone/.next/server/app/api/session/route_client-reference-manifest.js +1 -1
  146. package/.next/standalone/.next/server/app/api/sessions/[uuid]/route_client-reference-manifest.js +1 -1
  147. package/.next/standalone/.next/server/app/api/tasks/[uuid]/claim/route_client-reference-manifest.js +1 -1
  148. package/.next/standalone/.next/server/app/api/tasks/[uuid]/dependencies/[dependsOnUuid]/route_client-reference-manifest.js +1 -1
  149. package/.next/standalone/.next/server/app/api/tasks/[uuid]/dependencies/route_client-reference-manifest.js +1 -1
  150. package/.next/standalone/.next/server/app/api/tasks/[uuid]/release/route_client-reference-manifest.js +1 -1
  151. package/.next/standalone/.next/server/app/api/tasks/[uuid]/route_client-reference-manifest.js +1 -1
  152. package/.next/standalone/.next/server/app/api/tasks/[uuid]/sessions/route_client-reference-manifest.js +1 -1
  153. package/.next/standalone/.next/server/app/index.html +2 -2
  154. package/.next/standalone/.next/server/app/index.rsc +1 -1
  155. package/.next/standalone/.next/server/app/login/admin/page_client-reference-manifest.js +1 -1
  156. package/.next/standalone/.next/server/app/login/admin.html +2 -2
  157. package/.next/standalone/.next/server/app/login/admin.rsc +1 -1
  158. package/.next/standalone/.next/server/app/login/callback/page_client-reference-manifest.js +1 -1
  159. package/.next/standalone/.next/server/app/login/callback.html +2 -2
  160. package/.next/standalone/.next/server/app/login/callback.rsc +1 -1
  161. package/.next/standalone/.next/server/app/login/page_client-reference-manifest.js +1 -1
  162. package/.next/standalone/.next/server/app/login/pick-workspace/page_client-reference-manifest.js +1 -1
  163. package/.next/standalone/.next/server/app/login/pick-workspace.html +2 -2
  164. package/.next/standalone/.next/server/app/login/pick-workspace.rsc +1 -1
  165. package/.next/standalone/.next/server/app/login.html +2 -2
  166. package/.next/standalone/.next/server/app/login.rsc +1 -1
  167. package/.next/standalone/.next/server/app/onboarding/page.js +2 -2
  168. package/.next/standalone/.next/server/app/onboarding/page.js.nft.json +1 -1
  169. package/.next/standalone/.next/server/app/onboarding/page_client-reference-manifest.js +1 -1
  170. package/.next/standalone/.next/server/app/onboarding.html +2 -2
  171. package/.next/standalone/.next/server/app/onboarding.rsc +2 -2
  172. package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
  173. package/.next/standalone/.next/server/app/projects.html +2 -2
  174. package/.next/standalone/.next/server/app/projects.rsc +3 -3
  175. package/.next/standalone/.next/server/app/settings.html +2 -2
  176. package/.next/standalone/.next/server/app/settings.rsc +3 -3
  177. package/.next/standalone/.next/server/app-paths-manifest.json +36 -36
  178. package/.next/standalone/.next/server/chunks/1318.js +1 -1
  179. package/.next/standalone/.next/server/chunks/1559.js +2 -2
  180. package/.next/standalone/.next/server/chunks/{5737.js → 2536.js} +6 -4
  181. package/.next/standalone/.next/server/chunks/2572.js +1 -1
  182. package/.next/standalone/.next/server/chunks/2953.js +1 -0
  183. package/.next/standalone/.next/server/chunks/2961.js +1 -1
  184. package/.next/standalone/.next/server/chunks/4827.js +1 -1
  185. package/.next/standalone/.next/server/chunks/5162.js +1 -0
  186. package/.next/standalone/.next/server/chunks/5245.js +1 -1
  187. package/.next/standalone/.next/server/chunks/{7822.js → 6080.js} +1 -1
  188. package/.next/standalone/.next/server/chunks/6113.js +1 -1
  189. package/.next/standalone/.next/server/chunks/6515.js +2 -2
  190. package/.next/standalone/.next/server/chunks/6689.js +1 -0
  191. package/.next/standalone/.next/server/chunks/679.js +1 -1
  192. package/.next/standalone/.next/server/chunks/7368.js +1 -1
  193. package/.next/standalone/.next/server/chunks/7530.js +1 -1
  194. package/.next/standalone/.next/server/chunks/920.js +1 -1
  195. package/.next/standalone/.next/server/chunks/9213.js +1 -1
  196. package/.next/standalone/.next/server/chunks/9378.js +1 -1
  197. package/.next/standalone/.next/server/chunks/9667.js +1 -0
  198. package/.next/standalone/.next/server/chunks/9931.js +1 -1
  199. package/.next/standalone/.next/server/middleware-build-manifest.js +1 -1
  200. package/.next/standalone/.next/server/middleware-manifest.json +5 -5
  201. package/.next/standalone/.next/server/pages/404.html +2 -2
  202. package/.next/standalone/.next/server/pages/500.html +1 -1
  203. package/.next/standalone/.next/server/server-reference-manifest.js +1 -1
  204. package/.next/standalone/.next/server/server-reference-manifest.json +1 -1
  205. package/.next/standalone/.next/static/chunks/{11595.32f7dedc4fd7e3e1.js → 11595.b81c0bf7732c3b62.js} +1 -1
  206. package/.next/standalone/.next/static/chunks/{26494-5a04e150431b0233.js → 24808-e3d95efc7ec039c5.js} +1 -1
  207. package/.next/standalone/.next/static/chunks/{31308-bb4a97b3f39c22dd.js → 31308-32614efb88305738.js} +1 -1
  208. package/.next/standalone/.next/static/chunks/{33456.87f86ce6041405e0.js → 33456.cfc9aa607a62e879.js} +1 -1
  209. package/.next/standalone/.next/static/chunks/{4860.9457e021394e9399.js → 4860.41351a823cf400e4.js} +1 -1
  210. package/.next/standalone/.next/static/chunks/51468-194d894e563580dd.js +1 -0
  211. package/.next/standalone/.next/static/chunks/61570-527701d072d00a24.js +1 -0
  212. package/.next/standalone/.next/static/chunks/65066-6da35d5cb080c7f5.js +1 -0
  213. package/.next/standalone/.next/static/chunks/72875-0987d09cd8406614.js +1 -0
  214. package/.next/standalone/.next/static/chunks/75936-79860953212592fd.js +1 -0
  215. package/.next/standalone/.next/static/chunks/79919-e02963faee5cb563.js +1 -0
  216. package/.next/standalone/.next/static/chunks/94643-e8f5fa25e2340cc8.js +1 -0
  217. package/.next/standalone/.next/static/chunks/{99373.aed267aa48c5bdd0.js → 99373.633f7c25e64bcdac.js} +1 -1
  218. package/.next/standalone/.next/static/chunks/app/(dashboard)/layout-bb5ef11586301c72.js +1 -0
  219. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/dashboard/{page-f4810f1b9f39d1ae.js → page-eecb38fa4b8eb4e8.js} +1 -1
  220. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/documents/[documentUuid]/{page-721d2152f1a28c88.js → page-725373108da1b08c.js} +1 -1
  221. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/documents/page-cd7ec77596304a07.js +1 -0
  222. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/graph/{page-f31ad2eebe257628.js → page-97a9e6f949002004.js} +1 -1
  223. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/proposals/[proposalUuid]/page-7d2f4713697eb0a7.js +1 -0
  224. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/proposals/new/page-cec15f4b835d34fc.js +1 -0
  225. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/proposals/page-0225f87552b977d9.js +1 -0
  226. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/tasks/[taskUuid]/{page-53ce4468844cc84f.js → page-4ee117e690fda56f.js} +1 -1
  227. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/tasks/{page-1c374d19e8046d9a.js → page-7fbc46dfb7b22bd3.js} +1 -1
  228. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/{page-31d6f8e82c7f5366.js → page-069c9738e516436b.js} +1 -1
  229. package/.next/standalone/.next/static/chunks/app/(dashboard)/settings/page-8b30678a58e7b2ee.js +1 -0
  230. package/.next/standalone/.next/static/chunks/app/onboarding/{page-d082f9b60ad03057.js → page-4fce966dc96d4ff1.js} +1 -1
  231. package/.next/standalone/.next/static/chunks/{webpack-e2e0ef50652d5791.js → webpack-1bfc783412a06fc5.js} +1 -1
  232. package/.next/standalone/package.json +1 -1
  233. package/.next/standalone/public/chorus-plugin/.claude-plugin/plugin.json +1 -1
  234. package/.next/standalone/public/chorus-plugin/bin/chorus-api.sh +1 -1
  235. package/.next/standalone/public/chorus-plugin/skills/brainstorm/SKILL.md +1 -1
  236. package/.next/standalone/public/chorus-plugin/skills/chorus/SKILL.md +2 -2
  237. package/.next/standalone/public/chorus-plugin/skills/chorus-cli/SKILL.md +11 -1
  238. package/.next/standalone/public/chorus-plugin/skills/develop/SKILL.md +2 -2
  239. package/.next/standalone/public/chorus-plugin/skills/docs/SKILL.md +1 -1
  240. package/.next/standalone/public/chorus-plugin/skills/idea/SKILL.md +1 -1
  241. package/.next/standalone/public/chorus-plugin/skills/openspec-aware/SKILL.md +1 -1
  242. package/.next/standalone/public/chorus-plugin/skills/orchestrate/SKILL.md +1 -1
  243. package/.next/standalone/public/chorus-plugin/skills/proposal/SKILL.md +1 -1
  244. package/.next/standalone/public/chorus-plugin/skills/quick-dev/SKILL.md +1 -1
  245. package/.next/standalone/public/chorus-plugin/skills/review/SKILL.md +1 -1
  246. package/.next/standalone/public/chorus-plugin/skills/yolo/SKILL.md +3 -3
  247. package/.next/standalone/public/kiro-plugin/.kiro/skills/chorus-brainstorm/SKILL.md +1 -1
  248. package/.next/standalone/public/kiro-plugin/.kiro/skills/chorus-cli/SKILL.md +11 -1
  249. package/.next/standalone/public/kiro-plugin/.kiro/skills/chorus-develop/SKILL.md +2 -2
  250. package/.next/standalone/public/kiro-plugin/.kiro/skills/chorus-docs/SKILL.md +1 -1
  251. package/.next/standalone/public/kiro-plugin/.kiro/skills/chorus-idea/SKILL.md +1 -1
  252. package/.next/standalone/public/kiro-plugin/.kiro/skills/chorus-openspec-aware/SKILL.md +1 -1
  253. package/.next/standalone/public/kiro-plugin/.kiro/skills/chorus-orchestrate/SKILL.md +1 -1
  254. package/.next/standalone/public/kiro-plugin/.kiro/skills/chorus-proposal/SKILL.md +1 -1
  255. package/.next/standalone/public/kiro-plugin/.kiro/skills/chorus-quick-dev/SKILL.md +1 -1
  256. package/.next/standalone/public/kiro-plugin/.kiro/skills/chorus-review/SKILL.md +1 -1
  257. package/.next/standalone/public/kiro-plugin/.kiro/skills/chorus-yolo/SKILL.md +3 -3
  258. package/.next/standalone/public/kiro-plugin/.kiro/steering/chorus.md +1 -1
  259. package/.next/standalone/public/kiro-plugin/bin/chorus-api.sh +1 -1
  260. package/.next/standalone/public/skill/chorus/SKILL.md +1 -1
  261. package/.next/standalone/public/skill/develop-chorus/SKILL.md +1 -1
  262. package/.next/standalone/public/skill/yolo-chorus/SKILL.md +2 -2
  263. package/README.ja.md +2 -0
  264. package/README.ko.md +2 -0
  265. package/README.md +2 -0
  266. package/README.zh.md +2 -0
  267. package/cli/agent-backend-prompt.mjs +5 -0
  268. package/cli/agent-launcher.mjs +341 -0
  269. package/cli/agents.mjs +12 -0
  270. package/cli/credentials.mjs +102 -0
  271. package/cli/daemon-agent.mjs +4 -2
  272. package/cli/init/adapters.mjs +5 -5
  273. package/cli/init/agent-type-map.mjs +5 -5
  274. package/cli/init/install-methods.mjs +124 -10
  275. package/cli/init/pi-mcp-config.mjs +166 -0
  276. package/cli/init/steps/credential-seed.mjs +56 -3
  277. package/cli/pi-spawner.mjs +286 -0
  278. package/cli/spawner-select.mjs +7 -1
  279. package/cli/upload-hooks.mjs +25 -1
  280. package/package.json +1 -1
  281. package/.next/standalone/.next/server/chunks/1073.js +0 -1
  282. package/.next/standalone/.next/server/chunks/6487.js +0 -1
  283. package/.next/standalone/.next/server/chunks/7770.js +0 -1
  284. package/.next/standalone/.next/server/chunks/8586.js +0 -1
  285. package/.next/standalone/.next/static/chunks/11998-27dcf858173fc015.js +0 -1
  286. package/.next/standalone/.next/static/chunks/12070-426bb88f5179812b.js +0 -1
  287. package/.next/standalone/.next/static/chunks/17409-67dbc0a3f4cbc207.js +0 -1
  288. package/.next/standalone/.next/static/chunks/4166-85352630c29e2c2b.js +0 -1
  289. package/.next/standalone/.next/static/chunks/65807-086d83649f593a5a.js +0 -1
  290. package/.next/standalone/.next/static/chunks/79919-56796c262f51fa82.js +0 -1
  291. package/.next/standalone/.next/static/chunks/94643-87ee1ede6d955937.js +0 -1
  292. package/.next/standalone/.next/static/chunks/app/(dashboard)/layout-9219c4de1012f0fb.js +0 -1
  293. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/documents/page-9bcff40805f39b25.js +0 -1
  294. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/proposals/[proposalUuid]/page-a4fb04068539c4ce.js +0 -1
  295. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/proposals/new/page-b1d2af10e9bc7e09.js +0 -1
  296. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/proposals/page-2cb245b0602a3c85.js +0 -1
  297. package/.next/standalone/.next/static/chunks/app/(dashboard)/settings/page-32bff791b19a0a58.js +0 -1
  298. /package/.next/standalone/.next/static/{_s4RZW3efB1g0lrKgLiZ7 → WSN4XeA1kUCI6CeEHcaT_}/_buildManifest.js +0 -0
  299. /package/.next/standalone/.next/static/{_s4RZW3efB1g0lrKgLiZ7 → WSN4XeA1kUCI6CeEHcaT_}/_ssgManifest.js +0 -0
@@ -0,0 +1,341 @@
1
+ // cli/agent-launcher.mjs
2
+ // `chorus agents run` — launch a configured coding-agent binary in the FOREGROUND
3
+ // with the selected Chorus agent's connection + identity injected into the child
4
+ // environment only. This is the interactive counterpart to the daemon's headless
5
+ // spawners (claude-spawner / codex-spawner / …): it reuses the SAME env-injection
6
+ // contract (CHORUS_URL / CHORUS_API_KEY / CHORUS_AGENT_PROFILE) and the SAME
7
+ // shell-free PATH resolution, but differs deliberately —
8
+ // • stdio is INHERITED (the agent gets the real TTY; Ctrl-C reaches it directly),
9
+ // • CHORUS_DAEMON_HEADLESS is NOT set (and is cleared if it leaked in),
10
+ // • every token after `--` is passed to the agent VERBATIM, with no validation,
11
+ // • the child's exit (code or signal) is forwarded as this command's exit code.
12
+ //
13
+ // SECRET RULE: the `cho_` API key is injected into the child env only. It is NEVER
14
+ // written to stdout, stderr, or any log — diagnostics name the agent by
15
+ // name/UUID and the resolved binary, nothing else.
16
+
17
+ import { spawn } from "node:child_process";
18
+ import { statSync } from "node:fs";
19
+ import { win32 as pathWin32, posix as pathPosix } from "node:path";
20
+ import { resolveLaunchAgent } from "./credentials.mjs";
21
+
22
+ /**
23
+ * Launch agent-type → executable base name. Launch is a SUPERSET of daemon wake:
24
+ * it can start ANY known agent, including the ones the daemon classifies
25
+ * "offline" (opencode / openclaw / dsh) and therefore never auto-wakes. The
26
+ * "offline" value itself is intentionally ABSENT: it is a wake classification,
27
+ * not a concrete backend, so it cannot name a binary — a user who added such an
28
+ * agent must pass an explicit `--type` (see resolveBinaryName).
29
+ * @type {Readonly<Record<string,string>>}
30
+ */
31
+ export const TYPE_TO_BINARY = Object.freeze({
32
+ "claude-code": "claude",
33
+ claude: "claude",
34
+ codex: "codex",
35
+ kiro: "kiro-cli",
36
+ pi: "pi",
37
+ opencode: "opencode",
38
+ openclaw: "openclaw",
39
+ dsh: "dsh-jsonrpc-agent",
40
+ });
41
+
42
+ /** Human list of accepted --type values, for help + error text. */
43
+ export const SUPPORTED_TYPES = "claude-code, codex, kiro, pi, opencode, openclaw, dsh";
44
+
45
+ /**
46
+ * POSIX signal name → number, for the shell `128 + signum` exit convention when
47
+ * the launched agent is terminated by a signal (e.g. Ctrl-C = SIGINT → 130).
48
+ * Node's `close` event yields a signal NAME (or null); a naive `exit(code)` with
49
+ * code=null would collapse a signal death to exit 0 and hide it.
50
+ */
51
+ const SIGNUM = Object.freeze({
52
+ SIGHUP: 1,
53
+ SIGINT: 2,
54
+ SIGQUIT: 3,
55
+ SIGILL: 4,
56
+ SIGABRT: 6,
57
+ SIGFPE: 8,
58
+ SIGKILL: 9,
59
+ SIGSEGV: 11,
60
+ SIGPIPE: 13,
61
+ SIGALRM: 14,
62
+ SIGTERM: 15,
63
+ });
64
+
65
+ /** A non-empty trimmed string, or undefined. */
66
+ function nonEmpty(value) {
67
+ return typeof value === "string" && value.trim() ? value.trim() : undefined;
68
+ }
69
+
70
+ /**
71
+ * Split raw `chorus agents run` argv into chorus-owned flags and verbatim
72
+ * passthrough. The FIRST bare `--` terminates chorus-flag parsing; everything
73
+ * after it is passthrough, untouched. Chorus flags (before `--`): `--name <v>` /
74
+ * `--name=<v>`, its `--agent` alias, `--type <v>` / `--type=<v>`, and `--help`/`-h`.
75
+ * The first token that is NOT a recognized chorus flag also starts the
76
+ * passthrough (lenient) — so `chorus agents run --name x foo --bar` treats
77
+ * `foo --bar` as passthrough even without an explicit `--`.
78
+ *
79
+ * @param {string[]} argv argv AFTER the `run` sub-verb.
80
+ * @returns {{ name?: string, type?: string, help: boolean, passthrough: string[], error?: string }}
81
+ */
82
+ export function parseRunArgs(argv = []) {
83
+ const out = { help: false, passthrough: [] };
84
+ let i = 0;
85
+ for (; i < argv.length; i += 1) {
86
+ const tok = argv[i];
87
+ if (tok === "--") {
88
+ i += 1; // consume the separator; the rest is passthrough
89
+ break;
90
+ }
91
+ if (tok === "--help" || tok === "-h") {
92
+ out.help = true;
93
+ continue;
94
+ }
95
+ if (tok === "--name" || tok === "--agent") {
96
+ const v = argv[i + 1];
97
+ if (v === undefined) return { ...out, error: `flag ${tok} needs a value` };
98
+ out.name = v;
99
+ i += 1;
100
+ continue;
101
+ }
102
+ if (tok.startsWith("--name=")) {
103
+ out.name = tok.slice("--name=".length);
104
+ continue;
105
+ }
106
+ if (tok.startsWith("--agent=")) {
107
+ out.name = tok.slice("--agent=".length);
108
+ continue;
109
+ }
110
+ if (tok === "--type") {
111
+ const v = argv[i + 1];
112
+ if (v === undefined) return { ...out, error: `flag --type needs a value` };
113
+ out.type = v;
114
+ i += 1;
115
+ continue;
116
+ }
117
+ if (tok.startsWith("--type=")) {
118
+ out.type = tok.slice("--type=".length);
119
+ continue;
120
+ }
121
+ // Unrecognized token → start of verbatim passthrough.
122
+ break;
123
+ }
124
+ out.passthrough = argv.slice(i);
125
+ return out;
126
+ }
127
+
128
+ /**
129
+ * Resolve the agent type (explicit `--type` wins over the stored `agentType`)
130
+ * and map it to a binary base name. An `offline` classification or any unknown
131
+ * type has no launchable binary → returns an `error` string instructing the user
132
+ * to pass an explicit `--type`.
133
+ * @param {string|undefined} explicitType the `--type` flag value
134
+ * @param {string|undefined} configType the agent's stored agentType
135
+ * @returns {{ type: string, binary: string } | { error: string }}
136
+ */
137
+ export function resolveBinaryName(explicitType, configType) {
138
+ const type = nonEmpty(explicitType) ?? nonEmpty(configType);
139
+ if (!type) {
140
+ return { error: `no agent type given and none is configured — pass --type <${SUPPORTED_TYPES}>` };
141
+ }
142
+ const binary = TYPE_TO_BINARY[type];
143
+ if (!binary) {
144
+ const reason =
145
+ type === "offline"
146
+ ? `agent is configured as "offline" (the daemon does not auto-wake it, so its concrete backend is not stored)`
147
+ : `unknown agent type "${type}"`;
148
+ return { error: `${reason} — pass an explicit --type <${SUPPORTED_TYPES}>` };
149
+ }
150
+ return { type, binary };
151
+ }
152
+
153
+ /**
154
+ * Resolve an executable base name to a full path WITHOUT a shell, walking PATH.
155
+ * On Windows, tries `.cmd` / `.exe` / bare (npm shims are `.cmd`); on POSIX just
156
+ * the bare name. Mirrors resolveClaudePath's shape. Returns null when not found.
157
+ * @param {string} binName
158
+ * @param {{ env?: NodeJS.ProcessEnv, platform?: NodeJS.Platform, isFile?: (p: string) => boolean }} [deps]
159
+ * @returns {string | null}
160
+ */
161
+ export function resolveBinaryPath(binName, deps = {}) {
162
+ const env = deps.env ?? process.env;
163
+ const platform = deps.platform ?? process.platform;
164
+ const isFile =
165
+ deps.isFile ??
166
+ ((p) => {
167
+ try {
168
+ return statSync(p).isFile();
169
+ } catch {
170
+ return false;
171
+ }
172
+ });
173
+ const isWin = platform === "win32";
174
+ const p = isWin ? pathWin32 : pathPosix;
175
+ const names = isWin ? [`${binName}.cmd`, `${binName}.exe`, binName] : [binName];
176
+ const pathVar = env.PATH || env.Path || "";
177
+ const dirs = pathVar.split(p.delimiter).filter(Boolean);
178
+ for (const dir of dirs) {
179
+ for (const name of names) {
180
+ const candidate = p.join(dir, name);
181
+ if (isFile(candidate)) return candidate;
182
+ }
183
+ }
184
+ return null;
185
+ }
186
+
187
+ /**
188
+ * Resolve the actual command + argv to spawn. A Windows `.cmd`/`.bat` shim is not
189
+ * a PE executable, so it must run via `cmd.exe /d /s /c <path> …args`; keep
190
+ * shell:false and pass argv as an array (no shell word-splitting/injection). On
191
+ * POSIX (and a real `.exe`) spawn the path directly.
192
+ * @param {string} binPath @param {string[]} args
193
+ * @param {NodeJS.Platform} [platform] @param {NodeJS.ProcessEnv} [env]
194
+ * @returns {{ command: string, argv: string[] }}
195
+ */
196
+ export function resolveSpawnCommand(binPath, args, platform = process.platform, env = process.env) {
197
+ const isWin = platform === "win32";
198
+ const lower = binPath.toLowerCase();
199
+ if (isWin && (lower.endsWith(".cmd") || lower.endsWith(".bat"))) {
200
+ const comspec = env.ComSpec || env.COMSPEC || "cmd.exe";
201
+ return { command: comspec, argv: ["/d", "/s", "/c", binPath, ...args] };
202
+ }
203
+ return { command: binPath, argv: args };
204
+ }
205
+
206
+ /**
207
+ * Build the child environment: the inherited env plus the selected agent's Chorus
208
+ * connection + identity. NO CHORUS_DAEMON_HEADLESS — this is an interactive run;
209
+ * a leaked value from a daemon-run parent is cleared so the agent does not adopt
210
+ * headless behavior. Only non-empty fields are set.
211
+ * @param {import("./credentials.mjs").LaunchAgent} agent
212
+ * @param {NodeJS.ProcessEnv} [baseEnv]
213
+ * @returns {NodeJS.ProcessEnv}
214
+ */
215
+ export function buildChildEnv(agent, baseEnv = process.env) {
216
+ const childEnv = { ...baseEnv };
217
+ if (agent.url) childEnv.CHORUS_URL = agent.url;
218
+ if (agent.apiKey) childEnv.CHORUS_API_KEY = agent.apiKey;
219
+ const profile = agent.agentUuid || agent.agentName;
220
+ if (profile) childEnv.CHORUS_AGENT_PROFILE = profile;
221
+ delete childEnv.CHORUS_DAEMON_HEADLESS;
222
+ return childEnv;
223
+ }
224
+
225
+ /** Usage text for `chorus agents run`. */
226
+ export function runHelpText(version = "") {
227
+ const v = version ? ` v${version}` : "";
228
+ return `\
229
+ Chorus${v} — launch a configured agent
230
+
231
+ USAGE
232
+ chorus agents run --name <name|uuid> [--type <type>] [--] [agent args…]
233
+
234
+ Launches the agent's binary in the FOREGROUND with this agent's Chorus connection
235
+ 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.
238
+
239
+ FLAGS
240
+ --name <name|uuid> Which configured agent to launch (default: the only one).
241
+ --type <type> Override the agent's backend: ${SUPPORTED_TYPES}.
242
+ -h, --help Show this help.
243
+
244
+ Notes
245
+ • Agents added as opencode / openclaw / dsh are stored as "offline"; pass
246
+ --type explicitly to launch them.
247
+ • The API key is injected into the launched process only — never printed.
248
+ `;
249
+ }
250
+
251
+ /**
252
+ * Run `chorus agents run …`. Selects the agent, resolves its binary, injects the
253
+ * Chorus env, and spawns it in the foreground. Resolves with an exit code (never
254
+ * calls process.exit): the launched agent's code, `128 + signum` on signal death,
255
+ * `1` on any launch failure, `2` on a usage error, `0` on --help.
256
+ *
257
+ * @param {string[]} argv argv AFTER the `run` sub-verb.
258
+ * @param {{ stdout?: {write:(s:string)=>void}, stderr?: {write:(s:string)=>void},
259
+ * env?: NodeJS.ProcessEnv, readJson?: (p:string)=>any, loginPath?: string,
260
+ * platform?: NodeJS.Platform, cwd?: string, version?: string,
261
+ * spawnImpl?: Function, isFile?: (p:string)=>boolean }} [opts]
262
+ * @returns {Promise<number>}
263
+ */
264
+ export async function runAgentLaunch(argv = [], opts = {}) {
265
+ const out = opts.stdout ?? process.stdout;
266
+ const err = opts.stderr ?? process.stderr;
267
+ const env = opts.env ?? process.env;
268
+ const platform = opts.platform ?? process.platform;
269
+ const spawnImpl = opts.spawnImpl ?? spawn;
270
+ const version = opts.version ?? "";
271
+
272
+ const parsed = parseRunArgs(argv);
273
+ if (parsed.help) {
274
+ out.write(runHelpText(version));
275
+ return 0;
276
+ }
277
+ if (parsed.error) {
278
+ err.write(`error: ${parsed.error}\n\n${runHelpText(version)}`);
279
+ return 2;
280
+ }
281
+
282
+ // 1. Select which configured agent to launch.
283
+ let agent;
284
+ try {
285
+ agent = resolveLaunchAgent({ name: parsed.name }, opts);
286
+ } catch (e) {
287
+ err.write(`error: ${e.message}\n`);
288
+ return 1;
289
+ }
290
+
291
+ // 2. Resolve the type → binary (explicit --type wins over stored agentType).
292
+ const typeRes = resolveBinaryName(parsed.type, agent.agentType);
293
+ if (typeRes.error) {
294
+ err.write(`error: ${agent.label}: ${typeRes.error}\n`);
295
+ return 1;
296
+ }
297
+
298
+ // 3. Locate the binary on PATH.
299
+ const binPath = resolveBinaryPath(typeRes.binary, { env, platform, isFile: opts.isFile });
300
+ if (!binPath) {
301
+ err.write(
302
+ `error: could not find the \`${typeRes.binary}\` executable on PATH ` +
303
+ `(agent "${agent.label}", type "${typeRes.type}"). Is it installed?\n`,
304
+ );
305
+ return 1;
306
+ }
307
+
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);
311
+
312
+ // Diagnostic — agent name/uuid + binary ONLY. Never the key or url userinfo.
313
+ out.write(`Launching ${agent.label} (${agent.agentUuid ?? "no uuid"}) → ${typeRes.binary}\n`);
314
+
315
+ return new Promise((resolve) => {
316
+ let child;
317
+ try {
318
+ child = spawnImpl(command, spawnArgv, {
319
+ cwd: opts.cwd ?? process.cwd(),
320
+ stdio: "inherit",
321
+ env: childEnv,
322
+ shell: false,
323
+ });
324
+ } catch (e) {
325
+ err.write(`error: failed to launch ${typeRes.binary}: ${e.message}\n`);
326
+ resolve(1);
327
+ return;
328
+ }
329
+ child.on("error", (e) => {
330
+ err.write(`error: ${typeRes.binary} failed to start: ${e.message}\n`);
331
+ resolve(1);
332
+ });
333
+ child.on("close", (code, signal) => {
334
+ if (signal) {
335
+ resolve(128 + (SIGNUM[signal] ?? 0));
336
+ return;
337
+ }
338
+ resolve(typeof code === "number" ? code : 0);
339
+ });
340
+ });
341
+ }
package/cli/agents.mjs CHANGED
@@ -67,6 +67,10 @@ USAGE
67
67
  chorus agents add [flags] Configure agent(s): detect, install plugin, seed
68
68
  credentials (formerly \`chorus init\`; same flags —
69
69
  see \`chorus agents add --help\`)
70
+ chorus agents run --name <n> [--type <t>] -- [args…]
71
+ Launch an agent's binary in the foreground with its
72
+ Chorus connection injected; args after \`--\` pass
73
+ through verbatim (see \`chorus agents run --help\`)
70
74
  chorus agents remove <name|uuid> Remove a configured agent from ~/.chorus/daemon.json
71
75
 
72
76
  Each listed UUID or name is a valid value for \`chorus mcp --agent <name|uuid>\` or the
@@ -316,6 +320,14 @@ export function runAgents(argv = [], opts = {}) {
316
320
  const runInit = opts.runInit ?? (async (a, o) => (await import("./init.mjs")).runInit(a, o));
317
321
  return runInit(argv.slice(1), { version });
318
322
  }
323
+ if (first === "run") {
324
+ // Foreground agent launch. Dynamic import keeps the list/remove paths from
325
+ // loading the launcher (and its child_process import). Forward the full opts
326
+ // (env/readJson/loginPath/spawnImpl/stdio) so tests can inject them.
327
+ const runAgentLaunch =
328
+ opts.runAgentLaunch ?? (async (a, o) => (await import("./agent-launcher.mjs")).runAgentLaunch(a, o));
329
+ return runAgentLaunch(argv.slice(1), { ...opts, version });
330
+ }
319
331
  if (first === "remove") {
320
332
  return removeAgent(argv.slice(1), opts);
321
333
  }
@@ -380,3 +380,105 @@ export function resolveMcpCredentials(flags = {}, deps = {}) {
380
380
  const flat = resolveCredentials(flags, deps);
381
381
  return { url: flat.url, apiKey: flat.apiKey, label: flat.source };
382
382
  }
383
+
384
+ /**
385
+ * @typedef {Object} LaunchAgent
386
+ * @property {string|undefined} url
387
+ * @property {string|undefined} apiKey
388
+ * @property {string|undefined} agentUuid
389
+ * @property {string|undefined} agentName
390
+ * @property {string|undefined} agentType The daemon agentType stored in daemon.json
391
+ * ("claude-code" | "codex" | "kiro" | "pi" | "offline" | …). The launcher maps this
392
+ * (or an explicit --type) to a binary.
393
+ * @property {string} label Diagnostic display label (name/uuid), never the key.
394
+ */
395
+
396
+ /**
397
+ * Resolve WHICH configured agent to launch (`chorus agents run`), returning the
398
+ * selected `agents[]` entry INCLUDING its `agentType` — the field the launcher
399
+ * needs to pick a binary and which `resolveMcpCredentials` deliberately drops.
400
+ *
401
+ * Selection precedence (mirrors `resolveMcpCredentials`, minus the url+key env/flag
402
+ * fallbacks — a launch always acts as a configured agent):
403
+ * 1. explicit selector: `flags.name` (the `--name` flag) or `flags.agent`
404
+ * (`--agent` alias), matched against each entry's agentUuid / agentName /
405
+ * label / name (exact). No match → error; >1 match → ambiguity error.
406
+ * 2. `CHORUS_AGENT_PROFILE` env, same matching.
407
+ * 3. exactly one configured agent → that agent.
408
+ * 4. more than one and nothing specified → error (never pick silently).
409
+ * No `agents[]` at all → error telling the user to configure one.
410
+ *
411
+ * Each entry's url/apiKey merges over the top-level per-field defaults
412
+ * (`resolveCredentialDefaults`), same as `resolveMcpCredentials`. This never
413
+ * imports daemon-config.mjs (which imports this module) — it reads `agents[]`
414
+ * directly to stay cycle-free.
415
+ *
416
+ * @param {{ name?: string, agent?: string, url?: string, apiKey?: string }} flags
417
+ * @param {ResolveDeps} [deps]
418
+ * @returns {LaunchAgent}
419
+ * @throws {Error} on ambiguity, no match, or no configured agents.
420
+ */
421
+ export function resolveLaunchAgent(flags = {}, deps = {}) {
422
+ const env = deps.env ?? process.env;
423
+ const readJson = deps.readJson ?? readJsonSafe;
424
+ const loginPath = deps.loginPath ?? loginFilePath();
425
+ const wanted = nonEmpty(flags.name) ?? nonEmpty(flags.agent) ?? nonEmpty(env.CHORUS_AGENT_PROFILE);
426
+
427
+ const file = readJson(loginPath);
428
+ const agentEntries =
429
+ file && Array.isArray(file.agents)
430
+ ? file.agents.filter((a) => a && typeof a === "object")
431
+ : [];
432
+ if (agentEntries.length === 0) {
433
+ throw new Error(
434
+ `No agents are configured in ${loginPath}. Run \`chorus agents add\` to configure one.`,
435
+ );
436
+ }
437
+
438
+ const defaults = resolveCredentialDefaults(flags, deps);
439
+ const labelOf = (entry, i) =>
440
+ nonEmpty(entry.agentName) ?? nonEmpty(entry.label) ?? nonEmpty(entry.name) ?? `agents[${i}]`;
441
+ const resolved = agentEntries.map((entry, i) => ({
442
+ label: labelOf(entry, i),
443
+ keys: [entry.agentUuid, entry.agentName, entry.label, entry.name]
444
+ .map((k) => nonEmpty(k))
445
+ .filter((k) => k !== undefined),
446
+ url: nonEmpty(entry.url) ?? defaults.url,
447
+ apiKey: nonEmpty(entry.apiKey) ?? defaults.apiKey,
448
+ agentUuid: nonEmpty(entry.agentUuid),
449
+ agentName: nonEmpty(entry.agentName) ?? nonEmpty(entry.name),
450
+ agentType: nonEmpty(entry.agentType),
451
+ }));
452
+ const labels = resolved.map((a) => a.label).join(", ");
453
+
454
+ let selected;
455
+ if (wanted) {
456
+ const matches = resolved.filter((a) => a.keys.includes(wanted));
457
+ if (matches.length === 0) {
458
+ throw new Error(`No configured agent matches "${wanted}" in ${loginPath}. Available: ${labels}.`);
459
+ }
460
+ if (matches.length > 1) {
461
+ throw new Error(
462
+ `"${wanted}" is ambiguous in ${loginPath} — it matches ${matches.length} agents ` +
463
+ `(${matches.map((m) => m.label).join(", ")}). Use the agent UUID to disambiguate.`,
464
+ );
465
+ }
466
+ selected = matches[0];
467
+ } else if (resolved.length === 1) {
468
+ selected = resolved[0];
469
+ } else {
470
+ throw new Error(
471
+ `Multiple agents are configured in ${loginPath} (${labels}). ` +
472
+ `Specify which one to launch with --name <name|uuid> or CHORUS_AGENT_PROFILE.`,
473
+ );
474
+ }
475
+
476
+ return {
477
+ url: selected.url,
478
+ apiKey: selected.apiKey,
479
+ agentUuid: selected.agentUuid,
480
+ agentName: selected.agentName,
481
+ agentType: selected.agentType,
482
+ label: selected.label,
483
+ };
484
+ }
@@ -27,8 +27,8 @@ import { loginFilePath } from "./credentials.mjs";
27
27
  * fail-closed no-wake handling lives in spawner-select.mjs (selectSpawner returns
28
28
  * an OfflineSpawner that refuses to spawn) — an offline value MUST NOT fall through
29
29
  * to the claude-code default and wake it. `chorus agents add` maps every non-wakeable
30
- * selected agent (opencode/openclaw/pi/dsh) to this classification. */
31
- export const KNOWN_AGENTS = ["claude-code", "codex", "kiro", "dsh", "offline"];
30
+ * selected agent (opencode/openclaw) to this classification. */
31
+ export const KNOWN_AGENTS = ["claude-code", "codex", "kiro", "dsh", "pi", "offline"];
32
32
 
33
33
  /** The default agent backend when neither --agent nor CHORUS_AGENT is set. */
34
34
  export const DEFAULT_AGENT = "claude-code";
@@ -45,6 +45,7 @@ export function backendCli(agentType) {
45
45
  if (agentType === "codex") return { name: "codex", envVar: "CHORUS_CODEX_PATH" };
46
46
  if (agentType === "kiro") return { name: "kiro-cli", envVar: "CHORUS_KIRO_PATH" };
47
47
  if (agentType === "dsh") return { name: "dsh-jsonrpc-agent", envVar: "CHORUS_DSH_PATH" };
48
+ if (agentType === "pi") return { name: "pi", envVar: "CHORUS_PI_PATH" };
48
49
  // `offline` has no CLI to resolve — it is never woken (see backendClientType).
49
50
  // The daemon does not probe a binary for it; this explicit descriptor keeps the
50
51
  // return sensible if some banner path ever reads it (CHORUS_AGENT selects the
@@ -65,6 +66,7 @@ export function backendClientType(agentType) {
65
66
  if (agentType === "codex") return "codex";
66
67
  if (agentType === "kiro") return "kiro";
67
68
  if (agentType === "dsh") return "dsh";
69
+ if (agentType === "pi") return "pi";
68
70
  // `offline` is a non-wakeable classification — the daemon SHALL NOT register it
69
71
  // as a wakeable connection (daemon-multi-agent spec). It must therefore NOT
70
72
  // fall through to the `claude_code` default (which would make an offline agent
@@ -35,13 +35,13 @@ import {
35
35
  installDsh,
36
36
  installOpenclaw,
37
37
  installKiro,
38
+ installPi,
38
39
  readCodexInstallState,
39
40
  readOpencodeInstallState,
40
41
  readDshInstallState,
41
42
  readOpenclawInstallState,
42
43
  readKiroInstallState,
43
- guided,
44
- GUIDED_MESSAGES,
44
+ readPiInstallState,
45
45
  } from "./install-methods.mjs";
46
46
 
47
47
  // Re-export the shared marketplace identifiers from their canonical home so
@@ -95,7 +95,7 @@ export const AGENT_DESCRIPTORS = [
95
95
  { id: "kiro", displayName: "Kiro CLI", binaries: ["kiro"], configDirs: ["~/.kiro"], readState: readKiroInstallState, install: installKiro },
96
96
  { id: "opencode", displayName: "opencode", binaries: ["opencode"], configDirs: ["~/.config/opencode", "~/.opencode"], readState: readOpencodeInstallState, install: installOpencode },
97
97
  { id: "openclaw", displayName: "OpenClaw", binaries: ["openclaw"], configDirs: ["~/.openclaw", "~/.config/openclaw"], readState: readOpenclawInstallState, install: installOpenclaw },
98
- { id: "pi", displayName: "Pi", binaries: ["pi"], configDirs: ["~/.pi", "~/.config/pi"], install: guided("pi", GUIDED_MESSAGES.pi) },
98
+ { id: "pi", displayName: "Pi", binaries: ["pi"], configDirs: ["~/.pi", "~/.config/pi"], readState: readPiInstallState, install: installPi },
99
99
  { id: "dsh", displayName: "DeepSeek Harness (dsh)", binaries: ["dsh"], configDirs: ["$DSH_HOME", "~/.dsh"], readState: readDshInstallState, install: installDsh },
100
100
  ];
101
101
 
@@ -117,8 +117,8 @@ export function buildAdapter(d) {
117
117
  // `guided()` fallback also returns a function (so `typeof d.install ===
118
118
  // "function"` alone would report every fallback agent as supported — the
119
119
  // pre-existing latent bug); guided installers are tagged `.guided === true`,
120
- // so exclude them here. Real installers (claude/codex/opencode + dsh/openclaw/
121
- // kiro) → true; guided (pi) → false.
120
+ // so exclude them here. Every current agent (claude/codex/opencode + dsh/
121
+ // openclaw/kiro/pi) has a real installer → true; a future guided fallback → false.
122
122
  return { supported: typeof d.install === "function" && d.install.guided !== true, ...base };
123
123
  },
124
124
  installPlugin: (ctx = {}) =>
@@ -12,7 +12,7 @@
12
12
  // "claude-code" EXPLICITLY here. No caller ever passes the raw init id
13
13
  // through to daemon.json; every write goes through agentTypeForSelection.
14
14
  // 2. Any selection the daemon cannot wake as a first-class backend
15
- // (opencode / openclaw / pi, and dsh while its harness is dormant/offline)
15
+ // (opencode / openclaw, and dsh while its harness is dormant/offline)
16
16
  // maps to the non-wakeable "offline" classification. Its key is still parked
17
17
  // in agents[] for the `chorus mcp` proxy, but the daemon builds no spawner
18
18
  // and dispatches no wake (spawner-select.mjs fail-closes on "offline").
@@ -22,7 +22,7 @@
22
22
  // woken as claude-code.
23
23
 
24
24
  /**
25
- * Selection id → daemon agentType. Only claude/codex/kiro are wakeable backends;
25
+ * Selection id → daemon agentType. claude/codex/kiro/pi are wakeable backends;
26
26
  * everything else is classified offline. `dsh` maps to offline because the dsh
27
27
  * harness is de-advertised (offline) — re-map it here to bring it back online.
28
28
  * @type {Readonly<Record<string, string>>}
@@ -31,9 +31,9 @@ export const SELECTION_TO_AGENT_TYPE = Object.freeze({
31
31
  claude: "claude-code", // explicit rename — never pass the init id "claude" through verbatim
32
32
  codex: "codex",
33
33
  kiro: "kiro",
34
+ pi: "pi", // wakeable via PiSpawner (add-daemon-pi-backend)
34
35
  opencode: "offline",
35
36
  openclaw: "offline",
36
- pi: "offline",
37
37
  dsh: "offline",
38
38
  });
39
39
 
@@ -42,7 +42,7 @@ export const SELECTION_TO_AGENT_TYPE = Object.freeze({
42
42
  * daemon.json `agents[]`. Unknown ids fail closed to "offline" (never a wakeable
43
43
  * default), so an agent is only ever woken when its backend is explicitly known.
44
44
  * @param {string} selectionId
45
- * @returns {string} a KNOWN_AGENTS agentType ("claude-code" | "codex" | "kiro" | "offline")
45
+ * @returns {string} a KNOWN_AGENTS agentType ("claude-code" | "codex" | "kiro" | "pi" | "offline")
46
46
  */
47
47
  export function agentTypeForSelection(selectionId) {
48
48
  return SELECTION_TO_AGENT_TYPE[selectionId] ?? "offline";
@@ -51,7 +51,7 @@ export function agentTypeForSelection(selectionId) {
51
51
  /**
52
52
  * Whether a daemon agentType is one the daemon can actually wake. "offline" is the
53
53
  * one non-wakeable classification; every other value the init mapping produces
54
- * (claude-code / codex / kiro) is wakeable.
54
+ * (claude-code / codex / kiro / pi) is wakeable.
55
55
  * @param {string} agentType
56
56
  * @returns {boolean}
57
57
  */