@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
@@ -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) {