@chrisjowen/wheelhouse 0.17.1 → 0.18.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 (387) hide show
  1. package/README.md +2 -2
  2. package/build/client/_app/immutable/assets/{0.DNJoTEVa.css → 0.Dyflbqc4.css} +1 -1
  3. package/build/client/_app/immutable/assets/0.Dyflbqc4.css.br +0 -0
  4. package/build/client/_app/immutable/assets/{0.DNJoTEVa.css.gz → 0.Dyflbqc4.css.gz} +0 -0
  5. package/build/client/_app/immutable/chunks/{_8osrypQ.js → 0RGfo0js.js} +1 -1
  6. package/build/client/_app/immutable/chunks/0RGfo0js.js.br +2 -0
  7. package/build/client/_app/immutable/chunks/0RGfo0js.js.gz +0 -0
  8. package/build/client/_app/immutable/chunks/{CF9qC7cA.js → B13jYnr5.js} +1 -1
  9. package/build/client/_app/immutable/chunks/B13jYnr5.js.br +0 -0
  10. package/build/client/_app/immutable/chunks/B13jYnr5.js.gz +0 -0
  11. package/build/client/_app/immutable/chunks/{DwBYQnih.js → B5OMEixy.js} +1 -1
  12. package/build/client/_app/immutable/chunks/B5OMEixy.js.br +0 -0
  13. package/build/client/_app/immutable/chunks/B5OMEixy.js.gz +0 -0
  14. package/build/client/_app/immutable/chunks/{iI4tqZHC.js → BDhezwGC.js} +1 -1
  15. package/build/client/_app/immutable/chunks/BDhezwGC.js.br +0 -0
  16. package/build/client/_app/immutable/chunks/BDhezwGC.js.gz +0 -0
  17. package/build/client/_app/immutable/chunks/{CxexnUzw.js → Bd8l0yTM.js} +1 -1
  18. package/build/client/_app/immutable/chunks/Bd8l0yTM.js.br +0 -0
  19. package/build/client/_app/immutable/chunks/Bd8l0yTM.js.gz +0 -0
  20. package/build/client/_app/immutable/chunks/{Ch7J5mLH.js → BisZnsml.js} +1 -1
  21. package/build/client/_app/immutable/chunks/BisZnsml.js.br +0 -0
  22. package/build/client/_app/immutable/chunks/BisZnsml.js.gz +0 -0
  23. package/build/client/_app/immutable/chunks/{BS3n5c7l.js → Bl_aeMq-.js} +1 -1
  24. package/build/client/_app/immutable/chunks/Bl_aeMq-.js.br +0 -0
  25. package/build/client/_app/immutable/chunks/Bl_aeMq-.js.gz +0 -0
  26. package/build/client/_app/immutable/chunks/{RedPhL9b.js → Bm06it9w.js} +1 -1
  27. package/build/client/_app/immutable/chunks/Bm06it9w.js.br +0 -0
  28. package/build/client/_app/immutable/chunks/Bm06it9w.js.gz +0 -0
  29. package/build/client/_app/immutable/chunks/{DkntkkRH.js → BvPKyGA8.js} +1 -1
  30. package/build/client/_app/immutable/chunks/BvPKyGA8.js.br +0 -0
  31. package/build/client/_app/immutable/chunks/BvPKyGA8.js.gz +0 -0
  32. package/build/client/_app/immutable/chunks/{Bgm2YDEc.js → C8rIEWKQ.js} +1 -1
  33. package/build/client/_app/immutable/chunks/C8rIEWKQ.js.br +0 -0
  34. package/build/client/_app/immutable/chunks/C8rIEWKQ.js.gz +0 -0
  35. package/build/client/_app/immutable/chunks/{ClSB0siN.js → ClopdZ_7.js} +1 -1
  36. package/build/client/_app/immutable/chunks/ClopdZ_7.js.br +0 -0
  37. package/build/client/_app/immutable/chunks/ClopdZ_7.js.gz +0 -0
  38. package/build/client/_app/immutable/chunks/{CLADX83T.js → Cv4HO3U0.js} +1 -1
  39. package/build/client/_app/immutable/chunks/Cv4HO3U0.js.br +0 -0
  40. package/build/client/_app/immutable/chunks/Cv4HO3U0.js.gz +0 -0
  41. package/build/client/_app/immutable/chunks/{D8F9xgmh.js → Cwq50RB4.js} +1 -1
  42. package/build/client/_app/immutable/chunks/Cwq50RB4.js.br +0 -0
  43. package/build/client/_app/immutable/chunks/Cwq50RB4.js.gz +0 -0
  44. package/build/client/_app/immutable/chunks/{DP7xDWnQ.js → DJmeKpkq.js} +1 -1
  45. package/build/client/_app/immutable/chunks/DJmeKpkq.js.br +0 -0
  46. package/build/client/_app/immutable/chunks/DJmeKpkq.js.gz +0 -0
  47. package/build/client/_app/immutable/chunks/{CXsGgEzT.js → Drqp3nkL.js} +1 -1
  48. package/build/client/_app/immutable/chunks/Drqp3nkL.js.br +0 -0
  49. package/build/client/_app/immutable/chunks/Drqp3nkL.js.gz +0 -0
  50. package/build/client/_app/immutable/chunks/{CU0ZJcdF.js → HCiUQtkc.js} +2 -2
  51. package/build/client/_app/immutable/chunks/HCiUQtkc.js.br +0 -0
  52. package/build/client/_app/immutable/chunks/HCiUQtkc.js.gz +0 -0
  53. package/build/client/_app/immutable/chunks/{CS4t4atW.js → V46v89bT.js} +1 -1
  54. package/build/client/_app/immutable/chunks/V46v89bT.js.br +0 -0
  55. package/build/client/_app/immutable/chunks/V46v89bT.js.gz +0 -0
  56. package/build/client/_app/immutable/chunks/{BQPyzYAS.js → Y3845wkB.js} +1 -1
  57. package/build/client/_app/immutable/chunks/Y3845wkB.js.br +0 -0
  58. package/build/client/_app/immutable/chunks/Y3845wkB.js.gz +0 -0
  59. package/build/client/_app/immutable/chunks/{CGRtmaS4.js → gS_jJyWs.js} +1 -1
  60. package/build/client/_app/immutable/chunks/gS_jJyWs.js.br +0 -0
  61. package/build/client/_app/immutable/chunks/gS_jJyWs.js.gz +0 -0
  62. package/build/client/_app/immutable/chunks/{CH2Y0BVE.js → rWDJOr9L.js} +1 -1
  63. package/build/client/_app/immutable/chunks/rWDJOr9L.js.br +0 -0
  64. package/build/client/_app/immutable/chunks/rWDJOr9L.js.gz +0 -0
  65. package/build/client/_app/immutable/entry/{app.DzMOOaXE.js → app.C_f-0Vea.js} +2 -2
  66. package/build/client/_app/immutable/entry/app.C_f-0Vea.js.br +0 -0
  67. package/build/client/_app/immutable/entry/app.C_f-0Vea.js.gz +0 -0
  68. package/build/client/_app/immutable/entry/start.CmPU2liD.js +1 -0
  69. package/build/client/_app/immutable/entry/start.CmPU2liD.js.br +0 -0
  70. package/build/client/_app/immutable/entry/start.CmPU2liD.js.gz +0 -0
  71. package/build/client/_app/immutable/nodes/{0.BIHpRnqw.js → 0.CycGUKhI.js} +1 -1
  72. package/build/client/_app/immutable/nodes/0.CycGUKhI.js.br +0 -0
  73. package/build/client/_app/immutable/nodes/0.CycGUKhI.js.gz +0 -0
  74. package/build/client/_app/immutable/nodes/{1.BJIoIsvP.js → 1.70vrwjqS.js} +1 -1
  75. package/build/client/_app/immutable/nodes/1.70vrwjqS.js.br +0 -0
  76. package/build/client/_app/immutable/nodes/1.70vrwjqS.js.gz +0 -0
  77. package/build/client/_app/immutable/nodes/{10.DRDVy09M.js → 10.CG7LxHir.js} +1 -1
  78. package/build/client/_app/immutable/nodes/10.CG7LxHir.js.br +0 -0
  79. package/build/client/_app/immutable/nodes/10.CG7LxHir.js.gz +0 -0
  80. package/build/client/_app/immutable/nodes/{11.B2EhouGG.js → 11.CvQ4cyM3.js} +1 -1
  81. package/build/client/_app/immutable/nodes/11.CvQ4cyM3.js.br +0 -0
  82. package/build/client/_app/immutable/nodes/11.CvQ4cyM3.js.gz +0 -0
  83. package/build/client/_app/immutable/nodes/{12.5fuIl1It.js → 12.D9IHJjN9.js} +1 -1
  84. package/build/client/_app/immutable/nodes/12.D9IHJjN9.js.br +0 -0
  85. package/build/client/_app/immutable/nodes/12.D9IHJjN9.js.gz +0 -0
  86. package/build/client/_app/immutable/nodes/{13.BHd8lAXB.js → 13.D-hvVuS1.js} +1 -1
  87. package/build/client/_app/immutable/nodes/13.D-hvVuS1.js.br +0 -0
  88. package/build/client/_app/immutable/nodes/13.D-hvVuS1.js.gz +0 -0
  89. package/build/client/_app/immutable/nodes/{14.DgsN2-TN.js → 14.DfUdqoEO.js} +1 -1
  90. package/build/client/_app/immutable/nodes/14.DfUdqoEO.js.br +0 -0
  91. package/build/client/_app/immutable/nodes/14.DfUdqoEO.js.gz +0 -0
  92. package/build/client/_app/immutable/nodes/{15.CPHkfcQw.js → 15.CZRsd2Eg.js} +1 -1
  93. package/build/client/_app/immutable/nodes/15.CZRsd2Eg.js.br +0 -0
  94. package/build/client/_app/immutable/nodes/15.CZRsd2Eg.js.gz +0 -0
  95. package/build/client/_app/immutable/nodes/{16.CrpxQoZ7.js → 16.qfrdNFMy.js} +1 -1
  96. package/build/client/_app/immutable/nodes/16.qfrdNFMy.js.br +0 -0
  97. package/build/client/_app/immutable/nodes/16.qfrdNFMy.js.gz +0 -0
  98. package/build/client/_app/immutable/nodes/{17.B83y7TTZ.js → 17.D83W_Tta.js} +1 -1
  99. package/build/client/_app/immutable/nodes/17.D83W_Tta.js.br +0 -0
  100. package/build/client/_app/immutable/nodes/17.D83W_Tta.js.gz +0 -0
  101. package/build/client/_app/immutable/nodes/{19.BGzbdUG8.js → 19.BzcQyaMT.js} +1 -1
  102. package/build/client/_app/immutable/nodes/19.BzcQyaMT.js.br +0 -0
  103. package/build/client/_app/immutable/nodes/19.BzcQyaMT.js.gz +0 -0
  104. package/build/client/_app/immutable/nodes/{2.B_zXlRDw.js → 2.C5dTKKEn.js} +1 -1
  105. package/build/client/_app/immutable/nodes/2.C5dTKKEn.js.br +0 -0
  106. package/build/client/_app/immutable/nodes/2.C5dTKKEn.js.gz +0 -0
  107. package/build/client/_app/immutable/nodes/{20.CQE-Zjw-.js → 20.HovxKElE.js} +1 -1
  108. package/build/client/_app/immutable/nodes/20.HovxKElE.js.br +0 -0
  109. package/build/client/_app/immutable/nodes/20.HovxKElE.js.gz +0 -0
  110. package/build/client/_app/immutable/nodes/{21.BjSp2mZI.js → 21.2vXCaqsr.js} +1 -1
  111. package/build/client/_app/immutable/nodes/21.2vXCaqsr.js.br +0 -0
  112. package/build/client/_app/immutable/nodes/21.2vXCaqsr.js.gz +0 -0
  113. package/build/client/_app/immutable/nodes/{22.BycUFjCM.js → 22.C2_CQQkD.js} +1 -1
  114. package/build/client/_app/immutable/nodes/22.C2_CQQkD.js.br +0 -0
  115. package/build/client/_app/immutable/nodes/22.C2_CQQkD.js.gz +0 -0
  116. package/build/client/_app/immutable/nodes/{23.BjOud3nL.js → 23.DLyV0afL.js} +1 -1
  117. package/build/client/_app/immutable/nodes/23.DLyV0afL.js.br +0 -0
  118. package/build/client/_app/immutable/nodes/23.DLyV0afL.js.gz +0 -0
  119. package/build/client/_app/immutable/nodes/{24.DmaWt7EU.js → 24.B3x35Hk8.js} +1 -1
  120. package/build/client/_app/immutable/nodes/24.B3x35Hk8.js.br +0 -0
  121. package/build/client/_app/immutable/nodes/24.B3x35Hk8.js.gz +0 -0
  122. package/build/client/_app/immutable/nodes/25.nwMZWq7u.js +20 -0
  123. package/build/client/_app/immutable/nodes/25.nwMZWq7u.js.br +0 -0
  124. package/build/client/_app/immutable/nodes/25.nwMZWq7u.js.gz +0 -0
  125. package/build/client/_app/immutable/nodes/{26.BxG4S8mB.js → 26.Djo0UcCH.js} +1 -1
  126. package/build/client/_app/immutable/nodes/26.Djo0UcCH.js.br +0 -0
  127. package/build/client/_app/immutable/nodes/26.Djo0UcCH.js.gz +0 -0
  128. package/build/client/_app/immutable/nodes/{28.Ds4FDR_a.js → 28.SqN60QfL.js} +1 -1
  129. package/build/client/_app/immutable/nodes/28.SqN60QfL.js.br +0 -0
  130. package/build/client/_app/immutable/nodes/28.SqN60QfL.js.gz +0 -0
  131. package/build/client/_app/immutable/nodes/{3.CldWfpKa.js → 3.CNDDXR-R.js} +1 -1
  132. package/build/client/_app/immutable/nodes/3.CNDDXR-R.js.br +0 -0
  133. package/build/client/_app/immutable/nodes/3.CNDDXR-R.js.gz +0 -0
  134. package/build/client/_app/immutable/nodes/{4.Ds0FcslK.js → 4.Dajo6qs6.js} +1 -1
  135. package/build/client/_app/immutable/nodes/4.Dajo6qs6.js.br +0 -0
  136. package/build/client/_app/immutable/nodes/4.Dajo6qs6.js.gz +0 -0
  137. package/build/client/_app/immutable/nodes/{6.CvP4hVA3.js → 6.BHt0DwZF.js} +1 -1
  138. package/build/client/_app/immutable/nodes/6.BHt0DwZF.js.br +0 -0
  139. package/build/client/_app/immutable/nodes/6.BHt0DwZF.js.gz +0 -0
  140. package/build/client/_app/immutable/nodes/{7.Ca_DVOMc.js → 7.BIfa9MqV.js} +1 -1
  141. package/build/client/_app/immutable/nodes/7.BIfa9MqV.js.br +0 -0
  142. package/build/client/_app/immutable/nodes/7.BIfa9MqV.js.gz +0 -0
  143. package/build/client/_app/immutable/nodes/{8.D8JqGvkd.js → 8.CKbZrwQ8.js} +1 -1
  144. package/build/client/_app/immutable/nodes/8.CKbZrwQ8.js.br +0 -0
  145. package/build/client/_app/immutable/nodes/8.CKbZrwQ8.js.gz +0 -0
  146. package/build/client/_app/immutable/nodes/{9.CHSFcAbh.js → 9.BbThPsu4.js} +1 -1
  147. package/build/client/_app/immutable/nodes/9.BbThPsu4.js.br +0 -0
  148. package/build/client/_app/immutable/nodes/9.BbThPsu4.js.gz +0 -0
  149. package/build/client/_app/version.json +1 -1
  150. package/build/client/_app/version.json.br +0 -0
  151. package/build/client/_app/version.json.gz +0 -0
  152. package/build/handler.js +4 -4
  153. package/build/index.js +4 -4
  154. package/build/server/chunks/chunks/{detail.js-T1brxxWW.js → detail.js-K2fb6vUl.js} +2 -2
  155. package/build/server/chunks/chunks/{feedback.js-0cB22LBt.js → feedback.js-gBLi4FYP.js} +2 -2
  156. package/build/server/chunks/chunks/{harness.js-DPojOlFJ.js → harness.js-C1CYCy4c.js} +2 -2
  157. package/build/server/chunks/chunks/{internal.js-BJRpqxxM.js → internal.js-BOM77MfQ.js} +3 -3
  158. package/build/server/chunks/chunks/{keychain.js-CsTOqhf4.js → keychain.js-DDSo_IW8.js} +2 -2
  159. package/build/server/chunks/chunks/{marketplace-service.js-CckS3apE.js → marketplace-service.js-QhO4MhZa.js} +2 -2
  160. package/build/server/chunks/chunks/{page.js-D5V2PN2q.js → page.js-6KzOUc5P.js} +2 -2
  161. package/build/server/chunks/chunks/{previewhelper2.js-DRcdOpNv.js → previewhelper2.js-Dza1zgQB.js} +2 -2
  162. package/build/server/chunks/chunks/{repo.js-CsdCOmUL.js → repo.js-Aq4DOLtb.js} +2 -2
  163. package/build/server/chunks/chunks/{runtime.js-CbmzOl0F.js → runtime.js-DKYCLRYC.js} +12396 -11676
  164. package/build/server/chunks/chunks/{service.js-DztM8MY5.js → service.js-D9kA6Dvq.js} +2 -2
  165. package/build/server/chunks/chunks/{service2.js-DQccL6zz.js → service2.js-Dx7TTUyO.js} +141 -441
  166. package/build/server/chunks/chunks/{starter.js-ROzdTBeO.js → starter.js-BjLPYDEU.js} +2 -2
  167. package/build/server/chunks/chunks/terminal.js-Cr5N1hVN.js +189 -0
  168. package/build/server/chunks/chunks/{view.js-BDo4J83f.js → view.js-D6_Y6e4W.js} +2 -2
  169. package/build/server/chunks/entries/endpoints/api/apps/_op_/{_server.ts.js-BTTHbZK6.js → _server.ts.js-C8-Bqwz2.js} +5 -5
  170. package/build/server/chunks/entries/endpoints/api/cloud/{_server.ts.js-m9cTbE-7.js → _server.ts.js-iHvZiw6L.js} +3 -3
  171. package/build/server/chunks/entries/endpoints/api/cloud/previews/{_server.ts.js-z8BbPJ2P.js → _server.ts.js-C2083EnL.js} +5 -5
  172. package/build/server/chunks/entries/endpoints/api/events/{_server.ts.js-BniUpesu.js → _server.ts.js-DXerC_lz.js} +5 -5
  173. package/build/server/chunks/entries/endpoints/api/files/{_server.ts.js-B0WcXQJH.js → _server.ts.js-DkrVdgsY.js} +5 -5
  174. package/build/server/chunks/entries/endpoints/api/firstmate/chat/{_server.ts.js-CncNeTwM.js → _server.ts.js-itkq-Zhc.js} +5 -5
  175. package/build/server/chunks/entries/endpoints/api/firstmate/commands/{_server.ts.js-hnvcy9Ia.js → _server.ts.js-BClrQ76Y.js} +5 -5
  176. package/build/server/chunks/entries/endpoints/api/firstmate/dismiss/{_server.ts.js-BQgc12gv.js → _server.ts.js-CSaP0hys.js} +5 -5
  177. package/build/server/chunks/entries/endpoints/api/firstmate/input/{_server.ts.js-Cpq1OUlv.js → _server.ts.js-Cpm8-Jaf.js} +5 -5
  178. package/build/server/chunks/entries/endpoints/api/firstmate/interrupt/{_server.ts.js-DcduvTz-.js → _server.ts.js-DxSC3HLK.js} +5 -5
  179. package/build/server/chunks/entries/endpoints/api/firstmate/messages/{_server.ts.js-r_OTtndR.js → _server.ts.js-CITZvyir.js} +5 -5
  180. package/build/server/chunks/entries/endpoints/api/firstmate/pick/{_server.ts.js-DRc0m-xP.js → _server.ts.js-7uCkkloP.js} +5 -5
  181. package/build/server/chunks/entries/endpoints/api/firstmate/reactions/{_server.ts.js-DBrNAwQy.js → _server.ts.js-RSm-5UF2.js} +5 -5
  182. package/build/server/chunks/entries/endpoints/api/firstmate/start/{_server.ts.js-D1Q8V-y_.js → _server.ts.js-CbHftl32.js} +5 -5
  183. package/build/server/chunks/entries/endpoints/api/fleet/{_server.ts.js-cN8CO68M.js → _server.ts.js-DTbyWHA5.js} +5 -5
  184. package/build/server/chunks/entries/endpoints/api/gateway/{_server.ts.js-BSpvCzuX.js → _server.ts.js-Dgj64C-8.js} +5 -5
  185. package/build/server/chunks/entries/endpoints/api/health/{_server.ts.js-Cs9IYII5.js → _server.ts.js-8Ao3NA-E.js} +5 -5
  186. package/build/server/chunks/entries/endpoints/api/inbox/{_server.ts.js-D2iFH361.js → _server.ts.js-DGBE7UIq.js} +5 -5
  187. package/build/server/chunks/entries/endpoints/api/inbox/report/{_server.ts.js-BnZZNGqp.js → _server.ts.js-DqkXU31r.js} +5 -5
  188. package/build/server/chunks/entries/endpoints/api/insights/{_server.ts.js-6-pUqSbs.js → _server.ts.js-DVanxkdv.js} +5 -5
  189. package/build/server/chunks/entries/endpoints/api/plugins/_plugin_/config/{_server.ts.js-BRHI8EzR.js → _server.ts.js-Cm68Rf5I.js} +5 -5
  190. package/build/server/chunks/entries/endpoints/api/plugins/_plugin_/feedback/{_server.ts.js-D75GJhqf.js → _server.ts.js-3OGDAdpk.js} +6 -6
  191. package/build/server/chunks/entries/endpoints/api/plugins/_plugin_/feedback/summary/{_server.ts.js-DXlq6GNe.js → _server.ts.js-CFU80BaE.js} +7 -7
  192. package/build/server/chunks/entries/endpoints/api/plugins/_plugin_/icon/_icon_/{_server.ts.js-DzCq67Pq.js → _server.ts.js-KWWnKNbi.js} +5 -5
  193. package/build/server/chunks/entries/endpoints/api/plugins/_plugin_/load/{_server.ts.js-DP4Br_Kb.js → _server.ts.js-B_5x0zJS.js} +2 -2
  194. package/build/server/chunks/entries/endpoints/api/plugins/_plugin_/ui/_...path_/{_server.ts.js-BTZibvW1.js → _server.ts.js-C90RNY_X.js} +5 -5
  195. package/build/server/chunks/entries/endpoints/api/plugins/_plugin_/update/{_server.ts.js-BVEiTedk.js → _server.ts.js-DvGxNP7H.js} +2 -2
  196. package/build/server/chunks/entries/endpoints/api/plugins/{_server.ts.js-BARKIuL9.js → _server.ts.js-CiLDpQsQ.js} +5 -5
  197. package/build/server/chunks/entries/endpoints/api/plugins/inspect/{_server.ts.js-vXn-DxW7.js → _server.ts.js-B1XZhaia.js} +2 -2
  198. package/build/server/chunks/entries/endpoints/api/plugins/install/{_server.ts.js-BrTsfhpU.js → _server.ts.js-DSD7vM9f.js} +2 -2
  199. package/build/server/chunks/entries/endpoints/api/plugins/marketplace/{_server.ts.js-uLUVa1Yc.js → _server.ts.js-CSXJmx4K.js} +6 -6
  200. package/build/server/chunks/entries/endpoints/api/plugins/marketplace/icon/_name_/{_server.ts.js-fFGC33td.js → _server.ts.js-CBscduVo.js} +6 -6
  201. package/build/server/chunks/entries/endpoints/api/plugins/marketplace/registries/{_server.ts.js-CV30SKJH.js → _server.ts.js-CbuLtoHm.js} +6 -6
  202. package/build/server/chunks/entries/endpoints/api/plugins/roles/{_server.ts.js-BmywjWsD.js → _server.ts.js-Dwfzypry.js} +5 -5
  203. package/build/server/chunks/entries/endpoints/api/plugins/updates/{_server.ts.js-C928jxXA.js → _server.ts.js-B5BKYa3M.js} +2 -2
  204. package/build/server/chunks/entries/endpoints/api/previews/check/{_server.ts.js-DsVDHPoG.js → _server.ts.js-C4c7W5Q_.js} +5 -5
  205. package/build/server/chunks/entries/endpoints/api/projects/_id_/passage/{_server.ts.js-B5kai_f_.js → _server.ts.js-D6V8uWHn.js} +6 -6
  206. package/build/server/chunks/entries/endpoints/api/projects/_id_/passage/commands/{_server.ts.js-DFdhVYKr.js → _server.ts.js-B2ihTXgb.js} +6 -6
  207. package/build/server/chunks/entries/endpoints/api/projects/_id_/passage/consent/{_server.ts.js-C3rHPgm9.js → _server.ts.js-kXH0W1Ky.js} +6 -6
  208. package/build/server/chunks/entries/endpoints/api/projects/_id_/passage/draft/{_server.ts.js-GMslvRRG.js → _server.ts.js-DzwBz0wz.js} +6 -6
  209. package/build/server/chunks/entries/endpoints/api/projects/_id_/passage/file/{_server.ts.js-G6S2vjwB.js → _server.ts.js-uTK3V5EE.js} +6 -6
  210. package/build/server/chunks/entries/endpoints/api/projects/_id_/passage/test/{_server.ts.js-nDbd4-FQ.js → _server.ts.js-Cl4zIULt.js} +6 -6
  211. package/build/server/chunks/entries/endpoints/api/second-mates/_id_/peek/{_server.ts.js-v9aqCXY5.js → _server.ts.js-DqjxxFau.js} +5 -5
  212. package/build/server/chunks/entries/endpoints/api/services/{_server.ts.js-BLxZZ6h-.js → _server.ts.js-dVN9ikOu.js} +5 -5
  213. package/build/server/chunks/entries/endpoints/api/setup/{_server.ts.js-BViJ-Ufk.js → _server.ts.js-_iOzae7t.js} +22 -9
  214. package/build/server/chunks/entries/endpoints/api/slots/{_server.ts.js-T0HJn3Nc.js → _server.ts.js-XMhnf3Ej.js} +5 -5
  215. package/build/server/chunks/entries/endpoints/api/tasks/_id_/{_server.ts.js-DN9vhG-X.js → _server.ts.js-KZTObDbB.js} +6 -6
  216. package/build/server/chunks/entries/endpoints/api/tasks/_id_/artifacts/_...name_/{_server.ts.js-azR55GM-.js → _server.ts.js-DyjUgwF7.js} +5 -5
  217. package/build/server/chunks/entries/endpoints/api/tasks/_id_/diff/{_server.ts.js-NfTPilV6.js → _server.ts.js-CalJli32.js} +5 -5
  218. package/build/server/chunks/entries/endpoints/api/tasks/_id_/output/{_server.ts.js-DzTACS2K.js → _server.ts.js-DWPP0yu8.js} +5 -5
  219. package/build/server/chunks/entries/endpoints/api/tasks/_id_/preview/{_server.ts.js-iObKq15r.js → _server.ts.js-0Nyn7nbY.js} +5 -5
  220. package/build/server/chunks/entries/endpoints/api/tasks/_id_/preview/helper/{_server.ts.js-CFL0gv8m.js → _server.ts.js-3z5OVCPe.js} +6 -6
  221. package/build/server/chunks/entries/endpoints/api/vault/{_server.ts.js-CxnJ6MH1.js → _server.ts.js-AbPbPvOK.js} +5 -5
  222. package/build/server/chunks/entries/endpoints/api/wheelhouse/source/{_server.ts.js-BzHUulBR.js → _server.ts.js-D029CrEh.js} +2 -2
  223. package/build/server/chunks/entries/endpoints/api/wheelhouse/update/{_server.ts.js-CwIEgYLU.js → _server.ts.js-BfHTqL2O.js} +2 -2
  224. package/build/server/chunks/entries/endpoints/api/wheelhouse/upgrade/{_server.ts.js-BfV0Rwjv.js → _server.ts.js-CIRed7Ae.js} +2 -2
  225. package/build/server/chunks/entries/endpoints/tasks/_id_/review/{_server.ts.js-D0M-kf3z.js → _server.ts.js-CvvKgDa5.js} +5 -5
  226. package/build/server/chunks/entries/{hooks.server.js-BK27kVep.js → hooks.server.js-C9TJKrED.js} +5 -5
  227. package/build/server/chunks/entries/pages/{_layout.server.ts.js-thMV7ofo.js → _layout.server.ts.js-BfjTrg6R.js} +2 -2
  228. package/build/server/chunks/entries/pages/{_page.server.ts.js-IJJCfEOr.js → _page.server.ts.js-BFfRDA3t.js} +2 -2
  229. package/build/server/chunks/entries/pages/{_page.svelte.js-DK0vMDpM.js → _page.svelte.js-dxbEuRWy.js} +2 -2
  230. package/build/server/chunks/entries/pages/decisions/{_page.server.ts.js-BknW8CoP.js → _page.server.ts.js-aZNQQOb5.js} +2 -2
  231. package/build/server/chunks/entries/pages/deck/{_page.server.ts.js-FcsedjYb.js → _page.server.ts.js-CLBsxhmZ.js} +2 -2
  232. package/build/server/chunks/entries/pages/files/{_page.server.ts.js-NxhxpluO.js → _page.server.ts.js-Dtrn3Jt8.js} +2 -2
  233. package/build/server/chunks/entries/pages/harbour/{_page.server.ts.js-D0vCnVfw.js → _page.server.ts.js-DYrU0BeU.js} +2 -2
  234. package/build/server/chunks/entries/pages/headroom/{_page.server.ts.js-8pe9nMCl.js → _page.server.ts.js-UKBrFpbo.js} +2 -2
  235. package/build/server/chunks/entries/pages/inbox/{_page.server.ts.js-D5ACh022.js → _page.server.ts.js-COlncgCa.js} +2 -2
  236. package/build/server/chunks/entries/pages/plugins/_plugin_/_page_/{_page.server.ts.js-BKpNXqUB.js → _page.server.ts.js-Bay2qA2Q.js} +2 -2
  237. package/build/server/chunks/entries/pages/projects/_id_/{_page.server.ts.js-DKtUeDFH.js → _page.server.ts.js-CU7ds9LA.js} +3 -3
  238. package/build/server/chunks/entries/pages/projects/_id_/_plugin_/_tab_/{_page.server.ts.js-CAfpJ8z4.js → _page.server.ts.js-BGGSKQqb.js} +3 -3
  239. package/build/server/chunks/entries/pages/projects/_id_/passage/{_page.server.ts.js-DhvAOslS.js → _page.server.ts.js-CnSUSATt.js} +4 -4
  240. package/build/server/chunks/entries/pages/projects/_id_/passage/edit/{_page.server.ts.js-BbR8eGg8.js → _page.server.ts.js-_7cU19E_.js} +2 -2
  241. package/build/server/chunks/entries/pages/remotes/{_page.server.ts.js-CFi9Cpz4.js → _page.server.ts.js-C1Yxudql.js} +2 -2
  242. package/build/server/chunks/entries/pages/settings/cloud/{_page.server.ts.js-CGyBG4Yp.js → _page.server.ts.js-DTNE52aZ.js} +2 -2
  243. package/build/server/chunks/entries/pages/settings/gateway/{_page.server.ts.js-Bh0E2kwq.js → _page.server.ts.js-CrhYOE-D.js} +2 -2
  244. package/build/server/chunks/entries/pages/settings/plugins/{_page.server.ts.js-DcSZoBEC.js → _page.server.ts.js-CifBaqFj.js} +2 -2
  245. package/build/server/chunks/entries/pages/settings/plugins/_plugin_/{_page.server.ts.js-v3Tp8x_0.js → _page.server.ts.js-EKuElYxp.js} +2 -2
  246. package/build/server/chunks/entries/pages/settings/setup/{_page.server.ts.js-BnpgnteD.js → _page.server.ts.js-BF8rdJhn.js} +2 -2
  247. package/build/server/chunks/entries/pages/settings/update/{_page.server.ts.js-DQfv8ZWG.js → _page.server.ts.js-CrElCh4A.js} +2 -2
  248. package/build/server/chunks/entries/pages/setup/{_page.server.ts.js-CvG2Lr9C.js → _page.server.ts.js-wycRiBir.js} +3 -3
  249. package/build/server/chunks/entries/pages/setup/{_page.svelte.js-BZsw7k9z.js → _page.svelte.js-C1CXNUmI.js} +206 -33
  250. package/build/server/chunks/entries/pages/tasks/_id_/{_page.server.ts.js-_ivyEUli.js → _page.server.ts.js-CYQPki7W.js} +3 -3
  251. package/build/server/chunks/entries/pages/tasks/_id_/doc/{_page.server.ts.js-CSJ4X_eg.js → _page.server.ts.js-ecgyPy_T.js} +2 -2
  252. package/build/server/chunks/entries/pages/time/{_page.server.ts.js-CUc80zxD.js → _page.server.ts.js-DSQc-xWi.js} +2 -2
  253. package/build/server/chunks/{handler-CBnQILkF.js → handler-BHDQVtZw.js} +3 -3
  254. package/build/server/chunks/{index.js-8K34DF7Q.js → index.js-CrFdVwqU.js} +2 -2
  255. package/build/server/chunks/{manifest.js-DqAt-2-E.js → manifest.js-Dja0Po5-.js} +87 -87
  256. package/build/server/chunks/nodes/{0.js-B_9UrGRh.js → 0.js-NNn8Cg6_.js} +8 -8
  257. package/build/server/chunks/nodes/{1.js-DHSqapc6.js → 1.js-B4fNjYoV.js} +2 -2
  258. package/build/server/chunks/nodes/{10.js-Cw8UPtK2.js → 10.js-CmLFT1Pj.js} +2 -2
  259. package/build/server/chunks/nodes/{11.js-BIyDysEr.js → 11.js-BQqPaZKt.js} +7 -7
  260. package/build/server/chunks/nodes/{12.js-ClZNXjgF.js → 12.js-uooOT7mU.js} +8 -8
  261. package/build/server/chunks/nodes/{13.js-B8qskPtO.js → 13.js-Bwsn9ad_.js} +8 -8
  262. package/build/server/chunks/nodes/{14.js-DRbS2pR2.js → 14.js-RxQ3KjAZ.js} +9 -9
  263. package/build/server/chunks/nodes/{15.js-EWY83mDS.js → 15.js-mrYlzb81.js} +8 -8
  264. package/build/server/chunks/nodes/{16.js-Cm0oYApC.js → 16.js-Uqhuspdc.js} +6 -6
  265. package/build/server/chunks/nodes/{17.js-Cu5a2UaQ.js → 17.js-xO4_vt9v.js} +2 -2
  266. package/build/server/chunks/nodes/{19.js-B7TKyMV0.js → 19.js-Bp0kyiVl.js} +6 -6
  267. package/build/server/chunks/nodes/{2.js-DltTHZOL.js → 2.js-DiF_CXqM.js} +8 -8
  268. package/build/server/chunks/nodes/{20.js-CwLFSrxO.js → 20.js--x681h54.js} +7 -7
  269. package/build/server/chunks/nodes/{21.js-D_0U5UVP.js → 21.js-BWa_e-es.js} +7 -7
  270. package/build/server/chunks/nodes/{22.js-C2r9JmW7.js → 22.js-yLTp3XfM.js} +7 -7
  271. package/build/server/chunks/nodes/{23.js-h4YwJvrO.js → 23.js-gx53Nzzh.js} +8 -8
  272. package/build/server/chunks/nodes/{24.js-BciJ1KTf.js → 24.js-Ci8dS_77.js} +4 -4
  273. package/build/server/chunks/nodes/{25.js-ZCknzNaV.js → 25.js-WBDsJGik.js} +9 -9
  274. package/build/server/chunks/nodes/{26.js-BUolTInv.js → 26.js-CZ4lN-gH.js} +8 -8
  275. package/build/server/chunks/nodes/{27.js-DcvlJkEN.js → 27.js-DPEzrdzK.js} +7 -7
  276. package/build/server/chunks/nodes/{28.js-DPp6-E4I.js → 28.js-BJ38Ryxz.js} +7 -7
  277. package/build/server/chunks/nodes/{3.js-CLE5bCBt.js → 3.js-D52LKb1w.js} +7 -7
  278. package/build/server/chunks/nodes/{4.js-BXXDgWZn.js → 4.js-DDItN7w8.js} +7 -7
  279. package/build/server/chunks/nodes/{5.js-BtthxHsw.js → 5.js-DJ1sVBVf.js} +6 -6
  280. package/build/server/chunks/nodes/{6.js-C3hPPfLf.js → 6.js-D_Aqt_hx.js} +7 -7
  281. package/build/server/chunks/nodes/{7.js-v18x97qv.js → 7.js-tS4lw5ka.js} +7 -7
  282. package/build/server/chunks/nodes/{8.js-Csojentz.js → 8.js-ChN4dMEU.js} +7 -7
  283. package/build/server/chunks/nodes/{9.js-3NVn9Z4u.js → 9.js-BpLLOWXa.js} +2 -2
  284. package/dist/cli.js +314 -157
  285. package/dist/wh-vault.js +1 -1
  286. package/package.json +1 -1
  287. package/skills/manage-wheelhouse/references/operations.md +24 -22
  288. package/build/client/_app/immutable/assets/0.DNJoTEVa.css.br +0 -0
  289. package/build/client/_app/immutable/chunks/BQPyzYAS.js.br +0 -0
  290. package/build/client/_app/immutable/chunks/BQPyzYAS.js.gz +0 -0
  291. package/build/client/_app/immutable/chunks/BS3n5c7l.js.br +0 -0
  292. package/build/client/_app/immutable/chunks/BS3n5c7l.js.gz +0 -0
  293. package/build/client/_app/immutable/chunks/Bgm2YDEc.js.br +0 -0
  294. package/build/client/_app/immutable/chunks/Bgm2YDEc.js.gz +0 -0
  295. package/build/client/_app/immutable/chunks/CF9qC7cA.js.br +0 -0
  296. package/build/client/_app/immutable/chunks/CF9qC7cA.js.gz +0 -0
  297. package/build/client/_app/immutable/chunks/CGRtmaS4.js.br +0 -0
  298. package/build/client/_app/immutable/chunks/CGRtmaS4.js.gz +0 -0
  299. package/build/client/_app/immutable/chunks/CH2Y0BVE.js.br +0 -0
  300. package/build/client/_app/immutable/chunks/CH2Y0BVE.js.gz +0 -0
  301. package/build/client/_app/immutable/chunks/CLADX83T.js.br +0 -0
  302. package/build/client/_app/immutable/chunks/CLADX83T.js.gz +0 -0
  303. package/build/client/_app/immutable/chunks/CS4t4atW.js.br +0 -0
  304. package/build/client/_app/immutable/chunks/CS4t4atW.js.gz +0 -0
  305. package/build/client/_app/immutable/chunks/CU0ZJcdF.js.br +0 -0
  306. package/build/client/_app/immutable/chunks/CU0ZJcdF.js.gz +0 -0
  307. package/build/client/_app/immutable/chunks/CXsGgEzT.js.br +0 -0
  308. package/build/client/_app/immutable/chunks/CXsGgEzT.js.gz +0 -0
  309. package/build/client/_app/immutable/chunks/Ch7J5mLH.js.br +0 -0
  310. package/build/client/_app/immutable/chunks/Ch7J5mLH.js.gz +0 -0
  311. package/build/client/_app/immutable/chunks/ClSB0siN.js.br +0 -0
  312. package/build/client/_app/immutable/chunks/ClSB0siN.js.gz +0 -0
  313. package/build/client/_app/immutable/chunks/CxexnUzw.js.br +0 -0
  314. package/build/client/_app/immutable/chunks/CxexnUzw.js.gz +0 -0
  315. package/build/client/_app/immutable/chunks/D8F9xgmh.js.br +0 -0
  316. package/build/client/_app/immutable/chunks/D8F9xgmh.js.gz +0 -0
  317. package/build/client/_app/immutable/chunks/DP7xDWnQ.js.br +0 -0
  318. package/build/client/_app/immutable/chunks/DP7xDWnQ.js.gz +0 -0
  319. package/build/client/_app/immutable/chunks/DkntkkRH.js.br +0 -0
  320. package/build/client/_app/immutable/chunks/DkntkkRH.js.gz +0 -0
  321. package/build/client/_app/immutable/chunks/DwBYQnih.js.br +0 -0
  322. package/build/client/_app/immutable/chunks/DwBYQnih.js.gz +0 -0
  323. package/build/client/_app/immutable/chunks/RedPhL9b.js.br +0 -0
  324. package/build/client/_app/immutable/chunks/RedPhL9b.js.gz +0 -0
  325. package/build/client/_app/immutable/chunks/_8osrypQ.js.br +0 -2
  326. package/build/client/_app/immutable/chunks/_8osrypQ.js.gz +0 -0
  327. package/build/client/_app/immutable/chunks/iI4tqZHC.js.br +0 -0
  328. package/build/client/_app/immutable/chunks/iI4tqZHC.js.gz +0 -0
  329. package/build/client/_app/immutable/entry/app.DzMOOaXE.js.br +0 -0
  330. package/build/client/_app/immutable/entry/app.DzMOOaXE.js.gz +0 -0
  331. package/build/client/_app/immutable/entry/start.BP7YKN_Q.js +0 -1
  332. package/build/client/_app/immutable/entry/start.BP7YKN_Q.js.br +0 -0
  333. package/build/client/_app/immutable/entry/start.BP7YKN_Q.js.gz +0 -0
  334. package/build/client/_app/immutable/nodes/0.BIHpRnqw.js.br +0 -0
  335. package/build/client/_app/immutable/nodes/0.BIHpRnqw.js.gz +0 -0
  336. package/build/client/_app/immutable/nodes/1.BJIoIsvP.js.br +0 -0
  337. package/build/client/_app/immutable/nodes/1.BJIoIsvP.js.gz +0 -0
  338. package/build/client/_app/immutable/nodes/10.DRDVy09M.js.br +0 -0
  339. package/build/client/_app/immutable/nodes/10.DRDVy09M.js.gz +0 -0
  340. package/build/client/_app/immutable/nodes/11.B2EhouGG.js.br +0 -0
  341. package/build/client/_app/immutable/nodes/11.B2EhouGG.js.gz +0 -0
  342. package/build/client/_app/immutable/nodes/12.5fuIl1It.js.br +0 -0
  343. package/build/client/_app/immutable/nodes/12.5fuIl1It.js.gz +0 -0
  344. package/build/client/_app/immutable/nodes/13.BHd8lAXB.js.br +0 -0
  345. package/build/client/_app/immutable/nodes/13.BHd8lAXB.js.gz +0 -0
  346. package/build/client/_app/immutable/nodes/14.DgsN2-TN.js.br +0 -0
  347. package/build/client/_app/immutable/nodes/14.DgsN2-TN.js.gz +0 -0
  348. package/build/client/_app/immutable/nodes/15.CPHkfcQw.js.br +0 -0
  349. package/build/client/_app/immutable/nodes/15.CPHkfcQw.js.gz +0 -0
  350. package/build/client/_app/immutable/nodes/16.CrpxQoZ7.js.br +0 -0
  351. package/build/client/_app/immutable/nodes/16.CrpxQoZ7.js.gz +0 -0
  352. package/build/client/_app/immutable/nodes/17.B83y7TTZ.js.br +0 -0
  353. package/build/client/_app/immutable/nodes/17.B83y7TTZ.js.gz +0 -0
  354. package/build/client/_app/immutable/nodes/19.BGzbdUG8.js.br +0 -0
  355. package/build/client/_app/immutable/nodes/19.BGzbdUG8.js.gz +0 -0
  356. package/build/client/_app/immutable/nodes/2.B_zXlRDw.js.br +0 -0
  357. package/build/client/_app/immutable/nodes/2.B_zXlRDw.js.gz +0 -0
  358. package/build/client/_app/immutable/nodes/20.CQE-Zjw-.js.br +0 -0
  359. package/build/client/_app/immutable/nodes/20.CQE-Zjw-.js.gz +0 -0
  360. package/build/client/_app/immutable/nodes/21.BjSp2mZI.js.br +0 -0
  361. package/build/client/_app/immutable/nodes/21.BjSp2mZI.js.gz +0 -0
  362. package/build/client/_app/immutable/nodes/22.BycUFjCM.js.br +0 -0
  363. package/build/client/_app/immutable/nodes/22.BycUFjCM.js.gz +0 -0
  364. package/build/client/_app/immutable/nodes/23.BjOud3nL.js.br +0 -0
  365. package/build/client/_app/immutable/nodes/23.BjOud3nL.js.gz +0 -0
  366. package/build/client/_app/immutable/nodes/24.DmaWt7EU.js.br +0 -0
  367. package/build/client/_app/immutable/nodes/24.DmaWt7EU.js.gz +0 -0
  368. package/build/client/_app/immutable/nodes/25.DpdKssoo.js +0 -15
  369. package/build/client/_app/immutable/nodes/25.DpdKssoo.js.br +0 -0
  370. package/build/client/_app/immutable/nodes/25.DpdKssoo.js.gz +0 -0
  371. package/build/client/_app/immutable/nodes/26.BxG4S8mB.js.br +0 -0
  372. package/build/client/_app/immutable/nodes/26.BxG4S8mB.js.gz +0 -0
  373. package/build/client/_app/immutable/nodes/28.Ds4FDR_a.js.br +0 -0
  374. package/build/client/_app/immutable/nodes/28.Ds4FDR_a.js.gz +0 -0
  375. package/build/client/_app/immutable/nodes/3.CldWfpKa.js.br +0 -0
  376. package/build/client/_app/immutable/nodes/3.CldWfpKa.js.gz +0 -0
  377. package/build/client/_app/immutable/nodes/4.Ds0FcslK.js.br +0 -0
  378. package/build/client/_app/immutable/nodes/4.Ds0FcslK.js.gz +0 -0
  379. package/build/client/_app/immutable/nodes/6.CvP4hVA3.js.br +0 -0
  380. package/build/client/_app/immutable/nodes/6.CvP4hVA3.js.gz +0 -0
  381. package/build/client/_app/immutable/nodes/7.Ca_DVOMc.js.br +0 -0
  382. package/build/client/_app/immutable/nodes/7.Ca_DVOMc.js.gz +0 -0
  383. package/build/client/_app/immutable/nodes/8.D8JqGvkd.js.br +0 -0
  384. package/build/client/_app/immutable/nodes/8.D8JqGvkd.js.gz +0 -0
  385. package/build/client/_app/immutable/nodes/9.CHSFcAbh.js.br +0 -0
  386. package/build/client/_app/immutable/nodes/9.CHSFcAbh.js.gz +0 -0
  387. package/build/server/chunks/chunks/terminal.js-BUurgI6D.js +0 -81
