specrails-desktop 2.30.2 → 2.31.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (462) hide show
  1. package/README.md +28 -24
  2. package/client/dist/assets/{ActivityFeedPage-9DZOvIcY.js → ActivityFeedPage-CAhFRUO4.js} +1 -1
  3. package/client/dist/assets/{AgentBrowserCapture-DqyHbzk7.js → AgentBrowserCapture-Ct4G5lsE.js} +1 -1
  4. package/client/dist/assets/AgentModeCodePane-DQt9WIvu.js +2 -0
  5. package/client/dist/assets/{AgentModeJobsPane-CTIHMUKN.js → AgentModeJobsPane-podaJVl9.js} +1 -1
  6. package/client/dist/assets/AgentsPage-DTZdbW80.js +87 -0
  7. package/client/dist/assets/AnalyticsPage-BskgGPm0.js +1 -0
  8. package/client/dist/assets/CodePage-CvtYo1DU.js +2 -0
  9. package/client/dist/assets/{DesktopAnalyticsPage-CkXUFj3F.js → DesktopAnalyticsPage-Dnf99E8e.js} +1 -1
  10. package/client/dist/assets/{DocsDialog-PhdCJNVj.js → DocsDialog-DHi36rZ4.js} +1 -1
  11. package/client/dist/assets/{DocsPage-BY-wDthx.js → DocsPage-DIdVrQz1.js} +1 -1
  12. package/client/dist/assets/{InteractiveJobComposer-C9I0A4KR.js → InteractiveJobComposer-BHeB2inv.js} +1 -1
  13. package/client/dist/assets/{JobDetailModal-I_RoQJV4.js → JobDetailModal-CF1SKUHH.js} +1 -1
  14. package/client/dist/assets/JobDetailPage-De3rY18h.js +1 -0
  15. package/client/dist/assets/{JobsPage-DcllM4Ip.js → JobsPage-CfAqqJTx.js} +1 -1
  16. package/client/dist/assets/{LoopBuilderPage-DGm_iuff.js → LoopBuilderPage-DSBMuTb3.js} +2 -2
  17. package/client/dist/assets/{LoopPreviewModal-BC-TeFdD.js → LoopPreviewModal-B-c37kA0.js} +1 -1
  18. package/client/dist/assets/LoopsPage-DjnNXdmm.js +1 -0
  19. package/client/dist/assets/{MinimizedChatsContext-Cs34FPTz.js → MinimizedChatsContext-DIsnQMVz.js} +1 -1
  20. package/client/dist/assets/PluginsPage-DA5pQ_6u.js +2 -0
  21. package/client/dist/assets/{ProjectSettingsDialog-nEs-ENrE.js → ProjectSettingsDialog-DA23PSi6.js} +1 -1
  22. package/client/dist/assets/{TemplatePreviewModal-D4qW-J9B.js → TemplatePreviewModal-Cp7IQ-g2.js} +1 -1
  23. package/client/dist/assets/TicketDetailModal-BPD2i_0R.js +14 -0
  24. package/client/dist/assets/{Trans-CPISVji8.js → Trans-cWtExGkC.js} +1 -1
  25. package/client/dist/assets/addspec-4WmLJmBG.js +1 -0
  26. package/client/dist/assets/addspec-BRlk8jON.js +1 -0
  27. package/client/dist/assets/addspec-C7XRejU4.js +1 -0
  28. package/client/dist/assets/addspec-CHW9xf_X.js +1 -0
  29. package/client/dist/assets/addspec-DTmRrWrF.js +1 -0
  30. package/client/dist/assets/addspec-DhmnXER8.js +1 -0
  31. package/client/dist/assets/addspec-Di41DpYV.js +1 -0
  32. package/client/dist/assets/addspec-x3mizDxc.js +1 -0
  33. package/client/dist/assets/agent-BKsuIgIT.js +1 -0
  34. package/client/dist/assets/agent-Bs9NilfI.js +1 -0
  35. package/client/dist/assets/agent-C23h684q.js +1 -0
  36. package/client/dist/assets/agent-CqEjy3Z2.js +1 -0
  37. package/client/dist/assets/agent-D5DZTks1.js +1 -0
  38. package/client/dist/assets/agent-DE8hUYPl.js +1 -0
  39. package/client/dist/assets/agent-DsTuJGSc.js +1 -0
  40. package/client/dist/assets/agent-DwZM05-x.js +1 -0
  41. package/client/dist/assets/agents-45GbINfh.js +1 -0
  42. package/client/dist/assets/agents-BHp0_FQt.js +1 -0
  43. package/client/dist/assets/agents-Bvyi3y6R.js +1 -0
  44. package/client/dist/assets/agents-DMKFStHL.js +1 -0
  45. package/client/dist/assets/agents-DaYcxAr1.js +1 -0
  46. package/client/dist/assets/agents-IUOgqT5t.js +1 -0
  47. package/client/dist/assets/agents-ms7TwG16.js +1 -0
  48. package/client/dist/assets/agents-rzPnqoBR.js +1 -0
  49. package/client/dist/assets/agentstudio-8TQqBenW.js +1 -0
  50. package/client/dist/assets/agentstudio-B8Z_mmEX.js +1 -0
  51. package/client/dist/assets/agentstudio-BZR9YmLs.js +1 -0
  52. package/client/dist/assets/agentstudio-Bge9pAWb.js +1 -0
  53. package/client/dist/assets/agentstudio-Bz169Vzt.js +1 -0
  54. package/client/dist/assets/agentstudio-D6L2jpNi.js +1 -0
  55. package/client/dist/assets/agentstudio-K2-Z7CL0.js +1 -0
  56. package/client/dist/assets/agentstudio-Zmgzthv8.js +1 -0
  57. package/client/dist/assets/analytics-B8Qtptbl.js +1 -0
  58. package/client/dist/assets/analytics-BHqUazhP.js +1 -0
  59. package/client/dist/assets/analytics-BPptRY4f.js +1 -0
  60. package/client/dist/assets/analytics-BxDGOIwf.js +1 -0
  61. package/client/dist/assets/analytics-C9RaQcE3.js +1 -0
  62. package/client/dist/assets/analytics-CJIwqrEl.js +1 -0
  63. package/client/dist/assets/analytics-D_OZdQ9O.js +1 -0
  64. package/client/dist/assets/analytics-We6lUMI8.js +1 -0
  65. package/client/dist/assets/builder-3bygQtZi.js +1 -0
  66. package/client/dist/assets/builder-BiUG9Z5K.js +1 -0
  67. package/client/dist/assets/builder-CGRz_-zP.js +1 -0
  68. package/client/dist/assets/builder-CWYPw7Cw.js +1 -0
  69. package/client/dist/assets/builder-CX1437hF.js +1 -0
  70. package/client/dist/assets/{builder-CwA4T7gP.js → builder-Cowk9jtL.js} +1 -1
  71. package/client/dist/assets/builder-DwDexYRE.js +1 -0
  72. package/client/dist/assets/builder-skfnZ1uC.js +1 -0
  73. package/client/dist/assets/code-B0O8-p8k.js +1 -0
  74. package/client/dist/assets/code-B1VLZDhS.js +1 -0
  75. package/client/dist/assets/code-B86IMAfz.js +1 -0
  76. package/client/dist/assets/code-Bpj4Ddml.js +1 -0
  77. package/client/dist/assets/code-BykBZ5-e.js +1 -0
  78. package/client/dist/assets/code-CHPkOkDS.js +1 -0
  79. package/client/dist/assets/code-CkUuW4m9.js +1 -0
  80. package/client/dist/assets/code-cAqaqMTx.js +1 -0
  81. package/client/dist/assets/{dashboard-Dy2Um-US.js → dashboard-BVq6kRJe.js} +1 -1
  82. package/client/dist/assets/{dashboard-CHCEkds4.js → dashboard-BaKPPmLH.js} +1 -1
  83. package/client/dist/assets/{dashboard-CrlTV1ms.js → dashboard-Bm8e4zYG.js} +1 -1
  84. package/client/dist/assets/{dashboard-WhzOQw1S.js → dashboard-Bt6IesnM.js} +1 -1
  85. package/client/dist/assets/{dashboard-Cslu_GCH.js → dashboard-C_NQZle_.js} +1 -1
  86. package/client/dist/assets/{dashboard-DweT3Y4R.js → dashboard-CyZKoGoI.js} +1 -1
  87. package/client/dist/assets/{dashboard-DUU8-_Rg.js → dashboard-HIUdUBQ0.js} +1 -1
  88. package/client/dist/assets/{dashboard-Cqmmbh3l.js → dashboard-pm4Mr229.js} +1 -1
  89. package/client/dist/assets/{dist-js-jwoXo0YD.js → dist-js-BaP-xLOy.js} +1 -1
  90. package/client/dist/assets/{dist-js-Dj72W6qo.js → dist-js-CLlgOa5a.js} +1 -1
  91. package/client/dist/assets/format-command-C0D9IPmV.js +1 -0
  92. package/client/dist/assets/{formatDistanceToNow-ByKli7Q_.js → formatDistanceToNow-DUyzS4rr.js} +1 -1
  93. package/client/dist/assets/{getTimezoneOffsetInMilliseconds-qrcBaLW1.js → getTimezoneOffsetInMilliseconds-BCIwmmTj.js} +1 -1
  94. package/client/dist/assets/{i18n-Bf9Ckd10.js → i18n-D21Pr8Sj.js} +2 -2
  95. package/client/dist/assets/index-BdSDUFnA.css +2 -0
  96. package/client/dist/assets/index-Ci4-JKDr.js +77 -0
  97. package/client/dist/assets/{jobs-CVFD8rar.js → jobs-BAls3bWq.js} +1 -1
  98. package/client/dist/assets/{jobs-DoSaFzAa.js → jobs-B_TeSQxb.js} +1 -1
  99. package/client/dist/assets/jobs-Bgq-PZkC.js +1 -0
  100. package/client/dist/assets/jobs-Bpks6doU.js +1 -0
  101. package/client/dist/assets/jobs-CN_zv4Gr.js +1 -0
  102. package/client/dist/assets/jobs-DUlWSYq2.js +1 -0
  103. package/client/dist/assets/{jobs-B-sDHEay.js → jobs-DhxKgWFq.js} +1 -1
  104. package/client/dist/assets/{jobs-lk1_Dq1U.js → jobs-SwYS2M-B.js} +1 -1
  105. package/client/dist/assets/nav-BHDiSIVu.js +1 -0
  106. package/client/dist/assets/nav-CMiYAq4i.js +1 -0
  107. package/client/dist/assets/nav-CqS7NrDW.js +1 -0
  108. package/client/dist/assets/nav-D-0M7xfv.js +1 -0
  109. package/client/dist/assets/nav-D65O6u9I.js +1 -0
  110. package/client/dist/assets/nav-D_LKYvBr.js +1 -0
  111. package/client/dist/assets/nav-FDTJmU79.js +1 -0
  112. package/client/dist/assets/nav-VaB-C4k5.js +1 -0
  113. package/client/dist/assets/provider-capabilities-BvoExILy.js +1 -0
  114. package/client/dist/assets/settings-BveOJoaI.js +1 -0
  115. package/client/dist/assets/settings-Cj1C6F5k.js +1 -0
  116. package/client/dist/assets/settings-CuVwOpe0.js +1 -0
  117. package/client/dist/assets/settings-D5X4DfRc.js +1 -0
  118. package/client/dist/assets/settings-DXwxe-BW.js +1 -0
  119. package/client/dist/assets/settings-Di81Ba_V.js +1 -0
  120. package/client/dist/assets/settings-jbLjCYC_.js +1 -0
  121. package/client/dist/assets/settings-wIZNPFnn.js +1 -0
  122. package/client/dist/assets/setup-BBiHEO7h.js +1 -0
  123. package/client/dist/assets/setup-BlTWhNIQ.js +1 -0
  124. package/client/dist/assets/setup-Bp2L_oiP.js +1 -0
  125. package/client/dist/assets/setup-CInYXp1-.js +1 -0
  126. package/client/dist/assets/{setup-CITtPjed.js → setup-CYH3bP6K.js} +1 -1
  127. package/client/dist/assets/setup-DwcQ921P.js +1 -0
  128. package/client/dist/assets/setup-PBLjuDSs.js +1 -0
  129. package/client/dist/assets/setup-bx6FtoBp.js +1 -0
  130. package/client/dist/assets/{spending-DMnCXy84.js → spending-BCyUxoOI.js} +1 -1
  131. package/client/dist/assets/{tickets-B8BuAaj5.js → tickets-BL9r1G0e.js} +1 -1
  132. package/client/dist/assets/{tickets-DpmdE8tv.js → tickets-B_NyHJ8f.js} +1 -1
  133. package/client/dist/assets/{tickets-B_yh4qQk.js → tickets-BarF1wuG.js} +1 -1
  134. package/client/dist/assets/{tickets-pAUJkDTu.js → tickets-CclVhpQA.js} +1 -1
  135. package/client/dist/assets/{tickets-D_yDquEw.js → tickets-CqqOHbli.js} +1 -1
  136. package/client/dist/assets/{tickets-CFk2n2Or.js → tickets-DCkFSiqt.js} +1 -1
  137. package/client/dist/assets/{tickets-DQp7JS2R.js → tickets-Djn3ccfT.js} +1 -1
  138. package/client/dist/assets/{tickets-Bs37scwY.js → tickets-MiHBPsy_.js} +1 -1
  139. package/client/dist/assets/{useBrowserCaptureSession-CkBJShUw.js → useBrowserCaptureSession-CkVCDzer.js} +1 -1
  140. package/client/dist/assets/{useDesktop-B4pSBIDd.js → useDesktop-DCP_MHp9.js} +1 -1
  141. package/client/dist/index.html +25 -24
  142. package/docs/README.md +7 -3
  143. package/docs/cli.md +3 -3
  144. package/docs/codex.md +51 -64
  145. package/docs/creating-specs.md +36 -4
  146. package/docs/customizing.md +5 -5
  147. package/docs/gemini.md +35 -47
  148. package/docs/getting-started.md +15 -9
  149. package/docs/guide/de/agents/2-profiles-and-the-balanced-default.md +5 -1
  150. package/docs/guide/de/agents/4-custom-agents-catalog.md +7 -4
  151. package/docs/guide/de/getting-started/1-what-is-specrails.md +1 -0
  152. package/docs/guide/de/getting-started/2-installing-and-first-run.md +1 -0
  153. package/docs/guide/de/getting-started/4-the-dashboard-tour.md +4 -4
  154. package/docs/guide/de/integrations/1-ai-providers.md +29 -18
  155. package/docs/guide/de/integrations/2-plugins.md +3 -3
  156. package/docs/guide/de/integrations/6-agent-chat.md +8 -1
  157. package/docs/guide/de/pipeline/1-rails-and-jobs.md +9 -6
  158. package/docs/guide/de/pipeline/2-the-job-detail-view.md +3 -1
  159. package/docs/guide/de/pipeline/3-batch-implement-and-multi-feature.md +1 -1
  160. package/docs/guide/de/pipeline/4-picking-an-engine-per-rail.md +13 -13
  161. package/docs/guide/de/pipeline/5-the-loop-builder.md +6 -2
  162. package/docs/guide/de/specs/2-add-spec-quick-mode.md +6 -1
  163. package/docs/guide/en/agents/2-profiles-and-the-balanced-default.md +7 -1
  164. package/docs/guide/en/agents/4-custom-agents-catalog.md +17 -4
  165. package/docs/guide/en/getting-started/1-what-is-specrails.md +2 -1
  166. package/docs/guide/en/getting-started/2-installing-and-first-run.md +2 -1
  167. package/docs/guide/en/getting-started/4-the-dashboard-tour.md +5 -5
  168. package/docs/guide/en/insights/3-code-explorer.md +5 -0
  169. package/docs/guide/en/integrations/1-ai-providers.md +63 -22
  170. package/docs/guide/en/integrations/2-plugins.md +3 -3
  171. package/docs/guide/en/integrations/6-agent-chat.md +14 -2
  172. package/docs/guide/en/pipeline/1-rails-and-jobs.md +19 -7
  173. package/docs/guide/en/pipeline/2-the-job-detail-view.md +3 -1
  174. package/docs/guide/en/pipeline/3-batch-implement-and-multi-feature.md +1 -1
  175. package/docs/guide/en/pipeline/4-picking-an-engine-per-rail.md +25 -11
  176. package/docs/guide/en/pipeline/5-the-loop-builder.md +7 -2
  177. package/docs/guide/en/specs/2-add-spec-quick-mode.md +10 -1
  178. package/docs/guide/es/agents/2-profiles-and-the-balanced-default.md +5 -1
  179. package/docs/guide/es/agents/4-custom-agents-catalog.md +7 -4
  180. package/docs/guide/es/getting-started/1-what-is-specrails.md +1 -0
  181. package/docs/guide/es/getting-started/2-installing-and-first-run.md +1 -0
  182. package/docs/guide/es/getting-started/4-the-dashboard-tour.md +4 -4
  183. package/docs/guide/es/integrations/1-ai-providers.md +30 -18
  184. package/docs/guide/es/integrations/2-plugins.md +3 -3
  185. package/docs/guide/es/integrations/6-agent-chat.md +8 -1
  186. package/docs/guide/es/pipeline/1-rails-and-jobs.md +9 -6
  187. package/docs/guide/es/pipeline/2-the-job-detail-view.md +3 -1
  188. package/docs/guide/es/pipeline/3-batch-implement-and-multi-feature.md +1 -1
  189. package/docs/guide/es/pipeline/4-picking-an-engine-per-rail.md +15 -13
  190. package/docs/guide/es/pipeline/5-the-loop-builder.md +6 -2
  191. package/docs/guide/es/specs/2-add-spec-quick-mode.md +6 -1
  192. package/docs/guide/fr/agents/2-profiles-and-the-balanced-default.md +5 -1
  193. package/docs/guide/fr/agents/4-custom-agents-catalog.md +7 -4
  194. package/docs/guide/fr/getting-started/1-what-is-specrails.md +1 -0
  195. package/docs/guide/fr/getting-started/2-installing-and-first-run.md +1 -0
  196. package/docs/guide/fr/getting-started/4-the-dashboard-tour.md +4 -4
  197. package/docs/guide/fr/integrations/1-ai-providers.md +29 -18
  198. package/docs/guide/fr/integrations/2-plugins.md +3 -3
  199. package/docs/guide/fr/integrations/6-agent-chat.md +8 -1
  200. package/docs/guide/fr/pipeline/1-rails-and-jobs.md +9 -6
  201. package/docs/guide/fr/pipeline/2-the-job-detail-view.md +3 -1
  202. package/docs/guide/fr/pipeline/3-batch-implement-and-multi-feature.md +1 -1
  203. package/docs/guide/fr/pipeline/4-picking-an-engine-per-rail.md +15 -13
  204. package/docs/guide/fr/pipeline/5-the-loop-builder.md +6 -2
  205. package/docs/guide/fr/specs/2-add-spec-quick-mode.md +6 -1
  206. package/docs/guide/it/agents/2-profiles-and-the-balanced-default.md +5 -1
  207. package/docs/guide/it/agents/4-custom-agents-catalog.md +7 -4
  208. package/docs/guide/it/getting-started/1-what-is-specrails.md +1 -0
  209. package/docs/guide/it/getting-started/2-installing-and-first-run.md +1 -0
  210. package/docs/guide/it/getting-started/4-the-dashboard-tour.md +4 -4
  211. package/docs/guide/it/integrations/1-ai-providers.md +28 -18
  212. package/docs/guide/it/integrations/2-plugins.md +3 -3
  213. package/docs/guide/it/integrations/6-agent-chat.md +8 -1
  214. package/docs/guide/it/pipeline/1-rails-and-jobs.md +9 -6
  215. package/docs/guide/it/pipeline/2-the-job-detail-view.md +3 -1
  216. package/docs/guide/it/pipeline/3-batch-implement-and-multi-feature.md +1 -1
  217. package/docs/guide/it/pipeline/4-picking-an-engine-per-rail.md +13 -13
  218. package/docs/guide/it/pipeline/5-the-loop-builder.md +6 -2
  219. package/docs/guide/it/specs/2-add-spec-quick-mode.md +6 -1
  220. package/docs/guide/ja/agents/2-profiles-and-the-balanced-default.md +6 -1
  221. package/docs/guide/ja/agents/4-custom-agents-catalog.md +7 -4
  222. package/docs/guide/ja/getting-started/1-what-is-specrails.md +1 -0
  223. package/docs/guide/ja/getting-started/2-installing-and-first-run.md +1 -0
  224. package/docs/guide/ja/getting-started/4-the-dashboard-tour.md +4 -4
  225. package/docs/guide/ja/integrations/1-ai-providers.md +28 -18
  226. package/docs/guide/ja/integrations/2-plugins.md +3 -3
  227. package/docs/guide/ja/integrations/6-agent-chat.md +7 -1
  228. package/docs/guide/ja/pipeline/1-rails-and-jobs.md +9 -6
  229. package/docs/guide/ja/pipeline/2-the-job-detail-view.md +3 -1
  230. package/docs/guide/ja/pipeline/3-batch-implement-and-multi-feature.md +1 -1
  231. package/docs/guide/ja/pipeline/4-picking-an-engine-per-rail.md +14 -13
  232. package/docs/guide/ja/pipeline/5-the-loop-builder.md +6 -2
  233. package/docs/guide/ja/specs/2-add-spec-quick-mode.md +6 -1
  234. package/docs/guide/pt/agents/2-profiles-and-the-balanced-default.md +5 -1
  235. package/docs/guide/pt/agents/4-custom-agents-catalog.md +7 -4
  236. package/docs/guide/pt/getting-started/1-what-is-specrails.md +1 -0
  237. package/docs/guide/pt/getting-started/2-installing-and-first-run.md +1 -0
  238. package/docs/guide/pt/getting-started/4-the-dashboard-tour.md +4 -4
  239. package/docs/guide/pt/integrations/1-ai-providers.md +28 -18
  240. package/docs/guide/pt/integrations/2-plugins.md +3 -3
  241. package/docs/guide/pt/integrations/6-agent-chat.md +7 -1
  242. package/docs/guide/pt/pipeline/1-rails-and-jobs.md +9 -6
  243. package/docs/guide/pt/pipeline/2-the-job-detail-view.md +2 -1
  244. package/docs/guide/pt/pipeline/3-batch-implement-and-multi-feature.md +1 -1
  245. package/docs/guide/pt/pipeline/4-picking-an-engine-per-rail.md +14 -13
  246. package/docs/guide/pt/pipeline/5-the-loop-builder.md +6 -2
  247. package/docs/guide/pt/specs/2-add-spec-quick-mode.md +6 -1
  248. package/docs/guide/zh/agents/2-profiles-and-the-balanced-default.md +4 -1
  249. package/docs/guide/zh/agents/4-custom-agents-catalog.md +7 -4
  250. package/docs/guide/zh/getting-started/1-what-is-specrails.md +1 -0
  251. package/docs/guide/zh/getting-started/2-installing-and-first-run.md +1 -0
  252. package/docs/guide/zh/getting-started/4-the-dashboard-tour.md +4 -4
  253. package/docs/guide/zh/integrations/1-ai-providers.md +26 -18
  254. package/docs/guide/zh/integrations/2-plugins.md +3 -3
  255. package/docs/guide/zh/integrations/6-agent-chat.md +6 -1
  256. package/docs/guide/zh/pipeline/1-rails-and-jobs.md +9 -6
  257. package/docs/guide/zh/pipeline/2-the-job-detail-view.md +2 -1
  258. package/docs/guide/zh/pipeline/3-batch-implement-and-multi-feature.md +1 -1
  259. package/docs/guide/zh/pipeline/4-picking-an-engine-per-rail.md +12 -12
  260. package/docs/guide/zh/pipeline/5-the-loop-builder.md +6 -2
  261. package/docs/guide/zh/specs/2-add-spec-quick-mode.md +6 -1
  262. package/docs/internals/README.md +4 -1
  263. package/docs/internals/adding-a-provider.md +32 -28
  264. package/docs/internals/api-reference.md +37 -13
  265. package/docs/internals/architecture.md +5 -5
  266. package/docs/internals/bundled-framework-build-plan.md +3 -3
  267. package/docs/internals/code-explorer-story.md +4 -0
  268. package/docs/internals/configuration.md +17 -5
  269. package/docs/internals/global-artifacts-alignment-contract.md +1 -1
  270. package/docs/internals/operations-runbook.md +1 -1
  271. package/docs/internals/profiles.md +37 -45
  272. package/docs/internals/project-builder.md +16 -0
  273. package/docs/kimi.md +291 -0
  274. package/docs/mcp.md +9 -2
  275. package/docs/platforms/macos.md +17 -7
  276. package/docs/platforms/windows.md +9 -4
  277. package/docs/running-pipelines.md +46 -12
  278. package/docs/terminal.md +1 -1
  279. package/docs/tracking-cost.md +25 -6
  280. package/package.json +4 -2
  281. package/server/dist/agent-chat-manager.js +74 -32
  282. package/server/dist/agent-chat-router.js +40 -17
  283. package/server/dist/agent-cwd-manager.js +14 -7
  284. package/server/dist/agent-generator.js +69 -85
  285. package/server/dist/agent-mcp-config.js +17 -11
  286. package/server/dist/agent-operator-prompt.js +29 -20
  287. package/server/dist/agent-refine-manager.js +58 -38
  288. package/server/dist/ai-invocations.js +65 -20
  289. package/server/dist/attachment-manager.js +49 -15
  290. package/server/dist/blueprint-chat-manager.js +41 -16
  291. package/server/dist/blueprint-router.js +40 -6
  292. package/server/dist/chat-manager.js +165 -89
  293. package/server/dist/code-explorer-router.js +26 -7
  294. package/server/dist/contract-refine-runner.js +146 -113
  295. package/server/dist/core-compat.js +57 -2
  296. package/server/dist/core-package.js +3 -3
  297. package/server/dist/core-update-manager.js +17 -1
  298. package/server/dist/db.js +60 -5
  299. package/server/dist/desktop-analytics.js +44 -6
  300. package/server/dist/desktop-router.js +127 -11
  301. package/server/dist/explore-cwd-manager.js +19 -3
  302. package/server/dist/feature-flags.js +1 -1
  303. package/server/dist/file-story-manager.js +3 -3
  304. package/server/dist/file-summary-generator.js +21 -15
  305. package/server/dist/file-summary-manager.js +6 -6
  306. package/server/dist/framework-manager.js +19 -2
  307. package/server/dist/framework-migration.js +27 -12
  308. package/server/dist/install-config-path.js +1 -1
  309. package/server/dist/interactive-job-session.js +8 -6
  310. package/server/dist/loop-command-catalog.js +27 -10
  311. package/server/dist/loop-executors.js +59 -27
  312. package/server/dist/loop-factory.js +2 -2
  313. package/server/dist/loop-run-manager.js +100 -39
  314. package/server/dist/loops-router.js +1 -1
  315. package/server/dist/mcp/guide.js +23 -16
  316. package/server/dist/mcp/tools/agents.js +47 -41
  317. package/server/dist/mcp/tools/analytics.js +2 -2
  318. package/server/dist/mcp/tools/loops.js +2 -2
  319. package/server/dist/mcp/tools/plugins.js +14 -9
  320. package/server/dist/mcp/tools/rails.js +12 -13
  321. package/server/dist/mcp/tools/support.js +1 -1
  322. package/server/dist/mobile/mobile-router.js +5 -1
  323. package/server/dist/offline-assemble.js +13 -1
  324. package/server/dist/path-resolver.js +2 -2
  325. package/server/dist/plugin-manager.js +391 -106
  326. package/server/dist/plugins/claude-md-mutation.js +5 -4
  327. package/server/dist/plugins/drift.js +32 -29
  328. package/server/dist/plugins/rail-integration.js +13 -2
  329. package/server/dist/plugins/serena/install.js +25 -17
  330. package/server/dist/plugins/serena/manifest.js +22 -5
  331. package/server/dist/plugins/serena/verify.js +46 -16
  332. package/server/dist/plugins-router.js +59 -8
  333. package/server/dist/profile-manager.js +148 -36
  334. package/server/dist/profiles-router.js +311 -82
  335. package/server/dist/project-registry.js +2 -2
  336. package/server/dist/project-router-chat.js +17 -8
  337. package/server/dist/project-router-helpers.js +93 -5
  338. package/server/dist/project-router-jobs.js +76 -12
  339. package/server/dist/project-router-loop-runs.js +42 -14
  340. package/server/dist/project-router-settings.js +31 -10
  341. package/server/dist/project-router-setup.js +4 -5
  342. package/server/dist/project-router-spending.js +15 -3
  343. package/server/dist/project-router-tickets.js +187 -181
  344. package/server/dist/project-router.js +1 -0
  345. package/server/dist/proposal-manager.js +125 -85
  346. package/server/dist/providers/claude-adapter.js +14 -0
  347. package/server/dist/providers/codex-adapter.js +20 -0
  348. package/server/dist/providers/gemini-adapter.js +14 -0
  349. package/server/dist/providers/index.js +18 -1
  350. package/server/dist/providers/kimi-adapter.js +361 -0
  351. package/server/dist/providers/kimi-skill-prompt.js +332 -0
  352. package/server/dist/providers/runtime.js +137 -0
  353. package/server/dist/queue-manager.js +103 -78
  354. package/server/dist/rail-isolated-launch.js +1 -1
  355. package/server/dist/rails-router.js +51 -38
  356. package/server/dist/result-event.js +5 -0
  357. package/server/dist/schemas/profile.v1.json +3 -4
  358. package/server/dist/setup-manager.js +222 -101
  359. package/server/dist/setup-prerequisites.js +7 -1
  360. package/server/dist/smash-runner.js +104 -57
  361. package/server/dist/spawn-lifecycle.js +18 -14
  362. package/server/dist/spec-launcher-manager.js +66 -54
  363. package/server/dist/spec-models.js +15 -6
  364. package/server/dist/spending.js +110 -17
  365. package/server/dist/util/cli-prompt.js +142 -5
  366. package/server/dist/util/stream-display.js +46 -0
  367. package/server/dist/workspace-manager.js +100 -37
  368. package/server/dist/worktree-manager.js +4 -0
  369. package/server/dist/worktree-overlay.js +12 -3
  370. package/client/dist/assets/AgentModeCodePane-BAYyFRmY.js +0 -2
  371. package/client/dist/assets/AgentsPage-DuyJuaFs.js +0 -86
  372. package/client/dist/assets/AnalyticsPage-BY7gtCx6.js +0 -1
  373. package/client/dist/assets/CodePage-vyQr40Vl.js +0 -2
  374. package/client/dist/assets/JobDetailPage-CU4FEnUC.js +0 -1
  375. package/client/dist/assets/LoopsPage-SqglnXlp.js +0 -1
  376. package/client/dist/assets/PluginsPage-B89S8o1a.js +0 -2
  377. package/client/dist/assets/TicketDetailModal-CI47Dq9E.js +0 -14
  378. package/client/dist/assets/addspec-BXjvkh5q.js +0 -1
  379. package/client/dist/assets/addspec-C4bwrmpi.js +0 -1
  380. package/client/dist/assets/addspec-CArHXUDM.js +0 -1
  381. package/client/dist/assets/addspec-DTKJcXiR.js +0 -1
  382. package/client/dist/assets/addspec-DbNBbrha.js +0 -1
  383. package/client/dist/assets/addspec-Rw8uVBC1.js +0 -1
  384. package/client/dist/assets/addspec-htHGZHOe.js +0 -1
  385. package/client/dist/assets/addspec-lr_LP6jk.js +0 -1
  386. package/client/dist/assets/agent-BABjRt0P.js +0 -1
  387. package/client/dist/assets/agent-BuUpgqVx.js +0 -1
  388. package/client/dist/assets/agent-CCDZesgU.js +0 -1
  389. package/client/dist/assets/agent-CVn64zWH.js +0 -1
  390. package/client/dist/assets/agent-CWeOny0E.js +0 -1
  391. package/client/dist/assets/agent-DOysmad_.js +0 -1
  392. package/client/dist/assets/agent-DSsjTBhn.js +0 -1
  393. package/client/dist/assets/agent-DlZMxfM9.js +0 -1
  394. package/client/dist/assets/agents-6ZOJXWVk.js +0 -1
  395. package/client/dist/assets/agents-BZ0XQKjg.js +0 -1
  396. package/client/dist/assets/agents-BqWklnHR.js +0 -1
  397. package/client/dist/assets/agents-Bz-thHkB.js +0 -1
  398. package/client/dist/assets/agents-CJclElx6.js +0 -1
  399. package/client/dist/assets/agents-D_l9L0VA.js +0 -1
  400. package/client/dist/assets/agents-DhG7mg6-.js +0 -1
  401. package/client/dist/assets/agents-u_C0jPB5.js +0 -1
  402. package/client/dist/assets/agentstudio-BF19hbXj.js +0 -1
  403. package/client/dist/assets/agentstudio-BIUe1Im2.js +0 -1
  404. package/client/dist/assets/agentstudio-BLGvxWBx.js +0 -1
  405. package/client/dist/assets/agentstudio-D9UKiWTj.js +0 -1
  406. package/client/dist/assets/agentstudio-Drs37nIM.js +0 -1
  407. package/client/dist/assets/agentstudio-nEnKkcXM.js +0 -1
  408. package/client/dist/assets/agentstudio-pyFcSBKy.js +0 -1
  409. package/client/dist/assets/agentstudio-zfTzQh3U.js +0 -1
  410. package/client/dist/assets/analytics-BC7mwR4s.js +0 -1
  411. package/client/dist/assets/analytics-BiNg8edP.js +0 -1
  412. package/client/dist/assets/analytics-C0s_T2GN.js +0 -1
  413. package/client/dist/assets/analytics-CdsAPAwZ.js +0 -1
  414. package/client/dist/assets/analytics-Cr1_q-lC.js +0 -1
  415. package/client/dist/assets/analytics-DZ8Aoq3I.js +0 -1
  416. package/client/dist/assets/analytics-IEsKZvpW.js +0 -1
  417. package/client/dist/assets/analytics-SRPf84OT.js +0 -1
  418. package/client/dist/assets/builder-BH8Fua-g.js +0 -1
  419. package/client/dist/assets/builder-BoV7DgKd.js +0 -1
  420. package/client/dist/assets/builder-Cc_Lf79C.js +0 -1
  421. package/client/dist/assets/builder-CwZ7Bme2.js +0 -1
  422. package/client/dist/assets/builder-CxW-JFsR.js +0 -1
  423. package/client/dist/assets/builder-D94lrV7x.js +0 -1
  424. package/client/dist/assets/builder-cqHpCyGa.js +0 -1
  425. package/client/dist/assets/code-76gS0IdL.js +0 -1
  426. package/client/dist/assets/code-BDXEM4ml.js +0 -1
  427. package/client/dist/assets/code-C1VwxlML.js +0 -1
  428. package/client/dist/assets/code-CnMZyJpr.js +0 -1
  429. package/client/dist/assets/code-D20ef9Cf.js +0 -1
  430. package/client/dist/assets/code-DdOXaWRY.js +0 -1
  431. package/client/dist/assets/code-Duohuf9l.js +0 -1
  432. package/client/dist/assets/code-geHmknB9.js +0 -1
  433. package/client/dist/assets/format-command-Dfa1o2d-.js +0 -1
  434. package/client/dist/assets/index-Dh9i4CnN.css +0 -2
  435. package/client/dist/assets/index-F9r8mWP_.js +0 -76
  436. package/client/dist/assets/jobs-BCtGfgUA.js +0 -1
  437. package/client/dist/assets/jobs-BHR_EnDI.js +0 -1
  438. package/client/dist/assets/jobs-BMbZJjJJ.js +0 -1
  439. package/client/dist/assets/jobs-DzSIR8V6.js +0 -1
  440. package/client/dist/assets/nav-BRJBxaGt.js +0 -1
  441. package/client/dist/assets/nav-CAGKv3_F.js +0 -1
  442. package/client/dist/assets/nav-CNskRJKQ.js +0 -1
  443. package/client/dist/assets/nav-DY93irBL.js +0 -1
  444. package/client/dist/assets/nav-DhjvYgqt.js +0 -1
  445. package/client/dist/assets/nav-Gb-r4wop.js +0 -1
  446. package/client/dist/assets/nav-TvumAFD2.js +0 -1
  447. package/client/dist/assets/nav-myFaXRHD.js +0 -1
  448. package/client/dist/assets/settings-B0ypw9uw.js +0 -1
  449. package/client/dist/assets/settings-B9ilOSYO.js +0 -1
  450. package/client/dist/assets/settings-BqlWHRHA.js +0 -1
  451. package/client/dist/assets/settings-D8dlqt4d.js +0 -1
  452. package/client/dist/assets/settings-DAZqjX2a.js +0 -1
  453. package/client/dist/assets/settings-DRh39v1S.js +0 -1
  454. package/client/dist/assets/settings-Mj1OJbfd.js +0 -1
  455. package/client/dist/assets/settings-lRReaSYm.js +0 -1
  456. package/client/dist/assets/setup-3832BJCo.js +0 -1
  457. package/client/dist/assets/setup-B8J-gECe.js +0 -1
  458. package/client/dist/assets/setup-BCIOxVsc.js +0 -1
  459. package/client/dist/assets/setup-BciLj_tU.js +0 -1
  460. package/client/dist/assets/setup-CTkE3cfh.js +0 -1
  461. package/client/dist/assets/setup-ajB4rYm-.js +0 -1
  462. package/client/dist/assets/setup-xFO1wNl0.js +0 -1
