@chorus-aidlc/chorus 0.17.1 → 0.17.3

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 (303) hide show
  1. package/.next/standalone/.next/BUILD_ID +1 -1
  2. package/.next/standalone/.next/app-build-manifest.json +334 -334
  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 +33 -33
  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 +1 -1
  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.js +1 -1
  91. package/.next/standalone/.next/server/app/api/daemon-sessions/route_client-reference-manifest.js +1 -1
  92. package/.next/standalone/.next/server/app/api/documents/[uuid]/route_client-reference-manifest.js +1 -1
  93. package/.next/standalone/.next/server/app/api/entities/[type]/[uuid]/root-idea/route_client-reference-manifest.js +1 -1
  94. package/.next/standalone/.next/server/app/api/events/notifications/route_client-reference-manifest.js +1 -1
  95. package/.next/standalone/.next/server/app/api/events/route.js +11 -9
  96. package/.next/standalone/.next/server/app/api/events/route_client-reference-manifest.js +1 -1
  97. package/.next/standalone/.next/server/app/api/health/route_client-reference-manifest.js +1 -1
  98. package/.next/standalone/.next/server/app/api/ideas/[uuid]/claim/route_client-reference-manifest.js +1 -1
  99. package/.next/standalone/.next/server/app/api/ideas/[uuid]/move/preview/route_client-reference-manifest.js +1 -1
  100. package/.next/standalone/.next/server/app/api/ideas/[uuid]/move/route_client-reference-manifest.js +1 -1
  101. package/.next/standalone/.next/server/app/api/ideas/[uuid]/parent/route_client-reference-manifest.js +1 -1
  102. package/.next/standalone/.next/server/app/api/ideas/[uuid]/release/route_client-reference-manifest.js +1 -1
  103. package/.next/standalone/.next/server/app/api/ideas/[uuid]/route_client-reference-manifest.js +1 -1
  104. package/.next/standalone/.next/server/app/api/ideas/[uuid]/wake-preview/route_client-reference-manifest.js +1 -1
  105. package/.next/standalone/.next/server/app/api/ideas/conversational/route_client-reference-manifest.js +1 -1
  106. package/.next/standalone/.next/server/app/api/mcp/route_client-reference-manifest.js +1 -1
  107. package/.next/standalone/.next/server/app/api/me/assignments/route_client-reference-manifest.js +1 -1
  108. package/.next/standalone/.next/server/app/api/mentionables/route_client-reference-manifest.js +1 -1
  109. package/.next/standalone/.next/server/app/api/notifications/[uuid]/archive/route_client-reference-manifest.js +1 -1
  110. package/.next/standalone/.next/server/app/api/notifications/[uuid]/read/route_client-reference-manifest.js +1 -1
  111. package/.next/standalone/.next/server/app/api/notifications/preferences/route_client-reference-manifest.js +1 -1
  112. package/.next/standalone/.next/server/app/api/notifications/read-all/route_client-reference-manifest.js +1 -1
  113. package/.next/standalone/.next/server/app/api/notifications/route_client-reference-manifest.js +1 -1
  114. package/.next/standalone/.next/server/app/api/notifications/unread-count/route_client-reference-manifest.js +1 -1
  115. package/.next/standalone/.next/server/app/api/project-groups/[uuid]/dashboard/route_client-reference-manifest.js +1 -1
  116. package/.next/standalone/.next/server/app/api/project-groups/[uuid]/route_client-reference-manifest.js +1 -1
  117. package/.next/standalone/.next/server/app/api/project-groups/route_client-reference-manifest.js +1 -1
  118. package/.next/standalone/.next/server/app/api/project-visits/pin/route_client-reference-manifest.js +1 -1
  119. package/.next/standalone/.next/server/app/api/project-visits/route_client-reference-manifest.js +1 -1
  120. package/.next/standalone/.next/server/app/api/project-visits/visit/route_client-reference-manifest.js +1 -1
  121. package/.next/standalone/.next/server/app/api/projects/[uuid]/activity/route_client-reference-manifest.js +1 -1
  122. package/.next/standalone/.next/server/app/api/projects/[uuid]/agent-cwds/route_client-reference-manifest.js +1 -1
  123. package/.next/standalone/.next/server/app/api/projects/[uuid]/available/route_client-reference-manifest.js +1 -1
  124. package/.next/standalone/.next/server/app/api/projects/[uuid]/documents/route_client-reference-manifest.js +1 -1
  125. package/.next/standalone/.next/server/app/api/projects/[uuid]/group/route_client-reference-manifest.js +1 -1
  126. package/.next/standalone/.next/server/app/api/projects/[uuid]/ideas/route_client-reference-manifest.js +1 -1
  127. package/.next/standalone/.next/server/app/api/projects/[uuid]/ideas/tracker/route_client-reference-manifest.js +1 -1
  128. package/.next/standalone/.next/server/app/api/projects/[uuid]/proposals/[proposalUuid]/validate/route_client-reference-manifest.js +1 -1
  129. package/.next/standalone/.next/server/app/api/projects/[uuid]/proposals/route_client-reference-manifest.js +1 -1
  130. package/.next/standalone/.next/server/app/api/projects/[uuid]/proposals/summary/route_client-reference-manifest.js +1 -1
  131. package/.next/standalone/.next/server/app/api/projects/[uuid]/resource-graph/route_client-reference-manifest.js +1 -1
  132. package/.next/standalone/.next/server/app/api/projects/[uuid]/route_client-reference-manifest.js +1 -1
  133. package/.next/standalone/.next/server/app/api/projects/[uuid]/stats/route_client-reference-manifest.js +1 -1
  134. package/.next/standalone/.next/server/app/api/projects/[uuid]/tasks/dependencies/route_client-reference-manifest.js +1 -1
  135. package/.next/standalone/.next/server/app/api/projects/[uuid]/tasks/route_client-reference-manifest.js +1 -1
  136. package/.next/standalone/.next/server/app/api/projects/agent-cwd-options/route_client-reference-manifest.js +1 -1
  137. package/.next/standalone/.next/server/app/api/projects/route_client-reference-manifest.js +1 -1
  138. package/.next/standalone/.next/server/app/api/proposals/[uuid]/approve/route_client-reference-manifest.js +1 -1
  139. package/.next/standalone/.next/server/app/api/proposals/[uuid]/close/route_client-reference-manifest.js +1 -1
  140. package/.next/standalone/.next/server/app/api/proposals/[uuid]/reject/route_client-reference-manifest.js +1 -1
  141. package/.next/standalone/.next/server/app/api/proposals/[uuid]/revoke/route_client-reference-manifest.js +1 -1
  142. package/.next/standalone/.next/server/app/api/proposals/[uuid]/route_client-reference-manifest.js +1 -1
  143. package/.next/standalone/.next/server/app/api/references/[uuid]/route_client-reference-manifest.js +1 -1
  144. package/.next/standalone/.next/server/app/api/references/route_client-reference-manifest.js +1 -1
  145. package/.next/standalone/.next/server/app/api/search/route_client-reference-manifest.js +1 -1
  146. package/.next/standalone/.next/server/app/api/session/route_client-reference-manifest.js +1 -1
  147. package/.next/standalone/.next/server/app/api/sessions/[uuid]/route_client-reference-manifest.js +1 -1
  148. package/.next/standalone/.next/server/app/api/tasks/[uuid]/claim/route_client-reference-manifest.js +1 -1
  149. package/.next/standalone/.next/server/app/api/tasks/[uuid]/dependencies/[dependsOnUuid]/route_client-reference-manifest.js +1 -1
  150. package/.next/standalone/.next/server/app/api/tasks/[uuid]/dependencies/route_client-reference-manifest.js +1 -1
  151. package/.next/standalone/.next/server/app/api/tasks/[uuid]/release/route_client-reference-manifest.js +1 -1
  152. package/.next/standalone/.next/server/app/api/tasks/[uuid]/route_client-reference-manifest.js +1 -1
  153. package/.next/standalone/.next/server/app/api/tasks/[uuid]/sessions/route_client-reference-manifest.js +1 -1
  154. package/.next/standalone/.next/server/app/index.html +2 -2
  155. package/.next/standalone/.next/server/app/index.rsc +1 -1
  156. package/.next/standalone/.next/server/app/login/admin/page_client-reference-manifest.js +1 -1
  157. package/.next/standalone/.next/server/app/login/admin.html +2 -2
  158. package/.next/standalone/.next/server/app/login/admin.rsc +1 -1
  159. package/.next/standalone/.next/server/app/login/callback/page_client-reference-manifest.js +1 -1
  160. package/.next/standalone/.next/server/app/login/callback.html +2 -2
  161. package/.next/standalone/.next/server/app/login/callback.rsc +1 -1
  162. package/.next/standalone/.next/server/app/login/page_client-reference-manifest.js +1 -1
  163. package/.next/standalone/.next/server/app/login/pick-workspace/page_client-reference-manifest.js +1 -1
  164. package/.next/standalone/.next/server/app/login/pick-workspace.html +2 -2
  165. package/.next/standalone/.next/server/app/login/pick-workspace.rsc +1 -1
  166. package/.next/standalone/.next/server/app/login.html +2 -2
  167. package/.next/standalone/.next/server/app/login.rsc +1 -1
  168. package/.next/standalone/.next/server/app/onboarding/page.js +2 -2
  169. package/.next/standalone/.next/server/app/onboarding/page.js.nft.json +1 -1
  170. package/.next/standalone/.next/server/app/onboarding/page_client-reference-manifest.js +1 -1
  171. package/.next/standalone/.next/server/app/onboarding.html +2 -2
  172. package/.next/standalone/.next/server/app/onboarding.rsc +2 -2
  173. package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
  174. package/.next/standalone/.next/server/app/projects.html +2 -2
  175. package/.next/standalone/.next/server/app/projects.rsc +3 -3
  176. package/.next/standalone/.next/server/app/settings.html +2 -2
  177. package/.next/standalone/.next/server/app/settings.rsc +3 -3
  178. package/.next/standalone/.next/server/app-paths-manifest.json +36 -36
  179. package/.next/standalone/.next/server/chunks/1114.js +1 -1
  180. package/.next/standalone/.next/server/chunks/1155.js +1 -0
  181. package/.next/standalone/.next/server/chunks/{5737.js → 1201.js} +5 -3
  182. package/.next/standalone/.next/server/chunks/1318.js +1 -1
  183. package/.next/standalone/.next/server/chunks/1559.js +2 -2
  184. package/.next/standalone/.next/server/chunks/2572.js +1 -1
  185. package/.next/standalone/.next/server/chunks/2961.js +1 -1
  186. package/.next/standalone/.next/server/chunks/{7822.js → 3630.js} +1 -1
  187. package/.next/standalone/.next/server/chunks/4827.js +1 -1
  188. package/.next/standalone/.next/server/chunks/5245.js +1 -1
  189. package/.next/standalone/.next/server/chunks/6113.js +1 -1
  190. package/.next/standalone/.next/server/chunks/{7770.js → 6465.js} +1 -1
  191. package/.next/standalone/.next/server/chunks/6506.js +1 -1
  192. package/.next/standalone/.next/server/chunks/679.js +1 -1
  193. package/.next/standalone/.next/server/chunks/7368.js +1 -1
  194. package/.next/standalone/.next/server/chunks/7530.js +1 -1
  195. package/.next/standalone/.next/server/chunks/8105.js +1 -0
  196. package/.next/standalone/.next/server/chunks/8232.js +1 -0
  197. package/.next/standalone/.next/server/chunks/920.js +1 -1
  198. package/.next/standalone/.next/server/chunks/9213.js +1 -1
  199. package/.next/standalone/.next/server/chunks/9378.js +1 -1
  200. package/.next/standalone/.next/server/chunks/9931.js +1 -1
  201. package/.next/standalone/.next/server/middleware-build-manifest.js +1 -1
  202. package/.next/standalone/.next/server/middleware-manifest.json +5 -5
  203. package/.next/standalone/.next/server/pages/404.html +2 -2
  204. package/.next/standalone/.next/server/pages/500.html +1 -1
  205. package/.next/standalone/.next/server/server-reference-manifest.js +1 -1
  206. package/.next/standalone/.next/server/server-reference-manifest.json +1 -1
  207. package/.next/standalone/.next/static/chunks/{11595.32f7dedc4fd7e3e1.js → 11595.f7c3ef5cd7fc8feb.js} +1 -1
  208. package/.next/standalone/.next/static/chunks/{33456.87f86ce6041405e0.js → 33456.c81079032acc2966.js} +1 -1
  209. package/.next/standalone/.next/static/chunks/45262-38b332523f00a223.js +1 -0
  210. package/.next/standalone/.next/static/chunks/46021-f5d072b0cbcb7fac.js +1 -0
  211. package/.next/standalone/.next/static/chunks/{4860.9457e021394e9399.js → 4860.f0cfb1201191ae88.js} +1 -1
  212. package/.next/standalone/.next/static/chunks/66609-64a01d5cb415465b.js +1 -0
  213. package/.next/standalone/.next/static/chunks/79919-c5a2a3fd8f5f9204.js +1 -0
  214. package/.next/standalone/.next/static/chunks/94394-38194b81b489275c.js +1 -0
  215. package/.next/standalone/.next/static/chunks/94643-f1bdf37fb3bb6adb.js +1 -0
  216. package/.next/standalone/.next/static/chunks/{65807-086d83649f593a5a.js → 95225-96b44da3ebd6ddad.js} +1 -1
  217. package/.next/standalone/.next/static/chunks/96482-2b3bdb2544d72e5a.js +1 -0
  218. package/.next/standalone/.next/static/chunks/{99373.aed267aa48c5bdd0.js → 99373.3c23ac2efbd4db02.js} +1 -1
  219. package/.next/standalone/.next/static/chunks/app/(dashboard)/layout-66328332f62c7371.js +1 -0
  220. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/dashboard/{page-f4810f1b9f39d1ae.js → page-77b175e52a85f3cb.js} +1 -1
  221. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/documents/[documentUuid]/page-87ceae13c4950fc9.js +1 -0
  222. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/documents/page-45e95154e546460e.js +1 -0
  223. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/graph/{page-f31ad2eebe257628.js → page-69d3162667f85677.js} +1 -1
  224. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/proposals/[proposalUuid]/page-b7b2017e5be69564.js +1 -0
  225. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/proposals/new/page-a3f83031dfbafc81.js +1 -0
  226. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/proposals/page-8b06834ca0f663bb.js +1 -0
  227. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/tasks/[taskUuid]/{page-53ce4468844cc84f.js → page-3c7ff3a40a4615ac.js} +1 -1
  228. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/tasks/{page-1c374d19e8046d9a.js → page-7b8e11fdc5b596d0.js} +1 -1
  229. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/{page-31d6f8e82c7f5366.js → page-069c9738e516436b.js} +1 -1
  230. package/.next/standalone/.next/static/chunks/app/(dashboard)/settings/page-efe5326c47aca9ca.js +1 -0
  231. package/.next/standalone/.next/static/chunks/app/onboarding/{page-d082f9b60ad03057.js → page-0ce33b9327fe3d8c.js} +1 -1
  232. package/.next/standalone/.next/static/chunks/{webpack-e2e0ef50652d5791.js → webpack-dffb97a4feb8faba.js} +1 -1
  233. package/.next/standalone/package.json +1 -1
  234. package/.next/standalone/public/chorus-plugin/.claude-plugin/plugin.json +1 -1
  235. package/.next/standalone/public/chorus-plugin/bin/chorus-api.sh +1 -1
  236. package/.next/standalone/public/chorus-plugin/skills/brainstorm/SKILL.md +1 -1
  237. package/.next/standalone/public/chorus-plugin/skills/chorus/SKILL.md +2 -2
  238. package/.next/standalone/public/chorus-plugin/skills/chorus-cli/SKILL.md +11 -1
  239. package/.next/standalone/public/chorus-plugin/skills/develop/SKILL.md +2 -2
  240. package/.next/standalone/public/chorus-plugin/skills/docs/SKILL.md +1 -1
  241. package/.next/standalone/public/chorus-plugin/skills/idea/SKILL.md +1 -1
  242. package/.next/standalone/public/chorus-plugin/skills/openspec-aware/SKILL.md +1 -1
  243. package/.next/standalone/public/chorus-plugin/skills/orchestrate/SKILL.md +1 -1
  244. package/.next/standalone/public/chorus-plugin/skills/proposal/SKILL.md +1 -1
  245. package/.next/standalone/public/chorus-plugin/skills/quick-dev/SKILL.md +1 -1
  246. package/.next/standalone/public/chorus-plugin/skills/review/SKILL.md +1 -1
  247. package/.next/standalone/public/chorus-plugin/skills/yolo/SKILL.md +3 -3
  248. package/.next/standalone/public/kiro-plugin/.kiro/skills/chorus-brainstorm/SKILL.md +1 -1
  249. package/.next/standalone/public/kiro-plugin/.kiro/skills/chorus-cli/SKILL.md +11 -1
  250. package/.next/standalone/public/kiro-plugin/.kiro/skills/chorus-develop/SKILL.md +2 -2
  251. package/.next/standalone/public/kiro-plugin/.kiro/skills/chorus-docs/SKILL.md +1 -1
  252. package/.next/standalone/public/kiro-plugin/.kiro/skills/chorus-idea/SKILL.md +1 -1
  253. package/.next/standalone/public/kiro-plugin/.kiro/skills/chorus-openspec-aware/SKILL.md +1 -1
  254. package/.next/standalone/public/kiro-plugin/.kiro/skills/chorus-orchestrate/SKILL.md +1 -1
  255. package/.next/standalone/public/kiro-plugin/.kiro/skills/chorus-proposal/SKILL.md +1 -1
  256. package/.next/standalone/public/kiro-plugin/.kiro/skills/chorus-quick-dev/SKILL.md +1 -1
  257. package/.next/standalone/public/kiro-plugin/.kiro/skills/chorus-review/SKILL.md +1 -1
  258. package/.next/standalone/public/kiro-plugin/.kiro/skills/chorus-yolo/SKILL.md +3 -3
  259. package/.next/standalone/public/kiro-plugin/.kiro/steering/chorus.md +1 -1
  260. package/.next/standalone/public/kiro-plugin/bin/chorus-api.sh +1 -1
  261. package/.next/standalone/public/skill/chorus/SKILL.md +1 -1
  262. package/.next/standalone/public/skill/develop-chorus/SKILL.md +1 -1
  263. package/.next/standalone/public/skill/yolo-chorus/SKILL.md +2 -2
  264. package/README.ja.md +2 -0
  265. package/README.ko.md +2 -0
  266. package/README.md +2 -0
  267. package/README.zh.md +2 -0
  268. package/cli/agent-backend-prompt.mjs +5 -0
  269. package/cli/agent-launcher.mjs +341 -0
  270. package/cli/agents.mjs +12 -0
  271. package/cli/credentials.mjs +102 -0
  272. package/cli/daemon-agent.mjs +5 -3
  273. package/cli/daemon.mjs +2 -3
  274. package/cli/dsh-managed-config.mjs +200 -272
  275. package/cli/dsh-spawner.mjs +34 -16
  276. package/cli/init/adapters.mjs +5 -5
  277. package/cli/init/agent-type-map.mjs +5 -5
  278. package/cli/init/install-methods.mjs +124 -10
  279. package/cli/init/pi-mcp-config.mjs +166 -0
  280. package/cli/init/steps/credential-seed.mjs +56 -3
  281. package/cli/pi-spawner.mjs +286 -0
  282. package/cli/spawner-select.mjs +7 -1
  283. package/cli/upload-hooks.mjs +25 -1
  284. package/package.json +1 -1
  285. package/.next/standalone/.next/server/chunks/1073.js +0 -1
  286. package/.next/standalone/.next/server/chunks/6487.js +0 -1
  287. package/.next/standalone/.next/server/chunks/8586.js +0 -1
  288. package/.next/standalone/.next/static/chunks/11998-27dcf858173fc015.js +0 -1
  289. package/.next/standalone/.next/static/chunks/12070-426bb88f5179812b.js +0 -1
  290. package/.next/standalone/.next/static/chunks/17409-67dbc0a3f4cbc207.js +0 -1
  291. package/.next/standalone/.next/static/chunks/26494-5a04e150431b0233.js +0 -1
  292. package/.next/standalone/.next/static/chunks/4166-85352630c29e2c2b.js +0 -1
  293. package/.next/standalone/.next/static/chunks/79919-56796c262f51fa82.js +0 -1
  294. package/.next/standalone/.next/static/chunks/94643-87ee1ede6d955937.js +0 -1
  295. package/.next/standalone/.next/static/chunks/app/(dashboard)/layout-9219c4de1012f0fb.js +0 -1
  296. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/documents/[documentUuid]/page-721d2152f1a28c88.js +0 -1
  297. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/documents/page-9bcff40805f39b25.js +0 -1
  298. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/proposals/[proposalUuid]/page-a4fb04068539c4ce.js +0 -1
  299. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/proposals/new/page-b1d2af10e9bc7e09.js +0 -1
  300. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/proposals/page-2cb245b0602a3c85.js +0 -1
  301. package/.next/standalone/.next/static/chunks/app/(dashboard)/settings/page-32bff791b19a0a58.js +0 -1
  302. /package/.next/standalone/.next/static/{_s4RZW3efB1g0lrKgLiZ7 → wuqYN129vOIGymh_NEdZe}/_buildManifest.js +0 -0
  303. /package/.next/standalone/.next/static/{_s4RZW3efB1g0lrKgLiZ7 → wuqYN129vOIGymh_NEdZe}/_ssgManifest.js +0 -0
