specrails-desktop 2.16.0 → 2.17.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 (354) hide show
  1. package/client/dist/assets/{ActivityFeedPage-C_clKk8d.js → ActivityFeedPage-BLDMBgwL.js} +1 -1
  2. package/client/dist/assets/AgentsPage-CFaIiyAA.js +86 -0
  3. package/client/dist/assets/{AnalyticsPage-DZkVU3yd.js → AnalyticsPage-DY8ECq2R.js} +1 -1
  4. package/client/dist/assets/{BarChart-Dq1h8eYR.js → BarChart-ouivqe5L.js} +2 -2
  5. package/client/dist/assets/CodePage-DAFtRafz.js +2 -0
  6. package/client/dist/assets/{DesktopAnalyticsPage-CYhXhJoQ.js → DesktopAnalyticsPage-DIMhuuv0.js} +1 -1
  7. package/client/dist/assets/{DocsDialog-CS3Syf61.js → DocsDialog-DBYhv3SM.js} +2 -2
  8. package/client/dist/assets/{DocsPage-l3ZcTO2E.js → DocsPage-DeLRn8W_.js} +2 -2
  9. package/client/dist/assets/{ExportDropdown-DdB2ncYh.js → ExportDropdown-2XwQ08sz.js} +1 -1
  10. package/client/dist/assets/{IntegrationsPage-CJ_Om1zu.js → IntegrationsPage-DB-a4FDV.js} +3 -3
  11. package/client/dist/assets/JobDetailPage-C3lljMiV.js +16 -0
  12. package/client/dist/assets/JobsPage-CzquwJ6G.js +1 -0
  13. package/client/dist/assets/LoopBuilderPage-TkoalfW5.js +7 -0
  14. package/client/dist/assets/LoopsPage-ypooVAQ5.js +1 -0
  15. package/client/dist/assets/{agents-CQlu1nOm.js → agents-4fnKlwcG.js} +1 -1
  16. package/client/dist/assets/{agents-DcoUUFZl.js → agents-B-rVIhuw.js} +1 -1
  17. package/client/dist/assets/{agents-DVYpVGur.js → agents-BRUz6RJs.js} +1 -1
  18. package/client/dist/assets/{agents-DCX9D3-Q.js → agents-CZQvKDIb.js} +1 -1
  19. package/client/dist/assets/{agents-BYjUOrLD.js → agents-CuRY-Zg_.js} +1 -1
  20. package/client/dist/assets/{agents-Jc-CjBDB.js → agents-D7nWnLg6.js} +1 -1
  21. package/client/dist/assets/{agents-CIhRSOna.js → agents-DzhSlNZd.js} +1 -1
  22. package/client/dist/assets/{agents-1lhqEcXH.js → agents-E-42N3b1.js} +1 -1
  23. package/client/dist/assets/{cssMode-DSHXamUH.js → cssMode-BijCvCxs.js} +1 -1
  24. package/client/dist/assets/{dist-js-Ele_sHO7.js → dist-js-D7m9--SN.js} +1 -1
  25. package/client/dist/assets/{dist-js-D27I-bfi.js → dist-js-nZhsq1qo.js} +1 -1
  26. package/client/dist/assets/{editor.main-Cd8qBRAT.js → editor.main-DMIcqwXb.js} +2 -2
  27. package/client/dist/assets/{freemarker2-CkEKTBm2.js → freemarker2-CP2AizpZ.js} +1 -1
  28. package/client/dist/assets/{handlebars-BRGx0JpL.js → handlebars-8ElanPOm.js} +1 -1
  29. package/client/dist/assets/{html-BfRIaGgN.js → html-Mu3b73tG.js} +1 -1
  30. package/client/dist/assets/{htmlMode-BTpSnsDE.js → htmlMode-tHprGCEv.js} +1 -1
  31. package/client/dist/assets/index-CDEQ4aU_.js +144 -0
  32. package/client/dist/assets/{javascript-DMmE2kKN.js → javascript-DlG0apUe.js} +1 -1
  33. package/client/dist/assets/{jsonMode-hYuaUleY.js → jsonMode-Cr0T4SXO.js} +1 -1
  34. package/client/dist/assets/{lib-qdRfWwE1.js → lib-Bu76JzdB.js} +2 -2
  35. package/client/dist/assets/{liquid-C-VbuTr7.js → liquid-QgTgbClC.js} +1 -1
  36. package/client/dist/assets/{lspLanguageFeatures-BALx-vjn.js → lspLanguageFeatures-D-BxkRza.js} +1 -1
  37. package/client/dist/assets/mcp-BSCAtU6Y.js +1 -0
  38. package/client/dist/assets/mcp-Cb6fUaFJ.js +1 -0
  39. package/client/dist/assets/mcp-CyP0quZ7.js +1 -0
  40. package/client/dist/assets/mcp-D-zQCO5E.js +1 -0
  41. package/client/dist/assets/mcp-DCTNWpfB.js +1 -0
  42. package/client/dist/assets/mcp-DEFGJ1OJ.js +1 -0
  43. package/client/dist/assets/mcp-DFG9OEXM.js +1 -0
  44. package/client/dist/assets/mcp-DyERgHA2.js +1 -0
  45. package/client/dist/assets/{mdx-Cs8MNCzn.js → mdx-B2QTaeRe.js} +1 -1
  46. package/client/dist/assets/{monaco.contribution-CIvCAJs4.js → monaco.contribution-CkdGfXCC.js} +2 -2
  47. package/client/dist/assets/{python-CGShLxuI.js → python-BlF0qnMQ.js} +1 -1
  48. package/client/dist/assets/{razor-CvOBQGd5.js → razor--3PSy3lb.js} +1 -1
  49. package/client/dist/assets/setup-BiQ7ut8d.js +1 -0
  50. package/client/dist/assets/setup-BxvjG5Xp.js +1 -0
  51. package/client/dist/assets/setup-CQ-F6Ciq.js +1 -0
  52. package/client/dist/assets/setup-D2JlpJEz.js +1 -0
  53. package/client/dist/assets/setup-DG1R6J6o.js +1 -0
  54. package/client/dist/assets/setup-DuFJZJsm.js +1 -0
  55. package/client/dist/assets/setup-DyJszDqm.js +1 -0
  56. package/client/dist/assets/setup-Ynw19V8w.js +1 -0
  57. package/client/dist/assets/{tsMode-04uOpiiP.js → tsMode-CHfsvcOI.js} +1 -1
  58. package/client/dist/assets/{typescript-CX0CwyIZ.js → typescript-Bjxf6BOp.js} +1 -1
  59. package/client/dist/assets/{upload-DPG87J4t.js → upload-x42OZJr2.js} +1 -1
  60. package/client/dist/assets/{value-BRVOAvhY.js → value-fEDhg5Bd.js} +1 -1
  61. package/client/dist/assets/{workers-yr2u4c3C.js → workers-CAAvSda9.js} +1 -1
  62. package/client/dist/assets/{xml-C0OFlt5X.js → xml-iYCSJ4oL.js} +1 -1
  63. package/client/dist/assets/{yaml-DgabaPs5.js → yaml-DtO-_yDY.js} +1 -1
  64. package/client/dist/index.html +10 -9
  65. package/docs/README.md +2 -0
  66. package/docs/guide/de/integrations/5-mcp-server.md +74 -0
  67. package/docs/guide/en/integrations/5-mcp-server.md +74 -0
  68. package/docs/guide/es/integrations/5-mcp-server.md +74 -0
  69. package/docs/guide/fr/integrations/5-mcp-server.md +74 -0
  70. package/docs/guide/it/integrations/5-mcp-server.md +74 -0
  71. package/docs/guide/ja/integrations/5-mcp-server.md +74 -0
  72. package/docs/guide/pt/integrations/5-mcp-server.md +74 -0
  73. package/docs/guide/zh/integrations/5-mcp-server.md +74 -0
  74. package/docs/mcp.md +249 -0
  75. package/package.json +8 -5
  76. package/server/dist/index.js +30 -0
  77. package/server/dist/mcp/guide.js +82 -0
  78. package/server/dist/mcp/index.js +21 -0
  79. package/server/dist/mcp/mcp-admin-router.js +71 -0
  80. package/server/dist/mcp/mcp-server.js +143 -0
  81. package/server/dist/mcp/mcp-tiers.js +48 -0
  82. package/server/dist/mcp/mcp-token.js +119 -0
  83. package/server/dist/mcp/resources.js +24 -0
  84. package/server/dist/mcp/tools/agents.js +319 -0
  85. package/server/dist/mcp/tools/analytics.js +168 -0
  86. package/server/dist/mcp/tools/app-settings.js +81 -0
  87. package/server/dist/mcp/tools/catalog.js +45 -0
  88. package/server/dist/mcp/tools/chat.js +147 -0
  89. package/server/dist/mcp/tools/code.js +145 -0
  90. package/server/dist/mcp/tools/jira.js +222 -0
  91. package/server/dist/mcp/tools/jobs.js +258 -0
  92. package/server/dist/mcp/tools/loops.js +229 -0
  93. package/server/dist/mcp/tools/meta.js +96 -0
  94. package/server/dist/mcp/tools/plugins.js +83 -0
  95. package/server/dist/mcp/tools/projects.js +62 -0
  96. package/server/dist/mcp/tools/rails.js +181 -0
  97. package/server/dist/mcp/tools/setup.js +187 -0
  98. package/server/dist/mcp/tools/specs.js +327 -0
  99. package/server/dist/mcp/tools/types.js +137 -0
  100. package/server/dist/mcp/tools/watch.js +93 -0
  101. package/server/dist/mobile/mobile-event-bus.js +2 -0
  102. package/server/dist/project-router-tickets.js +2 -2
  103. package/server/dist/rails-router.js +5 -0
  104. package/client/dist/assets/AgentsPage-jcPUtPhP.js +0 -86
  105. package/client/dist/assets/CodePage-BcbZT88K.js +0 -2
  106. package/client/dist/assets/JobDetailPage-D5Cxw0md.js +0 -16
  107. package/client/dist/assets/JobsPage-3v_iX83r.js +0 -1
  108. package/client/dist/assets/LoopBuilderPage-4s_adZy5.js +0 -7
  109. package/client/dist/assets/LoopsPage-DA94-o0j.js +0 -1
  110. package/client/dist/assets/index-meTWPBzY.js +0 -144
  111. package/client/dist/assets/setup-BOmQ4vh2.js +0 -1
  112. package/client/dist/assets/setup-BwO2-kuK.js +0 -1
  113. package/client/dist/assets/setup-CUTNWz-0.js +0 -1
  114. package/client/dist/assets/setup-Cf3hjChU.js +0 -1
  115. package/client/dist/assets/setup-CsuXrbJ2.js +0 -1
  116. package/client/dist/assets/setup-Df4cJOqu.js +0 -1
  117. package/client/dist/assets/setup-Do0fWx6W.js +0 -1
  118. package/client/dist/assets/setup-GlkDhBlJ.js +0 -1
  119. /package/client/dist/assets/{abap-CK68cr9-.js → abap-BFJA_Joo.js} +0 -0
  120. /package/client/dist/assets/{activity-D4dhNEwO.js → activity-BXBMi28x.js} +0 -0
  121. /package/client/dist/assets/{activity-usnNa7FX.js → activity-By6I70Ws.js} +0 -0
  122. /package/client/dist/assets/{activity-BbNkUmW4.js → activity-CfedQaof.js} +0 -0
  123. /package/client/dist/assets/{activity-B2MvEH54.js → activity-D62CDlQz.js} +0 -0
  124. /package/client/dist/assets/{activity-DHjfmAyT.js → activity-DAFuSwnt.js} +0 -0
  125. /package/client/dist/assets/{activity-C7VdmeGb.js → activity-Did0FnrH.js} +0 -0
  126. /package/client/dist/assets/{activity-Di2f50_Z.js → activity-oLgwaVyt.js} +0 -0
  127. /package/client/dist/assets/{addon-image-biWX2UUm.js → addon-image-bPlduuUZ.js} +0 -0
  128. /package/client/dist/assets/{addon-ligatures-D4EiDb5r.js → addon-ligatures-BexpF7xb.js} +0 -0
  129. /package/client/dist/assets/{addon-webgl-CDCIZQ03.js → addon-webgl-Zy4IOieH.js} +0 -0
  130. /package/client/dist/assets/{addspec-BxMn39wn.js → addspec-B2fTENuq.js} +0 -0
  131. /package/client/dist/assets/{addspec-DAveBiCE.js → addspec-BmggyuCD.js} +0 -0
  132. /package/client/dist/assets/{addspec-1HEtmLv1.js → addspec-CFsLeQKV.js} +0 -0
  133. /package/client/dist/assets/{addspec-DfuR6EAl.js → addspec-CkHI5c5H.js} +0 -0
  134. /package/client/dist/assets/{addspec-CO1xv6BL.js → addspec-Cvm06hGe.js} +0 -0
  135. /package/client/dist/assets/{addspec-IozoiiGs.js → addspec-DwoLTocx.js} +0 -0
  136. /package/client/dist/assets/{addspec-CNyAUGz_.js → addspec-gthH-H1g.js} +0 -0
  137. /package/client/dist/assets/{agentstudio-Q0Sq_jTg.js → agentstudio-BtASTJl7.js} +0 -0
  138. /package/client/dist/assets/{agentstudio-9NbsoGXk.js → agentstudio-CIe9C892.js} +0 -0
  139. /package/client/dist/assets/{agentstudio-B-jQgYV-.js → agentstudio-CYGk-jjo.js} +0 -0
  140. /package/client/dist/assets/{agentstudio-Bwa72b1S.js → agentstudio-CwiS3BTp.js} +0 -0
  141. /package/client/dist/assets/{agentstudio-B1y0JWY-.js → agentstudio-D0bQBWpI.js} +0 -0
  142. /package/client/dist/assets/{agentstudio-DCyDW8sy.js → agentstudio-Dq-bZrI3.js} +0 -0
  143. /package/client/dist/assets/{agentstudio-1E-bag77.js → agentstudio-n0pmwz2I.js} +0 -0
  144. /package/client/dist/assets/{aiedit-qTGI_PGs.js → aiedit-1Z-UYKFb.js} +0 -0
  145. /package/client/dist/assets/{aiedit-CGxeml8D.js → aiedit-BAJM9Cch.js} +0 -0
  146. /package/client/dist/assets/{aiedit-CfBNanHE.js → aiedit-CYnsp1Iv.js} +0 -0
  147. /package/client/dist/assets/{aiedit-CvSspQmE.js → aiedit-CZBZAyeK.js} +0 -0
  148. /package/client/dist/assets/{aiedit-kAU7KADg.js → aiedit-CunYxmW0.js} +0 -0
  149. /package/client/dist/assets/{aiedit-DUpe7NxI.js → aiedit-s1T1EMK8.js} +0 -0
  150. /package/client/dist/assets/{aiedit-DSLtsYIu.js → aiedit-uIDh2tlc.js} +0 -0
  151. /package/client/dist/assets/{analytics-DBGO8B6-.js → analytics-B95FiMuD.js} +0 -0
  152. /package/client/dist/assets/{analytics-CgEkAUiP.js → analytics-DPIkvuTS.js} +0 -0
  153. /package/client/dist/assets/{analytics-DDqve9Ma.js → analytics-DPmCEzvJ.js} +0 -0
  154. /package/client/dist/assets/{analytics-D1ElChhs.js → analytics-DRexho82.js} +0 -0
  155. /package/client/dist/assets/{analytics-DEsEAJZL.js → analytics-DVFNjjAv.js} +0 -0
  156. /package/client/dist/assets/{analytics-BDlELxc7.js → analytics-DZKGAUdm.js} +0 -0
  157. /package/client/dist/assets/{analytics-CQqu1yE5.js → analytics-g9ASAR_r.js} +0 -0
  158. /package/client/dist/assets/{apex-BHHyAVNb.js → apex-C1f-z6NO.js} +0 -0
  159. /package/client/dist/assets/{atom-one-dark-DrWoEEbZ.js → atom-one-dark-CT4DolNR.js} +0 -0
  160. /package/client/dist/assets/{attachments-3CuBBRFu.js → attachments--jr2QLGv.js} +0 -0
  161. /package/client/dist/assets/{attachments-pW3zm9nu.js → attachments-BgqfeoOx.js} +0 -0
  162. /package/client/dist/assets/{attachments-BNgH6Tcu.js → attachments-Bj3HHTXV.js} +0 -0
  163. /package/client/dist/assets/{attachments-D5fVsMgb.js → attachments-C3skjFyH.js} +0 -0
  164. /package/client/dist/assets/{attachments-UJtEq892.js → attachments-CnPS8YWu.js} +0 -0
  165. /package/client/dist/assets/{attachments-CppM7de8.js → attachments-DejzxE0C.js} +0 -0
  166. /package/client/dist/assets/{attachments-BLqqPGyy.js → attachments-FFb2xHc_.js} +0 -0
  167. /package/client/dist/assets/{azcli-C56lfIEP.js → azcli-Dr0WBJTP.js} +0 -0
  168. /package/client/dist/assets/{bat-BLamSaf-.js → bat-BKG3k49W.js} +0 -0
  169. /package/client/dist/assets/{bicep-lrOcEItS.js → bicep-DXs2wTcS.js} +0 -0
  170. /package/client/dist/assets/{browser-C91MQBxx.js → browser-BS9t1qMc.js} +0 -0
  171. /package/client/dist/assets/{browser-B7i7Ysc8.js → browser-BpMo-amf.js} +0 -0
  172. /package/client/dist/assets/{browser-DwE289IS.js → browser-CsC3NOZ-.js} +0 -0
  173. /package/client/dist/assets/{browser-C__Vz7KR.js → browser-DS6xnywt.js} +0 -0
  174. /package/client/dist/assets/{browser-DhwTc0ry.js → browser-Dm6F9bqQ.js} +0 -0
  175. /package/client/dist/assets/{browser-EFmPpkvO.js → browser-Dm_Of27q.js} +0 -0
  176. /package/client/dist/assets/{browser-BVQgd1_1.js → browser-U3iouSXn.js} +0 -0
  177. /package/client/dist/assets/{cameligo-BK_p0bgU.js → cameligo-Detknuxp.js} +0 -0
  178. /package/client/dist/assets/{chat-PVakYp92.js → chat-B2tWTbZL.js} +0 -0
  179. /package/client/dist/assets/{chat-BnJPyeUK.js → chat-CXOJHDUZ.js} +0 -0
  180. /package/client/dist/assets/{chat-CE8bx6Rz.js → chat-Cy78lw1n.js} +0 -0
  181. /package/client/dist/assets/{chat-UMl6H55K.js → chat-D78VMi-v.js} +0 -0
  182. /package/client/dist/assets/{chat-BXVx6rb5.js → chat-De1RgOXU.js} +0 -0
  183. /package/client/dist/assets/{chat-C5nJF6L0.js → chat-DyTbH-0F.js} +0 -0
  184. /package/client/dist/assets/{chat-9RcD5Lcn.js → chat-sqZyn0C4.js} +0 -0
  185. /package/client/dist/assets/{clojure-BQ7JOykv.js → clojure-CCu4UNKg.js} +0 -0
  186. /package/client/dist/assets/{clsx-CjLeUJfG.js → clsx-pVRQNNR0.js} +0 -0
  187. /package/client/dist/assets/{code-u9Sg9ohM.js → code-6LokPmIE.js} +0 -0
  188. /package/client/dist/assets/{code-OoLqhjoI.js → code-CLTuhuvM.js} +0 -0
  189. /package/client/dist/assets/{code-Lg4awa35.js → code-CwGlPuwb.js} +0 -0
  190. /package/client/dist/assets/{code-BPMR8_Vp.js → code-DFCDV5e1.js} +0 -0
  191. /package/client/dist/assets/{code-eh4vO2-_.js → code-Djq48g0s.js} +0 -0
  192. /package/client/dist/assets/{code-aCUqkVN_.js → code-Do27r8WG.js} +0 -0
  193. /package/client/dist/assets/{code-BsOBm1Fb.js → code-Drc7f197.js} +0 -0
  194. /package/client/dist/assets/{coffee-BD3DiL5s.js → coffee-Bam7Y9IR.js} +0 -0
  195. /package/client/dist/assets/{commands-B9XEyMj-.js → commands-CxReviyc.js} +0 -0
  196. /package/client/dist/assets/{commands-Ic1DJDxm.js → commands-CzP1qQyD.js} +0 -0
  197. /package/client/dist/assets/{commands-BdI0CtOL.js → commands-DGP46UxM.js} +0 -0
  198. /package/client/dist/assets/{commands-DSX3yJyr.js → commands-DQvoMqa7.js} +0 -0
  199. /package/client/dist/assets/{commands-yNn4IA4C.js → commands-DeKaz04Q.js} +0 -0
  200. /package/client/dist/assets/{commands-BI1Ta-E7.js → commands-DwYhwQsF.js} +0 -0
  201. /package/client/dist/assets/{commands-C2ewlyXo.js → commands-lm6Vlght.js} +0 -0
  202. /package/client/dist/assets/{common-CzCQ0rpW.js → common-B0crwfK0.js} +0 -0
  203. /package/client/dist/assets/{common-CNoRVpnA.js → common-BlqmiTj4.js} +0 -0
  204. /package/client/dist/assets/{common-CcHFVATT.js → common-CIUPtPdu.js} +0 -0
  205. /package/client/dist/assets/{common-LDwESeCX.js → common-C_-0fZsp.js} +0 -0
  206. /package/client/dist/assets/{common-C9VyfY7g.js → common-DH9A-wTo.js} +0 -0
  207. /package/client/dist/assets/{common-Dmpyh323.js → common-DJM41wFl.js} +0 -0
  208. /package/client/dist/assets/{common-ULlk84G4.js → common-SyTaRc_K.js} +0 -0
  209. /package/client/dist/assets/{cpp-splnCwCh.js → cpp-BhOkAe-9.js} +0 -0
  210. /package/client/dist/assets/{csharp-BCpsl-o3.js → csharp-BgHArJNx.js} +0 -0
  211. /package/client/dist/assets/{csp-tkCWrZmb.js → csp-Xzh56_3-.js} +0 -0
  212. /package/client/dist/assets/{css-B_xdnReq.js → css-CD7-RYRS.js} +0 -0
  213. /package/client/dist/assets/{cypher-OL1zq-y3.js → cypher-l2xAdF3X.js} +0 -0
  214. /package/client/dist/assets/{dart-CtTlOkrm.js → dart-CDOWeyzt.js} +0 -0
  215. /package/client/dist/assets/{dashboard-C-dXxut-.js → dashboard-B1rs1wki.js} +0 -0
  216. /package/client/dist/assets/{dashboard-CUjyhohl.js → dashboard-D9QPCmv3.js} +0 -0
  217. /package/client/dist/assets/{dashboard-C52PElPV.js → dashboard-Dxgb47lO.js} +0 -0
  218. /package/client/dist/assets/{dashboard-03EpOoMM.js → dashboard-TuElRCZX.js} +0 -0
  219. /package/client/dist/assets/{dashboard-Ch6H-457.js → dashboard-UWXs9_wy.js} +0 -0
  220. /package/client/dist/assets/{dashboard-zH9quXks.js → dashboard-ajT8usAi.js} +0 -0
  221. /package/client/dist/assets/{dashboard-C2owt3eN.js → dashboard-zwN2xswo.js} +0 -0
  222. /package/client/dist/assets/{dockerfile-DcQ5CNiW.js → dockerfile-Dv8atx7v.js} +0 -0
  223. /package/client/dist/assets/{ecl-DZpiDRt6.js → ecl-DIYTlbD_.js} +0 -0
  224. /package/client/dist/assets/{editor.api2-Cwla1nvV.js → editor.api2-CrNrMVfe.js} +0 -0
  225. /package/client/dist/assets/{elixir-Dzj2lqtK.js → elixir-CR7PLJja.js} +0 -0
  226. /package/client/dist/assets/{explore-4SD1DxR0.js → explore-BYFCCka4.js} +0 -0
  227. /package/client/dist/assets/{explore-xQoaak6e.js → explore-CE0wSNV1.js} +0 -0
  228. /package/client/dist/assets/{explore-CZt4Ncpa.js → explore-CSDcRUNj.js} +0 -0
  229. /package/client/dist/assets/{explore-DQ0XEjed.js → explore-CvM08PpD.js} +0 -0
  230. /package/client/dist/assets/{explore-CCcPXrHg.js → explore-Jkw93usp.js} +0 -0
  231. /package/client/dist/assets/{explore-BxR9q8Hq.js → explore-kK239uoZ.js} +0 -0
  232. /package/client/dist/assets/{explore-B2n8r9Ye.js → explore-mLI5eXks.js} +0 -0
  233. /package/client/dist/assets/{flow9-CFENCHIZ.js → flow9-DCK5-6NG.js} +0 -0
  234. /package/client/dist/assets/{format-command-CMsBTOPN.js → format-command-rVyGPxWE.js} +0 -0
  235. /package/client/dist/assets/{fsharp-D-4bv7FB.js → fsharp-DJ1xiUVU.js} +0 -0
  236. /package/client/dist/assets/{go-djxbTJq7.js → go-BEvbHcbb.js} +0 -0
  237. /package/client/dist/assets/{graphql-DHIFrkZ6.js → graphql-DN1ktXnz.js} +0 -0
  238. /package/client/dist/assets/{hcl-CXVoowNb.js → hcl-DJaIjIEr.js} +0 -0
  239. /package/client/dist/assets/{ini-Crzc5kly.js → ini-PlKfLEnb.js} +0 -0
  240. /package/client/dist/assets/{integrations-A9f08E0o.js → integrations-B8hT0Qf_.js} +0 -0
  241. /package/client/dist/assets/{integrations-DwSVdCpf.js → integrations-Bdk5dMyv.js} +0 -0
  242. /package/client/dist/assets/{integrations-B46ac3sf.js → integrations-CYqz7YFS.js} +0 -0
  243. /package/client/dist/assets/{integrations-9qxUNhPD.js → integrations-Cj_BsXxJ.js} +0 -0
  244. /package/client/dist/assets/{integrations-B17KyA-i.js → integrations-D8M8eJH2.js} +0 -0
  245. /package/client/dist/assets/{integrations-DkBi-Gsh.js → integrations-TJuDBl-9.js} +0 -0
  246. /package/client/dist/assets/{integrations-C7u7SInG.js → integrations-TwQV3sLw.js} +0 -0
  247. /package/client/dist/assets/{java-CYLaJrdE.js → java-3PUwMlx-.js} +0 -0
  248. /package/client/dist/assets/{jira-01H1RfQj.js → jira--rI5PfuE.js} +0 -0
  249. /package/client/dist/assets/{jira-CBU0200d.js → jira-BoRyckbb.js} +0 -0
  250. /package/client/dist/assets/{jira-BpnpUFlb.js → jira-C95FN3yk.js} +0 -0
  251. /package/client/dist/assets/{jira-DzIVvNmy.js → jira-CNUUgTs4.js} +0 -0
  252. /package/client/dist/assets/{jira-Dht8qNck.js → jira-DHFnvEm8.js} +0 -0
  253. /package/client/dist/assets/{jira-4Fin3fu7.js → jira-NhkbrDXe.js} +0 -0
  254. /package/client/dist/assets/{jira-0ldfMByG.js → jira-wiIvGma5.js} +0 -0
  255. /package/client/dist/assets/{jobs-Oz3UtLQn.js → jobs-Bjp7v9aA.js} +0 -0
  256. /package/client/dist/assets/{jobs-jEQidSIb.js → jobs-Bjt5PyVv.js} +0 -0
  257. /package/client/dist/assets/{jobs-BF9raUkL.js → jobs-BmTs4Bn3.js} +0 -0
  258. /package/client/dist/assets/{jobs-DcCONARH.js → jobs-Cchy-18B.js} +0 -0
  259. /package/client/dist/assets/{jobs-DM9owF1j.js → jobs-D2QVTPbz.js} +0 -0
  260. /package/client/dist/assets/{jobs-Bw4hqEro.js → jobs-LK1ImiDH.js} +0 -0
  261. /package/client/dist/assets/{jobs-ym72SIR9.js → jobs-yPz4Dvi-.js} +0 -0
  262. /package/client/dist/assets/{julia-BJ7tUU-T.js → julia-DC6LnY15.js} +0 -0
  263. /package/client/dist/assets/{kotlin-CeWcU3lC.js → kotlin-CoGntbZF.js} +0 -0
  264. /package/client/dist/assets/{less-CviwWNG4.js → less-DCFflTXL.js} +0 -0
  265. /package/client/dist/assets/{lexon-Dt28jqDS.js → lexon-BTOivnjP.js} +0 -0
  266. /package/client/dist/assets/{loops-Fv4Bs-9A.js → loops-BFIcYvpy.js} +0 -0
  267. /package/client/dist/assets/{loops-D_ZxkD4l.js → loops-BU314kSd.js} +0 -0
  268. /package/client/dist/assets/{loops-DE-2cmLw.js → loops-C3OaXou9.js} +0 -0
  269. /package/client/dist/assets/{loops-mcoeFMat.js → loops-Cv6Aeszq.js} +0 -0
  270. /package/client/dist/assets/{loops-B_w7STrw.js → loops-IQe23ef6.js} +0 -0
  271. /package/client/dist/assets/{loops-BYNUJVyD.js → loops-LqZ4MC6J.js} +0 -0
  272. /package/client/dist/assets/{loops-B_gS4Pqu.js → loops-SbkOdciY.js} +0 -0
  273. /package/client/dist/assets/{lua-B6AOaJSi.js → lua-ClKCZMmP.js} +0 -0
  274. /package/client/dist/assets/{m3-VnMkHJcy.js → m3-25hKFWMb.js} +0 -0
  275. /package/client/dist/assets/{markdown-8vKNdvIM.js → markdown-BGAj9q0K.js} +0 -0
  276. /package/client/dist/assets/{mips-DoEcuzan.js → mips-BrVgY2Pf.js} +0 -0
  277. /package/client/dist/assets/{msdax-CNzvHyEp.js → msdax-7EhcRsm8.js} +0 -0
  278. /package/client/dist/assets/{mysql-Buk3vUtL.js → mysql-B5_atCBH.js} +0 -0
  279. /package/client/dist/assets/{nav-_0vAgZ_k.js → nav-B2Cv1vjz.js} +0 -0
  280. /package/client/dist/assets/{nav-Cw3_40fA.js → nav-Br2AivTc.js} +0 -0
  281. /package/client/dist/assets/{nav-DNDJ3H-_.js → nav-CFofO7QO.js} +0 -0
  282. /package/client/dist/assets/{nav-CCz4krPP.js → nav-CyHKTZxn.js} +0 -0
  283. /package/client/dist/assets/{nav-B5W9IMnf.js → nav-DqyLGJmF.js} +0 -0
  284. /package/client/dist/assets/{nav-CrG_mYRr.js → nav-_-siCrRv.js} +0 -0
  285. /package/client/dist/assets/{nav-DbAbG5_k.js → nav-rO4Nqnh-.js} +0 -0
  286. /package/client/dist/assets/{nav-DVp1nEsi.js → nav-zyBhf29M.js} +0 -0
  287. /package/client/dist/assets/{objective-c-DfOmda-5.js → objective-c-CLUvUl9T.js} +0 -0
  288. /package/client/dist/assets/{pascal-DoAA2yjy.js → pascal-BnU1HU42.js} +0 -0
  289. /package/client/dist/assets/{pascaligo-C65Vn1fu.js → pascaligo-dsKvjFzi.js} +0 -0
  290. /package/client/dist/assets/{perl-INlfQ_ro.js → perl-CZne1GYG.js} +0 -0
  291. /package/client/dist/assets/{pgsql-DtwRzglx.js → pgsql-CMa5W_iF.js} +0 -0
  292. /package/client/dist/assets/{php-DfHqVNet.js → php-Cu4mS35J.js} +0 -0
  293. /package/client/dist/assets/{pla-D3dNVRYk.js → pla-B7COwnnm.js} +0 -0
  294. /package/client/dist/assets/{postiats-UKXD1rM4.js → postiats-GLeNtnBQ.js} +0 -0
  295. /package/client/dist/assets/{powerquery-zE3E3O7s.js → powerquery-BqPf3R1W.js} +0 -0
  296. /package/client/dist/assets/{powershell-Df9b3zQl.js → powershell-D9btb5su.js} +0 -0
  297. /package/client/dist/assets/{protobuf-BF0nUVrW.js → protobuf-6GHSuaNm.js} +0 -0
  298. /package/client/dist/assets/{pug-Bj6Yikv_.js → pug-ct6rYKQd.js} +0 -0
  299. /package/client/dist/assets/{qsharp-BI4h-raZ.js → qsharp-CIrAQNPy.js} +0 -0
  300. /package/client/dist/assets/{r-DhpnmaXx.js → r-Bk-a0sON.js} +0 -0
  301. /package/client/dist/assets/{redis-DwYYPr4d.js → redis-C9yfaWYh.js} +0 -0
  302. /package/client/dist/assets/{redshift-D2f3Bc-4.js → redshift-DaOT1jRU.js} +0 -0
  303. /package/client/dist/assets/{restructuredtext-Dkiif6fe.js → restructuredtext-C1t9LQfS.js} +0 -0
  304. /package/client/dist/assets/{ruby-C6hLmHy0.js → ruby-COiPZJjc.js} +0 -0
  305. /package/client/dist/assets/{rust-X8WAGtxB.js → rust--gZOJZzj.js} +0 -0
  306. /package/client/dist/assets/{sb-4M2la0Kr.js → sb-NHf3iazF.js} +0 -0
  307. /package/client/dist/assets/{scala-CaCXz58E.js → scala-D1nO1TBd.js} +0 -0
  308. /package/client/dist/assets/{scheme-CMdjpmP7.js → scheme-Bref42s5.js} +0 -0
  309. /package/client/dist/assets/{scss-QopmvPyp.js → scss-BS9CCLr3.js} +0 -0
  310. /package/client/dist/assets/{settings-DyBxunCh.js → settings-BN4dufu6.js} +0 -0
  311. /package/client/dist/assets/{settings-BN7OusER.js → settings-Bap_q3rt.js} +0 -0
  312. /package/client/dist/assets/{settings-Bi5FFkIw.js → settings-BlYjWMy5.js} +0 -0
  313. /package/client/dist/assets/{settings-iQe5Dim-.js → settings-C7t_uUz4.js} +0 -0
  314. /package/client/dist/assets/{settings-fk-WlnUt.js → settings-CIFrUsKt.js} +0 -0
  315. /package/client/dist/assets/{settings-BA1V6KdK.js → settings-Cbj9VWmI.js} +0 -0
  316. /package/client/dist/assets/{settings-CRJxyTNN.js → settings-D7saHMU8.js} +0 -0
  317. /package/client/dist/assets/{settings-0m2iuTzd.js → settings-DrRjM5e8.js} +0 -0
  318. /package/client/dist/assets/{shell-CDBchS00.js → shell-DT3joMBB.js} +0 -0
  319. /package/client/dist/assets/{solidity-DvBfi5mC.js → solidity-o2Fm9dvg.js} +0 -0
  320. /package/client/dist/assets/{sophia-HSnXR17u.js → sophia-Dj1N6Xqb.js} +0 -0
  321. /package/client/dist/assets/{sparql-DhG_ppup.js → sparql-D2fjpTWm.js} +0 -0
  322. /package/client/dist/assets/{specs-BvsFNKTs.js → specs-C-WXGBqy.js} +0 -0
  323. /package/client/dist/assets/{specs-D4ORogcT.js → specs-C57koADY.js} +0 -0
  324. /package/client/dist/assets/{specs-CnH7dOiF.js → specs-CCXV-eSF.js} +0 -0
  325. /package/client/dist/assets/{specs-CUE3xSFM.js → specs-CYA5Bv7Q.js} +0 -0
  326. /package/client/dist/assets/{specs-C2wW5bq8.js → specs-DFCFg51O.js} +0 -0
  327. /package/client/dist/assets/{specs-C_8j4ELZ.js → specs-Dslng_yW.js} +0 -0
  328. /package/client/dist/assets/{specs-D6Y76Bgi.js → specs-DwRPiJTc.js} +0 -0
  329. /package/client/dist/assets/{specs-Bku8SypT.js → specs-DzlROLy7.js} +0 -0
  330. /package/client/dist/assets/{sql-DHeIS-tf.js → sql-BArhsPUz.js} +0 -0
  331. /package/client/dist/assets/{st-CMWchiRU.js → st-Bd2-tALj.js} +0 -0
  332. /package/client/dist/assets/{swift-CDXvBefj.js → swift-DvEpXBKj.js} +0 -0
  333. /package/client/dist/assets/{systemverilog-0RTukYUE.js → systemverilog-mHEbsnVH.js} +0 -0
  334. /package/client/dist/assets/{tcl-CbBF_Ttl.js → tcl-DePutp1e.js} +0 -0
  335. /package/client/dist/assets/{terminal-CB33IsO1.js → terminal-2S-Wsk6L.js} +0 -0
  336. /package/client/dist/assets/{terminal-Cz_Puz0q.js → terminal-BRQMrU74.js} +0 -0
  337. /package/client/dist/assets/{terminal-DFEH9XTQ.js → terminal-BTiemy98.js} +0 -0
  338. /package/client/dist/assets/{terminal-BTanJIt_.js → terminal-CjQeWfpp.js} +0 -0
  339. /package/client/dist/assets/{terminal-CY_sPfdD.js → terminal-CmP5riTU.js} +0 -0
  340. /package/client/dist/assets/{terminal-BLh00ouM.js → terminal-CnObBCAh.js} +0 -0
  341. /package/client/dist/assets/{terminal-CR6t-Oey.js → terminal-DcPKgKMN.js} +0 -0
  342. /package/client/dist/assets/{terminal-Cj4HzP3p.js → terminal-XciDq6VV.js} +0 -0
  343. /package/client/dist/assets/{tickets-OrJwUxJR.js → tickets-7kl_0jgM.js} +0 -0
  344. /package/client/dist/assets/{tickets-68LH1xp6.js → tickets-BSyaZI8d.js} +0 -0
  345. /package/client/dist/assets/{tickets-blQnNA4N.js → tickets-CcTcvwKS.js} +0 -0
  346. /package/client/dist/assets/{tickets-D6f3GSYn.js → tickets-D75vyZJj.js} +0 -0
  347. /package/client/dist/assets/{tickets-PtHNxQo5.js → tickets-D79ZT2SZ.js} +0 -0
  348. /package/client/dist/assets/{tickets-DBQXMYYA.js → tickets-DbcMWq5L.js} +0 -0
  349. /package/client/dist/assets/{tickets-jxsTrApR.js → tickets-ZA_2iPd1.js} +0 -0
  350. /package/client/dist/assets/{tickets-REr-EQx9.js → tickets-mxd23fWX.js} +0 -0
  351. /package/client/dist/assets/{twig-DCcGd8FE.js → twig-DQ2zIX0b.js} +0 -0
  352. /package/client/dist/assets/{typespec-HTphp-Uh.js → typespec-DPoaiGTJ.js} +0 -0
  353. /package/client/dist/assets/{vb-Cb_yUcVd.js → vb-Jo98wdMr.js} +0 -0
  354. /package/client/dist/assets/{wgsl-DrKU3YXj.js → wgsl-DZc4h_eS.js} +0 -0