package/dist/cli.js CHANGED
@@ -4,12 +4,12 @@
4
4
  import { fork, spawn as spawn4 } from "node:child_process";
5
5
  import { existsSync as existsSync3 } from "node:fs";
6
6
  import { createServer } from "node:http";
7
- import path28 from "node:path";
7
+ import path30 from "node:path";
8
8
  import { fileURLToPath as fileURLToPath3, pathToFileURL } from "node:url";
9
9
  import { Command as Command6, InvalidArgumentError as InvalidArgumentError3 } from "commander";
10
10
 
11
11
  // package.json
12
- var version = "0.17.1";
12
+ var version = "0.18.0";
13
13
 
14
14
  // src/lib/harness.ts
15
15
  var HARNESSES = ["claude", "codex", "opencode", "pi"];
@@ -24,7 +24,7 @@ function parseHarness(value = "claude") {
24
24
  import { spawnSync } from "node:child_process";
25
25
  import { randomBytes } from "node:crypto";
26
26
  import { mkdir, readFile, rename, rm, writeFile } from "node:fs/promises";
27
- import path2 from "node:path";
27
+ import path4 from "node:path";
28
28
  import { createInterface } from "node:readline/promises";
29
29
 
30
30
  // src/lib/server/sessions/tmux.ts
@@ -239,6 +239,156 @@ var SESSION_SCRIPT = [
239
239
  'exec "$@"'
240
240
  ].join("\n");
241
241
 
242
+ // src/lib/server/setup/agentchoice.ts
243
+ import { mkdirSync, readFileSync as readFileSync2, renameSync, rmSync as rmSync2, writeFileSync as writeFileSync2 } from "node:fs";
244
+ import path3 from "node:path";
245
+
246
+ // src/lib/agent.ts
247
+ var CLOUD_PRODUCT = "Fleetyard";
248
+ var SETUP_AGENTS = ["claude", "codex", "pi"];
249
+ var isSetupAgent = (v) => typeof v === "string" && SETUP_AGENTS.includes(v);
250
+ var AGENT_AUTHS = ["subscription", "apikey", "ours"];
251
+ var isAgentAuth = (v) => typeof v === "string" && AGENT_AUTHS.includes(v);
252
+ var AGENT_PROVIDERS = ["claude", "chatgpt", "anthropic", "openai"];
253
+ var isAgentProvider = (v) => typeof v === "string" && AGENT_PROVIDERS.includes(v);
254
+ var option = (agent, auth, provider, label2, detail, ready = true) => ({ agent, auth, provider, label: label2, detail, ready });
255
+ function authOptions(agent, cloud) {
256
+ const ours = option(
257
+ agent,
258
+ "ours",
259
+ null,
260
+ `Paid by ${CLOUD_PRODUCT}`,
261
+ `${CLOUD_PRODUCT} pays for the model; nothing to sign in to.`,
262
+ false
263
+ );
264
+ const list2 = agent === "claude" ? [
265
+ option(
266
+ agent,
267
+ "subscription",
268
+ "claude",
269
+ "My Claude subscription",
270
+ "Sign in to Claude Code with your Claude Pro or Max account."
271
+ ),
272
+ option(
273
+ agent,
274
+ "apikey",
275
+ "anthropic",
276
+ "My Anthropic API key",
277
+ "Claude Code billed to an Anthropic API key.",
278
+ false
279
+ )
280
+ ] : agent === "codex" ? [
281
+ option(
282
+ agent,
283
+ "subscription",
284
+ "chatgpt",
285
+ "My ChatGPT subscription",
286
+ "Sign in to Codex with your ChatGPT Plus or Pro account."
287
+ ),
288
+ option(
289
+ agent,
290
+ "apikey",
291
+ "openai",
292
+ "My OpenAI API key",
293
+ "Codex billed to an OpenAI API key."
294
+ )
295
+ ] : [
296
+ option(
297
+ agent,
298
+ "subscription",
299
+ "chatgpt",
300
+ "My ChatGPT subscription",
301
+ "Sign in to Pi with your ChatGPT Plus or Pro account."
302
+ ),
303
+ option(
304
+ agent,
305
+ "subscription",
306
+ "claude",
307
+ "My Claude subscription",
308
+ "Pi with a Claude Pro or Max account.",
309
+ false
310
+ ),
311
+ option(
312
+ agent,
313
+ "apikey",
314
+ "openai",
315
+ "My OpenAI API key",
316
+ "Pi billed to an OpenAI API key."
317
+ ),
318
+ option(
319
+ agent,
320
+ "apikey",
321
+ "anthropic",
322
+ "My Anthropic API key",
323
+ "Pi billed to an Anthropic API key."
324
+ )
325
+ ];
326
+ return cloud ? [...list2, ours] : list2;
327
+ }
328
+ function defaultChoice(agent) {
329
+ const first = authOptions(agent, false).find((o) => o.ready);
330
+ return { agent, auth: first.auth, provider: first.provider };
331
+ }
332
+ function completeChoice(agent, auth, provider, cloud) {
333
+ if (auth === "ours") return { agent, auth, provider: null };
334
+ const offered = authOptions(agent, cloud).filter((o) => o.auth === auth);
335
+ const match = offered.find((o) => o.provider === provider) ?? offered[0];
336
+ return match ? { agent, auth, provider: match.provider } : defaultChoice(agent);
337
+ }
338
+
339
+ // src/lib/server/setup/answers.ts
340
+ import { readFileSync } from "node:fs";
341
+ import path2 from "node:path";
342
+ var ANSWERS_FILE = "setup-answers.json";
343
+ var ANSWERS_SCHEMA = "wheelhouse-setup-answers.v1";
344
+ var answersFile = (configDir) => path2.join(configDir, ANSWERS_FILE);
345
+ function readAnswers(configDir) {
346
+ const file = answersFile(configDir);
347
+ let text2;
348
+ try {
349
+ text2 = readFileSync(file, "utf8");
350
+ } catch (e) {
351
+ if (e.code === "ENOENT") return { state: "none" };
352
+ return { state: "invalid", problem: `Cannot read ${file}: ${e.message}` };
353
+ }
354
+ const bad = (why) => ({ state: "invalid", problem: `${file}: ${why}` });
355
+ let raw;
356
+ try {
357
+ raw = JSON.parse(text2);
358
+ } catch {
359
+ return bad("not JSON.");
360
+ }
361
+ if (typeof raw !== "object" || raw === null || Array.isArray(raw)) return bad("not an object.");
362
+ const { schema, agent, auth, provider } = raw;
363
+ if (schema !== ANSWERS_SCHEMA) return bad(`schema must be "${ANSWERS_SCHEMA}".`);
364
+ if (!isSetupAgent(agent)) return bad("agent must be claude, codex or pi.");
365
+ if (!isAgentAuth(auth)) return bad("auth must be subscription, apikey or ours.");
366
+ if (provider !== void 0 && provider !== null && !isAgentProvider(provider))
367
+ return bad("provider must be claude, chatgpt, anthropic or openai.");
368
+ return { state: "ok", choice: completeChoice(agent, auth, provider, true) };
369
+ }
370
+
371
+ // src/lib/server/setup/agentchoice.ts
372
+ var HARNESS_FILE = "harness.json";
373
+ var harnessFile = (configDir) => path3.join(configDir, HARNESS_FILE);
374
+ function readSavedChoice(configDir) {
375
+ let raw;
376
+ try {
377
+ raw = JSON.parse(readFileSync2(harnessFile(configDir), "utf8"));
378
+ } catch {
379
+ return null;
380
+ }
381
+ if (typeof raw !== "object" || raw === null || Array.isArray(raw)) return null;
382
+ const { harness, auth, provider } = raw;
383
+ const h = HARNESSES.find((n) => n === harness);
384
+ if (!h) return null;
385
+ return {
386
+ harness: h,
387
+ auth: isAgentAuth(auth) ? auth : null,
388
+ provider: isAgentProvider(provider) ? provider : null
389
+ };
390
+ }
391
+
242
392
  // cli/harness.ts
243
393
  async function savedHarness(file) {
244
394
  let text2;
@@ -262,7 +412,7 @@ async function savedHarness(file) {
262
412
  }
263
413
  }
264
414
  async function saveHarness(file, harness) {
265
- await mkdir(path2.dirname(file), { recursive: true, mode: 448 });
415
+ await mkdir(path4.dirname(file), { recursive: true, mode: 448 });
266
416
  const temporary = `${file}.${process.pid}.${randomBytes(8).toString("hex")}.tmp`;
267
417
  try {
268
418
  await writeFile(temporary, `${JSON.stringify({ harness })}
@@ -311,9 +461,10 @@ Number (blank to cancel): `, {
311
461
  input.close();
312
462
  }
313
463
  }
464
+ var savedHarnessNow = (configDir) => readSavedChoice(configDir)?.harness ?? null;
314
465
  async function resolveHarness(options2) {
315
466
  const { env } = options2;
316
- const file = path2.join(options2.configDir, "harness.json");
467
+ const file = path4.join(options2.configDir, "harness.json");
317
468
  const requested = options2.explicit ?? env.WHEELHOUSE_HARNESS;
318
469
  if (requested !== void 0) {
319
470
  const harness2 = parseHarness(requested);
@@ -322,6 +473,8 @@ async function resolveHarness(options2) {
322
473
  }
323
474
  const saved = await savedHarness(file);
324
475
  if (saved) return saved;
476
+ const answers = readAnswers(options2.configDir);
477
+ if (answers.state === "ok") return answers.choice.agent;
325
478
  const interactive = options2.interactive ?? (process.stdin.isTTY === true && process.stdout.isTTY === true);
326
479
  if (!interactive) return "claude";
327
480
  const find = options2.find ?? ((name) => which(name, env.PATH));
@@ -384,7 +537,7 @@ function detectHosted(env) {
384
537
  // src/lib/server/firstmate/install.ts
385
538
  import { access, constants as constants2, open, stat } from "node:fs/promises";
386
539
  import { existsSync, statSync as statSync2 } from "node:fs";
387
- import path3 from "node:path";
540
+ import path5 from "node:path";
388
541
  var MESSAGING_PURPOSE = "messages to Firstmate";
389
542
  var SUPPORTED_SCRIPTS = [
390
543
  {
@@ -413,7 +566,7 @@ var SUPPORTED_SCRIPTS = [
413
566
  purpose: "worker terminal output"
414
567
  }
415
568
  ];
416
- var scriptPath = (firstmateDir, name) => path3.join(firstmateDir, "bin", name);
569
+ var scriptPath = (firstmateDir, name) => path5.join(firstmateDir, "bin", name);
417
570
  var isDir = (p) => {
418
571
  try {
419
572
  return statSync2(p).isDirectory();
@@ -425,15 +578,15 @@ function looksLikeFirstmate(dir) {
425
578
  return existsSync(scriptPath(dir, "fm-fleet-snapshot.sh"));
426
579
  }
427
580
  function findFirstmateDir(start) {
428
- let dir = path3.resolve(start);
581
+ let dir = path5.resolve(start);
429
582
  for (; ; ) {
430
583
  if (looksLikeFirstmate(dir)) return dir;
431
- const parent = path3.dirname(dir);
584
+ const parent = path5.dirname(dir);
432
585
  if (parent === dir) return null;
433
586
  dir = parent;
434
587
  }
435
588
  }
436
- var expandHome = (p, env) => p === "~" || p.startsWith("~/") ? path3.join(env.HOME ?? "", p.slice(1)) : p;
589
+ var expandHome = (p, env) => p === "~" || p.startsWith("~/") ? path5.join(env.HOME ?? "", p.slice(1)) : p;
437
590
  function notFirstmate(dir) {
438
591
  if (!isDir(dir)) return `Firstmate directory not found: ${dir}`;
439
592
  if (!looksLikeFirstmate(dir)) {
@@ -446,7 +599,7 @@ function resolveInstall(input) {
446
599
  let firstmateDir;
447
600
  let source;
448
601
  if (input.firstmate) {
449
- firstmateDir = path3.resolve(input.cwd, expandHome(input.firstmate, input.env));
602
+ firstmateDir = path5.resolve(input.cwd, expandHome(input.firstmate, input.env));
450
603
  const wrong = notFirstmate(firstmateDir);
451
604
  if (wrong) return { ok: false, error: wrong, missing: false };
452
605
  source = "flag";
@@ -457,7 +610,7 @@ function resolveInstall(input) {
457
610
  source = "cwd";
458
611
  notes.push(`Found Firstmate at ${firstmateDir}`);
459
612
  } else if (input.remembered) {
460
- firstmateDir = path3.resolve(input.remembered.firstmate);
613
+ firstmateDir = path5.resolve(input.remembered.firstmate);
461
614
  const wrong = notFirstmate(firstmateDir);
462
615
  if (wrong) {
463
616
  return {
@@ -478,12 +631,12 @@ function resolveInstall(input) {
478
631
  }
479
632
  let homeDir;
480
633
  if (input.home) {
481
- homeDir = path3.resolve(input.cwd, expandHome(input.home, input.env));
634
+ homeDir = path5.resolve(input.cwd, expandHome(input.home, input.env));
482
635
  } else if (input.env.FM_HOME) {
483
- homeDir = path3.resolve(input.cwd, expandHome(input.env.FM_HOME, input.env));
636
+ homeDir = path5.resolve(input.cwd, expandHome(input.env.FM_HOME, input.env));
484
637
  notes.push(`Using the operational home from FM_HOME: ${homeDir}`);
485
638
  } else if (source === "remembered" && input.remembered?.home) {
486
- homeDir = path3.resolve(input.remembered.home);
639
+ homeDir = path5.resolve(input.remembered.home);
487
640
  } else {
488
641
  homeDir = firstmateDir;
489
642
  }
@@ -491,7 +644,7 @@ function resolveInstall(input) {
491
644
  if (!isDir(homeDir)) {
492
645
  return { ok: false, error: `Firstmate home not found: ${homeDir}`, missing: !flagged };
493
646
  }
494
- if (!isDir(path3.join(homeDir, "state"))) {
647
+ if (!isDir(path5.join(homeDir, "state"))) {
495
648
  return {
496
649
  ok: false,
497
650
  error: `${homeDir} is not a Firstmate operational home (it has no state/ directory). Pass --home <dir>.`,
@@ -616,7 +769,7 @@ function defaultKeychain() {
616
769
  // src/lib/server/plugins/config.ts
617
770
  import { mkdir as mkdir2, readFile as readFile2, rename as rename2, stat as stat2, writeFile as writeFile2 } from "node:fs/promises";
618
771
  import { homedir } from "node:os";
619
- import path4 from "node:path";
772
+ import path6 from "node:path";
620
773
 
621
774
  // src/lib/plugins/types.ts
622
775
  var SLOTS = [
@@ -635,9 +788,9 @@ var ROLES = ["review.surface"];
635
788
 
636
789
  // src/lib/server/plugins/config.ts
637
790
  function defaultConfigDir(env) {
638
- if (env.WHEELHOUSE_CONFIG_DIR) return path4.resolve(env.WHEELHOUSE_CONFIG_DIR);
639
- if (env.XDG_CONFIG_HOME) return path4.join(env.XDG_CONFIG_HOME, "wheelhouse");
640
- return path4.join(homedir(), ".config", "wheelhouse");
791
+ if (env.WHEELHOUSE_CONFIG_DIR) return path6.resolve(env.WHEELHOUSE_CONFIG_DIR);
792
+ if (env.XDG_CONFIG_HOME) return path6.join(env.XDG_CONFIG_HOME, "wheelhouse");
793
+ return path6.join(homedir(), ".config", "wheelhouse");
641
794
  }
642
795
  var PLUGINS_FILE = "plugins.json";
643
796
  var isRecord = (v) => typeof v === "object" && v !== null && !Array.isArray(v);
@@ -712,7 +865,7 @@ async function readRaw(file) {
712
865
  return { ok: true, raw: JSON.parse(text2) };
713
866
  }
714
867
  async function readPluginSettings(dir, id) {
715
- const r = await readRaw(path4.join(dir, PLUGINS_FILE));
868
+ const r = await readRaw(path6.join(dir, PLUGINS_FILE));
716
869
  if (!r.ok) return r;
717
870
  const plugins = r.raw?.plugins ?? {};
718
871
  return { ok: true, settings: { ...plugins[id]?.settings ?? {} } };
@@ -720,7 +873,7 @@ async function readPluginSettings(dir, id) {
720
873
  var editing = Promise.resolve();
721
874
  function editFile(dir, change) {
722
875
  const run = editing.then(async () => {
723
- const file = path4.join(dir, PLUGINS_FILE);
876
+ const file = path6.join(dir, PLUGINS_FILE);
724
877
  const r = await readRaw(file);
725
878
  if (!r.ok) return r;
726
879
  const raw = r.raw ?? {};
@@ -783,7 +936,7 @@ import {
783
936
  stat as stat3,
784
937
  writeFile as writeFile3
785
938
  } from "node:fs/promises";
786
- import path5 from "node:path";
939
+ import path7 from "node:path";
787
940
 
788
941
  // src/lib/cloud.ts
789
942
  var DEFAULT_GATEWAY = "https://cloud.chrisjowen.net";
@@ -918,8 +1071,8 @@ var HOP_BY_HOP = /* @__PURE__ */ new Set([
918
1071
  "transfer-encoding",
919
1072
  "upgrade"
920
1073
  ]);
921
- function isRestartPath(path29) {
922
- let p = path29.split(/[?#]/, 1)[0];
1074
+ function isRestartPath(path31) {
1075
+ let p = path31.split(/[?#]/, 1)[0];
923
1076
  for (let i = 0; i < 3; i++) {
924
1077
  try {
925
1078
  const d = decodeURIComponent(p);
@@ -1219,7 +1372,7 @@ var CLOUD_SETTINGS_SCHEMA = "wheelhouse-cloud-settings.v1";
1219
1372
  var CLOUD_STATUS_SCHEMA = "wheelhouse-cloud-status.v1";
1220
1373
  var CLOUD_KEYCHAIN_SERVICE = "wheelhouse-cloud";
1221
1374
  var lapsed = (p, now = Date.now()) => !(now - Date.parse(p.requestedAt) <= PENDING_PINS_MS);
1222
- var cloudDir = (configDir) => path5.join(configDir, "cloud");
1375
+ var cloudDir = (configDir) => path7.join(configDir, "cloud");
1223
1376
  var LOOPBACK = /* @__PURE__ */ new Set(["127.0.0.1", "localhost", "[::1]"]);
1224
1377
  function gatewayOrigin(raw) {
1225
1378
  const u = URL.parse(raw.trim());
@@ -1307,7 +1460,7 @@ function parseSessions(v) {
1307
1460
  });
1308
1461
  }
1309
1462
  async function writeAtomic(file, text2) {
1310
- await mkdir3(path5.dirname(file), { recursive: true, mode: 448 });
1463
+ await mkdir3(path7.dirname(file), { recursive: true, mode: 448 });
1311
1464
  const tmp = `${file}.tmp-${process.pid}-${randomBytes3(4).toString("hex")}`;
1312
1465
  try {
1313
1466
  await writeFile3(tmp, text2, { mode: 384 });
@@ -1334,13 +1487,13 @@ var CloudSettings = class {
1334
1487
  dir;
1335
1488
  keychain;
1336
1489
  get file() {
1337
- return path5.join(this.dir, "settings.json");
1490
+ return path7.join(this.dir, "settings.json");
1338
1491
  }
1339
1492
  get keyFile() {
1340
- return path5.join(this.dir, "device.key");
1493
+ return path7.join(this.dir, "device.key");
1341
1494
  }
1342
1495
  get statusFile() {
1343
- return path5.join(this.dir, "status.json");
1496
+ return path7.join(this.dir, "status.json");
1344
1497
  }
1345
1498
  /** The settings, with defaults (off, not started, the default gateway, no device) for anything missing or unreadable, with why. */
1346
1499
  async read() {
@@ -1391,7 +1544,7 @@ var CloudSettings = class {
1391
1544
  }
1392
1545
  /** The Keychain account for this directory's device key, so each config directory has its own. */
1393
1546
  async keychainAccount() {
1394
- const real2 = await realpath(this.dir).catch(() => path5.resolve(this.dir));
1547
+ const real2 = await realpath(this.dir).catch(() => path7.resolve(this.dir));
1395
1548
  return `device:${createHash3("sha256").update(real2).digest("hex").slice(0, 16)}`;
1396
1549
  }
1397
1550
  /** The device key and where it is kept: the Keychain first, then the file. */
@@ -1832,8 +1985,8 @@ var Relay = class {
1832
1985
  if (this.streams.size >= this.opts.limits.maxStreams) return { ok: false, code: "limit" };
1833
1986
  const relay = parseRelay(msg.relay);
1834
1987
  const headers = parseHeaders(msg.headers);
1835
- const path29 = msg.path;
1836
- if (!relay || !headers || typeof path29 !== "string" || !path29.startsWith("/") || path29.length > 8192 || !headerSafe(path29) || path29.includes(" ")) {
1988
+ const path31 = msg.path;
1989
+ if (!relay || !headers || typeof path31 !== "string" || !path31.startsWith("/") || path31.length > 8192 || !headerSafe(path31) || path31.includes(" ")) {
1837
1990
  return { ok: false, code: "protocol", message: "The request is malformed." };
1838
1991
  }
1839
1992
  const refusal = this.opts.sessionRefusal?.(relay.sessionId);
@@ -1845,7 +1998,7 @@ var Relay = class {
1845
1998
  message: "Wheelhouse Cloud is turned off on this machine."
1846
1999
  };
1847
2000
  }
1848
- if (isRestartPath(path29)) {
2001
+ if (isRestartPath(path31)) {
1849
2002
  return {
1850
2003
  ok: false,
1851
2004
  code: "refused",
@@ -1855,7 +2008,7 @@ var Relay = class {
1855
2008
  const target = isObj2(msg.target) ? msg.target : {};
1856
2009
  const app = this.opts.targets.appPort();
1857
2010
  if (target.kind === "app") {
1858
- return { ok: true, port: app, host: "127.0.0.1", path: path29, headers, relay };
2011
+ return { ok: true, port: app, host: "127.0.0.1", path: path31, headers, relay };
1859
2012
  }
1860
2013
  const port = target.port;
1861
2014
  if (target.kind !== "port" || typeof port !== "number" || !Number.isInteger(port) || port < 1 || port > 65535) {
@@ -1866,7 +2019,7 @@ var Relay = class {
1866
2019
  }
1867
2020
  const late = this.opts.sessionRefusal?.(relay.sessionId);
1868
2021
  if (late) return { ok: false, code: "refused", message: late };
1869
- return { ok: true, port, host: "localhost", path: path29, headers, relay };
2022
+ return { ok: true, port, host: "localhost", path: path31, headers, relay };
1870
2023
  }
1871
2024
  /** §6.3: the headers for the local request. */
1872
2025
  localHeaders(a, originChecked, ws) {
@@ -2576,13 +2729,13 @@ var CloudService = class {
2576
2729
  // src/lib/server/plugins/installed.ts
2577
2730
  import { mkdir as mkdir4, readFile as readFile4, rename as rename4, writeFile as writeFile4 } from "node:fs/promises";
2578
2731
  import { homedir as homedir2 } from "node:os";
2579
- import path6 from "node:path";
2732
+ import path8 from "node:path";
2580
2733
  var INSTALLED_FILE = "installed.json";
2581
2734
  var SCHEMA = "wheelhouse-installed-plugins.v1";
2582
2735
  var EMPTY_INSTALLED = () => ({ schema: SCHEMA, plugins: {} });
2583
2736
  function defaultPluginsDir(env) {
2584
- if (env.WHEELHOUSE_PLUGINS_DIR) return path6.resolve(env.WHEELHOUSE_PLUGINS_DIR);
2585
- return path6.join(homedir2(), ".wheelhouse", "plugins");
2737
+ if (env.WHEELHOUSE_PLUGINS_DIR) return path8.resolve(env.WHEELHOUSE_PLUGINS_DIR);
2738
+ return path8.join(homedir2(), ".wheelhouse", "plugins");
2586
2739
  }
2587
2740
  var isRecord2 = (v) => typeof v === "object" && v !== null && !Array.isArray(v);
2588
2741
  function record(v) {
@@ -2594,7 +2747,7 @@ function record(v) {
2594
2747
  return { repository, ref, commit, version: version2, installedAt, enabled };
2595
2748
  }
2596
2749
  async function readInstalled(dir) {
2597
- const file = path6.join(dir, INSTALLED_FILE);
2750
+ const file = path8.join(dir, INSTALLED_FILE);
2598
2751
  let text2;
2599
2752
  try {
2600
2753
  text2 = await readFile4(file, "utf8");
@@ -2622,7 +2775,7 @@ async function readInstalled(dir) {
2622
2775
  }
2623
2776
  async function writeInstalled(dir, installed) {
2624
2777
  await mkdir4(dir, { recursive: true });
2625
- const file = path6.join(dir, INSTALLED_FILE);
2778
+ const file = path8.join(dir, INSTALLED_FILE);
2626
2779
  const tmp = `${file}.${process.pid}.tmp`;
2627
2780
  await writeFile4(tmp, `${JSON.stringify(installed, null, " ")}
2628
2781
  `);
@@ -2630,21 +2783,21 @@ async function writeInstalled(dir, installed) {
2630
2783
  }
2631
2784
 
2632
2785
  // src/lib/server/setup/remembered.ts
2633
- import { mkdirSync, readFileSync, renameSync, writeFileSync as writeFileSync2 } from "node:fs";
2634
- import path7 from "node:path";
2786
+ import { mkdirSync as mkdirSync2, readFileSync as readFileSync3, renameSync as renameSync2, writeFileSync as writeFileSync3 } from "node:fs";
2787
+ import path9 from "node:path";
2635
2788
  var REMEMBERED_FILE = "firstmate.json";
2636
- var rememberedFile = (configDir) => path7.join(configDir, REMEMBERED_FILE);
2789
+ var rememberedFile = (configDir) => path9.join(configDir, REMEMBERED_FILE);
2637
2790
  function readRemembered(configDir) {
2638
2791
  let raw;
2639
2792
  try {
2640
- raw = JSON.parse(readFileSync(rememberedFile(configDir), "utf8"));
2793
+ raw = JSON.parse(readFileSync3(rememberedFile(configDir), "utf8"));
2641
2794
  } catch {
2642
2795
  return null;
2643
2796
  }
2644
2797
  if (typeof raw !== "object" || raw === null || Array.isArray(raw)) return null;
2645
2798
  const { firstmate, home } = raw;
2646
- if (typeof firstmate !== "string" || !path7.isAbsolute(firstmate)) return null;
2647
- if (home !== void 0 && home !== null && (typeof home !== "string" || !path7.isAbsolute(home))) {
2799
+ if (typeof firstmate !== "string" || !path9.isAbsolute(firstmate)) return null;
2800
+ if (home !== void 0 && home !== null && (typeof home !== "string" || !path9.isAbsolute(home))) {
2648
2801
  return null;
2649
2802
  }
2650
2803
  return { firstmate, home: typeof home === "string" ? home : null };
@@ -2652,7 +2805,7 @@ function readRemembered(configDir) {
2652
2805
 
2653
2806
  // src/lib/server/store/store.ts
2654
2807
  import { realpathSync } from "node:fs";
2655
- import path8 from "node:path";
2808
+ import path10 from "node:path";
2656
2809
 
2657
2810
  // src/lib/inbox.ts
2658
2811
  var SNOOZE_MS = 4 * 3600 * 1e3;
@@ -2676,27 +2829,27 @@ var SUMMARY_SYSTEM = [
2676
2829
 
2677
2830
  // src/lib/server/store/store.ts
2678
2831
  function defaultStateDir(env) {
2679
- if (env.WHEELHOUSE_STATE_DIR) return path8.resolve(env.WHEELHOUSE_STATE_DIR);
2680
- if (env.XDG_STATE_HOME) return path8.join(path8.resolve(env.XDG_STATE_HOME), "wheelhouse");
2681
- return path8.join(env.HOME ?? "", ".local", "state", "wheelhouse");
2832
+ if (env.WHEELHOUSE_STATE_DIR) return path10.resolve(env.WHEELHOUSE_STATE_DIR);
2833
+ if (env.XDG_STATE_HOME) return path10.join(path10.resolve(env.XDG_STATE_HOME), "wheelhouse");
2834
+ return path10.join(env.HOME ?? "", ".local", "state", "wheelhouse");
2682
2835
  }
2683
2836
  function real(p) {
2684
- const abs = path8.resolve(p);
2837
+ const abs = path10.resolve(p);
2685
2838
  try {
2686
2839
  return realpathSync(abs);
2687
2840
  } catch {
2688
- const parent = path8.dirname(abs);
2689
- return parent === abs ? abs : path8.join(real(parent), path8.basename(abs));
2841
+ const parent = path10.dirname(abs);
2842
+ return parent === abs ? abs : path10.join(real(parent), path10.basename(abs));
2690
2843
  }
2691
2844
  }
2692
2845
  function isInside(p, dir) {
2693
- const rel = path8.relative(real(dir), real(p));
2694
- return rel === "" || !rel.startsWith("..") && !path8.isAbsolute(rel);
2846
+ const rel = path10.relative(real(dir), real(p));
2847
+ return rel === "" || !rel.startsWith("..") && !path10.isAbsolute(rel);
2695
2848
  }
2696
2849
 
2697
2850
  // src/lib/server/sessions/choice.ts
2698
- import { mkdirSync as mkdirSync2, readFileSync as readFileSync2, renameSync as renameSync2, rmSync as rmSync2, writeFileSync as writeFileSync3 } from "node:fs";
2699
- import path9 from "node:path";
2851
+ import { mkdirSync as mkdirSync3, readFileSync as readFileSync4, renameSync as renameSync3, rmSync as rmSync3, writeFileSync as writeFileSync4 } from "node:fs";
2852
+ import path11 from "node:path";
2700
2853
  var SESSION_BACKENDS = ["tmux", "herdr"];
2701
2854
  var SESSION_BACKEND_FILE = "session-backend.json";
2702
2855
  function parseSessionBackend(value) {
@@ -2708,12 +2861,12 @@ function parseSessionBackend(value) {
2708
2861
  }
2709
2862
  return backend;
2710
2863
  }
2711
- var savedBackendFile = (configDir) => path9.join(configDir, SESSION_BACKEND_FILE);
2864
+ var savedBackendFile = (configDir) => path11.join(configDir, SESSION_BACKEND_FILE);
2712
2865
  function firstmateBackend(homeDir) {
2713
2866
  if (!homeDir) return null;
2714
2867
  let text2;
2715
2868
  try {
2716
- text2 = readFileSync2(path9.join(homeDir, "config", "backend"), "utf8");
2869
+ text2 = readFileSync4(path11.join(homeDir, "config", "backend"), "utf8");
2717
2870
  } catch {
2718
2871
  return null;
2719
2872
  }
@@ -2727,7 +2880,7 @@ function readSavedBackend(configDir) {
2727
2880
  const file = savedBackendFile(configDir);
2728
2881
  let text2;
2729
2882
  try {
2730
- text2 = readFileSync2(file, "utf8");
2883
+ text2 = readFileSync4(file, "utf8");
2731
2884
  } catch (e) {
2732
2885
  if (e.code === "ENOENT") return { ok: true, backend: null };
2733
2886
  return { ok: false, error: `Cannot read ${file}. Check its permissions.` };
@@ -2787,26 +2940,26 @@ function setRestart(fn) {
2787
2940
  }
2788
2941
 
2789
2942
  // src/lib/server/upgrade/settings.ts
2790
- import { existsSync as existsSync2, readFileSync as readFileSync3, rmSync as rmSync3 } from "node:fs";
2791
- import path10 from "node:path";
2792
- var updateDir = (configDir) => path10.join(configDir, "update");
2793
- var handoffFile = (configDir) => path10.join(updateDir(configDir), "next-install");
2943
+ import { existsSync as existsSync2, readFileSync as readFileSync5, rmSync as rmSync4 } from "node:fs";
2944
+ import path12 from "node:path";
2945
+ var updateDir = (configDir) => path12.join(configDir, "update");
2946
+ var handoffFile = (configDir) => path12.join(updateDir(configDir), "next-install");
2794
2947
  function takeHandoff(configDir) {
2795
2948
  const file = handoffFile(configDir);
2796
2949
  let dir;
2797
2950
  try {
2798
- dir = readFileSync3(file, "utf8").trim();
2951
+ dir = readFileSync5(file, "utf8").trim();
2799
2952
  } catch {
2800
2953
  return null;
2801
2954
  }
2802
- rmSync3(file, { force: true });
2803
- if (!dir || !path10.isAbsolute(dir)) return null;
2804
- const built = existsSync2(path10.join(dir, "dist", "cli.js")) && existsSync2(path10.join(dir, "build", "handler.js"));
2955
+ rmSync4(file, { force: true });
2956
+ if (!dir || !path12.isAbsolute(dir)) return null;
2957
+ const built = existsSync2(path12.join(dir, "dist", "cli.js")) && existsSync2(path12.join(dir, "build", "handler.js"));
2805
2958
  return built ? dir : null;
2806
2959
  }
2807
2960
 
2808
2961
  // cli/gateway.ts
2809
- import path12 from "node:path";
2962
+ import path14 from "node:path";
2810
2963
  import { Argument, Command, InvalidArgumentError } from "commander";
2811
2964
 
2812
2965
  // src/lib/gateway.ts
@@ -2950,7 +3103,7 @@ import {
2950
3103
  stat as stat4,
2951
3104
  writeFile as writeFile5
2952
3105
  } from "node:fs/promises";
2953
- import path11 from "node:path";
3106
+ import path13 from "node:path";
2954
3107
 
2955
3108
  // src/lib/bell.ts
2956
3109
  var ALERT_KINDS = [
@@ -2969,7 +3122,7 @@ var QUIET_AFTER_MS = 20 * 6e4;
2969
3122
  // src/lib/server/gateway/settings.ts
2970
3123
  var GATEWAY_SETTINGS_SCHEMA = "wheelhouse-gateway-settings.v1";
2971
3124
  var SETTINGS_FILE = "settings.json";
2972
- var gatewayDir = (configDir) => path11.join(configDir, "gateway");
3125
+ var gatewayDir = (configDir) => path13.join(configDir, "gateway");
2973
3126
  function defaultSettings() {
2974
3127
  return Object.fromEntries(
2975
3128
  GATEWAY_CHANNELS.map((c) => [
@@ -3002,7 +3155,7 @@ function parseChannel(v, fallback) {
3002
3155
  };
3003
3156
  }
3004
3157
  async function writeAtomic2(file, text2) {
3005
- await mkdir5(path11.dirname(file), { recursive: true, mode: 448 });
3158
+ await mkdir5(path13.dirname(file), { recursive: true, mode: 448 });
3006
3159
  const tmp = `${file}.tmp-${process.pid}-${randomBytes5(4).toString("hex")}`;
3007
3160
  try {
3008
3161
  await writeFile5(tmp, text2, { mode: 384 });
@@ -3020,10 +3173,10 @@ var GatewaySettings = class {
3020
3173
  dir;
3021
3174
  keychain;
3022
3175
  get file() {
3023
- return path11.join(this.dir, SETTINGS_FILE);
3176
+ return path13.join(this.dir, SETTINGS_FILE);
3024
3177
  }
3025
3178
  tokenFile(channel) {
3026
- return path11.join(this.dir, `${channel}.token`);
3179
+ return path13.join(this.dir, `${channel}.token`);
3027
3180
  }
3028
3181
  /** The settings, with defaults for anything missing; an unreadable file reads as the defaults, with why. */
3029
3182
  async read() {
@@ -3088,7 +3241,7 @@ var GatewaySettings = class {
3088
3241
  * directory has its own token.
3089
3242
  */
3090
3243
  async keychainAccount(channel) {
3091
- const real2 = await realpath2(this.dir).catch(() => path11.resolve(this.dir));
3244
+ const real2 = await realpath2(this.dir).catch(() => path13.resolve(this.dir));
3092
3245
  return `${channel}:${createHash4("sha256").update(real2).digest("hex").slice(0, 16)}`;
3093
3246
  }
3094
3247
  /** Keep the token in the Keychain, else in its file, replacing the one before; returns where it went. */
@@ -3207,7 +3360,7 @@ function gatewayCommand(over = {}) {
3207
3360
  );
3208
3361
  const settingsFor = (c) => {
3209
3362
  const dir = c.optsWithGlobals().configDir;
3210
- const configDir = dir ? path12.resolve(dir) : defaultConfigDir(deps.env);
3363
+ const configDir = dir ? path14.resolve(dir) : defaultConfigDir(deps.env);
3211
3364
  const found = resolveInstall({
3212
3365
  cwd: process.cwd(),
3213
3366
  env: deps.env,
@@ -3328,16 +3481,16 @@ function gatewayCommand(over = {}) {
3328
3481
 
3329
3482
  // cli/plugin.ts
3330
3483
  import { createInterface as createInterface2 } from "node:readline/promises";
3331
- import path16 from "node:path";
3484
+ import path18 from "node:path";
3332
3485
  import { Command as Command2 } from "commander";
3333
3486
 
3334
3487
  // src/lib/server/plugins/install.ts
3335
3488
  import { execFile } from "node:child_process";
3336
3489
  import { mkdir as mkdir6, mkdtemp, readFile as readFile6, realpath as realpath3, rename as rename6, rm as rm4, stat as stat5 } from "node:fs/promises";
3337
- import path14 from "node:path";
3490
+ import path16 from "node:path";
3338
3491
 
3339
3492
  // src/lib/server/plugins/manifest.ts
3340
- import path13 from "node:path";
3493
+ import path15 from "node:path";
3341
3494
 
3342
3495
  // src/lib/plugins/addresses.ts
3343
3496
  var TEMPLATE = /^[a-z0-9-]*\{port\}[a-z0-9-]*(?:\.[a-z0-9-]+)*\.localhost$/;
@@ -3354,7 +3507,7 @@ var SUPPORTED_API_VERSIONS = [PLUGIN_API_VERSION, PLUGIN_API_VERSION - 1].filter
3354
3507
  // src/lib/server/plugins/manifest.ts
3355
3508
  var MANIFEST_DIR = ".wheelhouse-plugin";
3356
3509
  var MANIFEST_FILE = "plugin.json";
3357
- var manifestPath = (pluginDir) => path13.join(pluginDir, MANIFEST_DIR, MANIFEST_FILE);
3510
+ var manifestPath = (pluginDir) => path15.join(pluginDir, MANIFEST_DIR, MANIFEST_FILE);
3358
3511
  var MANIFEST_FIELDS = [
3359
3512
  "$schema",
3360
3513
  "name",
@@ -3402,7 +3555,7 @@ var SEMVER = /^\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?(?:\+[0-9A-Za-z.-]+)?$/;
3402
3555
  var MAX_TEXT = 400;
3403
3556
  var isRecord3 = (v) => typeof v === "object" && v !== null && !Array.isArray(v);
3404
3557
  function insidePath(f) {
3405
- return typeof f === "string" && f.length > 0 && !path13.isAbsolute(f) && !f.split(/[\\/]/).some((part) => part === ".." || part === "" || part === ".");
3558
+ return typeof f === "string" && f.length > 0 && !path15.isAbsolute(f) && !f.split(/[\\/]/).some((part) => part === ".." || part === "" || part === ".");
3406
3559
  }
3407
3560
  var ICON_TYPES = {
3408
3561
  ".svg": "image/svg+xml",
@@ -3501,7 +3654,7 @@ function wheelhouse(v) {
3501
3654
  }
3502
3655
  if (!insidePath(c.icon))
3503
3656
  throw new Invalid(`${where}.icon must be a plain path inside the plugin`);
3504
- if (!ICON_TYPES[path13.extname(c.icon).toLowerCase()]) {
3657
+ if (!ICON_TYPES[path15.extname(c.icon).toLowerCase()]) {
3505
3658
  throw new Invalid(`${where}.icon must be an image: ${Object.keys(ICON_TYPES).join(", ")}`);
3506
3659
  }
3507
3660
  declared.icon = c.icon;
@@ -3880,7 +4033,7 @@ async function fetchSource(source, into, deps) {
3880
4033
  await step(["checkout", "-q", "--detach", "FETCH_HEAD"]);
3881
4034
  }
3882
4035
  const commit = await step(["rev-parse", "HEAD"]);
3883
- await rm4(path14.join(into, ".git"), { recursive: true, force: true });
4036
+ await rm4(path16.join(into, ".git"), { recursive: true, force: true });
3884
4037
  return commit;
3885
4038
  }
3886
4039
  async function checkCopy(dir) {
@@ -3901,12 +4054,12 @@ async function checkCopy(dir) {
3901
4054
  if (!rel) continue;
3902
4055
  let file;
3903
4056
  try {
3904
- file = await realpath3(path14.join(base, rel));
4057
+ file = await realpath3(path16.join(base, rel));
3905
4058
  if (!(await stat5(file)).isFile()) throw new Error();
3906
4059
  } catch {
3907
4060
  throw new Refused(`its ${what} ${rel} is missing`);
3908
4061
  }
3909
- if (!file.startsWith(base + path14.sep))
4062
+ if (!file.startsWith(base + path16.sep))
3910
4063
  throw new Refused(`its ${what} leads outside the plugin`);
3911
4064
  }
3912
4065
  return m;
@@ -3950,7 +4103,7 @@ function describeManifest(m, from, commit) {
3950
4103
  }
3951
4104
  async function withStaging(dir, work) {
3952
4105
  await mkdir6(dir, { recursive: true });
3953
- const staging = await mkdtemp(path14.join(dir, ".staging-"));
4106
+ const staging = await mkdtemp(path16.join(dir, ".staging-"));
3954
4107
  try {
3955
4108
  return await work(staging);
3956
4109
  } finally {
@@ -3987,7 +4140,7 @@ async function settle(m, deps, o) {
3987
4140
  async function keepSettings(id, settings2, deps) {
3988
4141
  const w = await writePluginSettings(deps.configDir, id, settings2);
3989
4142
  if (!w.ok) throw new Refused(`could not keep ${id}'s settings: ${w.error}`);
3990
- deps.log(`Kept ${id}'s settings in ${path14.join(deps.configDir, PLUGINS_FILE)}.`);
4143
+ deps.log(`Kept ${id}'s settings in ${path16.join(deps.configDir, PLUGINS_FILE)}.`);
3991
4144
  }
3992
4145
  async function reload(deps, what, yes) {
3993
4146
  const r = await deps.restart(async (url, busy) => {
@@ -4028,7 +4181,7 @@ function install(spec, deps, o = {}) {
4028
4181
  const commit = await fetchSource(source, staging, deps);
4029
4182
  expected(commit, o.expect, repository);
4030
4183
  const m = await checkCopy(staging);
4031
- const target = path14.join(deps.dir, m.name);
4184
+ const target = path16.join(deps.dir, m.name);
4032
4185
  if (installed.plugins[m.name]) {
4033
4186
  throw new Refused(
4034
4187
  `${m.name} is already installed from ${label(installed.plugins[m.name])}; use \`wheelhouse plugin update ${m.name}\``
@@ -4103,9 +4256,9 @@ function update(id, deps, o = {}) {
4103
4256
  if (!o.yes && !await deps.confirm(`Update ${id}?`)) throw new Refused("not updated");
4104
4257
  const settings2 = await settle(m, deps, { yes: o.yes, given: answers });
4105
4258
  if (settings2) await keepSettings(id, settings2, deps);
4106
- const target = path14.join(deps.dir, id);
4107
- const old = await mkdtemp(path14.join(deps.dir, ".old-"));
4108
- const parked = path14.join(old, id);
4259
+ const target = path16.join(deps.dir, id);
4260
+ const old = await mkdtemp(path16.join(deps.dir, ".old-"));
4261
+ const parked = path16.join(old, id);
4109
4262
  if (await exists(target)) await rename6(target, parked);
4110
4263
  try {
4111
4264
  await rename6(staging, target);
@@ -4134,7 +4287,7 @@ function remove(id, deps, o = {}) {
4134
4287
  if (!ID2.test(id)) throw new Refused(`"${id}" is not a plugin id`);
4135
4288
  const installed = await record2(deps);
4136
4289
  if (!installed.plugins[id]) throw new Refused(`${id} is not installed`);
4137
- await rm4(path14.join(deps.dir, id), { recursive: true, force: true });
4290
+ await rm4(path16.join(deps.dir, id), { recursive: true, force: true });
4138
4291
  delete installed.plugins[id];
4139
4292
  await writeInstalled(deps.dir, installed);
4140
4293
  deps.log(`Removed ${id}.`);
@@ -4187,24 +4340,24 @@ async function exists(p) {
4187
4340
 
4188
4341
  // cli/running.ts
4189
4342
  import { randomBytes as randomBytes6, timingSafeEqual } from "node:crypto";
4190
- import { mkdirSync as mkdirSync3, rmSync as rmSync4, writeFileSync as writeFileSync4 } from "node:fs";
4343
+ import { mkdirSync as mkdirSync4, rmSync as rmSync5, writeFileSync as writeFileSync5 } from "node:fs";
4191
4344
  import { readdir, readFile as readFile7, rm as rm5 } from "node:fs/promises";
4192
- import path15 from "node:path";
4345
+ import path17 from "node:path";
4193
4346
  var RESTART_EXIT = 75;
4194
4347
  var RESTART_PATH = "/api/wheelhouse/restart";
4195
4348
  var RUNNING_DIR = ".running";
4196
4349
  var TIMEOUT_MS = 3e3;
4197
4350
  var newToken = () => randomBytes6(24).toString("hex");
4198
4351
  function writeRunning(pluginsDir, r) {
4199
- const dir = path15.join(pluginsDir, RUNNING_DIR);
4200
- mkdirSync3(dir, { recursive: true, mode: 448 });
4201
- const file = path15.join(dir, `${r.pid}.json`);
4202
- writeFileSync4(file, `${JSON.stringify(r)}
4352
+ const dir = path17.join(pluginsDir, RUNNING_DIR);
4353
+ mkdirSync4(dir, { recursive: true, mode: 448 });
4354
+ const file = path17.join(dir, `${r.pid}.json`);
4355
+ writeFileSync5(file, `${JSON.stringify(r)}
4203
4356
  `, { mode: 384 });
4204
4357
  return file;
4205
4358
  }
4206
4359
  function removeRunning(file) {
4207
- rmSync4(file, { force: true });
4360
+ rmSync5(file, { force: true });
4208
4361
  }
4209
4362
  var sameToken = (got, want) => {
4210
4363
  const a = Buffer.from(got);
@@ -4241,7 +4394,7 @@ var alive2 = (pid) => {
4241
4394
  };
4242
4395
  var refused = (e) => e.cause?.code === "ECONNREFUSED";
4243
4396
  async function requestRestart(pluginsDir, proceed) {
4244
- const dir = path15.join(pluginsDir, RUNNING_DIR);
4397
+ const dir = path17.join(pluginsDir, RUNNING_DIR);
4245
4398
  const out = { restarted: [], failed: [], kept: [] };
4246
4399
  let names;
4247
4400
  try {
@@ -4250,7 +4403,7 @@ async function requestRestart(pluginsDir, proceed) {
4250
4403
  return out;
4251
4404
  }
4252
4405
  for (const name of names) {
4253
- const file = path15.join(dir, name);
4406
+ const file = path17.join(dir, name);
4254
4407
  let r;
4255
4408
  try {
4256
4409
  r = JSON.parse(await readFile7(file, "utf8"));
@@ -4329,10 +4482,10 @@ function pluginCommand(over = {}) {
4329
4482
  );
4330
4483
  const deps = (c) => {
4331
4484
  const g2 = c.optsWithGlobals();
4332
- const dir = g2.pluginsDir ? path16.resolve(g2.pluginsDir) : defaultPluginsDir(env);
4485
+ const dir = g2.pluginsDir ? path18.resolve(g2.pluginsDir) : defaultPluginsDir(env);
4333
4486
  return {
4334
4487
  dir,
4335
- configDir: g2.configDir ? path16.resolve(g2.configDir) : defaultConfigDir(env),
4488
+ configDir: g2.configDir ? path18.resolve(g2.configDir) : defaultConfigDir(env),
4336
4489
  confirm: askTerminal,
4337
4490
  ask: askLine,
4338
4491
  restart: (proceed) => requestRestart(dir, proceed),
@@ -4367,7 +4520,7 @@ function pluginCommand(over = {}) {
4367
4520
  }
4368
4521
 
4369
4522
  // cli/remote.ts
4370
- import path17 from "node:path";
4523
+ import path19 from "node:path";
4371
4524
  import { Command as Command3, InvalidArgumentError as InvalidArgumentError2 } from "commander";
4372
4525
 
4373
4526
  // src/lib/server/cloud/pairing.ts
@@ -4681,7 +4834,7 @@ function remoteCommand(over = {}) {
4681
4834
  };
4682
4835
  const settingsFor = (c) => {
4683
4836
  const dir = c.optsWithGlobals().configDir;
4684
- const configDir = dir ? path17.resolve(dir) : defaultConfigDir(deps.env);
4837
+ const configDir = dir ? path19.resolve(dir) : defaultConfigDir(deps.env);
4685
4838
  const found = resolveInstall({ cwd: process.cwd(), env: deps.env });
4686
4839
  if (found.ok && isInside(configDir, found.install.homeDir)) {
4687
4840
  fail(
@@ -4958,7 +5111,7 @@ function remoteCommand(over = {}) {
4958
5111
  }
4959
5112
 
4960
5113
  // cli/skills.ts
4961
- import path25 from "node:path";
5114
+ import path27 from "node:path";
4962
5115
  import { fileURLToPath } from "node:url";
4963
5116
  import { Command as Command4 } from "commander";
4964
5117
 
@@ -4966,11 +5119,11 @@ import { Command as Command4 } from "commander";
4966
5119
  import { execFile as execFile3 } from "node:child_process";
4967
5120
  import { mkdtemp as mkdtemp3, readFile as readFile13, rm as rm9 } from "node:fs/promises";
4968
5121
  import { tmpdir } from "node:os";
4969
- import path24 from "node:path";
5122
+ import path26 from "node:path";
4970
5123
 
4971
5124
  // src/lib/server/material/bundle.ts
4972
5125
  import { readFile as readFile8 } from "node:fs/promises";
4973
- import path18 from "node:path";
5126
+ import path20 from "node:path";
4974
5127
  var REVIEW_SURFACE_MARKER = "<!-- wheelhouse:review-surface -->";
4975
5128
  var SKILLS = [
4976
5129
  {
@@ -5005,7 +5158,7 @@ function reviewSurfaceSection(surface) {
5005
5158
  async function renderSkill(skillsRoot, skill, inputs) {
5006
5159
  const tree = {};
5007
5160
  for (const file of skill.files) {
5008
- const text2 = await readFile8(path18.join(skillsRoot, skill.name, file), "utf8");
5161
+ const text2 = await readFile8(path20.join(skillsRoot, skill.name, file), "utf8");
5009
5162
  tree[file] = file === "SKILL.md" ? text2.replace(REVIEW_SURFACE_MARKER, () => reviewSurfaceSection(inputs.reviewSurface)) : text2;
5010
5163
  }
5011
5164
  return tree;
@@ -5014,7 +5167,7 @@ async function renderSkill(skillsRoot, skill, inputs) {
5014
5167
  // src/lib/server/material/files.ts
5015
5168
  import { createHash as createHash5 } from "node:crypto";
5016
5169
  import { lstat as lstat3, mkdir as mkdir7, readFile as readFile9, readdir as readdir2, realpath as realpath4, rename as rename7, rm as rm6, writeFile as writeFile6 } from "node:fs/promises";
5017
- import path19 from "node:path";
5170
+ import path21 from "node:path";
5018
5171
  var sha2562 = (text2) => createHash5("sha256").update(text2).digest("hex");
5019
5172
  var hashTree = (tree) => Object.fromEntries(Object.entries(tree).map(([file, text2]) => [file, sha2562(text2)]));
5020
5173
  function sameHashes(a, b) {
@@ -5035,16 +5188,16 @@ async function physical(file) {
5035
5188
  return await realpath4(file);
5036
5189
  } catch (e) {
5037
5190
  if (e.code !== "ENOENT") throw e;
5038
- const parent = path19.dirname(file);
5191
+ const parent = path21.dirname(file);
5039
5192
  if (parent === file) throw e;
5040
- return path19.join(await physical(parent), path19.basename(file));
5193
+ return path21.join(await physical(parent), path21.basename(file));
5041
5194
  }
5042
5195
  }
5043
5196
  async function insideAny(targets, protectedDirs) {
5044
5197
  const real2 = await Promise.all(targets.map(physical));
5045
5198
  for (const dir of protectedDirs) {
5046
- const p = await physical(path19.resolve(dir));
5047
- if (real2.some((t) => t === p || t.startsWith(p + path19.sep))) return true;
5199
+ const p = await physical(path21.resolve(dir));
5200
+ if (real2.some((t) => t === p || t.startsWith(p + path21.sep))) return true;
5048
5201
  }
5049
5202
  return false;
5050
5203
  }
@@ -5053,16 +5206,16 @@ async function readTree(dir, prefix = "") {
5053
5206
  for (const entry2 of await readdir2(dir, { withFileTypes: true })) {
5054
5207
  const rel = prefix + entry2.name;
5055
5208
  if (entry2.isDirectory())
5056
- Object.assign(tree, await readTree(path19.join(dir, entry2.name), rel + "/"));
5057
- else if (entry2.isFile()) tree[rel] = await readFile9(path19.join(dir, entry2.name), "utf8");
5209
+ Object.assign(tree, await readTree(path21.join(dir, entry2.name), rel + "/"));
5210
+ else if (entry2.isFile()) tree[rel] = await readFile9(path21.join(dir, entry2.name), "utf8");
5058
5211
  else throw new Error(`${rel} is a symbolic link or special file.`);
5059
5212
  }
5060
5213
  return tree;
5061
5214
  }
5062
5215
  async function writeTree(dir, tree) {
5063
5216
  for (const [file, text2] of Object.entries(tree)) {
5064
- await mkdir7(path19.dirname(path19.join(dir, file)), { recursive: true });
5065
- await writeFile6(path19.join(dir, file), text2);
5217
+ await mkdir7(path21.dirname(path21.join(dir, file)), { recursive: true });
5218
+ await writeFile6(path21.join(dir, file), text2);
5066
5219
  }
5067
5220
  }
5068
5221
  async function replaceTree(dir, tree) {
@@ -5074,7 +5227,7 @@ async function replaceTree(dir, tree) {
5074
5227
  await rename7(stage, dir);
5075
5228
  }
5076
5229
  async function writeAtomic3(file, text2, mode = 384) {
5077
- await mkdir7(path19.dirname(file), { recursive: true });
5230
+ await mkdir7(path21.dirname(file), { recursive: true });
5078
5231
  const tmp = `${file}.${process.pid}-${Date.now()}.tmp`;
5079
5232
  await writeFile6(tmp, text2, { mode });
5080
5233
  await rename7(tmp, file);
@@ -5082,16 +5235,16 @@ async function writeAtomic3(file, text2, mode = 384) {
5082
5235
 
5083
5236
  // src/lib/server/material/manifest.ts
5084
5237
  import { readFile as readFile10, rename as rename8, rm as rm7 } from "node:fs/promises";
5085
- import path20 from "node:path";
5238
+ import path22 from "node:path";
5086
5239
  var MANIFEST_SCHEMA = "wheelhouse-material.v1";
5087
5240
  var HISTORY_MAX = 50;
5088
- var materialDir = (configDir) => path20.join(configDir, "agent-material");
5089
- var manifestFile = (dir) => path20.join(dir, "manifest.json");
5090
- var settingsFile = (dir) => path20.join(dir, "settings.json");
5241
+ var materialDir = (configDir) => path22.join(configDir, "agent-material");
5242
+ var manifestFile = (dir) => path22.join(dir, "manifest.json");
5243
+ var settingsFile = (dir) => path22.join(dir, "settings.json");
5091
5244
  var folder = (id) => id.replace(/[^A-Za-z0-9@._-]/g, "_");
5092
- var baseDir = (dir, id) => path20.join(dir, "base", folder(id));
5093
- var proposedDir = (dir, id) => path20.join(dir, "proposed", folder(id));
5094
- var backupDir = (dir, id, at) => path20.join(dir, "backup", folder(id), at.toISOString().replace(/[:.]/g, "-"));
5245
+ var baseDir = (dir, id) => path22.join(dir, "base", folder(id));
5246
+ var proposedDir = (dir, id) => path22.join(dir, "proposed", folder(id));
5247
+ var backupDir = (dir, id, at) => path22.join(dir, "backup", folder(id), at.toISOString().replace(/[:.]/g, "-"));
5095
5248
  function emptyManifest(version2, harness) {
5096
5249
  return {
5097
5250
  schema: MANIFEST_SCHEMA,
@@ -5169,7 +5322,7 @@ function serialize(dir, work) {
5169
5322
 
5170
5323
  // src/lib/server/material/skilldir.ts
5171
5324
  import { lstat as lstat4, mkdir as mkdir8, mkdtemp as mkdtemp2, readFile as readFile11, rename as rename9, rm as rm8, writeFile as writeFile7 } from "node:fs/promises";
5172
- import path21 from "node:path";
5325
+ import path23 from "node:path";
5173
5326
  var RECEIPT = ".wheelhouse-managed.json";
5174
5327
  var RECEIPT_SCHEMA = "wheelhouse-skill.v1";
5175
5328
  function receiptHashes(text2) {
@@ -5198,13 +5351,13 @@ async function readLocal(target) {
5198
5351
  }
5199
5352
  var receiptText = (version2, hashes) => JSON.stringify({ schema: RECEIPT_SCHEMA, version: version2, files: hashes }) + "\n";
5200
5353
  async function swapIn(target, tree, receipt, check) {
5201
- const parent = path21.dirname(target);
5354
+ const parent = path23.dirname(target);
5202
5355
  await mkdir8(parent, { recursive: true });
5203
- const stage = await mkdtemp2(path21.join(parent, ".wheelhouse-skill-"));
5356
+ const stage = await mkdtemp2(path23.join(parent, ".wheelhouse-skill-"));
5204
5357
  let placed = false;
5205
5358
  try {
5206
5359
  await writeTree(stage, tree);
5207
- await writeFile7(path21.join(stage, RECEIPT), receipt);
5360
+ await writeFile7(path23.join(stage, RECEIPT), receipt);
5208
5361
  const backup = stage + "-previous";
5209
5362
  for (let attempt = 1; ; attempt++) {
5210
5363
  const now = await readLocal(target);
@@ -5232,14 +5385,14 @@ async function swapIn(target, tree, receipt, check) {
5232
5385
  // src/lib/server/material/sync.ts
5233
5386
  import { execFile as execFile2 } from "node:child_process";
5234
5387
  import { readFile as readFile12, stat as stat6 } from "node:fs/promises";
5235
- import path23 from "node:path";
5388
+ import path25 from "node:path";
5236
5389
 
5237
5390
  // src/lib/server/material/targets.ts
5238
5391
  import { homedir as homedir3 } from "node:os";
5239
- import path22 from "node:path";
5392
+ import path24 from "node:path";
5240
5393
  function skillRootDir(root, env) {
5241
5394
  const home = env.HOME || homedir3();
5242
- return root === "claude" ? path22.resolve(env.CLAUDE_CONFIG_DIR || path22.join(home, ".claude"), "skills") : path22.resolve(home, ".agents", "skills");
5395
+ return root === "claude" ? path24.resolve(env.CLAUDE_CONFIG_DIR || path24.join(home, ".claude"), "skills") : path24.resolve(home, ".agents", "skills");
5243
5396
  }
5244
5397
  var rootsFor = (harness) => harness === "claude" ? ["claude"] : ["claude", "agents"];
5245
5398
 
@@ -5250,7 +5403,7 @@ function plannedSkills(env, harness) {
5250
5403
  (skill) => rootsFor(harness).map((root) => ({
5251
5404
  id: skillId(skill.name, root),
5252
5405
  skill,
5253
- target: path23.join(skillRootDir(root, env), skill.name)
5406
+ target: path25.join(skillRootDir(root, env), skill.name)
5254
5407
  }))
5255
5408
  );
5256
5409
  }
@@ -5306,7 +5459,7 @@ async function syncSkill(ctx, dir, m, item, tree, dryRun) {
5306
5459
  state,
5307
5460
  message: message(state, id, target, detail)
5308
5461
  });
5309
- if (await insideAny([path23.dirname(target), target], [ctx.install.firstmateDir, ctx.install.homeDir]))
5462
+ if (await insideAny([path25.dirname(target), target], [ctx.install.firstmateDir, ctx.install.homeDir]))
5310
5463
  return result("refused", "user skills location is inside Firstmate's checkout or home");
5311
5464
  const next = hashTree(tree);
5312
5465
  const rec = m.items[id];
@@ -5393,7 +5546,7 @@ async function checkAssumptions(firstmateDir) {
5393
5546
  seen.add(key);
5394
5547
  let text2 = "";
5395
5548
  try {
5396
- text2 = await readFile12(path23.join(firstmateDir, a.file), "utf8");
5549
+ text2 = await readFile12(path25.join(firstmateDir, a.file), "utf8");
5397
5550
  } catch {
5398
5551
  }
5399
5552
  checks.push({ ...a, present: text2.includes(a.marker) });
@@ -5498,7 +5651,7 @@ async function syncMaterial(ctx, inputs, opts = {}) {
5498
5651
  // src/lib/server/material/ops.ts
5499
5652
  async function savedHarness2(configDir) {
5500
5653
  try {
5501
- const raw = JSON.parse(await readFile13(path24.join(configDir, "harness.json"), "utf8"));
5654
+ const raw = JSON.parse(await readFile13(path26.join(configDir, "harness.json"), "utf8"));
5502
5655
  return parseHarness(raw.harness);
5503
5656
  } catch {
5504
5657
  return "claude";
@@ -5585,10 +5738,10 @@ async function diff(c, id) {
5585
5738
  return { ok: false, error: `Cannot read ${item.target}: ${local.reason}` };
5586
5739
  const next = await render(c, item);
5587
5740
  const base = await readBase(c.dir, id);
5588
- const scratch = await mkdtemp3(path24.join(tmpdir(), "wheelhouse-skills-diff-"));
5741
+ const scratch = await mkdtemp3(path26.join(tmpdir(), "wheelhouse-skills-diff-"));
5589
5742
  try {
5590
5743
  const put = async (name, tree) => {
5591
- const d = path24.join(scratch, name);
5744
+ const d = path26.join(scratch, name);
5592
5745
  await replaceTree(d, tree);
5593
5746
  return d;
5594
5747
  };
@@ -5712,7 +5865,7 @@ async function uninstall(c, ids) {
5712
5865
  }
5713
5866
 
5714
5867
  // cli/skills.ts
5715
- var bundledSkills = () => path25.resolve(path25.dirname(fileURLToPath(import.meta.url)), "..", "skills");
5868
+ var bundledSkills = () => path27.resolve(path27.dirname(fileURLToPath(import.meta.url)), "..", "skills");
5716
5869
  var PENDING = { installed: "missing", updated: "outdated" };
5717
5870
  function printResult(r, log, pending = false) {
5718
5871
  for (const i of r.items)
@@ -5743,7 +5896,7 @@ function skillsCommand(over = {}) {
5743
5896
  const g2 = c.optsWithGlobals();
5744
5897
  const s = await skillsCli({
5745
5898
  env: deps.env,
5746
- configDir: g2.configDir ? path25.resolve(g2.configDir) : defaultConfigDir(deps.env),
5899
+ configDir: g2.configDir ? path27.resolve(g2.configDir) : defaultConfigDir(deps.env),
5747
5900
  skillsRoot: deps.skillsRoot,
5748
5901
  version
5749
5902
  });
@@ -5894,14 +6047,14 @@ function supervise(opts) {
5894
6047
 
5895
6048
  // cli/upgrade.ts
5896
6049
  import { spawn as spawn3 } from "node:child_process";
5897
- import path27 from "node:path";
6050
+ import path29 from "node:path";
5898
6051
  import { fileURLToPath as fileURLToPath2 } from "node:url";
5899
6052
  import { Command as Command5 } from "commander";
5900
6053
 
5901
6054
  // src/lib/server/upgrade/clone.ts
5902
6055
  import { execFile as execFile4 } from "node:child_process";
5903
6056
  import { mkdir as mkdir9, readdir as readdir3, readFile as readFile14, realpath as realpath5 } from "node:fs/promises";
5904
- import path26 from "node:path";
6057
+ import path28 from "node:path";
5905
6058
  var COMMITS_SHOWN = 20;
5906
6059
  var OUTPUT_KEPT = 6e4;
5907
6060
  var runCommand = (cmd, args, cwd) => new Promise((resolve) => {
@@ -5947,7 +6100,7 @@ async function checkClone(deps) {
5947
6100
  changes: []
5948
6101
  };
5949
6102
  out.current.version = packageVersion(
5950
- await readFile14(path26.join(deps.dir, "package.json"), "utf8").catch(() => null)
6103
+ await readFile14(path28.join(deps.dir, "package.json"), "utf8").catch(() => null)
5951
6104
  );
5952
6105
  const top = await g2("rev-parse", "--show-toplevel");
5953
6106
  const here = await realpath5(deps.dir).catch(() => deps.dir);
@@ -6073,7 +6226,7 @@ var CLONE_SETUP_STEPS = [
6073
6226
 
6074
6227
  // cli/upgrade.ts
6075
6228
  function installDir() {
6076
- return path27.resolve(path27.dirname(fileURLToPath2(import.meta.url)), "..");
6229
+ return path29.resolve(path29.dirname(fileURLToPath2(import.meta.url)), "..");
6077
6230
  }
6078
6231
  var runInherit = (cmd, args, cwd) => new Promise((resolve) => {
6079
6232
  const child = spawn3(cmd, args, { cwd, stdio: "inherit" });
@@ -6146,7 +6299,7 @@ function upgradeCommand(over = {}) {
6146
6299
  "--plugins-dir <dir>",
6147
6300
  "the plugins directory the running Wheelhouse loads from, to find it (default: $WHEELHOUSE_PLUGINS_DIR, else ~/.wheelhouse/plugins)"
6148
6301
  ).action(async (o) => {
6149
- const pluginsDir = o.pluginsDir ? path27.resolve(o.pluginsDir) : defaultPluginsDir(env);
6302
+ const pluginsDir = o.pluginsDir ? path29.resolve(o.pluginsDir) : defaultPluginsDir(env);
6150
6303
  const ok = await upgrade(
6151
6304
  {
6152
6305
  dir: installDir(),
@@ -6173,8 +6326,8 @@ function parsePort3(value) {
6173
6326
  return n;
6174
6327
  }
6175
6328
  function handlerPath() {
6176
- const here = path28.dirname(fileURLToPath3(import.meta.url));
6177
- return path28.resolve(here, "..", "build", "handler.js");
6329
+ const here = path30.dirname(fileURLToPath3(import.meta.url));
6330
+ return path30.resolve(here, "..", "build", "handler.js");
6178
6331
  }
6179
6332
  function openBrowser(url) {
6180
6333
  const [cmd, args] = process.platform === "darwin" ? ["open", [url]] : process.platform === "win32" ? ["cmd", ["/c", "start", '""', url]] : ["xdg-open", [url]];
@@ -6187,8 +6340,8 @@ function openBrowser(url) {
6187
6340
  }
6188
6341
  }
6189
6342
  async function open2(opts) {
6190
- const configDir = opts.configDir ? path28.resolve(opts.configDir) : defaultConfigDir(process.env);
6191
- const stateDir = opts.stateDir ? path28.resolve(opts.stateDir) : defaultStateDir(process.env);
6343
+ const configDir = opts.configDir ? path30.resolve(opts.configDir) : defaultConfigDir(process.env);
6344
+ const stateDir = opts.stateDir ? path30.resolve(opts.stateDir) : defaultStateDir(process.env);
6192
6345
  const resolved = resolveInstall({
6193
6346
  firstmate: opts.firstmate,
6194
6347
  home: opts.home,
@@ -6263,6 +6416,8 @@ async function open2(opts) {
6263
6416
  if (hosted.hosted) {
6264
6417
  console.log(`Previews: ${hosted.hosted.pattern} (${hosted.hosted.source})`);
6265
6418
  }
6419
+ const harnessFixed = opts.harness !== void 0 || process.env.WHEELHOUSE_HARNESS !== void 0;
6420
+ process.env.WHEELHOUSE_HARNESS_FIXED = harnessFixed ? "1" : "0";
6266
6421
  process.env.WHEELHOUSE_HARNESS = await resolveHarness({
6267
6422
  explicit: opts.harness,
6268
6423
  env: process.env,
@@ -6277,9 +6432,9 @@ async function open2(opts) {
6277
6432
  }
6278
6433
  process.env.WHEELHOUSE_STATE_DIR = stateDir;
6279
6434
  process.env.WHEELHOUSE_CONFIG_DIR = configDir;
6280
- if (opts.pluginsDir) process.env.WHEELHOUSE_PLUGINS_DIR = path28.resolve(opts.pluginsDir);
6281
- process.env.WHEELHOUSE_BUNDLED_PLUGINS_DIR = path28.resolve(path28.dirname(file), "..", "plugins");
6282
- process.env.WHEELHOUSE_INSTALL_DIR = path28.resolve(path28.dirname(file), "..");
6435
+ if (opts.pluginsDir) process.env.WHEELHOUSE_PLUGINS_DIR = path30.resolve(opts.pluginsDir);
6436
+ process.env.WHEELHOUSE_BUNDLED_PLUGINS_DIR = path30.resolve(path30.dirname(file), "..", "plugins");
6437
+ process.env.WHEELHOUSE_INSTALL_DIR = path30.resolve(path30.dirname(file), "..");
6283
6438
  if (opts.tmuxSocket) process.env.WHEELHOUSE_TMUX_SOCKET = opts.tmuxSocket;
6284
6439
  process.env.WHEELHOUSE_SKIP_PERMISSIONS = opts.skipPermissions ? "1" : "0";
6285
6440
  let cli = fileURLToPath3(import.meta.url);
@@ -6296,11 +6451,13 @@ async function open2(opts) {
6296
6451
  start: (port, restart) => {
6297
6452
  const next = takeHandoff(configDir);
6298
6453
  if (next && restart) {
6299
- cli = path28.join(next, "dist", "cli.js");
6454
+ cli = path30.join(next, "dist", "cli.js");
6300
6455
  process.env.WHEELHOUSE_INSTALL_DIR = next;
6301
- process.env.WHEELHOUSE_BUNDLED_PLUGINS_DIR = path28.join(next, "plugins");
6456
+ process.env.WHEELHOUSE_BUNDLED_PLUGINS_DIR = path30.join(next, "plugins");
6302
6457
  console.log(`Wheelhouse now runs from ${next}.`);
6303
6458
  }
6459
+ const saved = restart && !harnessFixed ? savedHarnessNow(configDir) : null;
6460
+ if (saved) process.env.WHEELHOUSE_HARNESS = saved;
6304
6461
  return fork(cli, ["__server", "--port", String(port)], {
6305
6462
  env: { ...process.env, WHEELHOUSE_RESTARTED: restart ? "1" : "0" },
6306
6463
  stdio: ["ignore", "inherit", "inherit", "ipc"]
@@ -6323,7 +6480,7 @@ async function open2(opts) {
6323
6480
  process.exit(code);
6324
6481
  }
6325
6482
  async function serve(opts) {
6326
- process.env.WHEELHOUSE_INSTALL_DIR = path28.resolve(path28.dirname(handlerPath()), "..");
6483
+ process.env.WHEELHOUSE_INSTALL_DIR = path30.resolve(path30.dirname(handlerPath()), "..");
6327
6484
  process.env.WHEELHOUSE_URL = `http://${HOST}:${opts.port}`;
6328
6485
  process.env.BODY_SIZE_LIMIT ??= String(UPLOAD_MAX_BYTES + 64 * 1024);
6329
6486
  const { handler } = await import(pathToFileURL(handlerPath()).href);