@@ -1,9 +1,9 @@
1
1
  # Adding a new AI provider to Specrails
2
2
 
3
- > Last verified against `main` (app 2.8.0), which ships **three** registered
4
- > providers: **Claude, Codex, and Gemini**. Gemini is the freshest worked
5
- > example — `server/providers/gemini-adapter.ts` is the cleanest single-file
6
- > template to copy.
3
+ > Last verified with the Kimi provider change, which ships **four** registered
4
+ > providers: **Claude, Codex, Gemini, and Kimi**. Kimi is the freshest worked
5
+ > example — `server/providers/kimi-adapter.ts` demonstrates multi-event JSONL,
6
+ > per-child environment overrides, native skill commands, and CLI-only resume.
7
7
 
8
8
  The app is provider-agnostic by design. Every manager that spawns an AI
9
9
  CLI consumes a `ProviderAdapter` rather than branching on a hardcoded
@@ -71,10 +71,11 @@ export const exampleAdapter: ProviderAdapter = {
71
71
 
72
72
  The `ProviderAdapter` interface is documented in
73
73
  `server/providers/types.ts`. Read the existing
74
- `server/providers/{claude,codex,gemini}-adapter.ts` for the patterns —
74
+ `server/providers/{claude,codex,gemini,kimi}-adapter.ts` for the patterns —
75
75
  `SpawnAction` shapes per provider, `text-delta` event normalisation
76
- across native JSONL formats, etc. **`gemini-adapter.ts` is the newest and
77
- most representative end-to-end exemplar** to copy: it shows the optional
76
+ across native JSONL formats, etc. **`kimi-adapter.ts` is the newest
77
+ end-to-end exemplar** for prompt-mode providers; Gemini remains the example for
78
+ the optional
78
79
  `prepareHeadlessSpawn` hook, `systemPromptArg: false` system-prompt folding
79
80
  (via the `GEMINI_SYSTEM_MD` env), native OTEL with `nativeCostUsd: false`,
80
81
  and a per-action `buildArgs` switch that throws defensively on the
@@ -231,7 +232,7 @@ Two paths, picked by your `nativeOtelEnv` capability flag:
231
232
  rail spawn and the CLI exports OTLP/JSON to the app's receiver natively. There
232
233
  is no `GEMINI_TELEMETRY_*` env var — Gemini honours the same `OTEL_*` vars as
233
234
  Claude.
234
- - **`nativeOtelEnv: false`** (Codex) ⇒ the synthetic OTEL bridge at
235
+ - **`nativeOtelEnv: false`** (Codex, Kimi) ⇒ the synthetic OTEL bridge at
235
236
  `server/codex-otel-bridge.ts` fills the gap. It's provider-neutral despite its
236
237
  name — it consumes the canonical `AdapterEvent` stream. As long as your
237
238
  adapter's `parseStreamLine` emits `text-delta`, `tool-use`, `session-started`,
@@ -249,10 +250,11 @@ whenever `getAdapter(providerId).mcpRegistration === 'cli-add'`. The
249
250
  app-level `PluginManager` already threads `providerId` through every
250
251
  relevant method.
251
252
 
252
- For `mcpRegistration === 'project-json'` providers, the existing
253
- `.mcp.json` surgical-merge path applies — **but only if your CLI actually
254
- reads claude-style `.mcp.json`**. `project-json` really names that one
255
- mechanism, and Gemini is the proof it isn't universal: gemini-cli has
253
+ For `mcpRegistration === 'project-json'` providers, the adapter's
254
+ `projectMcpPath()` selects the JSON file for surgical merge: Claude uses
255
+ `.mcp.json`, Kimi uses `.kimi-code/mcp.json`, and Gemini uses
256
+ `.gemini/settings.json`. Never assume a CLI reads Claude's root `.mcp.json`.
257
+ Gemini is the proof it isn't universal: gemini-cli has
256
258
  never read `.mcp.json` — its only MCP surface is `mcpServers` in
257
259
  `settings.json` (user scope `~/.gemini/`, project scope
258
260
  `<cwd>/.gemini/`), and an untrusted cwd suppresses MCP entirely (headless
@@ -260,16 +262,15 @@ runs exit 55 with `FatalUntrustedWorkspaceError`; the app injects
260
262
  `GEMINI_CLI_TRUST_WORKSPACE=true` per spawn). The desktop agent chat
261
263
  registers its MCP for gemini via `<agent-cwd>/.gemini/settings.json` +
262
264
  that trust env (`prepareAgentMcp` in `server/agent-mcp-config.ts`);
263
- the plugin `.mcp.json` merge path still runs for gemini rails but the
264
- server silently never loads there — a known deferred gap. Full facts +
265
- the gap table: [gemini-mcp-registration.md](gemini-mcp-registration.md).
266
- If your provider has its own config surface, mirror the gemini branch of
267
- `prepareAgentMcp` rather than assuming `.mcp.json` is enough.
265
+ Full facts are in
266
+ [gemini-mcp-registration.md](gemini-mcp-registration.md). If your provider has
267
+ its own config surface, implement `projectMcpPath()` and mirror the relevant
268
+ `prepareAgentMcp` branch rather than assuming `.mcp.json` is enough.
268
269
 
269
270
  ### 6. (If the binary needs a spawn-env quirk) add it to cli-prompt.ts
270
271
 
271
272
  Per-binary spawn quirks live in `server/util/cli-prompt.ts` — the spawn layer
272
- already special-cases `spawnClaude` / `spawnCodex` / `spawnGemini`, dispatched
273
+ already special-cases `spawnClaude` / `spawnCodex` / `spawnGemini` / `spawnKimi`, dispatched
273
274
  by binary name. Gemini needed `GEMINI_CLI_TRUST_WORKSPACE=true` injected into
274
275
  every spawn (its "trusted folders" gate otherwise silently disables `--yolo`
275
276
  and blocks headless tool calls). If your CLI has an equivalent env that
@@ -281,13 +282,15 @@ providers need nothing here.
281
282
  Two distinct version concepts — don't conflate them:
282
283
 
283
284
  - **`minCliVersion`** is the **binary** floor surfaced by `detectInstalled`
284
- (Claude = `null` / none pinned, Codex = `0.128.0`, Gemini = `0.11.0`). It
285
+ (Claude = `null` / none pinned, Codex = `0.128.0`, Gemini = `0.11.0`,
286
+ Kimi = `0.27.0`). It
285
287
  guards stream-format / flag availability for that one CLI.
286
- - **`specrails-core@^4.8.0`** (`CORE_PACKAGE_SPEC`, `server/core-package.ts`) is
288
+ - **`specrails-core@^4.12.0`** (`CORE_PACKAGE_SPEC`, `server/core-package.ts`) is
287
289
  the single shared package floor the app installs/probes for **all** providers.
288
290
  It matters when your provider's **rails** rely on core-side scaffolding: core
289
291
  must emit the provider's command/agent/skill tree (e.g. Gemini needed core
290
- `4.8.0` to ship the `.gemini/` commands + `sr-*` agents). The desktop adapter
292
+ `4.8.0` to ship the `.gemini/` commands + `sr-*` agents, while Kimi requires
293
+ 4.12.0 for `.kimi-code/`). The desktop adapter
291
294
  alone covers spec / explore / quick; rails need the matching core target.
