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