@@ -28,7 +28,10 @@ function isFile(path) {
28
28
  }
29
29
  }
30
30
 
31
- /** Resolve the external SDK runtime. CHORUS_DSH_PATH overrides PATH. */
31
+ /**
32
+ * Resolve the external `dsh` CLI (the profile launcher — dsh 0.1.2-rc.1 removed
33
+ * the standalone `dsh-jsonrpc-agent` bin). CHORUS_DSH_PATH overrides PATH.
34
+ */
32
35
  export function resolveDshPath(deps = {}) {
33
36
  const env = deps.env ?? process.env;
34
37
  const platform = deps.platform ?? process.platform;
@@ -38,9 +41,7 @@ export function resolveDshPath(deps = {}) {
38
41
 
39
42
  const windows = platform === "win32";
40
43
  const path = windows ? pathWin32 : pathPosix;
41
- const names = windows
42
- ? ["dsh-jsonrpc-agent.cmd", "dsh-jsonrpc-agent.exe", "dsh-jsonrpc-agent"]
43
- : ["dsh-jsonrpc-agent"];
44
+ const names = windows ? ["dsh.cmd", "dsh.exe", "dsh"] : ["dsh"];
44
45
  const dirs = (env.PATH || env.Path || "").split(path.delimiter).filter(Boolean);
45
46
  for (const dir of dirs) {
46
47
  for (const name of names) {
@@ -51,9 +52,14 @@ export function resolveDshPath(deps = {}) {
51
52
  return null;
52
53
  }
53
54
 
54
- /** Resolve the required Cordis composition without placing it in argv. */
55
- export function resolveDshConfig(env = process.env) {
56
- return nonEmpty(env.CHORUS_DSH_CONFIG) ?? nonEmpty(env.DSH_CORDIS_CONFIG);
55
+ /**
56
+ * An operator-supplied managed home override. When set, the daemon boots
57
+ * `dsh --profile sdk` against this pre-composed DSH_HOME and skips managed
58
+ * profile preparation entirely (the escape hatch replacing the old
59
+ * DSH_CORDIS_CONFIG override — which is gone with the removed cordis.yml model).
60
+ */
61
+ export function resolveDshHome(env = process.env) {
62
+ return nonEmpty(env.CHORUS_DSH_HOME);
57
63
  }
58
64
 
59
65
  /** Windows npm command shims need cmd.exe while retaining argv isolation. */
@@ -143,8 +149,9 @@ export class DshSpawner {
143
149
  }
144
150
 
145
151
  async wake({ prompt, sessionId: anchor, cwd, onMessage, onChild }) {
146
- let dshPath = this.dshPath ?? this.resolveDshPathFn({ env: this.env, platform: this.platform });
147
- let config = resolveDshConfig(this.env);
152
+ const dshPath = this.dshPath ?? this.resolveDshPathFn({ env: this.env, platform: this.platform });
153
+ let dshHome = resolveDshHome(this.env);
154
+ let patchPath = null;
148
155
  const result = (backendSessionId, exitCode) => ({
149
156
  sessionId: backendSessionId || anchor || "",
150
157
  backendSessionId: backendSessionId || null,
@@ -154,11 +161,11 @@ export class DshSpawner {
154
161
 
155
162
  if (!dshPath) {
156
163
  this.logger.error(
157
- "[Chorus] cannot locate `dsh-jsonrpc-agent`; install it or set CHORUS_DSH_PATH",
164
+ "[Chorus] cannot locate the `dsh` CLI; install DeepSeek Harness (dsh) or set CHORUS_DSH_PATH",
158
165
  );
159
166
  return result(null, null);
160
167
  }
161
- if (!config) {
168
+ if (!dshHome) {
162
169
  try {
163
170
  const managed = await this.prepareManagedConfigFn({
164
171
  env: this.env,
@@ -166,10 +173,10 @@ export class DshSpawner {
166
173
  dshPath,
167
174
  creds: this.creds,
168
175
  });
169
- config = managed.configPath;
170
- dshPath = managed.runtimePath ?? dshPath;
176
+ dshHome = managed.home;
177
+ patchPath = managed.patchPath ?? null;
171
178
  } catch (error) {
172
- this.logger.error(`[Chorus] cannot prepare managed dsh config: ${errorText(error)}`);
179
+ this.logger.error(`[Chorus] cannot prepare managed dsh profile: ${errorText(error)}`);
173
180
  return result(null, null);
174
181
  }
175
182
  }
@@ -182,7 +189,7 @@ export class DshSpawner {
182
189
  const childEnv = {
183
190
  ...this.env,
184
191
  CHORUS_DAEMON_HEADLESS: "1",
185
- DSH_CORDIS_CONFIG: config,
192
+ DSH_HOME: dshHome,
186
193
  DSH_CWD: cwd || process.cwd(),
187
194
  };
188
195
  if (this.creds?.url) childEnv.CHORUS_URL = this.creds.url;
@@ -195,7 +202,18 @@ export class DshSpawner {
195
202
  if (this.creds?.agentUuid || this.creds?.agentName)
196
203
  childEnv.CHORUS_AGENT_PROFILE = this.creds.agentUuid || this.creds.agentName;
197
204
 
198
- const { command, argv } = resolveDshSpawnCommand(dshPath, this.platform, childEnv);
205
+ // `dsh --profile sdk` boots the managed profile from DSH_HOME. The Chorus
206
+ // rows auto-apply as a bundle layer, so `--patch` is added only for a
207
+ // non-default provider overlay. resolveDshSpawnCommand keeps the win32 .cmd
208
+ // wrapper prefix; the launcher argv follows it.
209
+ const launch = resolveDshSpawnCommand(dshPath, this.platform, childEnv);
210
+ const command = launch.command;
211
+ const argv = [
212
+ ...launch.argv,
213
+ "--profile",
214
+ "sdk",
215
+ ...(patchPath ? ["--patch", patchPath] : []),
216
+ ];
199
217
  let child;
200
218
  try {
201
219
  child = this.spawnImpl(command, argv, {
@@ -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
  */
@@ -468,6 +468,120 @@ export function installOpenclaw(ctx) {
468
468
  : out("openclaw", INSTALLED, `installed ${OPENCLAW_NPM_SPEC} and enabled ${OPENCLAW_PLUGIN_ID}`);
469
469
  }
470
470
 
471
+ // ---------------------------------------------------------------------------
472
+ // Pi — VERIFIED against docs/CONNECT_PI.md + packages/chorus-pi/README.md
473
+ // (chorus-pi ships to npm as @chorus-aidlc/chorus-pi):
474
+ // `pi install npm:pi-mcp-adapter` (the MCP adapter — exposes chorus_* tools)
475
+ // `pi install npm:@chorus-aidlc/chorus-pi` (the Chorus skills/agents/extension)
476
+ // pi installs extensions straight from an npm source (the `npm:` prefix on the
477
+ // spec, like OpenClaw). There is NO marketplace step and NO separate enable
478
+ // step (unlike claude / codex / openclaw). pi has no permission system and loads
479
+ // TypeScript via jiti, so the package publishes source as-is — nothing to build.
480
+ //
481
+ // TWO packages: pi reaches the Chorus MCP tools ONLY through `pi-mcp-adapter` (which reads
482
+ // the mcp.json `chorus agents add` writes — see credential-seed's pi branch + pi-mcp-config.mjs);
483
+ // chorus.ts does NOT register tools itself. So we install the adapter FIRST (the tool surface),
484
+ // then chorus-pi (the skills / reviewer agents / session extension). Both are idempotent.
485
+ //
486
+ // Graceful degradation: if the `pi` binary is absent we surface the exact manual
487
+ // commands as UNSUPPORTED guidance (never a hard FAILED — UNSUPPORTED is not a
488
+ // FAILURE_ACTION, so `chorus init` does not abort) and run ZERO commands. This
489
+ // follows the "no guessed command / no crash" rule the other adapters share.
490
+ //
491
+ // VERIFIED-gap: `@chorus-aidlc/chorus-pi` is published at the next coordinated
492
+ // release (A2), so the npm-install path could not be exercised end-to-end on this
493
+ // build host. The command shapes + graceful fallback are implemented; the spec's
494
+ // `pi install npm:<pkg>` form is the documented, reviewed command (pi-mcp-adapter is
495
+ // published — verified 2.32.1).
496
+ // ---------------------------------------------------------------------------
497
+ const PI_ADAPTER_SPEC = "npm:pi-mcp-adapter";
498
+ const PI_NPM_SPEC = "npm:@chorus-aidlc/chorus-pi";
499
+
500
+ /**
501
+ * Read pi's install state. `pi install` records each package's source in the
502
+ * agent settings file (`<PI_CODING_AGENT_DIR|~/.pi/agent>/settings.json`) under a
503
+ * `packages[]` array — entries are either a string source (`npm:@scope/pkg`) or an
504
+ * object carrying that source plus filtering. We substring-match the stringified
505
+ * entry so detection is robust to either shape. This is the file-read probe the pi
506
+ * adapter previously lacked (its descriptor had no `readState`, so the runtime
507
+ * defaulted `pluginInstalled:false` and every re-run reported a fresh INSTALL
508
+ * instead of the SKIPPED/upgrade messaging the other adapters give).
509
+ */
510
+ export function readPiInstallState({ env = process.env, readJson = readJsonSafe } = {}) {
511
+ const home = env.HOME || homedir();
512
+ const agentDir = nonEmpty(env.PI_CODING_AGENT_DIR) || join(home, ".pi", "agent");
513
+ const settings = readJson(join(agentDir, "settings.json"));
514
+ const pkgs = Array.isArray(settings?.packages) ? settings.packages : [];
515
+ const hasPkg = (needle) =>
516
+ pkgs.some((p) => (typeof p === "string" ? p : JSON.stringify(p)).includes(needle));
517
+ const adapterInstalled = hasPkg("pi-mcp-adapter");
518
+ const pluginInstalled = hasPkg("@chorus-aidlc/chorus-pi");
519
+ return {
520
+ marketplaceRegistered: false, // pi has no marketplace concept
521
+ pluginInstalled: pluginInstalled && adapterInstalled,
522
+ chorusPiInstalled: pluginInstalled,
523
+ adapterInstalled,
524
+ };
525
+ }
526
+
527
+ export function installPi(ctx) {
528
+ const run = ctx.run ?? runCommand;
529
+ const env = ctx.env ?? process.env;
530
+
531
+ // `pi` must be on PATH to run the install. Probe via PATH (NOT `run`) so an
532
+ // absent pi surfaces the manual commands and executes NOTHING — and, because
533
+ // UNSUPPORTED is not a FAILURE_ACTION, never aborts `chorus init`. Injectable
534
+ // for unit tests (mirrors installDsh's pnpm precheck).
535
+ const hasBinary = ctx.binaryOnPath ?? binaryOnPath;
536
+ if (!hasBinary(["pi"], { env })) {
537
+ return out(
538
+ "pi",
539
+ UNSUPPORTED,
540
+ `pi CLI not found on PATH — install the Chorus extension manually once pi is available: ` +
541
+ `\`pi install ${PI_ADAPTER_SPEC} && pi install ${PI_NPM_SPEC}\``,
542
+ );
543
+ }
544
+
545
+ const state = safeState(ctx);
546
+ const bothInstalled = state.chorusPiInstalled && state.adapterInstalled;
547
+
548
+ // Already fully installed → recognize it (parity with codex/kiro's "already
549
+ // installed") and do NOTHING, unless the caller explicitly asked to update.
550
+ if (bothInstalled && !ctx.flags?.updateInstalled) {
551
+ return out(
552
+ "pi",
553
+ SKIPPED,
554
+ `already installed (${PI_ADAPTER_SPEC} + ${PI_NPM_SPEC} in pi settings) — re-run with --update-installed to upgrade`,
555
+ );
556
+ }
557
+
558
+ // Update requested on an existing install → use pi's OWN updater. `pi install`
559
+ // of an already-recorded package only re-writes the settings entry; it does NOT
560
+ // pull the newer published version, so it never clears pi's "Package updates
561
+ // available — Run pi update --extensions" nag. `pi update --extensions` (exactly
562
+ // what that nag tells the user to run) refreshes installed extensions — including
563
+ // chorus-pi + pi-mcp-adapter — to their latest published versions.
564
+ if (bothInstalled) {
565
+ const u = run("pi", ["update", "--extensions"], { env });
566
+ if (!u.ok) return out("pi", FAILED, `pi update --extensions failed: ${errText(u)}`);
567
+ return out("pi", REPAIRED, `updated installed pi extensions to latest via \`pi update --extensions\` (incl. ${PI_NPM_SPEC})`);
568
+ }
569
+
570
+ // Fresh or partial install → install what's needed (pi install is idempotent for
571
+ // any already-present one). The MCP adapter is the tool surface, so install it
572
+ // FIRST; then the chorus-pi package.
573
+ const ra = run("pi", ["install", PI_ADAPTER_SPEC], { env });
574
+ if (!ra.ok) return out("pi", FAILED, `pi install ${PI_ADAPTER_SPEC} failed: ${errText(ra)}`);
575
+ const r = run("pi", ["install", PI_NPM_SPEC], { env });
576
+ if (!r.ok) return out("pi", FAILED, `pi install failed: ${errText(r)}`);
577
+
578
+ // A partial pre-existing install we just completed → REPAIRED; a clean first
579
+ // install → INSTALLED (same distinction the other adapters draw).
580
+ return state.chorusPiInstalled || state.adapterInstalled
581
+ ? out("pi", REPAIRED, `reinstalled ${PI_ADAPTER_SPEC} + ${PI_NPM_SPEC} via pi install`)
582
+ : out("pi", INSTALLED, `installed ${PI_ADAPTER_SPEC} + ${PI_NPM_SPEC} via pi install`);
583
+ }
584
+
471
585
  // ---------------------------------------------------------------------------
472
586
  // Kiro — NATIVE FILE-TEMPLATE install (Kiro has NO plugin CLI). Its "plugin" is a
473
587
  // set of loose files under .kiro/ (what public/install-kiro.sh drops). We
@@ -546,9 +660,13 @@ export async function installKiro(ctx) {
546
660
  }
547
661
 
548
662
  // ---------------------------------------------------------------------------
549
- // Guided (not automated). These agents have no verified native install path, so
550
- // per the "no guessed command" rule — we surface a precise next step instead
551
- // of running an unverified command.
663
+ // Guided (not automated) the fallback mechanism for an agent that has no
664
+ // verified native install path: surface a precise next step instead of running
665
+ // an unverified command (the "no guessed command" rule). NO agent currently
666
+ // ships as guided — claude / codex / opencode / openclaw / kiro / dsh / pi all
667
+ // have real installers (pi flipped to `installPi` once @chorus-aidlc/chorus-pi
668
+ // shipped to npm). `guided()` is kept as the mechanism for a future agent added
669
+ // before its install command is verified.
552
670
  // ---------------------------------------------------------------------------
553
671
  export function guided(agentId, detail) {
554
672
  // Tag the returned function so adapters.mjs can tell a GUIDED (unsupported)
@@ -560,10 +678,6 @@ export function guided(agentId, detail) {
560
678
  return fn;
561
679
  }
562
680
 
563
- export const GUIDED_MESSAGES = {
564
- // Pi HAS an extension surface (`pi install <source>`) this message must NOT
565
- // claim otherwise. What's missing is a published Chorus Pi extension for
566
- // `chorus agents add` to install automatically, so the accurate guidance is the real
567
- // manual command against that source once it's available.
568
- pi: "Pi installs extensions with `pi install <source>`; Chorus does not yet publish a Pi extension for `chorus agents add` to automate, so install it manually with `pi install <source>` when a Chorus Pi source is available.",
569
- };
681
+ // No agents are currently guided; kept as the stable export the adapter registry
682
+ // and tests reference. A future not-yet-verified agent adds its message here.
683
+ export const GUIDED_MESSAGES = {};
@@ -0,0 +1,166 @@
1
+ // cli/init/pi-mcp-config.mjs
2
+ // Writes the Chorus MCP server block into pi's global MCP config
3
+ // (`~/.pi/agent/mcp.json` by default) so pi's `pi-mcp-adapter` exposes the
4
+ // `chorus_*` tools to the pi agent — the ADAPTER path (chorus.ts never registers
5
+ // tools itself). The Authorization header references the API key by ENV VAR
6
+ // (`Bearer ${CHORUS_API_KEY}`, which pi-mcp-adapter interpolates at connect time),
7
+ // so the `cho_` key lives in exactly ZERO files here — only the env-var reference.
8
+ // The URL is not a secret, so it is written as a resolved literal (an interactive pi
9
+ // then needs only CHORUS_API_KEY in its shell, not CHORUS_URL).
10
+ //
11
+ // This is the pi analogue of cli/init/codex-mcp-config.mjs (Codex's keyless
12
+ // `[mcp_servers.chorus] bearer_token_env_var`) and the CC plugin `.mcp.json`
13
+ // (`Authorization: Bearer ${CHORUS_URL}`-style ${VAR} interpolation). `pi install`
14
+ // does NOT write an mcp.json for us, so `chorus agents add` writes it here (from the
15
+ // credential-seed step, which already holds the resolved URL).
16
+ //
17
+ // CONFIG CONTRACT (VERIFIED against pi-mcp-adapter 2.32.1 npm readme, repo
18
+ // github.com/nicobailon/pi-mcp-adapter):
19
+ // - The adapter discovers a Pi GLOBAL override at `<Pi agent dir>/mcp.json`
20
+ // (`~/.pi/agent/mcp.json` by default, or `$PI_CODING_AGENT_DIR/mcp.json` when set)
21
+ // — the same file `pi-mcp-adapter init` writes to by default, and higher precedence
22
+ // than the tool-agnostic `~/.config/mcp/mcp.json`.
23
+ // - An `mcpServers.<name>` entry supports `type:"http"`, a `url` (raw `${VAR}` /
24
+ // `$env:VAR` interpolation) and `headers` (also `${VAR}` / `$env:VAR`
25
+ // interpolation). We use `headers.Authorization = "Bearer ${CHORUS_API_KEY}"` —
26
+ // the cleanest keyless form, and a one-token change from the literal-Bearer shape
27
+ // CONNECT_PI.md previously documented.
28
+ //
29
+ // Standard JSON merge (mcp.json is JSON, unlike Codex's TOML): every other top-level
30
+ // field and every OTHER `mcpServers.<name>` entry is preserved verbatim; only
31
+ // `mcpServers.chorus` is upserted. Any legacy literal `bearerToken` on the chorus
32
+ // entry is dropped and a literal `headers.Authorization` is replaced by the env-ref,
33
+ // so a re-run MIGRATES an old literal key off disk. Atomic 0600 temp+rename;
34
+ // idempotent (a re-run with the same url reproduces the file). IO is injectable for
35
+ // tests. The API key is NEVER written — only the env-var reference.
36
+
37
+ import { mkdirSync, readFileSync, renameSync, writeFileSync } from "node:fs";
38
+ import { homedir } from "node:os";
39
+ import { dirname, join } from "node:path";
40
+
41
+ const API_KEY_ENV = "CHORUS_API_KEY";
42
+ // A normal (non-template) string: `${CHORUS_API_KEY}` is emitted verbatim into the
43
+ // JSON for pi-mcp-adapter to interpolate at connect time — no literal key on disk.
44
+ const AUTHORIZATION_ENV_REF = "Bearer ${" + API_KEY_ENV + "}";
45
+
46
+ /** A non-empty trimmed string, or undefined. */
47
+ function nonEmpty(value) {
48
+ return typeof value === "string" && value.trim() ? value.trim() : undefined;
49
+ }
50
+
51
+ /**
52
+ * Resolve the pi GLOBAL MCP config path. Honors `PI_CODING_AGENT_DIR` (pi-mcp-adapter's
53
+ * own override of the Pi agent dir), then `HOME` (so tests can inject a temp home), else
54
+ * the OS home dir — ending in `mcp.json`. VERIFIED default `~/.pi/agent/mcp.json`.
55
+ * @param {Record<string, string | undefined>} env
56
+ */
57
+ export function resolvePiMcpConfigPath(env) {
58
+ const base = nonEmpty(env.PI_CODING_AGENT_DIR) ?? join(nonEmpty(env.HOME) ?? homedir(), ".pi", "agent");
59
+ return join(base, "mcp.json");
60
+ }
61
+
62
+ /**
63
+ * Normalize a Chorus base URL to the MCP endpoint the same way the Codex writer
64
+ * (codex-mcp-config.mjs) and the hook wrapper do: a URL that already has a path segment
65
+ * beyond the host is used as-is; a bare host gains `/api/mcp`. Returns undefined for an
66
+ * empty URL.
67
+ * @param {string | undefined} rawUrl
68
+ */
69
+ export function piMcpUrl(rawUrl) {
70
+ const u = nonEmpty(rawUrl);
71
+ if (!u) return undefined;
72
+ const trimmed = u.replace(/\/+$/, "");
73
+ const m = trimmed.match(/^https?:\/\/[^/]+(\/.*)?$/);
74
+ if (m && m[1] && m[1].length > 0) return trimmed; // already a full endpoint
75
+ return `${trimmed}/api/mcp`;
76
+ }
77
+
78
+ /** True for a plain (non-array) object. */
79
+ function isPlainObject(v) {
80
+ return !!v && typeof v === "object" && !Array.isArray(v);
81
+ }
82
+
83
+ /**
84
+ * Upsert `mcpServers.chorus` in pi's global mcp.json to
85
+ * { "type": "http", "url": "<mcp-endpoint>", "headers": { "Authorization": "Bearer ${CHORUS_API_KEY}" } }
86
+ * MERGE-SAFE: every other top-level field and every OTHER `mcpServers.<name>` entry is
87
+ * preserved verbatim; on the chorus entry itself every other key (e.g. `toolPrefix`,
88
+ * `includeTools`) is preserved, only `type`/`url`/`headers.Authorization` are set. A legacy
89
+ * literal `bearerToken` on the chorus entry is DROPPED and any literal `headers.Authorization`
90
+ * is replaced by the env-ref — migrating an old literal key off disk.
91
+ *
92
+ * Missing file → start from `{}`. An existing UNPARSEABLE file, a non-object root, or a
93
+ * present-but-non-object `mcpServers` → THROW (never clobber a file we cannot safely merge;
94
+ * the caller treats a throw as a write failure). Atomic 0600 temp+rename; idempotent (a re-run
95
+ * with the same url reproduces the file). The API key is NEVER written — only the env-var
96
+ * reference `${CHORUS_API_KEY}`.
97
+ * @param {{ configPath: string, url: string }} args
98
+ * @param {{
99
+ * read?: (p: string) => string,
100
+ * write?: (p: string, c: string, o: object) => void,
101
+ * mkdir?: (p: string, o: object) => void,
102
+ * rename?: (from: string, to: string) => void,
103
+ * }} [deps]
104
+ * @returns {string} the mcp.json path written
105
+ */
106
+ export function writePiMcpServer({ configPath, url }, deps = {}) {
107
+ const read = deps.read ?? ((p) => readFileSync(p, "utf8"));
108
+ const write = deps.write ?? writeFileSync;
109
+ const mkdir = deps.mkdir ?? mkdirSync;
110
+ const rename = deps.rename ?? renameSync;
111
+
112
+ const mcpUrl = piMcpUrl(url);
113
+ if (!mcpUrl) throw new Error("writePiMcpServer requires a url");
114
+
115
+ let raw;
116
+ try {
117
+ raw = read(configPath);
118
+ } catch {
119
+ raw = undefined; // no file yet — start fresh
120
+ }
121
+
122
+ let parsed = {};
123
+ if (typeof raw === "string" && raw.trim()) {
124
+ try {
125
+ parsed = JSON.parse(raw);
126
+ } catch (err) {
127
+ throw new Error(`existing ${configPath} is not valid JSON (${err?.message ?? err}) — refusing to overwrite`);
128
+ }
129
+ if (!isPlainObject(parsed)) {
130
+ throw new Error(`existing ${configPath} is not a JSON object — refusing to overwrite`);
131
+ }
132
+ }
133
+
134
+ // Preserve an existing `mcpServers` object (and every server in it); a present-but-non-object
135
+ // `mcpServers` is unsafe to merge.
136
+ let servers = parsed.mcpServers;
137
+ if (servers === undefined || servers === null) {
138
+ servers = {};
139
+ } else if (!isPlainObject(servers)) {
140
+ throw new Error(`existing ${configPath} has a non-object "mcpServers" block — refusing to overwrite`);
141
+ }
142
+
143
+ // Preserve every OTHER key on the chorus entry (e.g. toolPrefix / includeTools), and every
144
+ // OTHER header, but drop the legacy literal `bearerToken` (a secret) and overwrite
145
+ // Authorization with the keyless env-ref.
146
+ const existingChorus = isPlainObject(servers.chorus) ? servers.chorus : {};
147
+ const existingHeaders = isPlainObject(existingChorus.headers) ? existingChorus.headers : {};
148
+ const chorusRest = { ...existingChorus };
149
+ delete chorusRest.bearerToken; // drop any legacy literal token (a secret) — we use the env-ref header
150
+
151
+ servers.chorus = {
152
+ ...chorusRest,
153
+ type: "http",
154
+ url: mcpUrl,
155
+ headers: { ...existingHeaders, Authorization: AUTHORIZATION_ENV_REF },
156
+ };
157
+ parsed.mcpServers = servers;
158
+
159
+ const content = `${JSON.stringify(parsed, null, 2)}\n`;
160
+
161
+ mkdir(dirname(configPath), { recursive: true });
162
+ const tmp = `${configPath}.tmp`;
163
+ write(tmp, content, { mode: 0o600 });
164
+ rename(tmp, configPath);
165
+ return configPath;
166
+ }
@@ -53,6 +53,7 @@ import {
53
53
  import { resolveInstallCwds as defaultResolveInstallCwds } from "../../daemon-install-config.mjs";
54
54
  import { validateAndFetchIdentity } from "../../chorus-client.mjs";
55
55
  import { agentTypeForSelection, isWakeableAgentType } from "../agent-type-map.mjs";
56
+ import { writePiMcpServer, resolvePiMcpConfigPath } from "../pi-mcp-config.mjs";
56
57
 
57
58
  const STEP_ID = "credential-seed";
58
59
  const { SEEDED, SKIPPED, FAILED } = OUTCOME_ACTIONS;
@@ -421,6 +422,23 @@ export function readCodexEnvProfile(envPath, deps = {}) {
421
422
  }
422
423
  }
423
424
 
425
+ /**
426
+ * Whether an init selection id is Pi (`pi`). Pi's Chorus MCP access is via the ADAPTER
427
+ * path (`pi-mcp-adapter` reads an mcp.json — chorus.ts never registers tools itself), so
428
+ * — like Codex's `[mcp_servers.chorus]` — `chorus agents add` writes pi's global
429
+ * `~/.pi/agent/mcp.json` with an `mcpServers.chorus` entry whose Authorization references
430
+ * the API key by ENV VAR (`Bearer ${CHORUS_API_KEY}`), NO literal key on disk. Unlike dsh /
431
+ * Claude Code / Codex, pi has NO settings env-file to persist the key + profile into, so this
432
+ * write does NOT suppress the CHORUS_AGENT_PROFILE export hint: interactive pi still needs
433
+ * CHORUS_API_KEY (+ CHORUS_AGENT_PROFILE) exported in its shell. We gate on the selection id,
434
+ * NOT the mapped daemon agentType (`pi` → the shared "offline" type, so it can't single pi
435
+ * out). Mirrors {@link isDshSelection} / {@link isClaudeSelection} / {@link isCodexSelection}.
436
+ * @param {string} id
437
+ */
438
+ function isPiSelection(id) {
439
+ return id === "pi";
440
+ }
441
+
424
442
  /**
425
443
  * @param {import("../contracts.mjs").StepContext & {
426
444
  * validateCredentials?: Function, appendAgent?: Function, writeLogin?: Function,
@@ -442,6 +460,7 @@ export async function seedCredentials(ctx) {
442
460
  const readSettingsProfile = ctx.readClaudeSettingsProfile ?? readClaudeSettingsProfile;
443
461
  const writeCodexEnv = ctx.writeCodexEnv ?? writeCodexEnvFile;
444
462
  const readCodexProfile = ctx.readCodexEnvProfile ?? readCodexEnvProfile;
463
+ const writePiMcp = ctx.writePiMcp ?? writePiMcpServer;
445
464
 
446
465
  const selection = Array.isArray(ctx.selection) ? ctx.selection.filter((id) => nonEmpty(id)) : [];
447
466
  if (selection.length === 0) {
@@ -708,13 +727,47 @@ export async function seedCredentials(ctx) {
708
727
  }
709
728
  }
710
729
 
711
- // Combined side-file note + hint-suppression flags (dsh, claude, and codex are mutually
712
- // exclusive selection ids, so at most one note/flag is set per iteration).
713
- const sideNote = `${dshNote}${claudeNote}${codexNote}`;
730
+ // pi-only: ALSO write pi's global ~/.pi/agent/mcp.json so `pi-mcp-adapter` exposes the
731
+ // chorus_* tools to the pi agent (the ADAPTER path chorus.ts never registers tools). The
732
+ // Authorization header references the key by env var (`Bearer ${CHORUS_API_KEY}`), so NO
733
+ // literal cho_ key is written — the pi analogue of Codex's keyless [mcp_servers.chorus]
734
+ // bearer_token_env_var and CC's plugin .mcp.json ${VAR} interpolation. The URL is not a
735
+ // secret, so it is a resolved literal. UNGATED by daemon.json dedup (an idempotent re-run
736
+ // still repairs a missing/stale mcp.json). Unlike dsh/claude/codex this write does NOT
737
+ // suppress the CHORUS_AGENT_PROFILE export hint: pi has NO settings env-file to persist the
738
+ // key + profile into, so interactive pi still needs CHORUS_API_KEY (+ CHORUS_AGENT_PROFILE)
739
+ // in its shell — the daemon spawner injects them for the wake path. `piMcpWritten` is
740
+ // reported for observability only; it is intentionally NOT in the hint-suppression set.
741
+ let piNote = "";
742
+ let piMcpWritten = false;
743
+ if (isPiSelection(id)) {
744
+ const configPath = resolvePiMcpConfigPath(env);
745
+ try {
746
+ const p = writePiMcp({ configPath, url });
747
+ piMcpWritten = true;
748
+ piNote =
749
+ `; wrote mcpServers.chorus (Authorization: Bearer \${CHORUS_API_KEY}) into ${p} (0600) — ` +
750
+ "pi-mcp-adapter exposes the chorus_* tools with the cho_ key env-sourced (no literal key on " +
751
+ "disk). Interactive pi still needs CHORUS_API_KEY (+ CHORUS_AGENT_PROFILE) exported in its " +
752
+ "shell; the daemon injects them for the wake path. Your cho_ key is not shown here.";
753
+ } catch (err) {
754
+ piNote =
755
+ `; WARNING: could not write ${configPath} (${err?.message ?? String(err)}). ` +
756
+ "pi will not reach Chorus MCP until an mcpServers.chorus entry with an env-referenced " +
757
+ `Authorization (Bearer \${CHORUS_API_KEY}) exists — add it to ${configPath}. ` +
758
+ "Your cho_ key is not shown here.";
759
+ }
760
+ }
761
+
762
+ // Combined side-file note + hint-suppression flags (dsh, claude, codex, and pi are mutually
763
+ // exclusive selection ids, so at most one note is set per iteration). piMcpWritten is carried
764
+ // for observability but is NOT a hint-suppression flag (see the pi branch above).
765
+ const sideNote = `${dshNote}${claudeNote}${codexNote}${piNote}`;
714
766
  const hintFlags = {
715
767
  ...(profileInEnv ? { profileInEnv: true } : {}),
716
768
  ...(settingsEnvWritten ? { settingsEnvWritten: true } : {}),
717
769
  ...(codexEnvWritten ? { codexEnvWritten: true } : {}),
770
+ ...(piMcpWritten ? { piMcpWritten: true } : {}),
718
771
  };
719
772
 
720
773
  if (!res.ok) {