292
295
 
293
296
  ## Known gotchas
@@ -298,13 +301,14 @@ Two distinct version concepts — don't conflate them:
298
301
  `provider === 'claude'`; everything else falls into the non-claude
299
302
  (codex-shaped) branch. A new provider hitting that path would be
300
303
  silently parsed as codex — migrate the callsite or extend the branch.
301
- - **Rail slash-command translation is provider-specific.** In
302
- `server/queue-manager.ts` the rail prompt builder rewrites
303
- `/specrails:<name>` → `$<name>` for codex (so codex picks up the
304
- matching `.codex/skills/<name>/SKILL.md`), while claude passes the
305
- command verbatim. A new adapter falls through to the claude branch
306
- (verbatim). If your CLI needs a different invocation syntax, add a
307
- branch keyed on a capability, not on the provider id.
304
+ - **Rail command translation is provider-specific.** Implement
305
+ `formatCoreCommand()` on the adapter. Codex maps `/specrails:<name>` to a
306
+ `$<name>` skill; Claude passes its native slash command unchanged. Kimi is
307
+ different in headless mode: its TUI/ACP intercept `/skill:<name>`, but
308
+ `kimi -p` does not. Its hook therefore loads the installed
309
+ `.kimi-code/skills/<name>/SKILL.md`, expands arguments, and returns the
310
+ materialized activation prompt. Always pass the execution artifact `cwd` to
311
+ this hook and fail before spawn when the skill cannot be resolved.
308
312
 
