@chrisjowen/wheelhouse 0.17.0 → 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 (388) 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/{CDSHscp6.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/{BXiSaVju.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/{ClYd4imU.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/{xHBeYlGm.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/{BPjwAHMu.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/{CgZovtjz.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/{CSU604UC.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/{fhAu_Obx.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/{DFrn6Xyh.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/{B1zE3zKP.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/{CI19kiwT.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/{D8J1M-4m.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/{79yuhTwS.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/{CKE9neHp.js → DJmeKpkq.js} +1 -1
  45. package/build/client/_app/immutable/chunks/DJmeKpkq.js.br +0 -0
  46. package/build/client/_app/immutable/chunks/{CKE9neHp.js.gz → DJmeKpkq.js.gz} +0 -0
  47. package/build/client/_app/immutable/chunks/{B3KHKydy.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/HCiUQtkc.js +2 -0
  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/V46v89bT.js +1 -0
  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/{qmyjnG6s.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/{BosdQIFt.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/{CsmF6Hwj.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.DwV2pwLU.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.DF8hnsli.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.B5FnFSGX.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.COzSUd5H.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.hxSy1hC3.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.C7_etTt9.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.DmZBXkEn.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.B2FfmJwY.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.DOXGz5UB.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.9Kdcqd35.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.rjXh_9jf.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.BDL7z_Qb.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.BCbkmPbx.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.CmA-uI_h.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.DXJrG-NW.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.D1PSb-pN.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.DsgvXr3A.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.DYbfQRKi.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.DGQvgO-w.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.C-Ubf5oN.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.BZFHR-pC.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.CAiVTgL3.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.Bpt4zq5B.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.DqfjvXPm.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.CCshJNeL.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.DAgz6-ct.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-Dmv_JQut.js → detail.js-K2fb6vUl.js} +2 -2
  155. package/build/server/chunks/chunks/{feedback.js-D3a2iMXg.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-B1bN3ll4.js → internal.js-BOM77MfQ.js} +3 -3
  158. package/build/server/chunks/chunks/{keychain.js-Cp8llbD0.js → keychain.js-DDSo_IW8.js} +2 -2
  159. package/build/server/chunks/chunks/{marketplace-service.js-Cx9Q0k8Q.js → marketplace-service.js-QhO4MhZa.js} +2 -2
  160. package/build/server/chunks/chunks/{page.js-CoP2TAJ_.js → page.js-6KzOUc5P.js} +2 -2
  161. package/build/server/chunks/chunks/{previewhelper2.js-BrTz0Tg7.js → previewhelper2.js-Dza1zgQB.js} +2 -2
  162. package/build/server/chunks/chunks/{repo.js-LJxMBx-J.js → repo.js-Aq4DOLtb.js} +2 -2
  163. package/build/server/chunks/chunks/{runtime.js-Div6Lnx3.js → runtime.js-DKYCLRYC.js} +12517 -11748
  164. package/build/server/chunks/chunks/{service.js-C-7gDnLN.js → service.js-D9kA6Dvq.js} +2 -2
  165. package/build/server/chunks/chunks/{service2.js-BsM3bqfY.js → service2.js-Dx7TTUyO.js} +141 -441
  166. package/build/server/chunks/chunks/{starter.js-BGIHa5RG.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-B-5C4tjd.js → view.js-D6_Y6e4W.js} +2 -2
  169. package/build/server/chunks/entries/endpoints/api/apps/_op_/{_server.ts.js-u0ExtU7j.js → _server.ts.js-C8-Bqwz2.js} +6 -6
  170. package/build/server/chunks/entries/endpoints/api/cloud/{_server.ts.js-BO-Upj5a.js → _server.ts.js-iHvZiw6L.js} +3 -3
  171. package/build/server/chunks/entries/endpoints/api/cloud/previews/{_server.ts.js-CqmlbD19.js → _server.ts.js-C2083EnL.js} +6 -6
  172. package/build/server/chunks/entries/endpoints/api/events/{_server.ts.js-BuNwFHVn.js → _server.ts.js-DXerC_lz.js} +6 -6
  173. package/build/server/chunks/entries/endpoints/api/files/{_server.ts.js-DjTqppEU.js → _server.ts.js-DkrVdgsY.js} +6 -6
  174. package/build/server/chunks/entries/endpoints/api/firstmate/chat/{_server.ts.js-C9cMNlgd.js → _server.ts.js-itkq-Zhc.js} +6 -6
  175. package/build/server/chunks/entries/endpoints/api/firstmate/commands/{_server.ts.js-DfpaVvxs.js → _server.ts.js-BClrQ76Y.js} +6 -6
  176. package/build/server/chunks/entries/endpoints/api/firstmate/dismiss/{_server.ts.js-8SzK4gCV.js → _server.ts.js-CSaP0hys.js} +6 -6
  177. package/build/server/chunks/entries/endpoints/api/firstmate/input/{_server.ts.js-BQbD-LTs.js → _server.ts.js-Cpm8-Jaf.js} +6 -6
  178. package/build/server/chunks/entries/endpoints/api/firstmate/interrupt/{_server.ts.js-ClqS2YDJ.js → _server.ts.js-DxSC3HLK.js} +6 -6
  179. package/build/server/chunks/entries/endpoints/api/firstmate/messages/{_server.ts.js-BCazjeCb.js → _server.ts.js-CITZvyir.js} +6 -6
  180. package/build/server/chunks/entries/endpoints/api/firstmate/pick/{_server.ts.js-DbwR4fGz.js → _server.ts.js-7uCkkloP.js} +6 -6
  181. package/build/server/chunks/entries/endpoints/api/firstmate/reactions/{_server.ts.js-CY5SLTEA.js → _server.ts.js-RSm-5UF2.js} +6 -6
  182. package/build/server/chunks/entries/endpoints/api/firstmate/start/{_server.ts.js-Co9V8-6k.js → _server.ts.js-CbHftl32.js} +6 -6
  183. package/build/server/chunks/entries/endpoints/api/fleet/{_server.ts.js-tC_Zgasq.js → _server.ts.js-DTbyWHA5.js} +6 -6
  184. package/build/server/chunks/entries/endpoints/api/gateway/{_server.ts.js-BwROfRU7.js → _server.ts.js-Dgj64C-8.js} +6 -6
  185. package/build/server/chunks/entries/endpoints/api/health/{_server.ts.js-BEmBVcdL.js → _server.ts.js-8Ao3NA-E.js} +6 -6
  186. package/build/server/chunks/entries/endpoints/api/inbox/{_server.ts.js-DdaypvH2.js → _server.ts.js-DGBE7UIq.js} +6 -6
  187. package/build/server/chunks/entries/endpoints/api/inbox/report/{_server.ts.js-BbDc6SzH.js → _server.ts.js-DqkXU31r.js} +6 -6
  188. package/build/server/chunks/entries/endpoints/api/insights/{_server.ts.js-Bz4abExj.js → _server.ts.js-DVanxkdv.js} +6 -6
  189. package/build/server/chunks/entries/endpoints/api/plugins/_plugin_/config/{_server.ts.js-BNVKAFTs.js → _server.ts.js-Cm68Rf5I.js} +6 -6
  190. package/build/server/chunks/entries/endpoints/api/plugins/_plugin_/feedback/{_server.ts.js-B1AaY6FI.js → _server.ts.js-3OGDAdpk.js} +7 -7
  191. package/build/server/chunks/entries/endpoints/api/plugins/_plugin_/feedback/summary/{_server.ts.js-CP9sLBS7.js → _server.ts.js-CFU80BaE.js} +8 -8
  192. package/build/server/chunks/entries/endpoints/api/plugins/_plugin_/icon/_icon_/{_server.ts.js-DBDdeN2z.js → _server.ts.js-KWWnKNbi.js} +6 -6
  193. package/build/server/chunks/entries/endpoints/api/plugins/_plugin_/load/{_server.ts.js-D4h_Mifs.js → _server.ts.js-B_5x0zJS.js} +2 -2
  194. package/build/server/chunks/entries/endpoints/api/plugins/_plugin_/ui/_...path_/{_server.ts.js-BIrWdhtR.js → _server.ts.js-C90RNY_X.js} +6 -6
  195. package/build/server/chunks/entries/endpoints/api/plugins/_plugin_/update/{_server.ts.js-Cu_Y3EEq.js → _server.ts.js-DvGxNP7H.js} +2 -2
  196. package/build/server/chunks/entries/endpoints/api/plugins/{_server.ts.js-CDMP1Wcb.js → _server.ts.js-CiLDpQsQ.js} +6 -6
  197. package/build/server/chunks/entries/endpoints/api/plugins/inspect/{_server.ts.js-DHTVslXa.js → _server.ts.js-B1XZhaia.js} +2 -2
  198. package/build/server/chunks/entries/endpoints/api/plugins/install/{_server.ts.js-CoRV0mGt.js → _server.ts.js-DSD7vM9f.js} +2 -2
  199. package/build/server/chunks/entries/endpoints/api/plugins/marketplace/{_server.ts.js-DZi9g4M6.js → _server.ts.js-CSXJmx4K.js} +7 -7
  200. package/build/server/chunks/entries/endpoints/api/plugins/marketplace/icon/_name_/{_server.ts.js-lf9gC82y.js → _server.ts.js-CBscduVo.js} +7 -7
  201. package/build/server/chunks/entries/endpoints/api/plugins/marketplace/registries/{_server.ts.js-Co8qdA33.js → _server.ts.js-CbuLtoHm.js} +7 -7
  202. package/build/server/chunks/entries/endpoints/api/plugins/roles/{_server.ts.js-DFoBOVVT.js → _server.ts.js-Dwfzypry.js} +6 -6
  203. package/build/server/chunks/entries/endpoints/api/plugins/updates/{_server.ts.js-CzTVAiDc.js → _server.ts.js-B5BKYa3M.js} +2 -2
  204. package/build/server/chunks/entries/endpoints/api/previews/check/{_server.ts.js-BAZpTlCx.js → _server.ts.js-C4c7W5Q_.js} +6 -6
  205. package/build/server/chunks/entries/endpoints/api/projects/_id_/passage/{_server.ts.js-jkk-r-nJ.js → _server.ts.js-D6V8uWHn.js} +7 -7
  206. package/build/server/chunks/entries/endpoints/api/projects/_id_/passage/commands/{_server.ts.js-BdsAFbko.js → _server.ts.js-B2ihTXgb.js} +7 -7
  207. package/build/server/chunks/entries/endpoints/api/projects/_id_/passage/consent/{_server.ts.js-DiMBVbVj.js → _server.ts.js-kXH0W1Ky.js} +7 -7
  208. package/build/server/chunks/entries/endpoints/api/projects/_id_/passage/draft/{_server.ts.js-BtDKXwvJ.js → _server.ts.js-DzwBz0wz.js} +7 -7
  209. package/build/server/chunks/entries/endpoints/api/projects/_id_/passage/file/{_server.ts.js-C02cyG4M.js → _server.ts.js-uTK3V5EE.js} +7 -7
  210. package/build/server/chunks/entries/endpoints/api/projects/_id_/passage/test/{_server.ts.js-CA0wN6yE.js → _server.ts.js-Cl4zIULt.js} +7 -7
  211. package/build/server/chunks/entries/endpoints/api/second-mates/_id_/peek/{_server.ts.js-BPPzbpED.js → _server.ts.js-DqjxxFau.js} +6 -6
  212. package/build/server/chunks/entries/endpoints/api/services/{_server.ts.js-FbF3xSIs.js → _server.ts.js-dVN9ikOu.js} +6 -6
  213. package/build/server/chunks/entries/endpoints/api/setup/{_server.ts.js-BmS6o8yc.js → _server.ts.js-_iOzae7t.js} +22 -9
  214. package/build/server/chunks/entries/endpoints/api/slots/{_server.ts.js-EsX_IGvt.js → _server.ts.js-XMhnf3Ej.js} +6 -6
  215. package/build/server/chunks/entries/endpoints/api/tasks/_id_/{_server.ts.js-BgBAYDN4.js → _server.ts.js-KZTObDbB.js} +7 -7
  216. package/build/server/chunks/entries/endpoints/api/tasks/_id_/artifacts/_...name_/{_server.ts.js-DuTLNykO.js → _server.ts.js-DyjUgwF7.js} +6 -6
  217. package/build/server/chunks/entries/endpoints/api/tasks/_id_/diff/{_server.ts.js-DDy8igq7.js → _server.ts.js-CalJli32.js} +6 -6
  218. package/build/server/chunks/entries/endpoints/api/tasks/_id_/output/{_server.ts.js-D5pfyCzV.js → _server.ts.js-DWPP0yu8.js} +6 -6
  219. package/build/server/chunks/entries/endpoints/api/tasks/_id_/preview/{_server.ts.js-BA8S2_Gc.js → _server.ts.js-0Nyn7nbY.js} +6 -6
  220. package/build/server/chunks/entries/endpoints/api/tasks/_id_/preview/helper/{_server.ts.js-DbU3413y.js → _server.ts.js-3z5OVCPe.js} +7 -7
  221. package/build/server/chunks/entries/endpoints/api/vault/{_server.ts.js-BOfdrtdZ.js → _server.ts.js-AbPbPvOK.js} +6 -6
  222. package/build/server/chunks/entries/endpoints/api/wheelhouse/source/{_server.ts.js-BA5eDd2l.js → _server.ts.js-D029CrEh.js} +2 -2
  223. package/build/server/chunks/entries/endpoints/api/wheelhouse/update/{_server.ts.js-D5fyMbR0.js → _server.ts.js-BfHTqL2O.js} +2 -2
  224. package/build/server/chunks/entries/endpoints/api/wheelhouse/upgrade/{_server.ts.js-B53DnvyB.js → _server.ts.js-CIRed7Ae.js} +2 -2
  225. package/build/server/chunks/entries/endpoints/tasks/_id_/review/{_server.ts.js-bjte8O9v.js → _server.ts.js-CvvKgDa5.js} +6 -6
  226. package/build/server/chunks/entries/{hooks.server.js-vOikVCYe.js → hooks.server.js-C9TJKrED.js} +6 -6
  227. package/build/server/chunks/entries/pages/{_layout.server.ts.js-MabiHA-3.js → _layout.server.ts.js-BfjTrg6R.js} +2 -2
  228. package/build/server/chunks/entries/pages/{_page.server.ts.js-B2yCD9g1.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-0eAEf9gY.js → _page.server.ts.js-aZNQQOb5.js} +2 -2
  231. package/build/server/chunks/entries/pages/deck/{_page.server.ts.js-COZ-0Oqo.js → _page.server.ts.js-CLBsxhmZ.js} +2 -2
  232. package/build/server/chunks/entries/pages/files/{_page.server.ts.js-BewL0sIN.js → _page.server.ts.js-Dtrn3Jt8.js} +2 -2
  233. package/build/server/chunks/entries/pages/harbour/{_page.server.ts.js-BnCRyETa.js → _page.server.ts.js-DYrU0BeU.js} +2 -2
  234. package/build/server/chunks/entries/pages/headroom/{_page.server.ts.js-D5_3UMoa.js → _page.server.ts.js-UKBrFpbo.js} +2 -2
  235. package/build/server/chunks/entries/pages/inbox/{_page.server.ts.js-jVFavtAR.js → _page.server.ts.js-COlncgCa.js} +2 -2
  236. package/build/server/chunks/entries/pages/plugins/_plugin_/_page_/{_page.server.ts.js-BZZjxm-x.js → _page.server.ts.js-Bay2qA2Q.js} +2 -2
  237. package/build/server/chunks/entries/pages/projects/_id_/{_page.server.ts.js-ByYW-gv7.js → _page.server.ts.js-CU7ds9LA.js} +3 -3
  238. package/build/server/chunks/entries/pages/projects/_id_/_plugin_/_tab_/{_page.server.ts.js-BDnIvRvv.js → _page.server.ts.js-BGGSKQqb.js} +3 -3
  239. package/build/server/chunks/entries/pages/projects/_id_/passage/{_page.server.ts.js-D--AVAN1.js → _page.server.ts.js-CnSUSATt.js} +4 -4
  240. package/build/server/chunks/entries/pages/projects/_id_/passage/edit/{_page.server.ts.js-Bh8glo5J.js → _page.server.ts.js-_7cU19E_.js} +2 -2
  241. package/build/server/chunks/entries/pages/remotes/{_page.server.ts.js-CdD2bSZT.js → _page.server.ts.js-C1Yxudql.js} +2 -2
  242. package/build/server/chunks/entries/pages/settings/cloud/{_page.server.ts.js-D-i30dSs.js → _page.server.ts.js-DTNE52aZ.js} +2 -2
  243. package/build/server/chunks/entries/pages/settings/gateway/{_page.server.ts.js-DvxWUFjz.js → _page.server.ts.js-CrhYOE-D.js} +2 -2
  244. package/build/server/chunks/entries/pages/settings/plugins/{_page.server.ts.js-1e73Wyr0.js → _page.server.ts.js-CifBaqFj.js} +2 -2
  245. package/build/server/chunks/entries/pages/settings/plugins/_plugin_/{_page.server.ts.js-BePUsUZP.js → _page.server.ts.js-EKuElYxp.js} +2 -2
  246. package/build/server/chunks/entries/pages/settings/setup/{_page.server.ts.js-jRF6Ywzb.js → _page.server.ts.js-BF8rdJhn.js} +2 -2
  247. package/build/server/chunks/entries/pages/settings/update/{_page.server.ts.js-DugL5l6V.js → _page.server.ts.js-CrElCh4A.js} +2 -2
  248. package/build/server/chunks/entries/pages/setup/{_page.server.ts.js-BiA9elO2.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-C2g0PwaJ.js → _page.server.ts.js-CYQPki7W.js} +3 -3
  251. package/build/server/chunks/entries/pages/tasks/_id_/doc/{_page.server.ts.js-BDtV-JJy.js → _page.server.ts.js-ecgyPy_T.js} +2 -2
  252. package/build/server/chunks/entries/pages/time/{_page.server.ts.js-BbZ21xiD.js → _page.server.ts.js-DSQc-xWi.js} +2 -2
  253. package/build/server/chunks/{handler-C9BTW4CD.js → handler-BHDQVtZw.js} +3 -3
  254. package/build/server/chunks/{index.js-pXGRX2i2.js → index.js-CrFdVwqU.js} +2 -2
  255. package/build/server/chunks/{manifest.js-CJa1L_3F.js → manifest.js-Dja0Po5-.js} +87 -87
  256. package/build/server/chunks/nodes/{0.js-C6oZQB5s.js → 0.js-NNn8Cg6_.js} +9 -9
  257. package/build/server/chunks/nodes/{1.js-Cttr3TG9.js → 1.js-B4fNjYoV.js} +2 -2
  258. package/build/server/chunks/nodes/{10.js-CB68zmyq.js → 10.js-CmLFT1Pj.js} +2 -2
  259. package/build/server/chunks/nodes/{11.js-CebGVYzq.js → 11.js-BQqPaZKt.js} +8 -8
  260. package/build/server/chunks/nodes/{12.js-D2y8h8be.js → 12.js-uooOT7mU.js} +9 -9
  261. package/build/server/chunks/nodes/{13.js-udsCT8sc.js → 13.js-Bwsn9ad_.js} +9 -9
  262. package/build/server/chunks/nodes/{14.js-LSLFIS3R.js → 14.js-RxQ3KjAZ.js} +10 -10
  263. package/build/server/chunks/nodes/{15.js-DwkMtPw0.js → 15.js-mrYlzb81.js} +9 -9
  264. package/build/server/chunks/nodes/{16.js-D6ljBLvA.js → 16.js-Uqhuspdc.js} +6 -6
  265. package/build/server/chunks/nodes/{17.js-CLW6wG6e.js → 17.js-xO4_vt9v.js} +2 -2
  266. package/build/server/chunks/nodes/{19.js-Do3gZhOd.js → 19.js-Bp0kyiVl.js} +6 -6
  267. package/build/server/chunks/nodes/{2.js-Bg6BRLgk.js → 2.js-DiF_CXqM.js} +9 -9
  268. package/build/server/chunks/nodes/{20.js-D6ikY3Qe.js → 20.js--x681h54.js} +8 -8
  269. package/build/server/chunks/nodes/{21.js-DG7qeWyl.js → 21.js-BWa_e-es.js} +8 -8
  270. package/build/server/chunks/nodes/{22.js-kAdDBEK4.js → 22.js-yLTp3XfM.js} +8 -8
  271. package/build/server/chunks/nodes/{23.js-CgwizXkn.js → 23.js-gx53Nzzh.js} +9 -9
  272. package/build/server/chunks/nodes/{24.js-LvCCKbXs.js → 24.js-Ci8dS_77.js} +4 -4
  273. package/build/server/chunks/nodes/{25.js-DD6hUVsN.js → 25.js-WBDsJGik.js} +10 -10
  274. package/build/server/chunks/nodes/{26.js-WwI1VHcM.js → 26.js-CZ4lN-gH.js} +9 -9
  275. package/build/server/chunks/nodes/{27.js-Ciywgqr7.js → 27.js-DPEzrdzK.js} +8 -8
  276. package/build/server/chunks/nodes/{28.js-CDVsbZwJ.js → 28.js-BJ38Ryxz.js} +8 -8
  277. package/build/server/chunks/nodes/{3.js-Bk1K3VSg.js → 3.js-D52LKb1w.js} +8 -8
  278. package/build/server/chunks/nodes/{4.js-DR53ln0s.js → 4.js-DDItN7w8.js} +8 -8
  279. package/build/server/chunks/nodes/{5.js-Bnpq5DqQ.js → 5.js-DJ1sVBVf.js} +7 -7
  280. package/build/server/chunks/nodes/{6.js-sO4LxGqG.js → 6.js-D_Aqt_hx.js} +8 -8
  281. package/build/server/chunks/nodes/{7.js-CjmrTr_m.js → 7.js-tS4lw5ka.js} +8 -8
  282. package/build/server/chunks/nodes/{8.js-CY5LlZct.js → 8.js-ChN4dMEU.js} +8 -8
  283. package/build/server/chunks/nodes/{9.js-VSnIai5w.js → 9.js-BpLLOWXa.js} +2 -2
  284. package/dist/cli.js +339 -167
  285. package/dist/wh-vault.js +1 -1
  286. package/package.json +1 -1
  287. package/skills/manage-wheelhouse/references/operations.md +52 -50
  288. package/build/client/_app/immutable/assets/0.DNJoTEVa.css.br +0 -0
  289. package/build/client/_app/immutable/chunks/79yuhTwS.js.br +0 -0
  290. package/build/client/_app/immutable/chunks/79yuhTwS.js.gz +0 -0
  291. package/build/client/_app/immutable/chunks/B1zE3zKP.js.br +0 -0
  292. package/build/client/_app/immutable/chunks/B1zE3zKP.js.gz +0 -0
  293. package/build/client/_app/immutable/chunks/B3KHKydy.js.br +0 -0
  294. package/build/client/_app/immutable/chunks/B3KHKydy.js.gz +0 -0
  295. package/build/client/_app/immutable/chunks/BPjwAHMu.js.br +0 -0
  296. package/build/client/_app/immutable/chunks/BPjwAHMu.js.gz +0 -0
  297. package/build/client/_app/immutable/chunks/BXiSaVju.js.br +0 -0
  298. package/build/client/_app/immutable/chunks/BXiSaVju.js.gz +0 -0
  299. package/build/client/_app/immutable/chunks/BosdQIFt.js.br +0 -0
  300. package/build/client/_app/immutable/chunks/BosdQIFt.js.gz +0 -0
  301. package/build/client/_app/immutable/chunks/CDSHscp6.js.br +0 -3
  302. package/build/client/_app/immutable/chunks/CDSHscp6.js.gz +0 -0
  303. package/build/client/_app/immutable/chunks/CI19kiwT.js.br +0 -0
  304. package/build/client/_app/immutable/chunks/CI19kiwT.js.gz +0 -0
  305. package/build/client/_app/immutable/chunks/CKE9neHp.js.br +0 -0
  306. package/build/client/_app/immutable/chunks/CLJu9cY5.js +0 -2
  307. package/build/client/_app/immutable/chunks/CLJu9cY5.js.br +0 -0
  308. package/build/client/_app/immutable/chunks/CLJu9cY5.js.gz +0 -0
  309. package/build/client/_app/immutable/chunks/CSU604UC.js.br +0 -0
  310. package/build/client/_app/immutable/chunks/CSU604UC.js.gz +0 -0
  311. package/build/client/_app/immutable/chunks/CgZovtjz.js.br +0 -0
  312. package/build/client/_app/immutable/chunks/CgZovtjz.js.gz +0 -0
  313. package/build/client/_app/immutable/chunks/ClYd4imU.js.br +0 -0
  314. package/build/client/_app/immutable/chunks/ClYd4imU.js.gz +0 -0
  315. package/build/client/_app/immutable/chunks/CsmF6Hwj.js.br +0 -0
  316. package/build/client/_app/immutable/chunks/CsmF6Hwj.js.gz +0 -0
  317. package/build/client/_app/immutable/chunks/Cwo48ib8.js +0 -1
  318. package/build/client/_app/immutable/chunks/Cwo48ib8.js.br +0 -0
  319. package/build/client/_app/immutable/chunks/Cwo48ib8.js.gz +0 -0
  320. package/build/client/_app/immutable/chunks/D8J1M-4m.js.br +0 -0
  321. package/build/client/_app/immutable/chunks/D8J1M-4m.js.gz +0 -0
  322. package/build/client/_app/immutable/chunks/DFrn6Xyh.js.br +0 -0
  323. package/build/client/_app/immutable/chunks/DFrn6Xyh.js.gz +0 -0
  324. package/build/client/_app/immutable/chunks/fhAu_Obx.js.br +0 -0
  325. package/build/client/_app/immutable/chunks/fhAu_Obx.js.gz +0 -0
  326. package/build/client/_app/immutable/chunks/qmyjnG6s.js.br +0 -0
  327. package/build/client/_app/immutable/chunks/qmyjnG6s.js.gz +0 -0
  328. package/build/client/_app/immutable/chunks/xHBeYlGm.js.br +0 -0
  329. package/build/client/_app/immutable/chunks/xHBeYlGm.js.gz +0 -0
  330. package/build/client/_app/immutable/entry/app.DwV2pwLU.js.br +0 -0
  331. package/build/client/_app/immutable/entry/app.DwV2pwLU.js.gz +0 -0
  332. package/build/client/_app/immutable/entry/start.CAfmMhjm.js +0 -1
  333. package/build/client/_app/immutable/entry/start.CAfmMhjm.js.br +0 -0
  334. package/build/client/_app/immutable/entry/start.CAfmMhjm.js.gz +0 -0
  335. package/build/client/_app/immutable/nodes/0.DF8hnsli.js.br +0 -0
  336. package/build/client/_app/immutable/nodes/0.DF8hnsli.js.gz +0 -0
  337. package/build/client/_app/immutable/nodes/1.B5FnFSGX.js.br +0 -0
  338. package/build/client/_app/immutable/nodes/1.B5FnFSGX.js.gz +0 -0
  339. package/build/client/_app/immutable/nodes/10.COzSUd5H.js.br +0 -0
  340. package/build/client/_app/immutable/nodes/10.COzSUd5H.js.gz +0 -0
  341. package/build/client/_app/immutable/nodes/11.hxSy1hC3.js.br +0 -0
  342. package/build/client/_app/immutable/nodes/11.hxSy1hC3.js.gz +0 -0
  343. package/build/client/_app/immutable/nodes/12.C7_etTt9.js.br +0 -0
  344. package/build/client/_app/immutable/nodes/12.C7_etTt9.js.gz +0 -0
  345. package/build/client/_app/immutable/nodes/13.DmZBXkEn.js.br +0 -0
  346. package/build/client/_app/immutable/nodes/13.DmZBXkEn.js.gz +0 -0
  347. package/build/client/_app/immutable/nodes/14.B2FfmJwY.js.br +0 -0
  348. package/build/client/_app/immutable/nodes/14.B2FfmJwY.js.gz +0 -0
  349. package/build/client/_app/immutable/nodes/15.DOXGz5UB.js.br +0 -0
  350. package/build/client/_app/immutable/nodes/15.DOXGz5UB.js.gz +0 -0
  351. package/build/client/_app/immutable/nodes/16.9Kdcqd35.js.br +0 -0
  352. package/build/client/_app/immutable/nodes/16.9Kdcqd35.js.gz +0 -0
  353. package/build/client/_app/immutable/nodes/17.rjXh_9jf.js.br +0 -0
  354. package/build/client/_app/immutable/nodes/17.rjXh_9jf.js.gz +0 -0
  355. package/build/client/_app/immutable/nodes/19.BDL7z_Qb.js.br +0 -0
  356. package/build/client/_app/immutable/nodes/19.BDL7z_Qb.js.gz +0 -0
  357. package/build/client/_app/immutable/nodes/2.BCbkmPbx.js.br +0 -0
  358. package/build/client/_app/immutable/nodes/2.BCbkmPbx.js.gz +0 -0
  359. package/build/client/_app/immutable/nodes/20.CmA-uI_h.js.br +0 -0
  360. package/build/client/_app/immutable/nodes/20.CmA-uI_h.js.gz +0 -0
  361. package/build/client/_app/immutable/nodes/21.DXJrG-NW.js.br +0 -0
  362. package/build/client/_app/immutable/nodes/21.DXJrG-NW.js.gz +0 -0
  363. package/build/client/_app/immutable/nodes/22.D1PSb-pN.js.br +0 -0
  364. package/build/client/_app/immutable/nodes/22.D1PSb-pN.js.gz +0 -0
  365. package/build/client/_app/immutable/nodes/23.DsgvXr3A.js.br +0 -0
  366. package/build/client/_app/immutable/nodes/23.DsgvXr3A.js.gz +0 -0
  367. package/build/client/_app/immutable/nodes/24.DYbfQRKi.js.br +0 -0
  368. package/build/client/_app/immutable/nodes/24.DYbfQRKi.js.gz +0 -0
  369. package/build/client/_app/immutable/nodes/25.DchwdBic.js +0 -15
  370. package/build/client/_app/immutable/nodes/25.DchwdBic.js.br +0 -0
  371. package/build/client/_app/immutable/nodes/25.DchwdBic.js.gz +0 -0
  372. package/build/client/_app/immutable/nodes/26.DGQvgO-w.js.br +0 -0
  373. package/build/client/_app/immutable/nodes/26.DGQvgO-w.js.gz +0 -0
  374. package/build/client/_app/immutable/nodes/28.C-Ubf5oN.js.br +0 -0
  375. package/build/client/_app/immutable/nodes/28.C-Ubf5oN.js.gz +0 -0
  376. package/build/client/_app/immutable/nodes/3.BZFHR-pC.js.br +0 -0
  377. package/build/client/_app/immutable/nodes/3.BZFHR-pC.js.gz +0 -0
  378. package/build/client/_app/immutable/nodes/4.CAiVTgL3.js.br +0 -0
  379. package/build/client/_app/immutable/nodes/4.CAiVTgL3.js.gz +0 -0
  380. package/build/client/_app/immutable/nodes/6.Bpt4zq5B.js.br +0 -0
  381. package/build/client/_app/immutable/nodes/6.Bpt4zq5B.js.gz +0 -0
  382. package/build/client/_app/immutable/nodes/7.DqfjvXPm.js.br +0 -0
  383. package/build/client/_app/immutable/nodes/7.DqfjvXPm.js.gz +0 -0
  384. package/build/client/_app/immutable/nodes/8.CCshJNeL.js.br +0 -0
  385. package/build/client/_app/immutable/nodes/8.CCshJNeL.js.gz +0 -0
  386. package/build/client/_app/immutable/nodes/9.DAgz6-ct.js.br +0 -0
  387. package/build/client/_app/immutable/nodes/9.DAgz6-ct.js.gz +0 -0
  388. 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.0";
12
+ var version = "0.18.0";
13
13
 
14
14
  // src/lib/harness.ts
15
15
  var HARNESSES = ["claude", "codex", "opencode", "pi"];
@@ -24,11 +24,11 @@ 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
31
- import { accessSync, constants, statSync } from "node:fs";
31
+ import { accessSync, constants, rmSync, statSync, writeFileSync } from "node:fs";
32
32
  import path from "node:path";
33
33
 
34
34
  // src/lib/server/firstmate/exec.ts
@@ -214,7 +214,180 @@ var DROPPED_VARIABLES = [
214
214
  "CODEX_INTERNAL_ORIGINATOR_OVERRIDE"
215
215
  ];
216
216
  var DROP = new Set(DROPPED_VARIABLES);
217
+ var COMMAND_UNSET = [
218
+ ...DROPPED_VARIABLES,
219
+ "CLAUDE_CODE_CHILD_SESSION",
220
+ "CLAUDE_CODE_SESSION_ID",
221
+ "CLAUDE_CODE_SESSION_ATTENDED",
222
+ "CLAUDE_CODE_EXECPATH",
223
+ "CLAUDE_EFFORT"
224
+ ];
217
225
  var PASTE_MAX_INPUT_BYTES = 65 * 1024;
226
+ var PANE_VARIABLES = [
227
+ "TMUX",
228
+ "TMUX_PANE",
229
+ "TERM",
230
+ "TERM_PROGRAM",
231
+ "TERM_PROGRAM_VERSION",
232
+ "COLORTERM"
233
+ ];
234
+ var SESSION_SCRIPT = [
235
+ `for n in $(env | while IFS== read -r n _; do case "$n" in ('' | [0-9]* | *[!A-Za-z0-9_]* | ${PANE_VARIABLES.join(" | ")}) ;; (*) echo "$n" ;; esac; done); do unset "$n"; done`,
236
+ '. "$1"',
237
+ '/bin/rm -f "$1"',
238
+ "shift",
239
+ 'exec "$@"'
240
+ ].join("\n");
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
+ }
218
391
 
219
392
  // cli/harness.ts
220
393
  async function savedHarness(file) {
@@ -239,7 +412,7 @@ async function savedHarness(file) {
239
412
  }
240
413
  }
241
414
  async function saveHarness(file, harness) {
242
- await mkdir(path2.dirname(file), { recursive: true, mode: 448 });
415
+ await mkdir(path4.dirname(file), { recursive: true, mode: 448 });
243
416
  const temporary = `${file}.${process.pid}.${randomBytes(8).toString("hex")}.tmp`;
244
417
  try {
245
418
  await writeFile(temporary, `${JSON.stringify({ harness })}
@@ -288,9 +461,10 @@ Number (blank to cancel): `, {
288
461
  input.close();
289
462
  }
290
463
  }
464
+ var savedHarnessNow = (configDir) => readSavedChoice(configDir)?.harness ?? null;
291
465
  async function resolveHarness(options2) {
292
466
  const { env } = options2;
293
- const file = path2.join(options2.configDir, "harness.json");
467
+ const file = path4.join(options2.configDir, "harness.json");
294
468
  const requested = options2.explicit ?? env.WHEELHOUSE_HARNESS;
295
469
  if (requested !== void 0) {
296
470
  const harness2 = parseHarness(requested);
@@ -299,6 +473,8 @@ async function resolveHarness(options2) {
299
473
  }
300
474
  const saved = await savedHarness(file);
301
475
  if (saved) return saved;
476
+ const answers = readAnswers(options2.configDir);
477
+ if (answers.state === "ok") return answers.choice.agent;
302
478
  const interactive = options2.interactive ?? (process.stdin.isTTY === true && process.stdout.isTTY === true);
303
479
  if (!interactive) return "claude";
304
480
  const find = options2.find ?? ((name) => which(name, env.PATH));
@@ -361,7 +537,7 @@ function detectHosted(env) {
361
537
  // src/lib/server/firstmate/install.ts
362
538
  import { access, constants as constants2, open, stat } from "node:fs/promises";
363
539
  import { existsSync, statSync as statSync2 } from "node:fs";
364
- import path3 from "node:path";
540
+ import path5 from "node:path";
365
541
  var MESSAGING_PURPOSE = "messages to Firstmate";
366
542
  var SUPPORTED_SCRIPTS = [
367
543
  {
@@ -390,7 +566,7 @@ var SUPPORTED_SCRIPTS = [
390
566
  purpose: "worker terminal output"
391
567
  }
392
568
  ];
393
- var scriptPath = (firstmateDir, name) => path3.join(firstmateDir, "bin", name);
569
+ var scriptPath = (firstmateDir, name) => path5.join(firstmateDir, "bin", name);
394
570
  var isDir = (p) => {
395
571
  try {
396
572
  return statSync2(p).isDirectory();
@@ -402,15 +578,15 @@ function looksLikeFirstmate(dir) {
402
578
  return existsSync(scriptPath(dir, "fm-fleet-snapshot.sh"));
403
579
  }
404
580
  function findFirstmateDir(start) {
405
- let dir = path3.resolve(start);
581
+ let dir = path5.resolve(start);
406
582
  for (; ; ) {
407
583
  if (looksLikeFirstmate(dir)) return dir;
408
- const parent = path3.dirname(dir);
584
+ const parent = path5.dirname(dir);
409
585
  if (parent === dir) return null;
410
586
  dir = parent;
411
587
  }
412
588
  }
413
- 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;
414
590
  function notFirstmate(dir) {
415
591
  if (!isDir(dir)) return `Firstmate directory not found: ${dir}`;
416
592
  if (!looksLikeFirstmate(dir)) {
@@ -423,7 +599,7 @@ function resolveInstall(input) {
423
599
  let firstmateDir;
424
600
  let source;
425
601
  if (input.firstmate) {
426
- firstmateDir = path3.resolve(input.cwd, expandHome(input.firstmate, input.env));
602
+ firstmateDir = path5.resolve(input.cwd, expandHome(input.firstmate, input.env));
427
603
  const wrong = notFirstmate(firstmateDir);
428
604
  if (wrong) return { ok: false, error: wrong, missing: false };
429
605
  source = "flag";
@@ -434,7 +610,7 @@ function resolveInstall(input) {
434
610
  source = "cwd";
435
611
  notes.push(`Found Firstmate at ${firstmateDir}`);
436
612
  } else if (input.remembered) {
437
- firstmateDir = path3.resolve(input.remembered.firstmate);
613
+ firstmateDir = path5.resolve(input.remembered.firstmate);
438
614
  const wrong = notFirstmate(firstmateDir);
439
615
  if (wrong) {
440
616
  return {
@@ -455,12 +631,12 @@ function resolveInstall(input) {
455
631
  }
456
632
  let homeDir;
457
633
  if (input.home) {
458
- homeDir = path3.resolve(input.cwd, expandHome(input.home, input.env));
634
+ homeDir = path5.resolve(input.cwd, expandHome(input.home, input.env));
459
635
  } else if (input.env.FM_HOME) {
460
- 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));
461
637
  notes.push(`Using the operational home from FM_HOME: ${homeDir}`);
462
638
  } else if (source === "remembered" && input.remembered?.home) {
463
- homeDir = path3.resolve(input.remembered.home);
639
+ homeDir = path5.resolve(input.remembered.home);
464
640
  } else {
465
641
  homeDir = firstmateDir;
466
642
  }
@@ -468,7 +644,7 @@ function resolveInstall(input) {
468
644
  if (!isDir(homeDir)) {
469
645
  return { ok: false, error: `Firstmate home not found: ${homeDir}`, missing: !flagged };
470
646
  }
471
- if (!isDir(path3.join(homeDir, "state"))) {
647
+ if (!isDir(path5.join(homeDir, "state"))) {
472
648
  return {
473
649
  ok: false,
474
650
  error: `${homeDir} is not a Firstmate operational home (it has no state/ directory). Pass --home <dir>.`,
@@ -593,7 +769,7 @@ function defaultKeychain() {
593
769
  // src/lib/server/plugins/config.ts
594
770
  import { mkdir as mkdir2, readFile as readFile2, rename as rename2, stat as stat2, writeFile as writeFile2 } from "node:fs/promises";
595
771
  import { homedir } from "node:os";
596
- import path4 from "node:path";
772
+ import path6 from "node:path";
597
773
 
598
774
  // src/lib/plugins/types.ts
599
775
  var SLOTS = [
@@ -612,9 +788,9 @@ var ROLES = ["review.surface"];
612
788
 
613
789
  // src/lib/server/plugins/config.ts
614
790
  function defaultConfigDir(env) {
615
- if (env.WHEELHOUSE_CONFIG_DIR) return path4.resolve(env.WHEELHOUSE_CONFIG_DIR);
616
- if (env.XDG_CONFIG_HOME) return path4.join(env.XDG_CONFIG_HOME, "wheelhouse");
617
- 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");
618
794
  }
619
795
  var PLUGINS_FILE = "plugins.json";
620
796
  var isRecord = (v) => typeof v === "object" && v !== null && !Array.isArray(v);
@@ -689,7 +865,7 @@ async function readRaw(file) {
689
865
  return { ok: true, raw: JSON.parse(text2) };
690
866
  }
691
867
  async function readPluginSettings(dir, id) {
692
- const r = await readRaw(path4.join(dir, PLUGINS_FILE));
868
+ const r = await readRaw(path6.join(dir, PLUGINS_FILE));
693
869
  if (!r.ok) return r;
694
870
  const plugins = r.raw?.plugins ?? {};
695
871
  return { ok: true, settings: { ...plugins[id]?.settings ?? {} } };
@@ -697,7 +873,7 @@ async function readPluginSettings(dir, id) {
697
873
  var editing = Promise.resolve();
698
874
  function editFile(dir, change) {
699
875
  const run = editing.then(async () => {
700
- const file = path4.join(dir, PLUGINS_FILE);
876
+ const file = path6.join(dir, PLUGINS_FILE);
701
877
  const r = await readRaw(file);
702
878
  if (!r.ok) return r;
703
879
  const raw = r.raw ?? {};
@@ -760,7 +936,7 @@ import {
760
936
  stat as stat3,
761
937
  writeFile as writeFile3
762
938
  } from "node:fs/promises";
763
- import path5 from "node:path";
939
+ import path7 from "node:path";
764
940
 
765
941
  // src/lib/cloud.ts
766
942
  var DEFAULT_GATEWAY = "https://cloud.chrisjowen.net";
@@ -895,8 +1071,8 @@ var HOP_BY_HOP = /* @__PURE__ */ new Set([
895
1071
  "transfer-encoding",
896
1072
  "upgrade"
897
1073
  ]);
898
- function isRestartPath(path29) {
899
- let p = path29.split(/[?#]/, 1)[0];
1074
+ function isRestartPath(path31) {
1075
+ let p = path31.split(/[?#]/, 1)[0];
900
1076
  for (let i = 0; i < 3; i++) {
901
1077
  try {
902
1078
  const d = decodeURIComponent(p);
@@ -1196,7 +1372,7 @@ var CLOUD_SETTINGS_SCHEMA = "wheelhouse-cloud-settings.v1";
1196
1372
  var CLOUD_STATUS_SCHEMA = "wheelhouse-cloud-status.v1";
1197
1373
  var CLOUD_KEYCHAIN_SERVICE = "wheelhouse-cloud";
1198
1374
  var lapsed = (p, now = Date.now()) => !(now - Date.parse(p.requestedAt) <= PENDING_PINS_MS);
1199
- var cloudDir = (configDir) => path5.join(configDir, "cloud");
1375
+ var cloudDir = (configDir) => path7.join(configDir, "cloud");
1200
1376
  var LOOPBACK = /* @__PURE__ */ new Set(["127.0.0.1", "localhost", "[::1]"]);
1201
1377
  function gatewayOrigin(raw) {
1202
1378
  const u = URL.parse(raw.trim());
@@ -1284,7 +1460,7 @@ function parseSessions(v) {
1284
1460
  });
1285
1461
  }
1286
1462
  async function writeAtomic(file, text2) {
1287
- await mkdir3(path5.dirname(file), { recursive: true, mode: 448 });
1463
+ await mkdir3(path7.dirname(file), { recursive: true, mode: 448 });
1288
1464
  const tmp = `${file}.tmp-${process.pid}-${randomBytes3(4).toString("hex")}`;
1289
1465
  try {
1290
1466
  await writeFile3(tmp, text2, { mode: 384 });
@@ -1311,13 +1487,13 @@ var CloudSettings = class {
1311
1487
  dir;
1312
1488
  keychain;
1313
1489
  get file() {
1314
- return path5.join(this.dir, "settings.json");
1490
+ return path7.join(this.dir, "settings.json");
1315
1491
  }
1316
1492
  get keyFile() {
1317
- return path5.join(this.dir, "device.key");
1493
+ return path7.join(this.dir, "device.key");
1318
1494
  }
1319
1495
  get statusFile() {
1320
- return path5.join(this.dir, "status.json");
1496
+ return path7.join(this.dir, "status.json");
1321
1497
  }
1322
1498
  /** The settings, with defaults (off, not started, the default gateway, no device) for anything missing or unreadable, with why. */
1323
1499
  async read() {
@@ -1368,7 +1544,7 @@ var CloudSettings = class {
1368
1544
  }
1369
1545
  /** The Keychain account for this directory's device key, so each config directory has its own. */
1370
1546
  async keychainAccount() {
1371
- const real2 = await realpath(this.dir).catch(() => path5.resolve(this.dir));
1547
+ const real2 = await realpath(this.dir).catch(() => path7.resolve(this.dir));
1372
1548
  return `device:${createHash3("sha256").update(real2).digest("hex").slice(0, 16)}`;
1373
1549
  }
1374
1550
  /** The device key and where it is kept: the Keychain first, then the file. */
@@ -1809,8 +1985,8 @@ var Relay = class {
1809
1985
  if (this.streams.size >= this.opts.limits.maxStreams) return { ok: false, code: "limit" };
1810
1986
  const relay = parseRelay(msg.relay);
1811
1987
  const headers = parseHeaders(msg.headers);
1812
- const path29 = msg.path;
1813
- 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(" ")) {
1814
1990
  return { ok: false, code: "protocol", message: "The request is malformed." };
1815
1991
  }
1816
1992
  const refusal = this.opts.sessionRefusal?.(relay.sessionId);
@@ -1822,7 +1998,7 @@ var Relay = class {
1822
1998
  message: "Wheelhouse Cloud is turned off on this machine."
1823
1999
  };
1824
2000
  }
1825
- if (isRestartPath(path29)) {
2001
+ if (isRestartPath(path31)) {
1826
2002
  return {
1827
2003
  ok: false,
1828
2004
  code: "refused",
@@ -1832,7 +2008,7 @@ var Relay = class {
1832
2008
  const target = isObj2(msg.target) ? msg.target : {};
1833
2009
  const app = this.opts.targets.appPort();
1834
2010
  if (target.kind === "app") {
1835
- 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 };
1836
2012
  }
1837
2013
  const port = target.port;
1838
2014
  if (target.kind !== "port" || typeof port !== "number" || !Number.isInteger(port) || port < 1 || port > 65535) {
@@ -1843,7 +2019,7 @@ var Relay = class {
1843
2019
  }
1844
2020
  const late = this.opts.sessionRefusal?.(relay.sessionId);
1845
2021
  if (late) return { ok: false, code: "refused", message: late };
1846
- return { ok: true, port, host: "localhost", path: path29, headers, relay };
2022
+ return { ok: true, port, host: "localhost", path: path31, headers, relay };
1847
2023
  }
1848
2024
  /** §6.3: the headers for the local request. */
1849
2025
  localHeaders(a, originChecked, ws) {
@@ -2553,13 +2729,13 @@ var CloudService = class {
2553
2729
  // src/lib/server/plugins/installed.ts
2554
2730
  import { mkdir as mkdir4, readFile as readFile4, rename as rename4, writeFile as writeFile4 } from "node:fs/promises";
2555
2731
  import { homedir as homedir2 } from "node:os";
2556
- import path6 from "node:path";
2732
+ import path8 from "node:path";
2557
2733
  var INSTALLED_FILE = "installed.json";
2558
2734
  var SCHEMA = "wheelhouse-installed-plugins.v1";
2559
2735
  var EMPTY_INSTALLED = () => ({ schema: SCHEMA, plugins: {} });
2560
2736
  function defaultPluginsDir(env) {
2561
- if (env.WHEELHOUSE_PLUGINS_DIR) return path6.resolve(env.WHEELHOUSE_PLUGINS_DIR);
2562
- 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");
2563
2739
  }
2564
2740
  var isRecord2 = (v) => typeof v === "object" && v !== null && !Array.isArray(v);
2565
2741
  function record(v) {
@@ -2571,7 +2747,7 @@ function record(v) {
2571
2747
  return { repository, ref, commit, version: version2, installedAt, enabled };
2572
2748
  }
2573
2749
  async function readInstalled(dir) {
2574
- const file = path6.join(dir, INSTALLED_FILE);
2750
+ const file = path8.join(dir, INSTALLED_FILE);
2575
2751
  let text2;
2576
2752
  try {
2577
2753
  text2 = await readFile4(file, "utf8");
@@ -2599,7 +2775,7 @@ async function readInstalled(dir) {
2599
2775
  }
2600
2776
  async function writeInstalled(dir, installed) {
2601
2777
  await mkdir4(dir, { recursive: true });
2602
- const file = path6.join(dir, INSTALLED_FILE);
2778
+ const file = path8.join(dir, INSTALLED_FILE);
2603
2779
  const tmp = `${file}.${process.pid}.tmp`;
2604
2780
  await writeFile4(tmp, `${JSON.stringify(installed, null, " ")}
2605
2781
  `);
@@ -2607,21 +2783,21 @@ async function writeInstalled(dir, installed) {
2607
2783
  }
2608
2784
 
2609
2785
  // src/lib/server/setup/remembered.ts
2610
- import { mkdirSync, readFileSync, renameSync, writeFileSync } from "node:fs";
2611
- 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";
2612
2788
  var REMEMBERED_FILE = "firstmate.json";
2613
- var rememberedFile = (configDir) => path7.join(configDir, REMEMBERED_FILE);
2789
+ var rememberedFile = (configDir) => path9.join(configDir, REMEMBERED_FILE);
2614
2790
  function readRemembered(configDir) {
2615
2791
  let raw;
2616
2792
  try {
2617
- raw = JSON.parse(readFileSync(rememberedFile(configDir), "utf8"));
2793
+ raw = JSON.parse(readFileSync3(rememberedFile(configDir), "utf8"));
2618
2794
  } catch {
2619
2795
  return null;
2620
2796
  }
2621
2797
  if (typeof raw !== "object" || raw === null || Array.isArray(raw)) return null;
2622
2798
  const { firstmate, home } = raw;
2623
- if (typeof firstmate !== "string" || !path7.isAbsolute(firstmate)) return null;
2624
- 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))) {
2625
2801
  return null;
2626
2802
  }
2627
2803
  return { firstmate, home: typeof home === "string" ? home : null };
@@ -2629,7 +2805,7 @@ function readRemembered(configDir) {
2629
2805
 
2630
2806
  // src/lib/server/store/store.ts
2631
2807
  import { realpathSync } from "node:fs";
2632
- import path8 from "node:path";
2808
+ import path10 from "node:path";
2633
2809
 
2634
2810
  // src/lib/inbox.ts
2635
2811
  var SNOOZE_MS = 4 * 3600 * 1e3;
@@ -2653,27 +2829,27 @@ var SUMMARY_SYSTEM = [
2653
2829
 
2654
2830
  // src/lib/server/store/store.ts
2655
2831
  function defaultStateDir(env) {
2656
- if (env.WHEELHOUSE_STATE_DIR) return path8.resolve(env.WHEELHOUSE_STATE_DIR);
2657
- if (env.XDG_STATE_HOME) return path8.join(path8.resolve(env.XDG_STATE_HOME), "wheelhouse");
2658
- 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");
2659
2835
  }
2660
2836
  function real(p) {
2661
- const abs = path8.resolve(p);
2837
+ const abs = path10.resolve(p);
2662
2838
  try {
2663
2839
  return realpathSync(abs);
2664
2840
  } catch {
2665
- const parent = path8.dirname(abs);
2666
- 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));
2667
2843
  }
2668
2844
  }
2669
2845
  function isInside(p, dir) {
2670
- const rel = path8.relative(real(dir), real(p));
2671
- return rel === "" || !rel.startsWith("..") && !path8.isAbsolute(rel);
2846
+ const rel = path10.relative(real(dir), real(p));
2847
+ return rel === "" || !rel.startsWith("..") && !path10.isAbsolute(rel);
2672
2848
  }
2673
2849
 
2674
2850
  // src/lib/server/sessions/choice.ts
2675
- import { mkdirSync as mkdirSync2, readFileSync as readFileSync2, renameSync as renameSync2, rmSync, writeFileSync as writeFileSync2 } from "node:fs";
2676
- 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";
2677
2853
  var SESSION_BACKENDS = ["tmux", "herdr"];
2678
2854
  var SESSION_BACKEND_FILE = "session-backend.json";
2679
2855
  function parseSessionBackend(value) {
@@ -2685,12 +2861,12 @@ function parseSessionBackend(value) {
2685
2861
  }
2686
2862
  return backend;
2687
2863
  }
2688
- var savedBackendFile = (configDir) => path9.join(configDir, SESSION_BACKEND_FILE);
2864
+ var savedBackendFile = (configDir) => path11.join(configDir, SESSION_BACKEND_FILE);
2689
2865
  function firstmateBackend(homeDir) {
2690
2866
  if (!homeDir) return null;
2691
2867
  let text2;
2692
2868
  try {
2693
- text2 = readFileSync2(path9.join(homeDir, "config", "backend"), "utf8");
2869
+ text2 = readFileSync4(path11.join(homeDir, "config", "backend"), "utf8");
2694
2870
  } catch {
2695
2871
  return null;
2696
2872
  }
@@ -2704,7 +2880,7 @@ function readSavedBackend(configDir) {
2704
2880
  const file = savedBackendFile(configDir);
2705
2881
  let text2;
2706
2882
  try {
2707
- text2 = readFileSync2(file, "utf8");
2883
+ text2 = readFileSync4(file, "utf8");
2708
2884
  } catch (e) {
2709
2885
  if (e.code === "ENOENT") return { ok: true, backend: null };
2710
2886
  return { ok: false, error: `Cannot read ${file}. Check its permissions.` };
@@ -2755,14 +2931,6 @@ function resolveSessionBackend(opts) {
2755
2931
  var DEFAULT_HERDR_SESSION = "wheelhouse";
2756
2932
  var HERDR_SESSION = /^[A-Za-z0-9][A-Za-z0-9_-]{0,63}$/;
2757
2933
  var PASTE_MAX_BYTES = 65 * 1024;
2758
- var PANE_UNSET = [
2759
- ...DROPPED_VARIABLES,
2760
- "CLAUDE_CODE_CHILD_SESSION",
2761
- "CLAUDE_CODE_SESSION_ID",
2762
- "CLAUDE_CODE_SESSION_ATTENDED",
2763
- "CLAUDE_CODE_EXECPATH",
2764
- "CLAUDE_EFFORT"
2765
- ];
2766
2934
 
2767
2935
  // src/lib/server/restart.ts
2768
2936
  var KEY = /* @__PURE__ */ Symbol.for("wheelhouse.restart");
@@ -2772,26 +2940,26 @@ function setRestart(fn) {
2772
2940
  }
2773
2941
 
2774
2942
  // src/lib/server/upgrade/settings.ts
2775
- import { existsSync as existsSync2, readFileSync as readFileSync3, rmSync as rmSync2 } from "node:fs";
2776
- import path10 from "node:path";
2777
- var updateDir = (configDir) => path10.join(configDir, "update");
2778
- 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");
2779
2947
  function takeHandoff(configDir) {
2780
2948
  const file = handoffFile(configDir);
2781
2949
  let dir;
2782
2950
  try {
2783
- dir = readFileSync3(file, "utf8").trim();
2951
+ dir = readFileSync5(file, "utf8").trim();
2784
2952
  } catch {
2785
2953
  return null;
2786
2954
  }
2787
- rmSync2(file, { force: true });
2788
- if (!dir || !path10.isAbsolute(dir)) return null;
2789
- 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"));
2790
2958
  return built ? dir : null;
2791
2959
  }
2792
2960
 
2793
2961
  // cli/gateway.ts
2794
- import path12 from "node:path";
2962
+ import path14 from "node:path";
2795
2963
  import { Argument, Command, InvalidArgumentError } from "commander";
2796
2964
 
2797
2965
  // src/lib/gateway.ts
@@ -2935,7 +3103,7 @@ import {
2935
3103
  stat as stat4,
2936
3104
  writeFile as writeFile5
2937
3105
  } from "node:fs/promises";
2938
- import path11 from "node:path";
3106
+ import path13 from "node:path";
2939
3107
 
2940
3108
  // src/lib/bell.ts
2941
3109
  var ALERT_KINDS = [
@@ -2954,7 +3122,7 @@ var QUIET_AFTER_MS = 20 * 6e4;
2954
3122
  // src/lib/server/gateway/settings.ts
2955
3123
  var GATEWAY_SETTINGS_SCHEMA = "wheelhouse-gateway-settings.v1";
2956
3124
  var SETTINGS_FILE = "settings.json";
2957
- var gatewayDir = (configDir) => path11.join(configDir, "gateway");
3125
+ var gatewayDir = (configDir) => path13.join(configDir, "gateway");
2958
3126
  function defaultSettings() {
2959
3127
  return Object.fromEntries(
2960
3128
  GATEWAY_CHANNELS.map((c) => [
@@ -2987,7 +3155,7 @@ function parseChannel(v, fallback) {
2987
3155
  };
2988
3156
  }
2989
3157
  async function writeAtomic2(file, text2) {
2990
- await mkdir5(path11.dirname(file), { recursive: true, mode: 448 });
3158
+ await mkdir5(path13.dirname(file), { recursive: true, mode: 448 });
2991
3159
  const tmp = `${file}.tmp-${process.pid}-${randomBytes5(4).toString("hex")}`;
2992
3160
  try {
2993
3161
  await writeFile5(tmp, text2, { mode: 384 });
@@ -3005,10 +3173,10 @@ var GatewaySettings = class {
3005
3173
  dir;
3006
3174
  keychain;
3007
3175
  get file() {
3008
- return path11.join(this.dir, SETTINGS_FILE);
3176
+ return path13.join(this.dir, SETTINGS_FILE);
3009
3177
  }
3010
3178
  tokenFile(channel) {
3011
- return path11.join(this.dir, `${channel}.token`);
3179
+ return path13.join(this.dir, `${channel}.token`);
3012
3180
  }
3013
3181
  /** The settings, with defaults for anything missing; an unreadable file reads as the defaults, with why. */
3014
3182
  async read() {
@@ -3073,7 +3241,7 @@ var GatewaySettings = class {
3073
3241
  * directory has its own token.
3074
3242
  */
3075
3243
  async keychainAccount(channel) {
3076
- const real2 = await realpath2(this.dir).catch(() => path11.resolve(this.dir));
3244
+ const real2 = await realpath2(this.dir).catch(() => path13.resolve(this.dir));
3077
3245
  return `${channel}:${createHash4("sha256").update(real2).digest("hex").slice(0, 16)}`;
3078
3246
  }
3079
3247
  /** Keep the token in the Keychain, else in its file, replacing the one before; returns where it went. */
@@ -3192,7 +3360,7 @@ function gatewayCommand(over = {}) {
3192
3360
  );
3193
3361
  const settingsFor = (c) => {
3194
3362
  const dir = c.optsWithGlobals().configDir;
3195
- const configDir = dir ? path12.resolve(dir) : defaultConfigDir(deps.env);
3363
+ const configDir = dir ? path14.resolve(dir) : defaultConfigDir(deps.env);
3196
3364
  const found = resolveInstall({
3197
3365
  cwd: process.cwd(),
3198
3366
  env: deps.env,
@@ -3313,16 +3481,16 @@ function gatewayCommand(over = {}) {
3313
3481
 
3314
3482
  // cli/plugin.ts
3315
3483
  import { createInterface as createInterface2 } from "node:readline/promises";
3316
- import path16 from "node:path";
3484
+ import path18 from "node:path";
3317
3485
  import { Command as Command2 } from "commander";
3318
3486
 
3319
3487
  // src/lib/server/plugins/install.ts
3320
3488
  import { execFile } from "node:child_process";
3321
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";
3322
- import path14 from "node:path";
3490
+ import path16 from "node:path";
3323
3491
 
3324
3492
  // src/lib/server/plugins/manifest.ts
3325
- import path13 from "node:path";
3493
+ import path15 from "node:path";
3326
3494
 
3327
3495
  // src/lib/plugins/addresses.ts
3328
3496
  var TEMPLATE = /^[a-z0-9-]*\{port\}[a-z0-9-]*(?:\.[a-z0-9-]+)*\.localhost$/;
@@ -3339,7 +3507,7 @@ var SUPPORTED_API_VERSIONS = [PLUGIN_API_VERSION, PLUGIN_API_VERSION - 1].filter
3339
3507
  // src/lib/server/plugins/manifest.ts
3340
3508
  var MANIFEST_DIR = ".wheelhouse-plugin";
3341
3509
  var MANIFEST_FILE = "plugin.json";
3342
- var manifestPath = (pluginDir) => path13.join(pluginDir, MANIFEST_DIR, MANIFEST_FILE);
3510
+ var manifestPath = (pluginDir) => path15.join(pluginDir, MANIFEST_DIR, MANIFEST_FILE);
3343
3511
  var MANIFEST_FIELDS = [
3344
3512
  "$schema",
3345
3513
  "name",
@@ -3387,7 +3555,7 @@ var SEMVER = /^\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?(?:\+[0-9A-Za-z.-]+)?$/;
3387
3555
  var MAX_TEXT = 400;
3388
3556
  var isRecord3 = (v) => typeof v === "object" && v !== null && !Array.isArray(v);
3389
3557
  function insidePath(f) {
3390
- 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 === ".");
3391
3559
  }
3392
3560
  var ICON_TYPES = {
3393
3561
  ".svg": "image/svg+xml",
@@ -3486,7 +3654,7 @@ function wheelhouse(v) {
3486
3654
  }
3487
3655
  if (!insidePath(c.icon))
3488
3656
  throw new Invalid(`${where}.icon must be a plain path inside the plugin`);
3489
- if (!ICON_TYPES[path13.extname(c.icon).toLowerCase()]) {
3657
+ if (!ICON_TYPES[path15.extname(c.icon).toLowerCase()]) {
3490
3658
  throw new Invalid(`${where}.icon must be an image: ${Object.keys(ICON_TYPES).join(", ")}`);
3491
3659
  }
3492
3660
  declared.icon = c.icon;
@@ -3865,7 +4033,7 @@ async function fetchSource(source, into, deps) {
3865
4033
  await step(["checkout", "-q", "--detach", "FETCH_HEAD"]);
3866
4034
  }
3867
4035
  const commit = await step(["rev-parse", "HEAD"]);
3868
- await rm4(path14.join(into, ".git"), { recursive: true, force: true });
4036
+ await rm4(path16.join(into, ".git"), { recursive: true, force: true });
3869
4037
  return commit;
3870
4038
  }
3871
4039
  async function checkCopy(dir) {
@@ -3886,12 +4054,12 @@ async function checkCopy(dir) {
3886
4054
  if (!rel) continue;
3887
4055
  let file;
3888
4056
  try {
3889
- file = await realpath3(path14.join(base, rel));
4057
+ file = await realpath3(path16.join(base, rel));
3890
4058
  if (!(await stat5(file)).isFile()) throw new Error();
3891
4059
  } catch {
3892
4060
  throw new Refused(`its ${what} ${rel} is missing`);
3893
4061
  }
3894
- if (!file.startsWith(base + path14.sep))
4062
+ if (!file.startsWith(base + path16.sep))
3895
4063
  throw new Refused(`its ${what} leads outside the plugin`);
3896
4064
  }
3897
4065
  return m;
@@ -3935,7 +4103,7 @@ function describeManifest(m, from, commit) {
3935
4103
  }
3936
4104
  async function withStaging(dir, work) {
3937
4105
  await mkdir6(dir, { recursive: true });
3938
- const staging = await mkdtemp(path14.join(dir, ".staging-"));
4106
+ const staging = await mkdtemp(path16.join(dir, ".staging-"));
3939
4107
  try {
3940
4108
  return await work(staging);
3941
4109
  } finally {
@@ -3972,7 +4140,7 @@ async function settle(m, deps, o) {
3972
4140
  async function keepSettings(id, settings2, deps) {
3973
4141
  const w = await writePluginSettings(deps.configDir, id, settings2);
3974
4142
  if (!w.ok) throw new Refused(`could not keep ${id}'s settings: ${w.error}`);
3975
- 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)}.`);
3976
4144
  }
3977
4145
  async function reload(deps, what, yes) {
3978
4146
  const r = await deps.restart(async (url, busy) => {
@@ -4013,7 +4181,7 @@ function install(spec, deps, o = {}) {
4013
4181
  const commit = await fetchSource(source, staging, deps);
4014
4182
  expected(commit, o.expect, repository);
4015
4183
  const m = await checkCopy(staging);
4016
- const target = path14.join(deps.dir, m.name);
4184
+ const target = path16.join(deps.dir, m.name);
4017
4185
  if (installed.plugins[m.name]) {
4018
4186
  throw new Refused(
4019
4187
  `${m.name} is already installed from ${label(installed.plugins[m.name])}; use \`wheelhouse plugin update ${m.name}\``
@@ -4088,9 +4256,9 @@ function update(id, deps, o = {}) {
4088
4256
  if (!o.yes && !await deps.confirm(`Update ${id}?`)) throw new Refused("not updated");
4089
4257
  const settings2 = await settle(m, deps, { yes: o.yes, given: answers });
4090
4258
  if (settings2) await keepSettings(id, settings2, deps);
4091
- const target = path14.join(deps.dir, id);
4092
- const old = await mkdtemp(path14.join(deps.dir, ".old-"));
4093
- 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);
4094
4262
  if (await exists(target)) await rename6(target, parked);
4095
4263
  try {
4096
4264
  await rename6(staging, target);
@@ -4119,7 +4287,7 @@ function remove(id, deps, o = {}) {
4119
4287
  if (!ID2.test(id)) throw new Refused(`"${id}" is not a plugin id`);
4120
4288
  const installed = await record2(deps);
4121
4289
  if (!installed.plugins[id]) throw new Refused(`${id} is not installed`);
4122
- await rm4(path14.join(deps.dir, id), { recursive: true, force: true });
4290
+ await rm4(path16.join(deps.dir, id), { recursive: true, force: true });
4123
4291
  delete installed.plugins[id];
4124
4292
  await writeInstalled(deps.dir, installed);
4125
4293
  deps.log(`Removed ${id}.`);
@@ -4172,24 +4340,24 @@ async function exists(p) {
4172
4340
 
4173
4341
  // cli/running.ts
4174
4342
  import { randomBytes as randomBytes6, timingSafeEqual } from "node:crypto";
4175
- import { mkdirSync as mkdirSync3, rmSync as rmSync3, writeFileSync as writeFileSync3 } from "node:fs";
4343
+ import { mkdirSync as mkdirSync4, rmSync as rmSync5, writeFileSync as writeFileSync5 } from "node:fs";
4176
4344
  import { readdir, readFile as readFile7, rm as rm5 } from "node:fs/promises";
4177
- import path15 from "node:path";
4345
+ import path17 from "node:path";
4178
4346
  var RESTART_EXIT = 75;
4179
4347
  var RESTART_PATH = "/api/wheelhouse/restart";
4180
4348
  var RUNNING_DIR = ".running";
4181
4349
  var TIMEOUT_MS = 3e3;
4182
4350
  var newToken = () => randomBytes6(24).toString("hex");
4183
4351
  function writeRunning(pluginsDir, r) {
4184
- const dir = path15.join(pluginsDir, RUNNING_DIR);
4185
- mkdirSync3(dir, { recursive: true, mode: 448 });
4186
- const file = path15.join(dir, `${r.pid}.json`);
4187
- writeFileSync3(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)}
4188
4356
  `, { mode: 384 });
4189
4357
  return file;
4190
4358
  }
4191
4359
  function removeRunning(file) {
4192
- rmSync3(file, { force: true });
4360
+ rmSync5(file, { force: true });
4193
4361
  }
4194
4362
  var sameToken = (got, want) => {
4195
4363
  const a = Buffer.from(got);
@@ -4226,7 +4394,7 @@ var alive2 = (pid) => {
4226
4394
  };
4227
4395
  var refused = (e) => e.cause?.code === "ECONNREFUSED";
4228
4396
  async function requestRestart(pluginsDir, proceed) {
4229
- const dir = path15.join(pluginsDir, RUNNING_DIR);
4397
+ const dir = path17.join(pluginsDir, RUNNING_DIR);
4230
4398
  const out = { restarted: [], failed: [], kept: [] };
4231
4399
  let names;
4232
4400
  try {
@@ -4235,7 +4403,7 @@ async function requestRestart(pluginsDir, proceed) {
4235
4403
  return out;
4236
4404
  }
4237
4405
  for (const name of names) {
4238
- const file = path15.join(dir, name);
4406
+ const file = path17.join(dir, name);
4239
4407
  let r;
4240
4408
  try {
4241
4409
  r = JSON.parse(await readFile7(file, "utf8"));
@@ -4314,10 +4482,10 @@ function pluginCommand(over = {}) {
4314
4482
  );
4315
4483
  const deps = (c) => {
4316
4484
  const g2 = c.optsWithGlobals();
4317
- const dir = g2.pluginsDir ? path16.resolve(g2.pluginsDir) : defaultPluginsDir(env);
4485
+ const dir = g2.pluginsDir ? path18.resolve(g2.pluginsDir) : defaultPluginsDir(env);
4318
4486
  return {
4319
4487
  dir,
4320
- configDir: g2.configDir ? path16.resolve(g2.configDir) : defaultConfigDir(env),
4488
+ configDir: g2.configDir ? path18.resolve(g2.configDir) : defaultConfigDir(env),
4321
4489
  confirm: askTerminal,
4322
4490
  ask: askLine,
4323
4491
  restart: (proceed) => requestRestart(dir, proceed),
@@ -4352,7 +4520,7 @@ function pluginCommand(over = {}) {
4352
4520
  }
4353
4521
 
4354
4522
  // cli/remote.ts
4355
- import path17 from "node:path";
4523
+ import path19 from "node:path";
4356
4524
  import { Command as Command3, InvalidArgumentError as InvalidArgumentError2 } from "commander";
4357
4525
 
4358
4526
  // src/lib/server/cloud/pairing.ts
@@ -4666,7 +4834,7 @@ function remoteCommand(over = {}) {
4666
4834
  };
4667
4835
  const settingsFor = (c) => {
4668
4836
  const dir = c.optsWithGlobals().configDir;
4669
- const configDir = dir ? path17.resolve(dir) : defaultConfigDir(deps.env);
4837
+ const configDir = dir ? path19.resolve(dir) : defaultConfigDir(deps.env);
4670
4838
  const found = resolveInstall({ cwd: process.cwd(), env: deps.env });
4671
4839
  if (found.ok && isInside(configDir, found.install.homeDir)) {
4672
4840
  fail(
@@ -4943,7 +5111,7 @@ function remoteCommand(over = {}) {
4943
5111
  }
4944
5112
 
4945
5113
  // cli/skills.ts
4946
- import path25 from "node:path";
5114
+ import path27 from "node:path";
4947
5115
  import { fileURLToPath } from "node:url";
4948
5116
  import { Command as Command4 } from "commander";
4949
5117
 
@@ -4951,11 +5119,11 @@ import { Command as Command4 } from "commander";
4951
5119
  import { execFile as execFile3 } from "node:child_process";
4952
5120
  import { mkdtemp as mkdtemp3, readFile as readFile13, rm as rm9 } from "node:fs/promises";
4953
5121
  import { tmpdir } from "node:os";
4954
- import path24 from "node:path";
5122
+ import path26 from "node:path";
4955
5123
 
4956
5124
  // src/lib/server/material/bundle.ts
4957
5125
  import { readFile as readFile8 } from "node:fs/promises";
4958
- import path18 from "node:path";
5126
+ import path20 from "node:path";
4959
5127
  var REVIEW_SURFACE_MARKER = "<!-- wheelhouse:review-surface -->";
4960
5128
  var SKILLS = [
4961
5129
  {
@@ -4990,7 +5158,7 @@ function reviewSurfaceSection(surface) {
4990
5158
  async function renderSkill(skillsRoot, skill, inputs) {
4991
5159
  const tree = {};
4992
5160
  for (const file of skill.files) {
4993
- const text2 = await readFile8(path18.join(skillsRoot, skill.name, file), "utf8");
5161
+ const text2 = await readFile8(path20.join(skillsRoot, skill.name, file), "utf8");
4994
5162
  tree[file] = file === "SKILL.md" ? text2.replace(REVIEW_SURFACE_MARKER, () => reviewSurfaceSection(inputs.reviewSurface)) : text2;
4995
5163
  }
4996
5164
  return tree;
@@ -4999,7 +5167,7 @@ async function renderSkill(skillsRoot, skill, inputs) {
4999
5167
  // src/lib/server/material/files.ts
5000
5168
  import { createHash as createHash5 } from "node:crypto";
5001
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";
5002
- import path19 from "node:path";
5170
+ import path21 from "node:path";
5003
5171
  var sha2562 = (text2) => createHash5("sha256").update(text2).digest("hex");
5004
5172
  var hashTree = (tree) => Object.fromEntries(Object.entries(tree).map(([file, text2]) => [file, sha2562(text2)]));
5005
5173
  function sameHashes(a, b) {
@@ -5020,16 +5188,16 @@ async function physical(file) {
5020
5188
  return await realpath4(file);
5021
5189
  } catch (e) {
5022
5190
  if (e.code !== "ENOENT") throw e;
5023
- const parent = path19.dirname(file);
5191
+ const parent = path21.dirname(file);
5024
5192
  if (parent === file) throw e;
5025
- return path19.join(await physical(parent), path19.basename(file));
5193
+ return path21.join(await physical(parent), path21.basename(file));
5026
5194
  }
5027
5195
  }
5028
5196
  async function insideAny(targets, protectedDirs) {
5029
5197
  const real2 = await Promise.all(targets.map(physical));
5030
5198
  for (const dir of protectedDirs) {
5031
- const p = await physical(path19.resolve(dir));
5032
- 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;
5033
5201
  }
5034
5202
  return false;
5035
5203
  }
@@ -5038,16 +5206,16 @@ async function readTree(dir, prefix = "") {
5038
5206
  for (const entry2 of await readdir2(dir, { withFileTypes: true })) {
5039
5207
  const rel = prefix + entry2.name;
5040
5208
  if (entry2.isDirectory())
5041
- Object.assign(tree, await readTree(path19.join(dir, entry2.name), rel + "/"));
5042
- 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");
5043
5211
  else throw new Error(`${rel} is a symbolic link or special file.`);
5044
5212
  }
5045
5213
  return tree;
5046
5214
  }
5047
5215
  async function writeTree(dir, tree) {
5048
5216
  for (const [file, text2] of Object.entries(tree)) {
5049
- await mkdir7(path19.dirname(path19.join(dir, file)), { recursive: true });
5050
- 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);
5051
5219
  }
5052
5220
  }
5053
5221
  async function replaceTree(dir, tree) {
@@ -5059,7 +5227,7 @@ async function replaceTree(dir, tree) {
5059
5227
  await rename7(stage, dir);
5060
5228
  }
5061
5229
  async function writeAtomic3(file, text2, mode = 384) {
5062
- await mkdir7(path19.dirname(file), { recursive: true });
5230
+ await mkdir7(path21.dirname(file), { recursive: true });
5063
5231
  const tmp = `${file}.${process.pid}-${Date.now()}.tmp`;
5064
5232
  await writeFile6(tmp, text2, { mode });
5065
5233
  await rename7(tmp, file);
@@ -5067,16 +5235,16 @@ async function writeAtomic3(file, text2, mode = 384) {
5067
5235
 
5068
5236
  // src/lib/server/material/manifest.ts
5069
5237
  import { readFile as readFile10, rename as rename8, rm as rm7 } from "node:fs/promises";
5070
- import path20 from "node:path";
5238
+ import path22 from "node:path";
5071
5239
  var MANIFEST_SCHEMA = "wheelhouse-material.v1";
5072
5240
  var HISTORY_MAX = 50;
5073
- var materialDir = (configDir) => path20.join(configDir, "agent-material");
5074
- var manifestFile = (dir) => path20.join(dir, "manifest.json");
5075
- 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");
5076
5244
  var folder = (id) => id.replace(/[^A-Za-z0-9@._-]/g, "_");
5077
- var baseDir = (dir, id) => path20.join(dir, "base", folder(id));
5078
- var proposedDir = (dir, id) => path20.join(dir, "proposed", folder(id));
5079
- 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, "-"));
5080
5248
  function emptyManifest(version2, harness) {
5081
5249
  return {
5082
5250
  schema: MANIFEST_SCHEMA,
@@ -5154,7 +5322,7 @@ function serialize(dir, work) {
5154
5322
 
5155
5323
  // src/lib/server/material/skilldir.ts
5156
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";
5157
- import path21 from "node:path";
5325
+ import path23 from "node:path";
5158
5326
  var RECEIPT = ".wheelhouse-managed.json";
5159
5327
  var RECEIPT_SCHEMA = "wheelhouse-skill.v1";
5160
5328
  function receiptHashes(text2) {
@@ -5183,13 +5351,13 @@ async function readLocal(target) {
5183
5351
  }
5184
5352
  var receiptText = (version2, hashes) => JSON.stringify({ schema: RECEIPT_SCHEMA, version: version2, files: hashes }) + "\n";
5185
5353
  async function swapIn(target, tree, receipt, check) {
5186
- const parent = path21.dirname(target);
5354
+ const parent = path23.dirname(target);
5187
5355
  await mkdir8(parent, { recursive: true });
5188
- const stage = await mkdtemp2(path21.join(parent, ".wheelhouse-skill-"));
5356
+ const stage = await mkdtemp2(path23.join(parent, ".wheelhouse-skill-"));
5189
5357
  let placed = false;
5190
5358
  try {
5191
5359
  await writeTree(stage, tree);
5192
- await writeFile7(path21.join(stage, RECEIPT), receipt);
5360
+ await writeFile7(path23.join(stage, RECEIPT), receipt);
5193
5361
  const backup = stage + "-previous";
5194
5362
  for (let attempt = 1; ; attempt++) {
5195
5363
  const now = await readLocal(target);
@@ -5217,14 +5385,14 @@ async function swapIn(target, tree, receipt, check) {
5217
5385
  // src/lib/server/material/sync.ts
5218
5386
  import { execFile as execFile2 } from "node:child_process";
5219
5387
  import { readFile as readFile12, stat as stat6 } from "node:fs/promises";
5220
- import path23 from "node:path";
5388
+ import path25 from "node:path";
5221
5389
 
5222
5390
  // src/lib/server/material/targets.ts
5223
5391
  import { homedir as homedir3 } from "node:os";
5224
- import path22 from "node:path";
5392
+ import path24 from "node:path";
5225
5393
  function skillRootDir(root, env) {
5226
5394
  const home = env.HOME || homedir3();
5227
- 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");
5228
5396
  }
5229
5397
  var rootsFor = (harness) => harness === "claude" ? ["claude"] : ["claude", "agents"];
5230
5398
 
@@ -5235,7 +5403,7 @@ function plannedSkills(env, harness) {
5235
5403
  (skill) => rootsFor(harness).map((root) => ({
5236
5404
  id: skillId(skill.name, root),
5237
5405
  skill,
5238
- target: path23.join(skillRootDir(root, env), skill.name)
5406
+ target: path25.join(skillRootDir(root, env), skill.name)
5239
5407
  }))
5240
5408
  );
5241
5409
  }
@@ -5291,7 +5459,7 @@ async function syncSkill(ctx, dir, m, item, tree, dryRun) {
5291
5459
  state,
5292
5460
  message: message(state, id, target, detail)
5293
5461
  });
5294
- 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]))
5295
5463
  return result("refused", "user skills location is inside Firstmate's checkout or home");
5296
5464
  const next = hashTree(tree);
5297
5465
  const rec = m.items[id];
@@ -5378,7 +5546,7 @@ async function checkAssumptions(firstmateDir) {
5378
5546
  seen.add(key);
5379
5547
  let text2 = "";
5380
5548
  try {
5381
- text2 = await readFile12(path23.join(firstmateDir, a.file), "utf8");
5549
+ text2 = await readFile12(path25.join(firstmateDir, a.file), "utf8");
5382
5550
  } catch {
5383
5551
  }
5384
5552
  checks.push({ ...a, present: text2.includes(a.marker) });
@@ -5483,7 +5651,7 @@ async function syncMaterial(ctx, inputs, opts = {}) {
5483
5651
  // src/lib/server/material/ops.ts
5484
5652
  async function savedHarness2(configDir) {
5485
5653
  try {
5486
- 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"));
5487
5655
  return parseHarness(raw.harness);
5488
5656
  } catch {
5489
5657
  return "claude";
@@ -5570,10 +5738,10 @@ async function diff(c, id) {
5570
5738
  return { ok: false, error: `Cannot read ${item.target}: ${local.reason}` };
5571
5739
  const next = await render(c, item);
5572
5740
  const base = await readBase(c.dir, id);
5573
- const scratch = await mkdtemp3(path24.join(tmpdir(), "wheelhouse-skills-diff-"));
5741
+ const scratch = await mkdtemp3(path26.join(tmpdir(), "wheelhouse-skills-diff-"));
5574
5742
  try {
5575
5743
  const put = async (name, tree) => {
5576
- const d = path24.join(scratch, name);
5744
+ const d = path26.join(scratch, name);
5577
5745
  await replaceTree(d, tree);
5578
5746
  return d;
5579
5747
  };
@@ -5697,7 +5865,7 @@ async function uninstall(c, ids) {
5697
5865
  }
5698
5866
 
5699
5867
  // cli/skills.ts
5700
- var bundledSkills = () => path25.resolve(path25.dirname(fileURLToPath(import.meta.url)), "..", "skills");
5868
+ var bundledSkills = () => path27.resolve(path27.dirname(fileURLToPath(import.meta.url)), "..", "skills");
5701
5869
  var PENDING = { installed: "missing", updated: "outdated" };
5702
5870
  function printResult(r, log, pending = false) {
5703
5871
  for (const i of r.items)
@@ -5728,7 +5896,7 @@ function skillsCommand(over = {}) {
5728
5896
  const g2 = c.optsWithGlobals();
5729
5897
  const s = await skillsCli({
5730
5898
  env: deps.env,
5731
- configDir: g2.configDir ? path25.resolve(g2.configDir) : defaultConfigDir(deps.env),
5899
+ configDir: g2.configDir ? path27.resolve(g2.configDir) : defaultConfigDir(deps.env),
5732
5900
  skillsRoot: deps.skillsRoot,
5733
5901
  version
5734
5902
  });
@@ -5879,14 +6047,14 @@ function supervise(opts) {
5879
6047
 
5880
6048
  // cli/upgrade.ts
5881
6049
  import { spawn as spawn3 } from "node:child_process";
5882
- import path27 from "node:path";
6050
+ import path29 from "node:path";
5883
6051
  import { fileURLToPath as fileURLToPath2 } from "node:url";
5884
6052
  import { Command as Command5 } from "commander";
5885
6053
 
5886
6054
  // src/lib/server/upgrade/clone.ts
5887
6055
  import { execFile as execFile4 } from "node:child_process";
5888
6056
  import { mkdir as mkdir9, readdir as readdir3, readFile as readFile14, realpath as realpath5 } from "node:fs/promises";
5889
- import path26 from "node:path";
6057
+ import path28 from "node:path";
5890
6058
  var COMMITS_SHOWN = 20;
5891
6059
  var OUTPUT_KEPT = 6e4;
5892
6060
  var runCommand = (cmd, args, cwd) => new Promise((resolve) => {
@@ -5932,7 +6100,7 @@ async function checkClone(deps) {
5932
6100
  changes: []
5933
6101
  };
5934
6102
  out.current.version = packageVersion(
5935
- await readFile14(path26.join(deps.dir, "package.json"), "utf8").catch(() => null)
6103
+ await readFile14(path28.join(deps.dir, "package.json"), "utf8").catch(() => null)
5936
6104
  );
5937
6105
  const top = await g2("rev-parse", "--show-toplevel");
5938
6106
  const here = await realpath5(deps.dir).catch(() => deps.dir);
@@ -6058,7 +6226,7 @@ var CLONE_SETUP_STEPS = [
6058
6226
 
6059
6227
  // cli/upgrade.ts
6060
6228
  function installDir() {
6061
- return path27.resolve(path27.dirname(fileURLToPath2(import.meta.url)), "..");
6229
+ return path29.resolve(path29.dirname(fileURLToPath2(import.meta.url)), "..");
6062
6230
  }
6063
6231
  var runInherit = (cmd, args, cwd) => new Promise((resolve) => {
6064
6232
  const child = spawn3(cmd, args, { cwd, stdio: "inherit" });
@@ -6131,7 +6299,7 @@ function upgradeCommand(over = {}) {
6131
6299
  "--plugins-dir <dir>",
6132
6300
  "the plugins directory the running Wheelhouse loads from, to find it (default: $WHEELHOUSE_PLUGINS_DIR, else ~/.wheelhouse/plugins)"
6133
6301
  ).action(async (o) => {
6134
- const pluginsDir = o.pluginsDir ? path27.resolve(o.pluginsDir) : defaultPluginsDir(env);
6302
+ const pluginsDir = o.pluginsDir ? path29.resolve(o.pluginsDir) : defaultPluginsDir(env);
6135
6303
  const ok = await upgrade(
6136
6304
  {
6137
6305
  dir: installDir(),
@@ -6158,8 +6326,8 @@ function parsePort3(value) {
6158
6326
  return n;
6159
6327
  }
6160
6328
  function handlerPath() {
6161
- const here = path28.dirname(fileURLToPath3(import.meta.url));
6162
- return path28.resolve(here, "..", "build", "handler.js");
6329
+ const here = path30.dirname(fileURLToPath3(import.meta.url));
6330
+ return path30.resolve(here, "..", "build", "handler.js");
6163
6331
  }
6164
6332
  function openBrowser(url) {
6165
6333
  const [cmd, args] = process.platform === "darwin" ? ["open", [url]] : process.platform === "win32" ? ["cmd", ["/c", "start", '""', url]] : ["xdg-open", [url]];
@@ -6172,8 +6340,8 @@ function openBrowser(url) {
6172
6340
  }
6173
6341
  }
6174
6342
  async function open2(opts) {
6175
- const configDir = opts.configDir ? path28.resolve(opts.configDir) : defaultConfigDir(process.env);
6176
- 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);
6177
6345
  const resolved = resolveInstall({
6178
6346
  firstmate: opts.firstmate,
6179
6347
  home: opts.home,
@@ -6248,6 +6416,8 @@ async function open2(opts) {
6248
6416
  if (hosted.hosted) {
6249
6417
  console.log(`Previews: ${hosted.hosted.pattern} (${hosted.hosted.source})`);
6250
6418
  }
6419
+ const harnessFixed = opts.harness !== void 0 || process.env.WHEELHOUSE_HARNESS !== void 0;
6420
+ process.env.WHEELHOUSE_HARNESS_FIXED = harnessFixed ? "1" : "0";
6251
6421
  process.env.WHEELHOUSE_HARNESS = await resolveHarness({
6252
6422
  explicit: opts.harness,
6253
6423
  env: process.env,
@@ -6262,9 +6432,9 @@ async function open2(opts) {
6262
6432
  }
6263
6433
  process.env.WHEELHOUSE_STATE_DIR = stateDir;
6264
6434
  process.env.WHEELHOUSE_CONFIG_DIR = configDir;
6265
- if (opts.pluginsDir) process.env.WHEELHOUSE_PLUGINS_DIR = path28.resolve(opts.pluginsDir);
6266
- process.env.WHEELHOUSE_BUNDLED_PLUGINS_DIR = path28.resolve(path28.dirname(file), "..", "plugins");
6267
- 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), "..");
6268
6438
  if (opts.tmuxSocket) process.env.WHEELHOUSE_TMUX_SOCKET = opts.tmuxSocket;
6269
6439
  process.env.WHEELHOUSE_SKIP_PERMISSIONS = opts.skipPermissions ? "1" : "0";
6270
6440
  let cli = fileURLToPath3(import.meta.url);
@@ -6281,11 +6451,13 @@ async function open2(opts) {
6281
6451
  start: (port, restart) => {
6282
6452
  const next = takeHandoff(configDir);
6283
6453
  if (next && restart) {
6284
- cli = path28.join(next, "dist", "cli.js");
6454
+ cli = path30.join(next, "dist", "cli.js");
6285
6455
  process.env.WHEELHOUSE_INSTALL_DIR = next;
6286
- process.env.WHEELHOUSE_BUNDLED_PLUGINS_DIR = path28.join(next, "plugins");
6456
+ process.env.WHEELHOUSE_BUNDLED_PLUGINS_DIR = path30.join(next, "plugins");
6287
6457
  console.log(`Wheelhouse now runs from ${next}.`);
6288
6458
  }
6459
+ const saved = restart && !harnessFixed ? savedHarnessNow(configDir) : null;
6460
+ if (saved) process.env.WHEELHOUSE_HARNESS = saved;
6289
6461
  return fork(cli, ["__server", "--port", String(port)], {
6290
6462
  env: { ...process.env, WHEELHOUSE_RESTARTED: restart ? "1" : "0" },
6291
6463
  stdio: ["ignore", "inherit", "inherit", "ipc"]
@@ -6308,7 +6480,7 @@ async function open2(opts) {
6308
6480
  process.exit(code);
6309
6481
  }
6310
6482
  async function serve(opts) {
6311
- process.env.WHEELHOUSE_INSTALL_DIR = path28.resolve(path28.dirname(handlerPath()), "..");
6483
+ process.env.WHEELHOUSE_INSTALL_DIR = path30.resolve(path30.dirname(handlerPath()), "..");
6312
6484
  process.env.WHEELHOUSE_URL = `http://${HOST}:${opts.port}`;
6313
6485
  process.env.BODY_SIZE_LIMIT ??= String(UPLOAD_MAX_BYTES + 64 * 1024);
6314
6486
  const { handler } = await import(pathToFileURL(handlerPath()).href);
@@ -6387,7 +6559,7 @@ function program() {
6387
6559
  "where Wheelhouse keeps its own records (default: $WHEELHOUSE_STATE_DIR, else $XDG_STATE_HOME/wheelhouse, else ~/.local/state/wheelhouse)"
6388
6560
  ).option(
6389
6561
  "--tmux-socket <name>",
6390
- "the tmux server (tmux -L <name>) the Firstmate session runs on, kept apart from the crew's (default: $WHEELHOUSE_TMUX_SOCKET, else wheelhouse)"
6562
+ "a tmux server of its own (tmux -L <name>) for the Firstmate session (default: $WHEELHOUSE_TMUX_SOCKET, else tmux's default server, which the crew share)"
6391
6563
  ).option(
6392
6564
  "--session-backend <name>",
6393
6565
  "what runs the Firstmate session: tmux, or herdr (experimental) (default: $WHEELHOUSE_SESSION_BACKEND, else the setup wizard's choice, else herdr when Firstmate's config/backend is herdr, else tmux)",