claude-mux 0.30.13 → 0.30.15
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/CLAUDE.md +21 -7
- package/dist/fleet-places.d.ts +7 -1
- package/dist/fleet-places.d.ts.map +1 -1
- package/dist/fleet-places.js +14 -1
- package/dist/fleet-places.js.map +1 -1
- package/dist/server/dictation-marks.d.ts.map +1 -1
- package/dist/server/dictation-marks.js +23 -1
- package/dist/server/dictation-marks.js.map +1 -1
- package/dist/server/message-queue.d.ts +8 -5
- package/dist/server/message-queue.d.ts.map +1 -1
- package/dist/server/message-queue.js +87 -14
- package/dist/server/message-queue.js.map +1 -1
- package/dist/transcript/parser.d.ts +7 -0
- package/dist/transcript/parser.d.ts.map +1 -1
- package/dist/transcript/parser.js +19 -3
- package/dist/transcript/parser.js.map +1 -1
- package/dist/transcript/past-sessions.d.ts.map +1 -1
- package/dist/transcript/past-sessions.js +4 -1
- package/dist/transcript/past-sessions.js.map +1 -1
- package/dist/utils/version.d.ts +1 -1
- package/dist/utils/version.js +1 -1
- package/{web/.svelte-kit/output/client/_app/immutable/chunks/sULMfRFG.js → dist/web/client/_app/immutable/chunks/B1ueI-Jp.js} +2 -2
- package/dist/web/client/_app/immutable/chunks/{sULMfRFG.js.map → B1ueI-Jp.js.map} +1 -1
- package/dist/web/client/_app/immutable/chunks/{CtlIfY1C.js → BFJy9rwt.js} +2 -2
- package/{web/.svelte-kit/output/client/_app/immutable/chunks/CtlIfY1C.js.map → dist/web/client/_app/immutable/chunks/BFJy9rwt.js.map} +1 -1
- package/dist/web/client/_app/immutable/chunks/{Q5yhzux8.js → CHi6-HvE.js} +2 -2
- package/{web/.svelte-kit/output/client/_app/immutable/chunks/Q5yhzux8.js.map → dist/web/client/_app/immutable/chunks/CHi6-HvE.js.map} +1 -1
- package/{web/.svelte-kit/output/client/_app/immutable/chunks/BQzv8cqz.js → dist/web/client/_app/immutable/chunks/CWkKdSpD.js} +2 -2
- package/{web/.svelte-kit/output/client/_app/immutable/chunks/BQzv8cqz.js.map → dist/web/client/_app/immutable/chunks/CWkKdSpD.js.map} +1 -1
- package/dist/web/client/_app/immutable/chunks/{CiU8KBun.js → CvvlvMDB.js} +2 -2
- package/dist/web/client/_app/immutable/chunks/{CiU8KBun.js.map → CvvlvMDB.js.map} +1 -1
- package/dist/web/client/_app/immutable/chunks/{W5_HMZ5E.js → D9xWC-qj.js} +2 -2
- package/dist/web/client/_app/immutable/chunks/{W5_HMZ5E.js.map → D9xWC-qj.js.map} +1 -1
- package/dist/web/client/_app/immutable/chunks/{BQQ3-rqs.js → DJiHHJv3.js} +2 -2
- package/dist/web/client/_app/immutable/chunks/{BQQ3-rqs.js.map → DJiHHJv3.js.map} +1 -1
- package/dist/web/client/_app/immutable/chunks/{VceCNUd7.js → DLDYXkE0.js} +2 -2
- package/{web/.svelte-kit/output/client/_app/immutable/chunks/VceCNUd7.js.map → dist/web/client/_app/immutable/chunks/DLDYXkE0.js.map} +1 -1
- package/dist/web/client/_app/immutable/chunks/{CtjkAirr.js → Dl5QsiDq.js} +9 -9
- package/dist/web/client/_app/immutable/chunks/Dl5QsiDq.js.map +1 -0
- package/dist/web/client/_app/immutable/chunks/{CM0CI9GL.js → DmS4pplA.js} +3 -3
- package/dist/web/client/_app/immutable/chunks/{CM0CI9GL.js.map → DmS4pplA.js.map} +1 -1
- package/dist/web/client/_app/immutable/chunks/{XgSsj0QY.js → DnntjP1o.js} +2 -2
- package/{web/.svelte-kit/output/client/_app/immutable/chunks/XgSsj0QY.js.map → dist/web/client/_app/immutable/chunks/DnntjP1o.js.map} +1 -1
- package/dist/web/client/_app/immutable/chunks/DpTXIw4-.js +4 -0
- package/dist/web/client/_app/immutable/chunks/DpTXIw4-.js.map +1 -0
- package/dist/web/client/_app/immutable/chunks/{DlENCZqZ.js → PiwvGsYU.js} +2 -2
- package/dist/web/client/_app/immutable/chunks/{DlENCZqZ.js.map → PiwvGsYU.js.map} +1 -1
- package/dist/web/client/_app/immutable/chunks/{cvsGFvDx.js → kSW42MxU.js} +2 -2
- package/{web/.svelte-kit/output/client/_app/immutable/chunks/cvsGFvDx.js.map → dist/web/client/_app/immutable/chunks/kSW42MxU.js.map} +1 -1
- package/dist/web/client/_app/immutable/chunks/{BvX4FYxp.js → z2QK0SL-.js} +2 -2
- package/dist/web/client/_app/immutable/chunks/{BvX4FYxp.js.map → z2QK0SL-.js.map} +1 -1
- package/dist/web/client/_app/immutable/entry/{app.BwTbN8wB.js → app.DYWHzSFA.js} +3 -3
- package/{web/.svelte-kit/output/client/_app/immutable/entry/app.BwTbN8wB.js.map → dist/web/client/_app/immutable/entry/app.DYWHzSFA.js.map} +1 -1
- package/dist/web/client/_app/immutable/entry/start.oS6XCDT9.js +2 -0
- package/dist/web/client/_app/immutable/entry/start.oS6XCDT9.js.map +1 -0
- package/{web/.svelte-kit/output/client/_app/immutable/nodes/0.BnHV-ElR.js → dist/web/client/_app/immutable/nodes/0.Czwb44Pq.js} +2 -2
- package/{web/.svelte-kit/output/client/_app/immutable/nodes/0.BnHV-ElR.js.map → dist/web/client/_app/immutable/nodes/0.Czwb44Pq.js.map} +1 -1
- package/dist/web/client/_app/immutable/nodes/{1.Dc3ryOCf.js → 1.DfBNXGyJ.js} +2 -2
- package/dist/web/client/_app/immutable/nodes/{1.Dc3ryOCf.js.map → 1.DfBNXGyJ.js.map} +1 -1
- package/dist/web/client/_app/immutable/nodes/{2.DUrpAceY.js → 2.Clm1SlwT.js} +2 -2
- package/dist/web/client/_app/immutable/nodes/{2.DUrpAceY.js.map → 2.Clm1SlwT.js.map} +1 -1
- package/dist/web/client/_app/immutable/nodes/{3.BaCofjAn.js → 3.MNg0k2ol.js} +2 -2
- package/dist/web/client/_app/immutable/nodes/{3.BaCofjAn.js.map → 3.MNg0k2ol.js.map} +1 -1
- package/dist/web/client/_app/immutable/nodes/{4.v1wYkrvS.js → 4.DDSYHXWy.js} +2 -2
- package/dist/web/client/_app/immutable/nodes/{4.v1wYkrvS.js.map → 4.DDSYHXWy.js.map} +1 -1
- package/dist/web/client/_app/immutable/nodes/{5.Bn4A77jK.js → 5.CDTzRbAK.js} +2 -2
- package/dist/web/client/_app/immutable/nodes/{5.Bn4A77jK.js.map → 5.CDTzRbAK.js.map} +1 -1
- package/dist/web/client/_app/immutable/nodes/{6.C2hEoITj.js → 6.CLPKF1xx.js} +2 -2
- package/dist/web/client/_app/immutable/nodes/{6.C2hEoITj.js.map → 6.CLPKF1xx.js.map} +1 -1
- package/dist/web/client/_app/immutable/nodes/{7.BcHOjWdp.js → 7.DLF_GZUp.js} +2 -2
- package/dist/web/client/_app/immutable/nodes/{7.BcHOjWdp.js.map → 7.DLF_GZUp.js.map} +1 -1
- package/dist/web/client/_app/immutable/nodes/{8.D7NtqIYy.js → 8.OBQBHtO9.js} +2 -2
- package/dist/web/client/_app/immutable/nodes/{8.D7NtqIYy.js.map → 8.OBQBHtO9.js.map} +1 -1
- package/dist/web/client/_app/immutable/nodes/{9.D-211z9-.js → 9.Bd3JJwvV.js} +2 -2
- package/dist/web/client/_app/immutable/nodes/{9.D-211z9-.js.map → 9.Bd3JJwvV.js.map} +1 -1
- package/dist/web/client/_app/version.json +1 -1
- package/dist/web/server/chunks/{0-CvglVGCY.js → 0-BmH6IGke.js} +14 -14
- package/dist/web/server/chunks/{0-CvglVGCY.js.map → 0-BmH6IGke.js.map} +1 -1
- package/dist/web/server/chunks/{1-D-gJDFrG.js → 1-CjJBxrXF.js} +4 -4
- package/dist/web/server/chunks/{1-D-gJDFrG.js.map → 1-CjJBxrXF.js.map} +1 -1
- package/dist/web/server/chunks/{2-BCmEU5Qq.js → 2-Cn-SpZE3.js} +13 -13
- package/dist/web/server/chunks/{2-BCmEU5Qq.js.map → 2-Cn-SpZE3.js.map} +1 -1
- package/dist/web/server/chunks/{3-CHn5Kw-T.js → 3-DRRc_1dm.js} +10 -10
- package/dist/web/server/chunks/{3-CHn5Kw-T.js.map → 3-DRRc_1dm.js.map} +1 -1
- package/dist/web/server/chunks/{4-Cxg7VcZ7.js → 4-CxxQapQm.js} +12 -12
- package/dist/web/server/chunks/{4-Cxg7VcZ7.js.map → 4-CxxQapQm.js.map} +1 -1
- package/dist/web/server/chunks/{5-DSgvnHF_.js → 5-DD-Hn8d7.js} +9 -9
- package/dist/web/server/chunks/{5-DSgvnHF_.js.map → 5-DD-Hn8d7.js.map} +1 -1
- package/dist/web/server/chunks/{6-B0rymWRR.js → 6-DKEaLqzQ.js} +5 -5
- package/dist/web/server/chunks/{6-B0rymWRR.js.map → 6-DKEaLqzQ.js.map} +1 -1
- package/dist/web/server/chunks/{7-CNomBJux.js → 7-DNbW_v2X.js} +10 -10
- package/dist/web/server/chunks/{7-CNomBJux.js.map → 7-DNbW_v2X.js.map} +1 -1
- package/dist/web/server/chunks/{8-TYbX-1bO.js → 8-BPETDVql.js} +12 -12
- package/dist/web/server/chunks/{8-TYbX-1bO.js.map → 8-BPETDVql.js.map} +1 -1
- package/dist/web/server/chunks/{9-XGQQvTLc.js → 9-kQH8GgXO.js} +9 -9
- package/dist/web/server/chunks/{9-XGQQvTLc.js.map → 9-kQH8GgXO.js.map} +1 -1
- package/dist/web/server/chunks/{_layout.svelte-yrPX5VFm.js → _layout.svelte-DeHDxJGt.js} +58 -37
- package/dist/web/server/chunks/_layout.svelte-DeHDxJGt.js.map +1 -0
- package/dist/web/server/chunks/{_page.svelte-C_kFA0Lq.js → _page.svelte-DntYC0f2.js} +4 -4
- package/dist/web/server/chunks/{_page.svelte-C_kFA0Lq.js.map → _page.svelte-DntYC0f2.js.map} +1 -1
- package/dist/web/server/chunks/{_page.svelte-DvxpwsgS.js → _page.svelte-DpMY4uTa.js} +6 -6
- package/dist/web/server/chunks/{_page.svelte-DvxpwsgS.js.map → _page.svelte-DpMY4uTa.js.map} +1 -1
- package/dist/web/server/chunks/{_server.ts-KbQyErIR.js → _server.ts--U_0S12v.js} +2 -2
- package/dist/web/server/chunks/{_server.ts-KbQyErIR.js.map → _server.ts--U_0S12v.js.map} +1 -1
- package/dist/web/server/chunks/{_server.ts-Dz01Gvhk.js → _server.ts-0RT4n9LX.js} +2 -2
- package/dist/web/server/chunks/{_server.ts-Dz01Gvhk.js.map → _server.ts-0RT4n9LX.js.map} +1 -1
- package/dist/web/server/chunks/{_server.ts-TN_Ka6cR.js → _server.ts-4m17ESHV.js} +2 -2
- package/dist/web/server/chunks/{_server.ts-TN_Ka6cR.js.map → _server.ts-4m17ESHV.js.map} +1 -1
- package/dist/web/server/chunks/{_server.ts-Bj1Eewby.js → _server.ts-8Bs2jUgD.js} +2 -2
- package/dist/web/server/chunks/{_server.ts-Bj1Eewby.js.map → _server.ts-8Bs2jUgD.js.map} +1 -1
- package/dist/web/server/chunks/{_server.ts-9iRpDv9e.js → _server.ts-B9dTG4Gs.js} +2 -2
- package/dist/web/server/chunks/{_server.ts-9iRpDv9e.js.map → _server.ts-B9dTG4Gs.js.map} +1 -1
- package/dist/web/server/chunks/{_server.ts-CNBy2p2U.js → _server.ts-BBeDdZMo.js} +2 -2
- package/dist/web/server/chunks/{_server.ts-CNBy2p2U.js.map → _server.ts-BBeDdZMo.js.map} +1 -1
- package/dist/web/server/chunks/{_server.ts-AAllMdwT.js → _server.ts-BOIIbvcd.js} +2 -2
- package/dist/web/server/chunks/{_server.ts-AAllMdwT.js.map → _server.ts-BOIIbvcd.js.map} +1 -1
- package/dist/web/server/chunks/{_server.ts-CyOA1rOq.js → _server.ts-BQNv3Qn9.js} +3 -3
- package/dist/web/server/chunks/{_server.ts-CyOA1rOq.js.map → _server.ts-BQNv3Qn9.js.map} +1 -1
- package/dist/web/server/chunks/{_server.ts-FoPsfjo3.js → _server.ts-BYyaN7ik.js} +2 -2
- package/dist/web/server/chunks/{_server.ts-FoPsfjo3.js.map → _server.ts-BYyaN7ik.js.map} +1 -1
- package/dist/web/server/chunks/{_server.ts-DVgdt6Zu.js → _server.ts-C0jQSpvq.js} +3 -3
- package/dist/web/server/chunks/{_server.ts-DVgdt6Zu.js.map → _server.ts-C0jQSpvq.js.map} +1 -1
- package/dist/web/server/chunks/{_server.ts-CSK1ReRS.js → _server.ts-CBU5vhD8.js} +2 -2
- package/dist/web/server/chunks/{_server.ts-CSK1ReRS.js.map → _server.ts-CBU5vhD8.js.map} +1 -1
- package/dist/web/server/chunks/{_server.ts-ji7L8HUR.js → _server.ts-CKlhUlhI.js} +3 -3
- package/dist/web/server/chunks/{_server.ts-ji7L8HUR.js.map → _server.ts-CKlhUlhI.js.map} +1 -1
- package/dist/web/server/chunks/{_server.ts-DPctaiWC.js → _server.ts-COCrEIiW.js} +2 -2
- package/dist/web/server/chunks/{_server.ts-DPctaiWC.js.map → _server.ts-COCrEIiW.js.map} +1 -1
- package/dist/web/server/chunks/{_server.ts-C7uhdF7Y.js → _server.ts-CPCsEz_B.js} +4 -4
- package/dist/web/server/chunks/{_server.ts-C7uhdF7Y.js.map → _server.ts-CPCsEz_B.js.map} +1 -1
- package/dist/web/server/chunks/{_server.ts-DsyqZudf.js → _server.ts-CPGa_LDW.js} +2 -2
- package/dist/web/server/chunks/{_server.ts-DsyqZudf.js.map → _server.ts-CPGa_LDW.js.map} +1 -1
- package/dist/web/server/chunks/{_server.ts-DrFiP32b.js → _server.ts-CPrFFsh-.js} +3 -3
- package/dist/web/server/chunks/{_server.ts-DrFiP32b.js.map → _server.ts-CPrFFsh-.js.map} +1 -1
- package/dist/web/server/chunks/{_server.ts-Cv8SUkC5.js → _server.ts-CQywkS_H.js} +3 -3
- package/dist/web/server/chunks/{_server.ts-Cv8SUkC5.js.map → _server.ts-CQywkS_H.js.map} +1 -1
- package/dist/web/server/chunks/{_server.ts-B9RfKfyc.js → _server.ts-CSbdJ5iI.js} +2 -2
- package/dist/web/server/chunks/{_server.ts-B9RfKfyc.js.map → _server.ts-CSbdJ5iI.js.map} +1 -1
- package/dist/web/server/chunks/{_server.ts-CwFbAWCg.js → _server.ts-CXzAFIps.js} +2 -2
- package/dist/web/server/chunks/{_server.ts-CwFbAWCg.js.map → _server.ts-CXzAFIps.js.map} +1 -1
- package/dist/web/server/chunks/{_server.ts-DHuyjZQx.js → _server.ts-C_H2gKKu.js} +2 -2
- package/dist/web/server/chunks/{_server.ts-DHuyjZQx.js.map → _server.ts-C_H2gKKu.js.map} +1 -1
- package/dist/web/server/chunks/{_server.ts-DozhhYwq.js → _server.ts-CbS7DnV7.js} +3 -3
- package/dist/web/server/chunks/{_server.ts-DozhhYwq.js.map → _server.ts-CbS7DnV7.js.map} +1 -1
- package/dist/web/server/chunks/{_server.ts-DK-6ddNq.js → _server.ts-CfIP7qf6.js} +3 -3
- package/dist/web/server/chunks/{_server.ts-DK-6ddNq.js.map → _server.ts-CfIP7qf6.js.map} +1 -1
- package/dist/web/server/chunks/{_server.ts-BWVtnpJh.js → _server.ts-Crdideoe.js} +3 -3
- package/dist/web/server/chunks/{_server.ts-BWVtnpJh.js.map → _server.ts-Crdideoe.js.map} +1 -1
- package/dist/web/server/chunks/{_server.ts-CA8nszPb.js → _server.ts-D5FI04La.js} +3 -3
- package/dist/web/server/chunks/{_server.ts-CA8nszPb.js.map → _server.ts-D5FI04La.js.map} +1 -1
- package/dist/web/server/chunks/{_server.ts-78nODRDJ.js → _server.ts-DAjvFQRk.js} +2 -2
- package/dist/web/server/chunks/{_server.ts-78nODRDJ.js.map → _server.ts-DAjvFQRk.js.map} +1 -1
- package/dist/web/server/chunks/{_server.ts-vhti5VvF.js → _server.ts-DGvNQ4Mq.js} +3 -3
- package/dist/web/server/chunks/{_server.ts-vhti5VvF.js.map → _server.ts-DGvNQ4Mq.js.map} +1 -1
- package/dist/web/server/chunks/{_server.ts-BozsVs8t.js → _server.ts-DUlnfVa3.js} +2 -2
- package/dist/web/server/chunks/{_server.ts-BozsVs8t.js.map → _server.ts-DUlnfVa3.js.map} +1 -1
- package/dist/web/server/chunks/{_server.ts-CA1j9wWk.js → _server.ts-DZrVaelC.js} +2 -2
- package/dist/web/server/chunks/{_server.ts-CA1j9wWk.js.map → _server.ts-DZrVaelC.js.map} +1 -1
- package/dist/web/server/chunks/{_server.ts-CovkmnvY.js → _server.ts-DZyOwdre.js} +3 -3
- package/dist/web/server/chunks/{_server.ts-CovkmnvY.js.map → _server.ts-DZyOwdre.js.map} +1 -1
- package/dist/web/server/chunks/{_server.ts-DQJ-tygD.js → _server.ts-DfzLASfY.js} +2 -2
- package/dist/web/server/chunks/{_server.ts-DQJ-tygD.js.map → _server.ts-DfzLASfY.js.map} +1 -1
- package/dist/web/server/chunks/{_server.ts-D2Tvcncu.js → _server.ts-Ds8fP3ak.js} +3 -3
- package/dist/web/server/chunks/{_server.ts-D2Tvcncu.js.map → _server.ts-Ds8fP3ak.js.map} +1 -1
- package/dist/web/server/chunks/{_server.ts-CgChlIKq.js → _server.ts-DxGjRezI.js} +2 -2
- package/dist/web/server/chunks/{_server.ts-CgChlIKq.js.map → _server.ts-DxGjRezI.js.map} +1 -1
- package/dist/web/server/chunks/{_server.ts-1ZhqL5o8.js → _server.ts-P-GtOUhW.js} +2 -2
- package/dist/web/server/chunks/{_server.ts-1ZhqL5o8.js.map → _server.ts-P-GtOUhW.js.map} +1 -1
- package/dist/web/server/chunks/{_server.ts-iK8ih9Bi.js → _server.ts-PQZACnJh.js} +2 -2
- package/dist/web/server/chunks/{_server.ts-iK8ih9Bi.js.map → _server.ts-PQZACnJh.js.map} +1 -1
- package/dist/web/server/chunks/{_server.ts-VgbTPrqV.js → _server.ts-WtstJm2K.js} +2 -2
- package/dist/web/server/chunks/{_server.ts-VgbTPrqV.js.map → _server.ts-WtstJm2K.js.map} +1 -1
- package/dist/web/server/chunks/{_server.ts-DGTSZoLn.js → _server.ts-dvT2bXEB.js} +2 -2
- package/dist/web/server/chunks/{_server.ts-DGTSZoLn.js.map → _server.ts-dvT2bXEB.js.map} +1 -1
- package/dist/web/server/chunks/{_server.ts-BxscGs8D.js → _server.ts-m835uDm6.js} +2 -2
- package/dist/web/server/chunks/{_server.ts-BxscGs8D.js.map → _server.ts-m835uDm6.js.map} +1 -1
- package/dist/web/server/chunks/{_server.ts-CzcknkWq.js → _server.ts-wsNKi_0h.js} +2 -2
- package/dist/web/server/chunks/{_server.ts-CzcknkWq.js.map → _server.ts-wsNKi_0h.js.map} +1 -1
- package/dist/web/server/chunks/{checkbox-DiJTAtHi.js → checkbox-Gt0K_cvq.js} +2 -2
- package/dist/web/server/chunks/{checkbox-DiJTAtHi.js.map → checkbox-Gt0K_cvq.js.map} +1 -1
- package/dist/web/server/chunks/{create-id-DpoSQWrl.js → create-id-CwRBEuSe.js} +3 -3
- package/dist/web/server/chunks/{create-id-DpoSQWrl.js.map → create-id-CwRBEuSe.js.map} +1 -1
- package/dist/web/server/chunks/{discover-DjR28OqK.js → discover-DykzHz0t.js} +2 -2
- package/dist/web/server/chunks/{discover-DjR28OqK.js.map → discover-DykzHz0t.js.map} +1 -1
- package/dist/web/server/chunks/{drafts.svelte-DsFAtH-s.js → drafts.svelte-Bs3uu0o9.js} +3 -3
- package/dist/web/server/chunks/{drafts.svelte-DsFAtH-s.js.map → drafts.svelte-Bs3uu0o9.js.map} +1 -1
- package/dist/web/server/chunks/{end-session-BbBa9yD0.js → end-session-ChFkyGma.js} +2 -2
- package/dist/web/server/chunks/{end-session-BbBa9yD0.js.map → end-session-ChFkyGma.js.map} +1 -1
- package/dist/web/server/chunks/{files-4i3igWea.js → files-DNH191y7.js} +2 -2
- package/dist/web/server/chunks/{files-4i3igWea.js.map → files-DNH191y7.js.map} +1 -1
- package/dist/web/server/chunks/{fleet-DZJSFWuH.js → fleet-OhxUuYh1.js} +4 -4
- package/dist/web/server/chunks/{fleet-DZJSFWuH.js.map → fleet-OhxUuYh1.js.map} +1 -1
- package/dist/web/server/chunks/{git-D9dLEKUF.js → git-CHO9UIOQ.js} +13 -5
- package/dist/web/server/chunks/git-CHO9UIOQ.js.map +1 -0
- package/dist/web/server/chunks/{git-history-De9t0yF-.js → git-history-CxyH4jQb.js} +2 -2
- package/dist/web/server/chunks/{git-history-De9t0yF-.js.map → git-history-CxyH4jQb.js.map} +1 -1
- package/dist/web/server/chunks/{hooks.server-C3Uglne7.js → hooks.server-CBWcxR_B.js} +6 -6
- package/dist/web/server/chunks/{hooks.server-C3Uglne7.js.map → hooks.server-CBWcxR_B.js.map} +1 -1
- package/dist/web/server/chunks/{message-queue-sFcJCRjz.js → message-queue-DcPUlVz5.js} +69 -15
- package/dist/web/server/chunks/message-queue-DcPUlVz5.js.map +1 -0
- package/dist/web/server/chunks/{project-CbPa8Mu7.js → project-CBPdIh2n.js} +2 -2
- package/dist/web/server/chunks/{project-CbPa8Mu7.js.map → project-CBPdIh2n.js.map} +1 -1
- package/dist/web/server/chunks/{project-icons-CSb1bfT9.js → project-icons-bWhaFSVy.js} +4 -4
- package/dist/web/server/chunks/{project-icons-CSb1bfT9.js.map → project-icons-bWhaFSVy.js.map} +1 -1
- package/dist/web/server/chunks/{push-BJ7P9DGd.js → push-B1bEhIC-.js} +5 -5
- package/dist/web/server/chunks/{push-BJ7P9DGd.js.map → push-B1bEhIC-.js.map} +1 -1
- package/dist/web/server/chunks/{remote-control-C1d9R3w4.js → remote-control-qMrIrQCU.js} +2 -2
- package/dist/web/server/chunks/{remote-control-C1d9R3w4.js.map → remote-control-qMrIrQCU.js.map} +1 -1
- package/dist/web/server/chunks/{start-session-CKbupnLS.js → start-session-C9loHv64.js} +3 -3
- package/dist/web/server/chunks/{start-session-CKbupnLS.js.map → start-session-C9loHv64.js.map} +1 -1
- package/dist/web/server/chunks/{version-BqEJmw2g.js → version-Dfokr2tc.js} +2 -2
- package/dist/web/server/chunks/version-Dfokr2tc.js.map +1 -0
- package/dist/web/server/chunks/{web-preview-Bi5fjydK.js → web-preview-H5eiWlBD.js} +2 -2
- package/dist/web/server/chunks/{web-preview-Bi5fjydK.js.map → web-preview-H5eiWlBD.js.map} +1 -1
- package/dist/web/server/chunks/{ws-handlers-zemeJ8Si.js → ws-handlers-D8kw9RG2.js} +6 -5
- package/dist/web/server/chunks/ws-handlers-D8kw9RG2.js.map +1 -0
- package/dist/web/server/chunks/{ws-managers-C5VXKb_r.js → ws-managers-CsT346dr.js} +2 -2
- package/dist/web/server/chunks/{ws-managers-C5VXKb_r.js.map → ws-managers-CsT346dr.js.map} +1 -1
- package/dist/web/server/chunks/{ws-messages-jOSwT1Yq.js → ws-messages-B81v2RXg.js} +7 -2
- package/dist/web/server/chunks/ws-messages-B81v2RXg.js.map +1 -0
- package/dist/web/server/index.js +2 -2
- package/dist/web/server/index.js.map +1 -1
- package/dist/web/server/manifest.js +53 -53
- package/dist/web/server/manifest.js.map +1 -1
- package/package.json +1 -1
- package/src/fleet-places.ts +17 -1
- package/src/server/dictation-marks.ts +24 -1
- package/src/server/message-queue.ts +79 -13
- package/src/transcript/parser.ts +20 -3
- package/src/transcript/past-sessions.ts +3 -1
- package/src/utils/version.ts +1 -1
- package/tests/fleet-places.test.ts +20 -0
- package/tests/server/dictation-marks.test.ts +16 -0
- package/tests/server/steer.test.ts +14 -1
- package/tests/transcript/parser.test.ts +34 -0
- package/tests/transcript/past-sessions.test.ts +5 -0
- package/web/.svelte-kit/adapter-bun/.vite/manifest.json +2 -1
- package/web/.svelte-kit/adapter-bun/chunks/git.js +13 -4
- package/web/.svelte-kit/adapter-bun/chunks/git.js.map +1 -1
- package/web/.svelte-kit/adapter-bun/chunks/internal2.js +1 -1
- package/web/.svelte-kit/adapter-bun/chunks/internal2.js.map +1 -1
- package/web/.svelte-kit/adapter-bun/chunks/message-queue.js +73 -9
- package/web/.svelte-kit/adapter-bun/chunks/message-queue.js.map +1 -1
- package/web/.svelte-kit/adapter-bun/chunks/version.js +1 -1
- package/web/.svelte-kit/adapter-bun/chunks/version.js.map +1 -1
- package/web/.svelte-kit/adapter-bun/chunks/ws-handlers.js +2 -1
- package/web/.svelte-kit/adapter-bun/chunks/ws-handlers.js.map +1 -1
- package/web/.svelte-kit/adapter-bun/chunks/ws-messages.js +6 -1
- package/web/.svelte-kit/adapter-bun/chunks/ws-messages.js.map +1 -1
- package/web/.svelte-kit/adapter-bun/entries/pages/_layout.svelte.js +72 -45
- package/web/.svelte-kit/adapter-bun/entries/pages/_layout.svelte.js.map +1 -1
- package/web/.svelte-kit/adapter-bun/manifest-full.js +1 -1
- package/web/.svelte-kit/adapter-bun/manifest.js +1 -1
- package/web/.svelte-kit/adapter-bun/nodes/0.js +1 -1
- package/web/.svelte-kit/adapter-bun/nodes/1.js +1 -1
- package/web/.svelte-kit/adapter-bun/nodes/2.js +1 -1
- package/web/.svelte-kit/adapter-bun/nodes/3.js +1 -1
- package/web/.svelte-kit/adapter-bun/nodes/4.js +1 -1
- package/web/.svelte-kit/adapter-bun/nodes/5.js +1 -1
- package/web/.svelte-kit/adapter-bun/nodes/6.js +1 -1
- package/web/.svelte-kit/adapter-bun/nodes/7.js +1 -1
- package/web/.svelte-kit/adapter-bun/nodes/8.js +1 -1
- package/web/.svelte-kit/adapter-bun/nodes/9.js +1 -1
- package/web/.svelte-kit/generated/server/internal.js +1 -1
- package/web/.svelte-kit/output/client/.vite/manifest.json +208 -208
- package/{dist/web/client/_app/immutable/chunks/sULMfRFG.js → web/.svelte-kit/output/client/_app/immutable/chunks/B1ueI-Jp.js} +2 -2
- package/web/.svelte-kit/output/client/_app/immutable/chunks/{sULMfRFG.js.map → B1ueI-Jp.js.map} +1 -1
- package/web/.svelte-kit/output/client/_app/immutable/chunks/{CtlIfY1C.js → BFJy9rwt.js} +2 -2
- package/{dist/web/client/_app/immutable/chunks/CtlIfY1C.js.map → web/.svelte-kit/output/client/_app/immutable/chunks/BFJy9rwt.js.map} +1 -1
- package/web/.svelte-kit/output/client/_app/immutable/chunks/{Q5yhzux8.js → CHi6-HvE.js} +2 -2
- package/{dist/web/client/_app/immutable/chunks/Q5yhzux8.js.map → web/.svelte-kit/output/client/_app/immutable/chunks/CHi6-HvE.js.map} +1 -1
- package/{dist/web/client/_app/immutable/chunks/BQzv8cqz.js → web/.svelte-kit/output/client/_app/immutable/chunks/CWkKdSpD.js} +2 -2
- package/{dist/web/client/_app/immutable/chunks/BQzv8cqz.js.map → web/.svelte-kit/output/client/_app/immutable/chunks/CWkKdSpD.js.map} +1 -1
- package/web/.svelte-kit/output/client/_app/immutable/chunks/{CiU8KBun.js → CvvlvMDB.js} +2 -2
- package/web/.svelte-kit/output/client/_app/immutable/chunks/{CiU8KBun.js.map → CvvlvMDB.js.map} +1 -1
- package/web/.svelte-kit/output/client/_app/immutable/chunks/{W5_HMZ5E.js → D9xWC-qj.js} +2 -2
- package/web/.svelte-kit/output/client/_app/immutable/chunks/{W5_HMZ5E.js.map → D9xWC-qj.js.map} +1 -1
- package/web/.svelte-kit/output/client/_app/immutable/chunks/{BQQ3-rqs.js → DJiHHJv3.js} +2 -2
- package/web/.svelte-kit/output/client/_app/immutable/chunks/{BQQ3-rqs.js.map → DJiHHJv3.js.map} +1 -1
- package/web/.svelte-kit/output/client/_app/immutable/chunks/{VceCNUd7.js → DLDYXkE0.js} +2 -2
- package/{dist/web/client/_app/immutable/chunks/VceCNUd7.js.map → web/.svelte-kit/output/client/_app/immutable/chunks/DLDYXkE0.js.map} +1 -1
- package/web/.svelte-kit/output/client/_app/immutable/chunks/{CtjkAirr.js → Dl5QsiDq.js} +9 -9
- package/web/.svelte-kit/output/client/_app/immutable/chunks/Dl5QsiDq.js.map +1 -0
- package/web/.svelte-kit/output/client/_app/immutable/chunks/{CM0CI9GL.js → DmS4pplA.js} +3 -3
- package/web/.svelte-kit/output/client/_app/immutable/chunks/{CM0CI9GL.js.map → DmS4pplA.js.map} +1 -1
- package/web/.svelte-kit/output/client/_app/immutable/chunks/{XgSsj0QY.js → DnntjP1o.js} +2 -2
- package/{dist/web/client/_app/immutable/chunks/XgSsj0QY.js.map → web/.svelte-kit/output/client/_app/immutable/chunks/DnntjP1o.js.map} +1 -1
- package/web/.svelte-kit/output/client/_app/immutable/chunks/DpTXIw4-.js +4 -0
- package/web/.svelte-kit/output/client/_app/immutable/chunks/DpTXIw4-.js.map +1 -0
- package/web/.svelte-kit/output/client/_app/immutable/chunks/{DlENCZqZ.js → PiwvGsYU.js} +2 -2
- package/web/.svelte-kit/output/client/_app/immutable/chunks/{DlENCZqZ.js.map → PiwvGsYU.js.map} +1 -1
- package/web/.svelte-kit/output/client/_app/immutable/chunks/{cvsGFvDx.js → kSW42MxU.js} +2 -2
- package/{dist/web/client/_app/immutable/chunks/cvsGFvDx.js.map → web/.svelte-kit/output/client/_app/immutable/chunks/kSW42MxU.js.map} +1 -1
- package/web/.svelte-kit/output/client/_app/immutable/chunks/{BvX4FYxp.js → z2QK0SL-.js} +2 -2
- package/web/.svelte-kit/output/client/_app/immutable/chunks/{BvX4FYxp.js.map → z2QK0SL-.js.map} +1 -1
- package/web/.svelte-kit/output/client/_app/immutable/entry/{app.BwTbN8wB.js → app.DYWHzSFA.js} +3 -3
- package/{dist/web/client/_app/immutable/entry/app.BwTbN8wB.js.map → web/.svelte-kit/output/client/_app/immutable/entry/app.DYWHzSFA.js.map} +1 -1
- package/web/.svelte-kit/output/client/_app/immutable/entry/start.oS6XCDT9.js +2 -0
- package/web/.svelte-kit/output/client/_app/immutable/entry/start.oS6XCDT9.js.map +1 -0
- package/{dist/web/client/_app/immutable/nodes/0.BnHV-ElR.js → web/.svelte-kit/output/client/_app/immutable/nodes/0.Czwb44Pq.js} +2 -2
- package/{dist/web/client/_app/immutable/nodes/0.BnHV-ElR.js.map → web/.svelte-kit/output/client/_app/immutable/nodes/0.Czwb44Pq.js.map} +1 -1
- package/web/.svelte-kit/output/client/_app/immutable/nodes/{1.Dc3ryOCf.js → 1.DfBNXGyJ.js} +2 -2
- package/web/.svelte-kit/output/client/_app/immutable/nodes/{1.Dc3ryOCf.js.map → 1.DfBNXGyJ.js.map} +1 -1
- package/web/.svelte-kit/output/client/_app/immutable/nodes/{2.DUrpAceY.js → 2.Clm1SlwT.js} +2 -2
- package/web/.svelte-kit/output/client/_app/immutable/nodes/{2.DUrpAceY.js.map → 2.Clm1SlwT.js.map} +1 -1
- package/web/.svelte-kit/output/client/_app/immutable/nodes/{3.BaCofjAn.js → 3.MNg0k2ol.js} +2 -2
- package/web/.svelte-kit/output/client/_app/immutable/nodes/{3.BaCofjAn.js.map → 3.MNg0k2ol.js.map} +1 -1
- package/web/.svelte-kit/output/client/_app/immutable/nodes/4.DDSYHXWy.js +2 -0
- package/web/.svelte-kit/output/client/_app/immutable/nodes/{4.v1wYkrvS.js.map → 4.DDSYHXWy.js.map} +1 -1
- package/web/.svelte-kit/output/client/_app/immutable/nodes/5.CDTzRbAK.js +2 -0
- package/web/.svelte-kit/output/client/_app/immutable/nodes/{5.Bn4A77jK.js.map → 5.CDTzRbAK.js.map} +1 -1
- package/web/.svelte-kit/output/client/_app/immutable/nodes/{6.C2hEoITj.js → 6.CLPKF1xx.js} +2 -2
- package/web/.svelte-kit/output/client/_app/immutable/nodes/{6.C2hEoITj.js.map → 6.CLPKF1xx.js.map} +1 -1
- package/web/.svelte-kit/output/client/_app/immutable/nodes/{7.BcHOjWdp.js → 7.DLF_GZUp.js} +2 -2
- package/web/.svelte-kit/output/client/_app/immutable/nodes/{7.BcHOjWdp.js.map → 7.DLF_GZUp.js.map} +1 -1
- package/web/.svelte-kit/output/client/_app/immutable/nodes/8.OBQBHtO9.js +2 -0
- package/web/.svelte-kit/output/client/_app/immutable/nodes/{8.D7NtqIYy.js.map → 8.OBQBHtO9.js.map} +1 -1
- package/web/.svelte-kit/output/client/_app/immutable/nodes/9.Bd3JJwvV.js +2 -0
- package/web/.svelte-kit/output/client/_app/immutable/nodes/{9.D-211z9-.js.map → 9.Bd3JJwvV.js.map} +1 -1
- package/web/.svelte-kit/output/client/_app/version.json +1 -1
- package/web/.svelte-kit/output/server/.vite/manifest.json +2 -1
- package/web/.svelte-kit/output/server/chunks/git.js +13 -4
- package/web/.svelte-kit/output/server/chunks/git.js.map +1 -1
- package/web/.svelte-kit/output/server/chunks/internal2.js +1 -1
- package/web/.svelte-kit/output/server/chunks/internal2.js.map +1 -1
- package/web/.svelte-kit/output/server/chunks/message-queue.js +73 -9
- package/web/.svelte-kit/output/server/chunks/message-queue.js.map +1 -1
- package/web/.svelte-kit/output/server/chunks/version.js +1 -1
- package/web/.svelte-kit/output/server/chunks/version.js.map +1 -1
- package/web/.svelte-kit/output/server/chunks/ws-handlers.js +2 -1
- package/web/.svelte-kit/output/server/chunks/ws-handlers.js.map +1 -1
- package/web/.svelte-kit/output/server/chunks/ws-messages.js +6 -1
- package/web/.svelte-kit/output/server/chunks/ws-messages.js.map +1 -1
- package/web/.svelte-kit/output/server/entries/pages/_layout.svelte.js +72 -45
- package/web/.svelte-kit/output/server/entries/pages/_layout.svelte.js.map +1 -1
- package/web/.svelte-kit/output/server/manifest-full.js +1 -1
- package/web/.svelte-kit/output/server/manifest.js +1 -1
- package/web/.svelte-kit/output/server/nodes/0.js +1 -1
- package/web/.svelte-kit/output/server/nodes/1.js +1 -1
- package/web/.svelte-kit/output/server/nodes/2.js +1 -1
- package/web/.svelte-kit/output/server/nodes/3.js +1 -1
- package/web/.svelte-kit/output/server/nodes/4.js +1 -1
- package/web/.svelte-kit/output/server/nodes/5.js +1 -1
- package/web/.svelte-kit/output/server/nodes/6.js +1 -1
- package/web/.svelte-kit/output/server/nodes/7.js +1 -1
- package/web/.svelte-kit/output/server/nodes/8.js +1 -1
- package/web/.svelte-kit/output/server/nodes/9.js +1 -1
- package/web/src/lib/components/AllSessionsPanel.svelte +9 -1
- package/web/src/lib/components/FolderPicker.svelte +49 -21
- package/dist/web/client/_app/immutable/chunks/CtjkAirr.js.map +0 -1
- package/dist/web/client/_app/immutable/chunks/Dck--FBb.js +0 -4
- package/dist/web/client/_app/immutable/chunks/Dck--FBb.js.map +0 -1
- package/dist/web/client/_app/immutable/entry/start.B2ZPizAt.js +0 -2
- package/dist/web/client/_app/immutable/entry/start.B2ZPizAt.js.map +0 -1
- package/dist/web/server/chunks/_layout.svelte-yrPX5VFm.js.map +0 -1
- package/dist/web/server/chunks/git-D9dLEKUF.js.map +0 -1
- package/dist/web/server/chunks/message-queue-sFcJCRjz.js.map +0 -1
- package/dist/web/server/chunks/version-BqEJmw2g.js.map +0 -1
- package/dist/web/server/chunks/ws-handlers-zemeJ8Si.js.map +0 -1
- package/dist/web/server/chunks/ws-messages-jOSwT1Yq.js.map +0 -1
- package/web/.svelte-kit/output/client/_app/immutable/chunks/CtjkAirr.js.map +0 -1
- package/web/.svelte-kit/output/client/_app/immutable/chunks/Dck--FBb.js +0 -4
- package/web/.svelte-kit/output/client/_app/immutable/chunks/Dck--FBb.js.map +0 -1
- package/web/.svelte-kit/output/client/_app/immutable/entry/start.B2ZPizAt.js +0 -2
- package/web/.svelte-kit/output/client/_app/immutable/entry/start.B2ZPizAt.js.map +0 -1
- package/web/.svelte-kit/output/client/_app/immutable/nodes/4.v1wYkrvS.js +0 -2
- package/web/.svelte-kit/output/client/_app/immutable/nodes/5.Bn4A77jK.js +0 -2
- package/web/.svelte-kit/output/client/_app/immutable/nodes/8.D7NtqIYy.js +0 -2
- package/web/.svelte-kit/output/client/_app/immutable/nodes/9.D-211z9-.js +0 -2
|
@@ -99,8 +99,13 @@ function looksLikeRoot(cwd) {
|
|
|
99
99
|
function under(child, parent) {
|
|
100
100
|
return child === parent || child.startsWith(parent + "/");
|
|
101
101
|
}
|
|
102
|
-
function projectRoots(projects, cwds) {
|
|
102
|
+
function projectRoots(projects, cwds, repos = [], isRepo = () => false) {
|
|
103
103
|
const roots = [...projects];
|
|
104
|
+
for (const repo of new Set(repos)) {
|
|
105
|
+
if (!repo || roots.includes(repo) || looksLikeRoot(repo)) continue;
|
|
106
|
+
const holder = findDeepestProject(repo, roots);
|
|
107
|
+
if (holder && !isRepo(holder)) roots.push(repo);
|
|
108
|
+
}
|
|
104
109
|
const known = cwds.filter((cwd) => !!cwd);
|
|
105
110
|
const extra = known.filter((cwd) => !looksLikeRoot(cwd)).sort((a, b) => a.length - b.length);
|
|
106
111
|
for (const cwd of extra) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ws-messages.js","sources":["../../../../../src/fleet-prefs.ts","../../../../../src/past-session.ts","../../../../../src/fleet-places.ts","../../../../../src/types/ws-messages.ts"],"sourcesContent":["/**\n * Fleet preferences: what a person chose about the fleet, kept on the servers\n * and the same on every link and device (spec #92). Device preferences\n * (notification mode, sound, theme, panel width) stay in browser storage.\n *\n * Each preference is a key holding the last value written to it, stamped\n * with when and on which machine. Machines pass their whole set to each other\n * and keep, key by key, the later write, so the fleet converges whichever\n * order the sets arrive in. A key is never removed: clearing a preference\n * writes its default, which is itself a write that must win over older ones.\n *\n * Keys are small and many rather than one large value per kind, so two\n * machines folding two different projects at once both keep their fold.\n */\n\nimport { z } from \"zod/v4\";\n\n/** One preference: its value, when it was written (ms, the writing server's clock), and on which machine. */\nexport const PrefEntrySchema = z.object({ value: z.unknown(), at: z.number().finite(), by: z.string() });\n\nexport type PrefEntry = z.infer<typeof PrefEntrySchema>;\n\nexport type FleetPrefs = Record<string, PrefEntry>;\n\n/** The longest key accepted; a key carries a machine id and a path at most. */\nexport const MAX_KEY_LENGTH = 1024;\n\n/** The filter on the sidebar's machines: 'all', or one machine's id. */\nexport const MACHINE_FILTER = \"machine-filter\";\n\n/** The project rail's order, a list of project keys (`src/fleet-rail.ts`). */\nexport const RAIL_ORDER = \"rail-order\";\n\n/** Whether a plugin, by its fleet key (`pluginKey()` in `src/fleet-plugins.ts`), is wanted only where it is installed. */\nexport function onlyHereKey(pluginKey: string): string {\n return `plugin:only-here:${pluginKey}`;\n}\n\n/**\n * Whether a session was settled by hand (spec #92): one key per session,\n * `settled:<machine id>:<session id>`, true while settled and false once\n * un-settled, so two machines settling two sessions at once both keep theirs.\n */\nexport function settledKey(machineId: string, sessionId: string): string {\n return `settled:${machineId}:${sessionId}`;\n}\n\n/**\n * Keys the servers keep among themselves: they spread from machine to machine\n * like any other, but a page is never sent them and cannot write them. The\n * Web Push key pair and the devices subscribed to it live here\n * (`src/fleet-push.ts`).\n */\nexport const SERVER_ONLY_PREFIX = \"push:\";\n\n/**\n * The fleet's Web Push key pair. Unlike every other key, the first write\n * holds: the key every device subscribed with must not be replaced by one a\n * machine made later, so the earliest made is the one the fleet keeps.\n */\nexport const PUSH_VAPID = \"push:vapid\";\n\nexport function isServerOnlyKey(key: string): boolean {\n return key.startsWith(SERVER_ONLY_PREFIX);\n}\n\n/** Whether `a` was written after `b`; the machine id breaks a tie, so every machine picks the same one. */\nexport function isLater(a: PrefEntry, b: PrefEntry): boolean {\n return a.at !== b.at ? a.at > b.at : a.by > b.by;\n}\n\n/**\n * Whether `incoming` replaces `mine` under `key`: the later write, or the\n * earlier for `PUSH_VAPID`, where a pair that is no pair at all never holds\n * the key against one that is (it could otherwise never be replaced).\n */\nexport function replaces(key: string, incoming: PrefEntry, mine: PrefEntry): boolean {\n if (key !== PUSH_VAPID) return isLater(incoming, mine);\n const usable = isKeyPair(incoming.value);\n if (usable !== isKeyPair(mine.value)) return usable;\n return isLater(mine, incoming);\n}\n\nfunction isKeyPair(value: unknown): boolean {\n const pair = value as { publicKey?: unknown; privateKey?: unknown } | null;\n return typeof pair?.publicKey === \"string\" && pair.publicKey !== \"\" && typeof pair.privateKey === \"string\" && pair.privateKey !== \"\";\n}\n\nexport function isPrefKey(key: unknown): key is string {\n return typeof key === \"string\" && key.length > 0 && key.length <= MAX_KEY_LENGTH;\n}\n\n/**\n * `current` with every entry of `incoming` that replaces its own (`replaces()`), and the\n * keys that changed. `incoming` is read as whatever another machine sent:\n * anything that is not a well-formed entry is skipped.\n */\nexport function mergePrefs(current: FleetPrefs, incoming: unknown): { prefs: FleetPrefs; changed: string[] } {\n if (!incoming || typeof incoming !== \"object\" || Array.isArray(incoming)) return { prefs: current, changed: [] };\n const changed: string[] = [];\n let prefs = current;\n for (const [key, raw] of Object.entries(incoming)) {\n const parsed = PrefEntrySchema.safeParse(raw);\n if (!isPrefKey(key) || !parsed.success) continue;\n const mine = prefs[key];\n if (mine && !replaces(key, parsed.data, mine)) continue;\n if (prefs === current) prefs = { ...current };\n prefs[key] = parsed.data;\n changed.push(key);\n }\n return { prefs, changed };\n}\n","/**\n * A past session as machines publish it to each other and to the page: a\n * conversation whose transcript is on a machine's disk with no live pane\n * (GLOSSARY.md). Read off the transcripts by `src/transcript/past-sessions.ts`;\n * kept apart from it so the browser can import the shape without `node:fs`.\n */\n\nimport { z } from \"zod/v4\";\nimport { findDeepestProject } from \"./fleet-projects.js\";\n\n/** One past session, as a machine publishes it with its fleet state. */\nexport const PastSessionSchema = z.object({\n /** Claude Code's session id, the transcript's file name. */\n id: z.string(),\n /** The folder it last ran in; null when the transcript never said. */\n cwd: z.string().nullable(),\n branch: z.string().nullable(),\n /** Its title (/rename's, else Claude Code's own); null when it has none near the ends of the file. */\n title: z.string().nullable(),\n /** Its first prompt, cut short. */\n prompt: z.string().nullable(),\n /** When it was last written to (ms). */\n lastActivity: z.number(),\n});\n\nexport type PastSession = z.infer<typeof PastSessionSchema>;\n\n/** How many of a project's past sessions Settled shows before \"more\". */\nexport const SETTLED_SHOWN = 10;\n\n/** What a past session is called in a list: its title, else its first prompt. */\nexport function pastLabel(past: Pick<PastSession, \"id\" | \"title\" | \"prompt\">): string {\n return past.title ?? past.prompt ?? `Session ${past.id.slice(0, 8)}`;\n}\n\n/**\n * A machine's past sessions put under its project roots, by the deepest root\n * that holds the folder each ran in. One the machine also lists as a session\n * is live and left out, as is one under none of the roots.\n */\nexport function pastByRoot(\n past: readonly PastSession[],\n roots: readonly string[],\n live: ReadonlySet<string>\n): Map<string, PastSession[]> {\n const out = new Map<string, PastSession[]>();\n const named = roots.filter(Boolean);\n for (const p of past) {\n if (live.has(p.id) || !p.cwd) continue;\n const best = findDeepestProject(p.cwd, named);\n if (best === null) continue;\n const list = out.get(best);\n if (list) list.push(p);\n else out.set(best, [p]);\n }\n return out;\n}\n","/**\n * Where a machine's sessions and plain panes go in the drawer: under which\n * of its project roots (CLAUDE.md §10, \"The project rail\").\n *\n * A plain pane is a tmux pane that runs no Claude session: a shell, a dev\n * server, htop. Every machine reports its own with its sessions broadcast\n * (`PlainPane`), so the drawer can place another machine's beside its\n * sessions. Kept apart from the server code so the page can import it.\n */\n\nimport { z } from \"zod/v4\";\nimport { findDeepestProject } from \"./fleet-projects.js\";\n\n/** One plain pane, as its machine reports it. */\nexport const PlainPaneSchema = z.object({\n /** Its tmux target, `session:window.pane`. */\n target: z.string(),\n /** The tmux session it belongs to. */\n session: z.string(),\n /** What runs in it now (`pane_current_command`). */\n command: z.string(),\n /** The folder it sits in; '' when tmux did not say. */\n cwd: z.string(),\n /** Its title, as the program in it set it; null when it set none. */\n title: z.string().nullable(),\n});\n\nexport type PlainPane = z.infer<typeof PlainPaneSchema>;\n\n/** The root under which a session or pane that has not said where it runs is placed. */\nexport const NO_FOLDER = \"\";\n\n/**\n * Whether a directory is nobody's project. The server knows the home\n * directory and keeps such paths out of the list it sends; this is the\n * browser's guess for a folder under no root: a path two segments deep\n * (`/home/leo`, `/tmp`) or a mount point.\n */\nfunction looksLikeRoot(cwd: string): boolean {\n const parts = cwd.split(\"/\").filter(Boolean);\n if (parts.length <= 2) return true;\n return /^\\/(?:mnt|media|Volumes)\\/[^/]+$/.test(cwd);\n}\n\nfunction under(child: string, parent: string): boolean {\n return child === parent || child.startsWith(parent + \"/\");\n}\n\n/**\n * The project roots of a machine: what its server remembers, plus every\n * folder a session or plain pane runs in that sits under none of them (an\n * older server, a session that started this tick, a shell in a folder that\n * is nobody's project), reduced so no root sits under another. A folder\n * that is nobody's project (`~`, `/tmp`) becomes a project of its own on\n * that machine, last, so it never takes in the folders below it. One that\n * has not said where it runs (an empty cwd) is placed under `NO_FOLDER`,\n * so nothing is left out.\n */\nexport function projectRoots(projects: readonly string[], cwds: readonly (string | null | undefined)[]): string[] {\n const roots = [...projects];\n const known = cwds.filter((cwd): cwd is string => !!cwd);\n const extra = known.filter((cwd) => !looksLikeRoot(cwd)).sort((a, b) => a.length - b.length);\n for (const cwd of extra) {\n if (roots.some((r) => under(cwd, r))) continue;\n roots.push(cwd);\n }\n for (const cwd of new Set(known.filter(looksLikeRoot))) {\n if (!roots.includes(cwd) && !roots.some((r) => under(cwd, r))) roots.push(cwd);\n }\n if (known.length < cwds.length) roots.push(NO_FOLDER);\n return roots;\n}\n\n/** The root a folder is placed under: the deepest that holds it, `NO_FOLDER` for none given. */\nexport function rootOf(cwd: string | null | undefined, roots: readonly string[]): string | null {\n if (!cwd) return roots.includes(NO_FOLDER) ? NO_FOLDER : null;\n return findDeepestProject(cwd, roots.filter(Boolean));\n}\n\n/**\n * A machine's plain panes put under its roots (`projectRoots()`). Its server\n * already left out every pane a Claude session runs in.\n */\nexport function panesByRoot(panes: readonly PlainPane[], roots: readonly string[]): Map<string, PlainPane[]> {\n const out = new Map<string, PlainPane[]>();\n for (const pane of panes) {\n const root = rootOf(pane.cwd, roots);\n if (root === null) continue;\n const list = out.get(root);\n if (list) list.push(pane);\n else out.set(root, [pane]);\n }\n return out;\n}\n","/**\n * Shared WebSocket message schemas for the sessions stream.\n * Used by both server (ws-handlers) and client (session store).\n *\n * All messages over the sessions WebSocket are discriminated by `type`.\n * Each message type has its own broadcast cadence on the server.\n */\n\nimport { z } from 'zod/v4';\nimport { AGENT_IDS } from '../agents.js';\nimport { PrefEntrySchema } from '../fleet-prefs.js';\nimport { ProjectReportSchema } from '../fleet-projects.js';\nimport { PluginsReportSchema } from '../fleet-plugins.js';\nimport { PastSessionSchema } from '../past-session.js';\nimport { PlainPaneSchema } from '../fleet-places.js';\n\n// ============================================================================\n// Session data schemas\n// ============================================================================\n\nconst SessionStateSchema = z.enum(['busy', 'idle', 'waiting', 'permission']);\n\nconst ScreenshotSchema = z.object({\n\tpath: z.string(),\n\ttimestamp: z.number()\n});\n\nconst PaneChoiceSchema = z.object({\n\tquestion: z.string().nullable(),\n\toptions: z.array(\n\t\tz.object({\n\t\t\tn: z.number(),\n\t\t\tlabel: z.string(),\n\t\t\t/** The line the dialog prints under the label, when it prints one. */\n\t\t\thint: z.string().optional(),\n\t\t\t/** Whether a multi-select row's own checkbox is ticked. */\n\t\t\tchecked: z.boolean().optional(),\n\t\t\tselected: z.boolean(),\n\t\t\t/** The question's free-text row: opened by highlighting it, declined by an empty Enter. */\n\t\t\ttext: z.literal(true).optional(),\n\t\t\t/** The answer the question already holds, marked when its tab is gone back to. */\n\t\t\tchosen: z.literal(true).optional(),\n\t\t})\n\t),\n\t/** The rows are checkboxes: picking one ticks it, and leaves the dialog open. */\n\tmulti: z.boolean().optional(),\n\t/** The highlighted row is a text field: keystrokes fill it rather than drive the list. */\n\ttyping: z.boolean().optional(),\n\t/** That text field is the highlighted option's notes, closed with Escape. */\n\tnoting: z.boolean().optional(),\n\t/** The dialog's own key hint, as drawn under it. */\n\tkeys: z.string().optional(),\n\t/** Lines the dialog prints under its rows for itself — a setting, a warning. */\n\tnotes: z.array(z.string()).optional(),\n\t/** A multi-question dialog's tabs, Submit left out: ←/→ move between them. */\n\ttabs: z.array(z.object({ label: z.string(), answered: z.boolean() })).optional()\n});\n\n/** The numbered options a pane dialog is offering, as they reach the browser. */\nexport type PaneChoice = z.infer<typeof PaneChoiceSchema>;\n\nconst IssueInfoSchema = z.object({\n\tnumber: z.number(),\n\ttitle: z.string(),\n\tstate: z.enum(['open', 'closed']),\n\tlabels: z.array(z.string()),\n\turl: z.string()\n});\n\n/** A GitHub issue as the sidebar shows it next to the session working it. */\nexport type IssueInfo = z.infer<typeof IssueInfoSchema>;\n\nconst PaneActivitySchema = z.object({\n\tverb: z.string(),\n\tdoing: z.string().nullable(),\n\t/** When the turn started, in the server's clock (epoch ms); see `timestamp` on the message. */\n\tstarted_at: z.number().nullable(),\n\ttokens: z.object({ dir: z.enum(['down', 'up']), count: z.string() }).nullable(),\n\tthinking: z.string().nullable()\n});\n\n/** Claude Code's spinner line, split into its parts (see `readActivity`), with the turn's start in place of its elapsed count. */\nexport type PaneActivity = z.infer<typeof PaneActivitySchema>;\n\nconst QueuedMessageSchema = z.object({\n\t/** Stable across reorders and drains, so an edit or steer names the item it meant. */\n\tid: z.string(),\n\ttext: z.string(),\n\tqueuedAt: z.number(),\n\tkind: z.enum(['user', 'control']),\n\t/** Attachment paths, folded into the text only when the message is delivered. */\n\tattachments: z.array(z.string()).optional(),\n\t/** It was spoken, so the turn it becomes is badged as dictated. */\n\tdictated: z.boolean().optional()\n});\n/** One message in claude-mux's send queue, as the broadcast carries it. */\nexport type QueuedMessageInfo = z.infer<typeof QueuedMessageSchema>;\n\nconst DeliverySchema = z.object({\n\t/** Exactly what was pasted into the pane, attachments folded in. */\n\ttext: z.string(),\n\t/** The queue drained it on an idle pane, or a steer pushed it into the turn. */\n\tvia: z.enum(['queue', 'steer']),\n\tat: z.number()\n});\n/** A message claude-mux handed the pane on the user's behalf, for labelling its turn. */\nexport type DeliveryInfo = z.infer<typeof DeliverySchema>;\n\nconst InboxTicketSchema = z.object({\n\trepo: z.string(),\n\tgit_root: z.string(),\n\tnumber: z.number(),\n\ttitle: z.string(),\n\turl: z.string(),\n\t/** A maestro worker asking for a decision, or a wayfinder ticket only a person resolves. */\n\tkind: z.enum(['needs-help', 'grilling', 'prototype']),\n\t/** When it started waiting, as near as GitHub says: the last update, or when it was filed. */\n\tsince: z.number(),\n\t/** The worker's latest comment, first paragraph — what it needs. */\n\tnote: z.string().nullable()\n});\n\n/** A ticket on GitHub that is waiting on a person rather than an agent. */\nexport type InboxTicket = z.infer<typeof InboxTicketSchema>;\n\nconst SubagentSchema = z.object({\n\tid: z.string(),\n\ttype: z.string(),\n\tdescription: z.string().nullable(),\n\tstate: z.enum(['running', 'done', 'failed']),\n\tstarted_at: z.number(),\n\tended_at: z.number().nullable(),\n\ttranscript_path: z.string().nullable(),\n\ttool_use_id: z.string().nullable().optional(),\n\tcurrent_tool: z.string().nullable().optional()\n});\n\n/** A subagent a session spawned, as the hook last recorded it. */\nexport type SubagentInfo = z.infer<typeof SubagentSchema>;\n\nconst ChangesInfoSchema = z.object({\n\tfiles: z.number(),\n\tadditions: z.number(),\n\tdeletions: z.number(),\n\t/** `git` counts the repo's working tree; `session` counts the edits in the session's log. */\n\tsource: z.enum(['git', 'session'])\n});\n\n/** How much a session has changed, as the sidebar shows it. */\nexport type ChangesInfo = z.infer<typeof ChangesInfoSchema>;\n\nconst UpgradeStatusSchema = z.object({\n\tstate: z.enum(['running', 'unchanged', 'timeout', 'failed']),\n\tcommand: z.string(),\n\tat: z.number(),\n\tmessage: z.string().optional(),\n\toutput: z.string().nullable().optional()\n});\n/** How the last upgrade asked of a session stands (`upgradeStatus()` in src/server/restart-claude.ts). */\nexport type UpgradeStatus = z.infer<typeof UpgradeStatusSchema>;\n\nconst EnrichedSessionSchema = z.object({\n\tv: z.number(),\n\tid: z.string(),\n\tpid: z.number(),\n\tcwd: z.string(),\n\tgit_root: z.string().nullable(),\n\ttmux_target: z.string().nullable(),\n\tstate: SessionStateSchema,\n\tcurrent_action: z.string().nullable(),\n\tprompt_text: z.string().nullable(),\n\tlast_update: z.number(),\n\t/** When the user's latest prompt started a turn; stamped by the hook. */\n\tturn_started_at: z.number().nullable().optional(),\n\t/** When the latest turn ended for good; stamped by the hook. */\n\tturn_completed_at: z.number().nullable().optional(),\n\t/** When anyone last had the session open (`visits.json`) — live only. */\n\tlast_visited_at: z.number().nullable().optional(),\n\tscreenshots: z.array(ScreenshotSchema).optional(),\n\tchrome_active: z.boolean().optional(),\n\tlinked_to: z.string().nullable().optional(),\n\trc_url: z.string().nullable().optional(),\n\t/** Text sitting in the pane's prompt box right now — live, never persisted. */\n\tdraft_input: z.string().nullable().optional(),\n\t/** Who put it there: the user, or Claude Code's own prompt suggestion. */\n\tdraft_kind: z.enum(['typed', 'suggestion']).nullable().optional(),\n\t/** Messages waiting in Claude Code's own queue, oldest first — live only. */\n\tpane_queue: z.array(z.string()).optional(),\n\t/**\n\t * The numbered options a permission or question dialog is offering in the\n\t * pane right now — live only. Read off the pane, so the UI must still gate\n\t * on `state`: the hooks are authoritative for whether a dialog is open.\n\t */\n\tpane_choice: PaneChoiceSchema.nullable().optional(),\n\t/** Claude Code's footer notice about its own update — live only. */\n\tpane_update: z\n\t\t.object({\n\t\t\tkind: z.enum(['installed', 'available', 'failed']),\n\t\t\ttext: z.string(),\n\t\t\t/** The upgrade command it names, when claude-mux can run it. */\n\t\t\tcommand: z.string().optional()\n\t\t})\n\t\t.nullable()\n\t\t.optional(),\n\t/** Claude Code's sign-in screen: its link and code field, the verdict, or a sign-in gone stale — live only. */\n\tpane_login: z\n\t\t.discriminatedUnion('step', [\n\t\t\tz.object({\n\t\t\t\tstep: z.literal('code'),\n\t\t\t\turl: z.string().nullable(),\n\t\t\t\ttyped: z.string(),\n\t\t\t\terror: z.string().nullable()\n\t\t\t}),\n\t\t\tz.object({ step: z.literal('failed'), error: z.string() }),\n\t\t\tz.object({ step: z.literal('done') }),\n\t\t\tz.object({ step: z.literal('expired') })\n\t\t])\n\t\t.nullable()\n\t\t.optional(),\n\t/** Claude Code's rewind dialog: the list of points to go back to, or the confirmation for one — live only. */\n\tpane_rewind: z\n\t\t.discriminatedUnion('step', [\n\t\t\tz.object({\n\t\t\t\tstep: z.literal('list'),\n\t\t\t\trows: z.array(\n\t\t\t\t\tz.object({\n\t\t\t\t\t\ttext: z.string(),\n\t\t\t\t\t\tfiles: z.string().nullable(),\n\t\t\t\t\t\tselected: z.boolean(),\n\t\t\t\t\t\tcurrent: z.boolean()\n\t\t\t\t\t})\n\t\t\t\t),\n\t\t\t\tabove: z.number(),\n\t\t\t\tbelow: z.number()\n\t\t\t}),\n\t\t\tz.object({\n\t\t\t\tstep: z.literal('confirm'),\n\t\t\t\tprompt: z.string(),\n\t\t\t\tago: z.string().nullable(),\n\t\t\t\teffects: z.array(z.string()),\n\t\t\t\toptions: z.array(z.object({ n: z.number(), label: z.string(), selected: z.boolean() }))\n\t\t\t})\n\t\t])\n\t\t.nullable()\n\t\t.optional(),\n\t/** The upgrade the status line started: running, or why it did not restart — live only. */\n\tupgrade: UpgradeStatusSchema.nullable().optional(),\n\t/** The spinner line while a turn runs, split into its parts — live only. */\n\tpane_activity: PaneActivitySchema.nullable().optional(),\n\t/** Share of the context window in use, read off the transcript's latest reply. */\n\tcontext_pct: z.number().nullable().optional(),\n\tdisplay_name: z.string().nullable().optional(),\n\tpane_title: z.string().nullable(),\n\tpane_alive: z.boolean(),\n\t/** Every message claude-mux holds for the pane, next out first — live only. */\n\tqueue: z.array(QueuedMessageSchema).optional(),\n\t/** What the queue and steers handed the pane lately, newest last — live only. */\n\tdelivered: z.array(DeliverySchema).optional(),\n\tagent: z.enum(AGENT_IDS).optional(),\n\t/** Set when the maestro daemon started the session. */\n\tmaestro_role: z.string().nullable().optional(),\n\tmaestro_issue: z.number().nullable().optional(),\n\t/** Subagents running now, those done in the last hour, and those failed in the last day. */\n\tsubagents: z.array(SubagentSchema).optional(),\n\t/** The issue that worker owns, as GitHub last described it — live only. */\n\tissue: IssueInfoSchema.nullable().optional(),\n\t/** Files changed, with line counts: git's when in a repo, else the session log's — live only. */\n\tchanges: ChangesInfoSchema.nullable().optional()\n});\n\n// ============================================================================\n// Message schemas (discriminated by `type`)\n// ============================================================================\n\n/**\n * The projects the server remembers, on every sessions broadcast. Optional\n * because a browser may be talking to a server from before the list moved\n * there, in which case it falls back to its own.\n */\nconst ProjectsField = z.array(z.string()).optional();\n\n/** This machine's settings, likewise on every broadcast; absent on older servers. */\nconst SettingsField = z.object({ autoRemoteControl: z.boolean() }).partial().optional();\n\n/** Tickets on GitHub waiting on a person, for the repos this machine's sessions are in. */\nconst InboxField = z.array(InboxTicketSchema).optional();\n\n/** What each project is matched across machines by, and its icon (`src/fleet-projects.ts`); absent on older servers. */\nconst ProjectReportsField = z.array(ProjectReportSchema).optional();\n\n/** This machine's tmux panes that run no Claude session (`src/fleet-places.ts`); absent on older servers. */\nconst PanesField = eachOf(PlainPaneSchema).optional();\n\n/** This machine's Claude Code marketplaces and plugins (`src/fleet-plugins.ts`); null until read, absent on older servers. */\nconst PluginsField = PluginsReportSchema.nullable().optional();\n\nconst SessionsMessageSchema = z.object({\n\ttype: z.literal('sessions'),\n\tsessions: z.array(EnrichedSessionSchema),\n\tcount: z.number(),\n\tpanes: PanesField,\n\tprojects: ProjectsField,\n\tsettings: SettingsField,\n\tinbox: InboxField,\n\tprojectReports: ProjectReportsField,\n\tplugins: PluginsField,\n\ttimestamp: z.number()\n});\n\nconst ConnectedMessageSchema = z.object({\n\ttype: z.literal('connected'),\n\tsessions: z.array(EnrichedSessionSchema),\n\tcount: z.number(),\n\tpanes: PanesField,\n\tprojects: ProjectsField,\n\tsettings: SettingsField,\n\tinbox: InboxField,\n\tprojectReports: ProjectReportsField,\n\tplugins: PluginsField,\n\ttimestamp: z.number()\n});\n\n/**\n * Every other machine, as this one last heard from it (`src/server/fleet-state.ts`).\n * Sent only to a page that asks for it (`?fleet=1`); `self` is this machine's id.\n * A peer's sessions are its own broadcast, read with the same schema.\n */\n/**\n * A list read item by item: an item this schema cannot read is dropped and\n * the rest kept. Another machine may run another version, and one session it\n * describes differently must not cost the page that whole machine, or the fleet.\n */\nexport function eachOf<T extends z.ZodType>(item: T) {\n\treturn z.array(z.unknown()).transform((items) =>\n\t\titems.flatMap((raw) => {\n\t\t\tconst parsed = item.safeParse(raw);\n\t\t\treturn parsed.success ? [parsed.data as z.infer<T>] : [];\n\t\t})\n\t);\n}\n\nconst FleetMachineSchema = z.object({\n\tid: z.string(),\n\thostname: z.string(),\n\turl: z.string(),\n\tonline: z.boolean(),\n\tlastSeen: z.number().nullable(),\n\tretryAt: z.number().nullable(),\n\tversion: z.string().nullable(),\n\t// Absent from an older machine's own fleet state.\n\tprotocol: z.number().nullable().default(null),\n\tsessions: eachOf(EnrichedSessionSchema),\n\tprojects: z.array(z.string()),\n\tinbox: eachOf(InboxTicketSchema),\n\tprojectReports: eachOf(ProjectReportSchema).optional(),\n\tpanes: PanesField,\n\t// A report this version cannot read counts as none.\n\tplugins: PluginsReportSchema.nullable().optional().catch(null)\n});\n\nconst FleetMessageSchema = z.object({\n\ttype: z.literal('fleet'),\n\tself: z.string(),\n\tmachines: z.array(FleetMachineSchema),\n\ttimestamp: z.number()\n});\n\n/**\n * The fleet preferences (`src/fleet-prefs.ts`), sent on connect and after\n * every change, to pages and peers alike.\n */\nconst PrefsMessageSchema = z.object({\n\ttype: z.literal('prefs'),\n\tprefs: z.record(z.string(), PrefEntrySchema),\n\ttimestamp: z.number()\n});\n\n/** This machine's past sessions (`src/transcript/past-sessions.ts`), sent on connect and when they change. */\nconst PastMessageSchema = z.object({\n\ttype: z.literal('past'),\n\tsessions: eachOf(PastSessionSchema),\n\ttimestamp: z.number()\n});\n\n/** Every other machine's past sessions by machine id, from the fleet state; to pages that asked for the fleet. */\nconst FleetPastMessageSchema = z.object({\n\ttype: z.literal('fleet-past'),\n\tmachines: z.record(z.string(), eachOf(PastSessionSchema)),\n\ttimestamp: z.number()\n});\n\nconst SystemStatsMessageSchema = z.object({\n\ttype: z.literal('systemStats'),\n\tcpu: z.number(),\n\tram: z.number(),\n\tswap: z.number(),\n\tramTotal: z.number(),\n\tswapTotal: z.number(),\n\t/** Percentage used of the filesystem holding the home directory; null where it cannot be read. */\n\tdisk: z.number().nullable().default(null),\n\ttimestamp: z.number()\n});\n\n// ============================================================================\n// Union + exports\n// ============================================================================\n\nexport const SessionsWsMessageSchema = z.discriminatedUnion('type', [\n\tSessionsMessageSchema,\n\tConnectedMessageSchema,\n\tFleetMessageSchema,\n\tPrefsMessageSchema,\n\tPastMessageSchema,\n\tFleetPastMessageSchema,\n\tSystemStatsMessageSchema\n]);\n\nexport type SessionsWsMessage = z.infer<typeof SessionsWsMessageSchema>;\nexport type SessionsMessage = z.infer<typeof SessionsMessageSchema>;\nexport type ConnectedMessage = z.infer<typeof ConnectedMessageSchema>;\nexport type SystemStatsMessage = z.infer<typeof SystemStatsMessageSchema>;\nexport type FleetMachineInfo = z.infer<typeof FleetMachineSchema>;\nexport type EnrichedSession = z.infer<typeof EnrichedSessionSchema>;\n"],"names":[],"mappings":";;;;AAkBO,MAAM,kBAAkB,EAAE,OAAO,EAAE,OAAO,EAAE,WAAW,IAAI,EAAE,OAAA,EAAS,OA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AAM,EAAE,OAAA;AAAA,EACR,UAAU,EAAE,MAAM,kBAAkB;AAAA,EACpC,WAAW,EAAE,OAAA;AACd,CAAC;AAMD,MAAM,qBAAqB,EAAE,OAAO;AAAA,EACnC,MAAM,EAAE,QAAQ,OAAO;AAAA,EACvB,OAAO,EAAE,OAAO,EAAE,OAAA,GAAU,eAAe;AAAA,EAC3C,WAAW,EAAE,OAAA;AACd,CAAC;AAGD,MAAM,oBAAoB,EAAE,OAAO;AAAA,EAClC,MAAM,EAAE,QAAQ,MAAM;AAAA,EACtB,UAAU,OAAO,iBAAiB;AAAA,EAClC,WAAW,EAAE,OAAA;AACd,CAAC;AAGD,MAAM,yBAAyB,EAAE,OAAO;AAAA,EACvC,MAAM,EAAE,QAAQ,YAAY;AAAA,EAC5B,UAAU,EAAE,OAAO,EAAE,UAAU,OAAO,iBAAiB,CAAC;AAAA,EACxD,WAAW,EAAE,OAAA;AACd,CAAC;AAED,MAAM,2BAA2B,EAAE,OAAO;AAAA,EACzC,MAAM,EAAE,QAAQ,aAAa;AAAA,EAC7B,KAAK,EAAE,OAAA;AAAA,EACP,KAAK,EAAE,OAAA;AAAA,EACP,MAAM,EAAE,OAAA;AAAA,EACR,UAAU,EAAE,OAAA;AAAA,EACZ,WAAW,EAAE,OAAA;AAAA;AAAA,EAEb,MAAM,EAAE,OAAA,EAAS,SAAA,EAAW,QAAQ,IAAI;AAAA,EACxC,WAAW,EAAE,OAAA;AACd,CAAC;AAMM,MAAM,0BAA0B,EAAE,mBAAmB,QAAQ;AAAA,EACnE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACD,CAAC;"}
|
|
1
|
+
{"version":3,"file":"ws-messages.js","sources":["../../../../../src/fleet-prefs.ts","../../../../../src/past-session.ts","../../../../../src/fleet-places.ts","../../../../../src/types/ws-messages.ts"],"sourcesContent":["/**\n * Fleet preferences: what a person chose about the fleet, kept on the servers\n * and the same on every link and device (spec #92). Device preferences\n * (notification mode, sound, theme, panel width) stay in browser storage.\n *\n * Each preference is a key holding the last value written to it, stamped\n * with when and on which machine. Machines pass their whole set to each other\n * and keep, key by key, the later write, so the fleet converges whichever\n * order the sets arrive in. A key is never removed: clearing a preference\n * writes its default, which is itself a write that must win over older ones.\n *\n * Keys are small and many rather than one large value per kind, so two\n * machines folding two different projects at once both keep their fold.\n */\n\nimport { z } from \"zod/v4\";\n\n/** One preference: its value, when it was written (ms, the writing server's clock), and on which machine. */\nexport const PrefEntrySchema = z.object({ value: z.unknown(), at: z.number().finite(), by: z.string() });\n\nexport type PrefEntry = z.infer<typeof PrefEntrySchema>;\n\nexport type FleetPrefs = Record<string, PrefEntry>;\n\n/** The longest key accepted; a key carries a machine id and a path at most. */\nexport const MAX_KEY_LENGTH = 1024;\n\n/** The filter on the sidebar's machines: 'all', or one machine's id. */\nexport const MACHINE_FILTER = \"machine-filter\";\n\n/** The project rail's order, a list of project keys (`src/fleet-rail.ts`). */\nexport const RAIL_ORDER = \"rail-order\";\n\n/** Whether a plugin, by its fleet key (`pluginKey()` in `src/fleet-plugins.ts`), is wanted only where it is installed. */\nexport function onlyHereKey(pluginKey: string): string {\n return `plugin:only-here:${pluginKey}`;\n}\n\n/**\n * Whether a session was settled by hand (spec #92): one key per session,\n * `settled:<machine id>:<session id>`, true while settled and false once\n * un-settled, so two machines settling two sessions at once both keep theirs.\n */\nexport function settledKey(machineId: string, sessionId: string): string {\n return `settled:${machineId}:${sessionId}`;\n}\n\n/**\n * Keys the servers keep among themselves: they spread from machine to machine\n * like any other, but a page is never sent them and cannot write them. The\n * Web Push key pair and the devices subscribed to it live here\n * (`src/fleet-push.ts`).\n */\nexport const SERVER_ONLY_PREFIX = \"push:\";\n\n/**\n * The fleet's Web Push key pair. Unlike every other key, the first write\n * holds: the key every device subscribed with must not be replaced by one a\n * machine made later, so the earliest made is the one the fleet keeps.\n */\nexport const PUSH_VAPID = \"push:vapid\";\n\nexport function isServerOnlyKey(key: string): boolean {\n return key.startsWith(SERVER_ONLY_PREFIX);\n}\n\n/** Whether `a` was written after `b`; the machine id breaks a tie, so every machine picks the same one. */\nexport function isLater(a: PrefEntry, b: PrefEntry): boolean {\n return a.at !== b.at ? a.at > b.at : a.by > b.by;\n}\n\n/**\n * Whether `incoming` replaces `mine` under `key`: the later write, or the\n * earlier for `PUSH_VAPID`, where a pair that is no pair at all never holds\n * the key against one that is (it could otherwise never be replaced).\n */\nexport function replaces(key: string, incoming: PrefEntry, mine: PrefEntry): boolean {\n if (key !== PUSH_VAPID) return isLater(incoming, mine);\n const usable = isKeyPair(incoming.value);\n if (usable !== isKeyPair(mine.value)) return usable;\n return isLater(mine, incoming);\n}\n\nfunction isKeyPair(value: unknown): boolean {\n const pair = value as { publicKey?: unknown; privateKey?: unknown } | null;\n return typeof pair?.publicKey === \"string\" && pair.publicKey !== \"\" && typeof pair.privateKey === \"string\" && pair.privateKey !== \"\";\n}\n\nexport function isPrefKey(key: unknown): key is string {\n return typeof key === \"string\" && key.length > 0 && key.length <= MAX_KEY_LENGTH;\n}\n\n/**\n * `current` with every entry of `incoming` that replaces its own (`replaces()`), and the\n * keys that changed. `incoming` is read as whatever another machine sent:\n * anything that is not a well-formed entry is skipped.\n */\nexport function mergePrefs(current: FleetPrefs, incoming: unknown): { prefs: FleetPrefs; changed: string[] } {\n if (!incoming || typeof incoming !== \"object\" || Array.isArray(incoming)) return { prefs: current, changed: [] };\n const changed: string[] = [];\n let prefs = current;\n for (const [key, raw] of Object.entries(incoming)) {\n const parsed = PrefEntrySchema.safeParse(raw);\n if (!isPrefKey(key) || !parsed.success) continue;\n const mine = prefs[key];\n if (mine && !replaces(key, parsed.data, mine)) continue;\n if (prefs === current) prefs = { ...current };\n prefs[key] = parsed.data;\n changed.push(key);\n }\n return { prefs, changed };\n}\n","/**\n * A past session as machines publish it to each other and to the page: a\n * conversation whose transcript is on a machine's disk with no live pane\n * (GLOSSARY.md). Read off the transcripts by `src/transcript/past-sessions.ts`;\n * kept apart from it so the browser can import the shape without `node:fs`.\n */\n\nimport { z } from \"zod/v4\";\nimport { findDeepestProject } from \"./fleet-projects.js\";\n\n/** One past session, as a machine publishes it with its fleet state. */\nexport const PastSessionSchema = z.object({\n /** Claude Code's session id, the transcript's file name. */\n id: z.string(),\n /** The folder it last ran in; null when the transcript never said. */\n cwd: z.string().nullable(),\n branch: z.string().nullable(),\n /** Its title (/rename's, else Claude Code's own); null when it has none near the ends of the file. */\n title: z.string().nullable(),\n /** Its first prompt, cut short. */\n prompt: z.string().nullable(),\n /** When it was last written to (ms). */\n lastActivity: z.number(),\n});\n\nexport type PastSession = z.infer<typeof PastSessionSchema>;\n\n/** How many of a project's past sessions Settled shows before \"more\". */\nexport const SETTLED_SHOWN = 10;\n\n/** What a past session is called in a list: its title, else its first prompt. */\nexport function pastLabel(past: Pick<PastSession, \"id\" | \"title\" | \"prompt\">): string {\n return past.title ?? past.prompt ?? `Session ${past.id.slice(0, 8)}`;\n}\n\n/**\n * A machine's past sessions put under its project roots, by the deepest root\n * that holds the folder each ran in. One the machine also lists as a session\n * is live and left out, as is one under none of the roots.\n */\nexport function pastByRoot(\n past: readonly PastSession[],\n roots: readonly string[],\n live: ReadonlySet<string>\n): Map<string, PastSession[]> {\n const out = new Map<string, PastSession[]>();\n const named = roots.filter(Boolean);\n for (const p of past) {\n if (live.has(p.id) || !p.cwd) continue;\n const best = findDeepestProject(p.cwd, named);\n if (best === null) continue;\n const list = out.get(best);\n if (list) list.push(p);\n else out.set(best, [p]);\n }\n return out;\n}\n","/**\n * Where a machine's sessions and plain panes go in the drawer: under which\n * of its project roots (CLAUDE.md §10, \"The project rail\").\n *\n * A plain pane is a tmux pane that runs no Claude session: a shell, a dev\n * server, htop. Every machine reports its own with its sessions broadcast\n * (`PlainPane`), so the drawer can place another machine's beside its\n * sessions. Kept apart from the server code so the page can import it.\n */\n\nimport { z } from \"zod/v4\";\nimport { findDeepestProject } from \"./fleet-projects.js\";\n\n/** One plain pane, as its machine reports it. */\nexport const PlainPaneSchema = z.object({\n /** Its tmux target, `session:window.pane`. */\n target: z.string(),\n /** The tmux session it belongs to. */\n session: z.string(),\n /** What runs in it now (`pane_current_command`). */\n command: z.string(),\n /** The folder it sits in; '' when tmux did not say. */\n cwd: z.string(),\n /** Its title, as the program in it set it; null when it set none. */\n title: z.string().nullable(),\n});\n\nexport type PlainPane = z.infer<typeof PlainPaneSchema>;\n\n/** The root under which a session or pane that has not said where it runs is placed. */\nexport const NO_FOLDER = \"\";\n\n/**\n * Whether a directory is nobody's project. The server knows the home\n * directory and keeps such paths out of the list it sends; this is the\n * browser's guess for a folder under no root: a path two segments deep\n * (`/home/leo`, `/tmp`) or a mount point.\n */\nfunction looksLikeRoot(cwd: string): boolean {\n const parts = cwd.split(\"/\").filter(Boolean);\n if (parts.length <= 2) return true;\n return /^\\/(?:mnt|media|Volumes)\\/[^/]+$/.test(cwd);\n}\n\nfunction under(child: string, parent: string): boolean {\n return child === parent || child.startsWith(parent + \"/\");\n}\n\n/**\n * The project roots of a machine: what its server remembers, plus every\n * folder a session or plain pane runs in that sits under none of them (an\n * older server, a session that started this tick, a shell in a folder that\n * is nobody's project), reduced so no root sits under another. A folder\n * that is nobody's project (`~`, `/tmp`) becomes a project of its own on\n * that machine, last, so it never takes in the folders below it. One that\n * has not said where it runs (an empty cwd) is placed under `NO_FOLDER`,\n * so nothing is left out.\n *\n * A session's repo is a project of its own even under a remembered root,\n * unless that root is a repo too: a session opened in `~/Projects` makes it\n * a root, and the repos below it must not then fold into it (and close with\n * it). Under a root that is a repo, a worktree or nested repo stays its.\n * `repos` are the sessions' git roots; `isRepo` says whether a root is one.\n */\nexport function projectRoots(\n projects: readonly string[],\n cwds: readonly (string | null | undefined)[],\n repos: readonly (string | null | undefined)[] = [],\n isRepo: (root: string) => boolean = () => false,\n): string[] {\n const roots = [...projects];\n for (const repo of new Set(repos)) {\n if (!repo || roots.includes(repo) || looksLikeRoot(repo)) continue;\n const holder = findDeepestProject(repo, roots);\n if (holder && !isRepo(holder)) roots.push(repo);\n }\n const known = cwds.filter((cwd): cwd is string => !!cwd);\n const extra = known.filter((cwd) => !looksLikeRoot(cwd)).sort((a, b) => a.length - b.length);\n for (const cwd of extra) {\n if (roots.some((r) => under(cwd, r))) continue;\n roots.push(cwd);\n }\n for (const cwd of new Set(known.filter(looksLikeRoot))) {\n if (!roots.includes(cwd) && !roots.some((r) => under(cwd, r))) roots.push(cwd);\n }\n if (known.length < cwds.length) roots.push(NO_FOLDER);\n return roots;\n}\n\n/** The root a folder is placed under: the deepest that holds it, `NO_FOLDER` for none given. */\nexport function rootOf(cwd: string | null | undefined, roots: readonly string[]): string | null {\n if (!cwd) return roots.includes(NO_FOLDER) ? NO_FOLDER : null;\n return findDeepestProject(cwd, roots.filter(Boolean));\n}\n\n/**\n * A machine's plain panes put under its roots (`projectRoots()`). Its server\n * already left out every pane a Claude session runs in.\n */\nexport function panesByRoot(panes: readonly PlainPane[], roots: readonly string[]): Map<string, PlainPane[]> {\n const out = new Map<string, PlainPane[]>();\n for (const pane of panes) {\n const root = rootOf(pane.cwd, roots);\n if (root === null) continue;\n const list = out.get(root);\n if (list) list.push(pane);\n else out.set(root, [pane]);\n }\n return out;\n}\n","/**\n * Shared WebSocket message schemas for the sessions stream.\n * Used by both server (ws-handlers) and client (session store).\n *\n * All messages over the sessions WebSocket are discriminated by `type`.\n * Each message type has its own broadcast cadence on the server.\n */\n\nimport { z } from 'zod/v4';\nimport { AGENT_IDS } from '../agents.js';\nimport { PrefEntrySchema } from '../fleet-prefs.js';\nimport { ProjectReportSchema } from '../fleet-projects.js';\nimport { PluginsReportSchema } from '../fleet-plugins.js';\nimport { PastSessionSchema } from '../past-session.js';\nimport { PlainPaneSchema } from '../fleet-places.js';\n\n// ============================================================================\n// Session data schemas\n// ============================================================================\n\nconst SessionStateSchema = z.enum(['busy', 'idle', 'waiting', 'permission']);\n\nconst ScreenshotSchema = z.object({\n\tpath: z.string(),\n\ttimestamp: z.number()\n});\n\nconst PaneChoiceSchema = z.object({\n\tquestion: z.string().nullable(),\n\toptions: z.array(\n\t\tz.object({\n\t\t\tn: z.number(),\n\t\t\tlabel: z.string(),\n\t\t\t/** The line the dialog prints under the label, when it prints one. */\n\t\t\thint: z.string().optional(),\n\t\t\t/** Whether a multi-select row's own checkbox is ticked. */\n\t\t\tchecked: z.boolean().optional(),\n\t\t\tselected: z.boolean(),\n\t\t\t/** The question's free-text row: opened by highlighting it, declined by an empty Enter. */\n\t\t\ttext: z.literal(true).optional(),\n\t\t\t/** The answer the question already holds, marked when its tab is gone back to. */\n\t\t\tchosen: z.literal(true).optional(),\n\t\t})\n\t),\n\t/** The rows are checkboxes: picking one ticks it, and leaves the dialog open. */\n\tmulti: z.boolean().optional(),\n\t/** The highlighted row is a text field: keystrokes fill it rather than drive the list. */\n\ttyping: z.boolean().optional(),\n\t/** That text field is the highlighted option's notes, closed with Escape. */\n\tnoting: z.boolean().optional(),\n\t/** The dialog's own key hint, as drawn under it. */\n\tkeys: z.string().optional(),\n\t/** Lines the dialog prints under its rows for itself — a setting, a warning. */\n\tnotes: z.array(z.string()).optional(),\n\t/** A multi-question dialog's tabs, Submit left out: ←/→ move between them. */\n\ttabs: z.array(z.object({ label: z.string(), answered: z.boolean() })).optional()\n});\n\n/** The numbered options a pane dialog is offering, as they reach the browser. */\nexport type PaneChoice = z.infer<typeof PaneChoiceSchema>;\n\nconst IssueInfoSchema = z.object({\n\tnumber: z.number(),\n\ttitle: z.string(),\n\tstate: z.enum(['open', 'closed']),\n\tlabels: z.array(z.string()),\n\turl: z.string()\n});\n\n/** A GitHub issue as the sidebar shows it next to the session working it. */\nexport type IssueInfo = z.infer<typeof IssueInfoSchema>;\n\nconst PaneActivitySchema = z.object({\n\tverb: z.string(),\n\tdoing: z.string().nullable(),\n\t/** When the turn started, in the server's clock (epoch ms); see `timestamp` on the message. */\n\tstarted_at: z.number().nullable(),\n\ttokens: z.object({ dir: z.enum(['down', 'up']), count: z.string() }).nullable(),\n\tthinking: z.string().nullable()\n});\n\n/** Claude Code's spinner line, split into its parts (see `readActivity`), with the turn's start in place of its elapsed count. */\nexport type PaneActivity = z.infer<typeof PaneActivitySchema>;\n\nconst QueuedMessageSchema = z.object({\n\t/** Stable across reorders and drains, so an edit or steer names the item it meant. */\n\tid: z.string(),\n\ttext: z.string(),\n\tqueuedAt: z.number(),\n\tkind: z.enum(['user', 'control']),\n\t/** Attachment paths, folded into the text only when the message is delivered. */\n\tattachments: z.array(z.string()).optional(),\n\t/** It was spoken, so the turn it becomes is badged as dictated. */\n\tdictated: z.boolean().optional()\n});\n/** One message in claude-mux's send queue, as the broadcast carries it. */\nexport type QueuedMessageInfo = z.infer<typeof QueuedMessageSchema>;\n\nconst DeliverySchema = z.object({\n\t/** Exactly what was pasted into the pane, attachments folded in. */\n\ttext: z.string(),\n\t/** The queue drained it on an idle pane, or a steer pushed it into the turn. */\n\tvia: z.enum(['queue', 'steer']),\n\tat: z.number()\n});\n/** A message claude-mux handed the pane on the user's behalf, for labelling its turn. */\nexport type DeliveryInfo = z.infer<typeof DeliverySchema>;\n\nconst InboxTicketSchema = z.object({\n\trepo: z.string(),\n\tgit_root: z.string(),\n\tnumber: z.number(),\n\ttitle: z.string(),\n\turl: z.string(),\n\t/** A maestro worker asking for a decision, or a wayfinder ticket only a person resolves. */\n\tkind: z.enum(['needs-help', 'grilling', 'prototype']),\n\t/** When it started waiting, as near as GitHub says: the last update, or when it was filed. */\n\tsince: z.number(),\n\t/** The worker's latest comment, first paragraph — what it needs. */\n\tnote: z.string().nullable()\n});\n\n/** A ticket on GitHub that is waiting on a person rather than an agent. */\nexport type InboxTicket = z.infer<typeof InboxTicketSchema>;\n\nconst SubagentSchema = z.object({\n\tid: z.string(),\n\ttype: z.string(),\n\tdescription: z.string().nullable(),\n\tstate: z.enum(['running', 'done', 'failed']),\n\tstarted_at: z.number(),\n\tended_at: z.number().nullable(),\n\ttranscript_path: z.string().nullable(),\n\ttool_use_id: z.string().nullable().optional(),\n\tcurrent_tool: z.string().nullable().optional()\n});\n\n/** A subagent a session spawned, as the hook last recorded it. */\nexport type SubagentInfo = z.infer<typeof SubagentSchema>;\n\nconst ChangesInfoSchema = z.object({\n\tfiles: z.number(),\n\tadditions: z.number(),\n\tdeletions: z.number(),\n\t/** `git` counts the repo's working tree; `session` counts the edits in the session's log. */\n\tsource: z.enum(['git', 'session'])\n});\n\n/** How much a session has changed, as the sidebar shows it. */\nexport type ChangesInfo = z.infer<typeof ChangesInfoSchema>;\n\nconst UpgradeStatusSchema = z.object({\n\tstate: z.enum(['running', 'unchanged', 'timeout', 'failed']),\n\tcommand: z.string(),\n\tat: z.number(),\n\tmessage: z.string().optional(),\n\toutput: z.string().nullable().optional()\n});\n/** How the last upgrade asked of a session stands (`upgradeStatus()` in src/server/restart-claude.ts). */\nexport type UpgradeStatus = z.infer<typeof UpgradeStatusSchema>;\n\nconst EnrichedSessionSchema = z.object({\n\tv: z.number(),\n\tid: z.string(),\n\tpid: z.number(),\n\tcwd: z.string(),\n\tgit_root: z.string().nullable(),\n\ttmux_target: z.string().nullable(),\n\tstate: SessionStateSchema,\n\tcurrent_action: z.string().nullable(),\n\tprompt_text: z.string().nullable(),\n\tlast_update: z.number(),\n\t/** When the user's latest prompt started a turn; stamped by the hook. */\n\tturn_started_at: z.number().nullable().optional(),\n\t/** When the latest turn ended for good; stamped by the hook. */\n\tturn_completed_at: z.number().nullable().optional(),\n\t/** When anyone last had the session open (`visits.json`) — live only. */\n\tlast_visited_at: z.number().nullable().optional(),\n\tscreenshots: z.array(ScreenshotSchema).optional(),\n\tchrome_active: z.boolean().optional(),\n\tlinked_to: z.string().nullable().optional(),\n\trc_url: z.string().nullable().optional(),\n\t/** Text sitting in the pane's prompt box right now — live, never persisted. */\n\tdraft_input: z.string().nullable().optional(),\n\t/** Who put it there: the user, or Claude Code's own prompt suggestion. */\n\tdraft_kind: z.enum(['typed', 'suggestion']).nullable().optional(),\n\t/** Messages waiting in Claude Code's own queue, oldest first — live only. */\n\tpane_queue: z.array(z.string()).optional(),\n\t/**\n\t * The numbered options a permission or question dialog is offering in the\n\t * pane right now — live only. Read off the pane, so the UI must still gate\n\t * on `state`: the hooks are authoritative for whether a dialog is open.\n\t */\n\tpane_choice: PaneChoiceSchema.nullable().optional(),\n\t/** Claude Code's footer notice about its own update — live only. */\n\tpane_update: z\n\t\t.object({\n\t\t\tkind: z.enum(['installed', 'available', 'failed']),\n\t\t\ttext: z.string(),\n\t\t\t/** The upgrade command it names, when claude-mux can run it. */\n\t\t\tcommand: z.string().optional()\n\t\t})\n\t\t.nullable()\n\t\t.optional(),\n\t/** Claude Code's sign-in screen: its link and code field, the verdict, or a sign-in gone stale — live only. */\n\tpane_login: z\n\t\t.discriminatedUnion('step', [\n\t\t\tz.object({\n\t\t\t\tstep: z.literal('code'),\n\t\t\t\turl: z.string().nullable(),\n\t\t\t\ttyped: z.string(),\n\t\t\t\terror: z.string().nullable()\n\t\t\t}),\n\t\t\tz.object({ step: z.literal('failed'), error: z.string() }),\n\t\t\tz.object({ step: z.literal('done') }),\n\t\t\tz.object({ step: z.literal('expired') })\n\t\t])\n\t\t.nullable()\n\t\t.optional(),\n\t/** Claude Code's rewind dialog: the list of points to go back to, or the confirmation for one — live only. */\n\tpane_rewind: z\n\t\t.discriminatedUnion('step', [\n\t\t\tz.object({\n\t\t\t\tstep: z.literal('list'),\n\t\t\t\trows: z.array(\n\t\t\t\t\tz.object({\n\t\t\t\t\t\ttext: z.string(),\n\t\t\t\t\t\tfiles: z.string().nullable(),\n\t\t\t\t\t\tselected: z.boolean(),\n\t\t\t\t\t\tcurrent: z.boolean()\n\t\t\t\t\t})\n\t\t\t\t),\n\t\t\t\tabove: z.number(),\n\t\t\t\tbelow: z.number()\n\t\t\t}),\n\t\t\tz.object({\n\t\t\t\tstep: z.literal('confirm'),\n\t\t\t\tprompt: z.string(),\n\t\t\t\tago: z.string().nullable(),\n\t\t\t\teffects: z.array(z.string()),\n\t\t\t\toptions: z.array(z.object({ n: z.number(), label: z.string(), selected: z.boolean() }))\n\t\t\t})\n\t\t])\n\t\t.nullable()\n\t\t.optional(),\n\t/** The upgrade the status line started: running, or why it did not restart — live only. */\n\tupgrade: UpgradeStatusSchema.nullable().optional(),\n\t/** The spinner line while a turn runs, split into its parts — live only. */\n\tpane_activity: PaneActivitySchema.nullable().optional(),\n\t/** Share of the context window in use, read off the transcript's latest reply. */\n\tcontext_pct: z.number().nullable().optional(),\n\tdisplay_name: z.string().nullable().optional(),\n\tpane_title: z.string().nullable(),\n\tpane_alive: z.boolean(),\n\t/** Every message claude-mux holds for the pane, next out first — live only. */\n\tqueue: z.array(QueuedMessageSchema).optional(),\n\t/** What the queue and steers handed the pane lately, newest last — live only. */\n\tdelivered: z.array(DeliverySchema).optional(),\n\tagent: z.enum(AGENT_IDS).optional(),\n\t/** Set when the maestro daemon started the session. */\n\tmaestro_role: z.string().nullable().optional(),\n\tmaestro_issue: z.number().nullable().optional(),\n\t/** Subagents running now, those done in the last hour, and those failed in the last day. */\n\tsubagents: z.array(SubagentSchema).optional(),\n\t/** The issue that worker owns, as GitHub last described it — live only. */\n\tissue: IssueInfoSchema.nullable().optional(),\n\t/** Files changed, with line counts: git's when in a repo, else the session log's — live only. */\n\tchanges: ChangesInfoSchema.nullable().optional()\n});\n\n// ============================================================================\n// Message schemas (discriminated by `type`)\n// ============================================================================\n\n/**\n * The projects the server remembers, on every sessions broadcast. Optional\n * because a browser may be talking to a server from before the list moved\n * there, in which case it falls back to its own.\n */\nconst ProjectsField = z.array(z.string()).optional();\n\n/** This machine's settings, likewise on every broadcast; absent on older servers. */\nconst SettingsField = z.object({ autoRemoteControl: z.boolean() }).partial().optional();\n\n/** Tickets on GitHub waiting on a person, for the repos this machine's sessions are in. */\nconst InboxField = z.array(InboxTicketSchema).optional();\n\n/** What each project is matched across machines by, and its icon (`src/fleet-projects.ts`); absent on older servers. */\nconst ProjectReportsField = z.array(ProjectReportSchema).optional();\n\n/** This machine's tmux panes that run no Claude session (`src/fleet-places.ts`); absent on older servers. */\nconst PanesField = eachOf(PlainPaneSchema).optional();\n\n/** This machine's Claude Code marketplaces and plugins (`src/fleet-plugins.ts`); null until read, absent on older servers. */\nconst PluginsField = PluginsReportSchema.nullable().optional();\n\nconst SessionsMessageSchema = z.object({\n\ttype: z.literal('sessions'),\n\tsessions: z.array(EnrichedSessionSchema),\n\tcount: z.number(),\n\tpanes: PanesField,\n\tprojects: ProjectsField,\n\tsettings: SettingsField,\n\tinbox: InboxField,\n\tprojectReports: ProjectReportsField,\n\tplugins: PluginsField,\n\ttimestamp: z.number()\n});\n\nconst ConnectedMessageSchema = z.object({\n\ttype: z.literal('connected'),\n\tsessions: z.array(EnrichedSessionSchema),\n\tcount: z.number(),\n\tpanes: PanesField,\n\tprojects: ProjectsField,\n\tsettings: SettingsField,\n\tinbox: InboxField,\n\tprojectReports: ProjectReportsField,\n\tplugins: PluginsField,\n\ttimestamp: z.number()\n});\n\n/**\n * Every other machine, as this one last heard from it (`src/server/fleet-state.ts`).\n * Sent only to a page that asks for it (`?fleet=1`); `self` is this machine's id.\n * A peer's sessions are its own broadcast, read with the same schema.\n */\n/**\n * A list read item by item: an item this schema cannot read is dropped and\n * the rest kept. Another machine may run another version, and one session it\n * describes differently must not cost the page that whole machine, or the fleet.\n */\nexport function eachOf<T extends z.ZodType>(item: T) {\n\treturn z.array(z.unknown()).transform((items) =>\n\t\titems.flatMap((raw) => {\n\t\t\tconst parsed = item.safeParse(raw);\n\t\t\treturn parsed.success ? [parsed.data as z.infer<T>] : [];\n\t\t})\n\t);\n}\n\nconst FleetMachineSchema = z.object({\n\tid: z.string(),\n\thostname: z.string(),\n\turl: z.string(),\n\tonline: z.boolean(),\n\tlastSeen: z.number().nullable(),\n\tretryAt: z.number().nullable(),\n\tversion: z.string().nullable(),\n\t// Absent from an older machine's own fleet state.\n\tprotocol: z.number().nullable().default(null),\n\tsessions: eachOf(EnrichedSessionSchema),\n\tprojects: z.array(z.string()),\n\tinbox: eachOf(InboxTicketSchema),\n\tprojectReports: eachOf(ProjectReportSchema).optional(),\n\tpanes: PanesField,\n\t// A report this version cannot read counts as none.\n\tplugins: PluginsReportSchema.nullable().optional().catch(null)\n});\n\nconst FleetMessageSchema = z.object({\n\ttype: z.literal('fleet'),\n\tself: z.string(),\n\tmachines: z.array(FleetMachineSchema),\n\ttimestamp: z.number()\n});\n\n/**\n * The fleet preferences (`src/fleet-prefs.ts`), sent on connect and after\n * every change, to pages and peers alike.\n */\nconst PrefsMessageSchema = z.object({\n\ttype: z.literal('prefs'),\n\tprefs: z.record(z.string(), PrefEntrySchema),\n\ttimestamp: z.number()\n});\n\n/** This machine's past sessions (`src/transcript/past-sessions.ts`), sent on connect and when they change. */\nconst PastMessageSchema = z.object({\n\ttype: z.literal('past'),\n\tsessions: eachOf(PastSessionSchema),\n\ttimestamp: z.number()\n});\n\n/** Every other machine's past sessions by machine id, from the fleet state; to pages that asked for the fleet. */\nconst FleetPastMessageSchema = z.object({\n\ttype: z.literal('fleet-past'),\n\tmachines: z.record(z.string(), eachOf(PastSessionSchema)),\n\ttimestamp: z.number()\n});\n\nconst SystemStatsMessageSchema = z.object({\n\ttype: z.literal('systemStats'),\n\tcpu: z.number(),\n\tram: z.number(),\n\tswap: z.number(),\n\tramTotal: z.number(),\n\tswapTotal: z.number(),\n\t/** Percentage used of the filesystem holding the home directory; null where it cannot be read. */\n\tdisk: z.number().nullable().default(null),\n\ttimestamp: z.number()\n});\n\n// ============================================================================\n// Union + exports\n// ============================================================================\n\nexport const SessionsWsMessageSchema = z.discriminatedUnion('type', [\n\tSessionsMessageSchema,\n\tConnectedMessageSchema,\n\tFleetMessageSchema,\n\tPrefsMessageSchema,\n\tPastMessageSchema,\n\tFleetPastMessageSchema,\n\tSystemStatsMessageSchema\n]);\n\nexport type SessionsWsMessage = z.infer<typeof SessionsWsMessageSchema>;\nexport type SessionsMessage = z.infer<typeof SessionsMessageSchema>;\nexport type ConnectedMessage = z.infer<typeof ConnectedMessageSchema>;\nexport type SystemStatsMessage = z.infer<typeof SystemStatsMessageSchema>;\nexport type FleetMachineInfo = z.infer<typeof FleetMachineSchema>;\nexport type EnrichedSession = z.infer<typeof EnrichedSessionSchema>;\n"],"names":[],"mappings":";;;;AAkBO,MAAM,kBAAkB,EAAE,OAAO,EAAE,OAAO,EAAE,WAAW,IAAI,EAAE,OAAA,EAAS,OAAA,GAAU,IAAI,EAAE,OAAA,GAAU;AAOhG,MAAM,iBAAiB;AAGvB,MAAM,iBAAiB;AAGvB,MAAM,aAAa;AAGnB,SAAS,YAAY,WAA2B;AACrD,SAAO,oBAAoB,SAAS;AACtC;AAOO,SAAS,WAAW,WAAmB,WAA2B;AACvE,SAAO,WAAW,SAAS,IAAI,SAAS;AAC1C;AAQO,MAAM,qBAAqB;AAO3B,MAAM,aAAa;AAEnB,SAAS,gBAAgB,KAAsB;AACpD,SAAO,IAAI,WAAW,kBAAkB;AAC1C;AAGO,SAAS,QAAQ,GAAc,GAAuB;AAC3D,SAAO,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE;AAChD;AAOO,SAAS,SAAS,KAAa,UAAqB,MAA0B;AACnF,MAAI,QAAQ,WAAY,QAAO,QAAQ,UAAU,IAAI;AACrD,QAAM,SAAS,UAAU,SAAS,KAAK;AACvC,MAAI,WAAW,UAAU,KAAK,KAAK,EAAG,QAAO;AAC7C,SAAO,QAAQ,MAAM,QAAQ;AAC/B;AAEA,SAAS,UAAU,OAAyB;AAC1C,QAAM,OAAO;AACb,SAAO,OAAO,MAAM,cAAc,YAAY,KAAK,cAAc,MAAM,OAAO,KAAK,eAAe,YAAY,KAAK,eAAe;AACpI;AAEO,SAAS,UAAU,KAA6B;AACrD,SAAO,OAAO,QAAQ,YAAY,IAAI,SAAS,KAAK,IAAI,UAAU;AACpE;AAOO,SAAS,WAAW,SAAqB,UAA6D;AAC3G,MAAI,CAAC,YAAY,OAAO,aAAa,YAAY,MAAM,QAAQ,QAAQ,UAAU,EAAE,OAAO,SAAS,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A,EACZ,WAAW,EAAE,OAAA;AAAA;AAAA,EAEb,MAAM,EAAE,OAAA,EAAS,SAAA,EAAW,QAAQ,IAAI;AAAA,EACxC,WAAW,EAAE,OAAA;AACd,CAAC;AAMM,MAAM,0BAA0B,EAAE,mBAAmB,QAAQ;AAAA,EACnE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACD,CAAC;"}
|
|
@@ -4978,6 +4978,16 @@ function FolderPicker($$renderer, $$props) {
|
|
|
4978
4978
|
];
|
|
4979
4979
|
}).sort((a, b) => b.score - a.score);
|
|
4980
4980
|
});
|
|
4981
|
+
const createAt = derived(() => {
|
|
4982
|
+
const q = query.trim().toLowerCase();
|
|
4983
|
+
const i = matches().findIndex((m) => !m.folder.name.toLowerCase().startsWith(q));
|
|
4984
|
+
return i === -1 ? matches().length : i;
|
|
4985
|
+
});
|
|
4986
|
+
const rows = derived(() => newName() ? [
|
|
4987
|
+
...matches().slice(0, createAt()),
|
|
4988
|
+
"create",
|
|
4989
|
+
...matches().slice(createAt())
|
|
4990
|
+
] : matches());
|
|
4981
4991
|
const crumbs = derived(() => {
|
|
4982
4992
|
if (!path) return [];
|
|
4983
4993
|
const usesHome = home !== "" && `${path}/`.startsWith(`${home}/`);
|
|
@@ -5008,6 +5018,11 @@ function FolderPicker($$renderer, $$props) {
|
|
|
5008
5018
|
tab = id;
|
|
5009
5019
|
chosen = next;
|
|
5010
5020
|
let shown = await browseTo(carried, true);
|
|
5021
|
+
const parts = carried.split("/");
|
|
5022
|
+
for (let n2 = parts.length - 1; shown === false && n2 > 0 && parts[n2 - 1] !== ""; n2--) {
|
|
5023
|
+
shown = await browseTo(parts.slice(0, n2).join("/"), true);
|
|
5024
|
+
if (shown) query = parts[n2];
|
|
5025
|
+
}
|
|
5011
5026
|
if (shown === false && carried !== "~") shown = await browseTo("~", true);
|
|
5012
5027
|
if (shown === false) [tab, chosen] = [was, wasChosen];
|
|
5013
5028
|
}
|
|
@@ -5232,55 +5247,59 @@ function FolderPicker($$renderer, $$props) {
|
|
|
5232
5247
|
$$renderer6.push("<!--[-1-->");
|
|
5233
5248
|
}
|
|
5234
5249
|
$$renderer6.push(`<!--]--> <div><!--[-->`);
|
|
5235
|
-
const each_array_4 = ensure_array_like(
|
|
5250
|
+
const each_array_4 = ensure_array_like(rows());
|
|
5236
5251
|
for (let i = 0, $$length = each_array_4.length; i < $$length; i++) {
|
|
5237
5252
|
let match = each_array_4[i];
|
|
5238
|
-
|
|
5239
|
-
|
|
5240
|
-
|
|
5241
|
-
|
|
5242
|
-
|
|
5243
|
-
|
|
5244
|
-
let run2 = each_array_5[$$index_4];
|
|
5245
|
-
if (run2.hit) {
|
|
5246
|
-
$$renderer6.push(`<!--[0--><mark class="svelte-57drpi">${escape_html(run2.text)}</mark>`);
|
|
5247
|
-
} else {
|
|
5248
|
-
$$renderer6.push(`<!--[-1-->${escape_html(run2.text)}`);
|
|
5249
|
-
}
|
|
5250
|
-
$$renderer6.push(`<!--]-->`);
|
|
5253
|
+
if (match === "create") {
|
|
5254
|
+
$$renderer6.push(`<!--[0--><div${attr_class("fb-item fb-create svelte-57drpi", void 0, { "active": i === active })} role="presentation"><button class="fb-main svelte-57drpi"${attr("disabled", creating, true)}><iconify-icon icon="mdi:folder-plus-outline" aria-hidden="true"></iconify-icon> <span class="fb-name svelte-57drpi">${escape_html("Create folder")} <q class="svelte-57drpi">${escape_html(newName())}</q></span> `);
|
|
5255
|
+
if (gitInit) {
|
|
5256
|
+
$$renderer6.push(`<!--[0--><span class="fb-tag svelte-57drpi">git</span>`);
|
|
5257
|
+
} else {
|
|
5258
|
+
$$renderer6.push("<!--[-1-->");
|
|
5251
5259
|
}
|
|
5252
|
-
$$renderer6.push(`<!--]
|
|
5253
|
-
} else {
|
|
5254
|
-
$$renderer6.push(`<!--[-1-->${escape_html(match.folder.name)}`);
|
|
5255
|
-
}
|
|
5256
|
-
$$renderer6.push(`<!--]--></span> `);
|
|
5257
|
-
marks($$renderer6, m);
|
|
5258
|
-
$$renderer6.push(`<!----> `);
|
|
5259
|
-
if (match.folder.git) {
|
|
5260
|
-
$$renderer6.push(`<!--[0--><span class="fb-tag svelte-57drpi">git</span>`);
|
|
5261
|
-
} else {
|
|
5262
|
-
$$renderer6.push("<!--[-1-->");
|
|
5263
|
-
}
|
|
5264
|
-
$$renderer6.push(`<!--]--></button> `);
|
|
5265
|
-
if (m.here) {
|
|
5266
|
-
$$renderer6.push("<!--[0-->");
|
|
5267
|
-
goto2($$renderer6, m.here);
|
|
5260
|
+
$$renderer6.push(`<!--]--></button></div>`);
|
|
5268
5261
|
} else {
|
|
5269
5262
|
$$renderer6.push("<!--[-1-->");
|
|
5263
|
+
const m = mark()(match.folder.path);
|
|
5264
|
+
$$renderer6.push(`<div${attr_class("fb-item svelte-57drpi", void 0, { "active": i === active })} role="presentation"><button class="fb-main svelte-57drpi"><span class="fb-name svelte-57drpi">`);
|
|
5265
|
+
if (match.runs) {
|
|
5266
|
+
$$renderer6.push(`<!--[0--><!--[-->`);
|
|
5267
|
+
const each_array_5 = ensure_array_like(match.runs);
|
|
5268
|
+
for (let $$index_4 = 0, $$length2 = each_array_5.length; $$index_4 < $$length2; $$index_4++) {
|
|
5269
|
+
let run2 = each_array_5[$$index_4];
|
|
5270
|
+
if (run2.hit) {
|
|
5271
|
+
$$renderer6.push(`<!--[0--><mark class="svelte-57drpi">${escape_html(run2.text)}</mark>`);
|
|
5272
|
+
} else {
|
|
5273
|
+
$$renderer6.push(`<!--[-1-->${escape_html(run2.text)}`);
|
|
5274
|
+
}
|
|
5275
|
+
$$renderer6.push(`<!--]-->`);
|
|
5276
|
+
}
|
|
5277
|
+
$$renderer6.push(`<!--]-->`);
|
|
5278
|
+
} else {
|
|
5279
|
+
$$renderer6.push(`<!--[-1-->${escape_html(match.folder.name)}`);
|
|
5280
|
+
}
|
|
5281
|
+
$$renderer6.push(`<!--]--></span> `);
|
|
5282
|
+
marks($$renderer6, m);
|
|
5283
|
+
$$renderer6.push(`<!----> `);
|
|
5284
|
+
if (match.folder.git) {
|
|
5285
|
+
$$renderer6.push(`<!--[0--><span class="fb-tag svelte-57drpi">git</span>`);
|
|
5286
|
+
} else {
|
|
5287
|
+
$$renderer6.push("<!--[-1-->");
|
|
5288
|
+
}
|
|
5289
|
+
$$renderer6.push(`<!--]--></button> `);
|
|
5290
|
+
if (m.here) {
|
|
5291
|
+
$$renderer6.push("<!--[0-->");
|
|
5292
|
+
goto2($$renderer6, m.here);
|
|
5293
|
+
} else {
|
|
5294
|
+
$$renderer6.push("<!--[-1-->");
|
|
5295
|
+
}
|
|
5296
|
+
$$renderer6.push(`<!--]--></div>`);
|
|
5270
5297
|
}
|
|
5271
|
-
$$renderer6.push(`<!--]
|
|
5298
|
+
$$renderer6.push(`<!--]-->`);
|
|
5272
5299
|
}
|
|
5273
5300
|
$$renderer6.push(`<!--]--> `);
|
|
5274
|
-
if (
|
|
5275
|
-
$$renderer6.push(`<!--[0--><
|
|
5276
|
-
if (gitInit) {
|
|
5277
|
-
$$renderer6.push(`<!--[0--><span class="fb-tag svelte-57drpi">git</span>`);
|
|
5278
|
-
} else {
|
|
5279
|
-
$$renderer6.push("<!--[-1-->");
|
|
5280
|
-
}
|
|
5281
|
-
$$renderer6.push(`<!--]--></button></div>`);
|
|
5282
|
-
} else if (matches().length === 0) {
|
|
5283
|
-
$$renderer6.push(`<!--[1--><p class="fb-empty svelte-57drpi">`);
|
|
5301
|
+
if (rows().length === 0) {
|
|
5302
|
+
$$renderer6.push(`<!--[0--><p class="fb-empty svelte-57drpi">`);
|
|
5284
5303
|
if (query) {
|
|
5285
5304
|
$$renderer6.push(`<!--[0-->No folder here matches <span class="fb-empty-q svelte-57drpi">${escape_html(query)}</span>. Backspace to clear.`);
|
|
5286
5305
|
} else {
|
|
@@ -6631,10 +6650,18 @@ function AllSessionsPanel($$renderer, $$props) {
|
|
|
6631
6650
|
return machine.local ? current().host === null : current().host?.toLowerCase() === machine.server.hostname.toLowerCase();
|
|
6632
6651
|
}
|
|
6633
6652
|
function rootsOf(machine) {
|
|
6634
|
-
|
|
6635
|
-
|
|
6636
|
-
|
|
6637
|
-
|
|
6653
|
+
const repos = machine.sessions.map((s) => s.git_root);
|
|
6654
|
+
const remotes = new Map(machine.projectReports.map((r) => [r.root, r.remote]));
|
|
6655
|
+
return projectRoots(
|
|
6656
|
+
machine.projects,
|
|
6657
|
+
[
|
|
6658
|
+
...machine.sessions.map((s) => s.cwd),
|
|
6659
|
+
...machine.panes.map((p2) => p2.cwd)
|
|
6660
|
+
],
|
|
6661
|
+
repos,
|
|
6662
|
+
// A remote says so; a repo without one shows itself as a session's git root.
|
|
6663
|
+
(root) => remotes.get(root) != null || repos.includes(root)
|
|
6664
|
+
);
|
|
6638
6665
|
}
|
|
6639
6666
|
function relPath(cwd, root) {
|
|
6640
6667
|
if (cwd === root) return null;
|