309
313
  ## Drop a fixture set
310
314
 
@@ -4,7 +4,11 @@ REST and WebSocket endpoints exposed by the app server. The server binds to `127
4
4
 
5
5
  > **New here?** This page is the contract the desktop UI, the CLI, and the mobile gateway all speak to the local server. **You normally never call these endpoints directly — the app does it for you.** Read on only if you are scripting against the server, writing an integration, or debugging. Everything is local-only: there is no cloud API.
6
6
 
7
- The app speaks to three interchangeable AI provider CLIs — **Claude, Codex, and Gemini** — all enabled by default. Endpoints that accept a provider value (`provider` / `aiEngine`) take any of `claude`, `codex`, or `gemini`, validated against the providers the project actually installed. See the [Codex guide](../codex.md) and the [Gemini guide](../gemini.md) for provider specifics.
7
+ The app registers four AI provider CLIs — **Claude, Codex, Gemini, and Kimi**
8
+ — all enabled by default. Endpoints that accept `provider` / `aiEngine` take
9
+ `claude`, `codex`, `gemini`, or `kimi`, validate project membership, then
10
+ enforce the requested surface's adapter capabilities. See the
11
+ [Kimi guide](../kimi.md) for its exact matrix.
8
12
 
9
13
  ## Authentication
10
14
 
@@ -59,7 +63,7 @@ A non-localhost `Origin` header is rejected by the CORS middleware with `403 For
59
63
  | Method | Path | Notes |
