@chrisjowen/wheelhouse 0.16.0 → 0.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/client/_app/immutable/chunks/{BOuuGRjG.js → 79yuhTwS.js} +1 -1
- package/build/client/_app/immutable/chunks/79yuhTwS.js.br +0 -0
- package/build/client/_app/immutable/chunks/79yuhTwS.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{Crqp6P7x.js → B1zE3zKP.js} +1 -1
- package/build/client/_app/immutable/chunks/B1zE3zKP.js.br +0 -0
- package/build/client/_app/immutable/chunks/B1zE3zKP.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{CvBYM8q3.js → B3KHKydy.js} +1 -1
- package/build/client/_app/immutable/chunks/B3KHKydy.js.br +0 -0
- package/build/client/_app/immutable/chunks/{CvBYM8q3.js.gz → B3KHKydy.js.gz} +0 -0
- package/build/client/_app/immutable/chunks/{DN_cUEc5.js → BPjwAHMu.js} +1 -1
- package/build/client/_app/immutable/chunks/BPjwAHMu.js.br +0 -0
- package/build/client/_app/immutable/chunks/BPjwAHMu.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{DvvdbrXj.js → BXiSaVju.js} +1 -1
- package/build/client/_app/immutable/chunks/BXiSaVju.js.br +0 -0
- package/build/client/_app/immutable/chunks/BXiSaVju.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{_xQwGlKC.js → BosdQIFt.js} +1 -1
- package/build/client/_app/immutable/chunks/BosdQIFt.js.br +0 -0
- package/build/client/_app/immutable/chunks/BosdQIFt.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{01zSWHgS.js → CDSHscp6.js} +1 -1
- package/build/client/_app/immutable/chunks/CDSHscp6.js.br +3 -0
- package/build/client/_app/immutable/chunks/CDSHscp6.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{kQFtkWpw.js → CI19kiwT.js} +1 -1
- package/build/client/_app/immutable/chunks/CI19kiwT.js.br +0 -0
- package/build/client/_app/immutable/chunks/CI19kiwT.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{D62zkI9j.js → CKE9neHp.js} +1 -1
- package/build/client/_app/immutable/chunks/CKE9neHp.js.br +0 -0
- package/build/client/_app/immutable/chunks/CKE9neHp.js.gz +0 -0
- package/build/client/_app/immutable/chunks/CLJu9cY5.js +2 -0
- package/build/client/_app/immutable/chunks/CLJu9cY5.js.br +0 -0
- package/build/client/_app/immutable/chunks/CLJu9cY5.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{CVuE8Mrz.js → CSU604UC.js} +1 -1
- package/build/client/_app/immutable/chunks/CSU604UC.js.br +0 -0
- package/build/client/_app/immutable/chunks/CSU604UC.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{CIXD8yUP.js → CgZovtjz.js} +1 -1
- package/build/client/_app/immutable/chunks/CgZovtjz.js.br +0 -0
- package/build/client/_app/immutable/chunks/CgZovtjz.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{Bpoe0kdM.js → ClYd4imU.js} +1 -1
- package/build/client/_app/immutable/chunks/ClYd4imU.js.br +0 -0
- package/build/client/_app/immutable/chunks/ClYd4imU.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{BTAHFHcI.js → CsmF6Hwj.js} +1 -1
- package/build/client/_app/immutable/chunks/CsmF6Hwj.js.br +0 -0
- package/build/client/_app/immutable/chunks/CsmF6Hwj.js.gz +0 -0
- package/build/client/_app/immutable/chunks/Cwo48ib8.js +1 -0
- package/build/client/_app/immutable/chunks/Cwo48ib8.js.br +0 -0
- package/build/client/_app/immutable/chunks/Cwo48ib8.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{D3U8nDaU.js → D8J1M-4m.js} +1 -1
- package/build/client/_app/immutable/chunks/D8J1M-4m.js.br +0 -0
- package/build/client/_app/immutable/chunks/D8J1M-4m.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{l1ecpO65.js → DFrn6Xyh.js} +1 -1
- package/build/client/_app/immutable/chunks/DFrn6Xyh.js.br +0 -0
- package/build/client/_app/immutable/chunks/DFrn6Xyh.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{CV9fVJKz.js → fhAu_Obx.js} +1 -1
- package/build/client/_app/immutable/chunks/fhAu_Obx.js.br +0 -0
- package/build/client/_app/immutable/chunks/fhAu_Obx.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{Bm5t_TcQ.js → qmyjnG6s.js} +1 -1
- package/build/client/_app/immutable/chunks/qmyjnG6s.js.br +0 -0
- package/build/client/_app/immutable/chunks/qmyjnG6s.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{-VKim-Eb.js → xHBeYlGm.js} +1 -1
- package/build/client/_app/immutable/chunks/xHBeYlGm.js.br +0 -0
- package/build/client/_app/immutable/chunks/xHBeYlGm.js.gz +0 -0
- package/build/client/_app/immutable/entry/{app.CnyVl7c2.js → app.DwV2pwLU.js} +2 -2
- package/build/client/_app/immutable/entry/app.DwV2pwLU.js.br +0 -0
- package/build/client/_app/immutable/entry/app.DwV2pwLU.js.gz +0 -0
- package/build/client/_app/immutable/entry/start.CAfmMhjm.js +1 -0
- package/build/client/_app/immutable/entry/start.CAfmMhjm.js.br +0 -0
- package/build/client/_app/immutable/entry/start.CAfmMhjm.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{0.8GFbRTop.js → 0.DF8hnsli.js} +1 -1
- package/build/client/_app/immutable/nodes/0.DF8hnsli.js.br +0 -0
- package/build/client/_app/immutable/nodes/0.DF8hnsli.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{1.B7dgllIV.js → 1.B5FnFSGX.js} +1 -1
- package/build/client/_app/immutable/nodes/1.B5FnFSGX.js.br +0 -0
- package/build/client/_app/immutable/nodes/1.B5FnFSGX.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{10.Bg5oK9sw.js → 10.COzSUd5H.js} +1 -1
- package/build/client/_app/immutable/nodes/10.COzSUd5H.js.br +0 -0
- package/build/client/_app/immutable/nodes/10.COzSUd5H.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{11.DYPka59n.js → 11.hxSy1hC3.js} +1 -1
- package/build/client/_app/immutable/nodes/11.hxSy1hC3.js.br +0 -0
- package/build/client/_app/immutable/nodes/11.hxSy1hC3.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{12.B6I0GxaX.js → 12.C7_etTt9.js} +1 -1
- package/build/client/_app/immutable/nodes/12.C7_etTt9.js.br +0 -0
- package/build/client/_app/immutable/nodes/12.C7_etTt9.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{13.HNCDjm9L.js → 13.DmZBXkEn.js} +1 -1
- package/build/client/_app/immutable/nodes/13.DmZBXkEn.js.br +0 -0
- package/build/client/_app/immutable/nodes/13.DmZBXkEn.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{14.Dm2jB_N0.js → 14.B2FfmJwY.js} +1 -1
- package/build/client/_app/immutable/nodes/14.B2FfmJwY.js.br +0 -0
- package/build/client/_app/immutable/nodes/14.B2FfmJwY.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{15.DnSRUIFM.js → 15.DOXGz5UB.js} +1 -1
- package/build/client/_app/immutable/nodes/15.DOXGz5UB.js.br +0 -0
- package/build/client/_app/immutable/nodes/15.DOXGz5UB.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{16.BEJtiT-C.js → 16.9Kdcqd35.js} +1 -1
- package/build/client/_app/immutable/nodes/16.9Kdcqd35.js.br +0 -0
- package/build/client/_app/immutable/nodes/16.9Kdcqd35.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{17.BJgcp0oo.js → 17.rjXh_9jf.js} +1 -1
- package/build/client/_app/immutable/nodes/17.rjXh_9jf.js.br +0 -0
- package/build/client/_app/immutable/nodes/17.rjXh_9jf.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{19.BxG6SINq.js → 19.BDL7z_Qb.js} +1 -1
- package/build/client/_app/immutable/nodes/19.BDL7z_Qb.js.br +0 -0
- package/build/client/_app/immutable/nodes/19.BDL7z_Qb.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{2.CQlQaA3F.js → 2.BCbkmPbx.js} +1 -1
- package/build/client/_app/immutable/nodes/2.BCbkmPbx.js.br +0 -0
- package/build/client/_app/immutable/nodes/2.BCbkmPbx.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{20.CRi-FHPN.js → 20.CmA-uI_h.js} +1 -1
- package/build/client/_app/immutable/nodes/20.CmA-uI_h.js.br +0 -0
- package/build/client/_app/immutable/nodes/20.CmA-uI_h.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{21.f5SleuvG.js → 21.DXJrG-NW.js} +1 -1
- package/build/client/_app/immutable/nodes/21.DXJrG-NW.js.br +0 -0
- package/build/client/_app/immutable/nodes/21.DXJrG-NW.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{22.DNrAQQXU.js → 22.D1PSb-pN.js} +1 -1
- package/build/client/_app/immutable/nodes/22.D1PSb-pN.js.br +0 -0
- package/build/client/_app/immutable/nodes/22.D1PSb-pN.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{23.D6Fe2Mdx.js → 23.DsgvXr3A.js} +1 -1
- package/build/client/_app/immutable/nodes/23.DsgvXr3A.js.br +0 -0
- package/build/client/_app/immutable/nodes/23.DsgvXr3A.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{24.C56ldwPz.js → 24.DYbfQRKi.js} +1 -1
- package/build/client/_app/immutable/nodes/24.DYbfQRKi.js.br +0 -0
- package/build/client/_app/immutable/nodes/24.DYbfQRKi.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{25.DZ4DThMl.js → 25.DchwdBic.js} +1 -1
- package/build/client/_app/immutable/nodes/25.DchwdBic.js.br +0 -0
- package/build/client/_app/immutable/nodes/25.DchwdBic.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{26.C1eMf9Tn.js → 26.DGQvgO-w.js} +1 -1
- package/build/client/_app/immutable/nodes/26.DGQvgO-w.js.br +0 -0
- package/build/client/_app/immutable/nodes/26.DGQvgO-w.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{28.ByjDiuDk.js → 28.C-Ubf5oN.js} +1 -1
- package/build/client/_app/immutable/nodes/28.C-Ubf5oN.js.br +0 -0
- package/build/client/_app/immutable/nodes/28.C-Ubf5oN.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{3.Dw9t6bnq.js → 3.BZFHR-pC.js} +1 -1
- package/build/client/_app/immutable/nodes/3.BZFHR-pC.js.br +0 -0
- package/build/client/_app/immutable/nodes/3.BZFHR-pC.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{4.C-Vhe6qo.js → 4.CAiVTgL3.js} +1 -1
- package/build/client/_app/immutable/nodes/4.CAiVTgL3.js.br +0 -0
- package/build/client/_app/immutable/nodes/4.CAiVTgL3.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{6.-GosPZsI.js → 6.Bpt4zq5B.js} +1 -1
- package/build/client/_app/immutable/nodes/6.Bpt4zq5B.js.br +0 -0
- package/build/client/_app/immutable/nodes/6.Bpt4zq5B.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{7.D5C714Zn.js → 7.DqfjvXPm.js} +1 -1
- package/build/client/_app/immutable/nodes/7.DqfjvXPm.js.br +0 -0
- package/build/client/_app/immutable/nodes/7.DqfjvXPm.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{8.CBl3BgIN.js → 8.CCshJNeL.js} +1 -1
- package/build/client/_app/immutable/nodes/8.CCshJNeL.js.br +0 -0
- package/build/client/_app/immutable/nodes/8.CCshJNeL.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{9.flfI1cr8.js → 9.DAgz6-ct.js} +1 -1
- package/build/client/_app/immutable/nodes/9.DAgz6-ct.js.br +0 -0
- package/build/client/_app/immutable/nodes/9.DAgz6-ct.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-D_HFAT2R.js → detail.js-Dmv_JQut.js} +2 -2
- package/build/server/chunks/chunks/{feedback.js-DFn0QGh9.js → feedback.js-D3a2iMXg.js} +2 -2
- package/build/server/chunks/chunks/{internal.js-CGSGg70w.js → internal.js-B1bN3ll4.js} +3 -3
- package/build/server/chunks/chunks/{keychain.js-DWxqf9BG.js → keychain.js-Cp8llbD0.js} +2 -2
- package/build/server/chunks/chunks/{marketplace-service.js-DFXVn_eQ.js → marketplace-service.js-Cx9Q0k8Q.js} +2 -2
- package/build/server/chunks/chunks/{page.js-BtTVbG0k.js → page.js-CoP2TAJ_.js} +2 -2
- package/build/server/chunks/chunks/{previewhelper2.js-DYr_o-vO.js → previewhelper2.js-BrTz0Tg7.js} +2 -2
- package/build/server/chunks/chunks/{repo.js-Dv-yIN8Y.js → repo.js-LJxMBx-J.js} +2 -2
- package/build/server/chunks/chunks/{runtime.js-CUYCZ2fw.js → runtime.js-Div6Lnx3.js} +702 -270
- package/build/server/chunks/chunks/{service.js-F86ETkjI.js → service.js-C-7gDnLN.js} +2 -2
- package/build/server/chunks/chunks/{service2.js-DFBl79w6.js → service2.js-BsM3bqfY.js} +5 -6
- package/build/server/chunks/chunks/{starter.js-jUCQlAAZ.js → starter.js-BGIHa5RG.js} +2 -2
- package/build/server/chunks/chunks/{view.js-De80u4gl.js → view.js-B-5C4tjd.js} +2 -2
- package/build/server/chunks/entries/endpoints/api/apps/_op_/{_server.ts.js-D_B7_i9Y.js → _server.ts.js-u0ExtU7j.js} +5 -5
- package/build/server/chunks/entries/endpoints/api/cloud/{_server.ts.js-lvLHkipj.js → _server.ts.js-BO-Upj5a.js} +3 -3
- package/build/server/chunks/entries/endpoints/api/cloud/previews/{_server.ts.js-BtwM6kge.js → _server.ts.js-CqmlbD19.js} +5 -5
- package/build/server/chunks/entries/endpoints/api/events/{_server.ts.js-AZw0MiM5.js → _server.ts.js-BuNwFHVn.js} +5 -5
- package/build/server/chunks/entries/endpoints/api/files/{_server.ts.js-CapjdAiy.js → _server.ts.js-DjTqppEU.js} +5 -5
- package/build/server/chunks/entries/endpoints/api/firstmate/chat/{_server.ts.js-D5CXnG6E.js → _server.ts.js-C9cMNlgd.js} +5 -5
- package/build/server/chunks/entries/endpoints/api/firstmate/commands/{_server.ts.js-DtTX-IQ0.js → _server.ts.js-DfpaVvxs.js} +5 -5
- package/build/server/chunks/entries/endpoints/api/firstmate/dismiss/{_server.ts.js-CZOvv2M2.js → _server.ts.js-8SzK4gCV.js} +5 -5
- package/build/server/chunks/entries/endpoints/api/firstmate/input/{_server.ts.js-DtLM2nDS.js → _server.ts.js-BQbD-LTs.js} +5 -5
- package/build/server/chunks/entries/endpoints/api/firstmate/interrupt/{_server.ts.js-RuBXxm8l.js → _server.ts.js-ClqS2YDJ.js} +5 -5
- package/build/server/chunks/entries/endpoints/api/firstmate/messages/{_server.ts.js-K1lv6lDp.js → _server.ts.js-BCazjeCb.js} +5 -5
- package/build/server/chunks/entries/endpoints/api/firstmate/pick/{_server.ts.js-CUKrxHEz.js → _server.ts.js-DbwR4fGz.js} +5 -5
- package/build/server/chunks/entries/endpoints/api/firstmate/reactions/{_server.ts.js-Bf2HCJA6.js → _server.ts.js-CY5SLTEA.js} +5 -5
- package/build/server/chunks/entries/endpoints/api/firstmate/start/{_server.ts.js-D5wImb85.js → _server.ts.js-Co9V8-6k.js} +5 -5
- package/build/server/chunks/entries/endpoints/api/fleet/{_server.ts.js-COxUDh66.js → _server.ts.js-tC_Zgasq.js} +5 -5
- package/build/server/chunks/entries/endpoints/api/gateway/{_server.ts.js-BIdX1HqN.js → _server.ts.js-BwROfRU7.js} +5 -5
- package/build/server/chunks/entries/endpoints/api/health/{_server.ts.js-Xgbc9XA2.js → _server.ts.js-BEmBVcdL.js} +5 -5
- package/build/server/chunks/entries/endpoints/api/inbox/{_server.ts.js-nHm2J-sv.js → _server.ts.js-DdaypvH2.js} +5 -5
- package/build/server/chunks/entries/endpoints/api/inbox/report/{_server.ts.js-C8wbe2uN.js → _server.ts.js-BbDc6SzH.js} +5 -5
- package/build/server/chunks/entries/endpoints/api/insights/{_server.ts.js-BtcTcgkS.js → _server.ts.js-Bz4abExj.js} +5 -5
- package/build/server/chunks/entries/endpoints/api/plugins/_plugin_/config/{_server.ts.js-KANrega5.js → _server.ts.js-BNVKAFTs.js} +5 -5
- package/build/server/chunks/entries/endpoints/api/plugins/_plugin_/feedback/{_server.ts.js-CHTJXjZq.js → _server.ts.js-B1AaY6FI.js} +6 -6
- package/build/server/chunks/entries/endpoints/api/plugins/_plugin_/feedback/summary/{_server.ts.js-DZZ7jsff.js → _server.ts.js-CP9sLBS7.js} +7 -7
- package/build/server/chunks/entries/endpoints/api/plugins/_plugin_/icon/_icon_/{_server.ts.js-DmBrST5y.js → _server.ts.js-DBDdeN2z.js} +4 -4
- package/build/server/chunks/entries/endpoints/api/plugins/_plugin_/load/{_server.ts.js-DcjaF46g.js → _server.ts.js-D4h_Mifs.js} +2 -2
- package/build/server/chunks/entries/endpoints/api/plugins/_plugin_/ui/_...path_/{_server.ts.js-8zoDyrl2.js → _server.ts.js-BIrWdhtR.js} +5 -5
- package/build/server/chunks/entries/endpoints/api/plugins/_plugin_/update/{_server.ts.js-DCRHbkLC.js → _server.ts.js-Cu_Y3EEq.js} +2 -2
- package/build/server/chunks/entries/endpoints/api/plugins/{_server.ts.js-CsI1UOHt.js → _server.ts.js-CDMP1Wcb.js} +5 -5
- package/build/server/chunks/entries/endpoints/api/plugins/inspect/{_server.ts.js-DWbYekhb.js → _server.ts.js-DHTVslXa.js} +2 -2
- package/build/server/chunks/entries/endpoints/api/plugins/install/{_server.ts.js-AXCutY-U.js → _server.ts.js-CoRV0mGt.js} +2 -2
- package/build/server/chunks/entries/endpoints/api/plugins/marketplace/{_server.ts.js-CFXMktEA.js → _server.ts.js-DZi9g4M6.js} +6 -6
- package/build/server/chunks/entries/endpoints/api/plugins/marketplace/icon/_name_/{_server.ts.js-Cy05NfhF.js → _server.ts.js-lf9gC82y.js} +6 -6
- package/build/server/chunks/entries/endpoints/api/plugins/marketplace/registries/{_server.ts.js-DQqqgWKo.js → _server.ts.js-Co8qdA33.js} +6 -6
- package/build/server/chunks/entries/endpoints/api/plugins/roles/{_server.ts.js-B79S5asG.js → _server.ts.js-DFoBOVVT.js} +4 -4
- package/build/server/chunks/entries/endpoints/api/plugins/updates/{_server.ts.js-Thl2IcAK.js → _server.ts.js-CzTVAiDc.js} +2 -2
- package/build/server/chunks/entries/endpoints/api/previews/check/{_server.ts.js-B_k324Tr.js → _server.ts.js-BAZpTlCx.js} +5 -5
- package/build/server/chunks/entries/endpoints/api/projects/_id_/passage/{_server.ts.js-CIxhoBpL.js → _server.ts.js-jkk-r-nJ.js} +6 -6
- package/build/server/chunks/entries/endpoints/api/projects/_id_/passage/commands/{_server.ts.js-O9x_13pZ.js → _server.ts.js-BdsAFbko.js} +6 -6
- package/build/server/chunks/entries/endpoints/api/projects/_id_/passage/consent/{_server.ts.js-DEgzcDqe.js → _server.ts.js-DiMBVbVj.js} +6 -6
- package/build/server/chunks/entries/endpoints/api/projects/_id_/passage/draft/{_server.ts.js-BSjtrwJd.js → _server.ts.js-BtDKXwvJ.js} +6 -6
- package/build/server/chunks/entries/endpoints/api/projects/_id_/passage/file/{_server.ts.js-BUurWySt.js → _server.ts.js-C02cyG4M.js} +6 -6
- package/build/server/chunks/entries/endpoints/api/projects/_id_/passage/test/{_server.ts.js-D3Pa9Duf.js → _server.ts.js-CA0wN6yE.js} +6 -6
- package/build/server/chunks/entries/endpoints/api/second-mates/_id_/peek/{_server.ts.js-CgHOXKL2.js → _server.ts.js-BPPzbpED.js} +5 -5
- package/build/server/chunks/entries/endpoints/api/services/{_server.ts.js-Bvp43GRW.js → _server.ts.js-FbF3xSIs.js} +5 -5
- package/build/server/chunks/entries/endpoints/api/setup/{_server.ts.js-Cg2r7zrS.js → _server.ts.js-BmS6o8yc.js} +4 -4
- package/build/server/chunks/entries/endpoints/api/slots/{_server.ts.js-BFb5QbZV.js → _server.ts.js-EsX_IGvt.js} +5 -5
- package/build/server/chunks/entries/endpoints/api/tasks/_id_/{_server.ts.js-DhUkYscn.js → _server.ts.js-BgBAYDN4.js} +6 -6
- package/build/server/chunks/entries/endpoints/api/tasks/_id_/artifacts/_...name_/{_server.ts.js-Dq7FA9oT.js → _server.ts.js-DuTLNykO.js} +5 -5
- package/build/server/chunks/entries/endpoints/api/tasks/_id_/diff/{_server.ts.js-BMvUuQBd.js → _server.ts.js-DDy8igq7.js} +5 -5
- package/build/server/chunks/entries/endpoints/api/tasks/_id_/output/{_server.ts.js-Dg5StgV_.js → _server.ts.js-D5pfyCzV.js} +5 -5
- package/build/server/chunks/entries/endpoints/api/tasks/_id_/preview/{_server.ts.js-CiHZBBZf.js → _server.ts.js-BA8S2_Gc.js} +5 -5
- package/build/server/chunks/entries/endpoints/api/tasks/_id_/preview/helper/{_server.ts.js-NFGa62rx.js → _server.ts.js-DbU3413y.js} +6 -6
- package/build/server/chunks/entries/endpoints/api/vault/{_server.ts.js-ZazsNjR_.js → _server.ts.js-BOfdrtdZ.js} +5 -5
- package/build/server/chunks/entries/endpoints/api/wheelhouse/source/{_server.ts.js-Dhn50zd_.js → _server.ts.js-BA5eDd2l.js} +2 -2
- package/build/server/chunks/entries/endpoints/api/wheelhouse/update/{_server.ts.js-DQaOoYAD.js → _server.ts.js-D5fyMbR0.js} +2 -2
- package/build/server/chunks/entries/endpoints/api/wheelhouse/upgrade/{_server.ts.js-C2YczFvz.js → _server.ts.js-B53DnvyB.js} +2 -2
- package/build/server/chunks/entries/endpoints/tasks/_id_/review/{_server.ts.js-gs8qidIj.js → _server.ts.js-bjte8O9v.js} +5 -5
- package/build/server/chunks/entries/{hooks.server.js-DYlKpcCn.js → hooks.server.js-vOikVCYe.js} +5 -5
- package/build/server/chunks/entries/pages/{_layout.server.ts.js-XDkbdDnv.js → _layout.server.ts.js-MabiHA-3.js} +2 -2
- package/build/server/chunks/entries/pages/{_page.server.ts.js-Df8OWu0u.js → _page.server.ts.js-B2yCD9g1.js} +2 -2
- package/build/server/chunks/entries/pages/decisions/{_page.server.ts.js-6dqY7i4n.js → _page.server.ts.js-0eAEf9gY.js} +2 -2
- package/build/server/chunks/entries/pages/deck/{_page.server.ts.js-BcgWass3.js → _page.server.ts.js-COZ-0Oqo.js} +2 -2
- package/build/server/chunks/entries/pages/files/{_page.server.ts.js-DlAHIttA.js → _page.server.ts.js-BewL0sIN.js} +2 -2
- package/build/server/chunks/entries/pages/harbour/{_page.server.ts.js-ttP7EjYb.js → _page.server.ts.js-BnCRyETa.js} +2 -2
- package/build/server/chunks/entries/pages/headroom/{_page.server.ts.js-CIRdCAak.js → _page.server.ts.js-D5_3UMoa.js} +2 -2
- package/build/server/chunks/entries/pages/inbox/{_page.server.ts.js-5fpuQdmf.js → _page.server.ts.js-jVFavtAR.js} +2 -2
- package/build/server/chunks/entries/pages/plugins/_plugin_/_page_/{_page.server.ts.js-BqCys3fk.js → _page.server.ts.js-BZZjxm-x.js} +2 -2
- package/build/server/chunks/entries/pages/projects/_id_/{_page.server.ts.js-D2cX34De.js → _page.server.ts.js-ByYW-gv7.js} +3 -3
- package/build/server/chunks/entries/pages/projects/_id_/_plugin_/_tab_/{_page.server.ts.js-CHcG1ZY_.js → _page.server.ts.js-BDnIvRvv.js} +3 -3
- package/build/server/chunks/entries/pages/projects/_id_/passage/{_page.server.ts.js-D9iYBYt8.js → _page.server.ts.js-D--AVAN1.js} +4 -4
- package/build/server/chunks/entries/pages/projects/_id_/passage/edit/{_page.server.ts.js-DSfSLIgw.js → _page.server.ts.js-Bh8glo5J.js} +2 -2
- package/build/server/chunks/entries/pages/remotes/{_page.server.ts.js-D0Z4vRAZ.js → _page.server.ts.js-CdD2bSZT.js} +2 -2
- package/build/server/chunks/entries/pages/settings/cloud/{_page.server.ts.js-C_n0FEhO.js → _page.server.ts.js-D-i30dSs.js} +2 -2
- package/build/server/chunks/entries/pages/settings/gateway/{_page.server.ts.js-CJiUzhR7.js → _page.server.ts.js-DvxWUFjz.js} +2 -2
- package/build/server/chunks/entries/pages/settings/plugins/{_page.server.ts.js-CLBcpfCA.js → _page.server.ts.js-1e73Wyr0.js} +2 -2
- package/build/server/chunks/entries/pages/settings/plugins/_plugin_/{_page.server.ts.js-BFQ4GDtX.js → _page.server.ts.js-BePUsUZP.js} +2 -2
- package/build/server/chunks/entries/pages/settings/setup/{_page.server.ts.js-mh9uyV2P.js → _page.server.ts.js-jRF6Ywzb.js} +2 -2
- package/build/server/chunks/entries/pages/settings/update/{_page.server.ts.js-DlrL-7uB.js → _page.server.ts.js-DugL5l6V.js} +2 -2
- package/build/server/chunks/entries/pages/setup/{_page.server.ts.js-DI4L_wuh.js → _page.server.ts.js-BiA9elO2.js} +3 -3
- package/build/server/chunks/entries/pages/tasks/_id_/{_page.server.ts.js-CvW38tDM.js → _page.server.ts.js-C2g0PwaJ.js} +3 -3
- package/build/server/chunks/entries/pages/tasks/_id_/doc/{_page.server.ts.js-Db9ngKZm.js → _page.server.ts.js-BDtV-JJy.js} +2 -2
- package/build/server/chunks/entries/pages/time/{_page.server.ts.js-DaUxp622.js → _page.server.ts.js-BbZ21xiD.js} +2 -2
- package/build/server/chunks/{handler-DuE9inyi.js → handler-C9BTW4CD.js} +3 -3
- package/build/server/chunks/{index.js-v6NQYBK5.js → index.js-pXGRX2i2.js} +2 -2
- package/build/server/chunks/{manifest.js-C-BasyGm.js → manifest.js-CJa1L_3F.js} +87 -87
- package/build/server/chunks/nodes/{0.js-CkGqrpTr.js → 0.js-C6oZQB5s.js} +7 -7
- package/build/server/chunks/nodes/{1.js-DPvN_CLJ.js → 1.js-Cttr3TG9.js} +2 -2
- package/build/server/chunks/nodes/{10.js-BJnSBLIC.js → 10.js-CB68zmyq.js} +2 -2
- package/build/server/chunks/nodes/{11.js-jTPdk8pR.js → 11.js-CebGVYzq.js} +7 -7
- package/build/server/chunks/nodes/{12.js-CO7t1TeY.js → 12.js-D2y8h8be.js} +8 -8
- package/build/server/chunks/nodes/{13.js-BLvOGglK.js → 13.js-udsCT8sc.js} +8 -8
- package/build/server/chunks/nodes/{14.js-CeAXlMCF.js → 14.js-LSLFIS3R.js} +9 -9
- package/build/server/chunks/nodes/{15.js-PpPpmDDu.js → 15.js-DwkMtPw0.js} +8 -8
- package/build/server/chunks/nodes/{16.js-CuhrVsHH.js → 16.js-D6ljBLvA.js} +6 -6
- package/build/server/chunks/nodes/{17.js-CokOaMn3.js → 17.js-CLW6wG6e.js} +2 -2
- package/build/server/chunks/nodes/{19.js-B0hnu-OJ.js → 19.js-Do3gZhOd.js} +6 -6
- package/build/server/chunks/nodes/{2.js-Br8oRykT.js → 2.js-Bg6BRLgk.js} +7 -7
- package/build/server/chunks/nodes/{20.js-SER2nvxc.js → 20.js-D6ikY3Qe.js} +7 -7
- package/build/server/chunks/nodes/{21.js-R5Vlv7DW.js → 21.js-DG7qeWyl.js} +7 -7
- package/build/server/chunks/nodes/{22.js-c2XCaRat.js → 22.js-kAdDBEK4.js} +7 -7
- package/build/server/chunks/nodes/{23.js-BTZOfMOZ.js → 23.js-CgwizXkn.js} +7 -7
- package/build/server/chunks/nodes/{24.js-D-FLfvVz.js → 24.js-LvCCKbXs.js} +4 -4
- package/build/server/chunks/nodes/{25.js-U6Wy5W2D.js → 25.js-DD6hUVsN.js} +7 -7
- package/build/server/chunks/nodes/{26.js-BQMRBWsE.js → 26.js-WwI1VHcM.js} +8 -8
- package/build/server/chunks/nodes/{27.js-DpDWMG3J.js → 27.js-Ciywgqr7.js} +7 -7
- package/build/server/chunks/nodes/{28.js-EI5OlQC1.js → 28.js-CDVsbZwJ.js} +7 -7
- package/build/server/chunks/nodes/{3.js-CO7rtIdb.js → 3.js-Bk1K3VSg.js} +7 -7
- package/build/server/chunks/nodes/{4.js-D-AgbO-p.js → 4.js-DR53ln0s.js} +7 -7
- package/build/server/chunks/nodes/{5.js-BgkAAZis.js → 5.js-Bnpq5DqQ.js} +6 -6
- package/build/server/chunks/nodes/{6.js-DX-_LVTg.js → 6.js-sO4LxGqG.js} +7 -7
- package/build/server/chunks/nodes/{7.js-DuuPTzmE.js → 7.js-CjmrTr_m.js} +7 -7
- package/build/server/chunks/nodes/{8.js-C5KCp3j1.js → 8.js-CY5LlZct.js} +7 -7
- package/build/server/chunks/nodes/{9.js-DMV1P9qA.js → 9.js-VSnIai5w.js} +2 -2
- package/dist/cli.js +919 -64
- package/dist/wh-vault.js +1 -1
- package/package.json +1 -1
- package/skills/manage-wheelhouse/SKILL.md +1 -0
- package/skills/manage-wheelhouse/references/operations.md +45 -44
- package/build/client/_app/immutable/chunks/-VKim-Eb.js.br +0 -0
- package/build/client/_app/immutable/chunks/-VKim-Eb.js.gz +0 -0
- package/build/client/_app/immutable/chunks/01zSWHgS.js.br +0 -1
- package/build/client/_app/immutable/chunks/01zSWHgS.js.gz +0 -0
- package/build/client/_app/immutable/chunks/BNqm5dMM.js +0 -2
- package/build/client/_app/immutable/chunks/BNqm5dMM.js.br +0 -0
- package/build/client/_app/immutable/chunks/BNqm5dMM.js.gz +0 -0
- package/build/client/_app/immutable/chunks/BOuuGRjG.js.br +0 -0
- package/build/client/_app/immutable/chunks/BOuuGRjG.js.gz +0 -0
- package/build/client/_app/immutable/chunks/BTAHFHcI.js.br +0 -0
- package/build/client/_app/immutable/chunks/BTAHFHcI.js.gz +0 -0
- package/build/client/_app/immutable/chunks/Bm5t_TcQ.js.br +0 -0
- package/build/client/_app/immutable/chunks/Bm5t_TcQ.js.gz +0 -0
- package/build/client/_app/immutable/chunks/Bpoe0kdM.js.br +0 -0
- package/build/client/_app/immutable/chunks/Bpoe0kdM.js.gz +0 -0
- package/build/client/_app/immutable/chunks/CGKMBwQH.js +0 -1
- package/build/client/_app/immutable/chunks/CGKMBwQH.js.br +0 -0
- package/build/client/_app/immutable/chunks/CGKMBwQH.js.gz +0 -0
- package/build/client/_app/immutable/chunks/CIXD8yUP.js.br +0 -4
- package/build/client/_app/immutable/chunks/CIXD8yUP.js.gz +0 -0
- package/build/client/_app/immutable/chunks/CV9fVJKz.js.br +0 -0
- package/build/client/_app/immutable/chunks/CV9fVJKz.js.gz +0 -0
- package/build/client/_app/immutable/chunks/CVuE8Mrz.js.br +0 -0
- package/build/client/_app/immutable/chunks/CVuE8Mrz.js.gz +0 -0
- package/build/client/_app/immutable/chunks/Crqp6P7x.js.br +0 -0
- package/build/client/_app/immutable/chunks/Crqp6P7x.js.gz +0 -0
- package/build/client/_app/immutable/chunks/CvBYM8q3.js.br +0 -0
- package/build/client/_app/immutable/chunks/D3U8nDaU.js.br +0 -0
- package/build/client/_app/immutable/chunks/D3U8nDaU.js.gz +0 -0
- package/build/client/_app/immutable/chunks/D62zkI9j.js.br +0 -0
- package/build/client/_app/immutable/chunks/D62zkI9j.js.gz +0 -0
- package/build/client/_app/immutable/chunks/DN_cUEc5.js.br +0 -0
- package/build/client/_app/immutable/chunks/DN_cUEc5.js.gz +0 -0
- package/build/client/_app/immutable/chunks/DvvdbrXj.js.br +0 -0
- package/build/client/_app/immutable/chunks/DvvdbrXj.js.gz +0 -0
- package/build/client/_app/immutable/chunks/_xQwGlKC.js.br +0 -0
- package/build/client/_app/immutable/chunks/_xQwGlKC.js.gz +0 -0
- package/build/client/_app/immutable/chunks/kQFtkWpw.js.br +0 -0
- package/build/client/_app/immutable/chunks/kQFtkWpw.js.gz +0 -0
- package/build/client/_app/immutable/chunks/l1ecpO65.js.br +0 -0
- package/build/client/_app/immutable/chunks/l1ecpO65.js.gz +0 -0
- package/build/client/_app/immutable/entry/app.CnyVl7c2.js.br +0 -0
- package/build/client/_app/immutable/entry/app.CnyVl7c2.js.gz +0 -0
- package/build/client/_app/immutable/entry/start.DTz_QGqw.js +0 -1
- package/build/client/_app/immutable/entry/start.DTz_QGqw.js.br +0 -0
- package/build/client/_app/immutable/entry/start.DTz_QGqw.js.gz +0 -0
- package/build/client/_app/immutable/nodes/0.8GFbRTop.js.br +0 -0
- package/build/client/_app/immutable/nodes/0.8GFbRTop.js.gz +0 -0
- package/build/client/_app/immutable/nodes/1.B7dgllIV.js.br +0 -0
- package/build/client/_app/immutable/nodes/1.B7dgllIV.js.gz +0 -0
- package/build/client/_app/immutable/nodes/10.Bg5oK9sw.js.br +0 -0
- package/build/client/_app/immutable/nodes/10.Bg5oK9sw.js.gz +0 -0
- package/build/client/_app/immutable/nodes/11.DYPka59n.js.br +0 -0
- package/build/client/_app/immutable/nodes/11.DYPka59n.js.gz +0 -0
- package/build/client/_app/immutable/nodes/12.B6I0GxaX.js.br +0 -0
- package/build/client/_app/immutable/nodes/12.B6I0GxaX.js.gz +0 -0
- package/build/client/_app/immutable/nodes/13.HNCDjm9L.js.br +0 -0
- package/build/client/_app/immutable/nodes/13.HNCDjm9L.js.gz +0 -0
- package/build/client/_app/immutable/nodes/14.Dm2jB_N0.js.br +0 -0
- package/build/client/_app/immutable/nodes/14.Dm2jB_N0.js.gz +0 -0
- package/build/client/_app/immutable/nodes/15.DnSRUIFM.js.br +0 -0
- package/build/client/_app/immutable/nodes/15.DnSRUIFM.js.gz +0 -0
- package/build/client/_app/immutable/nodes/16.BEJtiT-C.js.br +0 -0
- package/build/client/_app/immutable/nodes/16.BEJtiT-C.js.gz +0 -0
- package/build/client/_app/immutable/nodes/17.BJgcp0oo.js.br +0 -0
- package/build/client/_app/immutable/nodes/17.BJgcp0oo.js.gz +0 -0
- package/build/client/_app/immutable/nodes/19.BxG6SINq.js.br +0 -0
- package/build/client/_app/immutable/nodes/19.BxG6SINq.js.gz +0 -0
- package/build/client/_app/immutable/nodes/2.CQlQaA3F.js.br +0 -0
- package/build/client/_app/immutable/nodes/2.CQlQaA3F.js.gz +0 -0
- package/build/client/_app/immutable/nodes/20.CRi-FHPN.js.br +0 -0
- package/build/client/_app/immutable/nodes/20.CRi-FHPN.js.gz +0 -0
- package/build/client/_app/immutable/nodes/21.f5SleuvG.js.br +0 -0
- package/build/client/_app/immutable/nodes/21.f5SleuvG.js.gz +0 -0
- package/build/client/_app/immutable/nodes/22.DNrAQQXU.js.br +0 -0
- package/build/client/_app/immutable/nodes/22.DNrAQQXU.js.gz +0 -0
- package/build/client/_app/immutable/nodes/23.D6Fe2Mdx.js.br +0 -0
- package/build/client/_app/immutable/nodes/23.D6Fe2Mdx.js.gz +0 -0
- package/build/client/_app/immutable/nodes/24.C56ldwPz.js.br +0 -0
- package/build/client/_app/immutable/nodes/24.C56ldwPz.js.gz +0 -0
- package/build/client/_app/immutable/nodes/25.DZ4DThMl.js.br +0 -0
- package/build/client/_app/immutable/nodes/25.DZ4DThMl.js.gz +0 -0
- package/build/client/_app/immutable/nodes/26.C1eMf9Tn.js.br +0 -0
- package/build/client/_app/immutable/nodes/26.C1eMf9Tn.js.gz +0 -0
- package/build/client/_app/immutable/nodes/28.ByjDiuDk.js.br +0 -0
- package/build/client/_app/immutable/nodes/28.ByjDiuDk.js.gz +0 -0
- package/build/client/_app/immutable/nodes/3.Dw9t6bnq.js.br +0 -0
- package/build/client/_app/immutable/nodes/3.Dw9t6bnq.js.gz +0 -0
- package/build/client/_app/immutable/nodes/4.C-Vhe6qo.js.br +0 -0
- package/build/client/_app/immutable/nodes/4.C-Vhe6qo.js.gz +0 -0
- package/build/client/_app/immutable/nodes/6.-GosPZsI.js.br +0 -0
- package/build/client/_app/immutable/nodes/6.-GosPZsI.js.gz +0 -0
- package/build/client/_app/immutable/nodes/7.D5C714Zn.js.br +0 -0
- package/build/client/_app/immutable/nodes/7.D5C714Zn.js.gz +0 -0
- package/build/client/_app/immutable/nodes/8.CBl3BgIN.js.br +0 -0
- package/build/client/_app/immutable/nodes/8.CBl3BgIN.js.gz +0 -0
- package/build/client/_app/immutable/nodes/9.flfI1cr8.js.br +0 -0
- package/build/client/_app/immutable/nodes/9.flfI1cr8.js.gz +0 -0
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
|
|
8
|
-
import { fileURLToPath as
|
|
9
|
-
import { Command as
|
|
7
|
+
import path28 from "node:path";
|
|
8
|
+
import { fileURLToPath as fileURLToPath3, pathToFileURL } from "node:url";
|
|
9
|
+
import { Command as Command6, InvalidArgumentError as InvalidArgumentError3 } from "commander";
|
|
10
10
|
|
|
11
11
|
// package.json
|
|
12
|
-
var version = "0.
|
|
12
|
+
var version = "0.17.0";
|
|
13
13
|
|
|
14
14
|
// src/lib/harness.ts
|
|
15
15
|
var HARNESSES = ["claude", "codex", "opencode", "pi"];
|
|
@@ -836,8 +836,8 @@ function fingerprint(publicKey) {
|
|
|
836
836
|
return base32(digest.subarray(0, 10)).match(/.{4}/g).join("-");
|
|
837
837
|
}
|
|
838
838
|
function signed(key, context, ...fields) {
|
|
839
|
-
const
|
|
840
|
-
return b64u(sign(null, Buffer.from(
|
|
839
|
+
const message2 = [context, ...fields.map(String)].join("\n");
|
|
840
|
+
return b64u(sign(null, Buffer.from(message2, "utf8"), key.privateKey));
|
|
841
841
|
}
|
|
842
842
|
var pollSig = (key, pairingId) => signed(key, "whc-pair-poll-v1", pairingId);
|
|
843
843
|
var unpairSig = (key, deviceId, ts) => signed(key, "whc-unpair-v1", deviceId, ts);
|
|
@@ -895,8 +895,8 @@ var HOP_BY_HOP = /* @__PURE__ */ new Set([
|
|
|
895
895
|
"transfer-encoding",
|
|
896
896
|
"upgrade"
|
|
897
897
|
]);
|
|
898
|
-
function isRestartPath(
|
|
899
|
-
let p =
|
|
898
|
+
function isRestartPath(path29) {
|
|
899
|
+
let p = path29.split(/[?#]/, 1)[0];
|
|
900
900
|
for (let i = 0; i < 3; i++) {
|
|
901
901
|
try {
|
|
902
902
|
const d = decodeURIComponent(p);
|
|
@@ -1505,7 +1505,7 @@ var CloudSettings = class {
|
|
|
1505
1505
|
async view(viaRelay = false) {
|
|
1506
1506
|
const { settings: settings2, error } = await this.read();
|
|
1507
1507
|
const found = settings2.device ? await this.findKey() : null;
|
|
1508
|
-
const
|
|
1508
|
+
const status2 = await this.readStatus();
|
|
1509
1509
|
const device = settings2.device && found ? {
|
|
1510
1510
|
id: settings2.device.id,
|
|
1511
1511
|
name: settings2.device.name,
|
|
@@ -1516,7 +1516,7 @@ var CloudSettings = class {
|
|
|
1516
1516
|
pinnedAt: settings2.device.pinnedAt,
|
|
1517
1517
|
pending: pendingView(settings2.device)
|
|
1518
1518
|
} : null;
|
|
1519
|
-
const live =
|
|
1519
|
+
const live = status2 && device && status2.deviceId === device.id && alive(status2.pid) ? status2 : null;
|
|
1520
1520
|
let state;
|
|
1521
1521
|
let reason = error;
|
|
1522
1522
|
if (!settings2.enabled) state = "off";
|
|
@@ -1524,19 +1524,19 @@ var CloudSettings = class {
|
|
|
1524
1524
|
state = "not-paired";
|
|
1525
1525
|
if (settings2.device && !found) {
|
|
1526
1526
|
reason = "This machine\u2019s device key is missing, so it cannot connect. Pair it again.";
|
|
1527
|
-
} else if (
|
|
1528
|
-
reason =
|
|
1527
|
+
} else if (status2?.state === "stopped" && status2.reason) {
|
|
1528
|
+
reason = status2.reason;
|
|
1529
1529
|
}
|
|
1530
1530
|
} else if (!live) {
|
|
1531
1531
|
if (!settings2.started) state = "off";
|
|
1532
1532
|
else
|
|
1533
|
-
state =
|
|
1534
|
-
if (state === "stopped") reason =
|
|
1533
|
+
state = status2 && status2.deviceId === device.id && status2.state === "stopped" && status2.reason ? "stopped" : "not-running";
|
|
1534
|
+
if (state === "stopped") reason = status2.reason;
|
|
1535
1535
|
} else {
|
|
1536
1536
|
state = live.state === "online" ? "online" : live.state === "stopped" ? "stopped" : "connecting";
|
|
1537
1537
|
reason = live.reason ?? reason;
|
|
1538
1538
|
}
|
|
1539
|
-
const recent =
|
|
1539
|
+
const recent = status2 && device && status2.deviceId === device.id ? status2 : null;
|
|
1540
1540
|
return {
|
|
1541
1541
|
schema: "wheelhouse-cloud.v1",
|
|
1542
1542
|
enabled: settings2.enabled,
|
|
@@ -1701,9 +1701,9 @@ var Relay = class {
|
|
|
1701
1701
|
s.ws.send(payload, { binary: kind === FRAME_WS_BINARY }, () => this.passed(s, payload.length));
|
|
1702
1702
|
}
|
|
1703
1703
|
/** A relay session ended, or is no longer served: every stream of it is reset. */
|
|
1704
|
-
endSession(sessionId,
|
|
1704
|
+
endSession(sessionId, message2) {
|
|
1705
1705
|
for (const s of [...this.streams.values()]) {
|
|
1706
|
-
if (s.session === sessionId) this.reset(s.id, "refused",
|
|
1706
|
+
if (s.session === sessionId) this.reset(s.id, "refused", message2);
|
|
1707
1707
|
}
|
|
1708
1708
|
}
|
|
1709
1709
|
/** The device socket is gone: every stream on it ends (§7). */
|
|
@@ -1769,13 +1769,13 @@ var Relay = class {
|
|
|
1769
1769
|
else if (s.ended) this.finish(s);
|
|
1770
1770
|
else s.res?.resume();
|
|
1771
1771
|
}
|
|
1772
|
-
reset(id, code,
|
|
1772
|
+
reset(id, code, message2, extra = {}) {
|
|
1773
1773
|
const was = this.streams.has(id);
|
|
1774
1774
|
this.drop(id);
|
|
1775
1775
|
if (was || extra.force) {
|
|
1776
1776
|
const { force: _, ...rest } = extra;
|
|
1777
1777
|
void _;
|
|
1778
|
-
this.opts.send({ t: "reset", id, code, ...
|
|
1778
|
+
this.opts.send({ t: "reset", id, code, ...message2 ? { message: message2 } : {}, ...rest });
|
|
1779
1779
|
}
|
|
1780
1780
|
}
|
|
1781
1781
|
/** Forget a stream and abort its local side, sending nothing. */
|
|
@@ -1809,8 +1809,8 @@ var Relay = class {
|
|
|
1809
1809
|
if (this.streams.size >= this.opts.limits.maxStreams) return { ok: false, code: "limit" };
|
|
1810
1810
|
const relay = parseRelay(msg.relay);
|
|
1811
1811
|
const headers = parseHeaders(msg.headers);
|
|
1812
|
-
const
|
|
1813
|
-
if (!relay || !headers || typeof
|
|
1812
|
+
const path29 = msg.path;
|
|
1813
|
+
if (!relay || !headers || typeof path29 !== "string" || !path29.startsWith("/") || path29.length > 8192 || !headerSafe(path29) || path29.includes(" ")) {
|
|
1814
1814
|
return { ok: false, code: "protocol", message: "The request is malformed." };
|
|
1815
1815
|
}
|
|
1816
1816
|
const refusal = this.opts.sessionRefusal?.(relay.sessionId);
|
|
@@ -1822,7 +1822,7 @@ var Relay = class {
|
|
|
1822
1822
|
message: "Wheelhouse Cloud is turned off on this machine."
|
|
1823
1823
|
};
|
|
1824
1824
|
}
|
|
1825
|
-
if (isRestartPath(
|
|
1825
|
+
if (isRestartPath(path29)) {
|
|
1826
1826
|
return {
|
|
1827
1827
|
ok: false,
|
|
1828
1828
|
code: "refused",
|
|
@@ -1832,7 +1832,7 @@ var Relay = class {
|
|
|
1832
1832
|
const target = isObj2(msg.target) ? msg.target : {};
|
|
1833
1833
|
const app = this.opts.targets.appPort();
|
|
1834
1834
|
if (target.kind === "app") {
|
|
1835
|
-
return { ok: true, port: app, host: "127.0.0.1", path:
|
|
1835
|
+
return { ok: true, port: app, host: "127.0.0.1", path: path29, headers, relay };
|
|
1836
1836
|
}
|
|
1837
1837
|
const port = target.port;
|
|
1838
1838
|
if (target.kind !== "port" || typeof port !== "number" || !Number.isInteger(port) || port < 1 || port > 65535) {
|
|
@@ -1843,7 +1843,7 @@ var Relay = class {
|
|
|
1843
1843
|
}
|
|
1844
1844
|
const late = this.opts.sessionRefusal?.(relay.sessionId);
|
|
1845
1845
|
if (late) return { ok: false, code: "refused", message: late };
|
|
1846
|
-
return { ok: true, port, host: "localhost", path:
|
|
1846
|
+
return { ok: true, port, host: "localhost", path: path29, headers, relay };
|
|
1847
1847
|
}
|
|
1848
1848
|
/** §6.3: the headers for the local request. */
|
|
1849
1849
|
localHeaders(a, originChecked, ws) {
|
|
@@ -1926,8 +1926,8 @@ var Relay = class {
|
|
|
1926
1926
|
}
|
|
1927
1927
|
this.opts.send({ t: "res", id: s.id, status: res.statusCode ?? 502, headers });
|
|
1928
1928
|
this.touch(s);
|
|
1929
|
-
const
|
|
1930
|
-
if (method === "HEAD" ||
|
|
1929
|
+
const status2 = res.statusCode ?? 0;
|
|
1930
|
+
if (method === "HEAD" || status2 === 204 || status2 === 304) {
|
|
1931
1931
|
res.resume();
|
|
1932
1932
|
this.finish(s);
|
|
1933
1933
|
return;
|
|
@@ -1986,12 +1986,12 @@ var Relay = class {
|
|
|
1986
1986
|
if (!this.opened(s)) return;
|
|
1987
1987
|
const mine = () => this.streams.get(id) === s;
|
|
1988
1988
|
ws.on("unexpected-response", (req, res) => {
|
|
1989
|
-
const
|
|
1989
|
+
const status2 = res.statusCode ?? 502;
|
|
1990
1990
|
res.resume();
|
|
1991
1991
|
req.destroy();
|
|
1992
1992
|
if (mine())
|
|
1993
|
-
this.reset(id,
|
|
1994
|
-
status
|
|
1993
|
+
this.reset(id, status2 === 403 || status2 === 401 ? "refused" : "unreachable", void 0, {
|
|
1994
|
+
status: status2
|
|
1995
1995
|
});
|
|
1996
1996
|
});
|
|
1997
1997
|
ws.on("open", () => {
|
|
@@ -2822,9 +2822,9 @@ var wsTransport = {
|
|
|
2822
2822
|
}
|
|
2823
2823
|
};
|
|
2824
2824
|
var DiscordError = class extends Error {
|
|
2825
|
-
constructor(
|
|
2826
|
-
super(
|
|
2827
|
-
this.status =
|
|
2825
|
+
constructor(status2, message2) {
|
|
2826
|
+
super(message2);
|
|
2827
|
+
this.status = status2;
|
|
2828
2828
|
this.name = "DiscordError";
|
|
2829
2829
|
}
|
|
2830
2830
|
status;
|
|
@@ -2911,8 +2911,8 @@ async function checkDiscordToken(token, opts = {}) {
|
|
|
2911
2911
|
publicBot: typeof app?.bot_public === "boolean" ? app.bot_public : null
|
|
2912
2912
|
};
|
|
2913
2913
|
} catch (e) {
|
|
2914
|
-
const
|
|
2915
|
-
if (
|
|
2914
|
+
const status2 = e instanceof DiscordError ? e.status : 0;
|
|
2915
|
+
if (status2 === 401)
|
|
2916
2916
|
return {
|
|
2917
2917
|
ok: false,
|
|
2918
2918
|
error: "Discord refused this token: it is not a valid bot token, or it was reset."
|
|
@@ -4691,7 +4691,7 @@ function remoteCommand(over = {}) {
|
|
|
4691
4691
|
platform: `${process.platform}-${process.arch}`,
|
|
4692
4692
|
version
|
|
4693
4693
|
});
|
|
4694
|
-
const
|
|
4694
|
+
const keep2 = async (settings2, gateway, key, name, device) => {
|
|
4695
4695
|
const where = await keepDevice(settings2, gateway, key, name, device);
|
|
4696
4696
|
deps.log(
|
|
4697
4697
|
`Connected: ${device.name || name}${device.user ? `, approved by ${device.user}` : ""}.`
|
|
@@ -4742,7 +4742,7 @@ function remoteCommand(over = {}) {
|
|
|
4742
4742
|
deps.log(`Waiting for approval (the code works for ${mins} minutes)\u2026`);
|
|
4743
4743
|
const outcome = await pollPairing(gateway, key, p, deps.pairing);
|
|
4744
4744
|
if (outcome.status !== "approved") return fail(`${outcome.reason} Nothing was paired.`);
|
|
4745
|
-
await
|
|
4745
|
+
await keep2(settings2, gateway, key, name, outcome.device);
|
|
4746
4746
|
deps.log(
|
|
4747
4747
|
"Start it on the Remotes page in Wheelhouse, which keeps the connection up while `wheelhouse open` runs; or run `wheelhouse remote run`."
|
|
4748
4748
|
);
|
|
@@ -4925,7 +4925,7 @@ function remoteCommand(over = {}) {
|
|
|
4925
4925
|
const outcome = await Promise.race([pollPairing(gateway, key, p, deps.pairing), stopped]);
|
|
4926
4926
|
if (!outcome) return false;
|
|
4927
4927
|
if (outcome.status === "approved") {
|
|
4928
|
-
await
|
|
4928
|
+
await keep2(settings2, gateway, key, m.name, outcome.device);
|
|
4929
4929
|
return true;
|
|
4930
4930
|
}
|
|
4931
4931
|
if (outcome.status !== "expired") {
|
|
@@ -4942,6 +4942,860 @@ function remoteCommand(over = {}) {
|
|
|
4942
4942
|
return cmd;
|
|
4943
4943
|
}
|
|
4944
4944
|
|
|
4945
|
+
// cli/skills.ts
|
|
4946
|
+
import path25 from "node:path";
|
|
4947
|
+
import { fileURLToPath } from "node:url";
|
|
4948
|
+
import { Command as Command4 } from "commander";
|
|
4949
|
+
|
|
4950
|
+
// src/lib/server/material/ops.ts
|
|
4951
|
+
import { execFile as execFile3 } from "node:child_process";
|
|
4952
|
+
import { mkdtemp as mkdtemp3, readFile as readFile13, rm as rm9 } from "node:fs/promises";
|
|
4953
|
+
import { tmpdir } from "node:os";
|
|
4954
|
+
import path24 from "node:path";
|
|
4955
|
+
|
|
4956
|
+
// src/lib/server/material/bundle.ts
|
|
4957
|
+
import { readFile as readFile8 } from "node:fs/promises";
|
|
4958
|
+
import path18 from "node:path";
|
|
4959
|
+
var REVIEW_SURFACE_MARKER = "<!-- wheelhouse:review-surface -->";
|
|
4960
|
+
var SKILLS = [
|
|
4961
|
+
{
|
|
4962
|
+
name: "manage-wheelhouse",
|
|
4963
|
+
files: ["SKILL.md", "references/operations.md"],
|
|
4964
|
+
assumptions: [
|
|
4965
|
+
{ file: "bin/fm-inbox.sh", marker: "fm-inbox.sh reply" },
|
|
4966
|
+
{ file: "bin/fm-inbox.sh", marker: "fm-inbox.sh receipts" }
|
|
4967
|
+
]
|
|
4968
|
+
}
|
|
4969
|
+
];
|
|
4970
|
+
var plain = (s) => s.replace(/[^\p{L}\p{N} ._()-]+/gu, " ").replace(/\s+/g, " ").trim().slice(0, 60) || "the plugin";
|
|
4971
|
+
function reviewSurfaceSection(surface) {
|
|
4972
|
+
if (!surface) {
|
|
4973
|
+
return [
|
|
4974
|
+
"Active review surface: **built-in**. Firstmate\u2019s Lavish boards and Wheelhouse\u2019s live preview, with its preview helper, are how the captain reviews work.",
|
|
4975
|
+
"Show the captain an HTML artifact as Firstmate\u2019s own Lavish rule says, and a running app by reporting `preview <url>` (see Preview cards below).",
|
|
4976
|
+
"Wheelhouse rewrites this section when the captain chooses a review-surface plugin in Settings \u2192 Plugins (`GET /api/plugins` lists `roles`)."
|
|
4977
|
+
].join(" ");
|
|
4978
|
+
}
|
|
4979
|
+
const name = plain(surface.name);
|
|
4980
|
+
const where = surface.repository ? `its README in https://github.com/${surface.repository}` : "`wheelhouse plugin list` and `GET /api/plugins`";
|
|
4981
|
+
return [
|
|
4982
|
+
`Active review surface: **${name}** (the \`${surface.id}\` plugin), chosen by the captain in Wheelhouse Settings \u2192 Plugins. While it is on it replaces Lavish and Wheelhouse\u2019s preview helper.`,
|
|
4983
|
+
"",
|
|
4984
|
+
`- Use ${name} instead of Lavish for anything you or a worker would show the captain: an HTML artifact, a board, a design, a running app. This overrides the Lavish line in scout and worker briefs: open no Lavish board for the captain while this section names a plugin, and when you write a brief, tell the worker to use ${name} instead of Lavish.`,
|
|
4985
|
+
`- A running app still reports \`preview <url>\` (see Preview cards below); Wheelhouse shows ${name}\u2019s button as the primary action on that preview, with no preview helper or board link.`,
|
|
4986
|
+
`- How to use ${name} is the plugin\u2019s own; see ${where}. When it cannot show something, tell the captain rather than quietly falling back to Lavish.`,
|
|
4987
|
+
`- Wheelhouse rewrites this section whenever the role changes: the captain chooses another plugin or the built-in, or turns ${name} off or removes it.`
|
|
4988
|
+
].join("\n");
|
|
4989
|
+
}
|
|
4990
|
+
async function renderSkill(skillsRoot, skill, inputs) {
|
|
4991
|
+
const tree = {};
|
|
4992
|
+
for (const file of skill.files) {
|
|
4993
|
+
const text2 = await readFile8(path18.join(skillsRoot, skill.name, file), "utf8");
|
|
4994
|
+
tree[file] = file === "SKILL.md" ? text2.replace(REVIEW_SURFACE_MARKER, () => reviewSurfaceSection(inputs.reviewSurface)) : text2;
|
|
4995
|
+
}
|
|
4996
|
+
return tree;
|
|
4997
|
+
}
|
|
4998
|
+
|
|
4999
|
+
// src/lib/server/material/files.ts
|
|
5000
|
+
import { createHash as createHash5 } from "node:crypto";
|
|
5001
|
+
import { lstat as lstat3, mkdir as mkdir7, readFile as readFile9, readdir as readdir2, realpath as realpath4, rename as rename7, rm as rm6, writeFile as writeFile6 } from "node:fs/promises";
|
|
5002
|
+
import path19 from "node:path";
|
|
5003
|
+
var sha2562 = (text2) => createHash5("sha256").update(text2).digest("hex");
|
|
5004
|
+
var hashTree = (tree) => Object.fromEntries(Object.entries(tree).map(([file, text2]) => [file, sha2562(text2)]));
|
|
5005
|
+
function sameHashes(a, b) {
|
|
5006
|
+
const keys = Object.keys(a);
|
|
5007
|
+
return keys.length === Object.keys(b).length && keys.every((k) => b[k] === a[k]);
|
|
5008
|
+
}
|
|
5009
|
+
async function present(file) {
|
|
5010
|
+
try {
|
|
5011
|
+
await lstat3(file);
|
|
5012
|
+
return true;
|
|
5013
|
+
} catch (e) {
|
|
5014
|
+
if (e.code === "ENOENT") return false;
|
|
5015
|
+
throw e;
|
|
5016
|
+
}
|
|
5017
|
+
}
|
|
5018
|
+
async function physical(file) {
|
|
5019
|
+
try {
|
|
5020
|
+
return await realpath4(file);
|
|
5021
|
+
} catch (e) {
|
|
5022
|
+
if (e.code !== "ENOENT") throw e;
|
|
5023
|
+
const parent = path19.dirname(file);
|
|
5024
|
+
if (parent === file) throw e;
|
|
5025
|
+
return path19.join(await physical(parent), path19.basename(file));
|
|
5026
|
+
}
|
|
5027
|
+
}
|
|
5028
|
+
async function insideAny(targets, protectedDirs) {
|
|
5029
|
+
const real2 = await Promise.all(targets.map(physical));
|
|
5030
|
+
for (const dir of protectedDirs) {
|
|
5031
|
+
const p = await physical(path19.resolve(dir));
|
|
5032
|
+
if (real2.some((t) => t === p || t.startsWith(p + path19.sep))) return true;
|
|
5033
|
+
}
|
|
5034
|
+
return false;
|
|
5035
|
+
}
|
|
5036
|
+
async function readTree(dir, prefix = "") {
|
|
5037
|
+
const tree = {};
|
|
5038
|
+
for (const entry2 of await readdir2(dir, { withFileTypes: true })) {
|
|
5039
|
+
const rel = prefix + entry2.name;
|
|
5040
|
+
if (entry2.isDirectory())
|
|
5041
|
+
Object.assign(tree, await readTree(path19.join(dir, entry2.name), rel + "/"));
|
|
5042
|
+
else if (entry2.isFile()) tree[rel] = await readFile9(path19.join(dir, entry2.name), "utf8");
|
|
5043
|
+
else throw new Error(`${rel} is a symbolic link or special file.`);
|
|
5044
|
+
}
|
|
5045
|
+
return tree;
|
|
5046
|
+
}
|
|
5047
|
+
async function writeTree(dir, tree) {
|
|
5048
|
+
for (const [file, text2] of Object.entries(tree)) {
|
|
5049
|
+
await mkdir7(path19.dirname(path19.join(dir, file)), { recursive: true });
|
|
5050
|
+
await writeFile6(path19.join(dir, file), text2);
|
|
5051
|
+
}
|
|
5052
|
+
}
|
|
5053
|
+
async function replaceTree(dir, tree) {
|
|
5054
|
+
const stage = `${dir}.new-${process.pid}-${Date.now()}`;
|
|
5055
|
+
await rm6(stage, { recursive: true, force: true });
|
|
5056
|
+
await writeTree(stage, tree);
|
|
5057
|
+
await mkdir7(stage, { recursive: true });
|
|
5058
|
+
await rm6(dir, { recursive: true, force: true });
|
|
5059
|
+
await rename7(stage, dir);
|
|
5060
|
+
}
|
|
5061
|
+
async function writeAtomic3(file, text2, mode = 384) {
|
|
5062
|
+
await mkdir7(path19.dirname(file), { recursive: true });
|
|
5063
|
+
const tmp = `${file}.${process.pid}-${Date.now()}.tmp`;
|
|
5064
|
+
await writeFile6(tmp, text2, { mode });
|
|
5065
|
+
await rename7(tmp, file);
|
|
5066
|
+
}
|
|
5067
|
+
|
|
5068
|
+
// src/lib/server/material/manifest.ts
|
|
5069
|
+
import { readFile as readFile10, rename as rename8, rm as rm7 } from "node:fs/promises";
|
|
5070
|
+
import path20 from "node:path";
|
|
5071
|
+
var MANIFEST_SCHEMA = "wheelhouse-material.v1";
|
|
5072
|
+
var HISTORY_MAX = 50;
|
|
5073
|
+
var materialDir = (configDir) => path20.join(configDir, "agent-material");
|
|
5074
|
+
var manifestFile = (dir) => path20.join(dir, "manifest.json");
|
|
5075
|
+
var settingsFile = (dir) => path20.join(dir, "settings.json");
|
|
5076
|
+
var folder = (id) => id.replace(/[^A-Za-z0-9@._-]/g, "_");
|
|
5077
|
+
var baseDir = (dir, id) => path20.join(dir, "base", folder(id));
|
|
5078
|
+
var proposedDir = (dir, id) => path20.join(dir, "proposed", folder(id));
|
|
5079
|
+
var backupDir = (dir, id, at) => path20.join(dir, "backup", folder(id), at.toISOString().replace(/[:.]/g, "-"));
|
|
5080
|
+
function emptyManifest(version2, harness) {
|
|
5081
|
+
return {
|
|
5082
|
+
schema: MANIFEST_SCHEMA,
|
|
5083
|
+
wheelhouse: { version: version2 },
|
|
5084
|
+
firstmate: null,
|
|
5085
|
+
render: { reviewSurface: null, harness },
|
|
5086
|
+
items: {},
|
|
5087
|
+
history: []
|
|
5088
|
+
};
|
|
5089
|
+
}
|
|
5090
|
+
function valid(m) {
|
|
5091
|
+
const x = m;
|
|
5092
|
+
return !!x && x.schema === MANIFEST_SCHEMA && typeof x.items === "object" && x.items !== null && Array.isArray(x.history) && typeof x.render === "object" && x.render !== null;
|
|
5093
|
+
}
|
|
5094
|
+
async function readManifest(dir, look = false) {
|
|
5095
|
+
const file = manifestFile(dir);
|
|
5096
|
+
let text2;
|
|
5097
|
+
try {
|
|
5098
|
+
text2 = await readFile10(file, "utf8");
|
|
5099
|
+
} catch (e) {
|
|
5100
|
+
if (e.code === "ENOENT") return null;
|
|
5101
|
+
throw e;
|
|
5102
|
+
}
|
|
5103
|
+
try {
|
|
5104
|
+
const m = JSON.parse(text2);
|
|
5105
|
+
if (valid(m)) return m;
|
|
5106
|
+
} catch {
|
|
5107
|
+
}
|
|
5108
|
+
if (!look) await rename8(file, `${file}.invalid-${Date.now()}`);
|
|
5109
|
+
return null;
|
|
5110
|
+
}
|
|
5111
|
+
async function writeManifest(dir, m) {
|
|
5112
|
+
m.history = m.history.slice(-HISTORY_MAX);
|
|
5113
|
+
await writeAtomic3(manifestFile(dir), JSON.stringify(m, null, 2) + "\n");
|
|
5114
|
+
}
|
|
5115
|
+
async function readBase(dir, id) {
|
|
5116
|
+
const d = baseDir(dir, id);
|
|
5117
|
+
return await present(d) ? readTree(d) : null;
|
|
5118
|
+
}
|
|
5119
|
+
var saveBase = (dir, id, tree) => replaceTree(baseDir(dir, id), tree);
|
|
5120
|
+
async function saveProposed(dir, id, tree) {
|
|
5121
|
+
if (tree) await replaceTree(proposedDir(dir, id), tree);
|
|
5122
|
+
else await rm7(proposedDir(dir, id), { recursive: true, force: true });
|
|
5123
|
+
}
|
|
5124
|
+
async function forgetItem(dir, id) {
|
|
5125
|
+
await rm7(baseDir(dir, id), { recursive: true, force: true });
|
|
5126
|
+
await rm7(proposedDir(dir, id), { recursive: true, force: true });
|
|
5127
|
+
}
|
|
5128
|
+
async function readOff(dir) {
|
|
5129
|
+
try {
|
|
5130
|
+
const s = JSON.parse(await readFile10(settingsFile(dir), "utf8"));
|
|
5131
|
+
return new Set(
|
|
5132
|
+
Object.entries(s.items ?? {}).filter(([, on]) => on === false).map(([id]) => id)
|
|
5133
|
+
);
|
|
5134
|
+
} catch {
|
|
5135
|
+
return /* @__PURE__ */ new Set();
|
|
5136
|
+
}
|
|
5137
|
+
}
|
|
5138
|
+
async function writeOff(dir, off) {
|
|
5139
|
+
const items = Object.fromEntries([...off].sort().map((id) => [id, false]));
|
|
5140
|
+
await writeAtomic3(settingsFile(dir), JSON.stringify({ items }, null, 2) + "\n");
|
|
5141
|
+
}
|
|
5142
|
+
var chains = /* @__PURE__ */ new Map();
|
|
5143
|
+
function serialize(dir, work) {
|
|
5144
|
+
const prev = chains.get(dir) ?? Promise.resolve();
|
|
5145
|
+
const run = prev.then(work, work);
|
|
5146
|
+
const settled = run.catch(() => {
|
|
5147
|
+
});
|
|
5148
|
+
chains.set(dir, settled);
|
|
5149
|
+
void settled.then(() => {
|
|
5150
|
+
if (chains.get(dir) === settled) chains.delete(dir);
|
|
5151
|
+
});
|
|
5152
|
+
return run;
|
|
5153
|
+
}
|
|
5154
|
+
|
|
5155
|
+
// src/lib/server/material/skilldir.ts
|
|
5156
|
+
import { lstat as lstat4, mkdir as mkdir8, mkdtemp as mkdtemp2, readFile as readFile11, rename as rename9, rm as rm8, writeFile as writeFile7 } from "node:fs/promises";
|
|
5157
|
+
import path21 from "node:path";
|
|
5158
|
+
var RECEIPT = ".wheelhouse-managed.json";
|
|
5159
|
+
var RECEIPT_SCHEMA = "wheelhouse-skill.v1";
|
|
5160
|
+
function receiptHashes(text2) {
|
|
5161
|
+
try {
|
|
5162
|
+
const r = JSON.parse(text2);
|
|
5163
|
+
if (r.schema !== RECEIPT_SCHEMA || !r.files || typeof r.files !== "object") return null;
|
|
5164
|
+
const files = Object.entries(r.files);
|
|
5165
|
+
return files.every(([, v]) => typeof v === "string") ? r.files : null;
|
|
5166
|
+
} catch {
|
|
5167
|
+
return null;
|
|
5168
|
+
}
|
|
5169
|
+
}
|
|
5170
|
+
async function readLocal(target) {
|
|
5171
|
+
try {
|
|
5172
|
+
if (!await present(target)) return { kind: "absent" };
|
|
5173
|
+
if (!(await lstat4(target)).isDirectory())
|
|
5174
|
+
return { kind: "unreadable", reason: "it is a symbolic link or not a folder" };
|
|
5175
|
+
const tree = await readTree(target);
|
|
5176
|
+
const receipt = RECEIPT in tree ? receiptHashes(tree[RECEIPT]) : null;
|
|
5177
|
+
delete tree[RECEIPT];
|
|
5178
|
+
return { kind: "files", tree, receipt };
|
|
5179
|
+
} catch (e) {
|
|
5180
|
+
if (!await present(target).catch(() => true)) return { kind: "absent" };
|
|
5181
|
+
return { kind: "unreadable", reason: e.message };
|
|
5182
|
+
}
|
|
5183
|
+
}
|
|
5184
|
+
var receiptText = (version2, hashes) => JSON.stringify({ schema: RECEIPT_SCHEMA, version: version2, files: hashes }) + "\n";
|
|
5185
|
+
async function swapIn(target, tree, receipt, check) {
|
|
5186
|
+
const parent = path21.dirname(target);
|
|
5187
|
+
await mkdir8(parent, { recursive: true });
|
|
5188
|
+
const stage = await mkdtemp2(path21.join(parent, ".wheelhouse-skill-"));
|
|
5189
|
+
let placed = false;
|
|
5190
|
+
try {
|
|
5191
|
+
await writeTree(stage, tree);
|
|
5192
|
+
await writeFile7(path21.join(stage, RECEIPT), receipt);
|
|
5193
|
+
const backup = stage + "-previous";
|
|
5194
|
+
for (let attempt = 1; ; attempt++) {
|
|
5195
|
+
const now = await readLocal(target);
|
|
5196
|
+
const verdict = check(now);
|
|
5197
|
+
if (verdict !== "replace") return verdict;
|
|
5198
|
+
try {
|
|
5199
|
+
if (now.kind !== "absent") await rename9(target, backup);
|
|
5200
|
+
await rename9(stage, target);
|
|
5201
|
+
placed = true;
|
|
5202
|
+
return "swapped";
|
|
5203
|
+
} catch (e) {
|
|
5204
|
+
await rename9(backup, target).catch(() => {
|
|
5205
|
+
});
|
|
5206
|
+
if (attempt === 20) throw e;
|
|
5207
|
+
} finally {
|
|
5208
|
+
await rm8(backup, { recursive: true, force: true });
|
|
5209
|
+
}
|
|
5210
|
+
await new Promise((resolve) => setTimeout(resolve, 10 * attempt));
|
|
5211
|
+
}
|
|
5212
|
+
} finally {
|
|
5213
|
+
if (!placed) await rm8(stage, { recursive: true, force: true });
|
|
5214
|
+
}
|
|
5215
|
+
}
|
|
5216
|
+
|
|
5217
|
+
// src/lib/server/material/sync.ts
|
|
5218
|
+
import { execFile as execFile2 } from "node:child_process";
|
|
5219
|
+
import { readFile as readFile12, stat as stat6 } from "node:fs/promises";
|
|
5220
|
+
import path23 from "node:path";
|
|
5221
|
+
|
|
5222
|
+
// src/lib/server/material/targets.ts
|
|
5223
|
+
import { homedir as homedir3 } from "node:os";
|
|
5224
|
+
import path22 from "node:path";
|
|
5225
|
+
function skillRootDir(root, env) {
|
|
5226
|
+
const home = env.HOME || homedir3();
|
|
5227
|
+
return root === "claude" ? path22.resolve(env.CLAUDE_CONFIG_DIR || path22.join(home, ".claude"), "skills") : path22.resolve(home, ".agents", "skills");
|
|
5228
|
+
}
|
|
5229
|
+
var rootsFor = (harness) => harness === "claude" ? ["claude"] : ["claude", "agents"];
|
|
5230
|
+
|
|
5231
|
+
// src/lib/server/material/sync.ts
|
|
5232
|
+
var skillId = (name, root) => `skill:${name}@${root}`;
|
|
5233
|
+
function plannedSkills(env, harness) {
|
|
5234
|
+
return SKILLS.flatMap(
|
|
5235
|
+
(skill) => rootsFor(harness).map((root) => ({
|
|
5236
|
+
id: skillId(skill.name, root),
|
|
5237
|
+
skill,
|
|
5238
|
+
target: path23.join(skillRootDir(root, env), skill.name)
|
|
5239
|
+
}))
|
|
5240
|
+
);
|
|
5241
|
+
}
|
|
5242
|
+
function decide(o) {
|
|
5243
|
+
if (o.local === "unreadable") return "foreign";
|
|
5244
|
+
if (o.local === null) return "install";
|
|
5245
|
+
if (!o.bases.length) return "foreign";
|
|
5246
|
+
const local = o.local;
|
|
5247
|
+
if (sameHashes(local, o.next)) return "current";
|
|
5248
|
+
if (o.kept && sameHashes(local, o.kept.local) && sameHashes(o.next, o.kept.next)) return "kept";
|
|
5249
|
+
return o.bases.some((b) => sameHashes(local, b)) ? "update" : "modified";
|
|
5250
|
+
}
|
|
5251
|
+
var AS_STATE = {
|
|
5252
|
+
install: "installed",
|
|
5253
|
+
update: "updated",
|
|
5254
|
+
current: "current",
|
|
5255
|
+
kept: "kept",
|
|
5256
|
+
modified: "modified",
|
|
5257
|
+
foreign: "foreign"
|
|
5258
|
+
};
|
|
5259
|
+
var localHashes = (l) => l.kind === "absent" ? null : l.kind === "unreadable" ? "unreadable" : hashTree(l.tree);
|
|
5260
|
+
function message(state, id, target, detail) {
|
|
5261
|
+
switch (state) {
|
|
5262
|
+
case "installed":
|
|
5263
|
+
return `Wheelhouse skill installed at ${target}.`;
|
|
5264
|
+
case "updated":
|
|
5265
|
+
return `Wheelhouse skill updated at ${target}.`;
|
|
5266
|
+
case "current":
|
|
5267
|
+
return `Wheelhouse skill is current at ${target}.`;
|
|
5268
|
+
case "kept":
|
|
5269
|
+
return `Wheelhouse skill at ${target} keeps its local edits, as asked.`;
|
|
5270
|
+
case "modified":
|
|
5271
|
+
return `Left ${target} unchanged: it was locally edited${detail ? ` (${detail})` : ""}. \`wheelhouse skills diff ${id}\` compares it with this version; \`accept\` or \`keep\` settles it.`;
|
|
5272
|
+
case "foreign":
|
|
5273
|
+
return `Left ${target} unchanged: not managed by Wheelhouse${detail ? ` (${detail})` : ""}. \`wheelhouse skills adopt ${id}\` replaces it with the bundled version.`;
|
|
5274
|
+
case "refused":
|
|
5275
|
+
return `Left ${target} unchanged: ${detail ?? "it is inside Firstmate's checkout or home"}.`;
|
|
5276
|
+
case "off":
|
|
5277
|
+
return `${id} is turned off; \`wheelhouse skills sync ${id}\` turns it on again.`;
|
|
5278
|
+
case "error":
|
|
5279
|
+
return `Could not install Wheelhouse skill at ${target}: ${detail}`;
|
|
5280
|
+
}
|
|
5281
|
+
}
|
|
5282
|
+
function record3(m, id, kind, target, bundle, version2, files, now) {
|
|
5283
|
+
m.items[id] = { id, kind, target, bundle, version: version2, files, writtenAt: now.toISOString() };
|
|
5284
|
+
}
|
|
5285
|
+
async function syncSkill(ctx, dir, m, item, tree, dryRun) {
|
|
5286
|
+
const { id, target } = item;
|
|
5287
|
+
const result = (state, detail) => ({
|
|
5288
|
+
id,
|
|
5289
|
+
kind: "skill-dir",
|
|
5290
|
+
target,
|
|
5291
|
+
state,
|
|
5292
|
+
message: message(state, id, target, detail)
|
|
5293
|
+
});
|
|
5294
|
+
if (await insideAny([path23.dirname(target), target], [ctx.install.firstmateDir, ctx.install.homeDir]))
|
|
5295
|
+
return result("refused", "user skills location is inside Firstmate's checkout or home");
|
|
5296
|
+
const next = hashTree(tree);
|
|
5297
|
+
const rec = m.items[id];
|
|
5298
|
+
const verdict = (l) => decide({
|
|
5299
|
+
local: localHashes(l),
|
|
5300
|
+
next,
|
|
5301
|
+
bases: [rec?.files, l.kind === "files" ? l.receipt : null].filter((b) => !!b),
|
|
5302
|
+
kept: rec?.kept
|
|
5303
|
+
});
|
|
5304
|
+
const now = await readLocal(target);
|
|
5305
|
+
const first = verdict(now);
|
|
5306
|
+
const at = ctx.now?.() ?? /* @__PURE__ */ new Date();
|
|
5307
|
+
if (dryRun) {
|
|
5308
|
+
return result(AS_STATE[first], now.kind === "unreadable" ? now.reason : void 0);
|
|
5309
|
+
}
|
|
5310
|
+
if (first === "install" || first === "update") {
|
|
5311
|
+
const outcome = await swapIn(target, tree, receiptText(ctx.version, next), (l) => {
|
|
5312
|
+
const v = verdict(l);
|
|
5313
|
+
return v === "install" || v === "update" ? "replace" : v === "current" ? "done" : "stop";
|
|
5314
|
+
});
|
|
5315
|
+
if (outcome === "stop") return syncSkill(ctx, dir, m, item, tree, dryRun);
|
|
5316
|
+
record3(m, id, "skill-dir", target, item.skill.name, ctx.version, next, at);
|
|
5317
|
+
await saveBase(dir, id, tree);
|
|
5318
|
+
await saveProposed(dir, id, null);
|
|
5319
|
+
return result(
|
|
5320
|
+
outcome === "swapped" ? first === "install" ? "installed" : "updated" : "current"
|
|
5321
|
+
);
|
|
5322
|
+
}
|
|
5323
|
+
if (first === "current") {
|
|
5324
|
+
if (!rec || !sameHashes(rec.files, next) || rec.kept) {
|
|
5325
|
+
record3(m, id, "skill-dir", target, item.skill.name, ctx.version, next, at);
|
|
5326
|
+
await saveBase(dir, id, tree);
|
|
5327
|
+
}
|
|
5328
|
+
await saveProposed(dir, id, null);
|
|
5329
|
+
return result("current");
|
|
5330
|
+
}
|
|
5331
|
+
if (first === "modified") {
|
|
5332
|
+
if (!rec && now.kind === "files" && now.receipt)
|
|
5333
|
+
record3(m, id, "skill-dir", target, item.skill.name, "unknown", now.receipt, at);
|
|
5334
|
+
await saveProposed(dir, id, tree);
|
|
5335
|
+
return result("modified");
|
|
5336
|
+
}
|
|
5337
|
+
return result(first, now.kind === "unreadable" ? now.reason : void 0);
|
|
5338
|
+
}
|
|
5339
|
+
async function installOver(ctx, dir, m, item, tree) {
|
|
5340
|
+
const next = hashTree(tree);
|
|
5341
|
+
const outcome = await swapIn(
|
|
5342
|
+
item.target,
|
|
5343
|
+
tree,
|
|
5344
|
+
receiptText(ctx.version, next),
|
|
5345
|
+
(l) => l.kind === "unreadable" ? "stop" : "replace"
|
|
5346
|
+
);
|
|
5347
|
+
if (outcome === "stop")
|
|
5348
|
+
throw new Error(`${item.target} is a symbolic link or holds one; move it aside first`);
|
|
5349
|
+
record3(
|
|
5350
|
+
m,
|
|
5351
|
+
item.id,
|
|
5352
|
+
"skill-dir",
|
|
5353
|
+
item.target,
|
|
5354
|
+
item.skill.name,
|
|
5355
|
+
ctx.version,
|
|
5356
|
+
next,
|
|
5357
|
+
ctx.now?.() ?? /* @__PURE__ */ new Date()
|
|
5358
|
+
);
|
|
5359
|
+
await saveBase(dir, item.id, tree);
|
|
5360
|
+
await saveProposed(dir, item.id, null);
|
|
5361
|
+
}
|
|
5362
|
+
function gitHead(dir) {
|
|
5363
|
+
return new Promise(
|
|
5364
|
+
(resolve) => execFile2(
|
|
5365
|
+
"git",
|
|
5366
|
+
["-C", dir, "rev-parse", "HEAD"],
|
|
5367
|
+
{ timeout: 5e3 },
|
|
5368
|
+
(error, stdout) => resolve(error ? null : stdout.trim() || null)
|
|
5369
|
+
)
|
|
5370
|
+
);
|
|
5371
|
+
}
|
|
5372
|
+
async function checkAssumptions(firstmateDir) {
|
|
5373
|
+
const checks = [];
|
|
5374
|
+
const seen = /* @__PURE__ */ new Set();
|
|
5375
|
+
for (const a of SKILLS.flatMap((s) => s.assumptions)) {
|
|
5376
|
+
const key = `${a.file}\0${a.marker}`;
|
|
5377
|
+
if (seen.has(key)) continue;
|
|
5378
|
+
seen.add(key);
|
|
5379
|
+
let text2 = "";
|
|
5380
|
+
try {
|
|
5381
|
+
text2 = await readFile12(path23.join(firstmateDir, a.file), "utf8");
|
|
5382
|
+
} catch {
|
|
5383
|
+
}
|
|
5384
|
+
checks.push({ ...a, present: text2.includes(a.marker) });
|
|
5385
|
+
}
|
|
5386
|
+
return checks;
|
|
5387
|
+
}
|
|
5388
|
+
function summary(items, drift) {
|
|
5389
|
+
const notable = items.filter((i) => i.state !== "current" && i.state !== "off");
|
|
5390
|
+
const lines = (notable.length ? notable : items).map((i) => i.message);
|
|
5391
|
+
if (drift.length)
|
|
5392
|
+
lines.push(
|
|
5393
|
+
`Firstmate's checkout no longer has ${drift.map((d) => `\`${d.marker}\` in ${d.file}`).join(", ")}, which the bundled skills rely on; they may describe it wrongly until Wheelhouse is updated.`
|
|
5394
|
+
);
|
|
5395
|
+
const state = items.some((i) => i.state === "error") ? "error" : drift.length || items.some((i) => i.state === "modified" || i.state === "foreign" || i.state === "refused") ? "attention" : "ok";
|
|
5396
|
+
return { state, message: lines.join(" ") || "Wheelhouse installs nothing here.", items, drift };
|
|
5397
|
+
}
|
|
5398
|
+
var disabled = (message2) => ({
|
|
5399
|
+
state: "disabled",
|
|
5400
|
+
message: message2,
|
|
5401
|
+
items: [],
|
|
5402
|
+
drift: []
|
|
5403
|
+
});
|
|
5404
|
+
async function syncMaterial(ctx, inputs, opts = {}) {
|
|
5405
|
+
if (ctx.env.WHEELHOUSE_MANAGE_SKILL === "0")
|
|
5406
|
+
return disabled("Wheelhouse skill installation is disabled.");
|
|
5407
|
+
if (!ctx.skillsRoot)
|
|
5408
|
+
return disabled(
|
|
5409
|
+
"Wheelhouse skill is left as it is: only the packaged Wheelhouse server installs it."
|
|
5410
|
+
);
|
|
5411
|
+
const skillsRoot = ctx.skillsRoot;
|
|
5412
|
+
const dir = materialDir(ctx.configDir);
|
|
5413
|
+
const dryRun = opts.dryRun ?? false;
|
|
5414
|
+
return serialize(dir, async () => {
|
|
5415
|
+
const m = await readManifest(dir, dryRun) ?? emptyManifest(ctx.version, inputs.harness);
|
|
5416
|
+
const off = await readOff(dir);
|
|
5417
|
+
const items = [];
|
|
5418
|
+
const trees = /* @__PURE__ */ new Map();
|
|
5419
|
+
for (const item of plannedSkills(ctx.env, inputs.harness)) {
|
|
5420
|
+
if (opts.only && !opts.only.includes(item.id)) continue;
|
|
5421
|
+
if (off.has(item.id)) {
|
|
5422
|
+
items.push({
|
|
5423
|
+
id: item.id,
|
|
5424
|
+
kind: "skill-dir",
|
|
5425
|
+
target: item.target,
|
|
5426
|
+
state: "off",
|
|
5427
|
+
message: message("off", item.id, item.target)
|
|
5428
|
+
});
|
|
5429
|
+
continue;
|
|
5430
|
+
}
|
|
5431
|
+
let tree = trees.get(item.skill.name);
|
|
5432
|
+
if (!tree) {
|
|
5433
|
+
tree = await renderSkill(skillsRoot, item.skill, inputs).catch((e) => e);
|
|
5434
|
+
trees.set(item.skill.name, tree);
|
|
5435
|
+
}
|
|
5436
|
+
try {
|
|
5437
|
+
if (tree instanceof Error) throw tree;
|
|
5438
|
+
items.push(await syncSkill(ctx, dir, m, item, tree, dryRun));
|
|
5439
|
+
} catch (e) {
|
|
5440
|
+
items.push({
|
|
5441
|
+
id: item.id,
|
|
5442
|
+
kind: "skill-dir",
|
|
5443
|
+
target: item.target,
|
|
5444
|
+
state: "error",
|
|
5445
|
+
message: message("error", item.id, item.target, e.message)
|
|
5446
|
+
});
|
|
5447
|
+
}
|
|
5448
|
+
}
|
|
5449
|
+
const assumptions = await checkAssumptions(ctx.install.firstmateDir);
|
|
5450
|
+
const drift = assumptions.filter((a) => !a.present);
|
|
5451
|
+
if (!dryRun) {
|
|
5452
|
+
const now = (ctx.now?.() ?? /* @__PURE__ */ new Date()).toISOString();
|
|
5453
|
+
m.firstmate = {
|
|
5454
|
+
dir: ctx.install.firstmateDir,
|
|
5455
|
+
home: ctx.install.homeDir,
|
|
5456
|
+
commit: await (ctx.commit ?? gitHead)(ctx.install.firstmateDir),
|
|
5457
|
+
checkedAt: now,
|
|
5458
|
+
assumptions
|
|
5459
|
+
};
|
|
5460
|
+
m.render = { reviewSurface: inputs.reviewSurface, harness: inputs.harness };
|
|
5461
|
+
const changes = items.filter((i) => i.state === "installed" || i.state === "updated").map((i) => ({ id: i.id, state: i.state }));
|
|
5462
|
+
if (changes.length) m.history.push({ at: now, version: ctx.version, changes });
|
|
5463
|
+
m.wheelhouse = { version: ctx.version };
|
|
5464
|
+
try {
|
|
5465
|
+
await writeManifest(dir, m);
|
|
5466
|
+
} catch (e) {
|
|
5467
|
+
return {
|
|
5468
|
+
...summary(items, drift),
|
|
5469
|
+
state: "error",
|
|
5470
|
+
message: `Could not record Wheelhouse's agent material in ${dir}: ${e.message}`
|
|
5471
|
+
};
|
|
5472
|
+
}
|
|
5473
|
+
}
|
|
5474
|
+
return summary(items, drift);
|
|
5475
|
+
}).catch((e) => ({
|
|
5476
|
+
state: "error",
|
|
5477
|
+
message: `Could not sync Wheelhouse's agent material in ${dir}: ${e.message}`,
|
|
5478
|
+
items: [],
|
|
5479
|
+
drift: []
|
|
5480
|
+
}));
|
|
5481
|
+
}
|
|
5482
|
+
|
|
5483
|
+
// src/lib/server/material/ops.ts
|
|
5484
|
+
async function savedHarness2(configDir) {
|
|
5485
|
+
try {
|
|
5486
|
+
const raw = JSON.parse(await readFile13(path24.join(configDir, "harness.json"), "utf8"));
|
|
5487
|
+
return parseHarness(raw.harness);
|
|
5488
|
+
} catch {
|
|
5489
|
+
return "claude";
|
|
5490
|
+
}
|
|
5491
|
+
}
|
|
5492
|
+
async function skillsCli(o) {
|
|
5493
|
+
const dir = materialDir(o.configDir);
|
|
5494
|
+
let m;
|
|
5495
|
+
try {
|
|
5496
|
+
m = await readManifest(dir, true);
|
|
5497
|
+
} catch (e) {
|
|
5498
|
+
return { ok: false, error: `Could not read ${dir}/manifest.json: ${e.message}` };
|
|
5499
|
+
}
|
|
5500
|
+
const remembered = readRemembered(o.configDir);
|
|
5501
|
+
const install2 = m?.firstmate ? { firstmateDir: m.firstmate.dir, homeDir: m.firstmate.home } : remembered ? { firstmateDir: remembered.firstmate, homeDir: remembered.home ?? remembered.firstmate } : null;
|
|
5502
|
+
if (!install2)
|
|
5503
|
+
return {
|
|
5504
|
+
ok: false,
|
|
5505
|
+
error: "Wheelhouse is not connected to a Firstmate yet. Open Wheelhouse (`wheelhouse open`) first"
|
|
5506
|
+
};
|
|
5507
|
+
const inputs = m?.render ?? {
|
|
5508
|
+
reviewSurface: null,
|
|
5509
|
+
harness: await savedHarness2(o.configDir)
|
|
5510
|
+
};
|
|
5511
|
+
return {
|
|
5512
|
+
ok: true,
|
|
5513
|
+
value: {
|
|
5514
|
+
ctx: {
|
|
5515
|
+
install: install2,
|
|
5516
|
+
env: o.env,
|
|
5517
|
+
configDir: o.configDir,
|
|
5518
|
+
skillsRoot: o.skillsRoot,
|
|
5519
|
+
version: o.version
|
|
5520
|
+
},
|
|
5521
|
+
inputs,
|
|
5522
|
+
dir
|
|
5523
|
+
}
|
|
5524
|
+
};
|
|
5525
|
+
}
|
|
5526
|
+
async function status(c) {
|
|
5527
|
+
const result = await syncMaterial(c.ctx, c.inputs, { dryRun: true });
|
|
5528
|
+
const m = await readManifest(c.dir, true);
|
|
5529
|
+
return {
|
|
5530
|
+
schema: "wheelhouse-skills-status.v1",
|
|
5531
|
+
result,
|
|
5532
|
+
manifest: m ? { wheelhouse: m.wheelhouse, firstmate: m.firstmate, render: m.render } : null
|
|
5533
|
+
};
|
|
5534
|
+
}
|
|
5535
|
+
async function sync(c, ids) {
|
|
5536
|
+
const unknown = ids.filter((id) => !itemOf(c, id));
|
|
5537
|
+
if (unknown.length) return { ok: false, error: `No such item: ${unknown.join(", ")}` };
|
|
5538
|
+
if (ids.length) {
|
|
5539
|
+
await serialize(c.dir, async () => {
|
|
5540
|
+
const off = await readOff(c.dir);
|
|
5541
|
+
if (ids.some((id) => off.delete(id))) await writeOff(c.dir, off);
|
|
5542
|
+
});
|
|
5543
|
+
}
|
|
5544
|
+
return { ok: true, value: await syncMaterial(c.ctx, c.inputs, ids.length ? { only: ids } : {}) };
|
|
5545
|
+
}
|
|
5546
|
+
var itemOf = (c, id) => plannedSkills(c.ctx.env, c.inputs.harness).find((i) => i.id === id);
|
|
5547
|
+
var render = (c, item) => renderSkill(c.ctx.skillsRoot, item.skill, { reviewSurface: c.inputs.reviewSurface });
|
|
5548
|
+
async function stateOf(c, id) {
|
|
5549
|
+
const r = await syncMaterial(c.ctx, c.inputs, { dryRun: true, only: [id] });
|
|
5550
|
+
return r.items[0]?.state;
|
|
5551
|
+
}
|
|
5552
|
+
function diffDirs(a, b, labels) {
|
|
5553
|
+
return new Promise(
|
|
5554
|
+
(resolve, reject) => execFile3(
|
|
5555
|
+
"diff",
|
|
5556
|
+
["-ruN", "--label", labels[0], "--label", labels[1], a, b],
|
|
5557
|
+
{ maxBuffer: 16 * 1024 * 1024 },
|
|
5558
|
+
(error, stdout) => {
|
|
5559
|
+
if (error && error.code !== 1) reject(error);
|
|
5560
|
+
else resolve(stdout);
|
|
5561
|
+
}
|
|
5562
|
+
)
|
|
5563
|
+
);
|
|
5564
|
+
}
|
|
5565
|
+
async function diff(c, id) {
|
|
5566
|
+
const item = itemOf(c, id);
|
|
5567
|
+
if (!item) return { ok: false, error: `No such item: ${id}` };
|
|
5568
|
+
const local = await readLocal(item.target);
|
|
5569
|
+
if (local.kind === "unreadable")
|
|
5570
|
+
return { ok: false, error: `Cannot read ${item.target}: ${local.reason}` };
|
|
5571
|
+
const next = await render(c, item);
|
|
5572
|
+
const base = await readBase(c.dir, id);
|
|
5573
|
+
const scratch = await mkdtemp3(path24.join(tmpdir(), "wheelhouse-skills-diff-"));
|
|
5574
|
+
try {
|
|
5575
|
+
const put = async (name, tree) => {
|
|
5576
|
+
const d = path24.join(scratch, name);
|
|
5577
|
+
await replaceTree(d, tree);
|
|
5578
|
+
return d;
|
|
5579
|
+
};
|
|
5580
|
+
const localDir = await put("local", local.kind === "files" ? local.tree : {});
|
|
5581
|
+
const nextDir = await put("next", next);
|
|
5582
|
+
const parts = [];
|
|
5583
|
+
if (base) {
|
|
5584
|
+
const baseDir2 = await put("base", base);
|
|
5585
|
+
parts.push(
|
|
5586
|
+
`# Edits since Wheelhouse wrote ${item.target}
|
|
5587
|
+
`,
|
|
5588
|
+
await diffDirs(baseDir2, localDir, ["wheelhouse-wrote", "now"]) || "(none)\n",
|
|
5589
|
+
`
|
|
5590
|
+
# What this version of Wheelhouse changes
|
|
5591
|
+
`,
|
|
5592
|
+
await diffDirs(baseDir2, nextDir, ["wheelhouse-wrote", "this-version"]) || "(none)\n"
|
|
5593
|
+
);
|
|
5594
|
+
} else {
|
|
5595
|
+
parts.push(
|
|
5596
|
+
`# ${item.target} compared with this version (Wheelhouse has no record of what it wrote there)
|
|
5597
|
+
`,
|
|
5598
|
+
await diffDirs(localDir, nextDir, ["now", "this-version"]) || "(no differences)\n"
|
|
5599
|
+
);
|
|
5600
|
+
}
|
|
5601
|
+
return { ok: true, value: parts.join("") };
|
|
5602
|
+
} finally {
|
|
5603
|
+
await rm9(scratch, { recursive: true, force: true });
|
|
5604
|
+
}
|
|
5605
|
+
}
|
|
5606
|
+
async function replace(c, id, expect) {
|
|
5607
|
+
const item = itemOf(c, id);
|
|
5608
|
+
if (!item) return { ok: false, error: `No such item: ${id}` };
|
|
5609
|
+
const state = await stateOf(c, id);
|
|
5610
|
+
if (state !== expect)
|
|
5611
|
+
return {
|
|
5612
|
+
ok: false,
|
|
5613
|
+
error: `${id} is ${state ?? "not planned"}, not ${expect === "foreign" ? "foreign (not managed by Wheelhouse)" : "locally edited"}`
|
|
5614
|
+
};
|
|
5615
|
+
const tree = await render(c, item);
|
|
5616
|
+
return serialize(c.dir, async () => {
|
|
5617
|
+
const local = await readLocal(item.target);
|
|
5618
|
+
if (local.kind === "unreadable")
|
|
5619
|
+
return {
|
|
5620
|
+
ok: false,
|
|
5621
|
+
error: `${item.target} is a symbolic link or holds one; move it aside first`
|
|
5622
|
+
};
|
|
5623
|
+
const m = await readManifest(c.dir) ?? emptyManifest(c.ctx.version, c.inputs.harness);
|
|
5624
|
+
const backup = backupDir(c.dir, id, c.ctx.now?.() ?? /* @__PURE__ */ new Date());
|
|
5625
|
+
if (local.kind === "files") await replaceTree(backup, local.tree);
|
|
5626
|
+
await installOver(c.ctx, c.dir, m, item, tree);
|
|
5627
|
+
await writeManifest(c.dir, m);
|
|
5628
|
+
return {
|
|
5629
|
+
ok: true,
|
|
5630
|
+
value: `Installed this version at ${item.target}${local.kind === "files" ? `; the copy that was there is in ${backup}` : ""}.`
|
|
5631
|
+
};
|
|
5632
|
+
});
|
|
5633
|
+
}
|
|
5634
|
+
async function keep(c, id) {
|
|
5635
|
+
const item = itemOf(c, id);
|
|
5636
|
+
if (!item) return { ok: false, error: `No such item: ${id}` };
|
|
5637
|
+
const state = await stateOf(c, id);
|
|
5638
|
+
if (state !== "modified") return { ok: false, error: `${id} is ${state}, not locally edited` };
|
|
5639
|
+
const next = hashTree(await render(c, item));
|
|
5640
|
+
return serialize(c.dir, async () => {
|
|
5641
|
+
const local = await readLocal(item.target);
|
|
5642
|
+
if (local.kind !== "files") return { ok: false, error: `${item.target} changed meanwhile` };
|
|
5643
|
+
const m = await readManifest(c.dir) ?? emptyManifest(c.ctx.version, c.inputs.harness);
|
|
5644
|
+
const rec = m.items[id] ?? {
|
|
5645
|
+
id,
|
|
5646
|
+
kind: "skill-dir",
|
|
5647
|
+
target: item.target,
|
|
5648
|
+
bundle: item.skill.name,
|
|
5649
|
+
version: "unknown",
|
|
5650
|
+
files: local.receipt ?? {},
|
|
5651
|
+
writtenAt: (c.ctx.now?.() ?? /* @__PURE__ */ new Date()).toISOString()
|
|
5652
|
+
};
|
|
5653
|
+
m.items[id] = { ...rec, kept: { local: hashTree(local.tree), next } };
|
|
5654
|
+
await writeManifest(c.dir, m);
|
|
5655
|
+
return {
|
|
5656
|
+
ok: true,
|
|
5657
|
+
value: `Keeping ${item.target} as it is; Wheelhouse flags it again when a later version changes the skill.`
|
|
5658
|
+
};
|
|
5659
|
+
});
|
|
5660
|
+
}
|
|
5661
|
+
async function uninstall(c, ids) {
|
|
5662
|
+
return serialize(c.dir, async () => {
|
|
5663
|
+
const m = await readManifest(c.dir);
|
|
5664
|
+
const planned = plannedSkills(c.ctx.env, c.inputs.harness);
|
|
5665
|
+
const known = new Map([
|
|
5666
|
+
...planned.map((p) => [p.id, p.target]),
|
|
5667
|
+
...Object.values(m?.items ?? {}).map((r) => [r.id, r.target])
|
|
5668
|
+
]);
|
|
5669
|
+
const unknown = ids.filter((id) => !known.has(id));
|
|
5670
|
+
if (unknown.length) return { ok: false, error: `No such item: ${unknown.join(", ")}` };
|
|
5671
|
+
const off = await readOff(c.dir);
|
|
5672
|
+
const lines = [];
|
|
5673
|
+
for (const [id, target] of known) {
|
|
5674
|
+
if (ids.length && !ids.includes(id)) continue;
|
|
5675
|
+
const local = await readLocal(target);
|
|
5676
|
+
const rec = m?.items[id];
|
|
5677
|
+
const bases = [rec?.files, local.kind === "files" ? local.receipt : null].filter((b) => !!b);
|
|
5678
|
+
const ours = local.kind === "absent" || local.kind === "files" && bases.some((b) => sameHashes(hashTree(local.tree), b));
|
|
5679
|
+
if (!ours) {
|
|
5680
|
+
lines.push(
|
|
5681
|
+
`Left ${target}: ${local.kind === "files" ? "it was locally edited" : "it is not a folder Wheelhouse wrote"}. Remove it yourself if you no longer want it.`
|
|
5682
|
+
);
|
|
5683
|
+
continue;
|
|
5684
|
+
}
|
|
5685
|
+
if (local.kind === "files") await rm9(target, { recursive: true, force: true });
|
|
5686
|
+
await forgetItem(c.dir, id);
|
|
5687
|
+
if (m) delete m.items[id];
|
|
5688
|
+
off.add(id);
|
|
5689
|
+
lines.push(
|
|
5690
|
+
`Removed ${target}; Wheelhouse will not install ${id} again until \`wheelhouse skills sync ${id}\`.`
|
|
5691
|
+
);
|
|
5692
|
+
}
|
|
5693
|
+
if (m) await writeManifest(c.dir, m);
|
|
5694
|
+
await writeOff(c.dir, off);
|
|
5695
|
+
return { ok: true, value: lines };
|
|
5696
|
+
});
|
|
5697
|
+
}
|
|
5698
|
+
|
|
5699
|
+
// cli/skills.ts
|
|
5700
|
+
var bundledSkills = () => path25.resolve(path25.dirname(fileURLToPath(import.meta.url)), "..", "skills");
|
|
5701
|
+
var PENDING = { installed: "missing", updated: "outdated" };
|
|
5702
|
+
function printResult(r, log, pending = false) {
|
|
5703
|
+
for (const i of r.items)
|
|
5704
|
+
log(`${(pending && PENDING[i.state] || i.state).padEnd(9)} ${i.id} ${i.target}`);
|
|
5705
|
+
for (const d of r.drift) log(`drift Firstmate no longer has \`${d.marker}\` in ${d.file}`);
|
|
5706
|
+
if (r.state === "disabled") log(r.message);
|
|
5707
|
+
}
|
|
5708
|
+
function skillsCommand(over = {}) {
|
|
5709
|
+
const deps = {
|
|
5710
|
+
env: process.env,
|
|
5711
|
+
skillsRoot: bundledSkills(),
|
|
5712
|
+
confirm: askTerminal,
|
|
5713
|
+
log: (line) => console.log(line),
|
|
5714
|
+
error: (line) => console.error(line),
|
|
5715
|
+
...over
|
|
5716
|
+
};
|
|
5717
|
+
const cmd = new Command4("skills").description(
|
|
5718
|
+
"The agent skills Wheelhouse installs for Firstmate and its crew: what is installed, what changed, and settling local edits."
|
|
5719
|
+
).option(
|
|
5720
|
+
"--config-dir <dir>",
|
|
5721
|
+
"the Wheelhouse config whose agent-material/ keeps the record (default: $WHEELHOUSE_CONFIG_DIR, else $XDG_CONFIG_HOME/wheelhouse, else ~/.config/wheelhouse)"
|
|
5722
|
+
);
|
|
5723
|
+
const fail = (error) => {
|
|
5724
|
+
deps.error(`wheelhouse: ${error}.`);
|
|
5725
|
+
process.exitCode = 1;
|
|
5726
|
+
};
|
|
5727
|
+
const run = async (c, work) => {
|
|
5728
|
+
const g2 = c.optsWithGlobals();
|
|
5729
|
+
const s = await skillsCli({
|
|
5730
|
+
env: deps.env,
|
|
5731
|
+
configDir: g2.configDir ? path25.resolve(g2.configDir) : defaultConfigDir(deps.env),
|
|
5732
|
+
skillsRoot: deps.skillsRoot,
|
|
5733
|
+
version
|
|
5734
|
+
});
|
|
5735
|
+
if (!s.ok) return fail(s.error);
|
|
5736
|
+
await work(s.value);
|
|
5737
|
+
};
|
|
5738
|
+
const report = (o) => {
|
|
5739
|
+
if (!o.ok) return fail(o.error);
|
|
5740
|
+
for (const line of [].concat(o.value)) deps.log(line);
|
|
5741
|
+
};
|
|
5742
|
+
const confirmed = async (yes, question2) => yes || await deps.confirm(question2);
|
|
5743
|
+
cmd.command("status").description(
|
|
5744
|
+
"Show each item and its state (missing and outdated ones are what `sync` would install or update), and any Firstmate drift."
|
|
5745
|
+
).option("--json", "print the full status as JSON (wheelhouse-skills-status.v1)").action(
|
|
5746
|
+
(o, c) => run(c, async (s) => {
|
|
5747
|
+
const v = await status(s);
|
|
5748
|
+
if (o.json) return deps.log(JSON.stringify(v, null, 2));
|
|
5749
|
+
printResult(v.result, deps.log, true);
|
|
5750
|
+
if (v.result.state === "attention" || v.result.state === "error") {
|
|
5751
|
+
deps.log("");
|
|
5752
|
+
deps.log(v.result.message);
|
|
5753
|
+
}
|
|
5754
|
+
})
|
|
5755
|
+
);
|
|
5756
|
+
cmd.command("sync [ids...]").description(
|
|
5757
|
+
"Install missing items and update unchanged ones to this version; naming items turns them on again."
|
|
5758
|
+
).action(
|
|
5759
|
+
(ids, _o, c) => run(c, async (s) => {
|
|
5760
|
+
const o = await sync(s, ids);
|
|
5761
|
+
if (!o.ok) return fail(o.error);
|
|
5762
|
+
printResult(o.value, deps.log);
|
|
5763
|
+
if (o.value.state === "error") fail(o.value.message.replace(/\.$/, ""));
|
|
5764
|
+
})
|
|
5765
|
+
);
|
|
5766
|
+
cmd.command("diff <id>").description("Compare an item with what Wheelhouse wrote there and with this version.").action(
|
|
5767
|
+
(id, _o, c) => run(c, async (s) => report(await diff(s, id)))
|
|
5768
|
+
);
|
|
5769
|
+
cmd.command("accept <id>").description("Replace a locally edited item with this version (the edited copy is backed up).").option("-y, --yes", "replace without asking").action(
|
|
5770
|
+
(id, o, c) => run(c, async (s) => {
|
|
5771
|
+
if (!await confirmed(o.yes, `Replace your edited ${id} with this version?`)) return;
|
|
5772
|
+
report(await replace(s, id, "modified"));
|
|
5773
|
+
})
|
|
5774
|
+
);
|
|
5775
|
+
cmd.command("keep <id>").description("Keep a locally edited item as it is until a later version changes it again.").action(
|
|
5776
|
+
(id, _o, c) => run(c, async (s) => report(await keep(s, id)))
|
|
5777
|
+
);
|
|
5778
|
+
cmd.command("adopt <id>").description(
|
|
5779
|
+
"Replace a copy Wheelhouse did not install with the bundled version, and manage it from now on (the copy is backed up)."
|
|
5780
|
+
).option("-y, --yes", "replace without asking").action(
|
|
5781
|
+
(id, o, c) => run(c, async (s) => {
|
|
5782
|
+
if (!await confirmed(o.yes, `Replace the existing ${id} with Wheelhouse's version?`))
|
|
5783
|
+
return;
|
|
5784
|
+
report(await replace(s, id, "foreign"));
|
|
5785
|
+
})
|
|
5786
|
+
);
|
|
5787
|
+
cmd.command("uninstall [ids...]").description(
|
|
5788
|
+
"Remove items Wheelhouse installed (all of them, or those named) and stop installing them; edited copies are left."
|
|
5789
|
+
).option("-y, --yes", "remove without asking").action(
|
|
5790
|
+
(ids, o, c) => run(c, async (s) => {
|
|
5791
|
+
const what = ids.length ? ids.join(", ") : "every skill Wheelhouse installed";
|
|
5792
|
+
if (!await confirmed(o.yes, `Remove ${what}?`)) return;
|
|
5793
|
+
report(await uninstall(s, ids));
|
|
5794
|
+
})
|
|
5795
|
+
);
|
|
5796
|
+
return cmd;
|
|
5797
|
+
}
|
|
5798
|
+
|
|
4945
5799
|
// cli/supervise.ts
|
|
4946
5800
|
var MAX_RESTARTS = 5;
|
|
4947
5801
|
var RESTART_WINDOW_MS = 6e4;
|
|
@@ -5025,18 +5879,18 @@ function supervise(opts) {
|
|
|
5025
5879
|
|
|
5026
5880
|
// cli/upgrade.ts
|
|
5027
5881
|
import { spawn as spawn3 } from "node:child_process";
|
|
5028
|
-
import
|
|
5029
|
-
import { fileURLToPath } from "node:url";
|
|
5030
|
-
import { Command as
|
|
5882
|
+
import path27 from "node:path";
|
|
5883
|
+
import { fileURLToPath as fileURLToPath2 } from "node:url";
|
|
5884
|
+
import { Command as Command5 } from "commander";
|
|
5031
5885
|
|
|
5032
5886
|
// src/lib/server/upgrade/clone.ts
|
|
5033
|
-
import { execFile as
|
|
5034
|
-
import { mkdir as
|
|
5035
|
-
import
|
|
5887
|
+
import { execFile as execFile4 } from "node:child_process";
|
|
5888
|
+
import { mkdir as mkdir9, readdir as readdir3, readFile as readFile14, realpath as realpath5 } from "node:fs/promises";
|
|
5889
|
+
import path26 from "node:path";
|
|
5036
5890
|
var COMMITS_SHOWN = 20;
|
|
5037
5891
|
var OUTPUT_KEPT = 6e4;
|
|
5038
5892
|
var runCommand = (cmd, args, cwd) => new Promise((resolve) => {
|
|
5039
|
-
|
|
5893
|
+
execFile4(cmd, args, { cwd, maxBuffer: 64 * 1024 * 1024 }, (err, stdout, stderr) => {
|
|
5040
5894
|
const output = `${String(stdout)}${String(stderr)}`;
|
|
5041
5895
|
resolve({
|
|
5042
5896
|
code: err ? typeof err.code === "number" ? err.code : 1 : 0,
|
|
@@ -5078,11 +5932,11 @@ async function checkClone(deps) {
|
|
|
5078
5932
|
changes: []
|
|
5079
5933
|
};
|
|
5080
5934
|
out.current.version = packageVersion(
|
|
5081
|
-
await
|
|
5935
|
+
await readFile14(path26.join(deps.dir, "package.json"), "utf8").catch(() => null)
|
|
5082
5936
|
);
|
|
5083
5937
|
const top = await g2("rev-parse", "--show-toplevel");
|
|
5084
|
-
const here = await
|
|
5085
|
-
if (top.code !== 0 || await
|
|
5938
|
+
const here = await realpath5(deps.dir).catch(() => deps.dir);
|
|
5939
|
+
if (top.code !== 0 || await realpath5(top.stdout.trim()).catch(() => "") !== here) {
|
|
5086
5940
|
out.reason = `${deps.dir} is not a git clone, so Wheelhouse cannot upgrade it; update it the way it was installed (for npm, \`npm install -g @chrisjowen/wheelhouse\`)`;
|
|
5087
5941
|
return out;
|
|
5088
5942
|
}
|
|
@@ -5127,8 +5981,8 @@ async function checkClone(deps) {
|
|
|
5127
5981
|
return { sha, subject, date };
|
|
5128
5982
|
});
|
|
5129
5983
|
const on = await g2("symbolic-ref", "--quiet", "--short", "HEAD");
|
|
5130
|
-
const
|
|
5131
|
-
const changes =
|
|
5984
|
+
const status2 = await g2("status", "--porcelain", "--untracked-files=no");
|
|
5985
|
+
const changes = status2.stdout.split("\n").filter((l) => l.trim());
|
|
5132
5986
|
out.state = "refused";
|
|
5133
5987
|
if (on.code !== 0) {
|
|
5134
5988
|
out.reason = `${deps.dir} is not on a branch (detached HEAD), so it cannot fast-forward to ${branch}`;
|
|
@@ -5204,7 +6058,7 @@ var CLONE_SETUP_STEPS = [
|
|
|
5204
6058
|
|
|
5205
6059
|
// cli/upgrade.ts
|
|
5206
6060
|
function installDir() {
|
|
5207
|
-
return
|
|
6061
|
+
return path27.resolve(path27.dirname(fileURLToPath2(import.meta.url)), "..");
|
|
5208
6062
|
}
|
|
5209
6063
|
var runInherit = (cmd, args, cwd) => new Promise((resolve) => {
|
|
5210
6064
|
const child = spawn3(cmd, args, { cwd, stdio: "inherit" });
|
|
@@ -5271,13 +6125,13 @@ async function upgrade(deps, o = {}) {
|
|
|
5271
6125
|
}
|
|
5272
6126
|
function upgradeCommand(over = {}) {
|
|
5273
6127
|
const env = over.env ?? process.env;
|
|
5274
|
-
return new
|
|
6128
|
+
return new Command5("upgrade").description(
|
|
5275
6129
|
"Fast-forward this Wheelhouse clone to the newest commit on GitHub, rebuild it and restart Wheelhouse."
|
|
5276
6130
|
).option("--check", "only say whether there is a newer version").option("-y, --yes", "upgrade (and restart, even mid-work) without asking").option(
|
|
5277
6131
|
"--plugins-dir <dir>",
|
|
5278
6132
|
"the plugins directory the running Wheelhouse loads from, to find it (default: $WHEELHOUSE_PLUGINS_DIR, else ~/.wheelhouse/plugins)"
|
|
5279
6133
|
).action(async (o) => {
|
|
5280
|
-
const pluginsDir = o.pluginsDir ?
|
|
6134
|
+
const pluginsDir = o.pluginsDir ? path27.resolve(o.pluginsDir) : defaultPluginsDir(env);
|
|
5281
6135
|
const ok = await upgrade(
|
|
5282
6136
|
{
|
|
5283
6137
|
dir: installDir(),
|
|
@@ -5304,8 +6158,8 @@ function parsePort3(value) {
|
|
|
5304
6158
|
return n;
|
|
5305
6159
|
}
|
|
5306
6160
|
function handlerPath() {
|
|
5307
|
-
const here =
|
|
5308
|
-
return
|
|
6161
|
+
const here = path28.dirname(fileURLToPath3(import.meta.url));
|
|
6162
|
+
return path28.resolve(here, "..", "build", "handler.js");
|
|
5309
6163
|
}
|
|
5310
6164
|
function openBrowser(url) {
|
|
5311
6165
|
const [cmd, args] = process.platform === "darwin" ? ["open", [url]] : process.platform === "win32" ? ["cmd", ["/c", "start", '""', url]] : ["xdg-open", [url]];
|
|
@@ -5318,8 +6172,8 @@ function openBrowser(url) {
|
|
|
5318
6172
|
}
|
|
5319
6173
|
}
|
|
5320
6174
|
async function open2(opts) {
|
|
5321
|
-
const configDir = opts.configDir ?
|
|
5322
|
-
const stateDir = opts.stateDir ?
|
|
6175
|
+
const configDir = opts.configDir ? path28.resolve(opts.configDir) : defaultConfigDir(process.env);
|
|
6176
|
+
const stateDir = opts.stateDir ? path28.resolve(opts.stateDir) : defaultStateDir(process.env);
|
|
5323
6177
|
const resolved = resolveInstall({
|
|
5324
6178
|
firstmate: opts.firstmate,
|
|
5325
6179
|
home: opts.home,
|
|
@@ -5408,12 +6262,12 @@ async function open2(opts) {
|
|
|
5408
6262
|
}
|
|
5409
6263
|
process.env.WHEELHOUSE_STATE_DIR = stateDir;
|
|
5410
6264
|
process.env.WHEELHOUSE_CONFIG_DIR = configDir;
|
|
5411
|
-
if (opts.pluginsDir) process.env.WHEELHOUSE_PLUGINS_DIR =
|
|
5412
|
-
process.env.WHEELHOUSE_BUNDLED_PLUGINS_DIR =
|
|
5413
|
-
process.env.WHEELHOUSE_INSTALL_DIR =
|
|
6265
|
+
if (opts.pluginsDir) process.env.WHEELHOUSE_PLUGINS_DIR = path28.resolve(opts.pluginsDir);
|
|
6266
|
+
process.env.WHEELHOUSE_BUNDLED_PLUGINS_DIR = path28.resolve(path28.dirname(file), "..", "plugins");
|
|
6267
|
+
process.env.WHEELHOUSE_INSTALL_DIR = path28.resolve(path28.dirname(file), "..");
|
|
5414
6268
|
if (opts.tmuxSocket) process.env.WHEELHOUSE_TMUX_SOCKET = opts.tmuxSocket;
|
|
5415
6269
|
process.env.WHEELHOUSE_SKIP_PERMISSIONS = opts.skipPermissions ? "1" : "0";
|
|
5416
|
-
let cli =
|
|
6270
|
+
let cli = fileURLToPath3(import.meta.url);
|
|
5417
6271
|
let serverPort = opts.port;
|
|
5418
6272
|
const cloud = new CloudService({
|
|
5419
6273
|
settings: new CloudSettings(cloudDir(configDir), cloudKeychain()),
|
|
@@ -5427,9 +6281,9 @@ async function open2(opts) {
|
|
|
5427
6281
|
start: (port, restart) => {
|
|
5428
6282
|
const next = takeHandoff(configDir);
|
|
5429
6283
|
if (next && restart) {
|
|
5430
|
-
cli =
|
|
6284
|
+
cli = path28.join(next, "dist", "cli.js");
|
|
5431
6285
|
process.env.WHEELHOUSE_INSTALL_DIR = next;
|
|
5432
|
-
process.env.WHEELHOUSE_BUNDLED_PLUGINS_DIR =
|
|
6286
|
+
process.env.WHEELHOUSE_BUNDLED_PLUGINS_DIR = path28.join(next, "plugins");
|
|
5433
6287
|
console.log(`Wheelhouse now runs from ${next}.`);
|
|
5434
6288
|
}
|
|
5435
6289
|
return fork(cli, ["__server", "--port", String(port)], {
|
|
@@ -5454,7 +6308,7 @@ async function open2(opts) {
|
|
|
5454
6308
|
process.exit(code);
|
|
5455
6309
|
}
|
|
5456
6310
|
async function serve(opts) {
|
|
5457
|
-
process.env.WHEELHOUSE_INSTALL_DIR =
|
|
6311
|
+
process.env.WHEELHOUSE_INSTALL_DIR = path28.resolve(path28.dirname(handlerPath()), "..");
|
|
5458
6312
|
process.env.WHEELHOUSE_URL = `http://${HOST}:${opts.port}`;
|
|
5459
6313
|
process.env.BODY_SIZE_LIMIT ??= String(UPLOAD_MAX_BYTES + 64 * 1024);
|
|
5460
6314
|
const { handler } = await import(pathToFileURL(handlerPath()).href);
|
|
@@ -5519,7 +6373,7 @@ async function serve(opts) {
|
|
|
5519
6373
|
process.on("disconnect", () => close(0));
|
|
5520
6374
|
}
|
|
5521
6375
|
function program() {
|
|
5522
|
-
const cli = new
|
|
6376
|
+
const cli = new Command6("wheelhouse").description("A local companion to Firstmate: watch the crew at work from a web UI.").version(version);
|
|
5523
6377
|
cli.command("open", { isDefault: true }).description(
|
|
5524
6378
|
"Start Wheelhouse, start (or show) the Firstmate session, and open it in the browser; with no Firstmate yet, open the setup wizard."
|
|
5525
6379
|
).option(
|
|
@@ -5583,6 +6437,7 @@ function program() {
|
|
|
5583
6437
|
cli.addCommand(upgradeCommand());
|
|
5584
6438
|
cli.addCommand(gatewayCommand());
|
|
5585
6439
|
cli.addCommand(remoteCommand());
|
|
6440
|
+
cli.addCommand(skillsCommand());
|
|
5586
6441
|
return cli;
|
|
5587
6442
|
}
|
|
5588
6443
|
await program().parseAsync(process.argv);
|