@@ -0,0 +1,229 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.loopsTools = loopsTools;
4
+ const zod_1 = require("zod");
5
+ const types_1 = require("./types");
6
+ /**
7
+ * Loops — the GLOBAL (cross-project) visual loop-builder library. Routes live at
8
+ * `/api/loops*` and `/api/loop-templates` (NOT under `/projects` — no projectId).
9
+ * Gated server-side by SPECRAILS_LOOPS_SECTION (every route 404s when off).
10
+ *
11
+ * A single domain-facade tool with an `action` enum and a dynamic tier:
12
+ * - read: list, get, templates, factory, commands, constants_list, preview
13
+ * - write: constant_create, constant_update, import, create, from_template,
14
+ * fork, update, publish, unpublish, duplicate
15
+ * - destructive: constant_delete, delete
16
+ */
17
+ function loopsTools() {
18
+ return [
19
+ {
20
+ name: 'specrails_loops',
21
+ title: 'Loops',
22
+ description: 'Manage the global (cross-project) loop library and its templates/factory/constants. ' +
23
+ 'Loops are visual builder graphs reused across projects; this is an APP-LEVEL domain (no projectId). ' +
24
+ 'Actions: ' +
25
+ 'list (all saved loops), ' +
26
+ 'get (one loop by id), ' +
27
+ 'templates (built-in template catalog with graphs), ' +
28
+ 'factory (built-in locked factory loops), ' +
29
+ 'commands (magic-command catalog for the builder palette), ' +
30
+ 'constants_list (global cross-loop constants), ' +
31
+ 'constant_create (write), constant_update (write), constant_delete (destructive), ' +
32
+ 'preview (dry-run resolve tokens of a graph — no spawn), ' +
33
+ 'import (import loops from an export envelope), ' +
34
+ 'create (new Draft loop), ' +
35
+ 'from_template (instantiate from a template), ' +
36
+ 'fork (fork a factory loop into an editable Draft), ' +
37
+ 'update (name/description/graph — reverts to Draft, 409 while running), ' +
38
+ 'publish (graph-validated), unpublish (409 while running), ' +
39
+ 'duplicate (copy a loop), ' +
40
+ 'delete (destructive — 409 while running).',
41
+ hintTier: 'read',
42
+ tier: (a) => {
43
+ const action = a.action;
44
+ if (action === 'delete' || action === 'constant_delete')
45
+ return 'destructive';
46
+ if ([
47
+ 'constant_create',
48
+ 'constant_update',
49
+ 'import',
50
+ 'create',
51
+ 'from_template',
52
+ 'fork',
53
+ 'update',
54
+ 'publish',
55
+ 'unpublish',
56
+ 'duplicate',
57
+ ].includes(action)) {
58
+ return 'write';
59
+ }
60
+ return 'read';
61
+ },
62
+ inputSchema: {
63
+ action: zod_1.z
64
+ .enum([
65
+ 'list',
66
+ 'get',
67
+ 'templates',
68
+ 'factory',
69
+ 'commands',
70
+ 'constants_list',
71
+ 'constant_create',
72
+ 'constant_update',
73
+ 'constant_delete',
74
+ 'preview',
75
+ 'import',
76
+ 'create',
77
+ 'from_template',
78
+ 'fork',
79
+ 'update',
80
+ 'publish',
81
+ 'unpublish',
82
+ 'duplicate',
83
+ 'delete',
84
+ ])
85
+ .describe('Operation to perform'),
86
+ loopId: zod_1.z.string().optional().describe('Loop id (for get / update / publish / unpublish / duplicate / delete)'),
87
+ constantId: zod_1.z.string().optional().describe('Constant id (for constant_update / constant_delete)'),
88
+ templateId: zod_1.z.string().optional().describe('Template id (for from_template)'),
89
+ factoryId: zod_1.z.string().optional().describe('Factory loop id (for fork)'),
90
+ name: zod_1.z
91
+ .string()
92
+ .optional()
93
+ .describe('Loop or constant name (required for create / constant_create; optional override for from_template / fork / duplicate / update)'),
94
+ description: zod_1.z.string().optional().describe('Loop description (for create / update)'),
95
+ graph: zod_1.z
96
+ .record(zod_1.z.unknown())
97
+ .optional()
98
+ .describe('Loop graph object { nodes, edges, ... } (for create / update; required for preview)'),
99
+ value: zod_1.z.string().optional().describe('Constant value (for constant_create / constant_update)'),
100
+ provider: zod_1.z.string().optional().describe('Provider for token resolution in preview (default "claude")'),
101
+ loops: zod_1.z.array(zod_1.z.unknown()).optional().describe('Array of loop export envelopes (for import)'),
102
+ },
103
+ async handler(ctx, args) {
104
+ const action = args.action;
105
+ const loopId = args.loopId;
106
+ const constantId = args.constantId;
107
+ switch (action) {
108
+ // ── Reads ──────────────────────────────────────────────────────────
109
+ case 'list':
110
+ return (0, types_1.apiCall)(ctx, 'GET', '/loops');
111
+ case 'get': {
112
+ if (!loopId)
113
+ throw new Error('get requires a "loopId".');
114
+ return (0, types_1.apiCall)(ctx, 'GET', `/loops/${encodeURIComponent(loopId)}`);
115
+ }
116
+ case 'templates':
117
+ return (0, types_1.apiCall)(ctx, 'GET', '/loop-templates');
118
+ case 'factory':
119
+ return (0, types_1.apiCall)(ctx, 'GET', '/loops/factory');
120
+ case 'commands':
121
+ return (0, types_1.apiCall)(ctx, 'GET', '/loops/commands');
122
+ case 'constants_list':
123
+ return (0, types_1.apiCall)(ctx, 'GET', '/loops/constants');
124
+ case 'preview': {
125
+ const graph = args.graph;
126
+ if (!graph)
127
+ throw new Error('preview requires a "graph".');
128
+ return (0, types_1.apiCall)(ctx, 'POST', '/loops/preview', {
129
+ graph,
130
+ ...(args.provider !== undefined ? { provider: args.provider } : {}),
131
+ });
132
+ }
133
+ // ── Constants (write / destructive) ─────────────────────────────────
134
+ case 'constant_create': {
135
+ const name = args.name;
136
+ if (!name)
137
+ throw new Error('constant_create requires a "name".');
138
+ return (0, types_1.apiCall)(ctx, 'POST', '/loops/constants', {
139
+ name,
140
+ value: args.value ?? '',
141
+ });
142
+ }
143
+ case 'constant_update': {
144
+ if (!constantId)
145
+ throw new Error('constant_update requires a "constantId".');
146
+ return (0, types_1.apiCall)(ctx, 'PUT', `/loops/constants/${encodeURIComponent(constantId)}`, {
147
+ value: args.value ?? '',
148
+ });
149
+ }
150
+ case 'constant_delete': {
151
+ if (!constantId)
152
+ throw new Error('constant_delete requires a "constantId".');
153
+ return (0, types_1.apiCall)(ctx, 'DELETE', `/loops/constants/${encodeURIComponent(constantId)}`);
154
+ }
155
+ // ── Loops (write) ───────────────────────────────────────────────────
156
+ case 'import': {
157
+ const loops = args.loops;
158
+ if (!Array.isArray(loops))
159
+ throw new Error('import requires a "loops" array.');
160
+ return (0, types_1.apiCall)(ctx, 'POST', '/loops/import', { loops });
161
+ }
162
+ case 'create': {
163
+ const name = args.name;
164
+ if (!name)
165
+ throw new Error('create requires a "name".');
166
+ return (0, types_1.apiCall)(ctx, 'POST', '/loops', {
167
+ name,
168
+ ...(args.description !== undefined ? { description: args.description } : {}),
169
+ ...(args.graph !== undefined ? { graph: args.graph } : {}),
170
+ });
171
+ }
172
+ case 'from_template': {
173
+ const templateId = args.templateId;
174
+ if (!templateId)
175
+ throw new Error('from_template requires a "templateId".');
176
+ return (0, types_1.apiCall)(ctx, 'POST', `/loops/from-template/${encodeURIComponent(templateId)}`, {
177
+ ...(args.name !== undefined ? { name: args.name } : {}),
178
+ });
179
+ }
180
+ case 'fork': {
181
+ const factoryId = args.factoryId;
182
+ if (!factoryId)
183
+ throw new Error('fork requires a "factoryId".');
184
+ return (0, types_1.apiCall)(ctx, 'POST', `/loops/factory/${encodeURIComponent(factoryId)}/fork`, {
185
+ ...(args.name !== undefined ? { name: args.name } : {}),
186
+ });
187
+ }
188
+ case 'update': {
189
+ if (!loopId)
190
+ throw new Error('update requires a "loopId".');
191
+ const body = {};
192
+ if (args.name !== undefined)
193
+ body.name = args.name;
194
+ if (args.description !== undefined)
195
+ body.description = args.description;
196
+ if (args.graph !== undefined)
197
+ body.graph = args.graph;
198
+ return (0, types_1.apiCall)(ctx, 'PUT', `/loops/${encodeURIComponent(loopId)}`, body);
199
+ }
200
+ case 'publish': {
201
+ if (!loopId)
202
+ throw new Error('publish requires a "loopId".');
203
+ return (0, types_1.apiCall)(ctx, 'POST', `/loops/${encodeURIComponent(loopId)}/publish`);
204
+ }
205
+ case 'unpublish': {
206
+ if (!loopId)
207
+ throw new Error('unpublish requires a "loopId".');
208
+ return (0, types_1.apiCall)(ctx, 'POST', `/loops/${encodeURIComponent(loopId)}/unpublish`);
209
+ }
210
+ case 'duplicate': {
211
+ if (!loopId)
212
+ throw new Error('duplicate requires a "loopId".');
213
+ return (0, types_1.apiCall)(ctx, 'POST', `/loops/${encodeURIComponent(loopId)}/duplicate`, {
214
+ ...(args.name !== undefined ? { name: args.name } : {}),
215
+ });
216
+ }
217
+ // ── Destructive ─────────────────────────────────────────────────────
218
+ case 'delete': {
219
+ if (!loopId)
220
+ throw new Error('delete requires a "loopId".');
221
+ return (0, types_1.apiCall)(ctx, 'DELETE', `/loops/${encodeURIComponent(loopId)}`);
222
+ }
223
+ default:
224
+ throw new Error(`Unknown action "${action}".`);
225
+ }
226
+ },
227
+ },
228
+ ];
229
+ }
@@ -0,0 +1,96 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.metaTools = metaTools;
4
+ const zod_1 = require("zod");
5
+ const guide_1 = require("../guide");
6
+ const types_1 = require("./types");
7
+ /**
8
+ * Meta tools that teach the platform and aid discovery.
9
+ * `getSpecs` returns the full catalog (passed lazily to avoid a cycle).
10
+ */
11
+ function metaTools(getSpecs) {
12
+ return [
13
+ {
14
+ name: 'specrails_guide',
15
+ title: 'Platform guide',
16
+ description: 'Returns a self-contained guide to Specrails: concepts, workflow, invariants, and how to use these tools. Read this first.',
17
+ tier: 'read',
18
+ inputSchema: {},
19
+ handler: () => guide_1.SPECRAILS_GUIDE,
20
+ },
21
+ {
22
+ name: 'specrails_search',
23
+ title: 'Search tools',
24
+ description: 'Find the right Specrails tool/action for an intent. Returns matching tools with their descriptions.',
25
+ tier: 'read',
26
+ inputSchema: {
27
+ query: zod_1.z.string().describe('Natural-language intent, e.g. "launch the pipeline for a ticket"'),
28
+ },
29
+ handler: (_ctx, args) => {
30
+ const q = String(args.query ?? '').toLowerCase().trim();
31
+ const terms = q.split(/\s+/).filter(Boolean);
32
+ const scored = getSpecs()
33
+ .filter((s) => s.name !== 'specrails_search')
34
+ .map((s) => {
35
+ const hay = `${s.name} ${s.title} ${s.description}`.toLowerCase();
36
+ const score = terms.reduce((acc, t) => acc + (hay.includes(t) ? 1 : 0), 0);
37
+ return { name: s.name, title: s.title, description: s.description, score };
38
+ })
39
+ .filter((r) => r.score > 0)
40
+ .sort((a, b) => b.score - a.score)
41
+ .slice(0, 8);
42
+ return scored.length ? scored : { hint: 'No direct match. Call specrails_guide for an overview, or list all tools.' };
43
+ },
44
+ },
45
+ {
46
+ name: 'specrails_describe',
47
+ title: 'Describe a tool',
48
+ description: 'Return the full description and input schema summary for a named Specrails tool.',
49
+ tier: 'read',
50
+ inputSchema: {
51
+ name: zod_1.z.string().describe('Tool name, e.g. "specrails_rails"'),
52
+ },
53
+ handler: (_ctx, args) => {
54
+ const name = String(args.name ?? '');
55
+ const spec = getSpecs().find((s) => s.name === name);
56
+ if (!spec)
57
+ throw new Error(`Unknown tool "${name}". Use specrails_search to find one.`);
58
+ return {
59
+ name: spec.name,
60
+ title: spec.title,
61
+ description: spec.description,
62
+ inputFields: Object.keys(spec.inputSchema),
63
+ };
64
+ },
65
+ },
66
+ {
67
+ name: 'specrails_select_project',
68
+ title: 'Select active project',
69
+ description: 'Set the active project so subsequent per-project tools may omit projectId. Pass an id or a path. Pass null to clear.',
70
+ tier: 'read',
71
+ inputSchema: {
72
+ projectId: zod_1.z.string().nullable().optional().describe('Project id to make active, or null to clear'),
73
+ path: zod_1.z.string().optional().describe('Resolve+select a project by filesystem path instead of id'),
74
+ },
75
+ handler: (ctx, args) => {
76
+ if (args.path) {
77
+ const pc = ctx.registry.getContextByPath(String(args.path));
78
+ if (!pc)
79
+ throw new Error(`No project registered at path "${args.path}".`);
80
+ (0, types_1.setActiveProject)(pc.project.id);
81
+ return { active: pc.project.id, name: pc.project.name };
82
+ }
83
+ if (args.projectId === null) {
84
+ (0, types_1.setActiveProject)(null);
85
+ return { active: null };
86
+ }
87
+ const id = args.projectId;
88
+ if (!id)
89
+ throw new Error('Provide a projectId, a path, or null.');
90
+ const pc = (0, types_1.requireProject)(ctx, id);
91
+ (0, types_1.setActiveProject)(pc.project.id);
92
+ return { active: pc.project.id, name: pc.project.name };
93
+ },
94
+ },
95
+ ];
96
+ }
@@ -0,0 +1,83 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.pluginsTools = pluginsTools;
4
+ const zod_1 = require("zod");
5
+ const types_1 = require("./types");
6
+ /**
7
+ * Plugins (Integrations) domain facade. Per-project marketplace of MCP-based
8
+ * integrations (bundled-only in v1). Maps each action to the matching REST
9
+ * endpoint under `/api/projects/:projectId/plugins`.
10
+ *
11
+ * Excluded by design (v1 out of scope): the `uv` prerequisite installer
12
+ * (`/plugins/_prerequisites/:prereq/install`) and the marketplace
13
+ * global-settings mutation (`/plugins/_marketplace/disable`).
14
+ */
15
+ function pluginsTools() {
16
+ return [
17
+ {
18
+ name: 'specrails_plugins',
19
+ title: 'Plugins',
20
+ description: 'List and manage a project\'s MCP-based integration plugins (Integrations). ' +
21
+ 'Actions: list (catalog with status/health/version/drift), preview (dry-run install diff + requirements), ' +
22
+ 'install (write — runs the installer + verify, surgically merges .mcp.json, streams plugin.install_progress; long-running), ' +
23
+ 'uninstall (destructive — reverts contributors, removes owned mcpServers + installed files, drops state), ' +
24
+ 'activate (re-enable an installed-but-off plugin), deactivate (toggle off without uninstalling), ' +
25
+ 'update (apply manifest drift — re-merge owned mcpServers + re-apply contributors), ' +
26
+ 'health (on-demand verify of an installed plugin).',
27
+ hintTier: 'read',
28
+ tier: (a) => {
29
+ const action = a.action;
30
+ if (action === 'uninstall')
31
+ return 'destructive';
32
+ if (['install', 'activate', 'deactivate', 'update'].includes(action))
33
+ return 'write';
34
+ return 'read';
35
+ },
36
+ inputSchema: {
37
+ action: zod_1.z
38
+ .enum(['list', 'preview', 'install', 'uninstall', 'activate', 'deactivate', 'update', 'health'])
39
+ .describe('Operation to perform'),
40
+ projectId: zod_1.z.string().optional().describe('Project id (defaults to the active project)'),
41
+ name: zod_1.z
42
+ .string()
43
+ .optional()
44
+ .describe('Bundled plugin name (required for preview/install/uninstall/activate/deactivate/update/health)'),
45
+ },
46
+ async handler(ctx, args) {
47
+ const base = `${(0, types_1.projectPath)(ctx, args.projectId)}/plugins`;
48
+ const action = args.action;
49
+ const name = args.name;
50
+ const requireName = () => {
51
+ if (!name)
52
+ throw new Error(`Action "${action}" requires a "name" (bundled plugin name).`);
53
+ return encodeURIComponent(name);
54
+ };
55
+ switch (action) {
56
+ case 'list':
57
+ return (0, types_1.apiCall)(ctx, 'GET', base);
58
+ case 'preview':
59
+ return (0, types_1.apiCall)(ctx, 'GET', `${base}/${requireName()}/preview-install`);
60
+ case 'install': {
61
+ const r = await (0, types_1.apiCall)(ctx, 'POST', `${base}/${requireName()}/install`);
62
+ return {
63
+ ...(typeof r === 'object' && r !== null ? r : { result: r }),
64
+ hint: 'Install runs the plugin installer + verify and streams plugin.install_progress / plugin.installed WS events. Use specrails_watch to observe progress, or call action="health" to confirm the plugin verified.',
65
+ };
66
+ }
67
+ case 'uninstall':
68
+ return (0, types_1.apiCall)(ctx, 'DELETE', `${base}/${requireName()}`);
69
+ case 'activate':
70
+ return (0, types_1.apiCall)(ctx, 'POST', `${base}/${requireName()}/activate`);
71
+ case 'deactivate':
72
+ return (0, types_1.apiCall)(ctx, 'POST', `${base}/${requireName()}/deactivate`);
73
+ case 'update':
74
+ return (0, types_1.apiCall)(ctx, 'POST', `${base}/${requireName()}/update`);
75
+ case 'health':
76
+ return (0, types_1.apiCall)(ctx, 'GET', `${base}/${requireName()}/health`);
77
+ default:
78
+ throw new Error(`Unknown action "${action}".`);
79
+ }
80
+ },
81
+ },
82
+ ];
83
+ }
@@ -0,0 +1,62 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.serializeProject = serializeProject;
4
+ exports.projectsTools = projectsTools;
5
+ const zod_1 = require("zod");
6
+ const types_1 = require("./types");
7
+ function serializeProject(p) {
8
+ return {
9
+ id: p.id,
10
+ slug: p.slug,
11
+ name: p.name,
12
+ path: p.path,
13
+ provider: p.provider,
14
+ providers: p.providers,
15
+ addedAt: p.added_at,
16
+ lastSeenAt: p.last_seen_at,
17
+ };
18
+ }
19
+ function projectsTools() {
20
+ return [
21
+ {
22
+ name: 'specrails_projects',
23
+ title: 'Projects',
24
+ description: 'List and inspect registered Specrails projects, resolve a project by filesystem path, or unregister one. ' +
25
+ 'Actions: list, get, resolve (by path), unregister (destructive — removes the project and its workspace).',
26
+ hintTier: 'read',
27
+ tier: (args) => (args.action === 'unregister' ? 'destructive' : 'read'),
28
+ inputSchema: {
29
+ action: zod_1.z.enum(['list', 'get', 'resolve', 'unregister']).describe('Operation to perform'),
30
+ projectId: zod_1.z.string().optional().describe('Project id (for get / unregister)'),
31
+ path: zod_1.z.string().optional().describe('Filesystem path (for resolve)'),
32
+ },
33
+ handler: (ctx, args) => {
34
+ const action = args.action;
35
+ switch (action) {
36
+ case 'list':
37
+ return ctx.registry.listContexts().map((c) => serializeProject(c.project));
38
+ case 'get':
39
+ return serializeProject((0, types_1.requireProject)(ctx, args.projectId).project);
40
+ case 'resolve': {
41
+ const p = args.path;
42
+ if (!p)
43
+ throw new Error('resolve requires a "path".');
44
+ const pc = ctx.registry.getContextByPath(p);
45
+ return pc ? serializeProject(pc.project) : { resolved: false };
46
+ }
47
+ case 'unregister': {
48
+ const id = args.projectId;
49
+ if (!id)
50
+ throw new Error('unregister requires a "projectId".');
51
+ if (!ctx.registry.getContext(id))
52
+ throw new Error(`Unknown projectId "${id}".`);
53
+ ctx.registry.removeProject(id);
54
+ return { ok: true, unregistered: id };
55
+ }
56
+ default:
57
+ throw new Error(`Unknown action "${action}".`);
58
+ }
59
+ },
60
+ },
61
+ ];
62
+ }
@@ -0,0 +1,181 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.railsTools = railsTools;
4
+ const zod_1 = require("zod");
5
+ const types_1 = require("./types");
6
+ /**
7
+ * Rails domain facade. A "rail" is a numbered launch slot per project: it holds
8
+ * a set of assigned ticket IDs plus a mode/profile/engine/name, and launching it
9
+ * spawns the AI pipeline (claude/codex/gemini) over those tickets.
10
+ *
11
+ * Every operation is per-project under /api/projects/:projectId/rails. The
12
+ * launch action is the only cost-incurring / repo-mutating one (ai-spawn, 202);
13
+ * stop is destructive (kills running child process trees + cancels queued jobs).
14
+ */
15
+ function railsTools() {
16
+ return [
17
+ {
18
+ name: 'specrails_rails',
19
+ title: 'Rails',
20
+ description: 'List and configure a project\'s rail launch slots, then launch or stop the AI pipeline for a rail. ' +
21
+ 'A rail holds assigned ticket IDs plus a mode/profile/engine/name. ' +
22
+ 'Actions: list (rails + active jobs/loop runs), set_tickets (assign ticket IDs), set_profile (default agent profile, null=legacy), ' +
23
+ 'set_engine (provider override, null=primary), set_name (display label, null clears), ' +
24
+ 'launch (ai-spawn — spawns claude/codex/gemini CLI job(s) that WRITE CODE, RUN TESTS, COMMIT, and INCUR TOKEN COST; returns 202 with jobId/jobIds/loopRunIds), ' +
25
+ 'stop (destructive — kills all active jobs and loop runs for the rail).',
26
+ hintTier: 'read',
27
+ tier: (a) => {
28
+ const action = a.action;
29
+ if (action === 'stop')
30
+ return 'destructive';
31
+ if (action === 'launch')
32
+ return 'ai-spawn';
33
+ if (action === 'set_tickets' || action === 'set_profile' || action === 'set_engine' || action === 'set_name')
34
+ return 'write';
35
+ return 'read';
36
+ },
37
+ inputSchema: {
38
+ action: zod_1.z
39
+ .enum(['list', 'set_tickets', 'set_profile', 'set_engine', 'set_name', 'launch', 'stop'])
40
+ .describe('Operation to perform'),
41
+ projectId: zod_1.z.string().optional().describe('Project id (defaults to the active project)'),
42
+ railIndex: zod_1.z
43
+ .number()
44
+ .int()
45
+ .min(0)
46
+ .optional()
47
+ .describe('Rail slot index (required for every action except list)'),
48
+ // set_tickets
49
+ ticketIds: zod_1.z
50
+ .array(zod_1.z.number().int())
51
+ .optional()
52
+ .describe('Ticket IDs to assign to the rail (set_tickets — replaces the existing set)'),
53
+ // set_profile
54
+ profileName: zod_1.z
55
+ .string()
56
+ .nullable()
57
+ .optional()
58
+ .describe('Agent profile name; null forces legacy/no-profile mode (set_profile; also optional override for launch)'),
59
+ // set_engine / launch
60
+ aiEngine: zod_1.z
61
+ .string()
62
+ .nullable()
63
+ .optional()
64
+ .describe('AI engine/provider override; null = project primary (set_engine; also optional override for launch). Must be an installed provider.'),
65
+ // set_name
66
+ name: zod_1.z
67
+ .string()
68
+ .nullable()
69
+ .optional()
70
+ .describe('Rail display label (<=60 chars); null/empty clears to default (set_name)'),
71
+ // launch
72
+ mode: zod_1.z
73
+ .enum(['implement', 'batch-implement', 'ultracode', 'loop'])
74
+ .optional()
75
+ .describe('Launch mode (launch; default "implement"). ultracode is Claude-only and runs one job per ticket; loop runs an app-driven loop per ticket.'),
76
+ model: zod_1.z
77
+ .enum(['haiku', 'sonnet', 'opus'])
78
+ .optional()
79
+ .describe('Ultracode Claude model (launch, ultracode mode only). For loop mode, a provider-valid model string.'),
80
+ interactive: zod_1.z
81
+ .boolean()
82
+ .optional()
83
+ .describe('Interactive ultracode session (launch, ultracode + Claude only; requires the interactive-jobs feature)'),
84
+ loopId: zod_1.z
85
+ .string()
86
+ .optional()
87
+ .describe('Loop id to run (launch). Factory ids (e.g. "factory:implement") map to a legacy mode; a custom published loop id keeps mode="loop".'),
88
+ reasoning_effort: zod_1.z
89
+ .enum(['low', 'medium', 'high'])
90
+ .optional()
91
+ .describe('Reasoning-effort tier for loop launches (launch, loop mode)'),
92
+ },
93
+ async handler(ctx, args) {
94
+ const base = `${(0, types_1.projectPath)(ctx, args.projectId)}/rails`;
95
+ const action = args.action;
96
+ const requireRailIndex = () => {
97
+ const idx = args.railIndex;
98
+ if (typeof idx !== 'number' || !Number.isInteger(idx) || idx < 0) {
99
+ throw new Error(`Action "${action}" requires a non-negative integer "railIndex".`);
100
+ }
101
+ return idx;
102
+ };
103
+ switch (action) {
104
+ case 'list':
105
+ return (0, types_1.apiCall)(ctx, 'GET', base);
106
+ case 'set_tickets': {
107
+ const railIndex = requireRailIndex();
108
+ const ticketIds = args.ticketIds;
109
+ if (!Array.isArray(ticketIds)) {
110
+ throw new Error('set_tickets requires "ticketIds" (an array of numbers).');
111
+ }
112
+ const body = { ticketIds };
113
+ if (args.mode !== undefined)
114
+ body.mode = args.mode;
115
+ if ('profileName' in args && args.profileName !== undefined)
116
+ body.profileName = args.profileName;
117
+ if ('aiEngine' in args && args.aiEngine !== undefined)
118
+ body.aiEngine = args.aiEngine;
119
+ return (0, types_1.apiCall)(ctx, 'PUT', `${base}/${railIndex}/tickets`, body);
120
+ }
121
+ case 'set_profile': {
122
+ const railIndex = requireRailIndex();
123
+ if (!('profileName' in args)) {
124
+ throw new Error('set_profile requires "profileName" (string or null).');
125
+ }
126
+ return (0, types_1.apiCall)(ctx, 'PUT', `${base}/${railIndex}/profile`, {
127
+ profileName: (args.profileName ?? null),
128
+ });
129
+ }
130
+ case 'set_engine': {
131
+ const railIndex = requireRailIndex();
132
+ if (!('aiEngine' in args)) {
133
+ throw new Error('set_engine requires "aiEngine" (string or null).');
134
+ }
135
+ return (0, types_1.apiCall)(ctx, 'PUT', `${base}/${railIndex}/engine`, {
136
+ aiEngine: (args.aiEngine ?? null),
137
+ });
138
+ }
139
+ case 'set_name': {
140
+ const railIndex = requireRailIndex();
141
+ if (!('name' in args)) {
142
+ throw new Error('set_name requires "name" (string or null).');
143
+ }
144
+ return (0, types_1.apiCall)(ctx, 'PUT', `${base}/${railIndex}/name`, {
145
+ name: (args.name ?? null),
146
+ });
147
+ }
148
+ case 'launch': {
149
+ const railIndex = requireRailIndex();
150
+ const body = {};
151
+ if (args.mode !== undefined)
152
+ body.mode = args.mode;
153
+ if ('profileName' in args && args.profileName !== undefined)
154
+ body.profileName = args.profileName;
155
+ if ('aiEngine' in args && args.aiEngine !== undefined)
156
+ body.aiEngine = args.aiEngine;
157
+ if (args.model !== undefined)
158
+ body.model = args.model;
159
+ if (args.interactive !== undefined)
160
+ body.interactive = args.interactive;
161
+ if (args.loopId !== undefined)
162
+ body.loopId = args.loopId;
163
+ if (args.reasoning_effort !== undefined)
164
+ body.reasoning_effort = args.reasoning_effort;
165
+ const r = await (0, types_1.apiCall)(ctx, 'POST', `${base}/${railIndex}/launch`, body);
166
+ return {
167
+ ...r,
168
+ hint: 'Launch accepted (202). Use specrails_watch with the returned jobId/jobIds (or loopRunIds for loop mode) to await completion. Live output streams over the job WS.',
169
+ };
170
+ }
171
+ case 'stop': {
172
+ const railIndex = requireRailIndex();
173
+ return (0, types_1.apiCall)(ctx, 'POST', `${base}/${railIndex}/stop`);
174
+ }
175
+ default:
176
+ throw new Error(`Unknown action "${action}".`);
177
+ }
178
+ },
179
+ },
180
+ ];
181
+ }