@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
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { readFile, readdir, stat, open, realpath, mkdir, writeFile, rename, rm, access, constants, lstat, chmod, appendFile, mkdtemp } from 'node:fs/promises';
|
|
2
2
|
import os, { homedir, tmpdir } from 'node:os';
|
|
3
3
|
import path from 'node:path';
|
|
4
|
-
import { v as version, d as defaultKeychain } from './keychain.js-
|
|
4
|
+
import { v as version, d as defaultKeychain } from './keychain.js-Cp8llbD0.js';
|
|
5
5
|
import { readFileSync, existsSync, mkdirSync, writeFileSync, renameSync, openSync, closeSync, watch, statSync, fstatSync, readSync, accessSync, constants as constants$1, realpathSync, lstatSync, rmSync } from 'node:fs';
|
|
6
|
-
import { spawn, execFileSync } from 'node:child_process';
|
|
6
|
+
import { spawn, execFileSync, execFile } from 'node:child_process';
|
|
7
7
|
import { l as loopbackPreview, f as frameRefusal } from './preview.js-CbgkVvT_.js';
|
|
8
8
|
import { p as previewNoteOf, a as pageOf } from './previewnote.js-DB6VK2fp.js';
|
|
9
9
|
import { p as plainStatus, c as clean } from './plain.js-Dc97sYaJ.js';
|
|
@@ -15,6 +15,8 @@ import { s as shortTitle } from './format.js-D3lWEg6U.js';
|
|
|
15
15
|
import { r as runStep, c as checksLine } from './checks.js-DGdGhp1G.js';
|
|
16
16
|
import net, { createServer } from 'node:net';
|
|
17
17
|
import { D as DECIDED_MAX, d as detectHosted, p as portInHost, h as hostedAddress } from './decisionform.js-Ds5LU9Wh.js';
|
|
18
|
+
import { p as parseHarness, H as HARNESS_NAMES } from './harness.js-DPojOlFJ.js';
|
|
19
|
+
import { d as defaultConfigDir, P as PluginConfigFile, a as PLUGINS_FILE, R as ROLES, b as SLOT_SCOPE, i as isEnabled, E as EMPTY_CONFIG, S as SLOTS, C as CAPABILITIES, c as chooseRole, e as changePlugin } from './config.js-CjvhJWDv.js';
|
|
18
20
|
import { timingSafeEqual, randomBytes, randomUUID, createHash, createHmac } from 'node:crypto';
|
|
19
21
|
import { T as TERMINAL_PATH, a as TERMINAL_PROTOCOL, b as TERMINAL_CLOSE, S as SETUP_TERMINAL_PATH, c as TOKEN_PROTOCOL_PREFIX } from './terminal.js-BUurgI6D.js';
|
|
20
22
|
import WebSocket, { WebSocketServer } from 'ws';
|
|
@@ -22,7 +24,6 @@ import { r as roundId, t as testLine } from './buildlog.js-BCKtSKOt.js';
|
|
|
22
24
|
import { a as alertsFor, r as raise, s as sessionAlert, d as digest, A as ALERT_KINDS } from './bell.js-DuW71LLn.js';
|
|
23
25
|
import { C as CHOICES, N as NOTE_MAX, b as closable, p as picksLine, d as closeText, e as answerText, D as DECIDED_LABEL, f as choiceLabel, g as awaitsAnswer, o as optionsFor, h as holdCardId, q as questionLine, a as answerOf } from './inbox.js-CnikIOgr.js';
|
|
24
26
|
import { D as DOC_EXT$1 } from './docpath.js-D27w_pf9.js';
|
|
25
|
-
import { d as defaultConfigDir, P as PluginConfigFile, a as PLUGINS_FILE, R as ROLES, b as SLOT_SCOPE, i as isEnabled, E as EMPTY_CONFIG, S as SLOTS, C as CAPABILITIES, c as chooseRole, e as changePlugin } from './config.js-CjvhJWDv.js';
|
|
26
27
|
import { d as defaultPluginsDir, r as readInstalled, S as SUPPORTED_API_VERSIONS, s as settingViews, m as manifestPath, p as parseManifest, f as fromExport } from './settings2.js-8JjZvg3U.js';
|
|
27
28
|
import { pathToFileURL } from 'node:url';
|
|
28
29
|
import { l as localhostName, m as matchHost, a as loopbackAddresses, v as validHostTemplate } from './addresses.js-DmMJzvLK.js';
|
|
@@ -31,7 +32,6 @@ import { p as projectTabHref, a as parseSlotKey } from './keys.js-iHygUPeb.js';
|
|
|
31
32
|
import { v as validPullRequestQuery } from './pullrequests.js-CCzk2sqm.js';
|
|
32
33
|
import { createServer as createServer$1 } from 'node:http';
|
|
33
34
|
import { n as needsYou } from './harbour.js-D3N7u1_p.js';
|
|
34
|
-
import { p as parseHarness, H as HARNESS_NAMES } from './harness.js-DPojOlFJ.js';
|
|
35
35
|
import { R as ROLE_WORDS } from './words.js-DDFrKS99.js';
|
|
36
36
|
import './urls.js-CM6aklCF.js';
|
|
37
37
|
import './previewhelper.js-D_I_aa96.js';
|
|
@@ -3500,24 +3500,24 @@ function deriveLiveTask(task2, ctx, fmRoot) {
|
|
|
3500
3500
|
shots: signals?.shots ?? []
|
|
3501
3501
|
};
|
|
3502
3502
|
}
|
|
3503
|
-
function deriveBacklogTask(
|
|
3504
|
-
const ledger = ctx.ledger.get(
|
|
3505
|
-
const track = trackOf(
|
|
3506
|
-
const prUrl =
|
|
3503
|
+
function deriveBacklogTask(record2, ctx, orphan) {
|
|
3504
|
+
const ledger = ctx.ledger.get(record2.id) ?? null;
|
|
3505
|
+
const track = trackOf(record2.kind ?? ledger?.dispatched?.kind ?? null);
|
|
3506
|
+
const prUrl = record2.prUrl ?? ledger?.merged?.pr ?? ledger?.prReady?.pr ?? null;
|
|
3507
3507
|
let status2;
|
|
3508
3508
|
let summary2 = null;
|
|
3509
3509
|
let attention = null;
|
|
3510
|
-
if (
|
|
3510
|
+
if (record2.state === "done" || track === "ship" && ledger?.merged) {
|
|
3511
3511
|
status2 = "landed";
|
|
3512
|
-
const verb =
|
|
3513
|
-
const when = ledger?.merged ? ageText(Math.max(0, ctx.nowSeconds - ledger.merged.ts)) :
|
|
3512
|
+
const verb = record2.completion.verb || (record2.state === "done" ? "done" : "merged");
|
|
3513
|
+
const when = ledger?.merged ? ageText(Math.max(0, ctx.nowSeconds - ledger.merged.ts)) : record2.completion.date ? `on ${record2.completion.date}` : null;
|
|
3514
3514
|
summary2 = when ? `${verb[0].toUpperCase()}${verb.slice(1)} ${when}.` : null;
|
|
3515
|
-
} else if (
|
|
3515
|
+
} else if (record2.captainActionable) {
|
|
3516
3516
|
status2 = "needs-decision";
|
|
3517
3517
|
attention = {
|
|
3518
3518
|
kind: "decision",
|
|
3519
3519
|
owner: "captain",
|
|
3520
|
-
text:
|
|
3520
|
+
text: record2.holdReason ?? "Firstmate is holding this for you.",
|
|
3521
3521
|
url: null
|
|
3522
3522
|
};
|
|
3523
3523
|
summary2 = attention.text;
|
|
@@ -3526,12 +3526,12 @@ function deriveBacklogTask(record, ctx, orphan) {
|
|
|
3526
3526
|
summary2 = "Firstmate lists this as in flight, but has no worker record for it.";
|
|
3527
3527
|
} else {
|
|
3528
3528
|
status2 = "queued";
|
|
3529
|
-
summary2 =
|
|
3529
|
+
summary2 = record2.unresolvedBlockerIds.length ? `Waiting on ${record2.unresolvedBlockerIds.join(", ")}.` : "Not started yet.";
|
|
3530
3530
|
}
|
|
3531
|
-
const projectId =
|
|
3531
|
+
const projectId = record2.repo ?? ledger?.dispatched?.project ?? UNASSIGNED;
|
|
3532
3532
|
const passage = (ctx.stagesFor ?? stagesFor)(projectId).passage({
|
|
3533
3533
|
track,
|
|
3534
|
-
backlogState:
|
|
3534
|
+
backlogState: record2.state,
|
|
3535
3535
|
live: false,
|
|
3536
3536
|
crewState: null,
|
|
3537
3537
|
crewSource: null,
|
|
@@ -3539,20 +3539,20 @@ function deriveBacklogTask(record, ctx, orphan) {
|
|
|
3539
3539
|
yolo: null,
|
|
3540
3540
|
prUrl,
|
|
3541
3541
|
prReady: false,
|
|
3542
|
-
merged:
|
|
3542
|
+
merged: record2.state === "done" || ledger?.merged !== null && ledger?.merged !== void 0,
|
|
3543
3543
|
reportPresent: false,
|
|
3544
|
-
captainHold:
|
|
3545
|
-
taskId:
|
|
3546
|
-
landedAt: landedAt(ledger,
|
|
3544
|
+
captainHold: record2.captainActionable,
|
|
3545
|
+
taskId: record2.id,
|
|
3546
|
+
landedAt: landedAt(ledger, record2.state === "done" ? record2.completion.date : null),
|
|
3547
3547
|
preview: previewFact(ledger)
|
|
3548
3548
|
});
|
|
3549
|
-
const title =
|
|
3549
|
+
const title = record2.title ?? record2.id;
|
|
3550
3550
|
return {
|
|
3551
|
-
id:
|
|
3551
|
+
id: record2.id,
|
|
3552
3552
|
title,
|
|
3553
3553
|
shortTitle: shortTitle(title, projectId),
|
|
3554
3554
|
projectId,
|
|
3555
|
-
kind:
|
|
3555
|
+
kind: record2.kind,
|
|
3556
3556
|
track,
|
|
3557
3557
|
status: status2,
|
|
3558
3558
|
statusLabel: STATUS_LABEL[status2],
|
|
@@ -3560,10 +3560,10 @@ function deriveBacklogTask(record, ctx, orphan) {
|
|
|
3560
3560
|
runs: track === "ship" && prUrl ? taskRuns({
|
|
3561
3561
|
prUrl,
|
|
3562
3562
|
ledger,
|
|
3563
|
-
feedback: ctx.review?.get(
|
|
3563
|
+
feedback: ctx.review?.get(record2.id)?.feedback ?? null,
|
|
3564
3564
|
sent: ctx.sent ?? [],
|
|
3565
|
-
taskId:
|
|
3566
|
-
merged:
|
|
3565
|
+
taskId: record2.id,
|
|
3566
|
+
merged: record2.state === "done" || !!ledger?.merged
|
|
3567
3567
|
}) : null,
|
|
3568
3568
|
summary: summary2,
|
|
3569
3569
|
summaryIsHistory: false,
|
|
@@ -3578,32 +3578,32 @@ function deriveBacklogTask(record, ctx, orphan) {
|
|
|
3578
3578
|
attention,
|
|
3579
3579
|
current: null,
|
|
3580
3580
|
pr: prUrl ? { url: prUrl, number: prNumber(prUrl) } : null,
|
|
3581
|
-
since:
|
|
3582
|
-
completedOn:
|
|
3581
|
+
since: record2.since,
|
|
3582
|
+
completedOn: record2.state === "done" ? record2.completion.date : null,
|
|
3583
3583
|
mergedAt: ledger?.merged ? isoSeconds(ledger.merged.ts) : null,
|
|
3584
3584
|
preview: preview(ledger),
|
|
3585
3585
|
board: board(ledger),
|
|
3586
|
-
blockedBy:
|
|
3586
|
+
blockedBy: record2.unresolvedBlockerIds,
|
|
3587
3587
|
hasReport: false,
|
|
3588
3588
|
outputAvailable: false,
|
|
3589
|
-
outputNote:
|
|
3590
|
-
thumb: ctx.thumbs.get(
|
|
3591
|
-
screenshots: ctx.review?.get(
|
|
3592
|
-
shots: ctx.review?.get(
|
|
3589
|
+
outputNote: record2.state === "done" ? "This task has landed; its worker is gone." : "No worker is running for this task.",
|
|
3590
|
+
thumb: ctx.thumbs.get(record2.id) ?? { kind: "none" },
|
|
3591
|
+
screenshots: ctx.review?.get(record2.id)?.screenshots ?? 0,
|
|
3592
|
+
shots: ctx.review?.get(record2.id)?.shots ?? []
|
|
3593
3593
|
};
|
|
3594
3594
|
}
|
|
3595
3595
|
function backlogOnly(snapshot) {
|
|
3596
3596
|
const live = new Set(snapshot.tasks.map((t) => t.id));
|
|
3597
3597
|
const orphans = new Set(snapshot.orphanInFlight);
|
|
3598
|
-
return snapshot.backlog.records.filter((r) => !live.has(r.id) && r.kind !== "secondmate").filter((r) => r.state === "queued" || r.state === "done" || orphans.has(r.id)).map((
|
|
3598
|
+
return snapshot.backlog.records.filter((r) => !live.has(r.id) && r.kind !== "secondmate").filter((r) => r.state === "queued" || r.state === "done" || orphans.has(r.id)).map((record2) => ({ record: record2, orphan: orphans.has(record2.id) }));
|
|
3599
3599
|
}
|
|
3600
3600
|
const isSecondMateRow = (t) => t.kind === "secondmate";
|
|
3601
3601
|
function deriveTasks(snapshot, ctx) {
|
|
3602
3602
|
const fmRoot = snapshot.roots.fmRoot;
|
|
3603
3603
|
const rows = snapshot.tasks.filter((t) => !isSecondMateRow(t));
|
|
3604
3604
|
const tasks = rows.map((t) => deriveLiveTask(t, ctx, fmRoot));
|
|
3605
|
-
for (const { record, orphan } of backlogOnly(snapshot)) {
|
|
3606
|
-
tasks.push(deriveBacklogTask(
|
|
3605
|
+
for (const { record: record2, orphan } of backlogOnly(snapshot)) {
|
|
3606
|
+
tasks.push(deriveBacklogTask(record2, ctx, orphan));
|
|
3607
3607
|
}
|
|
3608
3608
|
const paths = /* @__PURE__ */ new Map();
|
|
3609
3609
|
for (const t of rows) {
|
|
@@ -4106,8 +4106,8 @@ class EvidenceReader {
|
|
|
4106
4106
|
});
|
|
4107
4107
|
}
|
|
4108
4108
|
return this.prs.get(`${id} ${url}`, async () => {
|
|
4109
|
-
const
|
|
4110
|
-
if (
|
|
4109
|
+
const cached2 = await this.contributions(id, url);
|
|
4110
|
+
if (cached2) return cached2;
|
|
4111
4111
|
if (!this.useGh) {
|
|
4112
4112
|
return { available: false, reason: "No cached PR observation from Firstmate." };
|
|
4113
4113
|
}
|
|
@@ -5862,11 +5862,17 @@ function writeRemembered(configDir, r) {
|
|
|
5862
5862
|
`, { mode: 420 });
|
|
5863
5863
|
renameSync(tmp, file);
|
|
5864
5864
|
}
|
|
5865
|
-
const NAME = "manage-wheelhouse";
|
|
5866
|
-
const RECEIPT = ".wheelhouse-managed.json";
|
|
5867
|
-
const FILES = ["SKILL.md", "references/operations.md"];
|
|
5868
|
-
const hash = (text2) => createHash("sha256").update(text2).digest("hex");
|
|
5869
5865
|
const REVIEW_SURFACE_MARKER = "<!-- wheelhouse:review-surface -->";
|
|
5866
|
+
const SKILLS = [
|
|
5867
|
+
{
|
|
5868
|
+
name: "manage-wheelhouse",
|
|
5869
|
+
files: ["SKILL.md", "references/operations.md"],
|
|
5870
|
+
assumptions: [
|
|
5871
|
+
{ file: "bin/fm-inbox.sh", marker: "fm-inbox.sh reply" },
|
|
5872
|
+
{ file: "bin/fm-inbox.sh", marker: "fm-inbox.sh receipts" }
|
|
5873
|
+
]
|
|
5874
|
+
}
|
|
5875
|
+
];
|
|
5870
5876
|
const plain = (s) => s.replace(/[^\p{L}\p{N} ._()-]+/gu, " ").replace(/\s+/g, " ").trim().slice(0, 60) || "the plugin";
|
|
5871
5877
|
function reviewSurfaceSection(surface) {
|
|
5872
5878
|
if (!surface) {
|
|
@@ -5887,7 +5893,29 @@ function reviewSurfaceSection(surface) {
|
|
|
5887
5893
|
`- Wheelhouse rewrites this section whenever the role changes: the captain chooses another plugin or the built-in, or turns ${name2} off or removes it.`
|
|
5888
5894
|
].join("\n");
|
|
5889
5895
|
}
|
|
5890
|
-
|
|
5896
|
+
async function renderSkill(skillsRoot, skill, inputs) {
|
|
5897
|
+
const tree = {};
|
|
5898
|
+
for (const file of skill.files) {
|
|
5899
|
+
const text2 = await readFile(path.join(skillsRoot, skill.name, file), "utf8");
|
|
5900
|
+
tree[file] = file === "SKILL.md" ? text2.replace(REVIEW_SURFACE_MARKER, () => reviewSurfaceSection(inputs.reviewSurface)) : text2;
|
|
5901
|
+
}
|
|
5902
|
+
return tree;
|
|
5903
|
+
}
|
|
5904
|
+
const sha256 = (text2) => createHash("sha256").update(text2).digest("hex");
|
|
5905
|
+
const hashTree = (tree) => Object.fromEntries(Object.entries(tree).map(([file, text2]) => [file, sha256(text2)]));
|
|
5906
|
+
function sameHashes(a, b) {
|
|
5907
|
+
const keys = Object.keys(a);
|
|
5908
|
+
return keys.length === Object.keys(b).length && keys.every((k) => b[k] === a[k]);
|
|
5909
|
+
}
|
|
5910
|
+
async function present(file) {
|
|
5911
|
+
try {
|
|
5912
|
+
await lstat(file);
|
|
5913
|
+
return true;
|
|
5914
|
+
} catch (e) {
|
|
5915
|
+
if (e.code === "ENOENT") return false;
|
|
5916
|
+
throw e;
|
|
5917
|
+
}
|
|
5918
|
+
}
|
|
5891
5919
|
async function physical(file) {
|
|
5892
5920
|
try {
|
|
5893
5921
|
return await realpath(file);
|
|
@@ -5898,161 +5926,436 @@ async function physical(file) {
|
|
|
5898
5926
|
return path.join(await physical(parent), path.basename(file));
|
|
5899
5927
|
}
|
|
5900
5928
|
}
|
|
5901
|
-
async function
|
|
5902
|
-
|
|
5903
|
-
|
|
5904
|
-
|
|
5905
|
-
|
|
5906
|
-
if (e.code === "ENOENT") return false;
|
|
5907
|
-
throw e;
|
|
5929
|
+
async function insideAny(targets, protectedDirs) {
|
|
5930
|
+
const real2 = await Promise.all(targets.map(physical));
|
|
5931
|
+
for (const dir of protectedDirs) {
|
|
5932
|
+
const p = await physical(path.resolve(dir));
|
|
5933
|
+
if (real2.some((t) => t === p || t.startsWith(p + path.sep))) return true;
|
|
5908
5934
|
}
|
|
5935
|
+
return false;
|
|
5909
5936
|
}
|
|
5910
|
-
async function
|
|
5911
|
-
const
|
|
5937
|
+
async function readTree(dir, prefix = "") {
|
|
5938
|
+
const tree = {};
|
|
5912
5939
|
for (const entry of await readdir(dir, { withFileTypes: true })) {
|
|
5913
5940
|
const rel = prefix + entry.name;
|
|
5914
5941
|
if (entry.isDirectory())
|
|
5915
|
-
Object.assign(
|
|
5916
|
-
else if (entry.isFile())
|
|
5917
|
-
else throw new Error(
|
|
5918
|
-
}
|
|
5919
|
-
return
|
|
5942
|
+
Object.assign(tree, await readTree(path.join(dir, entry.name), rel + "/"));
|
|
5943
|
+
else if (entry.isFile()) tree[rel] = await readFile(path.join(dir, entry.name), "utf8");
|
|
5944
|
+
else throw new Error(`${rel} is a symbolic link or special file.`);
|
|
5945
|
+
}
|
|
5946
|
+
return tree;
|
|
5947
|
+
}
|
|
5948
|
+
async function writeTree(dir, tree) {
|
|
5949
|
+
for (const [file, text2] of Object.entries(tree)) {
|
|
5950
|
+
await mkdir(path.dirname(path.join(dir, file)), { recursive: true });
|
|
5951
|
+
await writeFile(path.join(dir, file), text2);
|
|
5952
|
+
}
|
|
5953
|
+
}
|
|
5954
|
+
async function replaceTree(dir, tree) {
|
|
5955
|
+
const stage2 = `${dir}.new-${process.pid}-${Date.now()}`;
|
|
5956
|
+
await rm(stage2, { recursive: true, force: true });
|
|
5957
|
+
await writeTree(stage2, tree);
|
|
5958
|
+
await mkdir(stage2, { recursive: true });
|
|
5959
|
+
await rm(dir, { recursive: true, force: true });
|
|
5960
|
+
await rename(stage2, dir);
|
|
5961
|
+
}
|
|
5962
|
+
async function writeAtomic$1(file, text2, mode = 384) {
|
|
5963
|
+
await mkdir(path.dirname(file), { recursive: true });
|
|
5964
|
+
const tmp = `${file}.${process.pid}-${Date.now()}.tmp`;
|
|
5965
|
+
await writeFile(tmp, text2, { mode });
|
|
5966
|
+
await rename(tmp, file);
|
|
5967
|
+
}
|
|
5968
|
+
const MANIFEST_SCHEMA = "wheelhouse-material.v1";
|
|
5969
|
+
const materialDir = (configDir) => path.join(configDir, "agent-material");
|
|
5970
|
+
const manifestFile = (dir) => path.join(dir, "manifest.json");
|
|
5971
|
+
const settingsFile = (dir) => path.join(dir, "settings.json");
|
|
5972
|
+
const folder = (id) => id.replace(/[^A-Za-z0-9@._-]/g, "_");
|
|
5973
|
+
const baseDir = (dir, id) => path.join(dir, "base", folder(id));
|
|
5974
|
+
const proposedDir = (dir, id) => path.join(dir, "proposed", folder(id));
|
|
5975
|
+
function emptyManifest(version2, harness) {
|
|
5976
|
+
return {
|
|
5977
|
+
schema: MANIFEST_SCHEMA,
|
|
5978
|
+
wheelhouse: { version: version2 },
|
|
5979
|
+
firstmate: null,
|
|
5980
|
+
render: { reviewSurface: null, harness },
|
|
5981
|
+
items: {},
|
|
5982
|
+
history: []
|
|
5983
|
+
};
|
|
5984
|
+
}
|
|
5985
|
+
function valid(m) {
|
|
5986
|
+
const x = m;
|
|
5987
|
+
return !!x && x.schema === MANIFEST_SCHEMA && typeof x.items === "object" && x.items !== null && Array.isArray(x.history) && typeof x.render === "object" && x.render !== null;
|
|
5920
5988
|
}
|
|
5921
|
-
async function
|
|
5922
|
-
|
|
5989
|
+
async function readManifest(dir, look = false) {
|
|
5990
|
+
const file = manifestFile(dir);
|
|
5991
|
+
let text2;
|
|
5923
5992
|
try {
|
|
5924
|
-
|
|
5925
|
-
|
|
5926
|
-
|
|
5927
|
-
|
|
5928
|
-
|
|
5929
|
-
|
|
5930
|
-
|
|
5993
|
+
text2 = await readFile(file, "utf8");
|
|
5994
|
+
} catch (e) {
|
|
5995
|
+
if (e.code === "ENOENT") return null;
|
|
5996
|
+
throw e;
|
|
5997
|
+
}
|
|
5998
|
+
try {
|
|
5999
|
+
const m = JSON.parse(text2);
|
|
6000
|
+
if (valid(m)) return m;
|
|
5931
6001
|
} catch {
|
|
5932
|
-
return await present(target) ? "foreign" : "absent";
|
|
5933
6002
|
}
|
|
6003
|
+
if (!look) await rename(file, `${file}.invalid-${Date.now()}`);
|
|
6004
|
+
return null;
|
|
5934
6005
|
}
|
|
5935
|
-
async function
|
|
5936
|
-
|
|
5937
|
-
|
|
5938
|
-
|
|
5939
|
-
|
|
5940
|
-
|
|
5941
|
-
|
|
5942
|
-
|
|
5943
|
-
|
|
5944
|
-
|
|
5945
|
-
"skills"
|
|
5946
|
-
);
|
|
5947
|
-
const target = path.join(parent, NAME);
|
|
5948
|
-
const current = {
|
|
5949
|
-
state: "current",
|
|
5950
|
-
message: `Wheelhouse skill is current at ${target}.`
|
|
5951
|
-
};
|
|
5952
|
-
let stage2 = null;
|
|
6006
|
+
async function writeManifest(dir, m) {
|
|
6007
|
+
m.history = m.history.slice(-50);
|
|
6008
|
+
await writeAtomic$1(manifestFile(dir), JSON.stringify(m, null, 2) + "\n");
|
|
6009
|
+
}
|
|
6010
|
+
const saveBase = (dir, id, tree) => replaceTree(baseDir(dir, id), tree);
|
|
6011
|
+
async function saveProposed(dir, id, tree) {
|
|
6012
|
+
if (tree) await replaceTree(proposedDir(dir, id), tree);
|
|
6013
|
+
else await rm(proposedDir(dir, id), { recursive: true, force: true });
|
|
6014
|
+
}
|
|
6015
|
+
async function readOff(dir) {
|
|
5953
6016
|
try {
|
|
5954
|
-
const
|
|
5955
|
-
|
|
5956
|
-
|
|
5957
|
-
if (destinations.some(
|
|
5958
|
-
(destination) => destination === protectedDir || destination.startsWith(protectedDir + path.sep)
|
|
5959
|
-
))
|
|
5960
|
-
return {
|
|
5961
|
-
state: "skipped",
|
|
5962
|
-
message: `Left ${target} unchanged: user skills location is inside Firstmate's checkout or home.`
|
|
5963
|
-
};
|
|
5964
|
-
}
|
|
5965
|
-
await mkdir(parent, { recursive: true });
|
|
5966
|
-
const files = Object.fromEntries(
|
|
5967
|
-
await Promise.all(
|
|
5968
|
-
FILES.map(async (file) => {
|
|
5969
|
-
const text2 = await readFile(path.join(sourceDir, file), "utf8");
|
|
5970
|
-
return [file, file === "SKILL.md" ? renderSkill(text2, surface) : text2];
|
|
5971
|
-
})
|
|
5972
|
-
)
|
|
5973
|
-
);
|
|
5974
|
-
const hashes = Object.fromEntries(
|
|
5975
|
-
Object.entries(files).map(([file, text2]) => [file, hash(text2)])
|
|
5976
|
-
);
|
|
5977
|
-
const found = await inspect(target, hashes);
|
|
5978
|
-
if (found === "current") return current;
|
|
5979
|
-
if (found === "foreign")
|
|
5980
|
-
return {
|
|
5981
|
-
state: "skipped",
|
|
5982
|
-
message: `Left ${target} unchanged: locally edited or not managed by Wheelhouse. Move it aside to install the bundled skill.`
|
|
5983
|
-
};
|
|
5984
|
-
let now = found;
|
|
5985
|
-
const exists2 = found === "managed";
|
|
5986
|
-
stage2 = await mkdtemp(path.join(parent, ".wheelhouse-skill-"));
|
|
5987
|
-
for (const [file, text2] of Object.entries(files)) {
|
|
5988
|
-
await mkdir(path.dirname(path.join(stage2, file)), { recursive: true });
|
|
5989
|
-
await writeFile(path.join(stage2, file), text2);
|
|
5990
|
-
}
|
|
5991
|
-
await writeFile(
|
|
5992
|
-
path.join(stage2, RECEIPT),
|
|
5993
|
-
JSON.stringify({ schema: "wheelhouse-skill.v1", version, files: hashes }) + "\n"
|
|
6017
|
+
const s = JSON.parse(await readFile(settingsFile(dir), "utf8"));
|
|
6018
|
+
return new Set(
|
|
6019
|
+
Object.entries(s.items ?? {}).filter(([, on]) => on === false).map(([id]) => id)
|
|
5994
6020
|
);
|
|
6021
|
+
} catch {
|
|
6022
|
+
return /* @__PURE__ */ new Set();
|
|
6023
|
+
}
|
|
6024
|
+
}
|
|
6025
|
+
const chains = /* @__PURE__ */ new Map();
|
|
6026
|
+
function serialize(dir, work) {
|
|
6027
|
+
const prev = chains.get(dir) ?? Promise.resolve();
|
|
6028
|
+
const run = prev.then(work, work);
|
|
6029
|
+
const settled2 = run.catch(() => {
|
|
6030
|
+
});
|
|
6031
|
+
chains.set(dir, settled2);
|
|
6032
|
+
void settled2.then(() => {
|
|
6033
|
+
if (chains.get(dir) === settled2) chains.delete(dir);
|
|
6034
|
+
});
|
|
6035
|
+
return run;
|
|
6036
|
+
}
|
|
6037
|
+
const RECEIPT = ".wheelhouse-managed.json";
|
|
6038
|
+
const RECEIPT_SCHEMA = "wheelhouse-skill.v1";
|
|
6039
|
+
function receiptHashes(text2) {
|
|
6040
|
+
try {
|
|
6041
|
+
const r = JSON.parse(text2);
|
|
6042
|
+
if (r.schema !== RECEIPT_SCHEMA || !r.files || typeof r.files !== "object") return null;
|
|
6043
|
+
const files = Object.entries(r.files);
|
|
6044
|
+
return files.every(([, v]) => typeof v === "string") ? r.files : null;
|
|
6045
|
+
} catch {
|
|
6046
|
+
return null;
|
|
6047
|
+
}
|
|
6048
|
+
}
|
|
6049
|
+
async function readLocal(target) {
|
|
6050
|
+
try {
|
|
6051
|
+
if (!await present(target)) return { kind: "absent" };
|
|
6052
|
+
if (!(await lstat(target)).isDirectory())
|
|
6053
|
+
return { kind: "unreadable", reason: "it is a symbolic link or not a folder" };
|
|
6054
|
+
const tree = await readTree(target);
|
|
6055
|
+
const receipt = RECEIPT in tree ? receiptHashes(tree[RECEIPT]) : null;
|
|
6056
|
+
delete tree[RECEIPT];
|
|
6057
|
+
return { kind: "files", tree, receipt };
|
|
6058
|
+
} catch (e) {
|
|
6059
|
+
if (!await present(target).catch(() => true)) return { kind: "absent" };
|
|
6060
|
+
return { kind: "unreadable", reason: e.message };
|
|
6061
|
+
}
|
|
6062
|
+
}
|
|
6063
|
+
const receiptText = (version2, hashes) => JSON.stringify({ schema: RECEIPT_SCHEMA, version: version2, files: hashes }) + "\n";
|
|
6064
|
+
async function swapIn(target, tree, receipt, check2) {
|
|
6065
|
+
const parent = path.dirname(target);
|
|
6066
|
+
await mkdir(parent, { recursive: true });
|
|
6067
|
+
const stage2 = await mkdtemp(path.join(parent, ".wheelhouse-skill-"));
|
|
6068
|
+
let placed = false;
|
|
6069
|
+
try {
|
|
6070
|
+
await writeTree(stage2, tree);
|
|
6071
|
+
await writeFile(path.join(stage2, RECEIPT), receipt);
|
|
5995
6072
|
const backup = stage2 + "-previous";
|
|
5996
6073
|
for (let attempt2 = 1; ; attempt2++) {
|
|
5997
|
-
|
|
5998
|
-
|
|
5999
|
-
|
|
6000
|
-
|
|
6001
|
-
|
|
6002
|
-
|
|
6003
|
-
|
|
6004
|
-
|
|
6005
|
-
|
|
6006
|
-
|
|
6007
|
-
}
|
|
6008
|
-
|
|
6009
|
-
|
|
6010
|
-
|
|
6011
|
-
|
|
6012
|
-
if (attempt2 === 20) throw error;
|
|
6074
|
+
const now = await readLocal(target);
|
|
6075
|
+
const verdict = check2(now);
|
|
6076
|
+
if (verdict !== "replace") return verdict;
|
|
6077
|
+
try {
|
|
6078
|
+
if (now.kind !== "absent") await rename(target, backup);
|
|
6079
|
+
await rename(stage2, target);
|
|
6080
|
+
placed = true;
|
|
6081
|
+
return "swapped";
|
|
6082
|
+
} catch (e) {
|
|
6083
|
+
await rename(backup, target).catch(() => {
|
|
6084
|
+
});
|
|
6085
|
+
if (attempt2 === 20) throw e;
|
|
6086
|
+
} finally {
|
|
6087
|
+
await rm(backup, { recursive: true, force: true });
|
|
6088
|
+
}
|
|
6013
6089
|
await new Promise((resolve) => setTimeout(resolve, 10 * attempt2));
|
|
6014
6090
|
}
|
|
6015
|
-
stage2 = null;
|
|
6016
|
-
return {
|
|
6017
|
-
state: exists2 ? "updated" : "installed",
|
|
6018
|
-
message: `Wheelhouse skill ${exists2 ? "updated" : "installed"} at ${target}.`
|
|
6019
|
-
};
|
|
6020
|
-
} catch (e) {
|
|
6021
|
-
return {
|
|
6022
|
-
state: "error",
|
|
6023
|
-
message: `Could not install Wheelhouse skill at ${target}: ${e.message}`
|
|
6024
|
-
};
|
|
6025
6091
|
} finally {
|
|
6026
|
-
if (
|
|
6092
|
+
if (!placed) await rm(stage2, { recursive: true, force: true });
|
|
6093
|
+
}
|
|
6094
|
+
}
|
|
6095
|
+
function skillRootDir(root, env) {
|
|
6096
|
+
const home = env.HOME || homedir();
|
|
6097
|
+
return root === "claude" ? path.resolve(env.CLAUDE_CONFIG_DIR || path.join(home, ".claude"), "skills") : path.resolve(home, ".agents", "skills");
|
|
6098
|
+
}
|
|
6099
|
+
const rootsFor = (harness) => harness === "claude" ? ["claude"] : ["claude", "agents"];
|
|
6100
|
+
const skillId = (name2, root) => `skill:${name2}@${root}`;
|
|
6101
|
+
function plannedSkills(env, harness) {
|
|
6102
|
+
return SKILLS.flatMap(
|
|
6103
|
+
(skill) => rootsFor(harness).map((root) => ({
|
|
6104
|
+
id: skillId(skill.name, root),
|
|
6105
|
+
skill,
|
|
6106
|
+
target: path.join(skillRootDir(root, env), skill.name)
|
|
6107
|
+
}))
|
|
6108
|
+
);
|
|
6109
|
+
}
|
|
6110
|
+
function decide(o) {
|
|
6111
|
+
if (o.local === "unreadable") return "foreign";
|
|
6112
|
+
if (o.local === null) return "install";
|
|
6113
|
+
if (!o.bases.length) return "foreign";
|
|
6114
|
+
const local = o.local;
|
|
6115
|
+
if (sameHashes(local, o.next)) return "current";
|
|
6116
|
+
if (o.kept && sameHashes(local, o.kept.local) && sameHashes(o.next, o.kept.next)) return "kept";
|
|
6117
|
+
return o.bases.some((b) => sameHashes(local, b)) ? "update" : "modified";
|
|
6118
|
+
}
|
|
6119
|
+
const AS_STATE = {
|
|
6120
|
+
install: "installed",
|
|
6121
|
+
update: "updated",
|
|
6122
|
+
current: "current",
|
|
6123
|
+
kept: "kept",
|
|
6124
|
+
modified: "modified",
|
|
6125
|
+
foreign: "foreign"
|
|
6126
|
+
};
|
|
6127
|
+
const localHashes = (l) => l.kind === "absent" ? null : l.kind === "unreadable" ? "unreadable" : hashTree(l.tree);
|
|
6128
|
+
function message$3(state, id, target, detail) {
|
|
6129
|
+
switch (state) {
|
|
6130
|
+
case "installed":
|
|
6131
|
+
return `Wheelhouse skill installed at ${target}.`;
|
|
6132
|
+
case "updated":
|
|
6133
|
+
return `Wheelhouse skill updated at ${target}.`;
|
|
6134
|
+
case "current":
|
|
6135
|
+
return `Wheelhouse skill is current at ${target}.`;
|
|
6136
|
+
case "kept":
|
|
6137
|
+
return `Wheelhouse skill at ${target} keeps its local edits, as asked.`;
|
|
6138
|
+
case "modified":
|
|
6139
|
+
return `Left ${target} unchanged: it was locally edited${detail ? ` (${detail})` : ""}. \`wheelhouse skills diff ${id}\` compares it with this version; \`accept\` or \`keep\` settles it.`;
|
|
6140
|
+
case "foreign":
|
|
6141
|
+
return `Left ${target} unchanged: not managed by Wheelhouse${detail ? ` (${detail})` : ""}. \`wheelhouse skills adopt ${id}\` replaces it with the bundled version.`;
|
|
6142
|
+
case "refused":
|
|
6143
|
+
return `Left ${target} unchanged: ${detail ?? "it is inside Firstmate's checkout or home"}.`;
|
|
6144
|
+
case "off":
|
|
6145
|
+
return `${id} is turned off; \`wheelhouse skills sync ${id}\` turns it on again.`;
|
|
6146
|
+
case "error":
|
|
6147
|
+
return `Could not install Wheelhouse skill at ${target}: ${detail}`;
|
|
6027
6148
|
}
|
|
6028
6149
|
}
|
|
6150
|
+
function record(m, id, kind, target, bundle, version2, files, now) {
|
|
6151
|
+
m.items[id] = { id, kind, target, bundle, version: version2, files, writtenAt: now.toISOString() };
|
|
6152
|
+
}
|
|
6153
|
+
async function syncSkill(ctx, dir, m, item, tree, dryRun) {
|
|
6154
|
+
const { id, target } = item;
|
|
6155
|
+
const result2 = (state, detail) => ({
|
|
6156
|
+
id,
|
|
6157
|
+
kind: "skill-dir",
|
|
6158
|
+
target,
|
|
6159
|
+
state,
|
|
6160
|
+
message: message$3(state, id, target, detail)
|
|
6161
|
+
});
|
|
6162
|
+
if (await insideAny([path.dirname(target), target], [ctx.install.firstmateDir, ctx.install.homeDir]))
|
|
6163
|
+
return result2("refused", "user skills location is inside Firstmate's checkout or home");
|
|
6164
|
+
const next = hashTree(tree);
|
|
6165
|
+
const rec = m.items[id];
|
|
6166
|
+
const verdict = (l) => decide({
|
|
6167
|
+
local: localHashes(l),
|
|
6168
|
+
next,
|
|
6169
|
+
bases: [rec?.files, l.kind === "files" ? l.receipt : null].filter((b) => !!b),
|
|
6170
|
+
kept: rec?.kept
|
|
6171
|
+
});
|
|
6172
|
+
const now = await readLocal(target);
|
|
6173
|
+
const first = verdict(now);
|
|
6174
|
+
const at = ctx.now?.() ?? /* @__PURE__ */ new Date();
|
|
6175
|
+
if (dryRun) {
|
|
6176
|
+
return result2(AS_STATE[first], now.kind === "unreadable" ? now.reason : void 0);
|
|
6177
|
+
}
|
|
6178
|
+
if (first === "install" || first === "update") {
|
|
6179
|
+
const outcome = await swapIn(target, tree, receiptText(ctx.version, next), (l) => {
|
|
6180
|
+
const v = verdict(l);
|
|
6181
|
+
return v === "install" || v === "update" ? "replace" : v === "current" ? "done" : "stop";
|
|
6182
|
+
});
|
|
6183
|
+
if (outcome === "stop") return syncSkill(ctx, dir, m, item, tree, dryRun);
|
|
6184
|
+
record(m, id, "skill-dir", target, item.skill.name, ctx.version, next, at);
|
|
6185
|
+
await saveBase(dir, id, tree);
|
|
6186
|
+
await saveProposed(dir, id, null);
|
|
6187
|
+
return result2(
|
|
6188
|
+
outcome === "swapped" ? first === "install" ? "installed" : "updated" : "current"
|
|
6189
|
+
);
|
|
6190
|
+
}
|
|
6191
|
+
if (first === "current") {
|
|
6192
|
+
if (!rec || !sameHashes(rec.files, next) || rec.kept) {
|
|
6193
|
+
record(m, id, "skill-dir", target, item.skill.name, ctx.version, next, at);
|
|
6194
|
+
await saveBase(dir, id, tree);
|
|
6195
|
+
}
|
|
6196
|
+
await saveProposed(dir, id, null);
|
|
6197
|
+
return result2("current");
|
|
6198
|
+
}
|
|
6199
|
+
if (first === "modified") {
|
|
6200
|
+
if (!rec && now.kind === "files" && now.receipt)
|
|
6201
|
+
record(m, id, "skill-dir", target, item.skill.name, "unknown", now.receipt, at);
|
|
6202
|
+
await saveProposed(dir, id, tree);
|
|
6203
|
+
return result2("modified");
|
|
6204
|
+
}
|
|
6205
|
+
return result2(first, now.kind === "unreadable" ? now.reason : void 0);
|
|
6206
|
+
}
|
|
6207
|
+
function gitHead(dir) {
|
|
6208
|
+
return new Promise(
|
|
6209
|
+
(resolve) => execFile(
|
|
6210
|
+
"git",
|
|
6211
|
+
["-C", dir, "rev-parse", "HEAD"],
|
|
6212
|
+
{ timeout: 5e3 },
|
|
6213
|
+
(error, stdout) => resolve(error ? null : stdout.trim() || null)
|
|
6214
|
+
)
|
|
6215
|
+
);
|
|
6216
|
+
}
|
|
6217
|
+
async function checkAssumptions(firstmateDir) {
|
|
6218
|
+
const checks = [];
|
|
6219
|
+
const seen = /* @__PURE__ */ new Set();
|
|
6220
|
+
for (const a of SKILLS.flatMap((s) => s.assumptions)) {
|
|
6221
|
+
const key = `${a.file}\0${a.marker}`;
|
|
6222
|
+
if (seen.has(key)) continue;
|
|
6223
|
+
seen.add(key);
|
|
6224
|
+
let text2 = "";
|
|
6225
|
+
try {
|
|
6226
|
+
text2 = await readFile(path.join(firstmateDir, a.file), "utf8");
|
|
6227
|
+
} catch {
|
|
6228
|
+
}
|
|
6229
|
+
checks.push({ ...a, present: text2.includes(a.marker) });
|
|
6230
|
+
}
|
|
6231
|
+
return checks;
|
|
6232
|
+
}
|
|
6233
|
+
function summary$1(items, drift) {
|
|
6234
|
+
const notable = items.filter((i) => i.state !== "current" && i.state !== "off");
|
|
6235
|
+
const lines = (notable.length ? notable : items).map((i) => i.message);
|
|
6236
|
+
if (drift.length)
|
|
6237
|
+
lines.push(
|
|
6238
|
+
`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.`
|
|
6239
|
+
);
|
|
6240
|
+
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";
|
|
6241
|
+
return { state, message: lines.join(" ") || "Wheelhouse installs nothing here.", items, drift };
|
|
6242
|
+
}
|
|
6243
|
+
const disabled = (message2) => ({
|
|
6244
|
+
state: "disabled",
|
|
6245
|
+
message: message2,
|
|
6246
|
+
items: [],
|
|
6247
|
+
drift: []
|
|
6248
|
+
});
|
|
6249
|
+
async function syncMaterial(ctx, inputs, opts = {}) {
|
|
6250
|
+
if (ctx.env.WHEELHOUSE_MANAGE_SKILL === "0")
|
|
6251
|
+
return disabled("Wheelhouse skill installation is disabled.");
|
|
6252
|
+
if (!ctx.skillsRoot)
|
|
6253
|
+
return disabled(
|
|
6254
|
+
"Wheelhouse skill is left as it is: only the packaged Wheelhouse server installs it."
|
|
6255
|
+
);
|
|
6256
|
+
const skillsRoot = ctx.skillsRoot;
|
|
6257
|
+
const dir = materialDir(ctx.configDir);
|
|
6258
|
+
const dryRun = opts.dryRun ?? false;
|
|
6259
|
+
return serialize(dir, async () => {
|
|
6260
|
+
const m = await readManifest(dir, dryRun) ?? emptyManifest(ctx.version, inputs.harness);
|
|
6261
|
+
const off2 = await readOff(dir);
|
|
6262
|
+
const items = [];
|
|
6263
|
+
const trees = /* @__PURE__ */ new Map();
|
|
6264
|
+
for (const item of plannedSkills(ctx.env, inputs.harness)) {
|
|
6265
|
+
if (opts.only && !opts.only.includes(item.id)) continue;
|
|
6266
|
+
if (off2.has(item.id)) {
|
|
6267
|
+
items.push({
|
|
6268
|
+
id: item.id,
|
|
6269
|
+
kind: "skill-dir",
|
|
6270
|
+
target: item.target,
|
|
6271
|
+
state: "off",
|
|
6272
|
+
message: message$3("off", item.id, item.target)
|
|
6273
|
+
});
|
|
6274
|
+
continue;
|
|
6275
|
+
}
|
|
6276
|
+
let tree = trees.get(item.skill.name);
|
|
6277
|
+
if (!tree) {
|
|
6278
|
+
tree = await renderSkill(skillsRoot, item.skill, inputs).catch((e) => e);
|
|
6279
|
+
trees.set(item.skill.name, tree);
|
|
6280
|
+
}
|
|
6281
|
+
try {
|
|
6282
|
+
if (tree instanceof Error) throw tree;
|
|
6283
|
+
items.push(await syncSkill(ctx, dir, m, item, tree, dryRun));
|
|
6284
|
+
} catch (e) {
|
|
6285
|
+
items.push({
|
|
6286
|
+
id: item.id,
|
|
6287
|
+
kind: "skill-dir",
|
|
6288
|
+
target: item.target,
|
|
6289
|
+
state: "error",
|
|
6290
|
+
message: message$3("error", item.id, item.target, e.message)
|
|
6291
|
+
});
|
|
6292
|
+
}
|
|
6293
|
+
}
|
|
6294
|
+
const assumptions = await checkAssumptions(ctx.install.firstmateDir);
|
|
6295
|
+
const drift = assumptions.filter((a) => !a.present);
|
|
6296
|
+
if (!dryRun) {
|
|
6297
|
+
const now = (ctx.now?.() ?? /* @__PURE__ */ new Date()).toISOString();
|
|
6298
|
+
m.firstmate = {
|
|
6299
|
+
dir: ctx.install.firstmateDir,
|
|
6300
|
+
home: ctx.install.homeDir,
|
|
6301
|
+
commit: await (ctx.commit ?? gitHead)(ctx.install.firstmateDir),
|
|
6302
|
+
checkedAt: now,
|
|
6303
|
+
assumptions
|
|
6304
|
+
};
|
|
6305
|
+
m.render = { reviewSurface: inputs.reviewSurface, harness: inputs.harness };
|
|
6306
|
+
const changes = items.filter((i) => i.state === "installed" || i.state === "updated").map((i) => ({ id: i.id, state: i.state }));
|
|
6307
|
+
if (changes.length) m.history.push({ at: now, version: ctx.version, changes });
|
|
6308
|
+
m.wheelhouse = { version: ctx.version };
|
|
6309
|
+
try {
|
|
6310
|
+
await writeManifest(dir, m);
|
|
6311
|
+
} catch (e) {
|
|
6312
|
+
return {
|
|
6313
|
+
...summary$1(items, drift),
|
|
6314
|
+
state: "error",
|
|
6315
|
+
message: `Could not record Wheelhouse's agent material in ${dir}: ${e.message}`
|
|
6316
|
+
};
|
|
6317
|
+
}
|
|
6318
|
+
}
|
|
6319
|
+
return summary$1(items, drift);
|
|
6320
|
+
}).catch((e) => ({
|
|
6321
|
+
state: "error",
|
|
6322
|
+
message: `Could not sync Wheelhouse's agent material in ${dir}: ${e.message}`,
|
|
6323
|
+
items: [],
|
|
6324
|
+
drift: []
|
|
6325
|
+
}));
|
|
6326
|
+
}
|
|
6327
|
+
function reviewSurfaceOf(active, statuses) {
|
|
6328
|
+
if (!active) return null;
|
|
6329
|
+
const status2 = statuses.find((s) => s.id === active.id && s.state === "loaded");
|
|
6330
|
+
return { id: active.id, name: active.name, repository: status2?.repository ?? null };
|
|
6331
|
+
}
|
|
6029
6332
|
const RETRY_MS = 6e4;
|
|
6030
|
-
class
|
|
6031
|
-
constructor(
|
|
6333
|
+
class MaterialSync {
|
|
6334
|
+
constructor(inputs, run, log = () => {
|
|
6032
6335
|
}, now = Date.now) {
|
|
6033
|
-
this.
|
|
6034
|
-
this.
|
|
6336
|
+
this.inputs = inputs;
|
|
6337
|
+
this.run = run;
|
|
6035
6338
|
this.log = log;
|
|
6036
6339
|
this.now = now;
|
|
6037
6340
|
}
|
|
6038
|
-
|
|
6039
|
-
|
|
6341
|
+
inputs;
|
|
6342
|
+
run;
|
|
6040
6343
|
log;
|
|
6041
6344
|
now;
|
|
6042
|
-
/** The surface last installed: a plugin id, '' for the built-in, undefined before the first. */
|
|
6043
6345
|
last;
|
|
6044
6346
|
chain = Promise.resolve();
|
|
6045
|
-
/** The last failed install: its surface key, when it ran, and its message. */
|
|
6046
6347
|
failed = null;
|
|
6047
|
-
|
|
6348
|
+
latest = null;
|
|
6349
|
+
/** Sync when the inputs changed; null when they had not. */
|
|
6048
6350
|
sync() {
|
|
6049
6351
|
const run = this.chain.then(async () => {
|
|
6050
|
-
const
|
|
6051
|
-
const key =
|
|
6352
|
+
const inputs = await this.inputs();
|
|
6353
|
+
const key = JSON.stringify(inputs);
|
|
6052
6354
|
if (key === this.last) return null;
|
|
6053
6355
|
const f = this.failed;
|
|
6054
6356
|
if (f?.key === key && this.now() - f.at < RETRY_MS) return null;
|
|
6055
|
-
const r = await this.
|
|
6357
|
+
const r = await this.run({ reviewSurface: inputs.reviewSurface, harness: inputs.harness });
|
|
6358
|
+
this.latest = r;
|
|
6056
6359
|
if (r.state === "error") {
|
|
6057
6360
|
this.last = void 0;
|
|
6058
6361
|
this.failed = { key, at: this.now(), message: r.message };
|
|
@@ -6068,11 +6371,68 @@ class SkillSync {
|
|
|
6068
6371
|
});
|
|
6069
6372
|
return run;
|
|
6070
6373
|
}
|
|
6374
|
+
/** The last sync's outcome, for /api/health. */
|
|
6375
|
+
view() {
|
|
6376
|
+
const r = this.latest;
|
|
6377
|
+
if (!r) return { state: "unknown", message: null, items: [], drift: [] };
|
|
6378
|
+
return {
|
|
6379
|
+
state: r.state,
|
|
6380
|
+
message: r.message,
|
|
6381
|
+
items: r.items.map(({ id, state, target }) => ({ id, state, target })),
|
|
6382
|
+
drift: r.drift.map(({ file, marker }) => ({ file, marker }))
|
|
6383
|
+
};
|
|
6384
|
+
}
|
|
6071
6385
|
}
|
|
6072
|
-
function
|
|
6073
|
-
|
|
6074
|
-
|
|
6075
|
-
return
|
|
6386
|
+
function cached(fn, ms, now = Date.now) {
|
|
6387
|
+
let at = -Infinity;
|
|
6388
|
+
let value = null;
|
|
6389
|
+
return () => {
|
|
6390
|
+
if (!value || now() - at >= ms) {
|
|
6391
|
+
at = now();
|
|
6392
|
+
value = fn();
|
|
6393
|
+
}
|
|
6394
|
+
return value;
|
|
6395
|
+
};
|
|
6396
|
+
}
|
|
6397
|
+
function materialContext(install, env) {
|
|
6398
|
+
return {
|
|
6399
|
+
install,
|
|
6400
|
+
env,
|
|
6401
|
+
configDir: defaultConfigDir(env),
|
|
6402
|
+
skillsRoot: env.WHEELHOUSE_INSTALL_DIR ? path.join(env.WHEELHOUSE_INSTALL_DIR, "skills") : void 0,
|
|
6403
|
+
version
|
|
6404
|
+
};
|
|
6405
|
+
}
|
|
6406
|
+
function serverHarness(env) {
|
|
6407
|
+
try {
|
|
6408
|
+
return parseHarness(env.WHEELHOUSE_HARNESS);
|
|
6409
|
+
} catch {
|
|
6410
|
+
return "claude";
|
|
6411
|
+
}
|
|
6412
|
+
}
|
|
6413
|
+
async function syncForServer(install, env, plugins) {
|
|
6414
|
+
const reviewSurface = plugins ? reviewSurfaceOf(await plugins.roleProvider("review.surface"), plugins.status()) : null;
|
|
6415
|
+
return syncMaterial(materialContext(install, env), {
|
|
6416
|
+
reviewSurface,
|
|
6417
|
+
harness: serverHarness(env)
|
|
6418
|
+
});
|
|
6419
|
+
}
|
|
6420
|
+
const COMMIT_MS = 6e4;
|
|
6421
|
+
function materialSync(install, env, plugins, log) {
|
|
6422
|
+
const commit2 = cached(() => gitHead(install.firstmateDir), COMMIT_MS);
|
|
6423
|
+
const ctx = { ...materialContext(install, env), commit: () => commit2() };
|
|
6424
|
+
return new MaterialSync(
|
|
6425
|
+
async () => ({
|
|
6426
|
+
reviewSurface: reviewSurfaceOf(
|
|
6427
|
+
await plugins.roleProvider("review.surface"),
|
|
6428
|
+
plugins.status()
|
|
6429
|
+
),
|
|
6430
|
+
harness: serverHarness(env),
|
|
6431
|
+
firstmateCommit: await commit2()
|
|
6432
|
+
}),
|
|
6433
|
+
(inputs) => syncMaterial(ctx, inputs),
|
|
6434
|
+
log
|
|
6435
|
+
);
|
|
6076
6436
|
}
|
|
6077
6437
|
const SESSION_HEADER = "x-wheelhouse-session";
|
|
6078
6438
|
const LOOPBACK_HOST = /^(127\.0\.0\.1|localhost|\[::1\])(:\d+)?$/i;
|
|
@@ -7844,6 +8204,12 @@ class BuildReader {
|
|
|
7844
8204
|
}
|
|
7845
8205
|
}
|
|
7846
8206
|
const DEFAULT_INTERVAL$1 = 5e3;
|
|
8207
|
+
const UNSYNCED_MATERIAL = {
|
|
8208
|
+
state: "unknown",
|
|
8209
|
+
message: null,
|
|
8210
|
+
items: [],
|
|
8211
|
+
drift: []
|
|
8212
|
+
};
|
|
7847
8213
|
const CARD_SHOTS = 4;
|
|
7848
8214
|
class Collector {
|
|
7849
8215
|
opts;
|
|
@@ -7852,6 +8218,7 @@ class Collector {
|
|
|
7852
8218
|
running = false;
|
|
7853
8219
|
ticking = null;
|
|
7854
8220
|
listeners = /* @__PURE__ */ new Set();
|
|
8221
|
+
material = null;
|
|
7855
8222
|
snapshot = null;
|
|
7856
8223
|
ready = null;
|
|
7857
8224
|
readyError = null;
|
|
@@ -8003,7 +8370,7 @@ class Collector {
|
|
|
8003
8370
|
worktree: t.worktree.present ? t.worktree.path : null,
|
|
8004
8371
|
row: t
|
|
8005
8372
|
})),
|
|
8006
|
-
...backlogOnly(snap).map(({ record }) => ({ id:
|
|
8373
|
+
...backlogOnly(snap).map(({ record: record2 }) => ({ id: record2.id, worktree: null, row: null }))
|
|
8007
8374
|
];
|
|
8008
8375
|
const thumbs = /* @__PURE__ */ new Map();
|
|
8009
8376
|
const review = /* @__PURE__ */ new Map();
|
|
@@ -8201,6 +8568,10 @@ class Collector {
|
|
|
8201
8568
|
return this.snapshot?.tasks.find((t) => t.id === id) ?? null;
|
|
8202
8569
|
}
|
|
8203
8570
|
mateFacts = null;
|
|
8571
|
+
/** Where health reads the last sync of Wheelhouse's agent material (material/sync.ts). */
|
|
8572
|
+
setMaterial(f) {
|
|
8573
|
+
this.material = f;
|
|
8574
|
+
}
|
|
8204
8575
|
/** Where a second mate's task's PR and preview come from, once read (matetasks.ts). */
|
|
8205
8576
|
setMateFacts(f) {
|
|
8206
8577
|
this.mateFacts = f;
|
|
@@ -8301,7 +8672,8 @@ class Collector {
|
|
|
8301
8672
|
configDir: null,
|
|
8302
8673
|
problem: "Passage files are not set up.",
|
|
8303
8674
|
checksRunning: 0
|
|
8304
|
-
}
|
|
8675
|
+
},
|
|
8676
|
+
material: this.material?.() ?? UNSYNCED_MATERIAL
|
|
8305
8677
|
};
|
|
8306
8678
|
}
|
|
8307
8679
|
messaging() {
|
|
@@ -10582,9 +10954,9 @@ class InboxService {
|
|
|
10582
10954
|
line = p.line;
|
|
10583
10955
|
}
|
|
10584
10956
|
const text2 = closing ? closeText(card, note2 || null) : answerText(card, choice, note2 || null, decided ? null : line, decided || null);
|
|
10585
|
-
const
|
|
10586
|
-
if (!
|
|
10587
|
-
const sent = await messenger.send(
|
|
10957
|
+
const valid2 = validateSend(requestId, text2, card.taskId);
|
|
10958
|
+
if (!valid2.ok) return valid2;
|
|
10959
|
+
const sent = await messenger.send(valid2.input);
|
|
10588
10960
|
if (sent.ok && sent.message.delivery !== "failed") {
|
|
10589
10961
|
await this.deps.answered?.record({
|
|
10590
10962
|
requestId: sent.message.requestId,
|
|
@@ -10922,11 +11294,11 @@ class WatchStore {
|
|
|
10922
11294
|
get(projectId) {
|
|
10923
11295
|
return this.projects.get(projectId) ?? null;
|
|
10924
11296
|
}
|
|
10925
|
-
set(projectId,
|
|
11297
|
+
set(projectId, record2) {
|
|
10926
11298
|
this.projects.set(projectId, {
|
|
10927
|
-
mode:
|
|
10928
|
-
rule:
|
|
10929
|
-
seen:
|
|
11299
|
+
mode: record2.mode,
|
|
11300
|
+
rule: record2.rule,
|
|
11301
|
+
seen: record2.seen.slice(-MAX_SEEN)
|
|
10930
11302
|
});
|
|
10931
11303
|
}
|
|
10932
11304
|
forget(projectId) {
|
|
@@ -10985,13 +11357,13 @@ class IssueWatcher {
|
|
|
10985
11357
|
}
|
|
10986
11358
|
const rule = ruleKey(watchRule(settings, p.id));
|
|
10987
11359
|
if (!p.ok || !p.rule || ruleKey(p.rule) !== rule) continue;
|
|
10988
|
-
const
|
|
10989
|
-
if (!
|
|
11360
|
+
const record2 = store.get(p.id);
|
|
11361
|
+
if (!record2 || record2.mode !== mode || record2.rule !== rule) {
|
|
10990
11362
|
store.set(p.id, { mode, rule, seen: p.issues.map((i) => i.url) });
|
|
10991
11363
|
changed = true;
|
|
10992
11364
|
continue;
|
|
10993
11365
|
}
|
|
10994
|
-
const seen = new Set(
|
|
11366
|
+
const seen = new Set(record2.seen);
|
|
10995
11367
|
for (const issue of p.issues) {
|
|
10996
11368
|
if (seen.has(issue.url)) continue;
|
|
10997
11369
|
if (issue.inHand) {
|
|
@@ -11004,7 +11376,7 @@ class IssueWatcher {
|
|
|
11004
11376
|
seen.add(issue.url);
|
|
11005
11377
|
}
|
|
11006
11378
|
}
|
|
11007
|
-
if (seen.size !==
|
|
11379
|
+
if (seen.size !== record2.seen.length) {
|
|
11008
11380
|
store.set(p.id, { mode, rule, seen: [...seen] });
|
|
11009
11381
|
changed = true;
|
|
11010
11382
|
}
|
|
@@ -13110,8 +13482,8 @@ function toolResult(r) {
|
|
|
13110
13482
|
return { ok: true, result: r };
|
|
13111
13483
|
}
|
|
13112
13484
|
function appHtml(r, uri) {
|
|
13113
|
-
const
|
|
13114
|
-
const item =
|
|
13485
|
+
const contents = Array.isArray(r?.contents) ? r.contents.filter(isRecord) : [];
|
|
13486
|
+
const item = contents.find((c) => c.uri === uri) ?? contents[0];
|
|
13115
13487
|
if (!item) return { ok: false, reason: "the server sent no content." };
|
|
13116
13488
|
const mime = String(item.mimeType ?? "").replace(/\s+/g, "").toLowerCase();
|
|
13117
13489
|
if (mime !== APP_MIME) {
|
|
@@ -14623,8 +14995,8 @@ class PassageService {
|
|
|
14623
14995
|
const refsFor = async () => {
|
|
14624
14996
|
if (refs) return refs;
|
|
14625
14997
|
if (!f.prUrl || !this.useGh) return null;
|
|
14626
|
-
const
|
|
14627
|
-
refs =
|
|
14998
|
+
const cached2 = this.refs.status(`refs|${f.prUrl}`)?.result;
|
|
14999
|
+
refs = cached2 && !cached2.problem ? cached2.refs : (await readTaskRefs(f.prUrl, this.deps)).refs;
|
|
14628
15000
|
return refs;
|
|
14629
15001
|
};
|
|
14630
15002
|
const ctx = async (checkId, spec, releaseTag) => ({
|
|
@@ -15903,15 +16275,15 @@ class Gateway {
|
|
|
15903
16275
|
}
|
|
15904
16276
|
const requestId = `${channel}:${e.id}`;
|
|
15905
16277
|
const taskId = e.inReplyTo ? this.deps.record.sentAt(e.inReplyTo)?.taskId ?? null : null;
|
|
15906
|
-
const
|
|
16278
|
+
const valid2 = validateSend(requestId, `${provenance(label(channel))}
|
|
15907
16279
|
${text2}`, taskId);
|
|
15908
|
-
if (!
|
|
15909
|
-
this.log(channel, { event: "refuse", from: e.from, id: e.id, reason:
|
|
15910
|
-
await say(
|
|
16280
|
+
if (!valid2.ok) {
|
|
16281
|
+
this.log(channel, { event: "refuse", from: e.from, id: e.id, reason: valid2.error });
|
|
16282
|
+
await say(valid2.error);
|
|
15911
16283
|
return;
|
|
15912
16284
|
}
|
|
15913
16285
|
if (this.deps.record.note(requestId)) {
|
|
15914
|
-
const r2 = await this.deps.messenger.send(
|
|
16286
|
+
const r2 = await this.deps.messenger.send(valid2.input);
|
|
15915
16287
|
this.log(
|
|
15916
16288
|
channel,
|
|
15917
16289
|
r2.ok ? { event: "accept", from: e.from, id: e.id, requestId, taskId, what: "redelivered" } : { event: "refuse", from: e.from, id: e.id, requestId, reason: r2.error }
|
|
@@ -15941,7 +16313,7 @@ ${text2}`, taskId);
|
|
|
15941
16313
|
replied: null
|
|
15942
16314
|
});
|
|
15943
16315
|
await this.deps.record.save();
|
|
15944
|
-
const r = await this.deps.messenger.send(
|
|
16316
|
+
const r = await this.deps.messenger.send(valid2.input);
|
|
15945
16317
|
if (!r.ok) {
|
|
15946
16318
|
this.log(channel, { event: "refuse", from: e.from, id: e.id, requestId, reason: r.error });
|
|
15947
16319
|
const n = this.deps.record.note(requestId);
|
|
@@ -16173,9 +16545,9 @@ ${text2}`, taskId);
|
|
|
16173
16545
|
* piece; returns where that piece went, or null when it could not be sent.
|
|
16174
16546
|
*/
|
|
16175
16547
|
async post(channel, adapter, to, draft, replyTo = null, what = "notice") {
|
|
16176
|
-
const
|
|
16548
|
+
const record2 = this.deps.record;
|
|
16177
16549
|
const actions = draft.actions.slice(0, adapter.limits.buttons);
|
|
16178
|
-
const tokens = actions.map((a) =>
|
|
16550
|
+
const tokens = actions.map((a) => record2.grant(channel, a.action, BUTTON_TTL_MS));
|
|
16179
16551
|
const buttons = [
|
|
16180
16552
|
...actions.map((a, i) => ({ label: a.label, token: tokens[i], style: a.style })),
|
|
16181
16553
|
...draft.links.map((l) => ({ label: l.label, url: l.url }))
|
|
@@ -16193,13 +16565,13 @@ ${text2}`, taskId);
|
|
|
16193
16565
|
});
|
|
16194
16566
|
}
|
|
16195
16567
|
} catch (e) {
|
|
16196
|
-
|
|
16568
|
+
record2.revoke(tokens);
|
|
16197
16569
|
this.log(channel, { event: "error", what, reason: e.message });
|
|
16198
16570
|
return null;
|
|
16199
16571
|
}
|
|
16200
16572
|
if (!ref) return null;
|
|
16201
|
-
|
|
16202
|
-
|
|
16573
|
+
record2.attach(tokens, ref);
|
|
16574
|
+
record2.addSent({
|
|
16203
16575
|
channel,
|
|
16204
16576
|
ref,
|
|
16205
16577
|
taskId: draft.taskId,
|
|
@@ -16208,7 +16580,7 @@ ${text2}`, taskId);
|
|
|
16208
16580
|
text: tokens.length ? pieces[pieces.length - 1] : "",
|
|
16209
16581
|
links: draft.links.filter((l) => buttons.some((b) => "url" in b && b.url === l.url))
|
|
16210
16582
|
});
|
|
16211
|
-
await
|
|
16583
|
+
await record2.save();
|
|
16212
16584
|
this.log(channel, { event: "send", from: to.id, id: ref.id, taskId: draft.taskId, what });
|
|
16213
16585
|
return ref;
|
|
16214
16586
|
}
|
|
@@ -16756,8 +17128,8 @@ function normalize(entry, sessionId) {
|
|
|
16756
17128
|
async function piSnapshot(opts) {
|
|
16757
17129
|
if (!opts.sessionNonce?.trim()) return null;
|
|
16758
17130
|
try {
|
|
16759
|
-
const
|
|
16760
|
-
const receipt =
|
|
17131
|
+
const receiptText2 = await readBounded(opts.hookFile, RECEIPT_BYTES$1);
|
|
17132
|
+
const receipt = receiptText2 === null ? null : object$2(JSON.parse(receiptText2));
|
|
16761
17133
|
if (!receipt || receipt.wheelhouse_nonce !== opts.sessionNonce || typeof receipt.session_id !== "string" || !receipt.session_id || typeof receipt.transcript_path !== "string" || !path.isAbsolute(receipt.transcript_path) || typeof receipt.cwd !== "string" || !path.isAbsolute(receipt.cwd) || !(receipt.leaf_id === null || typeof receipt.leaf_id === "string"))
|
|
16762
17134
|
return null;
|
|
16763
17135
|
const sessionId = receipt.session_id;
|
|
@@ -16915,19 +17287,19 @@ async function newestFor(o, dir) {
|
|
|
16915
17287
|
}
|
|
16916
17288
|
let best = null;
|
|
16917
17289
|
for (const d of dirs) {
|
|
16918
|
-
const
|
|
17290
|
+
const folder2 = path.join(o.projectsDir, d);
|
|
16919
17291
|
let files;
|
|
16920
17292
|
try {
|
|
16921
|
-
files = (await readdir(
|
|
17293
|
+
files = (await readdir(folder2)).filter((f) => f.endsWith(".jsonl"));
|
|
16922
17294
|
} catch {
|
|
16923
17295
|
continue;
|
|
16924
17296
|
}
|
|
16925
17297
|
let newest2 = null;
|
|
16926
17298
|
for (const f of files) {
|
|
16927
17299
|
try {
|
|
16928
|
-
const s = await stat(path.join(
|
|
17300
|
+
const s = await stat(path.join(folder2, f));
|
|
16929
17301
|
if (!newest2 || s.mtimeMs > newest2.mtime)
|
|
16930
|
-
newest2 = { file: path.join(
|
|
17302
|
+
newest2 = { file: path.join(folder2, f), mtime: s.mtimeMs };
|
|
16931
17303
|
} catch {
|
|
16932
17304
|
}
|
|
16933
17305
|
}
|
|
@@ -17085,9 +17457,9 @@ class ChatFeed {
|
|
|
17085
17457
|
this.source = source;
|
|
17086
17458
|
const records2 = [];
|
|
17087
17459
|
this.calls.clear();
|
|
17088
|
-
for (const
|
|
17089
|
-
this.noteToolCalls(
|
|
17090
|
-
const compact = slim(
|
|
17460
|
+
for (const record2 of snapshot?.records ?? []) {
|
|
17461
|
+
this.noteToolCalls(record2);
|
|
17462
|
+
const compact = slim(record2);
|
|
17091
17463
|
if (compact) records2.push(compact);
|
|
17092
17464
|
}
|
|
17093
17465
|
if (records2.length > MAX_RECORDS) {
|
|
@@ -17164,17 +17536,17 @@ class ChatFeed {
|
|
|
17164
17536
|
lines.pop();
|
|
17165
17537
|
if (startedMidway) lines.shift();
|
|
17166
17538
|
const fresh = [];
|
|
17167
|
-
const seen = new Set(this.records.map((
|
|
17539
|
+
const seen = new Set(this.records.map((record2) => record2.uuid));
|
|
17168
17540
|
for (const line of lines) {
|
|
17169
17541
|
if (!line.trim()) continue;
|
|
17170
17542
|
try {
|
|
17171
17543
|
const raw = JSON.parse(line);
|
|
17172
17544
|
const decoded = this.opts.decode ? this.opts.decode(raw, this.session?.harness ?? "claude") : [raw];
|
|
17173
|
-
for (const
|
|
17174
|
-
if (this.opts.decode && this.session?.harness !== "claude" && seen.has(
|
|
17545
|
+
for (const record2 of decoded) {
|
|
17546
|
+
if (this.opts.decode && this.session?.harness !== "claude" && seen.has(record2.uuid))
|
|
17175
17547
|
continue;
|
|
17176
|
-
this.noteToolCalls(
|
|
17177
|
-
const r = slim(
|
|
17548
|
+
this.noteToolCalls(record2);
|
|
17549
|
+
const r = slim(record2);
|
|
17178
17550
|
if (r) {
|
|
17179
17551
|
fresh.push(r);
|
|
17180
17552
|
seen.add(r.uuid);
|
|
@@ -17714,7 +18086,9 @@ async function interruptOpenCode(conn) {
|
|
|
17714
18086
|
const DEFAULT_HERDR_SESSION = "wheelhouse";
|
|
17715
18087
|
const HERDR_SESSION = /^[A-Za-z0-9][A-Za-z0-9_-]{0,63}$/;
|
|
17716
18088
|
const HERDR_MIN_VERSION = "0.7.4";
|
|
18089
|
+
const HERDR_PANE_START_VERSION = "0.7.5";
|
|
17717
18090
|
const FIRSTMATE_AGENT = "wh-firstmate";
|
|
18091
|
+
const FIRSTMATE_WORKSPACE = "Firstmate";
|
|
17718
18092
|
const RECORD_SCHEMA = "wheelhouse-herdr-session.v1";
|
|
17719
18093
|
const HERDR_TIMEOUT_MS = 1e4;
|
|
17720
18094
|
const SERVER_START_MS = 1e4;
|
|
@@ -17868,11 +18242,17 @@ function paneArgv(shBinary, spec) {
|
|
|
17868
18242
|
const families = PANE_UNSET_PREFIXES.map((p) => `${p}*`).join("|");
|
|
17869
18243
|
const script = [
|
|
17870
18244
|
`unset ${unset.join(" ")}`,
|
|
17871
|
-
`for n in $(env | while IFS== read -r n _; do case "$n" in *[!A-Za-z0-9_]*) ;; ${families}) echo "$n" ;; esac; done); do unset "$n"; done`,
|
|
18245
|
+
`for n in $(env | while IFS== read -r n _; do case "$n" in (*[!A-Za-z0-9_]*) ;; (${families}) echo "$n" ;; esac; done); do unset "$n"; done`,
|
|
17872
18246
|
'exec "$@"'
|
|
17873
18247
|
].join("\n");
|
|
17874
18248
|
return [shBinary, "-c", script, "sh", ...spec.argv];
|
|
17875
18249
|
}
|
|
18250
|
+
function launchScript(shBinary, spec) {
|
|
18251
|
+
return `rm -f "$0"
|
|
18252
|
+
cd -- ${shellLine([spec.cwd])} || exit 1
|
|
18253
|
+
exec ${shellLine(paneArgv(shBinary, spec))}
|
|
18254
|
+
`;
|
|
18255
|
+
}
|
|
17876
18256
|
class HerdrBackend {
|
|
17877
18257
|
label = "herdr";
|
|
17878
18258
|
session;
|
|
@@ -17933,8 +18313,11 @@ class HerdrBackend {
|
|
|
17933
18313
|
if (!status2) {
|
|
17934
18314
|
return `herdr could not report its status: ${r.ok ? "it gave an answer Wheelhouse does not understand" : herdrError(r)}. Wheelhouse needs herdr ${HERDR_MIN_VERSION} or newer.`;
|
|
17935
18315
|
}
|
|
17936
|
-
if (!status2.clientVersion ||
|
|
17937
|
-
return `herdr ${status2.clientVersion
|
|
18316
|
+
if (!status2.clientVersion || !parseHerdrVersion(`herdr ${status2.clientVersion}`)) {
|
|
18317
|
+
return `herdr did not say which version it is (${JSON.stringify(status2.clientVersion)}), so Wheelhouse cannot tell how to start Firstmate in it. Wheelhouse needs herdr ${HERDR_MIN_VERSION} or newer.`;
|
|
18318
|
+
}
|
|
18319
|
+
if (compareVersions(status2.clientVersion, HERDR_MIN_VERSION) < 0) {
|
|
18320
|
+
return `herdr ${status2.clientVersion} is older than Wheelhouse supports. Update herdr to ${HERDR_MIN_VERSION} or newer.`;
|
|
17938
18321
|
}
|
|
17939
18322
|
if (status2.running && status2.compatible !== true) {
|
|
17940
18323
|
return `The herdr server for session "${this.session}" (herdr ${status2.serverVersion ?? "unknown"}, protocol ${String(status2.serverProtocol)}) does not match this herdr (${status2.clientVersion}, protocol ${String(status2.clientProtocol)}). Restart that herdr session yourself; Wheelhouse never restarts it.`;
|
|
@@ -17943,15 +18326,15 @@ class HerdrBackend {
|
|
|
17943
18326
|
}
|
|
17944
18327
|
async readRecord() {
|
|
17945
18328
|
try {
|
|
17946
|
-
const
|
|
17947
|
-
return
|
|
18329
|
+
const record2 = parseRecord(await readFile(this.recordFile, "utf8"));
|
|
18330
|
+
return record2 && record2.session === this.session ? record2 : null;
|
|
17948
18331
|
} catch {
|
|
17949
18332
|
return null;
|
|
17950
18333
|
}
|
|
17951
18334
|
}
|
|
17952
|
-
async writeRecord(
|
|
18335
|
+
async writeRecord(record2) {
|
|
17953
18336
|
const tmp = `${this.recordFile}.${process.pid}.tmp`;
|
|
17954
|
-
await writeFile(tmp, JSON.stringify(
|
|
18337
|
+
await writeFile(tmp, JSON.stringify(record2), { mode: 384 });
|
|
17955
18338
|
await rename(tmp, this.recordFile);
|
|
17956
18339
|
}
|
|
17957
18340
|
/** The pane to type into: the one running() found live, else the recorded one. */
|
|
@@ -17968,9 +18351,9 @@ class HerdrBackend {
|
|
|
17968
18351
|
return null;
|
|
17969
18352
|
}
|
|
17970
18353
|
if (!status2.running) return false;
|
|
17971
|
-
const
|
|
17972
|
-
if (!
|
|
17973
|
-
const r = await this.herdr(["pane", "get",
|
|
18354
|
+
const record2 = await this.readRecord();
|
|
18355
|
+
if (!record2) return false;
|
|
18356
|
+
const r = await this.herdr(["pane", "get", record2.paneId]);
|
|
17974
18357
|
if (!r.ok) {
|
|
17975
18358
|
if (herdrCode(r) === "pane_not_found") return false;
|
|
17976
18359
|
this.lastProblem = `herdr could not report Firstmate's pane: ${herdrError(r)}`;
|
|
@@ -17982,15 +18365,15 @@ class HerdrBackend {
|
|
|
17982
18365
|
this.lastProblem = "herdr gave an answer about Firstmate's pane that Wheelhouse does not understand.";
|
|
17983
18366
|
return null;
|
|
17984
18367
|
}
|
|
17985
|
-
if (terminal !==
|
|
17986
|
-
this.live =
|
|
18368
|
+
if (terminal !== record2.terminalId) return false;
|
|
18369
|
+
this.live = record2;
|
|
17987
18370
|
return true;
|
|
17988
18371
|
}
|
|
17989
|
-
/** Start the session's herdr server when it is not running,
|
|
18372
|
+
/** Start the session's herdr server when it is not running, wait for it to answer, and give its status. */
|
|
17990
18373
|
async serve(cwd) {
|
|
17991
18374
|
let status2 = await this.status();
|
|
17992
18375
|
if (typeof status2 === "string") return status2;
|
|
17993
|
-
if (status2.running) return
|
|
18376
|
+
if (status2.running) return status2;
|
|
17994
18377
|
try {
|
|
17995
18378
|
this.spawnServer(this.find("herdr"), ["server", "--session", this.session], {
|
|
17996
18379
|
cwd,
|
|
@@ -18003,7 +18386,7 @@ class HerdrBackend {
|
|
|
18003
18386
|
await this.sleep(SERVER_POLL_MS);
|
|
18004
18387
|
status2 = await this.status();
|
|
18005
18388
|
if (typeof status2 === "string") return status2;
|
|
18006
|
-
if (status2.running) return
|
|
18389
|
+
if (status2.running) return status2;
|
|
18007
18390
|
}
|
|
18008
18391
|
return `herdr session "${this.session}" did not start within ${SERVER_START_MS / 1e3} seconds.`;
|
|
18009
18392
|
}
|
|
@@ -18011,30 +18394,12 @@ class HerdrBackend {
|
|
|
18011
18394
|
this.live = null;
|
|
18012
18395
|
const sh = this.find("sh");
|
|
18013
18396
|
if (!sh) return { ok: false, error: "herdr could not start Firstmate: `sh` is not on PATH." };
|
|
18014
|
-
const
|
|
18015
|
-
if (
|
|
18016
|
-
const
|
|
18017
|
-
|
|
18018
|
-
|
|
18019
|
-
|
|
18020
|
-
"--cwd",
|
|
18021
|
-
spec.cwd,
|
|
18022
|
-
...Object.entries(spec.env).flatMap(([k, v]) => ["--env", `${k}=${v}`]),
|
|
18023
|
-
"--no-focus",
|
|
18024
|
-
"--",
|
|
18025
|
-
...paneArgv(sh, spec)
|
|
18026
|
-
]);
|
|
18027
|
-
if (!r.ok) return { ok: false, error: `herdr could not start Firstmate: ${herdrError(r)}` };
|
|
18028
|
-
const agent = obj(obj(json(r.stdout)?.result).agent);
|
|
18029
|
-
const paneId = str(agent.pane_id);
|
|
18030
|
-
const terminalId = str(agent.terminal_id);
|
|
18031
|
-
if (!paneId || !terminalId) {
|
|
18032
|
-
return {
|
|
18033
|
-
ok: false,
|
|
18034
|
-
error: `herdr started Firstmate but did not say which pane it is in. Close it in herdr session "${this.session}" before starting again.`
|
|
18035
|
-
};
|
|
18036
|
-
}
|
|
18037
|
-
const record = {
|
|
18397
|
+
const status2 = await this.serve(spec.cwd);
|
|
18398
|
+
if (typeof status2 === "string") return { ok: false, error: status2 };
|
|
18399
|
+
const started = compareVersions(status2.clientVersion, HERDR_PANE_START_VERSION) < 0 ? await this.startAgent(sh, spec) : await this.startInWorkspace(sh, spec);
|
|
18400
|
+
if ("error" in started) return { ok: false, error: started.error };
|
|
18401
|
+
const { paneId, terminalId } = started;
|
|
18402
|
+
const record2 = {
|
|
18038
18403
|
schema: RECORD_SCHEMA,
|
|
18039
18404
|
session: this.session,
|
|
18040
18405
|
paneId,
|
|
@@ -18042,14 +18407,14 @@ class HerdrBackend {
|
|
|
18042
18407
|
env: { ...spec.env }
|
|
18043
18408
|
};
|
|
18044
18409
|
try {
|
|
18045
|
-
await this.writeRecord(
|
|
18410
|
+
await this.writeRecord(record2);
|
|
18046
18411
|
} catch (e) {
|
|
18047
18412
|
return {
|
|
18048
18413
|
ok: false,
|
|
18049
18414
|
error: `herdr started Firstmate in pane ${paneId}, but Wheelhouse could not record it: ${e.message}`
|
|
18050
18415
|
};
|
|
18051
18416
|
}
|
|
18052
|
-
this.live =
|
|
18417
|
+
this.live = record2;
|
|
18053
18418
|
await this.herdr([
|
|
18054
18419
|
"terminal",
|
|
18055
18420
|
"session",
|
|
@@ -18062,6 +18427,75 @@ class HerdrBackend {
|
|
|
18062
18427
|
]);
|
|
18063
18428
|
return { ok: true };
|
|
18064
18429
|
}
|
|
18430
|
+
/** Before HERDR_PANE_START_VERSION: `agent start` opens the pane with its cwd, env and command. */
|
|
18431
|
+
async startAgent(sh, spec) {
|
|
18432
|
+
const r = await this.herdr([
|
|
18433
|
+
"agent",
|
|
18434
|
+
"start",
|
|
18435
|
+
`${FIRSTMATE_AGENT}-${randomBytes(4).toString("hex")}`,
|
|
18436
|
+
"--cwd",
|
|
18437
|
+
spec.cwd,
|
|
18438
|
+
...Object.entries(spec.env).flatMap(([k, v]) => ["--env", `${k}=${v}`]),
|
|
18439
|
+
"--no-focus",
|
|
18440
|
+
"--",
|
|
18441
|
+
...paneArgv(sh, spec)
|
|
18442
|
+
]);
|
|
18443
|
+
if (!r.ok) return { error: `herdr could not start Firstmate: ${herdrError(r)}` };
|
|
18444
|
+
const agent = obj(obj(json(r.stdout)?.result).agent);
|
|
18445
|
+
const paneId = str(agent.pane_id);
|
|
18446
|
+
const terminalId = str(agent.terminal_id);
|
|
18447
|
+
if (!paneId || !terminalId) {
|
|
18448
|
+
return {
|
|
18449
|
+
error: `herdr started Firstmate but did not say which pane it is in. Close it in herdr session "${this.session}" before starting again.`
|
|
18450
|
+
};
|
|
18451
|
+
}
|
|
18452
|
+
return { paneId, terminalId };
|
|
18453
|
+
}
|
|
18454
|
+
/**
|
|
18455
|
+
* From HERDR_PANE_START_VERSION on, `agent start` only starts a known agent
|
|
18456
|
+
* kind in an existing pane, so Firstmate gets a workspace of its own, opened
|
|
18457
|
+
* with its cwd and env, and its shell execs the pane's command (`pane run`),
|
|
18458
|
+
* keeping the terminal herdr reported for the workspace's pane.
|
|
18459
|
+
*/
|
|
18460
|
+
async startInWorkspace(sh, spec) {
|
|
18461
|
+
const launch = `${this.recordFile}.${randomBytes(4).toString("hex")}.sh`;
|
|
18462
|
+
try {
|
|
18463
|
+
await writeFile(launch, launchScript(sh, spec), { mode: 448 });
|
|
18464
|
+
} catch (e) {
|
|
18465
|
+
return { error: `herdr could not start Firstmate: ${e.message}` };
|
|
18466
|
+
}
|
|
18467
|
+
const w = await this.herdr([
|
|
18468
|
+
"workspace",
|
|
18469
|
+
"create",
|
|
18470
|
+
"--cwd",
|
|
18471
|
+
spec.cwd,
|
|
18472
|
+
"--label",
|
|
18473
|
+
FIRSTMATE_WORKSPACE,
|
|
18474
|
+
...Object.entries(spec.env).flatMap(([k, v]) => ["--env", `${k}=${v}`]),
|
|
18475
|
+
"--no-focus"
|
|
18476
|
+
]);
|
|
18477
|
+
if (!w.ok) {
|
|
18478
|
+
await rm(launch, { force: true });
|
|
18479
|
+
return { error: `herdr could not start Firstmate: ${herdrError(w)}` };
|
|
18480
|
+
}
|
|
18481
|
+
const pane = obj(obj(json(w.stdout)?.result).root_pane);
|
|
18482
|
+
const paneId = str(pane.pane_id);
|
|
18483
|
+
const terminalId = str(pane.terminal_id);
|
|
18484
|
+
if (!paneId || !terminalId) {
|
|
18485
|
+
await rm(launch, { force: true });
|
|
18486
|
+
return {
|
|
18487
|
+
error: `herdr opened a workspace for Firstmate but did not say which pane it is in. Close it in herdr session "${this.session}" before starting again.`
|
|
18488
|
+
};
|
|
18489
|
+
}
|
|
18490
|
+
const r = await this.herdr(["pane", "run", paneId, `exec ${shellLine([sh, launch])}`]);
|
|
18491
|
+
if (!r.ok) {
|
|
18492
|
+
await rm(launch, { force: true });
|
|
18493
|
+
return {
|
|
18494
|
+
error: `herdr could not start Firstmate in pane ${paneId}: ${herdrError(r)}. Close that pane in herdr session "${this.session}" before starting again.`
|
|
18495
|
+
};
|
|
18496
|
+
}
|
|
18497
|
+
return { paneId, terminalId };
|
|
18498
|
+
}
|
|
18065
18499
|
async variable(name2) {
|
|
18066
18500
|
return this.live ? this.live.env[name2] ?? "" : null;
|
|
18067
18501
|
}
|
|
@@ -18788,9 +19222,9 @@ async function locateCodexTranscript(opts, state) {
|
|
|
18788
19222
|
const relative = path.relative(root, file);
|
|
18789
19223
|
if (cwd !== receiptCwd || !relative || relative.startsWith("..") || path.isAbsolute(relative))
|
|
18790
19224
|
return null;
|
|
18791
|
-
const
|
|
18792
|
-
const meta = object(
|
|
18793
|
-
if (
|
|
19225
|
+
const record2 = object(await readJson(file, META_BYTES, true));
|
|
19226
|
+
const meta = object(record2?.payload);
|
|
19227
|
+
if (record2?.type !== "session_meta" || !meta || meta.id !== receipt.session_id || meta.originator !== "codex-tui" || meta.source !== "cli" && meta.source !== "vscode" || typeof meta.cwd !== "string" || !path.isAbsolute(meta.cwd) || await realpath(meta.cwd) !== cwd)
|
|
18794
19228
|
return null;
|
|
18795
19229
|
return { how: "hook", file };
|
|
18796
19230
|
} catch {
|
|
@@ -18821,11 +19255,11 @@ function mcpResult(value) {
|
|
|
18821
19255
|
return typeof result2.message === "string" ? result2.message : "";
|
|
18822
19256
|
}
|
|
18823
19257
|
function codexRecords(raw) {
|
|
18824
|
-
const
|
|
18825
|
-
const payload = object(
|
|
18826
|
-
if (
|
|
19258
|
+
const record2 = object(raw);
|
|
19259
|
+
const payload = object(record2?.payload);
|
|
19260
|
+
if (record2?.type !== "event_msg" || !payload || typeof record2.timestamp !== "string" || !Number.isFinite(Date.parse(record2.timestamp)))
|
|
18827
19261
|
return [];
|
|
18828
|
-
const timestamp2 =
|
|
19262
|
+
const timestamp2 = record2.timestamp;
|
|
18829
19263
|
const turnId = typeof payload.turn_id === "string" ? payload.turn_id : null;
|
|
18830
19264
|
if (payload.type === "task_complete" && turnId) {
|
|
18831
19265
|
return [
|
|
@@ -19502,11 +19936,8 @@ async function create(env, opts = {}) {
|
|
|
19502
19936
|
sandbox: (key, csp) => sandbox.url(key, csp),
|
|
19503
19937
|
version
|
|
19504
19938
|
});
|
|
19505
|
-
const skill =
|
|
19506
|
-
|
|
19507
|
-
(surface) => installWheelhouseSkill(install, env, void 0, surface),
|
|
19508
|
-
(line) => console.log(line)
|
|
19509
|
-
);
|
|
19939
|
+
const skill = materialSync(install, env, plugins, (line) => console.log(line));
|
|
19940
|
+
collector.setMaterial(() => skill.view());
|
|
19510
19941
|
await skill.sync();
|
|
19511
19942
|
if (opts.startSession === false) {
|
|
19512
19943
|
console.log("Firstmate: connected by setup; it starts when setup finishes.");
|
|
@@ -19605,9 +20036,9 @@ async function createGateway(install, env, deps) {
|
|
|
19605
20036
|
if (!messenger) return null;
|
|
19606
20037
|
const configDir = defaultConfigDir(env);
|
|
19607
20038
|
const stateDir = defaultStateDir(env);
|
|
19608
|
-
let
|
|
20039
|
+
let record2;
|
|
19609
20040
|
try {
|
|
19610
|
-
|
|
20041
|
+
record2 = await GatewayRecord.open(
|
|
19611
20042
|
path.join(path.dirname(storeFileFor(stateDir, install.homeDir)), "gateway.json")
|
|
19612
20043
|
);
|
|
19613
20044
|
} catch (e) {
|
|
@@ -19617,7 +20048,7 @@ async function createGateway(install, env, deps) {
|
|
|
19617
20048
|
const audits = /* @__PURE__ */ new Map();
|
|
19618
20049
|
const gateway = new Gateway({
|
|
19619
20050
|
settings: new GatewaySettings(gatewayDir(configDir), defaultKeychain()),
|
|
19620
|
-
record,
|
|
20051
|
+
record: record2,
|
|
19621
20052
|
audit: (c) => {
|
|
19622
20053
|
let log = audits.get(c);
|
|
19623
20054
|
if (!log) {
|
|
@@ -19840,7 +20271,8 @@ function unconfiguredHealth(error) {
|
|
|
19840
20271
|
},
|
|
19841
20272
|
ledger: { available: false, reason: null },
|
|
19842
20273
|
messaging: { available: false, reason: error, store: null },
|
|
19843
|
-
passages: { configDir: null, problem: error, checksRunning: 0 }
|
|
20274
|
+
passages: { configDir: null, problem: error, checksRunning: 0 },
|
|
20275
|
+
material: UNSYNCED_MATERIAL
|
|
19844
20276
|
};
|
|
19845
20277
|
}
|
|
19846
20278
|
function unavailableMessages(reason) {
|
|
@@ -20214,5 +20646,5 @@ const runtime = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePrope
|
|
|
20214
20646
|
upgradeRuntime
|
|
20215
20647
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
20216
20648
|
|
|
20217
|
-
export { resolveSessionBackend as $, currentGateway as A, currentPlugins as B, currentPluginPage as C, watchSettingsError as D, changePluginConfig as E, runBounded as F, GATEWAY_CHANNELS as G, which as H, INPUT_MAX_BYTES as I, pluginIconFile as J, pluginUiFile as K, LOOPBACK_HOST as L, MAX_CHAT_CALLS as M, chooseRoleProvider as N, previewProber as O, PROJECT_ID as P, MAX_FILE_BYTES$1 as Q, REQUEST_ID$1 as R, PEEK_DEFAULT_LINES as S, pluginService as T, refusesSetup as U, checkHerdr as V, WATCH_PLUGIN as W, HERDR_MIN_VERSION as X, findFirstmateDir as Y, looksLikeFirstmate as Z, SETUP_SUGGESTIONS as _, sessionToken as a, readSavedBackend as a0, DEFAULT_HERDR_SESSION as a1, writeSavedBackend as a2,
|
|
20218
|
-
//# sourceMappingURL=runtime.js-
|
|
20649
|
+
export { resolveSessionBackend as $, currentGateway as A, currentPlugins as B, currentPluginPage as C, watchSettingsError as D, changePluginConfig as E, runBounded as F, GATEWAY_CHANNELS as G, which as H, INPUT_MAX_BYTES as I, pluginIconFile as J, pluginUiFile as K, LOOPBACK_HOST as L, MAX_CHAT_CALLS as M, chooseRoleProvider as N, previewProber as O, PROJECT_ID as P, MAX_FILE_BYTES$1 as Q, REQUEST_ID$1 as R, PEEK_DEFAULT_LINES as S, pluginService as T, refusesSetup as U, checkHerdr as V, WATCH_PLUGIN as W, HERDR_MIN_VERSION as X, findFirstmateDir as Y, looksLikeFirstmate as Z, SETUP_SUGGESTIONS as _, sessionToken as a, readSavedBackend as a0, DEFAULT_HERDR_SESSION as a1, writeSavedBackend as a2, syncForServer as a3, writeRemembered as a4, reconnectRuntime as a5, setupWorkDir as a6, setupTerminals as a7, checkCompatibility as a8, bundledPluginsDir as a9, currentSlots as aa, GAPS as ab, WORKTREE_GONE as ac, PEEK_MAX_LINES as ad, parseChange as ae, MAX_VALUE_BYTES as af, currentDecisions as ag, readDoc as ah, currentTime as ai, runtime as aj, currentPullRequestTabs as b, currentReviewSurface as c, currentHostedPreviews as d, currentAddressRewrites as e, currentInbox as f, getRuntime as g, currentHeadroom as h, isMutating as i, currentHealth as j, currentFleet as k, currentRailInsights as l, loadSlots as m, currentPreviewPorts as n, currentMessages as o, serverInstance as p, unconfiguredHealth as q, refuseMutation as r, servedOrigin as s, currentFileRoots as t, unconfiguredFleet as u, readAsset as v, unavailableFirstmate as w, parseMateTaskId as x, validateSend as y, isReactionId as z };
|
|
20650
|
+
//# sourceMappingURL=runtime.js-Div6Lnx3.js.map
|