60
64
  |--------|------|-------|
61
65
  | `GET` | `/projects` | List registered projects |
62
- | `POST` | `/projects` | Register a project. Body `{ path, name?, provider?, providers? }`. Each provider value is one of `claude`, `codex`, `gemini` (registry-validated). `providers: string[]` enables a multi-provider project (first entry = primary/default); legacy single `provider` still honoured; omit both to default to `["claude"]`. 409 if the path is already registered. 400 if a provider is unknown, or if a disabled provider is selected: `codex` when `SPECRAILS_CODEX_BETA=0`, `gemini` when `SPECRAILS_GEMINI_BETA=0` (both default-enabled) |
66
+ | `POST` | `/projects` | Register a project. Body `{ path, name?, provider?, providers? }`. Each provider value is one of `claude`, `codex`, `gemini`, `kimi` (registry-validated). `providers: string[]` enables a multi-provider project (first entry = primary/default); legacy single `provider` still honoured; omit both to default to `["claude"]`. 409 if the path is already registered or Kimi fails its executable/version/Core-target checks. 400 if a provider is unknown, or if a disabled provider is selected: `codex` when `SPECRAILS_CODEX_BETA=0`, `gemini` when `SPECRAILS_GEMINI_BETA=0` (both default-enabled). Kimi has no beta flag: it requires a usable `kimi` CLI ≥ 0.27.0 and a Core build that advertises the Kimi target. Kimi 0.27 has no safe non-billing authentication probe, so login/model configuration is confirmed by the first real turn |
63
67
  | `DELETE` | `/projects/:id` | Unregister (does not delete the project directory) |
64
68
  | `GET` | `/resolve?path=…` | Find a project by **exact** canonical filesystem path. No parent-directory walking — a subdirectory returns 404 |
65
69
 
@@ -80,8 +84,8 @@ Example — register a project that uses both Claude and Gemini:
80
84
  | Method | Path | Notes |
81
85
  |--------|------|-------|
82
86
  | `GET` | `/state` | `{ projects, projectCount, …todayStats }` (today's cross-project cost/run aggregates spread into the response) |
83
- | `GET` | `/cli-status` | Detected AI CLI provider + version (`{ provider, version }`), e.g. `claude`, `codex`, or `gemini` — runs `<binary> --version`. Registry-driven |
84
- | `GET` | `/available-providers` | Provider catalogue used by the setup wizard. Registry-driven map (`{ claude, codex, gemini, tiers }`) reporting which CLIs are installed. Codex/Gemini are surfaced unless forced off by `SPECRAILS_CODEX_BETA=0` / `SPECRAILS_GEMINI_BETA=0` (both enabled by default) |
87
+ | `GET` | `/cli-status` | Detected AI CLI provider + version (`{ provider, version }`), e.g. `claude`, `codex`, `gemini`, or `kimi` — runs the registered adapter's version probe. Registry-driven |
88
+ | `GET` | `/available-providers` | Provider catalogue used by the setup wizard. Registry-driven map (`{ claude, codex, gemini, kimi, tiers, providerIssues, launchDescriptors }`) reporting which CLIs are usable. Codex/Gemini are surfaced unless forced off by `SPECRAILS_CODEX_BETA=0` / `SPECRAILS_GEMINI_BETA=0` (both enabled by default). Kimi is reported unavailable, with a machine-readable `providerIssues.kimi`, when the CLI is missing/unusable, is older than 0.27.0, or the installed Core lacks the Kimi target. The bounded readiness probe is intentionally non-billing and cannot prove account authentication; a login/configuration problem is surfaced by the first model turn. `launchDescriptors` exposes each external CLI command; the app does not bundle a Kimi daemon/server |
85
89
  | `GET` | `/core-compat` | specrails-core version compatibility probe |
86
90
  | `GET` | `/setup-prerequisites` | Tool checks (`node`/`npm`/`npx`/`git`, optionally `uv`). Add `?diagnostic=1` to nest a `diagnostic` object: `{ pathSegments, pathSources, loginShellStatus, whichResults, nodeEnv, platform }` |
87
91
 
@@ -199,7 +203,11 @@ Example — queue a command on a specific provider:
199
203
  | `POST` | `/jobs/:id/finalize` | Finalize a running interactive job (SIGTERM the resident child; final totals + terminal status are stamped when it closes). For a loop run this settles the **current step** and the loop advances. `202` scheduled, `403` interactive jobs disabled, `409` not an active interactive session |
200
204
  | `GET` | `/jobs/:jobId/diagnostic` | Stream a diagnostic ZIP (telemetry + profile + plugins snapshots) |
201
205
 
202
- The two interactive endpoints back the in-job chat that is **on by default for every Claude job** — QueueManager jobs (implement / batch / Freestyle / custom commands) and the loop engine's claude ai-steps alike. Two settle modes: Freestyle/freestyle jobs idle until an explicit finalize (`'finalize'`); everything else settles itself on quiescence (`'auto'` — a turn result with nothing queued), where finalize acts as "wrap up now" / "settle this step". Providers without persistent stdin (Codex, Gemini) run one-shot as before and 409 here. Both endpoints 403 when the server has `SPECRAILS_INTERACTIVE_JOBS=false`. As-built detail: [interactive-jobs.md](interactive-jobs.md).
206
+ The two interactive endpoints back Claude's persistent-stdin in-job chat.
207
+ Providers without persistent stdin (Codex, Gemini, and Kimi) run one-shot and
208
+ return 409 here; Kimi chat surfaces resume via a new `kimi --session=<id> -p` child after
209
+ a successful resume hint. Both endpoints return 403 when
210
+ `SPECRAILS_INTERACTIVE_JOBS=false`.
203
211
 
204
212
  Example — fetch one job:
205
213
 
@@ -258,7 +266,8 @@ Example — the Analytics dashboard payload (abridged):
258
266
  }
259
267
  ```
260
268
 
261
- Cost is **provider-billed and exact for Claude**; for Codex and Gemini it is **estimated from a rate card** (those CLIs do not report a native cost).
269
+ Cost is provider-billed for Claude and estimated for Codex/Gemini. Kimi
270
+ provides no authoritative token/USD envelope, so those values remain null.
262
271
 
263
272
  ### Budget
264
273
 
@@ -280,7 +289,7 @@ Cost is **provider-billed and exact for Claude**; for Codex and Gemini it is **e
280
289
  | `POST` | `/tickets/save-as-draft` | Persist an Explore conversation as a draft (idempotent on `conversationId`) |
281
290
  | `POST` | `/tickets/from-draft` | Commit a draft (flip-in-place) or insert a new ticket |
282
291
  | `POST` | `/tickets/from-prompt` | Create a ticket directly from a prompt |
283
- | `POST` | `/tickets/:id/contract-refine` | Retry Contract Refine for an existing ticket. `202` scheduled, `404` unknown ticket, `409` when: the project is Codex (`contract_refine_unsupported_for_codex` — Contract Refine is Claude-only), the kill switch is active (`feature_disabled_by_env`), or the ticket has no origin conversation |
292
+ | `POST` | `/tickets/:id/contract-refine` | Retry Contract Refine for an existing ticket. `202` scheduled, `404` unknown ticket, `409` when the effective provider cannot enforce the required tool policy (`contract_refine_unsupported_for_<provider>`; this includes Kimi), the kill switch is active (`feature_disabled_by_env`), or the ticket has no origin conversation. Kimi is rejected before spawn or mutation |
284
293
  | `POST` | `/tickets/:id/smash` | SMASH an epic into sub-specs |
285
294
  | `POST` | `/tickets/:id/smash/undo` | Undo a SMASH operation |
286
295
  | `DELETE` | `/tickets/:id/children` | Delete all children of an epic |
@@ -315,7 +324,7 @@ The setup wizard is a three-step flow (Configure / Install / Done). The `enrich/
315
324
  | Method | Path | Notes |
316
325
  |--------|------|-------|
317
326
  | `POST` | `/setup/install-config` | Write `.specrails/install-config.yaml` to the project |
318
- | `POST` | `/setup/install` | Run `npx specrails-core init --from-config <file>` (the pinned core release — currently `specrails-core@^4.8.0` — is resolved by SetupManager, overridable via `SPECRAILS_CORE_BIN`) |
327
+ | `POST` | `/setup/install` | Run `npx specrails-core init --from-config <file>` (the pinned core release — currently `specrails-core@^4.12.0` — is resolved by SetupManager, overridable via `SPECRAILS_CORE_BIN`) |
319
328
  | `POST` | `/setup/start` | Legacy setup-chat session start |
320
329
  | `POST` | `/setup/message` | Legacy setup-chat turn |
321
330
  | `POST` | `/enrich/start` | Legacy AI-enrich session start |
@@ -435,16 +444,25 @@ A non-developer-friendly file tree + Monaco viewer with plain-language AI summar
435
444
  | `PUT` | `/:railIndex/profile` | Set the rail's default profile |
436
445
  | `PUT` | `/:railIndex/engine` | Set the rail's AI engine override. Body `{ aiEngine }` (string — one of the project's providers — or `null` to clear) |
437
446
  | `PUT` | `/:railIndex/name` | Set the rail's display name. Body `{ name }` (string or `null` to clear back to the default label); 400 if longer than 60 characters |
438
- | `POST` | `/:railIndex/launch` | Launch the rail. Body `{ mode?, loopId?, profileName?, aiEngine?, model?, reasoning_effort?, originConversationId?, originSurface?, interactive? }`. `mode` is `implement` / `batch-implement` / `freestyle` / `loop`; a factory `loopId` (`factory:implement` etc.) maps to its canonical rail mode, and a **bare mode with no `loopId`** (MCP / mobile / direct REST) derives the matching factory loop when Loops are enabled, so every launch door gets the same isolation + ask-first PR flow as the dashboard. `model` (haiku/sonnet/opus/fable) applies to freestyle only. The in-job chat is **on by default for every Claude job** — the `interactive` param is accepted and **ignored** (wire compat; the spawn-time gate decides). Returns `202 { jobId, railIndex, mode }`; **`503`** when the Claude or Codex CLI binary is not found (a missing Gemini/other binary surfaces as `500`) |
447
+ | `POST` | `/:railIndex/launch` | Launch the rail. Body `{ mode?, loopId?, profileName?, aiEngine?, model?, reasoning_effort?, originConversationId?, originSurface?, interactive? }`. `mode` is `implement` / `batch-implement` / `freestyle` / `loop`; a factory `loopId` maps to its canonical rail mode. `model` and `reasoning_effort` are validated against the effective adapter/model (Kimi effort is K3-only). Kimi + a loop containing a Decider returns a capability error before the first step. Claude alone advertises persistent in-job stdin; `interactive` remains wire-compatible. Returns `202 { jobId, railIndex, mode }`; a missing provider CLI fails before a job starts. |
439
448
  | `POST` | `/:railIndex/stop` | Stop the rail's running job (cancels every job the rail registered) |
440
449
 
441
450
  ---
442
451
 
443
452
  ## `/api/projects/:projectId/profiles/*`
444
453
 
445
- Gated by `SPECRAILS_AGENTS_SECTION !== 'false'`. Rails force legacy (no-profile) mode whenever the chosen engine is not Claude, and the Agents section is hidden in multi-provider projects; profile env-injection itself works for any provider whose adapter advertises `profileEnvSupport`.
454
+ Gated by `SPECRAILS_AGENTS_SECTION !== 'false'`. Profiles are provider-scoped;
455
+ Claude and Kimi advertise profile execution, while Codex and Gemini force
456
+ legacy mode. CRUD requests may carry the effective provider so same-named
457
+ Claude/Kimi profiles do not collide.
446
458
 
447
- > **Provider capability notes.** A few behaviours are not the same across all three providers: **Contract Refine** is Claude-only; **rails force no-profile mode** for any non-Claude engine; **Freestyle rails** are Claude-only; the **Serena plugin** (and other `project-json` plugins) work for Claude and Gemini but are filtered out for Codex; and **cost is exact only for Claude** (estimated from a rate card for Codex and Gemini). See the [Codex guide](../codex.md) and [Gemini guide](../gemini.md).
459
+ > **Provider capability notes.** Claude and Kimi support provider-scoped
460
+ > profiles and Freestyle; integration state/health is also provider-scoped.
461
+ > Kimi agentic surfaces are available, but pure-output/read-only actions
462
+ > (Quick Spec, AI Edit, Contract Refine, SMASH/Re-SMASH, Project Builder
463
+ > generation, Loop Decider, Code Explorer AI, and Agent Studio automation)
464
+ > reject Kimi before spawn. Kimi tokens/USD cost remain null. See the
465
+ > [Kimi guide](../kimi.md).
448
466
 
449
467
  ### Profile CRUD
450
468
 
@@ -498,10 +516,15 @@ Gated by `SPECRAILS_AGENTS_SECTION !== 'false'`. Rails force legacy (no-profile)
498
516
 
499
517
  Gated by `SPECRAILS_PLUGINS_SECTION !== 'false'`.
500
518
 
519
+ Every route accepts an optional provider target. Read and delete routes use
520
+ `?provider=<id>`; mutation routes accept `{ "provider": "<id>" }`. The value
521
+ must belong to the project's configured `providers`; omission preserves the
522
+ legacy behaviour and targets the primary `project.provider`.
523
+
501
524
  | Method | Path | Notes |
502
525
  |--------|------|-------|
503
526
  | `GET` | `/` | List bundled plugins with installed/orphan/degraded state |
504
- | `GET` | `/:name/preview-install` | Diff of what would be added to `.mcp.json` and `agents/` |
527
+ | `GET` | `/:name/preview-install` | Provider-native MCP/instructions diff |
505
528
  | `POST` | `/:name/install` | Install (streams progress over WS) |
506
529
  | `DELETE` | `/:name` | Uninstall or remove an orphan |
507
530
  | `POST` | `/:name/activate` | Activate (post-install) |
@@ -729,7 +752,8 @@ The app uses standard HTTP status codes. Notable conventions:
729
752
  - `413` — payload too large (code-explorer edit over the 2 MB cap)
730
753
  - `415` — unsupported media type (code-explorer edit of binary content)
731
754
  - `500` — unhandled exception (logged to stdout)
732
- - `503` — the Claude or Codex CLI binary was not found when launching a rail job (a missing Gemini/other-provider binary falls through to `500`)
755
+ - `503` / launch error — the selected provider CLI was not found; no job is
756
+ allowed to start with a missing executable
733
757
 
734
758
  Error responses are `{ "error": "<message>" }`.
735
759
 
@@ -248,7 +248,7 @@ App-level messages (no `projectId`) are processed by all handlers.
248
248
 
249
249
  ## Process spawning and concurrency
250
250
 
251
- `QueueManager` and `ChatManager` spawn the project's provider CLI (`claude`, `codex`, or `gemini`) as subprocesses, always with `cwd` set so the process runs in the correct directory. The exact binary and argv are chosen by the resolved `ProviderAdapter` — managers never branch on the provider id (see [Multi-provider adapters](#feature-subsystems)).
251
+ `QueueManager` and `ChatManager` spawn the project's provider CLI (`claude`, `codex`, `gemini`, or `kimi`) as subprocesses, always with `cwd` set so the process runs in the correct directory. The exact binary and argv are chosen by the resolved `ProviderAdapter` — managers never branch on the provider id (see [Multi-provider adapters](#feature-subsystems)).
252
252
 
253
253
  - **Within a project, jobs run strictly one at a time.** Each `ProjectContext` has exactly one `QueueManager` with a single `_activeJobId`; `_drainQueue()` early-returns while a job is active, so the next rail job queues behind the current one.
254
254
  - **Parallelism is across projects only** — each project has its own `QueueManager`, so jobs in different projects run simultaneously. There is no "max concurrent jobs" setting; the only automatic queue-pause is budget-based (daily budget / per-job cost alert).
@@ -264,9 +264,9 @@ The app is more than the job pipeline. Each subsystem owns its modules; this is
264
264
 
265
265
  | Subsystem | Server modules | Notes |
266
266
  |-----------|---------------|-------|
267
- | **Multi-provider adapters** | `server/providers/{types,claude-adapter,codex-adapter,gemini-adapter,registry,index}.ts`, `server/provider-selection.ts` | **Three first-class providers — Claude, Codex, and Gemini — all enabled by default** behind a `ProviderAdapter` contract. Claude has full native support (native cost + native OTEL + `--system-prompt`); Codex (`≥ 0.128.0`) has estimated cost and OTEL synthesized by the app; Gemini (`≥ 0.11.0`) has estimated cost but **native OTEL** (it honours the standard `OTEL_*` env vars QueueManager injects — no synthetic bridge), folds its system prompt into `GEMINI.md`, uses `project-json` MCP registration, defaults to `gemini-3.5-flash`, and uniquely implements the optional `prepareHeadlessSpawn()` hook to pre-acknowledge subagents for headless rail spawns. A project can install any subset; `providers[]` is a JSON column, the first entry is primary. Per-invocation provider is late-bound. Provider availability is gated by `SPECRAILS_CODEX_BETA` / `SPECRAILS_GEMINI_BETA` (set either to `0` to disable; both default-enabled, see [`configuration.md`](configuration.md)). See [`adding-a-provider.md`](adding-a-provider.md), [`../codex.md`](../codex.md), and [`../gemini.md`](../gemini.md). |
267
+ | **Multi-provider adapters** | `server/providers/{types,claude-adapter,codex-adapter,gemini-adapter,kimi-adapter,registry,index}.ts`, `server/provider-selection.ts` | **Four first-class providers — Claude, Codex, Gemini, and Kimi — enabled by default** behind a `ProviderAdapter` contract. Claude reports native cost and supports persistent stdin; Codex (`≥ 0.128.0`) and Gemini (`≥ 0.11.0`) expose estimated usage; Kimi (`≥ 0.27.0`) runs CLI-only prompt-mode JSONL, resumes through terminal hints, uses `.kimi-code` skills/MCP, and leaves absent cost/tokens unavailable. A project can install any subset; `providers[]` is a JSON column, the first entry is primary. Per-invocation provider is late-bound. Provider availability is gated by executable detection, Core target compatibility, and the existing Codex/Gemini emergency switches. See [`adding-a-provider.md`](adding-a-provider.md), [`../codex.md`](../codex.md), [`../gemini.md`](../gemini.md), and [`../kimi.md`](../kimi.md). |
268
268
  | **Spending analytics** | `server/spending.ts`, `server/ai-invocations.ts`, `server/pricing.ts` | `recordInvocation` writes an `ai_invocations` row per AI CLI call across six surfaces (`job`, `quick-spec`, `explore-spec`, `ai-edit`, `smash`, `file-summary`); powers the Analytics page and `spending.invalidated`. |
269
- | **Agent profiles** | `server/profile-manager.ts`, `server/profiles-router.ts` | Declarative JSON in `.specrails/profiles/*.json`, snapshot-per-job, `SPECRAILS_PROFILE_PATH` env injection. Requires `specrails-core ≥ 4.1.0` **in the project** (distinct from the app-wide install floor of `^4.8.0` — see [Setup wizard flow](#setup-wizard-flow)). Claude-only: the rails router force-nulls the profile for any non-Claude engine. |
269
+ | **Agent profiles** | `server/profile-manager.ts`, `server/profiles-router.ts` | Declarative JSON in `.specrails/profiles/*.json`, snapshot-per-job, `SPECRAILS_PROFILE_PATH` env injection. Requires `specrails-core ≥ 4.1.0` in general and the Core 4.12 Kimi target for Kimi roles (the app-wide install floor is `^4.12.0`). Claude and Kimi advertise profile support; other adapters force legacy/no-profile mode. |
270
270
  | **Plugins (Integrations)** | `server/plugin-manager.ts`, `server/plugins/` | Bundled-only, MCP-based, additivity invariant, surgical `.mcp.json` merge, `plugin.*` WS events. Serena ships today. |
271
271
  | **Terminal panel** | `server/terminal-manager.ts` | `node-pty` sessions over the dedicated `/ws/terminal/:id` socket, OSC shell-integration marks. See [`../terminal.md`](../terminal.md). |
272
272
  | **Code explorer** | `server/code-explorer-router.ts`, `server/file-provenance.ts`, `server/file-summary-manager.ts` | A non-developer-friendly file tree + Monaco viewer with plain-language AI summaries and *touched-by-AI* provenance chips per ticket/job, plus opt-in in-app editing of existing files (overwrite-only via `PUT /file` — no create/rename; refuses binaries `415`, enforces a 2 MB cap `413`, `404` on a missing path, respects deny-list/`.gitignore`). |
@@ -285,7 +285,7 @@ Most client feature sections are gated by VITE flags, and they share one polarit
285
285
  When a project is added without specrails-core, the setup wizard runs. The client renders a **3-step** indicator: **Configure → Install → Done**.
286
286
 
287
287
  1. **Configure** — confirm path and pick provider(s) and model presets. (Multi-provider projects get one Configure step per provider.)
288
- 2. **Install** — the app writes `.specrails/install-config.yaml` and runs `npx --yes --prefer-online specrails-core@^4.8.0 init --yes --from-config <tempPath>`, streaming the log. The package spec is the constant `CORE_PACKAGE_SPEC` — a deliberately pinned major range (the floor is `4.8.0`, the release that ships the Gemini provider target), so a future core `5.x` doesn't auto-land. Override the binary locally with `SPECRAILS_CORE_BIN`. For multi-provider projects each provider's install runs sequentially.
288
+ 2. **Install** — the app writes `.specrails/install-config.yaml` and runs `npx --yes --prefer-online specrails-core@^4.12.0 init --yes --from-config <tempPath>`, streaming the log. The package spec is the constant `CORE_PACKAGE_SPEC` — a deliberately pinned major range (the floor is `4.12.0`, the release that ships the Kimi provider target), so a future core `5.x` doesn't auto-land. Override the binary locally with `SPECRAILS_CORE_BIN`. For multi-provider projects each provider's install runs sequentially.
289
289
  3. **Done** — per-provider completion summary.
290
290
 
291
291
  `SetupManager` (server) owns wizard state; `DesktopProvider` (client) tracks which projects are in setup via `setupProjectIds`. The wizard does spawn a real AI CLI for the `/setup` chat, but that spawn is deliberately left uninstrumented (it writes no `ai_invocations` row).
@@ -340,6 +340,6 @@ macOS desktop builds are signed + notarized. Windows builds (x64 and arm64) ship
340
340
  - [Configuration](configuration.md) — env vars, feature flags, app/project settings
341
341
  - [Agent profiles](profiles.md) — profile schema, resolution order, snapshot-per-job
342
342
  - [Adding a provider](adding-a-provider.md) — the `ProviderAdapter` contract
343
- - [Codex](../codex.md) / [Gemini](../gemini.md) — per-provider user guides
343
+ - [Codex](../codex.md) / [Gemini](../gemini.md) / [Kimi](../kimi.md) — per-provider user guides
344
344
  - [OpenSpec workflow](openspec-workflow.md) — the spec-driven change lifecycle
345
345
  - [Operations runbook](operations-runbook.md) — running, upgrading, and recovering the app
@@ -145,7 +145,7 @@ Para el caso standalone, el framework viene del propio paquete npm de core (no d
145
145
  ### 4.1 Bundle de templates en la app (espeja el patrón runtimes **verbatim**)
146
146
 
147
147
  - **`tauri.conf.json`**: añadir `"framework/**/*"` a `bundle.resources` (junto a `"runtimes/**/*"`, hoy en línea 46). Forma glob para preservar la estructura anidada.
148
- - **CI (`desktop-release.yml`)**: paso que ensambla `src-tauri/framework/` antes de `tauri build` — copia `templates/**`, `commands/{enrich,doctor}.md`, y genera los providerDir materializados (claude/codex/gemini) + `setup-templates/`. Es el mismo patrón que ensambla `runtimes/`. `src-tauri/framework/` gitignored con `.gitkeep`.
148
+ - **CI (`desktop-release.yml`)**: paso que ensambla `src-tauri/framework/` antes de `tauri build` — copia `templates/**`, `commands/{enrich,doctor}.md`, y genera los providerDir materializados (claude/codex/gemini/kimi) + `setup-templates/`. Es el mismo patrón que ensambla `runtimes/`. `src-tauri/framework/` gitignored con `.gitkeep`.
149
149
  - **`scripts/build-sidecar.mjs`**: si algún asset del framework debe resolverse en filesystem real (no dentro del snapshot pkg), copiarlo igual que `node-pty`. La mayoría son ficheros de texto estáticos → bajo riesgo (ver §9).
150
150
  - **`lib.rs`** (espejo de líneas 181-215): resolver `<resource_dir>/framework`, gate por existencia (`framework/.../claude/agents` existe y no vacío), y exportar `SPECRAILS_BUNDLED_FRAMEWORK_PATH` al sidecar. **Existence-gated** como los runtimes: si no hay framework empaquetado → fallback al `npx` legacy (no dead-end).
151
151
 
@@ -154,7 +154,7 @@ Para el caso standalone, el framework viene del propio paquete npm de core (no d
154
154
  - `materialize()`: copia `SPECRAILS_BUNDLED_FRAMEWORK_PATH` → `~/.specrails/framework/<version>/` si esa versión no existe. Idempotente (skip si manifest hash coincide).
155
155
  - `swapCurrent(version)`: `renameSync` atómico de `~/.specrails/framework/current` (reusa `atomicWrite`/rename de artifact-registry.ts:213-227). Crea `current.tmp` → rename.
156
156
  - `versionCheck()`: en **first-run** y **post-update**, compara la versión bundleada con `current` → materializa + swap si difiere.
157
- - Multi-provider: materializa por provider; el swap de `current` cambia **todos los providers a la vez** (un solo `current` por versión que contiene los 3 providerDirs).
157
+ - Multi-provider: materializa por provider; el swap de `current` cambia **todos los providers a la vez** (un solo `current` por versión que contiene los 4 providerDirs).
158
158
 
159
159
  ### 4.3 Extender `ensureWorkspace` para enlazar el framework
160
160
 
@@ -261,4 +261,4 @@ Cada fase independientemente testeable + verde, con gates de cobertura (**80% se
261
261
  - **Framework PER PROVIDER**: `.claude/.codex/.gemini` difieren (path rewrites, frontmatter, ports de codex skills). `<version>/` sub-keyeado por provider; el swap de `current` cambia todos los providers juntos.
262
262
  - **`codex-config.toml MODEL_NAME`** hardcodeado (scaffold.ts:1091): si la selección de modelo se vuelve per-project, la copia compartida de codex necesitaría un overlay, no un link raw. **Hoy**: constante, compartible.
263
263
  - **Windows copy fallback**: la optimización "un swap actualiza todos" no aplica en copy → update O(proyectos). Aceptable v1.
264
- - **`setup-templates/` (input de enrich)** hoy se copia per-project (scaffold.ts:299). Al compartirse, `/specrails:enrich` debe leerlo del framework dir, no del workspace. **Validar la resolución de rutas de enrich antes de reubicarlo** (Fase 2).
264
+ - **`setup-templates/` (input de enrich)** hoy se copia per-project (scaffold.ts:299). Al compartirse, `/specrails:enrich` debe leerlo del framework dir, no del workspace. **Validar la resolución de rutas de enrich antes de reubicarlo** (Fase 2).
@@ -4,6 +4,10 @@
4
4
  > covers the per-file **construction story** — the narrative layer that tells a
5
5
  > non-developer, for any file, HOW it was built: which specs intervened and what
6
6
  > each one contributed.
7
+ >
8
+ > Kimi 0.27 `-p` does not advertise an enforceable read-only tool policy.
9
+ > `FileStoryManager.explain` and file-summary generation therefore reject Kimi
10
+ > before spawn. Deterministic provenance/stats/log views remain provider-neutral.
7
11
 
8
12
  ## Problem
9
13
 
@@ -4,13 +4,16 @@ Reference for configuring specrails-desktop: app-wide settings, per-project sett
4
4
 
5
5
  Everything here is verified against `main`. The app server binds to `127.0.0.1` only and rejects any non-localhost origin, so all of this is local-first by design.
6
6
 
7
- > **Providers at a glance.** A project can run **Claude, Codex, Gemini, or any combination** of them. All three are enabled by default and are chosen when you add the project (see [Project settings](#project-settings)). Each has its own default model, resolved at spawn time:
7
+ > **Providers at a glance.** A project can run **Claude, Codex, Gemini, Kimi,
8
+ > or any compatible combination**. All four are enabled by default and chosen
9
+ > when you add the project. Each has its own adapter default:
8
10
  >
9
11
  > | Provider | CLI binary | Default model | Emergency rollback |
10
12
  > |----------|-----------|---------------|--------------------|
11
13
  > | Claude Code | `claude` | `sonnet` | — |
12
14
  > | Codex CLI | `codex` | `gpt-5.5` | `SPECRAILS_CODEX_BETA=0` |
13
15
  > | Gemini CLI | `gemini` | `gemini-3.5-flash` | `SPECRAILS_GEMINI_BETA=0` |
16
+ > | Kimi Code | `kimi` | `k3` | — |
14
17
  >
15
18
  > The provider set is **immutable after the project is created**.
16
19
 
@@ -52,7 +55,9 @@ The Global Settings page is organised into the sections below (it also surfaces
52
55
  | **Code section** | Plain-language file-summary language (`en` / `es`) and the monthly summary budget cap. | `summary_language` = `en`, `summary_monthly_budget_usd` = `5.00` |
53
56
  | **Terminal Panel** | App-wide defaults for the integrated terminal (font, render mode, copy-on-select, shell integration, image rendering, long-command threshold). | `terminal.*` keys |
54
57
 
55
- > There is **no** "Claude model", "Max concurrent jobs", "Job timeout", or "Authentication token" app setting. Within a project, jobs run one at a time (see [Architecture](architecture.md)); the only automatic queue pause is budget-based. The default model is each provider's adapter default (e.g. `sonnet` for Claude, `gpt-5.5` for Codex, `gemini-3.5-flash` for Gemini), resolved at spawn time — it is not a stored setting.
58
+ > There is **no** global provider-model setting. The default is the adapter
59
+ > default (`sonnet`, `gpt-5.5`, `gemini-3.5-flash`, or Kimi `k3`) resolved at
60
+ > spawn time. Kimi low/high/max effort is valid only for K3.
56
61
 
57
62
  **Port is not a live setting.** `desktop_settings` does store a `port` value, but it is display-only. The port the server actually binds is taken from the `--port` argv (default `4200`); changing the stored value does not rebind a running server. Set the port with `--port <n>` on `specrails-desktop start`.
58
63
 
@@ -66,11 +71,14 @@ Project settings apply to a single project. Open them from the project's **Setti
66
71
  |---------|------------------|
67
72
  | **Pipeline Telemetry** | Opt-in toggle that injects OpenTelemetry env vars into pipeline job spawns so they emit OTLP signals back to the app. Off by default. |
68
73
  | **Rail Pre-prompt** | Text prepended to every rail launch for this project. |
69
- | **Freestyle pre-prompt** | Text prepended to Freestyle-mode launches (the Claude-only autonomous rail mode). |
74
+ | **Freestyle pre-prompt** | Text prepended to Freestyle-mode launches (Claude and Kimi advertise this autonomous rail mode). |
70
75
  | **Budget** | Per-project daily spend cap (with queue auto-pause) and a per-job cost alert threshold. |
71
76
  | **Terminal Settings** | Per-project overrides for the terminal panel defaults (project override → app default → built-in). |
72
77
 
73
- > The project's **provider(s)** — **Claude, Codex, Gemini, or any combination** — are chosen when you add the project and are **immutable after creation**. All three are enabled by default; there is no provider switch in Project Settings. There is also **no** Name edit, Path row, or model-override field on this page. See [Customising the app](../customizing.md) for how to disable a provider app-wide via its rollback gate.
78
+ > The project's **provider(s)** — **Claude, Codex, Gemini, Kimi, or any
79
+ > compatible combination** — are chosen when you add the project and are
80
+ > **immutable after creation**. All four are enabled by default; there is no
81
+ > provider switch in Project Settings.
74
82
 
75
83
  ---
76
84
 
@@ -144,7 +152,11 @@ Both extra providers are **enabled by default** and only need these levers if yo
144
152
 
145
153
  A disabled provider stops appearing in Add Project and is rejected by the create-project API; existing projects that already use it are unaffected on disk.
146
154
 
147
- `ANTHROPIC_API_KEY` is **not** read by the app. Each provider's CLI authenticates on its own — Claude via a subscription login or its own API-key configuration, Codex via `codex login`, Gemini via `GEMINI_API_KEY` (a Google AI Studio key) — so you do not set provider keys for the app itself. See the [Codex](../codex.md) and [Gemini](../gemini.md) guides for per-provider auth.
155
+ Provider credentials are not stored by Desktop. Each CLI authenticates on its
156
+ own: Claude through its login/config, Codex via `codex login`, Gemini through
157
+ its native key/config, and Kimi via `kimi login` or user-managed
158
+ `~/.kimi-code/config.toml`. See [Kimi](../kimi.md), [Codex](../codex.md), and
159
+ [Gemini](../gemini.md).
148
160
 
149
161
  For the full catalogue of feature flags and kill switches (`SPECRAILS_*` server gates, `VITE_FEATURE_*` client flags, `SPECRAILS_CODEX_BETA`, `SPECRAILS_GEMINI_BETA`, `SPECRAILS_EXPLORE_*`), see [../customizing.md](../customizing.md#environment-variables).
150
162
 
@@ -76,7 +76,7 @@ Esta es la pieza central. `registry.json` es la **única fuente de verdad inspec
76
76
  | `profilesDir` | sí | `.specrails/profiles/` relocalizado. El snapshot por job sigue ganando vía `SPECRAILS_PROFILE_PATH`; este es el fallback standalone. |
77
77
  | `pluginsStateDir` | desktop-only | `.specrails/plugins/`. Core ignora plugins; presente por completitud/inspeccionabilidad. |
78
78
  | `fileSummariesDir` | desktop-only | `.specrails/file-summaries/`. Propiedad de desktop (Code explorer). |
79
- | `providers` | sí | `["claude","codex","gemini"]`. Espejo de `desktop.sqlite projects.providers`. Permite a core detectar el provider desde el registry en vez de sondear `.claude`/`.codex`/`.gemini` bajo el repo (ahora vacío). |
79
+ | `providers` | sí | `["claude","codex","gemini","kimi"]`. Espejo de `desktop.sqlite projects.providers`. Permite a core detectar el provider desde el registry en vez de sondear `.claude`/`.codex`/`.gemini`/`.kimi-code` bajo el repo (ahora vacío). |
80
80
  | `primaryProvider` | sí | `providers[0]`. Espejo de `desktop.sqlite projects.provider`. |
81
81
  | `coreVersion` | sí | El pin `specrails-version` (nombre y formato **congelados** — desktop lo regex-matchea; solo su ubicación se mueve). |
82
82
  | `createdAt` | no | Primera asignación de la entrada. |
@@ -43,7 +43,7 @@ The two forms print different output. The `status` **subcommand** prints `server
43
43
 
44
44
  > `specrails-desktop --jobs` is **not** functional against the running server — the server does not expose a cross-project `/api/jobs` route, so the command prints a message that jobs history requires a manager with SQLite persistence and exits `1`. Browse job history per project in the app's **Jobs** page instead.
45
45
 
46
- > **Offline CLI fallback.** When you run a command and no manager is up, the CLI prints `manager not running — invoking claude directly` and spawns a local `claude` process to handle it. This fallback **always uses `claude`** — it never spawns `codex` or `gemini`, regardless of a project's primary provider — and it writes **nothing** to Analytics (no `ai_invocations` row; cost/tokens are only echoed to your terminal). Start the manager (`specrails-desktop start`) to route through your project's real provider and capture the run.
46
+ > **Offline CLI fallback.** When you run a command and no manager is up, the CLI prints `manager not running — invoking claude directly` and spawns a local `claude` process to handle it. This fallback **always uses `claude`** — it never spawns `codex`, `gemini`, or `kimi`, regardless of a project's primary provider — and it writes **nothing** to Analytics (no `ai_invocations` row; cost/tokens are only echoed to your terminal). Start the manager (`specrails-desktop start`) to route through your project's real provider and capture the run.
47
47
 
48
48
  ## App data location
49
49
 
@@ -27,17 +27,14 @@ Dashboard/Jobs/Analytics/Settings).
27
27
  When the project has no profiles yet, the empty state offers two entry
28
28
  points:
29
29
 
30
- - **Migrate from current agents** — reads your existing
31
- `.claude/agents/` frontmatter models and creates a `default` profile
32
- mirroring today's behavior (zero-loss). It requires the baseline trio
30
+ - **Migrate from current agents** — reads the primary provider's native role
31
+ catalog (`.claude/agents/` or `.kimi-code/skills/`) and creates a
32
+ `default` profile mirroring today's behavior. It requires the baseline trio
33
33
  `sr-architect`, `sr-developer`, and `sr-reviewer` to be present — the
34
- server rejects the migration if any is missing. On a project whose
35
- primary provider is **not** Claude (Codex or Gemini), the frontmatter
36
- model aliases aren't in that provider's catalog, so the migration stamps
37
- the project's `provider` onto the profile and substitutes that provider's
38
- default model — the resulting `default` profile still validates and is
39
- ready to edit (though it only takes effect on Claude rails — see
40
- [Multi-provider rails](#multi-provider-rails-claude-codex-and-gemini)).
34
+ server rejects the migration if any is missing. Provider-specific model
35
+ identifiers are retained only when they are in that provider's catalog;
36
+ otherwise migration uses its default and stamps the provider into the saved
37
+ profile.
41
38
  - **Blank profile** — start from scratch.
42
39
 
43
40
  ## 2. Saved profiles vs selection
@@ -71,26 +68,19 @@ wizard. Each rail header has a compact profile dropdown
71
68
  The "No profile" option is always available — use it to run a
72
69
  rail exactly as it did pre-4.1.0.
73
70
 
74
- ### Multi-provider rails (Claude, Codex, and Gemini)
71
+ ### Multi-provider rails
75
72
 
76
- **Profiles apply only to Claude rails.** specrails-desktop supports three
77
- interchangeable AI providers — Claude, Codex, and Gemini — but agent
78
- profiles are a Claude-only concept (Codex and Gemini have no equivalent).
73
+ Profiles apply to **Claude and Kimi** rails. Kimi profiles use exact Kimi
74
+ model ids for both the parent orchestrator and every routed role; Core executes
75
+ role skills through separate Kimi processes so a role can select a different
76
+ model from its parent.
79
77
 
80
- When a rail's AI engine is **anything other than Claude** (Codex or
81
- Gemini), the app force-nulls the profile and runs the rail in legacy mode.
82
- The rails router enforces this server-side for *any* non-Claude engine, so
83
- no profile env var is ever injected on a Codex or Gemini rail regardless of
84
- what the UI shows.
78
+ Codex and Gemini currently advertise no profile capability. Selecting either
79
+ engine force-nulls the rail profile server-side and the client hides the
80
+ selector. A profile whose `provider` does not match the effective rail provider
81
+ is rejected rather than silently translating model aliases.
85
82
 
86
- > **Known UI limitation.** The client currently only hides the profile
87
- > selector for **Codex** rails. On a **Gemini** rail the selector can still
88
- > appear — but the server ignores any profile you pick there (it always
89
- > falls back to legacy mode). Picking a profile on a Gemini rail therefore
90
- > has no effect; treat it as a no-op until the selector is hidden for all
91
- > non-Claude engines.
92
-
93
- Provider availability itself is gated separately (both default-enabled): set
83
+ Codex/Gemini availability itself is gated separately (both default-enabled): set
94
84
  `SPECRAILS_CODEX_BETA=0` or `SPECRAILS_GEMINI_BETA=0` to disable a provider
95
85
  app-wide. See [../codex.md](../codex.md) and [../gemini.md](../gemini.md).
96
86
 
@@ -101,18 +91,20 @@ From the Catalog tab, create a new custom agent via:
101
91
  - **Template** — start from one of ~50 curated templates spanning many
102
92
  categories (engineering, product, data, security, …) — for example
103
93
  Security Reviewer, Performance Profiler, Data Engineer, or UI/UX Polisher.
104
- - **Generate** — describe the agent in natural language; Claude drafts the
105
- full `.md` for you to review and edit before saving.
94
+ - **Generate** — describe the agent in natural language; a provider with the
95
+ required no-tools policy drafts it. Kimi does not offer this action.
106
96
  - **Blank** — start from a minimal template.
107
97
  - **Duplicate** — copy any existing agent (upstream or custom).
108
98
 
109
- Custom agents live at `.claude/agents/custom-*.md` and are never touched
110
- by `specrails-core`'s installer/update scripts. Every save appends a new
111
- version row; open **History** in the Studio to browse and restore.
99
+ Custom agents live at `.claude/agents/custom-*.md` for Claude or
100
+ `.kimi-code/skills/custom-*/SKILL.md` for Kimi and are never touched by
101
+ `specrails-core`'s installer/update scripts. Every save appends a new version
102
+ row; open **History** in the Studio to browse and restore.
112
103
 
113
- Click **Test** in the Studio to run the current draft against a sample
114
- task in an isolated `claude` invocation — no files are written, and you
115
- see output, token count, and duration inline.
104
+ Click **Test** in the Studio to run the current draft against a sample task
105
+ only when the selected provider can enforce the smoke test's safe tool policy.
106
+ Kimi generation, Test, and AI Refine are rejected before spawn; manual blank/
107
+ template/duplicate/edit and rail execution remain available.
116
108
 
117
109
  ## 5. Observe
118
110
 
@@ -127,15 +119,15 @@ see output, token count, and duration inline.
127
119
  ## 6. Troubleshooting
128
120
 
129
121
  - **Upgrade banner on Agents page** — run
130
- `npx specrails-core@^4.8.0 update` in the project to bring it up to date
131
- (profiles need ≥ 4.1.0; the version the app installs is `^4.8.0`).
122
+ `npx specrails-core@^4.12.0 update` in the project to bring it up to date
123
+ (profiles need ≥ 4.1.0; the version the app installs is `^4.12.0`).
132
124
  - **Save disabled with "N issues to resolve"** — the live validator
133
125
  enforces the baseline trio (`sr-architect`, `sr-developer`, `sr-reviewer`)
134
126
  and routing ordering. Among the rules: a `default: true` routing rule (if
135
127
  present) must be the **last** entry in `routing` and must target
136
128
  `sr-developer`. Fix the listed issues and Save re-enables.
137
129
  - **"agent 'xyz' already exists" (409)** — the name collides with an
138
- existing file in `.claude/agents/`. Pick a different name.
130
+ existing provider role. Pick a different name.
139
131
  - **The whole Agents section is missing** — it can be disabled server-side
140
132
  with `SPECRAILS_AGENTS_SECTION=false`, which 404s the entire
141
133
  `/profiles` router. Unset it (or leave it at its default) to restore the
@@ -148,6 +140,7 @@ see output, token count, and duration inline.
148
140
 
149
141
  - `.specrails/profiles/**` — your profile catalog.
150
142
  - `.claude/agents/custom-*.md` — your custom agents.
143
+ - `.kimi-code/skills/custom-*/**` — your custom Kimi roles.
151
144
 
152
145
  Everything else under `.specrails/` (install-config, specrails-version,
153
146
  setup-templates) is managed by the installer and may be overwritten on
@@ -160,16 +153,15 @@ A few internals worth knowing if you're working on this surface:
160
153
  - **Version gate.** Profile-aware spawns are gated by
161
154
  `projectSupportsProfiles()` (`server/queue-manager.ts`), which reads the
162
155
  project's `.specrails/specrails-version` and requires
163
- `specrails-core >= 4.1.0`. Below that, the rail spawns in legacy mode and
164
- no profile env var is injected. The same is true on any non-Claude rail:
165
- the rails router force-nulls the profile for Codex/Gemini engines, so the
166
- `SPECRAILS_PROFILE_PATH` injection below only ever takes effect on a
167
- Claude rail.
156
+ `specrails-core >= 4.1.0`; Kimi additionally requires the Core 4.12 target.
157
+ Below the applicable floor, the rail spawns in legacy mode and no profile
158
+ env var is injected. The rails router also force-nulls profiles for adapters
159
+ that do not advertise profile support (currently Codex/Gemini).
168
160
  - **Snapshot per job.** When a rail launches with a profile, the resolved
169
161
  profile is written to
170
162
  `~/.specrails/projects/<slug>/jobs/<jobId>/profile.json` (chmod `400`, so
171
- mid-run edits are impossible) before the `claude` process spawns. The
172
- spawn env then carries `SPECRAILS_PROFILE_PATH` pointing at that file.
163
+ mid-run edits are impossible) before the provider process spawns. The spawn
164
+ env then carries `SPECRAILS_PROFILE_PATH` pointing at that file.
173
165
  The same snapshot is persisted to the `job_profiles` table for the Usage
174
166
  analytics.
175
167
  - **REST surface.** All profile operations live under